From 274ca4b6bcff8c8527a30e3196b1535b921c06a9 Mon Sep 17 00:00:00 2001
From: a0049873 <79py69t9wb@privaterelay.appleid.com>
Date: Tue, 29 Nov 2022 11:54:04 +0800
Subject: [PATCH 01/29] =?UTF-8?q?=E9=9C=80=E6=B1=82=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/home/infrastructureApplication.vue | 24 +++++++++++++++++--
.../src/views/home/infrastructurePageXha.vue | 13 +++++++++-
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/front/src/views/home/infrastructureApplication.vue b/front/src/views/home/infrastructureApplication.vue
index 16103708..13ee5cf1 100644
--- a/front/src/views/home/infrastructureApplication.vue
+++ b/front/src/views/home/infrastructureApplication.vue
@@ -2,7 +2,7 @@
* @Author: Light
* @Date: 2022-11-18 11:53:43
* @LastEditors: Light
- * @LastEditTime: 2022-11-28 16:45:50
+ * @LastEditTime: 2022-11-29 11:50:25
* @Description: 告诉大家这是什么
-->
@@ -28,7 +28,27 @@
- 待申请列表
+
一键申请
diff --git a/front/src/views/home/infrastructurePageXha.vue b/front/src/views/home/infrastructurePageXha.vue
index af23767d..7acd9a99 100644
--- a/front/src/views/home/infrastructurePageXha.vue
+++ b/front/src/views/home/infrastructurePageXha.vue
@@ -409,7 +409,8 @@
v-loading="spinningHome"
element-loading-text="Loading..."
element-loading-svg-view-box="-10, -10, 50, 50"
- element-loading-background="rgba(122, 122, 122, 0.8)"
+ element-loading-background="rgba(122, 122, 122, 0.9)"
+ :element-loading-svg="svg"
>
@@ -714,6 +715,16 @@
const spinning = ref(true)
const whoShow1 = ref(whoShow)
const isXiHaiAn = whoShow1.value.itShowXiHaiAn
+ const svg = `
+
+ `
const options = reactive({
width: '912px', //播放器宽度
height: '513px', //播放器高度
From 953fe9e18faca31e473d9556b66cfa133dde2373 Mon Sep 17 00:00:00 2001
From: wuhongjian
Date: Tue, 29 Nov 2022 11:57:33 +0800
Subject: [PATCH 02/29] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
front/public/static/config/basicConfig.js | 6 +-
front/public/util/h5player.min.js | 2 +-
front/src/api/assertReport.js | 107 +-
.../components/ReservoirBottom.vue | 82 +-
.../components/ReservoirRight.vue | 604 +++++------
.../components/ReservoirThumbnail.vue | 940 +++++++++---------
front/src/views/assertReport/index.vue | 414 ++++----
.../components/DataResources.vue | 12 +-
front/src/views/home/components/H5Player.vue | 141 +--
9 files changed, 1114 insertions(+), 1194 deletions(-)
diff --git a/front/public/static/config/basicConfig.js b/front/public/static/config/basicConfig.js
index 93e613a5..f9ae5aed 100644
--- a/front/public/static/config/basicConfig.js
+++ b/front/public/static/config/basicConfig.js
@@ -2,13 +2,13 @@
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian
- * @LastEditTime: 2022-11-27 23:42:04
+ * @LastEditTime: 2022-11-29 11:21:41
* @Description: 系统静态参数配置
*/
var _global = {}
var CONFIGITEM = {
- // version: 'qingdao', //青岛
- version: 'xihaian', // 西海岸
+ version: 'qingdao', //青岛
+ // version: 'xihaian', // 西海岸
// version: 'dev', // 开发
// version: 'zhanTingDev', // 展厅dev (2022-09-13:姜永超让添加)
// version: 'qingdao', // 测试
diff --git a/front/public/util/h5player.min.js b/front/public/util/h5player.min.js
index b3c6b957..b145541a 100644
--- a/front/public/util/h5player.min.js
+++ b/front/public/util/h5player.min.js
@@ -300,7 +300,7 @@ var t;e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_
//! moment.js locale configuration
var t;e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var i=e*100+t;if(i<600)return"凌晨";else if(i<900)return"早上";else if(i<1130)return"上午";else if(i<1230)return"中午";else if(i<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(0))},function(e,t,n){!function(e){"use strict";
//! moment.js locale configuration
-var t;e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){if(e===12)e=0;if(t==="凌晨"||t==="早上"||t==="上午")return e;else if(t==="中午")return e>=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var i=e*100+t;if(i<600)return"凌晨";else if(i<900)return"早上";else if(i<1130)return"上午";else if(i<1230)return"中午";else if(i<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(0))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(20)),r=s(n(38)),a=s(n(1));function s(e){return e&&e.__esModule?e:{default:e}}(0,s(n(2)).default)(u,null,[{key:"install",value:function(){Object.setPrototypeOf=r.default||function(e,t){return e.__proto__=t,e},Object.assign=i.default||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n=n[t]&ðis._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),i=new Uint8Array(this._stashBuffer,0,this._bufferSize)),i.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength):(r=this._dispatchChunks(e,t))this._bufferSize&&(this._expandBuffer(a),i=new Uint8Array(this._stashBuffer,0,this._bufferSize)),i.set(new Uint8Array(e,r),0),this._stashUsed+=a,this._stashByteStart=t+r))):0===this._stashUsed?(i=this._dispatchChunks(e,t))this._bufferSize&&this._expandBuffer(a),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,i),0),this._stashUsed+=a,this._stashByteStart=t+i):(this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength),(r=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength,(a=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))=n[t].dts&&et[n].lastSample.originalDts&&e=t[n].lastSample.originalDts&&(n===t.length-1||nthis._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength),this._stashBuffer.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength,this._emitter.listeners(u)&&this._emitter.emit(u)}},{key:"_expandBuffer",value:function(e){this._bufferSize=e;e=this._stashBuffer.slice(0,this._stashUsed);this._stashBuffer=new Uint8Array(this._bufferSize),this._stashBuffer.set(e,0)}},{key:"_downloadFile",value:function(e){var t=e,e=(e instanceof Blob||e instanceof File||(t=new Blob([e])),window.URL.createObjectURL(t)),t=window.document.createElement("a"),e=(t.href=e,t.download=this._fileName,document.createEvent("MouseEvents"));e.initEvent("click",!0,!0),t.dispatchEvent(e)}},{key:"onReady",set:function(e){this._fileWriterReady=e}}]),l);function l(e,t){(0,i.default)(this,l),this._fileName=e,this._storageQuota=268435456,this._fileSystem=null,this._fileEntry=null,this._fileWriter=null,this._isStart=!1,this._emitter=new a.default,this._defaultBufferSize=134217728,this._bufferSize=this._defaultBufferSize,this._stashBuffer=new Uint8Array(this._bufferSize),this._stashUsed=0,this._stash(t),this._quota()}t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetails=t.ErrorTypes=void 0;var i=n(15),n=n(66),n=(n=n)&&n.__esModule?n:{default:n};t.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},t.ErrorDetails={NETWORK_EXCEPTION:i.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:i.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:i.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:i.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:n.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:n.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:n.default.CODEC_UNSUPPORTED}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSPlugin=void 0;var m=r(n(11)),p=r(n(85)),y=r(n(53)),v=r(n(54)),a=r(n(1)),i=r(n(2)),g=r(n(55)),f=n(86),s=n(262),u=n(285),d=n(286),o=n(287),l=n(288),h=n(289),c=r(n(290)),_=r(n(0)),M=r(n(10)),L=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(n(61)),S=r(n(334)),k=r(n(91)),b=r(n(39)),w=n(335);function r(e){return e&&e.__esModule?e:{default:e}}var D,T,E=4194304,Y=!1,P=null,C=[],n=(window.JSPlayM4_AdditionDataCBFun=function(t,e){var n,i,r,a,s=C.find(function(e){return e.port===t}).belongWindowpoint,o=C.find(function(e){return e.port===t}).belongWindowId,s=s.aWndList[o];s&&s.AdditionDataCB&&(o=P.HEAP32[e>>2],n=P.HEAP32[e+4>>2],i=P.HEAP32[e+8>>2],r=P.HEAP32[e+12>>2],e=P.HEAP32[e+16>>2],(a=new Uint8Array(r)).set(P.HEAPU8.subarray(e,e+r)),s.AdditionDataCB(o,n,i,a))},(0,i.default)(R,[{key:"_getOSDTime",value:function(e,t,n,i,r,a,s){var o=void 0,o="ios"===this._browserInfo._system||f.oTool.isEdge()?t+"/"+n+"/"+i+" "+r+":"+a+":"+s:t+"-"+n+"-"+i+" "+r+":"+a+":"+s;this.aWndList[e].iCurentOSDTime=new Date(o).getTime()}},{key:"_getWndIndexFromPort",value:function(e){for(var t=this.aWndList.length,n=-1,i=0;i\n \n \n \n ',d.appendChild(t)}(f);this.oJSPlugin.find("video.play-window").hide()}},{key:"_updateWnd",value:function(){for(var e=this.oJSPlugin.find(".parent-wnd").get(0),t=e.clientWidth,n=e.clientHeight,i=(t&&n&&(this.options.iWidth=t,this.options.iHeight=n),this.options.oStyle.borderWidth),r=this.options.iCurrentSplit,t=Math.floor((t-1)/r),n=Math.floor((n-1)/r),a=parseFloat((window.screen.width/window.innerWidth).toFixed(2)),s=Math.floor(t-i/a*2),o=Math.floor(n-i/a*2),u=0;ue.endPos[0]?n.aWndList[t].oPlayCtrl.PlayM4_SetDisplayRegion&&n.aWndList[t].oPlayCtrl.PlayM4_SetDisplayRegion(null,!1):n.aWndList[t].oPlayCtrl.PlayM4_SetDisplayRegion&&n.aWndList[t].oPlayCtrl.PlayM4_SetDisplayRegion({left:e.startPos[0],top:e.startPos[1],right:e.endPos[0],bottom:e.endPos[1]},!0))}):this.aWndList[t].b3DZoom&&this.oDrawCanvas.setDrawStatus(!0,function(e){n.fDrawCallback(e)}))}},{key:"_initCallbackEvent",value:function(){this.oEventCallback={loadEventHandler:function(){window.loadEventHandler&&window.loadEventHandler()},windowEventSelect:function(e){window.getSelectWndInfo&&window.getSelectWndInfo(e)},pluginErrorHandler:function(e,t,n){window.pluginEventHandler&&window.pluginEventHandler(e,t,n)},windowEventOver:function(e){window.windowEventOver&&window.windowEventOver(e)},windowEventOut:function(e){window.windowEventOut&&window.windowEventOut(e)},windowEventUp:function(e){window.windowEventUp&&window.windowEventUp(e)},windowFullCcreenChange:function(e){window.windowFullCcreenChange&&window.windowFullCcreenChange(e)},firstFrameDisplay:function(e,t,n){window.firstFrameDisplay&&window.firstFrameDisplay(e,t,n)},performanceLack:function(){window.performanceLack&&window.performanceLack()},StreamEnd:function(e){window.StreamEnd&&window.StreamEnd(e)},mouseEvent:function(){}}}},{key:"_initEvent",value:function(){var a=this;this._initCallbackEvent(),this.oJSPlugin.find(".parent-wnd").eq(0).children().each(function(i){var r=!1;(0,g.default)(this).unbind().bind("click",function(e){var t,n;0===e.button&&(t=(e=a.options.oStyle).borderWidth,n=e.border,e=e.borderSelect,a.oJSPlugin.find(".parent-wnd").eq(0).children().css("border",t+"px solid "+n),a.oJSPlugin.find(".parent-wnd").eq(0).children().eq(i).css("border",t+"px solid "+e),a.oEventCallback.windowEventSelect(parseInt(a.oJSPlugin.find(".parent-wnd").eq(0).children().eq(i).find(".play-window").eq(0).attr("wid"),10)),a._dealWndSelect(parseInt(a.oJSPlugin.find(".parent-wnd").eq(0).children().eq(i).find(".play-window").eq(0).attr("wid"),10)))}),(0,g.default)(this).bind("mouseover",function(e){a.oEventCallback.windowEventOver(i)}),(0,g.default)(this).bind("mouseout",function(e){a.oEventCallback.windowEventOut(i)}),(0,g.default)(this).bind("mousemove",function(e){var t=e.offsetX/a.oDrawCanvas.m_iCanvasWidth,e=e.offsetY/a.oDrawCanvas.m_iCanvasHeight;r?a.oEventCallback.mouseEvent(7,t,e):a.oEventCallback.mouseEvent(6,t,e)}),(0,g.default)(this).bind("mousewheel",function(e){var t=e.offsetX/a.oDrawCanvas.m_iCanvasWidth,e=e.offsetY/a.oDrawCanvas.m_iCanvasHeight;a.oEventCallback.mouseEvent(8,t,e)}),(0,g.default)(this).bind("mouseup",function(e){r=!1,a.oEventCallback.windowEventUp(i);var t=e.offsetX/a.oDrawCanvas.m_iCanvasWidth,n=e.offsetY/a.oDrawCanvas.m_iCanvasHeight;2===e.button?a.oEventCallback.mouseEvent(5,t,n):0===e.button&&a.oEventCallback.mouseEvent(3,t,n)}),(0,g.default)(this).bind("dblclick",function(e){var t;a.options.bSupporDoubleClickFull&&("desktop"===a._browserInfo.platform?a.JS_FullScreenSingle(i):a.fullscreenElement?a._triggerFullscreen(a.fullscreenElement):a.JS_FullScreenSingle(a.currentWindowIndex),t=e.offsetX/a.oDrawCanvas.m_iCanvasWidth,e=e.offsetX/a.oDrawCanvas.m_iCanvasHeight,a.oEventCallback.mouseEvent(2,t,e))})}),window.addEventListener("resize",this.e.resize),document.addEventListener("fullscreenchange",this.e.fullscreenchange)}},{key:"_eventHandlerResize",value:function(){if(!(document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||!1)&&this.fullscreenElement){var e=this.fullscreenElement;if(!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||e.webkitSupportsFullscreen||!1))return this._triggerFullscreen(e);this.fullscreenElement=null,this.oEventCallback.windowFullCcreenChange(!1)}this.JS_Resize()}},{key:"_eventHandlerFullscreenchange",value:function(){if(!(document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||!1)&&this.fullscreenElement){var e=this.fullscreenElement;if(!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||e.webkitSupportsFullscreen||!1))return this._triggerFullscreen(e);this.fullscreenElement=null,this.oEventCallback.windowFullCcreenChange(!1)}this.JS_Resize()}},{key:"_eventHandlerVisibilitychange",value:function(){this.isBrowserVisible=!document.hidden}},{key:"removeAllListeners",value:function(){window.removeEventListener("resize",this.e.resize),document.removeEventListener("fullscreenchange",this.e.fullscreenchange),document.removeEventListener("visibilitychange",this.e.visibilitychange)}},{key:"_debounse",value:function(e,t){var n=this;this._debounseTimer&&clearTimeout(this._debounseTimer),this._debounseTimer=setTimeout(function(){e.apply(n),clearTimeout(n._debounseTimer),n._debounseTimer=null},t)}},{key:"_initPlayCtrlOnlyAudio",value:function(e,t){t=new Uint8Array(t);t[10]=0,t[11]=0,this.aWndList[e].oPlayCtrl.PlayM4_OpenStream(t,40,2097152),""!==this.aWndList[e].szSecretKey&&(this.aWndList[e].oPlayCtrl.PlayM4_SetSecretKey(1,this.aWndList[e].szSecretKey,128),this.aWndList[e].szSecretKey=""),this.aWndList[e].oPlayCtrl.PlayM4_SetStreamOpenMode(0),this.aWndList[e].oPlayCtrl.PlayM4_Play(null)}},{key:"flvtohikHead",value:function(e){var t=new Uint8Array(40),e=(t[0]=73,t[1]=77,t[2]=75,t[3]=72,t[4]=3,t[5]=1,t[6]=0,t[7]=0,t[8]=10,t[9]=0,t[10]=0,t[11]=1,t[12]=1,t[13]=32,t[14]=1,t[15]=12,this.aWndList[e]._videoInfo.audioSampleRate.toString(16));return t[16]=parseInt(e[2]+e[3],16),t[17]=parseInt(e[0]+e[1],16),t}},{key:"_changeHVAGHead",value:function(e){var t=new Uint8Array(40);return t[0]=73,t[1]=77,t[2]=75,t[3]=72,t[4]=3,t[5]=1,t[6]=0,t[7]=0,192===e[8]&&0===e[9]?t[8]=4:t[8]=2,t[9]=0,100===e[24]&&97===e[25]&&104===e[26]&&117===e[27]&&97===e[28]&&(t[8]=1,t[9]=128),0!==e[11]&&1!==e[11]||192!==e[10]?2===e[11]&&192===e[10]?t[10]=3:3===e[11]&&192===e[10]?t[10]=5:4===e[11]&&192===e[10]?t[10]=4:5===e[11]&&192===e[10]?t[10]=2:6===e[11]&&192===e[10]?t[10]=6:t[10]=1:t[10]=1,t[11]=0,1===e[13]&&192===e[12]?(t[12]=16,t[13]=113):2===e[13]&&192===e[12]?(t[12]=17,t[13]=113):3===e[13]&&192===e[12]?(t[12]=33,t[13]=114):4===e[13]&&192===e[12]?(t[12]=96,t[13]=114):5===e[13]&&192===e[12]?(t[12]=1,t[13]=32):6===e[13]&&192===e[12]?(t[12]=0,t[13]=32):7===e[13]&&192===e[12]?(t[12]=0,t[13]=112):(t[12]=16,t[13]=113),t}},{key:"_parseHead",value:function(e,t){1===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="HIK":2===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="PS":4===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="RTP":8===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="GB":16===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="RAW":1===t[8]&&128===t[9]?this.aWndList[e]._videoInfo.systemFormt="DAHUA":this.aWndList[e]._videoInfo.systemFormt="unkonw",1===t[11]&&0===t[10]||0===t[11]&&1===t[10]?(this.aWndList[e]._videoInfo.VideType="H264",129===t[24]&&(this.aWndList[e]._videoInfo.VideType="Smart264")):0===t[11]&&5===t[10]?(this.aWndList[e]._videoInfo.VideType="H265",129===t[24]&&(this.aWndList[e]._videoInfo.VideType="Smart265")):0===t[11]&&6===t[10]?this.aWndList[e]._videoInfo.VideType="SAC":0===t[11]&&2===t[10]?this.aWndList[e]._videoInfo.VideType="MPEG2":0===t[11]&&3===t[10]?this.aWndList[e]._videoInfo.VideType="MPEG4":this.aWndList[e]._videoInfo.VideType="unkonw",113===t[13]&&16===t[12]?this.aWndList[e]._videoInfo.audioType="G711_U":113===t[13]&&17===t[12]?this.aWndList[e]._videoInfo.audioType="G711_A":114===t[13]&&33===t[12]?this.aWndList[e]._videoInfo.audioType="G7221":114===t[13]&&96===t[12]?this.aWndList[e]._videoInfo.audioType="G726_32":114===t[13]&&98===t[12]?this.aWndList[e]._videoInfo.audioType="G726_16":114===t[13]&&144===t[12]?this.aWndList[e]._videoInfo.audioType="G729":32===t[13]&&1===t[12]?this.aWndList[e]._videoInfo.audioType="AAC":16===t[13]&&0===t[12]?this.aWndList[e]._videoInfo.audioType="ADPCM":32===t[13]&&0===t[12]?this.aWndList[e]._videoInfo.audioType="MP2L2":0===t[13]&&0===t[12]?this.aWndList[e]._videoInfo.audioType="without":this.aWndList[e]._videoInfo.audioType="unknow"}},{key:"_stripRtpHead",value:function(e){var e=new Uint8Array(e),t=32&e[0],n=16&e[0],i=15&e[0],r=0,a=0;return 32==t&&(r=e[e.byteLength-1]),t=4*parseInt(i,10),16==n&&(a=4*new window.DataView(e.buffer,12+t,4).getUint16(2)+4),e.length<=12+t+a?-1:e.slice(12+t+a,e.length-r)}},{key:"_openStream",value:function(i,a,s,o,u){var d=this,l=this.aWndList[s];return new m.default(function(t,r){var n,e=o&&u;l.szPlayType=e?"playback":"realplay",3===a.PlayBackMode&&e&&(l.szPlayType="reverse"),l._emiter.on("firstframeload",function(){l.asyncLock=!1,t()},{once:!0}),d.oStreamClient.openStream(i,a,(n=(0,v.default)(y.default.mark(function e(t){var n,i;return y.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.bHead){e.next=49;break}if(l.oSdpInfo=t,n=l.aHead=new Uint8Array(t.buf),d._log.I("headData arrive",n),l.isGB=0===n[7]&&196===n[8]&&100===n[24]&&98===n[25]&&51===n[26]&&51===n[27],72===n[0]&&86===n[1]&&65===n[2]&&71===n[3]?(l.isHVAGHead=!0,l.aHVAGHead=new Uint8Array(t.buf),l.aHead=d._changeHVAGHead(t.buf)):l.isHVAGHead=!1,l.isHVAGHead&&1===l.aHead[8]&&128===l.aHead[9]&&"1"===d._decoderVersion)return d._log.E(L.ERR_STREAM_VIDEO_CODING+": jsdecoder1.0 unsupport dahua video"),l.asyncLock=!1,d._closeStreamAndDestory(s),d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_VIDEO_CODING),e.abrupt("return",r(L.ERR_STREAM_VIDEO_CODING));e.next=12;break;case 12:if(!(70===n[0]&&76===n[1]&&86===n[2])){e.next=19;break}l.iMode=1,l.isFlv=!0,d._createFlvPlayer(s),e.next=47;break;case 19:if(!(5===l.aHead[10]&&0===l.aHead[11]||1===l.aHead[10]&&0===l.aHead[11]||0===l.aHead[10]&&1===l.aHead[11])){e.next=22;break}e.next=24;break;case 22:return d._log.E(L.ERR_STREAM_JSDECODER_CODEC_UNSUPPORTED+": the stream not h264 h265 smart,unsupport .",l.aHead[10],l.aHead[11]),e.abrupt("return",r(L.ERR_STREAM_JSDECODER_CODEC_UNSUPPORTED));case 24:if(d._parseHead(s,l.aHead),d.aWndList[s]._bpsCalculator||(d.aWndList[s]._bpsCalculator=window.setInterval(d._calculateRealtimeBitrate.bind(d),1e3,s)),i=1,d.aWndList[s].asyncLock&&"2"===d._decoderVersion)return d._log.E(L.ERR_STREAM_LOCK_ERROR+": Multiple call js_play API in a short time, please wait lasttime call over."),e.abrupt("return",r(L.ERR_STREAM_LOCK_ERROR));e.next=30;break;case 30:if(d.aWndList[s].asyncLock=!0,l.oPlayCtrl){e.next=45;break}if(P||"2"!==d._decoderVersion){e.next=42;break}return e.prev=33,e.next=36,d._decoder2Loaded();case 36:i=e.sent,e.next=42;break;case 39:e.prev=39,e.t0=e.catch(33),1===e.t0||P||(l.asyncLock=!1,d.oEventCallback.pluginErrorHandler(s,L.ERR_COM_LOAD_JSDECODER_ERROR),d._closeStreamAndDestory(s),d._log.E(L.ERR_COM_LOAD_JSDECODER_ERROR+": load jsdecoder faild."),r(L.ERR_COM_LOAD_JSDECODER_ERROR));case 42:d._createPlayCtrl(s),e.next=47;break;case 45:1!==(i=d._playCtrlLoad(s))&&(l.asyncLock=!1,d._closeStreamAndDestory(s),d.oEventCallback.pluginErrorHandler(s,i),d._log.E(i+": jsdecoder open stream faild."),r(i));case 47:e.next=50;break;case 49:t.cmd&&"end"===t.cmd?(d.oEventCallback.StreamEnd(s),l.asyncLock=!1,d.JS_Stop(s)):"1"!==d._decoderVersion&&!l.bPlay||d._feedData(s,t);case 50:case"end":return e.stop()}},e,d,[[33,39]])})),function(e){return n.apply(this,arguments)}),function(e){if(l.asyncLock=!1,d.aWndList[s].bPlay)1e3===e.code||1005===e.code?(d._log.E(L.ERR_STREAM_CONNECT_CLOSED+": 送流异常,被后端关闭连接"),d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_CONNECT_CLOSED,e)):(d._log.E(L.ERR_STREAM_INTERRUPT+": 流中断"),d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_INTERRUPT,e)),l.szStreamUUID="",d._closeStreamAndDestory(s);else{if(1e3===e.code||1005===e.code)return t();d.aWndList[s].szStreamUUID?(d.oEventCallback.pluginErrorHandler(s,L.ERR_COM_RECV_STREAM_TIMEOUT,e),l.szStreamUUID="",r(L.ERR_COM_RECV_STREAM_TIMEOUT)):1006===e.code&&-1!==i.search("wss://")?(d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_WSS_ERROR,e),r(L.ERR_STREAM_WSS_ERROR)):(d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_WS_ERROR,e),r(L.ERR_STREAM_WS_ERROR))}}).then(function(e){d.aWndList[s].szStreamUUID&&(d.oStreamClient.stop(d.aWndList[s].szStreamUUID),d.aWndList[s].szStreamUUID=""),d.aWndList[s].szStreamUUID=e,d.oStreamClient&&d.oStreamClient.startPlay(e,o,u,l.szPlayType).then(function(){},function(e){l.szStreamUUID="",l.asyncLock=!1;var t="0x0"+e.errorCode.toString(16);l.bPlay||(d._log.E(t+": 取流失败,详情根据错误码在运管后台进行查询."),d.oEventCallback.pluginErrorHandler(s,t,e),r(t)),r(L.ERR_STREAM_OPEN_FAILED)})}).catch(function(e){l.asyncLock=!1,d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_WS_TIMEOUT,e),d._closeStreamAndDestory(s),r(L.ERR_STREAM_WS_TIMEOUT)})})}},{key:"JS_GetPluginVersion",value:function(){var t=this;return new m.default(function(e){e(t.szPluginVersion)})}},{key:"JS_SetWindowControlCallback",value:function(t){var n=this;return new m.default(function(e){n.oEventCallback=g.default.extend(n.oEventCallback,t),e()})}},{key:"JS_SetSecretKey",value:function(n,i){var r=this;return new m.default(function(e,t){n<0||""===i||void 0===i?t():(r.aWndList[n].szSecretKey=i,e())})}},{key:"JS_ArrangeWindow",value:function(i){var r=this;return new m.default(function(e,t){if(i<1||"number"!=typeof i)return t(L.ERR_COM_PARAM);if(ithis.iMaxWndNum-1||"number"!=typeof s)&&(s=this.iCurrentWndIndex),new m.default(function(e,t){if("string"!=typeof r||-1===r.search("wss://")&&-1===r.search("ws://"))return t(L.ERR_COM_URL_ERROR);var n=0,i=(a.mode&&(n=a.mode),r),i=(1!==n&&o._supportInfo.MSE&&(i=/\?/g.test(r)?r+"&streamform=flv":r+"?streamform=flv"),o.aWndList[s].bopenTraceId&&(-1!==i.search("traceId=")&&0a.iMaxWndNum-1||"number"!=typeof r)&&(r=a.iCurrentWndIndex),"string"!=typeof s||"string"!=typeof o)return n(L.ERR_COM_PARAM);var e=s,i=o;if(-1!==s.search("Z")&&(e=e.replace("Z","+08:00")),-1!==o.search("Z")&&(i=i.replace("Z","+08:00")),e=new Date(e).getTime(),i=new Date(i).getTime(),!e||!i||i<=e||-1===s.search("T")||-1===s.search(":")||-1===s.search("-")||-1===o.search("T")||-1===o.search(":")||-1===o.search("-"))return n(L.ERR_COM_PARAM);i=a._checkPlayback(r);0!==i?n(i):a.oStreamClient.seek(a.aWndList[r].szStreamUUID,s,o).then(function(){var e=s;e&&-1!==e.search("Z")&&(e=e.replace("Z","+08:00")),a.aWndList[r].iGlobalBaseTime=new Date(e).getTime()-a.aWndList[r]._osdtimeInfo.flvduration,!0===a.aWndList[r].isPause&&(1===a.aWndList[r].iMode?(e=a.oJSPlugin.find("video.play-window").eq(r)).get(0).play&&e.get(0).play():a.aWndList[r].oPlayCtrl&&a.aWndList[r].oPlayCtrl.PlayM4_Pause(!1),a.aWndList[r].isPause=!1),t()},function(e){e="0x0"+e.errorCode.toString(16);a._log.E(e+": 定位失败,可能是定位传的时间异常导致,详情根据错误码在运管后台进行查询."),n(e)})})}},{key:"JS_GetSdkVersion",value:function(){return this.aWndList[0].oPlayCtrl.PlayM4_GetSdkVersion()}},{key:"JS_DestroyWorker",value:function(){var t=this;return new m.default(function(e){t.aWndList.forEach(function(e){e.oPlayCtrl=null}),e()})}},{key:"JS_Destroy",value:function(){var t=this;return new m.default(function(e){t.JS_StopRealPlayAll(),t.oStreamClient.stopAll(),t.oStreamClient=null,e()})}},{key:"JS_Stop",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.aWndList[i].asyncLock&&"2"===n._decoderVersion)return n._log.E(L.ERR_STREAM_LOCK_ERROR+": Multiple call js_stop API in a short time, please wait lasttime call over."),t(L.ERR_STREAM_LOCK_ERROR);n.aWndList[i]._bpsCalculator&&(self.clearInterval(n.aWndList[i]._bpsCalculator),n.aWndList[i]._bpsCalculator=null,n.aWndList[i]._bpsInfo={lastVideoBytes:0,bps_video:0,data_updated_time:0,time_gap_factor:1}),n.aWndList[i].szStorageUUID&&n.JS_StopSave(i),n.aWndList[i].bEZoom&&n.JS_DisableZoom(i),i===n.iCurrentSoundWnd&&(n.JS_CloseSound(),n.aWndList[i].MSEVolume=.5),n._closeStreamAndDestory(i),n.aWndList[i].isPause=!1,n.aWndList[i].bFirstFrame=!1,n.aWndList[i]._emiter.removeAllListeners(),n.aWndList[i]._resetFlvplayer=!1,e()})}},{key:"JS_Pause",value:function(){var i=this,r=0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var e=i._checkPlayback(r);if(0!==e)n(e);else{if(!i.aWndList[r].bFrameForward)return!0===i.aWndList[r].isPause?t():void i.oStreamClient.pause(i.aWndList[r].szStreamUUID).then(function(){var e;1===i.aWndList[r].iMode?(e=i.oJSPlugin.find("video.play-window").eq(r)).get(0).pause&&e.get(0).pause():i.aWndList[r].oPlayCtrl.PlayM4_Pause&&i.aWndList[r].oPlayCtrl.PlayM4_Pause(!0),i.aWndList[r].isPause=!0,t()},function(e){n(e)});i._log.E(L.ERR_PLAYBACK_FRAMEFORWARD+": status singleFrame not support this handle."),n(L.ERR_PLAYBACK_FRAMEFORWARD)}})}},{key:"JS_Resume",value:function(){var i=this,r=0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var e=i._checkPlay(r);return 0!==e?n(e):(i.aWndList[r].bFrameForward&&("2"===i._decoderVersion?i.aWndList[r].oPlayCtrl.PlayM4_OneByOne_Play&&i.aWndList[r].oPlayCtrl.PlayM4_OneByOne_Play():i.aWndList[r].oPlayCtrl.PlayM4_Play(i.options.szId+"_playCanvas"+r),i.aWndList[r].bFrameForward=!1),!1===i.aWndList[r].isPause?t():void i.oStreamClient.resume(i.aWndList[r].szStreamUUID).then(function(){var e;1===i.aWndList[r].iMode?(e=i.oJSPlugin.find("video.play-window").eq(r)).get(0).play&&e.get(0).play():(1!==i.iCurrentPlayRate&&(i.aWndList[r].iRate=i.iCurrentPlayRate,i.oStreamClient.setPlayRate(i.aWndList[r].szStreamUUID,i.aWndList[r].iRate),i.aWndList[r].oPlayCtrl.PlayM4_PlayRate&&i.aWndList[r].oPlayCtrl.PlayM4_PlayRate(i.aWndList[r].iRate),1i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var e=i._checkPlayback(r);return 0!==e?n(e):i.aWndList[r].bFrameForward?(i._log.E(L.ERR_PLAYBACK_FRAMEFORWARD+": status singleFrame not support this handle."),n(L.ERR_PLAYBACK_FRAMEFORWARD)):void(-8===i.aWndList[r].iRate?(i._log.E(L.ERR_PLAYBACK_MIN_RATE+": current rate is the min."),n(L.ERR_PLAYBACK_MIN_RATE)):(i.aWndList[r].iRate<0&&-8this.iMaxWndNum-1||"number"!=typeof r)&&(r=this.iCurrentWndIndex),new m.default(function(t,n){var e=i._checkPlayback(r);return 0!==e?n(e):i.aWndList[r].bFrameForward?(i._log.E(L.ERR_PLAYBACK_FRAMEFORWARD+": status singleFrame not support this handle."),n(L.ERR_PLAYBACK_FRAMEFORWARD)):8===i.aWndList[r].iRate?(i._log.E(L.ERR_PLAYBACK_MAX_RATE+": current rate is the max."),n(L.ERR_PLAYBACK_MAX_RATE)):(-2===i.aWndList[r].iRate?i.aWndList[r].iRate=1:i.aWndList[r].iRate<-2?i.aWndList[r].iRate/=2:0e.iMaxWndNum-1||"number"!=typeof i)&&(i=e.iCurrentWndIndex),e.aWndList[i].szStreamUUID?e.oStreamClient.transmission(e.aWndList[i].szStreamUUID,r).then(function(e){t(e)},function(e){n(e)}):n()})}},{key:"JS_FrameForward",value:function(){var i=this,r=0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var n=i._checkPlayback(r);return 0!==n?t(n):1===i.aWndList[r].iMode?(i._log.E(L.ERR_COM_IS_MSE+": MSE unsupport this function."),t(L.ERR_COM_IS_MSE)):(1!==i.aWndList[r].iRate?(i.aWndList[r].iRate=1,i.iCurrentPlayRate=i.aWndList[r].iRate,i.oStreamClient.setPlayRate(i.aWndList[r].szStreamUUID,i.aWndList[r].iRate).then(function(){i.aWndList[r].oPlayCtrl.PlayM4_PlayRate&&i.aWndList[r].oPlayCtrl.PlayM4_PlayRate(i.aWndList[r].iRate),i.aWndList[r].oPlayCtrl.PlayM4_SetDecodeFrameType&&i.aWndList[r].oPlayCtrl.PlayM4_SetDecodeFrameType(0),i.aWndList[r].oPlayCtrl.PlayM4_OneByOne&&i.aWndList[r].oPlayCtrl.PlayM4_OneByOne(a),i.aWndList[r].bFrameForward=!0},function(e){t(e)})):(i.aWndList[r].oPlayCtrl.PlayM4_SetDecodeFrameType&&i.aWndList[r].oPlayCtrl.PlayM4_SetDecodeFrameType(0),i.aWndList[r].oPlayCtrl.PlayM4_OneByOne&&i.aWndList[r].oPlayCtrl.PlayM4_OneByOne(a),i.aWndList[r].bFrameForward=!0),void e())})}},{key:"JS_GetOSDTime",value:function(){var i=this,r=0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var t=i._checkPlay(r);0!==t?e(t):1===i.aWndList[r].iMode?(i.oJSPlugin.find("video.play-window").eq(r).get(0),n(i.aWndList[r].iCurentOSDTime)):"1"===i._decoderVersion?i.aWndList[r].oPlayCtrl.PlayM4_GetOSDTime&&i.aWndList[r].oPlayCtrl.PlayM4_GetOSDTime(function(e){var t="ios"===i._browserInfo._system||f.oTool.isEdge()?"/":" ",e=Date.parse(e.replace(/-/g,t));n(e)}):(i.aWndList[r].oPlayCtrl.PlayM4_GetFrameInfo&&i.aWndList[r].oPlayCtrl.PlayM4_GetFrameInfo(function(e){i.aWndList[r].oPlayCtrl.iYUVWidth=e.width,i.aWndList[r].oPlayCtrl.iYUVHeight=e.height,i._getOSDTime(r,e.year,e.month,e.day,e.hour,e.minute,e.second),i.aWndList[r]._videoInfo.height=e.height,i.aWndList[r]._videoInfo.width=e.width,i.aWndList[r]._videoInfo.frameRate=e.frameRate}),n(i.aWndList[r].iCurentOSDTime))})}},{key:"JS_SetNormalDecoderAudio",value:function(){var t=this,n=0t.iMaxWndNum-1||"number"!=typeof n)&&(n=t.iCurrentWndIndex),t.aWndList[n].mseDecoderAudio=i,e()})}},{key:"JS_OpenSound",value:function(){var i=this,r=0this.iMaxWndNum-1||"number"!=typeof r)&&(r=this.iCurrentWndIndex),new m.default(function(e,t){var n=i._checkPlay(r);if(0!==n)return t(n);if(!i.aWndList[r].bFirstFrame)return t(L.ERR_COM_OPENSOUND_ERROR);n=i.iCurrentSoundWnd;if(n===r)e();else{if(-1!==n&&(1===i.aWndList[n].iMode?i.oJSPlugin.find("video.play-window").eq(n)[0].muted=!0:i.aWndList[n].oPlayCtrl.PlayM4_StopSound&&i.aWndList[n].oPlayCtrl.PlayM4_StopSound()),1===i.aWndList[r].iMode){if("AAC"!==i.aWndList[r]._videoInfo.audioType)return t(L.ERR_STREAM_SOUND_NOTHAS);i.aWndList[r].mseDecoderAudio||(i.aWndList[r].bOpenSound=!0,i._streamReset(r));n=i.oJSPlugin.find("video.play-window").eq(r)[0];n.volume=i.aWndList[r].MSEVolume,n.muted=!1,n.paused&&n.play()}else if(i.aWndList[r].oPlayCtrl.PlayM4_PlaySound&&1!==i.aWndList[r].oPlayCtrl.PlayM4_PlaySound(r))return void t(L.ERR_JSDECODER+i.aWndList[r].oPlayCtrl.PlayM4_GetLastError().toString());i.iCurrentSoundWnd=r,i.aWndList[r].bOpenSound=!0,e()}})}},{key:"JS_GetVolume",value:function(){var t,i=this;return new m.default(function(n,e){if(-1===i.iCurrentSoundWnd)return e(L.ERR_COM_SETORGET_VOLUME_ERROR);t=i.iCurrentSoundWnd,1===i.aWndList[t].iMode?(e=100*i.oJSPlugin.find("video.play-window").eq(t).get(0).volume,n(e)):i.aWndList[t].oPlayCtrl.PlayM4_GetVolume&&i.aWndList[t].oPlayCtrl.PlayM4_GetVolume(function(e){var t=e;"2"===i._decoderVersion&&(t=Math.ceil(e/655)),n(t)})})}},{key:"JS_SetVolume",value:function(){var i,r=this,a=arguments[1];return new m.default(function(e,t){if(-1===r.iCurrentSoundWnd)return t(L.ERR_COM_SETORGET_VOLUME_ERROR);if(i=r.iCurrentSoundWnd,a<1||100r.iMaxWndNum-1?e():0!==(n=r._checkPlay(i))?t(n):(1===r.aWndList[i].iMode?r.oJSPlugin.find("video.play-window").eq(i)[0].muted=!0:r.aWndList[i].oPlayCtrl.PlayM4_StopSound&&1!==r.aWndList[i].oPlayCtrl.PlayM4_StopSound()&&t(L.ERR_JSDECODER+r.aWndList[i].oPlayCtrl.PlayM4_GetLastError().toString()),r.iCurrentSoundWnd=-1,r.aWndList[i].bOpenSound=!1,e())})}},{key:"JS_EnableZoom",value:function(){var i=this,r=0this.iMaxWndNum-1||"number"!=typeof r)&&(r=this.iCurrentWndIndex),new m.default(function(e,t){var n=i._checkPlay(r);return 0!==n?t(n):1===i.aWndList[r].iMode?(i._log.E(L.ERR_COM_IS_MSE+": MSE unsupport this function."),t(L.ERR_COM_IS_MSE)):(i.oJSPlugin.find(".draw-window").unbind(),i.oDrawCanvas=new h.ESCanvas(i.options.szId+"_canvas_draw"+r),i.oDrawCanvas.setShapeType("Rect"),i.oDrawCanvas.setDrawStyle("#ff0000","",0),i.oDrawCanvas.setDrawStatus(!0,function(e){e.startPos&&e.endPos&&(e.startPos[0]>e.endPos[0]?i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion&&i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion(null,!1):i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion&&i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion({left:e.startPos[0],top:e.startPos[1],right:e.endPos[0],bottom:e.endPos[1]},!0))}),i.aWndList[r].bEZoom=!0,void e())})}},{key:"JS_DisableZoom",value:function(){var i=this,r=0this.iMaxWndNum-1||"number"!=typeof r)&&(r=this.iCurrentWndIndex),new m.default(function(e,t){var n=i._checkPlay(r);return 0!==n?t(n):1===i.aWndList[r].iMode?(i._log.E(L.ERR_COM_IS_MSE+": MSE unsupport this function."),t(L.ERR_COM_IS_MSE)):(i.oDrawCanvas.setDrawStatus(!1),i.oDrawCanvas.clearAllShape(),void(i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion&&1!==i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion(null,!1)?t(L.ERR_JSDECODER+i.aWndList[r].oPlayCtrl.PlayM4_GetLastError().toString()):(i.aWndList[r].bEZoom=!1,e())))})}},{key:"JS_Enable3DZoom",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.aWndList[i].bPlay?(n.oJSPlugin.find(".draw-window").unbind(),n.fDrawCallback=r,n.oDrawCanvas=new h.ESCanvas("canvas_draw"+i),n.oDrawCanvas.setShapeType("Rect"),n.oDrawCanvas.setDrawStyle("#ff0000","",0),n.oDrawCanvas.setDrawStatus(!0,function(e){r(e)}),n.aWndList[i].b3DZoom=!0,e()):t()})}},{key:"JS_Disable3DZoom",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.aWndList[i].bPlay?(n.oDrawCanvas.setDrawStatus(!1),n.aWndList[i].b3DZoom=!1,e()):t()})}},{key:"JS_CapturePicture",value:(T=(0,v.default)(y.default.mark(function e(){var d=0h.iMaxWndNum-1||"number"!=typeof d)&&(d=h.iCurrentWndIndex),0!==(a=h._checkPlay(d)))return n(a),e.abrupt("return");e.next=5;break;case 5:if(h.aWndList[d].bFirstFrame){e.next=7;break}return e.abrupt("return",n(L.ERR_CAPTURE_NO_PREPARED));case 7:if(c="JPEG",i=null,1!==(r=h.aWndList[d]).iMode){e.next=21;break}a=h.oJSPlugin.find("video.play-window").eq(d).get(0),s=a.videoWidth,o=a.videoHeight,(u=document.createElement("canvas")).width=s,u.height=o,u.getContext("2d").drawImage(a,0,0,s,o),i=u.toDataURL("image/"+c),e.next=24;break;case 21:return e.next=23,h._jsdecoderCapture(r,c);case 23:i=e.sent;case 24:if(_)return _(i),t(),e.abrupt("return");e.next=28;break;case 28:(s=i.split(";").shift().split("/").pop())!==c.toLowerCase()&&console.warn("Current Browser is not support to capture '"+c+"' image type, auto capture '"+s.toUpperCase()+"' image."),(o=document.createEvent("MouseEvents")).initEvent("click",!1,!1),(u=document.createElement("a")).href=Blob?URL.createObjectURL(f.oTool.dataURLtoBlob(i)):i,u.download=l+"."+s,u.dispatchEvent(o),t();case 37:case"end":return e.stop()}},e,h)}));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(){return T.apply(this,arguments)})},{key:"_jsdecoderCapture",value:function(t,o){var u=this;return new m.default(function(a,s){function e(e){if(6===e)return u._log.E(L.ERR_CAPTURE_RAM+": capture failed, memory not enough."),s(L.ERR_CAPTURE_RAM);for(var t="",n=e.byteLength,i=0;ii.iMaxWndNum-1||"number"!=typeof n)&&(n=i.iCurrentWndIndex),i.JS_StartSaveEx(n,r,2,a).then(function(){e()},function(e){t(e)})})}},{key:"JS_StartSaveEx",value:function(){var s=0u.iMaxWndNum-1||"number"!=typeof s)&&(s=u.iCurrentWndIndex),2!==d&&5!==d?e(L.ERR_PLAY_FILESYS_NOT_SUPPORT_DSTTYPE):null===o?e(L.ERR_PLAY_FILESYS_FILENAME_ISNULL):(n=1,i=null,l&&(n=l.irecordType,i=l.cbStreamCB),0!==(r=u._checkPlay(s))?e(r):u.aWndList[s].szStorageUUID?e(L.ERR_PLAY_FILESYS_ALREADY_WRITING):(o.indexOf(".mp4")<0&&(o+=".mp4"),r=u.aWndList[s].aHead,a=0,"realplay"!==u.aWndList[s].szPlayType&&(a=1),u.aWndList[s].isFlv&&(r=u.flvtohikHead(s)),(5===d&&33===r[12]&&114===r[13]||98===r[12]&&114===r[13]||0===r[12]&&32===r[13])&&(r[12]=0,r[13]=0),129===r[24]&&(d=1),u.oStorageManager.startRecord(o,r,d,a,{cbEventHandler:function(e){u._closeStreamAndDestory(s),u.oEventCallback.pluginErrorHandler(s,e)},irecordType:n,cbStreamCB:i}).then(function(e){u.aWndList[s].szStorageUUID=e,u.aWndList[s].isFlv&&u.aWndList[s].oMSE.setRecordFlag(!0),t()},function(){e()})))})}},{key:"JS_StopSave",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.aWndList[i].szStorageUUID?(n.aWndList[i].isFlv&&n.aWndList[i].oMSE.setRecordFlag(!1),n.oStorageManager.stopRecord(n.aWndList[i].szStorageUUID).then(function(){n.aWndList[i].szStorageUUID="",e()},function(e){t(e)})):t(L.ERR_PLAY_FILESYS_NOT_WRITING)})}},{key:"JS_SetDrawStatus",value:function(n){var i=this;return new m.default(function(e,t){i.oDrawCanvas?(i.oDrawCanvas.setDrawStatus(n),e()):t()})}},{key:"JS_ClearRegion",value:function(){var n=this;return new m.default(function(e,t){n.oDrawCanvas?(n.oDrawCanvas.clearAllShape(),e()):t()})}},{key:"JS_SetGridInfo",value:function(n){var i=this;return new m.default(function(e){if(null==n)return-1;var t="#ff0000";n.drawColor&&(t=n.drawColor),i.oDrawCanvas.setDrawStyle(t),i.oDrawCanvas.setShapesInfoByType("Grid",[{szGridMap:n.gridMap,iGridColNum:n.gridColNum,iGridRowNum:n.gridRowNum}]),e()})}},{key:"JS_GetGridInfo",value:function(){var e,t=null;return t=this.oDrawCanvas?(e=this.oDrawCanvas.getShapesInfoByType("Grid")[0])?{gridColNum:e.iGridColNum,gridRowNum:e.iGridRowNum,gridMap:e.szGridMap}:{iGridRowNum:18,iGridColNum:22,szGridMap:""}:{},m.default.resolve(t)}},{key:"JS_SetDrawShapeInfo",value:function(n,i){var r=this;return new m.default(function(e,t){void 0===n||""===n?t():(r.oDrawCanvas.setShapeType(n),r.oDrawCanvas.setDrawStyle(i.szDrawColor||"",i.szFillColor||"",i.iTranslucent||0),i.iMaxShapeSupport&&0this.iMaxWndNum-1||"number"!=typeof e)&&(e=this.iCurrentWndIndex),this.aWndList[e]);if(!t.bPlay)return m.default.reject("window "+e+" is not playing.");var n=null,n=("desktop"===this._browserInfo.platform||"ios"===this._browserInfo.system?this.oJSPlugin.find(".sub-wnd"):1===t.iMode?this.oJSPlugin.find(".sub-wnd video.play-window"):this.oJSPlugin.find(".sub-wnd canvas.play-window")).get(e);return this._triggerFullscreen(n)}},{key:"_triggerFullscreen",value:function(a,e){var n,s=this,o=document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||a.webkitSupportsFullscreen||!1,u=document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||a.webkitDisplayingFullscreen||!1;return a.requestFullscreen=a.requestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitEnterFullScreen||null,document.exitFullscreen=document.exitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen||null,new m.default((n=(0,v.default)(y.default.mark(function e(t,n){var i,r;return y.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=13;break}if(u&&s.fullscreenElement===a)return document.exitFullscreen?document.exitFullscreen():a.webkitExitFullScreen(),s.fullscreenElement=null,s.JS_Resize(),s.oEventCallback.windowFullCcreenChange(!1),e.abrupt("return",t());e.next=7;break;case 7:return e.next=9,a.requestFullscreen();case 9:return s.fullscreenElement=a,s.JS_Resize(),s.oEventCallback.windowFullCcreenChange(!0),e.abrupt("return",t());case 13:return s.fullscreenElement?(document.body.style.setProperty("overflow","unset"),i=s.oJSPlugin.width(),r=s.oJSPlugin.height(),(0,g.default)(a).css("width",i).css("height",r).css("z-index","").css("position","relative").css("transform","").css("transform-origin","").css("top","").css("left",""),s.fullscreenElement=null,s.JS_Resize(),s.oEventCallback.windowFullCcreenChange(!1)):(i=document.body.clientWidth,r=document.body.clientHeight,s.options.openDebug&&console.log("iphone fullscreen: body, window",i,r,window.screen.width,window.screen.height),ii.iMaxWndNum-1||"number"!=typeof n)return t(L.ERR_COM_PARAM);i.oJSPlugin.find(".sub-wnd").get(n).click(),e()})}},{key:"JS_SetOptions",value:function(t){var n=this;return new m.default(function(e){!1===t.bSupportSound&&(n.options.bSupportSound=t.bSupportSound),!1===t.bSupporDoubleClickFull&&(n.options.bSupporDoubleClickFull=t.bSupporDoubleClickFull),!0===t.bOnlySupportMSE&&(n.options.bOnlySupportMSE=t.bOnlySupportMSE),!0===t.bOnlySupportJSDecoder&&(n.options.bOnlySupportJSDecoder=t.bOnlySupportJSDecoder),e()})}},{key:"JS_SetLogFlag",value:function(n){var i=this;return new m.default(function(e){for(var t=0;tr.iMaxWndNum-1||"number"!=typeof a)&&(a=r.iCurrentWndIndex),"boolean"!=typeof s)return t(L.ERR_COM_PARAM);var n=r.aWndList[a],i=r._checkPlay(a);if(0!==i)return t(i);if(0!==n.iMode||"2"!==r._decoderVersion)return t(L.ERR_STREAM_INTEL_UNSUPPORT);[{typeCode:"0x00000001",desc:"智能分析(默认开)",children:[]},{typeCode:"0x00000002",desc:"移动侦测(默认开)",children:[]},{typeCode:"0x00000004",desc:"pos 信息叠加(默认关)",children:[]},{typeCode:"0x00000008",desc:"图片叠加(默认关)",children:[]},{typeCode:"0x00000010",desc:"火点信息(默认开)",children:[{typeCode:"0x00000001",desc:"火点框显示"},{typeCode:"0x00000002",desc:"火点最高温显示"},{typeCode:"0x00000004",desc:"最高温位置显示"},{typeCode:"0x00000008",desc:"最高温度距离"}]},{typeCode:"0x00000020",desc:"温度信息(默认关)",children:[{typeCode:"0x00000001",desc:"框测温"},{typeCode:"0x00000002",desc:"线测温"},{typeCode:"0x00000004",desc:"点测温"}]},{typeCode:"0x00000040",desc:"轨迹信息(默认关)",children:[{typeCode:"0x00000001",desc:"人的轨迹信息"},{typeCode:"0x00000002",desc:"车的轨迹信息"}]},{typeCode:"0x00000080",desc:"烟火屏蔽和废气监测(默认关)",children:[{typeCode:"0x00000001",desc:"烟火屏蔽"},{typeCode:"0x00000002",desc:"规则废气检测"},{typeCode:"0x00000004",desc:"目标废气检测"}]}].forEach(function(t){1===n.oPlayCtrl.PlayM4_RenderPrivateData(t.typeCode,s)?s&&t.children&&0this.iMaxWndNum-1?(this._log.E(L.ERR_COM_PARAM+": unexpected window index."),L.ERR_COM_PARAM):this.aWndList[e].bPlay?0:(this._log.E(L.ERR_COM_NOT_PLAYING+": this window is not playing."),L.ERR_COM_NOT_PLAYING)}},{key:"_checkPlayback",value:function(e){var t=this._checkPlay(e);return 0===t&&"realplay"===this.aWndList[e].szPlayType&&(this._log.E(L.ERR_COM_NOT_PLAYBACK+": this function was only supported by playback."),t=L.ERR_COM_NOT_PLAYBACK),t}},{key:"_createFlvPlayer",value:function(i){var r=this,a=this.aWndList[i],e=(a.oMSE&&(a.bPlay=!1,a.oMSE.detachMediaElement(),a.oMSE.destroy(),a.oMSE=null),this.oJSPlugin.find("video.play-window").eq(i)),t=this.oJSPlugin.find("canvas.play-window").eq(i),t=(e.show(),t.hide(),{isLive:!0,type:"flv"}),n=(this.aWndList[i].mseDecoderAudio||(t={hasAudio:!1,isLive:!0,type:"flv"}),!1),s=3,o=2,t=(0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var n=i._checkPlay(r);0!==n&&t(n),e(i.aWndList[r]._videoInfo)})}},{key:"JS_SetConnectTimeOut",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.oStreamClient.setTimeOut(r).then(function(){e()},function(e){t(e)})})}},{key:"JS_SetAdditionDataCB",value:function(){var n=0i.iMaxWndNum-1||"number"!=typeof n)&&(n=i.iCurrentWndIndex),i.aWndList[n].oPlayCtrl.PlayM4_SetAdditionDataCallBack(r,1),i.aWndList[n].AdditionDataCB=a,e()})}},{key:"JS_SetStreamCacheBuf",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),(r<0||5242880t.iMaxWndNum-1||"number"!=typeof n)&&(n=t.iCurrentWndIndex),t.aWndList[n].bopenTraceId=i,e()})}},{key:"JS_GetTraceId",value:function(){var t=this,n=0t.iMaxWndNum-1||"number"!=typeof n)&&(n=t.iCurrentWndIndex),e(t.aWndList[n].szTraceId)})}},{key:"_support",value:function(){var e=!!window.MediaSource,t=!!window.WebGLRenderingContext,n=!!window.WebGL2RenderingContext,i=!!window.SharedArrayBuffer,r=!!window.OffscreenCanvas,a=!("windows"===this._browserInfo.system&&"chrome"===this._browserInfo.supporter&&parseInt(this._browserInfo.supporterVersion.split(".").shift())<80),s="android"!==this._browserInfo.system&&"ios"!==this._browserInfo.system;return{MSE:e,webGL1:t,webGL2:n,SharedArrayBuffer:i,OffscreenCanvas:r,"decoder1.0":t,"decoder2.0":t&&i&&r&&a&&s}}},{key:"_decoder2Loaded",value:function(){return new m.default(function(e,t){var n=0,i=window.setInterval(function(){4e3<=n&&(clearInterval(i),t(L.ERR_COM_LOAD_JSDECODER_ERROR)),P&&(clearInterval(i),console.log("clearInterval"),e(1)),n+=100},100)})}},{key:"_calculateRealtimeBitrate",value:function(e){this.aWndList[e]._bpsInfo&&(this.aWndList[e]._bpsInfo.time_gap_factor<1&&(this._bpsInfo.time_gap_factor=1),0!==this.aWndList[e]._bpsInfo.lastVideoBytes&&(this.aWndList[e]._bpsInfo.bps_video=8*this.aWndList[e]._bpsInfo.lastVideoBytes/1024/this.aWndList[e]._bpsInfo.time_gap_factor,this.aWndList[e]._bpsInfo.lastVideoBytes=0),this.aWndList[e]._videoInfo.bitRate=this.aWndList[e]._bpsInfo.bps_video)}},{key:"_loadScript",value:function(n){return new m.default(function(e){var t=document.createElement("script");t.type="text/javascript",t.src=n,t.onload=function(){e()},document.body.appendChild(t)})}},{key:"_playerlocalFile",value:function(e,t){var n=this.aWndList[e];n.iMode=1,n.isFlv=!0,n.bPlay||this._createFlvPlayer(e),n.oMSE.onLoaderChunkArrival(t,n._receivedLength),n._receivedLength+=t.byteLength}},{key:"uuid2",value:function(e,t){var n,i,r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),a=[];if(t=t||r.length,e)for(n=0;nthis.options.iMaxSplit&&(this.options.iCurrentSplit=this.options.iMaxSplit),this.iCurrentPlayRate=1,this.iCurrentSoundWnd=-1,this.iMaxWndNum=this.options.iMaxSplit*this.options.iMaxSplit,this.bPluginFull=!1,this.oVideoWindow=null,this.fullscreenElement=null,this.iCurrentWndIndex=-1,this.fDrawCallback=null,this.szPluginVersion=w.version,this.isBrowserVisible=!0,this._decoderVersion="1","/"!==this.options.szBasePath.charAt(this.options.szBasePath.length-1)&&(this.options.szBasePath=this.options.szBasePath+"/"),this.oStorageManager=new l.StorageManager(this.options.szBasePath+"transform/"),this.oStreamClient=new s.StreamClient(this.options),this.oJSPlugin=(0,g.default)("#"+this.options.szId),this.bcloseAntialias=!1,this._listenBrowserVisibility(),this._createWindows(),this.aWndList=[];for(var i,r=0;r=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(O,I,n){"use strict";function i(){}var t,r,a,s,o=n(27),c=n(6),u=n(22),e=n(76),d=n(8),l=n(16),h=n(34),_=n(246),f=n(247),m=n(80),p=n(81).set,y=n(249)(),v=n(51),g=n(82),M=n(250),L=n(83),S="Promise",k=c.TypeError,b=c.process,w=b&&b.versions,D=w&&w.v8||"",T=c[S],E="process"==e(b),Y=r=v.f,w=!!function(){try{var e=T.resolve(1),t=(e.constructor={})[n(7)("species")]=function(e){e(i,i)};return(E||"function"==typeof PromiseRejectionEvent)&&e.then(i)instanceof t&&0!==D.indexOf("6.6")&&-1===M.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!l(e)||"function"!=typeof(t=e.then))&&t},C=function(h,n){var i;h._n||(h._n=!0,i=h._c,y(function(){for(var r,d=h._v,l=1==h._s,e=0,t=function(e){var t,n,i,r,a=l?e.ok:e.fail,s=e.resolve,o=e.reject,u=e.domain;try{a?(l||(2==h._h&&(r=h,p.call(c,function(){var e;E?b.emit("rejectionHandled",r):(e=c.onrejectionhandled)&&e({promise:r,reason:r._v})})),h._h=1),!0===a?t=d:(u&&u.enter(),t=a(d),u&&(u.exit(),i=!0)),t===e.promise?o(k("Promise-chain cycle")):(n=P(t))?n.call(t,s,o):s(t)):o(d)}catch(e){u&&!i&&u.exit(),o(e)}};i.length>e;)t(i[e++]);h._c=[],h._n=!1,n&&!h._h&&(r=h,p.call(c,function(){var e,t,n=r._v,i=R(r);if(i&&(e=g(function(){E?b.emit("unhandledRejection",n,r):(t=c.onunhandledrejection)?t({promise:r,reason:n}):(t=c.console)&&t.error&&t.error("Unhandled promise rejection",n)}),r._h=E||R(r)?2:1),r._a=void 0,i&&e.e)throw e.v}))}))},R=function(e){return 1!==e._h&&0===(e._a||e._c).length},A=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),C(t,!0))},x=function(e){var n,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===e)throw k("Promise can't be resolved itself");(n=P(e))?y(function(){var t={_w:i,_d:!1};try{n.call(e,u(x,t,1),u(A,t,1))}catch(e){A.call(t,e)}}):(i._v=e,i._s=1,C(i,!1))}catch(e){A.call({_w:i,_d:!1},e)}}};w||(T=function(e){_(this,T,S,"_h"),h(e),t.call(this);try{e(u(x,this,1),u(A,this,1))}catch(e){A.call(this,e)}},(t=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(251)(T.prototype,{then:function(e,t){var n=Y(m(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=E?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&C(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new t;this.promise=e,this.resolve=u(x,e,1),this.reject=u(A,e,1)},v.f=Y=function(e){return e===T||e===s?new a:r(e)}),d(d.G+d.W+d.F*!w,{Promise:T}),n(36)(T,S),n(252)(S),s=n(3)[S],d(d.S+d.F*!w,S,{reject:function(e){var t=Y(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(o||!w),S,{resolve:function(e){return L(o&&this===s?T:this,e)}}),d(d.S+d.F*!(w&&n(84)(function(e){T.all(e).catch(i)})),S,{all:function(e){var s=this,t=Y(s),o=t.resolve,u=t.reject,n=g(function(){var i=[],r=0,a=1;f(e,!1,function(e){var t=r++,n=!1;i.push(void 0),a++,s.resolve(e).then(function(e){n||(n=!0,i[t]=e,--a||o(i))},u)}),--a||o(i)});return n.e&&u(n.v),t.promise},race:function(e){var t=this,n=Y(t),i=n.reject,r=g(function(){f(e,!1,function(e){t.resolve(e).then(n.resolve,i)})});return r.e&&i(r.v),n.promise}})},function(e,t){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var h=n(22),c=n(77),_=n(78),f=n(13),m=n(47),p=n(79),y={},v={};(t=e.exports=function(e,t,n,i,r){var a,s,o,u,r=r?function(){return e}:p(e),d=h(n,i,t?2:1),l=0;if("function"!=typeof r)throw TypeError(e+" is not iterable!");if(_(r)){for(a=m(e.length);l>>24&255,r[i++]=u>>>16&255,r[i++]=u>>>8&255,r[i++]=255&u,e=s/4294967296*1e4&268435455,r[i++]=e>>>8&255,r[i++]=255&e,r[i++]=e>>>24&15|16,r[i++]=e>>>16&255,r[i++]=n>>>8|128,r[i++]=255&n;for(var d=0;d<6;++d)r[i+d]=a[d];return t||_(r)}},function(e,t,n){var s=n(88),o=n(89);e.exports=function(e,t,n){var i=t&&n||0,r=("string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),(e=e||{}).random||(e.rng||s)());if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var a=0;a<16;++a)t[i+a]=r[a];return t||o(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectDeviceCustom=void 0;var i=a(n(1)),r=a(n(2));function a(e){return e&&e.__esModule?e:{default:e}}n=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,[{key:"createClientObject",value:function(e,t,n,i){return{socket:e,id:t,iCurChannel:n,iCurStream:i,resolve:null,reject:null,stoping:!1}}},{key:"zeroPlayCmd",value:function(e,t){return new Uint8Array([0,0,0,44,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e+1,0,0,0,t,0,0,4,0])}},{key:"playCmd",value:function(e,t){return new Uint8Array([0,0,0,44,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e,0,0,0,t,0,0,4,0])}},{key:"playbackCmd",value:function(e,t,n,i){var r=e.split("T")[0],e=e.split("T")[1],a="0"+parseInt(r.substring(0,4),10).toString(16),s=parseInt(r.substring(4,6),10),r=parseInt(r.substring(6),10),o=parseInt(e.substring(0,2),10),u=parseInt(e.substring(2,4),10),e=parseInt(e.substring(4,6),10),d=t.split("T")[0],t=t.split("T")[1],l="0"+parseInt(d.substring(0,4),10).toString(16),d=parseInt(d.substring(4,6),10),h=parseInt(t.substring(0,2),10),c=parseInt(t.substring(2,4),10),t=parseInt(t.substring(4,6),10),n=[0,0,0,96,0,0,0,0,0,0,0,0,0,3,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n,0,0,parseInt(a.substring(0,2),16),parseInt(a.substring(2,4),16),0,0,0,s,0,0,0,r,0,0,0,o,0,0,0,u,0,0,0,e,0,0,parseInt(l.substring(0,2),16),parseInt(l.substring(2,4),16),0,0,0,d,0,0,0,r,0,0,0,h,0,0,0,c,0,0,0,t,0,0,0,0,0,0,0,0,i,0,0,0];return new Uint8Array(n)}},{key:"playRateCmd",value:function(e){for(var t=(parseInt(e,10)>>>0).toString(16).toLocaleUpperCase().toString(16),n=t.length;n<8;n++)t="0"+t;for(var i=[0,0,0,0],r=0,a=t.length;r>=15;0<=--a;){var o=32767&this[e],u=this[e++]>>15,d=t*o+u*s,r=((o=s*o+((32767&d)<<15)+n[i]+(1073741823&r))>>>30)+(d>>>15)+t*u+(r>>>30);n[i++]=1073741823&o}return r},30):"Netscape"!=e?(m.prototype.am=function(e,t,n,i,r,a){for(;0<=--a;){var s=t*this[e++]+n[i]+r,r=Math.floor(s/67108864);n[i++]=67108863&s}return r},26):(m.prototype.am=function(e,t,n,i,r,a){var s=16383&t;for(t>>=14;0<=--a;){var o=16383&this[e],u=this[e++]>>14,d=t*o+u*s,r=((o=s*o+((16383&d)<<14)+n[i]+r)>>28)+(d>>14)+t*u;n[i++]=268435455&o}return r},28),m.prototype.DB=Y,m.prototype.DM=(1<>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),e>>1!=0&&(n+=1),n}function g(e){this.m=e}function M(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,i,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),0<=e.compareTo(this.m)&&e.subTo(this.m,e)},M.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},M.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m.prototype.copyTo=function(e){for(var t=this.t-1;0<=t;--t)e[t]=this[t];e.t=this.t,e.s=this.s},m.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,0this.DB?(this[this.t-1]|=(s&(1<>this.DB-a):this[this.t-1]|=s<=this.DB&&(a-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,0>i|s,s=(this[o]&r)<=this.t)t.t=0;else{var i=e%this.DB,r=this.DB-i,a=(1<>i;for(var s=n+1;s>i;0>=this.DB;if(e.t>=this.DB;i+=this.s}else{for(i+=this.s;n>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[n++]=this.DV+i:0=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}0>this.F2:0),d=this.FV/u,u=(1<>s)&&(i=!0,r=o(t));0<=a;)s>(s+=this.DB-e)):(t=this[a]>>(s-=e)&n,s<=0&&(s+=this.DB,--a)),(i=02*this.m.t?e.mod(this.m):e.compareTo(this.m)<0?e:(t=p(),e.copyTo(t),this.reduce(t),t)},L.prototype.revert=function(e){return e},L.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);0<=e.compareTo(this.m);)e.subTo(this.m,e)},L.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},L.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var u,l,h,J,q,c=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],K=67108864/c[c.length-1];function X(e){var t,n,o=this,i=e.length,r=0,a=o.i=o.j=o.m=0;for(o.S=[],o.c=[],i||(e=[i++]);r<256;)o.S[r]=r++;for(r=0;r<256;r++)a=a+(t=o.S[r])+e[r%i]&255,n=o.S[a],o.S[r]=n,o.S[a]=t;o.g=function(e){var t=o.S,n=o.i+1&255,i=t[n],r=o.j+i&255,a=t[r];t[n]=a,t[r]=i;for(var s=t[i+a&255];--e;)a=t[r=r+(i=t[n=n+1&255])&255],t[n]=a,t[r]=i,s=256*s+t[i+a&255];return o.i=n,o.j=r,s},o.g(256)}function _(e,t,n,i){for(e+="",i=n=0;i=n&&(this.dMultiply(i),this.dAddOffset(s,0),s=a=0))}0e&&this.subTo(m.ONE.shiftLeft(e-1),this);else{var i=7&e;(n=[]).length=1+(e>>3),t.nextBytes(n),0>=this.DB;if(e.t>=this.DB;i+=this.s}else{for(i+=this.s;n>=this.DB;i+=e.s}t.s=i<0?-1:0,0=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},m.prototype.multiplyLowerTo=function(e,t,n){var i,r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;0>1;c.length>24},m.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},m.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},m.prototype.toByteArray=function(){var e,t=this.t,n=[],i=(n[0]=this.s,this.DB-t*this.DB%8),r=0;if(0>i)!=(this.s&this.DM)>>i&&(n[r++]=e|this.s<>(i+=this.DB-8)):(e=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&e)&&(e|=-256),0==r&&(128&this.s)!=(128&e)&&++r,(0>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}(this[e]);return this.s<0?this.t*this.DB:-1},m.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n=this.t?0!=this.s:0!=(this[t]&1<>n-u&d:(l=(e[h]&(1<>this.DB+n-u)),o=r;0==(1&l);)l>>=1,--o;if((n-=o)<0&&(n+=this.DB,--h),c)s[l].copyTo(i),c=!1;else{for(;1>>=1;return(e+n)/t},e},q=l.pow(256,6),h=l.pow(2,h),J=2*h,_(l.random(),u),Z.prototype.nextBytes=function(e){for(var t=0;t>8&255,w[D++]^=e>>16&255,w[D++]^=e>>24&255,b<=D&&(D-=b)}var w=[],D=0;if("Netscape"==e&&B<"5"&&window.crypto)for(var Q=window.crypto.random(32),T=0;T>>8,w[D++]=255&T;function ee(){if(null==k){for($(),(k=new S).init(w),D=0;D>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t){return e>>>t|e<<32-t}for(var t=function(e,t){var n,i,r,a,s,o,u,d,l,h,c,_,f=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],m=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],p=Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(64+t>>9<<4)]=t,l=0;l>>10,p[h-7]),v(p[h-15],7)^v(p[h-15],18)^p[h-15]>>>3),p[h-16]),c=y(y(y(y(d,v(s,6)^v(s,11)^v(s,25)),s&o^~s&u),f[h]),p[h]),_=y(v(n,2)^v(n,13)^v(n,22),n&i^n&r^i&r),d=u,u=o,o=s,s=y(a,c),a=r,r=i,i=n,n=y(c,_);m[0]=y(n,m[0]),m[1]=y(i,m[1]),m[2]=y(r,m[2]),m[3]=y(a,m[3]),m[4]=y(s,m[4]),m[5]=y(o,m[5]),m[6]=y(u,m[6]),m[7]=y(d,m[7])}return m}(function(e){for(var t=[],n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}(e=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n>6|192):t=(t+=String.fromCharCode(i>>12|224))+String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t}(e)),8*e.length),n="",i=0;i<4*t.length;i++)n+="0123456789abcdef".charAt(t[i>>2]>>8*(3-i%4)+4&15)+"0123456789abcdef".charAt(t[i>>2]>>8*(3-i%4)&15);return n};var Y=function(e){var t=e;function n(e,t){return e<>>32-t}function i(e){for(var t="",n=7;0<=n;n--)t+=(e>>>4*n&15).toString(16);return t}for(var r,a,s,o,u,d=Array(80),l=1732584193,h=4023233417,c=2562383102,_=271733878,f=3285377520,m=(t=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n>6|192):t=(t+=String.fromCharCode(i>>12|224))+String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t}(t)).length,p=[],y=0;y>>29),p.push(m<<3&4294967295),t=0;t>6|192):(n[--t]=63&r|128,n[--t]=r>>6&63|128,n[--t]=r>>12|224)}for(n[--t]=0,i=new E,r=[];2>3))||null==(e=this.doPublic(e))?null:0==(1&(e=e.toString(16)).length)?e:"0"+e},C.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),e=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(e)<0;)t=t.add(this.p);return t.subtract(e).multiply(this.coeff).mod(this.p).multiply(this.q).add(e)},C.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&0>1;this.e=parseInt(t,16);for(var r=new m(t,16);;){for(;this.p=new m(e-i,1,n),0!=this.p.subtract(m.ONE).gcd(r).compareTo(m.ONE)||!this.p.isProbablePrime(10););for(;this.q=new m(i,1,n),0!=this.q.subtract(m.ONE).gcd(r).compareTo(m.ONE)||!this.q.isProbablePrime(10););this.p.compareTo(this.q)<=0&&(a=this.p,this.p=this.q,this.q=a);var a=this.p.subtract(m.ONE),s=this.q.subtract(m.ONE),o=a.multiply(s);if(0==o.gcd(r).compareTo(m.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(o),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},C.prototype.decrypt=function(e){if(null==(e=this.doPrivate(P(e,16))))return null;for(var t=this.n.bitLength()+7>>3,n=e.toByteArray(),i=0;i=n.length)return null;for(var r="";++i>2&63),t=(3&n)<<4):1==r?(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t|n>>4&15),t=(15&n)<<2):2==r&&(i=(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t|n>>6&3))+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&n)),3==(r+=1)&&(r=0);return 0>6-i&255)),r=t<<(i=i+2&7)&255);return n},O.b16to64=function(e){var t,n,i="";for(e.length%2==1&&(e="0"+e),t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((3&n)<<4));0<(3&i.length);)i+="=";return i},O.b64to16=function(e){for(var t,n="",i=0,r=0;r>2),t=3&v,1):1==i?(n+=o(t<<2|v>>4),t=15&v,2):2==i?(n=(n+=o(t))+o(v>>2),t=3&v,3):(n=(n+=o(t<<2|v>>4))+o(15&v),0));return 1==i&&(n+=o(t<<2)),n},O.string2bytes=function(e){for(var t=[],n=0;n>>32-a,t)}function i(e,t,n,i,r,a,s){return e=o(e,o(o(t&i|n&~i,r),s)),o(e<>>32-a,t)}function r(e,t,n,i,r,a,s){return e=o(e,o(o(t^n^i,r),s)),o(e<>>32-a,t)}function a(e,t,n,i,r,a,s){return e=o(e,o(o(n^(t|~i),r),s)),o(e<>>32-a,t)}function s(e){for(var t="",n="",i=0;i<=3;i++)t+=(n="0"+(n=e>>>8*i&255).toString(16)).substr(n.length-2,2);return t}var u,d,l,h,c=function(e){for(var t,n=e.length,i=n+8,i=16*((i-i%64)/64+1),r=Array(i-1),a=0;a>>29,r}(t=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n>6|192):t=(t+=String.fromCharCode(i>>12|224))+String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t}(t)),_=1732584193,f=4023233417,m=2562383102,p=271733878;for(t=0;tr;)u(E,t=n[r++])||t==D||t==j||i.push(t);return i}function s(e){for(var t,n=e===P,i=$(n?Y:p(e)),r=[],a=0;i.length>a;)!u(E,t=i[a++])||n&&!u(P,t)||r.push(E[t]);return r}var o=e(6),u=e(18),d=e(14),l=e(8),H=e(70),j=e(275).KEY,h=e(23),c=e(49),_=e(36),F=e(35),f=e(7),B=e(57),N=e(58),z=e(276),U=e(277),m=e(13),V=e(16),G=e(24),p=e(19),y=e(45),v=e(28),g=e(46),J=e(278),q=e(60),M=e(59),K=e(12),X=e(30),Z=q.f,L=K.f,$=J.f,S=o.Symbol,k=o.JSON,b=k&&k.stringify,w="prototype",D=f("_hidden"),Q=f("toPrimitive"),ee={}.propertyIsEnumerable,T=c("symbol-registry"),E=c("symbols"),Y=c("op-symbols"),P=Object[w],c="function"==typeof S&&!!M.f,C=o.QObject,R=!C||!C[w]||!C[w].findChild,A=d&&h(function(){return 7!=g(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=Z(P,t);i&&delete P[t],L(e,t,n),i&&e!==P&&L(P,t,i)}:L,x=c&&"symbol"==typeof S.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof S},O=function(e,t,n){return e===P&&O(Y,t,n),m(e),t=y(t,!0),m(n),u(E,t)?(n.enumerable?(u(e,D)&&e[D][t]&&(e[D][t]=!1),n=g(n,{enumerable:v(0,!1)})):(u(e,D)||L(e,D,v(1,{})),e[D][t]=!0),A(e,t,n)):L(e,t,n)};c||(H((S=function(){if(this instanceof S)throw TypeError("Symbol is not a constructor!");var t=F(0ne;)f(te[ne++]);for(var ie=X(f.store),re=0;ie.length>re;)N(ie[re++]);l(l.S+l.F*!c,"Symbol",{for:function(e){return u(T,e+="")?T[e]:T[e]=S(e)},keyFor:function(e){if(!x(e))throw TypeError(e+" is not a symbol!");for(var t in T)if(T[t]===e)return t},useSetter:function(){R=!0},useSimple:function(){R=!1}}),l(l.S+l.F*!c,"Object",{create:function(e,t){return void 0===t?g(e):n(g(e),t)},defineProperty:O,defineProperties:n,getOwnPropertyDescriptor:r,getOwnPropertyNames:a,getOwnPropertySymbols:s});C=h(function(){M.f(1)});l(l.S+l.F*C,"Object",{getOwnPropertySymbols:function(e){return M.f(G(e))}}),k&&l(l.S+l.F*(!c||h(function(){var e=S();return"[null]"!=b([e])||"{}"!=b({a:e})||"{}"!=b(Object(e))})),"JSON",{stringify:function(e){for(var t,n,i=[e],r=1;rs;)a.call(e,i=r[s++])&&t.push(i);return t}},function(e,t,n){var i=n(31);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(19),r=n(90).f,a={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){if(!s||"[object Window]"!=a.call(e))return r(i(e));try{return r(e)}catch(e){return s.slice()}}},function(e,t,n){n(58)("asyncIterator")},function(e,t,n){n(58)("observable")},function(I,W,H){"use strict";Object.defineProperty(W,"__esModule",{value:!0});o=Math,m=(y={}).lib={},t=m.Base={extend:function(e){G.prototype=this;var t=new G;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=m.WordArray=t.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||j).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes;if(e=e.sigBytes,this.clamp(),i%4)for(var r=0;r>>2]|=(n[r>>>2]>>>24-r%4*8&255)<<24-(i+r)%4*8;else if(65535>>2]=n[r>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=o.ceil(t/4)},clone:function(){var e=t.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new u.init(n,t/2)}},n=_.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new u.init(n,t)}},F=_.Utf8={stringify:function(e){try{return decodeURIComponent(escape(n.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return n.parse(unescape(encodeURIComponent(e)))}},e=m.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=F.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,n=t.words,i=t.sigBytes,r=this.blockSize,a=i/(4*r),a=e?o.ceil(a):o.max((0|a)-this._minBufferSize,0),i=o.min(4*(e=a*r),i);if(e){for(var s=0;s>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,s=0;s<4&&r+.75*s>>6*(3-s)&63));if(t=i.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,n=this._map;!(a=n.charAt(64))||-1!=(a=e.indexOf(a))&&(t=a);for(var i,r,a=[],s=0,o=0;o>>6-o%4*2,a[s>>>2]|=(i|r)<<24-s%4*8,s++);return N.create(a,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};var f=Math;function k(e,t,n,i,r,a,s){return((e=e+(t&n|~t&i)+r+s)<>>32-a)+t}function b(e,t,n,i,r,a,s){return((e=e+(t&i|n&~i)+r+s)<>>32-a)+t}function w(e,t,n,i,r,a,s){return((e=e+(t^n^i)+r+s)<>>32-a)+t}function D(e,t,n,i,r,a,s){return((e=e+(n^(t|~i))+r+s)<>>32-a)+t}for(var m=_,J=(y=m.lib).WordArray,p=y.Hasher,y=m.algo,T=[],v=0;v<64;v++)T[v]=4294967296*f.abs(f.sin(v+1))|0;function q(e,t,n){var i=this._iv;i?this._iv=void 0:i=this._prevBlock;for(var r=0;r>>24)|4278255360&(i<<24|i>>>8)}var n=this._hash.words,r=e[t+0],i=e[t+1],a=e[t+2],s=e[t+3],o=e[t+4],u=e[t+5],d=e[t+6],l=e[t+7],h=e[t+8],c=e[t+9],_=e[t+10],f=e[t+11],m=e[t+12],p=e[t+13],y=e[t+14],v=e[t+15],g=k(n[0],S=n[1],L=n[2],M=n[3],r,7,T[0]),M=k(M,g,S,L,i,12,T[1]),L=k(L,M,g,S,a,17,T[2]),S=k(S,L,M,g,s,22,T[3]),g=k(g,S,L,M,o,7,T[4]),M=k(M,g,S,L,u,12,T[5]),L=k(L,M,g,S,d,17,T[6]),S=k(S,L,M,g,l,22,T[7]),g=k(g,S,L,M,h,7,T[8]),M=k(M,g,S,L,c,12,T[9]),L=k(L,M,g,S,_,17,T[10]),S=k(S,L,M,g,f,22,T[11]),g=k(g,S,L,M,m,7,T[12]),M=k(M,g,S,L,p,12,T[13]),L=k(L,M,g,S,y,17,T[14]),g=b(g,S=k(S,L,M,g,v,22,T[15]),L,M,i,5,T[16]),M=b(M,g,S,L,d,9,T[17]),L=b(L,M,g,S,f,14,T[18]),S=b(S,L,M,g,r,20,T[19]),g=b(g,S,L,M,u,5,T[20]),M=b(M,g,S,L,_,9,T[21]),L=b(L,M,g,S,v,14,T[22]),S=b(S,L,M,g,o,20,T[23]),g=b(g,S,L,M,c,5,T[24]),M=b(M,g,S,L,y,9,T[25]),L=b(L,M,g,S,s,14,T[26]),S=b(S,L,M,g,h,20,T[27]),g=b(g,S,L,M,p,5,T[28]),M=b(M,g,S,L,a,9,T[29]),L=b(L,M,g,S,l,14,T[30]),g=w(g,S=b(S,L,M,g,m,20,T[31]),L,M,u,4,T[32]),M=w(M,g,S,L,h,11,T[33]),L=w(L,M,g,S,f,16,T[34]),S=w(S,L,M,g,y,23,T[35]),g=w(g,S,L,M,i,4,T[36]),M=w(M,g,S,L,o,11,T[37]),L=w(L,M,g,S,l,16,T[38]),S=w(S,L,M,g,_,23,T[39]),g=w(g,S,L,M,p,4,T[40]),M=w(M,g,S,L,r,11,T[41]),L=w(L,M,g,S,s,16,T[42]),S=w(S,L,M,g,d,23,T[43]),g=w(g,S,L,M,c,4,T[44]),M=w(M,g,S,L,m,11,T[45]),L=w(L,M,g,S,v,16,T[46]),g=D(g,S=w(S,L,M,g,a,23,T[47]),L,M,r,6,T[48]),M=D(M,g,S,L,l,10,T[49]),L=D(L,M,g,S,y,15,T[50]),S=D(S,L,M,g,u,21,T[51]),g=D(g,S,L,M,m,6,T[52]),M=D(M,g,S,L,s,10,T[53]),L=D(L,M,g,S,_,15,T[54]),S=D(S,L,M,g,i,21,T[55]),g=D(g,S,L,M,h,6,T[56]),M=D(M,g,S,L,v,10,T[57]),L=D(L,M,g,S,d,15,T[58]),S=D(S,L,M,g,p,21,T[59]),g=D(g,S,L,M,o,6,T[60]),M=D(M,g,S,L,f,10,T[61]),L=D(L,M,g,S,a,15,T[62]),S=D(S,L,M,g,c,21,T[63]);n[0]=n[0]+g|0,n[1]=n[1]+S|0,n[2]=n[2]+L|0,n[3]=n[3]+M|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes,r=(t[i>>>5]|=128<<24-i%32,f.floor(n/4294967296));for(t[15+(64+i>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t[14+(64+i>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process(),t=(e=this._hash).words,n=0;n<4;n++)i=t[n],t[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return e},clone:function(){var e=p.clone.call(this);return e._hash=this._hash.clone(),e}}),m.MD5=p._createHelper(y),m.HmacMD5=p._createHmacHelper(y),y=(m=_).lib,h=y.Base,z=y.WordArray,U=(y=m.algo).EvpKDF=h.extend({cfg:h.extend({keySize:4,hasher:y.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=(s=this.cfg).hasher.create(),i=z.create(),r=i.words,a=s.keySize,s=s.iterations;r.length>>2]}},y.BlockCipher=a.extend({cfg:a.cfg.extend({mode:M,padding:g}),reset:function(){a.reset.call(this);var e,t=(n=this.cfg).iv,n=n.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode=e.call(n,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),d=y.CipherParams=m.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),M=(h.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?s.create([1398893684,1701076831]).concat(e).concat(t):t).toString(r)},parse:function(e){var t,n=(e=r.parse(e)).words;return 1398893684==n[0]&&1701076831==n[1]&&(t=s.create(n.slice(2,4)),n.splice(0,4),e.sigBytes-=16),d.create({ciphertext:e,salt:t})}},l=y.SerializableCipher=m.extend({cfg:m.extend({format:M}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var r=e.createEncryptor(n,i);return t=r.finalize(t),r=r.cfg,d.create({ciphertext:t,key:n,iv:r.iv,algorithm:e,mode:r.mode,padding:r.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(n,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),h=(h.kdf={}).OpenSSL={execute:function(e,t,n,i){return i=i||s.random(8),e=V.create({keySize:t+n}).compute(e,i),n=s.create(e.words.slice(t),4*n),e.sigBytes=4*t,d.create({key:e,iv:n,salt:i})}},c=y.PasswordBasedCipher=l.extend({cfg:l.cfg.extend({kdf:h}),encrypt:function(e,t,n,i){return n=(i=this.cfg.extend(i)).kdf.execute(n,e.keySize,e.ivSize),i.iv=n.iv,(e=l.encrypt.call(this,e,t,n.key,i)).mixIn(n),e},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),n=i.kdf.execute(n,e.keySize,e.ivSize,t.salt),i.iv=n.iv,l.decrypt.call(this,e,t,n.key,i)}}));for(var g=_,m=g.lib.BlockCipher,M=g.algo,L=[],K=[],X=[],Z=[],$=[],Q=[],S=[],E=[],ee=[],te=[],Y=[],P=0;P<256;P++)Y[P]=P<128?P<<1:P<<1^283;for(var C=0,R=0,P=0;P<256;P++){var A=R^R<<1^R<<2^R<<3^R<<4,x=(L[C]=A=A>>>8^255&A^99,Y[K[A]=C]),ne=Y[x],ie=Y[ne],O=257*Y[A]^16843008*A;X[C]=O<<24|O>>>8,Z[C]=O<<16|O>>>16,$[C]=O<<8|O>>>24,Q[C]=O,S[A]=(O=16843009*ie^65537*ne^257*x^16843008*C)<<24|O>>>8,E[A]=O<<16|O>>>16,ee[A]=O<<8|O>>>24,te[A]=O,C?(C=x^Y[Y[Y[ie^x]]],R^=Y[Y[R]]):C=R=1}var re=[0,1,2,4,8,16,32,64,128,27,54],M=M.AES=m.extend({_doReset:function(){for(var e,t=(i=this._key).words,n=i.sigBytes/4,i=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],a=0;a>>24]<<24|L[e>>>16&255]<<16|L[e>>>8&255]<<8|L[255&e]):(e=L[(e=e<<8|e>>>24)>>>24]<<24|L[e>>>16&255]<<16|L[e>>>8&255]<<8|L[255&e],e^=re[a/n|0]<<24),r[a]=r[a-n]^e);for(t=this._invKeySchedule=[],n=0;n>>24]]^E[L[e>>>16&255]]^ee[L[e>>>8&255]]^te[L[255&e]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,X,Z,$,Q,L)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,S,E,ee,te,K),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,r,a,s,o){for(var u=this._nRounds,d=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],c=e[t+3]^n[3],_=4,f=1;f>>24]^r[l>>>16&255]^a[h>>>8&255]^s[255&c]^n[_++],p=i[l>>>24]^r[h>>>16&255]^a[c>>>8&255]^s[255&d]^n[_++],y=i[h>>>24]^r[c>>>16&255]^a[d>>>8&255]^s[255&l]^n[_++],c=i[c>>>24]^r[d>>>16&255]^a[l>>>8&255]^s[255&h]^n[_++],d=m,l=p,h=y;m=(o[d>>>24]<<24|o[l>>>16&255]<<16|o[h>>>8&255]<<8|o[255&c])^n[_++],p=(o[l>>>24]<<24|o[h>>>16&255]<<16|o[c>>>8&255]<<8|o[255&d])^n[_++],y=(o[h>>>24]<<24|o[c>>>16&255]<<16|o[d>>>8&255]<<8|o[255&l])^n[_++],c=(o[c>>>24]<<24|o[d>>>16&255]<<16|o[l>>>8&255]<<8|o[255&h])^n[_++],e[t]=m,e[t+1]=p,e[t+2]=y,e[t+3]=c},keySize:8});g.AES=m._createHelper(M),W.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalService=void 0;var i=s(n(56)),r=s(n(1)),a=s(n(2));function s(e){return e&&e.__esModule?e:{default:e}}n=function(){function e(){(0,r.default)(this,e)}return(0,a.default)(e,[{key:"createClientObject",value:function(e,t,n,i){return{socket:e,id:t,playURL:n,deviceSerial:i.deviceSerial||"",verificationCode:i.verificationCode||"",resolve:null,reject:null,stoping:!1}}},{key:"playCmd",value:function(e){e={sequence:0,cmd:"realplay",deviceSerial:e.deviceSerial,verificationCode:e.verificationCode,url:e.playURL};return(0,i.default)(e)}},{key:"playbackCmd",value:function(e,t,n){e={sequence:0,cmd:"playback",deviceSerial:e.deviceSerial,verificationCode:e.verificationCode,url:e.playURL,startTime:t,endTime:n};return(0,i.default)(e)}}]),e}();t.LocalService=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var i={"./af":92,"./af.js":92,"./ar":93,"./ar-dz":94,"./ar-dz.js":94,"./ar-kw":95,"./ar-kw.js":95,"./ar-ly":96,"./ar-ly.js":96,"./ar-ma":97,"./ar-ma.js":97,"./ar-sa":98,"./ar-sa.js":98,"./ar-tn":99,"./ar-tn.js":99,"./ar.js":93,"./az":100,"./az.js":100,"./be":101,"./be.js":101,"./bg":102,"./bg.js":102,"./bm":103,"./bm.js":103,"./bn":104,"./bn-bd":105,"./bn-bd.js":105,"./bn.js":104,"./bo":106,"./bo.js":106,"./br":107,"./br.js":107,"./bs":108,"./bs.js":108,"./ca":109,"./ca.js":109,"./cs":110,"./cs.js":110,"./cv":111,"./cv.js":111,"./cy":112,"./cy.js":112,"./da":113,"./da.js":113,"./de":114,"./de-at":115,"./de-at.js":115,"./de-ch":116,"./de-ch.js":116,"./de.js":114,"./dv":117,"./dv.js":117,"./el":118,"./el.js":118,"./en-au":119,"./en-au.js":119,"./en-ca":120,"./en-ca.js":120,"./en-gb":121,"./en-gb.js":121,"./en-ie":122,"./en-ie.js":122,"./en-il":123,"./en-il.js":123,"./en-in":124,"./en-in.js":124,"./en-nz":125,"./en-nz.js":125,"./en-sg":126,"./en-sg.js":126,"./eo":127,"./eo.js":127,"./es":128,"./es-do":129,"./es-do.js":129,"./es-mx":130,"./es-mx.js":130,"./es-us":131,"./es-us.js":131,"./es.js":128,"./et":132,"./et.js":132,"./eu":133,"./eu.js":133,"./fa":134,"./fa.js":134,"./fi":135,"./fi.js":135,"./fil":136,"./fil.js":136,"./fo":137,"./fo.js":137,"./fr":138,"./fr-ca":139,"./fr-ca.js":139,"./fr-ch":140,"./fr-ch.js":140,"./fr.js":138,"./fy":141,"./fy.js":141,"./ga":142,"./ga.js":142,"./gd":143,"./gd.js":143,"./gl":144,"./gl.js":144,"./gom-deva":145,"./gom-deva.js":145,"./gom-latn":146,"./gom-latn.js":146,"./gu":147,"./gu.js":147,"./he":148,"./he.js":148,"./hi":149,"./hi.js":149,"./hr":150,"./hr.js":150,"./hu":151,"./hu.js":151,"./hy-am":152,"./hy-am.js":152,"./id":153,"./id.js":153,"./is":154,"./is.js":154,"./it":155,"./it-ch":156,"./it-ch.js":156,"./it.js":155,"./ja":157,"./ja.js":157,"./jv":158,"./jv.js":158,"./ka":159,"./ka.js":159,"./kk":160,"./kk.js":160,"./km":161,"./km.js":161,"./kn":162,"./kn.js":162,"./ko":163,"./ko.js":163,"./ku":164,"./ku.js":164,"./ky":165,"./ky.js":165,"./lb":166,"./lb.js":166,"./lo":167,"./lo.js":167,"./lt":168,"./lt.js":168,"./lv":169,"./lv.js":169,"./me":170,"./me.js":170,"./mi":171,"./mi.js":171,"./mk":172,"./mk.js":172,"./ml":173,"./ml.js":173,"./mn":174,"./mn.js":174,"./mr":175,"./mr.js":175,"./ms":176,"./ms-my":177,"./ms-my.js":177,"./ms.js":176,"./mt":178,"./mt.js":178,"./my":179,"./my.js":179,"./nb":180,"./nb.js":180,"./ne":181,"./ne.js":181,"./nl":182,"./nl-be":183,"./nl-be.js":183,"./nl.js":182,"./nn":184,"./nn.js":184,"./oc-lnc":185,"./oc-lnc.js":185,"./pa-in":186,"./pa-in.js":186,"./pl":187,"./pl.js":187,"./pt":188,"./pt-br":189,"./pt-br.js":189,"./pt.js":188,"./ro":190,"./ro.js":190,"./ru":191,"./ru.js":191,"./sd":192,"./sd.js":192,"./se":193,"./se.js":193,"./si":194,"./si.js":194,"./sk":195,"./sk.js":195,"./sl":196,"./sl.js":196,"./sq":197,"./sq.js":197,"./sr":198,"./sr-cyrl":199,"./sr-cyrl.js":199,"./sr.js":198,"./ss":200,"./ss.js":200,"./sv":201,"./sv.js":201,"./sw":202,"./sw.js":202,"./ta":203,"./ta.js":203,"./te":204,"./te.js":204,"./tet":205,"./tet.js":205,"./tg":206,"./tg.js":206,"./th":207,"./th.js":207,"./tk":208,"./tk.js":208,"./tl-ph":209,"./tl-ph.js":209,"./tlh":210,"./tlh.js":210,"./tr":211,"./tr.js":211,"./tzl":212,"./tzl.js":212,"./tzm":213,"./tzm-latn":214,"./tzm-latn.js":214,"./tzm.js":213,"./ug-cn":215,"./ug-cn.js":215,"./uk":216,"./uk.js":216,"./ur":217,"./ur.js":217,"./uz":218,"./uz-latn":219,"./uz-latn.js":219,"./uz.js":218,"./vi":220,"./vi.js":220,"./x-pseudo":221,"./x-pseudo.js":221,"./yo":222,"./yo.js":222,"./zh-cn":223,"./zh-cn.js":223,"./zh-hk":224,"./zh-hk.js":224,"./zh-mo":225,"./zh-mo.js":225,"./zh-tw":226,"./zh-tw.js":226};function r(e){e=a(e);return n(e)}function a(e){if(n.o(i,e))return i[e];throw(e=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",e}r.keys=function(){return Object.keys(i)},r.resolve=a,(e.exports=r).id=284},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSPlayCtrl=void 0;var i=r(n(1)),n=r(n(2));function r(e){return e&&e.__esModule?e:{default:e}}var o={id:null,cmd:null,data:null,errorCode:0,status:null},n=((0,n.default)(a,[{key:"PlayM4_SetStreamOpenMode",value:function(e){return this.iPort=this.oWASM._JSPlayM4_GetPort(),1!==this.oWASM._JSPlayM4_SetStreamOpenMode(this.iPort,e)?0:1}},{key:"PlayM4_OpenStream",value:function(e,t,n){if(this.iPort<0)return 0;if(!e||t<=0||n<=0)return 0;this.bPlay=!1,this.bPause=!1,this.bOnebyOne=!1,this.bIsFirstFrame=!0,this.bIsGetYUV=!1,this.bIsInput=!1;var i=this.oWASM._malloc(t);return i?(this.oWASM.writeArrayToMemory(e,i),1!==this.oWASM._JSPlayM4_OpenStream(this.iPort,i,t,n)?(this.oWASM._free(i),i=null,this.oWASM._JSPlayM4_FreePort(this.iPort),this.iPort=-1,0):(this.oWASM._JSPlayM4_SetDisplayBuf(this.iPort,1),this.oWASM._free(i),i=null,1)):0}},{key:"PlayM4_SetDisplayBuf",value:function(e){this.oWASM._JSPlayM4_SetDisplayBuf(this.iPort,e)}},{key:"PlayM4_OpenPlayerSDKPrintLog",value:function(e){e?(console.log("JSPlaySDKInterface.js bFlag:"+e),this.oWASM._JSPlayM4_SetPrintLogFlag(this.iPort,2)):this.oWASM._JSPlayM4_SetPrintLogFlag(this.iPort,0)}},{key:"SetDecodeThreadNum",value:function(e){this.oWASM._JSPlayM4_SetDecodeThreadNum(this.iPort,e)}},{key:"PlayM4_SetSecretKey",value:function(){return 1}},{key:"PlayM4_RenderPrivateData",value:function(e,t){return this.oWASM._JSPlayM4_RenderPrivateData(this.iPort,e,t)}},{key:"PlayM4_RenderPrivateDataEx",value:function(e,t,n){return this.oWASM._JSPlayM4_RenderPrivateDataEx(this.iPort,e,t,n)}},{key:"stringToBytes",value:function(e){for(var t=void 0,n=void 0,i=[],r=0;r>=8;);i=i.concat(n.reverse())}return i}},{key:"PlayM4_Play",value:function(){if(this.pCanvasData=this.oWASM._malloc(128),null===this.pCanvasData)return 0;this.bOnebyOne&&(this.bPlayRateChange=!1,this.bOnebyOne=!1,this.bPause=!1);!document.getElementById(this.szCanvasID)&&this.clonedCanvas&&this.clonedCanvasParentNode&&this.clonedCanvasParentNode.appendChild(this.clonedCanvas),0this.iCanvasWidth||e-r>this.iCanvasHeight)return 1;e=0!==this.iZoomNum?(t=Math.round(t/this.iRatio_x)+this.stDisplayRect.left,r=Math.round(r/this.iRatio_y)+this.stDisplayRect.top,i=Math.round(i/this.iRatio_x)+this.stDisplayRect.left,Math.round(e/this.iRatio_y)+this.stDisplayRect.top):(a=this.iYUVWidth/this.iCanvasWidth,n=this.iYUVHeight/this.iCanvasHeight,t=Math.round(t*a),r=Math.round(r*n),i=Math.round(i*a),Math.round(e*n)),this.stDisplayRect={top:r,left:t,right:i,bottom:e},this.bDisRect=!0;a=e-r;return this.iRatio_x=this.iCanvasWidth/(i-t),this.iRatio_y=this.iCanvasHeight/a,this.iZoomNum++,this.oWASM._JSPlayM4_SetDisplayRegion(this.iPort,this.pCanvasData,this.stDisplayRect.left,this.stDisplayRect.right,this.stDisplayRect.top,this.stDisplayRect.bottom)}},{key:"PlayM4_GetJPEG",value:function(e){var t,n=this.iYUVWidth*this.iYUVHeight*4+60,i=this.oWASM._malloc(n),r=this.oWASM._malloc(4);null!==i&&(this.oWASM._JSPlayM4_GetJPEG(this.iPort,i,n,r),0<(n=this.oWASM.getValue(r,"i32"))?((t=new Uint8Array(n)).set(this.oWASM.HEAPU8.subarray(i,i+n)),e(t)):e(6),this.oWASM._free(i),this.oWASM._free(r),i=null)}},{key:"PlayM4_GetBMP",value:function(e){var t,n=this.iYUVWidth*this.iYUVHeight*4+60,i=this.oWASM._malloc(n),r=this.oWASM._malloc(4);null!==i&&(this.oWASM._JSPlayM4_GetBMP(this.iPort,i,n,r),0<(n=this.oWASM.getValue(r,"i32"))?((t=new Uint8Array(n)).set(this.oWASM.HEAPU8.subarray(i,i+n)),e(t)):e(6),this.oWASM._free(i),this.oWASM._free(r),i=null)}},{key:"PlayM4_SetVolume",value:function(e){return this.oWASM._JSPlayM4_SetVolume(this.iPort,e)}},{key:"PlayM4_GetVolume",value:function(e){var t;return e&&"function"==typeof e?null===(t=this.oWASM._JSPlayM4_GetVolume(this.iPort))?63:(e(Math.round(t)),1):1}},{key:"PlayM4_GetDecodeFrameType",value:function(){return this.nDecFrameType}},{key:"PlayM4_GetSdkVersion",value:function(){return this.oWASM.JSPlayM4_GetSDKVersion()}},{key:"PlayM4_SetCanvasSize",value:function(e,t){!document.getElementById(this.szCanvasID)&&this.clonedCanvas&&(this.iCanvasWidth=e,this.iCanvasHeight=t,this.clonedCanvas.width=e,this.clonedCanvas.height=t),-1>2],t.frameType=this.oWASM.HEAP32[n+4>>2],t.frameSize=this.oWASM.HEAP32[n+8>>2],t.width=this.oWASM.HEAP32[n+12>>2],t.height=this.oWASM.HEAP32[n+16>>2],t.timeStamp=this.oWASM.HEAP32[n+20>>2],t.frameRate=this.oWASM.HEAP32[n+24>>2],t.bitPerSample=this.oWASM.HEAP32[n+28>>2],t.samplesPerSec=this.oWASM.HEAP32[n+32>>2],t.channel=this.oWASM.HEAP32[n+36>>2],t.frameNum=this.oWASM.HEAP32[n+40>>2],t.cropLeft=this.oWASM.HEAP32[n+44>>2],t.cropRight=this.oWASM.HEAP32[n+48>>2],t.cropTop=this.oWASM.HEAP32[n+52>>2],t.cropBottom=this.oWASM.HEAP32[n+56>>2],t.year=this.oWASM.HEAP16[n+60>>1],t.month=this.oWASM.HEAP16[n+62>>1],t.week=this.oWASM.HEAP16[n+64>>1],t.day=this.oWASM.HEAP16[n+66>>1],t.hour=this.oWASM.HEAP16[n+68>>1],t.minute=this.oWASM.HEAP16[n+70>>1],t.second=this.oWASM.HEAP16[n+72>>1],t.milliseconds=this.oWASM.HEAP16[n+74>>1],e(t))}},{key:"PlayM4_ReversePlay",value:function(){return this.oWASM._JSPlayM4_ReversePlay(this.iPort)}},{key:"PlayM4_SetAdditionDataCallBack",value:function(e,t){return this.oWASM._JSPlayM4_SetAdditionDataCallBack(this.iPort,e,t)}}]),a);function a(e,t,n,s){(0,i.default)(this,a),this.szCanvasID=e,this.clonedCanvas=null,this.oWASM=null,this.iPort=-1,this.pCanvasData=null,this.iYUVWidth=0,this.iYUVHeight=0,this.bPlay=!1,this.bPause=!1,this.bOnebyOne=!1,this.bIsFirstFrame=!0,this.bIsGetYUV=!1,this.bIsInput=!1,this.iZoomNum=0,this.iCanvasWidth=0,this.iCanvasHeight=0,this.nDecFrameType=0,n&&"function"==typeof n&&(this.fnCallBack=n),this.aInputDataBuffer=[],this.setCallBack=function(e,t,n,i,r){var a=o;a.id=s,a.cmd=t,a.data=n,a.errorCode=i,a.status=r,(a.instance=e).fnCallBack(a)},this.aInputDataLens=[],this.aInputDataBuffer=[],this.bIsGetYUV=!1,this.bIsFirstFrame=!0,this.iInputMaxBufSize=5242880,this.bIsInput=!1,this.bIsInputBufOver=!1,this.iInputDataLen=5e3,t&&(this.oWASM=t)}t.JSPlayCtrl=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSPlayCtrl=void 0;var i=u(n(53)),r=u(n(54)),a=u(n(1)),s=u(n(2)),o=u(n(11));function u(e){return e&&e.__esModule?e:{default:e}}var d=28944,l=28945,h=29217,c=29280,f=29281,m=29282,p=8193,y=8192,v=4096,g={width:0,height:0,frameNum:0,yuvData:null},M={width:0,height:0,frameNum:0,yuvData:null},L={sampleRate:0,channel:0,bitsPerSample:0,length:0,pcmData:null},_=!1,S=!1,k=!1,b={id:null,cmd:null,data:null,errorCode:0,status:null};function w(n){return new o.default(function(e){var t=document.createElement("script");t.type="text/javascript",t.src=n,t.onload=function(){e()},document.body.appendChild(t)})}var D;t.JSPlayCtrl=((0,s.default)(T,[{key:"_loadRenderFiles",value:(D=(0,r.default)(i.default.mark(function e(){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(S&&_){e.next=5;break}return e.next=3,o.default.all([w(this.szBasePath+"AudioRenderer.js"),w(this.szBasePath+"SuperRender_10.js")]);case 3:_=S=!0;case 5:case"end":return e.stop()}},e,this)})),function(){return D.apply(this,arguments)})},{key:"PlayM4_SetCurrentFrameNum",value:function(e,t){return null!=this.decodeWorker&&null!=this.oSuperRender&&this.bPlay?e<0||0!==t&&1!==t?this.iLastErrorCode=0:this.PlayM4_SetPlayPosition(0,e,t):this.iLastErrorCode=2}},{key:"PlayM4_SetPlayPosition",value:function(e,t,n){return null!=this.decodeWorker&&null!=this.oSuperRender&&this.bPlay?0!==e&&1!==e||t<0||0!==n&&1!==n?this.iLastErrorCode=0:(this.SetPlayPositionFlag=!0,this.iFrameNumOrTime=t,this.bSetPlayPositionType=n,this.decodeWorker.postMessage({command:"SetPlayPosition",data:this.iFrameNumOrTime,type:e}),this.aAudioBuffer.splice(0,this.aAudioBuffer.length),this.iAudioBufferSize=0,this.aVideoFrameBuffer.splice(0,this.aVideoFrameBuffer.length),this.aInputDataBuffer.splice(0,this.aInputDataBuffer.length),this.aInputDataLens.splice(0,this.aInputDataLens.length),this.bIsFirstFrame=!0,this.bIsInputBufOver=!1,this.iLastErrorCode=1):this.iLastErrorCode=2}},{key:"PlayM4_OpenPlayerSDKPrintLog",value:function(e){return k=!0===e,this.decodeWorker.postMessage({command:"printLog",data:e}),this.iLastErrorCode=1}},{key:"PlayM4_DownloadYUVdata",value:function(){return this.bWriteYUVData=!0,this.iLastErrorCode=1}},{key:"PlayM4_DownloadPCMdata",value:function(){return this.bWritePCMData=!0,this.iLastErrorCode=1}},{key:"PlayM4_SetDecCallBack",value:function(e){return k&&console.log(">>>JS MainThread-PlayM4_SetDecCallBack"),e&&"function"==typeof e?(this.DecCallBackFun=e,this.iLastErrorCode=1):this.iLastErrorCode=0}},{key:"PlayM4_SetDisplayCallBack",value:function(e){return k&&console.log(">>>JS MainThread-PlayM4_SetDisplayCallBack"),e&&"function"==typeof e?(this.DisplayCallBackFun=e,this.iLastErrorCode=1):this.iLastErrorCode=0}},{key:"PlayM4_SetPCMCallBack",value:function(e){return k&&console.log(">>>JS MainThread-PlayM4_SetDisplayCallBack"),e&&"function"==typeof e?(this.PCMCallBackFun=e,this.iLastErrorCode=1):this.iLastErrorCode=0}},{key:"PlayM4_SetStreamOpenMode",value:function(e){return null==e||void 0===e||0!==e&&1!==e?this.iLastErrorCode=0:(this.streamOpenMode=e,k&&console.log(">>>JS PlayM4_SetStreamOpenMode nMode:"+e),this.iLastErrorCode=1)}},{key:"PlayM4_DownloadRTPData",value:function(e){this.downloadRTP=e}},{key:"PlayM4_OpenStream",value:function(e,t,n){if(k&&console.log(">>>JS PlayM4_OpenStream 1 nSysTime:"+((new Date).getMonth()+1)+"-"+(new Date).getDate()+" "+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),null==this.decodeWorker)return this.iLastErrorCode=2;if(this.downloadRTP&&(i=new Uint8Array(e.buffer),this.DownloadRTPData(i),console.log("write 40 hik head")),null==e||t<=0||n<=0)return this.iLastErrorCode=0;this.bPlay=!1,this.bPause=!1,this.bOnebyOne=!1,this.bIsFirstFrame=!0,this.bIsGetYUV=!1,this.bIsInput=!1;var i=this.checkAudioType(e);return this.bAudioTypeSupport=1===i,this.decodeWorker.postMessage({command:"SetStreamOpenMode",data:this.streamOpenMode}),k&&console.log(">>>JS PlayM4_OpenStream 2 nSysTime:"+((new Date).getMonth()+1)+"-"+(new Date).getDate()+" "+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),this.decodeWorker.postMessage({command:"OpenStream",data:e,dataSize:t,bufPoolSize:n}),k&&console.log(">>>JS PlayM4_OpenStream 3 nSysTime:"+((new Date).getMonth()+1)+"-"+(new Date).getDate()+" "+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),this.bOpenStream=!0,this.iLastErrorCode=1}},{key:"PlayM4_CloseStream",value:function(){return k&&console.log(">>>JS PlayM4_CloseStream 1 nSysTime:"+((new Date).getMonth()+1)+"-"+(new Date).getDate()+" "+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),null===this.decodeWorker||!1===this.bOpenStream?this.iLastErrorCode=2:(this.bOnlyPlaySound=!1,this.PlayM4_Stop(),this.decodeWorker.postMessage({command:"CloseStream"}),null!==this.oSuperRender&&(this.oSuperRender.SR_Destroy(),this.oSuperRender=null),null!==this.audioRenderer&&(this.audioRenderer.Stop(),this.audioRenderer=null),this.aAudioBuffer.splice(0,this.aAudioBuffer.length),this.aVideoFrameBuffer.splice(0,this.aVideoFrameBuffer.length),this.aInputDataBuffer.splice(0,this.aInputDataBuffer.length),this.aInputDataLens.splice(0,this.aInputDataLens.length),this.aAudioEncBuffer.splice(0,this.aAudioEncBuffer.length),this.aVideoYUVBuffer.splice(0,this.aVideoYUVBuffer.length),this.aAudioPCMBuffer.splice(0,this.aAudioPCMBuffer.length),this.aRawDataBuffer.splice(0,this.aRawDataBuffer.length),this.bOpenStream=!1,this.iAudioBufferSize=0,this.szOSDTime=null,this.iLastErrorCode=1)}},{key:"PlayM4_Destroy",value:function(){return k&&console.log(">>>JS PlayM4_Destroy 1 nSysTime:"+((new Date).getMonth()+1)+"-"+(new Date).getDate()+" "+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),null!==this.decodeWorker&&(this.PlayM4_CloseStream(),this.decodeWorker.terminate(),this.decodeWorker=null),this.iLastErrorCode=1}},{key:"PlayM4_InputData",value:function(e,t){var n=this.aInputDataBuffer.length;if(4===t){var i=new Uint8Array(e.buffer);if(1===i[0]&&2===i[1]&&3===i[2]&&4===i[3])return k&&console.log(">>>JS PlaySDKInterface PlayM4_InputData:intput end"),this.bIsFirstFrame?(k&&console.log(">>>JS inputData FirstTime"),this.inputDataFun()):this.bIsGetYUV?this.inputDataFun():this.bIsInput=!0,i=null,this.iLastErrorCode=1}if(n+t>this.iInputMaxBufSize)return console.log("input over"),this.inputDataFun(),this.iLastErrorCode=11;var r=null,a=t;switch(this.streamOpenMode){case 1:r=new Uint8Array(e.buffer),this.downloadRTP&&(this.DownloadRTPData(r),this.rtpNum++,console.log("rtpNUm:"+this.rtpNum)),this.aInputDataLens.push(t);break;case 0:var a=t+4,s=new Uint32Array([t]),s=new Uint8Array(s.buffer);(r=new Uint8Array(a)).set(s,0),r.set(e,4),this.downloadRTP&&(this.DownloadRTPData(r),this.rtpNum++,console.log("rtpNUm:"+this.rtpNum)),0,this.aInputDataLens.push(t+4);break;default:return this.iLastErrorCode=16}for(var o=0;o>>JS PlayM4_InputData 1: nSize:%d, iInputBufLen:%d, iInputMaxBufSize;%d",t,this.aInputDataBuffer.length,this.iInputMaxBufSize),this.bOnlyPlaySound?(k&&console.log(">>>JS PlayM4_InputData: OnlyPlaySound"),this.inputDataFun()):this.bIsFirstFrame?(k&&console.log(">>>JS PlayM4_InputData is firstFrame"),this.inputDataFun()):this.bIsGetYUV?(k&&console.log(">>>JS PlayM4_InputData is GetYUV"),this.inputDataFun()):(k&&console.log(">>>JS PlayM4_InputData 1-3 sysTime:"+((new Date).getMonth()+1)+"-"+(new Date).getDate()+" "+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),this.bIsInput=!0),this.iLastErrorCode=1),1}},{key:"DownloadRTPData",value:function(e){if(this.bWriteRTPData){for(var t=new Uint8Array(e),n=this.aRTPDataBuffer.length,i=0,r=t.length;i>>JS PlayM4_Play canvasID: "+e),null===e)this.bOnlyPlaySound=!0,this.sCanvasId=null;else{if("string"!=typeof e)return this.iLastErrorCode=0;if(this.bOnebyOne&&(this.bPlayRateChange=!1,this.bOnebyOne=!1,this.bPause=!1,this.draw()),this.bPlay)return this.iLastErrorCode=1;if(null==this.oSuperRender&&(this.oSuperRender=new SuperRender(e,this.szBasePath),null==this.oSuperRender))return this.iLastErrorCode=61;this.sCanvasId=e,this.bPlay=!0,this.bPause=!1,this.bOnebyOne=!1,this.bPlaySound=!1,this.bPlayRateChange=!1,this.bOnlyPlaySound=!1,this.draw()}return null==this.audioRenderer&&(this.audioRenderer=new AudioRenderer,null==this.audioRenderer)?this.iLastErrorCode=61:this.iLastErrorCode=1}},{key:"PlayM4_Stop",value:function(){if(k&&console.log(">>>JS PlayM4_Stop 1"),null==this.decodeWorker||null==this.oSuperRender)return this.iLastErrorCode=2;if(!this.bPlay)return this.iLastErrorCode=2;this.bPlaySound&&(this.PlayM4_StopSound(),this.bPlaySound=!0),this.bPlay=!1,this.bOnebyOne=!1,this.bPause=!1,this.oSuperRender.SR_SetDisplayRect(null),this.iZoomNum=0,this.bDisRect=!1,this.oSuperRender.SR_DisplayFrameData(this.nWidth,this.nHeight,null);var e=document.getElementById(this.sCanvasId);return e&&(this.clonedCanvas=e.cloneNode(!0),this.clonedCanvasParentNode=e.parentNode,this.clonedCanvasParentNode.replaceChild(this.clonedCanvas,e)),this.iLastErrorCode=1}},{key:"PlayM4_PlayRate",value:function(e){return null==this.decodeWorker?this.iLastErrorCode=2:(this.bPlayRateChange=1!==e,this.iInputDataLen=20480*(e=e<1?1:e),this.iLastErrorCode=1)}},{key:"PlayM4_Pause",value:function(e){return null==this.decodeWorker||null==this.oSuperRender||!this.bPlay||this.bOnebyOne?this.iLastErrorCode=2:"boolean"!=typeof e?this.iLastErrorCode=0:(this.bPause=e,this.bIsFirstFrame=!0,k&&console.log(">>>JS PlayM4_Pause:"+e),e?this.bPlaySound&&(this.PlayM4_StopSound(),this.bPlaySound=!0):(this.bPlaySound&&this.PlayM4_PlaySound(),this.draw()),this.iLastErrorCode=1)}},{key:"PlayM4_OneByOne",value:function(e){return null!=this.decodeWorker&&null!=this.oSuperRender&&this.bPlay?10>>JS PlayM4_SetDecodeFrameType"),console.log(e)),this.nDecFrameType=e,this.decodeWorker.postMessage({command:"SetDecodeFrameType",data:e}),this.iLastErrorCode=1)}},{key:"PlayM4_SetIFrameDecInterval",value:function(e){return 1!==this.nDecFrameType?this.iLastErrorCode=2:e<0?this.iLastErrorCode=0:(this.decodeWorker.postMessage({command:"SetIFrameDecInterval",data:e}),this.iLastErrorCode=1)}},{key:"PlayM4_SetLostFrameMode",value:function(e){return e<0||1this.iCanvasWidth||e-i>this.iCanvasHeight)return this.iLastErrorCode=0;0!==this.iZoomNum&&(t=Math.round(t/this.iRatio_x)+this.stDisplayRect.left,i=Math.round(i/this.iRatio_y)+this.stDisplayRect.top,n=Math.round(n/this.iRatio_x)+this.stDisplayRect.left,e=Math.round(e/this.iRatio_y)+this.stDisplayRect.top),this.stDisplayRect={top:i,left:t,right:n,bottom:e},this.oSuperRender.SR_SetDisplayRect(this.stDisplayRect),this.bDisRect=!0;r=e-i;this.iRatio_x=this.iCanvasWidth/(n-t),this.iRatio_y=this.iCanvasHeight/r,this.iZoomNum++}else this.oSuperRender.SR_SetDisplayRect(null),this.iZoomNum=0,this.bDisRect=!1;return(this.bPause||this.bOnebyOne||this.bPlayRateChange)&&this.oSuperRender.SR_DisplayFrameData(this.nWidth,this.nHeight,new Uint8Array(this.aDisplayBuf)),this.iLastErrorCode=1}},{key:"PlayM4_GetBMP",value:function(e){return this.getPic(e,"GetBMP")}},{key:"PlayM4_GetJPEG",value:function(e){return this.getPic(e,"GetJPEG")}},{key:"PlayM4_SetVolume",value:function(e){return null==this.decodeWorker||null==this.audioRenderer?this.iLastErrorCode=2:e<0||100>>JS PlayM4_IsVisible visibility:"+e),this.iLastErrorCode=1}},{key:"PlayM4_GetSdkVersion",value:function(){return"20211104"}},{key:"PlayM4_GetBuildDate",value:function(){return"20210923"}},{key:"PlayM4_GetInputBufSize",value:function(){return this.aInputDataBuffer.length}},{key:"PlayM4_SetInputBufSize",value:function(e){return 0>>JS PlayM4_CreateAudEncode 1 nEncoderType:"+e),null==this.decodeWorker?79:e<1||6>>JS PlayM4_CreateAudEncode 2 nEncoderType:"+e),1)}},{key:"PlayM4_SetAudEncodeParam",value:function(e,t,n,i){return k&&console.log(">>>JS PlayM4_SetAudEncodeParam 1 nSampleRate:"+e+",nChannel:"+t+" ,nBitRate:"+n+" ,nBitWidth:"+i),null==this.decodeWorker?79:1!=t||16!=i?71:(this.decodeWorker.postMessage({command:"SetAudEncodeParam",samplerate:e,channel:t,bitrate:n,bitwidth:i}),k&&console.log(">>>JS PlayM4_SetAudEncodeParam 2 nSampleRate:"+e+",nChannel:"+t+" ,nBitRate:"+n+" ,nBitWidth:"+i),1)}},{key:"PlayM4_InputAudEncodeData",value:function(e,t){return k&&console.log(">>>JS PlayM4_InputAudEncodeData 1 dataSize:"+t),null==this.decodeWorker?79:(k&&console.log(">>>JS PlayM4_InputAudEncodeData 2 dataSize:"+t+", nSysTime:"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),this.decodeWorker.postMessage({command:"InputAudEncodeData",data:e,dataSize:t}),1)}},{key:"PlayM4_DestroyAudEncode",value:function(){return k&&console.log(">>>JS MainThread-PlayM4_DestroyAudEncode 1 "),null==this.decodeWorker?79:(this.aAudioEncBuffer.splice(0,this.aAudioEncBuffer.length),this.iAudioEncBufferSize=0,this.decodeWorker.postMessage({command:"DestroyAudEncode"}),1)}},{key:"PlayM4_GetAudioEmcBuf",value:function(){return this.aAudioEncBuffer}},{key:"PlayM4_RegisterAudEncodeCB",value:function(e){return k&&console.log(">>>JS PlayM4_RegisterAudEncodeCB 1 callback:"+e),e&&"function"==typeof e?(this.AudEncodeDataCBFun=e,k&&console.log(">>>JS PlayM4_RegisterAudEncodeCB 2 callback:"+e),1):0}},{key:"downloadFile",value:function(e,t){var n=e,e=(e instanceof Blob||e instanceof File||(n=new Blob([e])),window.URL.createObjectURL(n)),n=window.document.createElement("a"),e=(n.href=e,n.download=t,document.createEvent("MouseEvents"));e.initEvent("click",!0,!0),n.dispatchEvent(e)}},{key:"PlayM4_GetLastError",value:function(){return this.iLastErrorCode}}]),T);function T(e,t,s){if((0,a.default)(this,T),null==e||void 0===e||"string"!=typeof e)return 0;if(this.szBasePath=e,!t||"function"!=typeof t)return 0;this.fnCallBack=t,this.decodeWorker=null,this.streamOpenMode=null,this.bOpenStream=!1,this.iFrameNumOrTime=0,this.bSetPlayPositionType=0,this.audioRenderer=null,this.aAudioBuffer=[],this.iAudioBufferSize=0,this.bWriteAudEnc=!1,this.iAudioEncBufferSize=0,this.aAudioEncBuffer=[],this.oSuperRender=null,this.aVideoFrameBuffer=[],this.YUVBufferSize=1,this.szOSDTime=null,this.bWriteYUVData=!1,this.iYUV10size=0,this.aVideoYUVBuffer=[],this.bWritePCMData=!1,this.iAudioBuffer500Size=0,this.aAudioPCMBuffer=[],this.bWriteRawData=!1,this.iRawDataSize=0,this.aRawDataBuffer=[],this.bWriteRTPData=!0,this.iRTPDataSize=0,this.aRTPDataBuffer=[],this.downloadRTP=!1,this.rtpNum=0,this.bPlaySound=!1,this.bPlay=!1,this.bPause=!1,this.bOnebyOne=!1,this.bPlayRateChange=!1,this.bAudioTypeSupport=!0,this.audioNum=0,this.videoNum=0,this.SetPlayPositionFlag=!1,this.FrameForwardLen=1,this.bOnlyPlaySound=!1,this.dataCallBackFun=null,this.YUVBufSizeCBFun=null,this.AudEncodeDataCBFun=null,this.DecCallBackFun=null,this.DisplayCallBackFun=null,this.PCMCallBackFun=null,this.DecInfoYUV=g,this.DisplayInfoYUV=M,this.DecInfoPCM=L,this.nWidth=0,this.nHeight=0,this.nSPSCropLeft=0,this.nSPSCropRight=0,this.nSPSCropTop=0,this.nSPSCropBottom=0,this.sCanvasId=null,this.aDisplayBuf=null,this.bVisibility=!0,this.nDecFrameType=0,this.iCanvasWidth=0,this.iCanvasHeight=0,this.iZoomNum=0,this.iRatio_x=1,this.iRatio_y=1,this.stDisplayRect={top:0,left:0,right:0,bottom:0},this.bDisRect=!1,this.stYUVRect={top:0,left:0,right:0,bottom:0},this.aInputDataLens=[],this.aInputDataBuffer=[],this.bIsGetYUV=!1,this.bIsFirstFrame=!0,this.iInputMaxBufSize=5242880,this.bIsInput=!1,this.bIsInputBufOver=!1,this.iInputDataLen=20480;var _=this;this.iLastErrorCode=1,this.setCallBack=function(e,t,n,i,r){var a=b;a.id=s,a.cmd=t,a.data=n,a.errorCode=i,a.status=r,e.fnCallBack(a)},this._loadRenderFiles(),this.convertErrorCode=function(e){switch(e){case 1:return this.iLastErrorCode=1;case 98:return this.iLastErrorCode=0;default:return this.iLastErrorCode=e}},this.arrayBufferCopy=function(e){for(var t=e.byteLength,n=new Uint8Array(t),i=new Uint8Array(e),r=0,r=0;r>>JS inputDataFun over!");var t=new Uint8Array(1),n={command:"InputData",data:new Uint8Array(t).buffer,dataSize:0};_.decodeWorker.postMessage(n,[n.data])}else if(_.bPlay&&(!_.bPause||_.bOnebyOne)||this.bOnlyPlaySound){for(;0<_.aInputDataLens.length&&!((e+=_.aInputDataLens.shift())>_.iInputDataLen););k&&console.log(">>>JS inputDataFun-len:%d,totalSize:%d",e,_.aInputDataBuffer.length),t=_.aInputDataBuffer.splice(0,e);n={command:"InputData",data:new Uint8Array(t).buffer,dataSize:e};_.decodeWorker.postMessage(n,[n.data])}t=null},this.getPic=function(e,t){if(null==this.decodeWorker||null==this.oSuperRender)return this.iLastErrorCode=2;if(!this.bPlay)return this.iLastErrorCode=2;if(!e||"function"!=typeof e)return this.iLastErrorCode=0;var n;if(this.dataCallBackFun=e,0===this.iZoomNum)this.stYUVRect.left=0,this.stYUVRect.top=0,this.stYUVRect.right=0,this.stYUVRect.bottom=0;else if(0===this.iCanvasWidth||0===this.iCanvasHeight?(this.stYUVRect.left=0,this.stYUVRect.top=0,this.stYUVRect.right=0,this.stYUVRect.bottom=0):(e=this.nWidth/this.iCanvasWidth,n=this.nHeight/this.iCanvasHeight,this.stYUVRect.left=Math.round(this.stDisplayRect.left*e),this.stYUVRect.top=Math.round(this.stDisplayRect.top*n),this.stYUVRect.right=Math.round(this.stDisplayRect.right*e),this.stYUVRect.bottom=Math.round(this.stDisplayRect.bottom*n)),this.stYUVRect.right-this.stYUVRect.left<32||this.stYUVRect.bottom-this.stYUVRect.top<32)return this.iLastErrorCode=0;if(null==this.aDisplayBuf)return this.iLastErrorCode=2;e={command:t,data:this.arrayBufferCopy(this.aDisplayBuf).buffer,width:this.nWidth,height:this.nHeight,rect:this.stYUVRect};return k&&console.log(">>>JS capture nWidth = %d,nWidth = %d",this.nWidth,this.nHeight),this.decodeWorker.postMessage(e),this.iLastErrorCode=1},this.createWorker=function(c){if(window.Worker){if(null==this.decodeWorker&&(this.decodeWorker=new Worker(_.szBasePath+"DecodeWorker.js"),k&&console.log(">>>JS createWorker success!!!!!!!!!!!!!!!!!!!!!!!!!"),null==this.decodeWorker))return this.iLastErrorCode=60;this.decodeWorker.onmessage=function(e){var t=null,n=e.data;switch(n.function){case"printLog":console.log("print JSPlayerSDK log failed");break;case"loaded":c.setCallBack(c,t="loaded",0,0,!0);break;case"SetStreamOpenMode":t="SetStreamOpenMode";break;case"OpenStream":if(t="OpenStream",1===n.errorCode)return void(_.bOpenStream=!0);break;case"InputData":t="InputData",11===n.errorCode&&(_.bIsInputBufOver=!0,_.inputDataFun(),k&&console.log(">>>JS InputData PLAYM4_BUF_OVER")),31===n.errorCode&&(_.bIsInputBufOver=!1,k&&console.log(">>>JS InputData PLAYM4_NEED_MORE_DATA"));break;case"GetFrameData":if(t="GetFrameData",!_.bOnlyPlaySound){if(k&&console.log(">>>JS mainthread display GetFrameData 1-1"),null!=n.data&&null!=n.frameInfo&&(n.frameInfo.width,n.frameInfo.height),!_.bPlay)return;if(!_.bIsFirstFrame&&31===n.errorCode){_.bIsInputBufOver=!1,setTimeout(_.inputDataFun(),5);break}_.bIsInputBufOver?_.inputDataFun():"videoType"===n.type&&(0<_.aInputDataLens.length&&_.bIsInput?(_.inputDataFun(),_.bIsInput=!1):_.bIsGetYUV=!0,_.bIsFirstFrame=!1)}if(k&&console.log(">>>JS mainthread display GetFrameData bVisibility:"+_.bVisibility),_.bVisibility)if(1===n.errorCode)switch(n.type){case"videoType":if(k&&console.log(">>>JS mainthread display GetFrameData type:"+n.type),null==n.data||null==n.frameInfo)return this.iLastErrorCode=0;if(null!=_.DecCallBackFun&&(k&&console.log(">>>JS MainThread-GetYUVData"),_.DecInfoYUV.height=n.frameInfo.height,_.DecInfoYUV.width=n.frameInfo.width,_.DecInfoYUV.frameNum=n.frameInfo.frameNum,_.DecInfoYUV.yuvData=new Uint8Array(n.data),_.DecCallBackFun(_.DecInfoYUV)),_.bIsFirstFrame=!1,c.nWidth=n.frameInfo.width,c.nHeight=n.frameInfo.height,c.nSPSCropLeft=n.frameInfo.cropLeft,c.nSPSCropRight=n.frameInfo.cropRight,c.nSPSCropTop=n.frameInfo.cropTop,c.nSPSCropBottom=n.frameInfo.cropBottom,(o=new Object).data=n.data,o.osdTime=n.osd,o.nWidth=n.frameInfo.width,o.nHeight=n.frameInfo.height,o.frameNum=n.frameInfo.frameNum,o.timeStamp=n.frameInfo.timeStamp,c.bWriteYUVData){for(var i=new Uint8Array(n.data),r=c.aVideoYUVBuffer.length,a=0,s=i.length;a>>JS mainthread getVideoInfo Width:"+o.nWidth+",height:"+o.nHeight+",frameNum:"+o.frameNum),c.aVideoFrameBuffer.push(o);var o=null,u=c.aVideoFrameBuffer.length;if(5>>JS render loose frame iYUVNum:%d",u),c.bOnebyOne||c.aVideoFrameBuffer.splice(0,2)),c.SetPlayPositionFlag&&1===c.bSetPlayPositionType&&(n.frameInfo.frameNum===c.iFrameNumOrTime||n.frameInfo.timeStamp===c.iFrameNumOrTime)){c.setCallBack(c,"SetFrameNum",0,0,!1),c.bIsFirstFrame=!0;break}if(c.bOnebyOne&&15<=c.aVideoFrameBuffer.length){c.setCallBack(c,"OnebyOne",0,0,!1),c.bIsFirstFrame=!0;break}break;case"audioType":if(k&&console.log(">>>JS mainthread display GetFrameData 2-3 type:"+n.type+",bPlaySound:"+c.bPlaySound+",!bPlayRateChange:"+!c.bPlayRateChange+",bOnlyPlaySound:"+_.bOnlyPlaySound),c.bPlaySound&&!c.bPlayRateChange||_.bOnlyPlaySound){k&&console.log(">>>JS mainthread display GetFrameData 2-4 type"+n.type+"bOnlyPlaySound:"+_.bOnlyPlaySound),null!=_.PCMCallBackFun&&(k&&console.log(">>>JS MainThread-GetYUVData"),_.DecInfoPCM.sampleRate=n.frameInfo.samplesPerSec,_.DecInfoPCM.channel=n.frameInfo.channels,_.DecInfoPCM.bitsPerSample=n.frameInfo.bitsPerSample,_.DecInfoPCM.pcmData=new Uint8Array(n.data),_.DecInfoPCM.length=_.DecInfoPCM.pcmData.length,_.PCMCallBackFun(_.DecInfoPCM));for(var i=new Uint8Array(n.data),r=c.aAudioBuffer.length,a=0,s=i.length;a>>JS play sound 1 iAudioBufferNum:%d, BufferLen:%d",c.iAudioBufferSize,c.aAudioBuffer.length),c.bWritePCMData){for(i=new Uint8Array(n.data),r=c.aAudioPCMBuffer.length,a=0,s=i.length;a>>JS play sound 2 iAudioBufferNum:%d, BufferLen:%d",c.iAudioBufferSize,c.aAudioBuffer.length),c.audioRenderer.Play(c.aAudioBuffer,c.aAudioBuffer.length,n.frameInfo),k&&console.log(">>>JS mainthread display Audio push 3 sysTime:"+((new Date).getMonth()+1)+"-"+(new Date).getDate()+" "+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),c.aAudioBuffer.splice(0,c.aAudioBuffer.length),c.aAudioBuffer.length=0,c.iAudioBufferSize=0)}break;case"privateType":k&&console.log(">>>JS mainthread display GetFrameData 2-5 type"+n.type+"bOnlyPlaySound:"+_.bOnlyPlaySound);break;default:k&&console.log(">>>JS mainthread display GetFrameData 2-6 type:"+n.type+",bOnlyPlaySound:"+_.bOnlyPlaySound)}else k&&console.log(">>>JS mainthread GetFrameData is not Ok,errorCode:"+n.errorCode);break;case"GetRawData":if(t="GetRawData",c.bWriteRawData){for(var d=new Uint8Array(n.data),l=c.aRawDataBuffer.length,a=0,s=d.length;a>>JS mainthread SetPlayPosition error,errorCode:"+n.errorCode);break;case"GetJPEG":var t="GetJPEG",h=n.data;c.dataCallBackFun(h);break;case"GetBMP":t="GetBMP";var h=n.data;c.dataCallBackFun(h);break;case"GetAudEncodeData":if(k&&console.log(">>>JS MainThread-GetAudEncodeData 1"),t="GetAudEncodeData",1===n.errorCode){if(null!=_.AudEncodeDataCBFun&&(k&&console.log(">>>JS GetAudEncodeData 1 dataSize"+n.dataSize+", nSysTime:"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds()),_.AudEncodeDataCBFun(new Uint8Array(n.data)),k&&console.log(">>>JS GetAudEncodeData 2 dataSize"+n.dataSize+", nSysTime:"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds())),c.bWriteAudEnc){for(i=new Uint8Array(n.data),r=c.aAudioEncBuffer.length,a=0,s=i.length;a>>JS MainThread-GetAudEncodeData 2 err")}"GetFrameData"===t&&"GetAudEncodeData"===t&&16!==n.errorCode&&101!==n.errorCode&&100!==n.errorCode&&48!==n.errorCode||c.setCallBack(c,t,0,c.convertErrorCode(n.errorCode),!0)}}},this.createWorker(_),this.draw=function(){if(_.bPlay){if(!_.bPause||_.bOnebyOne){requestAnimationFrame(_.draw);var e=_.aVideoFrameBuffer.length;if(null!=_.YUVBufSizeCBFun&&_.YUVBufSizeCBFun(e),_.bOnebyOne){if(e<=8&&_.setCallBack(_,"OnebyOne",0,31,!0),e<=_.FrameForwardLen+1)return void _.setCallBack(_,"OnebyOne",0,31,!0);for(var t=_.FrameForwardLen;1>>JS Draw aVideoFrameBuffer.length == "+e),e>_.YUVBufferSize){e=_.aVideoFrameBuffer.shift();if(_.SetPlayPositionFlag){if(k&&console.log(">>>JS SetPlayPositionFlag frameNumOrTime:"+_.iFrameNumOrTime+",currentFrameNum:"+e.frameNum),e.frameNum!=_.iFrameNumOrTime)return void(k&&console.log(">>>JS frameNum!= frameNumOrTime:"+e.frameNum));1===_.bSetPlayPositionType&&(_.bPause=!0),_.SetPlayPositionFlag=!1}k&&console.log(">>>after display frameNum:"+e.frameNum),_.aDisplayBuf=e.data;var n=new Uint8Array(_.aDisplayBuf);k&&console.log(">>>JS SR_DisplayFrameData 1 nWidth:%d, nHeight:%d, nWidth1:%d, nHeight1:%d",e.nWidth,e.nHeight,_.nWidth,_.nHeight),_.oSuperRender.SR_DisplayFrameData(e.nWidth,e.nHeight,n,e.nWidth-_.nSPSCropLeft-_.nSPSCropRight,e.nHeight-_.nSPSCropTop-_.nSPSCropBottom),null!=_.DisplayCallBackFun&&(k&&console.log(">>>JS MainThread-DisplayCallBackFun"),_.DisplayInfoYUV.height=e.nHeight,_.DisplayInfoYUV.width=e.nWidth,_.DisplayInfoYUV.frameNum=e.frameNum,_.DisplayInfoYUV.yuvData=new Uint8Array(n),_.DisplayCallBackFun(_.DisplayInfoYUV)),k&&_.bOnebyOne&&console.log("OneByOne frameNum:"+e.frameNum),k&&console.log(">>>JS SR_DisplayFrameData 2 nWidth:%d, nHeight:%d, nWidth1:%d, nHeight1:%d",e.nWidth,e.nHeight,_.nWidth,_.nHeight),n=null,_.szOSDTime=e.osdTime}else _.setCallBack(_,"Play",0,31,!0)}}else _.bPlay||(k&&console.log(">>>JS mainThread stop play jsplaySDKInterface"),_.aVideoFrameBuffer.splice(0,_.aVideoFrameBuffer.length),_.aAudioBuffer.splice(0,_.aAudioBuffer.length))},this.checkAudioType=function(e){var t,e=[e[12],e[13],0,0];switch(255&e[t=0]|(255&e[t+1])<<8|(255&e[t+2])<<16|(255&e[t+3])<<24){case l:case d:case h:case m:case f:case c:case p:case y:case v:return this.iLastErrorCode=1;default:return this.iLastErrorCode=16}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSTalkCtrl=void 0;var i=r(n(1)),n=r(n(2));function r(e){return e&&e.__esModule?e:{default:e}}var s={id:null,cmd:null,data:null,errorCode:0,status:null},a=null,n=(window.JSAUDIOCOM_EncodeDataCBFun=function(e,t,n,i){a&&null!=a.AudEncodeDataCBFun&&a.AudEncodeDataCBFun(new Uint8Array(t))},(0,n.default)(o,[{key:"Talk_CreateAudEncode",value:function(e){this.iTalkEncodePort=this.oTalkWASM._JSAUDIOCOM_CreateEncodeHandle(e),console.log("_JSAUDIOCOM_CreateEncodeHandle port :"+this.iTalkEncodePort)}},{key:"Talk_SetAudEncodeParam",value:function(e,t,n,i){0==this.oTalkWASM._JSAUDIOCOM_RegisterEncodeDataCallBack(this.iTalkEncodePort,t,i,e,n)&&(t=this.oTalkWASM._JSAUDIOCOM_GetLastError(this.iTalkEncodePort),console.log("resEncodeDataCallBack resError :"+t)),1!==this.oTalkWASM._JSAUDIOCOM_StartEncode(this.iTalkEncodePort)&&(i=this.oTalkWASM._JSAUDIOCOM_GetLastError(this.iTalkEncodePort),console.log("_JSAUDIOCOM_StartEncode resError :"+i))}},{key:"Talk_RegisterAudEncodeCB",value:function(e){return e&&"function"==typeof e?(this.AudEncodeDataCBFun=e,1):0}},{key:"Talk_InputAudEncodeData",value:function(e,t){var n=this.oTalkWASM._malloc(t);if(null===n)return console.log("inputdata malloc failed!!!"),-1;e=new Uint8Array(e),e=void this.oTalkWASM.writeArrayToMemory(e,n);try{e=this.oTalkWASM._JSAUDIOCOM_InputEncodeData(this.iTalkEncodePort,n,t)}catch(e){console.error(e)}return 1!==e&&(t=this.oTalkWASM._JSAUDIOCOM_GetLastError(this.iTalkEncodePort),console.log("_JSAUDIOCOM_InputEncodeData resError :"+t)),null!==n&&(this.oTalkWASM._free(n),n=null),1}},{key:"Talk_DestroyAudEncode",value:function(){return this.oTalkWASM._JSAUDIOCOM_StopEncode(this.iTalkEncodePort),this.oTalkWASM._JSAUDIOCOM_ReleaseEncodeHandle(this.iTalkEncodePort),this.iTalkEncodePort=-1,1}},{key:"Talk_CreateAuDecode",value:function(){this.oTalkWASM._JSAUDIOCOM_LoadLibrary(),this.oTalkWASM._JSAUDIOCOM_GetPlayDeviceNum();var e=this.oTalkWASM._JSAUDIOCOM_GetOnePlayDeviceName(0);this.iTalkDecodePort=this.oTalkWASM._JSAUDIOCOM_CreatePlayHandle(),console.log("JSAUDIOCOM getNameRes:"+e+", port:"+this.iTalkDecodePort)}},{key:"Talk_SetAudDecodeParam",value:function(e,t,n,i,r){1!==this.oTalkWASM._JSAUDIOCOM_OpenStream(this.iTalkDecodePort,t,i,e,n,r)&&(t=this.oTalkWASM._JSAUDIOCOM_GetLastError(this.iTalkDecodePort),console.log("_JSAUDIOCOM_OpenStream resError :"+t))}},{key:"Talk_OpenStreamDecodeData",value:function(){var e;1!==this.oTalkWASM._JSAUDIOCOM_StartPlay(this.iTalkDecodePort)&&(e=this.oTalkWASM._JSAUDIOCOM_GetLastError(this.iTalkDecodePort),console.log("_JSAUDIOCOM_StartPlay resError :"+e))}},{key:"Talk_InputAudDecodeData",value:function(e,t){var n=this.oTalkWASM._malloc(t);if(null===n)return console.log("inputdata malloc failed!!!"),-1;var e=new Uint8Array(e);return this.oTalkWASM.writeArrayToMemory(e,n),1!==this.oTalkWASM._JSAUDIOCOM_InputStreamData(this.iTalkDecodePort,n,t)&&(e=this.oTalkWASM._JSAUDIOCOM_GetLastError(this.iTalkDecodePort),console.log("_JSAUDIOCOM_InputStreamData resError :"+e)),null!==n&&(this.oTalkWASM._free(n),0),1}},{key:"Talk_DestroyAudDecode",value:function(){this.oTalkWASM._JSAUDIOCOM_StopPlay(this.iTalkDecodePort),this.oTalkWASM._JSAUDIOCOM_ReleasePlayHandle(this.iTalkDecodePort),this.iTalkDecodePort=-1}},{key:"Talk_SetTalkLogFlag",value:function(e){this.oTalkWASM._JSAUDIOCOM_SetPrintLogFlag(this.iTalkDecodePort,e),this.oTalkWASM._JSAUDIOCOM_SetPrintLogFlag(this.iTalkEncodePort,e)}},{key:"Talk_SetVolume",value:function(e){return this.oTalkWASM._JSAUDIOCOM_SetVolume(this.iTalkDecodePort,e)}},{key:"Talk_GetVolume",value:function(e){if(e&&"function"==typeof e)return e(this.oTalkWASM._JSAUDIOCOM_GetVolume(this.iTalkDecodePort)),RETURN_OK}},{key:"Talk_GetLastError",value:function(){return this.oTalkWASM._JSAUDIOCOM_GetLastError(this.iTalkDecodePort)}}]),o);function o(e,t){var n=this,t=((0,i.default)(this,o),a=this,t&&"function"==typeof t&&(this.fnCallBack=t),this.setCallBack=function(e,t,n,i,r){var a=s;a.cmd=t,a.data=n,a.errorCode=i,a.status=r,e.fnCallBack(a)},this.iTalkEncodePort=-1,this.iTalkDecodePort=-1,this.AudEncodeDataCBFun=null,this.oTalkWASM=null,e),e=document.createElement("script");e.type="text/javascript",e.src=t,e.onload=function(){JSAudioInterComModule().then(function(e){n.oTalkWASM=e,n.setCallBack(n,"loaded")})},document.body.appendChild(e)}t.JSTalkCtrl=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageManager=void 0;var i=h(n(53)),r=h(n(54)),u=h(n(11)),o=h(n(1)),a=h(n(2)),d=h(n(87)),s=n(86),l=h(n(55));function h(e){return e&&e.__esModule?e:{default:e}}var c=new Uint8Array([1,2,3,4]);window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.URL=window.URL||window.webkitURL;(0,a.default)(f,[{key:"init",value:function(){var n=this,i=(0===this.iStreamType?this.szPath="Web/RecordFiles/":1===this.iStreamType&&(this.szPath="Web/PlaybackFiles/"),this.szPath+=this.getDateDir(),this.szPath.split("/"));return new u.default(function(t){window.requestFileSystem(window.TEMPORARY,n.options.iFileSize,function(e){n.createDir(e.root,i,function(){t()})},n.errorHandler)})}},{key:"getDateDir",value:function(){return s.oTool.dateFormat(new Date,"yyyy-MM-dd")}},{key:"createDir",value:function(e,t,n){var i=this;t.length?e.getDirectory(t[0],{create:!0},function(e){i.createDir(e,t.slice(1),n)},this.errorHandler):n()}},{key:"errorHandler",value:function(){}},{key:"openFile",value:function(){var t=this;window.requestFileSystem(window.TEMPORARY,this.options.iFileSize,function(e){e.root.getFile(t.szPath+"/"+t.szFileName,{create:!0},function(e){e.createWriter(function(e){e.onwriteend=function(){t.writeFile(e)},e.onerror=function(){}},t.errorHandler)},t.errorHandler)},this.errorHandler)}},{key:"writeFileHeader",value:function(n){var i=this;window.requestFileSystem(window.TEMPORARY,this.options.iFileSize,function(e){e.root.getFile(i.szFileName,{create:!0},function(e){e.createWriter(function(e){i.bStart=!0,e.onwriteend=function(){i.writeFile(e)},e.onerror=function(){},e.seek(e.length);var t=new Blob([n]);e.write(t)},i.errorHandler)},function(e){console.log("getFile error:",e.message)})},this.errorHandler)}},{key:"writeFileContent",value:function(e){this.aStreamList.push(e)}},{key:"writeFile",value:function(e){var t=this;if(0=this.options.iFileSize)return void(this.options.cbEventHandler&&this.options.cbEventHandler(3001,this.szUUID));n=new Blob([n]);e.write(n)}else!1===this.bStop&&setTimeout(function(){t.writeFile(e)},500);5!==this.iPackType&&0===this.aStreamList.length&&!0===this.bStop&&this.bStart&&(this.bStart=!1,this.stopWriteFile()),this.getStopData&&0===this.aStreamList.length&&(this.bStart=!1,this.stopWriteFile(),this.getStopData=!1)}},{key:"stopWriteFile",value:function(){var t,a=this;return new u.default((t=(0,r.default)(i.default.mark(function e(r){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a.bStop){e.next=2;break}return e.abrupt("return",r());case 2:if((!a.getStopData||0=u.m_iMinClosed&&(u.m_bClosed=!0,m.bPolygonDrawing=!1,u.setPointInfo(u.m_aPoint),h(u),l(),r=!1,m.bDrawShapeMultiOneTime||(m.bDrawStatus=!1),window.onDrawShapeEvent&&window.onDrawShapeEvent(u.m_szType,"onDrawEnd",u.m_szId));else if(0===e.button){if(a=e.offsetX,s=e.offsetY,o="draw",!m.bPolygonDrawing){var t=d();if("stretch"!==(o=-1!==t&&m.aShapes[t].inArc(e.offsetX,e.offsetY,5)?"stretch":o))for(var n=0,i=m.aShapes.length;na&&e.offsetY>s?(t.startPos=u.m_aPoint[0]||[e.offsetX,e.offsetY],t.endPos=u.m_aPoint[2]||[e.offsetX,e.offsetY]):(t.startPos=u.m_aPoint[2]||[e.offsetX,e.offsetY],t.endPos=u.m_aPoint[0]||[e.offsetX,e.offsetY]),m.oEventCallback&&m.oEventCallback(t),m.clearAllShape()),u=null):"Polygon"===m.szShapeType&&0===u.m_iPolygonType&&m.bPolygonDrawing&&2m.m_iCanvasWidth||this.m_aPoint[i][1]+t-this.m_iDriftStartY>m.m_iCanvasHeight||this.m_aPoint[i][0]+e-this.m_iDriftStartX<0||this.m_aPoint[i][1]+t-this.m_iDriftStartY<0)return this.m_iDriftStartX=e,void(this.m_iDriftStartY=t);for(i=0;it!=this.m_aPoint[a][1]>t&&e<(this.m_aPoint[a][0]-this.m_aPoint[r][0])*(t-this.m_aPoint[r][1])/(this.m_aPoint[a][1]-this.m_aPoint[r][1])+this.m_aPoint[r][0]&&(n=!n);return n}},{key:"inArc",value:function(e,t,n){for(var i=!1,r=0,a=this.m_aPoint.length;rthis.m_oEdgePoints.right.x&&(this.m_oEdgePoints.right.x=e[t][0],this.m_oEdgePoints.right.y=e[t][1]),e[t][1]>this.m_oEdgePoints.bottom.y&&(this.m_oEdgePoints.bottom.x=e[t][0],this.m_oEdgePoints.bottom.y=e[t][1]),e[t][0]e[a][0]&&(t=e[a][0]),n>e[a][1]&&(n=e[a][1]),ithis.m_aPoint[3][0]&&tthis.m_aPoint[0][0]&&(this.m_aPoint[1][0]=e,this.m_aPoint[2][0]=e):5===this.m_iIndexChoosePoint?ethis.m_aPoint[1][1]&&(this.m_aPoint[3][0]=e,this.m_aPoint[3][1]=t,this.m_aPoint[0][0]=e,this.m_aPoint[2][1]=t):6===this.m_iIndexChoosePoint?t>this.m_aPoint[1][1]&&(this.m_aPoint[2][1]=t,this.m_aPoint[3][1]=t):7===this.m_iIndexChoosePoint&&e>this.m_aPoint[0][0]&&t>this.m_aPoint[0][1]&&(this.m_aPoint[2][0]=e,this.m_aPoint[2][1]=t,this.m_aPoint[1][0]=e,this.m_aPoint[3][1]=t),l())}},{key:"move",value:function(e){l(),this.m_bChoosed=!0;var t=e[0][0],n=e[0][1],i=e[1][0],e=e[1][1];this.setPointInfo([[t,n],[i,n],[i,e],[t,e]]),this.draw()}},{key:"inArc",value:function(e,t,n){for(var i=this.m_aPoint[0][0],r=this.m_aPoint[0][1],a=this.m_aPoint[2][0]-i,s=this.m_aPoint[2][1]-r,o=Math.round(a/2),u=Math.round(s/2),d=[i,i+o,i+a,i,i+a,i,i+o,i+a],l=[r,r,r,r+u,r+u,r+s,r+s,r+s],h=0;h<8;h++)if(Math.sqrt((e-d[h])*(e-d[h])+(t-l[h])*(t-l[h]))m.m_iCanvasHeight||this.m_aPoint[i][0]+e-this.m_iDriftStartX<0||this.m_aPoint[i][1]+t-this.m_iDriftStartY<0)return this.m_iDriftStartX=e,void(this.m_iDriftStartY=t);for(i=0;im.m_iCanvasHeight||this.m_aPoint[i][1]+t-this.m_iDriftStartY<0)return this.m_iDriftStartX=e,void(this.m_iDriftStartY=t);for(i=0;ie[a][0]&&(t=e[a][0]),n>e[a][1]&&(n=e[a][1]),ithis.m_aPoint[3][0]&&tthis.m_aPoint[0][0]&&t>this.m_aPoint[0][1]&&(this.m_aPoint[2][0]=e,this.m_aPoint[2][1]=t,this.m_aPoint[1][0]=e,this.m_aPoint[3][1]=t):3===this.m_iIndexChoosePoint&ðis.m_aPoint[1][1]&&(this.m_aPoint[3][0]=e,this.m_aPoint[3][1]=t,this.m_aPoint[0][0]=e,this.m_aPoint[2][1]=t),this.setPointInfo(this.m_aPoint),l())}}]);var f=d;function d(){k(this,d);var e=L(this,(d.__proto__||Object.getPrototypeOf(d)).call(this));return e.m_szType="Polygon",e.m_iPolygonType=1,e}S(y,e),g(y,[{key:"draw",value:function(){m.oContext.beginPath(),m.oContext.fillStyle=this.m_szDrawColor,m.oContext.globalAlpha=1,m.oContext.arc(this.m_aPoint[0][0],this.m_aPoint[0][1],10,0,2*Math.PI,!0),m.oContext.closePath(),m.oContext.fill()}},{key:"drag",value:function(){}},{key:"stretch",value:function(){}}]);var p=y;function y(){k(this,y);var e=L(this,(y.__proto__||Object.getPrototypeOf(y)).call(this));return e.m_szType="Point",e.m_szId="",e}function v(e){k(this,v),(m=this).oCanvas=(0,M.default)("#"+e),this.oContext=this.oCanvas[0].getContext("2d"),this.aShapes=[],this.bDrawStatus=!1,this.szShapeType="Rect",this.iMaxShapeNumSupport=10,this.bDrawShapeMultiOneTime=!0,this.oCurrentShapeInfo={},this.oEventCallback=null,this.oShapeStyle={szDrawColor:"#ff0000",szFillColor:"#343434",iTranslucent:.7},this.bPolygonDrawing=!1,this.m_iCanvasWidth=this.oCanvas.width(),this.m_iCanvasHeight=this.oCanvas.height(),this.m_iHorizontalResolution=0,this.m_iVerticalResolution=0,this.m_szDisplayMode="",this.m_szVideoFormat="",t(),this.aShapes.length=0}return g(v,[{key:"setDrawMutiShapeOneTime",value:function(e){this.bDrawShapeMultiOneTime=e}},{key:"setMaxShapeSupport",value:function(e){this.iMaxShapeNumSupport=e}},{key:"getMaxShapeSupport",value:function(){return this.iMaxShapeNumSupport}},{key:"setDrawStatus",value:function(e,t){this.bDrawStatus=e,t&&e&&(this.oEventCallback=t),e||(this.oEventCallback=null)}},{key:"setShapeType",value:function(e){this.szShapeType=e,l()}},{key:"setCurrentShapeInfo",value:function(e){this.oCurrentShapeInfo=e||{szId:"",szTips:"",iMinClosed:3,iMaxPointNum:11,iPolygonType:1,iRedrawMode:0}}},{key:"getShapeType",value:function(){return this.szShapeType}},{key:"getAllShapesInfo",value:function(){for(var e=[],t=0,n=this.aShapes.length;te&&this.aShapes.splice(e,1),l()}},{key:"updateCanvas",value:function(e){this.oCanvas=(0,M.default)("#"+e),this.oContext=this.oCanvas[0].getContext("2d"),this.m_iCanvasWidth=this.oCanvas.width(),this.m_iCanvasHeight=this.oCanvas.height(),t()}},{key:"resizeCanvas",value:function(){this.m_iCanvasWidth=this.oCanvas.width(),this.m_iCanvasHeight=this.oCanvas.height()}},{key:"canvasRedraw",value:function(){l()}}]),v}();t.ESCanvas=n},function(e,t,n){"use strict";e.exports=n(291).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=_(n(9)),r=_(n(227)),a=_(n(301)),s=n(15),o=_(n(317)),u=_(n(333)),d=_(n(39)),l=n(234),h=_(n(64)),c=n(5);function _(e){return e&&e.__esModule?e:{default:e}}r.default.install();n={createPlayer:function(e,t){if(null==e||"object"!==(void 0===e?"undefined":(0,i.default)(e)))throw new c.InvalidArgumentException("MediaDataSource must be an javascript object!");if(e.hasOwnProperty("type"))return new("flv"!==e.type?u:o).default(e,t);throw new c.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!")},isSupported:function(){return a.default.supportMSEH264Playback()},getFeatureList:function(){return a.default.getFeatureList()}};n.BaseLoader=s.BaseLoader,n.LoaderStatus=s.LoaderStatus,n.LoaderErrors=s.LoaderErrors,n.Events=d.default,n.ErrorTypes=l.ErrorTypes,n.ErrorDetails=l.ErrorDetails,n.FlvPlayer=o.default,n.NativePlayer=u.default,n.LoggingControl=h.default,Object.defineProperty(n,"version",{enumerable:!0,get:function(){return"__VERSION__"}}),t.default=n},function(e,t,n){n(293),e.exports=n(3).Object.assign},function(e,t,n){var i=n(8);i(i.S+i.F,"Object",{assign:n(294)})},function(e,t,n){"use strict";var c=n(14),_=n(30),f=n(59),m=n(37),p=n(24),y=n(72),r=Object.assign;e.exports=!r||n(23)(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=r({},e)[n]||Object.keys(r({},t)).join("")!=i})?function(e,t){for(var n=p(e),i=arguments.length,r=1,a=f.f,s=m.f;r=11?e:e+12;else if(t==="下午"||t==="晚上")return e+12},meridiem:function(e,t,n){var i=e*100+t;if(i<600)return"凌晨";else if(i<900)return"早上";else if(i<1130)return"上午";else if(i<1230)return"中午";else if(i<1800)return"下午";else return"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(0))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(20)),r=s(n(38)),a=s(n(1));function s(e){return e&&e.__esModule?e:{default:e}}(0,s(n(2)).default)(u,null,[{key:"install",value:function(){Object.setPrototypeOf=r.default||function(e,t){return e.__proto__=t,e},Object.assign=i.default||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n=n[t]&ðis._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),i=new Uint8Array(this._stashBuffer,0,this._bufferSize)),i.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength):(r=this._dispatchChunks(e,t))this._bufferSize&&(this._expandBuffer(a),i=new Uint8Array(this._stashBuffer,0,this._bufferSize)),i.set(new Uint8Array(e,r),0),this._stashUsed+=a,this._stashByteStart=t+r))):0===this._stashUsed?(i=this._dispatchChunks(e,t))this._bufferSize&&this._expandBuffer(a),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,i),0),this._stashUsed+=a,this._stashByteStart=t+i):(this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength),(r=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength,(a=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))=n[t].dts&&et[n].lastSample.originalDts&&e=t[n].lastSample.originalDts&&(n===t.length-1||nthis._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength),this._stashBuffer.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength,this._emitter.listeners(u)&&this._emitter.emit(u)}},{key:"_expandBuffer",value:function(e){this._bufferSize=e;e=this._stashBuffer.slice(0,this._stashUsed);this._stashBuffer=new Uint8Array(this._bufferSize),this._stashBuffer.set(e,0)}},{key:"_downloadFile",value:function(e){var t=e,e=(e instanceof Blob||e instanceof File||(t=new Blob([e])),window.URL.createObjectURL(t)),t=window.document.createElement("a"),e=(t.href=e,t.download=this._fileName,document.createEvent("MouseEvents"));e.initEvent("click",!0,!0),t.dispatchEvent(e)}},{key:"onReady",set:function(e){this._fileWriterReady=e}}]),l);function l(e,t){(0,i.default)(this,l),this._fileName=e,this._storageQuota=268435456,this._fileSystem=null,this._fileEntry=null,this._fileWriter=null,this._isStart=!1,this._emitter=new a.default,this._defaultBufferSize=134217728,this._bufferSize=this._defaultBufferSize,this._stashBuffer=new Uint8Array(this._bufferSize),this._stashUsed=0,this._stash(t),this._quota()}t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetails=t.ErrorTypes=void 0;var i=n(15),n=n(66),n=(n=n)&&n.__esModule?n:{default:n};t.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},t.ErrorDetails={NETWORK_EXCEPTION:i.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:i.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:i.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:i.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:n.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:n.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:n.default.CODEC_UNSUPPORTED}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSPlugin=void 0;var m=r(n(11)),p=r(n(85)),y=r(n(53)),v=r(n(54)),a=r(n(1)),i=r(n(2)),g=r(n(55)),f=n(86),s=n(262),u=n(285),d=n(286),o=n(287),l=n(288),h=n(289),c=r(n(290)),_=r(n(0)),M=r(n(10)),L=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(n(61)),S=r(n(334)),k=r(n(91)),b=r(n(39)),w=n(335);function r(e){return e&&e.__esModule?e:{default:e}}var D,T,E=4194304,Y=!1,P=null,C=[],n=(window.JSPlayM4_AdditionDataCBFun=function(t,e){var n,i,r,a,s=C.find(function(e){return e.port===t}).belongWindowpoint,o=C.find(function(e){return e.port===t}).belongWindowId,s=s.aWndList[o];s&&s.AdditionDataCB&&(o=P.HEAP32[e>>2],n=P.HEAP32[e+4>>2],i=P.HEAP32[e+8>>2],r=P.HEAP32[e+12>>2],e=P.HEAP32[e+16>>2],(a=new Uint8Array(r)).set(P.HEAPU8.subarray(e,e+r)),s.AdditionDataCB(o,n,i,a))},(0,i.default)(R,[{key:"_getOSDTime",value:function(e,t,n,i,r,a,s){var o=void 0,o="ios"===this._browserInfo._system||f.oTool.isEdge()?t+"/"+n+"/"+i+" "+r+":"+a+":"+s:t+"-"+n+"-"+i+" "+r+":"+a+":"+s;this.aWndList[e].iCurentOSDTime=new Date(o).getTime()}},{key:"_getWndIndexFromPort",value:function(e){for(var t=this.aWndList.length,n=-1,i=0;i\n \n \n \n ',d.appendChild(t)}(f);this.oJSPlugin.find("video.play-window").hide()}},{key:"_updateWnd",value:function(){for(var e=this.oJSPlugin.find(".parent-wnd").get(0),t=e.clientWidth,n=e.clientHeight,i=(t&&n&&(this.options.iWidth=t,this.options.iHeight=n),this.options.oStyle.borderWidth),r=this.options.iCurrentSplit,t=Math.floor((t-1)/r),n=Math.floor((n-1)/r),a=parseFloat((window.screen.width/window.innerWidth).toFixed(2)),s=Math.floor(t-i/a*2),o=Math.floor(n-i/a*2),u=0;ue.endPos[0]?n.aWndList[t].oPlayCtrl.PlayM4_SetDisplayRegion&&n.aWndList[t].oPlayCtrl.PlayM4_SetDisplayRegion(null,!1):n.aWndList[t].oPlayCtrl.PlayM4_SetDisplayRegion&&n.aWndList[t].oPlayCtrl.PlayM4_SetDisplayRegion({left:e.startPos[0],top:e.startPos[1],right:e.endPos[0],bottom:e.endPos[1]},!0))}):this.aWndList[t].b3DZoom&&this.oDrawCanvas.setDrawStatus(!0,function(e){n.fDrawCallback(e)}))}},{key:"_initCallbackEvent",value:function(){this.oEventCallback={loadEventHandler:function(){window.loadEventHandler&&window.loadEventHandler()},windowEventSelect:function(e){window.getSelectWndInfo&&window.getSelectWndInfo(e)},pluginErrorHandler:function(e,t,n){window.pluginEventHandler&&window.pluginEventHandler(e,t,n)},windowEventOver:function(e){window.windowEventOver&&window.windowEventOver(e)},windowEventOut:function(e){window.windowEventOut&&window.windowEventOut(e)},windowEventUp:function(e){window.windowEventUp&&window.windowEventUp(e)},windowFullCcreenChange:function(e){window.windowFullCcreenChange&&window.windowFullCcreenChange(e)},firstFrameDisplay:function(e,t,n){window.firstFrameDisplay&&window.firstFrameDisplay(e,t,n)},performanceLack:function(){window.performanceLack&&window.performanceLack()},StreamEnd:function(e){window.StreamEnd&&window.StreamEnd(e)},mouseEvent:function(){}}}},{key:"_initEvent",value:function(){var a=this;this._initCallbackEvent(),this.oJSPlugin.find(".parent-wnd").eq(0).children().each(function(i){var r=!1;(0,g.default)(this).unbind().bind("click",function(e){var t,n;0===e.button&&(t=(e=a.options.oStyle).borderWidth,n=e.border,e=e.borderSelect,a.oJSPlugin.find(".parent-wnd").eq(0).children().css("border",t+"px solid "+n),a.oJSPlugin.find(".parent-wnd").eq(0).children().eq(i).css("border",t+"px solid "+e),a.oEventCallback.windowEventSelect(parseInt(a.oJSPlugin.find(".parent-wnd").eq(0).children().eq(i).find(".play-window").eq(0).attr("wid"),10)),a._dealWndSelect(parseInt(a.oJSPlugin.find(".parent-wnd").eq(0).children().eq(i).find(".play-window").eq(0).attr("wid"),10)))}),(0,g.default)(this).bind("mouseover",function(e){a.oEventCallback.windowEventOver(i)}),(0,g.default)(this).bind("mouseout",function(e){a.oEventCallback.windowEventOut(i)}),(0,g.default)(this).bind("mousemove",function(e){var t=e.offsetX/a.oDrawCanvas.m_iCanvasWidth,e=e.offsetY/a.oDrawCanvas.m_iCanvasHeight;r?a.oEventCallback.mouseEvent(7,t,e):a.oEventCallback.mouseEvent(6,t,e)}),(0,g.default)(this).bind("mousewheel",function(e){var t=e.offsetX/a.oDrawCanvas.m_iCanvasWidth,e=e.offsetY/a.oDrawCanvas.m_iCanvasHeight;a.oEventCallback.mouseEvent(8,t,e)}),(0,g.default)(this).bind("mouseup",function(e){r=!1,a.oEventCallback.windowEventUp(i);var t=e.offsetX/a.oDrawCanvas.m_iCanvasWidth,n=e.offsetY/a.oDrawCanvas.m_iCanvasHeight;2===e.button?a.oEventCallback.mouseEvent(5,t,n):0===e.button&&a.oEventCallback.mouseEvent(3,t,n)}),(0,g.default)(this).bind("dblclick",function(e){var t;a.options.bSupporDoubleClickFull&&("desktop"===a._browserInfo.platform?a.JS_FullScreenSingle(i):a.fullscreenElement?a._triggerFullscreen(a.fullscreenElement):a.JS_FullScreenSingle(a.currentWindowIndex),t=e.offsetX/a.oDrawCanvas.m_iCanvasWidth,e=e.offsetX/a.oDrawCanvas.m_iCanvasHeight,a.oEventCallback.mouseEvent(2,t,e))})}),window.addEventListener("resize",this.e.resize),document.addEventListener("fullscreenchange",this.e.fullscreenchange)}},{key:"_eventHandlerResize",value:function(){if(!(document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||!1)&&this.fullscreenElement){var e=this.fullscreenElement;if(!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||e.webkitSupportsFullscreen||!1))return this._triggerFullscreen(e);this.fullscreenElement=null,this.oEventCallback.windowFullCcreenChange(!1)}this.JS_Resize()}},{key:"_eventHandlerFullscreenchange",value:function(){if(!(document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||!1)&&this.fullscreenElement){var e=this.fullscreenElement;if(!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||e.webkitSupportsFullscreen||!1))return this._triggerFullscreen(e);this.fullscreenElement=null,this.oEventCallback.windowFullCcreenChange(!1)}this.JS_Resize()}},{key:"_eventHandlerVisibilitychange",value:function(){this.isBrowserVisible=!document.hidden}},{key:"removeAllListeners",value:function(){window.removeEventListener("resize",this.e.resize),document.removeEventListener("fullscreenchange",this.e.fullscreenchange),document.removeEventListener("visibilitychange",this.e.visibilitychange)}},{key:"_debounse",value:function(e,t){var n=this;this._debounseTimer&&clearTimeout(this._debounseTimer),this._debounseTimer=setTimeout(function(){e.apply(n),clearTimeout(n._debounseTimer),n._debounseTimer=null},t)}},{key:"_initPlayCtrlOnlyAudio",value:function(e,t){t=new Uint8Array(t);t[10]=0,t[11]=0,this.aWndList[e].oPlayCtrl.PlayM4_OpenStream(t,40,2097152),""!==this.aWndList[e].szSecretKey&&(this.aWndList[e].oPlayCtrl.PlayM4_SetSecretKey(1,this.aWndList[e].szSecretKey,128),this.aWndList[e].szSecretKey=""),this.aWndList[e].oPlayCtrl.PlayM4_SetStreamOpenMode(0),this.aWndList[e].oPlayCtrl.PlayM4_Play(null)}},{key:"flvtohikHead",value:function(e){var t=new Uint8Array(40),e=(t[0]=73,t[1]=77,t[2]=75,t[3]=72,t[4]=3,t[5]=1,t[6]=0,t[7]=0,t[8]=10,t[9]=0,t[10]=0,t[11]=1,t[12]=1,t[13]=32,t[14]=1,t[15]=12,this.aWndList[e]._videoInfo.audioSampleRate.toString(16));return t[16]=parseInt(e[2]+e[3],16),t[17]=parseInt(e[0]+e[1],16),t}},{key:"_changeHVAGHead",value:function(e){var t=new Uint8Array(40);return t[0]=73,t[1]=77,t[2]=75,t[3]=72,t[4]=3,t[5]=1,t[6]=0,t[7]=0,192===e[8]&&0===e[9]?t[8]=4:t[8]=2,t[9]=0,100===e[24]&&97===e[25]&&104===e[26]&&117===e[27]&&97===e[28]&&(t[8]=1,t[9]=128),0!==e[11]&&1!==e[11]||192!==e[10]?2===e[11]&&192===e[10]?t[10]=3:3===e[11]&&192===e[10]?t[10]=5:4===e[11]&&192===e[10]?t[10]=4:5===e[11]&&192===e[10]?t[10]=2:6===e[11]&&192===e[10]?t[10]=6:t[10]=1:t[10]=1,t[11]=0,1===e[13]&&192===e[12]?(t[12]=16,t[13]=113):2===e[13]&&192===e[12]?(t[12]=17,t[13]=113):3===e[13]&&192===e[12]?(t[12]=33,t[13]=114):4===e[13]&&192===e[12]?(t[12]=96,t[13]=114):5===e[13]&&192===e[12]?(t[12]=1,t[13]=32):6===e[13]&&192===e[12]?(t[12]=0,t[13]=32):7===e[13]&&192===e[12]?(t[12]=0,t[13]=112):(t[12]=16,t[13]=113),t}},{key:"_parseHead",value:function(e,t){1===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="HIK":2===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="PS":4===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="RTP":8===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="GB":16===t[8]&&0===t[9]?this.aWndList[e]._videoInfo.systemFormt="RAW":1===t[8]&&128===t[9]?this.aWndList[e]._videoInfo.systemFormt="DAHUA":this.aWndList[e]._videoInfo.systemFormt="unkonw",1===t[11]&&0===t[10]||0===t[11]&&1===t[10]?(this.aWndList[e]._videoInfo.VideType="H264",129===t[24]&&(this.aWndList[e]._videoInfo.VideType="Smart264")):0===t[11]&&5===t[10]?(this.aWndList[e]._videoInfo.VideType="H265",129===t[24]&&(this.aWndList[e]._videoInfo.VideType="Smart265")):0===t[11]&&6===t[10]?this.aWndList[e]._videoInfo.VideType="SAC":0===t[11]&&2===t[10]?this.aWndList[e]._videoInfo.VideType="MPEG2":0===t[11]&&3===t[10]?this.aWndList[e]._videoInfo.VideType="MPEG4":this.aWndList[e]._videoInfo.VideType="unkonw",113===t[13]&&16===t[12]?this.aWndList[e]._videoInfo.audioType="G711_U":113===t[13]&&17===t[12]?this.aWndList[e]._videoInfo.audioType="G711_A":114===t[13]&&33===t[12]?this.aWndList[e]._videoInfo.audioType="G7221":114===t[13]&&96===t[12]?this.aWndList[e]._videoInfo.audioType="G726_32":114===t[13]&&98===t[12]?this.aWndList[e]._videoInfo.audioType="G726_16":114===t[13]&&144===t[12]?this.aWndList[e]._videoInfo.audioType="G729":32===t[13]&&1===t[12]?this.aWndList[e]._videoInfo.audioType="AAC":16===t[13]&&0===t[12]?this.aWndList[e]._videoInfo.audioType="ADPCM":32===t[13]&&0===t[12]?this.aWndList[e]._videoInfo.audioType="MP2L2":0===t[13]&&0===t[12]?this.aWndList[e]._videoInfo.audioType="without":this.aWndList[e]._videoInfo.audioType="unknow"}},{key:"_stripRtpHead",value:function(e){var e=new Uint8Array(e),t=32&e[0],n=16&e[0],i=15&e[0],r=0,a=0;return 32==t&&(r=e[e.byteLength-1]),t=4*parseInt(i,10),16==n&&(a=4*new window.DataView(e.buffer,12+t,4).getUint16(2)+4),e.length<=12+t+a?-1:e.slice(12+t+a,e.length-r)}},{key:"_openStream",value:function(i,a,s,o,u){var d=this,l=this.aWndList[s];return new m.default(function(t,r){var n,e=o&&u;l.szPlayType=e?"playback":"realplay",3===a.PlayBackMode&&e&&(l.szPlayType="reverse"),l._emiter.on("firstframeload",function(){l.asyncLock=!1,t()},{once:!0}),d.oStreamClient.openStream(i,a,(n=(0,v.default)(y.default.mark(function e(t){var n,i;return y.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.bHead){e.next=49;break}if(l.oSdpInfo=t,n=l.aHead=new Uint8Array(t.buf),d._log.I("headData arrive",n),l.isGB=0===n[7]&&196===n[8]&&100===n[24]&&98===n[25]&&51===n[26]&&51===n[27],72===n[0]&&86===n[1]&&65===n[2]&&71===n[3]?(l.isHVAGHead=!0,l.aHVAGHead=new Uint8Array(t.buf),l.aHead=d._changeHVAGHead(t.buf)):l.isHVAGHead=!1,l.isHVAGHead&&1===l.aHead[8]&&128===l.aHead[9]&&"1"===d._decoderVersion)return d._log.E(L.ERR_STREAM_VIDEO_CODING+": jsdecoder1.0 unsupport dahua video"),l.asyncLock=!1,d._closeStreamAndDestory(s),d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_VIDEO_CODING),e.abrupt("return",r(L.ERR_STREAM_VIDEO_CODING));e.next=12;break;case 12:if(!(70===n[0]&&76===n[1]&&86===n[2])){e.next=19;break}l.iMode=1,l.isFlv=!0,d._createFlvPlayer(s),e.next=47;break;case 19:if(!(5===l.aHead[10]&&0===l.aHead[11]||1===l.aHead[10]&&0===l.aHead[11]||0===l.aHead[10]&&1===l.aHead[11])){e.next=22;break}e.next=24;break;case 22:return d._log.E(L.ERR_STREAM_JSDECODER_CODEC_UNSUPPORTED+": the stream not h264 h265 smart,unsupport .",l.aHead[10],l.aHead[11]),e.abrupt("return",r(L.ERR_STREAM_JSDECODER_CODEC_UNSUPPORTED));case 24:if(d._parseHead(s,l.aHead),d.aWndList[s]._bpsCalculator||(d.aWndList[s]._bpsCalculator=window.setInterval(d._calculateRealtimeBitrate.bind(d),1e3,s)),i=1,d.aWndList[s].asyncLock&&"2"===d._decoderVersion)return d._log.E(L.ERR_STREAM_LOCK_ERROR+": Multiple call js_play API in a short time, please wait lasttime call over."),e.abrupt("return",r(L.ERR_STREAM_LOCK_ERROR));e.next=30;break;case 30:if(d.aWndList[s].asyncLock=!0,l.oPlayCtrl){e.next=45;break}if(P||"2"!==d._decoderVersion){e.next=42;break}return e.prev=33,e.next=36,d._decoder2Loaded();case 36:i=e.sent,e.next=42;break;case 39:e.prev=39,e.t0=e.catch(33),1===e.t0||P||(l.asyncLock=!1,d.oEventCallback.pluginErrorHandler(s,L.ERR_COM_LOAD_JSDECODER_ERROR),d._closeStreamAndDestory(s),d._log.E(L.ERR_COM_LOAD_JSDECODER_ERROR+": load jsdecoder faild."),r(L.ERR_COM_LOAD_JSDECODER_ERROR));case 42:d._createPlayCtrl(s),e.next=47;break;case 45:1!==(i=d._playCtrlLoad(s))&&(l.asyncLock=!1,d._closeStreamAndDestory(s),d.oEventCallback.pluginErrorHandler(s,i),d._log.E(i+": jsdecoder open stream faild."),r(i));case 47:e.next=50;break;case 49:t.cmd&&"end"===t.cmd?(d.oEventCallback.StreamEnd(s),l.asyncLock=!1,d.JS_Stop(s)):"1"!==d._decoderVersion&&!l.bPlay||d._feedData(s,t);case 50:case"end":return e.stop()}},e,d,[[33,39]])})),function(e){return n.apply(this,arguments)}),function(e){if(l.asyncLock=!1,d.aWndList[s].bPlay)1e3===e.code||1005===e.code?(d._log.E(L.ERR_STREAM_CONNECT_CLOSED+": 送流异常,被后端关闭连接"),d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_CONNECT_CLOSED,e)):(d._log.E(L.ERR_STREAM_INTERRUPT+": 流中断"),d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_INTERRUPT,e)),l.szStreamUUID="",d._closeStreamAndDestory(s);else{if(1e3===e.code||1005===e.code)return t();d.aWndList[s].szStreamUUID?(d.oEventCallback.pluginErrorHandler(s,L.ERR_COM_RECV_STREAM_TIMEOUT,e),l.szStreamUUID="",r(L.ERR_COM_RECV_STREAM_TIMEOUT)):1006===e.code&&-1!==i.search("wss://")?(d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_WSS_ERROR,e),r(L.ERR_STREAM_WSS_ERROR)):(d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_WS_ERROR,e),r(L.ERR_STREAM_WS_ERROR))}}).then(function(e){d.aWndList[s].szStreamUUID&&(d.oStreamClient.stop(d.aWndList[s].szStreamUUID),d.aWndList[s].szStreamUUID=""),d.aWndList[s].szStreamUUID=e,d.oStreamClient&&d.oStreamClient.startPlay(e,o,u,l.szPlayType).then(function(){},function(e){l.szStreamUUID="",l.asyncLock=!1;var t="0x0"+e.errorCode.toString(16);l.bPlay||(d._log.E(t+": 取流失败,详情根据错误码在运管后台进行查询."),d.oEventCallback.pluginErrorHandler(s,t,e),r(t)),r(L.ERR_STREAM_OPEN_FAILED)})}).catch(function(e){l.asyncLock=!1,d.oEventCallback.pluginErrorHandler(s,L.ERR_STREAM_WS_TIMEOUT,e),d._closeStreamAndDestory(s),r(L.ERR_STREAM_WS_TIMEOUT)})})}},{key:"JS_GetPluginVersion",value:function(){var t=this;return new m.default(function(e){e(t.szPluginVersion)})}},{key:"JS_SetWindowControlCallback",value:function(t){var n=this;return new m.default(function(e){n.oEventCallback=g.default.extend(n.oEventCallback,t),e()})}},{key:"JS_SetSecretKey",value:function(n,i){var r=this;return new m.default(function(e,t){n<0||""===i||void 0===i?t():(r.aWndList[n].szSecretKey=i,e())})}},{key:"JS_ArrangeWindow",value:function(i){var r=this;return new m.default(function(e,t){if(i<1||"number"!=typeof i)return t(L.ERR_COM_PARAM);if(ithis.iMaxWndNum-1||"number"!=typeof s)&&(s=this.iCurrentWndIndex),new m.default(function(e,t){if("string"!=typeof r||-1===r.search("wss://")&&-1===r.search("ws://"))return t(L.ERR_COM_URL_ERROR);var n=0,i=(a.mode&&(n=a.mode),r),i=(1!==n&&o._supportInfo.MSE&&(i=/\?/g.test(r)?r+"&streamform=flv":r+"?streamform=flv"),o.aWndList[s].bopenTraceId&&(-1!==i.search("traceId=")&&0a.iMaxWndNum-1||"number"!=typeof r)&&(r=a.iCurrentWndIndex),"string"!=typeof s||"string"!=typeof o)return n(L.ERR_COM_PARAM);var e=s,i=o;if(-1!==s.search("Z")&&(e=e.replace("Z","+08:00")),-1!==o.search("Z")&&(i=i.replace("Z","+08:00")),e=new Date(e).getTime(),i=new Date(i).getTime(),!e||!i||i<=e||-1===s.search("T")||-1===s.search(":")||-1===s.search("-")||-1===o.search("T")||-1===o.search(":")||-1===o.search("-"))return n(L.ERR_COM_PARAM);i=a._checkPlayback(r);0!==i?n(i):a.oStreamClient.seek(a.aWndList[r].szStreamUUID,s,o).then(function(){var e=s;e&&-1!==e.search("Z")&&(e=e.replace("Z","+08:00")),a.aWndList[r].iGlobalBaseTime=new Date(e).getTime()-a.aWndList[r]._osdtimeInfo.flvduration,!0===a.aWndList[r].isPause&&(1===a.aWndList[r].iMode?(e=a.oJSPlugin.find("video.play-window").eq(r)).get(0).play&&e.get(0).play():a.aWndList[r].oPlayCtrl&&a.aWndList[r].oPlayCtrl.PlayM4_Pause(!1),a.aWndList[r].isPause=!1),t()},function(e){e="0x0"+e.errorCode.toString(16);a._log.E(e+": 定位失败,可能是定位传的时间异常导致,详情根据错误码在运管后台进行查询."),n(e)})})}},{key:"JS_GetSdkVersion",value:function(){return this.aWndList[0].oPlayCtrl.PlayM4_GetSdkVersion()}},{key:"JS_DestroyWorker",value:function(){var t=this;return new m.default(function(e){t.aWndList.forEach(function(e){e.oPlayCtrl=null}),e()})}},{key:"JS_Destroy",value:function(){var t=this;return new m.default(function(e){t.JS_StopRealPlayAll(),t.oStreamClient.stopAll(),t.oStreamClient=null,e()})}},{key:"JS_Stop",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.aWndList[i].asyncLock&&"2"===n._decoderVersion)return n._log.E(L.ERR_STREAM_LOCK_ERROR+": Multiple call js_stop API in a short time, please wait lasttime call over."),t(L.ERR_STREAM_LOCK_ERROR);n.aWndList[i]._bpsCalculator&&(self.clearInterval(n.aWndList[i]._bpsCalculator),n.aWndList[i]._bpsCalculator=null,n.aWndList[i]._bpsInfo={lastVideoBytes:0,bps_video:0,data_updated_time:0,time_gap_factor:1}),n.aWndList[i].szStorageUUID&&n.JS_StopSave(i),n.aWndList[i].bEZoom&&n.JS_DisableZoom(i),i===n.iCurrentSoundWnd&&(n.JS_CloseSound(),n.aWndList[i].MSEVolume=.5),n._closeStreamAndDestory(i),n.aWndList[i].isPause=!1,n.aWndList[i].bFirstFrame=!1,n.aWndList[i]._emiter.removeAllListeners(),n.aWndList[i]._resetFlvplayer=!1,e()})}},{key:"JS_Pause",value:function(){var i=this,r=0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var e=i._checkPlayback(r);if(0!==e)n(e);else{if(!i.aWndList[r].bFrameForward)return!0===i.aWndList[r].isPause?t():void i.oStreamClient.pause(i.aWndList[r].szStreamUUID).then(function(){var e;1===i.aWndList[r].iMode?(e=i.oJSPlugin.find("video.play-window").eq(r)).get(0).pause&&e.get(0).pause():i.aWndList[r].oPlayCtrl.PlayM4_Pause&&i.aWndList[r].oPlayCtrl.PlayM4_Pause(!0),i.aWndList[r].isPause=!0,t()},function(e){n(e)});i._log.E(L.ERR_PLAYBACK_FRAMEFORWARD+": status singleFrame not support this handle."),n(L.ERR_PLAYBACK_FRAMEFORWARD)}})}},{key:"JS_Resume",value:function(){var i=this,r=0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var e=i._checkPlay(r);return 0!==e?n(e):(i.aWndList[r].bFrameForward&&("2"===i._decoderVersion?i.aWndList[r].oPlayCtrl.PlayM4_OneByOne_Play&&i.aWndList[r].oPlayCtrl.PlayM4_OneByOne_Play():i.aWndList[r].oPlayCtrl.PlayM4_Play(i.options.szId+"_playCanvas"+r),i.aWndList[r].bFrameForward=!1),!1===i.aWndList[r].isPause?t():void i.oStreamClient.resume(i.aWndList[r].szStreamUUID).then(function(){var e;1===i.aWndList[r].iMode?(e=i.oJSPlugin.find("video.play-window").eq(r)).get(0).play&&e.get(0).play():(1!==i.iCurrentPlayRate&&(i.aWndList[r].iRate=i.iCurrentPlayRate,i.oStreamClient.setPlayRate(i.aWndList[r].szStreamUUID,i.aWndList[r].iRate),i.aWndList[r].oPlayCtrl.PlayM4_PlayRate&&i.aWndList[r].oPlayCtrl.PlayM4_PlayRate(i.aWndList[r].iRate),1i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var e=i._checkPlayback(r);return 0!==e?n(e):i.aWndList[r].bFrameForward?(i._log.E(L.ERR_PLAYBACK_FRAMEFORWARD+": status singleFrame not support this handle."),n(L.ERR_PLAYBACK_FRAMEFORWARD)):void(-8===i.aWndList[r].iRate?(i._log.E(L.ERR_PLAYBACK_MIN_RATE+": current rate is the min."),n(L.ERR_PLAYBACK_MIN_RATE)):(i.aWndList[r].iRate<0&&-8this.iMaxWndNum-1||"number"!=typeof r)&&(r=this.iCurrentWndIndex),new m.default(function(t,n){var e=i._checkPlayback(r);return 0!==e?n(e):i.aWndList[r].bFrameForward?(i._log.E(L.ERR_PLAYBACK_FRAMEFORWARD+": status singleFrame not support this handle."),n(L.ERR_PLAYBACK_FRAMEFORWARD)):8===i.aWndList[r].iRate?(i._log.E(L.ERR_PLAYBACK_MAX_RATE+": current rate is the max."),n(L.ERR_PLAYBACK_MAX_RATE)):(-2===i.aWndList[r].iRate?i.aWndList[r].iRate=1:i.aWndList[r].iRate<-2?i.aWndList[r].iRate/=2:0e.iMaxWndNum-1||"number"!=typeof i)&&(i=e.iCurrentWndIndex),e.aWndList[i].szStreamUUID?e.oStreamClient.transmission(e.aWndList[i].szStreamUUID,r).then(function(e){t(e)},function(e){n(e)}):n()})}},{key:"JS_FrameForward",value:function(){var i=this,r=0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var n=i._checkPlayback(r);return 0!==n?t(n):1===i.aWndList[r].iMode?(i._log.E(L.ERR_COM_IS_MSE+": MSE unsupport this function."),t(L.ERR_COM_IS_MSE)):(1!==i.aWndList[r].iRate?(i.aWndList[r].iRate=1,i.iCurrentPlayRate=i.aWndList[r].iRate,i.oStreamClient.setPlayRate(i.aWndList[r].szStreamUUID,i.aWndList[r].iRate).then(function(){i.aWndList[r].oPlayCtrl.PlayM4_PlayRate&&i.aWndList[r].oPlayCtrl.PlayM4_PlayRate(i.aWndList[r].iRate),i.aWndList[r].oPlayCtrl.PlayM4_SetDecodeFrameType&&i.aWndList[r].oPlayCtrl.PlayM4_SetDecodeFrameType(0),i.aWndList[r].oPlayCtrl.PlayM4_OneByOne&&i.aWndList[r].oPlayCtrl.PlayM4_OneByOne(a),i.aWndList[r].bFrameForward=!0},function(e){t(e)})):(i.aWndList[r].oPlayCtrl.PlayM4_SetDecodeFrameType&&i.aWndList[r].oPlayCtrl.PlayM4_SetDecodeFrameType(0),i.aWndList[r].oPlayCtrl.PlayM4_OneByOne&&i.aWndList[r].oPlayCtrl.PlayM4_OneByOne(a),i.aWndList[r].bFrameForward=!0),void e())})}},{key:"JS_GetOSDTime",value:function(){var i=this,r=0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var t=i._checkPlay(r);0!==t?e(t):1===i.aWndList[r].iMode?(i.oJSPlugin.find("video.play-window").eq(r).get(0),n(i.aWndList[r].iCurentOSDTime)):"1"===i._decoderVersion?i.aWndList[r].oPlayCtrl.PlayM4_GetOSDTime&&i.aWndList[r].oPlayCtrl.PlayM4_GetOSDTime(function(e){var t="ios"===i._browserInfo._system||f.oTool.isEdge()?"/":" ",e=Date.parse(e.replace(/-/g,t));n(e)}):(i.aWndList[r].oPlayCtrl.PlayM4_GetFrameInfo&&i.aWndList[r].oPlayCtrl.PlayM4_GetFrameInfo(function(e){i.aWndList[r].oPlayCtrl.iYUVWidth=e.width,i.aWndList[r].oPlayCtrl.iYUVHeight=e.height,i._getOSDTime(r,e.year,e.month,e.day,e.hour,e.minute,e.second),i.aWndList[r]._videoInfo.height=e.height,i.aWndList[r]._videoInfo.width=e.width,i.aWndList[r]._videoInfo.frameRate=e.frameRate}),n(i.aWndList[r].iCurentOSDTime))})}},{key:"JS_SetNormalDecoderAudio",value:function(){var t=this,n=0t.iMaxWndNum-1||"number"!=typeof n)&&(n=t.iCurrentWndIndex),t.aWndList[n].mseDecoderAudio=i,e()})}},{key:"JS_OpenSound",value:function(){var i=this,r=0this.iMaxWndNum-1||"number"!=typeof r)&&(r=this.iCurrentWndIndex),new m.default(function(e,t){var n=i._checkPlay(r);if(0!==n)return t(n);if(!i.aWndList[r].bFirstFrame)return t(L.ERR_COM_OPENSOUND_ERROR);n=i.iCurrentSoundWnd;if(n===r)e();else{if(-1!==n&&(1===i.aWndList[n].iMode?i.oJSPlugin.find("video.play-window").eq(n)[0].muted=!0:i.aWndList[n].oPlayCtrl.PlayM4_StopSound&&i.aWndList[n].oPlayCtrl.PlayM4_StopSound()),1===i.aWndList[r].iMode){if("AAC"!==i.aWndList[r]._videoInfo.audioType)return t(L.ERR_STREAM_SOUND_NOTHAS);i.aWndList[r].mseDecoderAudio||(i.aWndList[r].bOpenSound=!0,i._streamReset(r));n=i.oJSPlugin.find("video.play-window").eq(r)[0];n.volume=i.aWndList[r].MSEVolume,n.muted=!1,n.paused&&n.play()}else if(i.aWndList[r].oPlayCtrl.PlayM4_PlaySound&&1!==i.aWndList[r].oPlayCtrl.PlayM4_PlaySound(r))return void t(L.ERR_JSDECODER+i.aWndList[r].oPlayCtrl.PlayM4_GetLastError().toString());i.iCurrentSoundWnd=r,i.aWndList[r].bOpenSound=!0,e()}})}},{key:"JS_GetVolume",value:function(){var t,i=this;return new m.default(function(n,e){if(-1===i.iCurrentSoundWnd)return e(L.ERR_COM_SETORGET_VOLUME_ERROR);t=i.iCurrentSoundWnd,1===i.aWndList[t].iMode?(e=100*i.oJSPlugin.find("video.play-window").eq(t).get(0).volume,n(e)):i.aWndList[t].oPlayCtrl.PlayM4_GetVolume&&i.aWndList[t].oPlayCtrl.PlayM4_GetVolume(function(e){var t=e;"2"===i._decoderVersion&&(t=Math.ceil(e/655)),n(t)})})}},{key:"JS_SetVolume",value:function(){var i,r=this,a=arguments[1];return new m.default(function(e,t){if(-1===r.iCurrentSoundWnd)return t(L.ERR_COM_SETORGET_VOLUME_ERROR);if(i=r.iCurrentSoundWnd,a<1||100r.iMaxWndNum-1?e():0!==(n=r._checkPlay(i))?t(n):(1===r.aWndList[i].iMode?r.oJSPlugin.find("video.play-window").eq(i)[0].muted=!0:r.aWndList[i].oPlayCtrl.PlayM4_StopSound&&1!==r.aWndList[i].oPlayCtrl.PlayM4_StopSound()&&t(L.ERR_JSDECODER+r.aWndList[i].oPlayCtrl.PlayM4_GetLastError().toString()),r.iCurrentSoundWnd=-1,r.aWndList[i].bOpenSound=!1,e())})}},{key:"JS_EnableZoom",value:function(){var i=this,r=0this.iMaxWndNum-1||"number"!=typeof r)&&(r=this.iCurrentWndIndex),new m.default(function(e,t){var n=i._checkPlay(r);return 0!==n?t(n):1===i.aWndList[r].iMode?(i._log.E(L.ERR_COM_IS_MSE+": MSE unsupport this function."),t(L.ERR_COM_IS_MSE)):(i.oJSPlugin.find(".draw-window").unbind(),i.oDrawCanvas=new h.ESCanvas(i.options.szId+"_canvas_draw"+r),i.oDrawCanvas.setShapeType("Rect"),i.oDrawCanvas.setDrawStyle("#ff0000","",0),i.oDrawCanvas.setDrawStatus(!0,function(e){e.startPos&&e.endPos&&(e.startPos[0]>e.endPos[0]?i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion&&i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion(null,!1):i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion&&i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion({left:e.startPos[0],top:e.startPos[1],right:e.endPos[0],bottom:e.endPos[1]},!0))}),i.aWndList[r].bEZoom=!0,void e())})}},{key:"JS_DisableZoom",value:function(){var i=this,r=0this.iMaxWndNum-1||"number"!=typeof r)&&(r=this.iCurrentWndIndex),new m.default(function(e,t){var n=i._checkPlay(r);return 0!==n?t(n):1===i.aWndList[r].iMode?(i._log.E(L.ERR_COM_IS_MSE+": MSE unsupport this function."),t(L.ERR_COM_IS_MSE)):(i.oDrawCanvas.setDrawStatus(!1),i.oDrawCanvas.clearAllShape(),void(i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion&&1!==i.aWndList[r].oPlayCtrl.PlayM4_SetDisplayRegion(null,!1)?t(L.ERR_JSDECODER+i.aWndList[r].oPlayCtrl.PlayM4_GetLastError().toString()):(i.aWndList[r].bEZoom=!1,e())))})}},{key:"JS_Enable3DZoom",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.aWndList[i].bPlay?(n.oJSPlugin.find(".draw-window").unbind(),n.fDrawCallback=r,n.oDrawCanvas=new h.ESCanvas("canvas_draw"+i),n.oDrawCanvas.setShapeType("Rect"),n.oDrawCanvas.setDrawStyle("#ff0000","",0),n.oDrawCanvas.setDrawStatus(!0,function(e){r(e)}),n.aWndList[i].b3DZoom=!0,e()):t()})}},{key:"JS_Disable3DZoom",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.aWndList[i].bPlay?(n.oDrawCanvas.setDrawStatus(!1),n.aWndList[i].b3DZoom=!1,e()):t()})}},{key:"JS_CapturePicture",value:(T=(0,v.default)(y.default.mark(function e(){var d=0h.iMaxWndNum-1||"number"!=typeof d)&&(d=h.iCurrentWndIndex),0!==(a=h._checkPlay(d)))return n(a),e.abrupt("return");e.next=5;break;case 5:if(h.aWndList[d].bFirstFrame){e.next=7;break}return e.abrupt("return",n(L.ERR_CAPTURE_NO_PREPARED));case 7:if(c="JPEG",i=null,1!==(r=h.aWndList[d]).iMode){e.next=21;break}a=h.oJSPlugin.find("video.play-window").eq(d).get(0),s=a.videoWidth,o=a.videoHeight,(u=document.createElement("canvas")).width=s,u.height=o,u.getContext("2d").drawImage(a,0,0,s,o),i=u.toDataURL("image/"+c),e.next=24;break;case 21:return e.next=23,h._jsdecoderCapture(r,c);case 23:i=e.sent;case 24:if(_)return _(i),t(),e.abrupt("return");e.next=28;break;case 28:(s=i.split(";").shift().split("/").pop())!==c.toLowerCase()&&console.warn("Current Browser is not support to capture '"+c+"' image type, auto capture '"+s.toUpperCase()+"' image."),(o=document.createEvent("MouseEvents")).initEvent("click",!1,!1),(u=document.createElement("a")).href=Blob?URL.createObjectURL(f.oTool.dataURLtoBlob(i)):i,u.download=l+"."+s,u.dispatchEvent(o),t();case 37:case"end":return e.stop()}},e,h)}));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(){return T.apply(this,arguments)})},{key:"_jsdecoderCapture",value:function(t,o){var u=this;return new m.default(function(a,s){function e(e){if(6===e)return u._log.E(L.ERR_CAPTURE_RAM+": capture failed, memory not enough."),s(L.ERR_CAPTURE_RAM);for(var t="",n=e.byteLength,i=0;ii.iMaxWndNum-1||"number"!=typeof n)&&(n=i.iCurrentWndIndex),i.JS_StartSaveEx(n,r,2,a).then(function(){e()},function(e){t(e)})})}},{key:"JS_StartSaveEx",value:function(){var s=0u.iMaxWndNum-1||"number"!=typeof s)&&(s=u.iCurrentWndIndex),2!==d&&5!==d?e(L.ERR_PLAY_FILESYS_NOT_SUPPORT_DSTTYPE):null===o?e(L.ERR_PLAY_FILESYS_FILENAME_ISNULL):(n=1,i=null,l&&(n=l.irecordType,i=l.cbStreamCB),0!==(r=u._checkPlay(s))?e(r):u.aWndList[s].szStorageUUID?e(L.ERR_PLAY_FILESYS_ALREADY_WRITING):(o.indexOf(".mp4")<0&&(o+=".mp4"),r=u.aWndList[s].aHead,a=0,"realplay"!==u.aWndList[s].szPlayType&&(a=1),u.aWndList[s].isFlv&&(r=u.flvtohikHead(s)),(5===d&&33===r[12]&&114===r[13]||98===r[12]&&114===r[13]||0===r[12]&&32===r[13])&&(r[12]=0,r[13]=0),129===r[24]&&(d=1),u.oStorageManager.startRecord(o,r,d,a,{cbEventHandler:function(e){u._closeStreamAndDestory(s),u.oEventCallback.pluginErrorHandler(s,e)},irecordType:n,cbStreamCB:i}).then(function(e){u.aWndList[s].szStorageUUID=e,u.aWndList[s].isFlv&&u.aWndList[s].oMSE.setRecordFlag(!0),t()},function(){e()})))})}},{key:"JS_StopSave",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.aWndList[i].szStorageUUID?(n.aWndList[i].isFlv&&n.aWndList[i].oMSE.setRecordFlag(!1),n.oStorageManager.stopRecord(n.aWndList[i].szStorageUUID).then(function(){n.aWndList[i].szStorageUUID="",e()},function(e){t(e)})):t(L.ERR_PLAY_FILESYS_NOT_WRITING)})}},{key:"JS_SetDrawStatus",value:function(n){var i=this;return new m.default(function(e,t){i.oDrawCanvas?(i.oDrawCanvas.setDrawStatus(n),e()):t()})}},{key:"JS_ClearRegion",value:function(){var n=this;return new m.default(function(e,t){n.oDrawCanvas?(n.oDrawCanvas.clearAllShape(),e()):t()})}},{key:"JS_SetGridInfo",value:function(n){var i=this;return new m.default(function(e){if(null==n)return-1;var t="#ff0000";n.drawColor&&(t=n.drawColor),i.oDrawCanvas.setDrawStyle(t),i.oDrawCanvas.setShapesInfoByType("Grid",[{szGridMap:n.gridMap,iGridColNum:n.gridColNum,iGridRowNum:n.gridRowNum}]),e()})}},{key:"JS_GetGridInfo",value:function(){var e,t=null;return t=this.oDrawCanvas?(e=this.oDrawCanvas.getShapesInfoByType("Grid")[0])?{gridColNum:e.iGridColNum,gridRowNum:e.iGridRowNum,gridMap:e.szGridMap}:{iGridRowNum:18,iGridColNum:22,szGridMap:""}:{},m.default.resolve(t)}},{key:"JS_SetDrawShapeInfo",value:function(n,i){var r=this;return new m.default(function(e,t){void 0===n||""===n?t():(r.oDrawCanvas.setShapeType(n),r.oDrawCanvas.setDrawStyle(i.szDrawColor||"",i.szFillColor||"",i.iTranslucent||0),i.iMaxShapeSupport&&0this.iMaxWndNum-1||"number"!=typeof e)&&(e=this.iCurrentWndIndex),this.aWndList[e]);if(!t.bPlay)return m.default.reject("window "+e+" is not playing.");var n=null,n=("desktop"===this._browserInfo.platform||"ios"===this._browserInfo.system?this.oJSPlugin.find(".sub-wnd"):1===t.iMode?this.oJSPlugin.find(".sub-wnd video.play-window"):this.oJSPlugin.find(".sub-wnd canvas.play-window")).get(e);return this._triggerFullscreen(n)}},{key:"_triggerFullscreen",value:function(a,e){var n,s=this,o=document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||a.webkitSupportsFullscreen||!1,u=document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||a.webkitDisplayingFullscreen||!1;return a.requestFullscreen=a.requestFullscreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitEnterFullScreen||null,document.exitFullscreen=document.exitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen||null,new m.default((n=(0,v.default)(y.default.mark(function e(t,n){var i,r;return y.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=13;break}if(u&&s.fullscreenElement===a)return document.exitFullscreen?document.exitFullscreen():a.webkitExitFullScreen(),s.fullscreenElement=null,s.JS_Resize(),s.oEventCallback.windowFullCcreenChange(!1),e.abrupt("return",t());e.next=7;break;case 7:return e.next=9,a.requestFullscreen();case 9:return s.fullscreenElement=a,s.JS_Resize(),s.oEventCallback.windowFullCcreenChange(!0),e.abrupt("return",t());case 13:return s.fullscreenElement?(document.body.style.setProperty("overflow","unset"),i=s.oJSPlugin.width(),r=s.oJSPlugin.height(),(0,g.default)(a).css("width",i).css("height",r).css("z-index","").css("position","relative").css("transform","").css("transform-origin","").css("top","").css("left",""),s.fullscreenElement=null,s.JS_Resize(),s.oEventCallback.windowFullCcreenChange(!1)):(i=document.body.clientWidth,r=document.body.clientHeight,s.options.openDebug&&console.log("iphone fullscreen: body, window",i,r,window.screen.width,window.screen.height),ii.iMaxWndNum-1||"number"!=typeof n)return t(L.ERR_COM_PARAM);i.oJSPlugin.find(".sub-wnd").get(n).click(),e()})}},{key:"JS_SetOptions",value:function(t){var n=this;return new m.default(function(e){!1===t.bSupportSound&&(n.options.bSupportSound=t.bSupportSound),!1===t.bSupporDoubleClickFull&&(n.options.bSupporDoubleClickFull=t.bSupporDoubleClickFull),!0===t.bOnlySupportMSE&&(n.options.bOnlySupportMSE=t.bOnlySupportMSE),!0===t.bOnlySupportJSDecoder&&(n.options.bOnlySupportJSDecoder=t.bOnlySupportJSDecoder),e()})}},{key:"JS_SetLogFlag",value:function(n){var i=this;return new m.default(function(e){for(var t=0;tr.iMaxWndNum-1||"number"!=typeof a)&&(a=r.iCurrentWndIndex),"boolean"!=typeof s)return t(L.ERR_COM_PARAM);var n=r.aWndList[a],i=r._checkPlay(a);if(0!==i)return t(i);if(0!==n.iMode||"2"!==r._decoderVersion)return t(L.ERR_STREAM_INTEL_UNSUPPORT);[{typeCode:"0x00000001",desc:"智能分析(默认开)",children:[]},{typeCode:"0x00000002",desc:"移动侦测(默认开)",children:[]},{typeCode:"0x00000004",desc:"pos 信息叠加(默认关)",children:[]},{typeCode:"0x00000008",desc:"图片叠加(默认关)",children:[]},{typeCode:"0x00000010",desc:"火点信息(默认开)",children:[{typeCode:"0x00000001",desc:"火点框显示"},{typeCode:"0x00000002",desc:"火点最高温显示"},{typeCode:"0x00000004",desc:"最高温位置显示"},{typeCode:"0x00000008",desc:"最高温度距离"}]},{typeCode:"0x00000020",desc:"温度信息(默认关)",children:[{typeCode:"0x00000001",desc:"框测温"},{typeCode:"0x00000002",desc:"线测温"},{typeCode:"0x00000004",desc:"点测温"}]},{typeCode:"0x00000040",desc:"轨迹信息(默认关)",children:[{typeCode:"0x00000001",desc:"人的轨迹信息"},{typeCode:"0x00000002",desc:"车的轨迹信息"}]},{typeCode:"0x00000080",desc:"烟火屏蔽和废气监测(默认关)",children:[{typeCode:"0x00000001",desc:"烟火屏蔽"},{typeCode:"0x00000002",desc:"规则废气检测"},{typeCode:"0x00000004",desc:"目标废气检测"}]}].forEach(function(t){1===n.oPlayCtrl.PlayM4_RenderPrivateData(t.typeCode,s)?s&&t.children&&0this.iMaxWndNum-1?(this._log.E(L.ERR_COM_PARAM+": unexpected window index."),L.ERR_COM_PARAM):this.aWndList[e].bPlay?0:(this._log.E(L.ERR_COM_NOT_PLAYING+": this window is not playing."),L.ERR_COM_NOT_PLAYING)}},{key:"_checkPlayback",value:function(e){var t=this._checkPlay(e);return 0===t&&"realplay"===this.aWndList[e].szPlayType&&(this._log.E(L.ERR_COM_NOT_PLAYBACK+": this function was only supported by playback."),t=L.ERR_COM_NOT_PLAYBACK),t}},{key:"_createFlvPlayer",value:function(i){var r=this,a=this.aWndList[i],e=(a.oMSE&&(a.bPlay=!1,a.oMSE.detachMediaElement(),a.oMSE.destroy(),a.oMSE=null),this.oJSPlugin.find("video.play-window").eq(i)),t=this.oJSPlugin.find("canvas.play-window").eq(i),t=(e.show(),t.hide(),{isLive:!0,type:"flv"}),n=(this.aWndList[i].mseDecoderAudio||(t={hasAudio:!1,isLive:!0,type:"flv"}),!1),s=3,o=2,t=(0i.iMaxWndNum-1||"number"!=typeof r)&&(r=i.iCurrentWndIndex);var n=i._checkPlay(r);0!==n&&t(n),e(i.aWndList[r]._videoInfo)})}},{key:"JS_SetConnectTimeOut",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),n.oStreamClient.setTimeOut(r).then(function(){e()},function(e){t(e)})})}},{key:"JS_SetAdditionDataCB",value:function(){var n=0i.iMaxWndNum-1||"number"!=typeof n)&&(n=i.iCurrentWndIndex),i.aWndList[n].oPlayCtrl.PlayM4_SetAdditionDataCallBack(r,1),i.aWndList[n].AdditionDataCB=a,e()})}},{key:"JS_SetStreamCacheBuf",value:function(){var n=this,i=0n.iMaxWndNum-1||"number"!=typeof i)&&(i=n.iCurrentWndIndex),(r<0||5242880t.iMaxWndNum-1||"number"!=typeof n)&&(n=t.iCurrentWndIndex),t.aWndList[n].bopenTraceId=i,e()})}},{key:"JS_GetTraceId",value:function(){var t=this,n=0t.iMaxWndNum-1||"number"!=typeof n)&&(n=t.iCurrentWndIndex),e(t.aWndList[n].szTraceId)})}},{key:"_support",value:function(){var e=!!window.MediaSource,t=!!window.WebGLRenderingContext,n=!!window.WebGL2RenderingContext,i=!!window.SharedArrayBuffer,r=!!window.OffscreenCanvas,a=!("windows"===this._browserInfo.system&&"chrome"===this._browserInfo.supporter&&parseInt(this._browserInfo.supporterVersion.split(".").shift())<80),s="android"!==this._browserInfo.system&&"ios"!==this._browserInfo.system;return{MSE:e,webGL1:t,webGL2:n,SharedArrayBuffer:i,OffscreenCanvas:r,"decoder1.0":t,"decoder2.0":t&&i&&r&&a&&s}}},{key:"_decoder2Loaded",value:function(){return new m.default(function(e,t){var n=0,i=window.setInterval(function(){4e3<=n&&(clearInterval(i),t(L.ERR_COM_LOAD_JSDECODER_ERROR)),P&&(clearInterval(i),console.log("clearInterval"),e(1)),n+=100},100)})}},{key:"_calculateRealtimeBitrate",value:function(e){this.aWndList[e]._bpsInfo&&(this.aWndList[e]._bpsInfo.time_gap_factor<1&&(this._bpsInfo.time_gap_factor=1),0!==this.aWndList[e]._bpsInfo.lastVideoBytes&&(this.aWndList[e]._bpsInfo.bps_video=8*this.aWndList[e]._bpsInfo.lastVideoBytes/1024/this.aWndList[e]._bpsInfo.time_gap_factor,this.aWndList[e]._bpsInfo.lastVideoBytes=0),this.aWndList[e]._videoInfo.bitRate=this.aWndList[e]._bpsInfo.bps_video)}},{key:"_loadScript",value:function(n){return new m.default(function(e){var t=document.createElement("script");t.type="text/javascript",t.src=n,t.onload=function(){e()},document.body.appendChild(t)})}},{key:"_playerlocalFile",value:function(e,t){var n=this.aWndList[e];n.iMode=1,n.isFlv=!0,n.bPlay||this._createFlvPlayer(e),n.oMSE.onLoaderChunkArrival(t,n._receivedLength),n._receivedLength+=t.byteLength}},{key:"uuid2",value:function(e,t){var n,i,r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),a=[];if(t=t||r.length,e)for(n=0;nthis.options.iMaxSplit&&(this.options.iCurrentSplit=this.options.iMaxSplit),this.iCurrentPlayRate=1,this.iCurrentSoundWnd=-1,this.iMaxWndNum=this.options.iMaxSplit*this.options.iMaxSplit,this.bPluginFull=!1,this.oVideoWindow=null,this.fullscreenElement=null,this.iCurrentWndIndex=-1,this.fDrawCallback=null,this.szPluginVersion=w.version,this.isBrowserVisible=!0,this._decoderVersion="1","/"!==this.options.szBasePath.charAt(this.options.szBasePath.length-1)&&(this.options.szBasePath=this.options.szBasePath+"/"),this.oStorageManager=new l.StorageManager(this.options.szBasePath+"transform/"),this.oStreamClient=new s.StreamClient(this.options),this.oJSPlugin=(0,g.default)("#"+this.options.szId),this.bcloseAntialias=!1,this._listenBrowserVisibility(),this._createWindows(),this.aWndList=[];for(var i,r=0;r=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(O,I,n){"use strict";function i(){}var t,r,a,s,o=n(27),c=n(6),u=n(22),e=n(76),d=n(8),l=n(16),h=n(34),_=n(246),f=n(247),m=n(80),p=n(81).set,y=n(249)(),v=n(51),g=n(82),M=n(250),L=n(83),S="Promise",k=c.TypeError,b=c.process,w=b&&b.versions,D=w&&w.v8||"",T=c[S],E="process"==e(b),Y=r=v.f,w=!!function(){try{var e=T.resolve(1),t=(e.constructor={})[n(7)("species")]=function(e){e(i,i)};return(E||"function"==typeof PromiseRejectionEvent)&&e.then(i)instanceof t&&0!==D.indexOf("6.6")&&-1===M.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!l(e)||"function"!=typeof(t=e.then))&&t},C=function(h,n){var i;h._n||(h._n=!0,i=h._c,y(function(){for(var r,d=h._v,l=1==h._s,e=0,t=function(e){var t,n,i,r,a=l?e.ok:e.fail,s=e.resolve,o=e.reject,u=e.domain;try{a?(l||(2==h._h&&(r=h,p.call(c,function(){var e;E?b.emit("rejectionHandled",r):(e=c.onrejectionhandled)&&e({promise:r,reason:r._v})})),h._h=1),!0===a?t=d:(u&&u.enter(),t=a(d),u&&(u.exit(),i=!0)),t===e.promise?o(k("Promise-chain cycle")):(n=P(t))?n.call(t,s,o):s(t)):o(d)}catch(e){u&&!i&&u.exit(),o(e)}};i.length>e;)t(i[e++]);h._c=[],h._n=!1,n&&!h._h&&(r=h,p.call(c,function(){var e,t,n=r._v,i=R(r);if(i&&(e=g(function(){E?b.emit("unhandledRejection",n,r):(t=c.onunhandledrejection)?t({promise:r,reason:n}):(t=c.console)&&t.error&&t.error("Unhandled promise rejection",n)}),r._h=E||R(r)?2:1),r._a=void 0,i&&e.e)throw e.v}))}))},R=function(e){return 1!==e._h&&0===(e._a||e._c).length},A=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),C(t,!0))},x=function(e){var n,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===e)throw k("Promise can't be resolved itself");(n=P(e))?y(function(){var t={_w:i,_d:!1};try{n.call(e,u(x,t,1),u(A,t,1))}catch(e){A.call(t,e)}}):(i._v=e,i._s=1,C(i,!1))}catch(e){A.call({_w:i,_d:!1},e)}}};w||(T=function(e){_(this,T,S,"_h"),h(e),t.call(this);try{e(u(x,this,1),u(A,this,1))}catch(e){A.call(this,e)}},(t=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(251)(T.prototype,{then:function(e,t){var n=Y(m(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=E?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&C(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new t;this.promise=e,this.resolve=u(x,e,1),this.reject=u(A,e,1)},v.f=Y=function(e){return e===T||e===s?new a:r(e)}),d(d.G+d.W+d.F*!w,{Promise:T}),n(36)(T,S),n(252)(S),s=n(3)[S],d(d.S+d.F*!w,S,{reject:function(e){var t=Y(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(o||!w),S,{resolve:function(e){return L(o&&this===s?T:this,e)}}),d(d.S+d.F*!(w&&n(84)(function(e){T.all(e).catch(i)})),S,{all:function(e){var s=this,t=Y(s),o=t.resolve,u=t.reject,n=g(function(){var i=[],r=0,a=1;f(e,!1,function(e){var t=r++,n=!1;i.push(void 0),a++,s.resolve(e).then(function(e){n||(n=!0,i[t]=e,--a||o(i))},u)}),--a||o(i)});return n.e&&u(n.v),t.promise},race:function(e){var t=this,n=Y(t),i=n.reject,r=g(function(){f(e,!1,function(e){t.resolve(e).then(n.resolve,i)})});return r.e&&i(r.v),n.promise}})},function(e,t){e.exports=function(e,t,n,i){if(!(e instanceof t)||void 0!==i&&i in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var h=n(22),c=n(77),_=n(78),f=n(13),m=n(47),p=n(79),y={},v={};(t=e.exports=function(e,t,n,i,r){var a,s,o,u,r=r?function(){return e}:p(e),d=h(n,i,t?2:1),l=0;if("function"!=typeof r)throw TypeError(e+" is not iterable!");if(_(r)){for(a=m(e.length);l>>24&255,r[i++]=u>>>16&255,r[i++]=u>>>8&255,r[i++]=255&u,e=s/4294967296*1e4&268435455,r[i++]=e>>>8&255,r[i++]=255&e,r[i++]=e>>>24&15|16,r[i++]=e>>>16&255,r[i++]=n>>>8|128,r[i++]=255&n;for(var d=0;d<6;++d)r[i+d]=a[d];return t||_(r)}},function(e,t,n){var s=n(88),o=n(89);e.exports=function(e,t,n){var i=t&&n||0,r=("string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),(e=e||{}).random||(e.rng||s)());if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var a=0;a<16;++a)t[i+a]=r[a];return t||o(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectDeviceCustom=void 0;var i=a(n(1)),r=a(n(2));function a(e){return e&&e.__esModule?e:{default:e}}n=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,[{key:"createClientObject",value:function(e,t,n,i){return{socket:e,id:t,iCurChannel:n,iCurStream:i,resolve:null,reject:null,stoping:!1}}},{key:"zeroPlayCmd",value:function(e,t){return new Uint8Array([0,0,0,44,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e+1,0,0,0,t,0,0,4,0])}},{key:"playCmd",value:function(e,t){return new Uint8Array([0,0,0,44,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e,0,0,0,t,0,0,4,0])}},{key:"playbackCmd",value:function(e,t,n,i){var r=e.split("T")[0],e=e.split("T")[1],a="0"+parseInt(r.substring(0,4),10).toString(16),s=parseInt(r.substring(4,6),10),r=parseInt(r.substring(6),10),o=parseInt(e.substring(0,2),10),u=parseInt(e.substring(2,4),10),e=parseInt(e.substring(4,6),10),d=t.split("T")[0],t=t.split("T")[1],l="0"+parseInt(d.substring(0,4),10).toString(16),d=parseInt(d.substring(4,6),10),h=parseInt(t.substring(0,2),10),c=parseInt(t.substring(2,4),10),t=parseInt(t.substring(4,6),10),n=[0,0,0,96,0,0,0,0,0,0,0,0,0,3,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n,0,0,parseInt(a.substring(0,2),16),parseInt(a.substring(2,4),16),0,0,0,s,0,0,0,r,0,0,0,o,0,0,0,u,0,0,0,e,0,0,parseInt(l.substring(0,2),16),parseInt(l.substring(2,4),16),0,0,0,d,0,0,0,r,0,0,0,h,0,0,0,c,0,0,0,t,0,0,0,0,0,0,0,0,i,0,0,0];return new Uint8Array(n)}},{key:"playRateCmd",value:function(e){for(var t=(parseInt(e,10)>>>0).toString(16).toLocaleUpperCase().toString(16),n=t.length;n<8;n++)t="0"+t;for(var i=[0,0,0,0],r=0,a=t.length;r>=15;0<=--a;){var o=32767&this[e],u=this[e++]>>15,d=t*o+u*s,r=((o=s*o+((32767&d)<<15)+n[i]+(1073741823&r))>>>30)+(d>>>15)+t*u+(r>>>30);n[i++]=1073741823&o}return r},30):"Netscape"!=e?(m.prototype.am=function(e,t,n,i,r,a){for(;0<=--a;){var s=t*this[e++]+n[i]+r,r=Math.floor(s/67108864);n[i++]=67108863&s}return r},26):(m.prototype.am=function(e,t,n,i,r,a){var s=16383&t;for(t>>=14;0<=--a;){var o=16383&this[e],u=this[e++]>>14,d=t*o+u*s,r=((o=s*o+((16383&d)<<14)+n[i]+r)>>28)+(d>>14)+t*u;n[i++]=268435455&o}return r},28),m.prototype.DB=Y,m.prototype.DM=(1<>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),e>>1!=0&&(n+=1),n}function g(e){this.m=e}function M(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,i,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),0<=e.compareTo(this.m)&&e.subTo(this.m,e)},M.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},M.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m.prototype.copyTo=function(e){for(var t=this.t-1;0<=t;--t)e[t]=this[t];e.t=this.t,e.s=this.s},m.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,0this.DB?(this[this.t-1]|=(s&(1<>this.DB-a):this[this.t-1]|=s<=this.DB&&(a-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,0>i|s,s=(this[o]&r)<=this.t)t.t=0;else{var i=e%this.DB,r=this.DB-i,a=(1<>i;for(var s=n+1;s>i;0>=this.DB;if(e.t>=this.DB;i+=this.s}else{for(i+=this.s;n>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[n++]=this.DV+i:0=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}0>this.F2:0),d=this.FV/u,u=(1<>s)&&(i=!0,r=o(t));0<=a;)s>(s+=this.DB-e)):(t=this[a]>>(s-=e)&n,s<=0&&(s+=this.DB,--a)),(i=02*this.m.t?e.mod(this.m):e.compareTo(this.m)<0?e:(t=p(),e.copyTo(t),this.reduce(t),t)},L.prototype.revert=function(e){return e},L.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);0<=e.compareTo(this.m);)e.subTo(this.m,e)},L.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},L.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var u,l,h,J,q,c=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],K=67108864/c[c.length-1];function X(e){var t,n,o=this,i=e.length,r=0,a=o.i=o.j=o.m=0;for(o.S=[],o.c=[],i||(e=[i++]);r<256;)o.S[r]=r++;for(r=0;r<256;r++)a=a+(t=o.S[r])+e[r%i]&255,n=o.S[a],o.S[r]=n,o.S[a]=t;o.g=function(e){var t=o.S,n=o.i+1&255,i=t[n],r=o.j+i&255,a=t[r];t[n]=a,t[r]=i;for(var s=t[i+a&255];--e;)a=t[r=r+(i=t[n=n+1&255])&255],t[n]=a,t[r]=i,s=256*s+t[i+a&255];return o.i=n,o.j=r,s},o.g(256)}function _(e,t,n,i){for(e+="",i=n=0;i=n&&(this.dMultiply(i),this.dAddOffset(s,0),s=a=0))}0e&&this.subTo(m.ONE.shiftLeft(e-1),this);else{var i=7&e;(n=[]).length=1+(e>>3),t.nextBytes(n),0>=this.DB;if(e.t>=this.DB;i+=this.s}else{for(i+=this.s;n>=this.DB;i+=e.s}t.s=i<0?-1:0,0=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},m.prototype.multiplyLowerTo=function(e,t,n){var i,r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;0>1;c.length>24},m.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},m.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},m.prototype.toByteArray=function(){var e,t=this.t,n=[],i=(n[0]=this.s,this.DB-t*this.DB%8),r=0;if(0>i)!=(this.s&this.DM)>>i&&(n[r++]=e|this.s<>(i+=this.DB-8)):(e=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&e)&&(e|=-256),0==r&&(128&this.s)!=(128&e)&&++r,(0>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}(this[e]);return this.s<0?this.t*this.DB:-1},m.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n=this.t?0!=this.s:0!=(this[t]&1<>n-u&d:(l=(e[h]&(1<>this.DB+n-u)),o=r;0==(1&l);)l>>=1,--o;if((n-=o)<0&&(n+=this.DB,--h),c)s[l].copyTo(i),c=!1;else{for(;1>>=1;return(e+n)/t},e},q=l.pow(256,6),h=l.pow(2,h),J=2*h,_(l.random(),u),Z.prototype.nextBytes=function(e){for(var t=0;t>8&255,w[D++]^=e>>16&255,w[D++]^=e>>24&255,b<=D&&(D-=b)}var w=[],D=0;if("Netscape"==e&&B<"5"&&window.crypto)for(var Q=window.crypto.random(32),T=0;T>>8,w[D++]=255&T;function ee(){if(null==k){for($(),(k=new S).init(w),D=0;D>16)+(t>>16)+(n>>16)<<16|65535&n}function v(e,t){return e>>>t|e<<32-t}for(var t=function(e,t){var n,i,r,a,s,o,u,d,l,h,c,_,f=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],m=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],p=Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(64+t>>9<<4)]=t,l=0;l>>10,p[h-7]),v(p[h-15],7)^v(p[h-15],18)^p[h-15]>>>3),p[h-16]),c=y(y(y(y(d,v(s,6)^v(s,11)^v(s,25)),s&o^~s&u),f[h]),p[h]),_=y(v(n,2)^v(n,13)^v(n,22),n&i^n&r^i&r),d=u,u=o,o=s,s=y(a,c),a=r,r=i,i=n,n=y(c,_);m[0]=y(n,m[0]),m[1]=y(i,m[1]),m[2]=y(r,m[2]),m[3]=y(a,m[3]),m[4]=y(s,m[4]),m[5]=y(o,m[5]),m[6]=y(u,m[6]),m[7]=y(d,m[7])}return m}(function(e){for(var t=[],n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}(e=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n>6|192):t=(t+=String.fromCharCode(i>>12|224))+String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t}(e)),8*e.length),n="",i=0;i<4*t.length;i++)n+="0123456789abcdef".charAt(t[i>>2]>>8*(3-i%4)+4&15)+"0123456789abcdef".charAt(t[i>>2]>>8*(3-i%4)&15);return n};var Y=function(e){var t=e;function n(e,t){return e<>>32-t}function i(e){for(var t="",n=7;0<=n;n--)t+=(e>>>4*n&15).toString(16);return t}for(var r,a,s,o,u,d=Array(80),l=1732584193,h=4023233417,c=2562383102,_=271733878,f=3285377520,m=(t=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n>6|192):t=(t+=String.fromCharCode(i>>12|224))+String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t}(t)).length,p=[],y=0;y>>29),p.push(m<<3&4294967295),t=0;t>6|192):(n[--t]=63&r|128,n[--t]=r>>6&63|128,n[--t]=r>>12|224)}for(n[--t]=0,i=new E,r=[];2>3))||null==(e=this.doPublic(e))?null:0==(1&(e=e.toString(16)).length)?e:"0"+e},C.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),e=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(e)<0;)t=t.add(this.p);return t.subtract(e).multiply(this.coeff).mod(this.p).multiply(this.q).add(e)},C.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&0>1;this.e=parseInt(t,16);for(var r=new m(t,16);;){for(;this.p=new m(e-i,1,n),0!=this.p.subtract(m.ONE).gcd(r).compareTo(m.ONE)||!this.p.isProbablePrime(10););for(;this.q=new m(i,1,n),0!=this.q.subtract(m.ONE).gcd(r).compareTo(m.ONE)||!this.q.isProbablePrime(10););this.p.compareTo(this.q)<=0&&(a=this.p,this.p=this.q,this.q=a);var a=this.p.subtract(m.ONE),s=this.q.subtract(m.ONE),o=a.multiply(s);if(0==o.gcd(r).compareTo(m.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(o),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},C.prototype.decrypt=function(e){if(null==(e=this.doPrivate(P(e,16))))return null;for(var t=this.n.bitLength()+7>>3,n=e.toByteArray(),i=0;i=n.length)return null;for(var r="";++i>2&63),t=(3&n)<<4):1==r?(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t|n>>4&15),t=(15&n)<<2):2==r&&(i=(i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t|n>>6&3))+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&n)),3==(r+=1)&&(r=0);return 0>6-i&255)),r=t<<(i=i+2&7)&255);return n},O.b16to64=function(e){var t,n,i="";for(e.length%2==1&&(e="0"+e),t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((3&n)<<4));0<(3&i.length);)i+="=";return i},O.b64to16=function(e){for(var t,n="",i=0,r=0;r>2),t=3&v,1):1==i?(n+=o(t<<2|v>>4),t=15&v,2):2==i?(n=(n+=o(t))+o(v>>2),t=3&v,3):(n=(n+=o(t<<2|v>>4))+o(15&v),0));return 1==i&&(n+=o(t<<2)),n},O.string2bytes=function(e){for(var t=[],n=0;n>>32-a,t)}function i(e,t,n,i,r,a,s){return e=o(e,o(o(t&i|n&~i,r),s)),o(e<>>32-a,t)}function r(e,t,n,i,r,a,s){return e=o(e,o(o(t^n^i,r),s)),o(e<>>32-a,t)}function a(e,t,n,i,r,a,s){return e=o(e,o(o(n^(t|~i),r),s)),o(e<>>32-a,t)}function s(e){for(var t="",n="",i=0;i<=3;i++)t+=(n="0"+(n=e>>>8*i&255).toString(16)).substr(n.length-2,2);return t}var u,d,l,h,c=function(e){for(var t,n=e.length,i=n+8,i=16*((i-i%64)/64+1),r=Array(i-1),a=0;a>>29,r}(t=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n>6|192):t=(t+=String.fromCharCode(i>>12|224))+String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t}(t)),_=1732584193,f=4023233417,m=2562383102,p=271733878;for(t=0;tr;)u(E,t=n[r++])||t==D||t==j||i.push(t);return i}function s(e){for(var t,n=e===P,i=$(n?Y:p(e)),r=[],a=0;i.length>a;)!u(E,t=i[a++])||n&&!u(P,t)||r.push(E[t]);return r}var o=e(6),u=e(18),d=e(14),l=e(8),H=e(70),j=e(275).KEY,h=e(23),c=e(49),_=e(36),F=e(35),f=e(7),B=e(57),N=e(58),z=e(276),U=e(277),m=e(13),V=e(16),G=e(24),p=e(19),y=e(45),v=e(28),g=e(46),J=e(278),q=e(60),M=e(59),K=e(12),X=e(30),Z=q.f,L=K.f,$=J.f,S=o.Symbol,k=o.JSON,b=k&&k.stringify,w="prototype",D=f("_hidden"),Q=f("toPrimitive"),ee={}.propertyIsEnumerable,T=c("symbol-registry"),E=c("symbols"),Y=c("op-symbols"),P=Object[w],c="function"==typeof S&&!!M.f,C=o.QObject,R=!C||!C[w]||!C[w].findChild,A=d&&h(function(){return 7!=g(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=Z(P,t);i&&delete P[t],L(e,t,n),i&&e!==P&&L(P,t,i)}:L,x=c&&"symbol"==typeof S.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof S},O=function(e,t,n){return e===P&&O(Y,t,n),m(e),t=y(t,!0),m(n),u(E,t)?(n.enumerable?(u(e,D)&&e[D][t]&&(e[D][t]=!1),n=g(n,{enumerable:v(0,!1)})):(u(e,D)||L(e,D,v(1,{})),e[D][t]=!0),A(e,t,n)):L(e,t,n)};c||(H((S=function(){if(this instanceof S)throw TypeError("Symbol is not a constructor!");var t=F(0ne;)f(te[ne++]);for(var ie=X(f.store),re=0;ie.length>re;)N(ie[re++]);l(l.S+l.F*!c,"Symbol",{for:function(e){return u(T,e+="")?T[e]:T[e]=S(e)},keyFor:function(e){if(!x(e))throw TypeError(e+" is not a symbol!");for(var t in T)if(T[t]===e)return t},useSetter:function(){R=!0},useSimple:function(){R=!1}}),l(l.S+l.F*!c,"Object",{create:function(e,t){return void 0===t?g(e):n(g(e),t)},defineProperty:O,defineProperties:n,getOwnPropertyDescriptor:r,getOwnPropertyNames:a,getOwnPropertySymbols:s});C=h(function(){M.f(1)});l(l.S+l.F*C,"Object",{getOwnPropertySymbols:function(e){return M.f(G(e))}}),k&&l(l.S+l.F*(!c||h(function(){var e=S();return"[null]"!=b([e])||"{}"!=b({a:e})||"{}"!=b(Object(e))})),"JSON",{stringify:function(e){for(var t,n,i=[e],r=1;rs;)a.call(e,i=r[s++])&&t.push(i);return t}},function(e,t,n){var i=n(31);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(19),r=n(90).f,a={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){if(!s||"[object Window]"!=a.call(e))return r(i(e));try{return r(e)}catch(e){return s.slice()}}},function(e,t,n){n(58)("asyncIterator")},function(e,t,n){n(58)("observable")},function(I,W,H){"use strict";Object.defineProperty(W,"__esModule",{value:!0});o=Math,m=(y={}).lib={},t=m.Base={extend:function(e){G.prototype=this;var t=new G;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=m.WordArray=t.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||j).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes;if(e=e.sigBytes,this.clamp(),i%4)for(var r=0;r>>2]|=(n[r>>>2]>>>24-r%4*8&255)<<24-(i+r)%4*8;else if(65535>>2]=n[r>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=o.ceil(t/4)},clone:function(){var e=t.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new u.init(n,t/2)}},n=_.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new u.init(n,t)}},F=_.Utf8={stringify:function(e){try{return decodeURIComponent(escape(n.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return n.parse(unescape(encodeURIComponent(e)))}},e=m.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=F.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,n=t.words,i=t.sigBytes,r=this.blockSize,a=i/(4*r),a=e?o.ceil(a):o.max((0|a)-this._minBufferSize,0),i=o.min(4*(e=a*r),i);if(e){for(var s=0;s>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,s=0;s<4&&r+.75*s