@quicktvui/naddons 1.0.0-rc.3 → 1.0.0-rc.5

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.
@@ -1,7 +1,10 @@
1
- import { defineComponent as w, ref as A, openBlock as P, createBlock as $, unref as D, mergeProps as B, withCtx as R, renderSlot as F, shallowRef as me, watch as ee, computed as W, resolveComponent as ge, createElementBlock as Z, normalizeStyle as fe, Fragment as Ke, renderList as He, onMounted as et, h as H, nextTick as tt, provide as ot, inject as nt } from "vue";
2
- import { Native as N } from "@extscreen/es3-vue";
3
- import { useES as Je, useESPlugin as at } from "@extscreen/es3-core";
4
- const be = "QtGridTabs", X = /* @__PURE__ */ w({
1
+ import { defineComponent as $, ref as A, openBlock as x, createBlock as O, unref as M, mergeProps as F, withCtx as Q, renderSlot as D, shallowRef as ve, watch as ee, computed as j, resolveComponent as de, createElementBlock as Z, normalizeStyle as fe, Fragment as _e, renderList as qe, onMounted as Me, h as H, nextTick as ze, provide as Le, inject as Ue } from "vue";
2
+ import { Native as I } from "@extscreen/es3-vue";
3
+ import { useES as Fe, useESPlugin as Ve } from "@extscreen/es3-core";
4
+ const We = {
5
+ inheritAttrs: !1
6
+ }, X = /* @__PURE__ */ $({
7
+ ...We,
5
8
  __name: "GridTabs",
6
9
  props: {
7
10
  protocolVersion: {},
@@ -10,122 +13,122 @@ const be = "QtGridTabs", X = /* @__PURE__ */ w({
10
13
  actionPayload: {}
11
14
  },
12
15
  emits: ["onTabSelected", "onTabClick", "onTabNeedsData", "onLoadMore", "onScroll", "onScrollStateChanged", "onItemPresence", "onTabFocused", "onItemClick", "onItemLongClick", "onItemFocused", "onProtocolMismatch"],
13
- setup(e, { expose: i }) {
14
- const d = A(), s = _(), f = be + "_Plugin", l = (s.isPluginActive ? f : be).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
15
- l,
16
- s.pluginPackageName || "com.quicktvui.plugin.glintui"
16
+ setup(e, { expose: a }) {
17
+ const d = A(), u = L(), v = "QtGridTabs", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
18
+ s,
19
+ u.pluginPackageName || "com.quicktvui.plugin.glintui"
17
20
  );
18
- return i({
21
+ return a({
19
22
  getNativeNode: () => {
20
- var a, u;
21
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
23
+ var l, i;
24
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
22
25
  },
23
- dispatchAction: (...a) => {
24
- var g, h;
25
- const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
26
- if (u)
27
- if (a.length > 0) {
28
- let C = a[0];
29
- typeof C == "object" && (C = JSON.stringify(C)), N.callUIFunction(u, "dispatchAction", [C]);
26
+ dispatchAction: (...l) => {
27
+ var f, p;
28
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
29
+ if (i)
30
+ if (l.length > 0) {
31
+ let w = l[0];
32
+ typeof w == "object" && (w = JSON.stringify(w)), I.callUIFunction(i, "dispatchAction", [w]);
30
33
  } else
31
- N.callUIFunction(u, "dispatchAction", a);
34
+ I.callUIFunction(i, "dispatchAction", l);
32
35
  },
33
- scrollToTop: (...a) => {
34
- var g, h;
35
- const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
36
- u && N.callUIFunction(u, "scrollToTop", a);
36
+ scrollToTop: (...l) => {
37
+ var f, p;
38
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
39
+ i && I.callUIFunction(i, "scrollToTop", l);
37
40
  },
38
- getFocusState: (...a) => {
39
- var g, h;
40
- const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
41
- u && N.callUIFunction(u, "getFocusState", a);
41
+ getFocusState: (...l) => {
42
+ var f, p;
43
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
44
+ i && I.callUIFunction(i, "getFocusState", l);
42
45
  },
43
- getItemRect: (...a) => {
44
- var g, h;
45
- const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
46
- u && N.callUIFunction(u, "getItemRect", a);
46
+ getItemRect: (...l) => {
47
+ var f, p;
48
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
49
+ i && I.callUIFunction(i, "getItemRect", l);
47
50
  },
48
- requestFocus: (...a) => {
49
- var g, h;
50
- const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
51
- u && N.callUIFunction(u, "requestFocus", a);
51
+ requestFocus: (...l) => {
52
+ var f, p;
53
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
54
+ i && I.callUIFunction(i, "requestFocus", l);
52
55
  }
53
- }), (a, u) => (P(), $(D(r), B({
56
+ }), (l, i) => (x(), O(M(h), F({
54
57
  ref_key: "nativeRef",
55
58
  ref: d,
56
59
  protocolVersion: e.protocolVersion,
57
60
  pageSpec: e.pageSpec,
58
61
  tabsData: e.tabsData,
59
62
  actionPayload: e.actionPayload,
60
- onOnTabSelected: u[0] || (u[0] = (g) => a.$emit("onTabSelected", g.nativeEvent)),
61
- onOnTabClick: u[1] || (u[1] = (g) => a.$emit("onTabClick", g.nativeEvent)),
62
- onOnTabNeedsData: u[2] || (u[2] = (g) => a.$emit("onTabNeedsData", g.nativeEvent)),
63
- onOnLoadMore: u[3] || (u[3] = (g) => a.$emit("onLoadMore", g.nativeEvent)),
64
- onOnScroll: u[4] || (u[4] = (g) => a.$emit("onScroll", g.nativeEvent)),
65
- onOnScrollStateChanged: u[5] || (u[5] = (g) => a.$emit("onScrollStateChanged", g.nativeEvent)),
66
- onOnItemPresence: u[6] || (u[6] = (g) => a.$emit("onItemPresence", g.nativeEvent)),
67
- onOnTabFocused: u[7] || (u[7] = (g) => a.$emit("onTabFocused", g.nativeEvent)),
68
- onOnItemClick: u[8] || (u[8] = (g) => a.$emit("onItemClick", g.nativeEvent)),
69
- onOnItemLongClick: u[9] || (u[9] = (g) => a.$emit("onItemLongClick", g.nativeEvent)),
70
- onOnItemFocused: u[10] || (u[10] = (g) => a.$emit("onItemFocused", g.nativeEvent)),
71
- onOnProtocolMismatch: u[11] || (u[11] = (g) => a.$emit("onProtocolMismatch", g.nativeEvent))
72
- }, a.$attrs), {
73
- default: R(() => [
74
- F(a.$slots, "default")
63
+ onOnTabSelected: i[0] || (i[0] = (f) => l.$emit("onTabSelected", f.nativeEvent)),
64
+ onOnTabClick: i[1] || (i[1] = (f) => l.$emit("onTabClick", f.nativeEvent)),
65
+ onOnTabNeedsData: i[2] || (i[2] = (f) => l.$emit("onTabNeedsData", f.nativeEvent)),
66
+ onOnLoadMore: i[3] || (i[3] = (f) => l.$emit("onLoadMore", f.nativeEvent)),
67
+ onOnScroll: i[4] || (i[4] = (f) => l.$emit("onScroll", f.nativeEvent)),
68
+ onOnScrollStateChanged: i[5] || (i[5] = (f) => l.$emit("onScrollStateChanged", f.nativeEvent)),
69
+ onOnItemPresence: i[6] || (i[6] = (f) => l.$emit("onItemPresence", f.nativeEvent)),
70
+ onOnTabFocused: i[7] || (i[7] = (f) => l.$emit("onTabFocused", f.nativeEvent)),
71
+ onOnItemClick: i[8] || (i[8] = (f) => l.$emit("onItemClick", f.nativeEvent)),
72
+ onOnItemLongClick: i[9] || (i[9] = (f) => l.$emit("onItemLongClick", f.nativeEvent)),
73
+ onOnItemFocused: i[10] || (i[10] = (f) => l.$emit("onItemFocused", f.nativeEvent)),
74
+ onOnProtocolMismatch: i[11] || (i[11] = (f) => l.$emit("onProtocolMismatch", f.nativeEvent))
75
+ }, l.$attrs), {
76
+ default: Q(() => [
77
+ D(l.$slots, "default")
75
78
  ]),
76
79
  _: 3
77
80
  }, 16, ["protocolVersion", "pageSpec", "tabsData", "actionPayload"]));
78
81
  }
79
82
  });
80
83
  let te;
81
- var Fe;
84
+ var Se;
82
85
  try {
83
86
  const e = require("@extscreen/es3-vue");
84
- te = e.registerElement || ((Fe = e.default) == null ? void 0 : Fe.registerElement);
87
+ te = e.registerElement || ((Se = e.default) == null ? void 0 : Se.registerElement);
85
88
  } catch {
86
89
  }
87
- const it = {
90
+ const je = {
88
91
  install: (e) => {
89
92
  if (!globalThis.__QtGridTabs_registered)
90
93
  if (te) {
91
- const i = (d, s) => {
94
+ const a = (d, u) => {
92
95
  te(d, {
93
96
  component: {
94
- name: s ? "QtGridTabs_Plugin" : "QtGridTabs",
95
- processEventData(f, v) {
96
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
97
- return l && (l.nativeEvent = r), l;
97
+ name: u ? "QtGridTabs_Plugin" : "QtGridTabs",
98
+ processEventData(v, g) {
99
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
100
+ return c && (c.nativeEvent = s), c;
98
101
  }
99
102
  }
100
103
  });
101
104
  };
102
- i("qt-grid-tabs", !1), i("qt-grid-tabs-plugin", !0), i("QtGridTabs", !1), i("QtGridTabs_Plugin", !0), i("gt-tabs", !1), i("gt-tabs-plugin", !0), globalThis.__QtGridTabs_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtGridTabs");
105
+ a("qt-grid-tabs", !1), a("qt-grid-tabs-plugin", !0), a("QtGridTabs", !1), a("QtGridTabs_Plugin", !0), a("gt-tabs", !1), a("gt-tabs-plugin", !0), globalThis.__QtGridTabs_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtGridTabs");
103
106
  } else
104
107
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
105
108
  e.component("GridTabs", X), e.component("qt-grid-tabs", X), e.component("gt-tabs", X);
106
109
  }
107
110
  };
108
- function _t(e, i) {
109
- const d = A(""), s = i ? JSON.parse(JSON.stringify(i)) : {}, f = me([]), v = me([]);
110
- let l = !1, r = !1;
111
- const a = "__virtual_single_tab__";
112
- let u = "", g = !1;
113
- const h = A({}), C = (o) => {
111
+ function Rt(e, a) {
112
+ const d = A(""), u = a ? JSON.parse(JSON.stringify(a)) : {}, v = ve([]), g = ve([]);
113
+ let c = !1, s = !1;
114
+ const h = "__virtual_single_tab__";
115
+ let l = "", i = !1;
116
+ const f = A({}), p = (o) => {
114
117
  const t = Array.isArray(o) ? o : [o];
115
- if (r && e.value) {
118
+ if (s && e.value) {
116
119
  if (typeof e.value.dispatchAction == "function") {
117
120
  console.log("[useGridTabs] Calling Wrapper dispatchAction directly"), e.value.dispatchAction(t);
118
121
  return;
119
122
  }
120
123
  let n = e.value;
121
- typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), n ? (console.log("[useGridTabs] Calling Native callUIFunction dispatchAction fallback"), N.callUIFunction(n, "dispatchAction", [JSON.stringify(t)])) : console.warn("[useGridTabs] Native target is null or undefined, cannot call dispatchAction");
124
+ typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), n ? (console.log("[useGridTabs] Calling Native callUIFunction dispatchAction fallback"), I.callUIFunction(n, "dispatchAction", [JSON.stringify(t)])) : console.warn("[useGridTabs] Native target is null or undefined, cannot call dispatchAction");
122
125
  }
123
- }, z = (o, t) => {
126
+ }, w = (o, t) => {
124
127
  if (!o)
125
128
  return !1;
126
129
  let n = !0;
127
130
  return o.id || (console.error(`[useGridTabs] ❌ 数据格式错误 (${t}): 卡片缺失必填字段 'id'。每个卡片必须有唯一标识才能进行后续更新!`, o), n = !1), o.viewType || (console.error(`[useGridTabs] ❌ 数据格式错误 (${t}): 卡片缺失必填字段 'viewType' (id: ${o.id || "未知"})。必须指定 Native 注册的视图类型或 Portal 标识!`, o), n = !1), n;
128
- }, q = (o, t) => {
131
+ }, _ = (o, t) => {
129
132
  if (!o)
130
133
  return !1;
131
134
  let n = !0;
@@ -135,74 +138,74 @@ function _t(e, i) {
135
138
  return;
136
139
  U.clear();
137
140
  const n = o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items);
138
- l = t === "1d", t === "1d" && n ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : t === "2d" && !n && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), t === "1d" ? o.forEach((c, m) => z(c, `items.value[${m}]`)) : o.forEach((c, m) => {
139
- q(c, `tabs.value[${m}]`), c.items && Array.isArray(c.items) && c.items.forEach((y, b) => z(y, `tabs.value[${m}].items[${b}]`));
140
- }), r = !0, p();
141
- }, U = /* @__PURE__ */ new Set(), p = (o = "unknown") => {
142
- if (!r) {
141
+ c = t === "1d", t === "1d" && n ? console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `items.value` (一维瀑布流) 赋值二维 Tabs 数据结构!请改用 `tabs.value = ...`") : t === "2d" && !n && console.error("[useGridTabs] ❌ 赋值错误: 你正在向 `tabs.value` (二维导航) 赋值一维卡片列表数据结构!请改用 `items.value = ...`"), t === "1d" ? o.forEach((r, m) => w(r, `items.value[${m}]`)) : o.forEach((r, m) => {
142
+ _(r, `tabs.value[${m}]`), r.items && Array.isArray(r.items) && r.items.forEach((y, b) => w(y, `tabs.value[${m}].items[${b}]`));
143
+ }), s = !0, C();
144
+ }, U = /* @__PURE__ */ new Set(), C = (o = "unknown") => {
145
+ if (!s) {
143
146
  console.warn("[useGridTabs] triggerRootUpdate skipped because isInitialized is false");
144
147
  return;
145
148
  }
146
149
  let t = {
147
150
  protocolVersion: "1.28.0",
148
151
  // 新增:显式声明协议版本
149
- gridBasis: (s == null ? void 0 : s.gridBasis) ?? 30,
150
- unitType: (s == null ? void 0 : s.unitType) ?? "px",
151
- contentConfig: (s == null ? void 0 : s.contentConfig) ?? (s == null ? void 0 : s.layoutConfig) ?? {
152
+ gridBasis: (u == null ? void 0 : u.gridBasis) ?? 30,
153
+ unitType: (u == null ? void 0 : u.unitType) ?? "px",
154
+ contentConfig: (u == null ? void 0 : u.contentConfig) ?? (u == null ? void 0 : u.layoutConfig) ?? {
152
155
  box: { padding: [0, 60, 60, 60] },
153
156
  navContentGapNormal: 0,
154
157
  itemGap: 24
155
158
  },
156
- navConfig: (s == null ? void 0 : s.navConfig) ?? {
159
+ navConfig: (u == null ? void 0 : u.navConfig) ?? {
157
160
  dock: "left",
158
161
  mode: "fixed",
159
162
  renderType: "smart-hybrid",
160
163
  box: { size: [200, 0] },
161
164
  expandedBox: { size: [300, 0] }
162
165
  },
163
- cacheConfig: (s == null ? void 0 : s.cacheConfig) ?? {
166
+ cacheConfig: (u == null ? void 0 : u.cacheConfig) ?? {
164
167
  offscreenPageLimit: 1,
165
168
  prefetchOffset: 2,
166
169
  preLoadEnabled: !1,
167
170
  strategy: "data_priority"
168
171
  },
169
- animationConfig: (s == null ? void 0 : s.animationConfig) ?? {
172
+ animationConfig: (u == null ? void 0 : u.animationConfig) ?? {
170
173
  duration: 300,
171
174
  easing: "ease-out"
172
175
  },
173
- interactionStrategy: (s == null ? void 0 : s.interactionStrategy) ?? {
176
+ interactionStrategy: (u == null ? void 0 : u.interactionStrategy) ?? {
174
177
  defaultFocus: "nav",
175
178
  interceptBack: !0,
176
179
  backMode: "home-first",
177
180
  autoScrollToTop: !0,
178
181
  edgeScrollProtection: 0.5
179
182
  },
180
- focusConfig: (s == null ? void 0 : s.focusConfig) ?? {
183
+ focusConfig: (u == null ? void 0 : u.focusConfig) ?? {
181
184
  boundaryLock: { left: !1, right: !1, top: !1, bottom: !1 }
182
185
  },
183
- themeConfig: s == null ? void 0 : s.themeConfig,
184
- referenceResolution: (s == null ? void 0 : s.referenceResolution) ?? { w: 1920, h: 1080 }
186
+ themeConfig: u == null ? void 0 : u.themeConfig,
187
+ referenceResolution: (u == null ? void 0 : u.referenceResolution) ?? { w: 1920, h: 1080 }
185
188
  }, n = [];
186
- l ? (t.navConfig = { ...t.navConfig, renderType: "none" }, n = [
189
+ c ? (t.navConfig = { ...t.navConfig, renderType: "none" }, n = [
187
190
  {
188
- tabId: a,
191
+ tabId: h,
189
192
  title: "Virtual Tab",
190
193
  hidden: !0,
191
- items: v.value
194
+ items: g.value
192
195
  }
193
- ]) : n = f.value;
194
- const c = JSON.stringify({
196
+ ]) : n = v.value;
197
+ const r = JSON.stringify({
195
198
  page_spec: t,
196
199
  tabs: n
197
200
  });
198
201
  if (d.value === "")
199
- console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${c.length})`), d.value = c, u = c;
202
+ console.log(`[useGridTabs] triggerRootUpdate: Initializing tabsDataStr (length=${r.length})`), d.value = r, l = r;
200
203
  else {
201
- if (u === c) {
204
+ if (l === r) {
202
205
  console.log("[useGridTabs] triggerRootUpdate: Data unchanged, skipping RELOAD_TABS");
203
206
  return;
204
207
  }
205
- console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${c.length})`), d.value = c, u = c, C({
208
+ console.log(`[useGridTabs] triggerRootUpdate: Sending RELOAD_TABS action directly to Native (length=${r.length})`), d.value = r, l = r, p({
206
209
  op: "RELOAD_TABS",
207
210
  payload: {
208
211
  pageSpec: t,
@@ -212,23 +215,23 @@ function _t(e, i) {
212
215
  }
213
216
  });
214
217
  }
215
- }, I = (o) => {
218
+ }, T = (o) => {
216
219
  if (!o || typeof o != "object" || o.__isGridTabsProxy)
217
220
  return o;
218
221
  o.content && typeof o.content == "object" && !o.content.__isGridTabsProxy && (o.content = new Proxy(o.content, {
219
- set(n, c, m, y) {
220
- const b = Reflect.set(n, c, m, y);
221
- return o.id && r && C({
222
+ set(n, r, m, y) {
223
+ const b = Reflect.set(n, r, m, y);
224
+ return o.id && s && p({
222
225
  op: "UPDATE_ITEM",
223
226
  itemId: o.id,
224
227
  payload: o
225
228
  }), b;
226
229
  }
227
- }), Object.defineProperty(o.content, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.content, "__v_skip", { value: !0, enumerable: !1 })), o.subItems && Array.isArray(o.subItems) && !o.subItems.__isGridTabsProxy && (o.subItems = S(o.subItems, o.id), Object.defineProperty(o.subItems, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.subItems, "__v_skip", { value: !0, enumerable: !1 }));
230
+ }), Object.defineProperty(o.content, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.content, "__v_skip", { value: !0, enumerable: !1 })), o.subItems && Array.isArray(o.subItems) && !o.subItems.__isGridTabsProxy && (o.subItems = P(o.subItems, o.id), Object.defineProperty(o.subItems, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(o.subItems, "__v_skip", { value: !0, enumerable: !1 }));
228
231
  const t = new Proxy(o, {
229
- set(n, c, m, y) {
230
- const b = Reflect.set(n, c, m, y);
231
- return n.id && r && !g && C({
232
+ set(n, r, m, y) {
233
+ const b = Reflect.set(n, r, m, y);
234
+ return n.id && s && !i && p({
232
235
  op: "UPDATE_ITEM",
233
236
  itemId: n.id,
234
237
  payload: n
@@ -236,133 +239,133 @@ function _t(e, i) {
236
239
  }
237
240
  });
238
241
  return Object.defineProperty(t, "__isGridTabsProxy", { value: !0, enumerable: !1 }), Object.defineProperty(t, "__v_skip", { value: !0, enumerable: !1 }), t;
239
- }, S = (o, t) => {
242
+ }, P = (o, t) => {
240
243
  for (let n = 0; n < o.length; n++)
241
- o[n] = I(o[n]);
244
+ o[n] = T(o[n]);
242
245
  return new Proxy(o, {
243
- get(n, c, m) {
244
- return c === "push" ? (...y) => {
245
- y.forEach((Q, K) => z(Q, `push(${K})`)), r || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
246
- const b = y.map((Q) => I(Q)), k = Array.prototype.push.apply(n, b);
247
- return g || C({
246
+ get(n, r, m) {
247
+ return r === "push" ? (...y) => {
248
+ y.forEach((q, K) => w(q, `push(${K})`)), s || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 push()。请先对 items.value 或 tabs.value 进行全量赋值!");
249
+ const b = y.map((q) => T(q)), k = Array.prototype.push.apply(n, b);
250
+ return i || p({
248
251
  op: "APPEND_SUB_ITEMS",
249
252
  itemId: t,
250
253
  payload: { subItems: b }
251
254
  }), k;
252
- } : c === "unshift" ? (...y) => {
253
- y.forEach((Q, K) => z(Q, `unshift(${K})`)), r || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 unshift()。请先对 items.value 或 tabs.value 进行全量赋值!");
254
- const b = y.map((Q) => I(Q)), k = Array.prototype.unshift.apply(n, b);
255
- return r && b.length > 0 && !g && C({
255
+ } : r === "unshift" ? (...y) => {
256
+ y.forEach((q, K) => w(q, `unshift(${K})`)), s || console.error("[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时调用了 unshift()。请先对 items.value 或 tabs.value 进行全量赋值!");
257
+ const b = y.map((q) => T(q)), k = Array.prototype.unshift.apply(n, b);
258
+ return s && b.length > 0 && !i && p({
256
259
  op: "PREPEND_SUB_ITEMS",
257
260
  itemId: t,
258
261
  payload: { subItems: b }
259
262
  }), k;
260
- } : c === "splice" ? (...y) => {
263
+ } : r === "splice" ? (...y) => {
261
264
  const b = y.length >= 2 && y[0] === 0 && y[1] === n.length, k = Array.prototype.splice.apply(n, y);
262
- return r && b && t !== a ? g || C({
265
+ return s && b && t !== h ? i || p({
263
266
  op: "CLEAR_SUB_ITEMS",
264
267
  itemId: t
265
- }) : r && (g || p("items array spliced")), k;
266
- } : Reflect.get(n, c, m);
268
+ }) : s && (i || C("items array spliced")), k;
269
+ } : Reflect.get(n, r, m);
267
270
  },
268
- set(n, c, m, y) {
269
- if (c !== "length" && !isNaN(Number(c))) {
270
- r || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(c)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), z(m, `索引赋值 [${String(c)}]`);
271
- const b = I(m), k = Reflect.set(n, c, b, y);
272
- return b && b.id && !g && C({
271
+ set(n, r, m, y) {
272
+ if (r !== "length" && !isNaN(Number(r))) {
273
+ s || console.error(`[useGridTabs] ❌ 时机错误: 在底层还未完成初始化时直接修改了索引 [${String(r)}]。请先对 items.value 或 tabs.value 进行全量赋值!`), w(m, `索引赋值 [${String(r)}]`);
274
+ const b = T(m), k = Reflect.set(n, r, b, y);
275
+ return b && b.id && !i && p({
273
276
  op: "UPDATE_ITEM",
274
277
  itemId: b.id,
275
278
  payload: b
276
279
  }), k;
277
280
  }
278
- return Reflect.set(n, c, m, y);
281
+ return Reflect.set(n, r, m, y);
279
282
  }
280
283
  });
281
- }, E = (o) => (o.items && Array.isArray(o.items) && !o.items.__isGridTabsProxy && (o.items = S(o.items, o.tabId), Object.defineProperty(o.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(o, {
282
- set(t, n, c, m) {
284
+ }, S = (o) => (o.items && Array.isArray(o.items) && !o.items.__isGridTabsProxy && (o.items = P(o.items, o.tabId), Object.defineProperty(o.items, "__isGridTabsProxy", { value: !0, enumerable: !1 })), new Proxy(o, {
285
+ set(t, n, r, m) {
283
286
  if (n === "items") {
284
- let b = c;
285
- return Array.isArray(c) && !c.__isGridTabsProxy && (b = S(c, t.tabId), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(t, n, b, m);
287
+ let b = r;
288
+ return Array.isArray(r) && !r.__isGridTabsProxy && (b = P(r, t.tabId), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 })), Reflect.set(t, n, b, m);
286
289
  } else if (n === "loadState") {
287
- const b = Reflect.set(t, n, c, m);
288
- return r && t.tabId && !g && C({
290
+ const b = Reflect.set(t, n, r, m);
291
+ return s && t.tabId && !i && p({
289
292
  op: "UPDATE_TAB_STATE",
290
293
  itemId: t.tabId,
291
- payload: { loadState: c }
294
+ payload: { loadState: r }
292
295
  }), b;
293
296
  }
294
- return Reflect.set(t, n, c, m);
297
+ return Reflect.set(t, n, r, m);
295
298
  }
296
- })), G = (o) => {
297
- const t = o.map((n) => E(n));
299
+ })), B = (o) => {
300
+ const t = o.map((n) => S(n));
298
301
  return new Proxy(t, {
299
- set(n, c, m, y) {
300
- if (c !== "length" && !isNaN(Number(c))) {
302
+ set(n, r, m, y) {
303
+ if (r !== "length" && !isNaN(Number(r))) {
301
304
  let b = m;
302
- m.__isGridTabsProxy || (b = E(m), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
303
- const k = Reflect.set(n, c, b, y);
304
- return p(), k;
305
+ m.__isGridTabsProxy || (b = S(m), Object.defineProperty(b, "__isGridTabsProxy", { value: !0, enumerable: !1 }));
306
+ const k = Reflect.set(n, r, b, y);
307
+ return C(), k;
305
308
  }
306
- return Reflect.set(n, c, m, y);
309
+ return Reflect.set(n, r, m, y);
307
310
  }
308
311
  });
309
312
  };
310
- ee(f, (o, t) => {
311
- if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: o, isInitialized: r }), !o || o.length === 0) {
312
- d.value = "", u = "", r = !1;
313
+ ee(v, (o, t) => {
314
+ if (console.log("[useGridTabs] watch(tabs) triggered:", { newTabs: o, isInitialized: s }), !o || o.length === 0) {
315
+ d.value = "", l = "", s = !1;
313
316
  return;
314
317
  }
315
318
  if (o.__isGridTabsProxy)
316
- console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"), p();
319
+ console.log("[useGridTabs] newTabs is ALREADY a proxy, triggering root update"), C();
317
320
  else {
318
321
  console.log("[useGridTabs] newTabs is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
319
- const n = G(o);
320
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "2d"), f.value = n;
322
+ const n = B(o);
323
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "2d"), v.value = n;
321
324
  }
322
- }, { flush: "sync", deep: !1 }), ee(v, (o, t) => {
323
- if (console.log("[useGridTabs] watch(items) triggered:", { newItems: o, isInitialized: r }), !o || o.length === 0) {
324
- d.value = "", u = "", r = !1;
325
+ }, { flush: "sync", deep: !1 }), ee(g, (o, t) => {
326
+ if (console.log("[useGridTabs] watch(items) triggered:", { newItems: o, isInitialized: s }), !o || o.length === 0) {
327
+ d.value = "", l = "", s = !1;
325
328
  return;
326
329
  }
327
330
  if (o.__isGridTabsProxy)
328
- console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"), p();
331
+ console.log("[useGridTabs] newItems is ALREADY a proxy, triggering root update"), C();
329
332
  else {
330
333
  console.log("[useGridTabs] newItems is NOT a proxy, performing full deduceModeAndInitialize & wrapping");
331
- const n = S(o, a);
332
- Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "1d"), v.value = n;
334
+ const n = P(o, h);
335
+ Object.defineProperty(n, "__isGridTabsProxy", { value: !0, enumerable: !1 }), J(n, "1d"), g.value = n;
333
336
  }
334
337
  }, { flush: "sync", deep: !1 });
335
- const T = {}, O = () => {
336
- console.log("[useGridTabs] resetInitialization called manually"), r = !1, U.clear();
337
- for (const o in T)
338
- delete T[o];
339
- }, M = (o) => {
338
+ const N = {}, G = () => {
339
+ console.log("[useGridTabs] resetInitialization called manually"), s = !1, U.clear();
340
+ for (const o in N)
341
+ delete N[o];
342
+ }, R = (o) => {
340
343
  if (!o || o.length === 0) {
341
- d.value = "", r = !1;
344
+ d.value = "", s = !1;
342
345
  return;
343
346
  }
344
- o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items) ? f.value = o : v.value = o;
345
- }, x = (o) => {
346
- h.value = o;
347
- }, V = W(() => ({
347
+ o[0].hasOwnProperty("tabId") || o[0].hasOwnProperty("items") && Array.isArray(o[0].items) ? v.value = o : g.value = o;
348
+ }, E = (o) => {
349
+ f.value = o;
350
+ }, V = j(() => ({
348
351
  tabsData: d.value,
349
352
  // 不再绑定 actionPayload 属性,完全走命令式 API,防止触发无意义的 Vue 节点更新
350
353
  onTabNeedsData: async (...o) => {
351
354
  let t = o[0];
352
- if (t && t.nativeEvent && (t = t.nativeEvent), !h.value.onTabNeedsData)
355
+ if (t && t.nativeEvent && (t = t.nativeEvent), !f.value.onTabNeedsData)
353
356
  return;
354
- const { tabId: n, index: c, reason: m } = t;
357
+ const { tabId: n, index: r, reason: m } = t;
355
358
  if (U.has(n)) {
356
359
  console.log(`[useGridTabs] onTabNeedsData SKIP: tabId=${n} 已经发起过请求,防止死循环`);
357
360
  return;
358
361
  }
359
362
  U.add(n);
360
363
  try {
361
- const y = await h.value.onTabNeedsData(n, c, m);
364
+ const y = await f.value.onTabNeedsData(n, r, m);
362
365
  if (y && Array.isArray(y))
363
- if (T[n] = 1, y.length > 0) {
364
- const b = f.value.find((k) => k.tabId === n);
365
- b && (b.items ? b.items.length > 0 && b.items.splice(0, b.items.length) : b.items = [], b.items.push(...y), b.loadState = "ready", C({
366
+ if (N[n] = 1, y.length > 0) {
367
+ const b = v.value.find((k) => k.tabId === n);
368
+ b && (b.items ? b.items.length > 0 && b.items.splice(0, b.items.length) : b.items = [], b.items.push(...y), b.loadState = "ready", p({
366
369
  op: "UPDATE_TAB_STATE",
367
370
  itemId: n,
368
371
  payload: { loadState: "ready" }
@@ -375,18 +378,18 @@ function _t(e, i) {
375
378
  },
376
379
  onLoadMore: async (...o) => {
377
380
  let t = o[0];
378
- if (t && t.nativeEvent && (t = t.nativeEvent), !h.value.onLoadMore)
381
+ if (t && t.nativeEvent && (t = t.nativeEvent), !f.value.onLoadMore)
379
382
  return;
380
- const { tabId: n, itemId: c } = t, y = (T[n] || 1) + 1;
383
+ const { tabId: n, itemId: r } = t, y = (N[n] || 1) + 1;
381
384
  console.log(`[useGridTabs] 拦截到底层 onLoadMore,强行接管页码: tabId=${n}, pageNo=${y}`);
382
385
  try {
383
- const b = await h.value.onLoadMore(n, y, c);
386
+ const b = await f.value.onLoadMore(n, y, r);
384
387
  if (b && Array.isArray(b))
385
388
  if (b.length > 0)
386
- if (T[n] = y, l)
387
- v.value.push(...b);
389
+ if (N[n] = y, c)
390
+ g.value.push(...b);
388
391
  else {
389
- const k = f.value.find((Q) => Q.tabId === n);
392
+ const k = v.value.find((q) => q.tabId === n);
390
393
  k && k.items && k.items.push(...b);
391
394
  }
392
395
  else
@@ -397,262 +400,262 @@ function _t(e, i) {
397
400
  },
398
401
  onItemPresence: (...o) => {
399
402
  let t = o[0];
400
- if (console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:", t), h.value.onItemPresence)
403
+ if (console.log("[useGridTabs] ⚡️ bindings caught onItemPresence:", t), f.value.onItemPresence)
401
404
  try {
402
405
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.nativeEvent) || t;
403
406
  n && typeof n.data == "string" && (n = n.data);
404
- const c = typeof n == "string" ? JSON.parse(n) : n;
405
- c && c.type === "VIEW_PRESENCE_BATCH" && Array.isArray(c.payload) ? c.payload.forEach((m) => {
406
- m.itemId && typeof m.itemId == "string" && m.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${m.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), h.value.onItemPresence(m);
407
- }) : h.value.onItemPresence(c);
407
+ const r = typeof n == "string" ? JSON.parse(n) : n;
408
+ r && r.type === "VIEW_PRESENCE_BATCH" && Array.isArray(r.payload) ? r.payload.forEach((m) => {
409
+ m.itemId && typeof m.itemId == "string" && m.itemId.startsWith("fallback_pos_") && console.warn(`[useGridTabs] ⚠️ 警告:检测到列表项曝光 (index=${m.index}),但未配置 itemId。请检查传入的 items 数组,务必为每个数据项指定唯一的 itemId,否则底层无法准确进行去重与曝光上报。`), f.value.onItemPresence(m);
410
+ }) : f.value.onItemPresence(r);
408
411
  } catch (n) {
409
- console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n), h.value.onItemPresence(t);
412
+ console.error("[useGridTabs] Failed to parse onItemPresence event payload:", n), f.value.onItemPresence(t);
410
413
  }
411
414
  },
412
415
  onTabSelected: (...o) => {
413
416
  let t = o[0];
414
- t && t.nativeEvent && (t = t.nativeEvent), h.value.onTabSelected && h.value.onTabSelected(t);
417
+ t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabSelected && f.value.onTabSelected(t);
415
418
  },
416
419
  onTabClick: (...o) => {
417
420
  let t = o[0];
418
- t && t.nativeEvent && (t = t.nativeEvent), h.value.onTabClick && h.value.onTabClick(t);
421
+ t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabClick && f.value.onTabClick(t);
419
422
  },
420
423
  onItemClick: (...o) => {
421
424
  let t = o[0];
422
- if (console.log("[useGridTabs] RAW onItemClick intercepted from Native:", t), t && t.nativeEvent && (t = t.nativeEvent), h.value.onItemClick)
425
+ if (console.log("[useGridTabs] RAW onItemClick intercepted from Native:", t), t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemClick)
423
426
  try {
424
427
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
425
- const c = typeof n == "string" ? JSON.parse(n) : n;
426
- if (c && typeof c.clickPayload == "string")
428
+ const r = typeof n == "string" ? JSON.parse(n) : n;
429
+ if (r && typeof r.clickPayload == "string")
427
430
  try {
428
- c.clickPayload = JSON.parse(c.clickPayload);
431
+ r.clickPayload = JSON.parse(r.clickPayload);
429
432
  } catch (m) {
430
433
  console.warn("Failed to parse clickPayload:", m);
431
434
  }
432
- if (c && typeof c.focusPayload == "string")
435
+ if (r && typeof r.focusPayload == "string")
433
436
  try {
434
- c.focusPayload = JSON.parse(c.focusPayload);
437
+ r.focusPayload = JSON.parse(r.focusPayload);
435
438
  } catch (m) {
436
439
  console.warn("Failed to parse focusPayload:", m);
437
440
  }
438
- h.value.onItemClick(c);
441
+ f.value.onItemClick(r);
439
442
  } catch (n) {
440
- console.error("[useGridTabs] Failed to parse onItemClick event payload:", n), h.value.onItemClick(t);
443
+ console.error("[useGridTabs] Failed to parse onItemClick event payload:", n), f.value.onItemClick(t);
441
444
  }
442
445
  else
443
446
  console.warn("[useGridTabs] onItemClick triggered but NO callback registered in callbacksRef!");
444
447
  },
445
448
  onItemLongClick: (...o) => {
446
449
  let t = o[0];
447
- if (console.log("[useGridTabs] RAW onItemLongClick intercepted from Native:", t), typeof t == "number" && o.length >= 3 && typeof o[1] == "string" && (t = o[2]), t && t.nativeEvent && (t = t.nativeEvent), h.value.onItemLongClick)
450
+ if (console.log("[useGridTabs] RAW onItemLongClick intercepted from Native:", t), typeof t == "number" && o.length >= 3 && typeof o[1] == "string" && (t = o[2]), t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemLongClick)
448
451
  try {
449
452
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
450
- const c = typeof n == "string" ? JSON.parse(n) : n;
451
- if (c && typeof c.clickPayload == "string")
453
+ const r = typeof n == "string" ? JSON.parse(n) : n;
454
+ if (r && typeof r.clickPayload == "string")
452
455
  try {
453
- c.clickPayload = JSON.parse(c.clickPayload);
456
+ r.clickPayload = JSON.parse(r.clickPayload);
454
457
  } catch {
455
458
  }
456
- if (c && typeof c.focusPayload == "string")
459
+ if (r && typeof r.focusPayload == "string")
457
460
  try {
458
- c.focusPayload = JSON.parse(c.focusPayload);
461
+ r.focusPayload = JSON.parse(r.focusPayload);
459
462
  } catch {
460
463
  }
461
- h.value.onItemLongClick(c);
464
+ f.value.onItemLongClick(r);
462
465
  } catch (n) {
463
- console.error("[useGridTabs] Failed to parse onItemLongClick event payload:", n), h.value.onItemLongClick(t);
466
+ console.error("[useGridTabs] Failed to parse onItemLongClick event payload:", n), f.value.onItemLongClick(t);
464
467
  }
465
468
  },
466
469
  onItemFocused: (...o) => {
467
470
  let t = o[0];
468
- if (t && t.nativeEvent && (t = t.nativeEvent), h.value.onItemFocused)
471
+ if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onItemFocused)
469
472
  try {
470
473
  let n = typeof t == "string" ? t : (t == null ? void 0 : t.data) || t;
471
- const c = typeof n == "string" ? JSON.parse(n) : n;
472
- if (c && typeof c.clickPayload == "string")
474
+ const r = typeof n == "string" ? JSON.parse(n) : n;
475
+ if (r && typeof r.clickPayload == "string")
473
476
  try {
474
- c.clickPayload = JSON.parse(c.clickPayload);
477
+ r.clickPayload = JSON.parse(r.clickPayload);
475
478
  } catch {
476
479
  }
477
- if (c && typeof c.focusPayload == "string")
480
+ if (r && typeof r.focusPayload == "string")
478
481
  try {
479
- c.focusPayload = JSON.parse(c.focusPayload);
482
+ r.focusPayload = JSON.parse(r.focusPayload);
480
483
  } catch {
481
484
  }
482
- h.value.onItemFocused(c);
485
+ f.value.onItemFocused(r);
483
486
  } catch (n) {
484
- console.error("[useGridTabs] Failed to parse onItemFocused event payload:", n), h.value.onItemFocused(t);
487
+ console.error("[useGridTabs] Failed to parse onItemFocused event payload:", n), f.value.onItemFocused(t);
485
488
  }
486
489
  },
487
490
  onTabFocused: (...o) => {
488
491
  let t = o[0];
489
- t && t.nativeEvent && (t = t.nativeEvent), h.value.onTabFocused && h.value.onTabFocused(t);
492
+ t && t.nativeEvent && (t = t.nativeEvent), f.value.onTabFocused && f.value.onTabFocused(t);
490
493
  },
491
494
  onScroll: (...o) => {
492
495
  let t = o[0];
493
- if (t && t.nativeEvent && (t = t.nativeEvent), h.value.onScroll)
496
+ if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onScroll)
494
497
  try {
495
498
  const n = (t == null ? void 0 : t.data) || t;
496
- h.value.onScroll(n);
499
+ f.value.onScroll(n);
497
500
  } catch {
498
- h.value.onScroll(t);
501
+ f.value.onScroll(t);
499
502
  }
500
503
  },
501
504
  onScrollStateChanged: (...o) => {
502
505
  let t = o[0];
503
- if (t && t.nativeEvent && (t = t.nativeEvent), h.value.onScrollStateChanged)
506
+ if (t && t.nativeEvent && (t = t.nativeEvent), f.value.onScrollStateChanged)
504
507
  try {
505
508
  const n = (t == null ? void 0 : t.data) || t;
506
- h.value.onScrollStateChanged(n);
509
+ f.value.onScrollStateChanged(n);
507
510
  } catch {
508
- h.value.onScrollStateChanged(t);
511
+ f.value.onScrollStateChanged(t);
509
512
  }
510
513
  }
511
514
  }));
512
515
  return {
513
516
  tabsDataStr: d,
514
517
  bindings: V,
515
- tabs: f,
516
- items: v,
517
- initData: M,
518
- setCallbacks: x,
518
+ tabs: v,
519
+ items: g,
520
+ initData: R,
521
+ setCallbacks: E,
519
522
  updateItem: (o, t) => {
520
- if (!r) {
523
+ if (!s) {
521
524
  console.error("[useGridTabs] ❌ 时机错误: 尚未初始化数据,无法调用 updateItem");
522
525
  return;
523
526
  }
524
- C({ op: "UPDATE_ITEM", itemId: o, payload: t }), g = !0;
527
+ p({ op: "UPDATE_ITEM", itemId: o, payload: t }), i = !0;
525
528
  try {
526
- if (l) {
527
- const n = v.value.find((c) => c.id === o);
529
+ if (c) {
530
+ const n = g.value.find((r) => r.id === o);
528
531
  n && Object.assign(n, t);
529
532
  } else
530
- for (const n of f.value)
533
+ for (const n of v.value)
531
534
  if (n.items) {
532
- const c = n.items.find((m) => m.id === o);
533
- if (c) {
534
- Object.assign(c, t);
535
+ const r = n.items.find((m) => m.id === o);
536
+ if (r) {
537
+ Object.assign(r, t);
535
538
  break;
536
539
  }
537
540
  }
538
541
  } finally {
539
- g = !1;
542
+ i = !1;
540
543
  }
541
544
  },
542
545
  deleteItem: (o, t = !0) => {
543
- if (r) {
544
- C({ op: "DELETE_ITEM", itemId: o, payload: { animated: t } }), g = !0;
546
+ if (s) {
547
+ p({ op: "DELETE_ITEM", itemId: o, payload: { animated: t } }), i = !0;
545
548
  try {
546
- if (l) {
547
- const n = v.value.findIndex((c) => c.id === o);
548
- n !== -1 && v.value.splice(n, 1);
549
+ if (c) {
550
+ const n = g.value.findIndex((r) => r.id === o);
551
+ n !== -1 && g.value.splice(n, 1);
549
552
  } else
550
- for (const n of f.value)
553
+ for (const n of v.value)
551
554
  if (n.items) {
552
- const c = n.items.findIndex((m) => m.id === o);
553
- if (c !== -1) {
554
- n.items.splice(c, 1);
555
+ const r = n.items.findIndex((m) => m.id === o);
556
+ if (r !== -1) {
557
+ n.items.splice(r, 1);
555
558
  break;
556
559
  }
557
560
  }
558
561
  } finally {
559
- g = !1;
562
+ i = !1;
560
563
  }
561
564
  }
562
565
  },
563
566
  prependItems: (o, t) => {
564
- if (r) {
565
- C({
567
+ if (s) {
568
+ p({
566
569
  op: "PREPEND_SUB_ITEMS",
567
570
  itemId: o,
568
571
  payload: { subItems: t }
569
- }), g = !0;
572
+ }), i = !0;
570
573
  try {
571
- if (l)
572
- v.value.unshift(...t);
574
+ if (c)
575
+ g.value.unshift(...t);
573
576
  else {
574
- const n = f.value.find((c) => c.tabId === o);
577
+ const n = v.value.find((r) => r.tabId === o);
575
578
  n && n.items && n.items.unshift(...t);
576
579
  }
577
580
  } finally {
578
- g = !1;
581
+ i = !1;
579
582
  }
580
583
  }
581
584
  },
582
585
  clearItems: (o) => {
583
- if (r) {
584
- C({
586
+ if (s) {
587
+ p({
585
588
  op: "CLEAR_SUB_ITEMS",
586
589
  itemId: o
587
- }), g = !0;
590
+ }), i = !0;
588
591
  try {
589
- if (l)
590
- v.value.splice(0, v.value.length);
592
+ if (c)
593
+ g.value.splice(0, g.value.length);
591
594
  else {
592
- const t = f.value.find((n) => n.tabId === o);
595
+ const t = v.value.find((n) => n.tabId === o);
593
596
  t && t.items && t.items.splice(0, t.items.length);
594
597
  }
595
598
  } finally {
596
- g = !1;
599
+ i = !1;
597
600
  }
598
601
  }
599
602
  },
600
603
  moveItem: (o, t, n) => {
601
- if (r) {
602
- C({
604
+ if (s) {
605
+ p({
603
606
  op: "MOVE_ITEM",
604
607
  itemId: o,
605
608
  payload: { targetPosition: t, anchorItemId: n }
606
- }), g = !0;
609
+ }), i = !0;
607
610
  try {
608
- const c = (m) => {
611
+ const r = (m) => {
609
612
  const y = m.findIndex((k) => k.id === o), b = m.findIndex((k) => k.id === n);
610
613
  if (y !== -1 && b !== -1) {
611
- const k = m.splice(y, 1)[0], Q = m.findIndex((Ye) => Ye.id === n), K = t === "after" ? Q + 1 : Q;
614
+ const k = m.splice(y, 1)[0], q = m.findIndex((De) => De.id === n), K = t === "after" ? q + 1 : q;
612
615
  m.splice(K, 0, k);
613
616
  }
614
617
  };
615
- if (l)
616
- c(v.value);
618
+ if (c)
619
+ r(g.value);
617
620
  else
618
- for (const m of f.value)
619
- m.items && c(m.items);
621
+ for (const m of v.value)
622
+ m.items && r(m.items);
620
623
  } finally {
621
- g = !1;
624
+ i = !1;
622
625
  }
623
626
  }
624
627
  },
625
628
  replaceItem: (o, t) => {
626
- if (r) {
627
- C({
629
+ if (s) {
630
+ p({
628
631
  op: "REPLACE_ITEM",
629
632
  itemId: o,
630
633
  payload: t
631
- }), g = !0;
634
+ }), i = !0;
632
635
  try {
633
- if (l) {
634
- const n = v.value.findIndex((c) => c.id === o);
635
- n !== -1 && (v.value[n] = t);
636
+ if (c) {
637
+ const n = g.value.findIndex((r) => r.id === o);
638
+ n !== -1 && (g.value[n] = t);
636
639
  } else
637
- for (const n of f.value)
640
+ for (const n of v.value)
638
641
  if (n.items) {
639
- const c = n.items.findIndex((m) => m.id === o);
640
- if (c !== -1) {
641
- n.items[c] = t;
642
+ const r = n.items.findIndex((m) => m.id === o);
643
+ if (r !== -1) {
644
+ n.items[r] = t;
642
645
  break;
643
646
  }
644
647
  }
645
648
  } finally {
646
- g = !1;
649
+ i = !1;
647
650
  }
648
651
  }
649
652
  },
650
- dispatchAction: C,
651
- resetInitialization: O,
653
+ dispatchAction: p,
654
+ resetInitialization: G,
652
655
  getFocusState: async () => new Promise((o, t) => {
653
656
  let n = e.value;
654
657
  typeof e.value.getNativeNode == "function" ? n = e.value.getNativeNode() || e.value : e.value.nativeRef && (n = e.value.nativeRef), console.log("[useGridTabs] getFocusState called, nativeTarget:", n);
655
- const c = (m) => {
658
+ const r = (m) => {
656
659
  if (console.log("[useGridTabs] getFocusState callback received:", m), m && m.isSuccess !== void 0 && m.result !== void 0) {
657
660
  o(m.result);
658
661
  return;
@@ -664,11 +667,11 @@ function _t(e, i) {
664
667
  t(y);
665
668
  }
666
669
  };
667
- typeof N.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getFocusState") with callback as 4th arg'), N.callUIFunction(n, "getFocusState", [], c)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), t(new Error("Native.callUIFunction is not available")));
670
+ typeof I.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getFocusState") with callback as 4th arg'), I.callUIFunction(n, "getFocusState", [], r)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), t(new Error("Native.callUIFunction is not available")));
668
671
  }),
669
672
  getItemRect: async (o) => new Promise((t, n) => {
670
- let c = e.value;
671
- typeof e.value.getNativeNode == "function" ? c = e.value.getNativeNode() || e.value : e.value.nativeRef && (c = e.value.nativeRef), console.log(`[useGridTabs] getItemRect called for itemId=${o}, nativeTarget:`, c);
673
+ let r = e.value;
674
+ typeof e.value.getNativeNode == "function" ? r = e.value.getNativeNode() || e.value : e.value.nativeRef && (r = e.value.nativeRef), console.log(`[useGridTabs] getItemRect called for itemId=${o}, nativeTarget:`, r);
672
675
  const m = (y) => {
673
676
  if (console.log(`[useGridTabs] getItemRect callback received for itemId=${o}:`, y), y && y.isSuccess !== void 0 && y.result !== void 0) {
674
677
  t(y.result);
@@ -681,29 +684,29 @@ function _t(e, i) {
681
684
  n(b);
682
685
  }
683
686
  };
684
- typeof N.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'), N.callUIFunction(c, "getItemRect", [o], m)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), n(new Error("Native.callUIFunction is not available")));
687
+ typeof I.callUIFunction == "function" ? (console.log('[useGridTabs] Executing Native.callUIFunction("getItemRect") with itemId and callback as 4th arg'), I.callUIFunction(r, "getItemRect", [o], m)) : (console.error("[useGridTabs] Native.callUIFunction is not available"), n(new Error("Native.callUIFunction is not available")));
685
688
  }),
686
689
  requestFocus: (o) => {
687
690
  let t = e.value;
688
- typeof e.value.getNativeNode == "function" ? t = e.value.getNativeNode() || e.value : e.value.nativeRef && (t = e.value.nativeRef), N.callUIFunction(t, "requestFocus", [o]);
691
+ typeof e.value.getNativeNode == "function" ? t = e.value.getNativeNode() || e.value : e.value.nativeRef && (t = e.value.nativeRef), I.callUIFunction(t, "requestFocus", [o]);
689
692
  },
690
693
  updatePageSpec: (o) => {
691
- if (!r)
694
+ if (!s)
692
695
  return;
693
696
  const t = Object.assign({}, JSON.parse(d.value).page_spec, o);
694
- o.layout && (t.navConfig = Object.assign({}, t.navConfig, o.layout)), o.navConfig && (t.navConfig = Object.assign({}, t.navConfig, o.navConfig)), o.contentConfig && (t.contentConfig = Object.assign({}, t.contentConfig, o.contentConfig)), s && Object.assign(s, t), C({
697
+ o.layout && (t.navConfig = Object.assign({}, t.navConfig, o.layout)), o.navConfig && (t.navConfig = Object.assign({}, t.navConfig, o.navConfig)), o.contentConfig && (t.contentConfig = Object.assign({}, t.contentConfig, o.contentConfig)), u && Object.assign(u, t), p({
695
698
  op: "RELOAD_TABS",
696
699
  payload: {
697
700
  pageSpec: t,
698
701
  page_spec: t,
699
- tabs: f.value
702
+ tabs: v.value
700
703
  }
701
704
  });
702
705
  const n = JSON.parse(d.value);
703
- n.page_spec = t, d.value = JSON.stringify(n), u = d.value;
706
+ n.page_spec = t, d.value = JSON.stringify(n), l = d.value;
704
707
  },
705
708
  reloadAll: (o, t) => {
706
- s && (Object.keys(s).forEach((n) => delete s[n]), Object.assign(s, o)), f.value = t, C({
709
+ u && (Object.keys(u).forEach((n) => delete u[n]), Object.assign(u, o)), v.value = t, p({
707
710
  op: "RELOAD_TABS",
708
711
  payload: {
709
712
  pageSpec: o,
@@ -714,11 +717,14 @@ function _t(e, i) {
714
717
  },
715
718
  scrollToTop: () => {
716
719
  let o = e.value;
717
- typeof e.value.getNativeNode == "function" ? o = e.value.getNativeNode() || e.value : e.value.nativeRef && (o = e.value.nativeRef), N.callUIFunction(o, "scrollToTop", []);
720
+ typeof e.value.getNativeNode == "function" ? o = e.value.getNativeNode() || e.value : e.value.nativeRef && (o = e.value.nativeRef), I.callUIFunction(o, "scrollToTop", []);
718
721
  }
719
722
  };
720
723
  }
721
- const ye = "QtKeyboard", he = /* @__PURE__ */ w({
724
+ const Ke = {
725
+ inheritAttrs: !1
726
+ }, me = /* @__PURE__ */ $({
727
+ ...Ke,
722
728
  __name: "Keyboard",
723
729
  props: {
724
730
  backgroundColor: {},
@@ -738,23 +744,23 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
738
744
  rememberKeyboardType: { type: Boolean }
739
745
  },
740
746
  emits: ["onInputChanged", "onKeyPressed"],
741
- setup(e, { expose: i }) {
742
- const d = A(), s = _(), f = ye + "_Plugin", l = (s.isPluginActive ? f : ye).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
743
- l,
744
- s.pluginPackageName || "com.quicktvui.plugin.extraui",
747
+ setup(e, { expose: a }) {
748
+ const d = A(), u = L(), v = "QtKeyboard", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
749
+ s,
750
+ u.pluginPackageName || "com.quicktvui.plugin.extraui",
745
751
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
746
752
  );
747
- return i({
753
+ return a({
748
754
  getNativeNode: () => {
749
- var a, u;
750
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
755
+ var l, i;
756
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
751
757
  },
752
- requestFocus: (...a) => {
753
- var g, h;
754
- const u = ((h = (g = d.value) == null ? void 0 : g.getNativeNode) == null ? void 0 : h.call(g)) || d.value;
755
- u && N.callUIFunction(u, "requestFocus", a);
758
+ requestFocus: (...l) => {
759
+ var f, p;
760
+ const i = ((p = (f = d.value) == null ? void 0 : f.getNativeNode) == null ? void 0 : p.call(f)) || d.value;
761
+ i && I.callUIFunction(i, "requestFocus", l);
756
762
  }
757
- }), (a, u) => (P(), $(D(r), B({
763
+ }), (l, i) => (x(), O(M(h), F({
758
764
  ref_key: "nativeRef",
759
765
  ref: d,
760
766
  backgroundColor: e.backgroundColor,
@@ -772,265 +778,280 @@ const ye = "QtKeyboard", he = /* @__PURE__ */ w({
772
778
  currentInput: e.currentInput,
773
779
  autofocus: e.autofocus,
774
780
  rememberKeyboardType: e.rememberKeyboardType,
775
- onOnInputChanged: u[0] || (u[0] = (g) => a.$emit("onInputChanged", g.nativeEvent)),
776
- onOnKeyPressed: u[1] || (u[1] = (g) => a.$emit("onKeyPressed", g.nativeEvent))
777
- }, a.$attrs), {
778
- default: R(() => [
779
- F(a.$slots, "default")
781
+ onOnInputChanged: i[0] || (i[0] = (f) => l.$emit("onInputChanged", f.nativeEvent)),
782
+ onOnKeyPressed: i[1] || (i[1] = (f) => l.$emit("onKeyPressed", f.nativeEvent))
783
+ }, l.$attrs), {
784
+ default: Q(() => [
785
+ D(l.$slots, "default")
780
786
  ]),
781
787
  _: 3
782
788
  }, 16, ["backgroundColor", "backgroundGradient", "textColor", "weakTextColor", "focusBackgroundColor", "focusTextColor", "placeholder", "textFullKeyboard", "textT9Keyboard", "keyboardType", "textClear", "textDelete", "currentInput", "autofocus", "rememberKeyboardType"]));
783
789
  }
784
790
  });
785
791
  let oe;
786
- var ze;
792
+ var Ee;
787
793
  try {
788
794
  const e = require("@extscreen/es3-vue");
789
- oe = e.registerElement || ((ze = e.default) == null ? void 0 : ze.registerElement);
795
+ oe = e.registerElement || ((Ee = e.default) == null ? void 0 : Ee.registerElement);
790
796
  } catch {
791
797
  }
792
- const lt = {
798
+ const He = {
793
799
  install: (e) => {
794
800
  if (!globalThis.__QtKeyboard_registered)
795
801
  if (oe) {
796
- const i = (d, s) => {
802
+ const a = (d, u) => {
797
803
  oe(d, {
798
804
  component: {
799
- name: s ? "QtKeyboard_Plugin" : "QtKeyboard",
800
- processEventData(f, v) {
801
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
802
- return l && (l.nativeEvent = r), l;
805
+ name: u ? "QtKeyboard_Plugin" : "QtKeyboard",
806
+ processEventData(v, g) {
807
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
808
+ return c && (c.nativeEvent = s), c;
803
809
  }
804
810
  }
805
811
  });
806
812
  };
807
- i("qt-keyboard", !1), i("qt-keyboard-plugin", !0), i("QtKeyboard", !1), i("QtKeyboard_Plugin", !0), globalThis.__QtKeyboard_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtKeyboard");
813
+ a("qt-keyboard", !1), a("qt-keyboard-plugin", !0), a("QtKeyboard", !1), a("QtKeyboard_Plugin", !0), globalThis.__QtKeyboard_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtKeyboard");
808
814
  } else
809
815
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
810
- e.component("Keyboard", he), e.component("qt-keyboard", he);
816
+ e.component("Keyboard", me), e.component("qt-keyboard", me);
811
817
  }
812
- }, pe = "QtPortalPool", Ce = /* @__PURE__ */ w({
818
+ }, Je = {
819
+ inheritAttrs: !1
820
+ }, be = /* @__PURE__ */ $({
821
+ ...Je,
813
822
  __name: "PortalPool",
814
- setup(e, { expose: i }) {
815
- const d = A(), s = _(), f = pe + "_Plugin", l = (s.isPluginActive ? f : pe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
816
- l,
817
- s.pluginPackageName || "com.quicktvui.plugin.glintui"
823
+ setup(e, { expose: a }) {
824
+ const d = A(), u = L(), v = "QtPortalPool", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
825
+ s,
826
+ u.pluginPackageName || "com.quicktvui.plugin.glintui"
818
827
  );
819
- return i({
828
+ return a({
820
829
  getNativeNode: () => {
821
- var a, u;
822
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
830
+ var l, i;
831
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
823
832
  }
824
- }), (a, u) => (P(), $(D(r), B({
833
+ }), (l, i) => (x(), O(M(h), F({
825
834
  ref_key: "nativeRef",
826
835
  ref: d,
827
836
  style: { position: "absolute" },
828
837
  absolute: !0
829
- }, a.$attrs), {
830
- default: R(() => [
831
- F(a.$slots, "default")
838
+ }, l.$attrs), {
839
+ default: Q(() => [
840
+ D(l.$slots, "default")
832
841
  ]),
833
842
  _: 3
834
843
  }, 16));
835
844
  }
836
845
  });
837
846
  let ne;
838
- var Me;
847
+ var xe;
839
848
  try {
840
849
  const e = require("@extscreen/es3-vue");
841
- ne = e.registerElement || ((Me = e.default) == null ? void 0 : Me.registerElement);
850
+ ne = e.registerElement || ((xe = e.default) == null ? void 0 : xe.registerElement);
842
851
  } catch {
843
852
  }
844
- const rt = {
853
+ const Ze = {
845
854
  install: (e) => {
846
855
  if (!globalThis.__QtPortalPool_registered)
847
856
  if (ne) {
848
- const i = (d, s) => {
857
+ const a = (d, u) => {
849
858
  ne(d, {
850
859
  component: {
851
- name: s ? "QtPortalPool_Plugin" : "QtPortalPool",
852
- processEventData(f, v) {
853
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
854
- return l && (l.nativeEvent = r), l;
860
+ name: u ? "QtPortalPool_Plugin" : "QtPortalPool",
861
+ processEventData(v, g) {
862
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
863
+ return c && (c.nativeEvent = s), c;
855
864
  }
856
865
  }
857
866
  });
858
867
  };
859
- i("qt-portal-pool", !1), i("qt-portal-pool-plugin", !0), i("QtPortalPool", !1), i("QtPortalPool_Plugin", !0), globalThis.__QtPortalPool_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalPool");
868
+ a("qt-portal-pool", !1), a("qt-portal-pool-plugin", !0), a("QtPortalPool", !1), a("QtPortalPool_Plugin", !0), globalThis.__QtPortalPool_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalPool");
860
869
  } else
861
870
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
862
- e.component("PortalPool", Ce), e.component("qt-portal-pool", Ce);
871
+ e.component("PortalPool", be), e.component("qt-portal-pool", be);
863
872
  }
864
- }, ke = "QtPortalItem", Ie = /* @__PURE__ */ w({
873
+ }, Xe = {
874
+ inheritAttrs: !1
875
+ }, ye = /* @__PURE__ */ $({
876
+ ...Xe,
865
877
  __name: "PortalItem",
866
878
  props: {
867
879
  portalId: {}
868
880
  },
869
- setup(e, { expose: i }) {
870
- const d = A(), s = _(), f = ke + "_Plugin", l = (s.isPluginActive ? f : ke).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
871
- l,
872
- s.pluginPackageName || "com.quicktvui.plugin.glintui"
881
+ setup(e, { expose: a }) {
882
+ const d = A(), u = L(), v = "QtPortalItem", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
883
+ s,
884
+ u.pluginPackageName || "com.quicktvui.plugin.glintui"
873
885
  );
874
- return i({
886
+ return a({
875
887
  getNativeNode: () => {
876
- var a, u;
877
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
888
+ var l, i;
889
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
878
890
  }
879
- }), (a, u) => (P(), $(D(r), B({
891
+ }), (l, i) => (x(), O(M(h), F({
880
892
  ref_key: "nativeRef",
881
893
  ref: d,
882
894
  style: { position: "absolute" },
883
895
  absolute: !0,
884
896
  portalId: e.portalId
885
- }, a.$attrs), {
886
- default: R(() => [
887
- F(a.$slots, "default")
897
+ }, l.$attrs), {
898
+ default: Q(() => [
899
+ D(l.$slots, "default")
888
900
  ]),
889
901
  _: 3
890
902
  }, 16, ["portalId"]));
891
903
  }
892
904
  });
893
905
  let ae;
894
- var De;
906
+ var Ae;
895
907
  try {
896
908
  const e = require("@extscreen/es3-vue");
897
- ae = e.registerElement || ((De = e.default) == null ? void 0 : De.registerElement);
909
+ ae = e.registerElement || ((Ae = e.default) == null ? void 0 : Ae.registerElement);
898
910
  } catch {
899
911
  }
900
- const st = {
912
+ const Ye = {
901
913
  install: (e) => {
902
914
  if (!globalThis.__QtPortalItem_registered)
903
915
  if (ae) {
904
- const i = (d, s) => {
916
+ const a = (d, u) => {
905
917
  ae(d, {
906
918
  component: {
907
- name: s ? "QtPortalItem_Plugin" : "QtPortalItem",
908
- processEventData(f, v) {
909
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
910
- return l && (l.nativeEvent = r), l;
919
+ name: u ? "QtPortalItem_Plugin" : "QtPortalItem",
920
+ processEventData(v, g) {
921
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
922
+ return c && (c.nativeEvent = s), c;
911
923
  }
912
924
  }
913
925
  });
914
926
  };
915
- i("qt-portal-item", !1), i("qt-portal-item-plugin", !0), i("QtPortalItem", !1), i("QtPortalItem_Plugin", !0), globalThis.__QtPortalItem_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalItem");
927
+ a("qt-portal-item", !1), a("qt-portal-item-plugin", !0), a("QtPortalItem", !1), a("QtPortalItem_Plugin", !0), globalThis.__QtPortalItem_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtPortalItem");
916
928
  } else
917
929
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
918
- e.component("PortalItem", Ie), e.component("qt-portal-item", Ie);
930
+ e.component("PortalItem", ye), e.component("qt-portal-item", ye);
919
931
  }
920
- }, Ne = "QtHsvBackground", Te = /* @__PURE__ */ w({
932
+ }, et = {
933
+ inheritAttrs: !1
934
+ }, he = /* @__PURE__ */ $({
935
+ ...et,
921
936
  __name: "HsvBackground",
922
937
  props: {
923
938
  hue: {},
924
939
  hueDuration: {}
925
940
  },
926
- setup(e, { expose: i }) {
927
- const d = A(), s = _(), f = Ne + "_Plugin", l = (s.isPluginActive ? f : Ne).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
928
- l,
929
- s.pluginPackageName || "com.quicktvui.plugin.glintui"
941
+ setup(e, { expose: a }) {
942
+ const d = A(), u = L(), v = "QtHsvBackground", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
943
+ s,
944
+ u.pluginPackageName || "com.quicktvui.plugin.glintui"
930
945
  );
931
- return i({
946
+ return a({
932
947
  getNativeNode: () => {
933
- var a, u;
934
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
948
+ var l, i;
949
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
935
950
  }
936
- }), (a, u) => (P(), $(D(r), B({
951
+ }), (l, i) => (x(), O(M(h), F({
937
952
  ref_key: "nativeRef",
938
953
  ref: d,
939
954
  hue: e.hue,
940
955
  hueDuration: e.hueDuration
941
- }, a.$attrs), {
942
- default: R(() => [
943
- F(a.$slots, "default")
956
+ }, l.$attrs), {
957
+ default: Q(() => [
958
+ D(l.$slots, "default")
944
959
  ]),
945
960
  _: 3
946
961
  }, 16, ["hue", "hueDuration"]));
947
962
  }
948
963
  });
949
- let ie;
950
- var Le;
964
+ let le;
965
+ var we;
951
966
  try {
952
967
  const e = require("@extscreen/es3-vue");
953
- ie = e.registerElement || ((Le = e.default) == null ? void 0 : Le.registerElement);
968
+ le = e.registerElement || ((we = e.default) == null ? void 0 : we.registerElement);
954
969
  } catch {
955
970
  }
956
- const ct = {
971
+ const tt = {
957
972
  install: (e) => {
958
973
  if (!globalThis.__QtHsvBackground_registered)
959
- if (ie) {
960
- const i = (d, s) => {
961
- ie(d, {
974
+ if (le) {
975
+ const a = (d, u) => {
976
+ le(d, {
962
977
  component: {
963
- name: s ? "QtHsvBackground_Plugin" : "QtHsvBackground",
964
- processEventData(f, v) {
965
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
966
- return l && (l.nativeEvent = r), l;
978
+ name: u ? "QtHsvBackground_Plugin" : "QtHsvBackground",
979
+ processEventData(v, g) {
980
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
981
+ return c && (c.nativeEvent = s), c;
967
982
  }
968
983
  }
969
984
  });
970
985
  };
971
- i("qt-hsv-background", !1), i("qt-hsv-background-plugin", !0), i("QtHsvBackground", !1), i("QtHsvBackground_Plugin", !0), globalThis.__QtHsvBackground_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtHsvBackground");
986
+ a("qt-hsv-background", !1), a("qt-hsv-background-plugin", !0), a("QtHsvBackground", !1), a("QtHsvBackground_Plugin", !0), globalThis.__QtHsvBackground_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtHsvBackground");
972
987
  } else
973
988
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
974
- e.component("HsvBackground", Te), e.component("qt-hsv-background", Te);
989
+ e.component("HsvBackground", he), e.component("qt-hsv-background", he);
975
990
  }
976
- }, Pe = "QtSvgImage", Se = /* @__PURE__ */ w({
991
+ }, ot = {
992
+ inheritAttrs: !1
993
+ }, pe = /* @__PURE__ */ $({
994
+ ...ot,
977
995
  __name: "SvgImage",
978
996
  props: {
979
997
  src: {},
980
998
  tintColor: {}
981
999
  },
982
- setup(e, { expose: i }) {
983
- const d = A(), s = _(), f = Pe + "_Plugin", l = (s.isPluginActive ? f : Pe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
984
- l,
985
- s.pluginPackageName || "com.quicktvui.plugin.extraui",
1000
+ setup(e, { expose: a }) {
1001
+ const d = A(), u = L(), v = "QtSvgImage", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1002
+ s,
1003
+ u.pluginPackageName || "com.quicktvui.plugin.extraui",
986
1004
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
987
1005
  );
988
- return i({
1006
+ return a({
989
1007
  getNativeNode: () => {
990
- var a, u;
991
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
1008
+ var l, i;
1009
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
992
1010
  }
993
- }), (a, u) => (P(), $(D(r), B({
1011
+ }), (l, i) => (x(), O(M(h), F({
994
1012
  ref_key: "nativeRef",
995
1013
  ref: d,
996
1014
  src: e.src,
997
1015
  tintColor: e.tintColor
998
- }, a.$attrs), {
999
- default: R(() => [
1000
- F(a.$slots, "default")
1016
+ }, l.$attrs), {
1017
+ default: Q(() => [
1018
+ D(l.$slots, "default")
1001
1019
  ]),
1002
1020
  _: 3
1003
1021
  }, 16, ["src", "tintColor"]));
1004
1022
  }
1005
1023
  });
1006
- let le;
1007
- var _e;
1024
+ let ie;
1025
+ var $e;
1008
1026
  try {
1009
1027
  const e = require("@extscreen/es3-vue");
1010
- le = e.registerElement || ((_e = e.default) == null ? void 0 : _e.registerElement);
1028
+ ie = e.registerElement || (($e = e.default) == null ? void 0 : $e.registerElement);
1011
1029
  } catch {
1012
1030
  }
1013
- const ut = {
1031
+ const nt = {
1014
1032
  install: (e) => {
1015
1033
  if (!globalThis.__QtSvgImage_registered)
1016
- if (le) {
1017
- const i = (d, s) => {
1018
- le(d, {
1034
+ if (ie) {
1035
+ const a = (d, u) => {
1036
+ ie(d, {
1019
1037
  component: {
1020
- name: s ? "QtSvgImage_Plugin" : "QtSvgImage",
1021
- processEventData(f, v) {
1022
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
1023
- return l && (l.nativeEvent = r), l;
1038
+ name: u ? "QtSvgImage_Plugin" : "QtSvgImage",
1039
+ processEventData(v, g) {
1040
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1041
+ return c && (c.nativeEvent = s), c;
1024
1042
  }
1025
1043
  }
1026
1044
  });
1027
1045
  };
1028
- i("qt-svg-image", !1), i("qt-svg-image-plugin", !0), i("QtSvgImage", !1), i("QtSvgImage_Plugin", !0), globalThis.__QtSvgImage_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtSvgImage");
1046
+ a("qt-svg-image", !1), a("qt-svg-image-plugin", !0), a("QtSvgImage", !1), a("QtSvgImage_Plugin", !0), globalThis.__QtSvgImage_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtSvgImage");
1029
1047
  } else
1030
1048
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1031
- e.component("SvgImage", Se), e.component("qt-svg-image", Se);
1049
+ e.component("SvgImage", pe), e.component("qt-svg-image", pe);
1032
1050
  }
1033
- }, Ee = "QtNaButton", dt = /* @__PURE__ */ w({
1051
+ }, at = {
1052
+ inheritAttrs: !1
1053
+ }, lt = /* @__PURE__ */ $({
1054
+ ...at,
1034
1055
  __name: "NaButtonBase",
1035
1056
  props: {
1036
1057
  text: {},
@@ -1052,18 +1073,18 @@ const ut = {
1052
1073
  enableFocusBorder: { type: Boolean }
1053
1074
  },
1054
1075
  emits: ["onButtonCustomEvent"],
1055
- setup(e, { expose: i }) {
1056
- const d = A(), s = _(), f = Ee + "_Plugin", l = (s.isPluginActive ? f : Ee).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1057
- l,
1058
- s.pluginPackageName || "com.quicktvui.plugin.extraui",
1076
+ setup(e, { expose: a }) {
1077
+ const d = A(), u = L(), v = "QtNaButton", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1078
+ s,
1079
+ u.pluginPackageName || "com.quicktvui.plugin.extraui",
1059
1080
  "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
1060
1081
  );
1061
- return i({
1082
+ return a({
1062
1083
  getNativeNode: () => {
1063
- var a, u;
1064
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
1084
+ var l, i;
1085
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
1065
1086
  }
1066
- }), (a, u) => (P(), $(D(r), B({
1087
+ }), (l, i) => (x(), O(M(h), F({
1067
1088
  ref_key: "nativeRef",
1068
1089
  ref: d,
1069
1090
  text: e.text,
@@ -1083,61 +1104,67 @@ const ut = {
1083
1104
  cornerRadius: e.cornerRadius,
1084
1105
  focusScale: e.focusScale,
1085
1106
  enableFocusBorder: e.enableFocusBorder,
1086
- onOnButtonCustomEvent: u[0] || (u[0] = (g) => a.$emit("onButtonCustomEvent", g.nativeEvent))
1087
- }, a.$attrs), {
1088
- default: R(() => [
1089
- F(a.$slots, "default")
1107
+ onOnButtonCustomEvent: i[0] || (i[0] = (f) => l.$emit("onButtonCustomEvent", f.nativeEvent))
1108
+ }, l.$attrs), {
1109
+ default: Q(() => [
1110
+ D(l.$slots, "default")
1090
1111
  ]),
1091
1112
  _: 3
1092
1113
  }, 16, ["text", "icon", "iconSize", "iconSpace", "layoutDirection", "fontSize", "maxLines", "textColor", "focusTextColor", "backgroundColor", "focusBackgroundColor", "normalBorderWidth", "normalBorderColor", "focusBorderColor", "cornerRadius", "focusScale", "enableFocusBorder"]));
1093
1114
  }
1094
- }), xe = /* @__PURE__ */ w({
1115
+ }), it = {
1116
+ inheritAttrs: !1
1117
+ }, Ce = /* @__PURE__ */ $({
1118
+ ...it,
1095
1119
  __name: "NaButton",
1096
1120
  props: {
1097
1121
  width: {},
1098
1122
  height: {}
1099
1123
  },
1100
1124
  setup(e) {
1101
- const i = e, d = W(() => ({
1102
- width: typeof i.width == "number" ? `${i.width}px` : i.width,
1103
- height: typeof i.height == "number" ? `${i.height}px` : i.height
1125
+ const a = e, d = j(() => ({
1126
+ width: typeof a.width == "number" ? `${a.width}px` : a.width,
1127
+ height: typeof a.height == "number" ? `${a.height}px` : a.height
1104
1128
  }));
1105
- return (s, f) => (P(), $(dt, B(s.$attrs, { style: d.value }), {
1106
- default: R(() => [
1107
- F(s.$slots, "default")
1129
+ return (u, v) => (x(), O(lt, F(u.$attrs, { style: d.value }), {
1130
+ default: Q(() => [
1131
+ D(u.$slots, "default")
1108
1132
  ]),
1109
1133
  _: 3
1110
1134
  }, 16, ["style"]));
1111
1135
  }
1112
1136
  });
1113
1137
  let re;
1114
- var Ue;
1138
+ var Be;
1115
1139
  try {
1116
1140
  const e = require("@extscreen/es3-vue");
1117
- re = e.registerElement || ((Ue = e.default) == null ? void 0 : Ue.registerElement);
1141
+ re = e.registerElement || ((Be = e.default) == null ? void 0 : Be.registerElement);
1118
1142
  } catch {
1119
1143
  }
1120
- const gt = {
1144
+ const rt = {
1121
1145
  install: (e) => {
1122
1146
  if (!globalThis.__QtNaButton_registered)
1123
1147
  if (re) {
1124
- const i = (d, s) => {
1148
+ const a = (d, u) => {
1125
1149
  re(d, {
1126
1150
  component: {
1127
- name: s ? "QtNaButton_Plugin" : "QtNaButton",
1128
- processEventData(f, v) {
1129
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
1130
- return l && (l.nativeEvent = r), l;
1151
+ name: u ? "QtNaButton_Plugin" : "QtNaButton",
1152
+ processEventData(v, g) {
1153
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1154
+ return c && (c.nativeEvent = s), c;
1131
1155
  }
1132
1156
  }
1133
1157
  });
1134
1158
  };
1135
- i("qt-na-button", !1), i("qt-na-button-plugin", !0), i("QtNaButton", !1), i("QtNaButton_Plugin", !0), globalThis.__QtNaButton_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaButton");
1159
+ a("qt-na-button", !1), a("qt-na-button-plugin", !0), a("QtNaButton", !1), a("QtNaButton_Plugin", !0), globalThis.__QtNaButton_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaButton");
1136
1160
  } else
1137
1161
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1138
- e.component("NaButton", xe), e.component("qt-na-button", xe);
1162
+ e.component("NaButton", Ce), e.component("qt-na-button", Ce);
1139
1163
  }
1140
- }, Ae = "QtNaCheckbox", we = /* @__PURE__ */ w({
1164
+ }, st = {
1165
+ inheritAttrs: !1
1166
+ }, ke = /* @__PURE__ */ $({
1167
+ ...st,
1141
1168
  __name: "NaCheckbox",
1142
1169
  props: {
1143
1170
  text: {},
@@ -1183,17 +1210,17 @@ const gt = {
1183
1210
  type: {}
1184
1211
  },
1185
1212
  emits: ["onCheckedChange"],
1186
- setup(e, { expose: i }) {
1187
- const d = A(), s = _(), f = Ae + "_Plugin", l = (s.isPluginActive ? f : Ae).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1188
- l,
1189
- s.pluginPackageName || ""
1213
+ setup(e, { expose: a }) {
1214
+ const d = A(), u = L(), v = "QtNaCheckbox", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1215
+ s,
1216
+ u.pluginPackageName || ""
1190
1217
  );
1191
- return i({
1218
+ return a({
1192
1219
  getNativeNode: () => {
1193
- var a, u;
1194
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
1220
+ var l, i;
1221
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
1195
1222
  }
1196
- }), (a, u) => (P(), $(D(r), B({
1223
+ }), (l, i) => (x(), O(M(h), F({
1197
1224
  ref_key: "nativeRef",
1198
1225
  ref: d,
1199
1226
  text: e.text,
@@ -1237,43 +1264,43 @@ const gt = {
1237
1264
  cornerRadius: e.cornerRadius,
1238
1265
  focusScale: e.focusScale,
1239
1266
  type: e.type,
1240
- onOnCheckedChange: u[0] || (u[0] = (g) => a.$emit("onCheckedChange", g.nativeEvent))
1241
- }, a.$attrs), {
1242
- default: R(() => [
1243
- F(a.$slots, "default")
1267
+ onOnCheckedChange: i[0] || (i[0] = (f) => l.$emit("onCheckedChange", f.nativeEvent))
1268
+ }, l.$attrs), {
1269
+ default: Q(() => [
1270
+ D(l.$slots, "default")
1244
1271
  ]),
1245
1272
  _: 3
1246
1273
  }, 16, ["text", "checked", "disabled", "checkedIcon", "uncheckedIcon", "iconSize", "iconSpace", "layoutDirection", "gravity", "paddingX", "showBackground", "fontSize", "textColor", "focusTextColor", "checkedTextColor", "focusCheckedTextColor", "disabledTextColor", "iconColor", "focusIconColor", "checkedIconColor", "focusCheckedIconColor", "disabledIconColor", "iconInnerColor", "focusIconInnerColor", "checkedIconInnerColor", "focusCheckedIconInnerColor", "disabledIconInnerColor", "focusMode", "bgColor", "focusBgColor", "checkedBgColor", "focusCheckedBgColor", "disabledBgColor", "borderColor", "focusBorderColor", "checkedBorderColor", "focusCheckedBorderColor", "disabledBorderColor", "cornerRadius", "focusScale", "type"]));
1247
1274
  }
1248
1275
  });
1249
1276
  let se;
1250
- var Ve;
1277
+ var Ge;
1251
1278
  try {
1252
1279
  const e = require("@extscreen/es3-vue");
1253
- se = e.registerElement || ((Ve = e.default) == null ? void 0 : Ve.registerElement);
1280
+ se = e.registerElement || ((Ge = e.default) == null ? void 0 : Ge.registerElement);
1254
1281
  } catch {
1255
1282
  }
1256
- const ft = {
1283
+ const ct = {
1257
1284
  install: (e) => {
1258
1285
  if (!globalThis.__QtNaCheckbox_registered)
1259
1286
  if (se) {
1260
- const i = (d, s) => {
1287
+ const a = (d, u) => {
1261
1288
  se(d, {
1262
1289
  component: {
1263
- name: s ? "QtNaCheckbox_Plugin" : "QtNaCheckbox",
1264
- processEventData(f, v) {
1265
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
1266
- return l && (l.nativeEvent = r), l;
1290
+ name: u ? "QtNaCheckbox_Plugin" : "QtNaCheckbox",
1291
+ processEventData(v, g) {
1292
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1293
+ return c && (c.nativeEvent = s), c;
1267
1294
  }
1268
1295
  }
1269
1296
  });
1270
1297
  };
1271
- i("qt-na-checkbox", !1), i("qt-na-checkbox-plugin", !0), i("QtNaCheckbox", !1), i("QtNaCheckbox_Plugin", !0), globalThis.__QtNaCheckbox_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaCheckbox");
1298
+ a("qt-na-checkbox", !1), a("qt-na-checkbox-plugin", !0), a("QtNaCheckbox", !1), a("QtNaCheckbox_Plugin", !0), globalThis.__QtNaCheckbox_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaCheckbox");
1272
1299
  } else
1273
1300
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1274
- e.component("NaCheckbox", we), e.component("qt-na-checkbox", we);
1301
+ e.component("NaCheckbox", ke), e.component("qt-na-checkbox", ke);
1275
1302
  }
1276
- }, vt = w({
1303
+ }, ut = $({
1277
1304
  name: "NaRadioGroup",
1278
1305
  props: {
1279
1306
  modelValue: {
@@ -1310,55 +1337,55 @@ const ft = {
1310
1337
  }
1311
1338
  },
1312
1339
  emits: ["update:modelValue", "change"],
1313
- setup(e, { emit: i }) {
1340
+ setup(e, { emit: a }) {
1314
1341
  return {
1315
- groupStyle: W(() => ({
1342
+ groupStyle: j(() => ({
1316
1343
  display: "flex",
1317
1344
  flexDirection: e.direction,
1318
1345
  alignItems: "center"
1319
1346
  })),
1320
- getItemStyle: (v, l) => {
1321
- var a;
1322
- const r = { ...((a = v.props) == null ? void 0 : a.style) || {} };
1323
- return e.itemWidth !== void 0 && (r.width = e.itemWidth), e.itemHeight !== void 0 && (r.height = e.itemHeight), l !== e.options.length - 1 && (e.direction === "row" ? r.marginRight = e.itemGap : r.marginBottom = e.itemGap), r;
1347
+ getItemStyle: (g, c) => {
1348
+ var h;
1349
+ const s = { ...((h = g.props) == null ? void 0 : h.style) || {} };
1350
+ return e.itemWidth !== void 0 && (s.width = e.itemWidth), e.itemHeight !== void 0 && (s.height = e.itemHeight), c !== e.options.length - 1 && (e.direction === "row" ? s.marginRight = e.itemGap : s.marginBottom = e.itemGap), s;
1324
1351
  },
1325
- onItemClick: (v) => {
1326
- v.disabled || (i("update:modelValue", v.value), i("change", v.value));
1352
+ onItemClick: (g) => {
1353
+ g.disabled || (a("update:modelValue", g.value), a("change", g.value));
1327
1354
  }
1328
1355
  };
1329
1356
  }
1330
1357
  });
1331
- const ve = (e, i) => {
1358
+ const ge = (e, a) => {
1332
1359
  const d = e.__vccOpts || e;
1333
- for (const [s, f] of i)
1334
- d[s] = f;
1360
+ for (const [u, v] of a)
1361
+ d[u] = v;
1335
1362
  return d;
1336
1363
  };
1337
- function mt(e, i, d, s, f, v) {
1338
- const l = ge("qt-na-checkbox");
1339
- return P(), Z("div", {
1364
+ function dt(e, a, d, u, v, g) {
1365
+ const c = de("qt-na-checkbox");
1366
+ return x(), Z("div", {
1340
1367
  class: "na-radio-group",
1341
1368
  style: fe(e.groupStyle)
1342
1369
  }, [
1343
- (P(!0), Z(Ke, null, He(e.options, (r, a) => (P(), $(l, B({
1344
- key: a,
1370
+ (x(!0), Z(_e, null, qe(e.options, (s, h) => (x(), O(c, F({
1371
+ key: h,
1345
1372
  type: "radio",
1346
- checked: e.modelValue === r.value,
1347
- text: r.label,
1373
+ checked: e.modelValue === s.value,
1374
+ text: s.label,
1348
1375
  gravity: e.gravity,
1349
1376
  showBackground: e.showBackground,
1350
- disabled: r.disabled
1351
- }, { ref_for: !0 }, r.props, {
1352
- style: e.getItemStyle(r, a),
1353
- onClick: (u) => e.onItemClick(r)
1377
+ disabled: s.disabled
1378
+ }, { ref_for: !0 }, s.props, {
1379
+ style: e.getItemStyle(s, h),
1380
+ onClick: (l) => e.onItemClick(s)
1354
1381
  }), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
1355
1382
  ], 4);
1356
1383
  }
1357
- const $e = /* @__PURE__ */ ve(vt, [["render", mt], ["__scopeId", "data-v-448252ff"]]), bt = {
1384
+ const Te = /* @__PURE__ */ ge(ut, [["render", dt], ["__scopeId", "data-v-448252ff"]]), ft = {
1358
1385
  install: (e) => {
1359
- e.component("NaRadioGroup", $e), e.component("qt-na-radio-group", $e);
1386
+ e.component("NaRadioGroup", Te), e.component("qt-na-radio-group", Te);
1360
1387
  }
1361
- }, yt = w({
1388
+ }, gt = $({
1362
1389
  name: "NaCheckboxGroup",
1363
1390
  props: {
1364
1391
  modelValue: {
@@ -1395,52 +1422,55 @@ const $e = /* @__PURE__ */ ve(vt, [["render", mt], ["__scopeId", "data-v-448252f
1395
1422
  }
1396
1423
  },
1397
1424
  emits: ["update:modelValue", "change"],
1398
- setup(e, { emit: i }) {
1425
+ setup(e, { emit: a }) {
1399
1426
  return {
1400
- groupStyle: W(() => ({
1427
+ groupStyle: j(() => ({
1401
1428
  display: "flex",
1402
1429
  flexDirection: e.direction,
1403
1430
  alignItems: "center"
1404
1431
  })),
1405
- getItemStyle: (v, l) => {
1406
- var a;
1407
- const r = { ...((a = v.props) == null ? void 0 : a.style) || {} };
1408
- return e.itemWidth !== void 0 && (r.width = e.itemWidth), e.itemHeight !== void 0 && (r.height = e.itemHeight), l !== e.options.length - 1 && (e.direction === "row" ? r.marginRight = e.itemGap : r.marginBottom = e.itemGap), r;
1432
+ getItemStyle: (g, c) => {
1433
+ var h;
1434
+ const s = { ...((h = g.props) == null ? void 0 : h.style) || {} };
1435
+ return e.itemWidth !== void 0 && (s.width = e.itemWidth), e.itemHeight !== void 0 && (s.height = e.itemHeight), c !== e.options.length - 1 && (e.direction === "row" ? s.marginRight = e.itemGap : s.marginBottom = e.itemGap), s;
1409
1436
  },
1410
- onItemClick: (v) => {
1411
- if (v.disabled)
1437
+ onItemClick: (g) => {
1438
+ if (g.disabled)
1412
1439
  return;
1413
- const l = [...e.modelValue], r = l.indexOf(v.value);
1414
- r > -1 ? l.splice(r, 1) : l.push(v.value), i("update:modelValue", l), i("change", l);
1440
+ const c = [...e.modelValue], s = c.indexOf(g.value);
1441
+ s > -1 ? c.splice(s, 1) : c.push(g.value), a("update:modelValue", c), a("change", c);
1415
1442
  }
1416
1443
  };
1417
1444
  }
1418
1445
  });
1419
- function ht(e, i, d, s, f, v) {
1420
- const l = ge("qt-na-checkbox");
1421
- return P(), Z("div", {
1446
+ function vt(e, a, d, u, v, g) {
1447
+ const c = de("qt-na-checkbox");
1448
+ return x(), Z("div", {
1422
1449
  class: "na-checkbox-group",
1423
1450
  style: fe(e.groupStyle)
1424
1451
  }, [
1425
- (P(!0), Z(Ke, null, He(e.options, (r, a) => (P(), $(l, B({
1426
- key: a,
1452
+ (x(!0), Z(_e, null, qe(e.options, (s, h) => (x(), O(c, F({
1453
+ key: h,
1427
1454
  type: "checkbox",
1428
- checked: e.modelValue.includes(r.value),
1429
- text: r.label,
1455
+ checked: e.modelValue.includes(s.value),
1456
+ text: s.label,
1430
1457
  gravity: e.gravity,
1431
1458
  showBackground: e.showBackground,
1432
- disabled: r.disabled
1433
- }, { ref_for: !0 }, r.props, {
1434
- style: e.getItemStyle(r, a),
1435
- onClick: (u) => e.onItemClick(r)
1459
+ disabled: s.disabled
1460
+ }, { ref_for: !0 }, s.props, {
1461
+ style: e.getItemStyle(s, h),
1462
+ onClick: (l) => e.onItemClick(s)
1436
1463
  }), null, 16, ["checked", "text", "gravity", "showBackground", "disabled", "style", "onClick"]))), 128))
1437
1464
  ], 4);
1438
1465
  }
1439
- const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4eaa"]]), pt = {
1466
+ const Ie = /* @__PURE__ */ ge(gt, [["render", vt], ["__scopeId", "data-v-cf6a4eaa"]]), mt = {
1440
1467
  install: (e) => {
1441
- e.component("NaCheckboxGroup", Be), e.component("qt-na-checkbox-group", Be);
1468
+ e.component("NaCheckboxGroup", Ie), e.component("qt-na-checkbox-group", Ie);
1442
1469
  }
1443
- }, Ge = "QtNaSwitcher", Oe = /* @__PURE__ */ w({
1470
+ }, bt = {
1471
+ inheritAttrs: !1
1472
+ }, Ne = /* @__PURE__ */ $({
1473
+ ...bt,
1444
1474
  __name: "NaSwitcher",
1445
1475
  props: {
1446
1476
  checked: { type: Boolean },
@@ -1457,17 +1487,17 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
1457
1487
  stateTextSize: {}
1458
1488
  },
1459
1489
  emits: ["onCheckedChange"],
1460
- setup(e, { expose: i }) {
1461
- const d = A(), s = _(), f = Ge + "_Plugin", l = (s.isPluginActive ? f : Ge).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1462
- l,
1463
- s.pluginPackageName || ""
1490
+ setup(e, { expose: a }) {
1491
+ const d = A(), u = L(), v = "QtNaSwitcher", g = v + "_Plugin", s = (u.isPluginActive ? g : v).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), h = z(
1492
+ s,
1493
+ u.pluginPackageName || ""
1464
1494
  );
1465
- return i({
1495
+ return a({
1466
1496
  getNativeNode: () => {
1467
- var a, u;
1468
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
1497
+ var l, i;
1498
+ return ((i = (l = d.value) == null ? void 0 : l.getNativeNode) == null ? void 0 : i.call(l)) || d.value;
1469
1499
  }
1470
- }), (a, u) => (P(), $(D(r), B({
1500
+ }), (l, i) => (x(), O(M(h), F({
1471
1501
  ref_key: "nativeRef",
1472
1502
  ref: d,
1473
1503
  checked: e.checked,
@@ -1482,43 +1512,43 @@ const Be = /* @__PURE__ */ ve(yt, [["render", ht], ["__scopeId", "data-v-cf6a4ea
1482
1512
  titleTextSize: e.titleTextSize,
1483
1513
  subtitleTextSize: e.subtitleTextSize,
1484
1514
  stateTextSize: e.stateTextSize,
1485
- onOnCheckedChange: u[0] || (u[0] = (g) => a.$emit("onCheckedChange", g.nativeEvent))
1486
- }, a.$attrs), {
1487
- default: R(() => [
1488
- F(a.$slots, "default")
1515
+ onOnCheckedChange: i[0] || (i[0] = (f) => l.$emit("onCheckedChange", f.nativeEvent))
1516
+ }, l.$attrs), {
1517
+ default: Q(() => [
1518
+ D(l.$slots, "default")
1489
1519
  ]),
1490
1520
  _: 3
1491
1521
  }, 16, ["checked", "disabled", "title", "textOn", "textOff", "subtitle", "subtitleColor", "titleColor", "focusTitleColor", "titleTextSize", "subtitleTextSize", "stateTextSize"]));
1492
1522
  }
1493
1523
  });
1494
1524
  let ce;
1495
- var We;
1525
+ var Oe;
1496
1526
  try {
1497
1527
  const e = require("@extscreen/es3-vue");
1498
- ce = e.registerElement || ((We = e.default) == null ? void 0 : We.registerElement);
1528
+ ce = e.registerElement || ((Oe = e.default) == null ? void 0 : Oe.registerElement);
1499
1529
  } catch {
1500
1530
  }
1501
- const Ct = {
1531
+ const yt = {
1502
1532
  install: (e) => {
1503
1533
  if (!globalThis.__QtNaSwitcher_registered)
1504
1534
  if (ce) {
1505
- const i = (d, s) => {
1535
+ const a = (d, u) => {
1506
1536
  ce(d, {
1507
1537
  component: {
1508
- name: s ? "QtNaSwitcher_Plugin" : "QtNaSwitcher",
1509
- processEventData(f, v) {
1510
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
1511
- return l && (l.nativeEvent = r), l;
1538
+ name: u ? "QtNaSwitcher_Plugin" : "QtNaSwitcher",
1539
+ processEventData(v, g) {
1540
+ const c = v.handler || v, s = g || (c == null ? void 0 : c.nativeParams) || {};
1541
+ return c && (c.nativeEvent = s), c;
1512
1542
  }
1513
1543
  }
1514
1544
  });
1515
1545
  };
1516
- i("qt-na-switcher", !1), i("qt-na-switcher-plugin", !0), i("QtNaSwitcher", !1), i("QtNaSwitcher_Plugin", !0), globalThis.__QtNaSwitcher_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaSwitcher");
1546
+ a("qt-na-switcher", !1), a("qt-na-switcher-plugin", !0), a("QtNaSwitcher", !1), a("QtNaSwitcher_Plugin", !0), globalThis.__QtNaSwitcher_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaSwitcher");
1517
1547
  } else
1518
1548
  console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1519
- e.component("NaSwitcher", Oe), e.component("qt-na-switcher", Oe);
1549
+ e.component("NaSwitcher", Ne), e.component("qt-na-switcher", Ne);
1520
1550
  }
1521
- }, kt = w({
1551
+ }, ht = $({
1522
1552
  name: "NaSettingSwitch",
1523
1553
  props: {
1524
1554
  title: {
@@ -1567,32 +1597,32 @@ const Ct = {
1567
1597
  }
1568
1598
  },
1569
1599
  emits: ["update:modelValue", "change"],
1570
- setup(e, { emit: i, attrs: d }) {
1571
- const s = A(e.modelValue);
1572
- ee(() => e.modelValue, (r) => {
1573
- s.value = r;
1600
+ setup(e, { emit: a, attrs: d }) {
1601
+ const u = A(e.modelValue);
1602
+ ee(() => e.modelValue, (s) => {
1603
+ u.value = s;
1574
1604
  });
1575
- const f = (r) => {
1576
- const a = r.checked;
1577
- s.value = a, i("update:modelValue", a), i("change", a);
1578
- }, v = W(() => typeof e.width == "number" ? `${e.width}px` : e.width), l = W(() => {
1579
- const r = d.style || {}, a = e.subtitle ? (typeof e.height == "number" ? e.height : parseInt(e.height)) + 30 : e.height;
1605
+ const v = (s) => {
1606
+ const h = s.checked;
1607
+ u.value = h, a("update:modelValue", h), a("change", h);
1608
+ }, g = j(() => typeof e.width == "number" ? `${e.width}px` : e.width), c = j(() => {
1609
+ const s = d.style || {}, h = e.subtitle ? (typeof e.height == "number" ? e.height : parseInt(e.height)) + 30 : e.height;
1580
1610
  return {
1581
- width: v.value,
1582
- height: typeof a == "number" ? `${a}px` : a,
1583
- ...r
1611
+ width: g.value,
1612
+ height: typeof h == "number" ? `${h}px` : h,
1613
+ ...s
1584
1614
  };
1585
1615
  });
1586
1616
  return {
1587
- checked: s,
1588
- handleCheckedChange: f,
1589
- mergedStyle: l
1617
+ checked: u,
1618
+ handleCheckedChange: v,
1619
+ mergedStyle: c
1590
1620
  };
1591
1621
  }
1592
1622
  });
1593
- function It(e, i, d, s, f, v) {
1594
- const l = ge("qt-na-switcher");
1595
- return P(), $(l, {
1623
+ function pt(e, a, d, u, v, g) {
1624
+ const c = de("qt-na-switcher");
1625
+ return x(), O(c, {
1596
1626
  class: "na-setting-switch",
1597
1627
  style: fe(e.mergedStyle),
1598
1628
  title: e.title,
@@ -1607,119 +1637,16 @@ function It(e, i, d, s, f, v) {
1607
1637
  onOnCheckedChange: e.handleCheckedChange
1608
1638
  }, null, 8, ["style", "title", "subtitle", "checked", "textOn", "textOff", "titleTextSize", "subtitleTextSize", "stateTextSize", "disabled", "onOnCheckedChange"]);
1609
1639
  }
1610
- const qe = /* @__PURE__ */ ve(kt, [["render", It]]), Nt = {
1640
+ const Pe = /* @__PURE__ */ ge(ht, [["render", pt]]), Ct = {
1611
1641
  install(e) {
1612
- e.component("NaSettingSwitch", qe), e.component("qt-na-setting-switch", qe);
1613
- }
1614
- }, Qe = "QtNaInputView", Tt = /* @__PURE__ */ w({
1615
- __name: "NaInputViewBase",
1616
- props: {
1617
- text: {},
1618
- placeholder: {},
1619
- type: {},
1620
- status: {},
1621
- disabled: { type: Boolean },
1622
- inputSize: {},
1623
- cursorVisible: { type: Boolean },
1624
- useSystemKeyboard: { type: Boolean },
1625
- trailingIcon: {}
1626
- },
1627
- emits: ["onInputClick", "onChange"],
1628
- setup(e, { expose: i }) {
1629
- const d = A(), s = _(), f = Qe + "_Plugin", l = (s.isPluginActive ? f : Qe).replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""), r = L(
1630
- l,
1631
- s.pluginPackageName || "com.quicktvui.plugin.extraui",
1632
- "com.quicktvui.plugin.extraui.ExtraUIPluginApp"
1633
- );
1634
- return i({
1635
- getNativeNode: () => {
1636
- var a, u;
1637
- return ((u = (a = d.value) == null ? void 0 : a.getNativeNode) == null ? void 0 : u.call(a)) || d.value;
1638
- }
1639
- }), (a, u) => (P(), $(D(r), B({
1640
- ref_key: "nativeRef",
1641
- ref: d,
1642
- text: e.text,
1643
- placeholder: e.placeholder,
1644
- type: e.type,
1645
- status: e.status,
1646
- disabled: e.disabled,
1647
- inputSize: e.inputSize,
1648
- cursorVisible: e.cursorVisible,
1649
- useSystemKeyboard: e.useSystemKeyboard,
1650
- trailingIcon: e.trailingIcon,
1651
- onOnInputClick: u[0] || (u[0] = (g) => a.$emit("onInputClick", g.nativeEvent)),
1652
- onOnChange: u[1] || (u[1] = (g) => a.$emit("onChange", g.nativeEvent))
1653
- }, a.$attrs), {
1654
- default: R(() => [
1655
- F(a.$slots, "default")
1656
- ]),
1657
- _: 3
1658
- }, 16, ["text", "placeholder", "type", "status", "disabled", "inputSize", "cursorVisible", "useSystemKeyboard", "trailingIcon"]));
1642
+ e.component("NaSettingSwitch", Pe), e.component("qt-na-setting-switch", Pe);
1659
1643
  }
1660
- }), Re = /* @__PURE__ */ w({
1661
- __name: "NaInputView",
1662
- props: {
1663
- inputSize: { default: "medium" }
1664
- },
1665
- emits: ["onInputClick", "onChange"],
1666
- setup(e, { emit: i }) {
1667
- const d = i, s = e, f = W(() => {
1668
- let r = 60;
1669
- return s.inputSize === "large" ? r = 70 : s.inputSize === "small" && (r = 50), {
1670
- height: `${r}px`
1671
- };
1672
- }), v = (r) => {
1673
- d("onInputClick", r);
1674
- }, l = (r) => {
1675
- d("onChange", r);
1676
- };
1677
- return (r, a) => (P(), $(Tt, B(r.$attrs, {
1678
- style: f.value,
1679
- inputSize: e.inputSize,
1680
- onOnInputClick: v,
1681
- onOnChange: l
1682
- }), {
1683
- default: R(() => [
1684
- F(r.$slots, "default")
1685
- ]),
1686
- _: 3
1687
- }, 16, ["style", "inputSize"]));
1688
- }
1689
- });
1690
- let ue;
1691
- var je;
1692
- try {
1693
- const e = require("@extscreen/es3-vue");
1694
- ue = e.registerElement || ((je = e.default) == null ? void 0 : je.registerElement);
1695
- } catch {
1696
- }
1697
- const Pt = {
1698
- install: (e) => {
1699
- if (!globalThis.__QtNaInputView_registered)
1700
- if (ue) {
1701
- const i = (d, s) => {
1702
- ue(d, {
1703
- component: {
1704
- name: s ? "QtNaInputView_Plugin" : "QtNaInputView",
1705
- processEventData(f, v) {
1706
- const l = f.handler || f, r = v || (l == null ? void 0 : l.nativeParams) || {};
1707
- return l && (l.nativeEvent = r), l;
1708
- }
1709
- }
1710
- });
1711
- };
1712
- i("qt-na-input-view", !1), i("qt-na-input-view-plugin", !0), i("QtNaInputView", !1), i("QtNaInputView_Plugin", !0), globalThis.__QtNaInputView_registered = !0, console.log("[@quicktvui/naddons] Successfully registered Native tag:", "QtNaInputView");
1713
- } else
1714
- console.warn("[@quicktvui/naddons] Failed to find registerElement from @extscreen/es3-vue");
1715
- e.component("NaInputView", Re), e.component("qt-na-input-view", Re);
1716
- }
1717
- }, St = {
1644
+ }, kt = {
1718
1645
  // 如果设置为 true,则全局跳过所有组件的原生插件安装检查,直接渲染
1719
1646
  skipPluginCheck: !1
1720
1647
  }, Y = /* @__PURE__ */ new Set();
1721
- function L(e, i, d) {
1722
- return w({
1648
+ function z(e, a, d) {
1649
+ return $({
1723
1650
  name: `${e}AsyncWrapper`,
1724
1651
  inheritAttrs: !1,
1725
1652
  props: {
@@ -1729,206 +1656,206 @@ function L(e, i, d) {
1729
1656
  default: !1
1730
1657
  }
1731
1658
  },
1732
- setup(s, { slots: f, attrs: v, expose: l }) {
1733
- const r = A("loading"), a = A(""), u = A(), g = globalThis.__VUE_INSTANCE__;
1734
- l({
1659
+ setup(u, { slots: v, attrs: g, expose: c }) {
1660
+ const s = A("loading"), h = A(""), l = A(), i = globalThis.__VUE_INSTANCE__;
1661
+ c({
1735
1662
  getNativeNode: () => {
1736
- let p = u.value;
1737
- return !p && g && g.vnode && g.vnode.el && (p = g.vnode.el, p.childNodes && p.childNodes.length > 0 && (p = p.childNodes[0])), p;
1663
+ let C = l.value;
1664
+ return !C && i && i.vnode && i.vnode.el && (C = i.vnode.el, C.childNodes && C.childNodes.length > 0 && (C = C.childNodes[0])), C;
1738
1665
  },
1739
- nativeRef: u
1666
+ nativeRef: l
1740
1667
  });
1741
- let z = null, q = null;
1668
+ let w = null, _ = null;
1742
1669
  try {
1743
- z = Je(), q = at();
1744
- } catch (p) {
1745
- console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", p);
1670
+ w = Fe(), _ = Ve();
1671
+ } catch (C) {
1672
+ console.warn("[withAsyncPlugin] 获取 useES 或 useESPlugin 失败,可能处于非 ES 环境。", C);
1746
1673
  }
1747
1674
  const J = async () => {
1748
- if (!z || typeof z.isComponentRegistered != "function")
1675
+ if (!w || typeof w.isComponentRegistered != "function")
1749
1676
  return console.log("[withAsyncPlugin] es.isComponentRegistered 不可用"), !1;
1750
1677
  try {
1751
- const p = await z.isComponentRegistered(e);
1752
- if (console.log(`[withAsyncPlugin] isComponentRegistered('${e}') 返回:`, p), p === !0 || p && typeof p == "object" && (p.registered === !0 || p.isRegistered === !0))
1678
+ const C = await w.isComponentRegistered(e);
1679
+ if (console.log(`[withAsyncPlugin] isComponentRegistered('${e}') 返回:`, C), C === !0 || C && typeof C == "object" && (C.registered === !0 || C.isRegistered === !0))
1753
1680
  return !0;
1754
1681
  try {
1755
- const I = await N.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
1756
- if (I && I.core_version) {
1757
- const S = I.core_version;
1758
- console.log(`[withAsyncPlugin] 当前引擎核心版本: ${S}`);
1759
- const E = S.split(".").map((G) => parseInt(G, 10));
1760
- if (E.length >= 3 && !isNaN(E[0]) && !isNaN(E[1]) && !isNaN(E[2]))
1761
- if (E[0] * 1e6 + E[1] * 1e3 + E[2] >= 1011205) {
1682
+ const T = await I.callNativeWithPromise("ExtendModule", "getCoreSDKInfo");
1683
+ if (T && T.core_version) {
1684
+ const P = T.core_version;
1685
+ console.log(`[withAsyncPlugin] 当前引擎核心版本: ${P}`);
1686
+ const S = P.split(".").map((B) => parseInt(B, 10));
1687
+ if (S.length >= 3 && !isNaN(S[0]) && !isNaN(S[1]) && !isNaN(S[2]))
1688
+ if (S[0] * 1e6 + S[1] * 1e3 + S[2] >= 1011205) {
1762
1689
  console.log(`[withAsyncPlugin] 引擎 >= 1.11.205,使用 ExtendModule 检查 Controller: ${e}`);
1763
- const T = e.split("-").map((x) => x.charAt(0).toUpperCase() + x.slice(1)).join("");
1764
- console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${e}, ${T}`);
1765
- const [O, M] = await Promise.all([
1766
- N.callNativeWithPromise("ExtendModule", "isComponentRegistered", e).catch(() => !1),
1767
- N.callNativeWithPromise("ExtendModule", "isComponentRegistered", T).catch(() => !1)
1690
+ const N = e.split("-").map((E) => E.charAt(0).toUpperCase() + E.slice(1)).join("");
1691
+ console.log(`[withAsyncPlugin] 同时检查原名和驼峰名: ${e}, ${N}`);
1692
+ const [G, R] = await Promise.all([
1693
+ I.callNativeWithPromise("ExtendModule", "isComponentRegistered", e).catch(() => !1),
1694
+ I.callNativeWithPromise("ExtendModule", "isComponentRegistered", N).catch(() => !1)
1768
1695
  ]);
1769
- if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${O}, ${M}]`), O === !0 || M === !0)
1696
+ if (console.log(`[withAsyncPlugin] ExtendModule.isComponentRegistered 返回: [${G}, ${R}]`), G === !0 || R === !0)
1770
1697
  return !0;
1771
1698
  } else
1772
- console.log(`[withAsyncPlugin] 引擎版本 ${S} < 1.11.205,跳过 ExtendModule 检查`);
1699
+ console.log(`[withAsyncPlugin] 引擎版本 ${P} < 1.11.205,跳过 ExtendModule 检查`);
1773
1700
  else
1774
- console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${S}`);
1701
+ console.log(`[withAsyncPlugin] 无法解析引擎版本号: ${P}`);
1775
1702
  }
1776
- } catch (I) {
1777
- console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", I);
1703
+ } catch (T) {
1704
+ console.log("[withAsyncPlugin] 获取引擎版本或检查 Controller 失败:", T);
1778
1705
  }
1779
1706
  return !1;
1780
- } catch (p) {
1781
- return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", p), !1;
1707
+ } catch (C) {
1708
+ return console.warn("[withAsyncPlugin] 检查组件注册状态异常:", C), !1;
1782
1709
  }
1783
1710
  }, U = async () => {
1784
- if (St.skipPluginCheck || s.skipPluginCheck) {
1785
- console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), r.value = "ready";
1711
+ if (kt.skipPluginCheck || u.skipPluginCheck) {
1712
+ console.log(`[withAsyncPlugin] 跳过 ${e} 插件检查 (skipPluginCheck = true)`), s.value = "ready";
1786
1713
  return;
1787
1714
  }
1788
- if (!i) {
1789
- r.value = "ready";
1715
+ if (!a) {
1716
+ s.value = "ready";
1790
1717
  return;
1791
1718
  }
1792
- const p = await J();
1793
- if (console.log(`[withAsyncPlugin] 拦截检查 - ${e} 是否已注册:`, p), p || Y.has(i)) {
1794
- r.value = "ready", Y.add(i), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
1719
+ const C = await J();
1720
+ if (console.log(`[withAsyncPlugin] 拦截检查 - ${e} 是否已注册:`, C), C || Y.has(a)) {
1721
+ s.value = "ready", Y.add(a), console.log("[withAsyncPlugin] 组件已注册,跳过安装流程");
1795
1722
  return;
1796
1723
  }
1797
- if (!q) {
1798
- console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`), r.value = "ready";
1724
+ if (!_) {
1725
+ console.warn(`[withAsyncPlugin] 无法获取 useESPlugin 实例,可能处于内置 AAR 环境或非插件环境,尝试直接渲染 ${e}`), s.value = "ready";
1799
1726
  return;
1800
1727
  }
1801
- console.log(`[withAsyncPlugin] 开始动态安装插件: ${i}`);
1728
+ console.log(`[withAsyncPlugin] 开始动态安装插件: ${a}`);
1802
1729
  try {
1803
- await new Promise((I, S) => {
1804
- let E;
1805
- const G = {
1806
- onPluginInstallSuccess(T, O, M) {
1807
- T === i && (clearTimeout(E), q.removeListener(G), console.log(`[withAsyncPlugin] 安装成功 pkg=${T} 状态码=${O}`), O == 1003 || O == 1001 ? (d ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${d}`), N.callNative("EsNativeModule", "callReflect", {
1730
+ await new Promise((T, P) => {
1731
+ let S;
1732
+ const B = {
1733
+ onPluginInstallSuccess(N, G, R) {
1734
+ N === a && (clearTimeout(S), _.removeListener(B), console.log(`[withAsyncPlugin] 安装成功 pkg=${N} 状态码=${G}`), G == 1003 || G == 1001 ? (d ? (console.log(`[withAsyncPlugin] 触发反射初始化: ${d}`), I.callNative("EsNativeModule", "callReflect", {
1808
1735
  entry: {
1809
1736
  from: d,
1810
1737
  method: "setup"
1811
1738
  }
1812
- })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), I()) : S(new Error(`安装失败 pkg=${T} status=${O} msg=${M}`)));
1739
+ })) : console.log("[withAsyncPlugin] 安装成功,跳过反射初始化(无 pluginInitClass)"), T()) : P(new Error(`安装失败 pkg=${N} status=${G} msg=${R}`)));
1813
1740
  },
1814
- onPluginInstallError(T, O, M) {
1815
- T === i && (clearTimeout(E), q.removeListener(G), S(new Error(`安装失败 pkg=${T} status=${O} msg=${M}`)));
1741
+ onPluginInstallError(N, G, R) {
1742
+ N === a && (clearTimeout(S), _.removeListener(B), P(new Error(`安装失败 pkg=${N} status=${G} msg=${R}`)));
1816
1743
  }
1817
1744
  };
1818
- q.addListener({ pkg: i }, G), E = setTimeout(() => {
1819
- q.removeListener(G), S(new Error(`插件安装超时: ${i}`));
1820
- }, 8e3), typeof q.installPlugin == "function" ? q.installPlugin({ pkg: i }) : typeof q.install == "function" ? q.install(i) : S(new Error("当前运行时不支持 install / installPlugin"));
1821
- }), await tt(), Y.add(i), r.value = "ready";
1822
- } catch (I) {
1823
- console.error("[withAsyncPlugin] 插件加载失败:", I), a.value = (I == null ? void 0 : I.message) || String(I), r.value = "error";
1745
+ _.addListener({ pkg: a }, B), S = setTimeout(() => {
1746
+ _.removeListener(B), P(new Error(`插件安装超时: ${a}`));
1747
+ }, 8e3), typeof _.installPlugin == "function" ? _.installPlugin({ pkg: a }) : typeof _.install == "function" ? _.install(a) : P(new Error("当前运行时不支持 install / installPlugin"));
1748
+ }), await ze(), Y.add(a), s.value = "ready";
1749
+ } catch (T) {
1750
+ console.error("[withAsyncPlugin] 插件加载失败:", T), h.value = (T == null ? void 0 : T.message) || String(T), s.value = "error";
1824
1751
  }
1825
1752
  };
1826
- return et(() => {
1753
+ return Me(() => {
1827
1754
  U();
1828
1755
  }), () => {
1829
- const p = {
1756
+ const C = {
1830
1757
  display: "flex",
1831
1758
  flexDirection: "column",
1832
1759
  justifyContent: "center",
1833
1760
  alignItems: "center",
1834
- ...v.style || {}
1761
+ ...g.style || {}
1835
1762
  };
1836
- v.width !== void 0 && !p.width && (p.width = typeof v.width == "number" ? `${v.width}px` : v.width), v.height !== void 0 && !p.height && (p.height = typeof v.height == "number" ? `${v.height}px` : v.height);
1837
- const I = v.class ? `qt-plugin-container ${v.class}` : "qt-plugin-container", S = {
1838
- class: I,
1839
- style: p,
1763
+ g.width !== void 0 && !C.width && (C.width = typeof g.width == "number" ? `${g.width}px` : g.width), g.height !== void 0 && !C.height && (C.height = typeof g.height == "number" ? `${g.height}px` : g.height);
1764
+ const T = g.class ? `qt-plugin-container ${g.class}` : "qt-plugin-container", P = {
1765
+ class: T,
1766
+ style: C,
1840
1767
  // 默认关闭外层 div 的裁剪,防止内部组件 focusScale 时被切
1841
1768
  clipChildren: !1,
1842
1769
  clipPadding: !1,
1843
1770
  clipToPadding: !1
1844
1771
  };
1845
- if (r.value === "loading")
1846
- return H("div", S, [
1772
+ if (s.value === "loading")
1773
+ return H("div", P, [
1847
1774
  H("div", { style: { color: "white", fontSize: "30px" } }, "插件加载中...")
1848
1775
  ]);
1849
- if (r.value === "error")
1850
- return H("div", S, [
1851
- H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${a.value}`)
1776
+ if (s.value === "error")
1777
+ return H("div", P, [
1778
+ H("div", { style: { color: "white", fontSize: "30px", backgroundColor: "rgba(255,0,0,0.5)" } }, `插件加载失败: ${h.value}`)
1852
1779
  ]);
1853
- const E = {}, G = {};
1854
- for (const [x, V] of Object.entries(v))
1855
- if (x.startsWith("on") && typeof V == "function") {
1856
- let j = x;
1857
- x.startsWith("onOn") && (j = "on" + x.slice(4)), G[j] = V;
1858
- } else if (x.startsWith("on") && Array.isArray(V)) {
1859
- let j = x;
1860
- x.startsWith("onOn") && (j = "on" + x.slice(4)), G[j] = V;
1780
+ const S = {}, B = {};
1781
+ for (const [E, V] of Object.entries(g))
1782
+ if (E.startsWith("on") && typeof V == "function") {
1783
+ let W = E;
1784
+ E.startsWith("onOn") && (W = "on" + E.slice(4)), B[W] = V;
1785
+ } else if (E.startsWith("on") && Array.isArray(V)) {
1786
+ let W = E;
1787
+ E.startsWith("onOn") && (W = "on" + E.slice(4)), B[W] = V;
1861
1788
  } else
1862
- x.startsWith("onOn") || (E[x] = V);
1863
- const T = {
1864
- ...E,
1865
- ...G,
1866
- class: I,
1789
+ E.startsWith("onOn") || (S[E] = V);
1790
+ const N = {
1791
+ ...S,
1792
+ ...B,
1793
+ class: T,
1867
1794
  // 把外层 class 传给内部
1868
- style: p,
1795
+ style: C,
1869
1796
  // 把外层 style 传给内部
1870
- ref: (x) => {
1871
- u.value = x;
1797
+ ref: (E) => {
1798
+ l.value = E;
1872
1799
  }
1873
- }, O = T.tabsData || "", M = T.actionPayload || "";
1874
- return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(T), "tabsData.length=", O.length, "actionPayload.length=", M.length), H(e, T, f.default ? f.default() : []);
1800
+ }, G = N.tabsData || "", R = N.actionPayload || "";
1801
+ return console.log("[withAsyncPlugin] 最终准备传递给 h() 的属性键集合:", Object.keys(N), "tabsData.length=", G.length, "actionPayload.length=", R.length), H(e, N, v.default ? v.default() : []);
1875
1802
  };
1876
1803
  }
1877
1804
  });
1878
1805
  }
1879
- const Ze = Symbol("AddonEnvContext"), Xe = {
1806
+ const Re = Symbol("AddonEnvContext"), Qe = {
1880
1807
  isPluginActive: !1,
1881
1808
  nameSuffix: "",
1882
1809
  pluginPackageName: "com.quicktvui.plugin.glintui",
1883
1810
  builtInVersions: {}
1884
1811
  };
1885
- async function Ut(e = "com.quicktvui.plugin.glintui", i = "_Plugin") {
1886
- const d = Je();
1887
- let s = {};
1812
+ async function Qt(e = "com.quicktvui.plugin.glintui", a = "_Plugin") {
1813
+ const d = Fe();
1814
+ let u = {};
1888
1815
  try {
1889
- const a = await N.callNativeModule("AddonEnvModule", "getBuiltInVersions", []);
1890
- a && typeof a == "object" && (s = a);
1891
- } catch (a) {
1892
- console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule", a);
1816
+ const h = await I.callNativeModule("AddonEnvModule", "getBuiltInVersions", []);
1817
+ h && typeof h == "object" && (u = h);
1818
+ } catch (h) {
1819
+ console.warn("[AddonProvider] Failed to fetch built-in versions from AddonEnvModule", h);
1893
1820
  }
1894
- const f = `QtGridTabs${i}`, v = d.isComponentRegistered(f), l = v instanceof Promise ? await v : v, r = {
1895
- isPluginActive: l,
1896
- nameSuffix: l ? i : "",
1821
+ const v = `QtGridTabs${a}`, g = d.isComponentRegistered(v), c = g instanceof Promise ? await g : g, s = {
1822
+ isPluginActive: c,
1823
+ nameSuffix: c ? a : "",
1897
1824
  // 如果使用了热更插件,包名加上 .ext 后缀(与 Gradle 打包脚本对齐)
1898
- pluginPackageName: l ? `${e}.ext` : e,
1899
- builtInVersions: s
1825
+ pluginPackageName: c ? `${e}.ext` : e,
1826
+ builtInVersions: u
1900
1827
  };
1901
- return console.info("[AddonProvider] Environment initialized:", r), r;
1828
+ return console.info("[AddonProvider] Environment initialized:", s), s;
1902
1829
  }
1903
- let de = A(Xe);
1904
- function Vt(e) {
1905
- de.value = e, ot(Ze, de);
1830
+ let ue = A(Qe);
1831
+ function Dt(e) {
1832
+ ue.value = e, Le(Re, ue);
1906
1833
  }
1907
- function _() {
1834
+ function L() {
1908
1835
  var e;
1909
- return ((e = nt(Ze, de)) == null ? void 0 : e.value) || Xe;
1836
+ return ((e = Ue(Re, ue)) == null ? void 0 : e.value) || Qe;
1910
1837
  }
1911
- async function Et(e) {
1838
+ async function Tt(e) {
1912
1839
  console.log("[AddonProvider] Sending GridTabs global config to Native:", e);
1913
1840
  try {
1914
- const i = await N.callNativeWithPromise("GridTabsConfigModule", "setDefaultConfig", JSON.stringify(e));
1915
- return console.log("[AddonProvider] Received response from Native:", i), !!(i && i.success);
1916
- } catch (i) {
1917
- return console.error("[AddonProvider] Failed to initialize GridTabs global config:", i), !1;
1841
+ const a = await I.callNativeWithPromise("GridTabsConfigModule", "setDefaultConfig", JSON.stringify(e));
1842
+ return console.log("[AddonProvider] Received response from Native:", a), !!(a && a.success);
1843
+ } catch (a) {
1844
+ return console.error("[AddonProvider] Failed to initialize GridTabs global config:", a), !1;
1918
1845
  }
1919
1846
  }
1920
- async function xt(e) {
1847
+ async function It(e) {
1921
1848
  console.log("[AddonProvider] Sending ExtraUI global theme config to Native:", e);
1922
1849
  try {
1923
- const i = await N.callNativeWithPromise("ExtraUIConfigModule", "setThemeConfig", JSON.stringify(e));
1924
- return console.log("[AddonProvider] Received ExtraUI theme response from Native:", i), !!(i && i.success);
1925
- } catch (i) {
1926
- return console.error("[AddonProvider] Failed to initialize ExtraUI global theme config:", i), !1;
1850
+ const a = await I.callNativeWithPromise("ExtraUIConfigModule", "setThemeConfig", JSON.stringify(e));
1851
+ return console.log("[AddonProvider] Received ExtraUI theme response from Native:", a), !!(a && a.success);
1852
+ } catch (a) {
1853
+ return console.error("[AddonProvider] Failed to initialize ExtraUI global theme config:", a), !1;
1927
1854
  }
1928
1855
  }
1929
- async function Wt(e) {
1856
+ async function Mt(e) {
1930
1857
  console.log("[AddonProvider] Initializing global theme across all modules:", e);
1931
- const i = await xt(e), d = await Et({
1858
+ const a = await It(e), d = await Tt({
1932
1859
  themeConfig: {
1933
1860
  placeholderColor: e.placeholderColor,
1934
1861
  glowColor: e.glowColor || e.focusBackgroundColor,
@@ -1947,50 +1874,48 @@ async function Wt(e) {
1947
1874
  // 更多属性映射根据后续 Glint/GridTabs 支持情况添加
1948
1875
  }
1949
1876
  });
1950
- return i && d;
1877
+ return a && d;
1951
1878
  }
1952
- const jt = {
1879
+ const zt = {
1953
1880
  install: (e) => {
1954
- e.use(it), e.use(lt), e.use(rt), e.use(st), e.use(ct), e.use(ut), e.use(gt), e.use(ft), e.use(bt), e.use(pt), e.use(Ct), e.use(Nt), e.use(Pt);
1881
+ e.use(je), e.use(He), e.use(Ze), e.use(Ye), e.use(tt), e.use(nt), e.use(rt), e.use(ct), e.use(ft), e.use(mt), e.use(yt), e.use(Ct);
1955
1882
  }
1956
1883
  };
1957
1884
  export {
1958
- Ze as ADDON_ENV_CONTEXT_KEY,
1885
+ Re as ADDON_ENV_CONTEXT_KEY,
1959
1886
  X as GridTabs,
1960
- it as GridTabsPlugin,
1961
- Te as HsvBackground,
1962
- ct as HsvBackgroundPlugin,
1963
- he as Keyboard,
1964
- lt as KeyboardPlugin,
1965
- xe as NaButton,
1966
- gt as NaButtonPlugin,
1967
- we as NaCheckbox,
1968
- Be as NaCheckboxGroup,
1969
- pt as NaCheckboxGroupPlugin,
1970
- ft as NaCheckboxPlugin,
1971
- Re as NaInputView,
1972
- Pt as NaInputViewPlugin,
1973
- $e as NaRadioGroup,
1974
- bt as NaRadioGroupPlugin,
1975
- qe as NaSettingSwitch,
1976
- Nt as NaSettingSwitchPlugin,
1977
- Oe as NaSwitcher,
1978
- Ct as NaSwitcherPlugin,
1979
- Ie as PortalItem,
1980
- st as PortalItemPlugin,
1981
- Ce as PortalPool,
1982
- rt as PortalPoolPlugin,
1983
- jt as QuickTVUINAddons,
1984
- St as QuickTVUINAddonsConfig,
1985
- Se as SvgImage,
1986
- ut as SvgImagePlugin,
1987
- jt as default,
1988
- Ut as initAddonEnv,
1989
- xt as initExtraUIGlobalTheme,
1990
- Wt as initGlobalTheme,
1991
- Et as initGridTabsGlobalConfig,
1992
- Vt as provideAddonEnv,
1993
- _ as useAddonEnv,
1994
- _t as useGridTabs,
1995
- L as withAsyncPlugin
1887
+ je as GridTabsPlugin,
1888
+ he as HsvBackground,
1889
+ tt as HsvBackgroundPlugin,
1890
+ me as Keyboard,
1891
+ He as KeyboardPlugin,
1892
+ Ce as NaButton,
1893
+ rt as NaButtonPlugin,
1894
+ ke as NaCheckbox,
1895
+ Ie as NaCheckboxGroup,
1896
+ mt as NaCheckboxGroupPlugin,
1897
+ ct as NaCheckboxPlugin,
1898
+ Te as NaRadioGroup,
1899
+ ft as NaRadioGroupPlugin,
1900
+ Pe as NaSettingSwitch,
1901
+ Ct as NaSettingSwitchPlugin,
1902
+ Ne as NaSwitcher,
1903
+ yt as NaSwitcherPlugin,
1904
+ ye as PortalItem,
1905
+ Ye as PortalItemPlugin,
1906
+ be as PortalPool,
1907
+ Ze as PortalPoolPlugin,
1908
+ zt as QuickTVUINAddons,
1909
+ kt as QuickTVUINAddonsConfig,
1910
+ pe as SvgImage,
1911
+ nt as SvgImagePlugin,
1912
+ zt as default,
1913
+ Qt as initAddonEnv,
1914
+ It as initExtraUIGlobalTheme,
1915
+ Mt as initGlobalTheme,
1916
+ Tt as initGridTabsGlobalConfig,
1917
+ Dt as provideAddonEnv,
1918
+ L as useAddonEnv,
1919
+ Rt as useGridTabs,
1920
+ z as withAsyncPlugin
1996
1921
  };