@ezuikit/player-theme 2.1.0-beta.8 → 2.1.1-beta.1

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 v2.1.0-beta.8
3
- * Copyright (c) 2026-01-06 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.1.1-beta.1
3
+ * Copyright (c) 2026-02-05 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  (function (global, factory) {
@@ -488,6 +488,8 @@
488
488
  /** 控件开始录制 */ recordingChange: 'recordingChange',
489
489
  /** 对讲状态变化 */ talkingChange: 'talkingChange',
490
490
  /** 麦克风音量变化 */ talkVolumeChange: 'talkVolumeChange',
491
+ /** 语音广播状态变化 */ broadcastChange: 'broadcastChange',
492
+ /** AI对话框状态变化 */ aichatChange: 'aichatChange',
491
493
  /** 动态切换日志配置 */ setLoggerOptions: 'setLoggerOptions',
492
494
  records: 'records',
493
495
  ptzSpeedChange: 'ptzSpeedChange',
@@ -531,6 +533,10 @@
531
533
  /** 开始对讲 */ talkingChange: 'Control.talkingChange',
532
534
  /** 对讲错误, 一般是麦克风权限被拒绝 */ talkError: 'Control.talkError',
533
535
  /** 对讲控件销毁 */ talkDestroy: 'Control.talkDestroy',
536
+ /** 语音广播状态变化 */ broadcastChange: 'Control.broadcastChange',
537
+ /** 语音广播控件销毁 */ broadcastDestroy: 'Control.broadcastDestroy',
538
+ /** AI对话框状态变化 */ aichatChange: 'Control.aichatChange',
539
+ /** AI对话框控件销毁 */ aichatDestroy: 'Control.aichatDestroy',
534
540
  /** 缩放比例改变 */ zoomChange: 'Control.zoomChange',
535
541
  /** 音量调节面板 展示隐藏变换 */ zoomPanelOpenChange: 'Control.zoomPanelOpenChange',
536
542
  /** 缩放控件销毁 */ zoomDestroy: 'Control.zoomDestroy',
@@ -582,7 +588,7 @@
582
588
  if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
583
589
  return Constructor;
584
590
  }
585
- function _inherits$r(subClass, superClass) {
591
+ function _inherits$t(subClass, superClass) {
586
592
  if (typeof superClass !== "function" && superClass !== null) {
587
593
  throw new TypeError("Super expression must either be null or a function");
588
594
  }
@@ -593,14 +599,14 @@
593
599
  configurable: true
594
600
  }
595
601
  });
596
- if (superClass) _set_prototype_of$r(subClass, superClass);
602
+ if (superClass) _set_prototype_of$t(subClass, superClass);
597
603
  }
598
- function _set_prototype_of$r(o, p) {
599
- _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
604
+ function _set_prototype_of$t(o, p) {
605
+ _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
600
606
  o.__proto__ = p;
601
607
  return o;
602
608
  };
603
- return _set_prototype_of$r(o, p);
609
+ return _set_prototype_of$t(o, p);
604
610
  }
605
611
  /**
606
612
  * 控件基类
@@ -614,7 +620,7 @@
614
620
  * const myControl = new MyControl({})
615
621
  * ```
616
622
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
617
- _inherits$r(Control, EventEmitter);
623
+ _inherits$t(Control, EventEmitter);
618
624
  function Control(options) {
619
625
  var _this;
620
626
  var _this___options;
@@ -789,8 +795,8 @@
789
795
  return Control;
790
796
  }(EventEmitter);
791
797
 
792
- function _extends$q() {
793
- _extends$q = Object.assign || function(target) {
798
+ function _extends$s() {
799
+ _extends$s = Object.assign || function(target) {
794
800
  for(var i = 1; i < arguments.length; i++){
795
801
  var source = arguments[i];
796
802
  for(var key in source){
@@ -801,9 +807,9 @@
801
807
  }
802
808
  return target;
803
809
  };
804
- return _extends$q.apply(this, arguments);
810
+ return _extends$s.apply(this, arguments);
805
811
  }
806
- function _inherits$q(subClass, superClass) {
812
+ function _inherits$s(subClass, superClass) {
807
813
  if (typeof superClass !== "function" && superClass !== null) {
808
814
  throw new TypeError("Super expression must either be null or a function");
809
815
  }
@@ -814,25 +820,25 @@
814
820
  configurable: true
815
821
  }
816
822
  });
817
- if (superClass) _set_prototype_of$q(subClass, superClass);
823
+ if (superClass) _set_prototype_of$s(subClass, superClass);
818
824
  }
819
- function _set_prototype_of$q(o, p) {
820
- _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
825
+ function _set_prototype_of$s(o, p) {
826
+ _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
821
827
  o.__proto__ = p;
822
828
  return o;
823
829
  };
824
- return _set_prototype_of$q(o, p);
830
+ return _set_prototype_of$s(o, p);
825
831
  }
826
832
  var LOADING_DEFAULT_OPTIONS = {};
827
833
  /**
828
834
  * 加载动画控件
829
835
  * @category Control
830
836
  */ var Loading = /*#__PURE__*/ function(Control) {
831
- _inherits$q(Loading, Control);
837
+ _inherits$s(Loading, Control);
832
838
  function Loading(options) {
833
839
  if (options === void 0) options = {};
834
840
  var _this;
835
- _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$q({}, options, {
841
+ _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$s({}, options, {
836
842
  tagName: 'div',
837
843
  controlType: 'block',
838
844
  classNameSuffix: 'loading'
@@ -870,8 +876,8 @@
870
876
  return Loading;
871
877
  }(Control);
872
878
 
873
- function _extends$p() {
874
- _extends$p = Object.assign || function(target) {
879
+ function _extends$r() {
880
+ _extends$r = Object.assign || function(target) {
875
881
  for(var i = 1; i < arguments.length; i++){
876
882
  var source = arguments[i];
877
883
  for(var key in source){
@@ -882,9 +888,9 @@
882
888
  }
883
889
  return target;
884
890
  };
885
- return _extends$p.apply(this, arguments);
891
+ return _extends$r.apply(this, arguments);
886
892
  }
887
- function _inherits$p(subClass, superClass) {
893
+ function _inherits$r(subClass, superClass) {
888
894
  if (typeof superClass !== "function" && superClass !== null) {
889
895
  throw new TypeError("Super expression must either be null or a function");
890
896
  }
@@ -895,14 +901,14 @@
895
901
  configurable: true
896
902
  }
897
903
  });
898
- if (superClass) _set_prototype_of$p(subClass, superClass);
904
+ if (superClass) _set_prototype_of$r(subClass, superClass);
899
905
  }
900
- function _set_prototype_of$p(o, p) {
901
- _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
906
+ function _set_prototype_of$r(o, p) {
907
+ _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
902
908
  o.__proto__ = p;
903
909
  return o;
904
910
  };
905
- return _set_prototype_of$p(o, p);
911
+ return _set_prototype_of$r(o, p);
906
912
  }
907
913
  // 不放在服务器上 是因为有可能http加载失败
908
914
  // prettier-ignore
@@ -914,11 +920,11 @@
914
920
  * 封面控件
915
921
  * @category Control
916
922
  */ var Poster = /*#__PURE__*/ function(Control) {
917
- _inherits$p(Poster, Control);
923
+ _inherits$r(Poster, Control);
918
924
  function Poster(options) {
919
925
  if (options === void 0) options = {};
920
926
  var _this;
921
- _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$p({}, options, {
927
+ _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$r({}, options, {
922
928
  tagName: 'div',
923
929
  controlType: 'block',
924
930
  classNameSuffix: 'poster'
@@ -1013,6 +1019,8 @@
1013
1019
  talkGrowth: function(prefix) {
1014
1020
  return '<svg width="1em" height="1em" viewBox="0 0 24 24" focusable="false" aria-hidden="true" data-icon="talk-growth">\n <g fill="currentColor" stroke="currentColor">\n <path stroke="none" d="M9.22313 18.9543C9.6588 18.9543 10.0189 19.2133 10.0759 19.5494L10.0837 19.6428L10.0837 21.7847C10.0837 22.1649 9.69841 22.4732 9.22313 22.4732C8.78745 22.4732 8.42739 22.2142 8.37041 21.8781L8.36255 21.7847L8.36255 19.6428C8.36255 19.2626 8.74784 18.9543 9.22313 18.9543Z" fill-rule="evenodd" />\n <path d="M16.5323 11.3779L16.5323 11.5872C16.5323 15.7472 13.1599 19.1197 8.99981 19.1197C4.83971 19.1197 1.46729 15.7472 1.46729 11.5872L1.46729 11.4335" fill-rule="evenodd" fill="none" stroke-width="1.5" />\n <path stroke="none" d="M4.07861 6.12978C4.07861 3.589 6.30476 1.5293 9.05085 1.5293C11.7969 1.5293 14.0231 3.589 14.0231 6.12978L14.0231 12.075C14.0231 14.6158 11.7969 16.6755 9.05085 16.6755C6.30476 16.6755 4.07861 14.6158 4.07861 12.075L4.07861 6.12978ZM5.57861 12.075L5.57861 6.12978C5.57861 5.94083 5.597 5.75561 5.63376 5.57412C5.67605 5.36539 5.74265 5.16158 5.83357 4.9627C5.86625 4.8912 5.90164 4.82121 5.93974 4.75272C6.09781 4.4685 6.30245 4.21019 6.55365 3.97777C6.64206 3.89597 6.73424 3.81921 6.83019 3.7475C7.0816 3.55959 7.3589 3.40632 7.66207 3.28767C7.79552 3.23545 7.93107 3.19114 8.06871 3.15475C8.38503 3.07111 8.71241 3.0293 9.05085 3.0293C9.38929 3.0293 9.71668 3.07112 10.033 3.15475C10.1706 3.19114 10.3062 3.23545 10.4396 3.28767C10.7428 3.40632 11.0201 3.55959 11.2715 3.74749C11.3675 3.81921 11.4596 3.89596 11.548 3.97777C11.7993 4.2102 12.0039 4.46853 12.162 4.75276C12.2001 4.82124 12.2354 4.89122 12.2681 4.9627C12.359 5.16157 12.4256 5.36536 12.4679 5.57407C12.5047 5.75558 12.5231 5.94082 12.5231 6.12978L12.5231 12.075C12.5231 12.264 12.5047 12.4492 12.4679 12.6307C12.4256 12.8394 12.359 13.0432 12.2681 13.2421C12.2355 13.3136 12.2001 13.3835 12.162 13.452C12.0039 13.7362 11.7993 13.9946 11.548 14.227C11.4596 14.3088 11.3675 14.3856 11.2715 14.4573C11.0201 14.6452 10.7428 14.7985 10.4396 14.9171C10.3062 14.9693 10.1706 15.0136 10.033 15.05C9.71667 15.1337 9.38929 15.1755 9.05085 15.1755C8.71241 15.1755 8.38503 15.1337 8.06871 15.05C7.93107 15.0136 7.79552 14.9693 7.66207 14.9171C7.3589 14.7985 7.0816 14.6452 6.83019 14.4573C6.73424 14.3856 6.64206 14.3088 6.55365 14.227C6.30244 13.9946 6.09779 13.7363 5.93972 13.452C5.90163 13.3836 5.86625 13.3136 5.83357 13.2421C5.74265 13.0432 5.67605 12.8394 5.63377 12.6307C5.597 12.4492 5.57861 12.264 5.57861 12.075Z" fill-rule="evenodd" />\n </g>\n <g class="' + prefix + '-icon-talk-growth-dot">\n <path class="' + prefix + '-icon-talk-growth-dot1" d="M19.1333 6.40039L22.8667 6.40039" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="' + prefix + '-icon-talk-growth-dot2" d="M19.1333 10.1338L21.9331 10.1338" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="' + prefix + '-icon-talk-growth-dot3" d="M19.1333 13.8672L20.9995 13.8672" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="' + prefix + '-icon-talk-growth-dot4" d="M19.1333 17.6001L20.0669 17.6001" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n </g>\n </svg>';
1015
1021
  },
1022
+ /** 语音广播 */ broadcast: '\n <svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" stroke="none" focusable="false" aria-hidden="true" data-icon="broadcast">\n <g>\n <path id="矢量 1" d="m8.52109,6.76609l6.17823,-2.91335c0.2485,-0.11718 0.5027,-0.19531 0.7627,-0.2351c0.2034,-0.03077 0.4104,-0.03809 0.6211,-0.02173c0.2092,0.01636 0.4116,0.05493 0.6069,0.11621c0.2278,0.07129 0.4461,0.1731 0.6548,0.30542c0.2087,0.13232 0.394,0.28638 0.5557,0.46216l0.0002,0l0,0c0.1384,0.15064 0.2598,0.31714 0.3638,0.49951c0.1047,0.18335 0.1865,0.37354 0.2451,0.57081c0.0752,0.25219 0.1128,0.51562 0.1128,0.79004l0,10.64651c0,0.2744 -0.0376,0.5379 -0.1128,0.7901l0,0c-0.0586,0.197 -0.1404,0.3874 -0.2451,0.5708c-0.104,0.1823 -0.2254,0.3488 -0.364,0.4995c-0.1617,0.1758 -0.347,0.3298 -0.5557,0.4621c-0.2087,0.1324 -0.427,0.2342 -0.6548,0.3054c-0.1953,0.0611 -0.3977,0.0999 -0.6069,0.1163c-0.2107,0.0163 -0.4175,0.009 -0.6209,-0.0218c-0.2602,-0.0398 -0.5144,-0.1181 -0.7629,-0.2351l-5.45044,-2.5703l0,2.759c0,0.1036 -0.01831,0.1995 -0.05494,0.2879c-0.03662,0.0886 -0.09155,0.1692 -0.16479,0.2424c-0.14624,0.1465 -0.32324,0.2197 -0.53027,0.2197l-2,0c-0.14209,0 -0.27344,-0.0373 -0.39429,-0.112c-0.12085,-0.0745 -0.21289,-0.1756 -0.27661,-0.3025l-1.99268,-3.9856c-0.06225,-0.0234 -0.12402,-0.0481 -0.18555,-0.074c-0.26953,-0.114 -0.52417,-0.2502 -0.7644,-0.4084c-0.26636,-0.1758 -0.51489,-0.3789 -0.74512,-0.6094c-0.23047,-0.2302 -0.43359,-0.4788 -0.60937,-0.7451c-0.1582,-0.2403 -0.29444,-0.4949 -0.40845,-0.7644c-0.11328,-0.2679 -0.20068,-0.5413 -0.26245,-0.8206l0,0c-0.07398,-0.3347 -0.11108,-0.6775 -0.11108,-1.0286c0,-0.351 0.0371,-0.6938 0.11108,-1.0285c0.06177,-0.2793 0.14917,-0.5528 0.26245,-0.8206c0.11401,-0.26953 0.25025,-0.52417 0.40845,-0.7644c0.17578,-0.26636 0.3789,-0.5149 0.60937,-0.74512c0.23023,-0.23047 0.47876,-0.4336 0.74512,-0.60938l0,0c0.24023,-0.1582 0.49487,-0.29444 0.7644,-0.40845c0.26783,-0.11328 0.54126,-0.20068 0.82056,-0.26245l0,0l0,0l0,0c0.33472,-0.07398 0.67749,-0.11109 1.02857,-0.11109l2.93872,0c0.02636,-0.0166 0.05444,-0.03198 0.08349,-0.04589zm0.72876,8.47948l6.08937,2.8716c0.1287,0.0606 0.2598,0.0987 0.3935,0.114c0.0772,0.0088 0.1551,0.0103 0.2337,0.0042c0.0857,-0.0068 0.1687,-0.0217 0.2495,-0.0452c0.1133,-0.0329 0.2219,-0.0822 0.3257,-0.1479c0.104,-0.0659 0.1948,-0.1431 0.2729,-0.2317c0.0554,-0.063 0.1045,-0.1318 0.147,-0.2063c0.0393,-0.0686 0.0713,-0.1397 0.0962,-0.2131c0.043,-0.1277 0.0647,-0.2625 0.0647,-0.4046l0,-10.64651c0,-0.14209 -0.0217,-0.2771 -0.0647,-0.40454c-0.0249,-0.07349 -0.0569,-0.14454 -0.0962,-0.21314c-0.0425,-0.07471 -0.0916,-0.14331 -0.147,-0.2063c-0.0781,-0.08862 -0.1689,-0.16577 -0.2729,-0.23169c-0.1038,-0.06567 -0.2124,-0.11523 -0.3257,-0.14795c-0.0808,-0.02344 -0.1638,-0.03833 -0.2495,-0.04517c-0.0786,-0.0061 -0.1565,-0.00463 -0.2337,0.00415c-0.1337,0.01539 -0.2648,0.05347 -0.3935,0.11402l-6.09034,2.87208l0.00097,7.16405zm13.58447,-7.9121l-2,1c-0.3757,0.18775 -0.8184,0.04029 -1.0063,-0.33545c-0.0552,-0.11035 -0.0813,-0.22656 -0.0813,-0.34033c0,-0.27344 0.1516,-0.53321 0.4167,-0.66602l2,-1c0.3757,-0.18775 0.8186,-0.04004 1.0064,0.33545c0.0551,0.11035 0.0813,0.22656 0.0813,0.34033c0,0.27368 -0.1514,0.53345 -0.4168,0.66602zm-15.08544,8.9785l-2.08667,0l1.30029,2.6006l0.78638,0l0,-2.6006zm0,-7.99998l-2.25,0c-0.24976,0 -0.49317,0.02734 -0.73023,0.08179c-0.18188,0.04174 -0.36011,0.09961 -0.53467,0.17334c-0.17944,0.07593 -0.34961,0.1665 -0.51049,0.27124c-0.18702,0.12231 -0.36133,0.26416 -0.52271,0.42554c-0.16138,0.16137 -0.30322,0.33569 -0.42554,0.52267c-0.10473,0.1609 -0.19531,0.3311 -0.27124,0.5105c-0.07373,0.1746 -0.13159,0.3528 -0.17334,0.5347c-0.05444,0.2371 -0.08178,0.4805 -0.08178,0.7302c0,0.2498 0.02734,0.4932 0.08178,0.7303c0.04175,0.1818 0.09961,0.3601 0.17334,0.5346c0.07593,0.1795 0.16651,0.3496 0.27124,0.5105c0.12232,0.187 0.26416,0.3614 0.42554,0.5227c0.16138,0.1614 0.33569,0.3033 0.52271,0.4256c0.16088,0.1047 0.33105,0.1953 0.51049,0.2712c0.17456,0.0737 0.35279,0.1316 0.53467,0.1734c0.23706,0.0544 0.48047,0.0817 0.73023,0.0817l2.25097,0l-0.00097,-6.49998zm12.75004,2.60058l2,0c0.4199,0 0.75,0.3301 0.75,0.75c0,0.4199 -0.3301,0.75 -0.75,0.75l-2,0c-0.42,0 -0.75,-0.3301 -0.75,-0.75c0,-0.4199 0.33,-0.75 0.75,-0.75zm0.3354,4.0791l2,1c0.2654,0.1326 0.4168,0.3924 0.4168,0.6661c0,0.1137 -0.0262,0.2299 -0.0813,0.3403c-0.1878,0.3755 -0.6307,0.5232 -1.0064,0.3354l-2,-1c-0.2651,-0.1328 -0.4167,-0.3925 -0.4167,-0.666c0,-0.1138 0.0261,-0.23 0.0813,-0.3403c0.1879,-0.3758 0.6306,-0.5232 1.0063,-0.3355z" fill-rule="evenodd"/>\n </g>\n</svg>',
1023
+ /** AI对话 */ aiChat: '\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none">\n <defs>\n <linearGradient id="gradient0" x1="10.667" x2="10.667" y1="0.667" y2="20.667">\n <stop stop-color="#33D9FF" offset="0.354"/>\n <stop stop-color="#CE77FF" offset="1"/>\n </linearGradient>\n <linearGradient id="gradient1" x1="8.318" x2="8.318" y1="0" y2="18.001">\n <stop stop-color="#33D9FF" offset="0.354"/>\n <stop stop-color="#CE77FF" offset="1"/>\n </linearGradient>\n </defs>\n \n <g transform="scale(1.2) translate(-3, -0.5)">\n <path d="M6.917 0C8.776 0 10.52 0.738 11.808 2.026C12.45 2.668 12.961 3.43 13.309 4.269C13.442 4.588 13.29 4.954 12.971 5.086C12.653 5.218 12.287 5.067 12.155 4.748C11.87 4.061 11.451 3.436 10.925 2.91C9.868 1.854 8.441 1.25 6.917 1.25C3.787 1.25 1.25 3.787 1.25 6.917C1.25 10.047 3.787 12.584 6.917 12.584C8.441 12.584 9.868 11.981 10.925 10.925C11.169 10.681 11.564 10.681 11.808 10.925C12.052 11.169 12.052 11.565 11.808 11.809C10.666 12.951 9.164 13.661 7.542 13.807L7.542 17.376C7.542 17.721 7.262 18.001 6.917 18.001C6.572 18.001 6.292 17.721 6.292 17.376L6.292 13.807C2.765 13.49 0 10.527 0 6.917C0 3.097 3.097 0 6.917 0ZM11.051 6.495C11.295 6.739 11.295 7.135 11.051 7.379L7.547 10.882C7.303 11.126 6.908 11.126 6.664 10.882C6.42 10.638 6.42 10.242 6.664 9.998L10.167 6.495C10.411 6.251 10.807 6.251 11.051 6.495ZM8.566 4.559L6.501 9.5C6.368 9.818 6.002 9.969 5.684 9.836C5.365 9.703 5.215 9.336 5.348 9.018L5.712 8.147L4.094 6.529L3.198 6.884C2.904 7.001 2.575 6.878 2.424 6.61C2.297 6.289 2.418 5.849 2.739 5.722L7.76 3.736C8.274 3.533 8.779 4.049 8.566 4.559ZM16.614 6.171C16.642 6.236 16.642 6.309 16.614 6.373L15.964 7.848C15.936 7.912 15.936 7.986 15.964 8.05L16.614 9.525C16.67 9.651 16.613 9.799 16.486 9.855C16.422 9.883 16.349 9.883 16.285 9.855L14.809 9.205C14.745 9.176 14.672 9.176 14.608 9.205L13.133 9.855C13.006 9.911 12.859 9.853 12.803 9.727C12.775 9.662 12.775 9.589 12.803 9.525L13.453 8.05C13.482 7.986 13.482 7.912 13.453 7.848L12.803 6.373C12.747 6.247 12.805 6.099 12.931 6.043C12.995 6.015 13.068 6.015 13.133 6.043L14.608 6.694C14.672 6.722 14.745 6.722 14.809 6.694L16.285 6.043C16.411 5.988 16.558 6.045 16.614 6.171ZM6.841 5.443L5.361 6.028L6.233 6.9L6.841 5.443Z" fill="url(#gradient1)" transform="matrix(0.707 -0.707 0.707 0.707 0.085 9.868)"/>\n </g>\n </svg>\n ',
1016
1024
  /** 相机/截图 */ capturePicture: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="capture-picture">\n <path d="M6.94 7.51C7.34 7.51 7.7 7.28 7.86 6.91L8.43 5.6C8.59 5.23 8.95 5 9.35 5L14.69 5C15.04 5 15.37 5.18 15.55 5.49L16.45 7.02C16.63 7.33 16.96 7.51 17.31 7.51L18.5 7.51C19.6 7.51 20.5 8.41 20.5 9.51L20.5 17C20.5 18.1 19.6 19 18.5 19L5.5 19C4.39 19 3.5 18.1 3.5 17L3.5 9.51C3.5 8.41 4.39 7.51 5.5 7.51L6.94 7.51Z" stroke-width="1.5"/>\n <circle cx="12" cy="12.525146" r="3.068097" stroke-width="1.5"/>\n </svg>',
1017
1025
  /** 电子放大 */ zoom: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="zoom">\n <ellipse cx="10.914795" cy="11.25" rx="8.004043" ry="8.25" stroke-width="1.5"/>\n <path d="M14.31 11.04L8.05 11.14" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M11.13 14.22L11.23 7.95" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M16.45 17.83L19.36 20.83" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',
1018
1026
  /** 隐私遮蔽 */ privacyMasking: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="privacy-masking">\n <path d="M12 19C11.15 19 10.31 18.82 9.49 18.5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M20.88 12.46C18.98 15.96 15.49 19 11.99 19" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M19.07 8.92C19.76 9.72 20.38 10.61 20.88 11.53C21.03 11.82 21.03 12.17 20.88 12.46" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M5 19L19 5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M9.77 14.22C8.54 12.99 8.54 11 9.77 9.77C11 8.54 12.99 8.54 14.22 9.77" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M17.04 6.95C15.49 5.75 13.74 5 12 5C8.5 5 5.01 8.03 3.11 11.53C2.96 11.82 2.96 12.17 3.11 12.46C4.06 14.21 5.41 15.84 6.95 17.04" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',
@@ -1097,6 +1105,14 @@
1097
1105
  if (attr === void 0) attr = {};
1098
1106
  return createIcon(Icons.talk, 'talk', attr);
1099
1107
  },
1108
+ broadcast: function(attr) {
1109
+ if (attr === void 0) attr = {};
1110
+ return createIcon(Icons.broadcast, 'broadcast', attr);
1111
+ },
1112
+ aiChat: function(attr) {
1113
+ if (attr === void 0) attr = {};
1114
+ return createIcon(Icons.aiChat, 'aiChat', attr);
1115
+ },
1100
1116
  talkGrowth: function(attr) {
1101
1117
  if (attr === void 0) attr = {};
1102
1118
  return createIcon(Icons.talkGrowth(PREFIX_CLASS), 'talk-growth', attr);
@@ -1175,8 +1191,8 @@
1175
1191
  }
1176
1192
  };
1177
1193
 
1178
- function _extends$o() {
1179
- _extends$o = Object.assign || function(target) {
1194
+ function _extends$q() {
1195
+ _extends$q = Object.assign || function(target) {
1180
1196
  for(var i = 1; i < arguments.length; i++){
1181
1197
  var source = arguments[i];
1182
1198
  for(var key in source){
@@ -1187,9 +1203,9 @@
1187
1203
  }
1188
1204
  return target;
1189
1205
  };
1190
- return _extends$o.apply(this, arguments);
1206
+ return _extends$q.apply(this, arguments);
1191
1207
  }
1192
- function _inherits$o(subClass, superClass) {
1208
+ function _inherits$q(subClass, superClass) {
1193
1209
  if (typeof superClass !== "function" && superClass !== null) {
1194
1210
  throw new TypeError("Super expression must either be null or a function");
1195
1211
  }
@@ -1200,25 +1216,25 @@
1200
1216
  configurable: true
1201
1217
  }
1202
1218
  });
1203
- if (superClass) _set_prototype_of$o(subClass, superClass);
1219
+ if (superClass) _set_prototype_of$q(subClass, superClass);
1204
1220
  }
1205
- function _set_prototype_of$o(o, p) {
1206
- _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1221
+ function _set_prototype_of$q(o, p) {
1222
+ _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1207
1223
  o.__proto__ = p;
1208
1224
  return o;
1209
1225
  };
1210
- return _set_prototype_of$o(o, p);
1226
+ return _set_prototype_of$q(o, p);
1211
1227
  }
1212
1228
  var MESSAGE_DEFAULT_OPTIONS = {};
1213
1229
  /**
1214
1230
  * 消息控件
1215
1231
  * @category Control
1216
1232
  */ var Message = /*#__PURE__*/ function(Control) {
1217
- _inherits$o(Message, Control);
1233
+ _inherits$q(Message, Control);
1218
1234
  function Message(options) {
1219
1235
  if (options === void 0) options = {};
1220
1236
  var _this;
1221
- _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$o({}, options, {
1237
+ _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$q({}, options, {
1222
1238
  tagName: 'div',
1223
1239
  controlType: 'block'
1224
1240
  }))) || this;
@@ -1371,8 +1387,8 @@
1371
1387
  if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
1372
1388
  return Constructor;
1373
1389
  }
1374
- function _extends$n() {
1375
- _extends$n = Object.assign || function(target) {
1390
+ function _extends$p() {
1391
+ _extends$p = Object.assign || function(target) {
1376
1392
  for(var i = 1; i < arguments.length; i++){
1377
1393
  var source = arguments[i];
1378
1394
  for(var key in source){
@@ -1383,9 +1399,9 @@
1383
1399
  }
1384
1400
  return target;
1385
1401
  };
1386
- return _extends$n.apply(this, arguments);
1402
+ return _extends$p.apply(this, arguments);
1387
1403
  }
1388
- function _inherits$n(subClass, superClass) {
1404
+ function _inherits$p(subClass, superClass) {
1389
1405
  if (typeof superClass !== "function" && superClass !== null) {
1390
1406
  throw new TypeError("Super expression must either be null or a function");
1391
1407
  }
@@ -1396,23 +1412,23 @@
1396
1412
  configurable: true
1397
1413
  }
1398
1414
  });
1399
- if (superClass) _set_prototype_of$n(subClass, superClass);
1415
+ if (superClass) _set_prototype_of$p(subClass, superClass);
1400
1416
  }
1401
- function _set_prototype_of$n(o, p) {
1402
- _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1417
+ function _set_prototype_of$p(o, p) {
1418
+ _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1403
1419
  o.__proto__ = p;
1404
1420
  return o;
1405
1421
  };
1406
- return _set_prototype_of$n(o, p);
1422
+ return _set_prototype_of$p(o, p);
1407
1423
  }
1408
1424
  /**
1409
1425
  * 播放/暂停控件
1410
1426
  * @category Control
1411
1427
  */ var Play = /*#__PURE__*/ function(Control) {
1412
- _inherits$n(Play, Control);
1428
+ _inherits$p(Play, Control);
1413
1429
  function Play(options) {
1414
1430
  var _this;
1415
- _this = Control.call(this, _extends$n({}, options, {
1431
+ _this = Control.call(this, _extends$p({}, options, {
1416
1432
  tagName: 'span',
1417
1433
  controlType: 'button',
1418
1434
  classNameSuffix: 'play'
@@ -1473,12 +1489,12 @@
1473
1489
  * LICENSE file in the root directory of this source tree.
1474
1490
  */
1475
1491
 
1476
- var dist$8;
1477
- var hasRequiredDist$8;
1492
+ var dist$a;
1493
+ var hasRequiredDist$a;
1478
1494
 
1479
- function requireDist$8 () {
1480
- if (hasRequiredDist$8) return dist$8;
1481
- hasRequiredDist$8 = 1;
1495
+ function requireDist$a () {
1496
+ if (hasRequiredDist$a) return dist$a;
1497
+ hasRequiredDist$a = 1;
1482
1498
 
1483
1499
  function _array_like_to_array(arr, len) {
1484
1500
  if (len == null || len > arr.length) len = arr.length;
@@ -2055,11 +2071,11 @@
2055
2071
  */
2056
2072
  Picker.VERSION = '1.1.7';
2057
2073
 
2058
- dist$8 = Picker;
2059
- return dist$8;
2074
+ dist$a = Picker;
2075
+ return dist$a;
2060
2076
  }
2061
2077
 
2062
- var distExports$7 = requireDist$8();
2078
+ var distExports$7 = requireDist$a();
2063
2079
  var Picker = /*@__PURE__*/getDefaultExportFromCjs(distExports$7);
2064
2080
 
2065
2081
  var delegate$2 = {exports: {}};
@@ -2345,25 +2361,25 @@
2345
2361
  var cjsExports = requireCjs();
2346
2362
  var deepmerge = /*@__PURE__*/getDefaultExportFromCjs(cjsExports);
2347
2363
 
2348
- var dist$7 = {};
2364
+ var dist$9 = {};
2349
2365
 
2350
2366
  /*
2351
2367
  * @ezuikit/utils-tools v2.0.2
2352
2368
  * tools utils
2353
- * Copyright (c) 2026-01-05 Ezviz-OpenBiz
2369
+ * Copyright (c) 2026-01-07 Ezviz-OpenBiz
2354
2370
  * Released under the MIT License.
2355
2371
  */
2356
2372
 
2357
- var hasRequiredDist$7;
2373
+ var hasRequiredDist$9;
2358
2374
 
2359
- function requireDist$7 () {
2360
- if (hasRequiredDist$7) return dist$7;
2361
- hasRequiredDist$7 = 1;
2362
- var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _create_for_of_iterator_helper_loose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var DateTime=function(){function DateTime(){}return DateTime.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},DateTime.format=function(input,format){var date;if(_instanceof(input,Date))date=input;else {if("number"!=typeof input&&"string"!=typeof input)throw new Error("Invalid date input");date=DateTime.toDate(input+"");}for(var _step,result=format,_iterator=_create_for_of_iterator_helper_loose([[/(yyyy|YYYY)/g,function(){return DateTime.fillZero(date.getFullYear(),4)}],[/(yy|YY)/g,function(){return DateTime.fillZero(date.getFullYear()%100,2)}],[/(MM)/g,function(){return DateTime.fillZero(date.getMonth()+1,2)}],[/(M)/g,function(){return (date.getMonth()+1).toString()}],[/(dd|DD)/g,function(){return DateTime.fillZero(date.getDate(),2)}],[/(d|D)/g,function(){return date.getDate().toString()}],[/(HH|hh)/g,function(){return DateTime.fillZero(date.getHours(),2)}],[/(H|h)/g,function(){return date.getHours().toString()}],[/(mm)/g,function(){return DateTime.fillZero(date.getMinutes(),2)}],[/(m)/g,function(){return date.getMinutes().toString()}],[/(ss|SS)/g,function(){return DateTime.fillZero(date.getSeconds(),2)}],[/(s|S)/g,function(){return date.getSeconds().toString()}],[/(fff)/g,function(){return DateTime.fillZero(date.getMilliseconds(),3)}]]);!(_step=_iterator()).done;){var _step_value=_step.value,regexp=_step_value[0],fn=_step_value[1];result=result.replace(regexp,fn);}return result},DateTime.toDate=function(str){if(_instanceof(str,Date))return str;str=(str+"").trim().replace(/\/|\./gi,"-"),/^\d{4}$/.test(str)&&(str+="-01"),/^\d{4}-\d{2}$/.test(str)&&(str+="-01");try{return /^\d{4}-\d{2}-\d{2}$/.test(str)?new Date(+str.slice(0,4),+str.slice(5,7)-1,+str.slice(8,10),0,0,0):/^\d{8}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),0,0)):/^\d{14}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),+str.slice(8,10),+str.slice(10,12),+str.slice(12,14))):/^\d{13}$/.test(str)?new Date(Number(str)):/^\d{10}$/.test(str)?new Date(1e3*Number(str)):new Date(str)}catch(error){throw new Error("Invalid date string")}},DateTime.diff=function(date1,date2,type){ void 0===type&&(type="second");var d1=DateTime.toDate(date1),d2=DateTime.toDate(date2);return "second"===type?Math.floor((d1.getTime()-d2.getTime())/1e3):"minute"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60):"hour"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60):"day"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60/24):Math.abs(d1.getTime()-d2.getTime())},DateTime}();dist$7.DateTime=DateTime,dist$7.addVc=function(url,codecs){ void 0===codecs&&(codecs=["h264"]);var vc=(codecs||["h264"]).reduce(function(acc,key){return key=key.toLowerCase(),acc+(codec[key]||0)},0),host=url.split("?")[0],query=url.split("?")[1];return query=(query||"").split("&").filter(function(item){return !/^vc=\d?/.test(item)}).join("&"),host+"?"+(query+=(query?"&":"")+"vc="+vc)},dist$7.getQuery=getQuery,dist$7.getStaticPath=function(path,base){ void 0===base&&(base="");var protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$7.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$7.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(agent||(null==(_navigator1=navigator)?void 0:_navigator1.userAgent))&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||!!(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$7.isRealMobile=function(agent){var _navigator,ua=(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent).toLowerCase();if(/ipad|tablet|playbook|silk|android(?!.*mobile)/i.test(ua))return false;var hasTouch="ontouchstart"in window||navigator.maxTouchPoints>0;return /android|webos|iphone|ipod|blackberry|iemobile|opera mini/i.test(ua)&&hasTouch},dist$7.parseEzopenUrl=parseEzopenUrl,dist$7.pick=function(obj,keys){return Object.entries(obj).reduce(function(acc,param){var key=param[0],value=param[1];return keys.includes(key)&&(acc[key]=value),acc},{})},dist$7.switchEzopenUrl=function(url,options){var _ref=null!=options?options:{},type=_ref.type,recType=_ref.recType,search=_ref.search,definition=_ref.definition,channelNo=_ref.channelNo,deviceSerial=_ref.deviceSerial,validateCode=_ref.validateCode,obj=parseEzopenUrl(url);if(search){var ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce(function(acc,param){var key=param[0],value=param[1];return ""===value?acc:acc+=key+"="+encodeURIComponent(value)+"&"},"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,obj.protocol+"//"+(validateCode?validateCode+"@":"")+obj.hostname+"/"+deviceSerial+"/"+channelNo+("rec"===type&&recType?"."+recType:"")+("live"===type&&"hd"===definition?"."+definition:"")+"."+type+search};
2363
- return dist$7;
2375
+ function requireDist$9 () {
2376
+ if (hasRequiredDist$9) return dist$9;
2377
+ hasRequiredDist$9 = 1;
2378
+ var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _create_for_of_iterator_helper_loose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var DateTime=function(){function DateTime(){}return DateTime.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},DateTime.format=function(input,format){var date;if(_instanceof(input,Date))date=input;else {if("number"!=typeof input&&"string"!=typeof input)throw new Error("Invalid date input");date=DateTime.toDate(input+"");}for(var _step,result=format,_iterator=_create_for_of_iterator_helper_loose([[/(yyyy|YYYY)/g,function(){return DateTime.fillZero(date.getFullYear(),4)}],[/(yy|YY)/g,function(){return DateTime.fillZero(date.getFullYear()%100,2)}],[/(MM)/g,function(){return DateTime.fillZero(date.getMonth()+1,2)}],[/(M)/g,function(){return (date.getMonth()+1).toString()}],[/(dd|DD)/g,function(){return DateTime.fillZero(date.getDate(),2)}],[/(d|D)/g,function(){return date.getDate().toString()}],[/(HH|hh)/g,function(){return DateTime.fillZero(date.getHours(),2)}],[/(H|h)/g,function(){return date.getHours().toString()}],[/(mm)/g,function(){return DateTime.fillZero(date.getMinutes(),2)}],[/(m)/g,function(){return date.getMinutes().toString()}],[/(ss|SS)/g,function(){return DateTime.fillZero(date.getSeconds(),2)}],[/(s|S)/g,function(){return date.getSeconds().toString()}],[/(fff)/g,function(){return DateTime.fillZero(date.getMilliseconds(),3)}]]);!(_step=_iterator()).done;){var _step_value=_step.value,regexp=_step_value[0],fn=_step_value[1];result=result.replace(regexp,fn);}return result},DateTime.toDate=function(str){if(_instanceof(str,Date))return str;str=(str+"").trim().replace(/\/|\./gi,"-"),/^\d{4}$/.test(str)&&(str+="-01"),/^\d{4}-\d{2}$/.test(str)&&(str+="-01");try{return /^\d{4}-\d{2}-\d{2}$/.test(str)?new Date(+str.slice(0,4),+str.slice(5,7)-1,+str.slice(8,10),0,0,0):/^\d{8}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),0,0,0)):/^\d{14}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),+str.slice(8,10),+str.slice(10,12),+str.slice(12,14))):/^\d{13}$/.test(str)?new Date(Number(str)):/^\d{10}$/.test(str)?new Date(1e3*Number(str)):new Date(str)}catch(error){throw new Error("Invalid date string")}},DateTime.diff=function(date1,date2,type){ void 0===type&&(type="second");var d1=DateTime.toDate(date1),d2=DateTime.toDate(date2);return "second"===type?Math.floor((d1.getTime()-d2.getTime())/1e3):"minute"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60):"hour"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60):"day"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60/24):Math.abs(d1.getTime()-d2.getTime())},DateTime}();dist$9.DateTime=DateTime,dist$9.addVc=function(url,codecs){ void 0===codecs&&(codecs=["h264"]);var vc=(codecs||["h264"]).reduce(function(acc,key){return key=key.toLowerCase(),acc+(codec[key]||0)},0),host=url.split("?")[0],query=url.split("?")[1];return query=(query||"").split("&").filter(function(item){return !/^vc=\d?/.test(item)}).join("&"),host+"?"+(query+=(query?"&":"")+"vc="+vc)},dist$9.getQuery=getQuery,dist$9.getStaticPath=function(path,base){ void 0===base&&(base="");var protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$9.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$9.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(agent||(null==(_navigator1=navigator)?void 0:_navigator1.userAgent))&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||!!(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$9.isRealMobile=function(agent){var _navigator,ua=(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent).toLowerCase();if(/ipad|tablet|playbook|silk|android(?!.*mobile)/i.test(ua))return false;var hasTouch="ontouchstart"in window||navigator.maxTouchPoints>0;return /android|webos|iphone|ipod|blackberry|iemobile|opera mini/i.test(ua)&&hasTouch},dist$9.parseEzopenUrl=parseEzopenUrl,dist$9.pick=function(obj,keys){return Object.entries(obj).reduce(function(acc,param){var key=param[0],value=param[1];return keys.includes(key)&&(acc[key]=value),acc},{})},dist$9.switchEzopenUrl=function(url,options){var _ref=null!=options?options:{},type=_ref.type,recType=_ref.recType,search=_ref.search,definition=_ref.definition,channelNo=_ref.channelNo,deviceSerial=_ref.deviceSerial,validateCode=_ref.validateCode,obj=parseEzopenUrl(url);if(search){var ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce(function(acc,param){var key=param[0],value=param[1];return ""===value?acc:acc+=key+"="+encodeURIComponent(value)+"&"},"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,obj.protocol+"//"+(validateCode?validateCode+"@":"")+obj.hostname+"/"+deviceSerial+"/"+channelNo+("rec"===type&&recType?"."+recType:"")+("live"===type&&"hd"===definition?"."+definition:"")+"."+type+search};
2379
+ return dist$9;
2364
2380
  }
2365
2381
 
2366
- var distExports$6 = requireDist$7();
2382
+ var distExports$6 = requireDist$9();
2367
2383
 
2368
2384
  /**
2369
2385
  * 节流函数
@@ -2930,8 +2946,8 @@
2930
2946
  if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
2931
2947
  return Constructor;
2932
2948
  }
2933
- function _extends$m() {
2934
- _extends$m = Object.assign || function(target) {
2949
+ function _extends$o() {
2950
+ _extends$o = Object.assign || function(target) {
2935
2951
  for(var i = 1; i < arguments.length; i++){
2936
2952
  var source = arguments[i];
2937
2953
  for(var key in source){
@@ -2942,9 +2958,9 @@
2942
2958
  }
2943
2959
  return target;
2944
2960
  };
2945
- return _extends$m.apply(this, arguments);
2961
+ return _extends$o.apply(this, arguments);
2946
2962
  }
2947
- function _inherits$m(subClass, superClass) {
2963
+ function _inherits$o(subClass, superClass) {
2948
2964
  if (typeof superClass !== "function" && superClass !== null) {
2949
2965
  throw new TypeError("Super expression must either be null or a function");
2950
2966
  }
@@ -2955,14 +2971,14 @@
2955
2971
  configurable: true
2956
2972
  }
2957
2973
  });
2958
- if (superClass) _set_prototype_of$m(subClass, superClass);
2974
+ if (superClass) _set_prototype_of$o(subClass, superClass);
2959
2975
  }
2960
- function _set_prototype_of$m(o, p) {
2961
- _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2976
+ function _set_prototype_of$o(o, p) {
2977
+ _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2962
2978
  o.__proto__ = p;
2963
2979
  return o;
2964
2980
  };
2965
- return _set_prototype_of$m(o, p);
2981
+ return _set_prototype_of$o(o, p);
2966
2982
  }
2967
2983
  var VOLUME_DEFAULT_OPTIONS = {
2968
2984
  volume: 0.8,
@@ -2976,12 +2992,12 @@
2976
2992
  * 音量调节控件
2977
2993
  * @category Control
2978
2994
  */ var Volume = /*#__PURE__*/ function(Control) {
2979
- _inherits$m(Volume, Control);
2995
+ _inherits$o(Volume, Control);
2980
2996
  function Volume(options) {
2981
2997
  if (options === void 0) options = {};
2982
2998
  var _this;
2983
2999
  var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
2984
- _this = Control.call(this, _extends$m({}, options, {
3000
+ _this = Control.call(this, _extends$o({}, options, {
2985
3001
  tagName: 'span',
2986
3002
  classNameSuffix: 'volume',
2987
3003
  controlType: 'button'
@@ -3396,7 +3412,7 @@
3396
3412
  var screenfullExports = requireScreenfull();
3397
3413
  var screenfull = /*@__PURE__*/getDefaultExportFromCjs(screenfullExports);
3398
3414
 
3399
- function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
3415
+ function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
3400
3416
  try {
3401
3417
  var info = gen[key](arg);
3402
3418
  var value = info.value;
@@ -3410,22 +3426,22 @@
3410
3426
  Promise.resolve(value).then(_next, _throw);
3411
3427
  }
3412
3428
  }
3413
- function _async_to_generator$5(fn) {
3429
+ function _async_to_generator$7(fn) {
3414
3430
  return function() {
3415
3431
  var self = this, args = arguments;
3416
3432
  return new Promise(function(resolve, reject) {
3417
3433
  var gen = fn.apply(self, args);
3418
3434
  function _next(value) {
3419
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
3435
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "next", value);
3420
3436
  }
3421
3437
  function _throw(err) {
3422
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
3438
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "throw", err);
3423
3439
  }
3424
3440
  _next(undefined);
3425
3441
  });
3426
3442
  };
3427
3443
  }
3428
- function _ts_generator$5(thisArg, body) {
3444
+ function _ts_generator$7(thisArg, body) {
3429
3445
  var f, y, t, _ = {
3430
3446
  label: 0,
3431
3447
  sent: function() {
@@ -3639,8 +3655,8 @@
3639
3655
  * 全屏
3640
3656
  * @returns Promise<void>
3641
3657
  */ _proto.fullscreen = function fullscreen() {
3642
- return _async_to_generator$5(function() {
3643
- return _ts_generator$5(this, function(_state) {
3658
+ return _async_to_generator$7(function() {
3659
+ return _ts_generator$7(this, function(_state) {
3644
3660
  switch(_state.label){
3645
3661
  case 0:
3646
3662
  if (!Utils.isMobile) return [
@@ -3675,8 +3691,8 @@
3675
3691
  * 退出全屏
3676
3692
  * @returns Promise<void>
3677
3693
  */ _proto.exitFullscreen = function exitFullscreen() {
3678
- return _async_to_generator$5(function() {
3679
- return _ts_generator$5(this, function(_state) {
3694
+ return _async_to_generator$7(function() {
3695
+ return _ts_generator$7(this, function(_state) {
3680
3696
  switch(_state.label){
3681
3697
  case 0:
3682
3698
  if (!Utils.isMobile) return [
@@ -3715,8 +3731,8 @@
3715
3731
  * 全屏切换
3716
3732
  * @returns Promise<void>
3717
3733
  */ _proto.toggle = function toggle() {
3718
- return _async_to_generator$5(function() {
3719
- return _ts_generator$5(this, function(_state) {
3734
+ return _async_to_generator$7(function() {
3735
+ return _ts_generator$7(this, function(_state) {
3720
3736
  switch(_state.label){
3721
3737
  case 0:
3722
3738
  if (!Utils.isMobile) return [
@@ -3839,8 +3855,8 @@
3839
3855
  return Fullscreen;
3840
3856
  }();
3841
3857
 
3842
- function _extends$l() {
3843
- _extends$l = Object.assign || function(target) {
3858
+ function _extends$n() {
3859
+ _extends$n = Object.assign || function(target) {
3844
3860
  for(var i = 1; i < arguments.length; i++){
3845
3861
  var source = arguments[i];
3846
3862
  for(var key in source){
@@ -3851,9 +3867,9 @@
3851
3867
  }
3852
3868
  return target;
3853
3869
  };
3854
- return _extends$l.apply(this, arguments);
3870
+ return _extends$n.apply(this, arguments);
3855
3871
  }
3856
- function _inherits$l(subClass, superClass) {
3872
+ function _inherits$n(subClass, superClass) {
3857
3873
  if (typeof superClass !== "function" && superClass !== null) {
3858
3874
  throw new TypeError("Super expression must either be null or a function");
3859
3875
  }
@@ -3864,24 +3880,24 @@
3864
3880
  configurable: true
3865
3881
  }
3866
3882
  });
3867
- if (superClass) _set_prototype_of$l(subClass, superClass);
3883
+ if (superClass) _set_prototype_of$n(subClass, superClass);
3868
3884
  }
3869
- function _set_prototype_of$l(o, p) {
3870
- _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3885
+ function _set_prototype_of$n(o, p) {
3886
+ _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3871
3887
  o.__proto__ = p;
3872
3888
  return o;
3873
3889
  };
3874
- return _set_prototype_of$l(o, p);
3890
+ return _set_prototype_of$n(o, p);
3875
3891
  }
3876
3892
  /**
3877
3893
  * 全屏控件
3878
3894
  * @category Control
3879
3895
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
3880
- _inherits$l(Fullscreen, Control);
3896
+ _inherits$n(Fullscreen, Control);
3881
3897
  function Fullscreen(options) {
3882
3898
  var _this;
3883
3899
  var _options_props, _this_options;
3884
- _this = Control.call(this, _extends$l({
3900
+ _this = Control.call(this, _extends$n({
3885
3901
  tagName: 'span',
3886
3902
  classNameSuffix: 'fullscreen',
3887
3903
  controlType: 'button'
@@ -3946,8 +3962,8 @@
3946
3962
  return Fullscreen;
3947
3963
  }(Control);
3948
3964
 
3949
- function _extends$k() {
3950
- _extends$k = Object.assign || function(target) {
3965
+ function _extends$m() {
3966
+ _extends$m = Object.assign || function(target) {
3951
3967
  for(var i = 1; i < arguments.length; i++){
3952
3968
  var source = arguments[i];
3953
3969
  for(var key in source){
@@ -3958,9 +3974,9 @@
3958
3974
  }
3959
3975
  return target;
3960
3976
  };
3961
- return _extends$k.apply(this, arguments);
3977
+ return _extends$m.apply(this, arguments);
3962
3978
  }
3963
- function _inherits$k(subClass, superClass) {
3979
+ function _inherits$m(subClass, superClass) {
3964
3980
  if (typeof superClass !== "function" && superClass !== null) {
3965
3981
  throw new TypeError("Super expression must either be null or a function");
3966
3982
  }
@@ -3971,24 +3987,24 @@
3971
3987
  configurable: true
3972
3988
  }
3973
3989
  });
3974
- if (superClass) _set_prototype_of$k(subClass, superClass);
3990
+ if (superClass) _set_prototype_of$m(subClass, superClass);
3975
3991
  }
3976
- function _set_prototype_of$k(o, p) {
3977
- _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3992
+ function _set_prototype_of$m(o, p) {
3993
+ _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3978
3994
  o.__proto__ = p;
3979
3995
  return o;
3980
3996
  };
3981
- return _set_prototype_of$k(o, p);
3997
+ return _set_prototype_of$m(o, p);
3982
3998
  }
3983
3999
  /**
3984
4000
  * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
3985
4001
  * @category Control
3986
4002
  */ var Rec = /*#__PURE__*/ function(Control) {
3987
- _inherits$k(Rec, Control);
4003
+ _inherits$m(Rec, Control);
3988
4004
  function Rec(options) {
3989
4005
  var _this;
3990
4006
  var _options_props;
3991
- _this = Control.call(this, _extends$k({}, options, {
4007
+ _this = Control.call(this, _extends$m({}, options, {
3992
4008
  tagName: 'div',
3993
4009
  controlType: 'block',
3994
4010
  classNameSuffix: 'rec'
@@ -4080,13 +4096,13 @@
4080
4096
  return Rec;
4081
4097
  }(Control);
4082
4098
 
4083
- var dist$6 = {exports: {}};
4099
+ var dist$8 = {exports: {}};
4084
4100
 
4085
- var hasRequiredDist$6;
4101
+ var hasRequiredDist$8;
4086
4102
 
4087
- function requireDist$6 () {
4088
- if (hasRequiredDist$6) return dist$6.exports;
4089
- hasRequiredDist$6 = 1;
4103
+ function requireDist$8 () {
4104
+ if (hasRequiredDist$8) return dist$8.exports;
4105
+ hasRequiredDist$8 = 1;
4090
4106
 
4091
4107
  var deepmerge = requireCjs();
4092
4108
 
@@ -4158,19 +4174,19 @@
4158
4174
  } ]), I18n;
4159
4175
  }();
4160
4176
 
4161
- I18n.VERSION = "2.0.0", dist$6.exports = I18n;
4162
- return dist$6.exports;
4177
+ I18n.VERSION = "2.0.0", dist$8.exports = I18n;
4178
+ return dist$8.exports;
4163
4179
  }
4164
4180
 
4165
- var distExports$5 = requireDist$6();
4181
+ var distExports$5 = requireDist$8();
4166
4182
  var I18n = /*@__PURE__*/getDefaultExportFromCjs(distExports$5);
4167
4183
 
4168
- var dist$5;
4169
- var hasRequiredDist$5;
4184
+ var dist$7;
4185
+ var hasRequiredDist$7;
4170
4186
 
4171
- function requireDist$5 () {
4172
- if (hasRequiredDist$5) return dist$5;
4173
- hasRequiredDist$5 = 1;
4187
+ function requireDist$7 () {
4188
+ if (hasRequiredDist$7) return dist$7;
4189
+ hasRequiredDist$7 = 1;
4174
4190
 
4175
4191
  var _$LoggerStyle$_ = {
4176
4192
  info: "",
@@ -4235,7 +4251,7 @@
4235
4251
 
4236
4252
  var __$list$__ = [ "info", "log", "warn", "error" ];
4237
4253
 
4238
- dist$5 = function(options) {
4254
+ dist$7 = function(options) {
4239
4255
  var logger = new LoggerCls(options);
4240
4256
  return new Proxy(logger, {
4241
4257
  get: function(target, prop) {
@@ -4254,10 +4270,10 @@
4254
4270
  }
4255
4271
  });
4256
4272
  };
4257
- return dist$5;
4273
+ return dist$7;
4258
4274
  }
4259
4275
 
4260
- var distExports$4 = requireDist$5();
4276
+ var distExports$4 = requireDist$7();
4261
4277
  var Logger = /*@__PURE__*/getDefaultExportFromCjs(distExports$4);
4262
4278
 
4263
4279
  var zh = {
@@ -4443,6 +4459,8 @@
4443
4459
  BTN_RECORDVIDEO: '录屏',
4444
4460
  BTN_CAPTURE: '截图',
4445
4461
  BTN_TALK: '对讲',
4462
+ BTN_BROADCAST: '语音广播',
4463
+ BTN_AICHAT: 'AI对话',
4446
4464
  BTN_ZOOM: '电子放大',
4447
4465
  BTN_3D_ZOOM: '3D定位',
4448
4466
  BTN_PTZ: '云台控制',
@@ -4713,6 +4731,8 @@
4713
4731
  BTN_RECORDVIDEO: 'Screen recording',
4714
4732
  BTN_CAPTURE: 'Screenshot',
4715
4733
  BTN_TALK: 'Intercom',
4734
+ BTN_BROADCAST: 'Voice broadcast',
4735
+ BTN_AICHAT: 'AI Chat',
4716
4736
  BTN_ZOOM: 'Electronic zoom',
4717
4737
  BTN_3D_ZOOM: '3D positioning',
4718
4738
  BTN_PTZ: 'PTZ control',
@@ -4899,6 +4919,11 @@
4899
4919
  part: 'left',
4900
4920
  isrender: 1
4901
4921
  },
4922
+ {
4923
+ iconId: 'broadcast',
4924
+ part: 'left',
4925
+ isrender: 1
4926
+ },
4902
4927
  {
4903
4928
  iconId: 'zoom',
4904
4929
  part: 'left',
@@ -5002,6 +5027,12 @@
5002
5027
  defaultActive: 0,
5003
5028
  isrender: 1
5004
5029
  },
5030
+ {
5031
+ iconId: 'aiChat',
5032
+ part: 'left',
5033
+ defaultActive: 0,
5034
+ isrender: 1
5035
+ },
5005
5036
  {
5006
5037
  iconId: 'speed',
5007
5038
  part: 'right',
@@ -5085,6 +5116,12 @@
5085
5116
  defaultActive: 0,
5086
5117
  isrender: 1
5087
5118
  },
5119
+ {
5120
+ iconId: 'broadcast',
5121
+ part: 'left',
5122
+ defaultActive: 0,
5123
+ isrender: 1
5124
+ },
5088
5125
  {
5089
5126
  iconId: 'zoom',
5090
5127
  part: 'left',
@@ -5180,6 +5217,12 @@
5180
5217
  defaultActive: 0,
5181
5218
  isrender: 1
5182
5219
  },
5220
+ {
5221
+ iconId: 'aiChat',
5222
+ part: 'left',
5223
+ defaultActive: 0,
5224
+ isrender: 1
5225
+ },
5183
5226
  {
5184
5227
  iconId: 'speed',
5185
5228
  part: 'right',
@@ -5340,7 +5383,7 @@
5340
5383
  voice: voice
5341
5384
  };
5342
5385
 
5343
- function _inherits$j(subClass, superClass) {
5386
+ function _inherits$l(subClass, superClass) {
5344
5387
  if (typeof superClass !== "function" && superClass !== null) {
5345
5388
  throw new TypeError("Super expression must either be null or a function");
5346
5389
  }
@@ -5351,23 +5394,23 @@
5351
5394
  configurable: true
5352
5395
  }
5353
5396
  });
5354
- if (superClass) _set_prototype_of$j(subClass, superClass);
5397
+ if (superClass) _set_prototype_of$l(subClass, superClass);
5355
5398
  }
5356
- function _set_prototype_of$j(o, p) {
5357
- _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5399
+ function _set_prototype_of$l(o, p) {
5400
+ _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5358
5401
  o.__proto__ = p;
5359
5402
  return o;
5360
5403
  };
5361
- return _set_prototype_of$j(o, p);
5404
+ return _set_prototype_of$l(o, p);
5362
5405
  }
5363
5406
  /**
5364
5407
  * 截图控件
5365
5408
  * @category Content
5366
5409
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
5367
- _inherits$j(Content, EventEmitter);
5410
+ _inherits$l(Content, EventEmitter);
5368
5411
  function Content(options) {
5369
5412
  var _this;
5370
- _this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
5413
+ _this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
5371
5414
  _this.options = options;
5372
5415
  _this._scaleMode = options.scaleMode || 0;
5373
5416
  _this.$wrapper = document.createElement('div');
@@ -5385,9 +5428,10 @@
5385
5428
  _this.on(EVENTS.videoInfo, function(originWidth, originHeight) {
5386
5429
  _this.rerender(originWidth, originHeight);
5387
5430
  });
5388
- _this.on(EVENTS.resize, function() {
5431
+ // prettier-ignore
5432
+ _this._cleanUpResizeObserver = Utils.resizeObserver(_this.$wrapper, throttle(function() {
5389
5433
  _this.rerender();
5390
- });
5434
+ }, 20));
5391
5435
  return _this;
5392
5436
  }
5393
5437
  var _proto = Content.prototype;
@@ -5420,6 +5464,7 @@
5420
5464
  if (this._scaleMode === THEME_SCALE_MODE_TYPE.fullAuto) {
5421
5465
  objectFill = 'cover';
5422
5466
  }
5467
+ //
5423
5468
  if (width > 0 && height > 0 && this._originWidth > 0 && this._originHeight > 0 && this.$video) {
5424
5469
  var left = (width - this._originWidth) / 2;
5425
5470
  var top = (height - this._originHeight) / 2;
@@ -5453,6 +5498,11 @@
5453
5498
  };
5454
5499
  _proto.destroy = function destroy() {
5455
5500
  var _this_$wrapper;
5501
+ if (this._cleanUpResizeObserver) {
5502
+ this._cleanUpResizeObserver.unobserve();
5503
+ // this._cleanUpResizeObserver.disconnect();
5504
+ this._cleanUpResizeObserver = null;
5505
+ }
5456
5506
  if (this.$video) {
5457
5507
  this.$video.remove();
5458
5508
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -5472,8 +5522,8 @@
5472
5522
  return Content;
5473
5523
  }(EventEmitter);
5474
5524
 
5475
- function _extends$j() {
5476
- _extends$j = Object.assign || function(target) {
5525
+ function _extends$l() {
5526
+ _extends$l = Object.assign || function(target) {
5477
5527
  for(var i = 1; i < arguments.length; i++){
5478
5528
  var source = arguments[i];
5479
5529
  for(var key in source){
@@ -5484,9 +5534,9 @@
5484
5534
  }
5485
5535
  return target;
5486
5536
  };
5487
- return _extends$j.apply(this, arguments);
5537
+ return _extends$l.apply(this, arguments);
5488
5538
  }
5489
- function _inherits$i(subClass, superClass) {
5539
+ function _inherits$k(subClass, superClass) {
5490
5540
  if (typeof superClass !== "function" && superClass !== null) {
5491
5541
  throw new TypeError("Super expression must either be null or a function");
5492
5542
  }
@@ -5497,23 +5547,23 @@
5497
5547
  configurable: true
5498
5548
  }
5499
5549
  });
5500
- if (superClass) _set_prototype_of$i(subClass, superClass);
5550
+ if (superClass) _set_prototype_of$k(subClass, superClass);
5501
5551
  }
5502
- function _set_prototype_of$i(o, p) {
5503
- _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5552
+ function _set_prototype_of$k(o, p) {
5553
+ _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5504
5554
  o.__proto__ = p;
5505
5555
  return o;
5506
5556
  };
5507
- return _set_prototype_of$i(o, p);
5557
+ return _set_prototype_of$k(o, p);
5508
5558
  }
5509
5559
  /**
5510
5560
  * 更多控件
5511
5561
  * @category Control
5512
5562
  */ var More = /*#__PURE__*/ function(Control) {
5513
- _inherits$i(More, Control);
5563
+ _inherits$k(More, Control);
5514
5564
  function More(options) {
5515
5565
  var _this;
5516
- _this = Control.call(this, _extends$j({}, options, {
5566
+ _this = Control.call(this, _extends$l({}, options, {
5517
5567
  tagName: 'span',
5518
5568
  controlType: 'button',
5519
5569
  classNameSuffix: 'more'
@@ -5557,11 +5607,13 @@
5557
5607
  /**
5558
5608
  * 添加
5559
5609
  * @param control
5560
- */ _proto.add = function add(key, part, control) {
5610
+ */ _proto.add = function add(key, part, control, props) {
5561
5611
  this.list.unshift({
5562
5612
  part: part,
5563
5613
  key: key,
5564
- control: control
5614
+ control: control,
5615
+ width: props.width,
5616
+ height: props.height
5565
5617
  });
5566
5618
  };
5567
5619
  /**
@@ -5707,6 +5759,26 @@
5707
5759
  (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls.talkControl) == null ? void 0 : (_theme_controls_talkControl_emit = _theme_controls_talkControl.emit) == null ? void 0 : _theme_controls_talkControl_emit.call(_theme_controls_talkControl, EVENTS.talkVolumeChange, value);
5708
5760
  });
5709
5761
  // =======================================================
5762
+ // 语音广播
5763
+ // =======================================================
5764
+ theme.on(EVENTS.broadcastChange, function(active) {
5765
+ var _theme_controls, _theme_controls_broadcastControl, _theme_controls1;
5766
+ if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.broadcastControl) && active !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_broadcastControl = _theme_controls1.broadcastControl) == null ? void 0 : _theme_controls_broadcastControl.active)) {
5767
+ var _theme_controls_broadcastControl1, _theme_controls2;
5768
+ (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_broadcastControl1 = _theme_controls2.broadcastControl) == null ? void 0 : _theme_controls_broadcastControl1.emit(EVENTS.broadcastChange, active);
5769
+ }
5770
+ });
5771
+ // =======================================================
5772
+ // AI对话框
5773
+ // =======================================================
5774
+ theme.on(EVENTS.aichatChange, function(active) {
5775
+ var _theme_controls, _theme_controls_aiChatControl, _theme_controls1;
5776
+ if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.aiChatControl) && active !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_aiChatControl = _theme_controls1.aiChatControl) == null ? void 0 : _theme_controls_aiChatControl.active)) {
5777
+ var _theme_controls_aiChatControl1, _theme_controls2;
5778
+ (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_aiChatControl1 = _theme_controls2.aiChatControl) == null ? void 0 : _theme_controls_aiChatControl1.emit(EVENTS.aichatChange, active);
5779
+ }
5780
+ });
5781
+ // =======================================================
5710
5782
  // 录制
5711
5783
  // =======================================================
5712
5784
  theme.on(EVENTS.recordingChange, function(recording) {
@@ -5802,7 +5874,7 @@
5802
5874
  *
5803
5875
  * @param theme - Theme
5804
5876
  */ function _controlEventemitter(theme) {
5805
- 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;
5877
+ 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;
5806
5878
  // Controls
5807
5879
  if (theme._recFooter) {
5808
5880
  theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
@@ -5895,8 +5967,26 @@
5895
5967
  theme.emit(EVENTS.control.talkDestroy);
5896
5968
  });
5897
5969
  }
5970
+ // 语音广播控件
5971
+ if ((_theme_controls5 = theme.controls) == null ? void 0 : _theme_controls5.broadcastControl) {
5972
+ theme.controls.broadcastControl.on(EVENTS.control.broadcastChange, function(active) {
5973
+ theme.emit(EVENTS.control.broadcastChange, active);
5974
+ });
5975
+ theme.controls.broadcastControl.on(EVENTS.control.broadcastDestroy, function() {
5976
+ theme.emit(EVENTS.control.broadcastDestroy);
5977
+ });
5978
+ }
5979
+ // AI对话框
5980
+ if ((_theme_controls6 = theme.controls) == null ? void 0 : _theme_controls6.aiChatControl) {
5981
+ theme.controls.aiChatControl.on(EVENTS.control.aichatChange, function(active) {
5982
+ theme.emit(EVENTS.control.aichatChange, active);
5983
+ });
5984
+ theme.controls.aiChatControl.on(EVENTS.control.aichatDestroy, function() {
5985
+ theme.emit(EVENTS.control.aichatDestroy);
5986
+ });
5987
+ }
5898
5988
  // 缩放控件
5899
- if ((_theme_controls5 = theme.controls) == null ? void 0 : _theme_controls5.zoomControl) {
5989
+ if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.zoomControl) {
5900
5990
  theme.controls.zoomControl.on(EVENTS.control.zoomChange, function(value, _percent, _range) {
5901
5991
  if (theme.zoom !== value) {
5902
5992
  theme.zoom = value;
@@ -5918,7 +6008,7 @@
5918
6008
  });
5919
6009
  }
5920
6010
  // 清晰度控件
5921
- if ((_theme_controls6 = theme.controls) == null ? void 0 : _theme_controls6.definitionControl) {
6011
+ if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.definitionControl) {
5922
6012
  theme.controls.definitionControl.on(EVENTS.control.definitionPanelOpenChange, function(open, definition, item) {
5923
6013
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, definition);
5924
6014
  theme.emit(EVENTS.control.definitionPanelOpenChange, open, definition, item);
@@ -5931,7 +6021,7 @@
5931
6021
  });
5932
6022
  }
5933
6023
  // 倍速控件
5934
- if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.speedControl) {
6024
+ if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.speedControl) {
5935
6025
  theme.controls.speedControl.on(EVENTS.control.speedPanelOpenChange, function(open, speed, item) {
5936
6026
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, speed);
5937
6027
  theme.emit(EVENTS.control.speedPanelOpenChange, open, speed, item);
@@ -5944,7 +6034,7 @@
5944
6034
  });
5945
6035
  }
5946
6036
  // 截图控件
5947
- if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.capturePictureControl) {
6037
+ if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.capturePictureControl) {
5948
6038
  theme.controls.capturePictureControl.on(EVENTS.control.capturePicture, function(options) {
5949
6039
  theme.emit(EVENTS.control.capturePicture, options);
5950
6040
  });
@@ -5953,25 +6043,25 @@
5953
6043
  });
5954
6044
  }
5955
6045
  // 全屏控件
5956
- if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.fullscreenControl) {
6046
+ if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.fullscreenControl) {
5957
6047
  theme.controls.fullscreenControl.on(EVENTS.control.fullscreenDestroy, function() {
5958
6048
  theme.emit(EVENTS.control.fullscreenDestroy);
5959
6049
  });
5960
6050
  }
5961
6051
  // 全局全屏控件
5962
- if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.globalFullscreenControl) {
6052
+ if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.globalFullscreenControl) {
5963
6053
  theme.controls.globalFullscreenControl.on(EVENTS.control.globalFullscreenDestroy, function() {
5964
6054
  theme.emit(EVENTS.control.globalFullscreenDestroy);
5965
6055
  });
5966
6056
  }
5967
6057
  // 设备信息控件
5968
- if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.deviceControl) {
6058
+ if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.deviceControl) {
5969
6059
  theme.controls.deviceControl.on(EVENTS.control.deviceDestroy, function() {
5970
6060
  theme.emit(EVENTS.control.deviceDestroy);
5971
6061
  });
5972
6062
  }
5973
6063
  // 回放类型切换控件
5974
- if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.recControl) {
6064
+ if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.recControl) {
5975
6065
  // prettier-ignore
5976
6066
  theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
5977
6067
  if (theme.recType !== type) {
@@ -5992,7 +6082,7 @@
5992
6082
  });
5993
6083
  }
5994
6084
  // 时间轴控件
5995
- if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.timeLineControl) {
6085
+ if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.timeLineControl) {
5996
6086
  theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
5997
6087
  theme.emit(EVENTS.control.timeLineChange, date);
5998
6088
  });
@@ -6009,7 +6099,7 @@
6009
6099
  });
6010
6100
  }
6011
6101
  // 日历控件
6012
- if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.dateControl) {
6102
+ if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.dateControl) {
6013
6103
  theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
6014
6104
  theme.emit(EVENTS.control.datePanelOpenChange, open, date);
6015
6105
  });
@@ -6104,8 +6194,8 @@
6104
6194
  if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
6105
6195
  return Constructor;
6106
6196
  }
6107
- function _extends$i() {
6108
- _extends$i = Object.assign || function(target) {
6197
+ function _extends$k() {
6198
+ _extends$k = Object.assign || function(target) {
6109
6199
  for(var i = 1; i < arguments.length; i++){
6110
6200
  var source = arguments[i];
6111
6201
  for(var key in source){
@@ -6116,9 +6206,9 @@
6116
6206
  }
6117
6207
  return target;
6118
6208
  };
6119
- return _extends$i.apply(this, arguments);
6209
+ return _extends$k.apply(this, arguments);
6120
6210
  }
6121
- function _inherits$h(subClass, superClass) {
6211
+ function _inherits$j(subClass, superClass) {
6122
6212
  if (typeof superClass !== "function" && superClass !== null) {
6123
6213
  throw new TypeError("Super expression must either be null or a function");
6124
6214
  }
@@ -6129,14 +6219,14 @@
6129
6219
  configurable: true
6130
6220
  }
6131
6221
  });
6132
- if (superClass) _set_prototype_of$h(subClass, superClass);
6222
+ if (superClass) _set_prototype_of$j(subClass, superClass);
6133
6223
  }
6134
- function _set_prototype_of$h(o, p) {
6135
- _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6224
+ function _set_prototype_of$j(o, p) {
6225
+ _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6136
6226
  o.__proto__ = p;
6137
6227
  return o;
6138
6228
  };
6139
- return _set_prototype_of$h(o, p);
6229
+ return _set_prototype_of$j(o, p);
6140
6230
  }
6141
6231
  var ZOOM_DEFAULT_OPTIONS = {
6142
6232
  open: false,
@@ -6146,10 +6236,10 @@
6146
6236
  * 电子放大控件
6147
6237
  * @category Control
6148
6238
  */ var Zoom$1 = /*#__PURE__*/ function(Control) {
6149
- _inherits$h(Zoom, Control);
6239
+ _inherits$j(Zoom, Control);
6150
6240
  function Zoom(options) {
6151
6241
  var _this;
6152
- _this = Control.call(this, _extends$i({}, options, {
6242
+ _this = Control.call(this, _extends$k({}, options, {
6153
6243
  tagName: 'span',
6154
6244
  controlType: 'button',
6155
6245
  classNameSuffix: 'zoom'
@@ -6283,12 +6373,12 @@
6283
6373
  * Released under the MIT License.
6284
6374
  */
6285
6375
 
6286
- var dist$4;
6287
- var hasRequiredDist$4;
6376
+ var dist$6;
6377
+ var hasRequiredDist$6;
6288
6378
 
6289
- function requireDist$4 () {
6290
- if (hasRequiredDist$4) return dist$4;
6291
- hasRequiredDist$4 = 1;
6379
+ function requireDist$6 () {
6380
+ if (hasRequiredDist$6) return dist$6;
6381
+ hasRequiredDist$6 = 1;
6292
6382
 
6293
6383
  /**
6294
6384
  * Zoom position
@@ -6995,15 +7085,15 @@
6995
7085
  }();
6996
7086
  Zoom.VERSION = '0.0.2';
6997
7087
 
6998
- dist$4 = Zoom;
6999
- return dist$4;
7088
+ dist$6 = Zoom;
7089
+ return dist$6;
7000
7090
  }
7001
7091
 
7002
- var distExports$3 = requireDist$4();
7092
+ var distExports$3 = requireDist$6();
7003
7093
  var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$3);
7004
7094
 
7005
- function _extends$h() {
7006
- _extends$h = Object.assign || function(target) {
7095
+ function _extends$j() {
7096
+ _extends$j = Object.assign || function(target) {
7007
7097
  for(var i = 1; i < arguments.length; i++){
7008
7098
  var source = arguments[i];
7009
7099
  for(var key in source){
@@ -7014,10 +7104,10 @@
7014
7104
  }
7015
7105
  return target;
7016
7106
  };
7017
- return _extends$h.apply(this, arguments);
7107
+ return _extends$j.apply(this, arguments);
7018
7108
  }
7019
7109
  function __zoom(theme, container, options) {
7020
- theme.zoomUtil = new Zoom(container, _extends$h({}, options || {}, {
7110
+ theme.zoomUtil = new Zoom(container, _extends$j({}, options || {}, {
7021
7111
  min: 1,
7022
7112
  onChange: function(zoom, reset) {
7023
7113
  if (zoom !== theme._zoom) {
@@ -7035,7 +7125,7 @@
7035
7125
  }));
7036
7126
  }
7037
7127
 
7038
- function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
7128
+ function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
7039
7129
  try {
7040
7130
  var info = gen[key](arg);
7041
7131
  var value = info.value;
@@ -7049,22 +7139,22 @@
7049
7139
  Promise.resolve(value).then(_next, _throw);
7050
7140
  }
7051
7141
  }
7052
- function _async_to_generator$4(fn) {
7142
+ function _async_to_generator$6(fn) {
7053
7143
  return function() {
7054
7144
  var self = this, args = arguments;
7055
7145
  return new Promise(function(resolve, reject) {
7056
7146
  var gen = fn.apply(self, args);
7057
7147
  function _next(value) {
7058
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
7148
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
7059
7149
  }
7060
7150
  function _throw(err) {
7061
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
7151
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
7062
7152
  }
7063
7153
  _next(undefined);
7064
7154
  });
7065
7155
  };
7066
7156
  }
7067
- function _ts_generator$4(thisArg, body) {
7157
+ function _ts_generator$6(thisArg, body) {
7068
7158
  var f, y, t, _ = {
7069
7159
  label: 0,
7070
7160
  sent: function() {
@@ -7156,9 +7246,9 @@
7156
7246
  }
7157
7247
  }
7158
7248
  function getThemeDataByTemplate(theme, id) {
7159
- return _async_to_generator$4(function() {
7249
+ return _async_to_generator$6(function() {
7160
7250
  var _theme_options_token_httpToken, _theme_options_token, url;
7161
- return _ts_generator$4(this, function(_state) {
7251
+ return _ts_generator$6(this, function(_state) {
7162
7252
  switch(_state.label){
7163
7253
  case 0:
7164
7254
  url = theme.options.env.domain + "/api/service/media/template/getDetail?accessToken=" + (theme.options.accessToken || ((_theme_options_token = theme.options.token) == null ? void 0 : (_theme_options_token_httpToken = _theme_options_token.httpToken) == null ? void 0 : _theme_options_token_httpToken.url)) + "&id=" + id;
@@ -7167,8 +7257,8 @@
7167
7257
  fetch(url, {
7168
7258
  method: 'GET'
7169
7259
  }).then(function(response) {
7170
- return _async_to_generator$4(function() {
7171
- return _ts_generator$4(this, function(_state) {
7260
+ return _async_to_generator$6(function() {
7261
+ return _ts_generator$6(this, function(_state) {
7172
7262
  switch(_state.label){
7173
7263
  case 0:
7174
7264
  return [
@@ -7213,7 +7303,7 @@
7213
7303
  })();
7214
7304
  }
7215
7305
 
7216
- function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
7306
+ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
7217
7307
  try {
7218
7308
  var info = gen[key](arg);
7219
7309
  var value = info.value;
@@ -7227,23 +7317,23 @@
7227
7317
  Promise.resolve(value).then(_next, _throw);
7228
7318
  }
7229
7319
  }
7230
- function _async_to_generator$3(fn) {
7320
+ function _async_to_generator$5(fn) {
7231
7321
  return function() {
7232
7322
  var self = this, args = arguments;
7233
7323
  return new Promise(function(resolve, reject) {
7234
7324
  var gen = fn.apply(self, args);
7235
7325
  function _next(value) {
7236
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
7326
+ asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
7237
7327
  }
7238
7328
  function _throw(err) {
7239
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
7329
+ asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
7240
7330
  }
7241
7331
  _next(undefined);
7242
7332
  });
7243
7333
  };
7244
7334
  }
7245
- function _extends$g() {
7246
- _extends$g = Object.assign || function(target) {
7335
+ function _extends$i() {
7336
+ _extends$i = Object.assign || function(target) {
7247
7337
  for(var i = 1; i < arguments.length; i++){
7248
7338
  var source = arguments[i];
7249
7339
  for(var key in source){
@@ -7254,9 +7344,9 @@
7254
7344
  }
7255
7345
  return target;
7256
7346
  };
7257
- return _extends$g.apply(this, arguments);
7347
+ return _extends$i.apply(this, arguments);
7258
7348
  }
7259
- function _ts_generator$3(thisArg, body) {
7349
+ function _ts_generator$5(thisArg, body) {
7260
7350
  var f, y, t, _ = {
7261
7351
  label: 0,
7262
7352
  sent: function() {
@@ -7382,7 +7472,7 @@
7382
7472
  }
7383
7473
  if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
7384
7474
  // TODO: 因为回放是一组, 位置以第一个位置为准
7385
- recControls.push(recControls[0] ? _extends$g({}, item, {
7475
+ recControls.push(recControls[0] ? _extends$i({}, item, {
7386
7476
  part: recControls[0].part
7387
7477
  }) : item);
7388
7478
  return false;
@@ -7405,7 +7495,7 @@
7405
7495
  }
7406
7496
  if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
7407
7497
  // TODO: 因为回放是一组, 位置以第一个位置为准
7408
- recControls.push(recControls[0] ? _extends$g({}, item, {
7498
+ recControls.push(recControls[0] ? _extends$i({}, item, {
7409
7499
  part: recControls[0].part
7410
7500
  }) : item);
7411
7501
  return false;
@@ -7467,9 +7557,9 @@
7467
7557
  * @param data
7468
7558
  * @returns
7469
7559
  */ function getThemeData(theme, data) {
7470
- return _async_to_generator$3(function() {
7560
+ return _async_to_generator$5(function() {
7471
7561
  var themeData, _theme_logger, template;
7472
- return _ts_generator$3(this, function(_state) {
7562
+ return _ts_generator$5(this, function(_state) {
7473
7563
  switch(_state.label){
7474
7564
  case 0:
7475
7565
  themeData = data;
@@ -7660,8 +7750,8 @@
7660
7750
  return Component;
7661
7751
  }();
7662
7752
 
7663
- function _extends$f() {
7664
- _extends$f = Object.assign || function(target) {
7753
+ function _extends$h() {
7754
+ _extends$h = Object.assign || function(target) {
7665
7755
  for(var i = 1; i < arguments.length; i++){
7666
7756
  var source = arguments[i];
7667
7757
  for(var key in source){
@@ -7672,9 +7762,9 @@
7672
7762
  }
7673
7763
  return target;
7674
7764
  };
7675
- return _extends$f.apply(this, arguments);
7765
+ return _extends$h.apply(this, arguments);
7676
7766
  }
7677
- function _inherits$g(subClass, superClass) {
7767
+ function _inherits$i(subClass, superClass) {
7678
7768
  if (typeof superClass !== "function" && superClass !== null) {
7679
7769
  throw new TypeError("Super expression must either be null or a function");
7680
7770
  }
@@ -7685,28 +7775,28 @@
7685
7775
  configurable: true
7686
7776
  }
7687
7777
  });
7688
- if (superClass) _set_prototype_of$g(subClass, superClass);
7778
+ if (superClass) _set_prototype_of$i(subClass, superClass);
7689
7779
  }
7690
- function _set_prototype_of$g(o, p) {
7691
- _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7780
+ function _set_prototype_of$i(o, p) {
7781
+ _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7692
7782
  o.__proto__ = p;
7693
7783
  return o;
7694
7784
  };
7695
- return _set_prototype_of$g(o, p);
7785
+ return _set_prototype_of$i(o, p);
7696
7786
  }
7697
7787
  var Footer = /*#__PURE__*/ function(Component) {
7698
- _inherits$g(Footer, Component);
7788
+ _inherits$i(Footer, Component);
7699
7789
  function Footer(options) {
7700
7790
  if (options === void 0) options = {};
7701
- return Component.call(this, _extends$f({}, options, {
7791
+ return Component.call(this, _extends$h({}, options, {
7702
7792
  cType: 'footer'
7703
7793
  })) || this;
7704
7794
  }
7705
7795
  return Footer;
7706
7796
  }(Component);
7707
7797
 
7708
- function _extends$e() {
7709
- _extends$e = Object.assign || function(target) {
7798
+ function _extends$g() {
7799
+ _extends$g = Object.assign || function(target) {
7710
7800
  for(var i = 1; i < arguments.length; i++){
7711
7801
  var source = arguments[i];
7712
7802
  for(var key in source){
@@ -7717,9 +7807,9 @@
7717
7807
  }
7718
7808
  return target;
7719
7809
  };
7720
- return _extends$e.apply(this, arguments);
7810
+ return _extends$g.apply(this, arguments);
7721
7811
  }
7722
- function _inherits$f(subClass, superClass) {
7812
+ function _inherits$h(subClass, superClass) {
7723
7813
  if (typeof superClass !== "function" && superClass !== null) {
7724
7814
  throw new TypeError("Super expression must either be null or a function");
7725
7815
  }
@@ -7730,20 +7820,20 @@
7730
7820
  configurable: true
7731
7821
  }
7732
7822
  });
7733
- if (superClass) _set_prototype_of$f(subClass, superClass);
7823
+ if (superClass) _set_prototype_of$h(subClass, superClass);
7734
7824
  }
7735
- function _set_prototype_of$f(o, p) {
7736
- _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7825
+ function _set_prototype_of$h(o, p) {
7826
+ _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7737
7827
  o.__proto__ = p;
7738
7828
  return o;
7739
7829
  };
7740
- return _set_prototype_of$f(o, p);
7830
+ return _set_prototype_of$h(o, p);
7741
7831
  }
7742
7832
  var Header = /*#__PURE__*/ function(Component) {
7743
- _inherits$f(Header, Component);
7833
+ _inherits$h(Header, Component);
7744
7834
  function Header(options) {
7745
7835
  if (options === void 0) options = {};
7746
- return Component.call(this, _extends$e({}, options, {
7836
+ return Component.call(this, _extends$g({}, options, {
7747
7837
  cType: 'header'
7748
7838
  })) || this;
7749
7839
  }
@@ -7909,8 +7999,8 @@
7909
7999
  };
7910
8000
  }
7911
8001
 
7912
- function _extends$d() {
7913
- _extends$d = Object.assign || function(target) {
8002
+ function _extends$f() {
8003
+ _extends$f = Object.assign || function(target) {
7914
8004
  for(var i = 1; i < arguments.length; i++){
7915
8005
  var source = arguments[i];
7916
8006
  for(var key in source){
@@ -7921,9 +8011,9 @@
7921
8011
  }
7922
8012
  return target;
7923
8013
  };
7924
- return _extends$d.apply(this, arguments);
8014
+ return _extends$f.apply(this, arguments);
7925
8015
  }
7926
- function _inherits$e(subClass, superClass) {
8016
+ function _inherits$g(subClass, superClass) {
7927
8017
  if (typeof superClass !== "function" && superClass !== null) {
7928
8018
  throw new TypeError("Super expression must either be null or a function");
7929
8019
  }
@@ -7934,23 +8024,23 @@
7934
8024
  configurable: true
7935
8025
  }
7936
8026
  });
7937
- if (superClass) _set_prototype_of$e(subClass, superClass);
8027
+ if (superClass) _set_prototype_of$g(subClass, superClass);
7938
8028
  }
7939
- function _set_prototype_of$e(o, p) {
7940
- _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8029
+ function _set_prototype_of$g(o, p) {
8030
+ _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7941
8031
  o.__proto__ = p;
7942
8032
  return o;
7943
8033
  };
7944
- return _set_prototype_of$e(o, p);
8034
+ return _set_prototype_of$g(o, p);
7945
8035
  }
7946
8036
  /**
7947
8037
  * 全局全屏
7948
8038
  * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
7949
8039
  * @category Control
7950
8040
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
7951
- _inherits$e(GlobalFullscreen, Fullscreen);
8041
+ _inherits$g(GlobalFullscreen, Fullscreen);
7952
8042
  function GlobalFullscreen(options) {
7953
- return Fullscreen.call(this, _extends$d({}, options, {
8043
+ return Fullscreen.call(this, _extends$f({}, options, {
7954
8044
  controlType: 'button',
7955
8045
  classNameSuffix: 'global-fullscreen'
7956
8046
  })) || this;
@@ -7981,8 +8071,8 @@
7981
8071
  return GlobalFullscreen;
7982
8072
  }(Fullscreen);
7983
8073
 
7984
- function _extends$c() {
7985
- _extends$c = Object.assign || function(target) {
8074
+ function _extends$e() {
8075
+ _extends$e = Object.assign || function(target) {
7986
8076
  for(var i = 1; i < arguments.length; i++){
7987
8077
  var source = arguments[i];
7988
8078
  for(var key in source){
@@ -7993,9 +8083,9 @@
7993
8083
  }
7994
8084
  return target;
7995
8085
  };
7996
- return _extends$c.apply(this, arguments);
8086
+ return _extends$e.apply(this, arguments);
7997
8087
  }
7998
- function _inherits$d(subClass, superClass) {
8088
+ function _inherits$f(subClass, superClass) {
7999
8089
  if (typeof superClass !== "function" && superClass !== null) {
8000
8090
  throw new TypeError("Super expression must either be null or a function");
8001
8091
  }
@@ -8006,23 +8096,23 @@
8006
8096
  configurable: true
8007
8097
  }
8008
8098
  });
8009
- if (superClass) _set_prototype_of$d(subClass, superClass);
8099
+ if (superClass) _set_prototype_of$f(subClass, superClass);
8010
8100
  }
8011
- function _set_prototype_of$d(o, p) {
8012
- _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8101
+ function _set_prototype_of$f(o, p) {
8102
+ _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8013
8103
  o.__proto__ = p;
8014
8104
  return o;
8015
8105
  };
8016
- return _set_prototype_of$d(o, p);
8106
+ return _set_prototype_of$f(o, p);
8017
8107
  }
8018
8108
  /**
8019
8109
  * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
8020
8110
  * @category Control
8021
8111
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
8022
- _inherits$d(CapturePicture, Control);
8112
+ _inherits$f(CapturePicture, Control);
8023
8113
  function CapturePicture(options) {
8024
8114
  var _this;
8025
- _this = Control.call(this, _extends$c({}, options, {
8115
+ _this = Control.call(this, _extends$e({}, options, {
8026
8116
  tagName: 'span',
8027
8117
  classNameSuffix: 'capture-picture'
8028
8118
  })) || this, _this._timer = null;
@@ -8075,7 +8165,25 @@
8075
8165
  return CapturePicture;
8076
8166
  }(Control);
8077
8167
 
8078
- var dist$3 = {};
8168
+ var dist$5 = {};
8169
+
8170
+ var dist$4 = {};
8171
+
8172
+ /*
8173
+ * @ezuikit/utils-tools v2.0.1
8174
+ * tools utils
8175
+ * Copyright (c) 2025-12-02 Ezviz-OpenBiz
8176
+ * Released under the MIT License.
8177
+ */
8178
+
8179
+ var hasRequiredDist$5;
8180
+
8181
+ function requireDist$5 () {
8182
+ if (hasRequiredDist$5) return dist$4;
8183
+ hasRequiredDist$5 = 1;
8184
+ var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _create_for_of_iterator_helper_loose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var DateTime=function(){function DateTime(){}return DateTime.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},DateTime.format=function(input,format){var date;if(_instanceof(input,Date))date=input;else {if("number"!=typeof input&&"string"!=typeof input)throw new Error("Invalid date input");date=DateTime.toDate(input+"");}for(var _step,result=format,_iterator=_create_for_of_iterator_helper_loose([[/(yyyy|YYYY)/g,function(){return DateTime.fillZero(date.getFullYear(),4)}],[/(yy|YY)/g,function(){return DateTime.fillZero(date.getFullYear()%100,2)}],[/(MM)/g,function(){return DateTime.fillZero(date.getMonth()+1,2)}],[/(M)/g,function(){return (date.getMonth()+1).toString()}],[/(dd|DD)/g,function(){return DateTime.fillZero(date.getDate(),2)}],[/(d|D)/g,function(){return date.getDate().toString()}],[/(HH|hh)/g,function(){return DateTime.fillZero(date.getHours(),2)}],[/(H|h)/g,function(){return date.getHours().toString()}],[/(mm)/g,function(){return DateTime.fillZero(date.getMinutes(),2)}],[/(m)/g,function(){return date.getMinutes().toString()}],[/(ss|SS)/g,function(){return DateTime.fillZero(date.getSeconds(),2)}],[/(s|S)/g,function(){return date.getSeconds().toString()}],[/(fff)/g,function(){return DateTime.fillZero(date.getMilliseconds(),3)}]]);!(_step=_iterator()).done;){var _step_value=_step.value,regexp=_step_value[0],fn=_step_value[1];result=result.replace(regexp,fn);}return result},DateTime.toDate=function(str){if(_instanceof(str,Date))return str;str=(str+"").trim().replace(/\/|\./gi,"-"),/^\d{4}$/.test(str)&&(str+="-01"),/^\d{4}-\d{2}$/.test(str)&&(str+="-01");try{return /^\d{4}-\d{2}-\d{2}$/.test(str)?new Date(str+"T00:00:00"):/^\d{8}$/.test(str)?(str+="",new Date(str.slice(0,4)+"-"+str.slice(4,6)+"-"+str.slice(6,8)+"T00:00:00")):/^\d{14}$/.test(str)?(str+="",new Date(str.slice(0,4)+"-"+str.slice(4,6)+"-"+str.slice(6,8)+"T"+str.slice(8,10)+":"+str.slice(10,12)+":"+str.slice(12,14))):/^\d{13}$/.test(str)?new Date(Number(str)):/^\d{10}$/.test(str)?new Date(1e3*Number(str)):new Date(str)}catch(error){throw new Error("Invalid date string")}},DateTime.diff=function(date1,date2,type){ void 0===type&&(type="second");var d1=DateTime.toDate(date1),d2=DateTime.toDate(date2);return "second"===type?Math.floor((d1.getTime()-d2.getTime())/1e3):"minute"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60):"hour"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60):"day"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60/24):Math.abs(d1.getTime()-d2.getTime())},DateTime}();dist$4.DateTime=DateTime,dist$4.addVc=function(url,codecs){ void 0===codecs&&(codecs=["h264"]);var vc=(codecs||["h264"]).reduce((function(acc,key){return key=key.toLowerCase(),acc+(codec[key]||0)}),0),host=url.split("?")[0],query=url.split("?")[1];return query=(query||"").split("&").filter((function(item){return !/^vc=\d?/.test(item)})).join("&"),host+"?"+(query+=(query?"&":"")+"vc="+vc)},dist$4.getQuery=getQuery,dist$4.getStaticPath=function(path,base){ void 0===base&&(base="");var protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$4.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$4.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(agent||(null==(_navigator1=navigator)?void 0:_navigator1.userAgent))&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||!!(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$4.parseEzopenUrl=parseEzopenUrl,dist$4.pick=function(obj,keys){return Object.entries(obj).reduce((function(acc,param){var key=param[0],value=param[1];return keys.includes(key)&&(acc[key]=value),acc}),{})},dist$4.switchEzopenUrl=function(url,options){var _ref=null!=options?options:{},type=_ref.type,recType=_ref.recType,search=_ref.search,definition=_ref.definition,channelNo=_ref.channelNo,deviceSerial=_ref.deviceSerial,validateCode=_ref.validateCode,obj=parseEzopenUrl(url);if(search){var ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce((function(acc,param){var key=param[0],value=param[1];return ""===value?acc:acc+=key+"="+encodeURIComponent(value)+"&"}),"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,obj.protocol+"//"+(validateCode?validateCode+"@":"")+obj.hostname+"/"+deviceSerial+"/"+channelNo+("rec"===type&&recType?"."+recType:"")+("live"===type&&"hd"===definition?"."+definition:"")+"."+type+search};
8185
+ return dist$4;
8186
+ }
8079
8187
 
8080
8188
  /*
8081
8189
  * @ezuikit/control-ptz v0.0.1
@@ -8083,14 +8191,14 @@
8083
8191
  * Released under the MIT License.
8084
8192
  */
8085
8193
 
8086
- var hasRequiredDist$3;
8194
+ var hasRequiredDist$4;
8087
8195
 
8088
- function requireDist$3 () {
8089
- if (hasRequiredDist$3) return dist$3;
8090
- hasRequiredDist$3 = 1;
8196
+ function requireDist$4 () {
8197
+ if (hasRequiredDist$4) return dist$5;
8198
+ hasRequiredDist$4 = 1;
8091
8199
 
8092
8200
  var deepmerge = requireCjs();
8093
- var utilsTools = requireDist$7();
8201
+ var utilsTools = requireDist$5();
8094
8202
 
8095
8203
  var en_US = {
8096
8204
  GET_PTZ_STATUS: 'Get current PTZ status',
@@ -9010,13 +9118,13 @@
9010
9118
  return Ptz;
9011
9119
  }(BasePtz);
9012
9120
 
9013
- dist$3.BasePtz = BasePtz;
9014
- dist$3.MobilePtz = MobilePtz;
9015
- dist$3.Ptz = Ptz;
9016
- return dist$3;
9121
+ dist$5.BasePtz = BasePtz;
9122
+ dist$5.MobilePtz = MobilePtz;
9123
+ dist$5.Ptz = Ptz;
9124
+ return dist$5;
9017
9125
  }
9018
9126
 
9019
- var distExports$2 = requireDist$3();
9127
+ var distExports$2 = requireDist$4();
9020
9128
 
9021
9129
  function _defineProperties$4(target, props) {
9022
9130
  for(var i = 0; i < props.length; i++){
@@ -9031,8 +9139,8 @@
9031
9139
  if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
9032
9140
  return Constructor;
9033
9141
  }
9034
- function _extends$b() {
9035
- _extends$b = Object.assign || function(target) {
9142
+ function _extends$d() {
9143
+ _extends$d = Object.assign || function(target) {
9036
9144
  for(var i = 1; i < arguments.length; i++){
9037
9145
  var source = arguments[i];
9038
9146
  for(var key in source){
@@ -9043,9 +9151,9 @@
9043
9151
  }
9044
9152
  return target;
9045
9153
  };
9046
- return _extends$b.apply(this, arguments);
9154
+ return _extends$d.apply(this, arguments);
9047
9155
  }
9048
- function _inherits$c(subClass, superClass) {
9156
+ function _inherits$e(subClass, superClass) {
9049
9157
  if (typeof superClass !== "function" && superClass !== null) {
9050
9158
  throw new TypeError("Super expression must either be null or a function");
9051
9159
  }
@@ -9056,23 +9164,23 @@
9056
9164
  configurable: true
9057
9165
  }
9058
9166
  });
9059
- if (superClass) _set_prototype_of$c(subClass, superClass);
9167
+ if (superClass) _set_prototype_of$e(subClass, superClass);
9060
9168
  }
9061
- function _set_prototype_of$c(o, p) {
9062
- _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9169
+ function _set_prototype_of$e(o, p) {
9170
+ _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9063
9171
  o.__proto__ = p;
9064
9172
  return o;
9065
9173
  };
9066
- return _set_prototype_of$c(o, p);
9174
+ return _set_prototype_of$e(o, p);
9067
9175
  }
9068
9176
  /**
9069
9177
  * 云台控件
9070
9178
  * @category Control
9071
9179
  */ var Ptz = /*#__PURE__*/ function(Control) {
9072
- _inherits$c(Ptz, Control);
9180
+ _inherits$e(Ptz, Control);
9073
9181
  function Ptz(options) {
9074
9182
  var _this;
9075
- _this = Control.call(this, _extends$b({}, options, {
9183
+ _this = Control.call(this, _extends$d({}, options, {
9076
9184
  tagName: 'span',
9077
9185
  controlType: 'button',
9078
9186
  classNameSuffix: 'ptz'
@@ -9115,7 +9223,7 @@
9115
9223
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
9116
9224
  this.$panel.appendChild(this.$turntable);
9117
9225
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9118
- this._ptzControl = new distExports$2.Ptz(this.$turntable, _extends$b({}, this._options, {
9226
+ this._ptzControl = new distExports$2.Ptz(this.$turntable, _extends$d({}, this._options, {
9119
9227
  onSpeedChange: this._onSpeedChange.bind(this),
9120
9228
  onDirection: this._onDirection.bind(this)
9121
9229
  }));
@@ -9124,7 +9232,7 @@
9124
9232
  };
9125
9233
  _proto.renderMobileExtend = function renderMobileExtend($container) {
9126
9234
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9127
- if (!this._ptzControl1) this._ptzControl1 = new distExports$2.MobilePtz($container, _extends$b({}, this._options, {
9235
+ if (!this._ptzControl1) this._ptzControl1 = new distExports$2.MobilePtz($container, _extends$d({}, this._options, {
9128
9236
  onSpeedChange: this._onSpeedChange.bind(this),
9129
9237
  onDirection: this._onDirection.bind(this)
9130
9238
  }));
@@ -9227,8 +9335,8 @@
9227
9335
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
9228
9336
  return Constructor;
9229
9337
  }
9230
- function _extends$a() {
9231
- _extends$a = Object.assign || function(target) {
9338
+ function _extends$c() {
9339
+ _extends$c = Object.assign || function(target) {
9232
9340
  for(var i = 1; i < arguments.length; i++){
9233
9341
  var source = arguments[i];
9234
9342
  for(var key in source){
@@ -9239,9 +9347,9 @@
9239
9347
  }
9240
9348
  return target;
9241
9349
  };
9242
- return _extends$a.apply(this, arguments);
9350
+ return _extends$c.apply(this, arguments);
9243
9351
  }
9244
- function _inherits$b(subClass, superClass) {
9352
+ function _inherits$d(subClass, superClass) {
9245
9353
  if (typeof superClass !== "function" && superClass !== null) {
9246
9354
  throw new TypeError("Super expression must either be null or a function");
9247
9355
  }
@@ -9252,14 +9360,14 @@
9252
9360
  configurable: true
9253
9361
  }
9254
9362
  });
9255
- if (superClass) _set_prototype_of$b(subClass, superClass);
9363
+ if (superClass) _set_prototype_of$d(subClass, superClass);
9256
9364
  }
9257
- function _set_prototype_of$b(o, p) {
9258
- _set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9365
+ function _set_prototype_of$d(o, p) {
9366
+ _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9259
9367
  o.__proto__ = p;
9260
9368
  return o;
9261
9369
  };
9262
- return _set_prototype_of$b(o, p);
9370
+ return _set_prototype_of$d(o, p);
9263
9371
  }
9264
9372
  var RECORD_DEFAULT_OPTIONS = {
9265
9373
  maxDuration: 3600
@@ -9273,10 +9381,10 @@
9273
9381
  * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
9274
9382
  * @category Control
9275
9383
  */ var Record = /*#__PURE__*/ function(Control) {
9276
- _inherits$b(Record, Control);
9384
+ _inherits$d(Record, Control);
9277
9385
  function Record(options) {
9278
9386
  var _this;
9279
- _this = Control.call(this, _extends$a({}, options, {
9387
+ _this = Control.call(this, _extends$c({}, options, {
9280
9388
  tagName: 'span',
9281
9389
  controlType: 'button',
9282
9390
  classNameSuffix: 'record'
@@ -9285,94 +9393,602 @@
9285
9393
  _this._render();
9286
9394
  return _this;
9287
9395
  }
9288
- var _proto = Record.prototype;
9289
- /**
9290
- * 渲染图标
9291
- */ _proto._render = function _render() {
9396
+ var _proto = Record.prototype;
9397
+ /**
9398
+ * 渲染图标
9399
+ */ _proto._render = function _render() {
9400
+ var _this_locale;
9401
+ this.$container.innerHTML = IconComponents.record({
9402
+ title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_RECORDVIDEO
9403
+ });
9404
+ };
9405
+ /**
9406
+ * 渲染计时器
9407
+ */ _proto._renderTimer = function _renderTimer() {
9408
+ var _this = this;
9409
+ var _this__options_rootContainer, _this__options;
9410
+ this._timerNode = document.createElement('span');
9411
+ this._timerNode.className = "" + PREFIX_CLASS + "-record-timer";
9412
+ (_this__options = this._options) == null ? void 0 : (_this__options_rootContainer = _this__options.rootContainer) == null ? void 0 : _this__options_rootContainer.appendChild(this._timerNode);
9413
+ this._timerNode.innerHTML = IconComponents.recordCircle() + '<span class="' + PREFIX_CLASS + '-record-timer-time">' + formatTime(this._seconds) + "<span>";
9414
+ var $time = this._timerNode.querySelector("." + PREFIX_CLASS + "-record-timer-time");
9415
+ this._timer = setInterval(function() {
9416
+ _this._seconds++;
9417
+ if (_this._seconds >= _this._options.maxDuration) {
9418
+ // 录制时长不能超过一个小时, 因为录制的数据需要占用浏览器内存
9419
+ _this._destroyTimer();
9420
+ return;
9421
+ }
9422
+ if ($time) $time.innerHTML = "" + formatTime(_this._seconds);
9423
+ }, 1000);
9424
+ };
9425
+ _proto.reset = function reset() {
9426
+ if (this.active) {
9427
+ this.active = false;
9428
+ Control.prototype.reset.call(this);
9429
+ }
9430
+ };
9431
+ _proto.destroy = function destroy() {
9432
+ this._destroyTimer();
9433
+ Control.prototype.destroy.call(this);
9434
+ };
9435
+ /**
9436
+ * 销毁定时器和销毁节点
9437
+ */ _proto._destroyTimer = function _destroyTimer() {
9438
+ this._seconds = 0;
9439
+ if (this._timer) {
9440
+ clearInterval(this._timer);
9441
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9442
+ this._timer = null;
9443
+ }
9444
+ if (this._timerNode) {
9445
+ this._timerNode.remove();
9446
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9447
+ this._timerNode = null;
9448
+ }
9449
+ this._active = false;
9450
+ };
9451
+ /**
9452
+ * 点击 Control 会触发
9453
+ */ _proto._onControlClick = function _onControlClick(e) {
9454
+ this.active = !this.active;
9455
+ Control.prototype._onControlClick.call(this, e);
9456
+ };
9457
+ _create_class$3(Record, [
9458
+ {
9459
+ key: "active",
9460
+ get: /**
9461
+ * 是否激活
9462
+ */ function get() {
9463
+ return this._active;
9464
+ },
9465
+ set: function set(active) {
9466
+ if (this._disabled && !this._active) {
9467
+ // 不允许禁用情况下激活
9468
+ return;
9469
+ }
9470
+ if (this._active !== active) {
9471
+ this._active = active;
9472
+ this._updateActiveState(active);
9473
+ if (this.active) {
9474
+ this._renderTimer();
9475
+ } else {
9476
+ this._destroyTimer();
9477
+ }
9478
+ this.emit(EVENTS.control.recordingChange, this._active);
9479
+ }
9480
+ }
9481
+ }
9482
+ ]);
9483
+ return Record;
9484
+ }(Control);
9485
+
9486
+ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
9487
+ try {
9488
+ var info = gen[key](arg);
9489
+ var value = info.value;
9490
+ } catch (error) {
9491
+ reject(error);
9492
+ return;
9493
+ }
9494
+ if (info.done) {
9495
+ resolve(value);
9496
+ } else {
9497
+ Promise.resolve(value).then(_next, _throw);
9498
+ }
9499
+ }
9500
+ function _async_to_generator$4(fn) {
9501
+ return function() {
9502
+ var self = this, args = arguments;
9503
+ return new Promise(function(resolve, reject) {
9504
+ var gen = fn.apply(self, args);
9505
+ function _next(value) {
9506
+ asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
9507
+ }
9508
+ function _throw(err) {
9509
+ asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
9510
+ }
9511
+ _next(undefined);
9512
+ });
9513
+ };
9514
+ }
9515
+ function _defineProperties$2(target, props) {
9516
+ for(var i = 0; i < props.length; i++){
9517
+ var descriptor = props[i];
9518
+ descriptor.enumerable = descriptor.enumerable || false;
9519
+ descriptor.configurable = true;
9520
+ if ("value" in descriptor) descriptor.writable = true;
9521
+ Object.defineProperty(target, descriptor.key, descriptor);
9522
+ }
9523
+ }
9524
+ function _create_class$2(Constructor, protoProps, staticProps) {
9525
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
9526
+ return Constructor;
9527
+ }
9528
+ function _extends$b() {
9529
+ _extends$b = Object.assign || function(target) {
9530
+ for(var i = 1; i < arguments.length; i++){
9531
+ var source = arguments[i];
9532
+ for(var key in source){
9533
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
9534
+ target[key] = source[key];
9535
+ }
9536
+ }
9537
+ }
9538
+ return target;
9539
+ };
9540
+ return _extends$b.apply(this, arguments);
9541
+ }
9542
+ function _inherits$c(subClass, superClass) {
9543
+ if (typeof superClass !== "function" && superClass !== null) {
9544
+ throw new TypeError("Super expression must either be null or a function");
9545
+ }
9546
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
9547
+ constructor: {
9548
+ value: subClass,
9549
+ writable: true,
9550
+ configurable: true
9551
+ }
9552
+ });
9553
+ if (superClass) _set_prototype_of$c(subClass, superClass);
9554
+ }
9555
+ function _set_prototype_of$c(o, p) {
9556
+ _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9557
+ o.__proto__ = p;
9558
+ return o;
9559
+ };
9560
+ return _set_prototype_of$c(o, p);
9561
+ }
9562
+ function _ts_generator$4(thisArg, body) {
9563
+ var f, y, t, _ = {
9564
+ label: 0,
9565
+ sent: function() {
9566
+ if (t[0] & 1) throw t[1];
9567
+ return t[1];
9568
+ },
9569
+ trys: [],
9570
+ ops: []
9571
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
9572
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
9573
+ return this;
9574
+ }), g;
9575
+ function verb(n) {
9576
+ return function(v) {
9577
+ return step([
9578
+ n,
9579
+ v
9580
+ ]);
9581
+ };
9582
+ }
9583
+ function step(op) {
9584
+ if (f) throw new TypeError("Generator is already executing.");
9585
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
9586
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
9587
+ if (y = 0, t) op = [
9588
+ op[0] & 2,
9589
+ t.value
9590
+ ];
9591
+ switch(op[0]){
9592
+ case 0:
9593
+ case 1:
9594
+ t = op;
9595
+ break;
9596
+ case 4:
9597
+ _.label++;
9598
+ return {
9599
+ value: op[1],
9600
+ done: false
9601
+ };
9602
+ case 5:
9603
+ _.label++;
9604
+ y = op[1];
9605
+ op = [
9606
+ 0
9607
+ ];
9608
+ continue;
9609
+ case 7:
9610
+ op = _.ops.pop();
9611
+ _.trys.pop();
9612
+ continue;
9613
+ default:
9614
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
9615
+ _ = 0;
9616
+ continue;
9617
+ }
9618
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
9619
+ _.label = op[1];
9620
+ break;
9621
+ }
9622
+ if (op[0] === 6 && _.label < t[1]) {
9623
+ _.label = t[1];
9624
+ t = op;
9625
+ break;
9626
+ }
9627
+ if (t && _.label < t[2]) {
9628
+ _.label = t[2];
9629
+ _.ops.push(op);
9630
+ break;
9631
+ }
9632
+ if (t[2]) _.ops.pop();
9633
+ _.trys.pop();
9634
+ continue;
9635
+ }
9636
+ op = body.call(thisArg, _);
9637
+ } catch (e) {
9638
+ op = [
9639
+ 6,
9640
+ e
9641
+ ];
9642
+ y = 0;
9643
+ } finally{
9644
+ f = t = 0;
9645
+ }
9646
+ if (op[0] & 5) throw op[1];
9647
+ return {
9648
+ value: op[0] ? op[1] : void 0,
9649
+ done: true
9650
+ };
9651
+ }
9652
+ }
9653
+ /**
9654
+ * 对讲控件
9655
+ *
9656
+ * navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
9657
+ * 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
9658
+ * promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
9659
+ *
9660
+ * @category Control
9661
+ */ var Talk = /*#__PURE__*/ function(Control) {
9662
+ _inherits$c(Talk, Control);
9663
+ function Talk(options) {
9664
+ var _this;
9665
+ _this = Control.call(this, _extends$b({}, options, {
9666
+ tagName: 'span',
9667
+ controlType: 'button',
9668
+ classNameSuffix: 'talk'
9669
+ })) || this, _this._value = 0;
9670
+ _this._options = options;
9671
+ _this._render();
9672
+ _this.on(EVENTS.talkingChange, function(talking) {
9673
+ if (_this.active !== talking) {
9674
+ _this.active = talking;
9675
+ _this._render();
9676
+ }
9677
+ });
9678
+ _this.on(EVENTS.talkVolumeChange, function(value) {
9679
+ var _this__options_onChange, _this__options;
9680
+ _this.value = value;
9681
+ (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, value);
9682
+ });
9683
+ return _this;
9684
+ }
9685
+ var _proto = Talk.prototype;
9686
+ _proto._render = function _render() {
9687
+ var _this_locale, _this_locale1;
9688
+ this.$container.innerHTML = this.active ? IconComponents.talkGrowth({
9689
+ title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_TALK
9690
+ }) : IconComponents.talk({
9691
+ title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_TALK
9692
+ });
9693
+ };
9694
+ _proto.reset = function reset(hide) {
9695
+ if (this.active) {
9696
+ this._value = 0;
9697
+ this.active = false;
9698
+ this._render();
9699
+ this.emit(EVENTS.control.talkingChange, false);
9700
+ Control.prototype.reset.call(this, hide);
9701
+ }
9702
+ };
9703
+ /**
9704
+ * 销毁对讲
9705
+ */ _proto.destroy = function destroy() {
9706
+ if (this.active) {
9707
+ this.reset();
9708
+ }
9709
+ Control.prototype.destroy.call(this);
9710
+ };
9711
+ /**
9712
+ * 点击 Control 会触发
9713
+ */ _proto._onControlClick = function _onControlClick(e) {
9714
+ var _this = this, _superprop_get__onControlClick = function() {
9715
+ return Control.prototype._onControlClick;
9716
+ };
9717
+ return _async_to_generator$4(function() {
9718
+ return _ts_generator$4(this, function(_state) {
9719
+ _superprop_get__onControlClick().call(_this, e);
9720
+ this.active = !this.active;
9721
+ this.emit(EVENTS.control.talkingChange, this.active);
9722
+ this._render();
9723
+ return [
9724
+ 2
9725
+ ];
9726
+ });
9727
+ }).call(this);
9728
+ };
9729
+ _create_class$2(Talk, [
9730
+ {
9731
+ key: "value",
9732
+ get: /**
9733
+ * 获取当前值
9734
+ */ function get() {
9735
+ return this._value;
9736
+ },
9737
+ set: /**
9738
+ * 设置当前值 [0-1]
9739
+ */ function set(value) {
9740
+ // 没有激活状态,则不处理
9741
+ if (!this.active) {
9742
+ return;
9743
+ }
9744
+ if (value < 0 || value > 1) {
9745
+ return;
9746
+ }
9747
+ this._value = value;
9748
+ var gainType = 'silent';
9749
+ if (value > 0 && value < 0.25) {
9750
+ gainType = 'low';
9751
+ } else if (value >= 0.25 && value < 0.5) {
9752
+ gainType = 'normal';
9753
+ } else if (value >= 0.5 && value < 0.75) {
9754
+ gainType = 'high';
9755
+ } else if (value >= 0.75) {
9756
+ gainType = 'deafening';
9757
+ }
9758
+ var className = Array.from(this.$container.classList).find(function(className) {
9759
+ return className.startsWith("" + PREFIX_CLASS + "-talk-gain-");
9760
+ });
9761
+ if (className) this.$container.classList.remove(className);
9762
+ this.$container.classList.add(PREFIX_CLASS + "-talk-gain-" + gainType);
9763
+ }
9764
+ }
9765
+ ]);
9766
+ return Talk;
9767
+ }(Control);
9768
+
9769
+ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
9770
+ try {
9771
+ var info = gen[key](arg);
9772
+ var value = info.value;
9773
+ } catch (error) {
9774
+ reject(error);
9775
+ return;
9776
+ }
9777
+ if (info.done) {
9778
+ resolve(value);
9779
+ } else {
9780
+ Promise.resolve(value).then(_next, _throw);
9781
+ }
9782
+ }
9783
+ function _async_to_generator$3(fn) {
9784
+ return function() {
9785
+ var self = this, args = arguments;
9786
+ return new Promise(function(resolve, reject) {
9787
+ var gen = fn.apply(self, args);
9788
+ function _next(value) {
9789
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
9790
+ }
9791
+ function _throw(err) {
9792
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
9793
+ }
9794
+ _next(undefined);
9795
+ });
9796
+ };
9797
+ }
9798
+ function _extends$a() {
9799
+ _extends$a = Object.assign || function(target) {
9800
+ for(var i = 1; i < arguments.length; i++){
9801
+ var source = arguments[i];
9802
+ for(var key in source){
9803
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
9804
+ target[key] = source[key];
9805
+ }
9806
+ }
9807
+ }
9808
+ return target;
9809
+ };
9810
+ return _extends$a.apply(this, arguments);
9811
+ }
9812
+ function _inherits$b(subClass, superClass) {
9813
+ if (typeof superClass !== "function" && superClass !== null) {
9814
+ throw new TypeError("Super expression must either be null or a function");
9815
+ }
9816
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
9817
+ constructor: {
9818
+ value: subClass,
9819
+ writable: true,
9820
+ configurable: true
9821
+ }
9822
+ });
9823
+ if (superClass) _set_prototype_of$b(subClass, superClass);
9824
+ }
9825
+ function _set_prototype_of$b(o, p) {
9826
+ _set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
9827
+ o.__proto__ = p;
9828
+ return o;
9829
+ };
9830
+ return _set_prototype_of$b(o, p);
9831
+ }
9832
+ function _ts_generator$3(thisArg, body) {
9833
+ var f, y, t, _ = {
9834
+ label: 0,
9835
+ sent: function() {
9836
+ if (t[0] & 1) throw t[1];
9837
+ return t[1];
9838
+ },
9839
+ trys: [],
9840
+ ops: []
9841
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
9842
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
9843
+ return this;
9844
+ }), g;
9845
+ function verb(n) {
9846
+ return function(v) {
9847
+ return step([
9848
+ n,
9849
+ v
9850
+ ]);
9851
+ };
9852
+ }
9853
+ function step(op) {
9854
+ if (f) throw new TypeError("Generator is already executing.");
9855
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
9856
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
9857
+ if (y = 0, t) op = [
9858
+ op[0] & 2,
9859
+ t.value
9860
+ ];
9861
+ switch(op[0]){
9862
+ case 0:
9863
+ case 1:
9864
+ t = op;
9865
+ break;
9866
+ case 4:
9867
+ _.label++;
9868
+ return {
9869
+ value: op[1],
9870
+ done: false
9871
+ };
9872
+ case 5:
9873
+ _.label++;
9874
+ y = op[1];
9875
+ op = [
9876
+ 0
9877
+ ];
9878
+ continue;
9879
+ case 7:
9880
+ op = _.ops.pop();
9881
+ _.trys.pop();
9882
+ continue;
9883
+ default:
9884
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
9885
+ _ = 0;
9886
+ continue;
9887
+ }
9888
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
9889
+ _.label = op[1];
9890
+ break;
9891
+ }
9892
+ if (op[0] === 6 && _.label < t[1]) {
9893
+ _.label = t[1];
9894
+ t = op;
9895
+ break;
9896
+ }
9897
+ if (t && _.label < t[2]) {
9898
+ _.label = t[2];
9899
+ _.ops.push(op);
9900
+ break;
9901
+ }
9902
+ if (t[2]) _.ops.pop();
9903
+ _.trys.pop();
9904
+ continue;
9905
+ }
9906
+ op = body.call(thisArg, _);
9907
+ } catch (e) {
9908
+ op = [
9909
+ 6,
9910
+ e
9911
+ ];
9912
+ y = 0;
9913
+ } finally{
9914
+ f = t = 0;
9915
+ }
9916
+ if (op[0] & 5) throw op[1];
9917
+ return {
9918
+ value: op[0] ? op[1] : void 0,
9919
+ done: true
9920
+ };
9921
+ }
9922
+ }
9923
+ /**
9924
+ * 语音广播控件
9925
+ *
9926
+ * 用于触发语音广播功能的按钮控件
9927
+ *
9928
+ * @category Control
9929
+ */ var Broadcast = /*#__PURE__*/ function(Control) {
9930
+ _inherits$b(Broadcast, Control);
9931
+ function Broadcast(options) {
9932
+ var _this;
9933
+ _this = Control.call(this, _extends$a({}, options, {
9934
+ tagName: 'span',
9935
+ controlType: 'button',
9936
+ classNameSuffix: 'broadcast'
9937
+ })) || this;
9938
+ _this._options = options;
9939
+ _this._render();
9940
+ _this.on(EVENTS.broadcastChange, function(active) {
9941
+ if (_this.active !== active) {
9942
+ _this.active = active;
9943
+ _this._render();
9944
+ }
9945
+ });
9946
+ return _this;
9947
+ }
9948
+ var _proto = Broadcast.prototype;
9949
+ _proto._render = function _render() {
9292
9950
  var _this_locale;
9293
- this.$container.innerHTML = IconComponents.record({
9294
- title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_RECORDVIDEO
9951
+ this.$container.innerHTML = IconComponents.broadcast({
9952
+ title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_BROADCAST
9295
9953
  });
9296
9954
  };
9297
- /**
9298
- * 渲染计时器
9299
- */ _proto._renderTimer = function _renderTimer() {
9300
- var _this = this;
9301
- var _this__options_rootContainer, _this__options;
9302
- this._timerNode = document.createElement('span');
9303
- this._timerNode.className = "" + PREFIX_CLASS + "-record-timer";
9304
- (_this__options = this._options) == null ? void 0 : (_this__options_rootContainer = _this__options.rootContainer) == null ? void 0 : _this__options_rootContainer.appendChild(this._timerNode);
9305
- this._timerNode.innerHTML = IconComponents.recordCircle() + '<span class="' + PREFIX_CLASS + '-record-timer-time">' + formatTime(this._seconds) + "<span>";
9306
- var $time = this._timerNode.querySelector("." + PREFIX_CLASS + "-record-timer-time");
9307
- this._timer = setInterval(function() {
9308
- _this._seconds++;
9309
- if (_this._seconds >= _this._options.maxDuration) {
9310
- // 录制时长不能超过一个小时, 因为录制的数据需要占用浏览器内存
9311
- _this._destroyTimer();
9312
- return;
9313
- }
9314
- if ($time) $time.innerHTML = "" + formatTime(_this._seconds);
9315
- }, 1000);
9316
- };
9317
- _proto.reset = function reset() {
9955
+ _proto.reset = function reset(hide) {
9318
9956
  if (this.active) {
9319
9957
  this.active = false;
9320
- Control.prototype.reset.call(this);
9958
+ this._render();
9959
+ this.emit(EVENTS.control.broadcastChange, false);
9960
+ Control.prototype.reset.call(this, hide);
9321
9961
  }
9322
9962
  };
9323
- _proto.destroy = function destroy() {
9324
- this._destroyTimer();
9325
- Control.prototype.destroy.call(this);
9326
- };
9327
9963
  /**
9328
- * 销毁定时器和销毁节点
9329
- */ _proto._destroyTimer = function _destroyTimer() {
9330
- this._seconds = 0;
9331
- if (this._timer) {
9332
- clearInterval(this._timer);
9333
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9334
- this._timer = null;
9335
- }
9336
- if (this._timerNode) {
9337
- this._timerNode.remove();
9338
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9339
- this._timerNode = null;
9964
+ * 销毁语音广播控件
9965
+ */ _proto.destroy = function destroy() {
9966
+ if (this.active) {
9967
+ this.reset();
9340
9968
  }
9341
- this._active = false;
9969
+ Control.prototype.destroy.call(this);
9342
9970
  };
9343
9971
  /**
9344
- * 点击 Control 会触发
9345
- */ _proto._onControlClick = function _onControlClick(e) {
9346
- this.active = !this.active;
9347
- Control.prototype._onControlClick.call(this, e);
9972
+ * 点击 Control 会触发
9973
+ */ _proto._onControlClick = function _onControlClick(e) {
9974
+ var _this = this, _superprop_get__onControlClick = function() {
9975
+ return Control.prototype._onControlClick;
9976
+ };
9977
+ return _async_to_generator$3(function() {
9978
+ var _this__options_onChange, _this__options;
9979
+ return _ts_generator$3(this, function(_state) {
9980
+ _superprop_get__onControlClick().call(_this, e);
9981
+ this.active = !this.active;
9982
+ this.emit(EVENTS.control.broadcastChange, this.active);
9983
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this.active);
9984
+ this._render();
9985
+ return [
9986
+ 2
9987
+ ];
9988
+ });
9989
+ }).call(this);
9348
9990
  };
9349
- _create_class$3(Record, [
9350
- {
9351
- key: "active",
9352
- get: /**
9353
- * 是否激活
9354
- */ function get() {
9355
- return this._active;
9356
- },
9357
- set: function set(active) {
9358
- if (this._disabled && !this._active) {
9359
- // 不允许禁用情况下激活
9360
- return;
9361
- }
9362
- if (this._active !== active) {
9363
- this._active = active;
9364
- this._updateActiveState(active);
9365
- if (this.active) {
9366
- this._renderTimer();
9367
- } else {
9368
- this._destroyTimer();
9369
- }
9370
- this.emit(EVENTS.control.recordingChange, this._active);
9371
- }
9372
- }
9373
- }
9374
- ]);
9375
- return Record;
9991
+ return Broadcast;
9376
9992
  }(Control);
9377
9993
 
9378
9994
  function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
@@ -9404,19 +10020,6 @@
9404
10020
  });
9405
10021
  };
9406
10022
  }
9407
- function _defineProperties$2(target, props) {
9408
- for(var i = 0; i < props.length; i++){
9409
- var descriptor = props[i];
9410
- descriptor.enumerable = descriptor.enumerable || false;
9411
- descriptor.configurable = true;
9412
- if ("value" in descriptor) descriptor.writable = true;
9413
- Object.defineProperty(target, descriptor.key, descriptor);
9414
- }
9415
- }
9416
- function _create_class$2(Constructor, protoProps, staticProps) {
9417
- if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
9418
- return Constructor;
9419
- }
9420
10023
  function _extends$9() {
9421
10024
  _extends$9 = Object.assign || function(target) {
9422
10025
  for(var i = 1; i < arguments.length; i++){
@@ -9543,74 +10146,66 @@
9543
10146
  }
9544
10147
  }
9545
10148
  /**
9546
- * 对讲控件
10149
+ * AI对话框控件
9547
10150
  *
9548
- * navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
9549
- * 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
9550
- * promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
10151
+ * 用于触发AI对话框功能的按钮控件
9551
10152
  *
9552
10153
  * @category Control
9553
- */ var Talk = /*#__PURE__*/ function(Control) {
9554
- _inherits$a(Talk, Control);
9555
- function Talk(options) {
10154
+ */ var AIChat = /*#__PURE__*/ function(Control) {
10155
+ _inherits$a(AIChat, Control);
10156
+ function AIChat(options) {
9556
10157
  var _this;
9557
10158
  _this = Control.call(this, _extends$9({}, options, {
9558
10159
  tagName: 'span',
9559
10160
  controlType: 'button',
9560
- classNameSuffix: 'talk'
9561
- })) || this, _this._value = 0;
10161
+ classNameSuffix: 'aichat'
10162
+ })) || this;
9562
10163
  _this._options = options;
9563
10164
  _this._render();
9564
- _this.on(EVENTS.talkingChange, function(talking) {
9565
- if (_this.active !== talking) {
9566
- _this.active = talking;
10165
+ _this.on(EVENTS.aichatChange, function(active) {
10166
+ if (_this.active !== active) {
10167
+ _this.active = active;
9567
10168
  _this._render();
9568
10169
  }
9569
10170
  });
9570
- _this.on(EVENTS.talkVolumeChange, function(value) {
9571
- var _this__options_onChange, _this__options;
9572
- _this.value = value;
9573
- (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, value);
9574
- });
9575
10171
  return _this;
9576
10172
  }
9577
- var _proto = Talk.prototype;
10173
+ var _proto = AIChat.prototype;
9578
10174
  _proto._render = function _render() {
9579
- var _this_locale, _this_locale1;
9580
- this.$container.innerHTML = this.active ? IconComponents.talkGrowth({
9581
- title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_TALK
9582
- }) : IconComponents.talk({
9583
- title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_TALK
10175
+ var _this_locale;
10176
+ this.$container.innerHTML = IconComponents.aiChat({
10177
+ title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_AICHAT
9584
10178
  });
9585
10179
  };
9586
10180
  _proto.reset = function reset(hide) {
9587
10181
  if (this.active) {
9588
- this._value = 0;
9589
10182
  this.active = false;
9590
10183
  this._render();
9591
- this.emit(EVENTS.control.talkingChange, false);
10184
+ this.emit(EVENTS.control.aichatChange, false);
9592
10185
  Control.prototype.reset.call(this, hide);
9593
10186
  }
9594
10187
  };
9595
10188
  /**
9596
- * 销毁对讲
9597
- */ _proto.destroy = function destroy() {
10189
+ * 销毁AI对话框控件
10190
+ */ _proto.destroy = function destroy() {
9598
10191
  if (this.active) {
9599
10192
  this.reset();
9600
10193
  }
9601
10194
  Control.prototype.destroy.call(this);
9602
10195
  };
9603
10196
  /**
9604
- * 点击 Control 会触发
9605
- */ _proto._onControlClick = function _onControlClick(e) {
10197
+ * 点击 Control 会触发
10198
+ */ _proto._onControlClick = function _onControlClick(e) {
9606
10199
  var _this = this, _superprop_get__onControlClick = function() {
9607
10200
  return Control.prototype._onControlClick;
9608
10201
  };
9609
10202
  return _async_to_generator$2(function() {
10203
+ var _this__options_onChange, _this__options;
9610
10204
  return _ts_generator$2(this, function(_state) {
9611
10205
  _superprop_get__onControlClick().call(_this, e);
9612
10206
  this.active = !this.active;
9613
- this.emit(EVENTS.control.talkingChange, this.active);
10207
+ this.emit(EVENTS.control.aichatChange, this.active);
10208
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this.active);
9614
10209
  this._render();
9615
10210
  return [
9616
10211
  2
@@ -9618,44 +10213,7 @@
9618
10213
  });
9619
10214
  }).call(this);
9620
10215
  };
9621
- _create_class$2(Talk, [
9622
- {
9623
- key: "value",
9624
- get: /**
9625
- * 获取当前值
9626
- */ function get() {
9627
- return this._value;
9628
- },
9629
- set: /**
9630
- * 设置当前值 [0-1]
9631
- */ function set(value) {
9632
- // 没有激活状态,则不处理
9633
- if (!this.active) {
9634
- return;
9635
- }
9636
- if (value < 0 || value > 1) {
9637
- return;
9638
- }
9639
- this._value = value;
9640
- var gainType = 'silent';
9641
- if (value > 0 && value < 0.25) {
9642
- gainType = 'low';
9643
- } else if (value >= 0.25 && value < 0.5) {
9644
- gainType = 'normal';
9645
- } else if (value >= 0.5 && value < 0.75) {
9646
- gainType = 'high';
9647
- } else if (value >= 0.75) {
9648
- gainType = 'deafening';
9649
- }
9650
- var className = Array.from(this.$container.classList).find(function(className) {
9651
- return className.startsWith("" + PREFIX_CLASS + "-talk-gain-");
9652
- });
9653
- if (className) this.$container.classList.remove(className);
9654
- this.$container.classList.add(PREFIX_CLASS + "-talk-gain-" + gainType);
9655
- }
9656
- }
9657
- ]);
9658
- return Talk;
10216
+ return AIChat;
9659
10217
  }(Control);
9660
10218
 
9661
10219
  function _defineProperties$1(target, props) {
@@ -10252,8 +10810,26 @@
10252
10810
  return Speed;
10253
10811
  }(Select);
10254
10812
 
10813
+ var dist$3 = {};
10814
+
10255
10815
  var dist$2 = {};
10256
10816
 
10817
+ /*
10818
+ * @ezuikit/utils-tools v2.0.2
10819
+ * tools utils
10820
+ * Copyright (c) 2026-01-05 Ezviz-OpenBiz
10821
+ * Released under the MIT License.
10822
+ */
10823
+
10824
+ var hasRequiredDist$3;
10825
+
10826
+ function requireDist$3 () {
10827
+ if (hasRequiredDist$3) return dist$2;
10828
+ hasRequiredDist$3 = 1;
10829
+ var getQuery=function(url){var query=url.split("?")[1],obj={};if(query)for(var vars=query.split("&"),i=0;i<vars.length;i++){var pair=vars[i].split("=");obj[pair[0]]=decodeURIComponent(pair[1]);}return obj};function parseEzopenUrl(url){var obj={};if(/^ezopen:\/\//.test(url)){if(url.includes("@")){var endIndex=url.indexOf("@"),startIndex=url.indexOf("//");obj.validateCode=url.substring(startIndex+2,endIndex),url=url.replace(obj.validateCode+"@","");}obj.protocol=url.split("//")[0],obj.search=url.split("?")[1]?"?"+url.split("?")[1]:"",obj.hostname=url.split("/")[2],obj.origin=obj.protocol+"//"+obj.hostname,obj.pathname=url.split("?")[0].replace(obj.origin,""),obj.href=url;var pathnames=obj.pathname.split("/"),lastPath=pathnames[2].split(".");return obj.deviceSerial=pathnames[1],obj.channelNo=lastPath[0],obj.type=lastPath[lastPath.length-1],"live"===obj.type&&(obj.definition=lastPath.length>2?lastPath[1]:"sd"),"rec"===obj.type&&pathnames[2]&&(obj.recType=pathnames[2].includes(".cloud.")?"cloud":""),obj.searchParams=getQuery(url),obj}return {}}var codec={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32};function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right}function _create_for_of_iterator_helper_loose(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(it)return (it=it.call(o)).next.bind(it);if(Array.isArray(o)||(it=function(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return "Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}(o))||allowArrayLike){it&&(o=it);var i=0;return function(){return i>=o.length?{done:true}:{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var DateTime=function(){function DateTime(){}return DateTime.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},DateTime.format=function(input,format){var date;if(_instanceof(input,Date))date=input;else {if("number"!=typeof input&&"string"!=typeof input)throw new Error("Invalid date input");date=DateTime.toDate(input+"");}for(var _step,result=format,_iterator=_create_for_of_iterator_helper_loose([[/(yyyy|YYYY)/g,function(){return DateTime.fillZero(date.getFullYear(),4)}],[/(yy|YY)/g,function(){return DateTime.fillZero(date.getFullYear()%100,2)}],[/(MM)/g,function(){return DateTime.fillZero(date.getMonth()+1,2)}],[/(M)/g,function(){return (date.getMonth()+1).toString()}],[/(dd|DD)/g,function(){return DateTime.fillZero(date.getDate(),2)}],[/(d|D)/g,function(){return date.getDate().toString()}],[/(HH|hh)/g,function(){return DateTime.fillZero(date.getHours(),2)}],[/(H|h)/g,function(){return date.getHours().toString()}],[/(mm)/g,function(){return DateTime.fillZero(date.getMinutes(),2)}],[/(m)/g,function(){return date.getMinutes().toString()}],[/(ss|SS)/g,function(){return DateTime.fillZero(date.getSeconds(),2)}],[/(s|S)/g,function(){return date.getSeconds().toString()}],[/(fff)/g,function(){return DateTime.fillZero(date.getMilliseconds(),3)}]]);!(_step=_iterator()).done;){var _step_value=_step.value,regexp=_step_value[0],fn=_step_value[1];result=result.replace(regexp,fn);}return result},DateTime.toDate=function(str){if(_instanceof(str,Date))return str;str=(str+"").trim().replace(/\/|\./gi,"-"),/^\d{4}$/.test(str)&&(str+="-01"),/^\d{4}-\d{2}$/.test(str)&&(str+="-01");try{return /^\d{4}-\d{2}-\d{2}$/.test(str)?new Date(+str.slice(0,4),+str.slice(5,7)-1,+str.slice(8,10),0,0,0):/^\d{8}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),0,0)):/^\d{14}$/.test(str)?(str+="",new Date(+str.slice(0,4),+str.slice(4,6)-1,+str.slice(6,8),+str.slice(8,10),+str.slice(10,12),+str.slice(12,14))):/^\d{13}$/.test(str)?new Date(Number(str)):/^\d{10}$/.test(str)?new Date(1e3*Number(str)):new Date(str)}catch(error){throw new Error("Invalid date string")}},DateTime.diff=function(date1,date2,type){ void 0===type&&(type="second");var d1=DateTime.toDate(date1),d2=DateTime.toDate(date2);return "second"===type?Math.floor((d1.getTime()-d2.getTime())/1e3):"minute"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60):"hour"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60):"day"===type?Math.floor((d1.getTime()-d2.getTime())/1e3/60/60/24):Math.abs(d1.getTime()-d2.getTime())},DateTime}();dist$2.DateTime=DateTime,dist$2.addVc=function(url,codecs){ void 0===codecs&&(codecs=["h264"]);var vc=(codecs||["h264"]).reduce(function(acc,key){return key=key.toLowerCase(),acc+(codec[key]||0)},0),host=url.split("?")[0],query=url.split("?")[1];return query=(query||"").split("&").filter(function(item){return !/^vc=\d?/.test(item)}).join("&"),host+"?"+(query+=(query?"&":"")+"vc="+vc)},dist$2.getQuery=getQuery,dist$2.getStaticPath=function(path,base){ void 0===base&&(base="");var protocolReg=/^(https?:\/\/|^\/\/)/;if(""===path||void 0===path)return "";if(protocolReg.test(path))return path;path=path.replace(/\/+/g,"/"),base=protocolReg.test(base||"")?base:window.location.href;try{return new URL(path,base).href}catch(error){return path}},dist$2.isHttp=function(url){return /^http[s]?:\/\//.test(url)},dist$2.isMobile=function(agent){var _navigator,_navigator1,_navigator2,_window;return /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent)||/Macintosh/i.test(agent||(null==(_navigator1=navigator)?void 0:_navigator1.userAgent))&&(null==(_navigator2=navigator)?void 0:_navigator2.maxTouchPoints)>1||!!(null==(_window=window)?void 0:_window.__IS_MOBILE_SIMULATOR__)},dist$2.isRealMobile=function(agent){var _navigator,ua=(null!=agent?agent:null==(_navigator=navigator)?void 0:_navigator.userAgent).toLowerCase();if(/ipad|tablet|playbook|silk|android(?!.*mobile)/i.test(ua))return false;var hasTouch="ontouchstart"in window||navigator.maxTouchPoints>0;return /android|webos|iphone|ipod|blackberry|iemobile|opera mini/i.test(ua)&&hasTouch},dist$2.parseEzopenUrl=parseEzopenUrl,dist$2.pick=function(obj,keys){return Object.entries(obj).reduce(function(acc,param){var key=param[0],value=param[1];return keys.includes(key)&&(acc[key]=value),acc},{})},dist$2.switchEzopenUrl=function(url,options){var _ref=null!=options?options:{},type=_ref.type,recType=_ref.recType,search=_ref.search,definition=_ref.definition,channelNo=_ref.channelNo,deviceSerial=_ref.deviceSerial,validateCode=_ref.validateCode,obj=parseEzopenUrl(url);if(search){var ns=Object.assign({},obj.searchParams,getQuery("?"+search.replace("?","")));search=Object.entries(ns).reduce(function(acc,param){var key=param[0],value=param[1];return ""===value?acc:acc+=key+"="+encodeURIComponent(value)+"&"},"?").replace(/&$/,"");}else search=obj.search;return type=type||obj.type,recType=null!=recType?recType:obj.recType,definition=null!=definition?definition:obj.definition,channelNo=channelNo||obj.channelNo,deviceSerial=deviceSerial||obj.deviceSerial,validateCode=null!=validateCode?validateCode:obj.validateCode,obj.protocol+"//"+(validateCode?validateCode+"@":"")+obj.hostname+"/"+deviceSerial+"/"+channelNo+("rec"===type&&recType?"."+recType:"")+("live"===type&&"hd"===definition?"."+definition:"")+"."+type+search};
10830
+ return dist$2;
10831
+ }
10832
+
10257
10833
  /*
10258
10834
  * @ezuikit/control-date-picker v1.0.5
10259
10835
  * Copyright (c) 2026-01-05 Ezviz-OpenBiz
@@ -10263,10 +10839,10 @@
10263
10839
  var hasRequiredDist$2;
10264
10840
 
10265
10841
  function requireDist$2 () {
10266
- if (hasRequiredDist$2) return dist$2;
10842
+ if (hasRequiredDist$2) return dist$3;
10267
10843
  hasRequiredDist$2 = 1;
10268
- var delegate=requireDelegate(),utilsTools=requireDist$7(),deepmerge=requireCjs(),Picker=requireDist$8(),Util=function(){function Util(){}return Util.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},Util.chunkBySize=function(arr,size){return Array.from({length:Math.ceil(arr.length/size)}).map(function(_,index){return arr.slice(index*size,(index+1)*size)})},Util.generateYears=function(year){for(var years=[],i=year%10+1;i>=0;i--)years.push(year-i);for(var i1=1;years.length<12;i1++)years.push(year+i1);return years},Util.getDaysInMonth=function(year,month){return new Date(year,month+1,0).getDate()},Util.getFirstDayOfMonth=function(year,month,startOfWeek){return void 0===startOfWeek&&(startOfWeek=0),(new Date(year,month).getDay()-startOfWeek+7)%7},Util.generateWeeksByYearMonth=function(year,month,startOfWeek){ void 0===startOfWeek&&(startOfWeek=0),month-=1;for(var daysInMonth=Util.getDaysInMonth(year,month),firstDay=Util.getFirstDayOfMonth(year,month,startOfWeek),weeks=[],i=1;i<=firstDay+daysInMonth;i++){var day=i-firstDay;day<1?weeks.push((0===month?year-1:year)+"-"+Util.fillZero((month+12-1)%12+1)+"-"+Util.fillZero(Util.getDaysInMonth(year,month-1)+day)):day>daysInMonth?weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+(day-daysInMonth)):weeks.push(year+"-"+Util.fillZero(month+1)+"-"+Util.fillZero(day));}for(var nextDay=1;weeks.length<42;)weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+Util.fillZero(nextDay++));return weeks},Util.generateHours=function(){for(var hours=[],i=0;i<24;i++)hours.push(Util.fillZero(i));return hours},Util.generateMinutesOrSeconds=function(){for(var hours=[],i=0;i<=59;i++)hours.push(Util.fillZero(i));return hours},Util}(),__$CALENDAR_LOCALES$__={en:{year:"",month:"",weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],today:"Today",ok:"OK",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},zh:{year:"年",month:"月",weeks:["日","一","二","三","四","五","六"],today:"今天",ok:"确定",months:["01","02","03","04","05","06","07","08","09","10","11","12"]}},__DEFAULT_COMPONENTS_OPTIONS__={showSuperPrevIcon:false,showSuperNextIcon:false,showPrevIcon:false,showNextIcon:false,showHeaderClose:false,showHeaderOk:false,renderSuperPrevIcon:'<span class="edate-super-prev-icon"></span>',renderSuperNextIcon:'<span class="edate-super-next-icon"></span>',renderPrevIcon:'<span class="edate-prev-icon"></span>',renderNextIcon:'<span class="edate-next-icon"></span>',renderHeaderCloseIcon:'<span class="edate-close-icon">\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n </span>',renderHeaderOkIcon:function(locale){return '<span class="edate-btn-text">'+((null==locale?void 0:locale.ok)||"确定")+"</span>"}},Header=function(){function Header(options){this.$header=null,this.options=deepmerge.all([{},__DEFAULT_COMPONENTS_OPTIONS__,options],{clone:false}),this.$header=document.createElement("div"),this.$header.classList.add("edate-header",options.prefixCls+"-header"),options.className&&this.$header.classList.add(options.className),this._render(),this._eventListeners();}var _proto=Header.prototype;return _proto._render=function(){var _this__getStrOrFunToStr,_this__getStrOrFunToStr1,_this__getStrOrFunToStr2,_this__getStrOrFunToStr3,_this__getStrOrFunToStr4,_this__getStrOrFunToStr5;this.$header&&(this.$header.innerHTML="\n "+(this.options.showHeaderClose?'<div class="edate-close-btn">\n '+(null!=(_this__getStrOrFunToStr=this._getStrOrFunToStr(this.options.renderHeaderCloseIcon))?_this__getStrOrFunToStr:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderCloseIcon)+"\n </div>":this.options.showHeaderOk?"<span></span>":"")+"\n "+(this.options.showSuperPrevIcon||this.options.showPrevIcon?'\n <div class="edate-prev-btns">\n '+(this.options.showSuperPrevIcon?'<div class="edate-super-prev-btn '+this.options.prefixCls+'-super-prev-btn">\n '+(null!=(_this__getStrOrFunToStr1=this._getStrOrFunToStr(this.options.renderSuperPrevIcon))?_this__getStrOrFunToStr1:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperPrevIcon)+"\n </div>":"")+"\n "+(this.options.showPrevIcon?'<div class="edate-prev-btn '+this.options.prefixCls+'-prev-btn">\n '+(null!=(_this__getStrOrFunToStr2=this._getStrOrFunToStr(this.options.renderPrevIcon))?_this__getStrOrFunToStr2:__DEFAULT_COMPONENTS_OPTIONS__.renderPrevIcon)+"\n </div>":"")+"\n </div>\n ":"")+'\n\n <div class="edate-header-view '+this.options.prefixCls+'-header-view"></div>\n\n '+(this.options.showNextIcon||this.options.showSuperNextIcon?'\n <div class="edate-next-btns">\n '+(this.options.showNextIcon?'<div class="edate-next-btn '+this.options.prefixCls+'-next-btn">\n '+(null!=(_this__getStrOrFunToStr3=this._getStrOrFunToStr(this.options.renderNextIcon))?_this__getStrOrFunToStr3:__DEFAULT_COMPONENTS_OPTIONS__.renderNextIcon)+"\n </div>":"")+"\n "+(this.options.showSuperNextIcon?'<div class="edate-super-next-btn '+this.options.prefixCls+'-super-next-btn">\n '+(null!=(_this__getStrOrFunToStr4=this._getStrOrFunToStr(this.options.renderSuperNextIcon))?_this__getStrOrFunToStr4:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperNextIcon)+"\n </div>":"")+"\n </div>\n ":"")+"\n "+(this.options.showHeaderOk?'<div class="edate-ok-btn">\n '+(null!=(_this__getStrOrFunToStr5=this._getStrOrFunToStr(this.options.renderHeaderOkIcon))?_this__getStrOrFunToStr5:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderOkIcon)+"\n </div>":this.options.showHeaderClose?"<span></span>":""));},_proto._getStrOrFunToStr=function(value){if(null!=value){var _this_options;if("function"==typeof value)return this._getStrOrFunToStr(null==value?void 0:value(null==(_this_options=this.options)?void 0:_this_options.locale));if("string"==typeof value)return value}},_proto.renderContent=function(html){if(this.$header){var _$content=this.$header.querySelector(".edate-header-view");if(!_$content)return;_$content.innerHTML=html;}},_proto.destroy=function(){this.$header&&this.$header.remove();},_proto._eventListeners=function(){var _this=this;_this.$header&&(delegate(_this.$header,".edate-super-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperPrev||_this.options.onSuperPrev.call(_this.options);}),delegate(_this.$header,".edate-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onPrev||_this.options.onPrev.call(_this.options);}),delegate(_this.$header,".edate-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onNext||_this.options.onNext.call(_this.options);}),delegate(_this.$header,".edate-super-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperNext||_this.options.onSuperNext.call(_this.options);}),delegate(_this.$header,".edate-close-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onClose||_this.options.onClose.call(_this.options),event.stopPropagation(),event.preventDefault());}),delegate(_this.$header,".edate-ok-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onOk||_this.options.onOk.call(_this.options),event.stopPropagation(),event.preventDefault());}));},Header}();function _extends$2(){return _extends$2=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$2.apply(this,arguments)}var _CONTAINER_DEFAULT_OPTIONS_={prefixCls:"edate",locales:__$CALENDAR_LOCALES$__,showHeader:true},Container=function(){function Container(popupContainer,options){this.$panel=document.createElement("div"),this.$body=document.createElement("div"),this.$container=document.createElement("div"),this.language="zh",this.header=null,this.locale=__$CALENDAR_LOCALES$__.zh,this.options=deepmerge.all([{},_CONTAINER_DEFAULT_OPTIONS_,options],{clone:false}),this.$popupContainer=popupContainer?"function"==typeof popupContainer?popupContainer():popupContainer:document.body,this._setLocale(),this.$container.classList.add("edate-container",(this.options.prefixCls||"edate")+"-container"),options.isMobile&&this.$container.classList.add("edate-mobile",this.options.prefixCls+"-mobile"),this.options.wrapClassName&&this.$container.classList.add(this.options.wrapClassName),this.$panel.classList.add("edate-panel",(this.options.prefixCls||"edate")+"-panel"),this.options.showHeader&&(this.header=new Header(_extends$2({},this.options,{locale:this.locale,onPrev:this._onPrev.bind(this),onNext:this._onNext.bind(this),onSuperPrev:this._onSuperPrev.bind(this),onSuperNext:this._onSuperNext.bind(this),onClose:this._onClose.bind(this),onOk:this._onOk.bind(this)})),this.$panel.appendChild(this.header.$header)),this.$body.classList.add("edate-body",(this.options.prefixCls||"edate")+"-body"),this.$container.appendChild(this.$panel),this.$popupContainer.appendChild(this.$container);}var _proto=Container.prototype;return _proto._setLocale=function(){if(this.options.locales)if("string"==typeof this.options.language){var language=this.options.language||navigator.language;this.options.locales[language]?this.locale=this.options.locales[language]:this.locale=this.options.locales.zh;}else this.locale=this.options.locales.zh;},_proto.destroy=function(){var _this_$container;(null==(_this_$container=this.$container)?void 0:_this_$container.parentNode)&&this.$container.parentNode.removeChild(this.$container),this.header=null,this.$container=null;},_proto.setLocale=function(locale){"string"==typeof locale?this._setLocale():this.locale=locale;},_proto._onSuperPrev=function(){},_proto._onSuperNext=function(){},_proto._onPrev=function(){},_proto._onNext=function(){},_proto._onClose=function(){},_proto._onOk=function(){},Container}();function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1.apply(this,arguments)}function _set_prototype_of$3(o,p){return _set_prototype_of$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$3(o,p)}var _CALENDAR_DEFAULT_OPTIONS_={startOfWeek:0,showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,showPrevIcon:true,showNextIcon:true,language:"zh",renderBadge:'<span class="ecalendar-badge"></span>',badges:[]},Calendar=function(Container){function Calendar(container,options){var _this,_this_options_badges,_this_options,_this_options1,_this_options2;return (_this=Container.call(this,container,_extends$1({},_CALENDAR_DEFAULT_OPTIONS_,options,{prefixCls:"ecalendar"}))||this).badges=[],(null==(_this_options_badges=_this.options.badges)?void 0:_this_options_badges.length)&&_this._updateBadges(_this.options.badges,false),(null==(_this_options=_this.options)?void 0:_this_options.startOfWeek)&&((null==(_this_options1=_this.options)?void 0:_this_options1.startOfWeek)>6||(null==(_this_options2=_this.options)?void 0:_this_options2.startOfWeek)<0)&&(_this.options.startOfWeek=0),_this._render(),_this.setCurrent(_this.options.current,false),_this._onHeader(),_this._onCell(),_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$3(subClass,superClass);}(Calendar,Container);var _proto=Calendar.prototype;return _proto.setCurrent=function(date,change){if(void 0===change&&(change=true),"string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{if(date="string"==typeof date?utilsTools.DateTime.toDate(date):date,(!this._current||utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD"))&&(this._current=date,change&&(null==this.options.onChange||this.options.onChange.call(this.options,date,utilsTools.DateTime.format(date,"YYYY-MM-DD"))),this.$body)){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-cell-selected"))||_this_$body_querySelector.classList.remove("ecalendar-cell-selected");var title=utilsTools.DateTime.format(this._current,"YYYY-MM-DD");null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-cell-in-view[title='"+title+"']"))||_this_$body_querySelector1.classList.add("ecalendar-cell-selected");}this._setRenderCurrent(this._current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto.updateBadges=function(badges){this._updateBadges(badges);},_proto._updateBadges=function(badges,rerender){ void 0===rerender&&(rerender=true),(null==badges?void 0:badges.length)>=0&&(this.badges=badges.map(function(date){return utilsTools.DateTime.format(date,"YYYY-MM-DD")}),rerender&&this._renderDate());},_proto._setRenderCurrent=function(date){(!this._renderCurrent||date&&utilsTools.DateTime.format(this._renderCurrent,"YYYY-MM")!==utilsTools.DateTime.format(date,"YYYY-MM"))&&(this._renderCurrent=date||new Date,this._renderDate());},_proto._onCell=function(){var _this=this;delegate(this.$body,".ecalendar-cell","click",function(event){var date=new Date(event.delegateTarget.getAttribute("title").replace(/\//gi,"/")),disabled=event.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(date),null==_this.options.onCell||_this.options.onCell.call(_this.options,date,utilsTools.DateTime.format(_this._renderCurrent,"YYYY-MM-DD"),disabled),event.stopPropagation(),event.preventDefault();});},_proto._onSuperPrev=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()-1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()+1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onPrev=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()-1,date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onNext=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()+1,date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onHeader=function(){var _this=this;delegate(this.$panel,".ecalendar-header-month-btn","click",function(){null==_this.options.onMonth||_this.options.onMonth.call(_this.options,_this._current,_this._renderCurrent);}),delegate(this.$panel,".ecalendar-header-year-btn","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._render=function(){var _this_locale,_this_locale1,shiftedCustomDays=[].concat(((null==(_this_locale=this.locale)?void 0:_this_locale.weeks)||[]).slice(this.options.startOfWeek),((null==(_this_locale1=this.locale)?void 0:_this_locale1.weeks)||[]).slice(0,this.options.startOfWeek));this.$body.innerHTML='<table class="ecalendar-content">\n <thead><tr>'+shiftedCustomDays.map(function(day){return "<th>"+day+"</th>"}).join("")+"</tr></thead>\n <tbody></tbody>\n </table>",this.$panel.appendChild(this.$body);},_proto._renderDate=function(){var _this_header,_this_$body_querySelector,_this=this;if(this.$body){var _this_locale_months,_this_locale,_this_locale1,_this_locale2,_this_locale3,_this_locale_months1,_this_locale4,_this_locale5,_this_$body_querySelector1,todayStr=utilsTools.DateTime.format(new Date,"YYYY-MM-DD"),year=this._renderCurrent.getFullYear(),month=this._renderCurrent.getMonth()+1,dayGroupArray=Util.chunkBySize(Util.generateWeeksByYearMonth(year,month,this.options.startOfWeek),7),allowMonthClick="function"==typeof this.options.onMonth,allowYearClick="function"==typeof this.options.onYear;if(null==(_this_header=this.header)?void 0:_this_header.$header)this.header.renderContent("\n "+("zh"!==this.options.language?'<span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale=this.locale)||null==(_this_locale_months=_this_locale.months)?void 0:_this_locale_months[+(month-1)])+((null==(_this_locale1=this.locale)?void 0:_this_locale1.month)||"")+'</span> <span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale2=this.locale)?void 0:_this_locale2.year)||"")+"</span>":'<span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale3=this.locale)?void 0:_this_locale3.year)||"")+'</span> <span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale4=this.locale)||null==(_this_locale_months1=_this_locale4.months)?void 0:_this_locale_months1[+(month-1)])+((null==(_this_locale5=this.locale)?void 0:_this_locale5.month)||"")+"</span>"));if(null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector.querySelector("tbody"))(null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector1.querySelector("tbody")).innerHTML="\n "+dayGroupArray.slice(0,7).map(function(dates){return "<tr>\n "+dates.map(function(dateStr){var _this_options,_dateStr_split=dateStr.split("-"),y=_dateStr_split[0],m=_dateStr_split[1],d=_dateStr_split[2],date=new Date(+y,+m,+d),classNames=[month===+m?"ecalendar-cell-in-view":"",todayStr===dateStr?"ecalendar-cell-today":"",_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===dateStr?"ecalendar-cell-selected":"","function"==typeof(null==(_this_options=_this.options)?void 0:_this_options.disabledDate)&&_this.options.disabledDate(utilsTools.DateTime.toDate(dateStr),dateStr)?"edate-disabled":""].filter(Boolean),badgeHtml=_this._renderBadge(date,dateStr);return '<td title="'+dateStr+'" class="ecalendar-cell '+classNames.join(" ")+'">\n '+("function"==typeof _this.options.renderDate?_this.options.renderDate(date,dateStr):'<span class="ecalendar-cell-inner">'+Util.fillZero(+d)+"</span>")+"\n "+badgeHtml+"\n </td>"}).join("")+"\n </tr>"}).join("");}},_proto._renderBadge=function(date,dateStr){var badgeHtml="";badgeHtml="function"==typeof this.options.renderBadge?this.options.renderBadge(date,dateStr):"string"==typeof this.options.renderBadge?this.options.renderBadge:"";var showBadge="function"==typeof this.options.showBadge&&this.options.showBadge(date,dateStr);return this.badges.includes(dateStr)||showBadge||(badgeHtml=""),badgeHtml},_create_class$3(Calendar,[{key:"current",get:function(){return this._current}}]),Calendar}(Container);function _create_class$2(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$2(o,p){return _set_prototype_of$2=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$2(o,p)}Calendar.DateTime=utilsTools.DateTime;var _Month_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh"},Month=function(Container){function Month(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_Month_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,prefixCls:"emonth"}],{clone:false}))||this)._render(),_this.setCurrent(_this.options.current,false),_this._onHeaderTitle(),_this._onCell(),_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$2(subClass,superClass);}(Month,Container);var _proto=Month.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto._setCurrent=function(date,change){if("string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{var d=date;"string"==typeof d&&(d=utilsTools.DateTime.toDate(d));var current=d;this._current&&utilsTools.DateTime.format(current,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=current,"function"==typeof this.options.onChange&&change&&(null==this.options.onChange||this.options.onChange.call(this.options,current,utilsTools.DateTime.format(current,"YYYY-MM")))),this._setRenderCurrent(current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto._setRenderCurrent=function(date){if((!this._renderCurrent||this._renderCurrent&&utilsTools.DateTime.format(date,"YYYY")!==utilsTools.DateTime.format(this._renderCurrent,"YYYY"))&&(this._renderCurrent=date,this._renderMonths(date.getFullYear())),this._current){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".emonth-cell-selected"))||_this_$body_querySelector.classList.remove("emonth-cell-selected");var selectedTitle=utilsTools.DateTime.format(this._current,"YYYY-MM");null==(_this_$body_querySelector1=this.$body.querySelector(".emonth-cell-in-view[title='"+selectedTitle+"']"))||_this_$body_querySelector1.classList.add("emonth-cell-selected");}this._setHeader();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".emonth-cell","click",function(e){e.stopPropagation(),e.preventDefault();var month=+e.delegateTarget.getAttribute("data-month"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setMonth(month-1);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY-MM"),disabled);});},_proto._onSuperPrev=function(){var year=this._renderCurrent.getFullYear()-1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperPrev||this.options.onSuperPrev.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var year=this._renderCurrent.getFullYear()+1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperNext||this.options.onSuperNext.call(this.options,this._current,this._renderCurrent);},_proto._onHeaderTitle=function(){var _this=this;delegate(this.$panel,".edate-header-title-hover","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._setHeader=function(){if(this.$panel.querySelector(".emonth-header-view")){var allowClick="function"==typeof this.options.onYear;this.$panel.querySelector(".emonth-header-view").innerHTML='<span class="'+(allowClick?"edate-header-title-hover":"")+'">'+this._renderCurrent.getFullYear()+this.locale.year+"</span>";}},_proto._setDisabled=function(){for(var year=this._renderCurrent.getFullYear(),i=0;i<12;i++){var $cell=this.$body.querySelector(".emonth-cell[title='"+year+"-"+Util.fillZero(i+1)+"']");if($cell){var date=utilsTools.DateTime.toDate(year+"-"+Util.fillZero(i+1)+"-"+utilsTools.DateTime.format(this._renderCurrent,"DDTHH:mm:ss"));"function"==typeof this.options.disabledMonth&&this.options.disabledMonth(date,utilsTools.DateTime.format(date,"YYYY-MM"))?$cell.classList.add("edate-disabled"):$cell.classList.remove("edate-disabled");}}},_proto._render=function(){this.$body.innerHTML='<table class="emonth-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderMonths=function(year){var _this=this;this.$body.querySelector(".emonth-content")&&(this.$body.querySelector(".emonth-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(this.locale.months,3).slice(0,4).map(function(month,index){return "<tr>\n "+month.map(function(m,i){return '<td title="'+year+"-"+Util.fillZero(3*index+i+1)+'" data-month="'+Util.fillZero(3*index+i+1)+'" class="emonth-cell emonth-cell-in-view">\n <span class="emonth-cell-inner">'+(_this.options.monthRender&&"function"==typeof _this.options.monthRender?_this.options.monthRender(utilsTools.DateTime.toDate(year+"-"+Util.fillZero(3*index+i+1)),year+"-"+Util.fillZero(3*index+i+1))||"":m)+"</span>\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>"),this._setDisabled();},_create_class$2(Month,[{key:"current",get:function(){return this._current}}]),Month}(Container);function _create_class$1(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$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}var _YEAR_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh",prefixCls:"eyear"},Year=function(Container){function Year(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_YEAR_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,renderPrevIcon:"",renderNextIcon:""}],{clone:false}))||this)._render(),_this._setCurrent(_this.options.current,false),_this._onCell(),_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(subClass,superClass);}(Year,Container);var _proto=Year.prototype;return _proto.setCurrent=function(year,change){ void 0===change&&(change=true),this._setCurrent(year,change);},_proto._setCurrent=function(year,change){ void 0===change&&(change=true);var left,right,_year="number"==typeof year?utilsTools.DateTime.toDate(year):(left=year,(null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?year:new Date);this._current&&utilsTools.DateTime.format(_year,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=_year,"function"==typeof this.options.onChange&&change&&this.options.onChange(_year)),this._renderTenYear=(this._current||new Date).getFullYear(),this._renderYearList();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".eyear-cell","click",function(e){var yearStr=+e.delegateTarget.getAttribute("title"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setFullYear(yearStr);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this._setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY"),disabled),e.stopPropagation(),e.preventDefault();});},_proto._onSuperPrev=function(){this._renderTenYear=this._renderTenYear-10,null==this.options.onPrevYear||this.options.onPrevYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._onSuperNext=function(){this._renderTenYear=this._renderTenYear+10,null==this.options.onNextYear||this.options.onNextYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._render=function(){this.$body.innerHTML='<table class="eyear-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderYearList=function(){var _this_header,_this=this,list=Util.generateYears(this._renderTenYear);null==(_this_header=this.header)||_this_header.renderContent(list[1]+" - "+list[list.length-2]),this.$body.querySelector(".eyear-content")&&(this.$body.querySelector(".eyear-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(list,3).slice(0,4).map(function(years,i){return "<tr>\n "+years.map(function(y,j){var classNames=0===i&&0===j||3===i&&2===j?"eyear-cell":"eyear-cell eyear-cell-in-view";return +y===+_this._current.getFullYear()&&(classNames+=" eyear-cell-selected"),"function"==typeof _this.options.disabledYear&&_this.options.disabledYear(utilsTools.DateTime.toDate(y),y)&&(classNames+=" edate-disabled"),'<td title="'+y+'" class="'+classNames+'">\n '+(_this.options.yearRender&&"function"==typeof _this.options.yearRender?_this.options.yearRender(utilsTools.DateTime.toDate(y),y):'<span class="eyear-cell-inner">'+ +y+"</span>")+"\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>\n ");},_create_class$1(Year,[{key:"current",get:function(){return this._current}}]),Year}(Container);function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _DATEPICKER_MODE_ARRAY=["date","month","year"],_DATEPICKER_DEFAULT_OPTIONS_={getPopupContainer:function(){return document.body},language:"zh",isMobile:false,mode:_DATEPICKER_MODE_ARRAY[0]},DatePicker=function(Picker){function DatePicker(container,options){var _this;return (_this=Picker.call(this,container,deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{},{wrapClassName:("edate-picker-container "+((null==options?void 0:options.wrapClassName)||"")).trim()}],{clone:false}))||this).current=null,_this._current=null,_this._calendar=null,_this._month=null,_this._year=null,_this._currentMode="date",_this.options=deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{}],{clone:false}),_this.options.current&&(_this.current=_this.options.current,_this._current=_this.options.current),_this._currentMode=_this.options.mode,_this._switchMode(),_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(subClass,superClass);}(DatePicker,Picker);var _proto=DatePicker.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto.updateBadges=function(badges){var _this__calendar;(null==badges?void 0:badges.length)>=0&&(null==(_this__calendar=this._calendar)||_this__calendar.updateBadges(badges));},_proto.destroy=function(){var _this__calendar,_this__month,_this__year;null==(_this__calendar=this._calendar)||_this__calendar.destroy(),this._calendar=null,null==(_this__month=this._month)||_this__month.destroy(),this._month=null,null==(_this__year=this._year)||_this__year.destroy(),this._year=null,Picker.prototype.destroy.call(this);},_proto._setCurrent=function(date,change){var _this__calendar,_this__month,_this__year;void 0===change&&(change=true),this._current=date,null==(_this__calendar=this._calendar)||_this__calendar.setCurrent(date,change),null==(_this__month=this._month)||_this__month.setCurrent(date,change),null==(_this__year=this._year)||_this__year.setCurrent(date,change);},_proto._switchMode=function(){this.$body.classList.add("edate-picker-"+this._currentMode),"date"===this._currentMode?this._initCalendar():"month"===this._currentMode?this._initMonth():"year"===this._currentMode&&this._initYear(),this.setPlacement(this.options.placement||"top");},_proto.hide=function(){this.open=false;},_proto._onOpenChange=function(open){Picker.prototype._onOpenChange.call(this,open),open&&(this._removeCurrentTypeClass(),this._currentMode=this.options.mode||"date",this._switchMode(),this._setCurrent(this.current,false)),open||null==this.options.onClose||this.options.onClose.call(this.options,this.current,this._currentMode);},_proto._initCalendar=function(){var _this=this;this._calendar||(this._calendar=new Calendar(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),onMonth:this._onMonth.bind(this),onYear:this._onYear.bind(this),onChange:function(date){var _this__calendar;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===utilsTools.DateTime.format(date,"YYYY-MM-DD")||_this._onChange(date,null==(_this__calendar=_this._calendar)?void 0:_this__calendar.options.showHeaderOk);}})));},_proto._initMonth=function(){var _this=this;this._month||(this._month=new Month(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__month;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM")===utilsTools.DateTime.format(date,"YYYY-MM")||_this._onChange(date,null==(_this__month=_this._month)?void 0:_this__month.options.showHeaderOk);},onYear:this._onYear.bind(this)})));},_proto._initYear=function(){var _this=this;this._year||(this._year=new Year(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__year;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY")===utilsTools.DateTime.format(date,"YYYY")||_this._onChange(date,null==(_this__year=_this._year)?void 0:_this__year.options.showHeaderOk);}})));},_proto._onOk=function(date){this.current=date||this._current,this._setCurrent(date||this._current),null==this.options.onOk||this.options.onOk.call(this.options,this.current,this._currentMode),this.hide();},_proto._onClose=function(){this.hide();},_proto._onChange=function(date,_showHeaderOk){this._setCurrent(date,true);},_proto._onCell=function(date,_renderDate,disabled){null==this.options.onCell||this.options.onCell.call(this.options,date,this._currentMode),this.options.isMobile||this._currentMode!==this.options.mode||disabled||this._current&&utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this.current=date,null==this.options.onChange||this.options.onChange.call(this.options,date,this._currentMode)),disabled||this._prvMode();},_proto._prvMode=function(){this._currentMode!==this.options.mode||this.options.isMobile||this.hide();var index=_DATEPICKER_MODE_ARRAY.indexOf(this._currentMode);index>=1&&(index--,this._removeCurrentTypeClass(),this._currentMode=_DATEPICKER_MODE_ARRAY[index],this._switchMode());},_proto._onYear=function(){this._removeCurrentTypeClass(),this._currentMode="year",this._switchMode();},_proto._onMonth=function(){this._removeCurrentTypeClass(),this._currentMode="month",this._switchMode();},_proto._removeCurrentTypeClass=function(){this.$body.classList.remove("edate-picker-"+this._currentMode);},_create_class(DatePicker,[{key:"_minModeIndex",get:function(){return _DATEPICKER_MODE_ARRAY.indexOf(this.options.mode)}}]),DatePicker}(Picker);dist$2.Calendar=Calendar,dist$2.DatePicker=DatePicker,dist$2.Header=Header,dist$2.Month=Month,dist$2.Year=Year;
10269
- return dist$2;
10844
+ var delegate=requireDelegate(),utilsTools=requireDist$3(),deepmerge=requireCjs(),Picker=requireDist$a(),Util=function(){function Util(){}return Util.fillZero=function(num,len){return void 0===len&&(len=2),num.toString().padStart(len,"0")},Util.chunkBySize=function(arr,size){return Array.from({length:Math.ceil(arr.length/size)}).map(function(_,index){return arr.slice(index*size,(index+1)*size)})},Util.generateYears=function(year){for(var years=[],i=year%10+1;i>=0;i--)years.push(year-i);for(var i1=1;years.length<12;i1++)years.push(year+i1);return years},Util.getDaysInMonth=function(year,month){return new Date(year,month+1,0).getDate()},Util.getFirstDayOfMonth=function(year,month,startOfWeek){return void 0===startOfWeek&&(startOfWeek=0),(new Date(year,month).getDay()-startOfWeek+7)%7},Util.generateWeeksByYearMonth=function(year,month,startOfWeek){ void 0===startOfWeek&&(startOfWeek=0),month-=1;for(var daysInMonth=Util.getDaysInMonth(year,month),firstDay=Util.getFirstDayOfMonth(year,month,startOfWeek),weeks=[],i=1;i<=firstDay+daysInMonth;i++){var day=i-firstDay;day<1?weeks.push((0===month?year-1:year)+"-"+Util.fillZero((month+12-1)%12+1)+"-"+Util.fillZero(Util.getDaysInMonth(year,month-1)+day)):day>daysInMonth?weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+(day-daysInMonth)):weeks.push(year+"-"+Util.fillZero(month+1)+"-"+Util.fillZero(day));}for(var nextDay=1;weeks.length<42;)weeks.push((11===month?year+1:year)+"-"+Util.fillZero((month+1)%12+1)+"-"+Util.fillZero(nextDay++));return weeks},Util.generateHours=function(){for(var hours=[],i=0;i<24;i++)hours.push(Util.fillZero(i));return hours},Util.generateMinutesOrSeconds=function(){for(var hours=[],i=0;i<=59;i++)hours.push(Util.fillZero(i));return hours},Util}(),__$CALENDAR_LOCALES$__={en:{year:"",month:"",weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],today:"Today",ok:"OK",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},zh:{year:"年",month:"月",weeks:["日","一","二","三","四","五","六"],today:"今天",ok:"确定",months:["01","02","03","04","05","06","07","08","09","10","11","12"]}},__DEFAULT_COMPONENTS_OPTIONS__={showSuperPrevIcon:false,showSuperNextIcon:false,showPrevIcon:false,showNextIcon:false,showHeaderClose:false,showHeaderOk:false,renderSuperPrevIcon:'<span class="edate-super-prev-icon"></span>',renderSuperNextIcon:'<span class="edate-super-next-icon"></span>',renderPrevIcon:'<span class="edate-prev-icon"></span>',renderNextIcon:'<span class="edate-next-icon"></span>',renderHeaderCloseIcon:'<span class="edate-close-icon">\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n </span>',renderHeaderOkIcon:function(locale){return '<span class="edate-btn-text">'+((null==locale?void 0:locale.ok)||"确定")+"</span>"}},Header=function(){function Header(options){this.$header=null,this.options=deepmerge.all([{},__DEFAULT_COMPONENTS_OPTIONS__,options],{clone:false}),this.$header=document.createElement("div"),this.$header.classList.add("edate-header",options.prefixCls+"-header"),options.className&&this.$header.classList.add(options.className),this._render(),this._eventListeners();}var _proto=Header.prototype;return _proto._render=function(){var _this__getStrOrFunToStr,_this__getStrOrFunToStr1,_this__getStrOrFunToStr2,_this__getStrOrFunToStr3,_this__getStrOrFunToStr4,_this__getStrOrFunToStr5;this.$header&&(this.$header.innerHTML="\n "+(this.options.showHeaderClose?'<div class="edate-close-btn">\n '+(null!=(_this__getStrOrFunToStr=this._getStrOrFunToStr(this.options.renderHeaderCloseIcon))?_this__getStrOrFunToStr:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderCloseIcon)+"\n </div>":this.options.showHeaderOk?"<span></span>":"")+"\n "+(this.options.showSuperPrevIcon||this.options.showPrevIcon?'\n <div class="edate-prev-btns">\n '+(this.options.showSuperPrevIcon?'<div class="edate-super-prev-btn '+this.options.prefixCls+'-super-prev-btn">\n '+(null!=(_this__getStrOrFunToStr1=this._getStrOrFunToStr(this.options.renderSuperPrevIcon))?_this__getStrOrFunToStr1:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperPrevIcon)+"\n </div>":"")+"\n "+(this.options.showPrevIcon?'<div class="edate-prev-btn '+this.options.prefixCls+'-prev-btn">\n '+(null!=(_this__getStrOrFunToStr2=this._getStrOrFunToStr(this.options.renderPrevIcon))?_this__getStrOrFunToStr2:__DEFAULT_COMPONENTS_OPTIONS__.renderPrevIcon)+"\n </div>":"")+"\n </div>\n ":"")+'\n\n <div class="edate-header-view '+this.options.prefixCls+'-header-view"></div>\n\n '+(this.options.showNextIcon||this.options.showSuperNextIcon?'\n <div class="edate-next-btns">\n '+(this.options.showNextIcon?'<div class="edate-next-btn '+this.options.prefixCls+'-next-btn">\n '+(null!=(_this__getStrOrFunToStr3=this._getStrOrFunToStr(this.options.renderNextIcon))?_this__getStrOrFunToStr3:__DEFAULT_COMPONENTS_OPTIONS__.renderNextIcon)+"\n </div>":"")+"\n "+(this.options.showSuperNextIcon?'<div class="edate-super-next-btn '+this.options.prefixCls+'-super-next-btn">\n '+(null!=(_this__getStrOrFunToStr4=this._getStrOrFunToStr(this.options.renderSuperNextIcon))?_this__getStrOrFunToStr4:__DEFAULT_COMPONENTS_OPTIONS__.renderSuperNextIcon)+"\n </div>":"")+"\n </div>\n ":"")+"\n "+(this.options.showHeaderOk?'<div class="edate-ok-btn">\n '+(null!=(_this__getStrOrFunToStr5=this._getStrOrFunToStr(this.options.renderHeaderOkIcon))?_this__getStrOrFunToStr5:__DEFAULT_COMPONENTS_OPTIONS__.renderHeaderOkIcon)+"\n </div>":this.options.showHeaderClose?"<span></span>":""));},_proto._getStrOrFunToStr=function(value){if(null!=value){var _this_options;if("function"==typeof value)return this._getStrOrFunToStr(null==value?void 0:value(null==(_this_options=this.options)?void 0:_this_options.locale));if("string"==typeof value)return value}},_proto.renderContent=function(html){if(this.$header){var _$content=this.$header.querySelector(".edate-header-view");if(!_$content)return;_$content.innerHTML=html;}},_proto.destroy=function(){this.$header&&this.$header.remove();},_proto._eventListeners=function(){var _this=this;_this.$header&&(delegate(_this.$header,".edate-super-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperPrev||_this.options.onSuperPrev.call(_this.options);}),delegate(_this.$header,".edate-prev-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onPrev||_this.options.onPrev.call(_this.options);}),delegate(_this.$header,".edate-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onNext||_this.options.onNext.call(_this.options);}),delegate(_this.$header,".edate-super-next-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||null==_this.options.onSuperNext||_this.options.onSuperNext.call(_this.options);}),delegate(_this.$header,".edate-close-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onClose||_this.options.onClose.call(_this.options),event.stopPropagation(),event.preventDefault());}),delegate(_this.$header,".edate-ok-btn","click",function(event){event.delegateTarget.classList.contains("edate-disabled")||(null==_this.options.onOk||_this.options.onOk.call(_this.options),event.stopPropagation(),event.preventDefault());}));},Header}();function _extends$2(){return _extends$2=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$2.apply(this,arguments)}var _CONTAINER_DEFAULT_OPTIONS_={prefixCls:"edate",locales:__$CALENDAR_LOCALES$__,showHeader:true},Container=function(){function Container(popupContainer,options){this.$panel=document.createElement("div"),this.$body=document.createElement("div"),this.$container=document.createElement("div"),this.language="zh",this.header=null,this.locale=__$CALENDAR_LOCALES$__.zh,this.options=deepmerge.all([{},_CONTAINER_DEFAULT_OPTIONS_,options],{clone:false}),this.$popupContainer=popupContainer?"function"==typeof popupContainer?popupContainer():popupContainer:document.body,this._setLocale(),this.$container.classList.add("edate-container",(this.options.prefixCls||"edate")+"-container"),options.isMobile&&this.$container.classList.add("edate-mobile",this.options.prefixCls+"-mobile"),this.options.wrapClassName&&this.$container.classList.add(this.options.wrapClassName),this.$panel.classList.add("edate-panel",(this.options.prefixCls||"edate")+"-panel"),this.options.showHeader&&(this.header=new Header(_extends$2({},this.options,{locale:this.locale,onPrev:this._onPrev.bind(this),onNext:this._onNext.bind(this),onSuperPrev:this._onSuperPrev.bind(this),onSuperNext:this._onSuperNext.bind(this),onClose:this._onClose.bind(this),onOk:this._onOk.bind(this)})),this.$panel.appendChild(this.header.$header)),this.$body.classList.add("edate-body",(this.options.prefixCls||"edate")+"-body"),this.$container.appendChild(this.$panel),this.$popupContainer.appendChild(this.$container);}var _proto=Container.prototype;return _proto._setLocale=function(){if(this.options.locales)if("string"==typeof this.options.language){var language=this.options.language||navigator.language;this.options.locales[language]?this.locale=this.options.locales[language]:this.locale=this.options.locales.zh;}else this.locale=this.options.locales.zh;},_proto.destroy=function(){var _this_$container;(null==(_this_$container=this.$container)?void 0:_this_$container.parentNode)&&this.$container.parentNode.removeChild(this.$container),this.header=null,this.$container=null;},_proto.setLocale=function(locale){"string"==typeof locale?this._setLocale():this.locale=locale;},_proto._onSuperPrev=function(){},_proto._onSuperNext=function(){},_proto._onPrev=function(){},_proto._onNext=function(){},_proto._onClose=function(){},_proto._onOk=function(){},Container}();function _create_class$3(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1.apply(this,arguments)}function _set_prototype_of$3(o,p){return _set_prototype_of$3=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$3(o,p)}var _CALENDAR_DEFAULT_OPTIONS_={startOfWeek:0,showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,showPrevIcon:true,showNextIcon:true,language:"zh",renderBadge:'<span class="ecalendar-badge"></span>',badges:[]},Calendar=function(Container){function Calendar(container,options){var _this,_this_options_badges,_this_options,_this_options1,_this_options2;return (_this=Container.call(this,container,_extends$1({},_CALENDAR_DEFAULT_OPTIONS_,options,{prefixCls:"ecalendar"}))||this).badges=[],(null==(_this_options_badges=_this.options.badges)?void 0:_this_options_badges.length)&&_this._updateBadges(_this.options.badges,false),(null==(_this_options=_this.options)?void 0:_this_options.startOfWeek)&&((null==(_this_options1=_this.options)?void 0:_this_options1.startOfWeek)>6||(null==(_this_options2=_this.options)?void 0:_this_options2.startOfWeek)<0)&&(_this.options.startOfWeek=0),_this._render(),_this.setCurrent(_this.options.current,false),_this._onHeader(),_this._onCell(),_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$3(subClass,superClass);}(Calendar,Container);var _proto=Calendar.prototype;return _proto.setCurrent=function(date,change){if(void 0===change&&(change=true),"string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{if(date="string"==typeof date?utilsTools.DateTime.toDate(date):date,(!this._current||utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD"))&&(this._current=date,change&&(null==this.options.onChange||this.options.onChange.call(this.options,date,utilsTools.DateTime.format(date,"YYYY-MM-DD"))),this.$body)){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-cell-selected"))||_this_$body_querySelector.classList.remove("ecalendar-cell-selected");var title=utilsTools.DateTime.format(this._current,"YYYY-MM-DD");null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-cell-in-view[title='"+title+"']"))||_this_$body_querySelector1.classList.add("ecalendar-cell-selected");}this._setRenderCurrent(this._current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto.updateBadges=function(badges){this._updateBadges(badges);},_proto._updateBadges=function(badges,rerender){ void 0===rerender&&(rerender=true),(null==badges?void 0:badges.length)>=0&&(this.badges=badges.map(function(date){return utilsTools.DateTime.format(date,"YYYY-MM-DD")}),rerender&&this._renderDate());},_proto._setRenderCurrent=function(date){(!this._renderCurrent||date&&utilsTools.DateTime.format(this._renderCurrent,"YYYY-MM")!==utilsTools.DateTime.format(date,"YYYY-MM"))&&(this._renderCurrent=date||new Date,this._renderDate());},_proto._onCell=function(){var _this=this;delegate(this.$body,".ecalendar-cell","click",function(event){var date=new Date(event.delegateTarget.getAttribute("title").replace(/\//gi,"/")),disabled=event.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(date),null==_this.options.onCell||_this.options.onCell.call(_this.options,date,utilsTools.DateTime.format(_this._renderCurrent,"YYYY-MM-DD"),disabled),event.stopPropagation(),event.preventDefault();});},_proto._onSuperPrev=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()-1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var date=new Date(this._renderCurrent);date.setFullYear(date.getFullYear()+1,date.getMonth(),date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onPrev=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()-1,date.getDate()),this._setRenderCurrent(date),null==this.options.onPrevMonth||this.options.onPrevMonth.call(this.options,this._current,this._renderCurrent);},_proto._onNext=function(){var date=new Date(this._renderCurrent);date.setMonth(date.getMonth()+1,date.getDate()),this._setRenderCurrent(date),null==this.options.onNextMonth||this.options.onNextMonth.call(this.options,this._current,this._renderCurrent);},_proto._onHeader=function(){var _this=this;delegate(this.$panel,".ecalendar-header-month-btn","click",function(){null==_this.options.onMonth||_this.options.onMonth.call(_this.options,_this._current,_this._renderCurrent);}),delegate(this.$panel,".ecalendar-header-year-btn","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._render=function(){var _this_locale,_this_locale1,shiftedCustomDays=[].concat(((null==(_this_locale=this.locale)?void 0:_this_locale.weeks)||[]).slice(this.options.startOfWeek),((null==(_this_locale1=this.locale)?void 0:_this_locale1.weeks)||[]).slice(0,this.options.startOfWeek));this.$body.innerHTML='<table class="ecalendar-content">\n <thead><tr>'+shiftedCustomDays.map(function(day){return "<th>"+day+"</th>"}).join("")+"</tr></thead>\n <tbody></tbody>\n </table>",this.$panel.appendChild(this.$body);},_proto._renderDate=function(){var _this_header,_this_$body_querySelector,_this=this;if(this.$body){var _this_locale_months,_this_locale,_this_locale1,_this_locale2,_this_locale3,_this_locale_months1,_this_locale4,_this_locale5,_this_$body_querySelector1,todayStr=utilsTools.DateTime.format(new Date,"YYYY-MM-DD"),year=this._renderCurrent.getFullYear(),month=this._renderCurrent.getMonth()+1,dayGroupArray=Util.chunkBySize(Util.generateWeeksByYearMonth(year,month,this.options.startOfWeek),7),allowMonthClick="function"==typeof this.options.onMonth,allowYearClick="function"==typeof this.options.onYear;if(null==(_this_header=this.header)?void 0:_this_header.$header)this.header.renderContent("\n "+("zh"!==this.options.language?'<span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale=this.locale)||null==(_this_locale_months=_this_locale.months)?void 0:_this_locale_months[+(month-1)])+((null==(_this_locale1=this.locale)?void 0:_this_locale1.month)||"")+'</span> <span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale2=this.locale)?void 0:_this_locale2.year)||"")+"</span>":'<span class="ecalendar-header-year-btn '+(allowYearClick?"edate-header-title-hover":"")+'">'+year+((null==(_this_locale3=this.locale)?void 0:_this_locale3.year)||"")+'</span> <span class="ecalendar-header-month-btn '+(allowMonthClick?"edate-header-title-hover":"")+'">'+(null==(_this_locale4=this.locale)||null==(_this_locale_months1=_this_locale4.months)?void 0:_this_locale_months1[+(month-1)])+((null==(_this_locale5=this.locale)?void 0:_this_locale5.month)||"")+"</span>"));if(null==(_this_$body_querySelector=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector.querySelector("tbody"))(null==(_this_$body_querySelector1=this.$body.querySelector(".ecalendar-content"))?void 0:_this_$body_querySelector1.querySelector("tbody")).innerHTML="\n "+dayGroupArray.slice(0,7).map(function(dates){return "<tr>\n "+dates.map(function(dateStr){var _this_options,_dateStr_split=dateStr.split("-"),y=_dateStr_split[0],m=_dateStr_split[1],d=_dateStr_split[2],date=new Date(+y,+m,+d),classNames=[month===+m?"ecalendar-cell-in-view":"",todayStr===dateStr?"ecalendar-cell-today":"",_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===dateStr?"ecalendar-cell-selected":"","function"==typeof(null==(_this_options=_this.options)?void 0:_this_options.disabledDate)&&_this.options.disabledDate(utilsTools.DateTime.toDate(dateStr),dateStr)?"edate-disabled":""].filter(Boolean),badgeHtml=_this._renderBadge(date,dateStr);return '<td title="'+dateStr+'" class="ecalendar-cell '+classNames.join(" ")+'">\n '+("function"==typeof _this.options.renderDate?_this.options.renderDate(date,dateStr):'<span class="ecalendar-cell-inner">'+Util.fillZero(+d)+"</span>")+"\n "+badgeHtml+"\n </td>"}).join("")+"\n </tr>"}).join("");}},_proto._renderBadge=function(date,dateStr){var badgeHtml="";badgeHtml="function"==typeof this.options.renderBadge?this.options.renderBadge(date,dateStr):"string"==typeof this.options.renderBadge?this.options.renderBadge:"";var showBadge="function"==typeof this.options.showBadge&&this.options.showBadge(date,dateStr);return this.badges.includes(dateStr)||showBadge||(badgeHtml=""),badgeHtml},_create_class$3(Calendar,[{key:"current",get:function(){return this._current}}]),Calendar}(Container);function _create_class$2(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$2(o,p){return _set_prototype_of$2=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$2(o,p)}Calendar.DateTime=utilsTools.DateTime;var _Month_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh"},Month=function(Container){function Month(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_Month_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,prefixCls:"emonth"}],{clone:false}))||this)._render(),_this.setCurrent(_this.options.current,false),_this._onHeaderTitle(),_this._onCell(),_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$2(subClass,superClass);}(Month,Container);var _proto=Month.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto._setCurrent=function(date,change){if("string"==typeof date||(left=date,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right))try{var d=date;"string"==typeof d&&(d=utilsTools.DateTime.toDate(d));var current=d;this._current&&utilsTools.DateTime.format(current,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=current,"function"==typeof this.options.onChange&&change&&(null==this.options.onChange||this.options.onChange.call(this.options,current,utilsTools.DateTime.format(current,"YYYY-MM")))),this._setRenderCurrent(current);}catch(error){this._setRenderCurrent(new Date);}else this._setRenderCurrent(new Date);var left,right;},_proto._setRenderCurrent=function(date){if((!this._renderCurrent||this._renderCurrent&&utilsTools.DateTime.format(date,"YYYY")!==utilsTools.DateTime.format(this._renderCurrent,"YYYY"))&&(this._renderCurrent=date,this._renderMonths(date.getFullYear())),this._current){var _this_$body_querySelector,_this_$body_querySelector1;null==(_this_$body_querySelector=this.$body.querySelector(".emonth-cell-selected"))||_this_$body_querySelector.classList.remove("emonth-cell-selected");var selectedTitle=utilsTools.DateTime.format(this._current,"YYYY-MM");null==(_this_$body_querySelector1=this.$body.querySelector(".emonth-cell-in-view[title='"+selectedTitle+"']"))||_this_$body_querySelector1.classList.add("emonth-cell-selected");}this._setHeader();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".emonth-cell","click",function(e){e.stopPropagation(),e.preventDefault();var month=+e.delegateTarget.getAttribute("data-month"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setMonth(month-1);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this.setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY-MM"),disabled);});},_proto._onSuperPrev=function(){var year=this._renderCurrent.getFullYear()-1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperPrev||this.options.onSuperPrev.call(this.options,this._current,this._renderCurrent);},_proto._onSuperNext=function(){var year=this._renderCurrent.getFullYear()+1,date=utilsTools.DateTime.toDate(year+utilsTools.DateTime.format(this._renderCurrent,"-MM-DDTHH:mm:ss"));this._setRenderCurrent(date),null==this.options.onSuperNext||this.options.onSuperNext.call(this.options,this._current,this._renderCurrent);},_proto._onHeaderTitle=function(){var _this=this;delegate(this.$panel,".edate-header-title-hover","click",function(){null==_this.options.onYear||_this.options.onYear.call(_this.options,_this._current,_this._renderCurrent);});},_proto._setHeader=function(){if(this.$panel.querySelector(".emonth-header-view")){var allowClick="function"==typeof this.options.onYear;this.$panel.querySelector(".emonth-header-view").innerHTML='<span class="'+(allowClick?"edate-header-title-hover":"")+'">'+this._renderCurrent.getFullYear()+this.locale.year+"</span>";}},_proto._setDisabled=function(){for(var year=this._renderCurrent.getFullYear(),i=0;i<12;i++){var $cell=this.$body.querySelector(".emonth-cell[title='"+year+"-"+Util.fillZero(i+1)+"']");if($cell){var date=utilsTools.DateTime.toDate(year+"-"+Util.fillZero(i+1)+"-"+utilsTools.DateTime.format(this._renderCurrent,"DDTHH:mm:ss"));"function"==typeof this.options.disabledMonth&&this.options.disabledMonth(date,utilsTools.DateTime.format(date,"YYYY-MM"))?$cell.classList.add("edate-disabled"):$cell.classList.remove("edate-disabled");}}},_proto._render=function(){this.$body.innerHTML='<table class="emonth-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderMonths=function(year){var _this=this;this.$body.querySelector(".emonth-content")&&(this.$body.querySelector(".emonth-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(this.locale.months,3).slice(0,4).map(function(month,index){return "<tr>\n "+month.map(function(m,i){return '<td title="'+year+"-"+Util.fillZero(3*index+i+1)+'" data-month="'+Util.fillZero(3*index+i+1)+'" class="emonth-cell emonth-cell-in-view">\n <span class="emonth-cell-inner">'+(_this.options.monthRender&&"function"==typeof _this.options.monthRender?_this.options.monthRender(utilsTools.DateTime.toDate(year+"-"+Util.fillZero(3*index+i+1)),year+"-"+Util.fillZero(3*index+i+1))||"":m)+"</span>\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>"),this._setDisabled();},_create_class$2(Month,[{key:"current",get:function(){return this._current}}]),Month}(Container);function _create_class$1(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$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}var _YEAR_DEFAULT_OPTIONS_={showHeader:true,showSuperPrevIcon:true,showSuperNextIcon:true,language:"zh",prefixCls:"eyear"},Year=function(Container){function Year(popupContainer,options){var _this;return (_this=Container.call(this,popupContainer,deepmerge.all([{},_YEAR_DEFAULT_OPTIONS_,options||{},{showPrevIcon:false,showNextIcon:false,renderPrevIcon:"",renderNextIcon:""}],{clone:false}))||this)._render(),_this._setCurrent(_this.options.current,false),_this._onCell(),_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(subClass,superClass);}(Year,Container);var _proto=Year.prototype;return _proto.setCurrent=function(year,change){ void 0===change&&(change=true),this._setCurrent(year,change);},_proto._setCurrent=function(year,change){ void 0===change&&(change=true);var left,right,_year="number"==typeof year?utilsTools.DateTime.toDate(year):(left=year,(null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?year:new Date);this._current&&utilsTools.DateTime.format(_year,"YYYY-MM-DD")===utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this._current=_year,"function"==typeof this.options.onChange&&change&&this.options.onChange(_year)),this._renderTenYear=(this._current||new Date).getFullYear(),this._renderYearList();},_proto._onOk=function(){null==this.options.onOk||this.options.onOk.call(this.options,this.current);},_proto._onClose=function(){null==this.options.onClose||this.options.onClose.call(this.options,this.current);},_proto._onCell=function(){var _this=this;delegate(this.$body,".eyear-cell","click",function(e){var yearStr=+e.delegateTarget.getAttribute("title"),newDate=utilsTools.DateTime.toDate(utilsTools.DateTime.format(_this._current,"yyyy-MM-dd HH:mm:ss"));newDate.setFullYear(yearStr);var disabled=e.delegateTarget.classList.contains("edate-disabled");disabled||_this._setCurrent(newDate),null==_this.options.onCell||_this.options.onCell.call(_this.options,newDate,utilsTools.DateTime.format(newDate,"YYYY"),disabled),e.stopPropagation(),e.preventDefault();});},_proto._onSuperPrev=function(){this._renderTenYear=this._renderTenYear-10,null==this.options.onPrevYear||this.options.onPrevYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._onSuperNext=function(){this._renderTenYear=this._renderTenYear+10,null==this.options.onNextYear||this.options.onNextYear.call(this.options,this._current,Util.generateYears(this._renderTenYear)),this._renderYearList();},_proto._render=function(){this.$body.innerHTML='<table class="eyear-content"></table>',this.$panel.appendChild(this.$body);},_proto._renderYearList=function(){var _this_header,_this=this,list=Util.generateYears(this._renderTenYear);null==(_this_header=this.header)||_this_header.renderContent(list[1]+" - "+list[list.length-2]),this.$body.querySelector(".eyear-content")&&(this.$body.querySelector(".eyear-content").innerHTML="\n <tbody>\n "+Util.chunkBySize(list,3).slice(0,4).map(function(years,i){return "<tr>\n "+years.map(function(y,j){var classNames=0===i&&0===j||3===i&&2===j?"eyear-cell":"eyear-cell eyear-cell-in-view";return +y===+_this._current.getFullYear()&&(classNames+=" eyear-cell-selected"),"function"==typeof _this.options.disabledYear&&_this.options.disabledYear(utilsTools.DateTime.toDate(y),y)&&(classNames+=" edate-disabled"),'<td title="'+y+'" class="'+classNames+'">\n '+(_this.options.yearRender&&"function"==typeof _this.options.yearRender?_this.options.yearRender(utilsTools.DateTime.toDate(y),y):'<span class="eyear-cell-inner">'+ +y+"</span>")+"\n </td>"}).join("")+"\n </tr>"}).join("")+"\n </tbody>\n ");},_create_class$1(Year,[{key:"current",get:function(){return this._current}}]),Year}(Container);function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _DATEPICKER_MODE_ARRAY=["date","month","year"],_DATEPICKER_DEFAULT_OPTIONS_={getPopupContainer:function(){return document.body},language:"zh",isMobile:false,mode:_DATEPICKER_MODE_ARRAY[0]},DatePicker=function(Picker){function DatePicker(container,options){var _this;return (_this=Picker.call(this,container,deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{},{wrapClassName:("edate-picker-container "+((null==options?void 0:options.wrapClassName)||"")).trim()}],{clone:false}))||this).current=null,_this._current=null,_this._calendar=null,_this._month=null,_this._year=null,_this._currentMode="date",_this.options=deepmerge.all([{},_DATEPICKER_DEFAULT_OPTIONS_,options||{}],{clone:false}),_this.options.current&&(_this.current=_this.options.current,_this._current=_this.options.current),_this._currentMode=_this.options.mode,_this._switchMode(),_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(subClass,superClass);}(DatePicker,Picker);var _proto=DatePicker.prototype;return _proto.setCurrent=function(date,change){ void 0===change&&(change=true),this._setCurrent(date,change);},_proto.updateBadges=function(badges){var _this__calendar;(null==badges?void 0:badges.length)>=0&&(null==(_this__calendar=this._calendar)||_this__calendar.updateBadges(badges));},_proto.destroy=function(){var _this__calendar,_this__month,_this__year;null==(_this__calendar=this._calendar)||_this__calendar.destroy(),this._calendar=null,null==(_this__month=this._month)||_this__month.destroy(),this._month=null,null==(_this__year=this._year)||_this__year.destroy(),this._year=null,Picker.prototype.destroy.call(this);},_proto._setCurrent=function(date,change){var _this__calendar,_this__month,_this__year;void 0===change&&(change=true),this._current=date,null==(_this__calendar=this._calendar)||_this__calendar.setCurrent(date,change),null==(_this__month=this._month)||_this__month.setCurrent(date,change),null==(_this__year=this._year)||_this__year.setCurrent(date,change);},_proto._switchMode=function(){this.$body.classList.add("edate-picker-"+this._currentMode),"date"===this._currentMode?this._initCalendar():"month"===this._currentMode?this._initMonth():"year"===this._currentMode&&this._initYear(),this.setPlacement(this.options.placement||"top");},_proto.hide=function(){this.open=false;},_proto._onOpenChange=function(open){Picker.prototype._onOpenChange.call(this,open),open&&(this._removeCurrentTypeClass(),this._currentMode=this.options.mode||"date",this._switchMode(),this._setCurrent(this.current,false)),open||null==this.options.onClose||this.options.onClose.call(this.options,this.current,this._currentMode);},_proto._initCalendar=function(){var _this=this;this._calendar||(this._calendar=new Calendar(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),onMonth:this._onMonth.bind(this),onYear:this._onYear.bind(this),onChange:function(date){var _this__calendar;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM-DD")===utilsTools.DateTime.format(date,"YYYY-MM-DD")||_this._onChange(date,null==(_this__calendar=_this._calendar)?void 0:_this__calendar.options.showHeaderOk);}})));},_proto._initMonth=function(){var _this=this;this._month||(this._month=new Month(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__month;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY-MM")===utilsTools.DateTime.format(date,"YYYY-MM")||_this._onChange(date,null==(_this__month=_this._month)?void 0:_this__month.options.showHeaderOk);},onYear:this._onYear.bind(this)})));},_proto._initYear=function(){var _this=this;this._year||(this._year=new Year(this.$body,_extends({},this.options,{current:this._current||new Date,onCell:this._onCell.bind(this),onOk:this._onOk.bind(this),onClose:this._onClose.bind(this),showHeaderOk:this.options.isMobile,showHeaderClose:this.options.isMobile,onChange:function(date){var _this__year;_this._current&&utilsTools.DateTime.format(_this._current,"YYYY")===utilsTools.DateTime.format(date,"YYYY")||_this._onChange(date,null==(_this__year=_this._year)?void 0:_this__year.options.showHeaderOk);}})));},_proto._onOk=function(date){this.current=date||this._current,this._setCurrent(date||this._current),null==this.options.onOk||this.options.onOk.call(this.options,this.current,this._currentMode),this.hide();},_proto._onClose=function(){this.hide();},_proto._onChange=function(date,_showHeaderOk){this._setCurrent(date,true);},_proto._onCell=function(date,_renderDate,disabled){null==this.options.onCell||this.options.onCell.call(this.options,date,this._currentMode),this.options.isMobile||this._currentMode!==this.options.mode||disabled||this._current&&utilsTools.DateTime.format(date,"YYYY-MM-DD")!==utilsTools.DateTime.format(this._current,"YYYY-MM-DD")||(this.current=date,null==this.options.onChange||this.options.onChange.call(this.options,date,this._currentMode)),disabled||this._prvMode();},_proto._prvMode=function(){this._currentMode!==this.options.mode||this.options.isMobile||this.hide();var index=_DATEPICKER_MODE_ARRAY.indexOf(this._currentMode);index>=1&&(index--,this._removeCurrentTypeClass(),this._currentMode=_DATEPICKER_MODE_ARRAY[index],this._switchMode());},_proto._onYear=function(){this._removeCurrentTypeClass(),this._currentMode="year",this._switchMode();},_proto._onMonth=function(){this._removeCurrentTypeClass(),this._currentMode="month",this._switchMode();},_proto._removeCurrentTypeClass=function(){this.$body.classList.remove("edate-picker-"+this._currentMode);},_create_class(DatePicker,[{key:"_minModeIndex",get:function(){return _DATEPICKER_MODE_ARRAY.indexOf(this.options.mode)}}]),DatePicker}(Picker);dist$3.Calendar=Calendar,dist$3.DatePicker=DatePicker,dist$3.Header=Header,dist$3.Month=Month,dist$3.Year=Year;
10845
+ return dist$3;
10270
10846
  }
10271
10847
 
10272
10848
  var distExports$1 = requireDist$2();
@@ -10896,7 +11472,7 @@
10896
11472
  function requireDist () {
10897
11473
  if (hasRequiredDist) return dist$1;
10898
11474
  hasRequiredDist = 1;
10899
- var deepmerge=requireCjs(),I18n=requireDist$6(),Picker=requireDist$8(),utilsTools=requireDist$7(),DragScroll=requireDist$1(),delegate=requireDelegate(),_$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(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 _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#1890ff",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge(_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}),this.options.timeSections&&Array.isArray(this.options.timeSections)&&(this._timeSections=this.options.timeSections),this.options.readOnly&&(this.readOnly=this.options.readOnly),this.options.className&&this.$container.classList.add(this.options.className),this.$container.style.position="relative",this.options.current&&(left=this.options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?this._current=this.options.current||new Date:this._current=new Date,this.i18n=new I18n(deepmerge(_$TIMELINE_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._timeWidth=this.options.timeWidth||0,this._resize(this.options.width||"100%",this.options.height);}var _proto=BaseTimeLine.prototype;return _proto.setReadOnly=function(readOnly){this.readOnly=readOnly;},_proto.update=function(current){this._current=current;},_proto.updateTimeSections=function(timeSections){timeSections&&Array.isArray(timeSections)&&(this._timeSections=timeSections);},_proto.resize=function(width,height){this._resize(width,height);},_proto._resize=function(width,height){var cssText="";/^\d+(\.\d+)?$/.test(width+"")?cssText+="width: "+width+"px;":width&&(cssText+="width: "+width+";"),/^\d+(\.\d+)?$/.test(height+"")?cssText+="height: "+height+"px;":height&&(cssText+="height: "+height+";"),this.$container&&(this.$container.style.cssText+=cssText),this._width=Math.floor(this.$container.clientWidth),this._height=Math.floor(this.$container.clientHeight);},_proto.setTimeWidth=function(timeWidth){[0,1,2,3,4,5].includes(timeWidth)&&(this._timeWidth=timeWidth);},_proto.destroy=function(){this._current=null,null==this.options.onDestroy||this.options.onDestroy.call(this.options),this._timeSections=[],this._readOnly=false,this._destroyed=true;},_create_class$2(BaseTimeLine,[{key:"current",get:function(){return this._current},set:function(current){this._current=current;}},{key:"readOnly",get:function(){return this._readOnly},set:function(readOnly){this._readOnly!==readOnly&&(this._readOnly=readOnly,this.$container.style.cursor=readOnly?"not-allowed":"pointer");}},{key:"timeSections",get:function(){return this._timeSections}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"timeWidth",get:function(){return this._timeWidth}}]),BaseTimeLine}();BaseTimeLine.LOCALES=_$TIMELINE_LOCALES$_;var TimeLineUtil=function(){function TimeLineUtil(){}return TimeLineUtil.timeToSecond=function(time){var e=time.split(":");return 60*Number(e[0])*60+60*Number(e[1])+(Number(e[2])||0)},TimeLineUtil.minuteToTime=function(minute){var hour=Math.floor(minute/60),m=minute%60;return (hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)},TimeLineUtil.timeToMinute=function(time){var e=time.split(":");return 60*Number(e[0])+Number(e[1])},TimeLineUtil.tranTimeToString=function(start,end){var _DateTime_toDate,_DateTime_toDate1,secondNum=Math.floor((null==(_DateTime_toDate=utilsTools.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=utilsTools.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?utilsTools.DateTime.fillZero(minute)+"'":"0'")+utilsTools.DateTime.fillZero(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path xmlns="http://www.w3.org/2000/svg" id="形状结合" d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]],__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",onLoadError:function(){}},ImageLazyLoader=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var _this__observer;entry.isIntersecting&&(_this._loadImage(entry.target),null==(_this__observer=_this._observer)||_this__observer.unobserve(entry.target));});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(e){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1.apply(this,arguments)}function _set_prototype_of$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}ImageLazyLoader.isSupported="IntersectionObserver"in window;var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true,showCoverFold:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this._imageLazyLoader=null,_this._imageLazyLoaderPicker=null,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._onImageError=_this._onImageError.bind(_this),_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._imageLazyLoader=new ImageLazyLoader({root:_this.$container,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}}),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_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(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1({},record,{startTime:utilsTools.DateTime.format(record.startTime,"HH:mm:ss"),endTime:utilsTools.DateTime.format(record.endTime,"HH:mm:ss")})});if(list.length>0){ void 0===defaultIndex&&(defaultIndex=list.length-1);var current=this.state.current;this._setState({availTimeLine:list,start:list[defaultIndex].startTime,end:list[defaultIndex].endTime,current:null===current?list[defaultIndex].startTime:current}),this._matchTimeDot();}else this._setState({availTimeLine:[],current:utilsTools.DateTime.format(this.current||(new Date).getTime(),"HH:mm:ss")}),this._matchTimeDot();},_proto.update=function(time){var _this__dragScroll;time&&!(null==(_this__dragScroll=this._dragScroll)?void 0:_this__dragScroll.isDragging)&&(this._setState({current:utilsTools.DateTime.format(time,"HH:mm:ss")}),this._currentOffsetH());},_proto.destroy=function(){var _this__dragScroll;if(this._scrollTimer&&(clearInterval(this._scrollTimer),this._scrollTimer=null),this._$currentTime)try{this.$container.removeChild(this._$currentTime),this._$currentTime=null;}catch(error){}if(this._$itemContainer&&this._$itemList)try{this._$itemContainer.removeChild(this._$itemList),this._$itemList=null;}catch(error){}if(this._$itemContainer)try{this.$container.removeChild(this._$itemContainer),this._$itemContainer=null;}catch(error){}if(this._$op)try{this.$container.removeChild(this._$op),this._$op=null;}catch(error){}this._picker&&(this._picker.destroy(),this._picker=null),this._imageLazyLoader&&(this._imageLazyLoader.destroy(),this._imageLazyLoader=null),this._imageLazyLoaderPicker&&(this._imageLazyLoaderPicker.destroy(),this._imageLazyLoaderPicker=null),this._removeEventListener(),null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.destroy(),this._dragScroll=null,BaseTimeLine.prototype.destroy.call(this);},_proto._setState=function(obj){var _this=this;Object.keys(obj).forEach(function(key){var _this__dragScroll,_this_timeSections_;"current"===key&&obj[key]?(_this._setCurrentDOM(obj[key]),_this.state.current===obj[key]||(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.isDragging)||(_this.state[key]=obj[key],_this.current=new Date(utilsTools.DateTime.format((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+"T"+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;container.innerHTML="",timeArr.forEach(function(item,index){var _this__imageLazyLoader,timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+(_this.options.timeAxisBgColor||"rgba(189, 205, 255, 1)")+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&_this.options.showCoverFold&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img data-src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+utilsTools.DateTime.format(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+(_this.options.timeSectionColor||"#369FFF")+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+(_this.options.timeTextColor||"#666")+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),item.coverArr.length&&_this.options.showCoverFold&&(null==(_this__imageLazyLoader=_this._imageLazyLoader)||_this__imageLazyLoader.addImages(container.querySelectorAll("img.ez-time-line-img")||[]));}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+(this.options.currentTimeBgColor||"#648FFC")+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+(this.options.timePointColor||"#648FFC")+';"></span>\n <div class="ez-time-line-current-value" style="color: '+(this.options.currentTimeColor||"#FFFFFF")+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this.options.showCoverFold&&(this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._imageLazyLoaderPicker=new ImageLazyLoader({root:this._picker.$body,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}})),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=utilsTools.DateTime.format(item.startTime,"HH");obj[+hour]?obj[+hour].push(_extends$1({},item,{_index:index})):obj[+hour]=[_extends$1({},item,{_index:index})];}),obj},_proto._filterTimeSectionsByTime=function(start){if(!start)return [];var startSecond=TimeLineUtil.timeToSecond(start+":00"),endSecond=TimeLineUtil.timeToSecond(start+":00")+60*this._scaleWidth;return this.timeSections.filter(function(item){var _$start=TimeLineUtil.timeToSecond(utilsTools.DateTime.format(item.startTime,"HH:mm:ss"));return _$start>=startSecond&&_$start<endSecond})},_proto._renderPickerContent=function(start){var _this__picker_innerHTML,_this__picker,_this__picker1,_this__picker2,_this__imageLazyLoaderPicker,_this=this,list=this._filterTimeSectionsByTime(start),hourGroups=this._timeSectionsToGroupsByHour(list);(null==(_this__picker=this._picker)||null==(_this__picker_innerHTML=_this__picker.innerHTML)||_this__picker_innerHTML.call(_this__picker,'<div class="ez-time-line-picker-container">\n <div class="ez-time-line-picker-header">\n <span class="ez-time-line-picker-close">'+_$TIMELINE_ICONS$__close+"</span>\n "+this.i18n.t("title",{len:list.length,unit:list.length>1?"videos":"video"})+'\n </div>\n <div class="ez-time-line-picker-content">\n <div class="ez-time-line-picker-list">\n '+Object.keys(hourGroups).reverse().map(function(key){return '<div class="ez-time-line-picker-item">\n <div class="ez-time-line-picker-item-title">'+key+':00</div>\n <div class="ez-time-line-picker-item-list">\n '+hourGroups[key].reverse().map(function(item){return '<div class="ez-time-line-picker-item-content"\n data-start="'+utilsTools.DateTime.format(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+utilsTools.DateTime.format(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+utilsTools.DateTime.format(item.startTime,"HH:mm")+'</span>\n <span class="ez-time-line-picker-item-duration">\n '+TimeLineUtil.tranTimeToString(item.startTime,item.endTime)+'\n </span>\n <img class="ez-time-line-picker-item-cover" data-src="'+_this._setImageScr(item.coverPic)+'"/>\n </div>'}).join("")+"\n </div>\n </div>"}).join("")+"\n </div>\n </div>\n </div>\n </div>"),null==(_this__picker1=this._picker)?void 0:_this__picker1.$body)&&(null==(_this__imageLazyLoaderPicker=this._imageLazyLoaderPicker)||_this__imageLazyLoaderPicker.addImages((null==(_this__picker2=this._picker)?void 0:_this__picker2.$body.querySelectorAll("img"))||[]));},_proto._onImageError=function(img){if(!img.hasAttribute("data-error")){var _img_parentNode,placeholder=document.createElement("div");placeholder.classList.add("ez-time-line-item-cover-placeholder"),placeholder.innerHTML=""+_$TIMELINE_ICONS$__picture,null==(_img_parentNode=img.parentNode)||_img_parentNode.appendChild(placeholder),img.setAttribute("data-error","true"),img.remove();}},_proto._onPickerClose=function(){this._picker&&(this._picker.open=false);},_proto._onClickItem=function(e){var _e_delegateTarget_getAttribute,_e_delegateTarget,index=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_getAttribute=_e_delegateTarget.getAttribute)?void 0:_e_delegateTarget_getAttribute.call(_e_delegateTarget,"data-index");this._picker&&(this._picker.open=false),null==this.options.onPickerSelect||this.options.onPickerSelect.call(this.options,this.timeSections[+index]);},_proto._onClickCoverFold=function(e){var _e_delegateTarget_parentElement_getAttribute,_e_delegateTarget_parentElement,_e_delegateTarget;e.preventDefault();var time=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_parentElement=_e_delegateTarget.parentElement)||null==(_e_delegateTarget_parentElement_getAttribute=_e_delegateTarget_parentElement.getAttribute)?void 0:_e_delegateTarget_parentElement_getAttribute.call(_e_delegateTarget_parentElement,"data-time"),moveX=Math.abs(this._moveStartX-e.clientX),moveY=Math.abs(this._moveStartY-e.clientY);this._picker&&time&&!(moveX>=1||moveY>=1)&&(this._renderPickerContent(time),this._picker.open=true);},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},_proto._offsetYToTime=function(offsetY){var _this__dragScroll,y=offsetY;offsetY<60&&(y=60,null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y));var second=86400-Math.floor((y-60)*this._scaleWidth);return [second,utilsTools.DateTime.fillZero(Math.floor(second/3600))+":"+utilsTools.DateTime.fillZero(Math.floor(second%3600/60))+":"+utilsTools.DateTime.fillZero(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function isOverlap(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)}function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,scaleOffsetTop:4,showYearMonthDay:true},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._isCtrlKeyDown=false,_this._lastTouchDist=0,_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._ctrlKeyDownFun=_this._ctrlKeyDownFun.bind(_this),_this._ctrlKeyUpFun=_this._ctrlKeyUpFun.bind(_this),_this._init(),_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(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cssText+="cursor: pointer;"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.cssText+="width: "+this.width+"px;"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.cssText+="height: "+this.height+"px;"),this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:utilsTools.DateTime.toDate(time)});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,this._mergeTimeSections(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw();},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cssText+="cursor: "+(readOnly?"not-allowed":"pointer"));},_proto.destroy=function(){if(this._removeEventListener(),this._$canvas)try{this.$container.removeChild(this._$canvas),this._$canvas=null;}catch(e){}BaseTimeLine.prototype.destroy.call(this);},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale();},_proto._drawScale=function(){var lineWidth=1*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-Math.floor(utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(1e3*curScaleTime),"YYYY-MM-DD")).getTime()/1e3))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-Math.floor(utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD")).getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(utilsTools.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-Math.floor(utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD")).getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(utilsTools.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawSolidLine(centerPosition.x,0,centerPosition.x,centerPosition.y,lineWidth,this.options.timePointColor);},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=12*this.options.dpr*1+"px serif",this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,0,position.x2-position.x1,this.height*this.options.dpr));}},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._mergeTimeSections=function(timeSections){if(0===timeSections.length)return timeSections;for(var merged=[(timeSections=timeSections.map(function(item){return 10===(item.startTime+"").length&&(item.startTime=1e3*item.startTime),10===(item.endTime+"").length&&(item.endTime=1e3*item.endTime),_extends({},item,{startTime:item.startTime,endTime:item.endTime})}))[0]],i=1;i<timeSections.length;i++){var prev=merged[merged.length-1],curr=timeSections[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",function(e){e.preventDefault();},{passive:false}),this._$canvas.addEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.addEventListener("keyup",this._ctrlKeyUpFun),document.addEventListener("keydown",this._ctrlKeyDownFun,false),document.addEventListener("keyup",this._ctrlKeyUpFun,false),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this._$canvas.removeEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.removeEventListener("keyup",this._ctrlKeyUpFun),document.removeEventListener("keydown",this._ctrlKeyDownFun),document.removeEventListener("keyup",this._ctrlKeyUpFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true);},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._moveEndOrTouchEndFun(e));},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left,this._update();}},_proto._mousewheelFun=function(e){e.preventDefault(),this.readOnly;},_proto._ctrlKeyDownFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=true);},_proto._ctrlKeyUpFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=false);},_proto._getTouchDistance=function(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=this._getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else if(2===e.touches.length){this._getTouchDistance(e.touches);this._lastTouchDist;}},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true;}},_create_class(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH,dist$1.BaseTimeLine=BaseTimeLine,dist$1.MobileTimeLine=MobileTimeLine,dist$1.TimeLine=TimeLine;
11475
+ var deepmerge=requireCjs(),I18n=requireDist$8(),Picker=requireDist$a(),utilsTools=requireDist$3(),DragScroll=requireDist$1(),delegate=requireDelegate(),_$TIMELINE_LOCALES$_={zh:{title:"包含{{len}}段录像",foldTitle:"{{len}}个录像"},en:{title:"Includes {{len}} {{unit}}",foldTitle:"{{len}} {{unit}}"}};function _create_class$2(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 _$BASE_TIME_LINE_DEFAULT_OPTIONS$_={current:new Date,language:"zh",timeSections:[],readOnly:false,className:"",timeWidth:0,width:"100%",timePointColor:"#1890ff",timeTextColor:"#FFF",timeScaleColor:"#FFF",timeSectionColor:"rgba(24, 144, 255, 0.5)",timeAxisBgColor:"#000",onChange:function(){},onDragStart:function(){},onDragging:function(){},onDragEnd:function(){},onDestroy:function(){}},BaseTimeLine=function(){function BaseTimeLine(container,options){if(this._current=new Date,this._readOnly=false,this._width=0,this._height=0,this._destroyed=false,this._timeWidth=0,this._timeSections=[],this.$container=container,!container)throw new Error("container is required");var left,right;this.options=deepmerge(_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}),this.options.timeSections&&Array.isArray(this.options.timeSections)&&(this._timeSections=this.options.timeSections),this.options.readOnly&&(this.readOnly=this.options.readOnly),this.options.className&&this.$container.classList.add(this.options.className),this.$container.style.position="relative",this.options.current&&(left=this.options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)?this._current=this.options.current||new Date:this._current=new Date,this.i18n=new I18n(deepmerge(_$TIMELINE_LOCALES$_,this.options.locales||{},{clone:false}),{defaultLocale:this.options.language||"zh"}),this._timeWidth=this.options.timeWidth||0,this._resize(this.options.width||"100%",this.options.height);}var _proto=BaseTimeLine.prototype;return _proto.setReadOnly=function(readOnly){this.readOnly=readOnly;},_proto.update=function(current){this._current=current;},_proto.updateTimeSections=function(timeSections){timeSections&&Array.isArray(timeSections)&&(this._timeSections=timeSections);},_proto.resize=function(width,height){this._resize(width,height);},_proto._resize=function(width,height){var cssText="";/^\d+(\.\d+)?$/.test(width+"")?cssText+="width: "+width+"px;":width&&(cssText+="width: "+width+";"),/^\d+(\.\d+)?$/.test(height+"")?cssText+="height: "+height+"px;":height&&(cssText+="height: "+height+";"),this.$container&&(this.$container.style.cssText+=cssText),this._width=Math.floor(this.$container.clientWidth),this._height=Math.floor(this.$container.clientHeight);},_proto.setTimeWidth=function(timeWidth){[0,1,2,3,4,5].includes(timeWidth)&&(this._timeWidth=timeWidth);},_proto.destroy=function(){this._current=null,null==this.options.onDestroy||this.options.onDestroy.call(this.options),this._timeSections=[],this._readOnly=false,this._destroyed=true;},_create_class$2(BaseTimeLine,[{key:"current",get:function(){return this._current},set:function(current){this._current=current;}},{key:"readOnly",get:function(){return this._readOnly},set:function(readOnly){this._readOnly!==readOnly&&(this._readOnly=readOnly,this.$container.style.cursor=readOnly?"not-allowed":"pointer");}},{key:"timeSections",get:function(){return this._timeSections}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"timeWidth",get:function(){return this._timeWidth}}]),BaseTimeLine}();BaseTimeLine.LOCALES=_$TIMELINE_LOCALES$_;var TimeLineUtil=function(){function TimeLineUtil(){}return TimeLineUtil.timeToSecond=function(time){var e=time.split(":");return 60*Number(e[0])*60+60*Number(e[1])+(Number(e[2])||0)},TimeLineUtil.minuteToTime=function(minute){var hour=Math.floor(minute/60),m=minute%60;return (hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)},TimeLineUtil.timeToMinute=function(time){var e=time.split(":");return 60*Number(e[0])+Number(e[1])},TimeLineUtil.tranTimeToString=function(start,end){var _DateTime_toDate,_DateTime_toDate1,secondNum=Math.floor((null==(_DateTime_toDate=utilsTools.DateTime.toDate(end))?void 0:_DateTime_toDate.getTime())-(null==(_DateTime_toDate1=utilsTools.DateTime.toDate(start))?void 0:_DateTime_toDate1.getTime()))/1e3,second=secondNum%60,minute=Math.floor(secondNum/60);return (minute>0?utilsTools.DateTime.fillZero(minute)+"'":"0'")+utilsTools.DateTime.fillZero(second)+"''"},TimeLineUtil}(),_$TIMELINE_ICONS$__tip='<svg viewBox="0 0 57 24" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="tip">\n <path class="ez-time-line-icon-tip" fill-rule="evenodd" d="m4,0l44,0c2.2091,0 4,1.7909 4,4l0,3.8218l4.9399,3.3572c0.5839,0.3968 0.5839,1.2574 0,1.6542l-4.9399,3.3572l0,3.8096c0,2.2091 -1.7909,4 -4,4l-44,0c-2.2091,0 -4,-1.7909 -4,-4l0,-16c0,-2.2091 1.7909,-4 4,-4z"/>\n </svg>',_$TIMELINE_ICONS$__plus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="plus">\n <path d="M0 0L10.6667 0" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5" transform="matrix(0,1,-1,0,8,2.66663)"/>\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__minus='\n <svg viewBox="0 0 16 16" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="minus">\n <path d="M2.66669 8L13.3334 8" stroke="rgb(44,44,44)" stroke-linecap="round" stroke-width="1.5"/>\n </svg>\n ',_$TIMELINE_ICONS$__close='\n <svg viewBox="0 0 24 24" fill="none" width="1em" height="1em" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="close">\n\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,0.707114,-0.707114,0.707099,6.34277,6.34326)" />\n\t\t <path d="M0 0L15.9998 0" stroke-linecap="round" stroke-width="1.5" transform="matrix(0.707099,-0.707114,0.707114,0.707099,6.34277,17.6567)" />\n </svg>\n ',_$TIMELINE_ICONS$__pause='<svg viewBox="0 0 20 20" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="pause">\n\t\t <path d="M9.43914 2.47881L13.4688 8.4912C14.3594 9.81998 13.4071 11.6047 11.8074 11.6047L3.74811 11.6047C2.14849 11.6047 1.19616 9.81998 2.08675 8.4912L6.11641 2.47881C6.90863 1.2968 8.64693 1.2968 9.43914 2.47881Z" fill-rule="evenodd" transform="matrix(0,1,-1,0,16.5781,2.22229)" />\n </svg>\n ',_$TIMELINE_ICONS$__picture='\n <svg viewBox="0 0 19.1613 19.4583" fill="currentColor" width="1em" height="1em" focusable="false" aria-hidden="true" data-icon="picture">\n <path xmlns="http://www.w3.org/2000/svg" id="形状结合" d="M15.3276 2.63477L3.83173 2.63477C2.70848 2.63477 1.79541 3.55027 1.79541 4.68419L1.79541 14.7737C1.79541 15.9076 2.70848 16.8231 3.83173 16.8231L15.3276 16.8231C16.4504 16.8231 17.364 15.9074 17.364 14.7737L17.364 4.68419C17.364 3.55027 16.4509 2.63477 15.3276 2.63477ZM3.83247 3.851L15.3284 3.851C15.7936 3.851 16.1671 4.22551 16.1671 4.68429L16.1671 14.7738C16.1671 15.2323 15.7932 15.6071 15.3284 15.6071L3.83247 15.6071C3.36725 15.6071 2.99373 15.2326 2.99373 14.7738L2.99373 12.2622L6.7356 9.56381L6.78139 9.53916C6.84532 9.51493 6.91856 9.52524 6.9742 9.56947L13.2644 14.5698L13.3381 14.62C13.5918 14.7666 13.9197 14.7063 14.105 14.4658C14.3089 14.2014 14.263 13.8192 14.0026 13.6122L7.71239 8.61184L7.60526 8.5346C7.12945 8.22451 6.51026 8.23473 6.04222 8.57224L2.99373 10.7706L2.99373 4.68429C2.99373 4.22551 3.36725 3.851 3.83247 3.851ZM10.5794 7.29679C10.5794 6.06542 11.5624 5.0672 12.7749 5.0672C13.9875 5.0672 14.9705 6.06542 14.9705 7.29679C14.9705 8.52817 13.9875 9.52639 12.7749 9.52639C11.5624 9.52639 10.5794 8.52817 10.5794 7.29679ZM13.7722 7.2967C13.7722 6.73699 13.3254 6.28325 12.7742 6.28325C12.223 6.28325 11.7762 6.73699 11.7762 7.2967C11.7762 7.85642 12.223 8.31015 12.7742 8.31015C13.3254 8.31015 13.7722 7.85642 13.7722 7.2967Z" fill-rule="evenodd"/>\n </svg>\n ',TIME_WIDTH=[[1,10,10,"单位 1秒"],[60,20,5,"单位 1分钟"],[600,20,6,"单位 10分钟"],[3600,30,6,"单位 1小时"],[14400,40,2,"单位 4小时"],[43200,80,2,"单位 12小时"]],MOBILE_TIME_WIDTH=[[1,10,10,"单位 1分钟"],[10,20,5,"单位 10分钟"],[30,20,6,"单位 30分钟"],[60,30,6,"单位 1小时"],[120,40,2,"单位 2小时"],[240,80,2,"单位 4小时"]],__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__={targets:[],root:null,rootMargin:"0px",threshold:.1,loadingClass:"ez-lazy-image-loading",loadedClass:"ez-lazy-image-loaded",loadedErrorClass:"ez-lazy-image-error",onLoadError:function(){}},ImageLazyLoader=function(){function ImageLazyLoader(options){ void 0===options&&(options={}),this.options=Object.assign({},__$IMAGE_LAZY_LOADER_DEFAULT_OPTIONS$__,options),this._observer=null,this._init();}var _proto=ImageLazyLoader.prototype;return _proto._init=function(){var _this=this;ImageLazyLoader.isSupported&&(this._observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){var _this__observer;entry.isIntersecting&&(_this._loadImage(entry.target),null==(_this__observer=_this._observer)||_this__observer.unobserve(entry.target));});},this.options)),this.addImages(this.options.targets);},_proto._loadImage=function(img){var _img_classList,_img_classList1,_img_classList2,_this=this;if(img&&!(null==(_img_classList=img.classList)?void 0:_img_classList.contains(this.options.loadingClass))&&!(null==(_img_classList1=img.classList)?void 0:_img_classList1.contains(this.options.loadedClass))&&!(null==(_img_classList2=img.classList)?void 0:_img_classList2.contains(this.options.loadedErrorClass))&&img.hasAttribute("data-src")){var _this1=this;img.classList.add(this.options.loadingClass);var tempImg=new Image;tempImg.onload=function(){img.src=img.dataset.src,img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedClass),img.dispatchEvent(new Event("lazyloaded"));},tempImg.onerror=function(e){img.classList.remove(_this.options.loadingClass),img.classList.add(_this.options.loadedErrorClass),null==_this1.options.onLoadError||_this1.options.onLoadError.call(_this1.options,img);},tempImg.src=img.dataset.src;}},_proto.addImages=function(targets){var _this=this;(null==targets?void 0:targets.length)&&targets.forEach(function(target){var _this__observer;(null==target?void 0:target.hasAttribute("data-src"))&&(ImageLazyLoader.isSupported&&_this._observer?null==(_this__observer=_this._observer)||_this__observer.observe(target):_this._loadImage(target));});},_proto.destroy=function(){this._observer&&(this._observer.disconnect(),this._observer=null);},ImageLazyLoader}();function _create_class$1(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends$1(){return _extends$1=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends$1.apply(this,arguments)}function _set_prototype_of$1(o,p){return _set_prototype_of$1=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of$1(o,p)}ImageLazyLoader.isSupported="IntersectionObserver"in window;var _$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_=Object.assign({},_$BASE_TIME_LINE_DEFAULT_OPTIONS$_,{height:400,width:"100%",timeWidth:0,readOnly:false,timePointColor:"#648FFC",timeTextColor:"#666666",timeScaleColor:"transparent",timeSectionColor:"#369FFF",timeAxisBgColor:"#BDCDFF",currentTimeBgColor:"#648FFC",currentTimeColor:"#FFFFFF",showTimeWidthBtn:true,showCoverFold:true}),MobileTimeLine=function(BaseTimeLine){function MobileTimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$MOBILE_TIME_LINE_DEFAULT_OPTIONS$_,options,{clone:false}))||this)._isTouchStart=false,_this._dragScroll=null,_this._moveStartX=0,_this._moveStartY=0,_this._imageLazyLoader=null,_this._imageLazyLoaderPicker=null,_this.state={start:"00:00:00",end:"24:00:00",current:null,timeArr:[],availTimeLine:[],index:0},_this._onImageError=_this._onImageError.bind(_this),_this._plusClick=_this._plusClick.bind(_this),_this._minusClick=_this._minusClick.bind(_this),_this._onPickerClose=_this._onPickerClose.bind(_this),_this._onClickItem=_this._onClickItem.bind(_this),_this._onClickCoverFold=_this._onClickCoverFold.bind(_this),_this._imageLazyLoader=new ImageLazyLoader({root:_this.$container,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}}),_this._render(),_this.options.timeSections&&Array.isArray(_this.options.timeSections)&&_this.updateTimeSections(_this.options.timeSections),_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(subClass,superClass);}(MobileTimeLine,BaseTimeLine);var _proto=MobileTimeLine.prototype;return _proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._dragScroll&&(this._dragScroll.readonly=readOnly);},_proto.setTimeWidth=function(timeWidth){MOBILE_TIME_WIDTH[timeWidth]&&(BaseTimeLine.prototype.setTimeWidth.call(this,timeWidth),this._matchTimeDot());},_proto.updateTimeSections=function(timeSections,defaultIndex){BaseTimeLine.prototype.updateTimeSections.call(this,timeSections);var list=timeSections.map(function(record){return _extends$1({},record,{startTime:utilsTools.DateTime.format(record.startTime,"HH:mm:ss"),endTime:utilsTools.DateTime.format(record.endTime,"HH:mm:ss")})});if(list.length>0){ void 0===defaultIndex&&(defaultIndex=list.length-1);var current=this.state.current;this._setState({availTimeLine:list,start:list[defaultIndex].startTime,end:list[defaultIndex].endTime,current:null===current?list[defaultIndex].startTime:current}),this._matchTimeDot();}else this._setState({availTimeLine:[],current:utilsTools.DateTime.format(this.current||(new Date).getTime(),"HH:mm:ss")}),this._matchTimeDot();},_proto.update=function(time){var _this__dragScroll;time&&!(null==(_this__dragScroll=this._dragScroll)?void 0:_this__dragScroll.isDragging)&&(this._setState({current:utilsTools.DateTime.format(time,"HH:mm:ss")}),this._currentOffsetH());},_proto.destroy=function(){var _this__dragScroll;if(this._scrollTimer&&(clearInterval(this._scrollTimer),this._scrollTimer=null),this._$currentTime)try{this.$container.removeChild(this._$currentTime),this._$currentTime=null;}catch(error){}if(this._$itemContainer&&this._$itemList)try{this._$itemContainer.removeChild(this._$itemList),this._$itemList=null;}catch(error){}if(this._$itemContainer)try{this.$container.removeChild(this._$itemContainer),this._$itemContainer=null;}catch(error){}if(this._$op)try{this.$container.removeChild(this._$op),this._$op=null;}catch(error){}this._picker&&(this._picker.destroy(),this._picker=null),this._imageLazyLoader&&(this._imageLazyLoader.destroy(),this._imageLazyLoader=null),this._imageLazyLoaderPicker&&(this._imageLazyLoaderPicker.destroy(),this._imageLazyLoaderPicker=null),this._removeEventListener(),null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.destroy(),this._dragScroll=null,BaseTimeLine.prototype.destroy.call(this);},_proto._setState=function(obj){var _this=this;Object.keys(obj).forEach(function(key){var _this__dragScroll,_this_timeSections_;"current"===key&&obj[key]?(_this._setCurrentDOM(obj[key]),_this.state.current===obj[key]||(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.isDragging)||(_this.state[key]=obj[key],_this.current=new Date(utilsTools.DateTime.format((null==(_this_timeSections_=_this.timeSections[0])?void 0:_this_timeSections_.endTime)||(new Date).getTime(),"YYYY-MM-DD")+"T"+obj[key]),null==_this.options.onChange||_this.options.onChange.call(_this.options,_this.current))):_this.state[key]=obj[key];});},_proto._setCurrentDOM=function(time){this._$currentTime&&(this._$currentTime.querySelector(".ez-time-line-current-value").innerHTML=time);},_proto._matchTimeDot=function(){for(var scaleWidth=this._scaleWidth,timeArr=[],minute=TimeLineUtil.timeToMinute("24:00:00"),i=minute=Math.floor(minute/scaleWidth)*scaleWidth;i>=0;){var marginTop=0,marginBottom=0;i==minute&&(marginTop=70),0==i&&(marginBottom=this.$container.clientHeight-70);var time=TimeLineUtil.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:[],coverArr:this._filterTimeSectionsByTime(time)}),i-=scaleWidth;}this._setState({timeArr:timeArr}),this._matchRecTimeDot();},_proto._matchRecTimeDot=function(){var _this_state=this.state,availTimeLine=_this_state.availTimeLine,timeArr=_this_state.timeArr,scaleWidth=this._scaleWidth,len=availTimeLine.length;if(0===len)for(var j=0;j<timeArr.length;j++)timeArr[j].recArr=[];else {for(var k=0;k<timeArr.length;k++)timeArr[k].recArr=[];for(var i=0;i<len;i++){var stAvailPercent,etAvailPercent,temp=availTimeLine[i],st=TimeLineUtil.timeToSecond(temp.startTime),et=TimeLineUtil.timeToSecond(temp.endTime),stMinute=Math.floor(st/(60*scaleWidth))*scaleWidth;stAvailPercent=(st-60*stMinute)/scaleWidth;var etMinute=Math.floor(et/(60*scaleWidth))*scaleWidth;etAvailPercent=(et-60*etMinute)/scaleWidth;for(var j1=0;j1<timeArr.length;j1++)if(timeArr[j1].id==stMinute&&timeArr[j1].id==etMinute){var height=etAvailPercent-stAvailPercent,top=60-etAvailPercent;timeArr[j1].recArr.push({height:height,top:top});}else timeArr[j1].id==stMinute?timeArr[j1].recArr.push({height:60-stAvailPercent,top:0}):timeArr[j1].id==etMinute?timeArr[j1].recArr.push({height:etAvailPercent,top:60-etAvailPercent}):timeArr[j1].id>stMinute&&timeArr[j1].id<etMinute&&timeArr[j1].recArr.push({height:60,top:0});}}this._setState({timeArr:timeArr}),this._renderDateLine();},_proto._renderDateLine=function(){var _this=this,timeArr=this.state.timeArr,container=this._$itemList;container.innerHTML="",timeArr.forEach(function(item,index){var _this__imageLazyLoader,timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","ez-time-line-time-scale-area"),item.marginTop&&(timeItemDOM.style.cssText+="margin-top: "+item.marginTop+"px;"),item.marginBottom&&(timeItemDOM.style.cssText+="margin-bottom: "+item.marginBottom+"px;"),timeItemDOM.style.cssText+="border-right-color: "+(_this.options.timeAxisBgColor||"rgba(189, 205, 255, 1)")+";",timeItemDOM.setAttribute("data-time",item.current),timeItemDOM.setAttribute("data-index",index+""),document.createElement("div").setAttribute("class","ez-time-line-scale");var timeItemHtml="";item.coverArr.length&&_this.options.showCoverFold&&(timeItemHtml+='\n <div class="ez-time-line-time-cover-fold '+(item.coverArr.length>1?"ez-time-line-time-cover-fold-multiple":"")+'"\n data-start="'+item.current+'">\n '+(item.coverArr.length>1?'<div class="ez-time-line-cover-fold-placeholder" style="color: #FFF"></div>':"")+'\n <div class="ez-time-line-time-cover-fold-img">\n <img data-src="'+_this._setImageScr(item.coverArr[0].coverPic)+'" class="ez-time-line-img"/>\n <span class="ez-time-line-time-cover-fold-len">\n '+(item.coverArr.length>1?_this.i18n.t("foldTitle",{len:item.coverArr.length,unit:"videos"}):""+utilsTools.DateTime.format(item.coverArr[0].startTime,"HH:mm"))+"\n </span>\n "+(1===item.coverArr.length?'<span class="ez-time-line-time-cover-fold-time">'+TimeLineUtil.tranTimeToString(item.coverArr[0].startTime,item.coverArr[0].endTime)+"</span>":"")+'\n <span class="ez-time-line-time-cover-fold-pause">'+_$TIMELINE_ICONS$__pause+"</span>\n </div>\n </div>"),item.recArr.forEach(function(i){timeItemHtml+='<div class="ez-time-line-time-unavail"\n style="height: '+i.height+"px;background-color:"+(_this.options.timeSectionColor||"#369FFF")+"; top: "+i.top+'px">\n </div>';}),timeItemHtml+="<div id="+item.label+' class="ez-time-line-time-label" style="color: '+(_this.options.timeTextColor||"#666")+'">'+item.current+"</div>",timeItemDOM.innerHTML=timeItemHtml,container.appendChild(timeItemDOM),item.coverArr.length&&_this.options.showCoverFold&&(null==(_this__imageLazyLoader=_this._imageLazyLoader)||_this__imageLazyLoader.addImages(container.querySelectorAll("img.ez-time-line-img")||[]));}),this._currentOffsetH();},_proto._currentOffsetH=function(){var current=this.state.current;if(current){var _this__dragScroll,y=(86400-TimeLineUtil.timeToSecond(current)||0)/this._scaleWidth;null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y+60,false);}},_proto._render=function(){var _this=this;if(this._$currentTime=document.createElement("div"),this._$currentTime.classList.add("ez-time-line-current"),this._$currentTime.innerHTML='<div class="ez-time-line-current-content" style="color: '+(this.options.currentTimeBgColor||"#648FFC")+'">\n <span class="ez-time-line-current-tip">'+_$TIMELINE_ICONS$__tip+'</span>\n <span class="ez-time-line-current-tip-line" style="background-color: '+(this.options.timePointColor||"#648FFC")+';"></span>\n <div class="ez-time-line-current-value" style="color: '+(this.options.currentTimeColor||"#FFFFFF")+'">00:00:00</div>\n </div>',this.$container.appendChild(this._$currentTime),this._$itemContainer=document.createElement("div"),this._$itemContainer.classList.add("ez-time-line-container"),this.$container.appendChild(this._$itemContainer),this._dragScroll=new DragScroll(this._$itemContainer,{hideScrollbar:true,onChange:function(state){var result=_this._offsetYToTime(state.y);result[1]!==_this.state.current&&_this._setCurrentDOM(result[0]>=86400?"23:59:59":result[1]);},onDragStart:function(e){_this._moveStartX=e.clientX,_this._moveStartY=e.clientY,null==_this.options.onDragStart||_this.options.onDragStart.call(_this.options,_this.state.current);},onDragging:function(){null==_this.options.onDragging||_this.options.onDragging.call(_this.options,_this.state.current);},onDragEnd:function(){var _this__dragScroll,result=_this._offsetYToTime(null==(_this__dragScroll=_this._dragScroll)?void 0:_this__dragScroll.currentY);result[1]!==_this.state.current&&_this._setState({current:result[0]>=86400?"23:59:59":result[1]}),null==_this.options.onDragEnd||_this.options.onDragEnd.call(_this.options,_this.state.current);}}),/\d/.test(this.options.height))this._$itemContainer.style.cssText+="height: "+this.options.height+"px";else if("string"==typeof this.options.height)this._$itemContainer.style.cssText+="height: "+this.options.height;else {var height=this.$container.clientHeight;this._$itemContainer.style.cssText+="height: "+height+"px";}this._$itemList=document.createElement("div"),this._$itemList.classList.add("ez-time-line-item"),this._dragScroll.$content.appendChild(this._$itemList),this.options.showTimeWidthBtn&&(this._$op=document.createElement("div"),this._$op.classList.add("ez-time-line-op"),this._$op.innerHTML='<span class="ez-time-line-op-wrapper"><span class="ez-time-line-icon-plus">'+_$TIMELINE_ICONS$__plus+'</span> <span class="ez-time-line-icon-minus">'+_$TIMELINE_ICONS$__minus+"</span></span>",this.$container.appendChild(this._$op)),this.options.showCoverFold&&(this._picker=new Picker(null,{isMobile:true,wrapClassName:"ez-time-line-picker",onOpenChange:function(isOpen){var _this_options_onPickerOpenChange,_this_options;null==(_this_options=_this.options)||null==(_this_options_onPickerOpenChange=_this_options.onPickerOpenChange)||_this_options_onPickerOpenChange.call(_this_options,isOpen);}}),this._imageLazyLoaderPicker=new ImageLazyLoader({root:this._picker.$body,onLoadError:function(img){null==_this._onImageError||_this._onImageError.call(_this,img);}})),this._addEventListener();},_proto._addEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.addEventListener("click",this._plusClick,false),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.addEventListener("click",this._minusClick,false));this._matchTimeDot(),this._picker&&(this._delegatePickerClose=delegate(this._picker.$body,".ez-time-line-picker-close","click",this._onPickerClose,false),this._delegateItemContent=delegate(this._picker.$body,".ez-time-line-picker-item-content","click",this._onClickItem,false),this._delegateCoverFold=delegate(this._$itemList,".ez-time-line-time-cover-fold","click",this._onClickCoverFold,false));},_proto._removeEventListener=function(){var _this__$op_querySelector,_this__$op_querySelector1,_this__picker_$body_querySelector,_this__picker_$body;this.options.showTimeWidthBtn&&this._$op&&(null==(_this__$op_querySelector=this._$op.querySelector(".ez-time-line-icon-plus"))||_this__$op_querySelector.removeEventListener("click",this._plusClick),null==(_this__$op_querySelector1=this._$op.querySelector(".ez-time-line-icon-minus"))||_this__$op_querySelector1.removeEventListener("click",this._minusClick));this._picker&&(null==(_this__picker_$body=this._picker.$body)||null==(_this__picker_$body_querySelector=_this__picker_$body.querySelector(".ez-time-line-picker-close"))||_this__picker_$body_querySelector.removeEventListener("click",this._onPickerClose),this._delegateItemContent&&(this._delegateItemContent.forEach(function(delegation){delegation.destroy();}),this._delegateItemContent=null),this._delegatePickerClose&&(this._delegatePickerClose.forEach(function(delegation){delegation.destroy();}),this._delegatePickerClose=null),this._delegateCoverFold&&(this._delegateCoverFold.forEach(function(delegation){delegation.destroy();}),this._delegateCoverFold=null));},_proto._plusClick=function(){var timeWidth=this.timeWidth+1;timeWidth>0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(timeWidth);},_proto._minusClick=function(){var timeWidth=this.timeWidth-1;timeWidth>=0&&timeWidth<MOBILE_TIME_WIDTH.length&&this.setTimeWidth(Math.floor(timeWidth));},_proto._timeSectionsToGroupsByHour=function(list){var obj={};return list.forEach(function(item,index){var hour=utilsTools.DateTime.format(item.startTime,"HH");obj[+hour]?obj[+hour].push(_extends$1({},item,{_index:index})):obj[+hour]=[_extends$1({},item,{_index:index})];}),obj},_proto._filterTimeSectionsByTime=function(start){if(!start)return [];var startSecond=TimeLineUtil.timeToSecond(start+":00"),endSecond=TimeLineUtil.timeToSecond(start+":00")+60*this._scaleWidth;return this.timeSections.filter(function(item){var _$start=TimeLineUtil.timeToSecond(utilsTools.DateTime.format(item.startTime,"HH:mm:ss"));return _$start>=startSecond&&_$start<endSecond})},_proto._renderPickerContent=function(start){var _this__picker_innerHTML,_this__picker,_this__picker1,_this__picker2,_this__imageLazyLoaderPicker,_this=this,list=this._filterTimeSectionsByTime(start),hourGroups=this._timeSectionsToGroupsByHour(list);(null==(_this__picker=this._picker)||null==(_this__picker_innerHTML=_this__picker.innerHTML)||_this__picker_innerHTML.call(_this__picker,'<div class="ez-time-line-picker-container">\n <div class="ez-time-line-picker-header">\n <span class="ez-time-line-picker-close">'+_$TIMELINE_ICONS$__close+"</span>\n "+this.i18n.t("title",{len:list.length,unit:list.length>1?"videos":"video"})+'\n </div>\n <div class="ez-time-line-picker-content">\n <div class="ez-time-line-picker-list">\n '+Object.keys(hourGroups).reverse().map(function(key){return '<div class="ez-time-line-picker-item">\n <div class="ez-time-line-picker-item-title">'+key+':00</div>\n <div class="ez-time-line-picker-item-list">\n '+hourGroups[key].reverse().map(function(item){return '<div class="ez-time-line-picker-item-content"\n data-start="'+utilsTools.DateTime.format(item.startTime,"YYYYMMDDTHHmmssZ")+'"\n data-end="'+utilsTools.DateTime.format(item.endTime,"YYYYMMDDTHHmmssZ")+'"\n data-index="'+item._index+'">\n <span class="ez-time-line-picker-item-time">'+utilsTools.DateTime.format(item.startTime,"HH:mm")+'</span>\n <span class="ez-time-line-picker-item-duration">\n '+TimeLineUtil.tranTimeToString(item.startTime,item.endTime)+'\n </span>\n <img class="ez-time-line-picker-item-cover" data-src="'+_this._setImageScr(item.coverPic)+'"/>\n </div>'}).join("")+"\n </div>\n </div>"}).join("")+"\n </div>\n </div>\n </div>\n </div>"),null==(_this__picker1=this._picker)?void 0:_this__picker1.$body)&&(null==(_this__imageLazyLoaderPicker=this._imageLazyLoaderPicker)||_this__imageLazyLoaderPicker.addImages((null==(_this__picker2=this._picker)?void 0:_this__picker2.$body.querySelectorAll("img"))||[]));},_proto._onImageError=function(img){if(!img.hasAttribute("data-error")){var _img_parentNode,placeholder=document.createElement("div");placeholder.classList.add("ez-time-line-item-cover-placeholder"),placeholder.innerHTML=""+_$TIMELINE_ICONS$__picture,null==(_img_parentNode=img.parentNode)||_img_parentNode.appendChild(placeholder),img.setAttribute("data-error","true"),img.remove();}},_proto._onPickerClose=function(){this._picker&&(this._picker.open=false);},_proto._onClickItem=function(e){var _e_delegateTarget_getAttribute,_e_delegateTarget,index=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_getAttribute=_e_delegateTarget.getAttribute)?void 0:_e_delegateTarget_getAttribute.call(_e_delegateTarget,"data-index");this._picker&&(this._picker.open=false),null==this.options.onPickerSelect||this.options.onPickerSelect.call(this.options,this.timeSections[+index]);},_proto._onClickCoverFold=function(e){var _e_delegateTarget_parentElement_getAttribute,_e_delegateTarget_parentElement,_e_delegateTarget;e.preventDefault();var time=null==(_e_delegateTarget=e.delegateTarget)||null==(_e_delegateTarget_parentElement=_e_delegateTarget.parentElement)||null==(_e_delegateTarget_parentElement_getAttribute=_e_delegateTarget_parentElement.getAttribute)?void 0:_e_delegateTarget_parentElement_getAttribute.call(_e_delegateTarget_parentElement,"data-time"),moveX=Math.abs(this._moveStartX-e.clientX),moveY=Math.abs(this._moveStartY-e.clientY);this._picker&&time&&!(moveX>=1||moveY>=1)&&(this._renderPickerContent(time),this._picker.open=true);},_proto._setImageScr=function(src){if(src){var query="x=200&"+(this.options.coverQuery||"");return src+(src.includes("?")?"&":"?")+query}return ""},_proto._offsetYToTime=function(offsetY){var _this__dragScroll,y=offsetY;offsetY<60&&(y=60,null==(_this__dragScroll=this._dragScroll)||_this__dragScroll.scrollToY(y));var second=86400-Math.floor((y-60)*this._scaleWidth);return [second,utilsTools.DateTime.fillZero(Math.floor(second/3600))+":"+utilsTools.DateTime.fillZero(Math.floor(second%3600/60))+":"+utilsTools.DateTime.fillZero(second%60)]},_create_class$1(MobileTimeLine,[{key:"_scaleWidth",get:function(){return (MOBILE_TIME_WIDTH[this.timeWidth]||MOBILE_TIME_WIDTH[0])[0]}}]),MobileTimeLine}(BaseTimeLine);function isOverlap(a_start,a_end,b_start,b_end){return Math.max(a_start,b_start)<=Math.min(a_end,b_end)}function _create_class(Constructor,protoProps,staticProps){return protoProps&&function(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false,descriptor.configurable=true,"value"in descriptor&&(descriptor.writable=true),Object.defineProperty(target,descriptor.key,descriptor);}}(Constructor.prototype,protoProps),Constructor}function _extends(){return _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key]);}return target},_extends.apply(this,arguments)}function _set_prototype_of(o,p){return _set_prototype_of=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_set_prototype_of(o,p)}var _$TIMELINE_DEFAULT_OPTIONS$_={height:36,dpr:window.devicePixelRatio||2,scaleOffsetTop:4,showYearMonthDay:true},TimeLine=function(BaseTimeLine){function TimeLine(container,options){var _this;return (_this=BaseTimeLine.call(this,container,deepmerge(_$TIMELINE_DEFAULT_OPTIONS$_,options,{clone:true}))||this)._$canvas=null,_this._ctx=null,_this._timeWidthArray=TIME_WIDTH[0],_this._centerPositionX=0,_this._isMouseDown=false,_this._mousePosition=0,_this._oldTime=null,_this._isOver=false,_this._moved=false,_this._isCtrlKeyDown=false,_this._lastTouchDist=0,_this.$container=container,_this._mousemoveFun=_this._mousemoveFun.bind(_this),_this._mouseoverFun=_this._mouseoverFun.bind(_this),_this._mouseleaveFun=_this._mouseleaveFun.bind(_this),_this._mousedownFun=_this._mousedownFun.bind(_this),_this._mouseUpFun=_this._mouseUpFun.bind(_this),_this._mousewheelFun=_this._mousewheelFun.bind(_this),_this._touchstartFun=_this._touchstartFun.bind(_this),_this._touchmoveFun=_this._touchmoveFun.bind(_this),_this._touchendFun=_this._touchendFun.bind(_this),_this._ctrlKeyDownFun=_this._ctrlKeyDownFun.bind(_this),_this._ctrlKeyUpFun=_this._ctrlKeyUpFun.bind(_this),_this._init(),_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(subClass,superClass);}(TimeLine,BaseTimeLine);var _proto=TimeLine.prototype;return _proto._init=function(){this._$canvas=document.createElement("canvas"),this._ctx=this._$canvas.getContext("2d"),this.readOnly||(this._$canvas.style.cssText+="cursor: pointer;"),this.$container.appendChild(this._$canvas),this.resize(this.width,this.height),this._update({current:this.current,timeWidth:this.timeWidth,timeSections:this.timeSections}),this._addEventListener();},_proto.resize=function(width,height){BaseTimeLine.prototype.resize.call(this,width,height),this._$canvas&&width&&(this._$canvas.width=this.width*this.options.dpr,this._$canvas.style.cssText+="width: "+this.width+"px;"),this._$canvas&&height&&(this._$canvas.height=this.height*this.options.dpr,this._$canvas.style.cssText+="height: "+this.height+"px;"),this._draw();},_proto.setTimeWidth=function(timeWidth){this._update({timeWidth:timeWidth});},_proto.updateTimeSections=function(timeSections){this._update({timeSections:timeSections});},_proto.update=function(time){time&&!this._isMouseDown&&this._update({current:utilsTools.DateTime.toDate(time)});},_proto._update=function(options){var left,right,_this__$canvas;(void 0===options&&(options={}),(null==options?void 0:options.current)&&(left=options.current,null!=(right=Date)&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right)&&(this.current=options.current),(null==options?void 0:options.timeSections)&&BaseTimeLine.prototype.updateTimeSections.call(this,this._mergeTimeSections(options.timeSections)),"number"==typeof(null==options?void 0:options.timeWidth)&&(null==options?void 0:options.timeWidth)<TIME_WIDTH.length&&(BaseTimeLine.prototype.setTimeWidth.call(this,options.timeWidth),this._timeWidthArray=TIME_WIDTH[Math.floor(this.timeWidth)]),"number"==typeof(null==options?void 0:options.timeWidth)&&this._timeWidthArray)&&(this._timeWidthArray[3]&&(null==(_this__$canvas=this._$canvas)||_this__$canvas.setAttribute("data-title",this._timeWidthArray[3])));this._draw();},_proto.setReadOnly=function(readOnly){BaseTimeLine.prototype.setReadOnly.call(this,readOnly),this._$canvas&&(this._$canvas.style.cssText+="cursor: "+(readOnly?"not-allowed":"pointer"));},_proto.destroy=function(){if(this._removeEventListener(),this._$canvas)try{this.$container.removeChild(this._$canvas),this._$canvas=null;}catch(e){}BaseTimeLine.prototype.destroy.call(this);},_proto._draw=function(){this._ctx&&(this._ctx.fillStyle=this.options.timeAxisBgColor,this._ctx.fillRect(0,0,this.width*this.options.dpr,this.height*this.options.dpr)),this._drawSections(),this._drawScale();},_proto._drawScale=function(){var lineWidth=1*this.options.dpr;this._centerPositionX=parseInt(this.width*this.options.dpr/2+"");for(var centerPosition={x:this.width*this.options.dpr/2,y:this.height*this.options.dpr},curScaleTime=Math.floor(this.current.getTime()/1e3),offsetSecond=(curScaleTime-Math.floor(utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(1e3*curScaleTime),"YYYY-MM-DD")).getTime()/1e3))%this._timeWidthArray[0],padding=this.height*this.options.dpr/20,spacing=this._curScaleSpacing*this.options.dpr,rightLastScaleTimeX=Math.floor(this._centerPositionX+(this._timeWidthArray[0]-offsetSecond)/this._timeWidthArray[0]*spacing),leftLastScaleTime=curScaleTime-offsetSecond,rightLastScaleTime=leftLastScaleTime+this._timeWidthArray[0],x=rightLastScaleTimeX-spacing;x>0;x-=spacing){0===(leftLastScaleTime-Math.floor(utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD")).getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x,padding,x,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(utilsTools.DateTime.format(new Date(1e3*leftLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x,padding,x,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),leftLastScaleTime-=this._timeWidthArray[0];}for(var x1=rightLastScaleTimeX;x1<=this.width*this.options.dpr;x1+=spacing){0===(rightLastScaleTime-Math.floor(utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD")).getTime()/1e3))%(this._timeWidthArray[0]*this._timeWidthArray[2])?(this._drawSolidLine(x1,padding,x1,padding+(this.options.scaleOffsetTop+4)*this.options.dpr,lineWidth),this._drawTextString(utilsTools.DateTime.format(new Date(1e3*rightLastScaleTime),"YYYY-MM-DD HH:mm:ss"),x1,padding+(this.options.scaleOffsetTop+4+4)*this.options.dpr,"center")):this._drawSolidLine(x1,padding,x1,padding+this.options.scaleOffsetTop*this.options.dpr,lineWidth),rightLastScaleTime+=this._timeWidthArray[0];}this._drawSolidLine(centerPosition.x,0,centerPosition.x,centerPosition.y,lineWidth,this.options.timePointColor);},_proto._drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this._ctx&&(this._ctx.save(),this._ctx.strokeStyle=null!=color?color:this.options.timeScaleColor,this._ctx.lineWidth=lineWidth,this._ctx.beginPath(),this._ctx.moveTo(startX,startY),this._ctx.lineTo(endX,endY),this._ctx.stroke(),this._ctx.restore());},_proto._drawTextString=function(text,x,y,align){if(this._ctx){var timeTexts=text.split(" ");this._ctx.font=12*this.options.dpr*1+"px serif",this._ctx.fillStyle=this.options.timeTextColor,this._ctx.textAlign=align||"left",this._timeWidthArray[0]%60==0&&(timeTexts[1]=timeTexts[1].replace(/:00$/,"")),this._ctx.fillText(timeTexts[1],x,y+8*this.options.dpr),!this.options.showYearMonthDay||"00:00:00"!==timeTexts[1]&&"00:00"!==timeTexts[1]&&this._timeWidthArray[0]*this._timeWidthArray[2]!==86400||(this._ctx.textAlign=align||"left",this._ctx.fillText(timeTexts[0],x,y+18*this.options.dpr));}},_proto._drawSections=function(){for(var timeArr=this.timeSections||[],i=0;i<timeArr.length;i++){var position=this._findPosition(timeArr[i]);this._ctx&&isOverlap(0,this.width*this.options.dpr,position.x1,position.x2)&&(this._ctx.fillStyle=this.options.timeSectionColor,this._ctx.fillRect(position.x1,0,position.x2-position.x1,this.height*this.options.dpr));}},_proto._findPosition=function(item){var x1=(parseInt((item.startTime-this.current.getTime())/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing+this.width/2)*this.options.dpr;return {x1:x1,x2:x1+parseInt((item.endTime-item.startTime)/1e3+"",10)/this._timeWidthArray[0]*this._curScaleSpacing*this.options.dpr}},_proto._mergeTimeSections=function(timeSections){if(0===timeSections.length)return timeSections;for(var merged=[(timeSections=timeSections.map(function(item){return 10===(item.startTime+"").length&&(item.startTime=1e3*item.startTime),10===(item.endTime+"").length&&(item.endTime=1e3*item.endTime),_extends({},item,{startTime:item.startTime,endTime:item.endTime})}))[0]],i=1;i<timeSections.length;i++){var prev=merged[merged.length-1],curr=timeSections[i];prev.endTime>=curr.startTime?prev.endTime=Math.max(prev.endTime,curr.endTime):merged.push(curr);}return merged},_proto._addEventListener=function(){this._$canvas&&(this._$canvas.addEventListener("mousemove",this._mousemoveFun),this._$canvas.addEventListener("mouseover",this._mouseoverFun),this._$canvas.addEventListener("mouseleave",this._mouseleaveFun),this._$canvas.addEventListener("mousedown",this._mousedownFun),this._$canvas.addEventListener("mouseup",this._mouseUpFun),this._$canvas.addEventListener("wheel",this._mousewheelFun),this.$container.addEventListener("wheel",function(e){e.preventDefault();},{passive:false}),this._$canvas.addEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.addEventListener("keyup",this._ctrlKeyUpFun),document.addEventListener("keydown",this._ctrlKeyDownFun,false),document.addEventListener("keyup",this._ctrlKeyUpFun,false),this._$canvas.addEventListener("touchstart",this._touchstartFun,{passive:false}),this._$canvas.addEventListener("touchmove",this._touchmoveFun,{passive:false}),this._$canvas.addEventListener("touchend",this._touchendFun,{passive:false}));},_proto._removeEventListener=function(){this._$canvas&&(this._$canvas.removeEventListener("mousemove",this._mousemoveFun),this._$canvas.removeEventListener("mouseover",this._mouseoverFun),this._$canvas.removeEventListener("mouseleave",this._mouseleaveFun),this._$canvas.removeEventListener("mousedown",this._mousedownFun),this._$canvas.removeEventListener("mouseup",this._mouseUpFun),this._$canvas.removeEventListener("wheel",this._mousewheelFun),this._$canvas.removeEventListener("keydown",this._ctrlKeyDownFun),this._$canvas.removeEventListener("keyup",this._ctrlKeyUpFun),document.removeEventListener("keydown",this._ctrlKeyDownFun),document.removeEventListener("keyup",this._ctrlKeyUpFun),this._$canvas.removeEventListener("touchstart",this._touchstartFun),this._$canvas.removeEventListener("touchmove",this._touchmoveFun),this._$canvas.removeEventListener("touchend",this._touchendFun));},_proto._mousedownFun=function(e){this.readOnly||(this._isMouseDown=true,this._mousePosition=e.pageX,this._oldTime=this.current,null==this.options.onDragStart||this.options.onDragStart.call(this.options,this.current));},_proto._mouseoverFun=function(){this.readOnly||(this._isOver=true);},_proto._mouseleaveFun=function(e){this.readOnly||(this._isOver=false,this._moveEndOrTouchEndFun(e));},_proto._mouseUpFun=function(e){this._moveEndOrTouchEndFun(e);},_proto._mousemoveFun=function(e){if(!this.readOnly)if(this._isMouseDown&&this._isOver)this._moveUpdateFun(e.pageX);else {var left=parseInt(this.$container.offsetLeft+"",10);this._mousePosition=e.pageX-left,this._update();}},_proto._mousewheelFun=function(e){e.preventDefault(),this.readOnly;},_proto._ctrlKeyDownFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=true);},_proto._ctrlKeyUpFun=function(e){(e.ctrlKey||"Control"===e.key)&&(this._isCtrlKeyDown=false);},_proto._getTouchDistance=function(touches){var touch1=touches[0],touch2=touches[1],dx=touch2.clientX-touch1.clientX,dy=touch2.clientY-touch1.clientY;return Math.sqrt(dx*dx+dy*dy)},_proto._touchstartFun=function(e){if(!this.readOnly)if(this._oldTime=this.current,this._isOver=true,1===e.touches.length){var touch=e.touches[0];this._isMouseDown=true,this._mousePosition=touch.clientX;}else 2===e.touches.length&&(this._lastTouchDist=this._getTouchDistance(e.touches));},_proto._touchmoveFun=function(e){if(e.preventDefault(),e.stopPropagation(),!this.readOnly)if(1===e.touches.length){var touch=e.touches[0];this._moveUpdateFun(touch.clientX);}else if(2===e.touches.length){this._getTouchDistance(e.touches);this._lastTouchDist;}},_proto._touchendFun=function(e){this.readOnly||this._moveEndOrTouchEndFun(e);},_proto._moveEndOrTouchEndFun=function(e){e.preventDefault(),this.readOnly||this._isMouseDown&&(this._isMouseDown=false,this._moved&&(this._moved=false,this._update({current:this.current}),this._oldTime=this.current,null==this.options.onDragEnd||this.options.onDragEnd.call(this.options,this.current,this._isOver)),this._isOver&&Math.abs(this._mousePosition-(e.pageX||0))>5&&(null==this.options.onChange||this.options.onChange.call(this.options,this.current)),this._mousePosition=0,this._lastTouchDist=0);},_proto._moveUpdateFun=function(x){var mouseOffset=this._mousePosition-x;if(0!==mouseOffset){if(this._oldTime){var currentTime=this._oldTime.getTime()+1e3*parseInt(mouseOffset/this._curScaleSpacing*this._timeWidthArray[0]+"",10);this._update({current:new Date(currentTime)}),null==this.options.onDragging||this.options.onDragging.call(this.options,new Date(currentTime));}this._moved=true;}},_create_class(TimeLine,[{key:"_curScaleSpacing",get:function(){var _this__timeWidthArray,_this__timeWidthArray1;return Math.floor((null==(_this__timeWidthArray=this._timeWidthArray)?void 0:_this__timeWidthArray[1])-(null==(_this__timeWidthArray1=this._timeWidthArray)?void 0:_this__timeWidthArray1[1])*+(this.timeWidth%1/2).toFixed(2))}}]),TimeLine}(BaseTimeLine);TimeLine.TIME_WIDTH=TIME_WIDTH,dist$1.BaseTimeLine=BaseTimeLine,dist$1.MobileTimeLine=MobileTimeLine,dist$1.TimeLine=TimeLine;
10900
11476
  return dist$1;
10901
11477
  }
10902
11478
 
@@ -11140,6 +11716,8 @@
11140
11716
  ptz: Ptz,
11141
11717
  record: Record,
11142
11718
  talk: Talk,
11719
+ broadcast: Broadcast,
11720
+ aiChat: AIChat,
11143
11721
  zoom: Zoom$1,
11144
11722
  definition: Definition,
11145
11723
  fullscreen: Fullscreen,
@@ -11750,9 +12328,7 @@
11750
12328
  }
11751
12329
  function _renderTheme(theme, data) {
11752
12330
  return _async_to_generator$1(function() {
11753
- var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, // 重新计算画面渲染
11754
- _theme_contentControl_rerender, _theme_contentControl, themeData, // 重新计算画面渲染
11755
- _theme_contentControl_rerender1, _theme_contentControl1, 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;
12331
+ 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;
11756
12332
  return _ts_generator$1(this, function(_state) {
11757
12333
  switch(_state.label){
11758
12334
  case 0:
@@ -11764,7 +12340,6 @@
11764
12340
  themeData = _state.sent();
11765
12341
  _unmountedControls(theme);
11766
12342
  if (Object.prototype.toString.call(themeData) !== '[object Object]') {
11767
- (_theme_contentControl1 = theme.contentControl) == null ? void 0 : (_theme_contentControl_rerender1 = _theme_contentControl1.rerender) == null ? void 0 : _theme_contentControl_rerender1.call(_theme_contentControl1);
11768
12343
  // 主题空
11769
12344
  return [
11770
12345
  2
@@ -11935,7 +12510,6 @@
11935
12510
  }
11936
12511
  }
11937
12512
  theme.emit(EVENTS.control.mountedControls);
11938
- (_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_rerender = _theme_contentControl.rerender) == null ? void 0 : _theme_contentControl_rerender.call(_theme_contentControl);
11939
12513
  if (!theme.playing) theme._disabled(true);
11940
12514
  _controlEventemitter(theme);
11941
12515
  return [
@@ -12251,7 +12825,7 @@
12251
12825
  _inherits(Theme, EventEmitter);
12252
12826
  function Theme(options) {
12253
12827
  var _this;
12254
- var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1;
12828
+ var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1, _this_options2, _this_options3;
12255
12829
  _this = EventEmitter.call(this) || this, /** 播放器配置项 */ _this.options = THEME_DEFAULT_OPTIONS, _this.staticPath = '', /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */ _this.controls = {}, /**
12256
12830
  * @since 0.0.1
12257
12831
  * @private
@@ -12302,7 +12876,7 @@
12302
12876
  _this.playing = true;
12303
12877
  }
12304
12878
  _this._initClassName();
12305
- // 画布需要渲染在 this.contentControl.$container 内
12879
+ // 画布需要渲染在 this.contentControl.$content 内
12306
12880
  _this.contentControl = new Content({
12307
12881
  getContainer: function() {
12308
12882
  return _this.$container;
@@ -12337,7 +12911,8 @@
12337
12911
  'flv',
12338
12912
  'hls',
12339
12913
  'mp4'
12340
- ].includes(options.type) ? LiveTemplate : (_ref3 = (_this_options_template = (_this_options = _this.options) == null ? void 0 : _this_options.template) != null ? _this_options_template : (_this_options1 = _this.options) == null ? void 0 : _this_options1.themeData) != null ? _ref3 : null);
12914
+ ].includes(options.type) ? ((_this_options = _this.options) == null ? void 0 : _this_options.themeData) !== undefined ? (_this_options1 = _this.options) == null ? void 0 : _this_options1.themeData : LiveTemplate // 标准流仅支持 null 和 LiveTemplate (支持自定义 2026-01-19)
12915
+ : (_ref3 = (_this_options_template = (_this_options2 = _this.options) == null ? void 0 : _this_options2.template) != null ? _this_options_template : (_this_options3 = _this.options) == null ? void 0 : _this_options3.themeData) != null ? _ref3 : null);
12341
12916
  _this._addEventListener();
12342
12917
  _themeEventemitter(_this);
12343
12918
  return _this;
@@ -12862,138 +13437,153 @@
12862
13437
  * 尺寸变化结束时 进行判断,为了节省开销
12863
13438
  * @WARN:这里会闪一下, 原因:需要控件渲染后才知是否需要放置到 More 中,
12864
13439
  */ _proto._footerMoreControlShow = function _footerMoreControlShow() {
13440
+ this._displayMore();
13441
+ };
13442
+ _proto._displayMore = function _displayMore() {
12865
13443
  var _this = this;
12866
- var displayMore = function() {
12867
- if (_this._footer) {
12868
- var _this__footer_$left, _this__footer_$right;
12869
- // 判断 footer 的控件是否能放置的下, 否则隐藏暂时 more 按钮
12870
- var leftWidth = ((_this__footer_$left = _this._footer.$left) == null ? void 0 : _this__footer_$left.clientWidth) || 0;
12871
- var rightWidth = ((_this__footer_$right = _this._footer.$right) == null ? void 0 : _this__footer_$right.clientWidth) || 0;
12872
- // 当footer 中 left 和 right 宽度之和大于 footer 宽度,则 footer more 显示
12873
- var collapseControl = leftWidth + rightWidth + 26 > _this._width; // 收拢控件到 More 中
12874
- if (collapseControl) {
12875
- var _this__footer, _this__themeData_footer, _this__themeData, _this__footerMoreControl_list, _this__footerMoreControl, _this__footerMoreControl_list1, _this__footerMoreControl1;
12876
- if (!_this._footerMoreControl && ((_this__footer = _this._footer) == null ? void 0 : _this__footer.$right)) {
12877
- _this._footerMoreControl = new More({
12878
- language: _this.options.language,
12879
- locales: _this.i18n.translations,
12880
- rootContainer: _this.$container,
12881
- getPopupContainer: function() {
12882
- var _this__footer;
12883
- return (_this__footer = _this._footer) == null ? void 0 : _this__footer.$right;
12884
- },
12885
- placement: 'tr',
12886
- controls: _this.controls,
12887
- open: false,
12888
- offset: [
12889
- 0,
12890
- -8
12891
- ],
12892
- wrapClassName: "" + PREFIX_CLASS + "-footer-more",
12893
- onOpenChange: function(open) {
12894
- _this.emit(EVENTS.control.footerMorePanelOpenChange, open);
12895
- }
12896
- });
12897
- }
12898
- //
12899
- var list = (((_this__themeData = _this._themeData) == null ? void 0 : (_this__themeData_footer = _this__themeData.footer) == null ? void 0 : _this__themeData_footer.btnList) || []).filter(function(item) {
12900
- var _this__footerMoreControl;
12901
- var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
12902
- var _this_controls;
12903
- return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
12904
- });
12905
- return index === -1;
12906
- });
12907
- if (list.length <= 0) {
12908
- return;
12909
- }
12910
- if (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list = _this__footerMoreControl.list) == null ? void 0 : _this__footerMoreControl_list.length) === 0) {
12911
- // 为什么是两个, 因为More 也占用一个位置
12912
- var popList = [
12913
- list.pop(),
12914
- list.pop()
12915
- ];
12916
- for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
12917
- var item = _step.value;
12918
- if (item) {
12919
- var _this_controls_key_resetPopupContainer, _this_controls_key, _this_controls, _this_controls1, _this__footerMoreControl2;
12920
- var key = "" + item.iconId + "Control";
12921
- (_this_controls = _this.controls) == null ? void 0 : (_this_controls_key = _this_controls[key]) == null ? void 0 : (_this_controls_key_resetPopupContainer = _this_controls_key.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer.call(_this_controls_key, _this._footerMoreControl.$panel, 'prepend');
12922
- (_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls1 = _this.controls) == null ? void 0 : _this_controls1[key]);
12923
- }
13444
+ if (this._footer) {
13445
+ var _this__footer_$left, _this__footer_$right;
13446
+ // 判断 footer 的控件是否能放置的下, 否则隐藏暂时 more 按钮
13447
+ var leftWidth = ((_this__footer_$left = this._footer.$left) == null ? void 0 : _this__footer_$left.clientWidth) || 0;
13448
+ var rightWidth = ((_this__footer_$right = this._footer.$right) == null ? void 0 : _this__footer_$right.clientWidth) || 0;
13449
+ // 当footer 中 left 和 right 宽度之和大于 footer 宽度,则 footer more 显示
13450
+ var collapseControl = this._width - leftWidth - rightWidth < 16; // 收拢控件到 More 中
13451
+ if (collapseControl) {
13452
+ var _this__footer, _this__themeData_footer, _this__themeData, _this__footerMoreControl_list, _this__footerMoreControl, _this__footerMoreControl_list1, _this__footerMoreControl1;
13453
+ if (!this._footerMoreControl && ((_this__footer = this._footer) == null ? void 0 : _this__footer.$right)) {
13454
+ this._footerMoreControl = new More({
13455
+ language: this.options.language,
13456
+ locales: this.i18n.translations,
13457
+ rootContainer: this.$container,
13458
+ getPopupContainer: function() {
13459
+ var _this__footer;
13460
+ return (_this__footer = _this._footer) == null ? void 0 : _this__footer.$right;
13461
+ },
13462
+ placement: 'tr',
13463
+ controls: this.controls,
13464
+ open: false,
13465
+ offset: [
13466
+ 0,
13467
+ -8
13468
+ ],
13469
+ wrapClassName: "" + PREFIX_CLASS + "-footer-more",
13470
+ onOpenChange: function(open) {
13471
+ _this.emit(EVENTS.control.footerMorePanelOpenChange, open);
12924
13472
  }
12925
- } else if (_this._footerMoreControl) {
12926
- var item1 = list.pop();
12927
- if (item1) {
12928
- var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this_controls2, _this_controls3, _this__footerMoreControl3;
12929
- var key1 = "" + item1.iconId + "Control";
12930
- (_this_controls2 = _this.controls) == null ? void 0 : (_this_controls_key1 = _this_controls2[key1]) == null ? void 0 : (_this_controls_key_resetPopupContainer1 = _this_controls_key1.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer1.call(_this_controls_key1, _this._footerMoreControl.$panel, 'prepend');
12931
- (_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls3 = _this.controls) == null ? void 0 : _this_controls3[key1]);
12932
- } else {
12933
- return;
13473
+ });
13474
+ }
13475
+ //
13476
+ var list = (((_this__themeData = this._themeData) == null ? void 0 : (_this__themeData_footer = _this__themeData.footer) == null ? void 0 : _this__themeData_footer.btnList) || []).filter(function(item) {
13477
+ var _this__footerMoreControl;
13478
+ var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
13479
+ var _this_controls;
13480
+ return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
13481
+ });
13482
+ return index === -1;
13483
+ });
13484
+ if (list.length <= 0) return;
13485
+ if (((_this__footerMoreControl = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list = _this__footerMoreControl.list) == null ? void 0 : _this__footerMoreControl_list.length) === 0) {
13486
+ // 为什么是两个, 因为More 也占用一个位置
13487
+ var popList = [
13488
+ list.pop(),
13489
+ list.pop()
13490
+ ];
13491
+ for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
13492
+ var item = _step.value;
13493
+ if (item) {
13494
+ var _this_controls_key_$container, _this_controls_key, _this_controls, _this_controls_key_$container1, _this_controls_key1, _this_controls1, _this_controls_key_resetPopupContainer, _this_controls_key2, _this_controls2, _this_controls3, _this__footerMoreControl2;
13495
+ var key = "" + item.iconId + "Control";
13496
+ var width = ((_this_controls = this.controls) == null ? void 0 : (_this_controls_key = _this_controls[key]) == null ? void 0 : (_this_controls_key_$container = _this_controls_key.$container) == null ? void 0 : _this_controls_key_$container.clientWidth) || 0;
13497
+ var height = ((_this_controls1 = this.controls) == null ? void 0 : (_this_controls_key1 = _this_controls1[key]) == null ? void 0 : (_this_controls_key_$container1 = _this_controls_key1.$container) == null ? void 0 : _this_controls_key_$container1.clientHeight) || 0;
13498
+ (_this_controls2 = this.controls) == null ? void 0 : (_this_controls_key2 = _this_controls2[key]) == null ? void 0 : (_this_controls_key_resetPopupContainer = _this_controls_key2.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer.call(_this_controls_key2, this._footerMoreControl.$panel, 'prepend');
13499
+ (_this__footerMoreControl2 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls3 = this.controls) == null ? void 0 : _this_controls3[key], {
13500
+ width: width,
13501
+ height: height
13502
+ });
12934
13503
  }
12935
13504
  }
12936
- // prettier-ignore
12937
- _this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!_this._footerMoreControl, (_this__footerMoreControl1 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list1 = _this__footerMoreControl1.list) == null ? void 0 : _this__footerMoreControl_list1.map(function(item) {
12938
- return item.key;
12939
- }));
12940
- if (_this._footerMoreControl) {
12941
- // 防止 More 不存在导致死循环
12942
- displayMore();
13505
+ } else if (this._footerMoreControl) {
13506
+ var item1 = list.pop();
13507
+ if (item1) {
13508
+ var _this_controls_key_$container2, _this_controls_key3, _this_controls4, _this_controls_key_$container3, _this_controls_key4, _this_controls5, _this_controls_key_resetPopupContainer1, _this_controls_key5, _this_controls6, _this_controls7, _this__footerMoreControl3;
13509
+ var key1 = "" + item1.iconId + "Control";
13510
+ var width1 = ((_this_controls4 = this.controls) == null ? void 0 : (_this_controls_key3 = _this_controls4[key1]) == null ? void 0 : (_this_controls_key_$container2 = _this_controls_key3.$container) == null ? void 0 : _this_controls_key_$container2.clientWidth) || 0;
13511
+ var height1 = ((_this_controls5 = this.controls) == null ? void 0 : (_this_controls_key4 = _this_controls5[key1]) == null ? void 0 : (_this_controls_key_$container3 = _this_controls_key4.$container) == null ? void 0 : _this_controls_key_$container3.clientHeight) || 0;
13512
+ (_this_controls6 = this.controls) == null ? void 0 : (_this_controls_key5 = _this_controls6[key1]) == null ? void 0 : (_this_controls_key_resetPopupContainer1 = _this_controls_key5.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer1.call(_this_controls_key5, this._footerMoreControl.$panel, 'prepend');
13513
+ (_this__footerMoreControl3 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls7 = this.controls) == null ? void 0 : _this_controls7[key1], {
13514
+ width: width1,
13515
+ height: height1
13516
+ });
13517
+ } else {
13518
+ return;
12943
13519
  }
12944
- } else if (_this._width - leftWidth - rightWidth > 110) {
12945
- var _this__footerMoreControl_list2, _this__footerMoreControl4;
13520
+ }
13521
+ // prettier-ignore
13522
+ this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!this._footerMoreControl, (_this__footerMoreControl1 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list1 = _this__footerMoreControl1.list) == null ? void 0 : _this__footerMoreControl_list1.map(function(item) {
13523
+ return item.key;
13524
+ }));
13525
+ if (this._footerMoreControl) {
13526
+ // 防止 More 不存在导致死循环
13527
+ this._displayMore();
13528
+ }
13529
+ } else {
13530
+ var _this__footerMoreControl_list2, _this__footerMoreControl5, _this__footerMoreControl_list3, _this__footerMoreControl6;
13531
+ var offset = 50;
13532
+ // if (this._footerMoreControl?.list?.length && this._footerMoreControl?.list?.length > 2) {
13533
+ // offset = 16;
13534
+ // }
13535
+ if ((_this__footerMoreControl5 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list2 = _this__footerMoreControl5.list) == null ? void 0 : _this__footerMoreControl_list2.length) {
13536
+ offset = offset + this._footerMoreControl.list[0].width || 0;
13537
+ }
13538
+ if (((_this__footerMoreControl6 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list3 = _this__footerMoreControl6.list) == null ? void 0 : _this__footerMoreControl_list3.length) && this._width - leftWidth - rightWidth > offset) {
13539
+ var _this__footerMoreControl7, _this__footerMoreControl_list4, _this__footerMoreControl8, _this__footerMoreControl_list5, _this__footerMoreControl9;
12946
13540
  // 110 是为了保住个别控件的宽度超出已知的值, 如英文下 按钮的宽度
12947
13541
  // 从 More 中一次移除一个控件到 header/footer 中
12948
- if ((_this__footerMoreControl4 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list2 = _this__footerMoreControl4.list) == null ? void 0 : _this__footerMoreControl_list2.length) {
12949
- var _this__footerMoreControl5, _this__footerMoreControl_list3, _this__footerMoreControl6, _this__footerMoreControl_list4, _this__footerMoreControl7;
12950
- //
12951
- var item2 = (_this__footerMoreControl5 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl5.list.shift();
12952
- if (item2) {
12953
- var _this__footerMoreControl8;
12954
- if (item2.part === 'left') {
12955
- var _item_control_resetPopupContainer, _item_control;
12956
- (_item_control = item2.control) == null ? void 0 : (_item_control_resetPopupContainer = _item_control.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer.call(_item_control, _this._footer.$left, 'append');
12957
- } else if (item2.part === 'right') {
12958
- var _this__footerMoreControl_list5, _this__footerMoreControl9;
12959
- if (((_this__footerMoreControl9 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list5 = _this__footerMoreControl9.list) == null ? void 0 : _this__footerMoreControl_list5.length) === 0) {
12960
- var _item_control_resetPopupContainer1, _item_control1;
12961
- (_item_control1 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer1 = _item_control1.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer1.call(_item_control1, _this._footer.$right, 'append');
12962
- } else {
12963
- var _item_control_resetPopupContainer2, _item_control2;
12964
- (_item_control2 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer2 = _item_control2.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer2.call(_item_control2, _this._footer.$right, 'before', _this._footerMoreControl.$container);
12965
- }
13542
+ //
13543
+ var item2 = (_this__footerMoreControl7 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl7.list.shift();
13544
+ if (item2) {
13545
+ var _this__footerMoreControl10;
13546
+ if (item2.part === 'left') {
13547
+ var _item_control_resetPopupContainer, _item_control;
13548
+ (_item_control = item2.control) == null ? void 0 : (_item_control_resetPopupContainer = _item_control.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer.call(_item_control, this._footer.$left, 'append');
13549
+ } else if (item2.part === 'right') {
13550
+ var _this__footerMoreControl_list6, _this__footerMoreControl11;
13551
+ if (((_this__footerMoreControl11 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list6 = _this__footerMoreControl11.list) == null ? void 0 : _this__footerMoreControl_list6.length) === 0) {
13552
+ var _item_control_resetPopupContainer1, _item_control1;
13553
+ (_item_control1 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer1 = _item_control1.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer1.call(_item_control1, this._footer.$right, 'append');
13554
+ } else {
13555
+ var _item_control_resetPopupContainer2, _item_control2;
13556
+ (_item_control2 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer2 = _item_control2.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer2.call(_item_control2, this._footer.$right, 'before', this._footerMoreControl.$container);
12966
13557
  }
12967
- (_this__footerMoreControl8 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl8.remove(item2.control);
12968
13558
  }
12969
- if (((_this__footerMoreControl6 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list3 = _this__footerMoreControl6.list) == null ? void 0 : _this__footerMoreControl_list3.length) === 1) {
12970
- var _this__footerMoreControl10, _this__footerMoreControl_destroy, _this__footerMoreControl11;
12971
- // 最后一个, 移除 More
12972
- var item11 = (_this__footerMoreControl10 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl10.list.shift();
12973
- if (item11) {
12974
- var _this__footerMoreControl12;
12975
- if (item11.part === 'left') {
12976
- var _item1_control_resetPopupContainer, _item1_control;
12977
- (_item1_control = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer = _item1_control.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer.call(_item1_control, _this._footer.$left, 'append');
12978
- } else if (item11.part === 'right') {
12979
- var _item1_control_resetPopupContainer1, _item1_control1;
12980
- (_item1_control1 = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer1 = _item1_control1.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer1.call(_item1_control1, _this._footer.$right, 'append');
12981
- }
12982
- (_this__footerMoreControl12 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl12.remove(item11.control);
13559
+ (_this__footerMoreControl10 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl10.remove(item2.control);
13560
+ }
13561
+ if (((_this__footerMoreControl8 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list4 = _this__footerMoreControl8.list) == null ? void 0 : _this__footerMoreControl_list4.length) === 1) {
13562
+ var _this__footerMoreControl12, _this__footerMoreControl_destroy, _this__footerMoreControl13;
13563
+ // 最后一个, 移除 More
13564
+ var item11 = (_this__footerMoreControl12 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl12.list.shift();
13565
+ if (item11) {
13566
+ var _this__footerMoreControl14;
13567
+ if (item11.part === 'left') {
13568
+ var _item1_control_resetPopupContainer, _item1_control;
13569
+ (_item1_control = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer = _item1_control.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer.call(_item1_control, this._footer.$left, 'append');
13570
+ } else if (item11.part === 'right') {
13571
+ var _item1_control_resetPopupContainer1, _item1_control1;
13572
+ (_item1_control1 = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer1 = _item1_control1.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer1.call(_item1_control1, this._footer.$right, 'append');
12983
13573
  }
12984
- (_this__footerMoreControl11 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_destroy = _this__footerMoreControl11.destroy) == null ? void 0 : _this__footerMoreControl_destroy.call(_this__footerMoreControl11);
12985
- _this._footerMoreControl = null;
13574
+ (_this__footerMoreControl14 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl14.remove(item11.control);
12986
13575
  }
12987
- // prettier-ignore
12988
- _this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!_this._footerMoreControl, (_this__footerMoreControl7 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list4 = _this__footerMoreControl7.list) == null ? void 0 : _this__footerMoreControl_list4.map(function(item) {
12989
- return item.key;
12990
- }));
12991
- displayMore();
13576
+ (_this__footerMoreControl13 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_destroy = _this__footerMoreControl13.destroy) == null ? void 0 : _this__footerMoreControl_destroy.call(_this__footerMoreControl13);
13577
+ this._footerMoreControl = null;
12992
13578
  }
13579
+ // prettier-ignore
13580
+ this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!this._footerMoreControl, (_this__footerMoreControl9 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list5 = _this__footerMoreControl9.list) == null ? void 0 : _this__footerMoreControl_list5.map(function(item) {
13581
+ return item.key;
13582
+ }));
13583
+ this._displayMore();
12993
13584
  }
12994
13585
  }
12995
- };
12996
- displayMore();
13586
+ }
12997
13587
  };
12998
13588
  /**
12999
13589
  * 移除事件
@@ -13071,6 +13661,7 @@
13071
13661
  [
13072
13662
  'ptz',
13073
13663
  'talk',
13664
+ 'broadcast',
13074
13665
  'record',
13075
13666
  'speed'
13076
13667
  ].forEach(function(key) {
@@ -13148,6 +13739,7 @@
13148
13739
  [
13149
13740
  'ptz',
13150
13741
  'talk',
13742
+ 'broadcast',
13151
13743
  'record'
13152
13744
  ].forEach(function(key) {
13153
13745
  var _this_controls;
@@ -13508,7 +14100,7 @@
13508
14100
  zh: zh,
13509
14101
  en: en
13510
14102
  };
13511
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.0-beta.8';
14103
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.1-beta.1';
13512
14104
 
13513
14105
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
13514
14106