feffery-infographic 0.1.0__py3-none-any.whl
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.
- feffery_infographic/Infographic.py +186 -0
- feffery_infographic/__init__.py +86 -0
- feffery_infographic/_imports_.py +3 -0
- feffery_infographic/feffery_infographic.min.js +3 -0
- feffery_infographic/feffery_infographic.min.js.LICENSE.txt +1 -0
- feffery_infographic/feffery_infographic.min.js.map +1 -0
- feffery_infographic/metadata.json +1 -0
- feffery_infographic/package-info.json +67 -0
- feffery_infographic/prompts.py +145 -0
- feffery_infographic-0.1.0.dist-info/METADATA +173 -0
- feffery_infographic-0.1.0.dist-info/RECORD +14 -0
- feffery_infographic-0.1.0.dist-info/WHEEL +5 -0
- feffery_infographic-0.1.0.dist-info/licenses/LICENSE +21 -0
- feffery_infographic-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see feffery_infographic.min.js.LICENSE.txt */
|
|
2
|
+
(()=>{var t={228(t){"use strict";var e=Object.prototype.hasOwnProperty,n="~";function i(){}function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,i,o,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new r(i,o||t,a),l=n?n+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],s]:t._events[l].push(s):(t._events[l]=s,t._eventsCount++),t}function a(t,e){0===--t._eventsCount?t._events=new i:delete t._events[e]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,i,r=[];if(0===this._eventsCount)return r;for(i in t=this._events)e.call(t,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t){var e=n?n+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,o=i.length,a=new Array(o);r<o;r++)a[r]=i[r].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,i=this._events[e];return i?i.fn?1:i.length:0},s.prototype.emit=function(t,e,i,r,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var l,h,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,i),!0;case 4:return c.fn.call(c.context,e,i,r),!0;case 5:return c.fn.call(c.context,e,i,r,o),!0;case 6:return c.fn.call(c.context,e,i,r,o,a),!0}for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];c.fn.apply(c.context,l)}else{var u,f=c.length;for(h=0;h<f;h++)switch(c[h].once&&this.removeListener(t,c[h].fn,void 0,!0),d){case 1:c[h].fn.call(c[h].context);break;case 2:c[h].fn.call(c[h].context,e);break;case 3:c[h].fn.call(c[h].context,e,i);break;case 4:c[h].fn.call(c[h].context,e,i,r);break;default:if(!l)for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c[h].fn.apply(c[h].context,l)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,i,r){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||r&&!s.once||i&&s.context!==i||a(this,o);else{for(var l=0,h=[],c=s.length;l<c;l++)(s[l].fn!==e||r&&!s[l].once||i&&s[l].context!==i)&&h.push(s[l]);h.length?this._events[o]=1===h.length?h[0]:h:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s},328(t){var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function n(t){return t?t.replace(/^\s+|\s+$/g,""):""}function i(t,e){var n=t&&"string"==typeof t.type,r=n?t:e;for(var o in t){var a=t[o];Array.isArray(a)?a.forEach(function(t){i(t,r)}):a&&"object"==typeof a&&i(a,r)}return n&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:e||null}),t}t.exports=function(t,r){r=r||{};var o=1,a=1;function s(t){var e=t.match(/\n/g);e&&(o+=e.length);var n=t.lastIndexOf("\n");a=~n?t.length-n:a+t.length}function l(){var t={line:o,column:a};return function(e){return e.position=new h(t),m(),e}}function h(t){this.start=t,this.end={line:o,column:a},this.source=r.source}h.prototype.content=t;var c=[];function d(e){var n=new Error(r.source+":"+o+":"+a+": "+e);if(n.reason=e,n.filename=r.source,n.line=o,n.column=a,n.source=t,!r.silent)throw n;c.push(n)}function u(){return g(/^{\s*/)}function f(){return g(/^}/)}function p(){var e,n=[];for(m(),y(n);t.length&&"}"!=t.charAt(0)&&(e=z()||A());)!1!==e&&(n.push(e),y(n));return n}function g(e){var n=e.exec(t);if(n){var i=n[0];return s(i),t=t.slice(i.length),n}}function m(){g(/^\s*/)}function y(t){var e;for(t=t||[];e=x();)!1!==e&&t.push(e);return t}function x(){var e=l();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var n=2;""!=t.charAt(n)&&("*"!=t.charAt(n)||"/"!=t.charAt(n+1));)++n;if(n+=2,""===t.charAt(n-1))return d("End of comment missing");var i=t.slice(2,n-2);return a+=2,s(i),t=t.slice(n),a+=2,e({type:"comment",comment:i})}}function v(){var t=g(/^([^{]+)/);if(t)return n(t[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(t){return t.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(t){return t.replace(/\u200C/g,",")})}function b(){var t=l(),i=g(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(i){if(i=n(i[0]),!g(/^:\s*/))return d("property missing ':'");var r=g(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=t({type:"declaration",property:i.replace(e,""),value:r?n(r[0]).replace(e,""):""});return g(/^[;\s]*/),o}}function w(){var t,e=[];if(!u())return d("missing '{'");for(y(e);t=b();)!1!==t&&(e.push(t),y(e));return f()?e:d("missing '}'")}function M(){for(var t,e=[],n=l();t=g(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(t[1]),g(/^,\s*/);if(e.length)return n({type:"keyframe",values:e,declarations:w()})}var k,$=S("import"),C=S("charset"),_=S("namespace");function S(t){var e=new RegExp("^@"+t+"\\s*([^;]+);");return function(){var n=l(),i=g(e);if(i){var r={type:t};return r[t]=i[1].trim(),n(r)}}}function z(){if("@"==t[0])return function(){var t=l();if(e=g(/^@([-\w]+)?keyframes\s*/)){var e,n=e[1];if(!(e=g(/^([-\w]+)\s*/)))return d("@keyframes missing name");var i,r=e[1];if(!u())return d("@keyframes missing '{'");for(var o=y();i=M();)o.push(i),o=o.concat(y());return f()?t({type:"keyframes",name:r,vendor:n,keyframes:o}):d("@keyframes missing '}'")}}()||function(){var t=l(),e=g(/^@media *([^{]+)/);if(e){var i=n(e[1]);if(!u())return d("@media missing '{'");var r=y().concat(p());return f()?t({type:"media",media:i,rules:r}):d("@media missing '}'")}}()||function(){var t=l(),e=g(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return t({type:"custom-media",name:n(e[1]),media:n(e[2])})}()||function(){var t=l(),e=g(/^@supports *([^{]+)/);if(e){var i=n(e[1]);if(!u())return d("@supports missing '{'");var r=y().concat(p());return f()?t({type:"supports",supports:i,rules:r}):d("@supports missing '}'")}}()||$()||C()||_()||function(){var t=l(),e=g(/^@([-\w]+)?document *([^{]+)/);if(e){var i=n(e[1]),r=n(e[2]);if(!u())return d("@document missing '{'");var o=y().concat(p());return f()?t({type:"document",document:r,vendor:i,rules:o}):d("@document missing '}'")}}()||function(){var t=l();if(g(/^@page */)){var e=v()||[];if(!u())return d("@page missing '{'");for(var n,i=y();n=b();)i.push(n),i=i.concat(y());return f()?t({type:"page",selectors:e,declarations:i}):d("@page missing '}'")}}()||function(){var t=l();if(g(/^@host\s*/)){if(!u())return d("@host missing '{'");var e=y().concat(p());return f()?t({type:"host",rules:e}):d("@host missing '}'")}}()||function(){var t=l();if(g(/^@font-face\s*/)){if(!u())return d("@font-face missing '{'");for(var e,n=y();e=b();)n.push(e),n=n.concat(y());return f()?t({type:"font-face",declarations:n}):d("@font-face missing '}'")}}()}function A(){var t=l(),e=v();return e?(y(),t({type:"rule",selectors:e,declarations:w()})):d("selector missing")}return i((k=p(),{type:"stylesheet",stylesheet:{source:r.source,rules:k,parsingErrors:c}}))}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i,r=function(){var t=document.currentScript;if(!t){for(var e=document.getElementsByTagName("script"),n=[],i=0;i<e.length;i++)n.push(e[i]);t=(n=n.filter(function(t){return!t.async&&!t.text&&!t.textContent})).slice(-1)[0]}return t};if(Object.defineProperty(n,"p",{get:(i=r().src.split("/").slice(0,-1).join("/")+"/",function(){return i})}),"undefined"!=typeof jsonpScriptSrc){var o=jsonpScriptSrc;jsonpScriptSrc=function(t){var e,n=(e=r(),/\/_dash-component-suites\//.test(e.src)),i=o(t);if(!n)return i;var a=i.split("/"),s=a.slice(-1)[0].split(".");return s.splice(1,0,"v0_1_0m1768222695"),a.splice(-1,1,s.join(".")),a.join("/")}}var a={};(()=>{"use strict";n.r(a),n.d(a,{Infographic:()=>XM});var t={};n.r(t),n.d(t,{diamond:()=>rl,dot:()=>ol,hex:()=>al,line:()=>sl,mosaic:()=>ll,square:()=>hl});const e=window.React,i=window.PropTypes;var r=n.n(i);const o=new Map,s={edgeType:"curved",edgeColorMode:"gradient",edgeWidth:2,colorMode:"branch",levelGap:80,nodeGap:18},l={edgeType:"curved",edgeWidth:2,edgeColorMode:"gradient",colorMode:"level",levelGap:80,nodeGap:18},h={type:"lined-text",usePaletteColor:!0,showUnderline:!0,underlineThickness:2},c={type:"capsule-item"},d={type:"circular-progress"},u={type:"rounded-rect-node",positionH:"center"},f={type:"compact-card"},p=(t,e)=>({type:"hierarchy-mindmap",...void 0!==e?{edgeAlign:e}:{},...t}),g=(t,e,n,i)=>[t,{design:{structure:p(e,i),item:n}}],m=Object.fromEntries([g("hierarchy-mindmap-branch-gradient-lined-palette",s,h,"bottom"),g("hierarchy-mindmap-level-gradient-lined-palette",l,h,"bottom"),g("hierarchy-mindmap-branch-gradient-capsule-item",s,c),g("hierarchy-mindmap-level-gradient-capsule-item",l,c),g("hierarchy-mindmap-branch-gradient-circle-progress",s,d,.4),g("hierarchy-mindmap-level-gradient-circle-progress",l,d,.4),g("hierarchy-mindmap-branch-gradient-rounded-rect",s,u),g("hierarchy-mindmap-level-gradient-rounded-rect",l,u),g("hierarchy-mindmap-branch-gradient-compact-card",s,f),g("hierarchy-mindmap-level-gradient-compact-card",l,f)]),y={"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}},x=["capsule-item","rounded-rect-node","compact-card","badge-card","ribbon-card"],v={},b="hierarchy-tree",w=[{key:""},{key:"bt",orientation:"bottom-top"},{key:"lr",orientation:"left-right"},{key:"rl",orientation:"right-left"}],M=(t,e,n)=>t?`${b}-${t}-${e}-${n}`:`${b}-${e}-${n}`;for(const t of x)for(const[e,n]of Object.entries(y))for(const{key:i,orientation:r}of w)v[M(i,e,t)]={design:{structure:{type:"hierarchy-tree",...r?{orientation:r}:{},...n},item:{type:t}}};const k={"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"}},"sequence-funnel-simple":{design:{title:"default",structure:{type:"sequence-funnel"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]},themeConfig:{palette:"#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"}]}},...v,...m,"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}]}},"chart-wordcloud-rotate":{design:{structure:{type:"chart-wordcloud"},item:"simple"}},"chart-wordcloud":{design:{structure:{type:"chart-wordcloud",enableRotate:!1},item:"simple"}},"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"}},"hierarchy-structure":{design:{title:"default",structure:{type:"hierarchy-structure"},item:"simple"}},"hierarchy-structure-mirror":{design:{title:"default",structure:{type:"hierarchy-structure",layerLabelPosition:"right"},item:"simple"}}};Object.entries(k).forEach(([t,e])=>{!function(t,e){o.set(t,e)}(t,e)});const $=Symbol.for("@antv/infographic/Fragment");function C(t,e={}){return{type:t,props:e}}const _=C,S=Symbol.for("@antv/infographic/Defs");function z(t){return{type:S,props:t}}function A(t){const{x:e=0,y:n=0,width:i=0,height:r=0}=t;return t.cx??(t.cx=e+i/2),t.cy??(t.cy=n+r/2),t.rx??(t.rx=i/2),t.ry??(t.ry=r/2),{type:"ellipse",props:t}}function E(t){const{x:e=0,y:n=0}=t;return(e||n)&&(t.transform||(t.transform=`translate(${e}, ${n})`)),{type:"g",props:t}}function L(t){const{x:e,y:n}=t,i={...t};return void 0===e&&void 0===n||(i.transform=`translate(${e??0}, ${n??0})`),{type:"path",props:i}}function P({points:t=[],...e}){const{x:n,y:i}=e,r=t.map(({x:t,y:e})=>`${t},${e}`).join(" "),o={...e,points:r};return void 0===n&&void 0===i||(o.transform=`translate(${n??0}, ${i??0})`+(o.transform||"")),{type:"polygon",props:o}}function H(t){return{type:"rect",props:t}}function T(t){return Object.keys(t[0]).reduce((e,n)=>{const i=n;return t.every(e=>e[i]===t[0][i])&&(e[i]=t[0][i]),e},{})}const I=(t,e)=>{if("number"==typeof t)return 3===e?{mode:"rgb",r:(t>>8&15|t>>4&240)/255,g:(t>>4&15|240&t)/255,b:(15&t|t<<4&240)/255}:4===e?{mode:"rgb",r:(t>>12&15|t>>8&240)/255,g:(t>>8&15|t>>4&240)/255,b:(t>>4&15|240&t)/255,alpha:(15&t|t<<4&240)/255}:6===e?{mode:"rgb",r:(t>>16&255)/255,g:(t>>8&255)/255,b:(255&t)/255}:8===e?{mode:"rgb",r:(t>>24&255)/255,g:(t>>16&255)/255,b:(t>>8&255)/255,alpha:(255&t)/255}:void 0},j={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},O=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,W="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",N=`${W}%`,D=`(?:${W}%|${W})`,R=`(?:${W}(deg|grad|rad|turn)|${W})`,F="\\s*,\\s*",V=(new RegExp(`^(?:${W}%|${W}|none)$`),new RegExp(`^rgba?\\(\\s*${W}${F}${W}${F}${W}\\s*(?:,\\s*${D}\\s*)?\\)$`)),B=new RegExp(`^rgba?\\(\\s*${N}${F}${N}${F}${N}\\s*(?:,\\s*${D}\\s*)?\\)$`),q=(t="rgb")=>e=>void 0!==(e=((t,e)=>void 0===t?void 0:"object"!=typeof t?yt(t):void 0!==t.mode?t:e?{...t,mode:e}:void 0)(e,t))?e.mode===t?e:G[e.mode][t]?G[e.mode][t](e):"rgb"===t?G[e.mode].rgb(e):G.rgb[t](G[e.mode].rgb(e)):void 0,G={},Y={},X=[],U={},Z=t=>t,K=t=>(G[t.mode]={...G[t.mode],...t.toMode},Object.keys(t.fromMode||{}).forEach(e=>{G[e]||(G[e]={}),G[e][t.mode]=t.fromMode[e]}),t.ranges||(t.ranges={}),t.difference||(t.difference={}),t.channels.forEach(e=>{if(void 0===t.ranges[e]&&(t.ranges[e]=[0,1]),!t.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);"function"==typeof t.interpolate[e]&&(t.interpolate[e]={use:t.interpolate[e]}),t.interpolate[e].fixup||(t.interpolate[e].fixup=Z)}),Y[t.mode]=t,(t.parse||[]).forEach(e=>{Q(e,t.mode)}),q(t.mode)),Q=(t,e)=>{if("string"==typeof t){if(!e)throw new Error("'mode' required when 'parser' is a string");U[t]=e}else"function"==typeof t&&X.indexOf(t)<0&&X.push(t)},J=/[^\x00-\x7F]|[a-zA-Z_]/,tt=/[^\x00-\x7F]|[-\w]/,et="function",nt="ident",it="number",rt="percentage",ot="none",at="hue",st="alpha";let lt=0;function ht(t){let e=t[lt],n=t[lt+1];return"-"===e||"+"===e?/\d/.test(n)||"."===n&&/\d/.test(t[lt+2]):/\d/.test("."===e?n:e)}function ct(t){if(lt>=t.length)return!1;let e=t[lt];if(J.test(e))return!0;if("-"===e){if(t.length-lt<2)return!1;let e=t[lt+1];return!("-"!==e&&!J.test(e))}return!1}const dt={deg:1,rad:180/Math.PI,grad:.9,turn:360};function ut(t){let e="";if("-"!==t[lt]&&"+"!==t[lt]||(e+=t[lt++]),e+=ft(t),"."===t[lt]&&/\d/.test(t[lt+1])&&(e+=t[lt++]+ft(t)),"e"!==t[lt]&&"E"!==t[lt]||("-"!==t[lt+1]&&"+"!==t[lt+1]||!/\d/.test(t[lt+2])?/\d/.test(t[lt+1])&&(e+=t[lt++]+ft(t)):e+=t[lt++]+t[lt++]+ft(t)),ct(t)){let n=pt(t);return"deg"===n||"rad"===n||"turn"===n||"grad"===n?{type:at,value:e*dt[n]}:void 0}return"%"===t[lt]?(lt++,{type:rt,value:+e}):{type:it,value:+e}}function ft(t){let e="";for(;/\d/.test(t[lt]);)e+=t[lt++];return e}function pt(t){let e="";for(;lt<t.length&&tt.test(t[lt]);)e+=t[lt++];return e}function gt(t){let e=pt(t);return"("===t[lt]?(lt++,{type:et,value:e}):"none"===e?{type:ot,value:void 0}:{type:nt,value:e}}function mt(t,e){const n=[];let i;for(;t._i<t.length;)if(i=t[t._i++],i.type===ot||i.type===it||i.type===st||i.type===rt||e&&i.type===at)n.push(i);else{if(")"!==i.type)return;if(t._i<t.length)return}if(!(n.length<3||n.length>4)){if(4===n.length){if(n[3].type!==st)return;n[3]=n[3].value}return 3===n.length&&n.push({type:ot,value:void 0}),n.every(t=>t.type!==st)?n:void 0}}const yt=t=>{if("string"!=typeof t)return;const e=function(t=""){let e,n=t.trim(),i=[];for(lt=0;lt<n.length;)if(e=n[lt++],"\n"!==e&&"\t"!==e&&" "!==e){if(","===e)return;if(")"!==e){if("+"===e){if(lt--,ht(n)){i.push(ut(n));continue}return}if("-"===e){if(lt--,ht(n)){i.push(ut(n));continue}if(ct(n)){i.push({type:nt,value:pt(n)});continue}return}if("."===e){if(lt--,ht(n)){i.push(ut(n));continue}return}if("/"===e){for(;lt<n.length&&("\n"===n[lt]||"\t"===n[lt]||" "===n[lt]);)lt++;let t;if(ht(n)&&(t=ut(n),t.type!==at)){i.push({type:st,value:t});continue}if(ct(n)&&"none"===pt(n)){i.push({type:st,value:{type:ot,value:void 0}});continue}return}if(/\d/.test(e))lt--,i.push(ut(n));else{if(!J.test(e))return;lt--,i.push(gt(n))}}else i.push({type:")"})}else for(;lt<n.length&&("\n"===n[lt]||"\t"===n[lt]||" "===n[lt]);)lt++;return i}(t),n=e?function(t){t._i=0;let e=t[t._i++];if(!e||e.type!==et)return;let n=mt(t,!0);return n?(n.unshift(e.value),n):void 0}(e):void 0;let i,r=0,o=X.length;for(;r<o;)if(void 0!==(i=X[r++](t,n)))return i;return e?function(t){t._i=0;let e=t[t._i++];if(!e||e.type!==et||"color"!==e.value)return;if(e=t[t._i++],e.type!==nt)return;const n=U[e.value];if(!n)return;const i={mode:n},r=mt(t,!1);if(!r)return;const o=(t=>Y[t])(n).channels;for(let t,e,n=0;n<o.length;n++)t=r[n],e=o[n],t.type!==ot&&(i[e]=t.type===it?t.value:t.value/100,"alpha"===e&&(i[e]=Math.max(0,Math.min(1,i[e]))));return i}(e):void 0},xt=(vt=(t,e,n)=>t+n*(e-t),t=>{let e=(t=>{let e=[];for(let n=0;n<t.length-1;n++){let i=t[n],r=t[n+1];void 0===i&&void 0===r?e.push(void 0):void 0!==i&&void 0!==r?e.push([i,r]):e.push(void 0!==i?[i,i]:[r,r])}return e})(t);return t=>{let n=t*e.length,i=t>=1?e.length-1:Math.max(Math.floor(n),0),r=e[i];return void 0===r?void 0:vt(r[0],r[1],n-i)}});var vt;const bt=t=>{let e=!1,n=t.map(t=>void 0!==t?(e=!0,t):1);return e?n:t},wt={mode:"rgb",channels:["r","g","b","alpha"],parse:[function(t,e){if(!e||"rgb"!==e[0]&&"rgba"!==e[0])return;const n={mode:"rgb"},[,i,r,o,a]=e;return i.type!==at&&r.type!==at&&o.type!==at?(i.type!==ot&&(n.r=i.type===it?i.value/255:i.value/100),r.type!==ot&&(n.g=r.type===it?r.value/255:r.value/100),o.type!==ot&&(n.b=o.type===it?o.value/255:o.value/100),a.type!==ot&&(n.alpha=Math.min(1,Math.max(0,a.type===it?a.value:a.value/100))),n):void 0},t=>{let e;return(e=t.match(O))?I(parseInt(e[1],16),e[1].length):void 0},t=>{let e,n={mode:"rgb"};if(e=t.match(V))void 0!==e[1]&&(n.r=e[1]/255),void 0!==e[2]&&(n.g=e[2]/255),void 0!==e[3]&&(n.b=e[3]/255);else{if(!(e=t.match(B)))return;void 0!==e[1]&&(n.r=e[1]/100),void 0!==e[2]&&(n.g=e[2]/100),void 0!==e[3]&&(n.b=e[3]/100)}return void 0!==e[4]?n.alpha=Math.max(0,Math.min(1,e[4]/100)):void 0!==e[5]&&(n.alpha=Math.max(0,Math.min(1,+e[5]))),n},t=>I(j[t.toLowerCase()],6),t=>"transparent"===t?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,"srgb"],serialize:"srgb",interpolate:{r:xt,g:xt,b:xt,alpha:{use:xt,fixup:bt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Mt=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),kt=t=>{let e=Mt(t.r),n=Mt(t.g),i=Mt(t.b),r={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*n+.1882286462349947*i,y:.297344975250536*e+.6273635662554661*n+.0752914584939979*i,z:.0270313613864123*e+.0706888525358272*n+.9913375368376386*i};return void 0!==t.alpha&&(r.alpha=t.alpha),r},$t=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),Ct=({x:t,y:e,z:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r={mode:"a98",r:$t(2.0415879038107465*t-.5650069742788597*e-.3447313507783297*n),g:$t(-.9692436362808798*t+1.8759675015077206*e+.0415550574071756*n),b:$t(.0134442806320312*t-.1183623922310184*e+1.0151749943912058*n)};return void 0!==i&&(r.alpha=i),r},_t=(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)},St=({r:t,g:e,b:n,alpha:i})=>{let r={mode:"lrgb",r:_t(t),g:_t(e),b:_t(n)};return void 0!==i&&(r.alpha=i),r},zt=t=>{let{r:e,g:n,b:i,alpha:r}=St(t),o={mode:"xyz65",x:.4123907992659593*e+.357584339383878*n+.1804807884018343*i,y:.2126390058715102*e+.715168678767756*n+.0721923153607337*i,z:.0193308187155918*e+.119194779794626*n+.9505321522496607*i};return void 0!==r&&(o.alpha=r),o},At=(t=0)=>{const e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):12.92*t},Et=({r:t,g:e,b:n,alpha:i},r="rgb")=>{let o={mode:r,r:At(t),g:At(e),b:At(n)};return void 0!==i&&(o.alpha=i),o},Lt=({x:t,y:e,z:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=Et({r:3.2409699419045226*t-1.537383177570094*e-.4986107602930034*n,g:-.9692436362808796*t+1.8759675015077204*e+.0415550574071756*n,b:.0556300796969936*t-.2039769588889765*e+1.0569715142428784*n});return void 0!==i&&(r.alpha=i),r},Pt={...wt,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>Ct(zt(t)),xyz65:Ct},toMode:{rgb:t=>Lt(kt(t)),xyz65:kt}},Ht=Pt,Tt=t=>(t%=360)<0?t+360:t,It=t=>((t,e)=>t.map((n,i,r)=>{if(void 0===n)return n;let o=Tt(n);return 0===i||void 0===t[i-1]?o:e(o-Tt(r[i-1]))}).reduce((t,e)=>t.length&&void 0!==e&&void 0!==t[t.length-1]?(t.push(e+t[t.length-1]),t):(t.push(e),t),[]))(t,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),jt=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ot=Math.PI/180,Wt=180/Math.PI;let Nt=jt[3]*jt[4],Dt=jt[1]*jt[4],Rt=jt[1]*jt[2]-jt[0]*jt[3];const Ft=(t,e)=>{if(void 0===t.h||void 0===e.h||!t.s||!e.s)return 0;let n=Tt(t.h),i=Tt(e.h),r=Math.sin((i-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*r},Vt=(t,e)=>{if(void 0===t.h||void 0===e.h||!t.c||!e.c)return 0;let n=Tt(t.h),i=Tt(e.h),r=Math.sin((i-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*r},Bt=t=>{let e=t.reduce((t,e)=>{if(void 0!==e){let n=e*Math.PI/180;t.sin+=Math.sin(n),t.cos+=Math.cos(n)}return t},{sin:0,cos:0}),n=180*Math.atan2(e.sin,e.cos)/Math.PI;return n<0?360+n:n},qt={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:({r:t,g:e,b:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=(Rt*n+t*Nt-e*Dt)/(Rt+Nt-Dt),o=n-r,a=(jt[4]*(e-r)-jt[2]*o)/jt[3],s={mode:"cubehelix",l:r,s:0===r||1===r?void 0:Math.sqrt(o*o+a*a)/(jt[4]*r*(1-r))};return s.s&&(s.h=Math.atan2(a,o)*Wt-120),void 0!==i&&(s.alpha=i),s}},toMode:{rgb:({h:t,s:e,l:n,alpha:i})=>{let r={mode:"rgb"};t=(void 0===t?0:t+120)*Ot,void 0===n&&(n=0);let o=void 0===e?0:e*n*(1-n),a=Math.cos(t),s=Math.sin(t);return r.r=n+o*(jt[0]*a+jt[1]*s),r.g=n+o*(jt[2]*a+jt[3]*s),r.b=n+o*(jt[4]*a+jt[5]*s),void 0!==i&&(r.alpha=i),r}},interpolate:{h:{use:xt,fixup:It},s:xt,l:xt,alpha:{use:xt,fixup:bt}},difference:{h:Ft},average:{h:Bt}},Gt=({l:t,a:e,b:n,alpha:i},r="lch")=>{void 0===e&&(e=0),void 0===n&&(n=0);let o=Math.sqrt(e*e+n*n),a={mode:r,l:t,c:o};return o&&(a.h=Tt(180*Math.atan2(n,e)/Math.PI)),void 0!==i&&(a.alpha=i),a},Yt=({l:t,c:e,h:n,alpha:i},r="lab")=>{void 0===n&&(n=0);let o={mode:r,l:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return void 0!==i&&(o.alpha=i),o},Xt=Math.pow(29,3)/Math.pow(3,3),Ut=Math.pow(6,3)/Math.pow(29,3),Zt=.3457/.3585,Kt=.2958/.3585,Qt=.3127/.329,Jt=.3583/.329;Math.pow(29,3),Math.pow(3,3),Math.pow(6,3),Math.pow(29,3);let te=t=>Math.pow(t,3)>Ut?Math.pow(t,3):(116*t-16)/Xt;const ee=({l:t,a:e,b:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=(t+16)/116,o=r-n/200,a={mode:"xyz65",x:te(e/500+r)*Qt,y:1*te(r),z:te(o)*Jt};return void 0!==i&&(a.alpha=i),a},ne=t=>Lt(ee(t)),ie=t=>t>Ut?Math.cbrt(t):(Xt*t+16)/116,re=({x:t,y:e,z:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=ie(t/Qt),o=ie(e/1),a={mode:"lab65",l:116*o-16,a:500*(r-o),b:200*(o-ie(n/Jt))};return void 0!==i&&(a.alpha=i),a},oe=t=>{let e=re(zt(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},ae=26/180*Math.PI,se=Math.cos(ae),le=Math.sin(ae),he=100/Math.log(1.39),ce=({l:t,c:e,h:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r={mode:"lab65",l:(Math.exp(1*t/he)-1)/.0039},o=(Math.exp(.0435*e*1*1)-1)/.075,a=o*Math.cos(n/180*Math.PI-ae),s=o*Math.sin(n/180*Math.PI-ae);return r.a=a*se-s/.83*le,r.b=a*le+s/.83*se,void 0!==i&&(r.alpha=i),r},de=({l:t,a:e,b:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=e*se+n*le,o=.83*(n*se-e*le),a=Math.sqrt(r*r+o*o),s={mode:"dlch",l:he/1*Math.log(1+.0039*t),c:Math.log(1+.075*a)/.0435};return s.c&&(s.h=Tt((Math.atan2(o,r)+ae)/Math.PI*180)),void 0!==i&&(s.alpha=i),s},ue=t=>ce(Gt(t,"dlch")),fe=t=>Yt(de(t),"dlab"),pe={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:ue,rgb:t=>ne(ue(t))},fromMode:{lab65:fe,rgb:t=>fe(oe(t))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:xt,a:xt,b:xt,alpha:{use:xt,fixup:bt}}},ge=pe,me={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:ce,dlab:t=>Yt(t,"dlab"),rgb:t=>ne(ce(t))},fromMode:{lab65:de,dlab:t=>Gt(t,"dlch"),rgb:t=>de(oe(t))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:xt,c:xt,h:{use:xt,fixup:It},alpha:{use:xt,fixup:bt}},difference:{h:Vt},average:{h:Bt}},ye=me,xe={mode:"hsi",toMode:{rgb:function({h:t,s:e,i:n,alpha:i}){t=Tt(void 0!==t?t:0),void 0===e&&(e=0),void 0===n&&(n=0);let r,o=Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:r={r:n*(1+e*(3/(2-o)-1)),g:n*(1+e*(3*(1-o)/(2-o)-1)),b:n*(1-e)};break;case 1:r={r:n*(1+e*(3*(1-o)/(2-o)-1)),g:n*(1+e*(3/(2-o)-1)),b:n*(1-e)};break;case 2:r={r:n*(1-e),g:n*(1+e*(3/(2-o)-1)),b:n*(1+e*(3*(1-o)/(2-o)-1))};break;case 3:r={r:n*(1-e),g:n*(1+e*(3*(1-o)/(2-o)-1)),b:n*(1+e*(3/(2-o)-1))};break;case 4:r={r:n*(1+e*(3*(1-o)/(2-o)-1)),g:n*(1-e),b:n*(1+e*(3/(2-o)-1))};break;case 5:r={r:n*(1+e*(3/(2-o)-1)),g:n*(1-e),b:n*(1+e*(3*(1-o)/(2-o)-1))};break;default:r={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return r.mode="rgb",void 0!==i&&(r.alpha=i),r}},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:function({r:t,g:e,b:n,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=Math.max(t,e,n),o=Math.min(t,e,n),a={mode:"hsi",s:t+e+n===0?0:1-3*o/(t+e+n),i:(t+e+n)/3};return r-o!==0&&(a.h=60*(r===t?(e-n)/(r-o)+6*(e<n):r===e?(n-t)/(r-o)+2:(t-e)/(r-o)+4)),void 0!==i&&(a.alpha=i),a}},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:xt,fixup:It},s:xt,i:xt,alpha:{use:xt,fixup:bt}},difference:{h:Ft},average:{h:Bt}},ve=xe,be=new RegExp(`^hsla?\\(\\s*${R}${F}${N}${F}${N}\\s*(?:,\\s*${D}\\s*)?\\)$`),we={mode:"hsl",toMode:{rgb:function({h:t,s:e,l:n,alpha:i}){t=Tt(void 0!==t?t:0),void 0===e&&(e=0),void 0===n&&(n=0);let r,o=n+e*(n<.5?n:1-n),a=o-2*(o-n)*Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:r={r:o,g:a,b:2*n-o};break;case 1:r={r:a,g:o,b:2*n-o};break;case 2:r={r:2*n-o,g:o,b:a};break;case 3:r={r:2*n-o,g:a,b:o};break;case 4:r={r:a,g:2*n-o,b:o};break;case 5:r={r:o,g:2*n-o,b:a};break;default:r={r:2*n-o,g:2*n-o,b:2*n-o}}return r.mode="rgb",void 0!==i&&(r.alpha=i),r}},fromMode:{rgb:function({r:t,g:e,b:n,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=Math.max(t,e,n),o=Math.min(t,e,n),a={mode:"hsl",s:r===o?0:(r-o)/(1-Math.abs(r+o-1)),l:.5*(r+o)};return r-o!==0&&(a.h=60*(r===t?(e-n)/(r-o)+6*(e<n):r===e?(n-t)/(r-o)+2:(t-e)/(r-o)+4)),void 0!==i&&(a.alpha=i),a}},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[function(t,e){if(!e||"hsl"!==e[0]&&"hsla"!==e[0])return;const n={mode:"hsl"},[,i,r,o,a]=e;if(i.type!==ot){if(i.type===rt)return;n.h=i.value}if(r.type!==ot){if(r.type===at)return;n.s=r.value/100}if(o.type!==ot){if(o.type===at)return;n.l=o.value/100}return a.type!==ot&&(n.alpha=Math.min(1,Math.max(0,a.type===it?a.value:a.value/100))),n},t=>{let e=t.match(be);if(!e)return;let n={mode:"hsl"};return void 0!==e[3]?n.h=+e[3]:void 0!==e[1]&&void 0!==e[2]&&(n.h=((t,e)=>{switch(e){case"deg":return+t;case"rad":return t/Math.PI*180;case"grad":return t/10*9;case"turn":return 360*t}})(e[1],e[2])),void 0!==e[4]&&(n.s=Math.min(Math.max(0,e[4]/100),1)),void 0!==e[5]&&(n.l=Math.min(Math.max(0,e[5]/100),1)),void 0!==e[6]?n.alpha=Math.max(0,Math.min(1,e[6]/100)):void 0!==e[7]&&(n.alpha=Math.max(0,Math.min(1,+e[7]))),n}],serialize:t=>`hsl(${void 0!==t.h?t.h:"none"} ${void 0!==t.s?100*t.s+"%":"none"} ${void 0!==t.l?100*t.l+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:xt,fixup:It},s:xt,l:xt,alpha:{use:xt,fixup:bt}},difference:{h:Ft},average:{h:Bt}},Me=we;function ke({h:t,s:e,v:n,alpha:i}){t=Tt(void 0!==t?t:0),void 0===e&&(e=0),void 0===n&&(n=0);let r,o=Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:r={r:n,g:n*(1-e*o),b:n*(1-e)};break;case 1:r={r:n*(1-e*o),g:n,b:n*(1-e)};break;case 2:r={r:n*(1-e),g:n,b:n*(1-e*o)};break;case 3:r={r:n*(1-e),g:n*(1-e*o),b:n};break;case 4:r={r:n*(1-e*o),g:n*(1-e),b:n};break;case 5:r={r:n,g:n*(1-e),b:n*(1-e*o)};break;default:r={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return r.mode="rgb",void 0!==i&&(r.alpha=i),r}function $e({r:t,g:e,b:n,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=Math.max(t,e,n),o=Math.min(t,e,n),a={mode:"hsv",s:0===r?0:1-o/r,v:r};return r-o!==0&&(a.h=60*(r===t?(e-n)/(r-o)+6*(e<n):r===e?(n-t)/(r-o)+2:(t-e)/(r-o)+4)),void 0!==i&&(a.alpha=i),a}const Ce={mode:"hsv",toMode:{rgb:ke},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:$e},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:xt,fixup:It},s:xt,v:xt,alpha:{use:xt,fixup:bt}},difference:{h:Ft},average:{h:Bt}},_e={mode:"hwb",toMode:{rgb:function({h:t,w:e,b:n,alpha:i}){if(void 0===e&&(e=0),void 0===n&&(n=0),e+n>1){let t=e+n;e/=t,n/=t}return ke({h:t,s:1===n?1:1-e/(1-n),v:1-n,alpha:i})}},fromMode:{rgb:function(t){let e=$e(t);if(void 0===e)return;let n=void 0!==e.s?e.s:0,i=void 0!==e.v?e.v:0,r={mode:"hwb",w:(1-n)*i,b:1-i};return void 0!==e.h&&(r.h=e.h),void 0!==e.alpha&&(r.alpha=e.alpha),r}},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[function(t,e){if(!e||"hwb"!==e[0])return;const n={mode:"hwb"},[,i,r,o,a]=e;if(i.type!==ot){if(i.type===rt)return;n.h=i.value}if(r.type!==ot){if(r.type===at)return;n.w=r.value/100}if(o.type!==ot){if(o.type===at)return;n.b=o.value/100}return a.type!==ot&&(n.alpha=Math.min(1,Math.max(0,a.type===it?a.value:a.value/100))),n}],serialize:t=>`hwb(${void 0!==t.h?t.h:"none"} ${void 0!==t.w?100*t.w+"%":"none"} ${void 0!==t.b?100*t.b+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:xt,fixup:It},w:xt,b:xt,alpha:{use:xt,fixup:bt}},difference:{h:(t,e)=>{if(void 0===t.h||void 0===e.h)return 0;let n=Tt(t.h),i=Tt(e.h);return Math.abs(i-n)>180?n-(i-360*Math.sign(i-n)):i-n}},average:{h:Bt}},Se=_e,ze=.1593017578125,Ae=78.84375,Ee=.8359375,Le=18.8515625,Pe=18.6875;function He(t){if(t<0)return 0;const e=Math.pow(t,1/Ae);return 1e4*Math.pow(Math.max(0,e-Ee)/(Le-Pe*e),1/ze)}function Te(t){if(t<0)return 0;const e=Math.pow(t/1e4,ze);return Math.pow((Ee+Le*e)/(1+Pe*e),Ae)}const Ie=t=>Math.max(t/203,0),je=({i:t,t:e,p:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);const r=He(t+.008609037037932761*e+.11102962500302593*n),o=He(t-.00860903703793275*e-.11102962500302599*n),a=He(t+.5600313357106791*e-.32062717498731885*n),s={mode:"xyz65",x:Ie(2.070152218389422*r-1.3263473389671556*o+.2066510476294051*a),y:Ie(.3647385209748074*r+.680566024947227*o-.0453045459220346*a),z:Ie(-.049747207535812*r-.0492609666966138*o+1.1880659249923042*a)};return void 0!==i&&(s.alpha=i),s},Oe=(t=0)=>Math.max(203*t,0),We=({x:t,y:e,z:n,alpha:i})=>{const r=Oe(t),o=Oe(e),a=Oe(n),s=Te(.3592832590121217*r+.6976051147779502*o-.0358915932320289*a),l=Te(-.1920808463704995*r+1.1004767970374323*o+.0753748658519118*a),h=Te(.0070797844607477*r+.0748396662186366*o+.8433265453898765*a),c={mode:"itp",i:.5*s+.5*l,t:1.61376953125*s-3.323486328125*l+1.709716796875*h,p:4.378173828125*s-4.24560546875*l-.132568359375*h};return void 0!==i&&(c.alpha=i),c},Ne={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:je,rgb:t=>Lt(je(t))},fromMode:{xyz65:We,rgb:t=>We(zt(t))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:xt,t:xt,p:xt,alpha:{use:xt,fixup:bt}}},De=Ne,Re=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,ze);return Math.pow((Ee+Le*e)/(1+Pe*e),134.03437499999998)},Fe=(t=0)=>Math.max(203*t,0),Ve=({x:t,y:e,z:n,alpha:i})=>{t=Fe(t),e=Fe(e);let r=1.15*t-.15*(n=Fe(n)),o=.66*e+.34*t,a=Re(.41478972*r+.579999*o+.014648*n),s=Re(-.20151*r+1.120649*o+.0531008*n),l=Re(-.0166008*r+.2648*o+.6684799*n),h=(a+s)/2,c={mode:"jab",j:.44*h/(1-.56*h)-16295499532821565e-27,a:3.524*a-4.066708*s+.542708*l,b:.199076*a+1.096799*s-1.295875*l};return void 0!==i&&(c.alpha=i),c},Be=16295499532821565e-27,qe=t=>{if(t<0)return 0;let e=Math.pow(t,.007460772656268216);return 1e4*Math.pow((Ee-e)/(Pe*e-Le),1/ze)},Ge=t=>t/203,Ye=({j:t,a:e,b:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=(t+Be)/(.44+.56*(t+Be)),o=qe(r+.13860504*e+.058047316*n),a=qe(r-.13860504*e-.058047316*n),s=qe(r-.096019242*e-.8118919*n),l={mode:"xyz65",x:Ge(1.661373024652174*o-.914523081304348*a+.23136208173913045*s),y:Ge(-.3250758611844533*o+1.571847026732543*a-.21825383453227928*s),z:Ge(-.090982811*o-.31272829*a+1.5227666*s)};return void 0!==i&&(l.alpha=i),l},Xe=t=>{let e=Ve(zt(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Ue=t=>Lt(Ye(t)),Ze={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Xe,xyz65:Ve},toMode:{rgb:Ue,xyz65:Ye},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:xt,a:xt,b:xt,alpha:{use:xt,fixup:bt}}},Ke=({j:t,a:e,b:n,alpha:i})=>{void 0===e&&(e=0),void 0===n&&(n=0);let r=Math.sqrt(e*e+n*n),o={mode:"jch",j:t,c:r};return r&&(o.h=Tt(180*Math.atan2(n,e)/Math.PI)),void 0!==i&&(o.alpha=i),o},Qe=({j:t,c:e,h:n,alpha:i})=>{void 0===n&&(n=0);let r={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 void 0!==i&&(r.alpha=i),r},Je={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Qe,rgb:t=>Ue(Qe(t))},fromMode:{rgb:t=>Ke(Xe(t)),jab:Ke},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:xt,fixup:It},c:xt,j:xt,alpha:{use:xt,fixup:bt}},difference:{h:Vt},average:{h:Bt}},tn=Je,en=Math.pow(29,3)/Math.pow(3,3),nn=Math.pow(6,3)/Math.pow(29,3);let rn=t=>Math.pow(t,3)>nn?Math.pow(t,3):(116*t-16)/en;const on=({l:t,a:e,b:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=(t+16)/116,o=r-n/200,a={mode:"xyz50",x:rn(e/500+r)*Zt,y:1*rn(r),z:rn(o)*Kt};return void 0!==i&&(a.alpha=i),a},an=({x:t,y:e,z:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=Et({r:3.1341359569958707*t-1.6173863321612538*e-.4906619460083532*n,g:-.978795502912089*t+1.916254567259524*e+.03344273116131949*n,b:.07195537988411677*t-.2289768264158322*e+1.405386058324125*n});return void 0!==i&&(r.alpha=i),r},sn=t=>an(on(t)),ln=t=>{let{r:e,g:n,b:i,alpha:r}=St(t),o={mode:"xyz50",x:.436065742824811*e+.3851514688337912*n+.14307845442264197*i,y:.22249319175623702*e+.7168870538238823*n+.06061979053616537*i,z:.013923904500943465*e+.09708128566574634*n+.7140993584005155*i};return void 0!==r&&(o.alpha=r),o},hn=t=>t>nn?Math.cbrt(t):(en*t+16)/116,cn=({x:t,y:e,z:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=hn(t/Zt),o=hn(e/1),a={mode:"lab",l:116*o-16,a:500*(r-o),b:200*(o-hn(n/Kt))};return void 0!==i&&(a.alpha=i),a},dn=t=>{let e=cn(ln(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},un={mode:"lab",toMode:{xyz50:on,rgb:sn},fromMode:{xyz50:cn,rgb:dn},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[function(t,e){if(!e||"lab"!==e[0])return;const n={mode:"lab"},[,i,r,o,a]=e;return i.type!==at&&r.type!==at&&o.type!==at?(i.type!==ot&&(n.l=Math.min(Math.max(0,i.value),100)),r.type!==ot&&(n.a=r.type===it?r.value:125*r.value/100),o.type!==ot&&(n.b=o.type===it?o.value:125*o.value/100),a.type!==ot&&(n.alpha=Math.min(1,Math.max(0,a.type===it?a.value:a.value/100))),n):void 0}],serialize:t=>`lab(${void 0!==t.l?t.l:"none"} ${void 0!==t.a?t.a:"none"} ${void 0!==t.b?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{l:xt,a:xt,b:xt,alpha:{use:xt,fixup:bt}}},fn=un,pn={...fn,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ee,rgb:ne},fromMode:{xyz65:re,rgb:oe},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},gn={mode:"lch",toMode:{lab:Yt,rgb:t=>sn(Yt(t))},fromMode:{rgb:t=>Gt(dn(t)),lab:Gt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[function(t,e){if(!e||"lch"!==e[0])return;const n={mode:"lch"},[,i,r,o,a]=e;if(i.type!==ot){if(i.type===at)return;n.l=Math.min(Math.max(0,i.value),100)}if(r.type!==ot&&(n.c=Math.max(0,r.type===it?r.value:150*r.value/100)),o.type!==ot){if(o.type===rt)return;n.h=o.value}return a.type!==ot&&(n.alpha=Math.min(1,Math.max(0,a.type===it?a.value:a.value/100))),n}],serialize:t=>`lch(${void 0!==t.l?t.l:"none"} ${void 0!==t.c?t.c:"none"} ${void 0!==t.h?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:xt,fixup:It},c:xt,l:xt,alpha:{use:xt,fixup:bt}},difference:{h:Vt},average:{h:Bt}},mn=gn,yn={...mn,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>Yt(t,"lab65"),rgb:t=>ne(Yt(t,"lab65"))},fromMode:{rgb:t=>Gt(oe(t),"lch65"),lab65:t=>Gt(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},xn=yn,vn=({l:t,u:e,v:n,alpha:i})=>{void 0===e&&(e=0),void 0===n&&(n=0);let r=Math.sqrt(e*e+n*n),o={mode:"lchuv",l:t,c:r};return r&&(o.h=Tt(180*Math.atan2(n,e)/Math.PI)),void 0!==i&&(o.alpha=i),o},bn=({l:t,c:e,h:n,alpha:i})=>{void 0===n&&(n=0);let r={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 void 0!==i&&(r.alpha=i),r},wn=(t,e,n)=>4*t/(t+15*e+3*n),Mn=(t,e,n)=>9*e/(t+15*e+3*n),kn=wn(Zt,1,Kt),$n=Mn(Zt,1,Kt),Cn=({x:t,y:e,z:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=(t=>t<=nn?en*t:116*Math.cbrt(t)-16)(e/1),o=wn(t,e,n),a=Mn(t,e,n);isFinite(o)&&isFinite(a)?(o=13*r*(o-kn),a=13*r*(a-$n)):r=o=a=0;let s={mode:"luv",l:r,u:o,v:a};return void 0!==i&&(s.alpha=i),s},_n=((t,e,n)=>4*t/(t+15+3*n))(Zt,0,Kt),Sn=((t,e,n)=>9/(t+15+3*n))(Zt,0,Kt),zn=({l:t,u:e,v:n,alpha:i})=>{if(void 0===t&&(t=0),0===t)return{mode:"xyz50",x:0,y:0,z:0};void 0===e&&(e=0),void 0===n&&(n=0);let r=e/(13*t)+_n,o=n/(13*t)+Sn,a=1*(t<=8?t/en:Math.pow((t+16)/116,3)),s={mode:"xyz50",x:a*(9*r)/(4*o),y:a,z:a*(12-3*r-20*o)/(4*o)};return void 0!==i&&(s.alpha=i),s},An={mode:"lchuv",toMode:{luv:bn,rgb:t=>an(zn(bn(t)))},fromMode:{rgb:t=>vn(Cn(ln(t))),luv:vn},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:xt,fixup:It},c:xt,l:xt,alpha:{use:xt,fixup:bt}},difference:{h:Vt},average:{h:Bt}},En=An,Ln={...wt,mode:"lrgb",toMode:{rgb:Et},fromMode:{rgb:St},parse:["srgb-linear"],serialize:"srgb-linear"},Pn={mode:"luv",toMode:{xyz50:zn,rgb:t=>an(zn(t))},fromMode:{xyz50:Cn,rgb:t=>Cn(ln(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:xt,u:xt,v:xt,alpha:{use:xt,fixup:bt}}},Hn=Pn,Tn=({r:t,g:e,b:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=Math.cbrt(.412221469470763*t+.5363325372617348*e+.0514459932675022*n),o=Math.cbrt(.2119034958178252*t+.6806995506452344*e+.1073969535369406*n),a=Math.cbrt(.0883024591900564*t+.2817188391361215*e+.6299787016738222*n),s={mode:"oklab",l:.210454268309314*r+.7936177747023054*o-.0040720430116193*a,a:1.9779985324311684*r-2.42859224204858*o+.450593709617411*a,b:.0259040424655478*r+.7827717124575296*o-.8086757549230774*a};return void 0!==i&&(s.alpha=i),s},In=t=>{let e=Tn(St(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},jn=({l:t,a:e,b:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=Math.pow(t+.3963377773761749*e+.2158037573099136*n,3),o=Math.pow(t-.1055613458156586*e-.0638541728258133*n,3),a=Math.pow(t-.0894841775298119*e-1.2914855480194092*n,3),s={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*o+.2309699031821044*a,g:-1.2684379732850317*r+2.6097573492876887*o-.3413193760026573*a,b:-.0041960761386756*r-.7034186179359362*o+1.7076146940746117*a};return void 0!==i&&(s.alpha=i),s},On=t=>Et(jn(t));function Wn(t){const e=.206,n=1.206/1.03;return.5*(n*t-e+Math.sqrt((n*t-e)*(n*t-e)+.12*n*t))}function Nn(t){return(t*t+.206*t)/(1.206/1.03*(t+.03))}function Dn(t,e){let n=function(t,e){let n,i,r,o,a,s,l,h;-1.88170328*t-.80936493*e>1?(n=1.19086277,i=1.76576728,r=.59662641,o=.75515197,a=.56771245,s=4.0767416621,l=-3.3077115913,h=.2309699292):1.81444104*t-1.19445276*e>1?(n=.73956515,i=-.45954404,r=.08285427,o=.1254107,a=.14503204,s=-1.2684380046,l=2.6097574011,h=-.3413193965):(n=1.35733652,i=-.00915799,r=-1.1513021,o=-.50559606,a=.00692167,s=-.0041960863,l=-.7034186147,h=1.707614701);let c=n+i*t+r*e+o*t*t+a*t*e,d=.3963377774*t+.2158037573*e,u=-.1055613458*t-.0638541728*e,f=-.0894841775*t-1.291485548*e;{let t=1+c*d,e=1+c*u,n=1+c*f,i=s*(t*t*t)+l*(e*e*e)+h*(n*n*n),r=s*(3*d*t*t)+l*(3*u*e*e)+h*(3*f*n*n);c-=i*r/(r*r-.5*i*(s*(6*d*d*t)+l*(6*u*u*e)+h*(6*f*f*n)))}return c}(t,e),i=jn({l:1,a:n*t,b:n*e}),r=Math.cbrt(1/Math.max(i.r,i.g,i.b));return[r,r*n]}function Rn(t,e,n=null){n||(n=Dn(t,e));let i=n[0],r=n[1];return[r/i,r/(1-i)]}function Fn(t,e,n){let i=Dn(e,n),r=function(t,e,n,i,r,o=null){let a;if(o||(o=Dn(t,e)),(n-r)*o[1]-(o[0]-r)*i<=0)a=o[1]*r/(i*o[0]+o[1]*(r-n));else{a=o[1]*(r-1)/(i*(o[0]-1)+o[1]*(r-n));{let o=n-r,s=.3963377774*t+.2158037573*e,l=-.1055613458*t-.0638541728*e,h=-.0894841775*t-1.291485548*e,c=o+i*s,d=o+i*l,u=o+i*h;{let t=r*(1-a)+a*n,e=a*i,o=t+e*s,f=t+e*l,p=t+e*h,g=o*o*o,m=f*f*f,y=p*p*p,x=3*c*o*o,v=3*d*f*f,b=3*u*p*p,w=6*c*c*o,M=6*d*d*f,k=6*u*u*p,$=4.0767416621*g-3.3077115913*m+.2309699292*y-1,C=4.0767416621*x-3.3077115913*v+.2309699292*b,_=C/(C*C-.5*$*(4.0767416621*w-3.3077115913*M+.2309699292*k)),S=-$*_,z=-1.2684380046*g+2.6097574011*m-.3413193965*y-1,A=-1.2684380046*x+2.6097574011*v-.3413193965*b,E=A/(A*A-.5*z*(-1.2684380046*w+2.6097574011*M-.3413193965*k)),L=-z*E,P=-.0041960863*g-.7034186147*m+1.707614701*y-1,H=-.0041960863*x-.7034186147*v+1.707614701*b,T=H/(H*H-.5*P*(-.0041960863*w-.7034186147*M+1.707614701*k)),I=-P*T;S=_>=0?S:1e6,L=E>=0?L:1e6,I=T>=0?I:1e6,a+=Math.min(S,Math.min(L,I))}}}return a}(e,n,t,1,t,i),o=Rn(e,n,i),a=t*(.11516993+1/(7.4477897+4.1590124*n+e*(1.75198401*n-2.19557347+e*(-2.13704948-10.02301043*n+e*(5.38770819*n-4.24894561+4.69891013*e))))),s=(1-t)*(.11239642+1/(1.6132032-.68124379*n+e*(.40370612+.90148123*n+e*(.6122399*n-.27087943+e*(.00299215-.45399568*n-.14661872*e))))),l=r/Math.min(t*o[0],(1-t)*o[1])*.9*Math.sqrt(Math.sqrt(1/(1/(a*a*a*a)+1/(s*s*s*s))));return a=.4*t,s=.8*(1-t),[Math.sqrt(1/(1/(a*a)+1/(s*s))),l,r]}function Vn(t){const e=void 0!==t.l?t.l:0,n=void 0!==t.a?t.a:0,i=void 0!==t.b?t.b:0,r={mode:"okhsl",l:Wn(e)};void 0!==t.alpha&&(r.alpha=t.alpha);let o=Math.sqrt(n*n+i*i);if(!o)return r.s=0,r;let a,[s,l,h]=Fn(e,n/o,i/o);if(o<l){let t=0,e=.8*s;a=(o-t)/(e+(1-e/l)*(o-t))*.8}else{let t=.2*l*l*1.25*1.25/s;a=.8+(o-l)/(t+(1-t/(h-l))*(o-l))*.2}return a&&(r.s=a,r.h=Tt(180*Math.atan2(i,n)/Math.PI)),r}function Bn(t){let e=void 0!==t.h?t.h:0,n=void 0!==t.s?t.s:0,i=void 0!==t.l?t.l:0;const r={mode:"oklab",l:Nn(i)};if(void 0!==t.alpha&&(r.alpha=t.alpha),!n||1===i)return r.a=r.b=0,r;let o,a,s,l,h=Math.cos(e/180*Math.PI),c=Math.sin(e/180*Math.PI),[d,u,f]=Fn(r.l,h,c);n<.8?(o=1.25*n,a=0,s=.8*d,l=1-s/u):(o=5*(n-.8),a=u,s=.2*u*u*1.25*1.25/d,l=1-s/(f-u));let p=a+o*s/(1-l*o);return r.a=p*h,r.b=p*c,r}const qn={...Me,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:Vn,rgb:t=>Vn(In(t))},toMode:{oklab:Bn,rgb:t=>On(Bn(t))}},Gn=qn;function Yn(t){let e=void 0!==t.l?t.l:0,n=void 0!==t.a?t.a:0,i=void 0!==t.b?t.b:0,r=Math.sqrt(n*n+i*i),o=r?n/r:1,a=r?i/r:1,[s,l]=Rn(o,a),h=1-.5/s,c=l/(r+e*l),d=c*e,u=c*r,f=Nn(d),p=u*f/d,g=jn({l:f,a:o*p,b:a*p}),m=Math.cbrt(1/Math.max(g.r,g.g,g.b,0));e/=m,r=r/m*Wn(e)/e,e=Wn(e);const y={mode:"okhsv",s:r?(.5+l)*u/(.5*l+l*h*u):0,v:e?e/d:0};return y.s&&(y.h=Tt(180*Math.atan2(i,n)/Math.PI)),void 0!==t.alpha&&(y.alpha=t.alpha),y}function Xn(t){const e={mode:"oklab"};void 0!==t.alpha&&(e.alpha=t.alpha);const n=void 0!==t.h?t.h:0,i=void 0!==t.s?t.s:0,r=void 0!==t.v?t.v:0,o=Math.cos(n/180*Math.PI),a=Math.sin(n/180*Math.PI),[s,l]=Rn(o,a),h=.5,c=1-h/s,d=1-i*h/(h+l-l*c*i),u=i*l*h/(h+l-l*c*i),f=Nn(d),p=u*f/d,g=jn({l:f,a:o*p,b:a*p}),m=Math.cbrt(1/Math.max(g.r,g.g,g.b,0)),y=Nn(r*d),x=u*y/d;return e.l=y*m,e.a=x*o*m,e.b=x*a*m,e}const Un={...Ce,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Yn,rgb:t=>Yn(In(t))},toMode:{oklab:Xn,rgb:t=>On(Xn(t))}},Zn=Un,Kn={...fn,mode:"oklab",toMode:{lrgb:jn,rgb:On},fromMode:{lrgb:Tn,rgb:In},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[function(t,e){if(!e||"oklab"!==e[0])return;const n={mode:"oklab"},[,i,r,o,a]=e;return i.type!==at&&r.type!==at&&o.type!==at?(i.type!==ot&&(n.l=Math.min(Math.max(0,i.type===it?i.value:i.value/100),1)),r.type!==ot&&(n.a=r.type===it?r.value:.4*r.value/100),o.type!==ot&&(n.b=o.type===it?o.value:.4*o.value/100),a.type!==ot&&(n.alpha=Math.min(1,Math.max(0,a.type===it?a.value:a.value/100))),n):void 0}],serialize:t=>`oklab(${void 0!==t.l?t.l:"none"} ${void 0!==t.a?t.a:"none"} ${void 0!==t.b?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`},Qn=Kn,Jn={...mn,mode:"oklch",toMode:{oklab:t=>Yt(t,"oklab"),rgb:t=>On(Yt(t,"oklab"))},fromMode:{rgb:t=>Gt(In(t),"oklch"),oklab:t=>Gt(t,"oklch")},parse:[function(t,e){if(!e||"oklch"!==e[0])return;const n={mode:"oklch"},[,i,r,o,a]=e;if(i.type!==ot){if(i.type===at)return;n.l=Math.min(Math.max(0,i.type===it?i.value:i.value/100),1)}if(r.type!==ot&&(n.c=Math.max(0,r.type===it?r.value:.4*r.value/100)),o.type!==ot){if(o.type===rt)return;n.h=o.value}return a.type!==ot&&(n.alpha=Math.min(1,Math.max(0,a.type===it?a.value:a.value/100))),n}],serialize:t=>`oklch(${void 0!==t.l?t.l:"none"} ${void 0!==t.c?t.c:"none"} ${void 0!==t.h?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},ti=Jn,ei=t=>{let{r:e,g:n,b:i,alpha:r}=St(t),o={mode:"xyz65",x:.486570948648216*e+.265667693169093*n+.1982172852343625*i,y:.2289745640697487*e+.6917385218365062*n+.079286914093745*i,z:0*e+.0451133818589026*n+1.043944368900976*i};return void 0!==r&&(o.alpha=r),o},ni=({x:t,y:e,z:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r=Et({r:2.4934969119414263*t-.9313836179191242*e-.402710784450717*n,g:-.8294889695615749*t+1.7626640603183465*e+.0236246858419436*n,b:.0358458302437845*t-.0761723892680418*e+.9568845240076871*n},"p3");return void 0!==i&&(r.alpha=i),r},ii={...wt,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>ni(zt(t)),xyz65:ni},toMode:{rgb:t=>Lt(ei(t)),xyz65:ei}},ri=ii,oi=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},ai=({x:t,y:e,z:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r={mode:"prophoto",r:oi(1.3457868816471585*t-.2555720873797946*e-.0511018649755453*n),g:oi(-.5446307051249019*t+1.5082477428451466*e+.0205274474364214*n),b:oi(0*t+0*e+1.2119675456389452*n)};return void 0!==i&&(r.alpha=i),r},si=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},li=t=>{let e=si(t.r),n=si(t.g),i=si(t.b),r={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*n+.0313477341283922*i,y:.2880748288194013*e+.7118352342418731*n+899369387256e-16*i,z:0*e+0*n+.8251046025104602*i};return void 0!==t.alpha&&(r.alpha=t.alpha),r},hi={...wt,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:ai,rgb:t=>ai(ln(t))},toMode:{xyz50:li,rgb:t=>an(li(t))}},ci=hi,di=1.09929682680944,ui=t=>{const e=Math.abs(t);return e>.018053968510807?(Math.sign(t)||1)*(di*Math.pow(e,.45)-(di-1)):4.5*t},fi=({x:t,y:e,z:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);let r={mode:"rec2020",r:ui(1.7166511879712683*t-.3556707837763925*e-.2533662813736599*n),g:ui(-.6666843518324893*t+1.6164812366349395*e+.0157685458139111*n),b:ui(.0176398574453108*t-.0427706132578085*e+.9421031212354739*n)};return void 0!==i&&(r.alpha=i),r},pi=1.09929682680944,gi=(t=0)=>{let e=Math.abs(t);return e<.08124285829863151?t/4.5:(Math.sign(t)||1)*Math.pow((e+pi-1)/pi,1/.45)},mi=t=>{let e=gi(t.r),n=gi(t.g),i=gi(t.b),r={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*n+.1688809751641721*i,y:.262700212011267*e+.6779980715188708*n+.059301716469862*i,z:0*e+.0280726930490874*n+1.0609850577107909*i};return void 0!==t.alpha&&(r.alpha=t.alpha),r},yi={...wt,mode:"rec2020",fromMode:{xyz65:fi,rgb:t=>fi(zt(t))},toMode:{xyz65:mi,rgb:t=>Lt(mi(t))},parse:["rec2020"],serialize:"rec2020"},xi=yi,vi=.0037930732552754493,bi=Math.cbrt(vi),wi=t=>Math.cbrt(t)-bi,Mi=t=>Math.pow(t+bi,3),ki={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:t,y:e,b:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);const r=Mi(t+e)-vi,o=Mi(e-t)-vi,a=Mi(n+e)-vi,s=Et({r:11.031566904639861*r-9.866943908131562*o-.16462299650829934*a,g:-3.2541473810744237*r+4.418770377582723*o-.16462299650829934*a,b:-3.6588512867136815*r+2.7129230459360922*o+1.9459282407775895*a});return void 0!==i&&(s.alpha=i),s}},fromMode:{rgb:t=>{const{r:e,g:n,b:i,alpha:r}=St(t),o=wi(.3*e+.622*n+.078*i+vi),a=wi(.23*e+.692*n+.078*i+vi),s={mode:"xyb",x:(o-a)/2,y:(o+a)/2,b:wi(.2434226892454782*e+.2047674442449682*n+.5518098665095535*i+vi)-(o+a)/2};return void 0!==r&&(s.alpha=r),s}},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:xt,y:xt,b:xt,alpha:{use:xt,fixup:bt}}},$i={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:an,lab:cn},fromMode:{rgb:ln,lab:on},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:xt,y:xt,z:xt,alpha:{use:xt,fixup:bt}}},Ci={mode:"xyz65",toMode:{rgb:Lt,xyz50:t=>{let{x:e,y:n,z:i,alpha:r}=t;void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0);let o={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*n-.0501922295431356*i,y:.0296278156881593*e+.990434484573249*n-.0170738250293851*i,z:-.0092430581525912*e+.0150551448965779*n+.7518742899580008*i};return void 0!==r&&(o.alpha=r),o}},fromMode:{rgb:zt,xyz50:t=>{let{x:e,y:n,z:i,alpha:r}=t;void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0);let o={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*n+.0632593086610217*i,y:-.0283697069632081*e+1.0099954580058226*n+.021041398966943*i,z:.0123140016883199*e-.0205076964334779*n+1.3303659366080753*i};return void 0!==r&&(o.alpha=r),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:xt,y:xt,z:xt,alpha:{use:xt,fixup:bt}}},_i={mode:"yiq",toMode:{rgb:({y:t,i:e,q:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);const r={mode:"rgb",r:t+.95608445*e+.6208885*n,g:t-.27137664*e-.6486059*n,b:t-1.10561724*e+1.70250126*n};return void 0!==i&&(r.alpha=i),r}},fromMode:{rgb:({r:t,g:e,b:n,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0);const r={mode:"yiq",y:.29889531*t+.58662247*e+.11448223*n,i:.59597799*t-.2741761*e-.32180189*n,q:.21147017*t-.52261711*e+.31114694*n};return void 0!==i&&(r.alpha=i),r}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:xt,i:xt,q:xt,alpha:{use:xt,fixup:bt}}};const Si=t=>Math.round(255*(t=>Math.max(0,Math.min(1,t||0)))(t)),zi=q("rgb"),Ai=(q("hsl"),t=>{if(void 0!==t)return"#"+(1<<24|Si(t.r)<<16|Si(t.g)<<8|Si(t.b)).toString(16).slice(1)}),Ei=t=>Ai(zi(t));function Li(t){let e=q("lrgb")(t);return.2126*e.r+.7152*e.g+.0722*e.b}function Pi(t,e){let n=Li(t),i=Li(e);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}K(Ht),K(qt),K(ge),K(ye),K(ve),K(Me),K(Ce),K(Se),K(De),K(Ze),K(tn),K(fn),K(pn),K(mn),K(xn),K(En),K(Ln),K(Hn),K(Gn),K(Zn),K(Qn);const Hi=K(ti);function Ti(t){if(!t)return!1;const e=t.trim().toLowerCase();return"none"!==e&&"transparent"!==e&&""!==e}function Ii(t){const e=yt(t);return!!e&&Li(e)<.5}K(ri),K(ci),K(xi),K(wt),K(ki),K($i),K(Ci),K(_i);const ji=Array.isArray,Oi="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var Wi="object"==typeof self&&self&&self.Object===Object&&self;const Ni=Oi||Wi||Function("return this")(),Di=Ni.Symbol;var Ri=Object.prototype,Fi=Ri.hasOwnProperty,Vi=Ri.toString,Bi=Di?Di.toStringTag:void 0;var qi=Object.prototype.toString;var Gi=Di?Di.toStringTag:void 0;const Yi=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Gi&&Gi in Object(t)?function(t){var e=Fi.call(t,Bi),n=t[Bi];try{t[Bi]=void 0;var i=!0}catch(t){}var r=Vi.call(t);return i&&(e?t[Bi]=n:delete t[Bi]),r}(t):function(t){return qi.call(t)}(t)},Xi=function(t){return null!=t&&"object"==typeof t},Ui=function(t){return"symbol"==typeof t||Xi(t)&&"[object Symbol]"==Yi(t)};var Zi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ki=/^\w*$/;const Qi=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Ji=function(t){if(!Qi(t))return!1;var e=Yi(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},tr=Ni["__core-js_shared__"];var er,nr=(er=/[^.]+$/.exec(tr&&tr.keys&&tr.keys.IE_PROTO||""))?"Symbol(src)_1."+er:"";var ir=Function.prototype.toString;const rr=function(t){if(null!=t){try{return ir.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var or=/^\[object .+?Constructor\]$/,ar=Function.prototype,sr=Object.prototype,lr=ar.toString,hr=sr.hasOwnProperty,cr=RegExp("^"+lr.call(hr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const dr=function(t){return!(!Qi(t)||(e=t,nr&&nr in e))&&(Ji(t)?cr:or).test(rr(t));var e},ur=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return dr(n)?n:void 0},fr=ur(Object,"create");var pr=Object.prototype.hasOwnProperty;var gr=Object.prototype.hasOwnProperty;function mr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}mr.prototype.clear=function(){this.__data__=fr?fr(null):{},this.size=0},mr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},mr.prototype.get=function(t){var e=this.__data__;if(fr){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return pr.call(e,t)?e[t]:void 0},mr.prototype.has=function(t){var e=this.__data__;return fr?void 0!==e[t]:gr.call(e,t)},mr.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=fr&&void 0===e?"__lodash_hash_undefined__":e,this};const yr=mr,xr=function(t,e){return t===e||t!=t&&e!=e},vr=function(t,e){for(var n=t.length;n--;)if(xr(t[n][0],e))return n;return-1};var br=Array.prototype.splice;function wr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}wr.prototype.clear=function(){this.__data__=[],this.size=0},wr.prototype.delete=function(t){var e=this.__data__,n=vr(e,t);return!(n<0||(n==e.length-1?e.pop():br.call(e,n,1),--this.size,0))},wr.prototype.get=function(t){var e=this.__data__,n=vr(e,t);return n<0?void 0:e[n][1]},wr.prototype.has=function(t){return vr(this.__data__,t)>-1},wr.prototype.set=function(t,e){var n=this.__data__,i=vr(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};const Mr=wr,kr=ur(Ni,"Map"),$r=function(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map};function Cr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Cr.prototype.clear=function(){this.size=0,this.__data__={hash:new yr,map:new(kr||Mr),string:new yr}},Cr.prototype.delete=function(t){var e=$r(this,t).delete(t);return this.size-=e?1:0,e},Cr.prototype.get=function(t){return $r(this,t).get(t)},Cr.prototype.has=function(t){return $r(this,t).has(t)},Cr.prototype.set=function(t,e){var n=$r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};const _r=Cr;function Sr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=t.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(Sr.Cache||_r),n}Sr.Cache=_r;var zr,Ar,Er=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lr=/\\(\\)?/g,Pr=(zr=Sr(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Er,function(t,n,i,r){e.push(i?r.replace(Lr,"$1"):n||t)}),e},function(t){return 500===Ar.size&&Ar.clear(),t}),Ar=zr.cache,zr);const Hr=Pr;var Tr=Di?Di.prototype:void 0,Ir=Tr?Tr.toString:void 0;const jr=function t(e){if("string"==typeof e)return e;if(ji(e))return function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}(e,t)+"";if(Ui(e))return Ir?Ir.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n},Or=function(t){return null==t?"":jr(t)},Wr=function(t,e){return ji(t)?t:function(t,e){if(ji(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ui(t))||Ki.test(t)||!Zi.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:Hr(Or(t))},Nr=function(t){if("string"==typeof t||Ui(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},Dr=function(t,e,n){var i=null==t?void 0:function(t,e){for(var n=0,i=(e=Wr(e,t)).length;null!=t&&n<i;)t=t[Nr(e[n++])];return n&&n==i?t:void 0}(t,e);return void 0===i?n:i};function Rr(t,e){if(0===e.length)return{};const n=Array.isArray(t)?t[e[0]]:t.items[e[0]];if(1===e.length)return n;const i=e.slice(1).map(t=>`children[${t}]`).join(".");return Dr(n,i)}function Fr(t){const{structure:e,item:n,items:i}=t;return!!e&&!!n&&!i.some(t=>!t)}const Vr="infographic-component",Br=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:function(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),(n=n>r?r:n)<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(r);++i<r;)o[i]=t[i+e];return o}(t,e,n)};var qr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const Gr=function(t){return qr.test(t)};var Yr="\\ud800-\\udfff",Xr="["+Yr+"]",Ur="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Zr="\\ud83c[\\udffb-\\udfff]",Kr="[^"+Yr+"]",Qr="(?:\\ud83c[\\udde6-\\uddff]){2}",Jr="[\\ud800-\\udbff][\\udc00-\\udfff]",to="(?:"+Ur+"|"+Zr+")?",eo="[\\ufe0e\\ufe0f]?",no=eo+to+"(?:\\u200d(?:"+[Kr,Qr,Jr].join("|")+")"+eo+to+")*",io="(?:"+[Kr+Ur+"?",Ur,Qr,Jr,Xr].join("|")+")",ro=RegExp(Zr+"(?="+Zr+")|"+io+no,"g");const oo=function(t){return Gr(t)?function(t){return t.match(ro)||[]}(t):function(t){return t.split("")}(t)},ao=(so="toUpperCase",function(t){t=Or(t);var e=Gr(t)?oo(t):void 0,n=e?e[0]:t.charAt(0),i=e?Br(e,1).join(""):t.slice(1);return n[so]()+i});var so;const lo=function(t){return function(e){return null==t?void 0:t[e]}}({À:"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"});var ho=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,co=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var uo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var fo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var po="\\ud800-\\udfff",go="\\u2700-\\u27bf",mo="a-z\\xdf-\\xf6\\xf8-\\xff",yo="A-Z\\xc0-\\xd6\\xd8-\\xde",xo="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",vo="["+xo+"]",bo="\\d+",wo="["+go+"]",Mo="["+mo+"]",ko="[^"+po+xo+bo+go+mo+yo+"]",$o="(?:\\ud83c[\\udde6-\\uddff]){2}",Co="[\\ud800-\\udbff][\\udc00-\\udfff]",_o="["+yo+"]",So="(?:"+Mo+"|"+ko+")",zo="(?:"+_o+"|"+ko+")",Ao="(?:['’](?:d|ll|m|re|s|t|ve))?",Eo="(?:['’](?:D|LL|M|RE|S|T|VE))?",Lo="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Po="[\\ufe0e\\ufe0f]?",Ho=Po+Lo+"(?:\\u200d(?:"+["[^"+po+"]",$o,Co].join("|")+")"+Po+Lo+")*",To="(?:"+[wo,$o,Co].join("|")+")"+Ho,Io=RegExp([_o+"?"+Mo+"+"+Ao+"(?="+[vo,_o,"$"].join("|")+")",zo+"+"+Eo+"(?="+[vo,_o+So,"$"].join("|")+")",_o+"?"+So+"+"+Ao,_o+"+"+Eo,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bo,To].join("|"),"g");const jo=function(t,e,n){return t=Or(t),void 0===(e=n?void 0:e)?function(t){return fo.test(t)}(t)?function(t){return t.match(Io)||[]}(t):function(t){return t.match(uo)||[]}(t):t.match(e)||[]};var Oo=RegExp("['’]","g");const Wo=function(t){return function(e){return function(t,e,n,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(n=t[++r]);++r<o;)n=e(n,t[r],r,t);return n}(jo(function(t){return(t=Or(t))&&t.replace(ho,lo).replace(co,"")}(e).replace(Oo,"")),t,"")}};var No=Wo(function(t,e,n){return e=e.toLowerCase(),t+(n?function(t){return ao(Or(t).toLowerCase())}(e):e)});const Do=No,Ro=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 Fo(t){const e=[];let n="",i=null;const r=()=>{const t=n.trim();t&&e.push(t),n=""};for(let e=0;e<t.length;e+=1){const o=t[e];i?(n+=o,o===i&&(i=null)):'"'!==o&&"'"!==o?","!==o?n+=o:r():(i=o,n+=o)}return r(),e}function Vo(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function Bo(t){const e=Fo(t);return e.length?1===e.length?Vo(e[0]):e.map(t=>Vo(t)).join(", "):""}function qo(t){const e=Fo(t);return e.length?e.map(t=>function(t){const e=t.trim();if(!e)return e;if(function(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")}(e))return e;if(Ro.has(e.toLowerCase()))return e;if(!function(t){return/^\d/.test(t)||/\s/.test(t)}(e))return e;const n=e.includes('"')&&!e.includes("'")?"'":'"';return`${n}${e}${n}`}(t)).join(", "):t.trim()}const Go={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 Yo(t){const e=String(t).toLowerCase();return Go[e]||"regular"}function Xo(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Zo(n,e),n}function Uo(t){const e=(new DOMParser).parseFromString(t,"image/svg+xml");if(e.querySelector("parsererror"))throw new Error("Invalid SVG string");return e.documentElement}function Zo(t,e){Object.entries(e).forEach(([e,n])=>{null==n?t.removeAttribute(e):t.setAttribute(e,n)})}function Ko(t,e,n=!0){return e.reduce((e,i)=>{const r=t.getAttribute(i);return(!n||null!==r&&""!==r&&void 0!==r)&&(e[i]=r),e},{})}function Qo(t,e){!1!==e(t)&&Array.from(t.children).forEach(t=>{Qo(t,e)})}function Jo(t,e="infographic-defs"){const n=e?`defs#${e}`:"defs",i=t.querySelector(n);if(i)return i;const r=Xo("defs");return e&&(r.id=e),t.prepend(r),r}function ta(t){return ca(t)?t.querySelector("span"):null}function ea(t,e){const{textContent:n,attributes:i}=e;if(void 0!==n&&ia(t,n),!i)return;const r=ta(t);let{width:o,height:a}=i;const s={};if(r){if(Object.assign(r.style,function(t){const{x:e,y:n,width:i,height:r,"data-horizontal-align":o,"data-vertical-align":a,"font-size":s,"letter-spacing":l,"line-height":h,fill:c,"stroke-width":d,"text-anchor":u,"dominant-baseline":f,"font-family":p,...g}=t,m={overflow:"visible"};return c&&(m.color=c),Object.entries(g).forEach(([t,e])=>{m[Do(t)]=e}),s&&(m.fontSize=`${s}px`),h&&(m.lineHeight="string"==typeof h&&h.endsWith("px")?h:+h),l&&(m.letterSpacing=`${l}px`),d&&(m.strokeWidth=`${d}px`),m.fontFamily=p?qo(p):p||"",m}(i)),!o||!a){const e=function(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}(r);o||t.hasAttribute("width")||(o=String(e.width)),a||t.hasAttribute("height")||(a=String(e.height))}const{"data-horizontal-align":e,"data-vertical-align":n}=i;Object.assign(r.style,function(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"}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"}return n}(e,n))}const{id:l,x:h,y:c}=i;l&&(s.id=l),void 0!==h&&(s.x=String(h)),void 0!==c&&(s.y=String(c)),void 0!==o&&(s.width=String(o)),void 0!==a&&(s.height=String(a)),Zo(t,s)}function na(t){return ta(t)?.innerText||""}function ia(t,e){const n=ta(t);n&&(n.innerText=e)}function ra(t){const e=ta(t);if(!e)return{};const{color:n,fontSize:i,fontFamily:r,justifyContent:o,alignContent:a,fontWeight:s}=e.style,[l,h]=function(t,e){let n="LEFT",i="TOP";switch(t){case"flex-start":n="LEFT";break;case"center":n="CENTER";break;case"flex-end":n="RIGHT"}switch(e){case"flex-start":i="TOP";break;case"center":i="MIDDLE";break;case"flex-end":i="BOTTOM"}return[n,i]}(o,a),c={"data-horizontal-align":l,"data-vertical-align":h};return r&&(c["font-family"]=Bo(r)),s&&(c["font-weight"]=s),i&&(c["font-size"]=String(parseInt(i))),n&&(c.fill=n),{attributes:c,textContent:na(t)}}const oa=(t,e)=>t?.dataset?.elementType===e,aa=t=>oa(t,"item-icon"),sa=t=>oa(t,"item-icon-group"),la=t=>oa(t,"rough-element"),ha=t=>oa(t,"rough-volume");function ca(t){return"foreignObject"===t.tagName}function da(t){const e=ya(t);return["title","desc","item-label","item-desc"].includes(e)}function ua(t){if(!t)return!1;if(!da(t))return!1;const e=ta(t);return!!e&&e.hasAttribute("contenteditable")}function fa(t){const e=t.tagName.toLowerCase();return["rect","circle","ellipse","line","polygon","polyline","path"].includes(e)}function pa(t){return aa(t)||sa(t)}function ga(t,e){t.setAttribute("data-element-type",e)}function ma(t,e){return t.querySelector(`[data-element-type="${e}"]`)}function ya(t){return pa(t)?"item-icon":t.getAttribute("data-element-type")||"unknown"}const xa=globalThis.fetch,va=function(){var t,e,n;function i(i,o){++t>1024&&(n=e,r(1),++t),e[i]=o}function r(i){t=0,e=Object.create(null),i||(n=Object.create(null))}return r(),{clear:r,has:function(t){return void 0!==e[t]||void 0!==n[t]},get:function(t){var r=e[t];return void 0!==r?r:void 0!==(r=n[t])?(i(t,r),r):void 0},set:function(t,n){void 0!==e[t]?e[t]=n:i(t,n)}}}(),ba=new Map;function wa(t){return new Response(t.body.slice(0),t.init)}async function Ma(t,e){const n=new Request(t,e);if("GET"!==n.method)return xa(n);const i=function(t){const e=function(t){const e=Array.from(t.headers.entries());return 0===e.length?"":(e.sort(([t],[e])=>t.toLowerCase().localeCompare(e.toLowerCase())),e.map(([t,e])=>`${t.toLowerCase()}:${e}`).join("|"))}(t);return e?`${t.method}:${t.url}:${e}`:`${t.method}:${t.url}`}(n);if(va.has(i))return wa(va.get(i));let r=ba.get(i);return r||(r=async function(t,e){try{const n=await xa(t),i={body:await n.arrayBuffer(),init:{status:n.status,statusText:n.statusText,headers:Array.from(n.headers.entries())}};return n.ok&&va.set(e,i),i}finally{ba.delete(e)}}(n,i),ba.set(i,r)),wa(await r)}function ka(t){let e=0;if(0===t.length)return e.toString();for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e&=e;return Math.abs(e).toString()}const $a=new WeakMap;function Ca(t){const e=$a.get(t);return e?Array.from(e.values()):[]}function _a(t,e){return $a.get(t)?.get(e)}function Sa(t,e,n){let i=$a.get(t);return i||(i=new Map,$a.set(t,i)),i.set(e,n),n.finally(()=>{const i=$a.get(t);i&&(i.get(e)===n&&i.delete(e),0===i.size&&$a.delete(t))}),n}async function za(t){if(!t||!t.startsWith("data:"))return null;const e=t.match(/^data:([^;]+)/)?.[1];if(!e)return null;const{width:n,height:i,hasAlpha:r}=await new Promise((n,i)=>{const r=new Image;r.onload=()=>{const t=r.naturalWidth,i=r.naturalHeight,o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return n({width:t,height:i,hasAlpha:!1});if(["image/jpeg","image/jpg","image/webp","image/gif"].includes(e))return n({width:t,height:i,hasAlpha:!1});o.width=t,o.height=i,a.drawImage(r,0,0);let s=!1;for(let e=0;e<t&&!s;e+=10)for(let t=0;t<i;t+=10)if(a.getImageData(e,t,1,1).data[3]<255){s=!0;break}n({width:t,height:i,hasAlpha:s})},r.onerror=()=>i(new Error("Failed to analysis image")),r.src=t}),o=(()=>{if(r)return"xMidYMid meet";if(e?.includes("image/gif")||e?.includes("image/svg"))return"xMidYMid meet";if(Math.min(n,i)<=200)return"xMidYMid meet";const t=n/i;return t>=.6&&t<=1.67||t<.3||t>3.33?"xMidYMid meet":"xMidYMid slice"})();return Uo(`\n<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${i}" preserveAspectRatio="${o}">\n <image href="${t}" width="${n}" height="${i}" />\n</symbol>`)}function Aa(t){return t&&function(t){const e=t.trim();return/^(?:<\?xml[^>]*>\s*)?<svg[\s>]/i.test(e)||e.startsWith("<symbol")}(t)?Uo(t.replace(/<svg(?=[\s/>])/i,"<symbol").replace(/<\/svg>/i,"</symbol>")):null}async function Ea(t,e){if(!t||!function(t){try{return Boolean(new URL(t))}catch{return!1}}(t))return null;const n=await Ma(t);if(!n.ok)throw new Error("Failed to load resource");if(function(t,e){return!!t.toLowerCase().includes("image/svg")||!t&&"svg"===e}(n.headers.get("Content-Type")||"",e))return Aa(await n.text());const i=await n.blob(),r=await function(t){return new Promise((e,n)=>{const i=new FileReader;i.onloadend=()=>{e(i.result)},i.onerror=n,i.readAsDataURL(t)})}(i);return za(r)}async function La(t,e){if(!t)return null;const n=await(async t=>{try{const e=`https://www.weavefox.cn/api/open/v1/icon?${new URLSearchParams({text:t,topK:"1"}).toString()}`,n=await Ma(e);if(!n.ok)return null;const i=await n.json();return i?.status&&Array.isArray(i.data?.data)&&i.data.data[0]||null}catch(e){return console.error(`Failed to query icon for "${t}":`,e),null}})(t);if(!n)return null;if(function(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}(n))return Aa(n);if(n.startsWith("data:")){const t=n.match(/^data:([^;]+)/)?.[1]||"",e=n.includes(";base64,");if("image/svg+xml"===t&&!e){const t=n.indexOf(",");return Aa(t>=0?n.slice(t+1):n)}return za(n)}return Ea(n,e)}const Pa=new Set(["svg","png","jpg","jpeg","webp","gif"]);function Ha(t){const e=t.toLowerCase();return e.endsWith(".svg")||e.includes(".svg?")?"svg":e.endsWith(".png")||e.endsWith(".jpg")||e.endsWith(".jpeg")||e.endsWith(".webp")||e.endsWith(".gif")?"image":void 0}function Ta(t){if(!t)return null;if("string"!=typeof t){if(t.source)return t;const e=t;return"image"===e.type?{source:"inline",format:"image",data:e.data}:"svg"===e.type?{source:"inline",format:"svg",encoding:"raw",data:e.data}:"remote"===e.type?{source:"remote",format:e.format,data:e.data}:"search"===e.type?{source:"search",format:e.format||"svg",data:e.data}:"custom"===e.type?{source:"custom",data:e.data}:null}const e=function(t){if(!t.startsWith("data:"))return null;const e=t.indexOf(",");if(-1===e)return null;const n=t.slice(5,e),i=t.slice(e+1),r=n.split(";"),o=r[0],a=r.includes("base64");return"image/svg+xml"!==o||a?o.startsWith("image/")?{source:"inline",format:"image/svg+xml"===o?"svg":"image",encoding:a?"base64":"data-uri",data:t}:null:{source:"inline",format:"svg",encoding:"raw",data:i.startsWith("%3C")?decodeURIComponent(i):i}}(t);if(e)return e;const n=function(t){if(!t.startsWith("ref:"))return null;const e=t.slice(4),[n,...i]=e.split(":");if(!n||0===i.length)return null;let r;i.length>1&&Pa.has(i[0].toLowerCase())&&(r=i.shift()?.toLowerCase());const o=i.join(":");if(!o)return null;const a="url"===n?"remote":n;return"remote"===a?{source:"remote",format:r||Ha(o)||void 0,data:o}:"search"===a?{source:"search",format:r||"svg",data:o}:"svg"===a?{source:"inline",format:"svg",data:o,encoding:"raw"}:{source:"custom",data:t,format:r}}(t);return n||(function(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}(t)?{source:"inline",format:"svg",encoding:"raw",data:t}:{source:"custom",data:t})}function Ia(t){const e="string"==typeof t?Ta(t):t;return e?"rsc-"+ka(JSON.stringify(e)):null}function ja(t){const e=Ia(t);return e?`#${e}`:null}const Oa=new Map,Wa=new WeakMap;async function Na(t,e,n,i){if(!t)return null;const r=Ta(n);if(!r)return null;const o=Ia(r),a=`resource:${o}`,s=Wa.get(t);if(s?.has(o))return o;const l=_a(t,a);if(l)return await l;const h=(async()=>{const n=Oa.has(o)?Oa.get(o)||null:await async function(t,e,n){const i=Ta(e);if(!i)return null;i.scene||(i.scene=t);const{source:r,data:o,format:a,encoding:s}=i;let l=null;try{if("inline"===r){const t=o.startsWith("data:");l="svg"===a&&"raw"===s?Aa(o):"svg"===a&&t||t||"image"===a?await za(o):Aa(o)}else if("remote"===r)l=await Ea(o,a);else if("search"===r)l=await La(o,a);else{const t=null;t&&(l=await t(i))}}catch{l=null}return l||await La(function(t,e,n){const i="illus"===e?"illustration":"icon",r=Da(n?.label)||Da(n?.desc);if(r)return r;const o=Da(t.data);return o?"inline"===t.source||o.startsWith("data:")||o.startsWith("<svg")||o.startsWith("<symbol")?i:o:i}(i,t,n),a)}(e,r,i);if(!n)return null;Wa.has(t)||Wa.set(t,new Map);const a=Wa.get(t);if(a.has(o))return o;const s=Jo(t);return n.id=o,s.appendChild(n),a.set(o,n),o})();return Sa(t,a,h),await h}function Da(t){if("string"!=typeof t)return null;return t.trim()||null}const Ra=new WeakMap;function Fa(t){const{stroke:e,fill:n}=Ko(t,["fill","stroke"]);t.style.color=n||e||"currentColor"}function Va(t){return"use"===t.tagName?t:t.querySelector("use")}function Ba(t){const e=Va(t);return e?Ko(e,["width","height","x","y","width","height","fill","fill-opacity","stroke","opacity"]):{}}const qa=t=>((t,e=",")=>t.split(e).map(t=>parseInt(t,10)))(t);function Ga(...t){return t.map(t=>t.replace(/^\/+|\/+$/g,"")).filter(t=>t.trim().length>0).join("/")}const Ya=new Map;const Xa={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 Ua(t){return void 0===t||"normal"===t?"400":"bold"===t?"700":"string"==typeof t?{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"}[t.toLowerCase()]||t:String(t)}function Za(t){return t||"normal"}function Ka(t){if(void 0===t)return 14;if("number"==typeof t)return t;const e=parseFloat(t);return isNaN(e)?16:e}const Qa=new Map;let Ja="Alibaba PuHuiTi";function ts(t){const e=Fo(t);for(const t of e){const e=Qa.get(Bo(t));if(e)return e}return null}function es(){return Array.from(Qa.values())}function ns(t){const e=Fo(t).flatMap(t=>{const e=ts(t);if(!e)return[];const{baseUrl:n,fontWeight:i}=e;return Object.values(i).filter(t=>!!t).map(t=>Ga(n,t))});return Array.from(new Set(e))}const is=new WeakMap,rs=new WeakMap;function os(t,e,n){let i=rs.get(t);return i||(i=new Map,rs.set(t,i)),i.set(e,n),n.finally(()=>{const i=rs.get(t);i&&(i.get(e)===n&&i.delete(e),0===i.size&&rs.delete(t))}),n}const as="https://assets.antv.antgroup.com",ss=t=>`${t}/result.css`;[{fontFamily:"Alibaba PuHuiTi",name:"阿里巴巴普惠体",baseUrl:as,fontWeight:{regular:ss("AlibabaPuHuiTi-Regular"),bold:ss("AlibabaPuHuiTi-Bold")}},{fontFamily:"Source Han Sans",name:"黑体",baseUrl:as,fontWeight:{regular:ss("SourceHanSansCN-Regular")}},{fontFamily:"Source Han Serif",name:"宋体",baseUrl:as,fontWeight:{regular:ss("SourceHanSerifCN-Regular")}},{fontFamily:"LXGW WenKai",name:"楷体",baseUrl:as,fontWeight:{regular:ss("LXGWWenKai-Regular")}},{fontFamily:"851tegakizatsu",name:"手写体",baseUrl:as,fontWeight:{regular:ss("851tegakizatsu-Regular")}}].forEach(function(t){const e={...t};return Qa.set(e.fontFamily,e),e.fontFamily=qo(e.fontFamily),e});const ls=new Map;function hs(t,e){ls.set(t,e)}hs("antv",["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#70CAF8"]),hs("spectral",(t,e,n)=>{const i=Math.min(Math.max(n,3),11);return[["#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-3][e%i]});const cs=(t=[],e,n)=>{const i="string"==typeof t?function(t){return ls.get(t)}(t)||[]:t,r=e[0]??0;if("function"==typeof i)return i(n?r/n:0,r,n??0);if(Array.isArray(i)){if(0===i.length)return;return i[r%i.length]}};function ds(t,e){const n=Object.entries(e).reduce((e,[n,i])=>{if("function"==typeof i){const r=i(t.getAttribute(n),t);null!=r&&(e[n]=r)}else Object.assign(e,{[n]:i});return e},{});return n}const us="btn-add-icon",fs="btn-remove-icon";const ps="btn-icon-defs";function gs(t,e){const{id:n,x:i=0,y:r=0,width:o=0,height:a=0}=Ko(t,["id","x","y","width","height"]),s=Xo("g",{id:n,class:"btn-group",transform:`translate(${i}, ${r})`}),l=t.getAttribute("data-items");l&&s.setAttribute("data-items",l);const h=Math.max(+o,+a)/2,c=Xo("circle",{cx:h,cy:h,r:h,fill:"#fff",stroke:"transparent"});s.appendChild(c);const d=Xo("use",{href:`#${e}`,width:o,height:a});s.appendChild(d),s.style.cursor="pointer",t.replaceWith(s)}function ms(t){gs(t,us)}function ys(t){gs(t,fs)}function xs(t,e,n,i){if(!n)return null;const r=Ta(n);if(!r)return null;const o=Ia(r),a=function(t,e,n){const i=`clip-${n}-${crypto&&crypto.randomUUID?crypto.randomUUID():"xxxx-xxxx-4xxx-yxxx".replace(/[xy]/g,function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}`;if(t.querySelector(`#${i}`))return i;const r=Jo(t),o=Xo("clipPath",{id:i}),a=e.cloneNode();return s=a,["id","data-illus-bounds","data-element-type"].forEach(t=>{s.removeAttribute(t)}),o.appendChild(a),r.appendChild(o),i;var s}(t,e,o);Na(t,"illus",r,i);const{data:s,color:l}=r;return function(t,e,n){const{"clip-path":i,...r}=e,{x:o="0",y:a="0",width:s="0",height:l="0"}=r,h=Xo("rect",{id:`${t}-volume`,"data-element-type":"illus-volume",x:o,y:a,width:s,height:l,fill:"transparent"}),c=Xo("g",{"data-element-type":"illus-group","clip-path":i,id:`${t}-group`});c.appendChild(h);const d=Xo("use",{id:t,fill:"lightgray",...r,href:ja(n),"data-element-type":"illus"});return c.appendChild(d),c}(o,{...vs(e),"clip-path":`url(#${a})`,...l?{color:l}:{}},s)}function vs(t){const e=t.getAttribute("data-illus-bounds");if(!e)return{x:"0",y:"0",width:"0",height:"0",...Ko(t,["x","y","width","height"])};const[n,i,r,o]=e.split(" ");return{x:n,y:i,width:r,height:o}}function bs(t){return bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(t)}var ws=/^\s+/,Ms=/\s+$/;function ks(t,e){if(e=e||{},(t=t||"")instanceof ks)return t;if(!(this instanceof ks))return new ks(t,e);var n=function(t){var e={r:0,g:0,b:0},n=1,i=null,r=null,o=null,a=!1,s=!1;return"string"==typeof t&&(t=function(t){t=t.replace(ws,"").replace(Ms,"").toLowerCase();var e,n=!1;if(Ds[t])t=Ds[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=Js.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=Js.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=Js.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=Js.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=Js.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=Js.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=Js.hex8.exec(t))?{r:qs(e[1]),g:qs(e[2]),b:qs(e[3]),a:Us(e[4]),format:n?"name":"hex8"}:(e=Js.hex6.exec(t))?{r:qs(e[1]),g:qs(e[2]),b:qs(e[3]),format:n?"name":"hex"}:(e=Js.hex4.exec(t))?{r:qs(e[1]+""+e[1]),g:qs(e[2]+""+e[2]),b:qs(e[3]+""+e[3]),a:Us(e[4]+""+e[4]),format:n?"name":"hex8"}:!!(e=Js.hex3.exec(t))&&{r:qs(e[1]+""+e[1]),g:qs(e[2]+""+e[2]),b:qs(e[3]+""+e[3]),format:n?"name":"hex"}}(t)),"object"==bs(t)&&(tl(t.r)&&tl(t.g)&&tl(t.b)?(e=function(t,e,n){return{r:255*Vs(t,255),g:255*Vs(e,255),b:255*Vs(n,255)}}(t.r,t.g,t.b),a=!0,s="%"===String(t.r).substr(-1)?"prgb":"rgb"):tl(t.h)&&tl(t.s)&&tl(t.v)?(i=Ys(t.s),r=Ys(t.v),e=function(t,e,n){t=6*Vs(t,360),e=Vs(e,100),n=Vs(n,100);var i=Math.floor(t),r=t-i,o=n*(1-e),a=n*(1-r*e),s=n*(1-(1-r)*e),l=i%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(t.h,i,r),a=!0,s="hsv"):tl(t.h)&&tl(t.s)&&tl(t.l)&&(i=Ys(t.s),o=Ys(t.l),e=function(t,e,n){var i,r,o;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=Vs(t,360),e=Vs(e,100),n=Vs(n,100),0===e)i=r=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;i=a(l,s,t+1/3),r=a(l,s,t),o=a(l,s,t-1/3)}return{r:255*i,g:255*r,b:255*o}}(t.h,i,o),a=!0,s="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=Fs(n),{ok:a,format:t.format||s,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}}(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}function $s(t,e,n){t=Vs(t,255),e=Vs(e,255),n=Vs(n,255);var i,r,o=Math.max(t,e,n),a=Math.min(t,e,n),s=(o+a)/2;if(o==a)i=r=0;else{var l=o-a;switch(r=s>.5?l/(2-o-a):l/(o+a),o){case t:i=(e-n)/l+(e<n?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return{h:i,s:r,l:s}}function Cs(t,e,n){t=Vs(t,255),e=Vs(e,255),n=Vs(n,255);var i,r,o=Math.max(t,e,n),a=Math.min(t,e,n),s=o,l=o-a;if(r=0===o?0:l/o,o==a)i=0;else{switch(o){case t:i=(e-n)/l+(e<n?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return{h:i,s:r,v:s}}function _s(t,e,n,i){var r=[Gs(Math.round(t).toString(16)),Gs(Math.round(e).toString(16)),Gs(Math.round(n).toString(16))];return i&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Ss(t,e,n,i){return[Gs(Xs(i)),Gs(Math.round(t).toString(16)),Gs(Math.round(e).toString(16)),Gs(Math.round(n).toString(16))].join("")}function zs(t,e){e=0===e?0:e||10;var n=ks(t).toHsl();return n.s-=e/100,n.s=Bs(n.s),ks(n)}function As(t,e){e=0===e?0:e||10;var n=ks(t).toHsl();return n.s+=e/100,n.s=Bs(n.s),ks(n)}function Es(t){return ks(t).desaturate(100)}function Ls(t,e){e=0===e?0:e||10;var n=ks(t).toHsl();return n.l+=e/100,n.l=Bs(n.l),ks(n)}function Ps(t,e){e=0===e?0:e||10;var n=ks(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-e/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-e/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-e/100*255))),ks(n)}function Hs(t,e){e=0===e?0:e||10;var n=ks(t).toHsl();return n.l-=e/100,n.l=Bs(n.l),ks(n)}function Ts(t,e){var n=ks(t).toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,ks(n)}function Is(t){var e=ks(t).toHsl();return e.h=(e.h+180)%360,ks(e)}function js(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=ks(t).toHsl(),i=[ks(t)],r=360/e,o=1;o<e;o++)i.push(ks({h:(n.h+o*r)%360,s:n.s,l:n.l}));return i}function Os(t){var e=ks(t).toHsl(),n=e.h;return[ks(t),ks({h:(n+72)%360,s:e.s,l:e.l}),ks({h:(n+216)%360,s:e.s,l:e.l})]}function Ws(t,e,n){e=e||6,n=n||30;var i=ks(t).toHsl(),r=360/n,o=[ks(t)];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(ks(i));return o}function Ns(t,e){e=e||6;for(var n=ks(t).toHsv(),i=n.h,r=n.s,o=n.v,a=[],s=1/e;e--;)a.push(ks({h:i,s:r,v:o})),o=(o+s)%1;return a}ks.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 t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,i=this.toRgb();return t=i.r/255,e=i.g/255,n=i.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=Fs(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Cs(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Cs(this._r,this._g,this._b),e=Math.round(360*t.h),n=Math.round(100*t.s),i=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=$s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=$s(this._r,this._g,this._b),e=Math.round(360*t.h),n=Math.round(100*t.s),i=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return _s(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,n,i,r){var o=[Gs(Math.round(t).toString(16)),Gs(Math.round(e).toString(16)),Gs(Math.round(n).toString(16)),Gs(Xs(i))];return r&&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("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"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(100*Vs(this._r,255))+"%",g:Math.round(100*Vs(this._g,255))+"%",b:Math.round(100*Vs(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*Vs(this._r,255))+"%, "+Math.round(100*Vs(this._g,255))+"%, "+Math.round(100*Vs(this._b,255))+"%)":"rgba("+Math.round(100*Vs(this._r,255))+"%, "+Math.round(100*Vs(this._g,255))+"%, "+Math.round(100*Vs(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Rs[_s(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+Ss(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var r=ks(t);n="#"+Ss(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return ks(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Ls,arguments)},brighten:function(){return this._applyModification(Ps,arguments)},darken:function(){return this._applyModification(Hs,arguments)},desaturate:function(){return this._applyModification(zs,arguments)},saturate:function(){return this._applyModification(As,arguments)},greyscale:function(){return this._applyModification(Es,arguments)},spin:function(){return this._applyModification(Ts,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(Ws,arguments)},complement:function(){return this._applyCombination(Is,arguments)},monochromatic:function(){return this._applyCombination(Ns,arguments)},splitcomplement:function(){return this._applyCombination(Os,arguments)},triad:function(){return this._applyCombination(js,[3])},tetrad:function(){return this._applyCombination(js,[4])}},ks.fromRatio=function(t,e){if("object"==bs(t)){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]="a"===i?t[i]:Ys(t[i]));t=n}return ks(t,e)},ks.equals=function(t,e){return!(!t||!e)&&ks(t).toRgbString()==ks(e).toRgbString()},ks.random=function(){return ks.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},ks.mix=function(t,e,n){n=0===n?0:n||50;var i=ks(t).toRgb(),r=ks(e).toRgb(),o=n/100;return ks({r:(r.r-i.r)*o+i.r,g:(r.g-i.g)*o+i.g,b:(r.b-i.b)*o+i.b,a:(r.a-i.a)*o+i.a})},ks.readability=function(t,e){var n=ks(t),i=ks(e);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)},ks.isReadable=function(t,e,n){var i,r,o,a,s,l=ks.readability(t,e);switch(r=!1,"AA"!==(a=((o=(o=n)||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(o.size||"small").toLowerCase())&&"large"!==s&&(s="small"),(i={level:a,size:s}).level+i.size){case"AAsmall":case"AAAlarge":r=l>=4.5;break;case"AAlarge":r=l>=3;break;case"AAAsmall":r=l>=7}return r},ks.mostReadable=function(t,e,n){var i,r,o,a,s=null,l=0;r=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var h=0;h<e.length;h++)(i=ks.readability(t,e[h]))>l&&(l=i,s=ks(e[h]));return ks.isReadable(t,s,{level:o,size:a})||!r?s:(n.includeFallbackColors=!1,ks.mostReadable(t,["#fff","#000"],n))};var Ds=ks.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"},Rs=ks.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(Ds);function Fs(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Vs(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(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 Bs(t){return Math.min(1,Math.max(0,t))}function qs(t){return parseInt(t,16)}function Gs(t){return 1==t.length?"0"+t:""+t}function Ys(t){return t<=1&&(t=100*t+"%"),t}function Xs(t){return Math.round(255*parseFloat(t)).toString(16)}function Us(t){return qs(t)/255}var Zs,Ks,Qs,Js=(Ks="[\\s|\\(]+("+(Zs="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Zs+")[,|\\s]+("+Zs+")\\s*\\)?",Qs="[\\s|\\(]+("+Zs+")[,|\\s]+("+Zs+")[,|\\s]+("+Zs+")[,|\\s]+("+Zs+")\\s*\\)?",{CSS_UNIT:new RegExp(Zs),rgb:new RegExp("rgb"+Ks),rgba:new RegExp("rgba"+Qs),hsl:new RegExp("hsl"+Ks),hsla:new RegExp("hsla"+Qs),hsv:new RegExp("hsv"+Ks),hsva:new RegExp("hsva"+Qs),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 tl(t){return!!Js.CSS_UNIT.exec(t)}function el(t){return t.replace(/#|%|\.| |\/|\(|\)/g,"").replace(/,/g,"-")}function nl(t,e,n,i){const r=function(t,e){if(e.colors?.length||!t)return e;const n=ks(t),i={...e};return i.colors=n.isDark()?[t,n.lighten(20).toHexString()]:[n.darken(20).toHexString(),t],"angle"in e||"linear-gradient"!==i.type||(i.angle=225),i}(t.getAttribute(i),n),{type:o,colors:a=[]}=r,s=a.length-1,l=a.map((t,e)=>Xo("stop","string"==typeof t?{offset:""+e/s,"stop-color":t}:{offset:`${t.offset}`,"stop-color":t.color})),h=function(t){const{type:e,colors:n=[]}=t,i=el(n.map(t=>"string"==typeof t?t:`${t.color}_${t.offset}`).join("-"));if("linear-gradient"===e){const{angle:n=0}=t;return`${e}-${i}-${n}`}return`${e}-${i}`}(r);if("linear-gradient"===o){const{angle:t=0}=r,[[n,i],[o,a]]=function(t){const e=Math.PI/180*t,n=Math.cos(e),i=Math.sin(e);return[[.5-n/2,.5-i/2],[.5+n/2,.5+i/2]]}(t),s=Xo("linearGradient",{id:h,x1:n,y1:i,x2:o,y2:a});l.forEach(t=>s.appendChild(t)),il(e,h,s)}else if("radial-gradient"===o){const t=Xo("radialGradient",{id:h});l.forEach(e=>t.appendChild(e)),il(e,h,t)}const c=t.getAttribute("fill"),d=t.getAttribute("stroke");Ti(c)&&t.setAttribute("fill",`url(#${h})`),Ti(d)&&t.setAttribute("stroke",`url(#${h})`)}function il(t,e,n){const i=Jo(t);n.setAttribute("id",e);const r=i.querySelector(`#${e}`);r?r.replaceWith(n):i.appendChild(n)}const rl=({scale:t=.5,backgroundColor:e,foregroundColor:n})=>{const i=Xo("pattern",{id:"pattern-diamond",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),r=Xo("rect",{width:"100%",height:"100%",fill:e}),o=Xo("path",{d:"M0,0 L20,20 M20,0 L0,20",stroke:n,"stroke-width":"1"});return i.appendChild(r),i.appendChild(o),i},ol=({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const i=Xo("pattern",{id:"pattern-dot",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),r=Xo("rect",{width:"100%",height:"100%",fill:e}),o=Xo("circle",{cx:"5",cy:"5",r:"3",fill:n}),a=Xo("circle",{cx:"15",cy:"15",r:"3",fill:n});return i.appendChild(r),i.appendChild(o),i.appendChild(a),i},al=({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const i=Xo("pattern",{id:"pattern-hex",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),r=Xo("rect",{width:"100%",height:"100%",fill:e}),o=Xo("path",{d:"M10,0 L20,5 L20,15 L10,20 L0,15 L0,5 Z",fill:n});return i.appendChild(r),i.appendChild(o),i},sl=({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const i=Xo("pattern",{id:"pattern-line",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),r=Xo("rect",{width:"100%",height:"100%",fill:e}),o=Xo("line",{x1:"7",y1:"-3",x2:"23",y2:"13",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"}),a=Xo("line",{x1:"-3",y1:"7",x2:"13",y2:"23",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"});return i.appendChild(r),i.appendChild(o),i.appendChild(a),i},ll=({scale:t=1,backgroundColor:e="#ffffff",foregroundColor:n="#000000"})=>{const i=Xo("pattern",{id:"pattern-mosaic",width:20,height:20,patternUnits:"userSpaceOnUse",patternTransform:`scale(${t})`}),r=Xo("rect",{width:"100%",height:"100%",fill:e});i.appendChild(r);for(let t=0;t<4;t++)for(let e=0;e<4;e++)if((e+t)%2==0){const r=Xo("rect",{x:5*e,y:5*t,width:5,height:5,fill:n});i.appendChild(r)}return i},hl=({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const i=Xo("pattern",{id:"pattern-square",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),r=Xo("rect",{width:"100%",height:"100%",fill:e}),o=Xo("path",{d:"M0,0 L20,0 L20,20 L0,20 Z",fill:n});return i.appendChild(r),i.appendChild(o),i},cl=new Map;function dl(t,e){cl.has(t)&&console.warn(`Pattern ${t} will be overwritten`),cl.set(t,e)}for(const[e,n]of Object.entries(t))dl(e,n);function ul(t,e,n){if(t&&t.length){const[i,r]=e,o=Math.PI/180*n,a=Math.cos(o),s=Math.sin(o);for(const e of t){const[t,n]=e;e[0]=(t-i)*a-(n-r)*s+i,e[1]=(t-i)*s+(n-r)*a+r}}}function fl(t,e){return t[0]===e[0]&&t[1]===e[1]}function pl(t,e,n,i=1){const r=n,o=Math.max(e,.1),a=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,s=[0,0];if(r)for(const t of a)ul(t,s,r);const l=function(t,e,n){const i=[];for(const e of t){const t=[...e];fl(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const r=[];e=Math.max(e,.1);const o=[];for(const t of i)for(let e=0;e<t.length-1;e++){const n=t[e],i=t[e+1];if(n[1]!==i[1]){const t=Math.min(n[1],i[1]);o.push({ymin:t,ymax:Math.max(n[1],i[1]),x:t===n[1]?n[0]:i[0],islope:(i[0]-n[0])/(i[1]-n[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return r;let a=[],s=o[0].ymin,l=0;for(;a.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>s);e++)t=e;o.splice(0,t+1).forEach(t=>{a.push({s,edge:t})})}if(a=a.filter(t=>!(t.edge.ymax<=s)),a.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==n||l%e==0)&&a.length>1)for(let t=0;t<a.length;t+=2){const e=t+1;if(e>=a.length)break;const n=a[t].edge,i=a[e].edge;r.push([[Math.round(n.x),s],[Math.round(i.x),s]])}s+=n,a.forEach(t=>{t.edge.x=t.edge.x+n*t.edge.islope}),l++}return r}(a,o,i);if(r){for(const t of a)ul(t,s,-r);!function(t,e,n){const i=[];t.forEach(t=>i.push(...t)),ul(i,e,n)}(l,s,-r)}return l}function gl(t,e){var n;const i=e.hachureAngle+90;let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.round(Math.max(r,.1));let o=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(o=r),pl(t,r,i,o||1)}class ml{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const n=gl(t,e);return{type:"fillSketch",ops:this.renderLines(n,e)}}renderLines(t,e){const n=[];for(const i of t)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return n}}function yl(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))}class xl extends ml{fillPolygons(t,e){let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);const i=gl(t,Object.assign({},e,{hachureGap:n})),r=Math.PI/180*e.hachureAngle,o=[],a=.5*n*Math.cos(r),s=.5*n*Math.sin(r);for(const[t,e]of i)yl([t,e])&&o.push([[t[0]-a,t[1]+s],[...e]],[[t[0]+a,t[1]-s],[...e]]);return{type:"fillSketch",ops:this.renderLines(o,e)}}}class vl extends ml{fillPolygons(t,e){const n=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),r=this._fillPolygons(t,i);return n.ops=n.ops.concat(r.ops),n}}class bl{constructor(t){this.helper=t}fillPolygons(t,e){const n=gl(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(n,e)}dotsOnLines(t,e){const n=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let r=e.fillWeight;r<0&&(r=e.strokeWidth/2);const o=i/4;for(const a of t){const t=yl(a),s=t/i,l=Math.ceil(s)-1,h=t-l*i,c=(a[0][0]+a[1][0])/2-i/4,d=Math.min(a[0][1],a[1][1]);for(let t=0;t<l;t++){const a=d+h+t*i,s=c-o+2*Math.random()*o,l=a-o+2*Math.random()*o,u=this.helper.ellipse(s,l,r,r,e);n.push(...u.ops)}}return{type:"fillSketch",ops:n}}}class wl{constructor(t){this.helper=t}fillPolygons(t,e){const n=gl(t,e);return{type:"fillSketch",ops:this.dashedLine(n,e)}}dashedLine(t,e){const n=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,r=[];return t.forEach(t=>{const o=yl(t),a=Math.floor(o/(n+i)),s=(o+i-a*(n+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t<a;t++){const o=t*(n+i),a=o+n,h=[l[0]+o*Math.cos(c)+s*Math.cos(c),l[1]+o*Math.sin(c)+s*Math.sin(c)],d=[l[0]+a*Math.cos(c)+s*Math.cos(c),l[1]+a*Math.sin(c)+s*Math.sin(c)];r.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],e))}}),r}}class Ml{constructor(t){this.helper=t}fillPolygons(t,e){const n=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?n:e.zigzagOffset,r=gl(t,e=Object.assign({},e,{hachureGap:n+i}));return{type:"fillSketch",ops:this.zigzagLines(r,i,e)}}zigzagLines(t,e,n){const i=[];return t.forEach(t=>{const r=yl(t),o=Math.round(r/(2*e));let a=t[0],s=t[1];a[0]>s[0]&&(a=t[1],s=t[0]);const l=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let t=0;t<o;t++){const r=2*t*e,o=2*(t+1)*e,s=Math.sqrt(2*Math.pow(e,2)),h=[a[0]+r*Math.cos(l),a[1]+r*Math.sin(l)],c=[a[0]+o*Math.cos(l),a[1]+o*Math.sin(l)],d=[h[0]+s*Math.cos(l+Math.PI/4),h[1]+s*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],n))}}),i}}const kl={};class $l{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Cl={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 _l(t,e){return t.type===e}function Sl(t){const e=[],n=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",r=0,o=n[r];for(;!_l(o,2);){let a=0;const s=[];if("BOD"===i){if("M"!==o.text&&"m"!==o.text)return Sl("M0,0"+t);r++,a=Cl[o.text],i=o.text}else _l(o,1)?a=Cl[i]:(r++,a=Cl[o.text],i=o.text);if(!(r+a<n.length))throw new Error("Path data ended short");for(let t=r;t<r+a;t++){const e=n[t];if(!_l(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof Cl[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),r+=a,o=n[r],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function zl(t){let e=0,n=0,i=0,r=0;const o=[];for(const{key:a,data:s}of t)switch(a){case"M":o.push({key:"M",data:[...s]}),[e,n]=s,[i,r]=s;break;case"m":e+=s[0],n+=s[1],o.push({key:"M",data:[e,n]}),i=e,r=n;break;case"L":o.push({key:"L",data:[...s]}),[e,n]=s;break;case"l":e+=s[0],n+=s[1],o.push({key:"L",data:[e,n]});break;case"C":o.push({key:"C",data:[...s]}),e=s[4],n=s[5];break;case"c":{const t=s.map((t,i)=>i%2?t+n:t+e);o.push({key:"C",data:t}),e=t[4],n=t[5];break}case"Q":o.push({key:"Q",data:[...s]}),e=s[2],n=s[3];break;case"q":{const t=s.map((t,i)=>i%2?t+n:t+e);o.push({key:"Q",data:t}),e=t[2],n=t[3];break}case"A":o.push({key:"A",data:[...s]}),e=s[5],n=s[6];break;case"a":e+=s[5],n+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,n]});break;case"H":o.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...s]}),e=s[2],n=s[3];break;case"s":{const t=s.map((t,i)=>i%2?t+n:t+e);o.push({key:"S",data:t}),e=t[2],n=t[3];break}case"T":o.push({key:"T",data:[...s]}),e=s[0],n=s[1];break;case"t":e+=s[0],n+=s[1],o.push({key:"T",data:[e,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=i,n=r}return o}function Al(t){const e=[];let n="",i=0,r=0,o=0,a=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,r]=c,[o,a]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],r=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,r]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,r]});break;case"V":r=c[0],e.push({key:"L",data:[i,r]});break;case"S":{let t=0,o=0;"C"===n||"S"===n?(t=i+(i-s),o=r+(r-l)):(t=i,o=r),e.push({key:"C",data:[t,o,...c]}),s=c[0],l=c[1],i=c[2],r=c[3];break}case"T":{const[t,o]=c;let a=0,h=0;"Q"===n||"T"===n?(a=i+(i-s),h=r+(r-l)):(a=i,h=r);const d=i+2*(a-i)/3,u=r+2*(h-r)/3,f=t+2*(a-t)/3,p=o+2*(h-o)/3;e.push({key:"C",data:[d,u,f,p,t,o]}),s=a,l=h,i=t,r=o;break}case"Q":{const[t,n,o,a]=c,h=i+2*(t-i)/3,d=r+2*(n-r)/3,u=o+2*(t-o)/3,f=a+2*(n-a)/3;e.push({key:"C",data:[h,d,u,f,o,a]}),s=t,l=n,i=o,r=a;break}case"A":{const t=Math.abs(c[0]),n=Math.abs(c[1]),o=c[2],a=c[3],s=c[4],l=c[5],h=c[6];0===t||0===n?(e.push({key:"C",data:[i,r,l,h,l,h]}),i=l,r=h):i===l&&r===h||(Ll(i,r,l,h,t,n,o,a,s).forEach(function(t){e.push({key:"C",data:t})}),i=l,r=h);break}case"Z":e.push({key:"Z",data:[]}),i=o,r=a}n=h}return e}function El(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function Ll(t,e,n,i,r,o,a,s,l,h){const c=(d=a,Math.PI*d/180);var d;let u=[],f=0,p=0,g=0,m=0;if(h)[f,p,g,m]=h;else{[t,e]=El(t,e,-c),[n,i]=El(n,i,-c);const a=(t-n)/2,h=(e-i)/2;let d=a*a/(r*r)+h*h/(o*o);d>1&&(d=Math.sqrt(d),r*=d,o*=d);const u=r*r,y=o*o,x=u*y-u*h*h-y*a*a,v=u*h*h+y*a*a,b=(s===l?-1:1)*Math.sqrt(Math.abs(x/v));g=b*r*h/o+(t+n)/2,m=b*-o*a/r+(e+i)/2,f=Math.asin(parseFloat(((e-m)/o).toFixed(9))),p=Math.asin(parseFloat(((i-m)/o).toFixed(9))),t<g&&(f=Math.PI-f),n<g&&(p=Math.PI-p),f<0&&(f=2*Math.PI+f),p<0&&(p=2*Math.PI+p),l&&f>p&&(f-=2*Math.PI),!l&&p>f&&(p-=2*Math.PI)}let y=p-f;if(Math.abs(y)>120*Math.PI/180){const t=p,e=n,s=i;p=l&&p>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,u=Ll(n=g+r*Math.cos(p),i=m+o*Math.sin(p),e,s,r,o,a,0,l,[p,t,g,m])}y=p-f;const x=Math.cos(f),v=Math.sin(f),b=Math.cos(p),w=Math.sin(p),M=Math.tan(y/4),k=4/3*r*M,$=4/3*o*M,C=[t,e],_=[t+k*v,e-$*x],S=[n+k*w,i-$*b],z=[n,i];if(_[0]=2*C[0]-_[0],_[1]=2*C[1]-_[1],h)return[_,S,z].concat(u);{u=[_,S,z].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const n=El(u[e][0],u[e][1],c),i=El(u[e+1][0],u[e+1][1],c),r=El(u[e+2][0],u[e+2][1],c);t.push([n[0],n[1],i[0],i[1],r[0],r[1]])}return t}}const Pl={randOffset:function(t,e){return ql(t,e)},randOffsetWithRange:function(t,e,n){return Bl(t,e,n)},ellipse:function(t,e,n,i,r){return Ol(t,e,r,jl(n,i,r)).opset},doubleLineOps:function(t,e,n,i,r){return Gl(t,e,n,i,r,!0)}};function Hl(t,e,n,i,r){return{type:"path",ops:Gl(t,e,n,i,r)}}function Tl(t,e,n){const i=(t||[]).length;if(i>2){const r=[];for(let e=0;e<i-1;e++)r.push(...Gl(t[e][0],t[e][1],t[e+1][0],t[e+1][1],n));return e&&r.push(...Gl(t[i-1][0],t[i-1][1],t[0][0],t[0][1],n)),{type:"path",ops:r}}return 2===i?Hl(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function Il(t,e){if(t.length){const n="number"==typeof t[0][0]?[t]:t,i=Xl(n[0],1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:Xl(n[0],1.5*(1+.22*e.roughness),Fl(e));for(let t=1;t<n.length;t++){const o=n[t];if(o.length){const t=Xl(o,1*(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:Xl(o,1.5*(1+.22*e.roughness),Fl(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of n)"move"!==t.op&&r.push(t)}}return{type:"path",ops:i.concat(r)}}return{type:"path",ops:[]}}function jl(t,e,n){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),r=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/r;let a=Math.abs(t/2),s=Math.abs(e/2);const l=1-n.curveFitting;return a+=ql(a*l,n),s+=ql(s*l,n),{increment:o,rx:a,ry:s}}function Ol(t,e,n,i){const[r,o]=Zl(i.increment,t,e,i.rx,i.ry,1,i.increment*Bl(.1,Bl(.4,1,n),n),n);let a=Ul(r,null,n);if(!n.disableMultiStroke&&0!==n.roughness){const[r]=Zl(i.increment,t,e,i.rx,i.ry,1.5,0,n),o=Ul(r,null,n);a=a.concat(o)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function Wl(t,e,n,i,r,o,a,s,l){const h=t,c=e;let d=Math.abs(n/2),u=Math.abs(i/2);d+=ql(.01*d,l),u+=ql(.01*u,l);let f=r,p=o;for(;f<0;)f+=2*Math.PI,p+=2*Math.PI;p-f>2*Math.PI&&(f=0,p=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(p-f)/2),y=Kl(m,h,c,d,u,f,p,1,l);if(!l.disableMultiStroke){const t=Kl(m,h,c,d,u,f,p,1.5,l);y.push(...t)}return a&&(s?y.push(...Gl(h,c,h+d*Math.cos(f),c+u*Math.sin(f),l),...Gl(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l)):y.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(f),c+u*Math.sin(f)]})),{type:"path",ops:y}}function Nl(t,e){const n=Al(zl(Sl(t))),i=[];let r=[0,0],o=[0,0];for(const{key:t,data:a}of n)switch(t){case"M":o=[a[0],a[1]],r=[a[0],a[1]];break;case"L":i.push(...Gl(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[t,n,r,s,l,h]=a;i.push(...Ql(t,n,r,s,l,h,o,e)),o=[l,h];break}case"Z":i.push(...Gl(o[0],o[1],r[0],r[1],e)),o=[r[0],r[1]]}return{type:"path",ops:i}}function Dl(t,e){const n=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,r=i.length;if(r>2){n.push({op:"move",data:[i[0][0]+ql(t,e),i[0][1]+ql(t,e)]});for(let o=1;o<r;o++)n.push({op:"lineTo",data:[i[o][0]+ql(t,e),i[o][1]+ql(t,e)]})}}return{type:"fillPath",ops:n}}function Rl(t,e){return function(t,e){let n=t.fillStyle||"hachure";if(!kl[n])switch(n){case"zigzag":kl[n]||(kl[n]=new xl(e));break;case"cross-hatch":kl[n]||(kl[n]=new vl(e));break;case"dots":kl[n]||(kl[n]=new bl(e));break;case"dashed":kl[n]||(kl[n]=new wl(e));break;case"zigzag-line":kl[n]||(kl[n]=new Ml(e));break;default:n="hachure",kl[n]||(kl[n]=new ml(e))}return kl[n]}(e,Pl).fillPolygons(t,e)}function Fl(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Vl(t){return t.randomizer||(t.randomizer=new $l(t.seed||0)),t.randomizer.next()}function Bl(t,e,n,i=1){return n.roughness*i*(Vl(n)*(e-t)+t)}function ql(t,e,n=1){return Bl(-t,t,e,n)}function Gl(t,e,n,i,r,o=!1){const a=o?r.disableMultiStrokeFill:r.disableMultiStroke,s=Yl(t,e,n,i,r,!0,!1);if(a)return s;const l=Yl(t,e,n,i,r,!0,!0);return s.concat(l)}function Yl(t,e,n,i,r,o,a){const s=Math.pow(t-n,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=r.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const d=c/2,u=.2+.2*Vl(r);let f=r.bowing*r.maxRandomnessOffset*(i-e)/200,p=r.bowing*r.maxRandomnessOffset*(t-n)/200;f=ql(f,r,h),p=ql(p,r,h);const g=[],m=()=>ql(d,r,h),y=()=>ql(c,r,h),x=r.preserveVertices;return o&&(a?g.push({op:"move",data:[t+(x?0:m()),e+(x?0:m())]}):g.push({op:"move",data:[t+(x?0:ql(c,r,h)),e+(x?0:ql(c,r,h))]})),a?g.push({op:"bcurveTo",data:[f+t+(n-t)*u+m(),p+e+(i-e)*u+m(),f+t+2*(n-t)*u+m(),p+e+2*(i-e)*u+m(),n+(x?0:m()),i+(x?0:m())]}):g.push({op:"bcurveTo",data:[f+t+(n-t)*u+y(),p+e+(i-e)*u+y(),f+t+2*(n-t)*u+y(),p+e+2*(i-e)*u+y(),n+(x?0:y()),i+(x?0:y())]}),g}function Xl(t,e,n){if(!t.length)return[];const i=[];i.push([t[0][0]+ql(e,n),t[0][1]+ql(e,n)]),i.push([t[0][0]+ql(e,n),t[0][1]+ql(e,n)]);for(let r=1;r<t.length;r++)i.push([t[r][0]+ql(e,n),t[r][1]+ql(e,n)]),r===t.length-1&&i.push([t[r][0]+ql(e,n),t[r][1]+ql(e,n)]);return Ul(i,null,n)}function Ul(t,e,n){const i=t.length,r=[];if(i>3){const o=[],a=1-n.curveTightness;r.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){const n=t[e];o[0]=[n[0],n[1]],o[1]=[n[0]+(a*t[e+1][0]-a*t[e-1][0])/6,n[1]+(a*t[e+1][1]-a*t[e-1][1])/6],o[2]=[t[e+1][0]+(a*t[e][0]-a*t[e+2][0])/6,t[e+1][1]+(a*t[e][1]-a*t[e+2][1])/6],o[3]=[t[e+1][0],t[e+1][1]],r.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(e&&2===e.length){const t=n.maxRandomnessOffset;r.push({op:"lineTo",data:[e[0]+ql(t,n),e[1]+ql(t,n)]})}}else 3===i?(r.push({op:"move",data:[t[1][0],t[1][1]]}),r.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&r.push(...Yl(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return r}function Zl(t,e,n,i,r,o,a,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),n+r*Math.sin(-t)]);for(let o=0;o<=2*Math.PI;o+=t){const t=[e+i*Math.cos(o),n+r*Math.sin(o)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),n+r*Math.sin(0)]),h.push([e+i*Math.cos(t),n+r*Math.sin(t)])}else{const c=ql(.5,s)-Math.PI/2;h.push([ql(o,s)+e+.9*i*Math.cos(c-t),ql(o,s)+n+.9*r*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let a=c;a<d;a+=t){const t=[ql(o,s)+e+i*Math.cos(a),ql(o,s)+n+r*Math.sin(a)];l.push(t),h.push(t)}h.push([ql(o,s)+e+i*Math.cos(c+2*Math.PI+.5*a),ql(o,s)+n+r*Math.sin(c+2*Math.PI+.5*a)]),h.push([ql(o,s)+e+.98*i*Math.cos(c+a),ql(o,s)+n+.98*r*Math.sin(c+a)]),h.push([ql(o,s)+e+.9*i*Math.cos(c+.5*a),ql(o,s)+n+.9*r*Math.sin(c+.5*a)])}return[h,l]}function Kl(t,e,n,i,r,o,a,s,l){const h=o+ql(.1,l),c=[];c.push([ql(s,l)+e+.9*i*Math.cos(h-t),ql(s,l)+n+.9*r*Math.sin(h-t)]);for(let o=h;o<=a;o+=t)c.push([ql(s,l)+e+i*Math.cos(o),ql(s,l)+n+r*Math.sin(o)]);return c.push([e+i*Math.cos(a),n+r*Math.sin(a)]),c.push([e+i*Math.cos(a),n+r*Math.sin(a)]),Ul(c,null,l)}function Ql(t,e,n,i,r,o,a,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const d=s.disableMultiStroke?1:2,u=s.preserveVertices;for(let f=0;f<d;f++)0===f?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(u?0:ql(h[0],s)),a[1]+(u?0:ql(h[0],s))]}),c=u?[r,o]:[r+ql(h[f],s),o+ql(h[f],s)],l.push({op:"bcurveTo",data:[t+ql(h[f],s),e+ql(h[f],s),n+ql(h[f],s),i+ql(h[f],s),c[0],c[1]]});return l}function Jl(t){return[...t]}function th(t,e=0){const n=t.length;if(n<3)throw new Error("A curve must have at least three points.");const i=[];if(3===n)i.push(Jl(t[0]),Jl(t[1]),Jl(t[2]),Jl(t[2]));else{const n=[];n.push(t[0],t[0]);for(let e=1;e<t.length;e++)n.push(t[e]),e===t.length-1&&n.push(t[e]);const r=[],o=1-e;i.push(Jl(n[0]));for(let t=1;t+2<n.length;t++){const e=n[t];r[0]=[e[0],e[1]],r[1]=[e[0]+(o*n[t+1][0]-o*n[t-1][0])/6,e[1]+(o*n[t+1][1]-o*n[t-1][1])/6],r[2]=[n[t+1][0]+(o*n[t][0]-o*n[t+2][0])/6,n[t+1][1]+(o*n[t][1]-o*n[t+2][1])/6],r[3]=[n[t+1][0],n[t+1][1]],i.push(r[1],r[2],r[3])}}return i}function eh(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function nh(t,e,n){const i=eh(e,n);if(0===i)return eh(t,e);let r=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/i;return r=Math.max(0,Math.min(1,r)),eh(t,ih(e,n,r))}function ih(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function rh(t,e,n,i){const r=i||[];if(function(t,e){const n=t[e+0],i=t[e+1],r=t[e+2],o=t[e+3];let a=3*i[0]-2*n[0]-o[0];a*=a;let s=3*i[1]-2*n[1]-o[1];s*=s;let l=3*r[0]-2*o[0]-n[0];l*=l;let h=3*r[1]-2*o[1]-n[1];return h*=h,a<l&&(a=l),s<h&&(s=h),a+s}(t,e)<n){const n=t[e+0];r.length?(o=r[r.length-1],a=n,Math.sqrt(eh(o,a))>1&&r.push(n)):r.push(n),r.push(t[e+3])}else{const i=.5,o=t[e+0],a=t[e+1],s=t[e+2],l=t[e+3],h=ih(o,a,i),c=ih(a,s,i),d=ih(s,l,i),u=ih(h,c,i),f=ih(c,d,i),p=ih(u,f,i);rh([o,h,u,p],0,n,r),rh([p,f,d,l],0,n,r)}var o,a;return r}function oh(t,e){return ah(t,0,t.length,e)}function ah(t,e,n,i,r){const o=r||[],a=t[e],s=t[n-1];let l=0,h=1;for(let i=e+1;i<n-1;++i){const e=nh(t[i],a,s);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(ah(t,e,h+1,i,o),ah(t,h,n,i,o)):(o.length||o.push(a),o.push(s)),o}function sh(t,e=.15,n){const i=[],r=(t.length-1)/3;for(let n=0;n<r;n++)rh(t,3*n,e,i);return n&&n>0?ah(i,0,i.length,n):i}const lh="none";class hh{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,n){return{shape:t,sets:e||[],options:n||this.defaultOptions}}line(t,e,n,i,r){const o=this._o(r);return this._d("line",[Hl(t,e,n,i,o)],o)}rectangle(t,e,n,i,r){const o=this._o(r),a=[],s=function(t,e,n,i,r){return function(t,e){return Tl(t,!0,e)}([[t,e],[t+n,e],[t+n,e+i],[t,e+i]],r)}(t,e,n,i,o);if(o.fill){const r=[[t,e],[t+n,e],[t+n,e+i],[t,e+i]];"solid"===o.fillStyle?a.push(Dl([r],o)):a.push(Rl([r],o))}return o.stroke!==lh&&a.push(s),this._d("rectangle",a,o)}ellipse(t,e,n,i,r){const o=this._o(r),a=[],s=jl(n,i,o),l=Ol(t,e,o,s);if(o.fill)if("solid"===o.fillStyle){const n=Ol(t,e,o,s).opset;n.type="fillPath",a.push(n)}else a.push(Rl([l.estimatedPoints],o));return o.stroke!==lh&&a.push(l.opset),this._d("ellipse",a,o)}circle(t,e,n,i){const r=this.ellipse(t,e,n,n,i);return r.shape="circle",r}linearPath(t,e){const n=this._o(e);return this._d("linearPath",[Tl(t,!1,n)],n)}arc(t,e,n,i,r,o,a=!1,s){const l=this._o(s),h=[],c=Wl(t,e,n,i,r,o,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=Wl(t,e,n,i,r,o,!0,!1,a);s.type="fillPath",h.push(s)}else h.push(function(t,e,n,i,r,o,a){const s=t,l=e;let h=Math.abs(n/2),c=Math.abs(i/2);h+=ql(.01*h,a),c+=ql(.01*c,a);let d=r,u=o;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const f=(u-d)/a.curveStepCount,p=[];for(let t=d;t<=u;t+=f)p.push([s+h*Math.cos(t),l+c*Math.sin(t)]);return p.push([s+h*Math.cos(u),l+c*Math.sin(u)]),p.push([s,l]),Rl([p],a)}(t,e,n,i,r,o,l));return l.stroke!==lh&&h.push(c),this._d("arc",h,l)}curve(t,e){const n=this._o(e),i=[],r=Il(t,n);if(n.fill&&n.fill!==lh)if("solid"===n.fillStyle){const e=Il(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],r=t;if(r.length){const t="number"==typeof r[0][0]?[r]:r;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...sh(th([i[0],i[0],i[1],i[2]]),10,(1+n.roughness)/2)):e.push(...sh(th(i),10,(1+n.roughness)/2))}e.length&&i.push(Rl([e],n))}return n.stroke!==lh&&i.push(r),this._d("curve",i,n)}polygon(t,e){const n=this._o(e),i=[],r=Tl(t,!0,n);return n.fill&&("solid"===n.fillStyle?i.push(Dl([t],n)):i.push(Rl([t],n))),n.stroke!==lh&&i.push(r),this._d("polygon",i,n)}path(t,e){const n=this._o(e),i=[];if(!t)return this._d("path",i,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const r=n.fill&&"transparent"!==n.fill&&n.fill!==lh,o=n.stroke!==lh,a=!!(n.simplification&&n.simplification<1),s=function(t,e,n){const i=Al(zl(Sl(t))),r=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...sh(s,1)),s=[]},h=()=>{l(),o.length&&(r.push(o),o=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),a=[e[0],e[1]],o.push(a);break;case"L":l(),o.push([e[0],e[1]]);break;case"C":if(!s.length){const t=o.length?o[o.length-1]:a;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),o.push([a[0],a[1]])}if(h(),!n)return r;const c=[];for(const t of r){const e=oh(t,n);e.length&&c.push(e)}return c}(t,0,a?4-4*(n.simplification||1):(1+n.roughness)/2),l=Nl(t,n);if(r)if("solid"===n.fillStyle)if(1===s.length){const e=Nl(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(Dl(s,n));else i.push(Rl(s,n));return o&&(a?s.forEach(t=>{i.push(Tl(t,!1,n))}):i.push(l)),this._d("path",i,n)}opsToPath(t,e){let n="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":n+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":n+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":n+=`L${t[0]} ${t[1]} `}}return n.trim()}toPaths(t){const e=t.sets||[],n=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:lh};break;case"fillPath":e={d:this.opsToPath(t),stroke:lh,strokeWidth:0,fill:n.fill||lh};break;case"fillSketch":e=this.fillSketch(t,n)}e&&i.push(e)}return i}fillSketch(t,e){let n=e.fillWeight;return n<0&&(n=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||lh,strokeWidth:n,fill:lh}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}const ch="http://www.w3.org/2000/svg";class dh{constructor(t,e){this.svg=t,this.gen=new hh(e)}draw(t){const e=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,r=i.createElementNS(ch,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of e){let e=null;switch(a.type){case"path":e=i.createElementNS(ch,"path"),e.setAttribute("d",this.opsToPath(a,o)),e.setAttribute("stroke",n.stroke),e.setAttribute("stroke-width",n.strokeWidth+""),e.setAttribute("fill","none"),n.strokeLineDash&&e.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(ch,"path"),e.setAttribute("d",this.opsToPath(a,o)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",n.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,a,n)}e&&r.appendChild(e)}return r}fillSketch(t,e,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);const r=t.createElementNS(ch,"path");return r.setAttribute("d",this.opsToPath(e,n.fixedDecimalPlaceDigits)),r.setAttribute("stroke",n.fill||""),r.setAttribute("stroke-width",i+""),r.setAttribute("fill","none"),n.fillLineDash&&r.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&r.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),r}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,n,i,r){const o=this.gen.line(t,e,n,i,r);return this.draw(o)}rectangle(t,e,n,i,r){const o=this.gen.rectangle(t,e,n,i,r);return this.draw(o)}ellipse(t,e,n,i,r){const o=this.gen.ellipse(t,e,n,i,r);return this.draw(o)}circle(t,e,n,i){const r=this.gen.circle(t,e,n,i);return this.draw(r)}linearPath(t,e){const n=this.gen.linearPath(t,e);return this.draw(n)}polygon(t,e){const n=this.gen.polygon(t,e);return this.draw(n)}arc(t,e,n,i,r,o,a=!1,s){const l=this.gen.arc(t,e,n,i,r,o,a,s);return this.draw(l)}curve(t,e){const n=this.gen.curve(t,e);return this.draw(n)}path(t,e){const n=this.gen.path(t,e);return this.draw(n)}}function uh(t,e,n){if(!t||!e)return void console.warn("Invalid node or svg element");const i=((t,e)=>new dh(t,e))(e,{options:{seed:1e3}}),r=Xo("g");t.hasAttribute("transform")&&r.setAttribute("transform",t.getAttribute("transform")||"");const o=t.cloneNode();Zo(o,{opacity:.5}),o.hasAttribute("transform")&&o.removeAttribute("transform"),o.dataset.elementType="rough-volume",r.appendChild(o);const a=function(t,e,n){const i=e.nodeName.toLowerCase(),r=(t,e)=>{const i=Ko(t,[...e,"fill","fill-opacity","stroke","stroke-opacity","stroke-width","stroke-dasharray","stroke-linecap","stroke-linejoin","opacity","filter","clip-path","mask"],!0),r={},o={...n},a={};e.forEach(t=>{void 0!==i[t]&&(r[t]=i[t])});const{fill:s,"fill-opacity":l,stroke:h,"stroke-opacity":c,"stroke-width":d,"stroke-dasharray":u,"stroke-linecap":f,"stroke-linejoin":p,opacity:g,filter:m,"clip-path":y,mask:x}=i;if(o.fill=s||"none",o.stroke=h||(s&&"none"!==s?s:"currentColor"),d&&(o.strokeWidth=parseFloat(d)),u&&"none"!==u){const t=u.split(/[\s,]+/).map(t=>parseFloat(t)).filter(t=>!isNaN(t));t.length>0&&(o.strokeLineDash=t)}return l&&(a.fillOpacity=parseFloat(l)),c&&(a.strokeOpacity=parseFloat(c)),g&&(a.opacity=parseFloat(g)),f&&(a.strokeLinecap=f),p&&(a.strokeLinejoin=p),u&&"none"!==u&&(a.strokeDasharray=u),m&&(a.filter=m),y&&(a.clipPath=y),x&&(a.mask=x),[r,o,a]};try{let n=null,o={};switch(i){case"circle":{const[i,a,s]=r(e,["cx","cy","r"]),l=parseFloat(i.cx)||0,h=parseFloat(i.cy)||0,c=parseFloat(i.r)||0;n=t.circle(l,h,2*c,a),o=s;break}case"ellipse":{const[i,a,s]=r(e,["cx","cy","rx","ry"]),l=parseFloat(i.cx)||0,h=parseFloat(i.cy)||0,c=parseFloat(i.rx)||0,d=parseFloat(i.ry)||0;n=t.ellipse(l,h,2*c,2*d,a),o=s;break}case"line":{const[i,a,s]=r(e,["x1","y1","x2","y2"]),l=parseFloat(i.x1)||0,h=parseFloat(i.y1)||0,c=parseFloat(i.x2)||0,d=parseFloat(i.y2)||0;n=t.line(l,h,c,d,a),o=s;break}case"rect":{const[i,a,s]=r(e,["x","y","width","height","rx","ry"]),l=parseFloat(i.x)||0,h=parseFloat(i.y)||0,c=parseFloat(i.width)||0,d=parseFloat(i.height)||0,u=parseFloat(i.rx)||0,f=parseFloat(i.ry)||0;if(u>0||f>0){const e=function(t,e,n,i,r,o){return`\n M ${t+(r=Math.min(r,n/2))} ${e}\n L ${t+n-r} ${e}\n A ${r} ${o=Math.min(o,i/2)} 0 0 1 ${t+n} ${e+o}\n L ${t+n} ${e+i-o}\n A ${r} ${o} 0 0 1 ${t+n-r} ${e+i}\n L ${t+r} ${e+i}\n A ${r} ${o} 0 0 1 ${t} ${e+i-o}\n L ${t} ${e+o}\n A ${r} ${o} 0 0 1 ${t+r} ${e}\n Z\n `.replace(/\s+/g," ").trim()}(l,h,c,d,u||f,f||u);n=t.path(e,a)}else n=t.rectangle(l,h,c,d,a);o=s;break}case"path":{const[i,a,s]=r(e,["d"]),l=i.d||"";if(!l)return console.warn("Path element has no d attribute"),null;n=t.path(l,a),o=s;break}case"polygon":{const[i,a,s]=r(e,["points"]),l=fh(i.points||"");if(l.length<3)return console.warn("Polygon needs at least 3 points"),null;n=t.polygon(l,a),o=s;break}case"polyline":{const[i,a,s]=r(e,["points"]),l=fh(i.points||"");if(l.length<2)return console.warn("Polyline needs at least 2 points"),null;n=t.linearPath(l,a),o=s;break}default:return console.warn(`Unsupported shape type: ${i}`),null}return n?{element:n,svgAttributes:o}:null}catch(t){return console.error(`Error creating rough shape for ${i}:`,t),null}}(i,t,n);if(a){const{element:t,svgAttributes:e}=a;t.dataset.elementType="rough-element",t.style.pointerEvents="none",function(t,e){void 0!==e.opacity&&t.setAttribute("opacity",String(e.opacity)),void 0!==e.fillOpacity&&t.setAttribute("fill-opacity",String(e.fillOpacity)),void 0!==e.strokeOpacity&&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)}(t,e),r.appendChild(t)}t.id&&(r.id=t.id),Array.from(t.classList).forEach(t=>{r.classList.contains(t)||r.classList.add(t)}),Array.from(t.attributes).forEach(t=>{t.name.startsWith("data-")&&r.setAttribute(t.name,t.value)}),r.childElementCount>0?t.replaceWith(r):t.remove()}function fh(t){if(!t||"string"!=typeof t)return[];try{const e=t.trim().replace(/,/g," ").replace(/\s+/g," ").split(" ").filter(Boolean),n=[];for(let t=0;t<e.length-1;t+=2){const i=parseFloat(e[t]),r=parseFloat(e[t+1]);isNaN(i)||isNaN(r)?console.warn(`Invalid coordinate pair at index ${t}: "${e[t]}", "${e[t+1]}"`):n.push([i,r])}return e.length%2!=0&&console.warn(`Odd number of coordinates in points attribute, last value ignored: "${e[e.length-1]}"`),n}catch(e){return console.error("Failed to parse polygon points:",t,e),[]}}function ph(t,e,n){const{themeConfig:i}=n;return Zo(e,ds(e,Object.assign({},i.base?.shape,i.shape))),function(t,e,n){const i=n.themeConfig.stylize;if(!i)return t;const{type:r}=i;if(!r)return t;if("rough"===r)return uh(t,e,i);if("pattern"===r)return function(t,e,n){const i=n.themeConfig.stylize;if(!i||"pattern"!==i.type)return;const{pattern:r,...o}=i,a=cl.get(r);if(!a)return console.warn(`Pattern ${r} not found`);const{fill:s}=Ko(t,["fill","stroke"]),l=s,h={backgroundColor:l?ks(l).setAlpha(.5).toRgbString():l,foregroundColor:l,...o},c=function(t){const{pattern:e,foregroundColor:n="unset",backgroundColor:i="unset",scale:r="unset"}=t;return el(`pattern-${e}-${n}-${i}-${r}`)}({...i,...h});!function(t,e,n){const i=Jo(t);n.setAttribute("id",e);const r=i.querySelector(`pattern#${e}`);r?r.replaceWith(n):i.appendChild(n)}(e,c,a(h)),Ti(s)&&(t.setAttribute("fill",`url(#${c})`),!t.getAttribute("stroke")&&s&&t.setAttribute("stroke",s))}(t,e,n);if("linear-gradient"===r||"radial-gradient"===r){const{fill:n,stroke:r}=Ko(t,["fill","stroke"]);Ti(n)&&nl(t,e,i,"fill"),Ti(r)&&nl(t,e,i,"stroke")}}(e,t,n),e}var gh=Wo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()});const mh=gh;function yh(t,e,n={}){if(!e)return null;const i=t;Zo(i,ds(i,n));const r=function(t,e){const n=xh(e.dataset.x,0),i=xh(e.dataset.y,0),r=xh(e.getAttribute("width")),o=xh(e.getAttribute("height")),a=function(t){return Ko(t,["font-family","font-size","font-weight","font-style","font-variant","letter-spacing","line-height","fill","stroke","stroke-width"])}(e);return Object.assign(a,{x:n,y:i,width:r,height:o,"data-horizontal-align":e.dataset.horizontalAlign||"LEFT","data-vertical-align":e.dataset.verticalAlign||"TOP"}),function(t,e){const n=document.createElement("span"),i=Xo("foreignObject",{overflow:"visible"});return i.appendChild(n),ea(i,{textContent:t,attributes:e}),i}(t,a)}(e,i);for(const t in i.dataset)r.setAttribute(`data-${mh(t)}`,i.dataset[t]);return r}const xh=(t,e)=>t?parseFloat(t):e,vh=(t,e)=>{t!==e&&(e?t.replaceWith(e):t.remove())};class bh{constructor(t,e){this.options=t,this.template=e,this.rendered=!1}getOptions(){return this.options}getSVG(){return this.template}render(){const t=this.getSVG();if(this.rendered)return t;!function(t,e){(function(t,e){const{themeConfig:n,data:i}=e;!function(t,e){e&&Object.keys(e).length>0&&Qo(t,t=>{Zo(t,ds(t,e))})}(t,n.base?.global);t.querySelectorAll("[data-element-type]").forEach(r=>{const o=r.id||"";if((t=>oa(t,"title"))(r)){const t=yh(r,i.title||"",Object.assign({},n.base?.text,n.title));return vh(r,t)}if((t=>oa(t,"desc"))(r)){const t=yh(r,i.desc||"",Object.assign({},n.base?.text,n.desc));return vh(r,t)}if((t=>oa(t,"illus"))(r)){const e=xs(t,r,i.illus?.[o]);return vh(r,e)}if((t=>oa(t,"shapes-group"))(r))return Array.from(r.children).forEach(n=>{ph(t,n,e)});if((t=>oa(t,"shape"))(r)){const n=ph(t,r,e);return vh(r,n)}if((t=>oa(t,"btns-group"))(r))return function(t,e){Zo(e,{display:"none"});const n=e.querySelectorAll('[id^="btn-add-"]'),i=e.querySelectorAll('[id^="btn-remove-"]');!function(t){const e=Xo("defs");ga(e,ps);const n=Uo('<symbol class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">\n <path\n 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"\n fill="#339900"></path>\n</symbol>');n&&(n.setAttribute("id",us),e.appendChild(n));const i=Uo('<symbol viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">\n <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>\n <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>\n</symbol>');i&&(i.setAttribute("id",fs),e.appendChild(i)),t.prepend(e)}(t),n.forEach(ms),i.forEach(ys)}(t,r);if(r.dataset.elementType?.startsWith("item-")){const n=qa(r.dataset.indexes||"0"),o=r.dataset.elementType.replace("item-",""),a=Rr(i,n);if((t=>oa(t,"item-label"))(r)||(t=>oa(t,"item-desc"))(r)||(t=>oa(t,"item-value"))(r)){const t=function(t,e,n){const i="text"===e.nodeName?e:null;if(!i)return null;const{data:r,themeConfig:o}=n,a=qa(e.dataset.indexes||"0"),s=String(Dr(Rr(r,a),t,"")),l=ds(i,Object.assign({},o.base?.text,o.item?.[t]));return yh(e,e.textContent||s,l)}(o,r,e);return vh(r,t)}if(!a)return;if((t=>oa(t,"item-illus"))(r)){const e=function(t,e,n){return xs(t,e,n.illus,n)}(t,r,a);return vh(r,e)}if(aa(r)){const n=function(t,e,n,i){const r=n.icon;if(!r)return null;const{themeConfig:o}=i;return function(t,e,n,i,r){return Na(t,"icon",n,r),function(t,e={}){const n=Xo("use",{...e,href:ja(t)});return Fa(n),Ra.set(n,t),n}(n,{...Ko(e,["id","x","y","width","height","fill","stroke","data-element-type","data-indexes"]),...i})}(t,e,r,ds(e,{...o.item?.icon}),n)}(t,r,a,e);return vh(r,n)}}return(t=>t instanceof SVGElement&&"text"===t.tagName)(r)?function(t,e){const n=e.themeConfig.base?.text||{};Zo(t,n),n["font-family"]&&t.setAttribute("font-family",qo(n["font-family"])),t.style.userSelect="none",t.style.pointerEvents="none"}(r,e):(t=>t instanceof SVGElement&&"g"===t.tagName)(r)?void 0:function(t,e){Zo(t,e.themeConfig.base?.shape||{})}(r,e)}),function(t,e){const{themeConfig:n}=e,{"font-family":i=Ja}=n.base?.text||{};t.setAttribute("font-family",i)}(t,e)})(t,e),function(t,e){const{width:n,height:i}=e,{style:r={},attributes:o={},id:a,className:s}=e.svg||{};a&&(t.id=a),s&&t.classList.add(s),void 0!==n&&t.setAttribute("width","number"==typeof n?`${n}px`:n),void 0!==i&&t.setAttribute("height","number"==typeof i?`${i}px`:i),Object.assign(t.style,r),Zo(t,o)}(t,e),function(t,e){if(!1===e.svg?.background)return;const{themeConfig:{colorBg:n}}=e;if(!n)return;const i=t.parentElement;i&&(i.style.backgroundColor=n||"none");const r=ma(t,"background");if(t.style.backgroundColor=n,r)r.setAttribute("fill",n);else if(t.viewBox?.baseVal){const{x:e,y:i,width:r,height:o}=t.viewBox.baseVal,a=Xo("rect",{x:e,y:i,width:r,height:o,fill:n,"data-element-type":"background"});t.prepend(a)}}(t,e)}(t,this.options),t.style.visibility="hidden";const e=()=>{!function(t,e){const{padding:n=0,viewBox:i}=e;i?t.setAttribute("viewBox",i):void 0!==n&&zh(t,Sh(n))}(this.template,this.options),function(t){es().forEach(e=>function(t,e){const n=t.ownerDocument,i=n?.head||document.head;if(!i)return;is.has(i)||is.set(i,new Map);const r=is.get(i),o=ns(e);if(!o.length)return;const a=[];o.forEach(o=>{const s=`${e}-${o}`,l=`font:${s}`;if(_a(t,l))return;let h=r.get(s);h||(h=n.createElement("link"),h.id=s,h.rel="stylesheet",h.href=o,a.push(h),r.set(s,h));const c=function(t,e,n){const i=rs.get(t)?.get(e);return i||(!n||function(t){if("true"===t.getAttribute("data-infographic-font-loaded"))return!0;try{return!!t.sheet}catch{return!1}}(n)?os(t,e,Promise.resolve()):os(t,e,new Promise(t=>{const e=()=>{n.setAttribute("data-infographic-font-loaded","true"),t()};n.addEventListener("load",e,{once:!0}),n.addEventListener("error",e,{once:!0})})))}(i,s,h);Sa(t,l,c)}),a.length&&"HEAD"===i.tagName&&a.forEach(t=>i.appendChild(t))}(t,e.fontFamily))}(this.template),t.style.visibility=""},n=new MutationObserver(i=>{i.forEach(i=>{i.addedNodes.forEach(i=>{(i===t||i.contains(t))&&(e(),n.disconnect())})})});try{n.observe(document,{childList:!0,subtree:!0})}catch(t){e(),console.error(t)}return this.rendered=!0,t}}let wh;const Mh=!("undefined"==typeof process||!process.versions||!process.versions.node);Mh&&function(t){const e=t.fontFamily,n=Ua(t.fontWeight),i=Za(t.fontStyle);if(t.glyphsByWidth){const e={...t.glyphs||{}};for(const[n,i]of Object.entries(t.glyphsByWidth))if("string"==typeof i){const t=Number(n);for(const n of i)e[n]=t}else e[n]=i;t={...t,glyphs:e,glyphsByWidth:void 0}}Ya.has(e)||Ya.set(e,new Map);const r=Ya.get(e);r.has(n)||r.set(n,new Map),r.get(n).set(i,t)}({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}});let kh=null,$h=null;function Ch(t="",e){if(e.width&&e.height)return{width:e.width,height:e.height};const{fontFamily:n=Ja,fontSize:i=14,fontWeight:r="normal",lineHeight:o=1.4}=e,a=t.toString(),s={fontFamily:n,fontSize:parseFloat(i.toString()),fontWeight:r,lineHeight:o},l=()=>function(t,e={}){const n=function(t,e){if(!e||"none"===e)return t;switch(e){case"uppercase":return t.toUpperCase();case"lowercase":return t.toLowerCase();case"capitalize":return t.split(" ").map(t=>0===t.length?t:t[0].toUpperCase()+t.slice(1).toLowerCase()).join(" ");default:return t}}(t,e.textTransform),i=function(t,e,n){const i=t||"sans-serif",r=Ua(e),o=Za(n),a=Ya.get(i);if(!a)return console.warn(`Font family "${i}" not registered, using fallback font data`),Xa;let s=a.get(r);if(s){let t=s.get(o);if(t)return t;if("normal"!==o&&(t=s.get("normal"),t))return t;const e=s.values().next().value;if(e)return e}if(s=a.get("400"),s){let t=s.get(o);if(t)return t;if("normal"!==o&&(t=s.get("normal"),t))return t;const e=s.values().next().value;if(e)return e}const l=a.values().next().value;if(l){const t=l.values().next().value;if(t)return t}throw new Error(`No font data found for family "${i}" with weight "${r}" and style "${o}"`)}(e.fontFamily,e.fontWeight,e.fontStyle),r=Ka(e.fontSize),o=e.letterSpacing||0,a=e.wordSpacing||0;let s=0;const l=Array.from(n);for(let t=0;t<l.length;t++){const e=l[t],n=t<l.length-1?l[t+1]:void 0;let h=i.glyphs?.[e];if(void 0===h&&(h=i.defaultWidth||i.unitsPerEm/2),s+=h/i.unitsPerEm*r,n&&i.kerning){const t=e+n,o=i.kerning[t];void 0!==o&&(s+=o/i.unitsPerEm*r)}t<l.length-1&&(s+=o)," "===e&&(s+=a)}const h=function(t,e){const n=Ka(t.fontSize),i=t.lineHeight;if(void 0===i){const{ascender:t,descender:i,lineGap:r=0}=e.metrics;return(t-i+r)/e.unitsPerEm*n}return"number"==typeof i?i*n:"pixel"===i.type?i.value:"percent"===i.type?i.value/100*n:n}(e,i),{ascender:c}=i.metrics;return{width:s,height:h,baseline:c/i.unitsPerEm*r}}(a,s),h=function(){if(void 0!==wh)return wh;if("undefined"==typeof window||"undefined"==typeof document)return wh=!1,!1;const t=document.body;if(!t)return wh=!1,!1;let e=!1;try{const n=document.createElement("div");n.style.cssText="\n position: absolute;\n left: 11px;\n top: 13px;\n width: 37px;\n height: 19px;\n padding: 0;\n margin: 0;\n border: 0;\n visibility: hidden;\n ",t.appendChild(n),n.offsetHeight;const i=n.getBoundingClientRect();t.removeChild(n),e=37===i.width&&19===i.height&&0!==i.left&&0!==i.top}catch{e=!1}if(!e)return wh=!1,!1;let n=!1;try{const t=document.createElement("canvas");t.width=100,t.height=50;const e=t.getContext("2d");if(!e)return wh=!1,!1;e.font="20px sans-serif";const i=e.measureText("Hello");n="number"==typeof i.width&&i.width>0&&i.width<1e3}catch{n=!1}return wh=n,n}()?function(t,{fontFamily:e,fontSize:n,fontWeight:i,lineHeight:r}){const o=t.split(/\r?\n/),a=qo(e),s=i||"normal",l=function(t,e){if(null==e)return 1.4*t;if("string"==typeof e){const n=e.trim();if(n.endsWith("px")){const e=Number.parseFloat(n);return Number.isFinite(e)?e:1.4*t}e=Number(n)}return"number"==typeof e&&Number.isFinite(e)?e>4?e:e*t:1.4*t}(n,r),h=function(){if(kh)return kh;const t=document.createElement("canvas");return kh=t.getContext("2d"),kh}();if(h){h.font=`${s} ${n}px ${a}`;const t=o.reduce((t,e)=>{const n=h.measureText(e);return Math.max(t,n.width)},0);return{width:t,height:l*Math.max(o.length,1)}}const c=document.body?$h||($h=document.createElement("span"),$h.style.position="absolute",$h.style.top="-10000px",$h.style.left="-10000px",$h.style.visibility="hidden",$h.style.pointerEvents="none",$h.style.whiteSpace="pre",$h.style.display="inline-block",$h.style.padding="0",$h.style.margin="0",document.body.appendChild($h),$h):null;if(!c)return null;c.style.fontFamily=a,c.style.fontSize=`${n}px`,c.style.fontWeight=String(s),c.style.lineHeight=`${l}px`,c.textContent=t;const d=c.getBoundingClientRect();return{width:d.width,height:d.height}}(a,s)??l():l();return{width:Math.ceil(1.01*h.width),height:Math.ceil(1.01*h.height)}}function _h(t){const e=t.getAttribute("viewBox");if(e){const[t,n,i,r]=e.split(" ").map(Number);return{x:t,y:n,width:i,height:r}}const n=t.getAttribute("width"),i=t.getAttribute("height");return{x:0,y:0,width:Number(n)||0,height:Number(i)||0}}function Sh(t){return t?"number"==typeof t?[t,t,t,t]:1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:4===t.length?[t[0],t[1],t[2],t[3]]:[0,0,0,0]:[0,0,0,0]}function zh(t,e){if(Mh)Ah(t,e);else if(document.contains(t))Eh(t,e);else try{const n=new MutationObserver(i=>{i.forEach(i=>{i.addedNodes.forEach(i=>{var r,o;(i===t||i.contains(t))&&(r=t,o=()=>{Eh(t,e)},requestAnimationFrame(()=>{const t=()=>{const e=r.getBoundingClientRect();e.width>0&&e.height>0?o():requestAnimationFrame(t)};t()}),n.disconnect())})})});n.observe(document,{childList:!0,subtree:!0})}catch{Ah(t,e)}}function Ah(t,e){const n=_h(t),[i,r,o,a]=e;Zo(t,{viewBox:`${n.x-a} ${n.y-i} ${n.width+a+r} ${n.height+i+o}`})}function Eh(t,e){const n=t.getBBox(),i=t.getBoundingClientRect(),r=i.width>0?n.width/i.width:1,o=i.height>0?n.height/i.height:1,[a,s,l,h]=e,c=a*o,d=s*r,u=l*o,f=h*r;Zo(t,{viewBox:`${n.x-f} ${n.y-c} ${n.width+f+d} ${n.height+c+u}`})}function Lh(t,e){if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent=e,document.head.appendChild(n)}function Ph(t){const{id:e,x:n=0,y:i=0,width:r,height:o,alignHorizontal:a="left",alignVertical:s="top",children:l,fontSize:h=14,fontFamily:c,fontStyle:d,fontWeight:u,textDecoration:f,letterSpacing:p,wordSpacing:g,opacity:m,fill:y="black",lineHeight:x,wordWrap:v,backgroundColor:b="none",backgroundOpacity:w=1,backgroundRadius:M=0,...k}=t;let $=r,C=o,_=0,S=0;if(!$||!C){const e=Ch(l,t);$||($=e.width),C||(C=e.height)}r&&(_="center"===a?$/2:"right"===a?$:0),o&&(S="middle"===s?C/2:"bottom"===s?C:0);const z=Object.entries({width:$,height:C,...void 0!==x&&{"line-height":x},...void 0!==v&&{"data-word-wrap":v}}).reduce((t,[e,n])=>({...t,[e]:n}),{}),A=b&&"none"!==b?{"data-element-type":"shape",x:0,y:0,width:$,height:C,fill:b,fillOpacity:w,rx:M,ry:M}:void 0;return{type:"g",props:{...{...0!==n||0!==i?{x:n,y:i,transform:`translate(${n}, ${i})`}:{},width:$,height:C,...e&&{id:e}},children:[...A?[{type:"rect",props:A}]:[],{type:"text",props:{"data-element-type":"text",width:$,height:C,x:_,y:S,"data-x":0,"data-y":0,fill:y,fontSize:h,textAnchor:"center"===a?"middle":"right"===a?"end":"start",dominantBaseline:"middle"===s?"central":"bottom"===s?"baseline":"hanging","data-horizontal-align":a.toUpperCase(),"data-vertical-align":s.toUpperCase(),children:l,...z,...k,...c&&{fontFamily:c},...d&&{fontStyle:d},...u&&{fontWeight:u},...f&&"none"!==f&&{textDecoration:f},...p&&{letterSpacing:p},...g&&{wordSpacing:g},...void 0!==m&&1!==m&&{opacity:m}}}]}}}function Hh(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&"type"in t}function Th(t){return Ih(t).filter(Hh)}function Ih(t,e=[]){if(!t||"boolean"==typeof t)return e;if(Array.isArray(t))t.forEach(t=>Ih(t,e));else if(function(t){return!(!t||"object"!=typeof t||Array.isArray(t))&&t.type===$}(t)){const n=t.props?.children;(Array.isArray(n)?n:[n]).filter(Boolean).forEach(t=>{Ih(t,e)})}else e.push(t);return e}function jh(t){return"number"==typeof t&&!Number.isNaN(t)&&Number.isFinite(t)}function Oh(t){if(!t||0===t.length)return{x:0,y:0,width:0,height:0};let e=1/0,n=1/0,i=-1/0,r=-1/0;for(const o of t){const{x:t,y:a,width:s,height:l}=o,h=t+s,c=a+l;t<e&&(e=t),a<n&&(n=a),h>i&&(i=h),c>r&&(r=c)}return e===1/0||n===1/0||i===-1/0||r===-1/0?{x:0,y:0,width:0,height:0}:{x:e,y:n,width:Math.max(0,i-e),height:Math.max(0,r-n)}}function Wh(t){if(!t)return{x:0,y:0,width:0,height:0};if(Array.isArray(t))return Nh(Th(t));if("object"!=typeof t)return{x:0,y:0,width:0,height:0};const{type:e,props:n={}}=t;if(Xh(t))return Wh(Uh(t));if("function"==typeof e){const t=n.x??0,i=n.y??0,r=n.width,o=n.height;if(jh(r)&&jh(o))return{x:t,y:i,width:r,height:o};const a=e(n);if(!a)return{x:t,y:i,width:r??0,height:o??0};if(Array.isArray(a)){const e=Nh(Th(a));if(jh(r)&&jh(o))return{x:t,y:i,width:r,height:o};const n=0!==e.width?e.width:r??0,s=0!==e.height?e.height:o??0;return{x:t+e.x,y:i+e.y,width:n,height:s}}if(Hh(a)){const e=a,s=Wh(e);if(function(t,e){if(!t?.props||!e)return!1;const n=t.props;if(jh(n.x)&&jh(n.y)&&jh(e.x)&&jh(e.y)&&n.x===e.x&&n.y===e.y){const t=jh(n.width)&&jh(n.height),i=jh(e.width)&&jh(e.height);if(!t&&!i)return!0}return!!(jh(n.x)&&jh(n.y)&&jh(n.width)&&jh(n.height)&&jh(e.x)&&jh(e.y)&&jh(e.width)&&jh(e.height))&&(n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height)}(e,n))return s;const l=e.props&&jh(e.props.width)&&jh(e.props.height),h=Dh(e).flatMap(t=>Th(t)).length>0,c=e.props&&e.props.x===n.x&&e.props.y===n.y;if(l)return{x:c?s.x:t+s.x,y:c?s.y:i+s.y,width:s.width,height:s.height};if(jh(r)&&jh(o))return h?{x:c?s.x:t,y:c?s.y:i,width:r,height:o}:{x:c?s.x:t+s.x,y:c?s.y:i+s.y,width:r,height:o};const d=0!==s.width?s.width:r??0,u=0!==s.height?s.height:o??0;return{x:c?s.x:t+s.x,y:c?s.y:i+s.y,width:d,height:u}}return{x:t,y:i,width:r??0,height:o??0}}const i=n.x??0,r=n.y??0,o=jh(n.width)?n.width:void 0,a=jh(n.height)?n.height:void 0;if(jh(o)&&jh(a))return{x:i,y:r,width:o,height:a};const s=Dh(t).flatMap(t=>Th(t));if(s.length>0){const t=Nh(s);return{x:i+t.x,y:r+t.y,width:jh(o)?o:t.width,height:jh(a)?a:t.height}}return{x:i,y:r,width:o??0,height:a??0}}function Nh(t){if(!t||!Array.isArray(t)||0===t.length)return{x:0,y:0,width:0,height:0};const e=[];for(const n of t){const t=Th(n);for(const n of t){const t=Wh(n);t&&e.push(t)}}return Oh(e)}function Dh(t){const e=t.props?.children;return e?Array.isArray(e)?e:[e]:[]}function Rh(t){return null==t||"boolean"==typeof t?[]:Array.isArray(t)?Ih(t):"object"==typeof t?Ih(t.props?.children):[t]}const Fh=(t,e)=>{const{type:n,props:i,...r}=t;return{type:n,props:{...i,...e},...r}},Vh=()=>({defs:new Map});function Bh(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(t).replace(/[&<>"']/g,t=>e[t])}const qh={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"},Gh=new Map;function Yh(t){const e=Symbol("layout");return Gh.set(e,t),t=>({type:e,props:t})}function Xh(t){return null!=t&&"object"==typeof t&&!Array.isArray(t)&&"symbol"==typeof t.type&&Gh.has(t.type)}function Uh(t,e=Vh()){const n=Gh.get(t.type);return n?n(Rh(t).filter(t=>"object"==typeof t),t.props,e):(console.warn("Layout function not found for symbol:",t.type),t)}function Zh(t,e){if(null==t||"boolean"==typeof t)return null;if("string"==typeof t||"number"==typeof t)return t;if(Array.isArray(t))return t.map(t=>Zh(t,e)).filter(Boolean);if(Xh(t))return Zh(Uh(t,e),e);if("function"==typeof t.type)return Zh(t.type(t.props),e);const n=Rh(t).map(t=>Zh(t,e)).filter(Boolean);return t.type===$?n:t.type===S?(n.forEach(t=>{"object"==typeof t&&t.props.id&&e.defs.set(t.props.id,t)}),null):n.length?Fh(t,{children:n}):t}function Kh(t,e){if(null==t)return"";if("string"==typeof t)return Bh(t);if("number"==typeof t)return String(t);const{type:n,props:i}=t;if(!n)return"";const r=Rh(t);if(n===$)return r.map(t=>Kh(t,e)).filter(Boolean).join("");if(n===S)return"";if("function"==typeof n||Xh(t))return console.warn("Unexpected unprocessed component in render:",t),"";const o=Jh(i),a=r.map(t=>Kh(t,e)).filter(Boolean).join(""),s=String(n);return a?`<${s}${o}>${a}</${s}>`:`<${s}${o} />`}function Qh(t,e={}){const n=Vh(),i=Zh(t,n);if(!i)return"";const r=Array.isArray(i)?i.map(t=>Kh(t,n)).join(""):Kh(i,n),{x:o,y:a,width:s,height:l,style:h,...c}=e,d={...c,xmlns:"http://www.w3.org/2000/svg"};if(!d.viewBox)if(s&&l)d.viewBox=`${o??0} ${a??0} ${s??0} ${l??0}`;else{const t=Wh(i);if(t){const{x:e,y:n,width:i,height:r}=t;d.viewBox=`${e} ${n} ${i} ${r}`}}const u=Jh(d),f=function(t){if(!t||0===Object.keys(t).length)return"";const e=Object.entries(t).map(([t,e])=>`${t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}: ${e};`).join("");return` style="${Bh(e)}"`}(h);return`<svg${u}${f}>${n.defs.size?`<defs>${Array.from(n.defs.values()).map(t=>Kh(t,n)).join("")}</defs>`:""}${r}</svg>`}function Jh(t){if(!t)return"";const{children:e,...n}=t;return Object.entries(n).filter(([,t])=>null!=t).map(([t,e])=>{var n;return` ${qh[n=t]?qh[n]:n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}="${"string"==typeof e?Bh(String(e)):String(e)}"`}).join("")}const tc=t=>{const{indexes:e,...n}=t;return C(H,{fill:"#B9EBCA",fillOpacity:.3,width:20,height:20,"data-indexes":e,"data-element-type":"btn-add",...n})},ec=t=>{const{indexes:e,...n}=t;return C(H,{fill:"#F9C0C0",fillOpacity:.3,width:20,height:20,"data-indexes":e,"data-element-type":"btn-remove",...n})},nc=t=>C(E,{"data-element-type":"btns-group",width:0,height:0,...t,display:"none"}),ic=()=>C($,{}),rc=({indexes:t,...e})=>{const n={fill:"lightgray",...e};return t?(n["data-indexes"]=t,n["data-element-type"]="item-illus"):n["data-element-type"]="illus",C(H,{...n})},oc=({indexes:t,lineNumber:e=2,children:n,...i})=>{if(!n)return null;const r={fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:n,...i};return r.height??(r.height=Math.ceil(e*+r.lineHeight*+r.fontSize)),C(Ph,{...r,"data-indexes":t,"data-element-type":"item-desc"})},ac=t=>{const{indexes:e,size:n=32,...i}=t;return C(H,{...{fill:"lightgray",width:n,height:n,...i},"data-indexes":e,"data-element-type":"item-icon"})},sc=t=>{const{indexes:e,size:n=50,fill:i,colorBg:r="white",...o}=t,a=n/Math.SQRT2*.9,s=(n-a)/2,l={fill:r,...o,x:s,y:s,width:a,height:a};return _(E,{...o,width:n,height:n,"data-element-type":"item-icon-group",children:[C(A,{width:n,height:n,fill:i,"data-element-type":"shape"}),C(H,{...l,"data-indexes":e,"data-element-type":"item-icon"})]})},lc=({indexes:t,children:e,...n})=>{const i={fontSize:18,fontWeight:"bold",fill:"#252525",lineHeight:1.4,children:e,...n};return i.height??(i.height=Math.ceil(+i.lineHeight*+i.fontSize)),C(Ph,{...i,"data-indexes":t,"data-element-type":"item-label"})},hc=t=>C(E,{"data-element-type":"items-group",...t}),cc=({indexes:t,value:e,formatter:n=t=>String(t),...i})=>{const r={fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:n(e),"data-value":e,...i};return r.height??(r.height=Math.ceil(+r.lineHeight*+r.fontSize)),C(Ph,{...r,"data-indexes":t,"data-element-type":"item-value"})},dc=t=>C(E,{"data-element-type":"shapes-group",...t}),uc=Yh((t,{horizontal:e,vertical:n,...i})=>{if(!t||0===t.length)return C(E,{...i});const r=t.map(t=>Wh(t)),o=Nh(t),a=i.x??o.x,s=i.y??o.y,l=i.width??o.width,h=i.height??o.height,c=t.map((t,i)=>{const o=r[i],c={...t.props};if(void 0!==e)switch(e){case"left":c.x=-o.x;break;case"center":c.x=(l-o.width)/2-o.x;break;case"right":c.x=l-o.width-o.x}else void 0===c.x&&(c.x=o.x-a);if(void 0!==n)switch(n){case"top":c.y=-o.y;break;case"middle":c.y=(h-o.height)/2-o.y;break;case"bottom":c.y=h-o.height-o.y}else void 0===c.y&&(c.y=o.y-s);return Fh(t,c)});return C(E,{...{...i,x:a,y:s,width:l,height:h},children:c})}),fc=Yh((t,{flexDirection:e="row",justifyContent:n="flex-start",alignItems:i="flex-start",alignContent:r="flex-start",flexWrap:o="nowrap",gap:a=0,...s})=>{if(!t||0===t.length)return C(E,{...s});const l="row"===e||"row-reverse"===e,h="row-reverse"===e||"column-reverse"===e,c=t.map(t=>Wh(t)),d=Nh(t),u=s.width??d.width,f=s.height??d.height,p=void 0!==s.width&&void 0!==s.height,g=[];if("wrap"===o&&p){let e=[],n=[],i=0;for(let r=0;r<t.length;r++){const o=t[r],s=c[r],h=l?s.width:s.height,d=l?u:f;0===e.length||i+a+h<=d?(e.push(o),n.push(s),i+=(e.length>1?a:0)+h):(g.push({children:e,bounds:n}),e=[o],n=[s],i=h)}e.length>0&&g.push({children:e,bounds:n})}else g.push({children:t,bounds:c});const m=[];let y=0;const x=[];if(g.forEach(t=>{const{children:e,bounds:r}=t,o=r.reduce((t,e,n)=>t+(l?e.width:e.height)+(n>0?a:0),0),s=Math.max(...r.map(t=>l?t.height:t.width));x.push(s);let c=0;const d=(l?u:f)-o;if(p)switch(n){case"flex-end":c=d;break;case"center":c=d/2;break;default:c=0}let g=a;p&&"space-between"===n&&e.length>1&&(g=d/(e.length-1)+a);let v=c;e.forEach((t,e)=>{const n=r[e],o=l?n.width:n.height,a=l?n.height:n.width,c=l?n.x:n.y,d=l?n.y:n.x;let x,b,w=y;if(p)switch(i){case"flex-end":w=y+s-a;break;case"center":w=y+(s-a)/2;break;default:w=y}l?(x=h?u-v-o-c:v-c,b=w-d):(x=w-d,b=h?f-v-o-c:v-c);const M=Fh(t,{x,y:b});m.push(M),v+=o+g}),y+=s+a}),g.length>1&&p){const t=x.reduce((t,e)=>t+e,0)+(g.length-1)*a,e=(l?f:u)-t;let n=0;switch(r){case"flex-end":n=e;break;case"center":n=e/2;break;case"space-between":if(g.length>1){const t=e/(g.length-1);let n=0;g.forEach((e,i)=>{const r=g.slice(0,i).reduce((t,e)=>t+e.children.length,0),o=r+e.children.length;for(let t=r;t<o;t++){const e=m[t],i={...e.props};l?i.y=(i.y||0)+n:i.x=(i.x||0)+n,m[t]=Fh(e,i)}n+=x[i]+a+(i<g.length-1?t:0)});break}break;default:n=0}0!==n&&"space-between"!==r&&m.forEach((t,e)=>{const i={...t.props};l?i.y=(i.y||0)+n:i.x=(i.x||0)+n,m[e]=Fh(t,i)})}if(!p&&"center"===i)if(l){const t=Math.max(...c.map(t=>t.height));m.forEach((e,n)=>{const i=c[n],r=(t-i.height)/2,o={...e.props};o.y=(o.y||0)+r,m[n]=Fh(e,o)})}else{const t=Math.max(...c.map(t=>t.width));m.forEach((e,n)=>{const i=c[n],r=(t-i.width)/2,o={...e.props};o.x=(o.x||0)+r,m[n]=Fh(e,o)})}const v=Nh(m);return C(E,{...{...s,x:s.x??d.x,y:s.y??d.y,width:s.width??v.width,height:s.height??v.height},children:m})}),pc=new Map;function gc(t,e){pc.set(t,e)}gc("dark",{colorBg:"#1F1F1F",base:{text:{fill:"#fff"}}}),gc("hand-drawn",{base:{text:{"font-family":"851tegakizatsu"}},stylize:{type:"rough"}}),K(ti);const mc=({colorPrimary:t,colorBg:e="#ffffff",isDarkMode:n=!1})=>{const i=yt(t),r=yt(e),o=bc({primaryColor:i,bgColor:r});return wc(o,{primaryColor:i,bgColor:r,isDarkMode:n})},yc=t=>{const e=Hi(yt(t)),n={...e,l:Math.min(1,e.l+.2)};return Ei(n)},xc=(t,e)=>{const n=yt(t),i=yt("#262626"),r=yt("#ffffff"),o=Pi(i,n);return Pi(r,n)>=3?Ei(r):o>=4.5?Ei(i):"#ffffff"},vc=(t,e)=>{const n=Hi(t);return e?Mc({...n,l:Math.min(1,n.l+.1)},"#1f1f1f"):n.l>.95?"#ffffff":Mc({...n,l:Math.min(1,n.l+.05)},"#ffffff")},bc=({primaryColor:t,bgColor:e})=>({colorPrimary:Mc(t,"#FF356A"),colorBg:Mc(e,"#ffffff"),colorWhite:"#ffffff"}),wc=(t,{primaryColor:e,bgColor:n,isDarkMode:i})=>{const r=((t,e)=>{if(e)return"#ffffff";const n=yt("#262626");return Pi(n,t)>=7?Ei(n):"#000000"})(n,i),o=((t,e)=>(t=>(t=>{if(void 0===t)return;let e=Si(void 0!==t.alpha?t.alpha:1);return Ai(t)+(256|e).toString(16).slice(1)})(zi(t)))({...t,alpha:e?.2:.1})||"#ffffff")(e,i);return{...t,isDarkMode:i,colorPrimaryBg:o,colorText:r,colorTextSecondary:yc(r),colorPrimaryText:xc(o),colorBgElevated:vc(n,i)}};function Mc(t,e="#000000"){return Ei(t)??e}const kc="#FF356A";function $c(t){return t?.themeConfig?.colorPrimary||kc}function Cc(t){const{themeConfig:e={},data:n}=t,{colorPrimary:i,palette:r}=e;return r&&0!==r.length?n.items.map((t,e)=>cs(r,[e],n.items.length)||kc):Array(n?.items?.length||1).fill(i||kc)}function _c(t,e){return cs(t?.themeConfig?.palette,e,t.data?.items?.length)}function Sc(t,e){const{colorBg:n=e?.themeConfig?.colorBg||"white",colorPrimary:i=(e?$c(e):"black")}=t;return mc({colorPrimary:i,isDarkMode:Ii(n),colorBg:n})}function zc(t,e){const{depth:n,originalIndexes:i,flatIndex:r}=t;switch(e){case"level":return[n];case"branch":return 0===n?[0]:[i[1]+1];case"node":return i;case"node-flat":return void 0!==r?[r]:(console.warn("node-flat mode requires flatIndex in HierarchyNode, falling back to originalIndexes"),i);default:return[0]}}function Ac(t,e=[]){const n={...t},i={};return["indexes","data","datum","positionH","positionV","themeColors","valueFormatter",...e].forEach(t=>{t in n&&(i[t]=n[t],delete n[t])}),["x","y","width","height"].forEach(e=>{e in t&&(n[e]=t[e])}),[i,n]}function Ec(t,e){return 0===t.length?()=>null:void 0===e?t[0]:t[e]??t[0]}const Lc=new Map;function Pc(t,e){Lc.set(t,e)}Pc("badge-card",{component:t=>{const[{datum:e,indexes:n,width:i=200,height:r=80,iconSize:o=24,badgeSize:a=32,gap:s=8,positionH:l="normal",themeColors:h,valueFormatter:c},d]=Ac(t,["width","height","iconSize","badgeSize","gap"]),u=e.value,f=void 0!==u,p=!!e.desc,g=!!e.icon,m=`${h.colorPrimary}-badge`,y="flipped"===l?i-s-a:s,x=g?"flipped"===l?s:a+2*s:s,v=i-2*s,b=g?i-a-3*s:v,w=s+14+18+8,M=w-s,k=p?s:(r-a)/2,S=f||p?s:(r-14)/2;return _(E,{...d,width:i,height:r,children:[C(z,{children:_("radialGradient",{id:m,cx:"50%",cy:"50%",r:"50%",children:[C("stop",{offset:"0%",stopColor:h.colorPrimary}),C("stop",{offset:"100%",stopColor:ks(h.colorPrimary).darken(20).toHexString()})]})}),C(H,{"data-element-type":"shape",x:0,y:0,width:i,height:r,fill:h.colorPrimaryBg,rx:8,ry:8}),g&&_($,{children:[C(A,{x:y,y:k,width:a,height:a,fill:`url(#${m})`}),C(ac,{indexes:n,x:y+(a-o)/2,y:k+(a-o)/2,size:o,fill:h.colorWhite})]}),_(fc,{flexDirection:"column",x,y:S,width:b,height:f||p?M:void 0,alignItems:"center",justifyContent:"center",children:[C(lc,{indexes:n,width:b,alignHorizontal:"flipped"===l?"right":"left",alignVertical:"middle",fontSize:14,fill:h.colorText,children:e.label}),f&&C(cc,{indexes:n,width:b,alignHorizontal:"flipped"===l?"right":"left",alignVertical:"middle",fontSize:18,lineHeight:1,fontWeight:"bold",fill:h.colorPrimary,value:u,formatter:c})]}),p&&C(oc,{indexes:n,x:s,y:w,width:v,alignHorizontal:"flipped"===l?"right":"left",fontSize:11,fill:h.colorTextSecondary,lineNumber:2,lineHeight:1.2,wordWrap:!0,children:e.desc})]})},composites:["icon","label","value","desc"]}),Pc("candy-card-lite",{component:t=>{const[{indexes:e,datum:n,width:i=280,height:r=140,themeColors:o},a]=Ac(t,["width","height"]);return _(E,{...a,children:[C("rect",{x:0,y:0,width:i,height:r,rx:22,ry:22,fill:o.colorPrimaryBg,stroke:o.colorPrimary,"data-element-type":"shape"}),C(L,{x:i-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"}),C(lc,{indexes:e,x:20,y:24,width:200,alignHorizontal:"left",alignVertical:"middle",fill:o.colorText,children:n.label}),C(oc,{indexes:e,x:20,y:58,width:220,height:70,fill:o.colorTextSecondary,alignHorizontal:"left",alignVertical:"top",children:n.desc}),C(ac,{indexes:e,x:i-48,y:12,width:32,height:32,fill:o.colorPrimary})]})},composites:["icon","label","desc"]});const Hc=t=>{const{color:e="black",opacity:n=.8,...i}=t;return C("filter",{id:"drop-shadow",x:"-25%",y:"-25%",width:"200%",height:"200%",...i,children:C("feDropShadow",{dx:"4",dy:"4",stdDeviation:"4","flood-color":e,"flood-opacity":n})})},Tc=t=>{const{id:e="linear-gradient",startColor:n="black",stopColor:i="white",direction:r="left-right"}=t;return _("linearGradient",{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%"}}[r],children:[C("stop",{offset:"0%",stopColor:n}),C("stop",{offset:"100%",stopColor:i})]})};function Ic(t,e,n){return ks.mix(t,"#ffffff",e).setAlpha(n).toRgbString()}function jc(t,e,n,i){const r=(i-90)*Math.PI/180;return{x:t+n*Math.cos(r),y:e+n*Math.sin(r)}}Pc("capsule-item",{component:t=>{const[{datum:e,indexes:n,width:i=300,height:r=80,gap:o=12,positionH:a="normal",iconPadding:s=r/10,themeColors:l},h]=Ac(t,["width","height","gap","iconPadding"]),c=r/2,d=r-2*s,u="flipped"===a,f=!!e.icon,p=f?i-r-o:i-2*o,g=f?u?o:r:o,m=f?u?"right":"left":"center",y={indexes:n,width:p,alignHorizontal:m,alignVertical:"middle",fontSize:16,fontWeight:"600",fill:l.colorWhite},x=Wh(C(lc,{...y,children:e.label})),v={indexes:n,width:p,alignHorizontal:m,alignVertical:"top",fontSize:12,lineNumber:1,fill:l.colorWhite},b=Wh(e.desc?C(oc,{...v,children:e.desc}):null),w=(r-(x.height+4+b.height))/2,M=w+x.height+4,k=u?i-r+s:s,S=s;return _(E,{...h,children:[C(z,{children:C(Hc,{})}),C(H,{x:0,y:0,width:i,height:r,fill:l.colorPrimary,rx:c,ry:c,"data-element-type":"shape"}),e.icon&&_($,{children:[C(A,{x:k,y:S,width:d,height:d,fillOpacity:.5,fill:l.colorBg,filter:"url(#drop-shadow)"}),C(sc,{indexes:n,x:k,y:S,size:d,fill:l.colorBg,colorBg:l.colorPrimary})]}),e.label&&C(lc,{x:g,y:w,...y,children:e.label}),e.desc&&C(oc,{x:g,y:M,...v,children:e.desc})]})},composites:["icon","label","desc"]}),Pc("circle-node",{component:t=>{const[{indexes:e,datum:n,themeColors:i,positionH:r="normal",width:o=240,height:a=o},s]=Ac(t,["width","height"]),l=Math.min(o,a),h=.7*l,c=(l-h)/2,d=h*Math.sqrt(2)/2,u=(l-d)/2,f=ks(i.colorPrimary),p=Ic(f,80,.2),g=Ic(f,20,.8),m=Ic(f,75,.32),y=Ic(f,45,.4),x=f.clone().darken(5).toRgbString(),v=`${i.colorPrimary}-${r}-outer`,b=`${i.colorPrimary}-${r}-inner`,w="flipped"===r?{x1:"0%",y1:"0%",x2:"100%",y2:"0%"}:{x1:"100%",y1:"0%",x2:"0%",y2:"0%"};return _(E,{...s,children:[_(z,{children:[_("linearGradient",{id:v,...w,children:[C("stop",{offset:"0%",stopColor:p}),C("stop",{offset:"100%",stopColor:g})]}),_("linearGradient",{id:b,...w,children:[C("stop",{offset:"0%",stopColor:m}),C("stop",{offset:"100%",stopColor:y})]})]}),C(A,{width:l,height:l,fill:`url(#${v})`,"data-element-type":"shape"}),C(A,{x:c,y:c,width:h,height:h,fill:`url(#${b})`,stroke:"#FFFFFF",strokeWidth:1,"data-element-type":"shape"}),C(lc,{indexes:e,x:u,y:u,width:d,height:d,lineHeight:1.1,alignHorizontal:"center",alignVertical:"middle",fill:x,fontWeight:"500",children:n.label})]})},composites:["label"]}),Pc("circular-progress",{component:t=>{const[{datum:e,indexes:n,size:i=120,strokeWidth:r=12,gap:o=8,themeColors:a,valueFormatter:s=t=>`${Math.round(t)}%`},l]=Ac(t,["size","strokeWidth","gap"]),h=e.value??0,c=Math.min(Math.max(h/100,0),1),d=i/2,u=r/2,f=i-r,p=c>=1,g=function(t,e,n,i,r){const o=jc(t,e,n,r),a=jc(t,e,n,0),s=r-0<=180?"0":"1";return`M ${o.x} ${o.y} A ${n} ${n} 0 ${s} 0 ${a.x} ${a.y}`}(d,d,(i-r)/2,0,360*c),m={x:u,y:u,width:f,height:f};return _(E,{...l,width:i,height:i+o+20,children:[C(H,{width:i,height:i,fill:"none"}),C(A,{...m,fill:"none",stroke:"#f0f0f0",strokeWidth:r,"data-element-type":"shape"}),p?C(A,{...m,fill:"none",stroke:a.colorPrimary,strokeWidth:r,"data-element-type":"shape"}):C(L,{d:g,fill:"none",stroke:a.colorPrimary,strokeWidth:r,strokeLinecap:"round","data-element-type":"shape"}),C(cc,{indexes:n,x:r,y:r,width:f-r,height:f-r,fontSize:24,fontWeight:"bold",fill:a.colorPrimary,alignHorizontal:"center",alignVertical:"middle",value:h,formatter:s}),C(lc,{indexes:n,x:0,y:i+o,width:i,alignHorizontal:"center",fontSize:12,fill:a.colorTextSecondary,children:e.label})]})},composites:["label","value"]}),Pc("compact-card",{component:t=>{const[{datum:e,indexes:n,width:i=200,height:r=60,iconSize:o=20,gap:a=8,positionH:s="normal",themeColors:l,valueFormatter:h},c]=Ac(t,["width","height","iconSize","gap"]),d=e.value,u=null!=d,f="compact-shadow",p="flipped"===s?i-a-o:a,g="flipped"===s?a:o+2*a,m=i-o-3*a,y=u?.8*m:m,x=u?.2*m:0;return _(E,{...c,children:[C(z,{children:C("filter",{id:f,children:C("feDropShadow",{dx:"0",dy:"2",stdDeviation:"2",floodOpacity:"0.15"})})}),C(H,{x:0,y:0,width:i,height:r,fill:l.colorBgElevated,stroke:l.colorBgElevated,strokeWidth:1,rx:6,ry:6,filter:`url(#${f})`,"data-element-type":"shape"}),C(H,{x:"flipped"===s?i-3:0,y:0,width:3,height:r,fill:l.colorPrimary,rx:1.5,ry:1.5,"data-element-type":"shape"}),C(ac,{indexes:n,x:p,y:(r-o)/2,size:o,fill:l.colorPrimary}),_(fc,{x:g,y:a,width:m,height:r-2*a,flexDirection:"column",justifyContent:"center",alignItems:"flex-start",children:[_(fc,{width:m,flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[C(lc,{indexes:n,width:y,alignHorizontal:"left",fontSize:12,fill:l.colorText,children:e.label}),u&&C(cc,{indexes:n,width:x,alignHorizontal:"right",fontSize:12,fontWeight:"bold",fill:l.colorPrimary,value:d,formatter:h})]}),C(oc,{indexes:n,width:m,alignHorizontal:"left",alignVertical:"middle",fontSize:10,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]})]})},composites:["icon","label","value","desc"]}),Pc("done-list",{component:t=>{const[{datum:e,indexes:n,width:i=300,height:r=30,iconSize:o=30,gap:a=5,positionH:s="normal",positionV:l="middle",themeColors:h},c]=Ac(t,["width","height","iconSize","gap"]),d=i-o-a;return _(E,{...c,children:[C(L,{"data-element-type":"shape",x:"flipped"===s?d+a:0,y:"middle"===l?(r-o)/2:"flipped"===l?r-o:0,fill:h.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"}),C(lc,{indexes:n,x:"flipped"===s?0:o+a,width:d,height:r,fontWeight:"normal",alignVertical:"middle",wordWrap:!1,fill:"#666",children:e.label||e.desc})]})},composites:["label"]});const Oc=t=>{const{x:e=0,y:n=0,width:i=100,height:r=40,fill:o="#FF356A",size:a=10}=t;return C(P,{width:i,height:r,points:[{x:e,y:n},{x:e+i-a,y:n},{x:e+i,y:n+r/2},{x:e+i-a,y:n+r},{x:e,y:n+r},{x:e+a,y:n+r/2}],fill:o,"data-element-type":"shape"})},Wc=t=>{const{x:e=0,y:n=0,width:i=10,height:r=50,fill:o,positionV:a="top"}=t,s=i/2,l=r-s,h=s;return _(dc,{x:e,y:n,width:i,height:r,children:[C(A,{width:i,height:i,fill:o,y:"top"===a?0:l-s}),C(L,{d:"top"===a?`M${h},${s} L${h},${s+l}`:`M${h},0 L${h},${l-s}`,strokeWidth:2,stroke:o})]})};function Nc(){}function Dc(t){return null==t?Nc:function(){return this.querySelector(t)}}function Rc(){return[]}function Fc(t){return null==t?Rc:function(){return this.querySelectorAll(t)}}function Vc(t){return function(){return this.matches(t)}}function Bc(t){return function(e){return e.matches(t)}}Pc("horizontal-icon-arrow",{component:t=>{const[{indexes:e,datum:n,width:i=140,themeColors:r,positionV:o="normal"},a]=Ac(t,["width"]),s="flipped"!==o,l="normal"===o?"bottom":"top",h=C(lc,{indexes:e,width:i,fill:r.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),c=C(oc,{indexes:e,width:i,fill:r.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),d=C(sc,{indexes:e,fill:r.colorPrimary,colorBg:r.colorWhite}),u=C(Wc,{width:8,height:30,fill:r.colorPrimary,positionV:o}),f=Wh(h),p=Wh(c),g=Wh(d),m=Wh(u),y=f.height+p.height+5+m.height-g.height-25;return C(E,{width:i,height:g.height+25+30+m.height+5+f.height+p.height,...a,children:_(fc,{flexDirection:"column",alignItems:"center",children:[_($,s?{children:[c,h,C(ic,{height:5}),u]}:{children:[C(ic,{height:y}),d,C(ic,{height:25})]}),_(uc,{horizontal:"center",vertical:"middle",width:i,height:30,children:[C(Oc,{width:i,height:30,fill:r.colorPrimary}),C(Ph,{width:i,height:30,alignHorizontal:"center",alignVertical:"middle",fill:r.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),_($,s?{children:[C(ic,{height:25}),d]}:{children:[u,C(ic,{height:5}),h,c]})]})})},composites:["icon","label","desc","time"]}),Pc("horizontal-icon-line",{component:t=>{const[{indexes:e,datum:n,width:i=160,themeColors:r,positionH:o="center",positionV:a="normal"},s]=Ac(t,["width"]),l="normal"===o?"left":"flipped"===o?"right":"center",h=C(lc,{indexes:e,width:i,alignHorizontal:l,fill:r.colorPrimary,children:n.label}),c=Wh(h),d=n.desc?C(oc,{indexes:e,width:i,fill:r.colorTextSecondary,alignHorizontal:l,alignVertical:"flipped"===a?"top":"bottom",children:n.desc}):null,u=Wh(d),f=n.icon?C(sc,{size:45,indexes:e,colorBg:r.colorBg,fill:r.colorPrimary}):null,p=Wh(f),g=n.time?C(Ph,{width:i,height:30,alignHorizontal:"center",alignVertical:"middle",fill:r.colorPrimary,fontSize:18,fontWeight:"bold",children:n.time}):null,m=Wh(g),y=_(uc,{horizontal:"center",vertical:"middle",width:i,height:18,children:[C(H,{width:i,height:18,fill:r.colorPrimary,"data-element-type":"shape"}),C(A,{width:24,height:24,fill:r.colorBg,fillOpacity:.5,"data-element-type":"shape"}),C(A,{width:12,height:12,fill:"white","data-element-type":"shape"})]}),x=c.height+u.height,v=p.height+m.height+5,b=Math.abs(v-x),w=v>x?b:0,M=x>v?b:0;return _(fc,"flipped"===a?{...s,flexDirection:"column",alignItems:"center",children:[C(ic,{height:M}),g,f,C(ic,{height:5}),y,h,d,C(ic,{height:w})]}:{...s,flexDirection:"column",alignItems:"center",children:[C(ic,{height:w}),h,d,y,C(ic,{height:5}),f,g,C(ic,{height:M})]})},composites:["icon","label","desc"]}),Pc("icon-badge",{component:t=>{const[{datum:e,indexes:n,size:i=80,iconSize:r=28,badgeSize:o=24,gap:a=8,themeColors:s,width:l=84,height:h=105},c]=Ac(t,["size","iconSize","badgeSize","gap"]),d=e.value??0,u=`${s.colorPrimary}-icon`,f="#ff6b6b-badge";return _(E,{...c,width:l,height:h,children:[_(z,{children:[_("radialGradient",{id:u,cx:"50%",cy:"30%",r:"70%",children:[C("stop",{offset:"0%",stopColor:ks(s.colorPrimary).lighten(30).toHexString()}),C("stop",{offset:"100%",stopColor:s.colorPrimary})]}),_("linearGradient",{id:f,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:"#ff6b6b"}),C("stop",{offset:"100%",stopColor:"#ee5a52"})]})]}),C(A,{x:0,y:0,width:i,height:i,fill:`url(#${u})`,"data-element-type":"shape"}),C(ac,{indexes:n,x:(i-r)/2,y:(i-r)/2,size:r,fill:s.colorPrimaryText}),C(A,{x:i-o+4,width:o,height:o,fill:`url(#${f})`}),C(Ph,{x:i-o+4,width:o,height:o,fontSize:10,fontWeight:"bold",fill:s.colorWhite,alignHorizontal:"center",alignVertical:"middle",children:d>99?"99+":Math.round(d)}),C(lc,{indexes:n,x:0,y:i+a,width:i,alignHorizontal:"center",fontSize:12,fill:s.colorText,children:e.label})]})},composites:["icon","label"]}),Pc("indexed-card",{component:t=>{const[{datum:e,indexes:n,width:i=200,borderRadius:r=12,padding:o=16,separatorHeight:a=2,indexFontSize:s=20,labelFontSize:l=16,gap:h=8,themeColors:c},d]=Ac(t,["width","height","borderRadius","padding","separatorHeight","indexFontSize","labelFontSize","gap"]),u=n[0]+1,f=String(u).padStart(2,"0"),p=void 0!==e.label,g=void 0!==e.desc,m=ks.mix(c.colorPrimary,c.colorWhite,40).toHexString(),y=c.colorBgElevated||c.colorWhite,x=i-2*o,v=Wh(C(Ph,{fontSize:s,fontWeight:"bold",children:f})),b=x-v.width-h,w=p?Wh(C(lc,{indexes:n,width:b,fontSize:l,fontWeight:"bold",x:s,children:e.label})):{width:0,height:0},M=g?Wh(C(oc,{indexes:n,width:x,fontSize:14,lineHeight:1.5,wordWrap:!0,children:e.desc})):{width:0,height:0},k=Math.max(v.height,w.height),$=2*o+k+(p||g?h:0)+a+(g?h:0)+M.height;return _(E,{...d,width:i,height:$,children:[C(H,{x:0,y:0,width:i,height:$,rx:r,ry:r,fill:y,stroke:ks(y).darken(5).toHexString(),strokeWidth:.5,"data-element-type":"shape"}),_(E,{x:o,y:o,children:[_(E,{x:0,y:0,children:[C(Ph,{x:0,y:0,fontSize:s,fontWeight:"bold",fill:c.colorPrimary,alignVertical:"top",children:f}),p&&C(lc,{indexes:n,x:s+h,y:0,width:b,fontSize:l,fontWeight:"bold",fill:c.colorTextSecondary,alignVertical:"top",children:e.label})]}),C(H,{x:0,y:k+h,width:x,height:a,fill:m,"data-element-type":"shape"}),g&&C(oc,{indexes:n,x:0,y:k+h+a+h,width:x,fontSize:14,lineHeight:1.5,wordWrap:!0,fill:c.colorTextSecondary,children:e.desc})]})]})},composites:["label","desc"]}),Pc("l-corner-card",{component:t=>{const[{indexes:e,datum:n,width:i=140,iconSize:r=24,themeColors:o},a]=Ac(t,["width","iconSize"]),{label:s,desc:l}=n,h=i-16-12,c=`M 28 ${76+(r+44)} L 28 76 L ${28+h} 76`;return _(E,{...a,children:[C(oc,{indexes:e,x:28,width:i-28,height:60,fontSize:12,alignHorizontal:"left",alignVertical:"bottom",fill:o.colorTextSecondary,children:l}),C(P,{points:[{x:0,y:88},{x:16,y:72},{x:16,y:88}],fill:o.colorPrimary,opacity:.9,width:16,height:16,"data-element-type":"shape"}),C(L,{d:c,stroke:o.colorPrimary,strokeWidth:8,fill:"none","data-element-type":"shape"}),C(ac,{indexes:e,x:32+h/2-r/2,y:88,size:r,fill:o.colorPrimary}),C(lc,{indexes:e,x:32,y:80+r+16,width:h,fontSize:14,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:o.colorText,children:s})]})},composites:["icon","label","desc"]}),Pc("letter-card",{component:t=>{const[{datum:e,indexes:n,width:i=280,height:r=160,showStripe:o=!0,showGradient:a=!0,showBottomShade:s=!0,themeColors:l},h]=Ac(t,["width","height","showStripe","showGradient","showBottomShade"]),c=e.label?.[0].toUpperCase(),d=e.label?.toUpperCase(),u=l.colorPrimary,f=ks(u),p=f.clone().darken(4).toHexString(),g=f.clone().lighten(12).toHexString(),m=`letter-card-${n.join("-")}`,y=`${m}-gradient`,x=`${m}-pattern`,v=`${m}-shade`,b=r/16,w=(r-(96+b+16))/2,M=w+96+b;return _(E,{...h,width:i,height:r,children:[_(z,{children:[a&&_("linearGradient",{id:y,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:p}),C("stop",{offset:"100%",stopColor:g})]}),o&&_("pattern",{id:x,patternUnits:"userSpaceOnUse",width:10,height:10,patternTransform:"rotate(45)",children:[C("rect",{x:"0",y:"0",width:10,height:10,fill:"rgba(255, 255, 255, 0)"}),C("rect",{x:"0",y:"0",width:4,height:10,fill:"rgba(0, 0, 0, 0.03)"})]}),s&&_("linearGradient",{id:v,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:"rgba(0,0,0,0)"}),C("stop",{offset:"100%",stopColor:"rgba(0,0,0,0.16)"})]})]}),C(H,{x:0,y:0,width:i,height:r,fill:a?`url(#${y})`:u,rx:0,ry:0,"data-element-type":"shape"}),o&&C(H,{x:0,y:0,width:i,height:r,fill:`url(#${x})`,rx:0,ry:0}),s&&C(H,{x:0,y:r-40,width:i,height:40,fill:`url(#${v})`,rx:0,ry:0}),c&&C(lc,{indexes:n,x:0,y:w,width:i,fontSize:96,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"top",lineHeight:1,children:c}),C(lc,{indexes:n,x:0,y:M,width:i,fontSize:16,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"middle",lineHeight:1,children:d})]})},composites:["label"]}),Pc("lined-text",{component:t=>{const[{datum:e,indexes:n,width:i,themeColors:r,positionH:o="normal",positionV:a="center",formatter:s=t=>t||"",usePaletteColor:l=!1,showUnderline:h=!1,underlineGap:c=6,underlineExtend:d=8,underlineThickness:u=2},f]=Ac(t,["width","formatter","usePaletteColor","showUnderline","underlineGap","underlineExtend","underlineThickness"]),p=s(e.label??e.desc??""),g="flipped"===o?"right":"center"===o?"center":"left",m=Wh(C(lc,{indexes:n,width:i,children:p})),y=i??m.width,x=m.height,v=h?y+2*d:0,b=x+(h?c+u:0),w=h?Math.max(y,v):y,M=f.height??b,k="right"===g?w-y:"center"===g?(w-y)/2:0,$="middle"===a?(M-b)/2:"flipped"===a?M-b:0,S="right"===g?w-v:"center"===g?(w-v)/2:0,z=M;return _(E,{...f,width:w,height:M,children:[C(lc,{indexes:n,x:k,y:$,width:y,height:x,alignHorizontal:g,alignVertical:"flipped"===a?"bottom":"center"===a?"middle":"top",fill:l?r.colorPrimary:r.colorText,children:p}),h&&C(L,{d:`M 0 ${u/2} L ${v} ${u/2}`,x:S,y:z-u/2,width:v,height:u,stroke:r.colorPrimary,strokeWidth:u,fill:"none",strokeLinecap:"round","data-element-type":"shape"})]})},composites:["label"]}),Pc("pill-badge",{component:t=>{const[{datum:e,indexes:n,width:i=300,pillWidth:r=120,pillHeight:o=36,gap:a=16,positionH:s="normal",themeColors:l},h]=Ac(t,["width","pillWidth","pillHeight","gap"]),c=!!e.desc,d=c?i:r,u=c?"center"===s?(d-r)/2:"flipped"===s?d-r:0:0,f=o+a,p=d,g=`drop-shadow-${l.colorPrimary}`,m="linear-gradient-white-top-bottom";return _(E,{...h,children:[_(z,{children:[C(Hc,{id:g,color:l.colorPrimary}),C(Tc,{id:m,startColor:"#fff",stopColor:"#ffffff33",direction:"top-bottom"})]}),C(H,{x:u,y:0,width:r,height:o,fill:l.colorPrimaryBg,stroke:l.colorPrimary,rx:o/2,ry:o/2,filter:`url(#${g})`,"data-element-type":"shape"}),C(H,{x:u,y:0,width:r,height:o,fill:`url(#${m})`,opacity:l.isDarkMode?.4:.7,rx:o/2,ry:o/2}),C(lc,{indexes:n,x:u,y:0,width:r,height:o,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:l.colorText,children:e.label}),e.desc&&C(oc,{indexes:n,x:0,y:f,width:p,alignHorizontal:"center"===s?"center":"flipped"===s?"right":"left",fontSize:12,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]})},composites:["label","desc"]}),Pc("plain-text",{component:t=>{const[{indexes:e,datum:n,width:i=120,themeColors:r,positionH:o="normal",positionV:a="center",formatter:s=t=>t||"",usePaletteColor:l=!1,lineNumber:h=1},c]=Ac(t,["width","formatter","usePaletteColor","lineNumber"]),d=c.height??Math.ceil(1.4*h*14);return C(lc,{...c,indexes:e,width:i,height:d,lineHeight:1.4,fill:l?r.colorPrimary:r.colorText,fontSize:14,fontWeight:"regular",alignHorizontal:"flipped"===o?"right":"center"===o?"center":"left",alignVertical:"flipped"===a?"bottom":"center"===a?"middle":"top",children:s(n.label||n.desc)})},composites:["label"]});var qc=Array.prototype.find;function Gc(){return this.firstElementChild}var Yc=Array.prototype.filter;function Xc(){return Array.from(this.children)}function Uc(t){return new Array(t.length)}function Zc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Kc(t,e,n,i,r,o){for(var a,s=0,l=e.length,h=o.length;s<h;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new Zc(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function Qc(t,e,n,i,r,o,a){var s,l,h,c=new Map,d=e.length,u=o.length,f=new Array(d);for(s=0;s<d;++s)(l=e[s])&&(f[s]=h=a.call(l,l.__data__,s,e)+"",c.has(h)?r[s]=l:c.set(h,l));for(s=0;s<u;++s)h=a.call(t,o[s],s,o)+"",(l=c.get(h))?(i[s]=l,l.__data__=o[s],c.delete(h)):n[s]=new Zc(t,o[s]);for(s=0;s<d;++s)(l=e[s])&&c.get(f[s])===l&&(r[s]=l)}function Jc(t){return t.__data__}function td(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ed(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}Zc.prototype={constructor:Zc,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)}};var nd="http://www.w3.org/1999/xhtml";const id={svg:"http://www.w3.org/2000/svg",xhtml:nd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function rd(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),id.hasOwnProperty(e)?{space:id[e],local:t}:t}function od(t){return function(){this.removeAttribute(t)}}function ad(t){return function(){this.removeAttributeNS(t.space,t.local)}}function sd(t,e){return function(){this.setAttribute(t,e)}}function ld(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function hd(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function cd(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function dd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ud(t){return function(){this.style.removeProperty(t)}}function fd(t,e,n){return function(){this.style.setProperty(t,e,n)}}function pd(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function gd(t,e){return t.style.getPropertyValue(e)||dd(t).getComputedStyle(t,null).getPropertyValue(e)}function md(t){return function(){delete this[t]}}function yd(t,e){return function(){this[t]=e}}function xd(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function vd(t){return t.trim().split(/^|\s+/)}function bd(t){return t.classList||new wd(t)}function wd(t){this._node=t,this._names=vd(t.getAttribute("class")||"")}function Md(t,e){for(var n=bd(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function kd(t,e){for(var n=bd(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function $d(t){return function(){Md(this,t)}}function Cd(t){return function(){kd(this,t)}}function _d(t,e){return function(){(e.apply(this,arguments)?Md:kd)(this,t)}}function Sd(){this.textContent=""}function zd(t){return function(){this.textContent=t}}function Ad(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ed(){this.innerHTML=""}function Ld(t){return function(){this.innerHTML=t}}function Pd(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Hd(){this.nextSibling&&this.parentNode.appendChild(this)}function Td(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Id(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===nd&&e.documentElement.namespaceURI===nd?e.createElement(t):e.createElementNS(n,t)}}function jd(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Od(t){var e=rd(t);return(e.local?jd:Id)(e)}function Wd(){return null}function Nd(){var t=this.parentNode;t&&t.removeChild(this)}function Dd(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Rd(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Fd(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function Vd(t,e,n){return function(){var i,r=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),void(i.value=e);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 Bd(t,e,n){var i=dd(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function qd(t,e){return function(){return Bd(this,t,e)}}function Gd(t,e){return function(){return Bd(this,t,e.apply(this,arguments))}}wd.prototype={add:function(t){this._names.indexOf(t)<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}};var Yd=[null];function Xd(t,e){this._groups=t,this._parents=e}function Ud(){return new Xd([[document.documentElement]],Yd)}Xd.prototype=Ud.prototype={constructor:Xd,select:function(t){"function"!=typeof t&&(t=Dc(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,a,s=e[r],l=s.length,h=i[r]=new Array(l),c=0;c<l;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),h[c]=a);return new Xd(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}(t):Fc(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var a,s=e[o],l=s.length,h=0;h<l;++h)(a=s[h])&&(i.push(t.call(a,a.__data__,h,s)),r.push(a));return new Xd(i,r)},selectChild:function(t){return this.select(null==t?Gc:function(t){return function(){return qc.call(this.children,t)}}("function"==typeof t?t:Bc(t)))},selectChildren:function(t){return this.selectAll(null==t?Xc:function(t){return function(){return Yc.call(this.children,t)}}("function"==typeof t?t:Bc(t)))},filter:function(t){"function"!=typeof t&&(t=Vc(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,a=e[r],s=a.length,l=i[r]=[],h=0;h<s;++h)(o=a[h])&&t.call(o,o.__data__,h,a)&&l.push(o);return new Xd(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Jc);var n=e?Qc:Kc,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=r.length,a=new Array(o),s=new Array(o),l=new Array(o),h=0;h<o;++h){var c=i[h],d=r[h],u=d.length,f=td(t.call(c,c&&c.__data__,h,i)),p=f.length,g=s[h]=new Array(p),m=a[h]=new Array(p);n(c,d,g,m,l[h]=new Array(u),f,e);for(var y,x,v=0,b=0;v<p;++v)if(y=g[v]){for(v>=b&&(b=v+1);!(x=m[b])&&++b<p;);y._next=x||null}}return(a=new Xd(a,i))._enter=s,a._exit=l,a},enter:function(){return new Xd(this._enter||this._groups.map(Uc),this._parents)},exit:function(){return new Xd(this._exit||this._groups.map(Uc),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,o=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?o.remove():n(o),i&&r?i.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,a=Math.min(r,o),s=new Array(r),l=0;l<a;++l)for(var h,c=n[l],d=i[l],u=c.length,f=s[l]=new Array(u),p=0;p<u;++p)(h=c[p]||d[p])&&(f[p]=h);for(;l<r;++l)s[l]=n[l];return new Xd(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],o=r.length-1,a=r[o];--o>=0;)(i=r[o])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ed);for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var a,s=n[o],l=s.length,h=r[o]=new Array(l),c=0;c<l;++c)(a=s[c])&&(h[c]=a);h.sort(e)}return new Xd(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var a=i[r];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,o=e[n],a=0,s=o.length;a<s;++a)(r=o[a])&&t.call(r,r.__data__,a,o);return this},attr:function(t,e){var n=rd(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?ad:od:"function"==typeof e?n.local?cd:hd:n.local?ld:sd)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?ud:"function"==typeof e?pd:fd)(t,e,null==n?"":n)):gd(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?md:"function"==typeof e?xd:yd)(t,e)):this.node()[t]},classed:function(t,e){var n=vd(t+"");if(arguments.length<2){for(var i=bd(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?_d:e?$d:Cd)(n,e))},text:function(t){return arguments.length?this.each(null==t?Sd:("function"==typeof t?Ad:zd)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ed:("function"==typeof t?Pd:Ld)(t)):this.node().innerHTML},raise:function(){return this.each(Hd)},lower:function(){return this.each(Td)},append:function(t){var e="function"==typeof t?t:Od(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:Od(t),i=null==e?Wd:"function"==typeof e?e:Dc(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(Nd)},clone:function(t){return this.select(t?Rd:Dd)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Vd:Fd,i=0;i<a;++i)this.each(s(o[i],e,n));return this}var s=this.node().__on;if(s)for(var l,h=0,c=s.length;h<c;++h)for(i=0,l=s[h];i<a;++i)if((r=o[i]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Gd:qd)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,r=t[e],o=0,a=r.length;o<a;++o)(i=r[o])&&(yield i)}};const Zd=Ud;var Kd={value:()=>{}};function Qd(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Jd(i)}function Jd(t){this._=t}function tu(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function eu(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Kd,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Jd.prototype=Qd.prototype={constructor:Jd,on:function(t,e){var n,i,r=this._,o=(i=r,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)r[n]=eu(r[n],t.name,e);else if(null==e)for(n in r)r[n]=eu(r[n],t.name,null);return this}for(;++a<s;)if((n=(t=o[a]).type)&&(n=tu(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Jd(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),o=0;o<n;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(i=this._[t]).length;o<n;++o)i[o].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};const nu=Qd;var iu,ru,ou=0,au=0,su=0,lu=0,hu=0,cu=0,du="object"==typeof performance&&performance.now?performance:Date,uu="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function fu(){return hu||(uu(pu),hu=du.now()+cu)}function pu(){hu=0}function gu(){this._call=this._time=this._next=null}function mu(t,e,n){var i=new gu;return i.restart(t,e,n),i}function yu(){hu=(lu=du.now())+cu,ou=au=0;try{!function(){fu(),++ou;for(var t,e=iu;e;)(t=hu-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ou}()}finally{ou=0,function(){for(var t,e,n=iu,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:iu=e);ru=t,vu(i)}(),hu=0}}function xu(){var t=du.now(),e=t-lu;e>1e3&&(cu-=e,lu=t)}function vu(t){ou||(au&&(au=clearTimeout(au)),t-hu>24?(t<1/0&&(au=setTimeout(yu,t-du.now()-cu)),su&&(su=clearInterval(su))):(su||(lu=du.now(),su=setInterval(xu,1e3)),ou=1,uu(yu)))}function bu(t,e,n){var i=new gu;return e=null==e?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,n),i}gu.prototype=mu.prototype={constructor:gu,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?fu():+n)+(null==e?0:+e),this._next||ru===this||(ru?ru._next=this:iu=this,ru=this),this._call=t,this._time=n,vu()},stop:function(){this._call&&(this._call=null,this._time=1/0,vu())}};var wu=nu("start","end","cancel","interrupt"),Mu=[];function ku(t,e,n,i,r,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function o(l){var h,c,d,u;if(1!==n.state)return s();for(h in r)if((u=r[h]).name===n.name){if(3===u.state)return bu(o);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete r[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete r[h])}if(bu(function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,i=new Array(d=n.tween.length),h=0,c=-1;h<d;++h)(u=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(i[++c]=u);i.length=c+1}}function a(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=i.length;++o<a;)i[o].call(t,r);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var i in n.state=6,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=mu(function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)},0,n.time)}(t,n,{name:e,index:i,group:r,on:wu,tween:Mu,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function $u(t,e){var n=_u(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Cu(t,e){var n=_u(t,e);if(n.state>3)throw new Error("too late; already running");return n}function _u(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Su(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var zu,Au=180/Math.PI,Eu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Lu(t,e,n,i,r,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,l/=s),t*i<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*Au,skewX:Math.atan(l)*Au,scaleX:a,scaleY:s}}function Pu(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],l=[];return o=t(o),a=t(a),function(t,i,r,o,a,s){if(t!==r||i!==o){var l=a.push("translate(",null,e,null,n);s.push({i:l-4,x:Su(t,r)},{i:l-2,x:Su(i,o)})}else(r||o)&&a.push("translate("+r+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Su(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(o.rotate,a.rotate,s,l),function(t,e,n,o){t!==e?o.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Su(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(o.skewX,a.skewX,s,l),function(t,e,n,i,o,a){if(t!==n||e!==i){var s=o.push(r(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Su(t,n)},{i:s-2,x:Su(e,i)})}else 1===n&&1===i||o.push(r(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,n=-1,i=l.length;++n<i;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Hu=Pu(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Eu:Lu(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Tu=Pu(function(t){return null==t?Eu:(zu||(zu=document.createElementNS("http://www.w3.org/2000/svg","g")),zu.setAttribute("transform",t),(t=zu.transform.baseVal.consolidate())?Lu((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Eu)},", ",")",")");function Iu(t,e){var n,i;return function(){var r=Cu(this,t),o=r.tween;if(o!==n)for(var a=0,s=(i=n=o).length;a<s;++a)if(i[a].name===e){(i=i.slice()).splice(a,1);break}r.tween=i}}function ju(t,e,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var o=Cu(this,t),a=o.tween;if(a!==i){r=(i=a).slice();for(var s={name:e,value:n},l=0,h=r.length;l<h;++l)if(r[l].name===e){r[l]=s;break}l===h&&r.push(s)}o.tween=r}}function Ou(t,e,n){var i=t._id;return t.each(function(){var t=Cu(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return _u(t,i).value[e]}}function Wu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Nu(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Du(){}var Ru=.7,Fu=1/Ru,Vu="\\s*([+-]?\\d+)\\s*",Bu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gu=/^#([0-9a-f]{3,8})$/,Yu=new RegExp(`^rgb\\(${Vu},${Vu},${Vu}\\)$`),Xu=new RegExp(`^rgb\\(${qu},${qu},${qu}\\)$`),Uu=new RegExp(`^rgba\\(${Vu},${Vu},${Vu},${Bu}\\)$`),Zu=new RegExp(`^rgba\\(${qu},${qu},${qu},${Bu}\\)$`),Ku=new RegExp(`^hsl\\(${Bu},${qu},${qu}\\)$`),Qu=new RegExp(`^hsla\\(${Bu},${qu},${qu},${Bu}\\)$`),Ju={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};function tf(){return this.rgb().formatHex()}function ef(){return this.rgb().formatRgb()}function nf(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Gu.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?rf(e):3===n?new sf(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?of(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?of(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Yu.exec(t))?new sf(e[1],e[2],e[3],1):(e=Xu.exec(t))?new sf(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Uu.exec(t))?of(e[1],e[2],e[3],e[4]):(e=Zu.exec(t))?of(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ku.exec(t))?ff(e[1],e[2]/100,e[3]/100,1):(e=Qu.exec(t))?ff(e[1],e[2]/100,e[3]/100,e[4]):Ju.hasOwnProperty(t)?rf(Ju[t]):"transparent"===t?new sf(NaN,NaN,NaN,0):null}function rf(t){return new sf(t>>16&255,t>>8&255,255&t,1)}function of(t,e,n,i){return i<=0&&(t=e=n=NaN),new sf(t,e,n,i)}function af(t,e,n,i){return 1===arguments.length?function(t){return t instanceof Du||(t=nf(t)),t?new sf((t=t.rgb()).r,t.g,t.b,t.opacity):new sf}(t):new sf(t,e,n,null==i?1:i)}function sf(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function lf(){return`#${uf(this.r)}${uf(this.g)}${uf(this.b)}`}function hf(){const t=cf(this.opacity);return`${1===t?"rgb(":"rgba("}${df(this.r)}, ${df(this.g)}, ${df(this.b)}${1===t?")":`, ${t})`}`}function cf(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function df(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function uf(t){return((t=df(t))<16?"0":"")+t.toString(16)}function ff(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new gf(t,e,n,i)}function pf(t){if(t instanceof gf)return new gf(t.h,t.s,t.l,t.opacity);if(t instanceof Du||(t=nf(t)),!t)return new gf;if(t instanceof gf)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,l=(o+r)/2;return s?(a=e===o?(n-i)/s+6*(n<i):n===o?(i-e)/s+2:(e-n)/s+4,s/=l<.5?o+r:2-o-r,a*=60):s=l>0&&l<1?0:a,new gf(a,s,l,t.opacity)}function gf(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function mf(t){return(t=(t||0)%360)<0?t+360:t}function yf(t){return Math.max(0,Math.min(1,t||0))}function xf(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function vf(t,e,n,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*i+a*r)/6}Wu(Du,nf,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:tf,formatHex:tf,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return pf(this).formatHsl()},formatRgb:ef,toString:ef}),Wu(sf,af,Nu(Du,{brighter(t){return t=null==t?Fu:Math.pow(Fu,t),new sf(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ru:Math.pow(Ru,t),new sf(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new sf(df(this.r),df(this.g),df(this.b),cf(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:lf,formatHex:lf,formatHex8:function(){return`#${uf(this.r)}${uf(this.g)}${uf(this.b)}${uf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:hf,toString:hf})),Wu(gf,function(t,e,n,i){return 1===arguments.length?pf(t):new gf(t,e,n,null==i?1:i)},Nu(Du,{brighter(t){return t=null==t?Fu:Math.pow(Fu,t),new gf(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ru:Math.pow(Ru,t),new gf(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new sf(xf(t>=240?t-240:t+120,r,i),xf(t,r,i),xf(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new gf(mf(this.h),yf(this.s),yf(this.l),cf(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=cf(this.opacity);return`${1===t?"hsl(":"hsla("}${mf(this.h)}, ${100*yf(this.s)}%, ${100*yf(this.l)}%${1===t?")":`, ${t})`}`}}));const bf=t=>()=>t;function wf(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):bf(isNaN(t)?e:t)}const Mf=function t(e){var n=function(t){return 1===(t=+t)?wf:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):bf(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=af(t)).r,(e=af(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),a=wf(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function kf(t){return function(e){var n,i,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n<r;++n)i=af(e[n]),o[n]=i.r||0,a[n]=i.g||0,s[n]=i.b||0;return o=t(o),a=t(a),s=t(s),i.opacity=1,function(t){return i.r=o(t),i.g=a(t),i.b=s(t),i+""}}}kf(function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),r=t[i],o=t[i+1],a=i>0?t[i-1]:2*r-o,s=i<e-1?t[i+2]:2*o-r;return vf((n-i/e)*e,a,r,o,s)}}),kf(function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),r=t[(i+e-1)%e],o=t[i%e],a=t[(i+1)%e],s=t[(i+2)%e];return vf((n-i/e)*e,r,o,a,s)}});var $f=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cf=new RegExp($f.source,"g");function _f(t,e){var n,i,r,o=$f.lastIndex=Cf.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=$f.exec(t))&&(i=Cf.exec(e));)(r=i.index)>o&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Su(n,i)})),o=Cf.lastIndex;return o<e.length&&(r=e.slice(o),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)s[(n=l[i]).i]=n.x(t);return s.join("")})}function Sf(t,e){var n;return("number"==typeof e?Su:e instanceof nf?Mf:(n=nf(e))?(e=n,Mf):_f)(t,e)}function zf(t){return function(){this.removeAttribute(t)}}function Af(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ef(t,e,n){var i,r,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===i?r:r=e(i=a,n)}}function Lf(t,e,n){var i,r,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===i?r:r=e(i=a,n)}}function Pf(t,e,n){var i,r,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===i&&s===r?o:(r=s,o=e(i=a,l));this.removeAttribute(t)}}function Hf(t,e,n){var i,r,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===i&&s===r?o:(r=s,o=e(i=a,l));this.removeAttributeNS(t.space,t.local)}}function Tf(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,r)),n}return r._value=e,r}function If(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,r)),n}return r._value=e,r}function jf(t,e){return function(){$u(this,t).delay=+e.apply(this,arguments)}}function Of(t,e){return e=+e,function(){$u(this,t).delay=e}}function Wf(t,e){return function(){Cu(this,t).duration=+e.apply(this,arguments)}}function Nf(t,e){return e=+e,function(){Cu(this,t).duration=e}}var Df=Zd.prototype.constructor;function Rf(t){return function(){this.style.removeProperty(t)}}var Ff=0;function Vf(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Bf(){return++Ff}var qf=Zd.prototype;Vf.prototype=function(t){return Zd().transition(t)}.prototype={constructor:Vf,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Dc(t));for(var i=this._groups,r=i.length,o=new Array(r),a=0;a<r;++a)for(var s,l,h=i[a],c=h.length,d=o[a]=new Array(c),u=0;u<c;++u)(s=h[u])&&(l=t.call(s,s.__data__,u,h))&&("__data__"in s&&(l.__data__=s.__data__),d[u]=l,ku(d[u],e,n,u,d,_u(s,n)));return new Vf(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Fc(t));for(var i=this._groups,r=i.length,o=[],a=[],s=0;s<r;++s)for(var l,h=i[s],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var u,f=t.call(l,l.__data__,d,h),p=_u(l,n),g=0,m=f.length;g<m;++g)(u=f[g])&&ku(u,e,n,g,f,p);o.push(f),a.push(l)}return new Vf(o,a,e,n)},selectChild:qf.selectChild,selectChildren:qf.selectChildren,filter:function(t){"function"!=typeof t&&(t=Vc(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,a=e[r],s=a.length,l=i[r]=[],h=0;h<s;++h)(o=a[h])&&t.call(o,o.__data__,h,a)&&l.push(o);return new Vf(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),a=new Array(i),s=0;s<o;++s)for(var l,h=e[s],c=n[s],d=h.length,u=a[s]=new Array(d),f=0;f<d;++f)(l=h[f]||c[f])&&(u[f]=l);for(;s<i;++s)a[s]=e[s];return new Vf(a,this._parents,this._name,this._id)},selection:function(){return new Df(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Bf(),i=this._groups,r=i.length,o=0;o<r;++o)for(var a,s=i[o],l=s.length,h=0;h<l;++h)if(a=s[h]){var c=_u(a,e);ku(a,t,n,h,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Vf(i,this._parents,t,n)},call:qf.call,nodes:qf.nodes,node:qf.node,size:qf.size,empty:qf.empty,each:qf.each,on:function(t,e){var n=this._id;return arguments.length<2?_u(this.node(),n).on.on(t):this.each(function(t,e,n){var i,r,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?$u:Cu;return function(){var a=o(this,t),s=a.on;s!==i&&(r=(i=s).copy()).on(e,n),a.on=r}}(n,t,e))},attr:function(t,e){var n=rd(t),i="transform"===n?Tu:Sf;return this.attrTween(t,"function"==typeof e?(n.local?Hf:Pf)(n,i,Ou(this,"attr."+t,e)):null==e?(n.local?Af:zf)(n):(n.local?Lf:Ef)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=rd(t);return this.tween(n,(i.local?Tf:If)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Hu:Sf;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var o=gd(this,t),a=(this.style.removeProperty(t),gd(this,t));return o===a?null:o===n&&a===i?r:r=e(n=o,i=a)}}(t,i)).on("end.style."+t,Rf(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,o;return function(){var a=gd(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=gd(this,t)),a===l?null:a===i&&l===r?o:(r=l,o=e(i=a,s))}}(t,i,Ou(this,"style."+t,e))).each(function(t,e){var n,i,r,o,a="style."+e,s="end."+a;return function(){var l=Cu(this,t),h=l.on,c=null==l.value[a]?o||(o=Rf(e)):void 0;h===n&&r===c||(i=(n=h).copy()).on(s,r=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r,o=n+"";return function(){var a=gd(this,t);return a===o?null:a===i?r:r=e(i=a,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function o(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,o,n)),i}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ou(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=_u(this.node(),n).tween,o=0,a=r.length;o<a;++o)if((i=r[o]).name===t)return i.value;return null}return this.each((null==e?Iu:ju)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?jf:Of)(e,t)):_u(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Wf:Nf)(e,t)):_u(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Cu(this,t).ease=e}}(e,t)):_u(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Cu(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){0===--r&&o()}};n.each(function(){var n=Cu(this,i),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e}),0===r&&o()})},[Symbol.iterator]:qf[Symbol.iterator]};var Gf={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Yf(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Zd.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var n,i,r,o=t.__transition,a=!0;if(o){for(r in e=null==e?null:e+"",o)(n=o[r]).name===e?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[r]):a=!1;a&&delete t.__transition}}(this,t)})},Zd.prototype.transition=function(t){var e,n;t instanceof Vf?(e=t._id,t=t._name):(e=Bf(),(n=Gf).time=fu(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var a,s=i[o],l=s.length,h=0;h<l;++h)(a=s[h])&&ku(a,t,e,h,s,n||Yf(a,e));return new Vf(i,this._parents,t,e)};const{abs:Xf,max:Uf,min:Zf}=Math;function Kf(t){return{type:t}}function Qf(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,o,a,s,l,h,c,d,u,f=t._root,p={data:i},g=t._x0,m=t._y0,y=t._x1,x=t._y1;if(!f)return t._root=p,t;for(;f.length;)if((h=e>=(o=(g+y)/2))?g=o:y=o,(c=n>=(a=(m+x)/2))?m=a:x=a,r=f,!(f=f[d=c<<1|h]))return r[d]=p,t;if(s=+t._x.call(null,f.data),l=+t._y.call(null,f.data),e===s&&n===l)return p.next=f,r?r[d]=p:t._root=p,t;do{r=r?r[d]=new Array(4):t._root=new Array(4),(h=e>=(o=(g+y)/2))?g=o:y=o,(c=n>=(a=(m+x)/2))?m=a:x=a}while((d=c<<1|h)==(u=(l>=a)<<1|s>=o));return r[u]=f,r[d]=p,t}function Jf(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function tp(t){return t[0]}function ep(t){return t[1]}function np(t,e,n){var i=new ip(null==e?tp:e,null==n?ep:n,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function ip(t,e,n,i,r,o){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=r,this._y1=o,this._root=void 0}function rp(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}["w","e"].map(Kf),["n","s"].map(Kf),["n","w","e","s","nw","ne","sw","se"].map(Kf);var op=np.prototype=ip.prototype;function ap(t){return function(){return t}}function sp(t){return 1e-6*(t()-.5)}function lp(t){return t.x+t.vx}function hp(t){return t.y+t.vy}function cp(t){return t.index}function dp(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}op.copy=function(){var t,e,n=new ip(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return n;if(!i.length)return n._root=rp(i),n;for(t=[{source:i,target:n._root=new Array(4)}];i=t.pop();)for(var r=0;r<4;++r)(e=i.source[r])&&(e.length?t.push({source:e,target:i.target[r]=new Array(4)}):i.target[r]=rp(e));return n},op.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Qf(this.cover(e,n),e,n,t)},op.addAll=function(t){var e,n,i,r,o=t.length,a=new Array(o),s=new Array(o),l=1/0,h=1/0,c=-1/0,d=-1/0;for(n=0;n<o;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(r=+this._y.call(null,e))||(a[n]=i,s[n]=r,i<l&&(l=i),i>c&&(c=i),r<h&&(h=r),r>d&&(d=r));if(l>c||h>d)return this;for(this.cover(l,h).cover(c,d),n=0;n<o;++n)Qf(this,a[n],s[n],t[n]);return this},op.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,o=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,o=(i=Math.floor(e))+1;else{for(var a,s,l=r-n||1,h=this._root;n>t||t>=r||i>e||e>=o;)switch(s=(e<i)<<1|t<n,(a=new Array(4))[s]=h,h=a,l*=2,s){case 0:r=n+l,o=i+l;break;case 1:n=r-l,o=i+l;break;case 2:r=n+l,i=o-l;break;case 3:n=r-l,i=o-l}this._root&&this._root.length&&(this._root=h)}return this._x0=n,this._y0=i,this._x1=r,this._y1=o,this},op.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},op.extent=function(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]]},op.find=function(t,e,n){var i,r,o,a,s,l,h,c=this._x0,d=this._y0,u=this._x1,f=this._y1,p=[],g=this._root;for(g&&p.push(new Jf(g,c,d,u,f)),null==n?n=1/0:(c=t-n,d=e-n,u=t+n,f=e+n,n*=n);l=p.pop();)if(!(!(g=l.node)||(r=l.x0)>u||(o=l.y0)>f||(a=l.x1)<c||(s=l.y1)<d))if(g.length){var m=(r+a)/2,y=(o+s)/2;p.push(new Jf(g[3],m,y,a,s),new Jf(g[2],r,y,m,s),new Jf(g[1],m,o,a,y),new Jf(g[0],r,o,m,y)),(h=(e>=y)<<1|t>=m)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-h],p[p.length-1-h]=l)}else{var x=t-+this._x.call(null,g.data),v=e-+this._y.call(null,g.data),b=x*x+v*v;if(b<n){var w=Math.sqrt(n=b);c=t-w,d=e-w,u=t+w,f=e+w,i=g.data}}return i},op.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,i,r,o,a,s,l,h,c,d,u,f=this._root,p=this._x0,g=this._y0,m=this._x1,y=this._y1;if(!f)return this;if(f.length)for(;;){if((h=o>=(s=(p+m)/2))?p=s:m=s,(c=a>=(l=(g+y)/2))?g=l:y=l,e=f,!(f=f[d=c<<1|h]))return this;if(!f.length)break;(e[d+1&3]||e[d+2&3]||e[d+3&3])&&(n=e,u=d)}for(;f.data!==t;)if(i=f,!(f=f.next))return this;return(r=f.next)&&delete f.next,i?(r?i.next=r:delete i.next,this):e?(r?e[d]=r:delete e[d],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[u]=f:this._root=f),this):(this._root=r,this)},op.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},op.root=function(){return this._root},op.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},op.visit=function(t){var e,n,i,r,o,a,s=[],l=this._root;for(l&&s.push(new Jf(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,i=e.x0,r=e.y0,o=e.x1,a=e.y1)&&l.length){var h=(i+o)/2,c=(r+a)/2;(n=l[3])&&s.push(new Jf(n,h,c,o,a)),(n=l[2])&&s.push(new Jf(n,i,c,h,a)),(n=l[1])&&s.push(new Jf(n,h,r,o,c)),(n=l[0])&&s.push(new Jf(n,i,r,h,c))}return this},op.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new Jf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var r=e.node;if(r.length){var o,a=e.x0,s=e.y0,l=e.x1,h=e.y1,c=(a+l)/2,d=(s+h)/2;(o=r[0])&&n.push(new Jf(o,a,s,c,d)),(o=r[1])&&n.push(new Jf(o,c,s,l,d)),(o=r[2])&&n.push(new Jf(o,a,d,c,h)),(o=r[3])&&n.push(new Jf(o,c,d,l,h))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},op.x=function(t){return arguments.length?(this._x=t,this):this._x},op.y=function(t){return arguments.length?(this._y=t,this):this._y};const up=4294967296;function fp(t){return t.x}function pp(t){return t.y}var gp=Math.PI*(3-Math.sqrt(5));function mp(t){var e=0,n=t.children,i=n&&n.length;if(i)for(;--i>=0;)e+=n[i].value;else e=1;t.value=e}function yp(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=vp)):void 0===e&&(e=xp);for(var n,i,r,o,a,s=new Mp(t),l=[s];n=l.pop();)if((r=e(n.data))&&(a=(r=Array.from(r)).length))for(n.children=r,o=a-1;o>=0;--o)l.push(i=r[o]=new Mp(r[o])),i.parent=n,i.depth=n.depth+1;return s.eachBefore(wp)}function xp(t){return t.children}function vp(t){return Array.isArray(t)?t[1]:null}function bp(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function wp(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Mp(t){this.data=t,this.depth=this.height=0,this.parent=null}function kp(t,e){return t.parent===e.parent?1:2}function $p(t){var e=t.children;return e?e[0]:t.t}function Cp(t){var e=t.children;return e?e[e.length-1]:t.t}function _p(t,e,n){var i=n/(e.i-t.i);e.c-=i,e.s+=n,t.c+=i,e.z+=n,e.m+=n}function Sp(t,e,n){return t.a.parent===e.parent?t.a:n}function zp(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}Mp.prototype=yp.prototype={constructor:Mp,count:function(){return this.eachAfter(mp)},each:function(t,e){let n=-1;for(const i of this)t.call(e,i,++n,this);return this},eachAfter:function(t,e){for(var n,i,r,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(i=0,r=n.length;i<r;++i)a.push(n[i]);for(;o=s.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,i,r=this,o=[r],a=-1;r=o.pop();)if(t.call(e,r,++a,this),n=r.children)for(i=n.length-1;i>=0;--i)o.push(n[i]);return this},find:function(t,e){let n=-1;for(const i of this)if(t.call(e,i,++n,this))return i},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;for(t=n.pop(),e=i.pop();t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return yp(this).eachBefore(bp)},[Symbol.iterator]:function*(){var t,e,n,i,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,e=r.children)for(n=0,i=e.length;n<i;++n)o.push(e[n])}while(o.length)}},zp.prototype=Object.create(Mp.prototype);const Ap=Math.sqrt(50),Ep=Math.sqrt(10),Lp=Math.sqrt(2);function Pp(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),a=o>=Ap?10:o>=Ep?5:o>=Lp?2:1;let s,l,h;return r<0?(h=Math.pow(10,-r)/a,s=Math.round(t*h),l=Math.round(e*h),s/h<t&&++s,l/h>e&&--l,h=-h):(h=Math.pow(10,r)*a,s=Math.round(t/h),l=Math.round(e/h),s*h<t&&++s,l*h>e&&--l),l<s&&.5<=n&&n<2?Pp(t,e,2*n):[s,l,h]}function Hp(t,e,n){return Pp(t=+t,e=+e,n=+n)[2]}function Tp(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ip(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jp(t){let e,n,i;function r(t,i,r=0,o=t.length){if(r<o){if(0!==e(i,i))return o;do{const e=r+o>>>1;n(t[e],i)<0?r=e+1:o=e}while(r<o)}return r}return 2!==t.length?(e=Tp,n=(e,n)=>Tp(t(e),n),i=(e,n)=>t(e)-n):(e=t===Tp||t===Ip?t:Op,n=t,i=t),{left:r,center:function(t,e,n=0,o=t.length){const a=r(t,e,n,o-1);return a>n&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,r=0,o=t.length){if(r<o){if(0!==e(i,i))return o;do{const e=r+o>>>1;n(t[e],i)<=0?r=e+1:o=e}while(r<o)}return r}}}function Op(){return 0}const Wp=jp(Tp),Np=Wp.right,Dp=(Wp.left,jp(function(t){return null===t?NaN:+t}).center,Np);function Rp(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,o=new Array(r),a=new Array(i);for(n=0;n<r;++n)o[n]=qp(t[n],e[n]);for(;n<i;++n)a[n]=e[n];return function(t){for(n=0;n<r;++n)a[n]=o[n](t);return a}}function Fp(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Vp(t,e){var n,i={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=qp(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}function Bp(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(o){for(n=0;n<i;++n)r[n]=t[n]*(1-o)+e[n]*o;return r}}function qp(t,e){var n,i=typeof e;return null==e||"boolean"===i?bf(e):("number"===i?Su:"string"===i?(n=nf(e))?(e=n,Mf):_f:e instanceof nf?Mf:e instanceof Date?Fp:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Bp:Array.isArray(e)?Rp:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Vp:Su)(t,e)}function Gp(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Yp(t){return+t}var Xp=[0,1];function Up(t){return t}function Zp(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Kp(t,e,n){var i=t[0],r=t[1],o=e[0],a=e[1];return r<i?(i=Zp(r,i),o=n(a,o)):(i=Zp(i,r),o=n(o,a)),function(t){return o(i(t))}}function Qp(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)r[a]=Zp(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Dp(t,e,1,i)-1;return o[n](r[n](e))}}function Jp(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var tg,eg=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ng(t){if(!(e=eg.exec(t)))throw new Error("invalid format: "+t);var e;return new ig({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]})}function ig(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function rg(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function og(t){return(t=rg(Math.abs(t)))?t[1]:NaN}function ag(t,e){var n=rg(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}ng.prototype=ig.prototype,ig.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const sg={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},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)=>ag(100*t,e),r:ag,s:function(t,e){var n=rg(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(tg=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+rg(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function lg(t){return t}var hg,cg,dg,ug=Array.prototype.map,fg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pg(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[r,o,a]=i?Pp(e,t,n):Pp(t,e,n);if(!(o>=r))return[];const s=o-r+1,l=new Array(s);if(i)if(a<0)for(let t=0;t<s;++t)l[t]=(o-t)/-a;else for(let t=0;t<s;++t)l[t]=(o-t)*a;else if(a<0)for(let t=0;t<s;++t)l[t]=(r+t)/-a;else for(let t=0;t<s;++t)l[t]=(r+t)*a;return l}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return function(t,e,n,i){var r,o=function(t,e,n){n=+n;const i=(e=+e)<(t=+t),r=i?Hp(e,t,n):Hp(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}(t,e,n);switch((i=ng(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(og(e)/3)))-og(Math.abs(t)))}(o,a))||(i.precision=r),dg(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,og(e)-og(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-og(Math.abs(t)))}(o))||(i.precision=r-2*("%"===i.type))}return cg(i)}(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,o=e(),a=0,s=o.length-1,l=o[a],h=o[s],c=10;for(h<l&&(r=l,l=h,h=r,r=a,a=s,s=r);c-- >0;){if((r=Hp(l,h,n))===i)return o[a]=l,o[s]=h,e(o);if(r>0)l=Math.floor(l/r)*r,h=Math.ceil(h/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,h=Math.floor(h*r)/r}i=r}return t},t}function gg(){var t=function(){var t,e,n,i,r,o,a=Xp,s=Xp,l=qp,h=Up;function c(){var t=Math.min(a.length,s.length);return h!==Up&&(h=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(a[0],a[t-1])),i=t>2?Qp:Kp,r=o=null,d}function d(e){return null==e||isNaN(e=+e)?n:(r||(r=i(a.map(t),s,l)))(t(h(e)))}return d.invert=function(n){return h(e((o||(o=i(s,a.map(t),Su)))(n)))},d.domain=function(t){return arguments.length?(a=Array.from(t,Yp),c()):a.slice()},d.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},d.rangeRound=function(t){return s=Array.from(t),l=Gp,c()},d.clamp=function(t){return arguments.length?(h=!!t||Up,c()):h!==Up},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(n=t,d):n},function(n,i){return t=n,e=i,c()}}()(Up,Up);return t.copy=function(){return e=t,gg().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());var e},Jp.apply(t,arguments),pg(t)}function mg(t){return function(){return t}}hg=function(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?lg:(e=ug.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,o=[],a=0,s=e[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(t.substring(r-=s,r+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?lg:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(ug.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t){var e=(t=ng(t)).fill,n=t.align,d=t.sign,u=t.symbol,f=t.zero,p=t.width,g=t.comma,m=t.precision,y=t.trim,x=t.type;"n"===x?(g=!0,x="g"):sg[x]||(void 0===m&&(m=12),y=!0,x="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var v="$"===u?r:"#"===u&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",b="$"===u?o:/[%p]/.test(x)?l:"",w=sg[x],M=/[defgprs%]/.test(x);function k(t){var r,o,l,u=v,k=b;if("c"===x)k=w(t)+k,t="";else{var $=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),m),y&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(!+t[i])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),$&&0===+t&&"+"!==d&&($=!1),u=($?"("===d?d:h:"-"===d||"("===d?"":d)+u,k=("s"===x?fg[8+tg/3]:"")+k+($&&"("===d?")":""),M)for(r=-1,o=t.length;++r<o;)if(48>(l=t.charCodeAt(r))||l>57){k=(46===l?a+t.slice(r+1):t.slice(r))+k,t=t.slice(0,r);break}}g&&!f&&(t=i(t,1/0));var C=u.length+t.length+k.length,_=C<p?new Array(p-C+1).join(e):"";switch(g&&f&&(t=i(_+t,_.length?p-k.length:1/0),_=""),n){case"<":t=u+t+k+_;break;case"=":t=u+_+t+k;break;case"^":t=_.slice(0,C=_.length>>1)+u+t+k+_.slice(C);break;default:t=_+u+t+k}return s(t)}return m=void 0===m?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),k.toString=function(){return t+""},k}return{format:d,formatPrefix:function(t,e){var n=d(((t=ng(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(og(e)/3))),r=Math.pow(10,-i),o=fg[8+i/3];return function(t){return n(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),cg=hg.format,dg=hg.formatPrefix;const yg=Math.abs,xg=Math.atan2,vg=Math.cos,bg=Math.max,wg=Math.min,Mg=Math.sin,kg=Math.sqrt,$g=1e-12,Cg=Math.PI,_g=Cg/2,Sg=2*Cg;function zg(t){return t>=1?_g:t<=-1?-_g:Math.asin(t)}const Ag=Math.PI,Eg=2*Ag,Lg=1e-6,Pg=Eg-Lg;function Hg(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class Tg{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Hg:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Hg;const n=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,i){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,e,n,i,r,o){this._append`C${+t},${+e},${+n},${+i},${this._x1=+r},${this._y1=+o}`}arcTo(t,e,n,i,r){if(t=+t,e=+e,n=+n,i=+i,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=this._x1,a=this._y1,s=n-t,l=i-e,h=o-t,c=a-e,d=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(d>Lg)if(Math.abs(c*s-l*h)>Lg&&r){let u=n-o,f=i-a,p=s*s+l*l,g=u*u+f*f,m=Math.sqrt(p),y=Math.sqrt(d),x=r*Math.tan((Ag-Math.acos((p+d-g)/(2*m*y)))/2),v=x/y,b=x/m;Math.abs(v-1)>Lg&&this._append`L${t+v*h},${e+v*c}`,this._append`A${r},${r},0,0,${+(c*u>h*f)},${this._x1=t+b*s},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,i,r,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(i),s=n*Math.sin(i),l=t+a,h=e+s,c=1^o,d=o?i-r:r-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>Lg||Math.abs(this._y1-h)>Lg)&&this._append`L${l},${h}`,n&&(d<0&&(d=d%Eg+Eg),d>Pg?this._append`A${n},${n},0,1,${c},${t-a},${e-s}A${n},${n},0,1,${c},${this._x1=l},${this._y1=h}`:d>Lg&&this._append`A${n},${n},0,${+(d>=Ag)},${c},${this._x1=t+n*Math.cos(r)},${this._y1=e+n*Math.sin(r)}`)}rect(t,e,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Ig(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Tg(e)}function jg(t){return t.innerRadius}function Og(t){return t.outerRadius}function Wg(t){return t.startAngle}function Ng(t){return t.endAngle}function Dg(t){return t&&t.padAngle}function Rg(t,e,n,i,r,o,a){var s=t-n,l=e-i,h=(a?o:-o)/kg(s*s+l*l),c=h*l,d=-h*s,u=t+c,f=e+d,p=n+c,g=i+d,m=(u+p)/2,y=(f+g)/2,x=p-u,v=g-f,b=x*x+v*v,w=r-o,M=u*g-p*f,k=(v<0?-1:1)*kg(bg(0,w*w*b-M*M)),$=(M*v-x*k)/b,C=(-M*x-v*k)/b,_=(M*v+x*k)/b,S=(-M*x+v*k)/b,z=$-m,A=C-y,E=_-m,L=S-y;return z*z+A*A>E*E+L*L&&($=_,C=S),{cx:$,cy:C,x01:-c,y01:-d,x11:$*(r/w-1),y11:C*(r/w-1)}}function Fg(){var t=jg,e=Og,n=mg(0),i=null,r=Wg,o=Ng,a=Dg,s=null,l=Ig(h);function h(){var h,c,d=+t.apply(this,arguments),u=+e.apply(this,arguments),f=r.apply(this,arguments)-_g,p=o.apply(this,arguments)-_g,g=yg(p-f),m=p>f;if(s||(s=h=l()),u<d&&(c=u,u=d,d=c),u>$g)if(g>Sg-$g)s.moveTo(u*vg(f),u*Mg(f)),s.arc(0,0,u,f,p,!m),d>$g&&(s.moveTo(d*vg(p),d*Mg(p)),s.arc(0,0,d,p,f,m));else{var y,x,v=f,b=p,w=f,M=p,k=g,$=g,C=a.apply(this,arguments)/2,_=C>$g&&(i?+i.apply(this,arguments):kg(d*d+u*u)),S=wg(yg(u-d)/2,+n.apply(this,arguments)),z=S,A=S;if(_>$g){var E=zg(_/d*Mg(C)),L=zg(_/u*Mg(C));(k-=2*E)>$g?(w+=E*=m?1:-1,M-=E):(k=0,w=M=(f+p)/2),($-=2*L)>$g?(v+=L*=m?1:-1,b-=L):($=0,v=b=(f+p)/2)}var P=u*vg(v),H=u*Mg(v),T=d*vg(M),I=d*Mg(M);if(S>$g){var j,O=u*vg(b),W=u*Mg(b),N=d*vg(w),D=d*Mg(w);if(g<Cg)if(j=function(t,e,n,i,r,o,a,s){var l=n-t,h=i-e,c=a-r,d=s-o,u=d*l-c*h;if(!(u*u<$g))return[t+(u=(c*(e-o)-d*(t-r))/u)*l,e+u*h]}(P,H,N,D,O,W,T,I)){var R=P-j[0],F=H-j[1],V=O-j[0],B=W-j[1],q=1/Mg(function(t){return t>1?0:t<-1?Cg:Math.acos(t)}((R*V+F*B)/(kg(R*R+F*F)*kg(V*V+B*B)))/2),G=kg(j[0]*j[0]+j[1]*j[1]);z=wg(S,(d-G)/(q-1)),A=wg(S,(u-G)/(q+1))}else z=A=0}$>$g?A>$g?(y=Rg(N,D,P,H,u,A,m),x=Rg(O,W,T,I,u,A,m),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<S?s.arc(y.cx,y.cy,A,xg(y.y01,y.x01),xg(x.y01,x.x01),!m):(s.arc(y.cx,y.cy,A,xg(y.y01,y.x01),xg(y.y11,y.x11),!m),s.arc(0,0,u,xg(y.cy+y.y11,y.cx+y.x11),xg(x.cy+x.y11,x.cx+x.x11),!m),s.arc(x.cx,x.cy,A,xg(x.y11,x.x11),xg(x.y01,x.x01),!m))):(s.moveTo(P,H),s.arc(0,0,u,v,b,!m)):s.moveTo(P,H),d>$g&&k>$g?z>$g?(y=Rg(T,I,O,W,d,-z,m),x=Rg(P,H,N,D,d,-z,m),s.lineTo(y.cx+y.x01,y.cy+y.y01),z<S?s.arc(y.cx,y.cy,z,xg(y.y01,y.x01),xg(x.y01,x.x01),!m):(s.arc(y.cx,y.cy,z,xg(y.y01,y.x01),xg(y.y11,y.x11),!m),s.arc(0,0,d,xg(y.cy+y.y11,y.cx+y.x11),xg(x.cy+x.y11,x.cx+x.x11),m),s.arc(x.cx,x.cy,z,xg(x.y11,x.x11),xg(x.y01,x.x01),!m))):s.arc(0,0,d,M,w,m):s.lineTo(T,I)}else s.moveTo(0,0);if(s.closePath(),h)return s=null,h+""||null}return h.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-Cg/2;return[vg(i)*n,Mg(i)*n]},h.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:mg(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:mg(+t),h):e},h.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:mg(+t),h):n},h.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:mg(+t),h):i},h.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:mg(+t),h):r},h.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:mg(+t),h):o},h.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:mg(+t),h):a},h.context=function(t){return arguments.length?(s=null==t?null:t,h):s},h}function Vg(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Bg(t){this._context=t}function qg(t){return new Bg(t)}function Gg(t){return t[0]}function Yg(t){return t[1]}function Xg(t,e){var n=mg(!0),i=null,r=qg,o=null,a=Ig(s);function s(s){var l,h,c,d=(s=Vg(s)).length,u=!1;for(null==i&&(o=r(c=a())),l=0;l<=d;++l)!(l<d&&n(h=s[l],l,s))===u&&((u=!u)?o.lineStart():o.lineEnd()),u&&o.point(+t(h,l,s),+e(h,l,s));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?Gg:mg(t),e="function"==typeof e?e:void 0===e?Yg:mg(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:mg(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:mg(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:mg(!!t),s):n},s.curve=function(t){return arguments.length?(r=t,null!=i&&(o=r(i)),s):r},s.context=function(t){return arguments.length?(null==t?i=o=null:o=r(i=t),s):i},s}function Ug(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Zg(t){return t}function Kg(t,e,n){this.k=t,this.x=e,this.y=n}Array.prototype.slice,Bg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}},Kg.prototype={constructor:Kg,scale:function(t){return 1===t?this:new Kg(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Kg(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+")"}},new Kg(1,0,0),Kg.prototype,Pc("progress-card",{component:t=>{const[{datum:e,data:n,indexes:i,width:r=280,height:o=120,iconSize:a=32,gap:s=12,progressHeight:l=8,borderRadius:h=12,positionH:c="normal",themeColors:d,valueFormatter:u=t=>`${t}%`},f]=Ac(t,["width","height","iconSize","gap","progressHeight","borderRadius"]),p=e.value,g=p??0,m=Math.max(...n.items.map(t=>t.value??0),100),y=r-2*s,x=gg().domain([0,m]).range([0,y])(g),v=`${d.colorPrimary}-progress`,b=`${d.colorPrimaryBg}-progress-bg`,w=Wh(C(lc,{indexes:i})),M="flipped"===c?r-s-a:s,k=s,$="flipped"===c?s:a+2*s,S=r-a-3*s,A=k,L=o-s-l,P=void 0!==p;return _(E,{...f,children:[_(z,{children:[_("linearGradient",{id:v,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[C("stop",{offset:"0%",stopColor:d.colorPrimary}),C("stop",{offset:"100%",stopColor:ks.mix(d.colorPrimary,"#fff",20).toHexString()})]}),_("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[C("stop",{offset:"0%",stopColor:d.colorPrimaryBg}),C("stop",{offset:"100%",stopColor:d.colorBg})]})]}),C(H,{x:0,y:0,width:r,height:o,fill:d.colorBgElevated,stroke:d.colorPrimaryBg,strokeWidth:1,rx:h,ry:h,"data-element-type":"shape"}),C(ac,{indexes:i,x:M,y:k,size:a,fill:d.colorPrimary}),C(lc,{indexes:i,x:$,y:A,width:S,alignHorizontal:"flipped"===c?"right":"left",alignVertical:"top",fontSize:16,fontWeight:"medium",fill:d.colorText,children:e.label}),P&&C(cc,{indexes:i,x:$,y:A+w.height,width:S,alignHorizontal:"flipped"===c?"right":"left",alignVertical:"top",lineHeight:1,fontSize:24,fontWeight:"bold",fill:d.colorPrimary,value:g,formatter:u}),C(oc,{indexes:i,x:$,y:A+w.height+(P?27:4),width:S,alignHorizontal:"flipped"===c?"right":"left",alignVertical:"top",fontSize:11,fill:d.colorTextSecondary,lineNumber:P?2:3,wordWrap:!0,children:e.desc}),C(H,{x:s,y:L,width:y,height:l,fill:`url(#${b})`,rx:l/2,ry:l/2,"data-element-type":"shape"}),C(H,{x:s,y:L,width:x,height:l,fill:`url(#${v})`,rx:l/2,ry:l/2,"data-element-type":"shape"})]})},composites:["icon","label","value","desc"]}),Pc("quarter-circular",{component:t=>{const[{datum:e,indexes:n,width:i=280,height:r=120,iconSize:o=30,circleRadius:a=80,positionH:s="normal",positionV:l="normal",themeColors:h},c]=Ac(t,["width","height","iconSize","circleRadius"]),d=4*a/(3*Math.PI),u=40,f=String(n[0]+1).padStart(2,"0"),p="flipped"===s,g="flipped"===l,m=p?{diagonalStartX:i-4,diagonalStartY:g?r-35:35,diagonalEndX:i-u,diagonalEndY:g?r-4:4,topLineStartX:i-u,topLineEndX:d,topLineY:g?r-4:4}:{diagonalStartX:4,diagonalStartY:g?r-35:35,diagonalEndX:u,diagonalEndY:g?r-4:4,topLineStartX:u,topLineEndX:i-d,topLineY:g?r-4:4},y=(()=>{if(p){const t=a+10;return{valueX:i-30,contentX:t,contentWidth:i-t-u,circleX:0,circleY:g?0:r,iconX:d-o/2}}return{valueX:0,contentX:u,contentWidth:i-u-a-10,circleX:i,circleY:g?0:r,iconX:i-d-o/2}})(),x=g?d-o/2:r-d-o/2,v=20+Wh(C(lc,{indexes:n,width:y.contentWidth,children:e.label})).height+8;return _(E,{...c,width:i,height:r,children:[_(dc,{children:[C(L,{d:`M ${m.diagonalStartX} ${m.diagonalStartY} L ${m.diagonalEndX} ${m.diagonalEndY}`,stroke:h.colorPrimary,strokeWidth:2,fill:"none"}),C(L,{d:`M ${m.topLineStartX} ${m.topLineY} L ${m.topLineEndX} ${m.topLineY}`,stroke:h.colorPrimary,strokeWidth:2,fill:"none"}),C(A,{x:m.diagonalStartX-4,y:m.diagonalStartY-4,width:8,height:8,fill:h.colorPrimary}),C(A,{x:m.topLineEndX-4,y:m.topLineY-4,width:8,height:8,fill:h.colorPrimary})]}),_(E,{children:[C(Ph,{x:y.valueX,y:40,fontSize:28,fontWeight:"bold",fill:h.colorPrimary,children:f}),C(L,{d:(()=>{const{circleX:t,circleY:e}=y;return p?g?`M ${t} ${e} L ${t} ${e+a} A ${a} ${a} 0 0 0 ${t+a} ${e} Z`:`M ${t} ${e} L ${t} ${e-a} A ${a} ${a} 0 0 1 ${t+a} ${e} Z`:g?`M ${t} ${e} L ${t} ${e+a} A ${a} ${a} 0 0 1 ${t-a} ${e} Z`:`M ${t} ${e} L ${t} ${e-a} A ${a} ${a} 0 0 0 ${t-a} ${e} Z`})(),fill:h.colorPrimary,"data-element-type":"shape"}),e.icon&&C(ac,{indexes:n,x:y.iconX,y:x,size:o,fill:h.colorWhite}),e.label&&C(lc,{indexes:n,x:y.contentX,y:20,width:y.contentWidth,fontWeight:"bold",fill:h.colorText,alignHorizontal:p?"right":"left",children:e.label}),e.desc&&C(oc,{indexes:n,x:y.contentX,y:v,width:y.contentWidth,fill:h.colorTextSecondary,alignHorizontal:p?"right":"left",children:e.desc})]})]})},composites:["icon","label","desc"]}),Pc("quarter-simple-card",{component:t=>{const[{datum:e,indexes:n,width:i=150,height:r=150,iconSize:o=30,padding:a=20,borderRadius:s=16,positionH:l="center",positionV:h="middle",themeColors:c},d]=Ac(t,["width","height","iconSize","padding","borderRadius"]),u=i-2*a,f="flipped"===l?i-a-o:"center"===l?(i-o)/2:a,p=a,g=p+o+8,m="flipped"===l?i-a-u:a,y=g+Wh(C(lc,{indexes:n,width:u,children:e.label})).height+4,x=m;let v="";return v="center"===l&&"middle"===h?`\n M ${s} 0\n L ${i-s} 0\n Q ${i} 0 ${i} ${s}\n L ${i} ${r-s}\n Q ${i} ${r} ${i-s} ${r}\n L ${s} ${r}\n Q 0 ${r} 0 ${r-s}\n L 0 ${s}\n Q 0 0 ${s} 0\n Z\n`:"flipped"===l&&"flipped"===h?`\n M ${s} 0\n L ${i-s} 0\n Q ${i} 0 ${i} ${s}\n L ${i} ${r-s}\n Q ${i} ${r} ${i-s} ${r}\n L ${s} ${r}\n Q 0 ${r} 0 ${r-s}\n L 0 0\n L ${s} 0\n Z\n`:"normal"===l&&"flipped"===h?`\n M 0 0\n L ${i} 0\n L ${i} ${r-s}\n Q ${i} ${r} ${i-s} ${r}\n L ${s} ${r}\n Q 0 ${r} 0 ${r-s}\n L 0 ${s}\n Q 0 0 ${s} 0\n Z\n`:"flipped"===l?`\n M ${s} 0\n L ${i-s} 0\n Q ${i} 0 ${i} ${s}\n L ${i} ${r-s}\n Q ${i} ${r} ${i-s} ${r}\n L 0 ${r}\n L 0 ${s}\n Q 0 0 ${s} 0\n Z\n`:`\n M ${s} 0\n L ${i-s} 0\n Q ${i} 0 ${i} ${s}\n L ${i} ${r}\n L ${s} ${r}\n Q 0 ${r} 0 ${r-s}\n L 0 ${s}\n Q 0 0 ${s} 0\n Z\n`,_(E,{...d,children:[C(L,{d:v,x:0,y:0,width:i,height:r,fill:c.colorPrimary,"data-element-type":"shape"}),C(ac,{indexes:n,x:f,y:p,size:o,fill:c.colorBg}),C(lc,{indexes:n,x:m,y:g,width:u,fontSize:14,fontWeight:"bold",fill:c.colorBg,alignHorizontal:"flipped"===l?"right":"left",children:e.label}),e.desc&&C(oc,{indexes:n,x,y,width:u,fontSize:11,wordWrap:!0,fill:c.colorBg,alignHorizontal:"flipped"===l?"right":"left",children:e.desc})]})},composites:["icon","label","desc"]}),Pc("ribbon-card",{component:t=>{const[{datum:e,indexes:n,width:i=240,height:r=140,iconSize:o=28,gap:a=12,ribbonHeight:s=32,themeColors:l},h]=Ac(t,["width","height","iconSize","gap","ribbonHeight"]),c=`${l.colorPrimary}-ribbon`;return _(E,{...h,children:[C(z,{children:_("linearGradient",{id:c,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[C("stop",{offset:"0%",stopColor:l.colorPrimary}),C("stop",{offset:"100%",stopColor:ks(l.colorPrimary).darken(15).toHexString()})]})}),_(dc,{children:[C(H,{x:0,y:0,width:i,height:r,fill:l.colorBgElevated,stroke:l.colorPrimaryBg,strokeWidth:1,rx:8,ry:8}),C(H,{x:0,y:0,width:i,height:s,fill:`url(#${c})`,rx:8,ry:8}),C(H,{x:0,y:8,width:i,height:s-8,fill:`url(#${c})`}),C(L,{x:i-20,y:s,width:20,height:8,fill:ks(l.colorPrimary).darken(25).toHexString(),d:"M0,0 L20,0 L15,8 L5,8 Z"})]}),C(ac,{indexes:n,x:a,y:s+a,size:o,fill:l.colorPrimary}),C(lc,{indexes:n,x:o+2*a,y:s+a,width:i-o-3*a,height:o,alignHorizontal:"left",alignVertical:"middle",lineHeight:1,fontWeight:"bold",fill:l.colorText,children:e.label}),C(oc,{indexes:n,x:a,y:s+o+a+5,width:i-2*a,alignHorizontal:"left",fill:l.colorTextSecondary,lineNumber:3,wordWrap:!0,children:e.desc}),C(ac,{indexes:n,x:i-a-8,y:a/2,size:16,fill:l.colorWhite})]})},composites:["icon","label","desc"]}),Pc("rounded-rect-node",{component:t=>{const[{indexes:e,datum:n,themeColors:i,width:r=300,height:o=40,padding:a=4,positionH:s="normal"},l]=Ac(t,["width","height","borderRadius","padding"]),h=o/2,c=h,d=a,u=r-2*h,f=o-2*a;return _(E,{...l,children:[C(H,{"data-element-type":"shape",width:r,height:o,rx:h,ry:h,fill:i.colorPrimaryBg,stroke:i.colorPrimary,strokeWidth:1,opacity:.8}),C(lc,{indexes:e,x:c,y:d,width:u,height:f,alignHorizontal:"flipped"===s?"right":"center"===s?"center":"left",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:i.colorText,children:n.label})]})},composites:["label"]});const Qg=t=>{const{x:e=0,y:n=0,width:i=100,height:r=40,fill:o="#FF356A",size:a=10}=t;return C(P,{width:i,height:r,points:[{x:e,y:n},{x:e+i-a,y:n},{x:e+i,y:n+r/2},{x:e+i-a,y:n+r},{x:e,y:n+r},{x:e+a,y:n+r/2}],fill:o,"data-element-type":"shape"})};Pc("simple-horizontal-arrow",{component:t=>{const[{indexes:e,datum:n,width:i=140,themeColors:r,positionV:o="normal"},a]=Ac(t,["width"]),s="flipped"!==o,l=s?"bottom":"top",h=C(lc,{indexes:e,width:i,fill:r.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),c=C(oc,{indexes:e,width:i,fill:r.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),d=10,u=Wh(h),f=Wh(c),p=u.height+f.height;return C(E,{width:i,height:p+d+30+d+p,...a,children:_(fc,{flexDirection:"column",alignItems:"center",children:[s?_($,{children:[c,h,C(ic,{height:d})]}):C($,{children:C(ic,{height:p+d})}),_(uc,{horizontal:"center",vertical:"middle",children:[C(Qg,{width:i,height:30,fill:r.colorPrimary}),C(Ph,{width:i,height:30,alignHorizontal:"center",alignVertical:"middle",fill:r.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),s?C($,{children:C(ic,{height:p+d})}):_($,{children:[C(ic,{height:d}),h,c]})]})})},composites:["label","desc","time"]}),Pc("simple-illus",{component:t=>{const[{indexes:e,datum:n,width:i=180,illusSize:r=i,gap:o=8,themeColors:a,usePaletteColor:s=!1},l]=Ac(t,["width","illusSize","gap","usePaletteColor"]),{label:h,desc:c}=n,d=s?a.colorPrimary:a.colorText,u=C(lc,{indexes:e,width:i,alignHorizontal:"center",alignVertical:"middle",fill:d,children:h}),f=Wh(u);return _(fc,{...l,width:i,height:r+o+f.height+o+48,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o,children:[C(rc,{indexes:e,width:r,height:r}),u,C(oc,{indexes:e,width:i,alignHorizontal:"center",alignVertical:"top",fill:a.colorTextSecondary,lineNumber:3,children:c})]})},composites:["illus","label","desc"]}),Pc("simple",{component:t=>{const[{indexes:e,datum:n,width:i=200,height:r,gap:o=4,showIcon:a=!0,iconSize:s=30,iconType:l="default",positionH:h="normal",positionV:c="normal",usePaletteColor:d=!1,themeColors:u},f]=Ac(t,["width","height","gap","showIcon","iconSize","iconType","usePaletteColor"]),{label:p,desc:g,icon:m}=n,y="normal"===(x=h)?"left":"flipped"===x?"right":"center";var x;const v=d?u.colorPrimary:u.colorText,b=Wh(C(lc,{indexes:e,width:i,alignHorizontal:"center",alignVertical:"middle",fill:v,children:p})),w=a?"circle"===l?C(sc,{indexes:e,size:s,fill:u.colorPrimary,colorBg:u.colorBg}):C(ac,{indexes:e,size:s,fill:u.colorTextSecondary}):null;if(!a||!m){const t=r?Math.max(0,r-b.height-o):void 0,n=t?t<=60?1:Math.floor(t/(1.4*14)):2,a=r?"middle"===c?(r-b.height-(t||0)-o)/2:"flipped"===c?r-b.height-(t||0)-o:0:0;return _(E,{...f,children:[C(lc,{indexes:e,width:i,y:a,alignHorizontal:y,alignVertical:"middle",fill:v,children:p}),C(oc,{indexes:e,width:i,height:t,y:a+b.height+o,alignHorizontal:y,alignVertical:"top",lineNumber:n,fill:u.colorTextSecondary,children:g})]})}if("center"===h){const t=a&&m?s:0,n=r?Math.max(0,r-b.height-t-2*o):void 0,l=n?n<=60?1:Math.floor(n/(1.4*14)):2,h=b.height+(n||0)+o,d=r?"middle"===c?(r-h-t-o)/2:"flipped"===c?r-h-t-o:0:0;return C(fc,{...f,flexDirection:"column",gap:o,alignItems:"center",children:_($,"flipped"===c?{children:[_(E,{children:[C(lc,{indexes:e,width:i,y:d,alignHorizontal:"center",alignVertical:"middle",fill:v,children:p}),C(oc,{indexes:e,width:i,height:n,y:d+b.height+o,alignHorizontal:"center",alignVertical:"bottom",lineNumber:l,fill:u.colorTextSecondary,children:g})]}),w]}:{children:[w,_(E,{children:[C(lc,{indexes:e,width:i,y:d,alignHorizontal:"center",alignVertical:"middle",fill:v,children:p}),C(oc,{indexes:e,width:i,height:n,y:d+b.height+o,alignHorizontal:"center",alignVertical:"top",lineNumber:l,fill:u.colorTextSecondary,children:g})]})]})})}const M=Wh(w),k=Math.max(i-M.width-o,0),S=r?Math.max(0,r-b.height-o):void 0,z=S?S<=60?1:Math.floor(S/(1.4*14)):2,A=r?"middle"===c?(r-b.height-(S||0)-o)/2:"flipped"===c?r-b.height-(S||0)-o:0:0;return C(fc,{...f,flexDirection:"row",gap:o,alignItems:function(t){return"normal"===t?"flex-start":"flipped"===t?"flex-end":"center"}(c),children:_($,"flipped"===h?{children:[_(E,{children:[C(lc,{indexes:e,width:k,y:A,alignHorizontal:"right",alignVertical:"middle",fill:v,children:p}),C(oc,{indexes:e,width:k,height:S,y:A+b.height+o,alignHorizontal:"right",alignVertical:"top",lineNumber:z,fill:u.colorTextSecondary,children:g})]}),w]}:{children:[w,_(E,{children:[C(lc,{indexes:e,width:k,y:A,alignHorizontal:"left",alignVertical:"middle",fill:v,children:p}),C(oc,{indexes:e,width:k,height:S,y:A+b.height+o,alignHorizontal:"left",alignVertical:"top",lineNumber:z,fill:u.colorTextSecondary,children:g})]})]})})},composites:["icon","label","desc"]});const Jg=t=>{const{x:e=0,y:n=0,width:i=30,height:r=100,fill:o="#FF356A",size:a=10}=t;return C(P,{width:i,height:r,points:[{x:e,y:n},{x:e+i/2,y:n+a},{x:e+i,y:n},{x:e+i,y:n+r-a},{x:e+i/2,y:n+r},{x:e,y:n+r-a}],fill:o,"data-element-type":"shape"})};Pc("simple-vertical-arrow",{component:t=>{const[{indexes:e,datum:n,height:i=140,themeColors:r,positionH:o="normal"},a]=Ac(t,["height"]),s="normal"===o?"right":"left",l=C(lc,{indexes:e,width:120,fill:r.colorText,alignHorizontal:s,alignVertical:"middle",fontSize:14,children:n.label}),h=C(oc,{indexes:e,width:120,fill:r.colorTextSecondary,alignHorizontal:s,alignVertical:"top",children:n.desc}),c="flipped"!==o;return C(E,{width:300,height:i,...a,children:_(fc,{flexDirection:"row",alignItems:"center",children:[c?_($,{children:[_(fc,{flexDirection:"column",alignItems:"flex-end",children:[l,h]}),C(ic,{width:15})]}):C($,{children:C(ic,{width:135})}),_(uc,{horizontal:"center",vertical:"middle",children:[C(Jg,{width:30,height:i,fill:r.colorPrimary}),C(Ph,{width:30,height:i,alignHorizontal:"center",alignVertical:"middle",fill:r.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),c?C($,{children:C(ic,{width:135})}):_($,{children:[C(ic,{width:15}),_(fc,{flexDirection:"column",alignItems:"flex-start",children:[l,h]})]})]})})},composites:["label","desc"]}),Pc("underline-text",{component:t=>{const[{datum:e,indexes:n,width:i=200,gap:r=4,positionH:o="center",themeColors:a},s]=Ac(t,["width","height","gap"]),l=Wh(C(lc,{indexes:n,fontSize:18,fontWeight:"bold",width:i,children:e.label})),h=e.desc?Wh(C(oc,{indexes:n,width:i,wordWrap:!0,children:e.desc})):{width:0,height:0},c=l.height+r+3+(e.desc?2*r+h.height:0),d="center"===o?"center":"flipped"===o?"right":"left",u="center"===o?(i-80)/2:"flipped"===o?i-80:0,f=0+l.height+r,p=f+3+2*r;return _(E,{width:i,height:c,...s,children:[e.label&&C(lc,{indexes:n,x:0,y:0,width:i,alignHorizontal:d,fill:a.colorPrimary,fontSize:18,fontWeight:"bold",children:e.label}),e.label&&C(H,{x:u,y:f,width:80,height:3,fill:a.colorPrimary,"data-element-type":"shape"}),e.desc&&C(oc,{indexes:n,width:i,x:0,y:p,alignHorizontal:d,wordWrap:!0,fill:a.colorText,children:e.desc})]})},composites:["label","desc"]});const tm=t=>{const{x:e=0,y:n=0,width:i=30,height:r=100,fill:o="#FF356A",size:a=10}=t;return C(P,{width:i,height:r,points:[{x:e,y:n},{x:e+i/2,y:n+a},{x:e+i,y:n},{x:e+i,y:n+r-a},{x:e+i/2,y:n+r},{x:e,y:n+r-a}],fill:o,"data-element-type":"shape"})},em=t=>{const{x:e=0,y:n=0,width:i=50,height:r=10,fill:o,positionH:a="normal"}=t,s=r/2,l=i-s,h=s;return _(E,{x:e,y:n,width:i,height:r,children:[C(A,{width:r,height:r,fill:o,x:"normal"===a?0:l-s,"data-element-type":"shape"}),C(L,{d:"normal"===a?`M${s},${h} L${s+l},${h}`:`M0,${h} L${l-s},${h}`,strokeWidth:2,stroke:o,"data-element-type":"shape"})]})};Pc("vertical-icon-arrow",{component:t=>{const[{indexes:e,datum:n,height:i=140,themeColors:r,positionH:o="normal"},a]=Ac(t,["height"]),s="flipped"!==o?"right":"left",l=C(lc,{indexes:e,width:120,fill:r.colorText,alignHorizontal:s,alignVertical:"middle",fontSize:14,children:n.label}),h=C(oc,{indexes:e,width:120,fill:r.colorTextSecondary,alignHorizontal:s,alignVertical:"top",children:n.desc}),c=C(sc,{indexes:e,fill:r.colorPrimary,colorBg:r.colorWhite}),d=C(em,{width:30,height:8,fill:r.colorPrimary,positionH:o}),u="flipped"!==o,f=Wh(l),p=Wh(c),g=Wh(d),m=f.width+5+g.width-p.width-25;return C(E,{width:2*Math.max(f.width+5+g.width,25+p.width)+30,height:i,...a,children:_(fc,{flexDirection:"row",alignItems:"center",children:[_($,u?{children:[_(fc,{flexDirection:"column",alignItems:"flex-end",children:[l,h]}),C(ic,{width:5}),d]}:{children:[C(ic,{width:m}),c,C(ic,{width:25})]}),_(uc,{horizontal:"center",vertical:"middle",children:[C(tm,{width:30,height:i,fill:r.colorPrimary}),C(Ph,{width:30,height:i,alignHorizontal:"center",alignVertical:"middle",fill:r.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),_($,u?{children:[C(ic,{width:25}),c]}:{children:[d,C(ic,{width:5}),_(fc,{flexDirection:"column",alignItems:"flex-start",children:[l,h]})]})]})})},composites:["icon","label","desc"]});const nm=new Map;function im(t,e){nm.set(t,e)}im("chart-bar",{component:t=>{const{Title:e,Item:n,data:i,width:r,gap:o,barGap:a,barHeight:s=28,barAreaWidth:l,labelGap:h=16,padding:c=24,showValue:d=!0,options:u,valueFormatter:f=t=>t.toString()}=t,p=l??r??480,{title:g,desc:m,items:y=[],xTitle:x,yTitle:v}=i,b=e?C(e,{title:g,desc:m}):null;if(0===y.length)return C(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:b});const[w,M,k,$]=Sh(c),S=y[0]??{label:"",value:0},z=Wh(C(n,{indexes:[0],datum:S,data:i})),A=z.width||140,P=z.height||s,T=Math.max(s,P),I=Math.max(12,.35*T),j=a??o??I,O=y.map(t=>t.value??0),W=Math.max(...O,0),N=Math.min(...O,0),D=N<0?1.1*N:0;let R=W>0?1.1*W:0;R===D&&(R=D+1);const F=gg().domain([D,R]).range([0,p]),V=Math.min(Math.max(F(0),0),p),B=Math.max(2,.02*p),q=y.length*(T+j)-j,G=v?24:0,Y=x?24:0,X=w+G,U=$+A+h,Z=d?80:0,K=Math.max(8,.2*T),Q=U+p+Z+M,J=X+q+K+20+Y+k,tt=Sc(u.themeConfig),et=tt.colorText||"#666",nt=$c(u),it=[],rt=[],ot=[],at=[],st=[],lt=[],ht=[],ct=X+q+K,dt=t=>Number.isInteger(t)?t.toString():t.toFixed(1);y.forEach((t,e)=>{const r=[e],o=t.value??0,a=X+e*(T+j),l=a+(T-s)/2,h=o>=0?U+V:U+F(o),c=o>=0?F(o)-V:V-F(o),p=0===c?B:c,g=_c(u,[e])||tt.colorPrimary;if(it.push(C(H,{x:h,y:l,width:p,height:s,fill:g,rx:6,ry:6,"data-element-type":"shape"})),d){const e=o>=0?h+p+8:h-8;rt.push(C(Ph,{x:e,y:l+s/2,alignHorizontal:o>=0?"left":"right",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:g,children:f(o,t)}))}ot.push(C(n,{indexes:r,datum:t,data:i,x:$,y:a+(T-P)/2,width:A,height:P,positionV:"middle"}))});const ut=Math.max(3,Math.min(7,Math.floor(p/80)));return F.ticks(ut).forEach(t=>{const e=U+F(t);lt.push(C(L,{d:`M${e} ${X} L${e} ${X+q}`,stroke:et,strokeOpacity:.08,"data-element-type":"shape"})),st.push(C(L,{d:`M${e-.5} ${ct} L${e-.5} ${ct+6}`,stroke:et,"data-element-type":"shape"})),st.push(C(Ph,{x:e,y:ct+14,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fill:et,children:dt(t)}))}),at.push(C(L,{d:`M${U} ${ct} L${U+p} ${ct}`,stroke:et,"data-element-type":"shape"})),D<0&&at.push(C(H,{x:U+V-.5,y:X,width:1,height:q,fill:nt,"data-element-type":"shape"})),v&&ht.push(C(Ph,{x:$+A/2,y:w+G/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:et,children:v})),x&&ht.push(C(Ph,{x:U+p/2,y:ct+20+Y/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:et,children:x})),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[b,_(E,{width:Q,height:J,children:[C(E,{children:lt}),C(E,{children:it}),C(E,{children:rt}),C(E,{children:ht}),C(E,{children:[...at,...st]}),C(hc,{children:ot})]})]})},composites:["title","item","xTitle","yTitle"]}),im("chart-column",{component:t=>{const{Title:e,Item:n,data:i,columnGap:r=60,columnWidth:o=50,padding:a=20,showValue:s=!0,options:l,valueFormatter:h=t=>t.toString()}=t,{title:c,desc:d,items:u=[]}=i,f=e?C(e,{title:c,desc:d}):null;if(0===u.length)return C(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:f});const p=Sc(l.themeConfig),g=[...u.map(t=>t.value??0),0].sort((t,e)=>t-e),m=g[0]<0,y=u.length*o+(u.length-1)*r,[x,v,b,w]=Sh(a),M=m&&s?10+(s?24:0):10,k=y+w+v,$=300+x+b+M,S=gg().domain([g[0],g[g.length-1]]).range([300,0]),A=S(0),L=[],P=[],T=[],I=[];return u.forEach((t,e)=>{const a=[e],c=t.value??0,d=w+e*(o+r),u=c>=0?S(c):A,f=Math.abs(S(c)-A),g=_c(l,[e])||p.colorPrimary,m=`${g}-column-positive-${e}`,y=`${g}-column-negative-${e}`;I.push(_("linearGradient",{id:c>=0?m:y,x1:"0%",y1:c>=0?"0%":"100%",x2:"0%",y2:c>=0?"100%":"0%",children:[C("stop",{offset:"0%",stopColor:g}),C("stop",{offset:"100%",stopColor:ks.mix(g,"#fff",40).toHexString()})]})),L.push(C(H,{x:d,y:x+u,width:o,height:f,fill:`url(#${c>=0?m:y})`,rx:8,ry:8,"data-element-type":"shape"})),s&&P.push(C(Ph,{x:d+o/2,y:c>=0?x+u-10:x+u+f+20,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:c>=0?"bottom":"top",fill:g,children:h(c,t)}));const v=o+r,b=x+300+M;T.push(C(n,{indexes:a,datum:t,data:i,x:d+o/2-v/2,y:b,width:v,positionH:"center"}))}),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,_(E,{width:k,height:$,children:[C(z,{children:I}),C(E,{children:L}),C(E,{children:P}),C(hc,{children:T})]})]})},composites:["title","item"]}),im("chart-line",{component:t=>{const{Title:e,Item:n,data:i,width:r,height:o=260,gap:a=10,padding:s=24,showValue:l=!0,options:h,valueFormatter:c=t=>t.toString()}=t,{title:d,desc:u,items:f=[],xTitle:p,yTitle:g}=i,m=e?C(e,{title:d,desc:u}):null;if(0===f.length)return C(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:m});const[y,x,v,b]=Sh(s),w={indexes:[0],datum:f[0],data:i,positionH:"center",positionV:"normal"},M=Wh(C(n,{...w})),k=M.width,$=M.height,S=Math.max(28,$+14),P=g?26:0,H=p?22:0,T=k+a,I=f.length>0?(f.length-1)*T+k:0,j=void 0!==r?r:Math.max(200,I||320),O=f.length>1?Math.max(T,(j-k)/(f.length-1)):0,W=f.length>0?Math.max(k,(f.length-1)*O+k):0,N=b+44+P,D=y+P,R=N+W+x,F=D+o+S+H+v,V=f.map(t=>t.value??0),B=Math.max(...V,0),q=Math.min(...V,0),G=.1*Math.max(Math.abs(B),Math.abs(q)),Y=q<0?q-G:0;let X=B>0?B+G:1;X===Y&&(X=Y+1);const U=gg().domain([Y,X]).nice().range([o,0]),Z=Math.max(0,Math.min(o,U(0))),K=X<=0?0:Y>=0?o:Z,Q=$c(h),J=Sc(h.themeConfig),tt=J.colorText||"#666",et=[],nt=[],it=[],rt=[],ot=[],at=[],st=[];U.ticks(6).forEach(t=>{const e=D+U(t);et.push(C(L,{d:`M ${N} ${e} L ${N+W} ${e}`,width:W,height:1,stroke:tt,strokeWidth:1,"data-element-type":"shape",opacity:.08})),st.push(C(Ph,{x:N-8,y:e,alignHorizontal:"right",alignVertical:"middle",fontSize:12,fill:tt,children:Number.isInteger(t)?t.toString():t.toFixed(1)}))});const lt=[],ht=[],ct=[];f.forEach((t,e)=>{const i=N+e*O+k/2,r=D+U(t.value??0);ht.push({x:i,y:r,datum:t}),lt.push(C(n,{...w,indexes:[e],datum:t,x:i-k/2,y:D+o+4}));const a=_c(h,[e])||J.colorPrimary;ct.push({x:i,color:a})});const dt=ct.length>0?Math.min(...ct.map(t=>t.x)):N,ut=ct.length>0?Math.max(...ct.map(t=>t.x)):N+W,ft=Math.max(1,ut-dt),pt=ct.map(t=>C("stop",{offset:(t.x-dt)/ft*100+"%",stopColor:t.color})),gt=ct.map(t=>C("stop",{offset:(t.x-dt)/ft*100+"%",stopColor:t.color,stopOpacity:"0.18"}));if(ct.length>0){const t=ct[ct.length-1].color;pt.push(C("stop",{offset:"100%",stopColor:t})),gt.push(C("stop",{offset:"100%",stopColor:t,stopOpacity:"0.04"}))}const mt=`chart-line-${ka([W,o,tt,Q,ct.map(t=>`${t.x.toFixed(2)}-${t.color}`).join()].join(":"))}`,yt=`${mt}-stroke`,xt=`${mt}-area`,vt=(t=>{if(0===t.length)return"";if(1===t.length){const e=t[0];return`M ${e.x} ${e.y}`}const e=[];e.push(`M ${t[0].x} ${t[0].y}`);for(let n=0;n<t.length-1;n++){const i=t[n-1]||t[n],r=t[n],o=t[n+1],a=t[n+2]||o,s=r.x+(o.x-i.x)/6,l=r.y+(o.y-i.y)/6,h=o.x-(a.x-r.x)/6,c=o.y-(a.y-r.y)/6;e.push(`C ${s} ${l} ${h} ${c} ${o.x} ${o.y}`)}return e.join(" ")})(ht);it.push(C(L,{d:vt,width:W,height:o,stroke:`url(#${yt})`,strokeWidth:3,fill:"none","data-element-type":"shape"}));const bt=vt.includes("C")?vt.slice(vt.indexOf("C")):"",wt=[`M ${ht[0].x} ${D+K}`,`L ${ht[0].x} ${ht[0].y}`,bt,`L ${ht[ht.length-1].x} ${D+K}`,"Z"].join(" ");return it.push(C(L,{d:wt,width:W,height:o,fill:`url(#${xt})`,stroke:"none","data-element-type":"shape"})),ht.forEach((t,e)=>{const n=_c(h,[e])||J.colorPrimary;rt.push(C(A,{x:t.x-6,y:t.y-6,width:12,height:12,fill:n,"data-element-type":"shape"})),l&&ot.push(C(Ph,{x:t.x,y:t.y-12,alignHorizontal:"center",alignVertical:"bottom",fontSize:12,fontWeight:"bold",fill:n,children:c(t.datum.value??0,t.datum)}))}),nt.push(C(L,{d:`M ${N} ${D+K} L ${N+W} ${D+K}`,width:W,height:1,stroke:tt,strokeWidth:1,"data-element-type":"shape"})),nt.push(C(L,{d:`M ${N} ${D} L ${N} ${D+o}`,width:1,height:o,stroke:tt,strokeWidth:1,"data-element-type":"shape"})),p&&at.push(C(Ph,{x:N+W/2,y:D+o+S+H/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:tt,children:p})),g&&at.push(C(Ph,{x:b+P/2,y:D+o/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:tt,children:g})),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,_(E,{width:R,height:F,children:[_(z,{children:[C("linearGradient",{id:yt,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:pt}),_("linearGradient",{id:xt,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[gt,C("stop",{offset:"100%",stopColor:Q,stopOpacity:"0.04"})]})]}),C(E,{children:et}),C(E,{children:[...nt,...st]}),C(E,{children:it}),C(E,{children:rt}),C(E,{children:ot}),C(E,{children:at}),C(hc,{children:lt})]})]})},composites:["title","item","xTitle","yTitle"]}),im("chart-pie",{component:t=>{const{Title:e,Item:n,data:i,radius:r=140,innerRadius:o=0,padding:a=30,showPercentage:s=!0,options:l}=t,{title:h,desc:c,items:d=[]}=i,u=e?C(e,{title:h,desc:c}):null,f=Wh(C(tc,{indexes:[0]})),p=d[0]??{label:"",value:0},g=Wh(C(n,{indexes:[0],datum:p,data:i,positionH:"center",positionV:"middle"})),m=g.width||140,y=g.height||32,x=Math.max(r,60),v=a+(1.35*x+8+m),b=a+x,w=2*v,M=2*b;if(0===d.length)return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,C(E,{width:w,height:M,children:C(nc,{children:C(tc,{indexes:[0],x:v-f.width/2,y:b-f.height/2})})})]});const k=d.reduce((t,e)=>t+Math.max(e.value??0,0),0),$=$c(l),S=Sc(l.themeConfig),z=function(){var t=Zg,e=Ug,n=null,i=mg(0),r=mg(Sg),o=mg(0);function a(a){var s,l,h,c,d,u=(a=Vg(a)).length,f=0,p=new Array(u),g=new Array(u),m=+i.apply(this,arguments),y=Math.min(Sg,Math.max(-Sg,r.apply(this,arguments)-m)),x=Math.min(Math.abs(y)/u,o.apply(this,arguments)),v=x*(y<0?-1:1);for(s=0;s<u;++s)(d=g[p[s]=s]=+t(a[s],s,a))>0&&(f+=d);for(null!=e?p.sort(function(t,n){return e(g[t],g[n])}):null!=n&&p.sort(function(t,e){return n(a[t],a[e])}),s=0,h=f?(y-u*v)/f:0;s<u;++s,m=c)l=p[s],c=m+((d=g[l])>0?d*h:0)+v,g[l]={data:a[l],index:s,value:d,startAngle:m,endAngle:c,padAngle:x};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:mg(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:mg(+t),a):i},a.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:mg(+t),a):r},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:mg(+t),a):o},a}().value(t=>Math.max(t.value??0,0)).sort(null).startAngle(0).endAngle(2*Math.PI),A=z(d),P=Fg().innerRadius(o).outerRadius(x).cornerRadius(2),H=Fg().innerRadius(x).outerRadius(x),T=Fg().innerRadius(1.15*x).outerRadius(1.15*x),I=o+.5*(x-o),j=Fg().innerRadius(I).outerRadius(I),O=Fg().innerRadius(.85*x).outerRadius(.85*x),W=[],N=[],D=[],R=[],F=[];return A.forEach(t=>{const e=t.data,r=t.index,o=_c(l,[r])||S.colorPrimary||$,a=P(t)||"";W.push(C(L,{d:a,fill:o,stroke:S.colorBg,strokeWidth:1,"data-element-type":"shape",width:2*x,height:2*x}));const h=t.startAngle+(t.endAngle-t.startAngle)/2<Math.PI,c=H.centroid(t),d=T.centroid(t),u=[1.35*x*(h?1:-1),d[1]];D.push(C(L,{d:`M${v+c[0]} ${b+c[1]} L${v+d[0]} ${b+d[1]} L${v+u[0]} ${b+u[1]}`,stroke:$,strokeOpacity:.45,strokeWidth:2,fill:"none","data-element-type":"shape"}));const p=v+u[0]+(h?8:-8-m),g=b+u[1]-y/2;if(R.push(C(n,{indexes:[r],datum:e,data:i,x:p,y:g,width:m,height:y,positionH:h?"normal":"flipped",positionV:"middle",themeColors:Sc({colorPrimary:o},l)})),s&&k>0){const e=j.centroid(t),n=Math.max(t.value,0),i=(100*n/k).toFixed(1),o=50,a=20;N.push(C(Ph,{x:v+e[0]-o/2,y:b+e[1]-a/2,width:o,height:a,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fontWeight:"bold",fill:"#ffffff","data-value":n,"data-indexes":[r],"data-element-type":"item-value",children:`${i}%`}))}const w=O.centroid(t);F.push(C(ec,{indexes:[r],x:v+w[0]-f.width/2,y:b+w[1]-f.height/2}))}),A.forEach((t,e)=>{const n=(e+1)%A.length,i=(t.endAngle+(A[n].startAngle+(0===n?2*Math.PI:0)))/2,r=1*x,o=Math.sin(i)*r,a=-Math.cos(i)*r;F.push(C(tc,{indexes:[e+1],x:v+o-f.width/2,y:b+a-f.height/2}))}),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[u,_(E,{width:w,height:M,children:[C(E,{x:v,y:b,children:W}),C(E,{children:D}),C(E,{children:N}),C(hc,{children:R}),C(nc,{children:F})]})]})},composites:["title","item"]});const rm=[0,30,-30,60,-60],om=Math.PI*(3-Math.sqrt(5));function am(t,e,n){const i=Math.PI/180*n,r=Math.cos(i),o=Math.sin(i);return{width:Math.abs(t*r)+Math.abs(e*o),height:Math.abs(t*o)+Math.abs(e*r)}}function sm(t,e,n,i,r,o){const a=t-o,s=t+n+o,l=e-o,h=e+i+o;return r.some(t=>{const e=t.box.x-o,n=t.box.x+t.box.width+o,i=t.box.y-o,r=t.box.y+t.box.height+o;return!(s<=e||a>=n||h<=i||l>=r)})}im("chart-wordcloud",{component:t=>{const{data:e,options:n,minFontSize:i=16,maxFontSize:r=48,enableRotate:o=!0,padding:a=6,spiralStep:s=.45,radiusStep:l=10}=t,{items:h=[]}=e,c=h.map((t,e)=>({datum:t,index:e})).filter(({datum:t})=>t.label);if(0===c.length)return C(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:C(E,{children:C(hc,{})})});const d=c.map(({datum:t})=>t.value).filter(t=>"number"==typeof t),u=d.length>0,f=u?Math.min(...d):0,p=u?Math.max(...d):0,g=u&&f===p,m=(i+r)/2,y=c.map(({datum:t,index:e})=>{const o=(t=>!u||g?m:null==t?i:i+(t-f)/(p-f||1)*(r-i))(t.value),a=Wh(C(Ph,{fontSize:o,fontWeight:"bold",children:t.label})),s=_c(n,[e])||$c(n)||"#333333";return{label:t.label,value:t.value,color:s,fontSize:o,width:1.05*a.width,height:a.height}}).sort((t,e)=>e.fontSize-t.fontSize),x=function(t,e,n,i,r){const o=[],a=e?rm:[0],s=Math.max(1600,28*t.length);return t.forEach((t,e)=>{const l=Math.max(t.width,t.height),h=e*om;let c=0,d=null;for(let e=0;e<s&&!d;e++){e===Math.floor(.6*s)&&(c=l);const u=h+e*i,f=r*Math.sqrt(e+1)+c+.25*l,p=f*Math.cos(u),g=f*Math.sin(u);for(const e of a){const i=am(t.width,t.height,e),r=p-i.width/2,a=g-i.height/2;if(!sm(r,a,i.width,i.height,o,n)){d={...t,angle:e,centerX:p,centerY:g,box:{x:r,y:a,width:i.width,height:i.height}};break}}}if(!d){const n=a[e%a.length],i=r*Math.sqrt(s+1)+l,o=h,c=i*Math.cos(o),u=i*Math.sin(o),f=am(t.width,t.height,n);d={...t,angle:n,centerX:c,centerY:u,box:{x:c-f.width/2,y:u-f.height/2,width:f.width,height:f.height}}}o.push(d)}),o}(y,o,a,s,l),v=Math.min(...x.map(t=>t.box.x)),b=Math.min(...x.map(t=>t.box.y)),w=Math.max(...x.map(t=>t.box.x+t.box.width)),M=Math.max(...x.map(t=>t.box.y+t.box.height)),k=-v+a,$=-b+a,_=w-v+2*a,S=M-b+2*a,z=x.map((t,e)=>{const n=t.centerX-t.width/2+k,i=t.centerY-t.height/2+$,r=t.width/2,o=t.height/2;return C(E,{transform:`translate(${n}, ${i}) rotate(${t.angle}, ${r}, ${o})`,children:C(Ph,{width:t.width,height:t.height,fontSize:t.fontSize,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:t.color,"data-indexes":e,"data-element-type":"item-label",children:t.label})})});return C(hc,{id:"infographic-container",width:_,height:S,children:z})},composites:[]});const lm=new Map,hm=(t,e)=>{lm.set(t,e)};hm("pros-cons-arrow",t=>{const{x:e,y:n,colorPositive:i,colorNegative:r,colorBg:o}=t,a={width:90,height:40,fontSize:22,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return _(E,{x:e,y:n,width:200,height:141,children:[_(dc,{children:[C("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"}),C("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:i}),C("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:r})]}),C(Ph,{x:40,y:15,...a,children:"Pros"}),C(Ph,{x:70,y:85,...a,children:"Cons"})]})}),hm("pros-cons-fold",t=>{const{x:e,y:n,colorPositive:i,colorNegative:r,colorBg:o}=t,a={width:85,height:30,fontSize:20,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return _(E,{x:e,y:n,width:240,height:300,children:[_(dc,{children:[C("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:i,fillOpacity:.4}),C("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:i}),C("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"}),C("path",{d:"M36.1034 88.9252H28.9655V93.785H36.1034V101.85H41.4828V93.785H48.6207V88.8735H41.4828V81.1701H36.1034V88.9252Z",fill:"#404040"}),C("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:r,fillOpacity:.4}),C("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:r}),C("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"}),C("path",{d:"M192.414 205.905V210.816H212.069V205.905H192.414Z",fill:"#404040"})]}),C(Ph,{x:153,y:77,...a,children:"PROS"}),C(Ph,{x:2,y:193,...a,children:"CONS"})]})}),hm("vs",t=>{const{x:e,y:n,colorPrimary:i,colorBg:r}=t,o=100,a=100,s=ks(i).lighten(20).toString();return _(E,{x:e,y:n,width:o,height:a,children:[_(z,{children:[C("filter",{id:"vs-divider-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:C("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"8",result:"blur"})}),C(Hc,{})]}),C(A,{x:0,y:0,width:o,height:a,fill:s,filter:"url(#vs-divider-glow-filter)",opacity:.6}),C(A,{x:0,y:0,width:o,height:a,fill:i,"data-element-type":"shape"}),C("text",{x:50,y:50,fontSize:Math.min(o,a)/1.5,fontWeight:"bold",fill:r,textAnchor:"middle",dominantBaseline:"central",filter:"url(#drop-shadow)",children:"VS"})]})}),im("compare-binary-horizontal",{component:t=>{const{Title:e,Item:n,data:i,gap:r=20,groupGap:o=20,opposite:a=!0,flipped:s=!0,dividerType:l="vs",options:h}=t,{title:c,desc:d,items:u=[]}=i,f=e?C(e,{title:c,desc:d}):null;if(0===u.length)return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,C(E,{children:C(nc,{children:C(tc,{indexes:[0],x:0,y:0})})})]});const p=u[0]||{children:[]},g=u[1]||{children:[]},m=p.children||[],y=g.children||[],x=Sc(h.themeConfig),v=Wh(C(n,{indexes:[0,0],data:i,datum:m[0]||{}})),b=Wh(C(tc,{indexes:[0]})),w=(t=>t?lm.get(t)??null:null)(l),M=w?Wh(C(w,{x:0,y:0,colorPrimary:x.colorPrimary,colorBg:x.colorBg,colorPositive:x.colorPrimary,colorNegative:x.colorPrimary})):{width:0,height:0},k=[],$=[],S=[],z=Math.max(m.length,y.length),A=z>0?z*(v.height+r)-r:0,L=z>0?r/2+b.height/2:b.height/2,P=b.width+5,H=P+v.width+o,T=H+M.width+o,I=s?"flipped":"normal",j=s?"normal":a?"flipped":"normal";if(m.forEach((t,e)=>{const o=L+e*(v.height+r),a=[0,e];k.push(C(n,{indexes:a,datum:t,data:i,x:P,y:o,positionH:I,positionV:"middle"})),$.push(C(ec,{indexes:a,x:P-b.width-5,y:o+(v.height-b.height)/2})),e<m.length-1&&$.push(C(tc,{indexes:[0,e+1],x:P+(v.width-b.width)/2,y:o+v.height+r/2-b.height/2}))}),m.length>0){$.push(C(tc,{indexes:[0,0],x:P+(v.width-b.width)/2,y:L-r/2-b.height/2}));const t=L+(m.length-1)*(v.height+r);$.push(C(tc,{indexes:[0,m.length],x:P+(v.width-b.width)/2,y:t+v.height+r/2-b.height/2}))}else u.length>=1&&$.push(C(tc,{indexes:[0,0],x:P+(v.width-b.width)/2,y:L-b.height/2}));if(y.forEach((t,e)=>{const o=L+e*(v.height+r),a=[1,e];k.push(C(n,{indexes:a,datum:t,data:i,x:T,y:o,positionH:j,positionV:"middle"})),$.push(C(ec,{indexes:a,x:T+v.width+5,y:o+(v.height-b.height)/2})),e<y.length-1&&$.push(C(tc,{indexes:[1,e+1],x:T+(v.width-b.width)/2,y:o+v.height+r/2-b.height/2}))}),y.length>0){$.push(C(tc,{indexes:[1,0],x:T+(v.width-b.width)/2,y:L-r/2-b.height/2}));const t=L+(y.length-1)*(v.height+r);$.push(C(tc,{indexes:[1,y.length],x:T+(v.width-b.width)/2,y:t+v.height+r/2-b.height/2}))}else u.length>=2&&$.push(C(tc,{indexes:[1,0],x:T+(v.width-b.width)/2,y:L-b.height/2}));return u.length<2&&$.push(C(tc,{indexes:[1],x:T+(v.width-b.width)/2,y:L+(A-b.height)/2})),w&&S.push(C(w,{x:H,y:L+(A-M.height)/2,colorPrimary:x.colorPrimary,colorBg:x.colorBg,colorPositive:_c(h,[0])||x.colorPrimary,colorNegative:_c(h,[1])||x.colorPrimary})),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,_(E,{children:[C(E,{children:S}),C(hc,{children:k}),C(nc,{children:$})]})]})},composites:["title","item"]});const cm={none:5,"dot-line":100,"arc-dot":20,"split-line":5},dm=t=>{const{x:e,y:n,width:i,height:r,color:o,colorBg:a,side:s}=t,l=n+r,h=`split-line-linear-gradient-${s}`;return _($,{children:[C(z,{children:C(Tc,{id:h,startColor:o,stopColor:a,direction:"left"===s?"left-right":"right-left"})}),C(H,{x:e,y:l,width:i,height:1,fill:`url(#${h})`})]})},um=t=>{const{x:e,y:n,side:i,width:r,height:o,color:a,colorBg:s}=t,l="left"===i?e+r+6+5:e-6-5,h=n+o/2,c=l-2,d=h-2,u="left"===i?80:-80,f=`dot-line-linear-gradient-${i}`;return _(E,{children:[C(z,{children:C(Tc,{id:f,startColor:a,stopColor:s,direction:"left"===i?"left-right":"right-left"})}),_(dc,{children:[C(A,{x:l-6,y:h-6,width:12,height:12,fill:"none",strokeWidth:1,stroke:a}),C(A,{x:c,y:d,width:4,height:4,fill:a})]}),C(H,{x:"left"===i?l:l+u,y:h-.5,width:80,height:1,fill:`url(#${f})`})]})};im("compare-hierarchy-left-right",{component:t=>{const{Title:e,Items:n,data:i,gap:r=20,groupGap:o=0,decoration:a="none",surround:s=!0,flipRoot:l=!1,flipLeaf:h=!1,options:c}=t,[d,u]=n,{title:f,desc:p,items:g=[]}=i,m=e?C(e,{title:f,desc:p}):null,y=C(d,{indexes:[0],data:i,datum:i.items[0],themeColors:{}}),x=C(u,{indexes:[0,0],data:i,datum:g[0]?.children?.[0]||g[2]}),v=Wh(y),b=Wh(x),w=[],M=[],[k,$]=g,S=k?.children||[],z=$?.children||[],A=Math.max(v.height,S.length*(b.height+r)-r,z.length*(b.height+r)-r),L=cm[a]||0,P=b.width+L,H=P+v.width+o,T=(A-v.height)/2;k&&w.push(C(d,{indexes:[0],x:P,y:T,data:i,datum:k,positionH:l?"normal":"flipped"})),$&&w.push(C(d,{indexes:[1],x:H,y:T,data:i,datum:$,positionH:l?"flipped":"normal"}));const I=(t,e,n)=>{if("none"===a)return;const[i,r]=e,o=_c(c,n),s={x:i,y:r,width:b.width,height:b.height,side:t,color:o||"#ccc",colorBg:c.themeConfig.colorBg||"#fff"};"split-line"===a?M.push(C(dm,{...s})):"dot-line"===a&&M.push(C(um,{...s}))};if(s){const t=(2*v.width+o+b.width)/2+L,e=P+v.width+o/2,n=T+v.height/2;S.forEach((o,a)=>{const s=S.length*(b.height+r)-r,l=(A-s)/2+a*(b.height+r),c=l+b.height/2-n,d=Math.max(0,t*t-c*c),f=e-Math.sqrt(d)-b.width/2;w.push(C(u,{indexes:[0,a],datum:o,data:i,x:f,y:l,positionH:h?"flipped":"normal"})),I("left",[f,l],[0,a])}),z.forEach((o,a)=>{const s=z.length*(b.height+r)-r,l=(A-s)/2+a*(b.height+r),c=l+b.height/2-n,d=Math.max(0,t*t-c*c),f=e+Math.sqrt(d)-b.width/2;w.push(C(u,{indexes:[1,a],datum:o,data:i,x:f,y:l,positionH:h?"normal":"flipped"})),I("right",[f,l],[1,a])})}else S.forEach((t,e)=>{const n=S.length*(b.height+r)-r,o=(A-n)/2+e*(b.height+r),a=[0,e];w.push(C(u,{indexes:a,datum:t,data:i,x:0,y:o,positionH:h?"flipped":"normal"})),I("left",[0,o],a)}),z.forEach((t,e)=>{const n=z.length*(b.height+r)-r,o=(A-n)/2+e*(b.height+r),a=[1,e],s=H+v.width+L;w.push(C(u,{indexes:a,datum:t,data:i,x:s,y:o,positionH:h?"normal":"flipped"})),I("right",[s,o],a)});return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,_(E,{children:[C(hc,{children:w}),C(E,{width:0,height:0,children:M})]})]})},composites:["title","item"]}),im("compare-hierarchy-row",{component:t=>{const{Title:e,Items:n,data:i,gap:r=0,itemGap:o=20,columnWidth:a=280,itemPadding:s=5,showColumnBackground:l=!0,columnBackgroundAlpha:h=.08,options:c}=t,[d,u]=n,{title:f,desc:p,items:g=[]}=i,m=e?C(e,{title:f,desc:p}):null,y=Cc(c),x=[],v=[],b=a-2*s,w=Wh(C(d,{indexes:[0],data:i,datum:g[0],width:a})),M=Wh(C(u,{indexes:[0,0],data:i,datum:g[0]?.children?.[0]||{},width:b})),k=Wh(C(tc,{indexes:[0]})),$=Math.max(...g.map(t=>t.children?.length||0),0),S=w.height+o+$*(M.height+o);if(g.forEach((t,e)=>{const{children:n=[]}=t,c=e*(a+r),f=c;if(l){const t=`${y[e%y.length]}${Math.round(255*h).toString(16).padStart(2,"0")}`;x.push(C(H,{x:c,y:0,width:a,height:S,fill:t,rx:0,ry:0,"data-element-type":"shape"}))}x.push(C(d,{indexes:[e],datum:t,data:i,x:f,y:0,width:a})),v.push(C(ec,{indexes:[e],x:f+w.width-k.width-10,y:10})),0===e&&v.push(C(tc,{indexes:[e],x:f+w.width/2-k.width/2,y:0-k.height-5}));const p=0+w.height+o;n.forEach((t,r)=>{const a=p+r*(M.height+o),l=f+s,h=[e,r];x.push(C(u,{indexes:h,datum:t,data:i,x:l,y:a,width:b})),v.push(C(ec,{indexes:h,x:l+M.width-k.width-10,y:a+(M.height-k.height)/2})),r<n.length-1&&v.push(C(tc,{indexes:[e,r+1],x:l+M.width/2-k.width/2,y:a+M.height-k.height/2}))});const g=f+s;if(n.length>0){const t=p+n.length*(M.height+o);v.push(C(tc,{indexes:[e,n.length],x:g+M.width/2-k.width/2,y:t-M.height/2-k.height/2}))}else v.push(C(tc,{indexes:[e,0],x:g+M.width/2-k.width/2,y:p-o/2-k.height/2}))}),g.length>0){const t=g.length*(a+r);v.push(C(tc,{indexes:[g.length],x:t-r/2-k.width/2,y:-k.height-5}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,_(E,{children:[C(hc,{children:x}),C(nc,{children:v})]})]})},composites:["title","item"]});const fm=Object.assign,pm={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 gm{constructor(t,e){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,t instanceof gm||"x"in t&&"y"in t&&"children"in t){const e=t;return this.data=e.data,this.id=e.id,this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this.depth=e.depth,this.children=e.children,this.parent=e.parent,this.hgap=e.hgap,this.vgap=e.vgap,this.preH=e.preH,void(this.preV=e.preV)}this.data=t;const n=e.getHGap(t),i=e.getVGap(t);this.preH=e.getPreH(t),this.preV=e.getPreV(t),this.width=e.getWidth(t),this.height=e.getHeight(t),this.width+=this.preH,this.height+=this.preV,this.id=e.getId(t),this.addGap(n,i)}isRoot(){return 0===this.depth}isLeaf(){return 0===this.children.length}addGap(t,e){this.hgap+=t,this.vgap+=e,this.width+=2*t,this.height+=2*e}eachNode(t){let e,n=[this];for(;e=n.shift();)t(e),n=e.children.concat(n)}DFTraverse(t){this.eachNode(t)}BFTraverse(t){let e,n=[this];for(;e=n.shift();)t(e),n=n.concat(e.children)}getBoundingBox(){const t={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(e=>{t.left=Math.min(t.left,e.x),t.top=Math.min(t.top,e.y),t.width=Math.max(t.width,e.x+e.width),t.height=Math.max(t.height,e.y+e.height)}),t}translate(t=0,e=0){this.eachNode(n=>{n.x+=t,n.y+=e,n.x+=n.preH,n.y+=n.preV})}right2left(){const t=this.getBoundingBox();this.eachNode(e=>{e.x=e.x-2*(e.x-t.left)-e.width}),this.translate(t.width,0)}bottom2top(){const t=this.getBoundingBox();this.eachNode(e=>{e.y=e.y-2*(e.y-t.top)-e.height}),this.translate(0,t.height)}}function mm(t,e={},n){e=fm({},pm,e);const i=new gm(t,e),r=[i];let o;if(!n&&!t.collapsed)for(;o=r.shift();)if(!o.data.collapsed){const t=e.getChildren(o.data),n=t?t.length:0;if(o.children=new Array(n),t&&n)for(let i=0;i<n;i++){const n=new gm(t[i],e);o.children[i]=n,r.push(n),n.parent=o,n.depth=o.depth+1}}return i}class ym{constructor(t,e={}){this.options=e,this.rootNode=mm(t,e)}execute(){throw new Error("please override this method")}}const xm=["LR","RL","TB","BT","H","V"],vm=["LR","RL","H"],bm=xm[0];function wm(t,e,n){const i=e.direction||bm;if(e.isHorizontal=(t=>vm.indexOf(t)>-1)(i),i&&-1===xm.indexOf(i))throw new TypeError(`Invalid direction: ${i}`);if(i===xm[0])n(t,e);else if(i===xm[1])n(t,e),t.right2left();else if(i===xm[2])n(t,e);else if(i===xm[3])n(t,e),t.bottom2top();else if(i===xm[4]||i===xm[5]){const{left:i,right:r}=function(t,e){const n=mm(t.data,e,!0),i=mm(t.data,e,!0),r=t.children.length,o=Math.round(r/2),a=e.getSide||function(t,e){return e<o?"right":"left"};for(let e=0;e<r;e++){const r=t.children[e];"right"===a(r,e)?i.children.push(r):n.children.push(r)}return n.eachNode(t=>{t.isRoot()||(t.side="left")}),i.eachNode(t=>{t.isRoot()||(t.side="right")}),{left:n,right:i}}(t,e);n(i,e),n(r,e),e.isHorizontal?i.right2left():i.bottom2top(),r.translate(i.x-r.x,i.y-r.y),t.x=i.x,t.y=r.y;const o=t.getBoundingBox();e.isHorizontal?o.top<0&&t.translate(0,-o.top):o.left<0&&t.translate(-o.left,0)}let r=e.fixedRoot;return void 0===r&&(r=!0),r&&t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),function(t,e){if(e.radial){const[n,i]=e.isHorizontal?["x","y"]:["y","x"],r={x:1/0,y:1/0},o={x:-1/0,y:-1/0};let a=0;t.DFTraverse(t=>{a++;const{x:e,y:n}=t;r.x=Math.min(r.x,e),r.y=Math.min(r.y,n),o.x=Math.max(o.x,e),o.y=Math.max(o.y,n)});const s=o[i]-r[i];if(0===s)return;const l=2*Math.PI/a;t.DFTraverse(e=>{const o=e[i],a=r[i],h=e[n],c=t[n],d=(o-a)/s*(2*Math.PI-l)+l,u=h-c;e.x=Math.cos(d)*u,e.y=Math.sin(d)*u})}}(t,e),t}function Mm(t,e){let n=0;return t.children.length?t.children.forEach(t=>{n+=Mm(t,e)}):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function km(t){const e=t.children,n=e.length;if(n){e.forEach(t=>{km(t)});const i=e[0],r=e[n-1],o=r.y-i.y+r.height;let a=0;if(e.forEach(t=>{a+=t.totalHeight}),o>t.height)t.y=i.y+o/2-t.height/2;else if(1!==e.length||t.height>a){const n=t.y+(t.height-o)/2-i.y;e.forEach(t=>{t.translate(0,n)})}else t.y=(i.y+i.height/2+r.y+r.height/2)/2-t.height/2}}const $m={getSubTreeSep:()=>0};function Cm(t,e={}){return e=fm({},$m,e),t.parent={x:0,width:0,height:0,y:0},t.BFTraverse(t=>{t.x=t.parent.x+t.parent.width}),t.parent=void 0,Mm(t,e),t.startY=0,t.y=t.totalHeight/2-t.height/2,t.eachNode(t=>{const e=t.children,n=e.length;if(n){const i=e[0];if(i.startY=t.startY+t._subTreeSep,1===n)i.y=t.y+t.height/2-i.height/2;else{i.y=i.startY+i.totalHeight/2-i.height/2;for(let t=1;t<n;t++){const n=e[t];n.startY=e[t-1].startY+e[t-1].totalHeight,n.y=n.startY+n.totalHeight/2-n.height/2}}}}),km(t),t}class _m extends ym{execute(){return wm(this.rootNode,this.options,Cm)}}const Sm={};const zm=60,Am=14,Em="center",Lm="curved",Pm=2,Hm="node",Tm="solid",Im=(t,e=[],n=0)=>{const i=[...e,n];return{...t,_indexes:i,children:t.children?.map((t,e)=>Im(t,i,e))??[]}},jm=(t,e,n,i)=>{var r;e.push(t),(r=t.data)._flatIndex??(r._flatIndex=e.length-1),i&&n.push({parent:i,child:t});const o=t.children;o?.forEach(i=>jm(i,e,n,t))};im("hierarchy-mindmap",{component:t=>{const{Title:e,Items:n,data:i,levelGap:r=zm,nodeGap:o=Am,edgeAlign:a=Em,colorMode:s=Hm,edgeColorMode:l=Tm,edgeType:h=Lm,edgeWidth:c=Pm,options:d}=t,{title:u,desc:f,items:p=[]}=i,g=e?C(e,{title:u,desc:f}):null,m=$c(d),y=Wh(C(tc,{indexes:[0]}));if(!p.length||!n?.length)return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[g,C(E,{children:C(tc,{indexes:[0],x:0,y:0})})]});const x=Im(p[0]),v=new WeakMap,b=new WeakMap,w=new WeakMap,M=(t,e)=>zc({depth:e,originalIndexes:t._indexes,flatIndex:t._flatIndex},s),k=(t,e)=>{const n=w.get(t);if(n)return n;const i=M(t,e),r=_c(d,i),o=Sc({colorPrimary:r},d);return w.set(t,o),b.set(t,r),o},$=t=>{const e=v.get(t);if(e)return e;const r=Math.max(t._indexes.length-1,0),o=Wh(C(Ec(n,r),{indexes:t._indexes,data:i,datum:t,positionH:"center",positionV:"middle",themeColors:k(t,r)}));return v.set(t,o),o},S=function(t,e){const n=fm({},Sm,e);return new _m(t,n).execute()}(x,{direction:"H",getSide:(t,e)=>{if(!t.parent)return"right";const n=(t.parent.children||[]).indexOf(t);return(n>=0?n:e)%2==0?"left":"right"},getWidth:t=>$(t).width,getHeight:t=>$(t).height,getHGap:()=>r,getVGap:()=>o}),A=[],P=[];jm(S,A,P);const H=A.length>0?Math.min(...A.map(t=>t.x)):0,T=A.length>0?Math.min(...A.map(t=>t.y)):0,I=30-H,j=30-T,O=[],W=[],N=[],D=[],R=new WeakMap;A.forEach(t=>{const e=t.data,r=$(e),o=t.x+I+(t.hgap??0),a=t.y+j+(t.vgap??0),s=Ec(n,t.depth),l=0===t.depth?"center":"left"===t.side?"flipped":"normal",h=k(e,t.depth);N.push(C(s,{indexes:e._indexes,data:i,datum:e,x:o,y:a,positionH:l,positionV:"middle",themeColors:h})),R.set(t,{x:o,y:a,width:r.width,height:r.height,centerX:o+r.width/2,centerY:a+r.height/2})}),P.forEach(t=>{const{parent:e,child:n}=t,i=R.get(n),r=R.get(e);if(!i||!r)return;const o=n.data,{sx:s,sy:u,tx:f,ty:p}=((t,e,n,i=Em)=>{const r=(t=>{return"top"===t?0:"bottom"===t?1:"center"===t?.5:(e=t,Math.max(0,Math.min(1,e)));var e})(i),o=t.y+t.height*r,a=e.y+e.height*r;return"left"===n?{sx:t.x,sy:o,tx:e.x+e.width,ty:a}:{sx:t.x+t.width,sy:o,tx:e.x,ty:a}})(r,i,n.side,a),g=b.get(o)??_c(d,M(o,n.depth)),x=b.get(e.data)??_c(d,M(e.data,e.depth)),v="straight"===h?((t,e,n,i)=>`M ${t} ${e} L ${n} ${i}`)(s,u,f,p):((t,e,n,i)=>{const r=Math.abs(n-t)/2;return`M ${t} ${e} C ${n>t?t+r:t-r} ${e} ${n>t?n-r:n+r} ${i} ${n} ${i}`})(s,u,f,p),w=`edge-gradient-${o._indexes.join("-")}`;W.push(C(L,{d:v,stroke:"gradient"===l?`url(#${w})`:g??m,strokeWidth:c,fill:"none"})),"gradient"===l&&O.push(_("linearGradient",{id:w,gradientUnits:"userSpaceOnUse",x1:s,y1:u,x2:f,y2:p,children:[C("stop",{offset:"0%",stopColor:x??m}),C("stop",{offset:"100%",stopColor:g??m})]}));const k=o.children?.length??0,$=[...o._indexes,k],S=i.x+(i.width-y.width)/2,z=i.y+i.height+8,A=z+y.height+6;n.depth>0&&D.push(C(ec,{indexes:o._indexes,x:S,y:z})),D.push(C(tc,{indexes:$,x:S,y:A}))});const F=R.get(S);if(F){const t=S.data,e=t.children?.length??0,n=[...t._indexes,e],i=F.x+(F.width-y.width)/2,r=F.y+F.height+8+y.height+6;D.push(C(tc,{indexes:n,x:i,y:r}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[g,_(E,{children:[O.length>0?C(z,{children:O}):null,C(E,{children:W}),C(hc,{children:N}),C(nc,{children:D})]})]})},composites:["title","item"]});const Om=(t,e)=>{if(!t||"#"!==t[0]||7!==t.length)return t;const n=Math.max(0,Math.min(1,e));return`${t}${Math.round(255*n).toString(16).padStart(2,"0")}`},Wm=t=>null==t?"":String(t),Nm=(t,e,n)=>Wh(C(Ph,{fontSize:e,fontWeight:n,children:t})),Dm=(t,e,n,i)=>{const r=((t,e,n,i=" ")=>{const r=Nm(i,e,n);let o=r.width,a=r.height;return t.forEach(t=>{const i=Nm(t||" ",e,n);o=Math.max(o,i.width),a=Math.max(a,i.height)}),{width:o,height:a}})(t,e,"normal","Item");return{pillWidth:r.width+2*n,pillHeight:r.height+2*i}};im("hierarchy-structure",{component:t=>{const{Title:e,data:n,options:i,rowGap:r=20,labelGap:o=20,groupGap:a=20,pillGap:s=14,pillColumns:l=2,ungroupedColumns:h=6,layerLabelPosition:c="left",rowPadding:d=20,groupPadding:u=16,labelPaddingX:f=28,labelPaddingY:p=16,pillPaddingX:g=18,pillPaddingY:m=10,labelFontSize:y=20,groupTitleFontSize:x=18,pillFontSize:v=16,groupTitleGap:b=10,rowRadius:w=12,groupRadius:M=10,pillRadius:k=12}=t,{title:$,desc:S,items:z=[]}=n,A=e?C(e,{title:$,desc:S}):null;if(0===z.length)return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[A,C(E,{children:C(hc,{})})]});const L=Sc(i.themeConfig),P=[],T=[],I="right"===c,j=z.map(t=>{const e=Wm(t.label),n=Nm(e||" ",y,"bold"),i=n.width+2*f,r=n.height+2*p,o=t.children||[];if(o.some(t=>(t.children?.length||0)>0)){const t=[];o.forEach(e=>{(e.children||[]).forEach(e=>{t.push(Wm(e.label))})});const{pillWidth:n,pillHeight:h}=Dm(t,v,g,m),c=o.map(t=>{const e=Wm(t.label),i=Nm(e||" ",x,"bold"),r=t.children||[],o=r.length>0?Math.min(l,r.length):0,a=o>0?Math.ceil(r.length/o):0,c=o>0?o*n+(o-1)*s:0,d=a>0?a*h+(a-1)*s:0;return{label:e,children:r,width:Math.max(i.width,c)+2*u,height:2*u+i.height+(a>0?b+d:0),titleHeight:i.height,columns:o,contentWidth:c,pillWidth:n,pillHeight:h}}),d=c.reduce((t,e)=>t+e.width,0)+(c.length>1?(c.length-1)*a:0),f=c.reduce((t,e)=>Math.max(t,e.height),0);return{label:e,labelWidth:i,labelHeight:r,hasGroups:!0,children:o,groupMetrics:c,contentInnerWidth:d,contentInnerHeight:f}}const c=o.map(t=>Wm(t.label)),{pillWidth:d,pillHeight:w}=Dm(c,v,g,m),M=o.length>0?Math.min(h,o.length):0,k=M>0?Math.ceil(o.length/M):0;return{label:e,labelWidth:i,labelHeight:r,hasGroups:!1,children:o,pillWidth:d,pillHeight:w,columns:M,contentInnerWidth:M>0?M*d+(M-1)*s:0,contentInnerHeight:k>0?k*w+(k-1)*s:0}}),O=j.reduce((t,e)=>Math.max(t,e.labelWidth),0),W=j.reduce((t,e)=>Math.max(t,e.contentInnerWidth),0),N=(t,e,n,i,r,o,a,s,l,h,c,d,u,f)=>{P.push(C(H,{x:n,y:a,width:r,height:s,fill:u,stroke:f,rx:w,ry:w,"data-element-type":"shape"})),P.push(C(H,{x:l,y:h,width:c,height:d,fill:u,stroke:f,rx:w,ry:w,"data-element-type":"shape"})),T.push(C(Ph,{x:n,y:i,width:r,height:o,fontSize:y,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:L.colorText,"data-element-type":"item-label","data-indexes":e,children:t}))};let D=0,R=0;j.forEach((t,e)=>{const n=(t=>{const e=_c(i,[t])||L.colorPrimary||"#6c7dff";return{rowFill:Om(e,.12),rowStroke:Om(e,.55),groupFill:Om(e,.08),groupStroke:Om(e,.4),pillFill:Om(e,.06),pillStroke:Om(e,.35)}})(e),{rowWidth:l,rowHeight:h}=t.hasGroups?((t,e,n,i)=>{const r=t.groupMetrics||[],l=t.label,h=[e],c=O,f=t.labelHeight,p=t.contentInnerHeight,g=Math.max(0,W-t.contentInnerWidth),m=r.length>0?g/r.length:0,y=t.contentInnerWidth+(r.length>0?g:0)+2*d,w=p+2*d,$=Math.max(f,w),_=I?0:c+o,S=I?_+y+o:0,z=n+($-w)/2;N(l,h,S,n+($-f)/2,c,f,n,$,_,z,y,w,i.rowFill,i.rowStroke);let A=_+d;return r.forEach((t,e)=>{const n=[...h,e],r=t.width+m,o=z+d+(p-t.height)/2;P.push(C(H,{x:A,y:o,width:r,height:t.height,fill:i.groupFill,stroke:i.groupStroke,rx:M,ry:M,"data-element-type":"shape"}));const l=t.children.length>0,c=l?o+u:o,f=l?t.titleHeight:t.height,g=l?"top":"middle";if(T.push(C(Ph,{x:A+u,y:c,width:r-2*u,height:f,fontSize:x,fontWeight:"bold",alignHorizontal:"center",alignVertical:g,fill:L.colorText,"data-element-type":"item-label","data-indexes":n,children:t.label})),t.columns>0){const e=r-2*u,a=e-t.contentWidth,l=a>0?a/t.columns:0,h=t.pillWidth+l,c=(e-(t.columns*h+(t.columns-1)*s))/2,d=A+u+Math.max(0,c),f=o+u+t.titleHeight+b;t.children.forEach((e,r)=>{const o=[...n,r],a=Math.floor(r/t.columns),l=r%t.columns,c=d+l*(h+s),u=f+a*(t.pillHeight+s),p=Math.min(k,t.pillHeight/2);P.push(C(H,{x:c,y:u,width:h,height:t.pillHeight,fill:i.pillFill,stroke:i.pillStroke,rx:p,ry:p,"data-element-type":"shape"})),T.push(C(Ph,{x:c,y:u,width:h,height:t.pillHeight,fontSize:v,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:L.colorText,"data-element-type":"item-label","data-indexes":o,children:Wm(e.label)}))})}A+=r+a}),{rowWidth:I?S+c:_+y,rowHeight:$}})(t,e,D,n):((t,e,n,i)=>{const r=t.label,a=[e],l=O,h=t.labelHeight,c=t.contentInnerHeight,u=Math.max(0,W-t.contentInnerWidth),f=t.columns||0,p=t.pillWidth||0,g=t.pillHeight||0,m=p+(f>0?u/f:0),y=(f>0?f*m+(f-1)*s:0)+2*d,x=c+2*d,b=Math.max(h,x),w=I?0:l+o,M=I?w+y+o:0,$=n+(b-x)/2;if(N(r,a,M,n+(b-h)/2,l,h,n,b,w,$,y,x,i.rowFill,i.rowStroke),f>0){const e=w+d,n=$+d;(t.children||[]).forEach((t,r)=>{const o=[...a,r],l=Math.floor(r/f),h=e+r%f*(m+s),c=n+l*(g+s),d=Math.min(k,g/2);P.push(C(H,{x:h,y:c,width:m,height:g,fill:i.pillFill,stroke:i.pillStroke,rx:d,ry:d,"data-element-type":"shape"})),T.push(C(Ph,{x:h,y:c,width:m,height:g,fontSize:v,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:L.colorText,"data-element-type":"item-label","data-indexes":o,children:Wm(t.label)}))})}return{rowWidth:I?M+l:w+y,rowHeight:b}})(t,e,D,n);R=Math.max(R,l),D+=h+r});const F=Math.max(D-r,0);return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[A,_(E,{width:R,height:F,children:[C(E,{children:P}),C(hc,{children:T})]})]})},composites:["title"]});const Rm=(t,e)=>{const n=Math.max(0,e/2-1);return Math.min(t,n)};im("hierarchy-tree",{component:t=>{const{Title:e,Items:n,data:i,levelGap:r=80,nodeGap:o=60,edgeType:a="straight",edgeColorMode:s="gradient",edgeWidth:l=3,edgeStyle:h="solid",edgeDashPattern:c="5,5",edgeCornerRadius:d=0,edgeOffset:u=0,edgeOrigin:f="center",edgeOriginPadding:p=20,edgeMarker:g="none",markerSize:m=12,colorMode:y="branch",orientation:x="top-bottom",options:v}=t,b="left-right"===x||"right-left"===x,w="bottom-top"===x||"right-left"===x?-1:1,{title:M,desc:k}=i,$=$c(v),S=t=>{const{x:e,y:n}=t;return b?{x:n*w,y:e}:{x:e,y:n*w}},H=(t,e,n)=>{const{x:i,y:r}=S(t),o=i+n.x,a=r+n.y;return{centerX:o,centerY:a+e.height/2,left:o-e.width/2,right:o+e.width/2,top:a,bottom:a+e.height}},T=(t=>{const e=[...t];return e[0]?.children||(e[0]={...e[0],children:e.slice(1)},e.splice(1)),e})(i.items),I=e?C(e,{title:M,desc:k}):null,j=Wh(C(tc,{indexes:[0]}));if(!T.length)return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[I,C(E,{children:C(nc,{children:C(tc,{indexes:[0],x:-j.width/2,y:-j.height/2})})})]});const O=(t=>{if(!t.length)return null;const e=t[0],n=(t,e=[],i=0)=>{const r=[...e,i];return{...t,_originalIndex:r,_depth:r.length-1,children:t.children?.map((t,e)=>n(t,r,e))??[]}};return e.children?.length?n(e):{...e,_originalIndex:[0],_depth:0,children:t.slice(1).map((t,e)=>({...t,_originalIndex:[e+1],_depth:1}))}})(T),W=yp(O),{levelBounds:N,maxWidth:D,maxHeight:R}=(t=>{let e=0,r=0;const o=new Map,a=new Map;t.each(t=>{a.has(t.depth)||a.set(t.depth,t.data)});for(let s=0;s<t.height+1;s++){const t=Ec(n,s),l=a.get(s)??{},h=Wh(C(t,{indexes:l._originalIndex??Array(s+1).fill(0),data:i,datum:l,positionH:"center"}));o.set(s,h),e=Math.max(e,h.width),r=Math.max(r,h.height)}return{levelBounds:o,maxWidth:e,maxHeight:r}})(W),F=function(){var t=kp,e=1,n=1,i=null;function r(r){var l=function(t){for(var e,n,i,r,o,a=new zp(t,0),s=[a];e=s.pop();)if(i=e._.children)for(e.children=new Array(o=i.length),r=o-1;r>=0;--r)s.push(n=e.children[r]=new zp(i[r],r)),n.parent=e;return(a.parent=new zp(null,0)).children=[a],a}(r);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),i)r.eachBefore(s);else{var h=r,c=r,d=r;r.eachBefore(function(t){t.x<h.x&&(h=t),t.x>c.x&&(c=t),t.depth>d.depth&&(d=t)});var u=h===c?1:t(h,c)/2,f=u-h.x,p=e/(c.x+u+f),g=n/(d.depth||1);r.eachBefore(function(t){t.x=(t.x+f)*p,t.y=t.depth*g})}return r}function o(e){var n=e.children,i=e.parent.children,r=e.i?i[e.i-1]:null;if(n){!function(t){for(var e,n=0,i=0,r=t.children,o=r.length;--o>=0;)(e=r[o]).z+=n,e.m+=n,n+=e.s+(i+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;r?(e.z=r.z+t(e._,r._),e.m=e.z-o):e.z=o}else r&&(e.z=r.z+t(e._,r._));e.parent.A=function(e,n,i){if(n){for(var r,o=e,a=e,s=n,l=o.parent.children[0],h=o.m,c=a.m,d=s.m,u=l.m;s=Cp(s),o=$p(o),s&&o;)l=$p(l),(a=Cp(a)).a=e,(r=s.z+d-o.z-h+t(s._,o._))>0&&(_p(Sp(s,e,i),e,r),h+=r,c+=r),d+=s.m,h+=o.m,u+=l.m,c+=a.m;s&&!Cp(a)&&(a.t=s,a.m+=d-c),o&&!$p(l)&&(l.t=o,l.m+=h-u,i=e)}return i}(e,r,e.parent.A||i[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return r.separation=function(e){return arguments.length?(t=e,r):t},r.size=function(t){return arguments.length?(i=!1,e=+t[0],n=+t[1],r):i?null:[e,n]},r.nodeSize=function(t){return arguments.length?(i=!0,e=+t[0],n=+t[1],r):i?[e,n]:null},r}().nodeSize(b?[R+o,D+r]:[D+o,R+r]).separation(()=>1)(W).descendants(),V=F.map(t=>S(t)),B=Math.min(...V.map(t=>t.x)),q=Math.min(...V.map(t=>t.y)),G={x:Math.max(0,D/2-B),y:Math.max(0,-q+j.height+10)},Y=[],X=[],U=[],Z=[];return F.forEach((t,e)=>{t.data._flatIndex=e;const{x:n,y:i}=S(t);t.__layout={x:n,y:i}}),F.forEach(t=>{const{items:e,btns:r,deco:o}=((t,e,r,o,x,M)=>{const{depth:k,data:S,parent:z}=t,E=S._originalIndex,T=Ec(n,k),I=e.get(k),j=H(t,I,o),O=j.left,W=j.top,N={items:[],btns:[],deco:[]},D=zc({depth:k,originalIndexes:E,flatIndex:S._flatIndex},y),R=Sc({colorPrimary:_c(v,D)},v);if(N.items.push(C(T,{indexes:E,datum:S,data:i,x:O,y:W,positionH:"center",themeColors:R})),N.btns.push(C(ec,{indexes:E,x:O+(I.width-r.width)/2,y:W+I.height+5}),C(tc,{indexes:[...E,0],x:O+(I.width-r.width)/2,y:W+I.height+r.height+10})),z){const n=e.get(z.depth),i=H(z,n,o),r=M.filter(t=>t.parent===z),T=r.findIndex(e=>e===t),I=r.length;let O,W;if("distributed"===f&&I>1)if(b){const t=Rm(p,n.height),e=i.top+t,r=(i.bottom-t-e)/I;W=e+r*T+r/2,O=(w>0?i.right:i.left)+u*w}else{const t=Rm(p,n.width),e=i.left+t,r=(i.right-t-e)/I;O=e+r*T+r/2,W=(w>0?i.bottom:i.top)+u*w}else O=b?(w>0?i.right:i.left)+u*w:i.centerX,W=b?i.centerY:(w>0?i.bottom:i.top)+u*w;const R=b?(w>0?j.left:j.right)-u*w:j.centerX,F=b?j.centerY:(w>0?j.top:j.bottom)-u*w;let V,B=R,q=F;if("arrow"===g&&(b?B-=m*w:q-=m*w),"curved"===a)if(b){const t=O+(B-O)/2;V=`M ${O} ${W} C ${t} ${W}, ${t} ${q}, ${B} ${q}`}else{const t=W+(q-W)/2;V=`M ${O} ${W} C ${O} ${t}, ${B} ${t}, ${B} ${q}`}else if(d>0)V=((t,e,n,i,r,o="vertical")=>{const a="vertical"===o,s=a?i-e:n-t,l=a?n-t:i-e,h=0===s?1:Math.sign(s),c=0===l?1:Math.sign(l),d=a?e+s/2:t+s/2,u=Math.min(r,Math.abs(s)/2,Math.abs(l)/2);return 0===u?a?`M ${t} ${e} L ${t} ${d} L ${n} ${d} L ${n} ${i}`:`M ${t} ${e} L ${d} ${e} L ${d} ${i} L ${n} ${i}`:a?`M ${t} ${e}\n L ${t} ${d-h*u}\n Q ${t} ${d} ${t+c*u} ${d}\n L ${n-c*u} ${d}\n Q ${n} ${d} ${n} ${d+h*u}\n L ${n} ${i}`:`M ${t} ${e}\n L ${d-h*u} ${e}\n Q ${d} ${e} ${d} ${e+c*u}\n L ${d} ${i-c*u}\n Q ${d} ${i} ${d+h*u} ${i}\n L ${n} ${i}`})(O,W,B,q,d,b?"horizontal":"vertical");else if(b){const t=O+(B-O)/2;V=`M ${O} ${W} L ${t} ${W} L ${t} ${q} L ${B} ${q}`}else{const t=W+(q-W)/2;V=`M ${O} ${W} L ${O} ${t} L ${B} ${t} L ${B} ${q}`}let G=$;if("gradient"===s){const t=zc({depth:z.depth,originalIndexes:z.data._originalIndex,flatIndex:z.data._flatIndex},y),e=zc({depth:k,originalIndexes:E,flatIndex:S._flatIndex},y),n=_c(v,t),i=_c(v,e),r=`gradient-${z.data._originalIndex.join("-")}-${E.join("-")}`;x.push(_("linearGradient",{id:r,x1:O,y1:W,x2:B,y2:q,gradientUnits:"userSpaceOnUse",children:[C("stop",{offset:"0%",stopColor:n}),C("stop",{offset:"100%",stopColor:i})]})),G=`url(#${r})`}const Y="dashed"===h?c:"";if(N.deco.push(C(L,{d:V,stroke:G,strokeWidth:l,strokeDasharray:Y,fill:"none"})),"arrow"===g){const t="gradient"===s?_c(v,D):$c(v),e=b?[{x:R,y:F},{x:R-m*w,y:F-m/2},{x:R-m*w,y:F+m/2}]:[{x:R,y:F},{x:R-m/2,y:F-m*w},{x:R+m/2,y:F-m*w}];N.deco.push(C(P,{points:e,fill:t,width:m,height:m}))}if("dot"===g){const t=zc({depth:z.depth,originalIndexes:z.data._originalIndex,flatIndex:z.data._flatIndex},y),e="gradient"===s?_c(v,t):$c(v);N.deco.push(C(A,{x:(b?w>0?i.right+u:i.left-u:O)-m,y:(b?W:w>0?i.bottom+u:i.top-u)-m,width:2*m,height:2*m,fill:e}));const n="gradient"===s?_c(v,D):$c(v);N.deco.push(C(A,{x:R-m,y:F-m,width:2*m,height:2*m,fill:n}))}}return N})(t,N,j,G,Z,F);Y.push(...e),X.push(...r),U.push(...o)}),X.push(...((t,e,n)=>{const i=new Map;t.forEach(t=>{const e=t.parent?t.parent.data._originalIndex.join("-"):"root";(i.get(e)??i.set(e,[]).get(e)).push(t)});const r=[];return i.forEach(t=>{if(t.length<=1)return;const i=t.slice().sort((t,e)=>b?S(t).y-S(e).y:S(t).x-S(e).x);if(0!==i.length)for(let t=0;t<i.length-1;t++){const o=S(i[t]),a=S(i[t+1]),s=i[t].data._originalIndex.slice(0,-1),l=i[t].data._originalIndex.at(-1)+1;if(b){const t=o.x+n.x+(w>0?-e.width-5:e.width+5),i=(o.y+a.y)/2+n.y-e.height/2;r.push(C(tc,{indexes:[...s,l],x:t,y:i}))}else{const t=o.y+n.y-e.height-5,i=(o.x+a.x)/2+n.x-e.width/2;r.push(C(tc,{indexes:[...s,l],x:i,y:t}))}}}),r})(F,j,G)),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[I,_(E,{children:[Z.length>0&&C(z,{children:Z}),C(dc,{children:U}),C(hc,{children:Y}),C(nc,{children:X})]})]})},composites:["title","item"]}),im("list-column",{component:t=>{const{Title:e,Item:n,data:i,gap:r=20,width:o,zigzag:a}=t,{title:s,desc:l,items:h=[]}=i,c=Wh(C(tc,{indexes:[0]})),d=Wh(C(n,{indexes:[0],data:i,datum:h[0]})),u=o||d.width,f=e?C(e,{title:s,desc:l}):null,p=[],g=[],m=(u-c.width)/2;if(h.forEach((t,e)=>{const o=(d.height+r)*e,s=[e];g.push(C(n,{indexes:s,datum:t,data:i,y:o,width:u,positionV:"middle",positionH:a?e%2==0?"normal":"flipped":"normal"})),p.push(C(ec,{indexes:s,x:-c.width-10,y:o+(d.height-c.height)/2}));const l=0===e?-c.height:o-r/2-c.height/2;p.push(C(tc,{indexes:s,x:m,y:l}))}),h.length>0){const t=(d.height+r)*(h.length-1)+d.height;p.push(C(tc,{indexes:[h.length],x:m,y:t}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,_(E,{children:[C(hc,{children:g}),C(nc,{children:p})]})]})},composites:["title","item"]}),im("list-grid",{component:t=>{const{Title:e,Item:n,data:i,columns:r=3,gap:o=24,zigzag:a}=t,{title:s,desc:l,items:h=[]}=i,c=e?C(e,{title:s,desc:l}):null,d=Wh(C(tc,{indexes:[0]})),u=Wh(C(n,{indexes:[0],data:i,datum:h[0],positionH:"center"})),f=[],p=[],g=u.height+o,m=u.width+o,y=new Set;return h.forEach((t,e)=>{const s=Math.floor(e/r),l=e%r,c=l*m,x=s*g,v=[e];p.push(C(n,{indexes:v,datum:t,data:i,x:c,y:x,positionH:"center",positionV:a&&e%2==0?"normal":"flipped"})),f.push(C(ec,{indexes:v,x:c+(u.width-d.width)/2,y:x+u.height})),l<r-1&&f.push(C(tc,{indexes:[e+1],x:c+u.width+(o-d.width)/2,y:x+(u.height-d.height)/2})),0!==l||y.has(s)||(f.push(C(tc,{indexes:[e],x:c-o/2-d.width/2,y:x+(u.height-d.height)/2})),y.add(s)),(l===r-1||e===h.length-1)&&f.push(C(tc,{indexes:[e+1],x:c+u.width+o/2-d.width/2,y:x+(u.height-d.height)/2}))}),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,_(E,{children:[C(hc,{children:p}),C(nc,{children:f})]})]})},composites:["title","item"]}),im("list-pyramid",{component:t=>{const{Title:e,Item:n,data:i,gap:r=20,levelGap:o=20}=t,{title:a,desc:s,items:l=[]}=i,h=e?C(e,{title:a,desc:s}):null,c=Wh(C(tc,{indexes:[0]})),d=Wh(C(n,{indexes:[0],data:i,datum:l[0],positionH:"center"})),u=[],f=[],p=Math.ceil(Math.sqrt(l.length)),g=[];let m=l.length;for(let t=0;t<p;t++){const e=Math.min(t+1,m);if(g.push(e),m-=e,m<=0)break}let y=0;const x=Math.max(...g),v=(x*d.width+(x-1)*r)/2;return g.forEach((t,e)=>{const a=e*(d.height+o),s=t*d.width+(t-1)*r,h=v-s/2;for(let e=0;e<t&&y<l.length;e++){const o=h+e*(d.width+r),s=l[y],p=[y];f.push(C(n,{indexes:p,datum:s,data:i,x:o,y:a,positionH:"center"})),u.push(C(ec,{indexes:p,x:o+(d.width-c.width)/2,y:a+d.height})),e<t-1&&u.push(C(tc,{indexes:[y+1],x:o+d.width+(r-c.width)/2,y:a+(d.height-c.height)/2})),0===e&&u.push(C(tc,{indexes:[y],x:o-r/2-c.width/2,y:a+(d.height-c.height)/2})),e===t-1&&u.push(C(tc,{indexes:[y+1],x:o+d.width+r/2-c.width/2,y:a+(d.height-c.height)/2})),y++}}),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,_(E,{children:[C(hc,{children:f}),C(nc,{children:u})]})]})},composites:["title","item"]}),im("list-row",{component:t=>{const{Title:e,Item:n,data:i,gap:r=20,zigzag:o}=t,{title:a,desc:s,items:l=[]}=i,h=e?C(e,{title:a,desc:s}):null,c=Wh(C(tc,{indexes:[0]})),d=Wh(C(n,{indexes:[0],data:i,datum:l[0],positionH:"center"})),u=[],f=[],p=(d.height-c.height)/2,g=d.height;if(l.forEach((t,e)=>{const a=(d.width+r)*e,s=[e];f.push(C(n,{indexes:s,datum:t,data:i,x:a,positionH:"center",positionV:o&&e%2==0?"normal":"flipped"})),u.push(C(ec,{indexes:s,x:a+(d.width-c.width)/2,y:g}));const l=0===e?-(r+c.width)/2:a-(r+c.width)/2;u.push(C(tc,{indexes:s,x:l,y:p}))}),l.length>0){const t=(d.width+r)*(l.length-1)+d.width+(r-c.width)/2;u.push(C(tc,{indexes:[l.length],x:t,y:p}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,_(E,{children:[C(hc,{children:f}),C(nc,{children:u})]})]})},composites:["title","item"]}),im("list-sector",{component:t=>{const{Item:e,data:n,outerRadius:i=250,innerRadius:r=120,startAngle:o=-90,endAngle:a=270,gapAngle:s=1,options:l}=t,{title:h,items:c=[]}=n,d=Sc(l.themeConfig),u=Wh(C(tc,{indexes:[0]})),f=[],p=[],g=[],m=i+100,y=i+100,x=a-o,v=Math.abs(x-360)<.01,b=x-(c.length>0?s*(v?c.length:c.length-1):0),w=c.length>0?b/c.length:0;if(c.forEach((t,a)=>{const h=[a],d=o+(w+s)*a,x=d+w,b=s*Math.PI*i/180/r*(180/Math.PI),M=s,k=(d+M/2)*Math.PI/180,$=(x-M/2)*Math.PI/180,_=(d+b/2)*Math.PI/180,S=(x-b/2)*Math.PI/180,z=m+i*Math.cos(k),A=y+i*Math.sin(k),E=m+i*Math.cos($),P=y+i*Math.sin($),H=m+r*Math.cos(_),T=y+r*Math.sin(_),I=m+r*Math.cos(S),j=y+r*Math.sin(S),O=w>180?1:0,W=`\n M ${z} ${A}\n A ${i} ${i} 0 ${O} 1 ${E} ${P}\n L ${I} ${j}\n A ${r} ${r} 0 ${O} 0 ${H} ${T}\n Z\n `.trim(),N=_c(l,h);g.push(C(L,{id:"shape-sector",d:W,fill:N,width:2*i+200,height:2*i+200,"data-element-type":"shape"}));const D=(d+w/2)*Math.PI/180,R=(i+r)/2,F=i-r,V=R*(w*Math.PI/180),B=Math.min(.8*V,.9*F),q=Math.min(.9*F,.8*V),G=Wh(C(e,{indexes:[0],data:n,datum:c[0],positionH:"center",width:B,height:q})),Y=m+R*Math.cos(D)-G.width/2,X=y+R*Math.sin(D)-G.height/2;p.push(C(e,{indexes:h,datum:t,data:n,x:Y,y:X,positionH:"center",width:B,height:q,themeColors:{...Sc({colorBg:_c(l,h),colorPrimary:l.themeConfig?.colorBg||"white"})}}));const U=i+10,Z=m+U*Math.cos(D)-u.width/2,K=y+U*Math.sin(D)-u.height/2;if(f.push(C(ec,{indexes:h,x:Z,y:K})),v||a<c.length-1){const t=(x+s/2)*Math.PI/180,e=R,n=m+e*Math.cos(t)-u.width/2,i=y+e*Math.sin(t)-u.height/2;f.push(C(tc,{indexes:[a+1],x:n,y:i}))}}),c.length>0){const t=(o-s/2)*Math.PI/180,e=(i+r)/2,n=m+e*Math.cos(t)-u.width/2,a=y+e*Math.sin(t)-u.height/2;f.push(C(tc,{indexes:[0],x:n,y:a}))}const M=.9*r;let k=m,$=y,S=1.4*M,z=1.4*M;if(!v){const t=(o+a)/2*Math.PI/180,e=.5*M;k=m+e*Math.cos(t),$=y+e*Math.sin(t);const n=x*Math.PI*e/180;S=Math.min(.8*n,1.4*M),z=Math.min(1.5*e,1.4*M)}let P="";if(v)P="";else{const t=o*Math.PI/180,e=a*Math.PI/180,n=m+M*Math.cos(t),i=y+M*Math.sin(t),r=m+M*Math.cos(e),s=y+M*Math.sin(e);P=`\n M ${m} ${y}\n L ${n} ${i}\n A ${M} ${M} 0 ${x>180?1:0} 1 ${r} ${s}\n Z\n `.trim()}return _(E,{id:"infographic-container",children:[C(E,{children:g}),v?C(A,{id:"shape-center-circle",x:m-M,y:y-M,width:2*M,height:2*M,fill:d.colorPrimaryBg,fillOpacity:.5,"data-element-type":"shape"}):C(L,{id:"shape-center-sector",d:P,fill:d.colorPrimaryBg,fillOpacity:.5,width:2*i+200,height:2*i+200,"data-element-type":"shape"}),C(Ph,{x:k-S/2,y:$-z/2,width:S,height:z,alignHorizontal:"center",alignVertical:"middle",fontSize:24,fontWeight:"bold",fill:d.colorText,"data-element-type":"title",children:h}),C(hc,{children:p}),C(nc,{children:f})]})},composites:["title","item"]}),im("list-waterfall",{component:t=>{const{Title:e,Item:n,data:i,columns:r=4,gap:o=20,stepOffset:a=40}=t,{title:s,desc:l,items:h=[]}=i,c=e?C(e,{title:s,desc:l}):null,d=Wh(C(tc,{indexes:[0]})),u=Wh(C(n,{indexes:[0],data:i,datum:h[0],positionH:"center"})),f=[],p=[],g=u.width+o;return h.forEach((t,e)=>{const s=e%r,l=Math.floor(e/r),h=s*g,c=l*(u.height+o)+s*a,m=[e];p.push(C(n,{indexes:m,datum:t,data:i,x:h,y:c,positionH:"center"})),f.push(C(ec,{indexes:m,x:h+(u.width-d.width)/2,y:c+u.height+5}))}),h.forEach((t,e)=>{const n=e%r,i=Math.floor(e/r),s=n*g,l=i*(u.height+o)+n*a;0===e&&f.push(C(tc,{indexes:[0],x:s-o/2-d.width/2,y:l+(u.height-d.height)/2})),n<r-1&&e<h.length-1&&i===Math.floor((e+1)/r)&&f.push(C(tc,{indexes:[e+1],x:s+u.width+(o-d.width)/2,y:l+(u.height-d.height)/2})),n!==r-1&&e!==h.length-1||f.push(C(tc,{indexes:[e+1],x:s+u.width+(o-d.width)/2,y:l+(u.height-d.height)/2}))}),0===h.length&&f.push(C(tc,{indexes:[0],x:(r-1)*g/2+(u.width-d.width)/2,y:0})),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,_(E,{children:[C(hc,{children:p}),C(nc,{children:f})]})]})},composites:["title","item"]});const Fm=(t,e,n)=>{const i=e[t];return i?i.map(t=>({x:700*t.x,y:t.y*n,anchor:t.anchor})):null},Vm=(t,e)=>{const n=e.x-t.x,i=e.y-t.y,r=Math.hypot(n,i)||1;return{x:n/r,y:i/r}},Bm=t=>{const{presetRatios:e,arrowHeight:n,Arrow:i}=t;return t=>{const{Title:r,Item:o,data:a,options:s,itemGap:l=24}=t,{title:h,desc:c,items:d=[]}=a,u=Math.min(d.length,6),f=d.slice(0,u),p=r?C(r,{title:h,desc:c}):null,g=$c(s),m=Sc({colorPrimary:g},s).colorTextSecondary||"#737373",y=Wh(C(tc,{indexes:[0]}));if(0===d.length){const t=Fm(1,e,n)?.[0];if(!t)return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,C(E,{children:C(i,{colorPrimary:g,colorShadow:m})})]});const r=t.x-y.width/2,o=t.y-y.height/2;return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,_(E,{children:[C(i,{colorPrimary:g,colorShadow:m}),C(hc,{}),C(nc,{children:C(tc,{indexes:[0],x:r,y:o})})]})]})}const x=Wh(C(o,{indexes:[0],data:a,datum:d[0],positionH:"center"})),v=[],b=[],w=Fm(u,e,n);if(!w)return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,_(E,{children:[C(i,{colorPrimary:g,colorShadow:m}),C(hc,{})]})]});const M=w,k=M.length>1?Vm(M[0],M[M.length-1]):{x:1,y:0},$=M.length>1?Vm(M[0],M[1]):k,S=M.length>1?Vm(M[M.length-2],M[M.length-1]):k,z=.45*Math.max(x.width,x.height)+l;if(M.forEach((t,e)=>{const i=(t=>{const{x:e,y:n,centerY:i}=((t,e)=>{const n=t.anchor||"center";let i=t.x-e.width/2,r=t.y-e.height/2,o=t.y;switch(n){case"top":i=t.x-e.width/2,r=t.y,o=t.y+e.height/2;break;case"bottom":i=t.x-e.width/2,r=t.y-e.height,o=t.y-e.height/2;break;case"top-left":i=t.x,r=t.y,o=t.y+e.height/2;break;case"top-right":i=t.x-e.width,r=t.y,o=t.y+e.height/2;break;case"bottom-left":i=t.x,r=t.y-e.height,o=t.y-e.height/2;break;case"bottom-right":i=t.x-e.width,r=t.y-e.height,o=t.y-e.height/2}return{x:i,y:r,centerY:o}})(t,x);return{x:e,y:n,centerY:i}})(t),r=i.centerY<n/2,s=[e],l=f[e];if(!l)return;b.push(C(o,{indexes:s,datum:l,data:a,x:i.x,y:i.y,positionH:"center"}));const h=i.x+x.width-y.width/2,c=r?i.y-y.height/2:i.y+x.height-y.height/2;v.push(C(ec,{indexes:s,x:h,y:c}))}),M.length>0){const t=M[0],e=t.x-$.x*z-y.width/2,n=t.y-$.y*z-y.height/2;v.push(C(tc,{indexes:[0],x:e,y:n}));for(let t=0;t<M.length-1;t++){const e=M[t],n=M[t+1],i=(e.x+n.x)/2,r=(e.y+n.y)/2,o=i-y.width/2,a=r-y.height/2;v.push(C(tc,{indexes:[t+1],x:o,y:a}))}const i=M[M.length-1],r=i.x+S.x*z-y.width/2,o=i.y+S.y*z-y.height/2;v.push(C(tc,{indexes:[u],x:r,y:o}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,_(E,{children:[C(i,{colorPrimary:g,colorShadow:m}),C(hc,{children:b}),C(nc,{children:v})]})]})}},qm=Bm({arrowHeight:330,presetRatios:{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"}]},Arrow:({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=ks(t).darken(20).toHexString();return _(E,{width:700,height:330,children:[C("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}),C("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}),C("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}),C("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}),C("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}),C("path",{d:"M408.473 223.924H408.314L408.318 223.92C408.369 223.922 408.421 223.924 408.473 223.924Z",fill:n}),C("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}),C("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}),C("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})]})}}),Gm=Bm({arrowHeight:333,presetRatios:{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"}]},Arrow:({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=ks(t).darken(20).toHexString();return _(E,{width:700,height:333,children:[C("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}),C("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}),C("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}),C("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}),C("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}),C("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}),C("path",{d:"M408.341 98H408.183L408.186 98.004C408.237 98.0013 408.289 98 408.341 98Z",fill:n}),C("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}),C("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}),C("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})]})}});im("list-zigzag-down",{component:qm,composites:["title","item"]}),im("list-zigzag-up",{component:Gm,composites:["title","item"]});const Ym={axisColor:"#D9D9D9",axisArrowSize:5,strokeWidth:1,dashArray:"4,2",defaultExtraSpacing:20};im("quadrant",{component:t=>{const{Title:e,Item:n,data:i,quadrantWidth:r,quadrantHeight:o,showAxis:a=!0,dashedAxis:s=!0}=t,{title:l,desc:h,items:c=[]}=i,d=e?C(e,{title:l,desc:h}):null,u=Array.from({length:4},(t,e)=>c[e]),f=u[0]?Wh(C(n,{indexes:[0],data:i,datum:u[0]})):{width:0,height:0},p=r??f.width+Ym.defaultExtraSpacing,g=o??f.height+Ym.defaultExtraSpacing,m=function(t,e,n){const i=t/2,r=e/2;return[{x:i-n.width/2,y:r-n.height/2},{x:t+i-n.width/2,y:r-n.height/2},{x:i-n.width/2,y:e+r-n.height/2},{x:t+i-n.width/2,y:e+r-n.height/2}]}(p,g,f),y=u.map((t,e)=>{if(!t)return null;const r=m[e];return C(n,{indexes:[e],datum:t,data:i,x:r.x,y:r.y,positionH:e%2?"flipped":"normal",positionV:e<2?"normal":"flipped"})}).filter(Boolean),x=function(t,e,n,i){if(!n)return[];const{axisColor:r,axisArrowSize:o,strokeWidth:a,dashArray:s}=Ym,l=t,h=e,c=2*t,d=2*e,u=i?s:void 0;return[C(L,{d:`M 0 ${h} L ${c} ${h}`,stroke:r,strokeWidth:a,strokeDasharray:u,fill:"none","data-element-type":"shape"}),_(dc,{transform:`translate(${c}, ${h})`,children:[C(L,{d:`M 0 0 L ${-o} ${-o/2}`,stroke:r,strokeWidth:a,fill:"none"}),C(L,{d:`M 0 0 L ${-o} ${o/2}`,stroke:r,strokeWidth:a,fill:"none"})]}),_(dc,{transform:`translate(0, ${h})`,children:[C(L,{d:`M 0 0 L ${o} ${-o/2}`,stroke:r,strokeWidth:a,fill:"none"}),C(L,{d:`M 0 0 L ${o} ${o/2}`,stroke:r,strokeWidth:a,fill:"none"})]}),C(L,{d:`M ${l} 0 L ${l} ${d}`,stroke:r,strokeWidth:a,strokeDasharray:u,fill:"none","data-element-type":"shape"}),_(dc,{transform:`translate(${l}, 0)`,children:[C(L,{d:`M 0 0 L ${-o/2} ${o}`,stroke:r,strokeWidth:a,fill:"none"}),C(L,{d:`M 0 0 L ${o/2} ${o}`,stroke:r,strokeWidth:a,fill:"none"})]}),_(dc,{transform:`translate(${l}, ${d})`,children:[C(L,{d:`M 0 0 L ${-o/2} ${-o}`,stroke:r,strokeWidth:a,fill:"none"}),C(L,{d:`M 0 0 L ${o/2} ${-o}`,stroke:r,strokeWidth:a,fill:"none"})]})]}(p,g,a,s);return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d,_(E,{width:2*p,height:2*g,children:[x,C(hc,{children:y})]})]})},composites:["title","item"]}),im("relation-circle",{component:t=>{const{Title:e,Item:n,data:i,radius:r=150,startMode:o="top"}=t,{title:a,desc:s,items:l=[]}=i,h=e?C(e,{title:a,desc:s}):null,c=Wh(C(tc,{indexes:[0]})),d=Wh(C(n,{indexes:[0],data:i,datum:l[0],positionH:"center"})),u=[],f=[];if(0===l.length)return u.push(C(tc,{indexes:[0],x:-c.width/2,y:-c.height/2})),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,C(E,{children:C(nc,{children:u})})]});const p=Math.max(d.width,d.height),g=Math.max(r,p),m=g+p/2,y=l.map(()=>(d.width+d.height)/2),x=y.reduce((t,e)=>t+e,0);let v;v="equal"===o?-Math.PI/2:-Math.PI/2+2*Math.PI/l.length/2;let b=v;l.forEach((t,e)=>{const r=y[e]/x*2*Math.PI,o=b+r/2;b+=r;const a=m+g*Math.cos(o)-d.width/2,s=m+g*Math.sin(o)-d.height/2;f.push(C(n,{indexes:[e],datum:t,data:i,x:a,y:s}));const l=g-Math.max(d.width,d.height)/2-20,h=m+l*Math.cos(o)-c.width/2,p=m+l*Math.sin(o)-c.height/2;u.push(C(ec,{indexes:[e],x:h,y:p}))});const w=g-Math.max(d.width,d.height)/2-20;if(l.length>0)for(let t=0;t<l.length;t++){const e=2*t*Math.PI/l.length-Math.PI/2,n=(t+1)%l.length*2*Math.PI/l.length-Math.PI/2;let i;i=t===l.length-1?e+(n+2*Math.PI-e)/2:(e+n)/2;const r=m+w*Math.cos(i)-c.width/2,o=m+w*Math.sin(i)-c.height/2;u.push(C(tc,{indexes:[t+1],x:r,y:o}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,_(E,{children:[C(hc,{children:f}),C(nc,{children:u})]})]})},composites:["title","item"]}),im("relation-network",{component:t=>{const{Title:e,Item:n,data:i,spacing:r=120,showConnections:o=!0,options:a}=t,{title:s,desc:l,items:h=[]}=i,c=e?C(e,{title:s,desc:l}):null;if(0===h.length)return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,C(E,{children:C(hc,{})})]});const d=Wh(C(n,{indexes:[0],data:i,datum:h[0],positionH:"center"})),{nodes:u,links:f}=function(){const t=h.map((t,e)=>({id:e,data:t,isCenter:0===e,_originalIndex:[e]})),e=h.slice(1).map((t,e)=>({source:0,target:e+1})),n=function(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),o=0,a=.6,s=new Map,l=mu(d),h=nu("tick","end"),c=function(){let t=1;return()=>(t=(1664525*t+1013904223)%up)/up}();function d(){u(),h.call("tick",e),n<i&&(l.stop(),h.call("end",e))}function u(i){var l,h,c=t.length;void 0===i&&(i=1);for(var d=0;d<i;++d)for(n+=(o-n)*r,s.forEach(function(t){t(n)}),l=0;l<c;++l)null==(h=t[l]).fx?h.x+=h.vx*=a:(h.x=h.fx,h.vx=0),null==h.fy?h.y+=h.vy*=a:(h.y=h.fy,h.vy=0);return e}function f(){for(var e,n=0,i=t.length;n<i;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var r=10*Math.sqrt(.5+n),o=n*gp;e.x=r*Math.cos(o),e.y=r*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t,c),e}return null==t&&(t=[]),f(),e={tick:u,restart:function(){return l.restart(d),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),s.forEach(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(i=+t,e):i},alphaDecay:function(t){return arguments.length?(r=+t,e):+r},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},randomSource:function(t){return arguments.length?(c=t,s.forEach(p),e):c},force:function(t,n){return arguments.length>1?(null==n?s.delete(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,i){var r,o,a,s,l,h=0,c=t.length;for(null==i?i=1/0:i*=i,h=0;h<c;++h)(a=(r=e-(s=t[h]).x)*r+(o=n-s.y)*o)<i&&(l=s,i=a);return l},on:function(t,n){return arguments.length>1?(h.on(t,n),e):h.on(t)}}}(t).force("link",function(t){var e,n,i,r,o,a,s=cp,l=function(t){return 1/Math.min(r[t.source.index],r[t.target.index])},h=ap(30),c=1;function d(i){for(var r=0,s=t.length;r<c;++r)for(var l,h,d,u,f,p,g,m=0;m<s;++m)h=(l=t[m]).source,u=(d=l.target).x+d.vx-h.x-h.vx||sp(a),f=d.y+d.vy-h.y-h.vy||sp(a),u*=p=((p=Math.sqrt(u*u+f*f))-n[m])/p*i*e[m],f*=p,d.vx-=u*(g=o[m]),d.vy-=f*g,h.vx+=u*(g=1-g),h.vy+=f*g}function u(){if(i){var a,l,h=i.length,c=t.length,d=new Map(i.map((t,e)=>[s(t,e,i),t]));for(a=0,r=new Array(h);a<c;++a)(l=t[a]).index=a,"object"!=typeof l.source&&(l.source=dp(d,l.source)),"object"!=typeof l.target&&(l.target=dp(d,l.target)),r[l.source.index]=(r[l.source.index]||0)+1,r[l.target.index]=(r[l.target.index]||0)+1;for(a=0,o=new Array(c);a<c;++a)l=t[a],o[a]=r[l.source.index]/(r[l.source.index]+r[l.target.index]);e=new Array(c),f(),n=new Array(c),p()}}function f(){if(i)for(var n=0,r=t.length;n<r;++n)e[n]=+l(t[n],n,t)}function p(){if(i)for(var e=0,r=t.length;e<r;++e)n[e]=+h(t[e],e,t)}return null==t&&(t=[]),d.initialize=function(t,e){i=t,a=e,u()},d.links=function(e){return arguments.length?(t=e,u(),d):t},d.id=function(t){return arguments.length?(s=t,d):s},d.iterations=function(t){return arguments.length?(c=+t,d):c},d.strength=function(t){return arguments.length?(l="function"==typeof t?t:ap(+t),f(),d):l},d.distance=function(t){return arguments.length?(h="function"==typeof t?t:ap(+t),p(),d):h},d}(e).id(t=>t.id).distance(r)).force("charge",function(){var t,e,n,i,r,o=ap(-30),a=1,s=1/0,l=.81;function h(n){var r,o=t.length,a=np(t,fp,pp).visitAfter(d);for(i=n,r=0;r<o;++r)e=t[r],a.visit(u)}function c(){if(t){var e,n,i=t.length;for(r=new Array(i),e=0;e<i;++e)n=t[e],r[n.index]=+o(n,e,t)}}function d(t){var e,n,i,o,a,s=0,l=0;if(t.length){for(i=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(s+=e.value,l+=n,i+=n*e.x,o+=n*e.y);t.x=i/l,t.y=o/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function u(t,o,h,c){if(!t.value)return!0;var d=t.x-e.x,u=t.y-e.y,f=c-o,p=d*d+u*u;if(f*f/l<p)return p<s&&(0===d&&(p+=(d=sp(n))*d),0===u&&(p+=(u=sp(n))*u),p<a&&(p=Math.sqrt(a*p)),e.vx+=d*t.value*i/p,e.vy+=u*t.value*i/p),!0;if(!(t.length||p>=s)){(t.data!==e||t.next)&&(0===d&&(p+=(d=sp(n))*d),0===u&&(p+=(u=sp(n))*u),p<a&&(p=Math.sqrt(a*p)));do{t.data!==e&&(f=r[t.data.index]*i/p,e.vx+=d*f,e.vy+=u*f)}while(t=t.next)}}return h.initialize=function(e,i){t=e,n=i,c()},h.strength=function(t){return arguments.length?(o="function"==typeof t?t:ap(+t),c(),h):o},h.distanceMin=function(t){return arguments.length?(a=t*t,h):Math.sqrt(a)},h.distanceMax=function(t){return arguments.length?(s=t*t,h):Math.sqrt(s)},h.theta=function(t){return arguments.length?(l=t*t,h):Math.sqrt(l)},h}().strength(-50)).force("center",function(t,e){var n,i=1;function r(){var r,o,a=n.length,s=0,l=0;for(r=0;r<a;++r)s+=(o=n[r]).x,l+=o.y;for(s=(s/a-t)*i,l=(l/a-e)*i,r=0;r<a;++r)(o=n[r]).x-=s,o.y-=l}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r.strength=function(t){return arguments.length?(i=+t,r):i},r}(0,0)).force("collision",function(t){var e,n,i,r=1,o=1;function a(){for(var t,a,l,h,c,d,u,f=e.length,p=0;p<o;++p)for(a=np(e,lp,hp).visitAfter(s),t=0;t<f;++t)l=e[t],d=n[l.index],u=d*d,h=l.x+l.vx,c=l.y+l.vy,a.visit(g);function g(t,e,n,o,a){var s=t.data,f=t.r,p=d+f;if(!s)return e>h+p||o<h-p||n>c+p||a<c-p;if(s.index>l.index){var g=h-s.x-s.vx,m=c-s.y-s.vy,y=g*g+m*m;y<p*p&&(0===g&&(y+=(g=sp(i))*g),0===m&&(y+=(m=sp(i))*m),y=(p-(y=Math.sqrt(y)))/y*r,l.vx+=(g*=y)*(p=(f*=f)/(u+f)),l.vy+=(m*=y)*p,s.vx-=g*(p=1-p),s.vy-=m*p)}}}function s(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function l(){if(e){var i,r,o=e.length;for(n=new Array(o),i=0;i<o;++i)r=e[i],n[r.index]=+t(r,i,e)}}return"function"!=typeof t&&(t=ap(null==t?1:+t)),a.initialize=function(t,n){e=t,i=n,l()},a.iterations=function(t){return arguments.length?(o=+t,a):o},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:ap(+e),l(),a):t},a}().radius(Math.max(d.width,d.height)/2+10));for(let t=0;t<300;++t)n.tick();return{nodes:t,links:e}}(),p=Math.min(...u.map(t=>t.x??0)),g=Math.min(...u.map(t=>t.y??0)),m=Math.max(0,-p+d.width/2),y=Math.max(0,-g+d.height/2),x=u.map(t=>{if(null==t.x||null==t.y)return null;const e=t.x+m-d.width/2,r=t.y+y-d.height/2,{positionH:o,positionV:a}=((t,e)=>({positionH:t<-50?"flipped":t>50?"normal":"center",positionV:e<-50?"flipped":e>50?"normal":"middle"}))(t.x,t.y);return C(n,{indexes:t._originalIndex,datum:t.data,data:i,x:e,y:r,positionH:o,positionV:a},t.id)}).filter(Boolean),v=new Map(u.map(t=>[t.id,t])),b=o?f.map(t=>{const e="object"==typeof t.source?t.source:v.get(t.source),n="object"==typeof t.target?t.target:v.get(t.target);return e&&n&&null!=e.x&&null!=e.y&&null!=n.x&&null!=n.y?C(L,{d:`M ${e.x+m} ${e.y+y} L ${n.x+m} ${n.y+y}`,stroke:$c(a),strokeWidth:2,strokeOpacity:.6}):null}).filter(Boolean):[];return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,_(E,{children:[C(E,{children:b}),C(hc,{children:x})]})]})},composites:["title","item"]});const Xm=({width:t=25,height:e=25,colorPrimary:n="#6699FF",rotation:i=0,...r})=>{const o=`gradient-arrow-stroke-${n.replace("#","")}`,a=`gradient-arrow-fill-${n.replace("#","")}`,s=Math.round(.515*t),l=Math.round(.275*e),h=Math.round(.875*e);return _($,{children:[C(P,{...r,width:t,height:e,points:[{x:0,y:l},{x:s,y:l},{x:s,y:.075*e},{x:t,y:.575*e},{x:s,y:1.075*e},{x:s,y:h},{x:0,y:h}],fill:`url(#${a})`,stroke:`url(#${o})`,transform:`rotate(${i} ${t/2} ${e/2})`,"data-element-type":"shape"}),_(z,{children:[_("linearGradient",{id:a,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[C("stop",{offset:"0%","stop-color":n,"stop-opacity":"0.36"}),C("stop",{offset:"100%","stop-color":n,"stop-opacity":"0"})]}),_("linearGradient",{id:o,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[C("stop",{offset:"0%","stop-color":n}),C("stop",{offset:"58%","stop-color":n,"stop-opacity":"0"})]})]})]})},Um=({text:t,x:e=0,y:n=0,fontSize:i=56,fontWeight:r="bold",fill:o="#FFFFFF",textAnchor:a="middle",dominantBaseline:s="middle",shadowOffsetX:l=2,shadowOffsetY:h=4,midShadowOffsetX:c=1,midShadowOffsetY:d=2,deepShadowOpacity:u=.3,midShadowOpacity:f=.5})=>_(E,{children:[C("text",{x:e,y:n,fontSize:i,fontWeight:r,fill:o,fillOpacity:u,textAnchor:a,dominantBaseline:s,transform:`translate(${l}, ${h})`,children:t}),C("text",{x:e,y:n,fontSize:i,fontWeight:r,fill:o,fillOpacity:f,textAnchor:a,dominantBaseline:s,transform:`translate(${c}, ${d})`,children:t}),C("text",{x:e,y:n,fontSize:i,fontWeight:r,fill:o,textAnchor:a,dominantBaseline:s,children:t})]}),Zm=({width:t=25,height:e=25,colorPrimary:n="#6699FF",rotation:i=0,strokeWidth:r=4,...o})=>C(P,{...o,width:t,height:e,points:[{x:t/2,y:0},{x:t,y:e},{x:0,y:e}],fill:n,stroke:n,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",transform:`rotate(${i} ${t/2} ${e/2})`}),Km=240,Qm=_("filter",{id:"sequence-ascending-stairs-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[C("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),C("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"}),C("feOffset",{dx:"0",dy:"4"}),C("feGaussianBlur",{stdDeviation:"6"}),C("feComposite",{in2:"hardAlpha",operator:"out"}),C("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"}),C("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),C("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]});im("sequence-ascending-stairs-3d",{component:t=>{const{Title:e,Item:n,data:i,options:r,cubeWidth:o=Km}=t,{title:a,desc:s,items:l=[]}=i,h=e?C(e,{title:a,desc:s}):null;if(0===l.length){const t=C(tc,{indexes:[0],x:0,y:0});return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[C(z,{children:Qm}),h,C(E,{children:C(nc,{children:t})})]})}const c=Wh(C(tc,{indexes:[0]})),d=[],u=[],f=[],p=o/Km,g=180*p;return l.forEach((t,e)=>{const a=[e],s=_c(r,a),h=e*(o+-118),m=118*(l.length-1-e),y=`cube-gradient-bottom-${e}`,x=`cube-gradient-top-${e}`,v=`cube-gradient-stroke-${e}`;f.push(_(E,{x:h,y:m,id:`cube-${e}`,width:o,height:g,filter:"url(#sequence-ascending-stairs-3d-shadow-filter)",children:[_(z,{children:[_("linearGradient",{id:y,x1:"0",y1:"124.5",x2:"238.9",y2:"124.5",gradientUnits:"userSpaceOnUse",children:[C("stop",{offset:"0",stopColor:s,stopOpacity:"0.8"}),C("stop",{offset:"1",stopColor:s,stopOpacity:"0.4"})]}),_("linearGradient",{id:x,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[C("stop",{offset:"0",stopColor:s,stopOpacity:"0.9"}),C("stop",{offset:"1",stopColor:s,stopOpacity:"0.5"})]}),_("linearGradient",{id:v,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[C("stop",{offset:"0",stopColor:s}),C("stop",{offset:"1",stopColor:s,stopOpacity:"0.7"})]})]}),_(dc,{transform:`scale(${p})`,children:[C(L,{d:"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",fill:`url(#${y})`}),C(L,{d:"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",fill:`url(#${x})`}),C(L,{d:"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",fill:`url(#${v})`})]}),C(Um,{text:e+1,x:115,y:65,fontSize:56})]}));const b=h+o+40,w=m+g/2;if(u.push(C(n,{indexes:a,datum:t,data:i,x:b,y:w,positionH:"normal"})),d.push(C(ec,{indexes:a,x:h+o-c.width/2,y:m-c.height/2})),0===e&&d.push(C(tc,{indexes:[0],x:h-30-c.width/2,y:m+g/2-c.height/2})),e<l.length-1){const t=118*(l.length-1-(e+1)),n=h+o-c.width/2,i=(m+g/2+t+g/2)/2-c.height/2;d.push(C(tc,{indexes:[e+1],x:n,y:i}))}else d.push(C(tc,{indexes:[l.length],x:h+o+30-c.width/2,y:m+g/2-c.height/2}))}),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[C(z,{children:Qm}),h,_(E,{x:0,y:0,children:[C(E,{children:f}),C(hc,{children:u}),C(nc,{children:d})]})]})},composites:["title","item"]}),im("sequence-ascending-steps",{component:t=>{const{Title:e,Item:n,data:i,hGap:r=0,vGap:o=0}=t,{title:a,desc:s,items:l=[]}=i,h=e?C(e,{title:a,desc:s}):null,c=Wh(C(n,{indexes:[0],data:i,datum:l[0]})),d=[],u=[],f=l.length,p=c.width+r,g=c.height/2+o,m=c.width/2,y=0+(f-1)*g;return l.forEach((t,e)=>{const o=m+e*p,a=y-e*g,s=[e];d.push(C(n,{indexes:s,datum:t,data:i,x:o,y:a})),u.push(C(ec,{indexes:s,x:o+c.width-30,y:a+c.height/2+10})),u.push(C(tc,{indexes:s,x:o+c.width+r/2,y:a-30}))}),_(fc,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,_(E,{children:[C(hc,{children:d}),C(nc,{children:u})]})]})},composites:["title","item"]}),im("sequence-circle-arrows",{component:t=>{const{Title:e,Item:n,data:i,options:r,radius:o=150,arrowSize:a=4,strokeWidth:s=10}=t,{title:l,desc:h,items:c=[]}=i,d=Wh(C(tc,{indexes:[0]})),u=$c(r);if(!n){const t=e?C(e,{title:l,desc:h}):null;return _(fc,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[t,C(E,{children:C(nc,{children:C(tc,{indexes:[0],x:0,y:0})})})]})}const f=c.length;if(0===f){const t=e?C(e,{title:l,desc:h}):null;return _(fc,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[t,C(E,{children:C(nc,{children:C(tc,{indexes:[0],x:0,y:0})})})]})}const p=Wh(C(n,{indexes:[0],data:i,datum:c[0]})),g=2*Math.PI/f,m=[];let y=1/0,x=1/0,v=-1/0,b=-1/0;for(let t=0;t<f;t++){const e=t*g-Math.PI/2,n=0+o*Math.cos(e),i=0+o*Math.sin(e);m.push({x:n,y:i}),y=Math.min(y,n),x=Math.min(x,i),v=Math.max(v,n),b=Math.max(b,i)}const w=[];for(let t=0;t<f;t++){const e=m[t],n=m[(t+1)%f],i=Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2)),r=Math.min(.5*i,100),o=(e.x+n.x)/2,a=(e.y+n.y)/2;y=Math.min(y,o-r/2),x=Math.min(x,a-r/2),v=Math.max(v,o+r/2),b=Math.max(b,a+r/2);const s=Math.atan2(a-0,o-0);let l,h;const c=180*(s<0?s+2*Math.PI:s)/Math.PI,u=r/2+20,g=o+Math.cos(s)*u,M=a+Math.sin(s)*u;c>=337.5||c<22.5?(l=g,h=M-p.height/2):c>=22.5&&c<67.5?(l=g,h=M):c>=67.5&&c<112.5?(l=g-p.width/2,h=M):c>=112.5&&c<157.5?(l=g-p.width,h=M):c>=157.5&&c<202.5?(l=g-p.width,h=M-p.height/2):c>=202.5&&c<247.5?(l=g-p.width,h=M-p.height):c>=247.5&&c<292.5?(l=g-p.width/2,h=M-p.height):(l=g,h=M-p.height),w.push({lineLength:i,circleBigW:r,midX:o,midY:a,itemX:l,itemY:h}),y=Math.min(y,l),x=Math.min(x,h),v=Math.max(v,l+p.width+d.width+5),b=Math.max(b,h+p.height)}const M=Math.max(0,-y),k=Math.max(0,-x),$=e?C(e,{title:l,desc:h}):null,S=[],P=[],H=[],T=[],I=m.map(t=>({x:t.x+M,y:t.y+k}));for(let t=0;t<f;t++){const e=I[t],n=I[(t+1)%f],i=(t+1)%f,o=[t],{lineLength:l,circleBigW:h,midX:c,midY:p}=w[t],g=Math.max(h-20,20),m=Math.max(.4*g,16),y=_c(r,o)||u,x=l,v=(n.x-e.x)/x,b=(n.y-e.y)/x,$=10+a,_=Math.min(5,(x-$)/2),z=Math.max(0,e.x+v*_),E=Math.max(0,e.y+b*_),P=Math.max(0,n.x-v*_),j=Math.max(0,n.y-b*_),O=Xg().x(t=>Math.max(0,t.x)).y(t=>Math.max(0,t.y)).curve(qg)([{x:z,y:E},{x:P,y:j}])||"",W=`fork-arrow-${y.replace(/[^a-zA-Z0-9]/g,"")}-${t}`,N=`\n M ${.6*-a} ${.4*-a}\n L 0 0\n L ${.6*-a} ${.4*a}\n `;T.push(C("marker",{id:W,viewBox:`${-a} ${.6*-a} ${1.2*a} ${1.2*a}`,refX:.08*-a,refY:0,markerWidth:a,markerHeight:a,orient:"auto",markerUnits:"strokeWidth",children:C("path",{d:N,fill:"none",stroke:y,strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"})})),H.push(C(L,{d:O,stroke:y,strokeWidth:s,fill:"none",markerEnd:`url(#${W})`,strokeLinecap:"round","data-element-type":"shape"}));const D=c+M,R=p+k,F=Sc({colorPrimary:y||u},r);H.push(C(A,{x:Math.max(0,D-h/2),y:Math.max(0,R-h/2),width:h,height:h,fill:F.colorPrimaryBg,"data-element-type":"shape"})),H.push(C(A,{x:Math.max(0,D-g/2),y:Math.max(0,R-g/2),width:g,height:g,fill:"#ffffff"})),H.push(C(ac,{x:Math.max(0,D-m/2),y:Math.max(0,R-m/2),size:m,indexes:o,fill:y}));const V=Math.max(0,D-d.width/2),B=Math.max(0,R-d.height/2);S.push(C(tc,{indexes:[i],x:V,y:B}))}for(let t=0;t<f;t++){const e=[t],r=c[t],{itemX:o,itemY:a}=w[t],s=Math.max(0,o+M),l=Math.max(0,a+k);P.push(C(n,{indexes:e,datum:r,data:i,x:s,y:l}));const h=Math.max(0,s+p.width+5),u=Math.max(0,l+p.height/2-d.height/2);S.push(C(ec,{indexes:e,x:h,y:u}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[$,_(E,{x:0,y:0,children:[C(z,{children:T}),C(E,{children:H}),C(hc,{children:P}),C(nc,{children:S})]})]})},composites:["title","item"]}),im("sequence-circular",{component:t=>{const{Title:e,Item:n,data:i,options:r,outerRadius:o=180,innerRadius:a=120,itemDistance:s=310,gapAngle:l=5,iconRadius:h=34,iconBgRadius:c=38,iconSize:d=36}=t,{title:u,desc:f,items:p=[]}=i,g=e?C(e,{title:u,desc:f}):null,m=Math.max(s+100,o+50),y=Math.min(s,o),x=Wh(C(tc,{indexes:[0]}));if(0===p.length)return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[g,C(E,{children:C(nc,{children:C(tc,{indexes:[0],x:m-20,y:y-20})})})]});const v=[],b=[],w=[],M=[],k=Wh(C(n,{indexes:[0],data:i,datum:p[0]})),$=(360-p.length*l)/p.length,S=(t,e,n,i,r,o)=>{const a=r*Math.PI/180,s=o*Math.PI/180,l=t+n*Math.cos(a),h=e+n*Math.sin(a),c=o-r<=180?"0":"1";return[`M ${l} ${h}`,`L ${t+i*Math.cos(a)} ${e+i*Math.sin(a)}`,`A ${i} ${i} 0 ${c} 1 ${t+i*Math.cos(s)} ${e+i*Math.sin(s)}`,`L ${t+n*Math.cos(s)} ${e+n*Math.sin(s)}`,`A ${n} ${n} 0 ${c} 0 ${l} ${h}`,"Z"].join(" ")},z=({centerX:t,outerRadius:e,angleRad:n,btnBounds:i})=>({x:t+(e+20)*Math.cos(n)-i.width/2,y:y+(e+20)*Math.sin(n)-i.height/2}),P=6/((a+o)/2)*(180/Math.PI);p.forEach((t,e)=>{const u=[e],f=e*($+l)+270,p=f+$,g=(f+p)/2,_=g*Math.PI/180,E=_c(r,u),H=E+"40",T=S(m,y,a,o,f,p);w.push(C(L,{d:T,fill:H,width:2*o,height:2*o,"data-element-type":"shape"}));const I=S(m,y,a+6,o-6,f+P,p-P);w.push(C(L,{d:I,fill:E,width:2*o,height:2*o,"data-element-type":"shape"}));const j=(a+o)/2,O=m+j*Math.cos(_),W=y+j*Math.sin(_);M.push(C(A,{x:O-c,y:W-c,width:2*c,height:2*c,fill:"#ffffff","data-element-type":"shape"})),M.push(C(A,{x:O-h,y:W-h,width:2*h,height:2*h,fill:E,"data-element-type":"shape"})),t.icon&&M.push(C(ac,{x:O-d/2,y:W-d/2,indexes:u,size:d,fill:"#fff"}));const N=(g%360+360)%360,D=N>=75&&N<=105;let R,F="normal",V="normal";D?(R=N,V="normal",F="center"):N>=270||N<=90?(R=N>=270?(N-270)/90*60-60:N/90*60,F="normal"):(R=120+(N-90)/180*120,F="flipped");const B=R*Math.PI/180,q=m+s*Math.cos(B)-k.width/2;let G=y+s*Math.sin(B)-k.height/2;D&&(G=y+o+k.height/2),b.push(C(n,{indexes:u,datum:t,data:i,x:q,y:G,positionH:F,positionV:V}));const Y=s+40,X=m+Y*Math.cos(B)-x.width/2,U=y+Y*Math.sin(B)-x.height/2;v.push(C(ec,{indexes:u,x:X,y:U}));const Z=(f+$+l/2)*Math.PI/180,{x:K,y:Q}=z({centerX:m,outerRadius:o,angleRad:Z,btnBounds:x});v.push(C(tc,{indexes:[e+1],x:K,y:Q}))});const H=(270-l/2)*Math.PI/180,{x:T,y:I}=z({centerX:m,outerRadius:o,angleRad:H,btnBounds:x});return v.unshift(C(tc,{indexes:[0],x:T,y:I})),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:70,children:[g,_(E,{children:[C(E,{children:w}),C(E,{children:M}),C(hc,{children:b}),C(nc,{children:v})]})]})},composites:["title","item"]}),im("sequence-color-snake-steps",{component:t=>{const{Title:e,Item:n,data:i,gap:r=0,rowGap:o=0,itemsPerRow:a=3,circleStrokeWidth:s=18,options:l}=t,{title:h,desc:c,items:d=[]}=i,u=e?C(e,{title:h,desc:c}):null,f=$c(l),p=Wh(C(tc,{indexes:[0]})),g=Wh(C(n,{indexes:[0],data:i,datum:d[0],positionH:"center"})),m=[],y=[],x=[],v=(o+g.height)/2,b=v;if(d.forEach((t,e)=>{const h=Math.floor(e/a),c=e%a,u=h%2==1,w=(u?a-1-c:c)*(g.width+r)+b,M=h*(g.height+o),k=[e];if(y.push(C(n,{indexes:k,datum:t,data:i,x:w,y:M,positionH:"center",positionV:e%2==1?"flipped":"normal"})),m.push(C(ec,{indexes:k,x:w+(g.width-p.width)/2,y:M+g.height+10})),0===e&&m.push(C(tc,{indexes:k,x:w+(g.width-p.width)/2,y:M-p.height-10})),e<d.length-1)if(h===Math.floor((e+1)/a))m.push(C(tc,{indexes:[e+1],x:w+(g.width-p.width)/2,y:M-p.height-10}));else{const t=M+g.height/2,n=M+g.height+o+g.height/2;let i,r,a;u?(i=w,a=0,r=`M ${i} ${t} A ${v} ${v} 0 0 ${a} ${i} ${n}`):(i=w+g.width,a=1,r=`M ${i} ${t} A ${v} ${v} 0 0 ${a} ${i} ${n}`);const h=n-t,c=_c(l,k),d=_c(l,[e+1]),y=`gradient-arc-${e}`;x.push(_($,{children:[C(z,{children:_("linearGradient",{id:y,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:c||f}),C("stop",{offset:"100%",stopColor:d||f})]})}),C(L,{d:r,stroke:`url(#${y})`,strokeWidth:s,fill:"none",width:b,height:h,"data-element-type":"shape"})]}));const S=u?i-v-p.width/2:i+v-p.width/2,A=M+g.height+o/2-p.height/2;m.push(C(tc,{indexes:[e+1],x:S,y:A}))}}),d.length>0){const t=d.length-1,e=Math.floor(t/a),n=t%a,i=(e%2==1?a-1-n:n)*(g.width+r),s=e*(g.height+o);m.push(C(tc,{indexes:[d.length],x:i+(g.width-p.width)/2,y:s+g.height+p.height+20}))}if(d.length/a>2){const t=(o+g.height)/2,e=_c(l,[0]);x.push(C(H,{x:0,y:g.height/2-s/2,width:t,height:s,fill:e||f,"data-element-type":"shape"}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,_(E,{width:a*g.width+(a-1)*r+2*v,height:Math.ceil(d.length/a)*(g.height+o),children:[C(E,{children:x}),C(hc,{children:y}),C(nc,{children:m})]})]})},composites:["title","item"]});const Jm=(t,e)=>0===t?0:1===t?e/2:e/2+e/2*3*(t-1),ty=(t,e,n)=>t?0:2*n+(0===e?2:n);im("sequence-cylinders-3d",{component:t=>{const{Title:e,Item:n,data:i,options:r,cylinderRx:o=28,cylinderRy:a=18,baseHeight:s=120,heightIncrement:l=40,depthSpacing:h=60,itemVerticalAlign:c="top",itemVerticalOffset:d=-12,firstDecorationWidth:u=90}=t,{title:f,desc:p,items:g=[]}=i,m=e?C(e,{title:f,desc:p}):null,y=Wh(C(n,{indexes:[0],data:i,datum:g[0],positionH:"center"})),x=Wh(C(tc,{indexes:[0]})),v=$c(r),b=Math.max(6,.15*h),w=((t,e,n,i,r,o,a)=>{const s=i+(t-1)*r+t*Math.max(6,.15*o)+100+50,l=s-100;let h=0,c=0,d=0,u=0;if(t>0){const i=0;let r=1/0,o=-1/0;for(let e=0;e<t;e++){const t=e%2==0,a=Math.floor(e/2),s=Jm(a,n),l=i+ty(t,a,n)+s;r=Math.min(r,l-n),o=Math.max(o,l+n)}const s=(r+o)/2,l=i;h=0,u=h+e.width+10+a+n,d=u-l+s,c=d+(d-(h+e.width/2))-e.width/2}return{canvasHeight:s,startY:l,leftItemAlignedX:h,rightItemAlignedX:c,cylinderAreaStartX:u}})(g.length,y,o,s,l,h,u),{startY:M,leftItemAlignedX:k,rightItemAlignedX:S,cylinderAreaStartX:A}=w,P=[],T=[];g.forEach((t,e)=>{const h=_c(r,[e])||v;P.push(...((t,e)=>{const n=ks(e),i=[];return i.push(_("linearGradient",{id:`cylinderGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:n.toRgbString(),stopOpacity:.7}),C("stop",{offset:"40%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.65}),C("stop",{offset:"70%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:.6}),C("stop",{offset:"100%",stopColor:n.clone().lighten(20).toRgbString(),stopOpacity:.55})]})),i.push(_("linearGradient",{id:`topGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:1}),C("stop",{offset:"100%",stopColor:"#fafafa",stopOpacity:1})]})),i.push(_("linearGradient",{id:`bottomGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:n.clone().darken(8).toRgbString(),stopOpacity:.75}),C("stop",{offset:"50%",stopColor:n.clone().darken(5).toRgbString(),stopOpacity:.7}),C("stop",{offset:"100%",stopColor:n.clone().darken(12).toRgbString(),stopOpacity:.65})]})),i.push(_("linearGradient",{id:`numberGradient${t}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:n.clone().darken(0).toRgbString(),stopOpacity:.9}),C("stop",{offset:"50%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.85}),C("stop",{offset:"100%",stopColor:n.clone().lighten(10).toRgbString(),stopOpacity:.8})]})),i.push(_("linearGradient",{id:`glowGradient${t}`,x1:"0%",y1:"100%",x2:"0%",y2:"0%",children:[C("stop",{offset:"0%",stopColor:"#FFFFFF",stopOpacity:.2}),C("stop",{offset:"90%",stopColor:"#FFFFFF",stopOpacity:0})]})),i})(e,h));const u=((t,e,n,i,r,o,a)=>{const s=t%2==0,l=Math.floor(t/2),h=Jm(l,e),c=o-t*r,d=n+t*i,u=c-d;return{x:a+ty(s,l,e)+h,y:u,height:d,bottomY:c,topY:u}})(e,o,s,l,b,M,A),f=((t,e,n,i)=>{const{x:r,topY:o,bottomY:a}=e,s=[];s.push(C("ellipse",{id:`cylinder-bottom-${t}`,cx:r,cy:a,rx:n,ry:i,fill:`url(#bottomGradient${t})`,opacity:.7})),s.push(C(L,{id:`cylinder-body-${t}`,d:`\n M ${r-n} ${o}\n A ${n} ${i} 0 0 0 ${r} ${o+i}\n A ${n} ${i} 0 0 0 ${r+n} ${o}\n L ${r+n} ${a}\n A ${n} ${i} 0 0 1 ${r} ${a+i}\n A ${n} ${i} 0 0 1 ${r-n} ${a}\n Z\n `,fill:`url(#cylinderGradient${t})`,stroke:"none"})),s.push(C(H,{id:`cylinder-glow-${t}`,x:r-n,y:o-3*i,width:2*n,height:3*i,fill:`url(#glowGradient${t})`})),s.push(C("ellipse",{id:`cylinder-top-${t}`,cx:r,cy:o,rx:n,ry:i,fill:`url(#topGradient${t})`}));const l=`translate(${r-10}, ${o-15}) matrix(1, 0, -0.6, 0.6, 0, 0)`;return s.push(C(Ph,{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:l,children:t+1})),s})(e,u,o,a),{itemPos:p,lineStartX:g,lineEndX:m,lineY:w}=((t,e,n,i,r,o,a,s)=>{const l=t%2==0,h=e.topY+.05*e.height;let c,d,u;l?(c=r,d=c+n.width+10):(c=o,d=c-10),u="top"===a?h:"bottom"===a?h-n.height:h-n.height/2,u+=s;const f=l?e.x-i:e.x+i;return{itemPos:{x:c,y:u},lineStartX:l?f-10:f+10,lineEndX:d,lineY:h}})(e,u,y,o,k,S,c,d),$=((t,e,n,i,r)=>{const o=[];return o.push(C("circle",{id:`decoration-dot-start-${t}`,cx:e,cy:i,r:2,fill:r})),o.push(C("line",{id:`decoration-line-${t}`,x1:e,y1:i,x2:n,y2:i,stroke:r,strokeWidth:1,opacity:.8})),o.push(C("circle",{id:`decoration-dot-end-${t}`,cx:n,cy:i,r:2,fill:r,opacity:.9})),o})(e,g,m,w,h);f.push(...$);const z=C(n,{indexes:[e],datum:t,data:i,x:p.x,y:p.y,positionH:e%2==0?"flipped":"normal"}),E=[C(ec,{indexes:[e],x:p.x+y.width/2-x.width/2,y:p.y+y.height+10}),C(tc,{indexes:[e],x:p.x+y.width/2-x.width/2,y:p.y-x.height-10})];T[e]={cylinderNodes:f,itemNode:z,btnNodes:E,itemX:p.x,itemY:p.y}});let I=1/0,j=1/0,O=-1/0,W=-1/0;T.forEach(t=>{const{itemX:e,itemY:n}=t;I=Math.min(I,e),j=Math.min(j,n),O=Math.max(O,e+y.width),W=Math.max(W,n+y.height)});const N=O-I,D=W-j,R=[C(z,{children:P})],F=[],V=((t,e,n,i,r)=>{if(0===t)return null;const o=[];for(let a=0;a<t;a++){const t=a%2==0,s=Math.floor(a/2),l=Jm(s,e),h=n+ty(t,s,e)+l,c=i-a*r;o.push({x:h,y:c})}const a=o[0],s=o[o.length-1],l=t>5?16*t:100,h=a.x-e-l,c=a.x+e+l,d=a.y+6+l/6,u=s.x-e-l,f=s.x+e+l,p=s.y+6-l/6,g=`\n M ${h} ${d}\n L ${c} ${d}\n L ${f} ${p}\n L ${u} ${p}\n Z\n `,m=`\n M ${c} ${d}\n L ${c} ${d+6}\n L ${f} ${p+6}\n L ${f} ${p}\n Z\n `,y=`\n M ${h} ${d}\n L ${c} ${d}\n L ${c} ${d+6}\n L ${h} ${d+6}\n Z\n `,x=_($,{children:[_("linearGradient",{id:"basePlateTopGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:"#fafafa",stopOpacity:1}),C("stop",{offset:"50%",stopColor:"#ffffff",stopOpacity:.98}),C("stop",{offset:"100%",stopColor:"#ececec",stopOpacity:.95})]}),_("linearGradient",{id:"basePlateFrontGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:"#e0e0e0",stopOpacity:.95}),C("stop",{offset:"50%",stopColor:"#d2d2d2",stopOpacity:.93}),C("stop",{offset:"100%",stopColor:"#c5c5c5",stopOpacity:.9})]}),_("linearGradient",{id:"basePlateSideGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[C("stop",{offset:"0%",stopColor:"#b8b8b8",stopOpacity:.92}),C("stop",{offset:"50%",stopColor:"#c0c0c0",stopOpacity:.88}),C("stop",{offset:"100%",stopColor:"#adadad",stopOpacity:.85})]})]});return _(E,{children:[C(z,{children:x}),C(L,{id:"base-plate-front",d:y,fill:"url(#basePlateFrontGradient)",stroke:"#c5c5c5",strokeWidth:.3,opacity:.92}),C(L,{id:"base-plate-side",d:m,fill:"url(#basePlateSideGradient)",stroke:"#aaaaaa",strokeWidth:.3,opacity:.88}),C(L,{id:"base-plate-top",d:g,fill:"url(#basePlateTopGradient)",stroke:"#e5e5e5",strokeWidth:.5,opacity:.93})]})})(g.length,o,A,M,b);V&&R.push(V);for(let t=g.length-1;t>=0;t--){const e=T[t];e&&(R.push(_(E,{children:[C(E,{children:e.cylinderNodes}),e.itemNode]})),F.push(...e.btnNodes))}if(g.length>0){const t=g.length%2==0,e=Math.floor(g.length/2),n=Jm(e,o),i=ty(t,e,o),r=A+i+n,a=M-g.length*b;F.push(C(tc,{indexes:[g.length],x:r,y:a-100}))}return _(fc,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,_(E,{width:N,height:D,children:[C(hc,{children:R}),C(nc,{children:F})]})]})},composites:["title","item"]});const ey=160,ny=100;function iy(t,e,n){return(t+7*e+13*n)%100}function ry(t,e,n,i,r,o,a,s){return{x:Math.max(r,Math.min(t+n,o)),y:Math.max(a,Math.min(e+i,s))}}function oy({count:t,rectX:e,rectY:n,rectWidth:i,rectHeight:r,seed:o}){const a=[],{cols:s,rows:l}=function(t){const e=Math.ceil(Math.sqrt(1.5*t));return{cols:e,rows:Math.ceil(t/e)}}(t),h=(i-8)/(s+1),c=(r-8)/(l+1);let d=0;for(let u=0;u<l&&d<t;u++)for(let l=0;l<s&&d<t;l++){const t=iy(o,u,l),s=t%16-8,f=3*t%12-6,p=e+4+(l+1)*h+(u%2==1?h/2:0),g=n+4+(u+1)*c,{x:m,y}=ry(p,g,s,f,e+4,e+i-4,n+4,n+r-4);a.push({x:m,y,colorIndex:d}),d++}return a}function ay(){const t=40,e=25,n=160,i=75,r=40,o=205,a=160,s=255,l=[];for(let h=0;h<=12;h++){const c=h/12,d={x:t+(r-t)*c,y:e+(o-e)*c},u={x:n+(a-n)*c,y:i+(s-i)*c};l.push(`M${d.x} ${d.y}L${u.x} ${u.y}`);const f={x:t+(n-t)*c,y:e+(i-e)*c},p={x:r+(a-r)*c,y:o+(s-o)*c};l.push(`M${f.x} ${f.y}L${p.x} ${p.y}`)}return l.join("")}function sy(t,e){return t.map(t=>C(L,{d:"M4 0L8 4L4 8L0 4Z",fill:_c(e,[t.colorIndex]),x:t.x,y:t.y,width:8,height:8,"data-element-type":"shape"}))}im("sequence-filter-mesh",{component:t=>{const{Title:e,Item:n,data:i,gap:r=20,options:o}=t,{title:a,desc:s,items:l=[]}=i,h=e?C(e,{title:a,desc:s}):null,c=Wh(C(tc,{indexes:[0]})),d=Wh(C(n,{indexes:[0],data:i,datum:l[0],width:ey,positionH:"center"})),u=[],f=[],p=[],g=260+r,m=g+d.height+10;if(l.forEach((t,e)=>{const r=e*ey,a=[e],s=_c(o,a),h=function(t,e){if(e<=1)return 40;const n=t/(e-1);return Math.round(40-35*n)}(e,l.length),d=oy({count:h,rectX:0,rectY:80,rectWidth:100,rectHeight:130,seed:100*e});u.push(function(t,e,n,i,r){return _(E,{x:e,y:0,width:ey,height:260,children:[_(dc,{children:[C(L,{d:ay(),stroke:"#D9D9D9",strokeWidth:2}),C(L,{d:"M100 25V260",stroke:"#BFBFBF",strokeWidth:2,strokeLinecap:"round"}),C(H,{x:0,y:80,width:100,height:130,fill:"#FFCB0E",fillOpacity:.2})]}),C($,{children:sy(i,r)}),C(Ph,{x:75,y:0,width:50,height:20,fontSize:20,fontWeight:"bold",alignHorizontal:"center",alignVertical:"top",fill:n,children:String(t+1).padStart(2,"0")})]})}(e,r,s,d,o)),e===l.length-1&&u.push(function(t,e){const n=oy({count:Math.max(Math.round(3),3),rectX:0,rectY:14,rectWidth:57,rectHeight:120,seed:999});return _(E,{x:t+ey,y:71,children:[C(L,{d:"M0 13.9679H57.1429V0L100 74L57.1429 148V134.032H0V13.9679Z",width:100,height:148,fill:"#FFCB0E",fillOpacity:.2,"data-element-type":"shape"}),C($,{children:sy(n,e)})]})}(r,o)),f.push(C(n,{indexes:a,datum:t,data:i,width:ey,x:r+ny-80,y:g,positionH:"center"})),p.push(C(ec,{indexes:a,x:r+ny-c.width/2,y:m})),e<l.length-1&&p.push(C(tc,{indexes:[e+1],x:r+ey-c.width/2,y:m}))}),l.length>0){p.unshift(C(tc,{indexes:[0],x:-c.width/2,y:m}));const t=(l.length-1)*ey;p.push(C(tc,{indexes:[l.length],x:t+ey-c.width/2,y:m}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,_(E,{width:ey*l.length+100,height:260+r+d.height,children:[C(E,{children:u}),C(hc,{children:f}),C(nc,{children:p})]})]})},composites:["title","item"]});const ly=t=>Math.round(1e10*t)/1e10,hy=(t,e)=>ly(Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))),cy=Math.PI,dy=2*cy,uy=Math.PI,fy=(t,e,n)=>t.reduce((t,i)=>{const{x:r,y:o,angle:{prev:a,next:s},arc:{x:l,y:h,radius:c}}=i,d=-1*i.angle.dir,u=a+d*uy/2,f=(d*uy+s-a)%uy,p="LENGTH"===e?Math.round(d*f*c/n):(n||1)-1,g=f/p,m=[];if(!p||!g)return t.concat({x:r,y:o});for(let t=0;t<=p;t++)m.push({x:l+Math.cos(u+g*t)*c,y:h+Math.sin(u+g*t)*c});return t.concat(m)},[]),py=(t,e=0)=>{const n=t.length,i=[],r=[],o=[];t.forEach((a,s)=>{const l=t[(s-1+n)%n],h=t[(s+1)%n],c=hy(l,a),d=hy(l,h),u=hy(a,h),f=((t,e,n,i,r,o)=>{const a=Math.atan2(t.y-e.y,t.x-e.x),s=Math.atan2(n.y-e.y,n.x-e.x),l=Math.acos((i*i+o*o-r*r)/(2*i*o)),h=1/Math.tan(l/2),c=((t,e)=>{const n=e-t;return n>cy&&n<dy||n<0&&n>-cy?-1:1})(a,s);return{prev:a,next:s,main:l,vel:h,dir:c,bis:a+c*l/2}})(l,a,h,c,d,u);0===f.main&&(f.main=Number.EPSILON,f.vel=Number.MAX_SAFE_INTEGER),f.main===cy&&(f.vel=0);const p={x:a.x,y:a.y,angle:f,offset:0,arc:{radius:e,hit:e,lim:Math.min(u/f.vel,c/f.vel,a.r||0)},in:{length:c,rest:c},out:{length:u,rest:u},locked:!1,id:s,get prev(){return i[(s-1+n)%n]},get next(){return i[(s+1)%n]}};isNaN(f.main)&&(f.main=0,f.bis=f.prev||f.next,o.push(p)),"number"==typeof a.r&&(0===a.r?o.push(p):r.push(p)),i.push(p)}),o.forEach(t=>{t.angle.vel=0,t.arc.radius=0,yy(t)}),i.forEach(t=>{t.arc.hit=Math.min(t.out.rest/(t.angle.vel+t.next.angle.vel),t.in.rest/(t.angle.vel+t.prev.angle.vel))});let a=xy(r);for(;a;)gy(a),a=xy(r);for(a=xy(i);a;)my(a,e),a=xy(i);const s=i.map(t=>{const e=t.arc.radius/Math.sin(t.angle.main/2);return{id:t.id,x:t.x,y:t.y,angle:{main:ly(t.angle.main),prev:t.angle.prev,next:t.angle.next,bis:t.angle.bis,dir:t.angle.dir},offset:ly(t.offset),arc:{radius:ly(t.arc.radius),x:t.x+(Math.cos(t.angle.bis)*e||0),y:t.y+(Math.sin(t.angle.bis)*e||0)},in:{length:t.in.length,x:t.x+Math.cos(t.angle.prev)*t.offset,y:t.y+Math.sin(t.angle.prev)*t.offset},out:{length:t.out.length,x:t.x+Math.cos(t.angle.next)*t.offset,y:t.y+Math.sin(t.angle.next)*t.offset},get prev(){return s[(t.id-1+n)%n]},get next(){return s[(t.id+1)%n]}}});return s},gy=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),yy(t)},my=(t,e)=>{if(e>t.arc.hit){const{prev:e,next:n}=t;e.locked&&!n.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel),t.arc.radius),0):n.locked&&!e.locked?t.arc.radius=Math.max(Math.min(t.out.rest/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel),t.arc.radius),0):n.locked&&e.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}yy(t)},yy=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)},xy=t=>t.reduce((t,e)=>e.locked?t:t?e.arc.hit<t.arc.hit?e:t:e,null);function vy(t){const{width:e,height:n,colorPrimary:i}=t,r=i,o=ks.mix(i,"#000",20).toHexString(),a=ks.mix(i,"#fff",50).toHexString(),s=ks.mix(a,"#000",15).toHexString(),{leftRipples:l,rightRipples:h,leftBottom:c,rightBottom:d,peak:u,centerBottom:f,leftEdge:p,centerSnow:g,rightEdge:m}=function(t,e){const n={x:0,y:e},i={x:t,y:e},r={x:t/2,y:0},o={x:t/2,y:e},a=.35*e,s=a/e,l={x:r.x*(1-s)+n.x*s,y:a},h={x:r.x,y:a},c={x:r.x*(1-s)+i.x*s,y:a},d=[{position:.25,offset:.1},{position:.45,offset:-.02},{position:.6,offset:.04},{position:.75,offset:-.1}].map(t=>({x:l.x+(c.x-l.x)*t.position,y:a+e*t.offset,position:t.position,offset:t.offset}));d.sort((t,e)=>t.position-e.position);const u=d.filter(t=>t.x<=h.x),f=d.filter(t=>t.x>h.x);return{leftBottom:n,rightBottom:i,peak:r,centerBottom:o,snowLineY:a,leftEdge:l,centerSnow:h,rightEdge:c,leftRipples:u,rightRipples:f}}(e,n),y=[u,p,...l,g],x=[u,g,...h,m],v=[p,...l,g,f,c],b=[g,...h,m,d,f],w=t=>t.map(t=>`${t.x},${t.y}`).join(" ");return _(dc,{...t,children:[C("polygon",{points:w(y),fill:a}),C("polygon",{points:w(x),fill:s}),C("polygon",{points:w(v),fill:r}),C("polygon",{points:w(b),fill:o})]})}function by(t){const e={tiny:27,small:48,medium:54,large:72}[t]||54,n=.7*e,i=e-n,r=.8*n,o=r/6,a=(r-o)/2,s=n;return _(dc,{width:r,height:e,children:[C("ellipse",{cx:r/2,cy:n/2,rx:r/2,ry:n/2,fill:"#17C76F",clipPath:"inset(0 50% 0 0)"}),C("ellipse",{cx:r/2,cy:n/2,rx:r/2,ry:n/2,fill:"#139B57",clipPath:"inset(0 0 0 50%)"}),C("rect",{x:a,y:s,width:o,height:i,fill:"#737373"})]})}function wy(t){const{width:e,height:n}=t,i=e/2,r=n/2,o=.28*Math.min(e,n),a=.14*Math.min(e,n),s=.07*Math.min(e,n),l=r-s/2,h=.4*s,c=Array.from({length:8},(t,e)=>C("rect",{x:0,y:l,width:a,height:s,rx:h,ry:h,fill:"#FFCB0E",transform:`rotate(${45*e}, ${i}, ${r})`}));return _(dc,{...t,children:[C("circle",{cx:i,cy:r,r:o,fill:"#FFCB0E"}),...c]})}function My(t){return"single"===t.type?C(dc,{...t,width:54,height:36,children:C("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"})}):_(dc,{...t,width:73,height:40,children:[C("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"}),C("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"})]})}im("sequence-funnel",{component:t=>{const{Title:e,Item:n,data:i,gap:r=10,width:o=700,funnelWidth:a,itemHeight:s=60,minBottomRatio:l=.25,options:h}=t,{title:c,desc:d,items:u=[]}=i,f=e?C(e,{title:c,desc:d}):null;if(0===u.length)return C(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:f});const p=Sc(h.themeConfig),g=a??.55*o,m=o-g,y=1.25*s,x=u.length*y+(u.length-1)*r,v=g*l,b=u.map((t,e)=>{const o=[e],a=_c(h,[e])||p.colorPrimary,{points:l,topWidth:c}=function(t,e,n,i,r,o){const a=t/2,s=o*(n+i),l=t-e,h=t-l*(s/r),c=t-l*((s+n)/r);return{points:[{x:a-h/2,y:0},{x:a+h/2,y:0},{x:a+c/2,y:n},{x:a-c/2,y:n}],topWidth:h,bottomWidth:c}}(g,v,y,r,x,e),d=py(l,6),u=fy(d,"AMOUNT",10),f=g/2,b=e*(y+r),w=f+c/2,M=w-25,k=m+25-10,$=b+(y-s)/2,S=w+15,A=k-25-15,E=$,L=f-16,T=b+y/2-16,I=`${a.replace("#","")}-funnel-${e}`;return{background:C(H,{x:M,y:$,width:k,height:s,ry:"8",fill:ks(a).setAlpha(.1).toRgbString(),"data-element-type":"shape"}),funnel:[C(z,{children:_("linearGradient",{id:I,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[C("stop",{offset:"0%",stopColor:ks(a).lighten(10).toString()}),C("stop",{offset:"100%",stopColor:a})]})}),C(P,{points:u,fill:`url(#${I})`,y:b,"data-element-type":"shape",style:{filter:"drop-shadow(0px 2px 3px rgba(0,0,0,0.15))"}})],icon:C(ac,{indexes:o,x:L,y:T,size:32,fill:"#fff"}),item:C(n,{indexes:o,datum:t,data:i,x:S,y:E,width:A,height:s,positionV:"middle"}),btnRemove:C(ec,{indexes:o,x:M+k,y:$})}}),w=C(tc,{indexes:[u.length],x:o/2,y:x+10});return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,_(E,{width:o,height:x+40,children:[C(E,{children:b.map(t=>t.background)}),C(E,{children:b.flatMap(t=>t.funnel)}),C(E,{children:b.map(t=>t.icon)}),C(hc,{children:b.map(t=>t.item)}),_(nc,{children:[b.map(t=>t.btnRemove),w]})]})]})},composites:["title","item"]}),im("sequence-horizontal-zigzag",{component:t=>{const{Title:e,Item:n,data:i,gap:r=30,cardPadding:o=10,options:a}=t,{title:s,desc:l,items:h=[]}=i,c=e?C(e,{title:s,desc:l}):null,d=$c(a),u=Sc({colorPrimary:d},a),f=Wh(C(tc,{indexes:[0]})),p=Wh(C(n,{indexes:[0],data:i,datum:h[0],positionH:"center"})),g=[],m=[],y=[],x=p.width+2*o,v=p.height+2*o+30,b=Math.max(f.height+20,40),w=40;if(h.forEach((t,e)=>{const s=e%2==0,l=e*(x+r);let c;c=s?e%4==2?b:b+w:b+w+60;const M=[e],k=_c(a,M)||d;if(s){const t=k===d?u.colorPrimaryBg||"#E8F3FF":`${k}20`,e=C(H,{x:l,y:c,width:x,height:v,fill:t,rx:20,ry:20});y.push(e)}m.push(C(n,{indexes:M,datum:t,data:i,x:l+o,y:c+o,positionH:"center",positionV:"normal"}));const $=8*h.length+6*(h.length-1),_=l+(x-$)/2,S=c+p.height+20;for(let t=0;t<h.length;t++){const n=_+14*t,i=t===e;y.push(C(A,{x:n,y:S,width:8,height:8,fill:i?k:"transparent",stroke:k,strokeWidth:2}))}g.push(C(ec,{indexes:M,x:l+(x-f.width)/2,y:c+v+10})),0===e?g.push(C(tc,{indexes:M,x:l+(x-f.width)/2,y:c-f.height-10})):g.push(C(tc,{indexes:M,x:l-r/2-f.width/2,y:b-f.height-10}))}),h.length>0){const t=[],e=35,n=r/2,i=6,o=0-n,s=b+w+v/2;t.push(`M ${o} ${s-i}`),h.forEach((o,a)=>{const s=a%2==0,l=a*(x+r);let h;h=s?a%4==2?b:b+w:b+w+60;const c=l-n,d=l+x+n,u=h-n,f=h+v+n,p=h+v/2;s?(t.push(`L ${c} ${u+e}`),t.push(`Q ${c} ${u} ${c+e} ${u}`),t.push(`L ${d-e} ${u}`),t.push(`Q ${d} ${u} ${d} ${u+e}`),t.push(`L ${d} ${p-i}`)):(t.push(`L ${c} ${p}`),t.push(`L ${c} ${f-e}`),t.push(`Q ${c} ${f} ${c+e} ${f}`),t.push(`L ${d-e} ${f}`),t.push(`Q ${d} ${f} ${d} ${f-e}`),t.push(`L ${d} ${p+i}`))});const l=h.length-1;let c;c=l%2==0?l%4==2?b:b+w:b+w+60;const u=l*(x+r)+x+n,f=c+v/2,p=t.join(" "),g="gradient-zigzag-path",m=_c(a,[0])||d,M=_c(a,[h.length-1])||d,k=h.map((t,e)=>C("stop",{offset:e/(h.length-1)*100+"%",stopColor:_c(a,[e])||d}));y.unshift(_($,{children:[C(z,{children:C("linearGradient",{id:g,x1:o,y1:s,x2:u,y2:f,gradientUnits:"userSpaceOnUse",children:k})}),C(L,{d:p,stroke:`url(#${g})`,strokeWidth:2,fill:"none",width:(h.length-1)*(x+r)+x+2*n,height:v+120})]})),y.unshift(C(A,{x:o-i,y:s-i,width:2*i,height:2*i,fill:"transparent",stroke:m,strokeWidth:2})),y.unshift(C(A,{x:u-i,y:f-i,width:2*i,height:2*i,fill:"transparent",stroke:M,strokeWidth:2}))}if(h.length>0){const t=(h.length-1)*(x+r);g.push(C(tc,{indexes:[h.length],x:t+x+(r-f.width)/2,y:b-f.height-10}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,_(E,{children:[C(dc,{children:y}),C(hc,{children:m}),C(nc,{children:g})]})]})},composites:["title","item"]}),im("sequence-mountain",{component:t=>{const{Title:e,Item:n,data:i,gap:r=20,minHeight:o=100,maxHeight:a=200,minWidth:s=260,maxWidth:l=300,options:h}=t,{title:c,desc:d,items:u=[]}=i,f=e?C(e,{title:c,desc:d}):null,p=[],g=[],m=[],y=[],x=u.length,v=Sc(h.themeConfig),b={single:{width:54,height:36},double:{width:73,height:40}},w=[],M=[];let k=0,$=0;u.forEach((t,e)=>{const n=1.6*(o+(a-o)*(x>1?e/(x-1):0)),i=Math.max(s,Math.min(l,n));w.push(i);const r=$;M.push(r),$+=i/2,e===x-1&&(k=r+i)});const S=M[0],z=M[x-1]+w[x-1],A=z-S,L=x>1?(A-r*(x-1))/x:A,P=Wh(C(n,{indexes:[0],data:i,datum:u[0],width:L})),H=a+r,T=H+32+10;u.forEach((t,e)=>{const s=[e],l=o+(a-o)*(x>1?e/(x-1):0),c=w[e],d=M[e],u=a-l,f=_c(h,[e])||v.colorPrimary;m.push(C(vy,{colorPrimary:f,x:d,y:u,width:c,height:l}));const g=S+e*(L+r);y.push(C(Ph,{x:g,y:H,width:L,height:32,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:f,backgroundColor:f,backgroundOpacity:.5,backgroundRadius:4,children:String(e+1).padStart(2,"0")})),p.push(C(n,{indexes:s,datum:t,data:i,x:g,y:T,width:L}))});const I=Wh(C(tc,{indexes:[0]})),j=T+P.height+10;if(u.forEach((t,e)=>{const n=[e],i=S+e*(L+r);g.push(C(ec,{indexes:n,x:i+L/2-I.width/2,y:j})),e<u.length-1&&g.push(C(tc,{indexes:[e+1],x:i+L+r/2-I.width/2,y:j}))}),x>0){const t=S;g.unshift(C(tc,{indexes:[0],x:t-r/2-I.width/2,y:j}));const e=S+(x-1)*(L+r);g.push(C(tc,{indexes:[x],x:e+L+r/2-I.width/2,y:j})),m.push(C(wy,{x:k-60-20,y:-35,width:60,height:60}));const n=["tiny","small","medium","large"],i={tiny:27,small:48,medium:54,large:72},o={tiny:14.85,small:26.4,medium:29.7,large:39.6},s=[],l=(t,e,n=5)=>s.some(i=>!(t+e+n<i.x||t>i.x+i.width+n));u.forEach((t,e)=>{const r=M[e],h=w[e],c=e===x-1?3:0===e?1:2;for(let t=0;t<c;t++){const c=100*e+37*t,d=17*c%n.length,u=n[d],f=i[u],p=o[u];let g=0,y=0,x=!1;for(;g<20&&!x;){const t=r+.15*h;y=t+(13*c+19*g)%100/100*(r+.85*h-p-t),l(y,p)||(x=!0),g++}if(x){s.push({x:y,width:p});const t=a-f;m.push(C(E,{x:y,y:t,children:by(u)}))}}});const h=Math.max(1,Math.floor(x/1.5));for(let t=0;t<h;t++){const e=11*t+5*x+1,n=e%2==0?"single":"double",i=b[n],r=z-S-i.width,o=S+7*e%100/100*r,a=13*e%40;m.push(C(My,{type:n,x:o,y:a,width:i.width,height:i.height}))}}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,_(E,{children:[C(E,{children:m}),C(E,{children:y}),C(hc,{children:p}),C(nc,{children:g})]})]})},composites:["title","item"]}),im("sequence-pyramid",{component:t=>{const{Title:e,Item:n,data:i,gap:r=10,width:o=700,pyramidWidth:a,itemHeight:s=60,options:l}=t,{title:h,desc:c,items:d=[]}=i,u=e?C(e,{title:h,desc:c}):null;if(0===d.length)return C(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:u});const f=Sc(l.themeConfig),p=[],g=[],m=[],y=[],x=a??.6*o,v=o-x,b=1.2*s,w=d.length*b+(d.length-1)*r;return d.forEach((t,e)=>{const o=[e],a=0===e,h=_c(l,[e])||f.colorPrimary,{points:c,topWidth:u,bottomWidth:w}=function(t,e,n,i,r){const o=t/2,a=i*e+(i-1)*n,s=r*(e+n),l=s/a*t,h=(s+e)/a*t;let c;return c=0===r?[{x:o,y:0},{x:o+h/2,y:e},{x:o-h/2,y:e}]:[{x:o+l/2,y:0},{x:o+h/2,y:e},{x:o-h/2,y:e},{x:o-l/2,y:0}],{points:c,topWidth:l,bottomWidth:h}}(x,b,r,d.length,e),M=py(c,5),k=fy(M,"AMOUNT",10),$=x/2,S=e*(b+r),A=S+(b-s)/2,E=$+w/2,L=$+u/2-5,T=v+5,I=s,j=$-15,O=S+b/2-15+(a?8:0),W=E,N=L+T-E,D=A;m.push(C(H,{x:L,y:A,width:T,height:I,ry:"10",fill:f.colorPrimaryBg,"data-element-type":"shape"}));const R=`${h}-pyramid-${e}`;g.push(C(z,{children:_("linearGradient",{id:R,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[C("stop",{offset:"0","stop-color":h}),C("stop",{offset:"100%","stop-color":ks.mix(h,"#fff",40).toHexString()})]})}),C(P,{points:k,fill:`url(#${R})`,y:S,"data-element-type":"shape"})),y.push(C(ac,{indexes:o,x:j,y:O,size:30,fill:"#fff"})),p.push(C(n,{indexes:o,datum:t,data:i,x:W,y:D,width:N,height:s,positionV:"middle"}))}),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,_(E,{width:o,height:w,children:[C(E,{children:m}),C(E,{children:g}),C(E,{children:y}),C(hc,{children:p}),C(nc,{})]})]})},composites:["title","item"]});const ky={iconSize:50,roadWidth:24,outerRadius:60,rowWidth:400,spacing:30,colorDefault:"#666666"},$y=(t,e)=>`M ${t} ${e}`,Cy=(t,e)=>`L ${t} ${e}`,_y=(t,e,n,i)=>`A ${t} ${t} 0 0 ${e} ${n} ${i}`,Sy=(t,{roadWidth:e,innerRadius:n,outerRadius:i})=>{const r=(e+2*n)*t;return{y1:r,y2:r+e,y3:r+e+n,y4:r+e+2*n,y5:r+2*i}};function zy({i:t,direction:e,x:n,y:i,color:r,data:o,itemBounds:a,item:s,Item:l,flipped:h}){const{iconSize:c}=ky,d="left"===e,u=d?n.x4-c/2:n.x3-c/2,f=i.y3-c/2,p=d?n.x6+ky.spacing:n.x1-ky.spacing-a.width,g=i.y3-a.height/2,m=d?h?"flipped":"normal":h?"normal":"flipped";return{icon:C(sc,{indexes:[t],x:u,y:f,size:c,fill:r}),label:C(Ph,{width:40,x:d?u-50:u+c+10,y:f+c/2-15,fontSize:30,fill:r,alignHorizontal:d?"right":"left",children:String(t+1).padStart(2,"0")}),item:C(l,{indexes:[t],data:o,datum:s,x:p,y:g,positionH:m})}}function Ay({direction:t,x:e,y:n,color:i,elements:r}){const o="left"===t;r.push(C(Zm,{x:o?e.x6+10:e.x1-20,y:n.y3-5,width:10,height:8,rotation:o?90:-90,colorPrimary:i,"data-element-type":"shape"}))}im("sequence-roadmap-vertical",{component:t=>{const{Title:e,Item:n,data:i,spacing:r=ky.spacing,options:o,flipped:a=!1}=t,{title:s,desc:l,items:h=[]}=i,c=e?C(e,{title:s,desc:l}):null,d=Wh(C(n,{indexes:[0],data:i,datum:h[0],positionH:"center"})),{roadWidth:u,outerRadius:f,rowWidth:p,colorDefault:g}=ky,m=u/2,y=f-u,x=2*(d.width+r)+p,v=d.width+r,b=v+f,w=v+p-f,M=w+y+u,k=v+p/2,S=[],z=[],A=[],P=[],H=[],T=[],I=[];for(let t=0;t<h.length;t++){const e=_c(o,[t])||g,r=t%2==0?"right":"left",s=0===t,l=t===h.length-1,c=Sy(t,{roadWidth:u,innerRadius:y,outerRadius:f});if("right"===r){const t=s?[M,c.y1]:[w,c.y1],e=[b,c.y1],n=[b,c.y5],i=s?[M,c.y2]:[w,c.y2],r=[b,c.y2];if(S.push(s?$y(M,c.y1+m):Cy(w,c.y1+m),Cy(b,c.y1+m),_y(f-m,0,b,c.y4+m)),z.push(s?$y(...t):Cy(...t),Cy(...e),_y(f,0,...n)),A.push(Cy(...i),Cy(...r),_y(y,1,...r)),l){const t=u/2;z.push(Cy(k,c.y5),Cy(k,c.y5+t),Cy(k+u,c.y5-t),Cy(k,c.y4-t),Cy(k,c.y4),Cy(b,c.y4)),S.push(Cy(k,c.y4+m))}}else{const t=[b,c.y2],e=[w,c.y2],n=[w,c.y4],i=[b,c.y1],r=[w,c.y1];if(S.push(Cy(w,c.y1+m),_y(f-m,1,w,c.y4+m)),z.push(Cy(...t),Cy(...e),_y(y,1,...n)),A.push(Cy(...i),Cy(...r),_y(f,0,...r)),l){const t=u/2;z.push(Cy(k,c.y4),Cy(k,c.y4-t),Cy(k-u,c.y4+t),Cy(k,c.y5+t),Cy(k,c.y5),Cy(w,c.y5)),S.push(Cy(k,c.y4+m))}}Ay({direction:r,x:{x1:v,x4:w,x6:M},y:c,color:e,elements:I});const{icon:p,label:x,item:$}=zy({i:t,direction:r,x:{x1:v,x3:b,x4:w,x6:M},y:c,color:e,data:i,itemBounds:d,item:h[t],Item:n,flipped:a});P.push(p),H.push(x),T.push($)}const j=[...z,...A.reverse(),"Z"],O=h.length*(u+2*y)+1.5*u;return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,_(E,{width:x,height:d.height<=2*f?O:O+d.height-2*f,children:[C(L,{width:p,height:O,d:j.join(" "),fill:g,stroke:g,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),C(L,{d:S.join(" "),stroke:"white",fill:"none",strokeWidth:"3",strokeDasharray:"8 8",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),_($,{children:[P,H,T,I]})]})]})},composites:["title","item"]}),im("sequence-snake-steps",{component:t=>{const{Title:e,Item:n,data:i,gap:r=40,itemsPerRow:o=3,rowGap:a=80,options:s}=t,{title:l,desc:h,items:c=[]}=i,d=e?C(e,{title:l,desc:h}):null,u=$c(s),f=Wh(C(tc,{indexes:[0]})),p=Wh(C(n,{indexes:[0],data:i,datum:c[0],positionH:"center"})),g=[],m=[],y=[],x=25;if(c.forEach((t,e)=>{const s=Math.floor(e/o),l=e%o,h=s%2==1,d=(h?o-1-l:l)*(p.width+r),v=s*(p.height+a),b=[e];if(m.push(C(n,{indexes:b,datum:t,data:i,x:d,y:v,positionH:"center"})),g.push(C(ec,{indexes:b,x:d+(p.width-f.width)/2,y:v+p.height+10})),0===e&&g.push(C(tc,{indexes:b,x:d+(p.width-f.width)/2,y:v-f.height-10})),e<c.length-1){const t=Math.floor((e+1)/o),n=(e+1)%o,i=(t%2==1?o-1-n:n)*(p.width+r);if(s===t){const t=h,n=t?i+p.width+(r-x)/2:d+p.width+(r-x)/2,o=v+p.height/2-12.5;y.push(C(Xm,{x:n,y:o,width:x,height:25,colorPrimary:u,rotation:t?180:0})),g.push(C(tc,{indexes:[e+1],x:n+(x-f.width)/2,y:v-f.height-10}))}else{const t=d+p.width/2-12.5,n=v+p.height+(a-25)/2;y.push(C(Xm,{x:t,y:n,width:x,height:25,colorPrimary:u,rotation:90})),g.push(C(tc,{indexes:[e+1],x:t+(x-f.width)/2,y:n+(25-f.height)/2}))}}}),c.length>0){const t=c.length-1,e=Math.floor(t/o),n=t%o,i=(e%2==1?o-1-n:n)*(p.width+r),s=e*(p.height+a);g.push(C(tc,{indexes:[c.length],x:i+(p.width-f.width)/2,y:s+p.height+f.height+20}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d,_(E,{children:[C(E,{children:y}),C(hc,{children:m}),C(nc,{children:g})]})]})},composites:["title","item"]}),im("sequence-stairs-front",{component:t=>{const{Title:e,Item:n,data:i,options:r,gap:o=16,perspectiveFactor:a=.2,width:s=720}=t,{title:l,desc:h,items:c=[]}=i,d=e?C(e,{title:l,desc:h}):null;if(0===c.length){const t=C(tc,{indexes:[0],x:0,y:0});return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d,C(E,{children:C(nc,{children:t})})]})}const u=$c(r),f=Wh(C(tc,{indexes:[0]})),p=Wh(C(n,{indexes:[0],data:i,datum:c[0]||{},positionH:"center"})),g=Math.min(.1*s,100),m=Math.min(.45*s,Math.max(80,s-p.width-12-g)),y=Math.max(24,m*a*.35),x=c.length>1?(56-56*.7)/(c.length-1):0,v=Math.max(f.height+y+20,y+28),b=m/2,w=m+g+12,M=c.map((t,e)=>56-x*e),k=c.map((t,e)=>Math.max(y*(1-.05*e),.7*y)),$=[],S=[],z=c.length-1;$[z]=v,S[z]=0;for(let t=z-1;t>=0;t-=1)S[t]=S[t+1]+k[t]+o,$[t]=$[t+1]+k[t]+M[t+1]+o;const A=S[0]||k[0]||y,T=m*(.55+.1*a),I=m-T,j=c.map((t,e)=>{const n=0===A?1:S[e]/A;return T+I*n}),O=j.map(t=>{const e=b+t/2;return Math.max(0,w-12-e)}),W=[],N=[],D=[],R=[],F=[],V=($[0]||v)+(M[0]||56),B=V-0,q=.8*(j[z]||T),G=.65*q,Y=.9*(j[0]||m);F.push(C(P,{points:[{x:b,y:0},{x:b+q/2,y:35},{x:b+G/2,y:35},{x:b+Y/2,y:V},{x:b-Y/2,y:V},{x:b-G/2,y:35},{x:b-q/2,y:35}],fill:"rgba(0,0,0,0.12)",width:Y,height:B,"data-element-type":"shape"}));let X=$[z]+M[z]/2;c.forEach((t,e)=>{const o=[e],a=j[e],s=k[e],l=b-a/2,h=M[e],c=$[e],d=c-s,g=c+h/2,m=_c(r,o)||u;W.push(C(H,{x:l,y:c,width:a,height:h,fill:m,"data-element-type":"shape"}),C(P,{points:[{x:l,y:c},{x:l+a,y:c},{x:l+a-s/2,y:d},{x:l+s/2,y:d}],fill:m,opacity:"0.3",width:a,height:s,"data-element-type":"shape"}),C(Ph,{x:l,y:c,width:a,height:h,fontSize:h/2,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:"#ffffff",children:String(e+1).padStart(2,"0")}));const y=l+a,x=g,v=O[e],_=y+v;R.push(C(L,{d:`M ${y} ${x} L ${_} ${x}`,stroke:m,strokeWidth:2,fill:"none",width:v,height:2,"data-element-type":"shape"}),C(L,{d:`M ${_} ${x} L ${_} ${x}`,stroke:m,strokeWidth:6,strokeLinecap:"round",width:1,height:1,"data-element-type":"shape"}));const S=g-p.height/2;N.push(C(n,{indexes:o,datum:t,data:i,x:w,y:S,positionV:"middle"})),D.push(C(ec,{indexes:o,x:w+p.width+10,y:S+p.height/2-f.height/2})),0===e?D.push(C(tc,{indexes:[0],x:w+(p.width-f.width)/2,y:S-f.height-12})):D.push(C(tc,{indexes:o,x:w+(p.width-f.width)/2,y:(X+g)/2-f.height/2})),X=g});const U=X-p.height/2;return D.push(C(tc,{indexes:[c.length],x:w+(p.width-f.width)/2,y:U+p.height+12})),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d,_(E,{children:[C(E,{children:F}),C(E,{children:W}),C(E,{children:R}),C(hc,{children:N}),C(nc,{children:D})]})]})},composites:["title","item"]}),im("sequence-steps",{component:t=>{const{Title:e,Item:n,data:i,gap:r=40,options:o}=t,{title:a,desc:s,items:l=[]}=i,h=e?C(e,{title:a,desc:s}):null,c=$c(o),d=Wh(C(tc,{indexes:[0]})),u=Wh(C(n,{indexes:[0],data:i,datum:l[0],positionH:"center"})),f=[],p=[],g=[],m=Math.max(d.height+20,30);if(l.forEach((t,e)=>{const o=e*(u.width+r),a=[e];if(p.push(C(n,{indexes:a,datum:t,data:i,x:o,y:m,positionH:"center"})),f.push(C(ec,{indexes:a,x:o+(u.width-d.width)/2,y:m+u.height+10})),0===e?f.push(C(tc,{indexes:a,x:o+(u.width-d.width)/2,y:m-d.height-10})):f.push(C(tc,{indexes:a,x:o-r/2-d.width/2,y:m-d.height-10})),e<l.length-1){const t=o+u.width+(r-25)/2,e=m+u.height/2-12.5;g.push(C(Xm,{x:t,y:e,width:25,height:25,colorPrimary:c}))}}),l.length>0){const t=(l.length-1)*(u.width+r);f.push(C(tc,{indexes:[l.length],x:t+u.width+(r-d.width)/2,y:m-d.height-10}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,_(E,{children:[C(E,{children:g}),C(hc,{children:p}),C(nc,{children:f})]})]})},composites:["title","item"]}),im("sequence-timeline",{component:t=>{const{Title:e,Item:n,data:i,gap:r=10,options:o}=t,{title:a,desc:s,items:l=[]}=i,h=e?C(e,{title:a,desc:s}):null,c=$c(o),d=Cc(o),u=Wh(C(tc,{indexes:[0]})),f=Wh(C(n,{indexes:[0],data:i,datum:l[0],positionH:"normal"})),p=[],g=[],m=[],y=120;if(l.length>1){const t=f.height/2+6,e=(l.length-1)*(f.height+r)+f.height/2-6,n=`M 90 ${t} L 90 ${e}`,i="gradient-timeline-line",a=e-t,s=l.map((e,n)=>C("stop",{offset:(n*(f.height+r)+f.height/2-t)/a*100+"%",stopColor:_c(o,[n])||c}));m.push(_($,{children:[C(z,{children:C("linearGradient",{id:i,x1:90,y1:t,x2:90,y2:e,gradientUnits:"userSpaceOnUse",children:s})}),C(L,{d:n,stroke:`url(#${i})`,strokeWidth:2,width:1,height:e-t})]}))}if(l.forEach((t,e)=>{const o=e*(f.height+r),a=o+f.height/2,s=[e];m.push(C(Ph,{x:10,y:a,width:70,fontSize:18,fontWeight:"bold",alignHorizontal:"left",alignVertical:"middle",fill:d[e%d.length],children:`STEP ${e+1}`})),g.push(C(n,{indexes:s,datum:t,data:i,x:y,y:o,positionH:"normal"})),m.push(C(A,{x:84,y:a-6,width:12,height:12,fill:d[e%d.length]})),p.push(C(ec,{indexes:s,x:y-u.width-10,y:o+(f.height-u.height)/2})),0===e?p.push(C(tc,{indexes:s,x:y+(f.width-u.width)/2,y:o-u.height-10})):p.push(C(tc,{indexes:s,x:y+(f.width-u.width)/2,y:o-r/2-u.height/2}))}),l.length>0){const t=(l.length-1)*(f.height+r);p.push(C(tc,{indexes:[l.length],x:y+(f.width-u.width)/2,y:t+f.height+10}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,_(E,{children:[C(dc,{children:m}),C(hc,{children:g}),C(nc,{children:p})]})]})},composites:["title","item"]});const Ey=_("filter",{id:"sequence-zigzag-pucks-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[C("feOffset",{dx:"-7",dy:"7",in:"SourceAlpha",result:"offset"}),C("feGaussianBlur",{stdDeviation:"7.5",in:"offset",result:"blurred"}),C("feColorMatrix",{in:"blurred",type:"matrix",values:"0 0 0 0 0 \n 0 0 0 0 0 \n 0 0 0 0 0 \n 0 0 0 0.3 0",result:"shadow"}),C("feBlend",{mode:"normal",in:"SourceGraphic",in2:"shadow"})]});im("sequence-zigzag-pucks-3d",{component:t=>{const{Title:e,Item:n,data:i,options:r,gap:o=80}=t,a=120,{title:s,desc:l,items:h=[]}=i,c=e?C(e,{title:s,desc:l}):null,d=$c(r);if(0===h.length){const t=C(tc,{indexes:[0],x:0,y:0});return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[C(z,{children:Ey}),c,C(E,{children:C(nc,{children:t})})]})}const u=Wh(C(n,{indexes:[0],data:i,datum:h[0],positionH:"center"})),f=Wh(C(tc,{indexes:[0]})),p=[],g=[],m=[];let y=1/0,x=-1/0;const v=u.height+30+108;return h.forEach((t,e)=>{const s=[e],l=_c(r,s),c=e%2==0,b=e*(a+o),w=c?0:u.height+30;y=Math.min(y,w);const M=`puck-gradient-middle-${e}`,k=`puck-gradient-bottom-${e}`;m.push(_(E,{x:b,y:w,id:`puck-${e}`,width:a,height:108,filter:"url(#sequence-zigzag-pucks-3d-shadow-filter)",children:[_(z,{children:[_("linearGradient",{id:M,x1:"115",y1:"55.9991",x2:"15.0002",y2:"55.9991",gradientUnits:"userSpaceOnUse",children:[C("stop",{offset:"0",stopColor:l||d}),C("stop",{offset:"1",stopColor:l||d,stopOpacity:"0.6"})]}),_("linearGradient",{id:k,x1:"115",y1:"72.1803",x2:"15.0002",y2:"72.1803",gradientUnits:"userSpaceOnUse",children:[C("stop",{offset:"0",stopColor:"#F4F4FB"}),C("stop",{offset:"1",stopColor:"#8E8C90"})]})]}),_(dc,{width:120,height:108,children:[C(L,{d:"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",fill:l||d}),C(L,{d:"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",fill:`url(#${M})`}),C(L,{d:"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",fill:`url(#${k})`}),C("rect",{fill:"transparent",y:108,width:120,height:20})]}),C("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:e+1})]}));const $=b+(a-u.width)/2,S=c?w+108+30:w-30-u.height;if(x=Math.max(x,S+u.height),g.push(C(n,{indexes:s,datum:t,data:i,x:$,y:S,positionH:"center"})),p.push(C(ec,{indexes:s,x:$+u.width-f.width/2,y:S+u.height-f.height/2})),0===e&&p.push(C(tc,{indexes:[0],x:b+60-f.width/2-(o+a)/2,y:w+54-f.height/2})),e<h.length-1){const t=(e+1)%2==0?0:v,n=b+a+o/2-f.width/2,i=(w+54+t+54)/2-f.height/2;p.push(C(tc,{indexes:[e+1],x:n,y:i}))}else p.push(C(tc,{indexes:[h.length],x:b+a+o/2-f.width/2,y:w+54-f.height/2}))}),_(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[C(z,{children:Ey}),c,_(E,{x:0,y:0,children:[C(E,{children:m}),C(hc,{children:g}),C(nc,{children:p})]})]})},composites:["title","item"]});const Ly=240,Py=130,Hy="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",Ty=C("filter",{id:"sequence-zigzag-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:C("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"15",result:"blur"})});im("sequence-zigzag-steps",{component:t=>{const{Title:e,Item:n,data:i,options:r,dx:o=Ly,dy:a=Py,iconSize:s=30}=t,{title:l,desc:h,items:c=[]}=i,d=e?C(e,{title:l,desc:h}):null,u=$c(r);if(0===c.length){const t=C(tc,{indexes:[0],x:0,y:0});return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[C(z,{children:Ty}),d,C(E,{children:C(nc,{children:t})})]})}const f=Wh(C(n,{indexes:[0],data:i,datum:c[0]})),p=Wh(C(tc,{indexes:[0]})),g=[],m=[],y=[],x=[],v=[];let b=0,w=0,M="",k=1/0,$=-1/0,S=1/0,P=1/0;const H=[];c.forEach((t,e)=>{const n=b,i=w;H.push({x:n,y:i}),k=Math.min(k,i);const r=n-76,s=i-46;S=Math.min(S,r),P=Math.min(P,s);const l=e%2==0;e<c.length-1&&(b+=o,w=l?w+a:w-a)});const T=Math.max(0,-S),I=Math.max(0,-P);if(b=0,w=0,c.forEach((t,e)=>{const a=[e],l=H[e],h=l.x+T,d=l.y+I,y=_c(r,a),b=Math.max(0,h-76),w=Math.max(0,d-46),{colorPrimaryBg:k}=Sc({colorPrimary:y});if(x.push(_(dc,{x:b,y:w,width:140,height:110,children:[C(A,{x:10,y:60,width:120,height:50,fill:y||u,filter:"url(#sequence-zigzag-glow-filter)",opacity:.6}),C(L,{d:"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",fill:y||u}),C(L,{d:Hy,fill:"#fff"}),C(L,{d:Hy,fill:k||k})]})),t.icon){const t=Math.max(0,h-s/2-6),e=Math.max(0,d-s/2-6);v.push(C(ac,{x:t,y:e,size:s,indexes:a,fill:y}))}const S=h-f.width/2-6,z=Math.max(0,d+105-6);if($=Math.max($,z+f.height),0===e?M=`M ${h} ${d}`:M+=` L ${h} ${d}`,m.push(C(n,{indexes:a,datum:t,data:i,x:S,y:z})),g.push(C(ec,{indexes:a,x:Math.max(0,S+f.width-p.width/2),y:Math.max(0,z+f.height-p.height/2)})),e<c.length-1){const t=H[e+1],n=t.x+T,i=t.y+I,r=Math.max(0,h+(n-h)/2-p.width/2),o=Math.max(0,d+(i-d)/2-p.height/2);g.push(C(tc,{indexes:[e+1],x:r,y:o}))}else g.push(C(tc,{indexes:[c.length],x:Math.max(0,S+f.width+o/4),y:Math.max(0,z+f.height/2-p.height/2)}))}),M){const t=(H[H.length-1]?.x||0)+T;y.push(C(L,{d:M,stroke:"#f3f2f1",strokeWidth:12,fill:"none",width:t,height:$-Math.min(k+I,0)}))}return _(fc,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[C(z,{children:Ty}),d,_(E,{x:0,y:0,children:[C(E,{children:[...y,...x,...v]}),C(hc,{children:m}),C(nc,{children:g})]})]})},composites:["title","item"]});class Iy{constructor(t,e={}){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=t=>{this.pointerId=t.pointerId,this.startX=t.clientX,this.startY=t.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=t=>{if(null===this.pointerId||t.pointerId!==this.pointerId)return;const e=t.clientX-this.startX,n=t.clientY-this.startY;Math.hypot(e,n)>this.dragThreshold&&(this.skipClick=!0,this.dragged=!0)},this.handlePointerUp=t=>{null!==this.pointerId&&t.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)},this.element=t,this.delay=e.delay||300,this.dragThreshold=e.dragThreshold??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(t){this.skipClick?this.skipClick=!1:(this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=window.setTimeout(()=>{this.singleClickCallback?.(t)},this.delay))}handleDoubleClick(t){this.skipClick?this.skipClick=!1:(this.clickTimer&&clearTimeout(this.clickTimer),this.doubleClickCallback?.(t))}onClick(t){return this.singleClickCallback=t,this}onDoubleClick(t){return this.doubleClickCallback=t,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 jy(t,e,n){return new DOMPoint(e,n).matrixTransform(function(t){return t.getScreenCTM()?.inverse()||new DOMMatrix}(t))}function Oy(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(e=>jy(t,e.x,e.y)),r=Math.min(...i.map(t=>t.x)),o=Math.max(...i.map(t=>t.x)),a=Math.min(...i.map(t=>t.y)),s=Math.max(...i.map(t=>t.y));return new DOMRect(r,a,o-r,s-a)}function Wy(t,e){if(0===e.length)return t.data;const n=Rr(t,e);return n.children||(n.children=[]),n.children}function Ny(t,e="data.items"){return t.reduce((t,e,n)=>0===n?`${t}[${e}]`:`${t}.children[${e}]`,e)}function Dy(t){return function(t){return pa(t)?Va(t):t}(t)?.dataset.indexes?.split(",").map(Number)||[]}function Ry(t){if(!t)return null;const e=[Vy];let n=t;for(const t of e){const e=t(n);if(e){n=e;break}}return Fy(n)}function Fy(t){if(!t)return null;const e=[By,qy];for(const n of e){const e=n(t);if(e)return e}return(t=>oa(t,"edit-area"))(t)||da(t)||pa(t)?t:null}const Vy=t=>{const e=t=>!!t&&(la(t)||ha(t));return e(t)?t.parentElement:e(t.parentElement)?t.parentElement?.parentElement:null},By=t=>function(t){return"SPAN"===t.tagName}(t)&&ca(t.parentElement)?t.parentElement:null,qy=t=>{const e=t.parentElement;return sa(e)?e:aa(t)?t:null};class Gy{constructor(){this.extensions=new Map}register(t,e,n){if(!n?.override&&this.extensions.has(t))throw new Error(`Extension "${t}" already registered`);this.extensions.set(t,e)}get(t){return this.extensions.get(t)}has(t){return this.extensions.has(t)}getAll(){return this.extensions}forEach(t){this.extensions.forEach((e,n)=>{t(e,n)})}[Symbol.iterator](){return this.extensions.entries()}unregister(t){return this.extensions.delete(t)}destroy(){this.extensions.forEach(t=>{t&&"function"==typeof t.dispose&&t.dispose()}),this.extensions.clear()}}const Yy=(t,e)=>{if(t.key.toLowerCase()!==e.key)return!1;const n=e.mod??!1,i=t.metaKey,r=t.ctrlKey,o=(t,e)=>void 0===t?!e:t===e;return!(n&&!i&&!r||(n?!o(e.shift,t.shiftKey)||!o(e.alt,t.altKey)||void 0!==e.meta&&!o(e.meta,i)||void 0!==e.ctrl&&!o(e.ctrl,r):!(o(e.meta,i)&&o(e.ctrl,r)&&o(e.shift,t.shiftKey)&&o(e.alt,t.altKey))))};class Xy{constructor(t={}){this.bindings=[],this.handleKeydown=t=>{if(t instanceof KeyboardEvent&&!t.defaultPrevented&&!(t=>{if(!t)return!1;if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName.toLowerCase();return"input"===e||"textarea"===e||"select"===e})(t.target)&&(!this.filter||this.filter(t)))for(const e of this.bindings)if(e.combos.some(e=>Yy(t,e))){e.handler(t);break}};const{target:e=document,filter:n}=t;this.target=e,this.filter=n,this.target.addEventListener("keydown",this.handleKeydown)}bind(t,e){const n={combos:(Array.isArray(t)?t:[t]).map(t=>(t=>{const e=t.toLowerCase().split("+").map(t=>t.trim()).filter(Boolean),n={key:""};if(e.forEach(t=>{"shift"===t?n.shift=!0:"alt"===t||"option"===t?n.alt=!0:"ctrl"===t||"control"===t?n.ctrl=!0:"meta"===t||"cmd"===t||"command"===t?n.meta=!0:"mod"===t?n.mod=!0:n.key=t}),!n.key)throw new Error(`Invalid hotkey combo: "${t}"`);return n})(t)),handler:e};return this.bindings.push(n),()=>this.unbind(n)}destroy(){this.target.removeEventListener("keydown",this.handleKeydown),this.bindings=[]}unbind(t){this.bindings=this.bindings.filter(e=>e!==t)}}class Uy{init(t){Object.assign(this,t)}}class Zy extends Uy{constructor(){super(...arguments),this.name="brush-select",this.shiftKey=!1,this.dragging=!1,this.dragThreshold=4,this.handleStart=t=>{this.interaction.isActive()&&0===t.button&&(this.isTextSelectionTarget(t.target)||this.hasElementAtStart(t.target)||this.interaction.executeExclusiveInteraction(this,async()=>new Promise(e=>{this.completeInteraction=e;const n=this.editor.getDocument();this.startPoint=jy(n,t.clientX,t.clientY),this.pointerId=t.pointerId,this.shiftKey=t.shiftKey,this.dragging=!1,window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd)})))},this.handleMove=t=>{if(t.pointerId!==this.pointerId||!this.startPoint)return;const e=jy(this.editor.getDocument(),t.clientX,t.clientY),n=e.x-this.startPoint.x,i=e.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(n,i)<this.dragThreshold)return;this.dragging=!0,this.ensureBrush(),this.updateBrush(this.startPoint,e)}t.preventDefault(),t.stopPropagation(),this.updateBrush(this.startPoint,e)},this.handleEnd=t=>{if(t.pointerId!==this.pointerId||!this.startPoint)return;window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd);let e=null;if(this.dragging){t.preventDefault(),t.stopPropagation();const n=jy(this.editor.getDocument(),t.clientX,t.clientY);e=this.updateBrush(this.startPoint,n),this.clearBrush()}this.pointerId=void 0,this.startPoint=void 0,this.dragging=!1;const n=this.shiftKey;if(this.shiftKey=!1,!e)return this.completeInteraction?.(),void(this.completeInteraction=void 0);const i=this.collectSelection(e);if(this.completeInteraction?.(),this.completeInteraction=void 0,0===i.length)return void(n||this.interaction.clearSelection());const r=n?"add":"replace";this.interaction.select(i,r)}}init(t){super.init(t),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.interaction.appendTransientElement(Xo("rect",{fill:"rgba(51, 132, 245, 0.08)",stroke:"#3384F5","stroke-dasharray":"4 2","stroke-width":1,"pointer-events":"none"}))),this.brush}updateBrush(t,e){if(!this.brush)return null;const n=Math.min(t.x,e.x),i=Math.min(t.y,e.y),r=Math.abs(t.x-e.x),o=Math.abs(t.y-e.y);return Zo(this.brush,{x:n,y:i,width:r,height:o}),{x:n,y:i,width:r,height:o}}clearBrush(){this.brush?.remove(),this.brush=void 0}collectSelection(t){const e=this.editor.getDocument(),n=Array.from(e.querySelectorAll("[data-element-type]")),i=new Set;return n.reduce((n,r)=>{const o=Fy(r);if(!o||i.has(o))return n;const a=Oy(e,o),s={x:a.x,y:a.y,width:a.width,height:a.height};return((t,e)=>{const n=t.x+t.width,i=t.y+t.height,r=e.y+e.height;return!(n<e.x||e.x+e.width<t.x||i<e.y||r<t.y)})(t,s)&&(n.push(o),i.add(o)),n},[])}hasElementAtStart(t){return t instanceof Element&&(!!Ry(t)||Boolean(t.closest?.("[data-element-type]")))}isTextSelectionTarget(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName.toLowerCase();return"input"===e||"textarea"===e}}class Ky extends Uy{constructor(){super(...arguments),this.name="click-select",this.shiftKey=!1,this.onShiftKeyDown=t=>{"Shift"===t.key&&(this.shiftKey=!0)},this.onShiftKeyUp=t=>{"Shift"===t.key&&(this.shiftKey=!1)},this.onEscKeyDown=t=>{"Escape"===t.key&&this.interaction.clearSelection()}}init(t){super.init(t);const{editor:e,interaction:n}=this;this.clickHandler=new Iy(e.getDocument(),{delay:0}),this.clickHandler.onClick(t=>{n.isActive()&&n.executeExclusiveInteraction(this,async()=>{const e=Ry(t.target);ua(e)||(this.shiftKey?e&&(n.isSelected(e)?n.select([e],"remove"):n.select([e],"add")):e?n.select([e],"replace"):n.clearSelection())})}),document.addEventListener("keydown",this.onShiftKeyDown),document.addEventListener("keyup",this.onShiftKeyUp),document.addEventListener("keydown",this.onEscKeyDown)}destroy(){this.clickHandler?.destroy(),document.removeEventListener("keydown",this.onShiftKeyDown),document.removeEventListener("keyup",this.onShiftKeyUp),document.removeEventListener("keydown",this.onEscKeyDown)}}class Qy{constructor(t){this.commands=t}async apply(t){for(const e of this.commands)await e.apply(t)}async undo(t){for(let e=this.commands.length-1;e>=0;e--)await this.commands[e].undo(t)}serialize(){return{type:"batch",commands:this.commands.map(t=>t.serialize())}}}class Jy{constructor(t,e,n){this.element=t,this.modified=e;const i=function(t,e){const n=Object.keys(e.attributes||{}),i=Ko(t,n,!1),r=t=>{t&&n.forEach(e=>{e in t&&(i[e]=t[e])})},o={...e,attributes:i};if(da(t)){const{attributes:e}=ra(t);r(e)}else if(pa(t)){if(!Va(t))return;r(Ba(t))}return o}(t,e);this.original=function(t,e){if(!t)return e;if(!e)return t;const n={...t.attributes||{},...e.attributes||{}};return{...t,...e,attributes:Object.keys(n).length?n:void 0}}(i,n)}async apply(t){tx(this.element,this.modified),t.updateElement(this.element,this.modified)}async undo(t){this.original&&(tx(this.element,this.original),t.updateElement(this.element,this.original))}serialize(){return{type:"update-element",elementId:this.element.id,modified:this.modified,original:this.original}}}function tx(t,e){da(t)?ea(t,e):pa(t)?function(t,e,n){const i=Va(t);i&&(n&&Zo(i,n),Fa(i))}(t,0,e.attributes):e.attributes&&Zo(t,e.attributes)}class ex{constructor(t,e){this.options=t,this.original=e}async apply(t){const e=t.getOptions();this.original||(this.original=e),t.updateOptions({...e,...this.options})}async undo(t){this.original&&t.updateOptions(this.original)}serialize(){return{type:"update-options",options:this.options,original:this.original}}}class nx{constructor(t,e,n){this.element=t,this.originalText=n??na(t),this.modifiedText=e}async apply(t){this.originalText!==this.modifiedText&&(ia(this.element,this.modifiedText),ix(t,this.element,this.modifiedText))}async undo(t){this.originalText!==this.modifiedText&&(ia(this.element,this.originalText),ix(t,this.element,this.originalText))}serialize(){return{type:"update-text",elementId:this.element.id,original:this.originalText,modified:this.modifiedText}}}function ix(t,e,n){const i=ya(e);if(i.startsWith("item-")){const r=i.replace("item-",""),o=Dy(e);t.updateItemDatum(o,{[r]:n})}else t.updateData(i,n)}class rx extends Uy{constructor(){super(...arguments),this.name="dblclick-edit-text"}init(t){super.init(t);const{editor:e,commander:n,interaction:i}=t;this.clickHandler=new Iy(e.getDocument()).onDoubleClick(t=>{i.isActive()&&i.executeExclusiveInteraction(this,async()=>{const e=Ry(t.target);if(e&&da(e)){i.select([e],"replace");const r=na(e),o=await new Promise(n=>{const i=this.listenSelectionChange(e);!function(t,e){const n=ta(t);n&&(Lh(ox,`\n.${ax} {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n background-color: transparent;\n outline: none;\n cursor: text;\n}\n.${ax}::selection {\n background-color: #b3d4fc;\n}\n`),new sx(n,e).start())}(e,{cursorPosition:{clientX:t.clientX,clientY:t.clientY},onBlur:n,onCancel:n}),this.detachSelectionListener=i});n.execute(new nx(e,o,r))}})})}destroy(){this.clickHandler?.destroy(),this.detachSelectionListener?.()}listenSelectionChange(t){const e=({next:e})=>{if(!e.includes(t)){this.detachSelectionListener?.(),this.detachSelectionListener=void 0;const e=ta(t);e&&e.blur()}};return this.emitter.on("selection:change",e),()=>this.emitter.off("selection:change",e)}}const ox="infographic-inline-text-editor-style",ax="infographic-inline-text-editor";class sx{constructor(t,e){this.entity=t,this.options=e,this.handlePaste=t=>{t.clipboardData&&(t.preventDefault(),this.insertPlainText(t.clipboardData.getData("text/plain")))},this.handleKeydown=t=>{"Enter"!==t.key||t.shiftKey||(t.preventDefault(),this.insertPlainText("\n"))},this.handleInput=()=>{this.normalizeSpanContent(),this.options?.onInput?.(this.getText())},this.handleBlur=()=>{this.entity.removeAttribute("contenteditable"),this.entity.classList.remove(ax),this.normalizeSpanContent(),this.options?.onBlur?.(this.getText()),this.detachListeners()}}start(){this.entity.setAttribute("contenteditable","true"),this.entity.classList.add(ax),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(t){const e=window.getSelection();if(!e)return;e.rangeCount||this.placeCaretAtEnd();const n=e.rangeCount?e.getRangeAt(0):document.createRange();n.deleteContents();const i=document.createTextNode(t);n.insertNode(i),n.setStartAfter(i),n.setEndAfter(i),e.removeAllRanges(),e.addRange(n),this.normalizeSpanContent(),this.options?.onInput?.(this.getText())}normalizeSpanContent(){if(1===this.entity.childNodes.length&&this.entity.firstChild?.nodeType===Node.TEXT_NODE)return;const t=this.getText();this.entity.textContent=t}placeCaretAtClickPosition(){const t=window.getSelection();if(!t)return;const e=this.getRangeFromPoint();if(e)return t.removeAllRanges(),void t.addRange(e);this.placeCaretAtEnd()}getRangeFromPoint(){const{cursorPosition:t}=this.options||{};if(!t)return null;const{clientX:e,clientY:n}=t,i=document,r=i.caretRangeFromPoint?.(e,n)??(()=>{const t=i.caretPositionFromPoint?.(e,n);if(!t)return null;const r=document.createRange();return r.setStart(t.offsetNode,t.offset),r.collapse(!0),r})();return r&&this.entity.contains(r.startContainer)?r:null}placeCaretAtEnd(){const t=window.getSelection();if(!t)return;const e=document.createRange();e.selectNodeContents(this.entity),e.collapse(!1),t.removeAllRanges(),t.addRange(e)}getText(){return this.entity.textContent||""}}class lx extends Uy{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=t=>{if(!this.interaction.isActive())return;if("mouse"===t.pointerType&&0!==t.button)return;const e=Ry(t.target);if(!e)return;if(ua(e))return;const n=this.editor.getDocument();this.pointerId=t.pointerId,this.startPoint=jy(n,t.clientX,t.clientY),this.dragging=!1,this.startTarget=e;const i=this.interaction.isSelected(e);this.selectionForDrag=i?this.interaction.getSelection():[e],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=t=>{if(t.pointerId!==this.pointerId||!this.startPoint)return;const e=jy(this.editor.getDocument(),t.clientX,t.clientY),n=e.x-this.startPoint.x,i=e.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(n,i)<this.dragThreshold)return;if(!this.startDrag())return void this.reset();this.dragging=!0}const r=t.altKey?{dx:n,dy:i}:this.getSnappedDelta(n,i);t.preventDefault(),t.stopPropagation(),this.updateGuides(r),this.applyTranslation(r.dx,r.dy),this.emitGeometryChange()},this.handleEnd=t=>{if(t.pointerId!==this.pointerId||!this.startPoint)return;this.detachPointerListeners();const e=jy(this.editor.getDocument(),t.clientX,t.clientY),n=e.x-this.startPoint.x,i=e.y-this.startPoint.y;if((this.dragging||Math.hypot(n,i)>=this.dragThreshold)&&this.dragItems.length&&this.exclusiveStarted){t.preventDefault(),t.stopPropagation();const e=t.altKey?{dx:n,dy:i}:this.getSnappedDelta(n,i);this.updateGuides(e),this.applyTranslation(e.dx,e.dy),this.commitTranslation(e.dx,e.dy),this.emitGeometryChange()}this.reset()}}init(t){super.init(t),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)return!1;if(this.willReplaceSelection&&this.interaction.select([this.startTarget],"replace"),this.dragItems=this.selectionForDrag.filter(t=>da(t)).map(t=>this.createDragItem(t)).filter(Boolean),0===this.dragItems.length)return!1;let t=!1;return this.interaction.executeExclusiveInteraction(this,async()=>new Promise(e=>{this.completeInteraction=e,t=!0})),this.exclusiveStarted=t,t}applyTranslation(t,e){this.dragItems.forEach(n=>{if("attr"===n.mode){const i=n.startX+t,r=n.startY+e,o={x:i,y:r};n.hasDataX&&(o["data-x"]=i),n.hasDataY&&(o["data-y"]=r),Zo(n.element,o)}else{const i=this.composeTransform(n.startX+t,n.startY+e,n.restTransform);Zo(n.element,{transform:i})}})}commitTranslation(t,e){if(Math.abs(t)<1e-6&&Math.abs(e)<1e-6)return;const n=this.dragItems.map(n=>{if("attr"===n.mode){const i=n.startX+t,r=n.startY+e,o={x:i,y:r},a={};return n.hasX?a.x=n.startX:a.x=null,n.hasY?a.y=n.startY:a.y=null,n.hasDataX&&(o["data-x"]=i,a["data-x"]=n.startX),n.hasDataY&&(o["data-y"]=r,a["data-y"]=n.startY),new Jy(n.element,{attributes:o},{attributes:a})}const i=this.composeTransform(n.startX+t,n.startY+e,n.restTransform),r=void 0!==n.originalTransform?n.originalTransform:null;return new Jy(n.element,{attributes:{transform:i}},{attributes:{transform:r}})});n.length&&this.commander.executeBatch(n)}createDragItem(t){const e=this.getTransformInfo(t);if(e)return{element:t,mode:"transform",startX:e.x,startY:e.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:e.rest,originalTransform:e.original};const{x:n,y:i,hasX:r,hasY:o,hasDataX:a,hasDataY:s}=this.getAttrInfo(t);return{element:t,mode:"attr",startX:n,startY:i,hasX:r,hasY:o,hasDataX:a,hasDataY:s}}getAttrInfo(t){const e=this.editor.getDocument(),{x:n,y:i}=Oy(e,t),r=Ko(t,["x","y","data-x","data-y"],!1),o=null!==r.x&&void 0!==r.x,a=null!==r.y&&void 0!==r.y,s=null!==r["data-x"]&&void 0!==r["data-x"],l=null!==r["data-y"]&&void 0!==r["data-y"],h=(t,e)=>{const n=null!=t?Number(t):NaN;return Number.isFinite(n)?n:e},c=h(r.x,NaN),d=h(r.y,NaN),u=h(r["data-x"],NaN),f=h(r["data-y"],NaN);return{x:Number.isFinite(c)?c:Number.isFinite(u)?u:n,y:Number.isFinite(d)?d:Number.isFinite(f)?f:i,hasX:o,hasY:a,hasDataX:s,hasDataY:l}}getTransformInfo(t){const e=t.getAttribute("transform");if(null===e)return null;const n=e.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);return n?{x:Number(n[1])||0,y:void 0!==n[2]&&Number(n[2])||0,rest:e.replace(n[0],"").trim(),original:e}:{x:0,y:0,rest:e,original:e}}composeTransform(t,e,n){const i=`translate(${t}, ${e})`;return n&&n.length?`${i} ${n}`:i}emitGeometryChange(){const t=this.dragItems[0]?.element;if(!t)return;const e=Oy(this.editor.getDocument(),t);this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:t,rect:e})}detachPointerListeners(){window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd),window.removeEventListener("pointercancel",this.handleEnd)}reset(){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,this.completeInteraction?.(),this.completeInteraction=void 0}getSelectionBounds(t){if(!t.length)return;const e=this.editor.getDocument();return Oh(t.map(t=>Oy(e,t)))}collectGuideCandidates(t){const e=this.editor.getDocument(),n=new Set(t),i=Array.from(e.querySelectorAll("[data-element-type]")).filter(t=>!n.has(t)),r=[],o=[];return i.forEach(t=>{const{x:n,y:i,width:a,height:s}=Oy(e,t);r.push(n,n+a/2,n+a),o.push(i,i+s/2,i+s)}),{vertical:r,horizontal:o}}getSnappedDelta(t,e){if(!this.startBounds||!this.guideCandidates)return{dx:t,dy:e};const n={x:this.startBounds.x+t,y:this.startBounds.y+e,width:this.startBounds.width,height:this.startBounds.height},i=this.getSnapOffset([n.x,n.x+n.width/2,n.x+n.width],this.guideCandidates.vertical),r=this.getSnapOffset([n.y,n.y+n.height/2,n.y+n.height],this.guideCandidates.horizontal);return{dx:t+(i?.offset||0),dy:e+(r?.offset||0),snapX:i,snapY:r}}getSnapOffset(t,e,n=5){let i=null;return t.forEach(t=>{e.forEach(e=>{const r=e-t;Math.abs(r)<=n&&(!i||Math.abs(r)<Math.abs(i.offset))&&(i={offset:r,at:e})})}),i||void 0}ensureGuideLine(t){const e="vertical"===t?this.guideVertical:this.guideHorizontal;if(e)return e;const n=this.interaction.appendTransientElement(Xo("line",{stroke:"#FF7A45","stroke-width":1,"stroke-dasharray":"4 4","pointer-events":"none",visibility:"hidden"}));return"vertical"===t?this.guideVertical=n:this.guideHorizontal=n,n}updateGuides(t){const e=this.editor.getDocument(),{width:n,height:i}=e.viewBox.baseVal;t.snapX?Zo(this.ensureGuideLine("vertical"),{x1:t.snapX.at,y1:0,x2:t.snapX.at,y2:i,visibility:"visible"}):this.guideVertical&&this.guideVertical.setAttribute("visibility","hidden"),t.snapY?Zo(this.ensureGuideLine("horizontal"),{x1:0,y1:t.snapY.at,x2:n,y2:t.snapY.at,visibility:"visible"}):this.guideHorizontal&&this.guideHorizontal.setAttribute("visibility","hidden")}clearGuides(){this.guideVertical?.remove(),this.guideHorizontal?.remove(),this.guideVertical=void 0,this.guideHorizontal=void 0}}class hx extends Uy{constructor(){super(...arguments),this.name="hotkey-history",this.handleUndo=async t=>{t.preventDefault(),await this.commander.undo()},this.handleRedo=async t=>{t.preventDefault(),await this.commander.redo()}}init(t){super.init(t),this.hotkey=new Xy({filter:()=>this.interaction.isActive()}),this.hotkey.bind("mod+z",this.handleUndo),this.hotkey.bind(["mod+shift+z","mod+y"],this.handleRedo)}destroy(){this.hotkey?.destroy()}}class cx extends Uy{constructor(){super(...arguments),this.name="select-highlight",this.highlightMasks=[],this.handleSelectionChanged=({next:t})=>{this.highlightSelection(t)},this.handleGeometryChanged=({target:t})=>{this.interaction.isSelected(t)&&this.highlightSelection(this.interaction.getSelection())},this.handleHistoryChanged=()=>{this.highlightSelection(this.interaction.getSelection())}}init(t){super.init(t);const{emitter:e}=t;e.on("selection:change",this.handleSelectionChanged),e.on("selection:geometrychange",this.handleGeometryChanged),e.on("history:change",this.handleHistoryChanged),this.highlightSelection(this.interaction.getSelection())}destroy(){this.clearMasks();const{emitter:t}=this;t.off("selection:change",this.handleSelectionChanged),t.off("selection:geometrychange",this.handleGeometryChanged),t.off("history:change",this.handleHistoryChanged)}highlightSelection(t){1===t.length&&da(t[0])?this.clearMasks():(this.drawElementMasks(t),this.drawCombinedBoundsMask(t))}drawElementMasks(t){let e=0;for(;e<t.length;e++){const{x:n,y:i,width:r,height:o}=Oy(this.editor.getDocument(),t[e]),a={x:n,y:i,width:r,height:o,fill:"none",stroke:"#3384F5","stroke-width":1,"pointer-events":"none"},s=this.highlightMasks[e];s?Zo(s,a):this.highlightMasks[e]=this.interaction.appendTransientElement(Xo("rect",a))}for(;e<this.highlightMasks.length;e++)this.highlightMasks[e].remove();this.highlightMasks=this.highlightMasks.slice(0,t.length)}drawCombinedBoundsMask(t){if(t.length<2)return this.combinedBoundsMask?.remove(),void(this.combinedBoundsMask=void 0);const e={...Oh(t.map(t=>Oy(this.editor.getDocument(),t))),fill:"none",stroke:"#3384F5","stroke-width":2,"pointer-events":"none"};this.combinedBoundsMask?Zo(this.combinedBoundsMask,e):this.combinedBoundsMask=this.interaction.appendTransientElement(Xo("rect",e))}clearMasks(){this.highlightMasks.forEach(t=>t.remove()),this.highlightMasks=[],this.combinedBoundsMask?.remove(),this.combinedBoundsMask=void 0}}var dx=/\s/;var ux=/^\s+/;const fx=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&dx.test(t.charAt(e)););return e}(t)+1).replace(ux,""):t};var px=/^[-+]0x[0-9a-f]+$/i,gx=/^0b[01]+$/i,mx=/^0o[0-7]+$/i,yx=parseInt;const xx=function(t){if("number"==typeof t)return t;if(Ui(t))return NaN;if(Qi(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Qi(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=fx(t);var n=gx.test(t);return n||mx.test(t)?yx(t.slice(2),n?2:8):px.test(t)?NaN:+t};class vx extends Uy{constructor(){super(...arguments),this.name="zoom-wheel",this.wheelListener=t=>{if(!this.interaction.isActive())return;if(!t.ctrlKey&&!t.metaKey)return;t.preventDefault();const e=t.deltaY>0?1.1:.9,n=Sh(this.state.getOptions().padding??0),i=this.editor.getDocument().getBBox(),r=n.map(t=>function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=xx(n))==n?n:0),void 0!==e&&(e=(e=xx(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(xx(t),e,n)}((0===t?1:t)*e,-5e3,5e3)),[o,a,s,l]=r,h=i.width+l+a,c=i.height+o+s;if(h<=1||c<=1)return;const d=new ex({padding:r});this.commander.execute(d)}}init(t){super.init(t),document.addEventListener("wheel",this.wheelListener,{passive:!1})}destroy(){document.removeEventListener("wheel",this.wheelListener)}}const bx=({icon:t,onClick:e,activate:n=!1})=>{Lh(Mx,`\n.${wx} {\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n font-size: 12px;\n color: #000000d9;\n border: none;\n border-radius: 6px;\n background-color: #fff;\n cursor: pointer;\n transition: color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;\n}\n.${wx}:hover {\n background-color: #f5f5f5;\n}\n.${wx}:active {\n background-color: #d9d9d9;\n}\n.${wx}[data-activate="true"] {\n background-color: #d9d9d9;\n}\n`);const i=document.createElement("button");i.type="button",i.classList.add(wx),n&&i.setAttribute("data-activate","true"),e&&i.addEventListener("click",e);const r=t();return i.appendChild(r),Object.assign(i,{setActivate:(t=>{t?i.setAttribute("data-activate","true"):i.removeAttribute("data-activate")}).bind(i),activate:n})},wx="infographic-edit-bar-icon-btn",Mx="infographic-edit-bar-icon-btn-style",kx="infographic-color-picker",$x=`${kx}__swatches`,Cx=`${kx}__swatch`,_x=`${kx}__controls`,Sx=`${kx}__input`,zx=`${kx}__format`,Ax=`${kx}__format-switch`,Ex=`${kx}__format-switch-knob`,Lx=`${kx}__format-switch-label`,Px=["#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 Hx(t){if("undefined"==typeof document)throw new Error("ColorPicker can only be used in the browser.");Lh("infographic-color-picker-style",`\n.${kx} {\n width: 240px;\n padding: 10px;\n box-sizing: border-box;\n}\n.${$x} {\n display: grid;\n grid-template-columns: repeat(auto-fit, 26px);\n gap: 6px;\n margin-bottom: 10px;\n}\n.${Cx} {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n border: 1px solid rgba(0, 0, 0, 0.06);\n background: var(--swatch-color);\n cursor: pointer;\n padding: 0;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n}\n.${Cx}[data-active="true"] {\n box-shadow: 0 0 0 2px #1677ff;\n transform: translateY(-1px);\n}\n.${Cx}:hover {\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);\n}\n.${_x} {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.${Sx} {\n flex: 1;\n min-width: 0;\n height: 30px;\n padding: 2px 6px;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n background: #f5f5f5;\n color: #262626;\n font-size: 12px;\n font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas,\n "Liberation Mono", "Courier New", monospace;\n box-sizing: border-box;\n outline: none;\n transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;\n}\n.${Sx}:focus {\n border-color: #1677ff;\n background: #ffffff;\n box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);\n}\n.${Sx}[data-invalid="true"] {\n border-color: #ff4d4f;\n box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.12);\n}\n.${zx} {\n display: inline-flex;\n}\n.${Ax} {\n position: relative;\n display: grid;\n grid-template-columns: 1fr 1fr;\n align-items: center;\n width: 110px;\n height: 30px;\n padding: 0;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n background: #f5f5f5;\n cursor: pointer;\n overflow: hidden;\n transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;\n}\n.${Ax}:hover {\n background: #ededed;\n}\n.${Ax}:focus-visible {\n outline: none;\n border-color: #1677ff;\n box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);\n}\n.${Ex} {\n position: absolute;\n inset: 0;\n width: 50%;\n background: #1677ff;\n border-radius: 6px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n transition: transform 0.2s ease;\n}\n.${Ax}[data-format="rgba"] .${Ex} {\n transform: translateX(100%);\n}\n.${Lx} {\n position: relative;\n z-index: 1;\n text-align: center;\n font-size: 12px;\n color: #434343;\n user-select: none;\n}\n.${Ax}[data-format="hexa"] .${Lx}:first-child,\n.${Ax}[data-format="rgba"] .${Lx}:last-child {\n color: #ffffff;\n}\n`);const e=document.createElement("div");e.classList.add(kx);const n=document.createElement("div");n.classList.add($x),e.appendChild(n);const i=document.createElement("div");i.classList.add(_x),e.appendChild(i);const r=document.createElement("input");r.type="text",r.spellcheck=!1,r.classList.add(Sx),i.appendChild(r);const o=document.createElement("div");o.classList.add(zx),i.appendChild(o);const a=document.createElement("button");a.type="button",a.classList.add(Ax),a.appendChild(Rx("HEXA"));const s=document.createElement("span");s.classList.add(Ex),a.appendChild(s),a.appendChild(Rx("RGBA")),o.appendChild(a);let l="hexa",h=Tx(t.value)??Tx("#1f1f1f")??{r:31,g:31,b:31,a:1};const c=[];(t.swatches?.length?t.swatches:Px).forEach(t=>{const e=Tx(t);if(!e)return;const i=document.createElement("button");i.type="button",i.classList.add(Cx),i.style.setProperty("--swatch-color",Ix(e,"rgba")),i.dataset.colorKey=Ox(e),i.addEventListener("click",()=>{f(e)}),n.appendChild(i),c.push(i)}),a.addEventListener("click",()=>{var e;l!==(e="hexa"===l?"rgba":"hexa")&&(l=e,p(),t.onChange?.(Ix(h,l)))}),r.addEventListener("change",u),r.addEventListener("keydown",t=>{"Enter"===t.key&&u()}),p();const d={setValue:t=>{const e=Tx(t);e?(r.removeAttribute("data-invalid"),f(e,!1)):r.setAttribute("data-invalid","true")},destroy:()=>{e.remove()}};return Object.assign(e,d);function u(){const t=Tx(r.value);t?(r.removeAttribute("data-invalid"),f(t)):r.setAttribute("data-invalid","true")}function f(e,n=!0){!function(t,e){return t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a}(h,e)?(h=e,p(),n&&t.onChange?.(Ix(h,l))):p()}function p(){r.value=Ix(h,l),function(){const t=Ox(h);c.forEach(e=>{e.dataset.colorKey===t?e.setAttribute("data-active","true"):e.removeAttribute("data-active")})}(),"rgba"===l?a.setAttribute("data-format","rgba"):a.setAttribute("data-format","hexa")}}function Tx(t){if(!t)return;const e=yt(t);if(!e||"number"!=typeof e.r)return;const n=e;return{r:Nx(n.r),g:Nx(n.g),b:Nx(n.b),a:Wx(n.alpha??1)}}function Ix(t,e){return"rgba"===e?function(t){const e=function(t){const e=Math.round(100*Wx(t))/100;return 1===e?"1":0===e?"0":e.toString()}(t.a);return`rgba(${t.r}, ${t.g}, ${t.b}, ${e})`}(t):jx(t)}function jx(t){return`#${Dx(t.r)}${Dx(t.g)}${Dx(t.b)}${t.a<1?Dx(Math.round(255*t.a)):""}`}function Ox(t){return jx(t).toLowerCase()}function Wx(t){return Number.isNaN(t)?0:Math.min(1,Math.max(0,t))}function Nx(t){if(Number.isNaN(t))return 0;const e=t<=1?255*t:t;return Math.round(Math.min(255,Math.max(0,e)))}function Dx(t){return t.toString(16).padStart(2,"0")}function Rx(t){const e=document.createElement("span");return e.textContent=t,e.classList.add(Lx),e}const Fx=(t,{viewBox:e="0 0 1024 1024",size:n="1.5em"}={})=>({fill:i="currentColor"}={})=>{const r=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e}" width="${n}" height="${n}" fill="${i}">\n${t.trim()}\n</svg>`;return document.createRange().createContextualFragment(r).firstElementChild},Vx={fontFamily:Fx('<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:Fx('<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:Fx('<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:Fx('<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:Fx('<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:Fx('<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:Fx('<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:Fx('<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:Fx('<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>')},Bx={align:Fx('<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:Fx('\n <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:Fx('<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:Fx('<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:Fx('<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:Fx('<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:Fx('<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:Fx('<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:Fx('<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" />')},qx="infographic-edit-popover",Gx=`${qx}__content`,Yx=`${qx}__arrow`;function Xx(t){Lh("infographic-edit-popover-style",`\n.${qx} {\n position: relative;\n display: inline-flex;\n}\n.${Gx} {\n position: absolute;\n z-index: 1200;\n padding: 0;\n --popover-gap: 8px;\n --popover-arrow-size: 8px;\n --popover-arrow-inner-size: 7px;\n background: #fff;\n border-radius: 8px;\n border: 1px solid rgba(239, 240, 240, 0.9);\n box-shadow: 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;\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;\n}\n.${Gx}-body {\n padding: 4px;\n color: #000000d9;\n font-size: 12px;\n line-height: 1.5;\n}\n.${Gx}[data-open="true"] {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n}\n.${Yx} {\n position: absolute;\n width: 0;\n height: 0;\n}\n.${Yx}::after {\n content: '';\n position: absolute;\n width: 0;\n height: 0;\n}\n.${Gx}[data-placement="top"] {\n left: 50%;\n bottom: calc(100% + var(--popover-gap));\n transform: translate(-50%, calc(-1 * var(--popover-gap) / 2));\n}\n.${Gx}[data-placement="top"] .${Yx} {\n left: 50%;\n bottom: calc(-1 * var(--popover-arrow-size));\n transform: translateX(-50%);\n border-left: var(--popover-arrow-size) solid transparent;\n border-right: var(--popover-arrow-size) solid transparent;\n border-top: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);\n}\n.${Gx}[data-placement="top"] .${Yx}::after {\n left: 50%;\n bottom: 1px;\n transform: translateX(-50%);\n border-left: var(--popover-arrow-inner-size) solid transparent;\n border-right: var(--popover-arrow-inner-size) solid transparent;\n border-top: var(--popover-arrow-inner-size) solid #fff;\n}\n.${Gx}[data-placement="top"][data-open="true"] {\n transform: translate(-50%, 0);\n}\n.${Gx}[data-placement="bottom"] {\n left: 50%;\n top: calc(100% + var(--popover-gap));\n transform: translate(-50%, calc(var(--popover-gap) / 2));\n}\n.${Gx}[data-placement="bottom"] .${Yx} {\n left: 50%;\n top: calc(-1 * var(--popover-arrow-size) + 2px);\n transform: translateX(-50%);\n border-left: var(--popover-arrow-size) solid transparent;\n border-right: var(--popover-arrow-size) solid transparent;\n border-bottom: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);\n}\n.${Gx}[data-placement="bottom"] .${Yx}::after {\n left: 50%;\n top: 1px;\n transform: translateX(-50%);\n border-left: var(--popover-arrow-inner-size) solid transparent;\n border-right: var(--popover-arrow-inner-size) solid transparent;\n border-bottom: var(--popover-arrow-inner-size) solid #fff;\n}\n.${Gx}[data-placement="bottom"][data-open="true"] {\n transform: translate(-50%, 0);\n}\n.${Gx}[data-placement="left"] {\n right: calc(100% + var(--popover-gap));\n top: 50%;\n transform: translate(calc(-1 * var(--popover-gap) / 2), -50%);\n}\n.${Gx}[data-placement="left"] .${Yx} {\n right: calc(-1 * var(--popover-arrow-size) + 1px);\n top: 50%;\n transform: translateY(-50%);\n border-top: var(--popover-arrow-size) solid transparent;\n border-bottom: var(--popover-arrow-size) solid transparent;\n border-left: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);\n border-right: 0;\n}\n.${Gx}[data-placement="left"] .${Yx}::after {\n right: 1px;\n top: 50%;\n transform: translateY(-50%);\n border-top: var(--popover-arrow-inner-size) solid transparent;\n border-bottom: var(--popover-arrow-inner-size) solid transparent;\n border-left: var(--popover-arrow-inner-size) solid #fff;\n border-right: 0;\n}\n.${Gx}[data-placement="left"][data-open="true"] {\n transform: translate(0, -50%);\n}\n.${Gx}[data-placement="right"] {\n left: calc(100% + var(--popover-gap));\n top: 50%;\n transform: translate(calc(var(--popover-gap) / 2), -50%);\n}\n.${Gx}[data-placement="right"] .${Yx} {\n left: calc(-1 * var(--popover-arrow-size) + 1px);\n top: 50%;\n transform: translateY(-50%);\n border-top: var(--popover-arrow-size) solid transparent;\n border-bottom: var(--popover-arrow-size) solid transparent;\n border-right: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);\n border-left: 0;\n}\n.${Gx}[data-placement="right"] .${Yx}::after {\n left: 1px;\n top: 50%;\n transform: translateY(-50%);\n border-top: var(--popover-arrow-inner-size) solid transparent;\n border-bottom: var(--popover-arrow-inner-size) solid transparent;\n border-right: var(--popover-arrow-inner-size) solid #fff;\n}\n.${Gx}[data-placement="right"][data-open="true"] {\n transform: translate(0, -50%);\n}\n`);const e=t.placement??"top",n=t.closeOnOutsideClick??!0,i=Array.isArray(t.trigger)?t.trigger:[t.trigger||"hover"],r=t.mouseEnterDelay??50,o=t.mouseLeaveDelay??150,a=t.offset??8,s="number"==typeof t.padding?`${t.padding}px`:t.padding??"4px",l=document.createElement("div");l.classList.add(qx);const h=t.target??document.createElement("div");l.appendChild(h);const c=document.createElement("div");c.classList.add(Gx),ga(c,Vr),c.dataset.placement=Array.isArray(e)?e[0]:e,c.setAttribute("data-open",String(Boolean(t.open))),c.style.setProperty("--popover-gap",`${a}px`),c.style.setProperty("--popover-arrow-size","8px"),c.style.setProperty("--popover-arrow-inner-size","7px");const d=("function"==typeof t.getContainer?t.getContainer():t.getContainer)??document.body,u=d!==l,f=document.createElement("div");f.classList.add(Yx),c.appendChild(f);const p=document.createElement("div");p.classList.add(`${Gx}-body`),p.style.padding=s,c.appendChild(p),d.appendChild(c);let g=Boolean(t.open),m=Array.isArray(e)?e:[e],y=m[0]??"top";const x=()=>{const t=h.getBoundingClientRect(),e=c.getBoundingClientRect(),n=window.scrollX||document.documentElement.scrollLeft,i=window.scrollY||document.documentElement.scrollTop,r=document.documentElement.clientWidth,o=document.documentElement.clientHeight;let s=0,l=0;const d=r=>{switch(r){case"top":return{left:n+t.left+t.width/2-e.width/2,top:i+t.top-e.height-a};case"bottom":return{left:n+t.left+t.width/2-e.width/2,top:i+t.bottom+a};case"left":return{left:n+t.left-e.width-a,top:i+t.top+t.height/2-e.height/2};default:return{left:n+t.right+a,top:i+t.top+t.height/2-e.height/2}}},f=(t,a)=>t>=n&&a>=i&&t+e.width<=n+r&&a+e.height<=i+o;let p=m[0]??"top",g=d(p);for(const t of m){const e=d(t);if(g=e,f(e.left,e.top)){p=t;break}}y=p,c.dataset.placement=y,u&&(({left:s,top:l}=g),c.style.left=`${s}px`,c.style.top=`${l}px`,c.style.right="auto",c.style.bottom="auto",c.style.transform="translate(0, 0)")};u&&(c.style.position="absolute",window.addEventListener("resize",x),window.addEventListener("scroll",x,!0));const v=t=>{let e=t;"function"==typeof e&&(e=e()),p.innerHTML="",e instanceof HTMLElement?p.appendChild(e):p.textContent=e??"",x()},b=t=>{m=Array.isArray(t)?t:[t],y=m[0]??"top",x()},w=t=>{g=t,c.setAttribute("data-open",String(g)),g&&x(),g&&n?document.addEventListener("click",k,!0):document.removeEventListener("click",k,!0)},M=()=>w(!g),k=t=>{const e=t.target;l.contains(e)||u&&c.contains(e)||w(!1)};let $,C;const _=i.includes("hover"),S=i.includes("click"),z=()=>{void 0!==$&&(clearTimeout($),$=void 0),void 0!==C&&(clearTimeout(C),C=void 0)},A=()=>{_&&(z(),$=window.setTimeout(()=>w(!0),r))},E=()=>{_&&(z(),C=window.setTimeout(()=>w(!1),o))};S&&h.addEventListener("click",M),_&&(l.addEventListener("mouseenter",A),l.addEventListener("mouseleave",E),c.addEventListener("mouseenter",A),c.addEventListener("mouseleave",E)),v(t.content),b(e),w(g);const L={setOpen:w,toggle:M,setContent:v,setPlacement:b,destroy:()=>{document.removeEventListener("click",k,!0),S&&h.removeEventListener("click",M),_&&(l.removeEventListener("mouseenter",A),l.removeEventListener("mouseleave",E),c.removeEventListener("mouseenter",A),c.removeEventListener("mouseleave",E),z()),u&&(window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0),c.remove()),l.remove()}};return Object.assign(l,L)}class Ux{init(t){Object.assign(this,t)}}const Zx="infographic-align-grid",Kx=`${Zx}--compact`,Qx=`\n.${Zx} {\n display: grid;\n grid-template-columns: repeat(4, 32px);\n grid-auto-rows: 32px;\n gap: 2px;\n}\n.${Kx} {\n grid-template-columns: repeat(3, 32px);\n}\n`,Jx=[{icon:Bx.alignLeft,action:"LEFT"},{icon:Bx.alignH,action:"H_CENTER"},{icon:Bx.alignRight,action:"RIGHT"},{icon:Bx.distributeH,action:"H_DISTRIBUTE"},{icon:Bx.alignTop,action:"TOP"},{icon:Bx.alignV,action:"V_CENTER"},{icon:Bx.alignBottom,action:"BOTTOM"},{icon:Bx.distributeV,action:"V_DISTRIBUTE"}],tv=(t,e,n,i)=>{Lh("infographic-align-grid-style",Qx);const r=function(e,i){const r=document.createElement("div");r.classList.add(Zx),i||r.classList.add(Kx);return(i?Jx:Jx.filter(({action:t})=>"H_DISTRIBUTE"!==t&&"V_DISTRIBUTE"!==t)).forEach(({icon:e,action:i})=>{const o=bx({icon:e,onClick:()=>(e=>function(t,e,n){if(!t.length)return;const i=t[0].ownerSVGElement;if(!i)return;const r=t.map(t=>function(t,e){const n=Oy(e,t),i=!pa(t),r=function(t){const e=t.getAttribute("transform");if(null===e)return null;const n=e.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!n)return{x:0,y:0,rest:{before:e.trim(),after:""},original:e};const i=Number(n[1])||0,r=void 0!==n[2]&&Number(n[2])||0,o=n.index??0;return{x:i,y:r,rest:{before:e.slice(0,o).trim(),after:e.slice(o+n[0].length).trim()},original:e}}(t);if(r)return{element:t,bounds:n,mode:"transform",startX:r.x,startY:r.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:r.rest,originalTransform:r.original,movable:i};const{x:o,y:a,hasX:s,hasY:l,hasDataX:h,hasDataY:c}=function(t,e){const n=Ko(t,["x","y","data-x","data-y"],!1),i=null!==n.x&&void 0!==n.x,r=null!==n.y&&void 0!==n.y,o=null!==n["data-x"]&&void 0!==n["data-x"],a=null!==n["data-y"]&&void 0!==n["data-y"],s=(t,e)=>{const n=null!=t?Number(t):NaN;return Number.isFinite(n)?n:e},l=s(n.x,NaN),h=s(n.y,NaN),c=s(n["data-x"],NaN),d=s(n["data-y"],NaN);return{x:Number.isFinite(l)?l:Number.isFinite(c)?c:e.x,y:Number.isFinite(h)?h:Number.isFinite(d)?d:e.y,hasX:i,hasY:r,hasDataX:o,hasDataY:a}}(t,n);return{element:t,bounds:n,mode:"attr",startX:o,startY:a,hasX:s,hasY:l,hasDataX:h,hasDataY:c,movable:i}}(t,i)).filter(Boolean);if(!r.length)return;const o=r.filter(t=>t.movable);if(!o.length)return;const a=r.filter(t=>!t.movable),s=Oh((a.length?a:r).map(t=>t.bounds)),l=[];switch(e){case"LEFT":{const t=s.x;o.forEach(e=>{const n=t-e.bounds.x;nv(l,e,n,0)});break}case"H_CENTER":{const t=s.x+s.width/2;o.forEach(e=>{const n=t-(e.bounds.x+e.bounds.width/2);nv(l,e,n,0)});break}case"RIGHT":{const t=s.x+s.width;o.forEach(e=>{const n=t-(e.bounds.x+e.bounds.width);nv(l,e,n,0)});break}case"TOP":{const t=s.y;o.forEach(e=>{const n=t-e.bounds.y;nv(l,e,0,n)});break}case"V_CENTER":{const t=s.y+s.height/2;o.forEach(e=>{const n=t-(e.bounds.y+e.bounds.height/2);nv(l,e,0,n)});break}case"BOTTOM":{const t=s.y+s.height;o.forEach(e=>{const n=t-(e.bounds.y+e.bounds.height);nv(l,e,0,n)});break}case"H_DISTRIBUTE":!function(t,e){if(t.length<=2)return;const n=[...t].sort((t,e)=>t.bounds.x-e.bounds.x||t.bounds.y-e.bounds.y),i=ev(n);for(let t=0;t<i.length-1;t++){const r=i[t],o=i[t+1],a=n[r],s=n[o],l=n.slice(r+1,o);if(!l.length)continue;const h=(s.bounds.x-(a.bounds.x+a.bounds.width)-l.reduce((t,e)=>t+e.bounds.width,0))/(l.length+1);let c=a.bounds.x+a.bounds.width+h;l.forEach(t=>{const n=c-t.bounds.x;nv(e,t,n,0),c+=t.bounds.width+h})}}(r,l);break;case"V_DISTRIBUTE":!function(t,e){if(t.length<=2)return;const n=[...t].sort((t,e)=>t.bounds.y-e.bounds.y||t.bounds.x-e.bounds.x),i=ev(n);for(let t=0;t<i.length-1;t++){const r=i[t],o=i[t+1],a=n[r],s=n[o],l=n.slice(r+1,o);if(!l.length)continue;const h=(s.bounds.y-(a.bounds.y+a.bounds.height)-l.reduce((t,e)=>t+e.bounds.height,0))/(l.length+1);let c=a.bounds.y+a.bounds.height+h;l.forEach(t=>{const n=c-t.bounds.y;nv(e,t,0,n),c+=t.bounds.height+h})}}(r,l)}l.length&&n.executeBatch(l)}(t,e,n))(i)});r.appendChild(o)}),r}(0,i?.enableDistribution??!0);return Xx({target:bx({icon:Bx.align}),content:r,placement:"top",offset:12})};function ev(t){const e=new Set;return e.add(0),e.add(t.length-1),t.forEach((t,n)=>{t.movable||e.add(n)}),Array.from(e).sort((t,e)=>t-e)}function nv(t,e,n,i){const r=function(t,e,n){if(!t.movable)return null;if(Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return null;if("attr"===t.mode){const i=t.startX+e,r=t.startY+n,o={x:i,y:r},a={};return a.x=t.hasX?t.startX:null,a.y=t.hasY?t.startY:null,t.hasDataX&&(o["data-x"]=i,a["data-x"]=t.startX),t.hasDataY&&(o["data-y"]=r,a["data-y"]=t.startY),new Jy(t.element,{attributes:o},{attributes:a})}const i=function(t,e,n){const i=`translate(${t}, ${e})`;return[n?.before,i,n?.after].filter(t=>t&&t.length).join(" ")}(t.startX+e,t.startY+n,t.restTransform),r=void 0!==t.originalTransform?t.originalTransform:null;return new Jy(t.element,{attributes:{transform:i}},{attributes:{transform:r}})}(e,n,i);r&&t.push(r)}const iv="infographic-font-align-grid",rv=[{icon:Vx.alignLeft,align:"LEFT"},{icon:Vx.alignCenter,align:"CENTER"},{icon:Vx.alignRight,align:"RIGHT"}],ov=[{icon:Vx.alignTop,align:"TOP"},{icon:Vx.alignMiddle,align:"MIDDLE"},{icon:Vx.alignBottom,align:"BOTTOM"}],av=`\n.${iv} {\n display: grid;\n grid-template-columns: repeat(3, 32px);\n grid-auto-rows: 32px;\n gap: 2px;\n}\n`,sv=(t,e,n)=>{Lh("infographic-font-align-grid-style",av);const i={horizontal:e["data-horizontal-align"],vertical:e["data-vertical-align"]},r=bx({icon:Vx.align}),o=function(e){const i=document.createElement("div");i.classList.add(iv);const r={},o=(o,a)=>{o.forEach(({icon:o,align:s})=>{const l=bx({icon:o,onClick:()=>{e[a]!==s&&(Object.assign(e,{[a]:s}),Object.entries(r).forEach(([t,n])=>{const i=t===e.horizontal||t===e.vertical;n.setActivate(i)}),(e=>{const i={};e.horizontal&&(i["data-horizontal-align"]=e.horizontal),e.vertical&&(i["data-vertical-align"]=e.vertical),Object.keys(i).length&&n.executeBatch(t.map(t=>new Jy(t,{attributes:i})))})({...e}))},activate:s===e[a]});r[s]=l,i.appendChild(l)})};return o(rv,"horizontal"),o(ov,"vertical"),i}(i);return Xx({target:r,content:o,placement:"top",offset:12})},lv="infographic-font-color-btn",hv="#1f1f1f",cv=(t,e,n)=>{Lh("infographic-font-color-style",`\n.${lv} {\n position: relative;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n background: #fff;\n cursor: pointer;\n transition: box-shadow 0.2s ease, border-color 0.2s ease;\n}\n.${lv}::after {\n content: '';\n position: absolute;\n inset: 6px;\n border-radius: 50%;\n background: var(--infographic-font-color, ${hv});\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);\n}\n.${lv}[data-mixed="true"]::after {\n background: repeating-linear-gradient(\n 45deg,\n #d9d9d9 0,\n #d9d9d9 6px,\n #f5f5f5 6px,\n #f5f5f5 12px\n );\n}\n`);const i=(a=e.fill)&&Ti(a)?a:void 0,r=void 0===e.fill&&t.length>1,o=document.createElement("button");var a;o.type="button",o.classList.add(lv),dv(o,i??hv,r);const s=Hx({value:i??hv,onChange:e=>{dv(o,e,!1),n.executeBatch(t.map(t=>new Jy(t,{attributes:{fill:e}})))}});return Xx({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function dv(t,e,n){t.style.setProperty("--infographic-font-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}const uv="infographic-font-family-list",fv=`${uv}__option`,pv=(t,e,n)=>{Lh("infographic-font-family-list-style",`\n.${uv} {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px;\n min-width: 180px;\n max-height: 220px;\n overflow-y: auto;\n}\n.${fv} {\n width: 100%;\n text-align: left;\n padding: 6px 10px;\n border: none;\n border-radius: 6px;\n background: #fff;\n cursor: pointer;\n font-size: 12px;\n color: #000000d9;\n transition: background-color 0.2s ease, color 0.2s ease;\n}\n.${fv}:hover {\n background: #f5f5f5;\n}\n.${fv}[data-activate="true"] {\n background: #e6f4ff;\n color: #0958d9;\n}\n`);const i=es(),r=gv(e["font-family"]),o=i.map(t=>({label:t.name||t.fontFamily,value:t.fontFamily}));o.some(t=>gv(t.value)===r)||o.unshift({label:"默认",value:r});let a=r;const s=function(t,e,n){const i=document.createElement("div");i.classList.add(uv);const r={};return t.forEach(({label:t,value:o})=>{const a=document.createElement("button");a.type="button",a.classList.add(fv),a.textContent=t,a.style.fontFamily=o,o===e&&a.setAttribute("data-activate","true"),a.addEventListener("click",()=>{var t;e!==o&&(t=e=o,Object.entries(r).forEach(([e,n])=>{e===t?n.setAttribute("data-activate","true"):n.removeAttribute("data-activate")}),n(o))}),r[o]=a,i.appendChild(a)}),i}(o,a,e=>{a!==e&&(a=e,n.executeBatch(t.map(t=>new Jy(t,{attributes:{"font-family":Bo(e)}}))))});return Xx({target:bx({icon:Vx.fontFamily}),content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function gv(t){return t?Array.isArray(t)?qo(t.join(", ")):qo(String(t)):""}const mv="infographic-font-size-grid",yv=[{label:"XS",value:12},{label:"S",value:14},{label:"M",value:16},{label:"L",value:20},{label:"XL",value:24}],xv=`\n.${mv} {\n display: grid;\n grid-template-columns: repeat(5, 32px);\n grid-auto-rows: 32px;\n gap: 2px;\n}\n`,vv=(t,e,n)=>{Lh("infographic-font-size-grid-style",xv);const i=bx({icon:Vx.fontSize}),r=function(t){if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return Number.isFinite(e)?e:12}return 12}(e["font-size"]),o=function(e){const i=document.createElement("div");i.classList.add(mv);let r=e;const o={};return yv.forEach(({label:e,value:a})=>{const s=bx({icon:bv(e),onClick:()=>{var e;r!==a&&(r=a,Object.entries(o).forEach(([t,e])=>{const n=Number(t)===r;e.setActivate(n)}),e=a,n.executeBatch(t.map(t=>new Jy(t,{attributes:{"font-size":e}}))))},activate:a===r});o[String(a)]=s,i.appendChild(s)}),i}(r);return Xx({target:i,content:o,placement:"top",offset:12})};function bv(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}}const wv="infographic-icon-color-btn",Mv="#1f1f1f",kv=(t,e,n)=>{Lh("infographic-icon-color-style",`\n.${wv} {\n position: relative;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n background: #fff;\n cursor: pointer;\n transition: box-shadow 0.2s ease, border-color 0.2s ease;\n}\n.${wv}::after {\n content: '';\n position: absolute;\n inset: 6px;\n border-radius: 50%;\n background: var(--infographic-icon-color, ${Mv});\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);\n}\n.${wv}[data-mixed="true"]::after {\n background: repeating-linear-gradient(\n 45deg,\n #d9d9d9 0,\n #d9d9d9 6px,\n #f5f5f5 6px,\n #f5f5f5 12px\n );\n}\n`);const i=(a=e.fill)&&Ti(a)?a:void 0,r=void 0===e.fill&&t.length>1,o=document.createElement("button");var a;o.type="button",o.classList.add(wv),$v(o,i??Mv,r);const s=Hx({value:i??Mv,onChange:e=>{$v(o,e,!1),n.executeBatch(t.map(t=>new Jy(t,{attributes:{fill:e}})))}});return Xx({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function $v(t,e,n){t.style.setProperty("--infographic-icon-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}class Cv extends Ux{constructor(t){super(),this.options=t,this.name="edit-bar",this.selection=[],this.handleSelectionChanged=({next:t})=>{if(this.selection=t,0===t.length)return void(this.container&&Sv(this.container));const e=this.getOrCreateEditBar(),n=this.getEditItems(t);0!==n.length?(function(t,e){t.innerHTML="",e.forEach(e=>{t.appendChild(e)})}(e,n),this.placeEditBar(e,t),_v(e)):Sv(e)},this.handleGeometryChanged=({target:t})=>{this.selection.includes(t)&&this.container&&(this.placeEditBar(this.container,this.selection),_v(this.container))},this.handleHistoryChanged=()=>{this.container&&0!==this.selection.length&&(this.placeEditBar(this.container,this.selection),_v(this.container))}}init(t){super.init(t);const{emitter:e}=t;e.on("selection:change",this.handleSelectionChanged),e.on("selection:geometrychange",this.handleGeometryChanged),e.on("history:change",this.handleHistoryChanged)}destroy(){const{emitter:t}=this;t.off("selection:change",this.handleSelectionChanged),t.off("selection:geometrychange",this.handleGeometryChanged),t.off("history:change",this.handleHistoryChanged),this.container?.remove()}getEditItems(t){let e=!1,n=!1,i=!1;for(const r of t)if(da(r)?e=!0:pa(r)?n=!0:fa(r)&&(i=!0),e&&n&&i)break;return!e||n||i?e||!n||i?e||n||!i?this.getElementCollectionEditItems(t):1===t.length?this.getGeometryEditItems(t):this.getGeometryCollectionEditItems(t):1===t.length?this.getIconEditItems(t):this.getIconCollectionEditItems(t):1===t.length?this.getTextEditItems(t[0]):this.getTextCollectionEditItems(t)}getOrCreateEditBar(){if(this.container)return this.container;const{style:t,className:e}=this.options||{},n=document.createElement("div");Object.assign(n.style,{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",...t}),e&&n.classList.add(e),ga(n,Vr),this.container=n;const{getContainer:i}=this.options||{},r=("function"==typeof i?i():i)??document.body;return r?.appendChild(n),n}getTextEditItems(t){const{attributes:e={}}=ra(t);return[cv,vv,sv,pv].map(n=>n([t],e,this.commander))}getTextCollectionEditItems(t){const e=T(t.map(t=>ra(t).attributes||{}));return[...[cv,vv,sv,pv].map(n=>n(t,e,this.commander)),...this.getElementCollectionEditItems(t)]}getIconEditItems(t){const e=Ba(t[0]);return[kv].map(n=>n(t,e,this.commander))}getIconCollectionEditItems(t){const e=T(t.map(t=>Ba(t)));return[kv].map(n=>n(t,e,this.commander))}getGeometryEditItems(t){return[]}getGeometryCollectionEditItems(t){return[...this.getElementCollectionEditItems(t)]}getElementCollectionEditItems(t){return t.length<=1?[]:[tv(t,0,this.commander,{enableDistribution:t.length>2})]}placeEditBar(t,e){if(0===e.length)return;const n=this.editor.getDocument(),i=Oh(e.map(t=>Oy(n,t))),r=(t.offsetParent??document.documentElement).getBoundingClientRect(),o=document.documentElement.clientHeight,a=t.getBoundingClientRect(),s=function(t){return t.getScreenCTM()||new DOMMatrix}(n),l=new DOMPoint(i.x+i.width/2,i.y).matrixTransform(s),h=new DOMPoint(i.x+i.width/2,i.y+i.height).matrixTransform(s),c=(t,e,n)=>Math.min(Math.max(t,e),n);let d=l.x-r.left-a.width/2;d=c(d,0,Math.max(r.width-a.width,0));const u=l.y-8,f=o-h.y-8;let p=u>=a.height||u>=f?l.y-r.top-a.height-8:h.y-r.top+8;p=c(p,0,Math.max(r.height-a.height,0)),t.style.left=`${d}px`,t.style.top=`${p}px`}}function _v(t){t.style.visibility="visible"}function Sv(t){t.style.visibility="hidden"}class zv extends Ux{constructor(){super(...arguments),this.name="resize-element",this.target=null,this.handles=[],this.activeHandle=null,this.activePointerId=null,this.handleSelectionChange=({next:t})=>{const e=1===t.length?t[0]:null;e&&da(e)?(this.target=e,this.updateHandles()):(this.target=null,this.hideHandles(),this.cancelDrag())},this.handleDeactivate=()=>{this.target=null,this.hideHandles(),this.cancelDrag()},this.handleGeometryChange=({target:t})=>{if(!this.target||t!==this.target)return;const e=this.getViewportRect(this.target);this.lastViewportRect=e,this.updateHandles(e)},this.handleHistoryChange=()=>{if(!this.target)return;const t=this.getViewportRect(this.target);this.lastViewportRect=t,this.updateHandles(t)},this.handlePointerMove=t=>{if(!this.target||!this.startPointer||!this.startRect||!this.activeHandle||null!==this.activePointerId&&t.pointerId!==this.activePointerId)return;const e=this.clientToElement(this.target,t.clientX,t.clientY),n=e.x-this.startPointer.x,i=e.y-this.startPointer.y,r=this.clampRect(this.applyDelta(this.startRect,n,i,this.activeHandle),this.activeHandle);this.lastRect=r,this.applyRect(this.target,r),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange()},this.handlePointerUp=t=>{if(null!==this.activePointerId&&t.pointerId!==this.activePointerId)return;const e=this.lastRect,n=this.startAttrs,i=e&&this.startRect&&this.hasRectChanged(this.startRect,e);if(this.cancelDrag(),i&&this.target&&e&&n)this.commander.execute(new Jy(this.target,{attributes:e},{attributes:n})),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange();else if(this.target){const t=this.lastViewportRect||this.getViewportRect(this.target);this.updateHandles(t)}}}init(t){super.init(t);const{emitter:e}=t;e.on("selection:change",this.handleSelectionChange),e.on("selection:geometrychange",this.handleGeometryChange),e.on("history:change",this.handleHistoryChange),e.on("deactivated",this.handleDeactivate)}destroy(){this.cancelDrag(),this.removeContainer();const{emitter:t}=this;t.off("selection:change",this.handleSelectionChange),t.off("selection:geometrychange",this.handleGeometryChange),t.off("history:change",this.handleHistoryChange),t.off("deactivated",this.handleDeactivate)}ensureContainer(){if(this.container)return this.container;const t=Xo("g",{"pointer-events":"none"});this.overlay=Xo("rect",{fill:"rgba(51, 132, 245, 0.06)",stroke:"none","pointer-events":"none"});const e=Xo("rect",{fill:"none",stroke:"#3384F5","stroke-width":1,"stroke-dasharray":"4 2","pointer-events":"none"});t.appendChild(this.overlay),t.appendChild(e),this.outline=e;const n=zv.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 n.forEach((e,n)=>{const r="top"===e||"right"===e||"bottom"===e||"left"===e?Xo("line",{stroke:"transparent","stroke-width":zv.LINE_STROKE_WIDTH}):Xo("circle",{r:zv.HANDLE_SIZE/2,fill:"#3384F5",stroke:"#fff","stroke-width":1.5});r.style.cursor=i[e],r.style.pointerEvents="all",r.addEventListener("pointerdown",t=>this.handlePointerDown(t,e)),r.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault()}),t.appendChild(r),this.handles[n]=r}),this.editor.getDocument().appendChild(t),this.container=t,t}updateHandles(t){if(!this.target)return void this.hideHandles();const e=t||this.getViewportRect(this.target)||this.lastViewportRect||null;if(!e)return void this.hideHandles();this.lastViewportRect=e,this.ensureContainer().style.display="block",this.outline.style.display="block",Zo(this.outline,e),this.overlay&&(this.overlay.style.display="block",Zo(this.overlay,e));const n=this.getHandlePoints(e);this.handles.forEach((t,i)=>{const[r,o]=n[i];if("circle"===t.tagName)Zo(t,{cx:r,cy:o});else{const n=zv.HANDLE_POSITIONS[i];Zo(t,this.getHandleLine(e,n))}t.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(t=>t.style.display="none")}removeContainer(){this.container?.remove(),this.container=void 0,this.outline=void 0,this.overlay=void 0,this.handles=[]}handlePointerDown(t,e){if(!this.target)return;if(0!==t.button&&"mouse"===t.pointerType)return;t.stopPropagation(),t.preventDefault();const n=this.clientToElement(this.target,t.clientX,t.clientY);this.activeHandle=e,this.activePointerId=t.pointerId,this.startPointer=n;const i=this.getCurrentAttributes(this.target);this.startRect=i,this.startAttrs={...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(t,e){Zo(t,{x:e.x,y:e.y,width:e.width,height:e.height})}getViewportRect(t){const{x:e,y:n,width:i,height:r}=Oy(this.editor.getDocument(),t);return{x:e,y:n,width:i,height:r}}clientToElement(t,e,n){const i=t.getScreenCTM()?.inverse()||this.editor.getDocument().getScreenCTM()?.inverse()||new DOMMatrix;return new DOMPoint(e,n).matrixTransform(i)}getCurrentAttributes(t){const e=Ko(t,["x","y","width","height"],!1),n=this.getViewportRect(t),i=(t,e)=>{const n=null!==t?Number(t):NaN;return Number.isFinite(n)?n:e};return{x:i(e.x,n.x),y:i(e.y,n.y),width:i(e.width,n.width),height:i(e.height,n.height)}}getHandlePoints(t){const{x:e,y:n,width:i,height:r}=t,o=e+i/2,a=n+r/2;return[[e,n],[o,n],[e+i,n],[e+i,a],[e+i,n+r],[o,n+r],[e,n+r],[e,a]]}applyDelta(t,e,n,i){let{x:r,y:o,width:a,height:s}=t;switch(i){case"top-left":r+=e,o+=n,a-=e,s-=n;break;case"top":o+=n,s-=n;break;case"top-right":o+=n,a+=e,s-=n;break;case"right":a+=e;break;case"bottom-right":a+=e,s+=n;break;case"bottom":s+=n;break;case"bottom-left":r+=e,a-=e,s+=n;break;case"left":r+=e,a-=e}return{x:r,y:o,width:a,height:s}}clampRect(t,e){let{x:n,y:i,width:r,height:o}=t;if(r<zv.MIN_SIZE){const t=zv.MIN_SIZE-r;"top-left"!==e&&"bottom-left"!==e&&"left"!==e||(n-=t),r=zv.MIN_SIZE}if(o<zv.MIN_SIZE){const t=zv.MIN_SIZE-o;"top-left"!==e&&"top-right"!==e&&"top"!==e||(i-=t),o=zv.MIN_SIZE}return{x:n,y:i,width:r,height:o}}hasRectChanged(t,e){return Math.abs(t.x-e.x)>.5||Math.abs(t.y-e.y)>.5||Math.abs(t.width-e.width)>.5||Math.abs(t.height-e.height)>.5}emitSelectionGeometryChange(){this.target&&this.lastViewportRect&&this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:this.target,rect:this.lastViewportRect})}getHandleLine(t,e){const{x:n,y:i,width:r,height:o}=t;switch(e){case"top":return{x1:n,y1:i,x2:n+r,y2:i};case"right":return{x1:n+r,y1:i,x2:n+r,y2:i+o};case"bottom":return{x1:n,y1:i+o,x2:n+r,y2:i+o};default:return{x1:n,y1:i,x2:n,y2:i+o}}}}zv.HANDLE_SIZE=10,zv.LINE_STROKE_WIDTH=8,zv.MIN_SIZE=1,zv.HANDLE_POSITIONS=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"];var Av=n(328),Ev=n.n(Av);async function Lv(t,e={}){const{embedResources:n=!0,removeIds:i=!1}=e,r=t.cloneNode(!0),{width:o,height:a}=_h(t);return Zo(r,{width:o,height:a}),i?(function(t){const e=Array.from(t.querySelectorAll("use"));e.length&&e.forEach(e=>{const n=function(t){return t.getAttribute("href")??t.getAttribute("xlink:href")}(e);if(!n||!n.startsWith("#"))return;const i=function(t,e){const n=t.querySelector(e);if(n)return n;return document.querySelector(e)}(t,n);if(!i||i===e)return;const r=function(t,e){const n=e.tagName.toLowerCase();return"symbol"===n?function(t,e){const n=e.cloneNode(!0),i=Xo("svg");for(Hv(i,n,new Set(["id"])),Hv(i,t,new Set(["href","xlink:href"]));n.firstChild;)i.appendChild(n.firstChild);return i}(t,e):"svg"===n?function(t,e){const n=e.cloneNode(!0);return n.removeAttribute("id"),Hv(n,t,new Set(["href","xlink:href"])),n}(t,e):function(t,e){const n=e.cloneNode(!0);n.removeAttribute("id");const i=Xo("g");Hv(i,t,new Set(["href","xlink:href","x","y","width","height","transform"]));const r=function(t){const e=t.getAttribute("x"),n=t.getAttribute("y"),i=e||n?`translate(${e??0} ${n??0})`:"",r=t.getAttribute("transform")??"";return i&&r?`${i} ${r}`:i||r||null}(t);return r&&i.setAttribute("transform",r),i.appendChild(n),i}(t,e)}(e,i);r&&e.replaceWith(r)})}(r),function(t){const e=function(t){const e=new Set;return Qo(t,t=>{if("defs"===t.tagName.toLowerCase())return!1;Iv(t,t=>e.add(t))}),e}(t);if(0===e.size)return void Ov(t);const n=function(t,e){if(0===e.size)return null;const n=function(t,e){const n=new Map,i=Array.from(e),r=new Set(i),o=new Set,a=t=>{o.has(t)||r.has(t)||(i.push(t),r.add(t))};for(;i.length;){const e=i.shift();if(o.has(e))continue;o.add(e);const r=`#${jv(e)}`,s=t.querySelector(r);s&&(n.set(e,s),Qo(s,t=>{Iv(t,a)}))}return n}(t,e);if(0===n.size)return null;const i=Xo("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),r=Xo("defs");if(n.forEach(t=>{r.appendChild(t.cloneNode(!0))}),!r.children.length)return null;i.appendChild(r);const o=(new XMLSerializer).serializeToString(i);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o)}(t,e);n&&(Qo(t,t=>{if("defs"===t.tagName.toLowerCase())return!1;Array.from(t.attributes).forEach(e=>{const i=e.value;if(!i.includes("url("))return;const r=i.replace(Tv,(t,e)=>{const i=encodeURIComponent(e);return`url("${n}#${i}")`});r!==i&&t.setAttribute(e.name,r)})}),Ov(t))}(r)):await async function(t){const e=t.querySelectorAll("use"),n=function(t){const e=ma(t,Pv);if(e)return e;const n=Xo("defs");return ga(n,Pv),t.prepend(n),n}(t);e.forEach(e=>{const i=e.getAttribute("href");if(i&&!t.querySelector(i)){const t=document.querySelector(i);t&&n.appendChild(t.cloneNode(!0))}})}(r),await async function(t,e=!0){const n=function(t){const e=new Set,n=t=>{t&&Fo(t).forEach(t=>{const n=Bo(t);n&&e.add(n)})};n(t.getAttribute("font-family"));const i=t.querySelectorAll("foreignObject span");for(const t of i)n(t.style.fontFamily);return e}(t);if(0===n.size)return;const i=[];await Promise.all(Array.from(n).map(async t=>{const n=function(t){const e=[],n=Fo(t).map(t=>Bo(t));return document.fonts.forEach(t=>{n.includes(Bo(t.family))&&"loaded"===t.status&&e.push(t)}),e}(t);if(!n.length)return;const r=await async function(t){const e=ns(t),n=[];return await Promise.allSettled(e.map(async t=>{const e=await Ma(t).then(t=>t.text()).then(t=>Ev()(t)).catch(()=>(console.error(`Failed to fetch or parse font CSS: ${t}`),null));e?.stylesheet?.rules.forEach(t=>{if("font-face"===t.type){const e=function(t){const e=t.declarations||[],n={};return e.forEach(t=>{const{property:e,value:i}=t;e&&i&&(n[e]=i)}),n}(t);n.push(e)}})})),n}(t);if(!r.length)return;const o=await Promise.all(r.map(async t=>{const i={"font-family":(r=t)["font-family"]??"",src:r.src??"","font-style":r["font-style"]??"normal","font-display":r["font-display"]??"swap","font-weight":r["font-weight"]??"400","unicode-range":r["unicode-range"]??"U+0-FFFF"};var r;const o=i["unicode-range"].replace(/\s/g,"");if(!n.find(t=>t.unicodeRange&&t.unicodeRange.replace(/\s/g,"")===o))return null;const a=function(t,e){const n=Fo(t);let i=null;for(const t of n)if(i=ts(t),i)break;if(!i)return null;const r=Yo(e),o=i.fontWeight[r];return o?Ga(i.baseUrl,o.replace(/\/result.css$/,"")):null}(i["font-family"],Yo(i["font-weight"]));if(!a)return null;const s=i.src.match(/url\(["']?(.*?\.woff2)[^"']*["']?\)/);if(!s?.[1])return null;const l=Ga(a,s[1]);if(e){const t=await async function(t){const e=await Ma(t);if(!e.ok)throw new Error(`Failed to load font: ${t}`);const n=await e.blob();return await new Promise((t,e)=>{const i=new FileReader;i.onloadend=()=>{t(i.result)},i.onerror=e,i.readAsDataURL(n)})}(l);i.src=`url(${t}) format('woff2')`}else i.src=`url(${l}) format('woff2')`;return i}));i.push(...o.filter(Boolean)||[])})),i.length>0&&function(t,e){const n=[],i=new Set;for(const t of e){const e=[t["font-family"],t["font-weight"],t["font-style"],t["unicode-range"],t.src].join("|");i.has(e)||(i.add(e),n.push(t))}if(0===n.length)return;const r=Xo("style",{type:"text/css"});r.innerHTML=n.map(t=>`\n@font-face {\n font-family: ${t["font-family"]};\n src: ${t.src};\n font-style: ${t["font-style"]};\n font-weight: ${t["font-weight"]};\n font-display: ${t["font-display"]};\n unicode-range: ${t["unicode-range"]};\n}\n`.trim()).join("\n");const o=t.querySelector("defs");o&&o.parentNode?o.parentNode.insertBefore(r,o.nextSibling):t.insertBefore(r,t.firstChild)}(t,i)}(r,n),function(t){(function(t){const e=ma(t,"btns-group");e?.remove();const n=ma(t,"btn-icon-defs");n?.remove()})(t),function(t){const e=t.querySelector("[data-element-type=transient-container]");e?.remove()}(t),function(t){t.querySelectorAll("g").forEach(t=>{t.removeAttribute("x"),t.removeAttribute("y"),t.removeAttribute("width"),t.removeAttribute("height")})}(t),function(t){Qo(t,t=>{for(const e in t.dataset)delete t.dataset[e]})}(t)}(r),r}const Pv="icon-defs";function Hv(t,e,n=new Set){Array.from(e.attributes).forEach(e=>{n.has(e.name)||("style"!==e.name?"class"!==e.name?t.setAttribute(e.name,e.value):function(t,e){const n=t.getAttribute("class");n?t.setAttribute("class",`${n} ${e}`.trim()):t.setAttribute("class",e)}(t,e.value):function(t,e){const n=t.getAttribute("style");if(!n)return void t.setAttribute("style",e);const i=n.trim().endsWith(";")?"":";";t.setAttribute("style",`${n}${i}${e}`)}(t,e.value))})}const Tv=/url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/g;function Iv(t,e){for(const n of Array.from(t.attributes)){const t=n.value;if(t.includes("url("))for(const n of t.matchAll(Tv))n[1]&&e(n[1]);"href"!==n.name&&"xlink:href"!==n.name||"#"!==t[0]||e(t.slice(1))}}function jv(t){return globalThis.CSS&&"function"==typeof globalThis.CSS.escape?globalThis.CSS.escape(t):t.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,"\\$1")}function Ov(t){Array.from(t.querySelectorAll("defs")).forEach(t=>t.remove())}const Wv=n(228);class Nv{constructor(){this.undoStack=[],this.redoStack=[]}init(t){Object.assign(this,t)}async execute(t){await t.apply(this.state),this.undoStack.push(t),this.redoStack=[],this.emitHistoryChange("execute")}async executeBatch(t){if(0===t.length)return;const e=new Qy(t);await this.execute(e)}async undo(){const t=this.undoStack.pop();t&&(await t.undo(this.state),this.redoStack.push(t),this.emitHistoryChange("undo"))}async redo(){const t=this.redoStack.pop();t&&(await t.apply(this.state),this.undoStack.push(t),this.emitHistoryChange("redo"))}serialize(){return this.undoStack.map(t=>t.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(t){this.emitter?.emit("history:change",{type:"history:change",action:t})}}class Dv{constructor(){this.extensions=new Gy,this.interactions=[],this.active=!1,this.running=null,this.concurrentInteractions=new Set,this.selection=new Set,this.handleClick=t=>{const e=this.editor.getDocument(),n=t.target;n&&(e.contains(n)||function(t){let e=t;for(;e;){if(ma(e,Vr))return!0;e=e.parentElement}return!1}(n))?this.activate():this.deactivate()}}init(t){Object.assign(this,t),document.addEventListener("click",this.handleClick),this.interactions.forEach(t=>{this.extensions.register(t.name,t),t.init({emitter:this.emitter,editor:this.editor,commander:this.commander,state:this.state,interaction:this}),this.emitter.emit("interaction:registered",t)})}isActive(){return this.active}select(t,e){const n=this.getSelection(),i=[],r=[];if("replace"===e){const e=new Set(t);n.forEach(t=>{e.has(t)||r.push(t)}),t.forEach(t=>{this.selection.has(t)||i.push(t)}),this.selection=e}else"add"===e?t.forEach(t=>{this.selection.has(t)||(this.selection.add(t),i.push(t))}):"remove"===e?t.forEach(t=>{this.selection.delete(t)&&r.push(t)}):"toggle"===e&&t.forEach(t=>{this.selection.has(t)?(this.selection.delete(t),r.push(t)):(this.selection.add(t),i.push(t))});const o={type:"selection:change",previous:n,next:this.getSelection(),added:i,removed:r,mode:e};this.emitter.emit("selection:change",o)}getSelection(){return[...this.selection]}isSelected(t){return this.selection.has(t)}clearSelection(){const t=this.getSelection();this.selection.clear();const e={type:"selection:change",previous:t,next:[],added:[],removed:t,mode:"replace"};this.emitter.emit("selection:change",e)}activate(){this.active=!0,this.emitter.emit("activated")}deactivate(){this.active=!1,this.running=null,this.clearSelection(),this.emitter.emit("deactivated")}async executeExclusiveInteraction(t,e){if(this.active&&!this.running){this.running=t;try{this.emitter.emit("interaction:started",t),await e(),this.emitter.emit("interaction:ended",t)}catch(e){console.error(`Error occurred during exclusive interaction "${t.name}":`,e),this.emitter.emit("interaction:error",t,e)}finally{this.running=null}}}async executeConcurrentInteraction(t,e){if(this.active){this.concurrentInteractions.add(t);try{this.emitter.emit("interaction:started",t),await e(),this.emitter.emit("interaction:ended",t)}catch(e){console.error(`Error occurred during concurrent interaction "${t.name}":`,e),this.emitter.emit("interaction:error",t,e)}finally{this.concurrentInteractions.delete(t)}}}getOrCreateTransientContainer(){const t="transient-container",e=this.editor.getDocument(),n=ma(e,t);if(n&&n.isConnected)return n;const i=Xo("g");return ga(i,t),e.appendChild(i),i}appendTransientElement(t){return this.getOrCreateTransientContainer().appendChild(t),t}destroy(){this.extensions.forEach(t=>{t.destroy(),this.emitter.emit("interaction:destroyed",t)}),this.extensions.destroy(),this.active=!1,this.running=null,this.clearSelection(),document.removeEventListener("click",this.handleClick),this.getOrCreateTransientContainer().remove()}}class Rv{constructor(){this.extensions=new Gy}init(t,e=[]){Object.assign(this,t),e.forEach(t=>{this.registerPlugin(t)})}getPlugin(t){return this.extensions.get(t)}getPlugins(){return this.extensions.getAll()}registerPlugin(t){this.extensions.register(t.name,t);const e={emitter:this.emitter,editor:this.editor,commander:this.commander,plugin:this,state:this.state};t.init(e),this.emitter.emit("plugin:registered",t)}unregisterPlugin(t){const e=this.extensions.get(t);e&&(e.destroy(),this.extensions.unregister(t),this.emitter.emit("plugin:unregistered",e))}destroy(){this.extensions.getAll().forEach(t=>{this.unregisterPlugin(t.name),this.emitter.emit("plugin:destroyed",t)}),this.extensions.destroy()}}class Fv{init(t){Object.assign(this,t)}addItemDatum(t,e){const n=t.slice(0,-1),i=t[t.length-1],r=Array.isArray(e)?e:[e];Wy(this.options.data,n).splice(i,0,...r),this.emitter.emit("options:data:item:add",{indexes:t,datum:e}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"add",path:"data.items",indexes:t,value:r}]})}updateItemDatum(t,e){const n=Rr(this.options.data,t);Object.assign(n,e),this.emitter.emit("options:data:item:update",{indexes:t,datum:e}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"data.items",indexes:t,value:e}]})}removeItemDatum(t,e=1){const n=t.slice(0,-1),i=t[t.length-1],r=Wy(this.options.data,n).splice(i,e);this.emitter.emit("options:data:item:remove",{indexes:t,datum:r}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"remove",path:"data.items",indexes:t,value:r}]})}updateData(t,e){this.options.data[t]=e,this.emitter.emit("options:data:update",{key:t,value:e}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:`data.${t}`,value:e}]})}updateElement(t,e){this.updateBuiltInElement(t,e)}updateOptions(t){this.options={...this.options,...t},void 0!==this.options.padding&&zh(this.editor.getDocument(),Sh(this.options.padding)),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"",value:t}]})}getOptions(){return this.options}updateBuiltInElement(t,e){var n,i;const{data:r}=this.options,{attributes:o={}}=e,a=ya(t),s=pa(t)||"item-label"===a||"item-desc"===a||"item-value"===a||"item-illus"===a,l=s?Dy(t):void 0;if(s){const t=Rr(r,l),e=a.replace("item-","");t.attributes||(t.attributes={}),(n=t.attributes)[e]||(n[e]={}),Object.assign(t.attributes[e],o)}else"title"!==a&&"desc"!==a&&"illus"!==a||(r.attributes||(r.attributes={}),(i=r.attributes)[a]||(i[a]={}),Object.assign(r.attributes[a],o));this.emitter.emit("options:element:update",{element:t,props:e}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",role:a,indexes:l,path:s?`${Ny(l)}.attributes.${a.replace("item-","")}`:`data.attributes.${a}`,value:e}]})}destroy(){}}class Vv{constructor(t,e,n){if(this.emitter=t,this.document=e,this.options=n,!e.isConnected)throw new Error("The provided document is not connected to the DOM.");e.style.userSelect="none";const i=new Nv,r=new Fv,o=new Rv,a=new Dv;i.init({state:r,emitter:t}),r.init({emitter:t,editor:this,commander:i,options:n}),o.init({emitter:t,editor:this,commander:i,state:r},n.plugins),a.init({emitter:t,editor:this,commander:i,state:r,interactions:n.interactions}),this.commander=i,this.state=r,this.plugin=o,this.interaction=a}getDocument(){return this.document}destroy(){this.document.style.userSelect="",this.interaction.destroy(),this.plugin.destroy(),this.commander.destroy(),this.state.destroy()}}function Bv(t){var e=this.__data__=new Mr(t);this.size=e.size}Bv.prototype.clear=function(){this.__data__=new Mr,this.size=0},Bv.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Bv.prototype.get=function(t){return this.__data__.get(t)},Bv.prototype.has=function(t){return this.__data__.has(t)},Bv.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Mr){var i=n.__data__;if(!kr||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new _r(i)}return n.set(t,e),this.size=n.size,this};const qv=Bv,Gv=function(){try{var t=ur(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Yv=function(t,e,n){"__proto__"==e&&Gv?Gv(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Xv=function(t,e,n){(void 0!==n&&!xr(t[e],n)||void 0===n&&!(e in t))&&Yv(t,e,n)},Uv=function(t,e,n){for(var i=-1,r=Object(t),o=n(t),a=o.length;a--;){var s=o[Zv?a:++i];if(!1===e(r[s],s,r))break}return t};var Zv,Kv="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qv=Kv&&"object"==typeof module&&module&&!module.nodeType&&module,Jv=Qv&&Qv.exports===Kv?Ni.Buffer:void 0,tb=Jv?Jv.allocUnsafe:void 0;const eb=function(t,e){if(e)return t.slice();var n=t.length,i=tb?tb(n):new t.constructor(n);return t.copy(i),i},nb=Ni.Uint8Array,ib=function(t){var e=new t.constructor(t.byteLength);return new nb(e).set(new nb(t)),e},rb=function(t,e){var n=e?ib(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},ob=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e};var ab=Object.create,sb=function(){function t(){}return function(e){if(!Qi(e))return{};if(ab)return ab(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const lb=sb,hb=function(t,e){return function(n){return t(e(n))}},cb=hb(Object.getPrototypeOf,Object);var db=Object.prototype;const ub=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||db)},fb=function(t){return"function"!=typeof t.constructor||ub(t)?{}:lb(cb(t))},pb=function(t){return Xi(t)&&"[object Arguments]"==Yi(t)};var gb=Object.prototype,mb=gb.hasOwnProperty,yb=gb.propertyIsEnumerable,xb=pb(function(){return arguments}())?pb:function(t){return Xi(t)&&mb.call(t,"callee")&&!yb.call(t,"callee")};const vb=xb,bb=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},wb=function(t){return null!=t&&bb(t.length)&&!Ji(t)};var Mb="object"==typeof exports&&exports&&!exports.nodeType&&exports,kb=Mb&&"object"==typeof module&&module&&!module.nodeType&&module,$b=kb&&kb.exports===Mb?Ni.Buffer:void 0;const Cb=($b?$b.isBuffer:void 0)||function(){return!1};var _b=Function.prototype,Sb=Object.prototype,zb=_b.toString,Ab=Sb.hasOwnProperty,Eb=zb.call(Object);var Lb={};Lb["[object Float32Array]"]=Lb["[object Float64Array]"]=Lb["[object Int8Array]"]=Lb["[object Int16Array]"]=Lb["[object Int32Array]"]=Lb["[object Uint8Array]"]=Lb["[object Uint8ClampedArray]"]=Lb["[object Uint16Array]"]=Lb["[object Uint32Array]"]=!0,Lb["[object Arguments]"]=Lb["[object Array]"]=Lb["[object ArrayBuffer]"]=Lb["[object Boolean]"]=Lb["[object DataView]"]=Lb["[object Date]"]=Lb["[object Error]"]=Lb["[object Function]"]=Lb["[object Map]"]=Lb["[object Number]"]=Lb["[object Object]"]=Lb["[object RegExp]"]=Lb["[object Set]"]=Lb["[object String]"]=Lb["[object WeakMap]"]=!1;const Pb=function(t){return function(e){return t(e)}};var Hb="object"==typeof exports&&exports&&!exports.nodeType&&exports,Tb=Hb&&"object"==typeof module&&module&&!module.nodeType&&module,Ib=Tb&&Tb.exports===Hb&&Oi.process;const jb=function(){try{return Tb&&Tb.require&&Tb.require("util").types||Ib&&Ib.binding&&Ib.binding("util")}catch(t){}}();var Ob=jb&&jb.isTypedArray;const Wb=Ob?Pb(Ob):function(t){return Xi(t)&&bb(t.length)&&!!Lb[Yi(t)]},Nb=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Db=Object.prototype.hasOwnProperty;const Rb=function(t,e,n){var i=t[e];Db.call(t,e)&&xr(i,n)&&(void 0!==n||e in t)||Yv(t,e,n)},Fb=function(t,e,n,i){var r=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=i?i(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),r?Yv(n,s,l):Rb(n,s,l)}return n};var Vb=/^(?:0|[1-9]\d*)$/;const Bb=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Vb.test(t))&&t>-1&&t%1==0&&t<e};var qb=Object.prototype.hasOwnProperty;const Gb=function(t,e){var n=ji(t),i=!n&&vb(t),r=!n&&!i&&Cb(t),o=!n&&!i&&!r&&Wb(t),a=n||i||r||o,s=a?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],l=s.length;for(var h in t)!e&&!qb.call(t,h)||a&&("length"==h||r&&("offset"==h||"parent"==h)||o&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||Bb(h,l))||s.push(h);return s};var Yb=Object.prototype.hasOwnProperty;const Xb=function(t){if(!Qi(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=ub(t),n=[];for(var i in t)("constructor"!=i||!e&&Yb.call(t,i))&&n.push(i);return n},Ub=function(t){return wb(t)?Gb(t,!0):Xb(t)},Zb=function(t,e,n,i,r,o,a){var s=Nb(t,n),l=Nb(e,n),h=a.get(l);if(h)Xv(t,n,h);else{var c=o?o(s,l,n+"",t,e,a):void 0,d=void 0===c;if(d){var u=ji(l),f=!u&&Cb(l),p=!u&&!f&&Wb(l);c=l,u||f||p?ji(s)?c=s:function(t){return Xi(t)&&wb(t)}(s)?c=ob(s):f?(d=!1,c=eb(l,!0)):p?(d=!1,c=rb(l,!0)):c=[]:function(t){if(!Xi(t)||"[object Object]"!=Yi(t))return!1;var e=cb(t);if(null===e)return!0;var n=Ab.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&zb.call(n)==Eb}(l)||vb(l)?(c=s,vb(s)?c=function(t){return Fb(t,Ub(t))}(s):Qi(s)&&!Ji(s)||(c=fb(l))):d=!1}d&&(a.set(l,c),r(c,l,i,o,a),a.delete(l)),Xv(t,n,c)}},Kb=function t(e,n,i,r,o){e!==n&&Uv(n,function(a,s){if(o||(o=new qv),Qi(a))Zb(e,n,s,i,t,r,o);else{var l=r?r(Nb(e,s),a,s+"",e,n,o):void 0;void 0===l&&(l=a),Xv(e,s,l)}},Ub)},Qb=function(t){return t};var Jb=Math.max;const tw=function(t){return function(){return t}};var ew=Gv?function(t,e){return Gv(t,"toString",{configurable:!0,enumerable:!1,value:tw(e),writable:!0})}:Qb;const nw=ew;var iw=Date.now;const rw=function(t){var e=0,n=0;return function(){var i=iw(),r=16-(i-n);if(n=i,r>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(nw),ow=function(t,e){return rw(function(t,e,n){return e=Jb(void 0===e?t.length-1:e,0),function(){for(var i=arguments,r=-1,o=Jb(i.length-e,0),a=Array(o);++r<o;)a[r]=i[e+r];r=-1;for(var s=Array(e+1);++r<e;)s[r]=i[r];return s[e]=n(a),function(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)}(t,this,s)}}(t,e,Qb),t+"")};var aw,sw=(aw=function(t,e,n){Kb(t,e,n)},ow(function(t,e){var n=-1,i=e.length,r=i>1?e[i-1]:void 0,o=i>2?e[2]:void 0;for(r=aw.length>3&&"function"==typeof r?(i--,r):void 0,o&&function(t,e,n){if(!Qi(n))return!1;var i=typeof e;return!!("number"==i?wb(n)&&Bb(e,n.length):"string"==i&&e in n)&&xr(n[e],t)}(e[0],e[1],o)&&(r=i<3?void 0:r,i=1),t=Object(t);++n<i;){var a=e[n];a&&aw(t,a,n,r)}return t}));const lw=sw;function hw(t){if("string"==typeof t)return{type:t};if(!("type"in t))throw new Error("Type is required");return t}function cw(t){if(!t)return null;const{type:e,...n}=hw(t),i=function(t){return nm.get(t)}(e);if(!i)return null;const{component:r}=i;return{...i,component:t=>r({...t,...n})}}function dw(t,e){if(!t)return{component:null};const{type:n,...i}=hw(t),{themeConfig:r}=e,o=r?.colorBg||"#fff",a=fw(o,o);return{component:t=>(t=>{const{x:e=0,y:n=0,alignHorizontal:i="center",title:r,desc:o,descLineNumber:a=2,themeColors:s}=t;return r||o?_(fc,{flexDirection:"column",justifyContent:"center",alignItems:"center",x:e,y:n,gap:8,children:[r&&C(t=>C(Ph,{fontSize:24,fill:s.colorPrimaryText,lineHeight:1.4,alignHorizontal:i,...t,"data-element-type":"title",children:r}),{}),o&&C(t=>C(Ph,{fontSize:16,fill:s.colorTextSecondary,alignHorizontal:i,lineHeight:1.4,height:24*a,...t,"data-element-type":"desc",children:o}),{})]}):null})({...t,themeColors:a,...i})}}function uw(t,e){if(!t)return null;const{type:n,...i}=hw(t),r=function(t){return Lc.get(t)}(n);if(!r)return null;const{component:o,options:a}=r;return{...r,component:t=>{const{indexes:n}=t,{data:r,themeConfig:a}=e,s=a?.colorBg||"#fff",{themeColors:l=fw(cs(a?.palette,n,r?.items?.length)||a?.colorPrimary||"#FF356A",s),...h}=t;return o({themeColors:l,...h,...i})},options:a}}function fw(t,e="#fff"){return mc({colorPrimary:t,isDarkMode:Ii(e),colorBg:e})}function pw(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 i=e.match(/^([^\s]+)\s+(.*)$/);return i?{key:i[1],value:i[2].trim()}:{key:e,value:void 0}}function gw(t,e){return{kind:"object",line:t,value:e,entries:{}}}function mw(t){return pw(t)}function yw(t,e){return{kind:"value",line:e,value:t}}const xw=/^(#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{4}|#[0-9a-f]{3})/i,vw=/^((?:rgb|rgba|hsl|hsla)\([^)]*\))/i;function bw(t){const e=t.trim();return"true"===e||"false"!==e&&(/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e)}function ww(t){return"value"===t.kind||"object"===t.kind?t.value:void 0}function Mw(t,e,n,i,r,o){t.push({path:n,line:e.line,code:i,message:r,raw:o})}function kw(t,e="any"){let n,i=t.trim();if(i.startsWith("[")&&i.endsWith("]")&&(i=i.slice(1,-1).trim()),!i)return[];n="comma"===e?i.split(","):"space"===e?i.split(/\s+/):i.split(/[,\s]+/);const r=[];for(const t of n){const e=t.trim();if(e){if("#"===e||"//"===e)break;r.push(e)}}return r}function $w(t){const e=function(t){let e=t.trim();const n=e.search(/\s+#(?![0-9a-f])/i);n>=0&&(e=e.slice(0,n).trimEnd());const i=e.indexOf("//");return i>=0&&(e=e.slice(0,i).trimEnd()),e}(t);if(!e)return;const n=e.match(xw);if(n&&n[0].length===e.length)return e;const i=e.match(vw);return i&&i[1].length===e.length||ks(e).isValid()?e:void 0}function Cw(t,e,n,i={}){const r=ww(t);if(void 0===r)return void Mw(n,t,e,"schema_mismatch","Expected color value.");const o=$w(r);if(o)return o;i.soft||Mw(n,t,e,"invalid_value","Invalid color value.",r)}function _w(t){if("array"===t.kind)return t.items.map(t=>_w(t));if("value"===t.kind)return bw(t.value);if(!(Object.keys(t.entries).length>0)&&void 0!==t.value)return bw(t.value);const e={};return void 0!==t.value&&(e.value=bw(t.value)),Object.entries(t.entries).forEach(([t,n])=>{e[t]=_w(n)}),e}function Sw(t,e,n,i){switch(e.kind){case"union":return function(t,e,n,i){let r,o=null;for(const i of e.variants){const e=[],a=Sw(t,i,n,e);(null===o||e.length<o.length)&&(o=e,r=a)}return o&&i.push(...o),r}(t,e,n,i);case"string":{const e=ww(t);return void 0===e?void Mw(i,t,n,"schema_mismatch","Expected string value."):e}case"number":{const e=ww(t);if(void 0===e)return void Mw(i,t,n,"schema_mismatch","Expected number value.");const r=e.trim().match(/^(-?\d+(\.\d+)?)(?:\s*(#|\/\/).*)?$/);return r?parseFloat(r[1]):void Mw(i,t,n,"invalid_value","Invalid number value.",e)}case"boolean":{const e=ww(t);return void 0===e?void Mw(i,t,n,"schema_mismatch","Expected boolean value."):"true"!==e&&"false"!==e?void Mw(i,t,n,"invalid_value","Invalid boolean value.",e):"true"===e}case"enum":{const r=ww(t);return void 0===r?void Mw(i,t,n,"schema_mismatch","Expected enum value."):e.values.includes(r)?r:void Mw(i,t,n,"invalid_value","Invalid enum value.",r)}case"array":{if("array"===t.kind)return t.items.map((t,r)=>Sw(t,e.item,`${n}[${r}]`,i)).filter(t=>void 0!==t);if("object"===t.kind&&Object.keys(t.entries).length>0)return void Mw(i,t,n,"schema_mismatch","Expected array value.");const r=ww(t);if(void 0===r)return void Mw(i,t,n,"schema_mismatch","Expected array value.");const o=r.trim();if(o.startsWith("[")&&!o.endsWith("]"))return;return kw(r,e.split).map((r,o)=>Sw(yw(r,t.line),e.item,`${n}[${o}]`,i)).filter(t=>void 0!==t)}case"palette":{if("array"===t.kind){const e=Sw(t,{kind:"array",item:{kind:"color"},split:"any"},n,i);return Array.isArray(e)&&e.length>0?e:void 0}if("object"===t.kind&&Object.keys(t.entries).length>0)return void Mw(i,t,n,"schema_mismatch","Expected palette value.");const e=ww(t);if(void 0===e)return void Mw(i,t,n,"schema_mismatch","Expected palette value.");const r=e.trim();if(r.startsWith("[")&&!r.endsWith("]"))return;const o=$w(r);if(o)return[o];const a=kw(e,"any");if(function(t,e){return e.length>1||!(!t.startsWith("[")||!t.endsWith("]"))||void 0!==$w(t)}(r,a)){const e=a.map((e,r)=>Cw(yw(e,t.line),`${n}[${r}]`,i)).filter(t=>void 0!==t);return e.length>0?e:void 0}return e}case"color":return Cw(t,n,i,{soft:e.soft});case"object":{if("array"===t.kind)return void Mw(i,t,n,"schema_mismatch","Expected object value.");const r={};if("value"===t.kind){if(e.shorthandKey)return r[e.shorthandKey]=t.value,r;const o=mw(t.value);if(void 0!==o?.value){if(e.fields[o.key]){const a=Sw(yw(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,i);return void 0!==a&&(r[o.key]=a),r}return e.allowUnknown?(r[o.key]=bw(o.value),r):(Mw(i,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key),r)}return e.allowUnknown?(r.value=bw(t.value),r):void Mw(i,t,n,"invalid_value","Expected object value.")}if(void 0!==t.value)if(e.shorthandKey&&void 0===r[e.shorthandKey])r[e.shorthandKey]=t.value;else{const o=mw(t.value);if(void 0!==o?.value)if(e.fields[o.key]){const a=Sw(yw(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,i);void 0!==a&&void 0===r[o.key]&&(r[o.key]=a)}else e.allowUnknown?r[o.key]=bw(o.value):Mw(i,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key);else e.allowUnknown&&(r.value=bw(t.value))}return Object.entries(t.entries).forEach(([t,o])=>{const a=e.fields[t];if(!a)return e.allowUnknown?void(r[t]=_w(o)):void Mw(i,o,`${n}.${t}`,"unknown_key","Unknown key in object.",t);const s=Sw(o,a,`${n}.${t}`,i);void 0!==s&&(r[t]=s)}),r}default:return}}const zw=(t={})=>({kind:"color",soft:t.soft}),Aw=(t,e="any")=>({kind:"array",item:t,split:e}),Ew=(t,e={})=>({kind:"object",fields:t,allowUnknown:e.allowUnknown,shorthandKey:e.shorthandKey}),Lw=(...t)=>({kind:"union",variants:t}),Pw={fill:zw({soft:!0}),stroke:zw({soft:!0})},Hw=Ew(Pw,{allowUnknown:!0}),Tw=Ew(Pw,{allowUnknown:!0}),Iw=Ew({},{allowUnknown:!0});Iw.fields={label:{kind:"string"},value:Lw({kind:"number"},{kind:"string"}),desc:{kind:"string"},icon:{kind:"string"},children:Aw(Iw)};const jw=Ew({type:{kind:"string"},colorBg:zw(),colorPrimary:zw(),palette:{kind:"palette"},title:Hw,desc:Hw,shape:Tw,base:Ew({global:Ew({},{allowUnknown:!0}),shape:Tw,text:Hw}),item:Ew({icon:Ew({},{allowUnknown:!0}),label:Hw,desc:Hw,value:Hw,shape:Tw}),stylize:Ew({type:(Ow=["rough","pattern"],{kind:"enum",values:Ow}),roughness:{kind:"number"},bowing:{kind:"number"},fillWeight:{kind:"number"},hachureGap:{kind:"number"},pattern:{kind:"string"},backgroundColor:zw(),foregroundColor:zw(),scale:{kind:"number"}},{shorthandKey:"type"}),elements:Ew({},{allowUnknown:!0})},{shorthandKey:"type"});var Ow;const Ww=Ew({},{allowUnknown:!0,shorthandKey:"type"}),Nw=Ew({structure:Ww,item:Ww,items:Aw(Ww),title:Ww}),Dw=Ew({title:{kind:"string"},desc:{kind:"string"},items:Aw(Iw)}),Rw=Ew({type:{kind:"string"}},{shorthandKey:"type"}),Fw=Ew({template:Rw,design:Nw,data:Dw,theme:jw,width:Lw({kind:"number"},{kind:"string"}),height:Lw({kind:"number"},{kind:"string"})});const Vw={padding:20,theme:"light",themeConfig:{palette:"antv"},get plugins(){return[new Cv,new zv]},get interactions(){return[new rx,new Zy,new Ky,new lx,new hx,new vx,new cx]}},Bw=hb(Object.keys,Object);var qw=Object.prototype.hasOwnProperty;const Gw=function(t){return wb(t)?Gb(t):function(t){if(!ub(t))return Bw(t);var e=[];for(var n in Object(t))qw.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)},Yw=function(){return[]};var Xw=Object.prototype.propertyIsEnumerable,Uw=Object.getOwnPropertySymbols,Zw=Uw?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var a=t[n];e(a,n,t)&&(o[r++]=a)}return o}(Uw(t),function(e){return Xw.call(t,e)}))}:Yw;const Kw=Zw,Qw=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t};var Jw=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Qw(e,Kw(t)),t=cb(t);return e}:Yw;const tM=Jw,eM=function(t,e,n){var i=e(t);return ji(t)?i:Qw(i,n(t))},nM=function(t){return eM(t,Gw,Kw)},iM=function(t){return eM(t,Ub,tM)},rM=ur(Ni,"DataView"),oM=ur(Ni,"Promise"),aM=ur(Ni,"Set"),sM=ur(Ni,"WeakMap");var lM="[object Map]",hM="[object Promise]",cM="[object Set]",dM="[object WeakMap]",uM="[object DataView]",fM=rr(rM),pM=rr(kr),gM=rr(oM),mM=rr(aM),yM=rr(sM),xM=Yi;(rM&&xM(new rM(new ArrayBuffer(1)))!=uM||kr&&xM(new kr)!=lM||oM&&xM(oM.resolve())!=hM||aM&&xM(new aM)!=cM||sM&&xM(new sM)!=dM)&&(xM=function(t){var e=Yi(t),n="[object Object]"==e?t.constructor:void 0,i=n?rr(n):"";if(i)switch(i){case fM:return uM;case pM:return lM;case gM:return hM;case mM:return cM;case yM:return dM}return e});const vM=xM;var bM=Object.prototype.hasOwnProperty;var wM=/\w*$/;var MM=Di?Di.prototype:void 0,kM=MM?MM.valueOf:void 0;const $M=function(t,e,n){var i,r=t.constructor;switch(e){case"[object ArrayBuffer]":return ib(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return function(t,e){var n=e?ib(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return rb(t,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,wM.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Symbol]":return i=t,kM?Object(kM.call(i)):{}}};var CM=jb&&jb.isMap;const _M=CM?Pb(CM):function(t){return Xi(t)&&"[object Map]"==vM(t)};var SM=jb&&jb.isSet;const zM=SM?Pb(SM):function(t){return Xi(t)&&"[object Set]"==vM(t)};var AM="[object Arguments]",EM="[object Function]",LM="[object Object]",PM={};PM[AM]=PM["[object Array]"]=PM["[object ArrayBuffer]"]=PM["[object DataView]"]=PM["[object Boolean]"]=PM["[object Date]"]=PM["[object Float32Array]"]=PM["[object Float64Array]"]=PM["[object Int8Array]"]=PM["[object Int16Array]"]=PM["[object Int32Array]"]=PM["[object Map]"]=PM["[object Number]"]=PM[LM]=PM["[object RegExp]"]=PM["[object Set]"]=PM["[object String]"]=PM["[object Symbol]"]=PM["[object Uint8Array]"]=PM["[object Uint8ClampedArray]"]=PM["[object Uint16Array]"]=PM["[object Uint32Array]"]=!0,PM["[object Error]"]=PM[EM]=PM["[object WeakMap]"]=!1;const HM=function t(e,n,i,r,o,a){var s,l=1&n,h=2&n,c=4&n;if(i&&(s=o?i(e,r,o,a):i(e)),void 0!==s)return s;if(!Qi(e))return e;var d=ji(e);if(d){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&bM.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!l)return ob(e,s)}else{var u=vM(e),f=u==EM||"[object GeneratorFunction]"==u;if(Cb(e))return eb(e,l);if(u==LM||u==AM||f&&!o){if(s=h||f?{}:fb(e),!l)return h?function(t,e){return Fb(t,tM(t),e)}(e,function(t,e){return t&&Fb(e,Ub(e),t)}(s,e)):function(t,e){return Fb(t,Kw(t),e)}(e,function(t,e){return t&&Fb(e,Gw(e),t)}(s,e))}else{if(!PM[u])return o?e:{};s=$M(e,u,l)}}a||(a=new qv);var p=a.get(e);if(p)return p;a.set(e,s),zM(e)?e.forEach(function(r){s.add(t(r,n,i,r,e,a))}):_M(e)&&e.forEach(function(r,o){s.set(o,t(r,n,i,o,e,a))});var g=d?void 0:(c?h?iM:nM:h?Ub:Gw)(e);return function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););}(g||e,function(r,o){g&&(r=e[o=r]),Rb(s,o,t(r,n,i,o,e,a))}),s},TM=function(t){return HM(t,5)};function IM(t,e){const n={...t,...e};return(t.design||e.design)&&(n.design={...t.design,...e.design}),(t.themeConfig||e.themeConfig)&&(n.themeConfig={...t.themeConfig,...e.themeConfig}),(t.svg||e.svg)&&(n.svg={...t.svg,...e.svg}),n}function jM(t){const e={...t};return e.data&&(e.data=TM(e.data)),e.elements&&(e.elements=TM(e.elements)),e}function OM(t){const{design:e,data:n}=t;return!(!e||!Fr(e)||!n||!Array.isArray(n.items)||n.items.length<1)}class WM{constructor(t){this.rendered=!1,this.emitter=new Wv,this.node=null,this.initialOptions={},this.setOptions(t,"replace",!0)}getOptions(){return this.options}setOptions(t,e="replace",n=!1){const{options:i,errors:r,warnings:a}=function(t){if("string"==typeof t){const{options:e,errors:n,warnings:i}=function(t){const{ast:e,errors:n}=function(t){const e=[],n=gw(0),i=[{indent:-1,node:n,parent:null,key:null}];return t.split(/\r?\n/).forEach((t,n)=>{const r=n+1;if(!t.trim())return;const{indent:o,content:a}=function(t){let e=0,n=0;for(;n<t.length;){const i=t[n];if(" "!==i){if("\t"!==i)break;e+=2,n+=1}else e+=1,n+=1}return{indent:e,content:t.slice(n)}}(t),s=function(t){return t.trimEnd()}(a);if(!s.trim())return;for(;i.length>1&&o<=i[i.length-1].indent;)i.pop();const l=i[i.length-1];let h=l.node;const c=s.trim();if(c.startsWith("-")&&(1===c.length||" "===(d=c[1])||"\t"===d)){if("array"!==h.kind){if("object"!==h.kind||0!==Object.keys(h.entries).length||void 0!==h.value||!l.parent||!l.key)return void e.push({path:"",line:r,code:"bad_list",message:"List item is not under an array container.",raw:c});{const t=function(t){return{kind:"array",line:t,items:[]}}(h.line);if("object"===l.parent.kind)l.parent.entries[l.key]=t;else if("array"===l.parent.kind){const e=l.parent.items.indexOf(h);e>=0&&(l.parent.items[e]=t)}l.node=t,h=t}}const t=gw(r,c.slice(1).trim()||void 0);return h.items.push(t),void i.push({indent:o,node:t,parent:h})}var d;const u=pw(c);if(!u)return void e.push({path:"",line:r,code:"bad_syntax",message:"Invalid syntax line.",raw:c});if("object"!==h.kind)return void e.push({path:"",line:r,code:"bad_syntax",message:"Key-value pair is not under an object container.",raw:c});const f=gw(r,u.value);h.entries[u.key]=f,i.push({indent:o,node:f,parent:h,key:u.key})}),{ast:n,errors:e}}(t),i={},r={...e.entries},o=e.entries.infographic;let a;o&&"object"===o.kind&&(o.value&&(a=o.value),Object.entries(o.entries).forEach(([t,e])=>{t in r||(r[t]=e)}));const s=new Set(["infographic","template","design","data","theme","width","height"]);Object.keys(r).forEach(t=>{s.has(t)||n.push({path:t,line:r[t].line,code:"unknown_key",message:"Unknown top-level key.",raw:t})});const l=function(t,e){if(!t)return;const n=Sw(t,Rw,"template",e);return n?"string"==typeof n?n:"object"==typeof n&&"string"==typeof n.type?n.type:void 0:void 0}(r.template,n);l&&(i.template=l),!i.template&&a&&(i.template=a);const h=r.design;if(h){const t=Sw(h,Nw,"design",n);t&&(i.design=t)}const c=r.data;if(c){const t=Sw(c,Dw,"data",n);t&&(i.data=t)}const d=r.theme;if(d){const t=Sw(d,jw,"theme",n);if(t&&"object"==typeof t){const{type:e,...n}=t;"string"==typeof e&&e&&(i.theme=e),Object.keys(n).length>0&&(i.themeConfig=n)}}const u=r.width;if(u){const t=Sw(u,Fw.fields.width,"width",n);void 0!==t&&(i.width=t)}const f=r.height;if(f){const t=Sw(f,Fw.fields.height,"height",n);void 0!==t&&(i.height=t)}return{options:i,errors:n,warnings:[],ast:e}}(t);return{options:e,errors:n,warnings:i}}return{options:jM(t),errors:[],warnings:[]}}(t);n&&(this.initialOptions=jM(i));const s=IM("replace"===e?jM(this.initialOptions||{}):this.options||jM(this.initialOptions||{}),i);this.options=s,this.parsedOptions=function(t){const{container:e="#container",padding:n=0,template:i,design:r,theme:a,themeConfig:s,...l}=t,h="string"==typeof e?document.querySelector(e)||document.createElement("div"):e,c=i?function(t){return o.get(t)}(i):void 0,d=lw({},c?.themeConfig,s),u=a||s||c?.themeConfig?function(t,e={}){const n=t?(r=t,pc.get(r)||{}):{},i=lw({},n,e);var r;return i.palette=e.palette||n.palette,i.stylize=e.stylize??n.stylize,i.colorPrimary||(i.colorPrimary="#FF356A"),i.palette||(i.palette=[i.colorPrimary]),i}(a,d):void 0,f={container:h,padding:Sh(n)};if(c){const{design:t,...e}=c;Object.assign(f,e)}if(Object.assign(f,l),i&&(f.template=i),c?.design||r){const e=function(t,e){const{structure:n,title:i,item:r,items:o}=t||{},a=uw(r||o?.[0],e);return{structure:cw(n),title:dw(i,e),item:a,items:o?o.map(t=>uw(t,e)):[a]}}({...c?.design,...r},u?{...t,themeConfig:u}:t);Fr(e)&&(f.design=e)}return a&&(f.theme=a),u&&(f.themeConfig=u),f}(IM(Vw,this.options)),a.length&&this.emitter.emit("warning",a),r.length&&this.emitter.emit("error",r)}render(t){t?this.setOptions(t,"replace"):!this.options&&this.initialOptions&&this.setOptions(this.initialOptions,"replace"),this.performRender()}update(t){this.setOptions(t,"merge"),this.performRender()}performRender(){const t=this.parsedOptions;if(!OM(t))return void this.emitter.emit("error",new Error("Incomplete options"));const{container:e}=this.parsedOptions,n=this.compose(t),i=new bh(t,n);this.node=i.render(),e?.replaceChildren(this.node),this.editor?.destroy(),this.editor=void 0,this.options.editable&&(this.editor=new Vv(this.emitter,this.node,t)),this.rendered=!0,this.emitter.emit("rendered",{node:this.node,options:this.options});const r=this.node;return r&&async function(t){for(await Promise.resolve();;){const e=Ca(t);if(!e.length)break;await Promise.allSettled(e),await Promise.resolve()}}(r).then(()=>{this.node===r&&this.emitter.emit("loaded",{node:r,options:this.options})}),!0}compose(t){const{design:e,data:n}=t,{title:i,item:r,items:o,structure:a}=e,{component:s,props:l}=a,h=Uo(Qh(C(s,{data:n,Title:i.component,Item:r.component,Items:o.map(t=>t.component),options:t,...l})));if(!h)throw new Error("Failed to parse SVG template");return h}getTypes(){const t=this.parsedOptions;if(!OM(t))return void this.emitter.emit("error",new Error("Incomplete options"));const e=t.design;return function(t,e={title:"信息图标题",desc:"信息图描述",items:"信息图的内容项",label:"项目标签文本",value:"项目数值内容",icon:"项目图标",illus:"项目插图",children:"子级项目(多层结构)"}){const{structure:n,items:i}=t,r=[],o=t=>" ".repeat(t);function a(t,n,i){const r=e[t];return r?`${o(i)}/** ${r} */\n${o(i)}${t}: ${n};`:`${o(i)}${t}: ${n};`}return r.push("type InfographicType = {"),n.includes("title")&&(r.push(a("title","string",1)),r.push(a("desc","string",1))),n.includes("item")&&i.length>0&&r.push(a("items",`Array<${function t(e,n){const r=i[e],s=[];for(const t of r){const e="value"===t?"number":"string";s.push(a(t,e,n+1))}return i[e+1]&&s.push(a("children",`Array<${t(e+1,n+1)}>`,n+1)),`{\n${s.join("\n")}\n${o(n)}}`}(0,1)}>`,1)),r.push("}"),r.join("\n")}({structure:e.structure.composites||[],items:e.items.map(t=>t.composites||[])})}async toDataURL(t){if(!this.node)throw new Error("Infographic is not rendered yet.");return"svg"===t?.type?await async function(t,e={}){const n=await Lv(t,e),i=(new XMLSerializer).serializeToString(n);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)}(this.node,t):await async function(t,e={}){const{dpr:n=globalThis.devicePixelRatio??2}=e,i=await Lv(t),{width:r,height:o}=_h(i);return new Promise((t,e)=>{try{const a=document.createElement("canvas");a.width=r*n,a.height=o*n;const s=a.getContext("2d");if(!s)return void e(new Error("Failed to get canvas context"));s.scale(n,n),s.imageSmoothingEnabled=!0,s.imageSmoothingQuality="high",i.setAttribute("width",String(r)),i.setAttribute("height",String(o));const l=(new XMLSerializer).serializeToString(i),h="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(l),c=new Image;c.onload=function(){s.clearRect(0,0,r,o),s.drawImage(c,0,0,r,o);const e=a.toDataURL("image/png");t(e)},c.onerror=function(t){e(new Error("Image load failed: "+t))},c.src=h}catch(t){e(t)}})}(this.node,t)}on(t,e){this.emitter.on(t,e)}off(t,e){this.emitter.off(t,e)}destroy(){this.editor?.destroy(),this.node?.remove(),this.node=null,this.rendered=!1,this.emitter.emit("destroyed"),this.emitter.removeAllListeners()}}function NM(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var l=i&&i.prototype instanceof s?i:s,h=Object.create(l.prototype);return DM(h,"_invoke",function(n,i,r){var o,s,l,h=0,c=r||[],d=!1,u={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,s=0,l=t,u.n=n,a}};function f(n,i){for(s=n,l=i,e=0;!d&&h&&!r&&e<c.length;e++){var r,o=c[e],f=u.p,p=o[2];n>3?(r=p===i)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=f&&((r=n<2&&f<o[1])?(s=0,u.v=i,u.n=o[1]):f<p&&(r=n<3||o[0]>i||i>p)&&(o[4]=n,o[5]=i,u.n=p,s=0))}if(r||n>1)return a;throw d=!0,i}return function(r,c,p){if(h>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),s=c,l=p;(e=s<2?t:l)||!d;){o||(s?s<3?(s>1&&(u.n=-1),f(s,l)):u.n=l:u.v=l);try{if(h=2,o){if(s||(r="next"),e=o[r]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=t}else if((e=(d=u.n<0)?l:n.call(i,u))!==a)break}catch(e){o=t,s=1,l=e}finally{h=1}}return{value:e,done:d}}}(n,r,o),!0),h}var a={};function s(){}function l(){}function h(){}e=Object.getPrototypeOf;var c=[][i]?e(e([][i]())):(DM(e={},i,function(){return this}),e),d=h.prototype=s.prototype=Object.create(c);function u(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,DM(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=h,DM(d,"constructor",h),DM(h,"constructor",l),l.displayName="GeneratorFunction",DM(h,r,"GeneratorFunction"),DM(d),DM(d,r,"Generator"),DM(d,i,function(){return this}),DM(d,"toString",function(){return"[object Generator]"}),(NM=function(){return{w:o,m:u}})()}function DM(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}DM=function(t,e,n,i){function o(e,n){DM(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},DM(t,e,n,i)}function RM(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function FM(){return FM=function(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(t){RM(o,i,r,a,s,"next",t)}function s(t){RM(o,i,r,a,s,"throw",t)}a(void 0)})}}(NM().m(function t(e,n,i){var r,o,a,s,l;return NM().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.toDataURL({type:n.type,dpr:n.dpr});case 1:if(r=t.v,!n.download){t.n=4;break}return t.n=2,fetch(r);case 2:return o=t.v,t.n=3,o.blob();case 3:a=t.v,s=URL.createObjectURL(a),(l=document.createElement("a")).style.display="none",l.href=s,l.download="".concat(n.fileName,".").concat(n.type),document.body.appendChild(l),l.click(),setTimeout(function(){document.body.removeChild(l),URL.revokeObjectURL(s)},100);case 4:i({exportEvent:{timestamp:Date.now(),type:n.type,data:r}});case 5:return t.a(2)}},t)})),FM.apply(this,arguments)}function VM(t){return VM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},VM(t)}var BM=["id","style","className","syntax","width","height","padding","editable","exportTrigger","debugWindowInstanceName","setProps"];function qM(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function GM(t,e,n){return(e=function(t){var e=function(t){if("object"!=VM(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=VM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==VM(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var YM=function(t){var n=t.id,i=t.style,r=t.className,o=t.syntax,a=t.width,s=t.height,l=t.padding,h=t.editable,c=t.exportTrigger,d=t.debugWindowInstanceName,u=t.setProps,f=(function(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}}(t,BM),(0,e.useRef)(null)),p=(0,e.useRef)(null);return(0,e.useEffect)(function(){f.current&&f.current.update({width:a,height:s,padding:l,editable:h})},[a,s,l,h]),(0,e.useEffect)(function(){f.current&&f.current.render(o)},[o]),(0,e.useEffect)(function(){f.current&&c&&(function(t,e,n){FM.apply(this,arguments)}(f.current,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qM(Object(n),!0).forEach(function(e){GM(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qM(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({type:"png",dpr:1,fileName:"infographic_export",download:!0},c),u),u({exportTrigger:null}))},[c]),(0,e.useEffect)(function(){return f.current=new WM({container:p.current,width:a,height:s,padding:l,editable:h}),o&&f.current.render(o),d&&(window[d]=f.current),function(){f.current.destroy(),d&&delete window[d]}},[]),React.createElement("div",{id:n,style:i,className:r,ref:p})};YM.propTypes={id:r().string,key:r().string,style:r().object,className:r().string,syntax:r().string.isRequired,width:r().oneOfType([r().number,r().string]),height:r().oneOfType([r().number,r().string]),padding:r().oneOfType([r().number,r().arrayOf(r().number)]),editable:r().bool,exportTrigger:r().shape({type:r().oneOf(["png","svg"]),dpr:r().number,download:r().bool,fileName:r().string}),exportEvent:r().shape({timestamp:r().number,type:r().oneOf(["png","svg"]),data:r().string}),debugWindowInstanceName:r().string,setProps:r().func};const XM=YM})(),window.feffery_infographic=a})();
|
|
3
|
+
//# sourceMappingURL=feffery_infographic.min.js.map
|