pptx-vanilla-viewer 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/{ai-panel-WPRZYAYX.js → ai-panel-3WRK5FDF.js} +1 -1
- package/dist/ai-panel-XL4JNYCO.cjs +1 -0
- package/dist/{chunk-SKGGAGA4.js → chunk-H6FIDO5T.js} +1 -1
- package/dist/{chunk-26ILGYI6.js → chunk-RLV2GEN7.js} +71 -71
- package/dist/{chunk-EWJAZ6TW.cjs → chunk-RPCQE4MF.cjs} +71 -71
- package/dist/{chunk-6FIN53PM.cjs → chunk-ZAC3M5KZ.cjs} +13 -13
- package/dist/dist-D3ICOC2G.cjs +1 -0
- package/dist/{dist-AYSWMHWD.js → dist-GJO6PHQ2.js} +1 -1
- package/dist/index.cjs +23 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -3
- package/dist/styles.css +14 -0
- package/package.json +1 -1
- package/dist/ai-panel-VZO5AILC.cjs +0 -1
- package/dist/dist-23DTNHBZ.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {m,fj,xj,Ha as Ha$1,j,k,Xg as Xg$1,Yg as Yg$1,Zg as Zg$1,_g as _g$1,ah as ah$1,$g as $g$1,g,F as F$1,q as q$1,p,Jc as Jc$1,Bc as Bc$1,Gc as Gc$1,Cc as Cc$1,Dc as Dc$1,Fc as Fc$1,Ec as Ec$1,we as we$1}from'./chunk-26ILGYI6.js';import {a}from'./chunk-WOT6VMZA.js';import nS from'dompurify';import*as L from'pptx-viewer-mcp';import*as D from'pptx-viewer-mcp/schemas';var Lo={background:"#030712",foreground:"#f3f4f6",card:"#111827",cardForeground:"#f3f4f6",popover:"#111827",popoverForeground:"#f3f4f6",primary:"#6366f1",primaryForeground:"#ffffff",secondary:"#1f2937",secondaryForeground:"#f3f4f6",muted:"#1f2937",mutedForeground:"#9ca3af",accent:"#1f2937",accentForeground:"#f3f4f6",destructive:"#ef4444",destructiveForeground:"#ffffff",border:"#374151",input:"#374151",ring:"#6366f1"},M0="0.5rem",oS={background:"#f8fafc",foreground:"#0f172a",card:"#ffffff",cardForeground:"#0f172a",popover:"#ffffff",popoverForeground:"#0f172a",primary:"#4f46e5",primaryForeground:"#ffffff",secondary:"#f1f5f9",secondaryForeground:"#0f172a",muted:"#f1f5f9",mutedForeground:"#64748b",accent:"#f1f5f9",accentForeground:"#0f172a",destructive:"#dc2626",destructiveForeground:"#ffffff",border:"#e2e8f0",input:"#e2e8f0",ring:"#4f46e5"},iS={colors:oS},T0={background:"background",foreground:"foreground",card:"card",cardForeground:"card-foreground",popover:"popover",popoverForeground:"popover-foreground",primary:"primary",primaryForeground:"primary-foreground",secondary:"secondary",secondaryForeground:"secondary-foreground",muted:"muted",mutedForeground:"muted-foreground",accent:"accent",accentForeground:"accent-foreground",destructive:"destructive",destructiveForeground:"destructive-foreground",border:"border",input:"input",ring:"ring"},I0=[{source:"primary",cssSuffix:"inspector-active"},{source:"border",cssSuffix:"inspector-border"}];function Kz(e,t=false){let r={};if(!e)return r;let o=e.colors;if(o){for(let[n,i]of Object.entries(T0)){let a=o[n];a!==void 0&&(t&&a===Lo[n]||(r[`--pptx-${i}`]=a,r[`--color-${i}`]=a));}for(let{source:n,cssSuffix:i}of I0){let a=o[n];a!==void 0&&(t&&a===Lo[n]||(r[`--pptx-${i}`]=a));}}if(e.radius!==void 0&&(!t||e.radius!==M0)){r["--pptx-radius"]=e.radius;let n=e.radius;r["--radius-sm"]=`calc(${n} - 4px)`,r["--radius-md"]=`calc(${n} - 2px)`,r["--radius-lg"]=n,r["--radius-xl"]=`calc(${n} + 4px)`;}if(e.cssVars)for(let[n,i]of Object.entries(e.cssVars))r[n]=i;return r}function qz(){let e={};for(let[t,r]of Object.entries(T0))e[`--pptx-${r}`]=Lo[t];for(let{source:t,cssSuffix:r}of I0)e[`--pptx-${r}`]=Lo[t];return e["--pptx-radius"]=M0,e}var aS={background:"#fbfaf7",foreground:"#1a1d21",card:"#ffffff",cardForeground:"#1a1d21",popover:"#ffffff",popoverForeground:"#1a1d21",primary:"#c2431f",primaryForeground:"#ffffff",secondary:"#f2efe8",secondaryForeground:"#1a1d21",muted:"#f2efe8",mutedForeground:"#5a626e",accent:"rgba(194, 67, 31, 0.08)",accentForeground:"#1a1d21",destructive:"#dc2626",destructiveForeground:"#ffffff",border:"#e6e2d9",input:"#e6e2d9",ring:"#c2431f"},sS={background:"#0f1113",foreground:"#f0efec",card:"#171a1e",cardForeground:"#f0efec",popover:"#171a1e",popoverForeground:"#f0efec",primary:"#e86a40",primaryForeground:"#ffffff",secondary:"#1f242b",secondaryForeground:"#f0efec",muted:"#1f242b",mutedForeground:"#9aa1ab",accent:"rgba(232, 106, 64, 0.1)",accentForeground:"#f0efec",destructive:"#ef4444",destructiveForeground:"#ffffff",border:"#272c33",input:"#272c33",ring:"#e86a40"},_0="0.375rem",lS={colors:aS,radius:_0},cS={colors:sS,radius:_0},Jz=[{key:"default",labelKey:"pptx.settings.theme.default",theme:void 0},{key:"light",labelKey:"pptx.settings.theme.light",theme:iS},{key:"vermilionLight",labelKey:"pptx.settings.theme.vermilionLight",theme:lS},{key:"vermilionDark",labelKey:"pptx.settings.theme.vermilionDark",theme:cS}];function mr(e){let t=m.find(r=>r.id===e);if(!t)throw new Error(`theme-gallery-presets: core THEME_PRESETS is missing "${e}"`);return t}var pS={id:"wisp",name:"Wisp",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#46393B",lt2:"#E8DCD8",accent1:"#A53010",accent2:"#DE7E18",accent3:"#9F8351",accent4:"#728653",accent5:"#92AA4C",accent6:"#6AAC91",hlink:"#FB4F14",folHlink:"#E25839"},fontScheme:{majorFont:{latin:"Century Gothic"},minorFont:{latin:"Century Gothic"}}},uS={id:"berlin",name:"Berlin",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#3E5C61",lt2:"#D5E0D0",accent1:"#F09415",accent2:"#C1B56B",accent3:"#89C2A3",accent4:"#729BBE",accent5:"#9A90C2",accent6:"#BE8DBE",hlink:"#25A0DA",folHlink:"#FF7F00"},fontScheme:{majorFont:{latin:"Trebuchet MS"},minorFont:{latin:"Trebuchet MS"}}},dS={id:"slice",name:"Slice",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#2E3B4C",lt2:"#C7CDD3",accent1:"#E2751D",accent2:"#C53B23",accent3:"#A13D69",accent4:"#58599E",accent5:"#36749D",accent6:"#4EA39A",hlink:"#FD6B32",folHlink:"#D14D0F"},fontScheme:{majorFont:{latin:"Century Gothic"},minorFont:{latin:"Century Gothic"}}},fS={id:"dividend",name:"Dividend",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#3D3D3D",lt2:"#E1E1E1",accent1:"#4D1434",accent2:"#903163",accent3:"#B2324B",accent4:"#D34817",accent5:"#E8971C",accent6:"#FDCB00",hlink:"#A03068",folHlink:"#C34882"},fontScheme:{majorFont:{latin:"Gill Sans MT"},minorFont:{latin:"Gill Sans MT"}}};[mr("office"),mr("facet"),mr("integral"),mr("ion"),mr("retrospect"),mr("organic"),pS,uS,dS,fS];function mS(e,t){for(let r of e){if(r.type==="media"){t.push(r);continue}r.type==="group"&&r.children?.length&&mS(r.children,t);}}function eF(e){let t=new Set,r=[],o=n=>{for(let i of n){if(i.type==="picture"||i.type==="image"){let a=i;a.imagePath&&!a.imageData&&!hr(a.imagePath)&&(t.add(a.imagePath),r.push({element:i,field:"imageData",path:a.imagePath})),a.svgPath&&!a.svgData&&!hr(a.svgPath)&&(t.add(a.svgPath),r.push({element:i,field:"svgData",path:a.svgPath}));}if(i.type==="media"){let a=i;a.posterFramePath&&!a.posterFrameData&&!hr(a.posterFramePath)&&(t.add(a.posterFramePath),r.push({element:i,field:"posterFrameData",path:a.posterFramePath}));}if(i.type==="model3d"){let a=i;a.modelPath&&!a.modelData&&!hr(a.modelPath)&&(t.add(a.modelPath),r.push({element:i,field:"modelData",path:a.modelPath}));let s=a.posterImage?!hr(a.posterImage):!a.imageData;a.imagePath&&s&&!hr(a.imagePath)&&(t.add(a.imagePath),r.push({element:i,field:"posterImage",path:a.imagePath}));}i.type==="group"&&i.children?.length&&o(i.children);}};for(let n of e)o(n.elements);return {paths:t,refs:r}}function hr(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:")||e.startsWith("blob:")}var tF=1280,rF=720,kr="#111827",hS="#3b82f6",er="#1f2937";function gS(e,t,r,o){if(!e)return;if(!Number.isFinite(t)||!Number.isFinite(r)||t<=0||r<=0)return Cc$1(e);if(o&&Object.keys(o).length>0){let a=Dc$1(e,t,r,o);if(a!==void 0)return a}let n=Fc$1(e,t,r,o);if(n!==void 0)return n;let i=Ec$1(e,t,r);return i!==void 0?i:Cc$1(e)}function xS(e,t,r,o,n){if(!e||!Number.isFinite(t)||!Number.isFinite(r)||t<=0||r<=0||!Number.isFinite(o)||!Number.isFinite(n)||o<=0||n<=0)return;let i=o/t,a=n/r,s=p=>{let u=Math.round(p*100)/100;return Object.is(u,-0)?"0":String(u)},l=e.match(/[MLCQZAHVmlcqzahv][^MLCQZAHVmlcqzahv]*/g)??[],c=[];for(let p of l){let d=p[0].toUpperCase();if(d==="Z"){c.push("Z");continue}let f=(p.slice(1).match(/-?[\d.]+(?:e-?\d+)?/gi)??[]).map(Number);if(d==="A"){let h=[];for(let g=0;g+6<f.length;g+=7)h.push(s(f[g]*i),s(f[g+1]*a),String(f[g+2]),String(f[g+3]),String(f[g+4]),s(f[g+5]*i),s(f[g+6]*a));c.push(`A ${h.join(" ")}`);continue}let m=f.map((h,g)=>s(h*(g%2===0?i:a)));c.push(`${d} ${m.join(" ")}`);}if(c.length!==0)return `path('${c.join(" ")}')`}function C0(e,t,r){let o=e.width,n=e.height,i=e;if(i.pathData&&i.pathWidth&&i.pathHeight){let l=xS(i.pathData,i.pathWidth,i.pathHeight,o,n);if(l)return l}let a=e.shapeType;if(!a)return;let s=e.shapeAdjustments;return gS(a,o,n,s)}function _e(e,t=kr){if(!e||e==="transparent")return t;let r=e.startsWith("#")?e:`#${e}`;return /^#[0-9A-Fa-f]{6}$/u.test(r)?r:t}function A0(e){return Math.min(1,Math.max(0,e))}function yS(e){let t=e.replace("#","");return /^[0-9a-fA-F]{6}$/u.test(t)?{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}:null}function P0(e,t){if(t===void 0)return e;let r=yS(e);return r?`rgba(${r.r}, ${r.g}, ${r.b}, ${A0(t)})`:e}function E0(e){return !e||e.length===0?[]:e.filter(t=>typeof t?.color=="string"&&String(t.color).trim().length>0&&typeof t?.position=="number"&&Number.isFinite(t.position)).map(t=>({color:_e(String(t.color),hS),position:Math.max(0,Math.min(100,t.position)),opacity:typeof t.opacity=="number"&&Number.isFinite(t.opacity)?A0(t.opacity):void 0})).sort((t,r)=>t.position-r.position)}function Xo(e){let t=typeof e.opacity=="number"?P0(e.color,e.opacity):e.color,r=Math.max(0,Math.min(100,e.position)),o=r===Math.round(r)?`${r}%`:`${r.toFixed(1)}%`;return `${t} ${o}`}function Do(e,t){if(e){let{l:r,t:o,r:n,b:i}=e,a=(r+(1-n))/2*100,s=(o+(1-i))/2*100;if(t){let l=t.x*100,c=t.y*100;a=(a+l)/2,s=(s+c)/2;}return {cx:a,cy:s}}return t?{cx:t.x*100,cy:t.y*100}:{cx:50,cy:50}}function vS(e,t,r){let o=e.map(Xo).join(", "),{cx:n,cy:i}=Do(r,t),a=Math.round(n)===50&&!t&&!r?"center":`${Math.round(n)}%`,s=Math.round(i)===50&&!t&&!r?"center":`${Math.round(i)}%`;if(r){let l=Math.max(n,100-n,i,100-i);return `radial-gradient(circle ${Math.round(l)}% at ${a} ${s}, ${o})`}return `radial-gradient(circle at ${a} ${s}, ${o})`}function bS(e,t,r){let o=e.map(Xo).join(", ");if(r){let{l:a,t:s,r:l,b:c}=r,{cx:p,cy:u}=Do(r,t),d=Math.max(p,100-p),f=Math.max(u,100-u),m=`${Math.round(p)}%`,h=`${Math.round(u)}%`,g=(1-a-l)/2*100,x=(1-s-c)/2*100;if(g>.5&&x>.5&&Math.abs(d-f)>1){let b=g/x,y=Math.round(f*b),v=Math.round(f);return `radial-gradient(${y}% ${v}% at ${m} ${h}, ${o})`}return `radial-gradient(${Math.round(d)}% ${Math.round(f)}% at ${m} ${h}, ${o})`}let n=t?`${Math.round(t.x*100)}%`:"center",i=t?`${Math.round(t.y*100)}%`:"center";return `radial-gradient(ellipse at ${n} ${i}, ${o})`}function SS(e,t,r){let o=e.map(Xo).join(", ");if(r){let{l,t:c,r:p,b:u}=r,{cx:d,cy:f}=Do(r,t),m=`${Math.round(d)}%`,h=`${Math.round(f)}%`,g=Math.max(d,100-d),x=Math.max(f,100-f),b=(1-l-p)/2*100,y=(1-c-u)/2*100;if(b>.5&&y>.5&&Math.abs(b-y)>1){let v=b/y,S=Math.round(Math.max(g,x*v)),$=Math.round(Math.max(x,g/v));return `radial-gradient(${S}% ${$}% at ${m} ${h}, ${o})`}return g>.5||x>.5?`radial-gradient(${Math.round(g)}% ${Math.round(x)}% at ${m} ${h}, ${o})`:`radial-gradient(farthest-side at ${m} ${h}, ${o})`}let{cx:n,cy:i}=Do(void 0,t),a=t?`${Math.round(n)}%`:"center",s=t?`${Math.round(i)}%`:"center";return `radial-gradient(farthest-side at ${a} ${s}, ${o})`}function wS(e){if(!(!e||e==="none"))switch(e){case "x":return {backgroundSize:"50% 100%",backgroundRepeat:"repeat-x"};case "y":return {backgroundSize:"100% 50%",backgroundRepeat:"repeat-y"};case "xy":return {backgroundSize:"50% 50%",backgroundRepeat:"repeat"};default:return}}function $S(e){if(!e)return;let{l:t,t:r,r:o,b:n}=e,i=1-t-o,a=1-r-n;if(i<=0||a<=0||Math.abs(i-1)<.001&&Math.abs(a-1)<.001)return;let s=1-i>.001?t/(1-i)*100:0,l=1-a>.001?r/(1-a)*100:0;return {backgroundSize:`${Math.round(i*100)}% ${Math.round(a*100)}%`,backgroundPosition:`${Math.round(s)}% ${Math.round(l)}%`,backgroundRepeat:"no-repeat"}}function kS(e){if(e.length===0)return [];let t=e.map(o=>({...o,position:o.position/2})),r=[...e].reverse().map(o=>({...o,position:50+(100-o.position)/2}));return [...t,...r]}function Dm(e){return (e%360+360)%360}function MS(e,t,r){if(!r)return e;let o=e,{width:n,height:i,rotation:a}=r;if(t.fillGradientScaled!==false&&typeof n=="number"&&typeof i=="number"&&n>0&&i>0&&n!==i){let s=o*Math.PI/180;o=Dm(Math.atan2(i*Math.sin(s),n*Math.cos(s))*180/Math.PI);}return t.fillGradientRotWithShape===false&&typeof a=="number"&&(o=Dm(o-a)),o}function O0(e,t){if(!e||e.fillMode!=="gradient")return;let r=E0(e.fillGradientStops);if(r.length===0)return e.fillGradient;if((e.fillGradientType||"linear")==="radial"){let l=e.fillGradientPathType||"circle",c=e.fillGradientFocalPoint,p=e.fillGradientFillToRect;return l==="rect"?bS(r,c,p):l==="shape"?SS(r,c,p):vS(r,c,p)}let n=typeof e.fillGradientAngle=="number"&&Number.isFinite(e.fillGradientAngle)?e.fillGradientAngle:90,i=MS(n,e,t),a=e.fillGradientFlip,s=a&&a!=="none"?kS(r):r;return `linear-gradient(${Math.round(i)}deg, ${s.map(Xo).join(", ")})`}function $n(e,t,r){let n="http://www.w3.org/2000/svg",i=(p,u,d)=>`<svg xmlns="${n}" width="${p}" height="${u}">${d}</svg>`,a=(p,u,d,f,m)=>`<rect x="${p}" y="${u}" width="${d}" height="${f}" fill="${m}"/>`,s=(p,u)=>a(0,0,p,u,r),l=(p,u,d,f,m,h,g="")=>`<line x1="${p}" y1="${u}" x2="${d}" y2="${f}" stroke="${m}" stroke-width="${h}"${g}/>`,c=(p,u,d,f)=>`<circle cx="${p}" cy="${u}" r="${d}" fill="${f}"/>`;switch(e){case "pct5":return i(8,8,s(8,8)+a(0,0,1,1,t));case "pct10":return i(8,8,s(8,8)+a(0,0,1,1,t)+a(4,4,1,1,t));case "pct20":return i(4,4,s(4,4)+a(0,0,1,1,t)+a(2,2,1,1,t));case "pct25":return i(4,4,s(4,4)+a(0,0,1,1,t)+a(2,0,1,1,t)+a(1,2,1,1,t)+a(3,2,1,1,t));case "pct30":return i(4,4,s(4,4)+a(0,0,1,1,t)+a(2,0,1,1,t)+a(1,1,1,1,t)+a(3,1,1,1,t)+a(0,2,1,1,t)+a(2,2,1,1,t));case "pct40":return i(4,4,s(4,4)+a(0,0,2,1,t)+a(1,1,1,1,t)+a(3,1,1,1,t)+a(0,2,2,1,t)+a(1,3,1,1,t)+a(3,3,1,1,t));case "pct50":return i(2,2,s(2,2)+a(0,0,1,1,t)+a(1,1,1,1,t));case "pct60":return i(4,4,a(0,0,4,4,t)+a(0,0,2,1,r)+a(1,2,2,1,r));case "pct70":return i(4,4,a(0,0,4,4,t)+a(0,0,1,1,r)+a(2,0,1,1,r)+a(1,2,1,1,r)+a(3,2,1,1,r));case "pct75":return i(4,4,a(0,0,4,4,t)+a(0,0,1,1,r)+a(2,2,1,1,r));case "pct80":return i(4,4,a(0,0,4,4,t)+a(0,0,1,1,r));case "pct90":return i(8,8,a(0,0,8,8,t)+a(0,0,1,1,r));case "horz":return i(8,8,s(8,8)+a(0,3,8,2,t));case "ltHorz":return i(8,8,s(8,8)+a(0,0,8,1,t));case "dkHorz":return i(8,8,s(8,8)+a(0,0,8,4,t));case "narHorz":return i(8,4,s(8,4)+a(0,0,8,1,t)+a(0,2,8,1,t));case "wdHorz":return i(8,12,s(8,12)+a(0,0,8,2,t));case "vert":return i(8,8,s(8,8)+a(3,0,2,8,t));case "ltVert":return i(8,8,s(8,8)+a(0,0,1,8,t));case "dkVert":return i(8,8,s(8,8)+a(0,0,4,8,t));case "narVert":return i(4,8,s(4,8)+a(0,0,1,8,t)+a(2,0,1,8,t));case "wdVert":return i(12,8,s(12,8)+a(0,0,2,8,t));case "dashHorz":return i(8,4,s(8,4)+a(0,0,4,1,t));case "dashVert":return i(4,8,s(4,8)+a(0,0,1,4,t));case "cross":return i(8,8,s(8,8)+a(3,0,2,8,t)+a(0,3,8,2,t));case "dnDiag":return i(8,8,s(8,8)+l(0,0,8,8,t,2)+l(-8,0,0,8,t,2)+l(8,0,16,8,t,2));case "ltDnDiag":return i(8,8,s(8,8)+l(0,0,8,8,t,1)+l(-8,0,0,8,t,1)+l(8,0,16,8,t,1));case "dkDnDiag":return i(8,8,s(8,8)+l(0,0,8,8,t,3)+l(-8,0,0,8,t,3)+l(8,0,16,8,t,3));case "wdDnDiag":return i(12,12,s(12,12)+l(0,0,12,12,t,4)+l(-12,0,0,12,t,4)+l(12,0,24,12,t,4));case "dashDnDiag":return i(8,8,s(8,8)+l(0,0,8,8,t,1,' stroke-dasharray="4,4"'));case "upDiag":return i(8,8,s(8,8)+l(0,8,8,0,t,2)+l(-8,8,0,0,t,2)+l(8,8,16,0,t,2));case "ltUpDiag":return i(8,8,s(8,8)+l(0,8,8,0,t,1)+l(-8,8,0,0,t,1)+l(8,8,16,0,t,1));case "dkUpDiag":return i(8,8,s(8,8)+l(0,8,8,0,t,3)+l(-8,8,0,0,t,3)+l(8,8,16,0,t,3));case "wdUpDiag":return i(12,12,s(12,12)+l(0,12,12,0,t,4)+l(-12,12,0,0,t,4)+l(12,12,24,0,t,4));case "dashUpDiag":return i(8,8,s(8,8)+l(0,8,8,0,t,1,' stroke-dasharray="4,4"'));case "diagCross":return i(8,8,s(8,8)+l(0,0,8,8,t,1)+l(-8,0,0,8,t,1)+l(8,0,16,8,t,1)+l(0,8,8,0,t,1)+l(-8,8,0,0,t,1)+l(8,8,16,0,t,1));case "smCheck":return i(4,4,s(4,4)+a(0,0,2,2,t)+a(2,2,2,2,t));case "lgCheck":return i(8,8,s(8,8)+a(0,0,4,4,t)+a(4,4,4,4,t));case "smGrid":return i(8,8,s(8,8)+a(0,0,8,1,t)+a(0,0,1,8,t));case "lgGrid":return i(16,16,s(16,16)+a(0,0,16,1,t)+a(0,0,1,16,t));case "dotGrid":return i(8,8,s(8,8)+c(0,0,.5,t)+c(4,0,.5,t)+c(0,4,.5,t)+c(4,4,.5,t)+a(0,0,8,.5,t)+a(0,0,.5,8,t));case "smConfetti":return i(8,8,s(8,8)+a(1,0,1,1,t)+a(5,1,1,1,t)+a(3,3,1,1,t)+a(7,2,1,1,t)+a(0,5,1,1,t)+a(4,6,1,1,t)+a(2,7,1,1,t)+a(6,5,1,1,t));case "lgConfetti":return i(8,8,s(8,8)+a(0,0,2,2,t)+a(5,1,2,2,t)+a(2,4,2,2,t)+a(6,5,2,2,t));case "horzBrick":return i(8,8,s(8,8)+a(0,0,8,1,t)+a(0,0,1,4,t)+a(0,4,8,1,t)+a(4,4,1,4,t));case "diagBrick":return i(8,8,s(8,8)+l(0,4,4,0,t,1)+l(4,8,8,4,t,1)+l(0,8,8,0,t,1));case "solidDmnd":return i(8,8,`${s(8,8)}<polygon points="4,0 8,4 4,8 0,4" fill="${t}"/>`);case "openDmnd":return i(8,8,s(8,8)+l(4,0,8,4,t,1)+l(8,4,4,8,t,1)+l(4,8,0,4,t,1)+l(0,4,4,0,t,1));case "dotDmnd":return i(8,8,s(8,8)+c(4,0,.75,t)+c(8,4,.75,t)+c(4,8,.75,t)+c(0,4,.75,t)+c(4,4,.75,t));case "plaid":return i(8,8,s(8,8)+a(0,0,4,4,t)+a(0,0,8,1,t)+a(0,2,8,1,t)+a(0,0,1,8,t)+a(2,0,1,8,t));case "sphere":{let p=`<defs><radialGradient id="sph" cx="35%" cy="35%" r="60%"><stop offset="0%" stop-color="${r}" stop-opacity="0.8"/><stop offset="100%" stop-color="${t}" stop-opacity="1"/></radialGradient></defs>`;return i(8,8,`${s(8,8)}${p}<circle cx="4" cy="4" r="3.5" fill="url(#sph)"/>`)}case "weave":return i(8,8,s(8,8)+l(0,0,4,4,t,1.5)+l(4,4,0,8,t,1.5)+l(8,0,4,4,t,1.5)+l(4,4,8,8,t,1.5)+l(4,0,8,4,t,1.5)+l(0,4,4,8,t,1.5));case "divot":return i(8,8,s(8,8)+l(2,1,2,3,t,1)+l(1,2,3,2,t,1)+l(6,5,6,7,t,1)+l(5,6,7,6,t,1));case "shingle":return i(8,8,s(8,8)+l(0,0,8,8,t,1)+l(0,8,4,4,t,1)+a(0,7,8,1,t));case "wave":return i(8,8,`${s(8,8)}<path d="M0,2 Q2,0 4,2 Q6,4 8,2" stroke="${t}" stroke-width="1" fill="none"/><path d="M0,6 Q2,4 4,6 Q6,8 8,6" stroke="${t}" stroke-width="1" fill="none"/>`);case "trellis":return i(4,4,s(4,4)+a(0,0,4,1,t)+a(0,2,4,1,t)+a(0,0,1,4,t)+a(2,0,1,4,t));case "zigZag":return i(8,8,`${s(8,8)}<path d="M0,4 L2,0 L4,4 L6,0 L8,4" stroke="${t}" stroke-width="1" fill="none"/><path d="M0,8 L2,4 L4,8 L6,4 L8,8" stroke="${t}" stroke-width="1" fill="none"/>`);default:return null}}function TS(e,t){if(!e||e.fillMode!=="pattern"||!e.fillPatternPreset)return;let r=_e(e.fillColor,"#000000"),o=_e(e.fillPatternBackgroundColor,"#ffffff"),n=e.fillPatternPreset,i=$n(n,r,o);return i?{backgroundImage:`url("data:image/svg+xml,${encodeURIComponent(i)}")`,backgroundColor:o}:void 0}function kn(e,t){if(!k(e))return;let r=e.shapeStyle;return r?r.fillMode==="group"?t?Rm(t,e):{}:Rm(r,e):{}}function Rm(e,t){let r=e.fillMode==="image"&&e.fillImageUrl?e.fillImageUrl:void 0;if(r){let a=e.fillImageMode==="tile";return {backgroundColor:"transparent",backgroundImage:`url(${r})`,backgroundRepeat:a?"repeat":"no-repeat",backgroundSize:a?"auto":"100% 100%"}}let o={rotation:t.rotation,width:t.width,height:t.height},n=O0(e,o)??(e.fillMode==="gradient"?e.fillGradient:void 0);if(n){let s=e.fillMode==="gradient"&&(e.fillGradientType||"linear")==="linear"&&E0(e.fillGradientStops).length>0?wS(e.fillGradientFlip):void 0;if(s)return {backgroundImage:n,backgroundSize:s.backgroundSize,backgroundRepeat:s.backgroundRepeat};let l=e.fillMode==="gradient"?$S(e.fillGradientTileRect):void 0;return l?{backgroundImage:n,backgroundSize:l.backgroundSize,backgroundPosition:l.backgroundPosition,backgroundRepeat:l.backgroundRepeat}:{backgroundImage:n}}let i=TS(e,t.id);return i?{backgroundColor:i.backgroundColor,backgroundImage:i.backgroundImage,backgroundRepeat:"repeat",backgroundSize:"auto",svgFilter:i.svgFilter}:e.fillColor&&e.fillColor!=="transparent"&&e.fillMode!=="none"?{backgroundColor:P0(e.fillColor,e.fillOpacity)}:{}}function L0(e){return e.type==="group"?e.groupFill:void 0}function D0(e,t){if(!(!t||!k(e)||e.shapeStyle?.fillMode!=="group"))return kn(e,t)}function _S(e){let t=String(e||"").trim().toLowerCase();return t?{solid:"solid",dot:"dot",dash:"dash",lgdash:"lgDash",dashdot:"dashDot",lgdashdot:"lgDashDot",lgdashdotdot:"lgDashDotDot",sysdot:"sysDot",sysdash:"sysDash",sysdashdot:"sysDashDot",sysdashdotdot:"sysDashDotDot",custom:"custom"}[t]:void 0}function Ko(e,t){return t==="dbl"||t==="thickThin"||t==="thinThick"||t==="tri"||!e||e==="solid"?"solid":e==="dot"||e==="sysDot"?"dotted":"dashed"}function CS(e,t,r){if(!e||e==="solid")return;let o=Math.max(t,1);if(e==="custom"&&r&&r.length>0)return r.flatMap(n=>[n.dash/1e3*o,n.space/1e3*o]).join(" ");switch(e){case "dot":case "sysDot":return `${o} ${o*2}`;case "dash":case "sysDash":return `${o*4} ${o*2}`;case "lgDash":return `${o*7} ${o*2.5}`;case "dashDot":case "sysDashDot":return `${o*4} ${o*2} ${o} ${o*2}`;case "lgDashDot":return `${o*7} ${o*2.5} ${o} ${o*2.5}`;case "lgDashDotDot":case "sysDashDotDot":return `${o*7} ${o*2.5} ${o} ${o*2} ${o} ${o*2}`;case "custom":return `${o*3} ${o*2}`;default:return}}var Mn="#000000",nl="#ffff00";function R0(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function bt(e){return Math.min(1,Math.max(0,e))}function Ot(e,t){if(!e||e==="transparent")return t;let r=e.startsWith("#")?e:`#${e}`;return /^#[0-9A-Fa-f]{6}$/u.test(r)?r:t}function AS(e){let t=e.replace("#","");return /^[0-9a-fA-F]{6}$/u.test(t)?{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}:null}function vt(e,t){if(t===void 0)return e;let r=AS(e);return r?`rgba(${r.r}, ${r.g}, ${r.b}, ${bt(t)})`:e}function PS(e){if(!e?.shadowColor||e.shadowColor==="transparent")return;let t,r;if(typeof e.shadowAngle=="number"&&typeof e.shadowDistance=="number"){let l=e.shadowAngle*Math.PI/180;t=Math.cos(l)*e.shadowDistance,r=Math.sin(l)*e.shadowDistance;}else t=typeof e.shadowOffsetX=="number"&&Number.isFinite(e.shadowOffsetX)?e.shadowOffsetX:4,r=typeof e.shadowOffsetY=="number"&&Number.isFinite(e.shadowOffsetY)?e.shadowOffsetY:4;let o=typeof e.shadowBlur=="number"&&Number.isFinite(e.shadowBlur)?Math.max(0,e.shadowBlur):6,n=typeof e.shadowOpacity=="number"&&Number.isFinite(e.shadowOpacity)?bt(e.shadowOpacity):.35,i=ES(e.shadowScaleX,e.shadowScaleY,o),a=vt(Ot(e.shadowColor,Mn),n),s=`${Math.round(t)}px ${Math.round(r)}px ${Math.round(o)}px`;return i===0?`${s} ${a}`:`${s} ${i}px ${a}`}function ES(e,t,r){let o=typeof e=="number"&&Number.isFinite(e)?e/1e5:1,n=typeof t=="number"&&Number.isFinite(t)?t/1e5:1,i=(o+n)/2;if(i===1)return 0;let a=Math.max(r,4);return Math.round(a*(i-1))}function OS(e){if(!e?.innerShadowColor||e.innerShadowColor==="transparent")return;let t=typeof e.innerShadowOffsetX=="number"&&Number.isFinite(e.innerShadowOffsetX)?e.innerShadowOffsetX:0,r=typeof e.innerShadowOffsetY=="number"&&Number.isFinite(e.innerShadowOffsetY)?e.innerShadowOffsetY:0,o=typeof e.innerShadowBlur=="number"&&Number.isFinite(e.innerShadowBlur)?Math.max(0,e.innerShadowBlur):6,n=typeof e.innerShadowOpacity=="number"&&Number.isFinite(e.innerShadowOpacity)?bt(e.innerShadowOpacity):.5;return `inset ${Math.round(t)}px ${Math.round(r)}px ${Math.round(o)}px ${vt(Ot(e.innerShadowColor,Mn),n)}`}function LS(e){if(!e?.shadows||e.shadows.length===0)return;let t=[];for(let r of e.shadows){if(!r.color||r.color==="transparent")continue;let o=(r.angle??0)*Math.PI/180,n=r.distance??0,i=Math.round(Math.cos(o)*n),a=Math.round(Math.sin(o)*n),s=Math.round(Math.max(0,r.blur??6)),l=bt(r.opacity??.35),c=vt(Ot(r.color,Mn),l);t.push(`${i}px ${a}px ${s}px ${c}`);}return t.length>0?t.join(", "):void 0}function DS(e,t,r){if(!e||e==="transparent"||!t||t<=0)return;let o=typeof r=="number"?bt(r):.75,n=Ot(e,nl),i=Math.round(t*.33),a=vt(n,o),s=Math.round(t*.66),l=vt(n,o*.6),c=Math.round(t),p=vt(n,o*.3);return `0 0 ${i}px ${a}, 0 0 ${s}px ${l}, 0 0 ${c}px ${p}`}function RS(e,t={}){if(!e)return;let r=[],o=LS(e);if(o)r.push(o);else {let i=PS(e);i&&r.push(i);}let n=OS(e);if(n&&r.push(n),t.includeGlow!==false){let i=DS(e.glowColor,e.glowRadius,e.glowOpacity);i&&r.push(i);}return r.length>0?r.join(", "):void 0}function z0(e){if(!(!e?.lineShadowColor||e.lineShadowColor==="transparent"))return {offsetX:typeof e.lineShadowOffsetX=="number"?e.lineShadowOffsetX:2,offsetY:typeof e.lineShadowOffsetY=="number"?e.lineShadowOffsetY:2,blur:typeof e.lineShadowBlur=="number"?Math.max(0,e.lineShadowBlur):4,color:Ot(e.lineShadowColor,Mn),opacity:typeof e.lineShadowOpacity=="number"?bt(e.lineShadowOpacity):.35}}function F0(e){if(!e?.lineGlowColor||e.lineGlowColor==="transparent"||!e.lineGlowRadius)return;let t=typeof e.lineGlowOpacity=="number"?e.lineGlowOpacity:.75,r=Math.round(Math.max(0,e.lineGlowRadius)),o=vt(Ot(e.lineGlowColor,nl),t);return `drop-shadow(0 0 ${r}px ${o})`}function zS(e,t){if(!e)return;let r=[];if(e.dagGrayscale&&r.push("grayscale(1)"),typeof e.dagBiLevel=="number"){let o=Math.max(0,Math.min(100,e.dagBiLevel));r.push(o>50?"contrast(1000)":"contrast(0.01)");}if(typeof e.dagLumBrightness=="number"||typeof e.dagLumContrast=="number"){let o=e.dagLumBrightness??0,n=e.dagLumContrast??0;o!==0&&r.push(`brightness(${1+o/100})`),n!==0&&r.push(`contrast(${1+n/100})`);}if(typeof e.dagHslHue=="number"&&e.dagHslHue!==0&&r.push(`hue-rotate(${e.dagHslHue}deg)`),typeof e.dagHslSaturation=="number"&&e.dagHslSaturation!==100&&r.push(`saturate(${e.dagHslSaturation/100})`),typeof e.dagHslLuminance=="number"&&e.dagHslLuminance!==0&&r.push(`brightness(${1+e.dagHslLuminance/100})`),typeof e.dagAlphaModFix=="number"){let o=bt(e.dagAlphaModFix/100);r.push(`opacity(${o})`);}if(typeof e.dagTintHue=="number"||typeof e.dagTintAmount=="number"){let o=e.dagTintHue??0,n=Math.max(0,Math.min(100,e.dagTintAmount??50));r.push(`sepia(${n/100}) hue-rotate(${o}deg)`);}return e.dagDuotone&&t&&r.push(`url(#${B0(t)})`),r.length>0?r.join(" "):void 0}function FS(e,t){if(!e)return;let r=[];if(e.glowColor&&e.glowColor!=="transparent"&&e.glowRadius){let n=typeof e.glowOpacity=="number"?e.glowOpacity:.75,i=Math.round(Math.max(0,e.glowRadius)),a=vt(Ot(e.glowColor,nl),n);r.push(`drop-shadow(0 0 ${i}px ${a})`);}typeof e.softEdgeRadius=="number"&&e.softEdgeRadius>0&&(t?r.push(`url(#${j0(t)})`):r.push(`blur(${Math.min(2,Math.round(e.softEdgeRadius))}px)`)),typeof e.blurRadius=="number"&&e.blurRadius>0&&r.push(`blur(${Math.round(e.blurRadius)}px)`);let o=zS(e,t);return o&&r.push(o),r.length>0?r.join(" "):void 0}function NS(e,t,r,o,n=0,i=0){let a=o+n*2,s=(t+r)/2,l=Math.round(a*.5),c=Math.round(Math.max(0,Math.min(i,a-1))),p=c>0?`rgba(255,255,255,${t}) ${c}px, `:"";return n>0?`below ${Math.round(e)}px linear-gradient(to bottom, rgba(255,255,255,${t}), ${p}rgba(255,255,255,${s}) ${l}px, rgba(255,255,255,${r}) ${a}px)`:`below ${Math.round(e)}px linear-gradient(to bottom, rgba(255,255,255,${t}), ${p}rgba(255,255,255,${r}) ${o}px)`}function BS(e,t){if(!e||!(typeof e.reflectionStartOpacity=="number"&&e.reflectionStartOpacity>0||typeof e.reflectionDistance=="number"&&e.reflectionDistance>0||typeof e.reflectionBlurRadius=="number"&&e.reflectionBlurRadius>0))return;let o=e.reflectionDistance??0,n=typeof e.reflectionStartOpacity=="number"?e.reflectionStartOpacity:.5,i=typeof e.reflectionEndOpacity=="number"?e.reflectionEndOpacity:0,a=typeof e.reflectionEndPosition=="number"?Math.round(e.reflectionEndPosition*Math.max(t,1)):100,s=typeof e.reflectionBlurRadius=="number"?e.reflectionBlurRadius:0,l=typeof e.reflectionStartPosition=="number"&&e.reflectionStartPosition>0?Math.round(bt(e.reflectionStartPosition)*a):0;return {webkitBoxReflect:NS(o,n,i,a,s,l),distance:o,startOpacity:n,endOpacity:i,fadeLength:a,blurRadius:s}}function US(e){if(!(!e||typeof e.dagAlphaModFix!="number"))return bt(e.dagAlphaModFix/100)}function N0(e){switch(e){case "mult":return "multiply";case "screen":return "screen";case "darken":return "darken";case "lighten":return "lighten";default:return}}function jS(e){if(!e?.dagFillOverlayColor||e.dagFillOverlayColor==="transparent")return;let t=N0(e.dagFillOverlayBlend)??"normal";return {color:vt(Ot(e.dagFillOverlayColor,Mn),e.dagFillOverlayOpacity),blendMode:t}}function B0(e){return `dag-duotone-${e}`}function zm(e){let t=e.replace("#",""),r=Number.parseInt(t.substring(0,2),16)/255,o=Number.parseInt(t.substring(2,4),16)/255,n=Number.parseInt(t.substring(4,6),16)/255;return {r:Number.isFinite(r)?r:0,g:Number.isFinite(o)?o:0,b:Number.isFinite(n)?n:0}}function U0(e,t){if(!e?.dagDuotone)return;let r=B0(t),o=zm(e.dagDuotone.color1),n=zm(e.dagDuotone.color2),i=[.2126,.7152,.0722,0,0,.2126,.7152,.0722,0,0,.2126,.7152,.0722,0,0,0,0,0,1,0].join(" "),a=n.r-o.r,s=n.g-o.g,l=n.b-o.b,c=[`<filter id="${R0(r)}" color-interpolation-filters="sRGB">`,`<feColorMatrix type="matrix" values="${i}"/>`,"<feComponentTransfer>",`<feFuncR type="linear" slope="${a}" intercept="${o.r}"/>`,`<feFuncG type="linear" slope="${s}" intercept="${o.g}"/>`,`<feFuncB type="linear" slope="${l}" intercept="${o.b}"/>`,"</feComponentTransfer>","</filter>"].join("");return {id:r,cssReference:`url(#${r})`,filterMarkup:c}}function j0(e){return `soft-edge-${e}`}function W0(e,t){if(!e||typeof e.softEdgeRadius!="number"||e.softEdgeRadius<=0)return;let r=j0(t),o=Math.round(e.softEdgeRadius),n=[`<filter id="${R0(r)}" x="-20%" y="-20%" width="140%" height="140%" color-interpolation-filters="sRGB">`,`<feGaussianBlur in="SourceAlpha" stdDeviation="${o}" result="softEdgeAlpha"/>`,'<feComposite in="SourceGraphic" in2="softEdgeAlpha" operator="in"/>',"</filter>"].join("");return {id:r,cssReference:`url(#${r})`,filterMarkup:n}}function qo(e,t={}){let r="shapeStyle"in e?e.shapeStyle:void 0,o={};if(!r)return o;let n=RS(r,{includeGlow:t.includeGlowBoxShadow});n&&(o.boxShadow=n);let i=FS(r,e.id);i&&(o.filter=i);let a=BS(r,e.height);a&&(o.webkitBoxReflect=a.webkitBoxReflect);let s=US(r);s!==void 0&&(o.opacity=s);let l=jS(r);if(l)o.fillOverlay=l;else {let c=N0(r.dagFillOverlayBlend);c&&(o.mixBlendMode=c);}return r.blurGrow&&typeof r.blurRadius=="number"&&r.blurRadius>0&&(o.overflowVisible=true),o}function H0(e,t,r){return Math.min(r,Math.max(t,e))}function WS(e){let t=H0(e,0,100);return Array.from({length:101},(r,o)=>o>=t?"1":"0").join(" ")}function Fm(e){let t=H0(e/100,-1,1);return t>=0?{slope:1-t,intercept:t}:{slope:1+t,intercept:0}}function Vt(e,t,r){return e<t?t:e>r?r:e}function ps(e){return Vt(e/100,0,1)}function Ls(e){let t=e.replace(/^#/u,""),r=parseInt(t.substring(0,2),16)/255,o=parseInt(t.substring(2,4),16)/255,n=parseInt(t.substring(4,6),16)/255;return {r:Number.isFinite(r)?r:0,g:Number.isFinite(o)?o:0,b:Number.isFinite(n)?n:0}}function Mr(e){if(g(e))return e.imageEffects}function Z0(e){return `duotone-${e}`}function G0(e){return `imgalpha-${e}`}function Y0(e){return `artistic-fx-${e}`}var HS=new Set(["artisticFilmGrain","filmGrain","artisticCutout","cutout","artisticCement","cement","artisticTexturizer","texturizer","artisticCrisscrossEtching","crisscrossEtching","artisticMosaic","artisticMosaicBubbles","mosaicBubbles","mosaic","artisticGlowEdges","glowEdges","glow_edges","artisticChalkSketch","chalkSketch","chalk","artisticPencilSketch","pencilSketch","artisticPencilGrayscale","pencilGrayscale","grayPencil"]);function V0(e){return e?HS.has(e):false}function X0(e){let t=Mr(e);return t?!!(typeof t.alphaModFix=="number"||t.alphaInv||t.alphaCeiling||t.alphaFloor||typeof t.alphaRepl=="number"||typeof t.alphaBiLevel=="number"||typeof t.biLevel=="number"||t.lum&&(typeof t.lum.bright=="number"||typeof t.lum.contrast=="number")||t.hsl&&(typeof t.hsl.sat=="number"||typeof t.hsl.lum=="number")||t.tint&&typeof t.tint.amt=="number"||t.clrRepl):false}function ZS(e,t){let r=Mr(e);if(!r)return;let o=[];if(typeof r.brightness=="number"&&r.brightness!==0&&o.push(`brightness(${Math.max(0,1+r.brightness/100)})`),typeof r.contrast=="number"&&r.contrast!==0&&o.push(`contrast(${Math.max(0,1+r.contrast/100)})`),typeof r.saturation=="number"&&r.saturation!==0&&o.push(`saturate(${Math.max(0,1+r.saturation/100)})`),r.grayscale&&o.push("grayscale(100%)"),r.duotone&&true&&o.push(`url(#${Z0(e.id)})`),X0(e)&&o.push(`url(#${G0(e.id)})`),r.artisticEffect){let n=r.artisticRadius??5;V0(r.artisticEffect)?o.push(`url(#${Y0(e.id)})`):o.push(GS(r.artisticEffect,n));}return o.length>0?o.join(" "):void 0}function GS(e,t){switch(e){case "blur":case "glassEffect":return `blur(${Math.min(t,20)}px)`;case "artisticBlur":return `blur(${Math.min(t,20)}px)`;case "artisticGaussianBlur":return `blur(${Math.min(Math.round(t*1.2),24)}px)`;case "lineDrawing":return "grayscale(100%) contrast(150%)";case "artisticLineDrawing":return "grayscale(100%) contrast(150%)";case "paintStrokes":case "watercolorSponge":return `blur(${Math.min(t,8)}px) saturate(140%) brightness(105%)`;case "artisticPaintStrokes":return `blur(${Math.min(t,8)}px) saturate(140%) brightness(105%)`;case "artisticWatercolorSponge":return `blur(${Math.min(t,8)}px) saturate(150%) brightness(108%)`;case "artisticPaint":case "paint":return `blur(${Math.min(t,5)}px) saturate(160%) contrast(110%)`;case "artisticPaintBrush":case "paintBrush":return `blur(${Math.min(t,6)}px) saturate(130%)`;case "photocopy":return "grayscale(100%) contrast(200%) brightness(120%)";case "artisticPhotocopy":return "grayscale(100%) contrast(200%) brightness(120%)";case "pastelsSmooth":case "pastels":return `blur(${Math.min(t,6)}px) saturate(85%) brightness(105%)`;case "artisticPastelsSmooth":case "artisticPastels":return `blur(${Math.min(t,6)}px) saturate(85%) brightness(105%)`;case "artisticMarker":case "marker":return "contrast(130%) saturate(150%)";case "artisticPlasticWrap":case "plasticWrap":return "contrast(150%) brightness(115%) saturate(80%)";case "artisticLightScreen":case "lightScreen":return `brightness(${1.2+ps(t)*.3}) saturate(${Math.max(.5,.8-ps(t)*.3)})`;case "artisticGlowDiffused":case "glowDiffused":return `blur(${Math.min(t,6)}px) brightness(${1.15+ps(t)*.15})`;case "artisticSharpenEdges":case "sharpen":return "contrast(160%) brightness(105%)";case "glass":case "artisticGlass":return `blur(${Math.min(t,6)}px) brightness(110%)`;default:return "contrast(105%) saturate(105%)"}}function YS(e){let t=Mr(e);if(t&&typeof t.alphaModFix=="number")return Vt(t.alphaModFix/100,0,1)}var VS=[.2126,.7152,.0722,0,0,.2126,.7152,.0722,0,0,.2126,.7152,.0722,0,0,0,0,0,1,0].join(" ");function XS(e,t){let r=Ls(e),o=Ls(t);return `<feColorMatrix type="matrix" values="${VS}"/><feComponentTransfer><feFuncR type="linear" slope="${o.r-r.r}" intercept="${r.r}"/><feFuncG type="linear" slope="${o.g-r.g}" intercept="${r.g}"/><feFuncB type="linear" slope="${o.b-r.b}" intercept="${r.b}"/></feComponentTransfer>`}function KS(e,t=g(e)?e.id:""){let r=Mr(e);if(!r?.duotone)return;let o=Z0(t);return {id:o,cssReference:`url(#${o})`,filterMarkup:XS(r.duotone.color1,r.duotone.color2)}}function qS(e){let t=[],r=0,o="SourceGraphic",n=i=>{let a=`r${r++}`;t.push(i(o,a)),o=a;};if(typeof e.alphaModFix=="number"){let i=Vt(e.alphaModFix/100,0,1);n((a,s)=>`<feColorMatrix in="${a}" result="${s}" type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${i} 0"/>`);}if(e.alphaInv&&n((i,a)=>`<feComponentTransfer in="${i}" result="${a}"><feFuncA type="linear" slope="-1" intercept="1"/></feComponentTransfer>`),e.alphaCeiling&&n((i,a)=>`<feComponentTransfer in="${i}" result="${a}"><feFuncA type="discrete" tableValues="0 1 1 1 1 1 1 1 1 1"/></feComponentTransfer>`),e.alphaFloor&&n((i,a)=>`<feComponentTransfer in="${i}" result="${a}"><feFuncA type="discrete" tableValues="0 0 0 0 0 0 0 0 0 1"/></feComponentTransfer>`),typeof e.alphaRepl=="number"){let i=Vt(e.alphaRepl/100,0,1);n((a,s)=>`<feComponentTransfer in="${a}" result="${s}"><feFuncA type="linear" slope="0" intercept="${i}"/></feComponentTransfer>`);}if(typeof e.alphaBiLevel=="number"){let i=Vt(e.alphaBiLevel/100,0,1),a=Array.from({length:10},(s,l)=>l/10>=i?"1":"0").join(" ");n((s,l)=>`<feComponentTransfer in="${s}" result="${l}"><feFuncA type="discrete" tableValues="${a}"/></feComponentTransfer>`);}if(typeof e.biLevel=="number"){n((a,s)=>`<feColorMatrix in="${a}" result="${s}" type="saturate" values="0"/>`);let i=WS(e.biLevel);n((a,s)=>`<feComponentTransfer in="${a}" result="${s}"><feFuncR type="discrete" tableValues="${i}"/><feFuncG type="discrete" tableValues="${i}"/><feFuncB type="discrete" tableValues="${i}"/></feComponentTransfer>`);}if(e.lum&&(typeof e.lum.bright=="number"||typeof e.lum.contrast=="number")){let i=(e.lum.bright??0)/100,a=1+(e.lum.contrast??0)/100,s=a,l=i+(1-a)/2;n((c,p)=>`<feComponentTransfer in="${c}" result="${p}"><feFuncR type="linear" slope="${s}" intercept="${l}"/><feFuncG type="linear" slope="${s}" intercept="${l}"/><feFuncB type="linear" slope="${s}" intercept="${l}"/></feComponentTransfer>`);}if(e.hsl&&typeof e.hsl.sat=="number"){let i=Vt(1+e.hsl.sat/100,0,2);n((a,s)=>`<feColorMatrix in="${a}" result="${s}" type="saturate" values="${i}"/>`);}if(e.hsl&&typeof e.hsl.lum=="number"){let{slope:i,intercept:a}=Fm(e.hsl.lum);n((s,l)=>`<feComponentTransfer in="${s}" result="${l}"><feFuncR type="linear" slope="${i}" intercept="${a}"/><feFuncG type="linear" slope="${i}" intercept="${a}"/><feFuncB type="linear" slope="${i}" intercept="${a}"/></feComponentTransfer>`);}if(e.tint&&typeof e.tint.hue=="number"&&n((i,a)=>`<feColorMatrix in="${i}" result="${a}" type="hueRotate" values="${e.tint.hue}"/>`),e.tint&&typeof e.tint.amt=="number"){let{slope:i,intercept:a}=Fm(e.tint.amt);n((s,l)=>`<feComponentTransfer in="${s}" result="${l}"><feFuncR type="linear" slope="${i}" intercept="${a}"/><feFuncG type="linear" slope="${i}" intercept="${a}"/><feFuncB type="linear" slope="${i}" intercept="${a}"/></feComponentTransfer>`);}if(e.clrRepl){let i=Ls(e.clrRepl.color);n((a,s)=>`<feColorMatrix in="${a}" result="${s}" type="matrix" values="0 0 0 0 ${i.r} 0 0 0 0 ${i.g} 0 0 0 0 ${i.b} 0 0 0 1 0"/>`);}return t.length>0?t.join(""):void 0}function JS(e,t=g(e)?e.id:""){let r=Mr(e);if(!r||!X0(e))return;let o=qS(r);if(!o)return;let n=G0(t);return {id:n,cssReference:`url(#${n})`,filterMarkup:o}}function QS(e){let t=[];for(let r=0;r<e;r++){let o=Math.round(r/(e-1)*100)/100,n=Math.ceil(256/e);for(let i=0;i<n;i++)t.push(o);}return t.slice(0,256).join(" ")}function ew(e,t){let r=Vt(t,0,100)/100;switch(e){case "artisticFilmGrain":case "filmGrain":{let o=.5+r*.5,n=.15+r*.25;return `<feTurbulence type="fractalNoise" baseFrequency="${o}" numOctaves="4" seed="1" stitchTiles="stitch" result="grain"/><feColorMatrix in="grain" type="saturate" values="0" result="grainGray"/><feBlend in="SourceGraphic" in2="grainGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="${1+n*.3}" intercept="${n*.02}"/><feFuncG type="linear" slope="${1+n*.3}" intercept="${n*.02}"/><feFuncB type="linear" slope="${1+n*.3}" intercept="${n*.02}"/></feComponentTransfer>`}case "artisticCutout":case "cutout":{let o=Math.max(2,Math.round(4+r*4)),n=QS(o);return `<feComponentTransfer><feFuncR type="discrete" tableValues="${n}"/><feFuncG type="discrete" tableValues="${n}"/><feFuncB type="discrete" tableValues="${n}"/></feComponentTransfer>`}case "artisticCement":case "cement":{let o=1.5+r*2.5;return `<feColorMatrix type="saturate" values="${Math.max(0,.4-r*.3)}" result="desat"/><feTurbulence type="fractalNoise" baseFrequency="${o}" numOctaves="5" seed="2" stitchTiles="stitch" result="cementNoise"/><feColorMatrix in="cementNoise" type="saturate" values="0" result="cementGray"/><feBlend in="desat" in2="cementGray" mode="multiply"/><feComponentTransfer><feFuncR type="linear" slope="1.2" intercept="0"/><feFuncG type="linear" slope="1.2" intercept="0"/><feFuncB type="linear" slope="1.2" intercept="0"/></feComponentTransfer>`}case "artisticTexturizer":case "texturizer":return `<feTurbulence type="fractalNoise" baseFrequency="${2+r*3}" numOctaves="3" seed="3" stitchTiles="stitch" result="texNoise"/><feColorMatrix in="texNoise" type="saturate" values="0" result="texGray"/><feBlend in="SourceGraphic" in2="texGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="1.1" intercept="0.02"/><feFuncG type="linear" slope="1.1" intercept="0.02"/><feFuncB type="linear" slope="1.1" intercept="0.02"/></feComponentTransfer>`;case "artisticCrisscrossEtching":case "crisscrossEtching":{let o=.08+r*.12;return `<feColorMatrix type="saturate" values="0" result="gray"/><feTurbulence type="turbulence" baseFrequency="${o} ${o*3}" numOctaves="1" seed="7" result="lines"/><feColorMatrix in="lines" type="saturate" values="0" result="linesGray"/><feBlend in="gray" in2="linesGray" mode="multiply"/><feComponentTransfer><feFuncR type="linear" slope="1.3" intercept="-0.05"/><feFuncG type="linear" slope="1.3" intercept="-0.05"/><feFuncB type="linear" slope="1.3" intercept="-0.05"/></feComponentTransfer>`}case "artisticMosaic":case "artisticMosaicBubbles":case "mosaicBubbles":case "mosaic":{let o=Math.max(2,Math.round(t*.8)),n=.02+r*.03;return `<feGaussianBlur in="SourceGraphic" stdDeviation="${o}" result="blurred"/><feTurbulence type="turbulence" baseFrequency="${n}" numOctaves="1" seed="4" result="cells"/><feDisplacementMap in="blurred" in2="cells" scale="${o*.5}" xChannelSelector="R" yChannelSelector="G" result="mosaic"/><feComponentTransfer in="mosaic"><feFuncR type="linear" slope="1.05" intercept="0"/><feFuncG type="linear" slope="1.05" intercept="0"/><feFuncB type="linear" slope="1.05" intercept="0"/></feComponentTransfer>`}case "artisticGlowEdges":case "glowEdges":case "glow_edges":return `<feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" result="inverted"/><feGaussianBlur in="inverted" stdDeviation="${Math.max(1,Math.round(r*3))}" result="blurredInv"/><feBlend in="SourceGraphic" in2="blurredInv" mode="screen"/><feComponentTransfer><feFuncR type="linear" slope="2" intercept="-0.3"/><feFuncG type="linear" slope="2" intercept="-0.3"/><feFuncB type="linear" slope="2" intercept="-0.3"/></feComponentTransfer>`;case "artisticChalkSketch":case "chalkSketch":case "chalk":{let o=1+r*2;return `<feColorMatrix type="saturate" values="${Math.max(0,.2-r*.2)}" result="gray"/><feTurbulence type="fractalNoise" baseFrequency="${o}" numOctaves="4" seed="5" stitchTiles="stitch" result="chalkTex"/><feColorMatrix in="chalkTex" type="saturate" values="0" result="chalkGray"/><feBlend in="gray" in2="chalkGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="1.5" intercept="0.05"/><feFuncG type="linear" slope="1.5" intercept="0.05"/><feFuncB type="linear" slope="1.5" intercept="0.05"/></feComponentTransfer>`}case "artisticPencilSketch":case "pencilSketch":return `<feColorMatrix type="saturate" values="0" result="gray"/><feColorMatrix in="gray" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" result="invGray"/><feGaussianBlur in="invGray" stdDeviation="${Math.max(3,Math.round(4+r*8))}" result="blurInv"/><feBlend in="blurInv" in2="gray" mode="screen" result="sketch"/><feComponentTransfer in="sketch"><feFuncR type="linear" slope="1.6" intercept="-0.15"/><feFuncG type="linear" slope="1.6" intercept="-0.15"/><feFuncB type="linear" slope="1.6" intercept="-0.15"/></feComponentTransfer>`;case "artisticPencilGrayscale":case "pencilGrayscale":case "grayPencil":return `<feColorMatrix type="saturate" values="0" result="gray"/><feGaussianBlur in="gray" stdDeviation="${Math.max(.5,1+r*2)}" result="grayBlur"/><feComposite in="gray" in2="grayBlur" operator="arithmetic" k1="0" k2="1.5" k3="-0.5" k4="0"/>`;default:return}}function tw(e,t=g(e)?e.id:""){let r=Mr(e);if(!r?.artisticEffect||!V0(r.artisticEffect))return;let o=ew(r.artisticEffect,r.artisticRadius??5);if(!o)return;let n=Y0(t);return {id:n,cssReference:`url(#${n})`,filterMarkup:o}}function rw(e){let t=[],r=KS(e);r&&t.push({id:r.id,markup:r.filterMarkup});let o=JS(e);o&&t.push({id:o.id,markup:o.filterMarkup});let n=tw(e);return n&&t.push({id:n.id,markup:n.filterMarkup}),t}function K0(e){return {filter:ZS(e),opacity:YS(e),svgFilters:rw(e)}}var q0=new Set(["textNoShape","textPlain"]),J0=new Set(["textArchUp","textArchDown","textCircle","textWave1","textWave2","textWave4","textDoubleWave1","textCurveUp","textCurveDown","textArchUpPour","textArchDownPour","textCirclePour","textButton","textButtonPour","textRingInside","textRingOutside","textTriangle","textTriangleInverted","textChevron","textChevronInverted","textStop"]),Q0=new Set(["textInflate","textDeflate","textInflateBottom","textInflateTop","textDeflateBottom","textDeflateTop","textDeflateInflate","textDeflateInflateDeflate","textCanUp","textCanDown"]),eg=new Set(["textSlantUp","textSlantDown","textFadeRight","textFadeLeft","textFadeUp","textFadeDown","textCascadeUp","textCascadeDown"]);function nw(e){return !e||q0.has(e)?"none":J0.has(e)?"path":Q0.has(e)?"envelope":eg.has(e)?"simple":"none"}new Set([...q0,...J0,...Q0,...eg]);function tg(e,t){let r=e.textSegments;if(!r||r.length===0)return e.text?[{segments:[{text:e.text,style:{}}]}]:[];let o=[],n=[];for(let i of r)i.isParagraphBreak?(n.length>0&&o.push({segments:n}),n=[]):n.push(i);return n.length>0&&o.push({segments:n}),o}var ow=new Set(["textArchUp","textArchDown","textCircle","textWave1","textInflate","textDeflate","textCurveUp","textCurveDown","textWave2","textWave4","textDoubleWave1","textCanUp","textCanDown","textButton","textRingInside","textRingOutside","textCascadeUp","textCascadeDown","textTriangle","textTriangleInverted","textStop","textChevron","textChevronInverted","textInflateBottom","textInflateTop","textDeflateBottom","textDeflateTop","textSlantUp","textSlantDown","textFadeRight","textFadeLeft","textFadeUp","textFadeDown","textArchUpPour","textArchDownPour","textCirclePour","textButtonPour","textDeflateInflate","textDeflateInflateDeflate"]),ie=e=>Math.max(0,Math.min(e,4));function iw(e,t,r,o){let i=.85*(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)/.5,a=t*Math.max(0,i-r*.7);return a<1?`M 0,${t} L ${e},${t}`:`M 0,${t} A ${e/2},${a} 0 0,1 ${e},${t}`}function aw(e,t,r,o){let i=.15*(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)/.5,a=t*(i+r*.7);return a<1?`M 0,0 L ${e},0`:`M 0,0 A ${e/2},${a} 0 0,0 ${e},0`}function sw(e,t,r,o){let n=e/2,i=t/2,s=.45+(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)*1.1,l=Math.min(1,s)-r*.55,c=Math.max(1,e/2*l),p=Math.max(1,t/2*l);return `M ${n},${i-p} A ${c},${p} 0 1,1 ${n},${i+p} A ${c},${p} 0 1,1 ${n},${i-p}`}function lw(e,t,r,o,n){let i=t*(.25+r*.5),a=o!==void 0?o/12500:1,s=t*.2*ie(a),l=n!==void 0?n/1e5*e*.3:0,c=e/3+l,p=2*e/3+l;return `M 0,${i} C ${c},${i-s} ${p},${i+s} ${e},${i}`}function cw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=t*.3*(1-2*r)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function pw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=t*.3*(2*r-1)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function uw(e,t,r,o){let n=t*(.35+r*.55),i=o!==void 0?o/45977:1,a=t*.4*(1-r*.3)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function dw(e,t,r,o){let n=t*(.1+r*.55),i=o!==void 0?o/45977:1,a=t*.4*(1-(1-r)*.3)*ie(i);return `M 0,${n} Q ${e/2},${n+a} ${e},${n}`}function fw(e,t,r,o,n){let i=t*(.25+r*.5),a=o!==void 0?o/12500:1,s=t*.2*ie(a),l=n!==void 0?n/1e5*e*.3:0,c=e/3+l,p=2*e/3+l;return `M 0,${i} C ${c},${i+s} ${p},${i-s} ${e},${i}`}function mw(e,t,r,o,n){let i=t*(.25+r*.5),a=o!==void 0?o/12500:1,s=t*.15*ie(a),l=n!==void 0?n/1e5*e*.15:0,c=e/4;return `M 0,${i} C ${c+l},${i-s} ${2*c+l},${i+s} ${e/2},${i} C ${e/2+c+l},${i-s} ${e-c+l},${i+s} ${e},${i}`}function hw(e,t,r,o,n){let i=t*(.25+r*.5),a=o!==void 0?o/6250:1,s=t*.18*ie(a),l=n!==void 0?n/1e5*e*.15:0,c=e/4;return `M 0,${i} C ${c+l},${i-s} ${2*c+l},${i+s} ${e/2},${i} C ${e/2+c+l},${i+s} ${e-c+l},${i-s} ${e},${i}`}function gw(e,t,r,o){let n=o!==void 0?o/18750:1,i=ie(n),a=t*(.35-r*.25)*i;return a<1?`M 0,${t} L ${e},${t}`:`M 0,${t} A ${e/2},${a} 0 0,1 ${e},${t}`}function xw(e,t,r,o){let n=o!==void 0?o/18750:1,i=ie(n),a=t*(.1+r*.25)*i;return a<1?`M 0,0 L ${e},0`:`M 0,0 A ${e/2},${a} 0 0,0 ${e},0`}function yw(e,t,r,o){let n=t*(.1+r*.8),i=o!==void 0?o/18750:1,a=t*.15*(1-2*r)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function vw(e,t,r,o){let n=e/2,i=t/2,a=o!==void 0?o/18750:1,s=.35*ie(a),l=.7-r*s,c=Math.max(1,e/2*l),p=Math.max(1,t/2*l);return `M ${n},${i-p} A ${c},${p} 0 1,1 ${n},${i+p} A ${c},${p} 0 1,1 ${n},${i-p}`}function bw(e,t,r,o){let n=e/2,i=t/2,a=o!==void 0?o/18750:1,s=.35*ie(a),l=1-r*s,c=Math.max(1,e/2*l),p=Math.max(1,t/2*l);return `M ${n},${i-p} A ${c},${p} 0 1,1 ${n},${i+p} A ${c},${p} 0 1,1 ${n},${i-p}`}function Sw(e,t,r,o){let n=o!==void 0?o/44444:1,i=.2*ie(n),a=t*(.2+r*.6),s=a+t*i/2,l=a-t*i/2;return `M 0,${s} L ${e},${l}`}function ww(e,t,r,o){let n=o!==void 0?o/44444:1,i=.2*ie(n),a=t*(.2+r*.6),s=a-t*i/2,l=a+t*i/2;return `M 0,${s} L ${e},${l}`}function $w(e,t,r,o){let n=o!==void 0?o/1e5:.5,i=e*(1-Math.max(0,Math.min(n,1)))*.3,a=i+r*(e-i),s=(e-a)/2,l=t*(.1+r*.8);return `M ${s},${l} L ${s+a},${l}`}function kw(e,t,r,o){let n=o!==void 0?o/1e5:.5,i=e*(1-Math.max(0,Math.min(n,1)))*.3,a=e-r*(e-i),s=(e-a)/2,l=t*(.1+r*.8);return `M ${s},${l} L ${s+a},${l}`}function Mw(e,t,r,o){let n=o!==void 0?o/25e3:1,i=ie(n),a=e*.15*(1-(1-2*Math.abs(r-.5))**2)*i,s=t*(.1+r*.8);return `M ${a},${s} L ${e-a},${s}`}function Tw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/25e3:1,a=t*.2*(1-r)*ie(i);return `M 0,${n} L ${e/2},${n+a} L ${e},${n}`}function Iw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/25e3:1,a=t*.2*r*ie(i);return `M 0,${n} L ${e/2},${n-a} L ${e},${n}`}function _w(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=r>.4?t*.25*((r-.4)/.6)*ie(i):0;return `M 0,${n} Q ${e/2},${n+a} ${e},${n}`}function Cw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=r<.6?t*.25*((.6-r)/.6)*ie(i):0;return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function Aw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=r>.4?t*.2*((r-.4)/.6)*ie(i):0;return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function Pw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=r<.6?t*.2*((.6-r)/.6)*ie(i):0;return `M 0,${n} Q ${e/2},${n+a} ${e},${n}`}function Ew(e,t,r,o){let n=o!==void 0?o/55e3:1,i=.25*ie(n),a=t*(.175+r*.55),s=a+t*i/2,l=a-t*i/2;return `M 0,${s} L ${e},${l}`}function Ow(e,t,r,o){let n=o!==void 0?o/55e3:1,i=.25*ie(n),a=t*(.175+r*.55),s=a-t*i/2,l=a+t*i/2;return `M 0,${s} L ${e},${l}`}function Lw(e,t,r,o){let n=o!==void 0?o/5e4:1,i=ie(n),a=t*(.1+r*.8),s=.35*(1-2*r)*i,l=t*(.5+s*.4);return `M 0,${a} L ${e},${l}`}function Dw(e,t,r,o){let n=o!==void 0?o/5e4:1,i=ie(n),a=.35*(1-2*r)*i,s=t*(.5+a*.4),l=t*(.1+r*.8);return `M 0,${s} L ${e},${l}`}function Rw(e,t,r,o){let n=o!==void 0?o/5e4:1,a=1-.7*ie(n),s=e*Math.max(0,a),l=s+r*(e-s),c=(e-l)/2,p=t*(.1+r*.8);return `M ${c},${p} L ${c+l},${p}`}function zw(e,t,r,o){let n=o!==void 0?o/5e4:1,a=1-.7*ie(n),s=e*Math.max(0,a),l=e-r*(e-s),c=(e-l)/2,p=t*(.1+r*.8);return `M ${c},${p} L ${c+l},${p}`}function Fw(e,t,r,o){let i=.7*(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)/.5,a=t*Math.max(0,i-r*.5);return a<1?`M 0,${t} L ${e},${t}`:`M 0,${t} A ${e/2},${a} 0 0,1 ${e},${t}`}function Nw(e,t,r,o){let i=.2*(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)/.5,a=t*(i+r*.5);return a<1?`M 0,0 L ${e},0`:`M 0,0 A ${e/2},${a} 0 0,0 ${e},0`}function Bw(e,t,r,o){let n=e/2,i=t/2,a=o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5,s=.35+Number(a),l=Math.min(1,s)-r*.45,c=Math.max(1,e/2*l),p=Math.max(1,t/2*l);return `M ${n},${i-p} A ${c},${p} 0 1,1 ${n},${i+p} A ${c},${p} 0 1,1 ${n},${i-p}`}function Uw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=t*.12*(1-2*r)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function jw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=Math.sin(r*Math.PI),s=t*.2*(a-.5)*ie(i);return `M 0,${n} Q ${e/2},${n-s} ${e},${n}`}function Ww(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=ie(i),s=Math.sin(r*Math.PI*2),l=t*.15*s*a,c=e/3,p=2*e/3;return `M 0,${n} Q ${c},${n-l} ${e/2},${n} Q ${p},${n+l} ${e},${n}`}var Hw={textArchUp:iw,textArchDown:aw,textCircle:sw,textWave1:lw,textInflate:cw,textDeflate:pw,textCurveUp:uw,textCurveDown:dw,textWave2:fw,textWave4:mw,textDoubleWave1:hw,textCanUp:gw,textCanDown:xw,textButton:yw,textRingInside:vw,textRingOutside:bw,textCascadeUp:Sw,textCascadeDown:ww,textTriangle:$w,textTriangleInverted:kw,textStop:Mw,textChevron:Tw,textChevronInverted:Iw,textInflateBottom:_w,textInflateTop:Cw,textDeflateBottom:Aw,textDeflateTop:Pw,textSlantUp:Ew,textSlantDown:Ow,textFadeRight:Lw,textFadeLeft:Dw,textFadeUp:Rw,textFadeDown:zw,textArchUpPour:Fw,textArchDownPour:Nw,textCirclePour:Bw,textButtonPour:Uw,textDeflateInflate:jw,textDeflateInflateDeflate:Ww};function rg(e){return !e||e==="textNoShape"||e==="textPlain"?false:ow.has(e)}function ng(e,t,r,o,n,i,a){let s=n<=1?.5:o/(n-1),l=Hw[e];if(l)return l(t,r,s,i,a);let c=r*(.2+s*.6);return `M 0,${c} L ${t},${c}`}var Zw={textInflate:18750,textDeflate:18750,textInflateBottom:18750,textInflateTop:18750,textDeflateBottom:18750,textDeflateTop:18750,textDeflateInflate:18750,textDeflateInflateDeflate:18750,textCanUp:18750,textCanDown:18750};function Gw(e,t,r){let o=Zw[e]??18750,i=Math.max(0,Math.min((t??o)/18750,4));switch(e){case "textInflate":return {transform:`scaleY(${1+.15*i}) scaleX(${1+.05*i})`,transformOrigin:"center center"};case "textInflateBottom":return {transform:`perspective(${600-100*i}px) rotateX(${ -8*i}deg)`,transformOrigin:"center bottom"};case "textInflateTop":return {transform:`perspective(${600-100*i}px) rotateX(${8*i}deg)`,transformOrigin:"center top"};case "textDeflate":return {transform:`scaleY(${1-.12*i}) scaleX(${1-.05*i})`,transformOrigin:"center center"};case "textDeflateBottom":return {transform:`perspective(${600-100*i}px) rotateX(${6*i}deg)`,transformOrigin:"center bottom"};case "textDeflateTop":return {transform:`perspective(${600-100*i}px) rotateX(${ -6*i}deg)`,transformOrigin:"center top"};case "textDeflateInflate":return {transform:`scaleY(${1-.08*i}) scaleX(${1+.04*i})`,transformOrigin:"center center"};case "textDeflateInflateDeflate":return {transform:`scaleY(${1-.15*i}) scaleX(${1+.06*i})`,transformOrigin:"center center"};case "textCanUp":return {transform:`perspective(${500-80*i}px) rotateX(${ -6*i}deg)`,transformOrigin:"center center"};case "textCanDown":return {transform:`perspective(${500-80*i}px) rotateX(${6*i}deg)`,transformOrigin:"center center"};default:return}}var Yw={textSlantUp:55e3,textSlantDown:55e3,textFadeRight:5e4,textFadeLeft:5e4,textFadeUp:5e4,textFadeDown:5e4,textCascadeUp:44444,textCascadeDown:44444};function Vw(e,t){let r=t??Yw[e]??5e4;switch(e){case "textSlantUp":return {transform:`perspective(500px) rotateY(${8*(r/55e3)}deg) skewY(${ -4*(r/55e3)}deg)`,transformOrigin:"left center"};case "textSlantDown":return {transform:`perspective(500px) rotateY(${ -8*(r/55e3)}deg) skewY(${4*(r/55e3)}deg)`,transformOrigin:"right center"};case "textFadeRight":return {transform:`perspective(400px) rotateY(${ -10*(r/5e4)}deg)`,transformOrigin:"left center"};case "textFadeLeft":return {transform:`perspective(400px) rotateY(${10*(r/5e4)}deg)`,transformOrigin:"right center"};case "textFadeUp":return {transform:`perspective(400px) rotateX(${ -10*(r/5e4)}deg)`,transformOrigin:"center bottom"};case "textFadeDown":return {transform:`perspective(400px) rotateX(${10*(r/5e4)}deg)`,transformOrigin:"center top"};case "textCascadeUp":return {transform:`skewY(${ -8*(r/44444)}deg)`,transformOrigin:"left top"};case "textCascadeDown":return {transform:`skewY(${8*(r/44444)}deg)`,transformOrigin:"left top"};default:return}}function og(e,t,r){let o=nw(e);if(o==="envelope")return Gw(e,t);if(o==="simple")return Vw(e,t)}function Ds(e){if(!e||typeof e!="object")return;let t=e["a:rPr"];if(t&&typeof t=="object"){let r=t["a:solidFill"],n=(r&&typeof r=="object"?r["a:srgbClr"]:void 0)?.["@_val"];if(typeof n=="string"&&/^[0-9a-f]{6}$/iu.test(n))return `#${n.toUpperCase()}`}for(let r of Object.values(e))if(Array.isArray(r)){for(let o of r)if(o&&typeof o=="object"){let n=Ds(o);if(n)return n}}else if(r&&typeof r=="object"){let o=Ds(r);if(o)return o}}function Rs(e){if(!e||typeof e!="object")return;let t=e["a:rPr"];if(t&&typeof t=="object"){let r=Number(t["@_sz"]);if(Number.isFinite(r)&&r>0)return r/100}for(let r of Object.values(e))if(Array.isArray(r)){for(let o of r)if(o&&typeof o=="object"){let n=Rs(o);if(n)return n}}else if(r&&typeof r=="object"){let o=Rs(r);if(o)return o}}function X(e,t){if(!e)return {};let r=e[t];return r&&typeof r=="object"&&!Array.isArray(r)?r:{}}function Qt(e){return e==null?[]:Array.isArray(e)?e:typeof e=="object"?[e]:[]}function Xw(e,t){if(!e)return "";let r=e[`@_${t}`];return typeof r=="string"?r:r!==void 0?String(r):""}function Re(e){return Xw(e,"val")}function De(e){return e.replace(/&/gu,"&").replace(/</gu,"<").replace(/>/gu,">")}function Kw(e){let t=e["m:t"];if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(t&&typeof t=="object"&&!Array.isArray(t)){let r=t["#text"];return typeof r=="string"?r:""}return ""}var qw=new Set(["+","-","\u2212","\xB1","\u2213","\xD7","\xF7","\xB7","=","\u2260","\u2248","\u2261","\u2264","\u2265","<",">","\u226A","\u226B","\u2208","\u2209","\u2282","\u2283","\u2286","\u2287","\u222A","\u2229","\u2192","\u2190","\u2194","\u21D2","\u21D0","\u21D4","\u221E","\u2234","\u2235","\u221D","\u2200","\u2203",",",";",":","!","?",".","|","/","\\","'","(",")","[","]","{","}","\u27E8","\u27E9"]);function Jw(e){return qw.has(e.trim())}function Qw(e){return /^[0-9]+(?:[.,][0-9]+)?$/u.test(e.trim())}var e$={"\u0302":"^","\u0303":"~","\u0304":"\xAF","\u0305":"\xAF","\u0307":"\u02D9","\u0308":"\xA8","\u030C":"\u02C7","\u0332":"_","\u20D7":"\u2192","^":"^","~":"~","\xAF":"\xAF","\u02D9":"\u02D9","\xA8":"\xA8","\u02C7":"\u02C7"},t$={"\u2211":"\u2211","\u220F":"\u220F","\u222B":"\u222B","\u222C":"\u222C","\u222D":"\u222D","\u222E":"\u222E","\u2210":"\u2210","\u22C0":"\u22C0","\u22C1":"\u22C1","\u22C2":"\u22C2","\u22C3":"\u22C3"},r$={"(":"(","[":"[","{":"{","|":"|","\u2016":"\u2016","\u27E8":"\u27E8","\u2308":"\u2308","\u230A":"\u230A"},n$={")":")","]":"]","}":"}","|":"|","\u2016":"\u2016","\u27E9":"\u27E9","\u2309":"\u2309","\u230B":"\u230B"};function o$(e){let t=Kw(e);if(t.length===0)return "";let r=De(t),o=X(e,"m:rPr"),n=Re(X(o,"m:nor")),i=n==="1"||n==="on"||n==="true";return Qw(t)?`<mn>${r}</mn>`:Jw(t)?`<mo>${r}</mo>`:i?`<mi mathvariant="normal">${r}</mi>`:`<mi>${r}</mi>`}function i$(e,t){let r=X(e,"m:fPr"),o=Re(X(r,"m:type")),n=`<mrow>${t(X(e,"m:num"))}</mrow>`,i=`<mrow>${t(X(e,"m:den"))}</mrow>`;return o==="lin"?`<mrow>${n}<mo>/</mo>${i}</mrow>`:o==="noBar"?`<mfrac linethickness="0">${n}${i}</mfrac>`:`<mfrac>${n}${i}</mfrac>`}function a$(e,t){let r=X(e,"m:radPr"),o=Re(X(r,"m:degHide")),n=t(X(e,"m:e")),i=t(X(e,"m:deg"));return o==="1"||o==="on"||o==="true"||i.length===0?`<msqrt><mrow>${n}</mrow></msqrt>`:`<mroot><mrow>${n}</mrow><mrow>${i}</mrow></mroot>`}function s$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:sup"));return `<msup><mrow>${r}</mrow><mrow>${o}</mrow></msup>`}function l$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:sub"));return `<msub><mrow>${r}</mrow><mrow>${o}</mrow></msub>`}function c$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:sub")),n=t(X(e,"m:sup"));return `<msubsup><mrow>${r}</mrow><mrow>${o}</mrow><mrow>${n}</mrow></msubsup>`}function p$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:sub")),n=t(X(e,"m:sup"));return `<mmultiscripts><mrow>${r}</mrow><mprescripts/><mrow>${o}</mrow><mrow>${n}</mrow></mmultiscripts>`}function u$(e,t){let r=X(e,"m:naryPr"),o=Re(X(r,"m:chr")),n=Re(X(r,"m:limLoc")),i=Re(X(r,"m:subHide")),a=Re(X(r,"m:supHide")),s=o?t$[o]||o:"\u222B",l=t(X(e,"m:sub")),c=t(X(e,"m:sup")),p=t(X(e,"m:e")),u=i!=="1"&&i!=="on"&&i!=="true"&&l.length>0,d=a!=="1"&&a!=="on"&&a!=="true"&&c.length>0,f;return u&&d?n==="undOvr"?f=`<munderover><mo>${De(s)}</mo><mrow>${l}</mrow><mrow>${c}</mrow></munderover>`:f=`<msubsup><mo>${De(s)}</mo><mrow>${l}</mrow><mrow>${c}</mrow></msubsup>`:u?n==="undOvr"?f=`<munder><mo>${De(s)}</mo><mrow>${l}</mrow></munder>`:f=`<msub><mo>${De(s)}</mo><mrow>${l}</mrow></msub>`:d?n==="undOvr"?f=`<mover><mo>${De(s)}</mo><mrow>${c}</mrow></mover>`:f=`<msup><mo>${De(s)}</mo><mrow>${c}</mrow></msup>`:f=`<mo>${De(s)}</mo>`,`<mrow>${f}<mrow>${p}</mrow></mrow>`}function d$(e,t){let r=X(e,"m:dPr"),o=Re(X(r,"m:begChr")),n=Re(X(r,"m:endChr")),i=Re(X(r,"m:sepChr")),a=o.length>0?o:"(",s=n.length>0?n:")",l=i.length>0?i:"",c=r$[a]||a,p=n$[s]||s,u=Qt(e["m:e"]),d=[];for(let h=0;h<u.length;h++)h>0&&l.length>0&&d.push(`<mo>${De(l)}</mo>`),d.push(`<mrow>${t(u[h])}</mrow>`);let f=a?`<mo>${De(c)}</mo>`:"<mo></mo>",m=s?`<mo>${De(p)}</mo>`:"<mo></mo>";return `<mrow>${f}${d.join("")}${m}</mrow>`}function f$(e,t){let r=Qt(e["m:mr"]),o=[];for(let n of r){let i=Qt(n["m:e"]),a=[];for(let s of i)a.push(`<mtd><mrow>${t(s)}</mrow></mtd>`);o.push(`<mtr>${a.join("")}</mtr>`);}return `<mrow><mo>[</mo><mtable>${o.join("")}</mtable><mo>]</mo></mrow>`}function m$(e,t){let r=X(e,"m:accPr"),o=Re(X(r,"m:chr")),n=t(X(e,"m:e")),i=o.length>0?e$[o]||o:"\u0302";return `<mover accent="true"><mrow>${n}</mrow><mo>${De(i)}</mo></mover>`}function h$(e,t){let r=X(e,"m:barPr"),o=Re(X(r,"m:pos")),n=t(X(e,"m:e"));return o==="bot"?`<munder><mrow>${n}</mrow><mo>\xAF</mo></munder>`:`<mover><mrow>${n}</mrow><mo>\xAF</mo></mover>`}function g$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:lim"));return `<munder><mrow>${r}</mrow><mrow>${o}</mrow></munder>`}function x$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:lim"));return `<mover><mrow>${r}</mrow><mrow>${o}</mrow></mover>`}function y$(e,t){let r=X(e,"m:groupChrPr"),o=Re(X(r,"m:chr")),n=Re(X(r,"m:pos")),i=t(X(e,"m:e")),a=o.length>0?o:"\u23DF";return n==="top"?`<mover><mrow>${i}</mrow><mo>${De(a)}</mo></mover>`:`<munder><mrow>${i}</mrow><mo>${De(a)}</mo></munder>`}function v$(e,t){let r=Qt(e["m:e"]),o=[];for(let n of r)o.push(`<mtr><mtd><mrow>${t(n)}</mrow></mtd></mtr>`);return `<mtable columnalign="left">${o.join("")}</mtable>`}function Nm(e,t){return `<mrow>${t(X(e,"m:e"))}</mrow>`}function b$(e,t){let r=t(X(e,"m:fName")),o=t(X(e,"m:e"));return `<mrow>${r}<mo>⁡</mo><mrow>${o}</mrow></mrow>`}function be(e){if(!e||typeof e!="object")return "";let t=[];for(let r of Object.keys(e)){if(r.startsWith("@_"))continue;let o=q$1(r);if(o==="m:oMathPara")continue;let n=Qt(e[r]);for(let i of n){let a=S$(o,i);a&&t.push(a);}}return t.join("")}function S$(e,t){switch(e){case "m:r":return o$(t);case "m:f":return i$(t,be);case "m:rad":return a$(t,be);case "m:sSup":return s$(t,be);case "m:sSub":return l$(t,be);case "m:sSubSup":return c$(t,be);case "m:sPre":return p$(t,be);case "m:nary":return u$(t,be);case "m:d":return d$(t,be);case "m:m":return f$(t,be);case "m:acc":return m$(t,be);case "m:bar":return h$(t,be);case "m:limLow":return g$(t,be);case "m:limUpp":return x$(t,be);case "m:groupChr":return y$(t,be);case "m:eqArr":return v$(t,be);case "m:box":return Nm(t,be);case "m:borderBox":return Nm(t,be);case "m:func":return b$(t,be);case "m:oMath":return `<mrow>${be(t)}</mrow>`;default:return ""}}function w$(e){if(e["m:oMath"])return Qt(e["m:oMath"]);let t=e["m:oMathPara"];if(t){let o=Array.isArray(t)?t[0]:t;if(o["m:oMath"])return Qt(o["m:oMath"])}let r=new Set(["m:r","m:f","m:rad","m:sSup","m:sSub","m:box"]);return Object.keys(e).some(o=>r.has(q$1(o)))?[e]:[]}function ig(e){if(!e||typeof e!="object")return "";let t=w$(e);if(t.length===0)return "";let o=t.map(l=>be(l)).join("");if(o.length===0)return "";let n=Ds(e),i=n?` mathcolor="${n}"`:"",a=Rs(e),s=a?` mathsize="${a}pt"`:"";return `<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"${i}${s}>${o}</math>`}var zs={"\\alpha":"\u03B1","\\beta":"\u03B2","\\gamma":"\u03B3","\\delta":"\u03B4","\\epsilon":"\u03B5","\\varepsilon":"\u03B5","\\zeta":"\u03B6","\\eta":"\u03B7","\\theta":"\u03B8","\\vartheta":"\u03D1","\\iota":"\u03B9","\\kappa":"\u03BA","\\lambda":"\u03BB","\\mu":"\u03BC","\\nu":"\u03BD","\\xi":"\u03BE","\\pi":"\u03C0","\\rho":"\u03C1","\\sigma":"\u03C3","\\tau":"\u03C4","\\upsilon":"\u03C5","\\phi":"\u03C6","\\varphi":"\u03D5","\\chi":"\u03C7","\\psi":"\u03C8","\\omega":"\u03C9","\\Gamma":"\u0393","\\Delta":"\u0394","\\Theta":"\u0398","\\Lambda":"\u039B","\\Xi":"\u039E","\\Pi":"\u03A0","\\Sigma":"\u03A3","\\Phi":"\u03A6","\\Psi":"\u03A8","\\Omega":"\u03A9"},Fs={"\\times":"\xD7","\\div":"\xF7","\\pm":"\xB1","\\mp":"\u2213","\\cdot":"\xB7","\\leq":"\u2264","\\geq":"\u2265","\\neq":"\u2260","\\approx":"\u2248","\\equiv":"\u2261","\\ll":"\u226A","\\gg":"\u226B","\\subset":"\u2282","\\supset":"\u2283","\\subseteq":"\u2286","\\supseteq":"\u2287","\\in":"\u2208","\\notin":"\u2209","\\cup":"\u222A","\\cap":"\u2229","\\to":"\u2192","\\rightarrow":"\u2192","\\leftarrow":"\u2190","\\Rightarrow":"\u21D2","\\Leftarrow":"\u21D0","\\infty":"\u221E","\\partial":"\u2202","\\nabla":"\u2207","\\forall":"\u2200","\\exists":"\u2203","\\ldots":"\u2026","\\cdots":"\u22EF","\\le":"\u2264","\\ge":"\u2265","\\ne":"\u2260"},Ns={"\\sum":"\u2211","\\prod":"\u220F","\\int":"\u222B","\\iint":"\u222C","\\iiint":"\u222D","\\oint":"\u222E","\\coprod":"\u2210","\\bigcup":"\u22C3","\\bigcap":"\u22C2"},$$=new Set(["sin","cos","tan","cot","sec","csc","arcsin","arccos","arctan","sinh","cosh","tanh","coth","log","ln","exp","lim","min","max","sup","inf","det","dim","mod","gcd","deg","hom","ker"]),Bm=/[a-zA-Z]/u,k$=/\s/u;function M$(e){let t=[],r=0;for(;r<e.length;){let o=e[r];if(o==="{")t.push({type:"group_start",value:"{"}),r++;else if(o==="}")t.push({type:"group_end",value:"}"}),r++;else if(o==="^")t.push({type:"superscript",value:"^"}),r++;else if(o==="_")t.push({type:"subscript",value:"_"}),r++;else if(o==="\\"){let n="\\";if(r++,r<e.length&&Bm.test(e[r]))for(;r<e.length&&Bm.test(e[r]);)n+=e[r],r++;else r<e.length&&(n+=e[r],r++);t.push({type:"command",value:n});}else k$.test(o)?(r++,t.push({type:"whitespace",value:" "})):(t.push({type:"text",value:o}),r++);}return t}function T$(e){let t=new Set,r="";for(let o of e){if(o!==r&&t.has(o))return false;t.add(o),r=o;}return true}function ag(e){let t=[];for(let o of e)for(let n of Object.keys(o))o[n]!==void 0&&t.push([n,o[n]]);if(!T$(t.map(([o])=>o))){let o=new Map;for(let[i]of t)o.set(i,(o.get(i)??0)+1);let n={};for(let[i,[a,s]]of t.entries())n[(o.get(a)??0)>1?p(a,i):a]=s;return n}let r={};for(let[o,n]of t)if(r[o]){let i=r[o];Array.isArray(i)?i.push(n):r[o]=[i,n];}else r[o]=n;return r}function Ct(e,t){let r=false,o=false,n=[],i=[];for(let a=0;a<2;a++){let s=e.peek();s?.type==="superscript"&&!r?(e.next(),n=e.parseSingleOrGroup(),r=true):s?.type==="subscript"&&!o&&(e.next(),i=e.parseSingleOrGroup(),o=true);}return r&&o?{"m:sSubSup":{"m:e":e.wrapE([t]),"m:sub":e.wrapE(i),"m:sup":e.wrapE(n)}}:r?{"m:sSup":{"m:e":e.wrapE([t]),"m:sup":e.wrapE(n)}}:o?{"m:sSub":{"m:e":e.wrapE([t]),"m:sub":e.wrapE(i)}}:t}function I$(e,t){let r=[],o=[],n=false,i=false;for(let l=0;l<2;l++){let c=e.peek();c?.type==="subscript"&&!n?(e.next(),r=e.parseSingleOrGroup(),n=true):c?.type==="superscript"&&!i&&(e.next(),o=e.parseSingleOrGroup(),i=true);}let a=e.parseSingleOrGroup(),s={"m:chr":{"@_val":t}};return n||(s["m:subHide"]={"@_val":"1"}),i||(s["m:supHide"]={"@_val":"1"}),{"m:nary":{"m:naryPr":s,"m:sub":n?e.wrapE(r):{},"m:sup":i?e.wrapE(o):{},"m:e":e.wrapE(a)}}}function _$(e){let t=e.next(),r=t?.value==="."?"":t?.value??"(",o=[];for(;e.peek();){if(e.peek().type==="command"&&e.peek().value==="\\right"){e.next();break}let s=e.parseAtom();s&&o.push(s);}let n=e.next(),i=n?.value==="."?"":n?.value??")",a={};return r!=="("&&(a["m:begChr"]={"@_val":r}),i!==")"&&(a["m:endChr"]={"@_val":i}),{"m:d":{"m:dPr":Object.keys(a).length>0?a:void 0,"m:e":e.wrapE(o)}}}function C$(e,t){let r=e.makeRun(t,true),o=Ct(e,r),n=[];if(e.peek()?.type==="group_start")n=e.parseGroup();else if(e.peek()&&e.peek().type!=="group_end"){let i=e.parseAtom();i&&(n=[i]);}return n.length===0?o:{"m:func":{"m:fName":e.wrapE([o]),"m:e":e.wrapE(n)}}}var A$=class{tokens;pos=0;constructor(e){this.tokens=e;}peek(){return this.tokens[this.pos]}next(){return this.tokens[this.pos++]}expect(e){let t=this.next();if(!t||t.type!==e)throw new Error(`Expected ${e}, got ${t?.type??"EOF"}`);return t}parseGroup(){this.expect("group_start");let e=[];for(;this.peek()&&this.peek().type!=="group_end";){let t=this.parseAtom();t&&e.push(t);}return this.expect("group_end"),e}parseSingleOrGroup(){if(this.peek()?.type==="group_start")return this.parseGroup();let e=this.parseAtom();return e?[e]:[]}wrapE(e){return e.length===1?e[0]:ag(e)}makeRun(e,t=false){let r={"m:t":e};return t&&(r["m:rPr"]={"m:nor":{"@_val":"1"}}),{"m:r":r}}parseAtom(){let e=this.peek();if(!e)return null;if(e.type==="whitespace")return this.next(),this.parseAtom();if(e.type==="text"){this.next();let t=this.makeRun(e.value);return Ct(this,t)}if(e.type==="group_start"){let t=this.parseGroup();if(t.length===0)return null;let r=t.length===1?t[0]:this.wrapE(t);return Ct(this,r)}if(e.type==="command"){this.next();let t=e.value;if(zs[t]){let n=this.makeRun(zs[t]);return Ct(this,n)}if(Fs[t])return this.makeRun(Fs[t]);if(Ns[t])return I$(this,Ns[t]);if(t==="\\frac"){let n=this.parseGroup(),i=this.parseGroup(),a={"m:f":{"m:num":this.wrapE(n),"m:den":this.wrapE(i)}};return Ct(this,a)}if(t==="\\sqrt"){if(this.peek()?.type==="text"&&this.peek()?.value==="["){this.next();let a="";for(;this.peek()&&!(this.peek().type==="text"&&this.peek().value==="]");)a+=this.next().value;this.peek()?.value==="]"&&this.next();let s=this.parseGroup(),l={"m:rad":{"m:deg":this.wrapE([this.makeRun(a)]),"m:e":this.wrapE(s)}};return Ct(this,l)}let n=this.parseGroup(),i={"m:rad":{"m:radPr":{"m:degHide":{"@_val":"1"}},"m:e":this.wrapE(n)}};return Ct(this,i)}if(t==="\\text"){let i=this.parseGroup().map(a=>{let s=a["m:r"];return s?String(s["m:t"]??""):""}).join("");return this.makeRun(i,true)}if(t==="\\left")return _$(this);if(t==="\\right")return null;let r=t.slice(1);if($$.has(r))return C$(this,r);let o=this.makeRun(t.slice(1),true);return Ct(this,o)}if(e.type==="superscript"||e.type==="subscript"){this.next();let t=this.parseSingleOrGroup(),r=this.makeRun("");return e.type==="superscript"?{"m:sSup":{"m:e":this.wrapE([r]),"m:sup":this.wrapE(t)}}:{"m:sSub":{"m:e":this.wrapE([r]),"m:sub":this.wrapE(t)}}}return null}parseAll(){let e=[];for(;this.peek();){let t=this.parseAtom();t&&e.push(t);}return e}};function oF(e){let t=e.trim();if(t.length===0)return {};let r=M$(t),n=new A$(r).parseAll();return n.length===0?{}:{"m:oMathPara":{"m:oMath":ag(n)}}}var Bs={};for(let[e,t]of Object.entries(zs))Bs[t]=e;var Ro={};for(let[e,t]of Object.entries(Fs))Ro[t]||(Ro[t]=e);var Us={};for(let[e,t]of Object.entries(Ns))Us[t]||(Us[t]=e);function sg(e){return e==null?[]:Array.isArray(e)?e:typeof e=="object"?[e]:[]}function se(e,t){if(!e)return {};let r=e[t];return r&&typeof r=="object"&&!Array.isArray(r)?r:{}}function Zt(e){if(!e)return "";let t=e["@_val"];return typeof t=="string"?t:t!==void 0?String(t):""}function Se(e){if(!e||typeof e!="object")return "";let t=[];for(let r of Object.keys(e)){if(r.startsWith("@_"))continue;let o=q$1(r),n=sg(e[r]);for(let i of n){let a=P$(o,i);a&&t.push(a);}}return t.join("")}function P$(e,t){switch(e){case "m:r":{let r="";if(typeof t["m:t"]=="string"?r=t["m:t"]:t["m:t"]!==void 0&&(r=String(t["m:t"])),r.length===0)return "";if(Bs[r])return `${Bs[r]} `;if(Ro[r])return `${Ro[r]} `;let o=se(t,"m:rPr"),n=Zt(se(o,"m:nor"));return n==="1"||n==="on"||n==="true"?`\\text{${r}}`:r}case "m:f":{let r=Se(se(t,"m:num")),o=Se(se(t,"m:den"));return `\\frac{${r}}{${o}}`}case "m:rad":{let r=se(t,"m:radPr"),o=Zt(se(r,"m:degHide")),n=Se(se(t,"m:e"));if(o==="1"||o==="on"||o==="true")return `\\sqrt{${n}}`;let i=Se(se(t,"m:deg"));return i?`\\sqrt[${i}]{${n}}`:`\\sqrt{${n}}`}case "m:sSup":{let r=Se(se(t,"m:e")),o=Se(se(t,"m:sup"));return `${r}^{${o}}`}case "m:sSub":{let r=Se(se(t,"m:e")),o=Se(se(t,"m:sub"));return `${r}_{${o}}`}case "m:sSubSup":{let r=Se(se(t,"m:e")),o=Se(se(t,"m:sub")),n=Se(se(t,"m:sup"));return `${r}_{${o}}^{${n}}`}case "m:nary":{let r=se(t,"m:naryPr"),o=Zt(se(r,"m:chr")),n=Us[o]??"\\int",i=Zt(se(r,"m:subHide")),a=Zt(se(r,"m:supHide")),s=Se(se(t,"m:sub")),l=Se(se(t,"m:sup")),c=Se(se(t,"m:e")),p=n;return s&&i!=="1"&&(p+=`_{${s}}`),l&&a!=="1"&&(p+=`^{${l}}`),p+=`{${c}}`,p}case "m:d":{let r=se(t,"m:dPr"),o=Zt(se(r,"m:begChr"))||"(",n=Zt(se(r,"m:endChr"))||")",i=Se(se(t,"m:e"));return `\\left${o}${i}\\right${n}`}case "m:func":{let r=Se(se(t,"m:fName")),o=Se(se(t,"m:e"));return `${r}{${o}}`}case "m:box":case "m:borderBox":return sg(t["m:e"]).map(r=>Se(r)).join("");case "m:oMath":return Se(t);default:return ""}}function iF(e){if(!e||typeof e!="object")return "";let t,r=e["m:oMathPara"];return r?.["m:oMath"]?t=r["m:oMath"]:e["m:oMath"]?t=e["m:oMath"]:t=e,Se(t)}var aF=[{label:"Fraction",latex:"\\frac{a}{b}",i18nKey:"pptx.equation.template.fraction"},{label:"Quadratic",latex:"x=\\frac{-b\\pm\\sqrt{b^{2}-4ac}}{2a}",i18nKey:"pptx.equation.template.quadratic"},{label:"Pythagorean",latex:"a^{2}+b^{2}=c^{2}",i18nKey:"pptx.equation.template.pythagorean"},{label:"Sum",latex:"\\sum_{i=1}^{n}{a_{i}}",i18nKey:"pptx.equation.template.sum"},{label:"Integral",latex:"\\int_{a}^{b}{f(x)}dx",i18nKey:"pptx.equation.template.integral"},{label:"Square Root",latex:"\\sqrt{x^{2}+y^{2}}",i18nKey:"pptx.equation.template.squareRoot"},{label:"Limit",latex:"\\lim_{x\\to\\infty}{f(x)}",i18nKey:"pptx.equation.template.limit"},{label:"Euler's",latex:"e^{i\\pi}+1=0",i18nKey:"pptx.equation.template.euler"},{label:"Matrix 2x2",latex:"\\left[a,b;c,d\\right]",i18nKey:"pptx.equation.template.matrix"},{label:"Binomial",latex:"\\left(a+b\\right)^{n}",i18nKey:"pptx.equation.template.binomial"},{label:"Derivative",latex:"\\frac{dy}{dx}",i18nKey:"pptx.equation.template.derivative"},{label:"Trig Identity",latex:"\\sin^{2}\\theta+\\cos^{2}\\theta=1",i18nKey:"pptx.equation.template.trigIdentity"}],E$="#4472C4",O$="#ED7D31",L$="#A5A5A5",D$="#FFC000",R$="#5B9BD5",z$="#70AD47",Ye=[E$,O$,L$,D$,R$,z$],F$=["#3b82f6","#22c55e","#f97316","#eab308","#a855f7","#ec4899","#14b8a6","#f43f5e"];function lg(e){let t=e.replace("#","");return [parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}function cg(e,t,r){let o=n=>Math.max(0,Math.min(255,Math.round(n)));return `#${o(e).toString(16).padStart(2,"0")}${o(t).toString(16).padStart(2,"0")}${o(r).toString(16).padStart(2,"0")}`}function Xt(e,t){let[r,o,n]=lg(e);return cg(r+(255-r)*t,o+(255-o)*t,n+(255-n)*t)}function br(e,t){let[r,o,n]=lg(e);return cg(r*(1-t),o*(1-t),n*(1-t))}function ol(e){let t=[];for(let r=0;r<8;r++)t.push(Ye[(r+e)%Ye.length]);return t}function N$(e){return [br(e,.5),br(e,.35),br(e,.15),e,Xt(e,.2),Xt(e,.4),Xt(e,.6),Xt(e,.8)]}function B$(e,t){return Ye.map((r,o)=>{let n=(o+e)%Ye.length;return t>0?Xt(Ye[n],t):br(Ye[n],-t)}).concat([Xt(Ye[e%Ye.length],.4),br(Ye[(e+1)%Ye.length],.2)])}function U$(e,t){return ol(e).map(r=>br(r,t))}function Um(e,t){return ol(e).map(r=>Xt(r,t))}function j$(e){let t=Math.max(1,Math.min(48,e));if(t<=8)return ol(t-1);if(t<=16){let o=(t-9)%Ye.length;return N$(Ye[o])}if(t<=24){let o=t-17,n=o<4?o*.1:-(o-4)*.1;return B$(o,n)}if(t<=32){let o=t-25;return U$(o,.25+o%4*.1)}if(t<=40){let o=t-33;return Um(o,.15+o%4*.08)}let r=t-41;return Um(r,.4+r%4*.1)}var jm=new Map;function pg(e){if(e===void 0||e<1||e>48)return F$;let t=jm.get(e);return t||(t=j$(e),jm.set(e,t)),t}function W$(e){let t=e.flatMap(s=>s.values);if(t.length===0)return {min:0,max:1,span:1};let r=Math.min(...t),o=Math.max(...t),n=Math.min(r,0),i=Math.max(o,0),a=Math.max(i-n,1);return {min:n,max:i,span:a}}var Wm=1e-12;function H$(e,t){let r=e.flatMap(c=>c.values).filter(c=>c>0);if(r.length===0)return {min:1,max:t,span:1,logScale:true,logBase:t};let o=Math.min(...r),n=Math.max(...r),i=Math.floor(Math.log(o)/Math.log(t)),a=Math.ceil(Math.log(n)/Math.log(t)),s=t**i,l=t**Math.max(a,i+1);return {min:s,max:l,span:Math.max(Math.log(l)/Math.log(t)-Math.log(s)/Math.log(t),1),logScale:true,logBase:t}}function zo(e,t){let r=t?.logBase??10,o=t?.logScale&&Number.isFinite(r)&&r>1?r:t?.logScale?10:void 0,n=o?H$(e,o):W$(e),i=typeof t?.min=="number"&&Number.isFinite(t.min)&&(!o||t.min>0)?t.min:void 0,a=typeof t?.max=="number"&&Number.isFinite(t.max)&&(!o||t.max>0)?t.max:void 0,s=i??n.min,l=a??n.max;l<=s&&(l=o?s*o:s+1);let c=o?Math.log(l)/Math.log(o)-Math.log(s)/Math.log(o):l-s;return {min:s,max:l,span:Math.max(c,Number.EPSILON),...o?{logScale:true,logBase:o}:{},...t?.orientation==="maxMin"?{reverseOrder:true}:{}}}function Z$(e){if(!e.logScale||!e.logBase)return [];let t=e.logBase,r=Math.log(e.min)/Math.log(t),o=Math.log(e.max)/Math.log(t),n=Math.ceil(r-Wm),i=Math.floor(o+Wm);return i<n?e.min===e.max?[e.min]:[e.min,e.max]:Array.from({length:i-n+1},(a,s)=>t**(n+s))}function ug(e,t){if(!Number.isFinite(t)||t<=0||e.logScale)return [];let r=Math.max(1,Math.abs(e.min),Math.abs(e.max))*1e-12,o=Math.ceil((e.min-r)/t),n=Math.floor((e.max+r)/t),i=Math.min(Math.max(n-o+1,0),2e3);return Array.from({length:i},(a,s)=>(o+s)*t)}function dg(e,t,r){if(e.logScale&&e.logBase)return Z$(e);let o=ug(e,t?.majorUnit??0);return o.length>0?o:Array.from({length:r+1},(n,i)=>e.min+e.span/r*i)}function fg(e,t){let r=ug(e,t?.minorUnit??0);if(r.length===0)return [];let o=t?.majorUnit;if(!o||!Number.isFinite(o)||o<=0)return r;let n=Math.max(1,Math.abs(e.min),Math.abs(e.max))*1e-10;return r.filter(i=>Math.abs(i/o-Math.round(i/o))>n)}function G$(e,t){let r=t?.find(o=>o.axisType==="valAx"&&o.axPos==="l")??t?.find(o=>o.axisType==="valAx"&&o.axPos!=="r");return zo(e,r)}var Y$={hundreds:100,thousands:1e3,tenThousands:1e4,hundredThousands:1e5,millions:1e6,tenMillions:1e7,hundredMillions:1e8,billions:1e9,trillions:1e12},V$={hundreds:"Hundreds",thousands:"Thousands",tenThousands:"Ten Thousands",hundredThousands:"Hundred Thousands",millions:"Millions",tenMillions:"Ten Millions",hundredMillions:"Hundred Millions",billions:"Billions",trillions:"Trillions"};function X$(e,t){return e?e==="custom"&&t?t:Y$[e]??1:1}function mg(e,t){return typeof t=="string"?t:t===null?"":t?.text?t.text:!e||e==="custom"?"":V$[e]??""}function K$(e,t){if(!t?.displayUnits)return String(e);let r=X$(t.displayUnits,t.displayUnitsValue),o=e/r;return Number.isInteger(o)?String(o):o.toFixed(1)}function q$(e){return e?e.some(t=>t.axisType==="valAx"&&t.axPos==="r"):false}function J$(e){return e?e.some(t=>(t.axisType==="catAx"||t.axisType==="dateAx")&&t.axPos==="t"):false}function il(e){if(e)return e.find(t=>t.axisType==="valAx"&&t.axPos==="r")}function al(e,t,r){return {hasSecondaryValueAxis:q$(e),hasSecondaryCategoryAxis:J$(e),hasDataTable:!!t,dataTableRowCount:t?r:void 0}}function Q$(e){return il(e)?.axisId}function e5(e){return e?e.find(r=>r.axisType==="valAx"&&r.axPos==="l")?.axisId??e.find(r=>r.axisType==="valAx")?.axisId:void 0}function t5(e,t){if(!t)return false;let r=Q$(t);return r===void 0?false:e.axisId!==void 0?e.axisId===r:false}function hg(e,t){let r=[],o=[];for(let n=0;n<e.length;n++)t5(e[n],t)?o.push({series:e[n],index:n}):r.push({series:e[n],index:n});return {primary:r,secondary:o}}function gg(e){let t=e.replace("#","");return [parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}function xg(e,t,r){let o=n=>Math.max(0,Math.min(255,Math.round(n)));return `#${o(e).toString(16).padStart(2,"0")}${o(t).toString(16).padStart(2,"0")}${o(r).toString(16).padStart(2,"0")}`}function r5(e,t){let[r,o,n]=gg(e);return xg(r+(255-r)*t,o+(255-o)*t,n+(255-n)*t)}function bn(e,t){let[r,o,n]=gg(e);return xg(r*(1-t),o*(1-t),n*(1-t))}function sl(e,t){return e.dataPoints?.find(r=>r.idx===t)}function Kt(e,t,r){return sl(e,t)?.spPr?.fillColor??e.color??r}function ll(e,t,r){return sl(e,t)?.spPr?.fillColor??r}function n5(e,t){return sl(e,t)?.explosion??e.explosion??0}var o5=15,i5=20,a5=5,s5=22;function l5(e){let t=e?.rotX??o5,r=e?.rotY??i5,o=Math.min(Math.max((e?.depthPercent??100)/100,.4),2),n=Math.min(Math.max(13*o,a5),s5),i=t*Math.PI/180,a=r*Math.PI/180;return {dx:Math.sin(a)*n,dy:-Math.sin(i)*n,magnitude:n}}function c5(e,t){let{x:r,y:o,w:n,h:i,fill:a}=e,{dx:s,dy:l}=t,c={kind:"polygon",points:`${r},${o} ${r+n},${o} ${r+n+s},${o+l} ${r+s},${o+l}`,fill:r5(a,.22),stroke:"none",strokeWidth:0},p={kind:"polygon",points:`${r+n},${o} ${r+n},${o+i} ${r+n+s},${o+i+l} ${r+n+s},${o+l}`,fill:bn(a,.25),stroke:"none",strokeWidth:0};return [c,p]}function p5(e,t,r){let o=e.match(/[MLAZ][^MLAZ]*/gu);return o?o.map(n=>{let i=n[0],a=n.slice(1).trim().split(/[ ,]+/u).filter(s=>s.length>0).map(Number);if(i==="M"||i==="L"){let s=[];for(let l=0;l<a.length;l+=2)s.push(a[l]+t,a[l+1]+r);return `${i}${u5(s)}`}if(i==="A"){let s=a.slice(0,5),l=a[5]+t,c=a[6]+r;return `A${s.join(",")},${l},${c}`}return "Z"}).join(""):e}function u5(e){let t=[];for(let r=0;r<e.length;r+=2)t.push(`${e[r]},${e[r+1]}`);return t.join(" ")}function d5(e,t){let r=Math.max(t.magnitude,6);return e.map(o=>({kind:"path",d:p5(o.d,0,r),fill:bn(o.fill,.32),stroke:bn(o.fill,.4),strokeWidth:.5}))}function f5(e,t){let r=[];for(let o of e)if(o.kind==="polyline"){let n=o;r.push({...n,points:Hm(n.points,t.dx,t.dy),stroke:bn(n.stroke,.3),fill:"none",part:void 0});}else if(o.kind==="polygon"){let n=o;r.push({...n,points:Hm(n.points,t.dx,t.dy),fill:bn(n.fill==="none"?"#888888":n.fill,.3),part:void 0});}return r}function Hm(e,t,r){return e.trim().split(/\s+/u).map(o=>{let[n,i]=o.split(",").map(Number);return `${n+t},${i+r}`}).join(" ")}function m5(e,t,r){let o=l5(r),n=[];if(t==="bar3D")n=e.primitives.filter(a=>a.kind==="rect"&&a.part?.role==="dataPoint").flatMap(a=>c5(a,o));else if(t==="pie3D"){let i=e.primitives.filter(a=>a.kind==="path");n=d5(i,o);}else if(t==="line3D"||t==="area3D")n=f5(e.primitives,o);else return e;return n.length===0?e:{...e,primitives:[...n,...e.primitives]}}function js(e,t,r){return Math.min(Math.max(e,t),r)}function h5(e,t,r,o){if(e?.crosses==="max")return r.plotTop;if(e?.crosses==="min")return r.plotBottom;let n=e?.crossesAt??0;return e?.crossesAt!==void 0||e?.crosses==="autoZero"?Y(js(n,t.min,t.max),t,r.plotTop,r.plotBottom):o==="top"?r.plotTop:r.plotBottom}function Fo(e,t,r,o,n){if(e?.crosses==="max")return r.plotRight;if(e?.crosses==="min")return r.plotLeft;if(e?.crossesAt!==void 0){if(e.axisType==="dateAx"&&n?.length){let s=e.min??Math.min(...n),l=e.max??Math.max(...n),c=l===s?.5:(js(e.crossesAt,s,l)-s)/(l-s);return r.plotLeft+c*r.plotWidth}let i=js(e.crossesAt-1,0,Math.max(t-1,0)),a=t<=1?.5:i/(t-1);return r.plotLeft+a*r.plotWidth}return o==="right"?r.plotRight:r.plotLeft}var yg="#64748b";function Zm(e,t){if(!e||e==="solid")return;let r=Math.max(t,1);return e==="dot"||e==="sysDot"?`${r} ${r*2}`:e==="lgDash"?`${r*6} ${r*3}`:`${r*3} ${r*2}`}function $r(e,t=8){return {fontSize:e?.fontSize??t,fill:e?.fontColor??yg,...e?.fontBold!==void 0?{fontWeight:e.fontBold?"bold":"normal"}:{},...e?.fontFamily?{fontFamily:e.fontFamily}:{}}}function tr(e,t=yg,r=1){let o=e?.strokeWidth??r;return {stroke:e?.strokeColor??t,strokeWidth:o,...Zm(e?.strokeDashStyle,o)?{dashArray:Zm(e?.strokeDashStyle,o)}:{}}}function No(e,t,r,o,n,i){if(!r||r==="none")return;let a=o==="left"?1:-1,s=r==="cross"?-a*n:0,l=r==="out"?-a*n:a*n;return {kind:"line",x1:e+s,y1:t,x2:e+l,y2:t,...tr(i)}}function vg(e,t,r){return e?.spPr?{kind:"line",x1:t,y1:r.plotTop,x2:t,y2:r.plotBottom,...tr(e.spPr)}:void 0}function Bo(e,t,r,o,n,i,a){let s=tr(r,o,n);return {kind:"line",x1:t.plotLeft,y1:e,x2:t.plotRight,y2:e,...s,...(r?s.dashArray:i)?{dashArray:r?s.dashArray:i}:{},...a!==void 0?{opacity:a}:{}}}var Gm="#e2e8f0",Ym="#e2e8f0",bg=5,Sg=4,wg=2.5;function $g(e,t,r,o){return !t||t==="nextTo"?r==="left"?{x:o-4,textAnchor:"end"}:{x:o+4,textAnchor:"start"}:(t==="high"?"right":t==="low"?"left":r)==="left"?{x:e.plotLeft-4,textAnchor:"end"}:{x:e.plotRight+4,textAnchor:"start"}}function kg(e,t){return t?.displayUnits?K$(e,t):le(e)}function cl(e,t,r,o=t.plotLeft){let n=[],i=[],a=dg(e,r,bg),s=fg(e,r),l=vg(r,o,t);if(l&&n.push(l),r?.minorGridlines)for(let c of s){let p=Y(c,e,t.plotTop,t.plotBottom);n.push(Bo(p,t,r.minorGridlinesSpPr,Gm,.5,"1 2",.5));}for(let c of s){let p=Y(c,e,t.plotTop,t.plotBottom),u=No(o,p,r?.minorTickMark,"left",wg,r?.spPr);u&&n.push(u);}for(let c of a){let p=Y(c,e,t.plotTop,t.plotBottom);n.push(Bo(p,t,r?.majorGridlinesSpPr,Gm,1,void 0,void 0));let u=No(o,p,r?.majorTickMark,"left",Sg,r?.spPr);u&&n.push(u),r?.tickLblPos!=="none"&&i.push({kind:"text",...$g(t,r?.tickLblPos,"left",o),y:p,text:kg(c,r),...$r(r),dominantBaseline:"central"});}if(r?.displayUnits){let c=mg(r.displayUnits,r.displayUnitsLabel);if(c){let p=t.plotLeft-36,u=(t.plotTop+t.plotBottom)/2;i.push({kind:"text",x:p,y:u,text:c,...$r(r,9),textAnchor:"middle",transform:`rotate(-90, ${p}, ${u})`});}}return {gridlines:n,axisLabels:i}}function pl(e,t,r,o=t.plotRight){let n=[],i=[],a=$r(r),s=$r(r,9),l=vg(r,o,t);l&&n.push(l);let c=dg(e,r,bg-1),p=fg(e,r);if(r?.minorGridlines)for(let u of p){let d=Y(u,e,t.plotTop,t.plotBottom);n.push(Bo(d,t,r.minorGridlinesSpPr,Ym,.5,"1 2",.35));}for(let u of p){let d=Y(u,e,t.plotTop,t.plotBottom),f=No(o,d,r?.minorTickMark,"right",wg,r?.spPr);f&&n.push(f);}for(let u of c){let d=Y(u,e,t.plotTop,t.plotBottom);n.push(Bo(d,t,r?.majorGridlinesSpPr,Ym,.5,"2 3",.5));let f=No(o,d,r?.majorTickMark,"right",Sg,r?.spPr);f&&n.push(f),r?.tickLblPos!=="none"&&i.push({kind:"text",...$g(t,r?.tickLblPos,"right",o),y:d,text:kg(u,r),...a,dominantBaseline:"central"});}if(r?.titleText){let u=t.plotRight+36,d=(t.plotTop+t.plotBottom)/2;i.push({kind:"text",x:u,y:d,text:r.titleText,...s,textAnchor:"middle",transform:`rotate(-90, ${u}, ${d})`});}if(r?.displayUnits){let u=mg(r.displayUnits,r.displayUnitsLabel);if(u){let d=t.plotRight+(r.titleText?52:36),f=(t.plotTop+t.plotBottom)/2;i.push({kind:"text",x:d,y:f,text:u,...s,textAnchor:"middle",transform:`rotate(-90, ${d}, ${f})`});}}return {gridlines:n,axisLabels:i}}function g5(e){return !!(e.dataTable||e.axes?.some(t=>t.crosses!==void 0||t.crossesAt!==void 0||t.crossBetween!==void 0||t.axisType==="valAx"&&!!(t.logScale||t.displayUnits||t.axPos==="r"||t.orientation==="maxMin"||t.majorUnit!==void 0||t.minorUnit!==void 0||t.minorGridlines||t.majorTickMark!==void 0||t.minorTickMark!==void 0||t.tickLblPos!==void 0)))}function x5(e,t,r,o,n){if(!g5(e)){let{gridlines:u,axisLabels:d}=Tr(r,t);return {gridlines:u,axisLabels:d,secondaryGridlines:void 0,secondaryAxisLabels:void 0}}let i=e.axes?.find(u=>u.axisType==="valAx"&&u.axPos!=="r")??e.axes?.find(u=>u.axisType==="valAx"),a=u=>e.axes?.find(d=>(d.axisType==="catAx"||d.axisType==="dateAx")&&d.axisId===u),s=(u,d)=>Fo(a(u),n,t,d,e.dateCategories?.values),l=cl(r,t,i,s(i?.crossAxisId,"left"));if(!o)return {...l,secondaryGridlines:void 0,secondaryAxisLabels:void 0};let c=il(e.axes),p=pl(o,t,c,s(c?.crossAxisId,"right"));return {...l,secondaryGridlines:p.gridlines,secondaryAxisLabels:p.axisLabels}}function y5(e,t){return Array.from({length:t},(r,o)=>e.reduce((n,i)=>n+Math.abs(i.values[o]??0),0))}function v5(e){let t=/^#?([0-9a-f]{6})$/iu.exec(e.trim());if(!t)return e;let r=Number.parseInt(t[1],16),o=s=>Math.round(s+(255-s)*.5),n=o(r>>16&255),i=o(r>>8&255),a=o(r&255);return `#${(n<<16|i<<8|a).toString(16).padStart(6,"0").toUpperCase()}`}function us(e,t,r,o){return r>=0?o:e.dataPoints?.find(a=>a.idx===t)?.invertIfNegative??e.invertIfNegative??false?v5(o):o}function b5(e,t,r,o,n,i,a,s){let l=[],c=[],p=e.series,u=e.colorPalette,d=e.style?.hasDataLabels,f=e.varyColors===true&&p.length===1;if(a==="clustered"){let y=Math.max(p.length,1),v=r.plotWidth/Math.max(t,1),S=e.barGapWidth!==void 0?v/(y+Math.max(e.barGapWidth,0)/100):v*.7/y,$=e.barOverlap??0,w=S*(1-$/100),k=S+w*(y-1),I=(v-k)/2;for(let R=0;R<t;R++){let E=s[R]??R;for(let N=0;N<p.length;N++){let W=p[N].values[E]??0,Z=r.plotLeft+v*R+I+w*N,ne=i.has(N)&&n?n:o,re=Y(0,ne,r.plotTop,r.plotBottom),U=Y(W,ne,r.plotTop,r.plotBottom),V=Math.min(re,U),K=Math.max(Math.abs(re-U),1),j=f?ll(p[N],E,we(E,u)):Kt(p[N],E,we(N,u))??Fe(p[N],N,u);l.push({kind:"rect",x:Z,y:V,w:S,h:K,fill:us(p[N],E,W,j),rx:1,part:{role:"dataPoint",seriesIndex:N,pointIndex:E}}),d&&c.push({kind:"text",x:Z+S/2,y:W>=0?V-4:V+K+10,text:le(W),fontSize:7,fill:"#334155",textAnchor:"middle"});}}return {primitives:l,dataLabels:c}}if(a==="stacked"){let y=p.map(S=>({...S,values:s.map($=>S.values[$]??0)})),v=wM(y,t,r,o,u);for(let S of v){let $=S.fill,w;if(S.seriesIndex!==void 0&&S.pointIndex!==void 0){let k=s[S.pointIndex]??S.pointIndex;$=Kt(p[S.seriesIndex],k,S.fill)??S.fill;let I=p[S.seriesIndex].values[k]??0;$=us(p[S.seriesIndex],k,I,$),w={role:"dataPoint",seriesIndex:S.seriesIndex,pointIndex:k};}l.push({kind:"rect",x:S.x,y:S.y,w:S.w,h:S.h,fill:$,rx:1,part:w});}return d&&S5(p,s,t,r,o,c),{primitives:l,dataLabels:c}}let m=r.plotWidth/Math.max(t,1),h=m*.6,g=(m-h)/2,x=p.map(y=>({...y,values:s.map(v=>y.values[v]??0)})),b=y5(x,t);for(let y=0;y<t;y++){let v=0,S=0,$=b[y]||1;for(let w=0;w<p.length;w++){let k=s[y]??y,I=p[w].values[k]??0,R=$>0?I/$*100:0,E=R<0,N=E?S:v,W=N+R,Z=r.plotLeft+m*y+g,ne=Y(N,o,r.plotTop,r.plotBottom),re=Y(W,o,r.plotTop,r.plotBottom),U=Math.min(ne,re),V=Math.max(Math.abs(ne-re),.5),K=Kt(p[w],k,we(w,u))??Fe(p[w],w,u);l.push({kind:"rect",x:Z,y:U,w:h,h:V,fill:us(p[w],k,I,K),part:{role:"dataPoint",seriesIndex:w,pointIndex:k}}),d&&Math.abs(R)>0&&c.push({kind:"text",x:Z+h/2,y:U+V/2+3,text:`${Math.round(R)}%`,fontSize:7,fill:"#ffffff",textAnchor:"middle",fontWeight:"bold"}),E?S+=R:v+=R;}}return {primitives:l,dataLabels:c}}function S5(e,t,r,o,n,i){let a=o.plotWidth/r,s=Math.max(e.length,1),l=a*.7/s,c=(a-l*s)/2;for(let p=0;p<r;p++){let u=t[p]??p;for(let d=0;d<e.length;d++){let f=e[d].values[u]??0,m=o.plotLeft+a*p+c+l*d+l/2,h=Y(0,n,o.plotTop,o.plotBottom),g=Y(f,n,o.plotTop,o.plotBottom),x=f>=0?Math.min(h,g)-4:Math.max(h,g)+10;i.push({kind:"text",x:m,y:x,text:le(f),fontSize:7,fill:"#334155",textAnchor:"middle"});}}}function w5(e,t){let r=[...e];for(let o=0;o<r.length;o++){if(!t[o])continue;let n=o-1;for(;n>=0&&t[n];)n--;let i=o+1;for(;i<r.length&&t[i];)i++;let a=n>=0,s=i<r.length;if(a&&s){let l=(o-n)/(i-n);r[o]=e[n]+(e[i]-e[n])*l;}else a?r[o]=e[n]:s&&(r[o]=e[i]);}return r}function $5(e,t,r){let o=e.map(()=>true);return !t||!t.some(Boolean)||r===void 0||r==="zero"?{values:[...e],visible:o}:r==="span"?{values:w5(e,t),visible:o}:{values:[...e],visible:e.map((n,i)=>!t[i])}}function k5(e){let t=[],r=[];for(let o=0;o<e.length;o++)e[o]?r.push(o):r.length>0&&(t.push(r),r=[]);return r.length>0&&t.push(r),t}function M5(e){if(e.length===0)return "";if(e.length===1)return `M${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`;if(e.length===2)return `M${e[0].x.toFixed(2)},${e[0].y.toFixed(2)} L${e[1].x.toFixed(2)},${e[1].y.toFixed(2)}`;let t=`M${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`;for(let r=0;r<e.length-1;r++){let o=e[r-1]??e[r],n=e[r],i=e[r+1],a=e[r+2]??i,s=n.x+(i.x-o.x)/6,l=n.y+(i.y-o.y)/6,c=i.x-(a.x-n.x)/6,p=i.y-(a.y-n.y)/6;t+=` C${s.toFixed(2)},${l.toFixed(2)} ${c.toFixed(2)},${p.toFixed(2)} ${i.x.toFixed(2)},${i.y.toFixed(2)}`;}return t}function T5(e,t){return e===void 0||!Number.isFinite(e)||e<=0?t:e/2}function ds(e){return e.map(([t,r])=>`${t.toFixed(2)},${r.toFixed(2)}`).join(" ")}function I5(e,t,r){let o=r*.5,n=[];for(let i=0;i<10;i++){let a=i%2===0?r:o,s=-Math.PI/2+Math.PI*i/5;n.push([e+a*Math.cos(s),t+a*Math.sin(s)]);}return n}function _5(e){let{symbol:t,cx:r,cy:o,fill:n,part:i}=e;if(t==="none")return null;let a=T5(e.size,e.defaultRadius),s=n;switch(t){case "square":return {kind:"rect",x:r-a,y:o-a,w:a*2,h:a*2,fill:n,part:i};case "dash":return {kind:"rect",x:r-a,y:o-a*.32,w:a*2,h:a*.64,fill:n,part:i};case "diamond":return {kind:"polygon",points:ds([[r,o-a],[r+a,o],[r,o+a],[r-a,o]]),fill:n,stroke:s,strokeWidth:0,part:i};case "triangle":return {kind:"polygon",points:ds([[r,o-a],[r+a*.9,o+a*.75],[r-a*.9,o+a*.75]]),fill:n,stroke:s,strokeWidth:0,part:i};case "star":return {kind:"polygon",points:ds(I5(r,o,a)),fill:n,stroke:s,strokeWidth:0,part:i};case "plus":return {kind:"path",d:`M${(r-a).toFixed(2)},${o.toFixed(2)} L${(r+a).toFixed(2)},${o.toFixed(2)} M${r.toFixed(2)},${(o-a).toFixed(2)} L${r.toFixed(2)},${(o+a).toFixed(2)}`,fill:"none",stroke:s,strokeWidth:Math.max(1,a*.4),part:i};case "x":return {kind:"path",d:`M${(r-a).toFixed(2)},${(o-a).toFixed(2)} L${(r+a).toFixed(2)},${(o+a).toFixed(2)} M${(r+a).toFixed(2)},${(o-a).toFixed(2)} L${(r-a).toFixed(2)},${(o+a).toFixed(2)}`,fill:"none",stroke:s,strokeWidth:Math.max(1,a*.4),part:i};case "dot":return {kind:"circle",cx:r,cy:o,r:Math.max(a*.6,1),fill:n,part:i};default:return {kind:"circle",cx:r,cy:o,r:a,fill:n,part:i}}}function ul(e,t,r,o,n,i,a,s){let l=_5({symbol:t.marker?.symbol,size:t.marker?.size,cx:r,cy:o,fill:n,defaultRadius:i,part:a});l&&(s!==void 0&&(l.opacity=s),e.push(l));}function C5(e,t,r,o,n,i,a,s){let l=[],c=[],p=e.style?.hasDataLabels;for(let u=0;u<e.series.length;u++){let d=e.series[u];if(d.values.length===0)continue;let f=i.has(u)&&n?n:o,m=a.map($=>d.values[$]??0),h=a.map($=>d.blanks?.[$]??false),{values:g,visible:x}=$5(m,h,e.chartChrome?.dispBlanksAs),b=jg(g,t,r,f).map(($,w)=>({...$,x:s?.[w]??$.x})),y=Fe(d,u,e.colorPalette),v={role:"series",seriesIndex:u};if(x.every(Boolean))l.push(d.smooth?{kind:"path",d:M5(b),stroke:y,strokeWidth:2.4,fill:"none",part:v}:{kind:"polyline",points:Zs(b),stroke:y,strokeWidth:2.4,fill:"none",part:v});else for(let $ of k5(x))$.length<2||l.push({kind:"polyline",points:Zs($.map(w=>b[w])),stroke:y,strokeWidth:2.4,fill:"none",part:v});b.forEach(($,w)=>{if(!x[w])return;let k=a[w]??w,I={role:"dataPoint",seriesIndex:u,pointIndex:k};ul(l,d,$.x,$.y,Kt(d,k,y)??y,2.5,I);}),p&&g.forEach(($,w)=>{let k=b[w];!k||!x[w]||c.push({kind:"text",x:k.x,y:k.y-7,text:le($),fontSize:7,fill:"#334155",textAnchor:"middle"});});}return {primitives:l,dataLabels:c}}function A5(e,t,r,o,n,i){let a=[],s=[],l=e.style?.hasDataLabels,c=Y(0,o,r.plotTop,r.plotBottom);for(let p=0;p<e.series.length;p++){let u=e.series[p];if(u.values.length===0)continue;let d=n.map(b=>u.values[b]??0),f=jg(d,t,r,o).map((b,y)=>({...b,x:i?.[y]??b.x})),m=Fe(u,p,e.colorPalette),h=Zs(f),g=f[0],x=f[f.length-1];g&&x&&a.push({kind:"polyline",points:`${g.x.toFixed(2)},${c.toFixed(2)} ${h} ${x.x.toFixed(2)},${c.toFixed(2)}`,stroke:"none",strokeWidth:0,fill:m,opacity:.25,part:{role:"series",seriesIndex:p}}),a.push({kind:"polyline",points:h,stroke:m,strokeWidth:2,fill:"none",part:{role:"series",seriesIndex:p}}),f.forEach((b,y)=>{let v=n[y]??y,S={role:"dataPoint",seriesIndex:p,pointIndex:v};ul(a,u,b.x,b.y,Kt(u,v,m)??m,2,S);}),l&&d.forEach((b,y)=>{let v=f[y];v&&s.push({kind:"text",x:v.x,y:v.y-6,text:le(b),fontSize:7,fill:"#334155",textAnchor:"middle"});});}return {primitives:a,dataLabels:s}}function P5(e,t,r){let o=[],n=[],i=e.style?.hasDataLabels,a=e.series.flatMap(c=>c.values.map((p,u)=>u)),s=Math.max(1,...a),l=e.categories.map(Number);for(let c=0;c<e.series.length;c++){let p=e.series[c],u=Fe(p,c,e.colorPalette),d=Wg(p.values,s,t,r,l);d.forEach((f,m)=>{let h={role:"dataPoint",seriesIndex:c,pointIndex:m};ul(o,p,f.cx,f.cy,Kt(p,m,u)??u,4,h,.85);}),i&&p.values.forEach((f,m)=>{let h=d[m];h&&n.push({kind:"text",x:h.cx,y:h.cy-6,text:le(f),fontSize:7,fill:"#334155",textAnchor:"middle"});});}return {primitives:o,dataLabels:n}}function E5(e,t,r){let o=[],n=[],i=e.style?.hasDataLabels,a=e.series.flatMap(f=>f.values.map((m,h)=>h)),s=Math.max(1,...a),l=e.categories.map(Number),c=e.series.length>=3?e.series[2]:void 0,p=c?Math.max(1,...c.values.map(f=>Math.abs(f))):1,u=Math.min(t.plotWidth,t.plotHeight)*.04,d=e.series.slice(0,2);for(let f=0;f<d.length;f++){let m=d[f],h=Fe(m,f,e.colorPalette),g=Wg(m.values,s,t,r,l);g.forEach((x,b)=>{let y=MM(c?.values[b],p,u);o.push({kind:"circle",cx:x.cx,cy:x.cy,r:y,fill:Kt(m,b,h)??h,opacity:.6,part:{role:"dataPoint",seriesIndex:f,pointIndex:b}});}),i&&m.values.forEach((x,b)=>{let y=g[b];y&&n.push({kind:"text",x:y.cx,y:y.cy-10,text:le(x),fontSize:7,fill:"#334155",textAnchor:"middle"});});}return {primitives:o,dataLabels:n}}function dl(e,t,r,o){let n=o.xPositions?.[e];if(n!==void 0)return n;if(o.mode==="bar"){let a=r.plotWidth/Math.max(t,1);return r.plotLeft+a*e+a/2}let i=Math.max(t-1,1);return r.plotLeft+e/i*r.plotWidth}function Mg(e){if(!(!e||e==="solid"))return e==="dot"||e==="sysDot"?"1 2":"4 3"}function O5(e,t,r,o,n){let i=e.dropLines;if(!i)return [];let a=Y(r.min,r,t.plotTop,t.plotBottom),s=Mg(i.dashStyle),l=[];for(let c of e.series)c.values.forEach((p,u)=>{let d=dl(u,o,t,n);l.push({kind:"line",x1:d,y1:Y(p,r,t.plotTop,t.plotBottom),x2:d,y2:a,stroke:i.color??"#94a3b8",strokeWidth:i.width??.8,dashArray:s});});return l}function L5(e,t,r,o,n){let i=e.hiLowLines;if(!i||e.series.length<2)return [];let a=Mg(i.dashStyle),s=[];for(let l=0;l<o;l++){let c=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY;for(let d of e.series){let f=d.values[l];f!==void 0&&(c=Math.max(c,f),p=Math.min(p,f));}if(!Number.isFinite(c)||!Number.isFinite(p))continue;let u=dl(l,o,t,n);s.push({kind:"line",x1:u,y1:Y(c,r,t.plotTop,t.plotBottom),x2:u,y2:Y(p,r,t.plotTop,t.plotBottom),stroke:i.color??"#334155",strokeWidth:i.width??1,dashArray:a});}return s}function D5(e,t,r,o,n){let i=e.upDownBars;if(!i||e.series.length<2)return [];let a=e.series[0],s=e.series[e.series.length-1],l=t.plotWidth/Math.max(o,1),c=i.gapWidth??150,p=Math.max(l/(1+Math.max(c,0)/100),1),u=i.upBars?.fillColor??"#e2e8f0",d=i.downBars?.fillColor??"#334155",f=[];for(let m=0;m<o;m++){let h=a.values[m],g=s.values[m];if(h===void 0||g===void 0)continue;let x=Y(h,r,t.plotTop,t.plotBottom),b=Y(g,r,t.plotTop,t.plotBottom),y=dl(m,o,t,n)-p/2;f.push({kind:"rect",x:y,y:Math.min(x,b),w:p,h:Math.max(Math.abs(x-b),1),fill:g>=h?u:d});}return f}function Tg(e,t,r,o,n){return [...D5(e,t,r,o,n),...O5(e,t,r,o,n),...L5(e,t,r,o,n)]}function Sn(e,t,r,o){return o==="bar"?r.plotLeft+r.plotWidth/Math.max(t,1)*(e+.5):t>1?r.plotLeft+r.plotWidth/(t-1)*e:r.plotLeft+r.plotWidth/2}function R5(e){let t=[];return e.forEach((r,o)=>{let n=t[t.length-1];n?.text===r?n.end=o:t.push({text:r,start:o,end:o});}),t}function z5(e,t,r,o,n,i,a,s,l){let c=t?.length?t:[e],p=i?.noMultiLevelLabels?c.slice(0,1):c,u=Math.max(1,i?.tickLabelSkip??1),d=i?.labelAlignment==="l"?"start":i?.labelAlignment==="r"?"end":"middle",f=s?-1:1,m=Math.max(i?.fontSize??8,8)+4;return p.flatMap((h,g)=>{let x=r.map(b=>h[b]??"");return R5(x).flatMap(b=>{if(!b.text||b.start%u!==0)return [];let y=Sn(b.start,r.length,o,n),v=Sn(b.end,r.length,o,n);return [{kind:"text",x:(y+v)/2,y:a+f*(l+g*m),text:b.text,textAnchor:d,...$r(i)}]})})}function F5(e){let t=e?.filter(r=>r.axisType==="catAx"||r.axisType==="dateAx");return t?.find(r=>r.axPos!=="t")??t?.[0]}function Vm(e,t,r,o,n,i){if(!r||r==="none")return;let a=o?n:-n,s=-a,[l,c]=r==="cross"?[-n,n]:r==="in"?[0,a]:[0,s];return {kind:"line",x1:e,y1:t+l,x2:e,y2:t+c,...tr(i.spPr)}}function Xm(e,t,r,o,n){if(!e||e.deleted)return [];let i=[],a=e.axPos==="t",s=n??(a?r.plotTop:r.plotBottom);e.spPr&&i.push({kind:"line",x1:r.plotLeft,y1:s,x2:r.plotRight,y2:s,...tr(e.spPr)});let l=Math.max(1,e.tickMarkSkip??1);for(let c=0;c<t;c+=l){let p=Sn(c,t,r,o),u=Vm(p,s,e.majorTickMark,a,4,e);if(u&&i.push(u),e.minorTickMark!==void 0&&c+l<t){let d=Sn(c+l,t,r,o),f=Vm((p+d)/2,s,e.minorTickMark,a,2.5,e);f&&i.push(f);}}return i}function Km(e,t,r,o,n,i,a){let s=n??F5(o),l=e.map((g,x)=>x);if(s?.orientation==="maxMin"&&l.reverse(),s?.deleted||s?.tickLblPos==="none")return {axis:s,sourceIndices:l,labels:[],tickMarks:Xm(s,l.length,t,r,i)};let c=s?.axPos==="t",p=s?.tickLblPos==="high",u=s?.tickLblPos==="low",d=p||!u&&c,f=4+8*((s?.labelOffset??100)/100),m=p?t.plotTop:u?t.plotBottom:i??(c?t.plotTop:t.plotBottom),h=z5(e,a,l,t,r,s,m,d,f);return {axis:s,sourceIndices:l,labels:h,tickMarks:Xm(s,l.length,t,r,i)}}function N5(e,t){return t.every((r,o)=>r===o)?e:{...e,categories:t.map(r=>e.categories[r]??""),categoryLevels:e.categoryLevels?.map(r=>t.map(o=>r[o]??"")),series:e.series.map(r=>({...r,values:t.map(o=>r.values[o]??0),errBars:r.errBars?.map(o=>({...o,customPlus:o.customPlus?t.map(n=>o.customPlus?.[n]??0):void 0,customMinus:o.customMinus?t.map(n=>o.customMinus?.[n]??0):void 0}))}))}}var Ig=864e5;function Ao(e,t=false){let r=t?Date.UTC(1904,0,1):Date.UTC(1899,11,e<60?31:30);return new Date(r+e*Ig)}function B5(e){return e.axes?.find(t=>t.axisType==="dateAx"&&t.axPos!=="t")??e.axes?.find(t=>t.axisType==="dateAx")}function vo(e,t,r,o){let n=r===t?.5:(e-t)/(r-t);return o.plotLeft+n*o.plotWidth}function U5(e,t,r){let o=new Date(e);return r==="days"?o.setUTCDate(o.getUTCDate()+t):r==="months"?o.setUTCMonth(o.getUTCMonth()+t):o.setUTCFullYear(o.getUTCFullYear()+t),o}function j5(e,t,r){let o=e.toLocaleString("en-US",{month:"short",timeZone:"UTC"}),n=String(e.getUTCFullYear()),i=String(e.getUTCDate());return r?.toLowerCase().includes("yyyy")?r.toLowerCase().includes("d")?`${i} ${o} ${n}`:`${o} ${n}`:t==="years"?n:t==="months"?`${o} ${n}`:`${i} ${o}`}function qm(e,t,r,o){let n=o?r.minorTickMark:r.majorTickMark;if(!n||n==="none")return;let i=o?2.5:4,s=(r.axPos==="t"?1:-1)*i,l=-s,[c,p]=n==="cross"?[-i,i]:n==="in"?[0,s]:[0,l];return {kind:"line",x1:e,y1:t+c,x2:e,y2:t+p,...tr(r.spPr)}}function Jm(e,t,r,o,n){let i=[],a=Ao(e,r);for(let s=0;s<1e3&&a.getTime()<=Ao(t,r).getTime();s++)i.push(e+(a.getTime()-Ao(e,r).getTime())/Ig),a=U5(a,n,o);return i}function Qm(e,t,r,o){let n=e.dateCategories,i=r??B5(e);if(!n||!i||n.values.length===0)return;let a=n.values.map((w,k)=>({value:w,index:k})).sort((w,k)=>w.value-k.value),s=a[0]?.value??0,l=a[a.length-1]?.value??s,c=i.min??s,p=i.max??l,u=a.filter(({value:w})=>w>=c&&w<=p);i.orientation==="maxMin"&&u.reverse();let d=u.map(({index:w})=>w),f=u.map(({value:w})=>{let k=vo(w,c,p,t);return i.orientation==="maxMin"?t.plotLeft+t.plotWidth-(k-t.plotLeft):k}),m=i.majorTimeUnit??i.baseTimeUnit??"days",h=Jm(c,p,n.date1904??false,m,Math.max(1,i.majorUnit??1)),g=o??(i.axPos==="t"?t.plotTop:t.plotBottom),x=4+8*((i.labelOffset??100)/100),b=i.tickLblPos==="high"||i.tickLblPos!=="low"&&i.axPos==="t",y=i.tickLblPos==="high"?t.plotTop:i.tickLblPos==="low"?t.plotBottom:g,v=Math.max(1,i.tickLabelSkip??1),S=i.deleted||i.tickLblPos==="none"?[]:h.flatMap((w,k)=>{if(k%v!==0)return [];let I=vo(w,c,p,t);return i.orientation==="maxMin"&&(I=t.plotLeft+t.plotWidth-(I-t.plotLeft)),[{kind:"text",x:I,y:b?y-x:y+x,text:j5(Ao(w,n.date1904),m,i.numFmt?.formatCode??n.formatCode),...$r(i),textAnchor:"middle"}]}),$=i.deleted?[]:h.flatMap((w,k)=>{if(k%Math.max(1,i.tickMarkSkip??1)!==0)return [];let I=vo(w,c,p,t);i.orientation==="maxMin"&&(I=t.plotLeft+t.plotWidth-(I-t.plotLeft));let R=qm(I,g,i,false);return R?[R]:[]});if(!i.deleted&&i.spPr&&$.unshift({kind:"line",x1:t.plotLeft,y1:g,x2:t.plotRight,y2:g,...tr(i.spPr)}),!i.deleted&&i.minorTickMark&&i.minorTickMark!=="none"){let w=i.minorTimeUnit??i.baseTimeUnit??m;for(let k of Jm(c,p,n.date1904??false,w,Math.max(1,i.minorUnit??1))){let I=vo(k,c,p,t);i.orientation==="maxMin"&&(I=t.plotLeft+t.plotWidth-(I-t.plotLeft));let R=qm(I,g,i,true);R&&$.push(R);}}return {sourceIndices:d,xPositions:f,labels:S,tickMarks:$}}function fl(e,t,r,o,n,i){let a=o==="line"||o==="area"||o==="scatter"||o==="bubble"?"line":"bar",s=e.axes?.filter(b=>b.axisType==="catAx"||b.axisType==="dateAx"),l=s?.find(b=>b.axPos!=="t")??s?.[0],c=s?.find(b=>b.axPos==="t"&&b!==l),p=b=>e.axes?.find(y=>y.axisType==="valAx"&&y.axisId===b?.crossAxisId),u=p(l);u?.crossBetween==="between"?a="bar":u?.crossBetween==="midCat"&&(a="line");let d=b=>{let y=p(b),v=y?.axPos==="r"&&i?i:n;return h5(y,v,r,b?.axPos==="t"?"top":"bottom")},m=(o==="line"||o==="area"||o==="combo"||o==="stock")&&l?.axisType==="dateAx"?Qm(e,r,l,d(l)):void 0,h=o==="scatter"||o==="bubble"||m?void 0:Km(t,r,a,e.axes,l,d(l),e.categoryLevels),g=c?c.axisType==="dateAx"?Qm(e,r,c,d(c)):Km(t,r,p(c)?.crossBetween==="between"?"bar":"line",e.axes,c,d(c),e.categoryLevels):void 0,x=m?.sourceIndices??h?.sourceIndices??t.map((b,y)=>y);return {catAxisStyle:a,sourceIndices:x,xPositions:m?.xPositions??h?.sourceIndices.map((b,y)=>Sn(y,h.sourceIndices.length,r,a)),labels:[...m?.labels??h?.labels??Qo(t,r,a),...g?.labels??[]],tickMarks:[...m?.tickMarks??h?.tickMarks??[],...g?.tickMarks??[]],displayChartData:m||h?N5(e,x):e}}var _g="#334155",Uo=4;function W5(e,t,r,o){if(o==="bar"){let n=r.plotWidth/Math.max(t,1);return r.plotLeft+n*e+n/2}return r.plotLeft+e/Math.max(t-1,1)*r.plotWidth}function H5(e,t,r){if(!t||t.length===0)return r(e);let o=Math.floor(e),n=Math.ceil(e),i=a=>{if(t[a]!==void 0)return t[a];let s=t.length-1,l=t[s]??0,c=s>0?t[s-1]??t[0]??0:t[0]??0,p=l-c;return l+p*(a-t.length+1)};return i(o)+(i(n)-i(o))*(e-o)}function Z5(e,t,r){return r.plotLeft+(e-t.min)/Math.max(t.span,1e-9)*r.plotWidth}function G5(e,t,r){let o=t.seriesChartType??e.chartType;return o==="scatter"||o==="bubble"?{values:r.map(i=>{let a=Number(e.categories[i]);return Number.isFinite(a)?a:i}),numeric:true}:{values:r.map((i,a)=>a),numeric:false}}function Y5(e){let t=Math.min(...e),r=Math.max(...e);return {min:t,max:r,span:Math.max(r-t,1)}}function V5(e,t,r,o,n){switch(e.valType){case "fixedVal":return e.val??0;case "percentage":return Math.abs(t[r]??0)*((e.val??0)/100);case "stdDev":{let i=t.reduce((s,l)=>s+l,0)/Math.max(t.length,1),a=t.reduce((s,l)=>s+(l-i)**2,0)/Math.max(t.length,1);return Math.sqrt(a)*(e.val??1)}case "stdErr":{let i=Math.max(t.length,1),a=t.reduce((l,c)=>l+c,0)/i,s=t.reduce((l,c)=>l+(c-a)**2,0)/i;return Math.sqrt(s/i)}case "cust":return n==="plus"?e.customPlus?.[o]??0:e.customMinus?.[o]??0}}function jo(e,t,r,o,n){return {kind:"line",x1:e,y1:t,x2:r,y2:o,stroke:n,strokeWidth:1}}function X5(e,t,r,o,n,i,a,s){let l=t.color??_g,c=Y(o,a,s.plotTop,s.plotBottom),p=i==="plus"?o+n:o-n,u=Y(p,a,s.plotTop,s.plotBottom);e.push(jo(r,c,r,u,l)),t.noEndCap||e.push(jo(r-Uo,u,r+Uo,u,l));}function K5(e,t,r,o,n,i,a){let s=t.color??_g,l=a(r),c=n==="plus"?r+o:r-o,p=a(c);e.push(jo(l,i,p,i,s)),t.noEndCap||e.push(jo(p,i-Uo,p,i+Uo,s));}function Cg(e,t,r,o,n="line",i={}){let a=[];return e.series.forEach((s,l)=>{let c=i.sourceIndices??s.values.map((h,g)=>g),p=c.map(h=>s.values[h]??0),u=G5(e,s,c),d=u.numeric?Y5(u.values):void 0,f=i.seriesModes?.[l]??n,m=i.seriesRanges?.[l]??o;s.errBars?.forEach(h=>{c.forEach((g,x)=>{let b=p[x]??0,y=u.values[x]??x,v=k=>H5(k,i.xPositions,I=>W5(I,c.length||t,r,f)),S=u.numeric?k=>Z5(k,d,r):v,$=S(y),w=Y(b,m,r.plotTop,r.plotBottom);for(let k of ["plus","minus"]){if(h.barType!==k&&h.barType!=="both")continue;let I=h.direction==="x"?u.values:p,R=V5(h,I,x,g,k);h.direction==="x"?K5(a,h,y,R,k,w,S):X5(a,h,$,b,R,k,m,r);}});});}),a}function eh(e,t,r,o){if(o==="bar"){let i=r.plotWidth/Math.max(t,1);return r.plotLeft+i*e+i/2}let n=Math.max(t-1,1);return r.plotLeft+e/n*r.plotWidth}function bo(e,t){let r=e.length;if(r<2)return {slope:0,intercept:0,rSquared:0};let o=0,n=0,i=0,a=0;for(let m=0;m<r;m++)o+=e[m],n+=t[m],i+=e[m]*t[m],a+=e[m]*e[m];let s=r*a-o*o;if(Math.abs(s)<1e-12)return {slope:0,intercept:n/r,rSquared:0};let l=(r*i-o*n)/s,c=(n-l*o)/r,p=t.reduce((m,h,g)=>m+(h-(l*e[g]+c))**2,0),u=n/r,d=t.reduce((m,h)=>m+(h-u)**2,0),f=d>0?1-p/d:0;return {slope:l,intercept:c,rSquared:f}}function q5(e,t,r){let o=e.length,n=r+1,i=Array.from({length:n},()=>Array(n+1).fill(0));for(let a=0;a<n;a++){for(let l=0;l<n;l++){let c=0;for(let p=0;p<o;p++)c+=e[p]**(a+l);i[a][l]=c;}let s=0;for(let l=0;l<o;l++)s+=t[l]*e[l]**a;i[a][n]=s;}for(let a=0;a<n;a++){let s=a;for(let c=a+1;c<n;c++)Math.abs(i[c][a])>Math.abs(i[s][a])&&(s=c);[i[a],i[s]]=[i[s],i[a]];let l=i[a][a];if(!(Math.abs(l)<1e-12)){for(let c=a;c<=n;c++)i[a][c]/=l;for(let c=0;c<n;c++){if(c===a)continue;let p=i[c][a];for(let u=a;u<=n;u++)i[c][u]-=p*i[a][u];}}}return i.map(a=>a[n])}function J5(e,t,r){let o=e.length;if(o===0)return 0;let n=t.reduce((s,l)=>s+l,0)/o,i=0,a=0;for(let s=0;s<o;s++)i+=(t[s]-r(e[s]))**2,a+=(t[s]-n)**2;return a>0?1-i/a:0}function Q5(e,t,r,o,n,i){let a=t.length;if(a<2)return {points:[],equation:"",rSquared:0};let s=t.map((b,y)=>y),l=t,c=e.forward??0,u=-(e.backward??0),d=a-1+c,f=Math.max(Math.ceil((d-u)*4),20),m,h="",g=0;switch(e.trendlineType){case "linear":{let b=bo(s,l),y=e.intercept,v=y!==void 0?l.reduce(($,w,k)=>$+(w-y)*s[k],0)/s.reduce(($,w)=>$+w*w,0):b.slope,S=y??b.intercept;m=$=>v*$+S,h=`y = ${v.toFixed(2)}x + ${S.toFixed(2)}`,g=b.rSquared;break}case "exponential":{let b=l.filter(w=>w>0).map(w=>Math.log(w)),y=s.filter((w,k)=>l[k]>0);if(b.length<2)return {points:[],equation:"",rSquared:0};let v=bo(y,b),S=Math.exp(v.intercept),$=v.slope;m=w=>S*Math.exp($*w),h=`y = ${S.toFixed(2)}e^(${$.toFixed(2)}x)`,g=v.rSquared;break}case "logarithmic":{let b=s.filter(S=>S>0).map(S=>Math.log(S)),y=l.filter((S,$)=>s[$]>0);if(b.length<2)return {points:[],equation:"",rSquared:0};let v=bo(b,y);m=S=>S>0?v.slope*Math.log(S)+v.intercept:0,h=`y = ${v.slope.toFixed(2)}ln(x) + ${v.intercept.toFixed(2)}`,g=v.rSquared;break}case "power":{let b=s.filter(($,w)=>$>0&&l[w]>0).map($=>Math.log($)),y=l.filter(($,w)=>$>0&&s[w]>0).map($=>Math.log($));if(b.length<2)return {points:[],equation:"",rSquared:0};let v=bo(b,y),S=Math.exp(v.intercept);m=$=>$>0?S*$**v.slope:0,h=`y = ${S.toFixed(2)}x^${v.slope.toFixed(2)}`,g=v.rSquared;break}case "polynomial":{let b=Math.min(e.order??2,6),y=q5(s,l,b);m=v=>y.reduce((S,$,w)=>S+$*v**w,0),h=y.map((v,S)=>`${v.toFixed(2)}x^${S}`).join(" + "),g=J5(s,l,m);break}case "movingAvg":{let b=e.period??2,y=[];for(let v=b-1;v<a;v++){let S=0;for(let I=v-b+1;I<=v;I++)S+=l[I];let $=S/b,w=eh(v,r,o,i),k=Y($,n,o.plotTop,o.plotBottom);y.push({x:w,y:k});}return {points:y,equation:`${b}-period moving average`,rSquared:0}}default:return {points:[],equation:"",rSquared:0}}let x=[];for(let b=0;b<=f;b++){let y=u+(d-u)*b/f,v=m(y);if(!Number.isFinite(v))continue;let S=eh(y,r,o,i),$=Y(v,n,o.plotTop,o.plotBottom);x.push({x:S,y:$});}return {points:x,equation:h,rSquared:g}}function ek(e,t,r,o,n="line",i){let a=[];return e.series.forEach((s,l)=>{!s.trendlines||s.trendlines.length===0||s.trendlines.forEach(c=>{let{points:p,equation:u,rSquared:d}=Q5(c,s.values,t,r,o,n);if(p.length<2)return;let f=p.map((x,b)=>`${b===0?"M":"L"} ${x.x.toFixed(2)} ${x.y.toFixed(2)}`).join(" "),m=c.color??Fe(s,l,i),h={kind:"path",d:f,fill:"none",stroke:m,strokeWidth:1.5};a.push(h);let g=[];if(c.displayEq&&u&&g.push(u),c.displayRSq&&g.push(`R\xB2 = ${d.toFixed(4)}`),g.length>0){let x=p[p.length-1],b={kind:"text",x:x.x,y:x.y-6,text:g.join(" "),fontSize:7,fill:m,textAnchor:"end"};a.push(b);}});}),a}var th="#475569";function tk(e,t){let r=[],o=e.axes;if(!o||o.length===0)return r;let n=o.find(a=>a.axisType==="catAx"&&a.axPos!=="r"&&a.titleText);if(n?.titleText){let a={kind:"text",x:t.plotLeft+t.plotWidth/2,y:t.plotBottom+22,text:n.titleText,fontSize:9,fill:th,textAnchor:"middle",fontWeight:"bold"};r.push(a);}let i=o.find(a=>a.axisType==="valAx"&&a.axPos!=="r"&&a.titleText)??o.find(a=>a.axisType==="valAx"&&a.titleText);if(i?.titleText){let s=t.plotTop+t.plotHeight/2,l={kind:"text",x:12,y:s,text:i.titleText,fontSize:9,fill:th,textAnchor:"middle",fontWeight:"bold",transform:`rotate(-90, 12, ${s})`};r.push(l);}return r}function rk(e){return le(e)}var dn=14,So=14,nk=60,rh=4;function ok(e,t,r){let o=e.dataTable;if(!o)return [];let n=e.categories,i=e.series;if(n.length===0&&i.length===0)return [];let a=[],s=o.showHorzBorder!==false,l=o.showVertBorder!==false,c=o.showOutline!==false,p=o.showKeys!==false,u="#cbd5e1",d="#334155",f="bold",m=n.length,h=i.length,g=p?nk:0,x=t.plotWidth,b=m>0?(x-g)/m:x-g,y=t.plotBottom+rh,v=So+h*dn;if(c){let w=(k,I,R,E)=>({kind:"line",x1:k,y1:I,x2:R,y2:E,stroke:u,strokeWidth:1});a.push(w(t.plotLeft,y,t.plotLeft+x,y)),a.push(w(t.plotLeft+x,y,t.plotLeft+x,y+v)),a.push(w(t.plotLeft+x,y+v,t.plotLeft,y+v)),a.push(w(t.plotLeft,y+v,t.plotLeft,y));}function S(w){return t.plotLeft+g+w*b}function $(w){return y+(w===0?0:So+(w-1)*dn)}if(n.forEach((w,k)=>{let I=S(k)+b/2,R=$(0)+So/2+3,E={kind:"text",x:I,y:R,text:w,fontSize:8,fill:d,textAnchor:"middle",fontWeight:f};if(a.push(E),l&&k<m-1){let N=S(k)+b,W={kind:"line",x1:N,y1:y,x2:N,y2:y+v,stroke:u,strokeWidth:1};a.push(W);}}),s){let w=y+So,k={kind:"line",x1:t.plotLeft,y1:w,x2:t.plotLeft+x,y2:w,stroke:u,strokeWidth:1};a.push(k);}if(p&&l){let w=t.plotLeft+g,k={kind:"line",x1:w,y1:y,x2:w,y2:y+v,stroke:u,strokeWidth:1};a.push(k);}return i.forEach((w,k)=>{let I=k+1,R=$(I),E=R+dn/2+3;if(p){let N=t.plotLeft+rh,W=R+dn/2-3,Z=Fe(w,k,r);a.push({kind:"rect",x:N,y:W,w:7,h:7,fill:Z,rx:1});let re={kind:"text",x:N+9,y:E,text:w.name,fontSize:8,fill:d,textAnchor:"start"};a.push(re);}if(n.forEach((N,W)=>{let Z=w.values[W],ne={kind:"text",x:S(W)+b/2,y:E,text:Z!==void 0?rk(Z):"",fontSize:8,fill:d,textAnchor:"middle"};a.push(ne);}),s&&k<h-1){let N=R+dn,W={kind:"line",x1:t.plotLeft,y1:N,x2:t.plotLeft+x,y2:N,stroke:u,strokeWidth:1};a.push(W);}}),a}function ik(e,t,r){return r?{min:0,max:100,span:100}:yM(e.series,t)}function ak(e,t,r,o){let n=t.series.length,i=al(t.axes,t.dataTable,n),a=Ke(e.width,e.height,t,true,i),s=Math.max(r.length,1),l=o==="bar"&&(t.grouping==="stacked"||t.grouping==="percentStacked"),c=l&&t.grouping==="percentStacked",{secondary:p}=hg(t.series,t.axes),u=new Set(p.map(j=>j.index)),d=!l&&u.size>0,f=d?t.series.filter((j,Q)=>!u.has(Q)):t.series,m=d?t.series.filter((j,Q)=>u.has(Q)):[],h=t.axes?.find(j=>j.axisType==="valAx"&&j.axPos!=="r"),g=l?{...ik(t,s,c),...h?.orientation==="maxMin"?{reverseOrder:true}:{}}:G$(f.length>0?f:t.series,t.axes),x=d&&m.length>0?zo(m,t.axes?.find(j=>j.axisType==="valAx"&&j.axPos==="r")):void 0,b=x5(t,a,g,x,s),y=g.logScale?void 0:Ir(g,a),v=fl(t,r,a,o,g,x),{catAxisStyle:S,sourceIndices:$,displayChartData:w}=v,k=t.style?.legendPosition??"b",{legend:I,legendX:R,legendY:E,legendAnchor:N}=ct(t.series,t.colorPalette,a.svgWidth,k,a.svgHeight,a.plotTop),W;o==="bar"?W=b5(t,s,a,g,x,u,l?c?"percentStacked":"stacked":"clustered",$):o==="line"?W=C5(t,s,a,g,x,u,$,v.xPositions):o==="area"?W=A5(t,s,a,g,$,v.xPositions):o==="scatter"?W=P5(t,a,g):W=E5(t,a,g);let ne=[...o==="line"||o==="area"?Tg(t,a,g,s,{mode:"line",xPositions:v.xPositions}):[],...W.primitives,...v.tickMarks],re=[...ek(w,s,a,g,S,t.colorPalette),...Cg(w,s,a,g,S),...tk(t,a)],U=ok(w,a,t.colorPalette);ne.push(...re,...U);let V=t.style?.hasTitle&&t.title?t.title:void 0,K=l?void 0:{range:g,secondaryRange:x,secondarySeriesIndexes:d?[...u]:void 0,plotTop:a.plotTop,plotBottom:a.plotBottom};return {svgWidth:a.svgWidth,svgHeight:a.svgHeight,title:V,titleX:a.svgWidth/2,titleY:12,gridlines:b.gridlines,axisLabels:b.axisLabels,zeroLine:y,categoryLabels:v.labels,primitives:ne,dataLabels:W.dataLabels,legend:t.style?.hasLegend?I:[],legendX:R,legendY:E,legendAnchor:N,secondaryGridlines:b.secondaryGridlines,secondaryAxisLabels:b.secondaryAxisLabels,overlays:re.length>0?re:void 0,dataTable:U.length>0?U:void 0,valueDrag:K}}function fs(e,t,r,o){return r&&o.has(e)?r:t}function sk(e,t,r){let o=al(t.axes,t.dataTable,t.series.length),n=Ke(e.width,e.height,t,true,o),i=Math.max(r.length,1),{primary:a,secondary:s}=hg(t.series,t.axes),l=new Set(s.map(j=>j.index)),c=a.length>0?a.map(j=>j.series):t.series,p=e5(t.axes),u=t.axes?.find(j=>j.axisId===p),d=il(t.axes),f=zo(c,u),m=s.length>0?zo(s.map(j=>j.series),d):void 0,h=t.axes?.find(j=>(j.axisType==="catAx"||j.axisType==="dateAx")&&j.axisId===u?.crossAxisId),g=Fo(h,i,n,"left",t.dateCategories?.values),x=h?.crosses!==void 0||h?.crossesAt!==void 0?cl(f,n,u,g):Tr(f,n),{gridlines:b,axisLabels:y}=x,v=t.axes?.find(j=>(j.axisType==="catAx"||j.axisType==="dateAx")&&j.axisId===d?.crossAxisId),S=m?pl(m,n,d,Fo(v,i,n,"right",t.dateCategories?.values)):void 0,$=f.logScale?void 0:Ir(f,n),w=fl(t,r,n,"combo",f,m),k=w.sourceIndices,I=t.style?.legendPosition??"b",{legend:R,legendX:E,legendY:N,legendAnchor:W}=ct(t.series,t.colorPalette,n.svgWidth,I,n.svgHeight,n.plotTop),Z=[],ne=[],re={mode:"line",xPositions:w.xPositions};Z.push(...Tg(t,n,f,i,re));let U=t.series.slice(0,1);if(U[0]){let j=fs(0,f,m,l),Q=[{...U[0],values:k.map(me=>U[0].values[me]??0)}];Z.push(...SM(Q,i,n,j,t.colorPalette).map((me,he)=>({kind:"rect",x:w.xPositions?(w.xPositions[he]??me.x)-me.w/2:me.x,y:me.y,w:me.w,h:me.h,fill:me.fill,rx:1,part:{role:"dataPoint",seriesIndex:0,pointIndex:k[he]??he}}))),lk(U[0],t,n,i,j,k,ne,w.xPositions);}let V=n.plotWidth/i;t.series.slice(1).forEach((j,Q)=>{let me=Q+1;if(j.values.length===0)return;let he=fs(me,f,m,l),ke=Fe(j,me,t.colorPalette),Ie=k.map((xe,un)=>{let xo=j.values[xe]??0;return {x:w.xPositions?.[un]??n.plotLeft+V*un+V/2,y:Y(xo,he,n.plotTop,n.plotBottom),sourceIndex:xe,value:xo}});Z.push({kind:"polyline",points:Ie.map(xe=>`${xe.x.toFixed(2)},${xe.y.toFixed(2)}`).join(" "),stroke:ke,strokeWidth:2.4,fill:"none"}),Z.push(...Ie.map(xe=>({kind:"circle",cx:xe.x,cy:xe.y,r:2.5,fill:ke,part:{role:"dataPoint",seriesIndex:me,pointIndex:xe.sourceIndex}}))),t.style?.hasDataLabels&&Ie.forEach(xe=>{xe&&ne.push({kind:"text",x:xe.x,y:xe.y-7,text:le(xe.value),fontSize:7,fill:"#334155",textAnchor:"middle"});});}),Z.push(...w.tickMarks);let K=w.displayChartData;return Z.push(...Cg(K,i,n,f,"line",{xPositions:w.xPositions,seriesRanges:t.series.map((j,Q)=>fs(Q,f,m,l)),seriesModes:t.series.map((j,Q)=>Q===0?"bar":"line")})),{svgWidth:n.svgWidth,svgHeight:n.svgHeight,title:t.style?.hasTitle&&t.title?t.title:void 0,titleX:n.svgWidth/2,titleY:12,gridlines:b,axisLabels:y,zeroLine:$,categoryLabels:w.labels,primitives:Z,dataLabels:ne,legend:t.style?.hasLegend?R:[],legendX:E,legendY:N,legendAnchor:W,secondaryGridlines:S?.gridlines,secondaryAxisLabels:S?.axisLabels}}function lk(e,t,r,o,n,i,a,s){if(!t.style?.hasDataLabels)return;let l=r.plotWidth/o,c=l*.7,p=(l-c)/2;i.forEach((u,d)=>{let f=e.values[u]??0,m=Y(0,n,r.plotTop,r.plotBottom),h=Y(f,n,r.plotTop,r.plotBottom);a.push({kind:"text",x:s?.[d]??r.plotLeft+l*d+p+c/2,y:f>=0?Math.min(m,h)-4:Math.max(m,h)+10,text:le(f),fontSize:7,fill:"#334155",textAnchor:"middle"});});}var ck="#22c55e",pk="#ef4444",uk="#334155";function dk(e,t,r){let o=Ke(e.width,e.height,t,true,al(t.axes,t.dataTable,t.series.length)),n=Math.max(r.length,1),i=Jo(t.series),a=t.axes?.find(E=>E.axisType==="valAx"&&E.axPos!=="r"),s=t.axes?.find(E=>(E.axisType==="catAx"||E.axisType==="dateAx")&&E.axisId===a?.crossAxisId),l=s?.crosses!==void 0||s?.crossesAt!==void 0?cl(i,o,a,Fo(s,n,o,"left",t.dateCategories?.values)):Tr(i,o),{gridlines:c,axisLabels:p}=l,u=Ir(i,o),d=fl(t,r,o,"stock",i),f=d.sourceIndices,m=t.style?.legendPosition??"b",{legend:h,legendX:g,legendY:x,legendAnchor:b}=ct(t.series,t.colorPalette,o.svgWidth,m,o.svgHeight,o.plotTop),y=t.series.length>=4,v=y?t.series[0]:void 0,S=t.series[y?1:0],$=t.series[y?2:1],w=t.series[y?3:2],k=[],I=[];if(S&&$&&w){let E=o.plotWidth/n,N=E*.5;for(let W=0;W<n;W++){let Z=f[W]??W,ne=S.values[Z]??0,re=$.values[Z]??0,U=v?v.values[Z]??re:re,V=w.values[Z]??ne,K=V>=U,j=d.xPositions?.[W]??o.plotLeft+E*W+E/2,Q=Y(ne,i,o.plotTop,o.plotBottom),me=Y(re,i,o.plotTop,o.plotBottom),he=Y(U,i,o.plotTop,o.plotBottom),ke=Y(V,i,o.plotTop,o.plotBottom);k.push({kind:"line",x1:j,y1:Q,x2:j,y2:me,stroke:uk,strokeWidth:1});let Ie=Math.min(he,ke),xe=Math.max(Math.abs(he-ke),1);k.push({kind:"rect",x:j-N/2,y:Ie,w:N,h:xe,fill:K?ck:pk,rx:1,part:{role:"dataPoint",seriesIndex:y?3:2,pointIndex:Z}}),t.style?.hasDataLabels&&I.push({kind:"text",x:j,y:Q-4,text:le(V),fontSize:7,fill:"#334155",textAnchor:"middle"});}}k.push(...d.tickMarks);let R=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:R,titleX:o.svgWidth/2,titleY:12,gridlines:c,axisLabels:p,zeroLine:u,categoryLabels:d.labels,primitives:k,dataLabels:I,legend:t.style?.hasLegend?h:[],legendX:g,legendY:x,legendAnchor:b}}function ms(e,t,r){let o=r==="inclusive"?(e.length-1)*t:(e.length+1)*t-1,n=Math.max(0,Math.min(o,e.length-1)),i=Math.floor(n),a=Math.ceil(n),s=n-i;return e[i]+(e[a]-e[i])*s}function fk(e,t){if(e.length<2)return;let r=[...e].sort((o,n)=>o-n);return t?{min:r[0],q1:ms(r,.25,t),median:ms(r,.5,t),q3:ms(r,.75,t),max:r[r.length-1]}:{min:r[0],q1:r[Math.floor(r.length*.25)],median:r[Math.floor(r.length*.5)],q3:r[Math.floor(r.length*.75)],max:r[r.length-1]}}function Ag(e){let t=e.flatMap(n=>n.values),r=Math.min(...t,0),o=Math.max(...t,1);return {min:r,max:o,span:Math.max(o-r,1)}}var wo="#64748b",Pg="#1e293b";function mk(e,t,r,o,n){let i=r.plotWidth/t,a=i*.5,s=e.series.find(p=>p.boxWhiskerOptions)?.boxWhiskerOptions,l=s?s.quartileMethod??"exclusive":void 0,c=[];for(let p=0;p<t;p++){let u=e.series.map((S,$)=>({value:S.values[p],seriesIndex:$})).filter(S=>S.value!==void 0),d=fk(u.map(S=>S.value),l);if(!d)continue;let f=d.q3-d.q1,m=d.q1-1.5*f,h=d.q3+1.5*f,g=u.filter(S=>!s||S.value>=m&&S.value<=h),x=Math.min(...g.map(S=>S.value)),b=Math.max(...g.map(S=>S.value)),y=r.plotLeft+i*p+(i-a)/2,v=u.reduce((S,$)=>S+$.value,0)/u.length;c.push({stats:d,boxX:y,boxW:a,xMid:y+a/2,yMin:Y(x,o,r.plotTop,r.plotBottom),yMax:Y(b,o,r.plotTop,r.plotBottom),yQ1:Y(d.q1,o,r.plotTop,r.plotBottom),yQ3:Y(d.q3,o,r.plotTop,r.plotBottom),yMed:Y(d.median,o,r.plotTop,r.plotBottom),yMean:Y(v,o,r.plotTop,r.plotBottom),fill:we(p,n),points:u.map((S,$)=>({x:y+a*(.2+.6*($+1)/(u.length+1)),y:Y(S.value,o,r.plotTop,r.plotBottom),seriesIndex:S.seriesIndex,outlier:S.value<x||S.value>b}))});}return c}function hk(e){let t=e;return [{kind:"line",x1:t.xMid,y1:t.yMax,x2:t.xMid,y2:t.yQ3,stroke:wo,strokeWidth:1},{kind:"line",x1:t.xMid,y1:t.yQ1,x2:t.xMid,y2:t.yMin,stroke:wo,strokeWidth:1},{kind:"line",x1:t.boxX+t.boxW*.25,y1:t.yMax,x2:t.boxX+t.boxW*.75,y2:t.yMax,stroke:wo,strokeWidth:1},{kind:"line",x1:t.boxX+t.boxW*.25,y1:t.yMin,x2:t.boxX+t.boxW*.75,y2:t.yMin,stroke:wo,strokeWidth:1},{kind:"rect",x:t.boxX,y:Math.min(t.yQ1,t.yQ3),w:t.boxW,h:Math.abs(t.yQ1-t.yQ3),fill:t.fill,rx:1,opacity:.8},{kind:"line",x1:t.boxX,y1:t.yMed,x2:t.boxX+t.boxW,y2:t.yMed,stroke:Pg,strokeWidth:2}]}function gk(e,t,r){if(!t)return [];let o=[];t.showMeanLine&&o.push({kind:"line",x1:e.boxX,y1:e.yMean,x2:e.boxX+e.boxW,y2:e.yMean,stroke:"#0f766e",strokeWidth:1.5}),t.showMeanMarker&&o.push({kind:"circle",cx:e.xMid,cy:e.yMean,r:3,fill:"#0f766e"});for(let n of e.points)n.outlier&&!t.showOutlierPoints||!n.outlier&&!t.showInnerPoints||o.push({kind:"circle",cx:n.x,cy:n.y,r:2.25,fill:n.outlier?"#dc2626":Pg,part:{role:"dataPoint",seriesIndex:n.seriesIndex,pointIndex:r}});return o}function xk(e,t,r){let o=Ke(e.width,e.height,t,true),n=Ag(t.series),i=t.series.find(h=>h.boxWhiskerOptions)?.boxWhiskerOptions,s=mk(t,Math.max(r.length,1),o,n,t.colorPalette).flatMap((h,g)=>[...hk(h),...gk(h,i,g)]),{gridlines:l,axisLabels:c}=Tr(n,o),{legend:p,legendX:u,legendY:d,legendAnchor:f}=ct(t.series,t.colorPalette,o.svgWidth,t.style?.legendPosition??"b",o.svgHeight,o.plotTop),m=r.map((h,g)=>({color:we(g,t.colorPalette),label:h}));return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:t.style?.hasTitle?t.title:void 0,titleX:o.svgWidth/2,titleY:12,gridlines:l,axisLabels:c,zeroLine:Ir(n,o),categoryLabels:Qo(r,o,"bar"),primitives:s,dataLabels:[],legend:t.style?.hasLegend?m.length?m:p:[],legendX:u,legendY:d,legendAnchor:f}}function yk(e){return [...e].sort((t,r)=>Math.max(r.value,0)-Math.max(t.value,0)||t.sourcePointIndex-r.sourcePointIndex)}function vk(e,t,r,o){let n=e.reduce((l,c)=>l+Math.max(c.value,0),0);if(n<=0)return [];let i=0,a=e.map((l,c)=>{i+=Math.max(l.value,0);let p=c===e.length-1?100:i/n*100;return {x:t.plotLeft+t.plotWidth*(c+.5)/e.length,y:t.plotBottom-t.plotHeight*p/100,pointIndex:l.sourcePointIndex}}),s=r.color??"#ED7D31";return [{kind:"polyline",points:a.map(l=>`${l.x},${l.y}`).join(" "),stroke:s,strokeWidth:2,fill:"none",part:{role:"series",seriesIndex:o}},...a.map(l=>({kind:"circle",cx:l.x,cy:l.y,r:2.5,fill:s,part:{role:"dataPoint",seriesIndex:o,pointIndex:l.pointIndex}}))]}function bk(e){let t=pl({min:0,max:100,span:100},e,{majorUnit:20,majorTickMark:"out"});return {secondaryGridlines:t.gridlines,secondaryAxisLabels:t.axisLabels.map(r=>({...r,text:`${r.text}%`}))}}var Sk="#334155";function wk(e,t,r){return r==="r"?`(${le(e)}, ${le(t)}]`:`[${le(e)}, ${le(t)})`}function $k(e,t){let r=t.intervalClosed??"l",o=e.map((p,u)=>({value:p,sourceIndex:u})).filter(p=>Number.isFinite(p.value));if(o.length===0)return [];let n=typeof t.underflow=="number"?t.underflow:void 0,i=typeof t.overflow=="number"?t.overflow:void 0,a=n===void 0?[]:o.filter(p=>r==="r"?p.value<=n:p.value<n),s=i===void 0?[]:o.filter(p=>r==="l"?p.value>=i:p.value>i),l=o.filter(p=>!a.includes(p)&&!s.includes(p)),c=[];if(n!==void 0&&c.push({value:a.length,label:`${r==="r"?"\u2264":"<"} ${le(n)}`,sourceIndices:a.map(p=>p.sourceIndex)}),l.length>0){let p=Math.min(...l.map(b=>b.value)),u=Math.max(...l.map(b=>b.value)),d=t.binSize&&t.binSize>0?t.binSize:void 0,f=t.binCount&&t.binCount>0?t.binCount:void 0,m=d?Math.floor(p/d)*d:p,h=Math.max(d?r==="l"?Math.floor((u-m)/d)+1:Math.ceil((u-m)/d):f??Math.ceil(Math.sqrt(l.length)),1),g=d??Math.max((u-m)/h,1),x=Array.from({length:h},(b,y)=>({value:0,label:wk(m+y*g,m+(y+1)*g,r),sourceIndices:[]}));for(let b of l){let y=r==="r"?Math.ceil((b.value-m)/g)-1:Math.floor((b.value-m)/g),v=Math.max(0,Math.min(y,x.length-1));x[v].value+=1,x[v].sourceIndices.push(b.sourceIndex);}c.push(...x);}return i!==void 0&&c.push({value:s.length,label:`${r==="l"?"\u2265":">"} ${le(i)}`,sourceIndices:s.map(p=>p.sourceIndex)}),c}function kk(e,t,r,o,n,i){let a=Math.max(t,e.length,1),s=r.plotWidth/a;return e.map((l,c)=>{let p=Y(0,o,r.plotTop,r.plotBottom),u=Y(l,o,r.plotTop,r.plotBottom);return {x:r.plotLeft+s*c,y:Math.min(p,u),w:Math.max(s-.5,1),h:Math.max(Math.abs(p-u),1),fill:n??we(c,i),pointIndex:c}})}function Mk(e,t,r){let o=t.series.findIndex(k=>k.histogramOptions?.layout==="pareto"),n=Ke(e.width,e.height,t,true,{hasSecondaryValueAxis:o>=0}),i=Math.max(t.series.findIndex(k=>k.histogramOptions?.layout!=="pareto"),0),a=t.series[i],s=a?.histogramOptions,l=s?.layout==="histogram"?$k(a?.values??[],s):void 0,c=(l?.map(k=>({value:k.value,label:k.label}))??(a?.values??[]).map((k,I)=>({value:k,label:r[I]??""}))).map((k,I)=>({...k,sourcePointIndex:I})),p=o>=0?yk(c):c,u=p.map(k=>k.value),d=p.map(k=>k.label),f=Ag([{name:a?.name??"",values:u}]),m=kk(u,d.length,n,f,a?.color,t.colorPalette),h=m.map((k,I)=>({kind:"rect",x:k.x,y:k.y,w:k.w,h:k.h,fill:k.fill,opacity:.85,...l?{}:{part:{role:"dataPoint",seriesIndex:i,pointIndex:p[I]?.sourcePointIndex??I}}}));o>=0&&h.push(...vk(p,n,t.series[o],o));let g=t.style?.hasDataLabels?m.map((k,I)=>({kind:"text",x:k.x+k.w/2,y:k.y-4,text:le(u[I]),fontSize:7,fill:Sk,textAnchor:"middle"})):[],{gridlines:x,axisLabels:b}=Tr(f,n),y=o>=0?bk(n):void 0,{legend:v,legendX:S,legendY:$,legendAnchor:w}=ct(t.series,t.colorPalette,n.svgWidth,t.style?.legendPosition??"b",n.svgHeight,n.plotTop);return {svgWidth:n.svgWidth,svgHeight:n.svgHeight,title:t.style?.hasTitle?t.title:void 0,titleX:n.svgWidth/2,titleY:12,gridlines:x,axisLabels:b,zeroLine:Ir(f,n),categoryLabels:Qo(d,n,"bar"),primitives:h,dataLabels:g,legend:t.style?.hasLegend?v:[],legendX:S,legendY:$,legendAnchor:w,secondaryGridlines:y?.secondaryGridlines,secondaryAxisLabels:y?.secondaryAxisLabels}}function Eg(e,t,r,o,n,i){let s=i-n>Math.PI?1:0,l=e+o*Math.cos(n),c=t+o*Math.sin(n),p=e+o*Math.cos(i),u=t+o*Math.sin(i),d=e+r*Math.cos(i),f=t+r*Math.sin(i),m=e+r*Math.cos(n),h=t+r*Math.sin(n);return `M ${l} ${c} A ${o} ${o} 0 ${s} 1 ${p} ${u} L ${d} ${f} A ${r} ${r} 0 ${s} 0 ${m} ${h} Z`}function Tk(e,t,r,o,n){let i=Math.max(e.length,1),a=o/(i+.5),s=[];for(let l=0;l<e.length;l++){let c=e[l].values,p=a*(l+.5),u=a*(l+1.5),d=c.reduce((m,h)=>m+Math.abs(h),0)||1,f=-Math.PI/2;for(let m=0;m<c.length;m++){let h=f+Math.abs(c[m])/d*Math.PI*2;s.push({d:Eg(t,r,p,u,f,h),fill:we(m,n),opacity:Math.max(.1,.9-l*.1),pointIndex:m,level:l}),f=h;}}return s}function nh(e,t,r){return e.slice(t).map(o=>o[r]??"").join("\0")}function Ik(e,t,r,o,n,i){let a=e.filter(g=>g.length>0),s=Math.max(t.length,...a.map(g=>g.length),0);if(a.length===0||s===0)return [];let l=Array.from({length:s},(g,x)=>Math.abs(t[x]??0)),c=l.some(g=>g!==0)?l:l.map(()=>1),p=c.reduce((g,x)=>g+x,0),u=[0];for(let g of c)u.push((u[u.length-1]??0)+g);let d=n/(a.length+.5),f=a[a.length-1]??[],m=new Map,h=[];for(let g=a.length-1;g>=0;g--){let x=a.length-1-g,b=d*(x+.5),y=d*(x+1.5),v=0;for(;v<s;){let S=nh(a,g,v),$=v+1;for(;$<s&&nh(a,g,$)===S;)$++;let w=-Math.PI/2+u[v]/p*Math.PI*2,k=-Math.PI/2+u[$]/p*Math.PI*2,I=f[v]??"";m.has(I)||m.set(I,m.size),h.push({d:Eg(r,o,b,y,w,k),fill:we(m.get(I)??v,i),opacity:Math.max(.1,.9-x*.1),level:x,label:a[g][v]??"",...g===0&&$===v+1?{pointIndex:v}:{}}),v=$;}}return h}function Og(){return {gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[]}}function _k(e,t,r,o,n,i,a){let s=e.length;if(s===0)return [];let l=Math.max(...e.map(d=>Math.abs(d)),1),c=n/Math.max(s,1),p=t+o/2,u=[];for(let d=0;d<s;d++){let f=e[d],m=Math.abs(f)/l*o,g=(d+1<s?Math.abs(e[d+1]):Math.abs(f)*.3)/l*o,x=r+d*c,b=[`M ${p-m/2} ${x}`,`L ${p+m/2} ${x}`,`L ${p+g/2} ${x+c}`,`L ${p-g/2} ${x+c}`,"Z"].join(" ");u.push({d:b,fill:we(d,a),topW:m,botW:g,labelX:p,labelY:x+c/2+4,labelText:i[d]??le(f),fontSize:Math.min(10,c*.4)});}return u}function Ck(e,t,r){let o=Ke(e.width,e.height,t,false),n=t.series[0]?.values??[],i=_k(n,o.plotLeft,o.plotTop,o.plotWidth,o.plotHeight,r,t.colorPalette),a=[],s=[];for(let c of i)a.push({kind:"path",d:c.d,fill:c.fill,stroke:"#ffffff",strokeWidth:1});for(let c of i)s.push({kind:"text",x:c.labelX,y:c.labelY,text:c.labelText,fontSize:c.fontSize,fill:"#ffffff",textAnchor:"middle",fontWeight:"bold"});let l=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:l,titleX:o.svgWidth/2,titleY:14,...Og(),primitives:a,dataLabels:s,legend:[],legendX:o.svgWidth/2,legendY:o.svgHeight-8,legendAnchor:"middle"}}function Ak(e,t,r){let o=Ke(e.width,e.height,t,false),n=o.plotLeft+o.plotWidth/2,i=o.plotTop+o.plotHeight/2,a=Math.min(o.plotWidth,o.plotHeight)/2-4,s=t.categoryLevels,c=(s?.length?Ik(s,t.series[0]?.values??[],n,i,a,t.colorPalette):Tk(t.series,n,i,a,t.colorPalette)).map(f=>({kind:"path",d:f.d,fill:f.fill,stroke:"#ffffff",strokeWidth:1,opacity:f.opacity,part:f.pointIndex===void 0?void 0:{role:"dataPoint",seriesIndex:0,pointIndex:f.pointIndex}})),p=s?.length?[...new Set(s[s.length-1]?.filter(Boolean)??r)]:r,u=t.style?.hasLegend?p.map((f,m)=>({color:we(m,t.colorPalette),label:f})):[],d=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:d,titleX:o.svgWidth/2,titleY:14,...Og(),primitives:c,dataLabels:[],legend:u,legendX:o.svgWidth/2,legendY:o.svgHeight-8,legendAnchor:"middle"}}function Pk(e,t){let r=e.length,o=new Set;if(r<=1)return o;let n=t.splitType??"auto";if(n==="cust")for(let i of t.custSplit??[])i>=0&&i<r&&o.add(i);else if(n==="val"){let i=t.splitPos??0;e.forEach((a,s)=>{a<i&&o.add(s);});}else if(n==="percent"){let i=e.reduce((s,l)=>s+Math.abs(l),0)||1,a=t.splitPos??0;e.forEach((s,l)=>{Math.abs(s)/i*100<a&&o.add(l);});}else {let i=Math.min(Math.max(Math.round(t.splitPos??2),1),r-1);for(let a=r-i;a<r;a++)o.add(a);}return o.size>=r&&o.delete(0),o}function ml(e){let t=e.reduce((o,n)=>o+Math.abs(n),0)||1,r=-Math.PI/2;return e.map(o=>{let n=Math.abs(o)/t*Math.PI*2,i=r;return r+=n,{start:i,end:r,mid:(i+r)/2}})}function Ek(e,t){let r=Math.max(e.width,320),o=Math.max(e.height,180),n=Math.max(Math.min(r*.28,o*.4),4),i=Math.min(Math.max(t/100,.3),1.4);return {svgWidth:r,svgHeight:o,primaryCx:r*.3,primaryCy:o*.52,primaryR:n,secondaryCx:r*.76,secondaryCy:o*.52,secondaryR:Math.max(n*i,4)}}function hl(e,t,r){return {kind:"text",x:e,y:t,text:le(r),fontSize:8,fill:"#ffffff",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"central"}}function Ok(e,t,r,o){let n=ml(t),i=[],a=[];return n.forEach((s,l)=>{let c=Wo(e.secondaryCx,e.secondaryCy,e.secondaryR,0,s.start,s.end);i.push({kind:"path",d:c.d,fill:r[l],stroke:"#ffffff",strokeWidth:1.5}),o&&a.push(hl(c.labelX,c.labelY,t[l]));}),{primitives:i,labels:a}}function Lk(e,t,r,o){let n=t.reduce((d,f)=>d+Math.abs(f),0)||1,i=e.secondaryR*1.1,a=e.secondaryR*2,s=e.secondaryCx-i/2,l=e.secondaryCy-a/2,c=[],p=[],u=l;return t.forEach((d,f)=>{let m=Math.max(Math.abs(d)/n*a,1);c.push({kind:"rect",x:s,y:u,w:i,h:m,fill:r[f]}),o&&p.push(hl(e.secondaryCx,u+m/2,d)),u+=m;}),{primitives:c,labels:p}}function Dk(e,t){let r={x:e.primaryCx+e.primaryR*Math.cos(t.start),y:e.primaryCy+e.primaryR*Math.sin(t.start)},o={x:e.primaryCx+e.primaryR*Math.cos(t.end),y:e.primaryCy+e.primaryR*Math.sin(t.end)},n=e.secondaryCx-e.secondaryR*1.05,i=(a,s)=>({kind:"line",x1:a.x,y1:a.y,x2:n,y2:s,stroke:"#94a3b8",strokeWidth:1,dashArray:"3 2"});return [i(r,e.secondaryCy-e.secondaryR),i(o,e.secondaryCy+e.secondaryR)]}function Rk(e,t,r,o){let n=ml(t),i=[],a=[];return n.forEach((s,l)=>{let c=Wo(e.primaryCx,e.primaryCy,e.primaryR,0,s.start,s.end);i.push({kind:"path",d:c.d,fill:r[l],stroke:"#ffffff",strokeWidth:1.5,part:{role:"dataPoint",seriesIndex:0,pointIndex:l}}),o&&a.push(hl(c.labelX,c.labelY,t[l]));}),{primitives:i,labels:a}}function zk(e,t,r){let o=t.ofPieOptions??{ofPieType:"pie"},n=t.series[0],i=n?.values??[],a=t.colorPalette,s=t.style?.hasDataLabels===true,l=Pk(i,o),c=i.map((E,N)=>N).filter(E=>!l.has(E)),p=i.map((E,N)=>N).filter(E=>l.has(E)),u=Ek(e,o.secondPieSize??75),d=E=>n?ll(n,E,we(E,a)):we(E,a),f=c.map(d),m=p.map(d),h=we(i.length,a),g=p.reduce((E,N)=>E+Math.abs(i[N]),0),x=[...c.map(E=>Math.abs(i[E])),g],b=[...f,h],y=Rk(u,x,b,s),v=p.map(E=>Math.abs(i[E])),S=o.ofPieType==="bar",$=v.length>0?S?Lk(u,v,m,s):Ok(u,v,m,s):{primitives:[],labels:[]},w=[];if(o.serLines!==false&&v.length>0){let E=ml(x);w.push(...Dk(u,E[E.length-1]));}w.push(...y.primitives,...$.primitives);let k=[...y.labels,...$.labels],I=r.map((E,N)=>({color:we(N,a),label:E})),R=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:u.svgWidth,svgHeight:u.svgHeight,title:R,titleX:u.svgWidth/2,titleY:14,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],primitives:w,dataLabels:k,legend:t.style?.hasLegend?I:[],legendX:u.svgWidth/2,legendY:u.svgHeight-8,legendAnchor:"middle"}}var oh=14;function Fk(e){return e==="outEnd"||e==="bestFit"}function Nk(e){let{slices:t,values:r,cx:o,cy:n,outerR:i,position:a,showLeaderLines:s}=e,l=Fk(a),c=[],p=[];return t.forEach((u,d)=>{let f=r[d];if(f===void 0)return;if(!l){c.push({kind:"text",x:u.labelX,y:u.labelY,text:le(f),fontSize:8,fill:"#ffffff",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"central"});return}let m=Math.cos(u.midAngle),h=Math.sin(u.midAngle),g=o+i*m,x=n+i*h,b=o+(i+oh)*m,y=n+(i+oh)*h,v=m>=0?"start":"end";c.push({kind:"text",x:b+(m>=0?2:-2),y,text:le(f),fontSize:8,fill:"#334155",textAnchor:v,dominantBaseline:"central"}),s!==false&&p.push({kind:"line",x1:g,y1:x,x2:b,y2:y,stroke:"#94a3b8",strokeWidth:.75});}),{labels:c,leaderLines:p}}function Bk(e,t){return e.map(r=>{let o="";return Array.from({length:t},(n,i)=>{let a=r[i]?.trim()??"";return a&&(o=a),a||o})})}function Uk(e,t,r,o){let n=e.find(a=>a.children&&a.label===t);if(n)return n;let i={label:t,weight:0,children:[],colorIndex:r,parentLabelLayout:o};return e.push(i),i}function ih(e,t,r,o,n){let i=e.values.length,a=Bk(o??[],i),s=e.treemapOptions?.parentLabelLayout??"banner",l=[];for(let c=0;c<i;c++){let p=l;for(let u=a.length-1;u>=1;u--){let d=a[u][c]||`Group ${u}`;p=Uk(p,d,c,s).children;}p.push({label:a[0]?.[c]||r[c]||String(c+1),weight:Math.abs(e.values[c]??0),seriesIndex:t,pointIndex:c,colorIndex:t*n+c,parentLabelLayout:s});}return l}function Lg(e){return e.children&&(e.weight=e.children.reduce((t,r)=>t+Lg(r),0)),e.weight}function jk(e,t){let r=[...e].sort((s,l)=>l.weight-s.weight),o=r.reduce((s,l)=>s+l.weight,0),i=o===0?r.length:o,a={...t};return r.map(s=>{let l=o===0?1:s.weight,c=i>0?l/i:0,p=a.w>=a.h,u=p?{...a,w:a.w*c}:{...a,h:a.h*c};return p?a={...a,x:a.x+u.w,w:a.w-u.w}:a={...a,y:a.y+u.h,h:a.h-u.h},i-=l,[s,u]})}function Dg(e,t,r,o){for(let[n,i]of jk(e,t)){let a={x:i.x+1,y:i.y+1,w:Math.max(i.w-2,1),h:Math.max(i.h-2,1)};if(n.children){let s=n.parentLabelLayout!=="none"&&a.w>28&&a.h>16;s&&o.push({kind:"text",x:a.x+4,y:a.y+11,text:n.label,fontSize:10,fill:"#303030",textAnchor:"start",fontWeight:"bold"});let l=s&&n.parentLabelLayout==="banner"?16:0;Dg(n.children,{...a,y:a.y+l,h:Math.max(a.h-l,1)},r,o);continue}o.push({kind:"rect",...a,fill:we(n.colorIndex,r),rx:2,opacity:.85,part:{role:"dataPoint",seriesIndex:n.seriesIndex,pointIndex:n.pointIndex}}),a.w>30&&a.h>14&&o.push({kind:"text",x:a.x+a.w/2,y:a.y+a.h/2,text:n.label,fontSize:Math.min(10,a.h*.3),fill:"#ffffff",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"central"});}}function Wk(e,t,r){let o=Math.max(t.length,...e.series.map(a=>a.values.length),1),n=e.series.flatMap((a,s)=>ih(a,s,t,e.categoryLevels,o));e.series.length>1&&(n=e.series.map((a,s)=>({label:a.name,weight:0,children:ih(a,s,t,e.categoryLevels,o),colorIndex:s*o,parentLabelLayout:a.treemapOptions?.parentLabelLayout??"banner"})));for(let a of n)Lg(a);let i=[];return Dg(n,r,e.colorPalette,i),i}var Rg=Math.cos(Math.PI/6),zg=Math.sin(Math.PI/6);function ah(e,t,r){return {screenX:(e-t)*Rg,screenY:(e+t)*zg-r}}function Fg(e){return {r:Math.round(30+200*e),g:Math.round(80+100*(1-Math.abs(e-.5)*2)),b:Math.round(200*(1-e)+30)}}function Hk(e,t,r,o){return `rgb(${Math.round(e*o)},${Math.round(t*o)},${Math.round(r*o)})`}function gl(){return {gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],dataLabels:[]}}function Zk(e,t,r){let o=Ke(e.width,e.height,t,false),n=Jo(t.series),i=Math.max(r.length,1),a=t.series.length,s=Math.max(i-1,1),l=Math.max(a-1,1),c=s+l,p=o.plotWidth*.9/(c*Rg),u=o.plotHeight*.65/(c*zg),d=Math.max(Math.min(p,u),.5),f=o.plotHeight*.3,m=n.span>0?f:0,h=(U,V)=>{let K=Math.min(U,a-1),j=Math.min(V,i-1),Q=t.series[K]?.values[j]??0;return n.span>0?(Q-n.min)/n.span:0},g=[];for(let U=0;U<=l;U++)for(let V=0;V<=s;V++)g.push(ah(V*d,U*d,h(U,V)*m));let x=Math.min(...g.map(U=>U.screenX)),b=Math.max(...g.map(U=>U.screenX)),y=Math.min(...g.map(U=>U.screenY)),v=Math.max(...g.map(U=>U.screenY)),S=b-x,$=v-y,w=o.plotLeft+o.plotWidth/2-(x+S/2),k=o.plotTop+o.plotHeight/2-(y+$/2),I=[];for(let U=0;U<l;U++)for(let V=0;V<s;V++)I.push({row:U,col:V,depth:U+V});I.sort((U,V)=>U.depth-V.depth);let R=[];for(let{row:U,col:V}of I){let j=[[V,U],[V+1,U],[V+1,U+1],[V,U+1]].map(([xe,un])=>{let xo=h(un,xe);return ah(xe*d,un*d,xo*m)}),Q=(h(U,V)+h(U,V+1)+h(U+1,V+1)+h(U+1,V))/4,{r:me,g:he,b:ke}=Fg(Q),Ie=j.map(xe=>`${(xe.screenX+w).toFixed(2)},${(xe.screenY+k).toFixed(2)}`).join(" ");R.push({kind:"polygon",points:Ie,fill:`rgb(${me},${he},${ke})`,stroke:"none",strokeWidth:0,opacity:.9}),R.push({kind:"polygon",points:Ie,fill:"none",stroke:Hk(me,he,ke,.6),strokeWidth:.5,opacity:.7});}let E=t.style?.legendPosition??"b",{legend:N,legendX:W,legendY:Z,legendAnchor:ne}=ct(t.series,t.colorPalette,o.svgWidth,E,o.svgHeight,o.plotTop),re=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:re,titleX:o.svgWidth/2,titleY:14,...gl(),primitives:R,legend:t.style?.hasLegend?N:[],legendX:W,legendY:Z,legendAnchor:ne}}function Gk(e,t,r){let o=Ke(e.width,e.height,t,false),n=Jo(t.series),i=Math.max(r.length,1),a=t.series.length,s=o.plotWidth/Math.max(i-1,1),l=o.plotHeight/Math.max(a-1,1),c=[];for(let g=0;g<a;g++)for(let x=0;x<i;x++){let b=t.series[g]?.values[x]??0,y=n.span>0?(b-n.min)/n.span:0,{r:v,g:S,b:$}=Fg(y);c.push({kind:"rect",x:o.plotLeft+x*s,y:o.plotTop+g*l,w:s+.5,h:l+.5,fill:`rgb(${v},${S},${$})`,opacity:.85});}let p=t.style?.legendPosition??"b",{legend:u,legendX:d,legendY:f,legendAnchor:m}=ct(t.series,t.colorPalette,o.svgWidth,p,o.svgHeight,o.plotTop),h=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:h,titleX:o.svgWidth/2,titleY:14,...gl(),primitives:c,legend:t.style?.hasLegend?u:[],legendX:d,legendY:f,legendAnchor:m}}function Yk(e,t,r){let o=Math.max(r.length,1);return t.series.length>=2&&o>=2?Zk(e,t,r):Gk(e,t,r)}function Vk(e,t,r){let o=Ke(e.width,e.height,t,false),n=Wk(t,r,{x:o.plotLeft,y:o.plotTop,w:o.plotWidth,h:o.plotHeight}),i=t.style?.legendPosition??"b",{legend:a,legendX:s,legendY:l,legendAnchor:c}=ct(t.series,t.colorPalette,o.svgWidth,i,o.svgHeight,o.plotTop),p=r.map((d,f)=>({color:we(f,t.colorPalette),label:d})),u=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:u,titleX:o.svgWidth/2,titleY:14,...gl(),primitives:n,legend:t.style?.hasLegend?p.length>0?p:a:[],legendX:s,legendY:l,legendAnchor:c}}var sh=9525;function Xk(e,t,r){let o=e.from.x*t,n=e.from.y*r;if(e.anchor==="rel"&&e.to)return {x:o,y:n,w:Math.max((e.to.x-e.from.x)*t,0),h:Math.max((e.to.y-e.from.y)*r,0)};let i=e.ext??{cx:0,cy:0};return {x:o,y:n,w:i.cx/sh,h:i.cy/sh}}function Kk(e,t){if(!e.paragraphs||e.paragraphs.length===0)return [];let r=12,o=e.paragraphs.length*r,n=t.y+Math.max((t.h-o)/2,0)+r*.75,i=[];for(let a of e.paragraphs){if(a.text.length===0){n+=r;continue}let s=a.align??"ctr",l=s==="l"?"start":s==="r"?"end":"middle",c=s==="l"?t.x+2:s==="r"?t.x+t.w-2:t.x+t.w/2;i.push({kind:"text",x:c,y:n,text:a.text,fontSize:a.fontSize??9,fill:a.color??"#1e293b",textAnchor:l,fontWeight:a.bold?"bold":"normal"}),n+=r;}return i}function qk(e,t,r){let o=Xk(e,t,r),n=[];return e.kind==="cxnSp"?(n.push({kind:"line",x1:o.x,y1:o.y,x2:o.x+o.w,y2:o.y+o.h,stroke:e.stroke??"#000000",strokeWidth:e.strokeWidth??1}),n):((e.fill||e.stroke)&&o.w>0&&o.h>0&&n.push({kind:"polygon",points:`${o.x},${o.y} ${o.x+o.w},${o.y} ${o.x+o.w},${o.y+o.h} ${o.x},${o.y+o.h}`,fill:e.fill??"none",stroke:e.stroke??"none",strokeWidth:e.strokeWidth??(e.stroke?1:0)}),n.push(...Kk(e,o)),n)}function Jk(e,t,r){return !e||e.length===0?[]:e.flatMap(o=>qk(o,t,r))}function hs(e,t){return Array.from({length:t},(r,o)=>e?.[o]??o)}function gs(e,t,r){let o=t.indexOf(r);return o>=0?e[o]:void 0}function Ws(e,t){if(!e||typeof e!="object")return;let r=e;if(String(r["@_entityId"]??"")===t&&r["@_entityName"]!==void 0)return String(r["@_entityName"]);for(let o of Object.values(r))if(Array.isArray(o))for(let n of o){let i=Ws(n,t);if(i)return i}else {let n=Ws(o,t);if(n)return n}}function Qk(e,t,r){if(!e)return;let o=r(e);if(o)return o;let n=e.split(/[:/|._-]+/u).filter(Boolean);for(let a=n.length-1;a>=0;a--){let s=r(n[a]??"");if(s)return s}let i=Ws(t?.geographyCache,e);return i?r(i):void 0}function eM(e,t,r,o){let n=r?.entityIds??[],i=hs(r?.categorySourceIndices,e.length),a=hs(r?.valueSourceIndices,t.length),s=hs(r?.entityIdSourceIndices,n.length);return [...new Set([...i,...a,...s])].sort((c,p)=>c-p).map(c=>{let p=gs(e,i,c)??"",u=gs(t,a,c)??0,d=gs(n,s,c);return {sourceIndex:c,label:p||d||`Region ${c+1}`,value:u,...d?{entityId:d}:{},code:Qk(d,r,o)??o(p)}})}function tM(e,t,r){return e==="none"?false:e==="bestFitOnly"?t>=18&&r>=10:true}function rM(e,t){if(!t)return String(e);try{return new Intl.NumberFormat(t,{maximumFractionDigits:2}).format(e)}catch{return String(e)}}function nM(e,t){let r=new Set(t?.subtotalIndices??(e.length>0?[e.length-1]:[])),o=[],n=0;for(let i=0;i<e.length;i++){let a=e[i]??0,s=r.has(i),l=s?0:n,c=s?a:n+a;o.push({sourceIndex:i,value:a,startValue:l,endValue:c,isSubtotal:s}),n=c;}return o}function oM(e){return Jo([{name:"Waterfall range",values:e.flatMap(t=>[t.startValue,t.endValue])}])}var iM="#22c55e",aM="#ef4444",sM="#6366f1",lM="#94a3b8";function cM(e,t,r){let o=Ke(e.width,e.height,t,true),n=t.series[0],i=n?.values??[],a=nM(i,n?.waterfallOptions),s=oM(a),l=Math.max(r.length,i.length,1),c=o.plotWidth/l*.6,p=o.plotWidth/l*.2,u=[],d=[];for(let w of a){let{sourceIndex:k,value:I,startValue:R,endValue:E,isSubtotal:N}=w,W=Y(R,s,o.plotTop,o.plotBottom),Z=Y(E,s,o.plotTop,o.plotBottom),ne=k,re=o.plotLeft+o.plotWidth/l*ne+p,U=Math.min(W,Z),V=Math.max(Math.abs(Z-W),1),K=N?sM:I>=0?iM:aM;if(u.push({kind:"rect",x:re,y:U,w:c,h:V,fill:K,rx:1,part:{role:"dataPoint",seriesIndex:0,pointIndex:k}}),t.style?.hasDataLabels&&d.push({kind:"text",x:re+c/2,y:U-4,text:le(I),fontSize:7,fill:"#334155",textAnchor:"middle"}),n?.waterfallOptions?.connectorLines!==false&&ne<i.length-1){let j=o.plotLeft+o.plotWidth/l*(ne+1)+p;u.push({kind:"line",x1:re+c,y1:Z,x2:j,y2:Z,stroke:lM,strokeWidth:.8,dashArray:"3 2"});}}let{gridlines:f,axisLabels:m}=Tr(s,o),h=Ir(s,o),g=Qo(r,o,"bar"),x=t.style?.legendPosition??"b",{legend:b,legendX:y,legendY:v,legendAnchor:S}=ct(t.series,t.colorPalette,o.svgWidth,x,o.svgHeight,o.plotTop),$=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:$,titleX:o.svgWidth/2,titleY:12,gridlines:f,axisLabels:m,zeroLine:h,categoryLabels:g,primitives:u,dataLabels:d,legend:t.style?.hasLegend?b:[],legendX:y,legendY:v,legendAnchor:S}}var pM={us:"US",usa:"US","united states":"US","united states of america":"US",ca:"CA",can:"CA",canada:"CA",br:"BR",bra:"BR",brazil:"BR",gb:"GB",gbr:"GB",uk:"GB","united kingdom":"GB",fr:"FR",fra:"FR",france:"FR",de:"DE",deu:"DE",germany:"DE",it:"IT",ita:"IT",italy:"IT",es:"ES",esp:"ES",spain:"ES",ru:"RU",rus:"RU",russia:"RU",cn:"CN",chn:"CN",china:"CN",in:"IN",ind:"IN",india:"IN",jp:"JP",jpn:"JP",japan:"JP",kr:"KR",kor:"KR","south korea":"KR",korea:"KR",au:"AU",aus:"AU",australia:"AU",mx:"MX",mex:"MX",mexico:"MX",id:"ID",idn:"ID",indonesia:"ID",tr:"TR",tur:"TR",turkey:"TR",sa:"SA",sau:"SA","saudi arabia":"SA",za:"ZA",zaf:"ZA","south africa":"ZA",ar:"AR",arg:"AR",argentina:"AR",ng:"NG",nga:"NG",nigeria:"NG",eg:"EG",egy:"EG",egypt:"EG"};function uM(e){let t=e.trim().toLowerCase();return pM[t]}function Hs(e,t,r){let o=g=>Math.max(0,Math.min(255,Math.round(g))),n=e.replace("#",""),i=t.replace("#",""),a=parseInt(n.substring(0,2),16),s=parseInt(n.substring(2,4),16),l=parseInt(n.substring(4,6),16),c=parseInt(i.substring(0,2),16),p=parseInt(i.substring(2,4),16),u=parseInt(i.substring(4,6),16),d=o(a+(c-a)*r),f=o(s+(p-s)*r),m=o(l+(u-l)*r),h=g=>g.toString(16).padStart(2,"0");return `#${h(d)}${h(f)}${h(m)}`}function dM(e){let t=Math.max(0,Math.min(1,e));return t<=.5?Hs("#dbeafe","#3b82f6",t*2):Hs("#3b82f6","#1e3a5f",(t-.5)*2)}function fM(e,t,r){return r===t?.5:(e-t)/(r-t)}var Ng=[{code:"US",name:"United States",path:"M130,160 L250,155 265,170 270,190 260,210 230,215 200,220 170,215 145,205 130,195Z M280,175 L295,165 310,170 310,185 295,195 280,190Z",labelXY:[200,190]},{code:"CA",name:"Canada",path:"M120,90 L280,85 290,100 295,130 280,150 250,155 200,155 160,155 130,155 115,140 110,115Z",labelXY:[200,125]},{code:"MX",name:"Mexico",path:"M145,215 L200,220 210,235 200,255 185,265 165,260 150,245 140,230Z",labelXY:[175,240]},{code:"BR",name:"Brazil",path:"M270,300 L310,280 335,290 340,320 330,355 310,370 285,365 265,345 260,320Z",labelXY:[300,330]},{code:"AR",name:"Argentina",path:"M260,370 L280,365 290,380 285,410 275,435 260,445 250,425 248,395Z",labelXY:[268,410]},{code:"GB",name:"United Kingdom",path:"M440,120 L448,110 455,115 455,135 448,142 440,138Z",labelXY:[448,128]},{code:"FR",name:"France",path:"M450,145 L470,140 480,150 478,168 465,175 450,170 445,158Z",labelXY:[463,158]},{code:"DE",name:"Germany",path:"M478,125 L498,120 505,130 502,148 490,152 478,148 475,138Z",labelXY:[490,138]},{code:"IT",name:"Italy",path:"M490,155 L498,152 505,162 500,180 492,190 488,178 486,165Z",labelXY:[495,172]},{code:"ES",name:"Spain",path:"M432,168 L460,165 465,175 460,188 442,192 430,185 428,175Z",labelXY:[448,180]},{code:"RU",name:"Russia",path:"M510,60 L780,50 830,70 840,100 820,120 750,115 700,105 650,100 580,105 530,110 510,100 505,80Z",labelXY:[670,85]},{code:"TR",name:"Turkey",path:"M530,165 L570,160 585,170 580,182 555,185 530,180Z",labelXY:[558,175]},{code:"EG",name:"Egypt",path:"M530,200 L555,195 565,205 560,225 545,230 530,222Z",labelXY:[548,215]},{code:"NG",name:"Nigeria",path:"M475,275 L500,270 510,280 505,298 490,302 475,295Z",labelXY:[492,288]},{code:"ZA",name:"South Africa",path:"M520,380 L545,370 560,380 555,400 540,410 520,405 515,392Z",labelXY:[538,392]},{code:"SA",name:"Saudi Arabia",path:"M565,220 L600,210 615,225 610,250 590,258 570,250 560,238Z",labelXY:[590,238]},{code:"IN",name:"India",path:"M640,210 L665,195 685,210 688,240 678,268 660,278 645,265 635,240Z",labelXY:[662,240]},{code:"CN",name:"China",path:"M700,120 L775,115 800,130 805,160 790,180 760,185 730,180 710,168 695,150 690,135Z",labelXY:[750,155]},{code:"JP",name:"Japan",path:"M835,145 L845,135 852,140 850,158 842,165 835,160Z",labelXY:[843,152]},{code:"KR",name:"South Korea",path:"M815,158 L825,152 830,160 827,170 818,172 813,165Z",labelXY:[822,163]},{code:"ID",name:"Indonesia",path:"M740,295 L780,288 810,292 830,298 825,310 790,312 755,308 740,305Z",labelXY:[785,302]},{code:"AU",name:"Australia",path:"M790,350 L850,340 880,355 885,385 870,405 840,410 810,400 790,380Z",labelXY:[838,378]}];function Bg(e){let t=e.path.match(/-?\d+(?:\.\d+)?/gu)?.map(Number)??[],r=[],o=[];for(let n=0;n<t.length;n+=2)r.push(t[n]??0),o.push(t[n+1]??0);return {minX:Math.min(...r),minY:Math.min(...o),maxX:Math.max(...r),maxY:Math.max(...o)}}function mM(e,t){if(!e||e==="world"||t.size===0)return {minX:0,minY:0,maxX:1e3,maxY:500};let r=Ng.filter(a=>t.has(a.code)),o=e==="countryRegion"?r.slice(0,1):r;if(o.length===0)return {minX:0,minY:0,maxX:1e3,maxY:500};let n=o.map(Bg),i=10;return {minX:Math.max(0,Math.min(...n.map(a=>a.minX))-i),minY:Math.max(0,Math.min(...n.map(a=>a.minY))-i),maxX:Math.min(1e3,Math.max(...n.map(a=>a.maxX))+i),maxY:Math.min(500,Math.max(...n.map(a=>a.maxY))+i)}}function hM(e,t,r){let o=Math.max(e.width,320),n=Math.max(e.height,200),i=r.length>0?r:t.categories,a=t.series[0],s=a?.regionMapOptions,l=eM(i,a?.values??[],s,uM),p=l.map(K=>K.value).filter(K=>Number.isFinite(K)),u=p.length>0?Math.min(...p):0,d=p.length>0?Math.max(...p):1,f=new Map,m=[];for(let K of l)K.code!==void 0?f.set(K.code,{value:K.value,label:K.label,sourceIndex:K.sourceIndex}):m.push({label:K.label,value:K.value});let h=30,g=14,x=Math.min(m.length,5),b=m.length>0?(x+1)*g+8:0,y=t.title?22:0,v=Math.max(n-y-h-b-8,80),S=mM(s?.viewedRegionType,f),$=Math.max(S.maxX-S.minX,1),w=Math.max(S.maxY-S.minY,1),k=Math.min((o-20)/$,v/w),I=(o-$*k)/2-S.minX*k,R=y+4-S.minY*k,E=[];E.push({kind:"rect",x:0,y:0,w:o,h:n,fill:"#f8fafc",rx:4});let N=t.title?{kind:"text",x:o/2,y:16,text:t.title,fontSize:12,fill:"#334155",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"auto"}:void 0;for(let K of Ng){let j=f.get(K.code),Q="#e2e8f0";if(j!==void 0){let ke=fM(j.value,u,d);Q=dM(ke);}let me=gM(K.path,k,I,R);E.push({kind:"path",d:me,fill:Q,stroke:"#94a3b8",strokeWidth:Math.max(.5/k,.3),...j?{part:{role:"dataPoint",seriesIndex:0,pointIndex:j.sourceIndex}}:{}});let he=Bg(K);if(j!==void 0&&tM(s?.regionLabelLayout,(he.maxX-he.minX)*k,(he.maxY-he.minY)*k)){let ke=K.labelXY[0]*k+I,Ie=K.labelXY[1]*k+R+4;E.push({kind:"text",x:ke,y:Ie,text:rM(j.value,s?.cultureLanguage),fontSize:Math.max(6,7*k),fill:"#1e293b",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"central"});}}let W=R+v+4,Z=Math.min(o*.4,160),ne=(o-Z)/2,re=[{offset:0,color:"#dbeafe"},{offset:.5,color:"#3b82f6"},{offset:1,color:"#1e3a5f"}],U=re.length-1;for(let K=0;K<U;K++){let j=re[K],Q=re[K+1];if(j===void 0||Q===void 0)continue;let me=Hs(j.color,Q.color,.5);E.push({kind:"rect",x:ne+j.offset*Z,y:W,w:(Q.offset-j.offset)*Z,h:8,fill:me,rx:K===0?4:0});}if(E.push({kind:"text",x:ne,y:W+18,text:le(u),fontSize:7,fill:"#64748b",textAnchor:"middle"},{kind:"text",x:ne+Z,y:W+18,text:le(d),fontSize:7,fill:"#64748b",textAnchor:"middle"}),s?.attribution&&E.push({kind:"text",x:o-4,y:n-4,text:s.attribution,fontSize:5,fill:"#64748b",textAnchor:"end"}),m.length>0){let K=W+26,j=Math.min(8,g*.7),Q=Math.min((o-20)/2,120),me=(o-Q*2)/2;E.push({kind:"text",x:o/2,y:K,text:"Additional regions (not shown on map)",fontSize:7,fill:"#94a3b8",textAnchor:"middle"});for(let he=0;he<x;he++){let ke=m[he];if(ke===void 0)continue;let Ie=K+g*(he+1);if(Ie+g>n)break;he%2===0&&E.push({kind:"rect",x:me,y:Ie-g+4,w:Q*2,h:g,fill:"#f1f5f9",rx:2}),E.push({kind:"text",x:me+4,y:Ie,text:ke.label,fontSize:j,fill:"#334155",textAnchor:"start"},{kind:"text",x:me+Q+4,y:Ie,text:le(ke.value),fontSize:j,fill:"#475569",textAnchor:"start"});}if(m.length>5){let he=K+g*6;E.push({kind:"text",x:o/2,y:he,text:`+${m.length-5} more regions`,fontSize:6,fill:"#94a3b8",textAnchor:"middle"});}}let V=N!==void 0?[N]:[];return {svgWidth:o,svgHeight:n,title:void 0,titleX:o/2,titleY:14,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],primitives:E,dataLabels:V,legend:[],legendX:o/2,legendY:n-8,legendAnchor:"middle"}}function gM(e,t,r,o){let n=e.trim().split(/[\s,]+/u),i=[],a=0;for(;a<n.length;){let s=n[a];if(s===void 0){a++;continue}if(/^[A-Za-z]$/u.test(s)){i.push(s),a++;continue}let l=parseFloat(s),c=parseFloat(n[a+1]??"0");!Number.isNaN(l)&&!Number.isNaN(c)?(i.push(`${(l*t+r).toFixed(2)},${(c*t+o).toFixed(2)}`),a+=2):(i.push(s),a++);}return i.join(" ")}var xM=["#4472C4","#ED7D31","#A5A5A5","#FFC000","#5B9BD5","#70AD47","#FF0000","#00B0F0"];function we(e,t){let r=t&&t.length>0?t:xM;return r[e%r.length]}function Fe(e,t,r){return e.color??we(t,r)}function Jo(e){let t=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(let a of e)for(let s of a.values)s<t&&(t=s),s>r&&(r=s);if(t===Number.POSITIVE_INFINITY)return {min:0,max:1,span:1};let o=Math.min(t,0),n=Math.max(r,0),i=Math.max(n-o,1);return {min:o,max:n,span:i}}function yM(e,t){let r=0,o=0;for(let s=0;s<t;s++){let l=0,c=0;for(let p of e){let u=p.values[s]??0;u>=0?l+=u:c+=u;}r=Math.max(r,l),o=Math.min(o,c);}let n=Math.min(o,0),i=Math.max(r,0),a=Math.max(i-n,1);return {min:n,max:i,span:a}}function Y(e,t,r,o){let n=o-r,i;if(t.logScale&&t.logBase){let a=t.logBase,s=Math.max(e,t.min),l=Math.log(s)/Math.log(a),c=Math.log(t.min)/Math.log(a);i=(l-c)/t.span;}else i=(e-t.min)/t.span;return t.reverseOrder?r+i*n:o-i*n}function le(e){return Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(1)}K`:Number.isInteger(e)?String(e):e.toFixed(1)}function Ke(e,t,r,o,n){let i=Math.max(320,e),a=Math.max(180,t),s=o?48:8,l=8,c=i-8,p=a-(o?24:8),u=r.style,d=u?.legendPosition??"b";if(u?.hasTitle&&(l+=20),u?.hasLegend&&(d==="b"?p-=20:d==="t"?l+=20:d==="r"?c-=80:d==="l"&&(s+=80)),n?.hasSecondaryValueAxis&&(c-=40),n?.hasSecondaryCategoryAxis&&(l+=16),n?.hasDataTable){let h=n.dataTableRowCount??1;p-=14+h*14;}let f=Math.max(c-s,1),m=Math.max(p-l,1);return {svgWidth:i,svgHeight:a,plotLeft:s,plotTop:l,plotRight:s+f,plotBottom:l+m,plotWidth:f,plotHeight:m}}var vM="#e2e8f0",Ug="#64748b",bM="#94a3b8",lh=5;function Tr(e,t){let r=[],o=[];for(let n=0;n<=lh;n++){let i=e.min+e.span/lh*n,a=Y(i,e,t.plotTop,t.plotBottom);r.push({kind:"line",x1:t.plotLeft,y1:a,x2:t.plotRight,y2:a,stroke:vM,strokeWidth:1}),o.push({kind:"text",x:t.plotLeft-4,y:a,text:le(i),fontSize:8,fill:Ug,textAnchor:"end",dominantBaseline:"central"});}return {gridlines:r,axisLabels:o}}function Ir(e,t){if(e.min>=0||e.max<=0)return;let r=Y(0,e,t.plotTop,t.plotBottom);return {kind:"line",x1:t.plotLeft,y1:r,x2:t.plotRight,y2:r,stroke:bM,strokeWidth:1}}function Qo(e,t,r){let o=Math.max(e.length,1);return e.map((n,i)=>({kind:"text",x:r==="bar"?t.plotLeft+t.plotWidth/o*(i+.5):o>1?t.plotLeft+t.plotWidth/(o-1)*i:t.plotLeft+t.plotWidth/2,y:t.plotBottom+12,text:n,fontSize:8,fill:Ug,textAnchor:"middle"}))}function ct(e,t,r,o,n,i){let a=e.map((p,u)=>({color:Fe(p,u,t),label:p.name})),s=r/2,l=n-8,c="middle";return o==="r"?(s=r-75,l=i,c="start"):o==="l"?(s=4,l=i,c="start"):o==="t"&&(l=28),{legend:a,legendX:s,legendY:l,legendAnchor:c}}function SM(e,t,r,o,n){let i=[],a=Math.max(e.length,1),s=r.plotWidth/Math.max(t,1),l=s*.7/a,c=(s-l*a)/2;for(let p=0;p<t;p++)for(let u=0;u<e.length;u++){let d=e[u].values[p]??0,f=r.plotLeft+s*p+c+l*u,m=Y(0,o,r.plotTop,r.plotBottom),h=Y(d,o,r.plotTop,r.plotBottom),g=Math.min(m,h),x=Math.max(Math.abs(m-h),1);i.push({x:f,y:g,w:l,h:x,fill:Fe(e[u],u,n)});}return i}function wM(e,t,r,o,n){let i=[],a=r.plotWidth/Math.max(t,1)*.7,s=(r.plotWidth/Math.max(t,1)-a)/2,l=Y(0,o,r.plotTop,r.plotBottom);for(let c=0;c<t;c++){let p=l,u=l;for(let d=0;d<e.length;d++){let f=e[d].values[c]??0;if(f===0)continue;let m=r.plotLeft+r.plotWidth/Math.max(t,1)*c+s,h=Math.max(Math.abs(Y(f,o,r.plotTop,r.plotBottom)-Y(0,o,r.plotTop,r.plotBottom)),1);if(f>0){let g=p-h;i.push({x:m,y:g,w:a,h,fill:Fe(e[d],d,n),seriesIndex:d,pointIndex:c}),p=g;}else {let g=u;i.push({x:m,y:g,w:a,h,fill:Fe(e[d],d,n),seriesIndex:d,pointIndex:c}),u=g+h;}}}return i}function jg(e,t,r,o){let n=Math.max(t,2);return e.map((i,a)=>{let s=n>1?a/(n-1):0,l=r.plotLeft+r.plotWidth*s,c=Y(i,o,r.plotTop,r.plotBottom);return {x:l,y:c}})}function Zs(e){return e.map(t=>`${t.x.toFixed(2)},${t.y.toFixed(2)}`).join(" ")}function Wo(e,t,r,o,n,i){let a=i-n>Math.PI?1:0,s=e+r*Math.cos(n),l=t+r*Math.sin(n),c=e+r*Math.cos(i),p=t+r*Math.sin(i),u;if(o>0){let g=e+o*Math.cos(n),x=t+o*Math.sin(n),b=e+o*Math.cos(i),y=t+o*Math.sin(i);u=`M${s},${l} A${r},${r} 0 ${a} 1 ${c},${p} L${b},${y} A${o},${o} 0 ${a} 0 ${g},${x} Z`;}else u=`M${e},${t} L${s},${l} A${r},${r} 0 ${a} 1 ${c},${p} Z`;let d=(n+i)/2,f=r*.7,m=e+f*Math.cos(d),h=t+f*Math.sin(d);return {d:u,midAngle:d,labelX:m,labelY:h}}function $M(e,t,r,o){let n=Math.min(Math.max(e,1),Math.max(t,1)),i=r.style?.hasTitle?20:0,a=r.style?.hasLegend?20:0,s=n/2,l=i+(n-i-a)/2,c=Math.max((n-i-a)*.42,0),p=o&&r.doughnutHoleSize!==void 0?Math.min(Math.max(r.doughnutHoleSize,10),90)/100:.55,u=o?c*p:0;return {cx:s,cy:l,outerR:c,innerR:u,size:n}}function kM(e,t,r,o,n,i){let a=e.reduce((l,c)=>l+Math.abs(c),0)||1,s=i?.startAngle??-Math.PI/2;return e.map((l,c)=>{let p=Math.abs(l)/a*Math.PI*2,u=s;s+=p;let d=i?.explosions?.[c]??0;if(d>0){let f=(u+s)/2,m=o*(d/100);return Wo(t+Math.cos(f)*m,r+Math.sin(f)*m,o,n,u,s)}return Wo(t,r,o,n,u,s)})}function Wg(e,t,r,o,n){let i=n?.slice(0,e.length).filter(Number.isFinite),a=i?.length?Math.min(...i):0,s=i?.length?Math.max(Math.max(...i)-a,1):t;return e.map((l,c)=>({cx:r.plotLeft+(s>0?(Number.isFinite(n?.[c])?n[c]-a:c)/s:0)*r.plotWidth,cy:Y(l,o,r.plotTop,r.plotBottom)}))}function MM(e,t,r){if(e===void 0)return r;let o=t>0?t:1;return r*.5+Math.abs(e)/o*r*1.5}function xl(e,t){let r=Math.max(t,1);return Math.PI*2*e/r-Math.PI/2}function TM(e,t,r,o,n,i){let a=t>0?t:1;return e.slice(0,Math.max(i,1)).map((s,l)=>{let c=xl(l,i),p=Math.abs(s)/a*r;return {x:o+p*Math.cos(c),y:n+p*Math.sin(c)}})}function IM(e,t,r,o){let n=Math.max(o,1);return Array.from({length:n},(i,a)=>{let s=xl(a,n);return `${(e+r*Math.cos(s)).toFixed(2)},${(t+r*Math.sin(s)).toFixed(2)}`}).join(" ")}function yl(e){switch(e){case "bar":case "bar3D":return "bar";case "line":case "line3D":return "line";case "area":case "area3D":return "area";case "pie":case "pie3D":case "ofPie":return "pie";case "doughnut":return "doughnut";case "scatter":return "scatter";case "bubble":return "bubble";case "radar":case "radar3D":return "radar";case "combo":return "combo";case "stock":return "stock";case "surface":case "surface3D":return "surface";case "treemap":return "treemap";case "waterfall":return "waterfall";case "regionMap":return "regionMap";case "funnel":return "funnel";case "sunburst":return "sunburst";case "histogram":return "histogram";case "boxWhisker":return "boxWhisker";default:return "unsupported"}}function Hg(e){if(e.type!=="chart")return ys(e.width,e.height,"Chart");let r=e.chartData;if(!r||r.series.length===0)return ys(e.width,e.height,r?.title??"Chart");let o=r.chartType??"bar",n=yl(o);if(n==="unsupported")return ys(e.width,e.height,r.title??o);let i=r.series.reduce((l,c)=>Math.max(l,c.values.length),0),a=r.categories.length>0?r.categories:Array.from({length:i},(l,c)=>String(c+1));if(o==="ofPie")return xs(zk(e,r,a),r);let s=CM(e,r,a,n);return _M(o)?xs(m5(s,o,r.view3D),r):xs(s,r)}function xs(e,t){let r=Jk(t.userShapes,e.svgWidth,e.svgHeight);return r.length===0?e:{...e,primitives:[...e.primitives,...r],userShapes:r}}function _M(e){return e==="bar3D"||e==="pie3D"||e==="line3D"||e==="area3D"}function CM(e,t,r,o){return o==="pie"||o==="doughnut"?AM(e,t,r,o==="doughnut"):o==="radar"?LM(e,t,r):o==="combo"?sk(e,t,r):o==="stock"?dk(e,t,r):o==="surface"?Yk(e,t,r):o==="treemap"?Vk(e,t,r):o==="waterfall"?cM(e,t,r):o==="regionMap"?hM(e,t,r):o==="funnel"?Ck(e,t,r):o==="sunburst"?Ak(e,t,r):o==="histogram"?Mk(e,t,r):o==="boxWhisker"?xk(e,t,r):ak(e,t,r,o)}function ys(e,t,r){let o=Math.max(e,100),n=Math.max(t,60);return {svgWidth:o,svgHeight:n,title:void 0,titleX:o/2,titleY:14,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],primitives:[{kind:"rect",x:4,y:4,w:o-8,h:n-8,fill:"#f1f5f9",rx:4}],dataLabels:[{kind:"text",x:o/2,y:n/2,text:r,fontSize:10,fill:"#94a3b8",textAnchor:"middle",dominantBaseline:"central"}],legend:[],legendX:o/2,legendY:n-8,legendAnchor:"middle"}}function AM(e,t,r,o){let{cx:n,cy:i,outerR:a,innerR:s,size:l}=$M(e.width,e.height,t,o),c=Math.max(l,100),p=Math.max(l,60),u=t.series[0],d=u?.values??[],f=-Math.PI/2+(t.firstSliceAngle??0)*Math.PI/180,m=u?d.map((k,I)=>n5(u,I)):void 0,h=kM(d,n,i,a,s,{startAngle:f,explosions:m}),g=h.map(({d:k},I)=>({kind:"path",d:k,fill:u?ll(u,I,we(I,t.colorPalette)):we(I,t.colorPalette),stroke:"#ffffff",strokeWidth:1.5,part:{role:"dataPoint",seriesIndex:0,pointIndex:I}})),x=[];if(t.style?.hasDataLabels){let k=Nk({slices:h,values:d,cx:n,cy:i,outerR:a,position:t.style.dataLabels?.position,showLeaderLines:t.style.dataLabels?.showLeaderLines});x.push(...k.labels),g.push(...k.leaderLines);}let b=t.style?.legendPosition??"b",y=r.map((k,I)=>({color:we(I,t.colorPalette),label:k})),v=c/2,S=p-8,$="middle";b==="t"&&(S=t.style?.hasTitle?24:8);let w=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:c,svgHeight:p,title:w,titleX:c/2,titleY:14,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],primitives:g,dataLabels:x,legend:t.style?.hasLegend?y:[],legendX:v,legendY:S,legendAnchor:$}}var vs=4,PM="#cbd5e1",EM="#94a3b8",OM="#64748b";function LM(e,t,r){let o=Ke(e.width,e.height,t,false),n=o.plotLeft+o.plotWidth/2,i=o.plotTop+o.plotHeight/2,a=Math.max(Math.min(o.plotWidth,o.plotHeight)/2-4,1),s=Math.max(r.length,1),l=Math.max(1,...t.series.flatMap(b=>b.values.map(y=>Math.abs(y)))),c=[],p=[];for(let b=1;b<=vs;b++){let y=a*b/vs;c.push({kind:"polygon",points:IM(n,i,y,s),fill:"none",stroke:PM,strokeWidth:.5,dashArray:b<vs?"3 2":void 0});}for(let b=0;b<s;b++){let y=xl(b,s);c.push({kind:"line",x1:n,y1:i,x2:n+a*Math.cos(y),y2:i+a*Math.sin(y),stroke:EM,strokeWidth:.5});let v=a+10;p.push({kind:"text",x:n+v*Math.cos(y),y:i+v*Math.sin(y),text:r[b]??"",fontSize:8,fill:OM,textAnchor:"middle",dominantBaseline:"central"});}let u=[];t.series.forEach((b,y)=>{let v=Fe(b,y,t.colorPalette),S=TM(b.values,l,a,n,i,s);if(S.length===0)return;let $=S.map(w=>`${w.x.toFixed(2)},${w.y.toFixed(2)}`).join(" ");c.push({kind:"polygon",points:$,fill:v,opacity:.2,stroke:v,strokeWidth:1.5,part:{role:"series",seriesIndex:y}}),S.forEach((w,k)=>{c.push({kind:"circle",cx:w.x,cy:w.y,r:3,fill:v,part:{role:"dataPoint",seriesIndex:y,pointIndex:k}});}),t.style?.hasDataLabels&&S.forEach((w,k)=>{let I=b.values[k];I!==void 0&&u.push({kind:"text",x:w.x,y:w.y-8,text:le(I),fontSize:7,fill:"#334155",textAnchor:"middle"});});});let d=t.style?.legendPosition??"b",{legend:f,legendX:m,legendY:h,legendAnchor:g}=ct(t.series,t.colorPalette,o.svgWidth,d,o.svgHeight,o.plotTop),x=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:x,titleX:o.svgWidth/2,titleY:12,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:p,primitives:c,dataLabels:u,legend:t.style?.hasLegend?f:[],legendX:m,legendY:h,legendAnchor:g}}var DM="data-chart-part",RM="data-chart-series",zM="data-chart-point";function Zg(e){let t={[DM]:e.role,[RM]:String(e.seriesIndex)};return e.pointIndex!==void 0&&(t[zM]=String(e.pointIndex)),t}var ee="pptx-vue";var pF=`
|
|
1
|
+
import {m,fj,xj,Ha as Ha$1,j,k,Xg as Xg$1,Yg as Yg$1,Zg as Zg$1,_g as _g$1,ah as ah$1,$g as $g$1,g,F as F$1,q as q$1,p,Jc as Jc$1,Bc as Bc$1,Gc as Gc$1,Cc as Cc$1,Dc as Dc$1,Fc as Fc$1,Ec as Ec$1,we as we$1}from'./chunk-RLV2GEN7.js';import {a}from'./chunk-WOT6VMZA.js';import nS from'dompurify';import*as L from'pptx-viewer-mcp';import*as D from'pptx-viewer-mcp/schemas';var Lo={background:"#030712",foreground:"#f3f4f6",card:"#111827",cardForeground:"#f3f4f6",popover:"#111827",popoverForeground:"#f3f4f6",primary:"#6366f1",primaryForeground:"#ffffff",secondary:"#1f2937",secondaryForeground:"#f3f4f6",muted:"#1f2937",mutedForeground:"#9ca3af",accent:"#1f2937",accentForeground:"#f3f4f6",destructive:"#ef4444",destructiveForeground:"#ffffff",border:"#374151",input:"#374151",ring:"#6366f1"},M0="0.5rem",oS={background:"#f8fafc",foreground:"#0f172a",card:"#ffffff",cardForeground:"#0f172a",popover:"#ffffff",popoverForeground:"#0f172a",primary:"#4f46e5",primaryForeground:"#ffffff",secondary:"#f1f5f9",secondaryForeground:"#0f172a",muted:"#f1f5f9",mutedForeground:"#64748b",accent:"#f1f5f9",accentForeground:"#0f172a",destructive:"#dc2626",destructiveForeground:"#ffffff",border:"#e2e8f0",input:"#e2e8f0",ring:"#4f46e5"},iS={colors:oS},T0={background:"background",foreground:"foreground",card:"card",cardForeground:"card-foreground",popover:"popover",popoverForeground:"popover-foreground",primary:"primary",primaryForeground:"primary-foreground",secondary:"secondary",secondaryForeground:"secondary-foreground",muted:"muted",mutedForeground:"muted-foreground",accent:"accent",accentForeground:"accent-foreground",destructive:"destructive",destructiveForeground:"destructive-foreground",border:"border",input:"input",ring:"ring"},I0=[{source:"primary",cssSuffix:"inspector-active"},{source:"border",cssSuffix:"inspector-border"}];function Kz(e,t=false){let r={};if(!e)return r;let o=e.colors;if(o){for(let[n,i]of Object.entries(T0)){let a=o[n];a!==void 0&&(t&&a===Lo[n]||(r[`--pptx-${i}`]=a,r[`--color-${i}`]=a));}for(let{source:n,cssSuffix:i}of I0){let a=o[n];a!==void 0&&(t&&a===Lo[n]||(r[`--pptx-${i}`]=a));}}if(e.radius!==void 0&&(!t||e.radius!==M0)){r["--pptx-radius"]=e.radius;let n=e.radius;r["--radius-sm"]=`calc(${n} - 4px)`,r["--radius-md"]=`calc(${n} - 2px)`,r["--radius-lg"]=n,r["--radius-xl"]=`calc(${n} + 4px)`;}if(e.cssVars)for(let[n,i]of Object.entries(e.cssVars))r[n]=i;return r}function qz(){let e={};for(let[t,r]of Object.entries(T0))e[`--pptx-${r}`]=Lo[t];for(let{source:t,cssSuffix:r}of I0)e[`--pptx-${r}`]=Lo[t];return e["--pptx-radius"]=M0,e}var aS={background:"#fbfaf7",foreground:"#1a1d21",card:"#ffffff",cardForeground:"#1a1d21",popover:"#ffffff",popoverForeground:"#1a1d21",primary:"#c2431f",primaryForeground:"#ffffff",secondary:"#f2efe8",secondaryForeground:"#1a1d21",muted:"#f2efe8",mutedForeground:"#5a626e",accent:"rgba(194, 67, 31, 0.08)",accentForeground:"#1a1d21",destructive:"#dc2626",destructiveForeground:"#ffffff",border:"#e6e2d9",input:"#e6e2d9",ring:"#c2431f"},sS={background:"#0f1113",foreground:"#f0efec",card:"#171a1e",cardForeground:"#f0efec",popover:"#171a1e",popoverForeground:"#f0efec",primary:"#e86a40",primaryForeground:"#ffffff",secondary:"#1f242b",secondaryForeground:"#f0efec",muted:"#1f242b",mutedForeground:"#9aa1ab",accent:"rgba(232, 106, 64, 0.1)",accentForeground:"#f0efec",destructive:"#ef4444",destructiveForeground:"#ffffff",border:"#272c33",input:"#272c33",ring:"#e86a40"},_0="0.375rem",lS={colors:aS,radius:_0},cS={colors:sS,radius:_0},Jz=[{key:"default",labelKey:"pptx.settings.theme.default",theme:void 0},{key:"light",labelKey:"pptx.settings.theme.light",theme:iS},{key:"vermilionLight",labelKey:"pptx.settings.theme.vermilionLight",theme:lS},{key:"vermilionDark",labelKey:"pptx.settings.theme.vermilionDark",theme:cS}];function mr(e){let t=m.find(r=>r.id===e);if(!t)throw new Error(`theme-gallery-presets: core THEME_PRESETS is missing "${e}"`);return t}var pS={id:"wisp",name:"Wisp",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#46393B",lt2:"#E8DCD8",accent1:"#A53010",accent2:"#DE7E18",accent3:"#9F8351",accent4:"#728653",accent5:"#92AA4C",accent6:"#6AAC91",hlink:"#FB4F14",folHlink:"#E25839"},fontScheme:{majorFont:{latin:"Century Gothic"},minorFont:{latin:"Century Gothic"}}},uS={id:"berlin",name:"Berlin",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#3E5C61",lt2:"#D5E0D0",accent1:"#F09415",accent2:"#C1B56B",accent3:"#89C2A3",accent4:"#729BBE",accent5:"#9A90C2",accent6:"#BE8DBE",hlink:"#25A0DA",folHlink:"#FF7F00"},fontScheme:{majorFont:{latin:"Trebuchet MS"},minorFont:{latin:"Trebuchet MS"}}},dS={id:"slice",name:"Slice",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#2E3B4C",lt2:"#C7CDD3",accent1:"#E2751D",accent2:"#C53B23",accent3:"#A13D69",accent4:"#58599E",accent5:"#36749D",accent6:"#4EA39A",hlink:"#FD6B32",folHlink:"#D14D0F"},fontScheme:{majorFont:{latin:"Century Gothic"},minorFont:{latin:"Century Gothic"}}},fS={id:"dividend",name:"Dividend",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#3D3D3D",lt2:"#E1E1E1",accent1:"#4D1434",accent2:"#903163",accent3:"#B2324B",accent4:"#D34817",accent5:"#E8971C",accent6:"#FDCB00",hlink:"#A03068",folHlink:"#C34882"},fontScheme:{majorFont:{latin:"Gill Sans MT"},minorFont:{latin:"Gill Sans MT"}}};[mr("office"),mr("facet"),mr("integral"),mr("ion"),mr("retrospect"),mr("organic"),pS,uS,dS,fS];function mS(e,t){for(let r of e){if(r.type==="media"){t.push(r);continue}r.type==="group"&&r.children?.length&&mS(r.children,t);}}function eF(e){let t=new Set,r=[],o=n=>{for(let i of n){if(i.type==="picture"||i.type==="image"){let a=i;a.imagePath&&!a.imageData&&!hr(a.imagePath)&&(t.add(a.imagePath),r.push({element:i,field:"imageData",path:a.imagePath})),a.svgPath&&!a.svgData&&!hr(a.svgPath)&&(t.add(a.svgPath),r.push({element:i,field:"svgData",path:a.svgPath}));}if(i.type==="media"){let a=i;a.posterFramePath&&!a.posterFrameData&&!hr(a.posterFramePath)&&(t.add(a.posterFramePath),r.push({element:i,field:"posterFrameData",path:a.posterFramePath}));}if(i.type==="model3d"){let a=i;a.modelPath&&!a.modelData&&!hr(a.modelPath)&&(t.add(a.modelPath),r.push({element:i,field:"modelData",path:a.modelPath}));let s=a.posterImage?!hr(a.posterImage):!a.imageData;a.imagePath&&s&&!hr(a.imagePath)&&(t.add(a.imagePath),r.push({element:i,field:"posterImage",path:a.imagePath}));}i.type==="group"&&i.children?.length&&o(i.children);}};for(let n of e)o(n.elements);return {paths:t,refs:r}}function hr(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:")||e.startsWith("blob:")}var tF=1280,rF=720,kr="#111827",hS="#3b82f6",er="#1f2937";function gS(e,t,r,o){if(!e)return;if(!Number.isFinite(t)||!Number.isFinite(r)||t<=0||r<=0)return Cc$1(e);if(o&&Object.keys(o).length>0){let a=Dc$1(e,t,r,o);if(a!==void 0)return a}let n=Fc$1(e,t,r,o);if(n!==void 0)return n;let i=Ec$1(e,t,r);return i!==void 0?i:Cc$1(e)}function xS(e,t,r,o,n){if(!e||!Number.isFinite(t)||!Number.isFinite(r)||t<=0||r<=0||!Number.isFinite(o)||!Number.isFinite(n)||o<=0||n<=0)return;let i=o/t,a=n/r,s=p=>{let u=Math.round(p*100)/100;return Object.is(u,-0)?"0":String(u)},l=e.match(/[MLCQZAHVmlcqzahv][^MLCQZAHVmlcqzahv]*/g)??[],c=[];for(let p of l){let d=p[0].toUpperCase();if(d==="Z"){c.push("Z");continue}let f=(p.slice(1).match(/-?[\d.]+(?:e-?\d+)?/gi)??[]).map(Number);if(d==="A"){let h=[];for(let g=0;g+6<f.length;g+=7)h.push(s(f[g]*i),s(f[g+1]*a),String(f[g+2]),String(f[g+3]),String(f[g+4]),s(f[g+5]*i),s(f[g+6]*a));c.push(`A ${h.join(" ")}`);continue}let m=f.map((h,g)=>s(h*(g%2===0?i:a)));c.push(`${d} ${m.join(" ")}`);}if(c.length!==0)return `path('${c.join(" ")}')`}function C0(e,t,r){let o=e.width,n=e.height,i=e;if(i.pathData&&i.pathWidth&&i.pathHeight){let l=xS(i.pathData,i.pathWidth,i.pathHeight,o,n);if(l)return l}let a=e.shapeType;if(!a)return;let s=e.shapeAdjustments;return gS(a,o,n,s)}function _e(e,t=kr){if(!e||e==="transparent")return t;let r=e.startsWith("#")?e:`#${e}`;return /^#[0-9A-Fa-f]{6}$/u.test(r)?r:t}function A0(e){return Math.min(1,Math.max(0,e))}function yS(e){let t=e.replace("#","");return /^[0-9a-fA-F]{6}$/u.test(t)?{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}:null}function P0(e,t){if(t===void 0)return e;let r=yS(e);return r?`rgba(${r.r}, ${r.g}, ${r.b}, ${A0(t)})`:e}function E0(e){return !e||e.length===0?[]:e.filter(t=>typeof t?.color=="string"&&String(t.color).trim().length>0&&typeof t?.position=="number"&&Number.isFinite(t.position)).map(t=>({color:_e(String(t.color),hS),position:Math.max(0,Math.min(100,t.position)),opacity:typeof t.opacity=="number"&&Number.isFinite(t.opacity)?A0(t.opacity):void 0})).sort((t,r)=>t.position-r.position)}function Xo(e){let t=typeof e.opacity=="number"?P0(e.color,e.opacity):e.color,r=Math.max(0,Math.min(100,e.position)),o=r===Math.round(r)?`${r}%`:`${r.toFixed(1)}%`;return `${t} ${o}`}function Do(e,t){if(e){let{l:r,t:o,r:n,b:i}=e,a=(r+(1-n))/2*100,s=(o+(1-i))/2*100;if(t){let l=t.x*100,c=t.y*100;a=(a+l)/2,s=(s+c)/2;}return {cx:a,cy:s}}return t?{cx:t.x*100,cy:t.y*100}:{cx:50,cy:50}}function vS(e,t,r){let o=e.map(Xo).join(", "),{cx:n,cy:i}=Do(r,t),a=Math.round(n)===50&&!t&&!r?"center":`${Math.round(n)}%`,s=Math.round(i)===50&&!t&&!r?"center":`${Math.round(i)}%`;if(r){let l=Math.max(n,100-n,i,100-i);return `radial-gradient(circle ${Math.round(l)}% at ${a} ${s}, ${o})`}return `radial-gradient(circle at ${a} ${s}, ${o})`}function bS(e,t,r){let o=e.map(Xo).join(", ");if(r){let{l:a,t:s,r:l,b:c}=r,{cx:p,cy:u}=Do(r,t),d=Math.max(p,100-p),f=Math.max(u,100-u),m=`${Math.round(p)}%`,h=`${Math.round(u)}%`,g=(1-a-l)/2*100,x=(1-s-c)/2*100;if(g>.5&&x>.5&&Math.abs(d-f)>1){let b=g/x,y=Math.round(f*b),v=Math.round(f);return `radial-gradient(${y}% ${v}% at ${m} ${h}, ${o})`}return `radial-gradient(${Math.round(d)}% ${Math.round(f)}% at ${m} ${h}, ${o})`}let n=t?`${Math.round(t.x*100)}%`:"center",i=t?`${Math.round(t.y*100)}%`:"center";return `radial-gradient(ellipse at ${n} ${i}, ${o})`}function SS(e,t,r){let o=e.map(Xo).join(", ");if(r){let{l,t:c,r:p,b:u}=r,{cx:d,cy:f}=Do(r,t),m=`${Math.round(d)}%`,h=`${Math.round(f)}%`,g=Math.max(d,100-d),x=Math.max(f,100-f),b=(1-l-p)/2*100,y=(1-c-u)/2*100;if(b>.5&&y>.5&&Math.abs(b-y)>1){let v=b/y,S=Math.round(Math.max(g,x*v)),$=Math.round(Math.max(x,g/v));return `radial-gradient(${S}% ${$}% at ${m} ${h}, ${o})`}return g>.5||x>.5?`radial-gradient(${Math.round(g)}% ${Math.round(x)}% at ${m} ${h}, ${o})`:`radial-gradient(farthest-side at ${m} ${h}, ${o})`}let{cx:n,cy:i}=Do(void 0,t),a=t?`${Math.round(n)}%`:"center",s=t?`${Math.round(i)}%`:"center";return `radial-gradient(farthest-side at ${a} ${s}, ${o})`}function wS(e){if(!(!e||e==="none"))switch(e){case "x":return {backgroundSize:"50% 100%",backgroundRepeat:"repeat-x"};case "y":return {backgroundSize:"100% 50%",backgroundRepeat:"repeat-y"};case "xy":return {backgroundSize:"50% 50%",backgroundRepeat:"repeat"};default:return}}function $S(e){if(!e)return;let{l:t,t:r,r:o,b:n}=e,i=1-t-o,a=1-r-n;if(i<=0||a<=0||Math.abs(i-1)<.001&&Math.abs(a-1)<.001)return;let s=1-i>.001?t/(1-i)*100:0,l=1-a>.001?r/(1-a)*100:0;return {backgroundSize:`${Math.round(i*100)}% ${Math.round(a*100)}%`,backgroundPosition:`${Math.round(s)}% ${Math.round(l)}%`,backgroundRepeat:"no-repeat"}}function kS(e){if(e.length===0)return [];let t=e.map(o=>({...o,position:o.position/2})),r=[...e].reverse().map(o=>({...o,position:50+(100-o.position)/2}));return [...t,...r]}function Dm(e){return (e%360+360)%360}function MS(e,t,r){if(!r)return e;let o=e,{width:n,height:i,rotation:a}=r;if(t.fillGradientScaled!==false&&typeof n=="number"&&typeof i=="number"&&n>0&&i>0&&n!==i){let s=o*Math.PI/180;o=Dm(Math.atan2(i*Math.sin(s),n*Math.cos(s))*180/Math.PI);}return t.fillGradientRotWithShape===false&&typeof a=="number"&&(o=Dm(o-a)),o}function O0(e,t){if(!e||e.fillMode!=="gradient")return;let r=E0(e.fillGradientStops);if(r.length===0)return e.fillGradient;if((e.fillGradientType||"linear")==="radial"){let l=e.fillGradientPathType||"circle",c=e.fillGradientFocalPoint,p=e.fillGradientFillToRect;return l==="rect"?bS(r,c,p):l==="shape"?SS(r,c,p):vS(r,c,p)}let n=typeof e.fillGradientAngle=="number"&&Number.isFinite(e.fillGradientAngle)?e.fillGradientAngle:90,i=MS(n,e,t),a=e.fillGradientFlip,s=a&&a!=="none"?kS(r):r;return `linear-gradient(${Math.round(i)}deg, ${s.map(Xo).join(", ")})`}function $n(e,t,r){let n="http://www.w3.org/2000/svg",i=(p,u,d)=>`<svg xmlns="${n}" width="${p}" height="${u}">${d}</svg>`,a=(p,u,d,f,m)=>`<rect x="${p}" y="${u}" width="${d}" height="${f}" fill="${m}"/>`,s=(p,u)=>a(0,0,p,u,r),l=(p,u,d,f,m,h,g="")=>`<line x1="${p}" y1="${u}" x2="${d}" y2="${f}" stroke="${m}" stroke-width="${h}"${g}/>`,c=(p,u,d,f)=>`<circle cx="${p}" cy="${u}" r="${d}" fill="${f}"/>`;switch(e){case "pct5":return i(8,8,s(8,8)+a(0,0,1,1,t));case "pct10":return i(8,8,s(8,8)+a(0,0,1,1,t)+a(4,4,1,1,t));case "pct20":return i(4,4,s(4,4)+a(0,0,1,1,t)+a(2,2,1,1,t));case "pct25":return i(4,4,s(4,4)+a(0,0,1,1,t)+a(2,0,1,1,t)+a(1,2,1,1,t)+a(3,2,1,1,t));case "pct30":return i(4,4,s(4,4)+a(0,0,1,1,t)+a(2,0,1,1,t)+a(1,1,1,1,t)+a(3,1,1,1,t)+a(0,2,1,1,t)+a(2,2,1,1,t));case "pct40":return i(4,4,s(4,4)+a(0,0,2,1,t)+a(1,1,1,1,t)+a(3,1,1,1,t)+a(0,2,2,1,t)+a(1,3,1,1,t)+a(3,3,1,1,t));case "pct50":return i(2,2,s(2,2)+a(0,0,1,1,t)+a(1,1,1,1,t));case "pct60":return i(4,4,a(0,0,4,4,t)+a(0,0,2,1,r)+a(1,2,2,1,r));case "pct70":return i(4,4,a(0,0,4,4,t)+a(0,0,1,1,r)+a(2,0,1,1,r)+a(1,2,1,1,r)+a(3,2,1,1,r));case "pct75":return i(4,4,a(0,0,4,4,t)+a(0,0,1,1,r)+a(2,2,1,1,r));case "pct80":return i(4,4,a(0,0,4,4,t)+a(0,0,1,1,r));case "pct90":return i(8,8,a(0,0,8,8,t)+a(0,0,1,1,r));case "horz":return i(8,8,s(8,8)+a(0,3,8,2,t));case "ltHorz":return i(8,8,s(8,8)+a(0,0,8,1,t));case "dkHorz":return i(8,8,s(8,8)+a(0,0,8,4,t));case "narHorz":return i(8,4,s(8,4)+a(0,0,8,1,t)+a(0,2,8,1,t));case "wdHorz":return i(8,12,s(8,12)+a(0,0,8,2,t));case "vert":return i(8,8,s(8,8)+a(3,0,2,8,t));case "ltVert":return i(8,8,s(8,8)+a(0,0,1,8,t));case "dkVert":return i(8,8,s(8,8)+a(0,0,4,8,t));case "narVert":return i(4,8,s(4,8)+a(0,0,1,8,t)+a(2,0,1,8,t));case "wdVert":return i(12,8,s(12,8)+a(0,0,2,8,t));case "dashHorz":return i(8,4,s(8,4)+a(0,0,4,1,t));case "dashVert":return i(4,8,s(4,8)+a(0,0,1,4,t));case "cross":return i(8,8,s(8,8)+a(3,0,2,8,t)+a(0,3,8,2,t));case "dnDiag":return i(8,8,s(8,8)+l(0,0,8,8,t,2)+l(-8,0,0,8,t,2)+l(8,0,16,8,t,2));case "ltDnDiag":return i(8,8,s(8,8)+l(0,0,8,8,t,1)+l(-8,0,0,8,t,1)+l(8,0,16,8,t,1));case "dkDnDiag":return i(8,8,s(8,8)+l(0,0,8,8,t,3)+l(-8,0,0,8,t,3)+l(8,0,16,8,t,3));case "wdDnDiag":return i(12,12,s(12,12)+l(0,0,12,12,t,4)+l(-12,0,0,12,t,4)+l(12,0,24,12,t,4));case "dashDnDiag":return i(8,8,s(8,8)+l(0,0,8,8,t,1,' stroke-dasharray="4,4"'));case "upDiag":return i(8,8,s(8,8)+l(0,8,8,0,t,2)+l(-8,8,0,0,t,2)+l(8,8,16,0,t,2));case "ltUpDiag":return i(8,8,s(8,8)+l(0,8,8,0,t,1)+l(-8,8,0,0,t,1)+l(8,8,16,0,t,1));case "dkUpDiag":return i(8,8,s(8,8)+l(0,8,8,0,t,3)+l(-8,8,0,0,t,3)+l(8,8,16,0,t,3));case "wdUpDiag":return i(12,12,s(12,12)+l(0,12,12,0,t,4)+l(-12,12,0,0,t,4)+l(12,12,24,0,t,4));case "dashUpDiag":return i(8,8,s(8,8)+l(0,8,8,0,t,1,' stroke-dasharray="4,4"'));case "diagCross":return i(8,8,s(8,8)+l(0,0,8,8,t,1)+l(-8,0,0,8,t,1)+l(8,0,16,8,t,1)+l(0,8,8,0,t,1)+l(-8,8,0,0,t,1)+l(8,8,16,0,t,1));case "smCheck":return i(4,4,s(4,4)+a(0,0,2,2,t)+a(2,2,2,2,t));case "lgCheck":return i(8,8,s(8,8)+a(0,0,4,4,t)+a(4,4,4,4,t));case "smGrid":return i(8,8,s(8,8)+a(0,0,8,1,t)+a(0,0,1,8,t));case "lgGrid":return i(16,16,s(16,16)+a(0,0,16,1,t)+a(0,0,1,16,t));case "dotGrid":return i(8,8,s(8,8)+c(0,0,.5,t)+c(4,0,.5,t)+c(0,4,.5,t)+c(4,4,.5,t)+a(0,0,8,.5,t)+a(0,0,.5,8,t));case "smConfetti":return i(8,8,s(8,8)+a(1,0,1,1,t)+a(5,1,1,1,t)+a(3,3,1,1,t)+a(7,2,1,1,t)+a(0,5,1,1,t)+a(4,6,1,1,t)+a(2,7,1,1,t)+a(6,5,1,1,t));case "lgConfetti":return i(8,8,s(8,8)+a(0,0,2,2,t)+a(5,1,2,2,t)+a(2,4,2,2,t)+a(6,5,2,2,t));case "horzBrick":return i(8,8,s(8,8)+a(0,0,8,1,t)+a(0,0,1,4,t)+a(0,4,8,1,t)+a(4,4,1,4,t));case "diagBrick":return i(8,8,s(8,8)+l(0,4,4,0,t,1)+l(4,8,8,4,t,1)+l(0,8,8,0,t,1));case "solidDmnd":return i(8,8,`${s(8,8)}<polygon points="4,0 8,4 4,8 0,4" fill="${t}"/>`);case "openDmnd":return i(8,8,s(8,8)+l(4,0,8,4,t,1)+l(8,4,4,8,t,1)+l(4,8,0,4,t,1)+l(0,4,4,0,t,1));case "dotDmnd":return i(8,8,s(8,8)+c(4,0,.75,t)+c(8,4,.75,t)+c(4,8,.75,t)+c(0,4,.75,t)+c(4,4,.75,t));case "plaid":return i(8,8,s(8,8)+a(0,0,4,4,t)+a(0,0,8,1,t)+a(0,2,8,1,t)+a(0,0,1,8,t)+a(2,0,1,8,t));case "sphere":{let p=`<defs><radialGradient id="sph" cx="35%" cy="35%" r="60%"><stop offset="0%" stop-color="${r}" stop-opacity="0.8"/><stop offset="100%" stop-color="${t}" stop-opacity="1"/></radialGradient></defs>`;return i(8,8,`${s(8,8)}${p}<circle cx="4" cy="4" r="3.5" fill="url(#sph)"/>`)}case "weave":return i(8,8,s(8,8)+l(0,0,4,4,t,1.5)+l(4,4,0,8,t,1.5)+l(8,0,4,4,t,1.5)+l(4,4,8,8,t,1.5)+l(4,0,8,4,t,1.5)+l(0,4,4,8,t,1.5));case "divot":return i(8,8,s(8,8)+l(2,1,2,3,t,1)+l(1,2,3,2,t,1)+l(6,5,6,7,t,1)+l(5,6,7,6,t,1));case "shingle":return i(8,8,s(8,8)+l(0,0,8,8,t,1)+l(0,8,4,4,t,1)+a(0,7,8,1,t));case "wave":return i(8,8,`${s(8,8)}<path d="M0,2 Q2,0 4,2 Q6,4 8,2" stroke="${t}" stroke-width="1" fill="none"/><path d="M0,6 Q2,4 4,6 Q6,8 8,6" stroke="${t}" stroke-width="1" fill="none"/>`);case "trellis":return i(4,4,s(4,4)+a(0,0,4,1,t)+a(0,2,4,1,t)+a(0,0,1,4,t)+a(2,0,1,4,t));case "zigZag":return i(8,8,`${s(8,8)}<path d="M0,4 L2,0 L4,4 L6,0 L8,4" stroke="${t}" stroke-width="1" fill="none"/><path d="M0,8 L2,4 L4,8 L6,4 L8,8" stroke="${t}" stroke-width="1" fill="none"/>`);default:return null}}function TS(e,t){if(!e||e.fillMode!=="pattern"||!e.fillPatternPreset)return;let r=_e(e.fillColor,"#000000"),o=_e(e.fillPatternBackgroundColor,"#ffffff"),n=e.fillPatternPreset,i=$n(n,r,o);return i?{backgroundImage:`url("data:image/svg+xml,${encodeURIComponent(i)}")`,backgroundColor:o}:void 0}function kn(e,t){if(!k(e))return;let r=e.shapeStyle;return r?r.fillMode==="group"?t?Rm(t,e):{}:Rm(r,e):{}}function Rm(e,t){let r=e.fillMode==="image"&&e.fillImageUrl?e.fillImageUrl:void 0;if(r){let a=e.fillImageMode==="tile";return {backgroundColor:"transparent",backgroundImage:`url(${r})`,backgroundRepeat:a?"repeat":"no-repeat",backgroundSize:a?"auto":"100% 100%"}}let o={rotation:t.rotation,width:t.width,height:t.height},n=O0(e,o)??(e.fillMode==="gradient"?e.fillGradient:void 0);if(n){let s=e.fillMode==="gradient"&&(e.fillGradientType||"linear")==="linear"&&E0(e.fillGradientStops).length>0?wS(e.fillGradientFlip):void 0;if(s)return {backgroundImage:n,backgroundSize:s.backgroundSize,backgroundRepeat:s.backgroundRepeat};let l=e.fillMode==="gradient"?$S(e.fillGradientTileRect):void 0;return l?{backgroundImage:n,backgroundSize:l.backgroundSize,backgroundPosition:l.backgroundPosition,backgroundRepeat:l.backgroundRepeat}:{backgroundImage:n}}let i=TS(e,t.id);return i?{backgroundColor:i.backgroundColor,backgroundImage:i.backgroundImage,backgroundRepeat:"repeat",backgroundSize:"auto",svgFilter:i.svgFilter}:e.fillColor&&e.fillColor!=="transparent"&&e.fillMode!=="none"?{backgroundColor:P0(e.fillColor,e.fillOpacity)}:{}}function L0(e){return e.type==="group"?e.groupFill:void 0}function D0(e,t){if(!(!t||!k(e)||e.shapeStyle?.fillMode!=="group"))return kn(e,t)}function _S(e){let t=String(e||"").trim().toLowerCase();return t?{solid:"solid",dot:"dot",dash:"dash",lgdash:"lgDash",dashdot:"dashDot",lgdashdot:"lgDashDot",lgdashdotdot:"lgDashDotDot",sysdot:"sysDot",sysdash:"sysDash",sysdashdot:"sysDashDot",sysdashdotdot:"sysDashDotDot",custom:"custom"}[t]:void 0}function Ko(e,t){return t==="dbl"||t==="thickThin"||t==="thinThick"||t==="tri"||!e||e==="solid"?"solid":e==="dot"||e==="sysDot"?"dotted":"dashed"}function CS(e,t,r){if(!e||e==="solid")return;let o=Math.max(t,1);if(e==="custom"&&r&&r.length>0)return r.flatMap(n=>[n.dash/1e3*o,n.space/1e3*o]).join(" ");switch(e){case "dot":case "sysDot":return `${o} ${o*2}`;case "dash":case "sysDash":return `${o*4} ${o*2}`;case "lgDash":return `${o*7} ${o*2.5}`;case "dashDot":case "sysDashDot":return `${o*4} ${o*2} ${o} ${o*2}`;case "lgDashDot":return `${o*7} ${o*2.5} ${o} ${o*2.5}`;case "lgDashDotDot":case "sysDashDotDot":return `${o*7} ${o*2.5} ${o} ${o*2} ${o} ${o*2}`;case "custom":return `${o*3} ${o*2}`;default:return}}var Mn="#000000",nl="#ffff00";function R0(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function bt(e){return Math.min(1,Math.max(0,e))}function Ot(e,t){if(!e||e==="transparent")return t;let r=e.startsWith("#")?e:`#${e}`;return /^#[0-9A-Fa-f]{6}$/u.test(r)?r:t}function AS(e){let t=e.replace("#","");return /^[0-9a-fA-F]{6}$/u.test(t)?{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}:null}function vt(e,t){if(t===void 0)return e;let r=AS(e);return r?`rgba(${r.r}, ${r.g}, ${r.b}, ${bt(t)})`:e}function PS(e){if(!e?.shadowColor||e.shadowColor==="transparent")return;let t,r;if(typeof e.shadowAngle=="number"&&typeof e.shadowDistance=="number"){let l=e.shadowAngle*Math.PI/180;t=Math.cos(l)*e.shadowDistance,r=Math.sin(l)*e.shadowDistance;}else t=typeof e.shadowOffsetX=="number"&&Number.isFinite(e.shadowOffsetX)?e.shadowOffsetX:4,r=typeof e.shadowOffsetY=="number"&&Number.isFinite(e.shadowOffsetY)?e.shadowOffsetY:4;let o=typeof e.shadowBlur=="number"&&Number.isFinite(e.shadowBlur)?Math.max(0,e.shadowBlur):6,n=typeof e.shadowOpacity=="number"&&Number.isFinite(e.shadowOpacity)?bt(e.shadowOpacity):.35,i=ES(e.shadowScaleX,e.shadowScaleY,o),a=vt(Ot(e.shadowColor,Mn),n),s=`${Math.round(t)}px ${Math.round(r)}px ${Math.round(o)}px`;return i===0?`${s} ${a}`:`${s} ${i}px ${a}`}function ES(e,t,r){let o=typeof e=="number"&&Number.isFinite(e)?e/1e5:1,n=typeof t=="number"&&Number.isFinite(t)?t/1e5:1,i=(o+n)/2;if(i===1)return 0;let a=Math.max(r,4);return Math.round(a*(i-1))}function OS(e){if(!e?.innerShadowColor||e.innerShadowColor==="transparent")return;let t=typeof e.innerShadowOffsetX=="number"&&Number.isFinite(e.innerShadowOffsetX)?e.innerShadowOffsetX:0,r=typeof e.innerShadowOffsetY=="number"&&Number.isFinite(e.innerShadowOffsetY)?e.innerShadowOffsetY:0,o=typeof e.innerShadowBlur=="number"&&Number.isFinite(e.innerShadowBlur)?Math.max(0,e.innerShadowBlur):6,n=typeof e.innerShadowOpacity=="number"&&Number.isFinite(e.innerShadowOpacity)?bt(e.innerShadowOpacity):.5;return `inset ${Math.round(t)}px ${Math.round(r)}px ${Math.round(o)}px ${vt(Ot(e.innerShadowColor,Mn),n)}`}function LS(e){if(!e?.shadows||e.shadows.length===0)return;let t=[];for(let r of e.shadows){if(!r.color||r.color==="transparent")continue;let o=(r.angle??0)*Math.PI/180,n=r.distance??0,i=Math.round(Math.cos(o)*n),a=Math.round(Math.sin(o)*n),s=Math.round(Math.max(0,r.blur??6)),l=bt(r.opacity??.35),c=vt(Ot(r.color,Mn),l);t.push(`${i}px ${a}px ${s}px ${c}`);}return t.length>0?t.join(", "):void 0}function DS(e,t,r){if(!e||e==="transparent"||!t||t<=0)return;let o=typeof r=="number"?bt(r):.75,n=Ot(e,nl),i=Math.round(t*.33),a=vt(n,o),s=Math.round(t*.66),l=vt(n,o*.6),c=Math.round(t),p=vt(n,o*.3);return `0 0 ${i}px ${a}, 0 0 ${s}px ${l}, 0 0 ${c}px ${p}`}function RS(e,t={}){if(!e)return;let r=[],o=LS(e);if(o)r.push(o);else {let i=PS(e);i&&r.push(i);}let n=OS(e);if(n&&r.push(n),t.includeGlow!==false){let i=DS(e.glowColor,e.glowRadius,e.glowOpacity);i&&r.push(i);}return r.length>0?r.join(", "):void 0}function z0(e){if(!(!e?.lineShadowColor||e.lineShadowColor==="transparent"))return {offsetX:typeof e.lineShadowOffsetX=="number"?e.lineShadowOffsetX:2,offsetY:typeof e.lineShadowOffsetY=="number"?e.lineShadowOffsetY:2,blur:typeof e.lineShadowBlur=="number"?Math.max(0,e.lineShadowBlur):4,color:Ot(e.lineShadowColor,Mn),opacity:typeof e.lineShadowOpacity=="number"?bt(e.lineShadowOpacity):.35}}function F0(e){if(!e?.lineGlowColor||e.lineGlowColor==="transparent"||!e.lineGlowRadius)return;let t=typeof e.lineGlowOpacity=="number"?e.lineGlowOpacity:.75,r=Math.round(Math.max(0,e.lineGlowRadius)),o=vt(Ot(e.lineGlowColor,nl),t);return `drop-shadow(0 0 ${r}px ${o})`}function zS(e,t){if(!e)return;let r=[];if(e.dagGrayscale&&r.push("grayscale(1)"),typeof e.dagBiLevel=="number"){let o=Math.max(0,Math.min(100,e.dagBiLevel));r.push(o>50?"contrast(1000)":"contrast(0.01)");}if(typeof e.dagLumBrightness=="number"||typeof e.dagLumContrast=="number"){let o=e.dagLumBrightness??0,n=e.dagLumContrast??0;o!==0&&r.push(`brightness(${1+o/100})`),n!==0&&r.push(`contrast(${1+n/100})`);}if(typeof e.dagHslHue=="number"&&e.dagHslHue!==0&&r.push(`hue-rotate(${e.dagHslHue}deg)`),typeof e.dagHslSaturation=="number"&&e.dagHslSaturation!==100&&r.push(`saturate(${e.dagHslSaturation/100})`),typeof e.dagHslLuminance=="number"&&e.dagHslLuminance!==0&&r.push(`brightness(${1+e.dagHslLuminance/100})`),typeof e.dagAlphaModFix=="number"){let o=bt(e.dagAlphaModFix/100);r.push(`opacity(${o})`);}if(typeof e.dagTintHue=="number"||typeof e.dagTintAmount=="number"){let o=e.dagTintHue??0,n=Math.max(0,Math.min(100,e.dagTintAmount??50));r.push(`sepia(${n/100}) hue-rotate(${o}deg)`);}return e.dagDuotone&&t&&r.push(`url(#${B0(t)})`),r.length>0?r.join(" "):void 0}function FS(e,t){if(!e)return;let r=[];if(e.glowColor&&e.glowColor!=="transparent"&&e.glowRadius){let n=typeof e.glowOpacity=="number"?e.glowOpacity:.75,i=Math.round(Math.max(0,e.glowRadius)),a=vt(Ot(e.glowColor,nl),n);r.push(`drop-shadow(0 0 ${i}px ${a})`);}typeof e.softEdgeRadius=="number"&&e.softEdgeRadius>0&&(t?r.push(`url(#${j0(t)})`):r.push(`blur(${Math.min(2,Math.round(e.softEdgeRadius))}px)`)),typeof e.blurRadius=="number"&&e.blurRadius>0&&r.push(`blur(${Math.round(e.blurRadius)}px)`);let o=zS(e,t);return o&&r.push(o),r.length>0?r.join(" "):void 0}function NS(e,t,r,o,n=0,i=0){let a=o+n*2,s=(t+r)/2,l=Math.round(a*.5),c=Math.round(Math.max(0,Math.min(i,a-1))),p=c>0?`rgba(255,255,255,${t}) ${c}px, `:"";return n>0?`below ${Math.round(e)}px linear-gradient(to bottom, rgba(255,255,255,${t}), ${p}rgba(255,255,255,${s}) ${l}px, rgba(255,255,255,${r}) ${a}px)`:`below ${Math.round(e)}px linear-gradient(to bottom, rgba(255,255,255,${t}), ${p}rgba(255,255,255,${r}) ${o}px)`}function BS(e,t){if(!e||!(typeof e.reflectionStartOpacity=="number"&&e.reflectionStartOpacity>0||typeof e.reflectionDistance=="number"&&e.reflectionDistance>0||typeof e.reflectionBlurRadius=="number"&&e.reflectionBlurRadius>0))return;let o=e.reflectionDistance??0,n=typeof e.reflectionStartOpacity=="number"?e.reflectionStartOpacity:.5,i=typeof e.reflectionEndOpacity=="number"?e.reflectionEndOpacity:0,a=typeof e.reflectionEndPosition=="number"?Math.round(e.reflectionEndPosition*Math.max(t,1)):100,s=typeof e.reflectionBlurRadius=="number"?e.reflectionBlurRadius:0,l=typeof e.reflectionStartPosition=="number"&&e.reflectionStartPosition>0?Math.round(bt(e.reflectionStartPosition)*a):0;return {webkitBoxReflect:NS(o,n,i,a,s,l),distance:o,startOpacity:n,endOpacity:i,fadeLength:a,blurRadius:s}}function US(e){if(!(!e||typeof e.dagAlphaModFix!="number"))return bt(e.dagAlphaModFix/100)}function N0(e){switch(e){case "mult":return "multiply";case "screen":return "screen";case "darken":return "darken";case "lighten":return "lighten";default:return}}function jS(e){if(!e?.dagFillOverlayColor||e.dagFillOverlayColor==="transparent")return;let t=N0(e.dagFillOverlayBlend)??"normal";return {color:vt(Ot(e.dagFillOverlayColor,Mn),e.dagFillOverlayOpacity),blendMode:t}}function B0(e){return `dag-duotone-${e}`}function zm(e){let t=e.replace("#",""),r=Number.parseInt(t.substring(0,2),16)/255,o=Number.parseInt(t.substring(2,4),16)/255,n=Number.parseInt(t.substring(4,6),16)/255;return {r:Number.isFinite(r)?r:0,g:Number.isFinite(o)?o:0,b:Number.isFinite(n)?n:0}}function U0(e,t){if(!e?.dagDuotone)return;let r=B0(t),o=zm(e.dagDuotone.color1),n=zm(e.dagDuotone.color2),i=[.2126,.7152,.0722,0,0,.2126,.7152,.0722,0,0,.2126,.7152,.0722,0,0,0,0,0,1,0].join(" "),a=n.r-o.r,s=n.g-o.g,l=n.b-o.b,c=[`<filter id="${R0(r)}" color-interpolation-filters="sRGB">`,`<feColorMatrix type="matrix" values="${i}"/>`,"<feComponentTransfer>",`<feFuncR type="linear" slope="${a}" intercept="${o.r}"/>`,`<feFuncG type="linear" slope="${s}" intercept="${o.g}"/>`,`<feFuncB type="linear" slope="${l}" intercept="${o.b}"/>`,"</feComponentTransfer>","</filter>"].join("");return {id:r,cssReference:`url(#${r})`,filterMarkup:c}}function j0(e){return `soft-edge-${e}`}function W0(e,t){if(!e||typeof e.softEdgeRadius!="number"||e.softEdgeRadius<=0)return;let r=j0(t),o=Math.round(e.softEdgeRadius),n=[`<filter id="${R0(r)}" x="-20%" y="-20%" width="140%" height="140%" color-interpolation-filters="sRGB">`,`<feGaussianBlur in="SourceAlpha" stdDeviation="${o}" result="softEdgeAlpha"/>`,'<feComposite in="SourceGraphic" in2="softEdgeAlpha" operator="in"/>',"</filter>"].join("");return {id:r,cssReference:`url(#${r})`,filterMarkup:n}}function qo(e,t={}){let r="shapeStyle"in e?e.shapeStyle:void 0,o={};if(!r)return o;let n=RS(r,{includeGlow:t.includeGlowBoxShadow});n&&(o.boxShadow=n);let i=FS(r,e.id);i&&(o.filter=i);let a=BS(r,e.height);a&&(o.webkitBoxReflect=a.webkitBoxReflect);let s=US(r);s!==void 0&&(o.opacity=s);let l=jS(r);if(l)o.fillOverlay=l;else {let c=N0(r.dagFillOverlayBlend);c&&(o.mixBlendMode=c);}return r.blurGrow&&typeof r.blurRadius=="number"&&r.blurRadius>0&&(o.overflowVisible=true),o}function H0(e,t,r){return Math.min(r,Math.max(t,e))}function WS(e){let t=H0(e,0,100);return Array.from({length:101},(r,o)=>o>=t?"1":"0").join(" ")}function Fm(e){let t=H0(e/100,-1,1);return t>=0?{slope:1-t,intercept:t}:{slope:1+t,intercept:0}}function Vt(e,t,r){return e<t?t:e>r?r:e}function ps(e){return Vt(e/100,0,1)}function Ls(e){let t=e.replace(/^#/u,""),r=parseInt(t.substring(0,2),16)/255,o=parseInt(t.substring(2,4),16)/255,n=parseInt(t.substring(4,6),16)/255;return {r:Number.isFinite(r)?r:0,g:Number.isFinite(o)?o:0,b:Number.isFinite(n)?n:0}}function Mr(e){if(g(e))return e.imageEffects}function Z0(e){return `duotone-${e}`}function G0(e){return `imgalpha-${e}`}function Y0(e){return `artistic-fx-${e}`}var HS=new Set(["artisticFilmGrain","filmGrain","artisticCutout","cutout","artisticCement","cement","artisticTexturizer","texturizer","artisticCrisscrossEtching","crisscrossEtching","artisticMosaic","artisticMosaicBubbles","mosaicBubbles","mosaic","artisticGlowEdges","glowEdges","glow_edges","artisticChalkSketch","chalkSketch","chalk","artisticPencilSketch","pencilSketch","artisticPencilGrayscale","pencilGrayscale","grayPencil"]);function V0(e){return e?HS.has(e):false}function X0(e){let t=Mr(e);return t?!!(typeof t.alphaModFix=="number"||t.alphaInv||t.alphaCeiling||t.alphaFloor||typeof t.alphaRepl=="number"||typeof t.alphaBiLevel=="number"||typeof t.biLevel=="number"||t.lum&&(typeof t.lum.bright=="number"||typeof t.lum.contrast=="number")||t.hsl&&(typeof t.hsl.sat=="number"||typeof t.hsl.lum=="number")||t.tint&&typeof t.tint.amt=="number"||t.clrRepl):false}function ZS(e,t){let r=Mr(e);if(!r)return;let o=[];if(typeof r.brightness=="number"&&r.brightness!==0&&o.push(`brightness(${Math.max(0,1+r.brightness/100)})`),typeof r.contrast=="number"&&r.contrast!==0&&o.push(`contrast(${Math.max(0,1+r.contrast/100)})`),typeof r.saturation=="number"&&r.saturation!==0&&o.push(`saturate(${Math.max(0,1+r.saturation/100)})`),r.grayscale&&o.push("grayscale(100%)"),r.duotone&&true&&o.push(`url(#${Z0(e.id)})`),X0(e)&&o.push(`url(#${G0(e.id)})`),r.artisticEffect){let n=r.artisticRadius??5;V0(r.artisticEffect)?o.push(`url(#${Y0(e.id)})`):o.push(GS(r.artisticEffect,n));}return o.length>0?o.join(" "):void 0}function GS(e,t){switch(e){case "blur":case "glassEffect":return `blur(${Math.min(t,20)}px)`;case "artisticBlur":return `blur(${Math.min(t,20)}px)`;case "artisticGaussianBlur":return `blur(${Math.min(Math.round(t*1.2),24)}px)`;case "lineDrawing":return "grayscale(100%) contrast(150%)";case "artisticLineDrawing":return "grayscale(100%) contrast(150%)";case "paintStrokes":case "watercolorSponge":return `blur(${Math.min(t,8)}px) saturate(140%) brightness(105%)`;case "artisticPaintStrokes":return `blur(${Math.min(t,8)}px) saturate(140%) brightness(105%)`;case "artisticWatercolorSponge":return `blur(${Math.min(t,8)}px) saturate(150%) brightness(108%)`;case "artisticPaint":case "paint":return `blur(${Math.min(t,5)}px) saturate(160%) contrast(110%)`;case "artisticPaintBrush":case "paintBrush":return `blur(${Math.min(t,6)}px) saturate(130%)`;case "photocopy":return "grayscale(100%) contrast(200%) brightness(120%)";case "artisticPhotocopy":return "grayscale(100%) contrast(200%) brightness(120%)";case "pastelsSmooth":case "pastels":return `blur(${Math.min(t,6)}px) saturate(85%) brightness(105%)`;case "artisticPastelsSmooth":case "artisticPastels":return `blur(${Math.min(t,6)}px) saturate(85%) brightness(105%)`;case "artisticMarker":case "marker":return "contrast(130%) saturate(150%)";case "artisticPlasticWrap":case "plasticWrap":return "contrast(150%) brightness(115%) saturate(80%)";case "artisticLightScreen":case "lightScreen":return `brightness(${1.2+ps(t)*.3}) saturate(${Math.max(.5,.8-ps(t)*.3)})`;case "artisticGlowDiffused":case "glowDiffused":return `blur(${Math.min(t,6)}px) brightness(${1.15+ps(t)*.15})`;case "artisticSharpenEdges":case "sharpen":return "contrast(160%) brightness(105%)";case "glass":case "artisticGlass":return `blur(${Math.min(t,6)}px) brightness(110%)`;default:return "contrast(105%) saturate(105%)"}}function YS(e){let t=Mr(e);if(t&&typeof t.alphaModFix=="number")return Vt(t.alphaModFix/100,0,1)}var VS=[.2126,.7152,.0722,0,0,.2126,.7152,.0722,0,0,.2126,.7152,.0722,0,0,0,0,0,1,0].join(" ");function XS(e,t){let r=Ls(e),o=Ls(t);return `<feColorMatrix type="matrix" values="${VS}"/><feComponentTransfer><feFuncR type="linear" slope="${o.r-r.r}" intercept="${r.r}"/><feFuncG type="linear" slope="${o.g-r.g}" intercept="${r.g}"/><feFuncB type="linear" slope="${o.b-r.b}" intercept="${r.b}"/></feComponentTransfer>`}function KS(e,t=g(e)?e.id:""){let r=Mr(e);if(!r?.duotone)return;let o=Z0(t);return {id:o,cssReference:`url(#${o})`,filterMarkup:XS(r.duotone.color1,r.duotone.color2)}}function qS(e){let t=[],r=0,o="SourceGraphic",n=i=>{let a=`r${r++}`;t.push(i(o,a)),o=a;};if(typeof e.alphaModFix=="number"){let i=Vt(e.alphaModFix/100,0,1);n((a,s)=>`<feColorMatrix in="${a}" result="${s}" type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${i} 0"/>`);}if(e.alphaInv&&n((i,a)=>`<feComponentTransfer in="${i}" result="${a}"><feFuncA type="linear" slope="-1" intercept="1"/></feComponentTransfer>`),e.alphaCeiling&&n((i,a)=>`<feComponentTransfer in="${i}" result="${a}"><feFuncA type="discrete" tableValues="0 1 1 1 1 1 1 1 1 1"/></feComponentTransfer>`),e.alphaFloor&&n((i,a)=>`<feComponentTransfer in="${i}" result="${a}"><feFuncA type="discrete" tableValues="0 0 0 0 0 0 0 0 0 1"/></feComponentTransfer>`),typeof e.alphaRepl=="number"){let i=Vt(e.alphaRepl/100,0,1);n((a,s)=>`<feComponentTransfer in="${a}" result="${s}"><feFuncA type="linear" slope="0" intercept="${i}"/></feComponentTransfer>`);}if(typeof e.alphaBiLevel=="number"){let i=Vt(e.alphaBiLevel/100,0,1),a=Array.from({length:10},(s,l)=>l/10>=i?"1":"0").join(" ");n((s,l)=>`<feComponentTransfer in="${s}" result="${l}"><feFuncA type="discrete" tableValues="${a}"/></feComponentTransfer>`);}if(typeof e.biLevel=="number"){n((a,s)=>`<feColorMatrix in="${a}" result="${s}" type="saturate" values="0"/>`);let i=WS(e.biLevel);n((a,s)=>`<feComponentTransfer in="${a}" result="${s}"><feFuncR type="discrete" tableValues="${i}"/><feFuncG type="discrete" tableValues="${i}"/><feFuncB type="discrete" tableValues="${i}"/></feComponentTransfer>`);}if(e.lum&&(typeof e.lum.bright=="number"||typeof e.lum.contrast=="number")){let i=(e.lum.bright??0)/100,a=1+(e.lum.contrast??0)/100,s=a,l=i+(1-a)/2;n((c,p)=>`<feComponentTransfer in="${c}" result="${p}"><feFuncR type="linear" slope="${s}" intercept="${l}"/><feFuncG type="linear" slope="${s}" intercept="${l}"/><feFuncB type="linear" slope="${s}" intercept="${l}"/></feComponentTransfer>`);}if(e.hsl&&typeof e.hsl.sat=="number"){let i=Vt(1+e.hsl.sat/100,0,2);n((a,s)=>`<feColorMatrix in="${a}" result="${s}" type="saturate" values="${i}"/>`);}if(e.hsl&&typeof e.hsl.lum=="number"){let{slope:i,intercept:a}=Fm(e.hsl.lum);n((s,l)=>`<feComponentTransfer in="${s}" result="${l}"><feFuncR type="linear" slope="${i}" intercept="${a}"/><feFuncG type="linear" slope="${i}" intercept="${a}"/><feFuncB type="linear" slope="${i}" intercept="${a}"/></feComponentTransfer>`);}if(e.tint&&typeof e.tint.hue=="number"&&n((i,a)=>`<feColorMatrix in="${i}" result="${a}" type="hueRotate" values="${e.tint.hue}"/>`),e.tint&&typeof e.tint.amt=="number"){let{slope:i,intercept:a}=Fm(e.tint.amt);n((s,l)=>`<feComponentTransfer in="${s}" result="${l}"><feFuncR type="linear" slope="${i}" intercept="${a}"/><feFuncG type="linear" slope="${i}" intercept="${a}"/><feFuncB type="linear" slope="${i}" intercept="${a}"/></feComponentTransfer>`);}if(e.clrRepl){let i=Ls(e.clrRepl.color);n((a,s)=>`<feColorMatrix in="${a}" result="${s}" type="matrix" values="0 0 0 0 ${i.r} 0 0 0 0 ${i.g} 0 0 0 0 ${i.b} 0 0 0 1 0"/>`);}return t.length>0?t.join(""):void 0}function JS(e,t=g(e)?e.id:""){let r=Mr(e);if(!r||!X0(e))return;let o=qS(r);if(!o)return;let n=G0(t);return {id:n,cssReference:`url(#${n})`,filterMarkup:o}}function QS(e){let t=[];for(let r=0;r<e;r++){let o=Math.round(r/(e-1)*100)/100,n=Math.ceil(256/e);for(let i=0;i<n;i++)t.push(o);}return t.slice(0,256).join(" ")}function ew(e,t){let r=Vt(t,0,100)/100;switch(e){case "artisticFilmGrain":case "filmGrain":{let o=.5+r*.5,n=.15+r*.25;return `<feTurbulence type="fractalNoise" baseFrequency="${o}" numOctaves="4" seed="1" stitchTiles="stitch" result="grain"/><feColorMatrix in="grain" type="saturate" values="0" result="grainGray"/><feBlend in="SourceGraphic" in2="grainGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="${1+n*.3}" intercept="${n*.02}"/><feFuncG type="linear" slope="${1+n*.3}" intercept="${n*.02}"/><feFuncB type="linear" slope="${1+n*.3}" intercept="${n*.02}"/></feComponentTransfer>`}case "artisticCutout":case "cutout":{let o=Math.max(2,Math.round(4+r*4)),n=QS(o);return `<feComponentTransfer><feFuncR type="discrete" tableValues="${n}"/><feFuncG type="discrete" tableValues="${n}"/><feFuncB type="discrete" tableValues="${n}"/></feComponentTransfer>`}case "artisticCement":case "cement":{let o=1.5+r*2.5;return `<feColorMatrix type="saturate" values="${Math.max(0,.4-r*.3)}" result="desat"/><feTurbulence type="fractalNoise" baseFrequency="${o}" numOctaves="5" seed="2" stitchTiles="stitch" result="cementNoise"/><feColorMatrix in="cementNoise" type="saturate" values="0" result="cementGray"/><feBlend in="desat" in2="cementGray" mode="multiply"/><feComponentTransfer><feFuncR type="linear" slope="1.2" intercept="0"/><feFuncG type="linear" slope="1.2" intercept="0"/><feFuncB type="linear" slope="1.2" intercept="0"/></feComponentTransfer>`}case "artisticTexturizer":case "texturizer":return `<feTurbulence type="fractalNoise" baseFrequency="${2+r*3}" numOctaves="3" seed="3" stitchTiles="stitch" result="texNoise"/><feColorMatrix in="texNoise" type="saturate" values="0" result="texGray"/><feBlend in="SourceGraphic" in2="texGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="1.1" intercept="0.02"/><feFuncG type="linear" slope="1.1" intercept="0.02"/><feFuncB type="linear" slope="1.1" intercept="0.02"/></feComponentTransfer>`;case "artisticCrisscrossEtching":case "crisscrossEtching":{let o=.08+r*.12;return `<feColorMatrix type="saturate" values="0" result="gray"/><feTurbulence type="turbulence" baseFrequency="${o} ${o*3}" numOctaves="1" seed="7" result="lines"/><feColorMatrix in="lines" type="saturate" values="0" result="linesGray"/><feBlend in="gray" in2="linesGray" mode="multiply"/><feComponentTransfer><feFuncR type="linear" slope="1.3" intercept="-0.05"/><feFuncG type="linear" slope="1.3" intercept="-0.05"/><feFuncB type="linear" slope="1.3" intercept="-0.05"/></feComponentTransfer>`}case "artisticMosaic":case "artisticMosaicBubbles":case "mosaicBubbles":case "mosaic":{let o=Math.max(2,Math.round(t*.8)),n=.02+r*.03;return `<feGaussianBlur in="SourceGraphic" stdDeviation="${o}" result="blurred"/><feTurbulence type="turbulence" baseFrequency="${n}" numOctaves="1" seed="4" result="cells"/><feDisplacementMap in="blurred" in2="cells" scale="${o*.5}" xChannelSelector="R" yChannelSelector="G" result="mosaic"/><feComponentTransfer in="mosaic"><feFuncR type="linear" slope="1.05" intercept="0"/><feFuncG type="linear" slope="1.05" intercept="0"/><feFuncB type="linear" slope="1.05" intercept="0"/></feComponentTransfer>`}case "artisticGlowEdges":case "glowEdges":case "glow_edges":return `<feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" result="inverted"/><feGaussianBlur in="inverted" stdDeviation="${Math.max(1,Math.round(r*3))}" result="blurredInv"/><feBlend in="SourceGraphic" in2="blurredInv" mode="screen"/><feComponentTransfer><feFuncR type="linear" slope="2" intercept="-0.3"/><feFuncG type="linear" slope="2" intercept="-0.3"/><feFuncB type="linear" slope="2" intercept="-0.3"/></feComponentTransfer>`;case "artisticChalkSketch":case "chalkSketch":case "chalk":{let o=1+r*2;return `<feColorMatrix type="saturate" values="${Math.max(0,.2-r*.2)}" result="gray"/><feTurbulence type="fractalNoise" baseFrequency="${o}" numOctaves="4" seed="5" stitchTiles="stitch" result="chalkTex"/><feColorMatrix in="chalkTex" type="saturate" values="0" result="chalkGray"/><feBlend in="gray" in2="chalkGray" mode="overlay"/><feComponentTransfer><feFuncR type="linear" slope="1.5" intercept="0.05"/><feFuncG type="linear" slope="1.5" intercept="0.05"/><feFuncB type="linear" slope="1.5" intercept="0.05"/></feComponentTransfer>`}case "artisticPencilSketch":case "pencilSketch":return `<feColorMatrix type="saturate" values="0" result="gray"/><feColorMatrix in="gray" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" result="invGray"/><feGaussianBlur in="invGray" stdDeviation="${Math.max(3,Math.round(4+r*8))}" result="blurInv"/><feBlend in="blurInv" in2="gray" mode="screen" result="sketch"/><feComponentTransfer in="sketch"><feFuncR type="linear" slope="1.6" intercept="-0.15"/><feFuncG type="linear" slope="1.6" intercept="-0.15"/><feFuncB type="linear" slope="1.6" intercept="-0.15"/></feComponentTransfer>`;case "artisticPencilGrayscale":case "pencilGrayscale":case "grayPencil":return `<feColorMatrix type="saturate" values="0" result="gray"/><feGaussianBlur in="gray" stdDeviation="${Math.max(.5,1+r*2)}" result="grayBlur"/><feComposite in="gray" in2="grayBlur" operator="arithmetic" k1="0" k2="1.5" k3="-0.5" k4="0"/>`;default:return}}function tw(e,t=g(e)?e.id:""){let r=Mr(e);if(!r?.artisticEffect||!V0(r.artisticEffect))return;let o=ew(r.artisticEffect,r.artisticRadius??5);if(!o)return;let n=Y0(t);return {id:n,cssReference:`url(#${n})`,filterMarkup:o}}function rw(e){let t=[],r=KS(e);r&&t.push({id:r.id,markup:r.filterMarkup});let o=JS(e);o&&t.push({id:o.id,markup:o.filterMarkup});let n=tw(e);return n&&t.push({id:n.id,markup:n.filterMarkup}),t}function K0(e){return {filter:ZS(e),opacity:YS(e),svgFilters:rw(e)}}var q0=new Set(["textNoShape","textPlain"]),J0=new Set(["textArchUp","textArchDown","textCircle","textWave1","textWave2","textWave4","textDoubleWave1","textCurveUp","textCurveDown","textArchUpPour","textArchDownPour","textCirclePour","textButton","textButtonPour","textRingInside","textRingOutside","textTriangle","textTriangleInverted","textChevron","textChevronInverted","textStop"]),Q0=new Set(["textInflate","textDeflate","textInflateBottom","textInflateTop","textDeflateBottom","textDeflateTop","textDeflateInflate","textDeflateInflateDeflate","textCanUp","textCanDown"]),eg=new Set(["textSlantUp","textSlantDown","textFadeRight","textFadeLeft","textFadeUp","textFadeDown","textCascadeUp","textCascadeDown"]);function nw(e){return !e||q0.has(e)?"none":J0.has(e)?"path":Q0.has(e)?"envelope":eg.has(e)?"simple":"none"}new Set([...q0,...J0,...Q0,...eg]);function tg(e,t){let r=e.textSegments;if(!r||r.length===0)return e.text?[{segments:[{text:e.text,style:{}}]}]:[];let o=[],n=[];for(let i of r)i.isParagraphBreak?(n.length>0&&o.push({segments:n}),n=[]):n.push(i);return n.length>0&&o.push({segments:n}),o}var ow=new Set(["textArchUp","textArchDown","textCircle","textWave1","textInflate","textDeflate","textCurveUp","textCurveDown","textWave2","textWave4","textDoubleWave1","textCanUp","textCanDown","textButton","textRingInside","textRingOutside","textCascadeUp","textCascadeDown","textTriangle","textTriangleInverted","textStop","textChevron","textChevronInverted","textInflateBottom","textInflateTop","textDeflateBottom","textDeflateTop","textSlantUp","textSlantDown","textFadeRight","textFadeLeft","textFadeUp","textFadeDown","textArchUpPour","textArchDownPour","textCirclePour","textButtonPour","textDeflateInflate","textDeflateInflateDeflate"]),ie=e=>Math.max(0,Math.min(e,4));function iw(e,t,r,o){let i=.85*(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)/.5,a=t*Math.max(0,i-r*.7);return a<1?`M 0,${t} L ${e},${t}`:`M 0,${t} A ${e/2},${a} 0 0,1 ${e},${t}`}function aw(e,t,r,o){let i=.15*(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)/.5,a=t*(i+r*.7);return a<1?`M 0,0 L ${e},0`:`M 0,0 A ${e/2},${a} 0 0,0 ${e},0`}function sw(e,t,r,o){let n=e/2,i=t/2,s=.45+(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)*1.1,l=Math.min(1,s)-r*.55,c=Math.max(1,e/2*l),p=Math.max(1,t/2*l);return `M ${n},${i-p} A ${c},${p} 0 1,1 ${n},${i+p} A ${c},${p} 0 1,1 ${n},${i-p}`}function lw(e,t,r,o,n){let i=t*(.25+r*.5),a=o!==void 0?o/12500:1,s=t*.2*ie(a),l=n!==void 0?n/1e5*e*.3:0,c=e/3+l,p=2*e/3+l;return `M 0,${i} C ${c},${i-s} ${p},${i+s} ${e},${i}`}function cw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=t*.3*(1-2*r)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function pw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=t*.3*(2*r-1)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function uw(e,t,r,o){let n=t*(.35+r*.55),i=o!==void 0?o/45977:1,a=t*.4*(1-r*.3)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function dw(e,t,r,o){let n=t*(.1+r*.55),i=o!==void 0?o/45977:1,a=t*.4*(1-(1-r)*.3)*ie(i);return `M 0,${n} Q ${e/2},${n+a} ${e},${n}`}function fw(e,t,r,o,n){let i=t*(.25+r*.5),a=o!==void 0?o/12500:1,s=t*.2*ie(a),l=n!==void 0?n/1e5*e*.3:0,c=e/3+l,p=2*e/3+l;return `M 0,${i} C ${c},${i+s} ${p},${i-s} ${e},${i}`}function mw(e,t,r,o,n){let i=t*(.25+r*.5),a=o!==void 0?o/12500:1,s=t*.15*ie(a),l=n!==void 0?n/1e5*e*.15:0,c=e/4;return `M 0,${i} C ${c+l},${i-s} ${2*c+l},${i+s} ${e/2},${i} C ${e/2+c+l},${i-s} ${e-c+l},${i+s} ${e},${i}`}function hw(e,t,r,o,n){let i=t*(.25+r*.5),a=o!==void 0?o/6250:1,s=t*.18*ie(a),l=n!==void 0?n/1e5*e*.15:0,c=e/4;return `M 0,${i} C ${c+l},${i-s} ${2*c+l},${i+s} ${e/2},${i} C ${e/2+c+l},${i+s} ${e-c+l},${i-s} ${e},${i}`}function gw(e,t,r,o){let n=o!==void 0?o/18750:1,i=ie(n),a=t*(.35-r*.25)*i;return a<1?`M 0,${t} L ${e},${t}`:`M 0,${t} A ${e/2},${a} 0 0,1 ${e},${t}`}function xw(e,t,r,o){let n=o!==void 0?o/18750:1,i=ie(n),a=t*(.1+r*.25)*i;return a<1?`M 0,0 L ${e},0`:`M 0,0 A ${e/2},${a} 0 0,0 ${e},0`}function yw(e,t,r,o){let n=t*(.1+r*.8),i=o!==void 0?o/18750:1,a=t*.15*(1-2*r)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function vw(e,t,r,o){let n=e/2,i=t/2,a=o!==void 0?o/18750:1,s=.35*ie(a),l=.7-r*s,c=Math.max(1,e/2*l),p=Math.max(1,t/2*l);return `M ${n},${i-p} A ${c},${p} 0 1,1 ${n},${i+p} A ${c},${p} 0 1,1 ${n},${i-p}`}function bw(e,t,r,o){let n=e/2,i=t/2,a=o!==void 0?o/18750:1,s=.35*ie(a),l=1-r*s,c=Math.max(1,e/2*l),p=Math.max(1,t/2*l);return `M ${n},${i-p} A ${c},${p} 0 1,1 ${n},${i+p} A ${c},${p} 0 1,1 ${n},${i-p}`}function Sw(e,t,r,o){let n=o!==void 0?o/44444:1,i=.2*ie(n),a=t*(.2+r*.6),s=a+t*i/2,l=a-t*i/2;return `M 0,${s} L ${e},${l}`}function ww(e,t,r,o){let n=o!==void 0?o/44444:1,i=.2*ie(n),a=t*(.2+r*.6),s=a-t*i/2,l=a+t*i/2;return `M 0,${s} L ${e},${l}`}function $w(e,t,r,o){let n=o!==void 0?o/1e5:.5,i=e*(1-Math.max(0,Math.min(n,1)))*.3,a=i+r*(e-i),s=(e-a)/2,l=t*(.1+r*.8);return `M ${s},${l} L ${s+a},${l}`}function kw(e,t,r,o){let n=o!==void 0?o/1e5:.5,i=e*(1-Math.max(0,Math.min(n,1)))*.3,a=e-r*(e-i),s=(e-a)/2,l=t*(.1+r*.8);return `M ${s},${l} L ${s+a},${l}`}function Mw(e,t,r,o){let n=o!==void 0?o/25e3:1,i=ie(n),a=e*.15*(1-(1-2*Math.abs(r-.5))**2)*i,s=t*(.1+r*.8);return `M ${a},${s} L ${e-a},${s}`}function Tw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/25e3:1,a=t*.2*(1-r)*ie(i);return `M 0,${n} L ${e/2},${n+a} L ${e},${n}`}function Iw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/25e3:1,a=t*.2*r*ie(i);return `M 0,${n} L ${e/2},${n-a} L ${e},${n}`}function _w(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=r>.4?t*.25*((r-.4)/.6)*ie(i):0;return `M 0,${n} Q ${e/2},${n+a} ${e},${n}`}function Cw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=r<.6?t*.25*((.6-r)/.6)*ie(i):0;return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function Aw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=r>.4?t*.2*((r-.4)/.6)*ie(i):0;return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function Pw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=r<.6?t*.2*((.6-r)/.6)*ie(i):0;return `M 0,${n} Q ${e/2},${n+a} ${e},${n}`}function Ew(e,t,r,o){let n=o!==void 0?o/55e3:1,i=.25*ie(n),a=t*(.175+r*.55),s=a+t*i/2,l=a-t*i/2;return `M 0,${s} L ${e},${l}`}function Ow(e,t,r,o){let n=o!==void 0?o/55e3:1,i=.25*ie(n),a=t*(.175+r*.55),s=a-t*i/2,l=a+t*i/2;return `M 0,${s} L ${e},${l}`}function Lw(e,t,r,o){let n=o!==void 0?o/5e4:1,i=ie(n),a=t*(.1+r*.8),s=.35*(1-2*r)*i,l=t*(.5+s*.4);return `M 0,${a} L ${e},${l}`}function Dw(e,t,r,o){let n=o!==void 0?o/5e4:1,i=ie(n),a=.35*(1-2*r)*i,s=t*(.5+a*.4),l=t*(.1+r*.8);return `M 0,${s} L ${e},${l}`}function Rw(e,t,r,o){let n=o!==void 0?o/5e4:1,a=1-.7*ie(n),s=e*Math.max(0,a),l=s+r*(e-s),c=(e-l)/2,p=t*(.1+r*.8);return `M ${c},${p} L ${c+l},${p}`}function zw(e,t,r,o){let n=o!==void 0?o/5e4:1,a=1-.7*ie(n),s=e*Math.max(0,a),l=e-r*(e-s),c=(e-l)/2,p=t*(.1+r*.8);return `M ${c},${p} L ${c+l},${p}`}function Fw(e,t,r,o){let i=.7*(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)/.5,a=t*Math.max(0,i-r*.5);return a<1?`M 0,${t} L ${e},${t}`:`M 0,${t} A ${e/2},${a} 0 0,1 ${e},${t}`}function Nw(e,t,r,o){let i=.2*(o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5)/.5,a=t*(i+r*.5);return a<1?`M 0,0 L ${e},0`:`M 0,0 A ${e/2},${a} 0 0,0 ${e},0`}function Bw(e,t,r,o){let n=e/2,i=t/2,a=o!==void 0?Math.max(0,Math.min(o/216e5,1)):.5,s=.35+Number(a),l=Math.min(1,s)-r*.45,c=Math.max(1,e/2*l),p=Math.max(1,t/2*l);return `M ${n},${i-p} A ${c},${p} 0 1,1 ${n},${i+p} A ${c},${p} 0 1,1 ${n},${i-p}`}function Uw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=t*.12*(1-2*r)*ie(i);return `M 0,${n} Q ${e/2},${n-a} ${e},${n}`}function jw(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=Math.sin(r*Math.PI),s=t*.2*(a-.5)*ie(i);return `M 0,${n} Q ${e/2},${n-s} ${e},${n}`}function Ww(e,t,r,o){let n=t*(.15+r*.7),i=o!==void 0?o/18750:1,a=ie(i),s=Math.sin(r*Math.PI*2),l=t*.15*s*a,c=e/3,p=2*e/3;return `M 0,${n} Q ${c},${n-l} ${e/2},${n} Q ${p},${n+l} ${e},${n}`}var Hw={textArchUp:iw,textArchDown:aw,textCircle:sw,textWave1:lw,textInflate:cw,textDeflate:pw,textCurveUp:uw,textCurveDown:dw,textWave2:fw,textWave4:mw,textDoubleWave1:hw,textCanUp:gw,textCanDown:xw,textButton:yw,textRingInside:vw,textRingOutside:bw,textCascadeUp:Sw,textCascadeDown:ww,textTriangle:$w,textTriangleInverted:kw,textStop:Mw,textChevron:Tw,textChevronInverted:Iw,textInflateBottom:_w,textInflateTop:Cw,textDeflateBottom:Aw,textDeflateTop:Pw,textSlantUp:Ew,textSlantDown:Ow,textFadeRight:Lw,textFadeLeft:Dw,textFadeUp:Rw,textFadeDown:zw,textArchUpPour:Fw,textArchDownPour:Nw,textCirclePour:Bw,textButtonPour:Uw,textDeflateInflate:jw,textDeflateInflateDeflate:Ww};function rg(e){return !e||e==="textNoShape"||e==="textPlain"?false:ow.has(e)}function ng(e,t,r,o,n,i,a){let s=n<=1?.5:o/(n-1),l=Hw[e];if(l)return l(t,r,s,i,a);let c=r*(.2+s*.6);return `M 0,${c} L ${t},${c}`}var Zw={textInflate:18750,textDeflate:18750,textInflateBottom:18750,textInflateTop:18750,textDeflateBottom:18750,textDeflateTop:18750,textDeflateInflate:18750,textDeflateInflateDeflate:18750,textCanUp:18750,textCanDown:18750};function Gw(e,t,r){let o=Zw[e]??18750,i=Math.max(0,Math.min((t??o)/18750,4));switch(e){case "textInflate":return {transform:`scaleY(${1+.15*i}) scaleX(${1+.05*i})`,transformOrigin:"center center"};case "textInflateBottom":return {transform:`perspective(${600-100*i}px) rotateX(${ -8*i}deg)`,transformOrigin:"center bottom"};case "textInflateTop":return {transform:`perspective(${600-100*i}px) rotateX(${8*i}deg)`,transformOrigin:"center top"};case "textDeflate":return {transform:`scaleY(${1-.12*i}) scaleX(${1-.05*i})`,transformOrigin:"center center"};case "textDeflateBottom":return {transform:`perspective(${600-100*i}px) rotateX(${6*i}deg)`,transformOrigin:"center bottom"};case "textDeflateTop":return {transform:`perspective(${600-100*i}px) rotateX(${ -6*i}deg)`,transformOrigin:"center top"};case "textDeflateInflate":return {transform:`scaleY(${1-.08*i}) scaleX(${1+.04*i})`,transformOrigin:"center center"};case "textDeflateInflateDeflate":return {transform:`scaleY(${1-.15*i}) scaleX(${1+.06*i})`,transformOrigin:"center center"};case "textCanUp":return {transform:`perspective(${500-80*i}px) rotateX(${ -6*i}deg)`,transformOrigin:"center center"};case "textCanDown":return {transform:`perspective(${500-80*i}px) rotateX(${6*i}deg)`,transformOrigin:"center center"};default:return}}var Yw={textSlantUp:55e3,textSlantDown:55e3,textFadeRight:5e4,textFadeLeft:5e4,textFadeUp:5e4,textFadeDown:5e4,textCascadeUp:44444,textCascadeDown:44444};function Vw(e,t){let r=t??Yw[e]??5e4;switch(e){case "textSlantUp":return {transform:`perspective(500px) rotateY(${8*(r/55e3)}deg) skewY(${ -4*(r/55e3)}deg)`,transformOrigin:"left center"};case "textSlantDown":return {transform:`perspective(500px) rotateY(${ -8*(r/55e3)}deg) skewY(${4*(r/55e3)}deg)`,transformOrigin:"right center"};case "textFadeRight":return {transform:`perspective(400px) rotateY(${ -10*(r/5e4)}deg)`,transformOrigin:"left center"};case "textFadeLeft":return {transform:`perspective(400px) rotateY(${10*(r/5e4)}deg)`,transformOrigin:"right center"};case "textFadeUp":return {transform:`perspective(400px) rotateX(${ -10*(r/5e4)}deg)`,transformOrigin:"center bottom"};case "textFadeDown":return {transform:`perspective(400px) rotateX(${10*(r/5e4)}deg)`,transformOrigin:"center top"};case "textCascadeUp":return {transform:`skewY(${ -8*(r/44444)}deg)`,transformOrigin:"left top"};case "textCascadeDown":return {transform:`skewY(${8*(r/44444)}deg)`,transformOrigin:"left top"};default:return}}function og(e,t,r){let o=nw(e);if(o==="envelope")return Gw(e,t);if(o==="simple")return Vw(e,t)}function Ds(e){if(!e||typeof e!="object")return;let t=e["a:rPr"];if(t&&typeof t=="object"){let r=t["a:solidFill"],n=(r&&typeof r=="object"?r["a:srgbClr"]:void 0)?.["@_val"];if(typeof n=="string"&&/^[0-9a-f]{6}$/iu.test(n))return `#${n.toUpperCase()}`}for(let r of Object.values(e))if(Array.isArray(r)){for(let o of r)if(o&&typeof o=="object"){let n=Ds(o);if(n)return n}}else if(r&&typeof r=="object"){let o=Ds(r);if(o)return o}}function Rs(e){if(!e||typeof e!="object")return;let t=e["a:rPr"];if(t&&typeof t=="object"){let r=Number(t["@_sz"]);if(Number.isFinite(r)&&r>0)return r/100}for(let r of Object.values(e))if(Array.isArray(r)){for(let o of r)if(o&&typeof o=="object"){let n=Rs(o);if(n)return n}}else if(r&&typeof r=="object"){let o=Rs(r);if(o)return o}}function X(e,t){if(!e)return {};let r=e[t];return r&&typeof r=="object"&&!Array.isArray(r)?r:{}}function Qt(e){return e==null?[]:Array.isArray(e)?e:typeof e=="object"?[e]:[]}function Xw(e,t){if(!e)return "";let r=e[`@_${t}`];return typeof r=="string"?r:r!==void 0?String(r):""}function Re(e){return Xw(e,"val")}function De(e){return e.replace(/&/gu,"&").replace(/</gu,"<").replace(/>/gu,">")}function Kw(e){let t=e["m:t"];if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(t&&typeof t=="object"&&!Array.isArray(t)){let r=t["#text"];return typeof r=="string"?r:""}return ""}var qw=new Set(["+","-","\u2212","\xB1","\u2213","\xD7","\xF7","\xB7","=","\u2260","\u2248","\u2261","\u2264","\u2265","<",">","\u226A","\u226B","\u2208","\u2209","\u2282","\u2283","\u2286","\u2287","\u222A","\u2229","\u2192","\u2190","\u2194","\u21D2","\u21D0","\u21D4","\u221E","\u2234","\u2235","\u221D","\u2200","\u2203",",",";",":","!","?",".","|","/","\\","'","(",")","[","]","{","}","\u27E8","\u27E9"]);function Jw(e){return qw.has(e.trim())}function Qw(e){return /^[0-9]+(?:[.,][0-9]+)?$/u.test(e.trim())}var e$={"\u0302":"^","\u0303":"~","\u0304":"\xAF","\u0305":"\xAF","\u0307":"\u02D9","\u0308":"\xA8","\u030C":"\u02C7","\u0332":"_","\u20D7":"\u2192","^":"^","~":"~","\xAF":"\xAF","\u02D9":"\u02D9","\xA8":"\xA8","\u02C7":"\u02C7"},t$={"\u2211":"\u2211","\u220F":"\u220F","\u222B":"\u222B","\u222C":"\u222C","\u222D":"\u222D","\u222E":"\u222E","\u2210":"\u2210","\u22C0":"\u22C0","\u22C1":"\u22C1","\u22C2":"\u22C2","\u22C3":"\u22C3"},r$={"(":"(","[":"[","{":"{","|":"|","\u2016":"\u2016","\u27E8":"\u27E8","\u2308":"\u2308","\u230A":"\u230A"},n$={")":")","]":"]","}":"}","|":"|","\u2016":"\u2016","\u27E9":"\u27E9","\u2309":"\u2309","\u230B":"\u230B"};function o$(e){let t=Kw(e);if(t.length===0)return "";let r=De(t),o=X(e,"m:rPr"),n=Re(X(o,"m:nor")),i=n==="1"||n==="on"||n==="true";return Qw(t)?`<mn>${r}</mn>`:Jw(t)?`<mo>${r}</mo>`:i?`<mi mathvariant="normal">${r}</mi>`:`<mi>${r}</mi>`}function i$(e,t){let r=X(e,"m:fPr"),o=Re(X(r,"m:type")),n=`<mrow>${t(X(e,"m:num"))}</mrow>`,i=`<mrow>${t(X(e,"m:den"))}</mrow>`;return o==="lin"?`<mrow>${n}<mo>/</mo>${i}</mrow>`:o==="noBar"?`<mfrac linethickness="0">${n}${i}</mfrac>`:`<mfrac>${n}${i}</mfrac>`}function a$(e,t){let r=X(e,"m:radPr"),o=Re(X(r,"m:degHide")),n=t(X(e,"m:e")),i=t(X(e,"m:deg"));return o==="1"||o==="on"||o==="true"||i.length===0?`<msqrt><mrow>${n}</mrow></msqrt>`:`<mroot><mrow>${n}</mrow><mrow>${i}</mrow></mroot>`}function s$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:sup"));return `<msup><mrow>${r}</mrow><mrow>${o}</mrow></msup>`}function l$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:sub"));return `<msub><mrow>${r}</mrow><mrow>${o}</mrow></msub>`}function c$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:sub")),n=t(X(e,"m:sup"));return `<msubsup><mrow>${r}</mrow><mrow>${o}</mrow><mrow>${n}</mrow></msubsup>`}function p$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:sub")),n=t(X(e,"m:sup"));return `<mmultiscripts><mrow>${r}</mrow><mprescripts/><mrow>${o}</mrow><mrow>${n}</mrow></mmultiscripts>`}function u$(e,t){let r=X(e,"m:naryPr"),o=Re(X(r,"m:chr")),n=Re(X(r,"m:limLoc")),i=Re(X(r,"m:subHide")),a=Re(X(r,"m:supHide")),s=o?t$[o]||o:"\u222B",l=t(X(e,"m:sub")),c=t(X(e,"m:sup")),p=t(X(e,"m:e")),u=i!=="1"&&i!=="on"&&i!=="true"&&l.length>0,d=a!=="1"&&a!=="on"&&a!=="true"&&c.length>0,f;return u&&d?n==="undOvr"?f=`<munderover><mo>${De(s)}</mo><mrow>${l}</mrow><mrow>${c}</mrow></munderover>`:f=`<msubsup><mo>${De(s)}</mo><mrow>${l}</mrow><mrow>${c}</mrow></msubsup>`:u?n==="undOvr"?f=`<munder><mo>${De(s)}</mo><mrow>${l}</mrow></munder>`:f=`<msub><mo>${De(s)}</mo><mrow>${l}</mrow></msub>`:d?n==="undOvr"?f=`<mover><mo>${De(s)}</mo><mrow>${c}</mrow></mover>`:f=`<msup><mo>${De(s)}</mo><mrow>${c}</mrow></msup>`:f=`<mo>${De(s)}</mo>`,`<mrow>${f}<mrow>${p}</mrow></mrow>`}function d$(e,t){let r=X(e,"m:dPr"),o=Re(X(r,"m:begChr")),n=Re(X(r,"m:endChr")),i=Re(X(r,"m:sepChr")),a=o.length>0?o:"(",s=n.length>0?n:")",l=i.length>0?i:"",c=r$[a]||a,p=n$[s]||s,u=Qt(e["m:e"]),d=[];for(let h=0;h<u.length;h++)h>0&&l.length>0&&d.push(`<mo>${De(l)}</mo>`),d.push(`<mrow>${t(u[h])}</mrow>`);let f=a?`<mo>${De(c)}</mo>`:"<mo></mo>",m=s?`<mo>${De(p)}</mo>`:"<mo></mo>";return `<mrow>${f}${d.join("")}${m}</mrow>`}function f$(e,t){let r=Qt(e["m:mr"]),o=[];for(let n of r){let i=Qt(n["m:e"]),a=[];for(let s of i)a.push(`<mtd><mrow>${t(s)}</mrow></mtd>`);o.push(`<mtr>${a.join("")}</mtr>`);}return `<mrow><mo>[</mo><mtable>${o.join("")}</mtable><mo>]</mo></mrow>`}function m$(e,t){let r=X(e,"m:accPr"),o=Re(X(r,"m:chr")),n=t(X(e,"m:e")),i=o.length>0?e$[o]||o:"\u0302";return `<mover accent="true"><mrow>${n}</mrow><mo>${De(i)}</mo></mover>`}function h$(e,t){let r=X(e,"m:barPr"),o=Re(X(r,"m:pos")),n=t(X(e,"m:e"));return o==="bot"?`<munder><mrow>${n}</mrow><mo>\xAF</mo></munder>`:`<mover><mrow>${n}</mrow><mo>\xAF</mo></mover>`}function g$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:lim"));return `<munder><mrow>${r}</mrow><mrow>${o}</mrow></munder>`}function x$(e,t){let r=t(X(e,"m:e")),o=t(X(e,"m:lim"));return `<mover><mrow>${r}</mrow><mrow>${o}</mrow></mover>`}function y$(e,t){let r=X(e,"m:groupChrPr"),o=Re(X(r,"m:chr")),n=Re(X(r,"m:pos")),i=t(X(e,"m:e")),a=o.length>0?o:"\u23DF";return n==="top"?`<mover><mrow>${i}</mrow><mo>${De(a)}</mo></mover>`:`<munder><mrow>${i}</mrow><mo>${De(a)}</mo></munder>`}function v$(e,t){let r=Qt(e["m:e"]),o=[];for(let n of r)o.push(`<mtr><mtd><mrow>${t(n)}</mrow></mtd></mtr>`);return `<mtable columnalign="left">${o.join("")}</mtable>`}function Nm(e,t){return `<mrow>${t(X(e,"m:e"))}</mrow>`}function b$(e,t){let r=t(X(e,"m:fName")),o=t(X(e,"m:e"));return `<mrow>${r}<mo>⁡</mo><mrow>${o}</mrow></mrow>`}function be(e){if(!e||typeof e!="object")return "";let t=[];for(let r of Object.keys(e)){if(r.startsWith("@_"))continue;let o=q$1(r);if(o==="m:oMathPara")continue;let n=Qt(e[r]);for(let i of n){let a=S$(o,i);a&&t.push(a);}}return t.join("")}function S$(e,t){switch(e){case "m:r":return o$(t);case "m:f":return i$(t,be);case "m:rad":return a$(t,be);case "m:sSup":return s$(t,be);case "m:sSub":return l$(t,be);case "m:sSubSup":return c$(t,be);case "m:sPre":return p$(t,be);case "m:nary":return u$(t,be);case "m:d":return d$(t,be);case "m:m":return f$(t,be);case "m:acc":return m$(t,be);case "m:bar":return h$(t,be);case "m:limLow":return g$(t,be);case "m:limUpp":return x$(t,be);case "m:groupChr":return y$(t,be);case "m:eqArr":return v$(t,be);case "m:box":return Nm(t,be);case "m:borderBox":return Nm(t,be);case "m:func":return b$(t,be);case "m:oMath":return `<mrow>${be(t)}</mrow>`;default:return ""}}function w$(e){if(e["m:oMath"])return Qt(e["m:oMath"]);let t=e["m:oMathPara"];if(t){let o=Array.isArray(t)?t[0]:t;if(o["m:oMath"])return Qt(o["m:oMath"])}let r=new Set(["m:r","m:f","m:rad","m:sSup","m:sSub","m:box"]);return Object.keys(e).some(o=>r.has(q$1(o)))?[e]:[]}function ig(e){if(!e||typeof e!="object")return "";let t=w$(e);if(t.length===0)return "";let o=t.map(l=>be(l)).join("");if(o.length===0)return "";let n=Ds(e),i=n?` mathcolor="${n}"`:"",a=Rs(e),s=a?` mathsize="${a}pt"`:"";return `<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"${i}${s}>${o}</math>`}var zs={"\\alpha":"\u03B1","\\beta":"\u03B2","\\gamma":"\u03B3","\\delta":"\u03B4","\\epsilon":"\u03B5","\\varepsilon":"\u03B5","\\zeta":"\u03B6","\\eta":"\u03B7","\\theta":"\u03B8","\\vartheta":"\u03D1","\\iota":"\u03B9","\\kappa":"\u03BA","\\lambda":"\u03BB","\\mu":"\u03BC","\\nu":"\u03BD","\\xi":"\u03BE","\\pi":"\u03C0","\\rho":"\u03C1","\\sigma":"\u03C3","\\tau":"\u03C4","\\upsilon":"\u03C5","\\phi":"\u03C6","\\varphi":"\u03D5","\\chi":"\u03C7","\\psi":"\u03C8","\\omega":"\u03C9","\\Gamma":"\u0393","\\Delta":"\u0394","\\Theta":"\u0398","\\Lambda":"\u039B","\\Xi":"\u039E","\\Pi":"\u03A0","\\Sigma":"\u03A3","\\Phi":"\u03A6","\\Psi":"\u03A8","\\Omega":"\u03A9"},Fs={"\\times":"\xD7","\\div":"\xF7","\\pm":"\xB1","\\mp":"\u2213","\\cdot":"\xB7","\\leq":"\u2264","\\geq":"\u2265","\\neq":"\u2260","\\approx":"\u2248","\\equiv":"\u2261","\\ll":"\u226A","\\gg":"\u226B","\\subset":"\u2282","\\supset":"\u2283","\\subseteq":"\u2286","\\supseteq":"\u2287","\\in":"\u2208","\\notin":"\u2209","\\cup":"\u222A","\\cap":"\u2229","\\to":"\u2192","\\rightarrow":"\u2192","\\leftarrow":"\u2190","\\Rightarrow":"\u21D2","\\Leftarrow":"\u21D0","\\infty":"\u221E","\\partial":"\u2202","\\nabla":"\u2207","\\forall":"\u2200","\\exists":"\u2203","\\ldots":"\u2026","\\cdots":"\u22EF","\\le":"\u2264","\\ge":"\u2265","\\ne":"\u2260"},Ns={"\\sum":"\u2211","\\prod":"\u220F","\\int":"\u222B","\\iint":"\u222C","\\iiint":"\u222D","\\oint":"\u222E","\\coprod":"\u2210","\\bigcup":"\u22C3","\\bigcap":"\u22C2"},$$=new Set(["sin","cos","tan","cot","sec","csc","arcsin","arccos","arctan","sinh","cosh","tanh","coth","log","ln","exp","lim","min","max","sup","inf","det","dim","mod","gcd","deg","hom","ker"]),Bm=/[a-zA-Z]/u,k$=/\s/u;function M$(e){let t=[],r=0;for(;r<e.length;){let o=e[r];if(o==="{")t.push({type:"group_start",value:"{"}),r++;else if(o==="}")t.push({type:"group_end",value:"}"}),r++;else if(o==="^")t.push({type:"superscript",value:"^"}),r++;else if(o==="_")t.push({type:"subscript",value:"_"}),r++;else if(o==="\\"){let n="\\";if(r++,r<e.length&&Bm.test(e[r]))for(;r<e.length&&Bm.test(e[r]);)n+=e[r],r++;else r<e.length&&(n+=e[r],r++);t.push({type:"command",value:n});}else k$.test(o)?(r++,t.push({type:"whitespace",value:" "})):(t.push({type:"text",value:o}),r++);}return t}function T$(e){let t=new Set,r="";for(let o of e){if(o!==r&&t.has(o))return false;t.add(o),r=o;}return true}function ag(e){let t=[];for(let o of e)for(let n of Object.keys(o))o[n]!==void 0&&t.push([n,o[n]]);if(!T$(t.map(([o])=>o))){let o=new Map;for(let[i]of t)o.set(i,(o.get(i)??0)+1);let n={};for(let[i,[a,s]]of t.entries())n[(o.get(a)??0)>1?p(a,i):a]=s;return n}let r={};for(let[o,n]of t)if(r[o]){let i=r[o];Array.isArray(i)?i.push(n):r[o]=[i,n];}else r[o]=n;return r}function Ct(e,t){let r=false,o=false,n=[],i=[];for(let a=0;a<2;a++){let s=e.peek();s?.type==="superscript"&&!r?(e.next(),n=e.parseSingleOrGroup(),r=true):s?.type==="subscript"&&!o&&(e.next(),i=e.parseSingleOrGroup(),o=true);}return r&&o?{"m:sSubSup":{"m:e":e.wrapE([t]),"m:sub":e.wrapE(i),"m:sup":e.wrapE(n)}}:r?{"m:sSup":{"m:e":e.wrapE([t]),"m:sup":e.wrapE(n)}}:o?{"m:sSub":{"m:e":e.wrapE([t]),"m:sub":e.wrapE(i)}}:t}function I$(e,t){let r=[],o=[],n=false,i=false;for(let l=0;l<2;l++){let c=e.peek();c?.type==="subscript"&&!n?(e.next(),r=e.parseSingleOrGroup(),n=true):c?.type==="superscript"&&!i&&(e.next(),o=e.parseSingleOrGroup(),i=true);}let a=e.parseSingleOrGroup(),s={"m:chr":{"@_val":t}};return n||(s["m:subHide"]={"@_val":"1"}),i||(s["m:supHide"]={"@_val":"1"}),{"m:nary":{"m:naryPr":s,"m:sub":n?e.wrapE(r):{},"m:sup":i?e.wrapE(o):{},"m:e":e.wrapE(a)}}}function _$(e){let t=e.next(),r=t?.value==="."?"":t?.value??"(",o=[];for(;e.peek();){if(e.peek().type==="command"&&e.peek().value==="\\right"){e.next();break}let s=e.parseAtom();s&&o.push(s);}let n=e.next(),i=n?.value==="."?"":n?.value??")",a={};return r!=="("&&(a["m:begChr"]={"@_val":r}),i!==")"&&(a["m:endChr"]={"@_val":i}),{"m:d":{"m:dPr":Object.keys(a).length>0?a:void 0,"m:e":e.wrapE(o)}}}function C$(e,t){let r=e.makeRun(t,true),o=Ct(e,r),n=[];if(e.peek()?.type==="group_start")n=e.parseGroup();else if(e.peek()&&e.peek().type!=="group_end"){let i=e.parseAtom();i&&(n=[i]);}return n.length===0?o:{"m:func":{"m:fName":e.wrapE([o]),"m:e":e.wrapE(n)}}}var A$=class{tokens;pos=0;constructor(e){this.tokens=e;}peek(){return this.tokens[this.pos]}next(){return this.tokens[this.pos++]}expect(e){let t=this.next();if(!t||t.type!==e)throw new Error(`Expected ${e}, got ${t?.type??"EOF"}`);return t}parseGroup(){this.expect("group_start");let e=[];for(;this.peek()&&this.peek().type!=="group_end";){let t=this.parseAtom();t&&e.push(t);}return this.expect("group_end"),e}parseSingleOrGroup(){if(this.peek()?.type==="group_start")return this.parseGroup();let e=this.parseAtom();return e?[e]:[]}wrapE(e){return e.length===1?e[0]:ag(e)}makeRun(e,t=false){let r={"m:t":e};return t&&(r["m:rPr"]={"m:nor":{"@_val":"1"}}),{"m:r":r}}parseAtom(){let e=this.peek();if(!e)return null;if(e.type==="whitespace")return this.next(),this.parseAtom();if(e.type==="text"){this.next();let t=this.makeRun(e.value);return Ct(this,t)}if(e.type==="group_start"){let t=this.parseGroup();if(t.length===0)return null;let r=t.length===1?t[0]:this.wrapE(t);return Ct(this,r)}if(e.type==="command"){this.next();let t=e.value;if(zs[t]){let n=this.makeRun(zs[t]);return Ct(this,n)}if(Fs[t])return this.makeRun(Fs[t]);if(Ns[t])return I$(this,Ns[t]);if(t==="\\frac"){let n=this.parseGroup(),i=this.parseGroup(),a={"m:f":{"m:num":this.wrapE(n),"m:den":this.wrapE(i)}};return Ct(this,a)}if(t==="\\sqrt"){if(this.peek()?.type==="text"&&this.peek()?.value==="["){this.next();let a="";for(;this.peek()&&!(this.peek().type==="text"&&this.peek().value==="]");)a+=this.next().value;this.peek()?.value==="]"&&this.next();let s=this.parseGroup(),l={"m:rad":{"m:deg":this.wrapE([this.makeRun(a)]),"m:e":this.wrapE(s)}};return Ct(this,l)}let n=this.parseGroup(),i={"m:rad":{"m:radPr":{"m:degHide":{"@_val":"1"}},"m:e":this.wrapE(n)}};return Ct(this,i)}if(t==="\\text"){let i=this.parseGroup().map(a=>{let s=a["m:r"];return s?String(s["m:t"]??""):""}).join("");return this.makeRun(i,true)}if(t==="\\left")return _$(this);if(t==="\\right")return null;let r=t.slice(1);if($$.has(r))return C$(this,r);let o=this.makeRun(t.slice(1),true);return Ct(this,o)}if(e.type==="superscript"||e.type==="subscript"){this.next();let t=this.parseSingleOrGroup(),r=this.makeRun("");return e.type==="superscript"?{"m:sSup":{"m:e":this.wrapE([r]),"m:sup":this.wrapE(t)}}:{"m:sSub":{"m:e":this.wrapE([r]),"m:sub":this.wrapE(t)}}}return null}parseAll(){let e=[];for(;this.peek();){let t=this.parseAtom();t&&e.push(t);}return e}};function oF(e){let t=e.trim();if(t.length===0)return {};let r=M$(t),n=new A$(r).parseAll();return n.length===0?{}:{"m:oMathPara":{"m:oMath":ag(n)}}}var Bs={};for(let[e,t]of Object.entries(zs))Bs[t]=e;var Ro={};for(let[e,t]of Object.entries(Fs))Ro[t]||(Ro[t]=e);var Us={};for(let[e,t]of Object.entries(Ns))Us[t]||(Us[t]=e);function sg(e){return e==null?[]:Array.isArray(e)?e:typeof e=="object"?[e]:[]}function se(e,t){if(!e)return {};let r=e[t];return r&&typeof r=="object"&&!Array.isArray(r)?r:{}}function Zt(e){if(!e)return "";let t=e["@_val"];return typeof t=="string"?t:t!==void 0?String(t):""}function Se(e){if(!e||typeof e!="object")return "";let t=[];for(let r of Object.keys(e)){if(r.startsWith("@_"))continue;let o=q$1(r),n=sg(e[r]);for(let i of n){let a=P$(o,i);a&&t.push(a);}}return t.join("")}function P$(e,t){switch(e){case "m:r":{let r="";if(typeof t["m:t"]=="string"?r=t["m:t"]:t["m:t"]!==void 0&&(r=String(t["m:t"])),r.length===0)return "";if(Bs[r])return `${Bs[r]} `;if(Ro[r])return `${Ro[r]} `;let o=se(t,"m:rPr"),n=Zt(se(o,"m:nor"));return n==="1"||n==="on"||n==="true"?`\\text{${r}}`:r}case "m:f":{let r=Se(se(t,"m:num")),o=Se(se(t,"m:den"));return `\\frac{${r}}{${o}}`}case "m:rad":{let r=se(t,"m:radPr"),o=Zt(se(r,"m:degHide")),n=Se(se(t,"m:e"));if(o==="1"||o==="on"||o==="true")return `\\sqrt{${n}}`;let i=Se(se(t,"m:deg"));return i?`\\sqrt[${i}]{${n}}`:`\\sqrt{${n}}`}case "m:sSup":{let r=Se(se(t,"m:e")),o=Se(se(t,"m:sup"));return `${r}^{${o}}`}case "m:sSub":{let r=Se(se(t,"m:e")),o=Se(se(t,"m:sub"));return `${r}_{${o}}`}case "m:sSubSup":{let r=Se(se(t,"m:e")),o=Se(se(t,"m:sub")),n=Se(se(t,"m:sup"));return `${r}_{${o}}^{${n}}`}case "m:nary":{let r=se(t,"m:naryPr"),o=Zt(se(r,"m:chr")),n=Us[o]??"\\int",i=Zt(se(r,"m:subHide")),a=Zt(se(r,"m:supHide")),s=Se(se(t,"m:sub")),l=Se(se(t,"m:sup")),c=Se(se(t,"m:e")),p=n;return s&&i!=="1"&&(p+=`_{${s}}`),l&&a!=="1"&&(p+=`^{${l}}`),p+=`{${c}}`,p}case "m:d":{let r=se(t,"m:dPr"),o=Zt(se(r,"m:begChr"))||"(",n=Zt(se(r,"m:endChr"))||")",i=Se(se(t,"m:e"));return `\\left${o}${i}\\right${n}`}case "m:func":{let r=Se(se(t,"m:fName")),o=Se(se(t,"m:e"));return `${r}{${o}}`}case "m:box":case "m:borderBox":return sg(t["m:e"]).map(r=>Se(r)).join("");case "m:oMath":return Se(t);default:return ""}}function iF(e){if(!e||typeof e!="object")return "";let t,r=e["m:oMathPara"];return r?.["m:oMath"]?t=r["m:oMath"]:e["m:oMath"]?t=e["m:oMath"]:t=e,Se(t)}var aF=[{label:"Fraction",latex:"\\frac{a}{b}",i18nKey:"pptx.equation.template.fraction"},{label:"Quadratic",latex:"x=\\frac{-b\\pm\\sqrt{b^{2}-4ac}}{2a}",i18nKey:"pptx.equation.template.quadratic"},{label:"Pythagorean",latex:"a^{2}+b^{2}=c^{2}",i18nKey:"pptx.equation.template.pythagorean"},{label:"Sum",latex:"\\sum_{i=1}^{n}{a_{i}}",i18nKey:"pptx.equation.template.sum"},{label:"Integral",latex:"\\int_{a}^{b}{f(x)}dx",i18nKey:"pptx.equation.template.integral"},{label:"Square Root",latex:"\\sqrt{x^{2}+y^{2}}",i18nKey:"pptx.equation.template.squareRoot"},{label:"Limit",latex:"\\lim_{x\\to\\infty}{f(x)}",i18nKey:"pptx.equation.template.limit"},{label:"Euler's",latex:"e^{i\\pi}+1=0",i18nKey:"pptx.equation.template.euler"},{label:"Matrix 2x2",latex:"\\left[a,b;c,d\\right]",i18nKey:"pptx.equation.template.matrix"},{label:"Binomial",latex:"\\left(a+b\\right)^{n}",i18nKey:"pptx.equation.template.binomial"},{label:"Derivative",latex:"\\frac{dy}{dx}",i18nKey:"pptx.equation.template.derivative"},{label:"Trig Identity",latex:"\\sin^{2}\\theta+\\cos^{2}\\theta=1",i18nKey:"pptx.equation.template.trigIdentity"}],E$="#4472C4",O$="#ED7D31",L$="#A5A5A5",D$="#FFC000",R$="#5B9BD5",z$="#70AD47",Ye=[E$,O$,L$,D$,R$,z$],F$=["#3b82f6","#22c55e","#f97316","#eab308","#a855f7","#ec4899","#14b8a6","#f43f5e"];function lg(e){let t=e.replace("#","");return [parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}function cg(e,t,r){let o=n=>Math.max(0,Math.min(255,Math.round(n)));return `#${o(e).toString(16).padStart(2,"0")}${o(t).toString(16).padStart(2,"0")}${o(r).toString(16).padStart(2,"0")}`}function Xt(e,t){let[r,o,n]=lg(e);return cg(r+(255-r)*t,o+(255-o)*t,n+(255-n)*t)}function br(e,t){let[r,o,n]=lg(e);return cg(r*(1-t),o*(1-t),n*(1-t))}function ol(e){let t=[];for(let r=0;r<8;r++)t.push(Ye[(r+e)%Ye.length]);return t}function N$(e){return [br(e,.5),br(e,.35),br(e,.15),e,Xt(e,.2),Xt(e,.4),Xt(e,.6),Xt(e,.8)]}function B$(e,t){return Ye.map((r,o)=>{let n=(o+e)%Ye.length;return t>0?Xt(Ye[n],t):br(Ye[n],-t)}).concat([Xt(Ye[e%Ye.length],.4),br(Ye[(e+1)%Ye.length],.2)])}function U$(e,t){return ol(e).map(r=>br(r,t))}function Um(e,t){return ol(e).map(r=>Xt(r,t))}function j$(e){let t=Math.max(1,Math.min(48,e));if(t<=8)return ol(t-1);if(t<=16){let o=(t-9)%Ye.length;return N$(Ye[o])}if(t<=24){let o=t-17,n=o<4?o*.1:-(o-4)*.1;return B$(o,n)}if(t<=32){let o=t-25;return U$(o,.25+o%4*.1)}if(t<=40){let o=t-33;return Um(o,.15+o%4*.08)}let r=t-41;return Um(r,.4+r%4*.1)}var jm=new Map;function pg(e){if(e===void 0||e<1||e>48)return F$;let t=jm.get(e);return t||(t=j$(e),jm.set(e,t)),t}function W$(e){let t=e.flatMap(s=>s.values);if(t.length===0)return {min:0,max:1,span:1};let r=Math.min(...t),o=Math.max(...t),n=Math.min(r,0),i=Math.max(o,0),a=Math.max(i-n,1);return {min:n,max:i,span:a}}var Wm=1e-12;function H$(e,t){let r=e.flatMap(c=>c.values).filter(c=>c>0);if(r.length===0)return {min:1,max:t,span:1,logScale:true,logBase:t};let o=Math.min(...r),n=Math.max(...r),i=Math.floor(Math.log(o)/Math.log(t)),a=Math.ceil(Math.log(n)/Math.log(t)),s=t**i,l=t**Math.max(a,i+1);return {min:s,max:l,span:Math.max(Math.log(l)/Math.log(t)-Math.log(s)/Math.log(t),1),logScale:true,logBase:t}}function zo(e,t){let r=t?.logBase??10,o=t?.logScale&&Number.isFinite(r)&&r>1?r:t?.logScale?10:void 0,n=o?H$(e,o):W$(e),i=typeof t?.min=="number"&&Number.isFinite(t.min)&&(!o||t.min>0)?t.min:void 0,a=typeof t?.max=="number"&&Number.isFinite(t.max)&&(!o||t.max>0)?t.max:void 0,s=i??n.min,l=a??n.max;l<=s&&(l=o?s*o:s+1);let c=o?Math.log(l)/Math.log(o)-Math.log(s)/Math.log(o):l-s;return {min:s,max:l,span:Math.max(c,Number.EPSILON),...o?{logScale:true,logBase:o}:{},...t?.orientation==="maxMin"?{reverseOrder:true}:{}}}function Z$(e){if(!e.logScale||!e.logBase)return [];let t=e.logBase,r=Math.log(e.min)/Math.log(t),o=Math.log(e.max)/Math.log(t),n=Math.ceil(r-Wm),i=Math.floor(o+Wm);return i<n?e.min===e.max?[e.min]:[e.min,e.max]:Array.from({length:i-n+1},(a,s)=>t**(n+s))}function ug(e,t){if(!Number.isFinite(t)||t<=0||e.logScale)return [];let r=Math.max(1,Math.abs(e.min),Math.abs(e.max))*1e-12,o=Math.ceil((e.min-r)/t),n=Math.floor((e.max+r)/t),i=Math.min(Math.max(n-o+1,0),2e3);return Array.from({length:i},(a,s)=>(o+s)*t)}function dg(e,t,r){if(e.logScale&&e.logBase)return Z$(e);let o=ug(e,t?.majorUnit??0);return o.length>0?o:Array.from({length:r+1},(n,i)=>e.min+e.span/r*i)}function fg(e,t){let r=ug(e,t?.minorUnit??0);if(r.length===0)return [];let o=t?.majorUnit;if(!o||!Number.isFinite(o)||o<=0)return r;let n=Math.max(1,Math.abs(e.min),Math.abs(e.max))*1e-10;return r.filter(i=>Math.abs(i/o-Math.round(i/o))>n)}function G$(e,t){let r=t?.find(o=>o.axisType==="valAx"&&o.axPos==="l")??t?.find(o=>o.axisType==="valAx"&&o.axPos!=="r");return zo(e,r)}var Y$={hundreds:100,thousands:1e3,tenThousands:1e4,hundredThousands:1e5,millions:1e6,tenMillions:1e7,hundredMillions:1e8,billions:1e9,trillions:1e12},V$={hundreds:"Hundreds",thousands:"Thousands",tenThousands:"Ten Thousands",hundredThousands:"Hundred Thousands",millions:"Millions",tenMillions:"Ten Millions",hundredMillions:"Hundred Millions",billions:"Billions",trillions:"Trillions"};function X$(e,t){return e?e==="custom"&&t?t:Y$[e]??1:1}function mg(e,t){return typeof t=="string"?t:t===null?"":t?.text?t.text:!e||e==="custom"?"":V$[e]??""}function K$(e,t){if(!t?.displayUnits)return String(e);let r=X$(t.displayUnits,t.displayUnitsValue),o=e/r;return Number.isInteger(o)?String(o):o.toFixed(1)}function q$(e){return e?e.some(t=>t.axisType==="valAx"&&t.axPos==="r"):false}function J$(e){return e?e.some(t=>(t.axisType==="catAx"||t.axisType==="dateAx")&&t.axPos==="t"):false}function il(e){if(e)return e.find(t=>t.axisType==="valAx"&&t.axPos==="r")}function al(e,t,r){return {hasSecondaryValueAxis:q$(e),hasSecondaryCategoryAxis:J$(e),hasDataTable:!!t,dataTableRowCount:t?r:void 0}}function Q$(e){return il(e)?.axisId}function e5(e){return e?e.find(r=>r.axisType==="valAx"&&r.axPos==="l")?.axisId??e.find(r=>r.axisType==="valAx")?.axisId:void 0}function t5(e,t){if(!t)return false;let r=Q$(t);return r===void 0?false:e.axisId!==void 0?e.axisId===r:false}function hg(e,t){let r=[],o=[];for(let n=0;n<e.length;n++)t5(e[n],t)?o.push({series:e[n],index:n}):r.push({series:e[n],index:n});return {primary:r,secondary:o}}function gg(e){let t=e.replace("#","");return [parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}function xg(e,t,r){let o=n=>Math.max(0,Math.min(255,Math.round(n)));return `#${o(e).toString(16).padStart(2,"0")}${o(t).toString(16).padStart(2,"0")}${o(r).toString(16).padStart(2,"0")}`}function r5(e,t){let[r,o,n]=gg(e);return xg(r+(255-r)*t,o+(255-o)*t,n+(255-n)*t)}function bn(e,t){let[r,o,n]=gg(e);return xg(r*(1-t),o*(1-t),n*(1-t))}function sl(e,t){return e.dataPoints?.find(r=>r.idx===t)}function Kt(e,t,r){return sl(e,t)?.spPr?.fillColor??e.color??r}function ll(e,t,r){return sl(e,t)?.spPr?.fillColor??r}function n5(e,t){return sl(e,t)?.explosion??e.explosion??0}var o5=15,i5=20,a5=5,s5=22;function l5(e){let t=e?.rotX??o5,r=e?.rotY??i5,o=Math.min(Math.max((e?.depthPercent??100)/100,.4),2),n=Math.min(Math.max(13*o,a5),s5),i=t*Math.PI/180,a=r*Math.PI/180;return {dx:Math.sin(a)*n,dy:-Math.sin(i)*n,magnitude:n}}function c5(e,t){let{x:r,y:o,w:n,h:i,fill:a}=e,{dx:s,dy:l}=t,c={kind:"polygon",points:`${r},${o} ${r+n},${o} ${r+n+s},${o+l} ${r+s},${o+l}`,fill:r5(a,.22),stroke:"none",strokeWidth:0},p={kind:"polygon",points:`${r+n},${o} ${r+n},${o+i} ${r+n+s},${o+i+l} ${r+n+s},${o+l}`,fill:bn(a,.25),stroke:"none",strokeWidth:0};return [c,p]}function p5(e,t,r){let o=e.match(/[MLAZ][^MLAZ]*/gu);return o?o.map(n=>{let i=n[0],a=n.slice(1).trim().split(/[ ,]+/u).filter(s=>s.length>0).map(Number);if(i==="M"||i==="L"){let s=[];for(let l=0;l<a.length;l+=2)s.push(a[l]+t,a[l+1]+r);return `${i}${u5(s)}`}if(i==="A"){let s=a.slice(0,5),l=a[5]+t,c=a[6]+r;return `A${s.join(",")},${l},${c}`}return "Z"}).join(""):e}function u5(e){let t=[];for(let r=0;r<e.length;r+=2)t.push(`${e[r]},${e[r+1]}`);return t.join(" ")}function d5(e,t){let r=Math.max(t.magnitude,6);return e.map(o=>({kind:"path",d:p5(o.d,0,r),fill:bn(o.fill,.32),stroke:bn(o.fill,.4),strokeWidth:.5}))}function f5(e,t){let r=[];for(let o of e)if(o.kind==="polyline"){let n=o;r.push({...n,points:Hm(n.points,t.dx,t.dy),stroke:bn(n.stroke,.3),fill:"none",part:void 0});}else if(o.kind==="polygon"){let n=o;r.push({...n,points:Hm(n.points,t.dx,t.dy),fill:bn(n.fill==="none"?"#888888":n.fill,.3),part:void 0});}return r}function Hm(e,t,r){return e.trim().split(/\s+/u).map(o=>{let[n,i]=o.split(",").map(Number);return `${n+t},${i+r}`}).join(" ")}function m5(e,t,r){let o=l5(r),n=[];if(t==="bar3D")n=e.primitives.filter(a=>a.kind==="rect"&&a.part?.role==="dataPoint").flatMap(a=>c5(a,o));else if(t==="pie3D"){let i=e.primitives.filter(a=>a.kind==="path");n=d5(i,o);}else if(t==="line3D"||t==="area3D")n=f5(e.primitives,o);else return e;return n.length===0?e:{...e,primitives:[...n,...e.primitives]}}function js(e,t,r){return Math.min(Math.max(e,t),r)}function h5(e,t,r,o){if(e?.crosses==="max")return r.plotTop;if(e?.crosses==="min")return r.plotBottom;let n=e?.crossesAt??0;return e?.crossesAt!==void 0||e?.crosses==="autoZero"?Y(js(n,t.min,t.max),t,r.plotTop,r.plotBottom):o==="top"?r.plotTop:r.plotBottom}function Fo(e,t,r,o,n){if(e?.crosses==="max")return r.plotRight;if(e?.crosses==="min")return r.plotLeft;if(e?.crossesAt!==void 0){if(e.axisType==="dateAx"&&n?.length){let s=e.min??Math.min(...n),l=e.max??Math.max(...n),c=l===s?.5:(js(e.crossesAt,s,l)-s)/(l-s);return r.plotLeft+c*r.plotWidth}let i=js(e.crossesAt-1,0,Math.max(t-1,0)),a=t<=1?.5:i/(t-1);return r.plotLeft+a*r.plotWidth}return o==="right"?r.plotRight:r.plotLeft}var yg="#64748b";function Zm(e,t){if(!e||e==="solid")return;let r=Math.max(t,1);return e==="dot"||e==="sysDot"?`${r} ${r*2}`:e==="lgDash"?`${r*6} ${r*3}`:`${r*3} ${r*2}`}function $r(e,t=8){return {fontSize:e?.fontSize??t,fill:e?.fontColor??yg,...e?.fontBold!==void 0?{fontWeight:e.fontBold?"bold":"normal"}:{},...e?.fontFamily?{fontFamily:e.fontFamily}:{}}}function tr(e,t=yg,r=1){let o=e?.strokeWidth??r;return {stroke:e?.strokeColor??t,strokeWidth:o,...Zm(e?.strokeDashStyle,o)?{dashArray:Zm(e?.strokeDashStyle,o)}:{}}}function No(e,t,r,o,n,i){if(!r||r==="none")return;let a=o==="left"?1:-1,s=r==="cross"?-a*n:0,l=r==="out"?-a*n:a*n;return {kind:"line",x1:e+s,y1:t,x2:e+l,y2:t,...tr(i)}}function vg(e,t,r){return e?.spPr?{kind:"line",x1:t,y1:r.plotTop,x2:t,y2:r.plotBottom,...tr(e.spPr)}:void 0}function Bo(e,t,r,o,n,i,a){let s=tr(r,o,n);return {kind:"line",x1:t.plotLeft,y1:e,x2:t.plotRight,y2:e,...s,...(r?s.dashArray:i)?{dashArray:r?s.dashArray:i}:{},...a!==void 0?{opacity:a}:{}}}var Gm="#e2e8f0",Ym="#e2e8f0",bg=5,Sg=4,wg=2.5;function $g(e,t,r,o){return !t||t==="nextTo"?r==="left"?{x:o-4,textAnchor:"end"}:{x:o+4,textAnchor:"start"}:(t==="high"?"right":t==="low"?"left":r)==="left"?{x:e.plotLeft-4,textAnchor:"end"}:{x:e.plotRight+4,textAnchor:"start"}}function kg(e,t){return t?.displayUnits?K$(e,t):le(e)}function cl(e,t,r,o=t.plotLeft){let n=[],i=[],a=dg(e,r,bg),s=fg(e,r),l=vg(r,o,t);if(l&&n.push(l),r?.minorGridlines)for(let c of s){let p=Y(c,e,t.plotTop,t.plotBottom);n.push(Bo(p,t,r.minorGridlinesSpPr,Gm,.5,"1 2",.5));}for(let c of s){let p=Y(c,e,t.plotTop,t.plotBottom),u=No(o,p,r?.minorTickMark,"left",wg,r?.spPr);u&&n.push(u);}for(let c of a){let p=Y(c,e,t.plotTop,t.plotBottom);n.push(Bo(p,t,r?.majorGridlinesSpPr,Gm,1,void 0,void 0));let u=No(o,p,r?.majorTickMark,"left",Sg,r?.spPr);u&&n.push(u),r?.tickLblPos!=="none"&&i.push({kind:"text",...$g(t,r?.tickLblPos,"left",o),y:p,text:kg(c,r),...$r(r),dominantBaseline:"central"});}if(r?.displayUnits){let c=mg(r.displayUnits,r.displayUnitsLabel);if(c){let p=t.plotLeft-36,u=(t.plotTop+t.plotBottom)/2;i.push({kind:"text",x:p,y:u,text:c,...$r(r,9),textAnchor:"middle",transform:`rotate(-90, ${p}, ${u})`});}}return {gridlines:n,axisLabels:i}}function pl(e,t,r,o=t.plotRight){let n=[],i=[],a=$r(r),s=$r(r,9),l=vg(r,o,t);l&&n.push(l);let c=dg(e,r,bg-1),p=fg(e,r);if(r?.minorGridlines)for(let u of p){let d=Y(u,e,t.plotTop,t.plotBottom);n.push(Bo(d,t,r.minorGridlinesSpPr,Ym,.5,"1 2",.35));}for(let u of p){let d=Y(u,e,t.plotTop,t.plotBottom),f=No(o,d,r?.minorTickMark,"right",wg,r?.spPr);f&&n.push(f);}for(let u of c){let d=Y(u,e,t.plotTop,t.plotBottom);n.push(Bo(d,t,r?.majorGridlinesSpPr,Ym,.5,"2 3",.5));let f=No(o,d,r?.majorTickMark,"right",Sg,r?.spPr);f&&n.push(f),r?.tickLblPos!=="none"&&i.push({kind:"text",...$g(t,r?.tickLblPos,"right",o),y:d,text:kg(u,r),...a,dominantBaseline:"central"});}if(r?.titleText){let u=t.plotRight+36,d=(t.plotTop+t.plotBottom)/2;i.push({kind:"text",x:u,y:d,text:r.titleText,...s,textAnchor:"middle",transform:`rotate(-90, ${u}, ${d})`});}if(r?.displayUnits){let u=mg(r.displayUnits,r.displayUnitsLabel);if(u){let d=t.plotRight+(r.titleText?52:36),f=(t.plotTop+t.plotBottom)/2;i.push({kind:"text",x:d,y:f,text:u,...s,textAnchor:"middle",transform:`rotate(-90, ${d}, ${f})`});}}return {gridlines:n,axisLabels:i}}function g5(e){return !!(e.dataTable||e.axes?.some(t=>t.crosses!==void 0||t.crossesAt!==void 0||t.crossBetween!==void 0||t.axisType==="valAx"&&!!(t.logScale||t.displayUnits||t.axPos==="r"||t.orientation==="maxMin"||t.majorUnit!==void 0||t.minorUnit!==void 0||t.minorGridlines||t.majorTickMark!==void 0||t.minorTickMark!==void 0||t.tickLblPos!==void 0)))}function x5(e,t,r,o,n){if(!g5(e)){let{gridlines:u,axisLabels:d}=Tr(r,t);return {gridlines:u,axisLabels:d,secondaryGridlines:void 0,secondaryAxisLabels:void 0}}let i=e.axes?.find(u=>u.axisType==="valAx"&&u.axPos!=="r")??e.axes?.find(u=>u.axisType==="valAx"),a=u=>e.axes?.find(d=>(d.axisType==="catAx"||d.axisType==="dateAx")&&d.axisId===u),s=(u,d)=>Fo(a(u),n,t,d,e.dateCategories?.values),l=cl(r,t,i,s(i?.crossAxisId,"left"));if(!o)return {...l,secondaryGridlines:void 0,secondaryAxisLabels:void 0};let c=il(e.axes),p=pl(o,t,c,s(c?.crossAxisId,"right"));return {...l,secondaryGridlines:p.gridlines,secondaryAxisLabels:p.axisLabels}}function y5(e,t){return Array.from({length:t},(r,o)=>e.reduce((n,i)=>n+Math.abs(i.values[o]??0),0))}function v5(e){let t=/^#?([0-9a-f]{6})$/iu.exec(e.trim());if(!t)return e;let r=Number.parseInt(t[1],16),o=s=>Math.round(s+(255-s)*.5),n=o(r>>16&255),i=o(r>>8&255),a=o(r&255);return `#${(n<<16|i<<8|a).toString(16).padStart(6,"0").toUpperCase()}`}function us(e,t,r,o){return r>=0?o:e.dataPoints?.find(a=>a.idx===t)?.invertIfNegative??e.invertIfNegative??false?v5(o):o}function b5(e,t,r,o,n,i,a,s){let l=[],c=[],p=e.series,u=e.colorPalette,d=e.style?.hasDataLabels,f=e.varyColors===true&&p.length===1;if(a==="clustered"){let y=Math.max(p.length,1),v=r.plotWidth/Math.max(t,1),S=e.barGapWidth!==void 0?v/(y+Math.max(e.barGapWidth,0)/100):v*.7/y,$=e.barOverlap??0,w=S*(1-$/100),k=S+w*(y-1),I=(v-k)/2;for(let R=0;R<t;R++){let E=s[R]??R;for(let N=0;N<p.length;N++){let W=p[N].values[E]??0,Z=r.plotLeft+v*R+I+w*N,ne=i.has(N)&&n?n:o,re=Y(0,ne,r.plotTop,r.plotBottom),U=Y(W,ne,r.plotTop,r.plotBottom),V=Math.min(re,U),K=Math.max(Math.abs(re-U),1),j=f?ll(p[N],E,we(E,u)):Kt(p[N],E,we(N,u))??Fe(p[N],N,u);l.push({kind:"rect",x:Z,y:V,w:S,h:K,fill:us(p[N],E,W,j),rx:1,part:{role:"dataPoint",seriesIndex:N,pointIndex:E}}),d&&c.push({kind:"text",x:Z+S/2,y:W>=0?V-4:V+K+10,text:le(W),fontSize:7,fill:"#334155",textAnchor:"middle"});}}return {primitives:l,dataLabels:c}}if(a==="stacked"){let y=p.map(S=>({...S,values:s.map($=>S.values[$]??0)})),v=wM(y,t,r,o,u);for(let S of v){let $=S.fill,w;if(S.seriesIndex!==void 0&&S.pointIndex!==void 0){let k=s[S.pointIndex]??S.pointIndex;$=Kt(p[S.seriesIndex],k,S.fill)??S.fill;let I=p[S.seriesIndex].values[k]??0;$=us(p[S.seriesIndex],k,I,$),w={role:"dataPoint",seriesIndex:S.seriesIndex,pointIndex:k};}l.push({kind:"rect",x:S.x,y:S.y,w:S.w,h:S.h,fill:$,rx:1,part:w});}return d&&S5(p,s,t,r,o,c),{primitives:l,dataLabels:c}}let m=r.plotWidth/Math.max(t,1),h=m*.6,g=(m-h)/2,x=p.map(y=>({...y,values:s.map(v=>y.values[v]??0)})),b=y5(x,t);for(let y=0;y<t;y++){let v=0,S=0,$=b[y]||1;for(let w=0;w<p.length;w++){let k=s[y]??y,I=p[w].values[k]??0,R=$>0?I/$*100:0,E=R<0,N=E?S:v,W=N+R,Z=r.plotLeft+m*y+g,ne=Y(N,o,r.plotTop,r.plotBottom),re=Y(W,o,r.plotTop,r.plotBottom),U=Math.min(ne,re),V=Math.max(Math.abs(ne-re),.5),K=Kt(p[w],k,we(w,u))??Fe(p[w],w,u);l.push({kind:"rect",x:Z,y:U,w:h,h:V,fill:us(p[w],k,I,K),part:{role:"dataPoint",seriesIndex:w,pointIndex:k}}),d&&Math.abs(R)>0&&c.push({kind:"text",x:Z+h/2,y:U+V/2+3,text:`${Math.round(R)}%`,fontSize:7,fill:"#ffffff",textAnchor:"middle",fontWeight:"bold"}),E?S+=R:v+=R;}}return {primitives:l,dataLabels:c}}function S5(e,t,r,o,n,i){let a=o.plotWidth/r,s=Math.max(e.length,1),l=a*.7/s,c=(a-l*s)/2;for(let p=0;p<r;p++){let u=t[p]??p;for(let d=0;d<e.length;d++){let f=e[d].values[u]??0,m=o.plotLeft+a*p+c+l*d+l/2,h=Y(0,n,o.plotTop,o.plotBottom),g=Y(f,n,o.plotTop,o.plotBottom),x=f>=0?Math.min(h,g)-4:Math.max(h,g)+10;i.push({kind:"text",x:m,y:x,text:le(f),fontSize:7,fill:"#334155",textAnchor:"middle"});}}}function w5(e,t){let r=[...e];for(let o=0;o<r.length;o++){if(!t[o])continue;let n=o-1;for(;n>=0&&t[n];)n--;let i=o+1;for(;i<r.length&&t[i];)i++;let a=n>=0,s=i<r.length;if(a&&s){let l=(o-n)/(i-n);r[o]=e[n]+(e[i]-e[n])*l;}else a?r[o]=e[n]:s&&(r[o]=e[i]);}return r}function $5(e,t,r){let o=e.map(()=>true);return !t||!t.some(Boolean)||r===void 0||r==="zero"?{values:[...e],visible:o}:r==="span"?{values:w5(e,t),visible:o}:{values:[...e],visible:e.map((n,i)=>!t[i])}}function k5(e){let t=[],r=[];for(let o=0;o<e.length;o++)e[o]?r.push(o):r.length>0&&(t.push(r),r=[]);return r.length>0&&t.push(r),t}function M5(e){if(e.length===0)return "";if(e.length===1)return `M${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`;if(e.length===2)return `M${e[0].x.toFixed(2)},${e[0].y.toFixed(2)} L${e[1].x.toFixed(2)},${e[1].y.toFixed(2)}`;let t=`M${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`;for(let r=0;r<e.length-1;r++){let o=e[r-1]??e[r],n=e[r],i=e[r+1],a=e[r+2]??i,s=n.x+(i.x-o.x)/6,l=n.y+(i.y-o.y)/6,c=i.x-(a.x-n.x)/6,p=i.y-(a.y-n.y)/6;t+=` C${s.toFixed(2)},${l.toFixed(2)} ${c.toFixed(2)},${p.toFixed(2)} ${i.x.toFixed(2)},${i.y.toFixed(2)}`;}return t}function T5(e,t){return e===void 0||!Number.isFinite(e)||e<=0?t:e/2}function ds(e){return e.map(([t,r])=>`${t.toFixed(2)},${r.toFixed(2)}`).join(" ")}function I5(e,t,r){let o=r*.5,n=[];for(let i=0;i<10;i++){let a=i%2===0?r:o,s=-Math.PI/2+Math.PI*i/5;n.push([e+a*Math.cos(s),t+a*Math.sin(s)]);}return n}function _5(e){let{symbol:t,cx:r,cy:o,fill:n,part:i}=e;if(t==="none")return null;let a=T5(e.size,e.defaultRadius),s=n;switch(t){case "square":return {kind:"rect",x:r-a,y:o-a,w:a*2,h:a*2,fill:n,part:i};case "dash":return {kind:"rect",x:r-a,y:o-a*.32,w:a*2,h:a*.64,fill:n,part:i};case "diamond":return {kind:"polygon",points:ds([[r,o-a],[r+a,o],[r,o+a],[r-a,o]]),fill:n,stroke:s,strokeWidth:0,part:i};case "triangle":return {kind:"polygon",points:ds([[r,o-a],[r+a*.9,o+a*.75],[r-a*.9,o+a*.75]]),fill:n,stroke:s,strokeWidth:0,part:i};case "star":return {kind:"polygon",points:ds(I5(r,o,a)),fill:n,stroke:s,strokeWidth:0,part:i};case "plus":return {kind:"path",d:`M${(r-a).toFixed(2)},${o.toFixed(2)} L${(r+a).toFixed(2)},${o.toFixed(2)} M${r.toFixed(2)},${(o-a).toFixed(2)} L${r.toFixed(2)},${(o+a).toFixed(2)}`,fill:"none",stroke:s,strokeWidth:Math.max(1,a*.4),part:i};case "x":return {kind:"path",d:`M${(r-a).toFixed(2)},${(o-a).toFixed(2)} L${(r+a).toFixed(2)},${(o+a).toFixed(2)} M${(r+a).toFixed(2)},${(o-a).toFixed(2)} L${(r-a).toFixed(2)},${(o+a).toFixed(2)}`,fill:"none",stroke:s,strokeWidth:Math.max(1,a*.4),part:i};case "dot":return {kind:"circle",cx:r,cy:o,r:Math.max(a*.6,1),fill:n,part:i};default:return {kind:"circle",cx:r,cy:o,r:a,fill:n,part:i}}}function ul(e,t,r,o,n,i,a,s){let l=_5({symbol:t.marker?.symbol,size:t.marker?.size,cx:r,cy:o,fill:n,defaultRadius:i,part:a});l&&(s!==void 0&&(l.opacity=s),e.push(l));}function C5(e,t,r,o,n,i,a,s){let l=[],c=[],p=e.style?.hasDataLabels;for(let u=0;u<e.series.length;u++){let d=e.series[u];if(d.values.length===0)continue;let f=i.has(u)&&n?n:o,m=a.map($=>d.values[$]??0),h=a.map($=>d.blanks?.[$]??false),{values:g,visible:x}=$5(m,h,e.chartChrome?.dispBlanksAs),b=jg(g,t,r,f).map(($,w)=>({...$,x:s?.[w]??$.x})),y=Fe(d,u,e.colorPalette),v={role:"series",seriesIndex:u};if(x.every(Boolean))l.push(d.smooth?{kind:"path",d:M5(b),stroke:y,strokeWidth:2.4,fill:"none",part:v}:{kind:"polyline",points:Zs(b),stroke:y,strokeWidth:2.4,fill:"none",part:v});else for(let $ of k5(x))$.length<2||l.push({kind:"polyline",points:Zs($.map(w=>b[w])),stroke:y,strokeWidth:2.4,fill:"none",part:v});b.forEach(($,w)=>{if(!x[w])return;let k=a[w]??w,I={role:"dataPoint",seriesIndex:u,pointIndex:k};ul(l,d,$.x,$.y,Kt(d,k,y)??y,2.5,I);}),p&&g.forEach(($,w)=>{let k=b[w];!k||!x[w]||c.push({kind:"text",x:k.x,y:k.y-7,text:le($),fontSize:7,fill:"#334155",textAnchor:"middle"});});}return {primitives:l,dataLabels:c}}function A5(e,t,r,o,n,i){let a=[],s=[],l=e.style?.hasDataLabels,c=Y(0,o,r.plotTop,r.plotBottom);for(let p=0;p<e.series.length;p++){let u=e.series[p];if(u.values.length===0)continue;let d=n.map(b=>u.values[b]??0),f=jg(d,t,r,o).map((b,y)=>({...b,x:i?.[y]??b.x})),m=Fe(u,p,e.colorPalette),h=Zs(f),g=f[0],x=f[f.length-1];g&&x&&a.push({kind:"polyline",points:`${g.x.toFixed(2)},${c.toFixed(2)} ${h} ${x.x.toFixed(2)},${c.toFixed(2)}`,stroke:"none",strokeWidth:0,fill:m,opacity:.25,part:{role:"series",seriesIndex:p}}),a.push({kind:"polyline",points:h,stroke:m,strokeWidth:2,fill:"none",part:{role:"series",seriesIndex:p}}),f.forEach((b,y)=>{let v=n[y]??y,S={role:"dataPoint",seriesIndex:p,pointIndex:v};ul(a,u,b.x,b.y,Kt(u,v,m)??m,2,S);}),l&&d.forEach((b,y)=>{let v=f[y];v&&s.push({kind:"text",x:v.x,y:v.y-6,text:le(b),fontSize:7,fill:"#334155",textAnchor:"middle"});});}return {primitives:a,dataLabels:s}}function P5(e,t,r){let o=[],n=[],i=e.style?.hasDataLabels,a=e.series.flatMap(c=>c.values.map((p,u)=>u)),s=Math.max(1,...a),l=e.categories.map(Number);for(let c=0;c<e.series.length;c++){let p=e.series[c],u=Fe(p,c,e.colorPalette),d=Wg(p.values,s,t,r,l);d.forEach((f,m)=>{let h={role:"dataPoint",seriesIndex:c,pointIndex:m};ul(o,p,f.cx,f.cy,Kt(p,m,u)??u,4,h,.85);}),i&&p.values.forEach((f,m)=>{let h=d[m];h&&n.push({kind:"text",x:h.cx,y:h.cy-6,text:le(f),fontSize:7,fill:"#334155",textAnchor:"middle"});});}return {primitives:o,dataLabels:n}}function E5(e,t,r){let o=[],n=[],i=e.style?.hasDataLabels,a=e.series.flatMap(f=>f.values.map((m,h)=>h)),s=Math.max(1,...a),l=e.categories.map(Number),c=e.series.length>=3?e.series[2]:void 0,p=c?Math.max(1,...c.values.map(f=>Math.abs(f))):1,u=Math.min(t.plotWidth,t.plotHeight)*.04,d=e.series.slice(0,2);for(let f=0;f<d.length;f++){let m=d[f],h=Fe(m,f,e.colorPalette),g=Wg(m.values,s,t,r,l);g.forEach((x,b)=>{let y=MM(c?.values[b],p,u);o.push({kind:"circle",cx:x.cx,cy:x.cy,r:y,fill:Kt(m,b,h)??h,opacity:.6,part:{role:"dataPoint",seriesIndex:f,pointIndex:b}});}),i&&m.values.forEach((x,b)=>{let y=g[b];y&&n.push({kind:"text",x:y.cx,y:y.cy-10,text:le(x),fontSize:7,fill:"#334155",textAnchor:"middle"});});}return {primitives:o,dataLabels:n}}function dl(e,t,r,o){let n=o.xPositions?.[e];if(n!==void 0)return n;if(o.mode==="bar"){let a=r.plotWidth/Math.max(t,1);return r.plotLeft+a*e+a/2}let i=Math.max(t-1,1);return r.plotLeft+e/i*r.plotWidth}function Mg(e){if(!(!e||e==="solid"))return e==="dot"||e==="sysDot"?"1 2":"4 3"}function O5(e,t,r,o,n){let i=e.dropLines;if(!i)return [];let a=Y(r.min,r,t.plotTop,t.plotBottom),s=Mg(i.dashStyle),l=[];for(let c of e.series)c.values.forEach((p,u)=>{let d=dl(u,o,t,n);l.push({kind:"line",x1:d,y1:Y(p,r,t.plotTop,t.plotBottom),x2:d,y2:a,stroke:i.color??"#94a3b8",strokeWidth:i.width??.8,dashArray:s});});return l}function L5(e,t,r,o,n){let i=e.hiLowLines;if(!i||e.series.length<2)return [];let a=Mg(i.dashStyle),s=[];for(let l=0;l<o;l++){let c=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY;for(let d of e.series){let f=d.values[l];f!==void 0&&(c=Math.max(c,f),p=Math.min(p,f));}if(!Number.isFinite(c)||!Number.isFinite(p))continue;let u=dl(l,o,t,n);s.push({kind:"line",x1:u,y1:Y(c,r,t.plotTop,t.plotBottom),x2:u,y2:Y(p,r,t.plotTop,t.plotBottom),stroke:i.color??"#334155",strokeWidth:i.width??1,dashArray:a});}return s}function D5(e,t,r,o,n){let i=e.upDownBars;if(!i||e.series.length<2)return [];let a=e.series[0],s=e.series[e.series.length-1],l=t.plotWidth/Math.max(o,1),c=i.gapWidth??150,p=Math.max(l/(1+Math.max(c,0)/100),1),u=i.upBars?.fillColor??"#e2e8f0",d=i.downBars?.fillColor??"#334155",f=[];for(let m=0;m<o;m++){let h=a.values[m],g=s.values[m];if(h===void 0||g===void 0)continue;let x=Y(h,r,t.plotTop,t.plotBottom),b=Y(g,r,t.plotTop,t.plotBottom),y=dl(m,o,t,n)-p/2;f.push({kind:"rect",x:y,y:Math.min(x,b),w:p,h:Math.max(Math.abs(x-b),1),fill:g>=h?u:d});}return f}function Tg(e,t,r,o,n){return [...D5(e,t,r,o,n),...O5(e,t,r,o,n),...L5(e,t,r,o,n)]}function Sn(e,t,r,o){return o==="bar"?r.plotLeft+r.plotWidth/Math.max(t,1)*(e+.5):t>1?r.plotLeft+r.plotWidth/(t-1)*e:r.plotLeft+r.plotWidth/2}function R5(e){let t=[];return e.forEach((r,o)=>{let n=t[t.length-1];n?.text===r?n.end=o:t.push({text:r,start:o,end:o});}),t}function z5(e,t,r,o,n,i,a,s,l){let c=t?.length?t:[e],p=i?.noMultiLevelLabels?c.slice(0,1):c,u=Math.max(1,i?.tickLabelSkip??1),d=i?.labelAlignment==="l"?"start":i?.labelAlignment==="r"?"end":"middle",f=s?-1:1,m=Math.max(i?.fontSize??8,8)+4;return p.flatMap((h,g)=>{let x=r.map(b=>h[b]??"");return R5(x).flatMap(b=>{if(!b.text||b.start%u!==0)return [];let y=Sn(b.start,r.length,o,n),v=Sn(b.end,r.length,o,n);return [{kind:"text",x:(y+v)/2,y:a+f*(l+g*m),text:b.text,textAnchor:d,...$r(i)}]})})}function F5(e){let t=e?.filter(r=>r.axisType==="catAx"||r.axisType==="dateAx");return t?.find(r=>r.axPos!=="t")??t?.[0]}function Vm(e,t,r,o,n,i){if(!r||r==="none")return;let a=o?n:-n,s=-a,[l,c]=r==="cross"?[-n,n]:r==="in"?[0,a]:[0,s];return {kind:"line",x1:e,y1:t+l,x2:e,y2:t+c,...tr(i.spPr)}}function Xm(e,t,r,o,n){if(!e||e.deleted)return [];let i=[],a=e.axPos==="t",s=n??(a?r.plotTop:r.plotBottom);e.spPr&&i.push({kind:"line",x1:r.plotLeft,y1:s,x2:r.plotRight,y2:s,...tr(e.spPr)});let l=Math.max(1,e.tickMarkSkip??1);for(let c=0;c<t;c+=l){let p=Sn(c,t,r,o),u=Vm(p,s,e.majorTickMark,a,4,e);if(u&&i.push(u),e.minorTickMark!==void 0&&c+l<t){let d=Sn(c+l,t,r,o),f=Vm((p+d)/2,s,e.minorTickMark,a,2.5,e);f&&i.push(f);}}return i}function Km(e,t,r,o,n,i,a){let s=n??F5(o),l=e.map((g,x)=>x);if(s?.orientation==="maxMin"&&l.reverse(),s?.deleted||s?.tickLblPos==="none")return {axis:s,sourceIndices:l,labels:[],tickMarks:Xm(s,l.length,t,r,i)};let c=s?.axPos==="t",p=s?.tickLblPos==="high",u=s?.tickLblPos==="low",d=p||!u&&c,f=4+8*((s?.labelOffset??100)/100),m=p?t.plotTop:u?t.plotBottom:i??(c?t.plotTop:t.plotBottom),h=z5(e,a,l,t,r,s,m,d,f);return {axis:s,sourceIndices:l,labels:h,tickMarks:Xm(s,l.length,t,r,i)}}function N5(e,t){return t.every((r,o)=>r===o)?e:{...e,categories:t.map(r=>e.categories[r]??""),categoryLevels:e.categoryLevels?.map(r=>t.map(o=>r[o]??"")),series:e.series.map(r=>({...r,values:t.map(o=>r.values[o]??0),errBars:r.errBars?.map(o=>({...o,customPlus:o.customPlus?t.map(n=>o.customPlus?.[n]??0):void 0,customMinus:o.customMinus?t.map(n=>o.customMinus?.[n]??0):void 0}))}))}}var Ig=864e5;function Ao(e,t=false){let r=t?Date.UTC(1904,0,1):Date.UTC(1899,11,e<60?31:30);return new Date(r+e*Ig)}function B5(e){return e.axes?.find(t=>t.axisType==="dateAx"&&t.axPos!=="t")??e.axes?.find(t=>t.axisType==="dateAx")}function vo(e,t,r,o){let n=r===t?.5:(e-t)/(r-t);return o.plotLeft+n*o.plotWidth}function U5(e,t,r){let o=new Date(e);return r==="days"?o.setUTCDate(o.getUTCDate()+t):r==="months"?o.setUTCMonth(o.getUTCMonth()+t):o.setUTCFullYear(o.getUTCFullYear()+t),o}function j5(e,t,r){let o=e.toLocaleString("en-US",{month:"short",timeZone:"UTC"}),n=String(e.getUTCFullYear()),i=String(e.getUTCDate());return r?.toLowerCase().includes("yyyy")?r.toLowerCase().includes("d")?`${i} ${o} ${n}`:`${o} ${n}`:t==="years"?n:t==="months"?`${o} ${n}`:`${i} ${o}`}function qm(e,t,r,o){let n=o?r.minorTickMark:r.majorTickMark;if(!n||n==="none")return;let i=o?2.5:4,s=(r.axPos==="t"?1:-1)*i,l=-s,[c,p]=n==="cross"?[-i,i]:n==="in"?[0,s]:[0,l];return {kind:"line",x1:e,y1:t+c,x2:e,y2:t+p,...tr(r.spPr)}}function Jm(e,t,r,o,n){let i=[],a=Ao(e,r);for(let s=0;s<1e3&&a.getTime()<=Ao(t,r).getTime();s++)i.push(e+(a.getTime()-Ao(e,r).getTime())/Ig),a=U5(a,n,o);return i}function Qm(e,t,r,o){let n=e.dateCategories,i=r??B5(e);if(!n||!i||n.values.length===0)return;let a=n.values.map((w,k)=>({value:w,index:k})).sort((w,k)=>w.value-k.value),s=a[0]?.value??0,l=a[a.length-1]?.value??s,c=i.min??s,p=i.max??l,u=a.filter(({value:w})=>w>=c&&w<=p);i.orientation==="maxMin"&&u.reverse();let d=u.map(({index:w})=>w),f=u.map(({value:w})=>{let k=vo(w,c,p,t);return i.orientation==="maxMin"?t.plotLeft+t.plotWidth-(k-t.plotLeft):k}),m=i.majorTimeUnit??i.baseTimeUnit??"days",h=Jm(c,p,n.date1904??false,m,Math.max(1,i.majorUnit??1)),g=o??(i.axPos==="t"?t.plotTop:t.plotBottom),x=4+8*((i.labelOffset??100)/100),b=i.tickLblPos==="high"||i.tickLblPos!=="low"&&i.axPos==="t",y=i.tickLblPos==="high"?t.plotTop:i.tickLblPos==="low"?t.plotBottom:g,v=Math.max(1,i.tickLabelSkip??1),S=i.deleted||i.tickLblPos==="none"?[]:h.flatMap((w,k)=>{if(k%v!==0)return [];let I=vo(w,c,p,t);return i.orientation==="maxMin"&&(I=t.plotLeft+t.plotWidth-(I-t.plotLeft)),[{kind:"text",x:I,y:b?y-x:y+x,text:j5(Ao(w,n.date1904),m,i.numFmt?.formatCode??n.formatCode),...$r(i),textAnchor:"middle"}]}),$=i.deleted?[]:h.flatMap((w,k)=>{if(k%Math.max(1,i.tickMarkSkip??1)!==0)return [];let I=vo(w,c,p,t);i.orientation==="maxMin"&&(I=t.plotLeft+t.plotWidth-(I-t.plotLeft));let R=qm(I,g,i,false);return R?[R]:[]});if(!i.deleted&&i.spPr&&$.unshift({kind:"line",x1:t.plotLeft,y1:g,x2:t.plotRight,y2:g,...tr(i.spPr)}),!i.deleted&&i.minorTickMark&&i.minorTickMark!=="none"){let w=i.minorTimeUnit??i.baseTimeUnit??m;for(let k of Jm(c,p,n.date1904??false,w,Math.max(1,i.minorUnit??1))){let I=vo(k,c,p,t);i.orientation==="maxMin"&&(I=t.plotLeft+t.plotWidth-(I-t.plotLeft));let R=qm(I,g,i,true);R&&$.push(R);}}return {sourceIndices:d,xPositions:f,labels:S,tickMarks:$}}function fl(e,t,r,o,n,i){let a=o==="line"||o==="area"||o==="scatter"||o==="bubble"?"line":"bar",s=e.axes?.filter(b=>b.axisType==="catAx"||b.axisType==="dateAx"),l=s?.find(b=>b.axPos!=="t")??s?.[0],c=s?.find(b=>b.axPos==="t"&&b!==l),p=b=>e.axes?.find(y=>y.axisType==="valAx"&&y.axisId===b?.crossAxisId),u=p(l);u?.crossBetween==="between"?a="bar":u?.crossBetween==="midCat"&&(a="line");let d=b=>{let y=p(b),v=y?.axPos==="r"&&i?i:n;return h5(y,v,r,b?.axPos==="t"?"top":"bottom")},m=(o==="line"||o==="area"||o==="combo"||o==="stock")&&l?.axisType==="dateAx"?Qm(e,r,l,d(l)):void 0,h=o==="scatter"||o==="bubble"||m?void 0:Km(t,r,a,e.axes,l,d(l),e.categoryLevels),g=c?c.axisType==="dateAx"?Qm(e,r,c,d(c)):Km(t,r,p(c)?.crossBetween==="between"?"bar":"line",e.axes,c,d(c),e.categoryLevels):void 0,x=m?.sourceIndices??h?.sourceIndices??t.map((b,y)=>y);return {catAxisStyle:a,sourceIndices:x,xPositions:m?.xPositions??h?.sourceIndices.map((b,y)=>Sn(y,h.sourceIndices.length,r,a)),labels:[...m?.labels??h?.labels??Qo(t,r,a),...g?.labels??[]],tickMarks:[...m?.tickMarks??h?.tickMarks??[],...g?.tickMarks??[]],displayChartData:m||h?N5(e,x):e}}var _g="#334155",Uo=4;function W5(e,t,r,o){if(o==="bar"){let n=r.plotWidth/Math.max(t,1);return r.plotLeft+n*e+n/2}return r.plotLeft+e/Math.max(t-1,1)*r.plotWidth}function H5(e,t,r){if(!t||t.length===0)return r(e);let o=Math.floor(e),n=Math.ceil(e),i=a=>{if(t[a]!==void 0)return t[a];let s=t.length-1,l=t[s]??0,c=s>0?t[s-1]??t[0]??0:t[0]??0,p=l-c;return l+p*(a-t.length+1)};return i(o)+(i(n)-i(o))*(e-o)}function Z5(e,t,r){return r.plotLeft+(e-t.min)/Math.max(t.span,1e-9)*r.plotWidth}function G5(e,t,r){let o=t.seriesChartType??e.chartType;return o==="scatter"||o==="bubble"?{values:r.map(i=>{let a=Number(e.categories[i]);return Number.isFinite(a)?a:i}),numeric:true}:{values:r.map((i,a)=>a),numeric:false}}function Y5(e){let t=Math.min(...e),r=Math.max(...e);return {min:t,max:r,span:Math.max(r-t,1)}}function V5(e,t,r,o,n){switch(e.valType){case "fixedVal":return e.val??0;case "percentage":return Math.abs(t[r]??0)*((e.val??0)/100);case "stdDev":{let i=t.reduce((s,l)=>s+l,0)/Math.max(t.length,1),a=t.reduce((s,l)=>s+(l-i)**2,0)/Math.max(t.length,1);return Math.sqrt(a)*(e.val??1)}case "stdErr":{let i=Math.max(t.length,1),a=t.reduce((l,c)=>l+c,0)/i,s=t.reduce((l,c)=>l+(c-a)**2,0)/i;return Math.sqrt(s/i)}case "cust":return n==="plus"?e.customPlus?.[o]??0:e.customMinus?.[o]??0}}function jo(e,t,r,o,n){return {kind:"line",x1:e,y1:t,x2:r,y2:o,stroke:n,strokeWidth:1}}function X5(e,t,r,o,n,i,a,s){let l=t.color??_g,c=Y(o,a,s.plotTop,s.plotBottom),p=i==="plus"?o+n:o-n,u=Y(p,a,s.plotTop,s.plotBottom);e.push(jo(r,c,r,u,l)),t.noEndCap||e.push(jo(r-Uo,u,r+Uo,u,l));}function K5(e,t,r,o,n,i,a){let s=t.color??_g,l=a(r),c=n==="plus"?r+o:r-o,p=a(c);e.push(jo(l,i,p,i,s)),t.noEndCap||e.push(jo(p,i-Uo,p,i+Uo,s));}function Cg(e,t,r,o,n="line",i={}){let a=[];return e.series.forEach((s,l)=>{let c=i.sourceIndices??s.values.map((h,g)=>g),p=c.map(h=>s.values[h]??0),u=G5(e,s,c),d=u.numeric?Y5(u.values):void 0,f=i.seriesModes?.[l]??n,m=i.seriesRanges?.[l]??o;s.errBars?.forEach(h=>{c.forEach((g,x)=>{let b=p[x]??0,y=u.values[x]??x,v=k=>H5(k,i.xPositions,I=>W5(I,c.length||t,r,f)),S=u.numeric?k=>Z5(k,d,r):v,$=S(y),w=Y(b,m,r.plotTop,r.plotBottom);for(let k of ["plus","minus"]){if(h.barType!==k&&h.barType!=="both")continue;let I=h.direction==="x"?u.values:p,R=V5(h,I,x,g,k);h.direction==="x"?K5(a,h,y,R,k,w,S):X5(a,h,$,b,R,k,m,r);}});});}),a}function eh(e,t,r,o){if(o==="bar"){let i=r.plotWidth/Math.max(t,1);return r.plotLeft+i*e+i/2}let n=Math.max(t-1,1);return r.plotLeft+e/n*r.plotWidth}function bo(e,t){let r=e.length;if(r<2)return {slope:0,intercept:0,rSquared:0};let o=0,n=0,i=0,a=0;for(let m=0;m<r;m++)o+=e[m],n+=t[m],i+=e[m]*t[m],a+=e[m]*e[m];let s=r*a-o*o;if(Math.abs(s)<1e-12)return {slope:0,intercept:n/r,rSquared:0};let l=(r*i-o*n)/s,c=(n-l*o)/r,p=t.reduce((m,h,g)=>m+(h-(l*e[g]+c))**2,0),u=n/r,d=t.reduce((m,h)=>m+(h-u)**2,0),f=d>0?1-p/d:0;return {slope:l,intercept:c,rSquared:f}}function q5(e,t,r){let o=e.length,n=r+1,i=Array.from({length:n},()=>Array(n+1).fill(0));for(let a=0;a<n;a++){for(let l=0;l<n;l++){let c=0;for(let p=0;p<o;p++)c+=e[p]**(a+l);i[a][l]=c;}let s=0;for(let l=0;l<o;l++)s+=t[l]*e[l]**a;i[a][n]=s;}for(let a=0;a<n;a++){let s=a;for(let c=a+1;c<n;c++)Math.abs(i[c][a])>Math.abs(i[s][a])&&(s=c);[i[a],i[s]]=[i[s],i[a]];let l=i[a][a];if(!(Math.abs(l)<1e-12)){for(let c=a;c<=n;c++)i[a][c]/=l;for(let c=0;c<n;c++){if(c===a)continue;let p=i[c][a];for(let u=a;u<=n;u++)i[c][u]-=p*i[a][u];}}}return i.map(a=>a[n])}function J5(e,t,r){let o=e.length;if(o===0)return 0;let n=t.reduce((s,l)=>s+l,0)/o,i=0,a=0;for(let s=0;s<o;s++)i+=(t[s]-r(e[s]))**2,a+=(t[s]-n)**2;return a>0?1-i/a:0}function Q5(e,t,r,o,n,i){let a=t.length;if(a<2)return {points:[],equation:"",rSquared:0};let s=t.map((b,y)=>y),l=t,c=e.forward??0,u=-(e.backward??0),d=a-1+c,f=Math.max(Math.ceil((d-u)*4),20),m,h="",g=0;switch(e.trendlineType){case "linear":{let b=bo(s,l),y=e.intercept,v=y!==void 0?l.reduce(($,w,k)=>$+(w-y)*s[k],0)/s.reduce(($,w)=>$+w*w,0):b.slope,S=y??b.intercept;m=$=>v*$+S,h=`y = ${v.toFixed(2)}x + ${S.toFixed(2)}`,g=b.rSquared;break}case "exponential":{let b=l.filter(w=>w>0).map(w=>Math.log(w)),y=s.filter((w,k)=>l[k]>0);if(b.length<2)return {points:[],equation:"",rSquared:0};let v=bo(y,b),S=Math.exp(v.intercept),$=v.slope;m=w=>S*Math.exp($*w),h=`y = ${S.toFixed(2)}e^(${$.toFixed(2)}x)`,g=v.rSquared;break}case "logarithmic":{let b=s.filter(S=>S>0).map(S=>Math.log(S)),y=l.filter((S,$)=>s[$]>0);if(b.length<2)return {points:[],equation:"",rSquared:0};let v=bo(b,y);m=S=>S>0?v.slope*Math.log(S)+v.intercept:0,h=`y = ${v.slope.toFixed(2)}ln(x) + ${v.intercept.toFixed(2)}`,g=v.rSquared;break}case "power":{let b=s.filter(($,w)=>$>0&&l[w]>0).map($=>Math.log($)),y=l.filter(($,w)=>$>0&&s[w]>0).map($=>Math.log($));if(b.length<2)return {points:[],equation:"",rSquared:0};let v=bo(b,y),S=Math.exp(v.intercept);m=$=>$>0?S*$**v.slope:0,h=`y = ${S.toFixed(2)}x^${v.slope.toFixed(2)}`,g=v.rSquared;break}case "polynomial":{let b=Math.min(e.order??2,6),y=q5(s,l,b);m=v=>y.reduce((S,$,w)=>S+$*v**w,0),h=y.map((v,S)=>`${v.toFixed(2)}x^${S}`).join(" + "),g=J5(s,l,m);break}case "movingAvg":{let b=e.period??2,y=[];for(let v=b-1;v<a;v++){let S=0;for(let I=v-b+1;I<=v;I++)S+=l[I];let $=S/b,w=eh(v,r,o,i),k=Y($,n,o.plotTop,o.plotBottom);y.push({x:w,y:k});}return {points:y,equation:`${b}-period moving average`,rSquared:0}}default:return {points:[],equation:"",rSquared:0}}let x=[];for(let b=0;b<=f;b++){let y=u+(d-u)*b/f,v=m(y);if(!Number.isFinite(v))continue;let S=eh(y,r,o,i),$=Y(v,n,o.plotTop,o.plotBottom);x.push({x:S,y:$});}return {points:x,equation:h,rSquared:g}}function ek(e,t,r,o,n="line",i){let a=[];return e.series.forEach((s,l)=>{!s.trendlines||s.trendlines.length===0||s.trendlines.forEach(c=>{let{points:p,equation:u,rSquared:d}=Q5(c,s.values,t,r,o,n);if(p.length<2)return;let f=p.map((x,b)=>`${b===0?"M":"L"} ${x.x.toFixed(2)} ${x.y.toFixed(2)}`).join(" "),m=c.color??Fe(s,l,i),h={kind:"path",d:f,fill:"none",stroke:m,strokeWidth:1.5};a.push(h);let g=[];if(c.displayEq&&u&&g.push(u),c.displayRSq&&g.push(`R\xB2 = ${d.toFixed(4)}`),g.length>0){let x=p[p.length-1],b={kind:"text",x:x.x,y:x.y-6,text:g.join(" "),fontSize:7,fill:m,textAnchor:"end"};a.push(b);}});}),a}var th="#475569";function tk(e,t){let r=[],o=e.axes;if(!o||o.length===0)return r;let n=o.find(a=>a.axisType==="catAx"&&a.axPos!=="r"&&a.titleText);if(n?.titleText){let a={kind:"text",x:t.plotLeft+t.plotWidth/2,y:t.plotBottom+22,text:n.titleText,fontSize:9,fill:th,textAnchor:"middle",fontWeight:"bold"};r.push(a);}let i=o.find(a=>a.axisType==="valAx"&&a.axPos!=="r"&&a.titleText)??o.find(a=>a.axisType==="valAx"&&a.titleText);if(i?.titleText){let s=t.plotTop+t.plotHeight/2,l={kind:"text",x:12,y:s,text:i.titleText,fontSize:9,fill:th,textAnchor:"middle",fontWeight:"bold",transform:`rotate(-90, 12, ${s})`};r.push(l);}return r}function rk(e){return le(e)}var dn=14,So=14,nk=60,rh=4;function ok(e,t,r){let o=e.dataTable;if(!o)return [];let n=e.categories,i=e.series;if(n.length===0&&i.length===0)return [];let a=[],s=o.showHorzBorder!==false,l=o.showVertBorder!==false,c=o.showOutline!==false,p=o.showKeys!==false,u="#cbd5e1",d="#334155",f="bold",m=n.length,h=i.length,g=p?nk:0,x=t.plotWidth,b=m>0?(x-g)/m:x-g,y=t.plotBottom+rh,v=So+h*dn;if(c){let w=(k,I,R,E)=>({kind:"line",x1:k,y1:I,x2:R,y2:E,stroke:u,strokeWidth:1});a.push(w(t.plotLeft,y,t.plotLeft+x,y)),a.push(w(t.plotLeft+x,y,t.plotLeft+x,y+v)),a.push(w(t.plotLeft+x,y+v,t.plotLeft,y+v)),a.push(w(t.plotLeft,y+v,t.plotLeft,y));}function S(w){return t.plotLeft+g+w*b}function $(w){return y+(w===0?0:So+(w-1)*dn)}if(n.forEach((w,k)=>{let I=S(k)+b/2,R=$(0)+So/2+3,E={kind:"text",x:I,y:R,text:w,fontSize:8,fill:d,textAnchor:"middle",fontWeight:f};if(a.push(E),l&&k<m-1){let N=S(k)+b,W={kind:"line",x1:N,y1:y,x2:N,y2:y+v,stroke:u,strokeWidth:1};a.push(W);}}),s){let w=y+So,k={kind:"line",x1:t.plotLeft,y1:w,x2:t.plotLeft+x,y2:w,stroke:u,strokeWidth:1};a.push(k);}if(p&&l){let w=t.plotLeft+g,k={kind:"line",x1:w,y1:y,x2:w,y2:y+v,stroke:u,strokeWidth:1};a.push(k);}return i.forEach((w,k)=>{let I=k+1,R=$(I),E=R+dn/2+3;if(p){let N=t.plotLeft+rh,W=R+dn/2-3,Z=Fe(w,k,r);a.push({kind:"rect",x:N,y:W,w:7,h:7,fill:Z,rx:1});let re={kind:"text",x:N+9,y:E,text:w.name,fontSize:8,fill:d,textAnchor:"start"};a.push(re);}if(n.forEach((N,W)=>{let Z=w.values[W],ne={kind:"text",x:S(W)+b/2,y:E,text:Z!==void 0?rk(Z):"",fontSize:8,fill:d,textAnchor:"middle"};a.push(ne);}),s&&k<h-1){let N=R+dn,W={kind:"line",x1:t.plotLeft,y1:N,x2:t.plotLeft+x,y2:N,stroke:u,strokeWidth:1};a.push(W);}}),a}function ik(e,t,r){return r?{min:0,max:100,span:100}:yM(e.series,t)}function ak(e,t,r,o){let n=t.series.length,i=al(t.axes,t.dataTable,n),a=Ke(e.width,e.height,t,true,i),s=Math.max(r.length,1),l=o==="bar"&&(t.grouping==="stacked"||t.grouping==="percentStacked"),c=l&&t.grouping==="percentStacked",{secondary:p}=hg(t.series,t.axes),u=new Set(p.map(j=>j.index)),d=!l&&u.size>0,f=d?t.series.filter((j,Q)=>!u.has(Q)):t.series,m=d?t.series.filter((j,Q)=>u.has(Q)):[],h=t.axes?.find(j=>j.axisType==="valAx"&&j.axPos!=="r"),g=l?{...ik(t,s,c),...h?.orientation==="maxMin"?{reverseOrder:true}:{}}:G$(f.length>0?f:t.series,t.axes),x=d&&m.length>0?zo(m,t.axes?.find(j=>j.axisType==="valAx"&&j.axPos==="r")):void 0,b=x5(t,a,g,x,s),y=g.logScale?void 0:Ir(g,a),v=fl(t,r,a,o,g,x),{catAxisStyle:S,sourceIndices:$,displayChartData:w}=v,k=t.style?.legendPosition??"b",{legend:I,legendX:R,legendY:E,legendAnchor:N}=ct(t.series,t.colorPalette,a.svgWidth,k,a.svgHeight,a.plotTop),W;o==="bar"?W=b5(t,s,a,g,x,u,l?c?"percentStacked":"stacked":"clustered",$):o==="line"?W=C5(t,s,a,g,x,u,$,v.xPositions):o==="area"?W=A5(t,s,a,g,$,v.xPositions):o==="scatter"?W=P5(t,a,g):W=E5(t,a,g);let ne=[...o==="line"||o==="area"?Tg(t,a,g,s,{mode:"line",xPositions:v.xPositions}):[],...W.primitives,...v.tickMarks],re=[...ek(w,s,a,g,S,t.colorPalette),...Cg(w,s,a,g,S),...tk(t,a)],U=ok(w,a,t.colorPalette);ne.push(...re,...U);let V=t.style?.hasTitle&&t.title?t.title:void 0,K=l?void 0:{range:g,secondaryRange:x,secondarySeriesIndexes:d?[...u]:void 0,plotTop:a.plotTop,plotBottom:a.plotBottom};return {svgWidth:a.svgWidth,svgHeight:a.svgHeight,title:V,titleX:a.svgWidth/2,titleY:12,gridlines:b.gridlines,axisLabels:b.axisLabels,zeroLine:y,categoryLabels:v.labels,primitives:ne,dataLabels:W.dataLabels,legend:t.style?.hasLegend?I:[],legendX:R,legendY:E,legendAnchor:N,secondaryGridlines:b.secondaryGridlines,secondaryAxisLabels:b.secondaryAxisLabels,overlays:re.length>0?re:void 0,dataTable:U.length>0?U:void 0,valueDrag:K}}function fs(e,t,r,o){return r&&o.has(e)?r:t}function sk(e,t,r){let o=al(t.axes,t.dataTable,t.series.length),n=Ke(e.width,e.height,t,true,o),i=Math.max(r.length,1),{primary:a,secondary:s}=hg(t.series,t.axes),l=new Set(s.map(j=>j.index)),c=a.length>0?a.map(j=>j.series):t.series,p=e5(t.axes),u=t.axes?.find(j=>j.axisId===p),d=il(t.axes),f=zo(c,u),m=s.length>0?zo(s.map(j=>j.series),d):void 0,h=t.axes?.find(j=>(j.axisType==="catAx"||j.axisType==="dateAx")&&j.axisId===u?.crossAxisId),g=Fo(h,i,n,"left",t.dateCategories?.values),x=h?.crosses!==void 0||h?.crossesAt!==void 0?cl(f,n,u,g):Tr(f,n),{gridlines:b,axisLabels:y}=x,v=t.axes?.find(j=>(j.axisType==="catAx"||j.axisType==="dateAx")&&j.axisId===d?.crossAxisId),S=m?pl(m,n,d,Fo(v,i,n,"right",t.dateCategories?.values)):void 0,$=f.logScale?void 0:Ir(f,n),w=fl(t,r,n,"combo",f,m),k=w.sourceIndices,I=t.style?.legendPosition??"b",{legend:R,legendX:E,legendY:N,legendAnchor:W}=ct(t.series,t.colorPalette,n.svgWidth,I,n.svgHeight,n.plotTop),Z=[],ne=[],re={mode:"line",xPositions:w.xPositions};Z.push(...Tg(t,n,f,i,re));let U=t.series.slice(0,1);if(U[0]){let j=fs(0,f,m,l),Q=[{...U[0],values:k.map(me=>U[0].values[me]??0)}];Z.push(...SM(Q,i,n,j,t.colorPalette).map((me,he)=>({kind:"rect",x:w.xPositions?(w.xPositions[he]??me.x)-me.w/2:me.x,y:me.y,w:me.w,h:me.h,fill:me.fill,rx:1,part:{role:"dataPoint",seriesIndex:0,pointIndex:k[he]??he}}))),lk(U[0],t,n,i,j,k,ne,w.xPositions);}let V=n.plotWidth/i;t.series.slice(1).forEach((j,Q)=>{let me=Q+1;if(j.values.length===0)return;let he=fs(me,f,m,l),ke=Fe(j,me,t.colorPalette),Ie=k.map((xe,un)=>{let xo=j.values[xe]??0;return {x:w.xPositions?.[un]??n.plotLeft+V*un+V/2,y:Y(xo,he,n.plotTop,n.plotBottom),sourceIndex:xe,value:xo}});Z.push({kind:"polyline",points:Ie.map(xe=>`${xe.x.toFixed(2)},${xe.y.toFixed(2)}`).join(" "),stroke:ke,strokeWidth:2.4,fill:"none"}),Z.push(...Ie.map(xe=>({kind:"circle",cx:xe.x,cy:xe.y,r:2.5,fill:ke,part:{role:"dataPoint",seriesIndex:me,pointIndex:xe.sourceIndex}}))),t.style?.hasDataLabels&&Ie.forEach(xe=>{xe&&ne.push({kind:"text",x:xe.x,y:xe.y-7,text:le(xe.value),fontSize:7,fill:"#334155",textAnchor:"middle"});});}),Z.push(...w.tickMarks);let K=w.displayChartData;return Z.push(...Cg(K,i,n,f,"line",{xPositions:w.xPositions,seriesRanges:t.series.map((j,Q)=>fs(Q,f,m,l)),seriesModes:t.series.map((j,Q)=>Q===0?"bar":"line")})),{svgWidth:n.svgWidth,svgHeight:n.svgHeight,title:t.style?.hasTitle&&t.title?t.title:void 0,titleX:n.svgWidth/2,titleY:12,gridlines:b,axisLabels:y,zeroLine:$,categoryLabels:w.labels,primitives:Z,dataLabels:ne,legend:t.style?.hasLegend?R:[],legendX:E,legendY:N,legendAnchor:W,secondaryGridlines:S?.gridlines,secondaryAxisLabels:S?.axisLabels}}function lk(e,t,r,o,n,i,a,s){if(!t.style?.hasDataLabels)return;let l=r.plotWidth/o,c=l*.7,p=(l-c)/2;i.forEach((u,d)=>{let f=e.values[u]??0,m=Y(0,n,r.plotTop,r.plotBottom),h=Y(f,n,r.plotTop,r.plotBottom);a.push({kind:"text",x:s?.[d]??r.plotLeft+l*d+p+c/2,y:f>=0?Math.min(m,h)-4:Math.max(m,h)+10,text:le(f),fontSize:7,fill:"#334155",textAnchor:"middle"});});}var ck="#22c55e",pk="#ef4444",uk="#334155";function dk(e,t,r){let o=Ke(e.width,e.height,t,true,al(t.axes,t.dataTable,t.series.length)),n=Math.max(r.length,1),i=Jo(t.series),a=t.axes?.find(E=>E.axisType==="valAx"&&E.axPos!=="r"),s=t.axes?.find(E=>(E.axisType==="catAx"||E.axisType==="dateAx")&&E.axisId===a?.crossAxisId),l=s?.crosses!==void 0||s?.crossesAt!==void 0?cl(i,o,a,Fo(s,n,o,"left",t.dateCategories?.values)):Tr(i,o),{gridlines:c,axisLabels:p}=l,u=Ir(i,o),d=fl(t,r,o,"stock",i),f=d.sourceIndices,m=t.style?.legendPosition??"b",{legend:h,legendX:g,legendY:x,legendAnchor:b}=ct(t.series,t.colorPalette,o.svgWidth,m,o.svgHeight,o.plotTop),y=t.series.length>=4,v=y?t.series[0]:void 0,S=t.series[y?1:0],$=t.series[y?2:1],w=t.series[y?3:2],k=[],I=[];if(S&&$&&w){let E=o.plotWidth/n,N=E*.5;for(let W=0;W<n;W++){let Z=f[W]??W,ne=S.values[Z]??0,re=$.values[Z]??0,U=v?v.values[Z]??re:re,V=w.values[Z]??ne,K=V>=U,j=d.xPositions?.[W]??o.plotLeft+E*W+E/2,Q=Y(ne,i,o.plotTop,o.plotBottom),me=Y(re,i,o.plotTop,o.plotBottom),he=Y(U,i,o.plotTop,o.plotBottom),ke=Y(V,i,o.plotTop,o.plotBottom);k.push({kind:"line",x1:j,y1:Q,x2:j,y2:me,stroke:uk,strokeWidth:1});let Ie=Math.min(he,ke),xe=Math.max(Math.abs(he-ke),1);k.push({kind:"rect",x:j-N/2,y:Ie,w:N,h:xe,fill:K?ck:pk,rx:1,part:{role:"dataPoint",seriesIndex:y?3:2,pointIndex:Z}}),t.style?.hasDataLabels&&I.push({kind:"text",x:j,y:Q-4,text:le(V),fontSize:7,fill:"#334155",textAnchor:"middle"});}}k.push(...d.tickMarks);let R=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:R,titleX:o.svgWidth/2,titleY:12,gridlines:c,axisLabels:p,zeroLine:u,categoryLabels:d.labels,primitives:k,dataLabels:I,legend:t.style?.hasLegend?h:[],legendX:g,legendY:x,legendAnchor:b}}function ms(e,t,r){let o=r==="inclusive"?(e.length-1)*t:(e.length+1)*t-1,n=Math.max(0,Math.min(o,e.length-1)),i=Math.floor(n),a=Math.ceil(n),s=n-i;return e[i]+(e[a]-e[i])*s}function fk(e,t){if(e.length<2)return;let r=[...e].sort((o,n)=>o-n);return t?{min:r[0],q1:ms(r,.25,t),median:ms(r,.5,t),q3:ms(r,.75,t),max:r[r.length-1]}:{min:r[0],q1:r[Math.floor(r.length*.25)],median:r[Math.floor(r.length*.5)],q3:r[Math.floor(r.length*.75)],max:r[r.length-1]}}function Ag(e){let t=e.flatMap(n=>n.values),r=Math.min(...t,0),o=Math.max(...t,1);return {min:r,max:o,span:Math.max(o-r,1)}}var wo="#64748b",Pg="#1e293b";function mk(e,t,r,o,n){let i=r.plotWidth/t,a=i*.5,s=e.series.find(p=>p.boxWhiskerOptions)?.boxWhiskerOptions,l=s?s.quartileMethod??"exclusive":void 0,c=[];for(let p=0;p<t;p++){let u=e.series.map((S,$)=>({value:S.values[p],seriesIndex:$})).filter(S=>S.value!==void 0),d=fk(u.map(S=>S.value),l);if(!d)continue;let f=d.q3-d.q1,m=d.q1-1.5*f,h=d.q3+1.5*f,g=u.filter(S=>!s||S.value>=m&&S.value<=h),x=Math.min(...g.map(S=>S.value)),b=Math.max(...g.map(S=>S.value)),y=r.plotLeft+i*p+(i-a)/2,v=u.reduce((S,$)=>S+$.value,0)/u.length;c.push({stats:d,boxX:y,boxW:a,xMid:y+a/2,yMin:Y(x,o,r.plotTop,r.plotBottom),yMax:Y(b,o,r.plotTop,r.plotBottom),yQ1:Y(d.q1,o,r.plotTop,r.plotBottom),yQ3:Y(d.q3,o,r.plotTop,r.plotBottom),yMed:Y(d.median,o,r.plotTop,r.plotBottom),yMean:Y(v,o,r.plotTop,r.plotBottom),fill:we(p,n),points:u.map((S,$)=>({x:y+a*(.2+.6*($+1)/(u.length+1)),y:Y(S.value,o,r.plotTop,r.plotBottom),seriesIndex:S.seriesIndex,outlier:S.value<x||S.value>b}))});}return c}function hk(e){let t=e;return [{kind:"line",x1:t.xMid,y1:t.yMax,x2:t.xMid,y2:t.yQ3,stroke:wo,strokeWidth:1},{kind:"line",x1:t.xMid,y1:t.yQ1,x2:t.xMid,y2:t.yMin,stroke:wo,strokeWidth:1},{kind:"line",x1:t.boxX+t.boxW*.25,y1:t.yMax,x2:t.boxX+t.boxW*.75,y2:t.yMax,stroke:wo,strokeWidth:1},{kind:"line",x1:t.boxX+t.boxW*.25,y1:t.yMin,x2:t.boxX+t.boxW*.75,y2:t.yMin,stroke:wo,strokeWidth:1},{kind:"rect",x:t.boxX,y:Math.min(t.yQ1,t.yQ3),w:t.boxW,h:Math.abs(t.yQ1-t.yQ3),fill:t.fill,rx:1,opacity:.8},{kind:"line",x1:t.boxX,y1:t.yMed,x2:t.boxX+t.boxW,y2:t.yMed,stroke:Pg,strokeWidth:2}]}function gk(e,t,r){if(!t)return [];let o=[];t.showMeanLine&&o.push({kind:"line",x1:e.boxX,y1:e.yMean,x2:e.boxX+e.boxW,y2:e.yMean,stroke:"#0f766e",strokeWidth:1.5}),t.showMeanMarker&&o.push({kind:"circle",cx:e.xMid,cy:e.yMean,r:3,fill:"#0f766e"});for(let n of e.points)n.outlier&&!t.showOutlierPoints||!n.outlier&&!t.showInnerPoints||o.push({kind:"circle",cx:n.x,cy:n.y,r:2.25,fill:n.outlier?"#dc2626":Pg,part:{role:"dataPoint",seriesIndex:n.seriesIndex,pointIndex:r}});return o}function xk(e,t,r){let o=Ke(e.width,e.height,t,true),n=Ag(t.series),i=t.series.find(h=>h.boxWhiskerOptions)?.boxWhiskerOptions,s=mk(t,Math.max(r.length,1),o,n,t.colorPalette).flatMap((h,g)=>[...hk(h),...gk(h,i,g)]),{gridlines:l,axisLabels:c}=Tr(n,o),{legend:p,legendX:u,legendY:d,legendAnchor:f}=ct(t.series,t.colorPalette,o.svgWidth,t.style?.legendPosition??"b",o.svgHeight,o.plotTop),m=r.map((h,g)=>({color:we(g,t.colorPalette),label:h}));return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:t.style?.hasTitle?t.title:void 0,titleX:o.svgWidth/2,titleY:12,gridlines:l,axisLabels:c,zeroLine:Ir(n,o),categoryLabels:Qo(r,o,"bar"),primitives:s,dataLabels:[],legend:t.style?.hasLegend?m.length?m:p:[],legendX:u,legendY:d,legendAnchor:f}}function yk(e){return [...e].sort((t,r)=>Math.max(r.value,0)-Math.max(t.value,0)||t.sourcePointIndex-r.sourcePointIndex)}function vk(e,t,r,o){let n=e.reduce((l,c)=>l+Math.max(c.value,0),0);if(n<=0)return [];let i=0,a=e.map((l,c)=>{i+=Math.max(l.value,0);let p=c===e.length-1?100:i/n*100;return {x:t.plotLeft+t.plotWidth*(c+.5)/e.length,y:t.plotBottom-t.plotHeight*p/100,pointIndex:l.sourcePointIndex}}),s=r.color??"#ED7D31";return [{kind:"polyline",points:a.map(l=>`${l.x},${l.y}`).join(" "),stroke:s,strokeWidth:2,fill:"none",part:{role:"series",seriesIndex:o}},...a.map(l=>({kind:"circle",cx:l.x,cy:l.y,r:2.5,fill:s,part:{role:"dataPoint",seriesIndex:o,pointIndex:l.pointIndex}}))]}function bk(e){let t=pl({min:0,max:100,span:100},e,{majorUnit:20,majorTickMark:"out"});return {secondaryGridlines:t.gridlines,secondaryAxisLabels:t.axisLabels.map(r=>({...r,text:`${r.text}%`}))}}var Sk="#334155";function wk(e,t,r){return r==="r"?`(${le(e)}, ${le(t)}]`:`[${le(e)}, ${le(t)})`}function $k(e,t){let r=t.intervalClosed??"l",o=e.map((p,u)=>({value:p,sourceIndex:u})).filter(p=>Number.isFinite(p.value));if(o.length===0)return [];let n=typeof t.underflow=="number"?t.underflow:void 0,i=typeof t.overflow=="number"?t.overflow:void 0,a=n===void 0?[]:o.filter(p=>r==="r"?p.value<=n:p.value<n),s=i===void 0?[]:o.filter(p=>r==="l"?p.value>=i:p.value>i),l=o.filter(p=>!a.includes(p)&&!s.includes(p)),c=[];if(n!==void 0&&c.push({value:a.length,label:`${r==="r"?"\u2264":"<"} ${le(n)}`,sourceIndices:a.map(p=>p.sourceIndex)}),l.length>0){let p=Math.min(...l.map(b=>b.value)),u=Math.max(...l.map(b=>b.value)),d=t.binSize&&t.binSize>0?t.binSize:void 0,f=t.binCount&&t.binCount>0?t.binCount:void 0,m=d?Math.floor(p/d)*d:p,h=Math.max(d?r==="l"?Math.floor((u-m)/d)+1:Math.ceil((u-m)/d):f??Math.ceil(Math.sqrt(l.length)),1),g=d??Math.max((u-m)/h,1),x=Array.from({length:h},(b,y)=>({value:0,label:wk(m+y*g,m+(y+1)*g,r),sourceIndices:[]}));for(let b of l){let y=r==="r"?Math.ceil((b.value-m)/g)-1:Math.floor((b.value-m)/g),v=Math.max(0,Math.min(y,x.length-1));x[v].value+=1,x[v].sourceIndices.push(b.sourceIndex);}c.push(...x);}return i!==void 0&&c.push({value:s.length,label:`${r==="l"?"\u2265":">"} ${le(i)}`,sourceIndices:s.map(p=>p.sourceIndex)}),c}function kk(e,t,r,o,n,i){let a=Math.max(t,e.length,1),s=r.plotWidth/a;return e.map((l,c)=>{let p=Y(0,o,r.plotTop,r.plotBottom),u=Y(l,o,r.plotTop,r.plotBottom);return {x:r.plotLeft+s*c,y:Math.min(p,u),w:Math.max(s-.5,1),h:Math.max(Math.abs(p-u),1),fill:n??we(c,i),pointIndex:c}})}function Mk(e,t,r){let o=t.series.findIndex(k=>k.histogramOptions?.layout==="pareto"),n=Ke(e.width,e.height,t,true,{hasSecondaryValueAxis:o>=0}),i=Math.max(t.series.findIndex(k=>k.histogramOptions?.layout!=="pareto"),0),a=t.series[i],s=a?.histogramOptions,l=s?.layout==="histogram"?$k(a?.values??[],s):void 0,c=(l?.map(k=>({value:k.value,label:k.label}))??(a?.values??[]).map((k,I)=>({value:k,label:r[I]??""}))).map((k,I)=>({...k,sourcePointIndex:I})),p=o>=0?yk(c):c,u=p.map(k=>k.value),d=p.map(k=>k.label),f=Ag([{name:a?.name??"",values:u}]),m=kk(u,d.length,n,f,a?.color,t.colorPalette),h=m.map((k,I)=>({kind:"rect",x:k.x,y:k.y,w:k.w,h:k.h,fill:k.fill,opacity:.85,...l?{}:{part:{role:"dataPoint",seriesIndex:i,pointIndex:p[I]?.sourcePointIndex??I}}}));o>=0&&h.push(...vk(p,n,t.series[o],o));let g=t.style?.hasDataLabels?m.map((k,I)=>({kind:"text",x:k.x+k.w/2,y:k.y-4,text:le(u[I]),fontSize:7,fill:Sk,textAnchor:"middle"})):[],{gridlines:x,axisLabels:b}=Tr(f,n),y=o>=0?bk(n):void 0,{legend:v,legendX:S,legendY:$,legendAnchor:w}=ct(t.series,t.colorPalette,n.svgWidth,t.style?.legendPosition??"b",n.svgHeight,n.plotTop);return {svgWidth:n.svgWidth,svgHeight:n.svgHeight,title:t.style?.hasTitle?t.title:void 0,titleX:n.svgWidth/2,titleY:12,gridlines:x,axisLabels:b,zeroLine:Ir(f,n),categoryLabels:Qo(d,n,"bar"),primitives:h,dataLabels:g,legend:t.style?.hasLegend?v:[],legendX:S,legendY:$,legendAnchor:w,secondaryGridlines:y?.secondaryGridlines,secondaryAxisLabels:y?.secondaryAxisLabels}}function Eg(e,t,r,o,n,i){let s=i-n>Math.PI?1:0,l=e+o*Math.cos(n),c=t+o*Math.sin(n),p=e+o*Math.cos(i),u=t+o*Math.sin(i),d=e+r*Math.cos(i),f=t+r*Math.sin(i),m=e+r*Math.cos(n),h=t+r*Math.sin(n);return `M ${l} ${c} A ${o} ${o} 0 ${s} 1 ${p} ${u} L ${d} ${f} A ${r} ${r} 0 ${s} 0 ${m} ${h} Z`}function Tk(e,t,r,o,n){let i=Math.max(e.length,1),a=o/(i+.5),s=[];for(let l=0;l<e.length;l++){let c=e[l].values,p=a*(l+.5),u=a*(l+1.5),d=c.reduce((m,h)=>m+Math.abs(h),0)||1,f=-Math.PI/2;for(let m=0;m<c.length;m++){let h=f+Math.abs(c[m])/d*Math.PI*2;s.push({d:Eg(t,r,p,u,f,h),fill:we(m,n),opacity:Math.max(.1,.9-l*.1),pointIndex:m,level:l}),f=h;}}return s}function nh(e,t,r){return e.slice(t).map(o=>o[r]??"").join("\0")}function Ik(e,t,r,o,n,i){let a=e.filter(g=>g.length>0),s=Math.max(t.length,...a.map(g=>g.length),0);if(a.length===0||s===0)return [];let l=Array.from({length:s},(g,x)=>Math.abs(t[x]??0)),c=l.some(g=>g!==0)?l:l.map(()=>1),p=c.reduce((g,x)=>g+x,0),u=[0];for(let g of c)u.push((u[u.length-1]??0)+g);let d=n/(a.length+.5),f=a[a.length-1]??[],m=new Map,h=[];for(let g=a.length-1;g>=0;g--){let x=a.length-1-g,b=d*(x+.5),y=d*(x+1.5),v=0;for(;v<s;){let S=nh(a,g,v),$=v+1;for(;$<s&&nh(a,g,$)===S;)$++;let w=-Math.PI/2+u[v]/p*Math.PI*2,k=-Math.PI/2+u[$]/p*Math.PI*2,I=f[v]??"";m.has(I)||m.set(I,m.size),h.push({d:Eg(r,o,b,y,w,k),fill:we(m.get(I)??v,i),opacity:Math.max(.1,.9-x*.1),level:x,label:a[g][v]??"",...g===0&&$===v+1?{pointIndex:v}:{}}),v=$;}}return h}function Og(){return {gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[]}}function _k(e,t,r,o,n,i,a){let s=e.length;if(s===0)return [];let l=Math.max(...e.map(d=>Math.abs(d)),1),c=n/Math.max(s,1),p=t+o/2,u=[];for(let d=0;d<s;d++){let f=e[d],m=Math.abs(f)/l*o,g=(d+1<s?Math.abs(e[d+1]):Math.abs(f)*.3)/l*o,x=r+d*c,b=[`M ${p-m/2} ${x}`,`L ${p+m/2} ${x}`,`L ${p+g/2} ${x+c}`,`L ${p-g/2} ${x+c}`,"Z"].join(" ");u.push({d:b,fill:we(d,a),topW:m,botW:g,labelX:p,labelY:x+c/2+4,labelText:i[d]??le(f),fontSize:Math.min(10,c*.4)});}return u}function Ck(e,t,r){let o=Ke(e.width,e.height,t,false),n=t.series[0]?.values??[],i=_k(n,o.plotLeft,o.plotTop,o.plotWidth,o.plotHeight,r,t.colorPalette),a=[],s=[];for(let c of i)a.push({kind:"path",d:c.d,fill:c.fill,stroke:"#ffffff",strokeWidth:1});for(let c of i)s.push({kind:"text",x:c.labelX,y:c.labelY,text:c.labelText,fontSize:c.fontSize,fill:"#ffffff",textAnchor:"middle",fontWeight:"bold"});let l=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:l,titleX:o.svgWidth/2,titleY:14,...Og(),primitives:a,dataLabels:s,legend:[],legendX:o.svgWidth/2,legendY:o.svgHeight-8,legendAnchor:"middle"}}function Ak(e,t,r){let o=Ke(e.width,e.height,t,false),n=o.plotLeft+o.plotWidth/2,i=o.plotTop+o.plotHeight/2,a=Math.min(o.plotWidth,o.plotHeight)/2-4,s=t.categoryLevels,c=(s?.length?Ik(s,t.series[0]?.values??[],n,i,a,t.colorPalette):Tk(t.series,n,i,a,t.colorPalette)).map(f=>({kind:"path",d:f.d,fill:f.fill,stroke:"#ffffff",strokeWidth:1,opacity:f.opacity,part:f.pointIndex===void 0?void 0:{role:"dataPoint",seriesIndex:0,pointIndex:f.pointIndex}})),p=s?.length?[...new Set(s[s.length-1]?.filter(Boolean)??r)]:r,u=t.style?.hasLegend?p.map((f,m)=>({color:we(m,t.colorPalette),label:f})):[],d=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:d,titleX:o.svgWidth/2,titleY:14,...Og(),primitives:c,dataLabels:[],legend:u,legendX:o.svgWidth/2,legendY:o.svgHeight-8,legendAnchor:"middle"}}function Pk(e,t){let r=e.length,o=new Set;if(r<=1)return o;let n=t.splitType??"auto";if(n==="cust")for(let i of t.custSplit??[])i>=0&&i<r&&o.add(i);else if(n==="val"){let i=t.splitPos??0;e.forEach((a,s)=>{a<i&&o.add(s);});}else if(n==="percent"){let i=e.reduce((s,l)=>s+Math.abs(l),0)||1,a=t.splitPos??0;e.forEach((s,l)=>{Math.abs(s)/i*100<a&&o.add(l);});}else {let i=Math.min(Math.max(Math.round(t.splitPos??2),1),r-1);for(let a=r-i;a<r;a++)o.add(a);}return o.size>=r&&o.delete(0),o}function ml(e){let t=e.reduce((o,n)=>o+Math.abs(n),0)||1,r=-Math.PI/2;return e.map(o=>{let n=Math.abs(o)/t*Math.PI*2,i=r;return r+=n,{start:i,end:r,mid:(i+r)/2}})}function Ek(e,t){let r=Math.max(e.width,320),o=Math.max(e.height,180),n=Math.max(Math.min(r*.28,o*.4),4),i=Math.min(Math.max(t/100,.3),1.4);return {svgWidth:r,svgHeight:o,primaryCx:r*.3,primaryCy:o*.52,primaryR:n,secondaryCx:r*.76,secondaryCy:o*.52,secondaryR:Math.max(n*i,4)}}function hl(e,t,r){return {kind:"text",x:e,y:t,text:le(r),fontSize:8,fill:"#ffffff",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"central"}}function Ok(e,t,r,o){let n=ml(t),i=[],a=[];return n.forEach((s,l)=>{let c=Wo(e.secondaryCx,e.secondaryCy,e.secondaryR,0,s.start,s.end);i.push({kind:"path",d:c.d,fill:r[l],stroke:"#ffffff",strokeWidth:1.5}),o&&a.push(hl(c.labelX,c.labelY,t[l]));}),{primitives:i,labels:a}}function Lk(e,t,r,o){let n=t.reduce((d,f)=>d+Math.abs(f),0)||1,i=e.secondaryR*1.1,a=e.secondaryR*2,s=e.secondaryCx-i/2,l=e.secondaryCy-a/2,c=[],p=[],u=l;return t.forEach((d,f)=>{let m=Math.max(Math.abs(d)/n*a,1);c.push({kind:"rect",x:s,y:u,w:i,h:m,fill:r[f]}),o&&p.push(hl(e.secondaryCx,u+m/2,d)),u+=m;}),{primitives:c,labels:p}}function Dk(e,t){let r={x:e.primaryCx+e.primaryR*Math.cos(t.start),y:e.primaryCy+e.primaryR*Math.sin(t.start)},o={x:e.primaryCx+e.primaryR*Math.cos(t.end),y:e.primaryCy+e.primaryR*Math.sin(t.end)},n=e.secondaryCx-e.secondaryR*1.05,i=(a,s)=>({kind:"line",x1:a.x,y1:a.y,x2:n,y2:s,stroke:"#94a3b8",strokeWidth:1,dashArray:"3 2"});return [i(r,e.secondaryCy-e.secondaryR),i(o,e.secondaryCy+e.secondaryR)]}function Rk(e,t,r,o){let n=ml(t),i=[],a=[];return n.forEach((s,l)=>{let c=Wo(e.primaryCx,e.primaryCy,e.primaryR,0,s.start,s.end);i.push({kind:"path",d:c.d,fill:r[l],stroke:"#ffffff",strokeWidth:1.5,part:{role:"dataPoint",seriesIndex:0,pointIndex:l}}),o&&a.push(hl(c.labelX,c.labelY,t[l]));}),{primitives:i,labels:a}}function zk(e,t,r){let o=t.ofPieOptions??{ofPieType:"pie"},n=t.series[0],i=n?.values??[],a=t.colorPalette,s=t.style?.hasDataLabels===true,l=Pk(i,o),c=i.map((E,N)=>N).filter(E=>!l.has(E)),p=i.map((E,N)=>N).filter(E=>l.has(E)),u=Ek(e,o.secondPieSize??75),d=E=>n?ll(n,E,we(E,a)):we(E,a),f=c.map(d),m=p.map(d),h=we(i.length,a),g=p.reduce((E,N)=>E+Math.abs(i[N]),0),x=[...c.map(E=>Math.abs(i[E])),g],b=[...f,h],y=Rk(u,x,b,s),v=p.map(E=>Math.abs(i[E])),S=o.ofPieType==="bar",$=v.length>0?S?Lk(u,v,m,s):Ok(u,v,m,s):{primitives:[],labels:[]},w=[];if(o.serLines!==false&&v.length>0){let E=ml(x);w.push(...Dk(u,E[E.length-1]));}w.push(...y.primitives,...$.primitives);let k=[...y.labels,...$.labels],I=r.map((E,N)=>({color:we(N,a),label:E})),R=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:u.svgWidth,svgHeight:u.svgHeight,title:R,titleX:u.svgWidth/2,titleY:14,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],primitives:w,dataLabels:k,legend:t.style?.hasLegend?I:[],legendX:u.svgWidth/2,legendY:u.svgHeight-8,legendAnchor:"middle"}}var oh=14;function Fk(e){return e==="outEnd"||e==="bestFit"}function Nk(e){let{slices:t,values:r,cx:o,cy:n,outerR:i,position:a,showLeaderLines:s}=e,l=Fk(a),c=[],p=[];return t.forEach((u,d)=>{let f=r[d];if(f===void 0)return;if(!l){c.push({kind:"text",x:u.labelX,y:u.labelY,text:le(f),fontSize:8,fill:"#ffffff",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"central"});return}let m=Math.cos(u.midAngle),h=Math.sin(u.midAngle),g=o+i*m,x=n+i*h,b=o+(i+oh)*m,y=n+(i+oh)*h,v=m>=0?"start":"end";c.push({kind:"text",x:b+(m>=0?2:-2),y,text:le(f),fontSize:8,fill:"#334155",textAnchor:v,dominantBaseline:"central"}),s!==false&&p.push({kind:"line",x1:g,y1:x,x2:b,y2:y,stroke:"#94a3b8",strokeWidth:.75});}),{labels:c,leaderLines:p}}function Bk(e,t){return e.map(r=>{let o="";return Array.from({length:t},(n,i)=>{let a=r[i]?.trim()??"";return a&&(o=a),a||o})})}function Uk(e,t,r,o){let n=e.find(a=>a.children&&a.label===t);if(n)return n;let i={label:t,weight:0,children:[],colorIndex:r,parentLabelLayout:o};return e.push(i),i}function ih(e,t,r,o,n){let i=e.values.length,a=Bk(o??[],i),s=e.treemapOptions?.parentLabelLayout??"banner",l=[];for(let c=0;c<i;c++){let p=l;for(let u=a.length-1;u>=1;u--){let d=a[u][c]||`Group ${u}`;p=Uk(p,d,c,s).children;}p.push({label:a[0]?.[c]||r[c]||String(c+1),weight:Math.abs(e.values[c]??0),seriesIndex:t,pointIndex:c,colorIndex:t*n+c,parentLabelLayout:s});}return l}function Lg(e){return e.children&&(e.weight=e.children.reduce((t,r)=>t+Lg(r),0)),e.weight}function jk(e,t){let r=[...e].sort((s,l)=>l.weight-s.weight),o=r.reduce((s,l)=>s+l.weight,0),i=o===0?r.length:o,a={...t};return r.map(s=>{let l=o===0?1:s.weight,c=i>0?l/i:0,p=a.w>=a.h,u=p?{...a,w:a.w*c}:{...a,h:a.h*c};return p?a={...a,x:a.x+u.w,w:a.w-u.w}:a={...a,y:a.y+u.h,h:a.h-u.h},i-=l,[s,u]})}function Dg(e,t,r,o){for(let[n,i]of jk(e,t)){let a={x:i.x+1,y:i.y+1,w:Math.max(i.w-2,1),h:Math.max(i.h-2,1)};if(n.children){let s=n.parentLabelLayout!=="none"&&a.w>28&&a.h>16;s&&o.push({kind:"text",x:a.x+4,y:a.y+11,text:n.label,fontSize:10,fill:"#303030",textAnchor:"start",fontWeight:"bold"});let l=s&&n.parentLabelLayout==="banner"?16:0;Dg(n.children,{...a,y:a.y+l,h:Math.max(a.h-l,1)},r,o);continue}o.push({kind:"rect",...a,fill:we(n.colorIndex,r),rx:2,opacity:.85,part:{role:"dataPoint",seriesIndex:n.seriesIndex,pointIndex:n.pointIndex}}),a.w>30&&a.h>14&&o.push({kind:"text",x:a.x+a.w/2,y:a.y+a.h/2,text:n.label,fontSize:Math.min(10,a.h*.3),fill:"#ffffff",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"central"});}}function Wk(e,t,r){let o=Math.max(t.length,...e.series.map(a=>a.values.length),1),n=e.series.flatMap((a,s)=>ih(a,s,t,e.categoryLevels,o));e.series.length>1&&(n=e.series.map((a,s)=>({label:a.name,weight:0,children:ih(a,s,t,e.categoryLevels,o),colorIndex:s*o,parentLabelLayout:a.treemapOptions?.parentLabelLayout??"banner"})));for(let a of n)Lg(a);let i=[];return Dg(n,r,e.colorPalette,i),i}var Rg=Math.cos(Math.PI/6),zg=Math.sin(Math.PI/6);function ah(e,t,r){return {screenX:(e-t)*Rg,screenY:(e+t)*zg-r}}function Fg(e){return {r:Math.round(30+200*e),g:Math.round(80+100*(1-Math.abs(e-.5)*2)),b:Math.round(200*(1-e)+30)}}function Hk(e,t,r,o){return `rgb(${Math.round(e*o)},${Math.round(t*o)},${Math.round(r*o)})`}function gl(){return {gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],dataLabels:[]}}function Zk(e,t,r){let o=Ke(e.width,e.height,t,false),n=Jo(t.series),i=Math.max(r.length,1),a=t.series.length,s=Math.max(i-1,1),l=Math.max(a-1,1),c=s+l,p=o.plotWidth*.9/(c*Rg),u=o.plotHeight*.65/(c*zg),d=Math.max(Math.min(p,u),.5),f=o.plotHeight*.3,m=n.span>0?f:0,h=(U,V)=>{let K=Math.min(U,a-1),j=Math.min(V,i-1),Q=t.series[K]?.values[j]??0;return n.span>0?(Q-n.min)/n.span:0},g=[];for(let U=0;U<=l;U++)for(let V=0;V<=s;V++)g.push(ah(V*d,U*d,h(U,V)*m));let x=Math.min(...g.map(U=>U.screenX)),b=Math.max(...g.map(U=>U.screenX)),y=Math.min(...g.map(U=>U.screenY)),v=Math.max(...g.map(U=>U.screenY)),S=b-x,$=v-y,w=o.plotLeft+o.plotWidth/2-(x+S/2),k=o.plotTop+o.plotHeight/2-(y+$/2),I=[];for(let U=0;U<l;U++)for(let V=0;V<s;V++)I.push({row:U,col:V,depth:U+V});I.sort((U,V)=>U.depth-V.depth);let R=[];for(let{row:U,col:V}of I){let j=[[V,U],[V+1,U],[V+1,U+1],[V,U+1]].map(([xe,un])=>{let xo=h(un,xe);return ah(xe*d,un*d,xo*m)}),Q=(h(U,V)+h(U,V+1)+h(U+1,V+1)+h(U+1,V))/4,{r:me,g:he,b:ke}=Fg(Q),Ie=j.map(xe=>`${(xe.screenX+w).toFixed(2)},${(xe.screenY+k).toFixed(2)}`).join(" ");R.push({kind:"polygon",points:Ie,fill:`rgb(${me},${he},${ke})`,stroke:"none",strokeWidth:0,opacity:.9}),R.push({kind:"polygon",points:Ie,fill:"none",stroke:Hk(me,he,ke,.6),strokeWidth:.5,opacity:.7});}let E=t.style?.legendPosition??"b",{legend:N,legendX:W,legendY:Z,legendAnchor:ne}=ct(t.series,t.colorPalette,o.svgWidth,E,o.svgHeight,o.plotTop),re=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:re,titleX:o.svgWidth/2,titleY:14,...gl(),primitives:R,legend:t.style?.hasLegend?N:[],legendX:W,legendY:Z,legendAnchor:ne}}function Gk(e,t,r){let o=Ke(e.width,e.height,t,false),n=Jo(t.series),i=Math.max(r.length,1),a=t.series.length,s=o.plotWidth/Math.max(i-1,1),l=o.plotHeight/Math.max(a-1,1),c=[];for(let g=0;g<a;g++)for(let x=0;x<i;x++){let b=t.series[g]?.values[x]??0,y=n.span>0?(b-n.min)/n.span:0,{r:v,g:S,b:$}=Fg(y);c.push({kind:"rect",x:o.plotLeft+x*s,y:o.plotTop+g*l,w:s+.5,h:l+.5,fill:`rgb(${v},${S},${$})`,opacity:.85});}let p=t.style?.legendPosition??"b",{legend:u,legendX:d,legendY:f,legendAnchor:m}=ct(t.series,t.colorPalette,o.svgWidth,p,o.svgHeight,o.plotTop),h=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:h,titleX:o.svgWidth/2,titleY:14,...gl(),primitives:c,legend:t.style?.hasLegend?u:[],legendX:d,legendY:f,legendAnchor:m}}function Yk(e,t,r){let o=Math.max(r.length,1);return t.series.length>=2&&o>=2?Zk(e,t,r):Gk(e,t,r)}function Vk(e,t,r){let o=Ke(e.width,e.height,t,false),n=Wk(t,r,{x:o.plotLeft,y:o.plotTop,w:o.plotWidth,h:o.plotHeight}),i=t.style?.legendPosition??"b",{legend:a,legendX:s,legendY:l,legendAnchor:c}=ct(t.series,t.colorPalette,o.svgWidth,i,o.svgHeight,o.plotTop),p=r.map((d,f)=>({color:we(f,t.colorPalette),label:d})),u=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:u,titleX:o.svgWidth/2,titleY:14,...gl(),primitives:n,legend:t.style?.hasLegend?p.length>0?p:a:[],legendX:s,legendY:l,legendAnchor:c}}var sh=9525;function Xk(e,t,r){let o=e.from.x*t,n=e.from.y*r;if(e.anchor==="rel"&&e.to)return {x:o,y:n,w:Math.max((e.to.x-e.from.x)*t,0),h:Math.max((e.to.y-e.from.y)*r,0)};let i=e.ext??{cx:0,cy:0};return {x:o,y:n,w:i.cx/sh,h:i.cy/sh}}function Kk(e,t){if(!e.paragraphs||e.paragraphs.length===0)return [];let r=12,o=e.paragraphs.length*r,n=t.y+Math.max((t.h-o)/2,0)+r*.75,i=[];for(let a of e.paragraphs){if(a.text.length===0){n+=r;continue}let s=a.align??"ctr",l=s==="l"?"start":s==="r"?"end":"middle",c=s==="l"?t.x+2:s==="r"?t.x+t.w-2:t.x+t.w/2;i.push({kind:"text",x:c,y:n,text:a.text,fontSize:a.fontSize??9,fill:a.color??"#1e293b",textAnchor:l,fontWeight:a.bold?"bold":"normal"}),n+=r;}return i}function qk(e,t,r){let o=Xk(e,t,r),n=[];return e.kind==="cxnSp"?(n.push({kind:"line",x1:o.x,y1:o.y,x2:o.x+o.w,y2:o.y+o.h,stroke:e.stroke??"#000000",strokeWidth:e.strokeWidth??1}),n):((e.fill||e.stroke)&&o.w>0&&o.h>0&&n.push({kind:"polygon",points:`${o.x},${o.y} ${o.x+o.w},${o.y} ${o.x+o.w},${o.y+o.h} ${o.x},${o.y+o.h}`,fill:e.fill??"none",stroke:e.stroke??"none",strokeWidth:e.strokeWidth??(e.stroke?1:0)}),n.push(...Kk(e,o)),n)}function Jk(e,t,r){return !e||e.length===0?[]:e.flatMap(o=>qk(o,t,r))}function hs(e,t){return Array.from({length:t},(r,o)=>e?.[o]??o)}function gs(e,t,r){let o=t.indexOf(r);return o>=0?e[o]:void 0}function Ws(e,t){if(!e||typeof e!="object")return;let r=e;if(String(r["@_entityId"]??"")===t&&r["@_entityName"]!==void 0)return String(r["@_entityName"]);for(let o of Object.values(r))if(Array.isArray(o))for(let n of o){let i=Ws(n,t);if(i)return i}else {let n=Ws(o,t);if(n)return n}}function Qk(e,t,r){if(!e)return;let o=r(e);if(o)return o;let n=e.split(/[:/|._-]+/u).filter(Boolean);for(let a=n.length-1;a>=0;a--){let s=r(n[a]??"");if(s)return s}let i=Ws(t?.geographyCache,e);return i?r(i):void 0}function eM(e,t,r,o){let n=r?.entityIds??[],i=hs(r?.categorySourceIndices,e.length),a=hs(r?.valueSourceIndices,t.length),s=hs(r?.entityIdSourceIndices,n.length);return [...new Set([...i,...a,...s])].sort((c,p)=>c-p).map(c=>{let p=gs(e,i,c)??"",u=gs(t,a,c)??0,d=gs(n,s,c);return {sourceIndex:c,label:p||d||`Region ${c+1}`,value:u,...d?{entityId:d}:{},code:Qk(d,r,o)??o(p)}})}function tM(e,t,r){return e==="none"?false:e==="bestFitOnly"?t>=18&&r>=10:true}function rM(e,t){if(!t)return String(e);try{return new Intl.NumberFormat(t,{maximumFractionDigits:2}).format(e)}catch{return String(e)}}function nM(e,t){let r=new Set(t?.subtotalIndices??(e.length>0?[e.length-1]:[])),o=[],n=0;for(let i=0;i<e.length;i++){let a=e[i]??0,s=r.has(i),l=s?0:n,c=s?a:n+a;o.push({sourceIndex:i,value:a,startValue:l,endValue:c,isSubtotal:s}),n=c;}return o}function oM(e){return Jo([{name:"Waterfall range",values:e.flatMap(t=>[t.startValue,t.endValue])}])}var iM="#22c55e",aM="#ef4444",sM="#6366f1",lM="#94a3b8";function cM(e,t,r){let o=Ke(e.width,e.height,t,true),n=t.series[0],i=n?.values??[],a=nM(i,n?.waterfallOptions),s=oM(a),l=Math.max(r.length,i.length,1),c=o.plotWidth/l*.6,p=o.plotWidth/l*.2,u=[],d=[];for(let w of a){let{sourceIndex:k,value:I,startValue:R,endValue:E,isSubtotal:N}=w,W=Y(R,s,o.plotTop,o.plotBottom),Z=Y(E,s,o.plotTop,o.plotBottom),ne=k,re=o.plotLeft+o.plotWidth/l*ne+p,U=Math.min(W,Z),V=Math.max(Math.abs(Z-W),1),K=N?sM:I>=0?iM:aM;if(u.push({kind:"rect",x:re,y:U,w:c,h:V,fill:K,rx:1,part:{role:"dataPoint",seriesIndex:0,pointIndex:k}}),t.style?.hasDataLabels&&d.push({kind:"text",x:re+c/2,y:U-4,text:le(I),fontSize:7,fill:"#334155",textAnchor:"middle"}),n?.waterfallOptions?.connectorLines!==false&&ne<i.length-1){let j=o.plotLeft+o.plotWidth/l*(ne+1)+p;u.push({kind:"line",x1:re+c,y1:Z,x2:j,y2:Z,stroke:lM,strokeWidth:.8,dashArray:"3 2"});}}let{gridlines:f,axisLabels:m}=Tr(s,o),h=Ir(s,o),g=Qo(r,o,"bar"),x=t.style?.legendPosition??"b",{legend:b,legendX:y,legendY:v,legendAnchor:S}=ct(t.series,t.colorPalette,o.svgWidth,x,o.svgHeight,o.plotTop),$=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:$,titleX:o.svgWidth/2,titleY:12,gridlines:f,axisLabels:m,zeroLine:h,categoryLabels:g,primitives:u,dataLabels:d,legend:t.style?.hasLegend?b:[],legendX:y,legendY:v,legendAnchor:S}}var pM={us:"US",usa:"US","united states":"US","united states of america":"US",ca:"CA",can:"CA",canada:"CA",br:"BR",bra:"BR",brazil:"BR",gb:"GB",gbr:"GB",uk:"GB","united kingdom":"GB",fr:"FR",fra:"FR",france:"FR",de:"DE",deu:"DE",germany:"DE",it:"IT",ita:"IT",italy:"IT",es:"ES",esp:"ES",spain:"ES",ru:"RU",rus:"RU",russia:"RU",cn:"CN",chn:"CN",china:"CN",in:"IN",ind:"IN",india:"IN",jp:"JP",jpn:"JP",japan:"JP",kr:"KR",kor:"KR","south korea":"KR",korea:"KR",au:"AU",aus:"AU",australia:"AU",mx:"MX",mex:"MX",mexico:"MX",id:"ID",idn:"ID",indonesia:"ID",tr:"TR",tur:"TR",turkey:"TR",sa:"SA",sau:"SA","saudi arabia":"SA",za:"ZA",zaf:"ZA","south africa":"ZA",ar:"AR",arg:"AR",argentina:"AR",ng:"NG",nga:"NG",nigeria:"NG",eg:"EG",egy:"EG",egypt:"EG"};function uM(e){let t=e.trim().toLowerCase();return pM[t]}function Hs(e,t,r){let o=g=>Math.max(0,Math.min(255,Math.round(g))),n=e.replace("#",""),i=t.replace("#",""),a=parseInt(n.substring(0,2),16),s=parseInt(n.substring(2,4),16),l=parseInt(n.substring(4,6),16),c=parseInt(i.substring(0,2),16),p=parseInt(i.substring(2,4),16),u=parseInt(i.substring(4,6),16),d=o(a+(c-a)*r),f=o(s+(p-s)*r),m=o(l+(u-l)*r),h=g=>g.toString(16).padStart(2,"0");return `#${h(d)}${h(f)}${h(m)}`}function dM(e){let t=Math.max(0,Math.min(1,e));return t<=.5?Hs("#dbeafe","#3b82f6",t*2):Hs("#3b82f6","#1e3a5f",(t-.5)*2)}function fM(e,t,r){return r===t?.5:(e-t)/(r-t)}var Ng=[{code:"US",name:"United States",path:"M130,160 L250,155 265,170 270,190 260,210 230,215 200,220 170,215 145,205 130,195Z M280,175 L295,165 310,170 310,185 295,195 280,190Z",labelXY:[200,190]},{code:"CA",name:"Canada",path:"M120,90 L280,85 290,100 295,130 280,150 250,155 200,155 160,155 130,155 115,140 110,115Z",labelXY:[200,125]},{code:"MX",name:"Mexico",path:"M145,215 L200,220 210,235 200,255 185,265 165,260 150,245 140,230Z",labelXY:[175,240]},{code:"BR",name:"Brazil",path:"M270,300 L310,280 335,290 340,320 330,355 310,370 285,365 265,345 260,320Z",labelXY:[300,330]},{code:"AR",name:"Argentina",path:"M260,370 L280,365 290,380 285,410 275,435 260,445 250,425 248,395Z",labelXY:[268,410]},{code:"GB",name:"United Kingdom",path:"M440,120 L448,110 455,115 455,135 448,142 440,138Z",labelXY:[448,128]},{code:"FR",name:"France",path:"M450,145 L470,140 480,150 478,168 465,175 450,170 445,158Z",labelXY:[463,158]},{code:"DE",name:"Germany",path:"M478,125 L498,120 505,130 502,148 490,152 478,148 475,138Z",labelXY:[490,138]},{code:"IT",name:"Italy",path:"M490,155 L498,152 505,162 500,180 492,190 488,178 486,165Z",labelXY:[495,172]},{code:"ES",name:"Spain",path:"M432,168 L460,165 465,175 460,188 442,192 430,185 428,175Z",labelXY:[448,180]},{code:"RU",name:"Russia",path:"M510,60 L780,50 830,70 840,100 820,120 750,115 700,105 650,100 580,105 530,110 510,100 505,80Z",labelXY:[670,85]},{code:"TR",name:"Turkey",path:"M530,165 L570,160 585,170 580,182 555,185 530,180Z",labelXY:[558,175]},{code:"EG",name:"Egypt",path:"M530,200 L555,195 565,205 560,225 545,230 530,222Z",labelXY:[548,215]},{code:"NG",name:"Nigeria",path:"M475,275 L500,270 510,280 505,298 490,302 475,295Z",labelXY:[492,288]},{code:"ZA",name:"South Africa",path:"M520,380 L545,370 560,380 555,400 540,410 520,405 515,392Z",labelXY:[538,392]},{code:"SA",name:"Saudi Arabia",path:"M565,220 L600,210 615,225 610,250 590,258 570,250 560,238Z",labelXY:[590,238]},{code:"IN",name:"India",path:"M640,210 L665,195 685,210 688,240 678,268 660,278 645,265 635,240Z",labelXY:[662,240]},{code:"CN",name:"China",path:"M700,120 L775,115 800,130 805,160 790,180 760,185 730,180 710,168 695,150 690,135Z",labelXY:[750,155]},{code:"JP",name:"Japan",path:"M835,145 L845,135 852,140 850,158 842,165 835,160Z",labelXY:[843,152]},{code:"KR",name:"South Korea",path:"M815,158 L825,152 830,160 827,170 818,172 813,165Z",labelXY:[822,163]},{code:"ID",name:"Indonesia",path:"M740,295 L780,288 810,292 830,298 825,310 790,312 755,308 740,305Z",labelXY:[785,302]},{code:"AU",name:"Australia",path:"M790,350 L850,340 880,355 885,385 870,405 840,410 810,400 790,380Z",labelXY:[838,378]}];function Bg(e){let t=e.path.match(/-?\d+(?:\.\d+)?/gu)?.map(Number)??[],r=[],o=[];for(let n=0;n<t.length;n+=2)r.push(t[n]??0),o.push(t[n+1]??0);return {minX:Math.min(...r),minY:Math.min(...o),maxX:Math.max(...r),maxY:Math.max(...o)}}function mM(e,t){if(!e||e==="world"||t.size===0)return {minX:0,minY:0,maxX:1e3,maxY:500};let r=Ng.filter(a=>t.has(a.code)),o=e==="countryRegion"?r.slice(0,1):r;if(o.length===0)return {minX:0,minY:0,maxX:1e3,maxY:500};let n=o.map(Bg),i=10;return {minX:Math.max(0,Math.min(...n.map(a=>a.minX))-i),minY:Math.max(0,Math.min(...n.map(a=>a.minY))-i),maxX:Math.min(1e3,Math.max(...n.map(a=>a.maxX))+i),maxY:Math.min(500,Math.max(...n.map(a=>a.maxY))+i)}}function hM(e,t,r){let o=Math.max(e.width,320),n=Math.max(e.height,200),i=r.length>0?r:t.categories,a=t.series[0],s=a?.regionMapOptions,l=eM(i,a?.values??[],s,uM),p=l.map(K=>K.value).filter(K=>Number.isFinite(K)),u=p.length>0?Math.min(...p):0,d=p.length>0?Math.max(...p):1,f=new Map,m=[];for(let K of l)K.code!==void 0?f.set(K.code,{value:K.value,label:K.label,sourceIndex:K.sourceIndex}):m.push({label:K.label,value:K.value});let h=30,g=14,x=Math.min(m.length,5),b=m.length>0?(x+1)*g+8:0,y=t.title?22:0,v=Math.max(n-y-h-b-8,80),S=mM(s?.viewedRegionType,f),$=Math.max(S.maxX-S.minX,1),w=Math.max(S.maxY-S.minY,1),k=Math.min((o-20)/$,v/w),I=(o-$*k)/2-S.minX*k,R=y+4-S.minY*k,E=[];E.push({kind:"rect",x:0,y:0,w:o,h:n,fill:"#f8fafc",rx:4});let N=t.title?{kind:"text",x:o/2,y:16,text:t.title,fontSize:12,fill:"#334155",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"auto"}:void 0;for(let K of Ng){let j=f.get(K.code),Q="#e2e8f0";if(j!==void 0){let ke=fM(j.value,u,d);Q=dM(ke);}let me=gM(K.path,k,I,R);E.push({kind:"path",d:me,fill:Q,stroke:"#94a3b8",strokeWidth:Math.max(.5/k,.3),...j?{part:{role:"dataPoint",seriesIndex:0,pointIndex:j.sourceIndex}}:{}});let he=Bg(K);if(j!==void 0&&tM(s?.regionLabelLayout,(he.maxX-he.minX)*k,(he.maxY-he.minY)*k)){let ke=K.labelXY[0]*k+I,Ie=K.labelXY[1]*k+R+4;E.push({kind:"text",x:ke,y:Ie,text:rM(j.value,s?.cultureLanguage),fontSize:Math.max(6,7*k),fill:"#1e293b",textAnchor:"middle",fontWeight:"bold",dominantBaseline:"central"});}}let W=R+v+4,Z=Math.min(o*.4,160),ne=(o-Z)/2,re=[{offset:0,color:"#dbeafe"},{offset:.5,color:"#3b82f6"},{offset:1,color:"#1e3a5f"}],U=re.length-1;for(let K=0;K<U;K++){let j=re[K],Q=re[K+1];if(j===void 0||Q===void 0)continue;let me=Hs(j.color,Q.color,.5);E.push({kind:"rect",x:ne+j.offset*Z,y:W,w:(Q.offset-j.offset)*Z,h:8,fill:me,rx:K===0?4:0});}if(E.push({kind:"text",x:ne,y:W+18,text:le(u),fontSize:7,fill:"#64748b",textAnchor:"middle"},{kind:"text",x:ne+Z,y:W+18,text:le(d),fontSize:7,fill:"#64748b",textAnchor:"middle"}),s?.attribution&&E.push({kind:"text",x:o-4,y:n-4,text:s.attribution,fontSize:5,fill:"#64748b",textAnchor:"end"}),m.length>0){let K=W+26,j=Math.min(8,g*.7),Q=Math.min((o-20)/2,120),me=(o-Q*2)/2;E.push({kind:"text",x:o/2,y:K,text:"Additional regions (not shown on map)",fontSize:7,fill:"#94a3b8",textAnchor:"middle"});for(let he=0;he<x;he++){let ke=m[he];if(ke===void 0)continue;let Ie=K+g*(he+1);if(Ie+g>n)break;he%2===0&&E.push({kind:"rect",x:me,y:Ie-g+4,w:Q*2,h:g,fill:"#f1f5f9",rx:2}),E.push({kind:"text",x:me+4,y:Ie,text:ke.label,fontSize:j,fill:"#334155",textAnchor:"start"},{kind:"text",x:me+Q+4,y:Ie,text:le(ke.value),fontSize:j,fill:"#475569",textAnchor:"start"});}if(m.length>5){let he=K+g*6;E.push({kind:"text",x:o/2,y:he,text:`+${m.length-5} more regions`,fontSize:6,fill:"#94a3b8",textAnchor:"middle"});}}let V=N!==void 0?[N]:[];return {svgWidth:o,svgHeight:n,title:void 0,titleX:o/2,titleY:14,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],primitives:E,dataLabels:V,legend:[],legendX:o/2,legendY:n-8,legendAnchor:"middle"}}function gM(e,t,r,o){let n=e.trim().split(/[\s,]+/u),i=[],a=0;for(;a<n.length;){let s=n[a];if(s===void 0){a++;continue}if(/^[A-Za-z]$/u.test(s)){i.push(s),a++;continue}let l=parseFloat(s),c=parseFloat(n[a+1]??"0");!Number.isNaN(l)&&!Number.isNaN(c)?(i.push(`${(l*t+r).toFixed(2)},${(c*t+o).toFixed(2)}`),a+=2):(i.push(s),a++);}return i.join(" ")}var xM=["#4472C4","#ED7D31","#A5A5A5","#FFC000","#5B9BD5","#70AD47","#FF0000","#00B0F0"];function we(e,t){let r=t&&t.length>0?t:xM;return r[e%r.length]}function Fe(e,t,r){return e.color??we(t,r)}function Jo(e){let t=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(let a of e)for(let s of a.values)s<t&&(t=s),s>r&&(r=s);if(t===Number.POSITIVE_INFINITY)return {min:0,max:1,span:1};let o=Math.min(t,0),n=Math.max(r,0),i=Math.max(n-o,1);return {min:o,max:n,span:i}}function yM(e,t){let r=0,o=0;for(let s=0;s<t;s++){let l=0,c=0;for(let p of e){let u=p.values[s]??0;u>=0?l+=u:c+=u;}r=Math.max(r,l),o=Math.min(o,c);}let n=Math.min(o,0),i=Math.max(r,0),a=Math.max(i-n,1);return {min:n,max:i,span:a}}function Y(e,t,r,o){let n=o-r,i;if(t.logScale&&t.logBase){let a=t.logBase,s=Math.max(e,t.min),l=Math.log(s)/Math.log(a),c=Math.log(t.min)/Math.log(a);i=(l-c)/t.span;}else i=(e-t.min)/t.span;return t.reverseOrder?r+i*n:o-i*n}function le(e){return Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(1)}K`:Number.isInteger(e)?String(e):e.toFixed(1)}function Ke(e,t,r,o,n){let i=Math.max(320,e),a=Math.max(180,t),s=o?48:8,l=8,c=i-8,p=a-(o?24:8),u=r.style,d=u?.legendPosition??"b";if(u?.hasTitle&&(l+=20),u?.hasLegend&&(d==="b"?p-=20:d==="t"?l+=20:d==="r"?c-=80:d==="l"&&(s+=80)),n?.hasSecondaryValueAxis&&(c-=40),n?.hasSecondaryCategoryAxis&&(l+=16),n?.hasDataTable){let h=n.dataTableRowCount??1;p-=14+h*14;}let f=Math.max(c-s,1),m=Math.max(p-l,1);return {svgWidth:i,svgHeight:a,plotLeft:s,plotTop:l,plotRight:s+f,plotBottom:l+m,plotWidth:f,plotHeight:m}}var vM="#e2e8f0",Ug="#64748b",bM="#94a3b8",lh=5;function Tr(e,t){let r=[],o=[];for(let n=0;n<=lh;n++){let i=e.min+e.span/lh*n,a=Y(i,e,t.plotTop,t.plotBottom);r.push({kind:"line",x1:t.plotLeft,y1:a,x2:t.plotRight,y2:a,stroke:vM,strokeWidth:1}),o.push({kind:"text",x:t.plotLeft-4,y:a,text:le(i),fontSize:8,fill:Ug,textAnchor:"end",dominantBaseline:"central"});}return {gridlines:r,axisLabels:o}}function Ir(e,t){if(e.min>=0||e.max<=0)return;let r=Y(0,e,t.plotTop,t.plotBottom);return {kind:"line",x1:t.plotLeft,y1:r,x2:t.plotRight,y2:r,stroke:bM,strokeWidth:1}}function Qo(e,t,r){let o=Math.max(e.length,1);return e.map((n,i)=>({kind:"text",x:r==="bar"?t.plotLeft+t.plotWidth/o*(i+.5):o>1?t.plotLeft+t.plotWidth/(o-1)*i:t.plotLeft+t.plotWidth/2,y:t.plotBottom+12,text:n,fontSize:8,fill:Ug,textAnchor:"middle"}))}function ct(e,t,r,o,n,i){let a=e.map((p,u)=>({color:Fe(p,u,t),label:p.name})),s=r/2,l=n-8,c="middle";return o==="r"?(s=r-75,l=i,c="start"):o==="l"?(s=4,l=i,c="start"):o==="t"&&(l=28),{legend:a,legendX:s,legendY:l,legendAnchor:c}}function SM(e,t,r,o,n){let i=[],a=Math.max(e.length,1),s=r.plotWidth/Math.max(t,1),l=s*.7/a,c=(s-l*a)/2;for(let p=0;p<t;p++)for(let u=0;u<e.length;u++){let d=e[u].values[p]??0,f=r.plotLeft+s*p+c+l*u,m=Y(0,o,r.plotTop,r.plotBottom),h=Y(d,o,r.plotTop,r.plotBottom),g=Math.min(m,h),x=Math.max(Math.abs(m-h),1);i.push({x:f,y:g,w:l,h:x,fill:Fe(e[u],u,n)});}return i}function wM(e,t,r,o,n){let i=[],a=r.plotWidth/Math.max(t,1)*.7,s=(r.plotWidth/Math.max(t,1)-a)/2,l=Y(0,o,r.plotTop,r.plotBottom);for(let c=0;c<t;c++){let p=l,u=l;for(let d=0;d<e.length;d++){let f=e[d].values[c]??0;if(f===0)continue;let m=r.plotLeft+r.plotWidth/Math.max(t,1)*c+s,h=Math.max(Math.abs(Y(f,o,r.plotTop,r.plotBottom)-Y(0,o,r.plotTop,r.plotBottom)),1);if(f>0){let g=p-h;i.push({x:m,y:g,w:a,h,fill:Fe(e[d],d,n),seriesIndex:d,pointIndex:c}),p=g;}else {let g=u;i.push({x:m,y:g,w:a,h,fill:Fe(e[d],d,n),seriesIndex:d,pointIndex:c}),u=g+h;}}}return i}function jg(e,t,r,o){let n=Math.max(t,2);return e.map((i,a)=>{let s=n>1?a/(n-1):0,l=r.plotLeft+r.plotWidth*s,c=Y(i,o,r.plotTop,r.plotBottom);return {x:l,y:c}})}function Zs(e){return e.map(t=>`${t.x.toFixed(2)},${t.y.toFixed(2)}`).join(" ")}function Wo(e,t,r,o,n,i){let a=i-n>Math.PI?1:0,s=e+r*Math.cos(n),l=t+r*Math.sin(n),c=e+r*Math.cos(i),p=t+r*Math.sin(i),u;if(o>0){let g=e+o*Math.cos(n),x=t+o*Math.sin(n),b=e+o*Math.cos(i),y=t+o*Math.sin(i);u=`M${s},${l} A${r},${r} 0 ${a} 1 ${c},${p} L${b},${y} A${o},${o} 0 ${a} 0 ${g},${x} Z`;}else u=`M${e},${t} L${s},${l} A${r},${r} 0 ${a} 1 ${c},${p} Z`;let d=(n+i)/2,f=r*.7,m=e+f*Math.cos(d),h=t+f*Math.sin(d);return {d:u,midAngle:d,labelX:m,labelY:h}}function $M(e,t,r,o){let n=Math.min(Math.max(e,1),Math.max(t,1)),i=r.style?.hasTitle?20:0,a=r.style?.hasLegend?20:0,s=n/2,l=i+(n-i-a)/2,c=Math.max((n-i-a)*.42,0),p=o&&r.doughnutHoleSize!==void 0?Math.min(Math.max(r.doughnutHoleSize,10),90)/100:.55,u=o?c*p:0;return {cx:s,cy:l,outerR:c,innerR:u,size:n}}function kM(e,t,r,o,n,i){let a=e.reduce((l,c)=>l+Math.abs(c),0)||1,s=i?.startAngle??-Math.PI/2;return e.map((l,c)=>{let p=Math.abs(l)/a*Math.PI*2,u=s;s+=p;let d=i?.explosions?.[c]??0;if(d>0){let f=(u+s)/2,m=o*(d/100);return Wo(t+Math.cos(f)*m,r+Math.sin(f)*m,o,n,u,s)}return Wo(t,r,o,n,u,s)})}function Wg(e,t,r,o,n){let i=n?.slice(0,e.length).filter(Number.isFinite),a=i?.length?Math.min(...i):0,s=i?.length?Math.max(Math.max(...i)-a,1):t;return e.map((l,c)=>({cx:r.plotLeft+(s>0?(Number.isFinite(n?.[c])?n[c]-a:c)/s:0)*r.plotWidth,cy:Y(l,o,r.plotTop,r.plotBottom)}))}function MM(e,t,r){if(e===void 0)return r;let o=t>0?t:1;return r*.5+Math.abs(e)/o*r*1.5}function xl(e,t){let r=Math.max(t,1);return Math.PI*2*e/r-Math.PI/2}function TM(e,t,r,o,n,i){let a=t>0?t:1;return e.slice(0,Math.max(i,1)).map((s,l)=>{let c=xl(l,i),p=Math.abs(s)/a*r;return {x:o+p*Math.cos(c),y:n+p*Math.sin(c)}})}function IM(e,t,r,o){let n=Math.max(o,1);return Array.from({length:n},(i,a)=>{let s=xl(a,n);return `${(e+r*Math.cos(s)).toFixed(2)},${(t+r*Math.sin(s)).toFixed(2)}`}).join(" ")}function yl(e){switch(e){case "bar":case "bar3D":return "bar";case "line":case "line3D":return "line";case "area":case "area3D":return "area";case "pie":case "pie3D":case "ofPie":return "pie";case "doughnut":return "doughnut";case "scatter":return "scatter";case "bubble":return "bubble";case "radar":case "radar3D":return "radar";case "combo":return "combo";case "stock":return "stock";case "surface":case "surface3D":return "surface";case "treemap":return "treemap";case "waterfall":return "waterfall";case "regionMap":return "regionMap";case "funnel":return "funnel";case "sunburst":return "sunburst";case "histogram":return "histogram";case "boxWhisker":return "boxWhisker";default:return "unsupported"}}function Hg(e){if(e.type!=="chart")return ys(e.width,e.height,"Chart");let r=e.chartData;if(!r||r.series.length===0)return ys(e.width,e.height,r?.title??"Chart");let o=r.chartType??"bar",n=yl(o);if(n==="unsupported")return ys(e.width,e.height,r.title??o);let i=r.series.reduce((l,c)=>Math.max(l,c.values.length),0),a=r.categories.length>0?r.categories:Array.from({length:i},(l,c)=>String(c+1));if(o==="ofPie")return xs(zk(e,r,a),r);let s=CM(e,r,a,n);return _M(o)?xs(m5(s,o,r.view3D),r):xs(s,r)}function xs(e,t){let r=Jk(t.userShapes,e.svgWidth,e.svgHeight);return r.length===0?e:{...e,primitives:[...e.primitives,...r],userShapes:r}}function _M(e){return e==="bar3D"||e==="pie3D"||e==="line3D"||e==="area3D"}function CM(e,t,r,o){return o==="pie"||o==="doughnut"?AM(e,t,r,o==="doughnut"):o==="radar"?LM(e,t,r):o==="combo"?sk(e,t,r):o==="stock"?dk(e,t,r):o==="surface"?Yk(e,t,r):o==="treemap"?Vk(e,t,r):o==="waterfall"?cM(e,t,r):o==="regionMap"?hM(e,t,r):o==="funnel"?Ck(e,t,r):o==="sunburst"?Ak(e,t,r):o==="histogram"?Mk(e,t,r):o==="boxWhisker"?xk(e,t,r):ak(e,t,r,o)}function ys(e,t,r){let o=Math.max(e,100),n=Math.max(t,60);return {svgWidth:o,svgHeight:n,title:void 0,titleX:o/2,titleY:14,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],primitives:[{kind:"rect",x:4,y:4,w:o-8,h:n-8,fill:"#f1f5f9",rx:4}],dataLabels:[{kind:"text",x:o/2,y:n/2,text:r,fontSize:10,fill:"#94a3b8",textAnchor:"middle",dominantBaseline:"central"}],legend:[],legendX:o/2,legendY:n-8,legendAnchor:"middle"}}function AM(e,t,r,o){let{cx:n,cy:i,outerR:a,innerR:s,size:l}=$M(e.width,e.height,t,o),c=Math.max(l,100),p=Math.max(l,60),u=t.series[0],d=u?.values??[],f=-Math.PI/2+(t.firstSliceAngle??0)*Math.PI/180,m=u?d.map((k,I)=>n5(u,I)):void 0,h=kM(d,n,i,a,s,{startAngle:f,explosions:m}),g=h.map(({d:k},I)=>({kind:"path",d:k,fill:u?ll(u,I,we(I,t.colorPalette)):we(I,t.colorPalette),stroke:"#ffffff",strokeWidth:1.5,part:{role:"dataPoint",seriesIndex:0,pointIndex:I}})),x=[];if(t.style?.hasDataLabels){let k=Nk({slices:h,values:d,cx:n,cy:i,outerR:a,position:t.style.dataLabels?.position,showLeaderLines:t.style.dataLabels?.showLeaderLines});x.push(...k.labels),g.push(...k.leaderLines);}let b=t.style?.legendPosition??"b",y=r.map((k,I)=>({color:we(I,t.colorPalette),label:k})),v=c/2,S=p-8,$="middle";b==="t"&&(S=t.style?.hasTitle?24:8);let w=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:c,svgHeight:p,title:w,titleX:c/2,titleY:14,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:[],primitives:g,dataLabels:x,legend:t.style?.hasLegend?y:[],legendX:v,legendY:S,legendAnchor:$}}var vs=4,PM="#cbd5e1",EM="#94a3b8",OM="#64748b";function LM(e,t,r){let o=Ke(e.width,e.height,t,false),n=o.plotLeft+o.plotWidth/2,i=o.plotTop+o.plotHeight/2,a=Math.max(Math.min(o.plotWidth,o.plotHeight)/2-4,1),s=Math.max(r.length,1),l=Math.max(1,...t.series.flatMap(b=>b.values.map(y=>Math.abs(y)))),c=[],p=[];for(let b=1;b<=vs;b++){let y=a*b/vs;c.push({kind:"polygon",points:IM(n,i,y,s),fill:"none",stroke:PM,strokeWidth:.5,dashArray:b<vs?"3 2":void 0});}for(let b=0;b<s;b++){let y=xl(b,s);c.push({kind:"line",x1:n,y1:i,x2:n+a*Math.cos(y),y2:i+a*Math.sin(y),stroke:EM,strokeWidth:.5});let v=a+10;p.push({kind:"text",x:n+v*Math.cos(y),y:i+v*Math.sin(y),text:r[b]??"",fontSize:8,fill:OM,textAnchor:"middle",dominantBaseline:"central"});}let u=[];t.series.forEach((b,y)=>{let v=Fe(b,y,t.colorPalette),S=TM(b.values,l,a,n,i,s);if(S.length===0)return;let $=S.map(w=>`${w.x.toFixed(2)},${w.y.toFixed(2)}`).join(" ");c.push({kind:"polygon",points:$,fill:v,opacity:.2,stroke:v,strokeWidth:1.5,part:{role:"series",seriesIndex:y}}),S.forEach((w,k)=>{c.push({kind:"circle",cx:w.x,cy:w.y,r:3,fill:v,part:{role:"dataPoint",seriesIndex:y,pointIndex:k}});}),t.style?.hasDataLabels&&S.forEach((w,k)=>{let I=b.values[k];I!==void 0&&u.push({kind:"text",x:w.x,y:w.y-8,text:le(I),fontSize:7,fill:"#334155",textAnchor:"middle"});});});let d=t.style?.legendPosition??"b",{legend:f,legendX:m,legendY:h,legendAnchor:g}=ct(t.series,t.colorPalette,o.svgWidth,d,o.svgHeight,o.plotTop),x=t.style?.hasTitle&&t.title?t.title:void 0;return {svgWidth:o.svgWidth,svgHeight:o.svgHeight,title:x,titleX:o.svgWidth/2,titleY:12,gridlines:[],axisLabels:[],zeroLine:void 0,categoryLabels:p,primitives:c,dataLabels:u,legend:t.style?.hasLegend?f:[],legendX:m,legendY:h,legendAnchor:g}}var DM="data-chart-part",RM="data-chart-series",zM="data-chart-point";function Zg(e){let t={[DM]:e.role,[RM]:String(e.seriesIndex)};return e.pointIndex!==void 0&&(t[zM]=String(e.pointIndex)),t}var ee="pptx-vue";var pF=`
|
|
2
2
|
/* \u2500\u2500 Entrance \u2500\u2500 */
|
|
3
3
|
@keyframes ${ee}-appear {
|
|
4
4
|
from { opacity: 0; }
|