@ezuikit/player-theme 3.1.5-beta.3 → 3.1.5-beta.4

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/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v3.1.5-beta.3
3
- * Copyright (c) 2026-09-04 06:40:24 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v3.1.5-beta.4
3
+ * Copyright (c) 2026-09-15 13:35:29 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  (function (global, factory) {
@@ -365,8 +365,8 @@
365
365
  var eventemitter3Exports = requireEventemitter3();
366
366
  var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
367
367
 
368
- /**
369
- * 播放器的类名前缀
368
+ /**
369
+ * 播放器的类名前缀
370
370
  */ var PREFIX_CLASS$1 = 'ezplayer';
371
371
  /** 填充模式 */ var THEME_SCALE_MODE_TYPE = {
372
372
  /** 画面完全填充canvas区域,画面会被拉伸 */ full: 0,
@@ -398,32 +398,32 @@
398
398
  // 播放区间(片段分享)。通过 props 下发而不是靠事件,避免主题异步渲染时错过初始化事件
399
399
  'playbackRange'
400
400
  ];
401
- /**
402
- * 当移动端 picker 控件打开时需要关闭动画(定时器)
401
+ /**
402
+ * 当移动端 picker 控件打开时需要关闭动画(定时器)
403
403
  */ var CLEAR_TIMER_HEADER_FOOTER_ANIMATION = 'CLEAR_TIMER_HEADER_FOOTER_ANIMATION';
404
- /**
405
- * 'rec', 'cloudRec', 'cloudRecord' 是一个组,并且要在头部(移动端特殊处理)
406
- *
407
- * | rec | cloudRec | cloudRecord |
408
- * |:---------------------:|:------------:|:---------------:|
409
- * | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
404
+ /**
405
+ * 'rec', 'cloudRec', 'cloudRecord' 是一个组,并且要在头部(移动端特殊处理)
406
+ *
407
+ * | rec | cloudRec | cloudRecord |
408
+ * |:---------------------:|:------------:|:---------------:|
409
+ * | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
410
410
  */ var REC_GROUP = [
411
411
  'rec',
412
412
  'cloudRec',
413
413
  'cloudRecord'
414
414
  ];
415
- /**
416
- * 设备信息
417
- *
418
- * | deviceID | deviceName |
419
- * |:-------------------:|:-------------:|
420
- * | 设备ID(唯一标识) | 设备名称 |
415
+ /**
416
+ * 设备信息
417
+ *
418
+ * | deviceID | deviceName |
419
+ * |:-------------------:|:-------------:|
420
+ * | 设备ID(唯一标识) | 设备名称 |
421
421
  */ var DEVICE_INFO_GROUP = [
422
422
  'deviceID',
423
423
  'deviceName'
424
424
  ];
425
- /**
426
- * 暂停时能禁用的控件按钮
425
+ /**
426
+ * 暂停时能禁用的控件按钮
427
427
  */ var PAUSE_DISABLED_BTN = [
428
428
  'capturePicture',
429
429
  'volume',
@@ -434,9 +434,9 @@
434
434
  'speed',
435
435
  'globalFullscreen'
436
436
  ];
437
- /**
438
- * 移动端可以扩展的控件
439
- * ['ptz', 'talk', 'record', 'capturePicture', 'timeLine', 'rec', 'date'];
437
+ /**
438
+ * 移动端可以扩展的控件
439
+ * ['ptz', 'talk', 'record', 'capturePicture', 'timeLine', 'rec', 'date'];
440
440
  */ var MOBILE_EXTENDS = [
441
441
  'ptz',
442
442
  'timeLine',
@@ -444,25 +444,25 @@
444
444
  'date',
445
445
  'segmentProgress'
446
446
  ];
447
- /**
448
- *
449
- * 事件名
450
- *
451
- * --------------- ------------------
452
- * - - theme.emit(EVENTS.xxxxx) - -
453
- * - - -------------------------------------> - -
454
- * - - - -
455
- * - Theme - - Controls -
456
- * - - control.emit(EVENTS.control.xxx) - -
457
- * - - <-------------------------------------- - -
458
- * --------------- ------------------
459
- *
460
- * @example
461
- * ```ts
462
- * theme.on(EVENTS.loading)
463
- * theme.on(EVENTS.loading)
464
- * ```
465
- *
447
+ /**
448
+ *
449
+ * 事件名
450
+ *
451
+ * --------------- ------------------
452
+ * - - theme.emit(EVENTS.xxxxx) - -
453
+ * - - -------------------------------------> - -
454
+ * - - - -
455
+ * - Theme - - Controls -
456
+ * - - control.emit(EVENTS.control.xxx) - -
457
+ * - - <-------------------------------------- - -
458
+ * --------------- ------------------
459
+ *
460
+ * @example
461
+ * ```ts
462
+ * theme.on(EVENTS.loading)
463
+ * theme.on(EVENTS.loading)
464
+ * ```
465
+ *
466
466
  */ // 事件命名不要超过两层
467
467
  var EVENTS$2 = {
468
468
  loading: 'loading',
@@ -477,11 +477,11 @@
477
477
  /** 首帧 */ firstFrameDisplay: 'firstFrameDisplay',
478
478
  /** 全屏 */ fullscreen: 'fullscreen',
479
479
  /** 退出全屏 */ exitFullscreen: 'exitFullscreen',
480
- /**
481
- * 全屏变化(移动端也支持触发, 不过移动端是模拟的web全屏 即旋转 180度)
482
- * 当 isCurrentFullscreen 为 true 时,表示当前容器全局全屏状态
483
- *
484
- * 注意:同一个页面中只要有全屏的操作或取消全屏的操作,都会触发该事件 (移动端除外)
480
+ /**
481
+ * 全屏变化(移动端也支持触发, 不过移动端是模拟的web全屏 即旋转 180度)
482
+ * 当 isCurrentFullscreen 为 true 时,表示当前容器全局全屏状态
483
+ *
484
+ * 注意:同一个页面中只要有全屏的操作或取消全屏的操作,都会触发该事件 (移动端除外)
485
485
  */ fullscreenChange: 'fullscreenChange',
486
486
  /** 重置容器尺寸 */ resize: 'resize',
487
487
  /** 屏幕旋转方向变化 */ orientationChange: 'orientationChange',
@@ -508,8 +508,8 @@
508
508
  setAllDayRecTimes: 'setAllDayRecTimes',
509
509
  getOSDTime: 'getOSDTime',
510
510
  /** 播放区间播放结束(SDK 层 playbackRange 特性) */ playbackEnd: 'playbackEnd',
511
- /**
512
- * 控件相关
511
+ /**
512
+ * 控件相关
513
513
  */ control: {
514
514
  /** 点击播放播放/暂停按钮 */ play: 'Control.play',
515
515
  /** 播放控件销毁 */ playDestroy: 'Control.playDestroy',
@@ -580,8 +580,8 @@
580
580
  /** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy',
581
581
  /** 播放器内容区域重新渲染 */ contentRerender: 'Control.contentRerender'
582
582
  },
583
- /**
584
- * 主题控件相关
583
+ /**
584
+ * 主题控件相关
585
585
  */ theme: {
586
586
  /** 销毁前 */ beforeDestroy: 'Theme.beforeDestroy',
587
587
  /** 销毁后 */ destroyed: 'Theme.destroyed',
@@ -629,17 +629,17 @@
629
629
  };
630
630
  return _set_prototype_of$D(o, p);
631
631
  }
632
- /**
633
- * 控件基类
634
- * @category Control
635
- * @example
636
- * ```ts
637
- * // 创建控件
638
- * class MyControl extends Control {}
639
- *
640
- * // 使用控件
641
- * const myControl = new MyControl({})
642
- * ```
632
+ /**
633
+ * 控件基类
634
+ * @category Control
635
+ * @example
636
+ * ```ts
637
+ * // 创建控件
638
+ * class MyControl extends Control {}
639
+ *
640
+ * // 使用控件
641
+ * const myControl = new MyControl({})
642
+ * ```
643
643
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
644
644
  _inherits$z(Control, EventEmitter);
645
645
  function Control(options) {
@@ -681,22 +681,22 @@
681
681
  return _this;
682
682
  }
683
683
  var _proto = Control.prototype;
684
- /**
685
- * 重置整个控件
684
+ /**
685
+ * 重置整个控件
686
686
  */ _proto.reset = function reset(hide) {
687
687
  if (this._camelCaseName) {
688
688
  this.emit("Control." + this._camelCaseName + "Reset", hide);
689
689
  }
690
690
  };
691
- /**
692
- * 重置控件挂载节点
693
- * @param popupContainer 重新挂载的节点
694
- * @param append 添加的方式, 默认 append
695
- * @param element 当 append = before 时 需要 element, 插入 element 前
696
- *
697
- * | prepend | append |
698
- * |:-------------:|:---------------:|
699
- * | 插入第一个位置 | 追加在末尾 |
691
+ /**
692
+ * 重置控件挂载节点
693
+ * @param popupContainer 重新挂载的节点
694
+ * @param append 添加的方式, 默认 append
695
+ * @param element 当 append = before 时 需要 element, 插入 element 前
696
+ *
697
+ * | prepend | append |
698
+ * |:-------------:|:---------------:|
699
+ * | 插入第一个位置 | 追加在末尾 |
700
700
  */ _proto.resetPopupContainer = function resetPopupContainer(popupContainer, append, element) {
701
701
  if (popupContainer !== this.$popupContainer) {
702
702
  if (this.$popupContainer.contains(this.$container)) {
@@ -718,16 +718,16 @@
718
718
  }
719
719
  }
720
720
  };
721
- /**
722
- * 隐藏整个控件
721
+ /**
722
+ * 隐藏整个控件
723
723
  */ _proto.hide = function hide() {
724
724
  if (this.$container) {
725
725
  this.$container.style.display = 'none';
726
726
  this.$container.classList.add("" + PREFIX_CLASS$1 + "-hide");
727
727
  }
728
728
  };
729
- /**
730
- * 销毁控件
729
+ /**
730
+ * 销毁控件
731
731
  */ _proto.destroy = function destroy() {
732
732
  var _this___options, _this_$container_remove, _this_$container;
733
733
  if (this._camelCaseName) {
@@ -764,8 +764,8 @@
764
764
  (_this_$container1 = this.$container) == null ? void 0 : _this_$container1.classList.remove("" + PREFIX_CLASS$1 + "-active");
765
765
  }
766
766
  };
767
- /**
768
- * 当点击 Control 时 触发子类的 _onControlClick
767
+ /**
768
+ * 当点击 Control 时 触发子类的 _onControlClick
769
769
  */ _proto._onClick = function _onClick() {
770
770
  var _this = this;
771
771
  // 使用具名 handler 便于在 destroy 时精确移除,避免匿名监听残留
@@ -783,10 +783,10 @@
783
783
  e.stopPropagation();
784
784
  e.preventDefault();
785
785
  };
786
- /**
787
- * 点击 Control 控件触发
788
- * @param {Event} e
789
- * @returns {void}
786
+ /**
787
+ * 点击 Control 控件触发
788
+ * @param {Event} e
789
+ * @returns {void}
790
790
  */ _proto._onControlClick = function _onControlClick(e) {
791
791
  // 这是一个空函数, 子类可以实现重新改方法
792
792
  this.__options.onClick == null ? void 0 : this.__options.onClick.call(this.__options, e);
@@ -794,8 +794,8 @@
794
794
  _create_class$k(Control, [
795
795
  {
796
796
  key: "active",
797
- get: /**
798
- * 是否激活
797
+ get: /**
798
+ * 是否激活
799
799
  */ function get() {
800
800
  return this._active;
801
801
  },
@@ -810,8 +810,8 @@
810
810
  },
811
811
  {
812
812
  key: "disabled",
813
- get: /**
814
- * 是否禁用
813
+ get: /**
814
+ * 是否禁用
815
815
  */ function get() {
816
816
  return this._disabled;
817
817
  },
@@ -855,9 +855,9 @@
855
855
  return _set_prototype_of$C(o, p);
856
856
  }
857
857
  var LOADING_DEFAULT_OPTIONS = {};
858
- /**
859
- * 加载动画控件
860
- * @category Control
858
+ /**
859
+ * 加载动画控件
860
+ * @category Control
861
861
  */ var Loading = /*#__PURE__*/ function(Control) {
862
862
  _inherits$y(Loading, Control);
863
863
  function Loading(options) {
@@ -882,9 +882,9 @@
882
882
  this.$container.innerHTML = '\n <span class="' + PREFIX_CLASS$1 + "-loading-dot " + PREFIX_CLASS$1 + '-loading-dot-load">\n <i class="' + PREFIX_CLASS$1 + '-loading-dot-item"></i>\n <i class="' + PREFIX_CLASS$1 + '-loading-dot-item"></i>\n <i class="' + PREFIX_CLASS$1 + '-loading-dot-item"></i>\n <i class="' + PREFIX_CLASS$1 + '-loading-dot-item"></i>\n </span>\n <div class="' + PREFIX_CLASS$1 + '-loading-text">' + (((_this_locale = this.locale) == null ? void 0 : _this_locale.LOADING) || 'loading...') + "</div>\n ";
883
883
  }
884
884
  };
885
- /**
886
- * 动画展示
887
- * @param html 自定义动画内容, 如果不存在则使用默认动画
885
+ /**
886
+ * 动画展示
887
+ * @param html 自定义动画内容, 如果不存在则使用默认动画
888
888
  */ _proto.show = function show(html) {
889
889
  if (html) this.$container.innerHTML = html;
890
890
  // 初始化, 出流再等待中(回放出流结束不包括)
@@ -892,8 +892,8 @@
892
892
  this.$container.classList.remove("" + PREFIX_CLASS$1 + "-hide");
893
893
  this.$popupContainer.classList.add("" + PREFIX_CLASS$1 + "-has-loading");
894
894
  };
895
- /**
896
- * 隐藏动画
895
+ /**
896
+ * 隐藏动画
897
897
  */ _proto.hide = function hide() {
898
898
  Control.prototype.hide.call(this);
899
899
  this.$popupContainer.classList.remove("" + PREFIX_CLASS$1 + "-has-loading");
@@ -937,9 +937,9 @@
937
937
  var POSTER_OPTIONS = {
938
938
  poster: DEFAULT_POSTER
939
939
  };
940
- /**
941
- * 封面控件
942
- * @category Control
940
+ /**
941
+ * 封面控件
942
+ * @category Control
943
943
  */ var Poster = /*#__PURE__*/ function(Control) {
944
944
  _inherits$x(Poster, Control);
945
945
  function Poster(options) {
@@ -959,18 +959,18 @@
959
959
  return _this;
960
960
  }
961
961
  var _proto = Poster.prototype;
962
- /**
963
- * 封面图片加载失败
964
- * @param error
962
+ /**
963
+ * 封面图片加载失败
964
+ * @param error
965
965
  */ _proto._imgLoadErrorEvent = function _imgLoadErrorEvent(error) {
966
966
  var _error_target;
967
967
  // 封面加载失败, 一般只有自定义封面会出现这种情况
968
968
  // 这里不做img src重置处理 防止无限循环
969
969
  this._options.onLoadImgError == null ? void 0 : this._options.onLoadImgError.call(this._options, ((_error_target = error.target) == null ? void 0 : _error_target.getAttribute('src')) || '');
970
970
  };
971
- /**
972
- * 设置封面 这里不对 poster 进行缓存,如果有值优先使用,如果没有值优先使用 初始化传入的值
973
- * @param {string} poster 封面地址或 base64 数据
971
+ /**
972
+ * 设置封面 这里不对 poster 进行缓存,如果有值优先使用,如果没有值优先使用 初始化传入的值
973
+ * @param {string} poster 封面地址或 base64 数据
974
974
  */ _proto.setPoster = function setPoster(poster) {
975
975
  var // eslint-disable-next-line @typescript-eslint/unbound-method
976
976
  // prettier-ignore
@@ -983,24 +983,24 @@
983
983
  this.$container.innerHTML = '<img class="' + PREFIX_CLASS$1 + '-poster-img" src="' + poster + '" />';
984
984
  (_this_$container_querySelector = this.$container.querySelector("." + PREFIX_CLASS$1 + "-poster-img")) == null ? void 0 : _this_$container_querySelector.addEventListener("error", this._imgLoadErrorEvent);
985
985
  };
986
- /**
987
- * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
986
+ /**
987
+ * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
988
988
  */ _proto.show = function show() {
989
989
  if (this.$container) {
990
990
  this.$container.style.display = 'flex';
991
991
  this.$container.classList.remove("" + PREFIX_CLASS$1 + "-hide");
992
992
  }
993
993
  };
994
- /**
995
- * 隐藏封面
994
+ /**
995
+ * 隐藏封面
996
996
  */ _proto.hide = function hide() {
997
997
  var // eslint-disable-next-line @typescript-eslint/unbound-method
998
998
  _this_$container_querySelector, _this_$container;
999
999
  Control.prototype.hide.call(this);
1000
1000
  (_this_$container = this.$container) == null ? void 0 : (_this_$container_querySelector = _this_$container.querySelector("." + PREFIX_CLASS$1 + "-poster-img")) == null ? void 0 : _this_$container_querySelector.removeEventListener('error', this._imgLoadErrorEvent);
1001
1001
  };
1002
- /**
1003
- * 销毁
1002
+ /**
1003
+ * 销毁
1004
1004
  */ _proto.destroy = function destroy() {
1005
1005
  this.hide();
1006
1006
  Control.prototype.destroy.call(this);
@@ -1059,15 +1059,15 @@
1059
1059
  list: '<svg stroke="currentColor" fill="none" width="1em" height="1em" viewBox="0 0 24 24" focusable="false" aria-hidden="true" data-icon="list">\n <path d="M10.9995 5H21.0005" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10.9995 12H21.0005" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10.9995 19H21.0005" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 5C6.99951 3.896 6.10351 3 4.99951 3C3.89551 3 2.99951 3.896 2.99951 5C2.99951 6.105 3.89551 7 4.99951 7C6.10351 7 6.99951 6.105 6.99951 5V5Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 12C6.99951 10.896 6.10351 10 4.99951 10C3.89551 10 2.99951 10.896 2.99951 12C2.99951 13.105 3.89551 14 4.99951 14C6.10351 14 6.99951 13.105 6.99951 12V12Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 12C6.99951 10.896 6.10351 10 4.99951 10C3.89551 10 2.99951 10.896 2.99951 12C2.99951 13.105 3.89551 14 4.99951 14C6.10351 14 6.99951 13.105 6.99951 12V12Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 19C6.99951 17.896 6.10351 17 4.99951 17C3.89551 17 2.99951 17.896 2.99951 19C2.99951 20.105 3.89551 21 4.99951 21C6.10351 21 6.99951 20.105 6.99951 19V19Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'
1060
1060
  };
1061
1061
 
1062
- /**
1063
- * 创建 icon 组件
1064
- * @param svg - svg 字符串
1065
- * @param type - icon 类型
1066
- * @returns icon 组件
1067
- * @example
1068
- * ```ts
1069
- * createIcon('<svg>....</svg>', 'logo') // <span class="ezplayer-icon ezplayer-icon-logo"><svg>....</svg></span>
1070
- * ```
1062
+ /**
1063
+ * 创建 icon 组件
1064
+ * @param svg - svg 字符串
1065
+ * @param type - icon 类型
1066
+ * @returns icon 组件
1067
+ * @example
1068
+ * ```ts
1069
+ * createIcon('<svg>....</svg>', 'logo') // <span class="ezplayer-icon ezplayer-icon-logo"><svg>....</svg></span>
1070
+ * ```
1071
1071
  */ function createIcon(svg, type, attr) {
1072
1072
  if (attr === void 0) attr = {};
1073
1073
  var attrStr = '';
@@ -1268,9 +1268,9 @@
1268
1268
  return _set_prototype_of$A(o, p);
1269
1269
  }
1270
1270
  var MESSAGE_DEFAULT_OPTIONS = {};
1271
- /**
1272
- * 消息控件
1273
- * @category Control
1271
+ /**
1272
+ * 消息控件
1273
+ * @category Control
1274
1274
  */ var Message = /*#__PURE__*/ function(Control) {
1275
1275
  _inherits$w(Message, Control);
1276
1276
  function Message(options) {
@@ -1285,34 +1285,34 @@
1285
1285
  return _this;
1286
1286
  }
1287
1287
  var _proto = Message.prototype;
1288
- /**
1289
- * info 普通消息, 内容默认字体白色
1290
- * @param {string} msg 消息内容
1291
- * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
1288
+ /**
1289
+ * info 普通消息, 内容默认字体白色
1290
+ * @param {string} msg 消息内容
1291
+ * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
1292
1292
  */ _proto.info = function info(msg, duration) {
1293
1293
  if (duration === void 0) duration = 2;
1294
1294
  this._toast(msg, 'info', duration);
1295
1295
  };
1296
- /**
1297
- * warn 警告消息, 内容默认字体黄色
1298
- * @param {string} msg 消息内容
1299
- * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
1296
+ /**
1297
+ * warn 警告消息, 内容默认字体黄色
1298
+ * @param {string} msg 消息内容
1299
+ * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
1300
1300
  */ _proto.warn = function warn(msg, duration) {
1301
1301
  if (duration === void 0) duration = 2;
1302
1302
  this._toast(msg, 'warn', duration);
1303
1303
  };
1304
- /**
1305
- * toast 错误消息(渲染在 rootContainer 上的浮层)
1306
- * @param {string} msg 消息内容
1307
- * @param {number} duration 自动关闭延时,单位秒, 默认 2s 后关闭
1304
+ /**
1305
+ * toast 错误消息(渲染在 rootContainer 上的浮层)
1306
+ * @param {string} msg 消息内容
1307
+ * @param {number} duration 自动关闭延时,单位秒, 默认 2s 后关闭
1308
1308
  */ _proto.toastError = function toastError(msg, duration) {
1309
1309
  if (duration === void 0) duration = 2;
1310
1310
  this._toast(msg, 'error', duration);
1311
1311
  };
1312
- /**
1313
- * error 错误消息, 内容默认字体红色
1314
- * @param {string} msg 消息内容
1315
- * @param {number=} duration 认自动关闭延时,单位秒, 默认 0 不关闭, 需手动 调用 hide()
1312
+ /**
1313
+ * error 错误消息, 内容默认字体红色
1314
+ * @param {string} msg 消息内容
1315
+ * @param {number=} duration 认自动关闭延时,单位秒, 默认 0 不关闭, 需手动 调用 hide()
1316
1316
  */ _proto.error = function error(msg, duration) {
1317
1317
  if (duration === void 0) duration = 0;
1318
1318
  this._show(this._getIcon('error') + '<div class="' + PREFIX_CLASS$1 + '-message-msg">' + (msg || '') + "</div>", duration, 'error');
@@ -1341,11 +1341,11 @@
1341
1341
  }
1342
1342
  }
1343
1343
  };
1344
- /**
1345
- * 展示消息,如果同时调用多次只展示最后一次的消息
1346
- * @param {string} msg 消息内容, 支持 html dom 字符串
1347
- * @param {number} duration 认自动关闭延时,单位秒, 默认 0 不关闭 需手动 调用 hide()
1348
- * @param {MessageType} type 消息类型
1344
+ /**
1345
+ * 展示消息,如果同时调用多次只展示最后一次的消息
1346
+ * @param {string} msg 消息内容, 支持 html dom 字符串
1347
+ * @param {number} duration 认自动关闭延时,单位秒, 默认 0 不关闭 需手动 调用 hide()
1348
+ * @param {MessageType} type 消息类型
1349
1349
  */ _proto._show = function _show(msg, duration, type) {
1350
1350
  var _this = this;
1351
1351
  if (duration === void 0) duration = 0;
@@ -1373,8 +1373,8 @@
1373
1373
  }, duration * 1000);
1374
1374
  }
1375
1375
  };
1376
- /**
1377
- * 销毁
1376
+ /**
1377
+ * 销毁
1378
1378
  */ _proto.destroy = function destroy() {
1379
1379
  var _this__$toast;
1380
1380
  if (this._timer) {
@@ -1389,8 +1389,8 @@
1389
1389
  this.hide();
1390
1390
  Control.prototype.destroy.call(this);
1391
1391
  };
1392
- /**
1393
- * 隐藏消息, 并清空消息内容
1392
+ /**
1393
+ * 隐藏消息, 并清空消息内容
1394
1394
  */ _proto.hide = function hide() {
1395
1395
  var _this = this;
1396
1396
  // 每次隐藏都清空内 消息内容
@@ -1463,9 +1463,9 @@
1463
1463
  };
1464
1464
  return _set_prototype_of$z(o, p);
1465
1465
  }
1466
- /**
1467
- * 播放/暂停控件
1468
- * @category Control
1466
+ /**
1467
+ * 播放/暂停控件
1468
+ * @category Control
1469
1469
  */ var Play = /*#__PURE__*/ function(Control) {
1470
1470
  _inherits$v(Play, Control);
1471
1471
  function Play(options) {
@@ -1487,8 +1487,8 @@
1487
1487
  return _this;
1488
1488
  }
1489
1489
  var _proto = Play.prototype;
1490
- /**
1491
- * 点击 Control 会触发
1490
+ /**
1491
+ * 点击 Control 会触发
1492
1492
  */ _proto._onControlClick = function _onControlClick(e) {
1493
1493
  this._playing = !this._playing;
1494
1494
  this.emit(EVENTS$2.control.play, this._playing);
@@ -1511,8 +1511,8 @@
1511
1511
  _create_class$j(Play, [
1512
1512
  {
1513
1513
  key: "playing",
1514
- get: /**
1515
- * 播放状态
1514
+ get: /**
1515
+ * 播放状态
1516
1516
  */ function get() {
1517
1517
  return this._playing;
1518
1518
  }
@@ -2423,12 +2423,12 @@
2423
2423
 
2424
2424
  var distExports$3 = requireDist$3();
2425
2425
 
2426
- /**
2427
- * 节流函数
2428
- * @param {Function} func
2429
- * @param {number} wait
2430
- * @typeParam T - 函数类型
2431
- * @returns {Function}
2426
+ /**
2427
+ * 节流函数
2428
+ * @param {Function} func
2429
+ * @param {number} wait
2430
+ * @typeParam T - 函数类型
2431
+ * @returns {Function}
2432
2432
  */ // eslint-disable-next-line @typescript-eslint/ban-types
2433
2433
  function throttle(func, wait) {
2434
2434
  var timeout = null;
@@ -2484,28 +2484,28 @@
2484
2484
  if (n === "Map" || n === "Set") return Array.from(n);
2485
2485
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
2486
2486
  }
2487
- /**
2488
- * 工具类
2489
- * @category Util
2487
+ /**
2488
+ * 工具类
2489
+ * @category Util
2490
2490
  */ var Utils = /*#__PURE__*/ function() {
2491
2491
  function Utils() {}
2492
2492
  // /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(navigator?.userAgent) ||
2493
2493
  // (/Macintosh/i.test(navigator?.userAgent) && navigator?.maxTouchPoints > 1); // iPad 支持多点触控;
2494
- /**
2495
- * 监听手机旋转, 参考 {@link https://developer.mozilla.org/zh-CN/docs/Web/API/Screen/orientation}
2496
- * @param {OrientationChangeCallback} change 手机旋转回调
2497
- * @returns {[ScreenOrientation, CleanUpScreenOrientationFun]} [第一次的结果, 事件移除]
2498
- *
2499
- * @example
2500
- * ```ts
2501
- * const [orientation, cleanUp] = Utils.orientationEventListener((orientation) => {
2502
- * console.log("orientation", orientation)
2503
- * })
2504
- *
2505
- * console.log("orientation", orientation)
2506
- * // 清除监听
2507
- * cleanUp()
2508
- * ```
2494
+ /**
2495
+ * 监听手机旋转, 参考 {@link https://developer.mozilla.org/zh-CN/docs/Web/API/Screen/orientation}
2496
+ * @param {OrientationChangeCallback} change 手机旋转回调
2497
+ * @returns {[ScreenOrientation, CleanUpScreenOrientationFun]} [第一次的结果, 事件移除]
2498
+ *
2499
+ * @example
2500
+ * ```ts
2501
+ * const [orientation, cleanUp] = Utils.orientationEventListener((orientation) => {
2502
+ * console.log("orientation", orientation)
2503
+ * })
2504
+ *
2505
+ * console.log("orientation", orientation)
2506
+ * // 清除监听
2507
+ * cleanUp()
2508
+ * ```
2509
2509
  */ // prettier-ignore
2510
2510
  Utils.orientationEventListener = function orientationEventListener(change) {
2511
2511
  var _orientationTimer = null;
@@ -2595,18 +2595,18 @@
2595
2595
  }
2596
2596
  ];
2597
2597
  };
2598
- /**
2599
- * 监听节点尺寸变化, 参考 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver}
2600
- * @param {Element} node
2601
- * @param callback
2602
- * @returns {CleanUpResizeObserver}
2603
- * @example
2604
- * ```ts
2605
- * const [unobserve, disconnect] = Utils.resizeObserver(node, (entries, observer) => {});
2606
- *
2607
- * // 移除监听
2608
- * unobserve()
2609
- * ```
2598
+ /**
2599
+ * 监听节点尺寸变化, 参考 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver}
2600
+ * @param {Element} node
2601
+ * @param callback
2602
+ * @returns {CleanUpResizeObserver}
2603
+ * @example
2604
+ * ```ts
2605
+ * const [unobserve, disconnect] = Utils.resizeObserver(node, (entries, observer) => {});
2606
+ *
2607
+ * // 移除监听
2608
+ * unobserve()
2609
+ * ```
2610
2610
  */ // prettier-ignore
2611
2611
  Utils.resizeObserver = function resizeObserver(node, callback) {
2612
2612
  // prettier-ignore
@@ -2641,12 +2641,12 @@
2641
2641
  return Utils;
2642
2642
  }();
2643
2643
  // 不要使用 window, 如果在 worker 中会报错
2644
- /**
2645
- * 判断是否是移动端, (iPadOS 13+ 移除了 "iPad" 标识)
2646
- * @example
2647
- * ```ts
2648
- * Utils.isMobile // true | false
2649
- * ```
2644
+ /**
2645
+ * 判断是否是移动端, (iPadOS 13+ 移除了 "iPad" 标识)
2646
+ * @example
2647
+ * ```ts
2648
+ * Utils.isMobile // true | false
2649
+ * ```
2650
2650
  */ Utils.isMobile = distExports$3.isMobile();
2651
2651
 
2652
2652
  function _defineProperties$7(target, props) {
@@ -2680,23 +2680,23 @@
2680
2680
  return (percent * 100).toFixed(0);
2681
2681
  }
2682
2682
  };
2683
- /**
2684
- * 进度条
2685
- *
2686
- * @category Control
2687
- * @example
2688
- * ```ts
2689
- * const progress = new Progress({
2690
- * container: document.getElementById('progress-container'),
2691
- * step: 0.01,
2692
- * range: [0, 1],
2693
- * onChange: (value, range) => {
2694
- * console.log(`Progress changed: ${value}, Range: ${range}`);
2695
- * },
2696
- * defaultValue: 0.5,
2697
- * draggable: true,
2698
- * disabled: false,
2699
- * })
2683
+ /**
2684
+ * 进度条
2685
+ *
2686
+ * @category Control
2687
+ * @example
2688
+ * ```ts
2689
+ * const progress = new Progress({
2690
+ * container: document.getElementById('progress-container'),
2691
+ * step: 0.01,
2692
+ * range: [0, 1],
2693
+ * onChange: (value, range) => {
2694
+ * console.log(`Progress changed: ${value}, Range: ${range}`);
2695
+ * },
2696
+ * defaultValue: 0.5,
2697
+ * draggable: true,
2698
+ * disabled: false,
2699
+ * })
2700
2700
  */ var Progress = /*#__PURE__*/ function() {
2701
2701
  function Progress(options) {
2702
2702
  var _this_options_defaultValue;
@@ -2729,20 +2729,20 @@
2729
2729
  this.disabled = this.options.disabled;
2730
2730
  }
2731
2731
  var _proto = Progress.prototype;
2732
- /**
2733
- * 是否旋转了
2734
- * @param rotated
2732
+ /**
2733
+ * 是否旋转了
2734
+ * @param rotated
2735
2735
  */ _proto.isRotate = function isRotate(rotated) {
2736
2736
  this._isRotated = rotated;
2737
2737
  };
2738
- /**
2739
- * 销毁 Progress 实例,移除事件监听器
2740
- * @returns {void}
2741
- * @memberof Progress
2742
- * @example
2743
- * ```ts
2744
- * progress.destroy();
2745
- * ```
2738
+ /**
2739
+ * 销毁 Progress 实例,移除事件监听器
2740
+ * @returns {void}
2741
+ * @memberof Progress
2742
+ * @example
2743
+ * ```ts
2744
+ * progress.destroy();
2745
+ * ```
2746
2746
  */ _proto.destroy = function destroy() {
2747
2747
  var _this__delegateSliderMouseDown_destroy, _this__delegateSliderMouseDown, _this__delegateSliderHandleMouseDown_destroy, _this__delegateSliderHandleMouseDown, _this__delegateProgressMouseDown_destroy, _this__delegateProgressMouseDown, _this__delegatePlusClick_destroy, _this__delegatePlusClick, _this__delegateMinusClick_destroy, _this__delegateMinusClick;
2748
2748
  (_this__delegateSliderMouseDown = this._delegateSliderMouseDown) == null ? void 0 : (_this__delegateSliderMouseDown_destroy = _this__delegateSliderMouseDown.destroy) == null ? void 0 : _this__delegateSliderMouseDown_destroy.call(_this__delegateSliderMouseDown);
@@ -2937,14 +2937,14 @@
2937
2937
  },
2938
2938
  {
2939
2939
  key: "value",
2940
- get: /**
2941
- * 获取进度条值
2942
- * @returns {number} 当前进度条值
2943
- * @example
2944
- * ```ts
2945
- * const value = progress.value; // 获取当前进度条值
2946
- * console.log(value); // 输出值
2947
- * ```
2940
+ get: /**
2941
+ * 获取进度条值
2942
+ * @returns {number} 当前进度条值
2943
+ * @example
2944
+ * ```ts
2945
+ * const value = progress.value; // 获取当前进度条值
2946
+ * console.log(value); // 输出值
2947
+ * ```
2948
2948
  */ function get() {
2949
2949
  return this._value; //
2950
2950
  },
@@ -2954,14 +2954,14 @@
2954
2954
  },
2955
2955
  {
2956
2956
  key: "percent",
2957
- get: /**
2958
- * 获取进度百分比
2959
- * @returns {number} 当前进度条百分比
2960
- * @example
2961
- * ```ts
2962
- * const percent = progress.percent; // 获取当前进度条百分比
2963
- * console.log(percent); // 输出百分比
2964
- * ```
2957
+ get: /**
2958
+ * 获取进度百分比
2959
+ * @returns {number} 当前进度条百分比
2960
+ * @example
2961
+ * ```ts
2962
+ * const percent = progress.percent; // 获取当前进度条百分比
2963
+ * console.log(percent); // 输出百分比
2964
+ * ```
2965
2965
  */ function get() {
2966
2966
  return this._percent;
2967
2967
  },
@@ -3024,9 +3024,9 @@
3024
3024
  onOpenChange: function onOpenChange() {},
3025
3025
  onChange: function onChange() {}
3026
3026
  };
3027
- /**
3028
- * 音量调节控件
3029
- * @category Control
3027
+ /**
3028
+ * 音量调节控件
3029
+ * @category Control
3030
3030
  */ var Volume = /*#__PURE__*/ function(Control) {
3031
3031
  _inherits$u(Volume, Control);
3032
3032
  function Volume(options) {
@@ -3100,8 +3100,8 @@
3100
3100
  return _this;
3101
3101
  }
3102
3102
  var _proto = Volume.prototype;
3103
- /**
3104
- * 销毁
3103
+ /**
3104
+ * 销毁
3105
3105
  */ _proto.destroy = function destroy() {
3106
3106
  var _this__progress_destroy, _this__progress, _this_picker;
3107
3107
  (_this__progress = this._progress) == null ? void 0 : (_this__progress_destroy = _this__progress.destroy) == null ? void 0 : _this__progress_destroy.call(_this__progress);
@@ -3159,8 +3159,8 @@
3159
3159
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_VOLUME
3160
3160
  });
3161
3161
  };
3162
- /**
3163
- * 点击 Control 会触发
3162
+ /**
3163
+ * 点击 Control 会触发
3164
3164
  */ _proto._onControlClick = function _onControlClick() {
3165
3165
  // this._options.onClick?.(e);
3166
3166
  };
@@ -3177,8 +3177,8 @@
3177
3177
  _create_class$h(Volume, [
3178
3178
  {
3179
3179
  key: "muted",
3180
- get: /**
3181
- * 是否静音
3180
+ get: /**
3181
+ * 是否静音
3182
3182
  */ function get() {
3183
3183
  return this._muted;
3184
3184
  },
@@ -3202,8 +3202,8 @@
3202
3202
  },
3203
3203
  {
3204
3204
  key: "volume",
3205
- get: /**
3206
- * 当前音量值(真实值 即使静音)
3205
+ get: /**
3206
+ * 当前音量值(真实值 即使静音)
3207
3207
  */ function get() {
3208
3208
  return this._lastVolume;
3209
3209
  },
@@ -3226,8 +3226,8 @@
3226
3226
  },
3227
3227
  {
3228
3228
  key: "disabled",
3229
- get: /**
3230
- * 是否禁用
3229
+ get: /**
3230
+ * 是否禁用
3231
3231
  */ function get() {
3232
3232
  return this._disabled;
3233
3233
  },
@@ -3926,9 +3926,9 @@
3926
3926
  };
3927
3927
  return _set_prototype_of$x(o, p);
3928
3928
  }
3929
- /**
3930
- * 全屏控件
3931
- * @category Control
3929
+ /**
3930
+ * 全屏控件
3931
+ * @category Control
3932
3932
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
3933
3933
  _inherits$t(Fullscreen, Control);
3934
3934
  function Fullscreen(options) {
@@ -3955,8 +3955,8 @@
3955
3955
  return _this;
3956
3956
  }
3957
3957
  var _proto = Fullscreen.prototype;
3958
- /**
3959
- * 销毁
3958
+ /**
3959
+ * 销毁
3960
3960
  */ _proto.destroy = function destroy() {
3961
3961
  var _this__fullscreenUtil;
3962
3962
  this.$container.innerHTML = '';
@@ -3984,8 +3984,8 @@
3984
3984
  this._render();
3985
3985
  this.options.onChange == null ? void 0 : this.options.onChange.call(this.options, info);
3986
3986
  };
3987
- /**
3988
- * 点击 Control 会触发
3987
+ /**
3988
+ * 点击 Control 会触发
3989
3989
  */ _proto._onControlClick = function _onControlClick() {
3990
3990
  if (this.isCurrentFullscreen) {
3991
3991
  var _this__fullscreenUtil;
@@ -4029,9 +4029,9 @@
4029
4029
  };
4030
4030
  return _set_prototype_of$w(o, p);
4031
4031
  }
4032
- /**
4033
- * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
4034
- * @category Control
4032
+ /**
4033
+ * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
4034
+ * @category Control
4035
4035
  */ var Rec = /*#__PURE__*/ function(Control) {
4036
4036
  _inherits$s(Rec, Control);
4037
4037
  function Rec(options) {
@@ -4050,8 +4050,8 @@
4050
4050
  return _this;
4051
4051
  }
4052
4052
  var _proto = Rec.prototype;
4053
- /**
4054
- * 销毁
4053
+ /**
4054
+ * 销毁
4055
4055
  */ _proto.destroy = function destroy() {
4056
4056
  var _this__delegation;
4057
4057
  this.$container.removeEventListener('dblclick', this._onDBlClick);
@@ -4059,9 +4059,9 @@
4059
4059
  this._delegation = null;
4060
4060
  Control.prototype.destroy.call(this);
4061
4061
  };
4062
- /**
4063
- * 添加回放类型图标
4064
- * @param {string} id 回放类型 'rec' | 'cloudRec' | 'cloudRecord'
4062
+ /**
4063
+ * 添加回放类型图标
4064
+ * @param {string} id 回放类型 'rec' | 'cloudRec' | 'cloudRecord'
4065
4065
  */ _proto.addRecType = function addRecType(id) {
4066
4066
  var spanIcon = '';
4067
4067
  switch(id){
@@ -4128,8 +4128,8 @@
4128
4128
  }
4129
4129
  });
4130
4130
  };
4131
- /**
4132
- * 点击 Control 会触发
4131
+ /**
4132
+ * 点击 Control 会触发
4133
4133
  */ _proto._onControlClick = function _onControlClick(e) {};
4134
4134
  return Rec;
4135
4135
  }(Control);
@@ -4854,8 +4854,8 @@
4854
4854
  }
4855
4855
  };
4856
4856
 
4857
- /**
4858
- * flv 预览
4857
+ /**
4858
+ * flv 预览
4859
4859
  */ var hlsLiveTemplate = {
4860
4860
  autoFocus: 3,
4861
4861
  // poster:
@@ -4907,8 +4907,8 @@
4907
4907
  }
4908
4908
  };
4909
4909
 
4910
- /**
4911
- * flv 预览
4910
+ /**
4911
+ * flv 预览
4912
4912
  */ var hlsRecTemplate = {
4913
4913
  autoFocus: 3,
4914
4914
  // poster:
@@ -4966,8 +4966,8 @@
4966
4966
  }
4967
4967
  };
4968
4968
 
4969
- /**
4970
- * pc 预览
4969
+ /**
4970
+ * pc 预览
4971
4971
  */ var pcLive = {
4972
4972
  autoFocus: 3,
4973
4973
  header: {
@@ -5066,8 +5066,8 @@
5066
5066
  }
5067
5067
  };
5068
5068
 
5069
- /**
5070
- * pc 回放
5069
+ /**
5070
+ * pc 回放
5071
5071
  */ var pcRec = {
5072
5072
  header: {
5073
5073
  // color: DEFAULT_COLOR,
@@ -5178,8 +5178,8 @@
5178
5178
  }
5179
5179
  };
5180
5180
 
5181
- /**
5182
- * mobile 预览
5181
+ /**
5182
+ * mobile 预览
5183
5183
  */ var mobileLive = {
5184
5184
  header: {
5185
5185
  // color: DEFAULT_COLOR,
@@ -5267,8 +5267,8 @@
5267
5267
  }
5268
5268
  };
5269
5269
 
5270
- /**
5271
- * mobile 回放
5270
+ /**
5271
+ * mobile 回放
5272
5272
  */ var mobileRec = {
5273
5273
  header: {
5274
5274
  // color: DEFAULT_COLOR,
@@ -5362,8 +5362,8 @@
5362
5362
  }
5363
5363
  };
5364
5364
 
5365
- /**
5366
- * 安防版(预览/回放)
5365
+ /**
5366
+ * 安防版(预览/回放)
5367
5367
  */ var security = {
5368
5368
  header: {
5369
5369
  // color: DEFAULT_COLOR,
@@ -5439,8 +5439,8 @@
5439
5439
  }
5440
5440
  };
5441
5441
 
5442
- /**
5443
- * 语音版(预览)
5442
+ /**
5443
+ * 语音版(预览)
5444
5444
  */ var voice = {
5445
5445
  header: {
5446
5446
  // color: DEFAULT_COLOR,
@@ -5492,11 +5492,11 @@
5492
5492
  }
5493
5493
  };
5494
5494
 
5495
- /**
5496
- * standard 做特殊处理
5497
- *
5498
- * WARN: 除了 'deviceID', 'deviceName', 'rec', 'cloudRec', 'cloudRecord' 做特殊处理, 只能放置在顶部, 其它不做处理,如果配置渲染的有问题需要开发者自行修改
5499
- * FIXME: 暂时不去重, 让开发者自己去修改
5495
+ /**
5496
+ * standard 做特殊处理
5497
+ *
5498
+ * WARN: 除了 'deviceID', 'deviceName', 'rec', 'cloudRec', 'cloudRecord' 做特殊处理, 只能放置在顶部, 其它不做处理,如果配置渲染的有问题需要开发者自行修改
5499
+ * FIXME: 暂时不去重, 让开发者自己去修改
5500
5500
  */ var TEMPLATES = {
5501
5501
  pcLive: pcLive,
5502
5502
  pcRec: pcRec,
@@ -5526,9 +5526,9 @@
5526
5526
  };
5527
5527
  return _set_prototype_of$v(o, p);
5528
5528
  }
5529
- /**
5530
- * 截图控件
5531
- * @category Content
5529
+ /**
5530
+ * 截图控件
5531
+ * @category Content
5532
5532
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
5533
5533
  _inherits$r(Content, EventEmitter);
5534
5534
  function Content(options) {
@@ -5558,11 +5558,11 @@
5558
5558
  return _this;
5559
5559
  }
5560
5560
  var _proto = Content.prototype;
5561
- /**
5562
- * 重新画面区域
5563
- * @param {number} originWidth 画面宽度
5564
- * @param {number} originHeight 画面高度
5565
- * @returns {void}
5561
+ /**
5562
+ * 重新画面区域
5563
+ * @param {number} originWidth 画面宽度
5564
+ * @param {number} originHeight 画面高度
5565
+ * @returns {void}
5566
5566
  */ _proto.rerender = function rerender(originWidth, originHeight) {
5567
5567
  if (originWidth === void 0) originWidth = 0;
5568
5568
  if (originHeight === void 0) originHeight = 0;
@@ -5675,9 +5675,9 @@
5675
5675
  };
5676
5676
  return _set_prototype_of$u(o, p);
5677
5677
  }
5678
- /**
5679
- * 更多控件
5680
- * @category Control
5678
+ /**
5679
+ * 更多控件
5680
+ * @category Control
5681
5681
  */ var More = /*#__PURE__*/ function(Control) {
5682
5682
  _inherits$q(More, Control);
5683
5683
  function More(options) {
@@ -5723,9 +5723,9 @@
5723
5723
  }
5724
5724
  // debug
5725
5725
  };
5726
- /**
5727
- * 添加
5728
- * @param control
5726
+ /**
5727
+ * 添加
5728
+ * @param control
5729
5729
  */ _proto.add = function add(key, part, control, props) {
5730
5730
  this.list.unshift({
5731
5731
  part: part,
@@ -5735,9 +5735,9 @@
5735
5735
  height: props.height
5736
5736
  });
5737
5737
  };
5738
- /**
5739
- * 移除
5740
- * @param control
5738
+ /**
5739
+ * 移除
5740
+ * @param control
5741
5741
  */ _proto.remove = function remove(control) {
5742
5742
  var index = this.list.findIndex(function(item) {
5743
5743
  return item.control === control;
@@ -5757,20 +5757,20 @@
5757
5757
  }
5758
5758
  Control.prototype.destroy.call(this);
5759
5759
  };
5760
- /**
5761
- * 点击 Control 会触发
5760
+ /**
5761
+ * 点击 Control 会触发
5762
5762
  */ _proto._onControlClick = function _onControlClick(e) {
5763
5763
  // this._options.onClick?.(e);
5764
5764
  };
5765
5765
  return More;
5766
5766
  }(Control);
5767
5767
 
5768
- /**
5769
- * 函数防抖
5770
- * @param {Function} func
5771
- * @param {number} wait
5772
- * @typeParam T - 函数类型
5773
- * @returns {Function}
5768
+ /**
5769
+ * 函数防抖
5770
+ * @param {Function} func
5771
+ * @param {number} wait
5772
+ * @typeParam T - 函数类型
5773
+ * @returns {Function}
5774
5774
  */ // eslint-disable-next-line @typescript-eslint/ban-types
5775
5775
  function debounce(func, wait) {
5776
5776
  var timeout;
@@ -6394,23 +6394,23 @@
6394
6394
  });
6395
6395
  }
6396
6396
 
6397
- /**
6398
- * 重新调整播放器窗口大小
6399
- *
6400
- * Adjust the player window size
6401
- * @param {number | string} width 宽度(number 类型默认px, 支持字符串大小 "100%" | "50vw")
6402
- * @param {number | string} height 高度(number 类型默认px, 支持字符串大小 "100%" | "50vh")
6403
- * @since 0.0.1
6404
- * @example
6405
- * ```ts
6406
- * theme.resize(600, 400) // 600px * 400px
6407
- * theme.resize("600px", "400px") // 600px * 400px
6408
- * theme.resize("50%", "1vh")
6409
- * theme.resize("2em", "2rem")
6410
- * // 事件监听 event, 这里是具体的宽高(单位px)
6411
- * theme.on(Theme.EVENTS.resize, (width: number, height: number) => {})
6412
- * ```
6413
- * @returns {void}
6397
+ /**
6398
+ * 重新调整播放器窗口大小
6399
+ *
6400
+ * Adjust the player window size
6401
+ * @param {number | string} width 宽度(number 类型默认px, 支持字符串大小 "100%" | "50vw")
6402
+ * @param {number | string} height 高度(number 类型默认px, 支持字符串大小 "100%" | "50vh")
6403
+ * @since 0.0.1
6404
+ * @example
6405
+ * ```ts
6406
+ * theme.resize(600, 400) // 600px * 400px
6407
+ * theme.resize("600px", "400px") // 600px * 400px
6408
+ * theme.resize("50%", "1vh")
6409
+ * theme.resize("2em", "2rem")
6410
+ * // 事件监听 event, 这里是具体的宽高(单位px)
6411
+ * theme.on(Theme.EVENTS.resize, (width: number, height: number) => {})
6412
+ * ```
6413
+ * @returns {void}
6414
6414
  */ function _resize(theme, width, height) {
6415
6415
  var cssText = '';
6416
6416
  if (/^\d+(\.\d+)?$/.test(width + '')) {
@@ -6473,9 +6473,9 @@
6473
6473
  open: false,
6474
6474
  max: 8
6475
6475
  };
6476
- /**
6477
- * 电子放大控件
6478
- * @category Control
6476
+ /**
6477
+ * 电子放大控件
6478
+ * @category Control
6479
6479
  */ var Zoom$1 = /*#__PURE__*/ function(Control) {
6480
6480
  _inherits$p(Zoom, Control);
6481
6481
  function Zoom(options) {
@@ -6552,8 +6552,8 @@
6552
6552
  }
6553
6553
  Control.prototype.destroy.call(this);
6554
6554
  };
6555
- /**
6556
- * 点击 Control 会触发
6555
+ /**
6556
+ * 点击 Control 会触发
6557
6557
  */ _proto._onControlClick = function _onControlClick(e) {
6558
6558
  this.active = !this.active;
6559
6559
  Control.prototype._onControlClick.call(this, e);
@@ -6573,8 +6573,8 @@
6573
6573
  },
6574
6574
  {
6575
6575
  key: "active",
6576
- get: /**
6577
- * 是否激活
6576
+ get: /**
6577
+ * 是否激活
6578
6578
  */ function get() {
6579
6579
  return this._active;
6580
6580
  },
@@ -7230,8 +7230,8 @@
7230
7230
  return '';
7231
7231
  }
7232
7232
 
7233
- /**
7234
- * Header
7233
+ /**
7234
+ * Header
7235
7235
  */ var Component = /*#__PURE__*/ function() {
7236
7236
  function Component(options) {
7237
7237
  if (options === void 0) options = {};
@@ -7283,8 +7283,8 @@
7283
7283
  this.$popupContainer.appendChild(this.$container);
7284
7284
  }
7285
7285
  var _proto = Component.prototype;
7286
- /**
7287
- * 销毁 header
7286
+ /**
7287
+ * 销毁 header
7288
7288
  */ _proto.destroy = function destroy() {
7289
7289
  var _this_$popupContainer;
7290
7290
  (_this_$popupContainer = this.$popupContainer) == null ? void 0 : _this_$popupContainer.removeChild(this.$container);
@@ -7560,10 +7560,10 @@
7560
7560
  };
7561
7561
  return _set_prototype_of$q(o, p);
7562
7562
  }
7563
- /**
7564
- * 全局全屏
7565
- * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
7566
- * @category Control
7563
+ /**
7564
+ * 全局全屏
7565
+ * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
7566
+ * @category Control
7567
7567
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
7568
7568
  _inherits$m(GlobalFullscreen, Fullscreen);
7569
7569
  function GlobalFullscreen(options) {
@@ -7581,8 +7581,8 @@
7581
7581
  title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_GLOBAL_FULLSCREEN
7582
7582
  });
7583
7583
  };
7584
- /**
7585
- * 点击 Control 会触发
7584
+ /**
7585
+ * 点击 Control 会触发
7586
7586
  */ _proto._onControlClick = function _onControlClick() {
7587
7587
  // 网页全屏的情况下 还可以执行全局全屏
7588
7588
  if (this.isCurrentFullscreen && this._$rootContainer.classList.contains("" + PREFIX_CLASS$1 + "-global-fullscreen")) {
@@ -7628,9 +7628,9 @@
7628
7628
  };
7629
7629
  return _set_prototype_of$p(o, p);
7630
7630
  }
7631
- /**
7632
- * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
7633
- * @category Control
7631
+ /**
7632
+ * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
7633
+ * @category Control
7634
7634
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
7635
7635
  _inherits$l(CapturePicture, Control);
7636
7636
  function CapturePicture(options) {
@@ -7661,8 +7661,8 @@
7661
7661
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_CAPTURE
7662
7662
  });
7663
7663
  };
7664
- /**
7665
- * 点击 Control 会触发
7664
+ /**
7665
+ * 点击 Control 会触发
7666
7666
  */ _proto._onControlClick = function _onControlClick(e) {
7667
7667
  var _this = this;
7668
7668
  var _this_options_type, _this_options_cloudRecUpload;
@@ -7738,9 +7738,9 @@
7738
7738
  };
7739
7739
  return _set_prototype_of$n(o, p);
7740
7740
  }
7741
- /**
7742
- * 云台控件
7743
- * @category Control
7741
+ /**
7742
+ * 云台控件
7743
+ * @category Control
7744
7744
  */ var Ptz = /*#__PURE__*/ function(Control) {
7745
7745
  _inherits$k(Ptz, Control);
7746
7746
  function Ptz(options) {
@@ -7829,8 +7829,8 @@
7829
7829
  }
7830
7830
  };
7831
7831
  };
7832
- /**
7833
- * 点击 Control 会触发
7832
+ /**
7833
+ * 点击 Control 会触发
7834
7834
  */ _proto._onControlClick = function _onControlClick(e) {
7835
7835
  Control.prototype._onControlClick.call(this, e);
7836
7836
  this.active = !this.active;
@@ -7933,14 +7933,14 @@
7933
7933
  var RECORD_DEFAULT_OPTIONS = {
7934
7934
  maxDuration: 3600
7935
7935
  };
7936
- /**
7937
- * 录制控件,点击开始录制,再次点击停止录制,
7938
- * 录制开始到结束会依次触发 `startRecord` 和 `stopRecord` 事件
7939
- *
7940
- * 注意:
7941
- * 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
7942
- * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
7943
- * @category Control
7936
+ /**
7937
+ * 录制控件,点击开始录制,再次点击停止录制,
7938
+ * 录制开始到结束会依次触发 `startRecord` 和 `stopRecord` 事件
7939
+ *
7940
+ * 注意:
7941
+ * 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
7942
+ * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
7943
+ * @category Control
7944
7944
  */ var Record = /*#__PURE__*/ function(Control) {
7945
7945
  _inherits$j(Record, Control);
7946
7946
  function Record(options) {
@@ -7955,16 +7955,16 @@
7955
7955
  return _this;
7956
7956
  }
7957
7957
  var _proto = Record.prototype;
7958
- /**
7959
- * 渲染图标
7958
+ /**
7959
+ * 渲染图标
7960
7960
  */ _proto._render = function _render() {
7961
7961
  var _this_locale;
7962
7962
  this.$container.innerHTML = IconComponents.record({
7963
7963
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_RECORDVIDEO
7964
7964
  });
7965
7965
  };
7966
- /**
7967
- * 渲染计时器
7966
+ /**
7967
+ * 渲染计时器
7968
7968
  */ _proto._renderTimer = function _renderTimer() {
7969
7969
  var _this = this;
7970
7970
  var _this__options_rootContainer, _this__options;
@@ -7993,8 +7993,8 @@
7993
7993
  this._destroyTimer();
7994
7994
  Control.prototype.destroy.call(this);
7995
7995
  };
7996
- /**
7997
- * 销毁定时器和销毁节点
7996
+ /**
7997
+ * 销毁定时器和销毁节点
7998
7998
  */ _proto._destroyTimer = function _destroyTimer() {
7999
7999
  this._seconds = 0;
8000
8000
  if (this._timer) {
@@ -8009,8 +8009,8 @@
8009
8009
  }
8010
8010
  this._active = false;
8011
8011
  };
8012
- /**
8013
- * 点击 Control 会触发
8012
+ /**
8013
+ * 点击 Control 会触发
8014
8014
  */ _proto._onControlClick = function _onControlClick(e) {
8015
8015
  this.active = !this.active;
8016
8016
  Control.prototype._onControlClick.call(this, e);
@@ -8018,8 +8018,8 @@
8018
8018
  _create_class$c(Record, [
8019
8019
  {
8020
8020
  key: "active",
8021
- get: /**
8022
- * 是否激活
8021
+ get: /**
8022
+ * 是否激活
8023
8023
  */ function get() {
8024
8024
  return this._active;
8025
8025
  },
@@ -8212,14 +8212,14 @@
8212
8212
  };
8213
8213
  }
8214
8214
  }
8215
- /**
8216
- * 对讲控件
8217
- *
8218
- * navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
8219
- * 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
8220
- * promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
8221
- *
8222
- * @category Control
8215
+ /**
8216
+ * 对讲控件
8217
+ *
8218
+ * navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
8219
+ * 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
8220
+ * promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
8221
+ *
8222
+ * @category Control
8223
8223
  */ var Talk = /*#__PURE__*/ function(Control) {
8224
8224
  _inherits$i(Talk, Control);
8225
8225
  function Talk(options) {
@@ -8262,16 +8262,16 @@
8262
8262
  Control.prototype.reset.call(this, hide);
8263
8263
  }
8264
8264
  };
8265
- /**
8266
- * 销毁对讲
8265
+ /**
8266
+ * 销毁对讲
8267
8267
  */ _proto.destroy = function destroy() {
8268
8268
  if (this.active) {
8269
8269
  this.reset();
8270
8270
  }
8271
8271
  Control.prototype.destroy.call(this);
8272
8272
  };
8273
- /**
8274
- * 点击 Control 会触发
8273
+ /**
8274
+ * 点击 Control 会触发
8275
8275
  */ _proto._onControlClick = function _onControlClick(e) {
8276
8276
  var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
8277
8277
  return Control.prototype._onControlClick;
@@ -8291,13 +8291,13 @@
8291
8291
  _create_class$b(Talk, [
8292
8292
  {
8293
8293
  key: "value",
8294
- get: /**
8295
- * 获取当前值
8294
+ get: /**
8295
+ * 获取当前值
8296
8296
  */ function get() {
8297
8297
  return this._value;
8298
8298
  },
8299
- set: /**
8300
- * 设置当前值 [0-1]
8299
+ set: /**
8300
+ * 设置当前值 [0-1]
8301
8301
  */ function set(value) {
8302
8302
  // 没有激活状态,则不处理
8303
8303
  if (!this.active) {
@@ -8483,12 +8483,12 @@
8483
8483
  };
8484
8484
  }
8485
8485
  }
8486
- /**
8487
- * 语音广播控件
8488
- *
8489
- * 用于触发语音广播功能的按钮控件
8490
- *
8491
- * @category Control
8486
+ /**
8487
+ * 语音广播控件
8488
+ *
8489
+ * 用于触发语音广播功能的按钮控件
8490
+ *
8491
+ * @category Control
8492
8492
  */ var Broadcast = /*#__PURE__*/ function(Control) {
8493
8493
  _inherits$h(Broadcast, Control);
8494
8494
  function Broadcast(options) {
@@ -8528,16 +8528,16 @@
8528
8528
  Control.prototype.reset.call(this, hide);
8529
8529
  }
8530
8530
  };
8531
- /**
8532
- * 销毁语音广播控件
8531
+ /**
8532
+ * 销毁语音广播控件
8533
8533
  */ _proto.destroy = function destroy() {
8534
8534
  if (this.active) {
8535
8535
  this.reset();
8536
8536
  }
8537
8537
  Control.prototype.destroy.call(this);
8538
8538
  };
8539
- /**
8540
- * 点击 Control 会触发
8539
+ /**
8540
+ * 点击 Control 会触发
8541
8541
  */ _proto._onControlClick = function _onControlClick(e) {
8542
8542
  var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
8543
8543
  return Control.prototype._onControlClick;
@@ -8714,12 +8714,12 @@
8714
8714
  };
8715
8715
  }
8716
8716
  }
8717
- /**
8718
- * AI对话框控件
8719
- *
8720
- * 用于触发AI对话框功能的按钮控件
8721
- *
8722
- * @category Control
8717
+ /**
8718
+ * AI对话框控件
8719
+ *
8720
+ * 用于触发AI对话框功能的按钮控件
8721
+ *
8722
+ * @category Control
8723
8723
  */ var AIChat = /*#__PURE__*/ function(Control) {
8724
8724
  _inherits$g(AIChat, Control);
8725
8725
  function AIChat(options) {
@@ -8760,16 +8760,16 @@
8760
8760
  Control.prototype.reset.call(this, hide);
8761
8761
  }
8762
8762
  };
8763
- /**
8764
- * 销毁AI对话框控件
8763
+ /**
8764
+ * 销毁AI对话框控件
8765
8765
  */ _proto.destroy = function destroy() {
8766
8766
  if (this.active) {
8767
8767
  this.reset();
8768
8768
  }
8769
8769
  Control.prototype.destroy.call(this);
8770
8770
  };
8771
- /**
8772
- * 点击 Control 会触发
8771
+ /**
8772
+ * 点击 Control 会触发
8773
8773
  */ _proto._onControlClick = function _onControlClick(e) {
8774
8774
  var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
8775
8775
  return Control.prototype._onControlClick;
@@ -8821,12 +8821,12 @@
8821
8821
  };
8822
8822
  return _set_prototype_of$i(o, p);
8823
8823
  }
8824
- /**
8825
- * 直播按钮控件
8826
- *
8827
- * 点击切换到直播模式
8828
- *
8829
- * @category Control
8824
+ /**
8825
+ * 直播按钮控件
8826
+ *
8827
+ * 点击切换到直播模式
8828
+ *
8829
+ * @category Control
8830
8830
  */ var Live = /*#__PURE__*/ function(Control) {
8831
8831
  _inherits$f(Live, Control);
8832
8832
  function Live(options) {
@@ -8848,9 +8848,9 @@
8848
8848
  return _this;
8849
8849
  }
8850
8850
  var _proto = Live.prototype;
8851
- /**
8852
- * 根据 urlInfo 同步激活状态
8853
- * 在初始化和播放地址切换后调用
8851
+ /**
8852
+ * 根据 urlInfo 同步激活状态
8853
+ * 在初始化和播放地址切换后调用
8854
8854
  */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8855
8855
  var shouldBeActive = !!(urlInfo && urlInfo.type === 'live');
8856
8856
  this.active = shouldBeActive;
@@ -8861,13 +8861,13 @@
8861
8861
  title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_LIVE) || '直播'
8862
8862
  });
8863
8863
  };
8864
- /**
8865
- * 销毁
8864
+ /**
8865
+ * 销毁
8866
8866
  */ _proto.destroy = function destroy() {
8867
8867
  Control.prototype.destroy.call(this);
8868
8868
  };
8869
- /**
8870
- * 点击 Control 会触发
8869
+ /**
8870
+ * 点击 Control 会触发
8871
8871
  */ _proto._onControlClick = function _onControlClick(e) {
8872
8872
  var _this__options_onChange, _this__options;
8873
8873
  Control.prototype._onControlClick.call(this, e);
@@ -8912,12 +8912,12 @@
8912
8912
  };
8913
8913
  return _set_prototype_of$h(o, p);
8914
8914
  }
8915
- /**
8916
- * 回放下拉控件
8917
- *
8918
- * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
8919
- *
8920
- * @category Control
8915
+ /**
8916
+ * 回放下拉控件
8917
+ *
8918
+ * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
8919
+ *
8920
+ * @category Control
8921
8921
  */ var RecDropdown = /*#__PURE__*/ function(Control) {
8922
8922
  _inherits$e(RecDropdown, Control);
8923
8923
  function RecDropdown(options) {
@@ -8941,9 +8941,9 @@
8941
8941
  return _this;
8942
8942
  }
8943
8943
  var _proto = RecDropdown.prototype;
8944
- /**
8945
- * 根据 urlInfo 同步激活状态和回放类型
8946
- * 在初始化和播放地址切换后调用
8944
+ /**
8945
+ * 根据 urlInfo 同步激活状态和回放类型
8946
+ * 在初始化和播放地址切换后调用
8947
8947
  */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8948
8948
  if (urlInfo && urlInfo.type === 'rec') {
8949
8949
  var _urlInfo_searchParams1;
@@ -9020,8 +9020,8 @@
9020
9020
  target == null ? void 0 : target.classList.add("" + PREFIX_CLASS$1 + "-active");
9021
9021
  }
9022
9022
  };
9023
- /**
9024
- * 销毁
9023
+ /**
9024
+ * 销毁
9025
9025
  */ _proto.destroy = function destroy() {
9026
9026
  var _this__delegation_destroy, _this__delegation;
9027
9027
  (_this__delegation = this._delegation) == null ? void 0 : (_this__delegation_destroy = _this__delegation.destroy) == null ? void 0 : _this__delegation_destroy.call(_this__delegation);
@@ -9033,8 +9033,8 @@
9033
9033
  }
9034
9034
  Control.prototype.destroy.call(this);
9035
9035
  };
9036
- /**
9037
- * 点击 Control 会触发(移动端 click 触发 picker)
9036
+ /**
9037
+ * 点击 Control 会触发(移动端 click 触发 picker)
9038
9038
  */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
9039
9039
  _proto._onControlClick = function _onControlClick(_e) {
9040
9040
  // picker 自行处理 click/hover,这里不额外处理
@@ -9043,25 +9043,25 @@
9043
9043
  }(Control);
9044
9044
 
9045
9045
  /*
9046
- * @ezuikit/control-modal v0.0.1
9047
- * Copyright (c) 2026-07-06 Ezviz-OpenBiz
9046
+ * @ezuikit/control-modal v0.0.2
9047
+ * Copyright (c) 2026-07-28 Ezviz-OpenBiz
9048
9048
  * Released under the MIT License.
9049
9049
  */
9050
9050
  function _array_like_to_array$2(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _create_class$a(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _create_for_of_iterator_helper_loose$2(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array$2(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array$2(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var ModalProvider=function(){function ModalProvider(){this._instances=new Set,this._zIndexCounter=1e3;}var _proto=ModalProvider.prototype;return _proto.register=function(modal,minZIndex){this._instances.add(modal);var base=Math.max(this._zIndexCounter,minZIndex||1e3);return this._zIndexCounter=base+2,base},_proto.unregister=function(modal){this._instances.delete(modal);},_proto.bringToTop=function(){var base=this._zIndexCounter;return this._zIndexCounter+=2,base},_proto.getInstances=function(){return Array.from(this._instances)},_proto.destroyAll=function(){for(var _step,_iterator=_create_for_of_iterator_helper_loose$2(this.getInstances());!(_step=_iterator()).done;){var modal=_step.value;modal._destroyed||modal.destroy();}},ModalProvider.getInstance=function(){return ModalProvider._instance||(ModalProvider._instance=new ModalProvider),ModalProvider._instance},ModalProvider.resetInstance=function(){ModalProvider._instance&&(ModalProvider._instance._instances.clear(),ModalProvider._instance._zIndexCounter=1e3,ModalProvider._instance=null);},_create_class$a(ModalProvider,[{key:"count",get:function(){return this._instances.size}}]),ModalProvider}();ModalProvider._instance=null;var EVENTS$1={open:"open",close:"close",dragStart:"dragStart",dragging:"dragging",dragEnd:"dragEnd"},_$MODAL_LOCALES$_={zh:{close:"关闭"},en:{close:"Close"}},__$MODAL_DEFAULT_OPTIONS$__={width:420,position:"center",draggable:true,showMask:true,maskClosable:true,showHeader:true,showClose:true,closeOnEscape:true,open:false,zIndex:1e3,language:"zh"};var Modal=function(){function Modal(container,options){this._$mask=null,this._$header=null,this._$title=null,this._$close=null,this._visible=false,this._dragging=false,this._dragOffset={x:0,y:0},this._destroyed=false,this._dragBounds={maxLeft:0,maxTop:0},this._dragPoint=null,this._dragRafId=null,this._pos={x:0,y:0},this.options=deepmerge(__$MODAL_DEFAULT_OPTIONS$__,null!=options?options:{},{clone:false}),this._eventEmitter=new EventEmitter,this._i18n=new I18n(deepmerge(_$MODAL_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._container=this._resolveContainer(container),this._baseZIndex=ModalProvider.getInstance().register(this,this.options.zIndex),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onDragFrame=this._onDragFrame.bind(this),this._onHeaderPointerDown=this._onHeaderPointerDown.bind(this),this._onCloseClick=this._onCloseClick.bind(this),this._onMaskClick=this._onMaskClick.bind(this),this._onKeydown=this._onKeydown.bind(this),this._onWindowResize=this._onWindowResize.bind(this),this._onModalPointerDown=this._onModalPointerDown.bind(this),this._onWrapDblClick=this._onWrapDblClick.bind(this),this._render(),this._bindEvents(),this.options.open&&this.open();}var _proto=Modal.prototype;return _proto.open=function(){this._destroyed||this._visible||(this._visible=true,this._$mask&&this._$mask.classList.remove("emodal-hidden"),this._$wrap.classList.remove("emodal-hidden"),this._applyInitialPosition(),window.addEventListener("resize",this._onWindowResize),this.options.closeOnEscape&&document.addEventListener("keydown",this._onKeydown),this._eventEmitter.emit(EVENTS$1.open),null==this.options.onOpen||this.options.onOpen.call(this.options));},_proto.close=function(){!this._destroyed&&this._visible&&(this._visible=false,this._$mask&&this._$mask.classList.add("emodal-hidden"),this._$wrap.classList.add("emodal-hidden"),this._stopDragging(),window.removeEventListener("resize",this._onWindowResize),document.removeEventListener("keydown",this._onKeydown),this._eventEmitter.emit(EVENTS$1.close),null==this.options.onClose||this.options.onClose.call(this.options));},_proto.isVisible=function(){return this._visible},_proto.bringToTop=function(){this._destroyed||(this._baseZIndex=ModalProvider.getInstance().bringToTop(),this._$mask&&(this._$mask.style.zIndex=""+this._baseZIndex),this._$wrap.style.zIndex=""+(this._baseZIndex+1));},_proto.setTitle=function(title){this.options.title=title,this._$title&&this._mount(this._$title,title);},_proto.setContent=function(content){this.options.content=content,this._mount(this._$body,content);},_proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false}),(options.language||options.locales)&&(this._i18n=new I18n(deepmerge(_$MODAL_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"})),this._stopDragging();var wasVisible=this._visible;this._teardownDom(),this._render(),this._bindEvents(),wasVisible&&(this._visible=false,this.open());},_proto.on=function(event,callback){this._eventEmitter.on(event,callback);},_proto.off=function(event,callback){this._eventEmitter.off(event,callback);},_proto.setPosition=function(left,top,bounds){var _ref=bounds||this._bounds(),maxLeft=_ref.maxLeft,maxTop=_ref.maxTop,x=Math.max(0,Math.min(left,maxLeft)),y=Math.max(0,Math.min(top,maxTop));return this._setTranslate(x,y),{x:x,y:y}},_proto.destroy=function(){this._destroyed||(this._stopDragging(),window.removeEventListener("resize",this._onWindowResize),document.removeEventListener("keydown",this._onKeydown),this._teardownDom(),this._eventEmitter.removeAllListeners(),this._destroyed=true,ModalProvider.getInstance().unregister(this));},_proto._resolveContainer=function(container){return "string"==typeof container?document.querySelector(container)||document.body:container||document.body},_proto._toSize=function(value){return null==value||""===value?null:"number"==typeof value?value+"px":value},_proto._render=function(){this.options.showMask&&(this._$mask=document.createElement("div"),this._$mask.className="emodal-mask emodal-hidden",this._$mask.style.zIndex=""+this._baseZIndex,this._container.appendChild(this._$mask)),this._$wrap=document.createElement("div"),this._$wrap.className="emodal-wrap emodal-hidden",this.options.draggable&&this._$wrap.classList.add("emodal-draggable"),this.options.className&&this._$wrap.classList.add(this.options.className),this._$wrap.style.zIndex=""+(this._baseZIndex+1);var w=this._toSize(this.options.width);w&&(this._$wrap.style.width=w);var h=this._toSize(this.options.height);h&&(this._$wrap.style.height=h),this.options.showHeader?(this._$header=document.createElement("div"),this._$header.className="emodal-header",this._$title=document.createElement("div"),this._$title.className="emodal-title",void 0!==this.options.title&&this._mount(this._$title,this.options.title),this._$header.appendChild(this._$title),this.options.showClose&&(this._$close=document.createElement("button"),this._$close.type="button",this._$close.className="emodal-close",this._$close.setAttribute("aria-label",String(this._i18n.t("close"))),this._$close.innerHTML='<svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true">\n <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n</svg>',this._$header.appendChild(this._$close)),this._$wrap.appendChild(this._$header)):(this._$header=null,this._$title=null,this._$close=null),this._$body=document.createElement("div"),this._$body.className="emodal-body",void 0!==this.options.content&&this._mount(this._$body,this.options.content),this._$wrap.appendChild(this._$body),this._container.appendChild(this._$wrap);},_proto._mount=function(target,content){var left,right;left=content,(null!=(right=HTMLElement)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?(target.innerHTML="",target.appendChild(content)):target.innerHTML=null!=content?content:"";},_proto._teardownDom=function(){var _this__$mask;this._$wrap.parentNode&&this._$wrap.parentNode.removeChild(this._$wrap),(null==(_this__$mask=this._$mask)?void 0:_this__$mask.parentNode)&&this._$mask.parentNode.removeChild(this._$mask),this._$mask=null,this._$header=null,this._$title=null,this._$close=null;},_proto._bindEvents=function(){var _this__$close,_this__$mask,_this__$mask1;(null==(_this__$close=this._$close)||_this__$close.addEventListener("click",this._onCloseClick),this.options.showMask&&this.options.maskClosable)&&(null==(_this__$mask1=this._$mask)||_this__$mask1.addEventListener("click",this._onMaskClick));this.options.draggable&&this._$header&&(this._$header.addEventListener("mousedown",this._onHeaderPointerDown),this._$header.addEventListener("touchstart",this._onHeaderPointerDown,{passive:false})),this._$wrap.addEventListener("pointerdown",this._onModalPointerDown),this._$wrap.addEventListener("dblclick",this._onWrapDblClick),null==(_this__$mask=this._$mask)||_this__$mask.addEventListener("pointerdown",this._onModalPointerDown);},_proto._onCloseClick=function(e){e.stopPropagation(),this.close();},_proto._onMaskClick=function(){this.close();},_proto._onModalPointerDown=function(){this.bringToTop();},_proto._onWrapDblClick=function(e){e.stopPropagation();},_proto._onKeydown=function(e){"Escape"!==e.key&&"Esc"!==e.key||this.close();},_proto._onWindowResize=function(){if(this._dragging)return this._dragBounds=this._bounds(),void this.setPosition(this._pos.x,this._pos.y,this._dragBounds);this.setPosition(this._pos.x,this._pos.y);},_proto._getPoint=function(e){if("touches"in e){var t=e.touches[0]||e.changedTouches[0];return {x:t.clientX,y:t.clientY}}return {x:e.clientX,y:e.clientY}},_proto._onHeaderPointerDown=function(e){if(this.options.draggable){var target=e.target;if(!(this._$close&&(target===this._$close||this._$close.contains(target))||"button"in e&&0!==e.button)){var point=this._getPoint(e),rect=this._$wrap.getBoundingClientRect();this._dragOffset={x:point.x-rect.left,y:point.y-rect.top},this._dragBounds=this._bounds(),this._dragging=true,this._$wrap.style.willChange="transform",document.body.classList.add("emodal-dragging"),document.addEventListener("mousemove",this._onPointerMove),document.addEventListener("mouseup",this._onPointerUp),document.addEventListener("touchmove",this._onPointerMove,{passive:false}),document.addEventListener("touchend",this._onPointerUp),document.addEventListener("touchcancel",this._onPointerUp),this._eventEmitter.emit(EVENTS$1.dragStart);}}},_proto._onPointerMove=function(e){this._dragging&&(e.cancelable&&e.preventDefault(),this._dragPoint=this._getPoint(e),null===this._dragRafId&&(this._dragRafId=requestAnimationFrame(this._onDragFrame)));},_proto._onDragFrame=function(){if(this._dragRafId=null,this._dragging&&this._dragPoint){var left=this._dragPoint.x-this._dragOffset.x,top=this._dragPoint.y-this._dragOffset.y,_this__dragBounds=this._dragBounds,maxLeft=_this__dragBounds.maxLeft,maxTop=_this__dragBounds.maxTop,x=Math.max(0,Math.min(left,maxLeft)),y=Math.max(0,Math.min(top,maxTop));this._setTranslate(x,y),this._eventEmitter.emit(EVENTS$1.dragging,{x:x,y:y});}},_proto._onPointerUp=function(){this._dragging&&(this._stopDragging(),this._eventEmitter.emit(EVENTS$1.dragEnd,{left:this._pos.x,top:this._pos.y}));},_proto._stopDragging=function(){null!==this._dragRafId&&(cancelAnimationFrame(this._dragRafId),this._dragRafId=null),this._dragPoint=null,this._dragging?(this._dragging=false,this._$wrap&&(this._$wrap.style.willChange=""),document.body.classList.remove("emodal-dragging"),document.removeEventListener("mousemove",this._onPointerMove),document.removeEventListener("mouseup",this._onPointerUp),document.removeEventListener("touchmove",this._onPointerMove),document.removeEventListener("touchend",this._onPointerUp),document.removeEventListener("touchcancel",this._onPointerUp)):document.body.classList.remove("emodal-dragging");},_proto._bounds=function(){var vw=document.documentElement.clientWidth,vh=document.documentElement.clientHeight,w=this._$wrap.offsetWidth,h=this._$wrap.offsetHeight;return {maxLeft:Math.max(0,vw-w),maxTop:Math.max(0,vh-h)}},_proto._setTranslate=function(x,y){this._pos={x:x,y:y},this._$wrap.style.transform="translate3d("+x+"px, "+y+"px, 0)";},_proto._center=function(){var vw=document.documentElement.clientWidth,vh=document.documentElement.clientHeight,w=this._$wrap.offsetWidth,h=this._$wrap.offsetHeight;this.setPosition((vw-w)/2,(vh-h)/2);},_proto._applyInitialPosition=function(){var obj,position=this.options.position;position&&"object"==(void 0===position?"undefined":(obj=position)&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj)?this.setPosition(position.x,position.y):this._center();},Modal}();Modal.VERSION="0.0.1",Modal.EVENTS=EVENTS$1;
9051
9051
 
9052
9052
  /*
9053
- * @ezuikit/control-virtual-scroll v0.0.1
9054
- * Copyright (c) 2026-06-29 Ezviz-OpenBiz
9053
+ * @ezuikit/control-virtual-scroll v0.0.2
9054
+ * Copyright (c) 2026-09-15 12:22:14 Ezviz-OpenBiz
9055
9055
  * Released under the MIT License.
9056
9056
  */
9057
- var EVENTS={render:"render",scroll:"scroll",reachTop:"reachTop",reachBottom:"reachBottom"},DefaultOptions={itemHeight:40,buffer:5,smooth:true};function _create_class$9(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _OVERWRITE_MERGE_={clone:false,arrayMerge:function(_dest,src){return src}},VirtualScroll=function(){function VirtualScroll(container,options){this._active=new Map,this._pool=[],this._containerHeight=0,this._startIndex=-1,this._endIndex=-1,this._ticking=false,this._destroyed=false,this._resizeObserver=null,this._eventEmitter=new EventEmitter,this.options=deepmerge(DefaultOptions,null!=options?options:{},_OVERWRITE_MERGE_),this._wrapper=this._resolveContainer(null!=container?container:this.options.container),this._onScroll=this._onScroll.bind(this),this._onResize=this._onResize.bind(this),this._wrapper.classList.add("evscroll-wrapper"),"static"===getComputedStyle(this._wrapper).position&&(this._wrapper.style.position="relative"),this._wrapper.style.overflowY="auto",this._$content=document.createElement("div"),this._$content.className="evscroll-content",this._$viewport=document.createElement("div"),this._$viewport.className="evscroll-viewport",this._$content.appendChild(this._$viewport),this._wrapper.appendChild(this._$content),this._containerHeight=this._wrapper.clientHeight,this._wrapper.addEventListener("scroll",this._onScroll,{passive:true}),this._setupResizeObserver(),this._syncContentHeight(),this._compute(true);}var _proto=VirtualScroll.prototype;return _proto.getTotalCount=function(){return this.options.data?this.options.data.length:this.options.total||0},_proto.getCurrentRange=function(){return {startIndex:this._startIndex,endIndex:this._endIndex}},_proto.scrollToIndex=function(index,smooth){var total=this.getTotalCount();if(index<0||index>=total)return false;var top=index*(this.options.itemHeight||DefaultOptions.itemHeight),useSmooth=void 0===smooth?this.options.smooth:smooth;return "function"==typeof this._wrapper.scrollTo?this._wrapper.scrollTo({top:top,behavior:useSmooth?"smooth":"auto"}):this._wrapper.scrollTop=top,true},_proto.scrollToTop=function(smooth){this.scrollToIndex(0,smooth);},_proto.scrollToBottom=function(smooth){var total=this.getTotalCount();total>0&&this.scrollToIndex(total-1,smooth);},_proto.setData=function(data){this.options.data=data,this.refresh();},_proto.setTotal=function(total){this.options.total=total,this.options.data=void 0,this.refresh();},_proto.refresh=function(){this._reset(),this._syncContentHeight(),this._compute(true);},_proto.updateOptions=function(options){this.options=deepmerge(this.options,options,_OVERWRITE_MERGE_),this.refresh();},_proto.on=function(event,callback){this._eventEmitter.on(event,callback);},_proto.off=function(event,callback){this._eventEmitter.off(event,callback);},_proto.destroy=function(){this._destroyed||(this._wrapper.removeEventListener("scroll",this._onScroll),this._resizeObserver?(this._resizeObserver.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._reset(),this._$content.parentNode===this._wrapper&&this._wrapper.removeChild(this._$content),this._wrapper.classList.remove("evscroll-wrapper"),this._eventEmitter.removeAllListeners(),this._destroyed=true);},_proto._resolveContainer=function(container){var el="string"==typeof container?document.querySelector(container):container;if(!el)throw new Error("[VirtualScroll] container not found: "+String(container));return el},_proto._syncContentHeight=function(){this._$content.style.height=this.getTotalCount()*this._itemHeight+"px";},_proto._onScroll=function(){var _this=this;this._eventEmitter.emit(EVENTS.scroll,this._wrapper.scrollTop),null==this.options.onScroll||this.options.onScroll.call(this.options,this._wrapper.scrollTop),this._ticking||(this._ticking=true,requestAnimationFrame(function(){_this._compute(false),_this._ticking=false;}));},_proto._setupResizeObserver=function(){var _this=this;"undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver(function(){return _this._onResize()}),this._resizeObserver.observe(this._wrapper)):window.addEventListener("resize",this._onResize);},_proto._onResize=function(){var h=this._wrapper.clientHeight;h!==this._containerHeight&&(this._containerHeight=h,this._compute(true));},_proto._compute=function(force){if(!this._destroyed){var total=this.getTotalCount();if(0!==total&&0!==this._containerHeight||(this._containerHeight=this._wrapper.clientHeight,0!==total)){var scrollTop=this._wrapper.scrollTop,itemHeight=this._itemHeight,buffer=this._buffer,rawStart=Math.floor(scrollTop/itemHeight),start=Math.max(0,rawStart-buffer),rawEnd=rawStart+Math.ceil(this._containerHeight/itemHeight)-1,end=Math.min(total-1,rawEnd+buffer);if(force||start!==this._startIndex||end!==this._endIndex){this._startIndex=start,this._endIndex=end,this._updateRange(start,end);var range={startIndex:start,endIndex:end};this._eventEmitter.emit(EVENTS.render,range),null==this.options.onRender||this.options.onRender.call(this.options,range),0===start&&this._eventEmitter.emit(EVENTS.reachTop),end===total-1&&this._eventEmitter.emit(EVENTS.reachBottom);}}else this._reset();}},_proto._updateRange=function(start,end){var _this=this,itemHeight=this._itemHeight,toRecycle=[];this._active.forEach(function(_el,idx){(idx<start||idx>end)&&toRecycle.push(idx);}),toRecycle.forEach(function(idx){var el=_this._active.get(idx);el&&(el.style.display="none",_this._pool.push(el)),_this._active.delete(idx);});for(var i=start;i<=end;i++)if(!this._active.has(i)){var el=this._pool.pop()||this._createItemEl();el.style.display="",el.style.top=i*itemHeight+"px",el.style.height=itemHeight+"px",el.setAttribute("data-index",String(i)),this._fillItem(el,i),el.parentNode!==this._$viewport&&this._$viewport.appendChild(el),this._active.set(i,el);}},_proto._createItemEl=function(){var el=document.createElement("div");return el.className="evscroll-item",el},_proto._fillItem=function(el,index){var left,right,item=this.options.data?this.options.data[index]:void 0,content=this.options.renderItem(index,item);left=content,(null!=(right=HTMLElement)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?el.replaceChildren(content):el.innerHTML=null!=content?content:"";},_proto._reset=function(){this._active.clear(),this._pool=[],this._$viewport.replaceChildren(),this._startIndex=-1,this._endIndex=-1;},_create_class$9(VirtualScroll,[{key:"_itemHeight",get:function(){return this.options.itemHeight||DefaultOptions.itemHeight}},{key:"_buffer",get:function(){var _this_options_buffer;return null!=(_this_options_buffer=this.options.buffer)?_this_options_buffer:DefaultOptions.buffer}}]),VirtualScroll}();VirtualScroll.VERSION="0.0.1",VirtualScroll.EVENTS=EVENTS;
9057
+ var EVENTS={render:"render",scroll:"scroll",reachTop:"reachTop",reachBottom:"reachBottom"},DefaultOptions={itemHeight:40,buffer:5,smooth:true};function _create_class$9(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}var _OVERWRITE_MERGE_={clone:false,arrayMerge:function(_dest,src){return src}},VirtualScroll=function(){function VirtualScroll(container,options){this._active=new Map,this._pool=[],this._heights=[],this._prefix=[],this._prefixDirty=false,this._containerHeight=0,this._startIndex=-1,this._endIndex=-1,this._ticking=false,this._destroyed=false,this._resizeObserver=null,this._eventEmitter=new EventEmitter,this.options=deepmerge(DefaultOptions,null!=options?options:{},_OVERWRITE_MERGE_),this._wrapper=this._resolveContainer(null!=container?container:this.options.container),this._onScroll=this._onScroll.bind(this),this._onResize=this._onResize.bind(this),this._wrapper.classList.add("evscroll-wrapper"),"static"===getComputedStyle(this._wrapper).position&&(this._wrapper.style.position="relative"),this._wrapper.style.overflowY="auto",this._$content=document.createElement("div"),this._$content.className="evscroll-content",this._$viewport=document.createElement("div"),this._$viewport.className="evscroll-viewport",this._$content.appendChild(this._$viewport),this._wrapper.appendChild(this._$content),this._containerHeight=this._wrapper.clientHeight,this._wrapper.addEventListener("scroll",this._onScroll,{passive:true}),this._setupResizeObserver(),this._initHeights(),this._syncContentHeight(),this._compute(true);}var _proto=VirtualScroll.prototype;return _proto.getTotalCount=function(){return this.options.data?this.options.data.length:this.options.total||0},_proto.getCurrentRange=function(){return {startIndex:this._startIndex,endIndex:this._endIndex}},_proto.scrollToIndex=function(index,smooth){var total=this.getTotalCount();if(index<0||index>=total)return false;var top=this._offsetOf(index),useSmooth=void 0===smooth?this.options.smooth:smooth;return "function"==typeof this._wrapper.scrollTo?this._wrapper.scrollTo({top:top,behavior:useSmooth?"smooth":"auto"}):this._wrapper.scrollTop=top,true},_proto.scrollToTop=function(smooth){this.scrollToIndex(0,smooth);},_proto.scrollToBottom=function(smooth){var total=this.getTotalCount();total>0&&this.scrollToIndex(total-1,smooth);},_proto.setData=function(data){this.options.data=data,this.refresh();},_proto.setTotal=function(total){this.options.total=total,this.options.data=void 0,this.refresh();},_proto.refresh=function(){this._reset(),this._initHeights(),this._syncContentHeight(),this._compute(true);},_proto.updateOptions=function(options){this.options=deepmerge(this.options,options,_OVERWRITE_MERGE_),this.refresh();},_proto.on=function(event,callback){this._eventEmitter.on(event,callback);},_proto.off=function(event,callback){this._eventEmitter.off(event,callback);},_proto.destroy=function(){this._destroyed||(this._wrapper.removeEventListener("scroll",this._onScroll),this._resizeObserver?(this._resizeObserver.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._reset(),this._$content.parentNode===this._wrapper&&this._wrapper.removeChild(this._$content),this._wrapper.classList.remove("evscroll-wrapper"),this._eventEmitter.removeAllListeners(),this._destroyed=true);},_proto._resolveContainer=function(container){var el="string"==typeof container?document.querySelector(container):container;if(!el)throw new Error("[VirtualScroll] container not found: "+String(container));return el},_proto._estimated=function(){var _this_options_estimatedItemHeight,ih=this.options.itemHeight;return null!=(_this_options_estimatedItemHeight=this.options.estimatedItemHeight)?_this_options_estimatedItemHeight:"number"==typeof ih&&ih>0?ih:DefaultOptions.itemHeight},_proto._baseHeightAt=function(index){var ih=this.options.itemHeight;if("function"==typeof ih){var h=ih(index,this.options.data?this.options.data[index]:void 0);return h>0?h:this._estimated()}return this._estimated()},_proto._initHeights=function(){if(!this._variable)return this._heights=[],this._prefix=[],void(this._prefixDirty=false);for(var total=this.getTotalCount(),heights=new Array(total),i=0;i<total;i++)heights[i]=this._baseHeightAt(i);this._heights=heights,this._prefixDirty=true,this._ensurePrefix();},_proto._ensurePrefix=function(){if(this._variable){var total=this.getTotalCount();if(this._prefixDirty||this._prefix.length!==total+1){var prefix=new Array(total+1);prefix[0]=0;for(var i=0;i<total;i++)prefix[i+1]=prefix[i]+(this._heights[i]||0);this._prefix=prefix,this._prefixDirty=false;}}},_proto._offsetOf=function(index){if(this._variable){this._ensurePrefix();var i=Math.max(0,Math.min(index,this.getTotalCount()));return this._prefix[i]||0}return index*this._fixedHeight},_proto._heightOf=function(index){return this._variable?this._heights[index]||0:this._fixedHeight},_proto._totalHeight=function(){return this._variable?(this._ensurePrefix(),this._prefix[this.getTotalCount()]||0):this.getTotalCount()*this._fixedHeight},_proto._findStartIndex=function(scrollTop){var total=this.getTotalCount();if(0===total)return 0;if(!this._variable)return Math.min(total-1,Math.max(0,Math.floor(scrollTop/this._fixedHeight)));this._ensurePrefix();for(var lo=0,hi=total;lo<hi;){var mid=lo+hi+1>>1;this._prefix[mid]<=scrollTop?lo=mid:hi=mid-1;}return Math.min(lo,total-1)},_proto._syncContentHeight=function(){this._$content.style.height=this._totalHeight()+"px";},_proto._onScroll=function(){var _this=this;this._eventEmitter.emit(EVENTS.scroll,this._wrapper.scrollTop),null==this.options.onScroll||this.options.onScroll.call(this.options,this._wrapper.scrollTop),this._ticking||(this._ticking=true,requestAnimationFrame(function(){_this._compute(false),_this._ticking=false;}));},_proto._setupResizeObserver=function(){var _this=this;"undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver(function(){return _this._onResize()}),this._resizeObserver.observe(this._wrapper)):window.addEventListener("resize",this._onResize);},_proto._onResize=function(){var h=this._wrapper.clientHeight;h!==this._containerHeight&&(this._containerHeight=h,this._compute(true));},_proto._compute=function(force){if(!this._destroyed){var total=this.getTotalCount();if((0===total||0===this._containerHeight)&&(this._containerHeight=this._wrapper.clientHeight,0===total))return this._reset(),void(this._$content.style.height="0px");var start,end,scrollTop=this._wrapper.scrollTop,buffer=this._buffer;if(this._variable)this._ensurePrefix(),start=Math.max(0,this._findStartIndex(scrollTop)-buffer),end=Math.min(total-1,this._findStartIndex(scrollTop+this._containerHeight)+buffer);else {var itemHeight=this._fixedHeight,rawStart=Math.floor(scrollTop/itemHeight);start=Math.max(0,rawStart-buffer);var capacity=Math.ceil(this._containerHeight/itemHeight);end=Math.min(total-1,rawStart+capacity-1+buffer);}if(force||start!==this._startIndex||end!==this._endIndex){if(this._startIndex=start,this._endIndex=end,this._updateRange(start,end),this._dynamic&&this._measureAndAdjust()){var st=this._wrapper.scrollTop,s2=Math.max(0,this._findStartIndex(st)-buffer),e2=Math.min(total-1,this._findStartIndex(st+this._containerHeight)+buffer);s2===start&&e2===end||(this._startIndex=s2,this._endIndex=e2,this._updateRange(s2,e2),start=s2,end=e2);}var range={startIndex:start,endIndex:end};this._eventEmitter.emit(EVENTS.render,range),null==this.options.onRender||this.options.onRender.call(this.options,range),0===start&&this._eventEmitter.emit(EVENTS.reachTop),end===total-1&&this._eventEmitter.emit(EVENTS.reachBottom);}}},_proto._measureAndAdjust=function(){var _this=this,changed=false;if(this._active.forEach(function(el,idx){var h=el.offsetHeight;h>0&&Math.abs(h-(_this._heights[idx]||0))>.5&&(_this._heights[idx]=h,changed=true);}),!changed)return false;var anchorIdx=this._startIndex>=0?this._startIndex:0,gap=this._wrapper.scrollTop-this._offsetOf(anchorIdx);this._prefixDirty=true,this._ensurePrefix(),this._$content.style.height=this._totalHeight()+"px",this._repositionActive();var newScrollTop=this._offsetOf(anchorIdx)+gap;return newScrollTop>=0&&Math.abs(newScrollTop-this._wrapper.scrollTop)>.5&&(this._wrapper.scrollTop=newScrollTop),true},_proto._repositionActive=function(){var _this=this;this._active.forEach(function(el,idx){el.style.top=_this._offsetOf(idx)+"px";});},_proto._updateRange=function(start,end){var _this=this,toRecycle=[];this._active.forEach(function(_el,idx){(idx<start||idx>end)&&toRecycle.push(idx);}),toRecycle.forEach(function(idx){var el=_this._active.get(idx);el&&(el.style.display="none",_this._pool.push(el)),_this._active.delete(idx);});for(var i=start;i<=end;i++)if(!this._active.has(i)){var el=this._pool.pop()||this._createItemEl();el.style.display="",el.style.top=this._offsetOf(i)+"px",el.style.height=this._dynamic?"":this._heightOf(i)+"px",el.setAttribute("data-index",String(i)),this._fillItem(el,i),el.parentNode!==this._$viewport&&this._$viewport.appendChild(el),this._active.set(i,el);}},_proto._createItemEl=function(){var el=document.createElement("div");return el.className="evscroll-item",el},_proto._fillItem=function(el,index){var left,right,item=this.options.data?this.options.data[index]:void 0,content=this.options.renderItem(index,item);left=content,(null!=(right=HTMLElement)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?el.replaceChildren(content):el.innerHTML=null!=content?content:"";},_proto._reset=function(){this._active.clear(),this._pool=[],this._$viewport.replaceChildren(),this._startIndex=-1,this._endIndex=-1;},_create_class$9(VirtualScroll,[{key:"_dynamic",get:function(){return !!this.options.dynamicHeight}},{key:"_variable",get:function(){return this._dynamic||"function"==typeof this.options.itemHeight}},{key:"_fixedHeight",get:function(){var ih=this.options.itemHeight;return "number"==typeof ih&&ih>0?ih:DefaultOptions.itemHeight}},{key:"_buffer",get:function(){var _this_options_buffer;return null!=(_this_options_buffer=this.options.buffer)?_this_options_buffer:DefaultOptions.buffer}}]),VirtualScroll}();VirtualScroll.VERSION="0.0.2",VirtualScroll.EVENTS=EVENTS;
9058
9058
 
9059
9059
  /*
9060
- * @ezuikit/control-rec-list-modal v0.0.1
9061
- * Copyright (c) 2026-08-03 09:25:39 Ezviz-OpenBiz
9060
+ * @ezuikit/control-rec-list-modal v0.0.2
9061
+ * Copyright (c) 2026-09-15 12:43:31 Ezviz-OpenBiz
9062
9062
  * Released under the MIT License.
9063
9063
  */
9064
- var __$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",dwell:200,onLoadError:function(){}},ImageLazyLoader$1=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this._pendingTimers=new Map,this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var target=entry.target;if(entry.isIntersecting){if(_this._pendingTimers.has(target))return;var timer=setTimeout(function(){var _this__observer;_this._pendingTimers.delete(target),_this._loadImage(target),null==(_this__observer=_this._observer)||_this__observer.unobserve(target);},_this.options.dwell);_this._pendingTimers.set(target,timer);}else {var timer1=_this._pendingTimers.get(target);void 0!==timer1&&(clearTimeout(timer1),_this._pendingTimers.delete(target));}});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._pendingTimers.forEach(function(timer){return clearTimeout(timer)}),this._pendingTimers.clear(),this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}ImageLazyLoader$1.isSupported="IntersectionObserver"in window;var _PREFIX_$1="ez-rec-list-modal-checkbox",Checkbox=function(){function Checkbox(options){var _options_checked,_options_disabled,_options_label,_options_size;void 0===options&&(options={}),this._$label=null,this._destroyed=false,this.options={checked:null!=(_options_checked=options.checked)&&_options_checked,disabled:null!=(_options_disabled=options.disabled)&&_options_disabled,label:null!=(_options_label=options.label)?_options_label:"",size:null!=(_options_size=options.size)?_options_size:16,onChange:options.onChange},this._onChange=this._onChange.bind(this),this._$root=document.createElement("label"),this._$root.className=_PREFIX_$1,this._$root.style.setProperty("--ez-rec-list-modal-checkbox-size",this.options.size+"px"),this._$input=document.createElement("input"),this._$input.type="checkbox",this._$input.className=_PREFIX_$1+"-input",this._$input.checked=this.options.checked,this._$input.disabled=this.options.disabled,this._$input.addEventListener("change",this._onChange),this._$root.appendChild(this._$input),this._$box=document.createElement("span"),this._$box.className=_PREFIX_$1+"-box",this._$box.innerHTML='<span class="'+_PREFIX_$1+'-check"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M3.5 8.4 6.4 11.3 12.5 4.9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></span>',this._$root.appendChild(this._$box),this.options.label&&(this._$label=document.createElement("span"),this._$label.className=_PREFIX_$1+"-label",this._$label.textContent=this.options.label,this._$root.appendChild(this._$label)),this._syncState();}var _proto=Checkbox.prototype;return _proto.setChecked=function(checked,emit){ void 0===emit&&(emit=false),this._$input.checked!==checked&&(this._$input.checked=checked,this._syncState(),emit&&(null==this.options.onChange||this.options.onChange.call(this.options,checked)));},_proto.setDisabled=function(disabled){this.options.disabled=disabled,this._$input.disabled=disabled,this._syncState();},_proto.setLabel=function(label){this.options.label=label,label?(this._$label||(this._$label=document.createElement("span"),this._$label.className=_PREFIX_$1+"-label",this._$root.appendChild(this._$label)),this._$label.textContent=label):this._$label&&(this._$label.remove(),this._$label=null);},_proto.destroy=function(){this._destroyed||(this._destroyed=true,this._$input.removeEventListener("change",this._onChange),this._$root.remove());},_proto._onChange=function(){this._syncState(),null==this.options.onChange||this.options.onChange.call(this.options,this._$input.checked);},_proto._syncState=function(){this._$root.classList.toggle(_PREFIX_$1+"-checked",this._$input.checked),this._$root.classList.toggle(_PREFIX_$1+"-disabled",this.options.disabled);},_create_class$1$3(Checkbox,[{key:"el",get:function(){return this._$root}},{key:"checked",get:function(){return this._$input.checked}}]),Checkbox}(),_$REC_EVENT_ICONS$__playing='<svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="playing">\n <rect x="1.5" y="7" width="3" height="7.5" rx="1.5"/>\n <rect x="6.5" y="3" width="3" height="11.5" rx="1.5"/>\n <rect x="11" y="5.5" width="3" height="9" rx="1.5"/>\n </svg>',_$REC_EVENT_ICONS$__humanDetection='<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="humanDetection">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.42689 10.122L5.78846 9.81738C5.5102 9.68459 5.33301 9.4037 5.33301 9.09537V6.6667C5.33301 6.22487 5.69118 5.8667 6.13301 5.8667H9.86634C10.3082 5.8667 10.6663 6.22487 10.6663 6.6667V9.10694C10.6663 9.40926 10.4959 9.68576 10.2258 9.82162L9.62858 10.122H6.42689Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.00039 2.1333C8.88405 2.1333 9.60039 2.84965 9.60039 3.7333C9.60039 4.61696 8.88405 5.3333 8.00039 5.3333C7.11674 5.3333 6.40039 4.61696 6.40039 3.7333C6.40039 2.84965 7.11674 2.1333 8.00039 2.1333Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.80039 9.06689C9.24222 9.06689 9.60039 9.42507 9.60039 9.8669V13.0669C9.60039 13.5087 9.24222 13.8669 8.80039 13.8669H7.20039C6.75856 13.8669 6.40039 13.5087 6.40039 13.0669V9.8669C6.40039 9.42507 6.75856 9.06689 7.20039 9.06689H8.80039Z" fill="currentColor"/>\n <path d="M4.26628 2.6665H2.93294C2.19694 2.6665 1.59961 3.26325 1.59961 3.99984V5.33317" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.6665V11.9998C1.59961 12.7358 2.19694 13.3332 2.93294 13.3332H4.26628" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3332H13.0667C13.8033 13.3332 14.4001 12.7358 14.4001 11.9998V10.6665" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33317V3.99984C14.4001 3.26325 13.8033 2.6665 13.0667 2.6665H11.7334" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',_$REC_EVENT_ICONS$__vehicleDetection='<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="vehicleDetection">\n <path d="M14.2522 6.62695L12.6147 7.25195" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M3.39233 7.25L1.74854 6.625" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.6116 7.25L12.0872 4.7425C11.9354 4.01875 11.2972 3.5 10.5572 3.5H5.50722C4.7816 3.5 4.15098 4 3.98598 4.70687L3.3916 7.25" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.375 7.25098C13.4106 7.25098 14.25 8.09035 14.25 9.12598V12.1523C14.247 12.3407 11.125 11.9375 11.125 11.9375H4.875C4.875 11.9375 1.7522 12.4275 1.75 12.2822V9.12598C1.75 8.09035 2.58938 7.25098 3.625 7.25098H12.375ZM4.09375 9.28125L4.03027 9.28516C3.80148 9.3162 3.625 9.51269 3.625 9.75C3.625 10.0089 3.83487 10.2188 4.09375 10.2188H5.65625L5.71973 10.2148C5.94852 10.1838 6.125 9.98731 6.125 9.75C6.125 9.49112 5.91513 9.28125 5.65625 9.28125H4.09375ZM10.2803 9.28516C10.0515 9.3162 9.875 9.51269 9.875 9.75C9.875 10.0089 10.0849 10.2188 10.3438 10.2188H11.9062L11.9697 10.2148C12.1985 10.1838 12.375 9.98731 12.375 9.75C12.375 9.49112 12.1651 9.28125 11.9062 9.28125H10.3438L10.2803 9.28516Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 9.125C14.25 8.08938 13.4106 7.25 12.375 7.25H3.625C2.58938 7.25 1.75 8.08938 1.75 9.125V12.0373H14.25V9.125V9.125Z" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.5625 13.4998C5.08 13.4998 5.5 13.0798 5.5 12.5623V11.9373L2.375 11.875V12.7185C2.375 13.1498 2.725 13.4998 3.15625 13.4998H4.5625Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M12.6877 13.4998C13.2052 13.4998 13.6252 13.0798 13.6252 12.5623V11.9373L10.5002 11.875V12.7185C10.5002 13.1498 10.8502 13.4998 11.2815 13.4998H12.6877Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',_$REC_EVENT_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',_$REC_LIST_MODAL_LOCALES$_={zh:{title:"录像片段",empty:"暂无录像",eventFilter:"事件片段"},en:{title:"Recordings",empty:"No recordings",eventFilter:"Event"}};function _create_class$8(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$f(){return _extends$f=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$f.apply(this,arguments)}function _set_prototype_of$g(o,p){return _set_prototype_of$g=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$g(o,p)}var _PREFIX_="ez-rec-list-modal",_ICON_EVENT_='<svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path d="M11.5 1.5H4.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1Zm0 1.1v10.8h-7V2.6h7ZM6 5.2h4v-1H6v1Zm0 2.3h4v-1H6v1Zm0 2.3h2.7v-1H6v1Z"/></svg>',_REC_EVENT_ICONS_={1:_ICON_EVENT_,2:_ICON_EVENT_,3:_$REC_EVENT_ICONS$__humanDetection,4:'<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="faceDetection">\n <path d="M4.26628 2.66602H2.93294C2.19694 2.66602 1.59961 3.26276 1.59961 3.99935V5.33268" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.666V11.9993C1.59961 12.7353 2.19694 13.3327 2.93294 13.3327H4.26628" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3327H13.0667C13.8033 13.3327 14.4001 12.7353 14.4001 11.9993V10.666" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33268V3.99935C14.4001 3.26276 13.8033 2.66602 13.0667 2.66602H11.7334" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.26636 8.53273C4.26636 8.53273 3.74805 8.7145 3.74805 9.32262C3.74805 9.93074 4.12968 10.4493 4.62191 10.4493C4.73317 10.9272 5.97651 13.0867 8.08858 13.0867C10.0905 13.0867 11.5552 10.3969 11.5552 10.3969C11.5552 10.3969 12.2716 10.1395 12.2518 9.32262C12.2325 8.69788 11.7965 8.53273 11.7965 8.53273C11.7965 8.53273 12.1055 5.56552 9.99785 4.3185C7.89022 3.07148 6.36571 4.5319 6.36571 4.5319C6.36571 4.5319 4.11766 4.87602 4.2222 7.69628" fill="currentColor"/>\n </svg>',5:_$REC_EVENT_ICONS$__vehicleDetection,6:'<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="petDetection">\n <path d="M10.134 2.66309C11.9012 2.66316 13.3341 4.09615 13.3342 5.86328V10.6641C13.334 12.4311 11.9011 13.8632 10.134 13.8633H5.86743C4.10029 13.8633 2.6675 12.4311 2.66724 10.6641V5.86328C2.66739 4.09611 4.10022 2.66309 5.86743 2.66309H10.134ZM7.97583 7.95312C7.5222 7.95327 7.15454 8.32075 7.15454 8.77441C7.15459 9.07899 7.32174 9.34112 7.56763 9.4834C7.5526 9.52337 7.54321 9.56694 7.54321 9.6123C7.54296 10.2798 6.9996 10.8223 6.33228 10.8223C6.13114 10.8224 5.96802 10.9863 5.96802 11.1875C5.96822 11.3882 6.13127 11.5516 6.33228 11.5518C7.0251 11.5518 7.63284 11.185 7.97583 10.6367C8.31908 11.1851 8.92713 11.5518 9.62036 11.5518C9.82129 11.5516 9.98442 11.3881 9.98462 11.1875C9.98462 10.9864 9.8214 10.8225 9.62036 10.8223C8.95273 10.8223 8.4087 10.2798 8.40845 9.6123C8.40845 9.56694 8.39906 9.52337 8.38403 9.4834C8.63004 9.34115 8.79805 9.07907 8.7981 8.77441C8.7981 8.32066 8.42989 7.95312 7.97583 7.95312ZM5.06665 5.87207C4.62483 5.87226 4.26685 6.23032 4.26685 6.67188C4.26708 7.11353 4.62497 7.47149 5.06665 7.47168C5.50818 7.47168 5.86622 7.11365 5.86646 6.67188C5.86646 6.2302 5.50832 5.87207 5.06665 5.87207ZM10.9338 5.87207C10.492 5.87226 10.134 6.23032 10.134 6.67188C10.1343 7.11353 10.4922 7.47149 10.9338 7.47168C11.3754 7.47168 11.7334 7.11365 11.7336 6.67188C11.7336 6.2302 11.3755 5.87207 10.9338 5.87207Z" fill="currentColor"/>\n <path d="M12.8 4.08984C12.9449 4.28499 13.0671 4.49562 13.1633 4.71777L15.1584 8.09668C15.4833 8.64759 15.5543 9.28148 15.3577 9.88086C15.1613 10.4797 14.7204 10.9735 14.1174 11.2705C13.8537 11.4002 13.4576 11.4741 13.1633 11.5137C13.0759 11.7889 12.9522 12.0484 12.8 12.2891V4.08984Z" fill="currentColor" fill-opacity="0.6"/>\n <path d="M3.19946 12.4372C3.05452 12.242 2.93249 12.0315 2.83618 11.8093L0.841064 8.43039C0.51612 7.87943 0.44519 7.24568 0.641846 6.64621C0.838188 6.04713 1.27893 5.5536 1.88208 5.25656C2.14581 5.12684 2.54188 5.05303 2.83618 5.0134C2.92354 4.73812 3.04729 4.47872 3.19946 4.23801L3.19946 12.4372Z" fill="currentColor" fill-opacity="0.6"/>\n </svg>',ALRAM:_ICON_EVENT_,TIMIING:_ICON_EVENT_,CAR:_$REC_EVENT_ICONS$__vehicleDetection,HD:_$REC_EVENT_ICONS$__humanDetection},_$REC_LIST_MODAL_DEFAULT_OPTIONS$_={width:260,height:490,buffer:5,startTimeFormat:"HH:mm",groupTitleFormat:"HH:00",showEventFilter:false,showCardTypeIcon:false,eventFilterChecked:false},RecListModal=function(Modal){function RecListModal(container,options){var _this,_ref,_ref1,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7,_ref8,_ref9;(_this=Modal.call(this,container,RecListModal._mergeModalOptions(options))||this)._$titleWrap=null,_this._eventCheckbox=null,_this._virtualScroll=null,_this._lazyLoader=null,_this._rows=[],_this._sortedSections=[],_this._eventOnly=false,_this._vsInited=false,_this._recordDestroyed=false,_this._activeIndex=-1,_this._userInteracting=false,_this._userScrollTimer=null;var def=_$REC_LIST_MODAL_DEFAULT_OPTIONS$_;return _this._recI18n=new I18n(deepmerge(_$REC_LIST_MODAL_LOCALES$_,_this.options.locales||{},{clone:false}),{defaultLocale:_this.options.language||"zh"}),_this.recordOptions={sections:null!=(_ref=null==options?void 0:options.sections)?_ref:[],buffer:null!=(_ref1=null==options?void 0:options.buffer)?_ref1:def.buffer,coverQuery:null!=(_ref2=null==options?void 0:options.coverQuery)?_ref2:"",startTimeFormat:null!=(_ref3=null==options?void 0:options.startTimeFormat)?_ref3:def.startTimeFormat,groupTitleFormat:null!=(_ref4=null==options?void 0:options.groupTitleFormat)?_ref4:def.groupTitleFormat,emptyText:null!=(_ref5=null==options?void 0:options.emptyText)?_ref5:String(_this._recI18n.t("empty")),showEventFilter:null!=(_ref6=null==options?void 0:options.showEventFilter)?_ref6:def.showEventFilter,eventFilterText:null!=(_ref7=null==options?void 0:options.eventFilterText)?_ref7:String(_this._recI18n.t("eventFilter")),eventFilterChecked:null!=(_ref8=null==options?void 0:options.eventFilterChecked)?_ref8:def.eventFilterChecked,showCardTypeIcon:null!=(_ref9=null==options?void 0:options.showCardTypeIcon)?_ref9:def.showCardTypeIcon,isEvent:null==options?void 0:options.isEvent,renderCardIcon:null==options?void 0:options.renderCardIcon,onCardClick:null==options?void 0:options.onCardClick},_this._eventOnly=_this.recordOptions.eventFilterChecked,_this._activeTime="number"==typeof(null==options?void 0:options.activeTime)?options.activeTime:void 0,_this._titleText="string"==typeof(null==options?void 0:options.title)?options.title:String(_this._recI18n.t("title")),_this.setTitle(_this._buildHeaderTitle()),_this._$listRoot=document.createElement("div"),_this._$listRoot.className=_PREFIX_+"-list",_this._$empty=document.createElement("div"),_this._$empty.className=_PREFIX_+"-empty",_this._$empty.textContent=_this.recordOptions.emptyText,_this._$empty.style.display="none",_this._$listRoot.appendChild(_this._$empty),_this.setContent(_this._$listRoot),_this._onListClick=_this._onListClick.bind(_this),_this._onUserScroll=_this._onUserScroll.bind(_this),_this._$listRoot.addEventListener("click",_this._onListClick),_this._buildRows(),_this.isVisible()&&_this._ensureVirtualScroll(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$g(subClass,superClass);}(RecListModal,Modal);var _proto=RecListModal.prototype;return _proto.open=function(){Modal.prototype.open.call(this),this._$listRoot&&(this._ensureVirtualScroll(),this._userInteracting=false,this._userScrollTimer&&(clearTimeout(this._userScrollTimer),this._userScrollTimer=null),this._scrollToActive(true));},_proto.setSections=function(sections){this.recordOptions.sections=sections||[],this._buildRows(),this._virtualScroll?this._virtualScroll.setData(this._rows):this.isVisible()&&this._ensureVirtualScroll(),this._toggleEmpty();},_proto.setActiveTime=function(time){this._activeTime="number"==typeof time?time:void 0,this._refreshActiveState(),this._scrollToActive();},_proto.showEventFilter=function(show){var _this=this;if(this.recordOptions.showEventFilter=show,show){var _this__$titleWrap;if(this._eventCheckbox)return;var checkbox=new Checkbox({label:this.recordOptions.eventFilterText,checked:this._eventOnly,onChange:function(checked){return _this._onEventFilterChange(checked)}});checkbox.el.addEventListener("mousedown",function(e){return e.stopPropagation()}),checkbox.el.addEventListener("touchstart",function(e){return e.stopPropagation()}),null==(_this__$titleWrap=this._$titleWrap)||_this__$titleWrap.appendChild(checkbox.el),this._eventCheckbox=checkbox;}else {if(!this._eventCheckbox)return;this._eventCheckbox.destroy(),this._eventCheckbox=null;}},_proto.destroy=function(){var _this__eventCheckbox,_this__virtualScroll,_this__lazyLoader;this._recordDestroyed||(this._recordDestroyed=true,null==(_this__eventCheckbox=this._eventCheckbox)||_this__eventCheckbox.destroy(),this._eventCheckbox=null,this._userScrollTimer&&(clearTimeout(this._userScrollTimer),this._userScrollTimer=null),this._$listRoot.removeEventListener("click",this._onListClick),this._$listRoot.removeEventListener("wheel",this._onUserScroll),this._$listRoot.removeEventListener("touchmove",this._onUserScroll),null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.destroy(),this._virtualScroll=null,null==(_this__lazyLoader=this._lazyLoader)||_this__lazyLoader.destroy(),this._lazyLoader=null),Modal.prototype.destroy.call(this);},_proto._rowHeight=function(row){return row&&"header"===row.type?28:this._cardRowHeight},_proto._buildHeaderTitle=function(){var _this=this,wrap=document.createElement("div");wrap.className=_PREFIX_+"-title",this._$titleWrap=wrap;var text=document.createElement("span");if(text.className=_PREFIX_+"-title-text",text.textContent=this._titleText,wrap.appendChild(text),this.recordOptions.showEventFilter){var checkbox=new Checkbox({label:this.recordOptions.eventFilterText,checked:this._eventOnly,onChange:function(checked){return _this._onEventFilterChange(checked)}});checkbox.el.addEventListener("mousedown",function(e){return e.stopPropagation()}),checkbox.el.addEventListener("touchstart",function(e){return e.stopPropagation()}),wrap.appendChild(checkbox.el),this._eventCheckbox=checkbox;}return wrap},_proto._onEventFilterChange=function(checked){var _this__virtualScroll;this._eventOnly=checked,this._buildRows(),null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.setData(this._rows),this._toggleEmpty();},_proto._ensureVirtualScroll=function(){var _this__virtualScroll,_this=this;this._recordDestroyed||(this._toggleEmpty(),this._vsInited?(null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.refresh(),this._observeVisibleImages()):(this._vsInited=true,this._lazyLoader=new ImageLazyLoader$1({root:this._$listRoot}),this._virtualScroll=new VirtualScroll(this._$listRoot,{data:this._rows,itemHeight:function(_index,row){return _this._rowHeight(row)},buffer:this.recordOptions.buffer,renderItem:function(index,item){return _this._renderRow(index,item)},onRender:function(){return _this._observeVisibleImages()}}),this._observeVisibleImages(),this._$listRoot.addEventListener("wheel",this._onUserScroll,{passive:true}),this._$listRoot.addEventListener("touchmove",this._onUserScroll,{passive:true}),this._scrollToActive(true)));},_proto._toggleEmpty=function(){this._$empty&&(this._$empty.style.display=0===this._rows.length?"":"none");},_proto._isEvent=function(section){return "function"==typeof this.recordOptions.isEvent?this.recordOptions.isEvent(section):!!_REC_EVENT_ICONS_[section.EVENT_TYPE]},_proto._buildRows=function(){var _this=this;this._activeIndex=-1;var sorted=(this.recordOptions.sections||[]).filter(function(s){return s&&"number"==typeof s.startTime&&"number"==typeof s.endTime}).filter(function(s){return !_this._eventOnly||_this._isEvent(s)}).slice().reverse();this._sortedSections=sorted;for(var rows=[],groups=new Map,i=0;i<sorted.length;i++){var section=sorted[i],key=distExports$3.DateTime.format(section.startTime,"YYYY-MM-DD HH"),bucket=groups.get(key);bucket||(bucket=[],groups.set(key,bucket)),bucket.push({section:section,index:i});}groups.forEach(function(bucket){rows.push({type:"header",title:distExports$3.DateTime.format(bucket[0].section.startTime,_this.recordOptions.groupTitleFormat),count:bucket.length});for(var i=0;i<bucket.length;i+=2)rows.push({type:"cards",items:bucket.slice(i,i+2)});}),this._rows=rows;},_proto._renderRow=function(_index,row){var _this=this;if(!row)return "";if("header"===row.type)return '<div class="'+_PREFIX_+'-group">\n <span class="'+_PREFIX_+'-group-title">'+this._escape(row.title)+"</span>\n </div>";var cards=row.items.map(function(it){return _this._renderCard(it.section,it.index)}).join("");return '<div class="'+_PREFIX_+'-row">'+cards+"</div>"},_proto._renderCard=function(section,index){var start,end,_DateTime_toDate,_DateTime_toDate1,secondNum,second,minute,startText=distExports$3.DateTime.format(section.startTime,this.recordOptions.startTimeFormat),durationText=(start=section.startTime,end=section.endTime,secondNum=Math.floor((null==(_DateTime_toDate=distExports$3.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=distExports$3.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,((minute=Math.floor(secondNum/60))>0?distExports$3.DateTime.fillZero(minute)+"'":"0'")+distExports$3.DateTime.fillZero(second)+"''"),cover=section.coverPic?""+section.coverPic+this.recordOptions.coverQuery:"",media=cover?'<img class="'+_PREFIX_+'-card-img ez-lazy-image" data-src="'+this._setImageScr(this._escape(cover))+'" alt="" />':'<div class="'+_PREFIX_+'-card-placeholder">'+_$REC_EVENT_ICONS$__picture+"</div>",icon=this._renderCardIcon(section),activeCls=this._isActive(section)?" "+_PREFIX_+"-card-active":"";return '<div class="'+_PREFIX_+"-card"+activeCls+'" data-card-index="'+index+'">\n <div class="'+_PREFIX_+'-card-thumb">\n '+media+'\n <span class="'+_PREFIX_+'-card-start">'+this._escape(startText)+'</span>\n <span class="'+_PREFIX_+'-card-duration">'+this._escape(durationText)+'</span>\n <span class="'+_PREFIX_+'-card-playing">'+_$REC_EVENT_ICONS$__playing+"</span>\n "+icon+"\n </div>\n </div>"},_proto._isActive=function(section){var t=this._activeTime;return "number"==typeof t&&t>=section.startTime&&t<=section.endTime},_proto._refreshActiveState=function(){var _this=this;this._$listRoot.querySelectorAll("."+_PREFIX_+"-card").forEach(function(card){var idx=Number(card.getAttribute("data-card-index")),section=_this._sortedSections[idx];card.classList.toggle(_PREFIX_+"-card-active",!!section&&_this._isActive(section));});},_proto._findActiveIndex=function(){if("number"!=typeof this._activeTime)return -1;for(var i=0;i<this._sortedSections.length;i++)if(this._isActive(this._sortedSections[i]))return i;return -1},_proto._rowIndexOfSection=function(sectionIndex){for(var i=0;i<this._rows.length;i++){var row=this._rows[i];if("cards"===row.type&&row.items.some(function(it){return it.index===sectionIndex}))return i}return -1},_proto._scrollToActive=function(force){ void 0===force&&(force=false);var idx=this._findActiveIndex();if((force||idx!==this._activeIndex)&&(this._activeIndex=idx,!(idx<0||!this._virtualScroll||!force&&this._userInteracting))){var rowIndex=this._rowIndexOfSection(idx);rowIndex>=0&&this._virtualScroll.scrollToIndex(rowIndex,true);}},_proto._onUserScroll=function(){var _this=this;this._userInteracting=true,this._userScrollTimer&&clearTimeout(this._userScrollTimer),this._userScrollTimer=setTimeout(function(){_this._userInteracting=false,_this._userScrollTimer=null;},3e3);},_proto._renderCardIcon=function(section){return ""},_proto._observeVisibleImages=function(){if(this._lazyLoader){var imgs=this._$listRoot.querySelectorAll("img[data-src]");imgs.length&&this._lazyLoader.addImages(Array.from(imgs));}},_proto._onListClick=function(e){var onCardClick=this.recordOptions.onCardClick;if(onCardClick){var target=e.target,card=null==target?void 0:target.closest("."+_PREFIX_+"-card");if(card){var idx=Number(card.getAttribute("data-card-index")),section=this._sortedSections[idx];section&&onCardClick(section,idx,this._sortedSections);}}},_proto._escape=function(text){return String(text).replace(/[&<>"']/g,function(ch){switch(ch){case "&":return "&amp;";case "<":return "&lt;";case ">":return "&gt;";case '"':return "&quot;";default:return "&#39;"}})},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},RecListModal._mergeModalOptions=function(options){var _ref,_ref1;return _extends$f({},options,{width:null!=(_ref=null==options?void 0:options.width)?_ref:_$REC_LIST_MODAL_DEFAULT_OPTIONS$_.width,height:null!=(_ref1=null==options?void 0:options.height)?_ref1:_$REC_LIST_MODAL_DEFAULT_OPTIONS$_.height,content:"",title:""})},_create_class$8(RecListModal,[{key:"_cardRowHeight",get:function(){return 70}}]),RecListModal}(Modal);RecListModal.VERSION="0.0.1";
9064
+ var __$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",dwell:200,onLoadError:function(){}},ImageLazyLoader$1=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this._pendingTimers=new Map,this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__$1,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var target=entry.target;if(entry.isIntersecting){if(_this._pendingTimers.has(target))return;var timer=setTimeout(function(){var _this__observer;_this._pendingTimers.delete(target),_this._loadImage(target),null==(_this__observer=_this._observer)||_this__observer.unobserve(target);},_this.options.dwell);_this._pendingTimers.set(target,timer);}else {var timer1=_this._pendingTimers.get(target);void 0!==timer1&&(clearTimeout(timer1),_this._pendingTimers.delete(target));}});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._pendingTimers.forEach(function(timer){return clearTimeout(timer)}),this._pendingTimers.clear(),this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}ImageLazyLoader$1.isSupported="IntersectionObserver"in window;var _PREFIX_$1="ez-rec-list-modal-checkbox",Checkbox=function(){function Checkbox(options){var _options_checked,_options_disabled,_options_label,_options_size;void 0===options&&(options={}),this._$label=null,this._destroyed=false,this.options={checked:null!=(_options_checked=options.checked)&&_options_checked,disabled:null!=(_options_disabled=options.disabled)&&_options_disabled,label:null!=(_options_label=options.label)?_options_label:"",size:null!=(_options_size=options.size)?_options_size:16,onChange:options.onChange},this._onChange=this._onChange.bind(this),this._$root=document.createElement("label"),this._$root.className=_PREFIX_$1,this._$root.style.setProperty("--ez-rec-list-modal-checkbox-size",this.options.size+"px"),this._$input=document.createElement("input"),this._$input.type="checkbox",this._$input.className=_PREFIX_$1+"-input",this._$input.checked=this.options.checked,this._$input.disabled=this.options.disabled,this._$input.addEventListener("change",this._onChange),this._$root.appendChild(this._$input),this._$box=document.createElement("span"),this._$box.className=_PREFIX_$1+"-box",this._$box.innerHTML='<span class="'+_PREFIX_$1+'-check"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M3.5 8.4 6.4 11.3 12.5 4.9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></span>',this._$root.appendChild(this._$box),this.options.label&&(this._$label=document.createElement("span"),this._$label.className=_PREFIX_$1+"-label",this._$label.textContent=this.options.label,this._$root.appendChild(this._$label)),this._syncState();}var _proto=Checkbox.prototype;return _proto.setChecked=function(checked,emit){ void 0===emit&&(emit=false),this._$input.checked!==checked&&(this._$input.checked=checked,this._syncState(),emit&&(null==this.options.onChange||this.options.onChange.call(this.options,checked)));},_proto.setDisabled=function(disabled){this.options.disabled=disabled,this._$input.disabled=disabled,this._syncState();},_proto.setLabel=function(label){this.options.label=label,label?(this._$label||(this._$label=document.createElement("span"),this._$label.className=_PREFIX_$1+"-label",this._$root.appendChild(this._$label)),this._$label.textContent=label):this._$label&&(this._$label.remove(),this._$label=null);},_proto.destroy=function(){this._destroyed||(this._destroyed=true,this._$input.removeEventListener("change",this._onChange),this._$root.remove());},_proto._onChange=function(){this._syncState(),null==this.options.onChange||this.options.onChange.call(this.options,this._$input.checked);},_proto._syncState=function(){this._$root.classList.toggle(_PREFIX_$1+"-checked",this._$input.checked),this._$root.classList.toggle(_PREFIX_$1+"-disabled",this.options.disabled);},_create_class$1$3(Checkbox,[{key:"el",get:function(){return this._$root}},{key:"checked",get:function(){return this._$input.checked}}]),Checkbox}(),_$REC_EVENT_ICONS$__playing='<svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="playing">\n <rect x="1.5" y="7" width="3" height="7.5" rx="1.5"/>\n <rect x="6.5" y="3" width="3" height="11.5" rx="1.5"/>\n <rect x="11" y="5.5" width="3" height="9" rx="1.5"/>\n </svg>',_$REC_EVENT_ICONS$__humanDetection='<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="humanDetection">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.42689 10.122L5.78846 9.81738C5.5102 9.68459 5.33301 9.4037 5.33301 9.09537V6.6667C5.33301 6.22487 5.69118 5.8667 6.13301 5.8667H9.86634C10.3082 5.8667 10.6663 6.22487 10.6663 6.6667V9.10694C10.6663 9.40926 10.4959 9.68576 10.2258 9.82162L9.62858 10.122H6.42689Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.00039 2.1333C8.88405 2.1333 9.60039 2.84965 9.60039 3.7333C9.60039 4.61696 8.88405 5.3333 8.00039 5.3333C7.11674 5.3333 6.40039 4.61696 6.40039 3.7333C6.40039 2.84965 7.11674 2.1333 8.00039 2.1333Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M8.80039 9.06689C9.24222 9.06689 9.60039 9.42507 9.60039 9.8669V13.0669C9.60039 13.5087 9.24222 13.8669 8.80039 13.8669H7.20039C6.75856 13.8669 6.40039 13.5087 6.40039 13.0669V9.8669C6.40039 9.42507 6.75856 9.06689 7.20039 9.06689H8.80039Z" fill="currentColor"/>\n <path d="M4.26628 2.6665H2.93294C2.19694 2.6665 1.59961 3.26325 1.59961 3.99984V5.33317" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.6665V11.9998C1.59961 12.7358 2.19694 13.3332 2.93294 13.3332H4.26628" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3332H13.0667C13.8033 13.3332 14.4001 12.7358 14.4001 11.9998V10.6665" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33317V3.99984C14.4001 3.26325 13.8033 2.6665 13.0667 2.6665H11.7334" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',_$REC_EVENT_ICONS$__vehicleDetection='<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="vehicleDetection">\n <path d="M14.2522 6.62695L12.6147 7.25195" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M3.39233 7.25L1.74854 6.625" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.6116 7.25L12.0872 4.7425C11.9354 4.01875 11.2972 3.5 10.5572 3.5H5.50722C4.7816 3.5 4.15098 4 3.98598 4.70687L3.3916 7.25" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12.375 7.25098C13.4106 7.25098 14.25 8.09035 14.25 9.12598V12.1523C14.247 12.3407 11.125 11.9375 11.125 11.9375H4.875C4.875 11.9375 1.7522 12.4275 1.75 12.2822V9.12598C1.75 8.09035 2.58938 7.25098 3.625 7.25098H12.375ZM4.09375 9.28125L4.03027 9.28516C3.80148 9.3162 3.625 9.51269 3.625 9.75C3.625 10.0089 3.83487 10.2188 4.09375 10.2188H5.65625L5.71973 10.2148C5.94852 10.1838 6.125 9.98731 6.125 9.75C6.125 9.49112 5.91513 9.28125 5.65625 9.28125H4.09375ZM10.2803 9.28516C10.0515 9.3162 9.875 9.51269 9.875 9.75C9.875 10.0089 10.0849 10.2188 10.3438 10.2188H11.9062L11.9697 10.2148C12.1985 10.1838 12.375 9.98731 12.375 9.75C12.375 9.49112 12.1651 9.28125 11.9062 9.28125H10.3438L10.2803 9.28516Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.25 9.125C14.25 8.08938 13.4106 7.25 12.375 7.25H3.625C2.58938 7.25 1.75 8.08938 1.75 9.125V12.0373H14.25V9.125V9.125Z" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.5625 13.4998C5.08 13.4998 5.5 13.0798 5.5 12.5623V11.9373L2.375 11.875V12.7185C2.375 13.1498 2.725 13.4998 3.15625 13.4998H4.5625Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M12.6877 13.4998C13.2052 13.4998 13.6252 13.0798 13.6252 12.5623V11.9373L10.5002 11.875V12.7185C10.5002 13.1498 10.8502 13.4998 11.2815 13.4998H12.6877Z" fill="currentColor" stroke="currentColor" stroke-width="0.9375" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',_$REC_EVENT_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',_$REC_LIST_MODAL_LOCALES$_={zh:{title:"录像片段",empty:"暂无录像",eventFilter:"事件片段"},en:{title:"Recordings",empty:"No recordings",eventFilter:"Event"}};function _create_class$8(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$f(){return _extends$f=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$f.apply(this,arguments)}function _set_prototype_of$g(o,p){return _set_prototype_of$g=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$g(o,p)}var _PREFIX_="ez-rec-list-modal",_ICON_EVENT_='<svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path d="M11.5 1.5H4.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1Zm0 1.1v10.8h-7V2.6h7ZM6 5.2h4v-1H6v1Zm0 2.3h4v-1H6v1Zm0 2.3h2.7v-1H6v1Z"/></svg>',_REC_EVENT_ICONS_={1:_ICON_EVENT_,2:_ICON_EVENT_,3:_$REC_EVENT_ICONS$__humanDetection,4:'<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="faceDetection">\n <path d="M4.26628 2.66602H2.93294C2.19694 2.66602 1.59961 3.26276 1.59961 3.99935V5.33268" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M1.59961 10.666V11.9993C1.59961 12.7353 2.19694 13.3327 2.93294 13.3327H4.26628" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M11.7334 13.3327H13.0667C13.8033 13.3327 14.4001 12.7353 14.4001 11.9993V10.666" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M14.4001 5.33268V3.99935C14.4001 3.26276 13.8033 2.66602 13.0667 2.66602H11.7334" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M4.26636 8.53273C4.26636 8.53273 3.74805 8.7145 3.74805 9.32262C3.74805 9.93074 4.12968 10.4493 4.62191 10.4493C4.73317 10.9272 5.97651 13.0867 8.08858 13.0867C10.0905 13.0867 11.5552 10.3969 11.5552 10.3969C11.5552 10.3969 12.2716 10.1395 12.2518 9.32262C12.2325 8.69788 11.7965 8.53273 11.7965 8.53273C11.7965 8.53273 12.1055 5.56552 9.99785 4.3185C7.89022 3.07148 6.36571 4.5319 6.36571 4.5319C6.36571 4.5319 4.11766 4.87602 4.2222 7.69628" fill="currentColor"/>\n </svg>',5:_$REC_EVENT_ICONS$__vehicleDetection,6:'<svg viewBox="0 0 16 16" fill="none" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="petDetection">\n <path d="M10.134 2.66309C11.9012 2.66316 13.3341 4.09615 13.3342 5.86328V10.6641C13.334 12.4311 11.9011 13.8632 10.134 13.8633H5.86743C4.10029 13.8633 2.6675 12.4311 2.66724 10.6641V5.86328C2.66739 4.09611 4.10022 2.66309 5.86743 2.66309H10.134ZM7.97583 7.95312C7.5222 7.95327 7.15454 8.32075 7.15454 8.77441C7.15459 9.07899 7.32174 9.34112 7.56763 9.4834C7.5526 9.52337 7.54321 9.56694 7.54321 9.6123C7.54296 10.2798 6.9996 10.8223 6.33228 10.8223C6.13114 10.8224 5.96802 10.9863 5.96802 11.1875C5.96822 11.3882 6.13127 11.5516 6.33228 11.5518C7.0251 11.5518 7.63284 11.185 7.97583 10.6367C8.31908 11.1851 8.92713 11.5518 9.62036 11.5518C9.82129 11.5516 9.98442 11.3881 9.98462 11.1875C9.98462 10.9864 9.8214 10.8225 9.62036 10.8223C8.95273 10.8223 8.4087 10.2798 8.40845 9.6123C8.40845 9.56694 8.39906 9.52337 8.38403 9.4834C8.63004 9.34115 8.79805 9.07907 8.7981 8.77441C8.7981 8.32066 8.42989 7.95312 7.97583 7.95312ZM5.06665 5.87207C4.62483 5.87226 4.26685 6.23032 4.26685 6.67188C4.26708 7.11353 4.62497 7.47149 5.06665 7.47168C5.50818 7.47168 5.86622 7.11365 5.86646 6.67188C5.86646 6.2302 5.50832 5.87207 5.06665 5.87207ZM10.9338 5.87207C10.492 5.87226 10.134 6.23032 10.134 6.67188C10.1343 7.11353 10.4922 7.47149 10.9338 7.47168C11.3754 7.47168 11.7334 7.11365 11.7336 6.67188C11.7336 6.2302 11.3755 5.87207 10.9338 5.87207Z" fill="currentColor"/>\n <path d="M12.8 4.08984C12.9449 4.28499 13.0671 4.49562 13.1633 4.71777L15.1584 8.09668C15.4833 8.64759 15.5543 9.28148 15.3577 9.88086C15.1613 10.4797 14.7204 10.9735 14.1174 11.2705C13.8537 11.4002 13.4576 11.4741 13.1633 11.5137C13.0759 11.7889 12.9522 12.0484 12.8 12.2891V4.08984Z" fill="currentColor" fill-opacity="0.6"/>\n <path d="M3.19946 12.4372C3.05452 12.242 2.93249 12.0315 2.83618 11.8093L0.841064 8.43039C0.51612 7.87943 0.44519 7.24568 0.641846 6.64621C0.838188 6.04713 1.27893 5.5536 1.88208 5.25656C2.14581 5.12684 2.54188 5.05303 2.83618 5.0134C2.92354 4.73812 3.04729 4.47872 3.19946 4.23801L3.19946 12.4372Z" fill="currentColor" fill-opacity="0.6"/>\n </svg>',ALRAM:_ICON_EVENT_,TIMIING:_ICON_EVENT_,CAR:_$REC_EVENT_ICONS$__vehicleDetection,HD:_$REC_EVENT_ICONS$__humanDetection},_$REC_LIST_MODAL_DEFAULT_OPTIONS$_={width:260,height:490,buffer:5,startTimeFormat:"HH:mm",groupTitleFormat:"HH:00",showEventFilter:false,showCardTypeIcon:false,eventFilterChecked:false},RecListModal=function(Modal){function RecListModal(container,options){var _this,_ref,_ref1,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7,_ref8,_ref9;(_this=Modal.call(this,container,RecListModal._mergeModalOptions(options))||this)._$titleWrap=null,_this._eventCheckbox=null,_this._virtualScroll=null,_this._lazyLoader=null,_this._rows=[],_this._sortedSections=[],_this._eventOnly=false,_this._vsInited=false,_this._recordDestroyed=false,_this._activeIndex=-1,_this._userInteracting=false,_this._userScrollTimer=null;var def=_$REC_LIST_MODAL_DEFAULT_OPTIONS$_;return _this._recI18n=new I18n(deepmerge(_$REC_LIST_MODAL_LOCALES$_,_this.options.locales||{},{clone:false}),{defaultLocale:_this.options.language||"zh"}),_this.recordOptions={sections:null!=(_ref=null==options?void 0:options.sections)?_ref:[],buffer:null!=(_ref1=null==options?void 0:options.buffer)?_ref1:def.buffer,coverQuery:null!=(_ref2=null==options?void 0:options.coverQuery)?_ref2:"",startTimeFormat:null!=(_ref3=null==options?void 0:options.startTimeFormat)?_ref3:def.startTimeFormat,groupTitleFormat:null!=(_ref4=null==options?void 0:options.groupTitleFormat)?_ref4:def.groupTitleFormat,emptyText:null!=(_ref5=null==options?void 0:options.emptyText)?_ref5:String(_this._recI18n.t("empty")),showEventFilter:null!=(_ref6=null==options?void 0:options.showEventFilter)?_ref6:def.showEventFilter,eventFilterText:null!=(_ref7=null==options?void 0:options.eventFilterText)?_ref7:String(_this._recI18n.t("eventFilter")),eventFilterChecked:null!=(_ref8=null==options?void 0:options.eventFilterChecked)?_ref8:def.eventFilterChecked,showCardTypeIcon:null!=(_ref9=null==options?void 0:options.showCardTypeIcon)?_ref9:def.showCardTypeIcon,isEvent:null==options?void 0:options.isEvent,renderCardIcon:null==options?void 0:options.renderCardIcon,onCardClick:null==options?void 0:options.onCardClick},_this._eventOnly=_this.recordOptions.eventFilterChecked,_this._activeTime="number"==typeof(null==options?void 0:options.activeTime)?options.activeTime:void 0,_this._titleText="string"==typeof(null==options?void 0:options.title)?options.title:String(_this._recI18n.t("title")),_this.setTitle(_this._buildHeaderTitle()),_this._$listRoot=document.createElement("div"),_this._$listRoot.className=_PREFIX_+"-list",_this._$empty=document.createElement("div"),_this._$empty.className=_PREFIX_+"-empty",_this._$empty.textContent=_this.recordOptions.emptyText,_this._$empty.style.display="none",_this._$listRoot.appendChild(_this._$empty),_this.setContent(_this._$listRoot),_this._onListClick=_this._onListClick.bind(_this),_this._onUserScroll=_this._onUserScroll.bind(_this),_this._$listRoot.addEventListener("click",_this._onListClick),_this._buildRows(),_this.isVisible()&&_this._ensureVirtualScroll(),_this}!function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}}),superClass&&_set_prototype_of$g(subClass,superClass);}(RecListModal,Modal);var _proto=RecListModal.prototype;return _proto.open=function(){Modal.prototype.open.call(this),this._$listRoot&&(this._ensureVirtualScroll(),this._userInteracting=false,this._userScrollTimer&&(clearTimeout(this._userScrollTimer),this._userScrollTimer=null),this._scrollToActive(true));},_proto.setSections=function(sections){this.recordOptions.sections=sections||[],this._buildRows(),this._virtualScroll?this._virtualScroll.setData(this._rows):this.isVisible()&&this._ensureVirtualScroll(),this._toggleEmpty();},_proto.setActiveTime=function(time){this._activeTime="number"==typeof time?time:void 0,this._refreshActiveState(),this._scrollToActive();},_proto.showEventFilter=function(show){var _this=this;if(this.recordOptions.showEventFilter=show,show){var _this__$titleWrap;if(this._eventCheckbox)return;var checkbox=new Checkbox({label:this.recordOptions.eventFilterText,checked:this._eventOnly,onChange:function(checked){return _this._onEventFilterChange(checked)}});checkbox.el.addEventListener("mousedown",function(e){return e.stopPropagation()}),checkbox.el.addEventListener("touchstart",function(e){return e.stopPropagation()}),null==(_this__$titleWrap=this._$titleWrap)||_this__$titleWrap.appendChild(checkbox.el),this._eventCheckbox=checkbox;}else {if(!this._eventCheckbox)return;this._eventCheckbox.destroy(),this._eventCheckbox=null;}},_proto.destroy=function(){var _this__eventCheckbox,_this__virtualScroll,_this__lazyLoader;this._recordDestroyed||(this._recordDestroyed=true,null==(_this__eventCheckbox=this._eventCheckbox)||_this__eventCheckbox.destroy(),this._eventCheckbox=null,this._userScrollTimer&&(clearTimeout(this._userScrollTimer),this._userScrollTimer=null),this._$listRoot.removeEventListener("click",this._onListClick),this._$listRoot.removeEventListener("wheel",this._onUserScroll),this._$listRoot.removeEventListener("touchmove",this._onUserScroll),null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.destroy(),this._virtualScroll=null,null==(_this__lazyLoader=this._lazyLoader)||_this__lazyLoader.destroy(),this._lazyLoader=null),Modal.prototype.destroy.call(this);},_proto._rowHeight=function(row){return row&&"header"===row.type?28:this._cardRowHeight},_proto._buildHeaderTitle=function(){var _this=this,wrap=document.createElement("div");wrap.className=_PREFIX_+"-title",this._$titleWrap=wrap;var text=document.createElement("span");if(text.className=_PREFIX_+"-title-text",text.textContent=this._titleText,wrap.appendChild(text),this.recordOptions.showEventFilter){var checkbox=new Checkbox({label:this.recordOptions.eventFilterText,checked:this._eventOnly,onChange:function(checked){return _this._onEventFilterChange(checked)}});checkbox.el.addEventListener("mousedown",function(e){return e.stopPropagation()}),checkbox.el.addEventListener("touchstart",function(e){return e.stopPropagation()}),wrap.appendChild(checkbox.el),this._eventCheckbox=checkbox;}return wrap},_proto._onEventFilterChange=function(checked){var _this__virtualScroll;this._eventOnly=checked,this._buildRows(),null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.setData(this._rows),this._toggleEmpty();},_proto._ensureVirtualScroll=function(){var _this__virtualScroll,_this=this;this._recordDestroyed||(this._toggleEmpty(),this._vsInited?(null==(_this__virtualScroll=this._virtualScroll)||_this__virtualScroll.refresh(),this._observeVisibleImages()):(this._vsInited=true,this._lazyLoader=new ImageLazyLoader$1({root:this._$listRoot}),this._virtualScroll=new VirtualScroll(this._$listRoot,{data:this._rows,itemHeight:function(_index,row){return _this._rowHeight(row)},buffer:this.recordOptions.buffer,renderItem:function(index,item){return _this._renderRow(index,item)},onRender:function(){return _this._observeVisibleImages()}}),this._observeVisibleImages(),this._$listRoot.addEventListener("wheel",this._onUserScroll,{passive:true}),this._$listRoot.addEventListener("touchmove",this._onUserScroll,{passive:true}),this._scrollToActive(true)));},_proto._toggleEmpty=function(){this._$empty&&(this._$empty.style.display=0===this._rows.length?"":"none");},_proto._isEvent=function(section){return "function"==typeof this.recordOptions.isEvent?this.recordOptions.isEvent(section):!!_REC_EVENT_ICONS_[section.EVENT_TYPE]},_proto._buildRows=function(){var _this=this;this._activeIndex=-1;var sorted=(this.recordOptions.sections||[]).filter(function(s){return s&&"number"==typeof s.startTime&&"number"==typeof s.endTime}).filter(function(s){return !_this._eventOnly||_this._isEvent(s)}).slice().reverse();this._sortedSections=sorted;for(var rows=[],groups=new Map,i=0;i<sorted.length;i++){var section=sorted[i],key=distExports$3.DateTime.format(section.startTime,"YYYY-MM-DD HH"),bucket=groups.get(key);bucket||(bucket=[],groups.set(key,bucket)),bucket.push({section:section,index:i});}groups.forEach(function(bucket){rows.push({type:"header",title:distExports$3.DateTime.format(bucket[0].section.startTime,_this.recordOptions.groupTitleFormat),count:bucket.length});for(var i=0;i<bucket.length;i+=2)rows.push({type:"cards",items:bucket.slice(i,i+2)});}),this._rows=rows;},_proto._renderRow=function(_index,row){var _this=this;if(!row)return "";if("header"===row.type)return '<div class="'+_PREFIX_+'-group">\n <span class="'+_PREFIX_+'-group-title">'+this._escape(row.title)+"</span>\n </div>";var cards=row.items.map(function(it){return _this._renderCard(it.section,it.index)}).join("");return '<div class="'+_PREFIX_+'-row">'+cards+"</div>"},_proto._renderCard=function(section,index){var start,end,_DateTime_toDate,_DateTime_toDate1,secondNum,second,minute,startText=distExports$3.DateTime.format(section.startTime,this.recordOptions.startTimeFormat),durationText=(start=section.startTime,end=section.endTime,secondNum=Math.floor((null==(_DateTime_toDate=distExports$3.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=distExports$3.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,((minute=Math.floor(secondNum/60))>0?distExports$3.DateTime.fillZero(minute)+"'":"0'")+distExports$3.DateTime.fillZero(second)+"''"),cover=section.coverPic?""+section.coverPic+this.recordOptions.coverQuery:"",media=cover?'<img class="'+_PREFIX_+'-card-img ez-lazy-image" data-src="'+this._setImageScr(this._escape(cover))+'" alt="" />':'<div class="'+_PREFIX_+'-card-placeholder">'+_$REC_EVENT_ICONS$__picture+"</div>",icon=this._renderCardIcon(section),activeCls=this._isActive(section)?" "+_PREFIX_+"-card-active":"";return '<div class="'+_PREFIX_+"-card"+activeCls+'" data-card-index="'+index+'">\n <div class="'+_PREFIX_+'-card-thumb">\n '+media+'\n <span class="'+_PREFIX_+'-card-start">'+this._escape(startText)+'</span>\n <span class="'+_PREFIX_+'-card-duration">'+this._escape(durationText)+'</span>\n <span class="'+_PREFIX_+'-card-playing">'+_$REC_EVENT_ICONS$__playing+"</span>\n "+icon+"\n </div>\n </div>"},_proto._isActive=function(section){var t=this._activeTime;return "number"==typeof t&&t>=section.startTime&&t<=section.endTime},_proto._refreshActiveState=function(){var _this=this;this._$listRoot.querySelectorAll("."+_PREFIX_+"-card").forEach(function(card){var idx=Number(card.getAttribute("data-card-index")),section=_this._sortedSections[idx];card.classList.toggle(_PREFIX_+"-card-active",!!section&&_this._isActive(section));});},_proto._findActiveIndex=function(){if("number"!=typeof this._activeTime)return -1;for(var i=0;i<this._sortedSections.length;i++)if(this._isActive(this._sortedSections[i]))return i;return -1},_proto._rowIndexOfSection=function(sectionIndex){for(var i=0;i<this._rows.length;i++){var row=this._rows[i];if("cards"===row.type&&row.items.some(function(it){return it.index===sectionIndex}))return i}return -1},_proto._scrollToActive=function(force){ void 0===force&&(force=false);var idx=this._findActiveIndex();if((force||idx!==this._activeIndex)&&(this._activeIndex=idx,!(idx<0||!this._virtualScroll||!force&&this._userInteracting))){var rowIndex=this._rowIndexOfSection(idx);rowIndex>=0&&this._virtualScroll.scrollToIndex(rowIndex,true);}},_proto._onUserScroll=function(){var _this=this;this._userInteracting=true,this._userScrollTimer&&clearTimeout(this._userScrollTimer),this._userScrollTimer=setTimeout(function(){_this._userInteracting=false,_this._userScrollTimer=null;},3e3);},_proto._renderCardIcon=function(section){return ""},_proto._observeVisibleImages=function(){if(this._lazyLoader){var imgs=this._$listRoot.querySelectorAll("img[data-src]");imgs.length&&this._lazyLoader.addImages(Array.from(imgs));}},_proto._onListClick=function(e){var onCardClick=this.recordOptions.onCardClick;if(onCardClick){var target=e.target,card=null==target?void 0:target.closest("."+_PREFIX_+"-card");if(card){var idx=Number(card.getAttribute("data-card-index")),section=this._sortedSections[idx];section&&onCardClick(section,idx,this._sortedSections);}}},_proto._escape=function(text){return String(text).replace(/[&<>"']/g,function(ch){switch(ch){case "&":return "&amp;";case "<":return "&lt;";case ">":return "&gt;";case '"':return "&quot;";default:return "&#39;"}})},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},RecListModal._mergeModalOptions=function(options){var _ref,_ref1;return _extends$f({},options,{width:null!=(_ref=null==options?void 0:options.width)?_ref:_$REC_LIST_MODAL_DEFAULT_OPTIONS$_.width,height:null!=(_ref1=null==options?void 0:options.height)?_ref1:_$REC_LIST_MODAL_DEFAULT_OPTIONS$_.height,content:"",title:""})},_create_class$8(RecListModal,[{key:"_cardRowHeight",get:function(){return 70}}]),RecListModal}(Modal);RecListModal.VERSION="0.0.2";
9065
9065
 
9066
9066
  function _extends$e() {
9067
9067
  _extends$e = Object.assign || function assign(target) {
@@ -9132,11 +9132,20 @@
9132
9132
  }
9133
9133
  }));
9134
9134
  _this.on(EVENTS$2.setAllDayRecTimes, function(records) {
9135
- var // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9135
+ var _this__options_props_urlInfo, _this__options_props, _this__options, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9136
9136
  _this__modal;
9137
9137
  _this.disabled = records.length === 0;
9138
9138
  _this.records = records;
9139
- (_this__modal = _this._modal) == null ? void 0 : _this__modal.setSections(records);
9139
+ if ((_this__options = _this._options) == null ? void 0 : (_this__options_props = _this__options.props) == null ? void 0 : (_this__options_props_urlInfo = _this__options_props.urlInfo) == null ? void 0 : _this__options_props_urlInfo.validateCode) {
9140
+ _this.records = records.map(function(item) {
9141
+ var _this__options_props_urlInfo, _this__options_props, _this__options;
9142
+ return _extends$e({}, item, {
9143
+ // 加密图片的地址是有时效的
9144
+ coverPic: item.coverPic + "&decodekey=" + ((_this__options = _this._options) == null ? void 0 : (_this__options_props = _this__options.props) == null ? void 0 : (_this__options_props_urlInfo = _this__options_props.urlInfo) == null ? void 0 : _this__options_props_urlInfo.validateCode)
9145
+ });
9146
+ });
9147
+ }
9148
+ (_this__modal = _this._modal) == null ? void 0 : _this__modal.setSections(_this.records);
9140
9149
  // this._modal?.showEventFilter(this._options.showEventFilter ?? true);
9141
9150
  });
9142
9151
  _this.on(EVENTS$2.getOSDTime, function(time) {
@@ -9241,12 +9250,12 @@
9241
9250
  };
9242
9251
  return _set_prototype_of$e(o, p);
9243
9252
  }
9244
- /**
9245
- * 告警消息按钮控件
9246
- *
9247
- * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
9248
- *
9249
- * @category Control
9253
+ /**
9254
+ * 告警消息按钮控件
9255
+ *
9256
+ * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
9257
+ *
9258
+ * @category Control
9250
9259
  */ var AlarmMessage = /*#__PURE__*/ function(Control) {
9251
9260
  _inherits$c(AlarmMessage, Control);
9252
9261
  function AlarmMessage(options) {
@@ -9270,16 +9279,16 @@
9270
9279
  title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_ALARM_MESSAGE) || '消息'
9271
9280
  });
9272
9281
  };
9273
- /**
9274
- * 销毁
9282
+ /**
9283
+ * 销毁
9275
9284
  */ _proto.destroy = function destroy() {
9276
9285
  if (this._panelOpen) {
9277
9286
  this.emit(EVENTS$2.control.alarmMessageChange, false);
9278
9287
  }
9279
9288
  Control.prototype.destroy.call(this);
9280
9289
  };
9281
- /**
9282
- * 点击 Control 会触发
9290
+ /**
9291
+ * 点击 Control 会触发
9283
9292
  */ _proto._onControlClick = function _onControlClick(e) {
9284
9293
  var _this__options_onChange, _this__options;
9285
9294
  Control.prototype._onControlClick.call(this, e);
@@ -9344,54 +9353,54 @@
9344
9353
  onChange: function onChange() {},
9345
9354
  onOpenChange: function onOpenChange() {}
9346
9355
  };
9347
- /**
9348
- * 选择器切换 (支持PC/Mobile)
9349
- * @category Control
9350
- * @example
9351
- * ```ts
9352
- * new Select({
9353
- * title: '清晰度',
9354
- * list: [
9355
- * {
9356
- * label: '高清',
9357
- * value: 'hd',
9358
- * streamTypeIn: 1,
9359
- * },
9360
- * {
9361
- * label: '超清',
9362
- * value: 'super',
9363
- * streamTypeIn: 2,
9364
- * }
9365
- * ],
9366
- * value: 'hd',
9367
- * onChange: (value, item) => {
9368
- * console.log('选择了', value, item);
9369
- * }
9370
- * })
9371
- *
9372
- * // 如果想扩展 Select 组件,可以继承 Select 组件
9373
- * // 例如清晰度切换组件
9374
- * class Definition extends Select {
9375
- * options: DefinitionOptions;
9376
- * constructor(options: DefinitionOptions) {
9377
- * super({
9378
- * ...options,
9379
- * fieldNames: { label: 'name', value: 'level',},
9380
- * title: options?.locale?.definition,
9381
- * controlType: 'button',
9382
- * classNameSuffix: 'definition',
9383
- * onChange: (value: SelectItem['value'], item) => {
9384
- * options?.onChange?.(value, item);
9385
- * this.emit(EVENTS.control.definitionChange, value, item);
9386
- * },
9387
- * onOpenChange: (open: boolean, value: SelectItem['value'], item) => {
9388
- * options?.onOpenChange?.(open, value, item);
9389
- * this.emit(EVENTS.control.definitionPanelOpenChange, open, value, item);
9390
- * }
9391
- * });
9392
- * }
9393
- * }
9394
- * ```
9356
+ /**
9357
+ * 选择器切换 (支持PC/Mobile)
9358
+ * @category Control
9359
+ * @example
9360
+ * ```ts
9361
+ * new Select({
9362
+ * title: '清晰度',
9363
+ * list: [
9364
+ * {
9365
+ * label: '高清',
9366
+ * value: 'hd',
9367
+ * streamTypeIn: 1,
9368
+ * },
9369
+ * {
9370
+ * label: '超清',
9371
+ * value: 'super',
9372
+ * streamTypeIn: 2,
9373
+ * }
9374
+ * ],
9375
+ * value: 'hd',
9376
+ * onChange: (value, item) => {
9377
+ * console.log('选择了', value, item);
9378
+ * }
9379
+ * })
9380
+ *
9381
+ * // 如果想扩展 Select 组件,可以继承 Select 组件
9382
+ * // 例如清晰度切换组件
9383
+ * class Definition extends Select {
9384
+ * options: DefinitionOptions;
9385
+ * constructor(options: DefinitionOptions) {
9386
+ * super({
9387
+ * ...options,
9388
+ * fieldNames: { label: 'name', value: 'level',},
9389
+ * title: options?.locale?.definition,
9390
+ * controlType: 'button',
9391
+ * classNameSuffix: 'definition',
9392
+ * onChange: (value: SelectItem['value'], item) => {
9393
+ * options?.onChange?.(value, item);
9394
+ * this.emit(EVENTS.control.definitionChange, value, item);
9395
+ * },
9396
+ * onOpenChange: (open: boolean, value: SelectItem['value'], item) => {
9397
+ * options?.onOpenChange?.(open, value, item);
9398
+ * this.emit(EVENTS.control.definitionPanelOpenChange, open, value, item);
9399
+ * }
9400
+ * });
9401
+ * }
9402
+ * }
9403
+ * ```
9395
9404
  */ var Select = /*#__PURE__*/ function(Control) {
9396
9405
  _inherits$b(Select, Control);
9397
9406
  function Select(options) {
@@ -9443,9 +9452,9 @@
9443
9452
  return _this;
9444
9453
  }
9445
9454
  var _proto = Select.prototype;
9446
- /**
9447
- * 更新选项列表
9448
- * @param list - 选项列表
9455
+ /**
9456
+ * 更新选项列表
9457
+ * @param list - 选项列表
9449
9458
  */ _proto.updateOptions = function updateOptions(list) {
9450
9459
  var _this = this;
9451
9460
  if (list === void 0) list = [];
@@ -9530,8 +9539,8 @@
9530
9539
  });
9531
9540
  }
9532
9541
  };
9533
- /**
9534
- * 销毁
9542
+ /**
9543
+ * 销毁
9535
9544
  */ _proto.destroy = function destroy() {
9536
9545
  var _this__delegationOption_destroy, _this__delegationOption, _this__delegationClose_destroy, _this__delegationClose, _this__delegationCancel_destroy, _this__delegationCancel;
9537
9546
  (_this__delegationOption = this._delegationOption) == null ? void 0 : (_this__delegationOption_destroy = _this__delegationOption.destroy) == null ? void 0 : _this__delegationOption_destroy.call(_this__delegationOption);
@@ -9553,8 +9562,8 @@
9553
9562
  e.stopPropagation();
9554
9563
  e.preventDefault();
9555
9564
  };
9556
- /**
9557
- * 点击 Control 会触发
9565
+ /**
9566
+ * 点击 Control 会触发
9558
9567
  */ _proto._onControlClick = function _onControlClick(e) {
9559
9568
  this._options.onClick == null ? void 0 : this._options.onClick.call(this._options, e);
9560
9569
  };
@@ -9573,8 +9582,8 @@
9573
9582
  },
9574
9583
  {
9575
9584
  key: "disabled",
9576
- get: /**
9577
- * 是否禁用
9585
+ get: /**
9586
+ * 是否禁用
9578
9587
  */ function get() {
9579
9588
  return this._disabled;
9580
9589
  },
@@ -9660,15 +9669,15 @@
9660
9669
  };
9661
9670
  });
9662
9671
  }
9663
- /**
9664
- * 清晰度切换控件
9665
- *
9666
- * 清晰度切换控件有三套UI
9667
- * 1. PC 端默认UI,hover 展示清晰度切换面板
9668
- * 2. 移动端 picker选择器清晰度切换面板 + 取消按钮
9669
- * 3. 移动端全屏模式右侧菜单清晰度切换面板
9670
- *
9671
- * @category Control
9672
+ /**
9673
+ * 清晰度切换控件
9674
+ *
9675
+ * 清晰度切换控件有三套UI
9676
+ * 1. PC 端默认UI,hover 展示清晰度切换面板
9677
+ * 2. 移动端 picker选择器清晰度切换面板 + 取消按钮
9678
+ * 3. 移动端全屏模式右侧菜单清晰度切换面板
9679
+ *
9680
+ * @category Control
9672
9681
  */ var Definition = /*#__PURE__*/ function(Select) {
9673
9682
  _inherits$a(Definition, Select);
9674
9683
  function Definition(options) {
@@ -9734,9 +9743,9 @@
9734
9743
  return _this;
9735
9744
  }
9736
9745
  var _proto = Definition.prototype;
9737
- /**
9738
- * 重置,恢复默认值
9739
- * @param hide 默认不隐藏
9746
+ /**
9747
+ * 重置,恢复默认值
9748
+ * @param hide 默认不隐藏
9740
9749
  */ _proto.reset = function reset(hide) {
9741
9750
  Select.prototype.reset.call(this, hide);
9742
9751
  };
@@ -9787,13 +9796,13 @@
9787
9796
  16
9788
9797
  ]; // 8, 16
9789
9798
  var SPEED_DEFAULT_OPTIONS = {
9790
- /**
9791
- * 默认倍速 1, 如果传入的值不在列表中会使用 1 倍速,可能会没有选中
9792
- * 暂时不支持初始化时设置倍速
9799
+ /**
9800
+ * 默认倍速 1, 如果传入的值不在列表中会使用 1 倍速,可能会没有选中
9801
+ * 暂时不支持初始化时设置倍速
9793
9802
  */ // value: 1, // 对应list 中的 value
9794
9803
  // 这里不要设置多语言, 比较麻烦
9795
- /**
9796
- * 倍速列表, 需要是 2 的指数,不能小于 0.5, 最大 16 倍
9804
+ /**
9805
+ * 倍速列表, 需要是 2 的指数,不能小于 0.5, 最大 16 倍
9797
9806
  */ list: SUPPORT_SPEED.reverse().map(function(speed) {
9798
9807
  return {
9799
9808
  label: "" + speed + "x",
@@ -9801,13 +9810,13 @@
9801
9810
  };
9802
9811
  })
9803
9812
  };
9804
- /**
9805
- * 倍速切换控件, 不支持动态切换倍速列表
9806
- *
9807
- * 注意:
9808
- * 1. 本地回放倍速需要设备本身支持才可以, 如果不支持切换后的倍数不会生效, 云端回放(云存储,云录制)倍速都是支持, 需要是 2 的指数,不能小于 0.5, 最大 16 倍;
9809
- * 2. 标准流不支持;
9810
- * @category Control
9813
+ /**
9814
+ * 倍速切换控件, 不支持动态切换倍速列表
9815
+ *
9816
+ * 注意:
9817
+ * 1. 本地回放倍速需要设备本身支持才可以, 如果不支持切换后的倍数不会生效, 云端回放(云存储,云录制)倍速都是支持, 需要是 2 的指数,不能小于 0.5, 最大 16 倍;
9818
+ * 2. 标准流不支持;
9819
+ * @category Control
9811
9820
  */ var Speed = /*#__PURE__*/ function(Select) {
9812
9821
  _inherits$9(Speed, Select);
9813
9822
  function Speed(options) {
@@ -9841,10 +9850,10 @@
9841
9850
  return _this;
9842
9851
  }
9843
9852
  var _proto = Speed.prototype;
9844
- /**
9845
- * 滤掉本地回放不支持的倍速
9846
- * @param optionsList 初始化配置倍速列表
9847
- * @param type 回放类型
9853
+ /**
9854
+ * 滤掉本地回放不支持的倍速
9855
+ * @param optionsList 初始化配置倍速列表
9856
+ * @param type 回放类型
9848
9857
  */ _proto._filterSpeedList = function _filterSpeedList(optionsList, type, url) {
9849
9858
  if (!optionsList) {
9850
9859
  // 非用户自定义 /openpb/ 是标准流回放路径
@@ -9910,9 +9919,9 @@
9910
9919
  };
9911
9920
  return _set_prototype_of$9(o, p);
9912
9921
  }
9913
- /**
9914
- * 日历选择器控件
9915
- * @category Control
9922
+ /**
9923
+ * 日历选择器控件
9924
+ * @category Control
9916
9925
  */ var DatePickerControl = /*#__PURE__*/ function(Control) {
9917
9926
  _inherits$8(DatePickerControl, Control);
9918
9927
  function DatePickerControl(options) {
@@ -9993,10 +10002,10 @@
9993
10002
  }
9994
10003
  }));
9995
10004
  };
9996
- /**
9997
- * 设置日期, change = true 时触发 onChange 事件
9998
- * @param date 设置的日期
9999
- * @param change 是否触发 onChange 事件
10005
+ /**
10006
+ * 设置日期, change = true 时触发 onChange 事件
10007
+ * @param date 设置的日期
10008
+ * @param change 是否触发 onChange 事件
10000
10009
  */ _proto.setDate = function setDate(date, change) {
10001
10010
  if (change === void 0) change = true;
10002
10011
  var _this_datePicker;
@@ -10012,9 +10021,9 @@
10012
10021
  if (this.datePicker) this.datePicker.open = false;
10013
10022
  Control.prototype.reset.call(this);
10014
10023
  };
10015
- /**
10016
- * 销毁控件
10017
- * @override
10024
+ /**
10025
+ * 销毁控件
10026
+ * @override
10018
10027
  */ _proto.destroy = function destroy() {
10019
10028
  if (this.datePicker) {
10020
10029
  this.datePicker.destroy();
@@ -10027,9 +10036,9 @@
10027
10036
  var arr = this._value.split('-');
10028
10037
  return arr[1] + "." + arr[2];
10029
10038
  };
10030
- /**
10031
- * 点击 Control 会触发
10032
- * @overload super._onControlClick(e: Event)
10039
+ /**
10040
+ * 点击 Control 会触发
10041
+ * @overload super._onControlClick(e: Event)
10033
10042
  */ _proto._onControlClick = function _onControlClick(e) {
10034
10043
  Control.prototype._onControlClick.call(this, e);
10035
10044
  };
@@ -10067,9 +10076,9 @@
10067
10076
  return _set_prototype_of$8(o, p);
10068
10077
  }
10069
10078
  /** 时间格式 HH:mm:ss */ var TIME_FORMAT = 'HH:mm:ss';
10070
- /**
10071
- * 时间选择器控件
10072
- * @category Control
10079
+ /**
10080
+ * 时间选择器控件
10081
+ * @category Control
10073
10082
  */ var TimePickerControl = /*#__PURE__*/ function(Control) {
10074
10083
  _inherits$7(TimePickerControl, Control);
10075
10084
  function TimePickerControl(options) {
@@ -10130,9 +10139,9 @@
10130
10139
  }
10131
10140
  }));
10132
10141
  };
10133
- /**
10134
- * 设置时间
10135
- * @param time 设置的时间 HH:mm:ss
10142
+ /**
10143
+ * 设置时间
10144
+ * @param time 设置的时间 HH:mm:ss
10136
10145
  */ _proto.setTime = function setTime(time) {
10137
10146
  var _this_timePicker;
10138
10147
  (_this_timePicker = this.timePicker) == null ? void 0 : _this_timePicker.setCurrent(time);
@@ -10148,9 +10157,9 @@
10148
10157
  if (this.timePicker) this.timePicker.open = false;
10149
10158
  Control.prototype.reset.call(this);
10150
10159
  };
10151
- /**
10152
- * 销毁控件
10153
- * @override
10160
+ /**
10161
+ * 销毁控件
10162
+ * @override
10154
10163
  */ _proto.destroy = function destroy() {
10155
10164
  if (this.timePicker) {
10156
10165
  this.timePicker.destroy();
@@ -10162,9 +10171,9 @@
10162
10171
  _proto._getTimeStr = function _getTimeStr() {
10163
10172
  return this._value;
10164
10173
  };
10165
- /**
10166
- * 点击 Control 会触发
10167
- * @overload super._onControlClick(e: Event)
10174
+ /**
10175
+ * 点击 Control 会触发
10176
+ * @overload super._onControlClick(e: Event)
10168
10177
  */ _proto._onControlClick = function _onControlClick(e) {
10169
10178
  Control.prototype._onControlClick.call(this, e);
10170
10179
  };
@@ -10665,8 +10674,8 @@
10665
10674
  };
10666
10675
  return _set_prototype_of$6(o, p);
10667
10676
  }
10668
- /**
10669
- * 回放时间轴控件
10677
+ /**
10678
+ * 回放时间轴控件
10670
10679
  */ var TimeLineControl = /*#__PURE__*/ function(Control) {
10671
10680
  _inherits$6(TimeLineControl, Control);
10672
10681
  function TimeLineControl(options) {
@@ -10826,8 +10835,8 @@
10826
10835
  }
10827
10836
  Control.prototype.destroy.call(this);
10828
10837
  };
10829
- /**
10830
- * 点击 Control 会触发
10838
+ /**
10839
+ * 点击 Control 会触发
10831
10840
  */ _proto._onControlClick = function _onControlClick(e) {
10832
10841
  this._options.onClick == null ? void 0 : this._options.onClick.call(this._options, e);
10833
10842
  };
@@ -10870,24 +10879,24 @@
10870
10879
  };
10871
10880
  return _set_prototype_of$5(o, p);
10872
10881
  }
10873
- /**
10874
- * 播放结束后忽略 OSD 回写的静默期(毫秒)
10875
- *
10876
- * 断流结束时 SDK 不会立刻停掉 OSD 轮询(要让时间轴光标跟到画面最后一帧,见
10877
- * api/_playbackRange.ts 的 OSD_SETTLE_MS = 2500),这些回写的时间早于区间末端,
10878
- * 会把刚补满的进度拉回去。取值需覆盖该窗口。
10879
- *
10880
- * 用静默期而不是永久忽略:用户可能从时间轴点回区间内继续看,那条 seek 不经过
10881
- * 进度条的 onChange,永久忽略会让进度条卡死不再更新。
10882
+ /**
10883
+ * 播放结束后忽略 OSD 回写的静默期(毫秒)
10884
+ *
10885
+ * 断流结束时 SDK 不会立刻停掉 OSD 轮询(要让时间轴光标跟到画面最后一帧,见
10886
+ * api/_playbackRange.ts 的 OSD_SETTLE_MS = 2500),这些回写的时间早于区间末端,
10887
+ * 会把刚补满的进度拉回去。取值需覆盖该窗口。
10888
+ *
10889
+ * 用静默期而不是永久忽略:用户可能从时间轴点回区间内继续看,那条 seek 不经过
10890
+ * 进度条的 onChange,永久忽略会让进度条卡死不再更新。
10882
10891
  */ var PLAYBACK_END_SILENCE_MS = 3000;
10883
- /**
10884
- * 读取录像片段的起止时间(毫秒)
10885
- *
10886
- * 录像列表是服务端原始返回、未做字段归一化,`begin/end` 与 `startTime/endTime`
10887
- * 两套字段名在不同回放类型下都出现过,这里统一兼容。
10888
- *
10889
- * @param seg 录像片段
10890
- * @param which 取起点还是终点
10892
+ /**
10893
+ * 读取录像片段的起止时间(毫秒)
10894
+ *
10895
+ * 录像列表是服务端原始返回、未做字段归一化,`begin/end` 与 `startTime/endTime`
10896
+ * 两套字段名在不同回放类型下都出现过,这里统一兼容。
10897
+ *
10898
+ * @param seg 录像片段
10899
+ * @param which 取起点还是终点
10891
10900
  */ function segMs(seg, which) {
10892
10901
  var _ref, _ref1;
10893
10902
  var value = which === 'start' ? (_ref = seg == null ? void 0 : seg.startTime) != null ? _ref : seg == null ? void 0 : seg.begin : (_ref1 = seg == null ? void 0 : seg.endTime) != null ? _ref1 : seg == null ? void 0 : seg.end;
@@ -10895,12 +10904,12 @@
10895
10904
  if (typeof value === 'number') return value < 1e12 ? value * 1000 : value;
10896
10905
  return distExports$3.DateTime.toDate(value).getTime();
10897
10906
  }
10898
- /**
10899
- * 回放片段进度条控件(移动端)
10900
- *
10901
- * 只在设置了播放区间时渲染,范围是「当前录像片段 ∩ 播放区间」。
10902
- * 区间内跨片段的定位由时间轴承担,这里只负责当前片段的精细拖动。
10903
- * @category Control
10907
+ /**
10908
+ * 回放片段进度条控件(移动端)
10909
+ *
10910
+ * 只在设置了播放区间时渲染,范围是「当前录像片段 ∩ 播放区间」。
10911
+ * 区间内跨片段的定位由时间轴承担,这里只负责当前片段的精细拖动。
10912
+ * @category Control
10904
10913
  */ var SegmentProgressControl = /*#__PURE__*/ function(Control) {
10905
10914
  _inherits$5(SegmentProgressControl, Control);
10906
10915
  function SegmentProgressControl(options) {
@@ -10967,9 +10976,9 @@
10967
10976
  });
10968
10977
  this._updateVisible();
10969
10978
  };
10970
- /**
10971
- * 设置播放区间
10972
- * @param range 区间;null 表示解除约束
10979
+ /**
10980
+ * 设置播放区间
10981
+ * @param range 区间;null 表示解除约束
10973
10982
  */ _proto._setRange = function _setRange(range) {
10974
10983
  if ((range == null ? void 0 : range.begin) && (range == null ? void 0 : range.end)) {
10975
10984
  this._rangeBeginMs = distExports$3.DateTime.toDate(range.begin).getTime();
@@ -10980,9 +10989,9 @@
10980
10989
  }
10981
10990
  this._updateVisible();
10982
10991
  };
10983
- /**
10984
- * 用区间裁剪录像片段
10985
- * @param records 全天录像片段
10992
+ /**
10993
+ * 用区间裁剪录像片段
10994
+ * @param records 全天录像片段
10986
10995
  */ _proto._setSegments = function _setSegments(records) {
10987
10996
  var _this = this;
10988
10997
  if (!this._hasRange() || !Array.isArray(records)) {
@@ -11010,9 +11019,9 @@
11010
11019
  if (force) this._currentIndex = -1;
11011
11020
  this._updateVisible();
11012
11021
  };
11013
- /**
11014
- * 按播放进度更新片段与进度
11015
- * @param currentMs 当前播放时间(毫秒)
11022
+ /**
11023
+ * 按播放进度更新片段与进度
11024
+ * @param currentMs 当前播放时间(毫秒)
11016
11025
  */ _proto._syncCurrent = function _syncCurrent(currentMs) {
11017
11026
  if (!this._hasRange()) return;
11018
11027
  var index = this._segments.findIndex(function(seg) {
@@ -11083,9 +11092,9 @@
11083
11092
  };
11084
11093
  return _set_prototype_of$4(o, p);
11085
11094
  }
11086
- /**
11087
- * 展示设备序列号控件
11088
- * @category Control
11095
+ /**
11096
+ * 展示设备序列号控件
11097
+ * @category Control
11089
11098
  */ var Device = /*#__PURE__*/ function(Control) {
11090
11099
  _inherits$4(Device, Control);
11091
11100
  function Device(options) {
@@ -11103,10 +11112,10 @@
11103
11112
  var _this___options_props_urlInfo, _this___options_props;
11104
11113
  this.$container.innerHTML = '<span class="' + PREFIX_CLASS$1 + "-text " + PREFIX_CLASS$1 + '-text-device">' + this._splicingString(this.__options.deviceName, (_this___options_props = this.__options.props) == null ? void 0 : (_this___options_props_urlInfo = _this___options_props.urlInfo) == null ? void 0 : _this___options_props_urlInfo.deviceSerial) + "</span>";
11105
11114
  };
11106
- /**
11107
- * 更新设备序列号
11108
- * @param deviceSerial - 设备序列号
11109
- * @param deviceName - 设备名称
11115
+ /**
11116
+ * 更新设备序列号
11117
+ * @param deviceSerial - 设备序列号
11118
+ * @param deviceName - 设备名称
11110
11119
  */ _proto.update = function update(deviceName, deviceSerial) {
11111
11120
  if (this.$container.querySelector("." + PREFIX_CLASS$1 + "-text-device")) {
11112
11121
  var $span = this.$container.querySelector("." + PREFIX_CLASS$1 + "-text-device");
@@ -11264,8 +11273,8 @@
11264
11273
  // const MobileExtend_DEFAULT_Options = {
11265
11274
  // controls: MOBILE_EXTENDS,
11266
11275
  // };
11267
- /**
11268
- * 移动端扩展
11276
+ /**
11277
+ * 移动端扩展
11269
11278
  */ var MobileExtend = /*#__PURE__*/ function(EventEmitter) {
11270
11279
  _inherits$2(MobileExtend, EventEmitter);
11271
11280
  function MobileExtend($siblingContainer) {
@@ -11342,9 +11351,9 @@
11342
11351
  return _set_prototype_of$1(o, p);
11343
11352
  }
11344
11353
  var PAUSE_DEFAULT_OPTIONS = {};
11345
- /**
11346
- * 暂停控件(仅在第一次非自动播放时可以点击播放), 防止和放大有冲突
11347
- * @category Control
11354
+ /**
11355
+ * 暂停控件(仅在第一次非自动播放时可以点击播放), 防止和放大有冲突
11356
+ * @category Control
11348
11357
  */ var Pause = /*#__PURE__*/ function(Control) {
11349
11358
  _inherits$1(Pause, Control);
11350
11359
  function Pause(options) {
@@ -11360,8 +11369,8 @@
11360
11369
  return _this;
11361
11370
  }
11362
11371
  var _proto = Pause.prototype;
11363
- /**
11364
- * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
11372
+ /**
11373
+ * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
11365
11374
  */ _proto.show = function show(playing, always) {
11366
11375
  var _this = this;
11367
11376
  var _this_$container_classList, _this_$container;
@@ -11406,8 +11415,8 @@
11406
11415
  }, 300);
11407
11416
  }, 10);
11408
11417
  };
11409
- /**
11410
- * 销毁
11418
+ /**
11419
+ * 销毁
11411
11420
  */ _proto.destroy = function destroy() {
11412
11421
  if (this._timer) {
11413
11422
  clearTimeout(this._timer);
@@ -11695,10 +11704,10 @@
11695
11704
  'recDropdown',
11696
11705
  'alarmMessage'
11697
11706
  ];
11698
- /**
11699
- * 渲染控件
11700
- * @param $container - 控件渲染节点
11701
- * @param btnList - 控件按钮列表
11707
+ /**
11708
+ * 渲染控件
11709
+ * @param $container - 控件渲染节点
11710
+ * @param btnList - 控件按钮列表
11702
11711
  */ // prettier-ignore
11703
11712
  function _renderControls(theme, $container, btnList, props) {
11704
11713
  if (props === void 0) props = {};
@@ -12100,27 +12109,27 @@
12100
12109
  if ((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1['recControl']) ((_theme_controls2 = theme.controls) == null ? void 0 : _theme_controls2['recControl']).addRecType(recType);
12101
12110
  };
12102
12111
 
12103
- /**
12104
- * 布局溢出(More 收纳)与响应式尺寸分档的**纯函数**模块。
12105
- *
12106
- * @remarks
12107
- * 这些函数只做「计算 / 判定」,不含任何 DOM 副作用,因此可以在没有布局引擎的环境(如 jsdom)
12108
- * 中被完整单元测试。`theme.ts` 中的命令式外壳(读取 `clientWidth`、增删 class、创建 More、
12109
- * 搬移控件)负责副作用,具体的判定逻辑全部下沉到这里。
12110
- */ /**
12111
- * 一次 classList 变更集合:需要添加与需要移除的类名。
12112
- */ /**
12113
- * 根据尺寸计算某一维度(宽或高)需要增删的响应式档位类名。
12114
- *
12115
- * 档位规则:
12116
- * - `(280, 375]` → medium
12117
- * - `(200, 280]` → small
12118
- * - `<= 200` → mini
12119
- * - 其它(> 375)→ 无档位(移除全部)
12120
- *
12121
- * @param size 尺寸(px)
12122
- * @param axis `'width'` 或 `'height'`
12123
- * @param prefix 类名前缀(如 `ezplayer`)
12112
+ /**
12113
+ * 布局溢出(More 收纳)与响应式尺寸分档的**纯函数**模块。
12114
+ *
12115
+ * @remarks
12116
+ * 这些函数只做「计算 / 判定」,不含任何 DOM 副作用,因此可以在没有布局引擎的环境(如 jsdom)
12117
+ * 中被完整单元测试。`theme.ts` 中的命令式外壳(读取 `clientWidth`、增删 class、创建 More、
12118
+ * 搬移控件)负责副作用,具体的判定逻辑全部下沉到这里。
12119
+ */ /**
12120
+ * 一次 classList 变更集合:需要添加与需要移除的类名。
12121
+ */ /**
12122
+ * 根据尺寸计算某一维度(宽或高)需要增删的响应式档位类名。
12123
+ *
12124
+ * 档位规则:
12125
+ * - `(280, 375]` → medium
12126
+ * - `(200, 280]` → small
12127
+ * - `<= 200` → mini
12128
+ * - 其它(> 375)→ 无档位(移除全部)
12129
+ *
12130
+ * @param size 尺寸(px)
12131
+ * @param axis `'width'` 或 `'height'`
12132
+ * @param prefix 类名前缀(如 `ezplayer`)
12124
12133
  */ function computeDimensionClasses(size, axis, prefix) {
12125
12134
  var medium = prefix + "-medium-" + axis;
12126
12135
  var small = prefix + "-small-" + axis;
@@ -12146,11 +12155,11 @@
12146
12155
  remove: remove
12147
12156
  };
12148
12157
  }
12149
- /**
12150
- * 计算宽、高两个维度的响应式档位类名增删集合。
12151
- * @param width 容器宽度(px)
12152
- * @param height 容器高度(px)
12153
- * @param prefix 类名前缀
12158
+ /**
12159
+ * 计算宽、高两个维度的响应式档位类名增删集合。
12160
+ * @param width 容器宽度(px)
12161
+ * @param height 容器高度(px)
12162
+ * @param prefix 类名前缀
12154
12163
  */ function computeSizeClasses(width, height, prefix) {
12155
12164
  var w = computeDimensionClasses(width, 'width', prefix);
12156
12165
  var h = computeDimensionClasses(height, 'height', prefix);
@@ -12159,34 +12168,34 @@
12159
12168
  remove: [].concat(w.remove, h.remove)
12160
12169
  };
12161
12170
  }
12162
- /**
12163
- * header 左右控件宽度之和 + 30 是否超过容器宽度 —— 超过则需要显示 More。
12171
+ /**
12172
+ * header 左右控件宽度之和 + 30 是否超过容器宽度 —— 超过则需要显示 More。
12164
12173
  */ function shouldShowHeaderMore(width, leftWidth, rightWidth) {
12165
12174
  return leftWidth + rightWidth + 30 > width;
12166
12175
  }
12167
- /**
12168
- * header 剩余空间是否 > 100 —— 足够则可以移除 More,把控件放回工具栏。
12176
+ /**
12177
+ * header 剩余空间是否 > 100 —— 足够则可以移除 More,把控件放回工具栏。
12169
12178
  */ function shouldRemoveHeaderMore(width, leftWidth, rightWidth) {
12170
12179
  return width - leftWidth - rightWidth > 100;
12171
12180
  }
12172
- /**
12173
- * footer 剩余空间是否 < 16 —— 不足则需要把控件收拢进 More。
12181
+ /**
12182
+ * footer 剩余空间是否 < 16 —— 不足则需要把控件收拢进 More。
12174
12183
  */ function shouldCollapseFooter(width, leftWidth, rightWidth) {
12175
12184
  return width - leftWidth - rightWidth < 16;
12176
12185
  }
12177
- /**
12178
- * footer 从 More 中释放控件时的展开阈值。
12179
- *
12180
- * 基准为 50;当 More 中已有控件时,加上首个控件宽度(保持与历史实现一致的运算与兜底:
12181
- * `50 + firstItemWidth || 0`)。
12182
- * @param firstItemWidth More 列表中第一个控件的宽度;未提供表示 More 为空。
12186
+ /**
12187
+ * footer 从 More 中释放控件时的展开阈值。
12188
+ *
12189
+ * 基准为 50;当 More 中已有控件时,加上首个控件宽度(保持与历史实现一致的运算与兜底:
12190
+ * `50 + firstItemWidth || 0`)。
12191
+ * @param firstItemWidth More 列表中第一个控件的宽度;未提供表示 More 为空。
12183
12192
  */ function computeFooterExpandOffset(firstItemWidth) {
12184
12193
  var base = 50;
12185
12194
  if (firstItemWidth === undefined) return base;
12186
12195
  return base + firstItemWidth || 0;
12187
12196
  }
12188
- /**
12189
- * footer 剩余空间是否足够把一个控件从 More 释放回工具栏。
12197
+ /**
12198
+ * footer 剩余空间是否足够把一个控件从 More 释放回工具栏。
12190
12199
  */ function shouldExpandFooter(width, leftWidth, rightWidth, offset) {
12191
12200
  return width - leftWidth - rightWidth > offset;
12192
12201
  }
@@ -13860,7 +13869,7 @@
13860
13869
  zh: zh,
13861
13870
  en: en
13862
13871
  };
13863
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.5-beta.3';
13872
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.5-beta.4';
13864
13873
 
13865
13874
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
13866
13875