@silurus/ooxml 0.72.1 → 0.73.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/dist/chunk-DmhlhrBa.js +11 -0
- package/dist/docx-4NIiH5kn.js +25037 -0
- package/dist/docx.mjs +2 -2
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{find-cursor-CABDFafh.js → find-cursor-CaGrVs7z.js} +1522 -1458
- package/dist/highlight-rect-DZn1OD1x.js +988 -0
- package/dist/index.mjs +3 -3
- package/dist/math.mjs +1 -1
- package/dist/{mathjax-Dk_JzbFj.js → mathjax-BPjQ2C_j.js} +2 -2
- package/dist/{pptx-WoReGPPJ.js → pptx-BVDbKJFr.js} +1176 -1278
- package/dist/pptx.mjs +2 -2
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/render-worker-host-Bz0flu1p.js +27 -0
- package/dist/render-worker-host-Custze53.js +27 -0
- package/dist/render-worker-host-GLvdN4Ok.js +27 -0
- package/dist/types/docx.d.ts +3968 -4022
- package/dist/types/index.d.ts +8183 -8583
- package/dist/types/math.d.ts +41 -38
- package/dist/types/pptx.d.ts +3629 -3704
- package/dist/types/xlsx.d.ts +3218 -3301
- package/dist/{visible-index-YRawP6W8.js → visible-index-CyuaF_ZP.js} +11 -11
- package/dist/{xlsx-CHfWgWy8.js → xlsx-z4Bs4HLQ.js} +955 -941
- package/dist/xlsx.mjs +2 -2
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +16 -6
- package/dist/docx-CM-oHSyZ.js +0 -10241
- package/dist/highlight-rect-DIReGC3z.js +0 -881
- package/dist/render-worker-host-BNYGV6vm.js +0 -27
- package/dist/render-worker-host-CJc3E4ej.js +0 -27
- package/dist/render-worker-host-DcfYux0W.js +0 -27
- package/dist/segments-2VsQNClV.js +0 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
1
|
+
import { t as e } from "./chunk-DmhlhrBa.js";
|
|
2
|
+
import { At as t, B as n, Bt as r, C as i, D as a, Dt as o, E as s, Et as c, F as l, Ft as u, G as d, H as f, Ht as p, It as m, J as h, Jt as g, K as _, L as v, Lt as y, M as b, Mt as x, N as S, Nt as C, Ot as w, P as T, Pt as E, R as D, Rt as O, S as ee, T as k, Tt as A, U as j, Ut as te, V as M, W as N, Y as P, Yt as F, _ as I, _t as L, at as R, b as z, d as B, et as V, f as H, h as U, i as ne, jt as W, k as re, kt as ie, l as ae, lt as oe, m as se, mt as ce, n as le, nt as ue, o as G, p as de, q as fe, qt as K, r as pe, rt as me, t as he, ut as q, v as ge, vt as _e, w as ve, x as ye, xt as J, zt as be } from "./find-cursor-CaGrVs7z.js";
|
|
3
|
+
import { a as xe, i as Se, n as Ce, r as we, t as Te } from "./visible-index-CyuaF_ZP.js";
|
|
4
|
+
import { t as Ee } from "./mathjax-BPjQ2C_j.js";
|
|
5
5
|
//#region packages/core/src/sparkline/renderer.ts
|
|
6
|
-
function
|
|
6
|
+
function De(e, t, n) {
|
|
7
7
|
let { values: r } = n;
|
|
8
8
|
if (r.length === 0 || t.w <= 0 || t.h <= 0) return;
|
|
9
9
|
let i = n.colorSeries ?? "#5B9BD5", a = Math.min(2, t.w * .08), o = Math.max(2, t.h * .2), s = t.x + a, c = t.y + o, l = Math.max(1, t.w - a * 2), u = Math.max(1, t.h - o * 2), d = r.filter((e) => typeof e == "number");
|
|
@@ -12,11 +12,11 @@ function Oe(e, t, n) {
|
|
|
12
12
|
m === h && (h = m + 1, --m);
|
|
13
13
|
let g = h - m, _ = (e) => c + u - (e - m) / g * u;
|
|
14
14
|
if (n.kind === "stem") {
|
|
15
|
-
|
|
15
|
+
Ae(e, n, s, c, l, u);
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
if (n.kind === "column") {
|
|
19
|
-
|
|
19
|
+
ke(e, n, r, s, c, l, u, m, h);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
if (n.displayXAxis && m < 0 && h > 0) {
|
|
@@ -25,30 +25,30 @@ function Oe(e, t, n) {
|
|
|
25
25
|
e.moveTo(s, t), e.lineTo(s + l, t), e.stroke(), e.restore();
|
|
26
26
|
}
|
|
27
27
|
let v = r.length, y = (e) => v === 1 ? s + l / 2 : s + e / (v - 1) * l;
|
|
28
|
-
e.save(), e.strokeStyle = i, e.lineCap = "round", e.lineJoin = "round", e.lineWidth = (n.lineWeight ?? .75) *
|
|
29
|
-
let b = !1,
|
|
28
|
+
e.save(), e.strokeStyle = i, e.lineCap = "round", e.lineJoin = "round", e.lineWidth = (n.lineWeight ?? .75) * x, e.beginPath();
|
|
29
|
+
let b = !1, S = n.displayEmptyCellsAs ?? "gap";
|
|
30
30
|
for (let t = 0; t < v; t++) {
|
|
31
31
|
let n = r[t];
|
|
32
32
|
if (n == null) {
|
|
33
|
-
if (
|
|
33
|
+
if (S === "zero") {
|
|
34
34
|
let n = y(t), r = _(0);
|
|
35
35
|
b ? e.lineTo(n, r) : (e.moveTo(n, r), b = !0);
|
|
36
|
-
} else
|
|
36
|
+
} else S === "gap" && (b = !1);
|
|
37
37
|
continue;
|
|
38
38
|
}
|
|
39
39
|
let i = y(t), a = _(n);
|
|
40
40
|
b ? e.lineTo(i, a) : (e.moveTo(i, a), b = !0);
|
|
41
41
|
}
|
|
42
42
|
e.stroke(), e.restore();
|
|
43
|
-
let
|
|
43
|
+
let C = Math.max(1, Math.min(2.5, u * .12)), w = Oe(r, n);
|
|
44
44
|
for (let t = 0; t < v; t++) {
|
|
45
45
|
let a = r[t];
|
|
46
46
|
if (a == null) continue;
|
|
47
|
-
let o =
|
|
48
|
-
(n.markers || o != null) && (e.save(), e.fillStyle = o ?? n.colorMarkers ?? i, e.beginPath(), e.arc(y(t), _(a),
|
|
47
|
+
let o = w[t];
|
|
48
|
+
(n.markers || o != null) && (e.save(), e.fillStyle = o ?? n.colorMarkers ?? i, e.beginPath(), e.arc(y(t), _(a), C, 0, Math.PI * 2), e.fill(), e.restore());
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Oe(e, t) {
|
|
52
52
|
let n = e.map(() => null), r = e.map((e) => typeof e == "number" ? e : null), i = r.findIndex((e) => e != null), a = -1;
|
|
53
53
|
for (let e = r.length - 1; e >= 0; e--) if (r[e] != null) {
|
|
54
54
|
a = e;
|
|
@@ -63,10 +63,10 @@ function ke(e, t) {
|
|
|
63
63
|
if (t.low && t.colorLow && !Number.isNaN(c)) for (let e = 0; e < r.length; e++) r[e] === c && (n[e] = t.colorLow);
|
|
64
64
|
return n;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function ke(e, t, n, r, i, a, o, s, c) {
|
|
67
67
|
let l = n.length;
|
|
68
68
|
if (l === 0) return;
|
|
69
|
-
let u = s < 0 && c > 0 ? 0 : s, d = c - s, f = (e) => i + o - (e - s) / d * o, p = f(u), m = a / l, h = Math.min(1.5, m * .15), g =
|
|
69
|
+
let u = s < 0 && c > 0 ? 0 : s, d = c - s, f = (e) => i + o - (e - s) / d * o, p = f(u), m = a / l, h = Math.min(1.5, m * .15), g = Oe(n, t);
|
|
70
70
|
for (let i = 0; i < l; i++) {
|
|
71
71
|
let a = n[i];
|
|
72
72
|
if (a == null) continue;
|
|
@@ -74,10 +74,10 @@ function Ae(e, t, n, r, i, a, o, s, c) {
|
|
|
74
74
|
e.save(), e.fillStyle = o, e.fillRect(c, Math.min(p, s), l, Math.abs(p - s)), e.restore();
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function Ae(e, t, n, r, i, a) {
|
|
78
78
|
let o = t.values.length;
|
|
79
79
|
if (o === 0) return;
|
|
80
|
-
let s = r + a / 2, c = a / 2, l = i / o, u = Math.min(1.5, l * .15), d =
|
|
80
|
+
let s = r + a / 2, c = a / 2, l = i / o, u = Math.min(1.5, l * .15), d = Oe(t.values, t);
|
|
81
81
|
for (let r = 0; r < o; r++) {
|
|
82
82
|
let i = t.values[r];
|
|
83
83
|
if (i == null || i === 0) continue;
|
|
@@ -86,6 +86,11 @@ function je(e, t, n, r, i, a) {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
|
+
//#region packages/core/src/text/bidi/segments.ts
|
|
90
|
+
function je(e, t) {
|
|
91
|
+
return e === !0 ? "rtl" : e === !1 ? "ltr" : f().computeLevels(t, "auto").paragraphLevel === 1 ? "rtl" : "ltr";
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
89
94
|
//#region packages/xlsx/src/worker.ts?worker&inline
|
|
90
95
|
var Me = "var e=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,n.unregister(this),e}free(){let e=this.__destroy_into_raw();y.__wbg_xlsxarchive_free(e,0)}extract_image(e){let t=f(e,y.__wbindgen_malloc,y.__wbindgen_realloc),n=v,r=y.xlsxarchive_extract_image(this.__wbg_ptr,t,n);if(r[3])throw p(r[2]);var a=i(r[0],r[1]).slice();return y.__wbindgen_free(r[0],r[1]*1,1),a}constructor(e,t){let r=d(e,y.__wbindgen_malloc),i=v,a=y.xlsxarchive_new(r,i,!u(t),u(t)?BigInt(0):t);if(a[2])throw p(a[1]);return this.__wbg_ptr=a[0]>>>0,n.register(this,this.__wbg_ptr,this),this}parse(){let e=y.xlsxarchive_parse(this.__wbg_ptr);if(e[3])throw p(e[2]);var t=i(e[0],e[1]).slice();return y.__wbindgen_free(e[0],e[1]*1,1),t}parse_sheet(e,t){let n=f(t,y.__wbindgen_malloc,y.__wbindgen_realloc),r=v,a=y.xlsxarchive_parse_sheet(this.__wbg_ptr,e,n,r);if(a[3])throw p(a[2]);var o=i(a[0],a[1]).slice();return y.__wbindgen_free(a[0],a[1]*1,1),o}to_markdown(){let e,t;try{let i=y.xlsxarchive_to_markdown(this.__wbg_ptr);var n=i[0],r=i[1];if(i[3])throw n=0,r=0,p(i[2]);return e=n,t=r,s(n,r)}finally{y.__wbindgen_free(e,t,1)}}};Symbol.dispose&&(e.prototype[Symbol.dispose]=e.prototype.free);function t(){return{__proto__:null,\"./xlsx_parser_bg.js\":{__proto__:null,__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(e,t){let n=f(r(t),y.__wbindgen_malloc,y.__wbindgen_realloc),i=v;o().setInt32(e+4,i,!0),o().setInt32(e+0,n,!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(e,t){let n=t,r=typeof n==`string`?n:void 0;var i=u(r)?0:f(r,y.__wbindgen_malloc,y.__wbindgen_realloc),a=v;o().setInt32(e+4,a,!0),o().setInt32(e+0,i,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw Error(s(e,t))},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(s(e,t))}finally{y.__wbindgen_free(n,r,1)}},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=f(n,y.__wbindgen_malloc,y.__wbindgen_realloc),i=v;o().setInt32(e+4,i,!0),o().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return s(e,t)},__wbindgen_init_externref_table:function(){let e=y.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}const n=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>y.__wbg_xlsxarchive_free(e>>>0,1));function r(e){let t=typeof e;if(t==`number`||t==`boolean`||e==null)return`${e}`;if(t==`string`)return`\"${e}\"`;if(t==`symbol`){let t=e.description;return t==null?`Symbol`:`Symbol(${t})`}if(t==`function`){let t=e.name;return typeof t==`string`&&t.length>0?`Function(${t})`:`Function`}if(Array.isArray(e)){let t=e.length,n=`[`;t>0&&(n+=r(e[0]));for(let i=1;i<t;i++)n+=`, `+r(e[i]);return n+=`]`,n}let n=/\\[object ([^\\]]+)\\]/.exec(toString.call(e)),i;if(n&&n.length>1)i=n[1];else return toString.call(e);if(i==`Object`)try{return`Object(`+JSON.stringify(e)+`)`}catch{return`Object`}return e instanceof Error?`${e.name}: ${e.message}\\n${e.stack}`:i}function i(e,t){return e>>>=0,l().subarray(e/1,e/1+t)}let a=null;function o(){return(a===null||a.buffer.detached===!0||a.buffer.detached===void 0&&a.buffer!==y.memory.buffer)&&(a=new DataView(y.memory.buffer)),a}function s(e,t){return e>>>=0,g(e,t)}let c=null;function l(){return(c===null||c.byteLength===0)&&(c=new Uint8Array(y.memory.buffer)),c}function u(e){return e==null}function d(e,t){let n=t(e.length*1,1)>>>0;return l().set(e,n/1),v=e.length,n}function f(e,t,n){if(n===void 0){let n=_.encode(e),r=t(n.length,1)>>>0;return l().subarray(r,r+n.length).set(n),v=n.length,r}let r=e.length,i=t(r,1)>>>0,a=l(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=l().subarray(i+o,i+r),a=_.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return v=o,i}function p(e){let t=y.__wbindgen_externrefs.get(e);return y.__externref_table_dealloc(e),t}let m=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});m.decode();let h=0;function g(e,t){return h+=t,h>=2146435072&&(m=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),m.decode(),h=t),m.decode(l().subarray(e,e+t))}const _=new TextEncoder;`encodeInto`in _||(_.encodeInto=function(e,t){let n=_.encode(e);return t.set(n),{read:e.length,written:n.length}});let v=0,y;function b(e,t){return y=e.exports,a=null,c=null,y.__wbindgen_start(),y}async function x(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.ok&&n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}async function S(e){if(y!==void 0)return y;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`));let n=t();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:r,module:i}=await x(await e,n);return b(r,i)}async function C(e){return y=void 0,a=null,c=null,S(e)}function w(e){if(!e.startsWith(`data:`))return null;let t=e.indexOf(`,`);if(t===-1)return null;let n=atob(e.slice(t+1)),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}var T=class e extends Error{code=`parser-crashed`;constructor(t){super(t),this.name=`WasmTrapError`,Object.setPrototypeOf(this,e.prototype)}};function E(e){let t=globalThis.WebAssembly?.RuntimeError;if(t&&e instanceof t||e instanceof RangeError)return!0;if(e instanceof Error){let t=e.name;if(t===`RuntimeError`||t===`CompileError`||t===`LinkError`)return!0}return!1}const D=new class{_init;_opts;_wasmInput=null;_initPromise=null;_poisoned=!1;_archive=null;constructor(e,t={}){this._init=e,this._opts=t}setWasmUrl(e){this._wasmInput=e,this._poisoned=!1,this._initPromise=this._init(e)}get archive(){return this._archive}setArchive(e){this._freeArchive(),this._archive=e}disposeArchive(){this._freeArchive()}_freeArchive(){this._archive!=null&&this._opts.freeArchive&&this._opts.freeArchive(this._archive),this._archive=null}get poisoned(){return this._poisoned}async ensureReady(){if(this._poisoned){if(this._wasmInput===null)throw Error(`WasmParserHost: setWasmUrl was never called`);let e=(this._opts.reinit??this._init)(this._wasmInput);this._initPromise=e,await e,this._poisoned=!1;return}if(this._initPromise===null)throw Error(`WasmParserHost: setWasmUrl was never called`);await this._initPromise}run(e){try{return e()}catch(e){throw E(e)?(this._poison(),new T(`WASM parser trapped and was recycled: ${e instanceof Error?e.message:String(e)}`)):e}}poison(){this._poison()}_poison(){if(this._poisoned=!0,this._initPromise=null,this._archive!=null&&this._opts.freeArchive)try{this._opts.freeArchive(this._archive)}catch{}this._archive=null}}(S,{freeArchive:e=>e.free(),reinit:C});self.onmessage=async t=>{let n=t.data;if(n.type===`init`){D.setWasmUrl(w(n.wasmUrl)??n.wasmUrl);return}let r=n.id;try{if(await D.ensureReady(),n.type===`parse`){let t=typeof n.maxZipEntryBytes==`number`&&n.maxZipEntryBytes>0?BigInt(n.maxZipEntryBytes):void 0,i=new Uint8Array(n.data),a=D.run(()=>{let n=new e(i,t);return D.setArchive(n),n.parse()}).buffer,o={type:`parsed`,id:r,workbookJson:a};self.postMessage(o,[a]);return}let t=D.archive;if(n.type===`parseSheet`){if(!t)throw Error(`parseSheet before parse: no archive retained`);let e=D.run(()=>t.parse_sheet(n.sheetIndex,n.sheetName)).buffer,i={type:`parsedSheet`,id:r,worksheetJson:e};self.postMessage(i,[e]);return}if(n.type===`extractImage`){if(!t)throw Error(`No xlsx loaded`);let e=D.run(()=>t.extract_image(n.path).buffer),i={type:`imageExtracted`,id:r,bytes:e};self.postMessage(i,[e]);return}if(n.type===`toMarkdown`){if(!t)throw Error(`No xlsx loaded`);let e={type:`markdownRendered`,id:r,markdown:D.run(()=>t.to_markdown())};self.postMessage(e);return}}catch(e){let t={type:`error`,id:r,message:String(e)};self.postMessage(t)}};", Ne = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", Me], { type: "text/javascript;charset=utf-8" });
|
|
91
96
|
function Pe(e) {
|
|
@@ -633,16 +638,16 @@ function pt(e) {
|
|
|
633
638
|
}
|
|
634
639
|
function mt() {
|
|
635
640
|
let e = /* @__PURE__ */ new Date();
|
|
636
|
-
return
|
|
641
|
+
return ie(new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())), !1);
|
|
637
642
|
}
|
|
638
643
|
function ht() {
|
|
639
|
-
return
|
|
644
|
+
return ie(new Date(Date.now()), !1);
|
|
640
645
|
}
|
|
641
646
|
function gt(e, t, n) {
|
|
642
|
-
return Math.floor(
|
|
647
|
+
return Math.floor(ie(new Date(Date.UTC(e, t - 1, n)), !1));
|
|
643
648
|
}
|
|
644
649
|
function _t(e) {
|
|
645
|
-
return
|
|
650
|
+
return w(Math.floor(e), !1);
|
|
646
651
|
}
|
|
647
652
|
function vt(e) {
|
|
648
653
|
let t = _t(e);
|
|
@@ -813,69 +818,69 @@ function At(e) {
|
|
|
813
818
|
};
|
|
814
819
|
}
|
|
815
820
|
function jt(e, t, n = !1) {
|
|
816
|
-
let r =
|
|
817
|
-
for (;
|
|
818
|
-
let t =
|
|
821
|
+
let r = w(e, n), i = r.getUTCFullYear(), a = r.getUTCMonth() + 1, o = r.getUTCDate(), s = r.getUTCDay(), c = r.getUTCHours(), l = r.getUTCMinutes(), u = r.getUTCSeconds(), d = t.split(";")[0], f = /am\/pm|a\/p/i.test(d), p = null, m = () => p ??= At(r), h = "", g = 0, _ = !1;
|
|
822
|
+
for (; g < d.length;) {
|
|
823
|
+
let t = d[g];
|
|
819
824
|
if (t === "\"") {
|
|
820
|
-
for (
|
|
821
|
-
|
|
825
|
+
for (g++; g < d.length && d[g] !== "\"";) h += d[g++];
|
|
826
|
+
g < d.length && g++, _ = !1;
|
|
822
827
|
} else if (t === "[") {
|
|
823
|
-
let t =
|
|
828
|
+
let t = d.indexOf("]", g), n = t > g ? d.slice(g + 1, t) : "", r = n.match(/^([hms])\1*$/i);
|
|
824
829
|
if (r) {
|
|
825
830
|
let i = r[1].toLowerCase(), a = e < 0 ? "-" : "", o = Math.floor(Math.abs(e) * 86400), s;
|
|
826
831
|
s = i === "h" ? Math.floor(o / 3600) : i === "m" ? Math.floor(o / 60) : o;
|
|
827
832
|
let c = n.length >= 2 ? String(s).padStart(n.length, "0") : String(s);
|
|
828
|
-
|
|
833
|
+
h += a + c, g = t + 1, _ = i === "h";
|
|
829
834
|
} else {
|
|
830
|
-
for (;
|
|
831
|
-
|
|
835
|
+
for (; g < d.length && d[g] !== "]";) g++;
|
|
836
|
+
g < d.length && g++;
|
|
832
837
|
}
|
|
833
|
-
} else if (t === "_")
|
|
834
|
-
else if (t === "*")
|
|
835
|
-
else if (t === "\\")
|
|
838
|
+
} else if (t === "_") g += 2;
|
|
839
|
+
else if (t === "*") g += 2;
|
|
840
|
+
else if (t === "\\") g + 1 < d.length && (h += d[g + 1]), g += 2, _ = !1;
|
|
836
841
|
else if (t === "y" || t === "Y") {
|
|
837
842
|
let e = 0;
|
|
838
|
-
for (;
|
|
839
|
-
|
|
843
|
+
for (; g < d.length && d[g].toLowerCase() === "y";) e++, g++;
|
|
844
|
+
h += e <= 2 ? String(i).slice(-2) : String(i).padStart(4, "0"), _ = !1;
|
|
840
845
|
} else if (t === "m" || t === "M") {
|
|
841
846
|
let e = 0;
|
|
842
|
-
for (;
|
|
843
|
-
let t =
|
|
844
|
-
|
|
847
|
+
for (; g < d.length && d[g].toLowerCase() === "m";) e++, g++;
|
|
848
|
+
let t = d.slice(g).replace(/\[[^\]]*\]/g, "");
|
|
849
|
+
_ || /^:s/i.test(t) ? h += e >= 2 ? String(l).padStart(2, "0") : String(l) : e === 1 ? h += String(a) : e === 2 ? h += String(a).padStart(2, "0") : e === 3 ? h += Tt[a - 1].slice(0, 3) : e === 4 ? h += Tt[a - 1] : h += Tt[a - 1][0], _ = !1;
|
|
845
850
|
} else if (t === "d" || t === "D") {
|
|
846
851
|
let e = 0;
|
|
847
|
-
for (;
|
|
848
|
-
e === 1 ?
|
|
852
|
+
for (; g < d.length && d[g].toLowerCase() === "d";) e++, g++;
|
|
853
|
+
e === 1 ? h += String(o) : e === 2 ? h += String(o).padStart(2, "0") : e === 3 ? h += Et[s].slice(0, 3) : h += Et[s], _ = !1;
|
|
849
854
|
} else if (t === "h" || t === "H") {
|
|
850
855
|
let e = 0;
|
|
851
|
-
for (;
|
|
852
|
-
let t =
|
|
853
|
-
|
|
856
|
+
for (; g < d.length && d[g].toLowerCase() === "h";) e++, g++;
|
|
857
|
+
let t = f ? c % 12 || 12 : c;
|
|
858
|
+
h += e >= 2 ? String(t).padStart(2, "0") : String(t), _ = !0;
|
|
854
859
|
} else if (t === "s" || t === "S") {
|
|
855
860
|
let e = 0;
|
|
856
|
-
for (;
|
|
857
|
-
|
|
861
|
+
for (; g < d.length && d[g].toLowerCase() === "s";) e++, g++;
|
|
862
|
+
h += e >= 2 ? String(u).padStart(2, "0") : String(u), _ = !1;
|
|
858
863
|
} else if (t === "g" || t === "G") {
|
|
859
864
|
let e = 0;
|
|
860
|
-
for (;
|
|
861
|
-
let t =
|
|
862
|
-
e === 1 ?
|
|
865
|
+
for (; g < d.length && d[g].toLowerCase() === "g";) e++, g++;
|
|
866
|
+
let t = m();
|
|
867
|
+
e === 1 ? h += t.abbr : e === 2 ? h += t.short : h += t.long, _ = !1;
|
|
863
868
|
} else if (t === "e" || t === "E") {
|
|
864
869
|
let e = 0;
|
|
865
|
-
for (;
|
|
866
|
-
let t =
|
|
867
|
-
|
|
870
|
+
for (; g < d.length && d[g].toLowerCase() === "e";) e++, g++;
|
|
871
|
+
let t = m().year;
|
|
872
|
+
h += e >= 2 ? String(t).padStart(2, "0") : String(t), _ = !1;
|
|
868
873
|
} else if (t === "r" || t === "R") {
|
|
869
874
|
let e = 0;
|
|
870
|
-
for (;
|
|
871
|
-
let t =
|
|
872
|
-
|
|
875
|
+
for (; g < d.length && d[g].toLowerCase() === "r";) e++, g++;
|
|
876
|
+
let t = m().year;
|
|
877
|
+
h += e >= 2 ? String(t).padStart(2, "0") : String(t), _ = !1;
|
|
873
878
|
} else if (t === "A" || t === "a") {
|
|
874
|
-
let e =
|
|
875
|
-
e.startsWith("AAAA") ? (
|
|
876
|
-
} else
|
|
879
|
+
let e = d.slice(g).toUpperCase();
|
|
880
|
+
e.startsWith("AAAA") ? (h += Ot[s], g += 4) : e.startsWith("AAA") ? (h += Dt[s], g += 3) : e.startsWith("AM/PM") ? (h += c < 12 ? "AM" : "PM", g += 5) : e.startsWith("A/P") ? (h += c < 12 ? "A" : "P", g += 3) : (h += t, g++), _ = !1;
|
|
881
|
+
} else h += t, g++, t !== ":" && t !== "/" && t !== "-" && t !== "." && t !== " " && (_ = !1);
|
|
877
882
|
}
|
|
878
|
-
return
|
|
883
|
+
return h;
|
|
879
884
|
}
|
|
880
885
|
function Mt(e) {
|
|
881
886
|
if (/\[[hms]+\]/i.test(e)) return !0;
|
|
@@ -1104,9 +1109,9 @@ function Yt(e, t, n) {
|
|
|
1104
1109
|
function Xt(e, t, n) {
|
|
1105
1110
|
let r = Gt(t), i = n ? Math.abs(e) : e;
|
|
1106
1111
|
r.hasPercent && (i *= 100), r.commaScale > 0 && (i /= 1e3 ** r.commaScale);
|
|
1107
|
-
let a = i < 0 ? "-" : "",
|
|
1112
|
+
let a = i < 0 ? "-" : "", s = Math.abs(i);
|
|
1108
1113
|
if (r.fraction) {
|
|
1109
|
-
let e = Math.floor(
|
|
1114
|
+
let e = Math.floor(s), t = s - e, { wholeSpec: n, numSpec: i, denSpec: o, fixedDen: c } = r.fraction, l = n.length > 0, [u, d] = Yt(t, o.length, c), f = (e, t) => {
|
|
1110
1115
|
let n = String(e), r = t.includes("0") ? "0" : " ";
|
|
1111
1116
|
for (; n.length < t.length;) n = r + n;
|
|
1112
1117
|
return n;
|
|
@@ -1118,25 +1123,25 @@ function Xt(e, t, n) {
|
|
|
1118
1123
|
if (l) {
|
|
1119
1124
|
let t = e > 0 ? String(e) : n.includes("0") ? "0" : "";
|
|
1120
1125
|
if (u === 0) {
|
|
1121
|
-
let e = c === null ?
|
|
1126
|
+
let e = c === null ? o.length || 1 : String(c).length;
|
|
1122
1127
|
m += t + " ".repeat(1 + i.length + 1 + e);
|
|
1123
1128
|
} else {
|
|
1124
|
-
let e = c === null ? p(d,
|
|
1129
|
+
let e = c === null ? p(d, o) : String(c);
|
|
1125
1130
|
m += t + " " + f(u, i) + "/" + e;
|
|
1126
1131
|
}
|
|
1127
1132
|
} else {
|
|
1128
|
-
let t = u + e * d, n = c === null ? p(d,
|
|
1133
|
+
let t = u + e * d, n = c === null ? p(d, o) : String(c);
|
|
1129
1134
|
m += f(t, i) + "/" + n;
|
|
1130
1135
|
}
|
|
1131
1136
|
return m;
|
|
1132
1137
|
}
|
|
1133
1138
|
if (r.exp) {
|
|
1134
1139
|
let e = Math.max(r.intSpec.length, 1), t = r.fracSpec.length, n = 0, i = 0;
|
|
1135
|
-
|
|
1136
|
-
let [c, l = ""] =
|
|
1140
|
+
s !== 0 && (i = Math.floor(Math.log10(s)), i = Math.floor(i / e) * e, n = s / 10 ** i, parseFloat(o(n, t)) >= 10 ** e && (i += e, n = s / 10 ** i));
|
|
1141
|
+
let [c, l = ""] = o(n, t).split(".");
|
|
1137
1142
|
return a + Zt(r, qt(c, r.intSpec, !1), Jt(l, r.fracSpec), "E" + (i < 0 ? "-" : r.exp.plus ? "+" : "") + String(Math.abs(i)).padStart(r.exp.width, "0"));
|
|
1138
1143
|
}
|
|
1139
|
-
let c = r.fracSpec.length, [l, u = ""] = s
|
|
1144
|
+
let c = r.fracSpec.length, [l, u = ""] = o(s, c).split("."), d = l.replace(/^0+/, ""), f = /[0]/.test(r.intSpec) || r.intSpec === "" && !1;
|
|
1140
1145
|
return d === "" && f && (d = "0"), a + Zt(r, qt(d, r.intSpec, r.grouping), Jt(u, r.fracSpec), "");
|
|
1141
1146
|
}
|
|
1142
1147
|
function Zt(e, t, n, r) {
|
|
@@ -1390,36 +1395,36 @@ function fn(e, t, n, r, i) {
|
|
|
1390
1395
|
//#endregion
|
|
1391
1396
|
//#region packages/xlsx/src/bidi-line.ts
|
|
1392
1397
|
function pn(e, t) {
|
|
1393
|
-
return e === 2 ? !0 : e === 1 ? !1 :
|
|
1398
|
+
return e === 2 ? !0 : e === 1 ? !1 : je(void 0, t) === "rtl";
|
|
1394
1399
|
}
|
|
1395
1400
|
var mn = (e) => {
|
|
1396
1401
|
let t = e.text;
|
|
1397
1402
|
return typeof t == "string" ? t : void 0;
|
|
1398
1403
|
};
|
|
1399
1404
|
function hn(e, t) {
|
|
1400
|
-
let
|
|
1405
|
+
let n = e === 2 || M(t);
|
|
1401
1406
|
return {
|
|
1402
|
-
needBidi:
|
|
1403
|
-
baseRtl:
|
|
1407
|
+
needBidi: n,
|
|
1408
|
+
baseRtl: n && pn(e, t)
|
|
1404
1409
|
};
|
|
1405
1410
|
}
|
|
1406
1411
|
function gn(e, t) {
|
|
1407
|
-
let
|
|
1408
|
-
if (
|
|
1412
|
+
let r = e.length;
|
|
1413
|
+
if (r === 0) return {
|
|
1409
1414
|
order: [],
|
|
1410
1415
|
rtl: []
|
|
1411
1416
|
};
|
|
1412
|
-
let
|
|
1413
|
-
for (let t = 0; t <
|
|
1414
|
-
|
|
1417
|
+
let i = "", a = Array(r);
|
|
1418
|
+
for (let t = 0; t < r; t++) {
|
|
1419
|
+
a[t] = i.length;
|
|
1415
1420
|
let n = mn(e[t]) ?? "";
|
|
1416
|
-
|
|
1421
|
+
i += n.length > 0 ? n : "";
|
|
1417
1422
|
}
|
|
1418
|
-
let { levels:
|
|
1419
|
-
for (let e = 0; e <
|
|
1423
|
+
let { levels: o, paragraphLevel: s } = f().computeLevels(i, t ? "rtl" : "ltr"), { order: c, segLevels: l } = n(o, s, a), u = Array(r);
|
|
1424
|
+
for (let e = 0; e < r; e++) u[e] = (l[e] & 1) == 1;
|
|
1420
1425
|
return {
|
|
1421
|
-
order:
|
|
1422
|
-
rtl:
|
|
1426
|
+
order: c,
|
|
1427
|
+
rtl: u
|
|
1423
1428
|
};
|
|
1424
1429
|
}
|
|
1425
1430
|
//#endregion
|
|
@@ -1445,25 +1450,25 @@ function vn(e, t) {
|
|
|
1445
1450
|
//#endregion
|
|
1446
1451
|
//#region packages/xlsx/src/vertical-text.ts
|
|
1447
1452
|
function yn(e, t, n, r, a, o = !1) {
|
|
1448
|
-
let s = t.codePointAt(0) ?? 0, c =
|
|
1449
|
-
if (o &&
|
|
1450
|
-
e.save(), e.translate(n, r + a / 2), e.textAlign = "center", e.textBaseline = "middle",
|
|
1453
|
+
let s = t.codePointAt(0) ?? 0, c = ee(s);
|
|
1454
|
+
if (o && i(s)) {
|
|
1455
|
+
e.save(), e.translate(n, r + a / 2), e.textAlign = "center", e.textBaseline = "middle", ge(e, () => e.fillText(t, 0, 0)), e.restore();
|
|
1451
1456
|
return;
|
|
1452
1457
|
}
|
|
1453
1458
|
if (c === "Tr") {
|
|
1454
|
-
let
|
|
1455
|
-
if (
|
|
1456
|
-
e.fillText(String.fromCodePoint(
|
|
1459
|
+
let i = z(s);
|
|
1460
|
+
if (i !== null) {
|
|
1461
|
+
e.fillText(String.fromCodePoint(i), n, r);
|
|
1457
1462
|
return;
|
|
1458
1463
|
}
|
|
1459
|
-
if (
|
|
1464
|
+
if (ve(s)) {
|
|
1460
1465
|
e.fillText(t, n, r);
|
|
1461
1466
|
return;
|
|
1462
1467
|
}
|
|
1463
1468
|
e.save(), e.translate(n, r + a / 2), e.rotate(Math.PI / 2), e.textAlign = "center", e.textBaseline = "middle", e.fillText(t, 0, 0), e.restore();
|
|
1464
1469
|
return;
|
|
1465
1470
|
}
|
|
1466
|
-
let l = c === "Tu" ?
|
|
1471
|
+
let l = c === "Tu" ? ye(s) : null;
|
|
1467
1472
|
e.fillText(l === null ? t : String.fromCodePoint(l), n, r);
|
|
1468
1473
|
}
|
|
1469
1474
|
//#endregion
|
|
@@ -1471,12 +1476,12 @@ function yn(e, t, n, r, a, o = !1) {
|
|
|
1471
1476
|
function bn(e, t) {
|
|
1472
1477
|
return t ? `${e}|duo:${t.clr1}:${t.clr2}` : e;
|
|
1473
1478
|
}
|
|
1474
|
-
var xn =
|
|
1479
|
+
var xn = C.map((e) => `"${e}"`).join(", "), Sn = E.map((e) => `"${e}"`).join(", "), Cn = `"Calibri", "Carlito", "Cambria", "Caladea", Arial, "Noto Naskh Arabic", "Noto Sans Arabic", ${xn}, sans-serif`, wn = `"Cambria", "Caladea", "Times New Roman", "Liberation Serif", "Noto Naskh Arabic", "Noto Sans Arabic", ${Sn}, serif`, Tn = "\"Courier New\", \"Liberation Mono\", monospace";
|
|
1475
1480
|
function En(e) {
|
|
1476
|
-
let t = e ?
|
|
1481
|
+
let t = e ? y(e) : null, n = O(e);
|
|
1477
1482
|
if (!t) return n === "serif" ? wn : n === "mono" ? Tn : Cn;
|
|
1478
1483
|
let r = n === "serif";
|
|
1479
|
-
return `${
|
|
1484
|
+
return `${m(t, r ? "serif" : "sans").map((e) => `"${e}"`).join(", ")}, "Calibri", "Carlito", "Cambria", "Caladea", Arial, "Noto Naskh Arabic", "Noto Sans Arabic", ${r ? Sn : xn}, ${r ? "serif" : "sans-serif"}`;
|
|
1480
1485
|
}
|
|
1481
1486
|
function Dn(e) {
|
|
1482
1487
|
return e ? `"${e}", ${En(e)}` : Cn;
|
|
@@ -1485,7 +1490,10 @@ var On = 11, kn = 8;
|
|
|
1485
1490
|
function An(e, t, n) {
|
|
1486
1491
|
return n - e - t;
|
|
1487
1492
|
}
|
|
1488
|
-
|
|
1493
|
+
function jn(e, t, n, r) {
|
|
1494
|
+
return r ? An(e, t, n) : e;
|
|
1495
|
+
}
|
|
1496
|
+
var Mn = "#7a7a7a", Nn = /* @__PURE__ */ new Map(), Pn = {
|
|
1489
1497
|
"meiryo ui": {
|
|
1490
1498
|
10: 8,
|
|
1491
1499
|
11: 8
|
|
@@ -1495,12 +1503,12 @@ var jn = "#7a7a7a", Mn = /* @__PURE__ */ new Map(), Nn = {
|
|
|
1495
1503
|
11: 8
|
|
1496
1504
|
}
|
|
1497
1505
|
};
|
|
1498
|
-
function
|
|
1499
|
-
let n = `${e}:${t}`, r =
|
|
1506
|
+
function Fn(e, t) {
|
|
1507
|
+
let n = `${e}:${t}`, r = Nn.get(n);
|
|
1500
1508
|
if (r !== void 0) return r;
|
|
1501
|
-
let i =
|
|
1502
|
-
if (i !== void 0) return
|
|
1503
|
-
let a = t *
|
|
1509
|
+
let i = Pn[e.toLowerCase()]?.[Math.round(t)];
|
|
1510
|
+
if (i !== void 0) return Nn.set(n, i), i;
|
|
1511
|
+
let a = t * x, o = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(1, 1) : typeof document < "u" ? document.createElement("canvas") : null;
|
|
1504
1512
|
if (!o) return kn;
|
|
1505
1513
|
let s = o.getContext("2d");
|
|
1506
1514
|
if (!s) return kn;
|
|
@@ -1511,33 +1519,33 @@ function Pn(e, t) {
|
|
|
1511
1519
|
t > c && (c = t);
|
|
1512
1520
|
}
|
|
1513
1521
|
let l = Math.round(c) || kn;
|
|
1514
|
-
return
|
|
1522
|
+
return Nn.set(n, l), l;
|
|
1515
1523
|
}
|
|
1516
1524
|
function Z(e) {
|
|
1517
|
-
return !e.defaultFontFamily || !e.defaultFontSize ? kn :
|
|
1525
|
+
return !e.defaultFontFamily || !e.defaultFontSize ? kn : Fn(e.defaultFontFamily, e.defaultFontSize);
|
|
1518
1526
|
}
|
|
1519
1527
|
function Q(e, t = kn) {
|
|
1520
1528
|
return Math.trunc((256 * e + Math.trunc(128 / t)) / 256 * t);
|
|
1521
1529
|
}
|
|
1522
|
-
function
|
|
1530
|
+
function In(e, t = kn) {
|
|
1523
1531
|
return e / t;
|
|
1524
1532
|
}
|
|
1525
1533
|
function $(e) {
|
|
1526
|
-
return Math.round(e *
|
|
1534
|
+
return Math.round(e * x);
|
|
1527
1535
|
}
|
|
1528
|
-
function
|
|
1529
|
-
return e /
|
|
1536
|
+
function Ln(e) {
|
|
1537
|
+
return e / x;
|
|
1530
1538
|
}
|
|
1531
|
-
function
|
|
1539
|
+
function Rn(e, t, n, r, i, a, o) {
|
|
1532
1540
|
if (!(i <= 0 || a <= 0)) {
|
|
1533
1541
|
if (o) {
|
|
1534
1542
|
let a = e.createLinearGradient(n, r, n + i, r);
|
|
1535
|
-
a.addColorStop(0,
|
|
1536
|
-
} else e.fillStyle =
|
|
1543
|
+
a.addColorStop(0, J(t, .85)), a.addColorStop(1, J(t, .15)), e.fillStyle = a;
|
|
1544
|
+
} else e.fillStyle = J(t);
|
|
1537
1545
|
e.fillRect(n, r, i, a);
|
|
1538
1546
|
}
|
|
1539
1547
|
}
|
|
1540
|
-
function
|
|
1548
|
+
function zn(e) {
|
|
1541
1549
|
switch (e) {
|
|
1542
1550
|
case "solid": return 1;
|
|
1543
1551
|
case "darkGray": return .75;
|
|
@@ -1560,7 +1568,7 @@ function Rn(e) {
|
|
|
1560
1568
|
default: return 1;
|
|
1561
1569
|
}
|
|
1562
1570
|
}
|
|
1563
|
-
var
|
|
1571
|
+
var Bn = /* @__PURE__ */ new Map(), Vn = {
|
|
1564
1572
|
gray0625: [
|
|
1565
1573
|
128,
|
|
1566
1574
|
0,
|
|
@@ -1722,42 +1730,42 @@ var zn = /* @__PURE__ */ new Map(), Bn = {
|
|
|
1722
1730
|
153
|
|
1723
1731
|
]
|
|
1724
1732
|
};
|
|
1725
|
-
function
|
|
1733
|
+
function Hn(e, t, n, r) {
|
|
1726
1734
|
let i = e.getTransform(), a = Math.max(1, Math.round(Math.hypot(i.a, i.b))), o = Math.max(1, Math.round(Math.hypot(i.c, i.d))), s = `${t}|${n}|${r}|${a}|${o}`;
|
|
1727
|
-
if (
|
|
1728
|
-
let
|
|
1729
|
-
if (!
|
|
1730
|
-
let
|
|
1731
|
-
if (!
|
|
1732
|
-
let
|
|
1733
|
-
if (!
|
|
1734
|
-
|
|
1735
|
-
for (let e = 0; e <
|
|
1736
|
-
let t =
|
|
1737
|
-
for (let n = 0; n <
|
|
1738
|
-
}
|
|
1739
|
-
let
|
|
1740
|
-
if (
|
|
1735
|
+
if (Bn.has(s)) return Bn.get(s);
|
|
1736
|
+
let l = Vn[t];
|
|
1737
|
+
if (!l) return Bn.set(s, null), null;
|
|
1738
|
+
let u = l.length, d = c(u, u);
|
|
1739
|
+
if (!d) return Bn.set(s, null), null;
|
|
1740
|
+
let f = d.getContext("2d");
|
|
1741
|
+
if (!f) return Bn.set(s, null), null;
|
|
1742
|
+
f.fillStyle = J(r), f.fillRect(0, 0, u, u), f.fillStyle = J(n);
|
|
1743
|
+
for (let e = 0; e < u; e++) {
|
|
1744
|
+
let t = l[e];
|
|
1745
|
+
for (let n = 0; n < u; n++) t & 1 << u - 1 - n && f.fillRect(n, e, 1, 1);
|
|
1746
|
+
}
|
|
1747
|
+
let p = e.createPattern(d, "repeat");
|
|
1748
|
+
if (p && typeof DOMMatrix < "u" && (a >= 2 || o >= 2)) {
|
|
1741
1749
|
let e = new DOMMatrix();
|
|
1742
|
-
e.scaleSelf(1 / a, 1 / o),
|
|
1750
|
+
e.scaleSelf(1 / a, 1 / o), p.setTransform(e);
|
|
1743
1751
|
}
|
|
1744
|
-
return
|
|
1752
|
+
return Bn.set(s, p), p;
|
|
1745
1753
|
}
|
|
1746
|
-
function
|
|
1747
|
-
if (t.gradient && t.gradient.stops.length > 0) return e.fillStyle =
|
|
1754
|
+
function Un(e, t, n, r, i, a) {
|
|
1755
|
+
if (t.gradient && t.gradient.stops.length > 0) return e.fillStyle = Wn(e, t.gradient, n, r, i, a), e.fillRect(n, r, i, a), !0;
|
|
1748
1756
|
let o = t.patternType;
|
|
1749
1757
|
if (!o || o === "none") return !1;
|
|
1750
1758
|
let s = t.fgColor ?? "000000", c = t.bgColor ?? "FFFFFF";
|
|
1751
|
-
if (o === "solid") return e.fillStyle =
|
|
1752
|
-
let l =
|
|
1759
|
+
if (o === "solid") return e.fillStyle = J(s), e.fillRect(n, r, i, a), !0;
|
|
1760
|
+
let l = Hn(e, o, s, c);
|
|
1753
1761
|
if (l) e.fillStyle = l;
|
|
1754
1762
|
else {
|
|
1755
|
-
let t =
|
|
1756
|
-
e.fillStyle = t >= 1 ?
|
|
1763
|
+
let t = zn(o);
|
|
1764
|
+
e.fillStyle = t >= 1 ? J(s) : qn(s, c, t);
|
|
1757
1765
|
}
|
|
1758
1766
|
return e.fillRect(n, r, i, a), !0;
|
|
1759
1767
|
}
|
|
1760
|
-
function
|
|
1768
|
+
function Wn(e, t, n, r, i, a) {
|
|
1761
1769
|
let o;
|
|
1762
1770
|
if (t.gradientType === "path") {
|
|
1763
1771
|
let s = n + i * (t.left + (1 - t.right - t.left) / 2), c = r + a * (t.top + (1 - t.bottom - t.top) / 2), l = Math.hypot(Math.max(s - n, n + i - s), Math.max(c - r, r + a - c));
|
|
@@ -1768,32 +1776,32 @@ function Un(e, t, n, r, i, a) {
|
|
|
1768
1776
|
}
|
|
1769
1777
|
for (let e of t.stops) {
|
|
1770
1778
|
let t = Math.min(1, Math.max(0, e.position));
|
|
1771
|
-
o.addColorStop(t,
|
|
1779
|
+
o.addColorStop(t, J(e.color));
|
|
1772
1780
|
}
|
|
1773
1781
|
return o;
|
|
1774
1782
|
}
|
|
1775
|
-
var
|
|
1776
|
-
function
|
|
1783
|
+
var Gn = _n;
|
|
1784
|
+
function Kn(e, t, n, r, i) {
|
|
1777
1785
|
let a = Math.max(4, Math.min(8, Math.min(r, i) * .18));
|
|
1778
1786
|
e.save(), e.fillStyle = "#D40000", e.beginPath(), e.moveTo(t + r - a, n), e.lineTo(t + r, n), e.lineTo(t + r, n + a), e.closePath(), e.fill(), e.restore();
|
|
1779
1787
|
}
|
|
1780
|
-
function
|
|
1788
|
+
function qn(e, t, n) {
|
|
1781
1789
|
let r = e.replace("#", ""), i = t.replace("#", ""), a = parseInt(r.slice(0, 2), 16), o = parseInt(r.slice(2, 4), 16), s = parseInt(r.slice(4, 6), 16), c = parseInt(i.slice(0, 2), 16), l = parseInt(i.slice(2, 4), 16), u = parseInt(i.slice(4, 6), 16), d = Math.min(1, Math.max(0, n));
|
|
1782
1790
|
return `rgb(${Math.round(a * d + c * (1 - d))},${Math.round(o * d + l * (1 - d))},${Math.round(s * d + u * (1 - d))})`;
|
|
1783
1791
|
}
|
|
1784
|
-
function
|
|
1785
|
-
let i = Math.round(e *
|
|
1786
|
-
return r ? Math.max(i, Math.round(
|
|
1792
|
+
function Jn(e, t, n = 1, r) {
|
|
1793
|
+
let i = Math.round(e * x * n * t);
|
|
1794
|
+
return r ? Math.max(i, Math.round(G(r, e * x * t))) : i;
|
|
1787
1795
|
}
|
|
1788
|
-
function
|
|
1789
|
-
return `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${Math.max(1, Math.round(e.size *
|
|
1796
|
+
function Yn(e, t = 1) {
|
|
1797
|
+
return `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${Math.max(1, Math.round(e.size * x * t))}px ${Dn(e.name)}`;
|
|
1790
1798
|
}
|
|
1791
|
-
function
|
|
1799
|
+
function Xn(e, t, n, r, i, a, o, s, c, l) {
|
|
1792
1800
|
if (t.length === 0) return;
|
|
1793
1801
|
let u = n?.fontId ?? 0, d = a.fonts[u] ?? a.fonts[0];
|
|
1794
1802
|
if (!d) return;
|
|
1795
1803
|
let f = n?.alignment ?? "left";
|
|
1796
|
-
e.save(), e.font =
|
|
1804
|
+
e.save(), e.font = Yn(d, c), e.textBaseline = "top", e.textAlign = "left", e.fillStyle = l;
|
|
1797
1805
|
let p = s + Math.round(2 * c);
|
|
1798
1806
|
if (f === "noControl") {
|
|
1799
1807
|
let n = o;
|
|
@@ -1801,7 +1809,7 @@ function Yn(e, t, n, r, i, a, o, s, c, l) {
|
|
|
1801
1809
|
e.restore();
|
|
1802
1810
|
return;
|
|
1803
1811
|
}
|
|
1804
|
-
let m = Re(t, r, o, f, (t) =>
|
|
1812
|
+
let m = Re(t, r, o, f, (t) => Zn(e, t, i));
|
|
1805
1813
|
for (let t of m) {
|
|
1806
1814
|
let n = e.measureText(t.text).width, r = [...t.text];
|
|
1807
1815
|
if (t.spread === "distribute" && r.length > 1 && n < t.width) {
|
|
@@ -1817,23 +1825,23 @@ function Yn(e, t, n, r, i, a, o, s, c, l) {
|
|
|
1817
1825
|
}
|
|
1818
1826
|
e.restore();
|
|
1819
1827
|
}
|
|
1820
|
-
function
|
|
1828
|
+
function Zn(e, t, n) {
|
|
1821
1829
|
let r = e.font;
|
|
1822
1830
|
e.font = n;
|
|
1823
1831
|
let i = e.measureText(t).width;
|
|
1824
1832
|
return e.font = r, i;
|
|
1825
1833
|
}
|
|
1826
|
-
function
|
|
1834
|
+
function Qn(e, t, n, r, i, a, o = 1) {
|
|
1827
1835
|
if (e.save(), e.strokeStyle = i, e.lineWidth = .5, e.beginPath(), a) {
|
|
1828
|
-
let i = r - 1, a = r + 1, s = i +
|
|
1836
|
+
let i = r - 1, a = r + 1, s = i + d(i, .5, o), c = a + d(a, .5, o);
|
|
1829
1837
|
e.moveTo(t, s), e.lineTo(n, s), e.moveTo(t, c), e.lineTo(n, c);
|
|
1830
1838
|
} else {
|
|
1831
|
-
let i = r +
|
|
1839
|
+
let i = r + d(r, .5, o);
|
|
1832
1840
|
e.moveTo(t, i), e.lineTo(n, i);
|
|
1833
1841
|
}
|
|
1834
1842
|
e.stroke(), e.restore();
|
|
1835
1843
|
}
|
|
1836
|
-
function
|
|
1844
|
+
function $n(e, t) {
|
|
1837
1845
|
let n = t.font;
|
|
1838
1846
|
return n ? {
|
|
1839
1847
|
bold: n.bold,
|
|
@@ -1847,7 +1855,7 @@ function Qn(e, t) {
|
|
|
1847
1855
|
vertAlign: n.vertAlign
|
|
1848
1856
|
} : e;
|
|
1849
1857
|
}
|
|
1850
|
-
function
|
|
1858
|
+
function er(e, t) {
|
|
1851
1859
|
let n = e.cellXfs[t] ?? e.cellXfs[0] ?? {
|
|
1852
1860
|
fontId: 0,
|
|
1853
1861
|
fillId: 0,
|
|
@@ -1881,41 +1889,41 @@ function $n(e, t) {
|
|
|
1881
1889
|
xf: n
|
|
1882
1890
|
};
|
|
1883
1891
|
}
|
|
1884
|
-
function
|
|
1892
|
+
function tr(e, t, n) {
|
|
1885
1893
|
let r = [];
|
|
1886
|
-
for (let i of t.split("\n")) r.push(...
|
|
1894
|
+
for (let i of t.split("\n")) r.push(...ar(e, i, n));
|
|
1887
1895
|
return r;
|
|
1888
1896
|
}
|
|
1889
|
-
function
|
|
1897
|
+
function nr(e, t) {
|
|
1890
1898
|
if (e.length === 0 || t.length === 0) return 0;
|
|
1891
1899
|
let n = [...e, ...t], r = e.length;
|
|
1892
|
-
return r -
|
|
1900
|
+
return r - v(n, r, D, 1);
|
|
1893
1901
|
}
|
|
1894
|
-
function
|
|
1902
|
+
function rr(e, t) {
|
|
1895
1903
|
let n = t;
|
|
1896
1904
|
for (; n < e.length;) {
|
|
1897
1905
|
let t = e[e.length - n - 1], r = e[e.length - n], i = t?.codePointAt(0), a = r?.codePointAt(0);
|
|
1898
|
-
if (i !== void 0 && a !== void 0 &&
|
|
1906
|
+
if (i !== void 0 && a !== void 0 && l(i) && l(a)) n++;
|
|
1899
1907
|
else break;
|
|
1900
1908
|
}
|
|
1901
1909
|
return n >= e.length ? t : n;
|
|
1902
1910
|
}
|
|
1903
|
-
function
|
|
1911
|
+
function ir(e, t) {
|
|
1904
1912
|
if (e.length === 0 || t.length === 0) return 0;
|
|
1905
1913
|
let n = t[0].codePointAt(0), r = e.length - 1, i = e[r].codePointAt(0);
|
|
1906
|
-
if (i === void 0 || n === void 0 || i === 8203 || n === 8203 || !
|
|
1914
|
+
if (i === void 0 || n === void 0 || i === 8203 || n === 8203 || !S(i, n)) return 0;
|
|
1907
1915
|
for (; r > 0;) {
|
|
1908
1916
|
let t = e[r - 1].codePointAt(0), n = e[r].codePointAt(0);
|
|
1909
|
-
if (t === void 0 || n === void 0 || !
|
|
1917
|
+
if (t === void 0 || n === void 0 || !S(t, n)) break;
|
|
1910
1918
|
r--;
|
|
1911
1919
|
}
|
|
1912
1920
|
return r === 0 ? 0 : e.length - r;
|
|
1913
1921
|
}
|
|
1914
|
-
function
|
|
1922
|
+
function ar(e, t, n) {
|
|
1915
1923
|
let r = [], i = [], a = 0;
|
|
1916
1924
|
for (; a < t.length;) {
|
|
1917
1925
|
let e = t[a], n = e.codePointAt(0) ?? 0;
|
|
1918
|
-
if (
|
|
1926
|
+
if (T(n)) i.push(e), a += n > 65535 ? 2 : 1;
|
|
1919
1927
|
else if (e === " ") {
|
|
1920
1928
|
let e = a;
|
|
1921
1929
|
for (; e < t.length && t[e] === " ";) e++;
|
|
@@ -1924,10 +1932,10 @@ function ir(e, t, n) {
|
|
|
1924
1932
|
let e = a;
|
|
1925
1933
|
for (; e < t.length;) {
|
|
1926
1934
|
let n = t[e], r = n.codePointAt(0) ?? 0;
|
|
1927
|
-
if (n === " " ||
|
|
1935
|
+
if (n === " " || T(r)) break;
|
|
1928
1936
|
e += r > 65535 ? 2 : 1;
|
|
1929
1937
|
}
|
|
1930
|
-
let n = t.slice(a, e), r =
|
|
1938
|
+
let n = t.slice(a, e), r = k(n) ? b(n) : null;
|
|
1931
1939
|
if (r && r.length > 0) {
|
|
1932
1940
|
let e = 0;
|
|
1933
1941
|
for (let t of r) i.push(n.slice(e, t)), e = t;
|
|
@@ -1947,7 +1955,7 @@ function ir(e, t, n) {
|
|
|
1947
1955
|
else {
|
|
1948
1956
|
let e = t.replace(/^ +/, "");
|
|
1949
1957
|
e === "" && (e = t);
|
|
1950
|
-
let n = [...o], i =
|
|
1958
|
+
let n = [...o], i = nr(n, [...e]);
|
|
1951
1959
|
if (i > 0) {
|
|
1952
1960
|
let t = n.length - i;
|
|
1953
1961
|
r.push(n.slice(0, t).join("")), o = n.slice(t).join("") + e;
|
|
@@ -1956,38 +1964,38 @@ function ir(e, t, n) {
|
|
|
1956
1964
|
}
|
|
1957
1965
|
return r.push(o), r;
|
|
1958
1966
|
}
|
|
1959
|
-
function
|
|
1960
|
-
let
|
|
1961
|
-
|
|
1962
|
-
segments:
|
|
1963
|
-
maxFontSize:
|
|
1964
|
-
maxFontFamily:
|
|
1965
|
-
para:
|
|
1966
|
-
}),
|
|
1967
|
-
},
|
|
1968
|
-
if (
|
|
1969
|
-
|
|
1967
|
+
function or(e, t, n, r, i) {
|
|
1968
|
+
let o = [], c = [], l = 0, u = 0, d = null, f = n.size, p = n.name, m = 0, h = () => {
|
|
1969
|
+
c.length !== 0 && (o.push({
|
|
1970
|
+
segments: c,
|
|
1971
|
+
maxFontSize: u,
|
|
1972
|
+
maxFontFamily: d,
|
|
1973
|
+
para: m
|
|
1974
|
+
}), c = [], l = 0, u = 0, d = null);
|
|
1975
|
+
}, g = () => {
|
|
1976
|
+
if (c.length === 0) {
|
|
1977
|
+
o.push({
|
|
1970
1978
|
segments: [],
|
|
1971
|
-
maxFontSize:
|
|
1972
|
-
maxFontFamily:
|
|
1973
|
-
para:
|
|
1979
|
+
maxFontSize: f || On,
|
|
1980
|
+
maxFontFamily: p,
|
|
1981
|
+
para: m
|
|
1974
1982
|
});
|
|
1975
1983
|
return;
|
|
1976
1984
|
}
|
|
1977
|
-
|
|
1978
|
-
},
|
|
1985
|
+
h();
|
|
1986
|
+
}, _ = (t, n) => {
|
|
1979
1987
|
if (!t) return;
|
|
1980
|
-
|
|
1988
|
+
f = n.size, p = n.name, e.font = Yn(cr(n), r);
|
|
1981
1989
|
let a = e.measureText(t).width;
|
|
1982
|
-
if (
|
|
1983
|
-
let i =
|
|
1984
|
-
a > 0 ? a =
|
|
1985
|
-
let o =
|
|
1986
|
-
a >
|
|
1990
|
+
if (c.length > 0 && l + a > i) {
|
|
1991
|
+
let i = c.flatMap((e) => [...e.text]), a = nr(i, [...t]);
|
|
1992
|
+
a > 0 ? a = rr(i, a) : !k(t) && !k(c[c.length - 1]?.text ?? "") && !/^\s/u.test(t) && !/\s$/u.test(i.at(-1) ?? "") && (a = ir(i, [...t]));
|
|
1993
|
+
let o = c[c.length - 1], s = [...o.text];
|
|
1994
|
+
a > s.length && (a = s.length);
|
|
1987
1995
|
let f = null;
|
|
1988
1996
|
if (a > 0) {
|
|
1989
|
-
let t =
|
|
1990
|
-
if (e.font =
|
|
1997
|
+
let t = s.slice(0, s.length - a), n = s.slice(s.length - a);
|
|
1998
|
+
if (e.font = Yn(cr(o.font), r), t.length === 0) c.pop();
|
|
1991
1999
|
else {
|
|
1992
2000
|
let n = t.join("");
|
|
1993
2001
|
o.text = n, o.width = e.measureText(n).width;
|
|
@@ -1999,40 +2007,40 @@ function ar(e, t, n, r, i) {
|
|
|
1999
2007
|
width: e.measureText(i).width
|
|
2000
2008
|
};
|
|
2001
2009
|
}
|
|
2002
|
-
|
|
2010
|
+
h(), f && (c.push(f), l += f.width, f.font.size > u && (u = f.font.size, d = f.font.name)), e.font = Yn(cr(n), r);
|
|
2003
2011
|
}
|
|
2004
|
-
|
|
2012
|
+
c.push({
|
|
2005
2013
|
text: t,
|
|
2006
2014
|
font: n,
|
|
2007
2015
|
width: a
|
|
2008
|
-
}),
|
|
2009
|
-
},
|
|
2010
|
-
let
|
|
2011
|
-
if (
|
|
2012
|
-
|
|
2016
|
+
}), l += a, n.size > u && (u = n.size, d = n.name);
|
|
2017
|
+
}, v = (t, n) => {
|
|
2018
|
+
let o = b(t);
|
|
2019
|
+
if (o.length === 0) {
|
|
2020
|
+
_(t, n);
|
|
2013
2021
|
return;
|
|
2014
2022
|
}
|
|
2015
|
-
e.font =
|
|
2016
|
-
let
|
|
2017
|
-
for (;
|
|
2018
|
-
let e = i -
|
|
2019
|
-
if (r <=
|
|
2020
|
-
if (
|
|
2021
|
-
|
|
2023
|
+
e.font = Yn(cr(n), r);
|
|
2024
|
+
let c = (t) => e.measureText(t).width, u = re(t), d = t.length, f = 0;
|
|
2025
|
+
for (; f < d;) {
|
|
2026
|
+
let e = i - l, r = s(t, o, f, e, c, u);
|
|
2027
|
+
if (r <= f) {
|
|
2028
|
+
if (l > 0) {
|
|
2029
|
+
h();
|
|
2022
2030
|
continue;
|
|
2023
2031
|
}
|
|
2024
|
-
let n =
|
|
2025
|
-
|
|
2032
|
+
let n = o.find((e) => e > f) ?? d, i = t.slice(f, n), p = a(i), m = s(i, p, 0, e, c, u);
|
|
2033
|
+
m <= 0 && (m = p.length > 0 ? p[0] : i.length), r = f + m;
|
|
2026
2034
|
}
|
|
2027
|
-
|
|
2035
|
+
_(t.slice(f, r), n), f = r, f < d && h();
|
|
2028
2036
|
}
|
|
2029
2037
|
};
|
|
2030
2038
|
for (let e of t) {
|
|
2031
|
-
let t =
|
|
2039
|
+
let t = $n(n, e), r = [], i = 0;
|
|
2032
2040
|
for (; i < e.text.length;) {
|
|
2033
2041
|
let t = e.text[i], n = t.codePointAt(0) ?? 0;
|
|
2034
2042
|
if (n === 10) r.push("\n"), i += 1;
|
|
2035
|
-
else if (
|
|
2043
|
+
else if (T(n)) r.push(t), i += n > 65535 ? 2 : 1;
|
|
2036
2044
|
else if (t === " ") {
|
|
2037
2045
|
let t = i;
|
|
2038
2046
|
for (; t < e.text.length && e.text[t] === " ";) t++;
|
|
@@ -2041,17 +2049,17 @@ function ar(e, t, n, r, i) {
|
|
|
2041
2049
|
let t = i;
|
|
2042
2050
|
for (; t < e.text.length;) {
|
|
2043
2051
|
let n = e.text[t], r = n.codePointAt(0) ?? 0;
|
|
2044
|
-
if (n === " " || n === "\n" ||
|
|
2052
|
+
if (n === " " || n === "\n" || T(r)) break;
|
|
2045
2053
|
t += r > 65535 ? 2 : 1;
|
|
2046
2054
|
}
|
|
2047
2055
|
r.push(e.text.slice(i, t)), i = t;
|
|
2048
2056
|
}
|
|
2049
2057
|
}
|
|
2050
|
-
for (let e of r) e === "\n" ? (
|
|
2058
|
+
for (let e of r) e === "\n" ? (g(), m++) : k(e) ? v(e, t) : _(e, t);
|
|
2051
2059
|
}
|
|
2052
|
-
return (
|
|
2060
|
+
return (c.length > 0 || o.length > 0) && g(), o;
|
|
2053
2061
|
}
|
|
2054
|
-
function
|
|
2062
|
+
function sr(e, t, n) {
|
|
2055
2063
|
return e === "middle" ? {
|
|
2056
2064
|
underline: t + Math.round(n * .55),
|
|
2057
2065
|
strike: t
|
|
@@ -2063,48 +2071,48 @@ function or(e, t, n) {
|
|
|
2063
2071
|
strike: t + Math.round(n * .5)
|
|
2064
2072
|
};
|
|
2065
2073
|
}
|
|
2066
|
-
function
|
|
2074
|
+
function cr(e) {
|
|
2067
2075
|
return e.vertAlign === "superscript" || e.vertAlign === "subscript" ? {
|
|
2068
2076
|
...e,
|
|
2069
2077
|
size: e.size * .65
|
|
2070
2078
|
} : e;
|
|
2071
2079
|
}
|
|
2072
|
-
function
|
|
2080
|
+
function lr(e, t, n, r, i, a, o, s) {
|
|
2073
2081
|
e.textAlign = "left", e.textBaseline = i;
|
|
2074
2082
|
let c = s.needBidi ? gn(t, s.baseRtl ?? !1) : null, l = e, u = n;
|
|
2075
2083
|
for (let n = 0; n < t.length; n++) {
|
|
2076
|
-
let
|
|
2084
|
+
let f = c ? c.order[n] : n;
|
|
2077
2085
|
if (c) try {
|
|
2078
|
-
l.direction = c.rtl[
|
|
2086
|
+
l.direction = c.rtl[f] ? "rtl" : "ltr";
|
|
2079
2087
|
} catch {}
|
|
2080
|
-
let
|
|
2081
|
-
e.font =
|
|
2082
|
-
let
|
|
2083
|
-
e.fillStyle =
|
|
2084
|
-
let
|
|
2085
|
-
|
|
2086
|
-
let
|
|
2087
|
-
if (
|
|
2088
|
-
let t =
|
|
2089
|
-
if (
|
|
2090
|
-
let n =
|
|
2091
|
-
|
|
2088
|
+
let p = t[f], m = cr(p.font);
|
|
2089
|
+
e.font = Yn(m, a);
|
|
2090
|
+
let h = s.fontColor ?? p.font.color;
|
|
2091
|
+
e.fillStyle = h ? J(h) : "#000000";
|
|
2092
|
+
let g = Jn(p.font.size, a), _ = 0;
|
|
2093
|
+
p.font.vertAlign === "superscript" ? _ = -Math.round(g * .35) : p.font.vertAlign === "subscript" && (_ = Math.round(g * .1)), e.fillText(p.text, u, r + _);
|
|
2094
|
+
let v = Jn(m.size, a);
|
|
2095
|
+
if (p.font.underline || p.font.strike) {
|
|
2096
|
+
let t = sr(i, r, v);
|
|
2097
|
+
if (p.font.underline) {
|
|
2098
|
+
let n = h ? J(h) : "#000000", r = p.font.underlineStyle === "double" || p.font.underlineStyle === "doubleAccounting";
|
|
2099
|
+
Qn(e, u, u + p.width, t.underline + _, n, r, o);
|
|
2092
2100
|
}
|
|
2093
|
-
if (
|
|
2094
|
-
let n = t.strike +
|
|
2095
|
-
e.save(), e.strokeStyle =
|
|
2101
|
+
if (p.font.strike) {
|
|
2102
|
+
let n = t.strike + _, r = n + d(n, .5, o);
|
|
2103
|
+
e.save(), e.strokeStyle = h ? J(h) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(u, r), e.lineTo(u + p.width, r), e.stroke(), e.restore();
|
|
2096
2104
|
}
|
|
2097
2105
|
}
|
|
2098
|
-
u +=
|
|
2106
|
+
u += p.width;
|
|
2099
2107
|
}
|
|
2100
2108
|
if (c) try {
|
|
2101
2109
|
l.direction = "ltr";
|
|
2102
2110
|
} catch {}
|
|
2103
2111
|
}
|
|
2104
|
-
function
|
|
2112
|
+
function ur(e, t, n, r, i, a, o, s, c) {
|
|
2105
2113
|
let { alignH: l, cx: u, cellW: d, leftPad: f, paddingX: p } = r, m = t.map((t) => {
|
|
2106
|
-
let r =
|
|
2107
|
-
return e.font =
|
|
2114
|
+
let r = $n(n, t);
|
|
2115
|
+
return e.font = Yn(cr(r), i), {
|
|
2108
2116
|
text: t.text,
|
|
2109
2117
|
font: r,
|
|
2110
2118
|
width: e.measureText(t.text).width
|
|
@@ -2112,17 +2120,17 @@ function lr(e, t, n, r, i, a, o, s, c) {
|
|
|
2112
2120
|
}), h = m.reduce((e, t) => e + t.width, 0), g;
|
|
2113
2121
|
g = l === "right" ? u + d - p - h : l === "center" ? u + d / 2 - h / 2 : u + f;
|
|
2114
2122
|
let { needBidi: _, baseRtl: v } = hn(o.readingOrder, m.map((e) => e.text).join(""));
|
|
2115
|
-
|
|
2123
|
+
lr(e, m, g, s, c, i, a, {
|
|
2116
2124
|
fontColor: o.fontColor,
|
|
2117
2125
|
needBidi: _,
|
|
2118
2126
|
baseRtl: v
|
|
2119
2127
|
});
|
|
2120
2128
|
}
|
|
2121
|
-
function
|
|
2129
|
+
function dr(e, t, n, r, i, a, o = {}) {
|
|
2122
2130
|
let { alignV: s, cy: c, cellH: l, paddingY: u } = r, d, f;
|
|
2123
|
-
s === "top" ? (f = "top", d = c + u) : s === "center" ? (f = "middle", d = c + l / 2) : (f = "bottom", d = c + l - u),
|
|
2131
|
+
s === "top" ? (f = "top", d = c + u) : s === "center" ? (f = "middle", d = c + l / 2) : (f = "bottom", d = c + l - u), ur(e, t, n, r, i, a, o, d, f);
|
|
2124
2132
|
}
|
|
2125
|
-
function
|
|
2133
|
+
function fr(e, t, n, r, i, a, o = {}) {
|
|
2126
2134
|
let { alignV: s, cy: c, cellH: l, paddingY: u } = r, d = [[]];
|
|
2127
2135
|
for (let e of t) {
|
|
2128
2136
|
let t = e.text.split("\n");
|
|
@@ -2138,39 +2146,39 @@ function dr(e, t, n, r, i, a, o = {}) {
|
|
|
2138
2146
|
};
|
|
2139
2147
|
let t = 0, r = null;
|
|
2140
2148
|
for (let i of e) {
|
|
2141
|
-
let e =
|
|
2149
|
+
let e = $n(n, i);
|
|
2142
2150
|
e.size > t && (t = e.size, r = e.name), f = e.size, p = e.name;
|
|
2143
2151
|
}
|
|
2144
2152
|
return {
|
|
2145
2153
|
pt: t,
|
|
2146
2154
|
family: r
|
|
2147
2155
|
};
|
|
2148
|
-
}).map((e) =>
|
|
2156
|
+
}).map((e) => Jn(e.pt, i, 1.2, e.family ?? void 0)), h = m.reduce((e, t) => e + t, 0), g;
|
|
2149
2157
|
g = s === "top" ? c + u : s === "center" ? c + (l - h) / 2 : c + l - h - u;
|
|
2150
2158
|
for (let t = 0; t < d.length; t++) {
|
|
2151
2159
|
let s = d[t];
|
|
2152
|
-
s.length > 0 &&
|
|
2160
|
+
s.length > 0 && ur(e, s, n, r, i, a, o, g, "top"), g += m[t];
|
|
2153
2161
|
}
|
|
2154
2162
|
}
|
|
2155
|
-
function fr(e, t, n, r, i, a, o = {}) {
|
|
2156
|
-
t.some((e) => e.text.includes("\n")) ? dr(e, t, n, r, i, a, o) : ur(e, t, n, r, i, a, o);
|
|
2157
|
-
}
|
|
2158
2163
|
function pr(e, t, n, r, i, a, o = {}) {
|
|
2159
|
-
|
|
2164
|
+
t.some((e) => e.text.includes("\n")) ? fr(e, t, n, r, i, a, o) : dr(e, t, n, r, i, a, o);
|
|
2165
|
+
}
|
|
2166
|
+
function mr(e, t, n, r, i, a, o = {}) {
|
|
2167
|
+
let { alignH: s, alignV: c, cx: l, cy: u, cellW: d, cellH: f, leftPad: p, paddingX: m, paddingY: h } = r, g = or(e, t, n, i, d - p - m), _ = g.reduce((e, t) => e + Jn(t.maxFontSize, i, 1.2, t.maxFontFamily ?? void 0), 0), v;
|
|
2160
2168
|
v = c === "top" ? u + h : c === "center" ? u + (f - _) / 2 : u + f - _ - h;
|
|
2161
2169
|
let y = t.map((e) => e.text).join("").split("\n").map((e) => hn(o.readingOrder, e));
|
|
2162
2170
|
for (let t of g) {
|
|
2163
2171
|
let n = t.segments.reduce((e, t) => e + t.width, 0), r;
|
|
2164
2172
|
r = s === "right" ? l + d - m - n : s === "center" ? l + d / 2 - n / 2 : l + p;
|
|
2165
2173
|
let { needBidi: c, baseRtl: u } = y[t.para];
|
|
2166
|
-
|
|
2174
|
+
lr(e, t.segments, r, v, "top", i, a, {
|
|
2167
2175
|
fontColor: o.fontColor,
|
|
2168
2176
|
needBidi: c,
|
|
2169
2177
|
baseRtl: u
|
|
2170
|
-
}), v +=
|
|
2178
|
+
}), v += Jn(t.maxFontSize, i, 1.2, t.maxFontFamily ?? void 0);
|
|
2171
2179
|
}
|
|
2172
2180
|
}
|
|
2173
|
-
function
|
|
2181
|
+
function hr(e) {
|
|
2174
2182
|
let t = "";
|
|
2175
2183
|
for (; e > 0;) {
|
|
2176
2184
|
let n = (e - 1) % 26;
|
|
@@ -2178,38 +2186,38 @@ function mr(e) {
|
|
|
2178
2186
|
}
|
|
2179
2187
|
return t;
|
|
2180
2188
|
}
|
|
2181
|
-
var
|
|
2189
|
+
var gr = [
|
|
2182
2190
|
"#FF0000",
|
|
2183
2191
|
"#FFFF00",
|
|
2184
2192
|
"#00B050"
|
|
2185
|
-
],
|
|
2193
|
+
], _r = [
|
|
2186
2194
|
"#FF0000",
|
|
2187
2195
|
"#FF6600",
|
|
2188
2196
|
"#FFFF00",
|
|
2189
2197
|
"#00B050"
|
|
2190
|
-
],
|
|
2198
|
+
], vr = [
|
|
2191
2199
|
"#FF0000",
|
|
2192
2200
|
"#FF6600",
|
|
2193
2201
|
"#FFFF00",
|
|
2194
2202
|
"#92D050",
|
|
2195
2203
|
"#00B050"
|
|
2196
2204
|
];
|
|
2197
|
-
function
|
|
2205
|
+
function yr(e, t, n, r, i, a) {
|
|
2198
2206
|
if (t === "NoIcons") return;
|
|
2199
|
-
let o = t || "3TrafficLights1", s = parseInt(o[0]) || 3, c = s === 5 ?
|
|
2207
|
+
let o = t || "3TrafficLights1", s = parseInt(o[0]) || 3, c = s === 5 ? vr : s === 4 ? _r : gr, l = c[Math.max(0, Math.min(n, c.length - 1))];
|
|
2200
2208
|
if (e.save(), e.fillStyle = l, o.includes("Arrow")) {
|
|
2201
2209
|
let t = a / 2;
|
|
2202
2210
|
e.beginPath(), n === s - 1 ? (e.moveTo(r + t, i), e.lineTo(r + a, i + a), e.lineTo(r, i + a)) : n === 0 ? (e.moveTo(r, i), e.lineTo(r + a, i), e.lineTo(r + t, i + a)) : (e.moveTo(r, i + a * .3), e.lineTo(r + a, i + t), e.lineTo(r, i + a * .7)), e.closePath(), e.fill();
|
|
2203
2211
|
} else o.includes("Flag") ? (e.beginPath(), e.moveTo(r, i), e.lineTo(r + a, i), e.lineTo(r, i + a), e.closePath(), e.fill()) : (e.beginPath(), e.arc(r + a / 2, i + a / 2, a / 2, 0, Math.PI * 2), e.fill());
|
|
2204
2212
|
e.restore();
|
|
2205
2213
|
}
|
|
2206
|
-
function
|
|
2214
|
+
function br(e, t, n, r, i) {
|
|
2207
2215
|
let a = Math.max(6, Math.round(Math.min(r, i) * .45)), o = t + r - a - 1, s = n + i - a - 1;
|
|
2208
2216
|
e.save(), e.fillStyle = "#D0D0D0", e.fillRect(o, s, a, a), e.fillStyle = "#444444";
|
|
2209
2217
|
let c = a * .55, l = o + (a - c) / 2, u = s + (a - c * .5) / 2;
|
|
2210
2218
|
e.beginPath(), e.moveTo(l, u), e.lineTo(l + c, u), e.lineTo(l + c / 2, u + c * .5), e.closePath(), e.fill(), e.restore();
|
|
2211
2219
|
}
|
|
2212
|
-
function
|
|
2220
|
+
function xr(e) {
|
|
2213
2221
|
let t = /* @__PURE__ */ new Map();
|
|
2214
2222
|
for (let n of e.tables ?? []) {
|
|
2215
2223
|
if (!n.styleName) continue;
|
|
@@ -2237,7 +2245,7 @@ function br(e) {
|
|
|
2237
2245
|
}
|
|
2238
2246
|
return t;
|
|
2239
2247
|
}
|
|
2240
|
-
function
|
|
2248
|
+
function Sr(e, t, n, r) {
|
|
2241
2249
|
let i = t?.border?.horizontal, a = t?.border?.top, o = t?.border?.bottom, s = t?.border?.left, c = t?.border?.right, l = n?.border?.bottom, u = n?.border?.top;
|
|
2242
2250
|
if (i || a || o || s || c || l || u) {
|
|
2243
2251
|
let t = {
|
|
@@ -2258,7 +2266,7 @@ function xr(e, t, n, r) {
|
|
|
2258
2266
|
topEdge: e.isTopEdge
|
|
2259
2267
|
};
|
|
2260
2268
|
}
|
|
2261
|
-
function
|
|
2269
|
+
function Cr(e) {
|
|
2262
2270
|
let t = /* @__PURE__ */ new Map();
|
|
2263
2271
|
for (let n of e.sparklineGroups ?? []) {
|
|
2264
2272
|
let e = Infinity, r = -Infinity;
|
|
@@ -2295,278 +2303,278 @@ function Sr(e) {
|
|
|
2295
2303
|
}
|
|
2296
2304
|
return t;
|
|
2297
2305
|
}
|
|
2298
|
-
function
|
|
2306
|
+
function wr(e) {
|
|
2299
2307
|
let t = e.replace("#", "");
|
|
2300
2308
|
if (t.length < 6) return "#F2F2F2";
|
|
2301
2309
|
let n = parseInt(t.slice(0, 2), 16), r = parseInt(t.slice(2, 4), 16), i = parseInt(t.slice(4, 6), 16), a = (e) => Math.round(e * .2 + 255 * .8), o = (e) => e.toString(16).padStart(2, "0").toUpperCase();
|
|
2302
2310
|
return `#${o(a(n))}${o(a(r))}${o(a(i))}`;
|
|
2303
2311
|
}
|
|
2304
|
-
function
|
|
2305
|
-
if (
|
|
2306
|
-
let { styles:
|
|
2307
|
-
for (let e = 0; e <
|
|
2308
|
-
let
|
|
2309
|
-
for (let e = 0; e <
|
|
2310
|
-
e.save(), e.beginPath(), e.rect(
|
|
2312
|
+
function Tr(e, t, n, r, a, o, s, c, l, u, f, p, m, h) {
|
|
2313
|
+
if (m <= 0 || h <= 0) return;
|
|
2314
|
+
let { styles: g, cellMap: _, mergeAnchorMap: v, mergeSkipSet: y, cfContext: b, cs: x, dpr: S } = t, C = a.length, w = o.length, T = (e, n) => t.rtl ? An(e, n, t.canvasW) : e, E = [], D = -s;
|
|
2315
|
+
for (let e = 0; e < C; e++) E.push(D), D += a[e];
|
|
2316
|
+
let O = [], ee = -c;
|
|
2317
|
+
for (let e = 0; e < w; e++) O.push(ee), ee += o[e];
|
|
2318
|
+
e.save(), e.beginPath(), e.rect(T(f, m), p, m, h), e.clip();
|
|
2311
2319
|
let k = [], A = [], j = [];
|
|
2312
2320
|
for (let i of t.worksheet.mergeCells ?? []) {
|
|
2313
|
-
let a = i.top,
|
|
2314
|
-
if (a >= n && a < n +
|
|
2315
|
-
let d = t.mergeAnchorMap.get(`${a}:${
|
|
2321
|
+
let a = i.top, o = i.left;
|
|
2322
|
+
if (a >= n && a < n + w && o >= r && o < r + C || i.bottom < n || i.top >= n + w || i.right < r || i.left >= r + C) continue;
|
|
2323
|
+
let d = t.mergeAnchorMap.get(`${a}:${o}`);
|
|
2316
2324
|
if (!d) continue;
|
|
2317
2325
|
let f;
|
|
2318
|
-
if (
|
|
2326
|
+
if (o >= r) f = l + E[o - r];
|
|
2319
2327
|
else {
|
|
2320
2328
|
let e = 0;
|
|
2321
|
-
for (let n =
|
|
2322
|
-
f =
|
|
2329
|
+
for (let n = o; n < r; n++) e += Math.round(Q(t.worksheet.colWidths[n] ?? t.worksheet.defaultColWidth, t.mdw) * x);
|
|
2330
|
+
f = l - s - e;
|
|
2323
2331
|
}
|
|
2324
2332
|
let p;
|
|
2325
|
-
if (a >= n) p =
|
|
2333
|
+
if (a >= n) p = u + O[a - n];
|
|
2326
2334
|
else {
|
|
2327
2335
|
let e = 0;
|
|
2328
|
-
for (let r = a; r < n; r++) e += Math.round($(t.worksheet.rowHeights[r] ?? t.worksheet.defaultRowHeight) *
|
|
2329
|
-
p =
|
|
2330
|
-
}
|
|
2331
|
-
let
|
|
2332
|
-
f =
|
|
2333
|
-
let _ = `${a}:${
|
|
2334
|
-
if (
|
|
2335
|
-
let t = Math.max(0, (
|
|
2336
|
-
|
|
2337
|
-
}
|
|
2338
|
-
let
|
|
2339
|
-
if (A.push(() =>
|
|
2340
|
-
let
|
|
2341
|
-
if (!
|
|
2342
|
-
let
|
|
2343
|
-
...
|
|
2344
|
-
bold:
|
|
2345
|
-
italic:
|
|
2346
|
-
underline:
|
|
2347
|
-
strike:
|
|
2348
|
-
} :
|
|
2349
|
-
e.font =
|
|
2350
|
-
let
|
|
2351
|
-
e.fillStyle =
|
|
2352
|
-
let
|
|
2353
|
-
e.save(), e.beginPath(), e.rect(f, p,
|
|
2354
|
-
let
|
|
2355
|
-
|
|
2356
|
-
let re =
|
|
2357
|
-
if (
|
|
2358
|
-
alignH:
|
|
2359
|
-
alignV:
|
|
2336
|
+
for (let r = a; r < n; r++) e += Math.round($(t.worksheet.rowHeights[r] ?? t.worksheet.defaultRowHeight) * x);
|
|
2337
|
+
p = u - c - e;
|
|
2338
|
+
}
|
|
2339
|
+
let m = d.totalW, h = d.totalH;
|
|
2340
|
+
f = T(f, m);
|
|
2341
|
+
let _ = `${a}:${o}`, v = t.cellMap.get(_), { font: y, fill: D, border: ee, xf: k } = er(g, v?.styleIndex ?? 0), j = fn(v, a, o, b, g.dxfs ?? []);
|
|
2342
|
+
if (Un(e, j.fill ?? D, f, p, m, h), j.dataBar && j.dataBar.ratio > 0) {
|
|
2343
|
+
let t = Math.max(0, (m - 4) * j.dataBar.ratio);
|
|
2344
|
+
Rn(e, j.dataBar.color, f + 2, p + 2, t, h - 4, j.dataBar.gradient);
|
|
2345
|
+
}
|
|
2346
|
+
let te = Kr(Gr(ee, a, o, d.right, d.bottom, t.cellMap, g), j.border);
|
|
2347
|
+
if (A.push(() => qr(e, te, f, p, m, h, S)), !v) continue;
|
|
2348
|
+
let M = xt(v, g, j.numFmt, t.worksheet.date1904), N = M.text;
|
|
2349
|
+
if (!N || N === "0" && t.worksheet.showZeros === !1) continue;
|
|
2350
|
+
let P = y.bold || !!j.fontBold, F = y.italic || !!j.fontItalic, I = y.underline || !!j.fontUnderline, L = y.strike || !!j.fontStrike, R = P !== y.bold || F !== y.italic || I !== y.underline || L !== y.strike ? {
|
|
2351
|
+
...y,
|
|
2352
|
+
bold: P,
|
|
2353
|
+
italic: F,
|
|
2354
|
+
underline: I,
|
|
2355
|
+
strike: L
|
|
2356
|
+
} : y;
|
|
2357
|
+
e.font = Yn(R, x);
|
|
2358
|
+
let z = t.hyperlinkMap.get(_) ? "#0563C1" : j.fontColor ?? M.color ?? y.color;
|
|
2359
|
+
e.fillStyle = z ? J(z) : "#000000";
|
|
2360
|
+
let B = v.value.type === "number", V = k.alignH ?? (B ? "right" : "left"), H = k.alignV ?? "bottom", U = k.indent ? Math.round(k.indent * 3 * t.mdw) : 0, ne = 3 + (V === "left" || !k.alignH ? U : 0);
|
|
2361
|
+
e.save(), e.beginPath(), e.rect(f, p, m, h), e.clip();
|
|
2362
|
+
let W;
|
|
2363
|
+
V === "right" ? (W = f + m - 3, e.textAlign = "right") : V === "center" ? (W = f + m / 2, e.textAlign = "center") : (W = f + ne, e.textAlign = "left");
|
|
2364
|
+
let re = v.value.type === "text" ? v.value.runs : void 0, ie = re && re.length > 0;
|
|
2365
|
+
if (k.wrapText && ie) mr(e, re, R, {
|
|
2366
|
+
alignH: V,
|
|
2367
|
+
alignV: H,
|
|
2360
2368
|
cx: f,
|
|
2361
2369
|
cy: p,
|
|
2362
|
-
cellW:
|
|
2363
|
-
cellH:
|
|
2370
|
+
cellW: m,
|
|
2371
|
+
cellH: h,
|
|
2364
2372
|
leftPad: ne,
|
|
2365
2373
|
paddingX: 3,
|
|
2366
2374
|
paddingY: 2
|
|
2367
|
-
},
|
|
2368
|
-
fontColor:
|
|
2369
|
-
readingOrder:
|
|
2375
|
+
}, x, S, {
|
|
2376
|
+
fontColor: j.fontColor,
|
|
2377
|
+
readingOrder: k.readingOrder
|
|
2370
2378
|
});
|
|
2371
|
-
else if (
|
|
2372
|
-
let t =
|
|
2373
|
-
i =
|
|
2374
|
-
for (let r = 0; r < t.length; r++) e.fillText(t[r],
|
|
2375
|
-
} else if (ie)
|
|
2376
|
-
alignH:
|
|
2377
|
-
alignV:
|
|
2379
|
+
else if (k.wrapText) {
|
|
2380
|
+
let t = tr(e, N, m - ne - 3), n = Jn(y.size, x, 1.2, y.name ?? void 0), r = t.length * n, i;
|
|
2381
|
+
i = H === "top" ? p + 2 : H === "center" ? p + (h - r) / 2 : p + h - r - 2, e.textBaseline = "top";
|
|
2382
|
+
for (let r = 0; r < t.length; r++) e.fillText(t[r], W, i + r * n);
|
|
2383
|
+
} else if (ie) pr(e, re, R, {
|
|
2384
|
+
alignH: V,
|
|
2385
|
+
alignV: H,
|
|
2378
2386
|
cx: f,
|
|
2379
2387
|
cy: p,
|
|
2380
|
-
cellW:
|
|
2381
|
-
cellH:
|
|
2388
|
+
cellW: m,
|
|
2389
|
+
cellH: h,
|
|
2382
2390
|
leftPad: ne,
|
|
2383
2391
|
paddingX: 3,
|
|
2384
2392
|
paddingY: 2
|
|
2385
|
-
},
|
|
2386
|
-
fontColor:
|
|
2387
|
-
readingOrder:
|
|
2393
|
+
}, x, S, {
|
|
2394
|
+
fontColor: j.fontColor,
|
|
2395
|
+
readingOrder: k.readingOrder
|
|
2388
2396
|
});
|
|
2389
2397
|
else {
|
|
2390
2398
|
let t;
|
|
2391
|
-
|
|
2399
|
+
H === "top" ? (e.textBaseline = "top", t = p + 2) : H === "center" ? (e.textBaseline = "middle", t = p + h / 2) : (e.textBaseline = "bottom", t = p + h - 2), e.fillText(N, W, t);
|
|
2392
2400
|
}
|
|
2393
2401
|
e.restore();
|
|
2394
2402
|
}
|
|
2395
|
-
for (let
|
|
2396
|
-
let
|
|
2397
|
-
if (
|
|
2398
|
-
let
|
|
2399
|
-
if (
|
|
2400
|
-
for (let t =
|
|
2401
|
-
for (let t =
|
|
2403
|
+
for (let s = 0; s < w; s++) {
|
|
2404
|
+
let c = n + s, w = u + O[s], D = o[s];
|
|
2405
|
+
if (w + D <= p || w >= p + h) continue;
|
|
2406
|
+
let ee = /* @__PURE__ */ new Set(), te = /* @__PURE__ */ new Set(), M = -1, N = (e) => {
|
|
2407
|
+
if (M >= 0 && e - M >= 2) {
|
|
2408
|
+
for (let t = M; t < e - 1; t++) ee.add(t);
|
|
2409
|
+
for (let t = M + 1; t < e; t++) te.add(t);
|
|
2402
2410
|
}
|
|
2403
|
-
|
|
2411
|
+
M = -1;
|
|
2404
2412
|
};
|
|
2405
|
-
for (let e = 0; e <=
|
|
2413
|
+
for (let e = 0; e <= C; e++) {
|
|
2406
2414
|
let t = !1, n = !1;
|
|
2407
|
-
if (e <
|
|
2408
|
-
let i = `${
|
|
2409
|
-
if (!
|
|
2410
|
-
let e =
|
|
2411
|
-
t =
|
|
2415
|
+
if (e < C) {
|
|
2416
|
+
let i = `${c}:${r + e}`;
|
|
2417
|
+
if (!y.has(i) && !v.has(i)) {
|
|
2418
|
+
let e = _.get(i);
|
|
2419
|
+
t = er(g, e?.styleIndex ?? 0).xf.alignH === "centerContinuous", n = !!(e && e.value && e.value.type !== "empty");
|
|
2412
2420
|
}
|
|
2413
2421
|
}
|
|
2414
|
-
t ? n &&
|
|
2415
|
-
}
|
|
2416
|
-
for (let n = 0; n <
|
|
2417
|
-
let
|
|
2418
|
-
if (
|
|
2419
|
-
let
|
|
2420
|
-
if (
|
|
2421
|
-
let
|
|
2422
|
-
if (
|
|
2423
|
-
let t = Math.max(0, (
|
|
2424
|
-
|
|
2422
|
+
t ? n && M >= 0 && e > M ? (N(e), M = e) : M < 0 && (M = e) : N(e);
|
|
2423
|
+
}
|
|
2424
|
+
for (let n = 0; n < C; n++) {
|
|
2425
|
+
let o = r + n, u = l + E[n], p = a[n];
|
|
2426
|
+
if (u + p <= f || u >= f + m) continue;
|
|
2427
|
+
let h = `${c}:${o}`;
|
|
2428
|
+
if (y.has(h)) continue;
|
|
2429
|
+
let O = v.get(h), M = O ? O.totalW : p, N = O ? O.totalH : D, P = T(u, M), F = _.get(h), { font: L, fill: R, border: z, xf: B } = er(g, F?.styleIndex ?? 0), V = fn(F, c, o, b, g.dxfs ?? []), H = V.fill ?? R, U = t.tableStyleMap.get(h), ne = g.dxfs ?? [], W = (e) => e == null ? void 0 : ne[e], re = W(U?.wholeTableDxf), ie = W(U?.headerRowDxf), ae = W(U?.totalRowDxf), oe = W(U?.firstColumnDxf), se = W(U?.lastColumnDxf), ce = W(U?.stripeDxf), le = U?.isHeader && ie?.fill?.fgColor ? ie : U?.isTotals && ae?.fill?.fgColor ? ae : U?.isLastCol && se?.fill?.fgColor ? se : U?.isFirstCol && oe?.fill?.fgColor ? oe : ce?.fill?.fgColor ? ce : !U?.isHeader && !U?.isTotals && re?.fill?.fgColor ? re : void 0;
|
|
2430
|
+
if (Un(e, H, P, w, M, N) || (U && le?.fill?.fgColor ? (e.fillStyle = J(le.fill.fgColor), e.fillRect(P, w, M, N)) : U && !U.isCustom && U.isBanded && (e.fillStyle = wr(U.accent), e.fillRect(P, w, M, N))), t.commentCells.has(h) && Kn(e, P, w, M, N), V.dataBar && V.dataBar.ratio > 0) {
|
|
2431
|
+
let t = Math.max(0, (M - 4) * V.dataBar.ratio);
|
|
2432
|
+
Rn(e, V.dataBar.color, P + 2, w + 2, t, N - 4, V.dataBar.gradient);
|
|
2425
2433
|
}
|
|
2426
|
-
let ue = t.sparklineMap.get(
|
|
2427
|
-
if (ue &&
|
|
2428
|
-
x:
|
|
2429
|
-
y:
|
|
2430
|
-
w:
|
|
2431
|
-
h:
|
|
2434
|
+
let ue = t.sparklineMap.get(h);
|
|
2435
|
+
if (ue && De(e, {
|
|
2436
|
+
x: P,
|
|
2437
|
+
y: w,
|
|
2438
|
+
w: M,
|
|
2439
|
+
h: N
|
|
2432
2440
|
}, ue), t.worksheet.showGridlines !== !1) {
|
|
2433
|
-
if (e.strokeStyle = "#d0d0d0", e.lineWidth = .5, e.beginPath(), !
|
|
2434
|
-
let t =
|
|
2435
|
-
e.moveTo(t,
|
|
2441
|
+
if (e.strokeStyle = "#d0d0d0", e.lineWidth = .5, e.beginPath(), !ee.has(n)) {
|
|
2442
|
+
let t = P + M + d(P + M, .5, S);
|
|
2443
|
+
e.moveTo(t, w), e.lineTo(t, w + N);
|
|
2436
2444
|
}
|
|
2437
|
-
let t =
|
|
2438
|
-
if (e.moveTo(
|
|
2439
|
-
let t =
|
|
2440
|
-
e.moveTo(
|
|
2445
|
+
let t = w + N + d(w + N, .5, S);
|
|
2446
|
+
if (e.moveTo(P, t), e.lineTo(P + M, t), s === 0) {
|
|
2447
|
+
let t = w + d(w, .5, S);
|
|
2448
|
+
e.moveTo(P, t), e.lineTo(P + M, t);
|
|
2441
2449
|
}
|
|
2442
2450
|
if (n === 0) {
|
|
2443
|
-
let t =
|
|
2444
|
-
e.moveTo(t,
|
|
2451
|
+
let t = P + d(P, .5, S);
|
|
2452
|
+
e.moveTo(t, w), e.lineTo(t, w + N);
|
|
2445
2453
|
}
|
|
2446
2454
|
e.stroke();
|
|
2447
2455
|
}
|
|
2448
|
-
let
|
|
2449
|
-
(
|
|
2450
|
-
...
|
|
2451
|
-
left:
|
|
2452
|
-
right:
|
|
2456
|
+
let G = Kr(O ? Gr(z, c, o, O.right, O.bottom, _, g) : z, V.border);
|
|
2457
|
+
(ee.has(n) || te.has(n)) && (G = {
|
|
2458
|
+
...G,
|
|
2459
|
+
left: te.has(n) ? null : G.left,
|
|
2460
|
+
right: ee.has(n) ? null : G.right
|
|
2453
2461
|
});
|
|
2454
|
-
let de =
|
|
2455
|
-
if (fe?.style && (
|
|
2456
|
-
...
|
|
2457
|
-
top:
|
|
2458
|
-
}), !
|
|
2459
|
-
let e =
|
|
2460
|
-
t?.style && (n === 0 ||
|
|
2461
|
-
...
|
|
2462
|
-
left:
|
|
2462
|
+
let de = _.get(`${c - 1}:${o}`), fe = de ? er(g, de.styleIndex ?? 0).border.bottom : null;
|
|
2463
|
+
if (fe?.style && (s === 0 || G.top?.style) && (G = {
|
|
2464
|
+
...G,
|
|
2465
|
+
top: Zr(G.top, fe)
|
|
2466
|
+
}), !te.has(n)) {
|
|
2467
|
+
let e = _.get(`${c}:${o - 1}`), t = e ? er(g, e.styleIndex ?? 0).border.right : null;
|
|
2468
|
+
t?.style && (n === 0 || G.left?.style) && (G = {
|
|
2469
|
+
...G,
|
|
2470
|
+
left: Zr(G.left, t)
|
|
2463
2471
|
});
|
|
2464
2472
|
}
|
|
2465
|
-
let
|
|
2466
|
-
if (
|
|
2467
|
-
if (
|
|
2468
|
-
else if (
|
|
2469
|
-
let t = .5 /
|
|
2470
|
-
if (e.strokeStyle =
|
|
2471
|
-
let t =
|
|
2472
|
-
e.moveTo(
|
|
2473
|
+
let K = U ? Sr(U, re, ie, o) : null, pe = t.autoFilterCells.has(h), me = () => {
|
|
2474
|
+
if (K) {
|
|
2475
|
+
if (K.kind === "dxf") qr(e, K.border, P, w, M, N, S);
|
|
2476
|
+
else if (K.kind === "accent") {
|
|
2477
|
+
let t = .5 / S;
|
|
2478
|
+
if (e.strokeStyle = K.color, e.lineWidth = K.lineWidth, e.beginPath(), e.moveTo(P, w + N - t), e.lineTo(P + M, w + N - t), K.topEdge) {
|
|
2479
|
+
let t = w + d(w, K.lineWidth, S);
|
|
2480
|
+
e.moveTo(P, t), e.lineTo(P + M, t);
|
|
2473
2481
|
}
|
|
2474
2482
|
e.stroke();
|
|
2475
2483
|
}
|
|
2476
2484
|
}
|
|
2477
|
-
pe &&
|
|
2485
|
+
pe && br(e, P, w, p, N);
|
|
2478
2486
|
};
|
|
2479
|
-
if (
|
|
2480
|
-
let t =
|
|
2481
|
-
A.push(() =>
|
|
2487
|
+
if (O) {
|
|
2488
|
+
let t = G;
|
|
2489
|
+
A.push(() => qr(e, t, P, w, M, N, S)), me();
|
|
2482
2490
|
} else {
|
|
2483
|
-
let t =
|
|
2491
|
+
let t = G;
|
|
2484
2492
|
j.push(() => {
|
|
2485
|
-
|
|
2493
|
+
qr(e, t, P, w, M, N, S), me();
|
|
2486
2494
|
});
|
|
2487
2495
|
}
|
|
2488
|
-
if (!
|
|
2489
|
-
let he = xt(
|
|
2490
|
-
!
|
|
2491
|
-
let
|
|
2492
|
-
...
|
|
2493
|
-
bold:
|
|
2494
|
-
italic:
|
|
2495
|
-
underline:
|
|
2496
|
-
strike:
|
|
2497
|
-
} :
|
|
2498
|
-
e.font =
|
|
2499
|
-
let
|
|
2500
|
-
e.fillStyle =
|
|
2501
|
-
let
|
|
2502
|
-
if (k === "centerContinuous" && !
|
|
2503
|
-
let t = `${
|
|
2504
|
-
if (
|
|
2505
|
-
let n =
|
|
2506
|
-
if (n && n.value.type !== "empty" ||
|
|
2507
|
-
|
|
2496
|
+
if (!F) continue;
|
|
2497
|
+
let he = xt(F, g, V.numFmt, t.worksheet.date1904), q = he.text;
|
|
2498
|
+
!q || q === "0" && t.worksheet.showZeros === !1 || k.push(() => {
|
|
2499
|
+
let s = U?.isHeader ? ie : U?.isTotals ? ae : U?.isLastCol && se ? se : U?.isFirstCol && oe ? oe : ce || (U ? re : void 0), l = U ? U.isCustom ? !!s?.font?.bold : U.isHeader || U.isTotals : !1, u = L.bold || !!V.fontBold || l, f = L.italic || !!V.fontItalic, p = L.underline || !!V.fontUnderline, m = L.strike || !!V.fontStrike, b = u !== L.bold || f !== L.italic || p !== L.underline || m !== L.strike ? {
|
|
2500
|
+
...L,
|
|
2501
|
+
bold: u,
|
|
2502
|
+
italic: f,
|
|
2503
|
+
underline: p,
|
|
2504
|
+
strike: m
|
|
2505
|
+
} : L;
|
|
2506
|
+
e.font = Yn(b, x);
|
|
2507
|
+
let T = t.hyperlinkMap.get(h), E = s?.font?.color ?? null, D = T ? "#0563C1" : V.fontColor ?? he.color ?? E ?? L.color;
|
|
2508
|
+
e.fillStyle = D ? J(D) : "#000000";
|
|
2509
|
+
let ee = F.value.type === "number", k = B.alignH ?? (ee ? "right" : "left"), A = B.alignV ?? "bottom", j = B.indent ? Math.round(B.indent * 3 * t.mdw) : 0, te = V.iconSet ? Math.max(8, Math.round(Math.min(M, N) * .55)) : 0, R = te > 0 ? te + 4 : 0, z = 3 + (k === "left" || !B.alignH ? j : 0) + R, H = M, ne = P, W = n;
|
|
2510
|
+
if (k === "centerContinuous" && !O) for (let e = n + 1; e < C; e++) {
|
|
2511
|
+
let t = `${c}:${r + e}`;
|
|
2512
|
+
if (y.has(t) || v.has(t)) break;
|
|
2513
|
+
let n = _.get(t);
|
|
2514
|
+
if (n && n.value.type !== "empty" || er(g, n?.styleIndex ?? 0).xf.alignH !== "centerContinuous") break;
|
|
2515
|
+
H += a[e], W = e;
|
|
2508
2516
|
}
|
|
2509
|
-
let le = k === "centerContinuous" ? ne :
|
|
2510
|
-
if (!
|
|
2511
|
-
let t = e.measureText(
|
|
2512
|
-
if (o >
|
|
2513
|
-
let e = o -
|
|
2514
|
-
if (k === "right" ? l = e : k === "center" ||
|
|
2515
|
-
let e = t, o =
|
|
2516
|
-
for (let t = o; t <
|
|
2517
|
-
let n = `${
|
|
2518
|
-
if (
|
|
2519
|
-
let
|
|
2520
|
-
if (
|
|
2521
|
-
ue +=
|
|
2517
|
+
let le = k === "centerContinuous" ? ne : P, ue = k === "centerContinuous" ? H : M, G = q.includes("\n");
|
|
2518
|
+
if (!O && !B.wrapText && !B.textRotation && !ee && !G) {
|
|
2519
|
+
let t = e.measureText(q).width, i = k === "centerContinuous", o = i ? t + 6 : t + z + 3, s = i ? H : M;
|
|
2520
|
+
if (o > s) {
|
|
2521
|
+
let e = o - s, t = 0, l = 0;
|
|
2522
|
+
if (k === "right" ? l = e : k === "center" || i ? (l = e / 2, t = e / 2) : t = e, t > 0) {
|
|
2523
|
+
let e = t, o = i ? W + 1 : n + 1;
|
|
2524
|
+
for (let t = o; t < C && e > 0; t++) {
|
|
2525
|
+
let n = `${c}:${r + t}`;
|
|
2526
|
+
if (y.has(n) || v.has(n)) break;
|
|
2527
|
+
let i = _.get(n);
|
|
2528
|
+
if (i && i.value.type !== "empty") break;
|
|
2529
|
+
ue += a[t], e -= a[t];
|
|
2522
2530
|
}
|
|
2523
2531
|
}
|
|
2524
2532
|
if (l > 0) {
|
|
2525
2533
|
let e = l;
|
|
2526
2534
|
for (let t = n - 1; t >= 0 && e > 0; t--) {
|
|
2527
|
-
let n = `${
|
|
2528
|
-
if (
|
|
2529
|
-
let
|
|
2530
|
-
if (
|
|
2531
|
-
le -=
|
|
2535
|
+
let n = `${c}:${r + t}`;
|
|
2536
|
+
if (y.has(n) || v.has(n)) break;
|
|
2537
|
+
let i = _.get(n);
|
|
2538
|
+
if (i && i.value.type !== "empty") break;
|
|
2539
|
+
le -= a[t], ue += a[t], e -= a[t];
|
|
2532
2540
|
}
|
|
2533
2541
|
}
|
|
2534
2542
|
}
|
|
2535
2543
|
}
|
|
2536
|
-
let de =
|
|
2537
|
-
if (k === "fill" && !
|
|
2538
|
-
let t = Math.max(1,
|
|
2544
|
+
let de = q, fe = 0;
|
|
2545
|
+
if (k === "fill" && !ee && q.length > 0) {
|
|
2546
|
+
let t = Math.max(1, M - 6), n = e.measureText(q).width;
|
|
2539
2547
|
if (n > 0 && n < t) {
|
|
2540
2548
|
let e = Math.max(1, Math.floor(t / n));
|
|
2541
|
-
de =
|
|
2549
|
+
de = q.repeat(e);
|
|
2542
2550
|
}
|
|
2543
2551
|
}
|
|
2544
|
-
if (k === "distributed" || k === "justify" && !
|
|
2545
|
-
let t = Math.max(1,
|
|
2552
|
+
if (k === "distributed" || k === "justify" && !B.wrapText && !G) {
|
|
2553
|
+
let t = Math.max(1, M - 6), n = e.measureText(de).width, r = Math.max(1, [...de].length - 1);
|
|
2546
2554
|
n < t && (fe = Math.max(0, (t - n) / r));
|
|
2547
2555
|
}
|
|
2548
|
-
let
|
|
2549
|
-
k === "right" ? (
|
|
2550
|
-
let me =
|
|
2551
|
-
if (
|
|
2552
|
-
let t =
|
|
2556
|
+
let K, pe;
|
|
2557
|
+
k === "right" ? (K = P + M - 3, pe = "right") : k === "center" ? (K = P + M / 2, pe = "center") : k === "centerContinuous" ? (K = ne + H / 2, pe = "center") : k === "distributed" || k === "justify" && !B.wrapText && !G ? (K = P + 3, pe = "left") : (K = P + z, pe = "left");
|
|
2558
|
+
let me = B.textRotation ?? 0, ge = me === 255, _e = me > 0 && me !== 255;
|
|
2559
|
+
if (V.iconSet && te > 0 && (e.save(), e.beginPath(), e.rect(P, w, M, N), e.clip(), yr(e, V.iconSet.name, V.iconSet.index, P + 2, w + (N - te) / 2, te), e.restore()), e.save(), e.beginPath(), e.rect(le, w, ue, N), e.clip(), ge) {
|
|
2560
|
+
let t = Jn(L.size, x, 1.1), n = [...q].length * t, r = A === "top" ? w + 2 : A === "center" ? w + (N - n) / 2 : w + N - n - 2;
|
|
2553
2561
|
e.textAlign = "center", e.textBaseline = "top";
|
|
2554
|
-
for (let n of
|
|
2555
|
-
let
|
|
2556
|
-
yn(e, n,
|
|
2562
|
+
for (let n of q) {
|
|
2563
|
+
let a = n.codePointAt(0) ?? 0, o = i(a) && I(e, a);
|
|
2564
|
+
yn(e, n, P + M / 2, r, t, o), r += t;
|
|
2557
2565
|
}
|
|
2558
2566
|
e.restore();
|
|
2559
2567
|
return;
|
|
2560
2568
|
}
|
|
2561
2569
|
if (_e) {
|
|
2562
2570
|
let t = me <= 90 ? -(me * Math.PI / 180) : (me - 90) * Math.PI / 180;
|
|
2563
|
-
e.translate(
|
|
2571
|
+
e.translate(P + M / 2, w + N / 2), e.rotate(t), e.textAlign = "center", e.textBaseline = "middle", e.fillText(q, 0, 0), e.restore();
|
|
2564
2572
|
return;
|
|
2565
2573
|
}
|
|
2566
|
-
if (
|
|
2567
|
-
let t = e.measureText(
|
|
2574
|
+
if (B.shrinkToFit) {
|
|
2575
|
+
let t = e.measureText(q).width, n = M - z - 3;
|
|
2568
2576
|
if (t > n && t > 0) {
|
|
2569
|
-
let r = n / t, i = k === "right" ?
|
|
2577
|
+
let r = n / t, i = k === "right" ? P + M - 3 : k === "center" ? P + M / 2 : P + z;
|
|
2570
2578
|
e.transform(r, 0, 0, 1, i * (1 - r), 0);
|
|
2571
2579
|
}
|
|
2572
2580
|
}
|
|
@@ -2574,88 +2582,90 @@ function wr(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
|
|
|
2574
2582
|
e.letterSpacing = `${fe}px`;
|
|
2575
2583
|
} catch {}
|
|
2576
2584
|
try {
|
|
2577
|
-
e.direction = pn(
|
|
2585
|
+
e.direction = pn(B.readingOrder, q) ? "rtl" : "ltr";
|
|
2578
2586
|
} catch {}
|
|
2579
|
-
let ve =
|
|
2580
|
-
if (
|
|
2587
|
+
let ve = F.value.type === "text" ? F.value.runs : void 0, ye = ve && ve.length > 0;
|
|
2588
|
+
if (B.wrapText && ye) mr(e, ve, b, {
|
|
2581
2589
|
alignH: k,
|
|
2582
2590
|
alignV: A,
|
|
2583
|
-
cx:
|
|
2584
|
-
cy:
|
|
2585
|
-
cellW:
|
|
2586
|
-
cellH:
|
|
2587
|
-
leftPad:
|
|
2591
|
+
cx: P,
|
|
2592
|
+
cy: w,
|
|
2593
|
+
cellW: M,
|
|
2594
|
+
cellH: N,
|
|
2595
|
+
leftPad: z,
|
|
2588
2596
|
paddingX: 3,
|
|
2589
2597
|
paddingY: 2
|
|
2590
|
-
},
|
|
2591
|
-
fontColor:
|
|
2592
|
-
readingOrder:
|
|
2598
|
+
}, x, S, {
|
|
2599
|
+
fontColor: V.fontColor,
|
|
2600
|
+
readingOrder: B.readingOrder
|
|
2593
2601
|
});
|
|
2594
|
-
else if (
|
|
2595
|
-
let t =
|
|
2596
|
-
A === "top" ? (i =
|
|
2597
|
-
for (let r = 0; r < t.length; r++) e.fillText(t[r],
|
|
2598
|
-
} else if (ye)
|
|
2602
|
+
else if (B.wrapText) {
|
|
2603
|
+
let t = tr(e, q, M - z - 3), n = Jn(L.size, x, 1.2, L.name ?? void 0), r = t.length * n, i;
|
|
2604
|
+
A === "top" ? (i = w + 2, e.textBaseline = "top") : A === "center" ? (i = w + (N - r) / 2, e.textBaseline = "top") : (i = w + N - r - 2, e.textBaseline = "top");
|
|
2605
|
+
for (let r = 0; r < t.length; r++) e.fillText(t[r], K, i + r * n);
|
|
2606
|
+
} else if (ye) pr(e, ve, b, {
|
|
2599
2607
|
alignH: k,
|
|
2600
2608
|
alignV: A,
|
|
2601
|
-
cx:
|
|
2602
|
-
cy:
|
|
2603
|
-
cellW:
|
|
2604
|
-
cellH:
|
|
2605
|
-
leftPad:
|
|
2609
|
+
cx: P,
|
|
2610
|
+
cy: w,
|
|
2611
|
+
cellW: M,
|
|
2612
|
+
cellH: N,
|
|
2613
|
+
leftPad: z,
|
|
2606
2614
|
paddingX: 3,
|
|
2607
2615
|
paddingY: 2
|
|
2608
|
-
},
|
|
2609
|
-
fontColor:
|
|
2610
|
-
readingOrder:
|
|
2616
|
+
}, x, S, {
|
|
2617
|
+
fontColor: V.fontColor,
|
|
2618
|
+
readingOrder: B.readingOrder
|
|
2611
2619
|
});
|
|
2612
2620
|
else {
|
|
2613
|
-
let t =
|
|
2621
|
+
let t = b.vertAlign, n = Jn(L.size, x), r = 0;
|
|
2614
2622
|
t === "superscript" ? r = -Math.round(n * .35) : t === "subscript" && (r = Math.round(n * .1));
|
|
2615
2623
|
let i = t ? {
|
|
2616
|
-
...
|
|
2617
|
-
size:
|
|
2618
|
-
} :
|
|
2619
|
-
t && (e.font =
|
|
2620
|
-
let a = null, o = () => a ??= e.measureText(
|
|
2621
|
-
let e = Math.min(o().width, ue -
|
|
2624
|
+
...b,
|
|
2625
|
+
size: b.size * .65
|
|
2626
|
+
} : b;
|
|
2627
|
+
t && (e.font = Yn(i, x));
|
|
2628
|
+
let a = null, o = () => a ??= e.measureText(q), s = () => {
|
|
2629
|
+
let e = Math.min(o().width, ue - z - 3);
|
|
2622
2630
|
return {
|
|
2623
|
-
x: k === "right" ?
|
|
2631
|
+
x: k === "right" ? P + M - 3 - e : k === "center" ? P + M / 2 - e / 2 : P + z,
|
|
2624
2632
|
width: e
|
|
2625
2633
|
};
|
|
2626
|
-
}, c =
|
|
2627
|
-
if (
|
|
2628
|
-
let { x: t, width: n } = s(), i = (A === "top" ?
|
|
2629
|
-
|
|
2634
|
+
}, c = Jn(i.size, x);
|
|
2635
|
+
if (b.underline || T) {
|
|
2636
|
+
let { x: t, width: n } = s(), i = (A === "top" ? w + 2 + c + 1 : A === "center" ? w + N / 2 + Math.round(c * .55) : w + N - 2 + 1) + r, a = T ? "#0563C1" : D ? J(D) : "#000000", o = b.underlineStyle === "double" || b.underlineStyle === "doubleAccounting";
|
|
2637
|
+
Qn(e, t, t + n, i, a, o, S);
|
|
2630
2638
|
}
|
|
2631
|
-
if (
|
|
2632
|
-
let { x: t, width: n } = s(), i = (A === "top" ?
|
|
2633
|
-
e.save(), e.strokeStyle =
|
|
2639
|
+
if (b.strike) {
|
|
2640
|
+
let { x: t, width: n } = s(), i = (A === "top" ? w + 2 + Math.round(c * .5) : A === "center" ? w + N / 2 : w + N - 2 - Math.round(c * .35)) + r, a = i + d(i, .5, S);
|
|
2641
|
+
e.save(), e.strokeStyle = D ? J(D) : "#000000", e.lineWidth = .5, e.beginPath(), e.moveTo(t, a), e.lineTo(t + n, a), e.stroke(), e.restore();
|
|
2634
2642
|
}
|
|
2635
|
-
if (
|
|
2636
|
-
let t =
|
|
2637
|
-
A === "top" ? (a =
|
|
2638
|
-
for (let i = 0; i < t.length; i++) e.fillText(t[i],
|
|
2643
|
+
if (q.includes("\n")) {
|
|
2644
|
+
let t = q.split("\n"), n = Jn(L.size, x, 1.2, L.name ?? void 0), i = t.length * n, a;
|
|
2645
|
+
A === "top" ? (a = w + 2, e.textBaseline = "top") : A === "center" ? (a = w + (N - i) / 2, e.textBaseline = "top") : (a = w + N - i - 2, e.textBaseline = "top");
|
|
2646
|
+
for (let i = 0; i < t.length; i++) e.fillText(t[i], K, a + i * n + r);
|
|
2639
2647
|
} else {
|
|
2640
2648
|
let t;
|
|
2641
|
-
A === "top" ? (e.textBaseline = "top", t =
|
|
2649
|
+
A === "top" ? (e.textBaseline = "top", t = w + 2) : A === "center" ? (e.textBaseline = "middle", t = w + N / 2) : (e.textBaseline = "bottom", t = w + N - 2), e.fillText(de, K, t + r);
|
|
2642
2650
|
}
|
|
2643
2651
|
}
|
|
2644
|
-
let be =
|
|
2645
|
-
if (
|
|
2646
|
-
let t =
|
|
2647
|
-
r = k === "right" ?
|
|
2648
|
-
let i =
|
|
2649
|
-
|
|
2652
|
+
let be = F.value.type === "text" ? F.value.phoneticRuns : void 0;
|
|
2653
|
+
if (F.showPhonetic && be && be.length > 0 && !q.includes("\n")) {
|
|
2654
|
+
let t = Yn(b, x), n = Zn(e, q, t), r;
|
|
2655
|
+
r = k === "right" ? P + M - 3 - n : k === "center" ? P + M / 2 - n / 2 : P + z;
|
|
2656
|
+
let i = D ? J(D) : "#000000";
|
|
2657
|
+
Xn(e, be, F.value.type === "text" ? F.value.phoneticPr : void 0, q, t, g, r, w, x, i);
|
|
2650
2658
|
}
|
|
2651
|
-
e.restore(),
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
+
e.restore(), q && t.onTextRun && t.onTextRun({
|
|
2660
|
+
sheetName: t.worksheet.name,
|
|
2661
|
+
cellRef: vn(c, o),
|
|
2662
|
+
text: q,
|
|
2663
|
+
x: P,
|
|
2664
|
+
y: w,
|
|
2665
|
+
width: M,
|
|
2666
|
+
height: N,
|
|
2667
|
+
row: c,
|
|
2668
|
+
col: o
|
|
2659
2669
|
});
|
|
2660
2670
|
});
|
|
2661
2671
|
}
|
|
@@ -2665,9 +2675,9 @@ function wr(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
|
|
|
2665
2675
|
for (let e of k) e();
|
|
2666
2676
|
e.restore();
|
|
2667
2677
|
}
|
|
2668
|
-
var
|
|
2669
|
-
function
|
|
2670
|
-
let t =
|
|
2678
|
+
var Er = /* @__PURE__ */ new WeakMap();
|
|
2679
|
+
function Dr(e) {
|
|
2680
|
+
let t = Er.get(e);
|
|
2671
2681
|
if (t) return t;
|
|
2672
2682
|
let n = /* @__PURE__ */ new Map();
|
|
2673
2683
|
for (let t of e.rows) for (let e of t.cells) n.set(`${e.row}:${e.col}`, e);
|
|
@@ -2682,7 +2692,7 @@ function Er(e) {
|
|
|
2682
2692
|
for (let t of e.hyperlinks ?? []) t.url && a.set(`${t.row}:${t.col}`, t.url);
|
|
2683
2693
|
let o = /* @__PURE__ */ new Set();
|
|
2684
2694
|
for (let t of e.commentRefs ?? []) {
|
|
2685
|
-
let e =
|
|
2695
|
+
let e = Gn(t);
|
|
2686
2696
|
e && o.add(`${e.row}:${e.col}`);
|
|
2687
2697
|
}
|
|
2688
2698
|
let s = {
|
|
@@ -2692,226 +2702,230 @@ function Er(e) {
|
|
|
2692
2702
|
autoFilterCells: i,
|
|
2693
2703
|
hyperlinkMap: a,
|
|
2694
2704
|
commentCells: o,
|
|
2695
|
-
tableStyleMap:
|
|
2696
|
-
sparklineMap:
|
|
2705
|
+
tableStyleMap: xr(e),
|
|
2706
|
+
sparklineMap: Cr(e)
|
|
2697
2707
|
};
|
|
2698
|
-
return
|
|
2708
|
+
return Er.set(e, s), s;
|
|
2699
2709
|
}
|
|
2700
|
-
function
|
|
2710
|
+
function Or(e, t, n, r, i = {}) {
|
|
2701
2711
|
let a = i.dpr ?? 1, o = i.cellScale ?? 1, s = Z(t), c = e.canvas.width / a, l = e.canvas.height / a;
|
|
2702
2712
|
e.clearRect(0, 0, c, l), e.fillStyle = "#ffffff", e.fillRect(0, 0, c, l);
|
|
2703
|
-
let u = (e) => Math.round(e * o),
|
|
2704
|
-
for (let e = 1; e <=
|
|
2705
|
-
let
|
|
2706
|
-
for (let e = 1; e <=
|
|
2707
|
-
let
|
|
2708
|
-
for (let e =
|
|
2709
|
-
let
|
|
2710
|
-
for (let e =
|
|
2711
|
-
let { cellMap:
|
|
2713
|
+
let u = (e) => Math.round(e * o), f = u(50), p = u(22), { row: m, col: h, rows: g, cols: _ } = r, v = (i.scrollOffsetX ?? 0) * o, y = (i.scrollOffsetY ?? 0) * o, b = i.freezeRows ?? 0, x = i.freezeCols ?? 0, S = [];
|
|
2714
|
+
for (let e = 1; e <= x; e++) S.push(u(Q(t.colWidths[e] ?? t.defaultColWidth, s)));
|
|
2715
|
+
let C = [];
|
|
2716
|
+
for (let e = 1; e <= b; e++) C.push(u($(t.rowHeights[e] ?? t.defaultRowHeight)));
|
|
2717
|
+
let w = S.reduce((e, t) => e + t, 0), T = C.reduce((e, t) => e + t, 0), E = [];
|
|
2718
|
+
for (let e = h; e < h + _; e++) E.push(u(Q(t.colWidths[e] ?? t.defaultColWidth, s)));
|
|
2719
|
+
let D = [];
|
|
2720
|
+
for (let e = m; e < m + g; e++) D.push(u($(t.rowHeights[e] ?? t.defaultRowHeight)));
|
|
2721
|
+
let { cellMap: O, cfContext: ee, mergeSkipSet: k, autoFilterCells: A, hyperlinkMap: j, commentCells: te, tableStyleMap: M, sparklineMap: N } = Dr(t), P = /* @__PURE__ */ new Map();
|
|
2712
2722
|
for (let e of t.mergeCells ?? []) {
|
|
2713
2723
|
let n = 0;
|
|
2714
2724
|
for (let r = e.left; r <= e.right; r++) n += u(Q(t.colWidths[r] ?? t.defaultColWidth, s));
|
|
2715
2725
|
let r = 0;
|
|
2716
2726
|
for (let n = e.top; n <= e.bottom; n++) r += u($(t.rowHeights[n] ?? t.defaultRowHeight));
|
|
2717
|
-
|
|
2727
|
+
P.set(`${e.top}:${e.left}`, {
|
|
2718
2728
|
totalW: n,
|
|
2719
2729
|
totalH: r,
|
|
2720
2730
|
right: e.right,
|
|
2721
2731
|
bottom: e.bottom
|
|
2722
2732
|
});
|
|
2723
2733
|
}
|
|
2724
|
-
let
|
|
2734
|
+
let F = {
|
|
2725
2735
|
worksheet: t,
|
|
2726
2736
|
styles: n,
|
|
2727
|
-
cellMap:
|
|
2728
|
-
mergeAnchorMap:
|
|
2737
|
+
cellMap: O,
|
|
2738
|
+
mergeAnchorMap: P,
|
|
2729
2739
|
mergeSkipSet: k,
|
|
2730
|
-
cfContext:
|
|
2731
|
-
colWidths:
|
|
2732
|
-
rowHeights:
|
|
2733
|
-
frozenColWidths:
|
|
2734
|
-
frozenRowHeights:
|
|
2735
|
-
frozenW:
|
|
2736
|
-
frozenH:
|
|
2737
|
-
startRow:
|
|
2738
|
-
startCol:
|
|
2740
|
+
cfContext: ee,
|
|
2741
|
+
colWidths: E,
|
|
2742
|
+
rowHeights: D,
|
|
2743
|
+
frozenColWidths: S,
|
|
2744
|
+
frozenRowHeights: C,
|
|
2745
|
+
frozenW: w,
|
|
2746
|
+
frozenH: T,
|
|
2747
|
+
startRow: m,
|
|
2748
|
+
startCol: h,
|
|
2739
2749
|
cs: o,
|
|
2740
2750
|
dpr: a,
|
|
2741
2751
|
autoFilterCells: A,
|
|
2742
2752
|
hyperlinkMap: j,
|
|
2743
|
-
commentCells:
|
|
2744
|
-
tableStyleMap:
|
|
2745
|
-
sparklineMap:
|
|
2753
|
+
commentCells: te,
|
|
2754
|
+
tableStyleMap: M,
|
|
2755
|
+
sparklineMap: N,
|
|
2746
2756
|
mdw: s,
|
|
2747
2757
|
onTextRun: i.onTextRun,
|
|
2748
2758
|
rtl: t.rightToLeft === !0,
|
|
2749
2759
|
canvasW: c
|
|
2750
|
-
},
|
|
2751
|
-
|
|
2752
|
-
let
|
|
2753
|
-
if (y > 0) {
|
|
2754
|
-
e.save(), e.strokeStyle = jn, e.lineWidth = .5, e.beginPath();
|
|
2755
|
-
let t = B + N(B, .5, a);
|
|
2756
|
-
U ? (e.moveTo(0, t), e.lineTo(c - d, t)) : (e.moveTo(d, t), e.lineTo(c, t)), e.stroke(), e.restore();
|
|
2757
|
-
}
|
|
2760
|
+
}, I = f, L = p, R = I + w, z = L + T, B = Math.max(0, c - R), V = Math.max(0, l - z);
|
|
2761
|
+
b > 0 && x > 0 && Tr(e, F, 1, 1, S, C, 0, 0, I, L, I, L, w, T), b > 0 && Tr(e, F, 1, h, E, C, v, 0, R, L, R, L, B, T), x > 0 && Tr(e, F, m, 1, S, D, 0, y, I, z, I, z, w, V), Tr(e, F, m, h, E, D, v, y, R, z, R, z, B, V), t.images && t.images.length > 0 && i.loadedImages && Mr(e, t, i.loadedImages, o, m, h, v, y, R, z, B, V, t.rightToLeft === !0, c), t.shapeGroups && t.shapeGroups.length > 0 && Nr(e, t, o, m, h, v, y, R, z, B, V, i.loadedImages, t.rightToLeft === !0, c), t.charts && t.charts.length > 0 && Qr(e, t, o, m, h, v, y, R, z, B, V, t.rightToLeft === !0, c), t.slicers && t.slicers.length > 0 && di(e, t, o, m, h, v, y, R, z, B, V, t.rightToLeft === !0, c), kr(e, c, l, m, h, g, _, E, D, v, y, S, C, w, T, f, p, o, a, i.selectedRowRange ?? null, i.selectedColRange ?? null, t.rightToLeft === !0);
|
|
2762
|
+
let H = t.rightToLeft === !0;
|
|
2758
2763
|
if (b > 0) {
|
|
2759
|
-
e.save(), e.strokeStyle =
|
|
2760
|
-
let t =
|
|
2761
|
-
e.moveTo(
|
|
2762
|
-
}
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
let i =
|
|
2776
|
-
e.fillStyle =
|
|
2777
|
-
let a =
|
|
2778
|
-
e.moveTo(
|
|
2779
|
-
|
|
2780
|
-
|
|
2764
|
+
e.save(), e.strokeStyle = Mn, e.lineWidth = .5, e.beginPath();
|
|
2765
|
+
let t = z + d(z, .5, a);
|
|
2766
|
+
H ? (e.moveTo(0, t), e.lineTo(c - f, t)) : (e.moveTo(f, t), e.lineTo(c, t)), e.stroke(), e.restore();
|
|
2767
|
+
}
|
|
2768
|
+
if (x > 0) {
|
|
2769
|
+
e.save(), e.strokeStyle = Mn, e.lineWidth = .5, e.beginPath();
|
|
2770
|
+
let t = H ? c - R : R, n = t + d(t, .5, a);
|
|
2771
|
+
e.moveTo(n, p), e.lineTo(n, l), e.stroke(), e.restore();
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
function kr(e, t, n, r, i, a, o, s, c, l, u, f, p, m, h, g, _, v, y, b, x, S) {
|
|
2775
|
+
let C = "#f8f9fa", w = "#e8eaed", T = "#caddf6", E = "#c8ccd0", D = "#5b9bd5", O = "#444", ee = (e) => !x || e < x.start || e > x.end ? C : x.strong ? T : w, k = (e) => !x || e < x.start || e > x.end ? E : x.strong ? D : E, A = (e) => !b || e < b.start || e > b.end ? C : b.strong ? T : w, j = (e) => !b || e < b.start || e > b.end ? E : b.strong ? D : E, te = `${Math.max(1, Math.round(11 * v))}px ${Cn}`, M = g + m, N = _ + h, P = .5 / y, F = (e, n) => S ? An(e, n, t) : e, I = S ? t - g : 0;
|
|
2776
|
+
e.fillStyle = C, e.fillRect(I, 0, g, _), e.strokeStyle = E, e.lineWidth = .5, e.beginPath();
|
|
2777
|
+
let L = I + d(I, .5, y), R = d(0, .5, y);
|
|
2778
|
+
e.moveTo(L, 0), e.lineTo(L, _), e.moveTo(I, R), e.lineTo(I + g, R), e.moveTo(I + g - P, 0), e.lineTo(I + g - P, _), e.moveTo(I, _ - P), e.lineTo(I + g, _ - P), e.stroke(), e.font = te, e.fillStyle = O;
|
|
2779
|
+
let z = (t, n, r) => {
|
|
2780
|
+
let i = F(n, r);
|
|
2781
|
+
e.fillStyle = ee(t), e.fillRect(i, 0, r, _), e.strokeStyle = k(t), e.lineWidth = .5, e.beginPath();
|
|
2782
|
+
let a = i + d(i, .5, y), o = d(0, .5, y);
|
|
2783
|
+
e.moveTo(a, 0), e.lineTo(a, _), e.moveTo(i, _ - P), e.lineTo(i + r, _ - P), e.moveTo(i, o), e.lineTo(i + r, o), e.stroke(), e.fillStyle = O, e.textAlign = "center", e.textBaseline = "middle", e.fillText(hr(t), i + r / 2, _ / 2);
|
|
2784
|
+
}, B = (t, n, r) => {
|
|
2785
|
+
let i = I;
|
|
2786
|
+
e.fillStyle = A(t), e.fillRect(i, n, g, r), e.strokeStyle = j(t), e.lineWidth = .5, e.beginPath();
|
|
2787
|
+
let a = n + d(n, .5, y), o = i + d(i, .5, y);
|
|
2788
|
+
e.moveTo(i + g - P, n), e.lineTo(i + g - P, n + r), e.moveTo(i, a), e.lineTo(i + g, a), e.moveTo(o, n), e.lineTo(o, n + r), e.stroke(), e.fillStyle = O, e.textBaseline = "middle";
|
|
2789
|
+
let s = Math.max(2, Math.round(4 * v));
|
|
2790
|
+
S ? (e.textAlign = "left", e.fillText(String(t), i + s, n + r / 2)) : (e.textAlign = "right", e.fillText(String(t), i + g - s, n + r / 2));
|
|
2781
2791
|
};
|
|
2782
|
-
if (
|
|
2783
|
-
e.save(), e.beginPath(), e.rect(
|
|
2784
|
-
let t =
|
|
2785
|
-
for (let e = 0; e <
|
|
2792
|
+
if (f.length > 0) {
|
|
2793
|
+
e.save(), e.beginPath(), e.rect(F(g, m), 0, m, _), e.clip();
|
|
2794
|
+
let t = g;
|
|
2795
|
+
for (let e = 0; e < f.length; e++) z(e + 1, t, f[e]), t += f[e];
|
|
2786
2796
|
e.restore();
|
|
2787
2797
|
}
|
|
2788
|
-
e.save(), e.beginPath(), e.rect(
|
|
2789
|
-
let
|
|
2798
|
+
e.save(), e.beginPath(), e.rect(F(M, t - M), 0, t - M, _), e.clip();
|
|
2799
|
+
let V = M - l;
|
|
2790
2800
|
for (let e = 0; e < s.length; e++) {
|
|
2791
2801
|
let n = s[e];
|
|
2792
|
-
|
|
2802
|
+
V + n > M && V < t && z(i + e, V, n), V += n;
|
|
2793
2803
|
}
|
|
2794
|
-
if (e.restore(),
|
|
2795
|
-
e.save(), e.beginPath(), e.rect(
|
|
2796
|
-
let t =
|
|
2797
|
-
for (let e = 0; e <
|
|
2804
|
+
if (e.restore(), p.length > 0) {
|
|
2805
|
+
e.save(), e.beginPath(), e.rect(I, _, g, h), e.clip();
|
|
2806
|
+
let t = _;
|
|
2807
|
+
for (let e = 0; e < p.length; e++) B(e + 1, t, p[e]), t += p[e];
|
|
2798
2808
|
e.restore();
|
|
2799
2809
|
}
|
|
2800
|
-
e.save(), e.beginPath(), e.rect(
|
|
2801
|
-
let
|
|
2810
|
+
e.save(), e.beginPath(), e.rect(I, N, g, n - N), e.clip();
|
|
2811
|
+
let H = N - u;
|
|
2802
2812
|
for (let e = 0; e < c.length; e++) {
|
|
2803
2813
|
let t = c[e];
|
|
2804
|
-
|
|
2814
|
+
H + t > N && H < n && B(r + e, H, t), H += t;
|
|
2805
2815
|
}
|
|
2806
2816
|
e.restore();
|
|
2807
2817
|
}
|
|
2808
|
-
function
|
|
2818
|
+
function Ar(e, t, n) {
|
|
2809
2819
|
let r = Z(e), i = 0;
|
|
2810
2820
|
for (let a = 1; a < t; a++) i += Math.round(Q(e.colWidths[a] ?? e.defaultColWidth, r) * n);
|
|
2811
2821
|
return i;
|
|
2812
2822
|
}
|
|
2813
|
-
function
|
|
2823
|
+
function jr(e, t, n) {
|
|
2814
2824
|
let r = 0;
|
|
2815
2825
|
for (let i = 1; i < t; i++) r += Math.round($(e.rowHeights[i] ?? e.defaultRowHeight) * n);
|
|
2816
2826
|
return r;
|
|
2817
2827
|
}
|
|
2818
|
-
function
|
|
2819
|
-
if (
|
|
2820
|
-
let m =
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
let
|
|
2826
|
-
if (
|
|
2828
|
+
function Mr(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
|
|
2829
|
+
if (u <= 0 || d <= 0) return;
|
|
2830
|
+
let m = Ar(t, a, r), h = jr(t, i, r);
|
|
2831
|
+
e.save(), e.beginPath();
|
|
2832
|
+
let g = jn(c, u, p, f);
|
|
2833
|
+
e.rect(g, l, u, d), e.clip();
|
|
2834
|
+
for (let i of t.images) {
|
|
2835
|
+
let a = n.get(bn(i.imagePath, i.duotone));
|
|
2836
|
+
if (!a) continue;
|
|
2837
|
+
let _ = i.fromCol + 1, v = i.fromRow + 1, y = Ar(t, _, r) + i.fromColOff * r / W, b = jr(t, v, r) + i.fromRowOff * r / W, x, S;
|
|
2838
|
+
if (i.editAs === "oneCell" && i.nativeExtCx > 0 && i.nativeExtCy > 0) x = i.nativeExtCx * r / W, S = i.nativeExtCy * r / W;
|
|
2827
2839
|
else {
|
|
2828
|
-
let e =
|
|
2829
|
-
|
|
2840
|
+
let e = i.toCol + 1, n = i.toRow + 1, a = Ar(t, e, r) + i.toColOff * r / W, o = jr(t, n, r) + i.toRowOff * r / W;
|
|
2841
|
+
x = a - y, S = o - b;
|
|
2830
2842
|
}
|
|
2831
|
-
if (
|
|
2832
|
-
let
|
|
2833
|
-
|
|
2843
|
+
if (x <= 0 || S <= 0) continue;
|
|
2844
|
+
let C = jn(c + (y - m) - o, x, p, f), w = l + (b - h) - s;
|
|
2845
|
+
C + x < g || C > g + u || w + S < l || w > l + d || (i.alpha != null && i.alpha < 1 ? (e.save(), e.globalAlpha = i.alpha, V(e, a, i.srcRect, C, w, x, S), e.restore()) : V(e, a, i.srcRect, C, w, x, S));
|
|
2834
2846
|
}
|
|
2835
|
-
|
|
2847
|
+
e.restore();
|
|
2836
2848
|
}
|
|
2837
|
-
function
|
|
2838
|
-
if (
|
|
2839
|
-
let
|
|
2840
|
-
if (!
|
|
2841
|
-
let
|
|
2842
|
-
e.save(), e.beginPath()
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2849
|
+
function Nr(e, t, n, r, i, a, o, s, c, l, u, d, f, p) {
|
|
2850
|
+
if (l <= 0 || u <= 0) return;
|
|
2851
|
+
let m = t.shapeGroups;
|
|
2852
|
+
if (!m || m.length === 0) return;
|
|
2853
|
+
let h = Ar(t, i, n), g = jr(t, r, n);
|
|
2854
|
+
e.save(), e.beginPath();
|
|
2855
|
+
let _ = jn(s, l, p, f);
|
|
2856
|
+
e.rect(_, c, l, u), e.clip();
|
|
2857
|
+
for (let r of m) {
|
|
2858
|
+
let i = r.fromCol + 1, m = r.fromRow + 1, v = Ar(t, i, n) + r.fromColOff * n / W, y = jr(t, m, n) + r.fromRowOff * n / W, b, x;
|
|
2859
|
+
if (r.editAs === "oneCell" && r.nativeExtCx > 0 && r.nativeExtCy > 0) b = r.nativeExtCx * n / W, x = r.nativeExtCy * n / W;
|
|
2846
2860
|
else {
|
|
2847
|
-
let e =
|
|
2848
|
-
|
|
2861
|
+
let e = r.toCol + 1, i = r.toRow + 1, a = Ar(t, e, n) + r.toColOff * n / W, o = jr(t, i, n) + r.toRowOff * n / W;
|
|
2862
|
+
b = a - v, x = o - y;
|
|
2849
2863
|
}
|
|
2850
|
-
if (
|
|
2851
|
-
let
|
|
2852
|
-
if (!(
|
|
2853
|
-
let
|
|
2854
|
-
a <= 0 || o <= 0 ||
|
|
2864
|
+
if (b <= 0 || x <= 0) continue;
|
|
2865
|
+
let S = jn(s + (v - h) - a, b, p, f), C = c + (y - g) - o;
|
|
2866
|
+
if (!(S + b < _ || S > _ + l) && !(C + x < c || C > c + u)) for (let t of r.shapes) {
|
|
2867
|
+
let r = S + t.x * b, i = C + t.y * x, a = t.w * b, o = t.h * x;
|
|
2868
|
+
a <= 0 || o <= 0 || Pr(e, t, r, i, a, o, n, d);
|
|
2855
2869
|
}
|
|
2856
2870
|
}
|
|
2857
2871
|
e.restore();
|
|
2858
2872
|
}
|
|
2859
|
-
function
|
|
2860
|
-
if (
|
|
2861
|
-
if (
|
|
2862
|
-
let
|
|
2863
|
-
|
|
2864
|
-
let
|
|
2865
|
-
for (let
|
|
2873
|
+
function Pr(e, t, n, r, i, a, o, s) {
|
|
2874
|
+
if (e.save(), t.rot !== 0 || t.flipH || t.flipV ? (e.translate(n + i / 2, r + a / 2), e.rotate(t.rot * Math.PI / 180), e.scale(t.flipH ? -1 : 1, t.flipV ? -1 : 1), e.translate(-i / 2, -a / 2)) : e.translate(n, r), t.geom.type === "custom") for (let n of t.geom.paths) {
|
|
2875
|
+
if (n.w <= 0 || n.h <= 0) continue;
|
|
2876
|
+
let r = i / n.w, o = a / n.h;
|
|
2877
|
+
e.beginPath();
|
|
2878
|
+
let s = 0, c = 0, l = 0, u = 0;
|
|
2879
|
+
for (let t of n.commands) switch (t.op) {
|
|
2866
2880
|
case "moveTo": {
|
|
2867
|
-
let
|
|
2868
|
-
|
|
2881
|
+
let n = t.x * r, i = t.y * o;
|
|
2882
|
+
e.moveTo(n, i), s = l = n, c = u = i;
|
|
2869
2883
|
break;
|
|
2870
2884
|
}
|
|
2871
2885
|
case "lineTo": {
|
|
2872
|
-
let
|
|
2873
|
-
|
|
2886
|
+
let n = t.x * r, i = t.y * o;
|
|
2887
|
+
e.lineTo(n, i), s = n, c = i;
|
|
2874
2888
|
break;
|
|
2875
2889
|
}
|
|
2876
2890
|
case "cubicBezTo": {
|
|
2877
|
-
let
|
|
2878
|
-
|
|
2891
|
+
let n = t.x3 * r, i = t.y3 * o;
|
|
2892
|
+
e.bezierCurveTo(t.x1 * r, t.y1 * o, t.x2 * r, t.y2 * o, n, i), s = n, c = i;
|
|
2879
2893
|
break;
|
|
2880
2894
|
}
|
|
2881
2895
|
case "quadBezTo": {
|
|
2882
|
-
let
|
|
2883
|
-
|
|
2896
|
+
let n = t.x2 * r, i = t.y2 * o;
|
|
2897
|
+
e.quadraticCurveTo(t.x1 * r, t.y1 * o, n, i), s = n, c = i;
|
|
2884
2898
|
break;
|
|
2885
2899
|
}
|
|
2886
2900
|
case "arcTo": {
|
|
2887
|
-
let
|
|
2888
|
-
if (
|
|
2889
|
-
let
|
|
2890
|
-
|
|
2901
|
+
let n = t.wr * r, i = t.hr * o;
|
|
2902
|
+
if (n <= 0 || i <= 0) break;
|
|
2903
|
+
let a = t.stAng / 6e4 * (Math.PI / 180), l = t.swAng / 6e4 * (Math.PI / 180), u = s - Math.cos(a) * n, d = c - Math.sin(a) * i, f = a + l;
|
|
2904
|
+
e.ellipse(u, d, n, i, 0, a, f, l < 0), s = u + Math.cos(f) * n, c = d + Math.sin(f) * i;
|
|
2891
2905
|
break;
|
|
2892
2906
|
}
|
|
2893
2907
|
case "close":
|
|
2894
|
-
|
|
2908
|
+
e.closePath(), s = l, c = u;
|
|
2895
2909
|
break;
|
|
2896
2910
|
}
|
|
2897
|
-
|
|
2911
|
+
Wr(e, t);
|
|
2898
2912
|
}
|
|
2899
|
-
else if (
|
|
2900
|
-
let
|
|
2901
|
-
|
|
2913
|
+
else if (t.geom.type === "preset") {
|
|
2914
|
+
let n = t.fillColor ?? null, r = t.strokeColor && t.strokeWidth > 0 ? () => {
|
|
2915
|
+
e.strokeStyle = t.strokeColor, e.lineWidth = Math.max(.5, t.strokeWidth / W), e.stroke();
|
|
2902
2916
|
} : null;
|
|
2903
|
-
|
|
2904
|
-
} else if (
|
|
2905
|
-
let
|
|
2906
|
-
if (
|
|
2907
|
-
let
|
|
2908
|
-
|
|
2917
|
+
ce(e, t.geom.name, 0, 0, i, a, t.geom.adj ?? [], n, r, () => {}) || (e.beginPath(), e.rect(0, 0, i, a), Wr(e, t));
|
|
2918
|
+
} else if (t.geom.type === "image") {
|
|
2919
|
+
let n = s?.get(bn(t.geom.imagePath, t.geom.duotone));
|
|
2920
|
+
if (n) {
|
|
2921
|
+
let r = t.geom.alpha;
|
|
2922
|
+
r != null && r < 1 ? (e.save(), e.globalAlpha = r, V(e, n, t.geom.srcRect, 0, 0, i, a), e.restore()) : V(e, n, t.geom.srcRect, 0, 0, i, a);
|
|
2909
2923
|
}
|
|
2910
2924
|
}
|
|
2911
|
-
|
|
2925
|
+
t.text && Ur(e, t.text, i, a, o), e.restore();
|
|
2912
2926
|
}
|
|
2913
|
-
var
|
|
2914
|
-
function
|
|
2927
|
+
var Fr = /* @__PURE__ */ new WeakMap();
|
|
2928
|
+
function Ir(e, t) {
|
|
2915
2929
|
let n = e.tinted.get(t);
|
|
2916
2930
|
if (n) return n;
|
|
2917
2931
|
let r = e.img.naturalWidth || 1, i = e.img.naturalHeight || 1, a = document.createElement("canvas");
|
|
@@ -2919,18 +2933,18 @@ function Fr(e, t) {
|
|
|
2919
2933
|
let o = a.getContext("2d");
|
|
2920
2934
|
return o ? (o.drawImage(e.img, 0, 0, r, i), o.globalCompositeOperation = "source-in", o.fillStyle = t, o.fillRect(0, 0, r, i), e.tinted.set(t, a), a) : e.img;
|
|
2921
2935
|
}
|
|
2922
|
-
function
|
|
2936
|
+
function Lr(e) {
|
|
2923
2937
|
let t = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`, n = new Image();
|
|
2924
2938
|
return new Promise((e, r) => {
|
|
2925
2939
|
n.onload = () => e(n), n.onerror = r, n.src = t;
|
|
2926
2940
|
});
|
|
2927
2941
|
}
|
|
2928
|
-
var
|
|
2929
|
-
function
|
|
2930
|
-
let r = Math.max(1, Math.round(t *
|
|
2942
|
+
var Rr = 256;
|
|
2943
|
+
function zr(e, t, n) {
|
|
2944
|
+
let r = Math.max(1, Math.round(t * Rr)), i = Math.max(1, Math.round(n * Rr));
|
|
2931
2945
|
return e.replace(/<svg([^>]*?)>/, (e, t) => `<svg${t.replace(/\s(?:width|height)="[^"]*"/g, "")} width="${r}" height="${i}">`);
|
|
2932
2946
|
}
|
|
2933
|
-
function
|
|
2947
|
+
function Br(e) {
|
|
2934
2948
|
let t = [];
|
|
2935
2949
|
for (let n of e.shapeGroups ?? []) for (let e of n.shapes) for (let n of e.text?.paragraphs ?? []) for (let e of n.runs) e.type === "math" && t.push({
|
|
2936
2950
|
nodes: e.nodes,
|
|
@@ -2938,17 +2952,17 @@ function zr(e) {
|
|
|
2938
2952
|
});
|
|
2939
2953
|
return t;
|
|
2940
2954
|
}
|
|
2941
|
-
function
|
|
2942
|
-
for (let t of e.shapeGroups ?? []) for (let e of t.shapes) for (let t of e.text?.paragraphs ?? []) for (let e of t.runs) if (e.type === "math" && !
|
|
2955
|
+
function Vr(e) {
|
|
2956
|
+
for (let t of e.shapeGroups ?? []) for (let e of t.shapes) for (let t of e.text?.paragraphs ?? []) for (let e of t.runs) if (e.type === "math" && !Fr.has(e.nodes)) return !0;
|
|
2943
2957
|
return !1;
|
|
2944
2958
|
}
|
|
2945
|
-
async function
|
|
2946
|
-
let n =
|
|
2959
|
+
async function Hr(e, t) {
|
|
2960
|
+
let n = Br(e).filter((e) => !Fr.has(e.nodes));
|
|
2947
2961
|
if (n.length !== 0) {
|
|
2948
2962
|
await t.loadMathJax();
|
|
2949
|
-
for (let e of n) if (!
|
|
2950
|
-
let n = await t.mathMLToSvg(
|
|
2951
|
-
|
|
2963
|
+
for (let e of n) if (!Fr.has(e.nodes)) try {
|
|
2964
|
+
let n = await t.mathMLToSvg(h(e.nodes, e.display)), r = await Lr(zr(Ee(n.svg, "#000000"), n.widthEm, n.ascentEm + n.descentEm));
|
|
2965
|
+
Fr.set(e.nodes, {
|
|
2952
2966
|
img: r,
|
|
2953
2967
|
widthEm: n.widthEm,
|
|
2954
2968
|
ascentEm: n.ascentEm,
|
|
@@ -2958,162 +2972,162 @@ async function Vr(e, t) {
|
|
|
2958
2972
|
} catch {}
|
|
2959
2973
|
}
|
|
2960
2974
|
}
|
|
2961
|
-
function
|
|
2962
|
-
if (
|
|
2963
|
-
let
|
|
2964
|
-
if (
|
|
2965
|
-
let
|
|
2966
|
-
let t = (e.size > 0 ? e.size : On) *
|
|
2975
|
+
function Ur(e, t, n, r, i) {
|
|
2976
|
+
if (n <= 0 || r <= 0 || t.paragraphs.length === 0) return;
|
|
2977
|
+
let a = t.lIns / W * i, o = t.rIns / W * i, s = t.tIns / W * i, c = t.bIns / W * i, l = Math.max(0, n - a - o), u = Math.max(0, r - s - c);
|
|
2978
|
+
if (l <= 0 || u <= 0) return;
|
|
2979
|
+
let d = (e) => {
|
|
2980
|
+
let t = (e.size > 0 ? e.size : On) * x * i, n = Dn(e.fontFace);
|
|
2967
2981
|
return {
|
|
2968
2982
|
font: `${e.italic ? "italic " : ""}${e.bold ? "bold " : ""}${t}px ${n}`,
|
|
2969
2983
|
px: t
|
|
2970
2984
|
};
|
|
2971
|
-
},
|
|
2985
|
+
}, f = (t, n) => {
|
|
2972
2986
|
let r = e.font;
|
|
2973
2987
|
e.font = t;
|
|
2974
2988
|
let i = e.measureText("M").actualBoundingBoxAscent;
|
|
2975
2989
|
return e.font = r, i > 0 ? i : n * .85;
|
|
2976
|
-
},
|
|
2977
|
-
for (let
|
|
2978
|
-
let
|
|
2979
|
-
let
|
|
2980
|
-
return
|
|
2990
|
+
}, p = t.wrap !== "none", m = [];
|
|
2991
|
+
for (let n of t.paragraphs) {
|
|
2992
|
+
let r = n.align || "l", a = (n.marL ?? 0) / W * i, o = (n.marR ?? 0) / W * i, s = (n.indent ?? 0) / W * i, c = Math.max(0, s), u = Math.max(0, l - a - o), h = !1, g = () => h ? a : a + c, _ = () => h ? u : u - c, v = [], y = 0, b = 0, S = 0, C = !1, w = (e) => {
|
|
2993
|
+
let r = e;
|
|
2994
|
+
return n.spaceLine && (n.spaceLine.type === "pct" ? r *= n.spaceLine.val / 1e5 : r = n.spaceLine.val * x * i), t.autoFit === "norm" && t.lnSpcReduction != null && n.spaceLine?.type !== "pts" && (r *= 1 - t.lnSpcReduction), r;
|
|
2981
2995
|
}, T = () => {
|
|
2982
|
-
if (
|
|
2983
|
-
let e = (E || On) *
|
|
2984
|
-
|
|
2996
|
+
if (b === 0) {
|
|
2997
|
+
let e = (E || On) * x * i, t = Math.max(G(D, e), G(O, e));
|
|
2998
|
+
b = Math.max(e * 1.2, t), S = f(`${e}px ${Dn(D)}`, e);
|
|
2985
2999
|
}
|
|
2986
|
-
|
|
2987
|
-
segs:
|
|
2988
|
-
align:
|
|
2989
|
-
height:
|
|
3000
|
+
b = w(b), m.push({
|
|
3001
|
+
segs: v,
|
|
3002
|
+
align: r,
|
|
3003
|
+
height: b,
|
|
2990
3004
|
ascent: S,
|
|
2991
3005
|
hasMath: C,
|
|
2992
|
-
leftInset:
|
|
2993
|
-
availW:
|
|
2994
|
-
}),
|
|
3006
|
+
leftInset: g(),
|
|
3007
|
+
availW: _()
|
|
3008
|
+
}), h = !0, v = [], y = 0, b = 0, S = 0, C = !1;
|
|
2995
3009
|
}, E = 0, D, O;
|
|
2996
|
-
for (let t of
|
|
3010
|
+
for (let t of n.runs) {
|
|
2997
3011
|
if (t.type === "break") {
|
|
2998
3012
|
T();
|
|
2999
3013
|
continue;
|
|
3000
3014
|
}
|
|
3001
3015
|
if (t.type === "math") {
|
|
3002
|
-
let e =
|
|
3016
|
+
let e = Fr.get(t.nodes);
|
|
3003
3017
|
if (!e) continue;
|
|
3004
|
-
let n = (t.fontSize ?? (E || On)) *
|
|
3018
|
+
let n = (t.fontSize ?? (E || On)) * x * i, o = e.widthEm * n, s = e.ascentEm * n, c = e.descentEm * n, l = t.color ?? "#000000";
|
|
3005
3019
|
if (t.display) {
|
|
3006
|
-
T(),
|
|
3020
|
+
T(), m.push({
|
|
3007
3021
|
segs: [{
|
|
3008
3022
|
kind: "math",
|
|
3009
3023
|
render: e,
|
|
3010
3024
|
color: l,
|
|
3011
|
-
w:
|
|
3025
|
+
w: o,
|
|
3012
3026
|
ascent: s,
|
|
3013
3027
|
descent: c
|
|
3014
3028
|
}],
|
|
3015
|
-
align:
|
|
3029
|
+
align: r,
|
|
3016
3030
|
height: w(s + c),
|
|
3017
3031
|
ascent: s,
|
|
3018
3032
|
hasMath: !0,
|
|
3019
|
-
leftInset:
|
|
3020
|
-
availW:
|
|
3021
|
-
}),
|
|
3033
|
+
leftInset: a,
|
|
3034
|
+
availW: u
|
|
3035
|
+
}), h = !0;
|
|
3022
3036
|
continue;
|
|
3023
3037
|
}
|
|
3024
|
-
|
|
3038
|
+
p && y + o > _() && v.length > 0 && T(), v.push({
|
|
3025
3039
|
kind: "math",
|
|
3026
3040
|
render: e,
|
|
3027
3041
|
color: l,
|
|
3028
|
-
w:
|
|
3042
|
+
w: o,
|
|
3029
3043
|
ascent: s,
|
|
3030
3044
|
descent: c
|
|
3031
|
-
}),
|
|
3045
|
+
}), y += o, b = Math.max(b, s + c), S = Math.max(S, s), C = !0;
|
|
3032
3046
|
continue;
|
|
3033
3047
|
}
|
|
3034
3048
|
E = t.size > 0 ? t.size : On, D = t.fontFace, O = t.fontFaceEa;
|
|
3035
|
-
let { font: n, px:
|
|
3036
|
-
|
|
3037
|
-
let
|
|
3038
|
-
for (let t = 0; t <
|
|
3049
|
+
let { font: n, px: o } = d(t), s = t.color ?? "#000000", c = Math.max(G(t.fontFace, o), G(t.fontFaceEa, o)), l = Math.max(o * 1.2, c);
|
|
3050
|
+
b = Math.max(b, l), S = Math.max(S, f(n, o)), e.font = n;
|
|
3051
|
+
let g = t.text.split("\n");
|
|
3052
|
+
for (let t = 0; t < g.length; t++) {
|
|
3039
3053
|
t > 0 && T();
|
|
3040
|
-
let
|
|
3041
|
-
if (!
|
|
3042
|
-
if (!
|
|
3043
|
-
let t = e.measureText(
|
|
3044
|
-
|
|
3054
|
+
let r = g[t];
|
|
3055
|
+
if (!r) continue;
|
|
3056
|
+
if (!p) {
|
|
3057
|
+
let t = e.measureText(r).width;
|
|
3058
|
+
v.push({
|
|
3045
3059
|
kind: "text",
|
|
3046
|
-
text:
|
|
3060
|
+
text: r,
|
|
3047
3061
|
font: n,
|
|
3048
3062
|
color: s,
|
|
3049
3063
|
w: t
|
|
3050
|
-
}),
|
|
3064
|
+
}), y += t;
|
|
3051
3065
|
continue;
|
|
3052
3066
|
}
|
|
3053
|
-
let
|
|
3054
|
-
for (let t of
|
|
3055
|
-
let
|
|
3056
|
-
if (
|
|
3057
|
-
if (
|
|
3058
|
-
let t = e.measureText(
|
|
3059
|
-
|
|
3067
|
+
let i = "";
|
|
3068
|
+
for (let t of r) {
|
|
3069
|
+
let r = i + t, a = e.measureText(r).width;
|
|
3070
|
+
if (y + a > _() && (i.length > 0 || v.length > 0)) {
|
|
3071
|
+
if (i) {
|
|
3072
|
+
let t = e.measureText(i).width;
|
|
3073
|
+
v.push({
|
|
3060
3074
|
kind: "text",
|
|
3061
|
-
text:
|
|
3075
|
+
text: i,
|
|
3062
3076
|
font: n,
|
|
3063
3077
|
color: s,
|
|
3064
3078
|
w: t
|
|
3065
|
-
}),
|
|
3079
|
+
}), y += t;
|
|
3066
3080
|
}
|
|
3067
|
-
T(),
|
|
3068
|
-
} else
|
|
3081
|
+
T(), i = t, e.font = n, b = Math.max(b, l), S = Math.max(S, f(n, o));
|
|
3082
|
+
} else i = r;
|
|
3069
3083
|
}
|
|
3070
|
-
if (
|
|
3071
|
-
let t = e.measureText(
|
|
3072
|
-
|
|
3084
|
+
if (i) {
|
|
3085
|
+
let t = e.measureText(i).width;
|
|
3086
|
+
v.push({
|
|
3073
3087
|
kind: "text",
|
|
3074
|
-
text:
|
|
3088
|
+
text: i,
|
|
3075
3089
|
font: n,
|
|
3076
3090
|
color: s,
|
|
3077
3091
|
w: t
|
|
3078
|
-
}),
|
|
3092
|
+
}), y += t;
|
|
3079
3093
|
}
|
|
3080
3094
|
}
|
|
3081
3095
|
}
|
|
3082
3096
|
T();
|
|
3083
3097
|
}
|
|
3084
|
-
let
|
|
3085
|
-
|
|
3086
|
-
let
|
|
3087
|
-
for (let t of
|
|
3088
|
-
let n = t.segs.reduce((e, t) => e + t.w, 0), r =
|
|
3098
|
+
let h = m.reduce((e, t) => e + t.height, 0), g = s;
|
|
3099
|
+
t.anchor === "ctr" ? g = s + (u - h) / 2 : t.anchor === "b" && (g = s + Math.max(0, u - h));
|
|
3100
|
+
let _ = g;
|
|
3101
|
+
for (let t of m) {
|
|
3102
|
+
let n = t.segs.reduce((e, t) => e + t.w, 0), r = a + t.leftInset, i = r;
|
|
3089
3103
|
if (t.align === "ctr" ? i = r + Math.max(0, (t.availW - n) / 2) : t.align === "r" && (i = r + Math.max(0, t.availW - n)), t.hasMath) {
|
|
3090
3104
|
e.textBaseline = "alphabetic";
|
|
3091
|
-
let n =
|
|
3105
|
+
let n = _ + t.ascent;
|
|
3092
3106
|
for (let r of t.segs) {
|
|
3093
3107
|
if (r.kind === "text") e.font = r.font, e.fillStyle = r.color, e.fillText(r.text, i, n);
|
|
3094
3108
|
else {
|
|
3095
|
-
let t =
|
|
3109
|
+
let t = Ir(r.render, r.color);
|
|
3096
3110
|
e.drawImage(t, i, n - r.ascent, r.w, r.ascent + r.descent);
|
|
3097
3111
|
}
|
|
3098
3112
|
i += r.w;
|
|
3099
3113
|
}
|
|
3100
3114
|
} else {
|
|
3101
3115
|
e.textBaseline = "middle";
|
|
3102
|
-
let n =
|
|
3116
|
+
let n = _ + t.height / 2;
|
|
3103
3117
|
for (let r of t.segs) r.kind === "text" && (e.font = r.font, e.fillStyle = r.color, e.fillText(r.text, i, n)), i += r.w;
|
|
3104
3118
|
}
|
|
3105
|
-
|
|
3119
|
+
_ += t.height;
|
|
3106
3120
|
}
|
|
3107
3121
|
}
|
|
3108
|
-
function
|
|
3109
|
-
|
|
3122
|
+
function Wr(e, t) {
|
|
3123
|
+
t.fillColor && (e.fillStyle = t.fillColor, e.fill()), t.strokeColor && t.strokeWidth > 0 && (e.strokeStyle = t.strokeColor, e.lineWidth = Math.max(.5, t.strokeWidth / W), e.stroke());
|
|
3110
3124
|
}
|
|
3111
|
-
function
|
|
3125
|
+
function Gr(e, t, n, r, i, a, o) {
|
|
3112
3126
|
if (r === n && i === t) return e;
|
|
3113
3127
|
let s = (e, r) => {
|
|
3114
3128
|
if (e === t && r === n) return null;
|
|
3115
3129
|
let i = a.get(`${e}:${r}`);
|
|
3116
|
-
return i ?
|
|
3130
|
+
return i ? er(o, i.styleIndex ?? 0).border : null;
|
|
3117
3131
|
}, c = s(t, r), l = s(i, n), u = s(i, r), d = (e, ...t) => {
|
|
3118
3132
|
if (e?.style) return e;
|
|
3119
3133
|
for (let e of t) if (e?.style) return e;
|
|
@@ -3128,7 +3142,7 @@ function Wr(e, t, n, r, i, a, o) {
|
|
|
3128
3142
|
diagonalDown: e.diagonalDown ?? null
|
|
3129
3143
|
};
|
|
3130
3144
|
}
|
|
3131
|
-
function
|
|
3145
|
+
function Kr(e, t) {
|
|
3132
3146
|
if (!t) return e;
|
|
3133
3147
|
let n = (e, t) => t && t.style ? t : e ?? null;
|
|
3134
3148
|
return {
|
|
@@ -3140,7 +3154,7 @@ function Gr(e, t) {
|
|
|
3140
3154
|
diagonalDown: n(e.diagonalDown, t.diagonalDown)
|
|
3141
3155
|
};
|
|
3142
3156
|
}
|
|
3143
|
-
function
|
|
3157
|
+
function qr(e, t, n, r, i, a, o = 1) {
|
|
3144
3158
|
let s = [
|
|
3145
3159
|
{
|
|
3146
3160
|
edge: t.top,
|
|
@@ -3191,17 +3205,17 @@ function Kr(e, t, n, r, i, a, o = 1) {
|
|
|
3191
3205
|
kind: "d"
|
|
3192
3206
|
}
|
|
3193
3207
|
];
|
|
3194
|
-
for (let { edge: t, x1: c, y1: l, x2: u, y2:
|
|
3208
|
+
for (let { edge: t, x1: c, y1: l, x2: u, y2: f, kind: p } of s) {
|
|
3195
3209
|
if (!t || !t.style || t.style === "none") continue;
|
|
3196
|
-
let s = t.color ?
|
|
3197
|
-
if (t.style === "double" &&
|
|
3210
|
+
let s = t.color ? J(t.color) : "#000000";
|
|
3211
|
+
if (t.style === "double" && p === "d") {
|
|
3198
3212
|
e.strokeStyle = s, e.lineWidth = 1, e.setLineDash([]);
|
|
3199
|
-
let t = u - c, n =
|
|
3200
|
-
e.beginPath(), e.moveTo(c + i, l + a), e.lineTo(u + i,
|
|
3213
|
+
let t = u - c, n = f - l, r = Math.hypot(t, n), i = -n / r * 1, a = t / r * 1;
|
|
3214
|
+
e.beginPath(), e.moveTo(c + i, l + a), e.lineTo(u + i, f + a), e.moveTo(c - i, l - a), e.lineTo(u - i, f - a), e.stroke();
|
|
3201
3215
|
continue;
|
|
3202
3216
|
}
|
|
3203
|
-
if (t.style === "double" &&
|
|
3204
|
-
if (e.strokeStyle = s, e.lineWidth = 1, e.setLineDash([]), e.beginPath(),
|
|
3217
|
+
if (t.style === "double" && p !== "d") {
|
|
3218
|
+
if (e.strokeStyle = s, e.lineWidth = 1, e.setLineDash([]), e.beginPath(), p === "h") {
|
|
3205
3219
|
let t = l === r, o = t ? r - 1 : r + a + 1, s = t ? r + 1 : r + a - 1;
|
|
3206
3220
|
e.moveTo(n - 1, o), e.lineTo(n + i + 1, o), e.moveTo(n + 1, s), e.lineTo(n + i - 1, s);
|
|
3207
3221
|
} else {
|
|
@@ -3212,15 +3226,15 @@ function Kr(e, t, n, r, i, a, o = 1) {
|
|
|
3212
3226
|
continue;
|
|
3213
3227
|
}
|
|
3214
3228
|
e.beginPath(), e.strokeStyle = s;
|
|
3215
|
-
let p = qr(t.style);
|
|
3216
|
-
e.lineWidth = p;
|
|
3217
3229
|
let m = Jr(t.style);
|
|
3218
|
-
e.
|
|
3219
|
-
let h =
|
|
3220
|
-
e.
|
|
3230
|
+
e.lineWidth = m;
|
|
3231
|
+
let h = Yr(t.style);
|
|
3232
|
+
e.setLineDash(h);
|
|
3233
|
+
let g = p === "v" ? d(c, m, o) : 0, _ = p === "h" ? d(l, m, o) : 0;
|
|
3234
|
+
e.moveTo(c + g, l + _), e.lineTo(u + g, f + _), e.stroke(), e.setLineDash([]);
|
|
3221
3235
|
}
|
|
3222
3236
|
}
|
|
3223
|
-
function
|
|
3237
|
+
function Jr(e) {
|
|
3224
3238
|
switch (e) {
|
|
3225
3239
|
case "thick": return 3;
|
|
3226
3240
|
case "medium":
|
|
@@ -3232,10 +3246,10 @@ function qr(e) {
|
|
|
3232
3246
|
default: return 1;
|
|
3233
3247
|
}
|
|
3234
3248
|
}
|
|
3235
|
-
function Jr(e) {
|
|
3236
|
-
return ge(e);
|
|
3237
|
-
}
|
|
3238
3249
|
function Yr(e) {
|
|
3250
|
+
return A(e);
|
|
3251
|
+
}
|
|
3252
|
+
function Xr(e) {
|
|
3239
3253
|
switch (e) {
|
|
3240
3254
|
case "double": return 13;
|
|
3241
3255
|
case "thick": return 12;
|
|
@@ -3253,62 +3267,62 @@ function Yr(e) {
|
|
|
3253
3267
|
default: return 0;
|
|
3254
3268
|
}
|
|
3255
3269
|
}
|
|
3256
|
-
function
|
|
3257
|
-
let n =
|
|
3270
|
+
function Zr(e, t) {
|
|
3271
|
+
let n = Xr(e?.style), r = Xr(t?.style);
|
|
3258
3272
|
return n === 0 && r === 0 ? null : n >= r ? e ?? null : t ?? null;
|
|
3259
3273
|
}
|
|
3260
|
-
function
|
|
3261
|
-
if (
|
|
3262
|
-
let
|
|
3263
|
-
for (let
|
|
3264
|
-
let
|
|
3265
|
-
if (
|
|
3266
|
-
let
|
|
3267
|
-
if (
|
|
3268
|
-
e.save(), e.beginPath(), e.rect(c, l, u
|
|
3269
|
-
let
|
|
3270
|
-
|
|
3271
|
-
x:
|
|
3272
|
-
y:
|
|
3273
|
-
w
|
|
3274
|
-
h:
|
|
3275
|
-
},
|
|
3276
|
-
}
|
|
3277
|
-
}
|
|
3278
|
-
var
|
|
3279
|
-
function
|
|
3280
|
-
if (
|
|
3281
|
-
let
|
|
3282
|
-
if (!
|
|
3283
|
-
let
|
|
3284
|
-
for (let
|
|
3285
|
-
let
|
|
3286
|
-
if (
|
|
3287
|
-
let
|
|
3288
|
-
|
|
3289
|
-
}
|
|
3290
|
-
}
|
|
3291
|
-
function
|
|
3292
|
-
e.fillStyle =
|
|
3274
|
+
function Qr(e, t, n, r, i, a, o, s, c, l, u, d, f) {
|
|
3275
|
+
if (l <= 0 || u <= 0) return;
|
|
3276
|
+
let p = Ar(t, i, n), m = jr(t, r, n), h = jn(s, l, f, d);
|
|
3277
|
+
for (let r of t.charts) {
|
|
3278
|
+
let i = r.fromCol + 1, g = r.fromRow + 1, _ = r.toCol + 1, v = r.toRow + 1, y = Ar(t, i, n) + r.fromColOff * n / W, b = jr(t, g, n) + r.fromRowOff * n / W, S = Ar(t, _, n) + r.toColOff * n / W, C = jr(t, v, n) + r.toRowOff * n / W, w = S - y, T = C - b;
|
|
3279
|
+
if (w <= 0 || T <= 0) continue;
|
|
3280
|
+
let E = jn(s + (y - p) - a, w, f, d), D = c + (b - m) - o;
|
|
3281
|
+
if (E + w < h || E > h + l || D + T < c || D > c + u) continue;
|
|
3282
|
+
e.save(), e.beginPath(), e.rect(h, c, l, u), e.clip();
|
|
3283
|
+
let O = x * n;
|
|
3284
|
+
_e(e, r.chart, {
|
|
3285
|
+
x: E,
|
|
3286
|
+
y: D,
|
|
3287
|
+
w,
|
|
3288
|
+
h: T
|
|
3289
|
+
}, O), e.restore();
|
|
3290
|
+
}
|
|
3291
|
+
}
|
|
3292
|
+
var $r = "600 12px \"Meiryo UI\", \"Segoe UI\", sans-serif", ei = "11px \"Meiryo UI\", \"Segoe UI\", sans-serif", ti = "#FFFFFF", ni = "#BFBFBF", ri = "#F2F2F2", ii = "#404040", ai = "#FFFFFF", oi = "#000000", si = "#A5A5A5", ci = "#E7E6E6", li = "#A6A6A6", ui = "#C6C6C6";
|
|
3293
|
+
function di(e, t, n, r, i, a, o, s, c, l, u, d, f) {
|
|
3294
|
+
if (l <= 0 || u <= 0) return;
|
|
3295
|
+
let p = t.slicers;
|
|
3296
|
+
if (!p) return;
|
|
3297
|
+
let m = Ar(t, i, n), h = jr(t, r, n), g = jn(s, l, f, d);
|
|
3298
|
+
for (let r of p) {
|
|
3299
|
+
let i = r.fromCol + 1, p = r.fromRow + 1, _ = r.toCol + 1, v = r.toRow + 1, y = Ar(t, i, n) + r.fromColOff * n / W, b = jr(t, p, n) + r.fromRowOff * n / W, x = Ar(t, _, n) + r.toColOff * n / W, S = jr(t, v, n) + r.toRowOff * n / W, C = x - y, w = S - b;
|
|
3300
|
+
if (C <= 0 || w <= 0) continue;
|
|
3301
|
+
let T = jn(s + (y - m) - a, C, f, d), E = c + (b - h) - o;
|
|
3302
|
+
T + C < g || T > g + l || E + w < c || E > c + u || (e.save(), e.beginPath(), e.rect(g, c, l, u), e.clip(), fi(e, r.caption, r.items, T, E, C, w, n), e.restore());
|
|
3303
|
+
}
|
|
3304
|
+
}
|
|
3305
|
+
function fi(e, t, n, r, i, a, o, s) {
|
|
3306
|
+
e.fillStyle = ti, e.fillRect(r, i, a, o), e.strokeStyle = ni, e.lineWidth = 1, e.strokeRect(r + .5, i + .5, a - 1, o - 1);
|
|
3293
3307
|
let c = Math.max(20 * s, 14);
|
|
3294
|
-
e.fillStyle =
|
|
3308
|
+
e.fillStyle = ri, e.fillRect(r + 1, i + 1, a - 2, c), e.fillStyle = ii, e.font = pi($r, s), e.textBaseline = "middle", e.textAlign = "left";
|
|
3295
3309
|
let l = 6 * s;
|
|
3296
|
-
if (
|
|
3310
|
+
if (mi(e, t, r + l, i + c / 2 + 1, a - 2 * l), n.length === 0) return;
|
|
3297
3311
|
let u = Math.max(1, Math.round(2 * s)), d = 4 * s, f = r + d, p = i + c + d, m = a - 2 * d, h = o - c - 2 * d;
|
|
3298
3312
|
if (m <= 0 || h <= 0) return;
|
|
3299
3313
|
let g = Math.max(18 * s, 16), _ = Math.max(1, Math.floor((h + u) / (g + u))), v = Math.min(n.length, _), y = Math.min(g, (h - u * (v - 1)) / v);
|
|
3300
3314
|
if (y <= 0) return;
|
|
3301
|
-
e.font =
|
|
3315
|
+
e.font = pi(ei, s);
|
|
3302
3316
|
let b = 8 * s;
|
|
3303
3317
|
for (let t = 0; t < v; t++) {
|
|
3304
3318
|
let r = n[t], i = p + t * (y + u), a = r.selected;
|
|
3305
|
-
e.fillStyle = a ?
|
|
3319
|
+
e.fillStyle = a ? ai : ci, e.fillRect(f, i, m, y), e.strokeStyle = a ? si : ui, e.lineWidth = 1, e.strokeRect(f + .5, i + .5, m - 1, y - 1), e.fillStyle = a ? oi : li, mi(e, r.name, f + b, i + y / 2 + 1, m - 2 * b);
|
|
3306
3320
|
}
|
|
3307
3321
|
}
|
|
3308
|
-
function
|
|
3322
|
+
function pi(e, t) {
|
|
3309
3323
|
return e.replace(/(\d+(?:\.\d+)?)px/, (e, n) => `${Math.round(Number(n) * t)}px`);
|
|
3310
3324
|
}
|
|
3311
|
-
function
|
|
3325
|
+
function mi(e, t, n, r, i) {
|
|
3312
3326
|
if (i <= 0) return;
|
|
3313
3327
|
let a = t;
|
|
3314
3328
|
if (e.measureText(a).width > i) {
|
|
@@ -3319,8 +3333,8 @@ function pi(e, t, n, r, i) {
|
|
|
3319
3333
|
}
|
|
3320
3334
|
//#endregion
|
|
3321
3335
|
//#region packages/xlsx/src/render-orchestrator.ts
|
|
3322
|
-
async function
|
|
3323
|
-
let l = t === "image/svg+xml", u =
|
|
3336
|
+
async function hi(e, t, n, r, i = 0, a = 0, o = null, s = null, c) {
|
|
3337
|
+
let l = t === "image/svg+xml", u = ue(t, o, i, a), d = () => xe(e, t, s, r, {
|
|
3324
3338
|
widthPt: u.widthPt,
|
|
3325
3339
|
heightPt: u.heightPt,
|
|
3326
3340
|
offscreenFactory: c
|
|
@@ -3328,71 +3342,71 @@ async function mi(e, t, n, r, i = 0, a = 0, o = null, s = null, c) {
|
|
|
3328
3342
|
svgImagePath: n,
|
|
3329
3343
|
srcRect: o
|
|
3330
3344
|
};
|
|
3331
|
-
if (
|
|
3332
|
-
return await
|
|
3345
|
+
if (P(f)) try {
|
|
3346
|
+
return await q(f.svgImagePath, r);
|
|
3333
3347
|
} catch {
|
|
3334
|
-
return l ?
|
|
3335
|
-
}
|
|
3336
|
-
return l ?
|
|
3337
|
-
}
|
|
3338
|
-
async function
|
|
3339
|
-
if (!
|
|
3340
|
-
let
|
|
3341
|
-
if (e.images) for (let
|
|
3342
|
-
imagePath:
|
|
3343
|
-
mimeType:
|
|
3344
|
-
svgImagePath:
|
|
3345
|
-
widthPt:
|
|
3346
|
-
heightPt:
|
|
3347
|
-
srcRect:
|
|
3348
|
-
duotone:
|
|
3348
|
+
return l ? q(e, r) : d();
|
|
3349
|
+
}
|
|
3350
|
+
return l ? q(e, r) : d();
|
|
3351
|
+
}
|
|
3352
|
+
async function gi(e, n, r, i) {
|
|
3353
|
+
if (!r) return;
|
|
3354
|
+
let a = r, o = /* @__PURE__ */ new Map();
|
|
3355
|
+
if (e.images) for (let n of e.images) o.set(bn(n.imagePath, n.duotone), {
|
|
3356
|
+
imagePath: n.imagePath,
|
|
3357
|
+
mimeType: n.mimeType,
|
|
3358
|
+
svgImagePath: n.svgImagePath,
|
|
3359
|
+
widthPt: n.nativeExtCx > 0 ? n.nativeExtCx / t : 0,
|
|
3360
|
+
heightPt: n.nativeExtCy > 0 ? n.nativeExtCy / t : 0,
|
|
3361
|
+
srcRect: n.srcRect ?? null,
|
|
3362
|
+
duotone: n.duotone ?? null
|
|
3349
3363
|
});
|
|
3350
|
-
if (e.shapeGroups) for (let
|
|
3364
|
+
if (e.shapeGroups) for (let n of e.shapeGroups) for (let e of n.shapes) e.geom.type === "image" && o.set(bn(e.geom.imagePath, e.geom.duotone), {
|
|
3351
3365
|
imagePath: e.geom.imagePath,
|
|
3352
3366
|
mimeType: e.geom.mimeType,
|
|
3353
3367
|
svgImagePath: e.geom.svgImagePath,
|
|
3354
|
-
widthPt:
|
|
3355
|
-
heightPt:
|
|
3368
|
+
widthPt: n.nativeExtCx > 0 ? n.nativeExtCx * e.w / t : 0,
|
|
3369
|
+
heightPt: n.nativeExtCy > 0 ? n.nativeExtCy * e.h / t : 0,
|
|
3356
3370
|
srcRect: e.geom.srcRect ?? null,
|
|
3357
3371
|
duotone: e.geom.duotone ?? null
|
|
3358
3372
|
});
|
|
3359
|
-
|
|
3373
|
+
o.size !== 0 && await Promise.all([...o.entries()].map(async ([e, t]) => {
|
|
3360
3374
|
try {
|
|
3361
|
-
let
|
|
3362
|
-
|
|
3375
|
+
let r = await hi(t.imagePath, t.mimeType, t.svgImagePath, a, t.widthPt, t.heightPt, t.srcRect, t.duotone, i?.offscreenFactory);
|
|
3376
|
+
n.set(e, r);
|
|
3363
3377
|
} catch {
|
|
3364
|
-
|
|
3378
|
+
n.delete(e);
|
|
3365
3379
|
}
|
|
3366
3380
|
}));
|
|
3367
3381
|
}
|
|
3368
|
-
async function
|
|
3369
|
-
let i = r.fetchImage ?
|
|
3382
|
+
async function _i(e, t, n, r = {}) {
|
|
3383
|
+
let i = r.fetchImage ? me(r.fetchImage) : void 0;
|
|
3370
3384
|
try {
|
|
3371
|
-
await
|
|
3385
|
+
await vi(e, t, n, r);
|
|
3372
3386
|
} finally {
|
|
3373
3387
|
i?.();
|
|
3374
3388
|
}
|
|
3375
3389
|
}
|
|
3376
|
-
async function
|
|
3390
|
+
async function vi(e, t, n, r = {}) {
|
|
3377
3391
|
let { ws: i, styles: a, imageCache: o } = e;
|
|
3378
|
-
await
|
|
3379
|
-
let s = r.dpr ??
|
|
3380
|
-
if (t.width !==
|
|
3381
|
-
let e = `${
|
|
3392
|
+
await gi(i, o, r.fetchImage), e.math && Vr(i) && await Hr(i, e.math);
|
|
3393
|
+
let s = r.dpr ?? _(), c = fe(t) ? t.clientWidth || 800 : t.width, l = fe(t) ? t.clientHeight || 600 : t.height, u = r.width ?? c, d = r.height ?? l, f = N(u * s, d * s), p = f.clamped ? s * f.scale : s, m = f.width, h = f.height;
|
|
3394
|
+
if (t.width !== m && (t.width = m), t.height !== h && (t.height = h), fe(t)) {
|
|
3395
|
+
let e = `${u}px`, n = `${d}px`;
|
|
3382
3396
|
t.style.width !== e && (t.style.width = e), t.style.height !== n && (t.style.height = n);
|
|
3383
3397
|
}
|
|
3384
|
-
let
|
|
3385
|
-
if (
|
|
3386
|
-
|
|
3398
|
+
let g = t.getContext("2d");
|
|
3399
|
+
if (g.setTransform(p, 0, 0, p, 0, 0), i.parseError) {
|
|
3400
|
+
yi(g, u, d, i.name, i.parseError);
|
|
3387
3401
|
return;
|
|
3388
3402
|
}
|
|
3389
|
-
|
|
3403
|
+
Or(g, i, a, n, {
|
|
3390
3404
|
...r,
|
|
3391
|
-
dpr:
|
|
3405
|
+
dpr: p,
|
|
3392
3406
|
loadedImages: o
|
|
3393
3407
|
});
|
|
3394
3408
|
}
|
|
3395
|
-
function
|
|
3409
|
+
function yi(e, t, n, r, i) {
|
|
3396
3410
|
e.save(), e.fillStyle = "#f7f7f8", e.fillRect(0, 0, t, n);
|
|
3397
3411
|
let a = t / 2, o = Math.min(t, n), s = Math.max(20, o * .1);
|
|
3398
3412
|
e.fillStyle = "#b23b3b", e.textAlign = "center", e.textBaseline = "middle", e.font = `${s}px sans-serif`, e.fillText("⚠", a, n * .32);
|
|
@@ -3412,23 +3426,23 @@ function vi(e, t, n, r, i) {
|
|
|
3412
3426
|
}
|
|
3413
3427
|
//#endregion
|
|
3414
3428
|
//#region packages/xlsx/src/google-fonts.ts
|
|
3415
|
-
var
|
|
3429
|
+
var bi = {
|
|
3416
3430
|
...r,
|
|
3417
|
-
...
|
|
3431
|
+
...u
|
|
3418
3432
|
};
|
|
3419
|
-
function*
|
|
3433
|
+
function* xi(e) {
|
|
3420
3434
|
for (let t of e?.sharedStrings ?? []) if (t.runs && t.runs.length > 0) for (let e of t.runs) yield e.text;
|
|
3421
3435
|
else yield t.text;
|
|
3422
3436
|
}
|
|
3423
|
-
function
|
|
3437
|
+
function Si(e) {
|
|
3424
3438
|
let t = /* @__PURE__ */ new Set(), n = null;
|
|
3425
|
-
for (let r of e?.styles?.fonts ?? []) r.name && (t.add(r.name), n ??=
|
|
3426
|
-
for (let r of be(
|
|
3439
|
+
for (let r of e?.styles?.fonts ?? []) r.name && (t.add(r.name), n ??= y(r.name));
|
|
3440
|
+
for (let r of be(xi(e), n)) t.add(r);
|
|
3427
3441
|
return t;
|
|
3428
3442
|
}
|
|
3429
3443
|
//#endregion
|
|
3430
3444
|
//#region packages/xlsx/src/shared-strings.ts
|
|
3431
|
-
function
|
|
3445
|
+
function Ci(e, t) {
|
|
3432
3446
|
for (let n of e.rows) for (let e of n.cells) {
|
|
3433
3447
|
let n = e.value;
|
|
3434
3448
|
if (n.type === "shared") {
|
|
@@ -3447,7 +3461,7 @@ function Si(e, t) {
|
|
|
3447
3461
|
}
|
|
3448
3462
|
return e;
|
|
3449
3463
|
}
|
|
3450
|
-
function
|
|
3464
|
+
function wi(e) {
|
|
3451
3465
|
let t = (e ?? "").trim();
|
|
3452
3466
|
if (!t) return {
|
|
3453
3467
|
kind: "unresolved",
|
|
@@ -3486,7 +3500,7 @@ function Ci(e) {
|
|
|
3486
3500
|
formula: t
|
|
3487
3501
|
};
|
|
3488
3502
|
}
|
|
3489
|
-
function
|
|
3503
|
+
function Ti(e, t) {
|
|
3490
3504
|
if (e.kind === "inline") return {
|
|
3491
3505
|
kind: "values",
|
|
3492
3506
|
values: e.values
|
|
@@ -3505,7 +3519,7 @@ function wi(e, t) {
|
|
|
3505
3519
|
values: n
|
|
3506
3520
|
};
|
|
3507
3521
|
}
|
|
3508
|
-
function
|
|
3522
|
+
function Ei(e) {
|
|
3509
3523
|
let { cell: t, panel: n, viewport: r, rtl: i } = e, a = t.y + t.h + 2, o = t.y - 2 - n.h, s;
|
|
3510
3524
|
s = a + n.h <= r.h ? a : o >= 0 ? o : a, s = Math.max(0, Math.min(s, r.h - n.h));
|
|
3511
3525
|
let c = i ? t.x + t.w - n.w : t.x;
|
|
@@ -3516,7 +3530,7 @@ function Ti(e) {
|
|
|
3516
3530
|
}
|
|
3517
3531
|
//#endregion
|
|
3518
3532
|
//#region packages/xlsx/src/workbook.ts
|
|
3519
|
-
var
|
|
3533
|
+
var Di = class e {
|
|
3520
3534
|
worker;
|
|
3521
3535
|
bridge;
|
|
3522
3536
|
parsedWorkbook = null;
|
|
@@ -3530,7 +3544,7 @@ var Ei = class e {
|
|
|
3530
3544
|
googleFontFaces = [];
|
|
3531
3545
|
_mode = "main";
|
|
3532
3546
|
constructor(e, t, n) {
|
|
3533
|
-
this.worker = e, this._mode = t, this.bridge = new
|
|
3547
|
+
this.worker = e, this._mode = t, this.bridge = new j(this.worker, {
|
|
3534
3548
|
correlate: (e) => e.id,
|
|
3535
3549
|
toError: (e) => e.type === "error" ? e.message : void 0
|
|
3536
3550
|
});
|
|
@@ -3549,8 +3563,8 @@ var Ei = class e {
|
|
|
3549
3563
|
if (!e.ok) throw Error(`Failed to fetch: ${e.status} ${e.statusText}`);
|
|
3550
3564
|
i = await e.arrayBuffer();
|
|
3551
3565
|
} else i = t;
|
|
3552
|
-
i =
|
|
3553
|
-
let a = new e(r === "worker" ? (await import("./render-worker-host-
|
|
3566
|
+
i = g(await K(i, n.password));
|
|
3567
|
+
let a = new e(r === "worker" ? (await import("./render-worker-host-Custze53.js")).createRenderWorker() : new Pe(), r, n.wasmUrl);
|
|
3554
3568
|
return await a._load(i, n), a;
|
|
3555
3569
|
}
|
|
3556
3570
|
async _load(e, t = {}) {
|
|
@@ -3573,7 +3587,7 @@ var Ei = class e {
|
|
|
3573
3587
|
this.parsedWorkbook = JSON.parse(new TextDecoder().decode(new Uint8Array(e)));
|
|
3574
3588
|
}
|
|
3575
3589
|
let r = this.parsedWorkbook?.workbook.parseError;
|
|
3576
|
-
r && console.warn(`[ooxml] xlsx opened with a degraded part: ${r}`), this._mode === "main" && t.useGoogleFonts && (this.googleFontFaces = await
|
|
3590
|
+
r && console.warn(`[ooxml] xlsx opened with a degraded part: ${r}`), this._mode === "main" && t.useGoogleFonts && (this.googleFontFaces = await p(Si(this.parsedWorkbook), bi));
|
|
3577
3591
|
}
|
|
3578
3592
|
get sheetNames() {
|
|
3579
3593
|
return this.parsedWorkbook?.workbook.sheets.map((e) => e.name) ?? [];
|
|
@@ -3608,7 +3622,7 @@ var Ei = class e {
|
|
|
3608
3622
|
let { worksheetJson: e } = r;
|
|
3609
3623
|
i = JSON.parse(new TextDecoder().decode(new Uint8Array(e)));
|
|
3610
3624
|
}
|
|
3611
|
-
return
|
|
3625
|
+
return Ci(i, this.parsedWorkbook.sharedStrings), this.sheetCache.set(e, i), i;
|
|
3612
3626
|
}
|
|
3613
3627
|
async getImage(e, t) {
|
|
3614
3628
|
let n = this.imageBlobCache.get(e);
|
|
@@ -3631,8 +3645,8 @@ var Ei = class e {
|
|
|
3631
3645
|
}
|
|
3632
3646
|
async resolveValidationList(e, t) {
|
|
3633
3647
|
if (!this.parsedWorkbook) throw Error("Workbook not loaded");
|
|
3634
|
-
let n =
|
|
3635
|
-
if (n.kind !== "range") return
|
|
3648
|
+
let n = wi(t);
|
|
3649
|
+
if (n.kind !== "range") return Ti(n, () => null);
|
|
3636
3650
|
let r = e;
|
|
3637
3651
|
if (n.sheet) {
|
|
3638
3652
|
let e = this.sheetNames.findIndex((e) => e.toLowerCase() === n.sheet?.toLowerCase());
|
|
@@ -3644,7 +3658,7 @@ var Ei = class e {
|
|
|
3644
3658
|
}
|
|
3645
3659
|
let i = await this.getWorksheet(r), a = this.parsedWorkbook.styles, o = /* @__PURE__ */ new Map();
|
|
3646
3660
|
for (let e of i.rows) for (let t of e.cells) o.set(`${t.row}:${t.col}`, t);
|
|
3647
|
-
return
|
|
3661
|
+
return Ti(n, (e, t) => {
|
|
3648
3662
|
let n = o.get(`${e}:${t}`);
|
|
3649
3663
|
return n ? bt(n, a, null, i.date1904) : null;
|
|
3650
3664
|
});
|
|
@@ -3655,7 +3669,7 @@ var Ei = class e {
|
|
|
3655
3669
|
async renderViewport(e, t, n, r = {}) {
|
|
3656
3670
|
if (this._mode === "worker") throw Error("renderViewport(canvas) is unavailable in mode: 'worker'; use renderViewportToBitmap() and paint it via an ImageBitmapRenderingContext");
|
|
3657
3671
|
if (!this.parsedWorkbook) throw Error("Workbook not loaded");
|
|
3658
|
-
return
|
|
3672
|
+
return _i({
|
|
3659
3673
|
ws: this.sheetCache.get(t) ?? await this.getWorksheet(t),
|
|
3660
3674
|
styles: this.parsedWorkbook.styles,
|
|
3661
3675
|
imageCache: this.imageCache,
|
|
@@ -3668,7 +3682,7 @@ var Ei = class e {
|
|
|
3668
3682
|
async renderViewportToBitmap(e, t, n) {
|
|
3669
3683
|
let r = {
|
|
3670
3684
|
...n,
|
|
3671
|
-
dpr: n.dpr ??
|
|
3685
|
+
dpr: n.dpr ?? _()
|
|
3672
3686
|
};
|
|
3673
3687
|
if (this._mode === "worker") {
|
|
3674
3688
|
if (!Number.isInteger(e) || e < 0 || e >= this.sheetCount) throw Error(`Sheet index ${e} out of range (count: ${this.sheetCount})`);
|
|
@@ -3684,12 +3698,12 @@ var Ei = class e {
|
|
|
3684
3698
|
return await this.renderViewport(i, e, t, r), i.transferToImageBitmap();
|
|
3685
3699
|
}
|
|
3686
3700
|
destroy() {
|
|
3687
|
-
this.bridge.terminate(), this.parsedWorkbook = null, this.sheetCache.clear(), this.googleFontFaces.length > 0 && (
|
|
3701
|
+
this.bridge.terminate(), this.parsedWorkbook = null, this.sheetCache.clear(), this.googleFontFaces.length > 0 && (te(this.googleFontFaces), this.googleFontFaces = []), this.imageCache.clear(), R(this._fetchImage), Se(this._fetchImage), oe(this._fetchImage), this.imageBlobCache.clear(), this.rawData = null;
|
|
3688
3702
|
}
|
|
3689
3703
|
};
|
|
3690
3704
|
//#endregion
|
|
3691
3705
|
//#region packages/xlsx/src/data-validation.ts
|
|
3692
|
-
function
|
|
3706
|
+
function Oi(e, t, n) {
|
|
3693
3707
|
if (!e) return !1;
|
|
3694
3708
|
for (let r of e.split(/\s+/)) {
|
|
3695
3709
|
if (!r) continue;
|
|
@@ -3706,14 +3720,14 @@ function Di(e, t, n) {
|
|
|
3706
3720
|
}
|
|
3707
3721
|
return !1;
|
|
3708
3722
|
}
|
|
3709
|
-
function
|
|
3723
|
+
function ki(e, t, n) {
|
|
3710
3724
|
if (!e) return null;
|
|
3711
|
-
for (let r of e) if (r.validationType === "list" &&
|
|
3725
|
+
for (let r of e) if (r.validationType === "list" && Oi(r.sqref, t, n)) return r;
|
|
3712
3726
|
return null;
|
|
3713
3727
|
}
|
|
3714
3728
|
//#endregion
|
|
3715
3729
|
//#region packages/xlsx/src/find.ts
|
|
3716
|
-
var
|
|
3730
|
+
var Ai = class {
|
|
3717
3731
|
_matches = [];
|
|
3718
3732
|
_active = -1;
|
|
3719
3733
|
constructor(e, t, n) {
|
|
@@ -3763,7 +3777,7 @@ var ki = class {
|
|
|
3763
3777
|
for (let r = 0; r < n; r++) {
|
|
3764
3778
|
let n = await this._collectSheetCells(r), i = this._sheetName(r);
|
|
3765
3779
|
for (let a of n) {
|
|
3766
|
-
let n =
|
|
3780
|
+
let n = ne(pe([{ text: a.text }]), e, t);
|
|
3767
3781
|
for (let e of n) {
|
|
3768
3782
|
let t = e.slices[0], n = a.text.slice(t.start, t.end);
|
|
3769
3783
|
this._matches.push({
|
|
@@ -3779,10 +3793,10 @@ var ki = class {
|
|
|
3779
3793
|
return this.matches();
|
|
3780
3794
|
}
|
|
3781
3795
|
next() {
|
|
3782
|
-
return this._active =
|
|
3796
|
+
return this._active = he(this._active, this._matches.length), this._activePublic();
|
|
3783
3797
|
}
|
|
3784
3798
|
prev() {
|
|
3785
|
-
return this._active =
|
|
3799
|
+
return this._active = le(this._active, this._matches.length), this._activePublic();
|
|
3786
3800
|
}
|
|
3787
3801
|
_activePublic() {
|
|
3788
3802
|
let e = this._locationAt(this._active);
|
|
@@ -3793,7 +3807,7 @@ var ki = class {
|
|
|
3793
3807
|
} : null;
|
|
3794
3808
|
}
|
|
3795
3809
|
};
|
|
3796
|
-
function
|
|
3810
|
+
function ji(e) {
|
|
3797
3811
|
let { cell: t, popup: n, viewport: r, rtl: i } = e, a = t.x + t.w + 8, o = t.x - 8 - n.w, s = a + n.w <= r.w, c = o >= 0, l;
|
|
3798
3812
|
l = i ? c ? o : s ? a : o : s ? a : c ? o : a, l = Math.max(0, Math.min(l, r.w - n.w));
|
|
3799
3813
|
let u = t.y;
|
|
@@ -3802,10 +3816,10 @@ function Ai(e) {
|
|
|
3802
3816
|
top: u
|
|
3803
3817
|
};
|
|
3804
3818
|
}
|
|
3805
|
-
function
|
|
3819
|
+
function Mi(e) {
|
|
3806
3820
|
return e > 0 ? (e + 1) * 19 : 0;
|
|
3807
3821
|
}
|
|
3808
|
-
function
|
|
3822
|
+
function Ni(e, t) {
|
|
3809
3823
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = 0, a = 0;
|
|
3810
3824
|
for (let t of e) t.level > 0 && n.set(t.index, t.level), t.collapsed && r.set(t.index, !0), t.index > i && (i = t.index), t.level > a && (a = t.level);
|
|
3811
3825
|
let o = i, s = [];
|
|
@@ -3819,15 +3833,15 @@ function Mi(e, t) {
|
|
|
3819
3833
|
for (let i = 1; i <= o + 1; i++) c(i) >= e ? n ? n.end = i : n = {
|
|
3820
3834
|
start: i,
|
|
3821
3835
|
end: i
|
|
3822
|
-
} : n &&= (s.push(
|
|
3823
|
-
n && s.push(
|
|
3836
|
+
} : n &&= (s.push(Pi(e, n, t, r, c)), null);
|
|
3837
|
+
n && s.push(Pi(e, n, t, r, c));
|
|
3824
3838
|
}
|
|
3825
3839
|
return {
|
|
3826
3840
|
maxLevel: a,
|
|
3827
3841
|
groups: s
|
|
3828
3842
|
};
|
|
3829
3843
|
}
|
|
3830
|
-
function
|
|
3844
|
+
function Pi(e, t, n, r, i) {
|
|
3831
3845
|
let a = null;
|
|
3832
3846
|
if (n) {
|
|
3833
3847
|
let n = t.end + 1;
|
|
@@ -3845,7 +3859,7 @@ function Ni(e, t, n, r, i) {
|
|
|
3845
3859
|
collapsed: o
|
|
3846
3860
|
};
|
|
3847
3861
|
}
|
|
3848
|
-
function
|
|
3862
|
+
function Fi(e, t) {
|
|
3849
3863
|
let n = !e.collapsed, r = /* @__PURE__ */ new Map();
|
|
3850
3864
|
for (let e of t) r.set(e.index, e);
|
|
3851
3865
|
let i = [], a = [];
|
|
@@ -3853,7 +3867,7 @@ function Pi(e, t) {
|
|
|
3853
3867
|
else {
|
|
3854
3868
|
let n = /* @__PURE__ */ new Set();
|
|
3855
3869
|
for (let r of t) r.index >= e.start && r.index <= e.end && r.collapsed && n.add(r.index);
|
|
3856
|
-
for (let t = e.start; t <= e.end; t++)
|
|
3870
|
+
for (let t = e.start; t <= e.end; t++) Ii(t, e, r, n) || a.push(t);
|
|
3857
3871
|
}
|
|
3858
3872
|
return {
|
|
3859
3873
|
hide: i,
|
|
@@ -3861,7 +3875,7 @@ function Pi(e, t) {
|
|
|
3861
3875
|
nowCollapsed: n
|
|
3862
3876
|
};
|
|
3863
3877
|
}
|
|
3864
|
-
function
|
|
3878
|
+
function Ii(e, t, n, r) {
|
|
3865
3879
|
let i = n.get(e)?.level ?? 0;
|
|
3866
3880
|
if (i <= t.level) return !1;
|
|
3867
3881
|
for (let e of r) {
|
|
@@ -3870,7 +3884,7 @@ function Fi(e, t, n, r) {
|
|
|
3870
3884
|
}
|
|
3871
3885
|
return !1;
|
|
3872
3886
|
}
|
|
3873
|
-
function
|
|
3887
|
+
function Li(e, t) {
|
|
3874
3888
|
let n = [], r = [];
|
|
3875
3889
|
for (let i of e) i.level >= t ? n.push(i.index) : r.push(i.index);
|
|
3876
3890
|
return {
|
|
@@ -3878,7 +3892,7 @@ function Ii(e, t) {
|
|
|
3878
3892
|
show: r
|
|
3879
3893
|
};
|
|
3880
3894
|
}
|
|
3881
|
-
function
|
|
3895
|
+
function Ri(e) {
|
|
3882
3896
|
let t = [];
|
|
3883
3897
|
for (let n of e.rows) {
|
|
3884
3898
|
let e = n.outlineLevel ?? 0, r = n.collapsed ?? !1;
|
|
@@ -3891,7 +3905,7 @@ function Li(e) {
|
|
|
3891
3905
|
}
|
|
3892
3906
|
return t;
|
|
3893
3907
|
}
|
|
3894
|
-
function
|
|
3908
|
+
function zi(e) {
|
|
3895
3909
|
let t = e.colOutlineLevels ?? {}, n = e.colCollapsed ?? {}, r = e.colHidden ?? {}, i = /* @__PURE__ */ new Set();
|
|
3896
3910
|
for (let e of Object.keys(t)) i.add(Number(e));
|
|
3897
3911
|
for (let e of Object.keys(n)) i.add(Number(e));
|
|
@@ -3904,19 +3918,19 @@ function Ri(e) {
|
|
|
3904
3918
|
});
|
|
3905
3919
|
return a;
|
|
3906
3920
|
}
|
|
3907
|
-
function
|
|
3921
|
+
function Bi(e, t) {
|
|
3908
3922
|
let n = e.outlinePr;
|
|
3909
3923
|
return n ? t === "row" ? n.summaryBelow : n.summaryRight : !0;
|
|
3910
3924
|
}
|
|
3911
3925
|
//#endregion
|
|
3912
3926
|
//#region packages/xlsx/src/viewer.ts
|
|
3913
|
-
var
|
|
3914
|
-
function
|
|
3915
|
-
if (typeof document > "u" || !document.head || document.head.querySelector(`style[${
|
|
3927
|
+
var Vi = 150, Hi = 280, Ui = 200, Wi = 240, Gi = 200, Ki = 30, qi = 1, Ji = .45, Yi = "data-xlsx-viewer-styles", Xi = ".xlsx-tab-strip::-webkit-scrollbar{display:none}.xlsx-tab-nav{background:transparent;transition:background 0.1s;}.xlsx-tab-nav:hover{background:rgba(0,0,0,0.08);}.xlsx-zoom-slider{-webkit-appearance:none;appearance:none;background:transparent;height:15px;margin:0;}.xlsx-zoom-slider::-webkit-slider-runnable-track{height:4px;background:#c4c4c4;border-radius:2px;}.xlsx-zoom-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:12px;height:12px;margin-top:-4px;border-radius:50%;background:#808080;cursor:pointer;}.xlsx-zoom-slider:hover::-webkit-slider-thumb{background:#5f5f5f;}.xlsx-zoom-slider::-moz-range-track{height:4px;background:#c4c4c4;border-radius:2px;}.xlsx-zoom-slider::-moz-range-thumb{width:12px;height:12px;border:none;border-radius:50%;background:#808080;cursor:pointer;}";
|
|
3928
|
+
function Zi() {
|
|
3929
|
+
if (typeof document > "u" || !document.head || document.head.querySelector(`style[${Yi}]`)) return;
|
|
3916
3930
|
let e = document.createElement("style");
|
|
3917
|
-
e.setAttribute(
|
|
3931
|
+
e.setAttribute(Yi, ""), e.textContent = Xi, document.head.appendChild(e);
|
|
3918
3932
|
}
|
|
3919
|
-
var
|
|
3933
|
+
var Qi = class {
|
|
3920
3934
|
idxs;
|
|
3921
3935
|
cumDelta;
|
|
3922
3936
|
constructor(e, t, n, r) {
|
|
@@ -3957,28 +3971,28 @@ var Zi = class {
|
|
|
3957
3971
|
sizeOf(e) {
|
|
3958
3972
|
return this.offsetOf(e + 1) - this.offsetOf(e);
|
|
3959
3973
|
}
|
|
3960
|
-
},
|
|
3961
|
-
function
|
|
3974
|
+
}, $i = "#1a73e8", ea = 4, ta = 5;
|
|
3975
|
+
function na(e, t, n, r) {
|
|
3962
3976
|
for (let { index: i, edge: a } of t) if (!(a <= r) && Math.abs(e - a) <= n) return i;
|
|
3963
3977
|
return null;
|
|
3964
3978
|
}
|
|
3965
|
-
function
|
|
3979
|
+
function ra(e) {
|
|
3966
3980
|
return {
|
|
3967
3981
|
border: `2px solid ${e}`,
|
|
3968
3982
|
background: `color-mix(in srgb, ${e} 8%, transparent)`
|
|
3969
3983
|
};
|
|
3970
3984
|
}
|
|
3971
|
-
var
|
|
3972
|
-
function
|
|
3973
|
-
let n =
|
|
3985
|
+
var ia = /* @__PURE__ */ new WeakMap();
|
|
3986
|
+
function aa(e, t) {
|
|
3987
|
+
let n = ia.get(e);
|
|
3974
3988
|
if (n) return n;
|
|
3975
3989
|
let r = {
|
|
3976
|
-
col: new
|
|
3977
|
-
row: new
|
|
3990
|
+
col: new Qi(e.colWidths, Q(e.defaultColWidth, t), (e) => Q(e, t), 16384),
|
|
3991
|
+
row: new Qi(e.rowHeights, $(e.defaultRowHeight), (e) => $(e), 1048576)
|
|
3978
3992
|
};
|
|
3979
|
-
return
|
|
3993
|
+
return ia.set(e, r), r;
|
|
3980
3994
|
}
|
|
3981
|
-
var
|
|
3995
|
+
var oa = class {
|
|
3982
3996
|
wb = null;
|
|
3983
3997
|
wrapper;
|
|
3984
3998
|
canvas;
|
|
@@ -4045,15 +4059,15 @@ var aa = class {
|
|
|
4045
4059
|
constructor(e, t = {}) {
|
|
4046
4060
|
this.opts = t, this._mode = t.mode ?? "main", this._hiddenSheetMode = t.hiddenSheetMode ?? "show", this.wrapper = document.createElement("div"), this.wrapper.style.cssText = "position:relative;width:100%;height:100%;border:1px solid #c8ccd0;background:#fff;box-sizing:border-box;font-family:sans-serif;display:flex;flex-direction:column;", this.gridRegion = document.createElement("div"), this.gridRegion.style.cssText = "position:relative;flex:1;min-height:0;overflow:hidden;";
|
|
4047
4061
|
let n = "position:absolute;top:0;left:0;z-index:3;display:none;background:#f5f5f5;";
|
|
4048
|
-
this.cornerGutter = document.createElement("canvas"), this.cornerGutter.style.cssText = n, this.cornerGutter.setAttribute("data-xlsx-outline", "corner"), this.colGutter = document.createElement("canvas"), this.colGutter.style.cssText = n, this.colGutter.setAttribute("data-xlsx-outline", "col"), this.rowGutter = document.createElement("canvas"), this.rowGutter.style.cssText = n, this.rowGutter.setAttribute("data-xlsx-outline", "row"), this.canvasArea = document.createElement("div"), this.canvasArea.style.cssText = "position:absolute;inset:0;overflow:hidden;", this.canvas = document.createElement("canvas"), this.canvas.style.cssText = "position:absolute;top:0;left:0;z-index:0;display:block;", this._mode === "worker" && (this._bitmapCtx = this.canvas.getContext("bitmaprenderer")), this.selectionOverlay = document.createElement("div"), this.selectionOverlay.style.cssText = "position:absolute;top:0;left:0;z-index:1;pointer-events:none;overflow:hidden;width:100%;height:100%;", this.findOverlay = document.createElement("div"), this.findOverlay.style.cssText = "position:absolute;top:0;left:0;z-index:1;pointer-events:none;overflow:hidden;width:100%;height:100%;", this.scrollHost = document.createElement("div"), this.scrollHost.style.cssText = "position:absolute;inset:0;overflow:auto;z-index:2;background:transparent;", this.spacer = document.createElement("div"), this.spacer.style.cssText = "position:absolute;top:0;left:0;pointer-events:none;", this.scrollHost.appendChild(this.spacer), this.commentPopup = document.createElement("div"), this.commentPopup.style.cssText = `position:absolute;z-index:3;pointer-events:none;display:none;max-width:${
|
|
4062
|
+
this.cornerGutter = document.createElement("canvas"), this.cornerGutter.style.cssText = n, this.cornerGutter.setAttribute("data-xlsx-outline", "corner"), this.colGutter = document.createElement("canvas"), this.colGutter.style.cssText = n, this.colGutter.setAttribute("data-xlsx-outline", "col"), this.rowGutter = document.createElement("canvas"), this.rowGutter.style.cssText = n, this.rowGutter.setAttribute("data-xlsx-outline", "row"), this.canvasArea = document.createElement("div"), this.canvasArea.style.cssText = "position:absolute;inset:0;overflow:hidden;", this.canvas = document.createElement("canvas"), this.canvas.style.cssText = "position:absolute;top:0;left:0;z-index:0;display:block;", this._mode === "worker" && (this._bitmapCtx = this.canvas.getContext("bitmaprenderer")), this.selectionOverlay = document.createElement("div"), this.selectionOverlay.style.cssText = "position:absolute;top:0;left:0;z-index:1;pointer-events:none;overflow:hidden;width:100%;height:100%;", this.findOverlay = document.createElement("div"), this.findOverlay.style.cssText = "position:absolute;top:0;left:0;z-index:1;pointer-events:none;overflow:hidden;width:100%;height:100%;", this.scrollHost = document.createElement("div"), this.scrollHost.style.cssText = "position:absolute;inset:0;overflow:auto;z-index:2;background:transparent;", this.spacer = document.createElement("div"), this.spacer.style.cssText = "position:absolute;top:0;left:0;pointer-events:none;", this.scrollHost.appendChild(this.spacer), this.commentPopup = document.createElement("div"), this.commentPopup.style.cssText = `position:absolute;z-index:3;pointer-events:none;display:none;max-width:${Hi}px;max-height:${Ui}px;overflow:hidden;box-sizing:border-box;padding:6px 8px;background:#fffbcc;border:1px solid #b8b8a0;box-shadow:1px 2px 5px rgba(0,0,0,0.25);font:12px/1.4 sans-serif;color:#222;white-space:pre-wrap;word-break:break-word;`, this.validationPanel = document.createElement("div"), this.validationPanel.setAttribute("data-xlsx-validation-panel", ""), this.validationPanel.style.cssText = `position:absolute;z-index:4;pointer-events:auto;display:none;min-width:80px;max-width:${Wi}px;max-height:${Gi}px;overflow-y:auto;box-sizing:border-box;background:#fff;border:1px solid #7f7f7f;box-shadow:1px 2px 5px rgba(0,0,0,0.25);font:12px/1.4 sans-serif;color:#222;`, this.validationPanel.addEventListener("wheel", (e) => e.stopPropagation()), this.canvasArea.appendChild(this.canvas), this.canvasArea.appendChild(this.selectionOverlay), this.canvasArea.appendChild(this.findOverlay), this.canvasArea.appendChild(this.scrollHost), this.canvasArea.appendChild(this.commentPopup), this.canvasArea.appendChild(this.validationPanel);
|
|
4049
4063
|
let r = Math.round(50 * (this.opts.cellScale ?? 1));
|
|
4050
|
-
this.tabBar = document.createElement("div"), this.tabBar.style.cssText = `display:flex;align-items:flex-end;height:${
|
|
4064
|
+
this.tabBar = document.createElement("div"), this.tabBar.style.cssText = `display:flex;align-items:flex-end;height:${Ki}px;flex-shrink:0;background:#f0f0f0;border-top:1px solid #c8ccd0;`, this.navPrev = this.makeNavButton("◀", "Scroll tabs left", () => this.scrollTabs(-1)), this.navNext = this.makeNavButton("▶", "Scroll tabs right", () => this.scrollTabs(1)), this.navPrev.dataset.xlsxTabNav = "prev", this.navNext.dataset.xlsxTabNav = "next";
|
|
4051
4065
|
let i = document.createElement("div");
|
|
4052
|
-
i.style.cssText = `display:flex;flex-shrink:0;width:${r}px;height:100%;`, i.appendChild(this.navPrev), i.appendChild(this.navNext), this.navGroup = i, this.tabStrip = document.createElement("div"), this.tabStrip.style.cssText = `position:relative;display:flex;align-items:flex-end;flex:1;min-width:0;height:100%;margin-left:${
|
|
4066
|
+
i.style.cssText = `display:flex;flex-shrink:0;width:${r}px;height:100%;`, i.appendChild(this.navPrev), i.appendChild(this.navNext), this.navGroup = i, this.tabStrip = document.createElement("div"), this.tabStrip.style.cssText = `position:relative;display:flex;align-items:flex-end;flex:1;min-width:0;height:100%;margin-left:${qi}px;overflow-x:auto;overflow-y:hidden;gap:${qi}px;scrollbar-width:none;`, this.tabStrip.classList.add("xlsx-tab-strip"), Zi(), this.tabStrip.addEventListener("scroll", () => this.updateNavButtons()), this.tabBar.appendChild(i), this.tabBar.appendChild(this.tabStrip), this.opts.showZoomSlider !== !1 && this.tabBar.appendChild(this.buildZoomControl()), this.gridRegion.appendChild(this.canvasArea), this.wrapper.appendChild(this.gridRegion), this.wrapper.appendChild(this.tabBar), e.appendChild(this.wrapper), this.rowGutter.addEventListener("pointerdown", (e) => this.onGutterPointerDown(e, "row")), this.colGutter.addEventListener("pointerdown", (e) => this.onGutterPointerDown(e, "col")), this.scrollHost.addEventListener("scroll", () => {
|
|
4053
4067
|
this.pendingTap = null, this.hideCommentPopup(), this.hideValidationPanel(), this.scrollHost.clientWidth > 0 && (this.effectiveH = this.effectiveScrollLeft), this.scheduleRender(), this.updateSelectionOverlay(), this.updateFindOverlay();
|
|
4054
4068
|
}), this.resizeObserver = new ResizeObserver(() => {
|
|
4055
4069
|
this.reanchorHorizontalScroll(), this.layoutGutters(), this.scheduleRender(), this.updateSelectionOverlay(), this.updateFindOverlay(), this.updateNavButtons();
|
|
4056
|
-
}), this.resizeObserver.observe(this.gridRegion), this.setupSelectionEvents(), this._find = new
|
|
4070
|
+
}), this.resizeObserver.observe(this.gridRegion), this.setupSelectionEvents(), this._find = new Ai(() => this.sheetCount, (e) => this.wb?.sheetNames[e] ?? "", (e) => this._collectSheetCells(e));
|
|
4057
4071
|
}
|
|
4058
4072
|
async _collectSheetCells(e) {
|
|
4059
4073
|
let t = this.wb;
|
|
@@ -4072,7 +4086,7 @@ var aa = class {
|
|
|
4072
4086
|
async load(e) {
|
|
4073
4087
|
let t = ++this._loadGen, n = this.wb;
|
|
4074
4088
|
try {
|
|
4075
|
-
let r = await
|
|
4089
|
+
let r = await Di.load(e, {
|
|
4076
4090
|
useGoogleFonts: this.opts.useGoogleFonts,
|
|
4077
4091
|
maxZipEntryBytes: this.opts.maxZipEntryBytes,
|
|
4078
4092
|
workerTimeoutMs: this.opts.workerTimeoutMs,
|
|
@@ -4103,12 +4117,12 @@ var aa = class {
|
|
|
4103
4117
|
this.currentSheet = e, this.scrollHost.scrollTop = 0, this.anchorCell = null, this.activeCell = null, this.selectionMode = "cells", this.hideCommentPopup(), this.hideValidationPanel(), this.updateSelectionOverlay(), this.updateTabActive(e), this.currentWorksheet = await this.workbook.getWorksheet(e), this.buildCommentMap(this.currentWorksheet), this.buildHyperlinkMap(this.currentWorksheet), this.buildOutline(this.currentWorksheet), this.layoutGutters(), this.updateSpacerSize(this.currentWorksheet), this.resetHorizontalScroll(), await this.renderCurrentSheet(), this.updateFindOverlay(), this.opts.onSheetChange?.(e, this.workbook.sheetNames.length);
|
|
4104
4118
|
}
|
|
4105
4119
|
buildOutline(e) {
|
|
4106
|
-
this.stashedRowHeights.clear(), this.stashedColWidths.clear(), this.rowOutlineBands =
|
|
4107
|
-
let t =
|
|
4120
|
+
this.stashedRowHeights.clear(), this.stashedColWidths.clear(), this.rowOutlineBands = Ri(e), this.colOutlineBands = zi(e);
|
|
4121
|
+
let t = Ni(this.rowOutlineBands, Bi(e, "row")), n = Ni(this.colOutlineBands, Bi(e, "col"));
|
|
4108
4122
|
this.rowOutline = t.maxLevel > 0 ? t : null, this.colOutline = n.maxLevel > 0 ? n : null;
|
|
4109
4123
|
}
|
|
4110
4124
|
layoutGutters() {
|
|
4111
|
-
let e = this.opts.cellScale ?? 1, t = this.rowOutline ? Math.round(
|
|
4125
|
+
let e = this.opts.cellScale ?? 1, t = this.rowOutline ? Math.round(Mi(this.rowOutline.maxLevel) * e) : 0, n = this.colOutline ? Math.round(Mi(this.colOutline.maxLevel) * e) : 0;
|
|
4112
4126
|
this.gutter = {
|
|
4113
4127
|
w: t,
|
|
4114
4128
|
h: n
|
|
@@ -4212,7 +4226,7 @@ var aa = class {
|
|
|
4212
4226
|
applyGroupToggle(e, t) {
|
|
4213
4227
|
let n = this.currentWorksheet;
|
|
4214
4228
|
if (!n) return;
|
|
4215
|
-
let { hide: r, show: i, nowCollapsed: a } =
|
|
4229
|
+
let { hide: r, show: i, nowCollapsed: a } = Fi(e, t === "row" ? this.rowOutlineBands : this.colOutlineBands);
|
|
4216
4230
|
for (let e of r) this.setBandHidden(t, e, !0);
|
|
4217
4231
|
for (let e of i) this.setBandHidden(t, e, !1);
|
|
4218
4232
|
e.summary != null && this.setBandCollapsed(t, e.summary, a), this.afterOutlineMutation(n);
|
|
@@ -4220,7 +4234,7 @@ var aa = class {
|
|
|
4220
4234
|
applyLevelButton(e, t) {
|
|
4221
4235
|
let n = this.currentWorksheet;
|
|
4222
4236
|
if (!n) return;
|
|
4223
|
-
let { hide: r, show: i } =
|
|
4237
|
+
let { hide: r, show: i } = Li(t === "row" ? this.rowOutlineBands : this.colOutlineBands, e);
|
|
4224
4238
|
for (let e of r) this.setBandHidden(t, e, !0);
|
|
4225
4239
|
for (let e of i) this.setBandHidden(t, e, !1);
|
|
4226
4240
|
let a = t === "row" ? this.rowOutline : this.colOutline;
|
|
@@ -4266,11 +4280,11 @@ var aa = class {
|
|
|
4266
4280
|
} else r.colCollapsed = r.colCollapsed ?? {}, n ? r.colCollapsed[t] = !0 : delete r.colCollapsed[t];
|
|
4267
4281
|
}
|
|
4268
4282
|
afterOutlineMutation(e) {
|
|
4269
|
-
|
|
4283
|
+
ia.delete(e), this.buildOutlineLayoutOnly(e), this.updateSpacerSize(e), this.updateSelectionOverlay(), this.scheduleRender();
|
|
4270
4284
|
}
|
|
4271
4285
|
buildOutlineLayoutOnly(e) {
|
|
4272
|
-
this.rowOutlineBands =
|
|
4273
|
-
let t =
|
|
4286
|
+
this.rowOutlineBands = Ri(e), this.colOutlineBands = zi(e);
|
|
4287
|
+
let t = Ni(this.rowOutlineBands, Bi(e, "row")), n = Ni(this.colOutlineBands, Bi(e, "col"));
|
|
4274
4288
|
this.rowOutline = t.maxLevel > 0 ? t : null, this.colOutline = n.maxLevel > 0 ? n : null;
|
|
4275
4289
|
}
|
|
4276
4290
|
get isRtl() {
|
|
@@ -4340,7 +4354,7 @@ var aa = class {
|
|
|
4340
4354
|
}
|
|
4341
4355
|
if (h === -1) return null;
|
|
4342
4356
|
} else {
|
|
4343
|
-
let e = c - d + this.scrollHost.scrollTop / r, t =
|
|
4357
|
+
let e = c - d + this.scrollHost.scrollTop / r, t = aa(n, Z(n)).row.scrollableIndexAt(e, l + 1);
|
|
4344
4358
|
if (t === null) return null;
|
|
4345
4359
|
h = t;
|
|
4346
4360
|
}
|
|
@@ -4354,7 +4368,7 @@ var aa = class {
|
|
|
4354
4368
|
}
|
|
4355
4369
|
if (g === -1) return null;
|
|
4356
4370
|
} else {
|
|
4357
|
-
let e = s - p + this.effectiveScrollLeft / r, t =
|
|
4371
|
+
let e = s - p + this.effectiveScrollLeft / r, t = aa(n, Z(n)).col.scrollableIndexAt(e, u + 1);
|
|
4358
4372
|
if (t === null) return null;
|
|
4359
4373
|
g = t;
|
|
4360
4374
|
}
|
|
@@ -4374,7 +4388,7 @@ var aa = class {
|
|
|
4374
4388
|
} else {
|
|
4375
4389
|
let e = 0;
|
|
4376
4390
|
for (let t = 1; t <= l; t++) e += o(t);
|
|
4377
|
-
let s = a(50) + e, c = this.effectiveScrollLeft / r, d =
|
|
4391
|
+
let s = a(50) + e, c = this.effectiveScrollLeft / r, d = aa(n, i).col, { index: f, partial: p } = d.indexAt(c + d.offsetOf(l + 1)), m = s - p * r;
|
|
4378
4392
|
if (t >= f) for (let e = f; e < t; e++) m += o(e);
|
|
4379
4393
|
else for (let e = t; e < f; e++) m -= o(e);
|
|
4380
4394
|
u = m;
|
|
@@ -4387,7 +4401,7 @@ var aa = class {
|
|
|
4387
4401
|
} else {
|
|
4388
4402
|
let t = 0;
|
|
4389
4403
|
for (let e = 1; e <= c; e++) t += s(e);
|
|
4390
|
-
let o = a(22) + t, l = this.scrollHost.scrollTop / r, u =
|
|
4404
|
+
let o = a(22) + t, l = this.scrollHost.scrollTop / r, u = aa(n, i).row, { index: f, partial: p } = u.indexAt(l + u.offsetOf(c + 1)), m = o - p * r;
|
|
4391
4405
|
if (e >= f) for (let t = f; t < e; t++) m += s(t);
|
|
4392
4406
|
else for (let t = e; t < f; t++) m -= s(t);
|
|
4393
4407
|
d = m;
|
|
@@ -4439,7 +4453,7 @@ var aa = class {
|
|
|
4439
4453
|
};
|
|
4440
4454
|
return null;
|
|
4441
4455
|
}
|
|
4442
|
-
let a = e - t + this.scrollHost.scrollTop / r, s =
|
|
4456
|
+
let a = e - t + this.scrollHost.scrollTop / r, s = aa(n, Z(n)).row.scrollableIndexAt(a, l + 1);
|
|
4443
4457
|
return s === null ? null : {
|
|
4444
4458
|
kind: "row",
|
|
4445
4459
|
row: s
|
|
@@ -4460,7 +4474,7 @@ var aa = class {
|
|
|
4460
4474
|
};
|
|
4461
4475
|
return null;
|
|
4462
4476
|
}
|
|
4463
|
-
let m = d - f + this.effectiveScrollLeft / r, h =
|
|
4477
|
+
let m = d - f + this.effectiveScrollLeft / r, h = aa(n, Z(n)).col.scrollableIndexAt(m, u + 1);
|
|
4464
4478
|
return h === null ? null : {
|
|
4465
4479
|
kind: "col",
|
|
4466
4480
|
col: h
|
|
@@ -4482,7 +4496,7 @@ var aa = class {
|
|
|
4482
4496
|
edge: t.x + t.w
|
|
4483
4497
|
}));
|
|
4484
4498
|
}
|
|
4485
|
-
let o =
|
|
4499
|
+
let o = na(a, i, ea, s);
|
|
4486
4500
|
return o === null ? null : {
|
|
4487
4501
|
kind: "col",
|
|
4488
4502
|
index: o,
|
|
@@ -4502,7 +4516,7 @@ var aa = class {
|
|
|
4502
4516
|
edge: t.y + t.h
|
|
4503
4517
|
}));
|
|
4504
4518
|
}
|
|
4505
|
-
let a =
|
|
4519
|
+
let a = na(o, i, ea, c);
|
|
4506
4520
|
return a === null ? null : {
|
|
4507
4521
|
kind: "row",
|
|
4508
4522
|
index: a,
|
|
@@ -4517,13 +4531,13 @@ var aa = class {
|
|
|
4517
4531
|
if (!n || !r) return;
|
|
4518
4532
|
let i = this.opts.cellScale ?? 1, a = this.canvasArea.getBoundingClientRect();
|
|
4519
4533
|
if (n.kind === "col") {
|
|
4520
|
-
let t = this.screenX(e - a.left, 0), o = Math.max(
|
|
4521
|
-
r.colWidths[n.index] =
|
|
4534
|
+
let t = this.screenX(e - a.left, 0), o = Math.max(ta, Math.round((t - n.originScaled) / i));
|
|
4535
|
+
r.colWidths[n.index] = In(o, n.mdw), this.recordSizeOverride("col", n.index);
|
|
4522
4536
|
} else {
|
|
4523
|
-
let e = t - a.top, o = Math.max(
|
|
4524
|
-
r.rowHeights[n.index] =
|
|
4537
|
+
let e = t - a.top, o = Math.max(ta, Math.round((e - n.originScaled) / i));
|
|
4538
|
+
r.rowHeights[n.index] = Ln(o), this.recordSizeOverride("row", n.index);
|
|
4525
4539
|
}
|
|
4526
|
-
|
|
4540
|
+
ia.delete(r), this.updateSpacerSize(r), this.updateSelectionOverlay(), this.scheduleRender();
|
|
4527
4541
|
}
|
|
4528
4542
|
setSelectionColor(e) {
|
|
4529
4543
|
this.opts.selectionColor = e, this.updateSelectionOverlay();
|
|
@@ -4592,13 +4606,13 @@ var aa = class {
|
|
|
4592
4606
|
l < a && (d -= a - l, l = a), u < o && (f -= o - u, u = o);
|
|
4593
4607
|
let h = a + c, g = o + s;
|
|
4594
4608
|
if (m > r && l < h && (d -= h - l, l = h), p > n && u < g && (f -= g - u, u = g), d <= 0 || f <= 0) return;
|
|
4595
|
-
let _ = this.screenX(l, d), { border: v, background: y } =
|
|
4609
|
+
let _ = this.screenX(l, d), { border: v, background: y } = ra(this.opts.selectionColor ?? $i), b = document.createElement("div");
|
|
4596
4610
|
b.style.cssText = `position:absolute;left:${_}px;top:${u}px;width:${d}px;height:${f}px;box-sizing:border-box;border:${v};background:${y};pointer-events:none;`, this.selectionOverlay.appendChild(b), this.maybeDrawValidationDropdown();
|
|
4597
4611
|
}
|
|
4598
4612
|
maybeDrawValidationDropdown() {
|
|
4599
4613
|
if (this.validationArrowRect = null, this.selectionMode !== "cells") return;
|
|
4600
4614
|
let e = this.currentWorksheet, t = this.activeCell;
|
|
4601
|
-
if (!e || !t || !
|
|
4615
|
+
if (!e || !t || !ki(e.dataValidations, t.row, t.col)) return;
|
|
4602
4616
|
let n = this.getCellRect(t.row, t.col);
|
|
4603
4617
|
if (!n) return;
|
|
4604
4618
|
let r = this.opts.cellScale ?? 1, i = Math.round(50 * r), a = Math.round(22 * r), o = Math.max(14, Math.min(n.h, 22 * r)), s = n.x + n.w, c = n.y;
|
|
@@ -4621,7 +4635,7 @@ var aa = class {
|
|
|
4621
4635
|
for (let t = 1; t <= o; t++) s += n(Q(e.colWidths[t] ?? e.defaultColWidth, Z(e)));
|
|
4622
4636
|
let c = 0;
|
|
4623
4637
|
for (let t = 1; t <= a; t++) c += n($(e.rowHeights[t] ?? e.defaultRowHeight));
|
|
4624
|
-
let l = r + s, u = i + c, d =
|
|
4638
|
+
let l = r + s, u = i + c, d = ra("#ffb300"), f = ra("#fb8c00");
|
|
4625
4639
|
for (let e of this._find.sheetHighlights(this.currentSheet)) {
|
|
4626
4640
|
let t = this.getCellRect(e.row, e.col);
|
|
4627
4641
|
if (!t) continue;
|
|
@@ -4653,7 +4667,7 @@ var aa = class {
|
|
|
4653
4667
|
_scrollCellIntoView(e, t) {
|
|
4654
4668
|
let n = this.currentWorksheet;
|
|
4655
4669
|
if (!n) return;
|
|
4656
|
-
let r = this.opts.cellScale ?? 1, i = Z(n), a =
|
|
4670
|
+
let r = this.opts.cellScale ?? 1, i = Z(n), a = aa(n, i), o = n.freezeRows ?? 0, s = n.freezeCols ?? 0;
|
|
4657
4671
|
if (e > o) {
|
|
4658
4672
|
let t = Math.round(22 * r), i = 0;
|
|
4659
4673
|
for (let e = 1; e <= o; e++) i += Math.round($(n.rowHeights[e] ?? n.defaultRowHeight) * r);
|
|
@@ -4675,7 +4689,7 @@ var aa = class {
|
|
|
4675
4689
|
this.hideValidationPanel();
|
|
4676
4690
|
return;
|
|
4677
4691
|
}
|
|
4678
|
-
let r =
|
|
4692
|
+
let r = ki(e.dataValidations, t.row, t.col);
|
|
4679
4693
|
r && this.openValidationPanel(t, r.formula1);
|
|
4680
4694
|
}
|
|
4681
4695
|
async openValidationPanel(e, t) {
|
|
@@ -4714,7 +4728,7 @@ var aa = class {
|
|
|
4714
4728
|
if (!t) return;
|
|
4715
4729
|
let n = this.screenX(t.x, t.w);
|
|
4716
4730
|
this.validationPanel.style.left = "-9999px", this.validationPanel.style.top = "-9999px", this.validationPanel.style.display = "block";
|
|
4717
|
-
let r =
|
|
4731
|
+
let r = Ei({
|
|
4718
4732
|
cell: {
|
|
4719
4733
|
x: n,
|
|
4720
4734
|
y: t.y,
|
|
@@ -4772,7 +4786,7 @@ var aa = class {
|
|
|
4772
4786
|
};
|
|
4773
4787
|
else return !1;
|
|
4774
4788
|
let r = this.opts.onHyperlinkClick;
|
|
4775
|
-
return r ? (r(n), !0) : (n.kind === "external" ?
|
|
4789
|
+
return r ? (r(n), !0) : (n.kind === "external" ? ae(n.url) : this.navigateInternalHyperlink(n.ref), !0);
|
|
4776
4790
|
}
|
|
4777
4791
|
navigateInternalHyperlink(e) {
|
|
4778
4792
|
let t = e.lastIndexOf("!");
|
|
@@ -4790,7 +4804,7 @@ var aa = class {
|
|
|
4790
4804
|
}
|
|
4791
4805
|
this.commentPopupKey !== t && (this.hideCommentPopup(), this.commentPopupKey = t, this.commentPopupTimer = setTimeout(() => {
|
|
4792
4806
|
this.commentPopupTimer = null, this.renderCommentPopup(e, n);
|
|
4793
|
-
},
|
|
4807
|
+
}, Vi));
|
|
4794
4808
|
}
|
|
4795
4809
|
renderCommentPopup(e, t) {
|
|
4796
4810
|
let n = this.getCellRect(e.row, e.col);
|
|
@@ -4803,7 +4817,7 @@ var aa = class {
|
|
|
4803
4817
|
r.textContent = t.text, this.commentPopup.appendChild(r);
|
|
4804
4818
|
let i = this.screenX(n.x, n.w);
|
|
4805
4819
|
this.commentPopup.style.left = "-9999px", this.commentPopup.style.top = "-9999px", this.commentPopup.style.display = "block";
|
|
4806
|
-
let a =
|
|
4820
|
+
let a = ji({
|
|
4807
4821
|
cell: {
|
|
4808
4822
|
x: i,
|
|
4809
4823
|
y: n.y,
|
|
@@ -5022,19 +5036,19 @@ var aa = class {
|
|
|
5022
5036
|
}
|
|
5023
5037
|
}
|
|
5024
5038
|
tabStyle(e, t) {
|
|
5025
|
-
let n =
|
|
5039
|
+
let n = Ki - 2, r = Ki - 5, i = t ? `box-shadow:inset 0 -${e ? 2 : 3}px 0 0 ${t};` : "";
|
|
5026
5040
|
return e ? `display:inline-block;flex:none;padding:0 14px;position:relative;border:1px solid #c8ccd0;border-bottom:none;border-radius:3px 3px 0 0;cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;outline:none;box-sizing:border-box;height:${n}px;font-size:13px;background:#fff;color:#000;border-bottom:1px solid #fff;font-weight:600;top:1px;` + i : `display:inline-block;flex:none;padding:0 14px;position:relative;border:1px solid #c8ccd0;border-bottom:none;border-radius:3px 3px 0 0;cursor:pointer;white-space:nowrap;max-width:160px;overflow:hidden;text-overflow:ellipsis;outline:none;box-sizing:border-box;height:${r}px;font-size:11px;background:#e0e0e0;color:#555;` + i;
|
|
5027
5041
|
}
|
|
5028
5042
|
tabCss(e, t) {
|
|
5029
5043
|
let n = this.tabStyle(t, this.tabColors[e]);
|
|
5030
|
-
return this._hiddenSheetMode !== "show" && this.wb?.isHidden(e) && (n += this._hiddenSheetMode === "skip" ? "display:none;" : `opacity:${
|
|
5044
|
+
return this._hiddenSheetMode !== "show" && this.wb?.isHidden(e) && (n += this._hiddenSheetMode === "skip" ? "display:none;" : `opacity:${Ji};`), n;
|
|
5031
5045
|
}
|
|
5032
5046
|
buildZoomControl() {
|
|
5033
5047
|
let e = this.opts.zoomMin ?? .1, t = this.opts.zoomMax ?? 4, n = this.opts.cellScale ?? 1, r = document.createElement("div");
|
|
5034
5048
|
r.style.cssText = "display:flex;align-items:center;flex-shrink:0;gap:2px;padding:0 10px;height:100%;color:#555;font-size:12px;user-select:none;";
|
|
5035
5049
|
let i = (e, t, n) => {
|
|
5036
5050
|
let r = document.createElement("button");
|
|
5037
|
-
return r.textContent = e, r.setAttribute("aria-label", t), r.title = t, r.style.cssText = "width:18px;height:18px;padding:0;border:none;background:transparent;color:#555;font-size:14px;line-height:1;cursor:pointer;border-radius:3px;", r.addEventListener("click", n), r;
|
|
5051
|
+
return r.type = "button", r.textContent = e, r.setAttribute("aria-label", t), r.title = t, r.style.cssText = "width:18px;height:18px;padding:0;border:none;background:transparent;color:#555;font-size:14px;line-height:1;cursor:pointer;border-radius:3px;", r.addEventListener("click", n), r;
|
|
5038
5052
|
}, a = document.createElement("input");
|
|
5039
5053
|
a.type = "range", a.min = "0", a.max = "100", a.step = "any", a.value = String(this.zoomScaleToPos(n, e, t)), a.setAttribute("aria-label", "Zoom"), a.title = "Zoom", a.classList.add("xlsx-zoom-slider"), a.style.cssText = "width:90px;cursor:pointer;", a.addEventListener("input", () => this.setScale(this.zoomPosToScale(Number(a.value), e, t)));
|
|
5040
5054
|
let o = document.createElement("span");
|
|
@@ -5054,8 +5068,8 @@ var aa = class {
|
|
|
5054
5068
|
let e = this.effectiveScrollLeft, t = this.scrollHost.scrollTop;
|
|
5055
5069
|
if (this.layoutGutters(), this.updateSpacerSize(this.currentWorksheet), o) {
|
|
5056
5070
|
let n = Math.max(0, this.scrollHost.scrollHeight - this.scrollHost.clientHeight);
|
|
5057
|
-
this.scrollHost.scrollTop =
|
|
5058
|
-
let r = this.screenX(o.x, 0), s = this.maxScrollLeft, c =
|
|
5071
|
+
this.scrollHost.scrollTop = se(t, o.y, a, i, { maxScroll: n });
|
|
5072
|
+
let r = this.screenX(o.x, 0), s = this.maxScrollLeft, c = se(e, r, a, i, { maxScroll: s });
|
|
5059
5073
|
this.effectiveH = c, this.scrollHost.scrollLeft = this.isRtl ? Math.max(0, s - c) : c;
|
|
5060
5074
|
} else this.effectiveH = e, this.isRtl && (this.scrollHost.scrollLeft = Math.max(0, this.maxScrollLeft - e));
|
|
5061
5075
|
}
|
|
@@ -5066,10 +5080,10 @@ var aa = class {
|
|
|
5066
5080
|
return this.opts.cellScale ?? 1;
|
|
5067
5081
|
}
|
|
5068
5082
|
zoomIn() {
|
|
5069
|
-
this.setScale(
|
|
5083
|
+
this.setScale(H(this.getScale()));
|
|
5070
5084
|
}
|
|
5071
5085
|
zoomOut() {
|
|
5072
|
-
this.setScale(
|
|
5086
|
+
this.setScale(de(this.getScale()));
|
|
5073
5087
|
}
|
|
5074
5088
|
fitWidth() {
|
|
5075
5089
|
this._fit("width");
|
|
@@ -5147,7 +5161,7 @@ var aa = class {
|
|
|
5147
5161
|
for (let t = 1; t <= s; t++) c += Q(e.colWidths[t] ?? e.defaultColWidth, Z(e));
|
|
5148
5162
|
let l = 0;
|
|
5149
5163
|
for (let t = 1; t <= o; t++) l += $(e.rowHeights[t] ?? e.defaultRowHeight);
|
|
5150
|
-
let u = this.effectiveScrollLeft / i, d = this.scrollHost.scrollTop / i, f =
|
|
5164
|
+
let u = this.effectiveScrollLeft / i, d = this.scrollHost.scrollTop / i, f = aa(e, Z(e)), { index: p, partial: m } = f.col.indexAt(u + f.col.offsetOf(s + 1)), { index: h, partial: g } = f.row.indexAt(d + f.row.offsetOf(o + 1)), _ = t / i - 50 - c, v = n / i - 22 - l, y = 0;
|
|
5151
5165
|
{
|
|
5152
5166
|
let t = -m, n = p;
|
|
5153
5167
|
for (; t < _ + m && n <= 16384;) t += Q(e.colWidths[n] ?? e.defaultColWidth, Z(e)), y++, n++;
|
|
@@ -5257,13 +5271,13 @@ var aa = class {
|
|
|
5257
5271
|
destroy() {
|
|
5258
5272
|
this._destroyed = !0, this._loadGen++, this.resizeObserver?.disconnect(), this._rafId !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(this._rafId), this._rafId = null), this._renderSeq++, this.hideCommentPopup(), this.hideValidationPanel(), this.keydownHandler && document.removeEventListener("keydown", this.keydownHandler), this._find.invalidate(), this.wb?.destroy(), this.wrapper.remove();
|
|
5259
5273
|
}
|
|
5260
|
-
},
|
|
5274
|
+
}, sa = /* @__PURE__ */ e({
|
|
5261
5275
|
OoxmlError: () => F,
|
|
5262
|
-
XlsxViewer: () =>
|
|
5263
|
-
XlsxWorkbook: () =>
|
|
5264
|
-
autoResize: () =>
|
|
5265
|
-
openExternalHyperlink: () =>
|
|
5266
|
-
resolveSharedStrings: () =>
|
|
5276
|
+
XlsxViewer: () => oa,
|
|
5277
|
+
XlsxWorkbook: () => Di,
|
|
5278
|
+
autoResize: () => L,
|
|
5279
|
+
openExternalHyperlink: () => ae,
|
|
5280
|
+
resolveSharedStrings: () => Ci
|
|
5267
5281
|
});
|
|
5268
5282
|
//#endregion
|
|
5269
|
-
export {
|
|
5283
|
+
export { Ci as i, oa as n, Di as r, sa as t };
|