vue-echarts 8.3.0 → 8.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/README.zh-Hans.md +6 -2
- package/dist/graphic.d.ts +26 -26
- package/dist/graphic.js +34 -37
- package/dist/graphic.js.map +1 -1
- package/dist/{index-BujxhN-1.d.ts → index-GjFScMW2.d.ts} +6 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +60 -57
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/style.css +2 -2
- package/dist/{update-CWPvYl2M.js → update-DiQcDAnW.js} +7 -8
- package/dist/update-DiQcDAnW.js.map +1 -0
- package/package.json +22 -19
- package/dist/update-CWPvYl2M.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { AxisBreakChangedEvent, DownplayPayload, ECElementEvent, ElementEvent, H
|
|
|
3
3
|
import { TooltipComponentFormatterCallbackParams } from "echarts";
|
|
4
4
|
//#region src/types.d.ts
|
|
5
5
|
type EventProps<T> = { [K in string & keyof T as `on${Capitalize<K>}`]?: T[K] extends ((...args: infer P) => unknown) ? (...args: P) => any : never; };
|
|
6
|
-
type
|
|
6
|
+
type Component<Props extends ComponentPropsOptions, Bindings, Events extends EmitsOptions, Slots extends SlotsType = Record<never, never>> = DefineComponent<Props, Bindings, Record<never, never>, Record<never, never>, Record<never, never>, ComponentOptionsMixin, ComponentOptionsMixin, Events, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<Props>> & Readonly<EventProps<Events>>, ExtractDefaultPropTypes<Props>, Slots>;
|
|
7
7
|
type Injection<T> = MaybeRefOrGetter<T | null | undefined>;
|
|
8
8
|
type InitParameters = Parameters<typeof init>;
|
|
9
9
|
type Theme = NonNullable<InitParameters[1]>;
|
|
@@ -69,7 +69,7 @@ type MethodName = (typeof METHOD_NAMES)[number];
|
|
|
69
69
|
type PublicMethods = Pick<EChartsType, MethodName | "dispose" | "isDisposed">;
|
|
70
70
|
//#endregion
|
|
71
71
|
//#region src/composables/slot.d.ts
|
|
72
|
-
type
|
|
72
|
+
type Slots = SlotsType<Record<"tooltip" | `tooltip-${string}`, TooltipComponentFormatterCallbackParams> & Record<"dataView" | `dataView-${string}`, Option> & VChartSlotsExtension>;
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/composables/loading.d.ts
|
|
75
75
|
declare const LOADING_OPTIONS_KEY: InjectionKey<LoadingOptionsInjection>;
|
|
@@ -92,17 +92,17 @@ declare const chartProps: {
|
|
|
92
92
|
group: StringConstructor;
|
|
93
93
|
manualUpdate: BooleanConstructor;
|
|
94
94
|
};
|
|
95
|
-
type
|
|
95
|
+
type Exposed = {
|
|
96
96
|
setOption: SetOptionType;
|
|
97
97
|
readonly root: HTMLElement | undefined;
|
|
98
98
|
readonly chart: EChartsType | undefined;
|
|
99
99
|
} & PublicMethods;
|
|
100
|
-
declare const ECharts:
|
|
100
|
+
declare const ECharts: Component<typeof chartProps, Exposed, Emits, Slots>;
|
|
101
101
|
//#endregion
|
|
102
102
|
//#region src/index.d.ts
|
|
103
103
|
interface VChartSlotsExtension {
|
|
104
104
|
graphic?: Slot;
|
|
105
105
|
}
|
|
106
106
|
//#endregion
|
|
107
|
-
export {
|
|
108
|
-
//# sourceMappingURL=index-
|
|
107
|
+
export { THEME_KEY as a, Slots as c, ElementEventAlias as d, FontStyle as f, WithOnce as h, INIT_OPTIONS_KEY as i, AutoResize as l, LoadingOptions as m, ECharts as n, UPDATE_OPTIONS_KEY as o, FontWeight as p, Exposed as r, LOADING_OPTIONS_KEY as s, VChartSlotsExtension as t, Component as u };
|
|
108
|
+
//# sourceMappingURL=index-GjFScMW2.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { type AutoResize, INIT_OPTIONS_KEY, LOADING_OPTIONS_KEY, type LoadingOptions, THEME_KEY, UPDATE_OPTIONS_KEY, VChartSlotsExtension, ECharts as default };
|
|
1
|
+
import { a as THEME_KEY, c as Slots, i as INIT_OPTIONS_KEY, l as AutoResize, m as LoadingOptions, n as ECharts, o as UPDATE_OPTIONS_KEY, r as Exposed, s as LOADING_OPTIONS_KEY, t as VChartSlotsExtension, u as Component } from "./index-GjFScMW2.js";
|
|
2
|
+
export { type AutoResize, type Component, Exposed, INIT_OPTIONS_KEY, LOADING_OPTIONS_KEY, type LoadingOptions, type Slots, THEME_KEY, UPDATE_OPTIONS_KEY, VChartSlotsExtension, ECharts as default };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as hasEventHandler, c as isIgnorableWatchChange, d as isValidArrayIndex, f as parseOnEvent, i as createEventInvoker, l as isOn, o as hasZeroDimension, p as warn$1, r as useRuntime, s as isBrowser, t as planUpdate, u as isPlainObject } from "./update-
|
|
1
|
+
import { a as hasEventHandler, c as isIgnorableWatchChange, d as isValidArrayIndex, f as parseOnEvent, i as createEventInvoker, l as isOn, o as hasZeroDimension, p as warn$1, r as useRuntime, s as isBrowser, t as planUpdate, u as isPlainObject } from "./update-DiQcDAnW.js";
|
|
2
2
|
import { Teleport, computed, defineComponent, getCurrentInstance, h, inject, nextTick, onBeforeUnmount, onMounted, onScopeDispose, onUpdated, shallowReactive, shallowRef, toRef, toValue, watch, watchSyncEffect } from "vue";
|
|
3
3
|
import { init, throttle } from "echarts/core";
|
|
4
4
|
//#region src/composables/api.ts
|
|
@@ -81,27 +81,22 @@ const autoresizeProps = { autoresize: [Boolean, Object] };
|
|
|
81
81
|
const LOADING_OPTIONS_KEY = Symbol();
|
|
82
82
|
function useLoading(chart, loading, loadingType, loadingOptions) {
|
|
83
83
|
const defaultLoadingOptions = inject(LOADING_OPTIONS_KEY, void 0);
|
|
84
|
-
return watch(() => loading.value ? {
|
|
85
|
-
instance: chart.value,
|
|
86
|
-
visible: true,
|
|
84
|
+
return watch(() => chart.value && loading.value ? {
|
|
87
85
|
type: loadingType.value || void 0,
|
|
88
86
|
options: {
|
|
89
87
|
...toValue(defaultLoadingOptions),
|
|
90
88
|
...loadingOptions.value
|
|
91
89
|
}
|
|
92
|
-
} : {
|
|
93
|
-
instance
|
|
94
|
-
visible: false
|
|
95
|
-
}, (state) => {
|
|
96
|
-
const { instance } = state;
|
|
90
|
+
} : null, (state) => {
|
|
91
|
+
const instance = chart.value;
|
|
97
92
|
if (!instance) return;
|
|
98
|
-
if (!state
|
|
93
|
+
if (!state) {
|
|
99
94
|
instance.hideLoading();
|
|
100
95
|
return;
|
|
101
96
|
}
|
|
102
|
-
const { type, options
|
|
103
|
-
if (type) instance.showLoading(type,
|
|
104
|
-
else instance.showLoading(
|
|
97
|
+
const { type, options } = state;
|
|
98
|
+
if (type) instance.showLoading(type, options);
|
|
99
|
+
else instance.showLoading(options);
|
|
105
100
|
}, {
|
|
106
101
|
deep: true,
|
|
107
102
|
immediate: true,
|
|
@@ -139,15 +134,16 @@ function getSlotPath(key) {
|
|
|
139
134
|
} else path.push(...target);
|
|
140
135
|
return path;
|
|
141
136
|
}
|
|
142
|
-
function ensureChild(parent, seg, nextSeg) {
|
|
137
|
+
function ensureChild(parent, seg, nextSeg, writable) {
|
|
143
138
|
const parentIsArray = Array.isArray(parent);
|
|
144
139
|
if (parentIsArray !== isValidArrayIndex(seg)) return;
|
|
145
140
|
const next = parentIsArray ? parent[Number(seg)] : parent[seg];
|
|
146
141
|
let child;
|
|
147
|
-
if (Array.isArray(next)) child = [...next];
|
|
148
|
-
else if (isPlainObject(next)) child = { ...next };
|
|
142
|
+
if (Array.isArray(next)) child = writable.has(next) ? next : [...next];
|
|
143
|
+
else if (isPlainObject(next)) child = writable.has(next) ? next : { ...next };
|
|
149
144
|
else if (next === void 0 && !parentIsArray && !isValidArrayIndex(nextSeg)) child = {};
|
|
150
145
|
else return;
|
|
146
|
+
writable.add(child);
|
|
151
147
|
writeSegment(parent, seg, child);
|
|
152
148
|
return child;
|
|
153
149
|
}
|
|
@@ -158,10 +154,10 @@ function writeSegment(parent, seg, value) {
|
|
|
158
154
|
}
|
|
159
155
|
parent[seg] = value;
|
|
160
156
|
}
|
|
161
|
-
function writePath(root, path, value, preserveDefined = false) {
|
|
157
|
+
function writePath(root, path, value, writable, preserveDefined = false) {
|
|
162
158
|
let current = root;
|
|
163
159
|
for (let i = 0; i < path.length - 1; i++) {
|
|
164
|
-
const child = ensureChild(current, path[i], path[i + 1]);
|
|
160
|
+
const child = ensureChild(current, path[i], path[i + 1], writable);
|
|
165
161
|
if (!child) return false;
|
|
166
162
|
current = child;
|
|
167
163
|
}
|
|
@@ -178,16 +174,16 @@ function useSlotOption(slots, onSlotsChange) {
|
|
|
178
174
|
const isMounted = shallowRef(false);
|
|
179
175
|
const ready = shallowRef(false);
|
|
180
176
|
const collectSlotNames = (warnInvalid = false) => {
|
|
181
|
-
const names =
|
|
177
|
+
const names = /* @__PURE__ */ new Set();
|
|
182
178
|
for (const key in slots) {
|
|
183
179
|
if (key === "graphic") continue;
|
|
184
|
-
if (isValidSlotName(key)) names.
|
|
180
|
+
if (isValidSlotName(key)) names.add(key);
|
|
185
181
|
else if (warnInvalid) warn$1(`Invalid slot name: ${key}`);
|
|
186
182
|
}
|
|
187
183
|
return names;
|
|
188
184
|
};
|
|
189
185
|
collectSlotNames(true);
|
|
190
|
-
let slotNames =
|
|
186
|
+
let slotNames = /* @__PURE__ */ new Set();
|
|
191
187
|
let nextSlotNames = slotNames;
|
|
192
188
|
const patchedSlotNames = /* @__PURE__ */ new Set();
|
|
193
189
|
const callbacks = /* @__PURE__ */ new Map();
|
|
@@ -198,21 +194,22 @@ function useSlotOption(slots, onSlotsChange) {
|
|
|
198
194
|
for (const key of Object.keys(params)) delete params[key];
|
|
199
195
|
}
|
|
200
196
|
function syncSlotNames(names) {
|
|
201
|
-
|
|
202
|
-
for (const key of slotNames) if (!names.
|
|
197
|
+
let changed = names.size !== slotNames.size;
|
|
198
|
+
for (const key of slotNames) if (!names.has(key)) {
|
|
199
|
+
changed = true;
|
|
203
200
|
delete params[key];
|
|
204
201
|
delete containers[key];
|
|
205
202
|
callbacks.delete(key);
|
|
206
203
|
}
|
|
207
|
-
slotNames = names;
|
|
208
|
-
return
|
|
204
|
+
if (changed) slotNames = names;
|
|
205
|
+
return changed;
|
|
209
206
|
}
|
|
210
207
|
const render = () => {
|
|
211
208
|
nextSlotNames = collectSlotNames();
|
|
212
|
-
if (nextSlotNames.
|
|
209
|
+
if (nextSlotNames.size === 0 || !ready.value || !isMounted.value) return;
|
|
213
210
|
const ownerDocument = instance.vnode.el.ownerDocument;
|
|
214
211
|
detachedRoot ??= ownerDocument.createElement("div");
|
|
215
|
-
return h(Teleport, { to: detachedRoot },
|
|
212
|
+
return h(Teleport, { to: detachedRoot }, Array.from(nextSlotNames, (slotName) => {
|
|
216
213
|
const slot = slots[slotName];
|
|
217
214
|
const slotContent = slotName in params ? slot?.(params[slotName]) : void 0;
|
|
218
215
|
return h("div", {
|
|
@@ -228,14 +225,15 @@ function useSlotOption(slots, onSlotsChange) {
|
|
|
228
225
|
function prepare(src) {
|
|
229
226
|
const names = collectSlotNames();
|
|
230
227
|
syncSlotNames(names);
|
|
228
|
+
const writable = /* @__PURE__ */ new WeakSet();
|
|
231
229
|
let root;
|
|
232
|
-
for (const key of patchedSlotNames) if (!names.
|
|
230
|
+
for (const key of patchedSlotNames) if (!names.has(key)) {
|
|
233
231
|
root ??= { ...src };
|
|
234
|
-
writePath(root, getSlotPath(key), null, true);
|
|
232
|
+
writePath(root, getSlotPath(key), null, writable, true);
|
|
235
233
|
}
|
|
236
|
-
if (names.length) root ??= { ...src };
|
|
237
234
|
const patchedNames = [];
|
|
238
235
|
for (const key of names) {
|
|
236
|
+
root ??= { ...src };
|
|
239
237
|
let callback = callbacks.get(key);
|
|
240
238
|
if (!callback) {
|
|
241
239
|
const formatter = (payload) => {
|
|
@@ -250,7 +248,7 @@ function useSlotOption(slots, onSlotsChange) {
|
|
|
250
248
|
};
|
|
251
249
|
callbacks.set(key, callback);
|
|
252
250
|
}
|
|
253
|
-
if (!writePath(root, callback.path, callback.formatter)) continue;
|
|
251
|
+
if (!writePath(root, callback.path, callback.formatter, writable)) continue;
|
|
254
252
|
patchedNames.push(key);
|
|
255
253
|
}
|
|
256
254
|
return {
|
|
@@ -392,17 +390,19 @@ function getRootAttrs(attrs) {
|
|
|
392
390
|
}
|
|
393
391
|
//#endregion
|
|
394
392
|
//#region src/style.css?raw
|
|
395
|
-
var style_default = "x-vue-echarts{display:block;width:100%;height:100%;min-width:0;}\nx-vue-echarts>.echarts-host{display:block;width:100%;height:100%;min-width:0;}\nx-vue-echarts>.echarts-host>:first-child,x-vue-echarts>.echarts-host>:first-child>canvas{border-radius:inherit;}\n";
|
|
393
|
+
var style_default = "x-vue-echarts{display:block;width:100%;height:100%;min-width:0;min-height:0;}\nx-vue-echarts>.echarts-host{display:block;width:100%;height:100%;min-width:0;border-radius:inherit;}\nx-vue-echarts>.echarts-host>:first-child,x-vue-echarts>.echarts-host>:first-child>canvas{border-radius:inherit;}\n";
|
|
396
394
|
//#endregion
|
|
397
395
|
//#region src/style.ts
|
|
398
|
-
if (isBrowser())
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
396
|
+
if (isBrowser()) {
|
|
397
|
+
if (Array.isArray(document.adoptedStyleSheets) && "replaceSync" in CSSStyleSheet.prototype) {
|
|
398
|
+
const sheet = new CSSStyleSheet();
|
|
399
|
+
sheet.replaceSync(style_default);
|
|
400
|
+
document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
|
|
401
|
+
} else {
|
|
402
|
+
const styleEl = document.createElement("style");
|
|
403
|
+
styleEl.textContent = style_default;
|
|
404
|
+
document.head.appendChild(styleEl);
|
|
405
|
+
}
|
|
406
406
|
}
|
|
407
407
|
//#endregion
|
|
408
408
|
//#region src/ECharts.ts
|
|
@@ -411,21 +411,22 @@ const SKIP_AUTO_UPDATE = Symbol();
|
|
|
411
411
|
const THEME_KEY = Symbol();
|
|
412
412
|
const INIT_OPTIONS_KEY = Symbol();
|
|
413
413
|
const UPDATE_OPTIONS_KEY = Symbol();
|
|
414
|
+
const chartProps = {
|
|
415
|
+
option: Object,
|
|
416
|
+
theme: { type: [Object, String] },
|
|
417
|
+
initOptions: Object,
|
|
418
|
+
updateOptions: Object,
|
|
419
|
+
group: String,
|
|
420
|
+
manualUpdate: Boolean,
|
|
421
|
+
...autoresizeProps,
|
|
422
|
+
...loadingProps
|
|
423
|
+
};
|
|
414
424
|
//#endregion
|
|
415
425
|
//#region src/index.ts
|
|
416
426
|
var src_default = /* @__PURE__ */ defineComponent({
|
|
417
427
|
name: "Echarts",
|
|
418
428
|
inheritAttrs: false,
|
|
419
|
-
props:
|
|
420
|
-
option: Object,
|
|
421
|
-
theme: { type: [Object, String] },
|
|
422
|
-
initOptions: Object,
|
|
423
|
-
updateOptions: Object,
|
|
424
|
-
group: String,
|
|
425
|
-
manualUpdate: Boolean,
|
|
426
|
-
...autoresizeProps,
|
|
427
|
-
...loadingProps
|
|
428
|
-
},
|
|
429
|
+
props: chartProps,
|
|
429
430
|
emits: {},
|
|
430
431
|
slots: Object,
|
|
431
432
|
setup(props, { attrs, expose, slots }) {
|
|
@@ -478,6 +479,7 @@ var src_default = /* @__PURE__ */ defineComponent({
|
|
|
478
479
|
}
|
|
479
480
|
function applyTheme(instance) {
|
|
480
481
|
if (!optionApplied || themeApplied) return false;
|
|
482
|
+
syncListeners();
|
|
481
483
|
const revision = updateRevision + 1;
|
|
482
484
|
themeApplied = true;
|
|
483
485
|
try {
|
|
@@ -493,15 +495,15 @@ var src_default = /* @__PURE__ */ defineComponent({
|
|
|
493
495
|
const preparedSlots = prepareSlots(option);
|
|
494
496
|
const slotted = preparedSlots.option;
|
|
495
497
|
const hasGraphicSlot = Boolean(graphic && slots.graphic);
|
|
496
|
-
const source = hasGraphicSlot ? {
|
|
497
|
-
...slotted,
|
|
498
|
-
graphic: void 0
|
|
499
|
-
} : slotted;
|
|
500
498
|
let updateOptions = manual ? manualOptions : realUpdateOptions.value ?? void 0;
|
|
501
499
|
let nextSignature = null;
|
|
502
500
|
const graphicOnly = mode === "graphic" && hasGraphicSlot && graphicSlotApplied && modelValid;
|
|
503
501
|
if (graphicOnly) nextSignature = lastSignature ?? null;
|
|
504
502
|
else if (!manual && !updateOptions) {
|
|
503
|
+
const source = hasGraphicSlot ? {
|
|
504
|
+
...slotted,
|
|
505
|
+
graphic: void 0
|
|
506
|
+
} : slotted;
|
|
505
507
|
const planned = planUpdate(lastSignature ?? void 0, source);
|
|
506
508
|
updateOptions = !planned.signature.hasAction && lastSignature === null ? {
|
|
507
509
|
...planned.plan,
|
|
@@ -546,7 +548,6 @@ var src_default = /* @__PURE__ */ defineComponent({
|
|
|
546
548
|
return;
|
|
547
549
|
}
|
|
548
550
|
if (initDeferred) return;
|
|
549
|
-
syncListeners();
|
|
550
551
|
const option = reasons & 3 ? getAutoOption() ?? lastAutoOption : lastAutoOption;
|
|
551
552
|
const needsTheme = !themeApplied && optionApplied;
|
|
552
553
|
if (needsTheme && !applyTheme(instance)) return;
|
|
@@ -578,8 +579,10 @@ var src_default = /* @__PURE__ */ defineComponent({
|
|
|
578
579
|
themeApplied = true;
|
|
579
580
|
function commit() {
|
|
580
581
|
const option = manualUpdate.value ? props.option : getAutoOption();
|
|
581
|
-
if (option)
|
|
582
|
-
|
|
582
|
+
if (option) {
|
|
583
|
+
if (manualUpdate.value) applyOption(instance, option, "manual", realUpdateOptions.value ?? void 0);
|
|
584
|
+
else applyOption(instance, option);
|
|
585
|
+
}
|
|
583
586
|
setSlotsReady(isCurrent(instance));
|
|
584
587
|
}
|
|
585
588
|
if (autoresize.value) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["cssRules","useGraphic","init","initChart"],"sources":["../src/composables/api.ts","../src/composables/autoresize.ts","../src/composables/loading.ts","../src/composables/slot.ts","../src/wc.ts","../src/core/events.ts","../src/style.css?raw","../src/style.ts","../src/ECharts.ts","../src/index.ts"],"sourcesContent":["import type { Ref } from \"vue\";\nimport type { EChartsType } from \"../types\";\n\nconst METHOD_NAMES = [\n \"getWidth\",\n \"getHeight\",\n \"getDom\",\n \"getZr\",\n \"getId\",\n \"getOption\",\n \"isSSR\",\n \"getDevicePixelRatio\",\n \"resize\",\n \"makeActionFromEvent\",\n \"dispatchAction\",\n \"updateLabelLayout\",\n \"convertToPixel\",\n \"convertToLayout\",\n \"convertFromPixel\",\n \"containPixel\",\n \"getVisual\",\n \"renderToCanvas\",\n \"renderToSVGString\",\n \"getSvgDataURL\",\n \"getDataURL\",\n \"getConnectedDataURL\",\n \"appendData\",\n \"clear\",\n] as const;\n\ntype MethodName = (typeof METHOD_NAMES)[number];\n\nexport type PublicMethods = Pick<EChartsType, MethodName | \"dispose\" | \"isDisposed\">;\n\nexport function usePublicAPI(\n chart: Ref<EChartsType | undefined>,\n dispose: () => void,\n isDisposed: () => boolean,\n): PublicMethods {\n const getInstance = (): EChartsType => {\n if (isDisposed()) {\n throw new Error(\"ECharts has been disposed.\");\n }\n const instance = chart.value;\n if (!instance) {\n throw new Error(\"ECharts is not initialized yet.\");\n }\n return instance;\n };\n\n const api: Record<string, (...args: unknown[]) => unknown> = {};\n for (const name of METHOD_NAMES) {\n api[name] = (...args: unknown[]): unknown => {\n const instance = getInstance();\n return Reflect.apply(instance[name], instance, args);\n };\n }\n api.dispose = dispose;\n api.isDisposed = isDisposed;\n return api as PublicMethods;\n}\n","import { watch } from \"vue\";\nimport { throttle } from \"echarts/core\";\n\nimport type { Ref, PropType } from \"vue\";\nimport type { EChartsType, AutoResize } from \"../types\";\nimport { hasZeroDimension } from \"../utils\";\n\nexport function useAutoresize(\n chart: Ref<EChartsType | undefined>,\n autoresize: Ref<AutoResize | undefined>,\n container: Ref<HTMLElement | undefined>,\n): () => void {\n const getOptions = () => (typeof autoresize.value === \"object\" ? autoresize.value : undefined);\n const resizeSources = [\n container,\n chart,\n () => Boolean(autoresize.value),\n () => getOptions()?.throttle ?? 100,\n ] as const;\n\n return watch(\n resizeSources,\n ([container, chart, enabled, wait], _, onCleanup) => {\n if (!chart || !container || !enabled) {\n return;\n }\n\n let observedWidth = chart.getWidth();\n let observedHeight = chart.getHeight();\n\n const resize = () => {\n if (\n hasZeroDimension(observedWidth, observedHeight) ||\n (observedWidth === chart.getWidth() && observedHeight === chart.getHeight())\n ) {\n return;\n }\n chart.resize();\n getOptions()?.onResize?.();\n };\n const throttledResize = wait ? throttle(resize, wait) : undefined;\n\n const observer = new ResizeObserver(([entry]) => {\n observedWidth = entry.contentRect.width;\n observedHeight = entry.contentRect.height;\n (throttledResize ?? resize)();\n });\n\n observer.observe(container);\n onCleanup(() => {\n observer.disconnect();\n throttledResize?.clear();\n });\n },\n // Stop observer work before the outgoing chart can be disposed.\n { flush: \"sync\" },\n );\n}\n\nexport const autoresizeProps = {\n autoresize: [Boolean, Object] as PropType<AutoResize>,\n};\n","import { inject, toValue, watch } from \"vue\";\n\nimport type { Ref, InjectionKey, PropType } from \"vue\";\nimport type { EChartsType, LoadingOptions, LoadingOptionsInjection } from \"../types\";\n\nexport const LOADING_OPTIONS_KEY: InjectionKey<LoadingOptionsInjection> = Symbol();\n\nexport function useLoading(\n chart: Ref<EChartsType | undefined>,\n loading: Ref<boolean | undefined>,\n loadingType: Ref<string | undefined>,\n loadingOptions: Ref<LoadingOptions | undefined>,\n): () => void {\n const defaultLoadingOptions = inject(LOADING_OPTIONS_KEY, undefined);\n\n return watch(\n () =>\n loading.value\n ? {\n instance: chart.value,\n visible: true as const,\n type: loadingType.value || undefined,\n options: {\n ...toValue(defaultLoadingOptions),\n ...loadingOptions.value,\n },\n }\n : { instance: chart.value, visible: false as const },\n (state) => {\n const { instance } = state;\n if (!instance) {\n return;\n }\n\n if (!state.visible) {\n instance.hideLoading();\n return;\n }\n\n const { type, options: currentOptions } = state;\n if (type) {\n instance.showLoading(type, currentOptions);\n } else {\n instance.showLoading(currentOptions);\n }\n },\n { deep: true, immediate: true, flush: \"sync\" },\n );\n}\n\nexport const loadingProps = {\n loading: Boolean,\n loadingType: String,\n loadingOptions: Object as PropType<LoadingOptions>,\n};\n","import {\n getCurrentInstance,\n h,\n Teleport,\n onUpdated,\n onMounted,\n shallowRef,\n shallowReactive,\n} from \"vue\";\nimport type { Slots, SlotsType } from \"vue\";\nimport type { Option } from \"../types\";\nimport { isPlainObject, isValidArrayIndex, warn } from \"../utils\";\nimport type { TooltipComponentFormatterCallbackParams } from \"echarts\";\nimport type { VChartSlotsExtension } from \"../index\";\n\nconst SLOT_OPTION_PATHS = {\n tooltip: [\"tooltip\", \"formatter\"],\n dataView: [\"toolbox\", \"feature\", \"dataView\", \"optionToContent\"],\n} as const;\nconst PROTOTYPE_SEGMENT_RE = /-__proto__(?:-|$)/;\ntype SlotPrefix = keyof typeof SLOT_OPTION_PATHS;\ntype SlotName = SlotPrefix | `${SlotPrefix}-${string}`;\ntype SlotMap<T> = Partial<Record<SlotName, T>>;\n\nfunction isValidSlotName(key: string): key is SlotName {\n return (\n (key === \"tooltip\" ||\n key.startsWith(\"tooltip-\") ||\n key === \"dataView\" ||\n key.startsWith(\"dataView-\")) &&\n !key.endsWith(\"-\") &&\n !key.includes(\"--\") &&\n !PROTOTYPE_SEGMENT_RE.test(key)\n );\n}\n\nfunction getSlotPath(key: SlotName): string[] {\n const prefix: SlotPrefix = key.startsWith(\"tooltip\") ? \"tooltip\" : \"dataView\";\n const rest = key.slice(prefix.length);\n const path = rest ? rest.slice(1).split(\"-\") : [];\n const target = SLOT_OPTION_PATHS[prefix];\n if (isValidArrayIndex(path[0] ?? \"\")) {\n const index = path.shift()!;\n path.push(target[0], index, ...target.slice(1));\n } else {\n path.push(...target);\n }\n return path;\n}\n\ntype Container = Record<string, unknown> | unknown[];\n\nfunction ensureChild(parent: Container, seg: string, nextSeg: string): Container | undefined {\n const parentIsArray = Array.isArray(parent);\n if (parentIsArray !== isValidArrayIndex(seg)) {\n return undefined;\n }\n const next = parentIsArray ? parent[Number(seg)] : parent[seg];\n\n let child: Container;\n if (Array.isArray(next)) {\n child = [...next];\n } else if (isPlainObject(next)) {\n child = { ...next };\n } else if (next === undefined && !parentIsArray && !isValidArrayIndex(nextSeg)) {\n child = {};\n } else {\n return undefined;\n }\n writeSegment(parent, seg, child);\n return child;\n}\n\nfunction writeSegment(parent: Container, seg: string, value: unknown): void {\n if (Array.isArray(parent)) {\n parent[Number(seg)] = value;\n return;\n }\n parent[seg] = value;\n}\n\nfunction writePath(\n root: Option,\n path: readonly string[],\n value: unknown,\n preserveDefined = false,\n): boolean {\n let current: Container = root;\n for (let i = 0; i < path.length - 1; i++) {\n const child = ensureChild(current, path[i], path[i + 1]);\n if (!child) {\n return false;\n }\n current = child;\n }\n if (Array.isArray(current)) {\n return false;\n }\n const leaf = path[path.length - 1];\n if (!preserveDefined || current[leaf] === undefined) {\n writeSegment(current, leaf, value);\n }\n return true;\n}\n\nexport function useSlotOption(slots: Slots, onSlotsChange: () => void) {\n const instance = getCurrentInstance()!;\n let detachedRoot: HTMLDivElement | undefined;\n const containers = shallowReactive<SlotMap<HTMLElement>>({});\n const params = shallowReactive<SlotMap<unknown>>({});\n const isMounted = shallowRef(false);\n const ready = shallowRef(false);\n\n const collectSlotNames = (warnInvalid = false): SlotName[] => {\n const names: SlotName[] = [];\n for (const key in slots) {\n if (key === \"graphic\") {\n continue;\n }\n if (isValidSlotName(key)) {\n names.push(key);\n } else if (warnInvalid) {\n warn(`Invalid slot name: ${key}`);\n }\n }\n return names;\n };\n collectSlotNames(true);\n\n let slotNames: readonly SlotName[] = [];\n let nextSlotNames = slotNames;\n const patchedSlotNames = new Set<SlotName>();\n const callbacks = new Map<\n SlotName,\n { path: string[]; formatter: (payload: unknown) => HTMLElement | undefined }\n >();\n\n function setReady(value: boolean): void {\n ready.value = value;\n if (value) {\n return;\n }\n patchedSlotNames.clear();\n for (const key of Object.keys(params) as SlotName[]) {\n delete params[key];\n }\n }\n\n function syncSlotNames(names: readonly SlotName[]): boolean {\n if (names.length === slotNames.length && slotNames.every((name) => names.includes(name))) {\n return false;\n }\n\n for (const key of slotNames) {\n if (!names.includes(key)) {\n delete params[key];\n delete containers[key];\n callbacks.delete(key);\n }\n }\n slotNames = names;\n return true;\n }\n\n const render = () => {\n nextSlotNames = collectSlotNames();\n if (nextSlotNames.length === 0 || !ready.value || !isMounted.value) {\n return undefined;\n }\n const ownerDocument = (instance.vnode.el as HTMLElement).ownerDocument;\n detachedRoot ??= ownerDocument.createElement(\"div\");\n\n return h(\n Teleport,\n { to: detachedRoot },\n nextSlotNames.map((slotName) => {\n const slot = slots[slotName];\n const slotContent = slotName in params ? slot?.(params[slotName]) : undefined;\n return h(\n \"div\",\n {\n key: slotName,\n ref: (el) => {\n if (el) {\n containers[slotName] = el as HTMLElement;\n } else {\n delete containers[slotName];\n }\n },\n style: { display: \"contents\" },\n },\n slotContent,\n );\n }),\n );\n };\n\n function prepare(src: Option): { option: Option; commit: () => void } {\n const names = collectSlotNames();\n syncSlotNames(names);\n let root: Option | undefined;\n\n for (const key of patchedSlotNames) {\n if (!names.includes(key)) {\n root ??= { ...src };\n writePath(root, getSlotPath(key), null, true);\n }\n }\n\n if (names.length) {\n root ??= { ...src };\n }\n const patchedNames: SlotName[] = [];\n\n for (const key of names) {\n let callback = callbacks.get(key);\n if (!callback) {\n const formatter = (payload: unknown): HTMLElement | undefined => {\n if (!slots[key]) {\n return undefined;\n }\n // ECharts may update and reuse the same formatter payload object.\n if (key in params && Object.is(params[key], payload)) {\n delete params[key];\n }\n params[key] = payload;\n return containers[key];\n };\n callback = { path: getSlotPath(key), formatter };\n callbacks.set(key, callback);\n }\n\n if (!writePath(root!, callback.path, callback.formatter)) {\n continue;\n }\n patchedNames.push(key);\n }\n\n return {\n option: root ?? src,\n commit: () => {\n // Native theme changes can replay callbacks from an older option backup.\n // Keep their cleanup paths until the chart instance is replaced.\n patchedNames.forEach((name) => patchedSlotNames.add(name));\n },\n };\n }\n\n onUpdated(() => {\n if (syncSlotNames(nextSlotNames)) {\n onSlotsChange();\n }\n });\n\n onMounted(() => {\n slotNames = nextSlotNames;\n isMounted.value = true;\n });\n\n return {\n render,\n prepare,\n setReady,\n cancelPendingUpdate: () => {\n // A queued updated hook must not replay slot changes preceding clear().\n syncSlotNames(collectSlotNames());\n },\n };\n}\n\nexport type SlotsTypes = SlotsType<\n Record<\"tooltip\" | `tooltip-${string}`, TooltipComponentFormatterCallbackParams> &\n Record<\"dataView\" | `dataView-${string}`, Option> &\n VChartSlotsExtension\n>;\n","export const TAG_NAME = \"x-vue-echarts\";\n// Shared across bundles so one copy can trust another copy's disconnect hook.\nconst LIFECYCLE_MARKER = Symbol.for(\"vue-echarts.lifecycle\");\n\ntype LifecycleConstructor = CustomElementConstructor & {\n [LIFECYCLE_MARKER]?: true;\n};\n\nexport interface EChartsElement extends HTMLElement {\n __dispose: (() => void) | null;\n}\n\nexport function register(): boolean {\n const registry = globalThis.customElements;\n\n if (!registry) {\n return false;\n }\n\n const existing = registry.get(TAG_NAME);\n if (existing) {\n return Boolean((existing as LifecycleConstructor)[LIFECYCLE_MARKER]);\n }\n\n class ECElement extends HTMLElement implements EChartsElement {\n __dispose: (() => void) | null = null;\n\n disconnectedCallback(): void {\n if (!this.__dispose) {\n return;\n }\n queueMicrotask(() => {\n if (!this.isConnected && this.__dispose) {\n const dispose = this.__dispose;\n this.__dispose = null;\n dispose();\n }\n });\n }\n }\n\n Object.defineProperty(ECElement, LIFECYCLE_MARKER, { value: true });\n registry.define(TAG_NAME, ECElement);\n return true;\n}\n","import { getCurrentInstance, onScopeDispose, onUpdated, watchSyncEffect } from \"vue\";\n\nimport type { Ref } from \"vue\";\nimport type { EChartsType } from \"../types\";\nimport { createEventInvoker, hasEventHandler, isOn, parseOnEvent } from \"../utils\";\nimport type { AttrMap, EventHandler } from \"../utils\";\n\ntype EventEmitter = {\n on: (event: string, handler: EventHandler) => void;\n off: (event: string, handler: EventHandler) => void;\n};\n\ntype ListenerBinding = {\n emitter: EventEmitter;\n event: string;\n source: unknown;\n handler: EventHandler;\n};\n\nconst NATIVE_EVENT_PREFIX = \"onNative:\";\n\nexport function useReactiveChartListeners(\n chart: Ref<EChartsType | undefined>,\n attrs: AttrMap,\n): { sync: () => void; stop: () => void } {\n const bindings = new Map<string, ListenerBinding>();\n const consumedSources = new Map<string, unknown>();\n const seen = new Set<string>();\n let boundChart: EChartsType | undefined;\n\n function clearBindings(): void {\n for (const binding of bindings.values()) {\n binding.emitter.off(binding.event, binding.handler);\n }\n bindings.clear();\n }\n\n function sync(): void {\n seen.clear();\n const instance = chart.value;\n for (const [key, source] of consumedSources) {\n if (attrs[key] !== source) {\n consumedSources.delete(key);\n }\n }\n if (!instance) {\n clearBindings();\n boundChart = undefined;\n return;\n }\n\n if (boundChart && boundChart !== instance) {\n clearBindings();\n }\n boundChart = instance;\n\n for (const key in attrs) {\n const parsed = parseOnEvent(key);\n if (!parsed || parsed.event.startsWith(\"native:\") || parsed.event === \"zr:\") {\n continue;\n }\n\n const zr = parsed.event.startsWith(\"zr:\");\n const event = (zr ? parsed.event.slice(3) : parsed.event).toLowerCase();\n const source = attrs[key];\n const existing = bindings.get(key);\n\n if (parsed.once && consumedSources.get(key) === source) {\n continue;\n }\n\n if (existing && existing.source === source && hasEventHandler(source)) {\n seen.add(key);\n continue;\n }\n\n const invoke = createEventInvoker(source);\n if (existing) {\n existing.emitter.off(existing.event, existing.handler);\n bindings.delete(key);\n }\n\n if (!invoke) {\n continue;\n }\n\n const emitter = zr ? (instance.getZr() as EventEmitter) : (instance as EventEmitter);\n let handler = invoke;\n if (parsed.once) {\n handler = (...args): void => {\n bindings.delete(key);\n consumedSources.set(key, source);\n emitter.off(event, handler);\n invoke(...args);\n };\n }\n\n emitter.on(event, handler);\n bindings.set(key, {\n emitter,\n event,\n source,\n handler,\n });\n seen.add(key);\n }\n\n for (const [key, binding] of bindings) {\n if (seen.has(key)) {\n continue;\n }\n binding.emitter.off(binding.event, binding.handler);\n bindings.delete(key);\n }\n }\n\n const stopWatch = watchSyncEffect(sync);\n if (getCurrentInstance()) {\n onUpdated(sync);\n }\n\n const stop = () => {\n stopWatch();\n clearBindings();\n };\n onScopeDispose(stop);\n return { sync, stop };\n}\n\nexport function getRootAttrs(attrs: AttrMap): AttrMap {\n const result: AttrMap = {};\n\n for (const key in attrs) {\n if (key.startsWith(NATIVE_EVENT_PREFIX)) {\n const event = key.slice(NATIVE_EVENT_PREFIX.length);\n if (event) {\n result[`on:${event}`] = attrs[key];\n }\n continue;\n }\n if (!isOn(key)) {\n result[key] = attrs[key];\n }\n }\n\n return result;\n}\n","export default \"x-vue-echarts{display:block;width:100%;height:100%;min-width:0;}\\nx-vue-echarts>.echarts-host{display:block;width:100%;height:100%;min-width:0;}\\nx-vue-echarts>.echarts-host>:first-child,x-vue-echarts>.echarts-host>:first-child>canvas{border-radius:inherit;}\\n\"","import cssRules from \"./style.css?raw\";\nimport { isBrowser } from \"./utils\";\n\nif (isBrowser()) {\n if (Array.isArray(document.adoptedStyleSheets) && \"replaceSync\" in CSSStyleSheet.prototype) {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(cssRules);\n document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];\n } else {\n const styleEl = document.createElement(\"style\");\n styleEl.textContent = cssRules;\n document.head.appendChild(styleEl);\n }\n}\n","import {\n defineComponent,\n shallowRef,\n toRef,\n watch,\n computed,\n inject,\n onMounted,\n onBeforeUnmount,\n h,\n nextTick,\n watchSyncEffect,\n toValue,\n} from \"vue\";\nimport { init as initChart } from \"echarts/core\";\n\nimport type { InjectionKey, PropType, VNodeChild } from \"vue\";\n\nimport { usePublicAPI, type PublicMethods } from \"./composables/api\";\nimport { useAutoresize, autoresizeProps } from \"./composables/autoresize\";\nimport { useLoading, loadingProps } from \"./composables/loading\";\nimport { useSlotOption, type SlotsTypes } from \"./composables/slot\";\nimport { hasZeroDimension, isIgnorableWatchChange, warn } from \"./utils\";\nimport { register, TAG_NAME } from \"./wc\";\nimport { useRuntime as useGraphic } from \"./graphic/runtime\";\nimport { useReactiveChartListeners, getRootAttrs } from \"./core/events\";\nimport { planUpdate } from \"./update\";\nimport type { Signature } from \"./update\";\n\nimport type {\n EChartsType,\n SetOptionType,\n Option,\n Theme,\n ThemeInjection,\n InitOptions,\n InitOptionsInjection,\n UpdateOptions,\n UpdateOptionsInjection,\n Emits,\n PublicComponent,\n} from \"./types\";\nimport type { EChartsElement } from \"./wc\";\n\nimport \"./style\";\n\nconst wcRegistered = register();\nconst SKIP_AUTO_UPDATE = Symbol();\ntype ApplyMode = \"manual\" | \"graphic\";\nenum UpdateReason {\n Option = 1,\n Graphic = 2,\n Theme = 4,\n Reinit = 8,\n}\n\nexport const THEME_KEY: InjectionKey<ThemeInjection> = Symbol();\nexport const INIT_OPTIONS_KEY: InjectionKey<InitOptionsInjection> = Symbol();\nexport const UPDATE_OPTIONS_KEY: InjectionKey<UpdateOptionsInjection> = Symbol();\nexport { LOADING_OPTIONS_KEY } from \"./composables/loading\";\n\nconst chartProps = {\n option: Object as PropType<Option>,\n theme: {\n type: [Object, String] as PropType<Theme>,\n },\n initOptions: Object as PropType<InitOptions>,\n updateOptions: Object as PropType<UpdateOptions>,\n group: String,\n manualUpdate: Boolean,\n ...autoresizeProps,\n ...loadingProps,\n};\n\ntype Bindings = {\n setOption: SetOptionType;\n readonly root: HTMLElement | undefined;\n readonly chart: EChartsType | undefined;\n} & PublicMethods;\n\nconst ECharts = /* @__PURE__ */ defineComponent({\n name: \"Echarts\",\n inheritAttrs: false,\n props: chartProps,\n emits: {} as Emits,\n slots: Object as SlotsTypes,\n setup(props, { attrs, expose, slots }) {\n const root = shallowRef<EChartsElement>();\n const chartHost = shallowRef<HTMLDivElement>();\n const chart = shallowRef<EChartsType>();\n const updateRequest = shallowRef(0);\n let pendingUpdate = 0;\n const defaultTheme = inject(THEME_KEY, null);\n const defaultInitOptions = inject(INIT_OPTIONS_KEY, null);\n const defaultUpdateOptions = inject(UPDATE_OPTIONS_KEY, null);\n\n const autoresize = toRef(props, \"autoresize\");\n const manualUpdate = toRef(props, \"manualUpdate\");\n const loading = toRef(props, \"loading\");\n const loadingType = toRef(props, \"loadingType\");\n const loadingOptions = toRef(props, \"loadingOptions\");\n\n const realTheme = computed(() => props.theme ?? toValue(defaultTheme) ?? undefined);\n const realInitOptions = computed(\n () => props.initOptions ?? toValue(defaultInitOptions) ?? undefined,\n );\n const realUpdateOptions = computed(() => props.updateOptions ?? toValue(defaultUpdateOptions));\n\n const terminallyDisposed = shallowRef(false);\n\n const {\n render: renderSlot,\n prepare: prepareSlots,\n setReady: setSlotsReady,\n cancelPendingUpdate: cancelSlotUpdate,\n } = useSlotOption(slots, requestUpdate);\n\n const graphic = useGraphic({\n slots,\n manualUpdate,\n requestUpdate: () => requestUpdate(UpdateReason.Graphic),\n });\n\n // `null` means the model has no trusted signature, so the next smart update must rebuild.\n let lastSignature: Signature | null | undefined;\n let lastAutoOption: Option | undefined;\n let themeApplied = false;\n let optionApplied = false;\n let initDeferred = false;\n let graphicSlotApplied = false;\n let updateRevision = 0;\n let modelValid = false;\n\n function getAutoOption(): Option | undefined {\n // A graphic slot is a complete option source even without an `option` prop.\n return props.option ?? (graphic && (slots.graphic || graphicSlotApplied) ? {} : undefined);\n }\n\n function isCurrent(instance: EChartsType | undefined): instance is EChartsType {\n return instance !== undefined && chart.value === instance && !terminallyDisposed.value;\n }\n\n function runUpdate(\n instance: EChartsType,\n update: () => void,\n signature: Signature | null | undefined,\n ): boolean {\n const revision = ++updateRevision;\n // A failed native call may have partially changed the model. Only a successful,\n // uninterrupted submission can establish a new smart-update baseline.\n lastSignature = null;\n modelValid = false;\n update();\n if (!isCurrent(instance) || updateRevision !== revision) {\n return false;\n }\n lastSignature = signature;\n modelValid = true;\n return true;\n }\n\n function applyTheme(instance: EChartsType): boolean {\n // ECharts ignores setTheme until its first option creates the chart model.\n if (!optionApplied || themeApplied) {\n return false;\n }\n const revision = updateRevision + 1;\n // Native update events can submit another option before setTheme returns.\n themeApplied = true;\n try {\n return runUpdate(\n instance,\n () => instance.setTheme(realTheme.value || {}),\n lastSignature === undefined ? undefined : null,\n );\n } catch (error) {\n if (updateRevision === revision) {\n themeApplied = false;\n }\n throw error;\n }\n }\n\n function applyOption(\n instance: EChartsType,\n option: Option,\n mode?: ApplyMode,\n manualOptions?: UpdateOptions,\n ): void {\n const manual = mode === \"manual\";\n initDeferred = false;\n const preparedSlots = prepareSlots(option);\n const slotted = preparedSlots.option;\n const hasGraphicSlot = Boolean(graphic && slots.graphic);\n // An owned graphic tree is planned separately from the source it overrides.\n const source = hasGraphicSlot ? { ...slotted, graphic: undefined } : slotted;\n let updateOptions = manual ? manualOptions : (realUpdateOptions.value ?? undefined);\n let nextSignature: Signature | null = null;\n\n const graphicOnly = mode === \"graphic\" && hasGraphicSlot && graphicSlotApplied && modelValid;\n if (graphicOnly) {\n nextSignature = lastSignature ?? null;\n } else if (!manual && !updateOptions) {\n const planned = planUpdate(lastSignature ?? undefined, source);\n const rebuild = !planned.signature.hasAction && lastSignature === null;\n updateOptions = rebuild ? { ...planned.plan, notMerge: true } : planned.plan;\n nextSignature = planned.signature;\n }\n\n const replaceMerge = updateOptions?.replaceMerge;\n const replacements = typeof replaceMerge === \"string\" ? [replaceMerge] : (replaceMerge ?? []);\n const preparedGraphic = graphic?.prepare(\n slotted,\n !modelValid ||\n !graphicSlotApplied ||\n Boolean(updateOptions?.notMerge) ||\n replacements.includes(\"graphic\") ||\n manual,\n );\n let patched = preparedGraphic?.option ?? slotted;\n const replaceGraphic = preparedGraphic?.replace || (graphicSlotApplied && !hasGraphicSlot);\n if (replaceGraphic && !updateOptions?.notMerge && !replacements.includes(\"graphic\")) {\n updateOptions = { ...updateOptions, replaceMerge: [...replacements, \"graphic\"] };\n }\n const replacesSource = replacements.some((key) => key !== \"graphic\");\n if (graphicOnly && !updateOptions?.notMerge && !replacesSource) {\n patched = { graphic: patched.graphic };\n }\n syncListeners();\n if (!runUpdate(instance, () => instance.setOption(patched, updateOptions), nextSignature)) {\n return;\n }\n preparedSlots.commit();\n preparedGraphic?.commit();\n graphicSlotApplied = hasGraphicSlot;\n optionApplied = true;\n if (!manual) {\n lastAutoOption = option;\n }\n if (applyTheme(instance) && !manual) {\n applyOption(instance, option);\n }\n }\n\n function scheduleUpdate(reason: UpdateReason): void {\n pendingUpdate |= reason;\n updateRequest.value++;\n }\n\n function requestUpdate(reason = UpdateReason.Option): void {\n if (!manualUpdate.value && !initDeferred && !terminallyDisposed.value) {\n scheduleUpdate(reason);\n }\n }\n\n function flushUpdate(): void {\n const reasons = pendingUpdate;\n pendingUpdate = 0;\n const instance = chart.value;\n if (!reasons || !isCurrent(instance)) {\n return;\n }\n if (reasons & UpdateReason.Reinit) {\n cleanup();\n init();\n return;\n }\n if (initDeferred) {\n return;\n }\n\n syncListeners();\n const option =\n reasons & (UpdateReason.Option | UpdateReason.Graphic)\n ? (getAutoOption() ?? lastAutoOption)\n : lastAutoOption;\n const needsTheme = !themeApplied && optionApplied;\n if (needsTheme && !applyTheme(instance)) {\n return;\n }\n if (!manualUpdate.value && option) {\n const graphicOnly = reasons === UpdateReason.Graphic && !needsTheme;\n applyOption(instance, option, graphicOnly ? \"graphic\" : undefined);\n }\n }\n\n if (slots.graphic && !graphic) {\n warn(\n \"Detected `#graphic` slot but no extension is registered. Import from `vue-echarts/graphic` to enable it.\",\n );\n }\n\n const { sync: syncListeners, stop: stopListeners } = useReactiveChartListeners(chart, attrs);\n\n function cleanup(): void {\n pendingUpdate = 0;\n graphic?.cancelPendingFlush();\n updateRevision++;\n const instance = chart.value;\n chart.value = undefined;\n setSlotsReady(false);\n lastSignature = undefined;\n modelValid = false;\n lastAutoOption = undefined;\n initDeferred = false;\n graphicSlotApplied = false;\n instance?.dispose();\n }\n\n function init(): void {\n pendingUpdate = 0;\n optionApplied = false;\n\n const host = chartHost.value as HTMLDivElement;\n const instance = initChart(host, realTheme.value, realInitOptions.value);\n chart.value = instance;\n if (!isCurrent(instance)) {\n return;\n }\n themeApplied = true;\n\n function commit(): void {\n const option = manualUpdate.value ? props.option : getAutoOption();\n if (option) {\n if (manualUpdate.value) {\n applyOption(instance, option, \"manual\", realUpdateOptions.value ?? undefined);\n } else {\n applyOption(instance, option);\n }\n }\n setSlotsReady(isCurrent(instance));\n }\n\n if (autoresize.value) {\n initDeferred = true;\n nextTick(() => {\n if (!isCurrent(instance)) {\n return;\n }\n if (autoresize.value && !hasZeroDimension(host.offsetWidth, host.offsetHeight)) {\n instance.resize();\n if (!isCurrent(instance)) {\n return;\n }\n }\n if (initDeferred) {\n initDeferred = false;\n commit();\n } else {\n setSlotsReady(true);\n }\n });\n return;\n }\n\n commit();\n }\n\n const setOption: SetOptionType = (option, notMerge, lazyUpdate?: boolean) => {\n if (!props.manualUpdate) {\n warn(\"`setOption` is only available when `manual-update` is `true`.\");\n return;\n }\n\n const instance = chart.value;\n if (!isCurrent(instance)) {\n return;\n }\n\n const updateOptions =\n typeof notMerge === \"boolean\"\n ? { notMerge, lazyUpdate }\n : (notMerge ?? (lazyUpdate === undefined ? undefined : { lazyUpdate }));\n\n applyOption(instance, option, \"manual\", updateOptions);\n };\n\n // Mark synchronously so later batched replacements cannot mask nested changes.\n const stopThemeWatch = watch(\n realTheme,\n (theme, previousTheme) => {\n if (isIgnorableWatchChange(theme, previousTheme)) {\n return;\n }\n themeApplied = false;\n scheduleUpdate(UpdateReason.Theme);\n },\n { deep: true, flush: \"sync\" },\n );\n\n const stopInitOptionsWatch = watch(\n realInitOptions,\n (options, previousOptions) => {\n if (!isIgnorableWatchChange(options, previousOptions)) {\n scheduleUpdate(UpdateReason.Reinit);\n }\n },\n { deep: true, flush: \"sync\" },\n );\n\n function watchOption() {\n return watch(\n () => (manualUpdate.value ? SKIP_AUTO_UPDATE : props.option),\n (option, previousOption) => {\n if (\n option !== SKIP_AUTO_UPDATE &&\n previousOption !== SKIP_AUTO_UPDATE &&\n (option ?? getAutoOption())\n ) {\n requestUpdate();\n }\n },\n // Batch deep traversal, then submit after Vue has prepared slot containers and graphic nodes.\n { deep: true },\n );\n }\n let stopOptionWatch = watchOption();\n const stopModeWatch = watch(manualUpdate, () => scheduleUpdate(UpdateReason.Reinit), {\n flush: \"sync\",\n });\n const stopUpdateWatch = watch(updateRequest, flushUpdate, { flush: \"post\" });\n\n const stopGroupWatch = watchSyncEffect(() => {\n const instance = chart.value;\n if (isCurrent(instance)) {\n instance.group = props.group ?? \"\";\n }\n });\n const stopLoading = useLoading(chart, loading, loadingType, loadingOptions);\n const stopAutoresize = useAutoresize(chart, autoresize, chartHost);\n\n function dispose(): void {\n if (terminallyDisposed.value) {\n return;\n }\n terminallyDisposed.value = true;\n stopThemeWatch();\n stopInitOptionsWatch();\n stopOptionWatch();\n stopModeWatch();\n stopUpdateWatch();\n stopGroupWatch();\n stopLoading();\n stopAutoresize();\n stopListeners();\n cleanup();\n }\n\n const publicApi = usePublicAPI(chart, dispose, () => terminallyDisposed.value);\n const guardedClear = publicApi.clear;\n publicApi.clear = () => {\n const instance = chart.value;\n if (!isCurrent(instance)) {\n return guardedClear();\n }\n initDeferred = false;\n pendingUpdate = 0;\n graphic?.cancelPendingFlush();\n cancelSlotUpdate();\n // Drop earlier queued source changes while observing changes made inside clear's events.\n stopOptionWatch();\n stopOptionWatch = watchOption();\n if (runUpdate(instance, () => instance.clear(), undefined)) {\n lastAutoOption = undefined;\n graphicSlotApplied = false;\n optionApplied = true;\n }\n };\n\n onMounted(() => {\n if (!terminallyDisposed.value) {\n init();\n }\n });\n\n onBeforeUnmount(() => {\n stopOptionWatch();\n if (terminallyDisposed.value) {\n return;\n }\n terminallyDisposed.value = true;\n const element = root.value;\n if (wcRegistered && element?.isConnected && element.__dispose === null) {\n element.__dispose = cleanup;\n return;\n }\n\n cleanup();\n });\n\n const exposed = {\n setOption,\n get root(): HTMLElement | undefined {\n return root.value ?? undefined;\n },\n get chart() {\n const instance = chart.value;\n return isCurrent(instance) ? instance : undefined;\n },\n };\n expose(Object.assign(exposed, publicApi));\n\n return (() => {\n const children: VNodeChild[] = [\n h(\"div\", {\n ref: chartHost,\n class: \"echarts-host\",\n }),\n ];\n\n if (!terminallyDisposed.value) {\n const teleported = renderSlot();\n if (teleported) {\n children.push(teleported);\n }\n\n const graphicContent = graphic?.render();\n if (graphicContent) {\n children.push(graphicContent);\n }\n }\n\n const forwardedAttrs = getRootAttrs(attrs);\n\n return h(\n TAG_NAME,\n {\n ...forwardedAttrs,\n ref: root,\n class: [\"echarts\", forwardedAttrs.class],\n },\n children,\n );\n }) as unknown as typeof exposed & PublicMethods;\n },\n}) as PublicComponent<typeof chartProps, Bindings, Emits, SlotsTypes>;\n\nexport default ECharts;\n","import ECharts from \"./ECharts\";\nimport type { Slot } from \"vue\";\n\nexport interface VChartSlotsExtension {\n graphic?: Slot;\n}\n\nexport default ECharts;\nexport * from \"./ECharts\";\nexport type { AutoResize, LoadingOptions } from \"./types\";\n"],"mappings":";;;;AAGA,MAAM,eAAe;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAMA,SAAgB,aACd,OACA,SACA,YACe;CACf,MAAM,oBAAiC;EACrC,IAAI,WAAW,GACb,MAAM,IAAI,MAAM,4BAA4B;EAE9C,MAAM,WAAW,MAAM;EACvB,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,iCAAiC;EAEnD,OAAO;CACT;CAEA,MAAM,MAAuD,CAAC;CAC9D,KAAK,MAAM,QAAQ,cACjB,IAAI,SAAS,GAAG,SAA6B;EAC3C,MAAM,WAAW,YAAY;EAC7B,OAAO,QAAQ,MAAM,SAAS,OAAO,UAAU,IAAI;CACrD;CAEF,IAAI,UAAU;CACd,IAAI,aAAa;CACjB,OAAO;AACT;;;ACrDA,SAAgB,cACd,OACA,YACA,WACY;CACZ,MAAM,mBAAoB,OA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AEA,QAAQ;EACV,CAAC;EAYD,OAAO,OAAO,OAAO;GATnB;GACA,IAAI,OAAgC;IAClC,OAAO,KAAK,SAAS,KAAA;GACvB;GACA,IAAI,QAAQ;IACV,MAAM,WAAW,MAAM;IACvB,OAAO,UAAU,QAAQ,IAAI,WAAW,KAAA;GAC1C;EAEyB,GAAG,SAAS,CAAC;EAExC,cAAc;GACZ,MAAM,WAAyB,CAC7B,EAAE,OAAO;IACP,KAAK;IACL,OAAO;GACT,CAAC,CACH;GAEA,IAAI,CAAC,mBAAmB,OAAO;IAC7B,MAAM,aAAa,WAAW;IAC9B,IAAI,YACF,SAAS,KAAK,UAAU;IAG1B,MAAM,iBAAiB,SAAS,OAAO;IACvC,IAAI,gBACF,SAAS,KAAK,cAAc;GAEhC;GAEA,MAAM,iBAAiB,aAAa,KAAK;GAEzC,OAAO,EACL,UACA;IACE,GAAG;IACH,KAAK;IACL,OAAO,CAAC,WAAW,eAAe,KAAK;GACzC,GACA,QACF;EACF;CACF;AACF,CChhBe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["cssRules","useGraphic","init","initChart"],"sources":["../src/composables/api.ts","../src/composables/autoresize.ts","../src/composables/loading.ts","../src/composables/slot.ts","../src/wc.ts","../src/core/events.ts","../src/style.css?raw","../src/style.ts","../src/ECharts.ts","../src/index.ts"],"sourcesContent":["import type { Ref } from \"vue\";\nimport type { EChartsType } from \"../types\";\n\nconst METHOD_NAMES = [\n \"getWidth\",\n \"getHeight\",\n \"getDom\",\n \"getZr\",\n \"getId\",\n \"getOption\",\n \"isSSR\",\n \"getDevicePixelRatio\",\n \"resize\",\n \"makeActionFromEvent\",\n \"dispatchAction\",\n \"updateLabelLayout\",\n \"convertToPixel\",\n \"convertToLayout\",\n \"convertFromPixel\",\n \"containPixel\",\n \"getVisual\",\n \"renderToCanvas\",\n \"renderToSVGString\",\n \"getSvgDataURL\",\n \"getDataURL\",\n \"getConnectedDataURL\",\n \"appendData\",\n \"clear\",\n] as const;\n\ntype MethodName = (typeof METHOD_NAMES)[number];\n\nexport type PublicMethods = Pick<EChartsType, MethodName | \"dispose\" | \"isDisposed\">;\n\nexport function usePublicAPI(\n chart: Ref<EChartsType | undefined>,\n dispose: () => void,\n isDisposed: () => boolean,\n): PublicMethods {\n const getInstance = (): EChartsType => {\n if (isDisposed()) {\n throw new Error(\"ECharts has been disposed.\");\n }\n const instance = chart.value;\n if (!instance) {\n throw new Error(\"ECharts is not initialized yet.\");\n }\n return instance;\n };\n\n const api: Record<string, (...args: unknown[]) => unknown> = {};\n for (const name of METHOD_NAMES) {\n api[name] = (...args: unknown[]): unknown => {\n const instance = getInstance();\n return Reflect.apply(instance[name], instance, args);\n };\n }\n api.dispose = dispose;\n api.isDisposed = isDisposed;\n return api as PublicMethods;\n}\n","import { watch } from \"vue\";\nimport { throttle } from \"echarts/core\";\n\nimport type { Ref, PropType } from \"vue\";\nimport type { EChartsType, AutoResize } from \"../types\";\nimport { hasZeroDimension } from \"../utils\";\n\nexport function useAutoresize(\n chart: Ref<EChartsType | undefined>,\n autoresize: Ref<AutoResize | undefined>,\n container: Ref<HTMLElement | undefined>,\n): () => void {\n const getOptions = () => (typeof autoresize.value === \"object\" ? autoresize.value : undefined);\n const resizeSources = [\n container,\n chart,\n () => Boolean(autoresize.value),\n () => getOptions()?.throttle ?? 100,\n ] as const;\n\n return watch(\n resizeSources,\n ([container, chart, enabled, wait], _, onCleanup) => {\n if (!chart || !container || !enabled) {\n return;\n }\n\n let observedWidth = chart.getWidth();\n let observedHeight = chart.getHeight();\n\n const resize = () => {\n if (\n hasZeroDimension(observedWidth, observedHeight) ||\n (observedWidth === chart.getWidth() && observedHeight === chart.getHeight())\n ) {\n return;\n }\n chart.resize();\n getOptions()?.onResize?.();\n };\n const throttledResize = wait ? throttle(resize, wait) : undefined;\n\n const observer = new ResizeObserver(([entry]) => {\n observedWidth = entry.contentRect.width;\n observedHeight = entry.contentRect.height;\n (throttledResize ?? resize)();\n });\n\n observer.observe(container);\n onCleanup(() => {\n observer.disconnect();\n throttledResize?.clear();\n });\n },\n // Stop observer work before the outgoing chart can be disposed.\n { flush: \"sync\" },\n );\n}\n\nexport const autoresizeProps = {\n autoresize: [Boolean, Object] as PropType<AutoResize>,\n};\n","import { inject, toValue, watch } from \"vue\";\n\nimport type { Ref, InjectionKey, PropType } from \"vue\";\nimport type { EChartsType, LoadingOptions, LoadingOptionsInjection } from \"../types\";\n\nexport const LOADING_OPTIONS_KEY: InjectionKey<LoadingOptionsInjection> = Symbol();\n\nexport function useLoading(\n chart: Ref<EChartsType | undefined>,\n loading: Ref<boolean | undefined>,\n loadingType: Ref<string | undefined>,\n loadingOptions: Ref<LoadingOptions | undefined>,\n): () => void {\n const defaultLoadingOptions = inject(LOADING_OPTIONS_KEY, undefined);\n\n return watch(\n // Track chart availability without including its internals in deep traversal.\n () =>\n chart.value && loading.value\n ? {\n type: loadingType.value || undefined,\n options: {\n ...toValue(defaultLoadingOptions),\n ...loadingOptions.value,\n },\n }\n : null,\n (state) => {\n const instance = chart.value;\n if (!instance) {\n return;\n }\n\n if (!state) {\n instance.hideLoading();\n return;\n }\n\n const { type, options } = state;\n if (type) {\n instance.showLoading(type, options);\n } else {\n instance.showLoading(options);\n }\n },\n { deep: true, immediate: true, flush: \"sync\" },\n );\n}\n\nexport const loadingProps = {\n loading: Boolean,\n loadingType: String,\n loadingOptions: Object as PropType<LoadingOptions>,\n};\n","import {\n getCurrentInstance,\n h,\n Teleport,\n onUpdated,\n onMounted,\n shallowRef,\n shallowReactive,\n} from \"vue\";\nimport type { Slots as VueSlots, SlotsType as VueSlotsType } from \"vue\";\nimport type { Option } from \"../types\";\nimport { isPlainObject, isValidArrayIndex, warn } from \"../utils\";\nimport type { TooltipComponentFormatterCallbackParams } from \"echarts\";\nimport type { VChartSlotsExtension } from \"../index\";\n\nconst SLOT_OPTION_PATHS = {\n tooltip: [\"tooltip\", \"formatter\"],\n dataView: [\"toolbox\", \"feature\", \"dataView\", \"optionToContent\"],\n} as const;\nconst PROTOTYPE_SEGMENT_RE = /-__proto__(?:-|$)/;\ntype SlotPrefix = keyof typeof SLOT_OPTION_PATHS;\ntype SlotName = SlotPrefix | `${SlotPrefix}-${string}`;\ntype SlotMap<T> = Partial<Record<SlotName, T>>;\n\nfunction isValidSlotName(key: string): key is SlotName {\n return (\n (key === \"tooltip\" ||\n key.startsWith(\"tooltip-\") ||\n key === \"dataView\" ||\n key.startsWith(\"dataView-\")) &&\n !key.endsWith(\"-\") &&\n !key.includes(\"--\") &&\n !PROTOTYPE_SEGMENT_RE.test(key)\n );\n}\n\nfunction getSlotPath(key: SlotName): string[] {\n const prefix: SlotPrefix = key.startsWith(\"tooltip\") ? \"tooltip\" : \"dataView\";\n const rest = key.slice(prefix.length);\n const path = rest ? rest.slice(1).split(\"-\") : [];\n const target = SLOT_OPTION_PATHS[prefix];\n if (isValidArrayIndex(path[0] ?? \"\")) {\n const index = path.shift()!;\n path.push(target[0], index, ...target.slice(1));\n } else {\n path.push(...target);\n }\n return path;\n}\n\ntype Container = Record<string, unknown> | unknown[];\n\nfunction ensureChild(\n parent: Container,\n seg: string,\n nextSeg: string,\n writable: WeakSet<Container>,\n): Container | undefined {\n const parentIsArray = Array.isArray(parent);\n if (parentIsArray !== isValidArrayIndex(seg)) {\n return undefined;\n }\n const next = parentIsArray ? parent[Number(seg)] : parent[seg];\n\n let child: Container;\n if (Array.isArray(next)) {\n child = writable.has(next) ? next : [...next];\n } else if (isPlainObject(next)) {\n child = writable.has(next) ? next : { ...next };\n } else if (next === undefined && !parentIsArray && !isValidArrayIndex(nextSeg)) {\n child = {};\n } else {\n return undefined;\n }\n writable.add(child);\n writeSegment(parent, seg, child);\n return child;\n}\n\nfunction writeSegment(parent: Container, seg: string, value: unknown): void {\n if (Array.isArray(parent)) {\n parent[Number(seg)] = value;\n return;\n }\n parent[seg] = value;\n}\n\nfunction writePath(\n root: Option,\n path: readonly string[],\n value: unknown,\n writable: WeakSet<Container>,\n preserveDefined = false,\n): boolean {\n let current: Container = root;\n for (let i = 0; i < path.length - 1; i++) {\n const child = ensureChild(current, path[i], path[i + 1], writable);\n if (!child) {\n return false;\n }\n current = child;\n }\n if (Array.isArray(current)) {\n return false;\n }\n const leaf = path[path.length - 1];\n if (!preserveDefined || current[leaf] === undefined) {\n writeSegment(current, leaf, value);\n }\n return true;\n}\n\nexport function useSlotOption(slots: VueSlots, onSlotsChange: () => void) {\n const instance = getCurrentInstance()!;\n let detachedRoot: HTMLDivElement | undefined;\n const containers = shallowReactive<SlotMap<HTMLElement>>({});\n const params = shallowReactive<SlotMap<unknown>>({});\n const isMounted = shallowRef(false);\n const ready = shallowRef(false);\n\n const collectSlotNames = (warnInvalid = false): Set<SlotName> => {\n const names = new Set<SlotName>();\n for (const key in slots) {\n if (key === \"graphic\") {\n continue;\n }\n if (isValidSlotName(key)) {\n names.add(key);\n } else if (warnInvalid) {\n warn(`Invalid slot name: ${key}`);\n }\n }\n return names;\n };\n collectSlotNames(true);\n\n let slotNames: ReadonlySet<SlotName> = new Set();\n let nextSlotNames = slotNames;\n const patchedSlotNames = new Set<SlotName>();\n const callbacks = new Map<\n SlotName,\n { path: string[]; formatter: (payload: unknown) => HTMLElement | undefined }\n >();\n\n function setReady(value: boolean): void {\n ready.value = value;\n if (value) {\n return;\n }\n patchedSlotNames.clear();\n for (const key of Object.keys(params) as SlotName[]) {\n delete params[key];\n }\n }\n\n function syncSlotNames(names: ReadonlySet<SlotName>): boolean {\n let changed = names.size !== slotNames.size;\n for (const key of slotNames) {\n if (!names.has(key)) {\n changed = true;\n delete params[key];\n delete containers[key];\n callbacks.delete(key);\n }\n }\n if (changed) {\n slotNames = names;\n }\n return changed;\n }\n\n const render = () => {\n nextSlotNames = collectSlotNames();\n if (nextSlotNames.size === 0 || !ready.value || !isMounted.value) {\n return undefined;\n }\n const ownerDocument = (instance.vnode.el as HTMLElement).ownerDocument;\n detachedRoot ??= ownerDocument.createElement(\"div\");\n\n return h(\n Teleport,\n { to: detachedRoot },\n Array.from(nextSlotNames, (slotName) => {\n const slot = slots[slotName];\n const slotContent = slotName in params ? slot?.(params[slotName]) : undefined;\n return h(\n \"div\",\n {\n key: slotName,\n ref: (el) => {\n if (el) {\n containers[slotName] = el as HTMLElement;\n } else {\n delete containers[slotName];\n }\n },\n style: { display: \"contents\" },\n },\n slotContent,\n );\n }),\n );\n };\n\n function prepare(src: Option): { option: Option; commit: () => void } {\n const names = collectSlotNames();\n syncSlotNames(names);\n // Shared callback paths only clone each container once per submission.\n const writable = new WeakSet<Container>();\n let root: Option | undefined;\n\n for (const key of patchedSlotNames) {\n if (!names.has(key)) {\n root ??= { ...src };\n writePath(root, getSlotPath(key), null, writable, true);\n }\n }\n\n const patchedNames: SlotName[] = [];\n\n for (const key of names) {\n root ??= { ...src };\n let callback = callbacks.get(key);\n if (!callback) {\n const formatter = (payload: unknown): HTMLElement | undefined => {\n if (!slots[key]) {\n return undefined;\n }\n // ECharts may update and reuse the same formatter payload object.\n if (key in params && Object.is(params[key], payload)) {\n delete params[key];\n }\n params[key] = payload;\n return containers[key];\n };\n callback = { path: getSlotPath(key), formatter };\n callbacks.set(key, callback);\n }\n\n if (!writePath(root, callback.path, callback.formatter, writable)) {\n continue;\n }\n patchedNames.push(key);\n }\n\n return {\n option: root ?? src,\n commit: () => {\n // Native theme changes can replay callbacks from an older option backup.\n // Keep their cleanup paths until the chart instance is replaced.\n patchedNames.forEach((name) => patchedSlotNames.add(name));\n },\n };\n }\n\n onUpdated(() => {\n if (syncSlotNames(nextSlotNames)) {\n onSlotsChange();\n }\n });\n\n onMounted(() => {\n slotNames = nextSlotNames;\n isMounted.value = true;\n });\n\n return {\n render,\n prepare,\n setReady,\n cancelPendingUpdate: () => {\n // A queued updated hook must not replay slot changes preceding clear().\n syncSlotNames(collectSlotNames());\n },\n };\n}\n\n/** Vue SlotsType metadata for VChart, including VChartSlotsExtension augmentations. */\nexport type Slots = VueSlotsType<\n Record<\"tooltip\" | `tooltip-${string}`, TooltipComponentFormatterCallbackParams> &\n Record<\"dataView\" | `dataView-${string}`, Option> &\n VChartSlotsExtension\n>;\n","export const TAG_NAME = \"x-vue-echarts\";\n// Shared across bundles so one copy can trust another copy's disconnect hook.\nconst LIFECYCLE_MARKER = Symbol.for(\"vue-echarts.lifecycle\");\n\ntype LifecycleConstructor = CustomElementConstructor & {\n [LIFECYCLE_MARKER]?: true;\n};\n\nexport interface EChartsElement extends HTMLElement {\n __dispose: (() => void) | null;\n}\n\nexport function register(): boolean {\n const registry = globalThis.customElements;\n\n if (!registry) {\n return false;\n }\n\n const existing = registry.get(TAG_NAME);\n if (existing) {\n return Boolean((existing as LifecycleConstructor)[LIFECYCLE_MARKER]);\n }\n\n class ECElement extends HTMLElement implements EChartsElement {\n __dispose: (() => void) | null = null;\n\n disconnectedCallback(): void {\n if (!this.__dispose) {\n return;\n }\n queueMicrotask(() => {\n if (!this.isConnected && this.__dispose) {\n const dispose = this.__dispose;\n this.__dispose = null;\n dispose();\n }\n });\n }\n }\n\n Object.defineProperty(ECElement, LIFECYCLE_MARKER, { value: true });\n registry.define(TAG_NAME, ECElement);\n return true;\n}\n","import { getCurrentInstance, onScopeDispose, onUpdated, watchSyncEffect } from \"vue\";\n\nimport type { Ref } from \"vue\";\nimport type { EChartsType } from \"../types\";\nimport { createEventInvoker, hasEventHandler, isOn, parseOnEvent } from \"../utils\";\nimport type { AttrMap, EventHandler } from \"../utils\";\n\ntype EventEmitter = {\n on: (event: string, handler: EventHandler) => void;\n off: (event: string, handler: EventHandler) => void;\n};\n\ntype ListenerBinding = {\n emitter: EventEmitter;\n event: string;\n source: unknown;\n handler: EventHandler;\n};\n\nconst NATIVE_EVENT_PREFIX = \"onNative:\";\n\nexport function useReactiveChartListeners(\n chart: Ref<EChartsType | undefined>,\n attrs: AttrMap,\n): { sync: () => void; stop: () => void } {\n const bindings = new Map<string, ListenerBinding>();\n const consumedSources = new Map<string, unknown>();\n const seen = new Set<string>();\n let boundChart: EChartsType | undefined;\n\n function clearBindings(): void {\n for (const binding of bindings.values()) {\n binding.emitter.off(binding.event, binding.handler);\n }\n bindings.clear();\n }\n\n function sync(): void {\n seen.clear();\n const instance = chart.value;\n for (const [key, source] of consumedSources) {\n if (attrs[key] !== source) {\n consumedSources.delete(key);\n }\n }\n if (!instance) {\n clearBindings();\n boundChart = undefined;\n return;\n }\n\n if (boundChart && boundChart !== instance) {\n clearBindings();\n }\n boundChart = instance;\n\n for (const key in attrs) {\n const parsed = parseOnEvent(key);\n if (!parsed || parsed.event.startsWith(\"native:\") || parsed.event === \"zr:\") {\n continue;\n }\n\n const zr = parsed.event.startsWith(\"zr:\");\n const event = (zr ? parsed.event.slice(3) : parsed.event).toLowerCase();\n const source = attrs[key];\n const existing = bindings.get(key);\n\n if (parsed.once && consumedSources.get(key) === source) {\n continue;\n }\n\n if (existing && existing.source === source && hasEventHandler(source)) {\n seen.add(key);\n continue;\n }\n\n const invoke = createEventInvoker(source);\n if (existing) {\n existing.emitter.off(existing.event, existing.handler);\n bindings.delete(key);\n }\n\n if (!invoke) {\n continue;\n }\n\n const emitter = zr ? (instance.getZr() as EventEmitter) : (instance as EventEmitter);\n let handler = invoke;\n if (parsed.once) {\n handler = (...args): void => {\n bindings.delete(key);\n consumedSources.set(key, source);\n emitter.off(event, handler);\n invoke(...args);\n };\n }\n\n emitter.on(event, handler);\n bindings.set(key, {\n emitter,\n event,\n source,\n handler,\n });\n seen.add(key);\n }\n\n for (const [key, binding] of bindings) {\n if (seen.has(key)) {\n continue;\n }\n binding.emitter.off(binding.event, binding.handler);\n bindings.delete(key);\n }\n }\n\n const stopWatch = watchSyncEffect(sync);\n if (getCurrentInstance()) {\n onUpdated(sync);\n }\n\n const stop = () => {\n stopWatch();\n clearBindings();\n };\n onScopeDispose(stop);\n return { sync, stop };\n}\n\nexport function getRootAttrs(attrs: AttrMap): AttrMap {\n const result: AttrMap = {};\n\n for (const key in attrs) {\n if (key.startsWith(NATIVE_EVENT_PREFIX)) {\n const event = key.slice(NATIVE_EVENT_PREFIX.length);\n if (event) {\n result[`on:${event}`] = attrs[key];\n }\n continue;\n }\n if (!isOn(key)) {\n result[key] = attrs[key];\n }\n }\n\n return result;\n}\n","export default \"x-vue-echarts{display:block;width:100%;height:100%;min-width:0;min-height:0;}\\nx-vue-echarts>.echarts-host{display:block;width:100%;height:100%;min-width:0;border-radius:inherit;}\\nx-vue-echarts>.echarts-host>:first-child,x-vue-echarts>.echarts-host>:first-child>canvas{border-radius:inherit;}\\n\"","import cssRules from \"./style.css?raw\";\nimport { isBrowser } from \"./utils\";\n\nif (isBrowser()) {\n if (Array.isArray(document.adoptedStyleSheets) && \"replaceSync\" in CSSStyleSheet.prototype) {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(cssRules);\n document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];\n } else {\n const styleEl = document.createElement(\"style\");\n styleEl.textContent = cssRules;\n document.head.appendChild(styleEl);\n }\n}\n","import {\n defineComponent,\n shallowRef,\n toRef,\n watch,\n computed,\n inject,\n onMounted,\n onBeforeUnmount,\n h,\n nextTick,\n watchSyncEffect,\n toValue,\n} from \"vue\";\nimport { init as initChart } from \"echarts/core\";\n\nimport type { InjectionKey, PropType, VNodeChild } from \"vue\";\n\nimport { usePublicAPI, type PublicMethods } from \"./composables/api\";\nimport { useAutoresize, autoresizeProps } from \"./composables/autoresize\";\nimport { useLoading, loadingProps } from \"./composables/loading\";\nimport { useSlotOption, type Slots } from \"./composables/slot\";\nimport { hasZeroDimension, isIgnorableWatchChange, warn } from \"./utils\";\nimport { register, TAG_NAME } from \"./wc\";\nimport { useRuntime as useGraphic } from \"./graphic/runtime\";\nimport { useReactiveChartListeners, getRootAttrs } from \"./core/events\";\nimport { planUpdate } from \"./update\";\nimport type { Signature } from \"./update\";\n\nimport type {\n EChartsType,\n SetOptionType,\n Option,\n Theme,\n ThemeInjection,\n InitOptions,\n InitOptionsInjection,\n UpdateOptions,\n UpdateOptionsInjection,\n Emits,\n Component,\n} from \"./types\";\nimport type { EChartsElement } from \"./wc\";\n\nimport \"./style\";\n\nconst wcRegistered = register();\nconst SKIP_AUTO_UPDATE = Symbol();\ntype ApplyMode = \"manual\" | \"graphic\";\nenum UpdateReason {\n Option = 1,\n Graphic = 2,\n Theme = 4,\n Reinit = 8,\n}\n\nexport const THEME_KEY: InjectionKey<ThemeInjection> = Symbol();\nexport const INIT_OPTIONS_KEY: InjectionKey<InitOptionsInjection> = Symbol();\nexport const UPDATE_OPTIONS_KEY: InjectionKey<UpdateOptionsInjection> = Symbol();\nexport { LOADING_OPTIONS_KEY } from \"./composables/loading\";\n\nconst chartProps = {\n option: Object as PropType<Option>,\n theme: {\n type: [Object, String] as PropType<Theme>,\n },\n initOptions: Object as PropType<InitOptions>,\n updateOptions: Object as PropType<UpdateOptions>,\n group: String,\n manualUpdate: Boolean,\n ...autoresizeProps,\n ...loadingProps,\n};\n\n/** Methods and read-only state exposed by VChart through a template ref. */\nexport type Exposed = {\n setOption: SetOptionType;\n readonly root: HTMLElement | undefined;\n readonly chart: EChartsType | undefined;\n} & PublicMethods;\n\nconst ECharts = /* @__PURE__ */ defineComponent({\n name: \"Echarts\",\n inheritAttrs: false,\n props: chartProps,\n emits: {} as Emits,\n slots: Object as Slots,\n setup(props, { attrs, expose, slots }) {\n const root = shallowRef<EChartsElement>();\n const chartHost = shallowRef<HTMLDivElement>();\n const chart = shallowRef<EChartsType>();\n const updateRequest = shallowRef(0);\n let pendingUpdate = 0;\n const defaultTheme = inject(THEME_KEY, null);\n const defaultInitOptions = inject(INIT_OPTIONS_KEY, null);\n const defaultUpdateOptions = inject(UPDATE_OPTIONS_KEY, null);\n\n const autoresize = toRef(props, \"autoresize\");\n const manualUpdate = toRef(props, \"manualUpdate\");\n const loading = toRef(props, \"loading\");\n const loadingType = toRef(props, \"loadingType\");\n const loadingOptions = toRef(props, \"loadingOptions\");\n\n const realTheme = computed(() => props.theme ?? toValue(defaultTheme) ?? undefined);\n const realInitOptions = computed(\n () => props.initOptions ?? toValue(defaultInitOptions) ?? undefined,\n );\n const realUpdateOptions = computed(() => props.updateOptions ?? toValue(defaultUpdateOptions));\n\n const terminallyDisposed = shallowRef(false);\n\n const {\n render: renderSlot,\n prepare: prepareSlots,\n setReady: setSlotsReady,\n cancelPendingUpdate: cancelSlotUpdate,\n } = useSlotOption(slots, requestUpdate);\n\n const graphic = useGraphic({\n slots,\n manualUpdate,\n requestUpdate: () => requestUpdate(UpdateReason.Graphic),\n });\n\n // `null` means the model has no trusted signature, so the next smart update must rebuild.\n let lastSignature: Signature | null | undefined;\n let lastAutoOption: Option | undefined;\n let themeApplied = false;\n let optionApplied = false;\n let initDeferred = false;\n let graphicSlotApplied = false;\n let updateRevision = 0;\n let modelValid = false;\n\n function getAutoOption(): Option | undefined {\n // A graphic slot is a complete option source even without an `option` prop.\n return props.option ?? (graphic && (slots.graphic || graphicSlotApplied) ? {} : undefined);\n }\n\n function isCurrent(instance: EChartsType | undefined): instance is EChartsType {\n return instance !== undefined && chart.value === instance && !terminallyDisposed.value;\n }\n\n function runUpdate(\n instance: EChartsType,\n update: () => void,\n signature: Signature | null | undefined,\n ): boolean {\n const revision = ++updateRevision;\n // A failed native call may have partially changed the model. Only a successful,\n // uninterrupted submission can establish a new smart-update baseline.\n lastSignature = null;\n modelValid = false;\n update();\n if (!isCurrent(instance) || updateRevision !== revision) {\n return false;\n }\n lastSignature = signature;\n modelValid = true;\n return true;\n }\n\n function applyTheme(instance: EChartsType): boolean {\n // ECharts ignores setTheme until its first option creates the chart model.\n if (!optionApplied || themeApplied) {\n return false;\n }\n syncListeners();\n const revision = updateRevision + 1;\n // Native update events can submit another option before setTheme returns.\n themeApplied = true;\n try {\n return runUpdate(\n instance,\n () => instance.setTheme(realTheme.value || {}),\n lastSignature === undefined ? undefined : null,\n );\n } catch (error) {\n if (updateRevision === revision) {\n themeApplied = false;\n }\n throw error;\n }\n }\n\n function applyOption(\n instance: EChartsType,\n option: Option,\n mode?: ApplyMode,\n manualOptions?: UpdateOptions,\n ): void {\n const manual = mode === \"manual\";\n initDeferred = false;\n const preparedSlots = prepareSlots(option);\n const slotted = preparedSlots.option;\n const hasGraphicSlot = Boolean(graphic && slots.graphic);\n let updateOptions = manual ? manualOptions : (realUpdateOptions.value ?? undefined);\n let nextSignature: Signature | null = null;\n\n const graphicOnly = mode === \"graphic\" && hasGraphicSlot && graphicSlotApplied && modelValid;\n if (graphicOnly) {\n nextSignature = lastSignature ?? null;\n } else if (!manual && !updateOptions) {\n // An owned graphic tree is planned separately from the source it overrides.\n const source = hasGraphicSlot ? { ...slotted, graphic: undefined } : slotted;\n const planned = planUpdate(lastSignature ?? undefined, source);\n const rebuild = !planned.signature.hasAction && lastSignature === null;\n updateOptions = rebuild ? { ...planned.plan, notMerge: true } : planned.plan;\n nextSignature = planned.signature;\n }\n\n const replaceMerge = updateOptions?.replaceMerge;\n const replacements = typeof replaceMerge === \"string\" ? [replaceMerge] : (replaceMerge ?? []);\n const preparedGraphic = graphic?.prepare(\n slotted,\n !modelValid ||\n !graphicSlotApplied ||\n Boolean(updateOptions?.notMerge) ||\n replacements.includes(\"graphic\") ||\n manual,\n );\n let patched = preparedGraphic?.option ?? slotted;\n const replaceGraphic = preparedGraphic?.replace || (graphicSlotApplied && !hasGraphicSlot);\n if (replaceGraphic && !updateOptions?.notMerge && !replacements.includes(\"graphic\")) {\n updateOptions = { ...updateOptions, replaceMerge: [...replacements, \"graphic\"] };\n }\n const replacesSource = replacements.some((key) => key !== \"graphic\");\n if (graphicOnly && !updateOptions?.notMerge && !replacesSource) {\n patched = { graphic: patched.graphic };\n }\n syncListeners();\n if (!runUpdate(instance, () => instance.setOption(patched, updateOptions), nextSignature)) {\n return;\n }\n preparedSlots.commit();\n preparedGraphic?.commit();\n graphicSlotApplied = hasGraphicSlot;\n optionApplied = true;\n if (!manual) {\n lastAutoOption = option;\n }\n if (applyTheme(instance) && !manual) {\n applyOption(instance, option);\n }\n }\n\n function scheduleUpdate(reason: UpdateReason): void {\n pendingUpdate |= reason;\n updateRequest.value++;\n }\n\n function requestUpdate(reason = UpdateReason.Option): void {\n if (!manualUpdate.value && !initDeferred && !terminallyDisposed.value) {\n scheduleUpdate(reason);\n }\n }\n\n function flushUpdate(): void {\n const reasons = pendingUpdate;\n pendingUpdate = 0;\n const instance = chart.value;\n if (!reasons || !isCurrent(instance)) {\n return;\n }\n if (reasons & UpdateReason.Reinit) {\n cleanup();\n init();\n return;\n }\n if (initDeferred) {\n return;\n }\n\n const option =\n reasons & (UpdateReason.Option | UpdateReason.Graphic)\n ? (getAutoOption() ?? lastAutoOption)\n : lastAutoOption;\n const needsTheme = !themeApplied && optionApplied;\n if (needsTheme && !applyTheme(instance)) {\n return;\n }\n if (!manualUpdate.value && option) {\n const graphicOnly = reasons === UpdateReason.Graphic && !needsTheme;\n applyOption(instance, option, graphicOnly ? \"graphic\" : undefined);\n }\n }\n\n if (slots.graphic && !graphic) {\n warn(\n \"Detected `#graphic` slot but no extension is registered. Import from `vue-echarts/graphic` to enable it.\",\n );\n }\n\n const { sync: syncListeners, stop: stopListeners } = useReactiveChartListeners(chart, attrs);\n\n function cleanup(): void {\n pendingUpdate = 0;\n graphic?.cancelPendingFlush();\n updateRevision++;\n const instance = chart.value;\n chart.value = undefined;\n setSlotsReady(false);\n lastSignature = undefined;\n modelValid = false;\n lastAutoOption = undefined;\n initDeferred = false;\n graphicSlotApplied = false;\n instance?.dispose();\n }\n\n function init(): void {\n pendingUpdate = 0;\n optionApplied = false;\n\n const host = chartHost.value as HTMLDivElement;\n const instance = initChart(host, realTheme.value, realInitOptions.value);\n chart.value = instance;\n if (!isCurrent(instance)) {\n return;\n }\n themeApplied = true;\n\n function commit(): void {\n const option = manualUpdate.value ? props.option : getAutoOption();\n if (option) {\n if (manualUpdate.value) {\n applyOption(instance, option, \"manual\", realUpdateOptions.value ?? undefined);\n } else {\n applyOption(instance, option);\n }\n }\n setSlotsReady(isCurrent(instance));\n }\n\n if (autoresize.value) {\n initDeferred = true;\n nextTick(() => {\n if (!isCurrent(instance)) {\n return;\n }\n if (autoresize.value && !hasZeroDimension(host.offsetWidth, host.offsetHeight)) {\n instance.resize();\n if (!isCurrent(instance)) {\n return;\n }\n }\n if (initDeferred) {\n initDeferred = false;\n commit();\n } else {\n setSlotsReady(true);\n }\n });\n return;\n }\n\n commit();\n }\n\n const setOption: SetOptionType = (option, notMerge, lazyUpdate?: boolean) => {\n if (!props.manualUpdate) {\n warn(\"`setOption` is only available when `manual-update` is `true`.\");\n return;\n }\n\n const instance = chart.value;\n if (!isCurrent(instance)) {\n return;\n }\n\n const updateOptions =\n typeof notMerge === \"boolean\"\n ? { notMerge, lazyUpdate }\n : (notMerge ?? (lazyUpdate === undefined ? undefined : { lazyUpdate }));\n\n applyOption(instance, option, \"manual\", updateOptions);\n };\n\n // Mark synchronously so later batched replacements cannot mask nested changes.\n const stopThemeWatch = watch(\n realTheme,\n (theme, previousTheme) => {\n if (isIgnorableWatchChange(theme, previousTheme)) {\n return;\n }\n themeApplied = false;\n scheduleUpdate(UpdateReason.Theme);\n },\n { deep: true, flush: \"sync\" },\n );\n\n const stopInitOptionsWatch = watch(\n realInitOptions,\n (options, previousOptions) => {\n if (!isIgnorableWatchChange(options, previousOptions)) {\n scheduleUpdate(UpdateReason.Reinit);\n }\n },\n { deep: true, flush: \"sync\" },\n );\n\n function watchOption() {\n return watch(\n () => (manualUpdate.value ? SKIP_AUTO_UPDATE : props.option),\n (option, previousOption) => {\n if (\n option !== SKIP_AUTO_UPDATE &&\n previousOption !== SKIP_AUTO_UPDATE &&\n (option ?? getAutoOption())\n ) {\n requestUpdate();\n }\n },\n // Batch deep traversal, then submit after Vue has prepared slot containers and graphic nodes.\n { deep: true },\n );\n }\n let stopOptionWatch = watchOption();\n const stopModeWatch = watch(manualUpdate, () => scheduleUpdate(UpdateReason.Reinit), {\n flush: \"sync\",\n });\n const stopUpdateWatch = watch(updateRequest, flushUpdate, { flush: \"post\" });\n\n const stopGroupWatch = watchSyncEffect(() => {\n const instance = chart.value;\n if (isCurrent(instance)) {\n instance.group = props.group ?? \"\";\n }\n });\n const stopLoading = useLoading(chart, loading, loadingType, loadingOptions);\n const stopAutoresize = useAutoresize(chart, autoresize, chartHost);\n\n function dispose(): void {\n if (terminallyDisposed.value) {\n return;\n }\n terminallyDisposed.value = true;\n stopThemeWatch();\n stopInitOptionsWatch();\n stopOptionWatch();\n stopModeWatch();\n stopUpdateWatch();\n stopGroupWatch();\n stopLoading();\n stopAutoresize();\n stopListeners();\n cleanup();\n }\n\n const publicApi = usePublicAPI(chart, dispose, () => terminallyDisposed.value);\n const guardedClear = publicApi.clear;\n publicApi.clear = () => {\n const instance = chart.value;\n if (!isCurrent(instance)) {\n return guardedClear();\n }\n initDeferred = false;\n pendingUpdate = 0;\n graphic?.cancelPendingFlush();\n cancelSlotUpdate();\n // Drop earlier queued source changes while observing changes made inside clear's events.\n stopOptionWatch();\n stopOptionWatch = watchOption();\n if (runUpdate(instance, () => instance.clear(), undefined)) {\n lastAutoOption = undefined;\n graphicSlotApplied = false;\n optionApplied = true;\n }\n };\n\n onMounted(() => {\n if (!terminallyDisposed.value) {\n init();\n }\n });\n\n onBeforeUnmount(() => {\n stopOptionWatch();\n if (terminallyDisposed.value) {\n return;\n }\n terminallyDisposed.value = true;\n const element = root.value;\n if (wcRegistered && element?.isConnected && element.__dispose === null) {\n element.__dispose = cleanup;\n return;\n }\n\n cleanup();\n });\n\n const exposed = {\n setOption,\n get root(): HTMLElement | undefined {\n return root.value ?? undefined;\n },\n get chart() {\n const instance = chart.value;\n return isCurrent(instance) ? instance : undefined;\n },\n };\n expose(Object.assign(exposed, publicApi));\n\n return (() => {\n const children: VNodeChild[] = [\n h(\"div\", {\n ref: chartHost,\n class: \"echarts-host\",\n }),\n ];\n\n if (!terminallyDisposed.value) {\n const teleported = renderSlot();\n if (teleported) {\n children.push(teleported);\n }\n\n const graphicContent = graphic?.render();\n if (graphicContent) {\n children.push(graphicContent);\n }\n }\n\n const forwardedAttrs = getRootAttrs(attrs);\n\n return h(\n TAG_NAME,\n {\n ...forwardedAttrs,\n ref: root,\n class: [\"echarts\", forwardedAttrs.class],\n },\n children,\n );\n }) as unknown as typeof exposed & PublicMethods;\n },\n}) as Component<typeof chartProps, Exposed, Emits, Slots>;\n\nexport default ECharts;\n","import ECharts from \"./ECharts\";\nimport type { Slot } from \"vue\";\n\nexport interface VChartSlotsExtension {\n graphic?: Slot;\n}\n\nexport default ECharts;\nexport * from \"./ECharts\";\nexport type { AutoResize, LoadingOptions, Component } from \"./types\";\nexport type { Slots } from \"./composables/slot\";\n"],"mappings":";;;;AAGA,MAAM,eAAe;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAMA,SAAgB,aACd,OACA,SACA,YACe;CACf,MAAM,oBAAiC;EACrC,IAAI,WAAW,GACb,MAAM,IAAI,MAAM,4BAA4B;EAE9C,MAAM,WAAW,MAAM;EACvB,IAAI,CAAC,UACH,MAAM,IAAI,MAAM,iCAAiC;EAEnD,OAAO;CACT;CAEA,MAAM,MAAuD,CAAC;CAC9D,KAAK,MAAM,QAAQ,cACjB,IAAI,SAAS,GAAG,SAA6B;EAC3C,MAAM,WAAW,YAAY;EAC7B,OAAO,QAAQ,MAAM,SAAS,OAAO,UAAU,IAAI;CACrD;CAEF,IAAI,UAAU;CACd,IAAI,aAAa;CACjB,OAAO;AACT;;;ACrDA,SAAgB,cACd,OACA,YACA,WACY;CACZ,MAAM,mBAAoB,OAAO,WAAW,UAAU,WAAW,WAAW,QAAQ,KAAA;CAQpF,OAAO,MACL;EAPA;EACA;QACM,QAAQ,WAAW,KAAK;QACxB,WAAW,CAAC,EAAE,YAAY;CAIpB,IACX,CAAC,WAAW,OAAO,SAAS,OAAO,GAAG,cAAc;EACnD,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,SAC3B;EAGF,IAAI,gBAAgB,MAAM,SAAS;EACnC,IAAI,iBAAiB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