@ebscn/ui 0.0.10 → 0.0.12

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,302 +1,440 @@
1
- import { jsx as a, jsxs as P } from "react/jsx-runtime";
2
- import Y from "react-draggable";
3
- import Z, { useRef as f, useState as _, useLayoutEffect as H } from "react";
4
- import { I as ee } from "../imageViewer/imageViewer.js";
5
- import h from "classnames";
6
- const te = "_container_1kr1b_9", ne = "_mask_1kr1b_13", re = "_primary_1kr1b_19", ae = "_shadow_1kr1b_22", oe = "_controller_1kr1b_26", se = "_button_1kr1b_34", ce = "_disabled_1kr1b_44", le = "_pdfBox_1kr1b_49", ie = "_pdfWarp_1kr1b_53", de = "_dragContainer_1kr1b_58", ue = "_unLoadImg_1kr1b_65", fe = "_pdfImg_1kr1b_73", ge = "_pdfView_1kr1b_77", _e = "_defaultSeal_1kr1b_84", he = "_animationTip_1kr1b_90", pe = "_actionTip_1kr1b_1", be = "_handle_1kr1b_105", me = "_round-btn_1kr1b_115", ke = "_nextPage_1kr1b_127", Ne = "_lastPage_1kr1b_131", xe = "_nextDisabled_1kr1b_135", Re = "_lastDisabled_1kr1b_138", r = {
7
- container: te,
8
- mask: ne,
9
- primary: re,
10
- shadow: ae,
11
- controller: oe,
12
- button: se,
13
- disabled: ce,
14
- pdfBox: le,
15
- pdfWarp: ie,
16
- dragContainer: de,
17
- unLoadImg: ue,
18
- pdfImg: fe,
19
- pdfView: ge,
20
- defaultSeal: _e,
21
- animationTip: he,
22
- actionTip: pe,
23
- handle: be,
24
- "round-btn": "_round-btn_1kr1b_115",
25
- roundBtn: me,
26
- nextPage: ke,
27
- lastPage: Ne,
28
- nextDisabled: xe,
29
- lastDisabled: Re
30
- }, W = (o) => typeof o == "object" && o !== null, L = (o, i) => {
31
- if (!W(o) || !W(i))
32
- return o === i;
33
- if (o === i)
1
+ import Le from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
2
+ import x from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
3
+ import ie from "@babel/runtime-corejs3/regenerator";
4
+ import se from "@babel/runtime-corejs3/core-js/instance/map";
5
+ import W from "@babel/runtime-corejs3/core-js/instance/concat";
6
+ import Ae from "@babel/runtime-corejs3/core-js/instance/index-of";
7
+ import L from "@babel/runtime-corejs3/core-js/object/keys";
8
+ import Be from "@babel/runtime-corejs3/core-js/json/stringify";
9
+ import ge from "@babel/runtime-corejs3/core-js/instance/filter";
10
+ import Me from "@babel/runtime-corejs3/core-js/set-timeout";
11
+ import { jsx as i, jsxs as N, Fragment as X } from "react/jsx-runtime";
12
+ import Ve, { memo as Xe, useRef as d, useState as b, useLayoutEffect as H, useCallback as ve } from "react";
13
+ import { I as Je } from "../imageViewer/imageViewer.js";
14
+ import R from "classnames";
15
+ import Ke from "@babel/runtime-corejs3/helpers/esm/typeof";
16
+ import le from "@babel/runtime-corejs3/core-js/object/get-own-property-symbols";
17
+ import _e from "@babel/runtime-corejs3/core-js/object/get-own-property-descriptor";
18
+ import ue from "@babel/runtime-corejs3/core-js/instance/for-each";
19
+ import de from "@babel/runtime-corejs3/core-js/object/get-own-property-descriptors";
20
+ import Ue from "@babel/runtime-corejs3/core-js/object/define-properties";
21
+ import qe from "@babel/runtime-corejs3/core-js/object/define-property";
22
+ import Ge from "@babel/runtime-corejs3/helpers/esm/defineProperty";
23
+ const ze = "_mask_x557a_9", Ye = "_container_x557a_17", Qe = "_primary_x557a_21", Ze = "_controller_x557a_51", et = "_button_x557a_60", tt = "_disabled_x557a_70", rt = "_pdfBox_x557a_75", nt = "_pdfWarp_x557a_79", at = "_confirm_x557a_84", ot = "_shadow_x557a_96", ct = "_dragContainer_x557a_120", it = "_unRead_x557a_126", st = "_pdfImg_x557a_150", lt = "_pdfView_x557a_154", ut = "_animationTip_x557a_167", dt = "_handle_x557a_182", ft = "_nextPage_x557a_204", mt = "_lastPage_x557a_208", ht = "_nextDisabled_x557a_212", pt = "_lastDisabled_x557a_215", gt = "_toast_x557a_218", a = {
24
+ mask: ze,
25
+ container: Ye,
26
+ primary: Qe,
27
+ controller: Ze,
28
+ button: et,
29
+ disabled: tt,
30
+ pdfBox: rt,
31
+ pdfWarp: nt,
32
+ confirm: at,
33
+ shadow: ot,
34
+ dragContainer: ct,
35
+ unRead: it,
36
+ pdfImg: st,
37
+ pdfView: lt,
38
+ animationTip: ut,
39
+ handle: dt,
40
+ "round-btn": "_round-btn_x557a_192",
41
+ nextPage: ft,
42
+ lastPage: mt,
43
+ nextDisabled: ht,
44
+ lastDisabled: pt,
45
+ toast: gt
46
+ };
47
+ var fe = function(o) {
48
+ return Ke(o) === "object" && o !== null;
49
+ }, vt = function c(o, e) {
50
+ if (!fe(o) || !fe(e))
51
+ return o === e;
52
+ if (o === e)
34
53
  return !0;
35
- const n = Object.keys(o), m = Object.keys(i);
36
- if (n.length !== m.length)
54
+ var l = L(o), f = L(e);
55
+ if (l.length !== f.length)
37
56
  return !1;
38
- for (let b in o)
39
- if (!L(o[b], i[b]))
57
+ for (var s in o) {
58
+ var P = c(o[s], e[s]);
59
+ if (!P)
40
60
  return !1;
61
+ }
41
62
  return !0;
42
63
  };
43
- function Ce(o) {
44
- const { documentJson: i, mandatoryReading: n, done: m, hasRead: b } = o;
45
- if (!i || !n)
46
- return /* @__PURE__ */ a("div", { children: "协议内容缺失" });
47
- const u = f(null), B = o.pdfWidth || 600, v = o.pdfHeight || 840, d = f(0), { documentImgUrl: R, documentPages: k } = i, [M, y] = _(!1), [s, N] = _(
48
- +n[0].pageNo || 1
49
- ), [l, x] = _(0), [E, Ie] = _(!1), [Pe, O] = _({}), [V, $] = _(!1), C = f(void 0), p = f(void 0), D = f(1.15), [A, X] = _({ x: 0, y: 0 }), I = f(0), T = f(0);
50
- f({
51
- type: "",
52
- touchStartTime: "",
53
- touchEndTime: ""
54
- }), H(() => {
55
- b && n.map(
56
- (e, t) => n[t].hasRead = !0
57
- );
58
- }, [b]), H(() => {
59
- u.current && !d.current && (d.current = u.current.clientWidth / B, K());
60
- }, [u.current]);
61
- function K() {
62
- O({});
64
+ const _t = "_dragContainer_15ntt_1", me = {
65
+ dragContainer: _t
66
+ };
67
+ function he(c, o) {
68
+ var e = L(c);
69
+ if (le) {
70
+ var l = le(c);
71
+ o && (l = ge(l).call(l, function(f) {
72
+ return _e(c, f).enumerable;
73
+ })), e.push.apply(e, l);
63
74
  }
64
- function U(e) {
65
- T.current = e.changedTouches[0].clientX;
75
+ return e;
76
+ }
77
+ function pe(c) {
78
+ for (var o = 1; o < arguments.length; o++) {
79
+ var e, l, f = arguments[o] != null ? arguments[o] : {};
80
+ o % 2 ? ue(e = he(Object(f), !0)).call(e, function(s) {
81
+ Ge(c, s, f[s]);
82
+ }) : de ? Ue(c, de(f)) : ue(l = he(Object(f))).call(l, function(s) {
83
+ qe(c, s, _e(f, s));
84
+ });
85
+ }
86
+ return c;
87
+ }
88
+ function xt(c) {
89
+ var o = c.children, e = d(null), l = d(null), f = d(!1), s = d({
90
+ x: 0,
91
+ y: 0
92
+ }), P = c.onStop, k = c.onStart, p = c.onTouch, T = b({
93
+ x: 0,
94
+ y: 0
95
+ }), y = x(T, 2), _ = y[0], I = y[1];
96
+ H(function() {
97
+ e.current.addEventListener("touchstart", function(u) {
98
+ k && k(u), s.current = {
99
+ x: u.changedTouches[0].clientX,
100
+ y: u.changedTouches[0].clientY
101
+ }, I({
102
+ x: u.changedTouches[0].clientX - l.current.childNodes[0].clientWidth,
103
+ y: s.current.y - u.target.getBoundingClientRect().top - l.current.childNodes[0].clientHeight / 2
104
+ });
105
+ }, {
106
+ passive: !0
107
+ }), e.current.addEventListener("touchmove", function(u) {
108
+ p && p(u), !(u.changedTouches[0].clientX < s.current.x) && I(function(w) {
109
+ return pe(pe({}, w), {}, {
110
+ x: u.changedTouches[0].clientX - l.current.childNodes[0].clientWidth
111
+ });
112
+ });
113
+ }, {
114
+ passive: !0
115
+ }), e.current.addEventListener("touchend", function(u) {
116
+ P(u, s.current);
117
+ });
118
+ }, []);
119
+ var A = ve(function() {
120
+ var u;
121
+ if (!f.current) {
122
+ f.current = !0;
123
+ return;
124
+ }
125
+ var w = e.current.clientWidth - l.current.childNodes[0].clientWidth, D = (e.current.clientHeight - l.current.childNodes[0].clientHeight) / 2;
126
+ if (!(_.x < 0))
127
+ return _.y < 0 && Math.abs(_.y) > D && (_.y = -D), W(u = "translate(".concat(Math.min(_.x, w), "px, ")).call(u, Math.min(_.y, D), "px)");
128
+ }, [_]);
129
+ return /* @__PURE__ */ i("div", {
130
+ ref: e,
131
+ className: me.dragContainer,
132
+ children: /* @__PURE__ */ i("div", {
133
+ style: {
134
+ transform: A()
135
+ },
136
+ className: me.dragEvent,
137
+ ref: l,
138
+ children: o
139
+ })
140
+ });
141
+ }
142
+ const bt = Xe(xt);
143
+ function yt(c) {
144
+ var o = c.documentJson, e = c.mandatoryReading, l = c.done, f = c.hasRead;
145
+ if (!o || !e)
146
+ return /* @__PURE__ */ i("div", {
147
+ children: "协议内容缺失"
148
+ });
149
+ var s = d(null), P = c.pdfWidth || 600, k = c.pdfHeight || 840, p = d(0), T = o.documentImgUrl, y = o.documentPages, _ = b(!1), I = x(_, 2), A = I[0], u = I[1], w = d(null), D = b(+e[0].pageNo || 1), J = x(D, 2), m = J[0], $ = J[1], xe = d(null), be = b(0), K = x(be, 2), g = K[0], j = K[1], ye = b(!0), U = x(ye, 2), S = U[0], q = U[1], Ne = b({}), G = x(Ne, 2);
150
+ G[0];
151
+ var Re = G[1], Se = b(!1), z = x(Se, 2), Ce = z[0], Pe = z[1], B = d(void 0), C = d(void 0), Y = d(1.05), ke = b({
152
+ x: 0,
153
+ y: 0
154
+ }), Q = x(ke, 2), Te = Q[0], Ie = Q[1], M = d(0), Z = d(""), ee = d(null), F = d(null), V = d(null), we = b(!1), te = x(we, 2), De = te[0], re = te[1];
155
+ H(function() {
156
+ f && se(e).call(e, function(t, r) {
157
+ return e[r].hasRead = !0;
158
+ });
159
+ }, [f]), H(function() {
160
+ s.current && !p.current && (p.current = s.current.clientWidth / P, Oe());
161
+ }, [s.current]), H(function() {
162
+ if (F.current && V.current) {
163
+ var t, r, n, h = F.current.getBoundingClientRect(), v = V.current;
164
+ v.style.clipPath = W(t = W(r = W(n = "inset(".concat(h.top, "px ")).call(n, document.body.clientWidth - h.right, "px ")).call(r, document.body.clientHeight - h.bottom, "px ")).call(t, h.left, "px round 21px)");
165
+ }
166
+ }, [F.current]), H(function() {
167
+ var t;
168
+ Ae(t = navigator.userAgent).call(t, "appVersion") > -1 && (Z.current = "jyg", import("@ebscn/jssdk").then(/* @__PURE__ */ function() {
169
+ var r = Le(/* @__PURE__ */ ie.mark(function n(h) {
170
+ var v;
171
+ return ie.wrap(function(E) {
172
+ for (; ; ) switch (E.prev = E.next) {
173
+ case 0:
174
+ return ee.current = h, E.next = 3, h.readData({
175
+ key: "handRead",
176
+ nameSpace: "ebscn_mall"
177
+ });
178
+ case 3:
179
+ if (v = E.sent, v.code == 0)
180
+ try {
181
+ L(v.data).length && JSON.parse(v.data.ebscn_h5_handRead).hideTip && q(!1);
182
+ } catch {
183
+ }
184
+ case 5:
185
+ case "end":
186
+ return E.stop();
187
+ }
188
+ }, n);
189
+ }));
190
+ return function(n) {
191
+ return r.apply(this, arguments);
192
+ };
193
+ }()));
194
+ }, []);
195
+ function Oe() {
196
+ Re({});
66
197
  }
67
- function q(e, t) {
68
- const c = t.changedTouches[0].clientX;
69
- I.current += c - T.current, I.current >= (+e.right - +e.left) * d.current * 0.2 ? (e.hasRead = !0, I.current = 0, F()) : X({
198
+ function Ee() {
199
+ q(!1), Z.current === "jyg" && ee.current.writeData({
200
+ key: "handRead",
201
+ nameSpace: "ebscn_mall",
202
+ value: Be({
203
+ hideTip: !0
204
+ })
205
+ });
206
+ }
207
+ var We = ve(function(t, r, n) {
208
+ var h = r.changedTouches[0].clientX;
209
+ M.current += h - n.x, M.current >= (+t.right - +t.left) * p.current * 0.2 ? (t.hasRead = !0, M.current = 0, ce()) : Ie({
70
210
  x: 0,
71
211
  y: 0
72
212
  });
213
+ }, []);
214
+ function ne() {
215
+ var t = ge(e).call(e, function(r) {
216
+ return !r.hasRead;
217
+ });
218
+ if (t.length === 0)
219
+ return Pe(!0), !0;
73
220
  }
74
- function G() {
75
- if (n.filter((t) => !t.hasRead).length === 0)
76
- return $(!0), !0;
77
- }
78
- const J = () => {
79
- let e = s - 1;
80
- for (let t = 0; t < l; t++)
81
- if (e == +n[t].pageNo && !n[t].hasRead) {
82
- x(t);
221
+ var He = function() {
222
+ for (var r = m - 1, n = 0; n < g; n++)
223
+ if (r == +e[n].pageNo && !e[n].hasRead) {
224
+ j(n);
83
225
  break;
84
226
  }
85
- N(e);
86
- }, j = () => {
87
- let e = s + 1;
88
- for (let t = l; t < n.length; t++)
89
- if (e == +n[t].pageNo && !n[t].hasRead) {
90
- x(t);
227
+ $(r);
228
+ }, $e = function() {
229
+ for (var r = m + 1, n = g; n < e.length; n++)
230
+ if (r == +e[n].pageNo && !e[n].hasRead) {
231
+ j(n);
91
232
  break;
92
233
  }
93
- N(e);
234
+ r === y && (ne() || (re(!0), Me(function() {
235
+ re(!1);
236
+ }, 2e3))), $(r);
94
237
  };
95
- function w() {
96
- let e = l, t = !0;
97
- if (s < +n[0].pageNo)
238
+ function ae() {
239
+ var t = g, r = !0;
240
+ if (m < +e[0].pageNo)
98
241
  return !0;
99
242
  for (; ; ) {
100
- if (!n[l].hasRead && +n[l].pageNo < s) {
101
- C.current = l, t = !1;
243
+ if (!e[g].hasRead && +e[g].pageNo < m) {
244
+ B.current = g, r = !1;
102
245
  break;
103
246
  }
104
- if (--e < 0)
247
+ if (--t < 0)
105
248
  break;
106
- if (!n[e].hasRead) {
107
- t = !1, C.current = e;
249
+ if (!e[t].hasRead) {
250
+ r = !1, B.current = t;
108
251
  break;
109
252
  }
110
253
  }
111
- return V || t;
254
+ return Ce || r;
112
255
  }
113
- function z() {
114
- let e = C.current;
115
- x(e), N(+n[e].pageNo);
256
+ function je() {
257
+ var t = B.current;
258
+ j(t), $(+e[t].pageNo);
116
259
  }
117
- function S() {
118
- let e = l, t = !0;
119
- if (s >= +n[n.length - 1].pageNo && l === n.length - 1)
260
+ function oe() {
261
+ var t = g, r = !0;
262
+ if (m >= +e[e.length - 1].pageNo && g === e.length - 1)
120
263
  return !0;
121
- if (!n[l].hasRead && s < +n[l].pageNo)
122
- p.current = l, t = !1;
123
- else if (e < n.length - 1) {
124
- for (let c = e + 1; c < n.length; c++)
125
- if (!n[c].hasRead) {
126
- p.current = c, t = !1;
264
+ if (!e[g].hasRead && m < +e[g].pageNo)
265
+ C.current = g, r = !1;
266
+ else if (t < e.length - 1) {
267
+ for (var n = t + 1; n < e.length; n++)
268
+ if (!e[n].hasRead) {
269
+ C.current = n, r = !1;
127
270
  break;
128
271
  }
129
272
  }
130
- return t;
273
+ return r;
131
274
  }
132
- const F = () => {
133
- if (G())
134
- return m && m(i.fileId), !0;
135
- if (n[p.current].hasRead) {
136
- for (let t = 0; t < n.length; t++)
137
- if (!n[t].hasRead) {
138
- p.current = t;
275
+ var ce = function() {
276
+ if (ne())
277
+ return l && l(o.fileId), !0;
278
+ if (e[C.current].hasRead) {
279
+ for (var r = 0; r < e.length; r++)
280
+ if (!e[r].hasRead) {
281
+ C.current = r;
139
282
  break;
140
283
  }
141
284
  }
142
- const e = +n[p.current].pageNo;
143
- x(p.current), N(e);
144
- }, Q = (e, t) => {
145
- let c = [];
146
- if (!e || !t)
147
- return c;
148
- for (let g = 1; g <= t; g++)
149
- c.push(`${e}/${g}.jpg`);
150
- return c;
285
+ var n = +e[C.current].pageNo;
286
+ j(C.current), $(n);
287
+ }, Fe = function(r, n) {
288
+ var h = [];
289
+ if (!r || !n) return h;
290
+ for (var v = 1; v <= n; v++) {
291
+ var O;
292
+ h.push(W(O = "".concat(r, "/")).call(O, v, ".jpg"));
293
+ }
294
+ return h;
151
295
  };
152
- return /* @__PURE__ */ P("div", { className: h(r.container), children: [
153
- /* @__PURE__ */ P("div", { className: r.controller, children: [
154
- /* @__PURE__ */ a(
155
- "button",
156
- {
157
- className: h(
158
- r.button,
159
- w() && r.disabled
160
- ),
161
- onClick: () => z(),
162
- disabled: w(),
163
- children: "上一待确认项"
296
+ return /* @__PURE__ */ N(X, {
297
+ children: [S && /* @__PURE__ */ N(X, {
298
+ children: [/* @__PURE__ */ i("div", {
299
+ className: a.mask,
300
+ ref: V,
301
+ onClick: Ee
302
+ }), /* @__PURE__ */ i("div", {
303
+ className: a.mask,
304
+ style: {
305
+ zIndex: 500
164
306
  }
165
- ),
166
- /* @__PURE__ */ a(
167
- "button",
168
- {
169
- className: h([
170
- r.button,
171
- S() && r.disabled
172
- ]),
173
- onClick: () => F(),
174
- disabled: S(),
307
+ })]
308
+ }), /* @__PURE__ */ N("div", {
309
+ className: R(a.container),
310
+ style: {
311
+ pointerEvents: S ? "none" : "auto"
312
+ },
313
+ children: [/* @__PURE__ */ N("div", {
314
+ className: a.controller,
315
+ children: [/* @__PURE__ */ i("button", {
316
+ className: R(a.button, ae() && a.disabled),
317
+ onClick: function() {
318
+ return je();
319
+ },
320
+ disabled: ae(),
321
+ children: "上一待确认项"
322
+ }), /* @__PURE__ */ i("button", {
323
+ className: R([a.button, oe() && a.disabled]),
324
+ onClick: function() {
325
+ return ce();
326
+ },
327
+ disabled: oe(),
175
328
  children: "下一待确认项"
176
- }
177
- ),
178
- /* @__PURE__ */ a(
179
- "div",
180
- {
181
- className: h(r.button),
182
- onClick: (e) => {
183
- y(!0), e.preventDefault();
329
+ }), /* @__PURE__ */ i("div", {
330
+ className: R(a.button, S && a.primary),
331
+ onClick: function() {
332
+ u(!0);
184
333
  },
185
- children: "预览" + s + "/" + k
186
- }
187
- )
188
- ] }),
189
- /* @__PURE__ */ a(
190
- "div",
191
- {
192
- className: r.pdfBox,
193
- style: { height: v * d.current },
194
- children: R ? /* @__PURE__ */ P("div", { className: r.pdfWarp, children: [
195
- /* @__PURE__ */ a(
196
- "img",
197
- {
198
- className: r.pdfImg,
199
- src: `${R + "/" + s}.jpg`,
200
- alt: "加载中"
201
- }
202
- ),
203
- /* @__PURE__ */ a("div", { className: r.pdfView, ref: u, children: n.map(
204
- (e, t) => {
205
- var c;
206
- return +e.pageNo * 1 === s ? /* @__PURE__ */ a(
207
- "div",
208
- {
209
- className: h(
210
- r.dragContainer,
211
- e.hasRead && r.hasRead
212
- // _styles.shadow
213
- ),
214
- style: {
215
- position: "absolute",
216
- width: Math.min(
217
- (+e.right - +e.left) * d.current * D.current,
218
- (((c = u == null ? void 0 : u.current) == null ? void 0 : c.clientWidth) || 375) - 34
219
- ),
220
- height: (+e.top - +e.bottom) * d.current,
221
- top: (v - +e.top) * d.current,
222
- left: Math.max(
223
- +e.left * d.current - (+e.right - +e.left) * d.current / 2 * (D.current - 1),
224
- 16
225
- ),
226
- borderColor: e.hasRead ? "#cccccc" : "#e84225"
227
- },
228
- children: E && t == 0 ? /* @__PURE__ */ a(
229
- "div",
230
- {
231
- className: r.animationTip
232
- }
233
- ) : /* @__PURE__ */ a(
234
- Y,
235
- {
236
- handle: `.${r.handle}`,
237
- axis: "x",
238
- bounds: "parent",
239
- onMouseDown: (g) => U(g),
240
- onStop: (g) => q(e, g),
241
- position: A,
242
- children: l === t && !e.hasRead ? /* @__PURE__ */ a(
243
- "div",
244
- {
245
- className: r.handle
246
- }
247
- ) : /* @__PURE__ */ a("div", {})
248
- }
249
- )
334
+ children: "预览" + m + "/" + y
335
+ })]
336
+ }), /* @__PURE__ */ i("div", {
337
+ className: a.pdfBox,
338
+ style: {
339
+ height: k * p.current
340
+ },
341
+ children: T ? /* @__PURE__ */ N("div", {
342
+ className: a.pdfWarp,
343
+ children: [/* @__PURE__ */ i("img", {
344
+ className: a.pdfImg,
345
+ src: "".concat(T + "/" + m, ".jpg"),
346
+ ref: xe,
347
+ alt: "加载中"
348
+ }), /* @__PURE__ */ i("div", {
349
+ className: a.pdfView,
350
+ ref: s,
351
+ children: se(e).call(e, function(t, r) {
352
+ var n;
353
+ return +t.pageNo * 1 === m && /* @__PURE__ */ N("div", {
354
+ className: R(r === 0 && S && a.shadow, a.dragContainer),
355
+ style: {
356
+ position: "absolute",
357
+ width: Math.min((+t.right - +t.left) * p.current * Y.current, ((s == null || (n = s.current) === null || n === void 0 ? void 0 : n.clientWidth) || 375) - 6),
358
+ height: (+t.top - +t.bottom) * p.current,
359
+ top: (k - +t.top) * p.current,
360
+ left: Math.max(+t.left * p.current - (+t.right - +t.left) * p.current / 2 * (Y.current - 1), 2),
361
+ borderColor: t.hasRead ? "#cccccc" : "#e84225"
250
362
  },
251
- Math.random() + +e.pageNo + +e.bottom
252
- ) : /* @__PURE__ */ a(
253
- "div",
254
- {},
255
- +e.pageNo + +e.bottom + Math.random()
256
- );
257
- }
258
- ) }),
259
- /* @__PURE__ */ a(
260
- "button",
261
- {
262
- className: h(
263
- r["round-btn"],
264
- r.lastPage,
265
- s === 1 && r.lastDisabled
266
- ),
267
- onClick: J,
268
- disabled: s === 1
269
- }
270
- ),
271
- /* @__PURE__ */ a(
272
- "button",
273
- {
274
- className: h(
275
- r["round-btn"],
276
- r.nextPage,
277
- s == +k && r.nextDisabled
278
- ),
279
- onClick: j,
280
- disabled: s == +k
281
- }
282
- ),
283
- M && /* @__PURE__ */ a(
284
- ee,
285
- {
286
- currentIndex: s,
287
- onClose: () => y(!1),
288
- images: Q(
289
- R,
290
- +k
291
- )
292
- }
293
- )
294
- ] }) : /* @__PURE__ */ a("div", { children: "loading" })
295
- }
296
- )
297
- ] });
363
+ children: [/* @__PURE__ */ i("div", {
364
+ className: S && r == 0 ? a.unRead : ""
365
+ }), S && r == 0 ? /* @__PURE__ */ N(X, {
366
+ children: [/* @__PURE__ */ i("div", {
367
+ className: a.animationTip
368
+ }), /* @__PURE__ */ i("div", {
369
+ className: a.confirm,
370
+ ref: F,
371
+ children: "我知道了"
372
+ })]
373
+ }) : (
374
+ // <Draggable
375
+ // handle={`.${_styles.handle}`}
376
+ // axis="x"
377
+ // bounds="parent"
378
+ // onStart={(e) => {
379
+ // handleOnMouseDown(e);
380
+ // }}
381
+ // onStop={(e) =>
382
+ // handleOnStop(item, e)
383
+ // }
384
+ // position={position}
385
+ // >
386
+ // {currentSign === index &&
387
+ // !item.hasRead ? (
388
+ // <div
389
+ // className={
390
+ // _styles.handle
391
+ // }
392
+ // />
393
+ // ) : (
394
+ // <div></div>
395
+ // )}
396
+ // </Draggable>
397
+ /* @__PURE__ */ i(bt, {
398
+ onStop: function(v, O) {
399
+ return We(t, v, O);
400
+ },
401
+ position: Te,
402
+ children: g === r && !t.hasRead ? /* @__PURE__ */ i("div", {
403
+ className: a.handle,
404
+ ref: w
405
+ }) : /* @__PURE__ */ i("div", {})
406
+ })
407
+ )]
408
+ }, Math.random() + +t.pageNo + +t.bottom);
409
+ })
410
+ }), /* @__PURE__ */ i("button", {
411
+ className: R(a["round-btn"], a.lastPage, m === 1 && a.lastDisabled),
412
+ onClick: He,
413
+ disabled: m === 1
414
+ }), /* @__PURE__ */ i("button", {
415
+ className: R(a["round-btn"], a.nextPage, m == +y && a.nextDisabled),
416
+ onClick: $e,
417
+ disabled: m == +y
418
+ }), A && /* @__PURE__ */ i(Je, {
419
+ currentIndex: m,
420
+ onClose: function() {
421
+ return u(!1);
422
+ },
423
+ images: Fe(T, +y)
424
+ })]
425
+ }) : /* @__PURE__ */ i("div", {
426
+ children: "loading"
427
+ })
428
+ })]
429
+ }), De ? /* @__PURE__ */ i("div", {
430
+ className: a.toast,
431
+ children: "您仍有待完成的确认项,请完成后提交"
432
+ }) : null]
433
+ });
298
434
  }
299
- const Se = Z.memo(Ce, (o, i) => L(o, i));
435
+ const Jt = Ve.memo(yt, function(c, o) {
436
+ return vt(c, o);
437
+ });
300
438
  export {
301
- Se as H
439
+ Jt as H
302
440
  };