@ezuikit/player-theme 3.0.2-beta.1 → 3.0.2-beta.3

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.0.2-beta.1
3
- * Copyright (c) 2026-05-15 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v3.0.2-beta.3
3
+ * Copyright (c) 2026-05-20 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  (function (global, factory) {
@@ -492,6 +492,9 @@
492
492
  /** 麦克风音量变化 */ talkVolumeChange: 'talkVolumeChange',
493
493
  /** 语音广播状态变化 */ broadcastChange: 'broadcastChange',
494
494
  /** AI对话框状态变化 */ aichatChange: 'aichatChange',
495
+ /** 直播模式切换 */ liveChange: 'liveChange',
496
+ /** 回放下拉选择变化 */ recDropdownChange: 'recDropdownChange',
497
+ /** 告警消息面板状态变化 */ alarmMessageChange: 'alarmMessageChange',
495
498
  /** 动态切换日志配置 */ setLoggerOptions: 'setLoggerOptions',
496
499
  records: 'records',
497
500
  ptzSpeedChange: 'ptzSpeedChange',
@@ -539,6 +542,12 @@
539
542
  /** 语音广播控件销毁 */ broadcastDestroy: 'Control.broadcastDestroy',
540
543
  /** AI对话框状态变化 */ aichatChange: 'Control.aichatChange',
541
544
  /** AI对话框控件销毁 */ aichatDestroy: 'Control.aichatDestroy',
545
+ /** 直播按钮点击 */ liveChange: 'Control.liveChange',
546
+ /** 直播控件销毁 */ liveDestroy: 'Control.liveDestroy',
547
+ /** 回放下拉选择变化 */ recDropdownChange: 'Control.recDropdownChange',
548
+ /** 回放下拉控件销毁 */ recDropdownDestroy: 'Control.recDropdownDestroy',
549
+ /** 告警消息面板开关 */ alarmMessageChange: 'Control.alarmMessageChange',
550
+ /** 告警消息面板销毁 */ alarmMessageDestroy: 'Control.alarmMessageDestroy',
542
551
  /** 缩放比例改变 */ zoomChange: 'Control.zoomChange',
543
552
  /** 音量调节面板 展示隐藏变换 */ zoomPanelOpenChange: 'Control.zoomPanelOpenChange',
544
553
  /** 缩放控件销毁 */ zoomDestroy: 'Control.zoomDestroy',
@@ -590,7 +599,7 @@
590
599
  if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
591
600
  return Constructor;
592
601
  }
593
- function _inherits$t(subClass, superClass) {
602
+ function _inherits$w(subClass, superClass) {
594
603
  if (typeof superClass !== "function" && superClass !== null) {
595
604
  throw new TypeError("Super expression must either be null or a function");
596
605
  }
@@ -601,14 +610,14 @@
601
610
  configurable: true
602
611
  }
603
612
  });
604
- if (superClass) _set_prototype_of$w(subClass, superClass);
613
+ if (superClass) _set_prototype_of$z(subClass, superClass);
605
614
  }
606
- function _set_prototype_of$w(o, p) {
607
- _set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
615
+ function _set_prototype_of$z(o, p) {
616
+ _set_prototype_of$z = Object.setPrototypeOf || function setPrototypeOf(o, p) {
608
617
  o.__proto__ = p;
609
618
  return o;
610
619
  };
611
- return _set_prototype_of$w(o, p);
620
+ return _set_prototype_of$z(o, p);
612
621
  }
613
622
  /**
614
623
  * 控件基类
@@ -622,7 +631,7 @@
622
631
  * const myControl = new MyControl({})
623
632
  * ```
624
633
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
625
- _inherits$t(Control, EventEmitter);
634
+ _inherits$w(Control, EventEmitter);
626
635
  function Control(options) {
627
636
  var _this;
628
637
  var _this___options;
@@ -714,7 +723,7 @@
714
723
  if (this._camelCaseName) {
715
724
  this.emit("Control." + this._camelCaseName + "Destroy");
716
725
  }
717
- if (((_this___options = this.__options) == null ? void 0 : _this___options.controlType) !== 'block') this.$container.addEventListener('dblclick', this._onDBlClick);
726
+ if (((_this___options = this.__options) == null ? void 0 : _this___options.controlType) !== 'block') this.$container.removeEventListener('dblclick', this._onDBlClick);
718
727
  this._active = false;
719
728
  this.removeAllListeners();
720
729
  (_this_$container = this.$container) == null ? void 0 : (_this_$container_remove = _this_$container.remove) == null ? void 0 : _this_$container_remove.call(_this_$container);
@@ -797,8 +806,8 @@
797
806
  return Control;
798
807
  }(EventEmitter);
799
808
 
800
- function _extends$u() {
801
- _extends$u = Object.assign || function(target) {
809
+ function _extends$x() {
810
+ _extends$x = Object.assign || function(target) {
802
811
  for(var i = 1; i < arguments.length; i++){
803
812
  var source = arguments[i];
804
813
  for(var key in source){
@@ -809,9 +818,9 @@
809
818
  }
810
819
  return target;
811
820
  };
812
- return _extends$u.apply(this, arguments);
821
+ return _extends$x.apply(this, arguments);
813
822
  }
814
- function _inherits$s(subClass, superClass) {
823
+ function _inherits$v(subClass, superClass) {
815
824
  if (typeof superClass !== "function" && superClass !== null) {
816
825
  throw new TypeError("Super expression must either be null or a function");
817
826
  }
@@ -822,25 +831,25 @@
822
831
  configurable: true
823
832
  }
824
833
  });
825
- if (superClass) _set_prototype_of$v(subClass, superClass);
834
+ if (superClass) _set_prototype_of$y(subClass, superClass);
826
835
  }
827
- function _set_prototype_of$v(o, p) {
828
- _set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
836
+ function _set_prototype_of$y(o, p) {
837
+ _set_prototype_of$y = Object.setPrototypeOf || function setPrototypeOf(o, p) {
829
838
  o.__proto__ = p;
830
839
  return o;
831
840
  };
832
- return _set_prototype_of$v(o, p);
841
+ return _set_prototype_of$y(o, p);
833
842
  }
834
843
  var LOADING_DEFAULT_OPTIONS = {};
835
844
  /**
836
845
  * 加载动画控件
837
846
  * @category Control
838
847
  */ var Loading = /*#__PURE__*/ function(Control) {
839
- _inherits$s(Loading, Control);
848
+ _inherits$v(Loading, Control);
840
849
  function Loading(options) {
841
850
  if (options === void 0) options = {};
842
851
  var _this;
843
- _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$u({}, options, {
852
+ _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$x({}, options, {
844
853
  tagName: 'div',
845
854
  controlType: 'block',
846
855
  classNameSuffix: 'loading'
@@ -878,8 +887,8 @@
878
887
  return Loading;
879
888
  }(Control);
880
889
 
881
- function _extends$t() {
882
- _extends$t = Object.assign || function(target) {
890
+ function _extends$w() {
891
+ _extends$w = Object.assign || function(target) {
883
892
  for(var i = 1; i < arguments.length; i++){
884
893
  var source = arguments[i];
885
894
  for(var key in source){
@@ -890,9 +899,9 @@
890
899
  }
891
900
  return target;
892
901
  };
893
- return _extends$t.apply(this, arguments);
902
+ return _extends$w.apply(this, arguments);
894
903
  }
895
- function _inherits$r(subClass, superClass) {
904
+ function _inherits$u(subClass, superClass) {
896
905
  if (typeof superClass !== "function" && superClass !== null) {
897
906
  throw new TypeError("Super expression must either be null or a function");
898
907
  }
@@ -903,14 +912,14 @@
903
912
  configurable: true
904
913
  }
905
914
  });
906
- if (superClass) _set_prototype_of$u(subClass, superClass);
915
+ if (superClass) _set_prototype_of$x(subClass, superClass);
907
916
  }
908
- function _set_prototype_of$u(o, p) {
909
- _set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
917
+ function _set_prototype_of$x(o, p) {
918
+ _set_prototype_of$x = Object.setPrototypeOf || function setPrototypeOf(o, p) {
910
919
  o.__proto__ = p;
911
920
  return o;
912
921
  };
913
- return _set_prototype_of$u(o, p);
922
+ return _set_prototype_of$x(o, p);
914
923
  }
915
924
  // 不放在服务器上 是因为有可能http加载失败
916
925
  // prettier-ignore
@@ -922,11 +931,11 @@
922
931
  * 封面控件
923
932
  * @category Control
924
933
  */ var Poster = /*#__PURE__*/ function(Control) {
925
- _inherits$r(Poster, Control);
934
+ _inherits$u(Poster, Control);
926
935
  function Poster(options) {
927
936
  if (options === void 0) options = {};
928
937
  var _this;
929
- _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$t({}, options, {
938
+ _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$w({}, options, {
930
939
  tagName: 'div',
931
940
  controlType: 'block',
932
941
  classNameSuffix: 'poster'
@@ -1032,7 +1041,10 @@
1032
1041
  warnCircleOutLined: '<svg width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" focusable="false" aria-hidden="true" data-icon="info-circle">\n <path d="M8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM7.5 8.875C7.5 8.94375 7.55625 9 7.625 9L8.375 9C8.44375 9 8.5 8.94375 8.5 8.875L8.5 4.625C8.5 4.55625 8.44375 4.5 8.375 4.5L7.625 4.5C7.55625 4.5 7.5 4.55625 7.5 4.625L7.5 8.875ZM7.25 10.75C7.25 11.1642 7.58579 11.5 8 11.5C8.41421 11.5 8.75 11.1642 8.75 10.75C8.75 10.3358 8.41421 10 8 10C7.58579 10 7.25 10.3358 7.25 10.75Z" fill-rule="evenodd" />\n </svg>',
1033
1042
  date: '<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="date">\n <g>\n <path d="m13.35,5.9c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-3.3c0,-0.3 0.2,-0.5 0.5,-0.5s0.5,0.2 0.5,0.5l0,3.3c0,0.3 -0.3,0.5 -0.5,0.5z" />\n <path d="m6.65,5.9c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-3.3c0,-0.3 0.2,-0.5 0.5,-0.5s0.5,0.2 0.5,0.5l0,3.3c0,0.3 -0.2,0.5 -0.5,0.5z" />\n <path d="m17.45,8.4l-15,0c-0.3,0 -0.5,-0.2 -0.5,-0.5s0.2,-0.5 0.5,-0.5l15,0c0.3,0 0.5,0.2 0.5,0.5s-0.2,0.5 -0.5,0.5z" />\n <path d="m15.85,18.4l-11.7,0c-1.2,0 -2.2,-1 -2.2,-2.2l0,-10.8c0,-1.2 1,-2.2 2.2,-2.2l11.7,0c1.2,0 2.2,1 2.2,2.2l0,10.8c-0.1,1.3 -1,2.2 -2.2,2.2zm-11.7,-14.1c-0.6,0 -1.2,0.5 -1.2,1.2l0,10.8c0,0.6 0.5,1.2 1.2,1.2l11.7,0c0.6,0 1.2,-0.5 1.2,-1.2l0,-10.9c0,-0.6 -0.5,-1.2 -1.2,-1.2l-11.7,0l0,0.1z" />\n <path d="m9.95,12c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5s0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7s-0.3,0.7 -0.7,0.7z" />\n <path d="m14.15,12c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2c0.4,0 0.7,0.3 0.7,0.7s-0.3,0.7 -0.7,0.7zm0,-1c-0.2,0 -0.3,0.1 -0.3,0.3c0,0.2 0.3,0.4 0.5,0.2c0.1,-0.1 0.1,-0.1 0.1,-0.2c0,-0.2 -0.1,-0.3 -0.3,-0.3z" />\n <path d="m5.85,15.3c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7c0,0.4 -0.3,0.7 -0.7,0.7z" />\n <path d="m9.95,15.3c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7c0.1,0.4 -0.3,0.7 -0.7,0.7z" />\n </g>\n </svg>',
1034
1043
  add: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="add">\n <path d="M10.5859 2.96875L9.41406 2.96875C9.3099 2.96875 9.25781 3.02083 9.25781 3.125L9.25781 9.25781L3.4375 9.25781C3.38542 9.25781 3.34635 9.27083 3.32031 9.29688C3.29427 9.32292 3.28125 9.36198 3.28125 9.41406L3.28125 10.5859C3.28125 10.6901 3.33333 10.7422 3.4375 10.7422L9.25781 10.7422L9.25781 16.875C9.25781 16.9792 9.3099 17.0312 9.41406 17.0312L10.5859 17.0312C10.6901 17.0312 10.7422 16.9792 10.7422 16.875L10.7422 10.7422L16.5625 10.7422C16.6667 10.7422 16.7188 10.6901 16.7188 10.5859L16.7188 9.41406C16.7188 9.3099 16.6667 9.25781 16.5625 9.25781L10.7422 9.25781L10.7422 3.125C10.7422 3.07292 10.7292 3.03385 10.7031 3.00781C10.6771 2.98177 10.638 2.96875 10.5859 2.96875Z" fill-rule="evenodd" /></svg>',
1035
- reduce: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="reduce">\n <path d="M3.4375 9.25781L16.5625 9.25781C16.6667 9.25781 16.7188 9.3099 16.7188 9.41406L16.7188 10.5859C16.7188 10.6901 16.6667 10.7422 16.5625 10.7422L3.4375 10.7422C3.33333 10.7422 3.28125 10.6901 3.28125 10.5859L3.28125 9.41406C3.28125 9.3099 3.33333 9.25781 3.4375 9.25781Z" fill-rule="evenodd" />\n </svg>'
1044
+ reduce: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="reduce">\n <path d="M3.4375 9.25781L16.5625 9.25781C16.6667 9.25781 16.7188 9.3099 16.7188 9.41406L16.7188 10.5859C16.7188 10.6901 16.6667 10.7422 16.5625 10.7422L3.4375 10.7422C3.33333 10.7422 3.28125 10.6901 3.28125 10.5859L3.28125 9.41406C3.28125 9.3099 3.33333 9.25781 3.4375 9.25781Z" fill-rule="evenodd" />\n </svg>',
1045
+ /** 直播 */ live: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="live">\n <rect width="18" height="13" x="3" y="7" rx="1.6" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M8.26636 4.8L10.466 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M15.996 4.8L13.796 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M9.8 17L15.4 13.354L9.8 10L9.8 17Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1046
+ /** 回放 */ recDropdown: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="rec-dropdown">\n <path d="M9.168 2.556C9.168 2.556 12.51 4.445 12 4.445C7.306 4.445 3.5 8.251 3.5 12.945C3.5 17.64 7.306 21.445 12 21.445C16.695 21.445 20.5 17.64 20.5 12.945C20.5 10.622 19.568 8.517 18.058 6.982" stroke-linecap="round" stroke-width="1.5"/>\n <path d="M11.61 9.829L11.61 13.731L16.064 13.731" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
1047
+ /** 消息/告警 */ alarmMessage: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="alarm-message">\n <path d="M9.708 18.344L9.708 18.709C9.708 19.974 10.734 21 12 21C13.266 21 14.292 19.974 14.292 18.709L14.292 18.343" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M13.833 5.751L13.833 4.833C13.833 3.821 13.013 3 12 3C10.987 3 10.167 3.821 10.167 4.833L10.167 5.751" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M6.563 10.189C6.563 7.686 8.592 5.657 11.094 5.657L12.907 5.657C15.41 5.657 17.438 7.686 17.438 10.189L17.438 12.986C17.438 13.516 17.649 14.025 18.024 14.4L18.665 15.04C19.04 15.416 19.251 15.925 19.251 16.455C19.251 17.499 18.405 18.345 17.361 18.345L6.64 18.345C5.596 18.345 4.75 17.499 4.75 16.455C4.75 15.925 4.961 15.416 5.336 15.04L5.977 14.4C6.352 14.025 6.563 13.516 6.563 12.986L6.563 10.189Z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>'
1036
1048
  };
1037
1049
 
1038
1050
  /**
@@ -1190,11 +1202,23 @@
1190
1202
  reduce: function(attr) {
1191
1203
  if (attr === void 0) attr = {};
1192
1204
  return createIcon(Icons.reduce, 'reduce', attr);
1205
+ },
1206
+ /** 直播 */ live: function(attr) {
1207
+ if (attr === void 0) attr = {};
1208
+ return createIcon(Icons.live, 'live', attr);
1209
+ },
1210
+ /** 回放 */ recDropdown: function(attr) {
1211
+ if (attr === void 0) attr = {};
1212
+ return createIcon(Icons.recDropdown, 'rec-dropdown', attr);
1213
+ },
1214
+ /** 消息 */ alarmMessage: function(attr) {
1215
+ if (attr === void 0) attr = {};
1216
+ return createIcon(Icons.alarmMessage, 'alarm-message', attr);
1193
1217
  }
1194
1218
  };
1195
1219
 
1196
- function _extends$s() {
1197
- _extends$s = Object.assign || function(target) {
1220
+ function _extends$v() {
1221
+ _extends$v = Object.assign || function(target) {
1198
1222
  for(var i = 1; i < arguments.length; i++){
1199
1223
  var source = arguments[i];
1200
1224
  for(var key in source){
@@ -1205,9 +1229,9 @@
1205
1229
  }
1206
1230
  return target;
1207
1231
  };
1208
- return _extends$s.apply(this, arguments);
1232
+ return _extends$v.apply(this, arguments);
1209
1233
  }
1210
- function _inherits$q(subClass, superClass) {
1234
+ function _inherits$t(subClass, superClass) {
1211
1235
  if (typeof superClass !== "function" && superClass !== null) {
1212
1236
  throw new TypeError("Super expression must either be null or a function");
1213
1237
  }
@@ -1218,25 +1242,25 @@
1218
1242
  configurable: true
1219
1243
  }
1220
1244
  });
1221
- if (superClass) _set_prototype_of$t(subClass, superClass);
1245
+ if (superClass) _set_prototype_of$w(subClass, superClass);
1222
1246
  }
1223
- function _set_prototype_of$t(o, p) {
1224
- _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1247
+ function _set_prototype_of$w(o, p) {
1248
+ _set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1225
1249
  o.__proto__ = p;
1226
1250
  return o;
1227
1251
  };
1228
- return _set_prototype_of$t(o, p);
1252
+ return _set_prototype_of$w(o, p);
1229
1253
  }
1230
1254
  var MESSAGE_DEFAULT_OPTIONS = {};
1231
1255
  /**
1232
1256
  * 消息控件
1233
1257
  * @category Control
1234
1258
  */ var Message = /*#__PURE__*/ function(Control) {
1235
- _inherits$q(Message, Control);
1259
+ _inherits$t(Message, Control);
1236
1260
  function Message(options) {
1237
1261
  if (options === void 0) options = {};
1238
1262
  var _this;
1239
- _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$s({}, options, {
1263
+ _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$v({}, options, {
1240
1264
  tagName: 'div',
1241
1265
  controlType: 'block'
1242
1266
  }))) || this, _this._$toast = null;
@@ -1389,8 +1413,8 @@
1389
1413
  if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
1390
1414
  return Constructor;
1391
1415
  }
1392
- function _extends$r() {
1393
- _extends$r = Object.assign || function(target) {
1416
+ function _extends$u() {
1417
+ _extends$u = Object.assign || function(target) {
1394
1418
  for(var i = 1; i < arguments.length; i++){
1395
1419
  var source = arguments[i];
1396
1420
  for(var key in source){
@@ -1401,9 +1425,9 @@
1401
1425
  }
1402
1426
  return target;
1403
1427
  };
1404
- return _extends$r.apply(this, arguments);
1428
+ return _extends$u.apply(this, arguments);
1405
1429
  }
1406
- function _inherits$p(subClass, superClass) {
1430
+ function _inherits$s(subClass, superClass) {
1407
1431
  if (typeof superClass !== "function" && superClass !== null) {
1408
1432
  throw new TypeError("Super expression must either be null or a function");
1409
1433
  }
@@ -1414,23 +1438,23 @@
1414
1438
  configurable: true
1415
1439
  }
1416
1440
  });
1417
- if (superClass) _set_prototype_of$s(subClass, superClass);
1441
+ if (superClass) _set_prototype_of$v(subClass, superClass);
1418
1442
  }
1419
- function _set_prototype_of$s(o, p) {
1420
- _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1443
+ function _set_prototype_of$v(o, p) {
1444
+ _set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1421
1445
  o.__proto__ = p;
1422
1446
  return o;
1423
1447
  };
1424
- return _set_prototype_of$s(o, p);
1448
+ return _set_prototype_of$v(o, p);
1425
1449
  }
1426
1450
  /**
1427
1451
  * 播放/暂停控件
1428
1452
  * @category Control
1429
1453
  */ var Play = /*#__PURE__*/ function(Control) {
1430
- _inherits$p(Play, Control);
1454
+ _inherits$s(Play, Control);
1431
1455
  function Play(options) {
1432
1456
  var _this;
1433
- _this = Control.call(this, _extends$r({}, options, {
1457
+ _this = Control.call(this, _extends$u({}, options, {
1434
1458
  tagName: 'span',
1435
1459
  controlType: 'button',
1436
1460
  classNameSuffix: 'play'
@@ -2948,8 +2972,8 @@
2948
2972
  if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
2949
2973
  return Constructor;
2950
2974
  }
2951
- function _extends$q() {
2952
- _extends$q = Object.assign || function(target) {
2975
+ function _extends$t() {
2976
+ _extends$t = Object.assign || function(target) {
2953
2977
  for(var i = 1; i < arguments.length; i++){
2954
2978
  var source = arguments[i];
2955
2979
  for(var key in source){
@@ -2960,9 +2984,9 @@
2960
2984
  }
2961
2985
  return target;
2962
2986
  };
2963
- return _extends$q.apply(this, arguments);
2987
+ return _extends$t.apply(this, arguments);
2964
2988
  }
2965
- function _inherits$o(subClass, superClass) {
2989
+ function _inherits$r(subClass, superClass) {
2966
2990
  if (typeof superClass !== "function" && superClass !== null) {
2967
2991
  throw new TypeError("Super expression must either be null or a function");
2968
2992
  }
@@ -2973,14 +2997,14 @@
2973
2997
  configurable: true
2974
2998
  }
2975
2999
  });
2976
- if (superClass) _set_prototype_of$r(subClass, superClass);
3000
+ if (superClass) _set_prototype_of$u(subClass, superClass);
2977
3001
  }
2978
- function _set_prototype_of$r(o, p) {
2979
- _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3002
+ function _set_prototype_of$u(o, p) {
3003
+ _set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2980
3004
  o.__proto__ = p;
2981
3005
  return o;
2982
3006
  };
2983
- return _set_prototype_of$r(o, p);
3007
+ return _set_prototype_of$u(o, p);
2984
3008
  }
2985
3009
  var VOLUME_DEFAULT_OPTIONS = {
2986
3010
  volume: 0.8,
@@ -2994,12 +3018,12 @@
2994
3018
  * 音量调节控件
2995
3019
  * @category Control
2996
3020
  */ var Volume = /*#__PURE__*/ function(Control) {
2997
- _inherits$o(Volume, Control);
3021
+ _inherits$r(Volume, Control);
2998
3022
  function Volume(options) {
2999
3023
  if (options === void 0) options = {};
3000
3024
  var _this;
3001
3025
  var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
3002
- _this = Control.call(this, _extends$q({}, options, {
3026
+ _this = Control.call(this, _extends$t({}, options, {
3003
3027
  tagName: 'span',
3004
3028
  classNameSuffix: 'volume',
3005
3029
  controlType: 'button'
@@ -3858,8 +3882,8 @@
3858
3882
  return Fullscreen;
3859
3883
  }();
3860
3884
 
3861
- function _extends$p() {
3862
- _extends$p = Object.assign || function(target) {
3885
+ function _extends$s() {
3886
+ _extends$s = Object.assign || function(target) {
3863
3887
  for(var i = 1; i < arguments.length; i++){
3864
3888
  var source = arguments[i];
3865
3889
  for(var key in source){
@@ -3870,9 +3894,9 @@
3870
3894
  }
3871
3895
  return target;
3872
3896
  };
3873
- return _extends$p.apply(this, arguments);
3897
+ return _extends$s.apply(this, arguments);
3874
3898
  }
3875
- function _inherits$n(subClass, superClass) {
3899
+ function _inherits$q(subClass, superClass) {
3876
3900
  if (typeof superClass !== "function" && superClass !== null) {
3877
3901
  throw new TypeError("Super expression must either be null or a function");
3878
3902
  }
@@ -3883,24 +3907,24 @@
3883
3907
  configurable: true
3884
3908
  }
3885
3909
  });
3886
- if (superClass) _set_prototype_of$q(subClass, superClass);
3910
+ if (superClass) _set_prototype_of$t(subClass, superClass);
3887
3911
  }
3888
- function _set_prototype_of$q(o, p) {
3889
- _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3912
+ function _set_prototype_of$t(o, p) {
3913
+ _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3890
3914
  o.__proto__ = p;
3891
3915
  return o;
3892
3916
  };
3893
- return _set_prototype_of$q(o, p);
3917
+ return _set_prototype_of$t(o, p);
3894
3918
  }
3895
3919
  /**
3896
3920
  * 全屏控件
3897
3921
  * @category Control
3898
3922
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
3899
- _inherits$n(Fullscreen, Control);
3923
+ _inherits$q(Fullscreen, Control);
3900
3924
  function Fullscreen(options) {
3901
3925
  var _this;
3902
3926
  var _options_props, _this_options;
3903
- _this = Control.call(this, _extends$p({
3927
+ _this = Control.call(this, _extends$s({
3904
3928
  tagName: 'span',
3905
3929
  classNameSuffix: 'fullscreen',
3906
3930
  controlType: 'button'
@@ -3965,8 +3989,8 @@
3965
3989
  return Fullscreen;
3966
3990
  }(Control);
3967
3991
 
3968
- function _extends$o() {
3969
- _extends$o = Object.assign || function(target) {
3992
+ function _extends$r() {
3993
+ _extends$r = Object.assign || function(target) {
3970
3994
  for(var i = 1; i < arguments.length; i++){
3971
3995
  var source = arguments[i];
3972
3996
  for(var key in source){
@@ -3977,9 +4001,9 @@
3977
4001
  }
3978
4002
  return target;
3979
4003
  };
3980
- return _extends$o.apply(this, arguments);
4004
+ return _extends$r.apply(this, arguments);
3981
4005
  }
3982
- function _inherits$m(subClass, superClass) {
4006
+ function _inherits$p(subClass, superClass) {
3983
4007
  if (typeof superClass !== "function" && superClass !== null) {
3984
4008
  throw new TypeError("Super expression must either be null or a function");
3985
4009
  }
@@ -3990,24 +4014,24 @@
3990
4014
  configurable: true
3991
4015
  }
3992
4016
  });
3993
- if (superClass) _set_prototype_of$p(subClass, superClass);
4017
+ if (superClass) _set_prototype_of$s(subClass, superClass);
3994
4018
  }
3995
- function _set_prototype_of$p(o, p) {
3996
- _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4019
+ function _set_prototype_of$s(o, p) {
4020
+ _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3997
4021
  o.__proto__ = p;
3998
4022
  return o;
3999
4023
  };
4000
- return _set_prototype_of$p(o, p);
4024
+ return _set_prototype_of$s(o, p);
4001
4025
  }
4002
4026
  /**
4003
4027
  * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
4004
4028
  * @category Control
4005
4029
  */ var Rec = /*#__PURE__*/ function(Control) {
4006
- _inherits$m(Rec, Control);
4030
+ _inherits$p(Rec, Control);
4007
4031
  function Rec(options) {
4008
4032
  var _this;
4009
4033
  var _options_props;
4010
- _this = Control.call(this, _extends$o({}, options, {
4034
+ _this = Control.call(this, _extends$r({}, options, {
4011
4035
  tagName: 'div',
4012
4036
  controlType: 'block',
4013
4037
  classNameSuffix: 'rec'
@@ -4325,6 +4349,12 @@
4325
4349
  BTN_TALK: '对讲',
4326
4350
  BTN_BROADCAST: '语音广播',
4327
4351
  BTN_AICHAT: 'AI对话',
4352
+ BTN_LIVE: '直播',
4353
+ BTN_REC_DROPDOWN: '回放',
4354
+ BTN_ALARM_MESSAGE: '消息',
4355
+ REC_DROPDOWN_CLOUD_REC: '云存储',
4356
+ REC_DROPDOWN_CLOUD_RECORD: '云录制',
4357
+ REC_DROPDOWN_LOCAL_REC: '本地回放',
4328
4358
  BTN_ZOOM: '电子放大',
4329
4359
  BTN_3D_ZOOM: '3D定位',
4330
4360
  BTN_PTZ: '云台控制',
@@ -4597,6 +4627,12 @@
4597
4627
  BTN_TALK: 'Intercom',
4598
4628
  BTN_BROADCAST: 'Voice broadcast',
4599
4629
  BTN_AICHAT: 'AI Chat',
4630
+ BTN_LIVE: 'Live',
4631
+ BTN_REC_DROPDOWN: 'Playback',
4632
+ BTN_ALARM_MESSAGE: 'Messages',
4633
+ REC_DROPDOWN_CLOUD_REC: 'Cloud Storage',
4634
+ REC_DROPDOWN_CLOUD_RECORD: 'Cloud Recording',
4635
+ REC_DROPDOWN_LOCAL_REC: 'Local Playback',
4600
4636
  BTN_ZOOM: 'Electronic zoom',
4601
4637
  BTN_3D_ZOOM: '3D positioning',
4602
4638
  BTN_PTZ: 'PTZ control',
@@ -4792,6 +4828,21 @@
4792
4828
  iconId: 'deviceName',
4793
4829
  part: 'left',
4794
4830
  isrender: 1
4831
+ },
4832
+ {
4833
+ iconId: 'live',
4834
+ part: 'right',
4835
+ isrender: 1
4836
+ },
4837
+ {
4838
+ iconId: 'recDropdown',
4839
+ part: 'right',
4840
+ isrender: 1
4841
+ },
4842
+ {
4843
+ iconId: 'alarmMessage',
4844
+ part: 'right',
4845
+ isrender: 1
4795
4846
  }
4796
4847
  ]
4797
4848
  },
@@ -4879,19 +4930,19 @@
4879
4930
  isrender: 1
4880
4931
  },
4881
4932
  {
4882
- iconId: 'cloudRec',
4933
+ iconId: 'live',
4883
4934
  part: 'right',
4884
4935
  defaultActive: 0,
4885
4936
  isrender: 1
4886
4937
  },
4887
4938
  {
4888
- iconId: 'cloudRecord',
4939
+ iconId: 'recDropdown',
4889
4940
  part: 'right',
4890
4941
  defaultActive: 0,
4891
4942
  isrender: 1
4892
4943
  },
4893
4944
  {
4894
- iconId: 'rec',
4945
+ iconId: 'alarmMessage',
4895
4946
  part: 'right',
4896
4947
  defaultActive: 0,
4897
4948
  isrender: 1
@@ -5294,7 +5345,7 @@
5294
5345
  voice: voice
5295
5346
  };
5296
5347
 
5297
- function _inherits$l(subClass, superClass) {
5348
+ function _inherits$o(subClass, superClass) {
5298
5349
  if (typeof superClass !== "function" && superClass !== null) {
5299
5350
  throw new TypeError("Super expression must either be null or a function");
5300
5351
  }
@@ -5305,20 +5356,20 @@
5305
5356
  configurable: true
5306
5357
  }
5307
5358
  });
5308
- if (superClass) _set_prototype_of$o(subClass, superClass);
5359
+ if (superClass) _set_prototype_of$r(subClass, superClass);
5309
5360
  }
5310
- function _set_prototype_of$o(o, p) {
5311
- _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5361
+ function _set_prototype_of$r(o, p) {
5362
+ _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5312
5363
  o.__proto__ = p;
5313
5364
  return o;
5314
5365
  };
5315
- return _set_prototype_of$o(o, p);
5366
+ return _set_prototype_of$r(o, p);
5316
5367
  }
5317
5368
  /**
5318
5369
  * 截图控件
5319
5370
  * @category Content
5320
5371
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
5321
- _inherits$l(Content, EventEmitter);
5372
+ _inherits$o(Content, EventEmitter);
5322
5373
  function Content(options) {
5323
5374
  var _this;
5324
5375
  _this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
@@ -5433,8 +5484,8 @@
5433
5484
  return Content;
5434
5485
  }(EventEmitter);
5435
5486
 
5436
- function _extends$n() {
5437
- _extends$n = Object.assign || function(target) {
5487
+ function _extends$q() {
5488
+ _extends$q = Object.assign || function(target) {
5438
5489
  for(var i = 1; i < arguments.length; i++){
5439
5490
  var source = arguments[i];
5440
5491
  for(var key in source){
@@ -5445,9 +5496,9 @@
5445
5496
  }
5446
5497
  return target;
5447
5498
  };
5448
- return _extends$n.apply(this, arguments);
5499
+ return _extends$q.apply(this, arguments);
5449
5500
  }
5450
- function _inherits$k(subClass, superClass) {
5501
+ function _inherits$n(subClass, superClass) {
5451
5502
  if (typeof superClass !== "function" && superClass !== null) {
5452
5503
  throw new TypeError("Super expression must either be null or a function");
5453
5504
  }
@@ -5458,23 +5509,23 @@
5458
5509
  configurable: true
5459
5510
  }
5460
5511
  });
5461
- if (superClass) _set_prototype_of$n(subClass, superClass);
5512
+ if (superClass) _set_prototype_of$q(subClass, superClass);
5462
5513
  }
5463
- function _set_prototype_of$n(o, p) {
5464
- _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5514
+ function _set_prototype_of$q(o, p) {
5515
+ _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5465
5516
  o.__proto__ = p;
5466
5517
  return o;
5467
5518
  };
5468
- return _set_prototype_of$n(o, p);
5519
+ return _set_prototype_of$q(o, p);
5469
5520
  }
5470
5521
  /**
5471
5522
  * 更多控件
5472
5523
  * @category Control
5473
5524
  */ var More = /*#__PURE__*/ function(Control) {
5474
- _inherits$k(More, Control);
5525
+ _inherits$n(More, Control);
5475
5526
  function More(options) {
5476
5527
  var _this;
5477
- _this = Control.call(this, _extends$n({}, options, {
5528
+ _this = Control.call(this, _extends$q({}, options, {
5478
5529
  tagName: 'span',
5479
5530
  controlType: 'button',
5480
5531
  classNameSuffix: 'more'
@@ -5690,6 +5741,15 @@
5690
5741
  }
5691
5742
  });
5692
5743
  // =======================================================
5744
+ // 告警消息
5745
+ // =======================================================
5746
+ theme.on(EVENTS.alarmMessageChange, function(active) {
5747
+ var _theme_controls;
5748
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.alarmMessageControl) {
5749
+ theme.controls.alarmMessageControl._panelOpen = active;
5750
+ }
5751
+ });
5752
+ // =======================================================
5693
5753
  // 录制
5694
5754
  // =======================================================
5695
5755
  theme.on(EVENTS.recordingChange, function(recording) {
@@ -5785,7 +5845,7 @@
5785
5845
  *
5786
5846
  * @param theme - Theme
5787
5847
  */ function _controlEventemitter(theme) {
5788
- var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14, _theme_controls15, _theme_controls16;
5848
+ var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14, _theme_controls15, _theme_controls16, _theme_controls17, _theme_controls18, _theme_controls19, _theme_controls20, _theme_controls21;
5789
5849
  // Controls
5790
5850
  if (theme._recFooter) {
5791
5851
  theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
@@ -5896,8 +5956,50 @@
5896
5956
  theme.emit(EVENTS.control.aichatDestroy);
5897
5957
  });
5898
5958
  }
5959
+ // 直播按钮
5960
+ if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.liveControl) {
5961
+ theme.controls.liveControl.on(EVENTS.control.liveChange, function() {
5962
+ var _theme_controls;
5963
+ // 直接设置回放下拉控件为非激活状态
5964
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recDropdownControl) {
5965
+ theme.controls.recDropdownControl.active = false;
5966
+ }
5967
+ theme.emit(EVENTS.control.liveChange);
5968
+ });
5969
+ }
5970
+ // 回放下拉
5971
+ if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.recDropdownControl) {
5972
+ theme.controls.recDropdownControl.on(EVENTS.control.recDropdownChange, function(type) {
5973
+ var _theme_controls;
5974
+ // 直接设置直播控件为非激活状态
5975
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
5976
+ theme.controls.liveControl.active = false;
5977
+ }
5978
+ theme.emit(EVENTS.control.recDropdownChange, type);
5979
+ });
5980
+ }
5981
+ // 告警消息
5982
+ if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.alarmMessageControl) {
5983
+ theme.controls.alarmMessageControl.on(EVENTS.control.alarmMessageChange, function(active) {
5984
+ theme.emit(EVENTS.control.alarmMessageChange, active);
5985
+ });
5986
+ }
5987
+ // 播放地址切换后同步 Live/RecDropdown 激活状态
5988
+ // changePlayUrl 后 urlInfo 已更新,firstFrameDisplay 表示新地址播放成功
5989
+ if (((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.liveControl) || ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.recDropdownControl)) {
5990
+ theme.on(EVENTS.firstFrameDisplay, function() {
5991
+ var _theme_controls, _theme_controls1;
5992
+ var urlInfo = theme.urlInfo;
5993
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
5994
+ theme.controls.liveControl._syncActiveByUrlInfo(urlInfo);
5995
+ }
5996
+ if ((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.recDropdownControl) {
5997
+ theme.controls.recDropdownControl._syncActiveByUrlInfo(urlInfo);
5998
+ }
5999
+ });
6000
+ }
5899
6001
  // 缩放控件
5900
- if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.zoomControl) {
6002
+ if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.zoomControl) {
5901
6003
  theme.controls.zoomControl.on(EVENTS.control.zoomChange, function(value, _percent, _range) {
5902
6004
  if (theme.zoom !== value) {
5903
6005
  theme.zoom = value;
@@ -5919,7 +6021,7 @@
5919
6021
  });
5920
6022
  }
5921
6023
  // 清晰度控件
5922
- if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.definitionControl) {
6024
+ if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.definitionControl) {
5923
6025
  theme.controls.definitionControl.on(EVENTS.control.definitionPanelOpenChange, function(open, definition, item) {
5924
6026
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, definition);
5925
6027
  theme.emit(EVENTS.control.definitionPanelOpenChange, open, definition, item);
@@ -5932,7 +6034,7 @@
5932
6034
  });
5933
6035
  }
5934
6036
  // 倍速控件
5935
- if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.speedControl) {
6037
+ if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.speedControl) {
5936
6038
  theme.controls.speedControl.on(EVENTS.control.speedPanelOpenChange, function(open, speed, item) {
5937
6039
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, speed);
5938
6040
  theme.emit(EVENTS.control.speedPanelOpenChange, open, speed, item);
@@ -5945,7 +6047,7 @@
5945
6047
  });
5946
6048
  }
5947
6049
  // 截图控件
5948
- if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.capturePictureControl) {
6050
+ if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.capturePictureControl) {
5949
6051
  theme.controls.capturePictureControl.on(EVENTS.control.capturePicture, function(options) {
5950
6052
  theme.emit(EVENTS.control.capturePicture, options);
5951
6053
  });
@@ -5954,25 +6056,25 @@
5954
6056
  });
5955
6057
  }
5956
6058
  // 全屏控件
5957
- if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.fullscreenControl) {
6059
+ if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.fullscreenControl) {
5958
6060
  theme.controls.fullscreenControl.on(EVENTS.control.fullscreenDestroy, function() {
5959
6061
  theme.emit(EVENTS.control.fullscreenDestroy);
5960
6062
  });
5961
6063
  }
5962
6064
  // 全局全屏控件
5963
- if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.globalFullscreenControl) {
6065
+ if ((_theme_controls17 = theme.controls) == null ? void 0 : _theme_controls17.globalFullscreenControl) {
5964
6066
  theme.controls.globalFullscreenControl.on(EVENTS.control.globalFullscreenDestroy, function() {
5965
6067
  theme.emit(EVENTS.control.globalFullscreenDestroy);
5966
6068
  });
5967
6069
  }
5968
6070
  // 设备信息控件
5969
- if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.deviceControl) {
6071
+ if ((_theme_controls18 = theme.controls) == null ? void 0 : _theme_controls18.deviceControl) {
5970
6072
  theme.controls.deviceControl.on(EVENTS.control.deviceDestroy, function() {
5971
6073
  theme.emit(EVENTS.control.deviceDestroy);
5972
6074
  });
5973
6075
  }
5974
6076
  // 回放类型切换控件
5975
- if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.recControl) {
6077
+ if ((_theme_controls19 = theme.controls) == null ? void 0 : _theme_controls19.recControl) {
5976
6078
  // prettier-ignore
5977
6079
  theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
5978
6080
  if (theme.recType !== type) {
@@ -5993,7 +6095,7 @@
5993
6095
  });
5994
6096
  }
5995
6097
  // 时间轴控件
5996
- if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.timeLineControl) {
6098
+ if ((_theme_controls20 = theme.controls) == null ? void 0 : _theme_controls20.timeLineControl) {
5997
6099
  theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
5998
6100
  theme.emit(EVENTS.control.timeLineChange, date);
5999
6101
  });
@@ -6010,7 +6112,7 @@
6010
6112
  });
6011
6113
  }
6012
6114
  // 日历控件
6013
- if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.dateControl) {
6115
+ if ((_theme_controls21 = theme.controls) == null ? void 0 : _theme_controls21.dateControl) {
6014
6116
  theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
6015
6117
  theme.emit(EVENTS.control.datePanelOpenChange, open, date);
6016
6118
  });
@@ -6105,8 +6207,8 @@
6105
6207
  if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
6106
6208
  return Constructor;
6107
6209
  }
6108
- function _extends$m() {
6109
- _extends$m = Object.assign || function(target) {
6210
+ function _extends$p() {
6211
+ _extends$p = Object.assign || function(target) {
6110
6212
  for(var i = 1; i < arguments.length; i++){
6111
6213
  var source = arguments[i];
6112
6214
  for(var key in source){
@@ -6117,9 +6219,9 @@
6117
6219
  }
6118
6220
  return target;
6119
6221
  };
6120
- return _extends$m.apply(this, arguments);
6222
+ return _extends$p.apply(this, arguments);
6121
6223
  }
6122
- function _inherits$j(subClass, superClass) {
6224
+ function _inherits$m(subClass, superClass) {
6123
6225
  if (typeof superClass !== "function" && superClass !== null) {
6124
6226
  throw new TypeError("Super expression must either be null or a function");
6125
6227
  }
@@ -6130,14 +6232,14 @@
6130
6232
  configurable: true
6131
6233
  }
6132
6234
  });
6133
- if (superClass) _set_prototype_of$m(subClass, superClass);
6235
+ if (superClass) _set_prototype_of$p(subClass, superClass);
6134
6236
  }
6135
- function _set_prototype_of$m(o, p) {
6136
- _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6237
+ function _set_prototype_of$p(o, p) {
6238
+ _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6137
6239
  o.__proto__ = p;
6138
6240
  return o;
6139
6241
  };
6140
- return _set_prototype_of$m(o, p);
6242
+ return _set_prototype_of$p(o, p);
6141
6243
  }
6142
6244
  var ZOOM_DEFAULT_OPTIONS = {
6143
6245
  open: false,
@@ -6147,10 +6249,10 @@
6147
6249
  * 电子放大控件
6148
6250
  * @category Control
6149
6251
  */ var Zoom$1 = /*#__PURE__*/ function(Control) {
6150
- _inherits$j(Zoom, Control);
6252
+ _inherits$m(Zoom, Control);
6151
6253
  function Zoom(options) {
6152
6254
  var _this;
6153
- _this = Control.call(this, _extends$m({}, options, {
6255
+ _this = Control.call(this, _extends$p({}, options, {
6154
6256
  tagName: 'span',
6155
6257
  controlType: 'button',
6156
6258
  classNameSuffix: 'zoom'
@@ -6285,8 +6387,8 @@
6285
6387
  */
6286
6388
  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}var ZOOM_DEFAULT_POSITION=[0,0],DefaultOptions={initialZoom:1,defaultCursor:"pointer",scrollVelocity:.1,animDuration:.25,allowZoom:true,allowPan:true,onChange:function(){},onTranslateChange:function(){},onTap:function(){},max:8,min:1,zoomStep:.1,allowTouchEvents:false,allowWheel:true,ignoredMouseButtons:[],doubleTouchMaxDelay:300,decelerationDuration:750},Zoom=function(){function Zoom(container,options){var _this=this;this._dragging=false,this.destroy=function(){_this.setAllowZoom(false),_this.reset(),_this.removeEventListeners();},this.setTransform=function(trans){_this.transform=trans;},this.getTransform=function(){return _this.transform},this.updateTranslate=function(){var translateX=0,translateY=0;translateX=_this.percentPos[0]<0?_this.percentPos[0]<-0.5*(_this.zoom-1)?-0.5*(_this.zoom-1):_this.percentPos[0]:_this.percentPos[0]>.5*(_this.zoom-1)?.5*(_this.zoom-1):_this.percentPos[0],translateY=_this.percentPos[1]<0?_this.percentPos[1]<-0.5*(_this.zoom-1)?-0.5*(_this.zoom-1):_this.percentPos[1]:_this.percentPos[1]>.5*(_this.zoom-1)?.5*(_this.zoom-1):_this.percentPos[1],_this.percentPos=[translateX,translateY];},this.update=function(){_this.container&&(_this.updateTranslate(),_this.container.style.transition="transform ease-out "+_this.transition+"s",_this.container.style.transform="translate3d("+100*_this.percentPos[0]+"%, "+100*_this.percentPos[1]+"%, 0) scale("+_this.zoom+")");},this.setAllowZoom=function(allow){_this.options.allowZoom=allow;},this.setZoom=function(zoom,reset){zoom=parseFloat(zoom.toFixed(_this.getPrecision(_this.options.zoomStep))),_this.zoom!==zoom&&(_this.zoom=zoom,_this.update(),null==_this.options.onChange||_this.options.onChange.call(_this.options,+_this.zoom.toFixed(_this.getPrecision(_this.options.zoomStep)),reset));},this.getZoom=function(){return _this.zoom},this.setPos=function(pos){var _this_container,_this_container1,containerWidth=null==(_this_container=_this.container)?void 0:_this_container.clientWidth,containerHeight=null==(_this_container1=_this.container)?void 0:_this_container1.clientHeight;+_this.pos[0]===pos[0]&&+_this.pos[1]===pos[1]||(_this.percentPos=[pos[0]/containerWidth,pos[1]/containerHeight],_this.update(),null==_this.options.onTranslateChange||_this.options.onTranslateChange.call(_this.options,{posX:pos[0],posY:pos[1]}));},this.setTransitionDuration=function(duration){_this.transition=duration,_this.update();},this.setCursor=function(cursor){_this.container&&(_this.container.style.cssText+="cursor:"+cursor+";",_this.cursor=cursor);},this.zoomIn=function(value){var _this_options_max,_this_options_max1,newPosX=_this.pos[0],newPosY=_this.pos[1],prevZoom=_this.zoom,newZoom=prevZoom+value<(null!=(_this_options_max=_this.options.max)?_this_options_max:8)?prevZoom+value:null!=(_this_options_max1=_this.options.max)?_this_options_max1:8;newZoom!==prevZoom&&(newPosX=newPosX*(newZoom-1)/(prevZoom>1?prevZoom-1:prevZoom),newPosY=newPosY*(newZoom-1)/(prevZoom>1?prevZoom-1:prevZoom)),_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);},this.zoomOut=function(value){var _this_options_min,_this_options_min1,newPosX=_this.pos[0],newPosY=_this.pos[1],prevZoom=_this.zoom,newZoom=prevZoom-value>(null!=(_this_options_min=_this.options.min)?_this_options_min:1)?prevZoom-value:null!=(_this_options_min1=_this.options.min)?_this_options_min1:1;newZoom!==prevZoom&&(newPosX=newPosX*(newZoom-1)/(prevZoom-1),newPosY=newPosY*(newZoom-1)/(prevZoom-1)),_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);},this.zoomToZone=function(relX,relY,relWidth,relHeight){var _this_container;if(_this.container){var _this_options_max,newPosX=_this.pos[0],newPosY=_this.pos[1],parentRect=(null==(_this_container=_this.container)?void 0:_this_container.parentNode).getBoundingClientRect(),prevZoom=_this.zoom,optimalZoomX=parentRect.width/relWidth,optimalZoomY=parentRect.height/relHeight,newZoom=Math.min(optimalZoomX,optimalZoomY,null!=(_this_options_max=_this.options.max)?_this_options_max:8),rect=_this.container.getBoundingClientRect(),_ref=[rect.width/prevZoom/2,rect.height/prevZoom/2],_ref1=[relX+relWidth/2,relY+relHeight/2];newPosX=(_ref[0]-_ref1[0])*newZoom,newPosY=(_ref[1]-_ref1[1])*newZoom,_this.setZoom(newZoom),_this.setPos([newPosX,newPosY]),_this.setTransitionDuration(_this.options.animDuration);}},this.getNewPosition=function(x,y,newZoom){var prevZoom=[_this.zoom,_this.pos[0],_this.pos[1]][0];if(1===newZoom||!_this)return ZOOM_DEFAULT_POSITION;var _ref1=[_this.container.clientWidth,_this.container.clientHeight],clientWidth=_ref1[0],clientHeight=_ref1[1];if(newZoom>prevZoom)return [0,0];var w=-(x-clientWidth/2)/(clientWidth/2)*newZoom/2,h=-(y-clientHeight/2)/(clientHeight/2)*newZoom/2;return w>newZoom/2-.5&&(w=3.5),h>newZoom/2-.5&&(h=3.5),[clientWidth*w,clientHeight*h]},this.fullZoomInOnPosition=function(x,y){var _this_options_max,zoom=null!=(_this_options_max=_this.options.max)?_this_options_max:DefaultOptions.max;_this.setZoom(null!=zoom?zoom:DefaultOptions.max),_this.setPos(_this.getNewPosition(x,y,zoom)),_this.setTransitionDuration(_this.options.animDuration);},this.getLimitedShift=function(shift,minLimit,maxLimit,minElement,maxElement){if(shift>0){if(minElement>minLimit)return 0;if(minElement+shift>minLimit)return minLimit-minElement}else if(shift<0){if(maxElement<maxLimit)return 0;if(maxElement+shift<maxLimit)return maxLimit-maxElement}return shift},this.getCursor=function(canMoveOnX,canMoveOnY){return canMoveOnX&&canMoveOnY?"move":canMoveOnX?"ew-resize":canMoveOnY?"ns-resize":"auto"},this.move=function(shiftX,shiftY,transitionDuration){if(void 0===transitionDuration&&(transitionDuration=0),_this.container){var newPosX=_this.pos[0],newPosY=_this.pos[1],rect=_this.container.getBoundingClientRect(),parentRect=_this.container.parentNode.getBoundingClientRect(),shiftHorizontal=_this.transform?shiftY:shiftX,shiftVertical=_this.transform?shiftX:shiftY,_ref=_this.transform?[rect.height>parentRect.bottom-parentRect.top,shiftVertical>0&&rect.top-parentRect.top<0,shiftVertical<0&&rect.bottom-parentRect.bottom>0]:[rect.width>parentRect.right-parentRect.left,shiftHorizontal>0&&rect.left-parentRect.left<0,shiftHorizontal<0&&rect.right-parentRect.right>0],canMoveOnX=_ref[0]||_ref[1]||_ref[2];canMoveOnX&&(_this.transform?newPosX+=_this.getLimitedShift(shiftVertical,parentRect.top,parentRect.bottom,rect.top,rect.bottom):newPosX+=_this.getLimitedShift(shiftHorizontal,parentRect.left,parentRect.right,rect.left,rect.right));var _ref1=_this.transform?[rect.width>parentRect.right-parentRect.left,shiftHorizontal>0&&rect.right-parentRect.right<0,shiftHorizontal<0&&rect.left-parentRect.left>0]:[rect.height>parentRect.bottom-parentRect.top,shiftVertical>0&&rect.top-parentRect.top<0,shiftVertical<0&&rect.bottom-parentRect.bottom>0],canMoveOnY=_ref1[0]||_ref1[1]||_ref1[2];if(canMoveOnY)if(_this.transform){newPosY+=function(shift,minLimit,maxLimit,minElement,maxElement){if(shift>0){if(maxElement<maxLimit+1)return 0;if(maxElement+shift<maxLimit+1)return maxLimit-maxElement}else if(shift<0){if(minElement+1>minLimit)return 0;if(minElement+1+shift>minLimit)return minLimit-minElement}return shift}(shiftHorizontal,parentRect.left,parentRect.right,rect.left,rect.right);}else newPosY+=_this.getLimitedShift(shiftVertical,parentRect.top,parentRect.bottom,rect.top,rect.bottom);var cursor=_this.getCursor(canMoveOnX,canMoveOnY);_this.setPos([newPosX,newPosY]),_this.setCursor(cursor),_this.setTransitionDuration(transitionDuration);}},this.isDoubleTapping=function(){var _this_lastTouchTime,_this_options_doubleTouchMaxDelay,_this_lastDoubleTapTime,_this_options_doubleTouchMaxDelay1,touchTime=(new Date).getTime();return touchTime-(null!=(_this_lastTouchTime=_this.lastTouchTime)?_this_lastTouchTime:0)<(null!=(_this_options_doubleTouchMaxDelay=_this.options.doubleTouchMaxDelay)?_this_options_doubleTouchMaxDelay:300)&&touchTime-(null!=(_this_lastDoubleTapTime=_this.lastDoubleTapTime)?_this_lastDoubleTapTime:0)>(null!=(_this_options_doubleTouchMaxDelay1=_this.options.doubleTouchMaxDelay)?_this_options_doubleTouchMaxDelay1:750)?(_this.lastDoubleTapTime=touchTime,true):(_this.lastTouchTime=touchTime,false)},this.startDeceleration=function(lastShiftOnX,lastShiftOnY){var startTimestamp=null,startDecelerationMove=function(timestamp){null===startTimestamp&&(startTimestamp=timestamp);var _this_options_decelerationDuration,_this_options_decelerationDuration1,_this_options_decelerationDuration2,progress=timestamp-startTimestamp,ratio=((null!=(_this_options_decelerationDuration=_this.options.decelerationDuration)?_this_options_decelerationDuration:750)-progress)/(null!=(_this_options_decelerationDuration1=_this.options.decelerationDuration)?_this_options_decelerationDuration1:750),_ref=[lastShiftOnX*ratio,lastShiftOnY*ratio],shiftX=_ref[0],shiftY=_ref[1];progress<(null!=(_this_options_decelerationDuration2=_this.options.decelerationDuration)?_this_options_decelerationDuration2:750)&&Math.max(Math.abs(shiftX),Math.abs(shiftY))>1?(_this.move(shiftX,shiftY,0),_this.lastRequestAnimationId=requestAnimationFrame(startDecelerationMove)):_this.lastRequestAnimationId=null;};_this.lastRequestAnimationId=requestAnimationFrame(startDecelerationMove);},this.reset=function(){_this.setZoom(_this.options.initialZoom,true),_this.cursor=_this.options.defaultCursor,_this.setTransitionDuration(_this.options.animDuration),_this.setPos(ZOOM_DEFAULT_POSITION);},this.addScale=function(scale){ void 0===scale&&(scale=1),_this.handleZoomAdd(scale);},this.handleZoomAdd=function(scale){if(void 0===scale&&(scale=1),_this.options.allowZoom&&_this.options.allowWheel){var _this_options_max,newZoom=parseFloat((_this.zoom+scale).toFixed(_this.getPrecision(_this.options.zoomStep)));newZoom>(null!=(_this_options_max=_this.options.max)?_this_options_max:8)&&(newZoom=8),_this.setZoom(newZoom),_this.setPos(_this.pos),_this.setTransitionDuration(.05);}},this.subScale=function(scale){ void 0===scale&&(scale=1),_this.handleZoomSub(scale);},this.handleZoomSub=function(scale){if(void 0===scale&&(scale=1),_this.options.allowZoom&&_this.options.allowWheel){var newZoom=parseFloat((_this.zoom-scale).toFixed(_this.getPrecision(_this.options.zoomStep)));newZoom<1&&(newZoom=1),_this.setZoom(newZoom),_this.setPos(_this.pos),_this.setTransitionDuration(.05);}},this.handleMouseWheel=function(event){if(event.preventDefault(),_this.options.allowZoom&&_this.options.allowWheel){var _this_options_max,_this_options_min,velocity=event.deltaY<0?_this.options.scrollVelocity:0-_this.options.scrollVelocity,newZoom=parseFloat(Math.max(Math.min(_this.zoom+velocity,null!=(_this_options_max=_this.options.max)?_this_options_max:8),null!=(_this_options_min=_this.options.min)?_this_options_min:1).toFixed(_this.getPrecision(_this.options.zoomStep)));_this.setZoom(newZoom),_this.setTransitionDuration(.05);}},this.handleMouseStart=function(event){var _this_options_ignoredMouseButtons;event.preventDefault(),_this.options.allowPan&&!(null==(_this_options_ignoredMouseButtons=_this.options.ignoredMouseButtons)?void 0:_this_options_ignoredMouseButtons.includes(event.button))&&(_this._dragging=true,_this.lastRequestAnimationId&&cancelAnimationFrame(_this.lastRequestAnimationId),_this.lastCursor=_this.getCoordinates(event));},this.handleMouseMove=function(event){event.preventDefault(),_this.options.allowPan&&_this.lastCursor&&_this._dragging&&_this._touchOrMouseDrag(event);},this.handleMouseStop=function(event){event.preventDefault(),_this.lastShift&&(_this.startDeceleration(_this.lastShift[0],_this.lastShift[1]),_this.lastShift=null),_this.lastCursor=null,_this.setCursor("auto"),_this._dragging=false;},this.handleTouchStart=function(event){var isThisDoubleTapping=_this.isDoubleTapping();_this.isMultiTouch=event.touches.length,_this.options.allowTouchEvents||event.preventDefault(),_this.lastRequestAnimationId&&cancelAnimationFrame(_this.lastRequestAnimationId);var _this_getCoordinates=_this.getCoordinates(event.touches[0]),posX=_this_getCoordinates[0],posY=_this_getCoordinates[1];if(_this.isMultiTouch>1)_this.lastCursor=[posX,posY];else if(isThisDoubleTapping&&_this.options.allowZoom)if(1===_this.zoom){var _this_container_getBoundingClientRect=_this.container.getBoundingClientRect();_this_container_getBoundingClientRect.top,_this_container_getBoundingClientRect.left;var ref,ref1,x=_this_container_getBoundingClientRect.x,y=_this_container_getBoundingClientRect.y;posX=(ref1=[posX-(x=(ref=_this.transform?[y,x]:[x,y])[0]),posY-(y=ref[1])])[0],posY=ref1[1],_this.fullZoomInOnPosition(posX,posY);}else _this.reset();else _this._tapStartTime=(new Date).getTime(),_this.options.allowPan&&(_this.lastCursor=[posX,posY]);},this.handleTouchMove=function(event){if(_this.options.allowTouchEvents||event.preventDefault(),_this.lastCursor)if(1===_this.isMultiTouch)_this._touchOrMouseDrag(event.touches[0]),_this.lastTouchDistance=null;else if(_this.isMultiTouch>1){var newZoom=_this.zoom,_this_getCoordinates=_this.getCoordinates(event.touches[0]),pos1X=_this_getCoordinates[0],pos1Y=_this_getCoordinates[1],_this_getCoordinates1=_this.getCoordinates(event.touches[1]),pos2X=_this_getCoordinates1[0],pos2Y=_this_getCoordinates1[1],distance=Math.sqrt(Math.pow(pos2X-pos1X,2)+Math.pow(pos2Y-pos1Y,2));if(_this.lastTouchDistance&&distance&&distance!==_this.lastTouchDistance){var _this_options_max,_this_options_min,_this_options_max1;if(_this.options.allowZoom)if((newZoom+=(distance-_this.lastTouchDistance)/100)>(null!=(_this_options_max=_this.options.max)?_this_options_max:8))newZoom=null!=(_this_options_max1=_this.options.max)?_this_options_max1:8;else if(newZoom<(null!=(_this_options_min=_this.options.min)?_this_options_min:1)){var _this_options_min1;newZoom=null!=(_this_options_min1=_this.options.min)?_this_options_min1:1;}_this.setZoom(newZoom),_this.setTransitionDuration(0);}_this.lastCursor=[pos1X,pos1Y],_this.lastTouchDistance=distance;}},this.handleTouchStop=function(){_this.lastShift&&(_this.startDeceleration(_this.lastShift[0],_this.lastShift[1]),_this.lastShift=null),_this._tapStartTime&&(new Date).getTime()-_this._tapStartTime<200&&(null==_this.options.onTap||_this.options.onTap.call(_this.options)),_this._tapStartTime=void 0,_this.lastCursor=null,_this.lastTouchDistance=null,_this.isMultiTouch=0;},this.container=container,this.options=Object.assign({},DefaultOptions,options||{}),this.percentPos=ZOOM_DEFAULT_POSITION,this.transition=this.options.animDuration,this.zoom=1,this.cursor="auto",this.lastCursor=[0,0],this.lastShift=null,this.lastTouchDistance=null,this.lastRequestAnimationId=null,this.lastTouchTime=(new Date).getTime(),this.lastDoubleTapTime=(new Date).getTime(),this.transform=false,this.isMultiTouch=1,this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseStart=this.handleMouseStart.bind(this),this.handleMouseStop=this.handleMouseStop.bind(this),this.handleMouseWheel=this.handleMouseWheel.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchMove=this.handleTouchMove.bind(this),this.handleTouchStop=this.handleTouchStop.bind(this),this.getZoom=this.getZoom.bind(this),this.setZoom=this.setZoom.bind(this);}var _proto=Zoom.prototype;return _proto.setUpEventListeners=function(){var refCurrentValue=this.container;window.matchMedia("(pointer: fine)").matches?(this.options.allowWheel&&(null==refCurrentValue||refCurrentValue.addEventListener("wheel",this.handleMouseWheel,{passive:false})),null==refCurrentValue||refCurrentValue.addEventListener("mousedown",this.handleMouseStart,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mousemove",this.handleMouseMove,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mouseup",this.handleMouseStop,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("mouseleave",this.handleMouseStop,{passive:false})):(null==refCurrentValue||refCurrentValue.addEventListener("touchstart",this.handleTouchStart,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchmove",this.handleTouchMove,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchend",this.handleTouchStop,{passive:false}),null==refCurrentValue||refCurrentValue.addEventListener("touchcancel",this.handleTouchStop,{passive:false}));},_proto.removeEventListeners=function(){var refCurrentValue=this.container;window.matchMedia("(pointer: fine)").matches?(this.options.allowWheel&&(null==refCurrentValue||refCurrentValue.removeEventListener("wheel",this.handleMouseWheel)),null==refCurrentValue||refCurrentValue.removeEventListener("mousedown",this.handleMouseStart),null==refCurrentValue||refCurrentValue.removeEventListener("mousemove",this.handleMouseMove),null==refCurrentValue||refCurrentValue.removeEventListener("mouseup",this.handleMouseStop),null==refCurrentValue||refCurrentValue.removeEventListener("mouseleave",this.handleMouseStop)):(null==refCurrentValue||refCurrentValue.removeEventListener("touchstart",this.handleTouchStart),null==refCurrentValue||refCurrentValue.removeEventListener("touchmove",this.handleTouchMove),null==refCurrentValue||refCurrentValue.removeEventListener("touchend",this.handleTouchStop),null==refCurrentValue||refCurrentValue.removeEventListener("touchcancel",this.handleTouchStop));},_proto.getPrecision=function(value){ void 0===value&&(value=1);var valueStr=value.toString();return valueStr.includes(".")?valueStr.split(".")[1].length:1},_proto.getCoordinates=function(event){var clientHeight=this.container.clientHeight,clientTop=this.container.clientTop,clientLeft=this.container.clientLeft,_ref=this.transform?[event.clientY,clientHeight-event.clientX]:[event.clientX-clientTop,event.clientY-clientLeft];return [_ref[0],_ref[1]]},_proto._touchOrMouseDrag=function(event){if(this.lastCursor){var _this_getCoordinates=this.getCoordinates(event),posX=_this_getCoordinates[0],posY=_this_getCoordinates[1],shiftX=posX-this.lastCursor[0],shiftY=posY-this.lastCursor[1];this.move(shiftX,shiftY,0),this.lastCursor=[posX,posY],this.lastShift=[shiftX,shiftY];}},_create_class$a(Zoom,[{key:"pos",get:function(){return [this.container.clientWidth*this.percentPos[0],this.container.clientHeight*this.percentPos[1]]}}]),Zoom}();Zoom.VERSION="1.0.0-beta.2";
6287
6389
 
6288
- function _extends$l() {
6289
- _extends$l = Object.assign || function(target) {
6390
+ function _extends$o() {
6391
+ _extends$o = Object.assign || function(target) {
6290
6392
  for(var i = 1; i < arguments.length; i++){
6291
6393
  var source = arguments[i];
6292
6394
  for(var key in source){
@@ -6297,10 +6399,10 @@
6297
6399
  }
6298
6400
  return target;
6299
6401
  };
6300
- return _extends$l.apply(this, arguments);
6402
+ return _extends$o.apply(this, arguments);
6301
6403
  }
6302
6404
  function __zoom(theme, container, options) {
6303
- theme.zoomUtil = new Zoom(container, _extends$l({}, options || {}, {
6405
+ theme.zoomUtil = new Zoom(container, _extends$o({}, options || {}, {
6304
6406
  min: 1,
6305
6407
  onChange: function(zoom, reset) {
6306
6408
  if (zoom !== theme._zoom) {
@@ -6525,8 +6627,8 @@
6525
6627
  });
6526
6628
  };
6527
6629
  }
6528
- function _extends$k() {
6529
- _extends$k = Object.assign || function(target) {
6630
+ function _extends$n() {
6631
+ _extends$n = Object.assign || function(target) {
6530
6632
  for(var i = 1; i < arguments.length; i++){
6531
6633
  var source = arguments[i];
6532
6634
  for(var key in source){
@@ -6537,7 +6639,7 @@
6537
6639
  }
6538
6640
  return target;
6539
6641
  };
6540
- return _extends$k.apply(this, arguments);
6642
+ return _extends$n.apply(this, arguments);
6541
6643
  }
6542
6644
  function _ts_generator$6(thisArg, body) {
6543
6645
  var f, y, t, _ = {
@@ -6665,7 +6767,7 @@
6665
6767
  }
6666
6768
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
6667
6769
  // TODO: 因为回放是一组, 位置以第一个位置为准
6668
- recControls.push(recControls[0] ? _extends$k({}, item, {
6770
+ recControls.push(recControls[0] ? _extends$n({}, item, {
6669
6771
  part: recControls[0].part
6670
6772
  }) : item);
6671
6773
  return false;
@@ -6688,7 +6790,7 @@
6688
6790
  }
6689
6791
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
6690
6792
  // TODO: 因为回放是一组, 位置以第一个位置为准
6691
- recControls.push(recControls[0] ? _extends$k({}, item, {
6793
+ recControls.push(recControls[0] ? _extends$n({}, item, {
6692
6794
  part: recControls[0].part
6693
6795
  }) : item);
6694
6796
  return false;
@@ -6939,8 +7041,8 @@
6939
7041
  return Component;
6940
7042
  }();
6941
7043
 
6942
- function _extends$j() {
6943
- _extends$j = Object.assign || function(target) {
7044
+ function _extends$m() {
7045
+ _extends$m = Object.assign || function(target) {
6944
7046
  for(var i = 1; i < arguments.length; i++){
6945
7047
  var source = arguments[i];
6946
7048
  for(var key in source){
@@ -6951,9 +7053,9 @@
6951
7053
  }
6952
7054
  return target;
6953
7055
  };
6954
- return _extends$j.apply(this, arguments);
7056
+ return _extends$m.apply(this, arguments);
6955
7057
  }
6956
- function _inherits$i(subClass, superClass) {
7058
+ function _inherits$l(subClass, superClass) {
6957
7059
  if (typeof superClass !== "function" && superClass !== null) {
6958
7060
  throw new TypeError("Super expression must either be null or a function");
6959
7061
  }
@@ -6964,28 +7066,28 @@
6964
7066
  configurable: true
6965
7067
  }
6966
7068
  });
6967
- if (superClass) _set_prototype_of$l(subClass, superClass);
7069
+ if (superClass) _set_prototype_of$o(subClass, superClass);
6968
7070
  }
6969
- function _set_prototype_of$l(o, p) {
6970
- _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7071
+ function _set_prototype_of$o(o, p) {
7072
+ _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6971
7073
  o.__proto__ = p;
6972
7074
  return o;
6973
7075
  };
6974
- return _set_prototype_of$l(o, p);
7076
+ return _set_prototype_of$o(o, p);
6975
7077
  }
6976
7078
  var Footer = /*#__PURE__*/ function(Component) {
6977
- _inherits$i(Footer, Component);
7079
+ _inherits$l(Footer, Component);
6978
7080
  function Footer(options) {
6979
7081
  if (options === void 0) options = {};
6980
- return Component.call(this, _extends$j({}, options, {
7082
+ return Component.call(this, _extends$m({}, options, {
6981
7083
  cType: 'footer'
6982
7084
  })) || this;
6983
7085
  }
6984
7086
  return Footer;
6985
7087
  }(Component);
6986
7088
 
6987
- function _extends$i() {
6988
- _extends$i = Object.assign || function(target) {
7089
+ function _extends$l() {
7090
+ _extends$l = Object.assign || function(target) {
6989
7091
  for(var i = 1; i < arguments.length; i++){
6990
7092
  var source = arguments[i];
6991
7093
  for(var key in source){
@@ -6996,9 +7098,9 @@
6996
7098
  }
6997
7099
  return target;
6998
7100
  };
6999
- return _extends$i.apply(this, arguments);
7101
+ return _extends$l.apply(this, arguments);
7000
7102
  }
7001
- function _inherits$h(subClass, superClass) {
7103
+ function _inherits$k(subClass, superClass) {
7002
7104
  if (typeof superClass !== "function" && superClass !== null) {
7003
7105
  throw new TypeError("Super expression must either be null or a function");
7004
7106
  }
@@ -7009,20 +7111,20 @@
7009
7111
  configurable: true
7010
7112
  }
7011
7113
  });
7012
- if (superClass) _set_prototype_of$k(subClass, superClass);
7114
+ if (superClass) _set_prototype_of$n(subClass, superClass);
7013
7115
  }
7014
- function _set_prototype_of$k(o, p) {
7015
- _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7116
+ function _set_prototype_of$n(o, p) {
7117
+ _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7016
7118
  o.__proto__ = p;
7017
7119
  return o;
7018
7120
  };
7019
- return _set_prototype_of$k(o, p);
7121
+ return _set_prototype_of$n(o, p);
7020
7122
  }
7021
7123
  var Header$1 = /*#__PURE__*/ function(Component) {
7022
- _inherits$h(Header, Component);
7124
+ _inherits$k(Header, Component);
7023
7125
  function Header(options) {
7024
7126
  if (options === void 0) options = {};
7025
- return Component.call(this, _extends$i({}, options, {
7127
+ return Component.call(this, _extends$l({}, options, {
7026
7128
  cType: 'header'
7027
7129
  })) || this;
7028
7130
  }
@@ -7188,8 +7290,8 @@
7188
7290
  };
7189
7291
  }
7190
7292
 
7191
- function _extends$h() {
7192
- _extends$h = Object.assign || function(target) {
7293
+ function _extends$k() {
7294
+ _extends$k = Object.assign || function(target) {
7193
7295
  for(var i = 1; i < arguments.length; i++){
7194
7296
  var source = arguments[i];
7195
7297
  for(var key in source){
@@ -7200,9 +7302,9 @@
7200
7302
  }
7201
7303
  return target;
7202
7304
  };
7203
- return _extends$h.apply(this, arguments);
7305
+ return _extends$k.apply(this, arguments);
7204
7306
  }
7205
- function _inherits$g(subClass, superClass) {
7307
+ function _inherits$j(subClass, superClass) {
7206
7308
  if (typeof superClass !== "function" && superClass !== null) {
7207
7309
  throw new TypeError("Super expression must either be null or a function");
7208
7310
  }
@@ -7213,23 +7315,23 @@
7213
7315
  configurable: true
7214
7316
  }
7215
7317
  });
7216
- if (superClass) _set_prototype_of$j(subClass, superClass);
7318
+ if (superClass) _set_prototype_of$m(subClass, superClass);
7217
7319
  }
7218
- function _set_prototype_of$j(o, p) {
7219
- _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7320
+ function _set_prototype_of$m(o, p) {
7321
+ _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7220
7322
  o.__proto__ = p;
7221
7323
  return o;
7222
7324
  };
7223
- return _set_prototype_of$j(o, p);
7325
+ return _set_prototype_of$m(o, p);
7224
7326
  }
7225
7327
  /**
7226
7328
  * 全局全屏
7227
7329
  * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
7228
7330
  * @category Control
7229
7331
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
7230
- _inherits$g(GlobalFullscreen, Fullscreen);
7332
+ _inherits$j(GlobalFullscreen, Fullscreen);
7231
7333
  function GlobalFullscreen(options) {
7232
- return Fullscreen.call(this, _extends$h({}, options, {
7334
+ return Fullscreen.call(this, _extends$k({}, options, {
7233
7335
  controlType: 'button',
7234
7336
  classNameSuffix: 'global-fullscreen'
7235
7337
  })) || this;
@@ -7260,8 +7362,8 @@
7260
7362
  return GlobalFullscreen;
7261
7363
  }(Fullscreen);
7262
7364
 
7263
- function _extends$g() {
7264
- _extends$g = Object.assign || function(target) {
7365
+ function _extends$j() {
7366
+ _extends$j = Object.assign || function(target) {
7265
7367
  for(var i = 1; i < arguments.length; i++){
7266
7368
  var source = arguments[i];
7267
7369
  for(var key in source){
@@ -7272,9 +7374,9 @@
7272
7374
  }
7273
7375
  return target;
7274
7376
  };
7275
- return _extends$g.apply(this, arguments);
7377
+ return _extends$j.apply(this, arguments);
7276
7378
  }
7277
- function _inherits$f(subClass, superClass) {
7379
+ function _inherits$i(subClass, superClass) {
7278
7380
  if (typeof superClass !== "function" && superClass !== null) {
7279
7381
  throw new TypeError("Super expression must either be null or a function");
7280
7382
  }
@@ -7285,23 +7387,23 @@
7285
7387
  configurable: true
7286
7388
  }
7287
7389
  });
7288
- if (superClass) _set_prototype_of$i(subClass, superClass);
7390
+ if (superClass) _set_prototype_of$l(subClass, superClass);
7289
7391
  }
7290
- function _set_prototype_of$i(o, p) {
7291
- _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7392
+ function _set_prototype_of$l(o, p) {
7393
+ _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7292
7394
  o.__proto__ = p;
7293
7395
  return o;
7294
7396
  };
7295
- return _set_prototype_of$i(o, p);
7397
+ return _set_prototype_of$l(o, p);
7296
7398
  }
7297
7399
  /**
7298
7400
  * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
7299
7401
  * @category Control
7300
7402
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
7301
- _inherits$f(CapturePicture, Control);
7403
+ _inherits$i(CapturePicture, Control);
7302
7404
  function CapturePicture(options) {
7303
7405
  var _this;
7304
- _this = Control.call(this, _extends$g({}, options, {
7406
+ _this = Control.call(this, _extends$j({}, options, {
7305
7407
  tagName: 'span',
7306
7408
  classNameSuffix: 'capture-picture'
7307
7409
  })) || this, _this._timer = null;
@@ -7359,7 +7461,7 @@
7359
7461
  * Copyright (c) 2026-05-04 Ezviz-OpenBiz
7360
7462
  * Released under the MIT License.
7361
7463
  */
7362
- var PTZ_DEFAULT_OPTIONS={language:"zh",env:{domain:"https://open.ys7.com"},accessToken:"",speed:2,locales:{zh:{GET_PTZ_STATUS:"获取当前云台状态",GET_PTZ_STATUS_FAILED:"未加载Theme模块,无法获取云台状态",MOBILE_HIDE_PTZ:"移动端,非全屏状态不展示云台",OPTION_PTZ_FAILED:"未加载Theme模块,无法操作云台",MOBILE_PTZ_TIPS:"请通过操控云台来调整摄像机视角",PTZ_FAST:"快",PTZ_MID:"中",PTZ_SLOW:"慢",PTZ_SPEED:"调整云台转动速度",DEVICE_ZOOM:"控制设备放大/缩小画面",DEVICE_FOCUS:"调整设备焦距"},en:{GET_PTZ_STATUS:"Get current PTZ status",GET_PTZ_STATUS_FAILED:"Theme module is not loaded, PTZ status cannot be obtained",MOBILE_HIDE_PTZ:"Mobile terminal, PTZ is not displayed in non-full screen state",OPTION_PTZ_FAILED:"Theme module is not loaded, PTZ cannot be operated",MOBILE_PTZ_TIPS:"Adjust camera angle by manipulating gimbal",PTZ_FAST:"F",PTZ_MID:"M",PTZ_SLOW:"S",PTZ_SPEED:"Adjust the PTZ rotation speed",DEVICE_ZOOM:"Control the device to zoom in/out of the screen",DEVICE_FOCUS:"Adjusting the device's focal length"}}},PTZ_SPEED={1:1,2:3,3:7,slow:1,mid:3,fast:7},BasePtz=function(){function BasePtz(container,options){var _this_options_locales,_this_options_locales1,_this_options_locales2;if(void 0===options&&(options={}),!container)throw new Error("Ptz container is required");(this.options=deepmerge(PTZ_DEFAULT_OPTIONS,options,{clone:false}),null==(_this_options_locales=this.options.locales)?void 0:_this_options_locales[this.options.language])?this.locale=null==(_this_options_locales1=this.options.locales)?void 0:_this_options_locales1[this.options.language]:this.locale=null==(_this_options_locales2=this.options.locales)?void 0:_this_options_locales2.zh;this.$container=container,this.speed=PTZ_SPEED[this.options.speed||2];}var _proto=BasePtz.prototype;return _proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false});},_proto.destroy=function(){},BasePtz}();function _set_prototype_of$1$3(o,p){return _set_prototype_of$1$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$3(o,p)}var MobilePtz=function(BasePtz){function MobilePtz(container,options){var _this;return (_this=BasePtz.call(this,container,options)||this)._touchstart=_this._touchstart.bind(_this),_this._touchend=_this._touchend.bind(_this),_this._render(),_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$1$3(subClass,superClass);}(MobilePtz,BasePtz);var _proto=MobilePtz.prototype;return _proto.destroy=function(){this._removeEventListener(),this.$content&&(this.$content.remove(),this.$content=null),BasePtz.prototype.destroy.call(this);},_proto._render=function(){this.$content=document.createElement("div"),this.$content.classList.add("ez-mobile-ptz-content"),this.$content.innerHTML='\n <div class="ez-mobile-ptz-wrap">\n <div class="ez-mobile-ptz-container">\n <div class="ez-mobile-ptz-center ez-mobile-ptz-center"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-top ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-left ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-bottom ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-right ez-mobile-ptz-default"></div>\n </div>\n </div>\n ',this.$container.appendChild(this.$content),this._addEventListener();},_proto._addEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.addEventListener(touchstart,this._touchstart),$warp.addEventListener(touchend,this._touchend));},_proto._touchstart=function(e){e.preventDefault(),this._handlePtzTouch(e,"start");},_proto._touchend=function(e){e.preventDefault(),this._handlePtzTouch(e,"stop");},_proto._removeEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.removeEventListener(touchstart,this._touchstart),$warp.removeEventListener(touchend,this._touchend));},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_e_changedTouches_,_e_changedTouches_1,_this_options_env,_this_options_token_deviceToken1,_this_options_token1;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");var _this_options_env1,$warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),rect=$warp.getBoundingClientRect(),containerCenterX=rect.left+130,containerCenterY=rect.top+130,left=(e.x||(null==(_e_changedTouches_=e.changedTouches[0])?void 0:_e_changedTouches_.clientX))-containerCenterX,top=(e.y||(null==(_e_changedTouches_1=e.changedTouches[0])?void 0:_e_changedTouches_1.clientY))-containerCenterY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),$icons=$warp.querySelectorAll(".ez-mobile-ptz-icon");(Math.abs(left)>Math.abs(top)?left>0?(direction=3,$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=2,$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):top>0?(direction=1,$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=0,$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")),$warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop",$warp.style.cssText="",$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"));var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{direction:direction,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed","1"),data.append("direction",direction+""),data.append("accessToken",token),fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){200===rt.code||[60005,60002,60003,60004].includes(+rt.code)&&($warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"),null==operationResultCb||operationResultCb(rt);}).catch(function(err){}).finally(function(){operationResultCb=null;});},MobilePtz}(BasePtz);function asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value;}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw);}function _async_to_generator$5(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"throw",err);}_next(void 0);})}}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}function _set_prototype_of$h(o,p){return _set_prototype_of$h=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$h(o,p)}function _ts_generator$5(thisArg,body){var f,y,t,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=verb(0),g.throw=verb(1),g.return=verb(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;g&&(g=0,op[0]&&(_=0)),_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(5&op[0])throw op[1];return {value:op[0]?op[1]:void 0,done:true}}([n,v])}}}var Ptz$1=function(BasePtz){function Ptz(container,options){var _this;return void 0===options&&(options={}),(_this=BasePtz.call(this,container,options)||this)._isMobile=distExports$4.isMobile(),_this._isRotate=false,_this._clearTimer=null,_this._$wrapper=document.createElement("div"),_this._$wrapper.className="ez-ptz-container-wrap",_this._$directionCircleContainer=document.createElement("div"),_this._$directionCircleContainer.classList.add("ez-ptz-container"),_this._$directionCircleContainer.innerHTML='\n <div class="ez-ptz-main ez-ptz-direction-center"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top" data-direction="0"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top-left" data-direction="4"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left" data-direction="2"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left-bottom" data-direction="5"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom" data-direction="1"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom-right" data-direction="7"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right" data-direction="3"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right-top" data-direction="6"></div>\n ',_this._$wrapper.appendChild(_this._$directionCircleContainer),_this._$speedContainer=document.createElement("div"),_this._$speedContainer.classList.add("ez-ptz-speed-container"),_this._$speedContainer.innerHTML='\n <div class="ez-ptz-speed-progress" title="'+_this.locale.PTZ_SPEED+'">\n <div class="ez-ptz-speed-progress-line">\n <div class="ez-ptz-speed-progress-line-dot '+(1===_this.speed?"ez-ptz-speed-active":"")+'" data-id="slow" data-index="1" data-value="1"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(3===_this.speed?"ez-ptz-speed-active":"")+'" data-id="mid" data-index="2" data-value="3"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(7===_this.speed?"ez-ptz-speed-active":"")+'" data-id="fast" data-index="3" data-value="7"></div>\n </div>\n <div class="ez-ptz-speed-progress-points">\n <div class="ez-ptz-speed-progress-points-slow">\n '+_this.locale.PTZ_SLOW+'\n </div>\n <div class="ez-ptz-speed-progress-points-mid">\n '+_this.locale.PTZ_MID+'\n </div>\n <div class="ez-ptz-speed-progress-points-fast">\n '+_this.locale.PTZ_FAST+"\n </div>\n </div>\n </div>\n ",_this._$wrapper.appendChild(_this._$speedContainer),_this._$btnContainer=document.createElement("div"),_this._$btnContainer.classList.add("ez-ptz-btn-container"),_this._$btnContainer.innerHTML='\n <div class="ez-ptz-btn-zoom" title="'+_this.locale.DEVICE_ZOOM+'" style="user-select: none;">\n <div class="ez-ptz-btn-zoom-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M563.2 198.4c179.2 0 326.4 147.2 326.4 326.4s-147.2 326.4-326.4 326.4S230.4 704 230.4 524.8s147.2-326.4 332.8-326.4z m0 64c-147.2 0-262.4 115.2-262.4 262.4s115.2 262.4 262.4 262.4 262.4-115.2 262.4-262.4S704 262.4 563.2 262.4z" fill="#ffffff"></path>\n <path d="M691.2 556.8H428.8c-19.2 0-32-12.8-32-32s12.8-32 32-32h262.4c19.2 0 32 12.8 32 32s-12.8 32-32 32z" fill="#ffffff">\n </path>\n <path d="M556.8 691.2c-19.2 0-32-12.8-32-32V396.8c0-19.2 12.8-32 32-32s32 12.8 32 32v262.4c0 19.2-12.8 32-32 32z" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-zoom-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M569.6 838.4c-172.8 0-307.2-140.8-307.2-307.2s140.8-307.2 307.2-307.2 307.2 140.8 307.2 307.2-140.8 307.2-307.2 307.2z m0-64c134.4 0 249.6-108.8 249.6-249.6S704 281.6 569.6 281.6 320 396.8 320 531.2s108.8 243.2 249.6 243.2z" fill="#ffffff"></path>\n <path d="M691.2 563.2H448c-19.2 0-32-12.8-32-32s12.8-38.4 32-38.4h249.6c19.2 0 32 12.8 32 32s-19.2 38.4-38.4 38.4z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n <div class="ez-ptz-btn-focal" title="'+_this.locale.DEVICE_FOCUS+'" style="user-select: none;">\n <div class="ez-ptz-btn-focal-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M646.4 825.6H320c-44.8 0-83.2-38.4-83.2-83.2V409.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6zM320 390.4c-12.8 0-19.2 6.4-19.2 19.2v326.4c0 12.8 6.4 19.2 19.2 19.2h326.4c12.8 0 19.2-6.4 19.2-19.2V409.6c0-12.8-6.4-19.2-19.2-19.2H320z" fill="#ffffff"></path>\n <path d="M396.8 358.4V281.6c0-25.6 25.6-51.2 51.2-51.2h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H704l-6.4-268.8" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-focal-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M320 358.4h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H320c-25.6 0-51.2-25.6-51.2-51.2V409.6c0-25.6 25.6-51.2 51.2-51.2z" fill="#ffffff"></path>\n <path d="M774.4 697.6H704c-19.2 0-32-12.8-32-32s12.8-32 32-32h70.4c12.8 0 19.2-6.4 19.2-19.2V281.6c0-12.8-6.4-19.2-19.2-19.2H448c-12.8 0-19.2 6.4-19.2 19.2v70.4c0 19.2-12.8 32-32 32s-32-12.8-32-25.6V281.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n ',_this._$wrapper.appendChild(_this._$btnContainer),container.appendChild(_this._$wrapper),_this._$directionCircleContainer.onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._$directionCircleContainer.ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._onSwitchSpeed=function(e){var list=Array.from(_this._$speedContainer.querySelectorAll(".ez-ptz-speed-progress-line-dot"));if(list.includes(e.target)&&!e.target.classList.contains("ez-ptz-speed-active")){list.forEach(function(item){item===e.target?item.classList.add("ez-ptz-speed-active"):item.classList.remove("ez-ptz-speed-active");});var value=e.target.getAttribute("data-value"),index=e.target.getAttribute("data-index");_this.speed=+value,null==_this.options.onSpeedChange||_this.options.onSpeedChange.call(_this.options,+index);}},_this._$speedContainer.onmouseup=_this._onSwitchSpeed,_this._isMobile&&(_this._$speedContainer.ontouchend=_this._onSwitchSpeed),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");}),_this._isMobile&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");})),_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$h(subClass,superClass);}(Ptz,BasePtz);var _proto=Ptz.prototype;return _proto.destroy=function(){this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer&&(this._$directionCircleContainer.remove(),this._$directionCircleContainer=null),this._$speedContainer&&(this._onSwitchSpeed=null,this._$speedContainer.remove(),this._$speedContainer=null),this._$btnContainer&&(this._$btnContainer.remove(),this._$btnContainer=null),this._$wrapper&&(this._$wrapper.remove(),this._$wrapper=null),BasePtz.prototype.destroy.call(this);},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_this_options_env,_this_options_token_deviceToken1,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzQueue||(this._ptzQueue=Promise.resolve());var container=this._$directionCircleContainer.getBoundingClientRect(),containerCenterX=container.left+(this._$directionCircleContainer.clientWidth+2)/2,containerCenterY=container.top+(this._$directionCircleContainer.clientHeight+2)/2,eventX=e.x||e.changedTouches[0].clientX,eventY=e.y||e.changedTouches[0].clientY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),backDeg=0;function getAreaId(x,y){var rad=Math.atan2(y,x);rad<0&&(rad+=2*Math.PI);var deg=rad*(180/Math.PI)-225-12.5;return deg<0&&(deg+=360),Math.floor(deg/45)+1}var _this_options_env1,left=eventX-containerCenterX,top=eventY-containerCenterY;if(this.isRotate)switch(getAreaId(left,top)){case 1:direction=2,backDeg=90;break;case 2:direction=4,backDeg=135;break;case 3:direction=0,backDeg=180;break;case 4:direction=6,backDeg=225;break;case 5:direction=3,backDeg=270;break;case 6:direction=7,backDeg=315;break;case 7:direction=1,backDeg=0;break;case 8:direction=5,backDeg=45;}else switch(getAreaId(left,top)){case 1:direction=0,backDeg=180;break;case 2:direction=6,backDeg=225;break;case 3:direction=3,backDeg=270;break;case 4:direction=7,backDeg=315;break;case 5:direction=1,backDeg=0;break;case 6:direction=5,backDeg=45;break;case 7:direction=2,backDeg=90;break;case 8:direction=4,backDeg=135;}(this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer.style.cssText="start"===type?"background-image:linear-gradient("+backDeg+"deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)":"","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{areaId:getAreaId(left,top),direction:direction,backDeg:backDeg,isRotate:this.isRotate,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzQueue=this._ptzQueue.then(function(){return _async_to_generator$5(function(){var _this;return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return _this=this,[4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){var _rt_result;null==operationResultCb||operationResultCb(rt);var code=rt.code||(null==rt||null==(_rt_result=rt.result)?void 0:_rt_result.code);return [6e4,60001,60002,60003,60004,60005,60006,10002].includes(+code)&&(_this._$directionCircleContainer.style.cssText="background-image:linear-gradient("+backDeg+"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)"),rt}).catch(function(err){}).finally(function(){operationResultCb=null,"stop"===type&&(_this._clearTimer=setTimeout(function(){_this._$directionCircleContainer.style.cssText="";},1e3));})];case 1:return [2,_state.sent()]}})}).call(_this)}),"stop"===type&&(this._ptzQueue=this._ptzQueue.finally(function(){}));},_proto._handleBtnTouch=function(btn,option,type){var _this_options_token,_this_options_env,_this_options_token_deviceToken,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)?void 0:_this_options_token.deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzOperation||(this._ptzOperation=Promise.resolve());var direction=8;direction="zoom"===btn?"add"===option?8:9:"add"===option?10:11;var _this_options_env1,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken.video);"stop"===type&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{btn:btn,option:option,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzOperation=this._ptzOperation.then(function(){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){return null==operationResultCb||operationResultCb(rt),rt}).catch(function(err){}).finally(function(){operationResultCb=null;})];case 1:return [2,_state.sent()]}})})()}),"stop"===type&&(this._ptzOperation=this._ptzOperation.finally(function(){_this._ptzOperation=null;}));},_create_class$9(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
7464
+ var PTZ_DEFAULT_OPTIONS={language:"zh",env:{domain:"https://open.ys7.com"},accessToken:"",speed:2,locales:{zh:{GET_PTZ_STATUS:"获取当前云台状态",GET_PTZ_STATUS_FAILED:"未加载Theme模块,无法获取云台状态",MOBILE_HIDE_PTZ:"移动端,非全屏状态不展示云台",OPTION_PTZ_FAILED:"未加载Theme模块,无法操作云台",MOBILE_PTZ_TIPS:"请通过操控云台来调整摄像机视角",PTZ_FAST:"快",PTZ_MID:"中",PTZ_SLOW:"慢",PTZ_SPEED:"调整云台转动速度",DEVICE_ZOOM:"控制设备放大/缩小画面",DEVICE_FOCUS:"调整设备焦距"},en:{GET_PTZ_STATUS:"Get current PTZ status",GET_PTZ_STATUS_FAILED:"Theme module is not loaded, PTZ status cannot be obtained",MOBILE_HIDE_PTZ:"Mobile terminal, PTZ is not displayed in non-full screen state",OPTION_PTZ_FAILED:"Theme module is not loaded, PTZ cannot be operated",MOBILE_PTZ_TIPS:"Adjust camera angle by manipulating gimbal",PTZ_FAST:"F",PTZ_MID:"M",PTZ_SLOW:"S",PTZ_SPEED:"Adjust the PTZ rotation speed",DEVICE_ZOOM:"Control the device to zoom in/out of the screen",DEVICE_FOCUS:"Adjusting the device's focal length"}}},PTZ_SPEED={1:1,2:3,3:7,slow:1,mid:3,fast:7},BasePtz=function(){function BasePtz(container,options){var _this_options_locales,_this_options_locales1,_this_options_locales2;if(void 0===options&&(options={}),!container)throw new Error("Ptz container is required");(this.options=deepmerge(PTZ_DEFAULT_OPTIONS,options,{clone:false}),null==(_this_options_locales=this.options.locales)?void 0:_this_options_locales[this.options.language])?this.locale=null==(_this_options_locales1=this.options.locales)?void 0:_this_options_locales1[this.options.language]:this.locale=null==(_this_options_locales2=this.options.locales)?void 0:_this_options_locales2.zh;this.$container=container,this.speed=PTZ_SPEED[this.options.speed||2];}var _proto=BasePtz.prototype;return _proto.updateOptions=function(options){this.options=deepmerge(this.options,options,{clone:false});},_proto.destroy=function(){},BasePtz}();function _set_prototype_of$1$3(o,p){return _set_prototype_of$1$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1$3(o,p)}var MobilePtz=function(BasePtz){function MobilePtz(container,options){var _this;return (_this=BasePtz.call(this,container,options)||this)._touchstart=_this._touchstart.bind(_this),_this._touchend=_this._touchend.bind(_this),_this._render(),_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$1$3(subClass,superClass);}(MobilePtz,BasePtz);var _proto=MobilePtz.prototype;return _proto.destroy=function(){this._removeEventListener(),this.$content&&(this.$content.remove(),this.$content=null),BasePtz.prototype.destroy.call(this);},_proto._render=function(){this.$content=document.createElement("div"),this.$content.classList.add("ez-mobile-ptz-content"),this.$content.innerHTML='\n <div class="ez-mobile-ptz-wrap">\n <div class="ez-mobile-ptz-container">\n <div class="ez-mobile-ptz-center ez-mobile-ptz-center"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-top ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-left ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-bottom ez-mobile-ptz-default"></div>\n <div class="ez-mobile-ptz-icon ez-mobile-ptz-right ez-mobile-ptz-default"></div>\n </div>\n </div>\n ',this.$container.appendChild(this.$content),this._addEventListener();},_proto._addEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.addEventListener(touchstart,this._touchstart),$warp.addEventListener(touchend,this._touchend));},_proto._touchstart=function(e){e.preventDefault(),this._handlePtzTouch(e,"start");},_proto._touchend=function(e){e.preventDefault(),this._handlePtzTouch(e,"stop");},_proto._removeEventListener=function(){var $warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),touchstart="PointerEvent"in window?"pointerdown":"touchstart",touchend="PointerEvent"in window?"pointerup":"touchend";$warp&&($warp.removeEventListener(touchstart,this._touchstart),$warp.removeEventListener(touchend,this._touchend));},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_e_changedTouches_,_e_changedTouches_1,_this_options_env,_this_options_token_deviceToken1,_this_options_token1;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");var _this_options_env1,$warp=this.$content.querySelector(".ez-mobile-ptz-wrap"),rect=$warp.getBoundingClientRect(),containerCenterX=rect.left+130,containerCenterY=rect.top+130,left=(e.x||(null==(_e_changedTouches_=e.changedTouches[0])?void 0:_e_changedTouches_.clientX))-containerCenterX,top=(e.y||(null==(_e_changedTouches_1=e.changedTouches[0])?void 0:_e_changedTouches_1.clientY))-containerCenterY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),$icons=$warp.querySelectorAll(".ez-mobile-ptz-icon");(Math.abs(left)>Math.abs(top)?left>0?(direction=3,$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=2,$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):top>0?(direction=1,$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")):(direction=0,$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-default","ez-mobile-ptz-active")),$warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop",$warp.style.cssText="",$icons[3].className=$icons[3].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[1].className=$icons[1].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[2].className=$icons[2].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"),$icons[0].className=$icons[0].className.replace("ez-mobile-ptz-active","ez-mobile-ptz-default"));var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{direction:direction,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed","1"),data.append("direction",direction+""),data.append("accessToken",token),fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){200===rt.code||[60005,60002,60003,60004].includes(+rt.code)&&($warp.style.cssText="background-image:linear-gradient("+(0===direction?180:1===direction?0:2===direction?90:270)+"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"),null==operationResultCb||operationResultCb(rt);}).catch(function(err){}).finally(function(){operationResultCb=null;});},MobilePtz}(BasePtz);function asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value;}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw);}function _async_to_generator$5(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep$5(gen,resolve,reject,_next,_throw,"throw",err);}_next(void 0);})}}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}function _set_prototype_of$k(o,p){return _set_prototype_of$k=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$k(o,p)}function _ts_generator$5(thisArg,body){var f,y,t,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=verb(0),g.throw=verb(1),g.return=verb(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return function(op){if(f)throw new TypeError("Generator is already executing.");for(;g&&(g=0,op[0]&&(_=0)),_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=_.trys,(t=t.length>0&&t[t.length-1])||6!==op[0]&&2!==op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_);}catch(e){op=[6,e],y=0;}finally{f=t=0;}if(5&op[0])throw op[1];return {value:op[0]?op[1]:void 0,done:true}}([n,v])}}}var Ptz$1=function(BasePtz){function Ptz(container,options){var _this;return void 0===options&&(options={}),(_this=BasePtz.call(this,container,options)||this)._isMobile=distExports$4.isMobile(),_this._isRotate=false,_this._clearTimer=null,_this._$wrapper=document.createElement("div"),_this._$wrapper.className="ez-ptz-container-wrap",_this._$directionCircleContainer=document.createElement("div"),_this._$directionCircleContainer.classList.add("ez-ptz-container"),_this._$directionCircleContainer.innerHTML='\n <div class="ez-ptz-main ez-ptz-direction-center"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top" data-direction="0"></div>\n <div class="ez-ptz-icon ez-ptz-direction-top-left" data-direction="4"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left" data-direction="2"></div>\n <div class="ez-ptz-icon ez-ptz-direction-left-bottom" data-direction="5"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom" data-direction="1"></div>\n <div class="ez-ptz-icon ez-ptz-direction-bottom-right" data-direction="7"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right" data-direction="3"></div>\n <div class="ez-ptz-icon ez-ptz-direction-right-top" data-direction="6"></div>\n ',_this._$wrapper.appendChild(_this._$directionCircleContainer),_this._$speedContainer=document.createElement("div"),_this._$speedContainer.classList.add("ez-ptz-speed-container"),_this._$speedContainer.innerHTML='\n <div class="ez-ptz-speed-progress" title="'+_this.locale.PTZ_SPEED+'">\n <div class="ez-ptz-speed-progress-line">\n <div class="ez-ptz-speed-progress-line-dot '+(1===_this.speed?"ez-ptz-speed-active":"")+'" data-id="slow" data-index="1" data-value="1"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(3===_this.speed?"ez-ptz-speed-active":"")+'" data-id="mid" data-index="2" data-value="3"></div>\n <div class="ez-ptz-speed-progress-line-dot '+(7===_this.speed?"ez-ptz-speed-active":"")+'" data-id="fast" data-index="3" data-value="7"></div>\n </div>\n <div class="ez-ptz-speed-progress-points">\n <div class="ez-ptz-speed-progress-points-slow">\n '+_this.locale.PTZ_SLOW+'\n </div>\n <div class="ez-ptz-speed-progress-points-mid">\n '+_this.locale.PTZ_MID+'\n </div>\n <div class="ez-ptz-speed-progress-points-fast">\n '+_this.locale.PTZ_FAST+"\n </div>\n </div>\n </div>\n ",_this._$wrapper.appendChild(_this._$speedContainer),_this._$btnContainer=document.createElement("div"),_this._$btnContainer.classList.add("ez-ptz-btn-container"),_this._$btnContainer.innerHTML='\n <div class="ez-ptz-btn-zoom" title="'+_this.locale.DEVICE_ZOOM+'" style="user-select: none;">\n <div class="ez-ptz-btn-zoom-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M563.2 198.4c179.2 0 326.4 147.2 326.4 326.4s-147.2 326.4-326.4 326.4S230.4 704 230.4 524.8s147.2-326.4 332.8-326.4z m0 64c-147.2 0-262.4 115.2-262.4 262.4s115.2 262.4 262.4 262.4 262.4-115.2 262.4-262.4S704 262.4 563.2 262.4z" fill="#ffffff"></path>\n <path d="M691.2 556.8H428.8c-19.2 0-32-12.8-32-32s12.8-32 32-32h262.4c19.2 0 32 12.8 32 32s-12.8 32-32 32z" fill="#ffffff">\n </path>\n <path d="M556.8 691.2c-19.2 0-32-12.8-32-32V396.8c0-19.2 12.8-32 32-32s32 12.8 32 32v262.4c0 19.2-12.8 32-32 32z" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-zoom-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M569.6 838.4c-172.8 0-307.2-140.8-307.2-307.2s140.8-307.2 307.2-307.2 307.2 140.8 307.2 307.2-140.8 307.2-307.2 307.2z m0-64c134.4 0 249.6-108.8 249.6-249.6S704 281.6 569.6 281.6 320 396.8 320 531.2s108.8 243.2 249.6 243.2z" fill="#ffffff"></path>\n <path d="M691.2 563.2H448c-19.2 0-32-12.8-32-32s12.8-38.4 32-38.4h249.6c19.2 0 32 12.8 32 32s-19.2 38.4-38.4 38.4z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n <div class="ez-ptz-btn-focal" title="'+_this.locale.DEVICE_FOCUS+'" style="user-select: none;">\n <div class="ez-ptz-btn-focal-add" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M646.4 825.6H320c-44.8 0-83.2-38.4-83.2-83.2V409.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6zM320 390.4c-12.8 0-19.2 6.4-19.2 19.2v326.4c0 12.8 6.4 19.2 19.2 19.2h326.4c12.8 0 19.2-6.4 19.2-19.2V409.6c0-12.8-6.4-19.2-19.2-19.2H320z" fill="#ffffff"></path>\n <path d="M396.8 358.4V281.6c0-25.6 25.6-51.2 51.2-51.2h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H704l-6.4-268.8" fill="#ffffff"></path>\n </svg>\n </div>\n <div class="ez-ptz-btn-focal-sub" style="user-select: none;">\n <svg viewBox="0 0 1088 1024" version="1.1" width="20" height="20">\n <path d="M320 358.4h326.4c25.6 0 51.2 25.6 51.2 51.2v326.4c0 25.6-25.6 51.2-51.2 51.2H320c-25.6 0-51.2-25.6-51.2-51.2V409.6c0-25.6 25.6-51.2 51.2-51.2z" fill="#ffffff"></path>\n <path d="M774.4 697.6H704c-19.2 0-32-12.8-32-32s12.8-32 32-32h70.4c12.8 0 19.2-6.4 19.2-19.2V281.6c0-12.8-6.4-19.2-19.2-19.2H448c-12.8 0-19.2 6.4-19.2 19.2v70.4c0 19.2-12.8 32-32 32s-32-12.8-32-25.6V281.6c0-44.8 38.4-83.2 83.2-83.2h326.4c44.8 0 83.2 38.4 83.2 83.2v326.4c0 51.2-38.4 89.6-83.2 89.6z" fill="#ffffff"></path>\n </svg>\n </div>\n </div>\n ',_this._$wrapper.appendChild(_this._$btnContainer),container.appendChild(_this._$wrapper),_this._$directionCircleContainer.onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._$directionCircleContainer.ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"start");},_this._$directionCircleContainer.ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handlePtzTouch(e,"stop");},_this._onSwitchSpeed=function(e){var list=Array.from(_this._$speedContainer.querySelectorAll(".ez-ptz-speed-progress-line-dot"));if(list.includes(e.target)&&!e.target.classList.contains("ez-ptz-speed-active")){list.forEach(function(item){item===e.target?item.classList.add("ez-ptz-speed-active"):item.classList.remove("ez-ptz-speed-active");});var value=e.target.getAttribute("data-value"),index=e.target.getAttribute("data-index");_this.speed=+value,null==_this.options.onSpeedChange||_this.options.onSpeedChange.call(_this.options,+index);}},_this._$speedContainer.onmouseup=_this._onSwitchSpeed,_this._isMobile&&(_this._$speedContainer.ontouchend=_this._onSwitchSpeed),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmousedown=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").onmouseup=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");}),_this._isMobile&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-zoom-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("zoom","sub","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-add").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","add","stop");}),_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub")&&(_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchstart=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","start");},_this._$btnContainer.querySelector(".ez-ptz-btn-focal-sub").ontouchend=function(e){e.preventDefault(),e.stopPropagation(),_this._handleBtnTouch("focal","sub","stop");})),_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$k(subClass,superClass);}(Ptz,BasePtz);var _proto=Ptz.prototype;return _proto.destroy=function(){this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer&&(this._$directionCircleContainer.remove(),this._$directionCircleContainer=null),this._$speedContainer&&(this._onSwitchSpeed=null,this._$speedContainer.remove(),this._$speedContainer=null),this._$btnContainer&&(this._$btnContainer.remove(),this._$btnContainer=null),this._$wrapper&&(this._$wrapper.remove(),this._$wrapper=null),BasePtz.prototype.destroy.call(this);},_proto._handlePtzTouch=function(e,type){var _this_options_token_deviceToken,_this_options_token,_this_options_env,_this_options_token_deviceToken1,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token.deviceToken)?void 0:_this_options_token_deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzQueue||(this._ptzQueue=Promise.resolve());var container=this._$directionCircleContainer.getBoundingClientRect(),containerCenterX=container.left+(this._$directionCircleContainer.clientWidth+2)/2,containerCenterY=container.top+(this._$directionCircleContainer.clientHeight+2)/2,eventX=e.x||e.changedTouches[0].clientX,eventY=e.y||e.changedTouches[0].clientY,direction=0,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken1=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken1.video),backDeg=0;function getAreaId(x,y){var rad=Math.atan2(y,x);rad<0&&(rad+=2*Math.PI);var deg=rad*(180/Math.PI)-225-12.5;return deg<0&&(deg+=360),Math.floor(deg/45)+1}var _this_options_env1,left=eventX-containerCenterX,top=eventY-containerCenterY;if(this.isRotate)switch(getAreaId(left,top)){case 1:direction=2,backDeg=90;break;case 2:direction=4,backDeg=135;break;case 3:direction=0,backDeg=180;break;case 4:direction=6,backDeg=225;break;case 5:direction=3,backDeg=270;break;case 6:direction=7,backDeg=315;break;case 7:direction=1,backDeg=0;break;case 8:direction=5,backDeg=45;}else switch(getAreaId(left,top)){case 1:direction=0,backDeg=180;break;case 2:direction=6,backDeg=225;break;case 3:direction=3,backDeg=270;break;case 4:direction=7,backDeg=315;break;case 5:direction=1,backDeg=0;break;case 6:direction=5,backDeg=45;break;case 7:direction=2,backDeg=90;break;case 8:direction=4,backDeg=135;}(this._clearTimer&&(clearTimeout(this._clearTimer),this._clearTimer=null),this._$directionCircleContainer.style.cssText="start"===type?"background-image:linear-gradient("+backDeg+"deg, #4277FF 0%, rgba(100,143,252,0.00) 30%)":"","stop"===type)&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{areaId:getAreaId(left,top),direction:direction,backDeg:backDeg,isRotate:this.isRotate,speed:this.speed,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzQueue=this._ptzQueue.then(function(){return _async_to_generator$5(function(){var _this;return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return _this=this,[4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){var _rt_result;null==operationResultCb||operationResultCb(rt);var code=rt.code||(null==rt||null==(_rt_result=rt.result)?void 0:_rt_result.code);return [6e4,60001,60002,60003,60004,60005,60006,10002].includes(+code)&&(_this._$directionCircleContainer.style.cssText="background-image:linear-gradient("+backDeg+"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)"),rt}).catch(function(err){}).finally(function(){operationResultCb=null,"stop"===type&&(_this._clearTimer=setTimeout(function(){_this._$directionCircleContainer.style.cssText="";},1e3));})];case 1:return [2,_state.sent()]}})}).call(_this)}),"stop"===type&&(this._ptzQueue=this._ptzQueue.finally(function(){}));},_proto._handleBtnTouch=function(btn,option,type){var _this_options_token,_this_options_env,_this_options_token_deviceToken,_this_options_token1,_this=this;if(!this.options.accessToken&&!(null==(_this_options_token=this.options.token)?void 0:_this_options_token.deviceToken.video))throw new Error("Ptz accessToken or token.deviceToken.video is required");this._ptzOperation||(this._ptzOperation=Promise.resolve());var direction=8;direction="zoom"===btn?"add"===option?8:9:"add"===option?10:11;var _this_options_env1,url=(null==(_this_options_env=this.options.env)?void 0:_this_options_env.domain)+"/api/lapp/device/ptz/start",token=this.options.accessToken||(null==(_this_options_token1=this.options.token)||null==(_this_options_token_deviceToken=_this_options_token1.deviceToken)?void 0:_this_options_token_deviceToken.video);"stop"===type&&(url=(null==(_this_options_env1=this.options.env)?void 0:_this_options_env1.domain)+"/api/lapp/device/ptz/stop");var operationResultCb=null==this.options.onDirection?void 0:this.options.onDirection.call(this.options,{btn:btn,option:option,type:type}),data=new FormData;data.append("deviceSerial",this.options.deviceSerial+""),data.append("channelNo",this.options.channelNo+""),data.append("speed",this.speed+""),data.append("direction",direction+""),data.append("accessToken",token),this._ptzOperation=this._ptzOperation.then(function(){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,fetch(url,{method:"POST",body:data}).then(function(response){return _async_to_generator$5(function(){return _ts_generator$5(this,function(_state){switch(_state.label){case 0:return [4,response.json()];case 1:return [2,_state.sent()]}})})()}).then(function(rt){return null==operationResultCb||operationResultCb(rt),rt}).catch(function(err){}).finally(function(){operationResultCb=null;})];case 1:return [2,_state.sent()]}})})()}),"stop"===type&&(this._ptzOperation=this._ptzOperation.finally(function(){_this._ptzOperation=null;}));},_create_class$9(Ptz,[{key:"isRotate",get:function(){return this._isRotate},set:function(isRotate){this._isRotate=isRotate;}}]),Ptz}(BasePtz);
7363
7465
 
7364
7466
  function _defineProperties$4(target, props) {
7365
7467
  for(var i = 0; i < props.length; i++){
@@ -7374,8 +7476,8 @@
7374
7476
  if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
7375
7477
  return Constructor;
7376
7478
  }
7377
- function _extends$f() {
7378
- _extends$f = Object.assign || function(target) {
7479
+ function _extends$i() {
7480
+ _extends$i = Object.assign || function(target) {
7379
7481
  for(var i = 1; i < arguments.length; i++){
7380
7482
  var source = arguments[i];
7381
7483
  for(var key in source){
@@ -7386,9 +7488,9 @@
7386
7488
  }
7387
7489
  return target;
7388
7490
  };
7389
- return _extends$f.apply(this, arguments);
7491
+ return _extends$i.apply(this, arguments);
7390
7492
  }
7391
- function _inherits$e(subClass, superClass) {
7493
+ function _inherits$h(subClass, superClass) {
7392
7494
  if (typeof superClass !== "function" && superClass !== null) {
7393
7495
  throw new TypeError("Super expression must either be null or a function");
7394
7496
  }
@@ -7399,23 +7501,23 @@
7399
7501
  configurable: true
7400
7502
  }
7401
7503
  });
7402
- if (superClass) _set_prototype_of$g(subClass, superClass);
7504
+ if (superClass) _set_prototype_of$j(subClass, superClass);
7403
7505
  }
7404
- function _set_prototype_of$g(o, p) {
7405
- _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7506
+ function _set_prototype_of$j(o, p) {
7507
+ _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7406
7508
  o.__proto__ = p;
7407
7509
  return o;
7408
7510
  };
7409
- return _set_prototype_of$g(o, p);
7511
+ return _set_prototype_of$j(o, p);
7410
7512
  }
7411
7513
  /**
7412
7514
  * 云台控件
7413
7515
  * @category Control
7414
7516
  */ var Ptz = /*#__PURE__*/ function(Control) {
7415
- _inherits$e(Ptz, Control);
7517
+ _inherits$h(Ptz, Control);
7416
7518
  function Ptz(options) {
7417
7519
  var _this;
7418
- _this = Control.call(this, _extends$f({}, options, {
7520
+ _this = Control.call(this, _extends$i({}, options, {
7419
7521
  tagName: 'span',
7420
7522
  controlType: 'button',
7421
7523
  classNameSuffix: 'ptz'
@@ -7458,7 +7560,7 @@
7458
7560
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
7459
7561
  this.$panel.appendChild(this.$turntable);
7460
7562
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7461
- this._ptzControl = new Ptz$1(this.$turntable, _extends$f({}, this._options, {
7563
+ this._ptzControl = new Ptz$1(this.$turntable, _extends$i({}, this._options, {
7462
7564
  onSpeedChange: this._onSpeedChange.bind(this),
7463
7565
  onDirection: this._onDirection.bind(this)
7464
7566
  }));
@@ -7467,7 +7569,7 @@
7467
7569
  };
7468
7570
  _proto.renderMobileExtend = function renderMobileExtend($container) {
7469
7571
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7470
- if (!this._ptzControl1) this._ptzControl1 = new MobilePtz($container, _extends$f({}, this._options, {
7572
+ if (!this._ptzControl1) this._ptzControl1 = new MobilePtz($container, _extends$i({}, this._options, {
7471
7573
  onSpeedChange: this._onSpeedChange.bind(this),
7472
7574
  onDirection: this._onDirection.bind(this)
7473
7575
  }));
@@ -7570,8 +7672,8 @@
7570
7672
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
7571
7673
  return Constructor;
7572
7674
  }
7573
- function _extends$e() {
7574
- _extends$e = Object.assign || function(target) {
7675
+ function _extends$h() {
7676
+ _extends$h = Object.assign || function(target) {
7575
7677
  for(var i = 1; i < arguments.length; i++){
7576
7678
  var source = arguments[i];
7577
7679
  for(var key in source){
@@ -7582,9 +7684,9 @@
7582
7684
  }
7583
7685
  return target;
7584
7686
  };
7585
- return _extends$e.apply(this, arguments);
7687
+ return _extends$h.apply(this, arguments);
7586
7688
  }
7587
- function _inherits$d(subClass, superClass) {
7689
+ function _inherits$g(subClass, superClass) {
7588
7690
  if (typeof superClass !== "function" && superClass !== null) {
7589
7691
  throw new TypeError("Super expression must either be null or a function");
7590
7692
  }
@@ -7595,14 +7697,14 @@
7595
7697
  configurable: true
7596
7698
  }
7597
7699
  });
7598
- if (superClass) _set_prototype_of$f(subClass, superClass);
7700
+ if (superClass) _set_prototype_of$i(subClass, superClass);
7599
7701
  }
7600
- function _set_prototype_of$f(o, p) {
7601
- _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7702
+ function _set_prototype_of$i(o, p) {
7703
+ _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7602
7704
  o.__proto__ = p;
7603
7705
  return o;
7604
7706
  };
7605
- return _set_prototype_of$f(o, p);
7707
+ return _set_prototype_of$i(o, p);
7606
7708
  }
7607
7709
  var RECORD_DEFAULT_OPTIONS = {
7608
7710
  maxDuration: 3600
@@ -7616,10 +7718,10 @@
7616
7718
  * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
7617
7719
  * @category Control
7618
7720
  */ var Record = /*#__PURE__*/ function(Control) {
7619
- _inherits$d(Record, Control);
7721
+ _inherits$g(Record, Control);
7620
7722
  function Record(options) {
7621
7723
  var _this;
7622
- _this = Control.call(this, _extends$e({}, options, {
7724
+ _this = Control.call(this, _extends$h({}, options, {
7623
7725
  tagName: 'span',
7624
7726
  controlType: 'button',
7625
7727
  classNameSuffix: 'record'
@@ -7760,8 +7862,8 @@
7760
7862
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
7761
7863
  return Constructor;
7762
7864
  }
7763
- function _extends$d() {
7764
- _extends$d = Object.assign || function(target) {
7865
+ function _extends$g() {
7866
+ _extends$g = Object.assign || function(target) {
7765
7867
  for(var i = 1; i < arguments.length; i++){
7766
7868
  var source = arguments[i];
7767
7869
  for(var key in source){
@@ -7772,9 +7874,9 @@
7772
7874
  }
7773
7875
  return target;
7774
7876
  };
7775
- return _extends$d.apply(this, arguments);
7877
+ return _extends$g.apply(this, arguments);
7776
7878
  }
7777
- function _inherits$c(subClass, superClass) {
7879
+ function _inherits$f(subClass, superClass) {
7778
7880
  if (typeof superClass !== "function" && superClass !== null) {
7779
7881
  throw new TypeError("Super expression must either be null or a function");
7780
7882
  }
@@ -7785,14 +7887,14 @@
7785
7887
  configurable: true
7786
7888
  }
7787
7889
  });
7788
- if (superClass) _set_prototype_of$e(subClass, superClass);
7890
+ if (superClass) _set_prototype_of$h(subClass, superClass);
7789
7891
  }
7790
- function _set_prototype_of$e(o, p) {
7791
- _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7892
+ function _set_prototype_of$h(o, p) {
7893
+ _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7792
7894
  o.__proto__ = p;
7793
7895
  return o;
7794
7896
  };
7795
- return _set_prototype_of$e(o, p);
7897
+ return _set_prototype_of$h(o, p);
7796
7898
  }
7797
7899
  function _ts_generator$4(thisArg, body) {
7798
7900
  var f, y, t, _ = {
@@ -7894,10 +7996,10 @@
7894
7996
  *
7895
7997
  * @category Control
7896
7998
  */ var Talk = /*#__PURE__*/ function(Control) {
7897
- _inherits$c(Talk, Control);
7999
+ _inherits$f(Talk, Control);
7898
8000
  function Talk(options) {
7899
8001
  var _this;
7900
- _this = Control.call(this, _extends$d({}, options, {
8002
+ _this = Control.call(this, _extends$g({}, options, {
7901
8003
  tagName: 'span',
7902
8004
  controlType: 'button',
7903
8005
  classNameSuffix: 'talk'
@@ -8030,8 +8132,8 @@
8030
8132
  });
8031
8133
  };
8032
8134
  }
8033
- function _extends$c() {
8034
- _extends$c = Object.assign || function(target) {
8135
+ function _extends$f() {
8136
+ _extends$f = Object.assign || function(target) {
8035
8137
  for(var i = 1; i < arguments.length; i++){
8036
8138
  var source = arguments[i];
8037
8139
  for(var key in source){
@@ -8042,9 +8144,9 @@
8042
8144
  }
8043
8145
  return target;
8044
8146
  };
8045
- return _extends$c.apply(this, arguments);
8147
+ return _extends$f.apply(this, arguments);
8046
8148
  }
8047
- function _inherits$b(subClass, superClass) {
8149
+ function _inherits$e(subClass, superClass) {
8048
8150
  if (typeof superClass !== "function" && superClass !== null) {
8049
8151
  throw new TypeError("Super expression must either be null or a function");
8050
8152
  }
@@ -8055,14 +8157,14 @@
8055
8157
  configurable: true
8056
8158
  }
8057
8159
  });
8058
- if (superClass) _set_prototype_of$d(subClass, superClass);
8160
+ if (superClass) _set_prototype_of$g(subClass, superClass);
8059
8161
  }
8060
- function _set_prototype_of$d(o, p) {
8061
- _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8162
+ function _set_prototype_of$g(o, p) {
8163
+ _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8062
8164
  o.__proto__ = p;
8063
8165
  return o;
8064
8166
  };
8065
- return _set_prototype_of$d(o, p);
8167
+ return _set_prototype_of$g(o, p);
8066
8168
  }
8067
8169
  function _ts_generator$3(thisArg, body) {
8068
8170
  var f, y, t, _ = {
@@ -8162,10 +8264,10 @@
8162
8264
  *
8163
8265
  * @category Control
8164
8266
  */ var Broadcast = /*#__PURE__*/ function(Control) {
8165
- _inherits$b(Broadcast, Control);
8267
+ _inherits$e(Broadcast, Control);
8166
8268
  function Broadcast(options) {
8167
8269
  var _this;
8168
- _this = Control.call(this, _extends$c({}, options, {
8270
+ _this = Control.call(this, _extends$f({}, options, {
8169
8271
  tagName: 'span',
8170
8272
  controlType: 'button',
8171
8273
  classNameSuffix: 'broadcast'
@@ -8260,8 +8362,8 @@
8260
8362
  });
8261
8363
  };
8262
8364
  }
8263
- function _extends$b() {
8264
- _extends$b = Object.assign || function(target) {
8365
+ function _extends$e() {
8366
+ _extends$e = Object.assign || function(target) {
8265
8367
  for(var i = 1; i < arguments.length; i++){
8266
8368
  var source = arguments[i];
8267
8369
  for(var key in source){
@@ -8272,9 +8374,9 @@
8272
8374
  }
8273
8375
  return target;
8274
8376
  };
8275
- return _extends$b.apply(this, arguments);
8377
+ return _extends$e.apply(this, arguments);
8276
8378
  }
8277
- function _inherits$a(subClass, superClass) {
8379
+ function _inherits$d(subClass, superClass) {
8278
8380
  if (typeof superClass !== "function" && superClass !== null) {
8279
8381
  throw new TypeError("Super expression must either be null or a function");
8280
8382
  }
@@ -8285,14 +8387,14 @@
8285
8387
  configurable: true
8286
8388
  }
8287
8389
  });
8288
- if (superClass) _set_prototype_of$c(subClass, superClass);
8390
+ if (superClass) _set_prototype_of$f(subClass, superClass);
8289
8391
  }
8290
- function _set_prototype_of$c(o, p) {
8291
- _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8392
+ function _set_prototype_of$f(o, p) {
8393
+ _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8292
8394
  o.__proto__ = p;
8293
8395
  return o;
8294
8396
  };
8295
- return _set_prototype_of$c(o, p);
8397
+ return _set_prototype_of$f(o, p);
8296
8398
  }
8297
8399
  function _ts_generator$2(thisArg, body) {
8298
8400
  var f, y, t, _ = {
@@ -8392,10 +8494,10 @@
8392
8494
  *
8393
8495
  * @category Control
8394
8496
  */ var AIChat = /*#__PURE__*/ function(Control) {
8395
- _inherits$a(AIChat, Control);
8497
+ _inherits$d(AIChat, Control);
8396
8498
  function AIChat(options) {
8397
8499
  var _this;
8398
- _this = Control.call(this, _extends$b({}, options, {
8500
+ _this = Control.call(this, _extends$e({}, options, {
8399
8501
  tagName: 'span',
8400
8502
  controlType: 'button',
8401
8503
  classNameSuffix: 'aichat'
@@ -8461,6 +8563,348 @@
8461
8563
  return AIChat;
8462
8564
  }(Control);
8463
8565
 
8566
+ function _extends$d() {
8567
+ _extends$d = Object.assign || function(target) {
8568
+ for(var i = 1; i < arguments.length; i++){
8569
+ var source = arguments[i];
8570
+ for(var key in source){
8571
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8572
+ target[key] = source[key];
8573
+ }
8574
+ }
8575
+ }
8576
+ return target;
8577
+ };
8578
+ return _extends$d.apply(this, arguments);
8579
+ }
8580
+ function _inherits$c(subClass, superClass) {
8581
+ if (typeof superClass !== "function" && superClass !== null) {
8582
+ throw new TypeError("Super expression must either be null or a function");
8583
+ }
8584
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8585
+ constructor: {
8586
+ value: subClass,
8587
+ writable: true,
8588
+ configurable: true
8589
+ }
8590
+ });
8591
+ if (superClass) _set_prototype_of$e(subClass, superClass);
8592
+ }
8593
+ function _set_prototype_of$e(o, p) {
8594
+ _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8595
+ o.__proto__ = p;
8596
+ return o;
8597
+ };
8598
+ return _set_prototype_of$e(o, p);
8599
+ }
8600
+ /**
8601
+ * 直播按钮控件
8602
+ *
8603
+ * 点击切换到直播模式
8604
+ *
8605
+ * @category Control
8606
+ */ var Live = /*#__PURE__*/ function(Control) {
8607
+ _inherits$c(Live, Control);
8608
+ function Live(options) {
8609
+ var _this;
8610
+ var _this___options_props1;
8611
+ _this = Control.call(this, _extends$d({}, options, {
8612
+ tagName: 'span',
8613
+ controlType: 'button',
8614
+ classNameSuffix: 'live'
8615
+ })) || this;
8616
+ _this._options = options;
8617
+ _this._render();
8618
+ // H5 端不展示直播/回放切换按钮
8619
+ if (Utils.isMobile) {
8620
+ _this.$container.style.display = 'none';
8621
+ }
8622
+ // 初始化时根据当前播放模式确定激活状态
8623
+ _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
8624
+ return _this;
8625
+ }
8626
+ var _proto = Live.prototype;
8627
+ /**
8628
+ * 根据 urlInfo 同步激活状态
8629
+ * 在初始化和播放地址切换后调用
8630
+ */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8631
+ var shouldBeActive = !!(urlInfo && urlInfo.type === 'live');
8632
+ this.active = shouldBeActive;
8633
+ };
8634
+ _proto._render = function _render() {
8635
+ var _this_locale;
8636
+ this.$container.innerHTML = IconComponents.live({
8637
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_LIVE) || '直播'
8638
+ });
8639
+ };
8640
+ /**
8641
+ * 销毁
8642
+ */ _proto.destroy = function destroy() {
8643
+ Control.prototype.destroy.call(this);
8644
+ };
8645
+ /**
8646
+ * 点击 Control 会触发
8647
+ */ _proto._onControlClick = function _onControlClick(e) {
8648
+ var _this__options_onChange, _this__options;
8649
+ Control.prototype._onControlClick.call(this, e);
8650
+ // 已经是直播模式则不触发
8651
+ if (this.active) {
8652
+ return;
8653
+ }
8654
+ this.active = true;
8655
+ this.emit(EVENTS.control.liveChange);
8656
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options);
8657
+ };
8658
+ return Live;
8659
+ }(Control);
8660
+
8661
+ function _extends$c() {
8662
+ _extends$c = Object.assign || function(target) {
8663
+ for(var i = 1; i < arguments.length; i++){
8664
+ var source = arguments[i];
8665
+ for(var key in source){
8666
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8667
+ target[key] = source[key];
8668
+ }
8669
+ }
8670
+ }
8671
+ return target;
8672
+ };
8673
+ return _extends$c.apply(this, arguments);
8674
+ }
8675
+ function _inherits$b(subClass, superClass) {
8676
+ if (typeof superClass !== "function" && superClass !== null) {
8677
+ throw new TypeError("Super expression must either be null or a function");
8678
+ }
8679
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8680
+ constructor: {
8681
+ value: subClass,
8682
+ writable: true,
8683
+ configurable: true
8684
+ }
8685
+ });
8686
+ if (superClass) _set_prototype_of$d(subClass, superClass);
8687
+ }
8688
+ function _set_prototype_of$d(o, p) {
8689
+ _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8690
+ o.__proto__ = p;
8691
+ return o;
8692
+ };
8693
+ return _set_prototype_of$d(o, p);
8694
+ }
8695
+ /**
8696
+ * 回放下拉控件
8697
+ *
8698
+ * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
8699
+ *
8700
+ * @category Control
8701
+ */ var RecDropdown = /*#__PURE__*/ function(Control) {
8702
+ _inherits$b(RecDropdown, Control);
8703
+ function RecDropdown(options) {
8704
+ var _this;
8705
+ var _options_props, _this___options_props1;
8706
+ _this = Control.call(this, _extends$c({}, options, {
8707
+ tagName: 'span',
8708
+ controlType: 'button',
8709
+ classNameSuffix: 'rec-dropdown'
8710
+ })) || this;
8711
+ _this._options = options;
8712
+ // H5 端不展示直播/回放切换按钮
8713
+ if (Utils.isMobile) {
8714
+ _this.$container.style.display = 'none';
8715
+ }
8716
+ // 初始化时根据 urlInfo 确定当前回放类型和激活状态
8717
+ _this._recType = options.recType || ((_options_props = options.props) == null ? void 0 : _options_props.recType) || 'cloudRec';
8718
+ _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
8719
+ _this._render();
8720
+ _this._initPicker();
8721
+ return _this;
8722
+ }
8723
+ var _proto = RecDropdown.prototype;
8724
+ /**
8725
+ * 根据 urlInfo 同步激活状态和回放类型
8726
+ * 在初始化和播放地址切换后调用
8727
+ */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
8728
+ if (urlInfo && urlInfo.type === 'rec') {
8729
+ var _urlInfo_searchParams1;
8730
+ this.active = true;
8731
+ if (urlInfo.recType === 'cloud' && ((_urlInfo_searchParams1 = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams1.busType) === '7') {
8732
+ this._recType = 'cloudRecord';
8733
+ } else if (urlInfo.recType === 'cloud') {
8734
+ this._recType = 'cloudRec';
8735
+ } else {
8736
+ this._recType = 'rec';
8737
+ }
8738
+ this._activeOption(this._recType);
8739
+ } else {
8740
+ this.active = false;
8741
+ }
8742
+ };
8743
+ _proto._render = function _render() {
8744
+ var _this_locale;
8745
+ this.$container.innerHTML = IconComponents.recDropdown({
8746
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_REC_DROPDOWN) || '回放'
8747
+ });
8748
+ };
8749
+ _proto._initPicker = function _initPicker() {
8750
+ var _this = this;
8751
+ this._picker = new Picker(this.$container, {
8752
+ getPopupContainer: function() {
8753
+ return Utils.isMobile ? _this.__options.rootContainer : _this.$container;
8754
+ },
8755
+ trigger: Utils.isMobile ? 'click' : 'hover',
8756
+ isMobile: Utils.isMobile,
8757
+ wrapClassName: "" + PREFIX_CLASS + "-rec-dropdown-picker",
8758
+ placement: 'bottom',
8759
+ offset: [
8760
+ 0,
8761
+ 4
8762
+ ]
8763
+ });
8764
+ this._picker.innerHTML(this._getPanelHTML());
8765
+ this._activeOption(this._recType);
8766
+ this._bindPanelEvents();
8767
+ };
8768
+ _proto._getPanelHTML = function _getPanelHTML() {
8769
+ var _this_locale, _this_locale1, _this_locale2;
8770
+ var cloudRecLabel = ((_this_locale = this.locale) == null ? void 0 : _this_locale.REC_DROPDOWN_CLOUD_REC) || '云存储';
8771
+ var cloudRecordLabel = ((_this_locale1 = this.locale) == null ? void 0 : _this_locale1.REC_DROPDOWN_CLOUD_RECORD) || '云录制';
8772
+ var localRecLabel = ((_this_locale2 = this.locale) == null ? void 0 : _this_locale2.REC_DROPDOWN_LOCAL_REC) || '本地回放';
8773
+ return '<div class="' + PREFIX_CLASS + '-rec-dropdown-panel">\n <ul class="' + PREFIX_CLASS + '-rec-dropdown-list">\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRec">\n <span>' + cloudRecLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRecord">\n <span>' + cloudRecordLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="rec">\n <span>' + localRecLabel + "</span>\n </li>\n </ul>\n </div>";
8774
+ };
8775
+ _proto._bindPanelEvents = function _bindPanelEvents() {
8776
+ var _this = this;
8777
+ this._delegation = delegate(this._picker.$body, "." + PREFIX_CLASS + "-rec-dropdown-item", 'click', function(e) {
8778
+ e.stopPropagation();
8779
+ var type = e.delegateTarget.getAttribute('data-type');
8780
+ if (type) {
8781
+ var _this__options_onChange, _this__options;
8782
+ _this._recType = type;
8783
+ _this._activeOption(type);
8784
+ // 设置自身为激活状态
8785
+ _this.active = true;
8786
+ _this.emit(EVENTS.control.recDropdownChange, type);
8787
+ (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, type);
8788
+ _this._picker.open = false;
8789
+ }
8790
+ });
8791
+ };
8792
+ _proto._activeOption = function _activeOption(type) {
8793
+ var _this__picker;
8794
+ if ((_this__picker = this._picker) == null ? void 0 : _this__picker.$body) {
8795
+ var items = this._picker.$body.querySelectorAll("." + PREFIX_CLASS + "-rec-dropdown-item");
8796
+ items.forEach(function(item) {
8797
+ item.classList.remove("" + PREFIX_CLASS + "-active");
8798
+ });
8799
+ var target = this._picker.$body.querySelector("." + PREFIX_CLASS + '-rec-dropdown-item[data-type="' + type + '"]');
8800
+ target == null ? void 0 : target.classList.add("" + PREFIX_CLASS + "-active");
8801
+ }
8802
+ };
8803
+ /**
8804
+ * 销毁
8805
+ */ _proto.destroy = function destroy() {
8806
+ var _this__delegation_destroy, _this__delegation;
8807
+ (_this__delegation = this._delegation) == null ? void 0 : (_this__delegation_destroy = _this__delegation.destroy) == null ? void 0 : _this__delegation_destroy.call(_this__delegation);
8808
+ this._delegation = null;
8809
+ if (this._picker) {
8810
+ this._picker.destroy();
8811
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8812
+ this._picker = null;
8813
+ }
8814
+ Control.prototype.destroy.call(this);
8815
+ };
8816
+ /**
8817
+ * 点击 Control 会触发(移动端 click 触发 picker)
8818
+ */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8819
+ _proto._onControlClick = function _onControlClick(_e) {
8820
+ // picker 自行处理 click/hover,这里不额外处理
8821
+ };
8822
+ return RecDropdown;
8823
+ }(Control);
8824
+
8825
+ function _extends$b() {
8826
+ _extends$b = Object.assign || function(target) {
8827
+ for(var i = 1; i < arguments.length; i++){
8828
+ var source = arguments[i];
8829
+ for(var key in source){
8830
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8831
+ target[key] = source[key];
8832
+ }
8833
+ }
8834
+ }
8835
+ return target;
8836
+ };
8837
+ return _extends$b.apply(this, arguments);
8838
+ }
8839
+ function _inherits$a(subClass, superClass) {
8840
+ if (typeof superClass !== "function" && superClass !== null) {
8841
+ throw new TypeError("Super expression must either be null or a function");
8842
+ }
8843
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8844
+ constructor: {
8845
+ value: subClass,
8846
+ writable: true,
8847
+ configurable: true
8848
+ }
8849
+ });
8850
+ if (superClass) _set_prototype_of$c(subClass, superClass);
8851
+ }
8852
+ function _set_prototype_of$c(o, p) {
8853
+ _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8854
+ o.__proto__ = p;
8855
+ return o;
8856
+ };
8857
+ return _set_prototype_of$c(o, p);
8858
+ }
8859
+ /**
8860
+ * 告警消息按钮控件
8861
+ *
8862
+ * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
8863
+ *
8864
+ * @category Control
8865
+ */ var AlarmMessage = /*#__PURE__*/ function(Control) {
8866
+ _inherits$a(AlarmMessage, Control);
8867
+ function AlarmMessage(options) {
8868
+ var _this;
8869
+ _this = Control.call(this, _extends$b({}, options, {
8870
+ tagName: 'span',
8871
+ controlType: 'button',
8872
+ classNameSuffix: 'alarm-message'
8873
+ })) || this, _this._panelOpen = false;
8874
+ _this._options = options;
8875
+ _this._render();
8876
+ _this.on(EVENTS.alarmMessageChange, function(open) {
8877
+ _this._panelOpen = open;
8878
+ });
8879
+ return _this;
8880
+ }
8881
+ var _proto = AlarmMessage.prototype;
8882
+ _proto._render = function _render() {
8883
+ var _this_locale;
8884
+ this.$container.innerHTML = IconComponents.alarmMessage({
8885
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_ALARM_MESSAGE) || '消息'
8886
+ });
8887
+ };
8888
+ /**
8889
+ * 销毁
8890
+ */ _proto.destroy = function destroy() {
8891
+ if (this._panelOpen) {
8892
+ this.emit(EVENTS.control.alarmMessageChange, false);
8893
+ }
8894
+ Control.prototype.destroy.call(this);
8895
+ };
8896
+ /**
8897
+ * 点击 Control 会触发
8898
+ */ _proto._onControlClick = function _onControlClick(e) {
8899
+ var _this__options_onChange, _this__options;
8900
+ Control.prototype._onControlClick.call(this, e);
8901
+ this._panelOpen = !this._panelOpen;
8902
+ this.emit(EVENTS.control.alarmMessageChange, this._panelOpen);
8903
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this._panelOpen);
8904
+ };
8905
+ return AlarmMessage;
8906
+ }(Control);
8907
+
8464
8908
  function _defineProperties$1(target, props) {
8465
8909
  for(var i = 0; i < props.length; i++){
8466
8910
  var descriptor = props[i];
@@ -10009,6 +10453,9 @@
10009
10453
  talk: Talk,
10010
10454
  broadcast: Broadcast,
10011
10455
  aiChat: AIChat,
10456
+ live: Live,
10457
+ recDropdown: RecDropdown,
10458
+ alarmMessage: AlarmMessage,
10012
10459
  zoom: Zoom$1,
10013
10460
  definition: Definition,
10014
10461
  fullscreen: Fullscreen,
@@ -10542,7 +10989,10 @@
10542
10989
  // 需要权限的控件
10543
10990
  var AUTH_KEY = [
10544
10991
  'ptz',
10545
- 'aiChat'
10992
+ 'aiChat',
10993
+ 'live',
10994
+ 'recDropdown',
10995
+ 'alarmMessage'
10546
10996
  ];
10547
10997
  /**
10548
10998
  * 渲染控件
@@ -10622,7 +11072,7 @@
10622
11072
  }
10623
11073
  function _renderTheme(theme, data) {
10624
11074
  return _async_to_generator$1(function() {
10625
- var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1;
11075
+ var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_urlInfo, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_controls2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1, _theme_options;
10626
11076
  return _ts_generator$1(this, function(_state) {
10627
11077
  switch(_state.label){
10628
11078
  case 0:
@@ -10763,8 +11213,8 @@
10763
11213
  list = [].concat(((_filterThemeData_header = filterThemeData.header) == null ? void 0 : _filterThemeData_header.btnList) || [], (_filterThemeData_footer_btnList = (_filterThemeData_footer = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer.btnList) != null ? _filterThemeData_footer_btnList : []);
10764
11214
  // FIXME: 这个逻辑实际上是有问题的
10765
11215
  _needTimeLine = list.some(function(item) {
10766
- return REC_GROUP.includes(item.iconId);
10767
- });
11216
+ return REC_GROUP.includes(item.iconId) || item.iconId === 'recDropdown';
11217
+ }) && ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.type) === 'rec';
10768
11218
  theme.$container.classList.remove("" + PREFIX_CLASS + "-has-time-line");
10769
11219
  // PC 单独渲染timeLine
10770
11220
  if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
@@ -10797,6 +11247,23 @@
10797
11247
  if (REC_GROUP.includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
10798
11248
  });
10799
11249
  }
11250
+ // 移动端:在 rec 控件旁渲染 alarmMessage 按钮
11251
+ if (theme.options.alarmMessageOptions !== null && !((_theme_controls2 = theme.controls) == null ? void 0 : _theme_controls2['alarmMessageControl'])) {
11252
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
11253
+ theme.controls['alarmMessageControl'] = new Controls['alarmMessage'](_extends$1({
11254
+ rootContainer: theme.$container,
11255
+ getPopupContainer: function() {
11256
+ var _theme__mobileExtend;
11257
+ return (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight;
11258
+ },
11259
+ language: theme.options.language || 'zh',
11260
+ locales: theme.i18n.translations,
11261
+ sdkType: theme.options.sdkType,
11262
+ urlInfo: theme.urlInfo
11263
+ }, ((_theme_options = theme.options) == null ? void 0 : _theme_options.alarmMessageOptions) || {}, {
11264
+ props: props
11265
+ }));
11266
+ }
10800
11267
  if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('timeLine')) && _needTimeLine) {
10801
11268
  _renderTimeLine(theme, theme._mobileExtend.$content, props);
10802
11269
  }
@@ -10807,6 +11274,10 @@
10807
11274
  }
10808
11275
  theme.emit(EVENTS.control.mountedControls);
10809
11276
  if (!theme.playing) theme._disabled(true);
11277
+ // 同步 loading 状态(修复:_loadingControl 创建前设置的 loading=true 不生效的问题)
11278
+ if (theme._loading && theme._loadingControl) {
11279
+ theme._loadingControl.show();
11280
+ }
10810
11281
  _controlEventemitter(theme);
10811
11282
  return [
10812
11283
  2
@@ -12414,7 +12885,7 @@
12414
12885
  zh: zh,
12415
12886
  en: en
12416
12887
  };
12417
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.2-beta.1';
12888
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.2-beta.3';
12418
12889
 
12419
12890
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
12420
12891