delta-comic-core 0.0.4 → 0.0.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.
package/dist/bundle.js CHANGED
@@ -1080,13 +1080,13 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1080
1080
  }), K();
1081
1081
  };
1082
1082
  isHidden(a) ? nextTick().then(r) : r();
1083
- }, ul = () => J(s.active), dl, fl = (n) => {
1084
- !e.touchable || n.touches.length > 1 || (l.start(n), c = !1, dl = Date.now(), W(), k());
1085
- }, pl = (r) => {
1083
+ }, dl = () => J(s.active), fl, pl = (n) => {
1084
+ !e.touchable || n.touches.length > 1 || (l.start(n), c = !1, fl = Date.now(), W(), k());
1085
+ }, ml = (r) => {
1086
1086
  e.touchable && s.swiping && (l.move(r), S.value && (!e.loop && (s.active === 0 && h.value > 0 || s.active === p.value - 1 && h.value < 0) || (preventDefault(r, e.stopPropagation), O({ offset: h.value }), c ||= (n("dragStart", { index: b.value }), !0))));
1087
- }, ml = () => {
1087
+ }, hl = () => {
1088
1088
  if (!e.touchable || !s.swiping) return;
1089
- let r = Date.now() - dl, i = h.value / r;
1089
+ let r = Date.now() - fl, i = h.value / r;
1090
1090
  if ((Math.abs(i) > .25 || Math.abs(h.value) > m.value / 2) && S.value) {
1091
1091
  let n = e.vertical ? l.offsetY.value : l.offsetX.value, r = 0;
1092
1092
  r = e.loop ? n > 0 ? h.value > 0 ? -1 : 1 : 0 : -Math[h.value > 0 ? "ceil" : "floor"](h.value / m.value), O({
@@ -1095,7 +1095,7 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1095
1095
  });
1096
1096
  } else h.value && O({ pace: 0 });
1097
1097
  c = !1, s.swiping = !1, n("dragEnd", { index: b.value }), K();
1098
- }, hl = (n, r = {}) => {
1098
+ }, gl = (n, r = {}) => {
1099
1099
  k(), l.reset(), doubleRaf(() => {
1100
1100
  let i;
1101
1101
  i = e.loop && n === p.value ? s.active === 0 ? 0 : n : n % p.value, r.immediate ? doubleRaf(() => {
@@ -1105,25 +1105,25 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1105
1105
  emitChange: !0
1106
1106
  });
1107
1107
  });
1108
- }, gl = (n, r) => {
1108
+ }, _l = (n, r) => {
1109
1109
  let i = r === b.value;
1110
1110
  return createVNode("i", {
1111
1111
  style: i ? { backgroundColor: e.indicatorColor } : void 0,
1112
1112
  class: bem$7("indicator", { active: i })
1113
1113
  }, null);
1114
- }, _l = () => {
1114
+ }, vl = () => {
1115
1115
  if (r.indicator) return r.indicator({
1116
1116
  active: b.value,
1117
1117
  total: p.value
1118
1118
  });
1119
- if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(gl)]);
1119
+ if (e.showIndicators && p.value > 1) return createVNode("div", { class: bem$7("indicators", { vertical: e.vertical }) }, [Array(p.value).fill("").map(_l)]);
1120
1120
  };
1121
1121
  return useExpose({
1122
1122
  prev: M,
1123
1123
  next: V,
1124
1124
  state: s,
1125
- resize: ul,
1126
- swipeTo: hl
1125
+ resize: dl,
1126
+ swipeTo: gl
1127
1127
  }), f({
1128
1128
  size: m,
1129
1129
  props: e,
@@ -1134,19 +1134,19 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1134
1134
  windowHeight,
1135
1135
  () => e.width,
1136
1136
  () => e.height
1137
- ], ul), watch(usePageVisibility(), (e) => {
1137
+ ], dl), watch(usePageVisibility(), (e) => {
1138
1138
  e === "visible" ? K() : W();
1139
- }), onMounted(J), onActivated(() => J(s.active)), onPopupReopen(() => J(s.active)), onDeactivated(W), onBeforeUnmount(W), useEventListener("touchmove", pl, { target: o }), () => createVNode("div", {
1139
+ }), onMounted(J), onActivated(() => J(s.active)), onPopupReopen(() => J(s.active)), onDeactivated(W), onBeforeUnmount(W), useEventListener("touchmove", ml, { target: o }), () => createVNode("div", {
1140
1140
  ref: a,
1141
1141
  class: bem$7()
1142
1142
  }, [createVNode("div", {
1143
1143
  ref: o,
1144
1144
  style: C.value,
1145
1145
  class: bem$7("track", { vertical: e.vertical }),
1146
- onTouchstartPassive: fl,
1147
- onTouchend: ml,
1148
- onTouchcancel: ml
1149
- }, [r.default?.call(r)]), _l()]);
1146
+ onTouchstartPassive: pl,
1147
+ onTouchend: hl,
1148
+ onTouchcancel: hl
1149
+ }, [r.default?.call(r)]), vl()]);
1150
1150
  }
1151
1151
  })), [name$6, bem$6] = createNamespace("tabs"), stdin_default$5 = defineComponent({
1152
1152
  name: name$6,
@@ -1283,26 +1283,26 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1283
1283
  event: a,
1284
1284
  disabled: s
1285
1285
  });
1286
- }, ul = (e) => {
1287
- s = e.isFixed, n("scroll", e);
1288
1286
  }, dl = (e) => {
1287
+ s = e.isFixed, n("scroll", e);
1288
+ }, fl = (e) => {
1289
1289
  nextTick(() => {
1290
1290
  W(e), K(!0);
1291
1291
  });
1292
- }, fl = () => {
1292
+ }, pl = () => {
1293
1293
  for (let e = 0; e < b.length; e++) {
1294
1294
  let { top: n } = useRect(b[e].$el);
1295
1295
  if (n > M.value) return e === 0 ? 0 : e - 1;
1296
1296
  }
1297
1297
  return b.length - 1;
1298
- }, pl = () => {
1299
- e.scrollspy && !o && H(fl());
1300
1298
  }, ml = () => {
1299
+ e.scrollspy && !o && H(pl());
1300
+ }, hl = () => {
1301
1301
  if (e.type === "line" && b.length) return createVNode("div", {
1302
1302
  class: bem$5("line"),
1303
1303
  style: C.lineStyle
1304
1304
  }, null);
1305
- }, hl = () => {
1305
+ }, gl = () => {
1306
1306
  let { type: n, border: i, sticky: a } = e, o = [createVNode("div", {
1307
1307
  ref: a ? void 0 : p,
1308
1308
  class: [bem$5("wrap"), { [BORDER_TOP_BOTTOM]: n === "line" && i }]
@@ -1318,11 +1318,11 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1318
1318
  }, [
1319
1319
  r["nav-left"]?.call(r),
1320
1320
  b.map((e) => e.renderTitle(J)),
1321
- ml(),
1321
+ hl(),
1322
1322
  r["nav-right"]?.call(r)
1323
1323
  ])]), r["nav-bottom"]?.call(r)];
1324
1324
  return a ? createVNode("div", { ref: p }, [o]) : o;
1325
- }, gl = () => {
1325
+ }, _l = () => {
1326
1326
  B(), nextTick(() => {
1327
1327
  var e;
1328
1328
  z(!0), (e = m.value?.swipeRef.value) == null || e.resize();
@@ -1333,20 +1333,20 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1333
1333
  e.duration,
1334
1334
  e.lineWidth,
1335
1335
  e.lineHeight
1336
- ], B), watch(windowWidth, gl), watch(() => e.active, (e) => {
1336
+ ], B), watch(windowWidth, _l), watch(() => e.active, (e) => {
1337
1337
  e !== k.value && W(e);
1338
1338
  }), watch(() => b.length, () => {
1339
1339
  C.inited && (W(e.active), B(), nextTick(() => {
1340
1340
  z(!0);
1341
1341
  }));
1342
1342
  }), useExpose({
1343
- resize: gl,
1344
- scrollTo: dl
1343
+ resize: _l,
1344
+ scrollTo: fl
1345
1345
  }), onActivated(B), onPopupReopen(B), onMountedOrActivated(() => {
1346
1346
  W(e.active, !0), nextTick(() => {
1347
1347
  C.inited = !0, p.value && (a = useRect(p.value).height), z(!0);
1348
1348
  });
1349
- }), useVisibilityChange(d, B), useEventListener("scroll", pl, {
1349
+ }), useVisibilityChange(d, B), useEventListener("scroll", ml, {
1350
1350
  target: g,
1351
1351
  passive: !0
1352
1352
  }), S({
@@ -1364,8 +1364,8 @@ var [name$8, bem$8] = createNamespace("sticky"), Sticky = withInstall(defineComp
1364
1364
  }, [e.showHeader ? e.sticky ? createVNode(Sticky, {
1365
1365
  container: d.value,
1366
1366
  offsetTop: j.value,
1367
- onScroll: ul
1368
- }, { default: () => [hl()] }) : hl() : null, createVNode(stdin_default$5, {
1367
+ onScroll: dl
1368
+ }, { default: () => [gl()] }) : gl() : null, createVNode(stdin_default$5, {
1369
1369
  ref: m,
1370
1370
  count: b.length,
1371
1371
  inited: C.inited,
@@ -2202,7 +2202,7 @@ var loading_default = /* @__PURE__ */ ((e, n) => {
2202
2202
  textColor: {}
2203
2203
  },
2204
2204
  setup(e) {
2205
- useCssVars((e) => ({ v6a9760b4: r.value }));
2205
+ useCssVars((e) => ({ v4790b4ce: r.value }));
2206
2206
  let n = e, r = computed(() => isNumber(n.size) ? `${n.size}px` : n.size);
2207
2207
  return (e, r) => {
2208
2208
  let i = Loading;
@@ -2212,7 +2212,7 @@ var loading_default = /* @__PURE__ */ ((e, n) => {
2212
2212
  }, 16);
2213
2213
  };
2214
2214
  }
2215
- }), [["__scopeId", "data-v-472e17a3"]]);
2215
+ }), [["__scopeId", "data-v-7ff4601b"]]);
2216
2216
  const useGlobalVar = (e, n) => (window.$api.__core_lib__ ??= {})[n] ??= e;
2217
2217
  var layout_exports = /* @__PURE__ */ __export({ useZIndex: () => useZIndex }), allLayers = useGlobalVar(shallowReactive([]), "utils/layers");
2218
2218
  const useZIndex = (e) => {
@@ -2228,11 +2228,11 @@ const useZIndex = (e) => {
2228
2228
  r
2229
2229
  ];
2230
2230
  };
2231
- function tryOnScopeDispose(e) {
2232
- return getCurrentScope() ? (onScopeDispose(e), !0) : !1;
2231
+ function tryOnScopeDispose(e, n) {
2232
+ return getCurrentScope() ? (onScopeDispose(e, n), !0) : !1;
2233
2233
  }
2234
- var localProvidedStateMap = /* @__PURE__ */ new WeakMap(), injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
2235
- let n = e[0], r = getCurrentInstance()?.proxy;
2234
+ var localProvidedStateMap = /* @__PURE__ */ new WeakMap(), injectLocal = (...e) => {
2235
+ let n = e[0], r = getCurrentInstance()?.proxy ?? getCurrentScope();
2236
2236
  if (r == null && !hasInjectionContext()) throw Error("injectLocal must be called in setup");
2237
2237
  return r && localProvidedStateMap.has(r) && n in localProvidedStateMap.get(r) ? localProvidedStateMap.get(r)[n] : inject(...e);
2238
2238
  }, isClient = typeof window < "u" && typeof document < "u";
@@ -2282,7 +2282,7 @@ function throttleFilter(...e) {
2282
2282
  };
2283
2283
  return (e) => {
2284
2284
  let f = toValue(s), p = Date.now() - n, m = () => o = e();
2285
- return d(), f <= 0 ? (n = Date.now(), m()) : (p > f && (l || !i) ? (n = Date.now(), m()) : c && (o = new Promise((e, o) => {
2285
+ return d(), f <= 0 ? (n = Date.now(), m()) : (p > f ? (n = Date.now(), (l || !i) && m()) : c && (o = new Promise((e, o) => {
2286
2286
  a = u ? o : e, r = setTimeout(() => {
2287
2287
  n = Date.now(), i = !0, e(m()), d();
2288
2288
  }, Math.max(0, f - p));
@@ -2320,11 +2320,9 @@ function toArray(e) {
2320
2320
  function getLifeCycleTarget(e) {
2321
2321
  return e || getCurrentInstance();
2322
2322
  }
2323
- /* @__NO_SIDE_EFFECTS__ */
2324
2323
  function useDebounceFn(e, n = 200, r = {}) {
2325
2324
  return createFilterWrapper(debounceFilter(n, r), e);
2326
2325
  }
2327
- /* @__NO_SIDE_EFFECTS__ */
2328
2326
  function useThrottleFn(e, n = 200, r = !1, i = !0, a = !1) {
2329
2327
  return createFilterWrapper(throttleFilter(n, r, i, a), e);
2330
2328
  }
@@ -2344,6 +2342,7 @@ function watchPausable(e, n, r = {}) {
2344
2342
  isActive: u
2345
2343
  };
2346
2344
  }
2345
+ var pausableWatch = watchPausable;
2347
2346
  function tryOnMounted(e, n = !0, r) {
2348
2347
  getLifeCycleTarget(r) ? onMounted(e, r) : n ? e() : nextTick(e);
2349
2348
  }
@@ -2438,7 +2437,7 @@ function watchOnce(e, n, r) {
2438
2437
  function computedAsync(e, n, r) {
2439
2438
  let a;
2440
2439
  a = isRef(r) ? { evaluating: r } : r || {};
2441
- let { lazy: o = !1, flush: s = "pre", evaluating: c = void 0, shallow: l = !0, onError: u = globalThis.reportError ?? noop } = a, d = shallowRef(!o), f = l ? shallowRef(n) : ref(n), p = 0;
2440
+ let { lazy: o = !1, flush: s = "sync", evaluating: c = void 0, shallow: l = !0, onError: u = globalThis.reportError ?? noop } = a, d = shallowRef(!o), f = l ? shallowRef(n) : ref(n), p = 0;
2442
2441
  return watchEffect(async (n) => {
2443
2442
  if (!d.value) return;
2444
2443
  p++;
@@ -2486,7 +2485,6 @@ function useEventListener$1(...e) {
2486
2485
  s(), r();
2487
2486
  };
2488
2487
  }
2489
- /* @__NO_SIDE_EFFECTS__ */
2490
2488
  function useMounted() {
2491
2489
  let e = shallowRef(!1), n = getCurrentInstance();
2492
2490
  return n && onMounted(() => {
@@ -2495,7 +2493,7 @@ function useMounted() {
2495
2493
  }
2496
2494
  /* @__NO_SIDE_EFFECTS__ */
2497
2495
  function useSupported(e) {
2498
- let n = /* @__PURE__ */ useMounted();
2496
+ let n = useMounted();
2499
2497
  return computed(() => (n.value, !!e()));
2500
2498
  }
2501
2499
  function useMutationObserver(e, n, r = {}) {
@@ -2520,53 +2518,57 @@ function useMutationObserver(e, n, r = {}) {
2520
2518
  }
2521
2519
  var DEFAULT_DELAY = 500, DEFAULT_THRESHOLD = 10;
2522
2520
  function onLongPress(e, n, r) {
2523
- let a = computed(() => unrefElement(e)), o, s, c, l = !1;
2524
- function u() {
2525
- o &&= (clearTimeout(o), void 0), s = void 0, c = void 0, l = !1;
2521
+ var a, o;
2522
+ let s = computed(() => unrefElement(e)), c, l, u, d = !1;
2523
+ function f() {
2524
+ c &&= (clearTimeout(c), void 0), l = void 0, u = void 0, d = !1;
2526
2525
  }
2527
- function d(e) {
2526
+ function p(e) {
2528
2527
  let n = r?.delay;
2529
2528
  return typeof n == "function" ? n(e) : n ?? DEFAULT_DELAY;
2530
2529
  }
2531
- function f(e) {
2532
- let [n, i, o] = [
2533
- c,
2534
- s,
2535
- l
2530
+ function m(e) {
2531
+ var n, i, a;
2532
+ let [o, c, p] = [
2533
+ u,
2534
+ l,
2535
+ d
2536
2536
  ];
2537
- if (u(), !r?.onMouseUp || !i || !n || r?.modifiers?.self && e.target !== a.value) return;
2538
- r?.modifiers?.prevent && e.preventDefault(), r?.modifiers?.stop && e.stopPropagation();
2539
- let d = e.x - i.x, f = e.y - i.y, p = Math.sqrt(d * d + f * f);
2540
- r.onMouseUp(e.timeStamp - n, p, o);
2541
- }
2542
- function p(e) {
2543
- r?.modifiers?.self && e.target !== a.value || (u(), r?.modifiers?.prevent && e.preventDefault(), r?.modifiers?.stop && e.stopPropagation(), s = {
2537
+ if (f(), !r?.onMouseUp || !c || !o || !(r == null || (n = r.modifiers) == null) && n.self && e.target !== s.value) return;
2538
+ !(r == null || (i = r.modifiers) == null) && i.prevent && e.preventDefault(), !(r == null || (a = r.modifiers) == null) && a.stop && e.stopPropagation();
2539
+ let m = e.x - c.x, h = e.y - c.y, g = Math.sqrt(m * m + h * h);
2540
+ r.onMouseUp(e.timeStamp - o, g, p);
2541
+ }
2542
+ function h(e) {
2543
+ var i, a, o;
2544
+ !(r == null || (i = r.modifiers) == null) && i.self && e.target !== s.value || (f(), !(r == null || (a = r.modifiers) == null) && a.prevent && e.preventDefault(), !(r == null || (o = r.modifiers) == null) && o.stop && e.stopPropagation(), l = {
2544
2545
  x: e.x,
2545
2546
  y: e.y
2546
- }, c = e.timeStamp, o = setTimeout(() => {
2547
- l = !0, n(e);
2548
- }, d(e)));
2549
- }
2550
- function m(e) {
2551
- if (r?.modifiers?.self && e.target !== a.value || !s || r?.distanceThreshold === !1) return;
2552
- r?.modifiers?.prevent && e.preventDefault(), r?.modifiers?.stop && e.stopPropagation();
2553
- let n = e.x - s.x, i = e.y - s.y;
2554
- Math.sqrt(n * n + i * i) >= (r?.distanceThreshold ?? DEFAULT_THRESHOLD) && u();
2555
- }
2556
- let h = {
2557
- capture: r?.modifiers?.capture,
2558
- once: r?.modifiers?.once
2559
- }, g = [
2560
- useEventListener$1(a, "pointerdown", p, h),
2561
- useEventListener$1(a, "pointermove", m, h),
2562
- useEventListener$1(a, ["pointerup", "pointerleave"], f, h)
2547
+ }, u = e.timeStamp, c = setTimeout(() => {
2548
+ d = !0, n(e);
2549
+ }, p(e)));
2550
+ }
2551
+ function g(e) {
2552
+ var n, i, a;
2553
+ if (!(r == null || (n = r.modifiers) == null) && n.self && e.target !== s.value || !l || r?.distanceThreshold === !1) return;
2554
+ !(r == null || (i = r.modifiers) == null) && i.prevent && e.preventDefault(), !(r == null || (a = r.modifiers) == null) && a.stop && e.stopPropagation();
2555
+ let o = e.x - l.x, c = e.y - l.y;
2556
+ Math.sqrt(o * o + c * c) >= (r?.distanceThreshold ?? DEFAULT_THRESHOLD) && f();
2557
+ }
2558
+ let v = {
2559
+ capture: r == null || (a = r.modifiers) == null ? void 0 : a.capture,
2560
+ once: r == null || (o = r.modifiers) == null ? void 0 : o.once
2561
+ }, y = [
2562
+ useEventListener$1(s, "pointerdown", h, v),
2563
+ useEventListener$1(s, "pointermove", g, v),
2564
+ useEventListener$1(s, ["pointerup", "pointerleave"], m, v)
2563
2565
  ];
2564
- return () => g.forEach((e) => e());
2566
+ return () => y.forEach((e) => e());
2565
2567
  }
2566
2568
  var ssrWidthSymbol = Symbol("vueuse-ssr-width");
2567
2569
  /* @__NO_SIDE_EFFECTS__ */
2568
2570
  function useSSRWidth() {
2569
- let e = hasInjectionContext() ? /* @__PURE__ */ injectLocal(ssrWidthSymbol, null) : null;
2571
+ let e = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
2570
2572
  return typeof e == "number" ? e : void 0;
2571
2573
  }
2572
2574
  function useMediaQuery(e, n = {}) {
@@ -2591,7 +2593,6 @@ function getHandlers() {
2591
2593
  function getSSRHandler(e, n) {
2592
2594
  return handlers[e] || n;
2593
2595
  }
2594
- /* @__NO_SIDE_EFFECTS__ */
2595
2596
  function usePreferredDark(e) {
2596
2597
  return useMediaQuery("(prefers-color-scheme: dark)", e);
2597
2598
  }
@@ -2642,7 +2643,7 @@ function useStorage(e, n, r, a = {}) {
2642
2643
  m(e);
2643
2644
  }
2644
2645
  if (!r) return g;
2645
- let y = toValue(n), b = guessSerializerType(y), S = a.serializer ?? StorageSerializers[b], { pause: C, resume: w } = watchPausable(g, (e) => k(e), {
2646
+ let y = toValue(n), b = guessSerializerType(y), S = a.serializer ?? StorageSerializers[b], { pause: C, resume: w } = pausableWatch(g, (e) => k(e), {
2646
2647
  flush: o,
2647
2648
  deep: s,
2648
2649
  eventFilter: p
@@ -2765,17 +2766,17 @@ function useScroll(e, n = {}) {
2765
2766
  }
2766
2767
  });
2767
2768
  function b(n, r) {
2768
- var i;
2769
+ var i, a;
2769
2770
  if (!f) return;
2770
- let a = toValue(e);
2771
- if (!a) return;
2772
- (i = a instanceof Document ? f.document.body : a) == null || i.scrollTo({
2771
+ let o = toValue(e);
2772
+ if (!o) return;
2773
+ (i = o instanceof Document ? f.document.body : o) == null || i.scrollTo({
2773
2774
  top: toValue(r) ?? y.value,
2774
2775
  left: toValue(n) ?? v.value,
2775
2776
  behavior: toValue(d)
2776
2777
  });
2777
- let o = a?.document?.documentElement || a?.documentElement || a;
2778
- v != null && (h.value = o.scrollLeft), y != null && (g.value = o.scrollTop);
2778
+ let s = (o == null || (a = o.document) == null ? void 0 : a.documentElement) || o?.documentElement || o;
2779
+ v != null && (h.value = s.scrollLeft), y != null && (g.value = s.scrollTop);
2779
2780
  }
2780
2781
  let S = shallowRef(!1), C = reactive({
2781
2782
  left: !0,
@@ -2789,20 +2790,21 @@ function useScroll(e, n = {}) {
2789
2790
  bottom: !1
2790
2791
  }), E = (e) => {
2791
2792
  S.value && (S.value = !1, w.left = !1, w.right = !1, w.top = !1, w.bottom = !1, o(e));
2792
- }, D = /* @__PURE__ */ useDebounceFn(E, r + a), O = (e) => {
2793
+ }, D = useDebounceFn(E, r + a), O = (e) => {
2794
+ var n;
2793
2795
  if (!f) return;
2794
- let n = e?.document?.documentElement || e?.documentElement || unrefElement(e), { display: r, flexDirection: i, direction: a } = getComputedStyle(n), o = a === "rtl" ? -1 : 1, s = n.scrollLeft;
2795
- w.left = s < h.value, w.right = s > h.value;
2796
- let l = Math.abs(s * o) <= (c.left || 0), u = Math.abs(s * o) + n.clientWidth >= n.scrollWidth - (c.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
2797
- r === "flex" && i === "row-reverse" ? (C.left = u, C.right = l) : (C.left = l, C.right = u), h.value = s;
2798
- let d = n.scrollTop;
2799
- e === f.document && !d && (d = f.document.body.scrollTop), w.top = d < g.value, w.bottom = d > g.value;
2800
- let p = Math.abs(d) <= (c.top || 0), m = Math.abs(d) + n.clientHeight >= n.scrollHeight - (c.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
2801
- r === "flex" && i === "column-reverse" ? (C.top = m, C.bottom = p) : (C.top = p, C.bottom = m), g.value = d;
2796
+ let r = (e == null || (n = e.document) == null ? void 0 : n.documentElement) || e?.documentElement || unrefElement(e), { display: i, flexDirection: a, direction: o } = getComputedStyle(r), s = o === "rtl" ? -1 : 1, l = r.scrollLeft;
2797
+ w.left = l < h.value, w.right = l > h.value;
2798
+ let u = Math.abs(l * s) <= (c.left || 0), d = Math.abs(l * s) + r.clientWidth >= r.scrollWidth - (c.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
2799
+ i === "flex" && a === "row-reverse" ? (C.left = d, C.right = u) : (C.left = u, C.right = d), h.value = l;
2800
+ let p = r.scrollTop;
2801
+ e === f.document && !p && (p = f.document.body.scrollTop), w.top = p < g.value, w.bottom = p > g.value;
2802
+ let m = Math.abs(p) <= (c.top || 0), v = Math.abs(p) + r.clientHeight >= r.scrollHeight - (c.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
2803
+ i === "flex" && a === "column-reverse" ? (C.top = v, C.bottom = m) : (C.top = m, C.bottom = v), g.value = p;
2802
2804
  }, k = (e) => {
2803
2805
  f && (O(e.target.documentElement ?? e.target), S.value = !0, D(e), s(e));
2804
2806
  };
2805
- return useEventListener$1(e, "scroll", r ? /* @__PURE__ */ useThrottleFn(k, r, !0, !1) : k, u), tryOnMounted(() => {
2807
+ return useEventListener$1(e, "scroll", r ? useThrottleFn(k, r, !0, !1) : k, u), tryOnMounted(() => {
2806
2808
  try {
2807
2809
  let n = toValue(e);
2808
2810
  if (!n) return;
@@ -2833,7 +2835,6 @@ function useLocalStorage(e, n, r = {}) {
2833
2835
  let { window: i = defaultWindow } = r;
2834
2836
  return useStorage(e, n, i?.localStorage, r);
2835
2837
  }
2836
- /* @__NO_SIDE_EFFECTS__ */
2837
2838
  function useWindowSize(e = {}) {
2838
2839
  let { window: n = defaultWindow, initialWidth: r = Infinity, initialHeight: i = Infinity, listenOrientation: a = !0, includeScrollbar: o = !0, type: s = "inner" } = e, c = shallowRef(r), l = shallowRef(i), u = () => {
2839
2840
  if (n) if (s === "outer") c.value = n.outerWidth, l.value = n.outerHeight;
@@ -2868,7 +2869,7 @@ var floatPopup_default = /* @__PURE__ */ defineComponent({
2868
2869
  overlay: { type: Boolean }
2869
2870
  },
2870
2871
  setup(e, { expose: s }) {
2871
- let l = useRouter(), d = e, f = shallowRef(!1), { height: p } = /* @__PURE__ */ useWindowSize(), m = computed(() => isArray(d.anchors) ? d.anchors : d.anchors === "high" ? [
2872
+ let l = useRouter(), d = e, f = shallowRef(!1), { height: p } = useWindowSize(), m = computed(() => isArray(d.anchors) ? d.anchors : d.anchors === "high" ? [
2872
2873
  0,
2873
2874
  Math.round(.4 * p.value),
2874
2875
  Math.round(.7 * p.value),
@@ -3024,10 +3025,10 @@ var image_default = /* @__PURE__ */ defineComponent({
3024
3025
  }, A = (...e) => {
3025
3026
  p("load", ...e), v.loaded.add(f.value);
3026
3027
  }, j = useTemplateRef("img");
3027
- return r({
3028
+ return console.log("[img]", j), r({
3028
3029
  isLoaded: S,
3029
- imageEl: j.value?.imageRef,
3030
- imageIns: j.value
3030
+ imageEl: computed(() => j.value?.imageRef),
3031
+ imageIns: j
3031
3032
  }), (r, i) => {
3032
3033
  let l = NImage, m = Icon;
3033
3034
  return openBlock(), createElementBlock(Fragment, null, [
@@ -3288,6 +3289,7 @@ var data_exports = /* @__PURE__ */ __export({
3288
3289
  this.$$raw = e;
3289
3290
  }
3290
3291
  }, PromiseContent = class e {
3292
+ [Symbol.toStringTag] = "PromiseContent";
3291
3293
  static _this;
3292
3294
  static #_ = this._this = useGlobalVar(this, "data/PromiseContent");
3293
3295
  static isPromiseContent(e) {
@@ -3303,12 +3305,22 @@ var data_exports = /* @__PURE__ */ __export({
3303
3305
  this.data.value = void 0, this.isLoading.value = !0, this.isError.value = !1, this.errorCause.value = void 0, this.isEmpty.value = !0;
3304
3306
  try {
3305
3307
  let n = await e;
3306
- this.data.value = this.processor(n), this.isLoading.value = !1, this.isError.value = !1, this.isEmpty.value = isEmpty(n);
3308
+ this.data.value = this.processor(n), this.isLoading.value = !1, this.isError.value = !1, this.isEmpty.value = isEmpty(n), this.emitter.emit("success", this.data.value);
3307
3309
  } catch (e) {
3308
- this.data.value = void 0, this.isError.value = !0, this.errorCause.value = isError(e) ? e : Error(String(e)), console.error("Non-throw Error [PromiseContent]", e);
3310
+ this.data.value = void 0, this.isError.value = !0, this.errorCause.value = isError(e) ? e : Error(String(e)), console.error("Non-throw Error [PromiseContent]", e), this.emitter.emit("error", e);
3309
3311
  }
3312
+ this.emitter.emit("finial", void 0);
3313
+ }
3314
+ emitter = mitt_default();
3315
+ onError(e) {
3316
+ return this.emitter.on("error", e), () => this.emitter.off("error", e);
3317
+ }
3318
+ onSuccess(e) {
3319
+ return this.emitter.on("success", e), () => this.emitter.off("success", e);
3320
+ }
3321
+ onFinal(e) {
3322
+ return this.emitter.on("finial", e), () => this.emitter.off("finial", e);
3310
3323
  }
3311
- [Symbol.toStringTag] = "[class PromiseContent]";
3312
3324
  setProcessor(n) {
3313
3325
  return e.fromPromise(this.promise, n);
3314
3326
  }
@@ -5178,7 +5190,7 @@ const appConfig = new ConfigPointer("core", {
5178
5190
  let r = n.get(e.key);
5179
5191
  if (!r) throw Error(`not found config by plugin "${e.pluginName}"`);
5180
5192
  return r.value;
5181
- }, "load"), a = /* @__PURE__ */ usePreferredDark();
5193
+ }, "load"), a = usePreferredDark();
5182
5194
  return {
5183
5195
  isDark: computed(() => {
5184
5196
  switch (r(appConfig).darkMode) {