@das-fed/ui 7.0.5-test.11 → 7.0.5-test.13

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,55 +1,55 @@
1
1
  import '@das-fed/ui/packages/business-components/video-dialog/style.css';
2
- import { getCurrentScope as ue, onScopeDispose as de, getCurrentInstance as ve, onMounted as te, nextTick as x, unref as l, ref as h, watch as S, defineComponent as D, useCssVars as pe, computed as P, createElementBlock as F, openBlock as p, normalizeClass as fe, renderSlot as oe, createCommentVNode as I, Fragment as H, renderList as me, createBlock as R, withCtx as g, withModifiers as _, createVNode as f, createElementVNode as m, toDisplayString as j, toRefs as Ce } from "vue";
3
- import { withInstall as ge } from "@das-fed/utils/with-install/index";
4
- import { t as k, setI18nRule as ke } from "@das-fed/web/packages/i18n/index";
5
- import { DasDialog as ye } from "@das-fed/ui/packages/components/dialog/index";
6
- import { DasTooltip as w } from "@das-fed/ui/packages/components/tooltip/index";
7
- import { DasIconFullscreen2 as _e } from "@das-fed/ui/packages/icons/fullscreen-2/index";
8
- import { DasAutoRegisterIcon as he, DasIcon as $ } from "@das-fed/ui/packages/components/icon/index";
9
- import { DasLivePlayer as we } from "@das-fed/ui/packages/components/live-player/index";
10
- import { DasSpin as be } from "@das-fed/ui/packages/components/spin/index";
11
- import { DasHlsPlayer as Ie } from "@das-fed/ui/packages/components/hls-player/index";
12
- import Ee from "dayjs";
2
+ import { getCurrentScope as ue, onScopeDispose as de, getCurrentInstance as pe, onMounted as te, nextTick as x, unref as l, ref as w, watch as N, defineComponent as D, useCssVars as ve, computed as P, createElementBlock as F, openBlock as v, normalizeClass as fe, renderSlot as oe, createCommentVNode as I, Fragment as B, renderList as me, createBlock as R, withCtx as y, withModifiers as h, createVNode as f, createElementVNode as m, toDisplayString as j, toRefs as ge, mergeProps as ye } from "vue";
3
+ import { withInstall as Ce } from "@das-fed/utils/with-install/index";
4
+ import { t as C, setI18nRule as ke } from "@das-fed/web/packages/i18n/index";
5
+ import { DasDialog as he } from "@das-fed/ui/packages/components/dialog/index";
6
+ import { DasTooltip as _ } from "@das-fed/ui/packages/components/tooltip/index";
7
+ import { DasIconFullscreen2 as we } from "@das-fed/ui/packages/icons/fullscreen-2/index";
8
+ import { DasAutoRegisterIcon as _e, DasIcon as $ } from "@das-fed/ui/packages/components/icon/index";
9
+ import { DasLivePlayer as be } from "@das-fed/ui/packages/components/live-player/index";
10
+ import { DasSpin as Ie } from "@das-fed/ui/packages/components/spin/index";
11
+ import { DasHlsPlayer as Ee } from "@das-fed/ui/packages/components/hls-player/index";
12
+ import Re from "dayjs";
13
13
  import { createService as M } from "@das-fed/utils/api-services/src/create-service";
14
- import { getProjectInfo as q, getToken as Re } from "@das-fed/utils/common-info";
14
+ import { getProjectInfo as q, getToken as Se } from "@das-fed/utils/common-info";
15
15
  var G;
16
- const A = typeof window < "u", Ne = (t) => typeof t == "string", Se = () => {
16
+ const A = typeof window < "u", Ne = (t) => typeof t == "string", Fe = () => {
17
17
  };
18
18
  A && ((G = window == null ? void 0 : window.navigator) != null && G.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
19
19
  function ne(t) {
20
20
  return typeof t == "function" ? t() : l(t);
21
21
  }
22
- function Fe(t) {
22
+ function ze(t) {
23
23
  return t;
24
24
  }
25
25
  function le(t) {
26
26
  return ue() ? (de(t), !0) : !1;
27
27
  }
28
28
  function Le(t, n = !0) {
29
- ve() ? te(t) : n ? t() : x(t);
29
+ pe() ? te(t) : n ? t() : x(t);
30
30
  }
31
31
  function ie(t) {
32
32
  var n;
33
33
  const e = ne(t);
34
34
  return (n = e == null ? void 0 : e.$el) != null ? n : e;
35
35
  }
36
- const Oe = A ? window : void 0, ze = A ? window.document : void 0;
37
- function De(...t) {
38
- let n, e, i, s;
39
- if (Ne(t[0]) || Array.isArray(t[0]) ? ([e, i, s] = t, n = Oe) : [n, e, i, s] = t, !n)
40
- return Se;
36
+ const Oe = A ? window : void 0, De = A ? window.document : void 0;
37
+ function Ue(...t) {
38
+ let n, e, i, r;
39
+ if (Ne(t[0]) || Array.isArray(t[0]) ? ([e, i, r] = t, n = Oe) : [n, e, i, r] = t, !n)
40
+ return Fe;
41
41
  Array.isArray(e) || (e = [e]), Array.isArray(i) || (i = [i]);
42
- const o = [], r = () => {
42
+ const o = [], c = () => {
43
43
  o.forEach((a) => a()), o.length = 0;
44
- }, C = (a, v, y, b) => (a.addEventListener(v, y, b), () => a.removeEventListener(v, y, b)), u = S(() => [ie(n), ne(s)], ([a, v]) => {
45
- r(), a && o.push(...e.flatMap((y) => i.map((b) => C(a, y, b, v))));
46
- }, { immediate: !0, flush: "post" }), c = () => {
47
- u(), r();
44
+ }, g = (a, p, k, b) => (a.addEventListener(p, k, b), () => a.removeEventListener(p, k, b)), u = N(() => [ie(n), ne(r)], ([a, p]) => {
45
+ c(), a && o.push(...e.flatMap((k) => i.map((b) => g(a, k, b, p))));
46
+ }, { immediate: !0, flush: "post" }), s = () => {
47
+ u(), c();
48
48
  };
49
- return le(c), c;
49
+ return le(s), s;
50
50
  }
51
- function Ue(t, n = !1) {
52
- const e = h(), i = () => e.value = !!t();
51
+ function $e(t, n = !1) {
52
+ const e = w(), i = () => e.value = !!t();
53
53
  return i(), Le(i, n), e;
54
54
  }
55
55
  const W = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Y = "__vueuse_ssr_handlers__";
@@ -97,50 +97,50 @@ const Z = [
97
97
  ]
98
98
  ];
99
99
  function ae(t, n = {}) {
100
- const { document: e = ze, autoExit: i = !1 } = n, s = t || (e == null ? void 0 : e.querySelector("html")), o = h(!1);
101
- let r = Z[0];
102
- const C = Ue(() => {
100
+ const { document: e = De, autoExit: i = !1 } = n, r = t || (e == null ? void 0 : e.querySelector("html")), o = w(!1);
101
+ let c = Z[0];
102
+ const g = $e(() => {
103
103
  if (e) {
104
- for (const N of Z)
105
- if (N[1] in e)
106
- return r = N, !0;
104
+ for (const S of Z)
105
+ if (S[1] in e)
106
+ return c = S, !0;
107
107
  } else
108
108
  return !1;
109
109
  return !1;
110
- }), [u, c, a, , v] = r;
111
- async function y() {
112
- C.value && (e != null && e[a] && await e[c](), o.value = !1);
110
+ }), [u, s, a, , p] = c;
111
+ async function k() {
112
+ g.value && (e != null && e[a] && await e[s](), o.value = !1);
113
113
  }
114
114
  async function b() {
115
- if (!C.value)
115
+ if (!g.value)
116
116
  return;
117
- await y();
118
- const N = ie(s);
119
- N && (await N[u](), o.value = !0);
117
+ await k();
118
+ const S = ie(r);
119
+ S && (await S[u](), o.value = !0);
120
120
  }
121
- async function L() {
122
- o.value ? await y() : await b();
121
+ async function z() {
122
+ o.value ? await k() : await b();
123
123
  }
124
- return e && De(e, v, () => {
124
+ return e && Ue(e, p, () => {
125
125
  o.value = !!(e != null && e[a]);
126
- }, !1), i && le(y), {
127
- isSupported: C,
126
+ }, !1), i && le(k), {
127
+ isSupported: g,
128
128
  isFullscreen: o,
129
129
  enter: b,
130
- exit: y,
131
- toggle: L
130
+ exit: k,
131
+ toggle: z
132
132
  };
133
133
  }
134
134
  var K;
135
135
  (function(t) {
136
136
  t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
137
137
  })(K || (K = {}));
138
- var $e = Object.defineProperty, X = Object.getOwnPropertySymbols, Pe = Object.prototype.hasOwnProperty, Te = Object.prototype.propertyIsEnumerable, J = (t, n, e) => n in t ? $e(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e, xe = (t, n) => {
138
+ var Pe = Object.defineProperty, X = Object.getOwnPropertySymbols, Te = Object.prototype.hasOwnProperty, xe = Object.prototype.propertyIsEnumerable, J = (t, n, e) => n in t ? Pe(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e, Be = (t, n) => {
139
139
  for (var e in n || (n = {}))
140
- Pe.call(n, e) && J(t, e, n[e]);
140
+ Te.call(n, e) && J(t, e, n[e]);
141
141
  if (X)
142
142
  for (var e of X(n))
143
- Te.call(n, e) && J(t, e, n[e]);
143
+ xe.call(n, e) && J(t, e, n[e]);
144
144
  return t;
145
145
  };
146
146
  const He = {
@@ -169,10 +169,10 @@ const He = {
169
169
  easeOutBack: [0.34, 1.56, 0.64, 1],
170
170
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
171
171
  };
172
- xe({
173
- linear: Fe
172
+ Be({
173
+ linear: ze
174
174
  }, He);
175
- const Be = /* @__PURE__ */ D({
175
+ const Ve = /* @__PURE__ */ D({
176
176
  __name: "GridItem",
177
177
  props: {
178
178
  active: { type: Boolean },
@@ -180,36 +180,36 @@ const Be = /* @__PURE__ */ D({
180
180
  },
181
181
  emits: ["itemClick"],
182
182
  setup(t, { emit: n }) {
183
- pe((c) => ({
183
+ ve((s) => ({
184
184
  a769b0be: u.value
185
185
  }));
186
- const e = t, i = n, s = h(), { toggle: o } = ae(s), r = () => {
186
+ const e = t, i = n, r = w(), { toggle: o } = ae(r), c = () => {
187
187
  o();
188
- }, C = () => {
188
+ }, g = () => {
189
189
  i("itemClick");
190
190
  }, u = P(() => `calc(100% / ${Math.sqrt(e.gridNum)})`);
191
- return (c, a) => (p(), F(
191
+ return (s, a) => (v(), F(
192
192
  "div",
193
193
  {
194
194
  ref_key: "containerRef",
195
- ref: s,
195
+ ref: r,
196
196
  class: fe(["wrapper", { "is-active": e.active }]),
197
- onDblclick: a[0] || (a[0] = (v) => r()),
198
- onClick: a[1] || (a[1] = (v) => C())
197
+ onDblclick: a[0] || (a[0] = (p) => c()),
198
+ onClick: a[1] || (a[1] = (p) => g())
199
199
  },
200
200
  [
201
- oe(c.$slots, "default", {}, void 0, !0)
201
+ oe(s.$slots, "default", {}, void 0, !0)
202
202
  ],
203
203
  34
204
204
  /* CLASS, NEED_HYDRATION */
205
205
  ));
206
206
  }
207
- }), B = (t, n) => {
207
+ }), H = (t, n) => {
208
208
  const e = t.__vccOpts || t;
209
- for (const [i, s] of n)
210
- e[i] = s;
209
+ for (const [i, r] of n)
210
+ e[i] = r;
211
211
  return e;
212
- }, Ve = /* @__PURE__ */ B(Be, [["__scopeId", "data-v-97d987a9"]]), je = { class: "layout-wrapper" }, Me = /* @__PURE__ */ D({
212
+ }, je = /* @__PURE__ */ H(Ve, [["__scopeId", "data-v-97d987a9"]]), Me = { class: "layout-wrapper" }, Ae = /* @__PURE__ */ D({
213
213
  __name: "GridLayout",
214
214
  props: {
215
215
  gridNum: {},
@@ -218,20 +218,20 @@ const Be = /* @__PURE__ */ D({
218
218
  },
219
219
  emits: ["update:activeIndex"],
220
220
  setup(t, { emit: n }) {
221
- const e = t, i = n, s = (o) => {
221
+ const e = t, i = n, r = (o) => {
222
222
  i("update:activeIndex", o);
223
223
  };
224
- return (o, r) => (p(), F("div", je, [
224
+ return (o, c) => (v(), F("div", Me, [
225
225
  I(' :active="index === activeIndex" '),
226
- (p(!0), F(
227
- H,
226
+ (v(!0), F(
227
+ B,
228
228
  null,
229
- me(e.gridNum, (C, u) => (p(), R(Ve, {
229
+ me(e.gridNum, (g, u) => (v(), R(je, {
230
230
  active: !1,
231
231
  "grid-num": e.gridNum,
232
- onItemClick: (c) => s(u)
232
+ onItemClick: (s) => r(u)
233
233
  }, {
234
- default: g(() => [
234
+ default: y(() => [
235
235
  o.showFn(u) ? oe(o.$slots, "default", {
236
236
  key: 0,
237
237
  index: u
@@ -245,123 +245,123 @@ const Be = /* @__PURE__ */ D({
245
245
  ))
246
246
  ]));
247
247
  }
248
- }), Ae = /* @__PURE__ */ B(Me, [["__scopeId", "data-v-661e2289"]]), Qe = /* @__PURE__ */ D({
248
+ }), Qe = /* @__PURE__ */ H(Ae, [["__scopeId", "data-v-661e2289"]]), qe = /* @__PURE__ */ D({
249
249
  __name: "DirectionControl",
250
250
  emits: ["change"],
251
251
  setup(t, { emit: n }) {
252
- const e = n, i = (s) => {
253
- e("change", s);
252
+ const e = n, i = (r) => {
253
+ e("change", r);
254
254
  };
255
- return (s, o) => (p(), F(
255
+ return (r, o) => (v(), F(
256
256
  "div",
257
257
  {
258
258
  class: "direction-control",
259
- onDblclick: o[9] || (o[9] = _((r) => r.stopPropagation(), ["stop"]))
259
+ onDblclick: o[9] || (o[9] = h((c) => c.stopPropagation(), ["stop"]))
260
260
  },
261
261
  [
262
- f(l(w), {
263
- content: l(k)("左上")
262
+ f(l(_), {
263
+ content: l(C)("左上")
264
264
  }, {
265
- default: g(() => [
265
+ default: y(() => [
266
266
  m("div", {
267
267
  class: "icon icon-top-left",
268
- onClick: o[0] || (o[0] = _((r) => i("leftUp"), ["stop"]))
268
+ onClick: o[0] || (o[0] = h((c) => i("leftUp"), ["stop"]))
269
269
  })
270
270
  ]),
271
271
  _: 1
272
272
  /* STABLE */
273
273
  }, 8, ["content"]),
274
- f(l(w), {
275
- content: l(k)("上")
274
+ f(l(_), {
275
+ content: l(C)("上")
276
276
  }, {
277
- default: g(() => [
277
+ default: y(() => [
278
278
  m("div", {
279
279
  class: "icon icon-top",
280
- onClick: o[1] || (o[1] = _((r) => i("up"), ["stop"]))
280
+ onClick: o[1] || (o[1] = h((c) => i("up"), ["stop"]))
281
281
  })
282
282
  ]),
283
283
  _: 1
284
284
  /* STABLE */
285
285
  }, 8, ["content"]),
286
- f(l(w), {
287
- content: l(k)("右上")
286
+ f(l(_), {
287
+ content: l(C)("右上")
288
288
  }, {
289
- default: g(() => [
289
+ default: y(() => [
290
290
  m("div", {
291
291
  class: "icon icon-top-right",
292
- onClick: o[2] || (o[2] = _((r) => i("rightUp"), ["stop"]))
292
+ onClick: o[2] || (o[2] = h((c) => i("rightUp"), ["stop"]))
293
293
  })
294
294
  ]),
295
295
  _: 1
296
296
  /* STABLE */
297
297
  }, 8, ["content"]),
298
- f(l(w), {
299
- content: l(k)("左")
298
+ f(l(_), {
299
+ content: l(C)("左")
300
300
  }, {
301
- default: g(() => [
301
+ default: y(() => [
302
302
  m("div", {
303
303
  class: "icon icon-left",
304
- onClick: o[3] || (o[3] = _((r) => i("left"), ["stop"]))
304
+ onClick: o[3] || (o[3] = h((c) => i("left"), ["stop"]))
305
305
  })
306
306
  ]),
307
307
  _: 1
308
308
  /* STABLE */
309
309
  }, 8, ["content"]),
310
- f(l(w), {
311
- content: l(k)("自动")
310
+ f(l(_), {
311
+ content: l(C)("自动")
312
312
  }, {
313
- default: g(() => [
313
+ default: y(() => [
314
314
  m("div", {
315
315
  class: "icon icon-auto",
316
- onClick: o[4] || (o[4] = _((r) => i("auto"), ["stop"]))
316
+ onClick: o[4] || (o[4] = h((c) => i("auto"), ["stop"]))
317
317
  })
318
318
  ]),
319
319
  _: 1
320
320
  /* STABLE */
321
321
  }, 8, ["content"]),
322
- f(l(w), {
323
- content: l(k)("右")
322
+ f(l(_), {
323
+ content: l(C)("右")
324
324
  }, {
325
- default: g(() => [
325
+ default: y(() => [
326
326
  m("div", {
327
327
  class: "icon icon-right",
328
- onClick: o[5] || (o[5] = _((r) => i("right"), ["stop"]))
328
+ onClick: o[5] || (o[5] = h((c) => i("right"), ["stop"]))
329
329
  })
330
330
  ]),
331
331
  _: 1
332
332
  /* STABLE */
333
333
  }, 8, ["content"]),
334
- f(l(w), {
335
- content: l(k)("左下")
334
+ f(l(_), {
335
+ content: l(C)("左下")
336
336
  }, {
337
- default: g(() => [
337
+ default: y(() => [
338
338
  m("div", {
339
339
  class: "icon icon-bottom-left",
340
- onClick: o[6] || (o[6] = _((r) => i("leftDown"), ["stop"]))
340
+ onClick: o[6] || (o[6] = h((c) => i("leftDown"), ["stop"]))
341
341
  })
342
342
  ]),
343
343
  _: 1
344
344
  /* STABLE */
345
345
  }, 8, ["content"]),
346
- f(l(w), {
347
- content: l(k)("下")
346
+ f(l(_), {
347
+ content: l(C)("下")
348
348
  }, {
349
- default: g(() => [
349
+ default: y(() => [
350
350
  m("div", {
351
351
  class: "icon icon-bottom",
352
- onClick: o[7] || (o[7] = _((r) => i("down"), ["stop"]))
352
+ onClick: o[7] || (o[7] = h((c) => i("down"), ["stop"]))
353
353
  })
354
354
  ]),
355
355
  _: 1
356
356
  /* STABLE */
357
357
  }, 8, ["content"]),
358
- f(l(w), {
359
- content: l(k)("右下")
358
+ f(l(_), {
359
+ content: l(C)("右下")
360
360
  }, {
361
- default: g(() => [
361
+ default: y(() => [
362
362
  m("div", {
363
363
  class: "icon icon-bottom-right",
364
- onClick: o[8] || (o[8] = _((r) => i("rightDown"), ["stop"]))
364
+ onClick: o[8] || (o[8] = h((c) => i("rightDown"), ["stop"]))
365
365
  })
366
366
  ]),
367
367
  _: 1
@@ -372,10 +372,10 @@ const Be = /* @__PURE__ */ D({
372
372
  /* NEED_HYDRATION */
373
373
  ));
374
374
  }
375
- }), qe = /* @__PURE__ */ B(Qe, [["__scopeId", "data-v-db2e8ec2"]]), Ge = { class: "video-wrapper" }, We = { class: "video-top" }, Ye = { class: "video-top_l" }, Ze = { class: "video-title-wrapper" }, Ke = { class: "video-title" }, Xe = { class: "video-top_r" }, Je = {
375
+ }), Ge = /* @__PURE__ */ H(qe, [["__scopeId", "data-v-db2e8ec2"]]), We = { class: "video-wrapper" }, Ye = { class: "video-top" }, Ze = { class: "video-top_l" }, Ke = { class: "video-title-wrapper" }, Xe = { class: "video-title" }, Je = { class: "video-top_r" }, et = {
376
376
  key: 0,
377
377
  class: "play-status"
378
- }, et = { class: "video-bottom" }, tt = { class: "video-bottom_r" }, ot = /* @__PURE__ */ D({
378
+ }, tt = { class: "video-bottom" }, ot = { class: "video-bottom_r" }, nt = /* @__PURE__ */ D({
379
379
  __name: "index",
380
380
  props: {
381
381
  videoUrl: {},
@@ -392,7 +392,7 @@ const Be = /* @__PURE__ */ D({
392
392
  emits: ["close", "directionControl", "zoomControl", "handleClick"],
393
393
  setup(t, { emit: n }) {
394
394
  const e = t, i = n;
395
- he({
395
+ _e({
396
396
  muted: import("@das-fed/ui/packages/icons/muted"),
397
397
  volume: import("@das-fed/ui/packages/icons/volume"),
398
398
  shrink: import("@das-fed/ui/packages/icons/shrink"),
@@ -400,26 +400,26 @@ const Be = /* @__PURE__ */ D({
400
400
  "direction-control": import("@das-fed/ui/packages/icons/direction-control"),
401
401
  screenshot: import("@das-fed/ui/packages/icons/screenshot")
402
402
  });
403
- const s = h(!0), o = h(), r = h(!1), C = h(), u = P(() => {
403
+ const r = w(!0), o = w(), c = w(!1), g = w(), u = P(() => {
404
404
  var d;
405
- return (d = C.value) == null ? void 0 : d.video;
406
- }), c = h(!1), a = h(!0), v = (d) => {
405
+ return (d = g.value) == null ? void 0 : d.video;
406
+ }), s = w(!1), a = w(!0), p = (d) => {
407
407
  o.value = d, !e.isHls && o.value.on(window.mpegts.Events.ERROR, (E) => {
408
408
  });
409
- }, y = () => {
410
- s.value = !s.value, i("handleClick", s.value ? "MUTE" : "UNMUTE"), o.value && (o.value.muted = s.value);
409
+ }, k = () => {
410
+ r.value = !r.value, i("handleClick", r.value ? "MUTE" : "UNMUTE"), o.value && (o.value.muted = r.value);
411
411
  }, b = () => {
412
- r.value = !r.value;
413
- }, L = h(""), N = () => {
412
+ c.value = !c.value;
413
+ }, z = w(""), S = () => {
414
414
  const d = document.createElement("canvas");
415
415
  if (i("handleClick", "SCREENSHOT"), u.value) {
416
416
  d.width = u.value.clientWidth, d.height = u.value.clientHeight;
417
417
  const E = d.getContext("2d");
418
418
  E == null || E.drawImage(u.value, 0, 0, d.width, d.height);
419
- const z = d.toDataURL("image/jpg"), ce = `【${e.title}】${Ee().format("YYYYMMDDHHmmss").toString()}.jpg`;
420
- if (L.value = z, "download" in document.createElement("a")) {
421
- const O = document.createElement("a");
422
- O.download = ce, O.style.display = "none", O.href = z, document.body.appendChild(O), document.body.appendChild(d), O.click(), URL.revokeObjectURL(O.href), document.body.removeChild(O), document.body.removeChild(d);
419
+ const O = d.toDataURL("image/jpg"), ce = `【${e.title}】${Re().format("YYYYMMDDHHmmss").toString()}.jpg`;
420
+ if (z.value = O, "download" in document.createElement("a")) {
421
+ const L = document.createElement("a");
422
+ L.download = ce, L.style.display = "none", L.href = O, document.body.appendChild(L), document.body.appendChild(d), L.click(), URL.revokeObjectURL(L.href), document.body.removeChild(L), document.body.removeChild(d);
423
423
  }
424
424
  }
425
425
  }, V = (d) => {
@@ -427,28 +427,28 @@ const Be = /* @__PURE__ */ D({
427
427
  }, T = (d) => {
428
428
  i("zoomControl", d);
429
429
  }, U = (d) => e.authType.includes(d);
430
- return S(
430
+ return N(
431
431
  () => u.value,
432
432
  () => {
433
433
  u.value && u.value.addEventListener("ended", () => {
434
- c.value = !0, e.type === "playback" && (a.value = !1);
434
+ s.value = !0, e.type === "playback" && (a.value = !1);
435
435
  });
436
436
  }
437
- ), S(
437
+ ), N(
438
438
  () => u.value,
439
439
  () => {
440
440
  u.value && x(() => {
441
441
  u.value.playbackRate = e.playbackRate || 1;
442
442
  });
443
443
  }
444
- ), S(
444
+ ), N(
445
445
  () => o.value,
446
446
  () => {
447
447
  o.value && x(() => {
448
- o.value.muted = s.value;
448
+ o.value.muted = r.value;
449
449
  });
450
450
  }
451
- ), S(
451
+ ), N(
452
452
  () => e.playbackRate,
453
453
  () => {
454
454
  u.value && (u.value.playbackRate = e.playbackRate || 1);
@@ -456,81 +456,81 @@ const Be = /* @__PURE__ */ D({
456
456
  {
457
457
  immediate: !0
458
458
  }
459
- ), S(
459
+ ), N(
460
460
  () => e.paused,
461
461
  () => {
462
462
  o.value && (e.paused ? o.value.pause() : o.value.play());
463
463
  }
464
- ), S(
464
+ ), N(
465
465
  () => e.videoUrl,
466
466
  () => {
467
467
  a.value = !1, x(() => {
468
468
  a.value = !0;
469
469
  });
470
470
  }
471
- ), (d, E) => (p(), F("div", Ge, [
472
- f(l(be), {
471
+ ), (d, E) => (v(), F("div", We, [
472
+ f(l(Ie), {
473
473
  spinning: e.loading,
474
474
  type: "component",
475
- tip: l(k)("加载中...")
475
+ tip: l(C)("加载中...")
476
476
  }, {
477
- default: g(() => [
478
- m("div", We, [
479
- m("div", Ye, [
480
- m("div", Ze, [
477
+ default: y(() => [
478
+ m("div", Ye, [
479
+ m("div", Ze, [
480
+ m("div", Ke, [
481
481
  m(
482
482
  "div",
483
- Ke,
483
+ Xe,
484
484
  j(e.title.length > 20 ? e.title.slice(0, 19) + "..." : e.title),
485
485
  1
486
486
  /* TEXT */
487
487
  )
488
488
  ])
489
489
  ]),
490
- m("div", Xe, [
491
- ["live"].includes(d.type) ? (p(), F(
490
+ m("div", Je, [
491
+ ["live"].includes(d.type) ? (v(), F(
492
492
  "span",
493
- Je,
494
- j(l(k)("正在实时预览")),
493
+ et,
494
+ j(l(C)("正在实时预览")),
495
495
  1
496
496
  /* TEXT */
497
497
  )) : I("v-if", !0),
498
498
  I(' <das-icon v-if="isFullscreen" class="icon close-icon" icon="close" @click.stop="handleClose"></das-icon> ')
499
499
  ])
500
500
  ]),
501
- d.isHls ? (p(), F(
502
- H,
501
+ d.isHls ? (v(), F(
502
+ B,
503
503
  { key: 1 },
504
504
  [
505
- e.videoUrl && a.value ? (p(), R(l(Ie), {
505
+ e.videoUrl && a.value ? (v(), R(l(Ee), {
506
506
  key: 0,
507
507
  ref_key: "dasLivePlayerRef",
508
- ref: C,
509
- muted: s.value,
510
- onLoaded: v,
508
+ ref: g,
509
+ muted: r.value,
510
+ onLoaded: p,
511
511
  src: e.videoUrl
512
512
  }, null, 8, ["muted", "src"])) : I("v-if", !0)
513
513
  ],
514
514
  64
515
515
  /* STABLE_FRAGMENT */
516
- )) : (p(), F(
517
- H,
516
+ )) : (v(), F(
517
+ B,
518
518
  { key: 0 },
519
519
  [
520
- e.videoUrl && a.value ? (p(), R(l(we), {
520
+ e.videoUrl && a.value ? (v(), R(l(be), {
521
521
  key: 0,
522
522
  type: "flv",
523
523
  ref_key: "dasLivePlayerRef",
524
- ref: C,
525
- muted: s.value,
526
- onLoaded: v,
524
+ ref: g,
525
+ muted: r.value,
526
+ onLoaded: p,
527
527
  src: e.videoUrl
528
528
  }, null, 8, ["muted", "src"])) : I("v-if", !0)
529
529
  ],
530
530
  64
531
531
  /* STABLE_FRAGMENT */
532
532
  )),
533
- m("div", et, [
533
+ m("div", tt, [
534
534
  E[3] || (E[3] = m(
535
535
  "div",
536
536
  { class: "video-bottom_l" },
@@ -538,80 +538,80 @@ const Be = /* @__PURE__ */ D({
538
538
  -1
539
539
  /* CACHED */
540
540
  )),
541
- m("div", tt, [
541
+ m("div", ot, [
542
542
  m(
543
543
  "div",
544
544
  {
545
545
  class: "controls",
546
- onDblclick: E[2] || (E[2] = _((z) => z.stopPropagation(), ["stop"]))
546
+ onDblclick: E[2] || (E[2] = h((O) => O.stopPropagation(), ["stop"]))
547
547
  },
548
548
  [
549
- f(l(w), {
550
- content: l(k)("声音")
549
+ f(l(_), {
550
+ content: l(C)("声音")
551
551
  }, {
552
- default: g(() => [
552
+ default: y(() => [
553
553
  f(l($), {
554
554
  class: "icon icon-volume",
555
- icon: s.value ? "muted" : "volume",
556
- onClick: _(y, ["stop"])
555
+ icon: r.value ? "muted" : "volume",
556
+ onClick: h(k, ["stop"])
557
557
  }, null, 8, ["icon"])
558
558
  ]),
559
559
  _: 1
560
560
  /* STABLE */
561
561
  }, 8, ["content"]),
562
- f(l(w), {
563
- content: l(k)("截图")
562
+ f(l(_), {
563
+ content: l(C)("截图")
564
564
  }, {
565
- default: g(() => [
565
+ default: y(() => [
566
566
  f(l($), {
567
567
  class: "icon icon-screenshot",
568
568
  icon: "screenshot",
569
- onClick: _(N, ["stop"])
569
+ onClick: h(S, ["stop"])
570
570
  })
571
571
  ]),
572
572
  _: 1
573
573
  /* STABLE */
574
574
  }, 8, ["content"]),
575
- U("control") ? (p(), R(l(w), {
575
+ U("control") ? (v(), R(l(_), {
576
576
  key: 0,
577
- content: l(k)("聚焦-")
577
+ content: l(C)("聚焦-")
578
578
  }, {
579
- default: g(() => [
580
- ["live", "polling"].includes(e.type) ? (p(), R(l($), {
579
+ default: y(() => [
580
+ ["live", "polling"].includes(e.type) ? (v(), R(l($), {
581
581
  key: 0,
582
582
  class: "icon icon-shrink",
583
583
  icon: "shrink",
584
- onClick: E[0] || (E[0] = _((z) => T("zoomOut"), ["stop"]))
584
+ onClick: E[0] || (E[0] = h((O) => T("zoomOut"), ["stop"]))
585
585
  })) : I("v-if", !0)
586
586
  ]),
587
587
  _: 1
588
588
  /* STABLE */
589
589
  }, 8, ["content"])) : I("v-if", !0),
590
- U("control") ? (p(), R(l(w), {
590
+ U("control") ? (v(), R(l(_), {
591
591
  key: 1,
592
- content: l(k)("聚焦+")
592
+ content: l(C)("聚焦+")
593
593
  }, {
594
- default: g(() => [
595
- ["live", "polling"].includes(e.type) ? (p(), R(l($), {
594
+ default: y(() => [
595
+ ["live", "polling"].includes(e.type) ? (v(), R(l($), {
596
596
  key: 0,
597
597
  class: "icon icon-enlarge",
598
598
  icon: "enlarge",
599
- onClick: E[1] || (E[1] = _((z) => T("zoomIn"), ["stop"]))
599
+ onClick: E[1] || (E[1] = h((O) => T("zoomIn"), ["stop"]))
600
600
  })) : I("v-if", !0)
601
601
  ]),
602
602
  _: 1
603
603
  /* STABLE */
604
604
  }, 8, ["content"])) : I("v-if", !0),
605
- U("control") ? (p(), R(l(w), {
605
+ U("control") ? (v(), R(l(_), {
606
606
  key: 2,
607
- content: l(k)("方向控制")
607
+ content: l(C)("方向控制")
608
608
  }, {
609
- default: g(() => [
610
- ["live", "polling"].includes(e.type) ? (p(), R(l($), {
609
+ default: y(() => [
610
+ ["live", "polling"].includes(e.type) ? (v(), R(l($), {
611
611
  key: 0,
612
612
  class: "icon icon-direction-control",
613
613
  icon: "direction-control",
614
- onClick: _(b, ["stop"])
614
+ onClick: h(b, ["stop"])
615
615
  })) : I("v-if", !0)
616
616
  ]),
617
617
  _: 1
@@ -623,7 +623,7 @@ const Be = /* @__PURE__ */ D({
623
623
  )
624
624
  ])
625
625
  ]),
626
- r.value ? (p(), R(qe, {
626
+ c.value ? (v(), R(Ge, {
627
627
  key: 2,
628
628
  onChange: V
629
629
  })) : I("v-if", !0)
@@ -633,36 +633,36 @@ const Be = /* @__PURE__ */ D({
633
633
  }, 8, ["spinning", "tip"])
634
634
  ]));
635
635
  }
636
- }), nt = /* @__PURE__ */ B(ot, [["__scopeId", "data-v-4db322a4"]]), lt = "/api/device-relation/deviceproject/v1/project/device/video", it = "v1", at = M(`/api/enterpriseright/permission/${it}`);
637
- let Q = M(`${lt}`, se);
638
- function se(t) {
636
+ }), lt = /* @__PURE__ */ H(nt, [["__scopeId", "data-v-4db322a4"]]), it = "/api/device-relation/deviceproject/v1/project/device/video", at = "v1", rt = M(`/api/enterpriseright/permission/${at}`);
637
+ let Q = M(`${it}`, re);
638
+ function re(t) {
639
639
  const n = q() ? q().id : 1;
640
640
  return t.params || (t.params = {}), t.params.project = n, t.params.projectId = n, t;
641
641
  }
642
- function re(t) {
642
+ function se(t) {
643
643
  const n = new URLSearchParams("");
644
644
  for (let [e, i] of Object.entries(t))
645
645
  n.append(e, i);
646
646
  return n.toString();
647
647
  }
648
648
  function ee(t) {
649
- return Q.post(`/ptz?${re(t)}`)().run();
649
+ return Q.post(`/ptz?${se(t)}`)().run();
650
650
  }
651
651
  function st(t) {
652
- return Q.post(`/url/preview?${re(t)}`)().run();
652
+ return Q.post(`/url/preview?${se(t)}`)().run();
653
653
  }
654
- at.post("data/device-auth");
655
- function rt(t) {
654
+ rt.post("data/device-auth");
655
+ function ct(t) {
656
656
  return new Promise((n) => {
657
- Q = M(t, se), n("");
657
+ Q = M(t, re), n("");
658
658
  });
659
659
  }
660
- const ct = (t) => {
661
- const n = Re();
660
+ const ut = (t) => {
661
+ const n = Se();
662
662
  return `${t}?token=${n}`;
663
663
  };
664
- h([]);
665
- const ut = /* @__PURE__ */ D({
664
+ w([]);
665
+ const dt = /* @__PURE__ */ D({
666
666
  props: {
667
667
  deviceInfo: {
668
668
  type: Object,
@@ -685,99 +685,99 @@ const ut = /* @__PURE__ */ D({
685
685
  const {
686
686
  deviceInfo: e,
687
687
  source: i,
688
- isHls: s,
688
+ isHls: r,
689
689
  baseURL: o
690
- } = Ce(t), r = h(!1), C = h(""), u = async () => {
690
+ } = ge(t), c = w(!1), g = w(""), u = async () => {
691
691
  var b;
692
692
  if (!((b = e.value) != null && b.deviceId)) return;
693
- r.value = !0;
694
- const [v, y] = await st({
693
+ c.value = !0;
694
+ const [p, k] = await st({
695
695
  productId: e.value.productId,
696
696
  deviceId: e.value.deviceId,
697
697
  source: i.value
698
698
  });
699
- if (!v) {
700
- let L = s.value ? "httpHlsStreamURL" : "wsFlvStreamURL";
701
- C.value = ct(y == null ? void 0 : y[L]);
699
+ if (!p) {
700
+ let z = r.value ? "httpHlsStreamURL" : "wsFlvStreamURL";
701
+ g.value = ut(k == null ? void 0 : k[z]);
702
702
  }
703
- r.value = !1;
704
- }, c = (v) => {
703
+ c.value = !1;
704
+ }, s = (p) => {
705
705
  ee({
706
706
  productId: e.value.productId,
707
707
  deviceId: e.value.deviceId,
708
- direction: v,
708
+ direction: p,
709
709
  zoom: "",
710
710
  source: i.value || "web"
711
711
  });
712
- }, a = (v) => {
712
+ }, a = (p) => {
713
713
  ee({
714
714
  productId: e.value.productId,
715
715
  deviceId: e.value.deviceId,
716
716
  direction: "",
717
- zoom: v,
717
+ zoom: p,
718
718
  source: i.value || "web"
719
719
  });
720
720
  };
721
721
  return te(async () => {
722
- o.value && await rt(o.value), u();
723
- }), S(() => e.value, () => {
722
+ o.value && await ct(o.value), u();
723
+ }), N(() => e.value, () => {
724
724
  u();
725
725
  }, {
726
726
  deep: !0
727
- }), () => f(H, null, [n.default({
728
- videoUrl: C.value,
729
- loading: r.value,
730
- onDirectionControl: c,
727
+ }), () => f(B, null, [n.default({
728
+ videoUrl: g.value,
729
+ loading: c.value,
730
+ onDirectionControl: s,
731
731
  onZoomControl: a,
732
- isHls: s.value
732
+ isHls: r.value
733
733
  })]);
734
734
  }
735
735
  });
736
- function dt(t) {
737
- const n = h(0), e = h(), {
736
+ function pt(t) {
737
+ const n = w(0), e = w(), {
738
738
  toggle: i,
739
- isFullscreen: s,
739
+ isFullscreen: r,
740
740
  exit: o
741
- } = ae(e), r = (c, a) => {
742
- s.value && o();
743
- }, C = (c) => {
741
+ } = ae(e), c = (s, a) => {
742
+ r.value && o();
743
+ }, g = (s) => {
744
744
  var a;
745
- (a = t == null ? void 0 : t.handleClick) == null || a.call(t, c);
745
+ (a = t == null ? void 0 : t.handleClick) == null || a.call(t, s);
746
746
  };
747
747
  return {
748
- render: () => f(Ae, {
748
+ render: () => f(Qe, {
749
749
  ref: e,
750
750
  gridNum: t.gridNum,
751
751
  activeIndex: n.value,
752
- "onUpdate:activeIndex": (c) => n.value = c,
753
- showFn: (c) => !!t.deviceList[c]
752
+ "onUpdate:activeIndex": (s) => n.value = s,
753
+ showFn: (s) => !!t.deviceList[s]
754
754
  }, {
755
755
  default: ({
756
- index: c
756
+ index: s
757
757
  }) => {
758
- const a = t.deviceList[c], v = t.source, y = t.isHls, b = t.baseURL;
759
- return f(ut, {
758
+ const a = t.deviceList[s], p = t.source, k = t.isHls, b = t.baseURL;
759
+ return f(dt, {
760
760
  deviceInfo: a,
761
761
  baseURL: b,
762
- source: v,
763
- isHls: y
762
+ source: p,
763
+ isHls: k
764
764
  }, {
765
765
  default: ({
766
- videoUrl: L,
767
- onDirectionControl: N,
766
+ videoUrl: z,
767
+ onDirectionControl: S,
768
768
  onZoomControl: V,
769
769
  loading: T,
770
770
  isHls: U
771
- }) => f(nt, {
771
+ }) => f(lt, {
772
772
  type: "live",
773
773
  loading: T,
774
- isFullscreen: s.value,
775
- videoUrl: L,
774
+ isFullscreen: r.value,
775
+ videoUrl: z,
776
776
  title: a.deviceName,
777
- onClose: () => r(),
778
- onDirectionControl: N,
777
+ onClose: () => c(),
778
+ onDirectionControl: S,
779
779
  onZoomControl: V,
780
- onHandleClick: C,
780
+ onHandleClick: g,
781
781
  authType: a.authType === 2 ? ["control"] : [],
782
782
  isHls: U
783
783
  }, null)
@@ -795,43 +795,48 @@ const vt = /* @__PURE__ */ D({
795
795
  gridNum: { default: 4 },
796
796
  source: {},
797
797
  isHls: { type: Boolean, default: !1 },
798
+ draggable: { type: Boolean, default: !0 },
799
+ resizable: { type: Boolean, default: !0 },
798
800
  dialogTitle: { default: "" },
799
801
  baseURL: { default: "/api/device-relation/deviceproject/v1/project/device/video" },
800
802
  handleClick: {}
801
803
  },
802
804
  emits: ["update:visible"],
803
805
  setup(t, { emit: n }) {
804
- const e = t, i = P(() => e.dialogTitle || k("视频监控")), s = n, o = P({
806
+ const e = t, i = P(() => e.dialogTitle || C("视频监控")), r = n, o = P({
805
807
  get: () => e.visible,
806
- set: (c) => s("update:visible", c)
807
- }), { render: r, toggleFullscreen: C } = dt(e), u = P(() => {
808
- let c = {};
808
+ set: (s) => r("update:visible", s)
809
+ }), { render: c, toggleFullscreen: g } = pt(e), u = P(() => {
810
+ let s = {};
809
811
  switch (e.gridNum) {
810
812
  case 1:
811
- c = "one-video";
813
+ s = { width: "933px", height: "595px" };
812
814
  break;
813
815
  case 4:
814
- c = "four-video";
816
+ s = { width: "933px", height: "595px" };
815
817
  break;
816
818
  case 9:
817
- c = "nine-video";
819
+ s = { width: "1370px", height: "840px" };
818
820
  break;
819
821
  }
820
- return c;
822
+ return s;
821
823
  });
822
- return (c, a) => (p(), R(l(ye), {
824
+ return (s, a) => (v(), R(l(he), ye({
823
825
  size: "mini",
824
826
  title: i.value,
825
- "custom-class": `das-linakge-video-dialog ${u.value}`,
827
+ "custom-class": "das-linakge-video-dialog",
826
828
  modelValue: o.value,
827
- "onUpdate:modelValue": a[0] || (a[0] = (v) => o.value = v),
829
+ "onUpdate:modelValue": a[0] || (a[0] = (p) => o.value = p),
828
830
  bodyStyle: { padding: 0 },
829
831
  "close-on-click-modal": !1,
830
832
  "close-on-press-escape": !1,
831
833
  modal: !1,
832
- "header-style": { display: "flex", justifyContent: "space-between", alignItems: "center" }
833
- }, {
834
- header: g(() => [
834
+ "header-style": { display: "flex", justifyContent: "space-between", alignItems: "center" },
835
+ draggable: s.draggable,
836
+ resizable: s.resizable,
837
+ dialogStyle: u.value
838
+ }, s.$attrs), {
839
+ header: y(() => [
835
840
  m("div", null, [
836
841
  m(
837
842
  "span",
@@ -841,28 +846,28 @@ const vt = /* @__PURE__ */ D({
841
846
  /* TEXT */
842
847
  )
843
848
  ]),
844
- f(l(w), {
845
- content: l(k)("页面全屏")
849
+ f(l(_), {
850
+ content: l(C)("页面全屏")
846
851
  }, {
847
- default: g(() => [
848
- f(l(_e), {
852
+ default: y(() => [
853
+ f(l(we), {
849
854
  class: "icon",
850
855
  color: "#999",
851
- onClick: l(C)
856
+ onClick: l(g)
852
857
  }, null, 8, ["onClick"])
853
858
  ]),
854
859
  _: 1
855
860
  /* STABLE */
856
861
  }, 8, ["content"])
857
862
  ]),
858
- default: g(() => [
859
- o.value ? (p(), R(l(r), { key: 0 })) : I("v-if", !0)
863
+ default: y(() => [
864
+ o.value ? (v(), R(l(c), { key: 0 })) : I("v-if", !0)
860
865
  ]),
861
866
  _: 1
862
867
  /* STABLE */
863
- }, 8, ["title", "custom-class", "modelValue"]));
868
+ }, 16, ["title", "modelValue", "draggable", "resizable", "dialogStyle"]));
864
869
  }
865
- }), pt = {
870
+ }), ft = {
866
871
  加载中: { "zh-CN": "加载中", en: "Loading", _appCode: "framework" },
867
872
  正在实时预览: { "zh-CN": "正在实时预览", en: "Real-time Video", _appCode: "framework" },
868
873
  声音: { "zh-CN": "声音", en: "Sound", _appCode: "framework" },
@@ -884,10 +889,10 @@ const vt = /* @__PURE__ */ D({
884
889
  "聚焦-": { "zh-CN": "聚焦-", en: "Focus-", _appCode: "framework" },
885
890
  "聚焦+": { "zh-CN": "聚焦+", en: "Focus+", _appCode: "framework" }
886
891
  };
887
- ke(pt);
888
- const Nt = ge(vt), St = () => h(null);
892
+ ke(ft);
893
+ const Nt = Ce(vt), Ft = () => w(null);
889
894
  export {
890
895
  Nt as DasVideoDialog,
891
- St as DasVideoDialogRef,
892
- dt as useVideo
896
+ Ft as DasVideoDialogRef,
897
+ pt as useVideo
893
898
  };