@pptx-editor.dev/pro 0.3.0-canary.20261108032713.sha-58e17f1 → 0.3.0

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/README.md CHANGED
@@ -18,14 +18,15 @@
18
18
 
19
19
  Commercial capabilities for PPTX Editor, delivered as `EditorModule`s, in the same shape as DOCX Editor's `@docx-editor.dev/pro`:
20
20
 
21
- - `reviewModule()`: the review queue. It reads legacy comments (`p:cmLst`, ECMA-376 Part 1, 19.4) and their replies today.
21
+ - `reviewModule()`: comments. It reads and edits the comment threads of each slide, threaded and legacy (`p:cmLst`, ECMA-376 Part 1, 19.4), and shows them as markers on the canvas.
22
+ - `PptxEditorReview` from `@pptx-editor.dev/pro/react` or `@pptx-editor.dev/pro/vue`: the comments pane, a compound component with `useReview`, `useReviewOf`, `useReviewItem`, and `useReviewAuthor`. Give it to the **Comments** tab of the side panel (`panes` in React, the `#comments` slot in Vue).
22
23
  - `collaborationModule({ session })`: attaches a host-created collaboration session to each opened deck.
23
- - `createYjsCollaborationSession({ doc, documentId, identity, awareness })`: a session over a Y.Doc. It mirrors the deck into Yjs, as DOCX Editor does, so concurrent edits merge without a server sequencer.
24
+ - `createYjsCollaborationSession({ doc, documentId, identity, awareness })`: a session over a Y.Doc. It keeps the deck in Yjs, as DOCX Editor does, so concurrent edits merge without a server sequencer.
24
25
  - **History:** while the session is attached, the editor's undo and redo revert only your own changes (`Y.UndoManager`), never a peer's, and return to the slide and selection of the undone change.
25
26
  - **Status:** `statusSnapshot()` and `subscribeStatus()` report the state and a typed `CollaborationFailureCode`, as in DOCX Editor. Call `setConnected()` from your provider's status event.
26
27
  - **Concurrent edits:** two peers that add or replace an element that a slide, shape, or paragraph holds once end with one element, and the other peer's copy stays hidden in the room until the winner undoes. Property elements merge. Concurrent splits of one run keep its text once, and a node moved into content that a peer removes at once goes back. The `collaboration.realtime` row in `docs/site/data/pptx-features.ts` states what is supported and its limits. A room from a pre-release build (room format 1) refuses to attach.
27
28
  - **Presence:** with a Yjs `awareness` (`y-protocols/awareness`), the editor publishes its selection, and the canvas shows each peer's selected shapes and text caret, with the peer's name and color. Your caret stays on its character while peers type before it.
28
- - `drawingModule()` from `@pptx-editor.dev/pro/drawing`: paints the shape and picture effects glow, inner shadow, reflection, and soft edge (ECMA-376 Part 1, 20.1.8). The free engine paints outer shadows. Without the module, a shape or picture paints without these four effects, and the editor chrome does not offer them: Shape Effects shows only the outer shadows, and Picture Styles shows only the frame styles. Removing an effect needs no module: when the selection has a reflection, glow, or soft edge, Shape Effects offers its No row, and No shadow also removes an inner shadow. The effect commands still write every effect, and save keeps it. PDF export (`@pptx-editor.dev/pptx-to-pdf`) always includes the module. It also draws charts from the values cached in their chart parts (ECMA-376 Part 1, 21.2); see [Charts](#charts).
29
+ - `drawingModule()` from `@pptx-editor.dev/pro/drawing`: paints the shape and picture effects glow, inner shadow, reflection, soft edge, and blur (ECMA-376 Part 1, 20.1.8), and 3-D shapes: bevels, contours, extrusion, and camera rotation (20.1.5). The free engine paints outer and preset shadows. Without the module, a shape or picture paints without these effects, and the editor chrome does not offer them: Shape Effects shows only the outer shadows, and Picture Styles shows only the frame styles. Removing an effect needs no module: when the selection has a reflection, glow, soft edge, bevel, or turned camera, Shape Effects offers its No row, and No shadow also removes an inner shadow. The effect commands still write every effect, and save keeps it. PDF export (`@pptx-editor.dev/pptx-to-pdf`) always includes the module. It also draws charts from the values cached in their chart parts (ECMA-376 Part 1, 21.2); see [Charts](#charts).
29
30
 
30
31
  This package uses the EigenPal Pro License (`LICENSE.md`). Evaluation is permitted. Production use requires a commercial agreement.
31
32
 
@@ -120,7 +121,7 @@ Registering a module is the whole enablement story. Without modules, the free en
120
121
 
121
122
  ## Charts
122
123
 
123
- `@pptx-editor.dev/pro/drawing` draws bar and column charts (clustered, stacked, and percent stacked), line, area, scatter, pie, doughnut, and radar charts, with titles, legends, axes, gridlines, data labels, and number formats. 3-D, of-pie, stock, bubble, and surface charts, and charts with trendlines or error bars, keep the placeholder. A chart is not editable, and its part saves unchanged.
124
+ `@pptx-editor.dev/pro/drawing` draws bar and column charts (clustered, stacked, and percent stacked), line, area, scatter, pie, doughnut, and radar charts, with titles, legends, axes, gridlines, data labels, and number formats. 3-D, of-pie, stock, bubble, and surface charts, and charts with trendlines or error bars, keep the placeholder. Drawing is the only part that needs the module: the free engine edits chart data. See [Charts](https://pptx-editor.dev/docs/guides/charts).
124
125
 
125
126
  ```ts
126
127
  import { createPptxEditor } from '@pptx-editor.dev/core/editor';
@@ -0,0 +1,6 @@
1
+ /*!
2
+ Copyright (c) 2026 Eigenpal, Inc. All rights reserved.
3
+ Licensed under the EigenPal Pro Evaluation License 1.0. See LICENSE.md in this package.
4
+ Production use requires a commercial agreement: licensing@eigenpal.com
5
+ */
6
+ import{a as d}from"./chunk-HCD7IVOL.js";import{readCommentThreads as s}from"@pptx-editor.dev/core/editor";import{presentationInfo as p}from"@pptx-editor.dev/core/store";var l={opening:["auto","manual"],commentMarkers:["initials","icon"]};function f(e){if(e!==void 0){for(let[n,o]of Object.entries(e)){let i=l[n];if(!i)throw new TypeError(`reviewModule: unknown pane option "${n}"`);if(o!==void 0&&!i.includes(o))throw new TypeError(`reviewModule: pane.${n} must be one of ${i.map(r=>`"${r}"`).join(", ")}`)}return Object.freeze({...e})}}function u(e){let n=[];for(let o of p(e).slides)for(let i of s(e,o.partName)){let r=(t,a)=>n.push({id:t.id,kind:"comment",slidePart:o.partName,text:t.text,...t.author?{author:t.author}:{},...t.date!==void 0?{date:t.date}:{},...a?{parentId:a}:{}});r(i);for(let t of i.replies)r(t,i.id)}return n}function c(e={}){let n=f(e.pane);return d(e.licenseKey),{id:"review",review:{displayModes:e.displayModes??["final","markup"],collectReviewItems:({package:o})=>u(o),...n?{pane:n}:{}}}}export{c as a};
@@ -0,0 +1,6 @@
1
+ /*!
2
+ Copyright (c) 2026 Eigenpal, Inc. All rights reserved.
3
+ Licensed under the EigenPal Pro Evaluation License 1.0. See LICENSE.md in this package.
4
+ Production use requires a commercial agreement: licensing@eigenpal.com
5
+ */
6
+ import{claimRejection as h,commentInitials as v,editRejectionMessage as w,REVIEW_AUTHOR_SLOTS as x,requestPane as I,reviewAuthorSlotColor as R}from"@pptx-editor.dev/core/editor";var T=1e4;function E(e,t){let r=e?.snapshot().lastRejection??null;if(t())return null;let o=e?.snapshot().lastRejection??null;if(!(!o||o===r))return h(o),o}function S(e,t,r){return e?{rejection:e,kind:t,serial:(r?.serial??0)+1}:null}function k(e,t){let{reason:r}=t.rejection;return r==="errors.commentChanged"?e(t.kind==="reply"?"comments.threadChanged":"comments.changed"):r==="errors.commentAmbiguous"?e("comments.ambiguous"):w(e,t.rejection)}var m=e=>({author:e.author,...e.date!==void 0?{date:e.date}:{},text:e.text,...e.identity!==void 0?{identity:e.identity}:{}});function N(e,t){let{date:r,...o}=e;return{...o,...m(t),identity:t.identity??e.identity}}function V(e){return new Map(e.map(t=>[t.author,t]))}var f=(e,t)=>(t.get(e)?.slot??0)%x;function F(e,t){return e?{"data-review-author":e,"data-review-author-slot":f(e,t)}:{}}function M(e,t){return e?{"--doc-review-author-current":t.get(e)?.color??R(f(e,t))}:{}}function y(e,t){for(let r of e??[]){if(r.nodeId===t)return r.name;let o=y(r.children,t);if(o!==void 0)return o}}function O(e,t){let r=e.kind==="shapes"&&e.nodeIds.length===1?e.nodeIds[0]:e.kind==="text"||e.kind==="cells"?e.nodeId:void 0;if(r===void 0)return null;let o=t?.find(d=>d.nodeId===r)?.name;if(o===void 0)return null;if(e.kind==="text"&&!e.cell&&!e.diagramNode){let{anchor:d,focus:n}=e,i=d.paragraph-n.paragraph||d.offset-n.offset;if(i!==0){let[a,s]=i<0?[d,n]:[n,d],u=l=>({paragraph:l.paragraph,offset:l.offset});return{nodeId:r,name:o,range:{start:u(a),end:u(s)}}}}return{nodeId:r,name:o}}function j(e,t){return e&&t?.some(r=>r.nodeId===e.nodeId)?e:null}function K(e,t){let r=t?.comments??[];if(!e||!t||r.length===0)return[];let o=!C(t),d=[];for(let n of r){let i=n.id===t.activeComment,a=n.anchor.kind==="shape"||n.anchor.kind==="text"?y(t.shapes,n.anchor.nodeId):void 0,s=o&&n.format==="modern",u=(l,c)=>({key:l.id,id:l.id,identity:l.identity,kind:"comment",author:l.author,initials:v(l),...l.date!==void 0?{date:l.date}:{},text:l.text,format:n.format,resolved:n.resolved,anchor:n.anchor,...a!==void 0?{anchorName:a}:{},...c!==void 0?{parentId:c,parent:m(n)}:{},replyIds:c===void 0?n.replies.map(g=>g.id):[],isActive:i,editable:o&&l.textEditable,resolvable:s});d.push(u(n));for(let l of n.replies)d.push(u(l,n.id))}return d}function C(e){return!e||e.status!=="ready"||e.mode!=="edit"}function P(e){return!!e&&e.status==="ready"}function _(e){let t=n=>e?e.exec(n).ok:!1,r=n=>n?{author:n}:{},o=n=>({expect:m(n)}),d=n=>n.parentId===void 0?o(n):n.parent?{expect:m(n.parent)}:{};return{setActive:(n,i)=>{if(!e)return!1;if(n!==null){let a=(e.snapshot().comments??[]).find(s=>s.id===n);if(!a||i?.identity!==void 0&&a.identity!==i.identity)return!1}return e.selectComment(n),n!==null&&i?.announce&&I(e,"comments"),!0},comment:(n,i,a)=>n.trim()!==""&&t({type:"addComment",text:n,...r(i),...a?{nodeId:a.nodeId}:{},...a?.range?{range:a.range}:{}}),reply:(n,i,a)=>i.trim()!==""&&t({type:"replyToComment",commentId:n.parentId??n.id,text:i,...r(a),...d(n)}),edit:(n,i)=>i.trim()!==""&&t({type:"editComment",commentId:n.id,text:i,...o(n)}),remove:n=>t({type:"deleteComment",commentId:n.id,...o(n)}),resolve:n=>n.resolved||t({type:"resolveComment",commentId:n.parentId??n.id,...d(n)}),reopen:n=>!n.resolved||t({type:"reopenComment",commentId:n.parentId??n.id,...d(n)}),setAuthor:n=>e?.setAuthor(n)}}var b=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/,p=null;function D(e){if(!e)return"";let t=Date.parse(b.test(e)?`${e}Z`:e);return Number.isNaN(t)?"":(p??=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}),p.format(t))}function H(e){return e.isComposing?null:e.key==="Enter"&&!e.shiftKey?"post":e.key==="Escape"?"cancel":null}function X(e){return!!e?.closest?.('button, textarea, input, a, [role="button"]')}export{T as a,E as b,S as c,k as d,m as e,N as f,V as g,F as h,M as i,O as j,j as k,K as l,C as m,P as n,_ as o,D as p,H as q,X as r};
package/dist/drawing.d.ts CHANGED
@@ -85,8 +85,10 @@ declare function reflectionFade(ref: NonNullable<ResolvedEffects['reflection']>,
85
85
  * The free engine paints pictures, shapes with fills, gradients, patterns, lines and outer
86
86
  * shadows, text, tables, and groups. This module adds:
87
87
  *
88
- * - the shape and picture effects glow, inner shadow, reflection, and soft edge (ECMA-376
89
- * Part 1, 20.1.8);
88
+ * - the shape and picture effects glow, inner shadow, reflection, soft edge, and blur
89
+ * (ECMA-376 Part 1, 20.1.8);
90
+ * - 3-D shapes (ECMA-376 Part 1, 20.1.5): bevels, contours, and, under a turned camera, the
91
+ * turned face and its extrusion;
90
92
  * - charts, drawn from the values cached in their chart parts (ECMA-376 Part 1, 21.2): bar and
91
93
  * column charts (clustered, stacked, and percent stacked), line, area, scatter, pie, doughnut,
92
94
  * and radar charts, with titles, legends, axes, gridlines, data labels, and number formats.
@@ -119,7 +121,8 @@ declare function reflectionFade(ref: NonNullable<ResolvedEffects['reflection']>,
119
121
  */
120
122
 
121
123
  /**
122
- * Install the drawing renderers (charts, glow, inner shadow, reflection, and soft edge) for
124
+ * Install the drawing renderers (charts, glow, inner shadow, reflection, soft edge, blur, and
125
+ * 3-D) for
123
126
  * every editor and export in this process, without an editor module: for headless rendering.
124
127
  * Installing again is harmless. A host without the EigenPal Pro License leaves this call out;
125
128
  * its charts then show placeholders, and its shapes and pictures paint without those effects.
package/dist/drawing.js CHANGED
@@ -3,5 +3,5 @@ Copyright (c) 2026 Eigenpal, Inc. All rights reserved.
3
3
  Licensed under the EigenPal Pro Evaluation License 1.0. See LICENSE.md in this package.
4
4
  Production use requires a commercial agreement: licensing@eigenpal.com
5
5
  */
6
- import{a as Vt}from"./chunk-HCD7IVOL.js";import{installDrawingRenderers as al}from"@pptx-editor.dev/core/layout";import{resolveThemeFont as ur}from"@pptx-editor.dev/core/cascade";import{isValidXmlText as cr}from"@pptx-editor.dev/core/store";import{resolveColor as lr}from"@pptx-editor.dev/core/cascade";import{NS as je}from"@pptx-editor.dev/core/store";var $t=je.c,he=je.a;function ee(e){return e?.type==="element"}function J(e,t){for(let n of e)if(n.type==="element"&&n.ns===t.namespaceUri&&n.local===t.localName)return n;return null}function Y(e,t){for(let n of e)if(n.local===t&&n.ns==="")return n.value}var ar=20116800;function Wt(e){if(e===void 0||!/^-?\d{1,15}$/.test(e))return null;let t=Number(e);return Number.isFinite(t)?Math.min(Math.max(t,0),ar):null}function ir(e){let t=n=>Math.round(Math.min(255,Math.max(0,n))).toString(16).padStart(2,"0");return{hex:`${t(e.r)}${t(e.g)}${t(e.b)}`.toUpperCase(),alpha:e.a}}function xe(e,t){if(!ee(e)||!t)return null;let n=lr(e,t);return n?ir(n):null}var sr=new Set(["noFill","solidFill","gradFill","blipFill","pattFill","grpFill"]);function Gt(e,t){let n=e.children.find(o=>o.type==="element"&&o.ns===je.a&&sr.has(o.local));if(!n)return{present:!1,color:null};if(n.local!=="solidFill")return{present:!0,color:null};let r=n.children.find(ee);return{present:!0,color:xe(r,t)}}var zt=0;function mt(e,t,n=[]){return zt+=1,{type:"element",id:`chart-generated-${zt}`,kind:"generic",ns:je.a,local:e,nsDecls:[],attrs:Object.entries(t).map(([r,o])=>({ns:"",local:r,value:o})),children:n}}var Se=he,Ie=512,dr=128,fr=16,hr=.952,mr=.268;function Ht(e,t){let n=Y(e.attrs,t);return n==="1"||n==="true"?!0:n==="0"||n==="false"?!1:null}function pt(e,t){let n=J(e.children,{namespaceUri:Se,localName:t}),r=n?Y(n.attrs,"typeface"):void 0;return r&&r.length<=dr&&cr(r)?r:null}function Ne(e,t,n){if(!t)return e;let r=Y(t.attrs,"sz"),o=r&&/^\d{3,6}$/.test(r)?Number(r)/100:null,a=J(t.children,{namespaceUri:Se,localName:"solidFill"})?.children.find(ee),i=a?xe(a,n):null,s=Y(t.attrs,"u");return{sizePt:o!==null&&o>=1&&o<=400?o:e.sizePt,bold:Ht(t,"b")??e.bold,italic:Ht(t,"i")??e.italic,underline:s===void 0?e.underline:s!=="none",colorHex:i?.hex??e.colorHex,latin:pt(t,"latin")??e.latin,eastAsian:pt(t,"ea")??e.eastAsian,complex:pt(t,"cs")??e.complex}}function xt(e){if(!e)return null;let t=J(e.children,{namespaceUri:Se,localName:"p"}),n=t?J(t.children,{namespaceUri:Se,localName:"pPr"}):null;return n?J(n.children,{namespaceUri:Se,localName:"defRPr"}):null}function Oe(e){let t=e?J(e.children,{namespaceUri:Se,localName:"bodyPr"}):null;if(!t)return null;let n=Y(t.attrs,"vert");if(n==="vert")return 90;if(n==="vert270")return-90;let r=Y(t.attrs,"rot");if(r===void 0||!/^-?\d{1,9}$/.test(r))return null;let o=Number(r);return o===-6e7||Math.abs(o)>54e5?null:o/6e4}var me=null;function Xt(e,t){let n=me;me=e;try{return t()}finally{me=n}}function De(e,t){return ur(e,t)??t.minorFont.latin??"Calibri"}function jt(e,{measurer:t,theme:n}){return t.resolve({family:De(e.latin,n),bold:e.bold,italic:e.italic})}function Q(e,t){if(!me)return 0;let n=e.length>Ie?e.slice(0,Ie):e;if(n==="")return 0;let r=jt(t,me),o=0;for(let l of me.measurer.advances(r,n))o+=l;return o*t.sizePt}function Kt(e){let t=me?jt(e,me).metrics:null;return t&&t.ascent>0&&t.descent>=0?t:{ascent:hr,descent:mr}}function q(e){let{ascent:t,descent:n}=Kt(e);return e.sizePt*(t+n)}function yt(e){return e.sizePt*Kt(e).ascent}function Fe(e,t){let n=0;for(let r of e)n+=r.length>0?Math.max(...r.map(o=>q(o.style))):q(t);return n}function Ke(e){let t=0;for(let n of e)t=Math.max(t,n.reduce((r,o)=>r+Q(o.text,o.style),0));return t}function Yt(e){let t=[];for(let n of e){let r=[];for(let o of n){let l=o.text.split(/\r\n|\r|\n/);for(let[a,i]of l.entries())a>0&&(t.push(r),r=[]),i!==""&&r.push({text:i,style:o.style})}t.push(r)}return t.slice(0,fr)}var pr=12700,xr=4096,Zt=2,ye=e=>Math.round(e*pr);function yr(e){let t=/^[0-9a-f]{6}$/i.test(e.hex)?Number.parseInt(e.hex,16):0,n=Number.isFinite(e.alpha)?Math.min(1,Math.max(0,e.alpha)):1;return{r:t>>16&255,g:t>>8&255,b:t&255,a:n}}function bt(e){return{type:"solid",color:yr(e)}}function br(e,t){return{fill:bt(e),width:ye(e.widthPt),cap:e.cap==="round"?"rnd":e.cap==="square"?"sq":"flat",join:t??"miter",miterLimit:8,dash:e.dash?"custom":"solid",...e.dash?{dashes:e.dash}:{},compound:"sng"}}var Jt=e=>e!==null&&/^[0-9a-f]{6}$/i.test(e.hex);function gr(e,t,n){let r=[];for(let o of e.subpaths){for(let[l,a]of o.entries())r.push({op:l===0?"M":"L",x:ye(a.x),y:ye(a.y)});e.closed&&r.push({op:"Z"})}return{commands:r,fill:t?"norm":"none",stroke:n}}function qt(e,t,n){let r=e.frame;return{nodeId:`${r.nodeId}#chart-${n}:${t}`,partName:r.partName,layer:r.layer,name:"",hidden:!1}}function Cr(e,t,n){let r=e.closed&&Jt(e.fill)?e.fill:null,o=e.stroke&&Jt(e.stroke)?e.stroke:null;if(!r&&!o)return null;let{cx:l,cy:a}=n.frame.xfrm;return{...qt(n,t,"shape"),kind:"shape",xfrm:{x:0,y:0,cx:l,cy:a,rot:0,flipH:!1,flipV:!1},geometry:{kind:"paths",paths:[gr(e,!!r,!!o)]},fill:r?bt(r):{type:"none"},...o?{line:br(o,e.join)}:{}}}var Mr={lIns:0,tIns:0,rIns:0,bIns:0,anchor:"ctr",anchorCtr:!1,wrap:"square",vert:"horz",rot:0,upright:!1,numCol:1,spcCol:0,autofit:{kind:"none"},spcFirstLastPara:!1};function Qt(e,t){let n=e.style,r=n.latin.startsWith("+mj")?"major":n.latin.startsWith("+mn")?"minor":void 0,o=De(n.latin,t);return{size:Math.round(n.sizePt*100),bold:n.bold,italic:n.italic,underline:n.underline?"sng":"none",strike:"noStrike",caps:"none",spacing:0,baseline:0,latin:o,...r?{latinTheme:r}:{},ea:n.eastAsian?De(n.eastAsian,t):o,cs:n.complex?De(n.complex,t):o,fill:bt({hex:n.colorHex,alpha:1})}}function Pr(e,t,n,r){let o=e.filter(a=>a.text!==""),l=o.reduce((a,i)=>i.style.sizePt<a.style.sizePt?i:a);return{nodeId:`${n}:p`,level:0,align:t,marL:0,marR:0,indent:0,lineSpacing:{pct:1},spaceBefore:{pts:0},spaceAfter:{pts:0},bullet:null,defaultTab:914400,tabs:[],rtl:!1,eaLineBreak:!0,latinLineBreak:!1,hangingPunct:!1,runs:o.map((a,i)=>({kind:"text",nodeId:`${n}:r${i}`,text:a.text.length>Ie?a.text.slice(0,Ie):a.text,props:Qt(a,r)})),endProps:Qt(l,r)}}function Sr(e,t,n){let r=`${n.frame.nodeId}#chart-label:${t}`,o=[];for(let[s,u]of Yt(e.paragraphs).entries())u.some(d=>d.text!=="")&&o.push(Pr(u,e.align,`${r}:${s}`,n.theme));if(o.length===0)return null;let l=e.align==="l"?0:Zt,a=e.align==="r"?0:Zt,i=(e.rotation%360+360)%360;return{...qt(n,t,"label"),kind:"shape",xfrm:{x:ye(e.x-l),y:ye(e.y),cx:Math.max(1,ye(e.width+l+a)),cy:Math.max(1,ye(e.height)),rot:Number.isFinite(i)?i:0,flipH:!1,flipV:!1},geometry:{kind:"preset",preset:"rect",adjust:new Map},fill:{type:"none"},text:{body:Mr,paragraphs:o}}}function en(e,t,n,r){if(t.length>xr)return null;let o={frame:n,theme:r},l=[];for(let[a,i]of e.entries()){let s=Cr(i,a,o);s&&l.push(s)}for(let[a,i]of t.entries()){let s=Sr(i,a,o);s&&l.push(s)}return l}var Mt=$t,kr=8,gt=255,Je=4096,Er=32768,tn=1024,rn=new Map([["barChart",{kind:"bar",threeD:!1}],["bar3DChart",{kind:"bar",threeD:!0}],["lineChart",{kind:"line",threeD:!1}],["line3DChart",{kind:"line",threeD:!0}],["areaChart",{kind:"area",threeD:!1}],["area3DChart",{kind:"area",threeD:!0}],["pieChart",{kind:"pie",threeD:!1}],["pie3DChart",{kind:"pie",threeD:!0}],["doughnutChart",{kind:"doughnut",threeD:!1}],["scatterChart",{kind:"scatter",threeD:!1}],["radarChart",{kind:"radar",threeD:!1}],["bubbleChart",{kind:"bubble",threeD:!1}],["stockChart",{kind:"line",threeD:!1}],["ofPieChart",{kind:"ofPie",threeD:!1}],["surfaceChart",{kind:"surface",threeD:!1}],["surface3DChart",{kind:"surface",threeD:!0}]]);function P(e,t){return e?J(e.children,{namespaceUri:Mt,localName:t}):null}function oe(e,t){let n=[];for(let r of e?.children??[])ee(r)&&r.ns===Mt&&r.local===t&&n.push(r);return n}function z(e,t){let n=P(e,t);return n?Y(n.attrs,"val"):void 0}function re(e,t,n){let r=P(e,t);if(!r)return n;let o=Y(r.attrs,"val");return o===void 0?!0:o==="1"||o==="true"}function K(e,t,n,r){let o=z(e,t);if(o===void 0||o.length>40)return null;let l=Number(o);return Number.isFinite(l)&&l>=n&&l<=r?l:null}function Ct(e){let t="";for(let n of e?.children??[])n.type==="text"&&(t+=n.value);return t.length>tn?t.slice(0,tn):t}function on(e,t){let n=z(e,"ptCount")?.trim(),r=K(e,"ptCount",0,Je);return P(e,"ptCount")&&(!n||!/^\+?\d+$/.test(n)||r===null)?(t.remaining=-1,null):r}function Ze(e,t){if(!e)return null;let n=on(e,t);if(t.remaining<0)return null;let r=oe(e,"pt"),o=n??0,l=[];for(let i of r){let s=Y(i.attrs,"idx"),u=s!==void 0&&/^\d{1,6}$/.test(s)?Number(s):-1;if(u<0||u>=Je||n!==null&&u>=n)return t.remaining=-1,null;l.push([u,Ct(P(i,"v"))]),n===null&&(o=Math.max(o,u+1))}if(o>Je||(t.remaining-=o,t.remaining<0))return null;let a=Array.from({length:o},()=>null);for(let[i,s]of l)a[i]=s;return a}function Ye(e,t){let n={text:null,numbers:null,formatCode:null};if(!e)return n;let r=P(e,"numRef"),o=P(r,"numCache")??P(e,"numLit");if(o){let u=Ze(o,t),d=Ct(P(o,"formatCode"))||null;return{text:u,numbers:u?.map(f=>ln(f))??null,formatCode:d}}let l=P(e,"strRef"),a=P(l,"strCache")??P(e,"strLit");if(a)return{text:Ze(a,t),numbers:null,formatCode:null};let i=P(P(e,"multiLvlStrRef"),"multiLvlStrCache");if(i){let u=oe(i,"lvl")[0]??null;if(u){let d=on(i,t),f=Ze(u,t)??[],h=d??f.length;return h<f.length?(t.remaining=-1,n):(t.remaining-=Math.max(0,h-f.length),t.remaining<0?n:{text:Array.from({length:h},(y,b)=>f[b]??null),numbers:null,formatCode:null})}}let s=P(e,"v");return s?{text:[Ct(s)],numbers:null,formatCode:null}:n}function ln(e){if(e===null)return null;let t=e.trim();if(t===""||t.length>40)return null;let n=Number(t);return Number.isFinite(n)?n:null}function Lr(e){return e?{symbol:z(e,"symbol")??null,size:K(e,"size",2,72),spPr:P(e,"spPr")}:null}function vr(e,t,n){let r=Ye(P(e,"tx"),n).text?.[0]??null,o=t==="scatter"||t==="bubble",l=Ye(P(e,o?"xVal":"cat"),n),a=Ye(P(e,o?"yVal":"val"),n);if(n.remaining<0)return null;let i=new Map;for(let s of oe(e,"dPt")){let u=K(s,"idx",0,Je-1);u!==null&&i.set(u,s)}return{index:K(e,"idx",0,2**31)??0,order:K(e,"order",0,2**31)??0,name:r,categories:o?null:l.text,categoryNumbers:o?null:l.numbers,categoryFormat:l.formatCode,xValues:o?l.numbers:null,values:a.numbers??(a.text??[]).map(ln),formatCode:a.formatCode,spPr:P(e,"spPr"),marker:Lr(P(e,"marker")),dLbls:P(e,"dLbls"),points:i,smooth:re(e,"smooth",!1),explosion:K(e,"explosion",0,400)??0,invertIfNegative:re(e,"invertIfNegative",!1),bubbleSizes:t==="bubble"?Ye(P(e,"bubbleSize"),n).numbers??null:null,trendlines:oe(e,"trendline").slice(0,8),errorBars:oe(e,"errBars").slice(0,2),labelRange:Ze(Ar(e),n)}}function nn(e,t){for(let n of e?.children??[])if(ee(n)&&n.local===t)return n;return null}function Ar(e){for(let t of oe(P(e,"extLst"),"ext")){let n=nn(nn(t,"datalabelsRange"),"dlblRangeCache");if(n)return n}return null}var wr=new Set(["clustered","stacked","percentStacked","standard"]);function Tr(e,t){let n=rn.get(e.local);if(!n)return null;let r=[];for(let a of oe(e,"ser")){if(r.length>=gt)return null;let i=vr(a,n.kind,t);if(!i||t.remaining<0)return null;r.push(i)}r.sort((a,i)=>a.order-i.order);let o=z(e,"grouping"),l=n.kind;return{kind:l,threeD:n.threeD,element:e,horizontal:l==="bar"&&z(e,"barDir")==="bar",grouping:o&&wr.has(o)?o:l==="bar"?"clustered":"standard",varyColors:re(e,"varyColors",l==="pie"||l==="doughnut"),gapWidth:K(e,"gapWidth",0,500)??150,overlap:K(e,"overlap",-100,100)??0,gapDepth:K(e,"gapDepth",0,500)??150,series:r,axisIds:oe(e,"axId").map(a=>Y(a.attrs,"val")??""),dLbls:P(e,"dLbls"),firstSliceAngle:K(e,"firstSliceAng",0,360)??0,holeSize:K(e,"holeSize",1,90)??50,markers:re(e,"marker",!0),scatterStyle:z(e,"scatterStyle")??null,radarStyle:z(e,"radarStyle")??null,hiLowLines:P(e,"hiLowLines"),upDownBars:P(e,"upDownBars"),bubbleScale:K(e,"bubbleScale",0,300)??100,bubbleArea:z(e,"sizeRepresents")!=="w",ofPie:l==="ofPie"?{type:z(e,"ofPieType")==="bar"?"bar":"pie",splitType:z(e,"splitType")??"auto",splitPos:K(e,"splitPos",-1e300,1e300),secondSize:K(e,"secondPieSize",5,200)??75,serLines:P(e,"serLines")}:null,wireframe:l==="surface"&&re(e,"wireframe",!1),bandFormats:l==="surface"?Rr(e):new Map}}function Rr(e){let t=new Map;for(let n of oe(P(e,"bandFmts"),"bandFmt").slice(0,gt)){let r=K(n,"idx",0,gt),o=P(n,"spPr");r!==null&&o&&t.set(r,o)}return t}var _r=new Set(["b","t","l","r"]);function Ir(e){let t=e.local==="catAx"?"category":e.local==="valAx"?"value":e.local==="dateAx"?"date":e.local==="serAx"?"series":null;if(!t)return null;let n=z(e,"axId");if(!n)return null;let r=P(e,"scaling"),o=P(e,"numFmt"),l=z(e,"axPos"),a=K(e,"crossesAt",-1e300,1e300),i=z(e,"crosses"),s=z(e,"majorTickMark"),u=z(e,"minorTickMark"),d=z(e,"tickLblPos"),f=z(e,"crossBetween"),h=z(e,"baseTimeUnit");return{id:n,kind:t,element:e,deleted:re(e,"delete",!1),position:l&&_r.has(l)?l:"b",crossAxisId:z(e,"crossAx")??null,reversed:z(r,"orientation")==="maxMin",min:K(r,"min",-1e300,1e300),max:K(r,"max",-1e300,1e300),majorUnit:K(e,"majorUnit",1e-300,1e300),minorUnit:K(e,"minorUnit",1e-300,1e300),logBase:K(r,"logBase",2,1e3),formatCode:o?Y(o.attrs,"formatCode")??null:null,sourceLinked:o?Y(o.attrs,"sourceLinked")==="1":!0,majorGridlines:P(e,"majorGridlines"),minorGridlines:P(e,"minorGridlines"),majorTickMark:s==="none"||s==="in"||s==="out"||s==="cross"?s:"cross",minorTickMark:u==="none"||u==="in"||u==="out"||u==="cross"?u:"cross",tickLabelPosition:d==="low"||d==="high"||d==="none"?d:"nextTo",spPr:P(e,"spPr"),txPr:P(e,"txPr"),title:P(e,"title"),crosses:a!==null?a:i==="min"||i==="max"?i:"autoZero",crossBetween:f==="between"||f==="midCat"?f:null,tickLabelSkip:K(e,"tickLblSkip",1,32e3),baseTimeUnit:h==="days"||h==="months"||h==="years"?h:null}}function Qe(e){let t=P(e,"manualLayout");if(!t)return null;let n=i=>K(t,i,-10,10),r=n("x"),o=n("y"),l=n("w"),a=n("h");return r===null||o===null||z(t,"xMode")==="factor"||z(t,"yMode")==="factor"?null:{inner:z(t,"layoutTarget")!=="outer",x:r,y:o,w:l??0,h:a??0}}function Nr(e){if(!e)return null;let t=z(e,"legendPos"),n=new Set;for(let r of oe(e,"legendEntry")){let o=K(r,"idx",0,1e5);o!==null&&re(r,"delete",!1)&&n.add(o)}return{element:e,position:t==="b"||t==="t"||t==="l"||t==="tr"?t:"r",overlay:re(e,"overlay",!1),txPr:P(e,"txPr"),spPr:P(e,"spPr"),layout:Qe(P(e,"layout")),deleted:n}}function Or(e){let t=K(e,"style",1,48);if(t!==null)return t;for(let n of e.children)if(!(!ee(n)||n.local!=="AlternateContent"))for(let r of n.children){if(!ee(r)||r.local!=="Fallback")continue;let o=K(r,"style",1,48);if(o!==null)return o}return 2}function an(e){let t=P(e,"chart"),n=P(t,"plotArea");if(!t||!n)return null;let r={remaining:Er},o=[],l=new Map;for(let a of n.children){if(!ee(a)||a.ns!==Mt)continue;if(rn.has(a.local)){if(o.length>=kr)return null;let s=Tr(a,r);if(!s)return null;o.push(s);continue}let i=Ir(a);i&&l.set(i.id,i)}return o.length===0?null:{chartSpace:e,date1904:re(e,"date1904",!1),style:Or(e),roundedCorners:re(e,"roundedCorners",!0),spPr:P(e,"spPr"),txPr:P(e,"txPr"),title:P(t,"title"),autoTitleDeleted:re(t,"autoTitleDeleted",!1),plotSpPr:P(n,"spPr"),plotLayout:Qe(P(n,"layout")),plots:o,axes:l,legend:Nr(P(t,"legend")),view3D:P(t,"view3D"),floor:P(t,"floor"),sideWall:P(t,"sideWall"),backWall:P(t,"backWall")}}var Pt=["January","February","March","April","May","June","July","August","September","October","November","December"],sn=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function St(e){if(!Number.isFinite(e))return"";if(e===0)return"0";let t=Math.abs(e);if(t>=1e11||t<1e-9){let[o,l]=e.toExponential(5).split("e"),a=o.replace(/\.?0+$/,""),i=Number(l);return`${a}E${i<0?"-":"+"}${String(Math.abs(i)).padStart(2,"0")}`}let n=Math.max(0,10-Math.max(1,Math.floor(Math.log10(t))+1)),r=e.toFixed(Math.min(n,20));return r.includes(".")?r.replace(/\.?0+$/,""):r}function un(e){let t=[],n="",r=!1,o=!1;for(let l=0;l<e.length;l+=1){let a=e[l];if(a==="\\"&&!r&&l+1<e.length){n+=a+e[l+1],l+=1;continue}if(a==='"'?r=!r:!r&&a==="["?o=!0:!r&&a==="]"&&(o=!1),a===";"&&!r&&!o){t.push(n),n="";continue}n+=a}return t.push(n),t}function cn(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(r==='"'){let o=e.indexOf('"',n+1),l=o===-1?e.length:o;t.push({kind:"literal",text:e.slice(n+1,l)}),n=l}else if(r==="\\"&&n+1<e.length)t.push({kind:"literal",text:e[n+1]}),n+=1;else if(r==="_"&&n+1<e.length)t.push({kind:"literal",text:" "}),n+=1;else if(r==="*"&&n+1<e.length)n+=1;else if(r==="["){let o=e.indexOf("]",n+1),l=o===-1?e.length:o,a=e.slice(n+1,l);if(/^(?:h+|m+|s+)$/i.test(a))t.push({kind:"code",text:`[${a}]`});else if(a.startsWith("$")){let i=a.indexOf("-");t.push({kind:"literal",text:a.slice(1,i===-1?a.length:i)})}n=l}else"$-+/():!^&'~{}<>= ".includes(r)?t.push({kind:"literal",text:r}):t.push({kind:"code",text:r})}return t}function qe(e){return(e[0]==="["?e[1]:e[0]).toLowerCase()}function dn(e){let t=!1,n="",r=!1;for(let o of e){if(o.kind!=="code")continue;let l=qe(o.text);if(l===".")r=n==="s";else{if(l==="0"&&r)continue;if(l==="0"||l==="#"||l==="?")return!1;r=!1}"ymdhs".includes(l)&&(t=!0),n=l}return t}function Dr(e){let t="";for(let n=0;n<e.length;n+=1)n>0&&(e.length-n)%3===0&&(t+=","),t+=e[n];return t}function Fr(e,t){let n=t.map(M=>M.kind==="code"?M.text:""),r=n.findIndex(M=>M==="E"||M==="e"),o=M=>M==="0"||M==="#"||M==="?",l=0,a=-1,i=-1,s=-1;for(let M=0;M<n.length&&!(r!==-1&&M>=r);M+=1){let S=n[M];S==="%"&&(l+=1),S==="."&&a===-1&&(a=M),o(S)&&(s===-1&&(s=M),i=M)}if(s===-1)return t.map(M=>M.kind==="literal"?M.text:"").join("");let u=e*100**Math.min(l,3),d=i+1;for(;d<n.length&&n[d]===",";)u/=1e3,d+=1;let f=a===-1?i+1:a,h=!1,y=0;for(let M=s;M<f;M+=1)n[M]===","&&(h=!0),n[M]==="0"&&(y+=1);let b=0,x=0;if(a!==-1)for(let M=a+1;M<=i;M+=1)o(n[M])&&(x+=1,n[M]==="0"&&(b=x));x=Math.min(x,30),b=Math.min(b,x);let g;if(r!==-1){let M=x,[S,w]=Math.abs(u).toExponential(M).split("e"),O=Number(w),L=t[r+1]?.text==="+"||t[r+1]?.text==="-",_=O<0?"-":t[r+1]?.text==="+"?"+":"",k=0;for(let $=r+(L?2:1);$<n.length&&o(n[$]);$+=1)k+=1;g=`${S}E${_}${String(Math.abs(O)).padStart(Math.max(1,k),"0")}`}else{let M=Math.abs(u).toFixed(x),[S,w=""]=M.split(".");for(;w.length>b&&w.endsWith("0");)w=w.slice(0,-1);S==="0"&&y===0&&(S=""),S=S.padStart(y,"0"),h&&(S=Dr(S)),g=a===-1?S:`${S}.${w}`}let T="",A="";for(let M=0;M<t.length;M+=1){let S=t[M],w=S.kind==="literal"?S.text:S.text==="%"?"%":"";M<s?T+=w:M>(r!==-1?n.length:i)&&S.text!==","&&(A+=w)}return T+g+A}function pe(e,t){return String(e).padStart(t,"0")}function Br(e,t){if(!Number.isFinite(e)||e<0||e>2958465)return null;let n=t?e+1462:e<61?e+1:e,r=Math.round((n-25569)*864e5);return new Date(r)}function Ur(e,t,n){let r=Br(Math.abs(e),n);if(!r)return St(e);let o=[];for(let i of t){let s=o[o.length-1];s&&s.kind==="code"&&i.kind==="code"&&s.text[0]!=="["&&i.text[0]!=="["&&s.text[0].toLowerCase()===i.text.toLowerCase()?s.text+=i.text:o.push({kind:i.kind,text:i.text})}let l=t.some(i=>i.kind==="code"&&i.text.toLowerCase()==="a"),a="";for(let i=0;i<o.length;i+=1){let s=o[i];if(s.kind==="literal"){a+=s.text;continue}let u=s.text.toLowerCase(),d=qe(s.text),f=s.text.length;if(u[0]==="["){let h=d==="h"?24:d==="m"?1440:86400;a+=pe(Math.floor(Math.abs(e)*h+1e-9),f-2)}else if(d==="0"&&o[i-1]?.text==="."){let h=r.getUTCMilliseconds();a+=pe(Math.floor(h/10**(3-Math.min(f,3))),Math.min(f,3)).padEnd(f,"0")}else if(d==="y")a+=f<=2?pe(r.getUTCFullYear()%100,2):String(r.getUTCFullYear());else if(d==="d")f>=4?a+=sn[r.getUTCDay()]:f===3?a+=sn[r.getUTCDay()].slice(0,3):a+=f===2?pe(r.getUTCDate(),2):String(r.getUTCDate());else if(d==="m"){let h=o.slice(0,i).reverse().find(x=>x.kind==="code"),y=o.slice(i+1).find(x=>x.kind==="code");f<=2&&(h&&qe(h.text)==="h"||y&&qe(y.text)==="s")?a+=f===2?pe(r.getUTCMinutes(),2):String(r.getUTCMinutes()):f>=5?a+=Pt[r.getUTCMonth()][0]:f===4?a+=Pt[r.getUTCMonth()]:f===3?a+=Pt[r.getUTCMonth()].slice(0,3):a+=f===2?pe(r.getUTCMonth()+1,2):String(r.getUTCMonth()+1)}else if(d==="h"){let h=r.getUTCHours();l&&(h=h%12===0?12:h%12),a+=f>=2?pe(h,2):String(h)}else if(d==="s")a+=f>=2?pe(r.getUTCSeconds(),2):String(r.getUTCSeconds());else if(d==="a"){let h=r.getUTCHours()>=12,y=o[i+2]?.text.toLowerCase()==="p";for(a+=y?h?"P":"A":h?"PM":"AM";i+1<o.length&&/^[mp/]/i.test(o[i+1].text);)i+=1}else if(d==="e")a+=String(r.getUTCFullYear());else{if(d==="g"||d==="b")continue;a+=s.text}}return a}function ce(e,t,n=!1){if(!Number.isFinite(e))return"";if(!t||t.length>256||/^general$/i.test(t.trim()))return St(e);let r=un(t),o=r[0],l=e;if(e<0&&r.length>=2?(o=r[1],l=-e):e===0&&r.length>=3&&(o=r[2]),/^general$/i.test(o.trim()))return St(l);let a=cn(o);if(dn(a))return Ur(e,a,n);let i=Fr(l,a),s=/^[^1-9]*$/.test(i);return l<0&&!s?`-${i}`:i}function fn(e){return!e||e.length>256||/^general$/i.test(e.trim())?!1:dn(cn(un(e)[0]))}function et(e,t,n){let r=e.categoryNumbers?.[t];return r!=null&&e.categoryFormat?ce(r,e.categoryFormat,n):e.categories?.[t]??null}function pn(e,t){if(e.logBase!==void 0){if(!(t>0))return 0;let n=Math.log(e.max/e.min)||1;return Math.log(t/e.min)/n}return(t-e.min)/(e.max-e.min||1)}function xn(e,t,n,r,o){let l=f=>Math.log(f)/Math.log(n),a=e>0?e:1,i=t>0?Math.max(t,a):a,s=r!==null&&r>0?r:n**Math.floor(l(a)+1e-9),u=o!==null&&o>0?o:n**Math.ceil(l(i)-1e-9);u>s||(u=s*n);let d=[];for(let f=0;f<=1e3;f+=1){let h=Number((s*n**f).toPrecision(12));if(h>u*(1+1e-9))break;d.push(h)}return{min:s,max:u,major:n,ticks:d,logBase:n}}function hn(e){let t=10**Math.floor(Math.log10(e));return[1,2,5,10,20].map(n=>n*t)}function mn(e,t){return Number((Math.round(e/t)*t).toPrecision(12))}function tt(e){let t=Number.isFinite(e.dataMin)?e.dataMin:0,n=Number.isFinite(e.dataMax)?e.dataMax:1;t>n&&([t,n]=[n,t]),e.fixedMin!==null&&(t=Math.min(t,e.fixedMin)),e.fixedMax!==null&&(n=Math.max(n,e.fixedMax)),t===n&&(n===0?n=1:n>0?t=0:n=0);let r=t,o=n;e.fixedMin===null&&t>=0&&(r=t>5/6*n?t-(n-t)/2:0),e.fixedMax===null&&n<=0&&(o=n<5/6*t?n+(n-t)/2:0);let l=e.noHeadroom?0:.05*(o-r),a=e.fixedMax??(o>0?o+l:o),i=e.fixedMin??(r<0?r-l:r),s=Math.max(a-i,Number.EPSILON),u=Math.max(1,Math.floor(e.lengthPt/Math.max(1,e.minIntervalPt))),d=e.fixedMajor??0;if(!(d>0)||s/d>1e3){d=0;let b=e.roomOnly===!0||e.fixedMin!==null&&e.fixedMax!==null,x=(e.fixedMax??o)-(e.fixedMin??r);for(let g of hn(s/10)){let T=Math.ceil(a/g-1e-9)-Math.floor(i/g+1e-9),A=e.roomOnly?Math.min(u,10):u;if(T<=A&&(b||x/g<=9.5)){d=g;break}}d===0&&(d=hn(s)[2])}let f=e.fixedMin??mn(Math.floor(i/d+1e-9)*d,d),h=e.fixedMax??mn(Math.ceil(a/d-1e-9)*d,d);h<=f&&(h=f+d);let y=[];for(let b=0;b<=1e3;b+=1){let x=Number((f+b*d).toPrecision(12));if(x>h+d*1e-9)break;y.push(x)}return{min:f,max:h,major:d,ticks:y}}var Vr=1,zr=1.4;function be(e,t,n){let r=t.axisIds.map(o=>e.axes.get(o)).filter(o=>o!==void 0);if(t.kind==="scatter"||t.kind==="bubble"){let o=i=>i.position==="b"||i.position==="t",l=r.find(o)??r[0]??null,a=r.find(i=>i!==l)??null;return n==="value"?a:n==="x"?l:null}return n==="value"?r.find(o=>o.kind==="value")??null:r.find(o=>o.kind==="category"||o.kind==="date")??null}function nt(e,t,n){let r=0,o=null,l=null,a=null;for(let b of t)for(let x of b.series)r=Math.max(r,x.values.length),!o&&x.categories&&(o=[...x.categories],l=x.categoryNumbers?[...x.categoryNumbers]:null,a=x.categoryFormat);let i=t.length>0?be(e,t[0],"category"):null;o&&(r=Math.max(r,o.length)),r=Math.min(r,n);let u=(i&&!i.sourceLinked?i.formatCode:null)??a,d=l!==null&&(i?.kind==="date"||i?.kind!=="category"&&fn(u))&&l.every(b=>b!==null),f=[];for(let b=0;b<r;b+=1){let x=l?.[b];x!=null&&u?f.push(ce(x,u,e.date1904)):f.push(o?.[b]??String(b+1))}let h=t.length>0?be(e,t[0],"value"):null,y=h?.crossBetween==="midCat"||h?.crossBetween===null&&t.every(b=>b.kind==="area");return{axis:i,count:r,labels:f,serials:d?$r(l.slice(0,r),i,e.date1904):null,between:!y}}function $r(e,t,n){let r=a=>e.map(i=>{let s=n?i+1462:i<61?i+1:i,u=new Date(Math.round((s-25569)*864e5)),d=u.getUTCFullYear();return a==="years"?d:d*12+u.getUTCMonth()}),o=t?.baseTimeUnit??null;if(o==="days")return[...e];if(o!==null)return r(o);let l=new Set(e).size;for(let a of["years","months"]){let i=r(a);if(new Set(i).size===l)return i}return[...e]}function Be(e,t,n,r){let o=r-n;if(e.serials&&e.serials.length>0){let l=Math.min(...e.serials),a=Math.max(...e.serials),i=Math.max(1,a-l+(e.between?1:0)),s=(e.serials[t]??l)-l+(e.between?.5:0);return n+s/i*o}return e.between?n+(t+.5)/Math.max(1,e.count)*o:e.count<=1?n+o/2:n+t/(e.count-1)*o}function Ue(e,t){if(e.serials&&e.serials.length>1){let n=[...e.serials].sort((i,s)=>i-s),r=1/0;for(let i=1;i<n.length;i+=1){let s=n[i]-n[i-1];s>0&&(r=Math.min(r,s))}let o=n[0],l=n[n.length-1],a=Math.max(1,l-o+1);return Number.isFinite(r)?r/a*t:t/e.count}return t/Math.max(1,e.between?e.count:Math.max(1,e.count-1))}function Ve(e,t,n=!1){let r=t.grouping==="stacked"||t.grouping==="percentStacked";if(t.grouping==="percentStacked"&&t.kind!=="scatter"&&t.kind!=="bubble"){e.percent=!0;let o=!1;for(let l of t.series)for(let a of l.values)a!==null&&a<0&&(o=!0);e.dataMin=Math.min(e.dataMin,o?-1:0),e.dataMax=Math.max(e.dataMax,1);return}if(r&&t.kind!=="scatter"&&t.kind!=="bubble"){let o=Math.max(0,...t.series.map(l=>l.values.length));for(let l=0;l<o;l+=1){let a=0,i=0,s=0;for(let u of t.series){let d=u.values[l]??0;t.kind==="bar"?d>=0?a+=d:i+=d:(s+=d,a=Math.max(a,s),i=Math.min(i,s))}e.dataMin=Math.min(e.dataMin,i),e.dataMax=Math.max(e.dataMax,a)}return}for(let o of t.series){let l=n?o.xValues??o.values.map((a,i)=>i+1):o.values;for(let a of l)a===null||!Number.isFinite(a)||(e.dataMin=Math.min(e.dataMin,a),e.dataMax=Math.max(e.dataMax,a))}}function ze(e,t){let n=e.axis;return n&&!n.sourceLinked&&n.formatCode?n.formatCode:e.percent?"0%":t??n?.formatCode??null}function yn(e,t,n,r,o,l=!1){let a=e.dataMin>e.dataMax,i=a?0:e.dataMin,s=a?1:e.dataMax,u=e.axis,d=e.percent,f=ce(Math.max(Math.abs(i),Math.abs(s)),e.formatCode,o),h=Q(f,r);if(u?.logBase&&!d)return xn(i,s,u.logBase,u.min,u.max);let y=n?(l?zr:1.6)*r.sizePt:h+Vr*r.sizePt,b=Math.floor(t/y)+(d?1:0);return tt({dataMin:i,dataMax:s,lengthPt:Math.max(1,b)*y,minIntervalPt:y,fixedMin:u?.min??(d?i<0?-1:0:null),fixedMax:u?.max??(d?1:null),fixedMajor:u?.majorUnit??null,noHeadroom:l,roomOnly:l})}function kt(e,t,n,r,o){let l=pn(e,t);return o?r+(n-r)*l:n+(r-n)*l}var ke=he,Wr=16,Gr=128,bn={sizePt:10,bold:!1,italic:!1,underline:!1,colorHex:"000000",latin:"+mn-lt",eastAsian:"+mn-ea",complex:"+mn-cs"};function gn(e,t,n){let r=n?{...bn,themeFaces:n}:bn;return Ne(r,xt(e.txPr),t)}function ae(e,t,n,r={}){return Ne({...e,...r},xt(t),n)}function Ee(e,t,n,r,o){let l=P(e,"tx"),a=P(l,"rich");if(a){let s=[],u=0;for(let d of a.children){if(!ee(d)||d.ns!==ke||d.local!=="p")continue;if(s.length>=Wr)break;let f=J(d.children,{namespaceUri:ke,localName:"pPr"}),h=f?J(f.children,{namespaceUri:ke,localName:"defRPr"}):null,y=Ne(t,h,r),b=[];for(let x of d.children){if(!ee(x)||x.ns!==ke)continue;if(++u>Gr)break;if(x.local==="br"){s.push(b),b=[];continue}if(x.local!=="r"&&x.local!=="fld")continue;let g=J(x.children,{namespaceUri:ke,localName:"rPr"}),T=J(x.children,{namespaceUri:ke,localName:"t"}),A="";for(let M of T?.children??[])M.type==="text"&&(A+=M.value);x.local==="fld"&&o&&(A=o(Y(x.attrs,"type"),A)),b.push({text:A,style:Ne(y,g,r)})}s.push(b)}if(s.some(d=>d.some(f=>f.text.trim()!=="")))return s}let i=P(P(l,"strRef"),"strCache");if(i){let s=oe(i,"pt")[0],u="";for(let d of P(s,"v")?.children??[])d.type==="text"&&(u+=d.value);if(u.trim()!=="")return[[{text:u,style:t}]]}return n?[[{text:n,style:t}]]:[]}function Hr(e){let t=P(P(e,"layout"),"manualLayout"),n=i=>{let s=z(t,i),u=s!==void 0&&s.length<=32?Number(s):NaN;return Number.isFinite(u)&&Math.abs(u)<=10?u:null},r=n("x"),o=n("y");if(r===null&&o===null)return null;let l=z(t,"xMode")==="edge"&&r!==null,a=z(t,"yMode")==="edge"&&o!==null;return{x:r??0,y:o??0,xEdge:l,yEdge:a}}function Et(e,t){if(re(e,"delete",!1))return null;let n=P(e,"numFmt"),r=n?Y(n.attrs,"sourceLinked")==="1":!0,o=t?.separator??null,l=P(e,"separator");if(l){let a="";for(let i of l.children)i.type==="text"&&(a+=i.value);o=a.slice(0,16)}return{showValue:re(e,"showVal",t?.showValue??!1),showPercent:re(e,"showPercent",t?.showPercent??!1),showCategory:re(e,"showCatName",t?.showCategory??!1),showSeries:re(e,"showSerName",t?.showSeries??!1),separator:o,position:z(e,"dLblPos")??t?.position??null,formatCode:n&&!r?Y(n.attrs,"formatCode")??null:t?.formatCode??null,txPr:P(e,"txPr")??t?.txPr??null,spPr:P(e,"spPr")??t?.spPr??null,custom:null,moved:null}}function ge(e,t,n){let r=e.dLbls?Et(e.dLbls,null):null,o=t.dLbls?Et(t.dLbls,r):r,l=o;for(let s of oe(t.dLbls,"dLbl")){if(z(s,"idx")!==String(n))continue;let u=Et(s,o??r);l=u&&{...u,custom:P(s,"tx")?s:null,moved:Hr(s)};break}if(!l||!(l.showValue||l.showPercent||l.showCategory||l.showSeries)&&!l.custom)return null;let i=e.kind==="pie"||e.kind==="doughnut"||e.kind==="ofPie";return l.separator===null?{...l,separator:i?`
7
- `:", "}:l}function rt(e,t,n){switch(n){case"VALUE":return ce(t.value,e.formatCode??t.seriesFormat,t.date1904);case"PERCENTAGE":return t.percent===null?"":ce(t.percent,e.formatCode&&e.formatCode.includes("%")?e.formatCode:"0%",t.date1904);case"CATEGORYNAME":return t.category??"";case"SERIESNAME":return t.seriesName??"";case"CELLRANGE":return t.cell??"";default:return null}}function ot(e,t){let n=[];return e.showSeries&&t.seriesName&&n.push(t.seriesName),e.showCategory&&t.category&&n.push(t.category),e.showValue&&n.push(rt(e,t,"VALUE")),e.showPercent&&t.percent!==null&&n.push(rt(e,t,"PERCENTAGE")),n.join(e.separator??", ")}var lt=class{components=[];points=0;ok=!0;path(t,n,r,o,l){if(!this.ok||!r&&!o)return;for(let s of t)for(let u of s)if(!Number.isFinite(u.x*12700)||!Number.isFinite(u.y*12700)){this.ok=!1;return}if(o&&o.dash&&!n&&!r){this.dashed(t,o,l);return}let a=t.filter(s=>s.length>=2);if(a.length===0)return;for(let s of a)this.points+=s.length;if(this.points>2e5){this.ok=!1;return}let i=o?Math.max(0,o.widthPt):0;this.components.push({subpaths:a,closed:n,fill:n?r:null,stroke:o&&i>0?{...o,widthPt:i}:null,...l?{join:l}:{}})}rect(t,n,r,o,l,a){let i=Math.min(t,t+r),s=Math.min(n,n+o),u=Math.max(t,t+r),d=Math.max(n,n+o);this.path([[{x:i,y:s},{x:u,y:s},{x:u,y:d},{x:i,y:d}]],!0,l,a)}line(t,n,r){n&&this.path([t],!1,null,n,r)}dashed(t,n,r){let o=Math.max(n.widthPt,.5),l=n.cap!=="butt",a=n.dash.map((s,u)=>{let d=s*o;return l?u%2===0?Math.max(.01,d-o):d+o:Math.max(.1,d)}),i=[];for(let s of t){let u=0,d=a[0],f=!0,h=[s[0]];for(let y=1;y<s.length;y+=1){let b=s[y-1],x=s[y],g=Math.hypot(x.x-b.x,x.y-b.y);for(;g>0&&i.length<2e3;){let T=Math.min(d,g),A=T/g,M={x:b.x+(x.x-b.x)*A,y:b.y+(x.y-b.y)*A};f&&h.push(M),g-=T,d-=T,b=M,d<=1e-9&&(f&&h.length>=2&&i.push(h),f=!f,u=(u+1)%a.length,d=a[u],h=[M])}}f&&h.length>=2&&i.push(h)}i.length>0&&this.path(i,!1,null,{...n,dash:null},r)}};function Lt(e,t,n,r,o=24){let l=[];for(let a=0;a<o;a+=1){let i=a/o*Math.PI*2;l.push({x:e+n*Math.cos(i),y:t+r*Math.sin(i)})}return l}function Cn(e,t,n,r,o,l){let a=Math.max(0,l-o);if(!Number.isFinite(a)||a>360+1e-6)throw new RangeError("Chart slice exceeds the angular limit");let i=Math.min(180,Math.max(2,Math.ceil(a/2))),s=(d,f)=>{let h=f*Math.PI/180;return{x:e+d*Math.sin(h),y:t-d*Math.cos(h)}},u=[];for(let d=0;d<=i;d+=1)u.push(s(n,o+a*d/i));if(r>0)for(let d=i;d>=0;d-=1)u.push(s(r,o+a*d/i));else a<360&&u.push({x:e,y:t});return u}function vt(e,t=10){if(e.length<3)return[...e];let n=[e[0]];for(let r=0;r<e.length-1;r+=1){let o=e[Math.max(0,r-1)],l=e[r],a=e[r+1],i=e[Math.min(e.length-1,r+2)],s={x:l.x+(a.x-o.x)/6,y:l.y+(a.y-o.y)/6},u={x:a.x-(i.x-l.x)/6,y:a.y-(i.y-l.y)/6};for(let d=1;d<=t;d+=1){let f=d/t,h=1-f;n.push({x:h*h*h*l.x+3*h*h*f*s.x+3*h*f*f*u.x+f*f*f*a.x,y:h*h*h*l.y+3*h*h*f*s.y+3*h*f*f*u.y+f*f*f*a.y})}}return n}function Le(e,t,n,r){let o=r/2;switch(e){case"square":return[[{x:t-o,y:n-o},{x:t+o,y:n-o},{x:t+o,y:n+o},{x:t-o,y:n+o}]];case"diamond":return[[{x:t,y:n-o},{x:t+o,y:n},{x:t,y:n+o},{x:t-o,y:n}]];case"triangle":return[[{x:t,y:n-o},{x:t+o,y:n+o},{x:t-o,y:n+o}]];case"dash":return[[{x:t-o,y:n-r*.1},{x:t+o,y:n-r*.1},{x:t+o,y:n+r*.1},{x:t-o,y:n+r*.1}]];case"dot":return[[{x:t,y:n-r*.12},{x:t+r*.55,y:n-r*.12},{x:t+r*.55,y:n+r*.12},{x:t,y:n+r*.12}]];case"x":case"star":case"plus":return[];default:return[Lt(t,n,o,o,16)]}}function ve(e,t,n,r){let o=r/2,l=[[{x:t-o,y:n-o},{x:t+o,y:n+o}],[{x:t-o,y:n+o},{x:t+o,y:n-o}]],a=[[{x:t-o,y:n},{x:t+o,y:n}],[{x:t,y:n-o},{x:t,y:n+o}]];return e==="x"?l:e==="plus"?a:e==="star"?[...l,a[1]]:[]}var Ae=he,Xr=12700,jr=new Map([["dash",[4,3]],["dashDot",[4,3,1,3]],["dot",[1,3]],["lgDash",[8,3]],["lgDashDot",[8,3,1,3]],["lgDashDotDot",[8,3,1,3,1,3]],["sysDash",[3,1]],["sysDashDot",[3,1,1,1]],["sysDashDotDot",[3,1,1,1,1,1]],["sysDot",[1,1]]]);function Kr(e,t){let n=J(e.children,{namespaceUri:Ae,localName:"gsLst"}),r=0,o=0,l=0,a=0,i=0;for(let u of n?.children??[]){if(!ee(u)||u.local!=="gs"||i>=16)continue;let d=u.children.find(ee),f=d?xe(d,t):null;f&&(r+=Number.parseInt(f.hex.slice(0,2),16),o+=Number.parseInt(f.hex.slice(2,4),16),l+=Number.parseInt(f.hex.slice(4,6),16),a+=f.alpha,i+=1)}return i===0?null:{hex:[r,o,l].map(u=>Math.round(u/i).toString(16).padStart(2,"0")).join("").toUpperCase(),alpha:a/i}}function Mn(e,t){let n=Gt(e,t);if(!n.present)return;if(n.color)return n.color;let r=J(e.children,{namespaceUri:Ae,localName:"gradFill"});if(r)return Kr(r,t);let o=J(e.children,{namespaceUri:Ae,localName:"pattFill"});if(o){let a=J(o.children,{namespaceUri:Ae,localName:"fgClr"})?.children.find(ee);return a?xe(a,t):null}return null}function ne(e,t){if(!e)return{fill:void 0,line:void 0};let n=Mn(e,t),r=J(e.children,{namespaceUri:Ae,localName:"ln"});if(!r)return{fill:n,line:void 0};let o=Mn(r,t),l=Wt(Y(r.attrs,"w")),a=Y(r.attrs,"cap"),i=J(r.children,{namespaceUri:Ae,localName:"prstDash"}),s=i?Y(i.attrs,"val"):void 0;return o===null?{fill:n,line:null}:{fill:n,line:o===void 0&&l===null&&s===void 0?void 0:{hex:o?.hex??"",alpha:o?.alpha??1,widthPt:l!==null?l/Xr:.75,cap:a==="rnd"?"round":a==="sq"?"square":"butt",dash:s?jr.get(s)??null:null}}}function ue(e,t){return e===null?null:e===void 0?t:e.hex!==""?e:t?{...e,hex:t.hex,alpha:t.alpha}:null}var Pn=[[],[["lumMod",6e4],["lumOff",4e4]],[["lumMod",6e4]],[["lumMod",8e4],["lumOff",2e4]],[["lumMod",8e4]],[["lumMod",5e4]],[["lumMod",7e4],["lumOff",3e4]],[["lumMod",7e4]],[["lumMod",5e4],["lumOff",5e4]]];function at(e,t,n){let r=mt("schemeClr",{val:e},t.map(([o,l])=>mt(o,{val:String(l)})));return xe(r,n)}function Sn(e,t,n,r){let o=(e-1)%8|0,l;if(o===1){let a=t%6+1,i=Pn[Math.floor(t/6)%Pn.length];l=at(`accent${a}`,i,r)}else{let a=o===0?"tx1":`accent${o-1}`,i=n>1?t/(n-1):.5,s=Math.round((n>1?.6+i*.8:1)*1e5),u=o===0?[["lumMod",Math.round((.2+i*.6)*1e5)],["lumOff",Math.round((.35+i*.4)*1e5)]]:s<=1e5?[["shade",s]]:[["tint",2e5-s]];l=at(a,u,r)}return l??{hex:"4472C4",alpha:1}}var kn=["diamond","square","triangle","x","star","circle","plus","dot","dash"];function it(e){return e.kind==="line"||e.kind==="scatter"||e.kind==="radar"&&e.radarStyle!=="filled"}function Ce(e){return e.varyColors&&e.series.length===1&&(e.kind==="pie"||e.kind==="doughnut"||e.kind==="bar"||e.kind==="ofPie")}function Yr(e,t,n,r,o){if(!it(e))return null;let l=t.marker,a=e.kind==="scatter"&&(e.scatterStyle==="line"||e.scatterStyle==="smooth");if(l?.symbol==="none")return null;let i=e.kind==="line"?e.markers:e.kind==="radar"?e.radarStyle==="marker":!a;if(!l?.symbol&&!i)return null;let s=l?.symbol??kn[o%kn.length],u=ne(l?.spPr??null,r.colors),d=u.fill===void 0?n:u.fill,f=ue(u.line,{...n,widthPt:.75,cap:"round",dash:null});return{symbol:s,size:l?.size??(l?.symbol?5:7),fill:d,line:f}}function de(e,t,n,r){let o=r!==void 0&&Ce(e),l=o?r.index:t.index,a=o?r.count:n.seriesCount,i=Sn(n.model.style,l,a,n.colors),s=ne(t.spPr,n.colors),u=r?t.points.get(r.index):void 0,d=u?ne(P(u,"spPr"),n.colors):{fill:void 0,line:void 0},f=o?void 0:s.fill,h=it(e),y=h?{...i,widthPt:2.25,cap:"round",dash:null}:null,b=h?null:d.fill!==void 0?d.fill:f!==void 0?f:i,x=ue(d.line!==void 0?d.line:s.line,y??(b?{...b,widthPt:.75,cap:"butt",dash:null}:null)),g=h||d.line!==void 0||s.line!==void 0?x:null,T=(h?g??null:b)??i;return{fill:b,line:g,marker:Yr(e,t,{hex:T.hex,alpha:T.alpha},n,l)}}var Zr=he,Jr=12700,Qr=.2,qr=3,eo=16;function Ln(e,t){for(let n of[P(P(e.custom,"tx"),"rich"),e.txPr]){let r=n?J(n.children,{namespaceUri:Zr,localName:"bodyPr"}):null,o=r?Y(r.attrs,t):void 0;if(o!==void 0)return o}}function En(e,t){let n=Ln(e,t);return n!==void 0&&/^\d{1,8}$/.test(n)?Number(n)/Jr:qr}function to(e,t){return t===null||!(t>0)||Ln(e,"wrap")==="none"?null:t*Qr-En(e,"lIns")-En(e,"rIns")}function no(e){let t=[];for(let n of e){let r=[];for(let o of n)for(let[l,a]of o.text.split(/\r\n|\r|\n/).entries())l>0&&(t.push(r),r=[]),a!==""&&r.push({text:a,style:o.style});t.push(r)}return t.slice(0,eo)}function ro(e,t){let n=[];for(let s of e)for(let u of s.text.match(/\S+|\s+/g)??[]){let d=Q(u,s.style);/^\s/.test(u)?n.length>0&&(n[n.length-1].space+=d):n.push({width:d,space:0})}if(n.length===0)return{count:1,widest:0,word:0};let r=1,o=0,l=0,a=0,i=0;for(let s of n)i=Math.max(i,s.width),l>0&&t!==null&&l+a+s.width>t?(o=Math.max(o,l),r+=1,l=s.width):l+=a+s.width,a=s.space;return{count:r,widest:Math.max(o,l),word:i}}function we(e,t,n,r,o){let l=ot(e,t),a=e.custom?Ee(e.custom,n,l,o,(y,b)=>rt(e,t,y)??b):[[{text:l,style:n}]],i=to(e,r),s=0,u=0,d=!1,f=0;for(let y of no(a)){let b=ro(y,i);s=Math.max(s,b.widest),f=Math.max(f,b.word),d||=b.count>1;let x=Math.max(q(n),...y.map(g=>q(g.style)));u+=b.count*x}let h=i!==null&&d?Math.max(i,f):s*1.3+n.sizePt*2;return{paragraphs:a,width:s,height:u,frame:h}}function st(e,t,n,r,o,l){if(!e||!t)return{x:n,y:r,moved:!1};let a=t.r-t.l,i=t.b-t.t;return{x:e.xEdge?t.l+e.x*a+o/2:n+e.x*a,y:e.yEdge?t.t+e.y*i+l/2:r+e.y*i,moved:!0}}var oo={hex:"FFFFFF",alpha:1};function wn(e,t,n,r,o,l){let{scene:a}=o,i=o.look,s=r.categories?.count??0,u=e.grouping==="percentStacked",d=e.grouping==="stacked"||u,f=[];if(u)for(let x=0;x<s;x+=1){let g=0;for(let T of e.series)g+=Math.abs(T.values[x]??0);f.push(g||1)}let h=(x,g)=>u?x/f[g]:x,y=(x,g)=>r.horizontal?{x:r.valueAt(t,g),y:r.categoryAt(x)}:{x:r.categoryAt(x),y:r.valueAt(t,g)},b=(x,g,T,A,M)=>{let S=ge(e,x,g);if(!S)return;let w=ae(o.baseText,S.txPr,i.colors),O=r.categories?.labels[g]??null,L={value:T,percent:u?T/f[g]:null,category:O,seriesName:x.name,seriesFormat:x.formatCode,date1904:o.model.date1904,cell:x.labelRange?.[g]??null};if(!S.custom&&ot(S,L)==="")return;let _=we(S,L,w,o.chartWidth,i.colors),k=_.width,$=_.height,G=_.frame,E=.48*w.sizePt,N=A.x,D=A.y;if(M.kind==="bar"){let C=S.position??(d?"ctr":"outEnd"),{start:m,end:v}=M,I=Math.sign(v.x-m.x)||1,p=Math.sign(v.y-m.y)||-1;if(C==="ctr")N=(m.x+v.x)/2,D=(m.y+v.y)/2;else if(r.horizontal)N=C==="inBase"?m.x+I*(E+k/2):C==="inEnd"?v.x-I*(E+k/2):v.x+I*(E+k/2),D=v.y;else{let R=C==="inBase"?m.y+p*(E+$/2):C==="inEnd"?v.y-p*(E+$/2):v.y+p*(E+$/2);N=v.x,D=R}}else{let C=S.position??(e.kind==="area"?"ctr":"r"),m=M.markerHalf+E;C==="r"?N=A.x+m+k/2:C==="l"?N=A.x-m-k/2:C==="t"?D=A.y-m-$/2:C==="b"&&(D=A.y+m+$/2)}let V={l:0,t:0,r:o.chartWidth,b:o.chartHeight},c=st(S.moved,V,N,D,k,$);l.push({paragraphs:_.paragraphs,align:"ctr",x:c.x-G/2,y:c.y-$/2,width:G,height:$,rotation:0})};if(e.kind==="bar"&&r.categories){let x=r.horizontal?r.plot.b-r.plot.t:r.plot.r-r.plot.l,g=Ue(r.categories,x),T=e.gapWidth/100,A=d?1:e.series.length,M=d?1:e.overlap/100,S=g/(A-(A-1)*M+T),w=[],O=[];for(let[L,_]of e.series.entries()){let k=Ce(e),$=de(e,_,i),G=[];for(let E=0;E<Math.min(s,_.values.length);E+=1){let N=_.values[E];if(N==null)continue;let D=h(N,E),V=n,c=D;if(d){let Z=D>=0?w:O;V=Z[E]??0,c=V+D,Z[E]=c}let C=r.categoryAt(E),m=-g/2+T*S/2+(d?0:L*S*(1-M)),v=r.horizontal?C-m:C+m,I=r.horizontal?v-S:v+S,p=r.valueAt(t,V),R=r.valueAt(t,c),F=k||_.points.has(E)?de(e,_,i,{index:E,count:_.values.length}):$,W=_.invertIfNegative&&D<0?oo:F.fill;r.horizontal?(a.rect(Math.min(p,R),Math.min(v,I),Math.abs(R-p),S,W,F.line),G.push({index:E,start:{x:p,y:(v+I)/2},end:{x:R,y:(v+I)/2},value:N})):(a.rect(Math.min(v,I),Math.min(p,R),S,Math.abs(R-p),W,F.line),G.push({index:E,start:{x:(v+I)/2,y:p},end:{x:(v+I)/2,y:R},value:N}))}for(let E of G)b(_,E.index,E.value,E.end,{kind:"bar",start:E.start,end:E.end})}return}if((e.kind==="line"||e.kind==="area")&&r.categories){let x=[],g=null;for(let T of e.series){let A=de(e,T,i),M=[],S=[];for(let w=0;w<s;w+=1){let O=T.values[w]??null;if(O===null&&(o.blanks==="zero"||e.kind==="area"||d)&&(O=0),O===null){M.push(null),S.push(0);continue}let L=h(O,w);d&&(L+=x[w]??0,x[w]=L),S.push(O),M.push(y(w,L))}if(e.kind==="area"){let w=M.filter(L=>L!==null),O=g??w.map(L=>r.horizontal?{x:r.valueAt(t,n),y:L.y}:{x:L.x,y:r.valueAt(t,n)});w.length>=2&&a.path([[...w,...[...O].reverse()]],!0,A.fill,A.line),d&&(g=w)}else{let w=[],O=[];for(let L of M){if(L===null){o.blanks!=="span"&&(O.length&&w.push(O),O=[]);continue}O.push(L)}if(O.length&&w.push(O),A.line)for(let L of w)a.line(T.smooth?vt(L):L,A.line,"round");vn(M,A.marker,a)}for(let[w,O]of M.entries())O&&b(T,w,S[w],O,{kind:"point",markerHalf:A.marker?A.marker.size/2:0})}e.kind==="line"&&io(e,t,r,o);return}if(e.kind==="scatter"&&r.xInfo?.scale)for(let x of e.series){let g=de(e,x,i),T=[];for(let S=0;S<x.values.length;S+=1){let w=x.values[S],O=x.xValues?x.xValues[S]:S+1;if(w==null||O===null||O===void 0){T.push(null);continue}T.push({x:r.valueAt(r.xInfo,O),y:r.valueAt(t,w)})}let A=T.filter(S=>S!==null);if(g.line!==null&&e.scatterStyle!=="marker"&&e.scatterStyle!=="none"&&A.length>=2){let S=x.smooth||e.scatterStyle==="smooth"||e.scatterStyle==="smoothMarker";a.line(S?vt(A):A,g.line,"round")}vn(T,g.marker,a);for(let[S,w]of T.entries())w&&b(x,S,x.values[S],w,{kind:"point",markerHalf:g.marker?g.marker.size/2:0})}}function vn(e,t,n){if(!t)return;let r=t.size*.96,o=[],l=[];for(let a of e)if(a){for(let i of Le(t.symbol,a.x,a.y,r))o.push(i);for(let i of ve(t.symbol,a.x,a.y,r))l.push(i)}o.length>0&&n.path(o,!0,t.fill,t.line),l.length>0&&n.path(l,!1,null,t.line)}var An={hex:"000000",alpha:1,widthPt:.75,cap:"butt",dash:null},lo={hex:"FFFFFF",alpha:1},ao={hex:"000000",alpha:1};function io(e,t,n,r){let o=n.categories;if(!o||e.series.length<2)return;let l=r.look.colors,a=(s,u)=>n.horizontal?{x:n.valueAt(t,u),y:n.categoryAt(s)}:{x:n.categoryAt(s),y:n.valueAt(t,u)};if(e.hiLowLines){let s=ue(ne(P(e.hiLowLines,"spPr"),l).line,An),u=[];for(let d=0;d<o.count;d+=1){let f=e.series.map(h=>h.values[d]).filter(h=>h!=null);f.length<2||u.push([a(d,Math.min(...f)),a(d,Math.max(...f))])}s&&u.length>0&&r.scene.path(u,!1,null,s)}let i=e.upDownBars;if(i){let s=(Number(z(i,"gapWidth")??150)||150)/100,d=Ue(o,n.horizontal?n.plot.b-n.plot.t:n.plot.r-n.plot.l)/(1+s),f=(g,T)=>{let A=ne(P(P(i,g),"spPr"),l);return{fill:A.fill===void 0?T:A.fill,line:ue(A.line,An)}},h=f("upBars",lo),y=f("downBars",ao),b=e.series[0],x=e.series[e.series.length-1];for(let g=0;g<o.count;g+=1){let T=b.values[g],A=x.values[g];if(T==null||A===null||A===void 0)continue;let M=a(g,T),S=a(g,A),w=A>=T?h:y;n.horizontal?r.scene.rect(Math.min(M.x,S.x),M.y-d/2,Math.abs(S.x-M.x),d,w.fill,w.line):r.scene.rect(M.x-d/2,Math.min(M.y,S.y),d,Math.abs(S.y-M.y),w.fill,w.line)}}}var so=4096,uo=3.1,co=2.3,Tt=5e3,$e=.08,Tn=.91,Te=.64,At=4.5,fo=7,On={hex:"000000",alpha:1,widthPt:.5,cap:"butt",dash:null};function le(e){return e==="l"||e==="r"}function ho(e,t){if(!e)return null;let n=ne(e.spPr,t.look.colors);return ue(n.line,On)}function mo(e,t){if(!e)return null;let n=ne(P(e,"spPr"),t.look.colors);return ue(n.line,On)}function wt(e,t){let n=e.value;return n.scale?n.scale.ticks.map(r=>ce(Math.abs(r)<n.scale.major*1e-9?0:r,n.formatCode,t.date1904)):[]}function Rn(e,t){let n=0;for(let r of e)n=Math.max(n,Q(r,t));return n}function _n(e,t,n){let r=Q(" ",t),o=1,l=0;for(let a of e.split(/\s+/).slice(0,256)){let i=Q(a,t);l>0&&l+r+i>n?(o+=1,l=i):l+=(l>0?r:0)+i}return o}function Dn(e,t,n){let{model:r}=n,o=c=>c.kind==="scatter"||c.kind==="bubble",l=e.filter(o),a=e.filter(c=>!o(c));if(l.length>0&&a.length>0)return!1;let i=a.some(c=>c.kind==="bar"&&c.horizontal);if(i&&a.some(c=>c.kind!=="bar"||!c.horizontal))return!1;let s=n.look.colors,u=new Map,d=c=>{let C=c?.id??"",m=u.get(C);return m||(m={axis:c,id:C,dataMin:1/0,dataMax:-1/0,percent:!1,scale:null,formatCode:null},u.set(C,m)),m},f=new Map,h=null;for(let c of e){let C=d(be(r,c,"value"));if(Ve(C,c),C.formatCode??=c.series.find(m=>m.formatCode)?.formatCode??null,f.set(c,C),o(c)){let m=be(r,c,"x");h??={axis:m,id:`x:${m?.id??""}`,dataMin:1/0,dataMax:-1/0,percent:!1,scale:null,formatCode:null},Ve(h,c,!0)}}for(let c of u.values())c.formatCode=ze(c,c.formatCode);h&&(h.formatCode=ze(h,null));let y=a.length>0?nt(r,a,so):null,b=[],x=c=>ae(n.baseText,c?.txPr??null,s),g=c=>c!==null&&!c.deleted,T=c=>g(c)&&c.tickLabelPosition!=="none";if(y){let c=y.axis;b.push({axis:c,role:"category",side:i?c?.position==="r"?"r":"l":c?.position==="t"?"t":"b",style:x(c),labelled:T(c),value:null,title:null})}else h&&b.push({axis:h.axis,role:"x",side:h.axis?.position==="t"?"t":"b",style:x(h.axis),labelled:T(h.axis),value:h,title:null});let A=!0;for(let c of u.values()){let C=c.axis,m=i?A?"b":"t":A?"l":"r",v=C?.position??m;b.push({axis:C,role:"value",side:i?v==="t"?"t":"b":v==="r"?"r":"l",style:x(C),labelled:T(C),value:c,title:null}),A=!1}for(let c of b){if(!g(c.axis)||!c.axis.title)continue;let C=ae(n.baseText,P(c.axis.title,"txPr"),s,{bold:!0}),m=Ee(c.axis.title,C,"Axis Title",s);if(m.length===0)continue;let v=P(P(c.axis.title,"tx"),"rich");c.title={paragraphs:m,style:C,rotation:Oe(v??P(c.axis.title,"txPr"))}}let M=b.find(c=>c.role==="category")??null,S=r.plotLayout,w=b.find(c=>c.role==="value")??null,O=()=>{if(S&&S.inner){let p=n.chartWidth,R=n.chartHeight;return{plot:{l:S.x*p,t:S.y*R,r:(S.x+S.w)*p,b:(S.y+S.h)*R},categoryRotation:0,categorySkip:1,categoryWrap:0}}let c=S&&!S.inner?{l:S.x*n.chartWidth,t:S.y*n.chartHeight,r:(S.x+S.w)*n.chartWidth,b:(S.y+S.h)*n.chartHeight}:{...t};for(let p of b){if(!p.title)continue;let R=Fe(p.title.paragraphs,p.title.style)+9;p.side==="l"?c.l+=R:p.side==="r"?c.r-=R:p.side==="t"?c.t+=R:c.b-=R}for(let p of b){if(!p.labelled||!le(p.side))continue;let R=p.value?wt(p,r):y?.labels??[],F=p.value?ce(p.value.dataMax>-1/0?p.value.dataMax:1,p.value.formatCode,r.date1904):"",W=Rn(R.length?R:[F],p.style)+Tn*p.style.sizePt-At;p.side==="l"?c.l+=W:c.r-=W}let C=0;for(let p of b){if(!p.labelled||!p.value||!le(p.side))continue;let R=q(p.style)/2+$e*p.style.sizePt;C=Math.max(C,R-fo)}c.t+=C;let m=0,v=1,I=0;for(let p of b){if(!p.labelled||le(p.side))continue;let R=p.style.sizePt,F=q(p.style)+Te*R-At;if(p.role==="category"&&y){let W=Ue(y,c.r-c.l),Z=Rn(y.labels,p.style),H=Oe(p.axis?.txPr??null),te=y.labels.every(B=>B.split(/\s+/).slice(0,256).every(X=>Q(X,p.style)<=W*.98));if(H!==null&&H!==0?m=H:Z>W*.98&&y.count>1&&(te?I=W:m=-45),I>0){let B=Math.max(...y.labels.map(X=>_n(X,p.style,I)));F+=(B-1)*q(p.style)}if(m!==0){let B=Math.abs(m)*Math.PI/180;F=Z*Math.sin(B)+q(p.style)*Math.cos(B)+Te*R-At;let X=q(p.style)/Math.sin(B);v=Math.max(1,Math.ceil(X/Math.max(W,1e-6)))}p.axis?.tickLabelSkip&&(v=p.axis.tickLabelSkip),w?.value?.scale&&In(p,w.value.scale)&&(F=0)}p.side==="t"?c.t+=F:c.b-=F}for(let p of b){if(!p.labelled||le(p.side)||!p.value)continue;let R=wt(p,r);R.length>0&&(c.r-=Q(R[R.length-1],p.style)/2)}return{plot:c,categoryRotation:m,categorySkip:v,categoryWrap:I}},L=c=>{for(let C of b){if(!C.value)continue;let m=le(C.side)?c.b-c.t:c.r-c.l;C.value.scale=yn(C.value,Math.max(1,m),le(C.side),C.style,r.date1904)}},_=O();L(_.plot),_=O(),L(_.plot);let k=_.plot;if(!(k.r-k.l>1)||!(k.b-k.t>1))return!0;let $=M?.axis?.reversed??!1,G=c=>y?i?$?Be(y,c,k.t,k.b):Be(y,c,k.b,k.t):$?Be(y,c,k.r,k.l):Be(y,c,k.l,k.r):0,E=(c,C)=>{let m=c.scale,v=c.axis?.reversed??!1;return i||c===h?kt(m,C,k.l,k.r,v):kt(m,C,k.b,k.t,v)},N=(c,C)=>{let m=C?.crosses??"autoZero";if(m==="min")return c.min;if(m==="max")return c.max;let v=typeof m=="number"?m:0;return Math.min(c.max,Math.max(c.min,v))},D=ne(r.plotSpPr,s);n.scene.rect(k.l,k.t,k.r-k.l,k.b-k.t,D.fill??null,D.line??null);for(let c of b)if(!(!c.axis||c.axis.deleted&&!c.axis.majorGridlines))for(let[C,m]of[[c.axis.minorGridlines,!0],[c.axis.majorGridlines,!1]]){let v=mo(C,n);if(!v)continue;let I=[];if(c.value?.scale){let p=c.value.scale;for(let R of po(p,m,Nn(p,c.axis))){let F=E(c.value,R);I.push(le(c.side)?[{x:k.l,y:F},{x:k.r,y:F}]:[{x:F,y:k.t},{x:F,y:k.b}])}}else if(y&&!m){let p=y.between?y.count+1:y.count;for(let R=0;R<p;R+=1){let F=y.between?G(R)-(G(1)-G(0))/2:G(R);I.push(le(c.side)?[{x:k.l,y:F},{x:k.r,y:F}]:[{x:F,y:k.t},{x:F,y:k.b}])}}I.length>0&&n.scene.path(I,!1,null,v)}let V=[];for(let c of e){let C=f.get(c);if(!C.scale)continue;let m=N(C.scale,M?.axis??null);wn(c,C,m,{categoryAt:G,valueAt:E,categories:y,horizontal:i,xInfo:h,plot:k},n,V)}for(let c of b){if(!g(c.axis))continue;let C=ho(c.axis,n);if(!C)continue;let m;if(c.role==="category"||c.role==="x"){let B=w?.value;m=B?.scale?E(B,N(B.scale,c.axis)):le(c.side)?k.l:k.b}else{let X=c.axis.crosses==="max";m=le(c.side)?c.side==="r"||X?k.r:k.l:c.side==="t"||X?k.t:k.b,h?.scale&&c.value!==h&&!i&&(m=E(h,N(h.scale,c.axis)))}let v=le(c.side)?[{x:m,y:k.t},{x:m,y:k.b}]:[{x:k.l,y:m},{x:k.r,y:m}];n.scene.line(v,C);let I=c.axis.majorTickMark,p=c.side==="l"||c.side==="t"?-1:1,R=[];if(c.value?.scale)for(let B of c.value.scale.ticks)R.push(E(c.value,B));else if(y){let B=y.between?y.count+1:y.count;for(let X=0;X<B;X+=1)R.push(y.between?G(X)-(G(1)-G(0))/2:G(X))}let F=(B,X)=>ie=>{let fe=B==="cross"?-X:0,se=B==="in"?-X:X;return le(c.side)?[{x:m+p*fe,y:ie},{x:m+p*se,y:ie}]:[{x:ie,y:m+p*fe},{x:ie,y:m+p*se}]},W=c.axis.minorTickMark,Z=[],H=c.value?.scale,te=H?Nn(H,c.axis):0;if(W!=="none"&&H&&H.logBase===void 0&&te>0){let B=Math.min(Tt,Math.floor((H.max-H.min)/te+1e-9));for(let X=0;X<=B;X+=1)Z.push(E(c.value,H.min+X*te))}else if(W!=="none"&&!H&&y?.between)for(let B=0;B<Math.min(y.count,Tt);B+=1)Z.push(G(B));Z.length>0&&n.scene.path(Z.map(F(W,co)),!1,null,C),!(I==="none"||R.length===0)&&n.scene.path(R.map(F(I,uo)),!1,null,C)}for(let c of V)n.labels.push(c);for(let c of b){if(!c.labelled)continue;let C=c.style.sizePt,m=q(c.style),v=Tn*C;if(c.value?.scale){let p=wt(c,r);for(let[R,F]of c.value.scale.ticks.entries()){let W=p[R],H=Q(W,c.style)*1.3+C*2,te=E(c.value,F);if(le(c.side)){let B=c.side==="l";n.labels.push({paragraphs:[[{text:W,style:c.style}]],align:B?"r":"l",x:B?k.l-v-H:k.r+v,y:te-m/2-$e*C,width:H,height:m,rotation:0})}else{let B=c.side==="b"?k.b+Te*C:k.t-Te*C-m;n.labels.push({paragraphs:[[{text:W,style:c.style}]],align:"ctr",x:te-H/2,y:B,width:H,height:m,rotation:0})}}continue}if(!y)continue;let I=w?.value?.scale&&In(c,w.value.scale)?E(w.value,N(w.value.scale,c.axis)):null;for(let p=0;p<y.count;p+=_.categorySkip){let R=y.labels[p];if(R==="")continue;let W=Q(R,c.style)*1.3+C*2,Z=G(p);if(le(c.side)){let fe=I??(c.side==="l"?k.l:k.r),se=c.side==="l";n.labels.push({paragraphs:[[{text:R,style:c.style}]],align:se?"r":"l",x:se?fe-v-W:fe+v,y:Z-m/2-$e*C,width:W,height:m,rotation:0});continue}let H=I??(c.side==="b"?k.b:k.t),te=c.side==="b"?H+Te*C:H-Te*C-m;if(_.categoryRotation!==0){let fe=_.categoryRotation*Math.PI/180,se=W/2,Pe=Z,He=te+m/2,Xe=Pe-se*Math.cos(fe),_e=He-se*Math.sin(fe);n.labels.push({paragraphs:[[{text:R,style:c.style}]],align:"r",x:Xe-se,y:_e-m/2,width:W,height:m,rotation:_.categoryRotation});continue}let B=_.categoryWrap,X=B>0?_n(R,c.style,B):1,ie=B>0?B:W;n.labels.push({paragraphs:[[{text:R,style:c.style}]],align:"ctr",x:Z-ie/2,y:c.side==="b"?te:te-(X-1)*m,width:ie,height:m*X,rotation:0})}}for(let c of b){if(!c.title)continue;let C=c.title.style,m=Fe(c.title.paragraphs,C),I=Ke(c.title.paragraphs)*1.3+C.sizePt*2;if(le(c.side)){let p=c.title.rotation??-90,R=c.side==="l"?t.l+1.5+m/2:t.r-1.5-m/2,F=(k.t+k.b)/2,W=Math.abs(Math.abs(p)-90)<1;n.labels.push({paragraphs:c.title.paragraphs,align:"ctr",x:R-I/2,y:F-m/2,width:I,height:m,rotation:p})}else{let p=c.side==="b"?t.b-1.4-m:t.t+1.5;n.labels.push({paragraphs:c.title.paragraphs,align:"ctr",x:(k.l+k.r)/2-I/2,y:p,width:I,height:m,rotation:c.title.rotation??0})}}return!0}function In(e,t){return e.role!=="category"||e.axis?.tickLabelPosition!=="nextTo"||e.axis.crosses!=="autoZero"?!1:t.min<0&&t.max>0}function Nn(e,t){let n=t.minorUnit;return n!==null&&n>0&&(e.max-e.min)/n<=Tt?n:e.major>0?e.major/5:0}function po(e,t,n){let r=[];if(e.logBase!==void 0){if(!t)return[...e.ticks];let l=Math.min(Math.floor(e.logBase),100);for(let a of e.ticks)for(let i=2;i<l&&r.length<1e3;i+=1)a*i<e.max&&r.push(a*i);return r}let o=t?n:e.major;if(!(o>0))return r;for(let l=0,a=e.min;a<=e.max+o*1e-9&&l<1e3;l+=1,a=e.min+l*o)r.push(a);return r}var Fn=256;function Un(e,t,n){let r=[],o=t.position==="l"||t.position==="r"||t.position==="tr";for(let l of e.plots){let a=[],i=it(l),s=e.plots.length===1&&l.series.length===1,u=Ce(l);if(u||s&&l.series[0].points.size>0&&!i){let d=l.series[0],f=d.values.length;for(let h=0;h<f&&h<Fn;h+=1){let y=et(d,h,e.date1904)??String(h+1),b=u||d.points.has(h)?{index:h,count:f}:void 0;a.push({text:y,look:de(l,d,n,b),line:i,point:!0})}}else{for(let d of l.series){if(a.length>=Fn)break;a.push({text:d.name??`Series${d.index+1}`,look:de(l,d,n),line:i,round:l.kind==="bubble"})}xo(l,o)&&a.reverse()}for(let d of a)r.push(d)}return r.filter((l,a)=>!t.deleted.has(a))}function xo(e,t){let n=e.grouping==="stacked"||e.grouping==="percentStacked";return e.kind==="bar"&&e.horizontal?e.grouping==="clustered":t?n&&(e.kind==="bar"||e.kind==="area"||e.kind==="line"):!1}function We(e,t){if(e.line&&e.look.line){let l=6.43+.386*t;return{key:Bn,text:Bn+2.03,after:l,shift:1.76,gap:15.66}}let n=.55*t,r=n+Math.max(0,.275*t-.4),o=(e.point?1.615:1.65)*t-r;return{key:n,text:r,after:o,shift:.55+.138*t,gap:13.25+n/2}}var Bn=19.2,yo=5.85,Rt=.27;function bo(e){return 9+.6045*e}function go(e){return 14.2+.59*e}var Me=11,Co=16.5;function Vn(e,t,n,r,o,l){let a=n.sizePt,i=q(n),s={...l},u=[],d=yt(n);if(t.length===0)return{layout:{items:u},plot:s};let f=e.layout;if(e.position==="b"||e.position==="t"){let L=r-20,_=[[]],k=0;for(let c of t){let C=We(c,a),m=C.text+Q(c.text,n),v=_[_.length-1],I=v.length>0?v[v.length-1].after:0;k+I+m>L&&v.length>0?(_.push([]),k=0):k+=I,k+=m,_[_.length-1].push({entry:c,width:m,after:C.after})}let $=1.84*a,G=bo(a),E=e.position==="b"?o-G-(_.length-1)*$:l.t-Me+G,N=We(t[0],a).shift,D=E+(_.length-1)*$,V=f?f.y*o:null;for(let[c,C]of _.entries()){let m=C.reduce((p,R,F)=>p+R.width+(F>0?C[F-1].after:0),0),v=f?f.x*r:r/2+N-m/2,I=V===null?E+c*$+Rt*a:V+c*$+d;for(let p of C)u.push({entry:p.entry,x:v,baseline:I}),v+=p.width+p.after}if(!e.overlay&&!f){let c=go(a);e.position==="b"?s.b=Math.min(s.b,E-c):s.t=Math.max(s.t,D+c)}return{layout:{items:u},plot:s}}let h=i+yo,y=Math.max(...t.map(L=>Q(L.text,n))),b=Math.max(...t.map(L=>We(L,a).text)),x=f&&f.h>0?f.h*o:o-20,g=Math.max(1,Math.floor((x-i)/h)+1),T=t.slice(0,g),A=i+(T.length-1)*h,M=f?f.x*r:e.position==="l"?10.7:r-10-y-b,S=(l.t+o-Me)/2,w=f?f.y*o+Math.max(0,(x-A)/2):e.position==="tr"?l.t:S-A/2,O=!f&&e.position!=="tr";for(let[L,_]of T.entries()){let k=O?S+(L-(T.length-1)/2)*h+Rt*a:w+L*h+d;u.push({entry:_,x:M,baseline:k})}if(!e.overlay&&!f)if(e.position==="l")s.l=Math.max(s.l,M+b+y+Co);else{let L=Math.max(...t.map(_=>We(_,a).gap));s.r=Math.min(s.r,M-L)}return{layout:{items:u},plot:s}}function zn(e,t,n,r){let o=t.sizePt,l=q(t);for(let a of e.items){let{entry:i}=a,s=We(i,o),u=a.baseline-Rt*o;if(i.line){i.look.line&&n.line([{x:a.x,y:u},{x:a.x+s.key,y:u}],i.look.line,"round");let h=i.look.marker;if(h){let y=a.x+s.key/2;n.path(Le(h.symbol,y,u,h.size*.96),!0,h.fill,h.line);for(let b of ve(h.symbol,y,u,h.size*.96))n.line(b,h.line)}}else if(i.round){let h=s.key/2;n.path([Lt(a.x+h,u,h,h)],!0,i.look.fill,i.look.line)}else{let h=s.key/2;n.rect(a.x,u-h,s.key,s.key,i.look.fill,i.look.line)}let d=a.x+s.text,f=Q(i.text,t);r.push({paragraphs:[[{text:i.text,style:t}]],align:"l",x:d,y:a.baseline-yt(t),width:f*1.3+o*2,height:l,rotation:0})}}function Mo(e,t,n){let r=e.series[t],o=r.points.get(n),l=o?z(o,"explosion"):void 0,a=l!==void 0&&/^\d{1,3}$/.test(l)?Number(l):NaN;return a>=0&&a<=400?a:r.explosion}var $n=.85,Wn=.5,Gn=.16,Po=.75;function So(e){return e*ko+Eo}var ko=.123,Eo=3.5,ut=10,Hn={hex:"A6A6A6",alpha:1,widthPt:.75,cap:"butt",dash:null};function Lo(e,t){let r=P(e,"leaderLines");if(!r)for(let l of oe(P(e,"extLst"),"ext"))for(let a of l.children)ee(a)&&a.local==="leaderLines"&&(r=a);let o=ne(P(r,"spPr"),t.look.colors);return ue(o.line,Hn)??Hn}function vo(e,t,n){return((e-t)%360+360)%360<=n}function Ao(e,t,n,r,o){if(o.sweep>=359.9)return!0;for(let[l,a]of[[-1,-1],[1,-1],[1,1],[-1,1]]){let i=e+l*n*$n/2-o.cx,s=t+a*r*$n/2-o.cy,u=Math.hypot(i,s);if(u>o.outer||u<o.inner)return!1;let d=Math.atan2(i,-s)*180/Math.PI;if(!vo(d,o.from,o.sweep))return!1}return!0}function jn(e,t,n){let r=e.series.filter(g=>g.values.some(T=>T!==null&&T>0));if(r.length===0)return;let o=e.kind==="doughnut",l=o?r:r.slice(0,1),a=l.some(g=>g.values.some((T,A)=>{let M=ge(e,g,A);return M!==null&&M.position!=="inEnd"&&M.position!=="ctr"})),i=Math.min(t.r-t.l,t.b-t.t),s=a&&!n.placed?So(i):0,u=Math.max(1,i-s),d=(t.l+t.r)/2,f=(t.t+t.b)/2,h=(g,T)=>{let A=o?g*e.holeSize/100:0,M=(g-A)/l.length,S=[];for(let[w,O]of l.entries()){let L=O.values.reduce((E,N)=>E+(N!==null&&N>0?N:0),0);if(!Number.isFinite(L))return n.scene.ok=!1,[];if(!(L>0))continue;let _=o?A+w*M:0,k=o?_+M:g,$=e.firstSliceAngle,G=O.values.length;for(let E=0;E<G;E+=1){let N=O.values[E];if(N==null||!(N>0))continue;let D=N/L*360,V=$+D/2,c=Mo(e,e.series.indexOf(O),E)/100*g,C=V*Math.PI/180,m=d+c*Math.sin(C),v=f-c*Math.cos(C),I=de(e,O,n.look,Ce(e)||O.points.has(E)?{index:E,count:G}:void 0);T&&n.scene.path([Cn(m,v,k,_,$,$+D)],!0,I.fill,I.line,"round");let p=ge(e,O,E);if(p){let R=ae(n.baseText,p.txPr,n.look.colors),F={value:N,percent:N/L,category:et(O,E,n.date1904),seriesName:O.name,seriesFormat:O.formatCode,date1904:n.date1904,cell:O.labelRange?.[E]??null},W=we(p,F,R,n.bounds?n.bounds.r-n.bounds.l:null,n.look.colors),Z=W.width,H=W.height,te=Math.sin(C),B=Math.cos(C),X=Z/2*Math.abs(te)+H/2*Math.abs(B),ie=p.position??(o?"ctr":"bestFit"),fe={cx:m,cy:v,inner:_,outer:k,from:$,sweep:D},se=ie==="ctr"||o?(_+k)/2:k-X-4,Pe=ie==="outEnd";ie==="bestFit"&&(Pe=!Ao(m+se*te,v-se*B,Z,H,fe));let He=Pe?k+X+(ie==="outEnd"?6:0):se,Xe=W.frame,_e=st(p.moved,n.bounds,m+He*te,v-He*B,Z,H);_e.moved&&(Pe=!1);let ft=_e.x,ht=_e.y;S.push({label:{paragraphs:W.paragraphs,align:"ctr",x:ft-Xe/2,y:ht-H/2,width:Xe,height:H,rotation:0},anchor:{x:m+k*te,y:v-k*B},outside:Pe,right:te>=0,cx:ft,cy:ht,naturalX:ft,naturalY:ht,angle:V,middle:V,origin:{x:m,y:v},reach:k+(ie==="outEnd"?6:0),drift:0,lineHeight:q(R),size:R.sizePt,width:Z,height:H})}$+=D}}return S},y=u/2;for(let g=0;g<3&&!n.placed;g+=1){let T=0;for(let A of h(y,!1))A.outside&&(T=Math.max(T,A.cx+A.width/2-(t.r+ut),t.l-ut-(A.cx-A.width/2),t.t-ut-(A.cy-A.height/2),A.cy+A.height/2-(t.b+ut)));if(T<=.5)break;y=Math.max(u/4,y-T)}let b=h(y,!0);Oo(b,n.avoid??[],n.bounds??null);let x=Lo(l[0]?.dLbls??e.dLbls,n);for(let g of b){let T={...g.label,x:g.label.x+(g.cx-g.naturalX),y:g.cy-g.height/2};n.labels.push(T);let A=Ge(g),M=Math.max(A.l-g.anchor.x,0,g.anchor.x-A.r),S=Math.max(A.t-g.anchor.y,0,g.anchor.y-A.b),w=Math.hypot(g.cx-g.naturalX,g.cy-g.naturalY);g.outside&&w>1&&Math.hypot(M,S)>Po*g.size&&n.scene.line(wo(g,f),x)}}function wo(e,t){let n=e.cy-e.height/2,r=Math.max(1,Math.round(e.height/e.lineHeight)),o=e.cy<t?r-1:0,l=n+(o+1)*e.lineHeight-.35*e.size,a=e.cx-e.width/2,i=e.cx+e.width/2,s=e.anchor.x<e.cx,u=s?a-Gn*e.size:i+Gn*e.size,d=s?u-Wn*e.size:u+Wn*e.size;return[{x:e.anchor.x,y:e.anchor.y},{x:d,y:l},{x:u,y:l}]}function Xn(e,t){return e.l<t.r&&t.l<e.r&&e.t<t.b&&t.t<e.b}function Ge(e,t=0){let n=t*e.size;return{l:e.cx-e.width/2-n,r:e.cx+e.width/2+n,t:e.cy-e.height/2,b:e.cy+e.height/2}}var _t=.25,To=.5,Ro=150,_o=1e3;function Io(e){let t=e.angle*Math.PI/180,n=Math.sin(t),r=Math.cos(t),o=e.width/2*Math.abs(n)+e.height/2*Math.abs(r);e.cx=e.origin.x+(e.reach+o)*n,e.cy=e.origin.y-(e.reach+o)*r}function No(e,t,n,r){let o=Math.atan2((t.l+t.r)/2-n,r-(t.t+t.b)/2)*180/Math.PI;return((e.angle-o)%360+540)%360-180>=0?1:-1}function Oo(e,t,n){let r=e.filter(u=>u.outside);if(r.length===0)return;let o=[...t];for(let u of e)u.outside||o.push(Ge(u));let l=r[0].origin.x,a=r[0].origin.y,i=u=>n!==null&&(u.l<n.l||u.r>n.r||u.t<n.t||u.b>n.b),s=(u,d)=>{let f=u.angle+d*To;return Math.abs(f-u.middle)>Ro?!1:(u.angle=f,u.drift=d,Io(u),!0)};for(let u=0;u<_o;u+=1){let d=!1,f=[...r].sort((y,b)=>(y.angle%360+360)%360-(b.angle%360+360)%360),h=f.length>2?f.length:f.length-1;for(let y=0;y<h;y+=1){let b=f[y],x=f[(y+1)%f.length];Xn(Ge(b,_t),Ge(x,_t))&&(d=s(b,-1)||d,d=s(x,1)||d)}for(let y of r){let b=Ge(y,_t),x=o.find(g=>Xn(b,g));if(x)d=s(y,y.drift||No(y,x,l,a))||d;else if(i(b)){let g=b.t<n.t?0:b.b>n.b?180:b.l<n.l?270:90,T=((y.angle-g)%360+540)%360-180;d=s(y,y.drift||(T>=0?1:-1))||d}}if(!d)break}}var Do=1024;function Fo(e){return Math.max(0,.9275*e-5.25)}var Bo=.04,Uo=.08,Vo=1,zo={hex:"000000",alpha:1,widthPt:.5,cap:"butt",dash:null};function Kn(e,t,n){let{model:r,scene:o}=n,l=n.look.colors,a=nt(r,e,Do),i=a.count;if(i<1)return;let s=be(r,e[0],"value"),u=a.axis,d={axis:s,id:s?.id??"",dataMin:1/0,dataMax:-1/0,percent:!1,scale:null,formatCode:null};for(let E of e)Ve(d,E);d.formatCode=ze(d,e[0].series.find(E=>E.formatCode)?.formatCode??null);let f=ae(n.baseText,s?.txPr??null,l),h=ae(n.baseText,u?.txPr??null,l),y=q(h),b=Math.max(0,...a.labels.map(E=>Q(E,h))),x=u!==null&&!u.deleted&&u.tickLabelPosition!=="none",g=Fo(h.sizePt),T=Math.max(1,Math.min((t.b-t.t)/2-(x?y/2+g:0),(t.r-t.l)/2-(x?b+g:0))),A=(t.l+t.r)/2,M=(t.t+t.b)/2,S=d.dataMin>d.dataMax,w=tt({dataMin:S?0:d.dataMin,dataMax:S?1:d.dataMax,lengthPt:T,minIntervalPt:1.6*f.sizePt,fixedMin:s?.min??null,fixedMax:s?.max??null,fixedMajor:s?.majorUnit??null,noHeadroom:!0}),O=w.max-w.min||1,L=(E,N)=>{let D=E/i*Math.PI*2,V=(N-w.min)/O*T;return{x:A+V*Math.sin(D),y:M-V*Math.cos(D)}},_=E=>E?ue(ne(P(E,"spPr"),l).line,zo):null,k=_(s?.majorGridlines??null);if(k){let E=[];for(let N of w.ticks){if(N<=w.min)continue;let D=[];for(let V=0;V<i;V+=1)D.push(L(V,N));E.push(D)}o.path(E,!0,null,k)}let $=_(u?.majorGridlines??null);if($){let E=[];for(let N=0;N<i;N+=1)E.push([{x:A,y:M},L(N,w.max)]);o.path(E,!1,null,$)}let G=[];for(let E of e){let N=E.radarStyle==="filled";for(let D of E.series){let V=de(E,D,n.look),c=[];for(let v=0;v<i;v+=1){let I=D.values[v];c.push(I==null?null:L(v,I))}let C=c.filter(v=>v!==null);N?C.length>=3&&o.path([C],!0,V.fill,V.line):V.line&&C.length>=2&&o.path([C],C.length===i&&C.length>=3,null,V.line,"round");let m=N?null:V.marker;if(m){let v=m.size*.96,I=[],p=[];for(let R of C){for(let F of Le(m.symbol,R.x,R.y,v))I.push(F);for(let F of ve(m.symbol,R.x,R.y,v))p.push(F)}I.length&&o.path(I,!0,m.fill,m.line),p.length&&o.path(p,!1,null,m.line)}for(let[v,I]of c.entries()){let p=I?ge(E,D,v):null;if(!p||!I)continue;let R=ae(n.baseText,p.txPr,l),F={value:D.values[v],percent:null,category:a.labels[v]??null,seriesName:D.name,seriesFormat:D.formatCode,date1904:r.date1904,cell:D.labelRange?.[v]??null},W=we(p,F,R,null,l),Z=W.height,H=W.frame;G.push({paragraphs:W.paragraphs,align:"ctr",x:I.x-H/2,y:I.y-Z-2,width:H,height:Z,rotation:0})}}}if(s&&!s.deleted&&s.tickLabelPosition!=="none"){let E=q(f);for(let N of w.ticks){let D=ce(N,d.formatCode,r.date1904),V=Q(D,f)*1.3+f.sizePt*2,c=L(0,N);n.labels.push({paragraphs:[[{text:D,style:f}]],align:"r",x:c.x-Vo*f.sizePt-V,y:c.y-E/2,width:V,height:E,rotation:0})}}if(x)for(let E=0;E<i;E+=1){let N=a.labels[E],D=E/i*Math.PI*2,V=Math.sin(D),c=Math.cos(D),C=L(E,w.max),m=Q(N,h),v=Bo*T,I=v+Uo*h.sizePt,p=C.x+v*V+m/2*V,R=C.y-I*c-y/2*c-$e*h.sizePt,F=m*1.3+h.sizePt*2;n.labels.push({paragraphs:[[{text:N,style:h}]],align:"ctr",x:p-F/2,y:R-y/2,width:F,height:y,rotation:0})}for(let E of G)n.labels.push(E)}function $o(e,t,n){return{l:e.x*t,t:e.y*n,r:(e.x+e.w)*t,b:(e.y+e.h)*n}}function Yn(e,t,n,r){let o=new lt,l=[],a=gn(e,r),i=e.plots.reduce((L,_)=>L+_.series.length,0),s={model:e,colors:r,seriesCount:i},u=ne(e.spPr,r),d=u.fill===void 0?at("bg1",[],r)??{hex:"FFFFFF",alpha:1}:u.fill;o.rect(0,0,t,n,d,u.line??null);let f={l:Me,t:Me,r:t-Me,b:n-Me},h=[],y=i===1?e.plots.find(L=>L.series.length===1).series[0]:null;if(e.title!==null||!e.autoTitleDeleted&&y!==null){let L=e.title,_=ae(a,P(L,"txPr"),r,{sizePt:a.sizePt*1.8,bold:!0}),k=y?.name??(i>1?"Chart Title":null),$=L?Ee(L,_,k,r):k?[[{text:k,style:_}]]:[];if($.length>0){let G=Ke($),E=Qe(P(L,"layout")),N=z(L,"overlay")==="1",D=P(P(L,"tx"),"rich"),V=t*.8,c=!E&&G>V,C=c?V:G*1.3+_.sizePt*2,m=Fe($,_)*(c?Math.ceil(G/V):1),v=E?E.y*n:f.t-3.4,I=E?E.x*t+G/2:t/2;l.push({paragraphs:$,align:"ctr",x:I-C/2,y:v,width:C,height:m,rotation:Oe(D)??0}),!E&&!N&&(f.t=v+m+12.5);let p=(c?V:G)/2+_.sizePt*.66;h.push({l:I-p,r:I+p,t:v,b:v+m})}}let x=e.legend?ae(a,e.legend.txPr,r):null,g=null;if(e.legend&&x){let L=Un(e,e.legend,s),_=Vn(e.legend,L,x,t,n,f);g=_.layout,Object.assign(f,_.plot)}let T=z(P(e.chartSpace,"chart"),"dispBlanksAs"),A=T==="zero"||T==="span"?T:"gap",M=e.plots.filter(L=>L.kind==="pie"||L.kind==="doughnut"),S=e.plots.filter(L=>L.kind==="radar"),w=e.plots.filter(L=>!M.includes(L)&&!S.includes(L));if([M,S,w].filter(L=>L.length>0).length!==1)return null;if(S.length>0)Kn(S,e.plotLayout?.inner?$o(e.plotLayout,t,n):f,{model:e,look:s,scene:o,labels:l,baseText:a});else if(w.length>0){if(!Dn(w,f,{model:e,look:s,scene:o,labels:l,baseText:a,blanks:A,chartWidth:t,chartHeight:n}))return null}else{let L=e.plotLayout?{l:e.plotLayout.x*t,t:e.plotLayout.y*n,r:(e.plotLayout.x+e.plotLayout.w)*t,b:(e.plotLayout.y+e.plotLayout.h)*n}:f,_=ne(e.plotSpPr,r);(_.fill||_.line)&&o.rect(L.l,L.t,L.r-L.l,L.b-L.t,_.fill??null,_.line??null);for(let k of M)jn(k,L,{look:s,scene:o,labels:l,baseText:a,date1904:e.date1904,placed:e.plotLayout?.inner===!0,avoid:h,bounds:{l:0,t:0,r:t,b:n}})}return g&&x&&zn(g,x,o,l),!o.ok||l.some(L=>[L.x,L.y,L.width,L.height,L.rotation].some(_=>!Number.isFinite(_*12700)))?null:{scene:o,labels:l}}var Zn=12700;function Wo(e){if(e.plots.length===0)return!1;for(let t of e.plots){if(t.threeD||t.element.local==="stockChart"||!["bar","line","area","scatter","pie","doughnut","radar"].includes(t.kind))return!1;for(let n of t.series)if(n.trendlines.length>0||n.errorBars.length>0)return!1}return!0}var Jn=new WeakMap;function Go({chart:e}){let t=[...e.colors.scheme].map(([o,l])=>`${o}=${l.r},${l.g},${l.b},${l.a}`),n=[...e.colors.colorMap].map(([o,l])=>`${o}=${l}`),r=[e.theme.majorFont.latin,e.theme.minorFont.latin];return[...t,...n,...r].join("|")}function Qn(e){let{frame:t,chart:n,measurer:r}=e,{cx:o,cy:l}=t.xfrm;if(!(o>0)||!(l>0))return null;let a=`${t.partName}|${t.layer}|${t.nodeId}`,i=Go(e),s=Jn.get(n.chartSpace);if(s&&s.cx===o&&s.cy===l&&s.measurer===r&&s.owner===a&&s.theme===i)return s.result;let u=Ho(e);return Jn.set(n.chartSpace,{cx:o,cy:l,measurer:r,owner:a,theme:i,result:u}),u}function Ho({frame:e,chart:t,measurer:n}){let r=an(t.chartSpace);return!r||!Wo(r)?null:Xt({measurer:n,theme:t.theme},()=>{let o=Yn(r,e.xfrm.cx/Zn,e.xfrm.cy/Zn,t.colors);return o?en(o.scene.components,o.labels,e,t.theme):null})}import{toCss as nr}from"@pptx-editor.dev/core/cascade";import{apply as Qo}from"@pptx-editor.dev/core/layout";import{blurSigma as qo}from"@pptx-editor.dev/core/output";import{blurSigma as er,effectMatrix as Xo}from"@pptx-editor.dev/core/output";import{apply as ct,multiply as jo}from"@pptx-editor.dev/core/layout";var It=Math.PI/180,Re=9525,Ko=.5;function Nt(e){return Math.max(0,e)*Ko}function Ot(e){let t=Math.max(0,e)/2;return{spread:t,sigma:er(t)}}var Yo=.84;function tr(e){let t=Math.max(0,e);return{spread:-t*Yo,sigma:er(t)}}function Dt(e,t){let n=t*It;return{dx:-Math.cos(n)*e,dy:-Math.sin(n)*e}}function Ft(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let l of e)t=Math.min(t,l.x),n=Math.min(n,l.y),r=Math.max(r,l.x),o=Math.max(o,l.y);return{x:t,y:n,r,b:o}}function Zo(e,t,n){return[ct(e,0,0),ct(e,t,0),ct(e,t,n),ct(e,0,n)]}function dt(e,t){return{x:e.x-t,y:e.y-t,r:e.r+t,b:e.b+t}}function Jo(e,t){let n=Math.cos(t*It),r=Math.sin(t*It),l=[{x:e.x,y:e.y},{x:e.r,y:e.y},{x:e.r,y:e.b},{x:e.x,y:e.b}].map(f=>f.x*n+f.y*r),a=l.reduce((f,h)=>Math.min(f,h),1/0),i=l.reduce((f,h)=>Math.max(f,h),-1/0),s=(e.x+e.r)/2,u=(e.y+e.b)/2,d=s*n+u*r;return{x1:s+(a-d)*n,y1:u+(a-d)*r,x2:s+(i-d)*n,y2:u+(i-d)*r}}var qn=e=>Math.max(0,Math.min(1,e));function Bt(e,t,n,r){let o=Xo(e,t,n,r),l=Ft(Zo(jo(o,t),n,r)),a=e.rotWithShape?Math.atan2(t[1],t[0])*180/Math.PI:0,i=qn(e.startPos);return{matrix:o,line:Jo(l,e.fadeDir+a),start:i,end:Math.max(i,qn(e.endPos))}}function j(e){if(!Number.isFinite(e))return"0";let t=Math.round(e*100)/100;return Object.is(t,-0)?"0":String(t)}function U(e,t={},n=[]){return n.length>0?{tag:e,attrs:t,children:n}:{tag:e,attrs:t}}function el(e){return`matrix(${e.map(j).join(" ")})`}function Ut(e){return{filterUnits:"userSpaceOnUse",x:j(e.x),y:j(e.y),width:j(Math.max(1,e.r-e.x)),height:j(Math.max(1,e.b-e.y)),"color-interpolation-filters":"sRGB"}}var tl="0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1",nl="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0";function rr(e,t){let n=Math.abs(e),r=e>0,o=n/Math.SQRT2,l=Math.min(Re,n),a=(s,u,d)=>U("feMorphology",{in:`${t}-g`,operator:r?"dilate":"erode",radius:`${j(s)} ${j(u)}`,result:d}),i=r?"lighten":"darken";return[U("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:tl,result:`${t}-g`}),a(n,l,`${t}-h`),a(l,n,`${t}-v`),a(o,o,`${t}-d`),U("feBlend",{in:`${t}-h`,in2:`${t}-v`,mode:i,result:`${t}-hv`}),U("feBlend",{in:`${t}-d`,in2:`${t}-hv`,mode:i,result:`${t}-m`}),U("feColorMatrix",{in:`${t}-m`,type:"matrix",values:nl,result:t})]}function rl(e,t,n){let r=[],{softEdge:o,innerShadow:l}=e,a="SourceGraphic",i=Math.max(t.r-t.x,t.b-t.y)/10+Re;if(l){let u=qo(l.blur),{dx:d,dy:f}=Dt(l.dist,l.dir);i+=Math.abs(l.dist)+3*u,r.push(U("feComponentTransfer",{in:"SourceAlpha",result:"ia"},[U("feFuncA",{type:"table",tableValues:"1 0"})]),U("feGaussianBlur",{in:"ia",stdDeviation:j(u),result:"ib"}),U("feOffset",{in:"ib",dx:j(d),dy:j(f),result:"io"}),U("feFlood",{"flood-color":nr({...l.color,a:1}),"flood-opacity":j(l.color.a),result:"ic"}),U("feComposite",{in:"ic",in2:"io",operator:"in",result:"ish"}),U("feComposite",{in:"ish",in2:"SourceAlpha",operator:"in",result:"isc"}),U("feMerge",{result:"inner"},[U("feMergeNode",{in:"SourceGraphic"}),U("feMergeNode",{in:"isc"})])),a="inner"}if(o&&o.radius>0){let{spread:u,sigma:d}=tr(o.radius);i=Math.max(i,Math.abs(u)+Re),r.push(...rr(u,"se"),U("feGaussianBlur",{in:"se",stdDeviation:j(d),result:"sm"}),U("feComponentTransfer",{in:a,result:"so"},[U("feFuncA",{type:"discrete",tableValues:"1"})]),U("feComposite",{in:"so",in2:"sm",operator:"in",result:"sc"}),U("feComponentTransfer",{in:"SourceAlpha",result:"sb"},[U("feFuncA",{type:"linear",slope:"255",intercept:"0"})]),U("feComposite",{in:"sc",in2:"sb",operator:"in",result:"soft"}))}if(r.length===0)return null;let s=n.id("fx");return{defs:[U("filter",{id:s,...Ut(dt(t,i))},r)],filter:s}}function ol(e,t,n){let r=e.glow;if(!r||r.radius<=0)return null;let o=n.id("glow"),{spread:l,sigma:a}=Ot(r.radius);return{defs:[U("filter",{id:o,...Ut(dt(t,l+3*a+Re))},[...rr(l,"gd"),U("feGaussianBlur",{in:"gd",stdDeviation:j(a),result:"gb"}),U("feFlood",{"flood-color":nr({...r.color,a:1}),"flood-opacity":j(r.color.a),result:"gc"}),U("feComposite",{in:"gc",in2:"gb",operator:"in",result:"glow"}),U("feMerge",{},[U("feMergeNode",{in:"glow"}),U("feMergeNode",{in:"SourceGraphic"})])])],filter:o}}function ll(e,t,n){let r=e.reflection;if(!r||r.startAlpha<=0&&r.endAlpha<=0)return null;let{matrix:o,line:l,start:a,end:i}=Bt(r,t.matrix,t.width,t.height),s=Nt(r.blur),u=dt(Ft(t.corners.map(x=>Qo(o,x.x,x.y))),3*s+Re),d=[],f=n.id("fade");d.push(U("linearGradient",{id:f,gradientUnits:"userSpaceOnUse",x1:j(l.x1),y1:j(l.y1),x2:j(l.x2),y2:j(l.y2)},[U("stop",{offset:j(a),"stop-color":"#ffffff","stop-opacity":j(r.startAlpha)}),U("stop",{offset:j(i),"stop-color":"#ffffff","stop-opacity":j(r.endAlpha)})]));let h=n.id("reflect"),y={x:j(u.x),y:j(u.y),width:j(Math.max(1,u.r-u.x)),height:j(Math.max(1,u.b-u.y))};d.push(U("mask",{id:h,maskUnits:"userSpaceOnUse",...y},[U("rect",{...y,fill:`url(#${f})`})]));let b=U("use",{href:`#${t.contentId}`,transform:el(o)});if(s>0){let x=n.id("rblur");d.push(U("filter",{id:x,...Ut(u)},[U("feGaussianBlur",{in:"SourceGraphic",stdDeviation:j(s)})])),b=U("g",{filter:`url(#${x})`},[b])}return{defs:d,node:U("g",{mask:`url(#${h})`,"data-effect":"reflection"},[b])}}var or=Object.freeze({body:rl,glow:ol,reflection:ll});function il(e={}){Vt(e.licenseKey),al({effects:or,chart:Qn})}function ri(e={}){return il(e),Object.freeze({id:"drawing"})}export{ri as drawingModule,Ot as glowSpread,Dt as innerShadowShift,il as installDrawing,Nt as reflectionBlurSigma,Bt as reflectionFade};
6
+ import{a as Zt}from"./chunk-HCD7IVOL.js";import{installDrawingRenderers as Wl}from"@pptx-editor.dev/core/layout";import{resolveThemeFont as wr}from"@pptx-editor.dev/core/cascade";import{isValidXmlText as Rr}from"@pptx-editor.dev/core/store";import{resolveColor as Lr}from"@pptx-editor.dev/core/cascade";import{NS as Ze}from"@pptx-editor.dev/core/store";var en=Ze.c,me=Ze.a;function ee(e){return e?.type==="element"}function q(e,t){for(let n of e)if(n.type==="element"&&n.ns===t.namespaceUri&&n.local===t.localName)return n;return null}function Y(e,t){for(let n of e)if(n.local===t&&n.ns==="")return n.value}var vr=20116800;function tn(e){if(e===void 0||!/^-?\d{1,15}$/.test(e))return null;let t=Number(e);return Number.isFinite(t)?Math.min(Math.max(t,0),vr):null}function Tr(e){let t=n=>Math.round(Math.min(255,Math.max(0,n))).toString(16).padStart(2,"0");return{hex:`${t(e.r)}${t(e.g)}${t(e.b)}`.toUpperCase(),alpha:e.a}}function xe(e,t){if(!ee(e)||!t)return null;let n=Lr(e,t);return n?Tr(n):null}var Ar=new Set(["noFill","solidFill","gradFill","blipFill","pattFill","grpFill"]);function nn(e,t){let n=e.children.find(o=>o.type==="element"&&o.ns===Ze.a&&Ar.has(o.local));if(!n)return{present:!1,color:null};if(n.local!=="solidFill")return{present:!0,color:null};let r=n.children.find(ee);return{present:!0,color:xe(r,t)}}var Jt=0;function Ct(e,t,n=[]){return Jt+=1,{type:"element",id:`chart-generated-${Jt}`,kind:"generic",ns:Ze.a,local:e,nsDecls:[],attrs:Object.entries(t).map(([r,o])=>({ns:"",local:r,value:o})),children:n}}var Se=me,Ne=512,Ir=128,Nr=16,Or=.952,Dr=.268;function rn(e,t){let n=Y(e.attrs,t);return n==="1"||n==="true"?!0:n==="0"||n==="false"?!1:null}function Mt(e,t){let n=q(e.children,{namespaceUri:Se,localName:t}),r=n?Y(n.attrs,"typeface"):void 0;return r&&r.length<=Ir&&Rr(r)?r:null}function Oe(e,t,n){if(!t)return e;let r=Y(t.attrs,"sz"),o=r&&/^\d{3,6}$/.test(r)?Number(r)/100:null,a=q(t.children,{namespaceUri:Se,localName:"solidFill"})?.children.find(ee),i=a?xe(a,n):null,s=Y(t.attrs,"u");return{sizePt:o!==null&&o>=1&&o<=400?o:e.sizePt,bold:rn(t,"b")??e.bold,italic:rn(t,"i")??e.italic,underline:s===void 0?e.underline:s!=="none",colorHex:i?.hex??e.colorHex,latin:Mt(t,"latin")??e.latin,eastAsian:Mt(t,"ea")??e.eastAsian,complex:Mt(t,"cs")??e.complex}}function Pt(e){if(!e)return null;let t=q(e.children,{namespaceUri:Se,localName:"p"}),n=t?q(t.children,{namespaceUri:Se,localName:"pPr"}):null;return n?q(n.children,{namespaceUri:Se,localName:"defRPr"}):null}function De(e){let t=e?q(e.children,{namespaceUri:Se,localName:"bodyPr"}):null;if(!t)return null;let n=Y(t.attrs,"vert");if(n==="vert")return 90;if(n==="vert270")return-90;let r=Y(t.attrs,"rot");if(r===void 0||!/^-?\d{1,9}$/.test(r))return null;let o=Number(r);return o===-6e7||Math.abs(o)>54e5?null:o/6e4}var pe=null;function on(e,t){let n=pe;pe=e;try{return t()}finally{pe=n}}function Fe(e,t){return wr(e,t)??t.minorFont.latin??"Calibri"}function ln(e,{measurer:t,theme:n}){return t.resolve({family:Fe(e.latin,n),bold:e.bold,italic:e.italic})}function Z(e,t){if(!pe)return 0;let n=e.length>Ne?e.slice(0,Ne):e;if(n==="")return 0;let r=ln(t,pe),o=0;for(let l of pe.measurer.advances(r,n))o+=l;return o*t.sizePt}function an(e){let t=pe?ln(e,pe).metrics:null;return t&&t.ascent>0&&t.descent>=0?t:{ascent:Or,descent:Dr}}function J(e){let{ascent:t,descent:n}=an(e);return e.sizePt*(t+n)}function kt(e){return e.sizePt*an(e).ascent}function Be(e,t){let n=0;for(let r of e)n+=r.length>0?Math.max(...r.map(o=>J(o.style))):J(t);return n}function Je(e){let t=0;for(let n of e)t=Math.max(t,n.reduce((r,o)=>r+Z(o.text,o.style),0));return t}function sn(e){let t=[];for(let n of e){let r=[];for(let o of n){let l=o.text.split(/\r\n|\r|\n/);for(let[a,i]of l.entries())a>0&&(t.push(r),r=[]),i!==""&&r.push({text:i,style:o.style})}t.push(r)}return t.slice(0,Nr)}var Fr=12700,Br=4096,cn=2,be=e=>Math.round(e*Fr);function Ur(e){let t=/^[0-9a-f]{6}$/i.test(e.hex)?Number.parseInt(e.hex,16):0,n=Number.isFinite(e.alpha)?Math.min(1,Math.max(0,e.alpha)):1;return{r:t>>16&255,g:t>>8&255,b:t&255,a:n}}function St(e){return{type:"solid",color:Ur(e)}}function Vr(e,t){return{fill:St(e),width:be(e.widthPt),cap:e.cap==="round"?"rnd":e.cap==="square"?"sq":"flat",join:t??"miter",miterLimit:8,dash:e.dash?"custom":"solid",...e.dash?{dashes:e.dash}:{},compound:"sng"}}var un=e=>e!==null&&/^[0-9a-f]{6}$/i.test(e.hex);function zr(e,t,n){let r=[];for(let o of e.subpaths){for(let[l,a]of o.entries())r.push({op:l===0?"M":"L",x:be(a.x),y:be(a.y)});e.closed&&r.push({op:"Z"})}return{commands:r,fill:t?"norm":"none",stroke:n}}function fn(e,t,n){let r=e.frame;return{nodeId:`${r.nodeId}#chart-${n}:${t}`,partName:r.partName,layer:r.layer,name:"",hidden:!1}}function $r(e,t,n){let r=e.closed&&un(e.fill)?e.fill:null,o=e.stroke&&un(e.stroke)?e.stroke:null;if(!r&&!o)return null;let{cx:l,cy:a}=n.frame.xfrm;return{...fn(n,t,"shape"),kind:"shape",xfrm:{x:0,y:0,cx:l,cy:a,rot:0,flipH:!1,flipV:!1},geometry:{kind:"paths",paths:[zr(e,!!r,!!o)]},fill:r?St(r):{type:"none"},...o?{line:Vr(o,e.join)}:{}}}var Hr={lIns:0,tIns:0,rIns:0,bIns:0,anchor:"ctr",anchorCtr:!1,wrap:"square",vert:"horz",rot:0,upright:!1,numCol:1,spcCol:0,autofit:{kind:"none"},spcFirstLastPara:!1};function dn(e,t){let n=e.style,r=n.latin.startsWith("+mj")?"major":n.latin.startsWith("+mn")?"minor":void 0,o=Fe(n.latin,t);return{size:Math.round(n.sizePt*100),bold:n.bold,italic:n.italic,underline:n.underline?"sng":"none",strike:"noStrike",caps:"none",spacing:0,baseline:0,latin:o,...r?{latinTheme:r}:{},ea:n.eastAsian?Fe(n.eastAsian,t):o,cs:n.complex?Fe(n.complex,t):o,fill:St({hex:n.colorHex,alpha:1})}}function Gr(e,t,n,r){let o=e.filter(a=>a.text!==""),l=o.reduce((a,i)=>i.style.sizePt<a.style.sizePt?i:a);return{nodeId:`${n}:p`,level:0,align:t,marL:0,marR:0,indent:0,lineSpacing:{pct:1},spaceBefore:{pts:0},spaceAfter:{pts:0},bullet:null,defaultTab:914400,tabs:[],rtl:!1,eaLineBreak:!0,latinLineBreak:!1,hangingPunct:!1,runs:o.map((a,i)=>({kind:"text",nodeId:`${n}:r${i}`,text:a.text.length>Ne?a.text.slice(0,Ne):a.text,props:dn(a,r)})),endProps:dn(l,r)}}function Wr(e,t,n){let r=`${n.frame.nodeId}#chart-label:${t}`,o=[];for(let[s,c]of sn(e.paragraphs).entries())c.some(u=>u.text!=="")&&o.push(Gr(c,e.align,`${r}:${s}`,n.theme));if(o.length===0)return null;let l=e.align==="l"?0:cn,a=e.align==="r"?0:cn,i=(e.rotation%360+360)%360;return{...fn(n,t,"label"),kind:"shape",xfrm:{x:be(e.x-l),y:be(e.y),cx:Math.max(1,be(e.width+l+a)),cy:Math.max(1,be(e.height)),rot:Number.isFinite(i)?i:0,flipH:!1,flipV:!1},geometry:{kind:"preset",preset:"rect",adjust:new Map},fill:{type:"none"},text:{body:Hr,paragraphs:o}}}function hn(e,t,n,r){if(t.length>Br)return null;let o={frame:n,theme:r},l=[];for(let[a,i]of e.entries()){let s=$r(i,a,o);s&&l.push(s)}for(let[a,i]of t.entries()){let s=Wr(i,a,o);s&&l.push(s)}return l}var Lt=en,Xr=8,_t=255,nt=4096,jr=32768,mn=1024,yn=new Map([["barChart",{kind:"bar",threeD:!1}],["bar3DChart",{kind:"bar",threeD:!0}],["lineChart",{kind:"line",threeD:!1}],["line3DChart",{kind:"line",threeD:!0}],["areaChart",{kind:"area",threeD:!1}],["area3DChart",{kind:"area",threeD:!0}],["pieChart",{kind:"pie",threeD:!1}],["pie3DChart",{kind:"pie",threeD:!0}],["doughnutChart",{kind:"doughnut",threeD:!1}],["scatterChart",{kind:"scatter",threeD:!1}],["radarChart",{kind:"radar",threeD:!1}],["bubbleChart",{kind:"bubble",threeD:!1}],["stockChart",{kind:"line",threeD:!1}],["ofPieChart",{kind:"ofPie",threeD:!1}],["surfaceChart",{kind:"surface",threeD:!1}],["surface3DChart",{kind:"surface",threeD:!0}]]);function E(e,t){return e?q(e.children,{namespaceUri:Lt,localName:t}):null}function oe(e,t){let n=[];for(let r of e?.children??[])ee(r)&&r.ns===Lt&&r.local===t&&n.push(r);return n}function $(e,t){let n=E(e,t);return n?Y(n.attrs,"val"):void 0}function re(e,t,n){let r=E(e,t);if(!r)return n;let o=Y(r.attrs,"val");return o===void 0?!0:o==="1"||o==="true"}function K(e,t,n,r){let o=$(e,t);if(o===void 0||o.length>40)return null;let l=Number(o);return Number.isFinite(l)&&l>=n&&l<=r?l:null}function Et(e){let t="";for(let n of e?.children??[])n.type==="text"&&(t+=n.value);return t.length>mn?t.slice(0,mn):t}function xn(e,t){let n=$(e,"ptCount")?.trim(),r=K(e,"ptCount",0,nt);return E(e,"ptCount")&&(!n||!/^\+?\d+$/.test(n)||r===null)?(t.remaining=-1,null):r}function tt(e,t){if(!e)return null;let n=xn(e,t);if(t.remaining<0)return null;let r=oe(e,"pt"),o=n??0,l=[];for(let i of r){let s=Y(i.attrs,"idx"),c=s!==void 0&&/^\d{1,6}$/.test(s)?Number(s):-1;if(c<0||c>=nt||n!==null&&c>=n)return t.remaining=-1,null;l.push([c,Et(E(i,"v"))]),n===null&&(o=Math.max(o,c+1))}if(o>nt||(t.remaining-=o,t.remaining<0))return null;let a=Array.from({length:o},()=>null);for(let[i,s]of l)a[i]=s;return a}function et(e,t){let n={text:null,numbers:null,formatCode:null};if(!e)return n;let r=E(e,"numRef"),o=E(r,"numCache")??E(e,"numLit");if(o){let c=tt(o,t),u=Et(E(o,"formatCode"))||null;return{text:c,numbers:c?.map(f=>bn(f))??null,formatCode:u}}let l=E(e,"strRef"),a=E(l,"strCache")??E(e,"strLit");if(a)return{text:tt(a,t),numbers:null,formatCode:null};let i=E(E(e,"multiLvlStrRef"),"multiLvlStrCache");if(i){let c=oe(i,"lvl")[0]??null;if(c){let u=xn(i,t),f=tt(c,t)??[],h=u??f.length;return h<f.length?(t.remaining=-1,n):(t.remaining-=Math.max(0,h-f.length),t.remaining<0?n:{text:Array.from({length:h},(p,y)=>f[y]??null),numbers:null,formatCode:null})}}let s=E(e,"v");return s?{text:[Et(s)],numbers:null,formatCode:null}:n}function bn(e){if(e===null)return null;let t=e.trim();if(t===""||t.length>40)return null;let n=Number(t);return Number.isFinite(n)?n:null}function Kr(e){return e?{symbol:$(e,"symbol")??null,size:K(e,"size",2,72),spPr:E(e,"spPr")}:null}function Yr(e,t,n){let r=et(E(e,"tx"),n).text?.[0]??null,o=t==="scatter"||t==="bubble",l=et(E(e,o?"xVal":"cat"),n),a=et(E(e,o?"yVal":"val"),n);if(n.remaining<0)return null;let i=new Map;for(let s of oe(e,"dPt")){let c=K(s,"idx",0,nt-1);c!==null&&i.set(c,s)}return{index:K(e,"idx",0,2**31)??0,order:K(e,"order",0,2**31)??0,name:r,categories:o?null:l.text,categoryNumbers:o?null:l.numbers,categoryFormat:l.formatCode,xValues:o?l.numbers:null,values:a.numbers??(a.text??[]).map(bn),formatCode:a.formatCode,spPr:E(e,"spPr"),marker:Kr(E(e,"marker")),dLbls:E(e,"dLbls"),points:i,smooth:re(e,"smooth",!1),explosion:K(e,"explosion",0,400)??0,invertIfNegative:re(e,"invertIfNegative",!1),bubbleSizes:t==="bubble"?et(E(e,"bubbleSize"),n).numbers??null:null,trendlines:oe(e,"trendline").slice(0,8),errorBars:oe(e,"errBars").slice(0,2),labelRange:tt(Qr(e),n)}}function pn(e,t){for(let n of e?.children??[])if(ee(n)&&n.local===t)return n;return null}function Qr(e){for(let t of oe(E(e,"extLst"),"ext")){let n=pn(pn(t,"datalabelsRange"),"dlblRangeCache");if(n)return n}return null}var qr=new Set(["clustered","stacked","percentStacked","standard"]);function Zr(e,t){let n=yn.get(e.local);if(!n)return null;let r=[];for(let a of oe(e,"ser")){if(r.length>=_t)return null;let i=Yr(a,n.kind,t);if(!i||t.remaining<0)return null;r.push(i)}r.sort((a,i)=>a.order-i.order);let o=$(e,"grouping"),l=n.kind;return{kind:l,threeD:n.threeD,element:e,horizontal:l==="bar"&&$(e,"barDir")==="bar",grouping:o&&qr.has(o)?o:l==="bar"?"clustered":"standard",varyColors:re(e,"varyColors",l==="pie"||l==="doughnut"),gapWidth:K(e,"gapWidth",0,500)??150,overlap:K(e,"overlap",-100,100)??0,gapDepth:K(e,"gapDepth",0,500)??150,series:r,axisIds:oe(e,"axId").map(a=>Y(a.attrs,"val")??""),dLbls:E(e,"dLbls"),firstSliceAngle:K(e,"firstSliceAng",0,360)??0,holeSize:K(e,"holeSize",1,90)??50,markers:re(e,"marker",!0),scatterStyle:$(e,"scatterStyle")??null,radarStyle:$(e,"radarStyle")??null,hiLowLines:E(e,"hiLowLines"),upDownBars:E(e,"upDownBars"),bubbleScale:K(e,"bubbleScale",0,300)??100,bubbleArea:$(e,"sizeRepresents")!=="w",ofPie:l==="ofPie"?{type:$(e,"ofPieType")==="bar"?"bar":"pie",splitType:$(e,"splitType")??"auto",splitPos:K(e,"splitPos",-1e300,1e300),secondSize:K(e,"secondPieSize",5,200)??75,serLines:E(e,"serLines")}:null,wireframe:l==="surface"&&re(e,"wireframe",!1),bandFormats:l==="surface"?Jr(e):new Map}}function Jr(e){let t=new Map;for(let n of oe(E(e,"bandFmts"),"bandFmt").slice(0,_t)){let r=K(n,"idx",0,_t),o=E(n,"spPr");r!==null&&o&&t.set(r,o)}return t}var eo=new Set(["b","t","l","r"]);function to(e){let t=e.local==="catAx"?"category":e.local==="valAx"?"value":e.local==="dateAx"?"date":e.local==="serAx"?"series":null;if(!t)return null;let n=$(e,"axId");if(!n)return null;let r=E(e,"scaling"),o=E(e,"numFmt"),l=$(e,"axPos"),a=K(e,"crossesAt",-1e300,1e300),i=$(e,"crosses"),s=$(e,"majorTickMark"),c=$(e,"minorTickMark"),u=$(e,"tickLblPos"),f=$(e,"crossBetween"),h=$(e,"baseTimeUnit");return{id:n,kind:t,element:e,deleted:re(e,"delete",!1),position:l&&eo.has(l)?l:"b",crossAxisId:$(e,"crossAx")??null,reversed:$(r,"orientation")==="maxMin",min:K(r,"min",-1e300,1e300),max:K(r,"max",-1e300,1e300),majorUnit:K(e,"majorUnit",1e-300,1e300),minorUnit:K(e,"minorUnit",1e-300,1e300),logBase:K(r,"logBase",2,1e3),formatCode:o?Y(o.attrs,"formatCode")??null:null,sourceLinked:o?Y(o.attrs,"sourceLinked")==="1":!0,majorGridlines:E(e,"majorGridlines"),minorGridlines:E(e,"minorGridlines"),majorTickMark:s==="none"||s==="in"||s==="out"||s==="cross"?s:"cross",minorTickMark:c==="none"||c==="in"||c==="out"||c==="cross"?c:"cross",tickLabelPosition:u==="low"||u==="high"||u==="none"?u:"nextTo",spPr:E(e,"spPr"),txPr:E(e,"txPr"),title:E(e,"title"),crosses:a!==null?a:i==="min"||i==="max"?i:"autoZero",crossBetween:f==="between"||f==="midCat"?f:null,tickLabelSkip:K(e,"tickLblSkip",1,32e3),baseTimeUnit:h==="days"||h==="months"||h==="years"?h:null}}function rt(e){let t=E(e,"manualLayout");if(!t)return null;let n=i=>K(t,i,-10,10),r=n("x"),o=n("y"),l=n("w"),a=n("h");return r===null||o===null||$(t,"xMode")==="factor"||$(t,"yMode")==="factor"?null:{inner:$(t,"layoutTarget")!=="outer",x:r,y:o,w:l??0,h:a??0}}function no(e){if(!e)return null;let t=$(e,"legendPos"),n=new Set;for(let r of oe(e,"legendEntry")){let o=K(r,"idx",0,1e5);o!==null&&re(r,"delete",!1)&&n.add(o)}return{element:e,position:t==="b"||t==="t"||t==="l"||t==="tr"?t:"r",overlay:re(e,"overlay",!1),txPr:E(e,"txPr"),spPr:E(e,"spPr"),layout:rt(E(e,"layout")),deleted:n}}function ro(e){let t=K(e,"style",1,48);if(t!==null)return t;for(let n of e.children)if(!(!ee(n)||n.local!=="AlternateContent"))for(let r of n.children){if(!ee(r)||r.local!=="Fallback")continue;let o=K(r,"style",1,48);if(o!==null)return o}return 2}function gn(e){let t=E(e,"chart"),n=E(t,"plotArea");if(!t||!n)return null;let r={remaining:jr},o=[],l=new Map;for(let a of n.children){if(!ee(a)||a.ns!==Lt)continue;if(yn.has(a.local)){if(o.length>=Xr)return null;let s=Zr(a,r);if(!s)return null;o.push(s);continue}let i=to(a);i&&l.set(i.id,i)}return o.length===0?null:{chartSpace:e,date1904:re(e,"date1904",!1),style:ro(e),roundedCorners:re(e,"roundedCorners",!0),spPr:E(e,"spPr"),txPr:E(e,"txPr"),title:E(t,"title"),autoTitleDeleted:re(t,"autoTitleDeleted",!1),plotSpPr:E(n,"spPr"),plotLayout:rt(E(n,"layout")),plots:o,axes:l,legend:no(E(t,"legend")),view3D:E(t,"view3D"),floor:E(t,"floor"),sideWall:E(t,"sideWall"),backWall:E(t,"backWall")}}var vt=["January","February","March","April","May","June","July","August","September","October","November","December"],Cn=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Tt(e){if(!Number.isFinite(e))return"";if(e===0)return"0";let t=Math.abs(e);if(t>=1e11||t<1e-9){let[o,l]=e.toExponential(5).split("e"),a=o.replace(/\.?0+$/,""),i=Number(l);return`${a}E${i<0?"-":"+"}${String(Math.abs(i)).padStart(2,"0")}`}let n=Math.max(0,10-Math.max(1,Math.floor(Math.log10(t))+1)),r=e.toFixed(Math.min(n,20));return r.includes(".")?r.replace(/\.?0+$/,""):r}function Mn(e){let t=[],n="",r=!1,o=!1;for(let l=0;l<e.length;l+=1){let a=e[l];if(a==="\\"&&!r&&l+1<e.length){n+=a+e[l+1],l+=1;continue}if(a==='"'?r=!r:!r&&a==="["?o=!0:!r&&a==="]"&&(o=!1),a===";"&&!r&&!o){t.push(n),n="";continue}n+=a}return t.push(n),t}function Pn(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(r==='"'){let o=e.indexOf('"',n+1),l=o===-1?e.length:o;t.push({kind:"literal",text:e.slice(n+1,l)}),n=l}else if(r==="\\"&&n+1<e.length)t.push({kind:"literal",text:e[n+1]}),n+=1;else if(r==="_"&&n+1<e.length)t.push({kind:"literal",text:" "}),n+=1;else if(r==="*"&&n+1<e.length)n+=1;else if(r==="["){let o=e.indexOf("]",n+1),l=o===-1?e.length:o,a=e.slice(n+1,l);if(/^(?:h+|m+|s+)$/i.test(a))t.push({kind:"code",text:`[${a}]`});else if(a.startsWith("$")){let i=a.indexOf("-");t.push({kind:"literal",text:a.slice(1,i===-1?a.length:i)})}n=l}else"$-+/():!^&'~{}<>= ".includes(r)?t.push({kind:"literal",text:r}):t.push({kind:"code",text:r})}return t}function ot(e){return(e[0]==="["?e[1]:e[0]).toLowerCase()}function kn(e){let t=!1,n="",r=!1;for(let o of e){if(o.kind!=="code")continue;let l=ot(o.text);if(l===".")r=n==="s";else{if(l==="0"&&r)continue;if(l==="0"||l==="#"||l==="?")return!1;r=!1}"ymdhs".includes(l)&&(t=!0),n=l}return t}function oo(e){let t="";for(let n=0;n<e.length;n+=1)n>0&&(e.length-n)%3===0&&(t+=","),t+=e[n];return t}function lo(e,t){let n=t.map(b=>b.kind==="code"?b.text:""),r=n.findIndex(b=>b==="E"||b==="e"),o=b=>b==="0"||b==="#"||b==="?",l=0,a=-1,i=-1,s=-1;for(let b=0;b<n.length&&!(r!==-1&&b>=r);b+=1){let M=n[b];M==="%"&&(l+=1),M==="."&&a===-1&&(a=b),o(M)&&(s===-1&&(s=b),i=b)}if(s===-1)return t.map(b=>b.kind==="literal"?b.text:"").join("");let c=e*100**Math.min(l,3),u=i+1;for(;u<n.length&&n[u]===",";)c/=1e3,u+=1;let f=a===-1?i+1:a,h=!1,p=0;for(let b=s;b<f;b+=1)n[b]===","&&(h=!0),n[b]==="0"&&(p+=1);let y=0,x=0;if(a!==-1)for(let b=a+1;b<=i;b+=1)o(n[b])&&(x+=1,n[b]==="0"&&(y=x));x=Math.min(x,30),y=Math.min(y,x);let m;if(r!==-1){let b=x,[M,v]=Math.abs(c).toExponential(b).split("e"),O=Number(v),T=t[r+1]?.text==="+"||t[r+1]?.text==="-",w=O<0?"-":t[r+1]?.text==="+"?"+":"",S=0;for(let V=r+(T?2:1);V<n.length&&o(n[V]);V+=1)S+=1;m=`${M}E${w}${String(Math.abs(O)).padStart(Math.max(1,S),"0")}`}else{let b=Math.abs(c).toFixed(x),[M,v=""]=b.split(".");for(;v.length>y&&v.endsWith("0");)v=v.slice(0,-1);M==="0"&&p===0&&(M=""),M=M.padStart(p,"0"),h&&(M=oo(M)),m=a===-1?M:`${M}.${v}`}let k="",L="";for(let b=0;b<t.length;b+=1){let M=t[b],v=M.kind==="literal"?M.text:M.text==="%"?"%":"";b<s?k+=v:b>(r!==-1?n.length:i)&&M.text!==","&&(L+=v)}return k+m+L}function ye(e,t){return String(e).padStart(t,"0")}function ao(e,t){if(!Number.isFinite(e)||e<0||e>2958465)return null;let n=t?e+1462:e<61?e+1:e,r=Math.round((n-25569)*864e5);return new Date(r)}function io(e,t,n){let r=ao(Math.abs(e),n);if(!r)return Tt(e);let o=[];for(let i of t){let s=o[o.length-1];s&&s.kind==="code"&&i.kind==="code"&&s.text[0]!=="["&&i.text[0]!=="["&&s.text[0].toLowerCase()===i.text.toLowerCase()?s.text+=i.text:o.push({kind:i.kind,text:i.text})}let l=t.some(i=>i.kind==="code"&&i.text.toLowerCase()==="a"),a="";for(let i=0;i<o.length;i+=1){let s=o[i];if(s.kind==="literal"){a+=s.text;continue}let c=s.text.toLowerCase(),u=ot(s.text),f=s.text.length;if(c[0]==="["){let h=u==="h"?24:u==="m"?1440:86400;a+=ye(Math.floor(Math.abs(e)*h+1e-9),f-2)}else if(u==="0"&&o[i-1]?.text==="."){let h=r.getUTCMilliseconds();a+=ye(Math.floor(h/10**(3-Math.min(f,3))),Math.min(f,3)).padEnd(f,"0")}else if(u==="y")a+=f<=2?ye(r.getUTCFullYear()%100,2):String(r.getUTCFullYear());else if(u==="d")f>=4?a+=Cn[r.getUTCDay()]:f===3?a+=Cn[r.getUTCDay()].slice(0,3):a+=f===2?ye(r.getUTCDate(),2):String(r.getUTCDate());else if(u==="m"){let h=o.slice(0,i).reverse().find(x=>x.kind==="code"),p=o.slice(i+1).find(x=>x.kind==="code");f<=2&&(h&&ot(h.text)==="h"||p&&ot(p.text)==="s")?a+=f===2?ye(r.getUTCMinutes(),2):String(r.getUTCMinutes()):f>=5?a+=vt[r.getUTCMonth()][0]:f===4?a+=vt[r.getUTCMonth()]:f===3?a+=vt[r.getUTCMonth()].slice(0,3):a+=f===2?ye(r.getUTCMonth()+1,2):String(r.getUTCMonth()+1)}else if(u==="h"){let h=r.getUTCHours();l&&(h=h%12===0?12:h%12),a+=f>=2?ye(h,2):String(h)}else if(u==="s")a+=f>=2?ye(r.getUTCSeconds(),2):String(r.getUTCSeconds());else if(u==="a"){let h=r.getUTCHours()>=12,p=o[i+2]?.text.toLowerCase()==="p";for(a+=p?h?"P":"A":h?"PM":"AM";i+1<o.length&&/^[mp/]/i.test(o[i+1].text);)i+=1}else if(u==="e")a+=String(r.getUTCFullYear());else{if(u==="g"||u==="b")continue;a+=s.text}}return a}function ue(e,t,n=!1){if(!Number.isFinite(e))return"";if(!t||t.length>256||/^general$/i.test(t.trim()))return Tt(e);let r=Mn(t),o=r[0],l=e;if(e<0&&r.length>=2?(o=r[1],l=-e):e===0&&r.length>=3&&(o=r[2]),/^general$/i.test(o.trim()))return Tt(l);let a=Pn(o);if(kn(a))return io(e,a,n);let i=lo(l,a),s=/^[^1-9]*$/.test(i);return l<0&&!s?`-${i}`:i}function Sn(e){return!e||e.length>256||/^general$/i.test(e.trim())?!1:kn(Pn(Mn(e)[0]))}function lt(e,t,n){let r=e.categoryNumbers?.[t];return r!=null&&e.categoryFormat?ue(r,e.categoryFormat,n):e.categories?.[t]??null}function Ln(e,t){if(e.logBase!==void 0){if(!(t>0))return 0;let n=Math.log(e.max/e.min)||1;return Math.log(t/e.min)/n}return(t-e.min)/(e.max-e.min||1)}function vn(e,t,n,r,o){let l=f=>Math.log(f)/Math.log(n),a=e>0?e:1,i=t>0?Math.max(t,a):a,s=r!==null&&r>0?r:n**Math.floor(l(a)+1e-9),c=o!==null&&o>0?o:n**Math.ceil(l(i)-1e-9);c>s||(c=s*n);let u=[];for(let f=0;f<=1e3;f+=1){let h=Number((s*n**f).toPrecision(12));if(h>c*(1+1e-9))break;u.push(h)}return{min:s,max:c,major:n,ticks:u,logBase:n}}function _n(e){let t=10**Math.floor(Math.log10(e));return[1,2,5,10,20].map(n=>n*t)}function En(e,t){return Number((Math.round(e/t)*t).toPrecision(12))}function at(e){let t=Number.isFinite(e.dataMin)?e.dataMin:0,n=Number.isFinite(e.dataMax)?e.dataMax:1;t>n&&([t,n]=[n,t]),e.fixedMin!==null&&(t=Math.min(t,e.fixedMin)),e.fixedMax!==null&&(n=Math.max(n,e.fixedMax)),t===n&&(n===0?n=1:n>0?t=0:n=0);let r=t,o=n;e.fixedMin===null&&t>=0&&(r=t>5/6*n?t-(n-t)/2:0),e.fixedMax===null&&n<=0&&(o=n<5/6*t?n+(n-t)/2:0);let l=e.noHeadroom?0:.05*(o-r),a=e.fixedMax??(o>0?o+l:o),i=e.fixedMin??(r<0?r-l:r),s=Math.max(a-i,Number.EPSILON),c=Math.max(1,Math.floor(e.lengthPt/Math.max(1,e.minIntervalPt))),u=e.fixedMajor??0;if(!(u>0)||s/u>1e3){u=0;let y=e.roomOnly===!0||e.fixedMin!==null&&e.fixedMax!==null,x=(e.fixedMax??o)-(e.fixedMin??r);for(let m of _n(s/10)){let k=Math.ceil(a/m-1e-9)-Math.floor(i/m+1e-9),L=e.roomOnly?Math.min(c,10):c;if(k<=L&&(y||x/m<=9.5)){u=m;break}}u===0&&(u=_n(s)[2])}let f=e.fixedMin??En(Math.floor(i/u+1e-9)*u,u),h=e.fixedMax??En(Math.ceil(a/u-1e-9)*u,u);h<=f&&(h=f+u);let p=[];for(let y=0;y<=1e3;y+=1){let x=Number((f+y*u).toPrecision(12));if(x>h+u*1e-9)break;p.push(x)}return{min:f,max:h,major:u,ticks:p}}var so=1,co=1.4;function ge(e,t,n){let r=t.axisIds.map(o=>e.axes.get(o)).filter(o=>o!==void 0);if(t.kind==="scatter"||t.kind==="bubble"){let o=i=>i.position==="b"||i.position==="t",l=r.find(o)??r[0]??null,a=r.find(i=>i!==l)??null;return n==="value"?a:n==="x"?l:null}return n==="value"?r.find(o=>o.kind==="value")??null:r.find(o=>o.kind==="category"||o.kind==="date")??null}function it(e,t,n){let r=0,o=null,l=null,a=null;for(let y of t)for(let x of y.series)r=Math.max(r,x.values.length),!o&&x.categories&&(o=[...x.categories],l=x.categoryNumbers?[...x.categoryNumbers]:null,a=x.categoryFormat);let i=t.length>0?ge(e,t[0],"category"):null;o&&(r=Math.max(r,o.length)),r=Math.min(r,n);let c=(i&&!i.sourceLinked?i.formatCode:null)??a,u=l!==null&&(i?.kind==="date"||i?.kind!=="category"&&Sn(c))&&l.every(y=>y!==null),f=[];for(let y=0;y<r;y+=1){let x=l?.[y];x!=null&&c?f.push(ue(x,c,e.date1904)):f.push(o?.[y]??String(y+1))}let h=t.length>0?ge(e,t[0],"value"):null,p=h?.crossBetween==="midCat"||h?.crossBetween===null&&t.every(y=>y.kind==="area");return{axis:i,count:r,labels:f,serials:u?uo(l.slice(0,r),i,e.date1904):null,between:!p}}function uo(e,t,n){let r=a=>e.map(i=>{let s=n?i+1462:i<61?i+1:i,c=new Date(Math.round((s-25569)*864e5)),u=c.getUTCFullYear();return a==="years"?u:u*12+c.getUTCMonth()}),o=t?.baseTimeUnit??null;if(o==="days")return[...e];if(o!==null)return r(o);let l=new Set(e).size;for(let a of["years","months"]){let i=r(a);if(new Set(i).size===l)return i}return[...e]}function Ue(e,t,n,r){let o=r-n;if(e.serials&&e.serials.length>0){let l=Math.min(...e.serials),a=Math.max(...e.serials),i=Math.max(1,a-l+(e.between?1:0)),s=(e.serials[t]??l)-l+(e.between?.5:0);return n+s/i*o}return e.between?n+(t+.5)/Math.max(1,e.count)*o:e.count<=1?n+o/2:n+t/(e.count-1)*o}function Ve(e,t){if(e.serials&&e.serials.length>1){let n=[...e.serials].sort((i,s)=>i-s),r=1/0;for(let i=1;i<n.length;i+=1){let s=n[i]-n[i-1];s>0&&(r=Math.min(r,s))}let o=n[0],l=n[n.length-1],a=Math.max(1,l-o+1);return Number.isFinite(r)?r/a*t:t/e.count}return t/Math.max(1,e.between?e.count:Math.max(1,e.count-1))}function ze(e,t,n=!1){let r=t.grouping==="stacked"||t.grouping==="percentStacked";if(t.grouping==="percentStacked"&&t.kind!=="scatter"&&t.kind!=="bubble"){e.percent=!0;let o=!1;for(let l of t.series)for(let a of l.values)a!==null&&a<0&&(o=!0);e.dataMin=Math.min(e.dataMin,o?-1:0),e.dataMax=Math.max(e.dataMax,1);return}if(r&&t.kind!=="scatter"&&t.kind!=="bubble"){let o=Math.max(0,...t.series.map(l=>l.values.length));for(let l=0;l<o;l+=1){let a=0,i=0,s=0;for(let c of t.series){let u=c.values[l]??0;t.kind==="bar"?u>=0?a+=u:i+=u:(s+=u,a=Math.max(a,s),i=Math.min(i,s))}e.dataMin=Math.min(e.dataMin,i),e.dataMax=Math.max(e.dataMax,a)}return}for(let o of t.series){let l=n?o.xValues??o.values.map((a,i)=>i+1):o.values;for(let a of l)a===null||!Number.isFinite(a)||(e.dataMin=Math.min(e.dataMin,a),e.dataMax=Math.max(e.dataMax,a))}}function $e(e,t){let n=e.axis;return n&&!n.sourceLinked&&n.formatCode?n.formatCode:e.percent?"0%":t??n?.formatCode??null}function Tn(e,t,n,r,o,l=!1){let a=e.dataMin>e.dataMax,i=a?0:e.dataMin,s=a?1:e.dataMax,c=e.axis,u=e.percent,f=ue(Math.max(Math.abs(i),Math.abs(s)),e.formatCode,o),h=Z(f,r);if(c?.logBase&&!u)return vn(i,s,c.logBase,c.min,c.max);let p=n?(l?co:1.6)*r.sizePt:h+so*r.sizePt,y=Math.floor(t/p)+(u?1:0);return at({dataMin:i,dataMax:s,lengthPt:Math.max(1,y)*p,minIntervalPt:p,fixedMin:c?.min??(u?i<0?-1:0:null),fixedMax:c?.max??(u?1:null),fixedMajor:c?.majorUnit??null,noHeadroom:l,roomOnly:l})}function At(e,t,n,r,o){let l=Ln(e,t);return o?r+(n-r)*l:n+(r-n)*l}var _e=me,fo=16,ho=128,An={sizePt:10,bold:!1,italic:!1,underline:!1,colorHex:"000000",latin:"+mn-lt",eastAsian:"+mn-ea",complex:"+mn-cs"};function wn(e,t,n){let r=n?{...An,themeFaces:n}:An;return Oe(r,Pt(e.txPr),t)}function ae(e,t,n,r={}){return Oe({...e,...r},Pt(t),n)}function Ee(e,t,n,r,o){let l=E(e,"tx"),a=E(l,"rich");if(a){let s=[],c=0;for(let u of a.children){if(!ee(u)||u.ns!==_e||u.local!=="p")continue;if(s.length>=fo)break;let f=q(u.children,{namespaceUri:_e,localName:"pPr"}),h=f?q(f.children,{namespaceUri:_e,localName:"defRPr"}):null,p=Oe(t,h,r),y=[];for(let x of u.children){if(!ee(x)||x.ns!==_e)continue;if(++c>ho)break;if(x.local==="br"){s.push(y),y=[];continue}if(x.local!=="r"&&x.local!=="fld")continue;let m=q(x.children,{namespaceUri:_e,localName:"rPr"}),k=q(x.children,{namespaceUri:_e,localName:"t"}),L="";for(let b of k?.children??[])b.type==="text"&&(L+=b.value);x.local==="fld"&&o&&(L=o(Y(x.attrs,"type"),L)),y.push({text:L,style:Oe(p,m,r)})}s.push(y)}if(s.some(u=>u.some(f=>f.text.trim()!=="")))return s}let i=E(E(l,"strRef"),"strCache");if(i){let s=oe(i,"pt")[0],c="";for(let u of E(s,"v")?.children??[])u.type==="text"&&(c+=u.value);if(c.trim()!=="")return[[{text:c,style:t}]]}return n?[[{text:n,style:t}]]:[]}function mo(e){let t=E(E(e,"layout"),"manualLayout"),n=i=>{let s=$(t,i),c=s!==void 0&&s.length<=32?Number(s):NaN;return Number.isFinite(c)&&Math.abs(c)<=10?c:null},r=n("x"),o=n("y");if(r===null&&o===null)return null;let l=$(t,"xMode")==="edge"&&r!==null,a=$(t,"yMode")==="edge"&&o!==null;return{x:r??0,y:o??0,xEdge:l,yEdge:a}}function wt(e,t){if(re(e,"delete",!1))return null;let n=E(e,"numFmt"),r=n?Y(n.attrs,"sourceLinked")==="1":!0,o=t?.separator??null,l=E(e,"separator");if(l){let a="";for(let i of l.children)i.type==="text"&&(a+=i.value);o=a.slice(0,16)}return{showValue:re(e,"showVal",t?.showValue??!1),showPercent:re(e,"showPercent",t?.showPercent??!1),showCategory:re(e,"showCatName",t?.showCategory??!1),showSeries:re(e,"showSerName",t?.showSeries??!1),separator:o,position:$(e,"dLblPos")??t?.position??null,formatCode:n&&!r?Y(n.attrs,"formatCode")??null:t?.formatCode??null,txPr:E(e,"txPr")??t?.txPr??null,spPr:E(e,"spPr")??t?.spPr??null,custom:null,moved:null}}function Ce(e,t,n){let r=e.dLbls?wt(e.dLbls,null):null,o=t.dLbls?wt(t.dLbls,r):r,l=o;for(let s of oe(t.dLbls,"dLbl")){if($(s,"idx")!==String(n))continue;let c=wt(s,o??r);l=c&&{...c,custom:E(s,"tx")?s:null,moved:mo(s)};break}if(!l||!(l.showValue||l.showPercent||l.showCategory||l.showSeries)&&!l.custom)return null;let i=e.kind==="pie"||e.kind==="doughnut"||e.kind==="ofPie";return l.separator===null?{...l,separator:i?`
7
+ `:", "}:l}function st(e,t,n){switch(n){case"VALUE":return ue(t.value,e.formatCode??t.seriesFormat,t.date1904);case"PERCENTAGE":return t.percent===null?"":ue(t.percent,e.formatCode&&e.formatCode.includes("%")?e.formatCode:"0%",t.date1904);case"CATEGORYNAME":return t.category??"";case"SERIESNAME":return t.seriesName??"";case"CELLRANGE":return t.cell??"";default:return null}}function ct(e,t){let n=[];return e.showSeries&&t.seriesName&&n.push(t.seriesName),e.showCategory&&t.category&&n.push(t.category),e.showValue&&n.push(st(e,t,"VALUE")),e.showPercent&&t.percent!==null&&n.push(st(e,t,"PERCENTAGE")),n.join(e.separator??", ")}var ut=class{components=[];points=0;ok=!0;path(t,n,r,o,l){if(!this.ok||!r&&!o)return;for(let s of t)for(let c of s)if(!Number.isFinite(c.x*12700)||!Number.isFinite(c.y*12700)){this.ok=!1;return}if(o&&o.dash&&!n&&!r){this.dashed(t,o,l);return}let a=t.filter(s=>s.length>=2);if(a.length===0)return;for(let s of a)this.points+=s.length;if(this.points>2e5){this.ok=!1;return}let i=o?Math.max(0,o.widthPt):0;this.components.push({subpaths:a,closed:n,fill:n?r:null,stroke:o&&i>0?{...o,widthPt:i}:null,...l?{join:l}:{}})}rect(t,n,r,o,l,a){let i=Math.min(t,t+r),s=Math.min(n,n+o),c=Math.max(t,t+r),u=Math.max(n,n+o);this.path([[{x:i,y:s},{x:c,y:s},{x:c,y:u},{x:i,y:u}]],!0,l,a)}line(t,n,r){n&&this.path([t],!1,null,n,r)}dashed(t,n,r){let o=Math.max(n.widthPt,.5),l=n.cap!=="butt",a=n.dash.map((s,c)=>{let u=s*o;return l?c%2===0?Math.max(.01,u-o):u+o:Math.max(.1,u)}),i=[];for(let s of t){let c=0,u=a[0],f=!0,h=[s[0]];for(let p=1;p<s.length;p+=1){let y=s[p-1],x=s[p],m=Math.hypot(x.x-y.x,x.y-y.y);for(;m>0&&i.length<2e3;){let k=Math.min(u,m),L=k/m,b={x:y.x+(x.x-y.x)*L,y:y.y+(x.y-y.y)*L};f&&h.push(b),m-=k,u-=k,y=b,u<=1e-9&&(f&&h.length>=2&&i.push(h),f=!f,c=(c+1)%a.length,u=a[c],h=[b])}}f&&h.length>=2&&i.push(h)}i.length>0&&this.path(i,!1,null,{...n,dash:null},r)}};function Rt(e,t,n,r,o=24){let l=[];for(let a=0;a<o;a+=1){let i=a/o*Math.PI*2;l.push({x:e+n*Math.cos(i),y:t+r*Math.sin(i)})}return l}function Rn(e,t,n,r,o,l){let a=Math.max(0,l-o);if(!Number.isFinite(a)||a>360+1e-6)throw new RangeError("Chart slice exceeds the angular limit");let i=Math.min(180,Math.max(2,Math.ceil(a/2))),s=(u,f)=>{let h=f*Math.PI/180;return{x:e+u*Math.sin(h),y:t-u*Math.cos(h)}},c=[];for(let u=0;u<=i;u+=1)c.push(s(n,o+a*u/i));if(r>0)for(let u=i;u>=0;u-=1)c.push(s(r,o+a*u/i));else a<360&&c.push({x:e,y:t});return c}function It(e,t=10){if(e.length<3)return[...e];let n=[e[0]];for(let r=0;r<e.length-1;r+=1){let o=e[Math.max(0,r-1)],l=e[r],a=e[r+1],i=e[Math.min(e.length-1,r+2)],s={x:l.x+(a.x-o.x)/6,y:l.y+(a.y-o.y)/6},c={x:a.x-(i.x-l.x)/6,y:a.y-(i.y-l.y)/6};for(let u=1;u<=t;u+=1){let f=u/t,h=1-f;n.push({x:h*h*h*l.x+3*h*h*f*s.x+3*h*f*f*c.x+f*f*f*a.x,y:h*h*h*l.y+3*h*h*f*s.y+3*h*f*f*c.y+f*f*f*a.y})}}return n}function Le(e,t,n,r){let o=r/2;switch(e){case"square":return[[{x:t-o,y:n-o},{x:t+o,y:n-o},{x:t+o,y:n+o},{x:t-o,y:n+o}]];case"diamond":return[[{x:t,y:n-o},{x:t+o,y:n},{x:t,y:n+o},{x:t-o,y:n}]];case"triangle":return[[{x:t,y:n-o},{x:t+o,y:n+o},{x:t-o,y:n+o}]];case"dash":return[[{x:t-o,y:n-r*.1},{x:t+o,y:n-r*.1},{x:t+o,y:n+r*.1},{x:t-o,y:n+r*.1}]];case"dot":return[[{x:t,y:n-r*.12},{x:t+r*.55,y:n-r*.12},{x:t+r*.55,y:n+r*.12},{x:t,y:n+r*.12}]];case"x":case"star":case"plus":return[];default:return[Rt(t,n,o,o,16)]}}function ve(e,t,n,r){let o=r/2,l=[[{x:t-o,y:n-o},{x:t+o,y:n+o}],[{x:t-o,y:n+o},{x:t+o,y:n-o}]],a=[[{x:t-o,y:n},{x:t+o,y:n}],[{x:t,y:n-o},{x:t,y:n+o}]];return e==="x"?l:e==="plus"?a:e==="star"?[...l,a[1]]:[]}var Te=me,po=12700,yo=new Map([["dash",[4,3]],["dashDot",[4,3,1,3]],["dot",[1,3]],["lgDash",[8,3]],["lgDashDot",[8,3,1,3]],["lgDashDotDot",[8,3,1,3,1,3]],["sysDash",[3,1]],["sysDashDot",[3,1,1,1]],["sysDashDotDot",[3,1,1,1,1,1]],["sysDot",[1,1]]]);function xo(e,t){let n=q(e.children,{namespaceUri:Te,localName:"gsLst"}),r=0,o=0,l=0,a=0,i=0;for(let c of n?.children??[]){if(!ee(c)||c.local!=="gs"||i>=16)continue;let u=c.children.find(ee),f=u?xe(u,t):null;f&&(r+=Number.parseInt(f.hex.slice(0,2),16),o+=Number.parseInt(f.hex.slice(2,4),16),l+=Number.parseInt(f.hex.slice(4,6),16),a+=f.alpha,i+=1)}return i===0?null:{hex:[r,o,l].map(c=>Math.round(c/i).toString(16).padStart(2,"0")).join("").toUpperCase(),alpha:a/i}}function In(e,t){let n=nn(e,t);if(!n.present)return;if(n.color)return n.color;let r=q(e.children,{namespaceUri:Te,localName:"gradFill"});if(r)return xo(r,t);let o=q(e.children,{namespaceUri:Te,localName:"pattFill"});if(o){let a=q(o.children,{namespaceUri:Te,localName:"fgClr"})?.children.find(ee);return a?xe(a,t):null}return null}function ne(e,t){if(!e)return{fill:void 0,line:void 0};let n=In(e,t),r=q(e.children,{namespaceUri:Te,localName:"ln"});if(!r)return{fill:n,line:void 0};let o=In(r,t),l=tn(Y(r.attrs,"w")),a=Y(r.attrs,"cap"),i=q(r.children,{namespaceUri:Te,localName:"prstDash"}),s=i?Y(i.attrs,"val"):void 0;return o===null?{fill:n,line:null}:{fill:n,line:o===void 0&&l===null&&s===void 0?void 0:{hex:o?.hex??"",alpha:o?.alpha??1,widthPt:l!==null?l/po:.75,cap:a==="rnd"?"round":a==="sq"?"square":"butt",dash:s?yo.get(s)??null:null}}}function ce(e,t){return e===null?null:e===void 0?t:e.hex!==""?e:t?{...e,hex:t.hex,alpha:t.alpha}:null}var Nn=[[],[["lumMod",6e4],["lumOff",4e4]],[["lumMod",6e4]],[["lumMod",8e4],["lumOff",2e4]],[["lumMod",8e4]],[["lumMod",5e4]],[["lumMod",7e4],["lumOff",3e4]],[["lumMod",7e4]],[["lumMod",5e4],["lumOff",5e4]]];function dt(e,t,n){let r=Ct("schemeClr",{val:e},t.map(([o,l])=>Ct(o,{val:String(l)})));return xe(r,n)}function On(e,t,n,r){let o=(e-1)%8|0,l;if(o===1){let a=t%6+1,i=Nn[Math.floor(t/6)%Nn.length];l=dt(`accent${a}`,i,r)}else{let a=o===0?"tx1":`accent${o-1}`,i=n>1?t/(n-1):.5,s=Math.round((n>1?.6+i*.8:1)*1e5),c=o===0?[["lumMod",Math.round((.2+i*.6)*1e5)],["lumOff",Math.round((.35+i*.4)*1e5)]]:s<=1e5?[["shade",s]]:[["tint",2e5-s]];l=dt(a,c,r)}return l??{hex:"4472C4",alpha:1}}var Dn=["diamond","square","triangle","x","star","circle","plus","dot","dash"];function ft(e){return e.kind==="line"||e.kind==="scatter"||e.kind==="radar"&&e.radarStyle!=="filled"}function Me(e){return e.varyColors?e.kind==="pie"||e.kind==="doughnut"||e.kind==="ofPie"?!0:e.kind==="bar"&&e.series.length===1:!1}function bo(e,t,n,r,o){if(!ft(e))return null;let l=t.marker,a=e.kind==="scatter"&&(e.scatterStyle==="line"||e.scatterStyle==="smooth");if(l?.symbol==="none")return null;let i=e.kind==="line"?e.markers:e.kind==="radar"?e.radarStyle==="marker":!a;if(!l?.symbol&&!i)return null;let s=l?.symbol??Dn[o%Dn.length],c=ne(l?.spPr??null,r.colors),u=c.fill===void 0?n:c.fill,f=ce(c.line,{...n,widthPt:.75,cap:"round",dash:null});return{symbol:s,size:l?.size??(l?.symbol?5:7),fill:u,line:f}}function de(e,t,n,r){let o=r!==void 0&&Me(e),l=o?r.index:t.index,a=o?r.count:n.seriesCount,i=On(n.model.style,l,a,n.colors),s=ne(t.spPr,n.colors),c=r?t.points.get(r.index):void 0,u=c?ne(E(c,"spPr"),n.colors):{fill:void 0,line:void 0},f=o?void 0:s.fill,h=ft(e),p=h?{...i,widthPt:2.25,cap:"round",dash:null}:null,y=h?null:u.fill!==void 0?u.fill:f!==void 0?f:i,x=ce(u.line!==void 0?u.line:s.line,p??(y?{...y,widthPt:.75,cap:"butt",dash:null}:null)),m=h||u.line!==void 0||s.line!==void 0?x:null,k=(h?m??null:y)??i;return{fill:y,line:m,marker:bo(e,t,{hex:k.hex,alpha:k.alpha},n,l)}}var go=me,Co=12700,Mo=.2,Po=3,ko=16;function Bn(e,t){for(let n of[E(E(e.custom,"tx"),"rich"),e.txPr]){let r=n?q(n.children,{namespaceUri:go,localName:"bodyPr"}):null,o=r?Y(r.attrs,t):void 0;if(o!==void 0)return o}}function Fn(e,t){let n=Bn(e,t);return n!==void 0&&/^\d{1,8}$/.test(n)?Number(n)/Co:Po}function So(e,t){return t===null||!(t>0)||Bn(e,"wrap")==="none"?null:t*Mo-Fn(e,"lIns")-Fn(e,"rIns")}function _o(e){let t=[];for(let n of e){let r=[];for(let o of n)for(let[l,a]of o.text.split(/\r\n|\r|\n/).entries())l>0&&(t.push(r),r=[]),a!==""&&r.push({text:a,style:o.style});t.push(r)}return t.slice(0,ko)}function Eo(e,t){let n=[];for(let s of e)for(let c of s.text.match(/\S+|\s+/g)??[]){let u=Z(c,s.style);/^\s/.test(c)?n.length>0&&(n[n.length-1].space+=u):n.push({width:u,space:0})}if(n.length===0)return{count:1,widest:0,word:0};let r=1,o=0,l=0,a=0,i=0;for(let s of n)i=Math.max(i,s.width),l>0&&t!==null&&l+a+s.width>t?(o=Math.max(o,l),r+=1,l=s.width):l+=a+s.width,a=s.space;return{count:r,widest:Math.max(o,l),word:i}}function Ae(e,t,n,r,o){let l=ct(e,t),a=e.custom?Ee(e.custom,n,l,o,(p,y)=>st(e,t,p)??y):[[{text:l,style:n}]],i=So(e,r),s=0,c=0,u=!1,f=0;for(let p of _o(a)){let y=Eo(p,i);s=Math.max(s,y.widest),f=Math.max(f,y.word),u||=y.count>1;let x=Math.max(J(n),...p.map(m=>J(m.style)));c+=y.count*x}let h=i!==null&&u?Math.max(i,f):s*1.3+n.sizePt*2;return{paragraphs:a,width:s,height:c,frame:h}}function ht(e,t,n,r,o,l){if(!e||!t)return{x:n,y:r,moved:!1};let a=t.r-t.l,i=t.b-t.t;return{x:e.xEdge?t.l+e.x*a+o/2:n+e.x*a,y:e.yEdge?t.t+e.y*i+l/2:r+e.y*i,moved:!0}}var Lo={hex:"FFFFFF",alpha:1};function zn(e,t,n,r,o,l){let{scene:a}=o,i=o.look,s=r.categories?.count??0,c=e.grouping==="percentStacked",u=e.grouping==="stacked"||c,f=[];if(c)for(let x=0;x<s;x+=1){let m=0;for(let k of e.series)m+=Math.abs(k.values[x]??0);f.push(m||1)}let h=(x,m)=>c?x/f[m]:x,p=(x,m)=>r.horizontal?{x:r.valueAt(t,m),y:r.categoryAt(x)}:{x:r.categoryAt(x),y:r.valueAt(t,m)},y=(x,m,k,L,b)=>{let M=Ce(e,x,m);if(!M)return;let v=ae(o.baseText,M.txPr,i.colors),O=r.categories?.labels[m]??null,T={value:k,percent:c?k/f[m]:null,category:O,seriesName:x.name,seriesFormat:x.formatCode,date1904:o.model.date1904,cell:x.labelRange?.[m]??null};if(!M.custom&&ct(M,T)==="")return;let w=Ae(M,T,v,o.chartWidth,i.colors),S=w.width,V=w.height,H=w.frame,_=.48*v.sizePt,D=L.x,N=L.y;if(b.kind==="bar"){let P=M.position??(u?"ctr":"outEnd"),{start:g,end:A}=b,I=Math.sign(A.x-g.x)||1,C=Math.sign(A.y-g.y)||-1;if(P==="ctr")D=(g.x+A.x)/2,N=(g.y+A.y)/2;else if(r.horizontal)D=P==="inBase"?g.x+I*(_+S/2):P==="inEnd"?A.x-I*(_+S/2):A.x+I*(_+S/2),N=A.y;else{let R=P==="inBase"?g.y+C*(_+V/2):P==="inEnd"?A.y-C*(_+V/2):A.y+C*(_+V/2);D=A.x,N=R}}else{let P=M.position??(e.kind==="area"?"ctr":"r"),g=b.markerHalf+_;P==="r"?D=L.x+g+S/2:P==="l"?D=L.x-g-S/2:P==="t"?N=L.y-g-V/2:P==="b"&&(N=L.y+g+V/2)}let F={l:0,t:0,r:o.chartWidth,b:o.chartHeight},d=ht(M.moved,F,D,N,S,V);l.push({paragraphs:w.paragraphs,align:"ctr",x:d.x-H/2,y:d.y-V/2,width:H,height:V,rotation:0})};if(e.kind==="bar"&&r.categories){let x=r.horizontal?r.plot.b-r.plot.t:r.plot.r-r.plot.l,m=Ve(r.categories,x),k=e.gapWidth/100,L=u?1:e.series.length,b=u?1:e.overlap/100,M=m/(L-(L-1)*b+k),v=[],O=[];for(let[T,w]of e.series.entries()){let S=Me(e),V=de(e,w,i),H=[];for(let _=0;_<Math.min(s,w.values.length);_+=1){let D=w.values[_];if(D==null)continue;let N=h(D,_),F=n,d=N;if(u){let Q=N>=0?v:O;F=Q[_]??0,d=F+N,Q[_]=d}let P=r.categoryAt(_),g=-m/2+k*M/2+(u?0:T*M*(1-b)),A=r.horizontal?P-g:P+g,I=r.horizontal?A-M:A+M,C=r.valueAt(t,F),R=r.valueAt(t,d),U=S||w.points.has(_)?de(e,w,i,{index:_,count:w.values.length}):V,G=w.invertIfNegative&&N<0?Lo:U.fill;r.horizontal?(a.rect(Math.min(C,R),Math.min(A,I),Math.abs(R-C),M,G,U.line),H.push({index:_,start:{x:C,y:(A+I)/2},end:{x:R,y:(A+I)/2},value:D})):(a.rect(Math.min(A,I),Math.min(C,R),M,Math.abs(R-C),G,U.line),H.push({index:_,start:{x:(A+I)/2,y:C},end:{x:(A+I)/2,y:R},value:D}))}for(let _ of H)y(w,_.index,_.value,_.end,{kind:"bar",start:_.start,end:_.end})}return}if((e.kind==="line"||e.kind==="area")&&r.categories){let x=[],m=null;for(let k of e.series){let L=de(e,k,i),b=[],M=[];for(let v=0;v<s;v+=1){let O=k.values[v]??null;if(O===null&&(o.blanks==="zero"||e.kind==="area"||u)&&(O=0),O===null){b.push(null),M.push(0);continue}let T=h(O,v);u&&(T+=x[v]??0,x[v]=T),M.push(O),b.push(p(v,T))}if(e.kind==="area"){let v=b.filter(T=>T!==null),O=m??v.map(T=>r.horizontal?{x:r.valueAt(t,n),y:T.y}:{x:T.x,y:r.valueAt(t,n)});v.length>=2&&a.path([[...v,...[...O].reverse()]],!0,L.fill,L.line),u&&(m=v)}else{let v=[],O=[];for(let T of b){if(T===null){o.blanks!=="span"&&(O.length&&v.push(O),O=[]);continue}O.push(T)}if(O.length&&v.push(O),L.line)for(let T of v)a.line(k.smooth?It(T):T,L.line,"round");Un(b,L.marker,a)}for(let[v,O]of b.entries())O&&y(k,v,M[v],O,{kind:"point",markerHalf:L.marker?L.marker.size/2:0})}e.kind==="line"&&Ao(e,t,r,o);return}if(e.kind==="scatter"&&r.xInfo?.scale)for(let x of e.series){let m=de(e,x,i),k=[];for(let M=0;M<x.values.length;M+=1){let v=x.values[M],O=x.xValues?x.xValues[M]:M+1;if(v==null||O===null||O===void 0){k.push(null);continue}k.push({x:r.valueAt(r.xInfo,O),y:r.valueAt(t,v)})}let L=k.filter(M=>M!==null);if(m.line!==null&&e.scatterStyle!=="marker"&&e.scatterStyle!=="none"&&L.length>=2){let M=x.smooth||e.scatterStyle==="smooth"||e.scatterStyle==="smoothMarker";a.line(M?It(L):L,m.line,"round")}Un(k,m.marker,a);for(let[M,v]of k.entries())v&&y(x,M,x.values[M],v,{kind:"point",markerHalf:m.marker?m.marker.size/2:0})}}function Un(e,t,n){if(!t)return;let r=t.size*.96,o=[],l=[];for(let a of e)if(a){for(let i of Le(t.symbol,a.x,a.y,r))o.push(i);for(let i of ve(t.symbol,a.x,a.y,r))l.push(i)}o.length>0&&n.path(o,!0,t.fill,t.line),l.length>0&&n.path(l,!1,null,t.line)}var Vn={hex:"000000",alpha:1,widthPt:.75,cap:"butt",dash:null},vo={hex:"FFFFFF",alpha:1},To={hex:"000000",alpha:1};function Ao(e,t,n,r){let o=n.categories;if(!o||e.series.length<2)return;let l=r.look.colors,a=(s,c)=>n.horizontal?{x:n.valueAt(t,c),y:n.categoryAt(s)}:{x:n.categoryAt(s),y:n.valueAt(t,c)};if(e.hiLowLines){let s=ce(ne(E(e.hiLowLines,"spPr"),l).line,Vn),c=[];for(let u=0;u<o.count;u+=1){let f=e.series.map(h=>h.values[u]).filter(h=>h!=null);f.length<2||c.push([a(u,Math.min(...f)),a(u,Math.max(...f))])}s&&c.length>0&&r.scene.path(c,!1,null,s)}let i=e.upDownBars;if(i){let s=(Number($(i,"gapWidth")??150)||150)/100,u=Ve(o,n.horizontal?n.plot.b-n.plot.t:n.plot.r-n.plot.l)/(1+s),f=(m,k)=>{let L=ne(E(E(i,m),"spPr"),l);return{fill:L.fill===void 0?k:L.fill,line:ce(L.line,Vn)}},h=f("upBars",vo),p=f("downBars",To),y=e.series[0],x=e.series[e.series.length-1];for(let m=0;m<o.count;m+=1){let k=y.values[m],L=x.values[m];if(k==null||L===null||L===void 0)continue;let b=a(m,k),M=a(m,L),v=L>=k?h:p;n.horizontal?r.scene.rect(Math.min(b.x,M.x),b.y-u/2,Math.abs(M.x-b.x),u,v.fill,v.line):r.scene.rect(b.x-u/2,Math.min(b.y,M.y),u,Math.abs(M.y-b.y),v.fill,v.line)}}}var wo=4096,Ro=3.1,Io=2.3,Dt=5e3,He=.08,$n=.91,we=.64,Nt=4.5,No=7,jn={hex:"000000",alpha:1,widthPt:.5,cap:"butt",dash:null};function le(e){return e==="l"||e==="r"}function Oo(e,t){if(!e)return null;let n=ne(e.spPr,t.look.colors);return ce(n.line,jn)}function Do(e,t){if(!e)return null;let n=ne(E(e,"spPr"),t.look.colors);return ce(n.line,jn)}function Ot(e,t){let n=e.value;return n.scale?n.scale.ticks.map(r=>ue(Math.abs(r)<n.scale.major*1e-9?0:r,n.formatCode,t.date1904)):[]}function Hn(e,t){let n=0;for(let r of e)n=Math.max(n,Z(r,t));return n}function Gn(e,t,n){let r=Z(" ",t),o=1,l=0;for(let a of e.split(/\s+/).slice(0,256)){let i=Z(a,t);l>0&&l+r+i>n?(o+=1,l=i):l+=(l>0?r:0)+i}return o}function Kn(e,t,n){let{model:r}=n,o=d=>d.kind==="scatter"||d.kind==="bubble",l=e.filter(o),a=e.filter(d=>!o(d));if(l.length>0&&a.length>0)return!1;let i=a.some(d=>d.kind==="bar"&&d.horizontal);if(i&&a.some(d=>d.kind!=="bar"||!d.horizontal))return!1;let s=n.look.colors,c=new Map,u=d=>{let P=d?.id??"",g=c.get(P);return g||(g={axis:d,id:P,dataMin:1/0,dataMax:-1/0,percent:!1,scale:null,formatCode:null},c.set(P,g)),g},f=new Map,h=null;for(let d of e){let P=u(ge(r,d,"value"));if(ze(P,d),P.formatCode??=d.series.find(g=>g.formatCode)?.formatCode??null,f.set(d,P),o(d)){let g=ge(r,d,"x");h??={axis:g,id:`x:${g?.id??""}`,dataMin:1/0,dataMax:-1/0,percent:!1,scale:null,formatCode:null},ze(h,d,!0)}}for(let d of c.values())d.formatCode=$e(d,d.formatCode);h&&(h.formatCode=$e(h,null));let p=a.length>0?it(r,a,wo):null,y=[],x=d=>ae(n.baseText,d?.txPr??null,s),m=d=>d!==null&&!d.deleted,k=d=>m(d)&&d.tickLabelPosition!=="none";if(p){let d=p.axis;y.push({axis:d,role:"category",side:i?d?.position==="r"?"r":"l":d?.position==="t"?"t":"b",style:x(d),labelled:k(d),value:null,title:null})}else h&&y.push({axis:h.axis,role:"x",side:h.axis?.position==="t"?"t":"b",style:x(h.axis),labelled:k(h.axis),value:h,title:null});let L=!0;for(let d of c.values()){let P=d.axis,g=i?L?"b":"t":L?"l":"r",A=P?.position??g;y.push({axis:P,role:"value",side:i?A==="t"?"t":"b":A==="r"?"r":"l",style:x(P),labelled:k(P),value:d,title:null}),L=!1}for(let d of y){if(!m(d.axis)||!d.axis.title)continue;let P=ae(n.baseText,E(d.axis.title,"txPr"),s,{bold:!0}),g=Ee(d.axis.title,P,"Axis Title",s);if(g.length===0)continue;let A=E(E(d.axis.title,"tx"),"rich");d.title={paragraphs:g,style:P,rotation:De(A??E(d.axis.title,"txPr"))}}let b=y.find(d=>d.role==="category")??null,M=r.plotLayout,v=y.find(d=>d.role==="value")??null,O=()=>{if(M&&M.inner){let C=n.chartWidth,R=n.chartHeight;return{plot:{l:M.x*C,t:M.y*R,r:(M.x+M.w)*C,b:(M.y+M.h)*R},categoryRotation:0,categorySkip:1,categoryWrap:0}}let d=M&&!M.inner?{l:M.x*n.chartWidth,t:M.y*n.chartHeight,r:(M.x+M.w)*n.chartWidth,b:(M.y+M.h)*n.chartHeight}:{...t};for(let C of y){if(!C.title)continue;let R=Be(C.title.paragraphs,C.title.style)+9;C.side==="l"?d.l+=R:C.side==="r"?d.r-=R:C.side==="t"?d.t+=R:d.b-=R}for(let C of y){if(!C.labelled||!le(C.side))continue;let R=C.value?Ot(C,r):p?.labels??[],U=C.value?ue(C.value.dataMax>-1/0?C.value.dataMax:1,C.value.formatCode,r.date1904):"",G=Hn(R.length?R:[U],C.style)+$n*C.style.sizePt-Nt;C.side==="l"?d.l+=G:d.r-=G}let P=0;for(let C of y){if(!C.labelled||!C.value||!le(C.side))continue;let R=J(C.style)/2+He*C.style.sizePt;P=Math.max(P,R-No)}d.t+=P;let g=0,A=1,I=0;for(let C of y){if(!C.labelled||le(C.side))continue;let R=C.style.sizePt,U=J(C.style)+we*R-Nt;if(C.role==="category"&&p){let G=Ve(p,d.r-d.l),Q=Hn(p.labels,C.style),X=De(C.axis?.txPr??null),te=p.labels.every(z=>z.split(/\s+/).slice(0,256).every(j=>Z(j,C.style)<=G*.98));if(X!==null&&X!==0?g=X:Q>G*.98&&p.count>1&&(te?I=G:g=-45),I>0){let z=Math.max(...p.labels.map(j=>Gn(j,C.style,I)));U+=(z-1)*J(C.style)}if(g!==0){let z=Math.abs(g)*Math.PI/180;U=Q*Math.sin(z)+J(C.style)*Math.cos(z)+we*R-Nt;let j=J(C.style)/Math.sin(z);A=Math.max(1,Math.ceil(j/Math.max(G,1e-6)))}C.axis?.tickLabelSkip&&(A=C.axis.tickLabelSkip),v?.value?.scale&&Wn(C,v.value.scale)&&(U=0)}C.side==="t"?d.t+=U:d.b-=U}for(let C of y){if(!C.labelled||le(C.side)||!C.value)continue;let R=Ot(C,r);R.length>0&&(d.r-=Z(R[R.length-1],C.style)/2)}return{plot:d,categoryRotation:g,categorySkip:A,categoryWrap:I}},T=d=>{for(let P of y){if(!P.value)continue;let g=le(P.side)?d.b-d.t:d.r-d.l;P.value.scale=Tn(P.value,Math.max(1,g),le(P.side),P.style,r.date1904)}},w=O();T(w.plot),w=O(),T(w.plot);let S=w.plot;if(!(S.r-S.l>1)||!(S.b-S.t>1))return!0;let V=b?.axis?.reversed??!1,H=d=>p?i?V?Ue(p,d,S.t,S.b):Ue(p,d,S.b,S.t):V?Ue(p,d,S.r,S.l):Ue(p,d,S.l,S.r):0,_=(d,P)=>{let g=d.scale,A=d.axis?.reversed??!1;return i||d===h?At(g,P,S.l,S.r,A):At(g,P,S.b,S.t,A)},D=(d,P)=>{let g=P?.crosses??"autoZero";if(g==="min")return d.min;if(g==="max")return d.max;let A=typeof g=="number"?g:0;return Math.min(d.max,Math.max(d.min,A))},N=ne(r.plotSpPr,s);n.scene.rect(S.l,S.t,S.r-S.l,S.b-S.t,N.fill??null,N.line??null);for(let d of y)if(!(!d.axis||d.axis.deleted&&!d.axis.majorGridlines))for(let[P,g]of[[d.axis.minorGridlines,!0],[d.axis.majorGridlines,!1]]){let A=Do(P,n);if(!A)continue;let I=[];if(d.value?.scale){let C=d.value.scale;for(let R of Fo(C,g,Xn(C,d.axis))){let U=_(d.value,R);I.push(le(d.side)?[{x:S.l,y:U},{x:S.r,y:U}]:[{x:U,y:S.t},{x:U,y:S.b}])}}else if(p&&!g){let C=p.between?p.count+1:p.count;for(let R=0;R<C;R+=1){let U=p.between?H(R)-(H(1)-H(0))/2:H(R);I.push(le(d.side)?[{x:S.l,y:U},{x:S.r,y:U}]:[{x:U,y:S.t},{x:U,y:S.b}])}}I.length>0&&n.scene.path(I,!1,null,A)}let F=[];for(let d of e){let P=f.get(d);if(!P.scale)continue;let g=D(P.scale,b?.axis??null);zn(d,P,g,{categoryAt:H,valueAt:_,categories:p,horizontal:i,xInfo:h,plot:S},n,F)}for(let d of y){if(!m(d.axis))continue;let P=Oo(d.axis,n);if(!P)continue;let g;if(d.role==="category"||d.role==="x"){let z=v?.value;g=z?.scale?_(z,D(z.scale,d.axis)):le(d.side)?S.l:S.b}else{let j=d.axis.crosses==="max";g=le(d.side)?d.side==="r"||j?S.r:S.l:d.side==="t"||j?S.t:S.b,h?.scale&&d.value!==h&&!i&&(g=_(h,D(h.scale,d.axis)))}let A=le(d.side)?[{x:g,y:S.t},{x:g,y:S.b}]:[{x:S.l,y:g},{x:S.r,y:g}];n.scene.line(A,P);let I=d.axis.majorTickMark,C=d.side==="l"||d.side==="t"?-1:1,R=[];if(d.value?.scale)for(let z of d.value.scale.ticks)R.push(_(d.value,z));else if(p){let z=p.between?p.count+1:p.count;for(let j=0;j<z;j+=1)R.push(p.between?H(j)-(H(1)-H(0))/2:H(j))}let U=(z,j)=>ie=>{let fe=z==="cross"?-j:0,se=z==="in"?-j:j;return le(d.side)?[{x:g+C*fe,y:ie},{x:g+C*se,y:ie}]:[{x:ie,y:g+C*fe},{x:ie,y:g+C*se}]},G=d.axis.minorTickMark,Q=[],X=d.value?.scale,te=X?Xn(X,d.axis):0;if(G!=="none"&&X&&X.logBase===void 0&&te>0){let z=Math.min(Dt,Math.floor((X.max-X.min)/te+1e-9));for(let j=0;j<=z;j+=1)Q.push(_(d.value,X.min+j*te))}else if(G!=="none"&&!X&&p?.between)for(let z=0;z<Math.min(p.count,Dt);z+=1)Q.push(H(z));Q.length>0&&n.scene.path(Q.map(U(G,Io)),!1,null,P),!(I==="none"||R.length===0)&&n.scene.path(R.map(U(I,Ro)),!1,null,P)}for(let d of F)n.labels.push(d);for(let d of y){if(!d.labelled)continue;let P=d.style.sizePt,g=J(d.style),A=$n*P;if(d.value?.scale){let C=Ot(d,r);for(let[R,U]of d.value.scale.ticks.entries()){let G=C[R],X=Z(G,d.style)*1.3+P*2,te=_(d.value,U);if(le(d.side)){let z=d.side==="l";n.labels.push({paragraphs:[[{text:G,style:d.style}]],align:z?"r":"l",x:z?S.l-A-X:S.r+A,y:te-g/2-He*P,width:X,height:g,rotation:0})}else{let z=d.side==="b"?S.b+we*P:S.t-we*P-g;n.labels.push({paragraphs:[[{text:G,style:d.style}]],align:"ctr",x:te-X/2,y:z,width:X,height:g,rotation:0})}}continue}if(!p)continue;let I=v?.value?.scale&&Wn(d,v.value.scale)?_(v.value,D(v.value.scale,d.axis)):null;for(let C=0;C<p.count;C+=w.categorySkip){let R=p.labels[C];if(R==="")continue;let G=Z(R,d.style)*1.3+P*2,Q=H(C);if(le(d.side)){let fe=I??(d.side==="l"?S.l:S.r),se=d.side==="l";n.labels.push({paragraphs:[[{text:R,style:d.style}]],align:se?"r":"l",x:se?fe-A-G:fe+A,y:Q-g/2-He*P,width:G,height:g,rotation:0});continue}let X=I??(d.side==="b"?S.b:S.t),te=d.side==="b"?X+we*P:X-we*P-g;if(w.categoryRotation!==0){let fe=w.categoryRotation*Math.PI/180,se=G/2,ke=Q,Qe=te+g/2,qe=ke-se*Math.cos(fe),Ie=Qe-se*Math.sin(fe);n.labels.push({paragraphs:[[{text:R,style:d.style}]],align:"r",x:qe-se,y:Ie-g/2,width:G,height:g,rotation:w.categoryRotation});continue}let z=w.categoryWrap,j=z>0?Gn(R,d.style,z):1,ie=z>0?z:G;n.labels.push({paragraphs:[[{text:R,style:d.style}]],align:"ctr",x:Q-ie/2,y:d.side==="b"?te:te-(j-1)*g,width:ie,height:g*j,rotation:0})}}for(let d of y){if(!d.title)continue;let P=d.title.style,g=Be(d.title.paragraphs,P),I=Je(d.title.paragraphs)*1.3+P.sizePt*2;if(le(d.side)){let C=d.title.rotation??-90,R=d.side==="l"?t.l+1.5+g/2:t.r-1.5-g/2,U=(S.t+S.b)/2,G=Math.abs(Math.abs(C)-90)<1;n.labels.push({paragraphs:d.title.paragraphs,align:"ctr",x:R-I/2,y:U-g/2,width:I,height:g,rotation:C})}else{let C=d.side==="b"?t.b-1.4-g:t.t+1.5;n.labels.push({paragraphs:d.title.paragraphs,align:"ctr",x:(S.l+S.r)/2-I/2,y:C,width:I,height:g,rotation:d.title.rotation??0})}}return!0}function Wn(e,t){return e.role!=="category"||e.axis?.tickLabelPosition!=="nextTo"||e.axis.crosses!=="autoZero"?!1:t.min<0&&t.max>0}function Xn(e,t){let n=t.minorUnit;return n!==null&&n>0&&(e.max-e.min)/n<=Dt?n:e.major>0?e.major/5:0}function Fo(e,t,n){let r=[];if(e.logBase!==void 0){if(!t)return[...e.ticks];let l=Math.min(Math.floor(e.logBase),100);for(let a of e.ticks)for(let i=2;i<l&&r.length<1e3;i+=1)a*i<e.max&&r.push(a*i);return r}let o=t?n:e.major;if(!(o>0))return r;for(let l=0,a=e.min;a<=e.max+o*1e-9&&l<1e3;l+=1,a=e.min+l*o)r.push(a);return r}var Yn=256;function qn(e,t,n){let r=[],o=t.position==="l"||t.position==="r"||t.position==="tr";for(let l of e.plots){let a=[],i=ft(l),s=e.plots.length===1&&l.series.length===1,c=Me(l);if(c||s&&l.series[0].points.size>0&&!i){let u=l.series[0],f=u.values.length;for(let h=0;h<f&&h<Yn;h+=1){let p=lt(u,h,e.date1904)??String(h+1),y=c||u.points.has(h)?{index:h,count:f}:void 0;a.push({text:p,look:de(l,u,n,y),line:i,point:!0})}}else{for(let u of l.series){if(a.length>=Yn)break;a.push({text:u.name??`Series${u.index+1}`,look:de(l,u,n),line:i,round:l.kind==="bubble"})}Bo(l,o)&&a.reverse()}for(let u of a)r.push(u)}return r.filter((l,a)=>!t.deleted.has(a))}function Bo(e,t){let n=e.grouping==="stacked"||e.grouping==="percentStacked";return e.kind==="bar"&&e.horizontal?e.grouping==="clustered":t?n&&(e.kind==="bar"||e.kind==="area"||e.kind==="line"):!1}function Ge(e,t){if(e.line&&e.look.line){let l=6.43+.386*t;return{key:Qn,text:Qn+2.03,after:l,shift:1.76,gap:15.66}}let n=.55*t,r=n+Math.max(0,.275*t-.4),o=(e.point?1.615:1.65)*t-r;return{key:n,text:r,after:o,shift:.55+.138*t,gap:13.25+n/2}}var Qn=19.2,Uo=5.85,Ft=.27;function Vo(e){return 9+.6045*e}function zo(e){return 14.2+.59*e}var Pe=11,$o=16.5;function Zn(e,t,n,r,o,l){let a=n.sizePt,i=J(n),s={...l},c=[],u=kt(n);if(t.length===0)return{layout:{items:c},plot:s};let f=e.layout;if(e.position==="b"||e.position==="t"){let T=r-20,w=[[]],S=0;for(let d of t){let P=Ge(d,a),g=P.text+Z(d.text,n),A=w[w.length-1],I=A.length>0?A[A.length-1].after:0;S+I+g>T&&A.length>0?(w.push([]),S=0):S+=I,S+=g,w[w.length-1].push({entry:d,width:g,after:P.after})}let V=1.84*a,H=Vo(a),_=e.position==="b"?o-H-(w.length-1)*V:l.t-Pe+H,D=Ge(t[0],a).shift,N=_+(w.length-1)*V,F=f?f.y*o:null;for(let[d,P]of w.entries()){let g=P.reduce((C,R,U)=>C+R.width+(U>0?P[U-1].after:0),0),A=f?f.x*r:r/2+D-g/2,I=F===null?_+d*V+Ft*a:F+d*V+u;for(let C of P)c.push({entry:C.entry,x:A,baseline:I}),A+=C.width+C.after}if(!e.overlay&&!f){let d=zo(a);e.position==="b"?s.b=Math.min(s.b,_-d):s.t=Math.max(s.t,N+d)}return{layout:{items:c},plot:s}}let h=i+Uo,p=Math.max(...t.map(T=>Z(T.text,n))),y=Math.max(...t.map(T=>Ge(T,a).text)),x=f&&f.h>0?f.h*o:o-20,m=Math.max(1,Math.floor((x-i)/h)+1),k=t.slice(0,m),L=i+(k.length-1)*h,b=f?f.x*r:e.position==="l"?10.7:r-10-p-y,M=(l.t+o-Pe)/2,v=f?f.y*o+Math.max(0,(x-L)/2):e.position==="tr"?l.t:M-L/2,O=!f&&e.position!=="tr";for(let[T,w]of k.entries()){let S=O?M+(T-(k.length-1)/2)*h+Ft*a:v+T*h+u;c.push({entry:w,x:b,baseline:S})}if(!e.overlay&&!f)if(e.position==="l")s.l=Math.max(s.l,b+y+p+$o);else{let T=Math.max(...t.map(w=>Ge(w,a).gap));s.r=Math.min(s.r,b-T)}return{layout:{items:c},plot:s}}function Jn(e,t,n,r){let o=t.sizePt,l=J(t);for(let a of e.items){let{entry:i}=a,s=Ge(i,o),c=a.baseline-Ft*o;if(i.line){i.look.line&&n.line([{x:a.x,y:c},{x:a.x+s.key,y:c}],i.look.line,"round");let h=i.look.marker;if(h){let p=a.x+s.key/2;n.path(Le(h.symbol,p,c,h.size*.96),!0,h.fill,h.line);for(let y of ve(h.symbol,p,c,h.size*.96))n.line(y,h.line)}}else if(i.round){let h=s.key/2;n.path([Rt(a.x+h,c,h,h)],!0,i.look.fill,i.look.line)}else{let h=s.key/2;n.rect(a.x,c-h,s.key,s.key,i.look.fill,i.look.line)}let u=a.x+s.text,f=Z(i.text,t);r.push({paragraphs:[[{text:i.text,style:t}]],align:"l",x:u,y:a.baseline-kt(t),width:f*1.3+o*2,height:l,rotation:0})}}function Ho(e,t,n){let r=e.series[t],o=r.points.get(n),l=o?$(o,"explosion"):void 0,a=l!==void 0&&/^\d{1,3}$/.test(l)?Number(l):NaN;return a>=0&&a<=400?a:r.explosion}var er=.85,tr=.5,nr=.16,Go=.75;function Wo(e){return e*Xo+jo}var Xo=.123,jo=3.5,mt=10,rr={hex:"A6A6A6",alpha:1,widthPt:.75,cap:"butt",dash:null};function Ko(e,t){let r=E(e,"leaderLines");if(!r)for(let l of oe(E(e,"extLst"),"ext"))for(let a of l.children)ee(a)&&a.local==="leaderLines"&&(r=a);let o=ne(E(r,"spPr"),t.look.colors);return ce(o.line,rr)??rr}function Yo(e,t,n){return((e-t)%360+360)%360<=n}function Qo(e,t,n,r,o){if(o.sweep>=359.9)return!0;for(let[l,a]of[[-1,-1],[1,-1],[1,1],[-1,1]]){let i=e+l*n*er/2-o.cx,s=t+a*r*er/2-o.cy,c=Math.hypot(i,s);if(c>o.outer||c<o.inner)return!1;let u=Math.atan2(i,-s)*180/Math.PI;if(!Yo(u,o.from,o.sweep))return!1}return!0}function lr(e,t,n){let r=e.series.filter(m=>m.values.some(k=>k!==null&&k>0));if(r.length===0)return;let o=e.kind==="doughnut",l=o?r:r.slice(0,1),a=l.some(m=>m.values.some((k,L)=>{let b=Ce(e,m,L);return b!==null&&b.position!=="inEnd"&&b.position!=="ctr"})),i=Math.min(t.r-t.l,t.b-t.t),s=a&&!n.placed?Wo(i):0,c=Math.max(1,i-s),u=(t.l+t.r)/2,f=(t.t+t.b)/2,h=(m,k)=>{let L=o?m*e.holeSize/100:0,b=(m-L)/l.length,M=[];for(let[v,O]of l.entries()){let T=O.values.reduce((_,D)=>_+(D!==null&&D>0?D:0),0);if(!Number.isFinite(T))return n.scene.ok=!1,[];if(!(T>0))continue;let w=o?L+v*b:0,S=o?w+b:m,V=e.firstSliceAngle,H=O.values.length;for(let _=0;_<H;_+=1){let D=O.values[_];if(D==null||!(D>0))continue;let N=D/T*360,F=V+N/2,d=Ho(e,e.series.indexOf(O),_)/100*m,P=F*Math.PI/180,g=u+d*Math.sin(P),A=f-d*Math.cos(P),I=de(e,O,n.look,Me(e)||O.points.has(_)?{index:_,count:H}:void 0);k&&n.scene.path([Rn(g,A,S,w,V,V+N)],!0,I.fill,I.line,"round");let C=Ce(e,O,_);if(C){let R=ae(n.baseText,C.txPr,n.look.colors),U={value:D,percent:D/T,category:lt(O,_,n.date1904),seriesName:O.name,seriesFormat:O.formatCode,date1904:n.date1904,cell:O.labelRange?.[_]??null},G=Ae(C,U,R,n.bounds?n.bounds.r-n.bounds.l:null,n.look.colors),Q=G.width,X=G.height,te=Math.sin(P),z=Math.cos(P),j=Q/2*Math.abs(te)+X/2*Math.abs(z),ie=C.position??(o?"ctr":"bestFit"),fe={cx:g,cy:A,inner:w,outer:S,from:V,sweep:N},se=ie==="ctr"||o?(w+S)/2:S-j-4,ke=ie==="outEnd";ie==="bestFit"&&(ke=!Qo(g+se*te,A-se*z,Q,X,fe));let Qe=ke?S+j+(ie==="outEnd"?6:0):se,qe=G.frame,Ie=ht(C.moved,n.bounds,g+Qe*te,A-Qe*z,Q,X);Ie.moved&&(ke=!1);let bt=Ie.x,gt=Ie.y;M.push({label:{paragraphs:G.paragraphs,align:"ctr",x:bt-qe/2,y:gt-X/2,width:qe,height:X,rotation:0},anchor:{x:g+S*te,y:A-S*z},outside:ke,right:te>=0,cx:bt,cy:gt,naturalX:bt,naturalY:gt,angle:F,middle:F,origin:{x:g,y:A},reach:S+(ie==="outEnd"?6:0),drift:0,lineHeight:J(R),size:R.sizePt,width:Q,height:X})}V+=N}}return M},p=c/2;for(let m=0;m<3&&!n.placed;m+=1){let k=0;for(let L of h(p,!1))L.outside&&(k=Math.max(k,L.cx+L.width/2-(t.r+mt),t.l-mt-(L.cx-L.width/2),t.t-mt-(L.cy-L.height/2),L.cy+L.height/2-(t.b+mt)));if(k<=.5)break;p=Math.max(c/4,p-k)}let y=h(p,!0);rl(y,n.avoid??[],n.bounds??null);let x=Ko(l[0]?.dLbls??e.dLbls,n);for(let m of y){let k={...m.label,x:m.label.x+(m.cx-m.naturalX),y:m.cy-m.height/2};n.labels.push(k);let L=We(m),b=Math.max(L.l-m.anchor.x,0,m.anchor.x-L.r),M=Math.max(L.t-m.anchor.y,0,m.anchor.y-L.b),v=Math.hypot(m.cx-m.naturalX,m.cy-m.naturalY);m.outside&&v>1&&Math.hypot(b,M)>Go*m.size&&n.scene.line(qo(m,f),x)}}function qo(e,t){let n=e.cy-e.height/2,r=Math.max(1,Math.round(e.height/e.lineHeight)),o=e.cy<t?r-1:0,l=n+(o+1)*e.lineHeight-.35*e.size,a=e.cx-e.width/2,i=e.cx+e.width/2,s=e.anchor.x<e.cx,c=s?a-nr*e.size:i+nr*e.size,u=s?c-tr*e.size:c+tr*e.size;return[{x:e.anchor.x,y:e.anchor.y},{x:u,y:l},{x:c,y:l}]}function or(e,t){return e.l<t.r&&t.l<e.r&&e.t<t.b&&t.t<e.b}function We(e,t=0){let n=t*e.size;return{l:e.cx-e.width/2-n,r:e.cx+e.width/2+n,t:e.cy-e.height/2,b:e.cy+e.height/2}}var Bt=.25,Zo=.5,Jo=150,el=1e3;function tl(e){let t=e.angle*Math.PI/180,n=Math.sin(t),r=Math.cos(t),o=e.width/2*Math.abs(n)+e.height/2*Math.abs(r);e.cx=e.origin.x+(e.reach+o)*n,e.cy=e.origin.y-(e.reach+o)*r}function nl(e,t,n,r){let o=Math.atan2((t.l+t.r)/2-n,r-(t.t+t.b)/2)*180/Math.PI;return((e.angle-o)%360+540)%360-180>=0?1:-1}function rl(e,t,n){let r=e.filter(c=>c.outside);if(r.length===0)return;let o=[...t];for(let c of e)c.outside||o.push(We(c));let l=r[0].origin.x,a=r[0].origin.y,i=c=>n!==null&&(c.l<n.l||c.r>n.r||c.t<n.t||c.b>n.b),s=(c,u)=>{let f=c.angle+u*Zo;return Math.abs(f-c.middle)>Jo?!1:(c.angle=f,c.drift=u,tl(c),!0)};for(let c=0;c<el;c+=1){let u=!1,f=[...r].sort((p,y)=>(p.angle%360+360)%360-(y.angle%360+360)%360),h=f.length>2?f.length:f.length-1;for(let p=0;p<h;p+=1){let y=f[p],x=f[(p+1)%f.length];or(We(y,Bt),We(x,Bt))&&(u=s(y,-1)||u,u=s(x,1)||u)}for(let p of r){let y=We(p,Bt),x=o.find(m=>or(y,m));if(x)u=s(p,p.drift||nl(p,x,l,a))||u;else if(i(y)){let m=y.t<n.t?0:y.b>n.b?180:y.l<n.l?270:90,k=((p.angle-m)%360+540)%360-180;u=s(p,p.drift||(k>=0?1:-1))||u}}if(!u)break}}var ol=1024;function ll(e){return Math.max(0,.9275*e-5.25)}var al=.04,il=.08,sl=1,cl={hex:"000000",alpha:1,widthPt:.5,cap:"butt",dash:null};function ar(e,t,n){let{model:r,scene:o}=n,l=n.look.colors,a=it(r,e,ol),i=a.count;if(i<1)return;let s=ge(r,e[0],"value"),c=a.axis,u={axis:s,id:s?.id??"",dataMin:1/0,dataMax:-1/0,percent:!1,scale:null,formatCode:null};for(let _ of e)ze(u,_);u.formatCode=$e(u,e[0].series.find(_=>_.formatCode)?.formatCode??null);let f=ae(n.baseText,s?.txPr??null,l),h=ae(n.baseText,c?.txPr??null,l),p=J(h),y=Math.max(0,...a.labels.map(_=>Z(_,h))),x=c!==null&&!c.deleted&&c.tickLabelPosition!=="none",m=ll(h.sizePt),k=Math.max(1,Math.min((t.b-t.t)/2-(x?p/2+m:0),(t.r-t.l)/2-(x?y+m:0))),L=(t.l+t.r)/2,b=(t.t+t.b)/2,M=u.dataMin>u.dataMax,v=at({dataMin:M?0:u.dataMin,dataMax:M?1:u.dataMax,lengthPt:k,minIntervalPt:1.6*f.sizePt,fixedMin:s?.min??null,fixedMax:s?.max??null,fixedMajor:s?.majorUnit??null,noHeadroom:!0}),O=v.max-v.min||1,T=(_,D)=>{let N=_/i*Math.PI*2,F=(D-v.min)/O*k;return{x:L+F*Math.sin(N),y:b-F*Math.cos(N)}},w=_=>_?ce(ne(E(_,"spPr"),l).line,cl):null,S=w(s?.majorGridlines??null);if(S){let _=[];for(let D of v.ticks){if(D<=v.min)continue;let N=[];for(let F=0;F<i;F+=1)N.push(T(F,D));_.push(N)}o.path(_,!0,null,S)}let V=w(c?.majorGridlines??null);if(V){let _=[];for(let D=0;D<i;D+=1)_.push([{x:L,y:b},T(D,v.max)]);o.path(_,!1,null,V)}let H=[];for(let _ of e){let D=_.radarStyle==="filled";for(let N of _.series){let F=de(_,N,n.look),d=[];for(let A=0;A<i;A+=1){let I=N.values[A];d.push(I==null?null:T(A,I))}let P=d.filter(A=>A!==null);D?P.length>=3&&o.path([P],!0,F.fill,F.line):F.line&&P.length>=2&&o.path([P],P.length===i&&P.length>=3,null,F.line,"round");let g=D?null:F.marker;if(g){let A=g.size*.96,I=[],C=[];for(let R of P){for(let U of Le(g.symbol,R.x,R.y,A))I.push(U);for(let U of ve(g.symbol,R.x,R.y,A))C.push(U)}I.length&&o.path(I,!0,g.fill,g.line),C.length&&o.path(C,!1,null,g.line)}for(let[A,I]of d.entries()){let C=I?Ce(_,N,A):null;if(!C||!I)continue;let R=ae(n.baseText,C.txPr,l),U={value:N.values[A],percent:null,category:a.labels[A]??null,seriesName:N.name,seriesFormat:N.formatCode,date1904:r.date1904,cell:N.labelRange?.[A]??null},G=Ae(C,U,R,null,l),Q=G.height,X=G.frame;H.push({paragraphs:G.paragraphs,align:"ctr",x:I.x-X/2,y:I.y-Q-2,width:X,height:Q,rotation:0})}}}if(s&&!s.deleted&&s.tickLabelPosition!=="none"){let _=J(f);for(let D of v.ticks){let N=ue(D,u.formatCode,r.date1904),F=Z(N,f)*1.3+f.sizePt*2,d=T(0,D);n.labels.push({paragraphs:[[{text:N,style:f}]],align:"r",x:d.x-sl*f.sizePt-F,y:d.y-_/2,width:F,height:_,rotation:0})}}if(x)for(let _=0;_<i;_+=1){let D=a.labels[_],N=_/i*Math.PI*2,F=Math.sin(N),d=Math.cos(N),P=T(_,v.max),g=Z(D,h),A=al*k,I=A+il*h.sizePt,C=P.x+A*F+g/2*F,R=P.y-I*d-p/2*d-He*h.sizePt,U=g*1.3+h.sizePt*2;n.labels.push({paragraphs:[[{text:D,style:h}]],align:"ctr",x:C-U/2,y:R-p/2,width:U,height:p,rotation:0})}for(let _ of H)n.labels.push(_)}function ul(e,t,n){return{l:e.x*t,t:e.y*n,r:(e.x+e.w)*t,b:(e.y+e.h)*n}}function ir(e,t,n,r){let o=new ut,l=[],a=wn(e,r),i=e.plots.reduce((T,w)=>T+w.series.length,0),s={model:e,colors:r,seriesCount:i},c=ne(e.spPr,r),u=c.fill===void 0?dt("bg1",[],r)??{hex:"FFFFFF",alpha:1}:c.fill;o.rect(0,0,t,n,u,c.line??null);let f={l:Pe,t:Pe,r:t-Pe,b:n-Pe},h=[],p=i===1?e.plots.find(T=>T.series.length===1).series[0]:null;if(e.title!==null||!e.autoTitleDeleted&&p!==null){let T=e.title,w=ae(a,E(T,"txPr"),r,{sizePt:a.sizePt*1.8,bold:!0}),S=p?.name??(i>1?"Chart Title":null),V=T?Ee(T,w,S,r):S?[[{text:S,style:w}]]:[];if(V.length>0){let H=Je(V),_=rt(E(T,"layout")),D=$(T,"overlay")==="1",N=E(E(T,"tx"),"rich"),F=t*.8,d=!_&&H>F,P=d?F:H*1.3+w.sizePt*2,g=Be(V,w)*(d?Math.ceil(H/F):1),A=_?_.y*n:f.t-3.4,I=_?_.x*t+H/2:t/2;l.push({paragraphs:V,align:"ctr",x:I-P/2,y:A,width:P,height:g,rotation:De(N)??0}),!_&&!D&&(f.t=A+g+12.5);let C=(d?F:H)/2+w.sizePt*.66;h.push({l:I-C,r:I+C,t:A,b:A+g})}}let x=e.legend?ae(a,e.legend.txPr,r):null,m=null;if(e.legend&&x){let T=qn(e,e.legend,s),w=Zn(e.legend,T,x,t,n,f);m=w.layout,Object.assign(f,w.plot)}let k=$(E(e.chartSpace,"chart"),"dispBlanksAs"),L=k==="zero"||k==="span"?k:"gap",b=e.plots.filter(T=>T.kind==="pie"||T.kind==="doughnut"),M=e.plots.filter(T=>T.kind==="radar"),v=e.plots.filter(T=>!b.includes(T)&&!M.includes(T));if([b,M,v].filter(T=>T.length>0).length!==1)return null;if(M.length>0)ar(M,e.plotLayout?.inner?ul(e.plotLayout,t,n):f,{model:e,look:s,scene:o,labels:l,baseText:a});else if(v.length>0){if(!Kn(v,f,{model:e,look:s,scene:o,labels:l,baseText:a,blanks:L,chartWidth:t,chartHeight:n}))return null}else{let T=e.plotLayout?{l:e.plotLayout.x*t,t:e.plotLayout.y*n,r:(e.plotLayout.x+e.plotLayout.w)*t,b:(e.plotLayout.y+e.plotLayout.h)*n}:f,w=ne(e.plotSpPr,r);(w.fill||w.line)&&o.rect(T.l,T.t,T.r-T.l,T.b-T.t,w.fill??null,w.line??null);for(let S of b)lr(S,T,{look:s,scene:o,labels:l,baseText:a,date1904:e.date1904,placed:e.plotLayout?.inner===!0,avoid:h,bounds:{l:0,t:0,r:t,b:n}})}return m&&x&&Jn(m,x,o,l),!o.ok||l.some(T=>[T.x,T.y,T.width,T.height,T.rotation].some(w=>!Number.isFinite(w*12700)))?null:{scene:o,labels:l}}var sr=12700;function dl(e){if(e.plots.length===0)return!1;for(let t of e.plots){if(t.threeD||t.element.local==="stockChart"||!["bar","line","area","scatter","pie","doughnut","radar"].includes(t.kind))return!1;for(let n of t.series)if(n.trendlines.length>0||n.errorBars.length>0)return!1}return!0}var cr=new WeakMap;function fl({chart:e}){let t=[...e.colors.scheme].map(([o,l])=>`${o}=${l.r},${l.g},${l.b},${l.a}`),n=[...e.colors.colorMap].map(([o,l])=>`${o}=${l}`),r=[e.theme.majorFont.latin,e.theme.minorFont.latin];return[...t,...n,...r].join("|")}function ur(e){let{frame:t,chart:n,measurer:r}=e,{cx:o,cy:l}=t.xfrm;if(!(o>0)||!(l>0))return null;let a=`${t.partName}|${t.layer}|${t.nodeId}`,i=fl(e),s=cr.get(n.chartSpace);if(s&&s.cx===o&&s.cy===l&&s.measurer===r&&s.owner===a&&s.theme===i)return s.result;let c=hl(e);return cr.set(n.chartSpace,{cx:o,cy:l,measurer:r,owner:a,theme:i,result:c}),c}function hl({frame:e,chart:t,measurer:n}){let r=gn(t.chartSpace);return!r||!dl(r)?null:on({measurer:n,theme:t.theme},()=>{let o=ir(r,e.xfrm.cx/sr,e.xfrm.cy/sr,t.colors);return o?hn(o.scene.components,o.labels,e,t.theme):null})}import{toCss as kr}from"@pptx-editor.dev/core/cascade";import{apply as Fl}from"@pptx-editor.dev/core/layout";import{blurSigma as Sr}from"@pptx-editor.dev/core/output";import{blurSigma as fr,effectMatrix as ml}from"@pptx-editor.dev/core/output";import{apply as pt,multiply as pl}from"@pptx-editor.dev/core/layout";var Ut=Math.PI/180,he=9525,yl=.5;function Vt(e){return Math.max(0,e)*yl}function zt(e){let t=Math.max(0,e)/2;return{spread:t,sigma:fr(t)}}var xl=.84;function hr(e){let t=Math.max(0,e);return{spread:-t*xl,sigma:fr(t)}}function $t(e,t){let n=t*Ut;return{dx:-Math.cos(n)*e,dy:-Math.sin(n)*e}}function Ht(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let l of e)t=Math.min(t,l.x),n=Math.min(n,l.y),r=Math.max(r,l.x),o=Math.max(o,l.y);return{x:t,y:n,r,b:o}}function bl(e,t,n){return[pt(e,0,0),pt(e,t,0),pt(e,t,n),pt(e,0,n)]}function Re(e,t){return{x:e.x-t,y:e.y-t,r:e.r+t,b:e.b+t}}function gl(e,t){let n=Math.cos(t*Ut),r=Math.sin(t*Ut),l=[{x:e.x,y:e.y},{x:e.r,y:e.y},{x:e.r,y:e.b},{x:e.x,y:e.b}].map(f=>f.x*n+f.y*r),a=l.reduce((f,h)=>Math.min(f,h),1/0),i=l.reduce((f,h)=>Math.max(f,h),-1/0),s=(e.x+e.r)/2,c=(e.y+e.b)/2,u=s*n+c*r;return{x1:s+(a-u)*n,y1:c+(a-u)*r,x2:s+(i-u)*n,y2:c+(i-u)*r}}var dr=e=>Math.max(0,Math.min(1,e));function Gt(e,t,n,r){let o=ml(e,t,n,r),l=Ht(bl(pl(o,t),n,r)),a=e.rotWithShape?Math.atan2(t[1],t[0])*180/Math.PI:0,i=dr(e.startPos);return{matrix:o,line:gl(l,e.fadeDir+a),start:i,end:Math.max(i,dr(e.endPos))}}import{apply as Ke}from"@pptx-editor.dev/core/layout";var Xe=Math.PI/180,Cl={isometricBottomDown:[2124e3,18883200,17990400],isometricBottomUp:[2124e3,2716800,3609600],isometricLeftDown:[21e5,27e5,0],isometricLeftUp:[195e5,27e5,0],isometricOffAxis1Left:[108e4,384e4,0],isometricOffAxis1Right:[108e4,2004e4,0],isometricOffAxis1Top:[18075600,18393e3,3458400],isometricOffAxis2Left:[108e4,156e4,0],isometricOffAxis2Right:[108e4,1776e4,0],isometricOffAxis2Top:[18075600,3207e3,18141600],isometricOffAxis3Bottom:[3524400,18393e3,18141600],isometricOffAxis3Left:[2052e4,384e4,0],isometricOffAxis3Right:[2052e4,2004e4,0],isometricOffAxis4Bottom:[3524400,3207e3,3458400],isometricOffAxis4Left:[2052e4,156e4,0],isometricOffAxis4Right:[2052e4,1776e4,0],isometricRightDown:[195e5,189e5,0],isometricRightUp:[21e5,189e5,0],isometricTopDown:[19476e3,2716800,17990400],isometricTopUp:[19476e3,18883200,3609600],perspectiveAbove:[204e5,0,0],perspectiveAboveLeftFacing:[2358600,860400,20467200],perspectiveAboveRightFacing:[2358600,20739600,1132800],perspectiveBelow:[12e5,0,0],perspectiveContrastingLeftFacing:[624e3,2636400,21387e3],perspectiveContrastingRightFacing:[624e3,18963600,213e3],perspectiveHeroicExtremeLeftFacing:[487200,2067600,21425400],perspectiveHeroicExtremeRightFacing:[487200,19532400,174600],perspectiveHeroicLeftFacing:[20938800,857400,157800],perspectiveHeroicRightFacing:[20938800,20742600,21442200],perspectiveLeft:[0,12e5,0],perspectiveRelaxed:[18573600,0,0],perspectiveRelaxedModerately:[19490400,0,0],perspectiveRight:[0,204e5,0]},Ml={obliqueTopLeft:[-45,.3],obliqueTop:[-90,.3],obliqueTopRight:[-135,.3],obliqueLeft:[0,.3],obliqueRight:[180,.3],obliqueBottomLeft:[45,.3],obliqueBottom:[90,.3],obliqueBottomRight:[135,.3],legacyObliqueTopLeft:[-45,.5],legacyObliqueTop:[-90,.5],legacyObliqueTopRight:[-135,.5],legacyObliqueLeft:[0,.5],legacyObliqueRight:[180,.5],legacyObliqueBottomLeft:[45,.5],legacyObliqueBottom:[90,.5],legacyObliqueBottomRight:[135,.5]};function mr(e,t){let n=r=>[r[0]*t[0][0]+r[1]*t[1][0]+r[2]*t[2][0],r[0]*t[0][1]+r[1]*t[1][1]+r[2]*t[2][1],r[0]*t[0][2]+r[1]*t[1][2]+r[2]*t[2][2]];return[n(e[0]),n(e[1]),n(e[2])]}function xr(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function br(e){let t=Cl[e.camera],n=e.cameraRot?[e.cameraRot.lat,e.cameraRot.lon,e.cameraRot.rev]:t?[t[0]/6e4,t[1]/6e4,t[2]/6e4]:void 0;if(n&&(n[0]!==0||n[1]!==0||n[2]!==0)){let[o,l,a]=n.map(u=>u*Xe),i=[[Math.cos(l),0,Math.sin(l)],[0,1,0],[-Math.sin(l),0,Math.cos(l)]],s=[[1,0,0],[0,Math.cos(o),-Math.sin(o)],[0,Math.sin(o),Math.cos(o)]],c=[[Math.cos(-a),-Math.sin(-a),0],[Math.sin(-a),Math.cos(-a),0],[0,0,1]];return{kind:"turn",rotation:mr(c,mr(s,i))}}let r=e.cameraRot?void 0:Ml[e.camera];if(r){let[o,l]=r;return{kind:"oblique",dx:-Math.cos(o*Xe)*l,dy:Math.sin(o*Xe)*l}}return{kind:"front"}}var Pl=.044,pr={dir:[-.017,-.707,.707],k:1.07},yr={dir:[-.227,.924,.307],k:.774},Wt={dir:[-.189,-.405,.894],k:.452,power:32.7},kl={t:0,tl:-90,l:-90,bl:-135,b:180,br:135,r:90,tr:45};function Sl(e){return/^(matte|powder|translucentPowder|dkEdge|softEdge|clear)$/.test(e)?0:/^(metal|softmetal)$/.test(e)?2:1}var Xt=(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2];function jt(e,t){let n=Math.cos(t*Xe),r=Math.sin(t*Xe);return[e[0]*n-e[1]*r,e[0]*r+e[1]*n,e[2]]}function Kt(e){let t=Math.hypot(e[0],e[1],e[2])||1;return[e[0]/t,e[1]/t,e[2]/t]}function gr(e){if(e.material==="flat"||e.material==="legacyWireframe"||/^(flat|legacyFlat\d)$/.test(e.lightRig))return{shade:()=>({level:1,white:0})};let t=kl[e.lightDir]??0,n=jt(pr.dir,t),r=jt(yr.dir,t),o=jt(Wt.dir,t),l=Sl(e.material)*Wt.k,a=s=>({level:Pl+pr.k*Math.max(0,Xt(s,n))+yr.k*Math.max(0,Xt(s,r)),white:l*Math.max(0,Xt(s,o))**Wt.power}),i=a([0,0,1]);return{shade:s=>{let c=a(s);return{level:c.level/i.level,white:Math.max(0,c.white-i.white)}}}}var je=8,yt=12,_l=4096,El=1024,Ll={circle:e=>Math.sqrt(Math.max(0,1-(1-e)**2)),angle:e=>e,relaxedInset:e=>{if(e<.4)return Math.sqrt(Math.max(0,1-(1-e/.4)**2));let t=(e-.4)/.6;return 1-.5*t*(2-t)},slope:e=>Math.min(1,e/.6),cross:e=>1-.5*Math.max(0,1-Math.abs(e-.45)/.1),softRound:e=>1-(1-e)**3,convex:e=>Math.sin(Math.PI*e/2),coolSlant:e=>e<.2?.6*e/.2:.6+.4*(e-.2)/.8,divot:e=>e<.5?Math.sqrt(Math.max(0,1-(1-e/.5)**2)):1-.3*Math.sin(Math.PI*(e-.5)/.5),riblet:e=>.5*e+.5*Math.abs(Math.sin(2*Math.PI*e)),hardEdge:e=>Math.min(1,e/.15),artDeco:e=>e<.15?e/.3:e<.35?.5:e<.5?.5+(e-.35)/.3:1};function vl(e){let t=[],n=0;for(let r of e){if(r.fill==="none")continue;let o=[],l={x:0,y:0},a=()=>{let s=o[o.length-1];s&&o.length>1&&Math.hypot(s.x-o[0].x,s.y-o[0].y)<1&&o.pop(),o.length>=3&&t.push(o),n+=o.length,o=[]},i=s=>{let c=o[o.length-1];(!c||Math.hypot(c.x-s.x,c.y-s.y)>=1)&&o.push(s),l=s};for(let s of r.commands){if(s.op==="M")a(),i({x:s.x,y:s.y});else if(s.op==="L")i({x:s.x,y:s.y});else if(s.op==="C"){let c=l;for(let u=1;u<=yt;u+=1){let f=u/yt,h=1-f;i({x:h*h*h*c.x+3*h*h*f*s.x1+3*h*f*f*s.x2+f*f*f*s.x,y:h*h*h*c.y+3*h*h*f*s.y1+3*h*f*f*s.y2+f*f*f*s.y})}}else if(s.op==="Q"){let c=l;for(let u=1;u<=yt;u+=1){let f=u/yt,h=1-f;i({x:h*h*c.x+2*h*f*s.x1+f*f*s.x,y:h*h*c.y+2*h*f*s.y1+f*f*s.y})}}else if(s.op==="Z"){let c=o[0];a(),c&&(l=c)}if(n+o.length>_l)return null}a()}return t}function Tl(e){let t=e.reduce((r,o)=>r+o.length,0),n=Math.ceil(t/El);return n<=1?[...e]:e.map(r=>r.filter((o,l)=>l%n===0)).filter(r=>r.length>=3)}function Cr(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e[n],o=e[(n+1)%e.length];t+=r.x*o.y-o.x*r.y}return t/2}function xt(e){let t=Cr(e)>=0?1:-1;return e.map((n,r)=>{let o=e[(r+1)%e.length],l=o.x-n.x,a=o.y-n.y,i=Math.hypot(l,a)||1;return{x:t*a/i,y:t*-l/i}})}function Mr(e,t,n){let r=e.length;return e.map((o,l)=>{let a=t[(l-1+r)%r],i=t[l],s=Math.max(.125,1+a.x*i.x+a.y*i.y),c=(a.x+i.x)/s,u=(a.y+i.y)/s,f=Math.hypot(c,u);return f>4&&(c*=4/f,u*=4/f),{x:o.x-c*n,y:o.y-u*n}})}function Qt(e,t,n){let r=Number.isFinite(t)?t:1,o=Number.isFinite(n)?n:0,l=a=>Math.max(0,Math.min(255,a*r+255*o));return{r:l(e.r),g:l(e.g),b:l(e.b),a:e.a}}var Al=1,wl=e=>e.points.every(t=>Number.isFinite(t.x)&&Number.isFinite(t.y))&&[e.color.r,e.color.g,e.color.b,e.color.a].every(Number.isFinite),Rl=e=>`${Math.round(e.r)},${Math.round(e.g)},${Math.round(e.b)},${Math.round(e.a*1e3)}`;function Yt(e){let t=[];for(let n of e){if(!wl(n))continue;let r=Rl(n.color),o=t[t.length-1];o?.key===r?o.polygons.push(n.points):t.push({polygons:[n.points],color:n.color,key:r})}return t.map(({polygons:n,color:r})=>({polygons:n,color:r}))}function Il(e,t,n,r,o,l){let a=Math.min(n.w,r);if(!(a>0)||!(Math.abs(Cr(e))>=Al))return[];let i=xt(e),s=Ll[n.preset],c=Array.from({length:je+1},(f,h)=>Mr(e,i,a*h/je)),u=[];for(let f=0;f<je;f+=1){let h=f/je,p=(f+1)/je,y=(s(p)-s(h))/(p-h)*(n.h/a),x=c[f],m=c[f+1];for(let k=0;k<e.length;k+=1){let L=(k+1)%e.length,b=t[k],{level:M,white:v}=l.shade(Kt([b.x*y,b.y*y,1]));u.push({points:[x[k],x[L],m[L],m[k]],color:Qt(o,M,v)})}}return u}function Nl(e,t){return xt(e.map(n=>Ke(t,n.x,n.y)))}var Ol=[1,0,0,1,0,0],Dl=1e-6;function Pr(e){let t=e.effects.threeD;if(!t)return null;let n=vl(e.paths);if(!n||n.length===0)return null;let r=Tl(n),o=br(t),l=gr(t),a=e.matrix,i=Ke(a,e.width/2,e.height/2),s=o.kind==="turn"?(()=>{let m=o.rotation,k=m[0][0],L=m[1][0],b=m[0][1],M=m[1][1];return[k,L,b,M,i.x-k*i.x-b*i.y,i.y-L*i.x-M*i.y]})():Ol,c={...e.color,a:1},u=[],f=[],h=[],p=Math.max(0,Math.min(e.width,e.height)/2);if(t.bevelTop)for(let m of r)u.push(...Il(m,Nl(m,a),t.bevelTop,p,c,l));if(t.contourW>0){let m=t.contourColor?{...t.contourColor}:c;for(let k of r){let L=xt(k),b=Mr(k,L,-t.contourW);for(let M=0;M<k.length;M+=1){let v=(M+1)%k.length;f.push({points:[b[M],b[v],k[v],k[M]],color:m})}}}let y=t.extrusionH+(t.bevelBottom?.h??0)+(t.bevelTop?.h??0);if(y>0&&o.kind!=="front"){let m=t.extrusionColor?{...t.extrusionColor,a:1}:c,k=[];for(let L of r){let b=L.map(v=>Ke(a,v.x,v.y)),M=xt(b);for(let v=0;v<b.length;v+=1){let O=b[v],T=b[(v+1)%b.length],w=M[v];if(o.kind==="oblique"){if(w.x*o.dx+w.y*o.dy<=0)continue;let N={x:o.dx*y,y:o.dy*y},{level:F,white:d}=l.shade(Kt([w.x,w.y,.35]));k.push({facet:{points:[O,T,{x:T.x+N.x,y:T.y+N.y},{x:O.x+N.x,y:O.y+N.y}],color:Qt(m,F,d)},z:0});continue}let S=o.rotation,V=(N,F)=>{let d=xr(S,[N.x-i.x,N.y-i.y,F]);return{x:i.x+d[0],y:i.y+d[1],z:d[2]}},H=[V(O,0),V(T,0),V(T,y),V(O,y)],{level:_,white:D}=l.shade([w.x,w.y,0]);k.push({facet:{points:H.map(({x:N,y:F})=>({x:N,y:F})),color:Qt(m,_,D)},z:H.reduce((N,F)=>N+F.z,0)/4})}}k.sort((L,b)=>b.z-L.z),h.push(...k.map(L=>L.facet));for(let L of r){let b=L.map(M=>{let v=Ke(a,M.x,M.y);return Ke(s,v.x,v.y)});h.push({points:b,color:m})}}if(u.length===0&&f.length===0&&h.length===0&&o.kind!=="turn")return null;let x=Math.abs(s[0]*s[3]-s[1]*s[2])>=Dl;return{front:s,showsFace:x,behind:Yt(h),under:Yt(f),over:Yt(u)}}function W(e){if(!Number.isFinite(e))return"0";let t=Math.round(e*100)/100;return Object.is(t,-0)?"0":String(t)}function B(e,t={},n=[]){return n.length>0?{tag:e,attrs:t,children:n}:{tag:e,attrs:t}}function Bl(e){return`matrix(${e.map(W).join(" ")})`}function Ye(e){return{filterUnits:"userSpaceOnUse",x:W(e.x),y:W(e.y),width:W(Math.max(1,e.r-e.x)),height:W(Math.max(1,e.b-e.y)),"color-interpolation-filters":"sRGB"}}var qt=127e4,Ul="0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1",Vl="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0";function _r(e,t,n){let r=Math.min(Math.abs(e),qt),o=Re(n,r+he),l={x:W(o.x),y:W(o.y),width:W(Math.max(1,o.r-o.x)),height:W(Math.max(1,o.b-o.y))},a=e>0,i=r/Math.SQRT2,s=Math.min(he,r),c=(f,h,p)=>B("feMorphology",{...l,in:`${t}-g`,operator:a?"dilate":"erode",radius:`${W(f)} ${W(h)}`,result:p}),u=a?"lighten":"darken";return[B("feColorMatrix",{...l,in:"SourceAlpha",type:"matrix",values:Ul,result:`${t}-g`}),c(r,s,`${t}-h`),c(s,r,`${t}-v`),c(i,i,`${t}-d`),B("feBlend",{...l,in:`${t}-h`,in2:`${t}-v`,mode:u,result:`${t}-hv`}),B("feBlend",{...l,in:`${t}-d`,in2:`${t}-hv`,mode:u,result:`${t}-m`}),B("feColorMatrix",{...l,in:`${t}-m`,type:"matrix",values:Vl,result:t})]}function zl(e,t,n){let r=[],{softEdge:o,innerShadow:l}=e,a="SourceGraphic",i=Math.max(t.r-t.x,t.b-t.y)/10+he;if(l){let c=Sr(l.blur),{dx:u,dy:f}=$t(l.dist,l.dir);i+=Math.abs(l.dist)+3*c,r.push(B("feComponentTransfer",{in:"SourceAlpha",result:"ia"},[B("feFuncA",{type:"table",tableValues:"1 0"})]),B("feGaussianBlur",{in:"ia",stdDeviation:W(c),result:"ib"}),B("feOffset",{in:"ib",dx:W(u),dy:W(f),result:"io"}),B("feFlood",{"flood-color":kr({...l.color,a:1}),"flood-opacity":W(l.color.a),result:"ic"}),B("feComposite",{in:"ic",in2:"io",operator:"in",result:"ish"}),B("feComposite",{in:"ish",in2:"SourceAlpha",operator:"in",result:"isc"}),B("feMerge",{result:"inner"},[B("feMergeNode",{in:"SourceGraphic"}),B("feMergeNode",{in:"isc"})])),a="inner"}if(o&&o.radius>0){let{spread:c,sigma:u}=hr(o.radius);if(Math.abs(c)>Math.min(t.r-t.x,t.b-t.y)/2){let f=n.id("fx"),h=B("feFlood",{"flood-opacity":"0"});return{defs:[B("filter",{id:f,...Ye(t)},[h])],filter:f}}i=Math.max(i,Math.min(Math.abs(c),qt)+he),r.push(..._r(c,"se",t),B("feGaussianBlur",{in:"se",stdDeviation:W(u),result:"sm"}),B("feComponentTransfer",{in:a,result:"so"},[B("feFuncA",{type:"discrete",tableValues:"1"})]),B("feComposite",{in:"so",in2:"sm",operator:"in",result:"sc"}),B("feComponentTransfer",{in:"SourceAlpha",result:"sb"},[B("feFuncA",{type:"linear",slope:"255",intercept:"0"})]),B("feComposite",{in:"sc",in2:"sb",operator:"in",result:"soft"}))}if(r.length===0)return null;let s=n.id("fx");return{defs:[B("filter",{id:s,...Ye(Re(t,i))},r)],filter:s}}function $l(e,t,n,r=!1){let o=e.glow;if(!o||o.radius<=0)return null;let l=n.id("glow"),{spread:a,sigma:i}=zt(Math.min(o.radius,2*qt));return{defs:[B("filter",{id:l,...Ye(Re(t,a+3*i+he))},[..._r(a,"gd",t),B("feGaussianBlur",{in:"gd",stdDeviation:W(i),result:"gb"}),B("feFlood",{"flood-color":kr({...o.color,a:1}),"flood-opacity":W(o.color.a),result:"gc"}),B("feComposite",{in:"gc",in2:"gb",operator:"in",result:"glow"}),...r?[]:[B("feMerge",{},[B("feMergeNode",{in:"glow"}),B("feMergeNode",{in:"SourceGraphic"})])]])],filter:l}}function Hl(e,t,n){let r=e.reflection;if(!r||r.startAlpha<=0&&r.endAlpha<=0)return null;let{matrix:o,line:l,start:a,end:i}=Gt(r,t.matrix,t.width,t.height),s=Vt(r.blur),c=Re(Ht(t.corners.map(x=>Fl(o,x.x,x.y))),3*s+he),u=[],f=n.id("fade");u.push(B("linearGradient",{id:f,gradientUnits:"userSpaceOnUse",x1:W(l.x1),y1:W(l.y1),x2:W(l.x2),y2:W(l.y2)},[B("stop",{offset:W(a),"stop-color":"#ffffff","stop-opacity":W(r.startAlpha)}),B("stop",{offset:W(i),"stop-color":"#ffffff","stop-opacity":W(r.endAlpha)})]));let h=n.id("reflect"),p={x:W(c.x),y:W(c.y),width:W(Math.max(1,c.r-c.x)),height:W(Math.max(1,c.b-c.y))};u.push(B("mask",{id:h,maskUnits:"userSpaceOnUse",...p},[B("rect",{...p,fill:`url(#${f})`})]));let y=B("use",{href:`#${t.contentId}`,transform:Bl(o)});if(s>0){let x=n.id("rblur");u.push(B("filter",{id:x,...Ye(c)},[B("feGaussianBlur",{in:"SourceGraphic",stdDeviation:W(s)})])),y=B("g",{filter:`url(#${x})`},[y])}return{defs:u,node:B("g",{mask:`url(#${h})`,"data-effect":"reflection"},[y])}}function Gl(e,t,n){let r=e.blur,o=r?Sr(r.radius):0;if(!r||o<=0)return null;let l=n.id("blur"),a=[B("feGaussianBlur",{in:"SourceGraphic",stdDeviation:W(o),result:"bl"}),...r.grow?[]:[B("feComposite",{in:"bl",in2:"SourceAlpha",operator:"in",result:"bi"})]],i=r.grow?3*o+he:he;return{defs:[B("filter",{id:l,...Ye(Re(t,i))},a)],filter:l}}var Er=Object.freeze({body:zl,glow:$l,reflection:Hl,blur:Gl,threeD:Pr});function Xl(e={}){Zt(e.licenseKey),Wl({effects:Er,chart:ur})}function ji(e={}){return Xl(e),Object.freeze({id:"drawing"})}export{ji as drawingModule,zt as glowSpread,$t as innerShadowShift,Xl as installDrawing,Vt as reflectionBlurSigma,Gt as reflectionFade};
package/dist/index.d.ts CHANGED
@@ -3,23 +3,13 @@ Copyright (c) 2026 Eigenpal, Inc. All rights reserved.
3
3
  Licensed under the EigenPal Pro Evaluation License 1.0. See LICENSE.md in this package.
4
4
  Production use requires a commercial agreement: licensing@eigenpal.com
5
5
  */
6
- import { ReviewDisplayMode, EditorModule, ReviewItem, EditorCollaborationSession, CollaborationIdentity, CollaborationFailureCode } from '@pptx-editor.dev/core/editor';
7
- import { P as ProLicenseOptions } from './license-Boo2wwCs.js';
6
+ export { R as ReviewModuleOptions, r as reviewModule } from './review-module-BreJaYRH.js';
8
7
  import { PptxPackage } from '@pptx-editor.dev/core/store';
8
+ import { ReviewItem, EditorCollaborationSession, EditorModule, CollaborationIdentity, CollaborationFailureCode } from '@pptx-editor.dev/core/editor';
9
+ export { CommentMarkerStyle, ReviewPaneOpening, ReviewPaneOptions } from '@pptx-editor.dev/core/editor';
10
+ import { P as ProLicenseOptions } from './license-Boo2wwCs.js';
9
11
  import * as Y from 'yjs';
10
12
 
11
- /** Options of `reviewModule`. @public */
12
- interface ReviewModuleOptions extends ProLicenseOptions {
13
- /** Display modes to unlock. Default: `final` and `markup`. */
14
- readonly displayModes?: readonly ReviewDisplayMode[];
15
- }
16
- /**
17
- * The review module. Register it with `createPptxEditor({ modules: [reviewModule()] })`.
18
- *
19
- * @public
20
- */
21
- declare function reviewModule(options?: ReviewModuleOptions): EditorModule;
22
-
23
13
  /** Every legacy comment of every slide, in slide order and then file order. */
24
14
  declare function legacyComments(pkg: PptxPackage): ReviewItem[];
25
15
 
@@ -99,5 +89,5 @@ declare class CollaborationSchemaError extends Error {
99
89
  detail?: string | undefined);
100
90
  }
101
91
 
102
- export { CollaborationSchemaError, ProLicenseOptions, collaborationModule, createYjsCollaborationSession, legacyComments, reviewModule };
103
- export type { AwarenessLike, CollaborationModuleOptions, ReviewModuleOptions, YjsCollaborationSession, YjsCollaborationSessionOptions };
92
+ export { CollaborationSchemaError, ProLicenseOptions, collaborationModule, createYjsCollaborationSession, legacyComments };
93
+ export type { AwarenessLike, CollaborationModuleOptions, YjsCollaborationSession, YjsCollaborationSessionOptions };