ezuikit.js 2.8 MB
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=typeof globalThis!=="undefined"?globalThis:global||self,global.EZUIKit=factory())})(this,function(){"use strict";function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread2(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck$1(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass$1(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor}function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function(){};return{s:F,n:function(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function(){it=it.call(o)},n:function(){var step=it.next();normalCompletion=step.done;return step},e:function(e){didErr=true;err=e},f:function(){try{if(!normalCompletion&&it.return!=null)it.return()}finally{if(didErr)throw err}}}}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key)}var Core=function(){function Core(x,y){_classCallCheck$1(this,Core);this.coreX=x;this.coreY=y}_createClass$1(Core,[{key:"toString",value:function toString(){return"".concat(this.coreX,"-").concat(this.coreY)}}]);return Core}();Date.prototype.Format=function(fmt){var o={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};if(/(y+)/.test(fmt)){fmt=fmt.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))}for(var k in o){if(new RegExp("("+k+")").test(fmt))fmt=fmt.replace(RegExp.$1,RegExp.$1.length==1?o[k]:("00"+o[k]).substr((""+o[k]).length))}return fmt};var addJs=function addJs(filepath,callback,isReadyFun,callbackValue){var headerScript=document.getElementsByTagName("head")[0].getElementsByTagName("script");var isReady=false;if(isReadyFun){isReady=isReadyFun()}else{for(var i=0;i<headerScript.length;i++){if(headerScript[i].getAttribute("src")==filepath){isReady=true;if(headerScript[i].readyState){headerScript[i].onreadystatechange=function(){if(headerScript[i].readyState=="complete"||headerScript[i].readyState=="loaded"){headerScript[i].onreadystatechange=null;callback(callbackValue)}}}else{headerScript[i].onload=function(){callback(callbackValue)}}}}}if(!isReady){var oJs=document.createElement("script");oJs.setAttribute("src",filepath);oJs.setAttribute("crossorigin",true);oJs.onload=function(){return callback(callbackValue)};document.getElementsByTagName("head")[0].appendChild(oJs)}else{setTimeout(function(){callback(callbackValue)},15)}};var addCss=function addCss(filepath,callback){var headerLink=document.getElementsByTagName("head")[0].getElementsByTagName("link");var isReady=false;for(var i=0;i<headerLink.length;i++){if(headerLink[i].getAttribute("href")==filepath){isReady=true}}if(!isReady){var oJs=document.createElement("link");oJs.rel="stylesheet";oJs.type="text/css";oJs.href=filepath;oJs.onload=callback;document.getElementsByTagName("head")[0].appendChild(oJs)}};var isPromise=function isPromise(obj){return!!obj&&(_typeof(obj)==="object"||typeof obj==="function")&&typeof obj.then==="function"};var getQueryString=function getQueryString(name,url){var r=new RegExp("(\\?|#|&)"+name+"=(.*?)(#|&|$)");var m=(url||window.location.href).match(r);return decodeURIComponent(m?m[2]:"")};var insertAfter=function insertAfter(newElement,targetElement){var parent=targetElement.parentNode;if(parent.lastChild==targetElement){parent.appendChild(newElement)}else{parent.insertBefore(newElement,targetElement.nextSibling)}};var requestFullScreen=function requestFullScreen(element){console.log("requestFullScreen",document.getElementById(element));if(navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1){element.webkitRequestFullScreen()}else{var requestMethod=element.requestFullScreen||element.webkitRequestFullScreen||element.mozRequestFullScreen||element.msRequestFullScreen;if(requestMethod){requestMethod.call(element)}else if(typeof window.ActiveXObject!=="undefined"){var wscript=new window.ActiveXObject("WScript.Shell");if(wscript!==null){wscript.SendKeys("{F11}")}}}};var requestMobileFullScreen=function requestMobileFullScreen(element){var width=document.documentElement.clientWidth;var height=document.documentElement.clientHeight;var wrapper=element;var style="";style+="width:"+height+"px;";style+="height:"+width+"px;";style+="-webkit-transform: rotate(90.001deg); transform: rotate(90.001deg);";style+="-webkit-transform-origin: "+width/2+"px "+width/2+"px;";style+="transform-origin: "+width/2+"px "+width/2+"px;";style+="position: fixed;top: 0;left: 0;z-index:10";wrapper.style.cssText=style};var requestFullScreenPromise=function requestFullScreenPromise(element){requestFullScreen(element);var promise=new Promise(function(resolve,reject){var timeInterval=setInterval(function(){var isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(isFullScreen){clearInterval(timeInterval);return resolve(true)}},100);var timeOut=setTimeout(function(){var isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(!isFullScreen){reject(false)}clearTimeout(timeOut)},2e3)});return promise};var cancelMobileFullScreen=function cancelMobileFullScreen(element,width,height){var style="";style+="width:"+width+"px;";style+="height:"+height+"px;";style+="-webkit-transform: none; transform: none;";style+="-webkit-transform-origin: 0 0;";style+="transform-origin: 0 0;";element.style.cssText=style};var cancelFullScreen=function cancelFullScreen(){if(document.exitFullscreen){document.exitFullscreen()}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}};var cancelFullScreenPromise=function cancelFullScreenPromise(element){cancelFullScreen();var promise=new Promise(function(resolve,reject){var timeInterval=setInterval(function(){var isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(!isFullScreen){clearInterval(timeInterval);return resolve(true)}},50);var timeOut=setTimeout(function(){var isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(isFullScreen){reject(false)}clearTimeout(timeOut)},2e3)});return promise};var matchEzopenUrl=function matchEzopenUrl(ezopenUrl){var deviceSerial=ezopenUrl.split("/")[3];var channelNo=ezopenUrl.split("/")[4].split(".")[0];var validCode=ezopenUrl.split("/")[2].split("@").length===2?ezopenUrl.split("/")[2].split("@")[0]:"";var hd=ezopenUrl.indexOf(".hd")!==-1;var type=ezopenUrl.split("/")[4].split(".")[ezopenUrl.split("/")[4].split(".").length-1].split("?")[0];if(type==="rec"&&ezopenUrl.indexOf(".cloud.rec")!==-1){type="cloud.rec"}return{deviceSerial:deviceSerial,channelNo:channelNo,validCode:validCode,hd:hd,type:type}};var matchUrl=function matchUrl(url){var reg=/\/([A-Za-z\d]{9})\_(\d)\_(\d)/;var matchedArray=url.match(reg);if(matchedArray.length>3){var deviceSerial=matchedArray[1];var channelNo=matchedArray[2];var hd=matchedArray[3]==="1";var type="live";if(url.indexOf("rec=local")>-1){type="rec"}else if(url.indexOf("rec=cloud")>-1){type="cloud.rec"}return{deviceSerial:deviceSerial,channelNo:channelNo,hd:hd,type:type}}return{}};function isJSON(str){if(typeof str==="string"){try{var obj=JSON.parse(str);if(_typeof(obj)==="object"&&obj){return true}return false}catch(e){return false}}console.log("It is not a string!")}var request=function request(url,method,params,header,success,error){var _url=url;var http_request=new XMLHttpRequest;http_request.onreadystatechange=function(){if(http_request.readyState==4){if(http_request.status==200){if(isJSON(http_request.responseText)){var _data=JSON.parse(http_request.responseText);success(_data)}else{success(http_request.responseText)}}}};http_request.open(method,_url,true);var data=new FormData;for(var i in params){data.append(i,params[i])}if(header&&_typeof(header)==="object"){for(var i in header){http_request.setRequestHeader(i,header[i])}}http_request.send(data)};var isMobile=function isMobile(){if(window){return navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i)}return false};var HLS=function(){function HLS(videoId,url){var _this=this;_classCallCheck$1(this,HLS);addJs("https://open.ys7.com/assets/ezuikit_v3.4/js/hls.js",function(){console.log("加载hls.min.js成功",window.Hls);console.log("isSupportHls",window.Hls.isSupported());if(window.Hls.isSupported()){_this.initHLS(videoId,url)}},function(){return!!window.Hls})}_createClass$1(HLS,[{key:"toString",value:function toString(){return"hls ".concat(this.coreX,"-").concat(this.coreY)}},{key:"initHLS",value:function initHLS(videoId,hlsUrl){var _matchUrl=matchUrl(hlsUrl),deviceSerial=_matchUrl.deviceSerial,channelNo=_matchUrl.channelNo;_matchUrl.hd;window.ezuikitMonitor.report({protocol:"hls",url:hlsUrl,serial:deviceSerial,no:channelNo,action:1});var video=document.getElementById(videoId);var hls=new window.Hls({defaultAudioCodec:"mp4a.40.2"});hls.loadSource(hlsUrl);hls.attachMedia(video);hls.on(window.Hls.Events.MANIFEST_PARSED,function(){video.play()});hls.on(window.Hls.Events.ERROR,function(event,data){if(data.fatal){switch(data.type){case window.Hls.ErrorTypes.NETWORK_ERROR:console.log("fatal network error encountered, try to recover");hls.startLoad();break;case window.Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover");hls.recoverMediaError();break;default:hls.destroy();break}}});this.hls=hls;this.video=video;this.hlsUrl=hlsUrl}},{key:"play",value:function play(){console.log("执行hls播放",this.video);this.hls.startLoad();this.video.play()}},{key:"stop",value:function stop(){this.video.pause();this.hls.stopLoad()}}]);return HLS}();var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}var flv_min={exports:{}};(function(module,exports){!function(e,t){module.exports=t()}(self,()=>(()=>{var e={99:e=>{var t,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function n(){n.init.call(this)}e.exports=n,e.exports.once=function(e,t){return new Promise(function(i,s){function a(i){e.removeListener(t,n),s(i)}function n(){"function"==typeof e.removeListener&&e.removeListener("error",a),i([].slice.call(arguments))}f(e,t,n,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&f(e,"error",t,i)}(e,a,{once:!0})})},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var o=10;function r(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function d(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function l(e,t,i,s){var a,n,o,l;if(r(i),void 0===(n=e._events)?(n=e._events=Object.create(null),e._eventsCount=0):(void 0!==n.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),n=e._events),o=n[t]),void 0===o)o=n[t]=i,++e._eventsCount;else if("function"==typeof o?o=n[t]=s?[i,o]:[o,i]:s?o.unshift(i):o.push(i),(a=d(e))>0&&o.length>a&&!o.warned){o.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=o.length,l=h,console&&console.warn&&console.warn(l)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(e,t,i){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},a=h.bind(s);return a.listener=i,s.wrapFn=a,a}function c(e,t,i){var s=e._events;if(void 0===s)return[];var a=s[t];return void 0===a?[]:"function"==typeof a?i?[a.listener||a]:[a]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(a):m(a,a.length)}function u(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function m(e,t){for(var i=new Array(t),s=0;s<t;++s)i[s]=e[s];return i}function f(e,t,i,s){if("function"==typeof e.on)s.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function a(n){s.once&&e.removeEventListener(t,a),i(n)})}}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),n.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},n.prototype.getMaxListeners=function(){return d(this)},n.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var a="error"===e,n=this._events;if(void 0!==n)a=a&&void 0===n.error;else if(!a)return!1;if(a){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var r=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw r.context=o,r}var d=n[e];if(void 0===d)return!1;if("function"==typeof d)s(d,this,t);else{var l=d.length,h=m(d,l);for(i=0;i<l;++i)s(h[i],this,t)}return!0},n.prototype.addListener=function(e,t){return l(this,e,t,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(e,t){return l(this,e,t,!0)},n.prototype.once=function(e,t){return r(t),this.on(e,_(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return r(t),this.prependListener(e,_(this,e,t)),this},n.prototype.removeListener=function(e,t){var i,s,a,n,o;if(r(t),void 0===(s=this._events))return this;if(void 0===(i=s[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(a=-1,n=i.length-1;n>=0;n--)if(i[n]===t||i[n].listener===t){o=i[n].listener,a=n;break}if(a<0)return this;0===a?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,a),1===i.length&&(s[e]=i[0]),void 0!==s.removeListener&&this.emit("removeListener",e,o||t)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(e){var t,i,s;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var a,n=Object.keys(i);for(s=0;s<n.length;++s)"removeListener"!==(a=n[s])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this},n.prototype.listeners=function(e){return c(this,e,!0)},n.prototype.rawListeners=function(e){return c(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):u.call(e,t)},n.prototype.listenerCount=u,n.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},994:(e,t,i)=>{i.d(t,{Z:()=>s});const s=class{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){const e=!this.hasAudio||this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!this.hasVideo||this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&e&&t}isSeekable(){return this.hasKeyframesIndex}getNearestKeyframe(e){if(null==this.keyframesIndex)return null;const t=this.keyframesIndex,i=this._search(t.times,e);return{index:i,milliseconds:t.times[i],fileposition:t.filepositions[i]}}_search(e,t){let i=0;const s=e.length-1;let a=0,n=0,o=s;for(t<e[0]&&(i=0,n=o+1);n<=o;){if(a=n+Math.floor((o-n)/2),a===s||t>=e[a]&&t<e[a+1]){i=a;break}e[a]<t?n=a+1:o=a-1}return i}}},68:(e,t,i)=>{i.d(t,{J1:()=>o,Vn:()=>n,Wk:()=>s,Yy:()=>a});class s{constructor(e,t,i,s,a){this.dts=e,this.pts=t,this.duration=i,this.originalDts=s,this.isSyncPoint=a,this.fileposition=null}}class a{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}class n{constructor(){this._list=[]}clear(){this._list=[]}appendArray(e){const t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}getLastSyncPointBeforeDts(e){if(0===this._list.length)return null;const t=this._list;let i=0;const s=t.length-1;let a=0,n=0,o=s;for(e<t[0].dts&&(i=0,n=o+1);n<=o;){if(a=n+Math.floor((o-n)/2),a===s||e>=t[a].dts&&e<t[a+1].dts){i=a;break}t[a].dts<e?n=a+1:o=a-1}return this._list[i]}}class o{constructor(e){this._type=e,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return 0===this._list.length}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(e){var t;const i=this._list;if(0===i.length)return-2;const s=i.length-1;let a=0,n=0,o=s,r=0;if(e<i[0].originalBeginDts)return r=-1,r;for(;n<=o;){if(a=n+Math.floor((o-n)/2),a===s||e>((null===(t=i[a].lastSample)||void 0===t?void 0:t.originalDts)||0)&&e<i[a+1].originalBeginDts){r=a;break}i[a].originalBeginDts<e?n=a+1:o=a-1}return r}_searchNearestSegmentAfter(e){return this._searchNearestSegmentBefore(e)+1}append(e){var t,i;const s=this._list,a=e,n=this._lastAppendLocation;let o=0;-1!==n&&n<s.length&&a.originalBeginDts>=((null===(i=null===(t=s[n])||void 0===t?void 0:t.lastSample)||void 0===i?void 0:i.originalDts)||0)&&(n===s.length-1||n<s.length-1&&a.originalBeginDts<s[n+1].originalBeginDts)?o=n+1:s.length>0&&(o=this._searchNearestSegmentBefore(a.originalBeginDts)+1),this._lastAppendLocation=o,this._list.splice(o,0,a)}getLastSegmentBefore(e){const t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}getLastSampleBefore(e){const t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}getLastSyncPointBefore(e){let t=this._searchNearestSegmentBefore(e),i=this._list[t].syncPoints;for(;0===i.length&&t>0;)t--,i=this._list[t].syncPoints;return i.length>0?i[i.length-1]:null}}},943:(e,t,i)=>{i.d(t,{Z:()=>Ie});var s=i(99),a=i(645),n=i(479),o=i(994);function r(e,t,i){const s=e;if(t+i<s.length){for(;i--;)if(128!=(192&s[++t]))return!1;return!0}return!1}const d=function(e){const t=[],i=e;let s=0;const a=e.length;for(;s<a;)if(i[s]<128)t.push(String.fromCharCode(i[s])),++s;else{if(i[s]<192);else if(i[s]<224){if(r(i,s,1)){const e=(31&i[s])<<6|63&i[s+1];if(e>=128){t.push(String.fromCharCode(65535&e)),s+=2;continue}}}else if(i[s]<240){if(r(i,s,2)){const e=(15&i[s])<<12|(63&i[s+1])<<6|63&i[s+2];if(e>=2048&&55296!=(63488&e)){t.push(String.fromCharCode(65535&e)),s+=3;continue}}}else if(i[s]<248&&r(i,s,3)){let e=(7&i[s])<<18|(63&i[s+1])<<12|(63&i[s+2])<<6|63&i[s+3];if(e>65536&&e<1114112){e-=65536,t.push(String.fromCharCode(e>>>10|55296)),t.push(String.fromCharCode(1023&e|56320)),s+=4;continue}}t.push(String.fromCharCode(65533)),++s}return t.join("")};var l=i(411);const h=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();class _{static parseScriptData(e,t,i){const s={};try{const a=_.parseValue(e,t,i),n=_.parseValue(e,t+a.size,i-a.size);s[a.data]=n.data}catch(e){a.Z.e("AMF",e.toString())}return s}static parseObject(e,t,i){if(i<3)throw new l.rT("Data not enough when parse ScriptDataObject");const s=_.parseString(e,t,i),a=_.parseValue(e,t+s.size,i-s.size),n=a.objectEnd;return{data:{name:s.data,value:a.data},size:s.size+a.size,objectEnd:n}}static parseVariable(e,t,i){return _.parseObject(e,t,i)}static parseString(e,t,i){if(i<2)throw new l.rT("Data not enough when parse String");const s=new DataView(e,t,i).getUint16(0,!h);let a;return a=s>0?d(new Uint8Array(e,t+2,s)):"",{data:a,size:2+s}}static parseLongString(e,t,i){if(i<4)throw new l.rT("Data not enough when parse LongString");const s=new DataView(e,t,i).getUint32(0,!h);let a;return a=s>0?d(new Uint8Array(e,t+4,s)):"",{data:a,size:4+s}}static parseDate(e,t,i){if(i<10)throw new l.rT("Data size invalid when parse Date");const s=new DataView(e,t,i);let a=s.getFloat64(0,!h);return a+=60*s.getInt16(8,!h)*1e3,{data:new Date(a),size:10}}static parseValue(e,t,i){if(i<1)throw new l.rT("Data not enough when parse Value");const s=new DataView(e,t,i);let n=1;const o=s.getUint8(0);let r,d=!1;try{switch(o){case 0:r=s.getFloat64(1,!h),n+=8;break;case 1:r=!!s.getUint8(1),n+=1;break;case 2:{const s=_.parseString(e,t+1,i-1);r=s.data,n+=s.size;break}case 3:{r={};let a=0;for(9==(16777215&s.getUint32(i-4,!h))&&(a=3);n<i-4;){const s=_.parseObject(e,t+n,i-n-a);if(s.objectEnd)break;r[s.data.name]=s.data.value,n+=s.size}if(n<=i-3){9===(16777215&s.getUint32(n-1,!h))&&(n+=3)}break}case 8:{r={},n+=4;let a=0;for(9==(16777215&s.getUint32(i-4,!h))&&(a=3);n<i-8;){const s=_.parseVariable(e,t+n,i-n-a);if(s.objectEnd)break;r[s.data.name]=s.data.value,n+=s.size}if(n<=i-3){9===(16777215&s.getUint32(n-1,!h))&&(n+=3)}break}case 9:r=void 0,n=1,d=!0;break;case 10:{r=[];const a=s.getUint32(1,!h);n+=4;for(let s=0;s<a;s++){const s=_.parseValue(e,t+n,i-n);r.push(s.data),n+=s.size}break}case 11:{const s=_.parseDate(e,t+1,i-1);r=s.data,n+=s.size;break}case 12:{const s=_.parseString(e,t+1,i-1);r=s.data,n+=s.size;break}default:n=i,a.Z.w("AMF","Unsupported AMF value type "+o.toString())}}catch(e){a.Z.e("AMF",e.toString())}return{data:r,size:n,objectEnd:d}}}const c=_;const u=class{constructor(e){this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){var e;const t=this._total_bytes-this._buffer_index;if(t<=0)throw new l.rT("ExpGolomb: _fillCurrentWord() but no bytes available");const i=Math.min(4,t),s=new Uint8Array(4);s.set(null===(e=this._buffer)||void 0===e?void 0:e.subarray(this._buffer_index,this._buffer_index+i)),this._current_word=new DataView(s.buffer).getUint32(0,!1),this._buffer_index+=i,this._current_word_bits_left=8*i}readBits(e){if(e>32)throw new l.OC("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){const t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;const i=e-this._current_word_bits_left;this._fillCurrentWord();const s=Math.min(i,this._current_word_bits_left),a=this._current_word>>>32-s;return this._current_word<<=s,this._current_word_bits_left-=s,t=t<<s|a,t}readBool(){return 1===this.readBits(1)}readByte(){return this.readBits(8)}_skipLeadingZero(){let e;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){const e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){const e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}};class m{static _ebsp2rbsp(e){const t=e,i=t.byteLength,s=new Uint8Array(i);let a=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[a]=t[e],a++);return new Uint8Array(s.buffer,0,a)}static parseSPS(e){const t=e.subarray(1,4);let i="avc1.";for(let e=0;e<3;e++){let s=t[e].toString(16);s.length<2&&(s="0"+s),i+=s}const s=m._ebsp2rbsp(e);let a=new u(s);a.readByte();const n=a.readByte();a.readByte();const o=a.readByte();a.readUEG();const r=m.getProfileString(n),d=m.getLevelString(o);let l=1,h=420;const _=[0,420,422,444];let c=8,f=8;if((100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n)&&(l=a.readUEG(),3===l&&a.readBits(1),l<=3&&(h=_[l]),c=a.readUEG()+8,f=a.readUEG()+8,a.readBits(1),a.readBool())){const e=3!==l?8:12;for(let t=0;t<e;t++)a.readBool()&&(t<6?m._skipScalingList(a,16):m._skipScalingList(a,64))}a.readUEG();const p=a.readUEG();if(0===p)a.readUEG();else if(1===p){a.readBits(1),a.readSEG(),a.readSEG();const e=a.readUEG();for(let t=0;t<e;t++)a.readSEG()}const g=a.readUEG();a.readBits(1);const v=a.readUEG(),E=a.readUEG(),S=a.readBits(1);0===S&&a.readBits(1),a.readBits(1);let y=0,A=0,b=0,R=0;a.readBool()&&(y=a.readUEG(),A=a.readUEG(),b=a.readUEG(),R=a.readUEG());let T=1,k=1,L=0,w=!0,D=0,C=0;if(a.readBool()){if(a.readBool()){const e=a.readByte();e>0&&e<16?(T=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][e-1],k=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][e-1]):255===e&&(T=a.readByte()<<8|a.readByte(),k=a.readByte()<<8|a.readByte())}if(a.readBool()&&a.readBool(),a.readBool()&&(a.readBits(4),a.readBool()&&a.readBits(24)),a.readBool()&&(a.readUEG(),a.readUEG()),a.readBool()){const e=a.readBits(32),t=a.readBits(32);w=a.readBool(),D=t,C=2*e,L=D/C}}let B=1;1===T&&1===k||(B=T/k);let I=0,M=0;if(0===l)I=1,M=2-S;else{I=3===l?1:2,M=(1===l?2:1)*(2-S)}let O=16*(v+1),P=16*(E+1)*(2-S);O-=(y+A)*I,P-=(b+R)*M;const x=Math.ceil(O*B);return a.destroy(),a=null,{codec_mimetype:i,profile_idc:n,level_idc:o,profile_string:r,level_string:d,chroma_format_idc:l,bit_depth:c,bit_depth_luma:c,bit_depth_chroma:f,ref_frames:g,chroma_format:h,chroma_format_string:m.getChromaFormatString(h),frame_rate:{fixed:w,fps:L,fps_den:C,fps_num:D},sar_ratio:{width:T,height:k},codec_size:{width:O,height:P},present_size:{width:x,height:P}}}static _skipScalingList(e,t){let i=8,s=8,a=0;for(let n=0;n<t;n++)0!==s&&(a=e.readSEG(),s=(i+a+256)%256),i=0===s?i:s}static getProfileString(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(e){return(e/10).toFixed(1)}static getChromaFormatString(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}const f=m;var p=i(898);class g{static _ebsp2rbsp(e){const t=e,i=t.byteLength,s=new Uint8Array(i);let a=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[a]=t[e],a++);return new Uint8Array(s.buffer,0,a)}static parseVPS(e){const t=g._ebsp2rbsp(e),i=new u(t);i.readByte(),i.readByte();i.readBits(4);i.readBits(2);i.readBits(6);return{num_temporal_layers:i.readBits(3)+1,temporal_id_nested:i.readBool()}}static parseSPS(e){const t=g._ebsp2rbsp(e);let i=new u(t);i.readByte(),i.readByte();let s=0,a=0,n=0,o=0;i.readBits(4);const r=i.readBits(3),d=(i.readBool(),i.readBits(2)),l=i.readBool(),h=i.readBits(5),_=i.readByte(),c=i.readByte(),m=i.readByte(),f=i.readByte(),p=i.readByte(),v=i.readByte(),E=i.readByte(),S=i.readByte(),y=i.readByte(),A=i.readByte(),b=i.readByte(),R=[],T=[];for(let e=0;e<r;e++)R.push(i.readBool()),T.push(i.readBool());if(r>0)for(let e=r;e<8;e++)i.readBits(2);for(let e=0;e<r;e++)R[e]&&(i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte()),T[e]&&i.readByte();i.readUEG();const k=i.readUEG();3===k&&i.readBits(1);const L=i.readUEG(),w=i.readUEG();i.readBool()&&(s+=i.readUEG(),a+=i.readUEG(),n+=i.readUEG(),o+=i.readUEG());const D=i.readUEG(),C=i.readUEG(),B=i.readUEG();for(let e=i.readBool()?0:r;e<=r;e++)i.readUEG(),i.readUEG(),i.readUEG();i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG();if(i.readBool()){if(i.readBool())for(let e=0;e<4;e++)for(let t=0;t<(3===e?2:6);t++){if(i.readBool()){const t=Math.min(64,1<<4+(e<<1));e>1&&i.readSEG();for(let e=0;e<t;e++)i.readSEG()}else i.readUEG()}}i.readBool(),i.readBool();i.readBool()&&(i.readByte(),i.readUEG(),i.readUEG(),i.readBool());const I=i.readUEG();let M=0;for(let e=0;e<I;e++){let t=!1;if(0!==e&&(t=i.readBool()),t){e===I&&i.readUEG(),i.readBool(),i.readUEG();let t=0;for(let e=0;e<=M;e++){const e=i.readBool();let s=!1;e||(s=i.readBool()),(e||s)&&t++}M=t}else{const e=i.readUEG(),t=i.readUEG();M=e+t;for(let t=0;t<e;t++)i.readUEG(),i.readBool();for(let e=0;e<t;e++)i.readUEG(),i.readBool()}}if(i.readBool()){const e=i.readUEG();for(let t=0;t<e;t++){for(let e=0;e<B+4;e++)i.readBits(1);i.readBits(1)}}let O=!1,P=0,x=1,U=1,Z=!1,N=1,G=1;i.readBool(),i.readBool();if(i.readBool()){if(i.readBool()){const e=i.readByte();e>0&&e<=16?(x=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][e-1],U=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][e-1]):255===e&&(x=i.readBits(16),U=i.readBits(16))}i.readBool()&&i.readBool();if(i.readBool()){i.readBits(3),i.readBool();i.readBool()&&(i.readByte(),i.readByte(),i.readByte())}i.readBool()&&(i.readUEG(),i.readUEG());i.readBool(),i.readBool(),i.readBool();O=i.readBool(),O&&(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG());if(i.readBool()){N=i.readBits(32),G=i.readBits(32);i.readBool()&&i.readUEG();if(i.readBool()){let e=!1,t=!1,s=!1;if(e=i.readBool(),t=i.readBool(),e||t){s=i.readBool(),s&&(i.readByte(),i.readBits(5),i.readBool(),i.readBits(5));i.readBits(4),i.readBits(4);s&&i.readBits(4),i.readBits(5),i.readBits(5),i.readBits(5)}for(let a=0;a<=r;a++){const a=i.readBool();Z=a;let n=!1,o=1;a||(n=i.readBool());let r=!1;if(n?i.readSEG():r=i.readBool(),r||(o=i.readUEG()+1),e)for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());if(t)for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG())}}}if(i.readBool()){i.readBool(),i.readBool(),i.readBool();P=i.readUEG();i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG()}}i.readBool();const V=`hvc1.${h}.1.L${b}.B0`,F=L-(s+a)*(1===k||2===k?2:1),z=w-(n+o)*(1===k?2:1);let H=1;return 1!==x&&1!==U&&(H=x/U),i.destroy(),i=null,{codec_mimetype:V,level_string:g.getLevelString(b),profile_idc:h,bit_depth:D+8,ref_frames:1,chroma_format:k,chroma_format_string:g.getChromaFormatString(k),general_level_idc:b,general_profile_space:d,general_tier_flag:l,general_profile_idc:h,general_profile_compatibility_flags_1:_,general_profile_compatibility_flags_2:c,general_profile_compatibility_flags_3:m,general_profile_compatibility_flags_4:f,general_constraint_indicator_flags_1:p,general_constraint_indicator_flags_2:v,general_constraint_indicator_flags_3:E,general_constraint_indicator_flags_4:S,general_constraint_indicator_flags_5:y,general_constraint_indicator_flags_6:A,min_spatial_segmentation_idc:P,constant_frame_rate:0,chroma_format_idc:k,bit_depth_luma_minus8:D,bit_depth_chroma_minus8:C,frame_rate:{fixed:Z,fps:G/N,fps_den:N,fps_num:G},sar_ratio:{width:x,height:U},codec_size:{width:F,height:z},present_size:{width:F*H,height:z}}}static parsePPS(e){const t=g._ebsp2rbsp(e),i=new u(t);i.readByte(),i.readByte();i.readUEG(),i.readUEG(),i.readBool(),i.readBool(),i.readBits(3),i.readBool(),i.readBool(),i.readUEG(),i.readUEG(),i.readSEG(),i.readBool(),i.readBool();if(i.readBool()){i.readUEG()}i.readSEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool(),i.readBool();const s=i.readBool(),a=i.readBool();let n=1;return a&&s?n=0:a?n=3:s&&(n=2),{parallelismType:n}}static getChromaFormatString(e){switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}}static getProfileString(e){switch(e){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}}static getLevelString(e){return(e/30).toFixed(1)}}const v=g;function E(e){return e.byteOffset%2==0&&e.byteLength%2==0}function S(e){return e.byteOffset%4==0&&e.byteLength%4==0}function y(e,t){for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const A=function(e,t){return e.byteLength===t.byteLength&&(S(e)&&S(t)?function(e,t){return y(new Uint32Array(e.buffer,e.byteOffset,e.byteLength/4),new Uint32Array(t.buffer,t.byteOffset,t.byteLength/4))}(e,t):E(e)&&E(t)?function(e,t){return y(new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2))}(e,t):function(e,t){return y(e,t)}(e,t))};class b{static parseOBUs(e){let t=null;for(let i=0;i<e.byteLength;){e[i];const s=(120&e[i])>>3,a=0!=(4&e[i]),n=0!=(2&e[i]);e[i];i+=1,a&&(i+=1);let o=Number.POSITIVE_INFINITY;if(n){o=0;for(let t=0;o|=(127&e[i])<<7*t,i+=1,0!=(128&e[i]);t++);}1===s&&(t=b.parseSeuqneceHeader(e.subarray(i,i+o))),i+=o}return t}static parseSeuqneceHeader(e){let t=new u(e);const i=t.readBits(3),s=(t.readBool(),t.readBool());let n=!0,o=0,r=0;const d=[];if(s)d.push({operating_point_idc:0,level:t.readBits(5),tier:0});else{const e=!1;if(t.readBool()){const e=t.readBits(32),s=t.readBits(32),d=t.readBool();if(d){let e=0;for(;;){if(0!==t.readBits(1))break;e+=1}e>=32?4294967295:(1<<e)-1+t.readBits(e)}r=e,o=s,n=d;if(t.readBool()){t.readBits(5);t.readBits(32),t.readBits(5),t.readBits(5)}}const s=t.readBool(),l=t.readBits(5);for(let a=0;a<=l;a++){const a=t.readBits(12),n=t.readBits(5),o=n>7?t.readBits(1):0;if(d.push({operating_point_idc:a,level:n,tier:o}),e);if(s){if(t.readBool()){t.readBits(4)}}}}const{level:l,tier:h}=d[0],_=t.readBits(4),c=t.readBits(4),m=t.readBits(_+1)+1,f=t.readBits(c+1)+1;let p=!1;if(s||(p=t.readBool()),p){t.readBits(4),t.readBits(4)}t.readBool(),t.readBool(),t.readBool();let y=!1;let A=2;if(!s){if(t.readBool(),t.readBool(),t.readBool(),t.readBool(),y=t.readBool(),y){t.readBool(),t.readBool()}if(A=t.readBool()?2:t.readBits(1),A){t.readBool()?2:t.readBits(1)}if(y){t.readBits(3)+1}}t.readBool(),t.readBool(),t.readBool();const k=t.readBool();let L=8;if(2===i&&k){L=t.readBool()?12:10}else L=k?10:8;let w=!1;1!==i&&(w=t.readBool());if(t.readBool()){t.readBits(8),t.readBits(8),t.readBits(8)}let C=1,B=1;if(w){t.readBits(1),C=1,B=1}else{if(t.readBits(1),0===i)C=1,B=1;else if(1===i)C=0,B=0;else if(12===L){if(t.readBits(1)){t.readBits(1)}}else C=1,B=0;if(C&&B){t.readBits(2)}t.readBits(1)}t.readBool();t.destroy(),t=null;return{codec_mimetype:`av01.${i}.${b.getLevelString(l,h)}.${L.toString(10).padStart(2,"0")}`,level:l,tier:h,level_string:b.getLevelString(l,h),profile_idc:i,profile_string:`${i}`,bit_depth:L,ref_frames:1,chroma_format:b.getChromaFormat(w,C,B),chroma_format_string:b.getChromaFormatString(w,C,B),frame_rate:{fixed:n,fps:o/r,fps_den:r,fps_num:o},sar_ratio:{width:1,height:1},codec_size:{width:m,height:f},present_size:{width:1*m,height:f}}}static getLevelString(e,t){return`${e.toString(10).padStart(2,"0")}${0===t?"M":"H"}`}static getChromaFormat(e,t,i){return e?0:0===t&&0===i?3:1===t&&0===i?2:1===t&&1===i?1:Number.NaN}static getChromaFormatString(e,t,i){return e?"4:0:0":0===t&&0===i?"4:4:4":1===t&&0===i?"4:2:2":1===t&&1===i?"4:2:0":"Unknown"}}const R=b;class T{constructor(e,t){this.TAG="FLVDemuxer",this._config=t,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=e.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=e.hasAudioTrack,this._hasVideo=e.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new o.Z,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(e){const t=new Uint8Array(e);if(t.byteLength<9)return{needMoreData:!0};const i={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return i;const s=(4&t[4])>>>2!=0,a=0!=(1&t[4]),n=(o=t)[r=5]<<24|o[r+1]<<16|o[r+2]<<8|o[r+3];var o,r;return n<9?i:{match:!0,consumed:n,dataOffset:n,hasAudioTrack:s,hasVideoTrack:a}}bindDataSource(e){return e.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(e){this._onTrackMetadata=e}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(e){this._onMediaInfo=e}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(e){this._onMetaDataArrived=e}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(e){this._onScriptDataArrived=e}get onError(){return this._onError}set onError(e){this._onError=e}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(e){this._onDataAvailable=e}get timestampBase(){return this._timestampBase}set timestampBase(e){this._timestampBase=e}get overridedDuration(){return this._duration}set overridedDuration(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo&&(this._mediaInfo.duration=e)}set overridedHasAudio(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo&&(this._mediaInfo.hasAudio=e)}set overridedHasVideo(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo&&(this._mediaInfo.hasVideo=e)}resetMediaInfo(){this._mediaInfo=new o.Z}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}parseChunks(e,t){var i,s;if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new l.rT("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let n=0;const o=this._littleEndian;if(0===t){if(!(e.byteLength>13))return 0;{const t=T.probe(e);n=(null==t?void 0:t.dataOffset)||0}}if(this._firstParse){this._firstParse=!1,t+n!==this._dataOffset&&a.Z.w(this.TAG,"First time parsing but chunk byteStart invalid!");0!==new DataView(e,n).getUint32(0,!o)&&a.Z.w(this.TAG,"PrevTagSize0 !== 0 !!!"),n+=4}for(;n<e.byteLength;){this._dispatch=!0;const i=new DataView(e,n);if(n+11+4>e.byteLength)break;const s=i.getUint8(0),r=16777215&i.getUint32(0,!o);if(n+11+r+4>e.byteLength)break;if(8!==s&&9!==s&&18!==s){a.Z.w(this.TAG,`Unsupported tag type ${s}, skipped`),n+=11+r+4;continue}const d=i.getUint8(4),l=i.getUint8(5),h=i.getUint8(6)|l<<8|d<<16|i.getUint8(7)<<24;0!==(16777215&i.getUint32(7,!o))&&a.Z.w(this.TAG,"Meet tag which has StreamID != 0!");const _=n+11;switch(s){case 8:this._parseAudioData(e,_,r,h);break;case 9:this._parseVideoData(e,_,r,h,t+n);break;case 18:this._parseScriptData(e,_,r)}const c=i.getUint32(11+r,!o);c!==11+r&&a.Z.w(this.TAG,`Invalid PrevTagSize ${c}`),n+=11+r+4}return this._isInitialMetadataDispatched()&&this._dispatch&&((null===(i=this._audioTrack)||void 0===i?void 0:i.length)||(null===(s=this._videoTrack)||void 0===s?void 0:s.length))&&this._onDataAvailable(this._audioTrack,this._videoTrack),n}_parseScriptData(e,t,i){var s,n,o;const r=c.parseScriptData(e,t,i);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!=typeof r.onMetaData)return void a.Z.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&a.Z.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;const e=null===(s=this._metadata)||void 0===s?void 0:s.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},e)),"boolean"==typeof(null==e?void 0:e.hasAudio)&&(this._hasAudioFlagOverrided||(this._hasAudio=e.hasAudio,this._mediaInfo&&(this._mediaInfo.hasAudio=this._hasAudio))),"boolean"==typeof(null==e?void 0:e.hasVideo)&&(this._hasVideoFlagOverrided||(this._hasVideo=e.hasVideo,this._mediaInfo&&(this._mediaInfo.hasVideo=this._hasVideo))),"number"==typeof(null==e?void 0:e.audiodatarate)&&this._mediaInfo&&(this._mediaInfo.audioDataRate=e.audiodatarate),"number"==typeof(null==e?void 0:e.videodatarate)&&this._mediaInfo&&(this._mediaInfo.videoDataRate=e.videodatarate),"number"==typeof(null==e?void 0:e.width)&&this._mediaInfo&&(this._mediaInfo.width=e.width),"number"==typeof(null==e?void 0:e.height)&&this._mediaInfo&&(this._mediaInfo.height=e.height),"number"==typeof(null==e?void 0:e.duration)){if(!this._durationOverrided){const t=Math.floor(e.duration*this._timescale);this._duration=t,this._mediaInfo&&(this._mediaInfo.duration=t)}}else this._mediaInfo&&(this._mediaInfo.duration=0);if("number"==typeof(null==e?void 0:e.framerate)){const t=Math.floor(1e3*e.framerate);if(t>0){const e=t/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=e,this._referenceFrameRate.fps_num=t,this._referenceFrameRate.fps_den=1e3,this._mediaInfo&&(this._mediaInfo.fps=e)}}if("object"==typeof(null==e?void 0:e.keyframes)){this._mediaInfo&&(this._mediaInfo.hasKeyframesIndex=!0);const t=e.keyframes;this._mediaInfo&&(this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(t)),e.keyframes=null}else this._mediaInfo&&(this._mediaInfo.hasKeyframesIndex=!1);this._dispatch=!1,this._mediaInfo&&(this._mediaInfo.metadata=e),a.Z.v(this.TAG,"Parsed onMetaData"),(null===(n=this._mediaInfo)||void 0===n?void 0:n.isComplete())&&(null===(o=this._onMediaInfo)||void 0===o||o.call(this,this._mediaInfo))}Object.keys(r).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},r))}_parseKeyframesIndex(e){const t=[],i=[];for(let s=1;s<e.times.length;s++){const a=this._timestampBase+Math.floor(1e3*e.times[s]);t.push(a),i.push(e.filepositions[s])}return{times:t,filepositions:i}}_parseAudioData(e,t,i,s){var n,o,r,d,l,h,_,c,u,m;if(i<=1)return void a.Z.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");if(this._hasAudioFlagOverrided&&!1===this._hasAudio)return;this._littleEndian;const f=new DataView(e,t,i).getUint8(0),g=f>>>4;if(2!==g&&10!==g)return void(null===(n=this._onError)||void 0===n||n.call(this,p.Z.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+g));let v=0;const E=(12&f)>>>2;if(!(E>=0&&E<=4))return void(null===(o=this._onError)||void 0===o||o.call(this,p.Z.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+E));v=this._flvSoundRateTable[E];const S=1&f;let y=this._audioMetadata;const b=this._audioTrack;if(y||(!1!==this._hasAudio||this._hasAudioFlagOverrided||(this._hasAudio=!0,this._mediaInfo&&(this._mediaInfo.hasAudio=!0)),y=this._audioMetadata={},y.type="audio",y.id=null==b?void 0:b.id,y.timescale=this._timescale,y.duration=this._duration,y.audioSampleRate=v,y.channelCount=0===S?1:2),10===g){const n=this._parseAACAudioData(e,t+1,i-1);if(void 0===n)return;if(0===(null==n?void 0:n.packetType)){if(null==y?void 0:y.config){if(A(n.data.config,null==y?void 0:y.config))return;a.Z.w(this.TAG,"AudioSpecificConfig has been changed, re-generate initialization segment")}const e=n.data;y.audioSampleRate=null==e?void 0:e.samplingRate,y.channelCount=null==e?void 0:e.channelCount,y.codec=null==e?void 0:e.codec,y.originalCodec=null==e?void 0:e.originalCodec,y.config=null==e?void 0:e.config,y.refSampleDuration=1024/y.audioSampleRate*y.timescale,a.Z.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&((null===(r=this._audioTrack)||void 0===r?void 0:r.length)||(null===(d=this._videoTrack)||void 0===d?void 0:d.length))&&(null===(l=this._onDataAvailable)||void 0===l||l.call(this,this._audioTrack,this._videoTrack)):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,null===(h=this._onTrackMetadata)||void 0===h||h.call(this,"audio",y);const t=this._mediaInfo;t.audioCodec=y.originalCodec||"",t.audioSampleRate=y.audioSampleRate,t.audioChannelCount=y.channelCount,t.hasVideo?null!=t.videoCodec&&(t.mimeType='video/x-flv; codecs="'+t.videoCodec+","+t.audioCodec+'"'):t.mimeType='video/x-flv; codecs="'+t.audioCodec+'"',(null==t?void 0:t.isComplete())&&(null===(_=this._onMediaInfo)||void 0===_||_.call(this,t))}else if(1===n.packetType){const e=this._timestampBase+s,t={unit:n.data,length:n.data.byteLength,dts:e,pts:e};b&&(null==b||b.samples.push(t),b.length+=(null===(c=null==n?void 0:n.data)||void 0===c?void 0:c.length)||0)}else a.Z.e(this.TAG,`Flv: Unsupported AAC data type ${n.packetType}`)}else if(2===g){if(!y.codec){const s=this._parseMP3AudioData(e,t+1,i-1,!0);if(void 0===s)return;y.audioSampleRate=s.samplingRate,y.channelCount=s.channelCount,y.codec=s.codec,y.originalCodec=s.originalCodec,y.refSampleDuration=1152/y.audioSampleRate*y.timescale,a.Z.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,null===(u=this._onTrackMetadata)||void 0===u||u.call(this,"audio",y);const n=this._mediaInfo;n.audioCodec=y.codec,n.audioSampleRate=y.audioSampleRate,n.audioChannelCount=y.channelCount,n.audioDataRate=s.bitRate,(null==n?void 0:n.hasVideo)?null!=n.videoCodec&&(n.mimeType='video/x-flv; codecs="'+n.videoCodec+","+n.audioCodec+'"'):n.mimeType='video/x-flv; codecs="'+n.audioCodec+'"',n.isComplete()&&(null===(m=this._onMediaInfo)||void 0===m||m.call(this,n))}const n=this._parseMP3AudioData(e,t+1,i-1,!1);if(void 0===n)return;const o=this._timestampBase+s,r={unit:n,length:n.byteLength,dts:o,pts:o};null==b||b.samples.push(r),b&&(b.length+=n.length)}}_parseAACAudioData(e,t,i){if(i<=1)return void a.Z.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");const s={},n=new Uint8Array(e,t,i);return s.packetType=n[0],0===n[0]?s.data=this._parseAACAudioSpecificConfig(e,t+1,i-1):s.data=n.subarray(1),s}_parseAACAudioSpecificConfig(e,t,i){var s,a;const n=new Uint8Array(e,t,i);let o=null,r=0,d=0,h=0,_=null;if(r=d=n[0]>>>3,h=(7&n[0])<<1|n[1]>>>7,h<0||h>=this._mpegSamplingRates.length)return void(null===(s=this._onError)||void 0===s||s.call(this,p.Z.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!"));const c=this._mpegSamplingRates[h],u=(120&n[1])>>>3;if(u<0||u>=8)return void(null===(a=this._onError)||void 0===a||a.call(this,p.Z.FORMAT_ERROR,"Flv: AAC invalid channel configuration"));5===r&&(_=(7&n[1])<<1|n[2]>>>7,(124&n[2])>>>2);const m=self.navigator.userAgent.toLowerCase();return m.includes("firefox")?h>=6?(r=5,o=new Array(4),_=h-3):(r=2,o=new Array(2),_=h):m.includes("android")?(r=2,o=new Array(2),_=h):(r=5,_=h,o=new Array(4),h>=6?_=h-3:1===u&&(r=2,o=new Array(2),_=h)),o[0]=r<<3,o[0]|=(15&h)>>>1,o[1]=(15&h)<<7,o[1]|=(15&u)<<3,5===r&&(o[1]|=(15&_)>>>1,o[2]=(1&_)<<7,o[2]|=8,o[3]=0),{config:o,samplingRate:c,channelCount:u,codec:"mp4a.40."+r,originalCodec:"mp4a.40."+d}}_parseMP3AudioData(e,t,i,s){if(i<4)return void a.Z.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");this._littleEndian;const n=new Uint8Array(e,t,i);let o;if(s){if(255!==n[0])return;const e=n[1]>>>3&3,t=(6&n[1])>>1,i=(240&n[2])>>>4,s=(12&n[2])>>>2,a=3!==(n[3]>>>6&3)?2:1;let r=0,d=0;const h="mp3";switch(e){case 0:r=this._mpegAudioV25SampleRateTable[s];break;case 2:r=this._mpegAudioV20SampleRateTable[s];break;case 3:r=this._mpegAudioV10SampleRateTable[s]}switch(t){case 1:i<this._mpegAudioL3BitRateTable.length&&(d=this._mpegAudioL3BitRateTable[i]);break;case 2:i<this._mpegAudioL2BitRateTable.length&&(d=this._mpegAudioL2BitRateTable[i]);break;case 3:i<this._mpegAudioL1BitRateTable.length&&(d=this._mpegAudioL1BitRateTable[i])}o={bitRate:d,samplingRate:r,channelCount:a,codec:h,originalCodec:h}}else o=n;return o}_parseVideoData(e,t,i,s,n){var o,r;if(i<=1)return void a.Z.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");if(this._hasVideoFlagOverrided&&!1===this._hasVideo)return;const d=new Uint8Array(e,t,i)[0],l=(112&d)>>>4;if(0!=(128&d)){const a=15&d,o=String.fromCharCode(...new Uint8Array(e,t,i).slice(1,5));"hvc1"===o?this._parseEnhancedHEVCVideoPacket(e,t+5,i-5,s,n,l,a):"av01"===o?this._parseEnhancedAV1VideoPacket(e,t+5,i-5,s,n,l,a):null===(r=this._onError)||void 0===r||r.call(this,p.Z.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${o}`)}else{const a=15&d;7===a?this._parseAVCVideoPacket(e,t+1,i-1,s,n,l):12===a?this._parseHEVCVideoPacket(e,t+1,i-1,s,n,l):null===(o=this._onError)||void 0===o||o.call(this,p.Z.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${a}`)}}_parseAVCVideoPacket(e,t,i,s,n,o){var r;if(i<4)return void a.Z.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");const d=this._littleEndian,l=new DataView(e,t,i),h=l.getUint8(0),_=(16777215&l.getUint32(0,!d))<<8>>8;0===h?this._parseAVCDecoderConfigurationRecord(e,t+4,i-4):1===h?this._parseAVCVideoData(e,t+4,i-4,s,n,o,_):2===h||null===(r=this._onError)||void 0===r||r.call(this,p.Z.FORMAT_ERROR,`Flv: Invalid video packet type ${h}`)}_parseHEVCVideoPacket(e,t,i,s,n,o){var r;if(i<4)return void a.Z.w(this.TAG,"Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");const d=this._littleEndian,l=new DataView(e,t,i),h=l.getUint8(0),_=(16777215&l.getUint32(0,!d))<<8>>8;0===h?this._parseHEVCDecoderConfigurationRecord(e,t+4,i-4):1===h?this._parseHEVCVideoData(e,t+4,i-4,s,n,o,_):2===h||null===(r=this._onError)||void 0===r||r.call(this,p.Z.FORMAT_ERROR,`Flv: Invalid video packet type ${h}`)}_parseEnhancedHEVCVideoPacket(e,t,i,s,a,n,o){var r;const d=this._littleEndian,l=new DataView(e,t,i);if(0===o)this._parseHEVCDecoderConfigurationRecord(e,t,i);else if(1===o){const o=(4294967040&l.getUint32(0,!d))>>8;this._parseHEVCVideoData(e,t+3,i-3,s,a,n,o)}else 3===o?this._parseHEVCVideoData(e,t,i,s,a,n,0):2===o||null===(r=this._onError)||void 0===r||r.call(this,p.Z.FORMAT_ERROR,`Flv: Invalid video packet type ${o}`)}_parseEnhancedAV1VideoPacket(e,t,i,s,a,n,o){var r,d;this._littleEndian;0===o?this._parseAV1CodecConfigurationRecord(e,t,i):1===o?this._parseAV1VideoData(e,t,i,s,a,n,0):5===o?null===(r=this._onError)||void 0===r||r.call(this,p.Z.FORMAT_ERROR,`Flv: Not Suported MP2T AV1 video packet type ${o}`):2===o||null===(d=this._onError)||void 0===d||d.call(this,p.Z.FORMAT_ERROR,`Flv: Invalid video packet type ${o}`)}_parseAVCDecoderConfigurationRecord(e,t,i){var s,n,o,r,d,l,h,_,c,u,m;if(i<7)return void a.Z.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");let g=this._videoMetadata;const v=this._videoTrack,E=this._littleEndian,S=new DataView(e,t,i);if(g){if(void 0!==g.avcc){const s=new Uint8Array(e,t,i);if(A(s,g.avcc))return;a.Z.w(this.TAG,"AVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else!1!==this._hasVideo||this._hasVideoFlagOverrided||(this._hasVideo=!0,this._mediaInfo&&(this._mediaInfo.hasVideo=!0)),g=this._videoMetadata={},g.type="video",g.id=null==v?void 0:v.id,g.timescale=this._timescale,g.duration=this._duration;const y=S.getUint8(0),b=S.getUint8(1);S.getUint8(2),S.getUint8(3);if(1!==y||0===b)return void(null===(s=this._onError)||void 0===s||s.call(this,p.Z.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord"));if(this._naluLengthSize=1+(3&S.getUint8(4)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void(null===(n=this._onError)||void 0===n||n.call(this,p.Z.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1)));const R=31&S.getUint8(5);if(0===R)return void(null===(o=this._onError)||void 0===o||o.call(this,p.Z.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS"));R>1&&a.Z.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${R}`);let T=6;for(let i=0;i<R;i++){const s=S.getUint16(T,!E);if(T+=2,0===s)continue;const a=new Uint8Array(e,t+T,s);T+=s;const n=f.parseSPS(a);if(0!==i)continue;g.codecWidth=n.codec_size.width,g.codecHeight=n.codec_size.height,g.presentWidth=n.present_size.width,g.presentHeight=n.present_size.height,g.profile=n.profile_string,g.level=n.level_string,g.bitDepth=n.bit_depth,g.chromaFormat=n.chroma_format,g.sarRatio=n.sar_ratio,g.frameRate=n.frame_rate,n.frame_rate.fixed&&0!==n.frame_rate.fps_num&&0!==n.frame_rate.fps_den||(g.frameRate=this._referenceFrameRate);const o=null===(r=g.frameRate)||void 0===r?void 0:r.fps_den,h=null===(d=g.frameRate)||void 0===d?void 0:d.fps_num;g.refSampleDuration=g.timescale*(o/h);const _=a.subarray(1,4);let c="avc1.";for(let e=0;e<3;e++){let t=_[e].toString(16);t.length<2&&(t="0"+t),c+=t}g.codec=c;const u=this._mediaInfo;u.width=g.codecWidth,u.height=g.codecHeight,u.fps=g.frameRate.fps,u.profile=g.profile,u.level=g.level,u.refFrames=n.ref_frames,u.chromaFormat=n.chroma_format_string,u.sarNum=g.sarRatio.width,u.sarDen=g.sarRatio.height,u.videoCodec=c,u.hasAudio?null!=u.audioCodec&&(u.mimeType='video/x-flv; codecs="'+u.videoCodec+","+u.audioCodec+'"'):u.mimeType='video/x-flv; codecs="'+u.videoCodec+'"',u.isComplete()&&(null===(l=this._onMediaInfo)||void 0===l||l.call(this,u))}const k=S.getUint8(T);if(0!==k){k>1&&a.Z.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${k}`),T++;for(let e=0;e<k;e++){const e=S.getUint16(T,!E);T+=2,0!==e&&(T+=e)}g.avcc=new Uint8Array(i),g.avcc.set(new Uint8Array(e,t,i),0),a.Z.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&((null===(_=this._audioTrack)||void 0===_?void 0:_.length)||(null===(c=this._videoTrack)||void 0===c?void 0:c.length))&&(null===(u=this._onDataAvailable)||void 0===u||u.call(this,this._audioTrack,this._videoTrack)):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,null===(m=this._onTrackMetadata)||void 0===m||m.call(this,"video",g)}else null===(h=this._onError)||void 0===h||h.call(this,p.Z.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}_parseHEVCDecoderConfigurationRecord(e,t,i){var s,n,o,r,d,l,h;if(i<22)return void a.Z.w(this.TAG,"Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");let _=this._videoMetadata;const c=this._videoTrack,u=this._littleEndian,m=new DataView(e,t,i);if(_){if(void 0!==_.hvcc){const s=new Uint8Array(e,t,i);if(A(s,_.hvcc))return;a.Z.w(this.TAG,"HEVCDecoderConfigurationRecord has been changed, re-generate initialization segment")}}else!1!==this._hasVideo||this._hasVideoFlagOverrided||(this._hasVideo=!0,this._mediaInfo&&(this._mediaInfo.hasVideo=!0)),_=this._videoMetadata={},_.type="video",_.id=null==c?void 0:c.id,_.timescale=this._timescale,_.duration=this._duration;const f=m.getUint8(0),g=31&m.getUint8(1);if(1!==f||0===g)return void(null===(s=this._onError)||void 0===s||s.call(this,p.Z.FORMAT_ERROR,"Flv: Invalid HEVCDecoderConfigurationRecord"));if(this._naluLengthSize=1+(3&m.getUint8(21)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void(null===(n=this._onError)||void 0===n||n.call(this,p.Z.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1)));const E=m.getUint8(22);for(let i=0,s=23;i<E;i++){const i=63&m.getUint8(s+0),a=m.getUint16(s+1,!u);s+=3;for(let n=0;n<a;n++){const a=m.getUint16(s+0,!u);if(0===n){if(33===i){s+=2;const i=new Uint8Array(e,t+s,a),n=v.parseSPS(i);_.codecWidth=n.codec_size.width,_.codecHeight=n.codec_size.height,_.presentWidth=n.present_size.width,_.presentHeight=n.present_size.height,_.profile=null==n?void 0:n.profile_string,_.level=n.level_string,_.bitDepth=n.bit_depth,_.chromaFormat=n.chroma_format,_.sarRatio=n.sar_ratio,_.frameRate=n.frame_rate,n.frame_rate.fixed&&0!==n.frame_rate.fps_num&&0!==n.frame_rate.fps_den||(_.frameRate=this._referenceFrameRate);const r=_.frameRate.fps_den,d=_.frameRate.fps_num;_.refSampleDuration=_.timescale*(r/d),_.codec=n.codec_mimetype;const l=this._mediaInfo;l.width=_.codecWidth,l.height=_.codecHeight,l.fps=_.frameRate.fps,l.profile=_.profile,l.level=_.level,l.refFrames=n.ref_frames,l.chromaFormat=n.chroma_format_string,l.sarNum=_.sarRatio.width,l.sarDen=_.sarRatio.height,l.videoCodec=n.codec_mimetype,l.hasAudio?null!=l.audioCodec&&(l.mimeType='video/x-flv; codecs="'+l.videoCodec+","+l.audioCodec+'"'):l.mimeType='video/x-flv; codecs="'+l.videoCodec+'"',l.isComplete()&&(null===(o=this._onMediaInfo)||void 0===o||o.call(this,l)),s+=a}else s+=2+a}else s+=2+a}}_.hvcc=new Uint8Array(i),_.hvcc.set(new Uint8Array(e,t,i),0),a.Z.v(this.TAG,"Parsed HEVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&((null===(r=this._audioTrack)||void 0===r?void 0:r.length)||(null===(d=this._videoTrack)||void 0===d?void 0:d.length))&&(null===(l=this._onDataAvailable)||void 0===l||l.call(this,this._audioTrack,this._videoTrack)):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,null===(h=this._onTrackMetadata)||void 0===h||h.call(this,"video",_)}_parseAV1CodecConfigurationRecord(e,t,i){var s,n,o,r,d,l,h,_,c,u,m;if(i<4)return void a.Z.w(this.TAG,"Flv: Invalid AV1CodecConfigurationRecord, lack of data!");let f=this._videoMetadata;const g=this._videoTrack,v=(this._littleEndian,new DataView(e,t,i));f?void 0!==f.av1c&&a.Z.w(this.TAG,"Found another AV1CodecConfigurationRecord!"):(!1!==this._hasVideo||this._hasVideoFlagOverrided||(this._hasVideo=!0,this._mediaInfo&&(this._mediaInfo.hasVideo=!0)),f=this._videoMetadata={},f.type="video",f.id=null==g?void 0:g.id,f.timescale=this._timescale,f.duration=this._duration);const E=127&v.getUint8(0);v.getUint8(1),v.getUint8(1),v.getUint8(2);if(1!==E)return void(null===(s=this._onError)||void 0===s||s.call(this,p.Z.FORMAT_ERROR,"Flv: Invalid AV1CodecConfigurationRecord"));const S=R.parseOBUs(new Uint8Array(e,t+4,i-4));if(null==S)return void(null===(n=this._onError)||void 0===n||n.call(this,p.Z.FORMAT_ERROR,"Flv: Invalid AV1CodecConfigurationRecord"));f.codecWidth=null===(o=null==S?void 0:S.codec_size)||void 0===o?void 0:o.width,f.codecHeight=null===(r=null==S?void 0:S.codec_size)||void 0===r?void 0:r.height,f.presentWidth=null===(d=null==S?void 0:S.present_size)||void 0===d?void 0:d.width,f.presentHeight=null===(l=null==S?void 0:S.present_size)||void 0===l?void 0:l.height,f.profile=S.profile_string,f.level=S.level_string,f.bitDepth=S.bit_depth,f.chromaFormat=S.chroma_format,f.sarRatio=S.sar_ratio,f.frameRate=S.frame_rate,S.frame_rate.fixed&&0!==S.frame_rate.fps_num&&0!==S.frame_rate.fps_den||(f.frameRate=this._referenceFrameRate);const y=f.frameRate.fps_den,A=f.frameRate.fps_num;f.refSampleDuration=f.timescale*(y/A),f.codec=S.codec_mimetype;const b=this._mediaInfo;b.width=f.codecWidth,b.height=f.codecHeight,b.fps=f.frameRate.fps,b.profile=f.profile,b.level=f.level,b.refFrames=S.ref_frames,b.chromaFormat=S.chroma_format_string,b.sarNum=f.sarRatio.width,b.sarDen=f.sarRatio.height,b.videoCodec=S.codec_mimetype,b.hasAudio?null!=b.audioCodec&&(b.mimeType='video/x-flv; codecs="'+b.videoCodec+","+b.audioCodec+'"'):b.mimeType='video/x-flv; codecs="'+b.videoCodec+'"',b.isComplete()&&(null===(h=this._onMediaInfo)||void 0===h||h.call(this,b)),f.av1c=new Uint8Array(i),f.av1c.set(new Uint8Array(e,t,i),0),a.Z.v(this.TAG,"Parsed AV1CodecConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&((null===(_=this._audioTrack)||void 0===_?void 0:_.length)||(null===(c=this._videoTrack)||void 0===c?void 0:c.length))&&(null===(u=this._onDataAvailable)||void 0===u||u.call(this,this._audioTrack,this._videoTrack)):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,null===(m=this._onTrackMetadata)||void 0===m||m.call(this,"video",f)}_parseAVCVideoData(e,t,i,s,n,o,r){const d=this._littleEndian,l=new DataView(e,t,i),h=[];let _=0,c=0;const u=this._naluLengthSize,m=this._timestampBase+s;let f=1===o;for(;c<i;){if(c+4>=i){a.Z.w(this.TAG,`Malformed Nalu near timestamp ${m}, offset = ${c}, dataSize = ${i}`);break}let s=l.getUint32(c,!d);if(3===u&&(s>>>=8),s>i-u)return void a.Z.w(this.TAG,`Malformed Nalus near timestamp ${m}, NaluSize > DataSize!`);const n=31&l.getUint8(c+u);5===n&&(f=!0);const o=new Uint8Array(e,t+c,u+s),r={type:n,data:o};h.push(r),_+=o.byteLength,c+=u+s}if(h.length){const e=this._videoTrack,t={units:h,length:_,isKeyframe:f,dts:m,cts:r,pts:m+r};f&&(t.fileposition=n),e&&(e.samples.push(t),e.length+=_)}}_parseHEVCVideoData(e,t,i,s,n,o,r){const d=this._littleEndian,l=new DataView(e,t,i),h=[];let _=0,c=0;const u=this._naluLengthSize,m=this._timestampBase+s;let f=1===o;for(;c<i;){if(c+4>=i){a.Z.w(this.TAG,`Malformed Nalu near timestamp ${m}, offset = ${c}, dataSize = ${i}`);break}let s=l.getUint32(c,!d);if(3===u&&(s>>>=8),s>i-u)return void a.Z.w(this.TAG,`Malformed Nalus near timestamp ${m}, NaluSize > DataSize!`);const n=31&l.getUint8(c+u);19!==n&&20!==n||(f=!0);const o=new Uint8Array(e,t+c,u+s),r={type:n,data:o};h.push(r),_+=o.byteLength,c+=u+s}if(h.length){const e=this._videoTrack,t={units:h,length:_,isKeyframe:f,dts:m,cts:r,pts:m+r};f&&(t.fileposition=n),e&&(null==e||e.samples.push(t),e.length+=_)}}_parseAV1VideoData(e,t,i,s,a,n,o){this._littleEndian;const r=[];let d=0;const l=this._timestampBase+s,h=1===n;if(d=i,r.push({unitType:0,data:new Uint8Array(e,t+0,i)}),r.length){const e=this._videoTrack,t={units:r,length:d,isKeyframe:h,dts:l,cts:o,pts:l+o};h&&(t.fileposition=a),e&&(null==e||e.samples.push(t),e.length+=d)}}}const k=T;class L{constructor(){}destroy(){this.onError=null,this.onMediaInfo=null,this.onMetaDataArrived=null,this.onTrackMetadata=null,this.onDataAvailable=null,this.onTimedID3Metadata=null,this.onSMPTE2038Metadata=null,this.onSCTE35Metadata=null,this.onPESPrivateData=null,this.onPESPrivateDataDescriptor=null}}class w{constructor(){this.program_pmt_pid={}}}var D,C,B,I;!function(e){e[e.kMPEG1Audio=3]="kMPEG1Audio",e[e.kMPEG2Audio=4]="kMPEG2Audio",e[e.kPESPrivateData=6]="kPESPrivateData",e[e.kADTSAAC=15]="kADTSAAC",e[e.kLOASAAC=17]="kLOASAAC",e[e.kAC3=129]="kAC3",e[e.kEAC3=135]="kEAC3",e[e.kID3=21]="kID3",e[e.kSCTE35=134]="kSCTE35",e[e.kH264=27]="kH264",e[e.kH265=36]="kH265"}(D||(D={}));class M{constructor(){this.pid_stream_type={},this.common_pids={h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0},this.pes_private_data_pids={},this.timed_id3_pids={},this.scte_35_pids={},this.smpte2038_pids={}}}class O{}class P{}class x{constructor(){this.slices=[],this.total_length=0,this.expected_length=0,this.file_position=0,this.random_access_indicator=0}}!function(e){e[e.kUnspecified=0]="kUnspecified",e[e.kSliceNonIDR=1]="kSliceNonIDR",e[e.kSliceDPA=2]="kSliceDPA",e[e.kSliceDPB=3]="kSliceDPB",e[e.kSliceDPC=4]="kSliceDPC",e[e.kSliceIDR=5]="kSliceIDR",e[e.kSliceSEI=6]="kSliceSEI",e[e.kSliceSPS=7]="kSliceSPS",e[e.kSlicePPS=8]="kSlicePPS",e[e.kSliceAUD=9]="kSliceAUD",e[e.kEndOfSequence=10]="kEndOfSequence",e[e.kEndOfStream=11]="kEndOfStream",e[e.kFiller=12]="kFiller",e[e.kSPSExt=13]="kSPSExt",e[e.kReserved0=14]="kReserved0"}(C||(C={}));class U{}class Z{constructor(e){const t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t);new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}}class N{constructor(e){this.TAG="H264AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=e,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&a.Z.e(this.TAG,"Could not find H264 startcode until payload end!")}findNextStartCodeOffset(e){let t=e;const i=this.data_;for(;;){if(t+3>=i.byteLength)return this.eof_flag_=!0,i.byteLength;const e=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],s=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1===e||1===s)return t;t++}}readNextNaluPayload(){const e=this.data_;let t=null;for(;null==t&&!this.eof_flag_;){let i=this.current_startcode_offset_;i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;const s=31&e[i],a=(128&e[i])>>>7,n=this.findNextStartCodeOffset(i);if(this.current_startcode_offset_=n,s>=C.kReserved0)continue;if(0!==a)continue;const o=e.subarray(i,n);t=new U,t.type=s,t.data=o}return t}}class G{constructor(e,t,i){let s=8+e.byteLength+1+2+t.byteLength,a=!1;66!==e[3]&&77!==e[3]&&88!==e[3]&&(a=!0,s+=4);const n=this.data=new Uint8Array(s);n[0]=1,n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=255,n[5]=225;const o=e.byteLength;n[6]=o>>>8,n[7]=255&o;let r=8;n.set(e,8),r+=o,n[r]=1;const d=t.byteLength;n[r+1]=d>>>8,n[r+2]=255&d,n.set(t,r+3),r+=3+d,a&&(n[r]=252|i.chroma_format_idc,n[r+1]=248|i.bit_depth_luma-8,n[r+2]=248|i.bit_depth_chroma-8,n[r+3]=0,r+=4)}getData(){return this.data}}!function(e){e[e.kNull=0]="kNull",e[e.kAACMain=1]="kAACMain",e[e.kAAC_LC=2]="kAAC_LC",e[e.kAAC_SSR=3]="kAAC_SSR",e[e.kAAC_LTP=4]="kAAC_LTP",e[e.kAAC_SBR=5]="kAAC_SBR",e[e.kAAC_Scalable=6]="kAAC_Scalable",e[e.kLayer1=32]="kLayer1",e[e.kLayer2=33]="kLayer2",e[e.kLayer3=34]="kLayer3"}(B||(B={})),function(e){e[e.k96000Hz=0]="k96000Hz",e[e.k88200Hz=1]="k88200Hz",e[e.k64000Hz=2]="k64000Hz",e[e.k48000Hz=3]="k48000Hz",e[e.k44100Hz=4]="k44100Hz",e[e.k32000Hz=5]="k32000Hz",e[e.k24000Hz=6]="k24000Hz",e[e.k22050Hz=7]="k22050Hz",e[e.k16000Hz=8]="k16000Hz",e[e.k12000Hz=9]="k12000Hz",e[e.k11025Hz=10]="k11025Hz",e[e.k8000Hz=11]="k8000Hz",e[e.k7350Hz=12]="k7350Hz"}(I||(I={}));const V=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];class F{}class z extends F{}class H{constructor(e){this.TAG="AACADTSParser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&a.Z.e(this.TAG,"Could not found ADTS syncword until payload end")}findNextSyncwordOffset(e){let t=e;const i=this.data_;for(;;){if(t+7>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(4095===(i[t+0]<<8|i[t+1])>>>4)return t;t++}}readNextAACFrame(){const e=this.data_;let t=null;for(;null==t&&!this.eof_flag_;){let i=this.current_syncword_offset_;const s=(8&e[i+1])>>>3,a=(6&e[i+1])>>>1,n=1&e[i+1],o=(192&e[i+2])>>>6,r=(60&e[i+2])>>>2,d=(1&e[i+2])<<2|(192&e[i+3])>>>6,l=(3&e[i+3])<<11|e[i+4]<<3|(224&e[i+5])>>>5;e[i+6];if(i+l>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}const h=1===n?7:9,_=l-h;i+=h;const c=this.findNextSyncwordOffset(i+_);if(this.current_syncword_offset_=c,0!==s&&1!==s||0!==a)continue;const u=e.subarray(i,i+_);t=new F,t.audio_object_type=o+1,t.sampling_freq_index=r,t.sampling_frequency=V[r],t.channel_config=d,t.data=u}return t}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}class q{constructor(e){this.TAG="AACLOASParser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&a.Z.e(this.TAG,"Could not found LOAS syncword until payload end")}findNextSyncwordOffset(e){let t=e;const i=this.data_;for(;;){if(t+1>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(695===(i[t+0]<<3|i[t+1]>>>5))return t;t++}}getLATMValue(e){const t=e.readBits(2);let i=0;for(let s=0;s<=t;s++)i<<=8,i|=e.readByte();return i}readNextAACFrame(e){const t=this.data_;let i=null;for(;null==i&&!this.eof_flag_;){const s=this.current_syncword_offset_,n=(31&t[s+1])<<8|t[s+2];if(s+3+n>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}const o=new u(t.subarray(s+3,s+3+n));let r=null;if(o.readBool()){if(null==e){a.Z.w(this.TAG,"StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(s+3+n),o.destroy();continue}r=e}else{const e=o.readBool();if(e&&o.readBool()){a.Z.e(this.TAG,"audioMuxVersionA is Not Supported"),o.destroy();break}e&&this.getLATMValue(o);if(!o.readBool()){a.Z.e(this.TAG,"allStreamsSameTimeFraming zero is Not Supported"),o.destroy();break}if(0!==o.readBits(6)){a.Z.e(this.TAG,"more than 2 numSubFrames Not Supported"),o.destroy();break}if(0!==o.readBits(4)){a.Z.e(this.TAG,"more than 2 numProgram Not Supported"),o.destroy();break}if(0!==o.readBits(3)){a.Z.e(this.TAG,"more than 2 numLayer Not Supported"),o.destroy();break}let t=e?this.getLATMValue(o):0;const i=o.readBits(5);t-=5;const s=o.readBits(4);t-=4;const n=o.readBits(4);t-=4,o.readBits(3),t-=3,t>0&&o.readBits(t);const d=o.readBits(3);if(0!==d){a.Z.e(this.TAG,`frameLengthType = ${d}. Only frameLengthType = 0 Supported`),o.destroy();break}o.readByte();const l=o.readBool();if(l)if(e)this.getLATMValue(o);else{let e=0;for(;;){e<<=8;const t=o.readBool();if(e+=o.readByte(),!t)break}console.log(e)}o.readBool()&&o.readByte(),r=new z,r.audio_object_type=i,r.sampling_freq_index=s,r.sampling_frequency=V[r.sampling_freq_index],r.channel_config=n,r.other_data_present=l}let d=0;for(;;){const e=o.readByte();if(d+=e,255!==e)break}const l=new Uint8Array(d);for(let e=0;e<d;e++)l[e]=o.readByte();i=new z,i.audio_object_type=r.audio_object_type,i.sampling_freq_index=r.sampling_freq_index,i.sampling_frequency=V[r.sampling_freq_index],i.channel_config=r.channel_config,i.other_data_present=r.other_data_present,i.data=l,this.current_syncword_offset_=this.findNextSyncwordOffset(s+3+n)}return i}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}class ${constructor(e){let t=[];const i=e.audio_object_type;let s=e.audio_object_type;const a=e.sampling_freq_index,n=e.channel_config;let o=0;const r=navigator.userAgent.toLowerCase();r.includes("firefox")?a>=6?(s=5,t=new Array(4),o=a-3):(s=2,t=new Array(2),o=a):r.includes("android")?(s=2,t=new Array(2),o=a):(s=5,o=a,t=new Array(4),a>=6?o=a-3:1===n&&(s=2,t=new Array(2),o=a)),t[0]=s<<3,t[0]|=(15&a)>>>1,t[1]=(15&a)<<7,t[1]|=(15&n)<<3,5===s&&(t[1]|=(15&o)>>>1,t[2]=(1&o)<<7,t[2]|=8,t[3]=0),this.config=t,this.sampling_rate=V[a],this.channel_count=n,this.codec_mimetype="mp4a.40."+s.toString(),this.original_codec_mimetype="mp4a.40."+i.toString()}}class j{}class W{}var K;!function(e){e[e.kSpliceNull=0]="kSpliceNull",e[e.kSpliceSchedule=4]="kSpliceSchedule",e[e.kSpliceInsert=5]="kSpliceInsert",e[e.kTimeSignal=6]="kTimeSignal",e[e.kBandwidthReservation=7]="kBandwidthReservation",e[e.kPrivateCommand=255]="kPrivateCommand"}(K||(K={}));const X=e=>{const t=e.readBool();if(t){e.readBits(6);return{time_specified_flag:t,pts_time:4*e.readBits(31)+e.readBits(2)}}return e.readBits(7),{time_specified_flag:t}},Y=e=>{const t=e.readBool();e.readBits(6);return{auto_return:t,duration:4*e.readBits(31)+e.readBits(2)}},J=(e,t)=>{const i=t.readBits(8);if(e)return{component_tag:i};return{component_tag:i,splice_time:X(t)}},Q=e=>({component_tag:e.readBits(8),utc_splice_time:e.readBits(32)}),ee=e=>{const t=e.readBits(32),i=e.readBool();e.readBits(7);const s={splice_event_id:t,splice_event_cancel_indicator:i};if(i)return s;if(s.out_of_network_indicator=e.readBool(),s.program_splice_flag=e.readBool(),s.duration_flag=e.readBool(),e.readBits(5),s.program_splice_flag)s.utc_splice_time=e.readBits(32);else{s.component_count=e.readBits(8),s.components=[];for(let t=0;t<s.component_count;t++)s.components.push(Q(e))}return s.duration_flag&&(s.break_duration=Y(e)),s.unique_program_id=e.readBits(16),s.avail_num=e.readBits(8),s.avails_expected=e.readBits(8),s},te=(e,t,i,s)=>({descriptor_tag:e,descriptor_length:t,identifier:i,provider_avail_id:s.readBits(32)}),ie=(e,t,i,s)=>{const a=s.readBits(8),n=s.readBits(3);s.readBits(5);let o="";for(let e=0;e<n;e++)o+=String.fromCharCode(s.readBits(8));return{descriptor_tag:e,descriptor_length:t,identifier:i,preroll:a,dtmf_count:n,DTMF_char:o}},se=e=>{const t=e.readBits(8);e.readBits(7);return{component_tag:t,pts_offset:4*e.readBits(31)+e.readBits(2)}},ae=(e,t,i,s)=>{const a=s.readBits(32),n=s.readBool();s.readBits(7);const o={descriptor_tag:e,descriptor_length:t,identifier:i,segmentation_event_id:a,segmentation_event_cancel_indicator:n};if(n)return o;if(o.program_segmentation_flag=s.readBool(),o.segmentation_duration_flag=s.readBool(),o.delivery_not_restricted_flag=s.readBool(),o.delivery_not_restricted_flag?s.readBits(5):(o.web_delivery_allowed_flag=s.readBool(),o.no_regional_blackout_flag=s.readBool(),o.archive_allowed_flag=s.readBool(),o.device_restrictions=s.readBits(2)),!o.program_segmentation_flag){o.component_count=s.readBits(8),o.components=[];for(let e=0;e<o.component_count;e++)o.components.push(se(s))}o.segmentation_duration_flag&&(o.segmentation_duration=s.readBits(40)),o.segmentation_upid_type=s.readBits(8),o.segmentation_upid_length=s.readBits(8);{const e=new Uint8Array(o.segmentation_upid_length);for(let t=0;t<o.segmentation_upid_length;t++)e[t]=s.readBits(8);o.segmentation_upid=e.buffer}return o.segmentation_type_id=s.readBits(8),o.segment_num=s.readBits(8),o.segments_expected=s.readBits(8),52!==o.segmentation_type_id&&54!==o.segmentation_type_id&&56!==o.segmentation_type_id&&58!==o.segmentation_type_id||(o.sub_segment_num=s.readBits(8),o.sub_segments_expected=s.readBits(8)),o},ne=(e,t,i,s)=>({descriptor_tag:e,descriptor_length:t,identifier:i,TAI_seconds:s.readBits(48),TAI_ns:s.readBits(32),UTC_offset:s.readBits(16)}),oe=e=>({component_tag:e.readBits(8),ISO_code:String.fromCharCode(e.readBits(8),e.readBits(8),e.readBits(8)),Bit_Stream_Mode:e.readBits(3),Num_Channels:e.readBits(4),Full_Srvc_Audio:e.readBool()}),re=(e,t,i,s)=>{const a=s.readBits(4),n=[];for(let e=0;e<a;e++)n.push(oe(s));return{descriptor_tag:e,descriptor_length:t,identifier:i,audio_count:a,components:n}},de=e=>{var t,i,s,a,n,o;const r=new u(e),d=r.readBits(8),l=r.readBool(),h=r.readBool();r.readBits(2);const _=r.readBits(12),c=r.readBits(8),m=r.readBool(),f=r.readBits(6),p=4*r.readBits(31)+r.readBits(2),g=r.readBits(8),v=r.readBits(12),E=r.readBits(12),S=r.readBits(8);let y=null;S===K.kSpliceNull?y={}:S===K.kSpliceSchedule?y=(e=>{const t=e.readBits(8),i=[];for(let s=0;s<t;s++)i.push(ee(e));return{splice_count:t,events:i}})(r):S===K.kSpliceInsert?y=(e=>{const t=e.readBits(32),i=e.readBool();e.readBits(7);const s={splice_event_id:t,splice_event_cancel_indicator:i};if(i)return s;if(s.out_of_network_indicator=e.readBool(),s.program_splice_flag=e.readBool(),s.duration_flag=e.readBool(),s.splice_immediate_flag=e.readBool(),e.readBits(4),s.program_splice_flag&&!s.splice_immediate_flag&&(s.splice_time=X(e)),!s.program_splice_flag){s.component_count=e.readBits(8),s.components=[];for(let t=0;t<s.component_count;t++)s.components.push(J(s.splice_immediate_flag,e))}return s.duration_flag&&(s.break_duration=Y(e)),s.unique_program_id=e.readBits(16),s.avail_num=e.readBits(8),s.avails_expected=e.readBits(8),s})(r):S===K.kTimeSignal?y=(e=>({splice_time:X(e)}))(r):S===K.kBandwidthReservation?y={}:S===K.kPrivateCommand?y=((e,t)=>{const i=String.fromCharCode(t.readBits(8),t.readBits(8),t.readBits(8),t.readBits(8)),s=new Uint8Array(e-4);for(let i=0;i<e-4;i++)s[i]=t.readBits(8);return{identifier:i,private_data:s.buffer}})(E,r):r.readBits(8*E);const A=[],b=r.readBits(16);for(let e=0;e<b;){const t=r.readBits(8),i=r.readBits(8),s=String.fromCharCode(r.readBits(8),r.readBits(8),r.readBits(8),r.readBits(8));0===t?A.push(te(t,i,s,r)):1===t?A.push(ie(t,i,s,r)):2===t?A.push(ae(t,i,s,r)):3===t?A.push(ne(t,i,s,r)):4===t?A.push(re(t,i,s,r)):r.readBits(8*(i-4)),e+=2+i}const R={table_id:d,section_syntax_indicator:l,private_indicator:h,section_length:_,protocol_version:c,encrypted_packet:m,encryption_algorithm:f,pts_adjustment:p,cw_index:g,tier:v,splice_command_length:E,splice_command_type:S,splice_command:y,descriptor_loop_length:b,splice_descriptors:A,E_CRC32:m?r.readBits(32):void 0,CRC32:r.readBits(32)};if(S===K.kSpliceInsert){const r=y;if(r.splice_event_cancel_indicator)return{splice_command_type:S,detail:R,data:e};if(r.program_splice_flag&&!r.splice_immediate_flag){const n=r.duration_flag?null===(t=null==r?void 0:r.break_duration)||void 0===t?void 0:t.auto_return:void 0,o=r.duration_flag?((null===(i=null==r?void 0:r.break_duration)||void 0===i?void 0:i.duration)||0)/90:void 0;return(null===(s=r.splice_time)||void 0===s?void 0:s.time_specified_flag)?{splice_command_type:S,pts:(p+((null===(a=null==r?void 0:r.splice_time)||void 0===a?void 0:a.pts_time)||0))%Math.pow(2,33),auto_return:n,duraiton:o,detail:R,data:e}:{splice_command_type:S,auto_return:n,duraiton:o,detail:R,data:e}}return{splice_command_type:S,auto_return:r.duration_flag?null===(n=r.break_duration)||void 0===n?void 0:n.auto_return:void 0,duraiton:r.duration_flag?((null===(o=r.break_duration)||void 0===o?void 0:o.duration)||0)/90:void 0,detail:R,data:e}}if(S===K.kTimeSignal){const t=y;return t.splice_time.time_specified_flag?{splice_command_type:S,pts:(p+(t.splice_time.pts_time||0))%Math.pow(2,33),detail:R,data:e}:{splice_command_type:S,detail:R,data:e}}return{splice_command_type:S,detail:R,data:e}};var le;!function(e){e[e.kSliceIDR_W_RADL=19]="kSliceIDR_W_RADL",e[e.kSliceIDR_N_LP=20]="kSliceIDR_N_LP",e[e.kSliceCRA_NUT=21]="kSliceCRA_NUT",e[e.kSliceVPS=32]="kSliceVPS",e[e.kSliceSPS=33]="kSliceSPS",e[e.kSlicePPS=34]="kSlicePPS",e[e.kSliceAUD=35]="kSliceAUD"}(le||(le={}));class he{}class _e{constructor(e){const t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t);new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}}class ce{constructor(e){this.TAG="H265AnnexBParser",this.current_startcode_offset_=0,this.eof_flag_=!1,this.data_=e,this.current_startcode_offset_=this.findNextStartCodeOffset(0),this.eof_flag_&&a.Z.e(this.TAG,"Could not find H265 startcode until payload end!")}findNextStartCodeOffset(e){let t=e;const i=this.data_;for(;;){if(t+3>=i.byteLength)return this.eof_flag_=!0,i.byteLength;const e=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],s=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1===e||1===s)return t;t++}}readNextNaluPayload(){const e=this.data_;let t=null;for(;null==t&&!this.eof_flag_;){let i=this.current_startcode_offset_;i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;const s=e[i]>>1&63,a=(128&e[i])>>>7,n=this.findNextStartCodeOffset(i);if(this.current_startcode_offset_=n,0!==a)continue;const o=e.subarray(i,n);t=new he,t.type=s,t.data=o}return t}}class ue{constructor(e,t,i,s){const a=23+(5+e.byteLength)+(5+t.byteLength)+(5+i.byteLength),n=this.data=new Uint8Array(a);n[0]=1,n[1]=(3&s.general_profile_space)<<6|(s.general_tier_flag?1:0)<<5|31&s.general_profile_idc,n[2]=s.general_profile_compatibility_flags_1,n[3]=s.general_profile_compatibility_flags_2,n[4]=s.general_profile_compatibility_flags_3,n[5]=s.general_profile_compatibility_flags_4,n[6]=s.general_constraint_indicator_flags_1,n[7]=s.general_constraint_indicator_flags_2,n[8]=s.general_constraint_indicator_flags_3,n[9]=s.general_constraint_indicator_flags_4,n[10]=s.general_constraint_indicator_flags_5,n[11]=s.general_constraint_indicator_flags_6,n[12]=s.general_level_idc,n[13]=240|(3840&s.min_spatial_segmentation_idc)>>8,n[14]=255&s.min_spatial_segmentation_idc,n[15]=252|3&s.parallelismType,n[16]=252|3&s.chroma_format_idc,n[17]=248|7&s.bit_depth_luma_minus8,n[18]=248|7&s.bit_depth_chroma_minus8,n[19]=0,n[20]=0,n[21]=(3&s.constant_frame_rate)<<6|(7&s.num_temporal_layers)<<3|(s.temporal_id_nested?1:0)<<2|3,n[22]=3,n[23]=128|le.kSliceVPS,n[24]=0,n[25]=1,n[26]=(65280&e.byteLength)>>8,n[27]=(255&e.byteLength)>>0,n.set(e,28),n[23+(5+e.byteLength)+0]=128|le.kSliceSPS,n[23+(5+e.byteLength)+1]=0,n[23+(5+e.byteLength)+2]=1,n[23+(5+e.byteLength)+3]=(65280&t.byteLength)>>8,n[23+(5+e.byteLength)+4]=(255&t.byteLength)>>0,n.set(t,23+(5+e.byteLength)+5),n[23+(5+e.byteLength+5+t.byteLength)+0]=128|le.kSlicePPS,n[23+(5+e.byteLength+5+t.byteLength)+1]=0,n[23+(5+e.byteLength+5+t.byteLength)+2]=1,n[23+(5+e.byteLength+5+t.byteLength)+3]=(65280&i.byteLength)>>8,n[23+(5+e.byteLength+5+t.byteLength)+4]=(255&i.byteLength)>>0,n.set(i,23+(5+e.byteLength+5+t.byteLength)+5)}getData(){return this.data}}class me{}class fe{}class pe{}const ge=[[64,64,80,80,96,96,112,112,128,128,160,160,192,192,224,224,256,256,320,320,384,384,448,448,512,512,640,640,768,768,896,896,1024,1024,1152,1152,1280,1280],[69,70,87,88,104,105,121,122,139,140,174,175,208,209,243,244,278,279,348,349,417,418,487,488,557,558,696,697,835,836,975,976,1114,1115,1253,1254,1393,1394],[96,96,120,120,144,144,168,168,192,192,240,240,288,288,336,336,384,384,480,480,576,576,672,672,768,768,960,960,1152,1152,1344,1344,1536,1536,1728,1728,1920,1920]];class ve{constructor(e){this.TAG="AC3Parser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&a.Z.e(this.TAG,"Could not found AC3 syncword until payload end")}findNextSyncwordOffset(e){let t=e;const i=this.data_;for(;;){if(t+7>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(2935===(i[t+0]<<8|i[t+1]<<0))return t;t++}}readNextAC3Frame(){const e=this.data_;let t=null;for(;null==t&&!this.eof_flag_;){const i=this.current_syncword_offset_,s=e[i+4]>>6,a=[48e3,44200,33e3][s],n=63&e[i+4],o=2*ge[s][n];if(i+o>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}const r=this.findNextSyncwordOffset(i+o);this.current_syncword_offset_=r;const d=e[i+5]>>3,l=7&e[i+5],h=e[i+6]>>5;let _=0;0!=(1&h)&&1!==h&&(_+=2),0!=(4&h)&&(_+=2),2===h&&(_+=2);const c=(e[i+6]<<8|e[i+7]<<0)>>12-_&1,u=[2,1,2,3,3,4,4,5][h]+c;t=new pe,t.sampling_frequency=a,t.channel_count=u,t.channel_mode=h,t.bit_stream_identification=d,t.low_frequency_effects_channel_on=c,t.bit_stream_mode=l,t.frame_size_code=n,t.data=e.subarray(i,i+o)}return t}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}class Ee{constructor(e){let t=[];t=[e.sampling_rate_code<<6|e.bit_stream_identification<<1|e.bit_stream_mode>>2,(3&e.bit_stream_mode)<<6|e.channel_mode<<3|e.low_frequency_effects_channel_on<<2|e.frame_size_code>>4,e.frame_size_code<<4&224],this.config=t,this.sampling_rate=e.sampling_frequency,this.bit_stream_identification=e.bit_stream_identification,this.bit_stream_mode=e.bit_stream_mode,this.low_frequency_effects_channel_on=e.low_frequency_effects_channel_on,this.channel_count=e.channel_count,this.channel_mode=e.channel_mode,this.codec_mimetype="ac-3",this.original_codec_mimetype="ac-3"}}class Se{}class ye{constructor(e){this.TAG="EAC3Parser",this.data_=e,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&a.Z.e(this.TAG,"Could not found AC3 syncword until payload end")}findNextSyncwordOffset(e){let t=e;const i=this.data_;for(;;){if(t+7>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(2935===(i[t+0]<<8|i[t+1]<<0))return t;t++}}readNextEAC3Frame(){const e=this.data_;let t=null;for(;null==t&&!this.eof_flag_;){const i=this.current_syncword_offset_,s=new u(e.subarray(i+2)),a=(s.readBits(2),s.readBits(3),s.readBits(11)+1<<1);let n=s.readBits(2),o=null,r=null;3===n?(n=s.readBits(2),o=[24e3,22060,16e3][n],r=3):(o=[48e3,44100,32e3][n],r=s.readBits(2));const d=s.readBits(3),l=s.readBits(1),h=s.readBits(5);if(i+a>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}const _=this.findNextSyncwordOffset(i+a);this.current_syncword_offset_=_;const c=[2,1,2,3,3,4,4,5][d]+l;s.destroy(),t=new Se,t.sampling_frequency=o,t.channel_count=c,t.channel_mode=d,t.bit_stream_identification=h,t.low_frequency_effects_channel_on=l,t.frame_size=a,t.num_blks=[1,2,3,6][r],t.data=e.subarray(i,i+a)}return t}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}class Ae{constructor(e){let t=[];const i=Math.floor(e.frame_size*e.sampling_frequency/(16*e.num_blks));t=[255&i,248&i,e.sampling_rate_code<<6|e.bit_stream_identification<<1|0,0|e.channel_mode<<1|e.low_frequency_effects_channel_on<<0,0],this.config=t,this.sampling_rate=e.sampling_frequency,this.bit_stream_identification=e.bit_stream_identification,this.num_blks=e.num_blks,this.low_frequency_effects_channel_on=e.low_frequency_effects_channel_on,this.channel_count=e.channel_count,this.channel_mode=e.channel_mode,this.codec_mimetype="ec-3",this.original_codec_mimetype="ec-3"}}const be=class extends L{constructor(e,t){super(),this.TAG="TSDemuxer",this.first_parse_=!0,this.media_info_=new o.Z,this.timescale_=90,this.duration_=0,this.current_pmt_pid_=-1,this.program_pmt_map_={},this.pes_slice_queues_={},this.section_slice_queues_={},this.video_metadata_={vps:void 0,sps:void 0,pps:void 0,details:void 0},this.audio_metadata_={codec:void 0,audio_object_type:void 0,sampling_freq_index:void 0,sampling_frequency:void 0,channel_config:void 0},this.aac_last_sample_pts_=void 0,this.aac_last_incomplete_data_=null,this.has_video_=!1,this.has_audio_=!1,this.video_init_segment_dispatched_=!1,this.audio_init_segment_dispatched_=!1,this.video_metadata_changed_=!1,this.audio_metadata_changed_=!1,this.loas_previous_frame=null,this.video_track_={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this.audio_track_={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this.ts_packet_size_=e.ts_packet_size,this.sync_offset_=e.sync_offset,this.config_=t}destroy(){this.media_info_=null,this.pes_slice_queues_=null,this.section_slice_queues_=null,this.video_metadata_=null,this.audio_metadata_=null,this.aac_last_incomplete_data_=null,this.video_track_=null,this.audio_track_=null,super.destroy()}static probe(e){const t=new Uint8Array(e);let i=-1,s=188;if(t.byteLength<=3*s)return{needMoreData:!0};for(;-1===i;){const e=Math.min(1e3,t.byteLength-3*s);for(let a=0;a<e;){if(71===t[a]&&71===t[a+s]&&71===t[a+2*s]){i=a;break}a++}if(-1===i)if(188===s)s=192;else{if(192!==s)break;s=204}}return-1===i?{match:!1}:(192===s&&i>=4?(a.Z.v("TSDemuxer","ts_packet_size = 192, m2ts mode"),i-=4):204===s&&a.Z.v("TSDemuxer","ts_packet_size = 204, RS encoded MPEG2-TS stream"),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})}bindDataSource(e){return e.onDataArrival=this.parseChunks.bind(this),this}resetMediaInfo(){this.media_info_=new o.Z}parseChunks(e,t){var i;if(!(this.onError&&this.onMediaInfo&&this.onTrackMetadata&&this.onDataAvailable))throw new l.rT("onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let s=0;for(this.first_parse_&&(this.first_parse_=!1,s=this.sync_offset_);s+this.ts_packet_size_<=e.byteLength;){const n=t+s;192===this.ts_packet_size_&&(s+=4);const o=new Uint8Array(e,s,188),r=o[0];if(71!==r){a.Z.e(this.TAG,`sync_byte = ${r}, not 0x47`);break}const d=(64&o[1])>>>6,l=(o[1],(31&o[1])<<8|o[2]),h=(48&o[3])>>>4,_=15&o[3];let c={},u=4;if(2===h||3===h){const t=o[4];if(5+t===188){s+=188,204===this.ts_packet_size_&&(s+=16);continue}t>0&&(c=this.parseAdaptationField(e,s+4,1+t)),u=5+t}if(1===h||3===h)if(0===l||l===this.current_pmt_pid_||void 0!==this.pmt_&&this.pmt_.pid_stream_type[l]===D.kSCTE35){const t=188-u;this.handleSectionSlice(e,s+u,t,{pid:l,file_position:n,payload_unit_start_indicator:d,continuity_conunter:_,random_access_indicator:c.random_access_indicator})}else if(void 0!==(null===(i=this.pmt_)||void 0===i?void 0:i.pid_stream_type[l])){const t=188-u,i=this.pmt_.pid_stream_type[l];(l===this.pmt_.common_pids.h264||l===this.pmt_.common_pids.h265||l===this.pmt_.common_pids.adts_aac||l===this.pmt_.common_pids.loas_aac||l===this.pmt_.common_pids.ac3||l===this.pmt_.common_pids.eac3||l===this.pmt_.common_pids.opus||l===this.pmt_.common_pids.mp3||this.pmt_.pes_private_data_pids[l]||this.pmt_.timed_id3_pids[l])&&this.handlePESSlice(e,s+u,t,{pid:l,stream_type:i,file_position:n,payload_unit_start_indicator:d,continuity_conunter:_,random_access_indicator:c.random_access_indicator})}s+=188,204===this.ts_packet_size_&&(s+=16)}return this.dispatchAudioVideoMediaSegment(),s}parseAdaptationField(e,t,i){const s=new Uint8Array(e,t,i),n=s[0];if(n>0){if(n>183)return a.Z.w(this.TAG,`Illegal adaptation_field_length: ${n}`),{};return{discontinuity_indicator:(128&s[1])>>>7,random_access_indicator:(64&s[1])>>>6,elementary_stream_priority_indicator:(32&s[1])>>>5}}return{}}handleSectionSlice(e,t,i,s){const a=new Uint8Array(e,t,i);let n=this.section_slice_queues_?this.section_slice_queues_[s.pid]:{};if(s.payload_unit_start_indicator){const o=a[0];if(void 0!==n&&0!==(null==n?void 0:n.total_length)){const a=new Uint8Array(e,t+1,Math.min(i,o));n.slices.push(a),n.total_length+=a.byteLength,n.total_length===n.expected_length?this.emitSectionSlices(n,s):this.clearSlices(n,s)}for(let r=1+o;r<a.byteLength;){if(255===a[r+0])break;const o=(15&a[r+1])<<8|a[r+2];this.section_slice_queues_&&(this.section_slice_queues_[s.pid]=new x,n=this.section_slice_queues_[s.pid]),n.expected_length=o+3,n.file_position=s.file_position,n.random_access_indicator=s.random_access_indicator;const d=new Uint8Array(e,t+r,Math.min(i-r,n.expected_length-n.total_length));n.slices.push(d),n.total_length+=d.byteLength,n.total_length===n.expected_length?this.emitSectionSlices(n,s):n.total_length>=n.expected_length&&this.clearSlices(n,s),r+=d.byteLength}}else if(void 0!==n&&0!==n.total_length){const a=new Uint8Array(e,t,Math.min(i,n.expected_length-n.total_length));n.slices.push(a),n.total_length+=a.byteLength,n.total_length===n.expected_length?this.emitSectionSlices(n,s):n.total_length>=n.expected_length&&this.clearSlices(n,s)}}handlePESSlice(e,t,i,s){const n=new Uint8Array(e,t,i),o=n[0]<<16|n[1]<<8|n[2],r=(n[3],n[4]<<8|n[5]);if(s.payload_unit_start_indicator){if(1!==o)return void a.Z.e(this.TAG,`handlePESSlice: packet_start_code_prefix should be 1 but with value ${o}`);const e=this.pes_slice_queues_[s.pid];e&&(0===e.expected_length||e.expected_length===e.total_length?this.emitPESSlices(e,s):this.clearSlices(e,s)),this.pes_slice_queues_&&(this.pes_slice_queues_[s.pid]=new x,this.pes_slice_queues_[s.pid].file_position=s.file_position,this.pes_slice_queues_[s.pid].random_access_indicator=s.random_access_indicator)}if(void 0===this.pes_slice_queues_[s.pid])return;const d=this.pes_slice_queues_[s.pid];d.slices.push(n),s.payload_unit_start_indicator&&(d.expected_length=0===r?0:r+6),d.total_length+=n.byteLength,d.expected_length>0&&d.expected_length===d.total_length?this.emitPESSlices(d,s):d.expected_length>0&&d.expected_length<d.total_length&&this.clearSlices(d,s)}emitSectionSlices(e,t){const i=new Uint8Array(e.total_length);for(let t=0,s=0;t<e.slices.length;t++){const a=e.slices[t];i.set(a,s),s+=a.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;const s=new P;s.pid=t.pid,s.data=i,s.file_position=e.file_position,s.random_access_indicator=e.random_access_indicator,this.parseSection(s)}emitPESSlices(e,t){const i=new Uint8Array(e.total_length);for(let t=0,s=0;t<e.slices.length;t++){const a=e.slices[t];i.set(a,s),s+=a.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;const s=new O;s.pid=t.pid,s.data=i,s.stream_type=t.stream_type,s.file_position=e.file_position,s.random_access_indicator=e.random_access_indicator,this.parsePES(s)}clearSlices(e,t){e.slices=[],e.expected_length=-1,e.total_length=0}parseSection(e){var t;const i=e.data,s=e.pid;0===s?this.parsePAT(i):s===this.current_pmt_pid_?this.parsePMT(i):(null===(t=this.pmt_)||void 0===t?void 0:t.scte_35_pids[s])&&this.parseSCTE35(i)}parsePES(e){const t=e.data,i=t[0]<<16|t[1]<<8|t[2],s=t[3],n=t[4]<<8|t[5];if(1===i){if(188!==s&&190!==s&&191!==s&&240!==s&&241!==s&&255!==s&&242!==s&&248!==s){t[6];const i=(192&t[7])>>>6,o=t[8];let r,d;2!==i&&3!==i||(r=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,d=3===i?536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2:r);const l=9+o;let h;if(0!==n){if(n<3+o)return void a.Z.v(this.TAG,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");h=n-3-o}else h=t.byteLength-l;const _=t.subarray(l,l+h);switch(e.stream_type){case D.kMPEG1Audio:case D.kMPEG2Audio:this.parseMP3Payload(_,r);break;case D.kPESPrivateData:this.pmt_.common_pids.opus===e.pid?this.parseOpusPayload(_,r):this.pmt_.common_pids.ac3===e.pid?this.parseAC3Payload(_,r):this.pmt_.common_pids.eac3===e.pid?this.parseEAC3Payload(_,r):this.pmt_.smpte2038_pids[e.pid]?this.parseSMPTE2038MetadataPayload(_,r,d,e.pid,s):this.parsePESPrivateDataPayload(_,r,d,e.pid,s);break;case D.kADTSAAC:this.parseADTSAACPayload(_,r);break;case D.kLOASAAC:this.parseLOASAACPayload(_,r);break;case D.kAC3:this.parseAC3Payload(_,r);break;case D.kEAC3:this.parseEAC3Payload(_,r);break;case D.kID3:this.parseTimedID3MetadataPayload(_,r,d,e.pid,s);break;case D.kH264:this.parseH264Payload(_,r,d,e.file_position,e.random_access_indicator);break;case D.kH265:this.parseH265Payload(_,r,d,e.file_position,e.random_access_indicator)}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&e.stream_type===D.kPESPrivateData){const i=6;let a;a=0!==n?n:t.byteLength-i;const o=t.subarray(i,i+a);this.parsePESPrivateDataPayload(o,void 0,void 0,e.pid,s)}}else a.Z.e(this.TAG,`parsePES: packet_start_code_prefix should be 1 but with value ${i}`)}parsePAT(e){const t=e[0];if(0!==t)return void a.Z.e(this.TAG,`parsePAT: table_id ${t} is not corresponded to PAT!`);const i=(15&e[1])<<8|e[2],s=(e[3],e[4],(62&e[5])>>>1),n=1&e[5],o=e[6];e[7];let r=null;if(1===n&&0===o)r=new w,r.version_number=s;else if(r=this.pat_,null==r)return;const d=i-5-4;let l=-1,h=-1;for(let t=8;t<8+d;t+=4){const i=e[t]<<8|e[t+1],s=(31&e[t+2])<<8|e[t+3];0===i?r.network_pid=s:(r.program_pmt_pid[i]=s,-1===l&&(l=i),-1===h&&(h=s))}1===n&&0===o&&(void 0===this.pat_&&a.Z.v(this.TAG,`Parsed first PAT: ${JSON.stringify(r)}`),this.pat_=r,this.current_program_=l,this.current_pmt_pid_=h)}parsePMT(e){const t=e[0];if(2!==t)return void a.Z.e(this.TAG,`parsePMT: table_id ${t} is not corresponded to PMT!`);const i=(15&e[1])<<8|e[2],s=e[3]<<8|e[4],n=(62&e[5])>>>1,o=1&e[5],r=e[6];e[7];let d=null;if(1===o&&0===r)d=new M,d.program_number=s,d.version_number=n,this.program_pmt_map_[s]=d;else if(d=this.program_pmt_map_[s],null==d)return;e[8],e[9];const l=(15&e[10])<<8|e[11],h=12+l,_=i-9-l-4;for(let t=h;t<h+_;){const i=e[t],s=(31&e[t+1])<<8|e[t+2],n=(15&e[t+3])<<8|e[t+4];d.pid_stream_type[s]=i;const o=d.common_pids.h264||d.common_pids.h265,r=d.common_pids.adts_aac||d.common_pids.loas_aac||d.common_pids.ac3||d.common_pids.eac3||d.common_pids.opus||d.common_pids.mp3;if(i!==D.kH264||o){if(i!==D.kH265||o){if(i!==D.kADTSAAC||r){if(i!==D.kLOASAAC||r){if(i!==D.kAC3||r){if(i!==D.kEAC3||r){if(i!==D.kMPEG1Audio&&i!==D.kMPEG2Audio||r){if(i===D.kPESPrivateData){if(d.pes_private_data_pids[s]=!0,n>0){for(let i=t+5;i<t+5+n;){const t=e[i+0],n=e[i+1];if(5===t){const t=String.fromCharCode(...Array.from(e.subarray(i+2,i+2+n)));"VANC"===t?d.smpte2038_pids[s]=!0:"Opus"===t&&(d.common_pids.opus=s)}else if(127===t&&s===d.common_pids.opus){let t=null;if(128===e[i+2]&&(t=e[i+3]),null==t){a.Z.e(this.TAG,"Not Supported Opus channel count.");continue}const s={codec:"opus",channel_count:0==(15&t)?2:15&t,channel_config_code:t,sample_rate:48e3},n={codec:"opus",meta:s};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(n)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(n)):(this.audio_metadata_=s,this.dispatchAudioInitSegment(n))}i+=2+n}const o=e.subarray(t+5,t+5+n);this.dispatchPESPrivateDataDescriptor(s,i,o)}}else i===D.kID3?d.timed_id3_pids[s]=!0:i===D.kSCTE35&&(d.scte_35_pids[s]=!0)}else d.common_pids.mp3=s}else d.common_pids.eac3=s}else d.common_pids.ac3=s}else d.common_pids.loas_aac=s}else d.common_pids.adts_aac=s}else d.common_pids.h265=s}else d.common_pids.h264=s;t+=5+n}s===this.current_program_&&(void 0===this.pmt_&&a.Z.v(this.TAG,`Parsed first PMT: ${JSON.stringify(d)}`),this.pmt_=d,(d.common_pids.h264||d.common_pids.h265)&&(this.has_video_=!0),(d.common_pids.adts_aac||d.common_pids.loas_aac||d.common_pids.ac3||d.common_pids.opus||d.common_pids.mp3)&&(this.has_audio_=!0))}parseSCTE35(e){const t=de(e);if(void 0!==t.pts){const e=Math.floor(t.pts/this.timescale_);t.pts=e}else t.nearest_pts=this.aac_last_sample_pts_;this.onSCTE35Metadata&&this.onSCTE35Metadata(t)}parseH264Payload(e,t,i,s,n){var o,r;const d=new N(e);let l=null;const h=[];let _=0,c=!1;for(;null!=(l=d.readNextNaluPayload());){const e=new Z(l);if(e.type===C.kSliceSPS){const t=f.parseSPS(l.data);this.video_init_segment_dispatched_?this.detectVideoMetadataChange(e,t)&&(a.Z.v(this.TAG,"H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:e,pps:void 0,details:t}):this.video_metadata_&&(this.video_metadata_.sps=e,this.video_metadata_.details=t)}else e.type===C.kSlicePPS?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(this.video_metadata_&&(this.video_metadata_.pps=e),(null===(o=this.video_metadata_)||void 0===o?void 0:o.sps)&&(null===(r=this.video_metadata_)||void 0===r?void 0:r.pps)&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):(e.type===C.kSliceIDR||e.type===C.kSliceNonIDR&&1===n)&&(c=!0);this.video_init_segment_dispatched_&&(h.push(e),_+=e.data.byteLength)}const u=Math.floor(t/this.timescale_),m=Math.floor(i/this.timescale_);if(h.length){const e=this.video_track_,t={units:h,length:_,isKeyframe:c,dts:m,pts:u,cts:u-m,file_position:s};e&&(e.samples.push(t),e.length+=_)}}parseH265Payload(e,t,i,s,n){var o,r,d,l,h,_,c;const u=new ce(e);let m=null;const f=[];let p=0,g=!1;for(;null!=(m=u.readNextNaluPayload());){const e=new _e(m);if(e.type===le.kSliceVPS){if(!this.video_init_segment_dispatched_){const t=v.parseVPS(m.data);this.video_metadata_&&(this.video_metadata_.vps=e,this.video_metadata_.details=Object.assign(Object.assign({},null===(o=this.video_metadata_)||void 0===o?void 0:o.details),t))}}else if(e.type===le.kSliceSPS){const t=v.parseSPS(m.data);this.video_init_segment_dispatched_?this.detectVideoMetadataChange(e,t)&&(a.Z.v(this.TAG,"H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:e,pps:void 0,details:t}):this.video_metadata_&&(this.video_metadata_.sps=e,this.video_metadata_.details=Object.assign(Object.assign({},null===(r=this.video_metadata_)||void 0===r?void 0:r.details),t))}else if(e.type===le.kSlicePPS){if(!this.video_init_segment_dispatched_||this.video_metadata_changed_){const t=v.parsePPS(m.data);this.video_metadata_&&(this.video_metadata_.pps=e,this.video_metadata_.details=Object.assign(Object.assign({},null===(d=this.video_metadata_)||void 0===d?void 0:d.details),t)),(null===(l=this.video_metadata_)||void 0===l?void 0:l.vps)&&(null===(h=this.video_metadata_)||void 0===h?void 0:h.sps)&&(null===(_=this.video_metadata_)||void 0===_?void 0:_.pps)&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())}}else e.type!==le.kSliceIDR_W_RADL&&e.type!==le.kSliceIDR_N_LP&&e.type!==le.kSliceCRA_NUT||(g=!0);this.video_init_segment_dispatched_&&(f.push(e),p+=e.data.byteLength)}const E=Math.floor(t/this.timescale_),S=Math.floor(i/this.timescale_);if(f.length){const e=this.video_track_,t={units:f,length:p,isKeyframe:g,dts:S,pts:E,cts:E-S,file_position:s};e&&(null===(c=e.samples)||void 0===c||c.push(t),e.length+=p)}}detectVideoMetadataChange(e,t){var i,s,n,o,r,d,l,h,_,c;if(t.codec_mimetype!==(null===(s=null===(i=this.video_metadata_)||void 0===i?void 0:i.details)||void 0===s?void 0:s.codec_mimetype))return a.Z.v(this.TAG,`Video: Codec mimeType changed from ${null===(n=this.video_metadata_)||void 0===n?void 0:n.details.codec_mimetype} to ${null==t?void 0:t.codec_mimetype}`),!0;if(t.codec_size.width!==(null===(r=null===(o=this.video_metadata_)||void 0===o?void 0:o.details)||void 0===r?void 0:r.codec_size.width)||t.codec_size.height!==(null===(l=null===(d=this.video_metadata_)||void 0===d?void 0:d.details)||void 0===l?void 0:l.codec_size.height)){const e=null===(h=this.video_metadata_)||void 0===h?void 0:h.details.codec_size,i=t.codec_size;return a.Z.v(this.TAG,`Video: Coded Resolution changed from ${e.width}x${e.height} to ${i.width}x${i.height}`),!0}return t.present_size.width!==(null===(_=this.video_metadata_)||void 0===_?void 0:_.details.present_size.width)&&(a.Z.v(this.TAG,`Video: Present resolution width changed from ${null===(c=this.video_metadata_)||void 0===c?void 0:c.details.present_size.width} to ${null==t?void 0:t.present_size.width}`),!0)}isInitSegmentDispatched(){return this.has_video_&&this.has_audio_?this.video_init_segment_dispatched_&&this.audio_init_segment_dispatched_:this.has_video_&&!this.has_audio_?this.video_init_segment_dispatched_:!(this.has_video_||!this.has_audio_)&&this.audio_init_segment_dispatched_}dispatchVideoInitSegment(){var e,t,i,s,n,o,r,d,l,h,_,c;const u=null===(e=this.video_metadata_)||void 0===e?void 0:e.details,m={type:"video"};m.id=null===(t=this.video_track_)||void 0===t?void 0:t.id,m.timescale=1e3,m.duration=this.duration_,m.codecWidth=u.codec_size.width,m.codecHeight=u.codec_size.height,m.presentWidth=u.present_size.width,m.presentHeight=u.present_size.height,m.profile=u.profile_string,m.level=u.level_string,m.bitDepth=u.bit_depth,m.chromaFormat=u.chroma_format,m.sarRatio=u.sar_ratio,m.frameRate=u.frame_rate;const f=m.frameRate.fps_den,p=m.frameRate.fps_num;if(m.refSampleDuration=f/p*1e3,m.codec=u.codec_mimetype,null===(i=this.video_metadata_)||void 0===i?void 0:i.vps){const e=null===(s=this.video_metadata_)||void 0===s?void 0:s.vps.data.subarray(4),t=null===(o=null===(n=this.video_metadata_)||void 0===n?void 0:n.sps)||void 0===o?void 0:o.data.subarray(4),i=null===(d=null===(r=this.video_metadata_)||void 0===r?void 0:r.pps)||void 0===d?void 0:d.data.subarray(4),l=new ue(e,t,i,u);m.hvcc=l.getData(),this.video_init_segment_dispatched_||a.Z.v(this.TAG,`Generated first HEVCDecoderConfigurationRecord for mimeType: ${m.codec}`)}else{const e=null===(h=null===(l=this.video_metadata_)||void 0===l?void 0:l.sps)||void 0===h?void 0:h.data.subarray(4),t=null===(c=null===(_=this.video_metadata_)||void 0===_?void 0:_.pps)||void 0===c?void 0:c.data.subarray(4),i=new G(e,t,u);m.avcc=i.getData(),this.video_init_segment_dispatched_||a.Z.v(this.TAG,`Generated first AVCDecoderConfigurationRecord for mimeType: ${m.codec}`)}this.onTrackMetadata&&this.onTrackMetadata("video",m),this.video_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;const g=this.media_info_;g.hasVideo=!0,g.width=m.codecWidth,g.height=m.codecHeight,g.fps=m.frameRate.fps,g.profile=m.profile,g.level=m.level,g.refFrames=u.ref_frames,g.chromaFormat=u.chroma_format_string,g.sarNum=m.sarRatio.width,g.sarDen=m.sarRatio.height,g.videoCodec=m.codec,g.hasAudio&&g.audioCodec?g.mimeType=`video/mp2t; codecs="${g.videoCodec},${g.audioCodec}"`:g.mimeType=`video/mp2t; codecs="${g.videoCodec}"`,g.isComplete()&&this.onMediaInfo&&this.onMediaInfo(g)}dispatchVideoMediaSegment(){var e;this.isInitSegmentDispatched()&&(null===(e=this.video_track_)||void 0===e?void 0:e.length)&&this.onDataAvailable&&this.onDataAvailable(null,this.video_track_)}dispatchAudioMediaSegment(){var e;this.isInitSegmentDispatched()&&(null===(e=this.audio_track_)||void 0===e?void 0:e.length)&&this.onDataAvailable&&this.onDataAvailable(this.audio_track_,null)}dispatchAudioVideoMediaSegment(){var e,t;this.isInitSegmentDispatched()&&((null===(e=this.audio_track_)||void 0===e?void 0:e.length)||(null===(t=this.video_track_)||void 0===t?void 0:t.length))&&this.onDataAvailable&&this.onDataAvailable(this.audio_track_,this.video_track_)}parseADTSAACPayload(e,t){var i,s,n;if(this.has_video_&&!this.video_init_segment_dispatched_)return;if(this.aac_last_incomplete_data_){const t=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength);t.set(this.aac_last_incomplete_data_,0),t.set(e,this.aac_last_incomplete_data_.byteLength),e=t}let o,r=0;if(void 0!==t&&(r=t/this.timescale_),"aac"===(null===(i=this.audio_metadata_)||void 0===i?void 0:i.codec)){if(void 0===t&&void 0!==this.aac_last_sample_pts_)o=1024/(null===(s=this.audio_metadata_)||void 0===s?void 0:s.sampling_frequency)*1e3,r=this.aac_last_sample_pts_+o;else if(void 0===t)return void a.Z.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.aac_last_sample_pts_){o=1024/this.audio_metadata_.sampling_frequency*1e3;const e=this.aac_last_sample_pts_+o;Math.abs(e-r)>1&&(a.Z.w(this.TAG,`AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${r}ms`),r=e)}}const d=new H(e);let l=null,h=r,_=0;for(;null!=(l=d.readNextAACFrame());){o=1024/l.sampling_frequency*1e3;const e={codec:"aac",data:l};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)):(this.audio_metadata_={codec:"aac",audio_object_type:l.audio_object_type,sampling_freq_index:l.sampling_freq_index,sampling_frequency:l.sampling_frequency,channel_config:l.channel_config},this.dispatchAudioInitSegment(e)),_=h;const t=Math.floor(h),i={unit:l.data,length:l.data.byteLength,pts:t,dts:t};this.audio_track_&&(null===(n=this.audio_track_)||void 0===n||n.samples.push(i),this.audio_track_.length+=l.data.byteLength),h+=o}d.hasIncompleteData()&&(this.aac_last_incomplete_data_=d.getIncompleteData()),_&&(this.aac_last_sample_pts_=_)}parseLOASAACPayload(e,t){var i,s,n;if(this.has_video_&&!this.video_init_segment_dispatched_)return;if(this.aac_last_incomplete_data_){const t=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength);t.set(this.aac_last_incomplete_data_,0),t.set(e,this.aac_last_incomplete_data_.byteLength),e=t}let o,r=0;if(void 0!==t&&(r=t/this.timescale_),"aac"===(null===(i=this.audio_metadata_)||void 0===i?void 0:i.codec)){if(void 0===t&&void 0!==this.aac_last_sample_pts_)o=1024/this.audio_metadata_.sampling_frequency*1e3,r=this.aac_last_sample_pts_+o;else if(void 0===t)return void a.Z.w(this.TAG,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.aac_last_sample_pts_){o=1024/this.audio_metadata_.sampling_frequency*1e3;const e=this.aac_last_sample_pts_+o;Math.abs(e-r)>1&&(a.Z.w(this.TAG,`AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${r}ms`),r=e)}}const d=new q(e);let l=null,h=r,_=0;for(;null!=(l=d.readNextAACFrame(null!==(s=this.loas_previous_frame)&&void 0!==s?s:void 0));){this.loas_previous_frame=l,o=1024/l.sampling_frequency*1e3;const e={codec:"aac",data:l};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)):(this.audio_metadata_={codec:"aac",audio_object_type:l.audio_object_type,sampling_freq_index:l.sampling_freq_index,sampling_frequency:l.sampling_frequency,channel_config:l.channel_config},this.dispatchAudioInitSegment(e)),_=h;const t=Math.floor(h),i={unit:l.data,length:l.data.byteLength,pts:t,dts:t};this.audio_track_&&(null===(n=this.audio_track_)||void 0===n||n.samples.push(i),this.audio_track_.length+=l.data.byteLength),h+=o}d.hasIncompleteData()&&(this.aac_last_incomplete_data_=d.getIncompleteData()),_&&(this.aac_last_sample_pts_=_)}parseAC3Payload(e,t){var i,s;if(this.has_video_&&!this.video_init_segment_dispatched_)return;let n,o=0;if(void 0!==t&&(o=t/this.timescale_),"ac-3"===(null===(i=this.audio_metadata_)||void 0===i?void 0:i.codec))if(void 0===t&&void 0!==this.aac_last_sample_pts_)n=1536/this.audio_metadata_.sampling_frequency*1e3,o=this.aac_last_sample_pts_+n;else if(void 0===t)return void a.Z.w(this.TAG,"AC3: Unknown pts");const r=new ve(e);let d=null,l=o,h=0;for(;null!=(d=r.readNextAC3Frame());){n=1536/d.sampling_frequency*1e3;const e={codec:"ac-3",data:d};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)):(this.audio_metadata_={codec:"ac-3",sampling_frequency:d.sampling_frequency,bit_stream_identification:d.bit_stream_identification,bit_stream_mode:d.bit_stream_mode,low_frequency_effects_channel_on:d.low_frequency_effects_channel_on,channel_mode:d.channel_mode},this.dispatchAudioInitSegment(e)),h=l;const t=Math.floor(l),i={unit:d.data,length:d.data.byteLength,pts:t,dts:t};this.audio_track_&&(null===(s=this.audio_track_)||void 0===s||s.samples.push(i),this.audio_track_.length+=d.data.byteLength),l+=n}h&&(this.aac_last_sample_pts_=h)}parseEAC3Payload(e,t){var i,s;if(this.has_video_&&!this.video_init_segment_dispatched_)return;let n,o=0;if(void 0!==t&&(o=t/this.timescale_),"ec-3"===(null===(i=this.audio_metadata_)||void 0===i?void 0:i.codec))if(void 0===t&&void 0!==this.aac_last_sample_pts_)n=256*(this.audio_metadata_.num_blks||0)/(this.audio_metadata_.sampling_frequency||0)*1e3,o=this.aac_last_sample_pts_+n;else if(void 0===t)return void a.Z.w(this.TAG,"EAC3: Unknown pts");const r=new ye(e);let d=null,l=o,h=0;for(;null!=(d=r.readNextEAC3Frame());){n=1536/d.sampling_frequency*1e3;const e={codec:"ec-3",data:d};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)):(this.audio_metadata_={codec:"ec-3",sampling_frequency:d.sampling_frequency,bit_stream_identification:d.bit_stream_identification,low_frequency_effects_channel_on:d.low_frequency_effects_channel_on,num_blks:d.num_blks,channel_mode:d.channel_mode},this.dispatchAudioInitSegment(e)),h=l;const t=Math.floor(l),i={unit:d.data,length:d.data.byteLength,pts:t,dts:t};this.audio_track_&&(null===(s=this.audio_track_)||void 0===s||s.samples.push(i),this.audio_track_.length+=d.data.byteLength),l+=n}h&&(this.aac_last_sample_pts_=h)}parseOpusPayload(e,t){var i,s;if(this.has_video_&&!this.video_init_segment_dispatched_)return;let n,o=0;if(void 0!==t&&(o=t/this.timescale_),"opus"===(null===(i=this.audio_metadata_)||void 0===i?void 0:i.codec))if(void 0===t&&void 0!==this.aac_last_sample_pts_)n=20,o=this.aac_last_sample_pts_+n;else if(void 0===t)return void a.Z.w(this.TAG,"Opus: Unknown pts");let r=o,d=0;for(let t=0;t<e.length;){n=20;const i=0!=(16&e[t+1]),a=0!=(8&e[t+1]);let o=t+2,l=0;for(;255===e[o];)l+=255,o+=1;l+=e[o],o+=1,o+=i?2:0,o+=a?2:0,d=r;const h=Math.floor(r),_=e.slice(o,o+l),c={unit:_,length:_.byteLength,pts:h,dts:h};this.audio_track_&&(null===(s=this.audio_track_)||void 0===s||s.samples.push(c),this.audio_track_.length+=_.byteLength),r+=n,t=o+l}d&&(this.aac_last_sample_pts_=d)}parseMP3Payload(e,t){var i;if(this.has_video_&&!this.video_init_segment_dispatched_)return;const s=[44100,48e3,32e3,0],a=[22050,24e3,16e3,0],n=[11025,12e3,8e3,0],l=e[1]>>>3&3,h=(6&e[1])>>1;(240&e[2])>>>4;const c=(12&e[2])>>>2,u=3!==(e[3]>>>6&3)?2:1;let m=0,p=34;switch(l){case 0:m=n[c];break;case 2:m=a[c];break;case 3:m=s[c]}switch(h){case 1:p=34;break;case 2:p=33;break;case 3:p=32}const g=new fe;g.object_type=p,g.sample_rate=m,g.channel_count=u,g.data=e;const v={codec:"mp3",data:g};this.audio_init_segment_dispatched_?this.detectAudioMetadataChange(v)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(v)):(this.audio_metadata_={codec:"mp3",object_type:p,sample_rate:m,channel_count:u},this.dispatchAudioInitSegment(v));const E={unit:e,length:e.byteLength,pts:t/this.timescale_,dts:t/this.timescale_};this.audio_track_&&(null===(i=this.audio_track_)||void 0===i||i.samples.push(E),this.audio_track_.length+=e.byteLength)}detectAudioMetadataChange(e){var t,i,s,n;if(e.codec!==(null===(t=this.audio_metadata_)||void 0===t?void 0:t.codec))return a.Z.v(this.TAG,`Audio: Audio Codecs changed from ${null===(i=this.audio_metadata_)||void 0===i?void 0:i.codec} to ${e.codec}`),!0;if("aac"===e.codec&&"aac"===this.audio_metadata_.codec){const t=e.data;if(t.audio_object_type!==this.audio_metadata_.audio_object_type)return a.Z.v(this.TAG,`AAC: AudioObjectType changed from ${this.audio_metadata_.audio_object_type} to ${t.audio_object_type}`),!0;if(t.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return a.Z.v(this.TAG,`AAC: SamplingFrequencyIndex changed from ${this.audio_metadata_.sampling_freq_index} to ${t.sampling_freq_index}`),!0;if(t.channel_config!==this.audio_metadata_.channel_config)return a.Z.v(this.TAG,`AAC: Channel configuration changed from ${null===(s=this.audio_metadata_)||void 0===s?void 0:s.channel_config} to ${t.channel_config}`),!0}else if("ac-3"===e.codec&&"ac-3"===this.audio_metadata_.codec){const t=e.data;if(t.sampling_frequency!==this.audio_metadata_.sampling_frequency)return a.Z.v(this.TAG,`AC3: Sampling Frequency changed from ${null===(n=this.audio_metadata_)||void 0===n?void 0:n.sampling_frequency} to ${t.sampling_frequency}`),!0;if(t.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return a.Z.v(this.TAG,`AC3: Bit Stream Identification changed from ${this.audio_metadata_.bit_stream_identification} to ${t.bit_stream_identification}`),!0;if(t.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return a.Z.v(this.TAG,`AC3: BitStream Mode changed from ${this.audio_metadata_.bit_stream_mode} to ${t.bit_stream_mode}`),!0;if(t.channel_mode!==this.audio_metadata_.channel_mode)return a.Z.v(this.TAG,`AC3: Channel Mode changed from ${this.audio_metadata_.channel_mode} to ${t.channel_mode}`),!0;if(t.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return a.Z.v(this.TAG,`AC3: Low Frequency Effects Channel On changed from ${this.audio_metadata_.low_frequency_effects_channel_on} to ${t.low_frequency_effects_channel_on}`),!0}else if("opus"===e.codec&&"opus"===this.audio_metadata_.codec){const t=e.meta;if(t.sample_rate!==this.audio_metadata_.sample_rate)return a.Z.v(this.TAG,`Opus: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`),!0;if(t.channel_count!==this.audio_metadata_.channel_count)return a.Z.v(this.TAG,`Opus: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`),!0}else if("mp3"===e.codec&&"mp3"===this.audio_metadata_.codec){const t=e.data;if(t.object_type!==this.audio_metadata_.object_type)return a.Z.v(this.TAG,`MP3: AudioObjectType changed from ${this.audio_metadata_.object_type} to ${t.object_type}`),!0;if(t.sample_rate!==this.audio_metadata_.sample_rate)return a.Z.v(this.TAG,`MP3: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`),!0;if(t.channel_count!==this.audio_metadata_.channel_count)return a.Z.v(this.TAG,`MP3: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`),!0}return!1}dispatchAudioInitSegment(e){var t,i,s,n,o,r;const d={type:"audio"};if(d.id=null===(t=this.audio_track_)||void 0===t?void 0:t.id,d.timescale=1e3,d.duration=this.duration_,"aac"===(null===(i=this.audio_metadata_)||void 0===i?void 0:i.codec)){const t="aac"===e.codec?e.data:null,i=new $(t);d.audioSampleRate=i.sampling_rate,d.channelCount=i.channel_count,d.codec=i.codec_mimetype,d.originalCodec=i.original_codec_mimetype,d.config=i.config,d.refSampleDuration=1024/d.audioSampleRate*d.timescale}else if("ac-3"===(null===(s=this.audio_metadata_)||void 0===s?void 0:s.codec)){const t="ac-3"===e.codec?e.data:null,i=new Ee(t);d.audioSampleRate=i.sampling_rate,d.channelCount=i.channel_count,d.codec=i.codec_mimetype,d.originalCodec=i.original_codec_mimetype,d.config=i.config,d.refSampleDuration=1536/d.audioSampleRate*d.timescale}else if("ec-3"===(null===(n=this.audio_metadata_)||void 0===n?void 0:n.codec)){const t="ec-3"===e.codec?e.data:null,i=new Ae(t);d.audioSampleRate=i.sampling_rate,d.channelCount=i.channel_count,d.codec=i.codec_mimetype,d.originalCodec=i.original_codec_mimetype,d.config=i.config,d.refSampleDuration=256*i.num_blks/d.audioSampleRate*d.timescale}else"opus"===(null===(o=this.audio_metadata_)||void 0===o?void 0:o.codec)?(d.audioSampleRate=this.audio_metadata_.sample_rate,d.channelCount=this.audio_metadata_.channel_count,d.channelConfigCode=this.audio_metadata_.channel_config_code,d.codec="opus",d.originalCodec="opus",d.config=void 0,d.refSampleDuration=20):"mp3"===(null===(r=this.audio_metadata_)||void 0===r?void 0:r.codec)&&(d.audioSampleRate=this.audio_metadata_.sample_rate,d.channelCount=this.audio_metadata_.channel_count,d.codec="mp3",d.originalCodec="mp3",d.config=void 0);this.audio_init_segment_dispatched_||a.Z.v(this.TAG,`Generated first AudioSpecificConfig for mimeType: ${d.codec}`),this.onTrackMetadata&&this.onTrackMetadata("audio",d),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;const l=this.media_info_;l.hasAudio=!0,l.audioCodec=d.originalCodec,l.audioSampleRate=d.audioSampleRate,l.audioChannelCount=d.channelCount,l.hasVideo&&l.videoCodec?l.mimeType=`video/mp2t; codecs="${l.videoCodec},${l.audioCodec}"`:l.mimeType=`video/mp2t; codecs="${l.audioCodec}"`,l.isComplete()&&this.onMediaInfo&&this.onMediaInfo(l)}dispatchPESPrivateDataDescriptor(e,t,i){const s=new W;s.pid=e,s.stream_type=t,s.descriptor=i,this.onPESPrivateDataDescriptor&&this.onPESPrivateDataDescriptor(s)}parsePESPrivateDataPayload(e,t,i,s,a){const n=new j;if(n.pid=s,n.stream_id=a,n.len=e.byteLength,n.data=e,void 0!==t){const e=Math.floor(t/this.timescale_);n.pts=e}else n.nearest_pts=this.aac_last_sample_pts_;if(void 0!==i){const e=Math.floor(i/this.timescale_);n.dts=e}this.onPESPrivateData&&this.onPESPrivateData(n)}parseTimedID3MetadataPayload(e,t,i,s,a){const n=new j;if(n.pid=s,n.stream_id=a,n.len=e.byteLength,n.data=e,void 0!==t){const e=Math.floor(t/this.timescale_);n.pts=e}if(void 0!==i){const e=Math.floor(i/this.timescale_);n.dts=e}this.onTimedID3Metadata&&this.onTimedID3Metadata(n)}parseSMPTE2038MetadataPayload(e,t,i,s,a){const n=new me;if(n.pid=s,n.stream_id=a,n.len=e.byteLength,n.data=e,void 0!==t){const e=Math.floor(t/this.timescale_);n.pts=e}if(n.nearest_pts=this.aac_last_sample_pts_,void 0!==i){const e=Math.floor(i/this.timescale_);n.dts=e}n.ancillaries=(e=>{let t=new u(e),i=0;const s=[];for(;i+=6,0===t.readBits(6);){const e=t.readBool();i+=1;const a=t.readBits(11);i+=11;const n=t.readBits(12);i+=12;const o=255&t.readBits(10);i+=10;const r=255&t.readBits(10);i+=10;const d=255&t.readBits(10);i+=10;const l=new Uint8Array(d);for(let e=0;e<d;e++){const s=255&t.readBits(10);i+=10,l[e]=s}t.readBits(10),i+=10;let h="User Defined";const _={};65===o?7===r&&(h="SCTE-104"):95===o?220===r?h="ARIB STD-B37 (1SEG)":221===r?h="ARIB STD-B37 (ANALOG)":222===r?h="ARIB STD-B37 (SD)":223===r&&(h="ARIB STD-B37 (HD)"):97===o&&(1===r?h="EIA-708":2===r&&(h="EIA-608")),s.push({yc_indicator:e,line_number:a,horizontal_offset:n,did:o,sdid:r,user_data:l,description:h,information:_}),t.readBits(8-(i-Math.floor(i/8))%8),i+=(8-(i-Math.floor(i/8)))%8}return t.destroy(),t=null,s})(e),this.onSMPTE2038Metadata&&this.onSMPTE2038Metadata(n)}},Re=new Uint8Array([0,0,0,0,0,0,0,0]);class Te{static init(){Te.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],hvc1:[],hvcC:[],av01:[],av1C:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(const e in Te.types)Te.types.hasOwnProperty(e)&&(Te.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)])}static box(e,...t){let i=8,s=null;const a=Array.prototype.slice.call(arguments,1),n=a.length;for(let e=0;e<n;e++)i+=a[e].byteLength;s=new Uint8Array(i),s[0]=i>>>24&255,s[1]=i>>>16&255,s[2]=i>>>8&255,s[3]=255&i,s.set(e,4);let o=8;for(let e=0;e<n;e++)s.set(a[e],o),o+=a[e].byteLength;return s}static generateInitSegment(e){const t=Te.box(Te.types.ftyp,Te.constants.FTYP),i=Te.moov(e),s=new Uint8Array(t.byteLength+i.byteLength);return s.set(t,0),s.set(i,t.byteLength),s}static moov(e){const t=Te.mvhd(e.timescale,e.duration),i=Te.trak(e),s=Te.mvex(e);return Te.box(Te.types.moov,t,i,s)}static mvhd(e,t){return Te.box(Te.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(e){return Te.box(Te.types.trak,Te.tkhd(e),Te.mdia(e))}static tkhd(e){const t=e.id,i=e.duration,s=e.presentWidth,a=e.presentHeight;return Te.box(Te.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>>8&255,255&s,0,0,a>>>8&255,255&a,0,0]))}static mdia(e){return Te.box(Te.types.mdia,Te.mdhd(e),Te.hdlr(e),Te.minf(e))}static mdhd(e){const t=e.timescale,i=e.duration;return Te.box(Te.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t="audio"===e.type?Te.constants.HDLR_AUDIO:Te.constants.HDLR_VIDEO,Te.box(Te.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?Te.box(Te.types.smhd,Te.constants.SMHD):Te.box(Te.types.vmhd,Te.constants.VMHD),Te.box(Te.types.minf,t,Te.dinf(),Te.stbl(e))}static dinf(){return Te.box(Te.types.dinf,Te.box(Te.types.dref,Te.constants.DREF))}static stbl(e){return Te.box(Te.types.stbl,Te.stsd(e),Te.box(Te.types.stts,Te.constants.STTS),Te.box(Te.types.stsc,Te.constants.STSC),Te.box(Te.types.stsz,Te.constants.STSZ),Te.box(Te.types.stco,Te.constants.STCO))}static stsd(e){return"audio"===e.type?"mp3"===e.codec?Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.mp3(e)):"ac-3"===e.codec?Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.ac3(e)):"ec-3"===e.codec?Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.ec3(e)):"opus"===e.codec?Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.Opus(e)):Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.mp4a(e)):"video"===e.type&&e.codec.startsWith("hvc1")?Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.hvc1(e)):"video"===e.type&&e.codec.startsWith("av01")?Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.av01(e)):Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.avc1(e))}static mp3(e){const t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return Te.box(Te.types[".mp3"],s)}static mp4a(e){const t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return Te.box(Te.types.mp4a,s,Te.esds(e))}static ac3(e){var t;const i=e.channelCount,s=e.audioSampleRate,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,s>>>8&255,255&s,0,0]);return Te.box(Te.types["ac-3"],a,Te.box(Te.types.dac3,new Uint8Array(null!==(t=e.config)&&void 0!==t?t:[])))}static ec3(e){var t;const i=e.channelCount,s=e.audioSampleRate,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,s>>>8&255,255&s,0,0]);return Te.box(Te.types["ec-3"],a,Te.box(Te.types.dec3,new Uint8Array(null!==(t=e.config)&&void 0!==t?t:[])))}static esds(e){var t;const i=null!==(t=e.config)&&void 0!==t?t:[],s=i.length,a=new Uint8Array([0,0,0,0,3,23+s,0,1,0,4,15+s,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([s]).concat(i).concat([6,1,2]));return Te.box(Te.types.esds,a)}static Opus(e){const t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return Te.box(Te.types.Opus,s,Te.dOps(e))}static dOps(e){const t=e.channelCount,i=e.channelConfigCode,s=e.audioSampleRate;let a=[];switch(i){case 1:case 2:a=[0];break;case 0:a=[255,1,1,0,1];break;case 128:a=[255,2,0,0,1];break;case 3:a=[1,2,1,0,2,1];break;case 4:a=[1,2,2,0,1,2,3];break;case 5:a=[1,3,2,0,4,1,2,3];break;case 6:a=[1,4,2,0,4,1,2,3,5];break;case 7:a=[1,4,2,0,4,1,2,3,5,6];break;case 8:a=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:a=[1,1,2,0,1];break;case 131:a=[1,1,3,0,1,2];break;case 132:a=[1,1,4,0,1,2,3];break;case 133:a=[1,1,5,0,1,2,3,4];break;case 134:a=[1,1,6,0,1,2,3,4,5];break;case 135:a=[1,1,7,0,1,2,3,4,5,6];break;case 136:a=[1,1,8,0,1,2,3,4,5,6,7]}const n=new Uint8Array([0,t,0,0,s>>>24&255,s>>>17&255,s>>>8&255,s>>>0&255,0,0,...a]);return Te.box(Te.types.dOps,n)}static avc1(e){const t=e.avcc,i=e.codecWidth,s=e.codecHeight,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Te.box(Te.types.avc1,a,Te.box(Te.types.avcC,t))}static hvc1(e){const t=e.hvcc,i=e.codecWidth,s=e.codecHeight,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Te.box(Te.types.hvc1,a,Te.box(Te.types.hvcC,t))}static av01(e){var t,i;const s=e.av1c,a=null!==(t=e.codecWidth)&&void 0!==t?t:192,n=null!==(i=e.codecHeight)&&void 0!==i?i:108,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>>8&255,255&a,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Te.box(Te.types.av01,o,Te.box(Te.types.av1C,s))}static mvex(e){return Te.box(Te.types.mvex,Te.trex(e))}static trex(e){const t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Te.box(Te.types.trex,i)}static moof(e,t){return Te.box(Te.types.moof,Te.mfhd(e.sequenceNumber),Te.traf(e,t))}static mfhd(e){const t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return Te.box(Te.types.mfhd,t)}static traf(e,t){const i=e.id,s=Te.box(Te.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),a=Te.box(Te.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),n=Te.sdtp(e),o=Te.trun(e,n.byteLength+16+16+8+16+8+8);return Te.box(Te.types.traf,s,a,o,n)}static sdtp(e){const t=e.samples||[],i=t.length,s=new Uint8Array(4+i);for(let e=0;e<i;e++){const i=t[e].flags;s[e+4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy}return Te.box(Te.types.sdtp,s)}static trun(e,t){const i=e.samples||[],s=i.length,a=12+16*s,n=new Uint8Array(a);t+=8+a,n.set([0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(let e=0;e<s;e++){const t=i[e].duration,s=i[e].size,a=i[e].flags,o=i[e].cts;n.set([t>>>24&255,t>>>16&255,t>>>8&255,255&t,s>>>24&255,s>>>16&255,s>>>8&255,255&s,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.isNonSync,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12+16*e)}return Te.box(Te.types.trun,n)}static mdat(e){return Te.box(Te.types.mdat,e)}}Te.constants={FTYP:new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),STSD_PREFIX:new Uint8Array([0,0,0,0,0,0,0,1]),STTS:Re,STSC:Re,STCO:Re,STSZ:new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),HDLR_VIDEO:new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),HDLR_AUDIO:new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),DREF:new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),SMHD:new Uint8Array([0,0,0,0,0,0,0,0]),VMHD:new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},Te.init();const ke=Te;const Le=class{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}};var we=i(68);const De=class{constructor(e){var t;this.TAG="MP4Remuxer",this._fillSilentAfterSeek=!1,this._config=e,this._isLive=!!e.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new we.J1("audio"),this._videoSegmentInfoList=new we.J1("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!n.Z.chrome||!(n.Z.version&&n.Z.version.major<50||n.Z.version&&50===n.Z.version.major&&((null===(t=n.Z.version)||void 0===t?void 0:t.build)||0)<2661)),this._fillSilentAfterSeek=!(!n.Z.msedge&&!n.Z.msie),this._mp3UseMpegAudio=!n.Z.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(e){var t;return e.onDataAvailable=null===(t=this.remux)||void 0===t?void 0:t.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(e){this._onInitSegment=e}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(e){this._onMediaSegment=e}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(e,t){if(!this._onMediaSegment)throw new l.rT("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),t&&this._remuxVideo(t),e&&this._remuxAudio(e)}_onTrackMetadataReceived(e,t){let i=null,s="mp4",a=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(s="mpeg",a="",i=new Uint8Array):i=ke.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=ke.generateInitSegment(t)}if(!this._onInitSegment)throw new l.rT("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:a,container:`${e}/${s}`,mediaDuration:t.duration})}_calculateDtsBase(e,t){var i,s;this._dtsBaseInited||((null===(i=null==e?void 0:e.samples)||void 0===i?void 0:i.length)&&(this._audioDtsBase=e.samples[0].dts),(null===(s=null==t?void 0:t.samples)||void 0===s?void 0:s.length)&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}getTimestampBase(){if(this._dtsBaseInited)return this._dtsBase}flushStashedSamples(){const e=this._videoStashedLastSample,t=this._audioStashedLastSample,i={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(i.samples.push(e),i.length=null==e?void 0:e.length);const s={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(s.samples.push(t),s.length=null==t?void 0:t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(i,!0),this._remuxAudio(s,!0)}_remuxAudio(e,t){var i,s,o,r,d,l,h;if(null==this._audioMeta)return;const _=e,c=_.samples;let u,m=-1,f=-1;const p=this._audioMeta.refSampleDuration,g="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,v=this._dtsBaseInited&&void 0===this._audioNextDts;let E=!1;if(!c||0===c.length)return;if(1===c.length&&!t)return;let S=0,y=null,A=0;g?(S=0,A=_.length):(S=8,A=8+_.length);let b=null;if(c.length>1&&(b=c.pop(),A-=b.length),null!=this._audioStashedLastSample){const e=this._audioStashedLastSample;this._audioStashedLastSample=null,c.unshift(e),A+=e.length}null!=b&&(this._audioStashedLastSample=b);const R=c[0].dts-this._dtsBase;if(this._audioNextDts)u=R-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())u=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(E=!0);else{const e=this._audioSegmentInfoList.getLastSampleBefore(R);if(null!=e){let t=R-(e.originalDts+e.duration);t<=3&&(t=0);u=R-(e.dts+e.duration+t)}else u=0}if(E){const e=R-u,t=this._videoSegmentInfoList.getLastSegmentBefore(R);if(null!=t&&t.beginDts<e){const n=Le.getSilentFrame(null===(i=this._audioMeta)||void 0===i?void 0:i.originalCodec,null===(s=this._audioMeta)||void 0===s?void 0:s.channelCount);if(n){const i=t.beginDts,s=e-t.beginDts;a.Z.v(this.TAG,`InsertPrefixSilentAudio: dts: ${i}, duration: ${s}`),c.unshift({unit:n,dts:i,pts:i}),A+=n.byteLength}}else E=!1}const T=[];for(let e=0;e<c.length;e++){const t=c[e],i=t.unit,s=t.dts-this._dtsBase;let h=s,_=!1,f=null,g=0;if(!(s<-.001)){if("mp3"!==this._audioMeta.codec){let e=s;const t=3;if(this._audioNextDts&&(e=this._audioNextDts),u=s-e,u<=-t*(p||0)){a.Z.w(this.TAG,`Dropping 1 audio frame (originalDts: ${s} ms ,curRefDts: ${e} ms)  due to dtsCorrection: ${u} ms overlap.`);continue}if(u>=t*(p||0)&&this._fillAudioTimestampGap&&!n.Z.safari){_=!0;const t=Math.floor(u/(p||0));a.Z.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\noriginalDts: ${s} ms, curRefDts: ${e} ms, dtsCorrection: ${Math.round(u)} ms, generate: ${t} frames`),h=Math.floor(e),g=Math.floor(e+(p||0))-h;let n=Le.getSilentFrame(null===(o=this._audioMeta)||void 0===o?void 0:o.originalCodec,this._audioMeta.channelCount);null==n&&(a.Z.w(this.TAG,`Unable to generate silent frame for ${null===(r=this._audioMeta)||void 0===r?void 0:r.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),n=i),f=[];for(let i=0;i<t;i++){e+=p||0;const t=Math.floor(e),i=Math.floor(e+(p||0))-t,a={dts:t,pts:t,cts:0,unit:n,size:n.byteLength,duration:i,originalDts:s,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};f.push(a),A+=a.size}this._audioNextDts=e+(p||0)}else h=Math.floor(e),g=Math.floor(e+(p||0))-h,this._audioNextDts=e+(p||0)}else{if(h=s-u,e!==c.length-1){g=c[e+1].dts-this._dtsBase-u-h}else if(null!=b){g=b.dts-this._dtsBase-u-h}else g=T.length>=1?null===(d=T[T.length-1])||void 0===d?void 0:d.duration:Math.floor(p||0);this._audioNextDts=h+g}-1===m&&(m=h),T.push({dts:h,pts:h,cts:0,unit:t.unit,size:null===(l=t.unit)||void 0===l?void 0:l.byteLength,duration:g,originalDts:s,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),_&&T.push.apply(T,f)}}if(0===T.length)return _.samples=[],void(_.length=0);g?y=new Uint8Array(A):(y=new Uint8Array(A),y[0]=A>>>24&255,y[1]=A>>>16&255,y[2]=A>>>8&255,y[3]=255&A,y.set(ke.types.mdat,4));for(let e=0;e<T.length;e++){const t=T[e].unit;y.set(t,S),S+=t.byteLength||0}const k=T[T.length-1];f=k.dts+k.duration;const L=new we.Yy;L.beginDts=m,L.endDts=f,L.beginPts=m,L.endPts=f,L.originalBeginDts=T[0].originalDts,L.originalEndDts=k.originalDts+k.duration,L.firstSample=new we.Wk(T[0].dts,T[0].pts,T[0].duration,T[0].originalDts,!1),L.lastSample=new we.Wk(k.dts,k.pts,k.duration,k.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(L),_.samples=T,_.sequenceNumber++;let w=null;w=g?new Uint8Array:ke.moof(_,m),_.samples=[],_.length=0;const D={type:"audio",data:this._mergeBoxes(w,y).buffer,sampleCount:T.length,info:L};g&&v&&D&&(D.timestampOffset=m),null===(h=this._onMediaSegment)||void 0===h||h.call(this,"audio",D)}_remuxVideo(e,t){var i,s;if(null==this._videoMeta)return;const a=e,n=a.samples;let o,r=-1,d=-1,l=-1,h=-1;if(!n||0===n.length)return;if(1===n.length&&!t)return;let _=8,c=null,u=8+e.length,m=null;if(n.length>1&&(m=n.pop(),u-=m.length),null!=this._videoStashedLastSample){const e=this._videoStashedLastSample;this._videoStashedLastSample=null,n.unshift(e),u+=(null==e?void 0:e.length)||0}null!=m&&(this._videoStashedLastSample=m);const f=n[0].dts-this._dtsBase;if(this._videoNextDts)o=f-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())o=0;else{const e=this._videoSegmentInfoList.getLastSampleBefore(f);if(null!=e){let t=f-(e.originalDts+e.duration);t<=3&&(t=0);o=f-(e.dts+e.duration+t)}else o=0}const p=new we.Yy,g=[];for(let e=0;e<n.length;e++){const t=n[e],s=t.dts-this._dtsBase,a=t.isKeyframe,d=s-o,h=t.cts,_=d+h;-1===r&&(r=d,l=_);let c=0;if(e!==n.length-1){c=n[e+1].dts-this._dtsBase-o-d}else if(null!=m){c=m.dts-this._dtsBase-o-d}else c=g.length>=1?g[g.length-1].duration:Math.floor((null===(i=this._videoMeta)||void 0===i?void 0:i.refSampleDuration)||0);if(a){const e=new we.Wk(d,_,c,t.dts,!0);e.fileposition=t.fileposition,p.appendSyncPoint(e)}g.push({dts:d,pts:_,cts:h,units:t.units,size:t.length,isKeyframe:a,duration:c,originalDts:s,flags:{isLeading:0,dependsOn:a?2:1,isDependedOn:a?1:0,hasRedundancy:0,isNonSync:a?0:1}})}c=new Uint8Array(u),c[0]=u>>>24&255,c[1]=u>>>16&255,c[2]=u>>>8&255,c[3]=255&u,c.set(ke.types.mdat,4);for(let e=0;e<g.length;e++){const t=g[e].units;for(;null==t?void 0:t.length;){const e=t.shift(),i=null==e?void 0:e.data;c.set(i,_),_+=i.byteLength}}const v=g[g.length-1];if(d=v.dts+v.duration,h=v.pts+v.duration,this._videoNextDts=d,p.beginDts=r,p.endDts=d,p.beginPts=l,p.endPts=h,p.originalBeginDts=g[0].originalDts,p.originalEndDts=v.originalDts+v.duration,p.firstSample=new we.Wk(g[0].dts,g[0].pts,g[0].duration,g[0].originalDts,!!g[0].isKeyframe),p.lastSample=new we.Wk(v.dts,v.pts,v.duration,v.originalDts,!!v.isKeyframe),this._isLive||this._videoSegmentInfoList.append(p),a.samples=g,a.sequenceNumber++,this._forceFirstIDR){const e=g[0].flags;e.dependsOn=2,e.isNonSync=0}const E=ke.moof(a,r);a.samples=[],a.length=0,null===(s=this._onMediaSegment)||void 0===s||s.call(this,"video",{type:"video",data:this._mergeBoxes(E,c).buffer,sampleCount:g.length,info:p})}_mergeBoxes(e,t){const i=new Uint8Array(e.byteLength+t.byteLength);return i.set(e,0),i.set(t,e.byteLength),i}};var Ce=i(575),Be=i(473);const Ie=class{constructor(e,t){var i;this.TAG="TransmuxingController",this._emitter=new s.EventEmitter,this._config=t,e.segments||(e.segments=[{duration:e.duration,filesize:e.filesize,url:e.url}]),"boolean"!=typeof e.cors&&(e.cors=!0),"boolean"!=typeof e.withCredentials&&(e.withCredentials=!1),this._mediaDataSource=e,this._currentSegmentIndex=0;let a=0;null===(i=this._mediaDataSource.segments)||void 0===i||i.forEach(i=>{i.timestampBase=a,a+=i.duration,i.cors=e.cors,i.withCredentials=e.withCredentials,t.referrerPolicy&&(i.referrerPolicy=t.referrerPolicy)}),isNaN(a)||this._mediaDataSource.duration===a||(this._mediaDataSource.duration=a),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){var e,t,i;this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(null===(e=this._ioctl)||void 0===e||e.destroy(),this._ioctl=null),this._demuxer&&(null===(t=this._demuxer)||void 0===t||t.destroy(),this._demuxer=null),this._remuxer&&(null===(i=this._remuxer)||void 0===i||i.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(e,t){this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(e,t){var i,s,a;if(this._currentSegmentIndex=e,null===(i=this._mediaDataSource)||void 0===i?void 0:i.segments){const i=null===(s=this._mediaDataSource)||void 0===s?void 0:s.segments[e],n=this._ioctl=new Ce.Z(i,this._config,e);n.onError=this._onIOException.bind(this),n.onSeeked=this._onIOSeeked.bind(this),n.onComplete=this._onIOComplete.bind(this),n.onRedirect=this._onIORedirect.bind(this),n.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?null===(a=this._demuxer)||void 0===a||a.bindDataSource(this._ioctl):n.onDataArrival=this._onInitChunkArrival.bind(this),n.open(t)}}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){var e;(null===(e=this._ioctl)||void 0===e?void 0:e.isWorking())&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){var e;(null===(e=this._ioctl)||void 0===e?void 0:e.isPaused())&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(e){var t,i,s,a,n,o,r,d,l,h,_,c,u,m;if(null==this._mediaInfo||!(null===(t=this._mediaInfo)||void 0===t?void 0:t.isSeekable()))return;const f=this._searchSegmentIndexContains(e);if(f===this._currentSegmentIndex){const t=(null===(i=this._mediaInfo)||void 0===i?void 0:i.segments)?null===(s=this._mediaInfo)||void 0===s?void 0:s.segments[f]:{};if(void 0===t)this._pendingSeekTime=e;else{const i=null==t?void 0:t.getNearestKeyframe(e);null===(a=this._remuxer)||void 0===a||a.seek(null==i?void 0:i.milliseconds),null===(n=this._ioctl)||void 0===n||n.seek(null==i?void 0:i.fileposition),this._pendingResolveSeekPoint=null==i?void 0:i.milliseconds}}else{const t=(null===(o=this._mediaInfo)||void 0===o?void 0:o.segments)?null===(r=this._mediaInfo)||void 0===r?void 0:r.segments[f]:{};if(void 0===t)this._pendingSeekTime=e,this._internalAbort(),null===(d=this._remuxer)||void 0===d||d.seek(),null===(l=this._remuxer)||void 0===l||l.insertDiscontinuity(),this._loadSegment(f);else{const i=t.getNearestKeyframe(e);this._internalAbort(),null===(h=this._remuxer)||void 0===h||h.seek(e),null===(_=this._remuxer)||void 0===_||_.insertDiscontinuity(),this._demuxer&&(null===(c=this._demuxer)||void 0===c||c.resetMediaInfo(),this._demuxer.timestampBase=(null===(u=this._mediaDataSource)||void 0===u?void 0:u.segments)?null===(m=this._mediaDataSource)||void 0===m?void 0:m.segments[f].timestampBase:0),this._loadSegment(f,null==i?void 0:i.fileposition),this._pendingResolveSeekPoint=null==i?void 0:i.milliseconds,this._reportSegmentMediaInfo(f)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(e){var t;const i=this._mediaDataSource.segments;let s=((null==i?void 0:i.length)||0)-1;if(0===((null==i?void 0:i.length)||0))return s;for(let a=0;a<((null==i?void 0:i.length)||0);a++)if(i&&e<((null===(t=i[a])||void 0===t?void 0:t.timestampBase)||0)){s=a-1;break}return s}_onInitChunkArrival(e,t){var i,s,n,o,r;let d=0;if(t>0)null===(i=this._demuxer)||void 0===i||i.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments?null===(s=this._mediaDataSource.segments[this._currentSegmentIndex])||void 0===s?void 0:s.timestampBase:0,d=(null===(n=this._demuxer)||void 0===n?void 0:n.parseChunks(e,t))||0;else{let i=null;i=k.probe(e),i.match&&(this._setupFLVDemuxerRemuxer(i),d=(null===(o=this._demuxer)||void 0===o?void 0:o.parseChunks(e,t))||0),i.match||(null==i?void 0:i.needMoreData)||(i=be.probe(e),i.match&&(this._setupTSDemuxerRemuxer(i),d=(null===(r=this._demuxer)||void 0===r?void 0:r.parseChunks(e,t))||0)),i.match||(null==i?void 0:i.needMoreData)||(i=null,a.Z.e(this.TAG,"Non MPEG-TS/FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Be.Z.DEMUX_ERROR,p.Z.FORMAT_UNSUPPORTED,"Non MPEG-TS/FLV, Unsupported media type!"))}return d}_setupFLVDemuxerRemuxer(e){var t;this._demuxer=new k(e,this._config),this._remuxer||(this._remuxer=new De(this._config));const i=this._mediaDataSource;void 0===i.duration||isNaN(i.duration)||(this._demuxer.overridedDuration=i.duration),"boolean"==typeof i.hasAudio&&(this._demuxer.overridedHasAudio=i.hasAudio),"boolean"==typeof i.hasVideo&&(this._demuxer.overridedHasVideo=i.hasVideo),i.segments&&this._demuxer&&this._remuxer&&(this._demuxer.timestampBase=null===(t=null==i?void 0:i.segments[this._currentSegmentIndex])||void 0===t?void 0:t.timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this))}_setupTSDemuxerRemuxer(e){const t=this._demuxer=new be(e,this._config);this._remuxer||(this._remuxer=new De(this._config)),t.onError=this._onDemuxException.bind(this),t.onMediaInfo=this._onMediaInfo.bind(this),t.onMetaDataArrived=this._onMetaDataArrived.bind(this),t.onTimedID3Metadata=this._onTimedID3Metadata.bind(this),t.onSMPTE2038Metadata=this._onSMPTE2038Metadata.bind(this),t.onSCTE35Metadata=this._onSCTE35Metadata.bind(this),t.onPESPrivateDataDescriptor=this._onPESPrivateDataDescriptor.bind(this),t.onPESPrivateData=this._onPESPrivateData.bind(this),this._remuxer.bindDataSource(this._demuxer),this._demuxer.bindDataSource(this._ioctl),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this)}_onMediaInfo(e){var t,i;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=(null===(i=null===(t=this._mediaDataSource)||void 0===t?void 0:t.segments)||void 0===i?void 0:i.length)||0,Object.setPrototypeOf(this._mediaInfo,o.Z.prototype));const s=Object.assign({},e);Object.setPrototypeOf(s,o.Z.prototype),this._mediaInfo.segments&&(this._mediaInfo.segments[this._currentSegmentIndex]=s),this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then(()=>{const e=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(e)})}_onMetaDataArrived(e){this._emitter.emit(Be.Z.METADATA_ARRIVED,e)}_onScriptDataArrived(e){this._emitter.emit(Be.Z.SCRIPTDATA_ARRIVED,e)}_onTimedID3Metadata(e){var t;const i=null===(t=this._remuxer)||void 0===t?void 0:t.getTimestampBase();void 0!==i&&(void 0!==e.pts&&(e.pts-=i),void 0!==e.dts&&(e.dts-=i),this._emitter.emit(Be.Z.TIMED_ID3_METADATA_ARRIVED,e))}_onSMPTE2038Metadata(e){var t;const i=null===(t=this._remuxer)||void 0===t?void 0:t.getTimestampBase();void 0!==i&&(void 0!==e.pts&&(e.pts-=i),void 0!==e.dts&&(e.dts-=i),void 0!==e.nearest_pts&&(e.nearest_pts-=i),this._emitter.emit(Be.Z.SMPTE2038_METADATA_ARRIVED,e))}_onSCTE35Metadata(e){var t;const i=null===(t=this._remuxer)||void 0===t?void 0:t.getTimestampBase();void 0!==i&&(void 0!==e.pts&&(e.pts-=i),void 0!==e.nearest_pts&&(e.nearest_pts-=i),this._emitter.emit(Be.Z.SCTE35_METADATA_ARRIVED,e))}_onPESPrivateDataDescriptor(e){this._emitter.emit(Be.Z.PES_PRIVATE_DATA_DESCRIPTOR,e)}_onPESPrivateData(e){var t;const i=null===(t=this._remuxer)||void 0===t?void 0:t.getTimestampBase();void 0!==i&&(void 0!==e.pts&&(e.pts-=i),void 0!==e.nearest_pts&&(e.nearest_pts-=i),void 0!==e.dts&&(e.dts-=i),this._emitter.emit(Be.Z.PES_PRIVATE_DATA_ARRIVED,e))}_onIOSeeked(){var e;null===(e=this._remuxer)||void 0===e||e.insertDiscontinuity()}_onIOComplete(e){var t,i;const s=e+1;s<((null===(i=null===(t=this._mediaDataSource)||void 0===t?void 0:t.segments)||void 0===i?void 0:i.length)||0)?(this._internalAbort(),this._remuxer&&this._remuxer.flushStashedSamples(),this._loadSegment(s)):(this._remuxer&&this._remuxer.flushStashedSamples(),this._emitter.emit(Be.Z.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(e){var t;const i=null===(t=this._ioctl)||void 0===t?void 0:t.extraData;this._mediaDataSource.segments&&(this._mediaDataSource.segments[i].redirectedURL=e)}_onIORecoveredEarlyEof(){this._emitter.emit(Be.Z.RECOVERED_EARLY_EOF)}_onIOException(e,t){a.Z.e(this.TAG,`IOException: type = ${e}, code = ${t.code}, msg = ${t.msg}`),this._emitter.emit(Be.Z.IO_ERROR,e,t),this._disableStatisticsReporter()}_onDemuxException(e,t){a.Z.e(this.TAG,`DemuxException: type = ${e}, info = ${t}`),this._emitter.emit(Be.Z.DEMUX_ERROR,e,t)}_onRemuxerInitSegmentArrival(e,t){this._emitter.emit(Be.Z.INIT_SEGMENT,e,t)}_onRemuxerMediaSegmentArrival(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(Be.Z.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){const e=t.info.syncPoints;let i=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,n.Z.safari&&e.length>0&&e[0].originalDts===i&&(i=e[0].pts),this._emitter.emit(Be.Z.RECOMMEND_SEEKPOINT,i)}}_enableStatisticsReporter(){null==this._statisticsReporter&&this._reportStatisticsInfo&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(e){var t,i,s,a;const n=(null===(t=this._mediaInfo)||void 0===t?void 0:t.segments)?null===(i=this._mediaInfo)||void 0===i?void 0:i.segments[e]:{},o=Object.assign({},n);o.duration=null===(s=this._mediaInfo)||void 0===s?void 0:s.duration,o.segmentCount=null===(a=this._mediaInfo)||void 0===a?void 0:a.segmentCount,delete o.segments,delete o.keyframesIndex,this._emitter.emit(Be.Z.MEDIA_INFO,o)}_reportStatisticsInfo(){var e,t,i,s,a,n;const o={};o.url=null===(e=this._ioctl)||void 0===e?void 0:e.currentURL,o.hasRedirect=null===(t=this._ioctl)||void 0===t?void 0:t.hasRedirect,o.hasRedirect&&(o.redirectedURL=null===(i=this._ioctl)||void 0===i?void 0:i.currentRedirectedURL),o.speed=null===(s=this._ioctl)||void 0===s?void 0:s.currentSpeed,o.loaderType=null===(a=this._ioctl)||void 0===a?void 0:a.loaderType,o.currentSegmentIndex=this._currentSegmentIndex,o.totalSegmentCount=null===(n=this._mediaDataSource.segments)||void 0===n?void 0:n.length,this._emitter.emit(Be.Z.STATISTICS_INFO,o)}}},473:(e,t,i)=>{i.d(t,{Z:()=>s});const s={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},638:(e,t,i)=>{var s=i(278),a=i(943),n=i(473);let o=null;const r=function(e,t){self.postMessage({msg:"logcat_callback",data:{type:e,logcat:t}})};function d(e,t){const i={msg:n.Z.INIT_SEGMENT,data:{type:e,data:t}};self.postMessage(i,[t.data])}function l(e,t){const i={msg:n.Z.MEDIA_SEGMENT,data:{type:e,data:t}};self.postMessage(i,[t.data])}function h(){const e={msg:n.Z.LOADING_COMPLETE};self.postMessage(e)}function _(){const e={msg:n.Z.RECOVERED_EARLY_EOF};self.postMessage(e)}function c(e){const t={msg:n.Z.MEDIA_INFO,data:e};self.postMessage(t)}function u(e){const t={msg:n.Z.METADATA_ARRIVED,data:e};self.postMessage(t)}function m(e){const t={msg:n.Z.SCRIPTDATA_ARRIVED,data:e};self.postMessage(t)}function f(e){const t={msg:n.Z.TIMED_ID3_METADATA_ARRIVED,data:e};self.postMessage(t)}function p(e){const t={msg:n.Z.SMPTE2038_METADATA_ARRIVED,data:e};self.postMessage(t)}function g(e){const t={msg:n.Z.SCTE35_METADATA_ARRIVED,data:e};self.postMessage(t)}function v(e){const t={msg:n.Z.PES_PRIVATE_DATA_DESCRIPTOR,data:e};self.postMessage(t)}function E(e){const t={msg:n.Z.PES_PRIVATE_DATA_ARRIVED,data:e};self.postMessage(t)}function S(e){const t={msg:n.Z.STATISTICS_INFO,data:e};self.postMessage(t)}function y(e,t){self.postMessage({msg:n.Z.IO_ERROR,data:{type:e,info:t}})}function A(e,t){self.postMessage({msg:n.Z.DEMUX_ERROR,data:{type:e,info:t}})}function b(e){self.postMessage({msg:n.Z.RECOMMEND_SEEKPOINT,data:e})}self.addEventListener("message",function(e){switch(e.data.cmd){case"init":o=new a.Z(e.data.param[0],e.data.param[1]),o.on(n.Z.IO_ERROR,y),o.on(n.Z.DEMUX_ERROR,A),o.on(n.Z.INIT_SEGMENT,d),o.on(n.Z.MEDIA_SEGMENT,l),o.on(n.Z.LOADING_COMPLETE,h),o.on(n.Z.RECOVERED_EARLY_EOF,_),o.on(n.Z.MEDIA_INFO,c),o.on(n.Z.METADATA_ARRIVED,u),o.on(n.Z.SCRIPTDATA_ARRIVED,m),o.on(n.Z.TIMED_ID3_METADATA_ARRIVED,f),o.on(n.Z.SMPTE2038_METADATA_ARRIVED,p),o.on(n.Z.SCTE35_METADATA_ARRIVED,g),o.on(n.Z.PES_PRIVATE_DATA_DESCRIPTOR,v),o.on(n.Z.PES_PRIVATE_DATA_ARRIVED,E),o.on(n.Z.STATISTICS_INFO,S),o.on(n.Z.RECOMMEND_SEEKPOINT,b);break;case"destroy":o&&(o.destroy(),o=null),self.postMessage({msg:"destroyed"});break;case"start":null==o||o.start();break;case"stop":null==o||o.stop();break;case"seek":null==o||o.seek(e.data.param);break;case"pause":null==o||o.pause();break;case"resume":null==o||o.resume();break;case"logging_config":{const t=e.data.param;s.Z.applyConfig(t),!0===t.enableCallback?s.Z.addLogListener(r):s.Z.removeLogListener(r);break}}})},898:(e,t,i)=>{i.d(t,{Z:()=>s});const s={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},578:(e,t,i)=>{i.d(t,{default:()=>V});var s=i(575);const a={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,liveBufferLatencyChasing:!1,liveBufferLatencyMaxLatency:1.5,liveBufferLatencyMinRemain:.5,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0,url:void 0,redirectedURL:void 0,cors:!1};function n(){return Object.assign({},a)}class o{static supportMSEH264Playback(){var e;return null===(e=window.MediaSource)||void 0===e?void 0:e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportMSEH265Playback(){var e;return null===(e=window.MediaSource)||void 0===e?void 0:e.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"')}static supportNetworkStreamIO(){const e=new s.Z({},n()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"===t||"xhr-moz-chunked-loader"===t}static getNetworkLoaderTypeName(){const e=new s.Z({},n()),t=e.loaderType;return e.destroy(),t}static supportNativeMediaPlayback(e){void 0===o.videoElement&&(o.videoElement=window.document.createElement("video"));const t=o.videoElement.canPlayType(e);return"probably"===t||"maybe"===t}static getFeatureList(){const e={msePlayback:!1,mseLivePlayback:!1,mseH265Playback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeMP4H265Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return e.msePlayback=o.supportMSEH264Playback(),e.networkStreamIO=o.supportNetworkStreamIO(),e.networkLoaderName=o.getNetworkLoaderTypeName()||"",e.mseLivePlayback=e.msePlayback&&e.networkStreamIO,e.mseH265Playback=o.supportMSEH265Playback(),e.nativeMP4H264Playback=o.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),e.nativeMP4H265Playback=o.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'),e.nativeWebmVP8Playback=o.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),e.nativeWebmVP9Playback=o.supportNativeMediaPlayback('video/webm; codecs="vp9"'),e}}const r=o;var d=i(108),l=i(99),h=i(645),_=i(479);const c={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",TIMED_ID3_METADATA_ARRIVED:"timed_id3_metadata_arrived",SMPTE2038_METADATA_ARRIVED:"smpte2038_metadata_arrived",SCTE35_METADATA_ARRIVED:"scte35_metadata_arrived",PES_PRIVATE_DATA_DESCRIPTOR:"pes_private_data_descriptor",PES_PRIVATE_DATA_ARRIVED:"pes_private_data_arrived",STATISTICS_INFO:"statistics_info"},u=function(){const e=ENTRY_MODULE,t={};function i(s){if(t[s])return t[s].exports;const a=t[s]={exports:{}};return e[s](a,a.exports,i),a.exports}i.m=e,i.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(const s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.g=function(){if("[object Object]"===Object.prototype.toString.call(globalThis))return globalThis;try{return this||new Function("return this")()}catch(e){if("[object Object]"===Object.prototype.toString.call(window))return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};const s=i(ENTRY_MODULE);return s.default||s};u.toString();const m="[\\.|\\-|\\+|\\w|/|@]+",f="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+m+").*?\\)";function p(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function g(e,t,s){const a={};a[s]=[];const n=t.toString(),o=n.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||n.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!o)return a;const r=o[1];let d,l=new RegExp("(\\\\n|\\W)"+p(r)+f,"g");for(;d=l.exec(n);)"dll-reference"!==d[3]&&a[s].push(d[3]);for(l=new RegExp("\\("+p(r)+'\\("(dll-reference\\s('+m+'))"\\)\\)'+f,"g");d=l.exec(n);)e[d[2]]||(a[s].push(d[1]),e[d[2]]=i(d[1]).m),a[d[2]]=a[d[2]]||[],a[d[2]].push(d[4]);const h=Object.keys(a);for(let e=0;e<h.length;e++)for(let t=0;t<a[h[e]].length;t++)_=a[h[e]][t],isNaN(1*_)||(a[h[e]][t]=1*a[h[e]][t]);var _;return a}function v(e){return Object.keys(e).reduce((t,i)=>t||e[i].length>0,!1)}function E(e,t,i,s){const a=e[s].map(e=>`"${e}": ${t[s][e].toString()}`).join(","),n=u.toString().split("ENTRY_MODULE");return`${n[0]}{${a}}${n[1]}"${i}"${n[2]}`}function S(e,t){t=t||{};const s={main:i.m},a=t.all?{main:Object.keys(s.main)}:function(e,t){const i={main:[t]},s={main:[]},a={main:{}};for(;v(i);){const t=Object.keys(i);for(let n=0;n<t.length;n++){const o=t[n],r=i[o].pop();if(a[o]=a[o]||{},a[o][r]||!e[o][r])continue;a[o][r]=!0,s[o]=s[o]||[],s[o].push(r);const d=g(e,e[o][r],o),l=Object.keys(d);for(let e=0;e<l.length;e++)i[l[e]]=i[l[e]]||[],i[l[e]]=i[l[e]].concat(d[l[e]])}}return s}(s,e);let n="";Object.keys(a).filter(e=>"main"!==e).forEach(e=>{let t=0;for(;a[e][t];)t++;a[e].push(t),s[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",n+=`var ${e} = (${E(a,s,t,modules)})();\n`}),n+=`(${E(a,s,e,"main")})();`;const o=new window.Blob([n],{type:"text/javascript"});if(t.bare)return o;const r=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(o),d=new window.Worker(r);return d.objectURL=r,d}var y=i(278),A=i(943),b=i(473),R=i(994);const T=class{constructor(e,t){if(this.TAG="Transmuxer",this._workerDestroying=!1,this._controller=null,this._emitter=new l.EventEmitter,t.enableWorker&&"undefined"!=typeof Worker)try{this._worker=this._worker=S(638),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[e,t]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},y.Z.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:y.Z.getConfig()})}catch(i){h.Z.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new A.Z(e,t)}else this._controller=new A.Z(e,t);if(this._controller){const e=this._controller;null==e||e.on(b.Z.IO_ERROR,this._onIOError.bind(this)),null==e||e.on(b.Z.DEMUX_ERROR,this._onDemuxError.bind(this)),null==e||e.on(b.Z.INIT_SEGMENT,this._onInitSegment.bind(this)),null==e||e.on(b.Z.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),null==e||e.on(b.Z.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),null==e||e.on(b.Z.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),null==e||e.on(b.Z.MEDIA_INFO,this._onMediaInfo.bind(this)),null==e||e.on(b.Z.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),null==e||e.on(b.Z.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),null==e||e.on(b.Z.TIMED_ID3_METADATA_ARRIVED,this._onTimedID3MetadataArrived.bind(this)),null==e||e.on(b.Z.SMPTE2038_METADATA_ARRIVED,this._onSMPTE2038MetadataArrived.bind(this)),null==e||e.on(b.Z.SCTE35_METADATA_ARRIVED,this._onSCTE35MetadataArrived.bind(this)),null==e||e.on(b.Z.PES_PRIVATE_DATA_DESCRIPTOR,this._onPESPrivateDataDescriptor.bind(this)),null==e||e.on(b.Z.PES_PRIVATE_DATA_ARRIVED,this._onPESPrivateDataArrived.bind(this)),null==e||e.on(b.Z.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),null==e||e.on(b.Z.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){var e;this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),y.Z.removeListener(this.e.onLoggingConfigChanged),this.e=null):(null===(e=this._controller)||void 0===e||e.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(e,t){this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}hasWorker(){return null!=this._worker}open(){var e;this._worker?this._worker.postMessage({cmd:"start"}):null===(e=this._controller)||void 0===e||e.start()}close(){var e;this._worker?this._worker.postMessage({cmd:"stop"}):null===(e=this._controller)||void 0===e||e.stop()}seek(e){var t;this._worker?this._worker.postMessage({cmd:"seek",param:e}):null===(t=this._controller)||void 0===t||t.seek(e)}pause(){var e;this._worker?this._worker.postMessage({cmd:"pause"}):null===(e=this._controller)||void 0===e||e.pause()}resume(){var e;this._worker?this._worker.postMessage({cmd:"resume"}):null===(e=this._controller)||void 0===e||e.resume()}_onInitSegment(e,t){Promise.resolve().then(()=>{this._emitter.emit(b.Z.INIT_SEGMENT,e,t)})}_onMediaSegment(e,t){Promise.resolve().then(()=>{this._emitter.emit(b.Z.MEDIA_SEGMENT,e,t)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(b.Z.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(b.Z.RECOVERED_EARLY_EOF)})}_onMediaInfo(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.MEDIA_INFO,e)})}_onMetaDataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.METADATA_ARRIVED,e)})}_onScriptDataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.SCRIPTDATA_ARRIVED,e)})}_onTimedID3MetadataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.TIMED_ID3_METADATA_ARRIVED,e)})}_onSMPTE2038MetadataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.SMPTE2038_METADATA_ARRIVED,e)})}_onSCTE35MetadataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.SCTE35_METADATA_ARRIVED,e)})}_onPESPrivateDataDescriptor(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.PES_PRIVATE_DATA_DESCRIPTOR,e)})}_onPESPrivateDataArrived(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.PES_PRIVATE_DATA_ARRIVED,e)})}_onStatisticsInfo(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.STATISTICS_INFO,e)})}_onIOError(e,t){Promise.resolve().then(()=>{this._emitter.emit(b.Z.IO_ERROR,e,t)})}_onDemuxError(e,t){Promise.resolve().then(()=>{this._emitter.emit(b.Z.DEMUX_ERROR,e,t)})}_onRecommendSeekpoint(e){Promise.resolve().then(()=>{this._emitter.emit(b.Z.RECOMMEND_SEEKPOINT,e)})}_onLoggingConfigChanged(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}_onWorkerMessage(e){const t=e.data,i=null==t?void 0:t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case b.Z.INIT_SEGMENT:case b.Z.MEDIA_SEGMENT:this._emitter.emit(t.msg,i.type,i.data);break;case b.Z.LOADING_COMPLETE:case b.Z.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case b.Z.MEDIA_INFO:Object.setPrototypeOf(i,R.Z.prototype),this._emitter.emit(t.msg,i);break;case b.Z.METADATA_ARRIVED:case b.Z.SCRIPTDATA_ARRIVED:case b.Z.TIMED_ID3_METADATA_ARRIVED:case b.Z.SMPTE2038_METADATA_ARRIVED:case b.Z.SCTE35_METADATA_ARRIVED:case b.Z.PES_PRIVATE_DATA_DESCRIPTOR:case b.Z.PES_PRIVATE_DATA_ARRIVED:case b.Z.STATISTICS_INFO:this._emitter.emit(t.msg,i);break;case b.Z.IO_ERROR:case b.Z.DEMUX_ERROR:this._emitter.emit(t.msg,i.type,i.info);break;case b.Z.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,i);break;case"logcat_callback":h.Z.emitter.emit("log",i.type,i.logcat)}}},k={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};var L=i(68),w=i(411);const D=class{constructor(e){this.TAG="MSEController",this._config=e,this._emitter=new l.EventEmitter,this._config.isLive&&void 0===this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new L.Vn}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(e,t){this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}attachMediaElement(e){if(this._mediaSource)throw new w.rT("MediaSource has been attached to an HTMLMediaElement!");const t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){const e=this._mediaSource;for(const t in this._sourceBuffers){const i=this._pendingSegments[t];i.splice(0,i.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;const s=this._sourceBuffers[t];if(s){if("closed"!==e.readyState){try{e.removeSourceBuffer(s)}catch(e){h.Z.e(this.TAG,e.message)}null==s||s.removeEventListener("error",this.e.onSourceBufferError),null==s||s.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){h.Z.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(e,t){var i;if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);const s=e;let a=`${s.container}`;s.codec&&s.codec.length>0&&(a+=`;codecs=${s.codec}`);let n=!1;if(h.Z.v(this.TAG,"Received Initialization Segment, mimeType: "+a),this._lastInitSegments[s.type]=s,a!==this._mimeTypes[s.type]){if(this._mimeTypes[s.type])h.Z.v(this.TAG,`Notice: ${s.type} mimeType changed, origin: ${this._mimeTypes[s.type]||""}, target: ${a}`);else{n=!0;try{const e=this._sourceBuffers[s.type]=this._mediaSource.addSourceBuffer(a);e.addEventListener("error",this.e.onSourceBufferError),e.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return h.Z.e(this.TAG,e.message),void this._emitter.emit(k.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[s.type]=a}t||this._pendingSegments[s.type].push(s),n||this._sourceBuffers[s.type]&&!(null===(i=this._sourceBuffers[s.type])||void 0===i?void 0:i.updating)&&this._doAppendSegments(),_.Z.safari&&"audio/mpeg"===s.container&&s.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=s.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(e){const t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();const i=this._sourceBuffers[t.type];!i||i.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}seek(e){var t,i;for(const e in this._sourceBuffers){if(!this._sourceBuffers[e])continue;const s=this._sourceBuffers[e];if("open"===(null===(t=this._mediaSource)||void 0===t?void 0:t.readyState))try{null==s||s.abort()}catch(e){h.Z.e(this.TAG,e.message)}this._idrList.clear();const a=this._pendingSegments[e];if(a.splice(0,a.length),"closed"!==(null===(i=this._mediaSource)||void 0===i?void 0:i.readyState)){if(s){for(let t=0;t<s.buffered.length;t++){const i=s.buffered.start(t),a=s.buffered.end(t);this._pendingRemoveRanges[e].push({start:i,end:a})}(null==s?void 0:s.updating)||this._doRemoveRanges()}if(_.Z.safari){const t=this._lastInitSegments[e];t&&(this._pendingSegments[e].push(t),(null==s?void 0:s.updating)||this._doAppendSegments())}}}}endOfStream(){var e,t;const i=this._mediaSource,s=this._sourceBuffers;i&&"open"===i.readyState?(null===(e=s.video)||void 0===e?void 0:e.updating)||(null===(t=s.audio)||void 0===t?void 0:t.updating)?this._hasPendingEos=!0:(this._hasPendingEos=!1,i.endOfStream()):i&&"closed"===i.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)}getNearestKeyframe(e){return this._idrList.getLastSyncPointBeforeDts(e)}_needCleanupSourceBuffer(){var e,t;if(!this._config.autoCleanupSourceBuffer)return!1;const i=null===(e=this._mediaElement)||void 0===e?void 0:e.currentTime;for(const e in this._sourceBuffers){const s=this._sourceBuffers[e];if(s){const e=s.buffered;if(e.length>=1&&i-e.start(0)>=((null===(t=this._config)||void 0===t?void 0:t.autoCleanupMaxBackwardDuration)||0))return!0}}return!1}_doCleanupSourceBuffer(){var e,t,i;const s=null===(e=this._mediaElement)||void 0===e?void 0:e.currentTime;for(const e in this._sourceBuffers){const a=this._sourceBuffers[e];if(a){const n=a.buffered;let o=!1;for(let a=0;a<n.length;a++){const r=n.start(a),d=n.end(a);if(r<=s&&s<d+3){if(s-r>=((null===(t=this._config)||void 0===t?void 0:t.autoCleanupMaxBackwardDuration)||0)){o=!0;const t=s-((null===(i=this._config)||void 0===i?void 0:i.autoCleanupMinBackwardDuration)||0);this._pendingRemoveRanges[e].push({start:r,end:t})}}else d<s&&(o=!0,this._pendingRemoveRanges[e].push({start:r,end:d}))}o&&!a.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){var e,t,i,s;const a=this._sourceBuffers;if(0===(null===(e=this._mediaElement)||void 0===e?void 0:e.readyState)||"open"!==(null===(t=this._mediaSource)||void 0===t?void 0:t.readyState))return;if((null===(i=a.video)||void 0===i?void 0:i.updating)||(null===(s=a.audio)||void 0===s?void 0:s.updating))return;const n=this._mediaSource.duration,o=this._pendingMediaDuration;o>0&&(isNaN(n)||o>n)&&(h.Z.v(this.TAG,`Update MediaSource duration from ${n} to ${o}`),this._mediaSource.duration=o),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){var e;for(const t in this._pendingRemoveRanges){if(!this._sourceBuffers[t]||(null===(e=this._sourceBuffers[t])||void 0===e?void 0:e.updating))continue;const i=this._sourceBuffers[t],s=this._pendingRemoveRanges[t];for(;s.length&&!(null==i?void 0:i.updating);){const e=s.shift();null==i||i.remove(e.start,e.end)}}}_doAppendSegments(){var e,t,i;const s=this._pendingSegments;for(const a in s)if(this._sourceBuffers[a]&&!(null===(e=this._sourceBuffers[a])||void 0===e?void 0:e.updating)&&s[a].length>0){const e=s[a].shift();if(null==e?void 0:e.timestampOffset){const i=(null===(t=this._sourceBuffers[a])||void 0===t?void 0:t.timestampOffset)||0,s=e.timestampOffset/1e3;Math.abs(i-s)>.1&&(h.Z.v(this.TAG,`Update MPEG audio timestampOffset from ${i} to ${s}`),this._sourceBuffers[a]&&(this._sourceBuffers[a].timestampOffset=s)),delete e.timestampOffset}if(!e.data||0===e.data.byteLength)continue;try{null===(i=this._sourceBuffers[a])||void 0===i||i.appendBuffer(e.data),this._isBufferFull=!1,"video"===a&&e.hasOwnProperty("info")&&this._idrList.appendArray(e.info.syncPoints)}catch(t){this._pendingSegments[a].unshift(e),22===t.code?(this._isBufferFull||this._emitter.emit(k.BUFFER_FULL),this._isBufferFull=!0):(h.Z.e(this.TAG,t.message),this._emitter.emit(k.ERROR,{code:t.code,msg:t.message}))}}}_onSourceOpen(){var e;if(h.Z.v(this.TAG,"MediaSource onSourceOpen"),null===(e=this._mediaSource)||void 0===e||e.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){const e=this._pendingSourceBufferInit;for(;e.length;){const t=e.shift();this.appendInitSegment(t,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(k.SOURCE_OPEN)}_onSourceEnded(){h.Z.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){h.Z.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){const e=this._pendingSegments;return e.video.length>0||e.audio.length>0}_hasPendingRemoveRanges(){const e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(k.UPDATE_END)}_onSourceBufferError(e){h.Z.e(this.TAG,`SourceBuffer Error: ${e}`)}};var C=i(898);const B={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},I={NETWORK_EXCEPTION:d.nm.EXCEPTION,NETWORK_STATUS_CODE_INVALID:d.nm.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:d.nm.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:d.nm.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:C.Z.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:C.Z.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:C.Z.CODEC_UNSUPPORTED};var M=function(e,t,i,s){return new(i||(i=Promise))(function(a,n){function o(e){try{d(s.next(e))}catch(e){n(e)}}function r(e){try{d(s.throw(e))}catch(e){n(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,r)}d((s=s.apply(e,t||[])).next())})};const O=class{constructor(e,t){var i,s,a;this.TAG="MSEPlayer",this._type="MSEPlayer",this._emitter=new l.EventEmitter,this._config=n(),"object"==typeof t&&Object.assign(this._config,t);const o=e.type.toLowerCase();if("mse"!==o&&"mpegts"!==o&&"m2ts"!==o&&"flv"!==o)throw new w.OC("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");e.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=e,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;const r=_.Z.chrome&&(_.Z.version&&(null===(i=_.Z.version)||void 0===i?void 0:i.major)<50||_.Z.version&&50===(null===(s=null===_.Z||void 0===_.Z?void 0:_.Z.version)||void 0===s?void 0:s.major)&&((null===(a=null===_.Z||void 0===_.Z?void 0:_.Z.version)||void 0===a?void 0:a.build)||-1)<2661);this._alwaysSeekKeyframe=!!(r||_.Z.msedge||_.Z.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(e,t){e===c.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then(()=>{this._emitter.emit(c.MEDIA_INFO,this.mediaInfo)}):e===c.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then(()=>{this._emitter.emit(c.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}attachMediaElement(e){var t,i,s,a,n;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new D(this._config),null===(t=this._msectl)||void 0===t||t.on(k.UPDATE_END,this._onmseUpdateEnd.bind(this)),null===(i=this._msectl)||void 0===i||i.on(k.BUFFER_FULL,this._onmseBufferFull.bind(this)),null===(s=this._msectl)||void 0===s||s.on(k.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),null===(a=this._msectl)||void 0===a||a.on(k.ERROR,e=>{this._emitter.emit(c.ERROR,B.MEDIA_ERROR,I.MEDIA_MSE_ERROR,e)}),null===(n=this._msectl)||void 0===n||n.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}detachMediaElement(){var e;this._mediaElement&&(null===(e=this._msectl)||void 0===e||e.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new w.rT("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new w.rT("MSEPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(!this._config.deferLoadAfterSourceOpen||this._mseSourceOpened?(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new T(this._mediaDataSource,this._config),this._transmuxer.on(b.Z.INIT_SEGMENT,(e,t)=>{var i;null===(i=this._msectl)||void 0===i||i.appendInitSegment(t)}),this._transmuxer.on(b.Z.MEDIA_SEGMENT,(e,t)=>{var i,s,a;if(null===(i=this._msectl)||void 0===i||i.appendMediaSegment(t),this._config.lazyLoad&&!this._config.isLive){const e=null===(s=this._mediaElement)||void 0===s?void 0:s.currentTime;t.info.endDts>=1e3*(e+((null===(a=this._config)||void 0===a?void 0:a.lazyLoadMaxDuration)||0))&&null==this._progressChecker&&(h.Z.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(b.Z.LOADING_COMPLETE,()=>{var e;null===(e=this._msectl)||void 0===e||e.endOfStream(),this._emitter.emit(c.LOADING_COMPLETE)}),this._transmuxer.on(b.Z.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(c.RECOVERED_EARLY_EOF)}),this._transmuxer.on(b.Z.IO_ERROR,(e,t)=>{this._emitter.emit(c.ERROR,B.NETWORK_ERROR,e,t)}),this._transmuxer.on(b.Z.DEMUX_ERROR,(e,t)=>{this._emitter.emit(c.ERROR,B.MEDIA_ERROR,e,{code:-1,msg:t})}),this._transmuxer.on(b.Z.MEDIA_INFO,e=>{this._mediaInfo=e,this._emitter.emit(c.MEDIA_INFO,Object.assign({},e))}),this._transmuxer.on(b.Z.METADATA_ARRIVED,e=>{this._emitter.emit(c.METADATA_ARRIVED,e)}),this._transmuxer.on(b.Z.SCRIPTDATA_ARRIVED,e=>{this._emitter.emit(c.SCRIPTDATA_ARRIVED,e)}),this._transmuxer.on(b.Z.TIMED_ID3_METADATA_ARRIVED,e=>{this._emitter.emit(c.TIMED_ID3_METADATA_ARRIVED,e)}),this._transmuxer.on(b.Z.SMPTE2038_METADATA_ARRIVED,e=>{this._emitter.emit(c.SMPTE2038_METADATA_ARRIVED,e)}),this._transmuxer.on(b.Z.SCTE35_METADATA_ARRIVED,e=>{this._emitter.emit(c.SCTE35_METADATA_ARRIVED,e)}),this._transmuxer.on(b.Z.PES_PRIVATE_DATA_DESCRIPTOR,e=>{this._emitter.emit(c.PES_PRIVATE_DATA_DESCRIPTOR,e)}),this._transmuxer.on(b.Z.PES_PRIVATE_DATA_ARRIVED,e=>{this._emitter.emit(c.PES_PRIVATE_DATA_ARRIVED,e)}),this._transmuxer.on(b.Z.STATISTICS_INFO,e=>{this._statisticsInfo=this._fillStatisticsInfo(e),this._emitter.emit(c.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(b.Z.RECOMMEND_SEEKPOINT,e=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e/1e3)}),this._transmuxer.open()):this._hasPendingLoad=!0)}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){var e;return M(this,void 0,void 0,function*(){return yield null===(e=this._mediaElement)||void 0===e?void 0:e.play()})}pause(){var e;null===(e=this._mediaElement)||void 0===e||e.pause()}get type(){return this._type}get buffered(){var e;return null===(e=this._mediaElement)||void 0===e?void 0:e.buffered}get duration(){var e;return null===(e=this._mediaElement)||void 0===e?void 0:e.duration}get volume(){var e;return null===(e=this._mediaElement)||void 0===e?void 0:e.volume}set volume(e){this._mediaElement&&(this._mediaElement.volume=e)}get muted(){var e;return null===(e=this._mediaElement)||void 0===e?void 0:e.muted}set muted(e){this._mediaElement&&(this._mediaElement.muted=e)}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;let t=!0,i=0,s=0;if(this._mediaElement.getVideoPlaybackQuality){const e=this._mediaElement.getVideoPlaybackQuality();i=e.totalVideoFrames,s=e.droppedVideoFrames}else void 0!==this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,s=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=s),e}_onmseUpdateEnd(){var e,t,i,s;const a=null===(e=this._mediaElement)||void 0===e?void 0:e.buffered,n=(null===(t=this._mediaElement)||void 0===t?void 0:t.currentTime)||0;if(this._config.isLive&&this._config.liveBufferLatencyChasing&&(null==a?void 0:a.length)>0&&!(null===(i=this._mediaElement)||void 0===i?void 0:i.paused)){const e=a.end(a.length-1);if(e>((null===(s=this._config)||void 0===s?void 0:s.liveBufferLatencyMaxLatency)||0)&&e-n>(this._config.liveBufferLatencyMaxLatency||0)){const t=e-(this._config.liveBufferLatencyMinRemain||0);this.currentTime=t}}if(!this._config.lazyLoad||this._config.isLive)return;let r=0;for(let e=0;e<a.length;e++){const t=a.start(e),i=a.end(e);if(t<=n&&n<i){r=i;break}}r>=n+(this._config.lazyLoadMaxDuration||0)&&null==this._progressChecker&&(h.Z.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){h.Z.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){var e,t,i;const s=(null===(e=this._mediaElement)||void 0===e?void 0:e.currentTime)||0,a=null===(t=this._mediaElement)||void 0===t?void 0:t.buffered;let n=!1;for(let e=0;e<a.length;e++){const t=a.start(e),i=a.end(e);if(s>=t&&s<i){s>=i-(this._config.lazyLoadRecoverDuration||0)&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(h.Z.v(this.TAG,"Continue loading from paused position"),null===(i=this._transmuxer)||void 0===i||i.resume()))}_isTimepointBuffered(e){var t;const i=null===(t=this._mediaElement)||void 0===t?void 0:t.buffered;for(let t=0;t<i.length;t++){const s=i.start(t),a=i.end(t);if(e>=s&&e<a)return!0}return!1}_internalSeek(e){var t,i,s,a,n;const o=this._isTimepointBuffered(e);let r=!1,d=0;if(e<1&&(null===(t=this._mediaElement)||void 0===t?void 0:t.buffered).length>0){const t=(null===(i=this._mediaElement)||void 0===i?void 0:i.buffered).start(0);(t<1&&e<t||_.Z.safari)&&(r=!0,d=_.Z.safari?.1:t)}if(r)this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=d);else if(o){if(this._alwaysSeekKeyframe){const t=null===(s=this._msectl)||void 0===s?void 0:s.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=null!=t?t.dts/1e3:e)}else this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=e);null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),null===(a=this._msectl)||void 0===a||a.seek(e),null===(n=this._transmuxer)||void 0===n||n.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=e))}_checkAndApplyUnbufferedSeekpoint(){var e,t,i,s;if(this._seekpointRecord)if(((null===(e=this._seekpointRecord)||void 0===e?void 0:e.recordTime)||0)<=this._now()-100){const e=null===(t=this._mediaElement)||void 0===t?void 0:t.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),null===(i=this._msectl)||void 0===i||i.seek(e),null===(s=this._transmuxer)||void 0===s||s.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=e)))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(e){const t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){const e=t.buffered;e.length>0&&t.currentTime<e.start(0)&&(h.Z.w(this.TAG,`Playback seems stuck at ${t.currentTime}, seek to ${e.start(0)}`),this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=e.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress)))}else this._mediaElement&&this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(e){null!=this._pendingSeekTime&&(this._mediaElement&&(this._mediaElement.currentTime=this._pendingSeekTime),this._pendingSeekTime=null)}_onvSeeking(e){var t,i,s;const a=null===(t=this._mediaElement)||void 0===t?void 0:t.currentTime,n=null===(i=this._mediaElement)||void 0===i?void 0:i.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(a<1&&n.length>0){const e=n.start(0);if(e<1&&a<e||_.Z.safari)return this._requestSetTime=!0,void(this._mediaElement&&(this._mediaElement.currentTime=_.Z.safari?.1:e))}if(this._isTimepointBuffered(a)){if(this._alwaysSeekKeyframe){const e=null===(s=this._msectl)||void 0===s?void 0:s.getNearestKeyframe(Math.floor(1e3*a));null!=e&&(this._requestSetTime=!0,this._mediaElement&&(this._mediaElement.currentTime=e.dts/1e3))}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:a,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}}_onvCanPlay(e){var t;this._receivedCanPlay=!0,null===(t=this._mediaElement)||void 0===t||t.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(e){this._checkAndResumeStuckPlayback(!0)}_onvProgress(e){this._checkAndResumeStuckPlayback()}};var P=function(e,t,i,s){return new(i||(i=Promise))(function(a,n){function o(e){try{d(s.next(e))}catch(e){n(e)}}function r(e){try{d(s.throw(e))}catch(e){n(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,r)}d((s=s.apply(e,t||[])).next())})};const x=class{constructor(e,t){this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new l.EventEmitter,this._config=n(),"object"==typeof t&&Object.assign(this._config,t);const i=e.type.toLowerCase();if("mse"===i||"mpegts"===i||"m2ts"===i||"flv"===i)throw new w.OC("NativePlayer does't support mse/mpegts/m2ts/flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new w.OC(`NativePlayer(${e.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=e,this._mediaElement=null}destroy(){var e;this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,null===(e=this._emitter)||void 0===e||e.removeAllListeners(),this._emitter=null}on(e,t){e===c.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(()=>{this._emitter.emit(c.MEDIA_INFO,this.mediaInfo)}):e===c.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(()=>{this._emitter.emit(c.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(e,t)}off(e,t){this._emitter.removeListener(e,t)}attachMediaElement(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){var e;if(!this._mediaElement)throw new w.rT("HTMLMediaElement must be attached before load()!");this._mediaElement.src=(null===(e=this._mediaDataSource)||void 0===e?void 0:e.url)||"",this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){var e;return P(this,void 0,void 0,function*(){return yield null===(e=this._mediaElement)||void 0===e?void 0:e.play()})}pause(){var e;null===(e=this._mediaElement)||void 0===e||e.pause()}get type(){return this._type}get buffered(){var e;return null===(e=this._mediaElement)||void 0===e?void 0:e.buffered}get duration(){var e;return null===(e=this._mediaElement)||void 0===e?void 0:e.duration}get volume(){var e;return null===(e=this._mediaElement)||void 0===e?void 0:e.volume}set volume(e){this._mediaElement&&(this._mediaElement.volume=e)}get muted(){var e;return null===(e=this._mediaElement)||void 0===e?void 0:e.muted}set muted(e){this._mediaElement&&(this._mediaElement.muted=e)}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}get mediaInfo(){const e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}get statisticsInfo(){const e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;let t=!0,i=0,s=0;if(this._mediaElement.getVideoPlaybackQuality){const e=this._mediaElement.getVideoPlaybackQuality();i=e.totalVideoFrames,s=e.droppedVideoFrames}else void 0!==this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,s=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=s),e}_onvLoadedMetadata(e){null!=this._pendingSeekTime&&(this._mediaElement&&(this._mediaElement.currentTime=this._pendingSeekTime),this._pendingSeekTime=null),this._emitter.emit(c.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(c.STATISTICS_INFO,this.statisticsInfo)}},U={h264:1,h265:2,h266:4,vp8:8,vp9:16,av1:32},Z=["h264","h265"],N=e=>{const t=e.split("?"),i=new URLSearchParams(t[1]);return i.delete("vc"),i.set("vc",Z.reduce((e,t)=>e+(U[t]||0),0).toString()),t[0]+"?"+i.toString()};const G={createPlayer:function(e,t){(null==e?void 0:e.url)&&(e.url=N(e.url));const i=e;if(null==i||"object"!=typeof i)throw new w.OC("MediaDataSource must be an javascript object!");if(!Object.prototype.hasOwnProperty.call(i,"type"))throw new w.OC("MediaDataSource must has type field to indicate video file type!");switch(i.type){case"mse":case"mpegts":case"m2ts":case"flv":return new O(i,t);default:return new x(i,t)}},isSupported:function(){return r.supportMSEH264Playback()},getFeatureList:function(){return r.getFeatureList()},BaseLoader:d.fp,LoaderStatus:d.GM,LoaderErrors:d.nm,version:"",Events:c,ErrorTypes:B,ErrorDetails:I,MSEPlayer:O,NativePlayer:x,LoggingControl:y.Z};Object.defineProperty(G,"version",{enumerable:!0,get:function(){return"2.0.0"}});const V=G},607:(e,t,i)=>{e.exports=i(578).default},575:(e,t,i)=>{i.d(t,{Z:()=>v});var s=i(645);const a=class{constructor(){var e;this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,(null===(e=self.performance)||void 0===e?void 0:e.now)?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let e=(this._now()-this._lastCheckpoint)/1e3;return 0===e&&(e=1),this._intervalBytes/e/1024}get lastSecondKBps(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){const e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}};var n=i(108),o=i(479),r=i(411);class d extends n.fp{static isSupported(){var e;try{const t=o.Z.msedge&&((null===(e=null===o.Z||void 0===o.Z?void 0:o.Z.version)||void 0===e?void 0:e.minor)||0)>=15048&&!o.Z.webkit,i=!o.Z.msedge||t;return self.fetch&&self.ReadableStream&&i}catch(e){return!1}}constructor(e,t){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=e,this._config=t,this._needStash=!0,this._requestAbort=!1,this._abortController=null,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(e,t){this._dataSource=e,this._range=t;let i=e.url;this._config.reuseRedirectedURL&&void 0!==e.redirectedURL&&(i=e.redirectedURL);const s=this._seekHandler.getConfig(i,t),a=new self.Headers;if("object"==typeof s.headers){const e=s.headers;for(const t in e)e.hasOwnProperty(t)&&a.append(t,e[t])}const o={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(const e in this._config.headers)a.append(e,this._config.headers[e]);e.cors||(o.mode="same-origin"),e.withCredentials&&(o.credentials="include"),(null==e?void 0:e.referrerPolicy)&&(o.referrerPolicy=e.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,this._abortController&&(o.signal=this._abortController.signal)),this._status=n.GM.kConnecting,self.fetch(s.url,o).then(e=>{var t,i;if(this._requestAbort)return this._status=n.GM.kIdle,void(null===(t=e.body)||void 0===t||t.cancel());if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==s.url&&this._onURLRedirect){const t=this._seekHandler.removeURLParameters(e.url);this._onURLRedirect(t)}const t=e.headers.get("Content-Length");return null!=t&&(this._contentLength=parseInt(t),0!==this._contentLength&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,null===(i=e.body)||void 0===i?void 0:i.getReader())}if(this._status=n.GM.kError,!this._onError)throw new r.OZ("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(n.nm.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(e=>{var t;if(!(null===(t=this._abortController)||void 0===t?void 0:t.signal.aborted)){if(this._status=n.GM.kError,!this._onError)throw e;this._onError(n.nm.EXCEPTION,{code:-1,msg:e.message})}})}abort(){var e;if(this._requestAbort=!0,(this._status!==n.GM.kBuffering||!o.Z.chrome)&&this._abortController)try{null===(e=this._abortController)||void 0===e||e.abort()}catch(e){}}_pump(e){return e.read().then(t=>{var i,s,a,o;if(t.done){if(null!==this._contentLength&&this._receivedLength<this._contentLength){this._status=n.GM.kError;const e=n.nm.EARLY_EOF,t={code:-1,msg:"Fetch stream meet Early-EOF"};if(!this._onError)throw new r.OZ(t.msg);this._onError(e,t)}else this._status=n.GM.kComplete,this._onComplete&&this._onComplete((null===(i=this._range)||void 0===i?void 0:i.from)||0,((null===(s=this._range)||void 0===s?void 0:s.from)||0)+this._receivedLength-1)}else{if(null===(a=this._abortController)||void 0===a?void 0:a.signal.aborted)return void(this._status=n.GM.kComplete);if(this._requestAbort)return this._status=n.GM.kComplete,e.cancel();this._status=n.GM.kBuffering;const i=t.value.buffer,s=((null===(o=this._range)||void 0===o?void 0:o.from)||0)+this._receivedLength;this._receivedLength+=i.byteLength,this._onDataArrival&&this._onDataArrival(i,s,this._receivedLength),this._pump(e)}}).catch(e=>{var t,i;if(null===(i=null===(t=this._abortController)||void 0===t?void 0:t.signal)||void 0===i?void 0:i.aborted)return void(this._status=n.GM.kComplete);if(11===e.code&&o.Z.msedge)return;this._status=n.GM.kError;let s=0,a=null;if(19!==e.code&&"network error"!==e.message||!(null===this._contentLength||null!==this._contentLength&&this._receivedLength<this._contentLength)?(s=n.nm.EXCEPTION,a={code:e.code,msg:e.message}):(s=n.nm.EARLY_EOF,a={code:e.code,msg:"Fetch stream meet Early-EOF"}),!this._onError)throw new r.OZ(a.msg);this._onError(s,a)})}}const l=d;class h extends n.fp{static isSupported(){try{const e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return s.Z.w("MozChunkedLoader",e.message),!1}}constructor(e,t){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=e,this._config=t,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(e,t){this._dataSource=e,this._range=t;let i=e.url;this._config.reuseRedirectedURL&&void 0!==e.redirectedURL&&(i=e.redirectedURL);const s=this._seekHandler.getConfig(i,t);this._requestURL=s.url;const a=this._xhr=new XMLHttpRequest;if(a.open("GET",s.url,!0),a.responseType="moz-chunked-arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onloadend=this._onLoadEnd.bind(this),a.onerror=this._onXhrError.bind(this),e.withCredentials&&(a.withCredentials=!0),"object"==typeof s.headers){const e=s.headers;for(const t in e)e.hasOwnProperty(t)&&a.setRequestHeader(t,e[t])}if("object"==typeof this._config.headers){const e=this._config.headers;for(const t in e)e.hasOwnProperty(t)&&a.setRequestHeader(t,e[t])}this._status=n.GM.kConnecting,a.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=n.GM.kComplete}_onReadyStateChange(e){const t=e.target;if(2===t.readyState){if(void 0!==t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){const e=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(e)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=n.GM.kError,!this._onError)throw new r.OZ("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(n.nm.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=n.GM.kBuffering}}_onProgress(e){var t;if(this._status===n.GM.kError)return;null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));const i=e.target.response,s=((null===(t=this._range)||void 0===t?void 0:t.from)||0)+this._receivedLength;this._receivedLength+=i.byteLength,this._onDataArrival&&this._onDataArrival(i,s,this._receivedLength)}_onLoadEnd(e){this._requestAbort?this._requestAbort=!1:this._status!==n.GM.kError&&(this._status=n.GM.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(e){this._status=n.GM.kError;let t=0,i=null;if(this._contentLength&&e.loaded<this._contentLength?(t=n.nm.EARLY_EOF,i={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=n.nm.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new r.OZ(i.msg);this._onError(t,i)}}const _=h;class c extends n.fp{static isSupported(){try{const e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return s.Z.w("RangeLoader",e.message),!1}}constructor(e,t){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=e,this._config=t,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new a,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(e,t){this._dataSource=e,this._range=t,this._status=n.GM.kConnecting;let i=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(i=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||i?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}_openSubRange(){var e,t;const i=1024*this._currentChunkSizeKB,s=((null===(e=this._range)||void 0===e?void 0:e.from)||0)+this._receivedLength;let a=s+i;null!=this._contentLength&&a-this._range.from>=this._contentLength&&(a=((null===(t=this._range)||void 0===t?void 0:t.from)||0)+this._contentLength-1),this._currentRequestRange={from:s,to:a},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(e,t){this._lastTimeLoaded=0;let i=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?i=this._currentRedirectedURL:null!=e.redirectedURL&&(i=e.redirectedURL));const s=this._seekHandler.getConfig(i,t);this._currentRequestURL=s.url;const a=this._xhr=new XMLHttpRequest;if(a.open("GET",s.url,!0),a.responseType="arraybuffer",a.onreadystatechange=this._onReadyStateChange.bind(this),a.onprogress=this._onProgress.bind(this),a.onload=this._onLoad.bind(this),a.onerror=this._onXhrError.bind(this),e.withCredentials&&(a.withCredentials=!0),"object"==typeof s.headers){const e=s.headers;for(const t in e)e.hasOwnProperty(t)&&a.setRequestHeader(t,e[t])}if("object"==typeof this._config.headers){const e=this._config.headers;for(const t in e)e.hasOwnProperty(t)&&a.setRequestHeader(t,e[t])}a.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=n.GM.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(e){const t=e.target;if(2===t.readyState){if(null!=t.responseURL){const e=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&e!==this._currentRedirectedURL&&(this._currentRedirectedURL=e,this._onURLRedirect&&this._onURLRedirect(e))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=n.GM.kBuffering}else{if(this._status=n.GM.kError,!this._onError)throw new r.OZ("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(n.nm.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}_onProgress(e){if(this._status===n.GM.kError)return;if(null===this._contentLength){let t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;const i=e.total;this._internalAbort(),null!=i&&0!==i&&(this._totalLength=i)}if(-1===this._range.to?this._contentLength=(this._totalLength||0)-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}const t=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(t)}_normalizeSpeed(e){const t=this._chunkSizeKBList,i=t.length-1;let s=0,a=0,n=i;if(e<t[0])return t[0];for(;a<=n;){if(s=a+Math.floor((n-a)/2),s===i||e>=t[s]&&e<t[s+1])return t[s];t[s]<e?a=s+1:n=s-1}}_onLoad(e){if(this._status===n.GM.kError)return;if(this._waitForTotalLength)return void(this._waitForTotalLength=!1);this._lastTimeLoaded=0;let t=this._speedSampler.lastSecondKBps;if(0===t&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps)),0!==t){const e=this._normalizeSpeed(t);this._currentSpeedNormalized!==e&&(this._currentSpeedNormalized=e,this._currentChunkSizeKB=e)}const i=e.target.response,s=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;let a=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():a=!0,this._onDataArrival&&this._onDataArrival(i,s,this._receivedLength),a&&(this._status=n.GM.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(e){this._status=n.GM.kError;let t=0,i=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=n.nm.EARLY_EOF,i={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=n.nm.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new r.OZ(i.msg);this._onError(t,i)}}const u=c;class m extends n.fp{static isSupported(){try{return void 0!==self.WebSocket}catch(e){return!1}}constructor(e,t){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(e){try{const t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=n.GM.kConnecting}catch(e){this._status=n.GM.kError;const t={code:e.code,msg:e.message};if(!this._onError)throw new r.OZ(t.msg);this._onError(n.nm.EXCEPTION,t)}}abort(){const e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=n.GM.kComplete}_onWebSocketOpen(e){this._status=n.GM.kBuffering}_onWebSocketClose(e){this._requestAbort?this._requestAbort=!1:(this._status=n.GM.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1))}_onWebSocketMessage(e){if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){const t=new FileReader;t.onload=()=>{this._dispatchArrayBuffer(null==t?void 0:t.result)},t.readAsArrayBuffer(e.data)}else{this._status=n.GM.kError;const t={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new r.OZ(t.msg);this._onError(n.nm.EXCEPTION,t)}}_dispatchArrayBuffer(e){const t=e,i=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)}_onWebSocketError(e){this._status=n.GM.kError;const t={code:e.code,msg:e.message};if(!this._onError)throw new r.OZ(t.msg);this._onError(n.nm.EXCEPTION,t)}}const f=m;const p=class{constructor(e){this._zeroStart=e||!1}getConfig(e,t){const i={};if(0!==t.from||-1!==t.to){let e;e=-1!==t.to?`bytes=${t.from.toString()}-${t.to.toString()}`:`bytes=${t.from.toString()}-`,i.Range=e}else this._zeroStart&&(i.Range="bytes=0-");return{url:e,headers:i}}removeURLParameters(e){return e}};const g=class{constructor(e,t){this._startName=e,this._endName=t}getConfig(e,t){let i=e;if(0!==t.from||-1!==t.to){let e=!0;i.includes("?")||(i+="?",e=!1),e&&(i+="&"),i+=`${this._startName}=${t.from.toString()}`,-1!==t.to&&(i+=`&${this._endName}=${t.to.toString()}`)}return{url:i,headers:{}}}removeURLParameters(e){const t=e.split("?")[0];let i;const s=e.indexOf("?");-1!==s&&(i=e.substring(s+1));let a="";if(void 0!==i&&i.length>0){const e=i.split("&");for(let t=0;t<e.length;t++){const i=e[t].split("="),s=t>0;i[0]!==this._startName&&i[0]!==this._endName&&(s&&(a+="&"),a+=e[t])}}return 0===a.length?t:t+"?"+a}};const v=class{constructor(e,t,i){this.TAG="IOController",this._config=t,this._extraData=i,this._stashInitialSize=65536,void 0!==t.stashInitialSize&&t.stashInitialSize>0&&(this._stashInitialSize=t.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,t.enableStashBuffer||(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(e.url||""),this._refTotalLength=e.filesize?e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new a,this._speedNormalizeList=[32,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){var e,t,i;(null===(e=this._loader)||void 0===e?void 0:e.isWorking())&&(null===(t=this._loader)||void 0===t||t.abort()),null===(i=this._loader)||void 0===i||i.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){var e;return(null===(e=this._loader)||void 0===e?void 0:e.isWorking())&&!this._paused}isPaused(){return this._paused}get status(){var e;return null===(e=this._loader)||void 0===e?void 0:e.status}get extraData(){return this._extraData}set extraData(e){this._extraData=e}get onDataArrival(){return this._onDataArrival}set onDataArrival(e){this._onDataArrival=e}get onSeeked(){return this._onSeeked}set onSeeked(e){this._onSeeked=e}get onError(){return this._onError}set onError(e){this._onError=e}get onComplete(){return this._onComplete}set onComplete(e){this._onComplete=e}get onRedirect(){return this._onRedirect}set onRedirect(e){this._onRedirect=e}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(e){this._onRecoveredEarlyEof=e}get currentURL(){var e;return null===(e=this._dataSource)||void 0===e?void 0:e.url}get hasRedirect(){var e;return null!=this._redirectedURL||void 0!==(null===(e=this._dataSource)||void 0===e?void 0:e.redirectedURL)}get currentRedirectedURL(){var e;return this._redirectedURL||(null===(e=this._dataSource)||void 0===e?void 0:e.redirectedURL)}get currentSpeed(){var e,t;return this._loaderClass===u?null===(e=this._loader)||void 0===e?void 0:e.currentSpeed:null===(t=this._speedSampler)||void 0===t?void 0:t.lastSecondKBps}get loaderType(){var e;return null===(e=this._loader)||void 0===e?void 0:e.type}_selectSeekHandler(){const e=this._config;if("range"===e.seekType)this._seekHandler=new p(!!this._config.rangeLoadZeroStart);else if("param"===e.seekType){const t=e.seekParamStart||"bstart",i=e.seekParamEnd||"bend";this._seekHandler=new g(t,i)}else{if("custom"!==e.seekType)throw new r.OC(`Invalid seekType in config: ${(null==e?void 0:e.seekType)||""}`);if("function"!=typeof e.customSeekHandler)throw new r.OC("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}_selectLoader(){var e;if(null!=this._config.customLoader)this._loaderClass=(null===(e=this._config)||void 0===e?void 0:e.customLoader)||null;else if(this._isWebSocketURL)this._loaderClass=f;else if(l.isSupported())this._loaderClass=l;else if(_.isSupported())this._loaderClass=_;else{if(!u.isSupported())throw new r.OZ("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=u}}_createLoader(){var e;this._loaderClass&&(this._loader=new this._loaderClass(this._seekHandler,this._config),(null===(e=this._loader)||void 0===e?void 0:e.needStashBuffer)||(this._enableStash=!1),this._loader&&(this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)))}open(e){var t,i;this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),null===(t=this._speedSampler)||void 0===t||t.reset(),e||(this._fullRequestFlag=!0),null===(i=this._loader)||void 0===i||i.open(this._dataSource,Object.assign({},this._currentRange))}abort(){var e;null===(e=this._loader)||void 0===e||e.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){var e,t;this.isWorking()&&(null===(e=this._loader)||void 0===e||e.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange&&(this._currentRange.to=this._stashByteStart-1)):this._resumeFrom=((null===(t=this._currentRange)||void 0===t?void 0:t.to)||0)+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;const e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}seek(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}_internalSeek(e,t){var i,s,a,n;(null===(i=this._loader)||void 0===i?void 0:i.isWorking())&&(null===(s=this._loader)||void 0===s||s.abort()),this._flushStashBuffer(t),null===(a=this._loader)||void 0===a||a.destroy(),this._loader=null;const o={from:e,to:-1};this._currentRange={from:o.from,to:-1},null===(n=this._speedSampler)||void 0===n||n.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,o),this._onSeeked&&this._onSeeked()}updateUrl(e){if(!e||"string"!=typeof e||0===e.length)throw new r.OC("Url must be a non-empty string!");this._dataSource.url=e}_expandBuffer(e){let t=this._stashSize;for(;t+1048576<e;)t*=2;if(t+=1048576,t===this._bufferSize)return;const i=new ArrayBuffer(t);if(this._stashUsed>0){const e=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(i,0,t).set(e,0)}this._stashBuffer=i,this._bufferSize=t}_normalizeSpeed(e){const t=this._speedNormalizeList,i=t.length-1;let s=0,a=0,n=i;if(e<t[0])return t[0];for(;a<=n;){if(s=a+Math.floor((n-a)/2),s===i||e>=t[s]&&e<t[s+1])return t[s];t[s]<e?a=s+1:n=s-1}}_adjustStashSize(e){let t=0;t=this._config.isLive?e/8:e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e,t>8192&&(t=8192);const i=1024*t+1048576;this._bufferSize<i&&this._expandBuffer(i),this._stashSize=1024*t}_dispatchChunks(e,t){return this._currentRange&&(this._currentRange.to=t+e.byteLength-1),this._onDataArrival?this._onDataArrival(e,t):0}_onURLRedirect(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}_onContentLengthKnown(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}_onLoaderChunkArrival(e,t,i){var s,a;if(!this._onDataArrival)throw new r.rT("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),null===(s=this._speedSampler)||void 0===s||s.addBytes(e.byteLength);const n=null===(a=this._speedSampler)||void 0===a?void 0:a.lastSecondKBps;if(0!==n){const e=this._normalizeSpeed(n);this._speedNormalized!==e&&(this._speedNormalized=e,this._adjustStashSize(e))}if(this._enableStash){if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{let i=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){const t=this._stashBuffer.slice(0,this._stashUsed),s=this._dispatchChunks(t,this._stashByteStart);if(s<t.byteLength){if(s>0){const e=new Uint8Array(t,s);i.set(e,0),this._stashUsed=e.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+e.byteLength>this._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}else{const s=this._dispatchChunks(e,t);if(s<e.byteLength){const a=e.byteLength-s;a>this._bufferSize&&(this._expandBuffer(a),i=new Uint8Array(this._stashBuffer,0,this._bufferSize)),i.set(new Uint8Array(e,s),0),this._stashUsed+=a,this._stashByteStart=t+s}}}}else if(0===this._stashUsed){const i=this._dispatchChunks(e,t);if(i<e.byteLength){const s=e.byteLength-i;s>this._bufferSize&&this._expandBuffer(s);new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,i),0),this._stashUsed+=s,this._stashByteStart=t+i}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);const t=new Uint8Array(this._stashBuffer,0,this._bufferSize);t.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;const i=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(i<this._stashUsed&&i>0){const e=new Uint8Array(this._stashBuffer,i);t.set(e,0)}this._stashUsed-=i,this._stashByteStart+=i}}_flushStashBuffer(e){if(this._stashUsed>0){const t=this._stashBuffer.slice(0,this._stashUsed),i=this._dispatchChunks(t,this._stashByteStart),a=t.byteLength-i;if(i<t.byteLength){if(!e){if(i>0){const e=new Uint8Array(this._stashBuffer,0,this._bufferSize),s=new Uint8Array(t,i);e.set(s,0),this._stashUsed=s.byteLength,this._stashByteStart+=i}return 0}s.Z.w(this.TAG,`${a} bytes unconsumed data remain when flush buffer, dropped`)}return this._stashUsed=0,this._stashByteStart=0,a}return 0}_onLoaderComplete(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(e,t){var i;switch(s.Z.e(this.TAG,`Loader error, code = ${t.code}, msg = ${t.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=n.nm.UNRECOVERABLE_EARLY_EOF),e){case n.nm.EARLY_EOF:if(!this._config.isLive&&this._totalLength){const e=((null===(i=this._currentRange)||void 0===i?void 0:i.to)||0)+1;return void(e<this._totalLength&&(s.Z.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(e,!1)))}e=n.nm.UNRECOVERABLE_EARLY_EOF;case n.nm.UNRECOVERABLE_EARLY_EOF:case n.nm.CONNECTING_TIMEOUT:case n.nm.HTTP_STATUS_CODE_INVALID:case n.nm.EXCEPTION:}if(!this._onError)throw new r.OZ("IOException: "+t.msg);this._onError(e,t)}}},108:(e,t,i)=>{i.d(t,{GM:()=>a,fp:()=>o,nm:()=>n});var s=i(411);const a={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},n={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class o{constructor(e){this._type=e||"undefined",this._status=a.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=a.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===a.kConnecting||this._status===a.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(e){this._onContentLengthKnown=e}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(e){this._onURLRedirect=e}get onDataArrival(){return this._onDataArrival}set onDataArrival(e){this._onDataArrival=e}get onError(){return this._onError}set onError(e){this._onError=e}get onComplete(){return this._onComplete}set onComplete(e){this._onComplete=e}open(e,t){throw new s.do("Unimplemented abstract function!")}abort(){throw new s.do("Unimplemented abstract function!")}}},479:(e,t,i)=>{i.d(t,{Z:()=>a});const s={};!function(){const e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.includes("trident")&&/(rv)(?::| )([\w.]+)/.exec(e)||!e.includes("compatible")&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],i=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],a={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:i[0]||""},n={};if(a.browser){n[a.browser]=!0;const e=a.majorVersion.split(".");n.version={major:parseInt(a.majorVersion,10),string:a.version},e.length>1&&(n.version.minor=parseInt(e[1],10)),e.length>2&&(n.version.build=parseInt(e[2],10))}if(a.platform&&(n[a.platform]=!0),(n.chrome||n.opr||n.safari)&&(n.webkit=!0),n.rv||n.iemobile){n.rv&&delete n.rv;const e="msie";a.browser=e,n[e]=!0}if(n.edge){delete n.edge;const e="msedge";a.browser=e,n[e]=!0}if(n.opr){const e="opera";a.browser=e,n[e]=!0}if(n.safari&&n.android){const e="android";a.browser=e,n[e]=!0}n.name=a.browser,n.platform=a.platform;for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&delete s[e];Object.assign(s,n)}();const a=s},411:(e,t,i)=>{i.d(t,{OC:()=>n,OZ:()=>s,do:()=>o,rT:()=>a});class s{constructor(e){this.name="RuntimeException",this._message=e}get message(){return this._message}toString(){return this.name+": "+this.message}}class a extends s{constructor(e){super(e),this.name="IllegalStateException"}}class n extends s{constructor(e){super(e),this.name="InvalidArgumentException"}}class o extends s{constructor(e){super(e),this.name="NotImplementedException"}}},645:(e,t,i)=>{i.d(t,{Z:()=>n});var s=i(99);class a{static e(e,t){var i;e&&!a.FORCE_GLOBAL_TAG||(e=a.GLOBAL_TAG);const s=`[${e}] > ${t}`;a.ENABLE_CALLBACK&&(null===(i=a.emitter)||void 0===i||i.emit("log","error",s)),a.ENABLE_ERROR&&(console.error?console.error(s):console.warn?console.warn(s):console.log(s))}static i(e,t){e&&!a.FORCE_GLOBAL_TAG||(e=a.GLOBAL_TAG);const i=`[${e}] > ${t}`;a.ENABLE_CALLBACK&&a.emitter.emit("log","info",i),a.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}static w(e,t){e&&!a.FORCE_GLOBAL_TAG||(e=a.GLOBAL_TAG);const i=`[${e}] > ${t}`;a.ENABLE_CALLBACK&&a.emitter.emit("log","warn",i),a.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}static d(e,t){var i;e&&!a.FORCE_GLOBAL_TAG||(e=a.GLOBAL_TAG);const s=`[${e}] > ${t}`;a.ENABLE_CALLBACK&&(null===(i=a.emitter)||void 0===i||i.emit("log","debug",s)),a.ENABLE_DEBUG&&(console.debug?console.debug(s):console.log(s))}static v(e,t){var i;e&&!a.FORCE_GLOBAL_TAG||(e=a.GLOBAL_TAG);const s=`[${e}] > ${t}`;a.ENABLE_CALLBACK&&(null===(i=a.emitter)||void 0===i||i.emit("log","verbose",s)),a.ENABLE_VERBOSE&&console.log(s)}}a.FORCE_GLOBAL_TAG=!1,a.GLOBAL_TAG="mpegts.js",a.ENABLE_CALLBACK=!1,a.emitter=new s.EventEmitter,a.ENABLE_ERROR=!0,a.ENABLE_INFO=!0,a.ENABLE_WARN=!0,a.ENABLE_DEBUG=!0,a.ENABLE_VERBOSE=!0;const n=a},278:(e,t,i)=>{i.d(t,{Z:()=>o});var s=i(99),a=i(645);class n{static get forceGlobalTag(){return a.Z.FORCE_GLOBAL_TAG}static set forceGlobalTag(e){a.Z.FORCE_GLOBAL_TAG=e,n._notifyChange()}static get globalTag(){return a.Z.GLOBAL_TAG}static set globalTag(e){a.Z.GLOBAL_TAG=e,n._notifyChange()}static get enableAll(){return a.Z.ENABLE_VERBOSE&&a.Z.ENABLE_DEBUG&&a.Z.ENABLE_INFO&&a.Z.ENABLE_WARN&&a.Z.ENABLE_ERROR}static set enableAll(e){a.Z.ENABLE_VERBOSE=e,a.Z.ENABLE_DEBUG=e,a.Z.ENABLE_INFO=e,a.Z.ENABLE_WARN=e,a.Z.ENABLE_ERROR=e,n._notifyChange()}static get enableDebug(){return a.Z.ENABLE_DEBUG}static set enableDebug(e){a.Z.ENABLE_DEBUG=e,n._notifyChange()}static get enableVerbose(){return a.Z.ENABLE_VERBOSE}static set enableVerbose(e){a.Z.ENABLE_VERBOSE=e,n._notifyChange()}static get enableInfo(){return a.Z.ENABLE_INFO}static set enableInfo(e){a.Z.ENABLE_INFO=e,n._notifyChange()}static get enableWarn(){return a.Z.ENABLE_WARN}static set enableWarn(e){a.Z.ENABLE_WARN=e,n._notifyChange()}static get enableError(){return a.Z.ENABLE_ERROR}static set enableError(e){a.Z.ENABLE_ERROR=e,n._notifyChange()}static getConfig(){return{globalTag:a.Z.GLOBAL_TAG,forceGlobalTag:a.Z.FORCE_GLOBAL_TAG,enableVerbose:a.Z.ENABLE_VERBOSE,enableDebug:a.Z.ENABLE_DEBUG,enableInfo:a.Z.ENABLE_INFO,enableWarn:a.Z.ENABLE_WARN,enableError:a.Z.ENABLE_ERROR,enableCallback:a.Z.ENABLE_CALLBACK}}static applyConfig(e){a.Z.GLOBAL_TAG=e.globalTag,a.Z.FORCE_GLOBAL_TAG=e.forceGlobalTag,a.Z.ENABLE_VERBOSE=e.enableVerbose,a.Z.ENABLE_DEBUG=e.enableDebug,a.Z.ENABLE_INFO=e.enableInfo,a.Z.ENABLE_WARN=e.enableWarn,a.Z.ENABLE_ERROR=e.enableError,a.Z.ENABLE_CALLBACK=!!e.enableCallback}static _notifyChange(){const e=n.emitter;if(e.listenerCount("change")>0){const t=n.getConfig();e.emit("change",t)}}static registerListener(e){n.emitter.addListener("change",e)}static removeListener(e){n.emitter.removeListener("change",e)}static addLogListener(e){a.Z.emitter.addListener("log",e),a.Z.emitter.listenerCount("log")>0&&(a.Z.ENABLE_CALLBACK=!0,n._notifyChange())}static removeLogListener(e){a.Z.emitter.removeListener("log",e),0===a.Z.emitter.listenerCount("log")&&(a.Z.ENABLE_CALLBACK=!1,n._notifyChange())}}n.emitter=new s.EventEmitter;const o=n}},t={};function i(s){var a=t[s];if(void 0!==a)return a.exports;var n=t[s]={exports:{}};return e[s](n,n.exports,i),n.exports}return i.m=e,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i(607)})())})(flv_min);class FLV{constructor(videoId,url){console.log("isSupportFlv",window.flvjs.isSupported());if(window.flvjs.isSupported()){this.initFLV(videoId,url)}}toString(){return`Flv ${this.coreX}-${this.coreY}`}initFLV(videoId,flvUrl){const{deviceSerial,channelNo,hd,type}=matchUrl(flvUrl);window.ezuikitMonitor.report({protocol:"flv",url:flvUrl,serial:deviceSerial,no:channelNo,action:1,logInfo:{type:type}});var video=document.getElementById(videoId);var hasControls=video.getAttribute("controls");if(!hasControls){video.setAttribute("controls",true)}var flvPlayer=window.flvjs.createPlayer({type:"flv",url:flvUrl,isLive:true},{enableStashBuffer:true,stashInitialSize:128,enableWorker:true});flvPlayer.attachMediaElement(video);flvPlayer.load();flvPlayer.play();this.flvUrl=flvUrl;this.flv=flvPlayer;this.video=video;this.video.addEventListener("oncanplaythrough",function(){console.log("oncanplaythrough")},false);this.video.addEventListener("onerror",function(){console.log("onerror")},false)}play(){console.log("执行flv播放",this.video);this.video.play()}stop(){this.video.pause();this.flv.unload()}destroy(){if(this.flv===undefined||this.flv===null){return}this.flv.pause();this.flv.unload();this.flv.detachMediaElement();this.flv.destroy();this.flv=null}}var lodash={exports:{}};lodash.exports;(function(module,exports){(function(){var undefined$1;var VERSION="4.17.21";var LARGE_ARRAY_SIZE=200;var CORE_ERROR_TEXT="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",FUNC_ERROR_TEXT="Expected a function",INVALID_TEMPL_VAR_ERROR_TEXT="Invalid `variable` option passed into `_.template`";var HASH_UNDEFINED="__lodash_hash_undefined__";var MAX_MEMOIZE_SIZE=500;var PLACEHOLDER="__lodash_placeholder__";var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;var WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256,WRAP_FLIP_FLAG=512;var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION="...";var HOT_COUNT=800,HOT_SPAN=16;var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,LAZY_WHILE_FLAG=3;var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=17976931348623157e292,NAN=0/0;var MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;var wrapFlags=[["ary",WRAP_ARY_FLAG],["bind",WRAP_BIND_FLAG],["bindKey",WRAP_BIND_KEY_FLAG],["curry",WRAP_CURRY_FLAG],["curryRight",WRAP_CURRY_RIGHT_FLAG],["flip",WRAP_FLIP_FLAG],["partial",WRAP_PARTIAL_FLAG],["partialRight",WRAP_PARTIAL_RIGHT_FLAG],["rearg",WRAP_REARG_FLAG]];var argsTag="[object Arguments]",arrayTag="[object Array]",asyncTag="[object AsyncFunction]",boolTag="[object Boolean]",dateTag="[object Date]",domExcTag="[object DOMException]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",nullTag="[object Null]",objectTag="[object Object]",promiseTag="[object Promise]",proxyTag="[object Proxy]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",undefinedTag="[object Undefined]",weakMapTag="[object WeakMap]",weakSetTag="[object WeakSet]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);var reTrimStart=/^\s+/;var reWhitespace=/\s/;var reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /;var reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var reForbiddenIdentifierChars=/[()=,{}\[\]\/\s]/;var reEscapeChar=/\\(\\)?/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;var reIsBinary=/^0b[01]+$/i;var reIsHostCtor=/^\[object .+?Constructor\]$/;var reIsOctal=/^0o[0-7]+$/i;var reIsUint=/^(?:0|[1-9]\d*)$/;var reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var reNoMatch=/($^)/;var reUnescapedString=/['\n\r\u2028\u2029\\]/g;var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange;var rsApos="['’]",rsAstral="["+rsAstralRange+"]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d";var rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")";var reApos=RegExp(rsApos,"g");var reComboMark=RegExp(rsCombo,"g");var reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");var reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");var reHasUnicode=RegExp("["+rsZWJ+rsAstralRange+rsComboRange+rsVarRange+"]");var reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var contextProps=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"];var templateCounter=-1;var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;var deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"};var htmlEscapes={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var htmlUnescapes={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var freeParseFloat=parseFloat,freeParseInt=parseInt;var freeGlobal=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();var freeExports=exports&&!exports.nodeType&&exports;var freeModule=freeExports&&"object"=="object"&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports;var freeProcess=moduleExports&&freeGlobal.process;var nodeUtil=function(){try{var types=freeModule&&freeModule.require&&freeModule.require("util").types;if(types){return types}return freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}();var nodeIsArrayBuffer=nodeUtil&&nodeUtil.isArrayBuffer,nodeIsDate=nodeUtil&&nodeUtil.isDate,nodeIsMap=nodeUtil&&nodeUtil.isMap,nodeIsRegExp=nodeUtil&&nodeUtil.isRegExp,nodeIsSet=nodeUtil&&nodeUtil.isSet,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}function arrayAggregator(array,setter,iteratee,accumulator){var index=-1,length=array==null?0:array.length;while(++index<length){var value=array[index];setter(accumulator,value,iteratee(value),array)}return accumulator}function arrayEach(array,iteratee){var index=-1,length=array==null?0:array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}function arrayEachRight(array,iteratee){var length=array==null?0:array.length;while(length--){if(iteratee(array[length],length,array)===false){break}}return array}function arrayEvery(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(!predicate(array[index],index,array)){return false}}return true}function arrayFilter(array,predicate){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[resIndex++]=value}}return result}function arrayIncludes(array,value){var length=array==null?0:array.length;return!!length&&baseIndexOf(array,value,0)>-1}function arrayIncludesWith(array,value,comparator){var index=-1,length=array==null?0:array.length;while(++index<length){if(comparator(value,array[index])){return true}}return false}function arrayMap(array,iteratee){var index=-1,length=array==null?0:array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}function arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index]}return array}function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=array==null?0:array.length;if(initAccum&&length){accumulator=array[++index]}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array)}return accumulator}function arrayReduceRight(array,iteratee,accumulator,initAccum){var length=array==null?0:array.length;if(initAccum&&length){accumulator=array[--length]}while(length--){accumulator=iteratee(accumulator,array[length],length,array)}return accumulator}function arraySome(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}var asciiSize=baseProperty("length");function asciiToArray(string){return string.split("")}function asciiWords(string){return string.match(reAsciiWord)||[]}function baseFindKey(collection,predicate,eachFunc){var result;eachFunc(collection,function(value,key,collection){if(predicate(value,key,collection)){result=key;return false}});return result}function baseFindIndex(array,predicate,fromIndex,fromRight){var length=array.length,index=fromIndex+(fromRight?1:-1);while(fromRight?index--:++index<length){if(predicate(array[index],index,array)){return index}}return-1}function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}function baseIndexOfWith(array,value,fromIndex,comparator){var index=fromIndex-1,length=array.length;while(++index<length){if(comparator(array[index],value)){return index}}return-1}function baseIsNaN(value){return value!==value}function baseMean(array,iteratee){var length=array==null?0:array.length;return length?baseSum(array,iteratee)/length:NAN}function baseProperty(key){return function(object){return object==null?undefined$1:object[key]}}function basePropertyOf(object){return function(key){return object==null?undefined$1:object[key]}}function baseReduce(collection,iteratee,accumulator,initAccum,eachFunc){eachFunc(collection,function(value,index,collection){accumulator=initAccum?(initAccum=false,value):iteratee(accumulator,value,index,collection)});return accumulator}function baseSortBy(array,comparer){var length=array.length;array.sort(comparer);while(length--){array[length]=array[length].value}return array}function baseSum(array,iteratee){var result,index=-1,length=array.length;while(++index<length){var current=iteratee(array[index]);if(current!==undefined$1){result=result===undefined$1?current:result+current}}return result}function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index)}return result}function baseToPairs(object,props){return arrayMap(props,function(key){return[key,object[key]]})}function baseTrim(string){return string?string.slice(0,trimmedEndIndex(string)+1).replace(reTrimStart,""):string}function baseUnary(func){return function(value){return func(value)}}function baseValues(object,props){return arrayMap(props,function(key){return object[key]})}function cacheHas(cache,key){return cache.has(key)}function charsStartIndex(strSymbols,chrSymbols){var index=-1,length=strSymbols.length;while(++index<length&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1){}return index}function charsEndIndex(strSymbols,chrSymbols){var index=strSymbols.length;while(index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1){}return index}function countHolders(array,placeholder){var length=array.length,result=0;while(length--){if(array[length]===placeholder){++result}}return result}var deburrLetter=basePropertyOf(deburredLetters);var escapeHtmlChar=basePropertyOf(htmlEscapes);function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function getValue(object,key){return object==null?undefined$1:object[key]}function hasUnicode(string){return reHasUnicode.test(string)}function hasUnicodeWord(string){return reHasUnicodeWord.test(string)}function iteratorToArray(iterator){var data,result=[];while(!(data=iterator.next()).done){result.push(data.value)}return result}function mapToArray(map){var index=-1,result=Array(map.size);map.forEach(function(value,key){result[++index]=[key,value]});return result}function overArg(func,transform){return function(arg){return func(transform(arg))}}function replaceHolders(array,placeholder){var index=-1,length=array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(value===placeholder||value===PLACEHOLDER){array[index]=PLACEHOLDER;result[resIndex++]=index}}return result}function setToArray(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=value});return result}function setToPairs(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=[value,value]});return result}function strictIndexOf(array,value,fromIndex){var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}function strictLastIndexOf(array,value,fromIndex){var index=fromIndex+1;while(index--){if(array[index]===value){return index}}return index}function stringSize(string){return hasUnicode(string)?unicodeSize(string):asciiSize(string)}function stringToArray(string){return hasUnicode(string)?unicodeToArray(string):asciiToArray(string)}function trimmedEndIndex(string){var index=string.length;while(index--&&reWhitespace.test(string.charAt(index))){}return index}var unescapeHtmlChar=basePropertyOf(htmlUnescapes);function unicodeSize(string){var result=reUnicode.lastIndex=0;while(reUnicode.test(string)){++result}return result}function unicodeToArray(string){return string.match(reUnicode)||[]}function unicodeWords(string){return string.match(reUnicodeWord)||[]}var runInContext=function runInContext(context){context=context==null?root:_.defaults(root.Object(),context,_.pick(root,contextProps));var Array=context.Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError;var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;var coreJsData=context["__core-js_shared__"];var funcToString=funcProto.toString;var hasOwnProperty=objectProto.hasOwnProperty;var idCounter=0;var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();var nativeObjectToString=objectProto.toString;var objectCtorString=funcToString.call(Object);var oldDash=root._;var reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Buffer=moduleExports?context.Buffer:undefined$1,Symbol=context.Symbol,Uint8Array=context.Uint8Array,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined$1,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,spreadableSymbol=Symbol?Symbol.isConcatSpreadable:undefined$1,symIterator=Symbol?Symbol.iterator:undefined$1,symToStringTag=Symbol?Symbol.toStringTag:undefined$1;var defineProperty=function(){try{var func=getNative(Object,"defineProperty");func({},"",{});return func}catch(e){}}();var ctxClearTimeout=context.clearTimeout!==root.clearTimeout&&context.clearTimeout,ctxNow=Date&&Date.now!==root.Date.now&&Date.now,ctxSetTimeout=context.setTimeout!==root.setTimeout&&context.setTimeout;var nativeCeil=Math.ceil,nativeFloor=Math.floor,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined$1,nativeIsFinite=context.isFinite,nativeJoin=arrayProto.join,nativeKeys=overArg(Object.keys,Object),nativeMax=Math.max,nativeMin=Math.min,nativeNow=Date.now,nativeParseInt=context.parseInt,nativeRandom=Math.random,nativeReverse=arrayProto.reverse;var DataView=getNative(context,"DataView"),Map=getNative(context,"Map"),Promise=getNative(context,"Promise"),Set=getNative(context,"Set"),WeakMap=getNative(context,"WeakMap"),nativeCreate=getNative(Object,"create");var metaMap=WeakMap&&new WeakMap;var realNames={};var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap);var symbolProto=Symbol?Symbol.prototype:undefined$1,symbolValueOf=symbolProto?symbolProto.valueOf:undefined$1,symbolToString=symbolProto?symbolProto.toString:undefined$1;function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper){return value}if(hasOwnProperty.call(value,"__wrapped__")){return wrapperClone(value)}}return new LodashWrapper(value)}var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto)){return{}}if(objectCreate){return objectCreate(proto)}object.prototype=proto;var result=new object;object.prototype=undefined$1;return result}}();function baseLodash(){}function LodashWrapper(value,chainAll){this.__wrapped__=value;this.__actions__=[];this.__chain__=!!chainAll;this.__index__=0;this.__values__=undefined$1}lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}};lodash.prototype=baseLodash.prototype;lodash.prototype.constructor=lodash;LodashWrapper.prototype=baseCreate(baseLodash.prototype);LodashWrapper.prototype.constructor=LodashWrapper;function LazyWrapper(value){this.__wrapped__=value;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=MAX_ARRAY_LENGTH;this.__views__=[]}function lazyClone(){var result=new LazyWrapper(this.__wrapped__);result.__actions__=copyArray(this.__actions__);result.__dir__=this.__dir__;result.__filtered__=this.__filtered__;result.__iteratees__=copyArray(this.__iteratees__);result.__takeCount__=this.__takeCount__;result.__views__=copyArray(this.__views__);return result}function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1;result.__filtered__=true}else{result=this.clone();result.__dir__*=-1}return result}function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=getView(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||!isRight&&arrLength==length&&takeCount==length){return baseWrapperValue(array,this.__actions__)}var result=[];outer:while(length--&&resIndex<takeCount){index+=dir;var iterIndex=-1,value=array[index];while(++iterIndex<iterLength){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type,computed=iteratee(value);if(type==LAZY_MAP_FLAG){value=computed}else if(!computed){if(type==LAZY_FILTER_FLAG){continue outer}else{break outer}}}result[resIndex++]=value}return result}LazyWrapper.prototype=baseCreate(baseLodash.prototype);LazyWrapper.prototype.constructor=LazyWrapper;function Hash(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0}function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];this.size-=result?1:0;return result}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined$1:result}return hasOwnProperty.call(data,key)?data[key]:undefined$1}function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined$1:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;this.size+=this.has(key)?0:1;data[key]=nativeCreate&&value===undefined$1?HASH_UNDEFINED:value;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[];this.size=0}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}--this.size;return true}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined$1:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value])}else{data[index][1]=value}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.size=0;this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){var result=getMapData(this,key)["delete"](key);this.size-=result?1:0;return result}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;data.set(key,value);this.size+=data.size==size?0:1;return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function SetCache(values){var index=-1,length=values==null?0:values.length;this.__data__=new MapCache;while(++index<length){this.add(values[index])}}function setCacheAdd(value){this.__data__.set(value,HASH_UNDEFINED);return this}function setCacheHas(value){return this.__data__.has(value)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}function stackClear(){this.__data__=new ListCache;this.size=0}function stackDelete(key){var data=this.__data__,result=data["delete"](key);this.size=data.size;return result}function stackGet(key){return this.__data__.get(key)}function stackHas(key){return this.__data__.has(key)}function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);this.size=++data.size;return this}data=this.__data__=new MapCache(pairs)}data.set(key,value);this.size=data.size;return this}Stack.prototype.clear=stackClear;Stack.prototype["delete"]=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value){if((inherited||hasOwnProperty.call(value,key))&&!(skipIndexes&&(key=="length"||isBuff&&(key=="offset"||key=="parent")||isType&&(key=="buffer"||key=="byteLength"||key=="byteOffset")||isIndex(key,length)))){result.push(key)}}return result}function arraySample(array){var length=array.length;return length?array[baseRandom(0,length-1)]:undefined$1}function arraySampleSize(array,n){return shuffleSelf(copyArray(array),baseClamp(n,0,array.length))}function arrayShuffle(array){return shuffleSelf(copyArray(array))}function assignMergeValue(object,key,value){if(value!==undefined$1&&!eq(object[key],value)||value===undefined$1&&!(key in object)){baseAssignValue(object,key,value)}}function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty.call(object,key)&&eq(objValue,value))||value===undefined$1&&!(key in object)){baseAssignValue(object,key,value)}}function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}function baseAggregator(collection,setter,iteratee,accumulator){baseEach(collection,function(value,key,collection){setter(accumulator,value,iteratee(value),collection)});return accumulator}function baseAssign(object,source){return object&&copyObject(source,keys(source),object)}function baseAssignIn(object,source){return object&&copyObject(source,keysIn(source),object)}function baseAssignValue(object,key,value){if(key=="__proto__"&&defineProperty){defineProperty(object,key,{configurable:true,enumerable:true,value:value,writable:true})}else{object[key]=value}}function baseAt(object,paths){var index=-1,length=paths.length,result=Array(length),skip=object==null;while(++index<length){result[index]=skip?undefined$1:get(object,paths[index])}return result}function baseClamp(number,lower,upper){if(number===number){if(upper!==undefined$1){number=number<=upper?number:upper}if(lower!==undefined$1){number=number>=lower?number:lower}}return number}function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG,isFlat=bitmask&CLONE_FLAT_FLAG,isFull=bitmask&CLONE_SYMBOLS_FLAG;if(customizer){result=object?customizer(value,key,object,stack):customizer(value)}if(result!==undefined$1){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result)}}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep)}if(tag==objectTag||tag==argsTag||isFunc&&!object){result=isFlat||isFunc?{}:initCloneObject(value);if(!isDeep){return isFlat?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value))}}else{if(!cloneableTags[tag]){return object?value:{}}result=initCloneByTag(value,tag,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked){return stacked}stack.set(value,result);if(isSet(value)){value.forEach(function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack))})}else if(isMap(value)){value.forEach(function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack))})}var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys;var props=isArr?undefined$1:keysFunc(value);arrayEach(props||value,function(subValue,key){if(props){key=subValue;subValue=value[key]}assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack))});return result}function baseConforms(source){var props=keys(source);return function(object){return baseConformsTo(object,source,props)}}function baseConformsTo(object,source,props){var length=props.length;if(object==null){return!length}object=Object(object);while(length--){var key=props[length],predicate=source[key],value=object[key];if(value===undefined$1&&!(key in object)||!predicate(value)){return false}}return true}function baseDelay(func,wait,args){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return setTimeout(function(){func.apply(undefined$1,args)},wait)}function baseDifference(array,values,iteratee,comparator){var index=-1,includes=arrayIncludes,isCommon=true,length=array.length,result=[],valuesLength=values.length;if(!length){return result}if(iteratee){values=arrayMap(values,baseUnary(iteratee))}if(comparator){includes=arrayIncludesWith;isCommon=false}else if(values.length>=LARGE_ARRAY_SIZE){includes=cacheHas;isCommon=false;values=new SetCache(values)}outer:while(++index<length){var value=array[index],computed=iteratee==null?value:iteratee(value);value=comparator||value!==0?value:0;if(isCommon&&computed===computed){var valuesIndex=valuesLength;while(valuesIndex--){if(values[valuesIndex]===computed){continue outer}}result.push(value)}else if(!includes(values,computed,comparator)){result.push(value)}}return result}var baseEach=createBaseEach(baseForOwn);var baseEachRight=createBaseEach(baseForOwnRight,true);function baseEvery(collection,predicate){var result=true;baseEach(collection,function(value,index,collection){result=!!predicate(value,index,collection);return result});return result}function baseExtremum(array,iteratee,comparator){var index=-1,length=array.length;while(++index<length){var value=array[index],current=iteratee(value);if(current!=null&&(computed===undefined$1?current===current&&!isSymbol(current):comparator(current,computed))){var computed=current,result=value}}return result}function baseFill(array,value,start,end){var length=array.length;start=toInteger(start);if(start<0){start=-start>length?0:length+start}end=end===undefined$1||end>length?length:toInteger(end);if(end<0){end+=length}end=start>end?0:toLength(end);while(start<end){array[start++]=value}return array}function baseFilter(collection,predicate){var result=[];baseEach(collection,function(value,index,collection){if(predicate(value,index,collection)){result.push(value)}});return result}function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;predicate||(predicate=isFlattenable);result||(result=[]);while(++index<length){var value=array[index];if(depth>0&&predicate(value)){if(depth>1){baseFlatten(value,depth-1,predicate,isStrict,result)}else{arrayPush(result,value)}}else if(!isStrict){result[result.length]=value}}return result}var baseFor=createBaseFor();var baseForRight=createBaseFor(true);function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function baseForOwnRight(object,iteratee){return object&&baseForRight(object,iteratee,keys)}function baseFunctions(object,props){return arrayFilter(props,function(key){return isFunction(object[key])})}function baseGet(object,path){path=castPath(path,object);var index=0,length=path.length;while(object!=null&&index<length){object=object[toKey(path[index++])]}return index&&index==length?object:undefined$1}function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}function baseGetTag(value){if(value==null){return value===undefined$1?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}function baseGt(value,other){return value>other}function baseHas(object,key){return object!=null&&hasOwnProperty.call(object,key)}function baseHasIn(object,key){return object!=null&&key in Object(object)}function baseInRange(number,start,end){return number>=nativeMin(start,end)&&number<nativeMax(start,end)}function baseIntersection(arrays,iteratee,comparator){var includes=comparator?arrayIncludesWith:arrayIncludes,length=arrays[0].length,othLength=arrays.length,othIndex=othLength,caches=Array(othLength),maxLength=Infinity,result=[];while(othIndex--){var array=arrays[othIndex];if(othIndex&&iteratee){array=arrayMap(array,baseUnary(iteratee))}maxLength=nativeMin(array.length,maxLength);caches[othIndex]=!comparator&&(iteratee||length>=120&&array.length>=120)?new SetCache(othIndex&&array):undefined$1}array=arrays[0];var index=-1,seen=caches[0];outer:while(++index<length&&result.length<maxLength){var value=array[index],computed=iteratee?iteratee(value):value;value=comparator||value!==0?value:0;if(!(seen?cacheHas(seen,computed):includes(result,computed,comparator))){othIndex=othLength;while(--othIndex){var cache=caches[othIndex];if(!(cache?cacheHas(cache,computed):includes(arrays[othIndex],computed,comparator))){continue outer}}if(seen){seen.push(computed)}result.push(value)}}return result}function baseInverter(object,setter,iteratee,accumulator){baseForOwn(object,function(value,key,object){setter(accumulator,iteratee(value),key,object)});return accumulator}function baseInvoke(object,path,args){path=castPath(path,object);object=parent(object,path);var func=object==null?object:object[toKey(last(path))];return func==null?undefined$1:apply(func,object,args)}function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag}function baseIsArrayBuffer(value){return isObjectLike(value)&&baseGetTag(value)==arrayBufferTag}function baseIsDate(value){return isObjectLike(value)&&baseGetTag(value)==dateTag}function baseIsEqual(value,other,bitmask,customizer,stack){if(value===other){return true}if(value==null||other==null||!isObjectLike(value)&&!isObjectLike(other)){return value!==value&&other!==other}return baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack)}function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other);objTag=objTag==argsTag?objectTag:objTag;othTag=othTag==argsTag?objectTag:othTag;var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other)){return false}objIsArr=true;objIsObj=false}if(isSameTag&&!objIsObj){stack||(stack=new Stack);return objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack)}if(!(bitmask&COMPARE_PARTIAL_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;stack||(stack=new Stack);return equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}if(!isSameTag){return false}stack||(stack=new Stack);return equalObjects(object,other,bitmask,customizer,equalFunc,stack)}function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(object==null){return!length}object=Object(object);while(index--){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined$1&&!(key in object)){return false}}else{var stack=new Stack;if(customizer){var result=customizer(objValue,srcValue,key,object,source,stack)}if(!(result===undefined$1?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG,customizer,stack):result)){return false}}}return true}function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseIsRegExp(value){return isObjectLike(value)&&baseGetTag(value)==regexpTag}function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag}function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}function baseIteratee(value){if(typeof value=="function"){return value}if(value==null){return identity}if(typeof value=="object"){return isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value)}return property(value)}function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object)}var result=[];for(var key in Object(object)){if(hasOwnProperty.call(object,key)&&key!="constructor"){result.push(key)}}return result}function baseKeysIn(object){if(!isObject(object)){return nativeKeysIn(object)}var isProto=isPrototype(object),result=[];for(var key in object){if(!(key=="constructor"&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key)}}return result}function baseLt(value,other){return value<other}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)});return result}function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){return matchesStrictComparable(matchData[0][0],matchData[0][1])}return function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){if(isKey(path)&&isStrictComparable(srcValue)){return matchesStrictComparable(toKey(path),srcValue)}return function(object){var objValue=get(object,path);return objValue===undefined$1&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseMerge(object,source,srcIndex,customizer,stack){if(object===source){return}baseFor(source,function(srcValue,key){stack||(stack=new Stack);if(isObject(srcValue)){baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack)}else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+"",object,source,stack):undefined$1;if(newValue===undefined$1){newValue=srcValue}assignMergeValue(object,key,newValue)}},keysIn)}function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked){assignMergeValue(object,key,stacked);return}var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):undefined$1;var isCommon=newValue===undefined$1;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue;if(isArr||isBuff||isTyped){if(isArray(objValue)){newValue=objValue}else if(isArrayLikeObject(objValue)){newValue=copyArray(objValue)}else if(isBuff){isCommon=false;newValue=cloneBuffer(srcValue,true)}else if(isTyped){isCommon=false;newValue=cloneTypedArray(srcValue,true)}else{newValue=[]}}else if(isPlainObject(srcValue)||isArguments(srcValue)){newValue=objValue;if(isArguments(objValue)){newValue=toPlainObject(objValue)}else if(!isObject(objValue)||isFunction(objValue)){newValue=initCloneObject(srcValue)}}else{isCommon=false}}if(isCommon){stack.set(srcValue,newValue);mergeFunc(newValue,srcValue,srcIndex,customizer,stack);stack["delete"](srcValue)}assignMergeValue(object,key,newValue)}function baseNth(array,n){var length=array.length;if(!length){return}n+=n<0?length:0;return isIndex(n,length)?array[n]:undefined$1}function baseOrderBy(collection,iteratees,orders){if(iteratees.length){iteratees=arrayMap(iteratees,function(iteratee){if(isArray(iteratee)){return function(value){return baseGet(value,iteratee.length===1?iteratee[0]:iteratee)}}return iteratee})}else{iteratees=[identity]}var index=-1;iteratees=arrayMap(iteratees,baseUnary(getIteratee()));var result=baseMap(collection,function(value,key,collection){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value)});return{criteria:criteria,index:++index,value:value}});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders)})}function basePick(object,paths){return basePickBy(object,paths,function(value,path){return hasIn(object,path)})}function basePickBy(object,paths,predicate){var index=-1,length=paths.length,result={};while(++index<length){var path=paths[index],value=baseGet(object,path);if(predicate(value,path)){baseSet(result,castPath(path,object),value)}}return result}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function basePullAll(array,values,iteratee,comparator){var indexOf=comparator?baseIndexOfWith:baseIndexOf,index=-1,length=values.length,seen=array;if(array===values){values=copyArray(values)}if(iteratee){seen=arrayMap(array,baseUnary(iteratee))}while(++index<length){var fromIndex=0,value=values[index],computed=iteratee?iteratee(value):value;while((fromIndex=indexOf(seen,computed,fromIndex,comparator))>-1){if(seen!==array){splice.call(seen,fromIndex,1)}splice.call(array,fromIndex,1)}}return array}function basePullAt(array,indexes){var length=array?indexes.length:0,lastIndex=length-1;while(length--){var index=indexes[length];if(length==lastIndex||index!==previous){var previous=index;if(isIndex(index)){splice.call(array,index,1)}else{baseUnset(array,index)}}}return array}function baseRandom(lower,upper){return lower+nativeFloor(nativeRandom()*(upper-lower+1))}function baseRange(start,end,step,fromRight){var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);while(length--){result[fromRight?length:++index]=start;start+=step}return result}function baseRepeat(string,n){var result="";if(!string||n<1||n>MAX_SAFE_INTEGER){return result}do{if(n%2){result+=string}n=nativeFloor(n/2);if(n){string+=string}}while(n);return result}function baseRest(func,start){return setToString(overRest(func,start,identity),func+"")}function baseSample(collection){return arraySample(values(collection))}function baseSampleSize(collection,n){var array=values(collection);return shuffleSelf(array,baseClamp(n,0,array.length))}function baseSet(object,path,value,customizer){if(!isObject(object)){return object}path=castPath(path,object);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++index<length){var key=toKey(path[index]),newValue=value;if(key==="__proto__"||key==="constructor"||key==="prototype"){return object}if(index!=lastIndex){var objValue=nested[key];newValue=customizer?customizer(objValue,key,nested):undefined$1;if(newValue===undefined$1){newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{}}}assignValue(nested,key,newValue);nested=nested[key]}return object}var baseSetData=!metaMap?identity:function(func,data){metaMap.set(func,data);return func};var baseSetToString=!defineProperty?identity:function(func,string){return defineProperty(func,"toString",{configurable:true,enumerable:false,value:constant(string),writable:true})};function baseShuffle(collection){return shuffleSelf(values(collection))}function baseSlice(array,start,end){var index=-1,length=array.length;if(start<0){start=-start>length?0:length+start}end=end>length?length:end;if(end<0){end+=length}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start]}return result}function baseSome(collection,predicate){var result;baseEach(collection,function(value,index,collection){result=predicate(value,index,collection);return!result});return!!result}function baseSortedIndex(array,value,retHighest){var low=0,high=array==null?low:array.length;if(typeof value=="number"&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){while(low<high){var mid=low+high>>>1,computed=array[mid];if(computed!==null&&!isSymbol(computed)&&(retHighest?computed<=value:computed<value)){low=mid+1}else{high=mid}}return high}return baseSortedIndexBy(array,value,identity,retHighest)}function baseSortedIndexBy(array,value,iteratee,retHighest){var low=0,high=array==null?0:array.length;if(high===0){return 0}value=iteratee(value);var valIsNaN=value!==value,valIsNull=value===null,valIsSymbol=isSymbol(value),valIsUndefined=value===undefined$1;while(low<high){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),othIsDefined=computed!==undefined$1,othIsNull=computed===null,othIsReflexive=computed===computed,othIsSymbol=isSymbol(computed);if(valIsNaN){var setLow=retHighest||othIsReflexive}else if(valIsUndefined){setLow=othIsReflexive&&(retHighest||othIsDefined)}else if(valIsNull){setLow=othIsReflexive&&othIsDefined&&(retHighest||!othIsNull)}else if(valIsSymbol){setLow=othIsReflexive&&othIsDefined&&!othIsNull&&(retHighest||!othIsSymbol)}else if(othIsNull||othIsSymbol){setLow=false}else{setLow=retHighest?computed<=value:computed<value}if(setLow){low=mid+1}else{high=mid}}return nativeMin(high,MAX_ARRAY_INDEX)}function baseSortedUniq(array,iteratee){var index=-1,length=array.length,resIndex=0,result=[];while(++index<length){var value=array[index],computed=iteratee?iteratee(value):value;if(!index||!eq(computed,seen)){var seen=computed;result[resIndex++]=value===0?0:value}}return result}function baseToNumber(value){if(typeof value=="number"){return value}if(isSymbol(value)){return NAN}return+value}function baseToString(value){if(typeof value=="string"){return value}if(isArray(value)){return arrayMap(value,baseToString)+""}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=true,result=[],seen=result;if(comparator){isCommon=false;includes=arrayIncludesWith}else if(length>=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set){return setToArray(set)}isCommon=false;includes=cacheHas;seen=new SetCache}else{seen=iteratee?[]:result}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value):value;value=comparator||value!==0?value:0;if(isCommon&&computed===computed){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer}}if(iteratee){seen.push(computed)}result.push(value)}else if(!includes(seen,computed,comparator)){if(seen!==result){seen.push(computed)}result.push(value)}}return result}function baseUnset(object,path){path=castPath(path,object);object=parent(object,path);return object==null||delete object[toKey(last(path))]}function baseUpdate(object,path,updater,customizer){return baseSet(object,path,updater(baseGet(object,path)),customizer)}function baseWhile(array,predicate,isDrop,fromRight){var length=array.length,index=fromRight?length:-1;while((fromRight?index--:++index<length)&&predicate(array[index],index,array)){}return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;if(result instanceof LazyWrapper){result=result.value()}return arrayReduce(actions,function(result,action){return action.func.apply(action.thisArg,arrayPush([result],action.args))},result)}function baseXor(arrays,iteratee,comparator){var length=arrays.length;if(length<2){return length?baseUniq(arrays[0]):[]}var index=-1,result=Array(length);while(++index<length){var array=arrays[index],othIndex=-1;while(++othIndex<length){if(othIndex!=index){result[index]=baseDifference(result[index]||array,arrays[othIndex],iteratee,comparator)}}}return baseUniq(baseFlatten(result,1),iteratee,comparator)}function baseZipObject(props,values,assignFunc){var index=-1,length=props.length,valsLength=values.length,result={};while(++index<length){var value=index<valsLength?values[index]:undefined$1;assignFunc(result,props[index],value)}return result}function castArrayLikeObject(value){return isArrayLikeObject(value)?value:[]}function castFunction(value){return typeof value=="function"?value:identity}function castPath(value,object){if(isArray(value)){return value}return isKey(value,object)?[value]:stringToPath(toString(value))}var castRest=baseRest;function castSlice(array,start,end){var length=array.length;end=end===undefined$1?length:end;return!start&&end>=length?array:baseSlice(array,start,end)}var clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id)};function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice()}var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);buffer.copy(result);return result}function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result}function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result}function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined$1,valIsNull=value===null,valIsReflexive=value===value,valIsSymbol=isSymbol(value);var othIsDefined=other!==undefined$1,othIsNull=other===null,othIsReflexive=other===other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive){return 1}if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value<other||othIsSymbol&&valIsDefined&&valIsReflexive&&!valIsNull&&!valIsSymbol||othIsNull&&valIsDefined&&valIsReflexive||!othIsDefined&&valIsReflexive||!othIsReflexive){return-1}}return 0}function compareMultiple(object,other,orders){var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;while(++index<length){var result=compareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength){return result}var order=orders[index];return result*(order=="desc"?-1:1)}}return object.index-other.index}function composeArgs(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;while(++leftIndex<leftLength){result[leftIndex]=partials[leftIndex]}while(++argsIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[holders[argsIndex]]=args[argsIndex]}}while(rangeLength--){result[leftIndex++]=args[argsIndex++]}return result}function composeArgsRight(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;while(++argsIndex<rangeLength){result[argsIndex]=args[argsIndex]}var offset=argsIndex;while(++rightIndex<rightLength){result[offset+rightIndex]=partials[rightIndex]}while(++holdersIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[offset+holders[holdersIndex]]=args[argsIndex++]}}return result}function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=customizer?customizer(object[key],source[key],key,object,source):undefined$1;if(newValue===undefined$1){newValue=source[key]}if(isNew){baseAssignValue(object,key,newValue)}else{assignValue(object,key,newValue)}}return object}function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object)}function createAggregator(setter,initializer){return function(collection,iteratee){var func=isArray(collection)?arrayAggregator:baseAggregator,accumulator=initializer?initializer():{};return func(collection,setter,getIteratee(iteratee,2),accumulator)}}function createAssigner(assigner){return baseRest(function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:undefined$1,guard=length>2?sources[2]:undefined$1;customizer=assigner.length>3&&typeof customizer=="function"?(length--,customizer):undefined$1;if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined$1:customizer;length=1}object=Object(object);while(++index<length){var source=sources[index];if(source){assigner(object,source,index,customizer)}}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(collection==null){return collection}if(!isArrayLike(collection)){return eachFunc(collection,iteratee)}var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);while(fromRight?index--:++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;while(length--){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}}function createBind(func,bitmask,thisArg){var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);function wrapper(){var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(isBind?thisArg:this,arguments)}return wrapper}function createCaseFirst(methodName){return function(string){string=toString(string);var strSymbols=hasUnicode(string)?stringToArray(string):undefined$1;var chr=strSymbols?strSymbols[0]:string.charAt(0);var trailing=strSymbols?castSlice(strSymbols,1).join(""):string.slice(1);return chr[methodName]()+trailing}}function createCompounder(callback){return function(string){return arrayReduce(words(deburr(string).replace(reApos,"")),callback,"")}}function createCtor(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}function createCurry(func,bitmask,arity){var Ctor=createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length,placeholder=getHolder(wrapper);while(index--){args[index]=arguments[index]}var holders=length<3&&args[0]!==placeholder&&args[length-1]!==placeholder?[]:replaceHolders(args,placeholder);length-=holders.length;if(length<arity){return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,undefined$1,args,holders,undefined$1,undefined$1,arity-length)}var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return apply(fn,this,args)}return wrapper}function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=getIteratee(predicate,3);collection=keys(collection);predicate=function(key){return iteratee(iterable[key],key,iterable)}}var index=findIndexFunc(collection,predicate,fromIndex);return index>-1?iterable[iteratee?collection[index]:index]:undefined$1}}function createFlow(fromRight){return flatRest(function(funcs){var length=funcs.length,index=length,prereq=LodashWrapper.prototype.thru;if(fromRight){funcs.reverse()}while(index--){var func=funcs[index];if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(prereq&&!wrapper&&getFuncName(func)=="wrapper"){var wrapper=new LodashWrapper([],true)}}index=wrapper?index:length;while(++index<length){func=funcs[index];var funcName=getFuncName(func),data=funcName=="wrapper"?getData(func):undefined$1;if(data&&isLaziable(data[0])&&data[1]==(WRAP_ARY_FLAG|WRAP_CURRY_FLAG|WRAP_PARTIAL_FLAG|WRAP_REARG_FLAG)&&!data[4].length&&data[9]==1){wrapper=wrapper[getFuncName(data[0])].apply(wrapper,data[3])}else{wrapper=func.length==1&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func)}}return function(){var args=arguments,value=args[0];if(wrapper&&args.length==1&&isArray(value)){return wrapper.plant(value).value()}var index=0,result=length?funcs[index].apply(this,args):value;while(++index<length){result=funcs[index].call(this,result)}return result}})}function createHybrid(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=bitmask&WRAP_ARY_FLAG,isBind=bitmask&WRAP_BIND_FLAG,isBindKey=bitmask&WRAP_BIND_KEY_FLAG,isCurried=bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG),isFlip=bitmask&WRAP_FLIP_FLAG,Ctor=isBindKey?undefined$1:createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length;while(index--){args[index]=arguments[index]}if(isCurried){var placeholder=getHolder(wrapper),holdersCount=countHolders(args,placeholder)}if(partials){args=composeArgs(args,partials,holders,isCurried)}if(partialsRight){args=composeArgsRight(args,partialsRight,holdersRight,isCurried)}length-=holdersCount;if(isCurried&&length<arity){var newHolders=replaceHolders(args,placeholder);return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,thisArg,args,newHolders,argPos,ary,arity-length)}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;length=args.length;if(argPos){args=reorder(args,argPos)}else if(isFlip&&length>1){args.reverse()}if(isAry&&ary<length){args.length=ary}if(this&&this!==root&&this instanceof wrapper){fn=Ctor||createCtor(fn)}return fn.apply(thisBinding,args)}return wrapper}function createInverter(setter,toIteratee){return function(object,iteratee){return baseInverter(object,setter,toIteratee(iteratee),{})}}function createMathOperation(operator,defaultValue){return function(value,other){var result;if(value===undefined$1&&other===undefined$1){return defaultValue}if(value!==undefined$1){result=value}if(other!==undefined$1){if(result===undefined$1){return other}if(typeof value=="string"||typeof other=="string"){value=baseToString(value);other=baseToString(other)}else{value=baseToNumber(value);other=baseToNumber(other)}result=operator(value,other)}return result}}function createOver(arrayFunc){return flatRest(function(iteratees){iteratees=arrayMap(iteratees,baseUnary(getIteratee()));return baseRest(function(args){var thisArg=this;return arrayFunc(iteratees,function(iteratee){return apply(iteratee,thisArg,args)})})})}function createPadding(length,chars){chars=chars===undefined$1?" ":baseToString(chars);var charsLength=chars.length;if(charsLength<2){return charsLength?baseRepeat(chars,length):chars}var result=baseRepeat(chars,nativeCeil(length/stringSize(chars)));return hasUnicode(chars)?castSlice(stringToArray(result),0,length).join(""):result.slice(0,length)}function createPartial(func,bitmask,thisArg,partials){var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);function wrapper(){var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength),fn=this&&this!==root&&this instanceof wrapper?Ctor:func;while(++leftIndex<leftLength){args[leftIndex]=partials[leftIndex]}while(argsLength--){args[leftIndex++]=arguments[++argsIndex]}return apply(fn,isBind?thisArg:this,args)}return wrapper}function createRange(fromRight){return function(start,end,step){if(step&&typeof step!="number"&&isIterateeCall(start,end,step)){end=step=undefined$1}start=toFinite(start);if(end===undefined$1){end=start;start=0}else{end=toFinite(end)}step=step===undefined$1?start<end?1:-1:toFinite(step);return baseRange(start,end,step,fromRight)}}function createRelationalOperation(operator){return function(value,other){if(!(typeof value=="string"&&typeof other=="string")){value=toNumber(value);other=toNumber(other)}return operator(value,other)}}function createRecurry(func,bitmask,wrapFunc,placeholder,thisArg,partials,holders,argPos,ary,arity){var isCurry=bitmask&WRAP_CURRY_FLAG,newHolders=isCurry?holders:undefined$1,newHoldersRight=isCurry?undefined$1:holders,newPartials=isCurry?partials:undefined$1,newPartialsRight=isCurry?undefined$1:partials;bitmask|=isCurry?WRAP_PARTIAL_FLAG:WRAP_PARTIAL_RIGHT_FLAG;bitmask&=~(isCurry?WRAP_PARTIAL_RIGHT_FLAG:WRAP_PARTIAL_FLAG);if(!(bitmask&WRAP_CURRY_BOUND_FLAG)){bitmask&=~(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG)}var newData=[func,bitmask,thisArg,newPartials,newHolders,newPartialsRight,newHoldersRight,argPos,ary,arity];var result=wrapFunc.apply(undefined$1,newData);if(isLaziable(func)){setData(result,newData)}result.placeholder=placeholder;return setWrapToString(result,func,bitmask)}function createRound(methodName){var func=Math[methodName];return function(number,precision){number=toNumber(number);precision=precision==null?0:nativeMin(toInteger(precision),292);if(precision&&nativeIsFinite(number)){var pair=(toString(number)+"e").split("e"),value=func(pair[0]+"e"+(+pair[1]+precision));pair=(toString(value)+"e").split("e");return+(pair[0]+"e"+(+pair[1]-precision))}return func(number)}}var createSet=!(Set&&1/setToArray(new Set([,-0]))[1]==INFINITY)?noop:function(values){return new Set(values)};function createToPairs(keysFunc){return function(object){var tag=getTag(object);if(tag==mapTag){return mapToArray(object)}if(tag==setTag){return setToPairs(object)}return baseToPairs(object,keysFunc(object))}}function createWrap(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&WRAP_BIND_KEY_FLAG;if(!isBindKey&&typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var length=partials?partials.length:0;if(!length){bitmask&=~(WRAP_PARTIAL_FLAG|WRAP_PARTIAL_RIGHT_FLAG);partials=holders=undefined$1}ary=ary===undefined$1?ary:nativeMax(toInteger(ary),0);arity=arity===undefined$1?arity:toInteger(arity);length-=holders?holders.length:0;if(bitmask&WRAP_PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=undefined$1}var data=isBindKey?undefined$1:getData(func);var newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data){mergeData(newData,data)}func=newData[0];bitmask=newData[1];thisArg=newData[2];partials=newData[3];holders=newData[4];arity=newData[9]=newData[9]===undefined$1?isBindKey?0:func.length:nativeMax(newData[9]-length,0);if(!arity&&bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)){bitmask&=~(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)}if(!bitmask||bitmask==WRAP_BIND_FLAG){var result=createBind(func,bitmask,thisArg)}else if(bitmask==WRAP_CURRY_FLAG||bitmask==WRAP_CURRY_RIGHT_FLAG){result=createCurry(func,bitmask,arity)}else if((bitmask==WRAP_PARTIAL_FLAG||bitmask==(WRAP_BIND_FLAG|WRAP_PARTIAL_FLAG))&&!holders.length){result=createPartial(func,bitmask,thisArg,partials)}else{result=createHybrid.apply(undefined$1,newData)}var setter=data?baseSetData:setData;return setWrapToString(setter(result,newData),func,bitmask)}function customDefaultsAssignIn(objValue,srcValue,key,object){if(objValue===undefined$1||eq(objValue,objectProto[key])&&!hasOwnProperty.call(object,key)){return srcValue}return objValue}function customDefaultsMerge(objValue,srcValue,key,object,source,stack){if(isObject(objValue)&&isObject(srcValue)){stack.set(srcValue,objValue);baseMerge(objValue,srcValue,undefined$1,customDefaultsMerge,stack);stack["delete"](srcValue)}return objValue}function customOmitClone(value){return isPlainObject(value)?undefined$1:value}function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength)){return false}var arrStacked=stack.get(array);var othStacked=stack.get(other);if(arrStacked&&othStacked){return arrStacked==other&&othStacked==array}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache:undefined$1;stack.set(array,other);stack.set(other,array);while(++index<arrLength){var arrValue=array[index],othValue=other[index];if(customizer){var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack)}if(compared!==undefined$1){if(compared){continue}result=false;break}if(seen){if(!arraySome(other,function(othValue,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){return seen.push(othIndex)}})){result=false;break}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){result=false;break}}stack["delete"](array);stack["delete"](other);return result}function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset){return false}object=object.buffer;other=other.buffer;case arrayBufferTag:if(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other))){return false}return true;case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&COMPARE_PARTIAL_FLAG;convert||(convert=setToArray);if(object.size!=other.size&&!isPartial){return false}var stacked=stack.get(object);if(stacked){return stacked==other}bitmask|=COMPARE_UNORDERED_FLAG;stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);stack["delete"](object);return result;case symbolTag:if(symbolValueOf){return symbolValueOf.call(object)==symbolValueOf.call(other)}}return false}function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial){return false}var index=objLength;while(index--){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key))){return false}}var objStacked=stack.get(object);var othStacked=stack.get(other);if(objStacked&&othStacked){return objStacked==other&&othStacked==object}var result=true;stack.set(object,other);stack.set(other,object);var skipCtor=isPartial;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer){var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack)}if(!(compared===undefined$1?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=false;break}skipCtor||(skipCtor=key=="constructor")}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)){result=false}}stack["delete"](object);stack["delete"](other);return result}function flatRest(func){return setToString(overRest(func,undefined$1,flatten),func+"")}function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols)}function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn)}var getData=!metaMap?noop:function(func){return metaMap.get(func)};function getFuncName(func){var result=func.name+"",array=realNames[result],length=hasOwnProperty.call(realNames,result)?array.length:0;while(length--){var data=array[length],otherFunc=data.func;if(otherFunc==null||otherFunc==func){return data.name}}return result}function getHolder(func){var object=hasOwnProperty.call(lodash,"placeholder")?lodash:func;return object.placeholder}function getIteratee(){var result=lodash.iteratee||iteratee;result=result===iteratee?baseIteratee:result;return arguments.length?result(arguments[0],arguments[1]):result}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}function getMatchData(object){var result=keys(object),length=result.length;while(length--){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined$1}function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined$1;var unmasked=true}catch(e){}var result=nativeObjectToString.call(value);if(unmasked){if(isOwn){value[symToStringTag]=tag}else{delete value[symToStringTag]}}return result}var getSymbols=!nativeGetSymbols?stubArray:function(object){if(object==null){return[]}object=Object(object);return arrayFilter(nativeGetSymbols(object),function(symbol){return propertyIsEnumerable.call(object,symbol)})};var getSymbolsIn=!nativeGetSymbols?stubArray:function(object){var result=[];while(object){arrayPush(result,getSymbols(object));object=getPrototype(object)}return result};var getTag=baseGetTag;if(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag){getTag=function(value){var result=baseGetTag(value),Ctor=result==objectTag?value.constructor:undefined$1,ctorString=Ctor?toSource(Ctor):"";if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}}return result}}function getView(start,end,transforms){var index=-1,length=transforms.length;while(++index<length){var data=transforms[index],size=data.size;switch(data.type){case"drop":start+=size;break;case"dropRight":end-=size;break;case"take":end=nativeMin(end,start+size);break;case"takeRight":start=nativeMax(start,end-size);break}}return{start:start,end:end}}function getWrapDetails(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[]}function hasPath(object,path,hasFunc){path=castPath(path,object);var index=-1,length=path.length,result=false;while(++index<length){var key=toKey(path[index]);if(!(result=object!=null&&hasFunc(object,key))){break}object=object[key]}if(result||++index!=length){return result}length=object==null?0:object.length;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function initCloneArray(array){var length=array.length,result=new array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty.call(array,"index")){result.index=array.index;result.input=array.input}return result}function initCloneObject(object){return typeof object.constructor=="function"&&!isPrototype(object)?baseCreate(getPrototype(object)):{}}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return new Ctor;case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return new Ctor;case symbolTag:return cloneSymbol(object)}}function insertWrapDetails(source,details){var length=details.length;if(!length){return source}var lastIndex=length-1;details[lastIndex]=(length>1?"& ":"")+details[lastIndex];details=details.join(length>2?", ":" ");return source.replace(reWrapComment,"{\n/* [wrapped with "+details+"] */\n")}function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol])}function isIndex(value,length){var type=typeof value;length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(type=="number"||type!="symbol"&&reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"?isArrayLike(object)&&isIndex(index,object.length):type=="string"&&index in object){return eq(object[index],value)}return false}function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}function isLaziable(func){var funcName=getFuncName(func),other=lodash[funcName];if(typeof other!="function"||!(funcName in LazyWrapper.prototype)){return false}if(func===other){return true}var data=getData(other);return!!data&&func===data[0]}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}var isMaskable=coreJsData?isFunction:stubFalse;function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=="function"&&Ctor.prototype||objectProto;return value===proto}function isStrictComparable(value){return value===value&&!isObject(value)}function matchesStrictComparable(key,srcValue){return function(object){if(object==null){return false}return object[key]===srcValue&&(srcValue!==undefined$1||key in Object(object))}}function memoizeCapped(func){var result=memoize(func,function(key){if(cache.size===MAX_MEMOIZE_SIZE){cache.clear()}return key});var cache=result.cache;return result}function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG|WRAP_ARY_FLAG);var isCombo=srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_CURRY_FLAG||srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(WRAP_ARY_FLAG|WRAP_REARG_FLAG)&&source[7].length<=source[8]&&bitmask==WRAP_CURRY_FLAG;if(!(isCommon||isCombo)){return data}if(srcBitmask&WRAP_BIND_FLAG){data[2]=source[2];newBitmask|=bitmask&WRAP_BIND_FLAG?0:WRAP_CURRY_BOUND_FLAG}var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):value;data[4]=partials?replaceHolders(data[3],PLACEHOLDER):source[4]}value=source[5];if(value){partials=data[5];data[5]=partials?composeArgsRight(partials,value,source[6]):value;data[6]=partials?replaceHolders(data[5],PLACEHOLDER):source[6]}value=source[7];if(value){data[7]=value}if(srcBitmask&WRAP_ARY_FLAG){data[8]=data[8]==null?source[8]:nativeMin(data[8],source[8])}if(data[9]==null){data[9]=source[9]}data[0]=source[0];data[1]=newBitmask;return data}function nativeKeysIn(object){var result=[];if(object!=null){for(var key in Object(object)){result.push(key)}}return result}function objectToString(value){return nativeObjectToString.call(value)}function overRest(func,start,transform){start=nativeMax(start===undefined$1?func.length-1:start,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);while(++index<length){array[index]=args[start+index]}index=-1;var otherArgs=Array(start+1);while(++index<start){otherArgs[index]=args[index]}otherArgs[start]=transform(array);return apply(func,this,otherArgs)}}function parent(object,path){return path.length<2?object:baseGet(object,baseSlice(path,0,-1))}function reorder(array,indexes){var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=copyArray(array);while(length--){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined$1}return array}function safeGet(object,key){if(key==="constructor"&&typeof object[key]==="function"){return}if(key=="__proto__"){return}return object[key]}var setData=shortOut(baseSetData);var setTimeout=ctxSetTimeout||function(func,wait){return root.setTimeout(func,wait)};var setToString=shortOut(baseSetToString);function setWrapToString(wrapper,reference,bitmask){var source=reference+"";return setToString(wrapper,insertWrapDetails(source,updateWrapDetails(getWrapDetails(source),bitmask)))}function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return arguments[0]}}else{count=0}return func.apply(undefined$1,arguments)}}function shuffleSelf(array,size){var index=-1,length=array.length,lastIndex=length-1;size=size===undefined$1?length:size;while(++index<size){var rand=baseRandom(index,lastIndex),value=array[rand];array[rand]=array[index];array[index]=value}array.length=size;return array}var stringToPath=memoizeCapped(function(string){var result=[];if(string.charCodeAt(0)===46){result.push("")}string.replace(rePropName,function(match,number,quote,subString){result.push(quote?subString.replace(reEscapeChar,"$1"):number||match)});return result});function toKey(value){if(typeof value=="string"||isSymbol(value)){return value}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function updateWrapDetails(details,bitmask){arrayEach(wrapFlags,function(pair){var value="_."+pair[0];if(bitmask&pair[1]&&!arrayIncludes(details,value)){details.push(value)}});return details.sort()}function wrapperClone(wrapper){if(wrapper instanceof LazyWrapper){return wrapper.clone()}var result=new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__);result.__actions__=copyArray(wrapper.__actions__);result.__index__=wrapper.__index__;result.__values__=wrapper.__values__;return result}function chunk(array,size,guard){if(guard?isIterateeCall(array,size,guard):size===undefined$1){size=1}else{size=nativeMax(toInteger(size),0)}var length=array==null?0:array.length;if(!length||size<1){return[]}var index=0,resIndex=0,result=Array(nativeCeil(length/size));while(index<length){result[resIndex++]=baseSlice(array,index,index+=size)}return result}function compact(array){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(value){result[resIndex++]=value}}return result}function concat(){var length=arguments.length;if(!length){return[]}var args=Array(length-1),array=arguments[0],index=length;while(index--){args[index-1]=arguments[index]}return arrayPush(isArray(array)?copyArray(array):[array],baseFlatten(args,1))}var difference=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true)):[]});var differenceBy=baseRest(function(array,values){var iteratee=last(values);if(isArrayLikeObject(iteratee)){iteratee=undefined$1}return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true),getIteratee(iteratee,2)):[]});var differenceWith=baseRest(function(array,values){var comparator=last(values);if(isArrayLikeObject(comparator)){comparator=undefined$1}return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true),undefined$1,comparator):[]});function drop(array,n,guard){var length=array==null?0:array.length;if(!length){return[]}n=guard||n===undefined$1?1:toInteger(n);return baseSlice(array,n<0?0:n,length)}function dropRight(array,n,guard){var length=array==null?0:array.length;if(!length){return[]}n=guard||n===undefined$1?1:toInteger(n);n=length-n;return baseSlice(array,0,n<0?0:n)}function dropRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),true,true):[]}function dropWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),true):[]}function fill(array,value,start,end){var length=array==null?0:array.length;if(!length){return[]}if(start&&typeof start!="number"&&isIterateeCall(array,value,start)){start=0;end=length}return baseFill(array,value,start,end)}function findIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return-1}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0)}return baseFindIndex(array,getIteratee(predicate,3),index)}function findLastIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return-1}var index=length-1;if(fromIndex!==undefined$1){index=toInteger(fromIndex);index=fromIndex<0?nativeMax(length+index,0):nativeMin(index,length-1)}return baseFindIndex(array,getIteratee(predicate,3),index,true)}function flatten(array){var length=array==null?0:array.length;return length?baseFlatten(array,1):[]}function flattenDeep(array){var length=array==null?0:array.length;return length?baseFlatten(array,INFINITY):[]}function flattenDepth(array,depth){var length=array==null?0:array.length;if(!length){return[]}depth=depth===undefined$1?1:toInteger(depth);return baseFlatten(array,depth)}function fromPairs(pairs){var index=-1,length=pairs==null?0:pairs.length,result={};while(++index<length){var pair=pairs[index];result[pair[0]]=pair[1]}return result}function head(array){return array&&array.length?array[0]:undefined$1}function indexOf(array,value,fromIndex){var length=array==null?0:array.length;if(!length){return-1}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0)}return baseIndexOf(array,value,index)}function initial(array){var length=array==null?0:array.length;return length?baseSlice(array,0,-1):[]}var intersection=baseRest(function(arrays){var mapped=arrayMap(arrays,castArrayLikeObject);return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped):[]});var intersectionBy=baseRest(function(arrays){var iteratee=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);if(iteratee===last(mapped)){iteratee=undefined$1}else{mapped.pop()}return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,getIteratee(iteratee,2)):[]});var intersectionWith=baseRest(function(arrays){var comparator=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);comparator=typeof comparator=="function"?comparator:undefined$1;if(comparator){mapped.pop()}return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,undefined$1,comparator):[]});function join(array,separator){return array==null?"":nativeJoin.call(array,separator)}function last(array){var length=array==null?0:array.length;return length?array[length-1]:undefined$1}function lastIndexOf(array,value,fromIndex){var length=array==null?0:array.length;if(!length){return-1}var index=length;if(fromIndex!==undefined$1){index=toInteger(fromIndex);index=index<0?nativeMax(length+index,0):nativeMin(index,length-1)}return value===value?strictLastIndexOf(array,value,index):baseFindIndex(array,baseIsNaN,index,true)}function nth(array,n){return array&&array.length?baseNth(array,toInteger(n)):undefined$1}var pull=baseRest(pullAll);function pullAll(array,values){return array&&array.length&&values&&values.length?basePullAll(array,values):array}function pullAllBy(array,values,iteratee){return array&&array.length&&values&&values.length?basePullAll(array,values,getIteratee(iteratee,2)):array}function pullAllWith(array,values,comparator){return array&&array.length&&values&&values.length?basePullAll(array,values,undefined$1,comparator):array}var pullAt=flatRest(function(array,indexes){var length=array==null?0:array.length,result=baseAt(array,indexes);basePullAt(array,arrayMap(indexes,function(index){return isIndex(index,length)?+index:index}).sort(compareAscending));return result});function remove(array,predicate){var result=[];if(!(array&&array.length)){return result}var index=-1,indexes=[],length=array.length;predicate=getIteratee(predicate,3);while(++index<length){var value=array[index];if(predicate(value,index,array)){result.push(value);indexes.push(index)}}basePullAt(array,indexes);return result}function reverse(array){return array==null?array:nativeReverse.call(array)}function slice(array,start,end){var length=array==null?0:array.length;if(!length){return[]}if(end&&typeof end!="number"&&isIterateeCall(array,start,end)){start=0;end=length}else{start=start==null?0:toInteger(start);end=end===undefined$1?length:toInteger(end)}return baseSlice(array,start,end)}function sortedIndex(array,value){return baseSortedIndex(array,value)}function sortedIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2))}function sortedIndexOf(array,value){var length=array==null?0:array.length;if(length){var index=baseSortedIndex(array,value);if(index<length&&eq(array[index],value)){return index}}return-1}function sortedLastIndex(array,value){return baseSortedIndex(array,value,true)}function sortedLastIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2),true)}function sortedLastIndexOf(array,value){var length=array==null?0:array.length;if(length){var index=baseSortedIndex(array,value,true)-1;if(eq(array[index],value)){return index}}return-1}function sortedUniq(array){return array&&array.length?baseSortedUniq(array):[]}function sortedUniqBy(array,iteratee){return array&&array.length?baseSortedUniq(array,getIteratee(iteratee,2)):[]}function tail(array){var length=array==null?0:array.length;return length?baseSlice(array,1,length):[]}function take(array,n,guard){if(!(array&&array.length)){return[]}n=guard||n===undefined$1?1:toInteger(n);return baseSlice(array,0,n<0?0:n)}function takeRight(array,n,guard){var length=array==null?0:array.length;if(!length){return[]}n=guard||n===undefined$1?1:toInteger(n);n=length-n;return baseSlice(array,n<0?0:n,length)}function takeRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),false,true):[]}function takeWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3)):[]}var union=baseRest(function(arrays){return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true))});var unionBy=baseRest(function(arrays){var iteratee=last(arrays);if(isArrayLikeObject(iteratee)){iteratee=undefined$1}return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true),getIteratee(iteratee,2))});var unionWith=baseRest(function(arrays){var comparator=last(arrays);comparator=typeof comparator=="function"?comparator:undefined$1;return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true),undefined$1,comparator)});function uniq(array){return array&&array.length?baseUniq(array):[]}function uniqBy(array,iteratee){return array&&array.length?baseUniq(array,getIteratee(iteratee,2)):[]}function uniqWith(array,comparator){comparator=typeof comparator=="function"?comparator:undefined$1;return array&&array.length?baseUniq(array,undefined$1,comparator):[]}function unzip(array){if(!(array&&array.length)){return[]}var length=0;array=arrayFilter(array,function(group){if(isArrayLikeObject(group)){length=nativeMax(group.length,length);return true}});return baseTimes(length,function(index){return arrayMap(array,baseProperty(index))})}function unzipWith(array,iteratee){if(!(array&&array.length)){return[]}var result=unzip(array);if(iteratee==null){return result}return arrayMap(result,function(group){return apply(iteratee,undefined$1,group)})}var without=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,values):[]});var xor=baseRest(function(arrays){return baseXor(arrayFilter(arrays,isArrayLikeObject))});var xorBy=baseRest(function(arrays){var iteratee=last(arrays);if(isArrayLikeObject(iteratee)){iteratee=undefined$1}return baseXor(arrayFilter(arrays,isArrayLikeObject),getIteratee(iteratee,2))});var xorWith=baseRest(function(arrays){var comparator=last(arrays);comparator=typeof comparator=="function"?comparator:undefined$1;return baseXor(arrayFilter(arrays,isArrayLikeObject),undefined$1,comparator)});var zip=baseRest(unzip);function zipObject(props,values){return baseZipObject(props||[],values||[],assignValue)}function zipObjectDeep(props,values){return baseZipObject(props||[],values||[],baseSet)}var zipWith=baseRest(function(arrays){var length=arrays.length,iteratee=length>1?arrays[length-1]:undefined$1;iteratee=typeof iteratee=="function"?(arrays.pop(),iteratee):undefined$1;return unzipWith(arrays,iteratee)});function chain(value){var result=lodash(value);result.__chain__=true;return result}function tap(value,interceptor){interceptor(value);return value}function thru(value,interceptor){return interceptor(value)}var wrapperAt=flatRest(function(paths){var length=paths.length,start=length?paths[0]:0,value=this.__wrapped__,interceptor=function(object){return baseAt(object,paths)};if(length>1||this.__actions__.length||!(value instanceof LazyWrapper)||!isIndex(start)){return this.thru(interceptor)}value=value.slice(start,+start+(length?1:0));value.__actions__.push({func:thru,args:[interceptor],thisArg:undefined$1});return new LodashWrapper(value,this.__chain__).thru(function(array){if(length&&!array.length){array.push(undefined$1)}return array})});function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperNext(){if(this.__values__===undefined$1){this.__values__=toArray(this.value())}var done=this.__index__>=this.__values__.length,value=done?undefined$1:this.__values__[this.__index__++];return{done:done,value:value}}function wrapperToIterator(){return this}function wrapperPlant(value){var result,parent=this;while(parent instanceof baseLodash){var clone=wrapperClone(parent);clone.__index__=0;clone.__values__=undefined$1;if(result){previous.__wrapped__=clone}else{result=clone}var previous=clone;parent=parent.__wrapped__}previous.__wrapped__=value;return result}function wrapperReverse(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;if(this.__actions__.length){wrapped=new LazyWrapper(this)}wrapped=wrapped.reverse();wrapped.__actions__.push({func:thru,args:[reverse],thisArg:undefined$1});return new LodashWrapper(wrapped,this.__chain__)}return this.thru(reverse)}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}var countBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){++result[key]}else{baseAssignValue(result,key,1)}});function every(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;if(guard&&isIterateeCall(collection,predicate,guard)){predicate=undefined$1}return func(collection,getIteratee(predicate,3))}function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,getIteratee(predicate,3))}var find=createFind(findIndex);var findLast=createFind(findLastIndex);function flatMap(collection,iteratee){return baseFlatten(map(collection,iteratee),1)}function flatMapDeep(collection,iteratee){return baseFlatten(map(collection,iteratee),INFINITY)}function flatMapDepth(collection,iteratee,depth){depth=depth===undefined$1?1:toInteger(depth);return baseFlatten(map(collection,iteratee),depth)}function forEach(collection,iteratee){var func=isArray(collection)?arrayEach:baseEach;return func(collection,getIteratee(iteratee,3))}function forEachRight(collection,iteratee){var func=isArray(collection)?arrayEachRight:baseEachRight;return func(collection,getIteratee(iteratee,3))}var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{baseAssignValue(result,key,[value])}});function includes(collection,value,fromIndex,guard){collection=isArrayLike(collection)?collection:values(collection);fromIndex=fromIndex&&!guard?toInteger(fromIndex):0;var length=collection.length;if(fromIndex<0){fromIndex=nativeMax(length+fromIndex,0)}return isString(collection)?fromIndex<=length&&collection.indexOf(value,fromIndex)>-1:!!length&&baseIndexOf(collection,value,fromIndex)>-1}var invokeMap=baseRest(function(collection,path,args){var index=-1,isFunc=typeof path=="function",result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value){result[++index]=isFunc?apply(path,value,args):baseInvoke(value,path,args)});return result});var keyBy=createAggregator(function(result,value,key){baseAssignValue(result,key,value)});function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,getIteratee(iteratee,3))}function orderBy(collection,iteratees,orders,guard){if(collection==null){return[]}if(!isArray(iteratees)){iteratees=iteratees==null?[]:[iteratees]}orders=guard?undefined$1:orders;if(!isArray(orders)){orders=orders==null?[]:[orders]}return baseOrderBy(collection,iteratees,orders)}var partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]});function reduce(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEach)}function reduceRight(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduceRight:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEachRight)}function reject(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,negate(getIteratee(predicate,3)))}function sample(collection){var func=isArray(collection)?arraySample:baseSample;return func(collection)}function sampleSize(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):n===undefined$1){n=1}else{n=toInteger(n)}var func=isArray(collection)?arraySampleSize:baseSampleSize;return func(collection,n)}function shuffle(collection){var func=isArray(collection)?arrayShuffle:baseShuffle;return func(collection)}function size(collection){if(collection==null){return 0}if(isArrayLike(collection)){return isString(collection)?stringSize(collection):collection.length}var tag=getTag(collection);if(tag==mapTag||tag==setTag){return collection.size}return baseKeys(collection).length}function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;if(guard&&isIterateeCall(collection,predicate,guard)){predicate=undefined$1}return func(collection,getIteratee(predicate,3))}var sortBy=baseRest(function(collection,iteratees){if(collection==null){return[]}var length=iteratees.length;if(length>1&&isIterateeCall(collection,iteratees[0],iteratees[1])){iteratees=[]}else if(length>2&&isIterateeCall(iteratees[0],iteratees[1],iteratees[2])){iteratees=[iteratees[0]]}return baseOrderBy(collection,baseFlatten(iteratees,1),[])});var now=ctxNow||function(){return root.Date.now()};function after(n,func){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}n=toInteger(n);return function(){if(--n<1){return func.apply(this,arguments)}}}function ary(func,n,guard){n=guard?undefined$1:n;n=func&&n==null?func.length:n;return createWrap(func,WRAP_ARY_FLAG,undefined$1,undefined$1,undefined$1,undefined$1,n)}function before(n,func){var result;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}n=toInteger(n);return function(){if(--n>0){result=func.apply(this,arguments)}if(n<=1){func=undefined$1}return result}}var bind=baseRest(function(func,thisArg,partials){var bitmask=WRAP_BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bind));bitmask|=WRAP_PARTIAL_FLAG}return createWrap(func,bitmask,thisArg,partials,holders)});var bindKey=baseRest(function(object,key,partials){var bitmask=WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bindKey));bitmask|=WRAP_PARTIAL_FLAG}return createWrap(key,bitmask,object,partials,holders)});function curry(func,arity,guard){arity=guard?undefined$1:arity;var result=createWrap(func,WRAP_CURRY_FLAG,undefined$1,undefined$1,undefined$1,undefined$1,undefined$1,arity);result.placeholder=curry.placeholder;return result}function curryRight(func,arity,guard){arity=guard?undefined$1:arity;var result=createWrap(func,WRAP_CURRY_RIGHT_FLAG,undefined$1,undefined$1,undefined$1,undefined$1,undefined$1,arity);result.placeholder=curryRight.placeholder;return result}function debounce(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=false,maxing=false,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}wait=toNumber(wait)||0;if(isObject(options)){leading=!!options.leading;maxing="maxWait"in options;maxWait=maxing?nativeMax(toNumber(options.maxWait)||0,wait):maxWait;trailing="trailing"in options?!!options.trailing:trailing}function invokeFunc(time){var args=lastArgs,thisArg=lastThis;lastArgs=lastThis=undefined$1;lastInvokeTime=time;result=func.apply(thisArg,args);return result}function leadingEdge(time){lastInvokeTime=time;timerId=setTimeout(timerExpired,wait);return leading?invokeFunc(time):result}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?nativeMin(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;return lastCallTime===undefined$1||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait}function timerExpired(){var time=now();if(shouldInvoke(time)){return trailingEdge(time)}timerId=setTimeout(timerExpired,remainingWait(time))}function trailingEdge(time){timerId=undefined$1;if(trailing&&lastArgs){return invokeFunc(time)}lastArgs=lastThis=undefined$1;return result}function cancel(){if(timerId!==undefined$1){clearTimeout(timerId)}lastInvokeTime=0;lastArgs=lastCallTime=lastThis=timerId=undefined$1}function flush(){return timerId===undefined$1?result:trailingEdge(now())}function debounced(){var time=now(),isInvoking=shouldInvoke(time);lastArgs=arguments;lastThis=this;lastCallTime=time;if(isInvoking){if(timerId===undefined$1){return leadingEdge(lastCallTime)}if(maxing){clearTimeout(timerId);timerId=setTimeout(timerExpired,wait);return invokeFunc(lastCallTime)}}if(timerId===undefined$1){timerId=setTimeout(timerExpired,wait)}return result}debounced.cancel=cancel;debounced.flush=flush;return debounced}var defer=baseRest(function(func,args){return baseDelay(func,1,args)});var delay=baseRest(function(func,wait,args){return baseDelay(func,toNumber(wait)||0,args)});function flip(func){return createWrap(func,WRAP_FLIP_FLAG)}function memoize(func,resolver){if(typeof func!="function"||resolver!=null&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result)||cache;return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}memoize.Cache=MapCache;function negate(predicate){if(typeof predicate!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2])}return!predicate.apply(this,args)}}function once(func){return before(2,func)}var overArgs=castRest(function(func,transforms){transforms=transforms.length==1&&isArray(transforms[0])?arrayMap(transforms[0],baseUnary(getIteratee())):arrayMap(baseFlatten(transforms,1),baseUnary(getIteratee()));var funcsLength=transforms.length;return baseRest(function(args){var index=-1,length=nativeMin(args.length,funcsLength);while(++index<length){args[index]=transforms[index].call(this,args[index])}return apply(func,this,args)})});var partial=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partial));return createWrap(func,WRAP_PARTIAL_FLAG,undefined$1,partials,holders)});var partialRight=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partialRight));return createWrap(func,WRAP_PARTIAL_RIGHT_FLAG,undefined$1,partials,holders)});var rearg=flatRest(function(func,indexes){return createWrap(func,WRAP_REARG_FLAG,undefined$1,undefined$1,undefined$1,indexes)});function rest(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=start===undefined$1?start:toInteger(start);return baseRest(func,start)}function spread(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=start==null?0:nativeMax(toInteger(start),0);return baseRest(function(args){var array=args[start],otherArgs=castSlice(args,0,start);if(array){arrayPush(otherArgs,array)}return apply(func,this,otherArgs)})}function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(isObject(options)){leading="leading"in options?!!options.leading:leading;trailing="trailing"in options?!!options.trailing:trailing}return debounce(func,wait,{leading:leading,maxWait:wait,trailing:trailing})}function unary(func){return ary(func,1)}function wrap(value,wrapper){return partial(castFunction(wrapper),value)}function castArray(){if(!arguments.length){return[]}var value=arguments[0];return isArray(value)?value:[value]}function clone(value){return baseClone(value,CLONE_SYMBOLS_FLAG)}function cloneWith(value,customizer){customizer=typeof customizer=="function"?customizer:undefined$1;return baseClone(value,CLONE_SYMBOLS_FLAG,customizer)}function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}function cloneDeepWith(value,customizer){customizer=typeof customizer=="function"?customizer:undefined$1;return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG,customizer)}function conformsTo(object,source){return source==null||baseConformsTo(object,source,keys(source))}function eq(value,other){return value===other||value!==value&&other!==other}var gt=createRelationalOperation(baseGt);var gte=createRelationalOperation(function(value,other){return value>=other});var isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")};var isArray=Array.isArray;var isArrayBuffer=nodeIsArrayBuffer?baseUnary(nodeIsArrayBuffer):baseIsArrayBuffer;function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isBoolean(value){return value===true||value===false||isObjectLike(value)&&baseGetTag(value)==boolTag}var isBuffer=nativeIsBuffer||stubFalse;var isDate=nodeIsDate?baseUnary(nodeIsDate):baseIsDate;function isElement(value){return isObjectLike(value)&&value.nodeType===1&&!isPlainObject(value)}function isEmpty(value){if(value==null){return true}if(isArrayLike(value)&&(isArray(value)||typeof value=="string"||typeof value.splice=="function"||isBuffer(value)||isTypedArray(value)||isArguments(value))){return!value.length}var tag=getTag(value);if(tag==mapTag||tag==setTag){return!value.size}if(isPrototype(value)){return!baseKeys(value).length}for(var key in value){if(hasOwnProperty.call(value,key)){return false}}return true}function isEqual(value,other){return baseIsEqual(value,other)}function isEqualWith(value,other,customizer){customizer=typeof customizer=="function"?customizer:undefined$1;var result=customizer?customizer(value,other):undefined$1;return result===undefined$1?baseIsEqual(value,other,undefined$1,customizer):!!result}function isError(value){if(!isObjectLike(value)){return false}var tag=baseGetTag(value);return tag==errorTag||tag==domExcTag||typeof value.message=="string"&&typeof value.name=="string"&&!isPlainObject(value)}function isFinite(value){return typeof value=="number"&&nativeIsFinite(value)}function isFunction(value){if(!isObject(value)){return false}var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}function isInteger(value){return typeof value=="number"&&value==toInteger(value)}function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return value!=null&&(type=="object"||type=="function")}function isObjectLike(value){return value!=null&&typeof value=="object"}var isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;function isMatch(object,source){return object===source||baseIsMatch(object,source,getMatchData(source))}function isMatchWith(object,source,customizer){customizer=typeof customizer=="function"?customizer:undefined$1;return baseIsMatch(object,source,getMatchData(source),customizer)}function isNaN(value){return isNumber(value)&&value!=+value}function isNative(value){if(isMaskable(value)){throw new Error(CORE_ERROR_TEXT)}return baseIsNative(value)}function isNull(value){return value===null}function isNil(value){return value==null}function isNumber(value){return typeof value=="number"||isObjectLike(value)&&baseGetTag(value)==numberTag}function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag){return false}var proto=getPrototype(value);if(proto===null){return true}var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return typeof Ctor=="function"&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}var isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):baseIsRegExp;function isSafeInteger(value){return isInteger(value)&&value>=-MAX_SAFE_INTEGER&&value<=MAX_SAFE_INTEGER}var isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;function isString(value){return typeof value=="string"||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag}function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&baseGetTag(value)==symbolTag}var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;function isUndefined(value){return value===undefined$1}function isWeakMap(value){return isObjectLike(value)&&getTag(value)==weakMapTag}function isWeakSet(value){return isObjectLike(value)&&baseGetTag(value)==weakSetTag}var lt=createRelationalOperation(baseLt);var lte=createRelationalOperation(function(value,other){return value<=other});function toArray(value){if(!value){return[]}if(isArrayLike(value)){return isString(value)?stringToArray(value):copyArray(value)}if(symIterator&&value[symIterator]){return iteratorToArray(value[symIterator]())}var tag=getTag(value),func=tag==mapTag?mapToArray:tag==setTag?setToArray:values;return func(value)}function toFinite(value){if(!value){return value===0?value:0}value=toNumber(value);if(value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER}return value===value?value:0}function toInteger(value){var result=toFinite(value),remainder=result%1;return result===result?remainder?result-remainder:result:0}function toLength(value){return value?baseClamp(toInteger(value),0,MAX_ARRAY_LENGTH):0}function toNumber(value){if(typeof value=="number"){return value}if(isSymbol(value)){return NAN}if(isObject(value)){var other=typeof value.valueOf=="function"?value.valueOf():value;value=isObject(other)?other+"":other}if(typeof value!="string"){return value===0?value:+value}value=baseTrim(value);var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}function toPlainObject(value){return copyObject(value,keysIn(value))}function toSafeInteger(value){return value?baseClamp(toInteger(value),-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER):value===0?value:0}function toString(value){return value==null?"":baseToString(value)}var assign=createAssigner(function(object,source){if(isPrototype(source)||isArrayLike(source)){copyObject(source,keys(source),object);return}for(var key in source){if(hasOwnProperty.call(source,key)){assignValue(object,key,source[key])}}});var assignIn=createAssigner(function(object,source){copyObject(source,keysIn(source),object)});var assignInWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keysIn(source),object,customizer)});var assignWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keys(source),object,customizer)});var at=flatRest(baseAt);function create(prototype,properties){var result=baseCreate(prototype);return properties==null?result:baseAssign(result,properties)}var defaults=baseRest(function(object,sources){object=Object(object);var index=-1;var length=sources.length;var guard=length>2?sources[2]:undefined$1;if(guard&&isIterateeCall(sources[0],sources[1],guard)){length=1}while(++index<length){var source=sources[index];var props=keysIn(source);var propsIndex=-1;var propsLength=props.length;while(++propsIndex<propsLength){var key=props[propsIndex];var value=object[key];if(value===undefined$1||eq(value,objectProto[key])&&!hasOwnProperty.call(object,key)){object[key]=source[key]}}}return object});var defaultsDeep=baseRest(function(args){args.push(undefined$1,customDefaultsMerge);return apply(mergeWith,undefined$1,args)});function findKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwn)}function findLastKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwnRight)}function forIn(object,iteratee){return object==null?object:baseFor(object,getIteratee(iteratee,3),keysIn)}function forInRight(object,iteratee){return object==null?object:baseForRight(object,getIteratee(iteratee,3),keysIn)}function forOwn(object,iteratee){return object&&baseForOwn(object,getIteratee(iteratee,3))}function forOwnRight(object,iteratee){return object&&baseForOwnRight(object,getIteratee(iteratee,3))}function functions(object){return object==null?[]:baseFunctions(object,keys(object))}function functionsIn(object){return object==null?[]:baseFunctions(object,keysIn(object))}function get(object,path,defaultValue){var result=object==null?undefined$1:baseGet(object,path);return result===undefined$1?defaultValue:result}function has(object,path){return object!=null&&hasPath(object,path,baseHas)}function hasIn(object,path){return object!=null&&hasPath(object,path,baseHasIn)}var invert=createInverter(function(result,value,key){if(value!=null&&typeof value.toString!="function"){value=nativeObjectToString.call(value)}result[value]=key},constant(identity));var invertBy=createInverter(function(result,value,key){if(value!=null&&typeof value.toString!="function"){value=nativeObjectToString.call(value)}if(hasOwnProperty.call(result,value)){result[value].push(key)}else{result[value]=[key]}},getIteratee);var invoke=baseRest(baseInvoke);function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,true):baseKeysIn(object)}function mapKeys(object,iteratee){var result={};iteratee=getIteratee(iteratee,3);baseForOwn(object,function(value,key,object){baseAssignValue(result,iteratee(value,key,object),value)});return result}function mapValues(object,iteratee){var result={};iteratee=getIteratee(iteratee,3);baseForOwn(object,function(value,key,object){baseAssignValue(result,key,iteratee(value,key,object))});return result}var merge=createAssigner(function(object,source,srcIndex){baseMerge(object,source,srcIndex)});var mergeWith=createAssigner(function(object,source,srcIndex,customizer){baseMerge(object,source,srcIndex,customizer)});var omit=flatRest(function(object,paths){var result={};if(object==null){return result}var isDeep=false;paths=arrayMap(paths,function(path){path=castPath(path,object);isDeep||(isDeep=path.length>1);return path});copyObject(object,getAllKeysIn(object),result);if(isDeep){result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone)}var length=paths.length;while(length--){baseUnset(result,paths[length])}return result});function omitBy(object,predicate){return pickBy(object,negate(getIteratee(predicate)))}var pick=flatRest(function(object,paths){return object==null?{}:basePick(object,paths)});function pickBy(object,predicate){if(object==null){return{}}var props=arrayMap(getAllKeysIn(object),function(prop){return[prop]});predicate=getIteratee(predicate);return basePickBy(object,props,function(value,path){return predicate(value,path[0])})}function result(object,path,defaultValue){path=castPath(path,object);var index=-1,length=path.length;if(!length){length=1;object=undefined$1}while(++index<length){var value=object==null?undefined$1:object[toKey(path[index])];if(value===undefined$1){index=length;value=defaultValue}object=isFunction(value)?value.call(object):value}return object}function set(object,path,value){return object==null?object:baseSet(object,path,value)}function setWith(object,path,value,customizer){customizer=typeof customizer=="function"?customizer:undefined$1;return object==null?object:baseSet(object,path,value,customizer)}var toPairs=createToPairs(keys);var toPairsIn=createToPairs(keysIn);function transform(object,iteratee,accumulator){var isArr=isArray(object),isArrLike=isArr||isBuffer(object)||isTypedArray(object);iteratee=getIteratee(iteratee,4);if(accumulator==null){var Ctor=object&&object.constructor;if(isArrLike){accumulator=isArr?new Ctor:[]}else if(isObject(object)){accumulator=isFunction(Ctor)?baseCreate(getPrototype(object)):{}}else{accumulator={}}}(isArrLike?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object)});return accumulator}function unset(object,path){return object==null?true:baseUnset(object,path)}function update(object,path,updater){return object==null?object:baseUpdate(object,path,castFunction(updater))}function updateWith(object,path,updater,customizer){customizer=typeof customizer=="function"?customizer:undefined$1;return object==null?object:baseUpdate(object,path,castFunction(updater),customizer)}function values(object){return object==null?[]:baseValues(object,keys(object))}function valuesIn(object){return object==null?[]:baseValues(object,keysIn(object))}function clamp(number,lower,upper){if(upper===undefined$1){upper=lower;lower=undefined$1}if(upper!==undefined$1){upper=toNumber(upper);upper=upper===upper?upper:0}if(lower!==undefined$1){lower=toNumber(lower);lower=lower===lower?lower:0}return baseClamp(toNumber(number),lower,upper)}function inRange(number,start,end){start=toFinite(start);if(end===undefined$1){end=start;start=0}else{end=toFinite(end)}number=toNumber(number);return baseInRange(number,start,end)}function random(lower,upper,floating){if(floating&&typeof floating!="boolean"&&isIterateeCall(lower,upper,floating)){upper=floating=undefined$1}if(floating===undefined$1){if(typeof upper=="boolean"){floating=upper;upper=undefined$1}else if(typeof lower=="boolean"){floating=lower;lower=undefined$1}}if(lower===undefined$1&&upper===undefined$1){lower=0;upper=1}else{lower=toFinite(lower);if(upper===undefined$1){upper=lower;lower=0}else{upper=toFinite(upper)}}if(lower>upper){var temp=lower;lower=upper;upper=temp}if(floating||lower%1||upper%1){var rand=nativeRandom();return nativeMin(lower+rand*(upper-lower+freeParseFloat("1e-"+((rand+"").length-1))),upper)}return baseRandom(lower,upper)}var camelCase=createCompounder(function(result,word,index){word=word.toLowerCase();return result+(index?capitalize(word):word)});function capitalize(string){return upperFirst(toString(string).toLowerCase())}function deburr(string){string=toString(string);return string&&string.replace(reLatin,deburrLetter).replace(reComboMark,"")}function endsWith(string,target,position){string=toString(string);target=baseToString(target);var length=string.length;position=position===undefined$1?length:baseClamp(toInteger(position),0,length);var end=position;position-=target.length;return position>=0&&string.slice(position,end)==target}function escape(string){string=toString(string);return string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string}function escapeRegExp(string){string=toString(string);return string&&reHasRegExpChar.test(string)?string.replace(reRegExpChar,"\\$&"):string}var kebabCase=createCompounder(function(result,word,index){return result+(index?"-":"")+word.toLowerCase()});var lowerCase=createCompounder(function(result,word,index){return result+(index?" ":"")+word.toLowerCase()});var lowerFirst=createCaseFirst("toLowerCase");function pad(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;if(!length||strLength>=length){return string}var mid=(length-strLength)/2;return createPadding(nativeFloor(mid),chars)+string+createPadding(nativeCeil(mid),chars)}function padEnd(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?string+createPadding(length-strLength,chars):string}function padStart(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?createPadding(length-strLength,chars)+string:string}function parseInt(string,radix,guard){if(guard||radix==null){radix=0}else if(radix){radix=+radix}return nativeParseInt(toString(string).replace(reTrimStart,""),radix||0)}function repeat(string,n,guard){if(guard?isIterateeCall(string,n,guard):n===undefined$1){n=1}else{n=toInteger(n)}return baseRepeat(toString(string),n)}function replace(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2])}var snakeCase=createCompounder(function(result,word,index){return result+(index?"_":"")+word.toLowerCase()});function split(string,separator,limit){if(limit&&typeof limit!="number"&&isIterateeCall(string,separator,limit)){separator=limit=undefined$1}limit=limit===undefined$1?MAX_ARRAY_LENGTH:limit>>>0;if(!limit){return[]}string=toString(string);if(string&&(typeof separator=="string"||separator!=null&&!isRegExp(separator))){separator=baseToString(separator);if(!separator&&hasUnicode(string)){return castSlice(stringToArray(string),0,limit)}}return string.split(separator,limit)}var startCase=createCompounder(function(result,word,index){return result+(index?" ":"")+upperFirst(word)});function startsWith(string,target,position){string=toString(string);position=position==null?0:baseClamp(toInteger(position),0,string.length);target=baseToString(target);return string.slice(position,position+target.length)==target}function template(string,options,guard){var settings=lodash.templateSettings;if(guard&&isIterateeCall(string,options,guard)){options=undefined$1}string=toString(string);options=assignInWith({},options,settings,customDefaultsAssignIn);var imports=assignInWith({},options.imports,settings.imports,customDefaultsAssignIn),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys);var isEscaping,isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");var sourceURL="//# sourceURL="+(hasOwnProperty.call(options,"sourceURL")?(options.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){isEscaping=true;source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=hasOwnProperty.call(options,"variable")&&options.variable;if(!variable){source="with (obj) {\n"+source+"\n}\n"}else if(reForbiddenIdentifierChars.test(variable)){throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT)}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt(function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined$1,importsValues)});result.source=source;if(isError(result)){throw result}return result}function toLower(value){return toString(value).toLowerCase()}function toUpper(value){return toString(value).toUpperCase()}function trim(string,chars,guard){string=toString(string);if(string&&(guard||chars===undefined$1)){return baseTrim(string)}if(!string||!(chars=baseToString(chars))){return string}var strSymbols=stringToArray(string),chrSymbols=stringToArray(chars),start=charsStartIndex(strSymbols,chrSymbols),end=charsEndIndex(strSymbols,chrSymbols)+1;return castSlice(strSymbols,start,end).join("")}function trimEnd(string,chars,guard){string=toString(string);if(string&&(guard||chars===undefined$1)){return string.slice(0,trimmedEndIndex(string)+1)}if(!string||!(chars=baseToString(chars))){return string}var strSymbols=stringToArray(string),end=charsEndIndex(strSymbols,stringToArray(chars))+1;return castSlice(strSymbols,0,end).join("")}function trimStart(string,chars,guard){string=toString(string);if(string&&(guard||chars===undefined$1)){return string.replace(reTrimStart,"")}if(!string||!(chars=baseToString(chars))){return string}var strSymbols=stringToArray(string),start=charsStartIndex(strSymbols,stringToArray(chars));return castSlice(strSymbols,start).join("")}function truncate(string,options){var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?toInteger(options.length):length;omission="omission"in options?baseToString(options.omission):omission}string=toString(string);var strLength=string.length;if(hasUnicode(string)){var strSymbols=stringToArray(string);strLength=strSymbols.length}if(length>=strLength){return string}var end=length-stringSize(omission);if(end<1){return omission}var result=strSymbols?castSlice(strSymbols,0,end).join(""):string.slice(0,end);if(separator===undefined$1){return result+omission}if(strSymbols){end+=result.length-end}if(isRegExp(separator)){if(string.slice(end).search(separator)){var match,substring=result;if(!separator.global){separator=RegExp(separator.source,toString(reFlags.exec(separator))+"g")}separator.lastIndex=0;while(match=separator.exec(substring)){var newEnd=match.index}result=result.slice(0,newEnd===undefined$1?end:newEnd)}}else if(string.indexOf(baseToString(separator),end)!=end){var index=result.lastIndexOf(separator);if(index>-1){result=result.slice(0,index)}}return result+omission}function unescape(string){string=toString(string);return string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string}var upperCase=createCompounder(function(result,word,index){return result+(index?" ":"")+word.toUpperCase()});var upperFirst=createCaseFirst("toUpperCase");function words(string,pattern,guard){string=toString(string);pattern=guard?undefined$1:pattern;if(pattern===undefined$1){return hasUnicodeWord(string)?unicodeWords(string):asciiWords(string)}return string.match(pattern)||[]}var attempt=baseRest(function(func,args){try{return apply(func,undefined$1,args)}catch(e){return isError(e)?e:new Error(e)}});var bindAll=flatRest(function(object,methodNames){arrayEach(methodNames,function(key){key=toKey(key);baseAssignValue(object,key,bind(object[key],object))});return object});function cond(pairs){var length=pairs==null?0:pairs.length,toIteratee=getIteratee();pairs=!length?[]:arrayMap(pairs,function(pair){if(typeof pair[1]!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return[toIteratee(pair[0]),pair[1]]});return baseRest(function(args){var index=-1;while(++index<length){var pair=pairs[index];if(apply(pair[0],this,args)){return apply(pair[1],this,args)}}})}function conforms(source){return baseConforms(baseClone(source,CLONE_DEEP_FLAG))}function constant(value){return function(){return value}}function defaultTo(value,defaultValue){return value==null||value!==value?defaultValue:value}var flow=createFlow();var flowRight=createFlow(true);function identity(value){return value}function iteratee(func){return baseIteratee(typeof func=="function"?func:baseClone(func,CLONE_DEEP_FLAG))}function matches(source){return baseMatches(baseClone(source,CLONE_DEEP_FLAG))}function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,CLONE_DEEP_FLAG))}var method=baseRest(function(path,args){return function(object){return baseInvoke(object,path,args)}});var methodOf=baseRest(function(object,args){return function(path){return baseInvoke(object,path,args)}});function mixin(object,source,options){var props=keys(source),methodNames=baseFunctions(source,props);if(options==null&&!(isObject(source)&&(methodNames.length||!props.length))){options=source;source=object;object=this;methodNames=baseFunctions(source,keys(source))}var chain=!(isObject(options)&&"chain"in options)||!!options.chain,isFunc=isFunction(object);arrayEach(methodNames,function(methodName){var func=source[methodName];object[methodName]=func;if(isFunc){object.prototype[methodName]=function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__),actions=result.__actions__=copyArray(this.__actions__);actions.push({func:func,args:arguments,thisArg:object});result.__chain__=chainAll;return result}return func.apply(object,arrayPush([this.value()],arguments))}}});return object}function noConflict(){if(root._===this){root._=oldDash}return this}function noop(){}function nthArg(n){n=toInteger(n);return baseRest(function(args){return baseNth(args,n)})}var over=createOver(arrayMap);var overEvery=createOver(arrayEvery);var overSome=createOver(arraySome);function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}function propertyOf(object){return function(path){return object==null?undefined$1:baseGet(object,path)}}var range=createRange();var rangeRight=createRange(true);function stubArray(){return[]}function stubFalse(){return false}function stubObject(){return{}}function stubString(){return""}function stubTrue(){return true}function times(n,iteratee){n=toInteger(n);if(n<1||n>MAX_SAFE_INTEGER){return[]}var index=MAX_ARRAY_LENGTH,length=nativeMin(n,MAX_ARRAY_LENGTH);iteratee=getIteratee(iteratee);n-=MAX_ARRAY_LENGTH;var result=baseTimes(length,iteratee);while(++index<n){iteratee(index)}return result}function toPath(value){if(isArray(value)){return arrayMap(value,toKey)}return isSymbol(value)?[value]:copyArray(stringToPath(toString(value)))}function uniqueId(prefix){var id=++idCounter;return toString(prefix)+id}var add=createMathOperation(function(augend,addend){return augend+addend},0);var ceil=createRound("ceil");var divide=createMathOperation(function(dividend,divisor){return dividend/divisor},1);var floor=createRound("floor");function max(array){return array&&array.length?baseExtremum(array,identity,baseGt):undefined$1}function maxBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseGt):undefined$1}function mean(array){return baseMean(array,identity)}function meanBy(array,iteratee){return baseMean(array,getIteratee(iteratee,2))}function min(array){return array&&array.length?baseExtremum(array,identity,baseLt):undefined$1}function minBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseLt):undefined$1}var multiply=createMathOperation(function(multiplier,multiplicand){return multiplier*multiplicand},1);var round=createRound("round");var subtract=createMathOperation(function(minuend,subtrahend){return minuend-subtrahend},0);function sum(array){return array&&array.length?baseSum(array,identity):0}function sumBy(array,iteratee){return array&&array.length?baseSum(array,getIteratee(iteratee,2)):0}lodash.after=after;lodash.ary=ary;lodash.assign=assign;lodash.assignIn=assignIn;lodash.assignInWith=assignInWith;lodash.assignWith=assignWith;lodash.at=at;lodash.before=before;lodash.bind=bind;lodash.bindAll=bindAll;lodash.bindKey=bindKey;lodash.castArray=castArray;lodash.chain=chain;lodash.chunk=chunk;lodash.compact=compact;lodash.concat=concat;lodash.cond=cond;lodash.conforms=conforms;lodash.constant=constant;lodash.countBy=countBy;lodash.create=create;lodash.curry=curry;lodash.curryRight=curryRight;lodash.debounce=debounce;lodash.defaults=defaults;lodash.defaultsDeep=defaultsDeep;lodash.defer=defer;lodash.delay=delay;lodash.difference=difference;lodash.differenceBy=differenceBy;lodash.differenceWith=differenceWith;lodash.drop=drop;lodash.dropRight=dropRight;lodash.dropRightWhile=dropRightWhile;lodash.dropWhile=dropWhile;lodash.fill=fill;lodash.filter=filter;lodash.flatMap=flatMap;lodash.flatMapDeep=flatMapDeep;lodash.flatMapDepth=flatMapDepth;lodash.flatten=flatten;lodash.flattenDeep=flattenDeep;lodash.flattenDepth=flattenDepth;lodash.flip=flip;lodash.flow=flow;lodash.flowRight=flowRight;lodash.fromPairs=fromPairs;lodash.functions=functions;lodash.functionsIn=functionsIn;lodash.groupBy=groupBy;lodash.initial=initial;lodash.intersection=intersection;lodash.intersectionBy=intersectionBy;lodash.intersectionWith=intersectionWith;lodash.invert=invert;lodash.invertBy=invertBy;lodash.invokeMap=invokeMap;lodash.iteratee=iteratee;lodash.keyBy=keyBy;lodash.keys=keys;lodash.keysIn=keysIn;lodash.map=map;lodash.mapKeys=mapKeys;lodash.mapValues=mapValues;lodash.matches=matches;lodash.matchesProperty=matchesProperty;lodash.memoize=memoize;lodash.merge=merge;lodash.mergeWith=mergeWith;lodash.method=method;lodash.methodOf=methodOf;lodash.mixin=mixin;lodash.negate=negate;lodash.nthArg=nthArg;lodash.omit=omit;lodash.omitBy=omitBy;lodash.once=once;lodash.orderBy=orderBy;lodash.over=over;lodash.overArgs=overArgs;lodash.overEvery=overEvery;lodash.overSome=overSome;lodash.partial=partial;lodash.partialRight=partialRight;lodash.partition=partition;lodash.pick=pick;lodash.pickBy=pickBy;lodash.property=property;lodash.propertyOf=propertyOf;lodash.pull=pull;lodash.pullAll=pullAll;lodash.pullAllBy=pullAllBy;lodash.pullAllWith=pullAllWith;lodash.pullAt=pullAt;lodash.range=range;lodash.rangeRight=rangeRight;lodash.rearg=rearg;lodash.reject=reject;lodash.remove=remove;lodash.rest=rest;lodash.reverse=reverse;lodash.sampleSize=sampleSize;lodash.set=set;lodash.setWith=setWith;lodash.shuffle=shuffle;lodash.slice=slice;lodash.sortBy=sortBy;lodash.sortedUniq=sortedUniq;lodash.sortedUniqBy=sortedUniqBy;lodash.split=split;lodash.spread=spread;lodash.tail=tail;lodash.take=take;lodash.takeRight=takeRight;lodash.takeRightWhile=takeRightWhile;lodash.takeWhile=takeWhile;lodash.tap=tap;lodash.throttle=throttle;lodash.thru=thru;lodash.toArray=toArray;lodash.toPairs=toPairs;lodash.toPairsIn=toPairsIn;lodash.toPath=toPath;lodash.toPlainObject=toPlainObject;lodash.transform=transform;lodash.unary=unary;lodash.union=union;lodash.unionBy=unionBy;lodash.unionWith=unionWith;lodash.uniq=uniq;lodash.uniqBy=uniqBy;lodash.uniqWith=uniqWith;lodash.unset=unset;lodash.unzip=unzip;lodash.unzipWith=unzipWith;lodash.update=update;lodash.updateWith=updateWith;lodash.values=values;lodash.valuesIn=valuesIn;lodash.without=without;lodash.words=words;lodash.wrap=wrap;lodash.xor=xor;lodash.xorBy=xorBy;lodash.xorWith=xorWith;lodash.zip=zip;lodash.zipObject=zipObject;lodash.zipObjectDeep=zipObjectDeep;lodash.zipWith=zipWith;lodash.entries=toPairs;lodash.entriesIn=toPairsIn;lodash.extend=assignIn;lodash.extendWith=assignInWith;mixin(lodash,lodash);lodash.add=add;lodash.attempt=attempt;lodash.camelCase=camelCase;lodash.capitalize=capitalize;lodash.ceil=ceil;lodash.clamp=clamp;lodash.clone=clone;lodash.cloneDeep=cloneDeep;lodash.cloneDeepWith=cloneDeepWith;lodash.cloneWith=cloneWith;lodash.conformsTo=conformsTo;lodash.deburr=deburr;lodash.defaultTo=defaultTo;lodash.divide=divide;lodash.endsWith=endsWith;lodash.eq=eq;lodash.escape=escape;lodash.escapeRegExp=escapeRegExp;lodash.every=every;lodash.find=find;lodash.findIndex=findIndex;lodash.findKey=findKey;lodash.findLast=findLast;lodash.findLastIndex=findLastIndex;lodash.findLastKey=findLastKey;lodash.floor=floor;lodash.forEach=forEach;lodash.forEachRight=forEachRight;lodash.forIn=forIn;lodash.forInRight=forInRight;lodash.forOwn=forOwn;lodash.forOwnRight=forOwnRight;lodash.get=get;lodash.gt=gt;lodash.gte=gte;lodash.has=has;lodash.hasIn=hasIn;lodash.head=head;lodash.identity=identity;lodash.includes=includes;lodash.indexOf=indexOf;lodash.inRange=inRange;lodash.invoke=invoke;lodash.isArguments=isArguments;lodash.isArray=isArray;lodash.isArrayBuffer=isArrayBuffer;lodash.isArrayLike=isArrayLike;lodash.isArrayLikeObject=isArrayLikeObject;lodash.isBoolean=isBoolean;lodash.isBuffer=isBuffer;lodash.isDate=isDate;lodash.isElement=isElement;lodash.isEmpty=isEmpty;lodash.isEqual=isEqual;lodash.isEqualWith=isEqualWith;lodash.isError=isError;lodash.isFinite=isFinite;lodash.isFunction=isFunction;lodash.isInteger=isInteger;lodash.isLength=isLength;lodash.isMap=isMap;lodash.isMatch=isMatch;lodash.isMatchWith=isMatchWith;lodash.isNaN=isNaN;lodash.isNative=isNative;lodash.isNil=isNil;lodash.isNull=isNull;lodash.isNumber=isNumber;lodash.isObject=isObject;lodash.isObjectLike=isObjectLike;lodash.isPlainObject=isPlainObject;lodash.isRegExp=isRegExp;lodash.isSafeInteger=isSafeInteger;lodash.isSet=isSet;lodash.isString=isString;lodash.isSymbol=isSymbol;lodash.isTypedArray=isTypedArray;lodash.isUndefined=isUndefined;lodash.isWeakMap=isWeakMap;lodash.isWeakSet=isWeakSet;lodash.join=join;lodash.kebabCase=kebabCase;lodash.last=last;lodash.lastIndexOf=lastIndexOf;lodash.lowerCase=lowerCase;lodash.lowerFirst=lowerFirst;lodash.lt=lt;lodash.lte=lte;lodash.max=max;lodash.maxBy=maxBy;lodash.mean=mean;lodash.meanBy=meanBy;lodash.min=min;lodash.minBy=minBy;lodash.stubArray=stubArray;lodash.stubFalse=stubFalse;lodash.stubObject=stubObject;lodash.stubString=stubString;lodash.stubTrue=stubTrue;lodash.multiply=multiply;lodash.nth=nth;lodash.noConflict=noConflict;lodash.noop=noop;lodash.now=now;lodash.pad=pad;lodash.padEnd=padEnd;lodash.padStart=padStart;lodash.parseInt=parseInt;lodash.random=random;lodash.reduce=reduce;lodash.reduceRight=reduceRight;lodash.repeat=repeat;lodash.replace=replace;lodash.result=result;lodash.round=round;lodash.runInContext=runInContext;lodash.sample=sample;lodash.size=size;lodash.snakeCase=snakeCase;lodash.some=some;lodash.sortedIndex=sortedIndex;lodash.sortedIndexBy=sortedIndexBy;lodash.sortedIndexOf=sortedIndexOf;lodash.sortedLastIndex=sortedLastIndex;lodash.sortedLastIndexBy=sortedLastIndexBy;lodash.sortedLastIndexOf=sortedLastIndexOf;lodash.startCase=startCase;lodash.startsWith=startsWith;lodash.subtract=subtract;lodash.sum=sum;lodash.sumBy=sumBy;lodash.template=template;lodash.times=times;lodash.toFinite=toFinite;lodash.toInteger=toInteger;lodash.toLength=toLength;lodash.toLower=toLower;lodash.toNumber=toNumber;lodash.toSafeInteger=toSafeInteger;lodash.toString=toString;lodash.toUpper=toUpper;lodash.trim=trim;lodash.trimEnd=trimEnd;lodash.trimStart=trimStart;lodash.truncate=truncate;lodash.unescape=unescape;lodash.uniqueId=uniqueId;lodash.upperCase=upperCase;lodash.upperFirst=upperFirst;lodash.each=forEach;lodash.eachRight=forEachRight;lodash.first=head;mixin(lodash,function(){var source={};baseForOwn(lodash,function(func,methodName){if(!hasOwnProperty.call(lodash.prototype,methodName)){source[methodName]=func}});return source}(),{chain:false});lodash.VERSION=VERSION;arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],function(methodName){lodash[methodName].placeholder=lodash});arrayEach(["drop","take"],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){n=n===undefined$1?1:nativeMax(toInteger(n),0);var result=this.__filtered__&&!index?new LazyWrapper(this):this.clone();if(result.__filtered__){result.__takeCount__=nativeMin(n,result.__takeCount__)}else{result.__views__.push({size:nativeMin(n,MAX_ARRAY_LENGTH),type:methodName+(result.__dir__<0?"Right":"")})}return result};LazyWrapper.prototype[methodName+"Right"]=function(n){return this.reverse()[methodName](n).reverse()}});arrayEach(["filter","map","takeWhile"],function(methodName,index){var type=index+1,isFilter=type==LAZY_FILTER_FLAG||type==LAZY_WHILE_FLAG;LazyWrapper.prototype[methodName]=function(iteratee){var result=this.clone();result.__iteratees__.push({iteratee:getIteratee(iteratee,3),type:type});result.__filtered__=result.__filtered__||isFilter;return result}});arrayEach(["head","last"],function(methodName,index){var takeName="take"+(index?"Right":"");LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0]}});arrayEach(["initial","tail"],function(methodName,index){var dropName="drop"+(index?"":"Right");LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1)}});LazyWrapper.prototype.compact=function(){return this.filter(identity)};LazyWrapper.prototype.find=function(predicate){return this.filter(predicate).head()};LazyWrapper.prototype.findLast=function(predicate){return this.reverse().find(predicate)};LazyWrapper.prototype.invokeMap=baseRest(function(path,args){if(typeof path=="function"){return new LazyWrapper(this)}return this.map(function(value){return baseInvoke(value,path,args)})});LazyWrapper.prototype.reject=function(predicate){return this.filter(negate(getIteratee(predicate)))};LazyWrapper.prototype.slice=function(start,end){start=toInteger(start);var result=this;if(result.__filtered__&&(start>0||end<0)){return new LazyWrapper(result)}if(start<0){result=result.takeRight(-start)}else if(start){result=result.drop(start)}if(end!==undefined$1){end=toInteger(end);result=end<0?result.dropRight(-end):result.take(end-start)}return result};LazyWrapper.prototype.takeRightWhile=function(predicate){return this.reverse().takeWhile(predicate).reverse()};LazyWrapper.prototype.toArray=function(){return this.take(MAX_ARRAY_LENGTH)};baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|find|map|reject)|While$/.test(methodName),isTaker=/^(?:head|last)$/.test(methodName),lodashFunc=lodash[isTaker?"take"+(methodName=="last"?"Right":""):methodName],retUnwrapped=isTaker||/^find/.test(methodName);if(!lodashFunc){return}lodash.prototype[methodName]=function(){var value=this.__wrapped__,args=isTaker?[1]:arguments,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value);var interceptor=function(value){var result=lodashFunc.apply(lodash,arrayPush([value],args));return isTaker&&chainAll?result[0]:result};if(useLazy&&checkIteratee&&typeof iteratee=="function"&&iteratee.length!=1){isLazy=useLazy=false}var chainAll=this.__chain__,isHybrid=!!this.__actions__.length,isUnwrapped=retUnwrapped&&!chainAll,onlyLazy=isLazy&&!isHybrid;if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);result.__actions__.push({func:thru,args:[interceptor],thisArg:undefined$1});return new LodashWrapper(result,chainAll)}if(isUnwrapped&&onlyLazy){return func.apply(this,args)}result=this.thru(interceptor);return isUnwrapped?isTaker?result.value()[0]:result.value():result}});arrayEach(["pop","push","shift","sort","splice","unshift"],function(methodName){var func=arrayProto[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?"tap":"thru",retUnwrapped=/^(?:pop|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){var value=this.value();return func.apply(isArray(value)?value:[],args)}return this[chainName](function(value){return func.apply(isArray(value)?value:[],args)})}});baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name+"";if(!hasOwnProperty.call(realNames,key)){realNames[key]=[]}realNames[key].push({name:methodName,func:lodashFunc})}});realNames[createHybrid(undefined$1,WRAP_BIND_KEY_FLAG).name]=[{name:"wrapper",func:undefined$1}];LazyWrapper.prototype.clone=lazyClone;LazyWrapper.prototype.reverse=lazyReverse;LazyWrapper.prototype.value=lazyValue;lodash.prototype.at=wrapperAt;lodash.prototype.chain=wrapperChain;lodash.prototype.commit=wrapperCommit;lodash.prototype.next=wrapperNext;lodash.prototype.plant=wrapperPlant;lodash.prototype.reverse=wrapperReverse;lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue;lodash.prototype.first=lodash.prototype.head;if(symIterator){lodash.prototype[symIterator]=wrapperToIterator}return lodash};var _=runInContext();if(freeModule){(freeModule.exports=_)._=_;freeExports._=_}else{root._=_}}).call(commonjsGlobal)})(lodash,lodash.exports);var lodashExports=lodash.exports;var _=getDefaultExportFromCjs(lodashExports);var Status=function(){function Status(jSPlugin,id){_classCallCheck$1(this,Status);this.id=id;this.jSPlugin=jSPlugin;this.state={play:false,loading:false,text:""};this.loadingSetText=this.loadingSetText}_createClass$1(Status,[{key:"toString",value:function toString(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"setPlayStatus",value:function setPlayStatus(options){this.state=Object.assign(this.state,options)}},{key:"loadingStart",value:function loadingStart(id){var oS=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(oS);oS.innerHTML="@keyframes antRotate {to {transform: rotate(400deg);transform-origin:50% 50%;}} .loading {display: inline-block;z-index: 1000;-webkit-animation: antRotate 1s infinite linear;animation: antRotate 1s infinite linear;}";var domId=id;var domElement=document.getElementById(domId);var windowWidth=domElement.offsetWidth;var windowHeight=domElement.offsetHeight;var offsetTop=0;var offsetLeft=domElement.offsetLeft;if(this.jSPlugin.isInspect&&this.jSPlugin.Theme.inspectMode=="map"){offsetLeft=0}if(document.getElementById("".concat(id,"-loading-id-0"))){document.getElementById("".concat(id,"-loading-id-0")).parentNode.removeChild(document.getElementById("".concat(id,"-loading-id-0")))}console.log("loading-id-0---------------");var loadingContainerDOM=document.createElement("div");loadingContainerDOM.setAttribute("id","".concat(id,"-loading-id-0"));var style="position:absolute;outline:none;pointer-events:none;";console.log("this.jSPlugin",this.jSPlugin);style+="width: 100%;background-size: cover; background-repeat:no-repeat;";style+="height: 100%;";style+="top:"+offsetTop+";";style+="left:"+offsetLeft+"px;";loadingContainerDOM.setAttribute("style",style);loadingContainerDOM.style.height=windowHeight;loadingContainerDOM.setAttribute("class","loading-container");domElement.style.position="relative";if(this.jSPlugin.isInspect&&this.jSPlugin.Theme.inspectMode=="map"){domElement.style.position="absolute"}domElement.appendChild(loadingContainerDOM);var splitBasis=1;var loadingItemContainer=document.createElement("div");var loadingStatusDOM=document.createElement("div");loadingItemContainer.setAttribute("class","loading-item");loadingItemContainer.setAttribute("id","".concat(id,"-loading-item-0"));var style="display:inline-flex;pointer-events:none;flex-direction:column;justify-content:center;align-items: center;width:100%;height:"+windowHeight+"px;outline:none;vertical-align: top;position:absolute;";style+="left:"+calLoadingPostion(windowHeight,windowWidth,splitBasis,0).left+"px;";style+="top:"+calLoadingPostion(windowHeight,windowWidth,splitBasis,0).top+"px;";loadingItemContainer.setAttribute("style",style);function calLoadingPostion(windowHeight,windowWidth,splitBasis,i){var top=parseInt(i/splitBasis,10)*(windowHeight/splitBasis);var left=i%splitBasis*(windowWidth/splitBasis);return{top:top,left:left}}var scaleWidth=1;var loadingDOM=document.createElement("div");loadingStatusDOM.innerHTML="";loadingStatusDOM.style.color="#fff";loadingDOM.setAttribute("class","loading");loadingDOM.setAttribute("id","loading-icon");var loading='<svg t="1567069979438" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399" width="24" height="24"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>';if(!this.jSPlugin.isMobile&&!!this.jSPlugin.isCall){scaleWidth=this.jSPlugin.width/1024;loading='<svg t="1567069979438" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399" width="'.concat(40*scaleWidth,'" height="').concat(40*scaleWidth,'"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>')}loadingDOM.innerHTML=loading;loadingItemContainer.appendChild(loadingDOM);loadingItemContainer.appendChild(loadingStatusDOM);loadingContainerDOM.appendChild(loadingItemContainer)}},{key:"loadingStop",value:function loadingStop(id){var loadingItemContainerDOM=document.getElementById("".concat(id,"-loading-item-0"));if(loadingItemContainerDOM){loadingItemContainerDOM.removeChild(document.getElementById("loading-icon"))}}},{key:"loadingSetText",value:function loadingSetText(opt){var _this=this;this.loadingClearText();if(document.getElementById("".concat(this.id,"-loading-item-0"))){var loadingItemContainer=document.getElementById("".concat(this.id,"-loading-item-0"));var textElement=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes[1];if(!textElement){loadingItemContainer.style.height="100%";textElement=document.createElement("div");textElement.innerHTML=opt.text;loadingItemContainer.appendChild(textElement)}textElement.id="".concat(this.id,"-loading-item-txt");textElement.innerHTML=opt.text;textElement.style.fontSize="14px";if(!this.jSPlugin.isMobile&&!!this.jSPlugin.isCall){var scaleWidth=this.jSPlugin.width/1024;textElement.style.fontSize="".concat(28*scaleWidth,"px");textElement.style.marginTop="16px"}if(!!this.jSPlugin.isCall&&opt.type==1){var textElementTmd=document.getElementById("".concat(this.id,"-loading-item-txt"));var textElementIcon=document.createElement("div");textElementIcon.style="margin-bottom: 8px;width:24px;height:24px;";textElementIcon.innerHTML='<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n            <title></title>\n            <g id="gantan" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                <g id="Group">\n                    <polygon id="Path" points="0 0 24.0000001 0 24.0000001 24.0000001 0 24.0000001"></polygon>\n                    <path d="M12,2.25000001 C17.2781739,2.25000001 21.5934661,6.44926243 21.746085,11.7237735 L21.746085,11.7237735 L21.75,12 C21.75,17.2781739 17.5507376,21.5934661 12.2762266,21.746085 L12.2762266,21.746085 L12,21.75 C6.72182614,21.75 2.40653397,17.5507376 2.25391507,12.2762266 L2.25391507,12.2762266 L2.25000001,12 C2.25000001,6.72182617 6.44926245,2.40653397 11.7237735,2.25391507 L11.7237735,2.25391507 Z M12,3.75000001 L11.7563186,3.75352261 C7.3032926,3.88243816 3.74992165,7.53391173 3.74992165,11.9891583 L3.74992165,11.9891583 L3.75352261,12.2436814 C3.88243816,16.6967075 7.5339117,20.2500784 11.9891583,20.2500784 L11.9891583,20.2500784 L12.2436814,20.2464774 C16.6967075,20.1175619 20.2500784,16.4660884 20.2500784,12.0108417 L20.2500784,12.0108417 L20.2464774,11.7563186 C20.1175619,7.30329258 16.4660883,3.75000001 12,3.75000001 L12,3.75000001 Z M11.999,15.2500001 L12.1156933,15.25672 C12.6133664,15.3144204 12.999993,15.7366564 12.999993,16.2500001 C12.999993,16.8022157 12.5522116,17.2500001 11.999993,17.2500001 C11.4477844,17.2500001 10.999993,16.8022116 11.0000197,16.2554347 C10.9962666,15.7375014 11.3873731,15.3105316 11.8897485,15.2559043 L11.999,15.2500001 Z M12,6.75000003 C12.3796958,6.75000003 12.693491,7.03215391 12.7431534,7.39822947 L12.75,7.50000003 L12.75,12.5 C12.75,12.9142136 12.4142136,13.25 12,13.25 C11.6203043,13.25 11.3065091,12.9678461 11.2568467,12.6017706 L11.25,12.5 L11.25,7.50000003 C11.25,7.08578647 11.5857865,6.75000003 12,6.75000003 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                </g>\n            </g>\n        </svg>';loadingItemContainer.insertBefore(textElementIcon,textElementTmd)}textElement.style.color=opt.color||"#FFFFFF";this.state.text=opt.text;if(opt.delayClear){var timer=setTimeout(function(){_this.loadingClearText();clearTimeout(timer)},parseInt(opt.delayClear))}}}},{key:"loadingSetTextWithBtn",value:function loadingSetTextWithBtn(opt){var _this2=this;this.loadingClear();console.log(this.jSPlugin);var themeDataTmd=!!this.jSPlugin.Theme.call&&this.jSPlugin.Theme.call.themeData||null;if(!!themeDataTmd&&(themeDataTmd.customConfig.bellPoster===0||this.jSPlugin.Theme.call.bellStatus==="onCall")||opt.mask){if(document.getElementById("".concat(this.id,"-loading-id-0"))){document.getElementById("".concat(this.id,"-loading-id-0")).style.background=opt.maskStyle||"rgba(0,0,0,0.7)"}}var loadingItemContainer=document.getElementById("".concat(this.id,"-loading-item-0"));if(loadingItemContainer){loadingItemContainer.style.height="100%";loadingItemContainer.style["pointer-events"]="auto";var textElement=document.createElement("div");textElement.id="".concat(this.id,"-loading-item-txt");textElement.innerHTML=opt.text;textElement.title=opt.text;textElement.style.color=opt.color||"#FFFFFF";if(!opt.isMobile){var scaleWidth=this.jSPlugin.width/1024;var txtSize=28*scaleWidth;textElement.style.fontSize=txtSize+"px"}else{var _scaleWidth=this.jSPlugin.width/375;var _txtSize=14*_scaleWidth;textElement.style.fontSize=_txtSize+"px"}if(this.jSPlugin.isInspect){textElement.style="text-align: center; color: white; font-size: 14px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis; width: 70%;"}loadingItemContainer.appendChild(textElement);if(opt.type&&opt.type==2){var iconMargin=8;var iconWidth=24;if(!opt.isMobile){var _scaleWidth2=this.jSPlugin.width/1024;iconMargin=_scaleWidth2<1?16*_scaleWidth2:16;iconWidth=40*_scaleWidth2}else{var _scaleWidth3=this.jSPlugin.width/375;iconWidth=24*_scaleWidth3}var textElementTmd=document.getElementById("".concat(this.id,"-loading-item-txt"));var textElementIcon=document.createElement("div");textElementIcon.style="margin-bottom: ".concat(iconMargin,"px;width:").concat(iconWidth,"px;height:").concat(iconWidth,"px;");textElementIcon.innerHTML='<svg width="'.concat(iconWidth,'px" height="').concat(iconWidth,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n            <title></title>\n            <g id="gantan" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                <g id="Group">\n                    <polygon id="Path" points="0 0 24.0000001 0 24.0000001 24.0000001 0 24.0000001"></polygon>\n                    <path d="M12,2.25000001 C17.2781739,2.25000001 21.5934661,6.44926243 21.746085,11.7237735 L21.746085,11.7237735 L21.75,12 C21.75,17.2781739 17.5507376,21.5934661 12.2762266,21.746085 L12.2762266,21.746085 L12,21.75 C6.72182614,21.75 2.40653397,17.5507376 2.25391507,12.2762266 L2.25391507,12.2762266 L2.25000001,12 C2.25000001,6.72182617 6.44926245,2.40653397 11.7237735,2.25391507 L11.7237735,2.25391507 Z M12,3.75000001 L11.7563186,3.75352261 C7.3032926,3.88243816 3.74992165,7.53391173 3.74992165,11.9891583 L3.74992165,11.9891583 L3.75352261,12.2436814 C3.88243816,16.6967075 7.5339117,20.2500784 11.9891583,20.2500784 L11.9891583,20.2500784 L12.2436814,20.2464774 C16.6967075,20.1175619 20.2500784,16.4660884 20.2500784,12.0108417 L20.2500784,12.0108417 L20.2464774,11.7563186 C20.1175619,7.30329258 16.4660883,3.75000001 12,3.75000001 L12,3.75000001 Z M11.999,15.2500001 L12.1156933,15.25672 C12.6133664,15.3144204 12.999993,15.7366564 12.999993,16.2500001 C12.999993,16.8022157 12.5522116,17.2500001 11.999993,17.2500001 C11.4477844,17.2500001 10.999993,16.8022116 11.0000197,16.2554347 C10.9962666,15.7375014 11.3873731,15.3105316 11.8897485,15.2559043 L11.999,15.2500001 Z M12,6.75000003 C12.3796958,6.75000003 12.693491,7.03215391 12.7431534,7.39822947 L12.75,7.50000003 L12.75,12.5 C12.75,12.9142136 12.4142136,13.25 12,13.25 C11.6203043,13.25 11.3065091,12.9678461 11.2568467,12.6017706 L11.25,12.5 L11.25,7.50000003 C11.25,7.08578647 11.5857865,6.75000003 12,6.75000003 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                </g>\n            </g>\n        </svg>');loadingItemContainer.insertBefore(textElementIcon,textElementTmd)}else{var textElementBtn=document.createElement("div");textElementBtn.id="".concat(this.id,"-loading-item-btn-wrap");textElementBtn.innerHTML='\n          <div id="'.concat(this.id,'-loading-item-btn" style="display: ').concat(this.jSPlugin.isInspect&&this.jSPlugin.Theme.inspectMode=="map"?"none":"block",' ">').concat(opt.btnName,'</div>\n          <svg id="').concat(this.id,'-loading-item-btn-svg" style="display: ').concat(this.jSPlugin.isInspect&&this.jSPlugin.Theme.inspectMode=="map"?"block":"none",' ; margin: 0 auto" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="13" height="13" xmlns:xlink="http://www.w3.org/1999/xlink">\n            <path fill="#fff" d="M960 416V192l-73.056 73.056a447.712 447.712 0 0 0-373.6-201.088C265.92 63.968 65.312 264.544 65.312 512S265.92 960.032 513.344 960.032a448.064 448.064 0 0 0 415.232-279.488 38.368 38.368 0 1 0-71.136-28.896 371.36 371.36 0 0 1-344.096 231.584C308.32 883.232 142.112 717.024 142.112 512S308.32 140.768 513.344 140.768c132.448 0 251.936 70.08 318.016 179.84L736 416h224z"></path>\n          </svg>\n        ');if(opt.isMobile){if(opt.type==1){textElementBtn.style="color:white;width:100px;height:30px;border-radius: 10px;background: rgba(255,255,255,0.25);text-align:center;line-height:30px;margin-top:9px;font-size:14px;-webkit-tap-highlight-color: transparent;"}else{textElementBtn.style="border: 1px solid rgba(204,204,204,1);color:white;width:80px;height:24px;border-radius: 12px;background: rgba(255,255,255,0.1);text-align:center;line-height:24px;margin-top:20px;font-size:12px;-webkit-tap-highlight-color: transparent;"}}else{var _scaleWidth4=this.jSPlugin.width/1024;textElementBtn.style="color:#648FFC;margin-top:16px;cursor: pointer;font-size:".concat(24*_scaleWidth4,"px;");if(this.jSPlugin.isInspect&&this.jSPlugin.Theme.inspectMode=="video"){textElementBtn.style="border: 1px solid rgba(255,255,255,1);color:white; cursor: pointer;text-align: center;width:80px;height:32px;border-radius: text-align:center;line-height:32px;margin-top:16px;font-size:14px;-webkit-tap-highlight-color: transparent;"}}loadingItemContainer.appendChild(textElementBtn);if(opt.isMobile&&opt.type==1){var _textElementTmd=document.getElementById("".concat(this.id,"-loading-item-txt"));var textElementIcon=document.createElement("div");textElementIcon.style="margin-bottom: 8px;width:24px;height:24px;";textElementIcon.innerHTML='<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n              <title></title>\n              <g id="gantan" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                  <g id="Group">\n                      <polygon id="Path" points="0 0 24.0000001 0 24.0000001 24.0000001 0 24.0000001"></polygon>\n                      <path d="M12,2.25000001 C17.2781739,2.25000001 21.5934661,6.44926243 21.746085,11.7237735 L21.746085,11.7237735 L21.75,12 C21.75,17.2781739 17.5507376,21.5934661 12.2762266,21.746085 L12.2762266,21.746085 L12,21.75 C6.72182614,21.75 2.40653397,17.5507376 2.25391507,12.2762266 L2.25391507,12.2762266 L2.25000001,12 C2.25000001,6.72182617 6.44926245,2.40653397 11.7237735,2.25391507 L11.7237735,2.25391507 Z M12,3.75000001 L11.7563186,3.75352261 C7.3032926,3.88243816 3.74992165,7.53391173 3.74992165,11.9891583 L3.74992165,11.9891583 L3.75352261,12.2436814 C3.88243816,16.6967075 7.5339117,20.2500784 11.9891583,20.2500784 L11.9891583,20.2500784 L12.2436814,20.2464774 C16.6967075,20.1175619 20.2500784,16.4660884 20.2500784,12.0108417 L20.2500784,12.0108417 L20.2464774,11.7563186 C20.1175619,7.30329258 16.4660883,3.75000001 12,3.75000001 L12,3.75000001 Z M11.999,15.2500001 L12.1156933,15.25672 C12.6133664,15.3144204 12.999993,15.7366564 12.999993,16.2500001 C12.999993,16.8022157 12.5522116,17.2500001 11.999993,17.2500001 C11.4477844,17.2500001 10.999993,16.8022116 11.0000197,16.2554347 C10.9962666,15.7375014 11.3873731,15.3105316 11.8897485,15.2559043 L11.999,15.2500001 Z M12,6.75000003 C12.3796958,6.75000003 12.693491,7.03215391 12.7431534,7.39822947 L12.75,7.50000003 L12.75,12.5 C12.75,12.9142136 12.4142136,13.25 12,13.25 C11.6203043,13.25 11.3065091,12.9678461 11.2568467,12.6017706 L11.25,12.5 L11.25,7.50000003 C11.25,7.08578647 11.5857865,6.75000003 12,6.75000003 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                  </g>\n              </g>\n          </svg>';loadingItemContainer.insertBefore(textElementIcon,_textElementTmd)}document.getElementById("".concat(this.id,"-loading-item-btn-wrap")).onclick=function(){console.log("-----------重新加载");_this2.jSPlugin.play();_this2.loadingClear();_this2.loadingStart(_this2.id);_this2.loadingSetText({text:"视频加载中"})}}this.state.text=opt.text;if(opt.delayClear){setTimeout(function(){_this2.loadingClearText()},parseInt(opt.delayClear))}}}},{key:"loadingClearText",value:function loadingClearText(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){var elements=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes;if(elements.length>1){elements[1].parentNode.removeChild(elements[1])}else{elements[0]&&elements[0].parentNode.removeChild(elements[0])}}}},{key:"loadingClear",value:function loadingClear(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){var elements=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes;for(var i=elements.length-1;i>=0;i--){elements[i].parentNode.removeChild(elements[i])}if(document.getElementById("".concat(this.id,"-loading-id-0"))){document.getElementById("".concat(this.id,"-loading-id-0")).style.background="none"}if(document.getElementById("loading-icon")){document.getElementById("loading-icon").parentNode.removeChild(document.getElementById("loading-icon"))}}}},{key:"loadingEnd",value:function loadingEnd(){var loadingItemContainerDOM=document.getElementById("".concat(this.id,"-loading-item-0"));if(loadingItemContainerDOM){loadingItemContainerDOM.parentNode.removeChild(loadingItemContainerDOM);var loadingContainerDOM=document.getElementById("".concat(this.id,"-loading-id-0"));if(loadingContainerDOM&&loadingContainerDOM.children.length===0){loadingContainerDOM.parentNode.removeChild(loadingContainerDOM)}}document.getElementById("".concat(this.id,"-loading-item-0")).style.background="none"}}]);return Status}();var Message$1=function(){function Message(jSPlugin,id){_classCallCheck$1(this,Message);this.id=id;this.jSPlugin=jSPlugin;this.timer=null;this.state={play:false,loading:false}}_createClass$1(Message,[{key:"default",value:function _default(msg){var _this=this;var msgId="msgId";if(document.getElementById("".concat(this.id,"-").concat(msgId))){document.getElementById("".concat(this.id,"-wrap")).removeChild(document.getElementById("".concat(this.id,"-").concat(msgId)))}var messageDOM=document.createElement("div");messageDOM.id="".concat(this.id,"-").concat(msgId);messageDOM.style="position: absolute;top: 50%;left:calc(50% - ".concat(msg.length*14/2,"px);padding: 4px 16px;background: #00000080;color: #FFFFFF;font-size: 14px");messageDOM.innerHTML=msg;document.getElementById("".concat(this.id,"-wrap")).appendChild(messageDOM);if(this.timer){clearTimeout(this.timer)}this.timer=setTimeout(function(){document.getElementById("".concat(_this.id,"-wrap")).removeChild(document.getElementById("".concat(_this.id,"-").concat(msgId)))},2e3)}}]);return Message}();var data$c=[{moduleCode:"",detailCode:"405984",description:"",solution:"",updateTime:1559564188e3},{moduleCode:"",detailCode:"10035",description:"获取子账户AccessToken异常,子账户不存在或子账户不属于该开发者",solution:"",updateTime:1559551958e3},{moduleCode:"",detailCode:"1052674",description:"获取本地录像失败",solution:"",updateTime:1558579653e3},{moduleCode:"",detailCode:"395547",description:"",solution:"",updateTime:1557367296e3},{moduleCode:"",detailCode:"12",description:"",solution:"",updateTime:1557229476e3},{moduleCode:"",detailCode:"10052",description:"余额不足",solution:"",updateTime:1557121463e3},{moduleCode:"",detailCode:"20108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:1556541725e3},{moduleCode:"",detailCode:"10009",description:"",solution:"",updateTime:1556422452e3},{moduleCode:"",detailCode:"320001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:1556419044e3},{moduleCode:"",detailCode:"120001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:155641903e4},{moduleCode:"",detailCode:"320049",description:"",solution:"",updateTime:1556272984e3},{moduleCode:"",detailCode:"380227",description:"",solution:"",updateTime:1556264379e3},{moduleCode:"",detailCode:"10033",description:"policy参数信息异常",solution:"",updateTime:1555922124e3},{moduleCode:"",detailCode:"10065",description:"weakAppKey 不属于accessToken对应的用户",solution:"",updateTime:1555497522e3},{moduleCode:"",detailCode:"100001",description:"",solution:"",updateTime:1555141776e3},{moduleCode:"",detailCode:"395558",description:"",solution:"",updateTime:1554987121e3},{moduleCode:"",detailCode:"70001",description:"智能家居买断用户设备受到限制,建议合理选择pagestart和pageSize",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"170001",description:"",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"1012",description:"重置失败",solution:"",updateTime:1554645841e3},{moduleCode:"",detailCode:"1043",description:"重置失败",solution:"",updateTime:1554645834e3},{moduleCode:"",detailCode:"60060",description:"直播功能未开通",solution:"通道未开通直播功能,请先开通直播",updateTime:1554346018e3},{moduleCode:"",detailCode:"380203",description:"",solution:"",updateTime:1554093666e3},{moduleCode:"",detailCode:"399048",description:"免费版并发数达到上限,请升级企业版使用多并发能力",solution:"升级成为企业版套餐即可取消并发数限制",updateTime:1553839878e3},{moduleCode:"",detailCode:"60007",description:"预置点个数超过最大值",solution:"",updateTime:1553671316e3},{moduleCode:"",detailCode:"1005",description:"",solution:"",updateTime:1553513701e3},{moduleCode:"",detailCode:"20605",description:"其他用户正在认证中",solution:"",updateTime:1552976317e3},{moduleCode:"",detailCode:"90004",description:"当前型号设备暂时不支持AI任务:CS-C3W-3B1WFR-YGL",solution:"",updateTime:1552898525e3},{moduleCode:"",detailCode:"60046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:1552872372e3},{moduleCode:"",detailCode:"3",description:"修改视频清晰度失败!",solution:"",updateTime:1552440229e3},{moduleCode:"",detailCode:"1013",description:"",solution:"",updateTime:1552035069e3},{moduleCode:"",detailCode:"370007",description:"",solution:"",updateTime:1551852327e3},{moduleCode:"",detailCode:"-1",description:"",solution:"",updateTime:1551752889e3},{moduleCode:"",detailCode:"30005",description:"弱账户不存在",solution:"",updateTime:1551422358e3},{moduleCode:"",detailCode:"90006",description:"用户操作AI任务受限",solution:"",updateTime:155107332e4},{moduleCode:"",detailCode:"60203",description:"未开通相关服务",solution:"",updateTime:155062307e4},{moduleCode:"",detailCode:"10002",description:"accessToken过期或异常",solution:"",updateTime:1550300346e3},{moduleCode:"",detailCode:"380339",description:"",solution:"",updateTime:1549889458e3},{moduleCode:"",detailCode:"90002",description:"AI任务设备配置数达到上限:3",solution:"",updateTime:1549071664e3},{moduleCode:"",detailCode:"380008",description:"",solution:"",updateTime:1549005979e3},{moduleCode:"",detailCode:"320227",description:"",solution:"",updateTime:1548739731e3},{moduleCode:"",detailCode:"60059",description:"ezopen地址均不可用",solution:"",updateTime:154839535e4},{moduleCode:"",detailCode:"10005",description:"appKey异常",solution:"",updateTime:1548317858e3},{moduleCode:"",detailCode:"60045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:1548155085e3},{moduleCode:"",detailCode:"60047",description:"码流类型不支持",solution:"",updateTime:1547962108e3},{moduleCode:"",detailCode:"60041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:154796098e4},{moduleCode:"",detailCode:"110029",description:"个人用户接口调用频率超限",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1547606859e3},{moduleCode:"",detailCode:"380355",description:"设备直连推流异常结束",solution:"",updateTime:1547106294e3},{moduleCode:"",detailCode:"320081",description:"",solution:"",updateTime:1547106279e3},{moduleCode:"",detailCode:"60035",description:"购买云存储服务失败",solution:"",updateTime:1547026959e3},{moduleCode:"",detailCode:"90005",description:"设备已存在:C75714141",solution:"",updateTime:1546940622e3},{moduleCode:"",detailCode:"1053445",description:"该时间段没有录像片段",solution:"",updateTime:1546935727e3},{moduleCode:"",detailCode:"90007",description:"设备未加入到AI任务",solution:"",updateTime:1546932948e3},{moduleCode:"",detailCode:"326000",description:"",solution:"",updateTime:1546823143e3},{moduleCode:"",detailCode:"1021",description:"重置失败",solution:"",updateTime:1546781152e3},{moduleCode:"",detailCode:"2001",description:"删除设备失败!",solution:"",updateTime:1546422886e3},{moduleCode:"",detailCode:"380425",description:"",solution:"",updateTime:1546407694e3},{moduleCode:"",detailCode:"120097",description:"",solution:"",updateTime:1546085995e3},{moduleCode:"",detailCode:"10059",description:"requestId已存在",solution:"",updateTime:1545824509e3},{moduleCode:"",detailCode:"1154723",description:"",solution:"",updateTime:1545795209e3},{moduleCode:"",detailCode:"60043",description:"添加的设备超出最大数量",solution:"",updateTime:1545493607e3},{moduleCode:"",detailCode:"1152677",description:"",solution:"",updateTime:1545313404e3},{moduleCode:"",detailCode:"20097",description:"设备添加异常,设备验证码为ABCDEF或设备被N1,R1关联",solution:"",updateTime:1545310795e3},{moduleCode:"",detailCode:"10060",description:"设备不支持该云存储类型",solution:"",updateTime:1545309064e3},{moduleCode:"",detailCode:"20102",description:"无相应邀请信息,无法接受邀请",solution:"",updateTime:1545204966e3},{moduleCode:"",detailCode:"10053",description:"云存储开通中",solution:"",updateTime:1545100293e3},{moduleCode:"",detailCode:"20401",description:"用户云空间信息不存在",solution:"",updateTime:154501788e4},{moduleCode:"",detailCode:"20600",description:"临时密码数已达上限",solution:"",updateTime:1544873457e3},{moduleCode:"",detailCode:"901",description:"",solution:"",updateTime:1544693519e3},{moduleCode:"",detailCode:"60210",description:"图片数据错误",solution:"",updateTime:1544604457e3},{moduleCode:"",detailCode:"10013",description:"您的应用没有权限调用",solution:"",updateTime:1544416237e3},{moduleCode:"",detailCode:"70007",description:"授权码不存在",solution:"",updateTime:1544179533e3},{moduleCode:"",detailCode:"10015",description:"授权地址不存在",solution:"",updateTime:154416324e4},{moduleCode:"",detailCode:"320423",description:"",solution:"",updateTime:1544100685e3},{moduleCode:"",detailCode:"370009",description:"",solution:"",updateTime:1544077151e3},{moduleCode:"",detailCode:"10031",description:"子账户或萤石用户没有权限",solution:"",updateTime:1543990462e3},{moduleCode:"",detailCode:"10055",description:"设备不支持试用云存储服务",solution:"",updateTime:1543986292e3},{moduleCode:"",detailCode:"60042",description:"添加的设备密码错误",solution:"",updateTime:1543710913e3},{moduleCode:"",detailCode:"60082",description:"设备正在响应本次声源定位",solution:"",updateTime:1543647426e3},{moduleCode:"",detailCode:"10056",description:"设备不支持云存储服务转出",solution:"",updateTime:1543558342e3},{moduleCode:"",detailCode:"20104",description:"好友不存在",solution:"",updateTime:1543492403e3},{moduleCode:"",detailCode:"20111",description:"好友不是等待验证状态,无法接受邀请",solution:"",updateTime:1543492365e3},{moduleCode:"",detailCode:"20107",description:"不能添加自己为好友",solution:"",updateTime:1543480986e3},{moduleCode:"",detailCode:"1",description:"设备返回其他错误",solution:"",updateTime:1543459921e3},{moduleCode:"",detailCode:"60084",description:"当前正在关闭隐私遮蔽",solution:"",updateTime:1543456515e3},{moduleCode:"",detailCode:"380255",description:"",solution:"",updateTime:1543411652e3},{moduleCode:"",detailCode:"20015",description:"设备不支持",solution:"",updateTime:1543390936e3},{moduleCode:"",detailCode:"30003",description:"手机验证码错误",solution:"",updateTime:1543389137e3},{moduleCode:"",detailCode:"20615",description:"锁用户已存在",solution:"",updateTime:1543388325e3},{moduleCode:"",detailCode:"60061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:1543372581e3},{moduleCode:"",detailCode:"60020",description:"设备不支持该信令",solution:"",updateTime:1543321636e3},{moduleCode:"",detailCode:"320146",description:"",solution:"",updateTime:1543318472e3},{moduleCode:"",detailCode:"60018",description:"设备升级失败",solution:"",updateTime:1543304928e3},{moduleCode:"",detailCode:"60044",description:"添加的设备网络不可达超时",solution:"",updateTime:1543304102e3},{moduleCode:"",detailCode:"20619",description:"主用户无法删除",solution:"",updateTime:1543290219e3},{moduleCode:"",detailCode:"20608",description:"锁用户不存在",solution:"",updateTime:154328195e4},{moduleCode:"",detailCode:"20609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:1543281601e3},{moduleCode:"",detailCode:"1049954",description:"升级设备失败",solution:"",updateTime:1543279264e3},{moduleCode:"",detailCode:"60009",description:"正在调用预置点",solution:"",updateTime:1543238114e3},{moduleCode:"",detailCode:"1052677",description:"获取本地录像失败",solution:"",updateTime:1543207604e3},{moduleCode:"",detailCode:"327000",description:"",solution:"",updateTime:1543196609e3},{moduleCode:"",detailCode:"20021",description:"设备在线,未被用户添加",solution:"",updateTime:1543193436e3},{moduleCode:"",detailCode:"20202",description:"操作留言信息失败",solution:"",updateTime:1543191562e3},{moduleCode:"",detailCode:"1052678",description:"获取本地录像失败",solution:"",updateTime:1543132218e3},{moduleCode:"",detailCode:"1054723",description:"格式化设备失败",solution:"",updateTime:1543129833e3},{moduleCode:"",detailCode:"20109",description:"对应分享不存在",solution:"",updateTime:1543129111e3},{moduleCode:"",detailCode:"60026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:1543110403e3},{moduleCode:"",detailCode:"60083",description:"当前正在开启隐私遮蔽",solution:"",updateTime:1543071148e3},{moduleCode:"",detailCode:"60001",description:"用户无云台控制权限",solution:"",updateTime:1543059167e3},{moduleCode:"",detailCode:"2003",description:"设备不在线",solution:"",updateTime:1543051046e3},{moduleCode:"",detailCode:"-24",description:"设置设备enable错误",solution:"",updateTime:1543042701e3},{moduleCode:"",detailCode:"10018",description:"",solution:"",updateTime:1543041564e3},{moduleCode:"",detailCode:"20103",description:"好友已存在",solution:"",updateTime:154303843e4},{moduleCode:"",detailCode:"70010",description:"授权异常请重试",solution:"",updateTime:154303559e4},{moduleCode:"",detailCode:"60056",description:"删除设备失败",solution:"",updateTime:1543031275e3},{moduleCode:"",detailCode:"60040",description:"添加的设备不在同一局域网",solution:"",updateTime:154303121e4},{moduleCode:"",detailCode:"60019",description:"加密已开启",solution:"",updateTime:1543029931e3},{moduleCode:"",detailCode:"1054722",description:"格式化设备失败",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"20016",description:"当前设备正在格式化",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"10024",description:"透明通道权限校验不通过",solution:"",updateTime:154302554e4},{moduleCode:"",detailCode:"6002",description:"删除设备失败!",solution:"",updateTime:1543025026e3},{moduleCode:"",detailCode:"1011",description:"验证码错误!",solution:"",updateTime:1543016865e3},{moduleCode:"",detailCode:"60032",description:"卡密已使用",solution:"",updateTime:1543006668e3},{moduleCode:"",detailCode:"10034",description:"子账号已存在",solution:"",updateTime:1542989194e3},{moduleCode:"",detailCode:"20301",description:"根据uuid查询联动信息不存在",solution:"",updateTime:1542988651e3},{moduleCode:"",detailCode:"1041",description:"获取验证码过于频繁",solution:"",updateTime:1542980953e3},{moduleCode:"",detailCode:"10012",description:"该appkey下已绑定重复的phone!",solution:"",updateTime:15429808e5},{moduleCode:"",detailCode:"1008",description:"phone不合法!",solution:"",updateTime:1542979812e3},{moduleCode:"",detailCode:"60023",description:"订阅操作失败",solution:"",updateTime:1542979006e3},{moduleCode:"",detailCode:"5",description:"设备返回其他错误",solution:"",updateTime:1542977828e3},{moduleCode:"",detailCode:"60006",description:"云台当前操作失败",solution:"",updateTime:1542977598e3},{moduleCode:"",detailCode:"131",description:"修改视频清晰度失败!",solution:"",updateTime:1542977246e3},{moduleCode:"",detailCode:"10019",description:"密码错误",solution:"",updateTime:1542976628e3},{moduleCode:"",detailCode:"10004",description:"用户不存在",solution:"",updateTime:1542976268e3},{moduleCode:"",detailCode:"20201",description:"操作报警信息失败",solution:"",updateTime:1542975906e3},{moduleCode:"",detailCode:"20024",description:"设备不在线,已经被别的用户添加",solution:"",updateTime:1542975858e3},{moduleCode:"",detailCode:"60004",description:"设备云台旋转达到左限位",solution:"",updateTime:1542975207e3},{moduleCode:"",detailCode:"1052679",description:"修改视频清晰度失败!",solution:"",updateTime:1542974886e3},{moduleCode:"",detailCode:"20031",description:"请在萤石客户端关闭终端绑定",solution:"",updateTime:1542974756e3},{moduleCode:"",detailCode:"1053825",description:"获取本地录像失败",solution:"",updateTime:1542974692e3},{moduleCode:"",detailCode:"60011",description:"预置点不存在",solution:"",updateTime:1542974414e3},{moduleCode:"",detailCode:"1052936",description:"修改视频清晰度失败!",solution:"",updateTime:154297439e4},{moduleCode:"",detailCode:"1016",description:"",solution:"",updateTime:1542974273e3},{moduleCode:"",detailCode:"10032",description:"子账号不存在",solution:"",updateTime:1542973906e3},{moduleCode:"",detailCode:"20013",description:"设备已被别人添加",solution:"",updateTime:1542973817e3},{moduleCode:"",detailCode:"50000",description:"服务器错误!",solution:"",updateTime:1542973801e3},{moduleCode:"",detailCode:"60010",description:"该预置点已经是当前位置",solution:"",updateTime:15429738e5},{moduleCode:"",detailCode:"60003",description:"设备云台旋转达到下限位",solution:"",updateTime:154297377e4},{moduleCode:"",detailCode:"4",description:"设备返回其他错误",solution:"",updateTime:1542973755e3},{moduleCode:"",detailCode:"60016",description:"加密未开启,无需关闭",solution:"",updateTime:1542973753e3},{moduleCode:"",detailCode:"60002",description:"设备云台旋转达到上限位",solution:"",updateTime:1542973742e3},{moduleCode:"",detailCode:"20023",description:"设备不在线,未被用户添加",solution:"",updateTime:1542973685e3},{moduleCode:"",detailCode:"10008",description:"",solution:"",updateTime:1542973676e3},{moduleCode:"",detailCode:"20010",description:"设备验证码错误",solution:"",updateTime:1542973658e3},{moduleCode:"",detailCode:"60005",description:"设备云台旋转达到右限位",solution:"",updateTime:1542973657e3},{moduleCode:"",detailCode:"20017",description:"设备已经被自己添加",solution:"",updateTime:1542973648e3},{moduleCode:"",detailCode:"20020",description:"设备在线,已经被自己添加",solution:"",updateTime:1542973533e3},{moduleCode:"",detailCode:"20029",description:"设备不在线,已经被自己添加",solution:"",updateTime:154297353e4},{moduleCode:"",detailCode:"10014",description:"APPKEY下对应的第三方userId和phone未绑定!",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"20002",description:"设备不存在",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"10030",description:"appkey和appsecret不匹配",solution:"",updateTime:154297349e4},{moduleCode:"",detailCode:"20022",description:"设备在线,已经被别的用户添加",solution:"",updateTime:1542973486e3},{moduleCode:"",detailCode:"20008",description:"设备响应超时",solution:"",updateTime:1542973484e3},{moduleCode:"",detailCode:"20032",description:"该用户下通道不存在",solution:"",updateTime:1542973481e3},{moduleCode:"",detailCode:"20006",description:"网络异常",solution:"",updateTime:1542973475e3},{moduleCode:"",detailCode:"20014",description:"deviceSerial不合法!",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20007",description:"设备不在线",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20018",description:"该用户不拥有该设备",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10010",description:"",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10011",description:"未绑定!",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"20001",description:"通道不存在!",solution:"",updateTime:1542973452e3},{moduleCode:"",detailCode:"10017",description:"appKey不存在",solution:"",updateTime:1542973451e3},{moduleCode:"",detailCode:"400259",description:"",solution:"",updateTime:1542875643e3},{moduleCode:"",detailCode:"400004",description:"",solution:"",updateTime:1542873364e3},{moduleCode:"",detailCode:"3840",description:"",solution:"",updateTime:154186e7},{moduleCode:"",detailCode:"-1017",description:"",solution:"",updateTime:1541733663e3},{moduleCode:"",detailCode:"320025",description:"",solution:"",updateTime:1541078281e3},{moduleCode:"",detailCode:"320024",description:"",solution:"",updateTime:1540801374e3},{moduleCode:"",detailCode:"321002",description:"",solution:"",updateTime:1540631734e3},{moduleCode:"",detailCode:"321000",description:"",solution:"",updateTime:1540609178e3},{moduleCode:"",detailCode:"321022",description:"",solution:"",updateTime:1540548345e3},{moduleCode:"",detailCode:"321016",description:"",solution:"",updateTime:1540287187e3},{moduleCode:"",detailCode:"320023",description:"",solution:"",updateTime:1539825993e3},{moduleCode:"",detailCode:"-1016",description:"",solution:"",updateTime:1539584931e3},{moduleCode:"",detailCode:"8",description:"",solution:"",updateTime:1539391812e3},{moduleCode:"",detailCode:"1075127593",description:"",solution:"",updateTime:1538959251e3},{moduleCode:"",detailCode:"380421",description:"",solution:"",updateTime:1537288465e3},{moduleCode:"",detailCode:"322000",description:"麦克风权限未开启",solution:"",updateTime:1536820136e3},{moduleCode:"",detailCode:"1152678",description:"",solution:"",updateTime:1536738348e3},{moduleCode:"",detailCode:"320047",description:"",solution:"",updateTime:1536664472e3},{moduleCode:"",detailCode:"327006",description:"",solution:"",updateTime:153613612e4},{moduleCode:"",detailCode:"1074807593",description:"",solution:"",updateTime:1536135035e3},{moduleCode:"",detailCode:"320291",description:"",solution:"",updateTime:1536110836e3},{moduleCode:"",detailCode:"320045",description:"",solution:"",updateTime:1535963775e3},{moduleCode:"",detailCode:"370004",description:"",solution:"",updateTime:1535883699e3},{moduleCode:"",detailCode:"1149954",description:"",solution:"",updateTime:1535700674e3},{moduleCode:"",detailCode:"320053",description:"",solution:"",updateTime:1535681079e3},{moduleCode:"",detailCode:"400000",description:"",solution:"",updateTime:1535532332e3},{moduleCode:"",detailCode:"110028",description:"个人版抓图接口日调用次数超出限制",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348756e3},{moduleCode:"",detailCode:"110027",description:"个人版帐号数量超出安全限制,无法调用",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348734e3},{moduleCode:"",detailCode:"110026",description:"设备数量超出个人版限制,当前设备无法操作",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348588e3},{moduleCode:"",detailCode:"100000",description:"",solution:"",updateTime:1534980008e3},{moduleCode:"",detailCode:"324004",description:"",solution:"",updateTime:1534927762e3},{moduleCode:"",detailCode:"360104",description:"",solution:"",updateTime:1534761006e3},{moduleCode:"",detailCode:"320204",description:"",solution:"",updateTime:1534584221e3},{moduleCode:"",detailCode:"380001",description:"",solution:"",updateTime:1534404715e3},{moduleCode:"",detailCode:"380204",description:"",solution:"",updateTime:1534401682e3},{moduleCode:"",detailCode:"328006",description:"",solution:"",updateTime:1534144407e3},{moduleCode:"",detailCode:"321703",description:"",solution:"",updateTime:1534127274e3},{moduleCode:"",detailCode:"321510",description:"",solution:"",updateTime:1533428892e3},{moduleCode:"",detailCode:"321006",description:"",solution:"",updateTime:1533036916e3},{moduleCode:"",detailCode:"50009",description:"",solution:"",updateTime:1532078548e3},{moduleCode:"",detailCode:"50007",description:"",solution:"",updateTime:153199172e4},{moduleCode:"",detailCode:"50018",description:"",solution:"",updateTime:1531912829e3},{moduleCode:"",detailCode:"380451",description:"",solution:"",updateTime:15316157e5},{moduleCode:"",detailCode:"380336",description:"",solution:"",updateTime:1531231721e3},{moduleCode:"",detailCode:"360020",description:"",solution:"",updateTime:1531117554e3},{moduleCode:"",detailCode:"380418",description:"",solution:"",updateTime:153110707e4},{moduleCode:"",detailCode:"1153445",description:"设备在该时间段内没有录像",solution:"",updateTime:1530944007e3},{moduleCode:"",detailCode:"110007",description:"调用接口总次数达到上限",solution:"请升级企业版,获取更高能力",updateTime:1530935584e3},{moduleCode:"",detailCode:"360019",description:"",solution:"",updateTime:1530869771e3},{moduleCode:"",detailCode:"360100",description:"",solution:"",updateTime:1530786188e3},{moduleCode:"",detailCode:"380042",description:"",solution:"",updateTime:1530775199e3},{moduleCode:"",detailCode:"320355",description:"",solution:"",updateTime:1530716074e3},{moduleCode:"",detailCode:"100003",description:"",solution:"",updateTime:1530232541e3},{moduleCode:"",detailCode:"371026",description:"",solution:"",updateTime:15301926e5},{moduleCode:"",detailCode:"102",description:"",solution:"",updateTime:1529895641e3},{moduleCode:"",detailCode:"380201",description:"",solution:"",updateTime:1529740929e3},{moduleCode:"",detailCode:"320054",description:"",solution:"",updateTime:1529544875e3},{moduleCode:"",detailCode:"500101",description:"",solution:"",updateTime:1529485953e3},{moduleCode:"",detailCode:"321001",description:"",solution:"",updateTime:1529411048e3},{moduleCode:"",detailCode:"321508",description:"",solution:"",updateTime:1529393279e3},{moduleCode:"",detailCode:"405991",description:"",solution:"",updateTime:1529380238e3},{moduleCode:"",detailCode:"380461",description:"",solution:"",updateTime:1529130941e3},{moduleCode:"",detailCode:"-1019",description:"",solution:"",updateTime:1529057245e3},{moduleCode:"",detailCode:"322009",description:"",solution:"",updateTime:1528965717e3},{moduleCode:"",detailCode:"324005",description:"",solution:"",updateTime:1528950153e3},{moduleCode:"",detailCode:"325000",description:"",solution:"",updateTime:1528947143e3},{moduleCode:"",detailCode:"326032",description:"",solution:"",updateTime:1528872971e3},{moduleCode:"",detailCode:"325032",description:"",solution:"",updateTime:1528863189e3},{moduleCode:"",detailCode:"328000",description:"",solution:"",updateTime:1528794505e3},{moduleCode:"",detailCode:"53",description:"",solution:"",updateTime:1528693249e3},{moduleCode:"",detailCode:"-1020",description:"",solution:"",updateTime:152849944e4},{moduleCode:"",detailCode:"329032",description:"",solution:"",updateTime:1528446301e3},{moduleCode:"",detailCode:"-1202",description:"",solution:"",updateTime:152843982e4},{moduleCode:"",detailCode:"2",description:"",solution:"",updateTime:1528434175e3},{moduleCode:"",detailCode:"1152936",description:"",solution:"",updateTime:1528345986e3},{moduleCode:"",detailCode:"328011",description:"",solution:"",updateTime:15283386e5},{moduleCode:"",detailCode:"28",description:"",solution:"",updateTime:152833753e4},{moduleCode:"",detailCode:"320356",description:"",solution:"",updateTime:1528188693e3},{moduleCode:"",detailCode:"320357",description:"",solution:"",updateTime:1528188517e3},{moduleCode:"",detailCode:"405800",description:"",solution:"",updateTime:1528168732e3},{moduleCode:"",detailCode:"405996",description:"",solution:"",updateTime:1528168686e3},{moduleCode:"",detailCode:"380357",description:"",solution:"",updateTime:1528011565e3},{moduleCode:"",detailCode:"328022",description:"",solution:"",updateTime:1527929065e3},{moduleCode:"",detailCode:"380003",description:"",solution:"",updateTime:1527927819e3},{moduleCode:"",detailCode:"50004",description:"",solution:"",updateTime:1527770643e3},{moduleCode:"",detailCode:"50011",description:"",solution:"",updateTime:1527770635e3},{moduleCode:"",detailCode:"370017",description:"",solution:"",updateTime:1527739514e3},{moduleCode:"",detailCode:"327032",description:"",solution:"",updateTime:1527726704e3},{moduleCode:"",detailCode:"324001",description:"",solution:"",updateTime:1527681892e3},{moduleCode:"",detailCode:"405997",description:"",solution:"",updateTime:1527653408e3},{moduleCode:"",detailCode:"405995",description:"",solution:"",updateTime:1527647283e3},{moduleCode:"",detailCode:"1153825",description:"",solution:"",updateTime:1527601747e3},{moduleCode:"",detailCode:"328002",description:"",solution:"",updateTime:1527495292e3},{moduleCode:"",detailCode:"1152679",description:"",solution:"",updateTime:1527486665e3},{moduleCode:"",detailCode:"380356",description:"",solution:"",updateTime:1527125669e3},{moduleCode:"",detailCode:"328032",description:"",solution:"",updateTime:1527069382e3},{moduleCode:"",detailCode:"22",description:"",solution:"",updateTime:1527049826e3},{moduleCode:"",detailCode:"9",description:"",solution:"",updateTime:1527006778e3},{moduleCode:"",detailCode:"89",description:"",solution:"",updateTime:1526622784e3},{moduleCode:"",detailCode:"328016",description:"",solution:"",updateTime:1526452365e3},{moduleCode:"",detailCode:"368005",description:"",solution:"",updateTime:1525921264e3},{moduleCode:"",detailCode:"0",description:"",solution:"",updateTime:1525920242e3},{moduleCode:"",detailCode:"380006",description:"",solution:"",updateTime:1525918868e3},{moduleCode:"",detailCode:"310",description:"",solution:"",updateTime:1525834436e3},{moduleCode:"",detailCode:"360011",description:"",solution:"",updateTime:1525681552e3},{moduleCode:"",detailCode:"170005",description:"",solution:"",updateTime:15254339e5},{moduleCode:"",detailCode:"50023",description:"",solution:"",updateTime:1525403338e3},{moduleCode:"",detailCode:"100131",description:"",solution:"",updateTime:1525229691e3},{moduleCode:"",detailCode:"-1018",description:"",solution:"",updateTime:1525142341e3},{moduleCode:"",detailCode:"362026",description:"",solution:"",updateTime:1524882677e3},{moduleCode:"",detailCode:"368007",description:"",solution:"",updateTime:1524832269e3},{moduleCode:"",detailCode:"54",description:"",solution:"",updateTime:1524793646e3},{moduleCode:"",detailCode:"1154722",description:"",solution:"",updateTime:1524620807e3},{moduleCode:"",detailCode:"320229",description:"",solution:"",updateTime:1524551682e3},{moduleCode:"",detailCode:"360012",description:"",solution:"",updateTime:1524472094e3},{moduleCode:"",detailCode:"380229",description:"",solution:"",updateTime:1524110755e3},{moduleCode:"",detailCode:"360016",description:"",solution:"",updateTime:1523933518e3},{moduleCode:"",detailCode:"-1003",description:"",solution:"",updateTime:1523584804e3},{moduleCode:"",detailCode:"410026",description:"",solution:"",updateTime:152351743e4},{moduleCode:"",detailCode:"360102",description:"TTS初始化失败",solution:"",updateTime:1523503528e3},{moduleCode:"",detailCode:"360013",description:"设备开启了隐私保护",solution:"",updateTime:1523503507e3},{moduleCode:"",detailCode:"360010",description:"设备正在对讲中",solution:"",updateTime:1523503491e3},{moduleCode:"",detailCode:"360007",description:"TTS关闭了与客户端的连接",solution:"",updateTime:1523503475e3},{moduleCode:"",detailCode:"360006",description:"客户端接收发生错误",solution:"",updateTime:1523503457e3},{moduleCode:"",detailCode:"360005",description:"客户端发送的消息错误",solution:"",updateTime:1523503437e3},{moduleCode:"",detailCode:"360004",description:"TTS内部发生错误",solution:"",updateTime:1523503421e3},{moduleCode:"",detailCode:"360003",description:"TTS的设备端发生错误",solution:"",updateTime:1523503397e3},{moduleCode:"",detailCode:"360002",description:"对讲发起超时",solution:"",updateTime:1523503376e3},{moduleCode:"",detailCode:"360001",description:"客户端请求超时",solution:"",updateTime:1523503357e3},{moduleCode:"",detailCode:"320077",description:"",solution:"",updateTime:1523444274e3},{moduleCode:"",detailCode:"370047",description:"",solution:"",updateTime:152344048e4},{moduleCode:"",detailCode:"100002",description:"",solution:"",updateTime:1523413964e3},{moduleCode:"",detailCode:"-1004",description:"",solution:"",updateTime:1523336653e3},{moduleCode:"",detailCode:"380000",description:"",solution:"",updateTime:1523180856e3},{moduleCode:"",detailCode:"380213",description:"",solution:"",updateTime:1523180623e3},{moduleCode:"",detailCode:"380101",description:"",solution:"",updateTime:1522834231e3},{moduleCode:"",detailCode:"50047",description:"",solution:"",updateTime:1522833243e3},{moduleCode:"",detailCode:"-999",description:"",solution:"",updateTime:1522831034e3},{moduleCode:"",detailCode:"320418",description:"",solution:"",updateTime:1522829072e3},{moduleCode:"",detailCode:"-1009",description:"",solution:"",updateTime:1522746247e3},{moduleCode:"",detailCode:"320209",description:"",solution:"",updateTime:1522744395e3},{moduleCode:"",detailCode:"368006",description:"",solution:"",updateTime:15227443e5},{moduleCode:"",detailCode:"369003",description:"",solution:"",updateTime:1522736355e3},{moduleCode:"",detailCode:"405989",description:"",solution:"",updateTime:1522726571e3},{moduleCode:"",detailCode:"-1012",description:"",solution:"",updateTime:1522726203e3},{moduleCode:"",detailCode:"322016",description:"",solution:"",updateTime:1522722918e3},{moduleCode:"",detailCode:"500103",description:"",solution:"",updateTime:1522655556e3},{moduleCode:"",detailCode:"405999",description:"",solution:"",updateTime:1522654716e3},{moduleCode:"",detailCode:"321032",description:"",solution:"",updateTime:1522647732e3},{moduleCode:"",detailCode:"381101",description:"",solution:"",updateTime:1522392414e3},{moduleCode:"",detailCode:"399999",description:"",solution:"",updateTime:1522379834e3},{moduleCode:"",detailCode:"380103",description:"",solution:"",updateTime:1522312724e3},{moduleCode:"",detailCode:"360014",description:"",solution:"",updateTime:1522304341e3},{moduleCode:"",detailCode:"-1005",description:"",solution:"",updateTime:1522288195e3},{moduleCode:"",detailCode:"100005",description:"",solution:"",updateTime:1522218849e3},{moduleCode:"",detailCode:"100004",description:"",solution:"",updateTime:1522209053e3},{moduleCode:"",detailCode:"106002",description:"",solution:"",updateTime:15222062e5},{moduleCode:"",detailCode:"410030",description:"",solution:"",updateTime:1522162252e3},{moduleCode:"",detailCode:"-1002",description:"",solution:"",updateTime:152215069e4},{moduleCode:"",detailCode:"-1200",description:"",solution:"",updateTime:1522139025e3},{moduleCode:"",detailCode:"-1001",description:"",solution:"",updateTime:1522046436e3},{moduleCode:"",detailCode:"-1011",description:"",solution:"",updateTime:1522045931e3},{moduleCode:"",detailCode:"381102",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"381103",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"391205",description:"vtdu解析服务器ip失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391206",description:"vtdu描述符select失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391207",description:"vtdu文件描述符不在可读中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391208",description:"vtdu网络发生错误getsockopt",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391209",description:"vtdu描述符select超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395000",description:"cas回复信令,发现内存已经释放(和设备之间异常断开)",msg:"播放失败请重试",solution:"检查设备网络;刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395400",description:"私有化协议vtm检测私有化协议中码流类型小于0或者设备序列号为空等非法参数场景返回(app不重试取流)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395402",description:"回放找不到录像文件",msg:"回放找不到录像文件,本地存储请检查存储卡是否接触良好",solution:"检查是否有存储卡并且接触良好",updateTime:1522034841e3},{moduleCode:"",detailCode:"395403",description:"操作码或信令密钥与设备不匹配",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395404",description:"设备不在线",solution:"检查设备网络;重启设备接入萤石云",msg:"设备不在线,请检查设备网络或重启设备接入萤石云",updateTime:1522034841e3},{moduleCode:"",detailCode:"395405",description:"流媒体向设备发送或接受信令超时/cas响应超时",msg:"播放失败,请检查设备网络或重启设备",solution:"检查设备网络;重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395406",description:"token失效",msg:"播放失败请重试或重启设备",solution:"刷新重试或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395407",description:"客户端的URL格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395409",description:"预览开启隐私保护",msg:"播放失败请关闭隐私遮蔽",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395410",description:"设备达到最大连接数",solution:"请升级设备固件版本",updateTime:1522034841e3},{moduleCode:"",detailCode:"395411",description:"token无权限",msg:"播放失败",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395412",description:"session不存在",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395413",description:"验证token的他异常(不具体) ",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395415",description:"设备通道错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395416",description:"设备资源受限",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395451",description:"设备不支持的码流类型",msg:"播放失败请重试或切换设备码流",solution:"刷新重试或者切换到高清模式",updateTime:1522034841e3},{moduleCode:"",detailCode:"395452",description:"设备链接流媒体服务器失败",msg:"播放失败,请检查设备网络或重启设备或重新加载",solution:"检查设备网络,重启设备,刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395454",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395455",description:"设备通道未关联",msg:"播放失败,请检查设备通道是否关联",solution:"检查设备通道是否关联",updateTime:152222018e4},{moduleCode:"",detailCode:"395456",description:"设备通道关联设备不在线",msg:"播放失败,请检查设备通道是否上线",solution:"检查设备通道是否上线",updateTime:152222018e4},{moduleCode:"",detailCode:"395457",description:"客户端不支持端到端加密",msg:"播放失败",solution:"客户端不支持端到端加密",updateTime:152222018e4},{moduleCode:"",detailCode:"395458",description:"设备不支持当前并发ECDH密",msg:"客户端不支持端到端加密",solution:"设备不支持当前并发ECDH密",updateTime:152222018e4},{moduleCode:"",detailCode:"395459",description:"VTDU 处理ECDH 加密失败",msg:"播放失败",solution:"VTDU 处理ECDH 加密失败",updateTime:152222018e4},{moduleCode:"",detailCode:"395460",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395492",description:"设备不支持的命令",msg:"操作失败,设备不支持",solution:"",updateTime:152222018e4},{moduleCode:"",detailCode:"395500",description:"服务器处理失败",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395501",description:"流媒体vtdu达到最大负载,请扩容",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395503",description:"vtm返回分配vtdu失败",msg:"播放失败请重试",solution:"vtdu服务异常,请请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395504",description:"流媒体vtdu达到最大负载",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395505",description:"vtm ecdh解密失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395506",description:"vtm 返回IPC不支持取流(需要IPC添加NVR后支持)",msg:"播放失败,请绑定NVR使用",solution:"IPC绑定NVR使用",updateTime:1522034841e3},{moduleCode:"",detailCode:"395544",description:"设备返回无视频源",msg:"播放失败,请检查设备接触情况",solution:"设备是否接触良好; 如果一直无法解决,请联系技术支持",updateTime:1522034841e3},{moduleCode:"",detailCode:"395545",description:"视频分享时间已经结束",msg:"视频分享时间已结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395546",description:"vtdu返回达到取流并发路数限制",msg:"并发上限,请升级为企业版",solution:"请升级为企业版,放开并发限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395547",description:"vtdu返回开放平台用户并发限制",msg:"并发上限,请升级为企业版",solution:"请确定开放平台用户预览是否超过用户并发数量限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395556",description:"ticket校验失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395557",description:"回放服务器等待流头超时",msg:"播放失败请重试",solution:"刷新重试,检测设备网络,重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395558",description:"查找录像开始时间错误",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395560",description:"群组分享取流二次验证失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395561",description:"分享群组用户被锁住",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395562",description:"群组分享用户权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395563",description:"认证服务连接失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395564",description:"认证超时",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395566",description:"不在分享时间内预览",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395567",description:"分享通道被锁定",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395568",description:"未找到认证类型",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395569",description:"认证返回的参数异常",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395600",description:"分享设备不在分享时间内",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395601",description:"群组分享用户没权限",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395602",description:"群组分享权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395610",description:"接收流头失败",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395620",description:"心跳超时",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395530",description:"机房故障不可用",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395701",description:"cas信令返回格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395702",description:"SPGW请求Cas、Status透传超时",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395703",description:"SPGW请求http不通",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396001",description:"客户端参数出错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396099",description:"客户端默认错误",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396101",description:"不支持的命令",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396102",description:"设备流头发送失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396103",description:"cas/设备返回错误1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396104",description:"cas/设备返回错误-1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396105",description:"设备返回错误码3",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396106",description:"设备返回错误码4",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396107",description:"设备返回错误码5",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396108",description:"cas信令回应重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396109",description:"视频广场取消分享",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396110",description:"设备信令默认错误",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396501",description:"设备数据链路和实际链路不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396502",description:"设备数据链路重复建立连接",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396503",description:"设备数据链路端口不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396504",description:"缓存设备数据链路失败(内存块不足)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396505",description:"设备发送确认头消息重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396506",description:"设备数据先于确定头部到达",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396508",description:"设备数据头部长度非法",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396509",description:"索引找不到设备数据管理块",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396510",description:"设备数据链路vtdu内存块协议状态不匹配",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396511",description:"设备数据头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396512",description:"设备数据头部非法(较笼统)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396513",description:"设备数据长度过小",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396514",description:"设备老协议推流头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396515",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396516",description:"设备老协议索引找不到内存管理块",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396517",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396518",description:"设备数据包过大",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396519",description:"设备推流链路网络不稳定",msg:"播放失败,请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396520",description:"设备推流链路网络不稳定(默认)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396700",description:"异常数据包",msg:"播放失败,设备重启",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396701",description:"回放结束数据包",msg:"回放结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397001",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397002",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397003",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397004",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397005",description:"VTDU连接失败,或VTDU侧断开连接",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397006",description:"vtm断开连接(无需 关注)",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397007",description:"客户端发送缓冲区满(上行带宽太小)",msg:"播放失败,上行带宽过小请检查设备网络情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399000",description:"无效包,包过大",msg:" 检查设备重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399001",description:"地址不合法",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399002",description:"缺少端口",msg:" 播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"170003",description:"refreshToken不存在",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"170004",description:"refreshToken已过期",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"380011",description:"设备隐私保护中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380045",description:"设备直连取流连接数量过大",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380047",description:"设备不支持该命令",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380077",description:"设备正在对讲中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380102",description:"数据接收异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380205",description:"设备检测入参异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380209",description:"网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380212",description:"设备端网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"101007",description:"手机号未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120503",description:"正在响铃",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390016",description:"vtdu成功响应未携带流头",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101008",description:"手机号码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120504",description:"室内机正在通话",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390017",description:"无数据流,尚未使用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101009",description:"用户名与手机不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120505",description:"设备操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390018",description:"信令消息体PB解析失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101010",description:"获取验证码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120506",description:"非法命令",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390019",description:"信令消息体PB封装失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101011",description:"验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120507",description:"智能锁密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390020",description:"申请系统内存资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101012",description:"验证码失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120508",description:"开关锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390021",description:"vtdu地址尚未获取到",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101013",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120509",description:"开关锁超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390022",description:"客户端尚未支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101014",description:"密码不正确或者appKey不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120510",description:"智能锁设备繁忙",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390023",description:"获取系统socket资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101015",description:"用户被锁住",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120511",description:"远程开锁功能未打开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390024",description:"上层填充的StreamSsnId不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101021",description:"验证参数异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120600",description:"临时密码数已达上限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390025",description:"链接服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101026",description:"邮箱已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120601",description:"添加临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390026",description:"客户端请求未收到服务端应答",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101031",description:"邮箱未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120602",description:"删除临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390027",description:"链路断开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101032",description:"邮箱不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120603",description:"该临时密码不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390028",description:"没有取流链接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101041",description:"获取验证码过于频繁",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120604",description:"指纹锁射频通信失败,请稍后再试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390029",description:"流成功停止",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101043",description:"手机验证码输入错误超过规定次数",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120605",description:"其他用户正在认证中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390030",description:"客户端防串流校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102000",description:"设备不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120606",description:"验证已启动,请在120s内进行本地验证和调用添加设备接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390031",description:"应用层tcp粘包处理缓冲区满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102001",description:"摄像机不存在",solution:"摄像机未注册到萤石云平台,请仔细检查摄像机的网络配置,确保连接到网络",updateTime:152203484e4},{moduleCode:"",detailCode:"120607",description:"删除用户失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390032",description:"无效状态迁移",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102003",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"120608",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390033",description:"无效客户端状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102004",description:"设备异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390034",description:"向vtm取流流媒体信息请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102007",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120610",description:"获取临时密码列表失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390035",description:"向代理取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102009",description:"设备请求响应超时异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130001",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390036",description:"向代理保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105000",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130002",description:"手机号码已经注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390037",description:"向vtdu取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105001",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130003",description:"手机验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390038",description:"向vtdu保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105002",description:"设备验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130004",description:"终端绑定操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391001",description:"vtm地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107001",description:"邀请不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"149999",description:"数据异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391002",description:"vtm生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107002",description:"邀请验证失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"150000",description:"服务器异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391003",description:"vtm设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107003",description:"邀请用户不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160000",description:"设备不支持云台控制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391004",description:"vtm设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107004",description:"云存储连接失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160001",description:"用户无云台控制权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391005",description:"vtm解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"7005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160002",description:"设备云台旋转达到上限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391006",description:"vtm描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107006",description:"不能邀请自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160003",description:"设备云台旋转达到下限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391007",description:"vtm文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107007",description:"重复邀请",solution:"分享和删除分享必须全部由接口形式操作,如果与萤石客户端混用会造成这个问题,解决办法:在萤石客户端清空所有相关分享数据并重新添加设备,再通过接口操作即可",updateTime:152203484e4},{moduleCode:"",detailCode:"160004",description:"设备云台旋转达到左限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391008",description:"vtm网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110001",description:"参数错误",solution:"参数为空或者格式不对",updateTime:152203484e4},{moduleCode:"",detailCode:"160005",description:"设备云台旋转达到右限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391009",description:"vtm描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110002",description:"accessToken异常或过期",solution:"accessToken有效期为七天,建议在accessToken即将过期或者出现10002错误码的时候重新获取accessToken",updateTime:152203484e4},{moduleCode:"",detailCode:"160006",description:"云台当前操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391101",description:"proxy地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110004",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160007",description:"预置点个数超过最大值",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391102",description:"proxy生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110005",description:"appKey异常",solution:"确认appKey状态,不通过或者冻结状态会返回该错误码",updateTime:152203484e4},{moduleCode:"",detailCode:"160009",description:"正在调用预置点",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391103",description:"proxy设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110006",description:"ip受限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160010",description:"该预置点已经是当前位置",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391104",description:"proxy设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160011",description:"预置点不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391105",description:"proxy解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110008",description:"签名错误",solution:"①获取签名方式详见apidemo及[旧]API文档 ②注意编码格式为UTF-8",updateTime:152203484e4},{moduleCode:"",detailCode:"160013",description:"设备版本已是最新",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391106",description:"proxy描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110009",description:"签名参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160014",description:"设备正在升级",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391107",description:"proxy文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110010",description:"签名超时",solution:"请调用同步服务器时间接口进行校时",updateTime:152203484e4},{moduleCode:"",detailCode:"160015",description:"设备正在重启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391108",description:"proxy网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110011",description:"未开通萤石云服务",solution:"参照绑定流程",updateTime:152203484e4},{moduleCode:"",detailCode:"160016",description:"加密未开启,无须关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391109",description:"proxy描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110012",description:"第三方账户与萤石账号已经绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160017",description:"设备抓图失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391201",description:"vtdu地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110013",description:"应用没有权限调用此接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160018",description:"设备升级失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391202",description:"vtdu生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110014",description:"APPKEY下对应的第三方userId和phone未绑定",solution:"获取AccessToken时所用appKey与SDK所用appKey不一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160019",description:"加密已开启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391203",description:"vtdu设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110017",description:"appKey不存在",solution:"请填写在官网申请的应用秘钥",updateTime:152203484e4},{moduleCode:"",detailCode:"160020",description:"不支持该命令",solution:"请确认设备是否支持该命令",updateTime:152203484e4},{moduleCode:"",detailCode:"391204",description:"vtdu设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110018",description:"AccessToken与Appkey不匹配",solution:"请检查获取accessToken对应的appKey和SDK中设置的appKey是否一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160023",description:"订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110019",description:"密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160024",description:"取消订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110020",description:"请求方法为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160025",description:"客流统计配置失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110021",description:"ticket校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110022",description:"透传目的地非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160027",description:"设备正在镜像操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110024",description:"无透传权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160028",description:"设备正在键控动作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110025",description:"appKey被禁止使用通明通道",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160029",description:"设备处于语音对讲状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160030",description:"卡密输入错误次数过多,24小时后再输入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160031",description:"卡密信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160032",description:"卡密状态不对或已过期",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160033",description:"卡密非卖品,只能开通对应的绑定设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110030",description:"appKey和appSecret不匹配",solution:"请检查appKey和appSecret是否对应",updateTime:152203484e4},{moduleCode:"",detailCode:"160035",description:"购买云存储服务失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110031",description:"子账户或萤石用户没有权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160040",description:"添加的设备不在同一局域网",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110032",description:"子账户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110033",description:"子账户未设置授权策略",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160042",description:"添加的设备密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110034",description:"子账户已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160043",description:"添加的设备超出最大数量",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110035",description:"获取子账户AccessToken异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160044",description:"添加的设备网络不可达超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110036",description:"子账户被禁用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110051",description:"无权限进行抓图",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160047",description:"码流类型不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120002",description:"设备不存在",solution:"①设备没有注册到萤石云平台,请检查下设备网络参数,确保能正常连接网络②设备序列号不存在",updateTime:152203484e4},{moduleCode:"",detailCode:"160048",description:"带宽超出系统接入带宽",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120003",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160049",description:"IP或者端口不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120004",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160050",description:"添加的设备版本不支持需要升级才能接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120005",description:"安全认证失败,需进行SDK安全认证",solution:"已去掉安全验证",updateTime:152203484e4},{moduleCode:"",detailCode:"160051",description:"添加的设备不支持接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120006",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160052",description:"添加的设备通道号出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120007",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"160053",description:"添加的设备分辨率不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120008",description:"设备响应超时",solution:"设备响应超时,请检测设备网络或重试",updateTime:152203484e4},{moduleCode:"",detailCode:"160054",description:"添加的设备账号被锁定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120009",description:"子账号不能添加设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160055",description:"添加的设备取码流出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120010",description:"设备验证码错误",solution:"验证码在设备标签上,六位大写字母,注意大小写",updateTime:152203484e4},{moduleCode:"",detailCode:"160056",description:"删除设备失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120012",description:"设备添加失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160057",description:"删除的设备未关联",solution:"检查IPC与NVR是否有关联关系",updateTime:152203484e4},{moduleCode:"",detailCode:"120013",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160060",description:"地址未绑定",solution:"请前往官网设置直播",updateTime:152203484e4},{moduleCode:"",detailCode:"120014",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120015",description:"设备不支持该功能",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160062",description:"该通道直播已开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120016",description:"当前设备正在格式化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160063",description:"直播未使用或直播已关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120017",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160070",description:"设备不能转移给自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120018",description:"该用户不拥有该设备",solution:"确认设备是否属于用户",updateTime:152203484e4},{moduleCode:"",detailCode:"160071",description:"设备不能转移,设备与其他设备存在关联关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400001",description:"参数为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120019",description:"设备不支持云存储服务",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160072",description:"设备不能转移,通道被分享给其他用户或者分享到视频广场",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400002",description:"参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120020",description:"设备在线,被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160073",description:"云存储转移失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400025",description:"设备不支持对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120021",description:"设备在线,但是未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160080",description:"当前正在声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400029",description:"没有初始化或资源被释放",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120022",description:"设备在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160081",description:"当前正在轨迹巡航",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400030",description:"json解析异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120023",description:"设备不在线,未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160082",description:"设备正在响应本次声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400031",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120024",description:"设备不在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160083",description:"当前正在开启隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400032",description:"设备信息异常为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120025",description:"重复申请分享",solution:"确认设备是否由添加过该设备且申请过分享的账户下是否还存在分享记录",updateTime:152203484e4},{moduleCode:"",detailCode:"160084",description:"当前正在关闭隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400034",description:"取流超时",solution:"一般是由于网络状况不好导致,可以尝试下让用户重新播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120026",description:"视频广场不存在该视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"380290",description:" 连接CAS服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400035",description:"设备已加密,需要输入验证码",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120027",description:"视频转码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361001",description:"对讲服务端排队超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400036",description:"播放验证码错误",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120028",description:"设备固件升级包不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361002",description:"对讲服务端处理超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400037",description:"surfacehold错误",solution:"请检查是否是播放之前销毁了surface,收到此错误也可以重新建立surface后播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120029",description:"设备不在线,但是已经被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361003",description:"设备链接对讲服务器超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400100",description:"未知错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120030",description:"该用户不拥有该视频广场视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361004",description:"服务器内部错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400200",description:"player sdk出错,这种错误一般开发者也是无法解决,不具体分类传出,传一个统一的inner错误码出去",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120031",description:"开启终端绑定,硬件特征码验证失败",solution:"请在萤石客户端关闭终端绑定,参考此步骤",updateTime:152203484e4},{moduleCode:"",detailCode:"361005",description:"解析消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400300",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120032",description:"该用户下通道不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361006",description:"请求重定向--需要向其他服务申请对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400901",description:"设备不在线,可以提示用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120033",description:"无法收藏自己分享的视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361007",description:"请求url非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400902",description:"accesstoken异常或失效,需要重新获取accesstoken,并传入到sdk",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120034",description:"该用户下无设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361008",description:"token失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400903",description:"当前账号开启了终端绑定,只允许指定设备登录操作,提示用户登录i.ys7.com解除终端绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120090",description:"用户反馈失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361009",description:"设备验证码或者通信秘钥不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400904",description:"设备正在对讲中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120095",description:"APP包下载失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361010",description:"设备已经在对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400905",description:"设备开启了隐私保护,不允许预览、对讲等",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120096",description:"APP包信息删除失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361011",description:"设备10s响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120101",description:"视频不支持分享给本人",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361012",description:"设备不在线",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320002",description:"参数无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120102",description:"无相应邀请信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361013",description:"设备开启隐私保护拒绝对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320003",description:"暂不支持此操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120103",description:"好友已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361014",description:"token无权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320004",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120104",description:"好友不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361015",description:"设备返回session不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320005",description:"创建CAS session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120105",description:"好友状态错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361016",description:"验证token其他异常错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320006",description:"创建cloud session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120106",description:"对应群组不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361017",description:"服务端监听设备建立端口超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320007",description:"token失效",solution:"重新设置token后再重试",updateTime:152203484e4},{moduleCode:"",detailCode:"120107",description:"不能添加自己为好友",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361018",description:"设备链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320008",description:"token池里面没有token,请传入token",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361019",description:"对讲服务端不支持的信令消息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320009",description:"传入新的INIT_PARAM并reset(保留,目前未用)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120109",description:"对应分享不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361020",description:"对讲服务端解析对讲请求未携带会话描述能力集",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320010",description:"请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120110",description:"好友群组不属于当前用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361021",description:"对讲服务端优先能力集结果为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320011",description:"500毫秒后请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120111",description:"好友不是等待验证状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361022",description:"cas链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320012",description:"token池已满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120112",description:"添加应用下的用户为好友失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361023",description:"对讲服务端分配对讲会话资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320013",description:"P2P client超过限制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120201",description:"操作报警信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361024",description:"对讲服务端解析信令消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320014",description:"sdk未初始化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120202",description:"操作留言信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390001",description:"通用错误返回",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320015",description:"超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120301",description:"根据UUID查询报警消息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390002",description:"入参为空指针",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320016",description:"正在打洞中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120302",description:"根据UUID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390003",description:"入参值无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320017",description:"没有视频文件头(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120303",description:"根据FID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390004",description:"信令消息解析非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320018",description:"解码错误/超时(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120305",description:"设备ip解析错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390005",description:"内存资源不足",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320019",description:"取消(保留,用户不用处理)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120401",description:"用户云空间信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390006",description:"协议格式不对或者消息体长度超过STREAM_MAX_MSGBODY_LEN",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320020",description:"播放过程中预连接被用户清除预操作信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120402",description:"云空间操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390007",description:"设备序列号长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320021",description:"流加密码不对",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120403",description:"用户目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390008",description:"取流url长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320022",description:"未传入播放窗口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120404",description:"要操作的目标目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390009",description:"解析vtm返回vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"100200",description:"操作成功",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120405",description:"要删除的文件信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390010",description:"解析vtm返回级联vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101001",description:"用户名不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120406",description:"已开通云存储",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390011",description:"解析vtm返回会话标识长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101002",description:"用户名已被占用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120407",description:"开通记录失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390012",description:"vtdu返回流头长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101003",description:"密码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120500",description:"获取数据错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390013",description:"vtdu会话长度非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101004",description:"密码为同一字符",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120501",description:"开锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390014",description:"回调函数未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101006",description:"手机号码已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120502",description:"室内机未收到呼叫",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390015",description:"vtdu成功响应未携带会话标识",solution:"",updateTime:152203484e4}];var code="200";var msg$1="操作成功!";var errorCode={data:data$c,code:code,msg:msg$1};var Code=function(){function Code(x,y){_classCallCheck$1(this,Code);this.coreX=x;this.coreY=y;console.log("ErrorCode",errorCode)}_createClass$1(Code,[{key:"toString",value:function toString(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchErrorInfo",value:function matchErrorInfo(code){return errorCode.data.find(function(item){return item.detailCode.substr(-4)==code})}}]);return Code}();var header={color:"red",backgroundColor:"red",activeColor:"red",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-0",iconId:"deviceID",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"},{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-1",iconId:"deviceName",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]};var footer={color:"blue",backgroundColor:"blue",activeColor:"blue",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-footer-0",iconId:"play",part:"left",defaultActive:0,isrender:0,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]};var defaultTheme={header:header,footer:footer};var TimeLine$1=function TimeLine(jsPlugin){this.jsPlugin=jsPlugin;var status={isMouseDown:false,isOver:false,mousePosition:null,oldTime:null,nowTime:null,moved:null,hoverTime:"2018-12-07 12:00:00",hoverLeft:0,timeTipShow:false,randomNum:123,timeWidthTbls:[60,1800,3600,86400],timeUnits:["范围: 1分钟; 单位: 秒","范围: 30分钟; 单位: 分钟","范围: 1小时; 单位: 分钟","范围: 1天; 单位: 小时","范围: 3天; 单位: 小时"],drawPen:null,timeSection:[],canvasWidth:null,canvasHeight:null,timeTips:null};var _this=this;Object.keys(status).forEach(function(element){_this[element]=status[element]});this.options={width:this.canvasWidth,height:48,time:(new Date).getTime(),timeSection:[],timeWidth:0};TimeLine.prototype.subTime=function(time){if(time<10){return"0"+time}else{return time}};TimeLine.prototype.tranTime=function(time){var stringTime=time;if(time){var newDate=new Date(time);stringTime=newDate.getFullYear()+"/"+(newDate.getMonth()+1)+"/"+newDate.getDate()+" "+this.subTime(newDate.getHours())+":"+this.subTime(newDate.getMinutes())+":"+this.subTime(newDate.getSeconds())}return stringTime};TimeLine.prototype.init=function(params){var that=this;var opts=this.options;return new Promise(function(resolve,reject){if(params.width){document.getElementById(params.id).setAttribute("width",parseInt(params.width,10)+"px")}that.randomNum=(Math.random()+"").split(".").join("");that.timeWidthTblIndex=opts.timeWidth;var canvas=document.querySelector("#".concat(that.jsPlugin.id,"-canvas"));that.drawPen=canvas.getContext("2d");that.nowTime=opts.time||Date.now();that.timeSection=opts.timeSection||[];that.canvasWidth=canvas.offsetWidth;that.canvasHeight=canvas.offsetHeight;that.updata();document.getElementById("".concat(that.jsPlugin.id,"-canvas")).addEventListener("mousemove",function(e){if(that.options.readOnly){return}that.mousemove(e)});document.getElementById("".concat(that.jsPlugin.id,"-canvas")).addEventListener("mouseover",function(e){if(that.options.readOnly){return}that.mouseover(e)});document.getElementById("".concat(that.jsPlugin.id,"-canvas")).addEventListener("mouseleave",function(e){if(that.options.readOnly){return}that.mouseleave(e)});document.getElementById("".concat(that.jsPlugin.id,"-canvas")).addEventListener("mousedown",function(e){if(that.options.readOnly){return}that.mousedown(e)});document.getElementById("".concat(that.jsPlugin.id,"-canvas")).addEventListener("mouseup",function(e){if(that.options.readOnly){return}var callback=params.onChange;that.mouseUpFn(e,callback)});resolve()})};TimeLine.prototype.setWidth=function(params){var _this2=this;var that=this;if(params.width){document.getElementById(this.jsPlugin.id).style.width=params.width;document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=params.width;document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=params.width;that.canvasWidth=params.width;setTimeout(function(){_this2.updata({time:new Date})},500)}};TimeLine.prototype.mousemove=function(e){if(this.isMouseDown&&this.isOver){var mouseOffset=this.mousePosition-e.pageX;if(mouseOffset===0){return}var timeOffsetUnit=0;switch(this.timeWidth){case 60:timeOffsetUnit=1/10;break;case 1800:timeOffsetUnit=1/20*60;break;case 3600:timeOffsetUnit=1/20*60;break;case 86400:timeOffsetUnit=1/30*60*60;break}var currentTime=new Date(this.oldTime).getTime()+mouseOffset*timeOffsetUnit*1e3;this.updata({time:currentTime});this.moved=true}else{var left=parseInt(document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).offsetLeft,10);this.mousePosition=e.pageX-left;this.updata()}};TimeLine.prototype.mousedown=function(e){this.isMouseDown=true;this.mousePosition=e.pageX;this.oldTime=this.nowTime};TimeLine.prototype.mouseover=function(e){this.isOver=true};TimeLine.prototype.mouseleave=function(e){this.isOver=false;this.isMouseDown=false;this.updata()};TimeLine.prototype.changeSize=function(timeWidth){console.log("changeSize",timeWidth);this.options.timeWidth=timeWidth;this.updata({timeWidth:timeWidth})};TimeLine.prototype.mouseUpFn=function(e,callback){if(this.isMouseDown){this.isMouseDown=false;if(this.moved){this.moved=false;var newStringTime=this.subTime(new Date(this.nowTime).getHours())+":"+this.subTime(new Date(this.nowTime).getMinutes())+":"+this.subTime(new Date(this.nowTime).getSeconds());var oldStringTime=new Date(this.oldTime).getFullYear()+"/"+(new Date(this.oldTime).getMonth()+1)+"/"+new Date(this.oldTime).getDate();this.nowTime=new Date("".concat(oldStringTime," ").concat(newStringTime));this.updata({time:this.nowTime});this.oldTime=this.nowTime;console.log("nowTime",new Date(this.nowTime),"".concat(oldStringTime," ").concat(newStringTime));callback(this.nowTime)}}};TimeLine.prototype.readOnly=function(data){console.log("更改为只读");this.options.readOnly=true;document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="not-allowed"};TimeLine.prototype.unReadOnly=function(data){console.log("更改为只读");this.options.readOnly=false;document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="pointer"};TimeLine.prototype.run=function(data){if(!this.isMouseDown){this.updata(data)}};TimeLine.prototype.getTime=function(data){console.log("this",this);console.log("当前时间",new Date(this.nowTime))};TimeLine.prototype.updata=function(data){var that=this;data=data||{};that.nowTime=data.time||that.nowTime;that.timeSection=data.timeSection||that.timeSection;that.timeWidthTblIndex=data.timeWidth||that.timeWidthTblIndex;that.timeWidth=that.timeWidthTbls[data.timeWidth||that.timeWidthTblIndex];that.timeUnit=that.timeUnits[data.timeWidth||that.timeWidthTblIndex];if(data.timeWidth===0){that.timeWidthTblIndex=0;that.timeWidth=that.timeWidthTbls[0];that.timeUnit=that.timeUnits[0]}that.drawPen.fillStyle="#000000";that.drawPen.fillRect(0,0,that.canvasWidth,that.canvasHeight);that.drawScale();that.drawRecord();that.drawOtherMsg();if(document.getElementById("".concat(this.jsPlugin.id,"-canvas-container"))){document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=that.options.width+"px";document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.height=that.options.height+"px"}if(document.getElementById("".concat(this.jsPlugin.id,"-canvas"))){document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=that.options.width+"px";document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.height=that.options.height+"px"}};TimeLine.prototype.drawSolidLine=function(startX,startY,endX,endY,lineWidth,color){this.drawPen.save();this.drawPen.strokeStyle=color;this.drawPen.lineWidth=lineWidth;this.drawPen.beginPath();this.drawPen.moveTo(startX,startY);this.drawPen.lineTo(endX,endY);this.drawPen.stroke();this.drawPen.restore()};TimeLine.prototype.drawString=function(text,x,y,aling,color){this.drawPen.font="12px serif";this.drawPen.fillStyle="#ffffff";this.drawPen.textAlign=aling||"left";this.drawPen.fillText(text,x,y+10)};TimeLine.prototype.drawScale=function(){var that=this;var lineColor="rgba(255,255,255)";var startDate=new Date(that.nowTime);var startYears=startDate.getFullYear();var starSecond=startDate.getSeconds();var starMin=startDate.getMinutes();var startHours=startDate.getHours();var startDay=startDate.getDate();var curScale=0;switch(that.timeWidth){case 60:{var dotNum=parseInt(that.canvasWidth/10);startDate.setSeconds(startDate.getSeconds()-parseInt(dotNum/2,10));startDay=startDate.getDate();startHours=startDate.getHours();starMin=startDate.getMinutes();starSecond=startDate.getSeconds();for(var i=0;i<dotNum;i++){curScale=starSecond+i;startDate.setSeconds(curScale);if(curScale%10===0){that.drawSolidLine(i*that.canvasWidth/dotNum,8,i*that.canvasWidth/dotNum,that.canvasHeight/5+8,1,lineColor);var timeString=this.subTime(startDate.getHours())+":"+this.subTime(startDate.getMinutes())+":"+this.subTime(startDate.getSeconds());that.drawString(timeString,i*that.canvasWidth/dotNum,that.canvasHeight/5*2.5,"center","rgba(255,255,255,0.3)")}else{that.drawSolidLine(i*that.canvasWidth/dotNum,8,i*that.canvasWidth/dotNum,that.canvasHeight/5*.5+8,1,lineColor)}startDate.setDate(startDay);startDate.setHours(startHours);startDate.setMinutes(starMin)}break}case 1800:{var dotNum=parseInt(that.canvasWidth/20);startDate.setMinutes(startDate.getMinutes()-parseInt(dotNum/2,10));startHours=startDate.getHours();starMin=startDate.getMinutes();for(var i=0;i<=dotNum;i++){curScale=starMin+i;startDate.setMinutes(curScale);if(curScale%5===0){that.drawSolidLine(i*that.canvasWidth/dotNum,8,i*that.canvasWidth/dotNum,that.canvasHeight/5*1.5+8,1,lineColor);var timeString=this.subTime(startDate.getHours())+":"+this.subTime(startDate.getMinutes());that.drawString(timeString,i*that.canvasWidth/dotNum,that.canvasHeight/5*2.5,"center","rgba(255,255,255,0.3)")}else{that.drawSolidLine(i*that.canvasWidth/dotNum,8,i*that.canvasWidth/dotNum,that.canvasHeight/5*.5+8,1,lineColor)}startDate.setHours(startHours)}break}case 3600:{var dotNum=parseInt(that.canvasWidth/20);startDate.setMinutes(startDate.getMinutes()-parseInt(dotNum/2,10));startHours=startDate.getHours();starMin=startDate.getMinutes();for(var i=0;i<=dotNum;i++){curScale=starMin+i;startDate.setMinutes(curScale);if(curScale%10===0){that.drawSolidLine(i*that.canvasWidth/dotNum,8,i*that.canvasWidth/dotNum,that.canvasHeight/5*1.5+8,1,lineColor);var timeString=this.subTime(startDate.getHours())+":"+this.subTime(startDate.getMinutes());that.drawString(timeString,i*that.canvasWidth/dotNum,that.canvasHeight/5*2.5,"center","rgba(255,255,255,0.3)")}else{that.drawSolidLine(i*that.canvasWidth/dotNum,8,i*that.canvasWidth/dotNum,that.canvasHeight/5*.5+8,1,lineColor)}startDate.setHours(startHours)}break}case 86400:{var dotNum=parseInt(that.canvasWidth/30);startDate.setHours(startDate.getHours()-parseInt(dotNum/2,10));starSecond=startDate.getSeconds();starMin=startDate.getMinutes();startHours=startDate.getHours();startDay=startDate.getDate();startYears=startDate.getFullYear();for(var i=0;i<=dotNum;i++){curScale=startHours+i;startDate.setHours(curScale);var timeString;timeString=this.subTime(startDate.getHours())+":00";that.drawSolidLine(i*that.canvasWidth/dotNum,8,i*that.canvasWidth/dotNum,that.canvasHeight/5*.5+8,1,lineColor);if(curScale%2===0){that.drawString(timeString,i*that.canvasWidth/dotNum,that.canvasHeight/5*2,"center","rgba(255,255,255,0.3)")}startDate.setFullYear(startYears);startDate.setDate(startDay);startDate.setHours(startHours)}break}}};TimeLine.prototype.getRecord=function(timeArr,startTime,endTime){this.timeSection=timeArr;this.drawRecord()};TimeLine.prototype.drawRecord=function(){var timeArr=this.timeSection||[];var that=this;var drawPen=that.drawPen;for(var i=0;i<timeArr.length;i++){var startPosition=findPosition(timeArr[i].startTime);var endPosition=findPosition(timeArr[i].endTime);drawPen.fillStyle="#1890ff80";drawPen.fillRect(startPosition,0,endPosition-startPosition,48)}function findPosition(time){var scale=10;switch(that.timeWidth){case 60:scale=10;break;case 1800:scale=20/60;break;case 3600:scale=20/60;break;case 86400:scale=20/60/60;break}var nowTimePostion=that.canvasWidth/2;var position=nowTimePostion+(time-that.nowTime)/1e3*scale;if(position>that.canvasWidth){position=that.canvasWidth}if(position<=0){position=0}return position}};TimeLine.prototype.drawOtherMsg=function(){this.drawSolidLine(this.canvasWidth/2,0,this.canvasWidth/2,this.canvasHeight,2,"#1890FF");this.drawPen.shadowBlur=0;if(this.isOver&&!this.isMouseDown){this.mouseTime=this.mousePosition/this.canvasWidth*this.timeWidth*1e3+this.nowTime-this.timeWidth/2*1e3;this.mouseString=this.tranTime(this.mouseTime);this.hoverTime=this.mouseString;this.hoverLeft=this.mousePosition-60;this.timeTipShow=true}else{this.timeTipShow=false}}};var Rec=function(){function Rec(jSPlugin){_classCallCheck$1(this,Rec);this.jSPlugin=jSPlugin;if(!document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){return false}this.currentTimeWidth=0;this.date=new Date;this.datepickerVisible=false;this.seekTimer=null;this.disabled=false;this.isSeeking=false;this.seekFrequency=2e3;this.recList=[];this.lastDate=null;if(this.jSPlugin.params&&this.jSPlugin.params.seekFrequency){this.seekFrequency=this.jSPlugin.params.seekFrequency}this.recInit()}_createClass$1(Rec,[{key:"recInit",value:function recInit(){var _this2=this;if(!document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){return false}this.currentTimeWidth=0;var canvasItemWidth=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100;var canvasContainer=document.createElement("div");canvasContainer.style="display:inline-block;height:48px;";canvasContainer.id=this.jSPlugin.id+"-canvas-container";var canvasItem=document.createElement("canvas");canvasItem.id=this.jSPlugin.id+"-canvas";canvasItem.className="time-line-body";canvasItem.height="48";canvasItem.width=canvasItemWidth;canvasItem.style="display:inline-block;";canvasItem.innerHTML="该浏览器不支持canvas";canvasContainer.appendChild(canvasItem);insertAfter(canvasContainer,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")));var timeLineControlsContainer=document.createElement("div");timeLineControlsContainer.className="timeline-controls";timeLineControlsContainer.style="display:flex;width:100px;height:48px;text-align:center;line-height: 48px;vertical-align: top;background: #000000;";var timeLineControls='\n<div class="timeline-controls-scale" style="display: inline-flex;flex-direction: column;justify-content: center;vertical-align: top;padding: 0 20px;">\n  <span style="vertical-Align: middle;line-height: 14px;height: 18px; width: 18px;cursor:pointer;" id="'.concat(this.jSPlugin.id,'-timeline-scale-add">\n    <svg fill="#2C2C2C" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"\n      viewBox="0 0 20 20">\n      <title>add</title>\n      <g>\n        <polygon points="0.1,0.5 15,0.5 15,15.4 0.1,15.4 \t" />\n      </g>\n      <g>\n        <path\n          fill="#FFFFFF";\n          d="M7.6,12.4c-0.3,0-0.5-0.2-0.5-0.5v-8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v8C8.1,12.2,7.9,12.4,7.6,12.4z" />\n      </g>\n      <g>\n        <path\n          fill="#FFFFFF";\n          d="M11.6,8.4h-8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h8c0.3,0,0.5,0.2,0.5,0.5S11.8,8.4,11.6,8.4z" />\n      </g>\n    </svg>\n  </span>\n  <span style="vertical-Align: middle;line-height: 14px;height: 18px; width: 18px;cursor:pointer;" id="').concat(this.jSPlugin.id,'-timeline-scale-sub">\n    <svg fill="#2C2C2C" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"\n      viewBox="0 0 20 20">\n      <title>reduce</title>\n      <g>\n        <polygon class="st0" points="1,0.8 15.2,0.8 15.2,15 1,15 \t" />\n      </g>\n      <g>\n        <path class="st1"\n          fill="#FFFFFF";\n          d="M12.1,8.4h-8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h8c0.3,0,0.5,0.2,0.5,0.5S12.4,8.4,12.1,8.4z" />\n      </g>\n    </svg>\n  </span>\n</div>\n<label for="').concat(this.jSPlugin.id,'-datepicker">\n  <div class="timeline-controls-date">\n    <span>\n      <svg fill="#2C2C2C" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"\n        viewBox="0 0 20 20">\n        <title>ifttt</title>\n        <g id="Rectangle">\n          <rect x="0.6" y="0.9" class="st0" width="20" height="20" />\n        </g>\n        <g id="Stroke-1">\n          <path fill="#FFFFFF"; class="st1"\n            d="M14,7.2c-0.3,0-0.5-0.2-0.5-0.5V3.4c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v3.3C14.5,7,14.2,7.2,14,7.2z" />\n        </g>\n        <g id="Stroke-3">\n          <path fill="#FFFFFF"; class="st1"\n            d="M7.3,7.2C7,7.2,6.8,7,6.8,6.7V3.4c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v3.3C7.8,7,7.6,7.2,7.3,7.2z" />\n        </g>\n        <g id="Stroke-5">\n          <path fill="#FFFFFF"; class="st1"\n            d="M18.1,9.7h-15c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h15c0.3,0,0.5,0.2,0.5,0.5S18.4,9.7,18.1,9.7z" />\n        </g>\n        <g id="Stroke-7">\n          <path fill="#FFFFFF"; class="st1" d="M16.5,19.7H4.8c-1.2,0-2.2-1-2.2-2.2V6.7c0-1.2,1-2.2,2.2-2.2h11.7c1.2,0,2.2,1,2.2,2.2v10.8\nC18.6,18.8,17.7,19.7,16.5,19.7z M4.8,5.6c-0.6,0-1.2,0.5-1.2,1.2v10.8c0,0.6,0.5,1.2,1.2,1.2h11.7c0.6,0,1.2-0.5,1.2-1.2V6.7\nc0-0.6-0.5-1.2-1.2-1.2H4.8z" />\n        </g>\n        <g id="Stroke-9">\n          <path fill="#FFFFFF"; class="st1" d="M10.6,13.3c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5s0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7\nS11,13.3,10.6,13.3z" />\n        </g>\n        <g id="Stroke-11">\n          <path fill="#FFFFFF"; class="st1" d="M14.8,13.3c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2c0.4,0,0.7,0.3,0.7,0.7\nS15.2,13.3,14.8,13.3z M14.8,12.3c-0.2,0-0.3,0.1-0.3,0.3c0,0.2,0.3,0.4,0.5,0.2c0.1-0.1,0.1-0.1,0.1-0.2\nC15.1,12.4,15,12.3,14.8,12.3z" />\n        </g>\n        <g id="Stroke-13">\n          <path fill="#FFFFFF"; class="st1" d="M6.5,16.6c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7\nC7.2,16.3,6.9,16.6,6.5,16.6z" />\n        </g>\n        <g id="Stroke-15">\n          <path fill="#FFFFFF"; class="st1" d="M10.6,16.6c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7\nC11.4,16.3,11,16.6,10.6,16.6z" />\n        </g>\n      </svg>\n    </span>\n  </div>\n</label>\n<input autocomplete="off" data-toggle="').concat(this.jSPlugin.id,'-datepicker" id="').concat(this.jSPlugin.id,'-datepicker" name="').concat(this.jSPlugin.id,'-datepicker" style="opacity:0;width:24px;margin-left:-24px;cursor:pointer;" />\n');timeLineControlsContainer.innerHTML=timeLineControls;insertAfter(timeLineControlsContainer,canvasContainer);this.timeLine=new TimeLine$1(this.jSPlugin);var that=this;this.timeLine.init({id:this.jSPlugin.id+"-canvas",width:canvasItemWidth,onChange:function onChange(time){console.log("time",time,new Date(time).Format("yyyyMMddhhmmss"));var newBegin=new Date(time).Format("yyyyMMddhhmmss");console.log("----------------this.jSPlugin.url",_this2.jSPlugin.url);if(_this2.jSPlugin.Theme&&_this2.jSPlugin.Theme.decoderState.state.recordvideo){_this2.jSPlugin.Theme.setDecoderState({recordvideo:false});if(matchEzopenUrl(_this2.jSPlugin.url).type==="cloud.rec"){_this2.jSPlugin.stopSave()}}if(matchEzopenUrl(_this2.jSPlugin.url).type==="cloud.rec"){if(!_this2.isSeeking){if(that.recList.length>0){if(new Date(time).valueOf()>=that.lastDate){_this2.jSPlugin.pluginStatus.loadingSetText({text:"seek回放未找到录像片段",color:"red",delayClear:2e3})}else{_this2.unSyncTimeLine().then(function(){_this2.isSeeking=true;_this2.jSPlugin.pluginStatus.loadingStart(_this2.jSPlugin.id);_this2.jSPlugin.pluginStatus.setPlayStatus({loading:true});_this2.jSPlugin.pluginStatus.loadingSetText({text:"seek回放中,请稍后..."});_this2.jSPlugin.seek(newBegin.substr(8,6),"235959").then(function(){var timer=setInterval(function(){_this2.jSPlugin.getOSDTime().then(function(OSDdate){var tmpTime=new Date(time).valueOf()/1e3;console.log("seek时间同步:",OSDdate.data,tmpTime,OSDdate.data>=tmpTime);if(OSDdate.data>=tmpTime-2){_this2.isSeeking=false;_this2.syncTimeLine();clearInterval(timer);_this2.jSPlugin.pluginStatus.loadingStop(_this2.jSPlugin.id);_this2.jSPlugin.pluginStatus.setPlayStatus({loading:false});_this2.jSPlugin.pluginStatus.loadingClear()}})},1e3)})})}}}}else{var callback=function callback(){setTimeout(function(){_this2.disabled=false},_this2.seekFrequency)};var play=_this2.jSPlugin.Theme.decoderState.state.play;var localRecSeek=function localRecSeek(callback){_this2.disabled=true;if(play){_this2.unSyncTimeLine().then(function(){_this2.jSPlugin.pause(newBegin).then(function(){console.log("暂停成功");_this2.jSPlugin.resume(newBegin).then(function(data){console.log("恢复成功:",data);if(_this2.jSPlugin.Theme){_this2.jSPlugin.Theme.setDecoderState({play:true})}if(_this2.jSPlugin.Theme&&_this2.jSPlugin.Theme.decoderState.state.sound){_this2.jSPlugin.openSound()}if(callback){callback()}_this2.syncTimeLine()})["catch"](function(err){console.log("恢复失败",err)})})["catch"](function(){console.log("暂停失败");_this2.jSPlugin.resume(newBegin).then(function(data){console.log("恢复成功");if(_this2.jSPlugin.Theme){_this2.jSPlugin.Theme.setDecoderState({play:true})}if(callback){callback()}_this2.syncTimeLine()})["catch"](function(err){console.log("恢复失败",err)})})})}else{_this2.unSyncTimeLine().then(function(){_this2.jSPlugin.resume().then(function(){_this2.jSPlugin.pause(newBegin).then(function(){console.log("暂停成功");_this2.jSPlugin.resume(newBegin).then(function(data){if(_this2.jSPlugin.Theme){_this2.jSPlugin.Theme.setDecoderState({play:true})}if(_this2.jSPlugin.Theme&&_this2.jSPlugin.Theme.decoderState.state.sound){_this2.jSPlugin.openSound()}if(callback){callback()}_this2.syncTimeLine()})["catch"](function(err){console.log("恢复失败",err)})})["catch"](function(){console.log("暂停失败");_this2.jSPlugin.resume(newBegin).then(function(data){if(_this2.jSPlugin.Theme){_this2.jSPlugin.Theme.setDecoderState({play:true})}if(callback){callback()}_this2.syncTimeLine()})["catch"](function(err){console.log("恢复失败",err)})})})["catch"](function(error){_this2.jSPlugin.resume(newBegin).then(function(data){if(_this2.jSPlugin.Theme){_this2.jSPlugin.Theme.setDecoderState({play:true})}if(_this2.jSPlugin.Theme&&_this2.jSPlugin.Theme.decoderState.state.sound){_this2.jSPlugin.openSound()}if(callback){callback()}_this2.syncTimeLine()})["catch"](function(err){console.log("恢复失败",err)})})})}if(_this2.jSPlugin.Theme&&_this2.jSPlugin.Theme.decoderState&&_this2.jSPlugin.Theme.decoderState.state&&_this2.jSPlugin.Theme.decoderState.state.zoom){_this2.jSPlugin.Theme.setDecoderState({zoom:false});_this2.jSPlugin.Zoom.stopZoom()}};if(_this2.disabled){console.log("操作频繁,等待2秒后执行");if(_this2.seekTimer){clearTimeout(_this2.seekTimer)}_this2.seekTimer=setTimeout(function(){localRecSeek(callback)},_this2.seekFrequency)}else{localRecSeek(callback)}}}}).then(function(){_this2.syncTimeLine()});var _this=this;function injectJsCss(jSPlugin){var container=document.getElementById("".concat(jSPlugin.id,"-wrap"));addCss("".concat(jSPlugin.staticPath,"/rec/datepicker.min.css"));addJs("".concat(jSPlugin.staticPath,"/rec/jquery.min.js"),function(jSPlugin){addJs("".concat(jSPlugin.staticPath,"/rec/datepicker.js"),function(jSPlugin){addJs("".concat(jSPlugin.staticPath,"/rec/datepicker.zh-CN.js"),function(jSPlugin){var datepickerContainer=container.getElementsByClassName("datepicker-container")[0];if(!datepickerContainer&&$("#".concat(jSPlugin.id,"-datepicker")).datepicker){$("#".concat(jSPlugin.id,"-datepicker")).datepicker({autoShow:false,autoHide:true,autoPick:true,language:"zh-CN",date:new Date(getQueryString("begin",jSPlugin.params.url).replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"))||new Date,format:"yyyy-mm-dd",endDate:new Date,inline:true,container:container})}datepickerContainer=container.getElementsByClassName("datepicker-container")[0];if(datepickerContainer){datepickerContainer.style.display="none"}_this.datepickerVisible=false;$("#".concat(jSPlugin.id,"-datepicker")).on("pick.datepicker",function(e){console.log("重新选择日期",e.date,new Date(e.date).Format("yyyyMMdd"),new Date(document.getElementById("".concat(jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd"));if(e.date>new Date||new Date(e.date).Format("yyyyMMdd")===new Date(document.getElementById("".concat(jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd")){e.preventDefault()}else{document.getElementById("".concat(jSPlugin.id,"-datepicker")).value=new Date(e.date).Format("yyyy-MM-dd");_this.renderRec(e.date);if(jSPlugin.Theme.decoderState&&jSPlugin.Theme.decoderState.state){if(jSPlugin.Theme.decoderState.state.cloudRec){jSPlugin.changePlayUrl({begin:new Date(e.date).Format("yyyyMMdd"),type:"cloud.rec"},function(){},false)}else if(jSPlugin.Theme.decoderState.state.rec){jSPlugin.changePlayUrl({begin:new Date(e.date).Format("yyyyMMdd"),type:"rec"},function(){},false)}else{jSPlugin.changePlayUrl({begin:new Date(e.date).Format("yyyyMMdd")},function(){},false)}}else{jSPlugin.changePlayUrl({begin:new Date(e.date).Format("yyyyMMdd")},function(){},false)}}if(datepickerContainer){datepickerContainer.style.display="none"}_this.datepickerVisible=false;if(jSPlugin.Theme&&jSPlugin.Theme.decoderState&&jSPlugin.Theme.decoderState.state&&jSPlugin.Theme.decoderState.state.zoom){jSPlugin.Theme.setDecoderState({zoom:false});jSPlugin.Zoom.stopZoom()}});$("#".concat(jSPlugin.id,"-datepicker")).off("click").on("click",function(e){console.log("点击日期");if(!_this.datepickerVisible){if(datepickerContainer){datepickerContainer.style.display="inline"}}else{if(datepickerContainer){datepickerContainer.style.display="none"}}_this.datepickerVisible=!_this.datepickerVisible})},function(){},jSPlugin)},function(){},jSPlugin)},function(){},jSPlugin)}injectJsCss(_this.jSPlugin);document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-add")).onclick=function(){_this2.unSyncTimeLine().then(function(){var currentTimeWidth=_this2.currentTimeWidth;if(currentTimeWidth<3){_this2.timeLine.changeSize(++_this2.currentTimeWidth)}_this2.syncTimeLine()})};document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-sub")).onclick=function(){_this2.unSyncTimeLine().then(function(){var currentTimeWidth=_this2.currentTimeWidth;if(currentTimeWidth>0){_this2.timeLine.changeSize(--_this2.currentTimeWidth)}_this2.syncTimeLine()})};var initDate=getQueryString("begin",this.jSPlugin.url)||(new Date).Format("yyyyMMdd");this.renderRec("".concat(initDate.slice(0,4),"-").concat(initDate.slice(4,6),"-").concat(initDate.slice(6,8)));this.observer=new MutationObserver(function(mutations,observer){});var config={attributes:true,attributeOldValue:true,attributeFilter:["style"]};var el=document.getElementById("".concat(this.jSPlugin.id));this.observer.observe(el,config)}},{key:"setDatepickerDate",value:function setDatepickerDate(date){var container=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));var datepickerContainer=container.getElementsByClassName("datepicker-container")[0];if(datepickerContainer){var dom=datepickerContainer;var parentNode=dom.parentNode;parentNode.removeChild(dom);document.getElementById("".concat(this.jSPlugin.id,"-datepicker")).value=date.replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3");$("#".concat(this.jSPlugin.id,"-datepicker")).datepicker({autoShow:false,autoHide:true,autoPick:true,language:"zh-CN",defaultDate:date,format:"yyyy-mm-dd",endDate:new Date,inline:true,container:document.getElementById("".concat(this.jSPlugin.id,"-wrap"))})}}},{key:"datepickerHide",value:function datepickerHide(){var container=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));var datepickerContainer=container.getElementsByClassName("datepicker-container")[0];if(container){datepickerContainer.style.display="none"}this.datepickerVisible=false}},{key:"datepickerShow",value:function datepickerShow(){var container=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));var datepickerContainer=container.getElementsByClassName("datepicker-container")[0];if(container){datepickerContainer.style.display="inline"}this.datepickerVisible=true}},{key:"recAutoSize",value:function recAutoSize(callback){var _this3=this;if(document.getElementById("".concat(this.jSPlugin.id,"-canvas"))){var canvasItemWidth=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100;if(canvasItemWidth!==parseInt(document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width)){document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width=canvasItemWidth;this.timeLine.init({id:"".concat(this.jSPlugin.id,"-canvas"),width:canvasItemWidth,onChange:function onChange(time){console.log("time",time,new Date(time).Format("yyyyMMddhhmmss"));var newBegin=new Date(time).Format("yyyyMMddhhmmss");_this3.jSPlugin.changePlayUrl({begin:newBegin},function(){},false)}}).then(function(){var dateStart=new Date(new Date(_this3.date).Format("yyyy-MM-dd 00:00:00").replace(/-/g,"/")).getTime();var dateEnd=new Date(new Date(_this3.date).Format("yyyy-MM-dd 23:59:59").replace(/-/g,"/")).getTime();_this3.timeLine.getRecord([],dateStart,dateEnd);_this3.timeLine.setWidth({id:"".concat(_this3.jSPlugin.id,"-canvas"),width:canvasItemWidth});_this3.timeLine.getRecord(_this3.recList,dateStart,dateEnd);_this3.syncTimeLine();callback&&callback()})}}}},{key:"syncTimeLine",value:function syncTimeLine(){if(this.jSPlugin.recTimer){clearInterval(this.jSPlugin.recTimer)}var that=this;this.jSPlugin.recTimer=setInterval(function(){var getOSDTimePromise=that.jSPlugin.getOSDTime();getOSDTimePromise.then(function(data){var v=data.data;if(v===-1){console.log("获取播放时间错误")}else{if(v>0){var time=new Date(v>1e12?v:v*1e3);that.timeLine.run({time:time})}}})["catch"](function(err){var pauseDate=that.jSPlugin.Theme.decoderState.state.pauseDate;that.timeLine.run({time:that.timeLine.nowTime||pauseDate})})},1e3)}},{key:"unSyncTimeLine",value:function unSyncTimeLine(){var that=this;return new Promise(function(resolve,reject){if(that.jSPlugin.recTimer){clearInterval(that.jSPlugin.recTimer);that.jSPlugin.recTimer=null}resolve()})}},{key:"renderRec",value:function renderRec(date){var _this4=this;this.date=date;var that=this;var dateStart=new Date(new Date(date).Format("yyyy-MM-dd 00:00:00").replace(/-/g,"/")).getTime();var dateEnd=new Date(new Date(date).Format("yyyy-MM-dd 23:59:59").replace(/-/g,"/")).getTime();this.timeLine.getRecord([],dateStart,dateEnd);console.log("-----------233---------this.jSPlugin.url",this.jSPlugin.url);var recSliceParams={accessToken:this.jSPlugin.accessToken,recType:matchEzopenUrl(this.jSPlugin.url).type==="cloud.rec"?1:2,deviceSerial:matchEzopenUrl(this.jSPlugin.url).deviceSerial,channelNo:matchEzopenUrl(this.jSPlugin.url).channelNo,startTime:dateStart,endTime:dateEnd,version:"2.0"};var recAPISuccess=function recAPISuccess(data){if(data.data&&data.data.files&&data.data.files.length>0){var dataArr=data.data.files;var nextFileTime=(new Date).getTime();var isAll=data.data.isAll;that.recList=dataArr;that.lastDate=dataArr[dataArr.length-1].endTime;if(isAll){_this4.timeLine.getRecord(dataArr,dateStart,dateEnd)}else{var recTransaction=function recTransaction(){function recAPIV2Success(data){if(data.data&&data.data.files&&data.data.files.length>0){if(data.data.isAll==false){if(data.data.files){dataArr=dataArr.concat(data.data.files);that.recList=dataArr;that.lastDate=dataArr[dataArr.length-1].endTime}nextFileTime=data.data.nextFileTime>0?data.data.nextFileTime:(new Date).getTime();recTransaction()}else{console.log("云存储执行渲染片段");that.timeLine.getRecord(dataArr,dateStart,dateEnd)}}else{that.timeLine.getRecord(dataArr,dateStart,dateEnd)}}recSliceParams.startTime=nextFileTime;request(this.jSPlugin.env.domain+"/api/lapp/video/by/time","POST",recSliceParams,"",recAPIV2Success)};recTransaction()}_this4.timeLine.run({time:new Date(dateStart)})}else if(data.data&&data.data.length>0){console.log("获取本地录像片段成功",data);that.recList=data.data;that.lastDate=data.data[data.data.length-1].endTime;that.timeLine.getRecord(data.data,dateStart,dateEnd);that.timeLine.run({time:new Date(dateStart)})}else;};var recAPIUrl=this.jSPlugin.env.domain+"/api/lapp/video/by/time";request(recAPIUrl,"POST",recSliceParams,"",recAPISuccess)}}]);return Rec}();var TimeLine=function TimeLine(params){console.log("执行TimeLine - params",params);this.state={id:params.id,start:"00:00:00",end:"24:00:00",current:0,timelag:30,timeArr:[],availTimeLine:[],scrollTop:0,index:0,date:"",noTimeLineTxt:"",disabled:false};var _this=this;this.setState=function(obj){Object.keys(obj).forEach(function(key){_this.state[key]=obj[key];if(key==="scrollTop"){document.getElementById("time-line-item").parentNode.scrollTo(0,obj[key])}if(key==="current"){document.getElementById("time-line-current").innerHTML=obj[key]}})};this.setDisabled=function(value){this.setState({disabled:value});document.getElementById("time-line-item").parentNode.style.overflowY=value?"hidden":"scroll"};this.timeToSecond=function(time){var e=time.split(":");var h=Number(e[0]);var m=Number(e[1]);var s=Number(e[2]);return h*60*60+m*60+(s?s:0)};this.minuteToTime=function(minute){var hour=Math.floor(minute/60);var m=minute%60;return(hour>9?hour:"0"+hour)+":"+(m>9?m:"0"+m)};this.timeToMinute=function(time){var e=time.split(":");var h=Number(e[0]);var m=Number(e[1]);return h*60+m};this.getPlayParam=params.getPlayParam;this.checkIsAppleDevice=function(){var u=navigator.userAgent;var ios=!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);var iPad=u.indexOf("iPad")>-1;var iPhone=u.indexOf("iPhone")>-1||u.indexOf("Mac")>-1;if(ios||iPad||iPhone){return true}else{return false}};this.checkIsHarmonyOS=function(){var u=navigator.userAgent;if(u.indexOf("ohos")>-1){return true}else{return false}};if(this.checkIsHarmonyOS()){document.getElementById("time-line-item").parentNode.addEventListener("touchstart",function(){if(_this.state.disabled){return false}params.ontouchstart()},false);document.getElementById("time-line-item").parentNode.addEventListener("touchmove",function(){if(_this.state.disabled){return false}params.ontouchmove()},false);document.getElementById("time-line-item").parentNode.addEventListener("touchend",function(){if(_this.state.disabled){return false}var timer;var scollPromise=new Promise(function(resolve,reject){var preTop=-1;timer=setInterval(function(){var reactTop=document.getElementById("time-line-item").parentNode.scrollTop;if(reactTop!==preTop){console.log("scolling",reactTop,preTop);preTop=reactTop}else{console.log("scoll stop",reactTop,preTop);clearInterval(timer);resolve(reactTop)}},100)});scollPromise.then(function(reactTop){console.log("scollPromise: then",reactTop,_this);_this.rectTopTotime(reactTop);console.log("页面滚动实际高度",reactTop,_this.state);_this.getPlayParam({current:_this.state.current})});params.ontouchend()},false)}else{document.getElementById("time-line-item").parentNode.ontouchstart=function(){if(_this.state.disabled){return false}params.ontouchstart()};document.getElementById("time-line-item").parentNode.ontouchmove=function(){if(_this.state.disabled){return false}params.ontouchmove()};document.getElementById("time-line-item").parentNode.ontouchend=function(){if(_this.state.disabled){return false}var timer;var scollPromise=new Promise(function(resolve,reject){var preTop=-1;timer=setInterval(function(){var reactTop=document.getElementById("time-line-item").parentNode.scrollTop;if(reactTop!==preTop){console.log("scolling",reactTop,preTop);preTop=reactTop}else{console.log("scoll stop",reactTop,preTop);clearInterval(timer);resolve(reactTop)}},100)});scollPromise.then(function(reactTop){console.log("scollPromise: then",reactTop,_this);_this.rectTopTotime(reactTop);console.log("页面滚动实际高度",reactTop,_this.state);_this.getPlayParam({current:_this.state.current})});params.ontouchend()}}this.matchTimeDot()};TimeLine.prototype.changeScale=function(value){this.setState({timelag:value});this.matchTimeDot()};TimeLine.prototype.setDateLine=function(news,defaultIndex){if(news.length>0){if(typeof defaultIndex==="undefined"){defaultIndex=news.length-1}this.setState({availTimeLine:news,start:news[defaultIndex].st,end:news[defaultIndex].et,current:news[defaultIndex].st});console.log("this.state",this.state);this.matchRecTimeDot();this.primaryOffsetH()}else{this.setState({availTimeLine:[]});console.log("this.state",this.state);this.matchRecTimeDot()}};TimeLine.prototype.matchTimeDot=function(){var _this$state=this.state,start=_this$state.start,end=_this$state.end,timelag=_this$state.timelag;_this$state.availTimeLine;console.log("start",start,"end",end);var timeArr=[];var minute=this.timeToMinute(end);minute=Math.floor(minute/timelag)*timelag;for(var i=minute;i>=0;){var marginTop=0;var marginBottom=0;var recArr=[];if(i==minute){marginTop=70}if(i==0){marginBottom=230}var time=this.minuteToTime(i);timeArr.push({id:i,current:time,label:"a"+i,marginTop:marginTop,marginBottom:marginBottom,recArr:recArr});i=i-timelag}this.setState({timeArr:timeArr});this.renderDateLine()};TimeLine.prototype.matchRecTimeDot=function(){var _this$state2=this.state,start=_this$state2.start,end=_this$state2.end,timelag=_this$state2.timelag,availTimeLine=_this$state2.availTimeLine,timeArr=_this$state2.timeArr;console.log("start",start,"end",end);var availArr=[];var len=availTimeLine.length;if(len===0){for(var j=0;j<timeArr.length;j++){timeArr[j].recArr=[]}}else{for(var k=0;k<timeArr.length;k++){timeArr[k].recArr=[]}for(var i=0;i<len;i++){var temp=availTimeLine[i];var st=this.timeToSecond(temp.st);var et=this.timeToSecond(temp.et);var stminute=void 0;var etminute=void 0;var stAvailPercent=0;var etAvailPercent=0;stminute=Math.floor(st/(timelag*60))*timelag;stAvailPercent=(st-stminute*60)/timelag;etminute=Math.floor(et/(timelag*60))*timelag;etAvailPercent=(et-etminute*60)/timelag;availArr[i]={st:stminute,et:etminute,stAvailPercent:stAvailPercent,etAvailPercent:etAvailPercent};for(var j=0;j<timeArr.length;j++){if(timeArr[j].id==stminute&&timeArr[j].id==etminute){var height=etAvailPercent-stAvailPercent;var top=60-etAvailPercent;timeArr[j].recArr.push({height:height,top:top})}else{if(timeArr[j].id==stminute){timeArr[j].recArr.push({height:60-stAvailPercent,top:0})}else if(timeArr[j].id==etminute){timeArr[j].recArr.push({height:etAvailPercent,top:60-etAvailPercent})}else if(timeArr[j].id>stminute&&timeArr[j].id<etminute){timeArr[j].recArr.push({height:60,top:0})}}}}}console.log("availArr: ",availArr);this.setState({timeArr:timeArr});console.log("timeArr:",this.state);this.renderDateLine()};TimeLine.prototype.renderDateLine=function(){var _this$state3=this.state,id=_this$state3.id,timeArr=_this$state3.timeArr;console.log("id,timeArr",id,timeArr);var container=document.getElementById("time-line-item");container.innerHTML="";timeArr.forEach(function(item,index){var timeItemDOM=document.createElement("div");timeItemDOM.setAttribute("class","time-item");timeItemDOM.style="margin-top: ".concat(item.marginTop,"px; margin-bottom: ").concat(item.marginBottom,"px; border-right-color: ").concat(item.borderColor,";");var scaleDOM=document.createElement("div");scaleDOM.setAttribute("class","scale");var timeItemHtml='<div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale" style="width:10px"></div>';item.recArr.forEach(function(i,j){timeItemHtml+='<div class="item-unavail" style="height: '.concat(i.height,"px;background-color:#A8B9ED; top: ").concat(i.top,'px"></div>')});timeItemHtml+="<div id=".concat(item.label,' style="position: relative; top: 51px; left: 40%"> ').concat(item.current,"</div>");timeItemDOM.innerHTML=timeItemHtml;container.appendChild(timeItemDOM)})};TimeLine.prototype.primaryOffsetH=function(){var _this$state4=this.state,start=_this$state4.start,timelag=_this$state4.timelag,timeArr=_this$state4.timeArr;var currentItem=timeArr[0].current;var currentTime=this.timeToSecond(currentItem);var startSecond=this.timeToSecond(start);var offsetS=currentTime-startSecond;var offsetH=Math.ceil(offsetS/timelag)+60;this.setState({scrollTop:offsetH});console.log("起始偏移量",offsetH)};TimeLine.prototype.currentOffsetH=function(){var _this$state5=this.state,current=_this$state5.current,timelag=_this$state5.timelag,timeArr=_this$state5.timeArr;var startItem=timeArr[0].current;var startSecond=this.timeToSecond(startItem);var currentSecond=this.timeToSecond(current);var offsetS=startSecond-currentSecond;var offsetH=Math.ceil(offsetS/timelag)+60;this.setState({scrollTop:offsetH})};TimeLine.prototype.rectTopTotime=function(reactTop){var timelag=this.state.timelag;var index=Math.floor(reactTop/60);var offsetH=reactTop-index*60;var current;var offsetSecond;console.log("index:",index,"offsetH:",offsetH);if(offsetH==0){current=this.state.timeArr[index-1].current;offsetSecond=0}else{var time=this.state.timeArr[index].current;var minute=this.timeToMinute(time);var offsetY=60-offsetH;var offsetS=offsetY*timelag;var offsetM=Math.floor(offsetS/60)+minute;var second=Math.floor(offsetS/60)*60;offsetSecond=Math.ceil(offsetS-second);current=this.minuteToTime(offsetM)}this.setState({current:current+":"+(offsetSecond>9?offsetSecond:"0"+offsetSecond),scrollTop:reactTop})};TimeLine.prototype.stepScrollTimeLine=function(time){this.setState({current:time});this.currentOffsetH()};TimeLine.prototype.secondCountDown=function(time){var current=this.state.current;var temp=current.split(":");var hour=Number(temp[0]);var minute=Number(temp[1]);var second=Number(temp[2]);var t=hour*60*60+minute*60+second+1;var h=Math.floor(t/3600);var m=Math.floor((t-h*3600)/60);var s=t-h*3600-m*60;this.setState({current:(h>9?h:"0"+h)+":"+(m>9?m:"0"+m)+":"+(s>9?s:"0"+s)})};var MobileTimeLine=TimeLine;Date.prototype.Format=function(fmt){var o={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};if(/(y+)/.test(fmt)){fmt=fmt.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))}for(var k in o){if(new RegExp("("+k+")").test(fmt))fmt=fmt.replace(RegExp.$1,RegExp.$1.length==1?o[k]:("00"+o[k]).substr((""+o[k]).length))}return fmt};function format(now){var time=new Date(now);var h=time.getHours();var m=time.getMinutes();var s=time.getSeconds();return(h>9?h:"0"+h)+":"+(m>9?m:"0"+m)+":"+(s>9?s:"0"+s)}var MobileRec=function(){function MobileRec(jSPlugin,changeRecSpeed,resetMobileZoomStatus){var _this=this;_classCallCheck$1(this,MobileRec);this.changeRecSpeed=changeRecSpeed;this.resetMobileZoomStatus=resetMobileZoomStatus;this.isMobile=true;this.jSPlugin=jSPlugin;this.date=(new Date).Format("yyyy-MM-dd");this.begin=((new Date).Format("yyyy-MM-dd")+" 00:00:00").replace(/-/g,"/");this.end=((new Date).Format("yyyy-MM-dd")+" 23:59:59").replace(/-/g,"/");this.initBegin=null;this.initEnd=null;this.type=matchEzopenUrl(this.jSPlugin.url).type;this.operating=false;this.seekTimer=null;this.disabled=false;this.seekFrequency=2e3;this.recList=[];this.isSeeking=false;if(this.jSPlugin.params&&this.jSPlugin.params.seekFrequency){this.seekFrequency=this.jSPlugin.params.seekFrequency}var oS=document.createElement("style");oS.innerHTML='\n    body{\n      padding: 0;\n      margin: 0;\n    }\n    .time-line-container {\n      text-align: left;\n      height: 300px;\n      /* outline: 1px solid red; */\n      /* background: gray; */\n      position: relative;\n      /* padding-top: 60px; */\n      margin-top: 20px;\n    }\n\n    .time-line-container .time-line-item-container {\n      display: inline-block;\n      /* height: 400px; */\n      width: 30%;\n      /* background: indianred; */\n      overflow-y: scroll;\n      overflow-x: hidden;\n      /* padding-top: 60px; */\n      height: 300px;\n      box-sizing: border-box;\n      white-space: nowrap;\n      position: relative;\n    }\n\n    .time-line-container .time-line-item-container::-webkit-scrollbar {\n      width: 0px;\n      /*滚动条宽度*/\n      height: 0px;\n      /*滚动条高度*/\n    }\n\n    .time-line-item .time-item {\n      position: relative;\n      box-sizing: border-box;\n      height: 60px;\n      font-size: 12px;\n      color: rgb(150, 150, 150);\n      border-right: 6px solid;\n      border-right-color: #ddd;\n    }\n\n    .time-line-item .time-item .scale {\n      width: 6px;\n      height: 9px;\n      border-bottom: 1px solid #ccc;\n      float: right;\n      clear: both;\n    }\n\n    .time-line-item .time-item .item-unavail {\n      width: 6px;\n      position: absolute;\n      left: 100%;\n      background-color: #ddd;\n    }\n\n    .time-line-container .current-time {\n      position: absolute;\n      left: 0;\n      top: 40px;\n      height: 29px;\n      /* line-height: 58px; */\n      border-bottom: 1px solid #648FFC;\n      width: 60%;\n      margin-left: 26%;\n    }\n\n    .time-line-container .current-time .current-time-bg {\n      position: relative;\n      top: 15px;\n      width: 100px;\n      height: 29px;\n      line-height: 29px;\n      left: -70px;\n      font-size: 12px;\n      color: #2C2C2C;\n    }\n\n    .time-line-container .current-time .current-time-bg::before {\n      content: \'\';\n      display: inline-block;\n      width: 6px;\n      height: 6px;\n      border-radius: 100%;\n      background: #648FFC;\n      top: 11px;\n      position: absolute;\n      right: 30px;\n    }\n\n    .date-switch-container {\n      height: 40px;\n      position: relative;\n      text-align: center;\n      margin: 20px 10px;\n    }\n\n    .date-switch-container .current-date {\n      line-height: 40px;\n      height: 22px;\n      font-size: 16px;\n      color: #2C2C2C;\n      text-align: center;\n      font-weight: bold;\n    }\n\n    .date-container {\n      width: 40px;\n      height: 40px;\n      position: absolute;\n      right: 0;\n      top: 0;\n    }\n\n    .rec-type-container {\n      display: flex;\n      justify-content: space-between;\n    }\n\n    .rec-type-container .rec-type-text {\n      padding: 0 15px;\n      font-size: 12px;\n      color: #2C2C2C;\n    }\n\n    .rec-type-container .rec-type-switch {\n      padding: 0 20px;\n    }\n\n    .date-container input {\n      position: absolute;\n      opacity: 0;\n      display: inline-block;\n      width: 40px;\n      height: 40px;\n      z-index: 10;\n      left: 0;\n    }\n\n    .date-container label {\n      position: absolute;\n      left: 0;\n      top: 0;\n      /* display: none; */\n      z-index: 0;\n    }\n\n    .date-icon {\n      display: inline-block;\n      width: 40px;\n      height: 40px;\n      background: url(\'https://resource.eziot.com/group2/M00/00/6A/CtwQF2F6VieAQrU9AAABP-_Nsqo949.png\') no-repeat 100% 100%;\n    }\n    .select-container {\n      padding: 10px;\n      display: flex;\n      justify-content: space-between;\n    }\n\n    .advice {\n      height: 24px;\n      width: 70px;\n      display: flex;\n      justify-content: space-between;\n      line-height: 24px;\n      background: #F8F8F8;\n      border-radius: 8px;\n    }\n\n    .advice span {\n      width: 40px;\n      display: inline-block;\n    }\n\n    input[type="checkbox"]:not(:checked)+.advice span:first-child {\n      box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);\n      border-radius: 8px;\n      text-align: center;\n\n    }\n\n    input[type="checkbox"]:checked+.advice span:last-child {\n      box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);\n      border-radius: 8px;\n      text-align: center;\n    }\n\n    input[type="checkbox"]:not(:checked)+.advice span:first-child svg {\n      fill: #648FFC !important;\n    }\n\n    input[type="checkbox"]:checked+.advice span:last-child svg {\n      fill: #648FFC !important;\n    }';document.getElementsByTagName("head")[0].appendChild(oS);if(getQueryString("begin",this.jSPlugin.url)){var begin=getQueryString("begin",this.jSPlugin.url);this.date=begin.slice(0,4)+"/"+begin.slice(4,6)+"/"+begin.slice(6,8);this.begin=this.date+" ".concat(begin.slice(8,10)||"00",":").concat(begin.slice(10,12)||"00",":").concat(begin.slice(12,14)||"00");this.end=this.date+" 23:59:59";this.initBegin=this.begin}if(getQueryString("end",this.jSPlugin.url)){var end=getQueryString("end",this.jSPlugin.url);this.end=this.date+" ".concat(end.slice(8,10)||"23",":").concat(end.slice(10,12)||"59",":").concat(end.slice(12,14)||"59");this.initEnd=this.end}var mobileRecTitleWrap=document.createElement("div");mobileRecTitleWrap.id="date-switch-container-wrap";mobileRecTitleWrap.className="date-switch-container-wrap";mobileRecTitleWrap.style="";mobileRecTitleWrap.innerHTML='\n      <div class="date-switch-container">\n      <div class="current-date" id="current-date">今日录像</div>\n      <div class="date-container">\n        <label for="date">\n          <div class="date-icon"></div>\n        </label>\n        <input type="date" name="date" id="date" value="'.concat(this.date.replace(/\//g,"-")||(new Date).Format("yyyy-MM-dd"),'" />\n      </div>\n    </div>\n        ');insertAfter(mobileRecTitleWrap,document.getElementById("".concat(this.jSPlugin.id,"-wrap")));var mobileRecSwitchWrap=document.createElement("div");mobileRecSwitchWrap.id="rec-type-container-wrap";mobileRecSwitchWrap.className="rec-type-container-wrap";mobileRecSwitchWrap.style="";mobileRecSwitchWrap.innerHTML='\n    <div class="rec-type-container">\n    <div class="rec-type-text">共<span id="recCount">0</span>个录像</div>\n    <div class="rec-type-switch">\n      <label>\n        <input type="checkbox" name="type" id="cloudType" value="1" hidden />\n        <label for="cloudType" class="advice">\n          <span>\n          <svg fill="#CCCCCC" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="2 0 20 20">\n            <path class="st0" d="M12.6,5c-2.3,0.1-4.3,1.4-5.3,3.3L7.2,8.6c-2.4,0.5-4.1,2.5-4.1,4.9c0,2.8,2.4,5,5.2,5h9.9\n            c2.4,0,4.3-1.9,4.3-4.2l0-0.2c-0.1-2-1.6-3.5-3.5-3.9l-0.1,0l0-0.2c-0.4-2.8-3-5-6.1-5L12.6,5z"/>\n          </svg>\n        </span>\n        <span>\n          <svg fill="#CCCCCC" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="2 0 20 20">\n            <path id="形状结合" class="st0" d="M14.3,4c0.6,0,1.2,0.2,1.7,0.7l0,0L18.3,7C18.7,7.4,19,8,19,8.6l0,0v9c0,1.3-1.1,2.3-2.4,2.3\n\tl0,0H8.4C7.1,20,6,19,6,17.7l0,0V6.3C6,5,7.1,4,8.4,4l0,0H14.3z M9.7,7.2C9.3,7.2,8.9,7.6,8.9,8l0,0v2.5l0,0.1\n\tc0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C10.4,7.5,10,7.2,9.7,7.2z M12.2,7.2c-0.4,0-0.8,0.3-0.8,0.8l0,0v2.5\n\tl0,0.1c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C12.9,7.5,12.5,7.2,12.2,7.2z M14.7,7.2c-0.4,0-0.8,0.3-0.8,0.8l0,0\n\tv2.5l0,0.1c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C15.4,7.5,15,7.2,14.7,7.2z"/>\n          </svg>\n        </span>\n        </label>\n      </label>\n    </div>\n  </div>\n        ';insertAfter(mobileRecSwitchWrap,mobileRecTitleWrap);var mobileRecWrap=document.createElement("div");mobileRecWrap.id="mobile-rec-wrap";mobileRecWrap.className="mobileRec-wrap";mobileRecWrap.style="";mobileRecWrap.innerHTML='\n    <div class="time-line-container">\n    <div class="current-time">\n      <div class="current-time-bg" id="time-line-current">00:00:00</div>\n    </div>\n    <div class="time-line-item-container">\n      <div class="time-line-item" id="time-line-item">\n      </div>\n    </div>\n    </div>\n      ';insertAfter(mobileRecWrap,mobileRecSwitchWrap);var getPlayParam=function getPlayParam(data){var that=_this;console.log("子组件传值到父组件",data,data.current);var st=data.current;var date=new Date(_this.date).Format("yyyyMMdd").substr(0,8)+(data.current?st.replace(/:/g,""):data.current.replace(/:/g,""));if(_this.type==="cloud.rec"){if(!_this.isSeeking){if(that.recList.length>0){if(new Date("".concat(_this.date," ").concat(data.current)).valueOf()>=that.lastDate){_this.jSPlugin.pluginStatus.loadingSetText({text:"seek回放未找到录像片段",color:"red",delayClear:2e3});_this.syncTimeLine()}else{_this.unSyncTimeLine().then(function(){_this.isSeeking=true;_this.jSPlugin.pluginStatus.loadingStart(_this.jSPlugin.id);_this.jSPlugin.pluginStatus.setPlayStatus({loading:true});_this.jSPlugin.pluginStatus.loadingSetText({text:"seek回放中,请稍后..."});_this.jSPlugin.seek(date.substr(8,6),"235959").then(function(){var timer=setInterval(function(){_this.jSPlugin.getOSDTime().then(function(OSDdate){console.log("seek时间同步:",new Date(OSDdate.data*1e3).Format("yyyyMMddhhmmss"),date,new Date(OSDdate.data*1e3).Format("yyyyMMddhhmmss")>=date);if(new Date(OSDdate.data*1e3).Format("yyyyMMddhhmmss")>=date){_this.isSeeking=false;_this.syncTimeLine();clearInterval(timer);_this.jSPlugin.pluginStatus.loadingStop(_this.jSPlugin.id);_this.jSPlugin.pluginStatus.setPlayStatus({loading:false});_this.jSPlugin.pluginStatus.loadingClear()}})},1e3)})})}}}}else{var callback=function callback(){setTimeout(function(){_this.disabled=false},_this.seekFrequency)};var play=_this.jSPlugin.Theme.decoderState.state.play;var localRecSeek=function localRecSeek(callback){_this.disabled=true;if(play){_this.unSyncTimeLine().then(function(){_this.jSPlugin.pause(date).then(function(){console.log("暂停成功");_this.jSPlugin.resume(date).then(function(data){console.log("恢复成功");_this.syncTimeLine();if(callback){callback()}})})["catch"](function(){console.log("暂停失败");_this.jSPlugin.resume(date).then(function(data){console.log("恢复成功");_this.syncTimeLine();if(callback){callback()}})})})}else{_this.unSyncTimeLine().then(function(){_this.jSPlugin.resume(date).then(function(data){console.log("恢复成功");_this.syncTimeLine();if(callback){callback()}})})}};if(_this.disabled){console.log("操作频繁,等待2秒后执行");if(_this.seekTimer){clearTimeout(_this.seekTimer)}_this.seekTimer=setTimeout(function(){localRecSeek(callback)},_this.seekFrequency)}else{localRecSeek(callback)}}};var ontouchstart=function ontouchstart(){_this.operating=true;_this.unSyncTimeLine()};var ontouchmove=function ontouchmove(){if(_this.operating==false){_this.operating=true;_this.unSyncTimeLine()}};var ontouchend=function ontouchend(){_this.operating=false};this.TimeLineOBJ=new MobileTimeLine({id:"time-line-item",getPlayParam:getPlayParam,ontouchstart:ontouchstart,ontouchmove:ontouchmove,ontouchend:ontouchend});this.fetchDeviceRec();document.getElementById("date").addEventListener("change",function(e){console.log("日期变化",e.target.value);var value=e.target.value;var valueInt=parseInt(new Date(value).Format("yyyy/MM/dd").replace(/\//g,""));var nowDate=new Date;var newDateInt=parseInt(nowDate.Format("yyyy/MM/dd").replace(/\//g,""));if(valueInt>newDateInt){document.getElementById("date").value=new Date(_this.date.replace(/\//g,"-")||nowDate.Format("yyyy-MM-dd")).Format("yyyy-MM-dd");return}_this.date=new Date(value).Format("yyyy/MM/dd");_this.begin=_this.date+" 00:00:00";_this.end=_this.date+" 23:59:59";_this.jSPlugin.changePlayUrl({type:_this.type,begin:"".concat(new Date(_this.date).Format("yyyyMMdd"),"000000")}).then(function(url){setTimeout(function(){var dateEle=document.getElementById("date");if(dateEle)dateEle.value=value},0)});_this.changeRecSpeed(1);_this.resetMobileZoomStatus()});document.getElementById("cloudType").checked=this.type==="rec";document.getElementById("cloudType").addEventListener("change",function(e){var recType=e.target.checked?2:1;_this.type=e.target.checked?"rec":"cloud.rec";console.log("recType",recType);_this.jSPlugin.changePlayUrl({type:_this.type,begin:"".concat(new Date(_this.date).Format("yyyyMMdd"),"000000")}).then(function(){console.log("切换类型成功");_this.syncTimeLine();_this.changeRecSpeed(1);_this.resetMobileZoomStatus()},function(err){console.log("err",err)})["catch"](function(err){console.log(err)})});this.syncTimeLine()}_createClass$1(MobileRec,[{key:"fetchDeviceRec",value:function fetchDeviceRec(){var _this2=this;var doRender=function doRender(result){var len=result.length;document.getElementById("recCount").innerHTML=len;var availArr=[];for(var i=len-1;i>=0;i--){var res=result[i];var et=format(res.endTime);var st=format(res.startTime);availArr.push({st:st,et:et})}{_this2.TimeLineOBJ.setDateLine(availArr)}};var data=new FormData;var that=this;data.append("deviceSerial",matchEzopenUrl(this.jSPlugin.url).deviceSerial);data.append("channelNo",matchEzopenUrl(this.jSPlugin.url).channelNo);data.append("accessToken",this.jSPlugin.accessToken);data.append("recType",this.type==="cloud.rec"?1:2);data.append("startTime",new Date(this.begin).getTime());data.append("endTime",new Date(this.end).getTime());fetch(this.jSPlugin.env.domain+"/api/lapp/video/by/time",{method:"POST",body:data}).then(function(response){return response.json()}).then(function(res){if(res.code==200&&res.data){var result=[];result=res.data;that.recList=result;that.lastDate=result[result.length-1].endTime;doRender(result)}else{doRender([])}})}},{key:"syncTimeLine",value:function syncTimeLine(){var _this3=this;var dateFormat=function dateFormat(now){var time=new Date(now);var h=time.getHours();var m=time.getMinutes();var s=time.getSeconds();return(h>9?h:"0"+h)+":"+(m>9?m:"0"+m)+":"+(s>9?s:"0"+s)};if(this.jSPlugin.recTimer){clearInterval(this.jSPlugin.recTimer)}var that=this;this.jSPlugin.recTimer=setInterval(function(){if(_this3.operating){console.log("操作中");return false}_this3.jSPlugin.getOSDTime().then(function(res){if(res.data>0){that.TimeLineOBJ.stepScrollTimeLine(dateFormat(res.data*1e3))}if(!!that.lastDate&&(res.data>1e12?res.data:res.data*1e3)>=that.lastDate){that.jSPlugin.pluginStatus.loadingSetText({text:"回放结束",color:"red"})}})["catch"](function(err){console.log("err:-----",err);console.log("未找到当前获取播放时间,等待中...")})},1e3)}},{key:"unSyncTimeLine",value:function unSyncTimeLine(){var that=this;return new Promise(function(resolve,reject){if(that.jSPlugin.recTimer){clearInterval(that.jSPlugin.recTimer)}resolve()})}}]);return MobileRec}();var ptzStart=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStart"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStart"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStart"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStart"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStart"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStart"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStart"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStart"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStart"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStart"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStart"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStart"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStart"},{code:60002,msg:"设备已旋转到上限位",desc:"",text:"设备云台旋转达到上限位",type:"ptzStart"},{code:60003,msg:"设备已旋转到下限位",desc:"",text:"设备云台旋转达到下限位",type:"ptzStart"},{code:60004,msg:"设备已旋转到左限位",desc:"",text:"设备云台旋转达到左限位",type:"ptzStart"},{code:60005,msg:"设备已旋转到右限位",desc:"",text:"设备云台旋转达到右限位",type:"ptzStart"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStart"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStart"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStart"}];var ptzStop=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStop"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStop"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStop"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStop"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStop"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStop"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStop"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStop"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStop"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStop"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStop"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStop"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStop"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStop"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStop"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStop"}];var talk=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"talk"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"talk"},{code:10002,msg:"账号异常,操作失败",desc:"",text:"accessToken异常或过期",type:"talk"},{code:10031,msg:"账号异常,操作失败",desc:"",text:"子账户或萤石用户没有权限",type:"talk"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"talk"},{code:60059,msg:"播放失败",desc:"",text:"ezopen地址均不可用",type:"talk"}];var time=[{code:200,msg:"",desc:"",text:"操作成功",type:"time"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"time"},{code:10002,msg:"账号异常,播放失败",desc:"",text:"accessToken异常或过期",type:"time"},{code:10004,msg:"账号异常,播放失败",desc:"",text:"用户不存在",type:"time"},{code:10005,msg:"账号异常,播放失败",desc:"",text:"appKey异常",type:"time"},{code:10011,msg:"播放失败",desc:"设备对应用户未注册至应用下",text:"未开通萤石服务",type:"time"},{code:10013,msg:"账号异常,播放失败",desc:"",text:"非开发者账号无权限调用",type:"time"},{code:10030,msg:"播放失败",desc:"",text:"appkey和appsecret不匹配",type:"time"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"time"},{code:20014,msg:"播放失败",desc:"",text:"deviceSerial不合法",type:"time"},{code:20032,msg:"设备不存在请检查设备连接情况",desc:"",text:"该用户下通道不存在",type:"time"},{code:60024,msg:"播放失败请重试",desc:"",text:"取消订阅操作失败",type:"time"},{code:49999,msg:"播放失败请重试",desc:"",text:"操作异常",type:"time"}];var uikitCode={ptzStart:ptzStart,ptzStop:ptzStop,talk:talk,time:time};var UikitCode=function(){function UikitCode(x,y){_classCallCheck$1(this,UikitCode);this.coreX=x;this.coreY=y;console.log("uikitCode",uikitCode)}_createClass$1(UikitCode,[{key:"toString",value:function toString(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchInfo",value:function matchInfo(code,type){if(uikitCode[type]){var obj={};uikitCode[type].map(function(item){if(item.code==code){obj=item}});return obj}else{return{code:500,msg:"未知错误",desc:"未知的错误码,或错误码类型有误",text:"",type:type}}}}]);return UikitCode}();var Ptz=function(){function Ptz(jSPlugin){var _this=this;_classCallCheck$1(this,Ptz);this.jSPlugin=jSPlugin;this.codeHandler=new UikitCode;this.pluginStatus=new Status(this,this.jSPlugin.id);this.showPtz=false;console.log("云台初始化");if(document.getElementById(this.jSPlugin.id+"-ez-ptz-item")){return false}var ptzWrap=document.createElement("div");ptzWrap.id=this.jSPlugin.id+"-ez-ptz-item";ptzWrap.className="ez-ptz-wrap";ptzWrap.style="display:none";var oS=document.createElement("style");oS.innerHTML="\n    .ez-ptz-container {\n      position: relative;\n      width: 80px;\n      height: 80px;\n      background: rgba(255, 255, 255, 0.80);\n      box-shadow: 0px 0px 33px 4px rgb(0 0 0 / 15%);\n      border: 1px solid rgba(255, 255, 255, 0.80);\n      border-radius: 100%;\n      cursor: pointer;\n      overflow: hidden;\n      user-select: none;\n    }\n    .ez-ptz-container .ez-ptz-icon.top {\n      width: 0;\n      height: 0;\n      border-left: 3px solid transparent;\n      border-right: 3px solid transparent;\n      border-bottom: 6px solid #333333;\n      position: absolute;\n      display: inline-block;\n      left: calc(50% - 3px);\n      top: 2px;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.top.active {\n      border-bottom-color: #1890FF;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.bottom {\n      width: 0;\n      height: 0;\n      border-left: 3px solid transparent;\n      border-right: 3px solid transparent;\n      border-top: 6px solid #333333;\n      position: absolute;\n      display: inline-block;\n      left: calc(50% - 3px);\n      bottom: 2px;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.bottom.active {\n      border-top-color: #1890FF;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.right {\n      width: 0;\n      height: 0;\n      border-top: 3px solid transparent;\n      border-bottom: 3px solid transparent;\n      border-left: 6px solid #333333;\n      position: absolute;\n      display: inline-block;\n      top: calc(50% - 3px);\n      right: 2px;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.right.active {\n      border-left-color: #1890FF;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.left {\n      width: 0;\n      height: 0;\n      border-top: 3px solid transparent;\n      border-bottom: 3px solid transparent;\n      border-right: 6px solid #333333;\n      position: absolute;\n      display: inline-block;\n      top: calc(50% - 3px);\n      left: 2px;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.left.active {\n      border-right-color: #1890FF;\n    }\n\n    .ez-ptz-container .ez-ptz-main.center {\n      width: 23px;\n      height: 23px;\n      background: #1890FF;\n      border-radius: 100%;\n      top: calc(50% - 12.3px);\n      left: calc(50% - 12.3px);\n      position: absolute;\n    }\n\n    .ez-ptz-wrap {\n      position: absolute;\n      right: 20px;\n      top: calc(50% - 50px);\n      width: 100px;\n      height: 100px;\n      z-index: 999;\n    }\n\n    .ez-ptz-close {\n      position: absolute;\n      color: #FFFFFF;\n      top: 0;\n      right: 0px;\n    }";document.getElementsByTagName("head")[0].appendChild(oS);ptzWrap.innerHTML='\n      <div class="ez-ptz-container" id="'.concat(this.jSPlugin.id,'-ez-ptz-container" style="position: relative;width: 80px;height: 80px;background: rgba(255, 255, 255, 0.80);box-shadow: 0px 0px 33px 4px rgba(0, 0, 0, 0.15);border: 1px solid rgba(255, 255, 255, 0.80);border-radius: 100%;cursor: pointer;overflow: hidden;user-select: none;">\n        <div class="ez-ptz-main center"></div>\n        <div class="ez-ptz-icon top active"></div>\n        <div class="ez-ptz-icon left active"></div>\n        <div class="ez-ptz-icon bottom active"></div>\n        <div class="ez-ptz-icon right active"></div>\n      ');document.getElementById("".concat(jSPlugin.id,"-wrap")).appendChild(ptzWrap);document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmousedown=function(e){e.preventDefault();console.log("触摸开始");_this._handlePtzTouch(e,"start")};document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmouseup=function(e){e.preventDefault();console.log("触摸结束");_this._handlePtzTouch(e,"stop")};document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchstart=function(e){e.preventDefault();console.log("触摸开始");_this._handlePtzTouch(e,"start")};document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchend=function(e){e.preventDefault();console.log("触摸结束",e);_this._handlePtzTouch(e,"stop")}}_createClass$1(Ptz,[{key:"show",value:function show(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: inline-block";this.showPtz=true}},{key:"hide",value:function hide(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: none";this.showPtz=false}},{key:"_handlePtzTouch",value:function _handlePtzTouch(e,type){var _this2=this;var container=document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).getBoundingClientRect();var containerCenterX=container.left+41;var containerCenterY=container.top+41;var eventX=e.x||e.changedTouches[0].clientX;var eventY=e.y||e.changedTouches[0].clientY;var left=eventX-containerCenterX;var top=eventY-containerCenterY;var direction=0;var url=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";if(Math.abs(left)>Math.abs(top)){if(left>0){direction=3}else{direction=2}}else{if(top>0){direction=1}else{direction=0}}if(/^rotate\(90/.test(document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.transform)){switch(direction){case 0:direction=2;break;case 1:direction=3;break;case 2:direction=1;break;case 3:direction=0;break}}document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(direction===0?180:direction===1?0:direction===2?90:270,"deg, #1d8dd8 0%, rgba(100,143,252,0.00) 30%)");if(type==="stop"){url=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop";document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style=""}var data=new FormData;data.append("deviceSerial",matchEzopenUrl(this.jSPlugin.url).deviceSerial);data.append("channelNo",matchEzopenUrl(this.jSPlugin.url).channelNo);data.append("speed",1);data.append("direction",direction);data.append("accessToken",this.jSPlugin.accessToken);fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){if(rt.code==200);else{console.log(rt.code,_this2.codeHandler.matchInfo(rt.code,type==="start"?"ptzStart":"ptzStop"));_this2.pluginStatus.loadingSetText({text:_this2.codeHandler.matchInfo(rt.code,type==="start"?"ptzStart":"ptzStop").msg,color:"red",delayClear:2e3});if(rt.code==60005||rt.code==60002||rt.code==60003||rt.code==60004){document.getElementById("".concat(_this2.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(direction===0?180:direction===1?0:direction===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)")}}})["catch"](function(err){console.log("云台调用异常",err)})}}]);return Ptz}();function commonjsRequire(path){throw new Error('Could not dynamically require "'+path+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var adapeter={exports:{}};(function(module,exports){(function(f){{module.exports=f()}})(function(){return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof commonjsRequire&&commonjsRequire;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof commonjsRequire&&commonjsRequire,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){var _adapter_factory=require("./adapter_factory.js");var adapter=(0,_adapter_factory.adapterFactory)({window:window});window.adapter=adapter;module.exports=adapter},{"./adapter_factory.js":2}],2:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.adapterFactory=adapterFactory;var _utils=require("./utils");var utils=_interopRequireWildcard(_utils);var _chrome_shim=require("./chrome/chrome_shim");var chromeShim=_interopRequireWildcard(_chrome_shim);var _edge_shim=require("./edge/edge_shim");var edgeShim=_interopRequireWildcard(_edge_shim);var _firefox_shim=require("./firefox/firefox_shim");var firefoxShim=_interopRequireWildcard(_firefox_shim);var _safari_shim=require("./safari/safari_shim");var safariShim=_interopRequireWildcard(_safari_shim);var _common_shim=require("./common_shim");var commonShim=_interopRequireWildcard(_common_shim);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function adapterFactory(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},window=_ref.window;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{shimChrome:true,shimFirefox:true,shimEdge:true,shimSafari:true};var logging=utils.log;var browserDetails=utils.detectBrowser(window);var adapter={browserDetails:browserDetails,commonShim:commonShim,extractVersion:utils.extractVersion,disableLog:utils.disableLog,disableWarnings:utils.disableWarnings};switch(browserDetails.browser){case"chrome":if(!chromeShim||!chromeShim.shimPeerConnection||!options.shimChrome){logging("Chrome shim is not included in this adapter release.");return adapter}logging("adapter.js shimming chrome.");adapter.browserShim=chromeShim;chromeShim.shimGetUserMedia(window);chromeShim.shimMediaStream(window);chromeShim.shimPeerConnection(window);chromeShim.shimOnTrack(window);chromeShim.shimAddTrackRemoveTrack(window);chromeShim.shimGetSendersWithDtmf(window);chromeShim.shimGetStats(window);chromeShim.shimSenderReceiverGetStats(window);chromeShim.fixNegotiationNeeded(window);commonShim.shimRTCIceCandidate(window);commonShim.shimConnectionState(window);commonShim.shimMaxMessageSize(window);commonShim.shimSendThrowTypeError(window);commonShim.removeAllowExtmapMixed(window);break;case"firefox":if(!firefoxShim||!firefoxShim.shimPeerConnection||!options.shimFirefox){logging("Firefox shim is not included in this adapter release.");return adapter}logging("adapter.js shimming firefox.");adapter.browserShim=firefoxShim;firefoxShim.shimGetUserMedia(window);firefoxShim.shimPeerConnection(window);firefoxShim.shimOnTrack(window);firefoxShim.shimRemoveStream(window);firefoxShim.shimSenderGetStats(window);firefoxShim.shimReceiverGetStats(window);firefoxShim.shimRTCDataChannel(window);firefoxShim.shimAddTransceiver(window);firefoxShim.shimCreateOffer(window);firefoxShim.shimCreateAnswer(window);commonShim.shimRTCIceCandidate(window);commonShim.shimConnectionState(window);commonShim.shimMaxMessageSize(window);commonShim.shimSendThrowTypeError(window);break;case"edge":if(!edgeShim||!edgeShim.shimPeerConnection||!options.shimEdge){logging("MS edge shim is not included in this adapter release.");return adapter}logging("adapter.js shimming edge.");adapter.browserShim=edgeShim;edgeShim.shimGetUserMedia(window);edgeShim.shimGetDisplayMedia(window);edgeShim.shimPeerConnection(window);edgeShim.shimReplaceTrack(window);commonShim.shimMaxMessageSize(window);commonShim.shimSendThrowTypeError(window);break;case"safari":if(!safariShim||!options.shimSafari){logging("Safari shim is not included in this adapter release.");return adapter}logging("adapter.js shimming safari.");adapter.browserShim=safariShim;safariShim.shimRTCIceServerUrls(window);safariShim.shimCreateOfferLegacy(window);safariShim.shimCallbacksAPI(window);safariShim.shimLocalStreamsAPI(window);safariShim.shimRemoteStreamsAPI(window);safariShim.shimTrackEventTransceiver(window);safariShim.shimGetUserMedia(window);commonShim.shimRTCIceCandidate(window);commonShim.shimMaxMessageSize(window);commonShim.shimSendThrowTypeError(window);commonShim.removeAllowExtmapMixed(window);break;default:logging("Unsupported browser!");break}return adapter}},{"./chrome/chrome_shim":3,"./common_shim":6,"./edge/edge_shim":7,"./firefox/firefox_shim":11,"./safari/safari_shim":14,"./utils":15}],3:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.shimGetDisplayMedia=exports.shimGetUserMedia=undefined;var _typeof$1=typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"?function(obj){return _typeof(obj)}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof(obj)};var _getusermedia=require("./getusermedia");Object.defineProperty(exports,"shimGetUserMedia",{enumerable:true,get:function get(){return _getusermedia.shimGetUserMedia}});var _getdisplaymedia=require("./getdisplaymedia");Object.defineProperty(exports,"shimGetDisplayMedia",{enumerable:true,get:function get(){return _getdisplaymedia.shimGetDisplayMedia}});exports.shimMediaStream=shimMediaStream;exports.shimOnTrack=shimOnTrack;exports.shimGetSendersWithDtmf=shimGetSendersWithDtmf;exports.shimGetStats=shimGetStats;exports.shimSenderReceiverGetStats=shimSenderReceiverGetStats;exports.shimAddTrackRemoveTrackWithNative=shimAddTrackRemoveTrackWithNative;exports.shimAddTrackRemoveTrack=shimAddTrackRemoveTrack;exports.shimPeerConnection=shimPeerConnection;exports.fixNegotiationNeeded=fixNegotiationNeeded;var _utils=require("../utils.js");var utils=_interopRequireWildcard(_utils);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function shimMediaStream(window){window.MediaStream=window.MediaStream||window.webkitMediaStream}function shimOnTrack(window){if((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCPeerConnection&&!("ontrack"in window.RTCPeerConnection.prototype)){Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function get(){return this._ontrack},set:function set(f){if(this._ontrack){this.removeEventListener("track",this._ontrack)}this.addEventListener("track",this._ontrack=f)},enumerable:true,configurable:true});var origSetRemoteDescription=window.RTCPeerConnection.prototype.setRemoteDescription;window.RTCPeerConnection.prototype.setRemoteDescription=function setRemoteDescription(){var _this=this;if(!this._ontrackpoly){this._ontrackpoly=function(e){e.stream.addEventListener("addtrack",function(te){var receiver=void 0;if(window.RTCPeerConnection.prototype.getReceivers){receiver=_this.getReceivers().find(function(r){return r.track&&r.track.id===te.track.id})}else{receiver={track:te.track}}var event=new Event("track");event.track=te.track;event.receiver=receiver;event.transceiver={receiver:receiver};event.streams=[e.stream];_this.dispatchEvent(event)});e.stream.getTracks().forEach(function(track){var receiver=void 0;if(window.RTCPeerConnection.prototype.getReceivers){receiver=_this.getReceivers().find(function(r){return r.track&&r.track.id===track.id})}else{receiver={track:track}}var event=new Event("track");event.track=track;event.receiver=receiver;event.transceiver={receiver:receiver};event.streams=[e.stream];_this.dispatchEvent(event)})};this.addEventListener("addstream",this._ontrackpoly)}return origSetRemoteDescription.apply(this,arguments)}}else{utils.wrapPeerConnectionEvent(window,"track",function(e){if(!e.transceiver){Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}})}return e})}}function shimGetSendersWithDtmf(window){if((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCPeerConnection&&!("getSenders"in window.RTCPeerConnection.prototype)&&"createDTMFSender"in window.RTCPeerConnection.prototype){var shimSenderWithDtmf=function shimSenderWithDtmf(pc,track){return{track:track,get dtmf(){if(this._dtmf===undefined){if(track.kind==="audio"){this._dtmf=pc.createDTMFSender(track)}else{this._dtmf=null}}return this._dtmf},_pc:pc}};if(!window.RTCPeerConnection.prototype.getSenders){window.RTCPeerConnection.prototype.getSenders=function getSenders(){this._senders=this._senders||[];return this._senders.slice()};var origAddTrack=window.RTCPeerConnection.prototype.addTrack;window.RTCPeerConnection.prototype.addTrack=function addTrack(track,stream){var sender=origAddTrack.apply(this,arguments);if(!sender){sender=shimSenderWithDtmf(this,track);this._senders.push(sender)}return sender};var origRemoveTrack=window.RTCPeerConnection.prototype.removeTrack;window.RTCPeerConnection.prototype.removeTrack=function removeTrack(sender){origRemoveTrack.apply(this,arguments);var idx=this._senders.indexOf(sender);if(idx!==-1){this._senders.splice(idx,1)}}}var origAddStream=window.RTCPeerConnection.prototype.addStream;window.RTCPeerConnection.prototype.addStream=function addStream(stream){var _this2=this;this._senders=this._senders||[];origAddStream.apply(this,[stream]);stream.getTracks().forEach(function(track){_this2._senders.push(shimSenderWithDtmf(_this2,track))})};var origRemoveStream=window.RTCPeerConnection.prototype.removeStream;window.RTCPeerConnection.prototype.removeStream=function removeStream(stream){var _this3=this;this._senders=this._senders||[];origRemoveStream.apply(this,[stream]);stream.getTracks().forEach(function(track){var sender=_this3._senders.find(function(s){return s.track===track});if(sender){_this3._senders.splice(_this3._senders.indexOf(sender),1)}})}}else if((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCPeerConnection&&"getSenders"in window.RTCPeerConnection.prototype&&"createDTMFSender"in window.RTCPeerConnection.prototype&&window.RTCRtpSender&&!("dtmf"in window.RTCRtpSender.prototype)){var origGetSenders=window.RTCPeerConnection.prototype.getSenders;window.RTCPeerConnection.prototype.getSenders=function getSenders(){var _this4=this;var senders=origGetSenders.apply(this,[]);senders.forEach(function(sender){return sender._pc=_this4});return senders};Object.defineProperty(window.RTCRtpSender.prototype,"dtmf",{get:function get(){if(this._dtmf===undefined){if(this.track.kind==="audio"){this._dtmf=this._pc.createDTMFSender(this.track)}else{this._dtmf=null}}return this._dtmf}})}}function shimGetStats(window){if(!window.RTCPeerConnection){return}var origGetStats=window.RTCPeerConnection.prototype.getStats;window.RTCPeerConnection.prototype.getStats=function getStats(){var _this5=this;var _arguments=Array.prototype.slice.call(arguments),selector=_arguments[0],onSucc=_arguments[1],onErr=_arguments[2];if(arguments.length>0&&typeof selector==="function"){return origGetStats.apply(this,arguments)}if(origGetStats.length===0&&(arguments.length===0||typeof selector!=="function")){return origGetStats.apply(this,[])}var fixChromeStats_=function fixChromeStats_(response){var standardReport={};var reports=response.result();reports.forEach(function(report){var standardStats={id:report.id,timestamp:report.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[report.type]||report.type};report.names().forEach(function(name){standardStats[name]=report.stat(name)});standardReport[standardStats.id]=standardStats});return standardReport};var makeMapStats=function makeMapStats(stats){return new Map(Object.keys(stats).map(function(key){return[key,stats[key]]}))};if(arguments.length>=2){var successCallbackWrapper_=function successCallbackWrapper_(response){onSucc(makeMapStats(fixChromeStats_(response)))};return origGetStats.apply(this,[successCallbackWrapper_,selector])}return new Promise(function(resolve,reject){origGetStats.apply(_this5,[function(response){resolve(makeMapStats(fixChromeStats_(response)))},reject])}).then(onSucc,onErr)}}function shimSenderReceiverGetStats(window){if(!((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCPeerConnection&&window.RTCRtpSender&&window.RTCRtpReceiver)){return}if(!("getStats"in window.RTCRtpSender.prototype)){var origGetSenders=window.RTCPeerConnection.prototype.getSenders;if(origGetSenders){window.RTCPeerConnection.prototype.getSenders=function getSenders(){var _this6=this;var senders=origGetSenders.apply(this,[]);senders.forEach(function(sender){return sender._pc=_this6});return senders}}var origAddTrack=window.RTCPeerConnection.prototype.addTrack;if(origAddTrack){window.RTCPeerConnection.prototype.addTrack=function addTrack(){var sender=origAddTrack.apply(this,arguments);sender._pc=this;return sender}}window.RTCRtpSender.prototype.getStats=function getStats(){var sender=this;return this._pc.getStats().then(function(result){return utils.filterStats(result,sender.track,true)})}}if(!("getStats"in window.RTCRtpReceiver.prototype)){var origGetReceivers=window.RTCPeerConnection.prototype.getReceivers;if(origGetReceivers){window.RTCPeerConnection.prototype.getReceivers=function getReceivers(){var _this7=this;var receivers=origGetReceivers.apply(this,[]);receivers.forEach(function(receiver){return receiver._pc=_this7});return receivers}}utils.wrapPeerConnectionEvent(window,"track",function(e){e.receiver._pc=e.srcElement;return e});window.RTCRtpReceiver.prototype.getStats=function getStats(){var receiver=this;return this._pc.getStats().then(function(result){return utils.filterStats(result,receiver.track,false)})}}if(!("getStats"in window.RTCRtpSender.prototype&&"getStats"in window.RTCRtpReceiver.prototype)){return}var origGetStats=window.RTCPeerConnection.prototype.getStats;window.RTCPeerConnection.prototype.getStats=function getStats(){if(arguments.length>0&&arguments[0]instanceof window.MediaStreamTrack){var track=arguments[0];var sender=void 0;var receiver=void 0;var err=void 0;this.getSenders().forEach(function(s){if(s.track===track){if(sender){err=true}else{sender=s}}});this.getReceivers().forEach(function(r){if(r.track===track){if(receiver){err=true}else{receiver=r}}return r.track===track});if(err||sender&&receiver){return Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError"))}else if(sender){return sender.getStats()}else if(receiver){return receiver.getStats()}return Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return origGetStats.apply(this,arguments)}}function shimAddTrackRemoveTrackWithNative(window){window.RTCPeerConnection.prototype.getLocalStreams=function getLocalStreams(){var _this8=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{};return Object.keys(this._shimmedLocalStreams).map(function(streamId){return _this8._shimmedLocalStreams[streamId][0]})};var origAddTrack=window.RTCPeerConnection.prototype.addTrack;window.RTCPeerConnection.prototype.addTrack=function addTrack(track,stream){if(!stream){return origAddTrack.apply(this,arguments)}this._shimmedLocalStreams=this._shimmedLocalStreams||{};var sender=origAddTrack.apply(this,arguments);if(!this._shimmedLocalStreams[stream.id]){this._shimmedLocalStreams[stream.id]=[stream,sender]}else if(this._shimmedLocalStreams[stream.id].indexOf(sender)===-1){this._shimmedLocalStreams[stream.id].push(sender)}return sender};var origAddStream=window.RTCPeerConnection.prototype.addStream;window.RTCPeerConnection.prototype.addStream=function addStream(stream){var _this9=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{};stream.getTracks().forEach(function(track){var alreadyExists=_this9.getSenders().find(function(s){return s.track===track});if(alreadyExists){throw new DOMException("Track already exists.","InvalidAccessError")}});var existingSenders=this.getSenders();origAddStream.apply(this,arguments);var newSenders=this.getSenders().filter(function(newSender){return existingSenders.indexOf(newSender)===-1});this._shimmedLocalStreams[stream.id]=[stream].concat(newSenders)};var origRemoveStream=window.RTCPeerConnection.prototype.removeStream;window.RTCPeerConnection.prototype.removeStream=function removeStream(stream){this._shimmedLocalStreams=this._shimmedLocalStreams||{};delete this._shimmedLocalStreams[stream.id];return origRemoveStream.apply(this,arguments)};var origRemoveTrack=window.RTCPeerConnection.prototype.removeTrack;window.RTCPeerConnection.prototype.removeTrack=function removeTrack(sender){var _this10=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{};if(sender){Object.keys(this._shimmedLocalStreams).forEach(function(streamId){var idx=_this10._shimmedLocalStreams[streamId].indexOf(sender);if(idx!==-1){_this10._shimmedLocalStreams[streamId].splice(idx,1)}if(_this10._shimmedLocalStreams[streamId].length===1){delete _this10._shimmedLocalStreams[streamId]}})}return origRemoveTrack.apply(this,arguments)}}function shimAddTrackRemoveTrack(window){if(!window.RTCPeerConnection){return}var browserDetails=utils.detectBrowser(window);if(window.RTCPeerConnection.prototype.addTrack&&browserDetails.version>=65){return shimAddTrackRemoveTrackWithNative(window)}var origGetLocalStreams=window.RTCPeerConnection.prototype.getLocalStreams;window.RTCPeerConnection.prototype.getLocalStreams=function getLocalStreams(){var _this11=this;var nativeStreams=origGetLocalStreams.apply(this);this._reverseStreams=this._reverseStreams||{};return nativeStreams.map(function(stream){return _this11._reverseStreams[stream.id]})};var origAddStream=window.RTCPeerConnection.prototype.addStream;window.RTCPeerConnection.prototype.addStream=function addStream(stream){var _this12=this;this._streams=this._streams||{};this._reverseStreams=this._reverseStreams||{};stream.getTracks().forEach(function(track){var alreadyExists=_this12.getSenders().find(function(s){return s.track===track});if(alreadyExists){throw new DOMException("Track already exists.","InvalidAccessError")}});if(!this._reverseStreams[stream.id]){var newStream=new window.MediaStream(stream.getTracks());this._streams[stream.id]=newStream;this._reverseStreams[newStream.id]=stream;stream=newStream}origAddStream.apply(this,[stream])};var origRemoveStream=window.RTCPeerConnection.prototype.removeStream;window.RTCPeerConnection.prototype.removeStream=function removeStream(stream){this._streams=this._streams||{};this._reverseStreams=this._reverseStreams||{};origRemoveStream.apply(this,[this._streams[stream.id]||stream]);delete this._reverseStreams[this._streams[stream.id]?this._streams[stream.id].id:stream.id];delete this._streams[stream.id]};window.RTCPeerConnection.prototype.addTrack=function addTrack(track,stream){var _this13=this;if(this.signalingState==="closed"){throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError")}var streams=[].slice.call(arguments,1);if(streams.length!==1||!streams[0].getTracks().find(function(t){return t===track})){throw new DOMException("The adapter.js addTrack polyfill only supports a single "+" stream which is associated with the specified track.","NotSupportedError")}var alreadyExists=this.getSenders().find(function(s){return s.track===track});if(alreadyExists){throw new DOMException("Track already exists.","InvalidAccessError")}this._streams=this._streams||{};this._reverseStreams=this._reverseStreams||{};var oldStream=this._streams[stream.id];if(oldStream){oldStream.addTrack(track);Promise.resolve().then(function(){_this13.dispatchEvent(new Event("negotiationneeded"))})}else{var newStream=new window.MediaStream([track]);this._streams[stream.id]=newStream;this._reverseStreams[newStream.id]=stream;this.addStream(newStream)}return this.getSenders().find(function(s){return s.track===track})};function replaceInternalStreamId(pc,description){var sdp=description.sdp;Object.keys(pc._reverseStreams||[]).forEach(function(internalId){var externalStream=pc._reverseStreams[internalId];var internalStream=pc._streams[externalStream.id];sdp=sdp.replace(new RegExp(internalStream.id,"g"),externalStream.id)});return new RTCSessionDescription({type:description.type,sdp:sdp})}function replaceExternalStreamId(pc,description){var sdp=description.sdp;Object.keys(pc._reverseStreams||[]).forEach(function(internalId){var externalStream=pc._reverseStreams[internalId];var internalStream=pc._streams[externalStream.id];sdp=sdp.replace(new RegExp(externalStream.id,"g"),internalStream.id)});return new RTCSessionDescription({type:description.type,sdp:sdp})}["createOffer","createAnswer"].forEach(function(method){var nativeMethod=window.RTCPeerConnection.prototype[method];var methodObj=_defineProperty({},method,function(){var _this14=this;var args=arguments;var isLegacyCall=arguments.length&&typeof arguments[0]==="function";if(isLegacyCall){return nativeMethod.apply(this,[function(description){var desc=replaceInternalStreamId(_this14,description);args[0].apply(null,[desc])},function(err){if(args[1]){args[1].apply(null,err)}},arguments[2]])}return nativeMethod.apply(this,arguments).then(function(description){return replaceInternalStreamId(_this14,description)})});window.RTCPeerConnection.prototype[method]=methodObj[method]});var origSetLocalDescription=window.RTCPeerConnection.prototype.setLocalDescription;window.RTCPeerConnection.prototype.setLocalDescription=function setLocalDescription(){if(!arguments.length||!arguments[0].type){return origSetLocalDescription.apply(this,arguments)}arguments[0]=replaceExternalStreamId(this,arguments[0]);return origSetLocalDescription.apply(this,arguments)};var origLocalDescription=Object.getOwnPropertyDescriptor(window.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(window.RTCPeerConnection.prototype,"localDescription",{get:function get(){var description=origLocalDescription.get.apply(this);if(description.type===""){return description}return replaceInternalStreamId(this,description)}});window.RTCPeerConnection.prototype.removeTrack=function removeTrack(sender){var _this15=this;if(this.signalingState==="closed"){throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError")}if(!sender._pc){throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack "+"does not implement interface RTCRtpSender.","TypeError")}var isLocal=sender._pc===this;if(!isLocal){throw new DOMException("Sender was not created by this connection.","InvalidAccessError")}this._streams=this._streams||{};var stream=void 0;Object.keys(this._streams).forEach(function(streamid){var hasTrack=_this15._streams[streamid].getTracks().find(function(track){return sender.track===track});if(hasTrack){stream=_this15._streams[streamid]}});if(stream){if(stream.getTracks().length===1){this.removeStream(this._reverseStreams[stream.id])}else{stream.removeTrack(sender.track)}this.dispatchEvent(new Event("negotiationneeded"))}}}function shimPeerConnection(window){var browserDetails=utils.detectBrowser(window);if(!window.RTCPeerConnection&&window.webkitRTCPeerConnection){window.RTCPeerConnection=window.webkitRTCPeerConnection}if(!window.RTCPeerConnection){return}if(browserDetails.version<53){["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(method){var nativeMethod=window.RTCPeerConnection.prototype[method];var methodObj=_defineProperty({},method,function(){arguments[0]=new(method==="addIceCandidate"?window.RTCIceCandidate:window.RTCSessionDescription)(arguments[0]);return nativeMethod.apply(this,arguments)});window.RTCPeerConnection.prototype[method]=methodObj[method]})}var nativeAddIceCandidate=window.RTCPeerConnection.prototype.addIceCandidate;window.RTCPeerConnection.prototype.addIceCandidate=function addIceCandidate(){if(!arguments[0]){if(arguments[1]){arguments[1].apply(null)}return Promise.resolve()}if(browserDetails.version<78&&arguments[0]&&arguments[0].candidate===""){return Promise.resolve()}return nativeAddIceCandidate.apply(this,arguments)}}function fixNegotiationNeeded(window){utils.wrapPeerConnectionEvent(window,"negotiationneeded",function(e){var pc=e.target;if(pc.signalingState!=="stable"){return}return e})}},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.shimGetDisplayMedia=shimGetDisplayMedia;function shimGetDisplayMedia(window,getSourceId){if(window.navigator.mediaDevices&&"getDisplayMedia"in window.navigator.mediaDevices){return}if(!window.navigator.mediaDevices){return}if(typeof getSourceId!=="function"){console.error("shimGetDisplayMedia: getSourceId argument is not "+"a function");return}window.navigator.mediaDevices.getDisplayMedia=function getDisplayMedia(constraints){return getSourceId(constraints).then(function(sourceId){var widthSpecified=constraints.video&&constraints.video.width;var heightSpecified=constraints.video&&constraints.video.height;var frameRateSpecified=constraints.video&&constraints.video.frameRate;constraints.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:sourceId,maxFrameRate:frameRateSpecified||3}};if(widthSpecified){constraints.video.mandatory.maxWidth=widthSpecified}if(heightSpecified){constraints.video.mandatory.maxHeight=heightSpecified}return window.navigator.mediaDevices.getUserMedia(constraints)})}}},{}],5:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});var _typeof$1=typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"?function(obj){return _typeof(obj)}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof(obj)};exports.shimGetUserMedia=shimGetUserMedia;var _utils=require("../utils.js");var utils=_interopRequireWildcard(_utils);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var logging=utils.log;function shimGetUserMedia(window){var navigator=window&&window.navigator;if(!navigator.mediaDevices){return}var browserDetails=utils.detectBrowser(window);var constraintsToChrome_=function constraintsToChrome_(c){if((typeof c==="undefined"?"undefined":_typeof$1(c))!=="object"||c.mandatory||c.optional){return c}var cc={};Object.keys(c).forEach(function(key){if(key==="require"||key==="advanced"||key==="mediaSource"){return}var r=_typeof$1(c[key])==="object"?c[key]:{ideal:c[key]};if(r.exact!==undefined&&typeof r.exact==="number"){r.min=r.max=r.exact}var oldname_=function oldname_(prefix,name){if(prefix){return prefix+name.charAt(0).toUpperCase()+name.slice(1)}return name==="deviceId"?"sourceId":name};if(r.ideal!==undefined){cc.optional=cc.optional||[];var oc={};if(typeof r.ideal==="number"){oc[oldname_("min",key)]=r.ideal;cc.optional.push(oc);oc={};oc[oldname_("max",key)]=r.ideal;cc.optional.push(oc)}else{oc[oldname_("",key)]=r.ideal;cc.optional.push(oc)}}if(r.exact!==undefined&&typeof r.exact!=="number"){cc.mandatory=cc.mandatory||{};cc.mandatory[oldname_("",key)]=r.exact}else{["min","max"].forEach(function(mix){if(r[mix]!==undefined){cc.mandatory=cc.mandatory||{};cc.mandatory[oldname_(mix,key)]=r[mix]}})}});if(c.advanced){cc.optional=(cc.optional||[]).concat(c.advanced)}return cc};var shimConstraints_=function shimConstraints_(constraints,func){if(browserDetails.version>=61){return func(constraints)}constraints=JSON.parse(JSON.stringify(constraints));if(constraints&&_typeof$1(constraints.audio)==="object"){var remap=function remap(obj,a,b){if(a in obj&&!(b in obj)){obj[b]=obj[a];delete obj[a]}};constraints=JSON.parse(JSON.stringify(constraints));remap(constraints.audio,"autoGainControl","googAutoGainControl");remap(constraints.audio,"noiseSuppression","googNoiseSuppression");constraints.audio=constraintsToChrome_(constraints.audio)}if(constraints&&_typeof$1(constraints.video)==="object"){var face=constraints.video.facingMode;face=face&&((typeof face==="undefined"?"undefined":_typeof$1(face))==="object"?face:{ideal:face});var getSupportedFacingModeLies=browserDetails.version<66;if(face&&(face.exact==="user"||face.exact==="environment"||face.ideal==="user"||face.ideal==="environment")&&!(navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().facingMode&&!getSupportedFacingModeLies)){delete constraints.video.facingMode;var matches=void 0;if(face.exact==="environment"||face.ideal==="environment"){matches=["back","rear"]}else if(face.exact==="user"||face.ideal==="user"){matches=["front"]}if(matches){return navigator.mediaDevices.enumerateDevices().then(function(devices){devices=devices.filter(function(d){return d.kind==="videoinput"});var dev=devices.find(function(d){return matches.some(function(match){return d.label.toLowerCase().includes(match)})});if(!dev&&devices.length&&matches.includes("back")){dev=devices[devices.length-1]}if(dev){constraints.video.deviceId=face.exact?{exact:dev.deviceId}:{ideal:dev.deviceId}}constraints.video=constraintsToChrome_(constraints.video);logging("chrome: "+JSON.stringify(constraints));return func(constraints)})}}constraints.video=constraintsToChrome_(constraints.video)}logging("chrome: "+JSON.stringify(constraints));return func(constraints)};var shimError_=function shimError_(e){if(browserDetails.version>=64){return e}return{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function toString(){return this.name+(this.message&&": ")+this.message}}};var getUserMedia_=function getUserMedia_(constraints,onSuccess,onError){shimConstraints_(constraints,function(c){navigator.webkitGetUserMedia(c,onSuccess,function(e){if(onError){onError(shimError_(e))}})})};navigator.getUserMedia=getUserMedia_.bind(navigator);if(navigator.mediaDevices.getUserMedia){var origGetUserMedia=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(cs){return shimConstraints_(cs,function(c){return origGetUserMedia(c).then(function(stream){if(c.audio&&!stream.getAudioTracks().length||c.video&&!stream.getVideoTracks().length){stream.getTracks().forEach(function(track){track.stop()});throw new DOMException("","NotFoundError")}return stream},function(e){return Promise.reject(shimError_(e))})})}}}},{"../utils.js":15}],6:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});var _typeof$1=typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"?function(obj){return _typeof(obj)}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof(obj)};exports.shimRTCIceCandidate=shimRTCIceCandidate;exports.shimMaxMessageSize=shimMaxMessageSize;exports.shimSendThrowTypeError=shimSendThrowTypeError;exports.shimConnectionState=shimConnectionState;exports.removeAllowExtmapMixed=removeAllowExtmapMixed;var _sdp=require("sdp");var _sdp2=_interopRequireDefault(_sdp);var _utils=require("./utils");var utils=_interopRequireWildcard(_utils);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function shimRTCIceCandidate(window){if(!window.RTCIceCandidate||window.RTCIceCandidate&&"foundation"in window.RTCIceCandidate.prototype){return}var NativeRTCIceCandidate=window.RTCIceCandidate;window.RTCIceCandidate=function RTCIceCandidate(args){if((typeof args==="undefined"?"undefined":_typeof$1(args))==="object"&&args.candidate&&args.candidate.indexOf("a=")===0){args=JSON.parse(JSON.stringify(args));args.candidate=args.candidate.substr(2)}if(args.candidate&&args.candidate.length){var nativeCandidate=new NativeRTCIceCandidate(args);var parsedCandidate=_sdp2["default"].parseCandidate(args.candidate);var augmentedCandidate=Object.assign(nativeCandidate,parsedCandidate);augmentedCandidate.toJSON=function toJSON(){return{candidate:augmentedCandidate.candidate,sdpMid:augmentedCandidate.sdpMid,sdpMLineIndex:augmentedCandidate.sdpMLineIndex,usernameFragment:augmentedCandidate.usernameFragment}};return augmentedCandidate}return new NativeRTCIceCandidate(args)};window.RTCIceCandidate.prototype=NativeRTCIceCandidate.prototype;utils.wrapPeerConnectionEvent(window,"icecandidate",function(e){if(e.candidate){Object.defineProperty(e,"candidate",{value:new window.RTCIceCandidate(e.candidate),writable:"false"})}return e})}function shimMaxMessageSize(window){if(!window.RTCPeerConnection){return}var browserDetails=utils.detectBrowser(window);if(!("sctp"in window.RTCPeerConnection.prototype)){Object.defineProperty(window.RTCPeerConnection.prototype,"sctp",{get:function get(){return typeof this._sctp==="undefined"?null:this._sctp}})}var sctpInDescription=function sctpInDescription(description){if(!description||!description.sdp){return false}var sections=_sdp2["default"].splitSections(description.sdp);sections.shift();return sections.some(function(mediaSection){var mLine=_sdp2["default"].parseMLine(mediaSection);return mLine&&mLine.kind==="application"&&mLine.protocol.indexOf("SCTP")!==-1})};var getRemoteFirefoxVersion=function getRemoteFirefoxVersion(description){var match=description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(match===null||match.length<2){return-1}var version=parseInt(match[1],10);return version!==version?-1:version};var getCanSendMaxMessageSize=function getCanSendMaxMessageSize(remoteIsFirefox){var canSendMaxMessageSize=65536;if(browserDetails.browser==="firefox"){if(browserDetails.version<57){if(remoteIsFirefox===-1){canSendMaxMessageSize=16384}else{canSendMaxMessageSize=2147483637}}else if(browserDetails.version<60){canSendMaxMessageSize=browserDetails.version===57?65535:65536}else{canSendMaxMessageSize=2147483637}}return canSendMaxMessageSize};var getMaxMessageSize=function getMaxMessageSize(description,remoteIsFirefox){var maxMessageSize=65536;if(browserDetails.browser==="firefox"&&browserDetails.version===57){maxMessageSize=65535}var match=_sdp2["default"].matchPrefix(description.sdp,"a=max-message-size:");if(match.length>0){maxMessageSize=parseInt(match[0].substr(19),10)}else if(browserDetails.browser==="firefox"&&remoteIsFirefox!==-1){maxMessageSize=2147483637}return maxMessageSize};var origSetRemoteDescription=window.RTCPeerConnection.prototype.setRemoteDescription;window.RTCPeerConnection.prototype.setRemoteDescription=function setRemoteDescription(){this._sctp=null;if(browserDetails.browser==="chrome"&&browserDetails.version>=76){var _getConfiguration=this.getConfiguration(),sdpSemantics=_getConfiguration.sdpSemantics;if(sdpSemantics==="plan-b"){Object.defineProperty(this,"sctp",{get:function get(){return typeof this._sctp==="undefined"?null:this._sctp},enumerable:true,configurable:true})}}if(sctpInDescription(arguments[0])){var isFirefox=getRemoteFirefoxVersion(arguments[0]);var canSendMMS=getCanSendMaxMessageSize(isFirefox);var remoteMMS=getMaxMessageSize(arguments[0],isFirefox);var maxMessageSize=void 0;if(canSendMMS===0&&remoteMMS===0){maxMessageSize=Number.POSITIVE_INFINITY}else if(canSendMMS===0||remoteMMS===0){maxMessageSize=Math.max(canSendMMS,remoteMMS)}else{maxMessageSize=Math.min(canSendMMS,remoteMMS)}var sctp={};Object.defineProperty(sctp,"maxMessageSize",{get:function get(){return maxMessageSize}});this._sctp=sctp}return origSetRemoteDescription.apply(this,arguments)}}function shimSendThrowTypeError(window){if(!(window.RTCPeerConnection&&"createDataChannel"in window.RTCPeerConnection.prototype)){return}function wrapDcSend(dc,pc){var origDataChannelSend=dc.send;dc.send=function send(){var data=arguments[0];var length=data.length||data.size||data.byteLength;if(dc.readyState==="open"&&pc.sctp&&length>pc.sctp.maxMessageSize){throw new TypeError("Message too large (can send a maximum of "+pc.sctp.maxMessageSize+" bytes)")}return origDataChannelSend.apply(dc,arguments)}}var origCreateDataChannel=window.RTCPeerConnection.prototype.createDataChannel;window.RTCPeerConnection.prototype.createDataChannel=function createDataChannel(){var dataChannel=origCreateDataChannel.apply(this,arguments);wrapDcSend(dataChannel,this);return dataChannel};utils.wrapPeerConnectionEvent(window,"datachannel",function(e){wrapDcSend(e.channel,e.target);return e})}function shimConnectionState(window){if(!window.RTCPeerConnection||"connectionState"in window.RTCPeerConnection.prototype){return}var proto=window.RTCPeerConnection.prototype;Object.defineProperty(proto,"connectionState",{get:function get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:true,configurable:true});Object.defineProperty(proto,"onconnectionstatechange",{get:function get(){return this._onconnectionstatechange||null},set:function set(cb){if(this._onconnectionstatechange){this.removeEventListener("connectionstatechange",this._onconnectionstatechange);delete this._onconnectionstatechange}if(cb){this.addEventListener("connectionstatechange",this._onconnectionstatechange=cb)}},enumerable:true,configurable:true});["setLocalDescription","setRemoteDescription"].forEach(function(method){var origMethod=proto[method];proto[method]=function(){if(!this._connectionstatechangepoly){this._connectionstatechangepoly=function(e){var pc=e.target;if(pc._lastConnectionState!==pc.connectionState){pc._lastConnectionState=pc.connectionState;var newEvent=new Event("connectionstatechange",e);pc.dispatchEvent(newEvent)}return e};this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)}return origMethod.apply(this,arguments)}})}function removeAllowExtmapMixed(window){if(!window.RTCPeerConnection){return}var browserDetails=utils.detectBrowser(window);if(browserDetails.browser==="chrome"&&browserDetails.version>=71){return}var nativeSRD=window.RTCPeerConnection.prototype.setRemoteDescription;window.RTCPeerConnection.prototype.setRemoteDescription=function setRemoteDescription(desc){if(desc&&desc.sdp&&desc.sdp.indexOf("\na=extmap-allow-mixed")!==-1){desc.sdp=desc.sdp.split("\n").filter(function(line){return line.trim()!=="a=extmap-allow-mixed"}).join("\n")}return nativeSRD.apply(this,arguments)}}},{"./utils":15,sdp:17}],7:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.shimGetDisplayMedia=exports.shimGetUserMedia=undefined;var _getusermedia=require("./getusermedia");Object.defineProperty(exports,"shimGetUserMedia",{enumerable:true,get:function get(){return _getusermedia.shimGetUserMedia}});var _getdisplaymedia=require("./getdisplaymedia");Object.defineProperty(exports,"shimGetDisplayMedia",{enumerable:true,get:function get(){return _getdisplaymedia.shimGetDisplayMedia}});exports.shimPeerConnection=shimPeerConnection;exports.shimReplaceTrack=shimReplaceTrack;var _utils=require("../utils");var utils=_interopRequireWildcard(_utils);var _filtericeservers=require("./filtericeservers");var _rtcpeerconnectionShim=require("rtcpeerconnection-shim");var _rtcpeerconnectionShim2=_interopRequireDefault(_rtcpeerconnectionShim);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function shimPeerConnection(window){var browserDetails=utils.detectBrowser(window);if(window.RTCIceGatherer){if(!window.RTCIceCandidate){window.RTCIceCandidate=function RTCIceCandidate(args){return args}}if(!window.RTCSessionDescription){window.RTCSessionDescription=function RTCSessionDescription(args){return args}}if(browserDetails.version<15025){var origMSTEnabled=Object.getOwnPropertyDescriptor(window.MediaStreamTrack.prototype,"enabled");Object.defineProperty(window.MediaStreamTrack.prototype,"enabled",{set:function set(value){origMSTEnabled.set.call(this,value);var ev=new Event("enabled");ev.enabled=value;this.dispatchEvent(ev)}})}}if(window.RTCRtpSender&&!("dtmf"in window.RTCRtpSender.prototype)){Object.defineProperty(window.RTCRtpSender.prototype,"dtmf",{get:function get(){if(this._dtmf===undefined){if(this.track.kind==="audio"){this._dtmf=new window.RTCDtmfSender(this)}else if(this.track.kind==="video"){this._dtmf=null}}return this._dtmf}})}if(window.RTCDtmfSender&&!window.RTCDTMFSender){window.RTCDTMFSender=window.RTCDtmfSender}var RTCPeerConnectionShim=(0,_rtcpeerconnectionShim2["default"])(window,browserDetails.version);window.RTCPeerConnection=function RTCPeerConnection(config){if(config&&config.iceServers){config.iceServers=(0,_filtericeservers.filterIceServers)(config.iceServers,browserDetails.version);utils.log("ICE servers after filtering:",config.iceServers)}return new RTCPeerConnectionShim(config)};window.RTCPeerConnection.prototype=RTCPeerConnectionShim.prototype}function shimReplaceTrack(window){if(window.RTCRtpSender&&!("replaceTrack"in window.RTCRtpSender.prototype)){window.RTCRtpSender.prototype.replaceTrack=window.RTCRtpSender.prototype.setTrack}}},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}],8:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.filterIceServers=filterIceServers;var _utils=require("../utils");var utils=_interopRequireWildcard(_utils);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function filterIceServers(iceServers,edgeVersion){var hasTurn=false;iceServers=JSON.parse(JSON.stringify(iceServers));return iceServers.filter(function(server){if(server&&(server.urls||server.url)){var urls=server.urls||server.url;if(server.url&&!server.urls){utils.deprecated("RTCIceServer.url","RTCIceServer.urls")}var isString=typeof urls==="string";if(isString){urls=[urls]}urls=urls.filter(function(url){if(url.indexOf("stun:")===0){return false}var validTurn=url.startsWith("turn")&&!url.startsWith("turn:[")&&url.includes("transport=udp");if(validTurn&&!hasTurn){hasTurn=true;return true}return validTurn&&!hasTurn});delete server.url;server.urls=isString?urls[0]:urls;return!!urls.length}})}},{"../utils":15}],9:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.shimGetDisplayMedia=shimGetDisplayMedia;function shimGetDisplayMedia(window){if(!("getDisplayMedia"in window.navigator)){return}if(!window.navigator.mediaDevices){return}if(window.navigator.mediaDevices&&"getDisplayMedia"in window.navigator.mediaDevices){return}window.navigator.mediaDevices.getDisplayMedia=window.navigator.getDisplayMedia.bind(window.navigator)}},{}],10:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.shimGetUserMedia=shimGetUserMedia;function shimGetUserMedia(window){var navigator=window&&window.navigator;var shimError_=function shimError_(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString:function toString(){return this.name}}};var origGetUserMedia=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(c){return origGetUserMedia(c)["catch"](function(e){return Promise.reject(shimError_(e))})}}},{}],11:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.shimGetDisplayMedia=exports.shimGetUserMedia=undefined;var _typeof$1=typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"?function(obj){return _typeof(obj)}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof(obj)};var _getusermedia=require("./getusermedia");Object.defineProperty(exports,"shimGetUserMedia",{enumerable:true,get:function get(){return _getusermedia.shimGetUserMedia}});var _getdisplaymedia=require("./getdisplaymedia");Object.defineProperty(exports,"shimGetDisplayMedia",{enumerable:true,get:function get(){return _getdisplaymedia.shimGetDisplayMedia}});exports.shimOnTrack=shimOnTrack;exports.shimPeerConnection=shimPeerConnection;exports.shimSenderGetStats=shimSenderGetStats;exports.shimReceiverGetStats=shimReceiverGetStats;exports.shimRemoveStream=shimRemoveStream;exports.shimRTCDataChannel=shimRTCDataChannel;exports.shimAddTransceiver=shimAddTransceiver;exports.shimCreateOffer=shimCreateOffer;exports.shimCreateAnswer=shimCreateAnswer;var _utils=require("../utils");var utils=_interopRequireWildcard(_utils);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function shimOnTrack(window){if((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCTrackEvent&&"receiver"in window.RTCTrackEvent.prototype&&!("transceiver"in window.RTCTrackEvent.prototype)){Object.defineProperty(window.RTCTrackEvent.prototype,"transceiver",{get:function get(){return{receiver:this.receiver}}})}}function shimPeerConnection(window){var browserDetails=utils.detectBrowser(window);if((typeof window==="undefined"?"undefined":_typeof$1(window))!=="object"||!(window.RTCPeerConnection||window.mozRTCPeerConnection)){return}if(!window.RTCPeerConnection&&window.mozRTCPeerConnection){window.RTCPeerConnection=window.mozRTCPeerConnection}if(browserDetails.version<53){["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(method){var nativeMethod=window.RTCPeerConnection.prototype[method];var methodObj=_defineProperty({},method,function(){arguments[0]=new(method==="addIceCandidate"?window.RTCIceCandidate:window.RTCSessionDescription)(arguments[0]);return nativeMethod.apply(this,arguments)});window.RTCPeerConnection.prototype[method]=methodObj[method]})}if(browserDetails.version<68){var nativeAddIceCandidate=window.RTCPeerConnection.prototype.addIceCandidate;window.RTCPeerConnection.prototype.addIceCandidate=function addIceCandidate(){if(!arguments[0]){if(arguments[1]){arguments[1].apply(null)}return Promise.resolve()}if(arguments[0]&&arguments[0].candidate===""){return Promise.resolve()}return nativeAddIceCandidate.apply(this,arguments)}}var modernStatsTypes={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"};var nativeGetStats=window.RTCPeerConnection.prototype.getStats;window.RTCPeerConnection.prototype.getStats=function getStats(){var _arguments=Array.prototype.slice.call(arguments),selector=_arguments[0],onSucc=_arguments[1],onErr=_arguments[2];return nativeGetStats.apply(this,[selector||null]).then(function(stats){if(browserDetails.version<53&&!onSucc){try{stats.forEach(function(stat){stat.type=modernStatsTypes[stat.type]||stat.type})}catch(e){if(e.name!=="TypeError"){throw e}stats.forEach(function(stat,i){stats.set(i,Object.assign({},stat,{type:modernStatsTypes[stat.type]||stat.type}))})}}return stats}).then(onSucc,onErr)}}function shimSenderGetStats(window){if(!((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCPeerConnection&&window.RTCRtpSender)){return}if(window.RTCRtpSender&&"getStats"in window.RTCRtpSender.prototype){return}var origGetSenders=window.RTCPeerConnection.prototype.getSenders;if(origGetSenders){window.RTCPeerConnection.prototype.getSenders=function getSenders(){var _this=this;var senders=origGetSenders.apply(this,[]);senders.forEach(function(sender){return sender._pc=_this});return senders}}var origAddTrack=window.RTCPeerConnection.prototype.addTrack;if(origAddTrack){window.RTCPeerConnection.prototype.addTrack=function addTrack(){var sender=origAddTrack.apply(this,arguments);sender._pc=this;return sender}}window.RTCRtpSender.prototype.getStats=function getStats(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function shimReceiverGetStats(window){if(!((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCPeerConnection&&window.RTCRtpSender)){return}if(window.RTCRtpSender&&"getStats"in window.RTCRtpReceiver.prototype){return}var origGetReceivers=window.RTCPeerConnection.prototype.getReceivers;if(origGetReceivers){window.RTCPeerConnection.prototype.getReceivers=function getReceivers(){var _this2=this;var receivers=origGetReceivers.apply(this,[]);receivers.forEach(function(receiver){return receiver._pc=_this2});return receivers}}utils.wrapPeerConnectionEvent(window,"track",function(e){e.receiver._pc=e.srcElement;return e});window.RTCRtpReceiver.prototype.getStats=function getStats(){return this._pc.getStats(this.track)}}function shimRemoveStream(window){if(!window.RTCPeerConnection||"removeStream"in window.RTCPeerConnection.prototype){return}window.RTCPeerConnection.prototype.removeStream=function removeStream(stream){var _this3=this;utils.deprecated("removeStream","removeTrack");this.getSenders().forEach(function(sender){if(sender.track&&stream.getTracks().includes(sender.track)){_this3.removeTrack(sender)}})}}function shimRTCDataChannel(window){if(window.DataChannel&&!window.RTCDataChannel){window.RTCDataChannel=window.DataChannel}}function shimAddTransceiver(window){if(!((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCPeerConnection)){return}var origAddTransceiver=window.RTCPeerConnection.prototype.addTransceiver;if(origAddTransceiver){window.RTCPeerConnection.prototype.addTransceiver=function addTransceiver(){this.setParametersPromises=[];var initParameters=arguments[1];var shouldPerformCheck=initParameters&&"sendEncodings"in initParameters;if(shouldPerformCheck){initParameters.sendEncodings.forEach(function(encodingParam){if("rid"in encodingParam){var ridRegex=/^[a-z0-9]{0,16}$/i;if(!ridRegex.test(encodingParam.rid)){throw new TypeError("Invalid RID value provided.")}}if("scaleResolutionDownBy"in encodingParam){if(!(parseFloat(encodingParam.scaleResolutionDownBy)>=1)){throw new RangeError("scale_resolution_down_by must be >= 1.0")}}if("maxFramerate"in encodingParam){if(!(parseFloat(encodingParam.maxFramerate)>=0)){throw new RangeError("max_framerate must be >= 0.0")}}})}var transceiver=origAddTransceiver.apply(this,arguments);if(shouldPerformCheck){var sender=transceiver.sender;var params=sender.getParameters();if(!("encodings"in params)){params.encodings=initParameters.sendEncodings;this.setParametersPromises.push(sender.setParameters(params)["catch"](function(){}))}}return transceiver}}}function shimCreateOffer(window){if(!((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCPeerConnection)){return}var origCreateOffer=window.RTCPeerConnection.prototype.createOffer;window.RTCPeerConnection.prototype.createOffer=function createOffer(){var _this4=this,_arguments2=arguments;if(this.setParametersPromises&&this.setParametersPromises.length){return Promise.all(this.setParametersPromises).then(function(){return origCreateOffer.apply(_this4,_arguments2)})["finally"](function(){_this4.setParametersPromises=[]})}return origCreateOffer.apply(this,arguments)}}function shimCreateAnswer(window){if(!((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCPeerConnection)){return}var origCreateAnswer=window.RTCPeerConnection.prototype.createAnswer;window.RTCPeerConnection.prototype.createAnswer=function createAnswer(){var _this5=this,_arguments3=arguments;if(this.setParametersPromises&&this.setParametersPromises.length){return Promise.all(this.setParametersPromises).then(function(){return origCreateAnswer.apply(_this5,_arguments3)})["finally"](function(){_this5.setParametersPromises=[]})}return origCreateAnswer.apply(this,arguments)}}},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});exports.shimGetDisplayMedia=shimGetDisplayMedia;function shimGetDisplayMedia(window,preferredMediaSource){if(window.navigator.mediaDevices&&"getDisplayMedia"in window.navigator.mediaDevices){return}if(!window.navigator.mediaDevices){return}window.navigator.mediaDevices.getDisplayMedia=function getDisplayMedia(constraints){if(!(constraints&&constraints.video)){var err=new DOMException("getDisplayMedia without video "+"constraints is undefined");err.name="NotFoundError";err.code=8;return Promise.reject(err)}if(constraints.video===true){constraints.video={mediaSource:preferredMediaSource}}else{constraints.video.mediaSource=preferredMediaSource}return window.navigator.mediaDevices.getUserMedia(constraints)}}},{}],13:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});var _typeof$1=typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"?function(obj){return _typeof(obj)}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof(obj)};exports.shimGetUserMedia=shimGetUserMedia;var _utils=require("../utils");var utils=_interopRequireWildcard(_utils);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function shimGetUserMedia(window){var browserDetails=utils.detectBrowser(window);var navigator=window&&window.navigator;var MediaStreamTrack=window&&window.MediaStreamTrack;navigator.getUserMedia=function(constraints,onSuccess,onError){utils.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia");navigator.mediaDevices.getUserMedia(constraints).then(onSuccess,onError)};if(!(browserDetails.version>55&&"autoGainControl"in navigator.mediaDevices.getSupportedConstraints())){var remap=function remap(obj,a,b){if(a in obj&&!(b in obj)){obj[b]=obj[a];delete obj[a]}};var nativeGetUserMedia=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(c){if((typeof c==="undefined"?"undefined":_typeof$1(c))==="object"&&_typeof$1(c.audio)==="object"){c=JSON.parse(JSON.stringify(c));remap(c.audio,"autoGainControl","mozAutoGainControl");remap(c.audio,"noiseSuppression","mozNoiseSuppression")}return nativeGetUserMedia(c)};if(MediaStreamTrack&&MediaStreamTrack.prototype.getSettings){var nativeGetSettings=MediaStreamTrack.prototype.getSettings;MediaStreamTrack.prototype.getSettings=function(){var obj=nativeGetSettings.apply(this,arguments);remap(obj,"mozAutoGainControl","autoGainControl");remap(obj,"mozNoiseSuppression","noiseSuppression");return obj}}if(MediaStreamTrack&&MediaStreamTrack.prototype.applyConstraints){var nativeApplyConstraints=MediaStreamTrack.prototype.applyConstraints;MediaStreamTrack.prototype.applyConstraints=function(c){if(this.kind==="audio"&&(typeof c==="undefined"?"undefined":_typeof$1(c))==="object"){c=JSON.parse(JSON.stringify(c));remap(c,"autoGainControl","mozAutoGainControl");remap(c,"noiseSuppression","mozNoiseSuppression")}return nativeApplyConstraints.apply(this,[c])}}}}},{"../utils":15}],14:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});var _typeof$1=typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"?function(obj){return _typeof(obj)}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof(obj)};exports.shimLocalStreamsAPI=shimLocalStreamsAPI;exports.shimRemoteStreamsAPI=shimRemoteStreamsAPI;exports.shimCallbacksAPI=shimCallbacksAPI;exports.shimGetUserMedia=shimGetUserMedia;exports.shimConstraints=shimConstraints;exports.shimRTCIceServerUrls=shimRTCIceServerUrls;exports.shimTrackEventTransceiver=shimTrackEventTransceiver;exports.shimCreateOfferLegacy=shimCreateOfferLegacy;var _utils=require("../utils");var utils=_interopRequireWildcard(_utils);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function shimLocalStreamsAPI(window){if((typeof window==="undefined"?"undefined":_typeof$1(window))!=="object"||!window.RTCPeerConnection){return}if(!("getLocalStreams"in window.RTCPeerConnection.prototype)){window.RTCPeerConnection.prototype.getLocalStreams=function getLocalStreams(){if(!this._localStreams){this._localStreams=[]}return this._localStreams}}if(!("addStream"in window.RTCPeerConnection.prototype)){var _addTrack=window.RTCPeerConnection.prototype.addTrack;window.RTCPeerConnection.prototype.addStream=function addStream(stream){var _this=this;if(!this._localStreams){this._localStreams=[]}if(!this._localStreams.includes(stream)){this._localStreams.push(stream)}stream.getAudioTracks().forEach(function(track){return _addTrack.call(_this,track,stream)});stream.getVideoTracks().forEach(function(track){return _addTrack.call(_this,track,stream)})};window.RTCPeerConnection.prototype.addTrack=function addTrack(track){var stream=arguments[1];if(stream){if(!this._localStreams){this._localStreams=[stream]}else if(!this._localStreams.includes(stream)){this._localStreams.push(stream)}}return _addTrack.apply(this,arguments)}}if(!("removeStream"in window.RTCPeerConnection.prototype)){window.RTCPeerConnection.prototype.removeStream=function removeStream(stream){var _this2=this;if(!this._localStreams){this._localStreams=[]}var index=this._localStreams.indexOf(stream);if(index===-1){return}this._localStreams.splice(index,1);var tracks=stream.getTracks();this.getSenders().forEach(function(sender){if(tracks.includes(sender.track)){_this2.removeTrack(sender)}})}}}function shimRemoteStreamsAPI(window){if((typeof window==="undefined"?"undefined":_typeof$1(window))!=="object"||!window.RTCPeerConnection){return}if(!("getRemoteStreams"in window.RTCPeerConnection.prototype)){window.RTCPeerConnection.prototype.getRemoteStreams=function getRemoteStreams(){return this._remoteStreams?this._remoteStreams:[]}}if(!("onaddstream"in window.RTCPeerConnection.prototype)){Object.defineProperty(window.RTCPeerConnection.prototype,"onaddstream",{get:function get(){return this._onaddstream},set:function set(f){var _this3=this;if(this._onaddstream){this.removeEventListener("addstream",this._onaddstream);this.removeEventListener("track",this._onaddstreampoly)}this.addEventListener("addstream",this._onaddstream=f);this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach(function(stream){if(!_this3._remoteStreams){_this3._remoteStreams=[]}if(_this3._remoteStreams.includes(stream)){return}_this3._remoteStreams.push(stream);var event=new Event("addstream");event.stream=stream;_this3.dispatchEvent(event)})})}});var origSetRemoteDescription=window.RTCPeerConnection.prototype.setRemoteDescription;window.RTCPeerConnection.prototype.setRemoteDescription=function setRemoteDescription(){var pc=this;if(!this._onaddstreampoly){this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach(function(stream){if(!pc._remoteStreams){pc._remoteStreams=[]}if(pc._remoteStreams.indexOf(stream)>=0){return}pc._remoteStreams.push(stream);var event=new Event("addstream");event.stream=stream;pc.dispatchEvent(event)})})}return origSetRemoteDescription.apply(pc,arguments)}}}function shimCallbacksAPI(window){if((typeof window==="undefined"?"undefined":_typeof$1(window))!=="object"||!window.RTCPeerConnection){return}var prototype=window.RTCPeerConnection.prototype;var origCreateOffer=prototype.createOffer;var origCreateAnswer=prototype.createAnswer;var setLocalDescription=prototype.setLocalDescription;var setRemoteDescription=prototype.setRemoteDescription;var addIceCandidate=prototype.addIceCandidate;prototype.createOffer=function createOffer(successCallback,failureCallback){var options=arguments.length>=2?arguments[2]:arguments[0];var promise=origCreateOffer.apply(this,[options]);if(!failureCallback){return promise}promise.then(successCallback,failureCallback);return Promise.resolve()};prototype.createAnswer=function createAnswer(successCallback,failureCallback){var options=arguments.length>=2?arguments[2]:arguments[0];var promise=origCreateAnswer.apply(this,[options]);if(!failureCallback){return promise}promise.then(successCallback,failureCallback);return Promise.resolve()};var withCallback=function withCallback(description,successCallback,failureCallback){var promise=setLocalDescription.apply(this,[description]);if(!failureCallback){return promise}promise.then(successCallback,failureCallback);return Promise.resolve()};prototype.setLocalDescription=withCallback;withCallback=function withCallback(description,successCallback,failureCallback){var promise=setRemoteDescription.apply(this,[description]);if(!failureCallback){return promise}promise.then(successCallback,failureCallback);return Promise.resolve()};prototype.setRemoteDescription=withCallback;withCallback=function withCallback(candidate,successCallback,failureCallback){var promise=addIceCandidate.apply(this,[candidate]);if(!failureCallback){return promise}promise.then(successCallback,failureCallback);return Promise.resolve()};prototype.addIceCandidate=withCallback}function shimGetUserMedia(window){var navigator=window&&window.navigator;if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){var mediaDevices=navigator.mediaDevices;var _getUserMedia=mediaDevices.getUserMedia.bind(mediaDevices);navigator.mediaDevices.getUserMedia=function(constraints){return _getUserMedia(shimConstraints(constraints))}}if(!navigator.getUserMedia&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia){navigator.getUserMedia=function getUserMedia(constraints,cb,errcb){navigator.mediaDevices.getUserMedia(constraints).then(cb,errcb)}.bind(navigator)}}function shimConstraints(constraints){if(constraints&&constraints.video!==undefined){return Object.assign({},constraints,{video:utils.compactObject(constraints.video)})}return constraints}function shimRTCIceServerUrls(window){var OrigPeerConnection=window.RTCPeerConnection;window.RTCPeerConnection=function RTCPeerConnection(pcConfig,pcConstraints){if(pcConfig&&pcConfig.iceServers){var newIceServers=[];for(var i=0;i<pcConfig.iceServers.length;i++){var server=pcConfig.iceServers[i];if(!server.hasOwnProperty("urls")&&server.hasOwnProperty("url")){utils.deprecated("RTCIceServer.url","RTCIceServer.urls");server=JSON.parse(JSON.stringify(server));server.urls=server.url;delete server.url;newIceServers.push(server)}else{newIceServers.push(pcConfig.iceServers[i])}}pcConfig.iceServers=newIceServers}return new OrigPeerConnection(pcConfig,pcConstraints)};window.RTCPeerConnection.prototype=OrigPeerConnection.prototype;if("generateCertificate"in window.RTCPeerConnection){Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function get(){return OrigPeerConnection.generateCertificate}})}}function shimTrackEventTransceiver(window){if((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"&&window.RTCTrackEvent&&"receiver"in window.RTCTrackEvent.prototype&&!("transceiver"in window.RTCTrackEvent.prototype)){Object.defineProperty(window.RTCTrackEvent.prototype,"transceiver",{get:function get(){return{receiver:this.receiver}}})}}function shimCreateOfferLegacy(window){var origCreateOffer=window.RTCPeerConnection.prototype.createOffer;window.RTCPeerConnection.prototype.createOffer=function createOffer(offerOptions){if(offerOptions){if(typeof offerOptions.offerToReceiveAudio!=="undefined"){offerOptions.offerToReceiveAudio=!!offerOptions.offerToReceiveAudio}var audioTransceiver=this.getTransceivers().find(function(transceiver){return transceiver.receiver.track.kind==="audio"});if(offerOptions.offerToReceiveAudio===false&&audioTransceiver){if(audioTransceiver.direction==="sendrecv"){if(audioTransceiver.setDirection){audioTransceiver.setDirection("sendonly")}else{audioTransceiver.direction="sendonly"}}else if(audioTransceiver.direction==="recvonly"){if(audioTransceiver.setDirection){audioTransceiver.setDirection("inactive")}else{audioTransceiver.direction="inactive"}}}else if(offerOptions.offerToReceiveAudio===true&&!audioTransceiver){this.addTransceiver("audio")}if(typeof offerOptions.offerToReceiveVideo!=="undefined"){offerOptions.offerToReceiveVideo=!!offerOptions.offerToReceiveVideo}var videoTransceiver=this.getTransceivers().find(function(transceiver){return transceiver.receiver.track.kind==="video"});if(offerOptions.offerToReceiveVideo===false&&videoTransceiver){if(videoTransceiver.direction==="sendrecv"){if(videoTransceiver.setDirection){videoTransceiver.setDirection("sendonly")}else{videoTransceiver.direction="sendonly"}}else if(videoTransceiver.direction==="recvonly"){if(videoTransceiver.setDirection){videoTransceiver.setDirection("inactive")}else{videoTransceiver.direction="inactive"}}}else if(offerOptions.offerToReceiveVideo===true&&!videoTransceiver){this.addTransceiver("video")}}return origCreateOffer.apply(this,arguments)}}},{"../utils":15}],15:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:true});var _typeof$1=typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"?function(obj){return _typeof(obj)}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof(obj)};exports.extractVersion=extractVersion;exports.wrapPeerConnectionEvent=wrapPeerConnectionEvent;exports.disableLog=disableLog;exports.disableWarnings=disableWarnings;exports.log=log;exports.deprecated=deprecated;exports.detectBrowser=detectBrowser;exports.compactObject=compactObject;exports.walkStats=walkStats;exports.filterStats=filterStats;function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}var logDisabled_=true;var deprecationWarnings_=true;function extractVersion(uastring,expr,pos){var match=uastring.match(expr);return match&&match.length>=pos&&parseInt(match[pos],10)}function wrapPeerConnectionEvent(window,eventNameToWrap,wrapper){if(!window.RTCPeerConnection){return}var proto=window.RTCPeerConnection.prototype;var nativeAddEventListener=proto.addEventListener;proto.addEventListener=function(nativeEventName,cb){if(nativeEventName!==eventNameToWrap){return nativeAddEventListener.apply(this,arguments)}var wrappedCallback=function wrappedCallback(e){var modifiedEvent=wrapper(e);if(modifiedEvent){cb(modifiedEvent)}};this._eventMap=this._eventMap||{};this._eventMap[cb]=wrappedCallback;return nativeAddEventListener.apply(this,[nativeEventName,wrappedCallback])};var nativeRemoveEventListener=proto.removeEventListener;proto.removeEventListener=function(nativeEventName,cb){if(nativeEventName!==eventNameToWrap||!this._eventMap||!this._eventMap[cb]){return nativeRemoveEventListener.apply(this,arguments)}var unwrappedCb=this._eventMap[cb];delete this._eventMap[cb];return nativeRemoveEventListener.apply(this,[nativeEventName,unwrappedCb])};Object.defineProperty(proto,"on"+eventNameToWrap,{get:function get(){return this["_on"+eventNameToWrap]},set:function set(cb){if(this["_on"+eventNameToWrap]){this.removeEventListener(eventNameToWrap,this["_on"+eventNameToWrap]);delete this["_on"+eventNameToWrap]}if(cb){this.addEventListener(eventNameToWrap,this["_on"+eventNameToWrap]=cb)}},enumerable:true,configurable:true})}function disableLog(bool){if(typeof bool!=="boolean"){return new Error("Argument type: "+(typeof bool==="undefined"?"undefined":_typeof$1(bool))+". Please use a boolean.")}logDisabled_=bool;return bool?"adapter.js logging disabled":"adapter.js logging enabled"}function disableWarnings(bool){if(typeof bool!=="boolean"){return new Error("Argument type: "+(typeof bool==="undefined"?"undefined":_typeof$1(bool))+". Please use a boolean.")}deprecationWarnings_=!bool;return"adapter.js deprecation warnings "+(bool?"disabled":"enabled")}function log(){if((typeof window==="undefined"?"undefined":_typeof$1(window))==="object"){if(logDisabled_){return}if(typeof console!=="undefined"&&typeof console.log==="function"){console.log.apply(console,arguments)}}}function deprecated(oldMethod,newMethod){if(!deprecationWarnings_){return}console.warn(oldMethod+" is deprecated, please use "+newMethod+" instead.")}function detectBrowser(window){var navigator=window.navigator;var result={browser:null,version:null};if(typeof window==="undefined"||!window.navigator){result.browser="Not a browser.";return result}if(navigator.mozGetUserMedia){result.browser="firefox";result.version=extractVersion(navigator.userAgent,/Firefox\/(\d+)\./,1)}else if(navigator.webkitGetUserMedia||window.isSecureContext===false&&window.webkitRTCPeerConnection&&!window.RTCIceGatherer){result.browser="chrome";result.version=extractVersion(navigator.userAgent,/Chrom(e|ium)\/(\d+)\./,2)}else if(navigator.mediaDevices&&navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)){result.browser="edge";result.version=extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2)}else if(window.RTCPeerConnection&&navigator.userAgent.match(/AppleWebKit\/(\d+)\./)){result.browser="safari";result.version=extractVersion(navigator.userAgent,/AppleWebKit\/(\d+)\./,1);result.supportsUnifiedPlan=window.RTCRtpTransceiver&&"currentDirection"in window.RTCRtpTransceiver.prototype}else{result.browser="Not a supported browser.";return result}return result}function isObject(val){return Object.prototype.toString.call(val)==="[object Object]"}function compactObject(data){if(!isObject(data)){return data}return Object.keys(data).reduce(function(accumulator,key){var isObj=isObject(data[key]);var value=isObj?compactObject(data[key]):data[key];var isEmptyObject=isObj&&!Object.keys(value).length;if(value===undefined||isEmptyObject){return accumulator}return Object.assign(accumulator,_defineProperty({},key,value))},{})}function walkStats(stats,base,resultSet){if(!base||resultSet.has(base.id)){return}resultSet.set(base.id,base);Object.keys(base).forEach(function(name){if(name.endsWith("Id")){walkStats(stats,stats.get(base[name]),resultSet)}else if(name.endsWith("Ids")){base[name].forEach(function(id){walkStats(stats,stats.get(id),resultSet)})}})}function filterStats(result,track,outbound){var streamStatsType=outbound?"outbound-rtp":"inbound-rtp";var filteredResult=new Map;if(track===null){return filteredResult}var trackStats=[];result.forEach(function(value){if(value.type==="track"&&value.trackIdentifier===track.id){trackStats.push(value)}});trackStats.forEach(function(trackStat){result.forEach(function(stats){if(stats.type===streamStatsType&&stats.trackId===trackStat.id){walkStats(result,stats,filteredResult)}})});return filteredResult}},{}],16:[function(require,module,exports){var SDPUtils=require("sdp");function fixStatsType(stat){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[stat.type]||stat.type}function writeMediaSection(transceiver,caps,type,stream,dtlsRole){var sdp=SDPUtils.writeRtpDescription(transceiver.kind,caps);sdp+=SDPUtils.writeIceParameters(transceiver.iceGatherer.getLocalParameters());sdp+=SDPUtils.writeDtlsParameters(transceiver.dtlsTransport.getLocalParameters(),type==="offer"?"actpass":dtlsRole||"active");sdp+="a=mid:"+transceiver.mid+"\r\n";if(transceiver.rtpSender&&transceiver.rtpReceiver){sdp+="a=sendrecv\r\n"}else if(transceiver.rtpSender){sdp+="a=sendonly\r\n"}else if(transceiver.rtpReceiver){sdp+="a=recvonly\r\n"}else{sdp+="a=inactive\r\n"}if(transceiver.rtpSender){var trackId=transceiver.rtpSender._initialTrackId||transceiver.rtpSender.track.id;transceiver.rtpSender._initialTrackId=trackId;var msid="msid:"+(stream?stream.id:"-")+" "+trackId+"\r\n";sdp+="a="+msid;sdp+="a=ssrc:"+transceiver.sendEncodingParameters[0].ssrc+" "+msid;if(transceiver.sendEncodingParameters[0].rtx){sdp+="a=ssrc:"+transceiver.sendEncodingParameters[0].rtx.ssrc+" "+msid;sdp+="a=ssrc-group:FID "+transceiver.sendEncodingParameters[0].ssrc+" "+transceiver.sendEncodingParameters[0].rtx.ssrc+"\r\n"}}sdp+="a=ssrc:"+transceiver.sendEncodingParameters[0].ssrc+" cname:"+SDPUtils.localCName+"\r\n";if(transceiver.rtpSender&&transceiver.sendEncodingParameters[0].rtx){sdp+="a=ssrc:"+transceiver.sendEncodingParameters[0].rtx.ssrc+" cname:"+SDPUtils.localCName+"\r\n"}return sdp}function filterIceServers(iceServers,edgeVersion){var hasTurn=false;iceServers=JSON.parse(JSON.stringify(iceServers));return iceServers.filter(function(server){if(server&&(server.urls||server.url)){var urls=server.urls||server.url;if(server.url&&!server.urls){console.warn("RTCIceServer.url is deprecated! Use urls instead.")}var isString=typeof urls==="string";if(isString){urls=[urls]}urls=urls.filter(function(url){var validTurn=url.indexOf("turn:")===0&&url.indexOf("transport=udp")!==-1&&url.indexOf("turn:[")===-1&&!hasTurn;if(validTurn){hasTurn=true;return true}return url.indexOf("stun:")===0&&edgeVersion>=14393&&url.indexOf("?transport=udp")===-1});delete server.url;server.urls=isString?urls[0]:urls;return!!urls.length}})}function getCommonCapabilities(localCapabilities,remoteCapabilities){var commonCapabilities={codecs:[],headerExtensions:[],fecMechanisms:[]};var findCodecByPayloadType=function findCodecByPayloadType(pt,codecs){pt=parseInt(pt,10);for(var i=0;i<codecs.length;i++){if(codecs[i].payloadType===pt||codecs[i].preferredPayloadType===pt){return codecs[i]}}};var rtxCapabilityMatches=function rtxCapabilityMatches(lRtx,rRtx,lCodecs,rCodecs){var lCodec=findCodecByPayloadType(lRtx.parameters.apt,lCodecs);var rCodec=findCodecByPayloadType(rRtx.parameters.apt,rCodecs);return lCodec&&rCodec&&lCodec.name.toLowerCase()===rCodec.name.toLowerCase()};localCapabilities.codecs.forEach(function(lCodec){for(var i=0;i<remoteCapabilities.codecs.length;i++){var rCodec=remoteCapabilities.codecs[i];if(lCodec.name.toLowerCase()===rCodec.name.toLowerCase()&&lCodec.clockRate===rCodec.clockRate){if(lCodec.name.toLowerCase()==="rtx"&&lCodec.parameters&&rCodec.parameters.apt){if(!rtxCapabilityMatches(lCodec,rCodec,localCapabilities.codecs,remoteCapabilities.codecs)){continue}}rCodec=JSON.parse(JSON.stringify(rCodec));rCodec.numChannels=Math.min(lCodec.numChannels,rCodec.numChannels);commonCapabilities.codecs.push(rCodec);rCodec.rtcpFeedback=rCodec.rtcpFeedback.filter(function(fb){for(var j=0;j<lCodec.rtcpFeedback.length;j++){if(lCodec.rtcpFeedback[j].type===fb.type&&lCodec.rtcpFeedback[j].parameter===fb.parameter){return true}}return false});break}}});localCapabilities.headerExtensions.forEach(function(lHeaderExtension){for(var i=0;i<remoteCapabilities.headerExtensions.length;i++){var rHeaderExtension=remoteCapabilities.headerExtensions[i];if(lHeaderExtension.uri===rHeaderExtension.uri){commonCapabilities.headerExtensions.push(rHeaderExtension);break}}});return commonCapabilities}function isActionAllowedInSignalingState(action,type,signalingState){return{offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[type][action].indexOf(signalingState)!==-1}function maybeAddCandidate(iceTransport,candidate){var alreadyAdded=iceTransport.getRemoteCandidates().find(function(remoteCandidate){return candidate.foundation===remoteCandidate.foundation&&candidate.ip===remoteCandidate.ip&&candidate.port===remoteCandidate.port&&candidate.priority===remoteCandidate.priority&&candidate.protocol===remoteCandidate.protocol&&candidate.type===remoteCandidate.type});if(!alreadyAdded){iceTransport.addRemoteCandidate(candidate)}return!alreadyAdded}function makeError(name,description){var e=new Error(description);e.name=name;e.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:undefined,OperationError:undefined}[name];return e}module.exports=function(window,edgeVersion){function addTrackToStreamAndFireEvent(track,stream){stream.addTrack(track);stream.dispatchEvent(new window.MediaStreamTrackEvent("addtrack",{track:track}))}function removeTrackFromStreamAndFireEvent(track,stream){stream.removeTrack(track);stream.dispatchEvent(new window.MediaStreamTrackEvent("removetrack",{track:track}))}function fireAddTrack(pc,track,receiver,streams){var trackEvent=new Event("track");trackEvent.track=track;trackEvent.receiver=receiver;trackEvent.transceiver={receiver:receiver};trackEvent.streams=streams;window.setTimeout(function(){pc._dispatchEvent("track",trackEvent)})}var RTCPeerConnection=function RTCPeerConnection(config){var pc=this;var _eventTarget=document.createDocumentFragment();["addEventListener","removeEventListener","dispatchEvent"].forEach(function(method){pc[method]=_eventTarget[method].bind(_eventTarget)});this.canTrickleIceCandidates=null;this.needNegotiation=false;this.localStreams=[];this.remoteStreams=[];this._localDescription=null;this._remoteDescription=null;this.signalingState="stable";this.iceConnectionState="new";this.connectionState="new";this.iceGatheringState="new";config=JSON.parse(JSON.stringify(config||{}));this.usingBundle=config.bundlePolicy==="max-bundle";if(config.rtcpMuxPolicy==="negotiate"){throw makeError("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported")}else if(!config.rtcpMuxPolicy){config.rtcpMuxPolicy="require"}switch(config.iceTransportPolicy){case"all":case"relay":break;default:config.iceTransportPolicy="all";break}switch(config.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:config.bundlePolicy="balanced";break}config.iceServers=filterIceServers(config.iceServers||[],edgeVersion);this._iceGatherers=[];if(config.iceCandidatePoolSize){for(var i=config.iceCandidatePoolSize;i>0;i--){this._iceGatherers.push(new window.RTCIceGatherer({iceServers:config.iceServers,gatherPolicy:config.iceTransportPolicy}))}}else{config.iceCandidatePoolSize=0}this._config=config;this.transceivers=[];this._sdpSessionId=SDPUtils.generateSessionId();this._sdpSessionVersion=0;this._dtlsRole=undefined;this._isClosed=false};Object.defineProperty(RTCPeerConnection.prototype,"localDescription",{configurable:true,get:function get(){return this._localDescription}});Object.defineProperty(RTCPeerConnection.prototype,"remoteDescription",{configurable:true,get:function get(){return this._remoteDescription}});RTCPeerConnection.prototype.onicecandidate=null;RTCPeerConnection.prototype.onaddstream=null;RTCPeerConnection.prototype.ontrack=null;RTCPeerConnection.prototype.onremovestream=null;RTCPeerConnection.prototype.onsignalingstatechange=null;RTCPeerConnection.prototype.oniceconnectionstatechange=null;RTCPeerConnection.prototype.onconnectionstatechange=null;RTCPeerConnection.prototype.onicegatheringstatechange=null;RTCPeerConnection.prototype.onnegotiationneeded=null;RTCPeerConnection.prototype.ondatachannel=null;RTCPeerConnection.prototype._dispatchEvent=function(name,event){if(this._isClosed){return}this.dispatchEvent(event);if(typeof this["on"+name]==="function"){this["on"+name](event)}};RTCPeerConnection.prototype._emitGatheringStateChange=function(){var event=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",event)};RTCPeerConnection.prototype.getConfiguration=function(){return this._config};RTCPeerConnection.prototype.getLocalStreams=function(){return this.localStreams};RTCPeerConnection.prototype.getRemoteStreams=function(){return this.remoteStreams};RTCPeerConnection.prototype._createTransceiver=function(kind,doNotAdd){var hasBundleTransport=this.transceivers.length>0;var transceiver={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:kind,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:true};if(this.usingBundle&&hasBundleTransport){transceiver.iceTransport=this.transceivers[0].iceTransport;transceiver.dtlsTransport=this.transceivers[0].dtlsTransport}else{var transports=this._createIceAndDtlsTransports();transceiver.iceTransport=transports.iceTransport;transceiver.dtlsTransport=transports.dtlsTransport}if(!doNotAdd){this.transceivers.push(transceiver)}return transceiver};RTCPeerConnection.prototype.addTrack=function(track,stream){if(this._isClosed){throw makeError("InvalidStateError","Attempted to call addTrack on a closed peerconnection.")}var alreadyExists=this.transceivers.find(function(s){return s.track===track});if(alreadyExists){throw makeError("InvalidAccessError","Track already exists.")}var transceiver;for(var i=0;i<this.transceivers.length;i++){if(!this.transceivers[i].track&&this.transceivers[i].kind===track.kind){transceiver=this.transceivers[i]}}if(!transceiver){transceiver=this._createTransceiver(track.kind)}this._maybeFireNegotiationNeeded();if(this.localStreams.indexOf(stream)===-1){this.localStreams.push(stream)}transceiver.track=track;transceiver.stream=stream;transceiver.rtpSender=new window.RTCRtpSender(track,transceiver.dtlsTransport);return transceiver.rtpSender};RTCPeerConnection.prototype.addStream=function(stream){var pc=this;if(edgeVersion>=15025){stream.getTracks().forEach(function(track){pc.addTrack(track,stream)})}else{var clonedStream=stream.clone();stream.getTracks().forEach(function(track,idx){var clonedTrack=clonedStream.getTracks()[idx];track.addEventListener("enabled",function(event){clonedTrack.enabled=event.enabled})});clonedStream.getTracks().forEach(function(track){pc.addTrack(track,clonedStream)})}};RTCPeerConnection.prototype.removeTrack=function(sender){if(this._isClosed){throw makeError("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.")}if(!(sender instanceof window.RTCRtpSender)){throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack "+"does not implement interface RTCRtpSender.")}var transceiver=this.transceivers.find(function(t){return t.rtpSender===sender});if(!transceiver){throw makeError("InvalidAccessError","Sender was not created by this connection.")}var stream=transceiver.stream;transceiver.rtpSender.stop();transceiver.rtpSender=null;transceiver.track=null;transceiver.stream=null;var localStreams=this.transceivers.map(function(t){return t.stream});if(localStreams.indexOf(stream)===-1&&this.localStreams.indexOf(stream)>-1){this.localStreams.splice(this.localStreams.indexOf(stream),1)}this._maybeFireNegotiationNeeded()};RTCPeerConnection.prototype.removeStream=function(stream){var pc=this;stream.getTracks().forEach(function(track){var sender=pc.getSenders().find(function(s){return s.track===track});if(sender){pc.removeTrack(sender)}})};RTCPeerConnection.prototype.getSenders=function(){return this.transceivers.filter(function(transceiver){return!!transceiver.rtpSender}).map(function(transceiver){return transceiver.rtpSender})};RTCPeerConnection.prototype.getReceivers=function(){return this.transceivers.filter(function(transceiver){return!!transceiver.rtpReceiver}).map(function(transceiver){return transceiver.rtpReceiver})};RTCPeerConnection.prototype._createIceGatherer=function(sdpMLineIndex,usingBundle){var pc=this;if(usingBundle&&sdpMLineIndex>0){return this.transceivers[0].iceGatherer}else if(this._iceGatherers.length){return this._iceGatherers.shift()}var iceGatherer=new window.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});Object.defineProperty(iceGatherer,"state",{value:"new",writable:true});this.transceivers[sdpMLineIndex].bufferedCandidateEvents=[];this.transceivers[sdpMLineIndex].bufferCandidates=function(event){var end=!event.candidate||Object.keys(event.candidate).length===0;iceGatherer.state=end?"completed":"gathering";if(pc.transceivers[sdpMLineIndex].bufferedCandidateEvents!==null){pc.transceivers[sdpMLineIndex].bufferedCandidateEvents.push(event)}};iceGatherer.addEventListener("localcandidate",this.transceivers[sdpMLineIndex].bufferCandidates);return iceGatherer};RTCPeerConnection.prototype._gather=function(mid,sdpMLineIndex){var pc=this;var iceGatherer=this.transceivers[sdpMLineIndex].iceGatherer;if(iceGatherer.onlocalcandidate){return}var bufferedCandidateEvents=this.transceivers[sdpMLineIndex].bufferedCandidateEvents;this.transceivers[sdpMLineIndex].bufferedCandidateEvents=null;iceGatherer.removeEventListener("localcandidate",this.transceivers[sdpMLineIndex].bufferCandidates);iceGatherer.onlocalcandidate=function(evt){if(pc.usingBundle&&sdpMLineIndex>0){return}var event=new Event("icecandidate");event.candidate={sdpMid:mid,sdpMLineIndex:sdpMLineIndex};var cand=evt.candidate;var end=!cand||Object.keys(cand).length===0;if(end){if(iceGatherer.state==="new"||iceGatherer.state==="gathering"){iceGatherer.state="completed"}}else{if(iceGatherer.state==="new"){iceGatherer.state="gathering"}cand.component=1;cand.ufrag=iceGatherer.getLocalParameters().usernameFragment;var serializedCandidate=SDPUtils.writeCandidate(cand);event.candidate=Object.assign(event.candidate,SDPUtils.parseCandidate(serializedCandidate));event.candidate.candidate=serializedCandidate;event.candidate.toJSON=function(){return{candidate:event.candidate.candidate,sdpMid:event.candidate.sdpMid,sdpMLineIndex:event.candidate.sdpMLineIndex,usernameFragment:event.candidate.usernameFragment}}}var sections=SDPUtils.getMediaSections(pc._localDescription.sdp);if(!end){sections[event.candidate.sdpMLineIndex]+="a="+event.candidate.candidate+"\r\n"}else{sections[event.candidate.sdpMLineIndex]+="a=end-of-candidates\r\n"}pc._localDescription.sdp=SDPUtils.getDescription(pc._localDescription.sdp)+sections.join("");var complete=pc.transceivers.every(function(transceiver){return transceiver.iceGatherer&&transceiver.iceGatherer.state==="completed"});if(pc.iceGatheringState!=="gathering"){pc.iceGatheringState="gathering";pc._emitGatheringStateChange()}if(!end){pc._dispatchEvent("icecandidate",event)}if(complete){pc._dispatchEvent("icecandidate",new Event("icecandidate"));pc.iceGatheringState="complete";pc._emitGatheringStateChange()}};window.setTimeout(function(){bufferedCandidateEvents.forEach(function(e){iceGatherer.onlocalcandidate(e)})},0)};RTCPeerConnection.prototype._createIceAndDtlsTransports=function(){var pc=this;var iceTransport=new window.RTCIceTransport(null);iceTransport.onicestatechange=function(){pc._updateIceConnectionState();pc._updateConnectionState()};var dtlsTransport=new window.RTCDtlsTransport(iceTransport);dtlsTransport.ondtlsstatechange=function(){pc._updateConnectionState()};dtlsTransport.onerror=function(){Object.defineProperty(dtlsTransport,"state",{value:"failed",writable:true});pc._updateConnectionState()};return{iceTransport:iceTransport,dtlsTransport:dtlsTransport}};RTCPeerConnection.prototype._disposeIceAndDtlsTransports=function(sdpMLineIndex){var iceGatherer=this.transceivers[sdpMLineIndex].iceGatherer;if(iceGatherer){delete iceGatherer.onlocalcandidate;delete this.transceivers[sdpMLineIndex].iceGatherer}var iceTransport=this.transceivers[sdpMLineIndex].iceTransport;if(iceTransport){delete iceTransport.onicestatechange;delete this.transceivers[sdpMLineIndex].iceTransport}var dtlsTransport=this.transceivers[sdpMLineIndex].dtlsTransport;if(dtlsTransport){delete dtlsTransport.ondtlsstatechange;delete dtlsTransport.onerror;delete this.transceivers[sdpMLineIndex].dtlsTransport}};RTCPeerConnection.prototype._transceive=function(transceiver,send,recv){var params=getCommonCapabilities(transceiver.localCapabilities,transceiver.remoteCapabilities);if(send&&transceiver.rtpSender){params.encodings=transceiver.sendEncodingParameters;params.rtcp={cname:SDPUtils.localCName,compound:transceiver.rtcpParameters.compound};if(transceiver.recvEncodingParameters.length){params.rtcp.ssrc=transceiver.recvEncodingParameters[0].ssrc}transceiver.rtpSender.send(params)}if(recv&&transceiver.rtpReceiver&&params.codecs.length>0){if(transceiver.kind==="video"&&transceiver.recvEncodingParameters&&edgeVersion<15019){transceiver.recvEncodingParameters.forEach(function(p){delete p.rtx})}if(transceiver.recvEncodingParameters.length){params.encodings=transceiver.recvEncodingParameters}else{params.encodings=[{}]}params.rtcp={compound:transceiver.rtcpParameters.compound};if(transceiver.rtcpParameters.cname){params.rtcp.cname=transceiver.rtcpParameters.cname}if(transceiver.sendEncodingParameters.length){params.rtcp.ssrc=transceiver.sendEncodingParameters[0].ssrc}transceiver.rtpReceiver.receive(params)}};RTCPeerConnection.prototype.setLocalDescription=function(description){var pc=this;if(["offer","answer"].indexOf(description.type)===-1){return Promise.reject(makeError("TypeError",'Unsupported type "'+description.type+'"'))}if(!isActionAllowedInSignalingState("setLocalDescription",description.type,pc.signalingState)||pc._isClosed){return Promise.reject(makeError("InvalidStateError","Can not set local "+description.type+" in state "+pc.signalingState))}var sections;var sessionpart;if(description.type==="offer"){sections=SDPUtils.splitSections(description.sdp);sessionpart=sections.shift();sections.forEach(function(mediaSection,sdpMLineIndex){var caps=SDPUtils.parseRtpParameters(mediaSection);pc.transceivers[sdpMLineIndex].localCapabilities=caps});pc.transceivers.forEach(function(transceiver,sdpMLineIndex){pc._gather(transceiver.mid,sdpMLineIndex)})}else if(description.type==="answer"){sections=SDPUtils.splitSections(pc._remoteDescription.sdp);sessionpart=sections.shift();var isIceLite=SDPUtils.matchPrefix(sessionpart,"a=ice-lite").length>0;sections.forEach(function(mediaSection,sdpMLineIndex){var transceiver=pc.transceivers[sdpMLineIndex];var iceGatherer=transceiver.iceGatherer;var iceTransport=transceiver.iceTransport;var dtlsTransport=transceiver.dtlsTransport;var localCapabilities=transceiver.localCapabilities;var remoteCapabilities=transceiver.remoteCapabilities;var rejected=SDPUtils.isRejected(mediaSection)&&SDPUtils.matchPrefix(mediaSection,"a=bundle-only").length===0;if(!rejected&&!transceiver.rejected){var remoteIceParameters=SDPUtils.getIceParameters(mediaSection,sessionpart);var remoteDtlsParameters=SDPUtils.getDtlsParameters(mediaSection,sessionpart);if(isIceLite){remoteDtlsParameters.role="server"}if(!pc.usingBundle||sdpMLineIndex===0){pc._gather(transceiver.mid,sdpMLineIndex);if(iceTransport.state==="new"){iceTransport.start(iceGatherer,remoteIceParameters,isIceLite?"controlling":"controlled")}if(dtlsTransport.state==="new"){dtlsTransport.start(remoteDtlsParameters)}}var params=getCommonCapabilities(localCapabilities,remoteCapabilities);pc._transceive(transceiver,params.codecs.length>0,false)}})}pc._localDescription={type:description.type,sdp:description.sdp};if(description.type==="offer"){pc._updateSignalingState("have-local-offer")}else{pc._updateSignalingState("stable")}return Promise.resolve()};RTCPeerConnection.prototype.setRemoteDescription=function(description){var pc=this;if(["offer","answer"].indexOf(description.type)===-1){return Promise.reject(makeError("TypeError",'Unsupported type "'+description.type+'"'))}if(!isActionAllowedInSignalingState("setRemoteDescription",description.type,pc.signalingState)||pc._isClosed){return Promise.reject(makeError("InvalidStateError","Can not set remote "+description.type+" in state "+pc.signalingState))}var streams={};pc.remoteStreams.forEach(function(stream){streams[stream.id]=stream});var receiverList=[];var sections=SDPUtils.splitSections(description.sdp);var sessionpart=sections.shift();var isIceLite=SDPUtils.matchPrefix(sessionpart,"a=ice-lite").length>0;var usingBundle=SDPUtils.matchPrefix(sessionpart,"a=group:BUNDLE ").length>0;pc.usingBundle=usingBundle;var iceOptions=SDPUtils.matchPrefix(sessionpart,"a=ice-options:")[0];if(iceOptions){pc.canTrickleIceCandidates=iceOptions.substr(14).split(" ").indexOf("trickle")>=0}else{pc.canTrickleIceCandidates=false}sections.forEach(function(mediaSection,sdpMLineIndex){var lines=SDPUtils.splitLines(mediaSection);var kind=SDPUtils.getKind(mediaSection);var rejected=SDPUtils.isRejected(mediaSection)&&SDPUtils.matchPrefix(mediaSection,"a=bundle-only").length===0;var protocol=lines[0].substr(2).split(" ")[2];var direction=SDPUtils.getDirection(mediaSection,sessionpart);var remoteMsid=SDPUtils.parseMsid(mediaSection);var mid=SDPUtils.getMid(mediaSection)||SDPUtils.generateIdentifier();if(rejected||kind==="application"&&(protocol==="DTLS/SCTP"||protocol==="UDP/DTLS/SCTP")){pc.transceivers[sdpMLineIndex]={mid:mid,kind:kind,protocol:protocol,rejected:true};return}if(!rejected&&pc.transceivers[sdpMLineIndex]&&pc.transceivers[sdpMLineIndex].rejected){pc.transceivers[sdpMLineIndex]=pc._createTransceiver(kind,true)}var transceiver;var iceGatherer;var iceTransport;var dtlsTransport;var rtpReceiver;var sendEncodingParameters;var recvEncodingParameters;var localCapabilities;var track;var remoteCapabilities=SDPUtils.parseRtpParameters(mediaSection);var remoteIceParameters;var remoteDtlsParameters;if(!rejected){remoteIceParameters=SDPUtils.getIceParameters(mediaSection,sessionpart);remoteDtlsParameters=SDPUtils.getDtlsParameters(mediaSection,sessionpart);remoteDtlsParameters.role="client"}recvEncodingParameters=SDPUtils.parseRtpEncodingParameters(mediaSection);var rtcpParameters=SDPUtils.parseRtcpParameters(mediaSection);var isComplete=SDPUtils.matchPrefix(mediaSection,"a=end-of-candidates",sessionpart).length>0;var cands=SDPUtils.matchPrefix(mediaSection,"a=candidate:").map(function(cand){return SDPUtils.parseCandidate(cand)}).filter(function(cand){return cand.component===1});if((description.type==="offer"||description.type==="answer")&&!rejected&&usingBundle&&sdpMLineIndex>0&&pc.transceivers[sdpMLineIndex]){pc._disposeIceAndDtlsTransports(sdpMLineIndex);pc.transceivers[sdpMLineIndex].iceGatherer=pc.transceivers[0].iceGatherer;pc.transceivers[sdpMLineIndex].iceTransport=pc.transceivers[0].iceTransport;pc.transceivers[sdpMLineIndex].dtlsTransport=pc.transceivers[0].dtlsTransport;if(pc.transceivers[sdpMLineIndex].rtpSender){pc.transceivers[sdpMLineIndex].rtpSender.setTransport(pc.transceivers[0].dtlsTransport)}if(pc.transceivers[sdpMLineIndex].rtpReceiver){pc.transceivers[sdpMLineIndex].rtpReceiver.setTransport(pc.transceivers[0].dtlsTransport)}}if(description.type==="offer"&&!rejected){transceiver=pc.transceivers[sdpMLineIndex]||pc._createTransceiver(kind);transceiver.mid=mid;if(!transceiver.iceGatherer){transceiver.iceGatherer=pc._createIceGatherer(sdpMLineIndex,usingBundle)}if(cands.length&&transceiver.iceTransport.state==="new"){if(isComplete&&(!usingBundle||sdpMLineIndex===0)){transceiver.iceTransport.setRemoteCandidates(cands)}else{cands.forEach(function(candidate){maybeAddCandidate(transceiver.iceTransport,candidate)})}}localCapabilities=window.RTCRtpReceiver.getCapabilities(kind);if(edgeVersion<15019){localCapabilities.codecs=localCapabilities.codecs.filter(function(codec){return codec.name!=="rtx"})}sendEncodingParameters=transceiver.sendEncodingParameters||[{ssrc:(2*sdpMLineIndex+2)*1001}];var isNewTrack=false;if(direction==="sendrecv"||direction==="sendonly"){isNewTrack=!transceiver.rtpReceiver;rtpReceiver=transceiver.rtpReceiver||new window.RTCRtpReceiver(transceiver.dtlsTransport,kind);if(isNewTrack){var stream;track=rtpReceiver.track;if(remoteMsid&&remoteMsid.stream==="-");else if(remoteMsid){if(!streams[remoteMsid.stream]){streams[remoteMsid.stream]=new window.MediaStream;Object.defineProperty(streams[remoteMsid.stream],"id",{get:function get(){return remoteMsid.stream}})}Object.defineProperty(track,"id",{get:function get(){return remoteMsid.track}});stream=streams[remoteMsid.stream]}else{if(!streams["default"]){streams["default"]=new window.MediaStream}stream=streams["default"]}if(stream){addTrackToStreamAndFireEvent(track,stream);transceiver.associatedRemoteMediaStreams.push(stream)}receiverList.push([track,rtpReceiver,stream])}}else if(transceiver.rtpReceiver&&transceiver.rtpReceiver.track){transceiver.associatedRemoteMediaStreams.forEach(function(s){var nativeTrack=s.getTracks().find(function(t){return t.id===transceiver.rtpReceiver.track.id});if(nativeTrack){removeTrackFromStreamAndFireEvent(nativeTrack,s)}});transceiver.associatedRemoteMediaStreams=[]}transceiver.localCapabilities=localCapabilities;transceiver.remoteCapabilities=remoteCapabilities;transceiver.rtpReceiver=rtpReceiver;transceiver.rtcpParameters=rtcpParameters;transceiver.sendEncodingParameters=sendEncodingParameters;transceiver.recvEncodingParameters=recvEncodingParameters;pc._transceive(pc.transceivers[sdpMLineIndex],false,isNewTrack)}else if(description.type==="answer"&&!rejected){transceiver=pc.transceivers[sdpMLineIndex];iceGatherer=transceiver.iceGatherer;iceTransport=transceiver.iceTransport;dtlsTransport=transceiver.dtlsTransport;rtpReceiver=transceiver.rtpReceiver;sendEncodingParameters=transceiver.sendEncodingParameters;localCapabilities=transceiver.localCapabilities;pc.transceivers[sdpMLineIndex].recvEncodingParameters=recvEncodingParameters;pc.transceivers[sdpMLineIndex].remoteCapabilities=remoteCapabilities;pc.transceivers[sdpMLineIndex].rtcpParameters=rtcpParameters;if(cands.length&&iceTransport.state==="new"){if((isIceLite||isComplete)&&(!usingBundle||sdpMLineIndex===0)){iceTransport.setRemoteCandidates(cands)}else{cands.forEach(function(candidate){maybeAddCandidate(transceiver.iceTransport,candidate)})}}if(!usingBundle||sdpMLineIndex===0){if(iceTransport.state==="new"){iceTransport.start(iceGatherer,remoteIceParameters,"controlling")}if(dtlsTransport.state==="new"){dtlsTransport.start(remoteDtlsParameters)}}var commonCapabilities=getCommonCapabilities(transceiver.localCapabilities,transceiver.remoteCapabilities);var hasRtx=commonCapabilities.codecs.filter(function(c){return c.name.toLowerCase()==="rtx"}).length;if(!hasRtx&&transceiver.sendEncodingParameters[0].rtx){delete transceiver.sendEncodingParameters[0].rtx}pc._transceive(transceiver,direction==="sendrecv"||direction==="recvonly",direction==="sendrecv"||direction==="sendonly");if(rtpReceiver&&(direction==="sendrecv"||direction==="sendonly")){track=rtpReceiver.track;if(remoteMsid){if(!streams[remoteMsid.stream]){streams[remoteMsid.stream]=new window.MediaStream}addTrackToStreamAndFireEvent(track,streams[remoteMsid.stream]);receiverList.push([track,rtpReceiver,streams[remoteMsid.stream]])}else{if(!streams["default"]){streams["default"]=new window.MediaStream}addTrackToStreamAndFireEvent(track,streams["default"]);receiverList.push([track,rtpReceiver,streams["default"]])}}else{delete transceiver.rtpReceiver}}});if(pc._dtlsRole===undefined){pc._dtlsRole=description.type==="offer"?"active":"passive"}pc._remoteDescription={type:description.type,sdp:description.sdp};if(description.type==="offer"){pc._updateSignalingState("have-remote-offer")}else{pc._updateSignalingState("stable")}Object.keys(streams).forEach(function(sid){var stream=streams[sid];if(stream.getTracks().length){if(pc.remoteStreams.indexOf(stream)===-1){pc.remoteStreams.push(stream);var event=new Event("addstream");event.stream=stream;window.setTimeout(function(){pc._dispatchEvent("addstream",event)})}receiverList.forEach(function(item){var track=item[0];var receiver=item[1];if(stream.id!==item[2].id){return}fireAddTrack(pc,track,receiver,[stream])})}});receiverList.forEach(function(item){if(item[2]){return}fireAddTrack(pc,item[0],item[1],[])});window.setTimeout(function(){if(!(pc&&pc.transceivers)){return}pc.transceivers.forEach(function(transceiver){if(transceiver.iceTransport&&transceiver.iceTransport.state==="new"&&transceiver.iceTransport.getRemoteCandidates().length>0){console.warn("Timeout for addRemoteCandidate. Consider sending "+"an end-of-candidates notification");transceiver.iceTransport.addRemoteCandidate({})}})},4e3);return Promise.resolve()};RTCPeerConnection.prototype.close=function(){this.transceivers.forEach(function(transceiver){if(transceiver.iceTransport){transceiver.iceTransport.stop()}if(transceiver.dtlsTransport){transceiver.dtlsTransport.stop()}if(transceiver.rtpSender){transceiver.rtpSender.stop()}if(transceiver.rtpReceiver){transceiver.rtpReceiver.stop()}});this._isClosed=true;this._updateSignalingState("closed")};RTCPeerConnection.prototype._updateSignalingState=function(newState){this.signalingState=newState;var event=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",event)};RTCPeerConnection.prototype._maybeFireNegotiationNeeded=function(){var pc=this;if(this.signalingState!=="stable"||this.needNegotiation===true){return}this.needNegotiation=true;window.setTimeout(function(){if(pc.needNegotiation){pc.needNegotiation=false;var event=new Event("negotiationneeded");pc._dispatchEvent("negotiationneeded",event)}},0)};RTCPeerConnection.prototype._updateIceConnectionState=function(){var newState;var states={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};this.transceivers.forEach(function(transceiver){if(transceiver.iceTransport&&!transceiver.rejected){states[transceiver.iceTransport.state]++}});newState="new";if(states.failed>0){newState="failed"}else if(states.checking>0){newState="checking"}else if(states.disconnected>0){newState="disconnected"}else if(states["new"]>0){newState="new"}else if(states.connected>0){newState="connected"}else if(states.completed>0){newState="completed"}if(newState!==this.iceConnectionState){this.iceConnectionState=newState;var event=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",event)}};RTCPeerConnection.prototype._updateConnectionState=function(){var newState;var states={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};this.transceivers.forEach(function(transceiver){if(transceiver.iceTransport&&transceiver.dtlsTransport&&!transceiver.rejected){states[transceiver.iceTransport.state]++;states[transceiver.dtlsTransport.state]++}});states.connected+=states.completed;newState="new";if(states.failed>0){newState="failed"}else if(states.connecting>0){newState="connecting"}else if(states.disconnected>0){newState="disconnected"}else if(states["new"]>0){newState="new"}else if(states.connected>0){newState="connected"}if(newState!==this.connectionState){this.connectionState=newState;var event=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",event)}};RTCPeerConnection.prototype.createOffer=function(){var pc=this;if(pc._isClosed){return Promise.reject(makeError("InvalidStateError","Can not call createOffer after close"))}var numAudioTracks=pc.transceivers.filter(function(t){return t.kind==="audio"}).length;var numVideoTracks=pc.transceivers.filter(function(t){return t.kind==="video"}).length;var offerOptions=arguments[0];if(offerOptions){if(offerOptions.mandatory||offerOptions.optional){throw new TypeError("Legacy mandatory/optional constraints not supported.")}if(offerOptions.offerToReceiveAudio!==undefined){if(offerOptions.offerToReceiveAudio===true){numAudioTracks=1}else if(offerOptions.offerToReceiveAudio===false){numAudioTracks=0}else{numAudioTracks=offerOptions.offerToReceiveAudio}}if(offerOptions.offerToReceiveVideo!==undefined){if(offerOptions.offerToReceiveVideo===true){numVideoTracks=1}else if(offerOptions.offerToReceiveVideo===false){numVideoTracks=0}else{numVideoTracks=offerOptions.offerToReceiveVideo}}}pc.transceivers.forEach(function(transceiver){if(transceiver.kind==="audio"){numAudioTracks--;if(numAudioTracks<0){transceiver.wantReceive=false}}else if(transceiver.kind==="video"){numVideoTracks--;if(numVideoTracks<0){transceiver.wantReceive=false}}});while(numAudioTracks>0||numVideoTracks>0){if(numAudioTracks>0){pc._createTransceiver("audio");numAudioTracks--}if(numVideoTracks>0){pc._createTransceiver("video");numVideoTracks--}}var sdp=SDPUtils.writeSessionBoilerplate(pc._sdpSessionId,pc._sdpSessionVersion++);pc.transceivers.forEach(function(transceiver,sdpMLineIndex){var track=transceiver.track;var kind=transceiver.kind;var mid=transceiver.mid||SDPUtils.generateIdentifier();transceiver.mid=mid;if(!transceiver.iceGatherer){transceiver.iceGatherer=pc._createIceGatherer(sdpMLineIndex,pc.usingBundle)}var localCapabilities=window.RTCRtpSender.getCapabilities(kind);if(edgeVersion<15019){localCapabilities.codecs=localCapabilities.codecs.filter(function(codec){return codec.name!=="rtx"})}localCapabilities.codecs.forEach(function(codec){if(codec.name==="H264"&&codec.parameters["level-asymmetry-allowed"]===undefined){codec.parameters["level-asymmetry-allowed"]="1"}if(transceiver.remoteCapabilities&&transceiver.remoteCapabilities.codecs){transceiver.remoteCapabilities.codecs.forEach(function(remoteCodec){if(codec.name.toLowerCase()===remoteCodec.name.toLowerCase()&&codec.clockRate===remoteCodec.clockRate){codec.preferredPayloadType=remoteCodec.payloadType}})}});localCapabilities.headerExtensions.forEach(function(hdrExt){var remoteExtensions=transceiver.remoteCapabilities&&transceiver.remoteCapabilities.headerExtensions||[];remoteExtensions.forEach(function(rHdrExt){if(hdrExt.uri===rHdrExt.uri){hdrExt.id=rHdrExt.id}})});var sendEncodingParameters=transceiver.sendEncodingParameters||[{ssrc:(2*sdpMLineIndex+1)*1001}];if(track){if(edgeVersion>=15019&&kind==="video"&&!sendEncodingParameters[0].rtx){sendEncodingParameters[0].rtx={ssrc:sendEncodingParameters[0].ssrc+1}}}if(transceiver.wantReceive){transceiver.rtpReceiver=new window.RTCRtpReceiver(transceiver.dtlsTransport,kind)}transceiver.localCapabilities=localCapabilities;transceiver.sendEncodingParameters=sendEncodingParameters});if(pc._config.bundlePolicy!=="max-compat"){sdp+="a=group:BUNDLE "+pc.transceivers.map(function(t){return t.mid}).join(" ")+"\r\n"}sdp+="a=ice-options:trickle\r\n";pc.transceivers.forEach(function(transceiver,sdpMLineIndex){sdp+=writeMediaSection(transceiver,transceiver.localCapabilities,"offer",transceiver.stream,pc._dtlsRole);sdp+="a=rtcp-rsize\r\n";if(transceiver.iceGatherer&&pc.iceGatheringState!=="new"&&(sdpMLineIndex===0||!pc.usingBundle)){transceiver.iceGatherer.getLocalCandidates().forEach(function(cand){cand.component=1;sdp+="a="+SDPUtils.writeCandidate(cand)+"\r\n"});if(transceiver.iceGatherer.state==="completed"){sdp+="a=end-of-candidates\r\n"}}});var desc=new window.RTCSessionDescription({type:"offer",sdp:sdp});return Promise.resolve(desc)};RTCPeerConnection.prototype.createAnswer=function(){var pc=this;if(pc._isClosed){return Promise.reject(makeError("InvalidStateError","Can not call createAnswer after close"))}if(!(pc.signalingState==="have-remote-offer"||pc.signalingState==="have-local-pranswer")){return Promise.reject(makeError("InvalidStateError","Can not call createAnswer in signalingState "+pc.signalingState))}var sdp=SDPUtils.writeSessionBoilerplate(pc._sdpSessionId,pc._sdpSessionVersion++);if(pc.usingBundle){sdp+="a=group:BUNDLE "+pc.transceivers.map(function(t){return t.mid}).join(" ")+"\r\n"}sdp+="a=ice-options:trickle\r\n";var mediaSectionsInOffer=SDPUtils.getMediaSections(pc._remoteDescription.sdp).length;pc.transceivers.forEach(function(transceiver,sdpMLineIndex){if(sdpMLineIndex+1>mediaSectionsInOffer){return}if(transceiver.rejected){if(transceiver.kind==="application"){if(transceiver.protocol==="DTLS/SCTP"){sdp+="m=application 0 DTLS/SCTP 5000\r\n"}else{sdp+="m=application 0 "+transceiver.protocol+" webrtc-datachannel\r\n"}}else if(transceiver.kind==="audio"){sdp+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\n"+"a=rtpmap:0 PCMU/8000\r\n"}else if(transceiver.kind==="video"){sdp+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\n"+"a=rtpmap:120 VP8/90000\r\n"}sdp+="c=IN IP4 0.0.0.0\r\n"+"a=inactive\r\n"+"a=mid:"+transceiver.mid+"\r\n";return}if(transceiver.stream){var localTrack;if(transceiver.kind==="audio"){localTrack=transceiver.stream.getAudioTracks()[0]}else if(transceiver.kind==="video"){localTrack=transceiver.stream.getVideoTracks()[0]}if(localTrack){if(edgeVersion>=15019&&transceiver.kind==="video"&&!transceiver.sendEncodingParameters[0].rtx){transceiver.sendEncodingParameters[0].rtx={ssrc:transceiver.sendEncodingParameters[0].ssrc+1}}}}var commonCapabilities=getCommonCapabilities(transceiver.localCapabilities,transceiver.remoteCapabilities);var hasRtx=commonCapabilities.codecs.filter(function(c){return c.name.toLowerCase()==="rtx"}).length;if(!hasRtx&&transceiver.sendEncodingParameters[0].rtx){delete transceiver.sendEncodingParameters[0].rtx}sdp+=writeMediaSection(transceiver,commonCapabilities,"answer",transceiver.stream,pc._dtlsRole);if(transceiver.rtcpParameters&&transceiver.rtcpParameters.reducedSize){sdp+="a=rtcp-rsize\r\n"}});var desc=new window.RTCSessionDescription({type:"answer",sdp:sdp});return Promise.resolve(desc)};RTCPeerConnection.prototype.addIceCandidate=function(candidate){var pc=this;var sections;if(candidate&&!(candidate.sdpMLineIndex!==undefined||candidate.sdpMid)){return Promise.reject(new TypeError("sdpMLineIndex or sdpMid required"))}return new Promise(function(resolve,reject){if(!pc._remoteDescription){return reject(makeError("InvalidStateError","Can not add ICE candidate without a remote description"))}else if(!candidate||candidate.candidate===""){for(var j=0;j<pc.transceivers.length;j++){if(pc.transceivers[j].rejected){continue}pc.transceivers[j].iceTransport.addRemoteCandidate({});sections=SDPUtils.getMediaSections(pc._remoteDescription.sdp);sections[j]+="a=end-of-candidates\r\n";pc._remoteDescription.sdp=SDPUtils.getDescription(pc._remoteDescription.sdp)+sections.join("");if(pc.usingBundle){break}}}else{var sdpMLineIndex=candidate.sdpMLineIndex;if(candidate.sdpMid){for(var i=0;i<pc.transceivers.length;i++){if(pc.transceivers[i].mid===candidate.sdpMid){sdpMLineIndex=i;break}}}var transceiver=pc.transceivers[sdpMLineIndex];if(transceiver){if(transceiver.rejected){return resolve()}var cand=Object.keys(candidate.candidate).length>0?SDPUtils.parseCandidate(candidate.candidate):{};if(cand.protocol==="tcp"&&(cand.port===0||cand.port===9)){return resolve()}if(cand.component&&cand.component!==1){return resolve()}if(sdpMLineIndex===0||sdpMLineIndex>0&&transceiver.iceTransport!==pc.transceivers[0].iceTransport){if(!maybeAddCandidate(transceiver.iceTransport,cand)){return reject(makeError("OperationError","Can not add ICE candidate"))}}var candidateString=candidate.candidate.trim();if(candidateString.indexOf("a=")===0){candidateString=candidateString.substr(2)}sections=SDPUtils.getMediaSections(pc._remoteDescription.sdp);sections[sdpMLineIndex]+="a="+(cand.type?candidateString:"end-of-candidates")+"\r\n";pc._remoteDescription.sdp=SDPUtils.getDescription(pc._remoteDescription.sdp)+sections.join("")}else{return reject(makeError("OperationError","Can not add ICE candidate"))}}resolve()})};RTCPeerConnection.prototype.getStats=function(selector){if(selector&&selector instanceof window.MediaStreamTrack){var senderOrReceiver=null;this.transceivers.forEach(function(transceiver){if(transceiver.rtpSender&&transceiver.rtpSender.track===selector){senderOrReceiver=transceiver.rtpSender}else if(transceiver.rtpReceiver&&transceiver.rtpReceiver.track===selector){senderOrReceiver=transceiver.rtpReceiver}});if(!senderOrReceiver){throw makeError("InvalidAccessError","Invalid selector.")}return senderOrReceiver.getStats()}var promises=[];this.transceivers.forEach(function(transceiver){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(method){if(transceiver[method]){promises.push(transceiver[method].getStats())}})});return Promise.all(promises).then(function(allStats){var results=new Map;allStats.forEach(function(stats){stats.forEach(function(stat){results.set(stat.id,stat)})});return results})};var ortcObjects=["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"];ortcObjects.forEach(function(ortcObjectName){var obj=window[ortcObjectName];if(obj&&obj.prototype&&obj.prototype.getStats){var nativeGetstats=obj.prototype.getStats;obj.prototype.getStats=function(){return nativeGetstats.apply(this).then(function(nativeStats){var mapStats=new Map;Object.keys(nativeStats).forEach(function(id){nativeStats[id].type=fixStatsType(nativeStats[id]);mapStats.set(id,nativeStats[id])});return mapStats})}}});var methods=["createOffer","createAnswer"];methods.forEach(function(method){var nativeMethod=RTCPeerConnection.prototype[method];RTCPeerConnection.prototype[method]=function(){var args=arguments;if(typeof args[0]==="function"||typeof args[1]==="function"){return nativeMethod.apply(this,[arguments[2]]).then(function(description){if(typeof args[0]==="function"){args[0].apply(null,[description])}},function(error){if(typeof args[1]==="function"){args[1].apply(null,[error])}})}return nativeMethod.apply(this,arguments)}});methods=["setLocalDescription","setRemoteDescription","addIceCandidate"];methods.forEach(function(method){var nativeMethod=RTCPeerConnection.prototype[method];RTCPeerConnection.prototype[method]=function(){var args=arguments;if(typeof args[1]==="function"||typeof args[2]==="function"){return nativeMethod.apply(this,arguments).then(function(){if(typeof args[1]==="function"){args[1].apply(null)}},function(error){if(typeof args[2]==="function"){args[2].apply(null,[error])}})}return nativeMethod.apply(this,arguments)}});["getStats"].forEach(function(method){var nativeMethod=RTCPeerConnection.prototype[method];RTCPeerConnection.prototype[method]=function(){var args=arguments;if(typeof args[1]==="function"){return nativeMethod.apply(this,arguments).then(function(){if(typeof args[1]==="function"){args[1].apply(null)}})}return nativeMethod.apply(this,arguments)}});return RTCPeerConnection}},{sdp:17}],17:[function(require,module,exports){var SDPUtils={};SDPUtils.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)};SDPUtils.localCName=SDPUtils.generateIdentifier();SDPUtils.splitLines=function(blob){return blob.trim().split("\n").map(function(line){return line.trim()})};SDPUtils.splitSections=function(blob){var parts=blob.split("\nm=");return parts.map(function(part,index){return(index>0?"m="+part:part).trim()+"\r\n"})};SDPUtils.getDescription=function(blob){var sections=SDPUtils.splitSections(blob);return sections&&sections[0]};SDPUtils.getMediaSections=function(blob){var sections=SDPUtils.splitSections(blob);sections.shift();return sections};SDPUtils.matchPrefix=function(blob,prefix){return SDPUtils.splitLines(blob).filter(function(line){return line.indexOf(prefix)===0})};SDPUtils.parseCandidate=function(line){var parts;if(line.indexOf("a=candidate:")===0){parts=line.substring(12).split(" ")}else{parts=line.substring(10).split(" ")}var candidate={foundation:parts[0],component:parseInt(parts[1],10),protocol:parts[2].toLowerCase(),priority:parseInt(parts[3],10),ip:parts[4],address:parts[4],port:parseInt(parts[5],10),type:parts[7]};for(var i=8;i<parts.length;i+=2){switch(parts[i]){case"raddr":candidate.relatedAddress=parts[i+1];break;case"rport":candidate.relatedPort=parseInt(parts[i+1],10);break;case"tcptype":candidate.tcpType=parts[i+1];break;case"ufrag":candidate.ufrag=parts[i+1];candidate.usernameFragment=parts[i+1];break;default:candidate[parts[i]]=parts[i+1];break}}return candidate};SDPUtils.writeCandidate=function(candidate){var sdp=[];sdp.push(candidate.foundation);sdp.push(candidate.component);sdp.push(candidate.protocol.toUpperCase());sdp.push(candidate.priority);sdp.push(candidate.address||candidate.ip);sdp.push(candidate.port);var type=candidate.type;sdp.push("typ");sdp.push(type);if(type!=="host"&&candidate.relatedAddress&&candidate.relatedPort){sdp.push("raddr");sdp.push(candidate.relatedAddress);sdp.push("rport");sdp.push(candidate.relatedPort)}if(candidate.tcpType&&candidate.protocol.toLowerCase()==="tcp"){sdp.push("tcptype");sdp.push(candidate.tcpType)}if(candidate.usernameFragment||candidate.ufrag){sdp.push("ufrag");sdp.push(candidate.usernameFragment||candidate.ufrag)}return"candidate:"+sdp.join(" ")};SDPUtils.parseIceOptions=function(line){return line.substr(14).split(" ")};SDPUtils.parseRtpMap=function(line){var parts=line.substr(9).split(" ");var parsed={payloadType:parseInt(parts.shift(),10)};parts=parts[0].split("/");parsed.name=parts[0];parsed.clockRate=parseInt(parts[1],10);parsed.channels=parts.length===3?parseInt(parts[2],10):1;parsed.numChannels=parsed.channels;return parsed};SDPUtils.writeRtpMap=function(codec){var pt=codec.payloadType;if(codec.preferredPayloadType!==undefined){pt=codec.preferredPayloadType}var channels=codec.channels||codec.numChannels||1;return"a=rtpmap:"+pt+" "+codec.name+"/"+codec.clockRate+(channels!==1?"/"+channels:"")+"\r\n"};SDPUtils.parseExtmap=function(line){var parts=line.substr(9).split(" ");return{id:parseInt(parts[0],10),direction:parts[0].indexOf("/")>0?parts[0].split("/")[1]:"sendrecv",uri:parts[1]}};SDPUtils.writeExtmap=function(headerExtension){return"a=extmap:"+(headerExtension.id||headerExtension.preferredId)+(headerExtension.direction&&headerExtension.direction!=="sendrecv"?"/"+headerExtension.direction:"")+" "+headerExtension.uri+"\r\n"};SDPUtils.parseFmtp=function(line){var parsed={};var kv;var parts=line.substr(line.indexOf(" ")+1).split(";");for(var j=0;j<parts.length;j++){kv=parts[j].trim().split("=");parsed[kv[0].trim()]=kv[1]}return parsed};SDPUtils.writeFmtp=function(codec){var line="";var pt=codec.payloadType;if(codec.preferredPayloadType!==undefined){pt=codec.preferredPayloadType}if(codec.parameters&&Object.keys(codec.parameters).length){var params=[];Object.keys(codec.parameters).forEach(function(param){if(codec.parameters[param]){params.push(param+"="+codec.parameters[param])}else{params.push(param)}});line+="a=fmtp:"+pt+" "+params.join(";")+"\r\n"}return line};SDPUtils.parseRtcpFb=function(line){var parts=line.substr(line.indexOf(" ")+1).split(" ");return{type:parts.shift(),parameter:parts.join(" ")}};SDPUtils.writeRtcpFb=function(codec){var lines="";var pt=codec.payloadType;if(codec.preferredPayloadType!==undefined){pt=codec.preferredPayloadType}if(codec.rtcpFeedback&&codec.rtcpFeedback.length){codec.rtcpFeedback.forEach(function(fb){lines+="a=rtcp-fb:"+pt+" "+fb.type+(fb.parameter&&fb.parameter.length?" "+fb.parameter:"")+"\r\n"})}return lines};SDPUtils.parseSsrcMedia=function(line){var sp=line.indexOf(" ");var parts={ssrc:parseInt(line.substr(7,sp-7),10)};var colon=line.indexOf(":",sp);if(colon>-1){parts.attribute=line.substr(sp+1,colon-sp-1);parts.value=line.substr(colon+1)}else{parts.attribute=line.substr(sp+1)}return parts};SDPUtils.parseSsrcGroup=function(line){var parts=line.substr(13).split(" ");return{semantics:parts.shift(),ssrcs:parts.map(function(ssrc){return parseInt(ssrc,10)})}};SDPUtils.getMid=function(mediaSection){var mid=SDPUtils.matchPrefix(mediaSection,"a=mid:")[0];if(mid){return mid.substr(6)}};SDPUtils.parseFingerprint=function(line){var parts=line.substr(14).split(" ");return{algorithm:parts[0].toLowerCase(),value:parts[1]}};SDPUtils.getDtlsParameters=function(mediaSection,sessionpart){var lines=SDPUtils.matchPrefix(mediaSection+sessionpart,"a=fingerprint:");return{role:"auto",fingerprints:lines.map(SDPUtils.parseFingerprint)}};SDPUtils.writeDtlsParameters=function(params,setupType){var sdp="a=setup:"+setupType+"\r\n";params.fingerprints.forEach(function(fp){sdp+="a=fingerprint:"+fp.algorithm+" "+fp.value+"\r\n"});return sdp};SDPUtils.getIceParameters=function(mediaSection,sessionpart){var lines=SDPUtils.splitLines(mediaSection);lines=lines.concat(SDPUtils.splitLines(sessionpart));var iceParameters={usernameFragment:lines.filter(function(line){return line.indexOf("a=ice-ufrag:")===0})[0].substr(12),password:lines.filter(function(line){return line.indexOf("a=ice-pwd:")===0})[0].substr(10)};return iceParameters};SDPUtils.writeIceParameters=function(params){return"a=ice-ufrag:"+params.usernameFragment+"\r\n"+"a=ice-pwd:"+params.password+"\r\n"};SDPUtils.parseRtpParameters=function(mediaSection){var description={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]};var lines=SDPUtils.splitLines(mediaSection);var mline=lines[0].split(" ");for(var i=3;i<mline.length;i++){var pt=mline[i];var rtpmapline=SDPUtils.matchPrefix(mediaSection,"a=rtpmap:"+pt+" ")[0];if(rtpmapline){var codec=SDPUtils.parseRtpMap(rtpmapline);var fmtps=SDPUtils.matchPrefix(mediaSection,"a=fmtp:"+pt+" ");codec.parameters=fmtps.length?SDPUtils.parseFmtp(fmtps[0]):{};codec.rtcpFeedback=SDPUtils.matchPrefix(mediaSection,"a=rtcp-fb:"+pt+" ").map(SDPUtils.parseRtcpFb);description.codecs.push(codec);switch(codec.name.toUpperCase()){case"RED":case"ULPFEC":description.fecMechanisms.push(codec.name.toUpperCase());break}}}SDPUtils.matchPrefix(mediaSection,"a=extmap:").forEach(function(line){description.headerExtensions.push(SDPUtils.parseExtmap(line))});return description};SDPUtils.writeRtpDescription=function(kind,caps){var sdp="";sdp+="m="+kind+" ";sdp+=caps.codecs.length>0?"9":"0";sdp+=" UDP/TLS/RTP/SAVPF ";sdp+=caps.codecs.map(function(codec){if(codec.preferredPayloadType!==undefined){return codec.preferredPayloadType}return codec.payloadType}).join(" ")+"\r\n";sdp+="c=IN IP4 0.0.0.0\r\n";sdp+="a=rtcp:9 IN IP4 0.0.0.0\r\n";caps.codecs.forEach(function(codec){sdp+=SDPUtils.writeRtpMap(codec);sdp+=SDPUtils.writeFmtp(codec);sdp+=SDPUtils.writeRtcpFb(codec)});var maxptime=0;caps.codecs.forEach(function(codec){if(codec.maxptime>maxptime){maxptime=codec.maxptime}});if(maxptime>0){sdp+="a=maxptime:"+maxptime+"\r\n"}sdp+="a=rtcp-mux\r\n";if(caps.headerExtensions){caps.headerExtensions.forEach(function(extension){sdp+=SDPUtils.writeExtmap(extension)})}return sdp};SDPUtils.parseRtpEncodingParameters=function(mediaSection){var encodingParameters=[];var description=SDPUtils.parseRtpParameters(mediaSection);var hasRed=description.fecMechanisms.indexOf("RED")!==-1;var hasUlpfec=description.fecMechanisms.indexOf("ULPFEC")!==-1;var ssrcs=SDPUtils.matchPrefix(mediaSection,"a=ssrc:").map(function(line){return SDPUtils.parseSsrcMedia(line)}).filter(function(parts){return parts.attribute==="cname"});var primarySsrc=ssrcs.length>0&&ssrcs[0].ssrc;var secondarySsrc;var flows=SDPUtils.matchPrefix(mediaSection,"a=ssrc-group:FID").map(function(line){var parts=line.substr(17).split(" ");return parts.map(function(part){return parseInt(part,10)})});if(flows.length>0&&flows[0].length>1&&flows[0][0]===primarySsrc){secondarySsrc=flows[0][1]}description.codecs.forEach(function(codec){if(codec.name.toUpperCase()==="RTX"&&codec.parameters.apt){var encParam={ssrc:primarySsrc,codecPayloadType:parseInt(codec.parameters.apt,10)};if(primarySsrc&&secondarySsrc){encParam.rtx={ssrc:secondarySsrc}}encodingParameters.push(encParam);if(hasRed){encParam=JSON.parse(JSON.stringify(encParam));encParam.fec={ssrc:primarySsrc,mechanism:hasUlpfec?"red+ulpfec":"red"};encodingParameters.push(encParam)}}});if(encodingParameters.length===0&&primarySsrc){encodingParameters.push({ssrc:primarySsrc})}var bandwidth=SDPUtils.matchPrefix(mediaSection,"b=");if(bandwidth.length){if(bandwidth[0].indexOf("b=TIAS:")===0){bandwidth=parseInt(bandwidth[0].substr(7),10)}else if(bandwidth[0].indexOf("b=AS:")===0){bandwidth=parseInt(bandwidth[0].substr(5),10)*1e3*.95-50*40*8}else{bandwidth=undefined}encodingParameters.forEach(function(params){params.maxBitrate=bandwidth})}return encodingParameters};SDPUtils.parseRtcpParameters=function(mediaSection){var rtcpParameters={};var remoteSsrc=SDPUtils.matchPrefix(mediaSection,"a=ssrc:").map(function(line){return SDPUtils.parseSsrcMedia(line)}).filter(function(obj){return obj.attribute==="cname"})[0];if(remoteSsrc){rtcpParameters.cname=remoteSsrc.value;rtcpParameters.ssrc=remoteSsrc.ssrc}var rsize=SDPUtils.matchPrefix(mediaSection,"a=rtcp-rsize");rtcpParameters.reducedSize=rsize.length>0;rtcpParameters.compound=rsize.length===0;var mux=SDPUtils.matchPrefix(mediaSection,"a=rtcp-mux");rtcpParameters.mux=mux.length>0;return rtcpParameters};SDPUtils.parseMsid=function(mediaSection){var parts;var spec=SDPUtils.matchPrefix(mediaSection,"a=msid:");if(spec.length===1){parts=spec[0].substr(7).split(" ");return{stream:parts[0],track:parts[1]}}var planB=SDPUtils.matchPrefix(mediaSection,"a=ssrc:").map(function(line){return SDPUtils.parseSsrcMedia(line)}).filter(function(msidParts){return msidParts.attribute==="msid"});if(planB.length>0){parts=planB[0].value.split(" ");return{stream:parts[0],track:parts[1]}}};SDPUtils.parseSctpDescription=function(mediaSection){var mline=SDPUtils.parseMLine(mediaSection);var maxSizeLine=SDPUtils.matchPrefix(mediaSection,"a=max-message-size:");var maxMessageSize;if(maxSizeLine.length>0){maxMessageSize=parseInt(maxSizeLine[0].substr(19),10)}if(isNaN(maxMessageSize)){maxMessageSize=65536}var sctpPort=SDPUtils.matchPrefix(mediaSection,"a=sctp-port:");if(sctpPort.length>0){return{port:parseInt(sctpPort[0].substr(12),10),protocol:mline.fmt,maxMessageSize:maxMessageSize}}var sctpMapLines=SDPUtils.matchPrefix(mediaSection,"a=sctpmap:");if(sctpMapLines.length>0){var parts=SDPUtils.matchPrefix(mediaSection,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(parts[0],10),protocol:parts[1],maxMessageSize:maxMessageSize}}};SDPUtils.writeSctpDescription=function(media,sctp){var output=[];if(media.protocol!=="DTLS/SCTP"){output=["m="+media.kind+" 9 "+media.protocol+" "+sctp.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+sctp.port+"\r\n"]}else{output=["m="+media.kind+" 9 "+media.protocol+" "+sctp.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+sctp.port+" "+sctp.protocol+" 65535\r\n"]}if(sctp.maxMessageSize!==undefined){output.push("a=max-message-size:"+sctp.maxMessageSize+"\r\n")}return output.join("")};SDPUtils.generateSessionId=function(){return Math.random().toString().substr(2,21)};SDPUtils.writeSessionBoilerplate=function(sessId,sessVer,sessUser){var sessionId;var version=sessVer!==undefined?sessVer:2;if(sessId){sessionId=sessId}else{sessionId=SDPUtils.generateSessionId()}var user=sessUser||"thisisadapterortc";return"v=0\r\n"+"o="+user+" "+sessionId+" "+version+" IN IP4 127.0.0.1\r\n"+"s=-\r\n"+"t=0 0\r\n"};SDPUtils.writeMediaSection=function(transceiver,caps,type,stream){var sdp=SDPUtils.writeRtpDescription(transceiver.kind,caps);sdp+=SDPUtils.writeIceParameters(transceiver.iceGatherer.getLocalParameters());sdp+=SDPUtils.writeDtlsParameters(transceiver.dtlsTransport.getLocalParameters(),type==="offer"?"actpass":"active");sdp+="a=mid:"+transceiver.mid+"\r\n";if(transceiver.direction){sdp+="a="+transceiver.direction+"\r\n"}else if(transceiver.rtpSender&&transceiver.rtpReceiver){sdp+="a=sendrecv\r\n"}else if(transceiver.rtpSender){sdp+="a=sendonly\r\n"}else if(transceiver.rtpReceiver){sdp+="a=recvonly\r\n"}else{sdp+="a=inactive\r\n"}if(transceiver.rtpSender){var msid="msid:"+stream.id+" "+transceiver.rtpSender.track.id+"\r\n";sdp+="a="+msid;sdp+="a=ssrc:"+transceiver.sendEncodingParameters[0].ssrc+" "+msid;if(transceiver.sendEncodingParameters[0].rtx){sdp+="a=ssrc:"+transceiver.sendEncodingParameters[0].rtx.ssrc+" "+msid;sdp+="a=ssrc-group:FID "+transceiver.sendEncodingParameters[0].ssrc+" "+transceiver.sendEncodingParameters[0].rtx.ssrc+"\r\n"}}sdp+="a=ssrc:"+transceiver.sendEncodingParameters[0].ssrc+" cname:"+SDPUtils.localCName+"\r\n";if(transceiver.rtpSender&&transceiver.sendEncodingParameters[0].rtx){sdp+="a=ssrc:"+transceiver.sendEncodingParameters[0].rtx.ssrc+" cname:"+SDPUtils.localCName+"\r\n"}return sdp};SDPUtils.getDirection=function(mediaSection,sessionpart){var lines=SDPUtils.splitLines(mediaSection);for(var i=0;i<lines.length;i++){switch(lines[i]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return lines[i].substr(2)}}if(sessionpart){return SDPUtils.getDirection(sessionpart)}return"sendrecv"};SDPUtils.getKind=function(mediaSection){var lines=SDPUtils.splitLines(mediaSection);var mline=lines[0].split(" ");return mline[0].substr(2)};SDPUtils.isRejected=function(mediaSection){return mediaSection.split(" ",2)[1]==="0"};SDPUtils.parseMLine=function(mediaSection){var lines=SDPUtils.splitLines(mediaSection);var parts=lines[0].substr(2).split(" ");return{kind:parts[0],port:parseInt(parts[1],10),protocol:parts[2],fmt:parts.slice(3).join(" ")}};SDPUtils.parseOLine=function(mediaSection){var line=SDPUtils.matchPrefix(mediaSection,"o=")[0];var parts=line.substr(2).split(" ");return{username:parts[0],sessionId:parts[1],sessionVersion:parseInt(parts[2],10),netType:parts[3],addressType:parts[4],address:parts[5]}};SDPUtils.isValidSDP=function(blob){if(typeof blob!=="string"||blob.length===0){return false}var lines=SDPUtils.splitLines(blob);for(var i=0;i<lines.length;i++){if(lines[i].length<2||lines[i].charAt(1)!=="="){return false}}return true};if(_typeof(module)==="object"){module.exports=SDPUtils}},{}]},{},[1])(1)})})(adapeter);Janus$3.sessions={};Janus$3.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia){return true}if(window.navigator.userAgent.match("Chrome")){var chromever=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10);var maxver=33;if(window.navigator.userAgent.match("Linux"))maxver=35;if(chromever>=26&&chromever<=maxver){return true}return Janus$3.extension.isInstalled()}else{return true}};var defaultExtension$1={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function isInstalled(){return document.querySelector("#janus-extension-installed")!==null},getScreen:function getScreen(callback){var pending=window.setTimeout(function(){var error=new Error("NavigatorUserMediaError");error.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)';return callback(error)},1e3);this.cache[pending]=callback;window.postMessage({type:"janusGetScreen",id:pending},"*")},init:function init(){var cache={};this.cache=cache;window.addEventListener("message",function(event){if(event.origin!=window.location.origin)return;if(event.data.type=="janusGotScreen"&&cache[event.data.id]){var callback=cache[event.data.id];delete cache[event.data.id];if(event.data.sourceId===""){var error=new Error("NavigatorUserMediaError");error.name="You cancelled the request for permission, giving up...";callback(error)}else{callback(null,event.data.sourceId)}}else if(event.data.type=="janusGetScreenPending"){console.log("clearing ",event.data.id);window.clearTimeout(event.data.id)}})}};Janus$3.useDefaultDependencies=function(deps){var f=deps&&deps.fetch||fetch;var p=deps&&deps.Promise||Promise;var socketCls=deps&&deps.WebSocket||WebSocket;return{newWebSocket:function newWebSocket(server,proto){return new socketCls(server,proto)},extension:deps&&deps.extension||defaultExtension$1,isArray:function isArray(arr){return Array.isArray(arr)},webRTCAdapter:deps&&deps.adapter||window.adapter,httpAPICall:function httpAPICall(url,options){var fetchOptions={method:options.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};if(options.verb==="POST"){fetchOptions.headers["Content-Type"]="application/json"}if(options.withCredentials!==undefined){fetchOptions.credentials=options.withCredentials===true?"include":options.withCredentials?options.withCredentials:"omit"}if(options.body!==undefined){fetchOptions.body=JSON.stringify(options.body)}var fetching=f(url,fetchOptions)["catch"](function(error){return p.reject({message:"Probably a network error, is the server down?",error:error})});if(options.timeout!==undefined){var timeout=new p(function(resolve,reject){var timerId=setTimeout(function(){clearTimeout(timerId);return reject({message:"Request timed out",timeout:options.timeout})},options.timeout)});fetching=p.race([fetching,timeout])}fetching.then(function(response){if(response.ok){if(_typeof(options.success)===_typeof(Janus$3.noop)){return response.json().then(function(parsed){options.success(parsed)})["catch"](function(error){return p.reject({message:"Failed to parse response body",error:error,response:response})})}}else{return p.reject({message:"API call failed",response:response})}})["catch"](function(error){if(_typeof(options.error)===_typeof(Janus$3.noop)){options.error(error.message||"<< internal error >>",error)}});return fetching}}};Janus$3.useOldDependencies=function(deps){var jq=deps&&deps.jQuery||jQuery;var socketCls=deps&&deps.WebSocket||WebSocket;return{newWebSocket:function newWebSocket(server,proto){return new socketCls(server,proto)},isArray:function isArray(arr){return jq.isArray(arr)},extension:deps&&deps.extension||defaultExtension$1,webRTCAdapter:deps&&deps.adapter||adapter,httpAPICall:function httpAPICall(url,options){var payload=options.body!==undefined?{contentType:"application/json",data:JSON.stringify(options.body)}:{};var credentials=options.withCredentials!==undefined?{xhrFields:{withCredentials:options.withCredentials}}:{};return jq.ajax(jq.extend(payload,credentials,{url:url,type:options.verb,cache:false,dataType:"json",async:options.async,timeout:options.timeout,success:function success(result){if(_typeof(options.success)===_typeof(Janus$3.noop)){options.success(result)}},error:function error(xhr,status,err){if(_typeof(options.error)===_typeof(Janus$3.noop)){options.error(status,err)}}}))}}};Janus$3.noop=function(){};Janus$3.dataChanDefaultLabel="JanusDataChannel";Janus$3.endOfCandidates=null;Janus$3.init=function(options){options=options||{};options.callback=typeof options.callback=="function"?options.callback:Janus$3.noop;if(Janus$3.initDone===true){options.callback()}else{if(typeof console=="undefined"||typeof console.log=="undefined")console={log:function log(){}};Janus$3.trace=Janus$3.noop;Janus$3.debug=Janus$3.noop;Janus$3.vdebug=Janus$3.noop;Janus$3.log=Janus$3.noop;Janus$3.warn=Janus$3.noop;Janus$3.error=Janus$3.noop;if(options.debug===true||options.debug==="all"){Janus$3.trace=console.trace.bind(console);Janus$3.debug=console.debug.bind(console);Janus$3.vdebug=console.debug.bind(console);Janus$3.log=console.log.bind(console);Janus$3.warn=console.warn.bind(console);Janus$3.error=console.error.bind(console)}else if(Array.isArray(options.debug)){for(var i in options.debug){var d=options.debug[i];switch(d){case"trace":Janus$3.trace=console.trace.bind(console);break;case"debug":Janus$3.debug=console.debug.bind(console);break;case"vdebug":Janus$3.vdebug=console.debug.bind(console);break;case"log":Janus$3.log=console.log.bind(console);break;case"warn":Janus$3.warn=console.warn.bind(console);break;case"error":Janus$3.error=console.error.bind(console);break;default:console.error("Unknown debugging option '"+d+"' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')");break}}}Janus$3.log("Initializing library");var usedDependencies=options.dependencies||Janus$3.useDefaultDependencies();Janus$3.isArray=usedDependencies.isArray;Janus$3.webRTCAdapter=usedDependencies.webRTCAdapter;Janus$3.httpAPICall=usedDependencies.httpAPICall;Janus$3.newWebSocket=usedDependencies.newWebSocket;Janus$3.extension=usedDependencies.extension;Janus$3.extension.init();Janus$3.listDevices=function(callback,config){callback=typeof callback=="function"?callback:Janus$3.noop;if(config==null)config={audio:true,video:true};if(Janus$3.isGetUserMediaAvailable()){navigator.mediaDevices.getUserMedia(config).then(function(stream){navigator.mediaDevices.enumerateDevices().then(function(devices){Janus$3.debug(devices);callback(devices);try{var tracks=stream.getTracks();for(var i in tracks){var mst=tracks[i];if(mst!==null&&mst!==undefined)mst.stop()}}catch(e){}})})["catch"](function(err){Janus$3.error(err);callback([])})}else{Janus$3.warn("navigator.mediaDevices unavailable");callback([])}};Janus$3.attachMediaStream=function(element,stream){if(Janus$3.webRTCAdapter.browserDetails.browser==="chrome"){var chromever=Janus$3.webRTCAdapter.browserDetails.version;if(chromever>=52){element.srcObject=stream}else{Janus$3.error("Error attaching stream to element")}}else{element.srcObject=stream}};Janus$3.reattachMediaStream=function(to,from){if(Janus$3.webRTCAdapter.browserDetails.browser==="chrome"){var chromever=Janus$3.webRTCAdapter.browserDetails.version;if(chromever>=52){to.srcObject=from.srcObject}else if(typeof to.src!=="undefined"){to.src=from.src}else{Janus$3.error("Error reattaching stream to element")}}else{to.srcObject=from.srcObject}};var iOS=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0;var eventName=iOS?"pagehide":"beforeunload";var oldOBF=window["on"+eventName];window.addEventListener(eventName,function(event){Janus$3.log("Closing window");for(var s in Janus$3.sessions){if(Janus$3.sessions[s]!==null&&Janus$3.sessions[s]!==undefined&&Janus$3.sessions[s].destroyOnUnload){Janus$3.log("Destroying session "+s);Janus$3.sessions[s].destroy({asyncRequest:false,notifyDestroyed:false})}}if(oldOBF&&typeof oldOBF=="function")oldOBF()});Janus$3.safariVp8=false;if(Janus$3.webRTCAdapter.browserDetails.browser==="safari"&&Janus$3.webRTCAdapter.browserDetails.version>=605){if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(var i in RTCRtpSender.getCapabilities("video").codecs){var codec=RTCRtpSender.getCapabilities("video").codecs[i];if(codec&&codec.mimeType&&codec.mimeType.toLowerCase()==="video/vp8"){Janus$3.safariVp8=true;break}}if(Janus$3.safariVp8){Janus$3.log("This version of Safari supports VP8")}else{Janus$3.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, "+"try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}}else{var testpc=new RTCPeerConnection({},{});testpc.createOffer({offerToReceiveVideo:true}).then(function(offer){Janus$3.safariVp8=offer.sdp.indexOf("VP8")!==-1;if(Janus$3.safariVp8){Janus$3.log("This version of Safari supports VP8")}else{Janus$3.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, "+"try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}testpc.close();testpc=null})}}Janus$3.unifiedPlan=false;if(Janus$3.webRTCAdapter.browserDetails.browser==="firefox"&&Janus$3.webRTCAdapter.browserDetails.version>=59){Janus$3.unifiedPlan=true}else if(Janus$3.webRTCAdapter.browserDetails.browser==="chrome"&&Janus$3.webRTCAdapter.browserDetails.version<72){Janus$3.unifiedPlan=false}else if(typeof RTCRtpTransceiver!=="undefined"&&!("currentDirection"in RTCRtpTransceiver.prototype)){Janus$3.unifiedPlan=false}else{var tempPc=new RTCPeerConnection;try{tempPc.addTransceiver("audio");Janus$3.unifiedPlan=true}catch(e){}tempPc.close()}Janus$3.initDone=true;options.callback()}};Janus$3.isWebrtcSupported=function(){return window.RTCPeerConnection!==undefined&&window.RTCPeerConnection!==null};Janus$3.isGetUserMediaAvailable=function(){return navigator.mediaDevices!==undefined&&navigator.mediaDevices!==null&&navigator.mediaDevices.getUserMedia!==undefined&&navigator.mediaDevices.getUserMedia!==null};Janus$3.randomString=function(len){var charSet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";var randomString="";for(var i=0;i<len;i++){var randomPoz=Math.floor(Math.random()*charSet.length);randomString+=charSet.substring(randomPoz,randomPoz+1)}return randomString};function Janus$3(gatewayCallbacks){if(Janus$3.initDone===undefined){gatewayCallbacks.error("Library not initialized");return{}}if(!Janus$3.isWebrtcSupported()){gatewayCallbacks.error("WebRTC not supported by this browser");return{}}Janus$3.log("Library initialized: "+Janus$3.initDone);gatewayCallbacks=gatewayCallbacks||{};gatewayCallbacks.success=typeof gatewayCallbacks.success=="function"?gatewayCallbacks.success:Janus$3.noop;gatewayCallbacks.error=typeof gatewayCallbacks.error=="function"?gatewayCallbacks.error:Janus$3.noop;gatewayCallbacks.destroyed=typeof gatewayCallbacks.destroyed=="function"?gatewayCallbacks.destroyed:Janus$3.noop;if(gatewayCallbacks.server===null||gatewayCallbacks.server===undefined){gatewayCallbacks.error("Invalid server url");return{}}var websockets=false;var ws=null;var wsHandlers={};var wsKeepaliveTimeoutId=null;var servers=null,serversIndex=0;var server=gatewayCallbacks.server;if(Janus$3.isArray(server)){Janus$3.log("Multiple servers provided ("+server.length+"), will use the first that works");server=null;servers=gatewayCallbacks.server;Janus$3.debug(servers)}else{if(server.indexOf("ws")===0){websockets=true;Janus$3.log("Using WebSockets to contact Janus: "+server)}else{websockets=false;Janus$3.log("Using REST API to contact Janus: "+server)}}var iceServers=gatewayCallbacks.iceServers;if(iceServers===undefined||iceServers===null)iceServers=[{urls:"stun:stun.l.google.com:19302"}];var iceTransportPolicy=gatewayCallbacks.iceTransportPolicy;var bundlePolicy=gatewayCallbacks.bundlePolicy;var ipv6Support=gatewayCallbacks.ipv6;if(ipv6Support===undefined||ipv6Support===null)ipv6Support=false;var withCredentials=false;if(gatewayCallbacks.withCredentials!==undefined&&gatewayCallbacks.withCredentials!==null)withCredentials=gatewayCallbacks.withCredentials===true;var maxev=10;if(gatewayCallbacks.max_poll_events!==undefined&&gatewayCallbacks.max_poll_events!==null)maxev=gatewayCallbacks.max_poll_events;if(maxev<1)maxev=1;var token=null;if(gatewayCallbacks.token!==undefined&&gatewayCallbacks.token!==null)token=gatewayCallbacks.token;var apisecret=null;if(gatewayCallbacks.apisecret!==undefined&&gatewayCallbacks.apisecret!==null)apisecret=gatewayCallbacks.apisecret;this.destroyOnUnload=true;if(gatewayCallbacks.destroyOnUnload!==undefined&&gatewayCallbacks.destroyOnUnload!==null)this.destroyOnUnload=gatewayCallbacks.destroyOnUnload===true;var keepAlivePeriod=25e3;if(gatewayCallbacks.keepAlivePeriod!==undefined&&gatewayCallbacks.keepAlivePeriod!==null)keepAlivePeriod=gatewayCallbacks.keepAlivePeriod;if(isNaN(keepAlivePeriod))keepAlivePeriod=25e3;var longPollTimeout=6e4;if(gatewayCallbacks.longPollTimeout!==undefined&&gatewayCallbacks.longPollTimeout!==null)longPollTimeout=gatewayCallbacks.longPollTimeout;if(isNaN(longPollTimeout))longPollTimeout=6e4;function getMaxBitrates(simulcastMaxBitrates){var maxBitrates={high:9e5,medium:3e5,low:1e5};if(simulcastMaxBitrates!==undefined&&simulcastMaxBitrates!==null){if(simulcastMaxBitrates.high)maxBitrates.high=simulcastMaxBitrates.high;if(simulcastMaxBitrates.medium)maxBitrates.medium=simulcastMaxBitrates.medium;if(simulcastMaxBitrates.low)maxBitrates.low=simulcastMaxBitrates.low}return maxBitrates}var connected=false;var sessionId=null;var pluginHandles={};var that=this;var retries=0;var transactions={};createSession(gatewayCallbacks);this.getServer=function(){return server};this.isConnected=function(){return connected};this.reconnect=function(callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$3.noop;callbacks["reconnect"]=true;createSession(callbacks)};this.getSessionId=function(){return sessionId};this.destroy=function(callbacks){destroySession(callbacks)};this.attach=function(callbacks){createHandle(callbacks)};function eventHandler(){if(sessionId==null)return;Janus$3.debug("Long poll...");if(!connected){Janus$3.warn("Is the server down? (connected=false)");return}var longpoll=server+"/"+sessionId+"?rid="+(new Date).getTime();if(maxev!==undefined&&maxev!==null)longpoll=longpoll+"&maxev="+maxev;if(token!==null&&token!==undefined)longpoll=longpoll+"&token="+encodeURIComponent(token);if(apisecret!==null&&apisecret!==undefined)longpoll=longpoll+"&apisecret="+encodeURIComponent(apisecret);Janus$3.httpAPICall(longpoll,{verb:"GET",withCredentials:withCredentials,success:handleEvent,timeout:longPollTimeout,error:function error(textStatus,errorThrown){Janus$3.error(textStatus+":",errorThrown);retries++;if(retries>3){connected=false;gatewayCallbacks.error("Lost connection to the server (is it down?)");return}eventHandler()}})}function handleEvent(json,skipTimeout){retries=0;if(!websockets&&sessionId!==undefined&&sessionId!==null&&skipTimeout!==true)eventHandler();if(!websockets&&Janus$3.isArray(json)){for(var i=0;i<json.length;i++){handleEvent(json[i],true)}return}if(json["rtcgw"]==="keepalive"){Janus$3.vdebug("Got a keepalive on session "+sessionId);return}else if(json["rtcgw"]==="ack"){Janus$3.debug("Got an ack on session "+sessionId);Janus$3.debug(json);var transaction=json["transaction"];if(transaction!==null&&transaction!==undefined){var reportSuccess=transactions[transaction];if(reportSuccess!==null&&reportSuccess!==undefined){reportSuccess(json)}delete transactions[transaction]}return}else if(json["rtcgw"]==="success"){Janus$3.debug("Got a success on session "+sessionId);Janus$3.debug(json);var transaction=json["transaction"];if(transaction!==null&&transaction!==undefined){var reportSuccess=transactions[transaction];if(reportSuccess!==null&&reportSuccess!==undefined){reportSuccess(json)}delete transactions[transaction]}return}else if(json["rtcgw"]==="trickle"){var sender=json["sender"];if(sender===undefined||sender===null){Janus$3.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$3.debug("This handle is not attached to this session");return}var candidate=json["candidate"];Janus$3.debug("Got a trickled candidate on session "+sessionId);Janus$3.debug(candidate);var config=pluginHandle.webrtcStuff;if(config.pc&&config.remoteSdp){Janus$3.debug("Adding remote candidate:",candidate);if(!candidate||candidate.completed===true){config.pc.addIceCandidate(Janus$3.endOfCandidates)}else{config.pc.addIceCandidate(candidate)}}else{Janus$3.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate");if(!config.candidates)config.candidates=[];config.candidates.push(candidate);Janus$3.debug(config.candidates)}}else if(json["rtcgw"]==="webrtcup"){Janus$3.debug("Got a webrtcup event on session "+sessionId);Janus$3.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$3.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$3.debug("This handle is not attached to this session");return}pluginHandle.webrtcState(true);return}else if(json["rtcgw"]==="hangup"){Janus$3.debug("Got a hangup event on session "+sessionId);Janus$3.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$3.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$3.debug("This handle is not attached to this session");return}pluginHandle.webrtcState(false,json["reason"]);pluginHandle.hangup()}else if(json["rtcgw"]==="detached"){Janus$3.debug("Got a detached event on session "+sessionId);Janus$3.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$3.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){return}pluginHandle.detached=true;pluginHandle.ondetached();pluginHandle.detach()}else if(json["rtcgw"]==="media"){Janus$3.debug("Got a media event on session "+sessionId);Janus$3.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$3.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$3.debug("This handle is not attached to this session");return}pluginHandle.mediaState(json["type"],json["receiving"])}else if(json["rtcgw"]==="slowlink"){Janus$3.debug("Got a slowlink event on session "+sessionId);Janus$3.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$3.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$3.debug("This handle is not attached to this session");return}pluginHandle.slowLink(json["uplink"],json["lost"])}else if(json["rtcgw"]==="error"){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason);Janus$3.debug(json);var transaction=json["transaction"];if(transaction!==null&&transaction!==undefined){var reportSuccess=transactions[transaction];if(reportSuccess!==null&&reportSuccess!==undefined){reportSuccess(json)}delete transactions[transaction]}return}else if(json["rtcgw"]==="event"){Janus$3.debug("Got a plugin event on session "+sessionId);Janus$3.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$3.warn("Missing sender...");return}var plugindata=json["plugindata"];if(plugindata===undefined||plugindata===null){Janus$3.warn("Missing plugindata...");return}Janus$3.debug("  -- Event is coming from "+sender+" ("+plugindata["plugin"]+")");var data=plugindata["data"];Janus$3.debug(data);var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$3.warn("This handle is not attached to this session");return}var jsep=json["jsep"];if(jsep!==undefined&&jsep!==null){Janus$3.debug("Handling SDP as well...");Janus$3.debug(jsep)}var callback=pluginHandle.onmessage;if(callback!==null&&callback!==undefined){Janus$3.debug("Notifying application...");callback(data,jsep)}else{Janus$3.debug("No provided notification callback")}}else if(json["rtcgw"]==="timeout"){Janus$3.error("Timeout on session "+sessionId);Janus$3.debug(json);if(websockets){ws.close(3504,"Gateway timeout")}return}else{Janus$3.warn("Unknown message/event  '"+json["rtcgw"]+"' on session "+sessionId);Janus$3.debug(json)}}function keepAlive(){if(server===null||!websockets||!connected)return;wsKeepaliveTimeoutId=setTimeout(keepAlive,keepAlivePeriod);var request={rtcgw:"keepalive",session_id:sessionId,transaction:Janus$3.randomString(12)};if(token!==null&&token!==undefined)request["token"]=token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;ws.send(JSON.stringify(request))}function createSession(callbacks){var transaction=Janus$3.randomString(12);var request={rtcgw:"create",transaction:transaction,token:window.EZUIKit.opt.stream,device:window.EZUIKit.opt.deviceSerial,channel:window.EZUIKit.opt.channelNo};if(callbacks["reconnect"]){connected=false;request["rtcgw"]="claim";request["session_id"]=sessionId;if(ws){ws.onopen=null;ws.onerror=null;ws.onclose=null;if(wsKeepaliveTimeoutId){clearTimeout(wsKeepaliveTimeoutId);wsKeepaliveTimeoutId=null}}}if(token!==null&&token!==undefined)request["token"]=token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(server===null&&Janus$3.isArray(servers)){server=servers[serversIndex];if(server.indexOf("ws")===0){websockets=true;Janus$3.log("Server #"+(serversIndex+1)+": trying WebSockets to contact Janus ("+server+")")}else{websockets=false;Janus$3.log("Server #"+(serversIndex+1)+": trying REST API to contact Janus ("+server+")")}}if(websockets){ws=Janus$3.newWebSocket(server,"rtcgw-protocol");wsHandlers={error:function error(){Janus$3.error("Error connecting to the Janus WebSockets server... "+server);if(Janus$3.isArray(servers)&&!callbacks["reconnect"]){serversIndex++;if(serversIndex==servers.length){callbacks.error("Error connecting to any of the provided Janus servers: Is the server down?");return}server=null;setTimeout(function(){createSession(callbacks)},200);return}callbacks.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function open(){transactions[transaction]=function(json){Janus$3.debug(json);if(json["rtcgw"]!=="success"){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error(json["error"].reason);return}wsKeepaliveTimeoutId=setTimeout(keepAlive,keepAlivePeriod);connected=true;sessionId=json["session_id"]?json["session_id"]:json.data["id"];if(callbacks["reconnect"]){Janus$3.log("Claimed session: "+sessionId)}else{Janus$3.log("Created session: "+sessionId)}Janus$3.sessions[sessionId]=that;callbacks.success()};ws.send(JSON.stringify(request))},message:function message(event){handleEvent(JSON.parse(event.data))},close:function close(){if(server===null||!connected){return}connected=false;gatewayCallbacks.error("Lost connection to the server (is it down?)")}};for(var eventName in wsHandlers){ws.addEventListener(eventName,wsHandlers[eventName])}return}Janus$3.httpAPICall(server,{verb:"POST",withCredentials:withCredentials,body:request,success:function success(json){Janus$3.debug(json);if(json["rtcgw"]!=="success"){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error(json["error"].reason);return}connected=true;sessionId=json["session_id"]?json["session_id"]:json.data["id"];if(callbacks["reconnect"]){Janus$3.log("Claimed session: "+sessionId)}else{Janus$3.log("Created session: "+sessionId)}Janus$3.sessions[sessionId]=that;eventHandler();callbacks.success()},error:function error(textStatus,errorThrown){Janus$3.error(textStatus+":",errorThrown);if(Janus$3.isArray(servers)&&!callbacks["reconnect"]){serversIndex++;if(serversIndex==servers.length){callbacks.error("Error connecting to any of the provided Janus servers: Is the server down?");return}server=null;setTimeout(function(){createSession(callbacks)},200);return}if(errorThrown==="")callbacks.error(textStatus+": Is the server down?");else callbacks.error(textStatus+": "+errorThrown)}})}function destroySession(callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;var asyncRequest=true;if(callbacks.asyncRequest!==undefined&&callbacks.asyncRequest!==null)asyncRequest=callbacks.asyncRequest===true;var notifyDestroyed=true;if(callbacks.notifyDestroyed!==undefined&&callbacks.notifyDestroyed!==null)notifyDestroyed=callbacks.notifyDestroyed===true;var cleanupHandles=false;if(callbacks.cleanupHandles!==undefined&&callbacks.cleanupHandles!==null)cleanupHandles=callbacks.cleanupHandles===true;Janus$3.log("Destroying session "+sessionId+" (async="+asyncRequest+")");if(!connected){Janus$3.warn("Is the server down? (connected=false)");callbacks.success();return}if(sessionId===undefined||sessionId===null){Janus$3.warn("No session to destroy");callbacks.success();if(notifyDestroyed)gatewayCallbacks.destroyed();return}if(cleanupHandles){for(var handleId in pluginHandles)destroyHandle(handleId,{noRequest:true})}var request={rtcgw:"destroy",transaction:Janus$3.randomString(12)};if(token!==null&&token!==undefined)request["token"]=token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(websockets){request["session_id"]=sessionId;var unbindWebSocket=function unbindWebSocket(){for(var eventName in wsHandlers){ws.removeEventListener(eventName,wsHandlers[eventName])}ws.removeEventListener("message",onUnbindMessage);ws.removeEventListener("error",onUnbindError);if(wsKeepaliveTimeoutId){clearTimeout(wsKeepaliveTimeoutId)}ws.close()};var onUnbindMessage=function onUnbindMessage(event){var data=JSON.parse(event.data);if(data.session_id==request.session_id&&data.transaction==request.transaction){unbindWebSocket();callbacks.success();if(notifyDestroyed)gatewayCallbacks.destroyed()}};var onUnbindError=function onUnbindError(event){unbindWebSocket();callbacks.error("Failed to destroy the server: Is the server down?");if(notifyDestroyed)gatewayCallbacks.destroyed()};ws.addEventListener("message",onUnbindMessage);ws.addEventListener("error",onUnbindError);ws.send(JSON.stringify(request));return}Janus$3.httpAPICall(server+"/"+sessionId,{verb:"POST",async:asyncRequest,withCredentials:withCredentials,body:request,success:function success(json){Janus$3.log("Destroyed session:");Janus$3.debug(json);sessionId=null;connected=false;if(json["rtcgw"]!=="success"){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason)}callbacks.success();if(notifyDestroyed)gatewayCallbacks.destroyed()},error:function error(textStatus,errorThrown){Janus$3.error(textStatus+":",errorThrown);sessionId=null;connected=false;callbacks.success();if(notifyDestroyed)gatewayCallbacks.destroyed()}})}function createHandle(callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$3.noop;callbacks.consentDialog=typeof callbacks.consentDialog=="function"?callbacks.consentDialog:Janus$3.noop;callbacks.iceState=typeof callbacks.iceState=="function"?callbacks.iceState:Janus$3.noop;callbacks.mediaState=typeof callbacks.mediaState=="function"?callbacks.mediaState:Janus$3.noop;callbacks.webrtcState=typeof callbacks.webrtcState=="function"?callbacks.webrtcState:Janus$3.noop;callbacks.slowLink=typeof callbacks.slowLink=="function"?callbacks.slowLink:Janus$3.noop;callbacks.onmessage=typeof callbacks.onmessage=="function"?callbacks.onmessage:Janus$3.noop;callbacks.onlocalstream=typeof callbacks.onlocalstream=="function"?callbacks.onlocalstream:Janus$3.noop;callbacks.onremotestream=typeof callbacks.onremotestream=="function"?callbacks.onremotestream:Janus$3.noop;callbacks.ondata=typeof callbacks.ondata=="function"?callbacks.ondata:Janus$3.noop;callbacks.ondataopen=typeof callbacks.ondataopen=="function"?callbacks.ondataopen:Janus$3.noop;callbacks.oncleanup=typeof callbacks.oncleanup=="function"?callbacks.oncleanup:Janus$3.noop;callbacks.ondetached=typeof callbacks.ondetached=="function"?callbacks.ondetached:Janus$3.noop;if(!connected){Janus$3.warn("Is the server down? (connected=false)");callbacks.error("Is the server down? (connected=false)");return}var plugin=callbacks.plugin;if(plugin===undefined||plugin===null){Janus$3.error("Invalid plugin");callbacks.error("Invalid plugin");return}var opaqueId=callbacks.opaqueId;var handleToken=callbacks.token?callbacks.token:token;var transaction=Janus$3.randomString(12);var request={rtcgw:"attach",plugin:plugin,opaque_id:opaqueId,transaction:transaction};if(handleToken!==null&&handleToken!==undefined)request["token"]=handleToken;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(websockets){transactions[transaction]=function(json){Janus$3.debug(json);if(json["rtcgw"]!=="success"){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error("Ooops: "+json["error"].code+" "+json["error"].reason);return}var handleId=json.data["id"];Janus$3.log("Created handle: "+handleId);var pluginHandle={session:that,plugin:plugin,id:handleId,token:handleToken,detached:false,webrtcStuff:{started:false,myStream:null,streamExternal:false,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:true,iceDone:false,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function getId(){return handleId},getPlugin:function getPlugin(){return plugin},getVolume:function getVolume(){return _getVolume(handleId,true)},getRemoteVolume:function getRemoteVolume(){return _getVolume(handleId,true)},getLocalVolume:function getLocalVolume(){return _getVolume(handleId,false)},isAudioMuted:function isAudioMuted(){return isMuted(handleId,false)},muteAudio:function muteAudio(){return mute(handleId,false,true)},unmuteAudio:function unmuteAudio(){return mute(handleId,false,false)},isVideoMuted:function isVideoMuted(){return isMuted(handleId,true)},muteVideo:function muteVideo(){return mute(handleId,true,true)},unmuteVideo:function unmuteVideo(){return mute(handleId,true,false)},getBitrate:function getBitrate(){return _getBitrate(handleId)},send:function send(callbacks){sendMessage(handleId,callbacks)},data:function data(callbacks){sendData(handleId,callbacks)},dtmf:function dtmf(callbacks){sendDtmf(handleId,callbacks)},consentDialog:callbacks.consentDialog,iceState:callbacks.iceState,mediaState:callbacks.mediaState,webrtcState:callbacks.webrtcState,slowLink:callbacks.slowLink,onmessage:callbacks.onmessage,createOffer:function createOffer(callbacks){prepareWebrtc(handleId,true,callbacks)},createAnswer:function createAnswer(callbacks){prepareWebrtc(handleId,false,callbacks)},handleRemoteJsep:function handleRemoteJsep(callbacks){prepareWebrtcPeer(handleId,callbacks)},onlocalstream:callbacks.onlocalstream,onremotestream:callbacks.onremotestream,ondata:callbacks.ondata,ondataopen:callbacks.ondataopen,oncleanup:callbacks.oncleanup,ondetached:callbacks.ondetached,hangup:function hangup(sendRequest){cleanupWebrtc(handleId,sendRequest===true)},detach:function detach(callbacks){destroyHandle(handleId,callbacks)}};pluginHandles[handleId]=pluginHandle;callbacks.success(pluginHandle)};request["session_id"]=sessionId;ws.send(JSON.stringify(request));return}Janus$3.httpAPICall(server+"/"+sessionId,{verb:"POST",withCredentials:withCredentials,body:request,success:function success(json){Janus$3.debug(json);if(json["rtcgw"]!=="success"){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error("Ooops: "+json["error"].code+" "+json["error"].reason);return}var handleId=json.data["id"];Janus$3.log("Created handle: "+handleId);var pluginHandle={session:that,plugin:plugin,id:handleId,token:handleToken,detached:false,webrtcStuff:{started:false,myStream:null,streamExternal:false,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:true,iceDone:false,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function getId(){return handleId},getPlugin:function getPlugin(){return plugin},getVolume:function getVolume(){return _getVolume(handleId,true)},getRemoteVolume:function getRemoteVolume(){return _getVolume(handleId,true)},getLocalVolume:function getLocalVolume(){return _getVolume(handleId,false)},isAudioMuted:function isAudioMuted(){return isMuted(handleId,false)},muteAudio:function muteAudio(){return mute(handleId,false,true)},unmuteAudio:function unmuteAudio(){return mute(handleId,false,false)},isVideoMuted:function isVideoMuted(){return isMuted(handleId,true)},muteVideo:function muteVideo(){return mute(handleId,true,true)},unmuteVideo:function unmuteVideo(){return mute(handleId,true,false)},getBitrate:function getBitrate(){return _getBitrate(handleId)},send:function send(callbacks){sendMessage(handleId,callbacks)},data:function data(callbacks){sendData(handleId,callbacks)},dtmf:function dtmf(callbacks){sendDtmf(handleId,callbacks)},consentDialog:callbacks.consentDialog,iceState:callbacks.iceState,mediaState:callbacks.mediaState,webrtcState:callbacks.webrtcState,slowLink:callbacks.slowLink,onmessage:callbacks.onmessage,createOffer:function createOffer(callbacks){prepareWebrtc(handleId,true,callbacks)},createAnswer:function createAnswer(callbacks){prepareWebrtc(handleId,false,callbacks)},handleRemoteJsep:function handleRemoteJsep(callbacks){prepareWebrtcPeer(handleId,callbacks)},onlocalstream:callbacks.onlocalstream,onremotestream:callbacks.onremotestream,ondata:callbacks.ondata,ondataopen:callbacks.ondataopen,oncleanup:callbacks.oncleanup,ondetached:callbacks.ondetached,hangup:function hangup(sendRequest){cleanupWebrtc(handleId,sendRequest===true)},detach:function detach(callbacks){destroyHandle(handleId,callbacks)}};pluginHandles[handleId]=pluginHandle;callbacks.success(pluginHandle)},error:function error(textStatus,errorThrown){Janus$3.error(textStatus+":",errorThrown)}})}function sendMessage(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$3.noop;if(!connected){Janus$3.warn("Is the server down? (connected=false)");callbacks.error("Is the server down? (connected=false)");return}var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");callbacks.error("Invalid handle");return}var message=callbacks.message;var jsep=callbacks.jsep;var transaction=Janus$3.randomString(12);var request={rtcgw:"message",body:message,transaction:transaction};if(pluginHandle.token!==null&&pluginHandle.token!==undefined)request["token"]=pluginHandle.token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(jsep!==null&&jsep!==undefined)request.jsep=jsep;Janus$3.debug("Sending message to plugin (handle="+handleId+"):");Janus$3.debug(request);if(websockets){request["session_id"]=sessionId;request["handle_id"]=handleId;transactions[transaction]=function(json){Janus$3.debug("Message sent!");Janus$3.debug(json);if(json["rtcgw"]==="success"){var plugindata=json["plugindata"];if(plugindata===undefined||plugindata===null){Janus$3.warn("Request succeeded, but missing plugindata...");callbacks.success();return}Janus$3.log("Synchronous transaction successful ("+plugindata["plugin"]+")");var data=plugindata["data"];Janus$3.debug(data);callbacks.success(data);return}else if(json["rtcgw"]!=="ack"){if(json["error"]!==undefined&&json["error"]!==null){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error(json["error"].code+" "+json["error"].reason)}else{Janus$3.error("Unknown error");callbacks.error("Unknown error")}return}callbacks.success()};ws.send(JSON.stringify(request));return}Janus$3.httpAPICall(server+"/"+sessionId+"/"+handleId,{verb:"POST",withCredentials:withCredentials,body:request,success:function success(json){Janus$3.debug("Message sent!");Janus$3.debug(json);if(json["rtcgw"]==="success"){var plugindata=json["plugindata"];if(plugindata===undefined||plugindata===null){Janus$3.warn("Request succeeded, but missing plugindata...");callbacks.success();return}Janus$3.log("Synchronous transaction successful ("+plugindata["plugin"]+")");var data=plugindata["data"];Janus$3.debug(data);callbacks.success(data);return}else if(json["rtcgw"]!=="ack"){if(json["error"]!==undefined&&json["error"]!==null){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error(json["error"].code+" "+json["error"].reason)}else{Janus$3.error("Unknown error");callbacks.error("Unknown error")}return}callbacks.success()},error:function error(textStatus,errorThrown){Janus$3.error(textStatus+":",errorThrown);callbacks.error(textStatus+": "+errorThrown)}})}function sendTrickleCandidate(handleId,candidate){if(!connected){Janus$3.warn("Is the server down? (connected=false)");return}var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");return}var request={rtcgw:"trickle",candidate:candidate,transaction:Janus$3.randomString(12)};if(pluginHandle.token!==null&&pluginHandle.token!==undefined)request["token"]=pluginHandle.token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;Janus$3.vdebug("Sending trickle candidate (handle="+handleId+"):");Janus$3.vdebug(request);if(websockets){request["session_id"]=sessionId;request["handle_id"]=handleId;ws.send(JSON.stringify(request));return}Janus$3.httpAPICall(server+"/"+sessionId+"/"+handleId,{verb:"POST",withCredentials:withCredentials,body:request,success:function success(json){Janus$3.vdebug("Candidate sent!");Janus$3.vdebug(json);if(json["rtcgw"]!=="ack"){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason);return}},error:function error(textStatus,errorThrown){Janus$3.error(textStatus+":",errorThrown)}})}function createDataChannel(handleId,dclabel,incoming,pendingText){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");return}var config=pluginHandle.webrtcStuff;var onDataChannelMessage=function onDataChannelMessage(event){Janus$3.log("Received message on data channel:",event);var label=event.target.label;pluginHandle.ondata(event.data,label)};var onDataChannelStateChange=function onDataChannelStateChange(event){Janus$3.log("Received state change on data channel:",event);var label=event.target.label;var dcState=config.dataChannel[label]?config.dataChannel[label].readyState:"null";Janus$3.log("State change on <"+label+"> data channel: "+dcState);if(dcState==="open"){if(config.dataChannel[label].pending&&config.dataChannel[label].pending.length>0){Janus$3.log("Sending pending messages on <"+label+">:",config.dataChannel[label].pending.length);for(var i in config.dataChannel[label].pending){var text=config.dataChannel[label].pending[i];Janus$3.log("Sending string on data channel <"+label+">: "+text);config.dataChannel[label].send(text)}config.dataChannel[label].pending=[]}pluginHandle.ondataopen(label)}};var onDataChannelError=function onDataChannelError(error){Janus$3.error("Got error on data channel:",error)};if(!incoming){config.dataChannel[dclabel]=config.pc.createDataChannel(dclabel,{ordered:false})}else{config.dataChannel[dclabel]=incoming}config.dataChannel[dclabel].onmessage=onDataChannelMessage;config.dataChannel[dclabel].onopen=onDataChannelStateChange;config.dataChannel[dclabel].onclose=onDataChannelStateChange;config.dataChannel[dclabel].onerror=onDataChannelError;config.dataChannel[dclabel].pending=[];if(pendingText)config.dataChannel[dclabel].pending.push(pendingText)}function sendData(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$3.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;var text=callbacks.text;if(text===null||text===undefined){Janus$3.warn("Invalid text");callbacks.error("Invalid text");return}var label=callbacks.label?callbacks.label:Janus$3.dataChanDefaultLabel;if(!config.dataChannel[label]){createDataChannel(handleId,label,false,text);callbacks.success();return}if(config.dataChannel[label].readyState!=="open"){config.dataChannel[label].pending.push(text);callbacks.success();return}Janus$3.log("Sending string on data channel <"+label+">: "+text);config.dataChannel[label].send(text);callbacks.success()}function sendDtmf(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$3.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;if(config.dtmfSender===null||config.dtmfSender===undefined){if(config.pc!==undefined&&config.pc!==null){var senders=config.pc.getSenders();var audioSender=senders.find(function(sender){return sender.track&&sender.track.kind==="audio"});if(!audioSender){Janus$3.warn("Invalid DTMF configuration (no audio track)");callbacks.error("Invalid DTMF configuration (no audio track)");return}config.dtmfSender=audioSender.dtmf;if(config.dtmfSender){Janus$3.log("Created DTMF Sender");config.dtmfSender.ontonechange=function(tone){Janus$3.debug("Sent DTMF tone: "+tone.tone)}}}if(config.dtmfSender===null||config.dtmfSender===undefined){Janus$3.warn("Invalid DTMF configuration");callbacks.error("Invalid DTMF configuration");return}}var dtmf=callbacks.dtmf;if(dtmf===null||dtmf===undefined){Janus$3.warn("Invalid DTMF parameters");callbacks.error("Invalid DTMF parameters");return}var tones=dtmf.tones;if(tones===null||tones===undefined){Janus$3.warn("Invalid DTMF string");callbacks.error("Invalid DTMF string");return}var duration=dtmf.duration;if(duration===null||duration===undefined)duration=500;var gap=dtmf.gap;if(gap===null||gap===undefined)gap=50;Janus$3.debug("Sending DTMF string "+tones+" (duration "+duration+"ms, gap "+gap+"ms)");config.dtmfSender.insertDTMF(tones,duration,gap);callbacks.success()}function destroyHandle(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$3.noop;var asyncRequest=true;if(callbacks.asyncRequest!==undefined&&callbacks.asyncRequest!==null)asyncRequest=callbacks.asyncRequest===true;var noRequest=true;if(callbacks.noRequest!==undefined&&callbacks.noRequest!==null)noRequest=callbacks.noRequest===true;Janus$3.log("Destroying handle "+handleId+" (async="+asyncRequest+")");cleanupWebrtc(handleId);var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.detached){delete pluginHandles[handleId];callbacks.success();return}if(noRequest){delete pluginHandles[handleId];callbacks.success();return}if(!connected){Janus$3.warn("Is the server down? (connected=false)");callbacks.error("Is the server down? (connected=false)");return}var request={rtcgw:"detach",transaction:Janus$3.randomString(12)};if(pluginHandle.token!==null&&pluginHandle.token!==undefined)request["token"]=pluginHandle.token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(websockets){request["session_id"]=sessionId;request["handle_id"]=handleId;ws.send(JSON.stringify(request));delete pluginHandles[handleId];callbacks.success();return}Janus$3.httpAPICall(server+"/"+sessionId+"/"+handleId,{verb:"POST",async:asyncRequest,withCredentials:withCredentials,body:request,success:function success(json){Janus$3.log("Destroyed handle:");Janus$3.debug(json);if(json["rtcgw"]!=="success"){Janus$3.error("Ooops: "+json["error"].code+" "+json["error"].reason)}delete pluginHandles[handleId];callbacks.success()},error:function error(textStatus,errorThrown){Janus$3.error(textStatus+":",errorThrown);delete pluginHandles[handleId];callbacks.success()}})}function streamsDone(handleId,jsep,media,callbacks,stream){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;Janus$3.debug("streamsDone:",stream);if(stream){Janus$3.debug("  -- Audio tracks:",stream.getAudioTracks());Janus$3.debug("  -- Video tracks:",stream.getVideoTracks())}var addTracks=false;if(!config.myStream||!media.update||config.streamExternal){config.myStream=stream;addTracks=true}else{if((!media.update&&isAudioSendEnabled(media)||media.update&&(media.addAudio||media.replaceAudio))&&stream.getAudioTracks()&&stream.getAudioTracks().length){config.myStream.addTrack(stream.getAudioTracks()[0]);if(Janus$3.unifiedPlan){Janus$3.log((media.replaceAudio?"Replacing":"Adding")+" audio track:",stream.getAudioTracks()[0]);var audioTransceiver=null;var transceivers=config.pc.getTransceivers();if(transceivers&&transceivers.length>0){for(var i in transceivers){var t=transceivers[i];if(t.sender&&t.sender.track&&t.sender.track.kind==="audio"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="audio"){audioTransceiver=t;break}}}if(audioTransceiver&&audioTransceiver.sender){audioTransceiver.sender.replaceTrack(stream.getAudioTracks()[0])}else{config.pc.addTrack(stream.getAudioTracks()[0],stream)}}else{Janus$3.log((media.replaceAudio?"Replacing":"Adding")+" audio track:",stream.getAudioTracks()[0]);config.pc.addTrack(stream.getAudioTracks()[0],stream)}}if((!media.update&&isVideoSendEnabled(media)||media.update&&(media.addVideo||media.replaceVideo))&&stream.getVideoTracks()&&stream.getVideoTracks().length){config.myStream.addTrack(stream.getVideoTracks()[0]);if(Janus$3.unifiedPlan){Janus$3.log((media.replaceVideo?"Replacing":"Adding")+" video track:",stream.getVideoTracks()[0]);var videoTransceiver=null;var transceivers=config.pc.getTransceivers();if(transceivers&&transceivers.length>0){for(var i in transceivers){var t=transceivers[i];if(t.sender&&t.sender.track&&t.sender.track.kind==="video"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="video"){videoTransceiver=t;break}}}if(videoTransceiver&&videoTransceiver.sender){videoTransceiver.sender.replaceTrack(stream.getVideoTracks()[0])}else{config.pc.addTrack(stream.getVideoTracks()[0],stream)}}else{Janus$3.log((media.replaceVideo?"Replacing":"Adding")+" video track:",stream.getVideoTracks()[0]);config.pc.addTrack(stream.getVideoTracks()[0],stream)}}}if(!config.pc){var pc_config={iceServers:iceServers,iceTransportPolicy:iceTransportPolicy,bundlePolicy:bundlePolicy};if(Janus$3.webRTCAdapter.browserDetails.browser==="chrome"){pc_config["sdpSemantics"]=Janus$3.webRTCAdapter.browserDetails.version<72?"plan-b":"unified-plan"}var pc_constraints={optional:[{DtlsSrtpKeyAgreement:true}]};if(ipv6Support===true){pc_constraints.optional.push({googIPv6:true})}if(callbacks.rtcConstraints&&_typeof(callbacks.rtcConstraints)==="object"){Janus$3.debug("Adding custom PeerConnection constraints:",callbacks.rtcConstraints);for(var i in callbacks.rtcConstraints){pc_constraints.optional.push(callbacks.rtcConstraints[i])}}if(Janus$3.webRTCAdapter.browserDetails.browser==="edge"){pc_config.bundlePolicy="max-bundle"}Janus$3.log("Creating PeerConnection");Janus$3.debug(pc_constraints);config.pc=new RTCPeerConnection(pc_config,pc_constraints);Janus$3.debug(config.pc);if(config.pc.getStats){config.volume={};config.bitrate.value="0 kbits/sec"}Janus$3.log("Preparing local SDP and gathering candidates (trickle="+config.trickle+")");config.pc.oniceconnectionstatechange=function(e){if(config.pc)pluginHandle.iceState(config.pc.iceConnectionState)};config.pc.onicecandidate=function(event){if(event.candidate==null||Janus$3.webRTCAdapter.browserDetails.browser==="edge"&&event.candidate.candidate.indexOf("endOfCandidates")>0){Janus$3.log("End of candidates.");config.iceDone=true;if(config.trickle===true){sendTrickleCandidate(handleId,{completed:true})}else{sendSDP(handleId,callbacks)}}else{var candidate={candidate:event.candidate.candidate,sdpMid:event.candidate.sdpMid,sdpMLineIndex:event.candidate.sdpMLineIndex};if(config.trickle===true){sendTrickleCandidate(handleId,candidate)}}};config.pc.ontrack=function(event){Janus$3.log("Handling Remote Track");Janus$3.debug(event);if(!event.streams)return;config.remoteStream=event.streams[0];pluginHandle.onremotestream(config.remoteStream);if(event.track.onended)return;Janus$3.log("Adding onended callback to track:",event.track);event.track.onended=function(ev){Janus$3.log("Remote track muted/removed:",ev);if(config.remoteStream){config.remoteStream.removeTrack(ev.target);pluginHandle.onremotestream(config.remoteStream)}};event.track.onmute=event.track.onended;event.track.onunmute=function(ev){Janus$3.log("Remote track flowing again:",ev);try{config.remoteStream.addTrack(ev.target);pluginHandle.onremotestream(config.remoteStream)}catch(e){Janus$3.error(e)}}}}if(addTracks&&stream!==null&&stream!==undefined){Janus$3.log("Adding local stream");var simulcast2=callbacks.simulcast2===true?true:false;stream.getTracks().forEach(function(track){Janus$3.log("Adding local track:",track);if(!simulcast2){config.pc.addTrack(track,stream)}else{if(track.kind==="audio"){config.pc.addTrack(track,stream)}else{Janus$3.log("Enabling rid-based simulcasting:",track);var maxBitrates=getMaxBitrates(callbacks.simulcastMaxBitrates);config.pc.addTransceiver(track,{direction:"sendrecv",streams:[stream],sendEncodings:[{rid:"h",active:true,maxBitrate:maxBitrates.high},{rid:"m",active:true,maxBitrate:maxBitrates.medium,scaleResolutionDownBy:2},{rid:"l",active:true,maxBitrate:maxBitrates.low,scaleResolutionDownBy:4}]})}}})}if(isDataEnabled(media)&&!config.dataChannel[Janus$3.dataChanDefaultLabel]){Janus$3.log("Creating data channel");createDataChannel(handleId,Janus$3.dataChanDefaultLabel,false);config.pc.ondatachannel=function(event){Janus$3.log("Data channel created by Janus:",event);createDataChannel(handleId,event.channel.label,event.channel)}}if(config.myStream)pluginHandle.onlocalstream(config.myStream);if(jsep===null||jsep===undefined){createOffer(handleId,media,callbacks)}else{config.pc.setRemoteDescription(jsep).then(function(){Janus$3.log("Remote description accepted!");config.remoteSdp=jsep.sdp;if(config.candidates&&config.candidates.length>0){for(var i=0;i<config.candidates.length;i++){var candidate=config.candidates[i];Janus$3.debug("Adding remote candidate:",candidate);if(!candidate||candidate.completed===true){config.pc.addIceCandidate(Janus$3.endOfCandidates)}else{config.pc.addIceCandidate(candidate)}}config.candidates=[]}createAnswer(handleId,media,callbacks)},callbacks.error)}}function prepareWebrtc(handleId,offer,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:webrtcError;var jsep=callbacks.jsep;if(offer&&jsep){Janus$3.error("Provided a JSEP to a createOffer");callbacks.error("Provided a JSEP to a createOffer");return}else if(!offer&&(!jsep||!jsep.type||!jsep.sdp)){Janus$3.error("A valid JSEP is required for createAnswer");callbacks.error("A valid JSEP is required for createAnswer");return}callbacks.media=callbacks.media||{audio:true,video:true};var media=callbacks.media;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;config.trickle=isTrickleEnabled(callbacks.trickle);if(config.pc===undefined||config.pc===null){media.update=false;media.keepAudio=false;media.keepVideo=false}else if(config.pc!==undefined&&config.pc!==null){Janus$3.log("Updating existing media session");media.update=true;if(callbacks.stream!==null&&callbacks.stream!==undefined){if(callbacks.stream!==config.myStream){Janus$3.log("Renegotiation involves a new external stream")}}else{if(media.addAudio){media.keepAudio=false;media.replaceAudio=false;media.removeAudio=false;media.audioSend=true;if(config.myStream&&config.myStream.getAudioTracks()&&config.myStream.getAudioTracks().length){Janus$3.error("Can't add audio stream, there already is one");callbacks.error("Can't add audio stream, there already is one");return}}else if(media.removeAudio){media.keepAudio=false;media.replaceAudio=false;media.addAudio=false;media.audioSend=false}else if(media.replaceAudio){media.keepAudio=false;media.addAudio=false;media.removeAudio=false;media.audioSend=true}if(config.myStream===null||config.myStream===undefined){if(media.replaceAudio){media.keepAudio=false;media.replaceAudio=false;media.addAudio=true;media.audioSend=true}if(isAudioSendEnabled(media)){media.keepAudio=false;media.addAudio=true}}else{if(config.myStream.getAudioTracks()===null||config.myStream.getAudioTracks()===undefined||config.myStream.getAudioTracks().length===0){if(media.replaceAudio){media.keepAudio=false;media.replaceAudio=false;media.addAudio=true;media.audioSend=true}if(isAudioSendEnabled(media)){media.keepVideo=false;media.addAudio=true}}else{if(isAudioSendEnabled(media)&&!media.removeAudio&&!media.replaceAudio){media.keepAudio=true}}}if(media.addVideo){media.keepVideo=false;media.replaceVideo=false;media.removeVideo=false;media.videoSend=true;if(config.myStream&&config.myStream.getVideoTracks()&&config.myStream.getVideoTracks().length){Janus$3.error("Can't add video stream, there already is one");callbacks.error("Can't add video stream, there already is one");return}}else if(media.removeVideo){media.keepVideo=false;media.replaceVideo=false;media.addVideo=false;media.videoSend=false}else if(media.replaceVideo){media.keepVideo=false;media.addVideo=false;media.removeVideo=false;media.videoSend=true}if(config.myStream===null||config.myStream===undefined){if(media.replaceVideo){media.keepVideo=false;media.replaceVideo=false;media.addVideo=true;media.videoSend=true}if(isVideoSendEnabled(media)){media.keepVideo=false;media.addVideo=true}}else{if(config.myStream.getVideoTracks()===null||config.myStream.getVideoTracks()===undefined||config.myStream.getVideoTracks().length===0){if(media.replaceVideo){media.keepVideo=false;media.replaceVideo=false;media.addVideo=true;media.videoSend=true}if(isVideoSendEnabled(media)){media.keepVideo=false;media.addVideo=true}}else{if(isVideoSendEnabled(media)&&!media.removeVideo&&!media.replaceVideo){media.keepVideo=true}}}if(media.addData)media.data=true}if(isAudioSendEnabled(media)&&media.keepAudio&&isVideoSendEnabled(media)&&media.keepVideo){pluginHandle.consentDialog(false);streamsDone(handleId,jsep,media,callbacks,config.myStream);return}}if(media.update&&!config.streamExternal){if(media.removeAudio||media.replaceAudio){if(config.myStream&&config.myStream.getAudioTracks()&&config.myStream.getAudioTracks().length){var s=config.myStream.getAudioTracks()[0];Janus$3.log("Removing audio track:",s);config.myStream.removeTrack(s);try{s.stop()}catch(e){}}if(config.pc.getSenders()&&config.pc.getSenders().length){var ra=true;if(media.replaceAudio&&Janus$3.unifiedPlan){ra=false}if(ra){for(var index in config.pc.getSenders()){var s=config.pc.getSenders()[index];if(s&&s.track&&s.track.kind==="audio"){Janus$3.log("Removing audio sender:",s);config.pc.removeTrack(s)}}}}}if(media.removeVideo||media.replaceVideo){if(config.myStream&&config.myStream.getVideoTracks()&&config.myStream.getVideoTracks().length){var s=config.myStream.getVideoTracks()[0];Janus$3.log("Removing video track:",s);config.myStream.removeTrack(s);try{s.stop()}catch(e){}}if(config.pc.getSenders()&&config.pc.getSenders().length){var rv=true;if(media.replaceVideo&&Janus$3.unifiedPlan){rv=false}if(rv){for(var index in config.pc.getSenders()){var s=config.pc.getSenders()[index];if(s&&s.track&&s.track.kind==="video"){Janus$3.log("Removing video sender:",s);config.pc.removeTrack(s)}}}}}}if(callbacks.stream!==null&&callbacks.stream!==undefined){var stream=callbacks.stream;Janus$3.log("MediaStream provided by the application");Janus$3.debug(stream);if(media.update){if(config.myStream&&config.myStream!==callbacks.stream&&!config.streamExternal){try{var tracks=config.myStream.getTracks();for(var i in tracks){var mst=tracks[i];Janus$3.log(mst);if(mst!==null&&mst!==undefined)mst.stop()}}catch(e){}config.myStream=null}}config.streamExternal=true;pluginHandle.consentDialog(false);streamsDone(handleId,jsep,media,callbacks,stream);return}if(isAudioSendEnabled(media)||isVideoSendEnabled(media)){if(!Janus$3.isGetUserMediaAvailable()){callbacks.error("getUserMedia not available");return}var constraints={mandatory:{},optional:[]};pluginHandle.consentDialog(true);var audioSupport=isAudioSendEnabled(media);if(audioSupport===true&&media!=undefined&&media!=null){if(_typeof(media.audio)==="object"){audioSupport=media.audio}}var videoSupport=isVideoSendEnabled(media);if(videoSupport===true&&media!=undefined&&media!=null){var simulcast=callbacks.simulcast===true?true:false;var simulcast2=callbacks.simulcast2===true?true:false;if((simulcast||simulcast2)&&!jsep&&(media.video===undefined||media.video===false))media.video="hires";if(media.video&&media.video!="screen"&&media.video!="window"){if(_typeof(media.video)==="object"){videoSupport=media.video}else{var width=0;var height=0;if(media.video==="lowres"){height=240;width=320}else if(media.video==="lowres-16:9"){height=180;width=320}else if(media.video==="hires"||media.video==="hires-16:9"||media.video==="hdres"){height=720;width=1280}else if(media.video==="fhdres"){height=1080;width=1920}else if(media.video==="4kres"){height=2160;width=3840}else if(media.video==="stdres"){height=480;width=640}else if(media.video==="stdres-16:9"){height=360;width=640}else{Janus$3.log("Default video setting is stdres 4:3");height=480;width=640}Janus$3.log("Adding media constraint:",media.video);videoSupport={height:{ideal:height},width:{ideal:width}};Janus$3.log("Adding video constraint:",videoSupport)}}else if(media.video==="screen"||media.video==="window"){var callbackUserMedia=function callbackUserMedia(error,stream){pluginHandle.consentDialog(false);if(error){callbacks.error(error)}else{streamsDone(handleId,jsep,media,callbacks,stream)}};var getScreenMedia=function getScreenMedia(constraints,gsmCallback,useAudio){Janus$3.log("Adding media constraint (screen capture)");Janus$3.debug(constraints);navigator.mediaDevices.getUserMedia(constraints).then(function(stream){if(useAudio){navigator.mediaDevices.getUserMedia({audio:true,video:false}).then(function(audioStream){stream.addTrack(audioStream.getAudioTracks()[0]);gsmCallback(null,stream)})}else{gsmCallback(null,stream)}})["catch"](function(error){pluginHandle.consentDialog(false);gsmCallback(error)})};if(!media.screenshareFrameRate){media.screenshareFrameRate=3}if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia){navigator.mediaDevices.getDisplayMedia({video:true}).then(function(stream){pluginHandle.consentDialog(false);if(isAudioSendEnabled(media)&&!media.keepAudio){navigator.mediaDevices.getUserMedia({audio:true,video:false}).then(function(audioStream){stream.addTrack(audioStream.getAudioTracks()[0]);streamsDone(handleId,jsep,media,callbacks,stream)})}else{streamsDone(handleId,jsep,media,callbacks,stream)}},function(error){pluginHandle.consentDialog(false);callbacks.error(error)});return}if(Janus$3.webRTCAdapter.browserDetails.browser==="chrome"){var chromever=Janus$3.webRTCAdapter.browserDetails.version;var maxver=33;if(window.navigator.userAgent.match("Linux"))maxver=35;if(chromever>=26&&chromever<=maxver){constraints={video:{mandatory:{googLeakyBucket:true,maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:media.screenshareFrameRate,maxFrameRate:media.screenshareFrameRate,chromeMediaSource:"screen"}},audio:isAudioSendEnabled(media)&&!media.keepAudio};getScreenMedia(constraints,callbackUserMedia)}else{Janus$3.extension.getScreen(function(error,sourceId){if(error){pluginHandle.consentDialog(false);return callbacks.error(error)}constraints={audio:false,video:{mandatory:{chromeMediaSource:"desktop",maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:media.screenshareFrameRate,maxFrameRate:media.screenshareFrameRate},optional:[{googLeakyBucket:true},{googTemporalLayeredScreencast:true}]}};constraints.video.mandatory.chromeMediaSourceId=sourceId;getScreenMedia(constraints,callbackUserMedia,isAudioSendEnabled(media)&&!media.keepAudio)})}}else if(Janus$3.webRTCAdapter.browserDetails.browser==="firefox"){if(Janus$3.webRTCAdapter.browserDetails.version>=33){constraints={video:{mozMediaSource:media.video,mediaSource:media.video},audio:isAudioSendEnabled(media)&&!media.keepAudio};getScreenMedia(constraints,function(err,stream){callbackUserMedia(err,stream);if(!err){var lastTime=stream.currentTime;var polly=window.setInterval(function(){if(!stream)window.clearInterval(polly);if(stream.currentTime==lastTime){window.clearInterval(polly);if(stream.onended){stream.onended()}}lastTime=stream.currentTime},500)}})}else{var error=new Error("NavigatorUserMediaError");error.name="Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)";pluginHandle.consentDialog(false);callbacks.error(error);return}}return}}if(media===null||media===undefined||media.video!=="screen"){navigator.mediaDevices.enumerateDevices().then(function(devices){var audioExist=devices.some(function(device){return device.kind==="audioinput"}),videoExist=isScreenSendEnabled(media)||devices.some(function(device){return device.kind==="videoinput"});var audioSend=isAudioSendEnabled(media);var videoSend=isVideoSendEnabled(media);var needAudioDevice=isAudioSendRequired(media);var needVideoDevice=isVideoSendRequired(media);if(audioSend||videoSend||needAudioDevice||needVideoDevice){var haveAudioDevice=audioSend?audioExist:false;var haveVideoDevice=videoSend?videoExist:false;if(!haveAudioDevice&&!haveVideoDevice){pluginHandle.consentDialog(false);callbacks.error("No capture device found");return false}else if(!haveAudioDevice&&needAudioDevice){pluginHandle.consentDialog(false);callbacks.error("Audio capture is required, but no capture device found");return false}else if(!haveVideoDevice&&needVideoDevice){pluginHandle.consentDialog(false);callbacks.error("Video capture is required, but no capture device found");return false}}var gumConstraints={audio:audioExist&&!media.keepAudio?audioSupport:false,video:videoExist&&!media.keepVideo?videoSupport:false};Janus$3.debug("getUserMedia constraints",gumConstraints);if(!gumConstraints.audio&&!gumConstraints.video){pluginHandle.consentDialog(false);streamsDone(handleId,jsep,media,callbacks,stream)}else{navigator.mediaDevices.getUserMedia(gumConstraints).then(function(stream){pluginHandle.consentDialog(false);streamsDone(handleId,jsep,media,callbacks,stream)})["catch"](function(error){pluginHandle.consentDialog(false);callbacks.error({code:error.code,name:error.name,message:error.message})})}})["catch"](function(error){pluginHandle.consentDialog(false);callbacks.error("enumerateDevices error",error)})}}else{streamsDone(handleId,jsep,media,callbacks)}}function prepareWebrtcPeer(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:webrtcError;var jsep=callbacks.jsep;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;if(jsep!==undefined&&jsep!==null){if(config.pc===null){Janus$3.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep");callbacks.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");return}config.pc.setRemoteDescription(jsep).then(function(){Janus$3.log("Remote description accepted!");config.remoteSdp=jsep.sdp;if(config.candidates&&config.candidates.length>0){for(var i=0;i<config.candidates.length;i++){var candidate=config.candidates[i];Janus$3.debug("Adding remote candidate:",candidate);if(!candidate||candidate.completed===true){config.pc.addIceCandidate(Janus$3.endOfCandidates)}else{config.pc.addIceCandidate(candidate)}}config.candidates=[]}callbacks.success()},callbacks.error)}else{callbacks.error("Invalid JSEP")}}function createOffer(handleId,media,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$3.noop;callbacks.customizeSdp=typeof callbacks.customizeSdp=="function"?callbacks.customizeSdp:Janus$3.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;var simulcast=callbacks.simulcast===true?true:false;if(!simulcast){Janus$3.log("Creating offer (iceDone="+config.iceDone+")")}else{Janus$3.log("Creating offer (iceDone="+config.iceDone+", simulcast="+simulcast+")")}var mediaConstraints={};if(Janus$3.unifiedPlan){var audioTransceiver=null,videoTransceiver=null;var transceivers=config.pc.getTransceivers();if(transceivers&&transceivers.length>0){for(var i in transceivers){var t=transceivers[i];if(t.sender&&t.sender.track&&t.sender.track.kind==="audio"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="audio"){if(!audioTransceiver)audioTransceiver=t;continue}if(t.sender&&t.sender.track&&t.sender.track.kind==="video"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="video"){if(!videoTransceiver)videoTransceiver=t;continue}}}var audioSend=isAudioSendEnabled(media);var audioRecv=isAudioRecvEnabled(media);if(!audioSend&&!audioRecv){if(media.removeAudio&&audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("inactive")}else{audioTransceiver.direction="inactive"}Janus$3.log("Setting audio transceiver to inactive:",audioTransceiver)}}else{if(audioSend&&audioRecv){if(audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("sendrecv")}else{audioTransceiver.direction="sendrecv"}Janus$3.log("Setting audio transceiver to sendrecv:",audioTransceiver)}}else if(audioSend&&!audioRecv){if(audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("sendonly")}else{audioTransceiver.direction="sendonly"}Janus$3.log("Setting audio transceiver to sendonly:",audioTransceiver)}}else if(!audioSend&&audioRecv){if(audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("recvonly")}else{audioTransceiver.direction="recvonly"}Janus$3.log("Setting audio transceiver to recvonly:",audioTransceiver)}else{audioTransceiver=config.pc.addTransceiver("audio",{direction:"recvonly"});Janus$3.log("Adding recvonly audio transceiver:",audioTransceiver)}}}var videoSend=isVideoSendEnabled(media);var videoRecv=isVideoRecvEnabled(media);if(!videoSend&&!videoRecv){if(media.removeVideo&&videoTransceiver){if(videoTransceiver.setDirection){videoTransceiver.setDirection("inactive")}else{videoTransceiver.direction="inactive"}Janus$3.log("Setting video transceiver to inactive:",videoTransceiver)}}else{if(videoSend&&videoRecv){if(videoTransceiver){if(videoTransceiver.setDirection){videoTransceiver.setDirection("sendrecv")}else{videoTransceiver.direction="sendrecv"}Janus$3.log("Setting video transceiver to sendrecv:",videoTransceiver)}}else if(videoSend&&!videoRecv){if(videoTransceiver){if(videoTransceiver.setDirection){videoTransceiver.setDirection("sendonly")}else{videoTransceiver.direction="sendonly"}Janus$3.log("Setting video transceiver to sendonly:",videoTransceiver)}}else if(!videoSend&&videoRecv){if(videoTransceiver){if(videoTransceiver.setDirection){videoTransceiver.setDirection("recvonly")}else{videoTransceiver.direction="recvonly"}Janus$3.log("Setting video transceiver to recvonly:",videoTransceiver)}else{videoTransceiver=config.pc.addTransceiver("video",{direction:"recvonly"});Janus$3.log("Adding recvonly video transceiver:",videoTransceiver)}}}}else{mediaConstraints["offerToReceiveAudio"]=isAudioRecvEnabled(media);mediaConstraints["offerToReceiveVideo"]=isVideoRecvEnabled(media)}var iceRestart=callbacks.iceRestart===true?true:false;if(iceRestart){mediaConstraints["iceRestart"]=true}Janus$3.debug(mediaConstraints);var sendVideo=isVideoSendEnabled(media);if(sendVideo&&simulcast&&Janus$3.webRTCAdapter.browserDetails.browser==="firefox"){Janus$3.log("Enabling Simulcasting for Firefox (RID)");var sender=config.pc.getSenders().find(function(s){return s.track.kind=="video"});if(sender){var parameters=sender.getParameters();if(!parameters)parameters={};var maxBitrates=getMaxBitrates(callbacks.simulcastMaxBitrates);parameters.encodings=[{rid:"h",active:true,maxBitrate:maxBitrates.high},{rid:"m",active:true,maxBitrate:maxBitrates.medium,scaleResolutionDownBy:2},{rid:"l",active:true,maxBitrate:maxBitrates.low,scaleResolutionDownBy:4}];sender.setParameters(parameters)}}config.pc.createOffer(mediaConstraints).then(function(offer){Janus$3.debug(offer);var jsep={type:offer.type,sdp:offer.sdp};callbacks.customizeSdp(jsep);offer.sdp=jsep.sdp;Janus$3.log("Setting local description");if(sendVideo&&simulcast){if(Janus$3.webRTCAdapter.browserDetails.browser==="chrome"||Janus$3.webRTCAdapter.browserDetails.browser==="safari"){Janus$3.log("Enabling Simulcasting for Chrome (SDP munging)");offer.sdp=mungeSdpForSimulcasting(offer.sdp)}else if(Janus$3.webRTCAdapter.browserDetails.browser!=="firefox"){Janus$3.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")}}config.mySdp=offer.sdp;config.pc.setLocalDescription(offer)["catch"](callbacks.error);config.mediaConstraints=mediaConstraints;if(!config.iceDone&&!config.trickle){Janus$3.log("Waiting for all candidates...");return}Janus$3.log("Offer ready");Janus$3.debug(callbacks);callbacks.success(offer)},callbacks.error)}function createAnswer(handleId,media,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$3.noop;callbacks.customizeSdp=typeof callbacks.customizeSdp=="function"?callbacks.customizeSdp:Janus$3.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;var simulcast=callbacks.simulcast===true?true:false;if(!simulcast){Janus$3.log("Creating answer (iceDone="+config.iceDone+")")}else{Janus$3.log("Creating answer (iceDone="+config.iceDone+", simulcast="+simulcast+")")}var mediaConstraints=null;if(Janus$3.unifiedPlan){mediaConstraints={};var audioTransceiver=null,videoTransceiver=null;var transceivers=config.pc.getTransceivers();if(transceivers&&transceivers.length>0){for(var i in transceivers){var t=transceivers[i];if(t.sender&&t.sender.track&&t.sender.track.kind==="audio"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="audio"){if(!audioTransceiver)audioTransceiver=t;continue}if(t.sender&&t.sender.track&&t.sender.track.kind==="video"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="video"){if(!videoTransceiver)videoTransceiver=t;continue}}}var audioSend=isAudioSendEnabled(media);var audioRecv=isAudioRecvEnabled(media);if(!audioSend&&!audioRecv){if(media.removeAudio&&audioTransceiver){try{if(audioTransceiver.setDirection){audioTransceiver.setDirection("inactive")}else{audioTransceiver.direction="inactive"}Janus$3.log("Setting audio transceiver to inactive:",audioTransceiver)}catch(e){Janus$3.error(e)}}}else{if(audioSend&&audioRecv){if(audioTransceiver){try{if(audioTransceiver.setDirection){audioTransceiver.setDirection("sendrecv")}else{audioTransceiver.direction="sendrecv"}Janus$3.log("Setting audio transceiver to sendrecv:",audioTransceiver)}catch(e){Janus$3.error(e)}}}else if(audioSend&&!audioRecv){try{if(audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("sendonly")}else{audioTransceiver.direction="sendonly"}Janus$3.log("Setting audio transceiver to sendonly:",audioTransceiver)}}catch(e){Janus$3.error(e)}}else if(!audioSend&&audioRecv){if(audioTransceiver){try{if(audioTransceiver.setDirection){audioTransceiver.setDirection("recvonly")}else{audioTransceiver.direction="recvonly"}Janus$3.log("Setting audio transceiver to recvonly:",audioTransceiver)}catch(e){Janus$3.error(e)}}else{audioTransceiver=config.pc.addTransceiver("audio",{direction:"recvonly"});Janus$3.log("Adding recvonly audio transceiver:",audioTransceiver)}}}var videoSend=isVideoSendEnabled(media);var videoRecv=isVideoRecvEnabled(media);if(!videoSend&&!videoRecv){if(media.removeVideo&&videoTransceiver){try{if(videoTransceiver.setDirection){videoTransceiver.setDirection("inactive")}else{videoTransceiver.direction="inactive"}Janus$3.log("Setting video transceiver to inactive:",videoTransceiver)}catch(e){Janus$3.error(e)}}}else{if(videoSend&&videoRecv){if(videoTransceiver){try{if(videoTransceiver.setDirection){videoTransceiver.setDirection("sendrecv")}else{videoTransceiver.direction="sendrecv"}Janus$3.log("Setting video transceiver to sendrecv:",videoTransceiver)}catch(e){Janus$3.error(e)}}}else if(videoSend&&!videoRecv){if(videoTransceiver){try{if(videoTransceiver.setDirection){videoTransceiver.setDirection("sendonly")}else{videoTransceiver.direction="sendonly"}Janus$3.log("Setting video transceiver to sendonly:",videoTransceiver)}catch(e){Janus$3.error(e)}}}else if(!videoSend&&videoRecv){if(videoTransceiver){try{if(videoTransceiver.setDirection){videoTransceiver.setDirection("recvonly")}else{videoTransceiver.direction="recvonly"}Janus$3.log("Setting video transceiver to recvonly:",videoTransceiver)}catch(e){Janus$3.error(e)}}else{videoTransceiver=config.pc.addTransceiver("video",{direction:"recvonly"});Janus$3.log("Adding recvonly video transceiver:",videoTransceiver)}}}}else{if(Janus$3.webRTCAdapter.browserDetails.browser=="firefox"||Janus$3.webRTCAdapter.browserDetails.browser=="edge"){mediaConstraints={offerToReceiveAudio:isAudioRecvEnabled(media),offerToReceiveVideo:isVideoRecvEnabled(media)}}else{mediaConstraints={mandatory:{OfferToReceiveAudio:isAudioRecvEnabled(media),OfferToReceiveVideo:isVideoRecvEnabled(media)}}}}Janus$3.debug(mediaConstraints);var sendVideo=isVideoSendEnabled(media);if(sendVideo&&simulcast&&Janus$3.webRTCAdapter.browserDetails.browser==="firefox"){Janus$3.log("Enabling Simulcasting for Firefox (RID)");var sender=config.pc.getSenders()[1];Janus$3.log(sender);var parameters=sender.getParameters();Janus$3.log(parameters);var maxBitrates=getMaxBitrates(callbacks.simulcastMaxBitrates);sender.setParameters({encodings:[{rid:"high",active:true,priority:"high",maxBitrate:maxBitrates.high},{rid:"medium",active:true,priority:"medium",maxBitrate:maxBitrates.medium},{rid:"low",active:true,priority:"low",maxBitrate:maxBitrates.low}]})}config.pc.createAnswer(mediaConstraints).then(function(answer){Janus$3.debug(answer);var jsep={type:answer.type,sdp:answer.sdp};callbacks.customizeSdp(jsep);answer.sdp=jsep.sdp;Janus$3.log("Setting local description");if(sendVideo&&simulcast){if(Janus$3.webRTCAdapter.browserDetails.browser==="chrome"){Janus$3.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it")}else if(Janus$3.webRTCAdapter.browserDetails.browser!=="firefox"){Janus$3.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")}}config.mySdp=answer.sdp;config.pc.setLocalDescription(answer)["catch"](callbacks.error);config.mediaConstraints=mediaConstraints;if(!config.iceDone&&!config.trickle){Janus$3.log("Waiting for all candidates...");return}callbacks.success(answer)},callbacks.error)}function sendSDP(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$3.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$3.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle, not sending anything");return}var config=pluginHandle.webrtcStuff;Janus$3.log("Sending offer/answer SDP...");if(config.mySdp===null||config.mySdp===undefined){Janus$3.warn("Local SDP instance is invalid, not sending anything...");return}config.mySdp={type:config.pc.localDescription.type,sdp:config.pc.localDescription.sdp};if(config.trickle===false)config.mySdp["trickle"]=false;Janus$3.debug(callbacks);config.sdpSent=true;callbacks.success(config.mySdp)}function _getVolume(handleId,remote){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");return 0}var stream=remote?"remote":"local";var config=pluginHandle.webrtcStuff;if(!config.volume[stream])config.volume[stream]={value:0};if(config.pc.getStats&&Janus$3.webRTCAdapter.browserDetails.browser==="chrome"){if(remote&&(config.remoteStream===null||config.remoteStream===undefined)){Janus$3.warn("Remote stream unavailable");return 0}else if(!remote&&(config.myStream===null||config.myStream===undefined)){Janus$3.warn("Local stream unavailable");return 0}if(config.volume[stream].timer===null||config.volume[stream].timer===undefined){Janus$3.log("Starting "+stream+" volume monitor");config.volume[stream].timer=setInterval(function(){config.pc.getStats(function(stats){var results=stats.result();for(var i=0;i<results.length;i++){var res=results[i];if(res.type=="ssrc"){if(remote&&res.stat("audioOutputLevel"))config.volume[stream].value=parseInt(res.stat("audioOutputLevel"));else if(!remote&&res.stat("audioInputLevel"))config.volume[stream].value=parseInt(res.stat("audioInputLevel"))}}})},200);return 0}return config.volume[stream].value}else{Janus$3.warn("Getting the "+stream+" volume unsupported by browser");return 0}}function isMuted(handleId,video){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");return true}var config=pluginHandle.webrtcStuff;if(config.pc===null||config.pc===undefined){Janus$3.warn("Invalid PeerConnection");return true}if(config.myStream===undefined||config.myStream===null){Janus$3.warn("Invalid local MediaStream");return true}if(video){if(config.myStream.getVideoTracks()===null||config.myStream.getVideoTracks()===undefined||config.myStream.getVideoTracks().length===0){Janus$3.warn("No video track");return true}return!config.myStream.getVideoTracks()[0].enabled}else{if(config.myStream.getAudioTracks()===null||config.myStream.getAudioTracks()===undefined||config.myStream.getAudioTracks().length===0){Janus$3.warn("No audio track");return true}return!config.myStream.getAudioTracks()[0].enabled}}function mute(handleId,video,mute){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");return false}var config=pluginHandle.webrtcStuff;if(config.pc===null||config.pc===undefined){Janus$3.warn("Invalid PeerConnection");return false}if(config.myStream===undefined||config.myStream===null){Janus$3.warn("Invalid local MediaStream");return false}if(video){if(config.myStream.getVideoTracks()===null||config.myStream.getVideoTracks()===undefined||config.myStream.getVideoTracks().length===0){Janus$3.warn("No video track");return false}config.myStream.getVideoTracks()[0].enabled=mute?false:true;return true}else{if(config.myStream.getAudioTracks()===null||config.myStream.getAudioTracks()===undefined||config.myStream.getAudioTracks().length===0){Janus$3.warn("No audio track");return false}config.myStream.getAudioTracks()[0].enabled=mute?false:true;return true}}function _getBitrate(handleId){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$3.warn("Invalid handle");return"Invalid handle"}var config=pluginHandle.webrtcStuff;if(config.pc===null||config.pc===undefined)return"Invalid PeerConnection";if(config.pc.getStats){if(config.bitrate.timer===null||config.bitrate.timer===undefined){Janus$3.log("Starting bitrate timer (via getStats)");config.bitrate.timer=setInterval(function(){config.pc.getStats().then(function(stats){stats.forEach(function(res){if(!res)return;var inStats=false;if((res.mediaType==="video"||res.id.toLowerCase().indexOf("video")>-1)&&res.type==="inbound-rtp"&&res.id.indexOf("rtcp")<0){inStats=true}else if(res.type=="ssrc"&&res.bytesReceived&&(res.googCodecName==="VP8"||res.googCodecName==="")){inStats=true}if(inStats){config.bitrate.bsnow=res.bytesReceived;config.bitrate.tsnow=res.timestamp;if(config.bitrate.bsbefore===null||config.bitrate.tsbefore===null){config.bitrate.bsbefore=config.bitrate.bsnow;config.bitrate.tsbefore=config.bitrate.tsnow}else{var timePassed=config.bitrate.tsnow-config.bitrate.tsbefore;if(Janus$3.webRTCAdapter.browserDetails.browser=="safari")timePassed=timePassed/1e3;var bitRate=Math.round((config.bitrate.bsnow-config.bitrate.bsbefore)*8/timePassed);if(Janus$3.webRTCAdapter.browserDetails.browser==="safari")bitRate=parseInt(bitRate/1e3);config.bitrate.value=bitRate+" kbits/sec";config.bitrate.bsbefore=config.bitrate.bsnow;config.bitrate.tsbefore=config.bitrate.tsnow}}})})},1e3);return"0 kbits/sec"}return config.bitrate.value}else{Janus$3.warn("Getting the video bitrate unsupported by browser");return"Feature unsupported by browser"}}function webrtcError(error){Janus$3.error("WebRTC error:",error)}function cleanupWebrtc(handleId,hangupRequest){Janus$3.log("Cleaning WebRTC stuff");var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined){return}var config=pluginHandle.webrtcStuff;if(config!==null&&config!==undefined){if(hangupRequest===true){var request={rtcgw:"hangup",transaction:Janus$3.randomString(12)};if(pluginHandle.token!==null&&pluginHandle.token!==undefined)request["token"]=pluginHandle.token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;Janus$3.debug("Sending hangup request (handle="+handleId+"):");Janus$3.debug(request);if(websockets){request["session_id"]=sessionId;request["handle_id"]=handleId;ws.send(JSON.stringify(request))}else{Janus$3.httpAPICall(server+"/"+sessionId+"/"+handleId,{verb:"POST",withCredentials:withCredentials,body:request})}}config.remoteStream=null;if(config.volume){if(config.volume["local"]&&config.volume["local"].timer)clearInterval(config.volume["local"].timer);if(config.volume["remote"]&&config.volume["remote"].timer)clearInterval(config.volume["remote"].timer)}config.volume={};if(config.bitrate.timer)clearInterval(config.bitrate.timer);config.bitrate.timer=null;config.bitrate.bsnow=null;config.bitrate.bsbefore=null;config.bitrate.tsnow=null;config.bitrate.tsbefore=null;config.bitrate.value=null;try{if(!config.streamExternal&&config.myStream!==null&&config.myStream!==undefined){Janus$3.log("Stopping local stream tracks");var tracks=config.myStream.getTracks();for(var i in tracks){var mst=tracks[i];Janus$3.log(mst);if(mst!==null&&mst!==undefined)mst.stop()}}}catch(e){}config.streamExternal=false;config.myStream=null;try{config.pc.close()}catch(e){}config.pc=null;config.candidates=null;config.mySdp=null;config.remoteSdp=null;config.iceDone=false;config.dataChannel={};config.dtmfSender=null}pluginHandle.oncleanup()}function mungeSdpForSimulcasting(sdp){var lines=sdp.split("\r\n");var video=false;var ssrc=[-1],ssrc_fid=[-1];var cname=null,msid=null,mslabel=null,label=null;var insertAt=-1;for(var i=0;i<lines.length;i++){var mline=lines[i].match(/m=(\w+) */);if(mline){var medium=mline[1];if(medium==="video"){if(ssrc[0]<0){video=true}else{insertAt=i;break}}else{if(ssrc[0]>-1){insertAt=i;break}}continue}if(!video)continue;var fid=lines[i].match(/a=ssrc-group:FID (\d+) (\d+)/);if(fid){ssrc[0]=fid[1];ssrc_fid[0]=fid[2];lines.splice(i,1);i--;continue}if(ssrc[0]){var match=lines[i].match("a=ssrc:"+ssrc[0]+" cname:(.+)");if(match){cname=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" msid:(.+)");if(match){msid=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" mslabel:(.+)");if(match){mslabel=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" label:(.+)");if(match){label=match[1]}if(lines[i].indexOf("a=ssrc:"+ssrc_fid[0])===0){lines.splice(i,1);i--;continue}if(lines[i].indexOf("a=ssrc:"+ssrc[0])===0){lines.splice(i,1);i--;continue}}if(lines[i].length==0){lines.splice(i,1);i--;continue}}if(ssrc[0]<0){insertAt=-1;video=false;for(var i=0;i<lines.length;i++){var mline=lines[i].match(/m=(\w+) */);if(mline){var medium=mline[1];if(medium==="video"){if(ssrc[0]<0){video=true}else{insertAt=i;break}}else{if(ssrc[0]>-1){insertAt=i;break}}continue}if(!video)continue;if(ssrc[0]<0){var value=lines[i].match(/a=ssrc:(\d+)/);if(value){ssrc[0]=value[1];lines.splice(i,1);i--;continue}}else{var match=lines[i].match("a=ssrc:"+ssrc[0]+" cname:(.+)");if(match){cname=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" msid:(.+)");if(match){msid=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" mslabel:(.+)");if(match){mslabel=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" label:(.+)");if(match){label=match[1]}if(lines[i].indexOf("a=ssrc:"+ssrc_fid[0])===0){lines.splice(i,1);i--;continue}if(lines[i].indexOf("a=ssrc:"+ssrc[0])===0){lines.splice(i,1);i--;continue}}if(lines[i].length==0){lines.splice(i,1);i--;continue}}}if(ssrc[0]<0){Janus$3.warn("Couldn't find the video SSRC, simulcasting NOT enabled");return sdp}if(insertAt<0){insertAt=lines.length}ssrc[1]=Math.floor(Math.random()*4294967295);ssrc[2]=Math.floor(Math.random()*4294967295);ssrc_fid[1]=Math.floor(Math.random()*4294967295);ssrc_fid[2]=Math.floor(Math.random()*4294967295);for(var i=0;i<ssrc.length;i++){if(cname){lines.splice(insertAt,0,"a=ssrc:"+ssrc[i]+" cname:"+cname);insertAt++}if(msid){lines.splice(insertAt,0,"a=ssrc:"+ssrc[i]+" msid:"+msid);insertAt++}if(mslabel){lines.splice(insertAt,0,"a=ssrc:"+ssrc[i]+" mslabel:"+mslabel);insertAt++}if(label){lines.splice(insertAt,0,"a=ssrc:"+ssrc[i]+" label:"+label);insertAt++}if(cname){lines.splice(insertAt,0,"a=ssrc:"+ssrc_fid[i]+" cname:"+cname);insertAt++}if(msid){lines.splice(insertAt,0,"a=ssrc:"+ssrc_fid[i]+" msid:"+msid);insertAt++}if(mslabel){lines.splice(insertAt,0,"a=ssrc:"+ssrc_fid[i]+" mslabel:"+mslabel);insertAt++}if(label){lines.splice(insertAt,0,"a=ssrc:"+ssrc_fid[i]+" label:"+label);insertAt++}}lines.splice(insertAt,0,"a=ssrc-group:FID "+ssrc[2]+" "+ssrc_fid[2]);lines.splice(insertAt,0,"a=ssrc-group:FID "+ssrc[1]+" "+ssrc_fid[1]);lines.splice(insertAt,0,"a=ssrc-group:FID "+ssrc[0]+" "+ssrc_fid[0]);lines.splice(insertAt,0,"a=ssrc-group:SIM "+ssrc[0]+" "+ssrc[1]+" "+ssrc[2]);sdp=lines.join("\r\n");if(!sdp.endsWith("\r\n"))sdp+="\r\n";return sdp}function isAudioSendEnabled(media){Janus$3.debug("isAudioSendEnabled:",media);if(media===undefined||media===null)return true;if(media.audio===false)return false;if(media.audioSend===undefined||media.audioSend===null)return true;return media.audioSend===true}function isAudioSendRequired(media){Janus$3.debug("isAudioSendRequired:",media);if(media===undefined||media===null)return false;if(media.audio===false||media.audioSend===false)return false;if(media.failIfNoAudio===undefined||media.failIfNoAudio===null)return false;return media.failIfNoAudio===true}function isAudioRecvEnabled(media){Janus$3.debug("isAudioRecvEnabled:",media);if(media===undefined||media===null)return true;if(media.audio===false)return false;if(media.audioRecv===undefined||media.audioRecv===null)return true;return media.audioRecv===true}function isVideoSendEnabled(media){Janus$3.debug("isVideoSendEnabled:",media);if(media===undefined||media===null)return true;if(media.video===false)return false;if(media.videoSend===undefined||media.videoSend===null)return true;return media.videoSend===true}function isVideoSendRequired(media){Janus$3.debug("isVideoSendRequired:",media);if(media===undefined||media===null)return false;if(media.video===false||media.videoSend===false)return false;if(media.failIfNoVideo===undefined||media.failIfNoVideo===null)return false;return media.failIfNoVideo===true}function isVideoRecvEnabled(media){Janus$3.debug("isVideoRecvEnabled:",media);if(media===undefined||media===null)return true;if(media.video===false)return false;if(media.videoRecv===undefined||media.videoRecv===null)return true;return media.videoRecv===true}function isScreenSendEnabled(media){Janus$3.debug("isScreenSendEnabled:",media);if(media===undefined||media===null)return false;if(_typeof(media.video)!=="object"||_typeof(media.video.mandatory)!=="object")return false;var constraints=media.video.mandatory;if(constraints.chromeMediaSource)return constraints.chromeMediaSource==="desktop"||constraints.chromeMediaSource==="screen";else if(constraints.mozMediaSource)return constraints.mozMediaSource==="window"||constraints.mozMediaSource==="screen";else if(constraints.mediaSource)return constraints.mediaSource==="window"||constraints.mediaSource==="screen";return false}function isDataEnabled(media){Janus$3.debug("isDataEnabled:",media);if(Janus$3.webRTCAdapter.browserDetails.browser=="edge"){Janus$3.warn("Edge doesn't support data channels yet");return false}if(media===undefined||media===null)return false;return media.data===true}function isTrickleEnabled(trickle){Janus$3.debug("isTrickleEnabled:",trickle);if(trickle===undefined||trickle===null)return true;return trickle===true}}window.Janus_Talk=Janus$3;var Janus$2=window.Janus_Talk;var janus=null;var tts=null;var opaqueId="tts-"+Janus_Talk.randomString(12);var spinner=null;Janus$2.init({debug:"all",callback:function callback(){window.stopTalk=function(){janus.destroy()};window.startTalk=function(){if(!Janus$2.isWebrtcSupported()){bootbox.alert("No WebRTC support... ");return}janus=new Janus$2({server:window.EZUIKit.opt.rtcUrl,success:function success(){janus.attach({plugin:"rtcgw.plugin.tts",opaqueId:opaqueId,success:function success(pluginHandle){tts=pluginHandle;Janus$2.log("Plugin attached! ("+tts.getPlugin()+", id="+tts.getId()+")");var url=window.EZUIKit.opt.talkLink;console.log("ttsUlr",url);var body={request:"start",url:url,codec:"opus",dir:"sendrecv",audio_debug:1};if(window.EZUIKit.opt.talkType==="gb28181"){body["devProto"]="gb28181"}Janus$2.debug("Trying a createOffer too (audio/video sendrecv)");tts.createOffer({media:{audio:true,video:false,data:false},simulcast:false,simulcast2:false,success:function success(jsep){Janus$2.debug("Got SDP!");Janus$2.debug(jsep);tts.send({message:body,jsep:jsep});if(typeof window.EZUIKit.handleTalkSuccess!=="undefined"){window.EZUIKit.handleTalkSuccess()}},error:function error(_error){Janus$2.error("WebRTC error:",_error);if(typeof window.EZUIKit.handleTalkError!=="undefined"){window.EZUIKit.handleTalkError(_error)}}})},error:function error(_error2){console.error("  -- Error attaching plugin...",_error2);bootbox.alert("Error attaching plugin... "+_error2);if(window.EZUIKit.handleTalkError!=="undefined"){window.EZUIKit.handleTalkError(_error2)}},consentDialog:function consentDialog(on){Janus$2.debug("Consent dialog should be "+(on?"on":"off")+" now")},iceState:function iceState(state){Janus$2.log("ICE state changed to "+state)},mediaState:function mediaState(medium,on){Janus$2.log("Janus "+(on?"started":"stopped")+" receiving our "+medium)},webrtcState:function webrtcState(on){Janus$2.log("Janus says our WebRTC PeerConnection is "+(on?"up":"down")+" now")},slowLink:function slowLink(uplink,lost){Janus$2.warn("Janus reports problems "+(uplink?"sending":"receiving")+" packets on this PeerConnection ("+lost+" lost packets)")},onmessage:function onmessage(msg,jsep){Janus$2.debug(" ::: Got a message :::");Janus$2.debug(msg);if(jsep!==undefined&&jsep!==null){Janus$2.debug("Handling SDP as well...");Janus$2.debug(jsep);tts.handleRemoteJsep({jsep:jsep})}var result=msg["result"];if(result!==null&&result!==undefined){if(result==="done"){bootbox.alert("The TTS Test is over");if(spinner!==null&&spinner!==undefined)spinner.stop();spinner=null;return}if(result==="msg"){if(typeof window.EZUIKit.handleTalkMessage!=="undefined"){window.EZUIKit.handleTalkMessage(msg)}}var status=result["status"];if(status==="slow_link"){toastr.warning("Janus apparently missed many packets we sent, maybe we should reduce the bitrate","Packet loss?",{timeOut:2e3})}}},onlocalstream:function onlocalstream(stream){Janus$2.debug(" ::: Got a local stream :::");Janus$2.debug(stream);Janus$2.attachMediaStream(document.getElementById("myaudio"),stream);if(tts.webrtcStuff.pc.iceConnectionState!=="completed"&&tts.webrtcStuff.pc.iceConnectionState!=="connected"){if(spinner==null){document.getElementById("audioright")}else{spinner.spin()}}var audioTracks=stream.getAudioTracks();if(audioTracks===null||audioTracks===undefined||audioTracks.length===0);},onremotestream:function onremotestream(stream){Janus$2.debug(" ::: Got a remote stream :::");Janus$2.debug(stream);Janus$2.attachMediaStream(document.getElementById("peeraudio"),stream);var audioTracks=stream.getAudioTracks();if(audioTracks===null||audioTracks===undefined||audioTracks.length===0);else{document.getElementById("peeraudio").play()}},ondataopen:function ondataopen(data){Janus$2.log("The DataChannel is available!")},ondata:function ondata(data){Janus$2.debug("We got data from the DataChannel! "+data)},oncleanup:function oncleanup(){Janus$2.log(" ::: Got a cleanup notification :::");if(spinner!==null&&spinner!==undefined)spinner.stop();spinner=null}})},error:function error(_error3){Janus$2.error(_error3);if(window.EZUIKit.handleTalkError!=="undefined"){window.EZUIKit.handleTalkError(_error3)}},destroyed:function destroyed(){}})}}});window.janus=janus;window.tts=tts;var Talk=function(){function Talk(jSPlugin){var _this=this;_classCallCheck$1(this,Talk);this.jSPlugin=jSPlugin;this.codeHandler=new UikitCode;this.pluginStatus=new Status(this,this.jSPlugin.params.id);var audioLeft=document.createElement("div");audioLeft.id="audioleft";var audioRight=document.createElement("div");audioRight.id="audioright";audioRight.style="display:none;";var audioLeftDOM=document.createElement("audio");audioLeftDOM.id="myaudio";audioLeftDOM.muted=true;audioLeftDOM.setAttribute("autoplay",true);audioLeftDOM.setAttribute("controls",true);audioLeft.appendChild(audioLeftDOM);audioLeft.style="display:none;";var audioRightDOM=document.createElement("audio");audioRightDOM.id="peeraudio";audioRightDOM.setAttribute("autoplay",true);audioRightDOM.setAttribute("controls",true);audioRight.appendChild(audioRightDOM);window.EZUIKit["handleTalkError"]=function(err){console.log("talk err",err);if(typeof _this.jSPlugin.handleTalkError!=="undefined"){_this.jSPlugin.handleTalkError(err)}};window.EZUIKit["handleTalkSuccess"]=function(data){console.log("talk success",data);if(typeof _this.jSPlugin.handleTalkSuccess!=="undefined"){_this.jSPlugin.handleTalkSuccess(data)}};window.EZUIKit.opt={rtcUrl:"",talkLink:"",ttsUrl:"",stream:"",deviceSerial:matchEzopenUrl(this.jSPlugin.url).deviceSerial,channelNo:matchEzopenUrl(this.jSPlugin.url).channelNo};document.body.appendChild(audioLeft);document.body.appendChild(audioRight)}_createClass$1(Talk,[{key:"toString",value:function toString(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"startTalk",value:function startTalk(callback){var _this2=this;if(this.jSPlugin.capacity&&this.jSPlugin.capacity.support_talk&&!(this.jSPlugin.capacity&&(this.jSPlugin.capacity.support_talk==="3"||this.jSPlugin.capacity.support_talk==="1"))){if(typeof this.jSPlugin.params.handleError==="function"){this.pluginStatus.loadingSetText({text:"设备不支持对讲",color:"red",delayClear:2e3});this.jSPlugin.params.handleError({msg:"设备不支持对讲",retcode:-1e3,id:this.jSPlugin.params.id,type:"handleError"})}console.log("设备不支持对讲");return false}var formData=new FormData;formData.append("accessToken",this.jSPlugin.accessToken);formData.append("deviceSerial",matchEzopenUrl(this.jSPlugin.url).deviceSerial);formData.append("channelNo",matchEzopenUrl(this.jSPlugin.url).channelNo);fetch(this.jSPlugin.env.domain+"/api/lapp/live/talk/url",{method:"POST",body:formData}).then(function(response){return response.json()}).then(function(data){if(data.code==200){var apiResult=data.data;if(apiResult){var rtcTrunk=apiResult.rtcUrl;if(rtcTrunk.indexOf("ws")===-1){rtcTrunk=rtcTrunk.replace("https","wss").replace("rtcgw","rtcgw-ws")}window.EZUIKit.opt.rtcUrl=rtcTrunk;window.EZUIKit.opt.ttsUrl="tts://"+apiResult.ttsUrl;window.EZUIKit.opt.deviceSerial=matchEzopenUrl(_this2.jSPlugin.url).deviceSerial;window.EZUIKit.opt.channelNo=matchEzopenUrl(_this2.jSPlugin.url).channelNo;var urlList=window.EZUIKit.opt.ttsUrl.split("?");if(urlList.length===2||window.EZUIKit.opt.deviceSerial.indexOf(":")!==-1){var talk="talk?dev="+window.EZUIKit.opt.deviceSerial+"&chann="+window.EZUIKit.opt.channelNo+"&encodetype=2";window.EZUIKit.opt.talkLink=window.EZUIKit.opt.ttsUrl.split("?")[0]+"/"+talk;if(apiResult.ttsUrl.indexOf("gb28181")>-1){window.EZUIKit.opt.talkType="gb28181"}}else{var talk="talk://"+window.EZUIKit.opt.deviceSerial+":0:"+window.EZUIKit.opt.channelNo+":cas.ys7.com:6500";window.EZUIKit.opt.talkLink=window.EZUIKit.opt.ttsUrl.split("?")[0]+"/"+talk}if(callback){callback(apiResult.ttsUrl.indexOf("gb28181")>-1)}window.EZUIKit.opt.stream=apiResult.stream;window.startTalk()}}else{console.log(data.code,_this2.codeHandler.matchInfo(data.code,"talk"));_this2.pluginStatus.loadingSetText({text:_this2.codeHandler.matchInfo(data.code,"talk").msg||data.msg,color:"red",delayClear:2e3});if(typeof _this2.jSPlugin.params.handleError==="function"){_this2.jSPlugin.params.handleError({msg:data.msg,retcode:data.code,id:_this2.jSPlugin.params.id,type:"handleError"})}}})["catch"](function(err){console.log("err",err)})}},{key:"stopTalk",value:function stopTalk(){window.stopTalk();if(document.getElementById("myaudio")&&document.getElementById("myaudio").srcObject){document.getElementById("myaudio").srcObject.getTracks()[0].stop()}}}]);return Talk}();var MobilePtz=function(){function MobilePtz(jSPlugin){var _this=this;_classCallCheck$1(this,MobilePtz);this.jSPlugin=jSPlugin;var oS=document.createElement("style");oS.innerHTML="\n    body{\n      padding: 0;\n      margin: 0;\n    }\n    #mobile-ez-ptz-container {\n      display: inline-block;\n      width: 375px;\n      text-align: center;\n    }\n    .live-ptz-title{\n      height: 25px;\n      font-size: 18px;\n      color: #2c2c2c;\n      text-align: center;\n      font-weight: 700;\n      margin: 24px 0 12px;\n    }\n    .live-ptz-intro {\n      margin-bottom: 24px;\n      color: #aaaaaa;\n    }\n    .mobile-ez-ptz-wrap {\n      background-image: linear-gradient(180deg, #f6f8ff 0%, #ededed6b 50%)\n    }\n    #mobile-ez-ptz-container .mobile-ez-ptz-container {\n      position: relative;\n      width: 260px;\n      height: 260px;\n      background: rgba(255, 255, 255, 0.80);\n      border: 1px solid rgba(255, 255, 255, 0.80);\n      border-radius: 100%;\n      cursor: pointer;\n      overflow: hidden;\n      margin: auto;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top {\n      width: 0;\n      height: 0;\n      border-left: 6px solid transparent;\n      border-right: 6px solid transparent;\n      border-bottom: 6px solid #aaaaaa;\n      position: absolute;\n      display: inline-block;\n      left: calc(50% - 6px);\n      top: 10px;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top.active {\n      border-bottom-color: #1890FF;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom {\n      width: 0;\n      height: 0;\n      border-left: 6px solid transparent;\n      border-right: 6px solid transparent;\n      border-top: 6px solid #aaaaaa;\n      position: absolute;\n      display: inline-block;\n      left: calc(50% - 6px);\n      bottom: 10px;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom.active {\n      border-top-color: #1890FF;\n\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right {\n      width: 0;\n      height: 0;\n      border-top: 6px solid transparent;\n      border-bottom: 6px solid transparent;\n      border-left: 6px solid #aaaaaa;\n      position: absolute;\n      display: inline-block;\n      top: calc(50% - 6px);\n      right: 10px;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right.active {\n      border-left-color: #1890FF;\n\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left {\n      width: 0;\n      height: 0;\n      border-top: 6px solid transparent;\n      border-bottom: 6px solid transparent;\n      border-right: 6px solid #aaaaaa;\n      position: absolute;\n      display: inline-block;\n      top: calc(50% - 6px);\n      left: 10px;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left.active {\n      border-right-color: #1890FF;\n\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .ez-ptz-main.center {\n      width: 52px;\n      height: 52px;\n      background: #FFFFFF;\n      border: 2px solid #eee;\n      border-radius: 100%;\n      top: calc(50% - 26px);\n      left: calc(50% - 26px);\n      position: absolute;\n      /* box-shadow: 0px -39px 40px 6px #1890ff; */\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-wrap {\n      display: inline-block;\n      padding: 24px 24px;\n      border-radius: 100%;\n      overflow: hidden;\n    }\n\n    #mobile-ez-ptz-container .ez-ptz-close {\n      position: absolute;\n      color: #FFFFFF;\n      top: 0;\n      right: 0px;\n    }";document.getElementsByTagName("head")[0].appendChild(oS);var mobileContainer=document.createElement("div");mobileContainer.className="mobile-ez-ptz-container";mobileContainer.id="mobile-ez-ptz-container";mobileContainer.style="display:inline-block;width: ".concat(this.jSPlugin.width,"px;text-align:center;");var mobileContainerTitle=document.createElement("div");mobileContainerTitle.className="live-ptz-title";mobileContainerTitle.id="live-ptz-title";mobileContainerTitle.innerHTML="云台控制";if(!document.getElementById("live-ptz-title")){mobileContainer.appendChild(mobileContainerTitle)}var mobileContainerIntro=document.createElement("div");mobileContainerIntro.className="live-ptz-intro";mobileContainerIntro.id="live-ptz-intro";mobileContainerIntro.innerHTML="请通过操控云台来调整摄像机视角";if(!document.getElementById("live-ptz-intro")){mobileContainer.appendChild(mobileContainerIntro)}var ptzWrap=document.createElement("div");ptzWrap.id="mobile-ez-ptz-item";ptzWrap.className="mobile-ez-ptz-wrap";ptzWrap.innerHTML='\n    <div class="mobile-ez-ptz-container" id="mobile-ez-ptz-container">\n      <div class="ez-ptz-main center"></div>\n      <div class="mobile-ez-ptz-icon top default"></div>\n      <div class="mobile-ez-ptz-icon left default"></div>\n      <div class="mobile-ez-ptz-icon bottom default"></div>\n      <div class="mobile-ez-ptz-icon right default"></div>\n    </div>\n      ';if(!document.getElementById("mobile-ez-ptz-item")){mobileContainer.appendChild(ptzWrap)}insertAfter(mobileContainer,document.getElementById("".concat(this.jSPlugin.id,"-wrap")));document.getElementById("mobile-ez-ptz-item").ontouchstart=function(e){e.preventDefault();console.log("触摸开始");_this._handlePtzTouch(e,"start")};document.getElementById("mobile-ez-ptz-item").ontouchend=function(e){e.preventDefault();console.log("触摸结束",e);_this._handlePtzTouch(e,"stop")};document.getElementById("mobile-ez-ptz-item").onmousedown=function(e){e.preventDefault();console.log("触摸开始");_this._handlePtzTouch(e,"start")};document.getElementById("mobile-ez-ptz-item").onmouseup=function(e){e.preventDefault();console.log("触摸结束",e);_this._handlePtzTouch(e,"stop")}}_createClass$1(MobilePtz,[{key:"show",value:function show(){document.getElementById("mobile-ez-ptz-item").style="display: inline-block"}},{key:"hide",value:function hide(){document.getElementById("mobile-ez-ptz-item").style="display: none"}},{key:"_handlePtzTouch",value:function _handlePtzTouch(e,type){var container=document.getElementById("mobile-ez-ptz-item").getBoundingClientRect();var containerCenterX=container.left+130;var containerCenterY=container.top+130;var eventX=e.x||e.changedTouches[0].clientX;var eventY=e.y||e.changedTouches[0].clientY;var left=eventX-containerCenterX;var top=eventY-containerCenterY;var direction=0;var url=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";if(Math.abs(left)>Math.abs(top)){if(left>0){direction=3;document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("default","active")}else{direction=2;document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("default","active")}}else{if(top>0){direction=1;document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("default","active")}else{direction=0;document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("default","active")}}document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(direction===0?180:direction===1?0:direction===2?90:270,"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)");if(type==="stop"){url=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop";document.getElementById("mobile-ez-ptz-item").style="";document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("active","default");document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("active","default");document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("active","default");document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("active","default")}var data=new FormData;data.append("deviceSerial",matchEzopenUrl(this.jSPlugin.url).deviceSerial);data.append("channelNo",matchEzopenUrl(this.jSPlugin.url).channelNo);data.append("speed",1);data.append("direction",direction);data.append("accessToken",this.jSPlugin.accessToken);fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(rt){if(rt.code==200);else{if(rt.code==60005||rt.code==60002||rt.code==60003||rt.code==60004){document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(direction===0?180:direction===1?0:direction===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)")}}})["catch"](function(err){console.log("云台调用异常",err)})}}]);return MobilePtz}();var retcode=0;var msg="成功";var data$b={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]},footer:{color:"#FFFFFF",backgroundColor:"rgb(0 0 0 / 0%)",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-0",iconId:"play",part:"left",defaultActive:1,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-1",iconId:"capturePicture",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-2",iconId:"sound",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-3",iconId:"pantile",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-4",iconId:"recordvideo",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-5",iconId:"talk",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-6",iconId:"hd",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-7",iconId:"webExpend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-8",iconId:"expend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]}};var emptyData={retcode:retcode,msg:msg,data:data$b};var data$a={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}};var mobileLiveFullData={data:data$a};var data$9={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}};var mobileRecFullData={data:data$9};var data$8={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}};var pcLiveFullData={data:data$8};var data$7={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}};var pcLiveSecurityData={data:data$7};var data$6={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:0},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:0},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:0}]}};var pcLiveSimpleData={data:data$6};var data$5={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}};var pcLiveVoiceData={data:data$5};var data$4={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}};var pcRecFullDataData={data:data$4};var data$3={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:0},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:0},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"speed",part:"right",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:0}]}};var miniRecData={data:data$3};var officeTemplateList=[{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcLive",themeIntro:"PC直播全量版",themeName:"PC直播全量版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:pcLiveFullData.data.header,footer:pcLiveFullData.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"security",themeIntro:"PC直播安防版",themeName:"PC直播安防版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:pcLiveSecurityData.data.header,footer:pcLiveSecurityData.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"voice",themeIntro:"PC直播语音版",themeName:"PC直播语音版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:pcLiveVoiceData.data.header,footer:pcLiveVoiceData.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"simple",themeIntro:"PC直播极简版",themeName:"PC直播极简版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"",header:pcLiveSimpleData.data.header,footer:pcLiveSimpleData.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcRec",themeIntro:"PC回放全量版",themeName:"PC回放全量版",themeType:"webRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:pcRecFullDataData.data.header,footer:pcRecFullDataData.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileLive",themeIntro:"Mobile直播全量版",themeName:"Mobile直播全量版",themeType:"mobileLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:mobileLiveFullData.data.header,footer:mobileLiveFullData.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileRec",themeIntro:"Mobile回放全量版",themeName:"Mobile回放全量版",themeType:"mobileRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:mobileRecFullData.data.header,footer:mobileRecFullData.data.footer},{autoFocus:0,createTime:"2021-06-14T08:04:37.000Z",themeId:"miniRec",themeIntro:"Mobile回放全量版",themeName:"Mobile回放全量版",themeType:"mobileRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"",header:miniRecData.data.header,footer:miniRecData.data.footer}];var Zoom=function(){function Zoom(jSPlugin){var _this=this;_classCallCheck$1(this,Zoom);this.jSPlugin=jSPlugin;this.enableZoom=false;this.videoWidth=1920;this.videoHeight=1080;this.currentScale=1;this.currentPosition={x:0,y:0,xPercent:.1,yPercent:.1,xCurrentVideo:0,yCurrentVideo:0,left:0,top:0,right:1920,bottom:1080};this.clientRect=document.getElementById(jSPlugin.id).getBoundingClientRect();this.DOM=document.getElementById(jSPlugin.id);this.isFullScreen=false;var scaleDOMContainer=document.createElement("div");scaleDOMContainer.id="".concat(jSPlugin.id,"-zoom-container");scaleDOMContainer.style="position: absolute;\n    display:none;\n    left: 12px;\n    bottom: ".concat(jSPlugin.isMobile?"48px":"80px",";\n    zoom: ").concat(jSPlugin.isMobile?"0.8":"1");var scaleDOMHTML='\n    <div\n    style="display: inline-flex;flex-direction: column;width: 38px;height: 160px;background:rgba(0,0,0,0.60);border-radius: 8px;align-items: center;">\n    <div id="'.concat(this.jSPlugin.id,'-scale-value" style="font-size: 12px;color:#FFFFFF;margin-top:10px;margin-bottom:4px;">2.0X</div>\n    <div style="width: 24px;" id="').concat(this.jSPlugin.id,'-addScale">\n      <?xml version="1.0" encoding="utf-8"?>\n      <svg version="1.1" fill="#FFFFFF" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n         viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">\n      <title>放大</title>\n      <g id="矩形">\n        <rect class="st0" width="20" height="20" fill="none"/>\n      </g>\n      <g id="形状结合">\n        <path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5\n          s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>\n      </g>\n      <g id="路径-4">\n        <path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>\n      </g>\n      <g id="路径-4备份">\n        <path class="st2" d="M10,13.2c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C10.6,12.9,10.3,13.2,10,13.2z"/>\n      </g>\n      </svg>\n    </div>\n    <div style="\n    position: relative;\n    width: 1px;\n    height: 64px;\n    border: 1px solid rgba(255,255,255,0.75);\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: flex-end;">\n    <div class="scale-body-line-dot" id="').concat(this.jSPlugin.id,'-scale-body-line-dot" style="width: 8px;\n      height: 8px;\n      background: #FFFFFF;\n      border-radius: 100%;\n      position: absolute;\n      border: 1.5px solid rgba(64,122,255,1);"></div>\n      <div id="').concat(this.jSPlugin.id,'-line-dot" style="width: 1px;\n      height: 0%;\n      background: #1890FF;\n      bottom: 0;"></div>\n    </div>\n    <div style="width: 24px;margin-top: 6px;" id="').concat(this.jSPlugin.id,'-subScale">\n      <?xml version="1.0" encoding="utf-8"?>\n      <svg fill="#FFFFFF" version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n        viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">\n        <title>缩小</title>\n        <g id="矩形">\n          <rect class="st0" width="20" height="20" fill="none"/>\n        </g>\n        <g id="形状结合">\n          <path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5\n            s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>\n        </g>\n        <g id="路径-4">\n          <path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>\n        </g>\n      </svg>\n    </div>\n  </div>\n    ');scaleDOMContainer.innerHTML=scaleDOMHTML;document.getElementById("".concat(jSPlugin.id,"-audioControls-left")).parentNode.appendChild(scaleDOMContainer);document.getElementById("".concat(jSPlugin.id,"-addScale")).onclick=function(){_this.addScale()};document.getElementById("".concat(jSPlugin.id,"-subScale")).onclick=function(){_this.subScale()}}_createClass$1(Zoom,[{key:"onMouseDown",value:function onMouseDown(event){var enableZoom=this.enableZoom;if(!enableZoom){return false}this.moveX=event.clientX;this.moveY=event.clientY}},{key:"onMouseUp",value:function onMouseUp(event){var currentPosition=this.currentPosition,enableZoom=this.enableZoom;if(!enableZoom){return false}currentPosition.left=currentPosition.left-(event.clientX-this.moveX);currentPosition.top=currentPosition.top-(event.clientY-this.moveY);this.doScale()}},{key:"onTouchstart",value:function onTouchstart(event){var enableZoom=this.enableZoom;if(!enableZoom){return false}if(this.jSPlugin.use3DZoom||this.currentScale===1){return false}var verifyStatus=this.jSPlugin.beforeMobileZoomVerify();if(!verifyStatus){return false}if(!this.inited){var info=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=info.width;this.videoHeight=info.height;this.currentPosition.left=0;this.currentPosition.top=0;if(this.isFullScreen){this.currentPosition.right=info.height;this.currentPosition.bottom=info.width}else{this.currentPosition.right=info.width;this.currentPosition.bottom=info.height}this.inited=true}var touches=event.touches;var events=touches[0];if(events){var point={clientX:0,clientY:0};if(this.isFullScreen){point.clientX=events.clientY;point.clientY=this.videoHeight-events.clientX}else{point.clientX=events.clientX;point.clientY=events.clientY}this.point1=point}}},{key:"onTouchend",value:function onTouchend(event){var that=this;var currentPosition=this.currentPosition,enableZoom=this.enableZoom;if(!enableZoom){return false}var touches=event.changedTouches;var events=touches[0];if(this.isFullScreen){currentPosition.top=currentPosition.top-(events.clientY-this.point1.clientX);currentPosition.left=currentPosition.left-(this.videoHeight-events.clientX-this.point1.clientY)}else{currentPosition.left=currentPosition.left-(events.clientX-that.point1.clientX);currentPosition.top=currentPosition.top-(events.clientY-that.point1.clientY)}that.doScale()}},{key:"renderDot",value:function renderDot(){var currentScale=this.currentScale;if(document.getElementById("".concat(this.jSPlugin.id,"-scale-value"))){document.getElementById("".concat(this.jSPlugin.id,"-scale-value")).innerHTML="".concat(currentScale,".0X")}if(document.getElementById("".concat(this.jSPlugin.id,"-line-dot"))){document.getElementById("".concat(this.jSPlugin.id,"-line-dot")).style.height="".concat((currentScale-1)/7*100,"%")}if(document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot"))){document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot")).style.bottom="calc(".concat((currentScale-1)/7*100,"% - 6px)")}}},{key:"getTopMostElement",value:function getTopMostElement(elm1,elm2,elm3){var rect1=elm1?elm1.getBoundingClientRect():null;var rect2=elm2?elm2.getBoundingClientRect():null;var rect3=elm3?elm3.getBoundingClientRect():null;if(!rect1&&!rect2&&!rect3){return null}if(!rect1){return rect2.top<rect3.top?elm2:elm3}if(!rect2){return rect1.top<rect3.top?elm1:elm3}if(!rect3){return rect1.top<rect2.top?elm1:elm2}var tops=[rect1.top,rect2.top,rect3.top];var maxTop=Math.max.apply(Math,tops);if(rect1.top===maxTop){return elm1}else if(rect2.top===maxTop){return elm2}else{return elm3}}},{key:"handleFullscreen",value:function handleFullscreen(flag,width,height){this.isFullScreen=flag;this.clientRect={width:width,height:height}}},{key:"startZoom",value:function startZoom(){var _this2=this;var info=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=info.width||this.jSPlugin.width;this.videoHeight=info.height||this.jSPlugin.height;this.currentPosition.left=0;this.currentPosition.top=0;if(this.isFullScreen){this.currentPosition.right=info.height;this.currentPosition.bottom=info.width;this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(this.videoWidth,0,0,this.videoHeight,false)}else{this.currentPosition.right=info.width;this.currentPosition.bottom=info.height;this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight,false)}this.currentScale=1;if(document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"))){document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block"}try{this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight,false);this.jSPlugin.jSPlugin.bEZoom=true}catch(error){console.log(error)}this.renderDot();this.enableZoom=true;if(this.jSPlugin.isMobile){if(document.getElementById("".concat(this.jSPlugin.id,"canvas0"))){document.getElementById("".concat(this.jSPlugin.id,"canvas0")).addEventListener("touchstart",function(event){return _this2.onTouchstart(event)});document.getElementById("".concat(this.jSPlugin.id,"canvas0")).addEventListener("touchend",function(event){return _this2.onTouchend(event)})}if(document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0"))){document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("touchstart",function(event){return _this2.onTouchstart(event)});document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("touchend",function(event){return _this2.onTouchend(event)})}if(document.getElementById("".concat(this.jSPlugin.id,"-player"))){document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("touchstart",function(event){return _this2.onTouchstart(event)});document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("touchend",function(event){return _this2.onTouchend(event)})}}else{if(document.getElementById("".concat(this.jSPlugin.id,"canvas0"))){document.getElementById("".concat(this.jSPlugin.id,"canvas0")).addEventListener("mousedown",function(event){return _this2.onMouseDown(event)});document.getElementById("".concat(this.jSPlugin.id,"canvas0")).addEventListener("mouseup",function(event){return _this2.onMouseUp(event)})}if(document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0"))){document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mousedown",function(event){return _this2.onMouseDown(event)});document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mouseup",function(event){return _this2.onMouseUp(event)})}if(document.getElementById("".concat(this.jSPlugin.id,"-player"))){document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mousedown",function(event){return _this2.onMouseDown(event)});document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mouseup",function(event){return _this2.onMouseUp(event)})}}}},{key:"stopZoom",value:function stopZoom(){this.currentScale=1;try{this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight,false)}catch(error){console.log(error)}if(document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"))){document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none"}this.renderDot();this.enableZoom=false}},{key:"doScale",value:function doScale(){var currentPosition=this.currentPosition,currentScale=this.currentScale;if(this.isFullScreen){currentPosition.left=currentPosition.left+.5*(currentPosition.right-currentPosition.left)-.5*(this.videoWidth/(currentScale*2));if(currentPosition.left<0){currentPosition.left=0}else if(currentPosition.left>this.videoWidth-this.videoWidth/(currentScale*2)){currentPosition.left=this.videoWidth-this.videoWidth/(currentScale*2)}currentPosition.right=currentPosition.left+this.videoWidth/(currentScale*2);currentPosition.top=currentPosition.top+.5*(currentPosition.bottom-currentPosition.top)-.5*(this.videoHeight/(currentScale*2));if(currentPosition.top<0){currentPosition.top=0}else if(currentPosition.top>this.videoHeight-this.videoHeight/(currentScale*2)){currentPosition.top=this.videoHeight-this.videoHeight/(currentScale*2)}currentPosition.bottom=currentPosition.top+this.videoHeight/(currentScale*2)}else{currentPosition.left=currentPosition.left+currentPosition.xPercent*(currentPosition.right-currentPosition.left)-.5*(this.videoWidth/currentScale);if(currentPosition.left<0){currentPosition.left=0}else if(currentPosition.left>this.videoWidth-this.videoWidth/currentScale){currentPosition.left=this.videoWidth-this.videoWidth/currentScale}currentPosition.right=currentPosition.left+this.videoWidth/currentScale;currentPosition.top=currentPosition.top+currentPosition.yPercent*(currentPosition.bottom-currentPosition.top)-.5*(this.videoHeight/currentScale);if(currentPosition.top<0){currentPosition.top=0}else if(currentPosition.top>this.videoHeight-this.videoHeight/currentScale){currentPosition.top=this.videoHeight-this.videoHeight/currentScale}currentPosition.bottom=currentPosition.top+this.videoHeight/currentScale}currentPosition.left=parseInt(currentPosition.left,10);currentPosition.right=parseInt(currentPosition.right,10);currentPosition.top=parseInt(currentPosition.top,10);currentPosition.bottom=parseInt(currentPosition.bottom,10);try{if(this.isFullScreen){this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(currentPosition.top,currentPosition.bottom,currentPosition.left,currentPosition.right,currentScale!=1,true)}else{if(currentPosition.left<currentPosition.right&&currentPosition.top<currentPosition.bottom&&currentPosition.bottom<=this.videoHeight&&currentPosition.right<=this.videoWidth){this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(currentPosition.left,currentPosition.right,currentPosition.top,currentPosition.bottom,currentScale!=1)}}}catch(error){console.log(error)}this.renderDot()}},{key:"addScale",value:function addScale(){var currentScale=this.currentScale,currentPosition=this.currentPosition;if(currentScale>=8){console.log("达到最大倍率了");if(this.jSPlugin.Message){this.jSPlugin.Message["default"]("已经放大到最大倍数8.0X")}return false}this.currentScale++;currentPosition.xPercent=.5;currentPosition.yPercent=.5;this.doScale()}},{key:"subScale",value:function subScale(){var currentScale=this.currentScale,currentPosition=this.currentPosition;if(currentScale<=1){console.log("达到最小倍率了");return false}this.currentScale--;currentPosition.xPercent=.5;currentPosition.yPercent=.5;this.doScale()}}]);return Zoom}();var FetchData=function FetchData(url){var method=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"GET";var params=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var callback=arguments.length>3?arguments[3]:undefined;var errFun=arguments.length>4?arguments[4]:undefined;var headerOptions=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{};var headers={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"};var paramsStr="";headers=Object.assign(headers,headerOptions);var myHeaders=new Headers;Object.keys(headers).map(function(item){myHeaders.append(item,headers[item])});headers=myHeaders;Object.keys(Object.assign({},params)).forEach(function(item){var value=params[item];if(typeof params[item]==="string"){value=params[item].replace("%","%25")}if(typeof params[item]==="undefined"){return}paramsStr+="&".concat(item,"=").concat(encodeURIComponent(value))});if(paramsStr.length>0){paramsStr=["GET","PUT","DELETE"].indexOf(method.toUpperCase())!==-1?"?".concat(paramsStr.slice(1)):paramsStr.slice(1)}var fetchUrl=url+(["GET","PUT","DELETE"].indexOf(method.toUpperCase())!==-1?paramsStr:"");var requestObj={headers:headers,method:method};if(method==="POST"){requestObj.body=paramsStr}if(method==="POST"&&headerOptions&&headerOptions["Content-Type"]==="application/json"){requestObj.body=JSON.stringify(params)}if(method==="GET"){if(fetchUrl.indexOf("?")===-1){fetchUrl+="?_r=".concat(Math.random())}else{fetchUrl+="&_r=".concat(Math.random())}}fetch(fetchUrl,requestObj).then(function(response){var contentType=response.headers.get("content-type");if(contentType&&contentType.indexOf("application/json")!==-1){return response.json()}else{return response.text()}}).then(function(data){callback&&callback(data)})["catch"](function(err){errFun&&errFun(err)})};var hdIcon=function hdIcon(id,clsPrefix,color,playerWidth,MEDIAWIDTH,hd){return'\n<svg  id="'.concat(id,'-hdSelect-icon" class="theme-icon-item-icon ').concat(clsPrefix,"-btn\" data-type='hd' style=\"display: ").concat(["hd","0"].includes(hd.level)?"flex":"none",'"  fill="').concat(color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(playerWidth>MEDIAWIDTH?48:32,'" height="').concat(playerWidth>MEDIAWIDTH?48:32,'" viewBox="-6 -6 32 32">\n    <path d="M17.4,16.5H3.1c-0.8,0-1.4-0.6-1.4-1.4V5.4c0-0.9,0.7-1.6,1.6-1.6h14.1c0.8,0,1.4,0.6,1.4,1.4v9.8 C18.8,15.9,18.2,16.5,17.4,16.5z M3.3,5C3.1,5,2.9,5.2,2.9,5.4v9.7c0,0.2,0.1,0.3,0.3,0.3h14.3c0.2,0,0.3-0.1,0.3-0.3V5.3 c0-0.2-0.1-0.3-0.3-0.3H3.3z" />\n    <path d="M13.3,13.6h-1.6c-0.4,0-0.7-0.3-0.7-0.7V7.4c0-0.4,0.3-0.7,0.7-0.7h1.6c1.2,0,2.2,1,2.2,2.2v2.4 C15.6,12.6,14.6,13.6,13.3,13.6z M12.2,12.5h1.1c0.6,0,1.1-0.5,1.1-1.1V9c0-0.6-0.5-1.1-1.1-1.1h-1.1V12.5z" />\n    <path d="M5.5,13.6c-0.3,0-0.6-0.2-0.6-0.6V7.3C5,7,5.2,6.8,5.5,6.8S6.1,7,6.1,7.3v5.7C6.1,13.4,5.8,13.6,5.5,13.6z" />\n    <path d="M9.2,13.6c-0.3,0-0.6-0.2-0.6-0.6V7.3c0-0.3,0.2-0.6,0.6-0.6S9.8,7,9.8,7.3v5.7C9.8,13.4,9.5,13.6,9.2,13.6z" />\n    <rect x="5.6" y="9.6" width="3.6" height="1.1" />\n</svg>\n')};var sdIcon=function sdIcon(id,clsPrefix,color,playerWidth,MEDIAWIDTH,hd){return'\n<svg id="'.concat(id,'-sdSelect-icon" class="theme-icon-item-icon ').concat(clsPrefix,"-btn\" data-type='sd' style=\"display: ").concat(["sd","1"].includes(hd.level)?"flex":"none",'"  fill="').concat(color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(playerWidth>MEDIAWIDTH?48:32,'" height="').concat(playerWidth>MEDIAWIDTH?48:32,'" viewBox="-6 -8 40 44">\n    <path d="M24.1,23.8h-20c-1.1,0-1.9-0.9-1.9-1.9V8.4c0-1.2,1-2.2,2.1-2.2h19.7c1.1,0,1.9,0.9,1.9,1.9v13.8\n        C26,23,25.1,23.8,24.1,23.8z M4.3,7.7C4,7.7,3.7,8,3.7,8.4v13.5c0,0.2,0.2,0.4,0.4,0.4h20c0.2,0,0.4-0.2,0.4-0.4V8.2\n        c0-0.2-0.2-0.4-0.4-0.4H4.3z"/>\n    <path d="M18.4,19.8h-2.2c-0.5,0-0.9-0.4-0.9-0.9v-7.8c0-0.5,0.4-0.9,0.9-0.9h2.2c1.7,0,3.1,1.4,3.1,3.1v3.3\n    C21.5,18.4,20.1,19.8,18.4,19.8z M16.7,18.3h1.6c0.9,0,1.6-0.7,1.6-1.6v-3.3c0-0.9-0.7-1.6-1.6-1.6h-1.6V18.3z"/>\n    <path d="M10.5,19.8c1.2,0,2.1-0.3,2.7-0.9c0.6-0.6,0.9-1.3,0.9-2.1c0-0.8-0.3-1.4-0.9-1.8c-0.4-0.2-1.1-0.5-2.2-0.8\n        l0,0l-1-0.2c-0.4-0.1-0.8-0.2-1-0.4c-0.4-0.2-0.6-0.5-0.6-0.9c0-0.4,0.1-0.6,0.4-0.9s0.7-0.3,1.3-0.3c0.8,0,1.4,0.2,1.8,0.6\n        c0.2,0.3,0.3,0.6,0.4,0.9l0,0h1.4c0-0.6-0.2-1.1-0.5-1.6c-0.6-0.8-1.6-1.2-2.9-1.2c-1,0-1.8,0.3-2.4,0.8c-0.6,0.5-0.9,1.2-0.9,2\n        c0,0.7,0.3,1.3,1,1.7c0.4,0.2,0.9,0.4,1.7,0.6l0,0l1.2,0.3c0.6,0.2,1.1,0.3,1.3,0.4c0.3,0.2,0.5,0.5,0.5,0.9c0,0.5-0.2,0.9-0.6,1.1\n        s-0.9,0.4-1.5,0.4c-0.9,0-1.6-0.2-2-0.7c-0.2-0.3-0.3-0.6-0.4-1.1l0,0H6.8c0,0.9,0.3,1.6,0.9,2.2C8.2,19.5,9.2,19.8,10.5,19.8z"/>\n    <defs>\n    <filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="15.2" y="10.3" width="6.2" height="9.5">\n        <feColorMatrix  type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0"/>\n    </filter>\n    </defs>\n    <mask maskUnits="userSpaceOnUse" x="15.2" y="10.3" width="6.2" height="9.5" id="mask-2_2_">\n    <g class="st2">\n        <path id="path-1_2_" class="st3" d="M24.1,23.1h-20c-0.6,0-1.2-0.5-1.2-1.2V8.2C2.9,7.5,3.5,7,4.1,7h19.7c0.8,0,1.4,0.6,1.4,1.4\n        v13.5C25.2,22.6,24.7,23.1,24.1,23.1z"/>\n    </g>\n    </mask>\n    <defs>\n    <filter id="Adobe_OpacityMaskFilter_1_" filterUnits="userSpaceOnUse" x="6.8" y="10.3" width="7.3" height="9.5">\n        <feColorMatrix  type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0"/>\n    </filter>\n    </defs>\n    <mask maskUnits="userSpaceOnUse" x="6.8" y="10.3" width="7.3" height="9.5" id="mask-2_3_">\n    <g class="st5">\n        <path id="path-1_3_" class="st3" d="M24.1,23.1h-20c-0.6,0-1.2-0.5-1.2-1.2V8.2C2.9,7.5,3.5,7,4.1,7h19.7c0.8,0,1.4,0.6,1.4,1.4\n        v13.5C25.2,22.6,24.7,23.1,24.1,23.1z"/>\n    </g>\n    </mask>\n</svg>\n')};var VIDEO_LEVEL2=[{name:"高清",level:"0",streamType:1,icon:hdIcon},{name:"标清",level:"1",streamType:1,icon:sdIcon}];var VIDEO_LEVEL=[{name:"高清",level:"hd",streamType:1,icon:hdIcon},{name:"标清",level:"sd",streamType:2,icon:sdIcon}];var templateDetailApi=function templateDetailApi(jSPlugin,id,successCallback,errorCallback){var success=function success(result){console.log(result);if(result.meta){successCallback(result)}};var errorFun=function errorFun(err){console.log(err);errorCallback(err)};var url="".concat(jSPlugin.env.domain,"/api/service/media/template/getDetail?accessToken=").concat(jSPlugin.accessToken,"&id=").concat(id);fetch(url,{method:"GET"}).then(function(response){return response.json()}).then(function(data){console.log("get theme data",data);success(data)})["catch"](function(error){errorFun(error)})};var postDevicePtzMirror=function postDevicePtzMirror(domain,accessToken,deviceSerial,channelNo,command){return new Promise(function(resolve,reject){request("".concat(domain,"/api/lapp/device/ptz/mirror"),"POST",{accessToken:accessToken,deviceSerial:deviceSerial,channelNo:channelNo,command:command},"",resolve)})};var getDeviceSupportQuality=function getDeviceSupportQuality(domain,accessToken,deviceSerial,channelNo){var url="".concat(domain,"/api/service/device/capacity/video/quality?accessToken=").concat(accessToken,"&deviceSerial=").concat(deviceSerial,"&channelNo=").concat(channelNo);return fetch(url,{method:"GET"}).then(function(response){return response.json()}).then(function(res){if(res.meta&&res.meta.code===200){if(res.data&&res.data.length>0){var result=res.data.find(function(item){return item.streamTypeIn===2});if(result){return VIDEO_LEVEL}}}return VIDEO_LEVEL2})["catch"](function(){return VIDEO_LEVEL2})};var styleToString$3=function styleToString(obj){var styleString="";Object.keys(obj).map(function(item,index){styleString+="".concat(item,":").concat(obj[item]).concat(index<Object.keys(obj).length-1?";":"")});return styleString};var MEDIAWIDTH$1=500;var Theme=function(){function Theme(jSPlugin){var _this=this;_classCallCheck$1(this,Theme);this.jSPlugin=jSPlugin;this.isNeedRenderHeader=false;this.isNeedRenderFooter=false;this.autoFocus=0;this.autoFocusTimer=null;this.recordTimer=null;this.nextRate=1;this.showHD=false;this.themeInited=false;this.decoderState={state:{isEditing:false,play:false,pauseDate:null,sound:false,recordvideo:false,recordCount:"00:00",talk:false,zoom:false,pantile:false,hd:{},hdList:[],speed:false,expend:false,webExpend:false,cloudRec:matchEzopenUrl(jSPlugin.url).type==="cloud.rec",rec:matchEzopenUrl(jSPlugin.url).type==="rec",type:matchEzopenUrl(jSPlugin.url).type}};this.allowZoom=!this.jSPlugin.use3DZoom;this.zoomDisable=false;this.pluginStatus=new Status(this,this.jSPlugin.params.id);this.inited=false;this.isMobile=isMobile();if(typeof jSPlugin.isMobile!=="undefined"){this.isMobile=jSPlugin.isMobile}this.pauseTime=null;this.themeData=emptyData.data;this.deviceQ;if(this.jSPlugin.themeId){switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":case"miniRec":var ezuikitTemplateDetail=_.find(officeTemplateList,function(item){return item.themeId===_this.jSPlugin.themeId});if(ezuikitTemplateDetail){this.themeData=ezuikitTemplateDetail}this.initThemeData();break;case"themeData":this.themeData=this.jSPlugin.params.themeData;this.initThemeData();break;default:this.fetchThemeData(this.jSPlugin.themeId);break}}if(!this.jSPlugin.Talk){this.jSPlugin.Talk=new Talk(this.jSPlugin)}addCss("".concat(this.jSPlugin.staticPath,"/speed/speed.css"));addCss("".concat(this.jSPlugin.staticPath,"/css/theme.css"))}_createClass$1(Theme,[{key:"fetchThemeData",value:function fetchThemeData(themeId){var _this2=this;var successCallback=function successCallback(data){if(data.meta.code==0&&data.data){_this2.themeData=data.data;if(data.data.header){_this2.themeData.header=data.data.header;_this2.themeData.header.btnList=_this2.themeData.header.btnList.sort(function(a,b){return a.btnKey.split("-")[3]-b.btnKey.split("-")[3]})}if(data.data.footer){_this2.themeData.footer=data.data.footer;_this2.themeData.footer.btnList=_this2.themeData.footer.btnList.sort(function(a,b){return a.btnKey.split("-")[3]-b.btnKey.split("-")[3]})}_this2.initThemeData();_this2.renderThemeData()}};var errorCallback=function errorCallback(){_this2.renderThemeData()};templateDetailApi(this.jSPlugin,themeId,successCallback,errorCallback)}},{key:"changeTheme",value:function changeTheme(options){var _this3=this;if(typeof options==="string"){this.jSPlugin.themeId=options;switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":case"miniRec":var ezuikitTemplateDetail=_.find(officeTemplateList,function(item){return item.themeId===_this3.jSPlugin.themeId});if(ezuikitTemplateDetail){this.themeData=ezuikitTemplateDetail}this.initThemeData();break;default:this.fetchThemeData(options);break}}else if(_typeof(options)==="object"){this.themeData=options;this.initThemeData();if(this.decoderState.state.isEditing){this.editStart()}}if(this.jSPlugin&&this.jSPlugin.handleThemeChange){this.jSPlugin.handleThemeChange(options)}}},{key:"renderThemeData",value:function renderThemeData(){var _this4=this;var _this$themeData=this.themeData,header=_this$themeData.header,footer=_this$themeData.footer;if(this.isNeedRenderHeader&&header){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=header.backgroundColor.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=header.color.replace("-diy","");header.btnList.map(function(item,index){if(item.isrender){_this4.setDecoderState(_defineProperty({},item.iconId,_this4.decoderState.state[item.iconId]))}})}if(this.isNeedRenderFooter&&footer){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=footer.backgroundColor.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=footer.color.replace("-diy","");footer.btnList.map(function(item,index){if(item.isrender){_this4.setDecoderState(_defineProperty({},item.iconId,_this4.decoderState.state[item.iconId]))}if(item.iconId==="play"&&item.defaultActive&&!_this4.themeInited){var checkTimer=setInterval(function(){if(window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);_this4.jSPlugin.play();_this4.themeInited=true}},50)}});if(this.themeData.autoFocus>0){this.autoFocus=parseInt(this.themeData.autoFocus);this.startAutoFocus();document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",function(){if(document.getElementById("".concat(_this4.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(_this4.jSPlugin.id,"-audioControls")).style.opacity=1;document.getElementById("".concat(_this4.jSPlugin.id,"-audioControls")).style.pointerEvents="all"}_this4.startAutoFocus()})}this.setDecoderState({cloudRec:matchEzopenUrl(this.jSPlugin.url).type==="cloud.rec",rec:matchEzopenUrl(this.jSPlugin.url).type==="rec",type:matchEzopenUrl(this.jSPlugin.url).type})}else{if(!this.themeInited){var _checkTimer=setInterval(function(){if(window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(_checkTimer);_this4.jSPlugin.play();_this4.themeInited=true}},50)}}var isNeedZoom=_.findIndex(this.themeData.footer.btnList,function(v){return v.iconId==="zoom"&&v.isrender>0})>=0;if(isNeedZoom){if(this.isMobile&&!this.jSPlugin.use3DZoom){this.jSPlugin.beforeMobileZoomVerify=function(){var play=_this4.decoderState.state.play;if(!play){return false}else{return true}}}this.jSPlugin.Zoom=new Zoom(this.jSPlugin)}var checkTimer=setInterval(function(){if(window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);_this4.jSPlugin.reSize(_this4.jSPlugin.params.width,_this4.jSPlugin.params.height)}},50)}},{key:"setDecoderState",value:function setDecoderState(options){var _this5=this;var _this$themeData2=this.themeData,header=_this$themeData2.header,footer=_this$themeData2.footer;Object.keys(options).map(function(item,index){var color="#FFFFFF";var activeColor="#FFFFFF";var _index=header.btnList.findIndex(function(i){return i.iconId===item});if(_index===-1){color=footer.color.replace("-diy","");activeColor=footer.activeColor.replace("-diy","")}else{color=header.color.replace("-diy","");activeColor=footer.activeColor.replace("-diy","")}switch(item){case"play":if(options[item]){if(document.getElementById("".concat(_this5.jSPlugin.id,"-play"))){document.getElementById("".concat(_this5.jSPlugin.id,"-play-content")).children[0].children[0].style="display:inline-block";document.getElementById("".concat(_this5.jSPlugin.id,"-play-content")).children[0].children[1].style="display:none";document.getElementById("".concat(_this5.jSPlugin.id,"-play")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-play-content")).childNodes[0].children[0].style.fill=options[item]?activeColor:color}}else{if(document.getElementById("".concat(_this5.jSPlugin.id,"-play"))){document.getElementById("".concat(_this5.jSPlugin.id,"-play-content")).children[0].children[1].style="display:inline-block";document.getElementById("".concat(_this5.jSPlugin.id,"-play-content")).children[0].children[0].style="display:none";document.getElementById("".concat(_this5.jSPlugin.id,"-play")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-play-content")).childNodes[0].children[1].style.fill=options[item]?activeColor:color}}break;case"sound":if(document.getElementById("".concat(_this5.jSPlugin.id,"-sound"))){if(options[item]){document.getElementById("".concat(_this5.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block";document.getElementById("".concat(_this5.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none";document.getElementById("".concat(_this5.jSPlugin.id,"-sound")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=options[item]?activeColor:color}else{document.getElementById("".concat(_this5.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block";document.getElementById("".concat(_this5.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none";document.getElementById("".concat(_this5.jSPlugin.id,"-sound")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-sound-content")).childNodes[0].children[0].style.fill=options[item]?activeColor:color}}break;case"recordvideo":if(document.getElementById("".concat(_this5.jSPlugin.id,"-recordvideo"))){document.getElementById("".concat(_this5.jSPlugin.id,"-recordvideo")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-recordvideo-content")).childNodes[0].style.fill=options[item]?activeColor:color;if(options[item]){_this5.countTime("add",0)}else{_this5.countTime("destroy",0)}}break;case"talk":if(document.getElementById("".concat(_this5.jSPlugin.id,"-talk"))){document.getElementById("".concat(_this5.jSPlugin.id,"-talk")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=options[item]?activeColor:color}break;case"zoom":if(document.getElementById("".concat(_this5.jSPlugin.id,"-zoom"))){document.getElementById("".concat(_this5.jSPlugin.id,"-zoom")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-zoom-content")).childNodes[1].style.fill=options[item]?activeColor:color}break;case"pantile":if(document.getElementById("".concat(_this5.jSPlugin.id,"-pantile"))){document.getElementById("".concat(_this5.jSPlugin.id,"-pantile")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-pantile-content")).childNodes[0].style.fill=options[item]?activeColor:color}break;case"webExpend":if(options[item]){if(document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:inline-block";document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:none"}if(document.getElementById("".concat(_this5.jSPlugin.id,"-expend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-expend")).className="disabled"}}else{if(document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:inline-block";document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:none"}if(document.getElementById("".concat(_this5.jSPlugin.id,"-expend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-expend")).className=""}}if(document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[0].style.fill=options[item]?activeColor:color;document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[1].style.fill=options[item]?activeColor:color}break;case"capturePicture":if(document.getElementById("".concat(_this5.jSPlugin.id,"-capturePicture"))){document.getElementById("".concat(_this5.jSPlugin.id,"-capturePicture")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-capturePicture-content")).childNodes[0].style.fill=options[item]?activeColor:color}break;case"expend":if(options[item]){if(document.getElementById("".concat(_this5.jSPlugin.id,"-expend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:inline-block";document.getElementById("".concat(_this5.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:none"}if(document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend")).className="disabled"}}else{if(document.getElementById("".concat(_this5.jSPlugin.id,"-expend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:inline-block";document.getElementById("".concat(_this5.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:none"}if(document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-webExpend")).className=""}}if(document.getElementById("".concat(_this5.jSPlugin.id,"-expend"))){document.getElementById("".concat(_this5.jSPlugin.id,"-expend")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[0].style.fill=options[item]?activeColor:color;document.getElementById("".concat(_this5.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[1].style.fill=options[item]?activeColor:color}break;case"hd":break;case"speed":if(document.getElementById("".concat(_this5.jSPlugin.id,"-speed"))){document.getElementById("".concat(_this5.jSPlugin.id,"-speed-content")).children[1].children[0].style.color=options[item]?activeColor:color;document.getElementById("".concat(_this5.jSPlugin.id,"-speed-content")).children[1].children[0].style.borderColor=options[item]?activeColor:color}if(document.getElementById("".concat(_this5.jSPlugin.id,"-select-mask"))){if(_this5.isMobile&&options[item]){document.getElementById("".concat(_this5.jSPlugin.id,"-select-mask")).style.display="block"}else{document.getElementById("".concat(_this5.jSPlugin.id,"-select-mask")).style.display="none"}}break;case"cloudRec":if(document.getElementById("".concat(_this5.jSPlugin.id,"-cloudRec"))){console.log("document.getElementById(`${this.jSPlugin.id}-cloudRec-content`)",document.getElementById("".concat(_this5.jSPlugin.id,"-cloudRec")));document.getElementById("".concat(_this5.jSPlugin.id,"-cloudRec")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=options[item]?activeColor:color}if(document.getElementById("".concat(_this5.jSPlugin.id,"-rec"))){document.getElementById("".concat(_this5.jSPlugin.id,"-rec")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=options[item]?color:activeColor}break;case"rec":if(document.getElementById("".concat(_this5.jSPlugin.id,"-cloudRec"))){document.getElementById("".concat(_this5.jSPlugin.id,"-cloudRec")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=options[item]?color:activeColor}if(document.getElementById("".concat(_this5.jSPlugin.id,"-rec"))){document.getElementById("".concat(_this5.jSPlugin.id,"-rec")).className=options[item]?"active":"";document.getElementById("".concat(_this5.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=options[item]?activeColor:color}break}_this5.decoderState.state=Object.assign(_this5.decoderState.state,options)})}},{key:"startAutoFocus",value:function startAutoFocus(){var _this6=this;var autoFocus=this.autoFocus;if(this.autoFocusTimer){clearTimeout(this.autoFocusTimer)}this.autoFocusTimer=setTimeout(function(){if(document.getElementById("".concat(_this6.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(_this6.jSPlugin.id,"-audioControls")).style.opacity=0;document.getElementById("".concat(_this6.jSPlugin.id,"-audioControls")).style.pointerEvents="none"}},autoFocus*1e3)}},{key:"stopAutoFocus",value:function stopAutoFocus(){if(document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.opacity=1;document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.pointerEvents="all"}if(this.autoFocusTimer){clearTimeout(this.autoFocusTimer)}}},{key:"hideFooter",value:function hideFooter(){if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.display="none"}}},{key:"showFooter",value:function showFooter(){if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.display="block"}}},{key:"toString",value:function toString(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"renderFooter",value:function renderFooter(id,part){var _this7=this;var objItem=this.matchBtn(id);var objDOM=document.createElement("div");objDOM.className="theme-icon-item";objDOM.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-content" title="').concat(objItem.title,'" style="height:').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'px;display: flex;align-items: center;position:relative;">')).concat(objItem.domString,"</div>")+"</span>";objDOM.onclick=function(e){if(_this7.decoderState.state.isEditing){return false}objItem.onclick(e)};if(objItem.onmouseenter){objDOM.onmouseenter=function(e){if(_this7.decoderState.state.isEditing){return false}objItem.onmouseenter(e)}}if(objItem.onmouseleave){objDOM.onmouseleave=function(e){if(_this7.decoderState.state.isEditing){return false}objItem.onmouseleave(e)}}var toLeft=document.createElement("span");toLeft.className="icon-move left";toLeft.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-left" title="左移" style="position: absolute;top: calc(50% - 10px);left: -4px;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>');toLeft.onclick=function(){_this7.editIcon(objItem.id,"left","footer")};objDOM.appendChild(toLeft);var toRight=document.createElement("span");toRight.className="icon-move right";toRight.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-right" class="ezuikit-theme-icon" title="右移" style="position: absolute;top: calc(50% - 10px);left: calc(100% - 8px);"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>');toRight.onclick=function(){_this7.editIcon(objItem.id,"right","footer")};objDOM.appendChild(toRight);var toClose=document.createElement("span");toClose.className="icon-move close";toClose.innerHTML='<span id="'.concat(objItem.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: -10px;right: -10px;">')+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15">'+'<circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" />'+'<rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" />'+'<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" />'+'<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" />'+"</svg>"+"</span>";toClose.onclick=function(){_this7.editIcon(objItem.id,"delete","footer")};objDOM.appendChild(toClose);if(part==="left"){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[0].appendChild(objDOM)}else{document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[1].appendChild(objDOM)}}},{key:"editIcon",value:function editIcon(id,type,area){console.log("编辑组件",id,type,area);var newThemeData=this.themeData;console.log("themeData",this.themeData);var btnList=this.themeData[area].btnList;var _index=_.findIndex(btnList,function(item){return item.iconId===id});var tmp=btnList[_index];switch(type){case"delete":if(id==="rec"){if(_.findIndex(btnList,function(item){return item.iconId==="cloudRec"&&item.isrender==1})===-1){if(this.jSPlugin.Message){this.jSPlugin.Message["default"]("必须选中一种存储介质")}return false}}else if(id==="cloudRec"){if(_.findIndex(btnList,function(item){return item.iconId==="rec"&&item.isrender==1})===-1){if(this.jSPlugin.Message){this.jSPlugin.Message["default"]("必须选中一种存储介质")}return false}}btnList[_index].isrender=0;break;case"right":var nextRightBtnIndex=-1;for(var i=_index+1;i<btnList.length;i++){if(btnList[i].part===btnList[_index].part&&btnList[i].isrender==1){nextRightBtnIndex=i;break}}if(nextRightBtnIndex!==-1){btnList[_index]=btnList[nextRightBtnIndex];btnList[nextRightBtnIndex]=tmp}break;case"left":var nextLeftBtnIndex=-1;for(var _i=_index-1;_i>=0;_i--){if(btnList[_i].part===btnList[_index].part&&btnList[_i].isrender==1){nextLeftBtnIndex=_i;break}}if(nextLeftBtnIndex!==-1){btnList[_index]=btnList[nextLeftBtnIndex];btnList[nextLeftBtnIndex]=tmp}break}newThemeData[area].btnList=btnList;this.changeTheme(newThemeData)}},{key:"renderHeader",value:function renderHeader(id,part){var _this8=this;var objItem=this.matchBtn(id);var objDOM=document.createElement("div");objDOM.className="theme-icon-item";objDOM.style="max-width:50%;";objDOM.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'" style="position:relative;";>')+'<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-content" title="').concat(objItem.title,'" style="display:inline-block;height:').concat(this.width>MEDIAWIDTH$1?48:32,'px;">')).concat(objItem.domString,"</span>")+'<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-remove" title="移除" style="position: absolute;top: -6px;left: 38px;display: none;">')+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15">'+'<circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" />'+'<rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" />'+'<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" />'+'<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" />'+"</svg>"+"</span>"+"</span>";objDOM.onclick=function(e){if(_this8.decoderState.state.isEditing){return false}objItem.onclick(e)};var toClose=document.createElement("span");toClose.className="icon-move close";toClose.innerHTML='<span id="'.concat(objItem.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: -6px;right: -6px;">')+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15">'+'<circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" />'+'<rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" />'+'<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" />'+'<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" />'+"</svg>"+"</span>";toClose.onclick=function(){_this8.editIcon(objItem.id,"delete","header")};objDOM.appendChild(toClose);if(part==="left"){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(objDOM)}else{document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[1].appendChild(objDOM)}}},{key:"countTime",value:function countTime(type){var start=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var that=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var recordDOM=document.createElement("div");recordDOM.id=this.jSPlugin.id+"time-area";recordDOM.className="time-area";recordDOM.innerHTML='<span class="dot"></span><span class="value">00:00</span>';if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(recordDOM)}}if(this.countTimer){clearInterval(this.countTimer)}if(type==="add"){var i=start;document.getElementById(that.jSPlugin.id+"time-area").style.display="flex";this.countTimer=setInterval(function(){++i;document.getElementById(that.jSPlugin.id+"time-area").children[1].innerHTML=formatSeconds(i)},1e3)}else if(type==="destroy"){if(this.countTimer){clearInterval(this.countTimer)}this.countTimer=undefined;if(document.getElementById(that.jSPlugin.id+"time-area")){document.getElementById(that.jSPlugin.id+"time-area").children[1].innerHTML="00:00";document.getElementById(that.jSPlugin.id+"time-area").style.display="none"}}function formatSeconds(value){var theTime=parseInt(value);var middle=0;var hour=0;var secondV="00";var minV="00";var hourV="00";if(theTime>59){middle=parseInt(theTime/60);theTime=parseInt(theTime%60);if(middle>59){hour=parseInt(middle/60);middle=parseInt(middle%60)}}secondV=parseInt(theTime)>9?parseInt(theTime):"0"+parseInt(theTime);minV=parseInt(middle)>9?parseInt(middle):"0"+parseInt(middle);hourV=parseInt(hour)>9?parseInt(hour):"0"+parseInt(hour);if(hour>0){return hourV+":"+minV+":"+secondV}else if(middle>0){return minV+":"+secondV}else{return"00:"+secondV}}}},{key:"setDisabled",value:function setDisabled(status){var sound=this.decoderState.state.sound;var DisabledStyle=status?"cursor: not-allowed; fill: gray; color: gray":"cursor: default";document.getElementById(sound?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon"))!=null&&document.getElementById(sound?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon")).setAttribute("style",status?"cursor: not-allowed;fill: gray":"cursor: default");document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon")).setAttribute("style",DisabledStyle);document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon")).setAttribute("style",DisabledStyle);document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",DisabledStyle);if(!this.allowZoom){document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon")).setAttribute("style",DisabledStyle)}document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon")).setAttribute("style",DisabledStyle);var qualityBtns=document.getElementsByClassName("".concat(this.jSPlugin.id,"-select-quality-btn"));if(qualityBtns.length){for(var i=0;i<qualityBtns.length;i++){if(status){qualityBtns[i].style.cursor="not-allowed";qualityBtns[i].style.fill="gray";qualityBtns[i].style.color="gray"}else{qualityBtns[i].style.cursor="default";qualityBtns[i].style.fill="";qualityBtns[i].style.color=""}}}document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).setAttribute("style",document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).getAttribute("style")+";"+(status?"cursor: not-allowed;color: gray;border-color: gray;":"cursor: default;color: #ffffff;border-color: #ffffff;"));this.zoomDisable=this.jSPlugin.use3DZoom&&status}},{key:"matchBtn",value:function matchBtn(btnId){var _this9=this;var _this$themeData3=this.themeData,header=_this$themeData3.header,footer=_this$themeData3.footer;var btnItem={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function onclick(){},onmoveleft:function onmoveleft(){},onmoveright:function onmoveright(){},onremove:function onremove(){}};var _index=header.btnList.findIndex(function(item){return item.iconId===btnId});if(_index===-1){btnItem.color=footer.color;btnItem.backgroundColor=footer.backgroundColor;btnItem.activeColor=footer.activeColor}else{btnItem.color=header.color;btnItem.backgroundColor=header.backgroundColor;btnItem.activeColor=header.activeColor}switch(btnId){case"play":btnItem.title="播放/结束播放";btnItem.id=btnId;btnItem.domString='<div style="height: 100%">'+'<svg id="'.concat(this.jSPlugin.id+"-play-icon",'" class="theme-icon-item-icon" style="display:none" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'"  fill="').concat(btnItem.color,'" viewBox="-6 -6 32 32">\n            <path id="Stroke-1" class="st1" d="M10.5,1.7c-4.9,0-8.8,4-8.8,8.8s4,8.8,8.8,8.8s8.8-4,8.8-8.8S15.4,1.7,10.5,1.7z M10.5,2.7\n              c4.3,0,7.8,3.5,7.8,7.8s-3.5,7.8-7.8,7.8s-7.8-3.5-7.8-7.8S6.2,2.7,10.5,2.7z"/>\n            <path class="st2" d="M8.7,8C9,8,9.3,8.3,9.3,8.6v3.8C9.3,12.7,9,13,8.7,13C8.3,13,8,12.7,8,12.4V8.6C8,8.3,8.3,8,8.7,8z"/>\n            <path id="Rectangle-Copy-10" class="st2" d="M12.8,8c0.3,0,0.6,0.3,0.6,0.6v3.8c0,0.3-0.3,0.6-0.6,0.6c-0.3,0-0.6-0.3-0.6-0.6V8.6\n              C12.2,8.3,12.5,8,12.8,8z"/>\n          </svg>')+'<svg id="'.concat(this.jSPlugin.id+"-stop-icon",'" class="theme-icon-item-icon" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M13,9.8L10.1,8C9.9,7.9,9.7,7.9,9.5,7.9c-0.6,0-1,0.4-1,1v3.7c0,0.2,0.1,0.4,0.2,0.5c0.3,0.5,0.9,0.6,1.4,0.3 l2.9-1.8c0.1-0.1,0.2-0.2,0.3-0.3C13.6,10.7,13.4,10.1,13,9.8z" />'+'<path d="M10.5,1.9c-4.9,0-8.8,4-8.8,8.8c0,4.9,4,8.8,8.8,8.8s8.8-4,8.8-8.8C19.4,5.8,15.4,1.9,10.5,1.9z M10.5,18.5 c-4.3,0-7.8-3.5-7.8-7.8s3.5-7.8,7.8-7.8c4.3,0,7.8,3.5,7.8,7.8S14.9,18.5,10.5,18.5z" />'+"</svg>"+"</div>";btnItem.onclick=function(){var _this9$decoderState$s=_this9.decoderState.state,play=_this9$decoderState$s.play,isEditing=_this9$decoderState$s.isEditing,rec=_this9$decoderState$s.rec,cloudRec=_this9$decoderState$s.cloudRec,recordvideo=_this9$decoderState$s.recordvideo,pantile=_this9$decoderState$s.pantile;if(isEditing){return false}if(_this9.jSPlugin.recTimer){clearInterval(_this9.jSPlugin.recTimer)}if(play){if(rec||cloudRec){if(_this9.Rec){_this9.Rec.unSyncTimeLine()}_this9.jSPlugin.pause().then(function(){_this9.setDecoderState({play:!play});_this9.setDisabled(play)})}else{_this9.jSPlugin.stop().then(function(){_this9.setDecoderState({play:!play});_this9.setDisabled(play)});_this9.jSPlugin.Zoom.stopZoom();_this9.jSPlugin.close3DZoom()}if(recordvideo){_this9.setDecoderState({recordvideo:false})}}else{if(rec||cloudRec){if(_this9.Rec){_this9.Rec.syncTimeLine()}_this9.jSPlugin.resume().then(function(){_this9.setDecoderState({play:!play});_this9.setDisabled(play)})}else{_this9.jSPlugin.play().then(function(){_this9.setDecoderState({play:!play});_this9.setDisabled(play)})}if(_this9.jSPlugin.use3DZoom){_this9.resetMobileZoomStatus()}}if(_this9.jSPlugin.use3DZoom){_this9.setDecoderState({zoom:false});_this9.allowZoom=false}else{_this9.allowZoom=rec||cloudRec}if(pantile&&_this9.Ptz){_this9.Ptz.hide();_this9.setDecoderState({pantile:false})}if(document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect"))){document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).style.display="none"}};break;case"sound":btnItem.title="声音";btnItem.id=btnId;btnItem.domString='<span style="height: 100%">'+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-nosound-icon" style="display:none" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-6 -6 32 32">\n            <path d="M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z"/>\n            <path d="M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n            <path d="M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z"/>\n            <path d="M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z"/>\n            </svg>')+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-sound-icon" style="display:inline-block" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" fill="').concat(btnItem.color,'" viewBox="-6 -6 32 32">\n              <path d="M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7\n                c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z"/>\n              <path d="M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3\n                c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z"/>\n              <path id="Stroke-5" class="st1" d="M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8\n                C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0\n                L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z"/>\n              <path  d="M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4\n                c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4\n                c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n            </svg>')+"</span>";btnItem.onclick=function(){var _this9$decoderState$s2=_this9.decoderState.state,play=_this9$decoderState$s2.play,sound=_this9$decoderState$s2.sound,talk=_this9$decoderState$s2.talk,pantile=_this9$decoderState$s2.pantile;if(play&&!talk){if(sound){_this9.jSPlugin.closeSound();_this9.setDecoderState({sound:false})}else{_this9.jSPlugin.openSound();_this9.setDecoderState({sound:true})}if(pantile&&_this9.Ptz){_this9.Ptz.hide();_this9.setDecoderState({pantile:false})}}};break;case"recordvideo":btnItem.title="录屏";btnItem.id=btnId;btnItem.domString='<svg id="'.concat(this.jSPlugin.id,'-recordvideo-icon" class="theme-icon-item-icon" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M11.6,5.3H4.7c-1.4,0-2.5,1.1-2.5,2.5v5.9c0,1.4,1.1,2.5,2.5,2.5h6.9c1.4,0,2.5-1.1,2.5-2.5V7.7 C14.1,6.4,13,5.3,11.6,5.3z M4.7,6.3h6.9c0.8,0,1.5,0.7,1.5,1.5v5.9c0,0.8-0.7,1.5-1.5,1.5H4.7c-0.8,0-1.5-0.7-1.5-1.5V7.7 C3.3,6.9,3.9,6.3,4.7,6.3z" />'+'<path d="M16.6,6.7c0.9-0.8,2.3-0.1,2.4,1l0,0.1v5.7c0,1.2-1.3,1.9-2.3,1.2l-0.1-0.1L13.3,12 c-0.2-0.2-0.2-0.5-0.1-0.7c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.7c0.3,0.2,0.7,0.1,0.8-0.3l0-0.1V7.8c0-0.4-0.4-0.6-0.7-0.4 l-0.1,0l-3.3,2.7c-0.2,0.2-0.5,0.1-0.7-0.1c-0.2-0.2-0.1-0.5,0-0.6l0.1-0.1L16.6,6.7z" />'+"</svg>";btnItem.onclick=function(){var _this9$decoderState$s3=_this9.decoderState.state,play=_this9$decoderState$s3.play,recordvideo=_this9$decoderState$s3.recordvideo;if(play){if(recordvideo){_this9.jSPlugin.stopSave();_this9.setDecoderState({recordvideo:false})}else{_this9.jSPlugin.startSave("".concat((new Date).getTime()));_this9.setDecoderState({recordvideo:true})}}};break;case"capturePicture":btnItem.title="截图";btnItem.id=btnId;btnItem.domString='<svg id="'.concat(this.jSPlugin.id,'-capturePicture-icon" class="theme-icon-item-icon" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.8,7.7c-2,0-3.7,1.6-3.7,3.7S8.7,15,10.8,15c2,0,3.7-1.6,3.7-3.7S12.8,7.7,10.8,7.7z M10.8,8.7c1.5,0,2.7,1.2,2.7,2.7S12.2,14,10.8,14c-1.5,0-2.7-1.2-2.7-2.7S9.3,8.7,10.8,8.7z" />'+'<path d="M8.6,3.7l-0.1,0C8,3.7,7.7,4,7.5,4.3l-1,1.7l-1.3,0C4,6.1,3.1,7,3.1,8.2v7.1 c0,1.2,0.9,2.1,2.1,2.1h11.1c1.2,0,2.1-0.9,2.1-2.1V8.2l0-0.1c-0.1-1.1-1-1.9-2.1-1.9l-1.3,0l-1.1-1.8c-0.2-0.4-0.7-0.6-1.1-0.6H8.6 z M8.6,4.7h4.2c0.1,0,0.2,0.1,0.3,0.1l1.2,2c0.1,0.2,0.3,0.2,0.4,0.2h1.6c0.6,0,1.1,0.5,1.1,1.1v7.1c0,0.6-0.5,1.1-1.1,1.1H5.1 c-0.6,0-1.1-0.5-1.1-1.1V8.2c0-0.6,0.5-1.1,1.1-1.1h1.6c0.2,0,0.3-0.1,0.4-0.2l1.2-2C8.4,4.7,8.5,4.7,8.6,4.7z" />'+"</svg>";btnItem.onclick=function(){var play=_this9.decoderState.state.play;if(play){_this9.jSPlugin.capturePicture("".concat((new Date).getTime()))}else{console.log("视频未播放,无法截图")}};break;case"talk":btnItem.title="对讲";btnItem.id=btnId;btnItem.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-talk-icon" class="theme-icon-item-icon" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6\tC13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" />'+'<path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" />'+'<path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" />'+'<path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" />'+"</svg>";btnItem.onclick=function(){var _this9$decoderState$s4=_this9.decoderState.state,talk=_this9$decoderState$s4.talk,sound=_this9$decoderState$s4.sound,play=_this9$decoderState$s4.play,pantile=_this9$decoderState$s4.pantile;if(play){if(talk){console.log("结束对讲");_this9.setDecoderState({talk:false});_this9.jSPlugin.Talk.stopTalk();var isReOpenSound=_.findIndex(_this9.themeData.footer.btnList,function(v){return v.iconId==="sound"&&v.isrender===1&&v.defaultActive===1})>-1;if(_this9.themeData&&isReOpenSound){_this9.jSPlugin.openSound();_this9.setDecoderState({sound:true})}}else{console.log("开始对讲");_this9.setDecoderState({talk:true});_this9.jSPlugin.Talk.startTalk(function(isGb){if(sound&&!isGb){_this9.jSPlugin.closeSound();_this9.setDecoderState({sound:false})}})}if(pantile&&_this9.Ptz){_this9.Ptz.hide();_this9.setDecoderState({pantile:false})}}};break;case"zoom":btnItem.title=this.jSPlugin.use3DZoom?"3D定位":"电子放大";btnItem.id=btnId;btnItem.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-zoom-icon" class="theme-icon-item-icon" fill="').concat(btnItem.color,'" version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n          width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="5 -6 5 32" style="enable-background:new 0 0 20 20.1;" xml:space="preserve">\n              <path class="st1" d="M8.8,2.6c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2s-6.2-2.8-6.2-6.2S5.3,2.6,8.8,2.6z M8.8,3.9\n                c-2.8,0-5,2.2-5,5s2.2,5,5,5s5-2.2,5-5S11.5,3.9,8.8,3.9z M12.7,12.7l3.9,3.9"/>\n              <path class="st2" d="M11.2,9.5h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S11.6,9.5,11.2,9.5z"/>\n              <path class="st2" d="M8.7,12c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C9.3,11.8,9.1,12,8.7,12z"/>\n              <path class="st2" d="M16.9,17.6c-0.1,0-0.3-0.1-0.4-0.2l-3.9-3.9c-0.2-0.2-0.2-0.6,0-0.8s0.6-0.2,0.8,0l3.9,3.9\n                c0.2,0.2,0.2,0.6,0,0.8C17.2,17.5,17,17.6,16.9,17.6z"/>\n          </svg>');btnItem.onclick=function(){var _this9$decoderState$s5=_this9.decoderState.state,zoom=_this9$decoderState$s5.zoom,play=_this9$decoderState$s5.play,rec=_this9$decoderState$s5.rec,cloudRec=_this9$decoderState$s5.cloudRec;_this9$decoderState$s5.pantile;if(_this9.jSPlugin.use3DZoom){if(!play){return false}if(zoom){_this9.jSPlugin.close3DZoom()}else{_this9.jSPlugin.enable3DZoom()}}else{if(_this9.zoomDisable||!rec&&!cloudRec&&!play){return false}if(zoom){console.log("结束电子放大");_this9.jSPlugin.Zoom.stopZoom()}else{console.log("开始电子放大");_this9.jSPlugin.Zoom.startZoom()}}_this9.setDecoderState({zoom:!zoom})};break;case"pantile":btnItem.title="云台控制";btnItem.id=btnId;btnItem.domString='<svg id="'.concat(this.jSPlugin.id,'-pantile-icon" class="theme-icon-item-icon" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.2,7.8c1.6,0,2.9,1.3,2.9,2.9s-1.3,2.9-2.9,2.9s-2.9-1.3-2.9-2.9S8.5,7.8,10.2,7.8z M10.2,8.8c-1.1,0-1.9,0.9-1.9,1.9s0.9,1.9,1.9,1.9s1.9-0.9,1.9-1.9S11.2,8.8,10.2,8.8z" />'+'<path d="M8.8,3.5c0.7-0.6,1.8-0.6,2.5-0.1l0.1,0.1l1.4,1.1c0.2,0.2,0.3,0.5,0.1,0.7 c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1,0l-1.4-1.1C10.5,3.9,10,3.9,9.6,4.2L9.4,4.3L8,5.4C7.8,5.5,7.5,5.5,7.3,5.3c-0.2-0.2-0.1-0.5,0-0.6 l0.1-0.1L8.8,3.5z" />'+'<path d="M2.5,12.3c-0.6-0.7-0.6-1.8-0.1-2.5l0.1-0.1l1.1-1.4c0.2-0.2,0.5-0.3,0.7-0.1 c0.2,0.2,0.2,0.4,0.1,0.6l0,0.1l-1.1,1.4C3,10.6,3,11.1,3.2,11.5l0.1,0.1L4.4,13c0.2,0.2,0.1,0.5-0.1,0.7c-0.2,0.2-0.5,0.1-0.6,0 l-0.1-0.1L2.5,12.3z" />'+'<path d="M17.7,12.3c0.6-0.7,0.6-1.8,0.1-2.5l-0.1-0.1l-1.1-1.4c-0.2-0.2-0.5-0.3-0.7-0.1 c-0.2,0.2-0.2,0.4-0.1,0.6l0,0.1l1.1,1.4c0.3,0.4,0.3,0.9,0.1,1.3l-0.1,0.1L15.8,13c-0.2,0.2-0.1,0.5,0.1,0.7c0.2,0.2,0.5,0.1,0.6,0 l0.1-0.1L17.7,12.3z" />'+'<path d="M8.8,18.2c0.7,0.6,1.8,0.6,2.5,0.1l0.1-0.1l1.4-1.1c0.2-0.2,0.3-0.5,0.1-0.7 c-0.2-0.2-0.4-0.2-0.6-0.1l-0.1,0l-1.4,1.1c-0.4,0.3-0.9,0.3-1.3,0.1l-0.1-0.1L8,16.3c-0.2-0.2-0.5-0.1-0.7,0.1 c-0.2,0.2-0.1,0.5,0,0.6l0.1,0.1L8.8,18.2z" />'+"</svg>";btnItem.onclick=function(){var _this9$decoderState$s6=_this9.decoderState.state,play=_this9$decoderState$s6.play,pantile=_this9$decoderState$s6.pantile,expend=_this9$decoderState$s6.expend;if(play){if(!pantile){console.log("显示云台");if(_this9.isMobile&&!expend){console.log("移动端,非全屏状态不展示云台");return false}_this9.Ptz.show();_this9.setDecoderState({pantile:true})}else{console.log("隐藏云台");_this9.Ptz.hide();_this9.setDecoderState({pantile:false})}}};break;case"expend":btnItem.title="全局全屏";btnItem.id=btnId;btnItem.domString='<span><svg id="'.concat(this.jSPlugin.id,'-expend-icon" class="theme-icon-item-icon" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,4.1,6.9,4.1H5.2 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.9,7.4,3.7,7.6,3.4,7.6z" />'+'<path d="M6.9,18.1H5.2c-1.2,0-2.2-1-2.2-2.2v-1.8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8c0,0.7,0.6,1.2,1.2,1.2 h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,18.1,6.9,18.1z" />'+'<path d="M15.7,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.9,17.1,16.9,18.1,15.7,18.1z" />'+'<path d="M17.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-0.7-0.6-1.3-1.2-1.3h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8 c1.2,0,2.2,1,2.2,2.3v1.8C17.9,7.4,17.7,7.6,17.4,7.6z" />'+"</svg>"+'<svg class="theme-icon-item-icon" style="display:none" width="'.concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" fill="').concat(btnItem.color,'" viewBox="-6 -6 32 32">\n            <path class="st1" d="M5.7,8.1H3.9c-0.3,0-0.6-0.2-0.6-0.6S3.6,7,3.9,7h1.9c0.7,0,1.3-0.6,1.3-1.3V3.8c0-0.3,0.2-0.6,0.6-0.6\n              s0.6,0.2,0.6,0.6v1.9C8.2,7,7.1,8.1,5.7,8.1z"/>\n            <path class="st1" d="M7.6,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-0.7-0.6-1.3-1.3-1.3H3.9c-0.3,0-0.6-0.2-0.6-0.6s0.2-0.6,0.6-0.6h1.9\n              c1.3,0,2.4,1.1,2.4,2.4v1.9C8.2,17.5,7.9,17.7,7.6,17.7z"/>\n            <path class="st1" d="M13.4,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.6,0.2,0.6,0.6S17.5,14,17.2,14\n              h-1.9c-0.7,0-1.3,0.6-1.3,1.3v1.9C14,17.5,13.8,17.7,13.4,17.7z"/>\n            <path class="st1" d="M17.2,8.1h-1.9c-1.3,0-2.4-1.1-2.4-2.4V3.8c0-0.3,0.2-0.6,0.6-0.6S14,3.5,14,3.8v1.9C14,6.4,14.6,7,15.3,7h1.9\n              c0.3,0,0.6,0.2,0.6,0.6S17.5,8.1,17.2,8.1z"/>\n          </svg>\n          </span>');btnItem.onclick=function(){var _this9$decoderState$s7=_this9.decoderState.state;_this9$decoderState$s7.webExpend;var expend=_this9$decoderState$s7.expend,zoom=_this9$decoderState$s7.zoom,pantile=_this9$decoderState$s7.pantile;if(!expend){console.log("执行全局全屏");if(_this9.isMobile){var heightIntercept=parseInt(getComputedStyle(document.getElementById("".concat(_this9.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(_this9.jSPlugin.id)).height,10);requestMobileFullScreen(document.getElementById("".concat(_this9.jSPlugin.id,"-wrap")));var width=document.documentElement.clientWidth;var height=document.documentElement.clientHeight;document.getElementById("".concat(_this9.jSPlugin.id)).style["backface-visibility"]="hidden";_this9.jSPlugin.jSPlugin.JS_Resize(height,width-heightIntercept,true);_this9.jSPlugin.fullScreenWidth=height;_this9.jSPlugin.fullScreenHeight=width-heightIntercept;var currentScale=_this9.jSPlugin.Zoom.currentScale;if(_this9.jSPlugin.Zoom&&_this9.jSPlugin.Zoom.handleFullscreen){_this9.jSPlugin.Zoom.handleFullscreen(!expend,height,width-heightIntercept)}_this9.jSPlugin.Zoom.stopZoom();if(zoom){setTimeout(function(){_this9.jSPlugin.Zoom.startZoom();_this9.jSPlugin.Zoom.currentScale=currentScale;_this9.jSPlugin.Zoom.doScale(currentScale)},200)}}else{var width=window.screen.width;var height=window.screen.height;var that=_this9;var promise=requestFullScreenPromise(document.getElementById("".concat(_this9.jSPlugin.id)));promise.then(function(data){_this9.jSPlugin.jSPlugin.JS_Resize(width,height);_this9.jSPlugin.fullScreenWidth=width;_this9.jSPlugin.fullScreenHeight=height})["catch"](function(err){console.log(err)});_this9.jSPlugin.close3DZoom();["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(item){window.addEventListener(item,function fullscreenchange(e){var isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(isFullScreen){that.jSPlugin.jSPlugin.JS_Resize(width,height);that.jSPlugin.fullScreenWidth=width;that.jSPlugin.fullScreenHeight=height}else{that.jSPlugin.jSPlugin.JS_Resize(that.jSPlugin.width,that.jSPlugin.height)}return isFullScreen})})}}else{if(_this9.isMobile){var heightIntercept=parseInt(getComputedStyle(document.getElementById("".concat(_this9.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(_this9.jSPlugin.id)).height,10);if(document.getElementById("".concat(_this9.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(_this9.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-32px"}if(document.getElementById("".concat(_this9.jSPlugin.id,"-headControl"))){document.getElementById("".concat(_this9.jSPlugin.id,"-headControl")).style.position="relative"}cancelMobileFullScreen(document.getElementById("".concat(_this9.jSPlugin.id,"-wrap")),_this9.jSPlugin.width,_this9.jSPlugin.height+heightIntercept);_this9.jSPlugin.jSPlugin.JS_Resize(_this9.jSPlugin.width,_this9.jSPlugin.height);if(pantile&&_this9.Ptz){_this9.Ptz.hide();_this9.setDecoderState({pantile:false})}_this9.jSPlugin.fullScreenWidth=_this9.jSPlugin.width;_this9.jSPlugin.fullScreenHeight=_this9.jSPlugin.height;var _currentScale=_this9.jSPlugin.Zoom.currentScale;if(_this9.jSPlugin.Zoom&&_this9.jSPlugin.Zoom.handleFullscreen){_this9.jSPlugin.Zoom.handleFullscreen(!expend,_this9.jSPlugin.width,_this9.jSPlugin.height)}_this9.jSPlugin.Zoom.stopZoom();if(zoom){setTimeout(function(){_this9.jSPlugin.Zoom.startZoom();_this9.jSPlugin.Zoom.currentScale=_currentScale;_this9.jSPlugin.Zoom.doScale(_currentScale)},200)}}else{console.log("取消全局全屏");var cancelPromise=cancelFullScreenPromise();cancelPromise.then(function(data){console.log("取消全屏",data,_this9.jSPlugin);_this9.jSPlugin.jSPlugin.JS_Resize(_this9.jSPlugin.width,_this9.jSPlugin.height)})}}_this9.setDecoderState({expend:!expend})};break;case"webExpend":btnItem.title="网页全屏";btnItem.id=btnId;btnItem.domString='<span><svg id="'.concat(this.jSPlugin.id,'-webExpend-icon" class="theme-icon-item-icon" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.1,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S6.8,4.1,6.6,4.1H4.8 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.6,7.4,3.3,7.6,3.1,7.6z" />'+'<path d="M15.3,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.6,17.1,16.6,18.1,15.3,18.1z" />'+'<circle class="st2" cx="10.2" cy="10.4" r="1.1"/>'+"</svg>"+'<svg class="theme-icon-item-icon" fill="'.concat(btnItem.color,'" style="display:none;" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-6 -6 32 32">\n          <path class="st1" d="M5.4,8.1H3.5C3.2,8.1,3,7.9,3,7.6s0.2-0.5,0.5-0.5h1.9c0.8,0,1.4-0.6,1.4-1.4V3.8c0-0.3,0.2-0.5,0.5-0.5\n            s0.5,0.2,0.5,0.5v1.9C7.7,7,6.7,8.1,5.4,8.1z"/>\n          <path class="st1" d="M13.1,17.7c-0.3,0-0.5-0.2-0.5-0.5v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5H15\n            c-0.8,0-1.4,0.6-1.4,1.4v1.9C13.6,17.4,13.4,17.7,13.1,17.7z"/>\n            <circle class="st2" cx="10.2" cy="10.4" r="1.1"/>\n          ')+"</svg></span>";btnItem.onclick=function(){var _this9$decoderState$s8=_this9.decoderState.state,webExpend=_this9$decoderState$s8.webExpend,expend=_this9$decoderState$s8.expend,zoom=_this9$decoderState$s8.zoom;if(expend){console.log("正在全局全屏");return false}if(_this9.jSPlugin.recTimer){clearInterval(_this9.jSPlugin.recTimer)}if(!webExpend){console.log("执行网页全屏");var footerDOMHeight=0;var headerDOMHeight=0;var width=window.screen.width;var height=window.screen.height;var that=_this9;var promise=requestFullScreenPromise(document.getElementById("".concat(_this9.jSPlugin.id,"-wrap")));promise.then(function(data){if(document.getElementById("".concat(_this9.jSPlugin.id,"-canvas-container"))){footerDOMHeight=parseInt(window.getComputedStyle(document.getElementById("".concat(_this9.jSPlugin.id,"-canvas-container"))).height,10)}if(document.getElementById("".concat(_this9.jSPlugin.id,"-headControl"))){headerDOMHeight=parseInt(window.getComputedStyle(document.getElementById("".concat(_this9.jSPlugin.id,"-headControl"))).height,10)}_this9.jSPlugin.jSPlugin.JS_Resize(width,height-footerDOMHeight-headerDOMHeight);["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(item){window.addEventListener(item,function fullscreenchange(e){var isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(isFullScreen){if(document.getElementById("".concat(that.jSPlugin.id,"-loading-item-0"))){document.getElementById("".concat(that.jSPlugin.id,"-loading-item-0")).style.height=window.screen.height-parseInt(window.getComputedStyle(document.getElementById("".concat(that.jSPlugin.id,"-headControl"))).height,10)+"px"}that.jSPlugin.jSPlugin.JS_Resize(width,height-footerDOMHeight-headerDOMHeight)}else{if(document.getElementById("".concat(that.jSPlugin.id,"-loading-item-0"))){document.getElementById("".concat(that.jSPlugin.id,"-loading-item-0")).style.height=that.jSPlugin.height+parseInt(window.getComputedStyle(document.getElementById("".concat(that.jSPlugin.id,"-headControl"))).height,10)+"px"}that.jSPlugin.jSPlugin.JS_Resize(that.jSPlugin.width,that.jSPlugin.height);if(expend){that.setDecoderState({expend:false});if(zoom&&that.jSPlugin.use3DZoom){that.jSPlugin.enable3DZoom()}}}if(document.getElementById("".concat(that.jSPlugin.id,"-canvas-container"))){footerDOMHeight=parseInt(window.getComputedStyle(document.getElementById("".concat(that.jSPlugin.id,"-canvas-container"))).height,10)}if(document.getElementById("".concat(that.jSPlugin.id,"-headControl"))){headerDOMHeight=parseInt(window.getComputedStyle(document.getElementById("".concat(that.jSPlugin.id,"-headControl"))).height,10)}return isFullScreen})})})["catch"](function(err){console.log(err)})}else{console.log("取消网页全屏");var cancelPromise=cancelFullScreenPromise();cancelPromise.then(function(data){_this9.jSPlugin.jSPlugin.JS_Resize(_this9.jSPlugin.width,_this9.jSPlugin.height)})}_this9.setDecoderState({webExpend:!webExpend})};break;case"hd":var clsPrefix="".concat(this.jSPlugin.id,"-select-quality");var clsItem="".concat(clsPrefix,"-item");btnItem.title="画面清晰度";btnItem.id=btnId;btnItem.domString='<ul id="'.concat(this.jSPlugin.id,'-hdSelect" class="hd speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;bottom: calc(constant(safe-area-inset-bottom) + ').concat(this.isMobile?"80px":"50px",") !important;bottom: calc(env(safe-area-inset-bottom) + ").concat(this.isMobile?"80px":"50px",') !important;">\n          \x3c!-- 由接口返回生成 --\x3e  \n        </ul><span id="').concat(this.jSPlugin.id,'-hdSelect-icon-warp">\n           \x3c!-- 由接口返回生成 --\x3e\n          </span>');btnItem.onclick=function(e){var _this9$decoderState$s9=_this9.decoderState.state,hd=_this9$decoderState$s9.hd,expend=_this9$decoderState$s9.expend,recordvideo=_this9$decoderState$s9.recordvideo,play=_this9$decoderState$s9.play,hdList=_this9$decoderState$s9.hdList,zoom=_this9$decoderState$s9.zoom,pantile=_this9$decoderState$s9.pantile;e.stopPropagation();if(play){var id=e.target.id;var type=e.target.getAttribute("data-type");if(id.indexOf(clsPrefix)===0){if(hd.type+""!==type){var targetType=hdList.find(function(item){return item.level+""===type});if(targetType&&(targetType.streamType!==hd.streamType||targetType.level+""!==hd.level+"")){_this9.jSPlugin.changeVideoLevel(targetType);_this9.setDecoderState({hd:targetType});if(zoom){_this9.jSPlugin.Zoom.stopZoom()}var hdIcon=document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect-icon"));var sdIcon=document.getElementById("".concat(_this9.jSPlugin.id,"-sdSelect-icon"));if(hdIcon)hdIcon.style.display=["hd","0"].includes(targetType.level)?"block":"none";if(sdIcon)sdIcon.style.display=["sd","1"].includes(targetType.level)?"block":"none"}}_this9.resetMobileZoomStatus();if(recordvideo){_this9.setDecoderState({recordvideo:false})}}_this9.showHD=!_this9.showHD;if(document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect"))){document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect")).style.display=document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect")).style.display==="none"?"block":"none";if(_this9.isMobile){document.getElementById("".concat(_this9.jSPlugin.id,"-select-hd-mask")).style.display=document.getElementById("".concat(_this9.jSPlugin.id,"-select-hd-mask")).style.display==="none"?"block":"none"}if(_this9.themeData.autoFocus>0){if(document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect")).style.display==="none"){_this9.startAutoFocus()}else{_this9.stopAutoFocus()}}}if(_this9.isMobile&&expend&&_this9.showHD){document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect")).className="hd speed-select mobile expend"}else{document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect")).className=_this9.isMobile?"hd speed-select mobile":"speed-select"}if(_this9.isMobile){if(expend){document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect")).style.bottom="env(safe-area-inset-bottom)";document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect")).style.bottom="constant(safe-area-inset-bottom)"}else{document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect")).style.bottom="calc(constant(safe-area-inset-bottom) + 80px)";document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect")).style.bottom="calc(env(safe-area-inset-bottom) + 80px)"}}if(pantile&&_this9.Ptz){_this9.Ptz.hide();_this9.setDecoderState({pantile:false})}}};getDeviceSupportQuality(this.jSPlugin.env.domain,this.jSPlugin.accessToken,this.jSPlugin.deviceSerial,this.jSPlugin.channelNo).then(function(data){var videoLevel=data;_this9.setDecoderState({hdList:videoLevel});var hd=_this9.jSPlugin.url.indexOf("hd.live")>-1?videoLevel[0]:videoLevel[1];_this9.setDecoderState({hd:hd});var hdSelectListEle=document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect"));var hdSelectWarpEle=document.getElementById("".concat(_this9.jSPlugin.id,"-hdSelect-icon-warp"));if(hdSelectListEle){hdSelectListEle.innerHTML="\n            ".concat(_toConsumableArray(videoLevel).reverse().map(function(item){if(item.name&&item.level!=undefined)return'<li class="selectOption default '.concat(clsItem,'" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;" name="option" data-type="').concat(item.level,'" id="').concat(clsPrefix,"_").concat(item.level,'">').concat(item.name,"</li>")}).join(""),'\n            <li class="selectOption cancel" style="').concat(_this9.isMobile?"":"display:none;",'" name="option" id="').concat(_this9.jSPlugin.id,'-select-speed">取消</li>\n          ')}if(hdSelectWarpEle){if(_typeof(_this9.decoderState.state.hd)==="object"&&typeof _this9.decoderState.state.hd.icon==="function"){hdSelectWarpEle.innerHTML="\n              ".concat(videoLevel.map(function(item){if(item.name&&typeof item.icon==="function"){return item.icon(_this9.jSPlugin.id,clsPrefix,btnItem.color,_this9.jSPlugin.width,MEDIAWIDTH$1,_this9.decoderState.state.hd)}}).join(""),'\n              <span class=\'speed-select-mask\' style="display:none" id="').concat(_this9.jSPlugin.id,'-select-hd-mask"></span>\n            ')}else if(_typeof(_this9.decoderState.state.hd)==="object"&&typeof _this9.decoderState.state.hd.name==="string"){$(hdSelectWarpEle).prepend('<div class="theme-icon-item-icon '.concat(clsPrefix,'-btn" data-type="').concat(_this9.decoderState.state.hd.level,'" style="width: ').concat(_this9.jSPlugin.width>MEDIAWIDTH$1?48:32,'px">').concat(_this9.decoderState.state.hd.name,"</div>"))}}});return btnItem;case"speed":btnItem.title="回放倍速";btnItem.id=btnId;btnItem.domString='<ul id="'.concat(this.jSPlugin.id,'-speedSelect" class="speed speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;bottom: calc(constant(safe-area-inset-bottom) + ').concat(this.isMobile?"80px":"50px",") !important;bottom: calc(env(safe-area-inset-bottom) + ").concat(this.isMobile?"80px":"50px",') !important;">')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed4">4倍</li>')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed2">2倍</li>')+'<li class="selectOption active" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed1">1倍(正常播放)</li>')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed05">0.5倍</li>')+'<li class="selectOption cancel" style="'.concat(this.isMobile?"":"display:none;",'" name="option" id="').concat(this.jSPlugin.id,'-select-speed">取消</li>')+"</ul>"+'<span>\n          <div style="font-size: 12px;\n          vertical-align: bottom;\n          display: inline-flex;\n          padding: 0px 7px;\n          width: 48px;\n          line-height: 24px;\n          justify-content: center;\n          border: 1px solid '.concat(btnItem.color,';\n          text-align: center;border-radius: 12.5px;"\n          id="').concat(this.jSPlugin.id,'-speed-text"\n          >').concat(this.nextRate===1?"倍速":"".concat(this.nextRate,"倍").replace("3","0.5"),"</div>\n                ")+'<span class=\'speed-select-mask\' style="display:none" id="'.concat(this.jSPlugin.id,'-select-mask"></span>')+"</span>";btnItem.onclick=function(e){var _this9$decoderState$s10=_this9.decoderState.state,speed=_this9$decoderState$s10.speed,expend=_this9$decoderState$s10.expend,play=_this9$decoderState$s10.play;e.stopPropagation();if(!play){return false}if(!speed&&_this9.isMobile){document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).className=expend?"speed speed-select mobile expend":"speed speed-select mobile"}if(_this9.isMobile){if(expend){document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).style.bottom="constant(safe-area-inset-bottom)";document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).style.bottom="env(safe-area-inset-bottom)"}else{document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).style.bottom="calc(constant(safe-area-inset-bottom) + 80px)";document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).style.bottom="calc(env(safe-area-inset-bottom) + 80px)"}}_this9.nextRate=1;if(e.target.id){switch(e.target.id){case"".concat(_this9.jSPlugin.id,"-select-speed1"):console.log("倍速1");_this9.nextRate=1;_this9.jSPlugin.jSPlugin.JS_Speed(_this9.nextRate);_this9.changeRecSpeed(1);_this9.jSPlugin.speed=1;_this9.setDecoderState({speed:!speed});break;case"".concat(_this9.jSPlugin.id,"-select-speed2"):console.log("倍速2");_this9.nextRate=2;_this9.jSPlugin.jSPlugin.JS_Speed(_this9.nextRate);_this9.changeRecSpeed(2);_this9.jSPlugin.speed=2;_this9.setDecoderState({speed:!speed});break;case"".concat(_this9.jSPlugin.id,"-select-speed4"):console.log("倍速4");_this9.nextRate=4;_this9.jSPlugin.jSPlugin.JS_Speed(_this9.nextRate);_this9.changeRecSpeed(4);_this9.jSPlugin.speed=4;_this9.setDecoderState({speed:!speed});break;case"".concat(_this9.jSPlugin.id,"-select-speed05"):console.log("倍速05");_this9.nextRate=3;_this9.jSPlugin.jSPlugin.JS_Speed(_this9.nextRate);_this9.changeRecSpeed(.5);_this9.jSPlugin.speed=.5;_this9.setDecoderState({speed:!speed});break;default:if(!_this9.isMobile){_this9.setDecoderState({speed:true})}else{_this9.setDecoderState({speed:!speed})}break}}if(_this9.isMobile&&e.target.id==="".concat(_this9.jSPlugin.id,"-speed-text")){document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).style.display="block"}else{if(document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect"))){document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).style.display=document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).style.display==="none"?"block":"none"}}_this9.setDecoderState({speed:!speed});if(_this9.themeData.autoFocus>0){if(document.getElementById("".concat(_this9.jSPlugin.id,"-speedSelect")).style.display==="none"){_this9.startAutoFocus()}else{_this9.stopAutoFocus()}}};break;case"deviceName":btnItem.title="设备名称";btnItem.id=btnId;btnItem.domString="<span>设备名称</span>";btnItem.onclick=function(){};break;case"deviceID":btnItem.title="设备序列号";btnItem.id=btnId;btnItem.domString="<span>设备序列号</span>";btnItem.onclick=function(){};break;case"cloudRec":btnItem.title="云存储回放";btnItem.id=btnId;btnItem.domString='\n        <span>\n          <svg class="theme-icon-item-icon" fill="'.concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg"  width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="-10 0 40 15">\n\t<path d="M9.5,13.1c-0.3,0-0.5-0.2-0.5-0.5V8.8c0-0.3,0.2-0.5,0.5-0.5S10,8.5,10,8.8v3.8C10,12.8,9.8,13.1,9.5,13.1z"/>\n\t<path d="M7.6,10.6c-0.1,0-0.3-0.1-0.4-0.2C7,10.2,7,9.9,7.3,9.7l1.9-1.7c0.2-0.2,0.5-0.2,0.7,0l1.8,1.7\n\t\tc0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.5,0.2-0.7,0L9.5,9.1l-1.6,1.4C7.8,10.6,7.7,10.6,7.6,10.6z"/>\n\t<path d="M13.2,15.7H5.6c-2.1-0.1-3.8-1.8-3.8-3.9c0-1.8,1.3-3.4,3-3.8c0.4-2.2,2.3-3.9,4.6-3.9c2.3,0,4.2,1.7,4.6,3.8\n\t\tc1.8,0.4,3.1,1.9,3.1,3.8C17.1,13.9,15.4,15.7,13.2,15.7z M5.6,14.7h7.6c1.6,0,2.9-1.3,2.9-2.9c0-1.5-1.1-2.7-2.6-2.9l-0.4,0l0-0.4\n\t\tc-0.2-1.9-1.7-3.3-3.6-3.3C7.5,5.1,6,6.6,5.8,8.5l0,0.4l-0.4,0c-1.4,0.2-2.5,1.4-2.5,2.9C2.8,13.3,4.1,14.6,5.6,14.7z"/>\n          </svg>\n        </span>\n        ');btnItem.onclick=function(){console.log("点击云回放");_this9.setDecoderState({type:"cloud.rec",cloudRec:true,rec:false});_this9.jSPlugin.changePlayUrl({type:"cloud.rec"},function(){var initDate=getQueryString("begin",_this9.jSPlugin.url)||(new Date).Format("yyyyMMdd");_this9.Rec.renderRec("".concat(initDate.slice(0,4),"-").concat(initDate.slice(4,6),"-").concat(initDate.slice(6,8)));var zoom=_this9.decoderState.state.zoom;if(zoom){_this9.setDecoderState({zoom:false});_this9.jSPlugin.Zoom.stopZoom();_this9.jSPlugin.close3DZoom()}},false)};break;case"rec":btnItem.title="本地存储";btnItem.id=btnId;btnItem.domString='\n        <span>\n        <svg class="theme-icon-item-icon" fill='.concat(btnItem.color,' version="1.1" xmlns="http://www.w3.org/2000/svg"  width="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,'" viewBox="0 0 40 15">\n          <path d="M13,16.3H5.5c-1.1,0-2-0.9-2-2V3.8c0-1.1,0.9-2,2-2h5.4c0.5,0,1,0.2,1.4,0.6l2.1,2.1C14.8,4.8,15,5.3,15,5.9\n  v8.4C15,15.4,14.1,16.3,13,16.3z M5.5,2.8c-0.6,0-1,0.4-1,1v10.5c0,0.6,0.4,1,1,1H13c0.6,0,1-0.4,1-1V5.9c0-0.3-0.1-0.5-0.3-0.7\n  L11.6,3c-0.2-0.2-0.4-0.3-0.7-0.3H5.5z"/>\n<path d="M6.3,7.3C6,7.3,5.8,7,5.8,6.8V4.5C5.8,4.2,6,4,6.3,4s0.5,0.2,0.5,0.5v2.2C6.8,7,6.6,7.3,6.3,7.3z"/>\n<path d="M8.5,7.3C8.3,7.3,8,7,8,6.8V4.5C8,4.2,8.3,4,8.5,4S9,4.2,9,4.5v2.2C9,7,8.8,7.3,8.5,7.3z"/>\n<path d="M10.8,7.3c-0.3,0-0.5-0.2-0.5-0.5V4.5c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v2.2C11.3,7,11.1,7.3,10.8,7.3z"\n  />\n        </svg>\n      </span>\n        ');btnItem.onclick=function(){console.log("点击本地回放");_this9.setDecoderState({type:"rec",cloudRec:false,rec:true});_this9.jSPlugin.changePlayUrl({type:"rec"},function(){console.log("---------本地回放");var initDate=getQueryString("begin",_this9.jSPlugin.url)||(new Date).Format("yyyyMMdd");_this9.Rec.renderRec("".concat(initDate.slice(0,4),"-").concat(initDate.slice(4,6),"-").concat(initDate.slice(6,8)));var zoom=_this9.decoderState.state.zoom;if(zoom){_this9.setDecoderState({zoom:false});_this9.jSPlugin.Zoom.stopZoom();_this9.jSPlugin.close3DZoom()}},false)};break}return btnItem}},{key:"changeRecSpeed",value:function changeRecSpeed(speed){var _this10=this;var setLiActive=function setLiActive(index){console.log("setLiActive",index);if(!document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect"))){return false}document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[0].className=document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[0].className.replace("active","default");document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[1].className=document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[1].className.replace("active","default");document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[2].className=document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[2].className.replace("active","default");document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[3].className=document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[3].className.replace("active","default");document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[index].className=document.getElementById("".concat(_this10.jSPlugin.id,"-speedSelect")).childNodes[index].className.replace("default","active")};var speedText="1";switch(speed){case 1:setLiActive(2);speedText="倍速";break;case 2:setLiActive(1);speedText="".concat(speed,"倍");break;case 4:setLiActive(0);speedText="".concat(speed,"倍");break;case.5:setLiActive(3);speedText="".concat(speed,"倍");break;default:setLiActive(2);speedText="".concat(speed,"倍");break}if(document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))){document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).innerHTML=speedText}}},{key:"initThemeData",value:function initThemeData(){var _this11=this;var _this$themeData4=this.themeData,header=_this$themeData4.header,footer=_this$themeData4.footer;var videoId=this.jSPlugin.id;this.header=defaultTheme.header;this.footer=defaultTheme.footer;this.isNeedRenderHeader=_.findIndex(header.btnList,function(v){return v.isrender>0})>=0&&this.jSPlugin.id!="miniRec";if(this.isMobile){this.isNeedRenderHeader=_.findIndex(header.btnList,function(v){return v.isrender>0&&v.iconId==="deviceID"||v.isrender>0&&v.iconId==="deviceName"})>=0&&this.jSPlugin.id!="miniRec"}this.isNeedRenderFooter=_.findIndex(footer.btnList,function(v){return v.isrender>0})>=0&&this.jSPlugin.id!="miniRec";console.log("miniRec:"+this.jSPlugin.themeId);this.isNeedRenderTimeLine=_.findIndex(header.btnList,function(v){return v.iconId==="cloudRec"&&v.isrender===1||v.iconId==="rec"&&v.isrender===1})>=0&&!this.jSPlugin.disabledTimeLine&&this.jSPlugin.id!="miniRec";["date-switch-container-wrap","rec-type-container-wrap","mobile-rec-wrap","mobile-ez-ptz-container"].forEach(function(item,index){if(document.getElementById(item)){document.getElementById(item).parentElement.removeChild(document.getElementById(item))}});if(this.isNeedRenderHeader){if(!document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){var headerContainer=document.createElement("div");headerContainer.setAttribute("id","".concat(this.jSPlugin.id,"-headControl"));headerContainer.setAttribute("class","header-controls");headerContainer.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex;width:calc(100% - 100px);overflow:hidden;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' class=\"header-controls-right\" style='display:flex;'></div>");var headerStyle={height:this.jSPlugin.width>MEDIAWIDTH$1?"48px":"32px","line-height":this.jSPlugin.width>MEDIAWIDTH$1?"48px":"32px",display:"flex","justify-content":"space-between",top:0,"z-index":1,background:"#000000",color:"#FFFFFF",width:"100%"};headerContainer.style=styleToString$3(headerStyle);document.getElementById("".concat(videoId,"-wrap")).insertBefore(headerContainer,document.getElementById(videoId));var _checkTimer2=setInterval(function(){if(window.EZUIKit[_this11.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(_checkTimer2)}},50)}else{document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width: calc(100% - 100px);'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>")}}else{if(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))}}if(this.isNeedRenderFooter){if(!document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){var footerContainer=document.createElement("div");footerContainer.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container"));footerContainer.setAttribute("class","ez-iframe-footer-container");var footerStyle={"min-height":this.jSPlugin.width>MEDIAWIDTH$1?"48px":"32px","max-height":this.jSPlugin.width>MEDIAWIDTH$1?"96px":"80px",position:"relative","margin-top":this.jSPlugin.width>MEDIAWIDTH$1?"-48px":"-32px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%"};footerContainer.style=styleToString$3(footerStyle);footerContainer.innerHTML='<div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;height:').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,"px;justify-content: space-between;width:100%;z-index:999;position: relative;'><div id='").concat(this.jSPlugin.id,"-audioControls-left' class=\"footer-controls-left\" style='display:flex;'></div><div id='").concat(this.jSPlugin.id,"-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div></div>");insertAfter(footerContainer,document.getElementById(videoId))}else{if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-".concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,"px");document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='<div id="'.concat(this.jSPlugin.id,'-audioControls"  class="footer-controls" style=\'display:flex;justify-content: space-between;height: ').concat(this.jSPlugin.width>MEDIAWIDTH$1?48:32,"px;width:100%;'><div id='").concat(this.jSPlugin.id,"-audioControls-left' class=\"footer-controls-left\" style='display:flex'></div><div id='").concat(this.jSPlugin.id,"-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div></div>")}}}else{if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")))}}if(this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=header.backgroundColor;document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=header.color;var _iterator=_createForOfIteratorHelper(header.btnList),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var item=_step.value;if(item.isrender){try{this.renderHeader(item.iconId,item.part)}catch(error){}}}}catch(err){_iterator.e(err)}finally{_iterator.f()}}if(this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=footer.backgroundColor;document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=footer.color;var _iterator2=_createForOfIteratorHelper(footer.btnList),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _item=_step2.value;if(_item.isrender){try{this.renderFooter(_item.iconId,_item.part)}catch(error){}}}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}console.log("this.isNeedRenderTimeLine:"+this.isNeedRenderTimeLine);if(this.isNeedRenderTimeLine){if(this.isMobile){if(document.getElementById("".concat(this.jSPlugin.id,"-headControl-right"))){document.getElementById("".concat(this.jSPlugin.id,"-headControl-right")).style.display="none"}this.Rec=new MobileRec(this.jSPlugin,this.changeRecSpeed,this.resetMobileZoomStatus)}else{if(this.Rec){this.Rec.unSyncTimeLine();this.Rec.recInit()}else{this.jSPlugin.decoderState=this.decoderState;this.jSPlugin.setDecoderState=this.setDecoderState;this.Rec=new Rec(this.jSPlugin)}var _checkTimer3=setInterval(function(){if(window.EZUIKit[_this11.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(_checkTimer3)}},50)}}var isNeedRenderPTZ=_.findIndex(this.themeData.footer.btnList,function(v){return v.iconId==="pantile"&&v.isrender===1})>=0&&!this.jSPlugin.disabledPTZ;if(isNeedRenderPTZ){if(this.isMobile){this.MobilePtz=new MobilePtz(this.jSPlugin)}this.Ptz=new Ptz(this.jSPlugin)}["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(item){var that=_this11;window.addEventListener(item,function(event){var _that$decoderState$st=that.decoderState.state,expend=_that$decoderState$st.expend;_that$decoderState$st.webExpend;var zoom=_that$decoderState$st.zoom;var isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(that.jSPlugin.Theme.Rec){setTimeout(function(){that.jSPlugin.Theme.Rec.recAutoSize(function(){if(that.jSPlugin.Zoom.currentScale>1){var currentScale=that.jSPlugin.Zoom.currentScale;that.jSPlugin.Zoom.stopZoom();setTimeout(function(){that.jSPlugin.Zoom.startZoom();that.jSPlugin.Zoom.currentScale=currentScale;that.jSPlugin.Zoom.doScale(currentScale)},200)}})},100)}if(!isFullScreen){if(expend){if(zoom&&that.jSPlugin.use3DZoom){that.jSPlugin.enable3DZoom()}}that.setDecoderState({webExpend:false,expend:false})}if(document.getElementById("".concat(that.jSPlugin.id,"-hdSelect"))){document.getElementById("".concat(that.jSPlugin.id,"-hdSelect")).style.display="none"}if(document.getElementById("".concat(that.jSPlugin.id,"-speedSelect"))){document.getElementById("".concat(that.jSPlugin.id,"-speedSelect")).style.display="none"}if(that.isMobile){if(document.getElementById("".concat(that.jSPlugin.id,"-select-hd-mask"))){document.getElementById("".concat(that.jSPlugin.id,"-select-hd-mask")).style.display="none"}if(document.getElementById("".concat(that.jSPlugin.id,"-select-mask"))){document.getElementById("".concat(that.jSPlugin.id,"-select-mask")).style.display="none"}}if(that.themeData.autoFocus>0){that.startAutoFocus()}})});if(this.themeData.poster){this.jSPlugin.poster=this.themeData.poster;var checkTimer=setInterval(function(){if(window.EZUIKit[_this11.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);_this11.jSPlugin.setPoster(_this11.themeData.poster)}},50)}this.inited=true;this.getDeviceInfo();this.renderThemeData()}},{key:"resetMobileZoomStatus",value:function resetMobileZoomStatus(){if(this.isMobile){var zoomidDom=document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"));if(zoomidDom&&zoomidDom.style&&zoomidDom.style.display!="none"){console.log("结束电子放大");zoomidDom.style.display="none"}if(this.jSPlugin.jSPlugin.Zoom){this.jSPlugin.jSPlugin.Zoom.resetZoom()}}}},{key:"getDeviceInfo",value:function getDeviceInfo(callback){var _this12=this;var deviceAPISuccess=function deviceAPISuccess(data){if(data.code==200&&data.data){callback&&callback(data);if(document.getElementById("".concat(_this12.jSPlugin.id,"-deviceName-content"))){document.getElementById("".concat(_this12.jSPlugin.id,"-deviceName-content")).style.maxWidth="100%";document.getElementById("".concat(_this12.jSPlugin.id,"-deviceName-content")).style.overflow="hidden";document.getElementById("".concat(_this12.jSPlugin.id,"-deviceName-content")).style.textOverflow="ellipsis";document.getElementById("".concat(_this12.jSPlugin.id,"-deviceName-content")).style.whiteSpace="nowrap";document.getElementById("".concat(_this12.jSPlugin.id,"-deviceName-content")).innerHTML=data.data.deviceName}if(document.getElementById("".concat(_this12.jSPlugin.id,"-deviceID-content"))){document.getElementById("".concat(_this12.jSPlugin.id,"-deviceID-content")).style.maxWidth="100%";document.getElementById("".concat(_this12.jSPlugin.id,"-deviceID-content")).style.overflow="hidden";document.getElementById("".concat(_this12.jSPlugin.id,"-deviceID-content")).style.textOverflow="ellipsis";document.getElementById("".concat(_this12.jSPlugin.id,"-deviceID-content")).style.whiteSpace="nowrap";document.getElementById("".concat(_this12.jSPlugin.id,"-deviceID-content")).innerHTML=matchEzopenUrl(_this12.jSPlugin.url).deviceSerial}}};request(this.jSPlugin.env.domain+"/api/lapp/device/info","POST",{accessToken:this.jSPlugin.accessToken,deviceSerial:matchEzopenUrl(this.jSPlugin.url).deviceSerial},"",deviceAPISuccess)}},{key:"editStart",value:function editStart(callback){var audioControlsDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var headerMessageDOM=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));if(headerMessageDOM){headerMessageDOM.setAttribute("class","header-controls themeEditing")}if(audioControlsDOM){audioControlsDOM.setAttribute("class","footer-controls themeEditing")}this.setDecoderState({isEditing:true})}},{key:"editEnd",value:function editEnd(callback){var audioControlsDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var headerMessageDOM=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));if(headerMessageDOM){headerMessageDOM.setAttribute("class","header-controls")}if(audioControlsDOM){audioControlsDOM.setAttribute("class","footer-controls")}this.setDecoderState({isEditing:false})}},{key:"webExpend",value:function webExpend(){var _this13=this;var _this$decoderState$st=this.decoderState.state;_this$decoderState$st.webExpend;var expend=_this$decoderState$st.expend,play=_this$decoderState$st.play;if(!play){return false}if(expend){console.log("正在全局全屏");return false}console.log("执行网页全屏");var footerDOMHeight=0;var headerDOMHeight=0;var promise=requestFullScreenPromise(document.getElementById("".concat(this.jSPlugin.id,"-wrap")));promise.then(function(data){console.log("全屏promise",window.screen.width);if(document.getElementById("".concat(_this13.jSPlugin.id,"-canvas-container"))){footerDOMHeight=parseInt(window.getComputedStyle(document.getElementById("".concat(_this13.jSPlugin.id,"-canvas-container"))).height,10)}if(document.getElementById("".concat(_this13.jSPlugin.id,"-headControl"))){headerDOMHeight=parseInt(window.getComputedStyle(document.getElementById("".concat(_this13.jSPlugin.id,"-headControl"))).height,10)}console.log("this.jSPlugin.JS_Resiz",footerDOMHeight,headerDOMHeight,document.body.clientWidth);_this13.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height-footerDOMHeight-headerDOMHeight)})["catch"](function(err){console.log(err)})}},{key:"expend",value:function expend(){var _this14=this;var _this$decoderState$st2=this.decoderState.state,webExpend=_this$decoderState$st2.webExpend;_this$decoderState$st2.expend;var play=_this$decoderState$st2.play;_this$decoderState$st2.pantile;if(!play){return false}if(webExpend){console.log("正在网站全屏");return false}console.log("执行全局全屏");if(this.isMobile){var heightIntercept=parseInt(getComputedStyle(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).height,10);requestMobileFullScreen(document.getElementById("".concat(this.jSPlugin.id,"-wrap")));var width=document.documentElement.clientWidth;var height=document.documentElement.clientHeight;document.getElementById("".concat(this.jSPlugin.id)).style["backface-visibility"]="hidden";this.jSPlugin.jSPlugin.JS_Resize(height,width-heightIntercept)}else{var promise=requestFullScreenPromise(document.getElementById("".concat(this.jSPlugin.id)));promise.then(function(data){_this14.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height)})["catch"](function(err){console.log(err)})}}},{key:"disabledFECBtn",value:function disabledFECBtn(){var list=["".concat(this.jSPlugin.id,"-capturePicture"),"".concat(this.jSPlugin.id,"-capturePicture-content"),"".concat(this.jSPlugin.id,"-capturePicture-icon"),"".concat(this.jSPlugin.id,"-recordvideo"),"".concat(this.jSPlugin.id,"-recordvideo-content"),"".concat(this.jSPlugin.id,"-recordvideo-icon"),"".concat(this.jSPlugin.id,"-zoom"),"".concat(this.jSPlugin.id,"-zoom-content"),"".concat(this.jSPlugin.id,"-zoom-icon")];var container=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));if(this.jSPlugin.use3DZoom){this.jSPlugin.close3DZoom()}else{this.jSPlugin.Zoom.stopZoom()}this.setDecoderState({zoom:false});if(container){var _iterator3=_createForOfIteratorHelper(list),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var id=_step3.value;var ele=container.querySelector("#".concat(id));if(ele){ele.style.display="none"}}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}}},{key:"resumeFECBtn",value:function resumeFECBtn(){var list=["".concat(this.jSPlugin.id,"-capturePicture"),"".concat(this.jSPlugin.id,"-capturePicture-content"),"".concat(this.jSPlugin.id,"-capturePicture-icon"),"".concat(this.jSPlugin.id,"-recordvideo"),"".concat(this.jSPlugin.id,"-recordvideo-content"),"".concat(this.jSPlugin.id,"-recordvideo-icon"),"".concat(this.jSPlugin.id,"-zoom"),"".concat(this.jSPlugin.id,"-zoom-content"),"".concat(this.jSPlugin.id,"-zoom-icon")];var container=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));if(container){var _iterator4=_createForOfIteratorHelper(list),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var id=_step4.value;var ele=container.querySelector("#".concat(id));if(ele){ele.style.display=""}}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}}}}]);return Theme}();var ToastCustom=function(){function ToastCustom(jSPlugin,isMobile){_classCallCheck$1(this,ToastCustom);this.jSPlugin=jSPlugin;this.isMobile=isMobile;this.timer=null;this.initToastCustom()}_createClass$1(ToastCustom,[{key:"initToastCustom",value:function initToastCustom(){if(!document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom"))){this.randerToast()}else{document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom")).style.display="none"}}},{key:"randerToast",value:function randerToast(){var clientWidth=this.jSPlugin.width;var ratioClient=1;if(this.isMobile){ratioClient=clientWidth/375||1}else{ratioClient=clientWidth/1024||1}var wrapVideo=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));var objDOM=document.createElement("div");objDOM.style="display:none;position:absolute;top:0;width: 100%;align-items: center;justify-content: center;";objDOM.id="".concat(this.jSPlugin.id,"-wrap-Toast-custom");if(this.isMobile){objDOM.innerHTML='<div id="'.concat(this.jSPlugin.id,'-wrap-Toast-custom-content" \n            style="padding: ').concat(12*ratioClient,"px ").concat(20*ratioClient,"px;font-size: ").concat(16*ratioClient,"px;line-height:").concat(16*ratioClient,"px;border-radius: ").concat(8*ratioClient,"px;margin-top: ").concat(667*ratioClient*.53,'px;\n            background-color: rgba(0,0,0,0.8);color:rgba(255,255,255,0.90);box-sizing: border-box;z-index: 999;">\n            </div>\n            ')}else{objDOM.innerHTML='<div id="'.concat(this.jSPlugin.id,'-wrap-Toast-custom-content" \n            style="padding: ').concat(20*ratioClient,"px ").concat(32*ratioClient,"px;font-size: ").concat(24*ratioClient,"px;line-height:").concat(24*ratioClient,"px;border-radius: ").concat(12*ratioClient,"px;margin-top: ").concat(36*ratioClient,'px;\n            background-color: rgba(0,0,0,0.7);color:rgba(255,255,255,0.90);box-sizing: border-box;z-index: 999;">\n            </div>\n            ')}wrapVideo.insertBefore(objDOM,document.getElementById(this.jSPlugin.id))}},{key:"initToastContent",value:function initToastContent(content){var _this=this;var time=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2e3;console.log("content----------------",content);this.timer=null;if(!!document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom"))){document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom")).style.display="flex";document.getElementById("".concat(this.jSPlugin.id,"-wrap-Toast-custom-content")).innerText=content||"";this.timer=setTimeout(function(){if(document.getElementById("".concat(_this.jSPlugin.id,"-wrap"))&&document.getElementById("".concat(_this.jSPlugin.id,"-wrap-Toast-custom"))){document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(_this.jSPlugin.id,"-wrap-Toast-custom")))}},time)}else{this.randerToast();this.initToastContent(content)}}}]);return ToastCustom}();var remoteDoor=function remoteDoor(jSPlugin,successCallback,errorCallback){var success=function success(data){console.log(data);successCallback(data)};var errorFun=function errorFun(err){console.log(err);errorCallback(err)};var data=new FormData;data.append("deviceSerial",matchEzopenUrl(jSPlugin.url).deviceSerial);data.append("cmd","open");({"Content-Type":"application/x-www-form-urlencoded",accessToken:jSPlugin.accessToken});var url="".concat(jSPlugin.env.domain,"/api/v3/device/acs/remote/door?accessToken=").concat(jSPlugin.accessToken);fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(data){console.log("get theme data",data);success(data)})["catch"](function(error){errorFun(error)})};var voiceQuery=function voiceQuery(jSPlugin,successCallback,errorCallback){var success=function success(data){console.log(data);successCallback(data)};var error=function error(err){console.log(err);errorCallback(err)};var data={accessToken:jSPlugin.accessToken,pageStart:0,pageSize:4,default:true,voiceName:"轻应用语音文件"};var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/lapp/voice/query");FetchData(url,"POST",data,success,error,headers)};var voiceSend=function voiceSend(jSPlugin,voiceUrl,successCallback,errorCallback){var success=function success(data){console.log(data);successCallback(data)};var errorFun=function errorFun(err){console.log(err);errorCallback(err)};var url="".concat(jSPlugin.env.domain,"/api/lapp/voice/send");var data=new FormData;data.append("deviceSerial",matchEzopenUrl(jSPlugin.url).deviceSerial);data.append("accessToken",jSPlugin.accessToken);data.append("channelNo",matchEzopenUrl(jSPlugin.url).channelNo||1);data.append("fileUrl",voiceUrl);fetch(url,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(data){success(data)})["catch"](function(error){errorFun(error)})};var PcQuickReplyEle=function(){function PcQuickReplyEle(jSPlugin,switchFooter){_classCallCheck$1(this,PcQuickReplyEle);this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.switchFooter=switchFooter;this.sendLoadingStats=false;this.toastCustom=new ToastCustom(jSPlugin,false);this.quickReplyList=["你好,请将快递放在门口","你好,稍等","你好,请将快递放入小区快递柜","你好,请将外卖放在门口"];this.initQuickReply()}_createClass$1(PcQuickReplyEle,[{key:"initQuickReply",value:function initQuickReply(){if(!document.getElementById("pc-quickReply-back")){this.renderQuickReply()}if(!document.getElementById("pc-quickReply-back-item-0")){this.getQuickReplyList()}}},{key:"renderQuickReply",value:function renderQuickReply(){var _this=this;var sizeRatio=this.videoWidth/1024||1;var objDOM=document.createElement("div");objDOM.style="width:100%;";objDOM.innerHTML='<div style="width:100%;display:flex;flex-direction:row;align-items: center;">\n        <div id="pc-quickReply-back" style="display: flex;align-items: center;margin: 0 '.concat(8*sizeRatio,"px 0 ").concat(16*sizeRatio,'px;cursor: pointer;">\n            <div style="height: ').concat(32*sizeRatio,'px;">\n                <svg width="').concat(32*sizeRatio,'px" height="').concat(32*sizeRatio,'px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                    <title>返回</title>\n                    <defs>\n                        <filter id="filter-1">\n                            <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>\n                        </filter>\n                    </defs>\n                    <g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                        <g id="快速回复loading" transform="translate(-16.000000, -497.000000)">\n                            <g id="返回" transform="translate(0.000000, 425.000000)" filter="url(#filter-1)">\n                                <g transform="translate(16.000000, 72.000000)">\n                                    <rect id="Rectangle" x="0" y="0" width="32" height="32"></rect>\n                                    <path d="M12.5,7.5 C13.2988404,7.5 13.9518304,8.12445998 13.9974537,8.91186361 L14,9 L14,21.5 L26.5,21.5 C27.2988404,21.5 27.9518304,22.12446 27.9974537,22.9118636 L28,23 C28,23.7988404 27.37554,24.4518304 26.5881364,24.4974537 L26.5,24.5 L12.5,24.5 C11.7011596,24.5 11.0481696,23.87554 11.0025463,23.0881364 L11,23 L11,9 C11,8.17157288 11.6715729,7.5 12.5,7.5 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" transform="translate(19.500000, 16.000000) rotate(45.000000) translate(-19.500000, -16.000000) "></path>\n                                </g>\n                            </g>\n                        </g>\n                    </g>\n                </svg>\n            </div>\n            <span style="font-size: ').concat(24*sizeRatio,'px;">返回</span>\n        </div>\n        <div id="pc-quickReply-content" style="display: block;width:calc(100% - ').concat(160*sizeRatio,"px);margin: 0 ").concat(24*sizeRatio,'px;"></div>\n        <div id="pc-quickReply-loading" style="display: none;width:calc(100% - ').concat(160*sizeRatio,"px);margin: 0 ").concat(24*sizeRatio,'px;"></div>\n        <div id="pc-quickReply-loaderror" style="display: none;width:calc(100% - ').concat(160*sizeRatio,"px);margin: 0 ").concat(24*sizeRatio,'px;"></div>\n    </div>');document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply")).appendChild(objDOM);document.getElementById("pc-quickReply-back").onclick=function(){_this.switchFooter("onBell")}}},{key:"matchQuickReplyBtn",value:function matchQuickReplyBtn(){var _this2=this;var sizeRatio=this.videoWidth/1024||1;var contentDom=document.getElementById("pc-quickReply-content");if(this.quickReplyList&&this.quickReplyList.length>0){this.quickReplyList.forEach(function(item,index){var objDOM=document.createElement("div");objDOM.id="pc-quickReply-back-item-".concat(index);objDOM.style="margin: ".concat(8*sizeRatio,"px 0 ").concat(8*sizeRatio,"px ").concat(8*sizeRatio,"px;cursor: pointer;\n            padding: 0 ").concat(20*sizeRatio,"px;min-height: ").concat(64*sizeRatio,"px;width:calc(50% - ").concat(16*sizeRatio,"px);\n            display: inline-block;background: rgba(0,0,0,0.70);border-radius: 8px;text-align: center;\n            box-sizing: border-box;font-size:").concat(24*sizeRatio,"px;color: rgba(255,255,255,0.90);");objDOM.innerHTML='<div id="pc-quickReply-back-item-box-'.concat(index,'">\n            <span id="pc-quickReply-name-').concat(index,'" style="line-height: ').concat(64*sizeRatio,'px;">').concat(item.voiceName,"</span>\n            </div>");objDOM.onclick=function(){if(!_this2.sendLoadingStats){console.log("item:"+item);_this2.sendQuickReply(item,index)}};contentDom.appendChild(objDOM)})}}},{key:"setBtnCheckLoading",value:function setBtnCheckLoading(status,index){var sizeRatio=this.videoWidth/1024||1;if(index>-1){document.getElementById("pc-quickReply-back-item-".concat(index));var domItemBox=document.getElementById("pc-quickReply-back-item-box-".concat(index));var domItemName=document.getElementById("pc-quickReply-name-".concat(index));if(status==1){var domItemIconLoading=document.getElementById("pc-quickReply-icon-loading-".concat(index));if(!!domItemIconLoading&&!!domItemName){domItemBox.removeChild(domItemIconLoading)}}else{if(!!domItemName){var objDOM=document.createElement("span");objDOM.id="pc-quickReply-icon-loading-".concat(index);objDOM.style="vertical-align: middle;margin-right:".concat(16*sizeRatio,"px;");objDOM.innerHTML='<svg width="'.concat(30*sizeRatio,'" height="').concat(30*sizeRatio,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>');domItemBox.insertBefore(objDOM,domItemName)}}}}},{key:"getQuickReplyList",value:function getQuickReplyList(){var _this3=this;console.log("getQuickReplyList");this.madeLoadingDom(0);var successCallback=function successCallback(data){if(data&&data.code==200){var quickReplyListTmd=data.data||[];var itemArr=[];data.data.forEach(function(item,index){itemArr=item.voiceName.split("_");quickReplyListTmd[index].voiceName=itemArr[1]});_this3.quickReplyList=quickReplyListTmd;setTimeout(function(){_this3.madeLoadingDom(2)},500)}else{_this3.madeLoadingDom(1)}};var errorCallback=function errorCallback(err){console.log(err);_this3.madeLoadingDom(1)};voiceQuery(this.jSPlugin,successCallback,errorCallback)}},{key:"madeLoadingDom",value:function madeLoadingDom(status){var _this4=this;var sizeRatio=this.videoWidth/1024||1;if(status==0){document.getElementById("pc-quickReply-content").style.display="none";document.getElementById("pc-quickReply-loaderror").style.display="none";document.getElementById("pc-quickReply-loading").style.display="block";if(!document.getElementById("pc-quickReply-loading-box")){var objDOM=document.createElement("div");objDOM.id="pc-quickReply-loading-box";objDOM.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;";objDOM.innerHTML='<div class="" style="heigth:'.concat(40*sizeRatio,'px">\n                <svg width="').concat(40*sizeRatio,'" height="').concat(40*sizeRatio,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>\n            </div>\n            <div style="font-size: ').concat(28*sizeRatio,"px;margin-top:").concat(10*sizeRatio,"px;line-height:").concat(36*sizeRatio,'px;">加载中…</div>');document.getElementById("pc-quickReply-loading").appendChild(objDOM)}}else if(status==1){document.getElementById("pc-quickReply-content").style.display="none";document.getElementById("pc-quickReply-loading").style.display="none";document.getElementById("pc-quickReply-loaderror").style.display="block";if(!document.getElementById("pc-quickReply-loaderror-box")){var _objDOM=document.createElement("div");_objDOM.id="pc-quickReply-loaderror-box";_objDOM.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;";_objDOM.innerHTML='<div style="font-size: '.concat(28*sizeRatio,'px;color: rgba(255,255,255,0.90);">快速回复加载失败</div>\n            <div id="pc-quickReply-loaderror-reload" style="font-size: ').concat(24*sizeRatio,"px;margin-top:").concat(16*sizeRatio,'px;color: rgba(100,143,252,0.90);cursor: pointer;">重新加载</div>');document.getElementById("pc-quickReply-loaderror").appendChild(_objDOM);document.getElementById("pc-quickReply-loaderror-reload").onclick=function(){_this4.getQuickReplyList()}}}else{document.getElementById("pc-quickReply-loading").style.display="none";document.getElementById("pc-quickReply-loaderror").style.display="none";document.getElementById("pc-quickReply-content").style.display="block";this.matchQuickReplyBtn()}}},{key:"sendQuickReply",value:function sendQuickReply(data,index){var _this5=this;this.sendLoadingStats=true;this.setBtnCheckLoading(0,index);var successCallback=function successCallback(data){_this5.sendLoadingStats=false;_this5.setBtnCheckLoading(1,index);if(data&&data.code==200){_this5.toastCustom.initToastContent("快捷回复成功")}else{_this5.toastCustom.initToastContent("快捷回复失败,请重试")}_this5.switchFooter("onBell")};var errorCallback=function errorCallback(err){console.log(err);_this5.sendLoadingStats=false;_this5.setBtnCheckLoading(1,index);_this5.toastCustom.initToastContent("快捷回复失败,请重试");_this5.switchFooter("onBell")};voiceSend(this.jSPlugin,data.fileUrl,successCallback,errorCallback)}}]);return PcQuickReplyEle}();var PcRemoteUnlockEle=function(){function PcRemoteUnlockEle(jSPlugin,switchFooter){_classCallCheck$1(this,PcRemoteUnlockEle);this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.switchFooter=switchFooter;this.toastCustom=new ToastCustom(jSPlugin,false);this.lockStatus=false;this.initRemoteUnlock()}_createClass$1(PcRemoteUnlockEle,[{key:"initRemoteUnlock",value:function initRemoteUnlock(){if(!document.getElementById("pc-remoteUnlock-back")){this.renderRemoteUnlock()}else{this.madeSlideEvent()}}},{key:"renderRemoteUnlock",value:function renderRemoteUnlock(){var _this=this;var sizeRatio=this.videoWidth/1024||1;var objDOM=document.createElement("div");objDOM.style="width:100%;";objDOM.id="pc-remoteUnlock-box";objDOM.innerHTML='<div style="width:100%;display:flex;flex-direction:row;align-items: center;">\n        <div id="pc-remoteUnlock-back" style="display: flex;align-items: center;margin: 0 '.concat(8*sizeRatio,"px 0 ").concat(16*sizeRatio,'px;cursor: pointer;">\n            <div style="height: ').concat(32*sizeRatio,'px;">\n                <svg width="').concat(32*sizeRatio,'px" height="').concat(32*sizeRatio,'px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                    <title>返回</title>\n                    <defs>\n                        <filter id="filter-1">\n                            <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0"></feColorMatrix>\n                        </filter>\n                    </defs>\n                    <g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                        <g id="快速回复loading" transform="translate(-16.000000, -497.000000)">\n                            <g id="返回" transform="translate(0.000000, 425.000000)" filter="url(#filter-1)">\n                                <g transform="translate(16.000000, 72.000000)">\n                                    <rect id="Rectangle" x="0" y="0" width="32" height="32"></rect>\n                                    <path d="M12.5,7.5 C13.2988404,7.5 13.9518304,8.12445998 13.9974537,8.91186361 L14,9 L14,21.5 L26.5,21.5 C27.2988404,21.5 27.9518304,22.12446 27.9974537,22.9118636 L28,23 C28,23.7988404 27.37554,24.4518304 26.5881364,24.4974537 L26.5,24.5 L12.5,24.5 C11.7011596,24.5 11.0481696,23.87554 11.0025463,23.0881364 L11,23 L11,9 C11,8.17157288 11.6715729,7.5 12.5,7.5 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" transform="translate(19.500000, 16.000000) rotate(45.000000) translate(-19.500000, -16.000000) "></path>\n                                </g>\n                            </g>\n                        </g>\n                    </g>\n                </svg>\n            </div>\n            <span style="font-size: ').concat(24*sizeRatio,'px;user-select: none;">返回</span>\n        </div>\n        <div id="pc-remoteUnlock-content" style="display: block;width:calc(100% - ').concat(160*sizeRatio,"px);margin: 0 ").concat(24*sizeRatio,'px;"></div>\n    </div>');document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock")).appendChild(objDOM);document.getElementById("pc-remoteUnlock-back").onclick=function(){_this.goback()};this.renderRemoteUnlockSlide()}},{key:"renderRemoteUnlockSlide",value:function renderRemoteUnlockSlide(){var sizeRatio=this.videoWidth/1024||1;var contentDom=document.getElementById("pc-remoteUnlock-content");var objDOM=document.createElement("div");objDOM.id="pc-remoteUnlock-content-slide";objDOM.style="width: 100%;display: flex;justify-content: center;cursor: pointer;";objDOM.innerHTML='<div id="pc-remoteUnlock-slide-box" style="width: '.concat(400*sizeRatio,"px;line-height: ").concat(80*sizeRatio,"px;height: ").concat(80*sizeRatio,"px;border: 1px solid rgba(255,255,255,1);border-radius: ").concat(40*sizeRatio,'px;position: relative;text-align: center;">\n        <div id="pc-remoteUnlock-slide-bgColor" style="border-radius: ').concat(40*sizeRatio,"px;width: ").concat(64*sizeRatio,"px;height: ").concat(80*sizeRatio,'px;position: absolute;left: 0;top: 0;"></div>\n        <div id="pc-remoteUnlock-slide-tips" style="height: ').concat(80*sizeRatio,"px;line-height: ").concat(80*sizeRatio,"px;font-size: ").concat(24*sizeRatio,"px;border-radius: ").concat(40*sizeRatio,'px;position: absolute;text-align: center;user-select: none;color: rgba(255,255,255,0.90);width: 100%;">右滑开锁</div>\n        <div id="pc-remoteUnlock-slide-ball" style="top: ').concat(8*sizeRatio,"px;left: ").concat(8*sizeRatio,"px;width: ").concat(64*sizeRatio,"px;height: ").concat(64*sizeRatio,'px;background: #598FFF;position: absolute;text-align: center;border-radius:50%;display: flex;align-items: center;justify-content: center;">\n            <svg id="slide-ball-start" style="display: inline;" width="').concat(36*sizeRatio,'px" height="').concat(36*sizeRatio,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                <title></title>\n                <g id="icon/箭头向右" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                    <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="24" height="24"></rect>\n                    <path d="M14.2841136,6.3689007 L19.9432338,12.0287579 L14.2863796,17.6856122 L12.8580239,16.2572565 L16.114,12.9999007 L4.00000001,13 L4.00000001,11 L16.058,10.9999007 L12.8557579,7.79725638 L14.2841136,6.3689007 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                </g>\n            </svg>\n            <svg id="slide-ball-end"  style="display: none;" width="').concat(36*sizeRatio,'" height="').concat(36*sizeRatio,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#598FFF" p-id="2400"></path></svg>\n            \n        </div>\n    </div>');contentDom.appendChild(objDOM);this.madeSlideEvent()}},{key:"getOffsetLeft",value:function getOffsetLeft(dom){var offsetLeft=0;do{offsetLeft+=dom.offsetLeft;dom=dom.parentNode}while(dom.parentNode);return offsetLeft}},{key:"madeSlideEvent",value:function madeSlideEvent(){var sizeRatio=this.videoWidth/1024||1;var videoDom=document.getElementById("".concat(this.jSPlugin.id));var videoOffsetLeft=this.getOffsetLeft(videoDom);var box=document.getElementById("pc-remoteUnlock-slide-box");var bgColor=document.getElementById("pc-remoteUnlock-slide-bgColor");var tips=document.getElementById("pc-remoteUnlock-slide-tips");var ball=document.getElementById("pc-remoteUnlock-slide-ball");var that=this;function success(){if(!that.lockStatus){that.lockStatus=true;document.getElementById("slide-ball-start").style.display="none";document.getElementById("slide-ball-end").style.display="inline";bgColor.style.width=box.clientWidth+"px";bgColor.style.backgroundColor="#598FFF";box.style.border="0";ball.style.backgroundColor="#ffffff";tips.textContent="正在开锁";ball.onmousedown=null;document.onmousemove=null;that.sendRemoteUnlockApi()}}ball.onmousedown=function(e){var e=e||window.event;var posx=e.offsetX;ball.style.transition="";bgColor.style.transition="";document.onmouseup=function(){console.log("--------------onmouseup");if(!that.lockStatus){bgColor.style.width=0+"px";ball.style.left=8*sizeRatio+"px";ball.style.transition="left 0.6s linear";bgColor.style.transition="width 0.6s linear"}document.onmouseup=null;document.onmousemove=null};document.onmousemove=function(e){var e=e||window.event;console.log("videoDom",videoOffsetLeft);var x=e.pageX-box.offsetLeft-posx-videoOffsetLeft;var max=box.clientWidth-ball.clientWidth-8*sizeRatio;if(x<=0){x=0}if(x>=max){x=max}ball.style.left=x+"px";if(x==max&&!that.lockStatus){success()}}}}},{key:"resetRemoteUnlockSlide",value:function resetRemoteUnlockSlide(){var domBox=document.getElementById("pc-remoteUnlock-box");var domRemoteUnlock=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock"));if(!!domBox&&!!domRemoteUnlock){domRemoteUnlock.removeChild(domBox)}}},{key:"sendRemoteUnlockApi",value:function sendRemoteUnlockApi(){var _this2=this;console.log("下发远程开锁");var successCallback=function successCallback(data){if(data&&data.code==200){_this2.toastCustom.initToastContent("开锁成功")}else{_this2.toastCustom.initToastContent("开锁失败,请重试")}_this2.goback()};var errorCallback=function errorCallback(err){console.log(err);_this2.toastCustom.initToastContent("开锁失败,请重试");_this2.goback()};remoteDoor(this.jSPlugin,successCallback,errorCallback)}},{key:"goback",value:function goback(){this.switchFooter("onCall");this.resetRemoteUnlockSlide()}}]);return PcRemoteUnlockEle}();var data$2={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0},header:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",activeColor:"#1890FF",autoFocus:0,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"ringStatus",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"callStatus",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#ffffff",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]}},footer:{onBell:{color:"#ffffff",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"quickReply",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"rejection",part:"left",defaultActive:0,isrender:1,color:"#2C2C2C",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"answer",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000080",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"mute",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"hangUp",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]}}};var webCallData={data:data$2};var styleToString$2=function styleToString(obj){var styleString="";Object.keys(obj).map(function(item,index){styleString+="".concat(item,":").concat(obj[item]).concat(index<Object.keys(obj).length-1?";":"")});return styleString};var Call=function(){function Call(jSPlugin,themeData,setDecoderState,decoderState){var _this=this;_classCallCheck$1(this,Call);_defineProperty(this,"autoPlayRing",function(){console.log("autoPlayRing");var bellringAudio=document.getElementById("bellring-audio");if(!!bellringAudio){bellringAudio.muted=false;bellringAudio.src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3";if(bellringAudio.paused){bellringAudio.play()}}window.removeEventListener("click",_this.autoPlayRing)});_defineProperty(this,"muteCommon",function(btnData){var _this$decoderState$st=_this.decoderState.state,talk=_this$decoderState$st.talk,sound=_this$decoderState$st.sound;if(talk){console.log("结束对讲");_this.setDecoderState({talk:false,mute:true},btnData.backgroundColor);_this.jSPlugin.Talk.stopTalk();if(!sound){_this.jSPlugin.openSound()}_this.setDecoderState({sound:true})}else{_this.setDecoderState({talk:false,mute:true},btnData.backgroundColor);if(!sound){_this.jSPlugin.openSound()}_this.setDecoderState({sound:true})}});_defineProperty(this,"switchCallStatus",function(value){var editStatus=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var _this$themeData=_this.themeData,header=_this$themeData.header,footer=_this$themeData.footer;var muteData=null;if(value=="onCall"){console.log("接听");_this.bellStatus="onCall";_this.switchFooter("onCall");footer[_this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this.renderFooter(item.iconId,item)}if(item.iconId=="mute"){muteData=item}});header[_this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this.renderHeader(item.iconId,item)}});var bellHeaderDom=document.getElementById("".concat(_this.jSPlugin.id,"-header-onBell"));if(bellHeaderDom){bellHeaderDom.parentElement.removeChild(bellHeaderDom)}if(_this.themeData.customConfig.bellPoster==1){if(document.getElementById("bellring-icon")){document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}}if(_this.themeData.customConfig.defaultMicro==0&&muteData){_this.muteCommon(muteData)}else{_this.setDecoderState({mute:false},muteData.backgroundColor)}_this.removeBellRing()}else{console.log("响铃");_this.bellStatus="onBell";_this.jSPlugin.Theme.changeTheme(_this.themeData,editStatus)}});this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.videoHeight=jSPlugin.height;this.themeData=themeData;this.setDecoderState=setDecoderState;this.decoderState=decoderState;this.isNeedRenderHeader=false;this.isNeedRenderFooter=false;this.autoFocus=0,this.autoFocusTimer=null,this.bellStatus="onBell",this.recordTimer=null;this.nextRate=1;this.themeInited=false;this.inited=false;this.activeThemeStatus=true;this.activeThemeStatusTxt="模板未激活";this.toastCustom=new ToastCustom(jSPlugin,false)}_createClass$1(Call,[{key:"initBellRing",value:function initBellRing(){var _this2=this;var _this$decoderState$st2=this.decoderState.state,play=_this$decoderState$st2.play,isEditing=_this$decoderState$st2.isEditing;_this$decoderState$st2.rejection;var clientWidth=this.videoWidth;var ratioClient=clientWidth/1024;this.maxBellTime=this.themeData.customConfig.maxBellTime*1e3;var bellringDom=document.getElementById("bellring");var bellringAudioDom=document.getElementById("bellring-audio");if(!bellringDom&&!bellringAudioDom){if(!!this.jSPlugin.isNeedBellRing){var objDOM=document.createElement("div");objDOM.id="bellring";objDOM.innerHTML='<div>\n          <audio id="bellring-audio" loop autoplay>\n            <source src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3" type="audio/mpeg">\n          </audio>\n          </div>';document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(objDOM)}if(this.themeData.customConfig.bellPoster==1&&!isEditing){var bellTop=(this.videoHeight-180*ratioClient)/2;var objIconDOM=document.createElement("div");objIconDOM.id="bellring-icon";objIconDOM.style="position: absolute;pointer-events: none;background: none;width: 100%;\n          position: absolute;top: ".concat(bellTop,"px;display: flex;align-items: center;justify-content: center;");objIconDOM.innerHTML='<div style="width: '.concat(180*ratioClient,"px;height: ").concat(180*ratioClient,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.2);border-radius: 50%;">\n            <div style="width: ').concat(100*ratioClient,"px;height: ").concat(100*ratioClient,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.3);border-radius: 50%;">\n              <svg width="').concat(40*ratioClient,'px" height="').concat(40*ratioClient,'px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                  <title>icon/响铃</title>\n                  <g id="icon/响铃" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                      <polygon id="Path" points="0 0 40.0000002 0 40.0000002 40.0000002 0 40.0000002"></polygon>\n                      <path d="M20.0000001,4.25000002 C22.0363461,4.25000002 23.698175,5.84879552 23.8000507,7.8591997 L23.8050001,8.05500003 L23.805316,8.99953253 C27.1874196,9.97041766 29.6921839,13.0354462 29.80936,16.723731 L29.80936,16.723731 L29.8133335,16.9800001 L29.8133335,21.6416668 C29.8133335,22.3259481 30.0858837,22.9835569 30.5703302,23.4680033 L30.5703302,23.4680033 L31.6386635,24.5363367 C32.338953,25.2366262 32.760721,26.1675592 32.8273086,27.1785295 L32.8273086,27.1785295 L32.8350001,27.4233334 C32.8350001,29.577547 31.0892137,31.3233335 28.9350001,31.3233335 L28.9350001,31.3233335 L24.5666667,31.323 L24.5650266,31.3951531 C24.4527075,33.8194458 22.4520933,35.7500001 20.0000001,35.7500001 C17.5482065,35.7500001 15.5473098,33.8197367 15.4349743,31.3967059 L15.4326667,31.323 L11.0666667,31.3233335 C9.06159524,31.3233335 7.39851917,29.8069287 7.18810198,27.8229374 L7.17194359,27.6230185 L7.1666667,27.4233334 C7.1666667,26.3411154 7.59733134,25.3020086 8.36300328,24.5363367 L8.36300328,24.5363367 L9.43133662,23.4680033 C9.91578309,22.9835569 10.1883334,22.3259481 10.1883334,21.6416668 L10.1883334,21.6416668 L10.1883334,16.9800001 C10.1883334,13.1909619 12.7263704,9.99530436 16.1948593,8.99965364 L16.1950001,8.05500003 C16.1950001,5.95360729 17.8979654,4.25000002 20.0000001,4.25000002 Z M23.0656667,31.323 L16.9336667,31.323 L16.9352114,31.3619281 C17.0285826,32.9723844 18.3649772,34.2500001 20.0000001,34.2500001 C21.6352227,34.2500001 22.9714318,32.9721919 23.0647896,31.3604131 L23.0656667,31.323 Z M21.5116668,10.1783334 L18.4900001,10.1783334 C14.7336124,10.1783334 11.6883334,13.2231481 11.6883334,16.9800001 L11.6883334,16.9800001 L11.6883334,21.6416668 C11.6883334,22.7238848 11.2576687,23.7629916 10.4919968,24.5286635 L10.4919968,24.5286635 L9.42366346,25.5969969 C8.93921698,26.0814433 8.6666667,26.7390521 8.66637526,27.402427 L8.66637526,27.402427 L8.67048222,27.560237 C8.74130967,28.8268108 9.79171396,29.8233335 11.0666667,29.8233335 L11.0666667,29.8233335 L23.7906939,29.8222289 C23.8004164,29.8218553 23.8101862,29.8216668 23.8200001,29.8216668 L23.8486667,29.823 L28.9350001,29.8233335 C30.2055455,29.8233335 31.2450456,28.8367727 31.329826,27.609522 L31.3354106,27.4481422 L31.3293607,27.2529336 C31.2880301,26.6292837 31.0210852,26.0400787 30.5780034,25.5969969 L30.5780034,25.5969969 L29.50967,24.5286635 C28.7439981,23.7629916 28.3133335,22.7238848 28.3133335,21.6416668 L28.3133335,21.6416668 L28.3134279,16.9919039 L28.3098332,16.759466 C28.1934023,13.0970787 25.1864454,10.1783334 21.5116668,10.1783334 L21.5116668,10.1783334 Z M20.0000001,5.75000002 C18.7795808,5.75000002 17.7813801,6.69770708 17.7003155,7.89717688 L17.6950001,8.05500003 L17.6952875,8.7158769 C17.9568453,8.69103758 18.2219393,8.67833337 18.4900001,8.67833337 L18.4900001,8.67833337 L21.5116668,8.67833337 C21.7792577,8.67833337 22.0439466,8.69101238 22.3051575,8.71580951 L22.3050001,8.05500003 C22.3050001,6.7819079 21.273481,5.75000002 20.0000001,5.75000002 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                  </g>\n              </svg>\n            </div>\n          </div>');document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(objIconDOM);if(play&&this.bellStatus=="onBell"){this.jSPlugin.pause()}}else{if(document.getElementById("bellring-icon")){document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}}setTimeout(function(){var _this2$decoderState$s=_this2.decoderState.state,isEditing=_this2$decoderState$s.isEditing,rejection=_this2$decoderState$s.rejection;if(_this2.bellStatus=="onBell"&&!rejection){_this2.removeBellRing();if(!isEditing){_this2.answerOvertime()}}},this.maxBellTime)}}},{key:"removeBellRing",value:function removeBellRing(){if(!!document.getElementById("bellring")){document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring"))}if(!!document.getElementById("bellring-icon")){document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}}},{key:"matchBtn",value:function matchBtn(btnId,btnData){var _this3=this;var _this$themeData2=this.themeData,header=_this$themeData2.header,footer=_this$themeData2.footer;var _this$decoderState$st3=this.decoderState.state,mute=_this$decoderState$st3.mute,rejection=_this$decoderState$st3.rejection;var btnItem={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function onclick(){},onmoveleft:function onmoveleft(){},onmoveright:function onmoveright(){},onremove:function onremove(){}};var _index=header[this.bellStatus].btnList.findIndex(function(item){return item.iconId===btnId});if(_index===-1){btnItem.color=footer[this.bellStatus].color;btnItem.backgroundColor=footer[this.bellStatus].backgroundColor;btnItem.activeColor=footer[this.bellStatus].activeColor}else{btnItem.color=header[this.bellStatus].color;btnItem.backgroundColor=header[this.bellStatus].backgroundColor;btnItem.activeColor=header[this.bellStatus].activeColor}var btnWidth=this.videoWidth/6;this.videoWidth;var sizeRatio=this.videoWidth/1024||1;switch(btnId){case"ringStatus":btnItem.title=this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt;btnItem.id=btnId;btnItem.domString='<span id="header-onBell-ringStatus" style="color:'.concat(btnData.color||"#FFFFFF",";font-size: ").concat(32*sizeRatio,'px;display: block;text-align: left;font-weight: 500;" >').concat(this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,"</span>");btnItem.onclick=function(){};return btnItem;case"deviceCategory":btnItem.title="设备名称";btnItem.id=btnId;btnItem.domString='<span id="header-onBell-deviceCategory" \n          style="\n          color:'.concat(btnData.color||"#FFFFFF",";\n          font-size: ").concat(24*sizeRatio,"px;\n          padding-top: ").concat(16*sizeRatio,'px;\n          display: block;\n          max-width: 100%;\n          overflow: hidden;\n          text-overflow: ellipsis;\n          white-space: nowrap;\n          text-align: left;\n          ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>");btnItem.onclick=function(){};return btnItem;case"callStatus":btnItem.title="通话中";btnItem.id=btnId;btnItem.domString='<span id="header-onCall-ringStatus" style="color:'.concat(btnData.color||"#FFFFFF",";font-size: ").concat(32*sizeRatio,'px;display: block;text-align: left;" >通话中</span>');btnItem.onclick=function(){};return btnItem;case"deviceCategory":btnItem.title="设备名称";btnItem.id=btnId;btnItem.domString='<span id="header-onCall-deviceCategory"\n           style="color:'.concat(btnData.color||"#FFFFFF",";\n           font-size: ").concat(24*sizeRatio,"px;\n           padding-top: ").concat(16*sizeRatio,'px;\n           display: block;\n           max-width: 100%;\n           overflow: hidden;\n           text-overflow: ellipsis;\n           white-space: nowrap;\n           text-align: left;\n           ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>");btnItem.onclick=function(){};return btnItem;case"rejection":btnItem.title="拒绝";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.7,'px;display: flex;flex-direction: column;align-items: center;">\n                <div style="width:').concat(btnWidth*.5,"px;height: ").concat(btnWidth*.5,"px;border-radius: 50%;background: ").concat(rejection?"#CCCCCC":btnData.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.3,'px" height="').concat(btnWidth*.3,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>拒绝</title>\n                        <g id="icon/拒绝" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">拒绝</div>\n            </div>');btnItem.onclick=function(){var _this3$decoderState$s=_this3.decoderState.state,play=_this3$decoderState$s.play,isEditing=_this3$decoderState$s.isEditing,rejection=_this3$decoderState$s.rejection;if(isEditing||rejection){return false}console.log("拒绝");if(play){_this3.jSPlugin.stop()}_this3.removeBellRing();_this3.setDecoderState({play:false,rejection:true});_this3.rejectionStatusDispose();if(typeof _this3.jSPlugin.hangUpCallback==="function"){_this3.jSPlugin.hangUpCallback("rejection")}};return btnItem;case"quickReply":btnItem.title="快捷回复";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.7,'px;display: flex;flex-direction: column;align-items: center;">\n                <div style="width: ').concat(btnWidth*.5,"px;height: ").concat(btnWidth*.5,"px;border-radius: 50%;background: ").concat(rejection?"#CCCCCC":btnData.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.3,'px" height="').concat(btnWidth*.3,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>快捷回复</title>\n                        <g id="icon/web快捷回复" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path d="M17.4723401,6.00464509 C24.1317208,5.8200623 29.613145,11.1601938 29.613145,17.806299 C29.613145,19.5506656 29.2343807,21.2437888 28.5133012,22.7904909 L28.638,22.51 L29.9802796,28.9334997 C30.0980856,29.4978889 29.6719785,30.0050773 29.131395,30.0271186 L29.0218792,30.0249315 L28.9025577,30.0074816 L22.488349,28.6446207 L22.3501503,28.7067675 C21.0679643,29.242563 19.6940914,29.5480927 18.2793303,29.6038407 L18.2793303,29.6038407 L17.8062986,29.6131454 C11.1610025,29.6131454 5.820073,24.1313212 6.00464384,17.4723718 C6.17540866,11.3038211 11.3038207,6.17540904 17.4723401,6.00464509 Z M17.8062986,16.2974446 C16.9707372,16.2974446 16.2926003,16.9755814 16.2926003,17.8111428 C16.2926003,18.6467043 16.9707372,19.3248411 17.8062986,19.3248411 C18.64186,19.3248411 19.3199969,18.6467043 19.3199969,17.8111428 C19.3199969,16.9755814 18.64186,16.2974446 17.8062986,16.2974446 Z M12.9624642,16.2974446 C12.1269027,16.2974446 11.4487659,16.9755814 11.4487659,17.8111428 C11.4487659,18.6467043 12.1269027,19.3248411 12.9624642,19.3248411 C13.7980256,19.3248411 14.4761624,18.6467043 14.4761624,17.8111428 C14.4761624,16.9755814 13.7980256,16.2974446 12.9624642,16.2974446 Z M22.650133,16.2974446 C21.8145716,16.2974446 21.1364348,16.9755814 21.1364348,17.8111428 C21.1364348,18.6467043 21.8145716,19.3248411 22.650133,19.3248411 C23.4856945,19.3248411 24.1638313,18.6467043 24.1638313,17.8111428 C24.1638313,16.9755814 23.4856945,16.2974446 22.650133,16.2974446 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">快捷回复</div>\n            </div>');btnItem.onclick=function(){var rejection=_this3.decoderState.state.rejection;if(rejection){return false}console.log("快捷回复");_this3.switchFooter("quickReply");_this3.quickReplyEle=new PcQuickReplyEle(_this3.jSPlugin,_this3.switchFooter)};return btnItem;case"answer":btnItem.title="接听";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.7,'px;display: flex;flex-direction: column;align-items: center;">\n                <div style="width: ').concat(btnWidth*.5,"px;height: ").concat(btnWidth*.5,"px;border-radius: 50%;background: ").concat(rejection?"#CCCCCC":btnData.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.3,'px" height="').concat(btnWidth*.3,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>接听</title>\n                        <g id="icon/接听" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path d="M15.7728281,19.6822968 C13.2528132,17.165123 10.8435994,14.2473605 11.9999084,13.0938925 C13.6505608,11.4432401 15.0881341,10.4261428 12.1646895,6.78675259 C9.23840386,3.14452132 7.28659974,5.94011849 5.68708632,7.53963191 C3.84324225,9.38631703 5.59049048,16.2645088 12.3891328,23.0659922 C19.1877751,29.8646345 26.0688079,31.6147238 27.9154931,29.7680386 C29.5150065,28.1685252 32.3106036,26.2195622 28.6712134,23.2932765 C25.0318232,20.3669909 24.0147259,21.8045642 22.3640735,23.4580576 C21.2077645,24.6086845 18.2928431,22.1994707 15.7728281,19.6822968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.727936, 17.728157) rotate(-360.000000) translate(-17.727936, -17.728157) "></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">接听</div>\n            </div>');btnItem.onclick=function(){var _this3$decoderState$s2=_this3.decoderState.state,play=_this3$decoderState$s2.play,isEditing=_this3$decoderState$s2.isEditing,talk=_this3$decoderState$s2.talk,sound=_this3$decoderState$s2.sound,rejection=_this3$decoderState$s2.rejection;if(isEditing||rejection){return false}console.log("接听");_this3.jSPlugin.pluginStatus.loadingClear();if(!play){_this3.jSPlugin.pluginStatus.loadingStart(_this3.jSPlugin.id);_this3.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"});_this3.jSPlugin.play();_this3.setDecoderState({play:!play})}if(!talk&&_this3.themeData.customConfig.defaultMicro==1){_this3.setDecoderState({talk:true,mute:false});if(sound){_this3.jSPlugin.closeSound()}_this3.jSPlugin.Talk.startTalk()}_this3.setDecoderState({sound:false});_this3.bellStatus="onCall";_this3.switchFooter("onCall");footer[_this3.bellStatus].btnList.map(function(item,index){if(item.isrender){_this3.renderFooter(item.iconId,item)}});header[_this3.bellStatus].btnList.map(function(item,index){if(item.isrender){_this3.renderHeader(item.iconId,item)}});var bellHeaderDom=document.getElementById("".concat(_this3.jSPlugin.id,"-header-onBell"));if(bellHeaderDom){bellHeaderDom.parentElement.removeChild(bellHeaderDom)}if(_this3.themeData.customConfig.bellPoster==1){if(document.getElementById("bellring-icon")){document.getElementById("".concat(_this3.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}_this3.jSPlugin.setPoster("")}if(_this3.themeData.customConfig.defaultMicro==0){_this3.muteCommon(btnData);_this3.jSPlugin.openSound();_this3.setDecoderState({sound:true})}_this3.removeBellRing();_this3.maxTalkTime=_this3.themeData.customConfig.maxTalkTime*1e3*60;var that=_this3;setTimeout(function(){if(talk){console.log("结束对讲");that.setDecoderState({talk:false});that.jSPlugin.Talk.stopTalk()}if(play){that.jSPlugin.stop();that.setDecoderState({play:!play})}_this3.rejectionStatusDispose();if(!!_this3.remoteUnlockEle){_this3.remoteUnlockEle.goback()}if(typeof _this3.jSPlugin.hangUpCallback==="function"){_this3.jSPlugin.hangUpCallback("hangUp")}},_this3.maxTalkTime)};return btnItem;case"remoteUnlock":btnItem.title="远程开锁";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.7,'px;display: flex;flex-direction: column;align-items: center;">\n                <div style="width: ').concat(btnWidth*.5,"px;height: ").concat(btnWidth*.5,"px;border-radius: 50%;background: ").concat(rejection?"#CCCCCC":btnData.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.3,'px" height="').concat(btnWidth*.3,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>开锁</title>\n                        <g id="icon/开锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path d="M18,4 C21.3137085,4 24,6.6862915 24,10 L24,10 L24,19.787 L29.5,19.7875 C30.0522847,19.7875 30.5,20.2352153 30.5,20.7875 C30.5,21.3397847 30.0522847,21.7875 29.5,21.7875 L24,21.787 L24,26 C24,29.2383969 21.4344251,31.8775718 18.2249383,31.9958615 L18,32 C14.6862915,32 12,29.3137085 12,26 L12,26 L12,10 C12,6.6862915 14.6862915,4 18,4 Z M18,6 C15.790861,6 14,7.790861 14,10 L14,10 L14,26 C14,28.209139 15.790861,30 18,30 C20.209139,30 22,28.209139 22,26 L22,26 L22,21.787 L18.5,21.7875 C17.9477153,21.7875 17.5,21.3397847 17.5,20.7875 C17.5,20.2352153 17.9477153,19.7875 18.5,19.7875 L22,19.787 L22,10 C22,7.85780461 20.3160315,6.10892112 18.1996403,6.00489531 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">远程开锁</div>\n            </div>');btnItem.onclick=function(){var _this3$decoderState$s3=_this3.decoderState.state,isEditing=_this3$decoderState$s3.isEditing,rejection=_this3$decoderState$s3.rejection;if(isEditing||_this3.bellStatus=="onBell"||rejection){return false}console.log("远程开锁");_this3.switchFooter("remoteUnlock");_this3.remoteUnlockEle=new PcRemoteUnlockEle(_this3.jSPlugin,_this3.switchFooter)};return btnItem;case"mute":btnItem.title="静音";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.7,'px;display: flex;flex-direction: column;align-items: center;">\n                <div id="').concat(this.jSPlugin.id,'-icon-mute" style="width: ').concat(btnWidth*.5,"px;height: ").concat(btnWidth*.5,"px;border-radius: 50%;border: 1px solid ").concat(rejection?"#CCCCCC":btnData.backgroundColor,";background: ").concat(rejection&&mute?"#cccccc":"#ffffff",';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.3,'px" height="').concat(btnWidth*.3,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>静音</title>\n                        <g id="icon/静音" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path id="icon-mute-path" d="M29.2988305,7.56559704 C29.8540627,8.1086468 29.8980234,8.97727504 29.4240597,9.57172938 L29.3223594,9.6867869 L22.585,16.574 L22.5859243,26.0592702 C22.5859243,26.9500521 21.8638029,27.6721735 20.973021,27.6721735 C20.6007147,27.6721735 20.2398727,27.5433734 19.9517149,27.3076254 L15.583,23.733 L10.4341733,28.9987008 C9.85492024,29.5909486 8.9052312,29.6014828 8.31298346,29.0222298 C7.75775121,28.47918 7.71379057,27.6105518 8.18775419,27.0160974 L8.28945454,26.9010399 L27.1776406,7.58912597 C27.7568937,6.99687823 28.7065827,6.98634397 29.2988305,7.56559704 Z M22.2503608,7.16816759 C22.4679282,7.45036017 22.5859243,7.79665625 22.5859243,8.15298221 L22.585,9.899 L10.778,21.971 L9.47580645,21.9713498 C7.69424274,21.9713498 6.25,20.5271071 6.25,18.7455434 L6.25,15.65293 C6.25,13.8713663 7.69424274,12.4271235 9.47580645,12.4271235 L12.787,12.427 L19.9882064,6.87564241 C20.6936617,6.33174431 21.7064627,6.46271229 22.2503608,7.16816759 Z" id="形状结合" fill="').concat(mute?"#ffffff":rejection?"#cccccc":btnData.backgroundColor,'"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">静音</div>\n            </div>');btnItem.onclick=function(){var _this3$decoderState$s4=_this3.decoderState.state,talk=_this3$decoderState$s4.talk,sound=_this3$decoderState$s4.sound;_this3$decoderState$s4.play;var rejection=_this3$decoderState$s4.rejection;if(rejection){return false}console.log("静音");if(talk){console.log("结束对讲");_this3.setDecoderState({talk:false,mute:true},btnData.backgroundColor);_this3.jSPlugin.Talk.stopTalk();_this3.jSPlugin.openSound();_this3.setDecoderState({sound:true})}else{console.log("开始对讲");_this3.setDecoderState({talk:true,mute:false},btnData.backgroundColor);if(sound){_this3.jSPlugin.closeSound();_this3.setDecoderState({sound:false})}_this3.jSPlugin.Talk.startTalk()}};return btnItem;case"hangUp":btnItem.title="挂断";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.7,'px;display: flex;flex-direction: column;align-items: center;">\n                <div style="width:').concat(btnWidth*.5,"px;height: ").concat(btnWidth*.5,"px;border-radius: 50%;background: ").concat(rejection?"#CCCCCC":btnData.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.3,'px" height="').concat(btnWidth*.3,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>挂断</title>\n                        <g id="icon/挂断" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;">挂断</div>\n            </div>');btnItem.onclick=function(){var _this3$decoderState$s5=_this3.decoderState.state,talk=_this3$decoderState$s5.talk,play=_this3$decoderState$s5.play,sound=_this3$decoderState$s5.sound,rejection=_this3$decoderState$s5.rejection;if(rejection){return false}if(talk){console.log("结束对讲");_this3.setDecoderState({talk:false});_this3.jSPlugin.Talk.stopTalk()}if(play){_this3.jSPlugin.stop();_this3.setDecoderState({play:!play})}if(sound){_this3.jSPlugin.closeSound();_this3.setDecoderState({sound:false})}if(play||talk){console.log("挂断");_this3.removeBellRing();_this3.rejectionStatusDispose();if(typeof _this3.jSPlugin.hangUpCallback==="function"){_this3.jSPlugin.hangUpCallback("hangUp")}}};return btnItem;default:return btnItem}}},{key:"answerOvertime",value:function answerOvertime(){this.toastCustom.initToastContent("应答超时");var play=this.decoderState.state.play;console.log("应答超时");if(play){this.jSPlugin.stop()}this.setDecoderState({play:false,rejection:true});this.rejectionStatusDispose();this.switchFooter("onBell");if(typeof this.jSPlugin.hangUpCallback==="function"){this.jSPlugin.hangUpCallback("rejection")}}},{key:"rejectionStatusDispose",value:function rejectionStatusDispose(){var _this4=this;var footer=this.themeData.footer;var footerDom=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var footerDomCall=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));var headerRingStatusDom=document.getElementById("header-".concat(this.bellStatus,"-ringStatus"));if(this.bellStatus=="onBell"){footerDom.innerHTML="";footerDom.style.color="#ffffff"}else{footerDomCall.innerHTML="";footerDomCall.style.color="#ffffff"}console.log("rejectionStatusDispose");this.setDecoderState({rejection:true});footer[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this4.renderFooter(item.iconId,item)}});headerRingStatusDom.innerText="通话已结束";this.jSPlugin.pluginStatus.loadingClear();this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:false,type:2})}},{key:"userNoDevice",value:function userNoDevice(){var _this5=this;this.removeBellRing();this.setDecoderState({rejection:true});var footer=this.themeData.footer;var footerDom=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var footerDomCall=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));if(this.bellStatus=="onBell"){footerDom.innerHTML="";footerDom.style.color="#ffffff"}else{footerDomCall.innerHTML="";footerDomCall.style.color="#ffffff"}console.log("userNoDevice");this.setDecoderState({rejection:true});footer[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this5.renderFooter(item.iconId,item)}});this.jSPlugin.pluginStatus.loadingClear();this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:false,type:2})}},{key:"renderHeader",value:function renderHeader(id,item){var _this6=this;var sizeRatio=this.videoWidth/1024||1;var objItem=this.matchBtn(id,item);if(document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content"))){var childDOM=document.createElement("span");childDOM.innerHTML="".concat(objItem.domString);document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content")).appendChild(childDOM)}else{var objDOM=document.createElement("div");objDOM.id="".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus);objDOM.style="max-width:50%;position:relative;";objDOM.innerHTML='<span id="'.concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,'-content" style="display:inline-block;height:auto;padding-top: ').concat(32*sizeRatio,'px;";>\n        ').concat(objItem.domString,"\n      </span>");objDOM.onclick=function(e){if(_this6.decoderState.state.isEditing||!_this6.activeThemeStatus){return false}objItem.onclick(e)};document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(objDOM)}}},{key:"renderFooter",value:function renderFooter(id,item){var _this7=this;var mute=this.decoderState.state.mute;console.log("-------------renderFooter");if(id=="remoteUnlock"&&!!this.jSPlugin.capacity&&(!this.jSPlugin.capacity["support_unlock"]||this.jSPlugin.capacity["support_unlock"]==0)){return false}var objItem=this.matchBtn(id,item);var btnWidth=this.videoWidth/6;var objDOM=document.createElement("div");objDOM.className="theme-icon-item";if(!!this.jSPlugin.isWebConsole){objDOM.style="padding:0 ".concat(btnWidth*.1,"px;")}else{objDOM.style="padding:0 ".concat(btnWidth*.1,"px;cursor: pointer;")}objDOM.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-content" title="').concat(objItem.title,'" style="display: flex;align-items: center;position:relative;">')).concat(objItem.domString,"</div>")+"</span>";objDOM.onclick=function(e){if(_this7.decoderState.state.isEditing||!_this7.activeThemeStatus){return false}objItem.onclick(e)};if(objItem.onmouseenter){objDOM.onmouseenter=function(e){if(_this7.decoderState.state.isEditing||!_this7.activeThemeStatus){return false}objItem.onmouseenter(e)}}if(objItem.onmouseleave){objDOM.onmouseleave=function(e){if(_this7.decoderState.state.isEditing||!_this7.activeThemeStatus){return false}objItem.onmouseleave(e)}}var iconSizeScale=this.videoWidth/597;var toLeft=document.createElement("span");toLeft.className="icon-move left";toLeft.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-left" title="左移" style="display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ').concat(35*iconSizeScale,"px); width: ").concat(10*iconSizeScale,"px; height: ").concat(40*iconSizeScale,'px;cursor: pointer;">\n        <svg width="100%" height="100%" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n              <title></title>\n              <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                  <g id="H5呼叫模板" transform="translate(-614.000000, -5024.000000)">\n                      <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n                          <g id="编组-9" transform="translate(23.000000, 522.000000)">\n                              <g id="编组" transform="translate(170.000000, 0.000000)">\n                                  <g id="箭头左" transform="translate(0.000000, 18.000000)">\n                                      <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n                                      <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(1.000000, 15.000000)" fill="#FFFFFF">\n                                          <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </g>\n          </svg>\n        </span>');toLeft.onclick=function(){_this7.editIcon(objItem.id,"left","footer")};objDOM.appendChild(toLeft);var toRight=document.createElement("span");toRight.className="icon-move right";toRight.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-right" class="ezuikit-theme-icon" title="右移" style="display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ').concat(35*iconSizeScale,"px);left: ").concat(20*iconSizeScale+btnWidth*.5,"px; width: ").concat(10*iconSizeScale,"px; height: ").concat(40*iconSizeScale,'px;cursor: pointer;">\n        <svg width="100%" height="100%" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n              <title></title>\n              <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                  <g id="H5呼叫模板" transform="translate(-684.000000, -5024.000000)">\n                      <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n                          <g id="编组-9" transform="translate(23.000000, 522.000000)">\n                              <g id="编组" transform="translate(170.000000, 0.000000)">\n                                  <g id="箭头右" transform="translate(70.000000, 18.000000)">\n                                      <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n                                      <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(5.500000, 20.000000) scale(-1, 1) translate(-5.500000, -20.000000) translate(2.000000, 15.000000)" fill="#FFFFFF">\n                                          <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </g>\n          </svg>\n        </span>');toRight.onclick=function(){_this7.editIcon(objItem.id,"right","footer")};objDOM.appendChild(toRight);if(id=="answer"||id=="rejection"||id=="hangUp");else{var toClose=document.createElement("span");toClose.className="icon-move close";toClose.innerHTML='<span id="'.concat(objItem.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: ').concat(-15*iconSizeScale-1,"px;left: ").concat(20*iconSizeScale+btnWidth*.5-4.5*iconSizeScale,'px;cursor: pointer;">\n            <svg width="').concat(18*iconSizeScale,'" height="').concat(18*iconSizeScale,'" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                  <title></title>\n                  <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                      <g id="H5呼叫模板" transform="translate(-680.000000, -5006.000000)">\n                          <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n                              <g id="编组-9" transform="translate(23.000000, 522.000000)">\n                                  <g id="编组" transform="translate(170.000000, 0.000000)">\n                                      <g id="关闭1" transform="translate(66.000000, 0.000000)">\n                                          <rect id="矩形" fill-rule="nonzero" x="0" y="0" width="18" height="18"></rect>\n                                          <path d="M9,1.125 C4.65117188,1.125 1.125,4.65117188 1.125,9 C1.125,13.3488281 4.65117188,16.875 9,16.875 C13.3488281,16.875 16.875,13.3488281 16.875,9 C16.875,4.65117188 13.3488281,1.125 9,1.125 Z M11.9074219,11.9917969 L10.7472656,11.9865234 L9,9.90351562 L7.25449219,11.9847656 L6.09257813,11.9900391 C6.01523438,11.9900391 5.95195313,11.9285156 5.95195313,11.8494141 C5.95195313,11.8160156 5.96425781,11.784375 5.98535156,11.7580078 L8.27226563,9.03339844 L5.98535156,6.31054687 C5.96425781,6.28417969 5.95195313,6.25253906 5.95195313,6.21914062 C5.95195313,6.14179687 6.01523438,6.07851562 6.09257813,6.07851562 L7.25449219,6.08378906 L9,8.16679687 L10.7455078,6.08554688 L11.9056641,6.08027344 C11.9830078,6.08027344 12.0462891,6.14179687 12.0462891,6.22089844 C12.0462891,6.25429687 12.0339844,6.2859375 12.0128906,6.31230469 L9.72949219,9.03515625 L12.0146484,11.7597656 C12.0357422,11.7861328 12.0480469,11.8177734 12.0480469,11.8511719 C12.0480469,11.9285156 11.9847656,11.9917969 11.9074219,11.9917969 Z" id="形状" fill="#595959"></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </svg>\n          </span>');toClose.onclick=function(){_this7.editIcon(objItem.id,"delete","footer")};objDOM.appendChild(toClose)}if(this.bellStatus=="onCall"){document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).appendChild(objDOM)}else{document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).appendChild(objDOM)}if(this.decoderState.state.isEditing&&id=="mute"&&this.bellStatus=="onCall"){if(this.themeData.customConfig.defaultMicro==0&&!mute){this.setDecoderState({mute:true},item.backgroundColor)}else{this.setDecoderState({mute:false},item.backgroundColor)}}}},{key:"switchFooter",value:function switchFooter(type){var footer={};if(!!this.themeData){footer=this.themeData.footer}switch(type){case"onBell":if(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply")).style.display="none"}if(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"))){if(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display=="none"){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex"}}else{document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex"}break;case"onCall":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock")).style.display="none";document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none";document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display="flex";if(!!this.themeData){document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=footer[this.bellStatus].color}break;case"quickReply":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReply")).style.display="flex";document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none";break;case"remoteUnlock":document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display="none";document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none";document.getElementById("".concat(this.jSPlugin.id,"-audioControls-remoteUnlock")).style.display="flex";break}}},{key:"initThemeData",value:function initThemeData(){var _this8=this;console.log("-------------initThemeData");var isEditing=this.decoderState.state.isEditing;var _this$themeData3=this.themeData,header=_this$themeData3.header,footer=_this$themeData3.footer;var videoId=this.jSPlugin.id;var clientWidth=this.videoWidth;var ratioClient=clientWidth/1024;this.isNeedRenderHeader=_.findIndex(header[this.bellStatus].btnList,function(v){return v.isrender>0})>=0;this.isNeedRenderFooter=_.findIndex(footer[this.bellStatus].btnList,function(v){return v.isrender>0})>=0;if(this.isNeedRenderHeader){if(!document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){var headerContainer=document.createElement("div");headerContainer.setAttribute("id","".concat(this.jSPlugin.id,"-headControl"));headerContainer.setAttribute("class","header-controls");headerContainer.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex;width:calc(100% - 100px);overflow:hidden;padding-left: 3%;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' class=\"header-controls-right\" style='display:flex;'></div>");console.log(this.jSPlugin.height);var headerHeight=this.jSPlugin.height*.2+"px";var headerStyle={height:headerHeight,display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:"100%",position:"relative","margin-bottom":"-"+headerHeight,"align-items":"center",background:"transparent linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)"};headerContainer.style=styleToString$2(headerStyle);document.getElementById("".concat(videoId,"-wrap")).insertBefore(headerContainer,document.getElementById(videoId));var _checkTimer=setInterval(function(){if(window.EZUIKit[_this8.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(_checkTimer)}},50)}else{document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width: calc(100% - 100px);padding-left: 3%;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>")}}else{if(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))}}var footerHeight=this.jSPlugin.height*.3;if(this.isNeedRenderFooter){if(!document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){var footerContainer=document.createElement("div");footerContainer.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container"));footerContainer.setAttribute("class","ez-iframe-footer-container");var footerStyle={"min-height":footerHeight+"px","max-height":footerHeight+"px",position:"relative","margin-top":"-"+footerHeight+"px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%","align-items":"center","background-image":"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.60) 100%)","font-size":24*ratioClient+"px"};footerContainer.style=styleToString$2(footerStyle);footerContainer.innerHTML='\n            <div id="'.concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n            <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n            <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n            <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n            ');insertAfter(footerContainer,document.getElementById(videoId))}else{if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-".concat(footerHeight,"px");if(this.bellStatus=="onCall"){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n              <div id="'.concat(this.jSPlugin.id,'-audioControls"  class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 4%;width:100%;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n              ')}else{document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n              <div id="'.concat(this.jSPlugin.id,'-audioControls"  class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 4%;width:100%;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n              ')}}}}else{if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")))}}if(this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=header[this.bellStatus].backgroundColor;document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=header[this.bellStatus].color;header[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this8.renderHeader(item.iconId,item)}})}if(this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=footer[this.bellStatus].backgroundColor;document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=footer[this.bellStatus].color;footer[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this8.renderFooter(item.iconId,item)}})}if(this.themeData.customConfig.bellPoster==1&&!isEditing){this.jSPlugin.poster="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg";var checkTimer=setInterval(function(){if(window.EZUIKit[_this8.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);_this8.jSPlugin.setPoster(_this8.jSPlugin.poster)}},50)}if(this.activeThemeStatus){this.initBellRing();window.addEventListener("click",this.autoPlayRing)}this.inited=true;this.getCallDeviceInfo()}},{key:"renderThemeData",value:function renderThemeData(){var _this9=this;var isEditing=this.decoderState.state.isEditing;var _this$themeData4=this.themeData,header=_this$themeData4.header,footer=_this$themeData4.footer;if(this.isNeedRenderHeader&&header){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=header[this.bellStatus].backgroundColor.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=header[this.bellStatus].color.replace("-diy","");header[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this9.setDecoderState(_defineProperty({},item.iconId,_this9.decoderState.state[item.iconId]))}})}if(this.isNeedRenderFooter&&footer){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=footer[this.bellStatus].backgroundColor.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=footer[this.bellStatus].color.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=footer[this.bellStatus].color.replace("-diy","");footer[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this9.setDecoderState(_defineProperty({},item.iconId,_this9.decoderState.state[item.iconId]))}if(index==0&&!_this9.themeInited&&_this9.activeThemeStatus){var checkTimer=setInterval(function(){if(window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);if(_this9.themeData.customConfig.bellPoster==1&&!isEditing){_this9.jSPlugin.pluginStatus.loadingClear()}else{_this9.jSPlugin.play()}_this9.themeInited=true}},50)}});if(this.jSPlugin.url.indexOf("hd.live")!==-1){this.setDecoderState({hd:true})}if(this.themeData.autoFocus>0){this.autoFocus=parseInt(this.themeData.autoFocus);this.startAutoFocus();document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",function(){_this9.stopAutoFocus()})}this.setDecoderState({cloudRec:matchEzopenUrl(this.jSPlugin.url).type==="cloud.rec",rec:matchEzopenUrl(this.jSPlugin.url).type==="rec",type:matchEzopenUrl(this.jSPlugin.url).type})}else{if(!this.themeInited&&this.activeThemeStatus){var _checkTimer2=setInterval(function(){if(window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(_checkTimer2);if(_this9.themeData&&_this9.themeData.customConfig&&_this9.themeData.customConfig.bellPoster==1&&!isEditing){_this9.jSPlugin.pluginStatus.loadingClear()}else{_this9.jSPlugin.play()}_this9.themeInited=true}},50)}}var checkTimer=setInterval(function(){if(window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);_this9.jSPlugin.reSize(_this9.jSPlugin.params.width,_this9.jSPlugin.params.height)}},50)}},{key:"setThemeData",value:function setThemeData(options,bellStatus){this.themeData=options;if(bellStatus=="onCall"){this.bellStatus="onCall"}}},{key:"startAutoFocus",value:function startAutoFocus(){var _this10=this;var autoFocus=this.autoFocus;if(this.autoFocusTimer){clearTimeout(this.autoFocusTimer)}this.autoFocusTimer=setTimeout(function(){if(document.getElementById("".concat(_this10.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(_this10.jSPlugin.id,"-audioControls")).style.opacity=0;document.getElementById("".concat(_this10.jSPlugin.id,"-audioControls")).style.pointerEvents="none"}},autoFocus*1e3)}},{key:"stopAutoFocus",value:function stopAutoFocus(){if(document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.opacity=1;document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.pointerEvents="all"}if(this.autoFocusTimer){clearTimeout(this.autoFocusTimer)}this.startAutoFocus()}},{key:"editIcon",value:function editIcon(id,type,area){console.log("编辑组件",id,type,area);var newThemeData=this.themeData;console.log("themeData",this.themeData);var btnList=this.themeData[area][this.bellStatus].btnList;var _index=_.findIndex(btnList,function(item){return item.iconId===id});var tmp=btnList[_index];switch(type){case"delete":btnList[_index].isrender=0;break;case"right":var nextRightBtnIndex=-1;for(var i=_index+1;i<btnList.length;i++){if(btnList[i].part===btnList[_index].part&&btnList[i].isrender==1){nextRightBtnIndex=i;break}}if(nextRightBtnIndex!==-1){btnList[_index]=btnList[nextRightBtnIndex];btnList[nextRightBtnIndex]=tmp}break;case"left":var nextLeftBtnIndex=-1;for(var _i=_index-1;_i>=0;_i--){if(btnList[_i].part===btnList[_index].part&&btnList[_i].isrender==1){nextLeftBtnIndex=_i;break}}if(nextLeftBtnIndex!==-1){btnList[_index]=btnList[nextLeftBtnIndex];btnList[nextLeftBtnIndex]=tmp}break}console.log("new btnList",btnList);newThemeData[area][this.bellStatus].btnList=btnList;this.jSPlugin.Theme.changeTheme(newThemeData)}},{key:"countTime",value:function countTime(type){var start=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var that=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var recordDOM=document.createElement("div");recordDOM.id=this.jSPlugin.id+"time-area";recordDOM.className="time-area";recordDOM.innerHTML='<span class="dot"></span><span class="value">00:00</span>';if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(recordDOM)}}if(this.countTimer){clearInterval(this.countTimer)}if(type==="add"){var i=start;document.getElementById(that.jSPlugin.id+"time-area").style.display="flex";this.countTimer=setInterval(function(){++i;document.getElementById(that.jSPlugin.id+"time-area").children[1].innerHTML=formatSeconds(i)},1e3)}else if(type==="destroy"){if(this.countTimer){clearInterval(this.countTimer)}this.countTimer=undefined;if(document.getElementById(that.jSPlugin.id+"time-area")){document.getElementById(that.jSPlugin.id+"time-area").children[1].innerHTML="00:00";document.getElementById(that.jSPlugin.id+"time-area").style.display="none"}}function formatSeconds(value){var theTime=parseInt(value);var middle=0;var hour=0;var secondV="00";var minV="00";var hourV="00";if(theTime>59){middle=parseInt(theTime/60);theTime=parseInt(theTime%60);if(middle>59){hour=parseInt(middle/60);middle=parseInt(middle%60)}}secondV=parseInt(theTime)>9?parseInt(theTime):"0"+parseInt(theTime);minV=parseInt(middle)>9?parseInt(middle):"0"+parseInt(middle);hourV=parseInt(hour)>9?parseInt(hour):"0"+parseInt(hour);if(hour>0){return hourV+":"+minV+":"+secondV}else if(middle>0){return minV+":"+secondV}else{return"00:"+secondV}}}},{key:"editStart",value:function editStart(callback){console.log("----------editStart2");var audioControlsDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var audioControlsOnCallDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));document.getElementById("".concat(this.jSPlugin.id,"-headControl"));if(audioControlsDOM){audioControlsDOM.setAttribute("class","footer-controls themeEditing")}if(audioControlsOnCallDOM){audioControlsOnCallDOM.setAttribute("class","footer-controls themeEditing")}this.setDecoderState({isEditing:true})}},{key:"editEnd",value:function editEnd(callback){console.log("----------editEnd2");var audioControlsDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var headerMessageDOM=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));var audioControlsOnCallDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));if(headerMessageDOM){headerMessageDOM.setAttribute("class","header-controls")}if(audioControlsDOM){audioControlsDOM.setAttribute("class","footer-controls")}if(audioControlsOnCallDOM){audioControlsOnCallDOM.setAttribute("class","footer-controls")}}},{key:"fetchThemeData",value:function fetchThemeData(themeId){var _this11=this;var successCallback=function successCallback(data){if(data.meta.code==0&&data.data){_this11.activeThemeStatus=true;_this11.themeData=data.data;if(data.data.header){_this11.themeData.header=data.data.header;_this11.themeData.header[_this11.bellStatus].btnList=_this11.themeData.header[_this11.bellStatus].btnList.sort(function(a,b){return a.btnKey.split("-")[3]-b.btnKey.split("-")[3]})}if(data.data.footer){_this11.themeData.footer=data.data.footer;_this11.themeData.footer[_this11.bellStatus].btnList=_this11.themeData.footer[_this11.bellStatus].btnList.sort(function(a,b){return a.btnKey.split("-")[3]-b.btnKey.split("-")[3]})}if(!_this11.jSPlugin.capacity){setTimeout(function(){_this11.initThemeData();_this11.renderThemeData()},300)}else{_this11.initThemeData();_this11.renderThemeData()}}else{_this11.activeThemeStatus=false;_this11.jSPlugin.pluginStatus.loadingClear();_this11.setDecoderState({rejection:true});if(data.meta.code=="111021"){_this11.jSPlugin.pluginStatus.loadingSetText({text:"无效的模板id",color:"#fff"});_this11.activeThemeStatusTxt="无效的模板id"}else if(data.meta.code=="111023"){_this11.jSPlugin.pluginStatus.loadingSetText({text:"您的试用特权已到期,需前往轻应用控制台购买后使用。",color:"#fff"});_this11.activeThemeStatusTxt="试用特权已到期"}else{_this11.jSPlugin.pluginStatus.loadingSetText({text:"模板未激活,请先在开放平台轻应用控制台购买模板",color:"#fff"});_this11.activeThemeStatusTxt="模板未激活"}_this11.themeData=webCallData.data;_this11.initThemeData();_this11.renderThemeData()}};var errorCallback=function errorCallback(){_this11.renderThemeData()};templateDetailApi(this.jSPlugin,themeId,successCallback,errorCallback)}},{key:"getCallDeviceInfo",value:function getCallDeviceInfo(){var _this12=this;this.videoWidth/1024||1;var that=this;var deviceAPISuccess=function deviceAPISuccess(data){if(data.code==200&&data.data){console.log("---------getCallDeviceInfo");_this12.deviceInfoData=data.data;if(data.data.isEncrypt){setTimeout(function(){console.log("---------------------视频已加密");that.jSPlugin.pluginStatus&&that.jSPlugin.pluginStatus.loadingClear();that.jSPlugin.pluginStatus.loadingSetText({text:"视频已加密",color:"#fff"})},50)}if(document.getElementById("header-".concat(_this12.bellStatus,"-deviceCategory"))){document.getElementById("header-".concat(_this12.bellStatus,"-deviceCategory")).innerText=""+data.data.deviceName}}if(data.code==20018&&!_this12.jSPlugin.isWebConsole){_this12.userNoDevice()}};request(this.jSPlugin.env.domain+"/api/lapp/device/info","POST",{accessToken:this.jSPlugin.accessToken,deviceSerial:matchEzopenUrl(this.jSPlugin.url).deviceSerial},"",deviceAPISuccess)}},{key:"setHeaderText",value:function setHeaderText(headerText){var sizeRatio=this.videoWidth/1024||1;if(document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content"))){document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content")).innerHTML='<span style="font-size: '.concat(32*sizeRatio,'px;display: block">').concat(headerText,'</span><span style="font-size: ').concat(24*sizeRatio,"px;padding-top: ").concat(16*sizeRatio,'px;display: block;">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"","</span>")}}}]);return Call}();var PopupCustom=function(){function PopupCustom(jSPlugin,heightPop){_classCallCheck$1(this,PopupCustom);this.jSPlugin=jSPlugin;this.heightPop=heightPop||366;this.initPopupCustom()}_createClass$1(PopupCustom,[{key:"initPopupCustom",value:function initPopupCustom(){if(!document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom"))){this.randerPopup()}else{document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom")).style.display="flex"}}},{key:"randerPopup",value:function randerPopup(){var _this=this;var clientWidth=document.documentElement.clientWidth;var ratioClient=clientWidth/375||1;var oS=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(oS);oS.innerHTML="@keyframes slideContentUp {0%   {bottom: -".concat(366*ratioClient,"px;}\n        25%  {bottom: -").concat(244*ratioClient,"px;}\n        50%  {bottom: -").concat(122*ratioClient,"px;}\n        100% {bottom:0;}} .open-popup{animation:slideContentUp 0.3s 1 linear; -webkit-animation: slideContentUp 0.3s 1 linear;}");var wrapVideo=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));var objDOM=document.createElement("div");objDOM.style="display:flex;";objDOM.id="".concat(this.jSPlugin.id,"-wrap-popup-custom");objDOM.innerHTML='<div id="'.concat(this.jSPlugin.id,'-wrap-popup-custom-mask" style="height:100%;width:100%;position:fixed;top:0;left:0;z-index:9998;background-color: rgba(0,0,0,0.75);overflow:hidden;">\n        </div>\n        <div id="').concat(this.jSPlugin.id,'-wrap-popup-board" class="open-popup" style="bottom:0;height: ').concat(this.heightPop*ratioClient,'px;position:fixed;left: 0; width: 100%;background-color:#ffffff;z-index: 9999;border-radius: 16px 16px 0px 0px;">\n            <div style="margin-top: ').concat(20*ratioClient,"px;padding: 0 ").concat(15*ratioClient,'px;width: 100%;display:flex;flex-direction: row;align-items: center;">\n                <div id="').concat(this.jSPlugin.id,'-popup-board-close">\n                    <svg width="').concat(24*ratioClient,'px" height="').concat(24*ratioClient,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>icon/close</title>\n                        <g id="icon/close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <g id="common/Close/Dark">\n                                <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n                                <path d="M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z" id="形状结合" fill="#2C2C2C" fill-rule="nonzero"></path>\n                            </g>\n                        </g>\n                    </svg>\n                </div>\n                <div id="popup-board-title-content" style="width: ').concat(180*ratioClient,"px;font-size: ").concat(18*ratioClient,"px;margin-left: ").concat(59*ratioClient,'px;font-family: PingFangSC-Medium;color: #2C2C2C;font-weight: 500;text-align: center;"></div>\n            </div>\n            <div id="').concat(this.jSPlugin.id,'-popup-board-content" style="width:100%;padding: 0 ').concat(15*ratioClient,"px;height: ").concat((this.heightPop-48)*ratioClient,'px;box-sizing: border-box;display: flex;align-items: center;justify-content: center;flex-direction: column;"></div>\n        </div>\n        ');wrapVideo.appendChild(objDOM);document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom-mask")).onclick=function(){_this.closePopupCustom()};document.getElementById("".concat(this.jSPlugin.id,"-popup-board-close")).onclick=function(){_this.closePopupCustom()}}},{key:"closePopupCustom",value:function closePopupCustom(){var callBack=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(){};callBack();var domWrap=document.getElementById("".concat(this.jSPlugin.id,"-wrap"));var domPop=document.getElementById("".concat(this.jSPlugin.id,"-wrap-popup-custom"));if(domWrap&&domPop){domWrap.removeChild(domPop)}}},{key:"initPopupContent",value:function initPopupContent(title,dom){document.getElementById("popup-board-title-content").innerText=title||"";if(dom){document.getElementById("".concat(this.jSPlugin.id,"-popup-board-content")).appendChild(dom)}}}]);return PopupCustom}();var MobileQuickReplyEle=function(){function MobileQuickReplyEle(jSPlugin,switchFooter,videoWidth){_classCallCheck$1(this,MobileQuickReplyEle);this.jSPlugin=jSPlugin;this.videoWidth=videoWidth;this.switchFooter=switchFooter;this.toastCustom=new ToastCustom(jSPlugin,true);this.sendLoadingStats=false;this.quickReplyList=["你好,请将快递放在门口","你好,稍等","你好,请将快递放入小区快递柜","你好,请将外卖放在门口"];this.popupCustom=new PopupCustom(jSPlugin,366);if(!document.getElementById("mobile-quickReply-list")){this.popupCustom.initPopupContent("快捷回复",this.renderQuickReply());this.initQuickReply()}}_createClass$1(MobileQuickReplyEle,[{key:"initQuickReply",value:function initQuickReply(){if(!document.getElementById("mobile-quickReply-list-item-0")){this.getQuickReplyList()}}},{key:"renderQuickReply",value:function renderQuickReply(){document.documentElement.clientWidth;var objDOM=document.createElement("div");objDOM.style="width:100%;";objDOM.id="mobile-quickReply-list";objDOM.innerHTML='<div id="mobile-quickReply-content" style="display: block;width:100%;margin-bottom: 36px;"></div>\n    <div id="mobile-quickReply-loading" style="display: none;width:100%;"></div>\n    <div id="mobile-quickReply-loaderror" style="display: none;width:100%;"></div>';return objDOM}},{key:"matchQuickReplyBtn",value:function matchQuickReplyBtn(){var _this=this;var sizeRatio=this.videoWidth/375||1;var contentDom=document.getElementById("mobile-quickReply-content");if(this.quickReplyList&&this.quickReplyList.length>0){this.quickReplyList.forEach(function(item,index){var objDOM=document.createElement("div");objDOM.id="mobile-quickReply-list-item-".concat(index);objDOM.style="margin: ".concat(14*sizeRatio,"px 0;\n            padding: ").concat(12*sizeRatio,"px ").concat(15*sizeRatio,"px;min-height: ").concat(50*sizeRatio,"px;width:100%;\n            background: #ffffff;border-radius: ").concat(25*sizeRatio,"px;display: flex;align-items: center;\n            box-sizing: border-box;font-size:").concat(16*sizeRatio,"px;color: #2c2c2c;");objDOM.innerHTML='\n            <svg id="mobile-quickReply-icon-'.concat(index,'" width="').concat(24*sizeRatio,'px" height="').concat(24*sizeRatio,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                    <title>icon/快捷回复播放</title>\n                    <g id="icon/快捷回复播放" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                        <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n                        <path d="M18.9877488,4.36609064 C21.024173,6.11256041 22.2495,8.93566941 22.2495,12.0024 C22.2495,15.066006 21.0272636,17.8857191 18.9943957,19.6331539 C18.6802816,19.9031635 18.2067557,19.8674098 17.9367461,19.5532957 C17.6667365,19.2391816 17.7024902,18.7656557 18.0166043,18.4956461 C19.708691,17.0411437 20.7495,14.6399857 20.7495,12.0024 C20.7495,9.36223947 19.7060688,6.95821183 18.0112512,5.50470936 C17.6968304,5.23505702 17.6605383,4.76157212 17.9301906,4.44715124 C18.199843,4.13273036 18.6733279,4.09643829 18.9877488,4.36609064 Z M12.2442357,5.87579772 L12.2496,6.0179 L12.2496,17.9819 C12.2496,19.4241617 10.6173522,20.2281184 9.48072691,19.4058312 L9.36879527,19.318145 L5.5996,16.1243865 L3.4996,16.1249 C2.581479,16.1249 1.8284129,15.4182283 1.75540159,14.518493 L1.7496,14.3749 L1.7496,9.6249 C1.7496,8.70699712 2.45696726,7.95373471 3.35611134,7.88070323 L3.4996,7.8749 L5.5996,7.8743865 L9.36863059,4.68279453 C10.4692948,3.74976994 12.1377395,4.4768074 12.2442357,5.87579772 Z M10.3952894,5.79039368 L10.338321,5.82721597 L6.35932099,9.19721597 C6.33078024,9.2209397 6.30781291,9.23786997 6.28390041,9.25347262 L6.35932099,9.19721597 C6.32908972,9.22282023 6.29742069,9.24561685 6.26463127,9.26563212 C6.24087088,9.28012218 6.21634729,9.29327785 6.19105714,9.30506452 C6.18413632,9.30829747 6.1773583,9.31133066 6.1705483,9.31425704 C6.10964585,9.34044144 6.04445985,9.35881628 5.97637056,9.36805338 C5.95756973,9.37054904 5.94148484,9.37214804 5.92538001,9.37322799 L5.8746,9.3749 L3.4996,9.3749 C3.38149734,9.3749 3.28218291,9.45734262 3.25621762,9.56766695 L3.2496,9.6249 L3.2496,14.3749 C3.2496,14.4934644 3.33170357,14.592449 3.44222164,14.6183106 L3.4996,14.6249 L5.8746,14.6249 L5.92192315,14.6263483 C5.93923255,14.627429 5.95652113,14.629109 5.97375563,14.6313909 L5.8746,14.6249 C5.9789469,14.6249 6.0783167,14.6462095 6.168595,14.6847142 C6.18010037,14.6895946 6.19235048,14.695194 6.2044823,14.7011451 C6.22547728,14.7114805 6.24528995,14.7223727 6.26453263,14.7341072 C6.266314,14.735195 6.26795143,14.7362034 6.26958602,14.7372187 L6.28086895,14.7443598 C6.30587317,14.7605037 6.32985559,14.7780945 6.3526978,14.7970136 L6.35940473,14.802655 L10.3380567,18.1733603 C10.4825575,18.2956302 10.695338,18.2179271 10.7408386,18.0492187 L10.7496,17.9819 L10.7496,6.0179 C10.7496,5.82820058 10.5532313,5.71607381 10.3952894,5.79039368 Z M15.9361636,7.38657032 C17.3580982,8.28109203 18.2498,10.0509458 18.2498,12.0044 C18.2498,13.9607796 17.3563865,15.7307985 15.9326223,16.6154437 C15.5807928,16.8340503 15.1183629,16.7260519 14.8997563,16.3742223 C14.6811497,16.0223928 14.7891481,15.5599629 15.1409777,15.3413563 C16.1036696,14.7431949 16.7498,13.4630899 16.7498,12.0044 C16.7498,10.5466827 16.103548,9.26399865 15.1374364,8.65622968 C14.7868297,8.43566726 14.6814079,7.97264316 14.9019703,7.62203641 C15.1225327,7.27142966 15.5855568,7.1660079 15.9361636,7.38657032 Z" id="形状结合" fill="#2C2C2C" fill-rule="nonzero"></path>\n                    </g>\n                </svg>\n            <span id="mobile-quickReply-name-').concat(index,'" style="padding-left: 5px;">').concat(item.voiceName,"</span>");objDOM.onclick=function(){console.log("item:"+item);if(!_this.sendLoadingStats){_this.setBtnCheckStatus(index);_this.sendQuickReply(item)}};contentDom.appendChild(objDOM)})}}},{key:"setBtnCheckStatus",value:function setBtnCheckStatus(checked){var _this2=this;var domItem="";this.quickReplyList.forEach(function(item,index){domItem=document.getElementById("mobile-quickReply-list-item-".concat(index));if(index==checked){domItem.style.background="#F4F6FC";domItem.style.color="#648FFC";_this2.setBtnCheckLoding(0,index)}else{domItem.style.background="#ffffff";domItem.style.color="#2c2c2c"}})}},{key:"setBtnCheckLoding",value:function setBtnCheckLoding(status,index){console.log(index);var sizeRatio=this.videoWidth/375||1;if(index>-1){var domItem=document.getElementById("mobile-quickReply-list-item-".concat(index));var domItemName=document.getElementById("mobile-quickReply-name-".concat(index));var domItemIcon=document.getElementById("mobile-quickReply-icon-".concat(index));if(status==1){var domItemIconLoading=document.getElementById("mobile-quickReply-icon-loading-".concat(index));if(!!domItemIconLoading&&!!domItemName){var objDOM=document.createElement("span");objDOM.id="mobile-quickReply-icon-".concat(index);objDOM.style="height:".concat(24*sizeRatio,"px;");objDOM.innerHTML='\n                <svg width="'.concat(24*sizeRatio,'px" height="').concat(24*sizeRatio,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                    <title>icon/快捷回复播放</title>\n                    <g id="icon/快捷回复播放" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                        <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n                        <path d="M18.9877488,4.36609064 C21.024173,6.11256041 22.2495,8.93566941 22.2495,12.0024 C22.2495,15.066006 21.0272636,17.8857191 18.9943957,19.6331539 C18.6802816,19.9031635 18.2067557,19.8674098 17.9367461,19.5532957 C17.6667365,19.2391816 17.7024902,18.7656557 18.0166043,18.4956461 C19.708691,17.0411437 20.7495,14.6399857 20.7495,12.0024 C20.7495,9.36223947 19.7060688,6.95821183 18.0112512,5.50470936 C17.6968304,5.23505702 17.6605383,4.76157212 17.9301906,4.44715124 C18.199843,4.13273036 18.6733279,4.09643829 18.9877488,4.36609064 Z M12.2442357,5.87579772 L12.2496,6.0179 L12.2496,17.9819 C12.2496,19.4241617 10.6173522,20.2281184 9.48072691,19.4058312 L9.36879527,19.318145 L5.5996,16.1243865 L3.4996,16.1249 C2.581479,16.1249 1.8284129,15.4182283 1.75540159,14.518493 L1.7496,14.3749 L1.7496,9.6249 C1.7496,8.70699712 2.45696726,7.95373471 3.35611134,7.88070323 L3.4996,7.8749 L5.5996,7.8743865 L9.36863059,4.68279453 C10.4692948,3.74976994 12.1377395,4.4768074 12.2442357,5.87579772 Z M10.3952894,5.79039368 L10.338321,5.82721597 L6.35932099,9.19721597 C6.33078024,9.2209397 6.30781291,9.23786997 6.28390041,9.25347262 L6.35932099,9.19721597 C6.32908972,9.22282023 6.29742069,9.24561685 6.26463127,9.26563212 C6.24087088,9.28012218 6.21634729,9.29327785 6.19105714,9.30506452 C6.18413632,9.30829747 6.1773583,9.31133066 6.1705483,9.31425704 C6.10964585,9.34044144 6.04445985,9.35881628 5.97637056,9.36805338 C5.95756973,9.37054904 5.94148484,9.37214804 5.92538001,9.37322799 L5.8746,9.3749 L3.4996,9.3749 C3.38149734,9.3749 3.28218291,9.45734262 3.25621762,9.56766695 L3.2496,9.6249 L3.2496,14.3749 C3.2496,14.4934644 3.33170357,14.592449 3.44222164,14.6183106 L3.4996,14.6249 L5.8746,14.6249 L5.92192315,14.6263483 C5.93923255,14.627429 5.95652113,14.629109 5.97375563,14.6313909 L5.8746,14.6249 C5.9789469,14.6249 6.0783167,14.6462095 6.168595,14.6847142 C6.18010037,14.6895946 6.19235048,14.695194 6.2044823,14.7011451 C6.22547728,14.7114805 6.24528995,14.7223727 6.26453263,14.7341072 C6.266314,14.735195 6.26795143,14.7362034 6.26958602,14.7372187 L6.28086895,14.7443598 C6.30587317,14.7605037 6.32985559,14.7780945 6.3526978,14.7970136 L6.35940473,14.802655 L10.3380567,18.1733603 C10.4825575,18.2956302 10.695338,18.2179271 10.7408386,18.0492187 L10.7496,17.9819 L10.7496,6.0179 C10.7496,5.82820058 10.5532313,5.71607381 10.3952894,5.79039368 Z M15.9361636,7.38657032 C17.3580982,8.28109203 18.2498,10.0509458 18.2498,12.0044 C18.2498,13.9607796 17.3563865,15.7307985 15.9326223,16.6154437 C15.5807928,16.8340503 15.1183629,16.7260519 14.8997563,16.3742223 C14.6811497,16.0223928 14.7891481,15.5599629 15.1409777,15.3413563 C16.1036696,14.7431949 16.7498,13.4630899 16.7498,12.0044 C16.7498,10.5466827 16.103548,9.26399865 15.1374364,8.65622968 C14.7868297,8.43566726 14.6814079,7.97264316 14.9019703,7.62203641 C15.1225327,7.27142966 15.5855568,7.1660079 15.9361636,7.38657032 Z" id="形状结合" fill="#2C2C2C" fill-rule="nonzero"></path>\n                    </g>\n                </svg>\n                ');domItem.insertBefore(objDOM,domItemName)}}else{if(!!domItemIcon&&!!domItemName){domItem.removeChild(domItemIcon);var _objDOM=document.createElement("span");_objDOM.id="mobile-quickReply-icon-loading-".concat(index);_objDOM.style="height:".concat(20*sizeRatio,"px;width: ").concat(24*sizeRatio,"px;");_objDOM.innerHTML='<svg width="'.concat(20*sizeRatio,'" height="').concat(20*sizeRatio,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#666666" p-id="2400"></path></svg>');domItem.insertBefore(_objDOM,domItemName)}}}}},{key:"getQuickReplyList",value:function getQuickReplyList(){var _this3=this;console.log("getQuickReplyList");this.madeLoadingDom(0);var successCallback=function successCallback(data){if(data&&data.code==200){var quickReplyListTmd=data.data||[];var itemArr=[];data.data.forEach(function(item,index){itemArr=item.voiceName.split("_");quickReplyListTmd[index].voiceName=itemArr[1]});_this3.quickReplyList=quickReplyListTmd;setTimeout(function(){_this3.madeLoadingDom(2)},500)}else{_this3.madeLoadingDom(1)}};var errorCallback=function errorCallback(err){console.log(err);_this3.madeLoadingDom(1)};voiceQuery(this.jSPlugin,successCallback,errorCallback)}},{key:"madeLoadingDom",value:function madeLoadingDom(status){var _this4=this;var sizeRatio=this.videoWidth/375||1;if(status==0){document.getElementById("mobile-quickReply-content").style.display="none";document.getElementById("mobile-quickReply-loaderror").style.display="none";document.getElementById("mobile-quickReply-loading").style.display="block";if(!document.getElementById("mobile-quickReply-loading-box")){var objDOM=document.createElement("div");objDOM.id="mobile-quickReply-loading-box";objDOM.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: row;";objDOM.innerHTML='<div class="" style="heigth:'.concat(20*sizeRatio,'px">\n                <svg width="').concat(20*sizeRatio,'" height="').concat(20*sizeRatio,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#666666" p-id="2400"></path></svg>   \n            </div>\n            <div style="font-size: ').concat(16*sizeRatio,"px;margin-left:",10,'px;color:#666666;">正在加载,请稍候</div>');document.getElementById("mobile-quickReply-loading").appendChild(objDOM)}}else if(status==1){document.getElementById("mobile-quickReply-content").style.display="none";document.getElementById("mobile-quickReply-loading").style.display="none";document.getElementById("mobile-quickReply-loaderror").style.display="block";if(!document.getElementById("mobile-quickReply-loaderror-box")){var _objDOM2=document.createElement("div");_objDOM2.id="mobile-quickReply-loaderror-box";_objDOM2.style="width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;";_objDOM2.innerHTML='<div style="">\n                <img style="width:'.concat(186*sizeRatio,"px;height:").concat(120*sizeRatio,'px;" src="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPZ34KAAStrAAA0pZ5cGTw167.png" />\n            </div>\n            <div style="font-size: ').concat(16*sizeRatio,'px;color: #666666;">\n                <span>加载失败 </span>\n                <span id="mobile-quickReply-loaderror-reload" \n                style="color: #648FFC;-webkit-tap-highlight-color: transparent;">点击重试</span>\n            </div>');document.getElementById("mobile-quickReply-loaderror").appendChild(_objDOM2);document.getElementById("mobile-quickReply-loaderror-reload").onclick=function(){_this4.getQuickReplyList()}}}else{document.getElementById("mobile-quickReply-loading").style.display="none";document.getElementById("mobile-quickReply-loaderror").style.display="none";document.getElementById("mobile-quickReply-content").style.display="block";this.matchQuickReplyBtn()}}},{key:"sendQuickReply",value:function sendQuickReply(data){var _this5=this;this.sendLoadingStats=true;var successCallback=function successCallback(data){_this5.sendLoadingStats=false;if(data&&data.code==200){_this5.toastCustom.initToastContent("快捷回复成功")}else{_this5.toastCustom.initToastContent("快捷回复失败,请重试")}_this5.popupCustom.closePopupCustom()};var errorCallback=function errorCallback(err){console.log(err);_this5.sendLoadingStats=false;_this5.toastCustom.initToastContent("快捷回复失败,请重试");_this5.popupCustom.closePopupCustom()};voiceSend(this.jSPlugin,data.fileUrl,successCallback,errorCallback)}},{key:"closeQuickReplyEle",value:function closeQuickReplyEle(){this.popupCustom.closePopupCustom()}}]);return MobileQuickReplyEle}();var MobileRemoteUnlockEle=function(){function MobileRemoteUnlockEle(jSPlugin,switchFooter,videoWidth){_classCallCheck$1(this,MobileRemoteUnlockEle);this.jSPlugin=jSPlugin;this.videoWidth=videoWidth;this.switchFooter=switchFooter;this.toastCustom=new ToastCustom(jSPlugin,true);this.lockStatus=false;this.popupCustom=new PopupCustom(jSPlugin,265);this.popupCustom.initPopupContent("远程开锁",this.renderRemoteUnlock());this.renderRemoteUnlockSlide()}_createClass$1(MobileRemoteUnlockEle,[{key:"initRemoteUnlock",value:function initRemoteUnlock(){if(!document.getElementById("mobile-remoteUnlock-content")){this.renderRemoteUnlock()}else{this.madeSlideEvent()}}},{key:"renderRemoteUnlock",value:function renderRemoteUnlock(){var sizeRatio=this.videoWidth/1024||1;var objDOM=document.createElement("div");objDOM.style="width:100%;";objDOM.id="mobile-remoteUnlock-box";objDOM.innerHTML='<div style="width:100%;display:flex;flex-direction:row;align-items: center;">\n        <div id="mobile-remoteUnlock-content" style="display: block;width:calc(100% - '.concat(160*sizeRatio,"px);margin: 0 ").concat(24*sizeRatio,'px;"></div>\n    </div>');return objDOM}},{key:"renderRemoteUnlockSlide",value:function renderRemoteUnlockSlide(){var sizeRatio=this.videoWidth/375||1;var contentDom=document.getElementById("mobile-remoteUnlock-content");var objDOM=document.createElement("div");objDOM.id="mobile-remoteUnlock-content-slide";objDOM.style="width: 100%;display: flex;justify-content: center;padding: 0 ".concat(15*sizeRatio,"px");objDOM.innerHTML='<div id="mobile-remoteUnlock-slide-box" style="width: 100%;line-height: '.concat(60*sizeRatio,"px;height: ").concat(60*sizeRatio,"px;border: 1px solid rgba(100,143,252,1);border-radius: ").concat(30*sizeRatio,'px;position: relative;text-align: center;">\n        <div id="mobile-remoteUnlock-slide-bgColor" style="border-radius: ').concat(30*sizeRatio,"px;width: ").concat(44*sizeRatio,"px;height: ").concat(60*sizeRatio,'px;position: absolute;left: 0;top: 0;"></div>\n        <div id="mobile-remoteUnlock-slide-tips" style="height: ').concat(60*sizeRatio,"px;line-height: ").concat(60*sizeRatio,"px;font-size: ").concat(14*sizeRatio,"px;border-radius: ").concat(30*sizeRatio,'px;position: absolute;text-align: center;user-select: none;color: #666666;width: 100%;">右滑开锁</div>\n        <div id="mobile-remoteUnlock-slide-ball" style="top: ').concat(8*sizeRatio,"px;left: ").concat(8*sizeRatio,"px;width: ").concat(44*sizeRatio,"px;height: ").concat(44*sizeRatio,'px;background: #598FFF;position: absolute;text-align: center;border-radius:50%;display:flex;align-items: center;justify-content: center;">\n            <svg id="slide-ball-start" style="display: inline;" width="').concat(24*sizeRatio,'px" height="').concat(24*sizeRatio,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                <title>icon/箭头向右</title>\n                <g id="icon/箭头向右" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                    <rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="0" y="0" width="24" height="24"></rect>\n                    <path d="M14.2841136,6.3689007 L19.9432338,12.0287579 L14.2863796,17.6856122 L12.8580239,16.2572565 L16.114,12.9999007 L4.00000001,13 L4.00000001,11 L16.058,10.9999007 L12.8557579,7.79725638 L14.2841136,6.3689007 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                </g>\n            </svg>\n            <svg id="slide-ball-end" style="display: none;" width="').concat(20*sizeRatio,'" height="').concat(20*sizeRatio,'" t="1567069979438" class="loading" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#648ffc" p-id="2400"></path></svg>\n        </div>\n    </div>');contentDom.appendChild(objDOM);this.madeSlideEvent()}},{key:"madeSlideEvent",value:function madeSlideEvent(){var sizeRatio=this.videoWidth/375||1;var box=document.getElementById("mobile-remoteUnlock-slide-box");var bgColor=document.getElementById("mobile-remoteUnlock-slide-bgColor");var tips=document.getElementById("mobile-remoteUnlock-slide-tips");var ball=document.getElementById("mobile-remoteUnlock-slide-ball");var that=this;function success(){that.lockStatus=true;document.getElementById("slide-ball-start").style.display="none";document.getElementById("slide-ball-end").style.display="inline";bgColor.style.width=box.clientWidth+"px";bgColor.style.backgroundColor="#598FFF";box.style.border="0";ball.style.backgroundColor="#ffffff";tips.textContent="正在开锁";tips.style.color="#ffffff";ball.ontouchstart=null;that.sendRemoteUnlockApi()}ball.ontouchstart=function(e){console.log("ontouchstart");var e=e||window.event;var posx=e.touches[0].pageX;ball.style.transition="";bgColor.style.transition="";document.ontouchmove=function(e){var e=e||window.event;var x=e.touches[0].pageX-box.offsetLeft-posx;var max=box.clientWidth-ball.clientWidth-8*sizeRatio;if(x<=0){x=0}if(x>=max){x=max}ball.style.left=x+"px";if(x==max&&!that.lockStatus){success()}};document.ontouchend=function(){if(!that.lockStatus){bgColor.style.width=0+"px";ball.style.left=8*sizeRatio+"px";ball.style.transition="left 0.6s linear";bgColor.style.transition="width 0.6s linear"}document.ontouchend=null;document.ontouchmove=null}}}},{key:"resetRemoteUnlockSlide",value:function resetRemoteUnlockSlide(){var sizeRatio=this.videoWidth/1024||1;this.lockStatus=false;var box=document.getElementById("mobile-remoteUnlock-slide-box");var bgColor=document.getElementById("mobile-remoteUnlock-slide-bgColor");var tips=document.getElementById("mobile-remoteUnlock-slide-tips");var ball=document.getElementById("mobile-remoteUnlock-slide-ball");bgColor.style.width=0+"px";ball.style.left=8*sizeRatio+"px";tips.textContent="右滑开锁";tips.style.color="#666666";document.getElementById("slide-ball-start").style.display="inline";document.getElementById("slide-ball-end").style.display="none";bgColor.style.backgroundColor="#FFFFFF";box.style.border="1px solid rgba(255,255,255,1)";ball.style.backgroundColor="#598FFF"}},{key:"sendRemoteUnlockApi",value:function sendRemoteUnlockApi(){var _this=this;console.log("下发远程开锁");var successCallback=function successCallback(data){if(data&&data.code==200){_this.toastCustom.initToastContent("开锁成功")}else{_this.toastCustom.initToastContent("开锁失败,请重试")}_this.popupCustom.closePopupCustom()};var errorCallback=function errorCallback(err){console.log(err);_this.toastCustom.initToastContent("开锁失败,请重试");_this.popupCustom.closePopupCustom()};remoteDoor(this.jSPlugin,successCallback,errorCallback)}},{key:"closeRemoteUnlock",value:function closeRemoteUnlock(){this.popupCustom.closePopupCustom()}}]);return MobileRemoteUnlockEle}();var data$1={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0},header:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",activeColor:"#1890FF",autoFocus:0,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"ringStatus",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",iconId:"callStatus",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",iconId:"deviceCategory",part:"left",defaultActive:0,isrender:1,color:"#2c2c2c",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793"}]}},footer:{onBell:{color:"#2c2c2c",backgroundColor:"#00000000",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"quickReply",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"rejection",part:"left",defaultActive:0,isrender:1,color:"#2C2C2C",themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"answer",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]},onCall:{color:"#2c2c2c",backgroundColor:"#00000080",activeColor:"#1890FF",autoFocus:5,btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",iconId:"mute",part:"left",defaultActive:1,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",iconId:"hangUp",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",iconId:"remoteUnlock",part:"left",defaultActive:0,isrender:1,themeId:"4412dc7a9f7b471a9a3e9a8fb625c793",backgroundColor:"#cccccc"}]}}};var mobileCallData={data:data$1};var styleToString$1=function styleToString(obj){var styleString="";Object.keys(obj).map(function(item,index){styleString+="".concat(item,":").concat(obj[item]).concat(index<Object.keys(obj).length-1?";":"")});return styleString};var MobileCall=function(){function MobileCall(jSPlugin,themeData,setDecoderState,decoderState){var _this=this;_classCallCheck$1(this,MobileCall);_defineProperty(this,"switchCallStatus",function(value){var editStatus=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var _this$themeData=_this.themeData,header=_this$themeData.header,footer=_this$themeData.footer;var muteData=null;if(value=="onCall"){console.log("接听");_this.bellStatus="onCall";_this.switchFooter("onCall");footer[_this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this.renderFooter(item.iconId,item)}if(item.iconId=="mute"){muteData=item}});header[_this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this.renderHeader(item.iconId,item)}});var bellHeaderDom=document.getElementById("".concat(_this.jSPlugin.id,"-header-onBell"));if(bellHeaderDom){bellHeaderDom.parentElement.removeChild(bellHeaderDom)}if(_this.themeData.customConfig.bellPoster==1){if(document.getElementById("bellring-icon")){document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}}if(_this.themeData.customConfig.defaultMicro==0&&muteData){_this.muteCommon(muteData)}else{_this.setDecoderState({mute:false},muteData.backgroundColor)}_this.removeBellRing();_this.miniRecCloseClick()}else{console.log("响铃");_this.bellStatus="onBell";_this.jSPlugin.Theme.changeTheme(_this.themeData,editStatus)}});_defineProperty(this,"muteCommon",function(btnData){var _this$decoderState$st=_this.decoderState.state,talk=_this$decoderState$st.talk,sound=_this$decoderState$st.sound;if(talk){console.log("结束对讲");_this.setDecoderState({talk:false,mute:true},btnData.backgroundColor);_this.jSPlugin.Talk.stopTalk();if(!sound){_this.jSPlugin.openSound()}_this.setDecoderState({sound:true})}else{_this.setDecoderState({talk:false,mute:true},btnData.backgroundColor);if(!sound){_this.jSPlugin.openSound()}_this.setDecoderState({sound:true})}});_defineProperty(this,"autoPlayRing",function(){console.log("autoPlayRing");var bellringAudio=document.getElementById("bellring-audio");if(!!bellringAudio){bellringAudio.muted=false;bellringAudio.src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3";if(bellringAudio.paused){bellringAudio.play()}}var isAppleDevice=_this.checkIsAppleDevice()||false;if(isAppleDevice){window.removeEventListener("touchstart",_this.autoPlayRing)}else{window.removeEventListener("click",_this.autoPlayRing)}});this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.videoHeight=jSPlugin.height;this.themeData=themeData;this.setDecoderState=setDecoderState;this.decoderState=decoderState;this.isNeedRenderHeader=false;this.isNeedRenderFooter=false;this.autoFocus=0,this.autoFocusTimer=null,this.bellStatus="onBell",this.recordTimer=null;this.nextRate=1;this.themeInited=false;this.inited=false;this.miniRecStatus="rec";this.activeThemeStatus=true;this.activeThemeStatusTxt="模板未激活";this.miniRecNum=0;this.toastCustom=new ToastCustom(jSPlugin,true)}_createClass$1(MobileCall,[{key:"initBellRing",value:function initBellRing(){var _this2=this;var _this$decoderState$st2=this.decoderState.state,play=_this$decoderState$st2.play,isEditing=_this$decoderState$st2.isEditing;var clientWidth=this.videoWidth;var ratioClient=clientWidth/375;this.maxBellTime=this.themeData.customConfig.maxBellTime*1e3;var bellringDom=document.getElementById("bellring");var bellringAudioDom=document.getElementById("bellring-audio");if(!bellringDom&&!bellringAudioDom){if(!!this.jSPlugin.isNeedBellRing){var objDOM=document.createElement("div");objDOM.id="bellring";objDOM.innerHTML='<div>\n          <audio id="bellring-audio" loop autoplay>\n            <source src="https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3" type="audio/mpeg">\n          </audio>\n          </div>';document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(objDOM)}if(this.themeData.customConfig.bellPoster==1&&!isEditing){var clientHeight=clientWidth*1.8;var headerHeight=6;if(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){headerHeight=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+clientHeight*.1+6}var bellTop=headerHeight+(this.videoHeight-130*ratioClient)/2;var objIconDOM=document.createElement("div");objIconDOM.id="bellring-icon";objIconDOM.style="position: absolute;pointer-events: none;background: none;width: 100%;\n          position: absolute;top: ".concat(bellTop,"px;display: flex;align-items: center;justify-content: center;");objIconDOM.innerHTML='<div style="width: '.concat(130*ratioClient,"px;height: ").concat(130*ratioClient,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.2);border-radius: 50%;">\n            <div style="width: ').concat(80*ratioClient,"px;height: ").concat(80*ratioClient,'px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.3);border-radius: 50%;">\n              <svg width="').concat(40*ratioClient,'px" height="').concat(40*ratioClient,'px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                  <title>icon/响铃</title>\n                  <g id="icon/响铃" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                      <polygon id="Path" points="0 0 40.0000002 0 40.0000002 40.0000002 0 40.0000002"></polygon>\n                      <path d="M20.0000001,4.25000002 C22.0363461,4.25000002 23.698175,5.84879552 23.8000507,7.8591997 L23.8050001,8.05500003 L23.805316,8.99953253 C27.1874196,9.97041766 29.6921839,13.0354462 29.80936,16.723731 L29.80936,16.723731 L29.8133335,16.9800001 L29.8133335,21.6416668 C29.8133335,22.3259481 30.0858837,22.9835569 30.5703302,23.4680033 L30.5703302,23.4680033 L31.6386635,24.5363367 C32.338953,25.2366262 32.760721,26.1675592 32.8273086,27.1785295 L32.8273086,27.1785295 L32.8350001,27.4233334 C32.8350001,29.577547 31.0892137,31.3233335 28.9350001,31.3233335 L28.9350001,31.3233335 L24.5666667,31.323 L24.5650266,31.3951531 C24.4527075,33.8194458 22.4520933,35.7500001 20.0000001,35.7500001 C17.5482065,35.7500001 15.5473098,33.8197367 15.4349743,31.3967059 L15.4326667,31.323 L11.0666667,31.3233335 C9.06159524,31.3233335 7.39851917,29.8069287 7.18810198,27.8229374 L7.17194359,27.6230185 L7.1666667,27.4233334 C7.1666667,26.3411154 7.59733134,25.3020086 8.36300328,24.5363367 L8.36300328,24.5363367 L9.43133662,23.4680033 C9.91578309,22.9835569 10.1883334,22.3259481 10.1883334,21.6416668 L10.1883334,21.6416668 L10.1883334,16.9800001 C10.1883334,13.1909619 12.7263704,9.99530436 16.1948593,8.99965364 L16.1950001,8.05500003 C16.1950001,5.95360729 17.8979654,4.25000002 20.0000001,4.25000002 Z M23.0656667,31.323 L16.9336667,31.323 L16.9352114,31.3619281 C17.0285826,32.9723844 18.3649772,34.2500001 20.0000001,34.2500001 C21.6352227,34.2500001 22.9714318,32.9721919 23.0647896,31.3604131 L23.0656667,31.323 Z M21.5116668,10.1783334 L18.4900001,10.1783334 C14.7336124,10.1783334 11.6883334,13.2231481 11.6883334,16.9800001 L11.6883334,16.9800001 L11.6883334,21.6416668 C11.6883334,22.7238848 11.2576687,23.7629916 10.4919968,24.5286635 L10.4919968,24.5286635 L9.42366346,25.5969969 C8.93921698,26.0814433 8.6666667,26.7390521 8.66637526,27.402427 L8.66637526,27.402427 L8.67048222,27.560237 C8.74130967,28.8268108 9.79171396,29.8233335 11.0666667,29.8233335 L11.0666667,29.8233335 L23.7906939,29.8222289 C23.8004164,29.8218553 23.8101862,29.8216668 23.8200001,29.8216668 L23.8486667,29.823 L28.9350001,29.8233335 C30.2055455,29.8233335 31.2450456,28.8367727 31.329826,27.609522 L31.3354106,27.4481422 L31.3293607,27.2529336 C31.2880301,26.6292837 31.0210852,26.0400787 30.5780034,25.5969969 L30.5780034,25.5969969 L29.50967,24.5286635 C28.7439981,23.7629916 28.3133335,22.7238848 28.3133335,21.6416668 L28.3133335,21.6416668 L28.3134279,16.9919039 L28.3098332,16.759466 C28.1934023,13.0970787 25.1864454,10.1783334 21.5116668,10.1783334 L21.5116668,10.1783334 Z M20.0000001,5.75000002 C18.7795808,5.75000002 17.7813801,6.69770708 17.7003155,7.89717688 L17.6950001,8.05500003 L17.6952875,8.7158769 C17.9568453,8.69103758 18.2219393,8.67833337 18.4900001,8.67833337 L18.4900001,8.67833337 L21.5116668,8.67833337 C21.7792577,8.67833337 22.0439466,8.69101238 22.3051575,8.71580951 L22.3050001,8.05500003 C22.3050001,6.7819079 21.273481,5.75000002 20.0000001,5.75000002 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                  </g>\n              </svg>\n            </div>\n          </div>');document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(objIconDOM);if(play&&this.bellStatus=="onBell"){this.jSPlugin.pause()}}else{if(document.getElementById("bellring-icon")){document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}}setTimeout(function(){var _this2$decoderState$s=_this2.decoderState.state,isEditing=_this2$decoderState$s.isEditing,rejection=_this2$decoderState$s.rejection;if(_this2.bellStatus=="onBell"&&!rejection){_this2.removeBellRing();if(!isEditing){_this2.answerOvertime()}}},this.maxBellTime)}}},{key:"removeBellRing",value:function removeBellRing(){if(!!document.getElementById("bellring")){document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring"))}if(!!document.getElementById("bellring-icon")){document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}}},{key:"getMiniCallTimeUrl",value:function getMiniCallTimeUrl(){console.log("--------------getMiniCallTimeUrl");if(this.jSPlugin.url.indexOf("hd.live")!==-1){this.recUrl=this.jSPlugin.url.replace("hd.live","rec")}else{this.recUrl=this.jSPlugin.url.replace("live","rec")}if(!!this.jSPlugin.callTime){var callTimeCur=parseInt(this.jSPlugin.callTime);var endTime=callTimeCur+5*1e3;var beginTime=callTimeCur-10*1e3;var begin=new Date(beginTime).Format("yyyyMMddhhmmss");var end=new Date(endTime).Format("yyyyMMddhhmmss");this.recUrl="".concat(this.recUrl,"?begin=").concat(begin,"&end=").concat(end);console.log("recurl="+this.recUrl)}}},{key:"initMiniRec",value:function initMiniRec(){var _this3=this;var that=this;var clientWidth=this.videoWidth;var ratioClient=clientWidth/375;var clientHeight=clientWidth*1.8;var headerHeight=6;if(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){headerHeight=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+clientHeight*.1+6}var videoTop=headerHeight+this.videoHeight+10*ratioClient;console.log(headerHeight);if(!document.getElementById("miniRecbox")){var objDOM=document.createElement("div");objDOM.id="miniRecbox";objDOM.style="-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;top: ".concat(videoTop,"px;right: ").concat(9*ratioClient,"px;");objDOM.innerHTML='<div id="miniRec"></div>';document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(objDOM);this.getMiniCallTimeUrl();var lineEnv={domain:"https://open.ys7.com"};this.miniRecPlayer=new EZUIKitPlayer({id:"miniRec",width:160*ratioClient,height:90*ratioClient,template:"miniRec",url:this.recUrl,accessToken:this.jSPlugin.accessToken,handleError:function handleError(err){console.log("小窗口handleError------------",err);if(err&&err.retcode==6701){_this3.miniRecNum=_this3.miniRecNum+1;console.log("小窗口miniRecNum-----------------",_this3.miniRecNum);if(_this3.miniRecNum<5){that.miniRecPlayer.changePlayUrl({type:"miniRec"})}else{console.log("小窗口------------------已播放5次,关闭小窗口");that.miniRecCloseClick()}}else{console.log("小窗口------------------播放失败,关闭小窗口");that.miniRecCloseClick()}},env:this.jSPlugin.env||lineEnv});var miniCloseDOM=document.createElement("div");miniCloseDOM.id="miniClose";miniCloseDOM.style="position: absolute;top: ".concat(videoTop+8,"px;right: ").concat(16*ratioClient,"px;");miniCloseDOM.innerHTML='<div id="miniClose-btn" style="width: '.concat(24*ratioClient,"px;height: ").concat(24*ratioClient,'px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.1);">\n          <svg width="').concat(24*ratioClient,'px" height="').concat(24*ratioClient,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n              <title>close</title>\n              <g id="icon/close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                  <g id="common/Close/Dark">\n                      <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n                      <path d="M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z" id="形状结合" fill="#fff" fill-rule="nonzero"></path>\n                  </g>\n              </g>\n          </svg>\n        </div>');document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(miniCloseDOM);document.getElementById("miniClose-btn").onclick=function(){that.miniRecCloseClick()}}else{if(document.getElementById("miniRecbox")){document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniRecbox"))}if(document.getElementById("miniClose")){document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniClose"))}this.initMiniRec()}}},{key:"initMiniImageRec",value:function initMiniImageRec(){console.log("initMiniImageRec");var clientWidth=this.videoWidth;var ratioClient=clientWidth/375;var headerHeight=6;if(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){headerHeight=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+26}var videoTop=headerHeight+this.videoHeight+10*ratioClient;if(!document.getElementById("miniRecbox")){var objDOM=document.createElement("div");objDOM.id="miniRecbox";objDOM.style="-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;\n        top: ".concat(videoTop,"px;\n        right: ").concat(9*ratioClient,"px;\n        user-select: none;\n        ");objDOM.innerHTML='<div id="miniRec" style="width: '.concat(160*ratioClient,"px;height: ").concat(90*ratioClient,'px;display: flex;align-items: center;justify-content: center;">\n          <embed id="miniRec-embed" style="z-index: 3;position: absolute;width: ').concat(160*ratioClient,"px;height: ").concat(90*ratioClient,'px;" type="image/svg+xml" src="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg" />\n          <div style="color: #FFFFFF;font-size: 12px;z-index: 4;">示意小窗位置</div>\n        </div>');document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(objDOM);var miniCloseDOM=document.createElement("div");miniCloseDOM.id="miniClose";miniCloseDOM.style="z-index: 4;position: absolute;top: ".concat(videoTop+8,"px;right: ").concat(16*ratioClient,"px;");miniCloseDOM.innerHTML='<div id="miniClose-btn" style="width: '.concat(24*ratioClient,"px;height: ").concat(24*ratioClient,'px;display: flex;align-items: center;justify-content: center;border-radius: 50%;">\n          <svg width="').concat(24*ratioClient,'px" height="').concat(24*ratioClient,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n              <title>close</title>\n              <g id="icon/close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                  <g id="common/Close/Dark">\n                      <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n                      <path d="M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z" id="形状结合" fill="#fff" fill-rule="nonzero"></path>\n                  </g>\n              </g>\n          </svg>\n        </div>');document.getElementById("".concat(this.jSPlugin.id,"-wrap")).appendChild(miniCloseDOM);document.getElementById("miniClose-btn").onclick=function(){}}else{document.getElementById("miniRecbox").style.top=videoTop+"px";document.getElementById("miniClose").style.top=videoTop+8+"px"}}},{key:"miniRecCloseClick",value:function miniRecCloseClick(){if(document.getElementById("miniRecbox")){console.log("---------------------miniRecCloseClick");if(this.miniRecStatus=="rec"){if(!!this.miniRecPlayer){this.miniRecPlayer.stop()}document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniClose"));document.getElementById("".concat(this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniRecbox"))}}}},{key:"miniRecSwitchClick",value:function miniRecSwitchClick(){console.log("---------------小窗口切换");var isEditing=this.decoderState.state.isEditing;var clientWidth=this.videoWidth;var ratioClient=clientWidth/375;var clientHeight=clientWidth*1.8;var headerHeight=6;if(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){headerHeight=document.getElementById("".concat(this.jSPlugin.id,"-headControl")).offsetHeight+clientHeight*.1+6}console.log("headerHeight-------",headerHeight);var videoTop=headerHeight+this.videoHeight+10*ratioClient;console.log("videoTop-------",videoTop);if(this.miniRecStatus=="rec"){this.miniRecStatus="live";if(!isEditing){this.miniRecPlayer.reSize(this.jSPlugin.width,this.jSPlugin.height)}else{document.getElementById("miniRec-embed").style.width=this.jSPlugin.width+"px";document.getElementById("miniRec-embed").style.height=this.jSPlugin.height+"px";document.getElementById("miniRec").style.width=this.jSPlugin.width+"px";document.getElementById("miniRec").style.height=this.jSPlugin.height+"px"}this.jSPlugin.reSize(160*ratioClient,90*ratioClient);var videoMarginTop=this.videoHeight+10*ratioClient;var footerMarginTop=clientHeight*.2-90*ratioClient-10*ratioClient;document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.width=this.videoWidth+"px";document.getElementById("".concat(this.jSPlugin.id)).style.marginTop=videoMarginTop+"px";document.getElementById("".concat(this.jSPlugin.id)).style.marginLeft=clientWidth-160*ratioClient-9+"px";document.getElementById("".concat(this.jSPlugin.id)).style.overflow="hidden";document.getElementById("".concat(this.jSPlugin.id)).style.borderRadius="8px";document.getElementById("miniRecbox").style.top=headerHeight+"px";document.getElementById("miniRecbox").style.left="0";document.getElementById("miniRecbox").style.right="0";document.getElementById("miniRecbox").style.borderRadius="0px";document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop=footerMarginTop+"px"}else{console.log(this.jSPlugin.width);this.miniRecStatus="rec";if(!isEditing){this.miniRecPlayer.reSize(160*ratioClient,90*ratioClient)}else{document.getElementById("miniRec-embed").style.width=160*ratioClient+"px";document.getElementById("miniRec-embed").style.height=90*ratioClient+"px";document.getElementById("miniRec").style.width=160*ratioClient+"px";document.getElementById("miniRec").style.height=90*ratioClient+"px"}this.jSPlugin.reSize(this.videoWidth,this.videoHeight);document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.width=this.videoWidth+ +"px";document.getElementById("".concat(this.jSPlugin.id)).style.marginTop="0";document.getElementById("".concat(this.jSPlugin.id)).style.marginLeft="0";document.getElementById("".concat(this.jSPlugin.id)).style.overflow="hidden";document.getElementById("".concat(this.jSPlugin.id)).style.borderRadius="0px";document.getElementById("miniRecbox").style.top=videoTop+"px";document.getElementById("miniRecbox").style.right="9px";document.getElementById("miniRecbox").style.left="auto";document.getElementById("miniRecbox").style.borderRadius="8px";document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop=clientHeight*.2+"px"}}},{key:"matchBtn",value:function matchBtn(btnId,btnData){var _this4=this;var _this$themeData2=this.themeData,header=_this$themeData2.header,footer=_this$themeData2.footer;var _this$decoderState$st3=this.decoderState.state,mute=_this$decoderState$st3.mute,rejection=_this$decoderState$st3.rejection;document.documentElement.clientHeight;var clientWidth=this.videoWidth;var ratioClient=clientWidth/375;var sizeRatio=this.videoWidth/375||1;var btnItem={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function onclick(){},onmoveleft:function onmoveleft(){},onmoveright:function onmoveright(){},onremove:function onremove(){}};var _index=header[this.bellStatus].btnList.findIndex(function(item){return item.iconId===btnId});if(_index===-1){btnItem.color=footer[this.bellStatus].color;btnItem.backgroundColor=footer[this.bellStatus].backgroundColor;btnItem.activeColor=footer[this.bellStatus].activeColor}else{btnItem.color=header[this.bellStatus].color;btnItem.backgroundColor=header[this.bellStatus].backgroundColor;btnItem.activeColor=header[this.bellStatus].activeColor}var btnWidth=this.videoWidth/4;switch(btnId){case"ringStatus":btnItem.title=this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt;btnItem.id=btnId;btnItem.domString='<span id="header-onBell-ringStatus" style="color:'.concat(btnData.color||"#2C2C2C",";font-size: ").concat(24*sizeRatio,'px;display: block;font-weight: 600;" >').concat(this.activeThemeStatus?"有人按门铃":this.activeThemeStatusTxt,"</span>");btnItem.onclick=function(){};return btnItem;case"deviceCategory":btnItem.title="设备名称";btnItem.id=btnId;btnItem.domString='<span id="header-onBell-deviceCategory" \n          style="color:'.concat(btnData.color||"#2C2C2C",";\n          font-size: ").concat(14*sizeRatio,"px;\n          padding-top: ").concat(5*sizeRatio,'px;\n          display: block;\n          max-width: 100%;\n          overflow: hidden;\n          text-overflow: ellipsis;\n          white-space: nowrap;\n          ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>");btnItem.onclick=function(){};return btnItem;case"callStatus":btnItem.title="通话中";btnItem.id=btnId;btnItem.domString='<span id="header-onCall-ringStatus" style="color:'.concat(btnData.color||"#2C2C2C",";font-size: ").concat(24*sizeRatio,'px;display: block;font-weight: 600;" >通话中</span>');btnItem.onclick=function(){};return btnItem;case"deviceCategory":btnItem.title="设备名称";btnItem.id=btnId;btnItem.domString='<span id="header-onCall-deviceCategory" \n          style="color:'.concat(btnData.color||"#2C2C2C",";\n          font-size: ").concat(14*sizeRatio,"px;\n          padding-top: ").concat(5*sizeRatio,'px;\n          display: block;\n          max-width: 100%;\n          overflow: hidden;\n          text-overflow: ellipsis;\n          white-space: nowrap;\n          ">').concat(this.deviceInfoData&&this.deviceInfoData.deviceName||"设备名称","</span>");btnItem.onclick=function(){};return btnItem;case"rejection":btnItem.title="拒绝";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.66,'px;display: flex;flex-direction: column;align-items: center;">\n                <div style="width:').concat(btnWidth*.66,"px;height: ").concat(btnWidth*.66,"px;border-radius: 50%;background: ").concat(rejection?"#CCCCCC":btnData.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.4,'px" height="').concat(btnWidth*.4,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>拒绝</title>\n                        <g id="icon/拒绝" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">拒绝</div>\n            </div>');btnItem.onclick=function(){var that=_this4;var _this4$decoderState$s=_this4.decoderState.state,play=_this4$decoderState$s.play,isEditing=_this4$decoderState$s.isEditing,rejection=_this4$decoderState$s.rejection;if(isEditing||rejection){return false}console.log("拒绝");if(play){_this4.jSPlugin.stop()}_this4.removeBellRing();_this4.setDecoderState({play:false,rejection:true});that.miniRecCloseClick();_this4.rejectionStatusDispose();if(typeof _this4.jSPlugin.hangUpCallback==="function"){_this4.jSPlugin.hangUpCallback("rejection")}};return btnItem;case"quickReply":btnItem.title="快捷回复";btnItem.id=btnId;btnItem.domString='<div id="'.concat(this.jSPlugin.id,'-btn-quickReply" style="width: ').concat(126*ratioClient,"px;height: ").concat(40*ratioClient,"px;color:").concat(rejection?"rgba(44,44,44,0.5)":btnItem.color,';background: #F8F8F8;border-radius: 20px;display: flex;flex-direction: row;align-items: center;justify-content: center;-webkit-tap-highlight-color:transparent;">\n                <div>\n                  <svg width="').concat(24*ratioClient,'px" height="').concat(24*ratioClient,'px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                      <title>快捷回复</title>\n                      <g id="icon/H5快捷回复" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                          <rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>\n                          <path d="M10.7238197,2.25008794 C16.2230834,2.09766093 20.7496,6.50749909 20.7496,11.9958 C20.7496,13.4362841 20.4368194,14.8344518 19.8413577,16.1117061 L19.9440524,15.8792521 L21.0527769,21.184554 C21.1496277,21.6485507 20.8013031,22.0657304 20.3577211,22.0873894 L20.2613374,22.0858497 L20.1628027,22.0714397 L14.866,20.946 L14.7518767,20.9973203 C13.6930577,21.439776 12.5585243,21.69208 11.3902258,21.7381162 L11.3902258,21.7381162 L10.9996,21.7458 C5.51196728,21.7458 1.10147008,17.2189531 1.25388722,11.7200456 C1.39490345,6.62610538 5.62990538,2.39110345 10.7238197,2.25008794 Z M11.0183931,3.74628651 L10.7653544,3.74951278 C6.46729462,3.86849655 2.87229655,7.46349462 2.75331206,11.7615803 C2.62431432,16.4155628 6.35610614,20.2458 10.9996,20.2458 C12.2165433,20.2458 13.3936843,19.9831552 14.4692454,19.4827855 C14.6166569,19.4142071 14.7823612,19.395387 14.9413973,19.4291603 L14.9413973,19.4291603 L19.349,20.365 L18.4274231,15.948046 C18.4026128,15.8291836 18.4071487,15.7066932 18.4398273,15.5909727 L18.4398273,15.5909727 L18.4818423,15.4778939 C18.9851908,14.3982208 19.2496,13.216279 19.2496,11.9958 C19.2496,7.35166383 15.4197191,3.62050444 10.7653544,3.74951278 Z M10.9996,10.7498 C11.6896,10.7498 12.2496,11.3098 12.2496,11.9998 C12.2496,12.6898 11.6896,13.2498 10.9996,13.2498 C10.3096,13.2498 9.7496,12.6898 9.7496,11.9998 C9.7496,11.3098 10.3096,10.7498 10.9996,10.7498 Z M6.9996,10.7498 C7.6896,10.7498 8.2496,11.3098 8.2496,11.9998 C8.2496,12.6898 7.6896,13.2498 6.9996,13.2498 C6.3096,13.2498 5.7496,12.6898 5.7496,11.9998 C5.7496,11.3098 6.3096,10.7498 6.9996,10.7498 Z M14.9996,10.7498 C15.6896,10.7498 16.2496,11.3098 16.2496,11.9998 C16.2496,12.6898 15.6896,13.2498 14.9996,13.2498 C14.3096,13.2498 13.7496,12.6898 13.7496,11.9998 C13.7496,11.3098 14.3096,10.7498 14.9996,10.7498 Z" id="形状结合" fill="').concat(rejection?"rgba(44,44,44,0.5)":"#2c2c2c",'" fill-rule="nonzero"></path>\n                      </g>\n                  </svg>\n                </div>\n                <div style="margin-left: 5px;user-select: none;font-size:14px">快捷回复<div>\n            </div>');btnItem.onclick=function(){var _this4$decoderState$s2=_this4.decoderState.state,isEditing=_this4$decoderState$s2.isEditing,rejection=_this4$decoderState$s2.rejection;if(isEditing||rejection){return false}console.log("快捷回复");_this4.switchFooter("quickReply");_this4.quickReplyEle=new MobileQuickReplyEle(_this4.jSPlugin,_this4.switchFooter,_this4.videoWidth)};return btnItem;case"answer":btnItem.title="接听";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.66,'px;display: flex;flex-direction: column;align-items: center;">\n                <div style="width: ').concat(btnWidth*.66,"px;height: ").concat(btnWidth*.66,"px;border-radius: 50%;background: ").concat(rejection?"#CCCCCC":btnData.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.4,'px" height="').concat(btnWidth*.4,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>接听</title>\n                        <g id="icon/接听" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path d="M15.7728281,19.6822968 C13.2528132,17.165123 10.8435994,14.2473605 11.9999084,13.0938925 C13.6505608,11.4432401 15.0881341,10.4261428 12.1646895,6.78675259 C9.23840386,3.14452132 7.28659974,5.94011849 5.68708632,7.53963191 C3.84324225,9.38631703 5.59049048,16.2645088 12.3891328,23.0659922 C19.1877751,29.8646345 26.0688079,31.6147238 27.9154931,29.7680386 C29.5150065,28.1685252 32.3106036,26.2195622 28.6712134,23.2932765 C25.0318232,20.3669909 24.0147259,21.8045642 22.3640735,23.4580576 C21.2077645,24.6086845 18.2928431,22.1994707 15.7728281,19.6822968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.727936, 17.728157) rotate(-360.000000) translate(-17.727936, -17.728157) "></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">接听</div>\n            </div>');btnItem.onclick=function(){var _this4$decoderState$s3=_this4.decoderState.state,play=_this4$decoderState$s3.play,isEditing=_this4$decoderState$s3.isEditing,talk=_this4$decoderState$s3.talk,sound=_this4$decoderState$s3.sound,rejection=_this4$decoderState$s3.rejection;if(isEditing||rejection){return false}console.log("接听");_this4.jSPlugin.pluginStatus.loadingClear();_this4.bellStatus="onCall";_this4.switchFooter("onCall");footer[_this4.bellStatus].btnList.map(function(item,index){if(item.isrender){_this4.renderFooter(item.iconId,item)}});header[_this4.bellStatus].btnList.map(function(item,index){if(item.isrender){_this4.renderHeader(item.iconId,item)}});var bellHeaderDom=document.getElementById("".concat(_this4.jSPlugin.id,"-header-onBell"));if(bellHeaderDom){bellHeaderDom.parentElement.removeChild(bellHeaderDom)}if(_this4.themeData.customConfig.bellPoster==1){if(document.getElementById("bellring-icon")){document.getElementById("".concat(_this4.jSPlugin.id,"-wrap")).removeChild(document.getElementById("bellring-icon"))}_this4.jSPlugin.setPoster("")}_this4.removeBellRing();_this4.miniRecCloseClick();if(!play){_this4.jSPlugin.pluginStatus.loadingStart(_this4.jSPlugin.id);_this4.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"});_this4.jSPlugin.play();_this4.setDecoderState({play:!play})}if(!talk&&_this4.themeData.customConfig.defaultMicro==1){_this4.setDecoderState({talk:true,mute:false});if(sound){_this4.jSPlugin.closeSound()}_this4.jSPlugin.Talk.startTalk()}_this4.setDecoderState({sound:false});if(_this4.themeData.customConfig.defaultMicro==0){_this4.muteCommon(btnData);_this4.jSPlugin.openSound();_this4.setDecoderState({sound:true})}_this4.maxTalkTime=_this4.themeData.customConfig.maxTalkTime*1e3*60;var that=_this4;setTimeout(function(){if(talk){console.log("结束对讲");that.setDecoderState({talk:false});that.jSPlugin.Talk.stopTalk()}if(play){that.jSPlugin.stop();that.setDecoderState({play:!play})}_this4.rejectionStatusDispose();if(!!_this4.remoteUnlockEle){_this4.remoteUnlockEle.closeRemoteUnlock()}if(typeof _this4.jSPlugin.hangUpCallback==="function"){_this4.jSPlugin.hangUpCallback("hangUp")}},_this4.maxTalkTime)};return btnItem;case"remoteUnlock":btnItem.title="远程开锁";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.66,'px;display: flex;flex-direction: column;align-items: center;">\n                <div style="width: ').concat(btnWidth*.66,"px;height: ").concat(btnWidth*.66,"px;border-radius: 50%;background: ").concat(rejection?"#CCCCCC":btnData.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.4,'px" height="').concat(btnWidth*.4,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>开锁</title>\n                        <g id="icon/开锁" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path d="M18,4 C21.3137085,4 24,6.6862915 24,10 L24,10 L24,19.787 L29.5,19.7875 C30.0522847,19.7875 30.5,20.2352153 30.5,20.7875 C30.5,21.3397847 30.0522847,21.7875 29.5,21.7875 L24,21.787 L24,26 C24,29.2383969 21.4344251,31.8775718 18.2249383,31.9958615 L18,32 C14.6862915,32 12,29.3137085 12,26 L12,26 L12,10 C12,6.6862915 14.6862915,4 18,4 Z M18,6 C15.790861,6 14,7.790861 14,10 L14,10 L14,26 C14,28.209139 15.790861,30 18,30 C20.209139,30 22,28.209139 22,26 L22,26 L22,21.787 L18.5,21.7875 C17.9477153,21.7875 17.5,21.3397847 17.5,20.7875 C17.5,20.2352153 17.9477153,19.7875 18.5,19.7875 L22,19.787 L22,10 C22,7.85780461 20.3160315,6.10892112 18.1996403,6.00489531 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">远程开锁</div>\n            </div>');btnItem.onclick=function(){var _this4$decoderState$s4=_this4.decoderState.state,isEditing=_this4$decoderState$s4.isEditing;_this4$decoderState$s4.play;var rejection=_this4$decoderState$s4.rejection;if(isEditing||_this4.bellStatus=="onBell"||rejection){return false}console.log("远程开锁");_this4.switchFooter("remoteUnlock");_this4.remoteUnlockEle=new MobileRemoteUnlockEle(_this4.jSPlugin,_this4.switchFooter,_this4.videoWidth)};return btnItem;case"mute":btnItem.title="静音";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.66,'px;display: flex;flex-direction: column;align-items: center;">\n                <div id="').concat(this.jSPlugin.id,'-icon-mute" style="width: ').concat(btnWidth*.66,"px;height: ").concat(btnWidth*.66,"px;border-radius: 50%;border: 1px solid ").concat(rejection?"#cccccc":btnData.backgroundColor,";background: ").concat(rejection&&mute?"#cccccc":"#ffffff",';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.4,'px" height="').concat(btnWidth*.4,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>icon/静音</title>\n                        <g id="icon/静音" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path id="icon-mute-path" d="M29.2988305,7.56559704 C29.8540627,8.1086468 29.8980234,8.97727504 29.4240597,9.57172938 L29.3223594,9.6867869 L22.585,16.574 L22.5859243,26.0592702 C22.5859243,26.9500521 21.8638029,27.6721735 20.973021,27.6721735 C20.6007147,27.6721735 20.2398727,27.5433734 19.9517149,27.3076254 L15.583,23.733 L10.4341733,28.9987008 C9.85492024,29.5909486 8.9052312,29.6014828 8.31298346,29.0222298 C7.75775121,28.47918 7.71379057,27.6105518 8.18775419,27.0160974 L8.28945454,26.9010399 L27.1776406,7.58912597 C27.7568937,6.99687823 28.7065827,6.98634397 29.2988305,7.56559704 Z M22.2503608,7.16816759 C22.4679282,7.45036017 22.5859243,7.79665625 22.5859243,8.15298221 L22.585,9.899 L10.778,21.971 L9.47580645,21.9713498 C7.69424274,21.9713498 6.25,20.5271071 6.25,18.7455434 L6.25,15.65293 C6.25,13.8713663 7.69424274,12.4271235 9.47580645,12.4271235 L12.787,12.427 L19.9882064,6.87564241 C20.6936617,6.33174431 21.7064627,6.46271229 22.2503608,7.16816759 Z" id="形状结合" fill="').concat(mute?"#ffffff":rejection?"#cccccc":btnData.backgroundColor,'"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">静音</div>\n            </div>');btnItem.onclick=function(){var _this4$decoderState$s5=_this4.decoderState.state,talk=_this4$decoderState$s5.talk,sound=_this4$decoderState$s5.sound;_this4$decoderState$s5.play;var rejection=_this4$decoderState$s5.rejection;if(rejection){return false}console.log("静音");if(talk){console.log("结束对讲");_this4.setDecoderState({talk:false,mute:true},btnData.backgroundColor);_this4.jSPlugin.Talk.stopTalk();_this4.jSPlugin.openSound();_this4.setDecoderState({sound:true})}else{console.log("开始对讲");_this4.setDecoderState({talk:true,mute:false},btnData.backgroundColor);if(sound){_this4.jSPlugin.closeSound();_this4.setDecoderState({sound:false})}_this4.jSPlugin.Talk.startTalk()}};return btnItem;case"hangUp":btnItem.title="挂断";btnItem.id=btnId;btnItem.domString='<div style="width: '.concat(btnWidth*.66,'px;display: flex;flex-direction: column;align-items: center;">\n                <div style="width:').concat(btnWidth*.66,"px;height: ").concat(btnWidth*.66,"px;border-radius: 50%;background: ").concat(rejection?"#CCCCCC":btnData.backgroundColor,';display: flex;align-items: center;justify-content: center;" >\n                    <svg width="').concat(btnWidth*.4,'px" height="').concat(btnWidth*.4,'px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                        <title>挂断</title>\n                        <g id="icon/挂断" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                            <rect id="Rectangle" x="0" y="0" width="36" height="36"></rect>\n                            <path d="M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero" transform="translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) "></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style="margin-top: ').concat(btnWidth*.1,'px;user-select: none;">挂断</div>\n            </div>');btnItem.onclick=function(){var that=_this4;var _this4$decoderState$s6=_this4.decoderState.state,talk=_this4$decoderState$s6.talk,play=_this4$decoderState$s6.play,rejection=_this4$decoderState$s6.rejection;if(rejection){return false}if(talk){console.log("结束对讲");_this4.setDecoderState({talk:false});_this4.jSPlugin.Talk.stopTalk()}if(play){_this4.jSPlugin.stop();_this4.setDecoderState({play:!play})}if(play||talk){that.miniRecCloseClick();console.log("挂断");_this4.rejectionStatusDispose();if(typeof _this4.jSPlugin.hangUpCallback==="function"){_this4.jSPlugin.hangUpCallback("hangUp")}}};return btnItem;default:return btnItem}}},{key:"answerOvertime",value:function answerOvertime(){this.toastCustom.initToastContent("应答超时");var play=this.decoderState.state.play;console.log("应答超时");if(play){this.jSPlugin.stop()}this.setDecoderState({play:false,rejection:true});this.miniRecCloseClick();this.rejectionStatusDispose();if(!!this.quickReplyEle){this.quickReplyEle.closeQuickReplyEle()}if(typeof this.jSPlugin.hangUpCallback==="function"){this.jSPlugin.hangUpCallback("rejection")}}},{key:"rejectionStatusDispose",value:function rejectionStatusDispose(){var _this5=this;var footer=this.themeData.footer;var footerDom=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var footerDomCall=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));var footerDomQuickReply=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn"));var headerRingStatusDom=document.getElementById("header-".concat(this.bellStatus,"-ringStatus"));if(this.bellStatus=="onBell"){footerDom.innerHTML="";footerDomQuickReply.innerHTML="";footerDom.style.color="#2C2C2C"}else{footerDomCall.innerHTML="";footerDomCall.style.color="#2C2C2C"}console.log("rejectionStatusDispose");this.setDecoderState({rejection:true});footer[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this5.renderFooter(item.iconId,item)}});headerRingStatusDom.innerText="通话已结束";this.jSPlugin.pluginStatus.loadingClear();this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:true,type:2})}},{key:"userNoDevice",value:function userNoDevice(){var _this6=this;this.removeBellRing();this.setDecoderState({rejection:true});var footer=this.themeData.footer;var footerDom=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var footerDomCall=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));var footerDomQuickReply=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn"));if(this.bellStatus=="onBell"){footerDom.innerHTML="";footerDomQuickReply.innerHTML="";footerDom.style.color="#2C2C2C"}else{footerDomCall.innerHTML="";footerDomCall.style.color="#2C2C2C"}console.log("userNoDevice");this.setDecoderState({rejection:true});footer[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this6.renderFooter(item.iconId,item)}});this.jSPlugin.pluginStatus.loadingClear();this.jSPlugin.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:true,type:2})}},{key:"renderHeader",value:function renderHeader(id,item){var _this7=this;var objItem=this.matchBtn(id,item);if(document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content"))){var childDOM=document.createElement("span");childDOM.innerHTML="".concat(objItem.domString);document.getElementById("".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,"-content")).appendChild(childDOM)}else{var objDOM=document.createElement("div");objDOM.id="".concat(this.jSPlugin.id,"-header-").concat(this.bellStatus);objDOM.style="max-width:50%;position:relative;";objDOM.innerHTML='<span id="'.concat(this.jSPlugin.id,"-header-").concat(this.bellStatus,'-content" style="display:inline-block;height:auto;";>\n            ').concat(objItem.domString,"\n          </span>");objDOM.onclick=function(e){if(_this7.decoderState.state.isEditing){return false}objItem.onclick(e)};document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(objDOM)}}},{key:"renderFooter",value:function renderFooter(id,item){var _this8=this;var mute=this.decoderState.state.mute;if(id=="remoteUnlock"&&!!this.jSPlugin.capacity&&(!this.jSPlugin.capacity["support_unlock"]||this.jSPlugin.capacity["support_unlock"]==0)){return false}var objItem=this.matchBtn(id,item);var btnWidth=this.videoWidth/4;var objDOM=document.createElement("div");objDOM.className="theme-icon-item";if(objItem.id!=="quickReply"){objDOM.style="width:".concat(btnWidth*.66,"px;padding:0 ").concat(btnWidth*.12,"px;box-sizing: content-box;-webkit-tap-highlight-color:transparent;")}objDOM.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-content" title="').concat(objItem.title,'" style="display: flex;align-items: center;position:relative;">')).concat(objItem.domString,"</div>")+"</span>";objDOM.onclick=function(e){if(_this8.decoderState.state.isEditing||!_this8.activeThemeStatus){return false}objItem.onclick(e)};if(objItem.onmouseenter){objDOM.onmouseenter=function(e){if(_this8.decoderState.state.isEditing||!_this8.activeThemeStatus){return false}objItem.onmouseenter(e)}}if(objItem.onmouseleave){objDOM.onmouseleave=function(e){if(_this8.decoderState.state.isEditing||!_this8.activeThemeStatus){return false}objItem.onmouseleave(e)}}if(id!="quickReply"){var toLeft=document.createElement("span");toLeft.className="icon-move left";toLeft.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-left" title="左移" style="height: 40px;position: absolute;top: calc(50% - 33px);left: 1px;display: inline-block;border-radius: 2px;overflow: hidden;cursor: pointer;">\n          <svg width="10px" height="40px" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n              <title></title>\n              <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                  <g id="H5呼叫模板" transform="translate(-614.000000, -5024.000000)">\n                      <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n                          <g id="编组-9" transform="translate(23.000000, 522.000000)">\n                              <g id="编组" transform="translate(170.000000, 0.000000)">\n                                  <g id="箭头左" transform="translate(0.000000, 18.000000)">\n                                      <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n                                      <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(1.000000, 15.000000)" fill="#FFFFFF">\n                                          <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </g>\n          </svg>\n          </span>');toLeft.onclick=function(){_this8.editIcon(objItem.id,"left","footer")};objDOM.appendChild(toLeft);var toRight=document.createElement("span");toRight.className="icon-move right";toRight.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-right" class="ezuikit-theme-icon" title="右移" style="height: 40px;position: absolute;top: calc(50% - 33px);left: calc(100% - 11px);display: inline-block;border-radius: 2px;overflow: hidden;cursor: pointer;">\n          <svg width="10px" height="40px" viewBox="0 0 10 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n              <title></title>\n              <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                  <g id="H5呼叫模板" transform="translate(-684.000000, -5024.000000)">\n                      <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n                          <g id="编组-9" transform="translate(23.000000, 522.000000)">\n                              <g id="编组" transform="translate(170.000000, 0.000000)">\n                                  <g id="箭头右" transform="translate(70.000000, 18.000000)">\n                                      <rect id="矩形" fill="#595959" x="0" y="0" width="10" height="40" rx="2"></rect>\n                                      <g id="1.通用/2.Icon图标/Common/Fill/Left" transform="translate(5.500000, 20.000000) scale(-1, 1) translate(-5.500000, -20.000000) translate(2.000000, 15.000000)" fill="#FFFFFF">\n                                          <path d="M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z" id="三角形" transform="translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) "></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </g>\n          </svg>\n          </span>');toRight.onclick=function(){_this8.editIcon(objItem.id,"right","footer")};objDOM.appendChild(toRight)}if(id=="answer"||id=="rejection"||id=="hangUp");else{var toClose=document.createElement("span");toClose.className="icon-move close";toClose.innerHTML='<span id="'.concat(objItem.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: -6px;right: -2px;cursor: pointer;">\n            <svg width="16px" height="16px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n                <title></title>\n                <g id="呼叫模板-控制台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n                    <g id="H5呼叫模板" transform="translate(-680.000000, -5006.000000)">\n                        <g id="编组-28" transform="translate(421.000000, 4484.000000)">\n                            <g id="编组-9" transform="translate(23.000000, 522.000000)">\n                                <g id="编组" transform="translate(170.000000, 0.000000)">\n                                    <g id="关闭1" transform="translate(66.000000, 0.000000)">\n                                        <rect id="矩形" fill-rule="nonzero" x="0" y="0" width="18" height="18"></rect>\n                                        <path d="M9,1.125 C4.65117188,1.125 1.125,4.65117188 1.125,9 C1.125,13.3488281 4.65117188,16.875 9,16.875 C13.3488281,16.875 16.875,13.3488281 16.875,9 C16.875,4.65117188 13.3488281,1.125 9,1.125 Z M11.9074219,11.9917969 L10.7472656,11.9865234 L9,9.90351562 L7.25449219,11.9847656 L6.09257813,11.9900391 C6.01523438,11.9900391 5.95195313,11.9285156 5.95195313,11.8494141 C5.95195313,11.8160156 5.96425781,11.784375 5.98535156,11.7580078 L8.27226563,9.03339844 L5.98535156,6.31054687 C5.96425781,6.28417969 5.95195313,6.25253906 5.95195313,6.21914062 C5.95195313,6.14179687 6.01523438,6.07851562 6.09257813,6.07851562 L7.25449219,6.08378906 L9,8.16679687 L10.7455078,6.08554688 L11.9056641,6.08027344 C11.9830078,6.08027344 12.0462891,6.14179687 12.0462891,6.22089844 C12.0462891,6.25429687 12.0339844,6.2859375 12.0128906,6.31230469 L9.72949219,9.03515625 L12.0146484,11.7597656 C12.0357422,11.7861328 12.0480469,11.8177734 12.0480469,11.8511719 C12.0480469,11.9285156 11.9847656,11.9917969 11.9074219,11.9917969 Z" id="形状" fill="#595959"></path>\n                                    </g>\n                                </g>\n                            </g>\n                        </g>\n                    </g>\n                </g>\n            </svg>\n          </span>');toClose.onclick=function(){_this8.editIcon(objItem.id,"delete","footer")};objDOM.appendChild(toClose)}if(this.bellStatus=="onCall"){document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).appendChild(objDOM)}else{document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).appendChild(objDOM);if(objItem.id==="quickReply"){document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")).appendChild(objDOM)}}if(this.decoderState.state.isEditing&&id=="mute"&&this.bellStatus=="onCall"){if(this.themeData.customConfig.defaultMicro==0&&!mute){this.setDecoderState({mute:true},item.backgroundColor)}else{this.setDecoderState({mute:false},item.backgroundColor)}}}},{key:"switchFooter",value:function switchFooter(type){var footer=this.themeData.footer;switch(type){case"onBell":if(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"))){if(document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display=="none"){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex";document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")).style.display="flex";document.getElementById("".concat(this.jSPlugin.id,"-btn-quickReply")).style.display="flex"}}else{document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="flex";document.getElementById("".concat(this.jSPlugin.id,"-audioControls-quickReplyBtn")).style.display="flex";document.getElementById("".concat(this.jSPlugin.id,"-btn-quickReply")).style.display="flex"}break;case"onCall":document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.display="none";document.getElementById("".concat(this.jSPlugin.id,"-btn-quickReply")).style.display="none";document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.display="flex";if(!!this.themeData){document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=footer[this.bellStatus].color}break}}},{key:"initThemeData",value:function initThemeData(){var _this9=this;console.log("-------------initThemeData");var _this$themeData3=this.themeData,header=_this$themeData3.header,footer=_this$themeData3.footer;var isEditing=this.decoderState.state.isEditing;var clientWidth=this.videoWidth;var ratioClient=clientWidth/375;var clientHeight=clientWidth*1.8;var videoId=this.jSPlugin.id;this.isNeedRenderHeader=_.findIndex(header[this.bellStatus].btnList,function(v){return v.isrender>0})>=0;this.isNeedRenderFooter=_.findIndex(footer[this.bellStatus].btnList,function(v){return v.isrender>0})>=0;if(this.isNeedRenderHeader){if(!document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){var _headerStyle;var headerContainer=document.createElement("div");headerContainer.setAttribute("id","".concat(this.jSPlugin.id,"-headControl"));headerContainer.setAttribute("class","header-controls");headerContainer.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex;width:100%;overflow:hidden;justify-content: center;'></div>");console.log(this.jSPlugin.height);this.jSPlugin.height*.2+"px";var headerStyle=(_headerStyle={display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:"100%",position:"relative","margin-bottom":clientHeight*.1+"px","align-items":"center","text-align":"center","font-size":"24ox"},_defineProperty(_headerStyle,"color","#2c2c2c"),_defineProperty(_headerStyle,"margin-top","6px"),_headerStyle);headerContainer.style=styleToString$1(headerStyle);document.getElementById("".concat(videoId,"-wrap")).insertBefore(headerContainer,document.getElementById(videoId));var _checkTimer=setInterval(function(){if(window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(_checkTimer)}},50)}else{document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width:100%;overflow:hidden;justify-content: center;'></div>")}}else{if(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))}}this.jSPlugin.height*.3;if(this.isNeedRenderFooter){if(!document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){var footerContainer=document.createElement("div");footerContainer.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container"));footerContainer.setAttribute("class","ez-iframe-footer-container");var footerStyle={position:"relative","margin-top":clientHeight*.2+"px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%","align-items":"center","font-size":"12px"};footerContainer.style=styleToString$1(footerStyle);footerContainer.innerHTML='\n            <div id="'.concat(this.jSPlugin.id,'-audioControls-quickReplyBtn" class="footer-controls" style=\'min-height: ').concat(40*ratioClient,"px;margin-bottom: ").concat(40*ratioClient,"px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n            <div id=\"").concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n            <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n            <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n            <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n            ');insertAfter(footerContainer,document.getElementById(videoId))}else{if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="".concat(clientHeight*.2,"px");if(this.bellStatus=="onCall"){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n              <div id="'.concat(this.jSPlugin.id,'-audioControls-quickReplyBtn" class="footer-controls" style=\'min-height: ').concat(40*ratioClient,"px;margin-bottom: ").concat(40*ratioClient,"px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n              ')}else{document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='\n              <div id="'.concat(this.jSPlugin.id,'-audioControls-quickReplyBtn" class="footer-controls" style=\'min-height: ').concat(40*ratioClient,"px;margin-bottom: ").concat(40*ratioClient,"px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id,'-audioControls" class="footer-controls" style=\'display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-onCall" class="footer-controls" style=\'display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-quickReply" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n              <div id="').concat(this.jSPlugin.id,'-audioControls-remoteUnlock" class="footer-controls" style=\'display:none;justify-content: center;width:100%;z-index:999;position: relative;\'></div>\n              ')}}}}else{if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")))}}if(this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){header[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this9.renderHeader(item.iconId,item)}})}if(this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=footer[this.bellStatus].backgroundColor;document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=footer[this.bellStatus].color;footer[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this9.renderFooter(item.iconId,item)}})}if(this.themeData.customConfig.bellPoster==1&&!isEditing){this.jSPlugin.poster="https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg";var checkTimer=setInterval(function(){if(window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);_this9.jSPlugin.setPoster(_this9.jSPlugin.poster)}},50)}else{this.jSPlugin.setPoster("")}if(this.activeThemeStatus){this.initBellRing();var isAppleDevice=this.checkIsAppleDevice()||false;if(isAppleDevice){window.addEventListener("touchstart",this.autoPlayRing)}else{window.addEventListener("click",this.autoPlayRing)}}this.inited=true;this.getCallDeviceInfo()}},{key:"checkIsAppleDevice",value:function checkIsAppleDevice(){var u=navigator.userAgent;var ios=!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);var iPad=u.indexOf("iPad")>-1;var iPhone=u.indexOf("iPhone")>-1||u.indexOf("Mac")>-1;if(ios||iPad||iPhone){return true}else{return false}}},{key:"renderThemeData",value:function renderThemeData(){var _this10=this;var _this$themeData4=this.themeData,header=_this$themeData4.header,footer=_this$themeData4.footer;var isEditing=this.decoderState.state.isEditing;if(this.isNeedRenderHeader&&header){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=header[this.bellStatus].color.replace("-diy","");header[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this10.setDecoderState(_defineProperty({},item.iconId,_this10.decoderState.state[item.iconId]))}})}if(this.isNeedRenderFooter&&footer){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=footer[this.bellStatus].backgroundColor.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=footer[this.bellStatus].color.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall")).style.color=footer[this.bellStatus].color.replace("-diy","");footer[this.bellStatus].btnList.map(function(item,index){if(item.isrender){_this10.setDecoderState(_defineProperty({},item.iconId,_this10.decoderState.state[item.iconId]))}console.log("-------------activeThemeStatus");if(index==0&&!_this10.themeInited&&_this10.activeThemeStatus){var checkTimer=setInterval(function(){if(window.EZUIKit[_this10.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);if(_this10.themeData.customConfig.bellPoster==1&&!isEditing){_this10.jSPlugin.pluginStatus.loadingClear()}else{_this10.jSPlugin.play()}_this10.themeInited=true}},50)}});if(this.jSPlugin.url.indexOf("hd.live")!==-1){this.setDecoderState({hd:true})}if(this.themeData.autoFocus>0){this.autoFocus=parseInt(this.themeData.autoFocus);this.startAutoFocus();document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",function(){_this10.stopAutoFocus()})}this.setDecoderState({cloudRec:matchEzopenUrl(this.jSPlugin.url).type==="cloud.rec",rec:matchEzopenUrl(this.jSPlugin.url).type==="rec",type:matchEzopenUrl(this.jSPlugin.url).type})}else{if(!this.themeInited&&this.activeThemeStatus){var _checkTimer2=setInterval(function(){if(window.EZUIKit[_this10.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(_checkTimer2);if(_this10.themeData&&_this10.themeData.customConfig&&_this10.themeData.customConfig.bellPoster==1&&!isEditing){_this10.jSPlugin.pluginStatus.loadingClear()}else{_this10.jSPlugin.play()}_this10.themeInited=true}},50)}}var checkTimer=setInterval(function(){if(window.EZUIKit[_this10.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);_this10.jSPlugin.reSize(_this10.jSPlugin.params.width,_this10.jSPlugin.params.height)}},50);if(!isEditing&&!this.jSPlugin.isWebConsole){setTimeout(function(){if(_this10.bellStatus=="onBell"&&_this10.jSPlugin.capacity&&_this10.jSPlugin.capacity["support_doorcall_playback"]==1){console.log("小窗口initMiniRec-------------设备能力集成功");if(_this10.themeData.customConfig.miniWinRec==1){console.log("小窗口initMiniRec---------------画中画设置已开启");if(!_this10.deviceInfoData||_this10.deviceInfoData&&!_this10.deviceInfoData.isEncrypt){console.log("小窗口initMiniRec---------------设备未加密");_this10.miniRecNum=0;_this10.initMiniRec()}}}},1e3)}else{if(this.themeData.customConfig.miniWinRec==1){this.initMiniImageRec()}else{this.miniRecCloseClick()}}}},{key:"setThemeData",value:function setThemeData(options,bellStatus){this.themeData=options;if(bellStatus=="onCall"){this.bellStatus="onCall"}}},{key:"startAutoFocus",value:function startAutoFocus(){var _this11=this;var autoFocus=this.autoFocus;if(this.autoFocusTimer){clearTimeout(this.autoFocusTimer)}this.autoFocusTimer=setTimeout(function(){if(document.getElementById("".concat(_this11.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(_this11.jSPlugin.id,"-audioControls")).style.opacity=0;document.getElementById("".concat(_this11.jSPlugin.id,"-audioControls")).style.pointerEvents="none"}},autoFocus*1e3)}},{key:"stopAutoFocus",value:function stopAutoFocus(){if(document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.opacity=1;document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.pointerEvents="all"}if(this.autoFocusTimer){clearTimeout(this.autoFocusTimer)}this.startAutoFocus()}},{key:"editIcon",value:function editIcon(id,type,area){console.log("编辑组件",id,type,area);var newThemeData=this.themeData;console.log("themeData",this.themeData);var btnList=this.themeData[area][this.bellStatus].btnList;var _index=_.findIndex(btnList,function(item){return item.iconId===id});var tmp=btnList[_index];switch(type){case"delete":btnList[_index].isrender=0;break;case"right":var nextRightBtnIndex=-1;for(var i=_index+1;i<btnList.length;i++){if(btnList[i].part===btnList[_index].part&&btnList[i].isrender==1){nextRightBtnIndex=i;break}}if(nextRightBtnIndex!==-1){btnList[_index]=btnList[nextRightBtnIndex];btnList[nextRightBtnIndex]=tmp}break;case"left":var nextLeftBtnIndex=-1;for(var _i=_index-1;_i>=0;_i--){if(btnList[_i].part===btnList[_index].part&&btnList[_i].isrender==1){nextLeftBtnIndex=_i;break}}if(nextLeftBtnIndex!==-1){btnList[_index]=btnList[nextLeftBtnIndex];btnList[nextLeftBtnIndex]=tmp}break}console.log("new btnList",btnList);newThemeData[area][this.bellStatus].btnList=btnList;this.jSPlugin.Theme.changeTheme(newThemeData)}},{key:"countTime",value:function countTime(type){var start=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var that=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var recordDOM=document.createElement("div");recordDOM.id=this.jSPlugin.id+"time-area";recordDOM.className="time-area";recordDOM.innerHTML='<span class="dot"></span><span class="value">00:00</span>';if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(recordDOM)}}if(this.countTimer){clearInterval(this.countTimer)}if(type==="add"){var i=start;document.getElementById(that.jSPlugin.id+"time-area").style.display="flex";this.countTimer=setInterval(function(){++i;document.getElementById(that.jSPlugin.id+"time-area").children[1].innerHTML=formatSeconds(i)},1e3)}else if(type==="destroy"){if(this.countTimer){clearInterval(this.countTimer)}this.countTimer=undefined;if(document.getElementById(that.jSPlugin.id+"time-area")){document.getElementById(that.jSPlugin.id+"time-area").children[1].innerHTML="00:00";document.getElementById(that.jSPlugin.id+"time-area").style.display="none"}}function formatSeconds(value){var theTime=parseInt(value);var middle=0;var hour=0;var secondV="00";var minV="00";var hourV="00";if(theTime>59){middle=parseInt(theTime/60);theTime=parseInt(theTime%60);if(middle>59){hour=parseInt(middle/60);middle=parseInt(middle%60)}}secondV=parseInt(theTime)>9?parseInt(theTime):"0"+parseInt(theTime);minV=parseInt(middle)>9?parseInt(middle):"0"+parseInt(middle);hourV=parseInt(hour)>9?parseInt(hour):"0"+parseInt(hour);if(hour>0){return hourV+":"+minV+":"+secondV}else if(middle>0){return minV+":"+secondV}else{return"00:"+secondV}}}},{key:"editStart",value:function editStart(callback){console.log("----------editStart1");var audioControlsDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var audioControlsOnCallDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));document.getElementById("".concat(this.jSPlugin.id,"-headControl"));if(audioControlsDOM){audioControlsDOM.setAttribute("class","footer-controls themeEditing")}if(audioControlsOnCallDOM){audioControlsOnCallDOM.setAttribute("class","footer-controls themeEditing")}this.setDecoderState({isEditing:true})}},{key:"editEnd",value:function editEnd(callback){console.log("----------editEnd1");var audioControlsDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var headerMessageDOM=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));var audioControlsOnCallDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));if(headerMessageDOM){headerMessageDOM.setAttribute("class","header-controls")}if(audioControlsDOM){audioControlsDOM.setAttribute("class","footer-controls")}if(audioControlsOnCallDOM){audioControlsOnCallDOM.setAttribute("class","footer-controls")}}},{key:"fetchThemeData",value:function fetchThemeData(themeId){var _this12=this;switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"miniRec":break;default:var successCallback=function successCallback(data){if(data.meta.code==0&&data.data){_this12.activeThemeStatus=true;_this12.themeData=data.data;if(data.data.header){_this12.themeData.header=data.data.header;_this12.themeData.header[_this12.bellStatus].btnList=_this12.themeData.header[_this12.bellStatus].btnList.sort(function(a,b){return a.btnKey.split("-")[3]-b.btnKey.split("-")[3]})}if(data.data.footer){_this12.themeData.footer=data.data.footer;_this12.themeData.footer[_this12.bellStatus].btnList=_this12.themeData.footer[_this12.bellStatus].btnList.sort(function(a,b){return a.btnKey.split("-")[3]-b.btnKey.split("-")[3]})}if(!_this12.jSPlugin.capacity){setTimeout(function(){_this12.initThemeData();_this12.renderThemeData()},300)}else{_this12.initThemeData();_this12.renderThemeData()}}else{_this12.activeThemeStatus=false;_this12.jSPlugin.pluginStatus.loadingClear();_this12.setDecoderState({rejection:true});if(data.meta.code=="111021"){_this12.jSPlugin.pluginStatus.loadingSetText({text:"无效的模板id",color:"#fff",type:1});_this12.activeThemeStatusTxt="无效的模板id"}else if(data.meta.code=="111023"){_this12.jSPlugin.pluginStatus.loadingSetText({text:"您的试用特权已到期,需前往轻应用控制台购买后使用。",color:"#fff",type:1});_this12.activeThemeStatusTxt="试用特权已到期"}else{_this12.jSPlugin.pluginStatus.loadingSetText({text:"模板未激活,请先在开放平台轻应用控制台购买模板",color:"#fff",type:1});_this12.activeThemeStatusTxt="模板未激活"}_this12.themeData=mobileCallData.data;_this12.initThemeData();_this12.renderThemeData()}};var errorCallback=function errorCallback(){_this12.renderThemeData()};templateDetailApi(this.jSPlugin,themeId,successCallback,errorCallback);break}}},{key:"getCallDeviceInfo",value:function getCallDeviceInfo(){var _this13=this;this.videoWidth/375||1;var deviceAPISuccess=function deviceAPISuccess(data){if(data.code==200&&data.data){_this13.deviceInfoData=data.data;console.log("------------getDeviceInfo");if(data.data.isEncrypt){console.log("小窗口miniRecCloseClick------------设备已加密");_this13.miniRecCloseClick();setTimeout(function(){_this13.jSPlugin.pluginStatus.loadingClear();_this13.jSPlugin.pluginStatus.loadingSetText({text:"视频已加密",color:"#fff"})},50)}if(document.getElementById("header-".concat(_this13.bellStatus,"-deviceCategory"))){document.getElementById("header-".concat(_this13.bellStatus,"-deviceCategory")).innerText=""+data.data.deviceName}}if(data.code==20018&&!_this13.jSPlugin.isWebConsole){_this13.userNoDevice()}};request(this.jSPlugin.env.domain+"/api/lapp/device/info","POST",{accessToken:this.jSPlugin.accessToken,deviceSerial:matchEzopenUrl(this.jSPlugin.url).deviceSerial},"",deviceAPISuccess)}},{key:"setHeaderText",value:function setHeaderText(headerText){console.log("setHeaderText");var sizeRatio=this.videoWidth/375||1;if(document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content"))){document.getElementById("".concat(this.jSPlugin.id,"-deviceCategory-content")).innerHTML='<span style="font-size: '.concat(24*sizeRatio,'px;display: block">').concat(headerText,'</span><span style="font-size: ').concat(14*sizeRatio,"px;padding-top: ").concat(5*sizeRatio,'px;display: block;">').concat(this.deviceInfoData&&this.deviceInfoData.category||"","</span>")}}}]);return MobileCall}();var CallTheme=function(){function CallTheme(jSPlugin){_classCallCheck$1(this,CallTheme);this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.autoFocus=0,this.autoFocusTimer=null,this.decoderState={state:{isEditing:false,play:false,sound:false,recordvideo:false,recordCount:"00:00",talk:false,mute:false,rejection:false,cloudRec:matchEzopenUrl(jSPlugin.url).type==="cloud.rec",rec:matchEzopenUrl(jSPlugin.url).type==="rec",type:matchEzopenUrl(jSPlugin.url).type}};console.log("matchEzopenUrl(jSPlugin.url)",matchEzopenUrl(jSPlugin.url),this.decoderState.state);this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if(typeof jSPlugin.isMobile!=="undefined"){this.isMobile=jSPlugin.isMobile}this.themeData={};if(this.jSPlugin.themeId=="themeData"){this.themeData=this.jSPlugin.params.themeData}if(this.jSPlugin.themeId){if(this.isMobile){this.call=new MobileCall(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState)}else{this.call=new Call(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState)}switch(this.jSPlugin.themeId){case"themeData":this.themeData=this.jSPlugin.params.themeData;this.call.initThemeData();this.call.renderThemeData();break;default:this.call.fetchThemeData(this.jSPlugin.themeId);break}}if(!this.jSPlugin.Talk){this.jSPlugin.Talk=new Talk(this.jSPlugin)}addCss("".concat(this.jSPlugin.staticPath,"/speed/speed.css"));addCss("".concat(this.jSPlugin.staticPath,"/css/theme.css"))}_createClass$1(CallTheme,[{key:"changeTheme",value:function changeTheme(options){var editStatus=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var bellStatus=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"onBell";if(typeof options==="string"){this.jSPlugin.themeId=options;switch(this.jSPlugin.themeId){case"pcLive":case"mobileCall":case"webCall":this.call.initThemeData();this.call.renderThemeData();break;default:this.call.fetchThemeData(options);break}}else if(_typeof(options)==="object"){this.themeData=options;this.call.setThemeData(options,bellStatus);this.call.initThemeData();this.call.renderThemeData();if(this.decoderState.state.isEditing&&editStatus){this.call.editStart()}}if(this.jSPlugin&&this.jSPlugin.handleThemeChange){this.jSPlugin.handleThemeChange(options)}}},{key:"setDecoderState",value:function setDecoderState(options,backgroundColor){var _this=this;var _this$themeData=this.themeData;_this$themeData.header;_this$themeData.footer;Object.keys(options).map(function(item){switch(item){case"mute":if(document.getElementById("".concat(_this.jSPlugin.id,"-icon-mute"))){console.log("mute");if(options[item]){document.getElementById("".concat(_this.jSPlugin.id,"-icon-mute")).style.background=backgroundColor;document.getElementById("".concat(_this.jSPlugin.id,"-icon-mute")).style.border=" 1px solid ".concat(backgroundColor);document.getElementById("icon-mute-path").style.fill="#ffffff"}else{document.getElementById("".concat(_this.jSPlugin.id,"-icon-mute")).style.background="#ffffff";document.getElementById("".concat(_this.jSPlugin.id,"-icon-mute")).style.border="1px solid ".concat(backgroundColor);document.getElementById("icon-mute-path").style.fill=backgroundColor}}break}_this.decoderState.state=Object.assign(_this.decoderState.state,options)})}},{key:"startAutoFocus",value:function startAutoFocus(){var _this2=this;var autoFocus=this.autoFocus;if(this.autoFocusTimer){clearTimeout(this.autoFocusTimer)}this.autoFocusTimer=setTimeout(function(){if(document.getElementById("".concat(_this2.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(_this2.jSPlugin.id,"-audioControls")).style.opacity=0;document.getElementById("".concat(_this2.jSPlugin.id,"-audioControls")).style.pointerEvents="none"}},autoFocus*1e3)}},{key:"stopAutoFocus",value:function stopAutoFocus(){if(document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.opacity=1;document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.pointerEvents="all"}if(this.autoFocusTimer){clearTimeout(this.autoFocusTimer)}this.startAutoFocus()}},{key:"toString",value:function toString(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"editIcon",value:function editIcon(id,type,area){console.log("编辑组件",id,type,area);var newThemeData=this.themeData;console.log("themeData",this.themeData);var btnList=this.themeData[area].btnList;var _index=_.findIndex(btnList,function(item){return item.iconId===id});var tmp=btnList[_index];switch(type){case"delete":if(id==="rec"){if(_.findIndex(btnList,function(item){return item.iconId==="cloudRec"&&item.isrender==1})===-1){if(this.jSPlugin.Message){this.jSPlugin.Message["default"]("必须选中一种存储介质")}return false}}else if(id==="cloudRec"){if(_.findIndex(btnList,function(item){return item.iconId==="rec"&&item.isrender==1})===-1){if(this.jSPlugin.Message){this.jSPlugin.Message["default"]("必须选中一种存储介质")}return false}}btnList[_index].isrender=0;break;case"right":var nextRightBtnIndex=-1;for(var i=_index+1;i<btnList.length;i++){if(btnList[i].part===btnList[_index].part&&btnList[i].isrender==1){nextRightBtnIndex=i;break}}if(nextRightBtnIndex!==-1){btnList[_index]=btnList[nextRightBtnIndex];btnList[nextRightBtnIndex]=tmp}break;case"left":var nextLeftBtnIndex=-1;for(var _i=_index-1;_i>=0;_i--){if(btnList[_i].part===btnList[_index].part&&btnList[_i].isrender==1){nextLeftBtnIndex=_i;break}}if(nextLeftBtnIndex!==-1){btnList[_index]=btnList[nextLeftBtnIndex];btnList[nextLeftBtnIndex]=tmp}break}console.log("new btnList",btnList);newThemeData[area].btnList=btnList;this.changeTheme(newThemeData)}},{key:"countTime",value:function countTime(type){var start=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var that=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var recordDOM=document.createElement("div");recordDOM.id=this.jSPlugin.id+"time-area";recordDOM.className="time-area";recordDOM.innerHTML='<span class="dot"></span><span class="value">00:00</span>';if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(recordDOM)}}if(this.countTimer){clearInterval(this.countTimer)}if(type==="add"){var i=start;document.getElementById(that.jSPlugin.id+"time-area").style.display="flex";this.countTimer=setInterval(function(){++i;document.getElementById(that.jSPlugin.id+"time-area").children[1].innerHTML=formatSeconds(i)},1e3)}else if(type==="destroy"){if(this.countTimer){clearInterval(this.countTimer)}this.countTimer=undefined;if(document.getElementById(that.jSPlugin.id+"time-area")){document.getElementById(that.jSPlugin.id+"time-area").children[1].innerHTML="00:00";document.getElementById(that.jSPlugin.id+"time-area").style.display="none"}}function formatSeconds(value){var theTime=parseInt(value);var middle=0;var hour=0;var secondV="00";var minV="00";var hourV="00";if(theTime>59){middle=parseInt(theTime/60);theTime=parseInt(theTime%60);if(middle>59){hour=parseInt(middle/60);middle=parseInt(middle%60)}}secondV=parseInt(theTime)>9?parseInt(theTime):"0"+parseInt(theTime);minV=parseInt(middle)>9?parseInt(middle):"0"+parseInt(middle);hourV=parseInt(hour)>9?parseInt(hour):"0"+parseInt(hour);if(hour>0){return hourV+":"+minV+":"+secondV}else if(middle>0){return minV+":"+secondV}else{return"00:"+secondV}}}},{key:"editStart",value:function editStart(callback){var audioControlsDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var audioControlsOnCallDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls-onCall"));var headerMessageDOM=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));if(headerMessageDOM){headerMessageDOM.setAttribute("class","header-controls themeEditing")}if(audioControlsDOM){audioControlsDOM.setAttribute("class","footer-controls themeEditing")}if(audioControlsOnCallDOM){audioControlsOnCallDOM.setAttribute("class","footer-controls themeEditing")}this.setDecoderState({isEditing:true})}},{key:"editEnd",value:function editEnd(callback){var audioControlsDOM=document.getElementById("".concat(this.jSPlugin.id,"-audioControls"));var headerMessageDOM=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));if(headerMessageDOM){headerMessageDOM.setAttribute("class","header-controls")}if(audioControlsDOM){audioControlsDOM.setAttribute("class","footer-controls")}this.setDecoderState({isEditing:false})}},{key:"setDisabled",value:function setDisabled(status){}},{key:"getDeviceInfo",value:function getDeviceInfo(){var _this3=this;var sizeRatio=this.videoWidth/1024||1;var deviceAPISuccess=function deviceAPISuccess(data){if(data.code==200&&data.data){if(data.data.isEncrypt){setTimeout(function(){_this3.jSPlugin.pluginStatus.loadingClear();_this3.jSPlugin.pluginStatus.loadingSetText({text:"视频已加密",color:"#fff"})},50)}if(document.getElementById("".concat(_this3.jSPlugin.id,"-deviceCategory-content"))){document.getElementById("".concat(_this3.jSPlugin.id,"-deviceCategory-content")).style.maxWidth="100%";document.getElementById("".concat(_this3.jSPlugin.id,"-deviceCategory-content")).style.overflow="hidden";document.getElementById("".concat(_this3.jSPlugin.id,"-deviceCategory-content")).style.textOverflow="ellipsis";document.getElementById("".concat(_this3.jSPlugin.id,"-deviceCategory-content")).style.whiteSpace="nowrap";document.getElementById("".concat(_this3.jSPlugin.id,"-deviceCategory-content")).innerHTML='<span style="font-size: '.concat(32*sizeRatio,'px;display: block">有人按门铃</span><span style="font-size: ').concat(24*sizeRatio,"px;padding-top: ").concat(16*sizeRatio,'px;display: block;">').concat(data.data.category,"</span>")}}};request(this.jSPlugin.env.domain+"/api/lapp/device/info","POST",{accessToken:this.jSPlugin.accessToken,deviceSerial:matchEzopenUrl(this.jSPlugin.url).deviceSerial},"",deviceAPISuccess)}}]);return CallTheme}();var Timer=function(){function Timer(jSPlugin){_classCallCheck$1(this,Timer);this.jSPlugin=jSPlugin;var timer=window["EZUIKIT_TIMER_INTERVAL_".concat(jSPlugin.id)];if(timer&&Object.keys(timer).length>0){this.resetTimer()}window["EZUIKIT_TIMER_INTERVAL_".concat(jSPlugin.id)]={}}_createClass$1(Timer,[{key:"createInterval",value:function createInterval(key,fn,time){var timer=window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];timer[key]=setInterval(fn,time)}},{key:"clearTimer",value:function clearTimer(key){var timer=window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];if(timer[key]){clearInterval(timer[key]);delete timer[key]}}},{key:"resetTimer",value:function resetTimer(){var timer=window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];for(var key in timer){clearInterval(timer[key]);delete timer[key]}}}]);return Timer}();var InspectMap=_createClass$1(function InspectMap(jSPlugin){var _this=this;_classCallCheck$1(this,InspectMap);_defineProperty(this,"initMap",function(){var that=_this;var clientWidth=_this.videoWidth;if(!document.getElementById("".concat(_this.jSPlugin.id,"-miniRecbox"))){var objDOM=document.createElement("div");objDOM.id="".concat(_this.jSPlugin.id,"-miniRecbox");objDOM.style=";position: absolute;bottom:96px;right:0;";objDOM.innerHTML='<div  id="'.concat(_this.jSPlugin.id,'-mapbox" style="\n        width: ').concat(clientWidth*.3333,"px;\n        height: ").concat(clientWidth*.3333*.5625,'px;\n      "></div>');document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).insertBefore(objDOM,document.getElementById("".concat(_this.jSPlugin.id,"-ez-iframe-footer-container")));that.map=that.loadMap("".concat(_this.jSPlugin.id,"-mapbox"))}else{document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).removeChild(document.getElementById("".concat(_this.jSPlugin.id,"-miniRecbox")));_this.initMap()}return that.map});_defineProperty(this,"loadMap",function(id){var map=new BMapGL.Map(id);map.centerAndZoom(new BMapGL.Point(116.297611,40.047363),15);map.enableScrollWheelZoom(true);return map});_defineProperty(this,"createCircle",function(lng,lat,radius,inspectPointName){var point=new BMapGL.Point(lng,lat);var marker=new BMapGL.Marker(point,{title:inspectPointName});_this.map.addOverlay(marker);if(radius==0)return;var circle=new BMapGL.Circle(new BMapGL.Point(lng,lat),radius,{strokeColor:"#ff4d4f",strokeWeight:4,strokeOpacity:1,strokeStyle:"dashed",fillOpacity:0});_this.map.addOverlay(circle)});_defineProperty(this,"createInspectPoints",function(inspectPoints){inspectPoints.map(function(v){_this.createCircle(v.longitude,v.latitude,v.radius,v.inspectPointName)})});_defineProperty(this,"createPolygon",function(path){var color=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"#407AFF";var strokeStyle=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"solid";var strokeWeight=arguments.length>3&&arguments[3]!==undefined?arguments[3]:4;var strokeOpacity=arguments.length>4&&arguments[4]!==undefined?arguments[4]:1;var fillColor=arguments.length>5&&arguments[5]!==undefined?arguments[5]:"407AFF";var fillOpacity=arguments.length>6&&arguments[6]!==undefined?arguments[6]:0;var pathArr=[];var pathList=path.split(";");pathList.map(function(v){var point=v.split(",");pathArr.push(new BMapGL.Point(point[0],point[1]))});_this.inspectRange=new BMapGL.Polygon(pathArr,{strokeColor:color,strokeWeight:strokeWeight,strokeOpacity:strokeOpacity,strokeStyle:strokeStyle,fillOpacity:fillOpacity,fillColor:fillColor});_this.map.addOverlay(_this.inspectRange)});_defineProperty(this,"createTrack",function(path){var isFirst=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var color=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"#18C796";var strokeStyle=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"solid";var strokeWeight=arguments.length>4&&arguments[4]!==undefined?arguments[4]:4;var strokeOpacity=arguments.length>5&&arguments[5]!==undefined?arguments[5]:1;var fillOpacity=arguments.length>6&&arguments[6]!==undefined?arguments[6]:0;var tilt=arguments.length>7&&arguments[7]!==undefined?arguments[7]:0;var duration=arguments.length>8&&arguments[8]!==undefined?arguments[8]:500;var delay=arguments.length>9&&arguments[9]!==undefined?arguments[9]:0;var overallView=arguments.length>10&&arguments[10]!==undefined?arguments[10]:false;var point=[];path.map(function(v){var isExist=false;if(_this.currentTrack.length>0){_this.currentTrack.map(function(v1){if(v1.longitude===v.longitude&&v1.latitude===v.latitude&&v1.reportTime===v.reportTime){isExist=true}})}if(!isExist){if(point.length==0&&_this.currentTrack.length>0){point.push(new BMapGL.Point(_this.currentTrack[_this.currentTrack.length-1].longitude,_this.currentTrack[_this.currentTrack.length-1].latitude))}point.push(new BMapGL.Point(v.longitude,v.latitude))}});if(point.length==0)return;var pl=new BMapGL.Polyline(point,{strokeColor:color,strokeWeight:strokeWeight,strokeOpacity:strokeOpacity,strokeStyle:strokeStyle,fillOpacity:fillOpacity});if(isFirst){_this.map.addOverlay(pl);_this.map.centerAndZoom(point[point.length-1],15)}else{_this.trackAni=new BMapGLLib.TrackAnimation(_this.map,pl,{overallView:overallView,tilt:tilt,duration:duration,delay:delay});_this.trackAni.start()}_this.currentTrack=path;if(_this.currentTrack.length>0){if(_this.currentTrack.length>0){var firstPoint=new BMapGL.Point(_this.currentTrack[0].longitude,_this.currentTrack[0].latitude);_this.startPoint=new BMapGL.Marker(firstPoint,{icon:new BMapGL.Icon("".concat(_this.jSPlugin.staticPath,"/imgs/start.png"),new BMapGL.Size(32,47)),offset:new BMapGL.Size(0,-17)});_this.map.addOverlay(_this.startPoint);if(_this.currentTrack.length==1)return;var _point=new BMapGL.Point(_this.currentTrack[_this.currentTrack.length-1].longitude,_this.currentTrack[_this.currentTrack.length-1].latitude);if(_this.endPoint){_this.map.removeOverlay(_this.endPoint)}setTimeout(function(){_this.endPoint=new BMapGL.Marker(_point,{icon:new BMapGL.Icon("".concat(_this.jSPlugin.staticPath,"/imgs/end.png"),new BMapGL.Size(30,30))});_this.map.addOverlay(_this.endPoint)},isFirst?0:duration)}}});_defineProperty(this,"centerToTrack",function(){var lv=arguments.length>0&&arguments[0]!==undefined?arguments[0]:15;if(_this.currentTrack.length>0){if(_this.currentTrack.length==1){_this.map.centerAndZoom(new BMapGL.Point(_this.currentTrack[0].longitude,_this.currentTrack[0].latitude),lv)}else{_this.map.centerAndZoom(new BMapGL.Point(_this.currentTrack[_this.currentTrack.length-1].longitude,_this.currentTrack[_this.currentTrack.length-1].latitude),lv)}}});this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.toastCustom=new ToastCustom(jSPlugin,false);this.currentTrack=[];this.startPoint=null;this.endPoint=null;this.trackAni=null;this.inspectRange=null;this.map=this.initMap()});var GlobalContainer=_createClass$1(function GlobalContainer(jSPlugin){var _this=this;_classCallCheck$1(this,GlobalContainer);_defineProperty(this,"init",function(){var that=_this;var clientWidth=_this.videoWidth+290;var clientHeight=_this.videoHeight+170;if(!document.getElementById("".concat(_this.jSPlugin.id,"-inspect-global-box"))){var objDOM=document.createElement("div");objDOM.id="".concat(_this.jSPlugin.id,"-inspect-global-box");objDOM.style=";position: absolute; left:0; top: 0; width: ".concat(clientWidth,"px; height: ").concat(clientHeight,"px; z-index: 10000; width: ").concat(_this.videoWidth+290,"px; height: ").concat(_this.videoHeight+170,"px;");objDOM.innerHTML='<div id="'.concat(_this.jSPlugin.id,'-inspect-loading-box" style="\n        overflow: auto;\n        box-sizing: border-box;\n        font-size: 14px;\n        color: #595959;\n        line-height: 24px;\n        font-weight: bold;\n        padding-top: ').concat((clientHeight-80)/2,'px;\n        width: 100%;\n        height: 100%;\n        background: #fff; \n      ">\n      <div style="text-align:center;"><div type="default" class="ezuikit-spin ezuikit-spin-spinning"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div></div>\n      <div style="color: #595959; font-size:14px; font-weight: 400; text-align: center;">加载中…</div>\n      </div>\n      ');document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).parentNode.appendChild(objDOM)}else{if(document.getElementById("".concat(_this.jSPlugin.id,"-inspect-global-box"))){document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).parentNode.removeChild(document.getElementById("".concat(_this.jSPlugin.id,"-inspect-global-box")))}that.init()}});_defineProperty(this,"deviceErrorInfo",function(opt,callback){var defaultOpt={tips:"",refreshBtn:"",refreshShow:false};var options=Object.assign(defaultOpt,opt);if(!document.getElementById("".concat(_this.jSPlugin.id,"-no-inspect-box"))){_this.videoHeight+170;var objDOM=document.createElement("div");objDOM.id="".concat(_this.jSPlugin.id,"-no-inspect-box");objDOM.style="width:100%;height:100%; background: #ffffff; display: flex; justify-content: center; align-items: center";objDOM.innerHTML='<div style="\n        overflow: auto;\n        box-sizing: border-box;\n        font-size: 14px;\n        color: #595959;\n        text-align: center;\n      ">\n      <div style="text-align:center; height: 21px;">\n      <svg t="1689074472491" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7172" xmlns:xlink="http://www.w3.org/1999/xlink" width="21" height="21"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z" fill="#FF4D4F" p-id="7173"></path></svg>\n      </div>\n      <div style="color: #595959; font-size:14px; margin: 5px 0 16px;font-weight: 400; text-align: center;">'.concat(options.tips,'</div>\n      <button id="').concat(_this.jSPlugin.id,'-inspect-device-status-refresh" style="display: ').concat(options.refreshShow?"block":"none",';  width: 80px; margin: 0 auto;" type="button" class="ezuikit-btn ezuikit-btn-primary"><span>').concat(options.refreshBtn,"</span></button>\n      </div>\n      ");document.getElementById("".concat(_this.jSPlugin.id,"-inspect-global-box")).appendChild(objDOM);document.getElementById("".concat(_this.jSPlugin.id,"-inspect-device-status-refresh")).addEventListener("click",function(){callback&&callback()})}else{if(document.getElementById("".concat(_this.jSPlugin.id,"-no-inspect-box"))){document.getElementById("".concat(_this.jSPlugin.id,"-inspect-global-box")).removeChild(document.getElementById("".concat(_this.jSPlugin.id,"-no-inspect-box")))}_this.deviceErrorInfo(opt,callback)}});_defineProperty(this,"globalContainerToggle",function(id,isShow){if(document.getElementById(id)){document.getElementById(id).style.display=isShow?"block":"none"}});this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.videoHeight=jSPlugin.height;this.toastCustom=new ToastCustom(jSPlugin,false);this.init()});var Message=function(){function Message(params){_classCallCheck$1(this,Message);this.timer=null;var defaultParams={wrapNode:document.body,time:2e3,content:"",type:"info",center:false,top:8};this.params=_objectSpread2(_objectSpread2({},defaultParams),params);this.init()}_createClass$1(Message,[{key:"init",value:function init(){var _this=this;this.timer=null;var _this$params=this.params,wrapNode=_this$params.wrapNode,content=_this$params.content,time=_this$params.time,type=_this$params.type,center=_this$params.center,top=_this$params.top;this.wrapNode=wrapNode;var wrapToast=document.createElement("div");wrapToast.setAttribute("class","ezuikit-message");if(center){wrapToast.setAttribute("style","top: 50%; transform: translateY(-50%);")}else{wrapToast.setAttribute("style","top: ".concat(top||0,"px;"))}this.wrapNode.appendChild(wrapToast);this.initMessageContent(type,content,wrapToast);if(time===0)return;this.timer=setTimeout(function(){_this.wrapNode.removeChild(wrapToast)},time||2e3)}},{key:"initMessageContent",value:function initMessageContent(type,content,wrapToast){var messageContent=document.createElement("div");messageContent.setAttribute("class","ezuikit-message-notice");messageContent.innerHTML='\n\t\t\t<div class="ezuikit-message-notice-content">\n\t\t\t\t<div class="ezuikit-message-custom-content ezuikit-message-'.concat(type,'">\n\t\t\t\t\t<span role="img" aria-label="check-circle" class="ezdicon ezdicon-check-circle">\n\t\t\t\t\t\t').concat(type==="warning"?'<svg fill="currentColor" t="1691567271942" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z"></path></svg>':"","\n\t\t\t\t\t\t").concat(type==="info"?'<svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>':"","\n\t\t\t\t\t\t").concat(type==="error"?'<svg fill="currentColor" t="1691567308585" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m165.376 618.24l-65.92-0.32L512 563.392l-99.328 118.4-66.048 0.32a7.936 7.936 0 0 1-8-8c0-1.92 0.64-3.712 1.92-5.184L470.528 513.92 340.48 359.04a8 8 0 0 1 6.08-13.184l66.112 0.256L512 464.576l99.328-118.4 65.92-0.256c4.48 0 8.064 3.456 8.064 8a8.32 8.32 0 0 1-1.92 5.12l-129.92 154.944 130.048 155.008a8 8 0 0 1-6.08 13.184z"></path></svg>':"","\n\t\t\t\t\t\t").concat(type==="success"?'<svg fill="currentColor" viewBox="64 64 896 896" focusable="false" data-icon="check-circle" width="1em" height="1em" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path></svg>':"","\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>").concat(content,"</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t");wrapToast.appendChild(messageContent)}}]);return Message}();var Image$1=function(){function Image(params){_classCallCheck$1(this,Image);var defaultParams={id:"",width:"100%",height:"100%",preview:true,showIcon:true,src:"",alt:"",fallback:"https://img.ys7.com/group32/M00/81/9D/CtxIA2HnrGyADm_jAAAFfWjIDJs811.png"};this.params=_objectSpread2(_objectSpread2({},defaultParams),params);this.id=Math.random().toString(36).substr(2);this.init()}_createClass$1(Image,[{key:"init",value:function init(){var _this$params=this.params,id=_this$params.id,width=_this$params.width,height=_this$params.height,preview=_this$params.preview;if(document.getElementById(id)){var imgWrap=document.createElement("div");imgWrap.setAttribute("class","ezuikit-image");imgWrap.setAttribute("style","width:".concat(width,";height:").concat(height,";"));document.getElementById(id).appendChild(imgWrap);this.initImage(imgWrap);if(preview){this.initPreview(imgWrap)}}}},{key:"previewImg",value:function previewImg(){var _this$params2=this.params,src=_this$params2.src,alt=_this$params2.alt,fallback=_this$params2.fallback;var previewImg=document.createElement("div");previewImg.setAttribute("id",this.id+"-preview");previewImg.setAttribute("class","ezuikit-image-preview");previewImg.innerHTML='\n\t\t\t<div class="ezuikit-image-preview-mask"></div>\n\t\t\t<div class="ezuikit-image-preview-img-wrapper">\n\t\t\t\t<div class="ezuikit-image-preview-operations" id="'.concat(this.id,'-ezuikit-image-preview-operations">\n\t\t\t\t\t<div class="ezuikit-image-preview-operations-operation">\n\t\t\t\t\t\t<span role="img" aria-label="close" class="anticon anticon-close ezuikit-image-preview-operations-icon">\n\t\t\t\t\t\t\t<svg viewBox="64 64 896 896" focusable="false" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ezuikit-image-preview-wrap">\n\t\t\t\t\t<div class="ezuikit-image-preview-img-main"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t');var Img=document.createElement("img");Img.setAttribute("class","ezuikit-image-preview-img");Img.setAttribute("alt",alt);Img.setAttribute("src",src);Img.addEventListener("error",function(){Img.setAttribute("src",fallback)});document.body.appendChild(previewImg);previewImg.querySelector(".ezuikit-image-preview-img-main").appendChild(Img);document.getElementById(this.id+"-ezuikit-image-preview-operations").addEventListener("click",function(){document.body.removeChild(previewImg)})}},{key:"initImage",value:function initImage(imgWrap){var _this$params3=this.params,src=_this$params3.src,alt=_this$params3.alt,fallback=_this$params3.fallback;var Img=document.createElement("img");Img.setAttribute("class","ezuikit-image-img");Img.setAttribute("alt",alt);Img.setAttribute("src",src);Img.addEventListener("error",function(){Img.setAttribute("src",fallback)});imgWrap.appendChild(Img)}},{key:"initPreview",value:function initPreview(imgWrap){var _this=this;var showIcon=this.params.showIcon;var previewWrap=document.createElement("div");previewWrap.setAttribute("class","ezuikit-image-mask");if(showIcon){previewWrap.innerHTML='\n\t\t\t\t<div class="ezuikit-image-mask-info">\n\t\t\t\t\t<span class="ezuikit-image-anticon-eye">\n\t\t\t\t\t\t<svg viewBox="64 64 896 896" focusable="false" data-icon="eye" width="1em" height="1em"  aria-hidden="true"><path d="M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"></path></svg>\n\t\t\t\t\t\t预览\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t'}imgWrap.appendChild(previewWrap);imgWrap.onclick=function(){_this.previewImg()}}}]);return Image}();var Popover=function(){function Popover(params){_classCallCheck$1(this,Popover);var defaultParams={id:"",parentNodeId:"",title:"",content:"",placement:"top",cancelText:"取消",arrowPointAtCenter:false,okText:"确定",onCancel:function onCancel(){},onConfirm:function onConfirm(){}};this.params=_objectSpread2(_objectSpread2({},defaultParams),params);this.initState=false;this.init(params)}_createClass$1(Popover,[{key:"init",value:function init(){var _this=this;var _this$params=this.params,id=_this$params.id,content=_this$params.content,placement=_this$params.placement,title=_this$params.title;var popoverNode=document.getElementById(id);if(popoverNode){var popover=document.createElement("div");popover.setAttribute("id",id+"-popover");popover.setAttribute("class","ezuikit-popover");popover.setAttribute("style","display:none;");popover.innerHTML='\n\t\t\t\t\t<div class="ezuikit-popover-arrow">\n\t\t\t\t\t\t<span class="ezuikit-popover-arrow-content"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ezuikit-popover-inner">\n\t\t\t\t\t\t'.concat(title?'<div class="ezuikit-popover-title">'.concat(title,"</div>"):"",'\n\t\t\t\t\t\t<div class="ezuikit-popover-inner-content">').concat(content,"</div>\n\t\t\t\t\t</div>\n\t\t\t\t");if(!document.getElementById(id+"-popover")){var parentNode=document.body;if(this.params.parentNodeId){parentNode=document.getElementById(this.params.parentNodeId)}parentNode.appendChild(popover);this.renderPopover(popover,popoverNode,placement)}document.body.addEventListener("click",function(e){_this.addEventListenerFn(e)})}}},{key:"addEventListenerFn",value:function addEventListenerFn(e){var id=this.params.id;var popoverNode=document.getElementById(id);var popover=document.getElementById(id+"-popover");if(popoverNode&&!(e.target===popoverNode||popoverNode.contains(e.target))){if(popover&&!(e.target===popover||popover.contains(e.target))){this.hidePopover()}}}},{key:"hidePopover",value:function hidePopover(){var id=this.params.id;var popover=document.getElementById(id+"-popover");if(popover){document.body.removeChild(popover)}}},{key:"renderPopover",value:function renderPopover(popover,popoverNode,placement,popoverWidthRefresh,popoverHeightRefresh){popover.style.display="block";var _popoverNode$getBound=popoverNode.getBoundingClientRect(),top=_popoverNode$getBound.top,left=_popoverNode$getBound.left,width=_popoverNode$getBound.width,height=_popoverNode$getBound.height;var _popover$getBoundingC=popover.getBoundingClientRect(),popoverWidth=_popover$getBoundingC.width,popoverHeight=_popover$getBoundingC.height;if(popoverWidthRefresh){popoverWidth=popoverWidthRefresh}if(popoverHeightRefresh){popoverHeight=popoverHeightRefresh}var parentNode=document.body;if(this.params.parentNodeId){parentNode=document.getElementById(this.params.parentNodeId)}var arrowPointAtCenter=this.params.arrowPointAtCenter;var topOffset=0;var leftOffset=0;var arrow=popover.getElementsByClassName("ezuikit-popover-arrow")[0];var _arrow$getBoundingCli=arrow.getBoundingClientRect(),arrowWidth=_arrow$getBoundingCli.width,arrowHeight=_arrow$getBoundingCli.height;if(arrowPointAtCenter){var arrowLeft=0;var arrowTop=0;switch(placement){case"top":arrowLeft=popoverWidth/2;arrowTop=popoverHeight;break;case"bottom":arrowLeft=popoverWidth/2;arrowTop=0;break;case"left":arrowLeft=popoverWidth;arrowTop=popoverHeight/2;break;case"right":arrowLeft=0;arrowTop=popoverHeight/2;break;case"topLeft":arrowLeft=(width-arrowWidth)/2;arrowTop=popoverHeight;break;case"topRight":arrowLeft=popoverWidth-(width+arrowWidth)/2;arrowTop=popoverHeight;break;case"bottomLeft":arrowLeft=(width-arrowWidth)/2;arrowTop=0;break;case"bottomRight":arrowLeft=popoverWidth-(width+arrowWidth)/2;arrowTop=0;break;case"leftTop":arrowLeft=popoverWidth;arrowTop=(height-arrowHeight)/2;break;case"leftBottom":arrowLeft=popoverWidth;arrowTop=popoverHeight-(height+arrowHeight)/2;break;case"rightTop":arrowLeft=0;arrowTop=(height-10)/2;break;case"rightBottom":arrowLeft=0;arrowTop=popoverHeight-(height+arrowHeight)/2;break;default:arrowLeft=popoverWidth/2;arrowTop=popoverHeight;break}arrow.style.left=arrowLeft+"px";arrow.style.top=arrowTop+"px"}switch(placement){case"top":topOffset=-(popoverHeight+arrowHeight);leftOffset=(width-popoverWidth)/2;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-top");break;case"bottom":topOffset=height-arrowHeight/2;leftOffset=(width-popoverWidth)/2;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottom");break;case"left":topOffset=(height-popoverHeight)/2;leftOffset=-(popoverWidth+arrowWidth/2);popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-left");break;case"right":topOffset=(height-popoverHeight)/2;leftOffset=width-arrowWidth/2;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-right");break;case"topLeft":topOffset=-(popoverHeight+arrowHeight);leftOffset=0;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-topLeft");break;case"topRight":topOffset=-(popoverHeight+arrowHeight);leftOffset=width-popoverWidth;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-topRight");break;case"bottomLeft":topOffset=height-arrowHeight/2;leftOffset=0;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottomLeft");break;case"bottomRight":topOffset=height-arrowHeight/2;leftOffset=width-popoverWidth;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-bottomRight");break;case"leftTop":topOffset=0;leftOffset=-(popoverWidth+arrowWidth/2);popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-leftTop");break;case"leftBottom":topOffset=height-popoverHeight;leftOffset=-(popoverWidth+arrowWidth/2);popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-leftBottom");break;case"rightTop":topOffset=0;leftOffset=width-arrowWidth/2;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-rightTop");break;case"rightBottom":topOffset=height-popoverHeight;leftOffset=width-arrowWidth/2;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-rightBottom");break;default:topOffset=-popoverHeight;leftOffset=(width-popoverWidth)/2;popover.setAttribute("class","ezuikit-popover ezuikit-popover-placement-top");break}var scrollTop=document.documentElement.scrollTop||document.body.scrollTop;var scrollLeft=document.documentElement.scrollLeft||document.body.scrollLeft;popover.style.top=top+scrollTop+topOffset+"px";popover.style.left=left+scrollLeft+leftOffset+"px";var popoverRect=popover.getBoundingClientRect();var parentRect=parentNode===document.body?{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}:parentNode.getBoundingClientRect();var newPlacement=placement;if(popoverRect.left<parentRect.left){newPlacement=newPlacement.replace("Right","Left");newPlacement=newPlacement.replace("right","left")}if(popoverRect.right>parentRect.right){newPlacement=newPlacement.replace("Left","Right");newPlacement=newPlacement.replace("left","right")}if(popoverRect.top<parentRect.top){newPlacement=newPlacement.replace("Top","Bottom");newPlacement=newPlacement.replace("top","bottom")}if(popoverRect.bottom>parentRect.bottom){newPlacement=newPlacement.replace("Bottom","Top");newPlacement=newPlacement.replace("bottom","top")}if(newPlacement!==placement){this.renderPopover(popover,popoverNode,newPlacement,popoverWidth,popoverHeight)}}}]);return Popover}();var Popconfirm=function(){function Popconfirm(params){_classCallCheck$1(this,Popconfirm);var defaultParams={id:"",content:"",placement:"top",cancelText:"取消",arrowPointAtCenter:false,okText:"确定",onCancel:function onCancel(){},onConfirm:function onConfirm(){}};this.params=_objectSpread2(_objectSpread2({},defaultParams),params);this.PopconfirmDom=null;this.init(params)}_createClass$1(Popconfirm,[{key:"init",value:function init(){var _this=this;var _this$params=this.params,content=_this$params.content,cancelText=_this$params.cancelText,okText=_this$params.okText,onCancel=_this$params.onCancel,onConfirm=_this$params.onConfirm;var contentDom=document.createElement("div");contentDom.innerHTML='\n      <div class="ezuikit-confirm">\n        <div class="ezuikit-confirm-content">\n\t\t\t\t\t<span class="ezuikit-confirm-icon">\n          \t<svg fill="currentColor" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z"></path></svg>\n          </span>\n\t\t\t\t\t<span class="ezuikit-confirm-content-label">'.concat(content,'</span>\n        </div>\n        <div class="ezuikit-popover-buttons"></div>\n      </div>\n      ');var cancelBtn=document.createElement("button");cancelBtn.className="ezuikit-btn ezuikit-cancel-btn";cancelBtn.innerText=cancelText;var okBtn=document.createElement("button");okBtn.className="ezuikit-btn ezuikit-ok-btn ezuikit-btn-primary";okBtn.innerText=okText;contentDom.querySelector(".ezuikit-popover-buttons").appendChild(cancelBtn);contentDom.querySelector(".ezuikit-popover-buttons").appendChild(okBtn);this.PopconfirmDom=new Popover(_objectSpread2(_objectSpread2({},this.params),{},{content:contentDom.innerHTML}));if(document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-cancel-btn")){document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-cancel-btn").onclick=function(){if(onCancel){onCancel()}else{_this.hide()}return}}if(document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-ok-btn")){document.getElementById("".concat(this.params.id,"-popover")).querySelector(".ezuikit-ok-btn").onclick=function(){if(onConfirm){onConfirm()}else{_this.hide()}return}}return this.PopconfirmDom}},{key:"hide",value:function hide(){this.PopconfirmDom.hidePopover()}}]);return Popconfirm}();var Video=function(){function Video(params){_classCallCheck$1(this,Video);var defaultParams={id:"",width:"100%",height:"100%",preview:true,poster:"",fallback:"https://img.ys7.com/group32/M00/81/9D/CtxIA2HnrGyADm_jAAAFfWjIDJs811.png",src:""};this.params=_objectSpread2(_objectSpread2({},defaultParams),params);this.id=Math.random().toString(36).substr(2);this.init()}_createClass$1(Video,[{key:"init",value:function init(){var _this$params=this.params,id=_this$params.id,width=_this$params.width,height=_this$params.height,preview=_this$params.preview;if(document.getElementById(id)){var videoWrap=document.createElement("div");videoWrap.setAttribute("class","ezuikit-video");videoWrap.setAttribute("style","width:".concat(width,";height:").concat(height,";"));document.getElementById(id).appendChild(videoWrap);this.initVideo(videoWrap);if(preview){this.initPreview(videoWrap)}}}},{key:"previewVideo",value:function previewVideo(){var src=this.params.src;var previewVideo=document.createElement("div");previewVideo.setAttribute("id",this.id+"-preview");previewVideo.setAttribute("class","ezuikit-image-video");previewVideo.innerHTML='\n\t\t\t<div class="ezuikit-video-preview-mask"></div>\n\t\t\t<div class="ezuikit-video-preview-img-wrapper">\n\t\t\t\t<div class="ezuikit-video-preview-operations" id="'.concat(this.id,'-ezuikit-video-preview-operations">\n\t\t\t\t\t<div class="ezuikit-video-preview-operations-operation">\n\t\t\t\t\t\t<span role="img" aria-label="close" class="anticon anticon-close ezuikit-video-preview-operations-icon">\n\t\t\t\t\t\t\t<svg viewBox="64 64 896 896" focusable="false" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ezuikit-video-preview-wrap">\n\t\t\t\t\t<div class="ezuikit-video-preview-img-wrapper">\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclass="ezuikit-video-preview-img custom-controls"\n\t\t\t\t\t\t\tsrc="').concat(src,'"\n\t\t\t\t\t\t\tautoplay \n\t\t\t\t\t\t\tcontrols \n\t\t\t\t\t\t\tcontrolslist="nodownload noremoteplayback noplaybackrate"\n\t\t\t\t\t\t\tdisablePictureInPicture\n\t\t\t\t\t\t\tdisableRemotePlayback\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t');document.body.appendChild(previewVideo);document.getElementById(this.id+"-ezuikit-video-preview-operations").addEventListener("click",function(){document.body.removeChild(previewVideo)})}},{key:"initVideo",value:function initVideo(imgWrap){var _this$params2=this.params,poster=_this$params2.poster,fallback=_this$params2.fallback;var Img=document.createElement("img");Img.setAttribute("class","ezuikit-video-img");Img.setAttribute("src",poster);Img.addEventListener("error",function(){Img.setAttribute("src",fallback)});imgWrap.appendChild(Img)}},{key:"initPreview",value:function initPreview(imgWrap){var _this=this;var previewWrap=document.createElement("div");previewWrap.setAttribute("class","ezuikit-video-mask");previewWrap.innerHTML='\n\t\t\t<div class="ezuikit-video-mask-info">\n\t\t\t\t<span class="ezuikit-video-anticon-eye">\n\t\t\t\t\t<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 28 28" style="enable-background:new 0 0 28 28;" xml:space="preserve">\n\t\t\t\t\t<circle cx="14" cy="14" r="14" style="opacity:0.7;fill-rule:evenodd;clip-rule:evenodd;enable-background:new;"/>\n\t\t\t\t\t<path style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;" d="M18.3,15.2l-5.3,3.3c-0.7,0.4-1.6,0.2-2.1-0.5c-0.1-0.2-0.2-0.5-0.2-0.8v-6.6\n\t\t\t\t\t\tc0-0.8,0.7-1.5,1.5-1.5c0.3,0,0.6,0.1,0.8,0.2l5.3,3.3c0.7,0.4,0.9,1.4,0.5,2.1C18.6,14.9,18.4,15,18.3,15.2z"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t';imgWrap.appendChild(previewWrap);imgWrap.onclick=function(){_this.previewVideo()}}}]);return Video}();var getInspectDetail=function getInspectDetail(jSPlugin,successCallback,errorCallback){var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data={accessToken:jSPlugin.accessToken,deviceSerial:matchEzopenUrl(jSPlugin.url).deviceSerial};var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/service/devicekit/bodycamera/inspect/detail/latest");FetchData(url,"GET",data,success,error,headers)};var getDeviceTrace=function getDeviceTrace(jSPlugin,inspectRecordId,successCallback,errorCallback){var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data={accessToken:jSPlugin.accessToken,inspectRecordId:inspectRecordId,page:0};var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/service/devicekit/bodycamera/device/trace");FetchData(url,"GET",data,success,error,headers)};var getDeviceInfo=function getDeviceInfo(jSPlugin,successCallback,errorCallback){var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data={accessToken:jSPlugin.accessToken,deviceSerial:matchEzopenUrl(jSPlugin.url).deviceSerial};var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/service/devicekit/bodycamera");FetchData(url,"GET",data,success,error,headers)};var getEventList=function getEventList(jSPlugin,inspectRecordId){var pageStart=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var pageSize=arguments.length>3&&arguments[3]!==undefined?arguments[3]:30;var successCallback=arguments.length>4?arguments[4]:undefined;var errorCallback=arguments.length>5?arguments[5]:undefined;var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data={accessToken:jSPlugin.accessToken,inspectRecordId:inspectRecordId,pageStart:pageStart,pageSize:pageSize};var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/service/devicekit/bodycamera/inspect/event/page");FetchData(url,"GET",data,success,error,headers)};var evidence=function evidence(jSPlugin,evidenceFileType,successCallback,errorCallback){var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data={accessToken:jSPlugin.accessToken,deviceSerial:matchEzopenUrl(jSPlugin.url).deviceSerial,validateCode:matchEzopenUrl(jSPlugin.url).validCode,channelNo:matchEzopenUrl(jSPlugin.url).channelNo,evidenceFileType:evidenceFileType};var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/service/devicekit/common/file/evidence");FetchData(url,"POST",data,success,error,headers)};var evidenceStop=function evidenceStop(jSPlugin,taskId,successCallback,errorCallback){var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data={accessToken:jSPlugin.accessToken,taskId:taskId};var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/v3/open/cloud/video/frame/stop");FetchData(url,"POST",data,success,error,headers)};var getTaskDetail=function getTaskDetail(jSPlugin,taskId,successCallback,errorCallback){var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data={accessToken:jSPlugin.accessToken,taskId:taskId};var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/service/devicekit/opencloud/task/info");FetchData(url,"GET",data,success,error,headers)};var addEvent=function addEvent(jSPlugin,parms,successCallback,errorCallback){var defaultParms={accessToken:jSPlugin.accessToken,inspectRecordId:"",eventType:"",evidenceFileId:"",eventTime:"",eventBeginTime:"",eventEndTime:"",depositaryOfficer:"",eventRemark:"",evidenceFileType:""};var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data=Object.assign(defaultParms,parms);var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/service/devicekit/bodycamera/inspect/event");FetchData(url,"POST",data,success,error,headers)};var updateEvent=function updateEvent(jSPlugin,parms,successCallback,errorCallback){var defaultParms={accessToken:jSPlugin.accessToken,inspectRecordId:"",inspectEventId:"",eventType:"",eventRemark:""};var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data=Object.assign(defaultParms,parms);var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/service/devicekit/bodycamera/inspect/event/update");FetchData(url,"POST",data,success,error,headers)};var deleteEvent=function deleteEvent(jSPlugin,parms,successCallback,errorCallback){var defaultParms={accessToken:jSPlugin.accessToken,inspectEventId:""};var success=function success(data){successCallback&&successCallback(data)};var error=function error(err){errorCallback&&errorCallback(err)};var data=Object.assign(defaultParms,parms);var headers={"Content-Type":"application/x-www-form-urlencoded"};var url="".concat(jSPlugin.env.domain,"/api/service/devicekit/bodycamera/inspect/event/delete");FetchData(url,"POST",data,success,error,headers)};function formatDuring$1(millisecond){var hours=parseInt(millisecond%(1e3*60*60*24)/(1e3*60*60));var minutes=parseInt(millisecond%(1e3*60*60)/(1e3*60));var seconds=parseInt(millisecond%(1e3*60)/1e3);return(hours<10?"0".concat(hours):hours)+":"+(minutes<10?"0".concat(minutes):minutes)+":"+(seconds<10?"0".concat(seconds):seconds)}var InspectEventDetail=function(){function InspectEventDetail(jSPlugin){var currentEventInfo=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var timer=arguments.length>2?arguments[2]:undefined;var type=arguments.length>3?arguments[3]:undefined;var saveSuccessCallback=arguments.length>4&&arguments[4]!==undefined?arguments[4]:function(){};_classCallCheck$1(this,InspectEventDetail);this.jSPlugin=jSPlugin;this.currentEventInfo=currentEventInfo;this.inspectInfo=jSPlugin.Theme.inspect.inspectInfo;this.type=type;this.timer=timer;this.startTime=1e3;this.videoRecordingStatus=true;this.saveSuccessCallback=saveSuccessCallback;this.init()}_createClass$1(InspectEventDetail,[{key:"init",value:function init(){this.renderEventDetail();this.eventDetailDomEvent()}},{key:"show",value:function show(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-wrap")).setAttribute("class","inspect-event-detail-wrap show")}},{key:"hide",value:function hide(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-wrap")).setAttribute("class","inspect-event-detail-wrap");document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-box")).innerHTML=""}},{key:"validationEventTag",value:function validationEventTag(){var value=document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).value;if(value.length==0){document.getElementById("".concat(this.jSPlugin.id,"-event-tag-error")).style.display="block";document.getElementById("".concat(this.jSPlugin.id,"-event-tag-error")).innerHTML="请输入事件标签";document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).setAttribute("class","ezuikit-input input-has-error");return false}else{document.getElementById("".concat(this.jSPlugin.id,"-event-tag-error")).style.display="none";document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).setAttribute("class","ezuikit-input");return true}}},{key:"renderVideo",value:function renderVideo(taskStatus,picUrl,videoUrl){var _this=this;document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview")).innerHTML="";if(taskStatus===1||taskStatus===2){document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview")).innerHTML='\n      <div class="video-stroage-exceptional-status-tips-wrap" style="background:url('.concat(this.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n        <div class="video-stroage-exceptional-status-icon">\n        <div type="default" class="ezuikit-spin ezuikit-spin-sm ezuikit-spin-spinning ezuikit-spin-dot-white"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n        </div>\n        <span class="video-stroage-exceptional-status-tips">视频正在存储中…</span>\n      </div>\n     ');if(this.type!==1){var evidenceId=this.currentEventInfo.evidenceId;this.timer.clearTimer("videoRecordingStatusTimer");this.timer.createInterval("videoRecordingStatusTimer",function(){getTaskDetail(_this.jSPlugin,evidenceId,function(data){if(data.meta&&data.meta.code===200){var _data$data=data.data,_taskStatus=_data$data.taskStatus,fileUrl=_data$data.fileUrl,videoCoverPic=_data$data.videoCoverPic;var _picUrl=videoCoverPic||"".concat(_this.jSPlugin.staticPath,"/imgs/bg.svg");_this.renderVideo(_taskStatus,_picUrl,fileUrl)}})},1e3)}}else if(taskStatus===4||taskStatus===5||taskStatus===6||taskStatus===7){document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview")).innerHTML='\n        <div class="video-stroage-exceptional-status-tips-wrap video-stroage-exceptional-status-tips-error" style="background:url('.concat(this.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n          <div class="video-stroage-exceptional-status-icon">\n            <svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>\n          </div>\n          <span class="video-stroage-exceptional-status-tips">视频存储失败</span>\n        </div>\n       ');this.timer.clearTimer("videoRecordingStatusTimer")}else if(taskStatus===0||taskStatus===3){new Video({id:"".concat(this.jSPlugin.id,"-inspectEventDetail-videoPreview"),poster:picUrl,fallback:"".concat(this.jSPlugin.staticPath,"/imgs/bg.svg"),src:videoUrl});this.timer.clearTimer("videoRecordingStatusTimer")}}},{key:"renderEventDetail",value:function renderEventDetail(){var _this2=this;var _this$currentEventInf=this.currentEventInfo,evidenceFileType=_this$currentEventInf.evidenceFileType,fileUrl=_this$currentEventInf.fileUrl,taskStatus=_this$currentEventInf.taskStatus,videoCoverPic=_this$currentEventInf.videoCoverPic;var objDOM=document.createElement("div");objDOM.setAttribute("class","inspectEventDetail");var picUrl="";if(evidenceFileType===1){picUrl=videoCoverPic||"".concat(this.jSPlugin.staticPath,"/imgs/bg.svg")}else{picUrl=fileUrl||"".concat(this.jSPlugin.staticPath,"/imgs/bg.svg")}objDOM.innerHTML='\n      <div class="inspectEventDetail-header">\n        <div class="inspectEventDetail-back" id="'.concat(this.jSPlugin.id,'-inspectEventDetail-back">\n          <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M605.888 137.344a6.4 6.4 0 0 1 1.472 4.032l0.64 70.784a6.4 6.4 0 0 1-2.368 5.056L281.6 480H876.8v64H279.744l325.376 264a6.4 6.4 0 0 1 2.368 4.928l0.128 69.632a6.4 6.4 0 0 1-10.432 4.992l-422.016-342.4a42.24 42.24 0 0 1-7.04-57.344l3.264-3.904 3.776-3.456 421.76-344a6.4 6.4 0 0 1 8.96 0.896z"></path></svg>\n        </div>\n        <div class="inspectEventDetail-type">').concat(this.type===1?"编辑":"").concat(evidenceFileType===0?"图片存证":"视频存证",'</div>\n      </div>\n      <div class="inspectEventDetail-content" style="\n        height: ').concat(document.getElementById("".concat(this.jSPlugin.id,"-wrap")).clientHeight-158,'px;\n        overflow: auto;\n      ">\n        ').concat(evidenceFileType===0?'<div class="inspectEventDetail-content-img-box">\n            <p class="inspectEventDetail-content-img-tips" style="display: '.concat(this.type==1?"none":"blcok",';">图片已取证,请填写存证信息:</p>\n            <div class="inspectEventDetail-content-img-detail" id="').concat(this.jSPlugin.id,'-inspectEventDetail-picUrl"></div>\n          </div>'):'<div class="inspectEventDetail-content-video-box">\n            <div\n              id="'.concat(this.jSPlugin.id,'-inspectEventDetail-content-video-timer"\n              class="inspectEventDetail-content-video-timer"\n              style="display: ').concat(this.type==1?"none":"flex",';"\n            >\n              <div class="video-recording-time-wrap">\n                <svg fill="currentColor" width="10" height="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 10 10" style="enable-background:new 0 0 10 10;" xml:space="preserve"><circle class="st0" cx="5" cy="5" r="3"/><path class="st1" d="M5,10c-2.8,0-5-2.2-5-5c0-2.8,2.2-5,5-5s5,2.2,5,5C10,7.8,7.8,10,5,10z M5,0.5c-2.5,0-4.5,2-4.5,4.5c0,2.5,2,4.5,4.5,4.5s4.5-2,4.5-4.5C9.5,2.5,7.5,0.5,5,0.5z"/></svg>\n                <div id="').concat(this.jSPlugin.id,'-video-recording-time" class="video-recording-time">00:00:00</div>\n              </div>\n              <button id="').concat(this.jSPlugin.id,'-video-recording-stop-btn" class="inspectEventDetail-stop-btn ezuikit-btn">\n              <span style="display:none" class="ezuikit-btn-loading-icon" style=""><span role="img" aria-label="loading" class="anticon anticon-loading anticon-spin"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span>\n              停止录制\n              </button>\n            </div>\n            <div id="').concat(this.jSPlugin.id,'-inspectEventDetail-content-video-info" class="inspectEventDetail-content-video-info" style="display: ').concat(this.type==1?"block":"none",';">\n              <p class="inspectEventDetail-content-video-tips" style="display: ').concat(this.type==1?"none":"blcok",';">视频已取证:</p>\n              <div class="inspectEventDetail-content-video-detail" id="').concat(this.jSPlugin.id,'-inspectEventDetail-videoPreview"></div>\n            </div>\n          </div>'),'\n        <div class="inspectEventDetail-content-info">\n          <div class="inspectEventDetail-content-info-item">\n            <div class="inspectEventDetail-content-info-item-title">事件时间:</div>\n            <div id="').concat(this.jSPlugin.id,'-inspectEventDetail-content-info-time" class="inspectEventDetail-content-info-item-value"></div>\n          </div>\n          <div class="inspectEventDetail-content-info-item">\n            <div class="inspectEventDetail-content-info-item-title">存证人员:</div>\n            <div class="inspectEventDetail-content-info-item-value">\n              ').concat(this.type===1?this.currentEventInfo.depositaryOfficer?this.currentEventInfo.depositaryOfficer==="null"?"-":this.currentEventInfo.depositaryOfficer:"-":this.inspectInfo.inspectPerson?this.inspectInfo.inspectPerson==="null"?"-":this.inspectInfo.inspectPerson:"-",'\n            </div>\n          </div>\n          <div class="inspectEventDetail-content-info-item">\n            <div class="inspectEventDetail-content-info-item-title inspectEventDetail-content-info-item-title-required">事件标签:</div>\n            <div class="ezuikit-form-item-control-input">\n              <div class="ezuikit-form-item-control-input-content">\n                <input\n                  id="').concat(this.jSPlugin.id,'-event-tag"\n                  maxlength="32"\n                  type="text"\n                  id="control-ref_note"\n                  class="ezuikit-input"\n                  placeholder="请输入事件标签"\n                  value="').concat(this.type===1?this.currentEventInfo.eventType||"":"",'"\n                />\n              </div>\n              <div class="ezuikit-form-item-explain ezuikit-form-item-explain-connected">\n                <div id="').concat(this.jSPlugin.id,'-event-tag-error" class="ezuikit-form-item-explain-error" style="display: none">请输入事件标签</div>\n              </div>\n            </div>\n          </div>\n          <div class="inspectEventDetail-content-info-item">\n            <div class="inspectEventDetail-content-info-item-title">事件备注:</div>\n            <div class="ezuikit-input-textarea ezuikit-input-textarea-show-count" data-count="').concat(this.type===1?this.currentEventInfo.eventRemark&&this.currentEventInfo.eventRemark.length:0,' / 100">\n              <textarea\n              id="').concat(this.jSPlugin.id,'-event-remark"\n              maxlength="100"\n              class="ezuikit-input"\n              maxlength="100"\n              placeholder="请输入事件标注"\n              >').concat(this.type===1?this.currentEventInfo.eventRemark||"":"",'</textarea>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class="inspectEventDetail-footer">\n        <button id="').concat(this.jSPlugin.id,'-event-cancel" class="inspectEventDetail-footer-btn ezuikit-btn">取消</button>\n        <button id="').concat(this.jSPlugin.id,'-event-ok" class="inspectEventDetail-footer-btn ezuikit-btn ezuikit-btn-primary">保存</button>\n      </div>\n    ');document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-detail-box")).appendChild(objDOM);if(this.type===1){document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML="".concat(evidenceFileType===1?this.currentEventInfo.eventBeginTime+" ~ "+this.currentEventInfo.eventEndTime:this.currentEventInfo.eventTime)}else{document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML="".concat((new Date).Format("yyyy-MM-dd hh:mm:ss")).concat(evidenceFileType===1?" ~ -":"");if(evidenceFileType===1&&document.getElementById("".concat(this.jSPlugin.id,"-video-recording-time"))&&this.videoRecordingStatus){this.type===0&&document.getElementById("".concat(this.jSPlugin.id,"-event-ok")).setAttribute("disabled","disabled");this.timer.createInterval("videoRecordingTimer",function(){if(_this2.startTime){document.getElementById("".concat(_this2.jSPlugin.id,"-video-recording-time")).innerHTML=formatDuring$1(_this2.startTime)}_this2.startTime+=1e3;if(_this2.startTime>_this2.jSPlugin.inspectRecordingDuration){document.getElementById("".concat(_this2.jSPlugin.id,"-video-recording-stop-btn")).click();_this2.timer&&_this2.timer.clearTimer("videoRecordingTimer")}},1e3)}}if(evidenceFileType===1){var videoSrc=this.currentEventInfo&&this.currentEventInfo.fileUrl;this.renderVideo(taskStatus,picUrl,videoSrc)}else{new Image$1({id:"".concat(this.jSPlugin.id,"-inspectEventDetail-picUrl"),src:picUrl,fallback:"".concat(this.jSPlugin.staticPath,"/imgs/fallback.svg"),showIcon:false})}this.show()}},{key:"eventDetailDomEvent",value:function eventDetailDomEvent(){var _this3=this;var _this$currentEventInf2=this.currentEventInfo,evidenceFileType=_this$currentEventInf2.evidenceFileType,evidenceId=_this$currentEventInf2.evidenceId;document.getElementById("".concat(this.jSPlugin.id,"-event-cancel")).addEventListener("click",function(e){_this3.cancelPopover=new Popconfirm({id:"".concat(_this3.jSPlugin.id,"-event-cancel"),content:"确定要取消吗?".concat(_this3.type===1?"取消后编辑的内容将不会保存。":"取消后对应存证也将删除。"),placement:"topRight",arrowPointAtCenter:true,onCancel:function onCancel(){_this3.cancelPopover.hide()},onConfirm:function onConfirm(){if(evidenceFileType===1){if(_this3.videoRecordingStatus&&_this3.type===0){_this3.timer&&_this3.timer.clearTimer("videoRecordingTimer");_this3.startTime=1e3;document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn")).click()}_this3.timer.clearTimer("videoRecordingStatusTimer")}_this3.cancelPopover.hide();_this3.hide()}})});document.getElementById("".concat(this.jSPlugin.id,"-event-ok")).addEventListener("click",function(){var flag=_this3.validationEventTag();if(!flag)return;var _this3$currentEventIn=_this3.currentEventInfo,evidenceFileType=_this3$currentEventIn.evidenceFileType,evidenceId=_this3$currentEventIn.evidenceId;var _this3$inspectInfo=_this3.inspectInfo,inspectRecordId=_this3$inspectInfo.inspectRecordId,inspectPerson=_this3$inspectInfo.inspectPerson;var eTime=document.getElementById("".concat(_this3.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML;var params={inspectRecordId:inspectRecordId,depositaryOfficer:inspectPerson,evidenceFileId:evidenceId,evidenceFileType:evidenceFileType,eventType:document.getElementById("".concat(_this3.jSPlugin.id,"-event-tag")).value,eventRemark:document.getElementById("".concat(_this3.jSPlugin.id,"-event-remark")).value};if(evidenceFileType===1){params.eventBeginTime=eTime.split("~")[0].trim();params.eventEndTime=eTime.split("~")[1].trim();_this3.timer.clearTimer("videoRecordingStatusTimer")}if(evidenceFileType===0){params.eventTime=eTime}if(_this3.type===1){params.inspectEventId=_this3.currentEventInfo.inspectEventId;delete params.depositaryOfficer;delete params.eventTime;delete params.eventBeginTime;delete params.eventEndTime;delete params.evidenceFileId;delete params.evidenceFileType;updateEvent(_this3.jSPlugin,params,function(data){if(data.meta&&data.meta.code===200){_this3.hide();_this3.saveSuccessCallback&&_this3.saveSuccessCallback({eventType:params.eventType,eventRemark:params.eventRemark})}else{new Message({type:"error",content:"保存失败,".concat(data.meta&&data.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(_this3.jSPlugin.id,"-inspect-event-box")),top:40})}},function(){new Message({type:"error",content:"保存失败,请稍后重试!",wrapNode:document.getElementById("".concat(_this3.jSPlugin.id,"-inspect-event-box")),top:40})})}if(_this3.type===0){addEvent(_this3.jSPlugin,params,function(data){if(data.meta&&data.meta.code===200){_this3.hide();_this3.saveSuccessCallback&&_this3.saveSuccessCallback()}else{new Message({type:"error",content:"保存失败,".concat(data.meta&&data.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(_this3.jSPlugin.id,"-inspect-event-box")),top:40})}},function(){new Message({type:"error",content:"保存失败,请稍后重试!",wrapNode:document.getElementById("".concat(_this3.jSPlugin.id,"-inspect-event-box")),top:40})})}});document.getElementById("".concat(this.jSPlugin.id,"-inspectEventDetail-back")).addEventListener("click",function(){_this3.backPopover=new Popconfirm({id:"".concat(_this3.jSPlugin.id,"-inspectEventDetail-back"),content:"确定要返回吗?".concat(_this3.type===1?"返回后编辑的内容将不会保存。":"返回后对应存证也将删除。"),placement:"bottomRight",arrowPointAtCenter:true,onCancel:function onCancel(){_this3.backPopover.hide()},onConfirm:function onConfirm(){if(evidenceFileType===1){if(_this3.videoRecordingStatus&&_this3.type===0){_this3.timer&&_this3.timer.clearTimer("videoRecordingTimer");_this3.startTime=1e3;document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn")).click()}_this3.timer.clearTimer("videoRecordingStatusTimer")}_this3.backPopover.hide();_this3.hide()}})});if(document.getElementById("".concat(this.jSPlugin.id,"-video-recording-stop-btn"))){document.getElementById("".concat(this.jSPlugin.id,"-video-recording-stop-btn")).addEventListener("click",function(){document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn")).setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn ezuikit-btn-loading");document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn")).querySelector(".ezuikit-btn-loading-icon").style.display="inline-block";evidenceStop(_this3.jSPlugin,evidenceId,function(res){if(document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn"))){document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn")).setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn");document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn")).querySelector(".ezuikit-btn-loading-icon").style.display="none"}if(res.meta&&res.meta.code===200){getTaskDetail(_this3.jSPlugin,evidenceId,function(data){if(data.meta&&data.meta.code===200){var _data$data2=data.data,taskStatus=_data$data2.taskStatus,fileUrl=_data$data2.fileUrl,videoCoverPic=_data$data2.videoCoverPic;_this3.timer&&_this3.timer.clearTimer("videoRecordingTimer");var picUrl=videoCoverPic||"".concat(_this3.jSPlugin.staticPath,"/imgs/bg.svg");_this3.renderVideo(taskStatus,picUrl,fileUrl);document.getElementById("".concat(_this3.jSPlugin.id,"-inspectEventDetail-content-video-info")).style.display="block";document.getElementById("".concat(_this3.jSPlugin.id,"-inspectEventDetail-content-video-timer")).style.display="none";var currentTime=document.getElementById("".concat(_this3.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML;document.getElementById("".concat(_this3.jSPlugin.id,"-inspectEventDetail-content-info-time")).innerHTML="".concat(currentTime.split("~")[0]," ~ ").concat((new Date).Format("yyyy-MM-dd hh:mm:ss"));_this3.videoRecordingStatus=false;document.getElementById("".concat(_this3.jSPlugin.id,"-event-ok")).removeAttribute("disabled")}})}else{new Message({type:"error",content:"停止录制失败,请稍后重试!",wrapNode:document.getElementById("".concat(_this3.jSPlugin.id,"-inspect-event-box")),top:40})}},function(){if(document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn"))){document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn")).setAttribute("class","inspectEventDetail-stop-btn ezuikit-btn");document.getElementById("".concat(_this3.jSPlugin.id,"-video-recording-stop-btn")).querySelector(".ezuikit-btn-loading-icon").style.display="none"}new Message({type:"error",content:"停止录制失败,请稍后重试!",wrapNode:document.getElementById("".concat(_this3.jSPlugin.id,"-inspect-event-box")),top:40})})})}document.getElementById("".concat(this.jSPlugin.id,"-event-tag")).addEventListener("input",function(){_this3.validationEventTag()});document.getElementById("".concat(this.jSPlugin.id,"-event-remark")).addEventListener("input",function(e){var value=e.target.value;e.target.parentNode.setAttribute("data-count","".concat(value.length," / 100"))});document.getElementById("".concat(this.jSPlugin.id,"-event-remark")).addEventListener("focus",function(e){e.target.parentNode.setAttribute("class","ezuikit-input-textarea ezuikit-input-textarea-show-count ezuikit-input-textarea-focus")});document.getElementById("".concat(this.jSPlugin.id,"-event-remark")).addEventListener("blur",function(e){e.target.parentNode.setAttribute("class","ezuikit-input-textarea ezuikit-input-textarea-show-count")})}}]);return InspectEventDetail}();var InspectEvent=function(){function InspectEvent(jSPlugin,inspectRecordId,timer){var _this=this;_classCallCheck$1(this,InspectEvent);_defineProperty(this,"hideDelEConfirm",function(){for(var i=0;i<_this.delEConfirmList.length;i++){_this.delEConfirmList[i].hide()}});_defineProperty(this,"initRender",function(){var that=_this;if(!document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box"))){var objDOM=document.createElement("div");objDOM.id="".concat(_this.jSPlugin.id,"-inspect-event-box");objDOM.setAttribute("class","inspect-event-box");objDOM.style=";float: right; position: relative;";objDOM.innerHTML='\n      <div id="'.concat(_this.jSPlugin.id,'-inspect-event-list-box" style="\n        width: 290px;\n        height: ').concat(_this.videoHeight,'px;\n        overflow: hidden;\n        padding: 0;\n        box-sizing: border-box;\n      ">\n        <h1 style="\n          font-size: 16px;\n          color: #262626;\n          line-height: 24px;\n          font-weight: bold;\n          margin: 16px 16px 0;\n        ">巡检事件</h1>\n        <div id="').concat(_this.jSPlugin.id,'-inspect-event-btn-wrap" style="\n          display: flex;\n          align-items: center;\n          justify-content: space-between;\n          padding: 16px 16px;\n        ">\n          <div>\n            <button\n              id="').concat(_this.jSPlugin.id,'-inspect-event-img"\n              style="min-width: 88px; margin: 0 auto;"\n              type="button"\n              class="ezuikit-btn ezuikit-btn-primary"\n            >\n            <span style="display:none" class="ezuikit-btn-loading-icon" style=""><span role="img" aria-label="loading" class="anticon anticon-loading anticon-spin"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span>\n            图片存证\n            </button>\n            <button\n              id="').concat(_this.jSPlugin.id,'-inspect-event-video"\n              style="min-width: 88px; margin: 0 auto;"\n              type="button"\n              class="ezuikit-btn ezuikit-btn-primary"\n            >\n            <span style="display:none" class="ezuikit-btn-loading-icon" style=""><span role="img" aria-label="loading" class="anticon anticon-loading anticon-spin"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span>\n            视频存证</button>\n          </div>\n          <div id="').concat(_this.jSPlugin.id,'-inspect-event-list-refresh" style="\n            width: 17px;\n            height: 32px;\n            cursor: pointer;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n          ">\n            <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="13" height="13" xmlns:xlink="http://www.w3.org/1999/xlink">\n              <path fill="currentColor" d="M960 416V192l-73.056 73.056a447.712 447.712 0 0 0-373.6-201.088C265.92 63.968 65.312 264.544 65.312 512S265.92 960.032 513.344 960.032a448.064 448.064 0 0 0 415.232-279.488 38.368 38.368 0 1 0-71.136-28.896 371.36 371.36 0 0 1-344.096 231.584C308.32 883.232 142.112 717.024 142.112 512S308.32 140.768 513.344 140.768c132.448 0 251.936 70.08 318.016 179.84L736 416h224z"></path>\n            </svg>\n          </div>\n        </div>\n        <div\n          id="').concat(_this.jSPlugin.id,'-inspect-loading"\n          class="inspect-loading"\n          style="\n            height: ').concat(_this.videoHeight-104,"px;\n            position: absolute; bottom: 0; right: 0;background: #fff; bottom: 0; right: 0; z-index: 99; width: 100%; align-items: center; justify-content: center;\n            display: ").concat(_this.listLoading?"flex":"none",'\n          ">\n          <div type="default" class="ezuikit-spin ezuikit-spin-spinning"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n        </div>\n        <div id="').concat(_this.jSPlugin.id,'-inspect-event-list-nodata-wrap" style="\n          display: none;\n          height: ').concat(_this.videoHeight-104,'px;\n          text-align: center;overflow: auto;\n        "> \n          <img style="width: 85px;height: 85px; margin: 120px auto 0;" src="').concat(_this.jSPlugin.staticPath,'/imgs/empty.png" />\n          <p style="font-size: 14px;color: #595959;text-align: center;line-height: 22px;margin: 0;">暂无事件</p>\n        </div>\n        <div class="inspect-event-list-wrap" id="').concat(_this.jSPlugin.id,'-inspect-event-list-wrap"\n          style="display: none; height: ').concat(_this.videoHeight-104,'px; overflow-x: hidden; overflow-y: auto; padding-top: 4px; box-sizing: border-box; ">\n          <div id="').concat(_this.jSPlugin.id,'-inspect-event-list-wrap-main"></div>\n          <div id="').concat(_this.jSPlugin.id,'-inspect-event-list-more-loading" style="display: none;align-items: center;justify-content: center;" class="inspect-event-list-more-loading">\n            <div type="default" class="ezuikit-spin ezuikit-spin-spinning"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n          </div>\n        </div>\n      </div>\n      <div id="').concat(_this.jSPlugin.id,'-inspect-event-detail-wrap" class="inspect-event-detail-wrap" style="\n        height: ').concat(_this.videoHeight,'px;\n      ">\n        <h1 style="\n          font-size: 16px;\n          color: #262626;\n          line-height: 24px;\n          font-weight: bold;\n          margin: 16px 16px 0;\n        ">巡检事件</h1>\n        <div id="').concat(_this.jSPlugin.id,'-inspect-event-detail-box"></div>\n      </div>\n      ');document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).parentNode.appendChild(objDOM);if(_this.jSPlugin.Theme.decoderState.state.play){_this.enableEvidenceBtn()}else{_this.disableEvidenceBtn()}document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-img")).onclick=function(){if(_this.listLoading||_this.startEvidence)return;_this.startEvidence=true;_this.hideDelEConfirm();document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-img")).setAttribute("class","ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading");document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-img")).querySelector(".ezuikit-btn-loading-icon").style.display="inline-block";evidence(_this.jSPlugin,0,function(data){_this.startEvidence=false;document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-img")).setAttribute("class","ezuikit-btn ezuikit-btn-primary");document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-img")).querySelector(".ezuikit-btn-loading-icon").style.display="none";if(data.meta&&data.meta.code===200){new InspectEventDetail(_this.jSPlugin,data.data,_this.timer,0,function(){_this.initEvent();new Message({type:"success",content:"保存成功",wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40})})}else{new Message({type:"error",content:"图片存证失败,".concat(data.meta&&data.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40})}},function(){_this.startEvidence=false;document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-img")).setAttribute("class","ezuikit-btn ezuikit-btn-primary");document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-img")).querySelector(".ezuikit-btn-loading-icon").style.display="none";new Message({type:"error",content:"图片存证失败,请稍后重试!",wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40})})};document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-video")).onclick=function(){if(_this.listLoading||_this.startEvidence)return;_this.startEvidence=true;_this.hideDelEConfirm();document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-video")).setAttribute("class","ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading");document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-video")).querySelector(".ezuikit-btn-loading-icon").style.display="inline-block";evidence(_this.jSPlugin,1,function(data){_this.startEvidence=false;document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-video")).setAttribute("class","ezuikit-btn ezuikit-btn-primary");document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-video")).querySelector(".ezuikit-btn-loading-icon").style.display="none";if(data.meta&&data.meta.code===200){new InspectEventDetail(_this.jSPlugin,data.data,_this.timer,0,function(){_this.initEvent();new Message({type:"success",content:"保存成功",wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40})})}else{new Message({type:"error",content:"视频存证失败,".concat(data.meta&&data.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40})}},function(){_this.startEvidence=false;document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-video")).setAttribute("class","ezuikit-btn ezuikit-btn-primary");document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-video")).querySelector(".ezuikit-btn-loading-icon").style.display="none";new Message({type:"error",content:"视频存证失败,请稍后重试!",wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40})})};document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-list-refresh")).onclick=function(){if(_this.listLoading||_this.startEvidence)return;_this.hideDelEConfirm();document.getElementById("".concat(_this.jSPlugin.id,"-inspect-loading")).style.display="block";document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-list-wrap")).style.display="none";document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-list-nodata-wrap")).style.display="none";that.initEvent()}}else{if(document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box"))){document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).parentNode.removeChild(document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")))}that.initRender()}});_defineProperty(this,"renderList",function(data){document.getElementById("".concat(_this.jSPlugin.id,"-inspect-loading")).style.display="none";var list=data.data||[];if(list.length>0){document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-list-wrap")).style.display="block";document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-list-nodata-wrap")).style.display="none";var _loop=function _loop(){var objItem=document.createElement("div");objItem.setAttribute("class","inspect-event-item");var innerHTML="";var item=list[i];objItem.setAttribute("id","".concat(_this.jSPlugin.id,"-inspect-event-item-").concat(item.inspectEventId));objItem.innerHTML=innerHTML;document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-list-wrap-main")).appendChild(objItem);var itemHeader=document.createElement("div");itemHeader.setAttribute("class","inspect-event-item-header-wrap");var time;if(item.evidenceFileType==1){time="".concat(item.eventBeginTime.split(" ")[1],"~").concat(item.eventEndTime.split(" ")[1])}if(item.evidenceFileType==0){time="".concat(item.eventTime.split(" ")[1])}var videoInspectStatus="";if(item.evidenceFileType===1){if(item.taskStatus===1||item.taskStatus===2){videoInspectStatus="storage"}else if(item.taskStatus===4||item.taskStatus===5||item.taskStatus===6||item.taskStatus===7){videoInspectStatus="storage-error"}else if(item.taskStatus===0||item.taskStatus===3){videoInspectStatus="storage-success"}}itemHeader.innerHTML='\n        <div class="inspect-event-item-header '.concat(videoInspectStatus,'">\n        <div class="inspect-event-item-header-left">\n          <span class="inspect-event-item-status-wrap">\n            <span class="inspect-event-item-status"></span>\n          </span>\n          <svg fill="currentColor" style="display: ').concat(item.evidenceFileType===1?"block":"none",'" width="16" height="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t          viewBox="0 0 14 12" style="enable-background:new 0 0 14 12;" xml:space="preserve">\n            <path d="M1,12c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1h12c0.6,0,1,0.4,1,1v10c0,0.6-0.4,1-1,1H1z M1,11h1.6l0-3.5H1V11z\n            M10.5,1h-7v10h7V1z M13,7.5h-1.6l0,3.5H13V7.5z M6.1,4.2l2.3,1.2c0.4,0.2,0.4,0.6,0,0.8L8.1,6.3l-2,1c-0.2,0.1-0.4,0-0.4-0.2V4.4\n            C5.7,4.2,5.9,4.1,6.1,4.2z M13,6.6V4.9h-1.6v1.8H13z M1,6.6h1.6V4.9H1V6.6z M13,4V1h-1.6l0,3H13z M2.6,1H1v3h1.6L2.6,1z"/>\n          </svg>\n          <svg fill="currentColor" style="display: ').concat(item.evidenceFileType===1?"none":"block",'" width="16" height="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n            viewBox="0 0 14 12" style="enable-background:new 0 0 14 12;" xml:space="preserve">\n            <path class="st0" d="M13,0c0.6,0,1,0.4,1,1v10c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1H13z M10.4,6.2L5.6,9.8L3.8,8\n            L1,10v1h12V9L10.4,6.2z M13,1H1v7.8l2.9-2.1l1.8,1.8l4.9-3.6L13,7.5V1z M5.5,2C6.3,2,7,2.7,7,3.5S6.3,5,5.5,5S4,4.3,4,3.5\n            S4.7,2,5.5,2z M5.5,3C5.2,3,5,3.2,5,3.5S5.2,4,5.5,4S6,3.8,6,3.5S5.8,3,5.5,3z"/>\n          </svg>\n          <span class="inspect-event-item-time">').concat(time||"-",'</span>\n        </div>\n        <div class="inspect-event-item-header-right">\n          <span class="inspect-event-item-header-toggle">\n          <svg fill="currentColor" class="inspect-event-item-header-toggle-up" style="display: none;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M218.496 645.312l46.464 44.032 247.616-261.568 246.4 261.504 46.528-43.904-292.8-310.72z"></path></svg>  \n          <svg fill="currentColor" class="inspect-event-item-header-toggle-down"  viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M218.496 378.688l46.464-44.032 247.616 261.568 246.4-261.504 46.528 43.904-292.8 310.72z"></path></svg>\n          </span>\n        </div>\n        </div>\n        ');objItem.appendChild(itemHeader);itemHeader.onclick=function(e){var tag=itemHeader.querySelector(".inspect-event-item-header-toggle-up").style.display;if(tag==="none"){itemHeader.querySelector(".inspect-event-item-header-toggle-up").style.display="block";itemHeader.querySelector(".inspect-event-item-header-toggle-down").style.display="none";objItem.querySelector(".inspect-event-item-body").style.display="block"}else{itemHeader.querySelector(".inspect-event-item-header-toggle-up").style.display="none";itemHeader.querySelector(".inspect-event-item-header-toggle-down").style.display="block";objItem.querySelector(".inspect-event-item-body").style.display="none"}};var itemBody=document.createElement("div");itemBody.setAttribute("class","inspect-event-item-body");itemBody.style.display="none";var imgSrc=(item.evidenceFileType===1?item.videoCoverPic:item.fileUrl)||"".concat(_this.jSPlugin.staticPath,"/imgs/bg.svg");itemBody.innerHTML='\n        <div class="inspect-event-item-img" id="'.concat(_this.jSPlugin.id,"-inspect-view-").concat(item.inspectEventId,'"></div>\n        <div class="inspect-event-item-body-info">\n          <div class="inspect-event-item-body-info-tag">\n            <span class="inspect-event-item-body-info-tag-label" title="').concat(item.eventType,'">').concat(item.eventType,"</span>\n          </div>\n        </div>\n        ");objItem.appendChild(itemBody);if(item.evidenceFileType==1){if(item.taskStatus===1||item.taskStatus===2){document.getElementById("".concat(_this.jSPlugin.id,"-inspect-view-").concat(item.inspectEventId)).innerHTML='\n              <div class="video-stroage-exceptional-status-tips-wrap" style="background:url('.concat(_this.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n                <div class="video-stroage-exceptional-status-icon">\n                <div type="default" class="ezuikit-spin ezuikit-spin-sm ezuikit-spin-spinning ezuikit-spin-dot-white"><span class="ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default"><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i><i class="ezuikit-spin-dot-item"></i></span></div>\n                </div>\n                <span class="video-stroage-exceptional-status-tips">视频正在存储中…</span>\n              </div>\n            ')}else if(item.taskStatus===4){document.getElementById("".concat(_this.jSPlugin.id,"-inspect-view-").concat(item.inspectEventId)).innerHTML='\n            <div class="video-stroage-exceptional-status-tips-wrap video-stroage-exceptional-status-tips-error" style="background:url('.concat(_this.jSPlugin.staticPath,'/imgs/bg.svg) no-repeat 100%/cover">\n              <div class="video-stroage-exceptional-status-icon">\n                <svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>\n              </div>\n              <span class="video-stroage-exceptional-status-tips">视频存储失败</span>\n            </div>\n            ')}else if(item.taskStatus===0||item.taskStatus===3){new Video({id:"".concat(_this.jSPlugin.id,"-inspect-view-").concat(item.inspectEventId),src:item.fileUrl,poster:imgSrc,fallback:"".concat(_this.jSPlugin.staticPath,"/imgs/bg.svg")})}}if(item.evidenceFileType==0){new Image$1({id:"".concat(_this.jSPlugin.id,"-inspect-view-").concat(item.inspectEventId),src:imgSrc,fallback:"".concat(_this.jSPlugin.staticPath,"/imgs/bg.svg"),showIcon:false})}var oprItm=document.createElement("div");oprItm.setAttribute("class","inspect-event-item-body-info-opr");var updateEventDom=document.createElement("span");updateEventDom.setAttribute("class","inspect-event-item-body-info-opr-icon");updateEventDom.innerHTML='\n          <svg fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M612.992 121.984a64 64 0 0 1 90.496 0l153.92 153.92a64 64 0 0 1 0 90.496l-435.2 435.2a96 96 0 0 1-23.04 17.024l525.312-0.128v64H175.808v-2.304a64 64 0 0 1-66.496-77.632l43.776-199.296a96 96 0 0 1 25.92-47.296zM523.072 302.4l-298.88 298.88a32 32 0 0 0-8.576 15.744l-43.776 199.296 190.848-51.712a32 32 0 0 0 14.272-8.256l300.032-300.032-153.92-153.92z m135.168-135.168L568.32 257.088l153.92 153.984 89.92-89.92-153.92-153.92z"></path></svg>\n        ';oprItm.appendChild(updateEventDom);var delEventDom=document.createElement("span");delEventDom.setAttribute("class","inspect-event-item-body-info-opr-icon");delEventDom.id="".concat(_this.jSPlugin.id,"-inspect-event-del-").concat(item.inspectEventId);delEventDom.innerHTML=' \n          <svg fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M128 320V256h767.872v64H832v512a64 64 0 0 1-64 64H256a64 64 0 0 1-64-64V320H128z m640 0H256v512h512V320zM464 432v256h-64v-256h64z m160 0v256h-64v-256h64zM704 128v64H320V128h384z"></path></svg>\n        ';oprItm.appendChild(delEventDom);updateEventDom.onclick=function(e){if(_this.startEvidence)return;new InspectEventDetail(_this.jSPlugin,item,_this.timer,1,function(updateData){new Message({type:"success",content:"保存成功",wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40});item=Object.assign(item,updateData);document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-item-").concat(item.inspectEventId)).querySelector(".inspect-event-item-body-info-tag-label").innerHTML=item.eventType;document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-item-").concat(item.inspectEventId)).querySelector(".inspect-event-item-body-info-tag-label").setAttribute("title",item.eventType)})};delEventDom.onclick=function(e){if(_this.startEvidence)return;_this.delE=new Popconfirm({id:"".concat(_this.jSPlugin.id,"-inspect-event-del-").concat(item.inspectEventId),content:"确定要删除该事件吗?",placement:"topRight",arrowPointAtCenter:true,onCancel:function onCancel(){_this.delE.hide()},onConfirm:function onConfirm(){deleteEvent(_this.jSPlugin,{inspectEventId:item.inspectEventId},function(data){if(data.meta&&data.meta.code===200){_this.delE.hide();_this.initEvent();setTimeout(function(){new Message({type:"success",content:"删除成功",wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40})},10)}else{new Message({type:"error",content:"删除失败,".concat(data.meta&&data.meta.message||"请稍后重试!"),wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40})}},function(){new Message({type:"error",content:"删除失败,请稍后重试!",wrapNode:document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-box")),top:40})})}});_this.delEConfirmList.push(_this.delE)};objItem.querySelector(".inspect-event-item-body-info").appendChild(oprItm);document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-list-wrap")).onscroll=function(e){var target=e.target;_this.hideDelEConfirm();if(target.scrollTop+target.offsetHeight>=target.scrollHeight-48&&!_this.listLoading){if((data.start+1)*data.size<data.total){_this.initEvent(data.start+1)}}}};for(var i=0;i<list.length;i++){_loop()}}else{document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-list-wrap")).style.display="none";document.getElementById("".concat(_this.jSPlugin.id,"-inspect-event-list-nodata-wrap")).style.display="block"}});this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.inspectRecordId=inspectRecordId;this.timer=timer;this.listLoading=false;this.startEvidence=false;this.delEConfirmList=[];this.videoHeight=document.getElementById("".concat(jSPlugin.id,"-wrap")).clientHeight||jSPlugin.height;this.initEvent()}_createClass$1(InspectEvent,[{key:"initEvent",value:function initEvent(){var _this2=this;var startPage=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var pageSize=arguments.length>1&&arguments[1]!==undefined?arguments[1]:30;var that=this;that.listLoading=true;if(startPage===0){that.initRender(startPage)}else{document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="flex"}var errorCallback=function errorCallback(data){new Message({type:"error",content:data.meta&&data.meta.message||"列表获取失败,请稍后重试!",wrapNode:document.getElementById("".concat(_this2.jSPlugin.id,"-inspect-event-box")),top:40});that.renderList({})};getEventList(that.jSPlugin,that.inspectRecordId,startPage,pageSize,function(data){that.listLoading=false;document.getElementById("".concat(_this2.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="none";if(data.meta&&data.meta.code===200){that.renderList(data.data||{})}else{errorCallback(data)}},function(err){that.listLoading=false;document.getElementById("".concat(_this2.jSPlugin.id,"-inspect-event-list-more-loading")).style.display="none";errorCallback(err)})}},{key:"disableEvidenceBtn",value:function disableEvidenceBtn(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-img")).setAttribute("disabled","disabled");document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-video")).setAttribute("disabled","disabled")}},{key:"enableEvidenceBtn",value:function enableEvidenceBtn(){document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-img")).removeAttribute("disabled");document.getElementById("".concat(this.jSPlugin.id,"-inspect-event-video")).removeAttribute("disabled")}}]);return InspectEvent}();var SmallWinControl=function(){function SmallWinControl(jSPlugin,inspectMode,inspectMapWin,changeInspectMode,decoderState){var _this=this;_classCallCheck$1(this,SmallWinControl);_defineProperty(this,"createLocationControl",function(){var that=_this;function LocationControl(){this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new BMapGL.Size(40,105)}LocationControl.prototype=new BMapGL.Control;LocationControl.prototype.initialize=function(map){var div=document.createElement("div");div.style.cssText="width: 26px;height: 26px;display: flex;align-items: center;justify-content: center; box-shadow: 1px 2px 1px rgb(0 0 0 / 15%); background: #fff; cursor: pointer;";div.id="".concat(that.jSPlugin.id,"-location-btn");div.innerHTML='<svg fill="#3385ff" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <path d="M510.976716 128.626761c-211.205756 0-382.401119 171.195363-382.401119 382.401119s171.195363 382.401119 382.401119 382.401119S893.377836 722.131308 893.377836 510.925552 722.182472 128.626761 510.976716 128.626761zM736.508444 736.45728c-29.265914 29.265914-63.443589 52.289797-101.407415 68.355351-29.265914 12.381733-59.964425 20.158689-91.481563 23.433197L543.619466 704.019187l-63.443589 0 0 124.431298c-32.233437-3.069851-63.443589-10.949136-93.323474-23.535525-37.963825-16.065554-72.039173-39.089437-101.407415-68.355351-29.265914-29.265914-52.289797-63.443589-68.355351-101.407415-12.381733-29.265914-20.158689-59.964425-23.433197-91.481563l126.273209 0 0-63.443589L193.554112 480.227041c3.069851-32.233437 10.949136-63.443589 23.535525-93.323474 16.065554-37.963825 39.089437-72.039173 68.355351-101.407415 29.265914-29.265914 63.443589-52.289797 101.407415-68.355351 29.879884-12.58639 61.090037-20.465674 93.323474-23.535525l0 125.863895 63.443589 0L543.619466 193.707605c31.517138 3.172179 62.215649 11.051464 91.481563 23.433197 37.963825 16.065554 72.039173 39.089437 101.407415 68.355351 29.265914 29.265914 52.289797 63.443589 68.355351 101.407415 12.58639 29.879884 20.465674 61.090037 23.535525 93.323474L703.251724 480.227041l0 63.443589 125.045268 0c-3.172179 31.517138-11.051464 62.215649-23.433197 91.481563C788.798241 673.01369 765.876686 707.089038 736.508444 736.45728z" p-id="1506"></path><path d="M516.093135 415.248526c-56.280604 0-100.793445 43.489557-100.793445 99.770161s44.512841 101.816728 100.793445 101.816728S616.886579 571.29929 616.886579 515.018687 572.373738 415.248526 516.093135 415.248526z" p-id="1507"></path>\n      </svg>';div.onclick=function(e){setTimeout(function(){that.inspectMapWin.centerToTrack(18)},100)};map.getContainer().appendChild(div);return div};return new LocationControl});_defineProperty(this,"initSwithcBtn",function(){var miniSwitchDOM=document.createElement("div");miniSwitchDOM.id="".concat(_this.jSPlugin.id,"-miniSwitch");miniSwitchDOM.style="cursor: pointer;position: absolute; bottom: 106px; right: 10px; z-index: 999;";miniSwitchDOM.innerHTML="<div id='".concat(_this.jSPlugin.id,'-miniSwitch-btn\' style="width: 32px;height: 32px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.70);">\n      <svg width="20px" height="20px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n          <title>大小窗切换</title>\n          <g id="icon/大小窗切换" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n              <rect id="矩形" x="0" y="0" width="24" height="24"></rect>\n              <path d="M16,3.25 C17.5187831,3.25 18.75,4.48121694 18.75,6 L18.75,6 L18.75,6.644 L19.095177,6.64456257 C20.6299163,6.64456257 21.9388658,7.64624846 22.0337198,8.99291851 L22.0392202,9.14979714 L22.0392202,17.639328 C22.0392202,19.0115638 20.7871129,20.0640733 19.2712041,20.1401546 L19.095177,20.1445626 L8.48326347,20.1445626 C6.94852423,20.1445626 5.63957467,19.1428767 5.54472071,17.7962066 L5.53922025,17.639328 L5.539,16.75 L5,16.75 C3.53746816,16.75 2.34159572,15.6082954 2.25501879,14.1675223 L2.25,14 L2.25,6 C2.25,4.48121694 3.48121694,3.25 5,3.25 L5,3.25 Z M18.75,14 C18.75,15.5187831 17.5187831,16.75 16,16.75 L16,16.75 L7.039,16.75 L7.03922025,17.639328 C7.03922025,18.1209822 7.57916546,18.5830417 8.33031492,18.6389177 L8.48326347,18.6445626 L19.095177,18.6445626 C19.873026,18.6445626 20.4615868,18.2126064 20.5321184,17.735283 L20.5392202,17.639328 L20.5392202,9.14979714 C20.5392202,8.66814298 19.999275,8.20608342 19.2481256,8.15020744 L19.095177,8.14456257 L18.75,8.144 Z M16,4.75 L5,4.75 C4.30964406,4.75 3.75,5.30964406 3.75,6 L3.75,6 L3.75,14 C3.75,14.6903559 4.30964406,15.25 5,15.25 L5,15.25 L16,15.25 C16.6903559,15.25 17.25,14.6903559 17.25,14 L17.25,14 L17.25,8.144 L17.2422027,8.14456257 L17.2422027,6.64456257 L17.25,6.644 L17.25,6 C17.25,5.35279131 16.7581253,4.8204661 16.1278052,4.75645361 L16,4.75 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>\n          </g>\n      </svg>\n    </div>');document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).appendChild(miniSwitchDOM);document.getElementById("".concat(_this.jSPlugin.id,"-miniSwitch-btn")).onclick=function(){_.throttle(function(){return _this.miniRecSwitchClick()},1e3)()}});_defineProperty(this,"initMiniWinToggleBtn",function(){var clientWidth=_this.videoWidth;var smallWinWidth=clientWidth*.3333;var smallWinHeight=clientWidth*.3333*.5625;var miniToggleDOM=document.createElement("div");miniToggleDOM.id="".concat(_this.jSPlugin.id,"-miniToggle");miniToggleDOM.style="cursor: pointer;position: absolute; bottom: ".concat(smallWinHeight/2+96-30,"px; right: ").concat(smallWinWidth,"px; z-index: 999; height:60px; box-sizing: border-box; padding-top: 20px; text-align: center; width:20px; overflow: hidden; background: #000000; border-radius: 2px 0px 0px 2px; opacity: 0.7;");miniToggleDOM.innerHTML="<div id='".concat(_this.jSPlugin.id,"-miniToggle-btn'>\n    <svg id=\"").concat(_this.jSPlugin.id,'-min-win-close-icon" style="display: inline-block" width="20px" height="20px" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10867" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <path d="M378.688 217.856l-44.032 46.464 261.568 247.616-261.504 246.4 43.904 46.528 310.72-292.8z" fill="#ffffff" p-id="10868"></path>\n      </svg>\n    <svg id="').concat(_this.jSPlugin.id,'-min-win-open-icon" style="display: none" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10671" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20">\n        <path d="M645.312 217.856l44.032 46.464-261.568 247.616 261.504 246.4-43.904 46.528-310.72-292.8z" fill="#ffffff" p-id="10672"></path>\n      </svg>\n    </div>');document.getElementById("".concat(_this.jSPlugin.id,"-wrap")).appendChild(miniToggleDOM);document.getElementById("".concat(_this.jSPlugin.id,"-miniToggle")).onclick=function(){_this.miniWinToggleClick()}});_defineProperty(this,"init",function(){_this.initSwithcBtn();_this.initMiniWinToggleBtn()});_defineProperty(this,"setStyleListByIds",function(ids){ids.map(function(item){var dom=document.getElementById(item.id);if(dom){Object.keys(item.styleList).map(function(styleItem){dom.style[styleItem]=item.styleList[styleItem]})}})});this.jSPlugin=jSPlugin;this.inspectMode=inspectMode;this.inspectMapWin=inspectMapWin;this.changeInspectMode=changeInspectMode;this.videoWidth=jSPlugin.width;this.videoHeight=jSPlugin.height;this.minWinStatus="open";this.decoderState=decoderState;this.ZoomControl=new BMapGL.ZoomControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT,offset:new BMapGL.Size(40,50)});this.LocationControl=this.createLocationControl();this.NavigationControl3D=new BMapGL.NavigationControl3D({anchor:BMAP_ANCHOR_BOTTOM_LEFT,offset:new BMapGL.Size(28,105)});this.init()}_createClass$1(SmallWinControl,[{key:"miniWinToggleClick",value:function miniWinToggleClick(){var clientWidth=this.videoWidth;var smallWinWidth=clientWidth*.3333;if(this.minWinStatus==="open"){this.setStyleListByIds([{id:this.inspectMode==="video"?"".concat(this.jSPlugin.id,"-mapbox"):"".concat(this.jSPlugin.id),styleList:{width:"0px"}},{id:"".concat(this.jSPlugin.id,"-miniSwitch"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-miniToggle"),styleList:{right:"0px"}},{id:"".concat(this.jSPlugin.id,"-min-win-close-icon"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-min-win-open-icon"),styleList:{display:"inline-block"}}]);this.minWinStatus="close"}else{this.setStyleListByIds([{id:this.inspectMode==="video"?"".concat(this.jSPlugin.id,"-mapbox"):"".concat(this.jSPlugin.id),styleList:{width:smallWinWidth+"px"}},{id:"".concat(this.jSPlugin.id,"-miniSwitch"),styleList:{display:"block"}},{id:"".concat(this.jSPlugin.id,"-miniToggle"),styleList:{right:smallWinWidth+"px"}},{id:"".concat(this.jSPlugin.id,"-min-win-close-icon"),styleList:{display:"inline-block"}},{id:"".concat(this.jSPlugin.id,"-min-win-open-icon"),styleList:{display:"none"}}]);this.minWinStatus="open"}}},{key:"miniRecSwitchClick",value:function miniRecSwitchClick(){var _this2=this;var clientWidth=this.videoWidth;var smallWinWidth=clientWidth*.3333;var smallWinHeight=clientWidth*.3333*.5625;if(this.inspectMode==="video"){if(this.jSPlugin.Zoom){this.jSPlugin.Zoom.stopZoom()}this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-mapbox"),styleList:{width:this.jSPlugin.width+"px",height:this.jSPlugin.height+"px",marginBottom:"-40px"}},{id:"".concat(this.jSPlugin.id,"-ez-iframe-footer-container"),styleList:{top:this.videoHeight+"px"}},{id:"".concat(this.jSPlugin.id),styleList:{position:"absolute",zIndex:"100",bottom:"96px",right:"0",overflow:"hidden"}}]);this.jSPlugin.reSize(smallWinWidth,smallWinHeight);this.inspectMode="map";this.changeInspectMode("map");this.inspectMapWin.map.addControl(this.NavigationControl3D);this.inspectMapWin.map.addControl(this.LocationControl);this.inspectMapWin.map.addControl(this.ZoomControl);this.inspectMapWin.map.addOverlay(this.inspectMapWin.inspectRange);if(document.getElementById("".concat(this.jSPlugin.id,"-loading-item-btn-wrap"))){this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-loading-item-btn"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-svg"),styleList:{display:"block"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-wrap"),styleList:{border:"none",width:"32px",height:"14px"}}])}setTimeout(function(){_this2.inspectMapWin.centerToTrack(18)},100)}else{this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-mapbox"),styleList:{width:smallWinWidth+"px",height:smallWinHeight+"px",marginBottom:"0"}},{id:"".concat(this.jSPlugin.id,"-ez-iframe-footer-container"),styleList:{top:"0px"}},{id:"".concat(this.jSPlugin.id),styleList:{position:"relative",zIndex:"0",bottom:"0"}}]);this.jSPlugin.reSize(this.videoWidth,this.videoHeight);this.inspectMode="video";this.changeInspectMode("video");this.inspectMapWin.map.removeControl(this.ZoomControl);this.inspectMapWin.map.removeControl(this.NavigationControl3D);this.inspectMapWin.map.removeControl(this.LocationControl);this.inspectMapWin.map.removeOverlay(this.inspectMapWin.inspectRange);if(document.getElementById("".concat(this.jSPlugin.id,"-loading-item-btn-wrap"))){this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-loading-item-btn"),styleList:{display:"block"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-svg"),styleList:{display:"none"}},{id:"".concat(this.jSPlugin.id,"-loading-item-btn-wrap"),styleList:{border:"1px solid rgb(255, 255, 255)",width:"80px",height:"32px",color:"#fff","text-align":"center","line-height":"32px","font-size":"14px"}}])}setTimeout(function(){_this2.inspectMapWin.centerToTrack()},100);if(this.jSPlugin.Zoom&&this.decoderState.state.play){this.jSPlugin.Zoom.startZoom()}}this.setStyleListByIds([{id:"".concat(this.jSPlugin.id,"-wrap"),styleList:{width:this.videoWidth+"px",height:this.videoHeight+112+"px"}}])}}]);return SmallWinControl}();var data={customConfig:{defaultMicro:0,defaultPlay:0,maxTalkTime:0,bellPoster:0,maxBellTime:0,inspectInfo:{color:"#000000",backgroundColor:"#ffffff",activeColor:"#1890FF",btnList:[{btnKey:"inspectName",iconId:"inspectName",part:"left",defaultActive:0,isrender:1,color:"#262626"},{btnKey:"inspectBeginTime",iconId:"inspectBeginTime",part:"left",defaultActive:0,isrender:1,color:"#262626"},{btnKey:"inspectPerson",iconId:"inspectPerson",part:"right",defaultActive:0,isrender:1,color:"#262626"}]}},header:{color:"#2c2c2c",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"deviceName",iconId:"deviceName",part:"left",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"inspectTime",iconId:"inspectTime",part:"left",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"signalType",iconId:"signalType",part:"right",defaultActive:0,isrender:1,color:"#ffffff"},{btnKey:"batteryStatus",iconId:"batteryStatus",part:"right",defaultActive:0,isrender:1,color:"#ffffff"}]},footer:{color:"#ffffff",backgroundColor:"#000000",activeColor:"blue",btnList:[{btnKey:"talk",iconId:"talk",part:"left",defaultActive:1,isrender:1,backgroundColor:"#cccccc"},{btnKey:"sound",iconId:"sound",part:"left",defaultActive:1,isrender:1,backgroundColor:"#cccccc"}]}};var webInspect={data:data};var styleToString=function styleToString(obj){var styleString="";Object.keys(obj).map(function(item,index){styleString+="".concat(item,":").concat(obj[item]).concat(index<Object.keys(obj).length-1?";":"")});return styleString};function formatDuring(millisecond){var hours=parseInt(millisecond%(1e3*60*60*24)/(1e3*60*60));var minutes=parseInt(millisecond%(1e3*60*60)/(1e3*60));var seconds=parseInt(millisecond%(1e3*60)/1e3);return(hours<10?"0".concat(hours):hours)+":"+(minutes<10?"0".concat(minutes):minutes)+":"+(seconds<10?"0".concat(seconds):seconds)}var MEDIAWIDTH=500;var Inspect=function(){function Inspect(jSPlugin,themeData,setDecoderState,decoderState,inspectMode,changeInspectMode,timer){_classCallCheck$1(this,Inspect);this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.videoHeight=jSPlugin.height;this.themeData=themeData;this.setDecoderState=setDecoderState;this.decoderState=decoderState;this.isNeedRenderInspectInfo=false;this.isNeedRenderHeader=false;this.isNeedRenderFooter=false;this.inspectMode=inspectMode;this.changeInspectMode=changeInspectMode;this.themeInited=false;this.inspectRecordId=null;this.inspectInfo={};this.activeThemeStatus=true;this.activeThemeStatusTxt="模板未激活";this.globalContainer=new GlobalContainer(this.jSPlugin);this.toastCustom=new ToastCustom(jSPlugin,false);this.InspectEvent=null;this.timer=timer}_createClass$1(Inspect,[{key:"renderSignalType",value:function renderSignalType(signalType){if(!signalType){return null}var objDomString;var signalTypeStr=signalType.toUpperCase();if(signalTypeStr==="WIFI"){objDomString='<span><svg t="1688983236732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <path d="M0 352.832l93.12 98.752c231.296-245.44 606.464-245.44 837.76 0L1024 352.832C741.44 53.056 283.008 53.056 0 352.832z m372.352 395.008L512 896l139.648-148.16c-76.8-81.92-202.048-81.92-279.296 0zM186.24 550.4l93.12 98.752c128.448-136.32 336.96-136.32 465.408 0L837.824 550.4c-179.648-190.592-471.488-190.592-651.648 0z" fill="#ffffff" p-id="1530"></path>\n      </svg></span>'}else{objDomString="<span>".concat(signalType,"</span>")}return objDomString}},{key:"renderBatteryStatus",value:function renderBatteryStatus(batteryStatus){var objDomString;if(!batteryStatus||batteryStatus==0)return null;objDomString='\n    <div style="\n      display: flex;\n      align-items: center;\n      position: relative;\n    ">\n      <span style="\n        margin-right: 3px; \n        color: '.concat(batteryStatus<=20?"#FF4D4F":"#FFFFFF",'\n      ">').concat(batteryStatus,'%</span>\n      <div style="\n        position: absolute;\n        right: 6px;\n        height: 8px;\n        width: 15px;\n      ">\n        <div style="\n          width: ').concat(batteryStatus,"%;\n          height: 100%;\n          background: ").concat(batteryStatus<=20?"#FF4D4F":"#FFFFFF",'\n          "></div>\n      </div>\n      <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="32" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <path fill="').concat(batteryStatus<=20?"#FF4D4F":"#FFFFFF",'"  d="M128 213.333333l640 0q52.992 0 90.496 37.504t37.504 90.496q52.992 0 90.496 37.504t37.504 90.496l0 85.333333q0 52.992-37.504 90.496t-90.496 37.504q0 52.992-37.504 90.496t-90.496 37.504l-640 0q-52.992 0-90.496-37.504t-37.504-90.496l0-341.333333q0-52.992 37.504-90.496t90.496-37.504zM768 298.666667l-640 0q-17.664 0-30.165333 12.501333t-12.501333 30.165333l0 341.333333q0 17.664 12.501333 30.165333t30.165333 12.501333l640 0q17.664 0 30.165333-12.501333t12.501333-30.165333l0-341.333333q0-17.664-12.501333-30.165333t-30.165333-12.501333zM896 426.666667l0 170.666667q17.664 0 30.165333-12.501333t12.501333-30.165333l0-85.333333q0-17.664-12.501333-30.165333t-30.165333-12.501333z"></path>\n      </svg>\n    </div>\n    ');return objDomString}},{key:"renderInspectTime",value:function renderInspectTime(inspectTime){if(!inspectTime){return null}var dateParts=inspectTime.split(" ");var date=dateParts[0].split("-");var time=dateParts[1].split(":");var dateTime=new Date(date[0],date[1]-1,date[2],time[0],time[1],time[2]);var time_Interval=(new Date).getTime()-new Date(dateTime).getTime();var objDomString;objDomString='\n    <span style="\n      display: inline-block;\n      width:8px;\n      height:8px;\n      border-radius: 100%;\n      background: #FF4D4F;\n      margin-right: 4px;\n    "></span>\n    '.concat(formatDuring(time_Interval),"\n    ");return objDomString}},{key:"matchBtn",value:function matchBtn(btnId,btnData){var _this=this;var _this$themeData=this.themeData,customConfig=_this$themeData.customConfig,header=_this$themeData.header,footer=_this$themeData.footer;var inspectInfo=customConfig.inspectInfo;var btnItem={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function onclick(){},onmoveleft:function onmoveleft(){},onmoveright:function onmoveright(){},onremove:function onremove(){}};var _index=inspectInfo.btnList.findIndex(function(item){return item.iconId===btnId});if(_index!==-1){btnItem.color=inspectInfo.color;btnItem.backgroundColor=inspectInfo.backgroundColor;btnItem.activeColor=inspectInfo.activeColor}else{_index=header.btnList.findIndex(function(item){return item.iconId===btnId});if(_index!==-1){btnItem.color=header.color;btnItem.backgroundColor=header.backgroundColor;btnItem.activeColor=header.activeColor}else{btnItem.color=footer.color;btnItem.backgroundColor=footer.backgroundColor;btnItem.activeColor=footer.activeColor}}switch(btnId){case"inspectName":btnItem.title="巡检名称";btnItem.id=btnId;btnItem.domString='<span id="'.concat(this.jSPlugin.id,'-inspectInfo-inspectName" \n        style="\n        color:').concat(btnData.color||"#262626",';\n        font-size: 18px;\n        text-align: left;\n        font-weight: bold;\n        padding: 0 16px;\n        ">巡检名称</span>');btnItem.onclick=function(){};return btnItem;case"inspectBeginTime":btnItem.title="巡检开始时间";btnItem.id=btnId;btnItem.domString='<span id="'.concat(this.jSPlugin.id,'-inspectInfo-inspectBeginTime" \n        style="\n        color:').concat(btnData.color||"#FFFFFF",';\n        font-size: 14px;\n        text-align: left;\n        padding-left: 16px;\n        border-left: 1px solid #d9d9d9;\n        line-height: 16px;\n        margin-top: 1px;\n        ">巡检开始时间:-</span>');btnItem.onclick=function(){};return btnItem;case"inspectPerson":btnItem.title="本地巡检员";btnItem.id=btnId;btnItem.domString='<span id="'.concat(this.jSPlugin.id,'-inspectInfo-inspectPerson" \n        style="\n        color:').concat(btnData.color||"#FFFFFF",';\n        font-size: 14px;\n        display: block;\n        max-width: 100%;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        padding-right: 16px;\n        ">本地巡检员:-</span>');btnItem.onclick=function(){};return btnItem;case"deviceName":btnItem.title="设备名称";btnItem.id=btnId;btnItem.domString='<span id="'.concat(this.jSPlugin.id,'-header-deviceName" \n        style="\n        color:').concat(btnData.color||"#FFFFFF",";\n        font-size: 16px;\n        display: block;\n        max-width: ").concat(this.jSPlugin.width*.33,'px;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        ">设备名称</span>');btnItem.onclick=function(){};return btnItem;case"inspectTime":btnItem.title="巡检时长";btnItem.id=btnId;btnItem.domString='<span id="'.concat(this.jSPlugin.id,'-header-inspectTime-wrap" \n        style="\n        color:').concat(btnData.color||"#FFFFFF",';\n        font-size: 14px;\n        display: flex;\n        max-width: 100%;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        margin-left: 32px;\n        ">巡检时长:<span id="').concat(this.jSPlugin.id,'-header-inspectTime" style="display: flex; align-items: center;">-</span></span>');btnItem.onclick=function(){};return btnItem;case"signalType":btnItem.title="信号类型";btnItem.id=btnId;btnItem.domString='<span id="'.concat(this.jSPlugin.id,'-header-signalType" \n        style="\n        color:').concat(btnData.color||"#FFFFFF",';\n        font-size: 14px;\n        display: block;\n        max-width: 100%;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        "></span>');btnItem.onclick=function(){};return btnItem;case"batteryStatus":btnItem.title="设备电量";btnItem.id=btnId;btnItem.domString='<span id="'.concat(this.jSPlugin.id,'-header-batteryStatus" \n        style="\n        color:').concat(btnData.color||"#FFFFFF",';\n        font-size: 14px;\n        display: flex;\n        max-width: 100%;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        margin-left: 12px;\n        align-items: center;\n        "></span>');btnItem.onclick=function(){};return btnItem;case"talk":btnItem.title="对讲";btnItem.id=btnId;btnItem.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-talk-icon" class="theme-icon-item-icon" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6\tC13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" />'+'<path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" />'+'<path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" />'+'<path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" />'+'</svg><span id="'.concat(this.jSPlugin.id,'-talk-label" style="margin-left: -3px">对讲</span>');btnItem.onclick=function(){var _this$decoderState$st=_this.decoderState.state,talk=_this$decoderState$st.talk,sound=_this$decoderState$st.sound,play=_this$decoderState$st.play;if(play){if(talk){console.log("结束对讲");_this.setDecoderState({talk:false});_this.jSPlugin.Talk.stopTalk();var isReOpenSound=_.findIndex(_this.themeData.footer.btnList,function(v){return v.iconId==="sound"&&v.isrender===1&&v.defaultActive===1})>-1;if(_this.themeData&&isReOpenSound){_this.jSPlugin.openSound();_this.setDecoderState({sound:true})}}else{console.log("开始对讲");_this.setDecoderState({talk:true});_this.jSPlugin.Talk.startTalk(function(isGb){if(sound&&!isGb){_this.jSPlugin.closeSound();_this.setDecoderState({sound:false})}})}}};return btnItem;case"sound":btnItem.title="音量";btnItem.id=btnId;btnItem.domString='<span style="height: 100%">'+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-nosound-icon" style="display:none" fill="').concat(btnItem.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>MEDIAWIDTH?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH?48:32,'" viewBox="-6 -7 32 31">\n          <path d="M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z"/>\n          <path d="M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n          <path d="M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z"/>\n          <path d="M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z"/>\n          </svg>')+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-sound-icon" style="display:inline-block" width="').concat(this.jSPlugin.width>MEDIAWIDTH?48:32,'" height="').concat(this.jSPlugin.width>MEDIAWIDTH?48:32,'" fill="').concat(btnItem.color,'" viewBox="-6 -7 32 32">\n            <path d="M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7\n              c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z"/>\n            <path d="M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3\n              c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z"/>\n            <path id="Stroke-5" class="st1" d="M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8\n              C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0\n              L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z"/>\n            <path  d="M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4\n              c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4\n              c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>\n          </svg>')+'</span><span id="'.concat(this.jSPlugin.id,'-sound-label" style="margin-left: -3px; color: ').concat(btnItem.color,'">音量</span>');btnItem.onclick=function(){var _this$decoderState$st2=_this.decoderState.state,play=_this$decoderState$st2.play,sound=_this$decoderState$st2.sound,talk=_this$decoderState$st2.talk;if(play&&!talk){if(sound){_this.jSPlugin.closeSound();_this.setDecoderState({sound:false})}else{_this.jSPlugin.openSound();_this.setDecoderState({sound:true})}}};return btnItem;default:return btnItem}}},{key:"renderInspectInfo",value:function renderInspectInfo(id,item){var objItem=this.matchBtn(id,item);var childDOM=document.createElement("sapn");childDOM.innerHTML="".concat(objItem.domString);if(item.part==="left"){document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl-left")).appendChild(childDOM)}else{document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl-right")).appendChild(childDOM)}}},{key:"renderHeader",value:function renderHeader(id,item){var objItem=this.matchBtn(id,item);var objDOM=document.createElement("span");objDOM.className="".concat(this.jSPlugin.id,"-header-content");objDOM.style="display: flex; align-items: center; ";objDOM.innerHTML="\n      ".concat(objItem.domString,"\n    ");if(item.part==="left"){document.getElementById("".concat(this.jSPlugin.id,"-headControl-left")).appendChild(objDOM)}else{document.getElementById("".concat(this.jSPlugin.id,"-headControl-right")).appendChild(objDOM)}}},{key:"renderFooter",value:function renderFooter(id,item){var _this2=this;var objItem=this.matchBtn(id,item);var btnWidth=this.videoWidth/6;var objDOM=document.createElement("div");objDOM.className="theme-icon-item";if(!!this.jSPlugin.isWebConsole){objDOM.style="padding:0 ".concat(btnWidth*.1,"px;")}else{objDOM.style="padding:0 ".concat(btnWidth*.1,"px;cursor: pointer;")}objDOM.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(objItem.id,'-content" title="').concat(objItem.title,'" style="display: flex;align-items: center;position:relative;">')).concat(objItem.domString,"</div>")+"</span>";objDOM.onclick=function(e){if(_this2.decoderState.state.isEditing||!_this2.activeThemeStatus){return false}objItem.onclick(e)};if(objItem.onmouseenter){objDOM.onmouseenter=function(e){if(_this2.decoderState.state.isEditing||!_this2.activeThemeStatus){return false}objItem.onmouseenter(e)}}if(objItem.onmouseleave){objDOM.onmouseleave=function(e){if(_this2.decoderState.state.isEditing||!_this2.activeThemeStatus){return false}objItem.onmouseleave(e)}}document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).appendChild(objDOM)}},{key:"initThemeData",value:function initThemeData(){var _this3=this;var _this$themeData2=this.themeData,customConfig=_this$themeData2.customConfig,header=_this$themeData2.header,footer=_this$themeData2.footer;var inspectInfo=customConfig.inspectInfo;var videoId=this.jSPlugin.id;this.isNeedRenderInspectInfo=_.findIndex(inspectInfo.btnList,function(v){return v.isrender>0})>=0;this.isNeedRenderHeader=_.findIndex(header.btnList,function(v){return v.isrender>0})>=0;this.isNeedRenderFooter=_.findIndex(footer.btnList,function(v){return v.isrender>0})>=0;if(this.isNeedRenderInspectInfo){if(!document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl"))){var inspectInfoContainer=document.createElement("div");inspectInfoContainer.setAttribute("id","".concat(this.jSPlugin.id,"-inspectInfoControl"));inspectInfoContainer.setAttribute("class","inspectInfo-controls");inspectInfoContainer.innerHTML="<div id='".concat(this.jSPlugin.id,"-inspectInfoControl-left' class=\"inspectInfo-controls-left\" style='display:flex;overflow:hidden;'></div><div id='").concat(this.jSPlugin.id,"-inspectInfoControl-right' class=\"inspectInfo-controls-right\" style='display:flex;'></div>");var inspectInfoHeight="58px";var inspectInfoStyle={height:inspectInfoHeight,display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#000000",width:"".concat(this.jSPlugin.width+290,"px"),position:"relative","align-items":"center",background:"#ffffff","border-bottom":"1px solid #D9D9D9","box-sizing":"border-box"};inspectInfoContainer.style=styleToString(inspectInfoStyle);document.getElementById("".concat(videoId,"-wrap")).parentNode.insertBefore(inspectInfoContainer,document.getElementById("".concat(videoId,"-wrap")));var checkTimer=setInterval(function(){if(window.EZUIKit[_this3.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer)}},50)}else{document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-inspectInfoControl-left' style='display:flex;'></div><div id='").concat(this.jSPlugin.id,"-inspectInfoControl-right' style='display:flex'></div>")}}else{if(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl"))){document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")))}}if(this.isNeedRenderHeader){if(!document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){var headerContainer=document.createElement("div");headerContainer.setAttribute("id","".concat(this.jSPlugin.id,"-headControl"));headerContainer.setAttribute("class","header-controls");headerContainer.innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' class=\"header-controls-left\" style='display:flex; max-width: 70%; align-items: center; overflow: hidder;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' class=\"header-controls-right\" style='display:flex; align-items: center;'></div>");var headerHeight="56px";var headerStyle={height:headerHeight,display:"flex","justify-content":"space-between",top:0,"z-index":999,color:"#FFFFFF",width:"100%",padding:"0 16px","box-sizing":"border-box",position:"relative","align-items":"center",background:"#000000"};headerContainer.style=styleToString(headerStyle);document.getElementById("".concat(videoId,"-wrap")).insertBefore(headerContainer,document.getElementById(videoId));var _checkTimer=setInterval(function(){if(window.EZUIKit[_this3.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(_checkTimer)}},50)}else{document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>")}}else{if(document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))}}var footerHeight="56px";if(this.isNeedRenderFooter){if(!document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){var footerContainer=document.createElement("div");footerContainer.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container"));footerContainer.setAttribute("class","ez-iframe-footer-container");var footerStyle={position:"relative",display:"flex",height:"56px","flex-wrap":"wrap","justify-content":"center","z-index":999,top:0,color:"#FFFFFF",width:"100%","align-items":"center","background-color":"#000000","font-size":"14px"};footerContainer.style=styleToString(footerStyle);footerContainer.innerHTML='\n          <div id="'.concat(this.jSPlugin.id,"-audioControls\" class=\"footer-controls\" style='display:flex;justify-content: center;padding: 0 4%;width:100%;z-index:999;position: relative;'>\n            <div id='").concat(this.jSPlugin.id,"-audioControls-left' class=\"footer-controls-left\" style='display:flex;margin-lefacti'></div><div id='").concat(this.jSPlugin.id,"-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div>\n          </div>\n          ");insertAfter(footerContainer,document.getElementById(videoId))}else{if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-".concat(footerHeight,"px")}}}else{if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))){document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")))}}if(this.isNeedRenderInspectInfo&&document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl"))){document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.background=inspectInfo.backgroundColor;document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.color=inspectInfo.color;inspectInfo.btnList.map(function(item,index){if(item.isrender){_this3.renderInspectInfo(item.iconId,item)}})}if(this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=header.backgroundColor;document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=header.color;header.btnList.map(function(item,index){if(item.isrender){_this3.renderHeader(item.iconId,item)}})}if(this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=footer.backgroundColor;document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=footer.color;footer.btnList.map(function(item,index){if(item.isrender){_this3.renderFooter(item.iconId,item)}})}this.inspectMapWin=new InspectMap(this.jSPlugin);this.inspectSmallWin=new SmallWinControl(this.jSPlugin,this.inspectMode,this.inspectMapWin,this.changeInspectMode,this.decoderState)}},{key:"renderThemeData",value:function renderThemeData(){var _this4=this;var isEditing=this.decoderState.state.isEditing;var _this$themeData3=this.themeData,inspectInfo=_this$themeData3.inspectInfo,header=_this$themeData3.header,footer=_this$themeData3.footer;if(this.isNeedRenderInspectInfo&&inspectInfo){document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.background=inspectInfo.backgroundColor.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-inspectInfoControl")).style.color=inspectInfo.color.replace("-diy","");inspectInfo.btnList.map(function(item,index){if(item.isrender){_this4.setDecoderState(_defineProperty({},item.iconId,_this4.decoderState.state[item.iconId]))}})}if(this.isNeedRenderHeader&&header){document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=header.backgroundColor.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=header.color.replace("-diy","");header.btnList&&header.btnList.map(function(item,index){if(item.isrender){_this4.setDecoderState(_defineProperty({},item.iconId,_this4.decoderState.state[item.iconId]))}})}if(this.isNeedRenderFooter&&footer){document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=footer.backgroundColor.replace("-diy","");document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=footer.color.replace("-diy","");footer.btnList.map(function(item,index){if(item.isrender){_this4.setDecoderState(_defineProperty({},item.iconId,_this4.decoderState.state[item.iconId]))}if(index==0&&!_this4.themeInited&&_this4.activeThemeStatus){var checkTimer=setInterval(function(){if(window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);if(_this4.themeData.customConfig.bellPoster==1&&!isEditing){_this4.jSPlugin.pluginStatus.loadingClear()}else{_this4.jSPlugin.play()}_this4.themeInited=true}},50)}});this.setDecoderState({cloudRec:matchEzopenUrl(this.jSPlugin.url).type==="cloud.rec",rec:matchEzopenUrl(this.jSPlugin.url).type==="rec",type:matchEzopenUrl(this.jSPlugin.url).type})}else{if(!this.themeInited&&this.activeThemeStatus){var _checkTimer2=setInterval(function(){if(window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(_checkTimer2);if(_this4.themeData&&_this4.themeData.customConfig&&_this4.themeData.customConfig.bellPoster==1&&!isEditing){_this4.jSPlugin.pluginStatus.loadingClear()}else{_this4.jSPlugin.play()}_this4.themeInited=true}},50)}}var checkTimer=setInterval(function(){if(window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init){clearInterval(checkTimer);_this4.jSPlugin.reSize(_this4.videoWidth,_this4.videoHeight)}},50);if(!this.jSPlugin.Zoom)this.jSPlugin.Zoom=new Zoom(this.jSPlugin);this.getInspectDevInfo(this.jSPlugin,true,false)}},{key:"getInspectRecord",value:function getInspectRecord(){var _this5=this;var successCallback=function successCallback(data){if(data.meta.code==200&&data.data){var resultData=data.data;resultData.inspectRange&&_this5.inspectMapWin.createPolygon(resultData.inspectRange,"#407AFF","dashed",4,1,"#407AFF",.08);resultData.inspectPoints&&resultData.inspectPoints.length>0&&_this5.inspectMapWin.createInspectPoints(resultData.inspectPoints);if(_this5.inspectMode==="video"){_this5.inspectMapWin.map.removeOverlay(_this5.inspectMapWin.inspectRange)}if(document.getElementById("".concat(_this5.jSPlugin.id,"-inspectInfo-inspectName"))&&resultData.inspectName){document.getElementById("".concat(_this5.jSPlugin.id,"-inspectInfo-inspectName")).innerText=""+resultData.inspectName}if(document.getElementById("".concat(_this5.jSPlugin.id,"-inspectInfo-inspectBeginTime"))&&resultData.beginTime){document.getElementById("".concat(_this5.jSPlugin.id,"-inspectInfo-inspectBeginTime")).innerText="巡检开始时间:"+resultData.beginTime}if(document.getElementById("".concat(_this5.jSPlugin.id,"-header-inspectTime"))){_this5.timer.createInterval("InspectTimer",function(){document.getElementById("".concat(_this5.jSPlugin.id,"-header-inspectTime")).innerHTML=_this5.renderInspectTime(resultData.beginTime)},1e3)}if(document.getElementById("".concat(_this5.jSPlugin.id,"-inspectInfo-inspectPerson"))&&resultData.inspectPerson){document.getElementById("".concat(_this5.jSPlugin.id,"-inspectInfo-inspectPerson")).innerText="本地巡检员:"+resultData.inspectPerson}_this5.inspectInfo=resultData;resultData.inspectRecordId&&getDeviceTrace(_this5.jSPlugin,resultData.inspectRecordId,function(data){if(data.meta.code==200&&data.data){_this5.inspectMapWin.createTrack(data.data,true);_this5.timer.createInterval("TraceTimer",function(){resultData.inspectRecordId&&getDeviceTrace(_this5.jSPlugin,resultData.inspectRecordId,function(data){if(data.meta.code==200&&data.data){_this5.inspectMapWin.createTrack(data.data,false)}},function(){})},5e3)}},function(){});_this5.InspectEvent=new InspectEvent(_this5.jSPlugin,resultData.inspectRecordId,_this5.timer)}};var errorCallback=function errorCallback(err){};getInspectDetail(this.jSPlugin,successCallback,errorCallback)}},{key:"getInspectDevInfo",value:function getInspectDevInfo(jSPlugin){var _this6=this;var isFirst=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var isRefreshVideo=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var successCallback=function successCallback(data){if(data.meta&&data.meta.code==200&&data.data){if(data.data.status===1){if(isRefreshVideo&&!_this6.decoderState.state.play){_this6.jSPlugin.pluginStatus.loadingStart(_this6.jSPlugin.id);_this6.jSPlugin.pluginStatus.loadingSetText({text:"视频加载中"});_this6.jSPlugin.play()}_this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id,"-inspect-global-box"),false);if(document.getElementById("".concat(_this6.jSPlugin.id,"-header-deviceName"))){document.getElementById("".concat(_this6.jSPlugin.id,"-header-deviceName")).innerText="".concat(data.data.deviceName,"(").concat(data.data.deviceSerial,")");document.getElementById("".concat(_this6.jSPlugin.id,"-header-deviceName")).setAttribute("title","".concat(data.data.deviceName,"(").concat(data.data.deviceSerial,")"))}if(document.getElementById("".concat(_this6.jSPlugin.id,"-header-signalType"))){document.getElementById("".concat(_this6.jSPlugin.id,"-header-signalType")).innerHTML=_this6.renderSignalType(data.data.signalType)}if(document.getElementById("".concat(_this6.jSPlugin.id,"-header-batteryStatus"))){document.getElementById("".concat(_this6.jSPlugin.id,"-header-batteryStatus")).innerHTML=_this6.renderBatteryStatus(data.data.batteryStatus)}_this6.timer.createInterval("InspectDevInfoTimer",function(){_this6.getInspectDevInfo(jSPlugin,false,false)},3e5);isFirst&&_this6.getInspectRecord()}else{_this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id,"-inspect-loading-box"),false);_this6.jSPlugin.stop();_this6.globalContainer.deviceErrorInfo({tips:"当前设备未在巡检中",refreshBtn:"刷新",refreshShow:true},function(){_this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id,"-no-inspect-box"),false);_this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id,"-inspect-loading-box"),true);_this6.getInspectDevInfo(jSPlugin,true,true)})}}else{_this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id,"-inspect-loading-box"),false);_this6.jSPlugin.stop();_this6.globalContainer.deviceErrorInfo({tips:data.meta.message,refreshShow:false})}};var errorCallback=function errorCallback(){_this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id,"-inspect-global-box"),false)};getDeviceInfo(jSPlugin,successCallback,errorCallback)}},{key:"fetchThemeData",value:function fetchThemeData(themeId){var _this7=this;var successCallback=function successCallback(data){if(data.meta.code===0&&data.data){_this7.activeThemeStatus=true;_this7.themeData=data.data;if(!_this7.jSPlugin.capacity){setTimeout(function(){_this7.initThemeData();_this7.renderThemeData()},300)}else{_this7.initThemeData();_this7.renderThemeData()}}else{_this7.activeThemeStatus=false;_this7.jSPlugin.pluginStatus.loadingClear();if(data.meta.code=="111021"){_this7.globalContainer.globalContainerToggle("".concat(_this7.jSPlugin.id,"-inspect-loading-box"),false);_this7.jSPlugin.stop();_this7.globalContainer.deviceErrorInfo({tips:"无效的模板id",refreshBtn:"刷新",refreshShow:false});_this7.activeThemeStatusTxt="无效的模板id";return}else if(data.meta.code=="111023"){_this7.globalContainer.globalContainerToggle("".concat(_this7.jSPlugin.id,"-inspect-loading-box"),false);_this7.jSPlugin.stop();_this7.globalContainer.deviceErrorInfo({tips:"您的试用特权已到期,需前往轻应用控制台购买后使用。",refreshBtn:"刷新",refreshShow:false});_this7.activeThemeStatusTxt="试用特权已到期";return}else{_this7.globalContainer.globalContainerToggle("".concat(_this7.jSPlugin.id,"-inspect-loading-box"),false);_this7.jSPlugin.stop();_this7.globalContainer.deviceErrorInfo({tips:"模板未激活,请先在开放平台轻应用控制台购买模板",refreshBtn:"刷新",refreshShow:false});_this7.activeThemeStatusTxt="模板未激活";return}}};var errorCallback=function errorCallback(){_this7.themeData=webInspect.data;if(_this7.themeData.header){_this7.themeData.header.btnList=_this7.themeData.header.btnList.sort(function(a,b){return a.btnKey.split("-")[3]-b.btnKey.split("-")[3]})}if(_this7.themeData.footer){_this7.themeData.footer.btnList=_this7.themeData.footer.btnList.sort(function(a,b){return a.btnKey.split("-")[3]-b.btnKey.split("-")[3]})}_this7.initThemeData();_this7.renderThemeData()};templateDetailApi(this.jSPlugin,themeId,successCallback,errorCallback)}}]);return Inspect}();var InspectTheme=function(){function InspectTheme(jSPlugin){var _this=this;_classCallCheck$1(this,InspectTheme);_defineProperty(this,"changeInspectMode",function(mode){_this.inspectMode=mode});this.jSPlugin=jSPlugin;this.videoWidth=jSPlugin.width;this.videoHeight=jSPlugin.height;this.inspectMode="video";this.autoFocus=0,this.decoderState={state:{isEditing:false,play:false,sound:false,recordvideo:false,recordCount:"00:00",talk:false,mute:false,rejection:false,cloudRec:matchEzopenUrl(jSPlugin.url).type==="cloud.rec",rec:matchEzopenUrl(jSPlugin.url).type==="rec",type:matchEzopenUrl(jSPlugin.url).type}};this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if(typeof jSPlugin.isMobile!=="undefined"){this.isMobile=jSPlugin.isMobile}this.themeData=webInspect.data;if(this.jSPlugin.themeId=="themeData"){this.themeData=this.jSPlugin.params.themeData}if(!this.timer){this.timer=new Timer(jSPlugin)}if(this.jSPlugin.themeId){if(this.isMobile);else{this.inspect=new Inspect(this.jSPlugin,this.themeData,this.setDecoderState,this.decoderState,this.inspectMode,this.changeInspectMode,this.timer)}switch(this.jSPlugin.themeId){case"themeData":this.themeData=this.jSPlugin.params.themeData;this.inspect.initThemeData();this.inspect.renderThemeData();break;default:this.inspect.fetchThemeData(this.jSPlugin.themeId);break}}if(!this.jSPlugin.Talk){this.jSPlugin.Talk=new Talk(this.jSPlugin)}addCss("".concat(this.jSPlugin.staticPath,"/css/theme.css"));addCss("".concat(this.jSPlugin.staticPath,"/css/component.css"));addCss("".concat(this.jSPlugin.staticPath,"/css/inspectTheme.css"))}_createClass$1(InspectTheme,[{key:"setDecoderState",value:function setDecoderState(options,backgroundColor){var _this2=this;var color="#FFFFFF";var activeColor="#1890FF";Object.keys(options).map(function(item){switch(item){case"talk":if(document.getElementById("".concat(_this2.jSPlugin.id,"-talk"))){document.getElementById("".concat(_this2.jSPlugin.id,"-talk")).className=options[item]?"active":"";document.getElementById("".concat(_this2.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=options[item]?activeColor:color;document.getElementById("".concat(_this2.jSPlugin.id,"-talk-content")).childNodes[2].style.color=options[item]?activeColor:color}break;case"sound":if(document.getElementById("".concat(_this2.jSPlugin.id,"-sound"))){if(options[item]){document.getElementById("".concat(_this2.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block";document.getElementById("".concat(_this2.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none";document.getElementById("".concat(_this2.jSPlugin.id,"-sound")).className=options[item]?"active":"";document.getElementById("".concat(_this2.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=options[item]?activeColor:color;document.getElementById("".concat(_this2.jSPlugin.id,"-sound-label")).style.color=options[item]?activeColor:color}else{document.getElementById("".concat(_this2.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block";document.getElementById("".concat(_this2.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none";document.getElementById("".concat(_this2.jSPlugin.id,"-sound")).className=options[item]?"active":"";document.getElementById("".concat(_this2.jSPlugin.id,"-sound-label")).style.color=options[item]?activeColor:color}}break}_this2.decoderState.state=Object.assign(_this2.decoderState.state,options)})}},{key:"setDisabled",value:function setDisabled(status){var _this$decoderState$st=this.decoderState.state,sound=_this$decoderState$st.sound;_this$decoderState$st.hd;document.getElementById(sound?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon"))!=null&&document.getElementById(sound?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon")).setAttribute("style",status?"cursor: not-allowed;fill: gray":"cursor: default");document.getElementById("".concat(this.jSPlugin.id,"-sound-label"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-sound-label")).setAttribute("style",status?"cursor: not-allowed; color: gray":"cursor: default");document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",status?"cursor: not-allowed;fill: gray":"cursor: default");document.getElementById("".concat(this.jSPlugin.id,"-talk-label"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-talk-label")).setAttribute("style",status?"cursor: not-allowed; color: gray":"cursor: default")}},{key:"inspectEnding",value:function inspectEnding(){var objDOM=document.createElement("div");objDOM.id="".concat(this.jSPlugin.id,"-inspect-ending-box");objDOM.style="width:100%; height: ".concat(this.videoHeight+112,"px; position: absolute; z-index: 10000; bottom:0; left:0; background: #ffffff;");objDOM.innerHTML='<div style="\n      overflow: auto;\n      box-sizing: border-box;\n      font-size: 14px;\n      color: #595959;\n      text-align: center;\n      padding-top: '.concat((this.videoHeight+62)/2,'px;\n    ">\n    <div style="text-align:center; height: 21px;">\n    <svg t="1689074472491" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7172" xmlns:xlink="http://www.w3.org/1999/xlink" width="21" height="21"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z" fill="#FF4D4F" p-id="7173"></path></svg>\n    </div>\n    <div style="color: #595959; font-size:14px; margin: 5px 0 16px;font-weight: 400; text-align: center;">巡检已结束</div>\n    ');document.getElementById("".concat(this.jSPlugin.id,"-wrap")).parentNode.appendChild(objDOM);this.jSPlugin.Zoom&&this.jSPlugin.Zoom.stopZoom()}}]);return InspectTheme}();(function(global,factory){if((typeof module==="undefined"?"undefined":_typeof(module))==="object"&&_typeof(module.exports)==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("EZUIPlayer requires a window with a document")}return factory(w)}}else{factory(global)}})(typeof window!=="undefined"?window:void 0,function(window,noGlobal){var _state;function addJs(filepath,callback){var headerScript=document.getElementsByTagName("head")[0].getElementsByTagName("script");var isReady=false;for(var i=0;i<headerScript.length;i++){if(headerScript[i].getAttribute("src")==filepath){isReady=true;callback()}}if(!isReady){var oJs=document.createElement("script");oJs.setAttribute("src",filepath);oJs.onload=callback;document.getElementsByTagName("head")[0].appendChild(oJs)}}function addCss(filepath,callback){var headerLink=document.getElementsByTagName("head")[0].getElementsByTagName("link");var isReady=false;for(var i=0;i<headerLink.length;i++){if(headerLink[i].getAttribute("href")==filepath){isReady=true;callback()}}if(!isReady){var oJs=document.createElement("link");oJs.rel="stylesheet";oJs.type="text/css";oJs.href=filepath;oJs.onload=callback;document.getElementsByTagName("head")[0].appendChild(oJs)}}function request(url,method,params,header,success,error){var _url=url;var http_request=new XMLHttpRequest;http_request.onreadystatechange=function(){if(http_request.readyState==4){if(http_request.status==200){var _data=JSON.parse(http_request.responseText);success(_data)}}};http_request.open(method,_url,true);var data=new FormData;for(var i in params){data.append(i,params[i])}http_request.send(data)}var EZUIKit={EZUIKitPlayer:undefined,EZUIKitTalk:undefined,opt:{apiDomain:"https://open.ys7.com/api/lapp/live/talk/url",filePath:"https://open.ys7.com/assets/ezuikit_v2.6.4",accessToken:"",url:"",deviceSerial:"",channelNo:"",id:"",talkLink:"",rtcUrl:"",ttsUrl:"",stream:"",isReliesReady:false,template:"simple",plugin:[],audio:1,autoplay:1,videoLoading:false},state:(_state={countTimer:undefined,recodeTime:0,recodeTimer:undefined},_defineProperty(_state,"recodeTime",0),_defineProperty(_state,"fetchDefaultList",false),_defineProperty(_state,"page",0),_defineProperty(_state,"pageSize",5),_state),handleTalkSuccess:function handleTalkSuccess(){},handleTalkError:function handleTalkError(){}};var domain="https://open.ys7.com";var filePathDomain=domain;var EZUIKitPlayer=function EZUIKitPlayer(params){var _this=this;this.opt={id:params.id,apiDomain:domain+"/api/lapp/live/talk/url",filePath:filePathDomain+"/assets/ezuikit_v2.6.4",decoderVersion:"",accessToken:"",url:"",deviceSerial:"",channelNo:"",talkLink:"",rtcUrl:"",ttsUrl:"",stream:"",isReliesReady:false,template:"simple",plugin:[],audio:1,autoplay:1,fullScreenStatus:0,bSupporDoubleClickFull:true,videoLoading:false};this.params=params;if(params.id){this.opt.id=params.id}if(params.accessToken){this.opt.accessToken=params.accessToken}if(typeof params.audio!=="undefined"){this.opt.audio=params.audio}if(typeof params.decoderVersion!=="undefined"){this.opt.decoderVersion=params.decoderVersion}if(typeof params.env!=="undefined"){if(typeof params.env.domain!=="undefined"){domain=params.env.domain;this.opt.apiDomain=domain+"/api/lapp/live/talk/url"}if(typeof params.env.filePathDomain!=="undefined"){filePathDomain=params.env.filePathDomain;this.opt.filePathDomain=params.env.filePathDomain}}if(params.url){this.opt.url=params.url;this.opt.deviceSerial=params.url.split("/")[3];this.opt.channelNo=params.url.split("/")[4].split(".")[0]}if(typeof params.template!=="undefined"){this.opt.template=params.template}if(params.plugin){this.opt.plugin=params.plugin}if(typeof params.autoplay!=="undefined"){this.opt.autoplay=params.autoplay?1:0}if(typeof params.bSupporDoubleClickFull!=="undefined"){this.opt.bSupporDoubleClickFull=params.bSupporDoubleClickFull}if(typeof params.handleTalkSuccess!=="undefined"){window.EZUIKit.handleTalkSuccess=params.handleTalkSuccess}if(typeof params.handleTalkError!=="undefined"){window.EZUIKit.handleTalkError=params.handleTalkError}var id=this.opt.id;var domElement=document.getElementById(id);domElement.style.fontSize=0;domElement.style.overflowY="auto";domElement.style.position="relative";var iframe=document.createElement("iframe");function matchIframeUrl(){switch(_this.opt.template){case"simple":var iframeUrl=domain+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+_this.opt.url.replace("?","&")+"&autoplay="+_this.opt.autoplay+"&audio="+_this.opt.audio+"&accessToken="+params.accessToken+"&templete=0"+"&id="+id+"&decoderVersion="+_this.opt.decoderVersion;var controlsValue="";if(typeof params.controls!=="undefined"&&params.controls){console.log("typeof",_typeof(params.controls));controlsValue="play,voice,hd,fullScreen";if(params.controls.length>0){controlsValue=params.controls.join(",");iframeUrl+="&controls="+controlsValue}}if(params.websocketParams){iframeUrl+="&websocketParams="+JSON.stringify(params.websocketParams)}return iframeUrl;case"standard":return domain+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+_this.opt.url.replace("?","&")+"&autoplay="+_this.opt.autoplay+"&audio="+_this.opt.audio+"&accessToken="+params.accessToken+"&templete=1"+"&id="+id+"&decoderVersion="+_this.opt.decoderVersion;case"security":return domain+"/ezopen/h5/iframe_se?bSupporDoubleClickFull=0&url="+_this.opt.url.replace("?","&")+"&autoplay="+_this.opt.autoplay+"&audio="+_this.opt.audio+"&accessToken="+params.accessToken+"&templete=0"+"&id="+id+"&decoderVersion="+_this.opt.decoderVersion;case"theme":iframeUrl=domain+"/jssdk/theme.html?url=".concat(params.url,"&accessToken=").concat(params.accessToken,"&id=").concat(id,"&isMobile=").concat(params.isMobile);if(typeof params.isMobile!=="undefined"){iframeUrl+="&isMobile="+params.isMobile}if(typeof params.autoplay!=="undefined"){iframeUrl+="&autoplay="+params.autoplay}if(typeof params.domain!=="undefined"){if(params.domain=="https://test12open.ys7.com")iframeUrl+="&env="+"test12"}if(typeof params.env!=="undefined"){if(typeof params.env.domain!=="undefined"){if(params.env.domain=="https://test12open.ys7.com"){iframeUrl+="&env="+"test12"}}}if(typeof params.header!=="undefined"){iframeUrl+="&header="+params.header}return iframeUrl;default:return domain+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+_this.opt.url.replace("?","&")+"&autoplay="+_this.opt.autoplay+"&audio="+_this.opt.audio+"&accessToken="+params.accessToken+"&templete=0"+"&id="+id+"&decoderVersion="+_this.opt.decoderVersion}}iframe.src=matchIframeUrl();var iframeHeight=document.getElementById(id).offsetHeight;var iframeWidth=document.getElementById(id).offsetWidth;if(params.height){iframeHeight=parseInt(params.height);if(/\%$/.test(params.height)){iframeWidth=document.getElementById(id).offsetWidth*(parseInt(params.height)/100)}}if(params.width){iframeWidth=parseInt(params.width);if(/\%$/.test(params.width)){iframeWidth=document.getElementById(id).offsetWidth*(parseInt(params.width)/100)}}iframe.width=iframeWidth;iframe.height=iframeHeight;iframe.id="EZUIKitPlayer-"+id;iframe.setAttribute("allowfullscreen",true);iframe.setAttribute("allow","autoplay");iframe.setAttribute("frameborder",0);domElement.appendChild(iframe);var jqueryJS=_this.opt.filePath+"/js/jquery.js";var layerJs="https://open.ys7.com/assets/layer/layer.js";addJs(jqueryJS,function(){addJs(layerJs,function(){if(matchHeaderOpt().headerContainer){var headerContainer=document.createElement("div");headerContainer.setAttribute("class","panel-top");var controsDOM=document.createElement("div");controsDOM.setAttribute("class","contros");headerContainer.appendChild(controsDOM);domElement.insertBefore(headerContainer,iframe);if(matchHeaderOpt().capturePictureModule){var capturePictureDOM=document.createElement("span");capturePictureDOM.innerHTML='<span title="截图">'+'<svg id="capturePicture" title="截图" t="1578882764585" class="icon" viewBox="0 0 1024 1024" version="1.1"'+'  xmlns="http://www.w3.org/2000/svg" p-id="5958" width="24" height="24">'+"  <path"+'    d="M887.296 315.904h-153.6c-51.2 0-68.096-102.4-119.296-102.4H392.704c-34.304 0-51.2 102.4-102.4 102.4h-153.6c-29.696 0-51.2 21.504-51.2 51.2v439.296c0 25.6 21.504 47.104 51.2 47.104h751.104c29.696 0 51.2-21.504 51.2-51.2v-435.2c-0.512-30.208-21.504-51.2-51.712-51.2zM512 768c-115.2 0-204.8-89.6-204.8-200.704s89.6-200.704 204.8-200.704 204.8 89.6 204.8 200.704-93.696 200.704-204.8 200.704z m247.296-354.304c-12.8 0-25.6-12.8-25.6-25.6s12.8-25.6 25.6-25.6 25.6 12.8 25.6 25.6c0 17.408-12.8 25.6-25.6 25.6zM256 264.704c0-8.704-8.704-16.896-16.896-16.896h-51.2c-8.704 0-16.896 8.704-16.896 16.896V281.6H256v-16.896z m256 148.992c-85.504 0-153.6 68.096-153.6 153.6s68.096 153.6 153.6 153.6 153.6-68.096 153.6-153.6-68.096-153.6-153.6-153.6z"'+'    fill="#ffffff" p-id="5959"></path>'+"</svg>"+"</span>";capturePictureDOM.onclick=function(){_this.capturePicture()};controsDOM.appendChild(capturePictureDOM)}console.log("matchHeaderOpt().saveModule",matchHeaderOpt().saveModule);if(matchHeaderOpt().saveModule){var startSaveDOM=document.createElement("span");startSaveDOM.innerHTML='<span title="开始录像">'+'  <svg id="startSave" t="1578882716693" class="icon" viewBox="0 0 1024 1024" version="1.1"'+'    xmlns="http://www.w3.org/2000/svg" p-id="3782" width="24" height="24">'+"    <path"+'      d="M915.2 729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6 19.2-38.4 44.8-51.2l128-76.8c25.6-12.8 44.8 0 44.8 19.2V704c0 32-19.2 38.4-44.8 25.6z m-332.8 89.6H96c-51.2 0-89.6-38.4-89.6-89.6V332.8c0-51.2 38.4-89.6 89.6-89.6h486.4c51.2 0 89.6 38.4 89.6 89.6v396.8c0 51.2-38.4 89.6-89.6 89.6zM192 364.8c-32 6.4-57.6 32-64 64-12.8 57.6 38.4 115.2 96 102.4 32-6.4 57.6-32 64-70.4 12.8-57.6-38.4-108.8-96-96z m0 0"'+'      p-id="3783" fill="#ffffff"></path>'+"  </svg>"+"</span>";startSaveDOM.onclick=function(){_this.startSave();document.getElementById("startSave").setAttribute("class","icon hide");document.getElementById("stopSave").setAttribute("class","icon")};controsDOM.appendChild(startSaveDOM);var stopSaveDOM=document.createElement("span");stopSaveDOM.innerHTML='<span title="结束录像">'+' <svg id="stopSave" t="1578882716693" class="icon hide" viewBox="0 0 1024 1024" version="1.1"'+'   xmlns="http://www.w3.org/2000/svg" p-id="3782" width="24" height="24">'+"   <path"+'     d="M915.2 729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6 19.2-38.4 44.8-51.2l128-76.8c25.6-12.8 44.8 0 44.8 19.2V704c0 32-19.2 38.4-44.8 25.6z m-332.8 89.6H96c-51.2 0-89.6-38.4-89.6-89.6V332.8c0-51.2 38.4-89.6 89.6-89.6h486.4c51.2 0 89.6 38.4 89.6 89.6v396.8c0 51.2-38.4 89.6-89.6 89.6zM192 364.8c-32 6.4-57.6 32-64 64-12.8 57.6 38.4 115.2 96 102.4 32-6.4 57.6-32 64-70.4 12.8-57.6-38.4-108.8-96-96z m0 0"'+'     p-id="3783" fill="red"></path>'+" </svg>"+" </span>";stopSaveDOM.onclick=function(){_this.stopSave();document.getElementById("stopSave").setAttribute("class","icon hide");document.getElementById("startSave").setAttribute("class","icon")};controsDOM.appendChild(stopSaveDOM)}if(matchHeaderOpt().zoomModule){var enableZoomDOM=document.createElement("span");enableZoomDOM.innerHTML='<span title="开启电子放大">'+'  <svg id="enableZoom" t="1578882639834" class="icon" viewBox="0 0 1000 1000" version="1.1"'+'    xmlns="http://www.w3.org/2000/svg" p-id="2227" width="24" height="24">'+"    <path"+'      d="M830.6119 441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559 247.3333 128.8559 441.1089 285.9508 791.972 479.7344 791.972 830.6119 634.8845 830.6119 441.1089zM483.2821 710.4863c-146.7975 0-265.8187-118.9953-265.8187-265.8088S336.4847 178.8697 483.2821 178.8697s265.8197 118.9953 265.8197 265.8078S630.0796 710.4863 483.2821 710.4863zM770.6031 653.5739l-72.6417 75.9485 141.6917 160.1814 82.0737-90.0739L770.6031 653.5739zM527.5849 267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z"'+'      p-id="2228" fill="#ffffff"></path>'+"  </svg>"+"</span>";enableZoomDOM.onclick=function(){_this.enableZoom();document.getElementById("enableZoom").setAttribute("class","icon hide");document.getElementById("closeZoom").setAttribute("class","icon")};controsDOM.appendChild(enableZoomDOM);var closeZoomDOM=document.createElement("span");closeZoomDOM.innerHTML='<span title="关闭电子放大">'+'  <svg id="closeZoom" t="1578882639834" class="icon hide" viewBox="0 0 1000 1000" version="1.1"'+'    xmlns="http://www.w3.org/2000/svg" p-id="2227" width="24" height="24">'+"    <path"+'      d="M830.6119 441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559 247.3333 128.8559 441.1089 285.9508 791.972 479.7344 791.972 830.6119 634.8845 830.6119 441.1089zM483.2821 710.4863c-146.7975 0-265.8187-118.9953-265.8187-265.8088S336.4847 178.8697 483.2821 178.8697s265.8197 118.9953 265.8197 265.8078S630.0796 710.4863 483.2821 710.4863zM770.6031 653.5739l-72.6417 75.9485 141.6917 160.1814 82.0737-90.0739L770.6031 653.5739zM527.5849 267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z"'+'      p-id="2228" fill="red"></path>'+"  </svg>"+"</span>";closeZoomDOM.onclick=function(){_this.closeZoom();document.getElementById("closeZoom").setAttribute("class","icon hide");document.getElementById("enableZoom").setAttribute("class","icon")};controsDOM.appendChild(closeZoomDOM)}}function matchFooterOpt(){var result={footerContainer:false,talkModule:false,broadcastModule:false,hdModule:false,fullScreenModule:false};var template=_this.opt.template;switch(template){case"simple":if(params.footer&&params.footer instanceof Array){var footer=params.footer;result={footerContainer:true,talkModule:footer.indexOf("talk")!==-1,broadcastModule:footer.indexOf("broadcast")!==-1,hdModule:footer.indexOf("hd")!==-1,fullScreenModule:footer.indexOf("fullScreen")!==-1}}break;case"standard":if(params.footer&&params.footer instanceof Array){var footer=params.footer;result={footerContainer:true,talkModule:footer.indexOf("talk")!==-1,broadcastModule:footer.indexOf("broadcast")!==-1,hdModule:footer.indexOf("hd")!==-1,fullScreenModule:footer.indexOf("fullScreen")!==-1}}break;case"security":break;case"voice":result={footerContainer:true,talkModule:true,broadcastModule:true,hdModule:true,fullScreenModule:true};break}return result}function matchHeaderOpt(){var result={headerContainer:false,capturePictureModule:false,saveModule:false,zoomModule:false};var template=_this.opt.template;switch(template){case"simple":if(params.header&&params.header instanceof Array){var header=params.header;result={headerContainer:true,capturePictureModule:header.indexOf("capturePicture")!==-1,saveModule:header.indexOf("save")!==-1,zoomModule:header.indexOf("zoom")!==-1}}break;case"standard":break;case"security":break;case"voice":result={headerContainer:true,capturePictureModule:true,saveModule:true,zoomModule:true};break}return result}if(matchFooterOpt().footerContainer||_this.opt.plugin.indexOf("talk")!==-1){var recoderCSS=_this.opt.filePath+"/npm/css/recoder.css";var recoderJs=_this.opt.filePath+"/npm/js/recoder.js";var recorderJs=_this.opt.filePath+"/recorder.js";addCss(recoderCSS,function(){});addJs(recoderJs,function(){addJs(recorderJs,function(){})});if(_this.opt.plugin.indexOf("talk")!==-1||matchFooterOpt().talkModule){var apiSuccess=function apiSuccess(data){console.log("data",data);if(data.code==200){var apiResult=data.data;if(apiResult){var rtcTrunk=apiResult.rtcUrl;if(rtcTrunk.indexOf("ws")===-1){rtcTrunk=rtcTrunk.replace("https","wss").replace("rtcgw","rtcgw-ws")}_this.opt.rtcUrl=rtcTrunk;_this.opt.ttsUrl="tts://"+apiResult.ttsUrl;var talk="talk://"+_this.opt.deviceSerial+":0:"+_this.opt.channelNo+":cas.ys7.com:6500";_this.opt.talkLink=_this.opt.ttsUrl+"/"+talk;_this.opt.stream=apiResult.stream;console.log("_this.opt",_this.opt);if(!_this.opt.isReliesReady){var adapeterJS=_this.opt.filePath+"/npm/js/adapeter.js";var janusJS=_this.opt.filePath+"/npm/js/janus.js";var ttsJS=_this.opt.filePath+"/npm/js/tts.js";console.log("加载jquery.js");addJs(adapeterJS,function(){console.log("加载adapeter.js");addJs(janusJS,function(){console.log("加载janus.js");addJs(ttsJS,function(){console.log("加载tts.js");_this.opt.isReliesReady=true})})},function(){return!!window.adapter})}if(!document.getElementById("audioleft")){var audioleft=document.createElement("div");audioleft.style.display="none";audioleft.id="audioleft";document.body.appendChild(audioleft)}if(!document.getElementById("audioright")){var audioright=document.createElement("div");audioright.style.display="none";audioright.id="audioright";document.body.appendChild(audioright)}}}EZUIKit.opt=_this.opt;if(window.EZUIKit){window.EZUIKit.opt=_this.opt}};request(_this.opt.apiDomain,"POST",{accessToken:_this.opt.accessToken,deviceSerial:_this.opt.deviceSerial,channelNo:_this.opt.channelNo},"",apiSuccess)}if(matchFooterOpt().footerContainer){var countTime=function countTime(type,start){clearInterval(EZUIKit.state.countTimer);if(type==="add"){var i=start;EZUIKit.state.countTimer=setInterval(function(){++i;document.getElementById("time-area").innerHTML=formatSeconds(i)},1e3)}else if(type==="sub"){var i=start;EZUIKit.state.countTimer=setInterval(function(){if(i>0){i--;document.getElementById("time-area").innerHTML=formatSeconds(i)}else{clearInterval(EZUIKit.state.countTimer);EZUIKit.state.countTimer=undefined;console.log("倒计时结束,开启声音")}},1e3)}else if(type==="destory"){clearInterval(EZUIKit.state.countTimer);EZUIKit.state.countTimer=undefined;document.getElementById("time-area").innerHTML="00:00"}function formatSeconds(value){var theTime=parseInt(value);var middle=0;var hour=0;var secondV="00";var minV="00";var hourV="00";if(theTime>59){middle=parseInt(theTime/60);theTime=parseInt(theTime%60);if(middle>59){hour=parseInt(middle/60);middle=parseInt(middle%60)}}secondV=parseInt(theTime)>9?parseInt(theTime):"0"+parseInt(theTime);minV=parseInt(middle)>9?parseInt(middle):"0"+parseInt(middle);hourV=parseInt(hour)>9?parseInt(hour):"0"+parseInt(hour);if(hour>0){return hourV+":"+minV+":"+secondV}else if(middle>0){return minV+":"+secondV}else{return"00:"+secondV}}};var footerContainer=document.createElement("div");footerContainer.setAttribute("class","audio-controls");domElement.appendChild(footerContainer);if(matchFooterOpt().hdModule||matchFooterOpt().fullScreenModule){var rightContros=document.createElement("div");rightContros.setAttribute("class","contros");footerContainer.appendChild(rightContros);if(matchFooterOpt().hdModule){var hdDom=document.createElement("span");hdDom.setAttribute("id","video-hd");hdDom.innerHTML=_this.opt.url.indexOf(".hd")===-1?"标清":"高清";hdDom.onclick=function(){if(_this.opt.videoLoading){layer.msg("视频加载中,请稍后");return false}else{var stopPromise=_this.stop();_this.opt.videoLoading=true;stopPromise.then(function(data){_this.opt.videoLoading=false;if(_this.opt.url.indexOf(".hd")===-1){_this.opt.url=_this.opt.url.replace(".live",".hd.live");hdDom.innerHTML=_this.opt.url.indexOf(".hd")===-1?"标清":"高清"}else{_this.opt.url=_this.opt.url.replace(".hd.live",".live");hdDom.innerHTML=_this.opt.url.indexOf(".hd")===-1?"标清":"高清"}_this.play(_this.opt.url)})["catch"](function(error){console.log("error",error)})}};rightContros.appendChild(hdDom)}if(matchFooterOpt().fullScreenModule){var openSoundDOM=document.createElement("span");openSoundDOM.setAttribute("class","hide");openSoundDOM.setAttribute("id","ezuikit-open-sound");openSoundDOM.setAttribute("title","打开声音");openSoundDOM.setAttribute("style","vertical-align: top;");openSoundDOM.innerHTML='<svg t="1590476263239" class="icon" viewBox="0 0 1178 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2273" width="16" height="16"><path d="M665.6 51.2 665.6 51.2c-10.24-30.72-40.96-51.2-71.68-51.2-5.12 0-15.36 0-20.48 5.12l0 0L358.4 153.6 51.2 209.92l0 0C20.48 220.16 0 250.88 0 281.6 0 286.72 0 291.84 0 307.2l0 0 0 409.6 0 0c0 15.36 0 20.48 0 25.6 0 30.72 20.48 61.44 51.2 71.68l0 0L358.4 870.4l97.28 71.68 107.52 76.8 0 0c5.12 5.12 15.36 5.12 25.6 5.12 40.96 0 76.8-35.84 76.8-76.8 0-10.24 0-10.24 0-25.6l0 0L665.6 51.2zM563.2 870.4l-153.6-102.4-307.2-51.2L102.4 307.2l307.2-51.2 153.6-102.4L563.2 870.4z" p-id="2274" fill="#FF0000"></path><path d="M1049.6 537.6l112.64-112.64c20.48-20.48 20.48-56.32 0-76.8-20.48-20.48-56.32-20.48-76.8 0L972.8 460.8l-112.64-112.64c0 0 0 0 0 0-20.48-20.48-56.32-20.48-76.8 0 0 0 0 0 0 0-20.48 20.48-20.48 56.32 0 76.8l112.64 112.64-112.64 112.64c-20.48 20.48-20.48 56.32 0 76.8 20.48 20.48 56.32 20.48 76.8 0L972.8 614.4l112.64 112.64c20.48 20.48 56.32 20.48 76.8 0s20.48-56.32 0-76.8L1049.6 537.6z" p-id="2275" fill="#FF0000"></path></svg>';openSoundDOM.onclick=function(){_this.openSound(0);openSoundDOM.setAttribute("class","hide");closeSoundDOM.setAttribute("class","")};var closeSoundDOM=document.createElement("span");openSoundDOM.setAttribute("id","ezuikit-close-sound");closeSoundDOM.setAttribute("class","hide");closeSoundDOM.setAttribute("title","关闭声音");closeSoundDOM.setAttribute("style","vertical-align: top;");closeSoundDOM.innerHTML='<svg t="1590414410633" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20545" width="16" height="16"><path d="M840.533333 98.133333c-17.066667-17.066667-42.666667-17.066667-59.733333 0-17.066667 17.066667-17.066667 42.666667 0 59.733334C883.2 256 938.666667 392.533333 938.666667 533.333333c0 140.8-55.466667 277.333333-157.866667 375.466667-17.066667 17.066667-17.066667 42.666667 0 59.733333 8.533333 8.533333 21.333333 12.8 29.866667 12.8 8.533333 0 21.333333-4.266667 29.866666-12.8 115.2-110.933333 183.466667-268.8 183.466667-435.2 0-166.4-68.266667-324.266667-183.466667-435.2zM571.733333 12.8c-17.066667-8.533333-34.133333-4.266667-46.933333 8.533333L281.6 256H42.666667c-25.6 0-42.666667 17.066667-42.666667 42.666667v426.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h238.933333l243.2 234.666667c8.533333 8.533333 17.066667 12.8 29.866667 12.8 4.266667 0 12.8 0 17.066666-4.266667 17.066667-8.533333 25.6-21.333333 25.6-38.4V51.2c0-17.066667-8.533333-34.133333-25.6-38.4zM512 870.4l-183.466667-179.2c-8.533333-4.266667-17.066667-8.533333-29.866666-8.533333H85.333333V341.333333h213.333334c12.8 0 21.333333-4.266667 29.866666-12.8L512 153.6v716.8z" p-id="20546" fill="#ffffff"></path><path d="M759.466667 349.866667c-12.8-21.333333-38.4-25.6-59.733334-8.533334-21.333333 12.8-25.6 38.4-8.533333 59.733334 21.333333 29.866667 34.133333 76.8 34.133333 123.733333 0 46.933333-12.8 93.866667-34.133333 123.733333-12.8 21.333333-8.533333 46.933333 8.533333 59.733334 8.533333 4.266667 17.066667 8.533333 25.6 8.533333 12.8 0 25.6-4.266667 34.133334-17.066667 34.133333-46.933333 51.2-106.666667 51.2-174.933333 0-68.266667-17.066667-128-51.2-174.933333z" p-id="20547" fill="#ffffff"></path></svg>';closeSoundDOM.onclick=function(){_this.closeSound(0);openSoundDOM.setAttribute("class","");closeSoundDOM.setAttribute("class","hide")};rightContros.appendChild(openSoundDOM);rightContros.appendChild(closeSoundDOM)}if(_this.opt.audio==1){closeSoundDOM.setAttribute("class","")}else{openSoundDOM.setAttribute("class","");_this.closeSound(0)}if(matchFooterOpt().fullScreenModule){var fullScreenDOM=document.createElement("span");fullScreenDOM.setAttribute("title","全屏");fullScreenDOM.setAttribute("style","vertical-align: top;");fullScreenDOM.innerHTML='<svg id="fullScreen" t="1578020167938" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5035" width="16" height="16"> <path d="M348.373333 625.706667l-128 128-64 64v-128a33.28 33.28 0 0 0-35.413333-35.413334A33.493333 33.493333 0 0 0 85.333333 689.706667v213.333333A33.706667 33.706667 0 0 0 120.96 938.666667h213.333333a35.626667 35.626667 0 0 0 0-71.04h-128l64-64 128-128a35.2 35.2 0 0 0-49.92-49.92zM206.293333 156.373333h128a33.28 33.28 0 0 0 35.413334-35.413333A33.493333 33.493333 0 0 0 334.293333 85.333333H113.706667c-7.04 0-14.08 7.04-21.333334 14.293334a26.026667 26.026667 0 0 0-7.04 21.333333v213.333333a33.493333 33.493333 0 0 0 35.626667 35.413334 33.28 33.28 0 0 0 35.413333-35.413334v-128l192 192a35.2 35.2 0 0 0 49.92-49.92zM903.04 85.333333h-213.333333a33.493333 33.493333 0 0 0-35.413334 35.626667 33.28 33.28 0 0 0 35.413334 35.413333h128l-64 64-128 128a35.2 35.2 0 0 0 49.92 49.92l128-128 64-64v128a35.626667 35.626667 0 0 0 71.04 0v-213.333333A33.706667 33.706667 0 0 0 903.04 85.333333zM903.04 654.293333a33.28 33.28 0 0 0-35.413333 35.413334v128l-64-64-128-128a35.2 35.2 0 0 0-49.92 49.92l128 128 64 64h-128a35.626667 35.626667 0 0 0 0 71.04h213.333333A33.706667 33.706667 0 0 0 938.666667 903.04v-213.333333a33.493333 33.493333 0 0 0-35.626667-35.413334z" p-id="5036" fill="#ffffff"></path></svg>';fullScreenDOM.onclick=function(){_this.fullScreen()};rightContros.appendChild(fullScreenDOM)}}if(matchFooterOpt().talkModule){var startTalkDOM=document.createElement("div");var stopTalkDOM=document.createElement("div");startTalkDOM.setAttribute("class","ptp-talk off");startTalkDOM.innerHTML='<span title="对讲">'+'<svg t="1581930496966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"'+'  p-id="1641" width="16" height="16">'+"  <path"+'    d="M715.648 647.872c-30.208-22.336-61.568 39.36-100.992 77.44-39.36 38.08-34.112 31.488-123.392-17.088S311.488 540.224 280 491.648C248.448 443.072 265.472 424.704 265.472 424.704s78.72-62.976 97.152-81.344c18.368-18.368 13.12-30.208 13.12-30.208l-128.64-190.144c-23.616-5.184-64.32 5.12-128.576 57.6C54.208 233.088 30.592 353.856 151.296 575.68c120.768 221.824 347.84 330.752 485.568 374.08 137.856 43.328 228.416-61.696 249.408-103.68 21.056-41.984 13.12-85.312 13.12-85.312S745.856 670.208 715.648 647.872z"'+'    p-id="1642" fill="#ffffff"></path>'+"  <path"+'    d="M715.328 64C580.992 64 472.192 172.864 472.192 307.2s108.8 243.2 243.136 243.2 243.2-108.864 243.2-243.2S849.6 64 715.328 64zM715.328 461.056c-84.992 0-153.856-68.864-153.856-153.856s68.864-153.856 153.856-153.856 153.856 68.928 153.856 153.856S800.32 461.056 715.328 461.056z"'+'    p-id="1643" fill="#ffffff"></path>'+"  <path"+'    d="M777.472 277.376c-18.176 0-32.96-14.784-32.96-33.024 0-8.448 3.136-16.064 8.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2 0-92.672 41.472-92.672 92.736s41.472 92.736 92.672 92.736S808.064 358.4 808.064 307.2c0-13.696-3.072-26.688-8.384-38.4C793.728 274.112 786.048 277.376 777.472 277.376zM715.328 340.928c-18.624 0-33.664-15.104-33.664-33.728 0-18.624 15.04-33.728 33.664-33.728 18.688 0 33.728 15.104 33.728 33.728C749.056 325.824 734.016 340.928 715.328 340.928z"'+'    p-id="1644" fill="#ffffff"></path>'+" </svg>"+" </span>"+" <span>开启对讲</span>";startTalkDOM.onclick=function(){console.log("EZUIKit.state.countTimer",EZUIKit.state.countTimer);if(EZUIKit.state.countTimer){window.layer.msg("语音设备正忙,请稍后重试");return false}countTime("add",0);console.log("开始对讲,关闭声音");_this.closeSound(0);console.log(_this.opt);_this.startTalk();this.setAttribute("class","ptp-talk off hide");stopTalkDOM.setAttribute("class","ptp-talk on")};stopTalkDOM.setAttribute("class","ptp-talk on hide");stopTalkDOM.innerHTML='<span title="对讲">'+' <svg t="1581930496966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"'+'    p-id="1641" width="16" height="16">'+"    <path"+'      d="M715.648 647.872c-30.208-22.336-61.568 39.36-100.992 77.44-39.36 38.08-34.112 31.488-123.392-17.088S311.488 540.224 280 491.648C248.448 443.072 265.472 424.704 265.472 424.704s78.72-62.976 97.152-81.344c18.368-18.368 13.12-30.208 13.12-30.208l-128.64-190.144c-23.616-5.184-64.32 5.12-128.576 57.6C54.208 233.088 30.592 353.856 151.296 575.68c120.768 221.824 347.84 330.752 485.568 374.08 137.856 43.328 228.416-61.696 249.408-103.68 21.056-41.984 13.12-85.312 13.12-85.312S745.856 670.208 715.648 647.872z"'+'      p-id="1642" fill="#ff0000"></path>'+"    <path"+'      d="M715.328 64C580.992 64 472.192 172.864 472.192 307.2s108.8 243.2 243.136 243.2 243.2-108.864 243.2-243.2S849.6 64 715.328 64zM715.328 461.056c-84.992 0-153.856-68.864-153.856-153.856s68.864-153.856 153.856-153.856 153.856 68.928 153.856 153.856S800.32 461.056 715.328 461.056z"'+'      p-id="1643" fill="#ff0000"></path>'+"    <path"+'      d="M777.472 277.376c-18.176 0-32.96-14.784-32.96-33.024 0-8.448 3.136-16.064 8.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2 0-92.672 41.472-92.672 92.736s41.472 92.736 92.672 92.736S808.064 358.4 808.064 307.2c0-13.696-3.072-26.688-8.384-38.4C793.728 274.112 786.048 277.376 777.472 277.376zM715.328 340.928c-18.624 0-33.664-15.104-33.664-33.728 0-18.624 15.04-33.728 33.664-33.728 18.688 0 33.728 15.104 33.728 33.728C749.056 325.824 734.016 340.928 715.328 340.928z"'+'      p-id="1644" fill="#ff0000"></path>'+"  </svg>"+" </span>"+"<span>关闭对讲</span>";stopTalkDOM.onclick=function(){console.log(_this.opt);_this.stopTalk();countTime("destory",0);_this.openSound(0);this.setAttribute("class","ptp-talk on hide");startTalkDOM.setAttribute("class","ptp-talk off")};footerContainer.appendChild(startTalkDOM);footerContainer.appendChild(stopTalkDOM)}if(matchFooterOpt().broadcastModule){var fetchVoiceList=function fetchVoiceList(page){function apiSuccess(data){console.log("data",data);if(data.code==200){randerVoliceList(data.data,5);EZUIKit.state.page=data.page.page;if(page==0&&data.data.length==0&&!EZUIKit.state.fetchDefaultList){EZUIKit.state.fetchDefaultList=true;fetchVoiceList(0)}}}request(domain+"/api/lapp/voice/query","POST",{accessToken:_this.opt.accessToken,pageStart:page,pageSize:EZUIKit.state.pageSize,default:EZUIKit.state.fetchDefaultList?"true":"false"},"",apiSuccess)};var randerVoliceList=function randerVoliceList(data){console.log("renderVoliceList",data);if(data&&data.length>0){for(var i=0;i<data.length;i++){var voiceItem=document.createElement("li");voiceItem.innerHTML="<li class='voice-item' id='voice-item-"+i+"' data-time="+(data[i]["duration"]||20)+" data-url="+data[i]["fileUrl"]+">"+(data[i]["voiceName"].length>10?data[i]["voiceName"].substr(0,10)+"...":data[i]["voiceName"])+"</li>";document.getElementsByClassName("voice-list-ul")[0].append(voiceItem);voiceItem.onclick=function(e){console.log("点击元素",e.target,e.target.dataset.url);var voiceUrl=e.target.dataset.url;var time=e.target.dataset.time;playListOfVoice(voiceUrl,time)}}if(data.length===EZUIKit.state.pageSize){document.getElementById("voice-list-end").innerHTML="向下滚动加载更多"}else{document.getElementById("voice-list-end").innerHTML="没有更多数据了"}}};var playListOfVoice=function playListOfVoice(voiceUrl,time){console.log("播放语音",voiceUrl,time);function apiSuccess(data){console.log("data.data",data.data);if(data.code==200){countTime("sub",parseInt(time))}else if(data.code=="10001"){window.layer.msg("未找到当前语音")}else{window.layer.msg(data.msg||"发送失败,请稍后再试")}}request(domain+"/api/lapp/voice/send","POST",{accessToken:_this.opt.accessToken,deviceSerial:_this.opt.deviceSerial,channelNo:_this.opt.channelNo,fileUrl:voiceUrl},"",apiSuccess)};var startBroadcastDOM=document.createElement("div");var stopBroadcastDOM=document.createElement("div");startBroadcastDOM.setAttribute("class","broadcast off");stopBroadcastDOM.setAttribute("class","broadcast on hide");startBroadcastDOM.innerHTML=' <span title="语音播报">'+'  <svg t="1583561695846" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"'+'    p-id="1126" width="16" height="16">'+"    <path"+'      d="M513.82044445 964.38044445c-8.192 0-15.47377778-2.73066667-21.84533334-8.192 0 0-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666666H246.21511111c7.28177778-2.73066667 37.31911111-15.47377778 137.44355556-91.02222222 58.25422222-43.69066667 111.04711111-86.47111111 111.04711111-86.47111112 5.46133333-4.55111111 12.74311111-7.28177778 20.02488889-7.28177778 4.55111111 0 10.01244445 0.91022222 14.56355555 3.6408889 10.92266667 5.46133333 18.20444445 17.29422222 18.20444445 30.03733333v837.40444444c0 12.74311111-7.28177778 25.48622222-19.11466667 30.94755556-5.46133333 1.82044445-10.01244445 2.73066667-14.56355555 2.73066667zM270.79111111 724.992c19.11466667 0 48.24177778 8.192 167.48088889 106.496 16.384 13.65333333 33.67822222 28.21688889 51.88266667 43.69066667l5.46133333 4.55111111V139.71911111l-5.46133333 3.64088889c-22.75555555 17.29422222-44.60088889 34.58844445-65.536 50.06222222C293.54666667 291.72622222 264.41955555 299.008 245.30488889 299.008H82.37511111c-20.02488889 0-21.84533333 12.74311111-21.84533333 26.39644445V694.04444445c0 23.66577778 6.37155555 30.03733333 28.21688889 30.03733333h180.224l1.82044444 0.91022222z m520.64711111 162.01955555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666 0-11.83288889 8.192-20.02488889 16.384-24.576 112.86755555-67.35644445 182.04444445-191.14666667 182.04444444-324.03911111 0-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576 0-14.56355555 11.83288889-27.30666667 26.39644445-27.30666667 5.46133333 0 10.01244445 1.82044445 16.384 5.46133333 128.34133333 76.45866667 207.53066667 218.45333333 207.53066666 369.55022222 0 152.00711111-80.09955555 293.09155555-208.44088889 369.55022223-6.37155555 5.46133333-10.92266667 7.28177778-16.384 7.28177777z m-90.112-152.91733333c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666667 0-10.01244445 4.55111111-18.20444445 12.74311111-23.66577777 61.89511111-34.58844445 100.12444445-100.12444445 100.12444444-171.12177778 0-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778 0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666667 4.55111111 0 11.83288889 2.73066667 15.47377778 4.55111111 74.63822222 44.60088889 121.96977778 127.43111111 121.96977778 215.72266667 0 90.112-48.24177778 173.85244445-125.61066667 218.45333333-1.82044445 0-9.10222222 4.55111111-15.47377778 4.55111111z"'+'      fill="#ffffff" p-id="1127"></path>'+"  </svg>"+"</span>"+"<span>语音播报</span>";startBroadcastDOM.onclick=function(){this.setAttribute("class","broadcast off hide");stopBroadcastDOM.setAttribute("class","broadcast on")};stopBroadcastDOM.innerHTML='<div class="pop-hover">'+'  <div class="pop-hover-content">'+'    <div class="vioce-list" id="voice-list">'+'      <ul class="voice-list-ul">'+"      </ul>"+'      <div id="voice-list-end"></div>'+"    </div>"+'    <div id="voice-custom" style="text-align: center;">自定义语音</div>'+"  </div>"+"</div>"+'<span title="语音播报">'+'  <svg t="1583561695846" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"'+'    p-id="1126" width="16" height="16">'+"    <path"+'      d="M513.82044445 964.38044445c-8.192 0-15.47377778-2.73066667-21.84533334-8.192 0 0-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666666H246.21511111c7.28177778-2.73066667 37.31911111-15.47377778 137.44355556-91.02222222 58.25422222-43.69066667 111.04711111-86.47111111 111.04711111-86.47111112 5.46133333-4.55111111 12.74311111-7.28177778 20.02488889-7.28177778 4.55111111 0 10.01244445 0.91022222 14.56355555 3.6408889 10.92266667 5.46133333 18.20444445 17.29422222 18.20444445 30.03733333v837.40444444c0 12.74311111-7.28177778 25.48622222-19.11466667 30.94755556-5.46133333 1.82044445-10.01244445 2.73066667-14.56355555 2.73066667zM270.79111111 724.992c19.11466667 0 48.24177778 8.192 167.48088889 106.496 16.384 13.65333333 33.67822222 28.21688889 51.88266667 43.69066667l5.46133333 4.55111111V139.71911111l-5.46133333 3.64088889c-22.75555555 17.29422222-44.60088889 34.58844445-65.536 50.06222222C293.54666667 291.72622222 264.41955555 299.008 245.30488889 299.008H82.37511111c-20.02488889 0-21.84533333 12.74311111-21.84533333 26.39644445V694.04444445c0 23.66577778 6.37155555 30.03733333 28.21688889 30.03733333h180.224l1.82044444 0.91022222z m520.64711111 162.01955555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666 0-11.83288889 8.192-20.02488889 16.384-24.576 112.86755555-67.35644445 182.04444445-191.14666667 182.04444444-324.03911111 0-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576 0-14.56355555 11.83288889-27.30666667 26.39644445-27.30666667 5.46133333 0 10.01244445 1.82044445 16.384 5.46133333 128.34133333 76.45866667 207.53066667 218.45333333 207.53066666 369.55022222 0 152.00711111-80.09955555 293.09155555-208.44088889 369.55022223-6.37155555 5.46133333-10.92266667 7.28177778-16.384 7.28177777z m-90.112-152.91733333c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666667 0-10.01244445 4.55111111-18.20444445 12.74311111-23.66577777 61.89511111-34.58844445 100.12444445-100.12444445 100.12444444-171.12177778 0-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778 0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666667 4.55111111 0 11.83288889 2.73066667 15.47377778 4.55111111 74.63822222 44.60088889 121.96977778 127.43111111 121.96977778 215.72266667 0 90.112-48.24177778 173.85244445-125.61066667 218.45333333-1.82044445 0-9.10222222 4.55111111-15.47377778 4.55111111z"'+'      fill="#ff0000" p-id="1127"></path>'+"  </svg>"+"</span>"+"<span>语音播报</span>";stopBroadcastDOM.onclick=function(){this.setAttribute("class","broadcast on hide");startBroadcastDOM.setAttribute("class","broadcast off")};footerContainer.appendChild(startBroadcastDOM);footerContainer.appendChild(stopBroadcastDOM);document.getElementById("voice-custom").onclick=function(){console.log("显示自定义语音");startSpeakDOM.setAttribute("class","speak off")};fetchVoiceList(0);var startSpeakDOM=document.createElement("div");var stopSpeakDOM=document.createElement("div");startSpeakDOM.setAttribute("class","speak off hide");stopSpeakDOM.setAttribute("class","speak on hide");startSpeakDOM.setAttribute("id","startSpeak");stopSpeakDOM.setAttribute("id","stopSpeak");startSpeakDOM.innerHTML='<span title="按住说话">'+'  <svg t="1581994757678" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"'+'    p-id="1639" width="16" height="16">'+"    <path"+'      d="M757.059829 393.846154v-52.512821h262.564103v52.512821H757.059829z m-420.102564 481.367521v96.273504h175.042735a8.752137 8.752137 0 0 1 8.752137 8.752137v35.008547a8.752137 8.752137 0 0 1-8.752137 8.752137H109.401709a8.752137 8.752137 0 0 1-8.752136-8.752137v-35.008547a8.752137 8.752137 0 0 1 8.752136-8.752137h175.042735v-96.273504C129.767932 875.213675 4.376068 749.821812 4.376068 595.145299V463.863248a26.25641 26.25641 0 1 1 52.512821 0v113.777778c0 140.174222 113.637744 253.811966 253.811966 253.811965s253.811966-113.637744 253.811966-253.811965V463.863248a26.25641 26.25641 0 1 1 52.51282 0v131.282051c0 154.676513-125.391863 280.068376-280.068376 280.068376z m-26.25641-96.273504c-111.178393 0-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709 90.120752 199.522462 0 310.700855 0s201.299145 90.120752 201.299145 201.299145v376.341881c0 111.178393-90.120752 201.299145-201.299145 201.299145z m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z m-17.504273 105.025641H757.059829v-52.512821h227.555556v52.512821z m-17.504274 105.025641H757.059829v-52.512821h210.051282v52.512821z m-8.752137 105.025641H757.059829v-52.512821h201.299145v52.512821z m-17.504273 105.025641H757.059829v-52.512821h183.794872v52.512821z m-26.25641 105.025641H757.059829v-52.512821h157.538462v52.512821z"'+'      p-id="1640" fill="#ffffff"></path>'+"  </svg>"+"</span>"+"<span>按住说话</span>";stopSpeakDOM.innerHTML='<span title="按住说话">'+'<svg t="1581994757678" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"'+'  p-id="1639" width="16" height="16">'+"  <path"+'    d="M757.059829 393.846154v-52.512821h262.564103v52.512821H757.059829z m-420.102564 481.367521v96.273504h175.042735a8.752137 8.752137 0 0 1 8.752137 8.752137v35.008547a8.752137 8.752137 0 0 1-8.752137 8.752137H109.401709a8.752137 8.752137 0 0 1-8.752136-8.752137v-35.008547a8.752137 8.752137 0 0 1 8.752136-8.752137h175.042735v-96.273504C129.767932 875.213675 4.376068 749.821812 4.376068 595.145299V463.863248a26.25641 26.25641 0 1 1 52.512821 0v113.777778c0 140.174222 113.637744 253.811966 253.811966 253.811965s253.811966-113.637744 253.811966-253.811965V463.863248a26.25641 26.25641 0 1 1 52.51282 0v131.282051c0 154.676513-125.391863 280.068376-280.068376 280.068376z m-26.25641-96.273504c-111.178393 0-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709 90.120752 199.522462 0 310.700855 0s201.299145 90.120752 201.299145 201.299145v376.341881c0 111.178393-90.120752 201.299145-201.299145 201.299145z m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z m-17.504273 105.025641H757.059829v-52.512821h227.555556v52.512821z m-17.504274 105.025641H757.059829v-52.512821h210.051282v52.512821z m-8.752137 105.025641H757.059829v-52.512821h201.299145v52.512821z m-17.504273 105.025641H757.059829v-52.512821h183.794872v52.512821z m-26.25641 105.025641H757.059829v-52.512821h157.538462v52.512821z"'+'    p-id="1640" fill="#ff0000"></path>'+"</svg>"+"</span>"+"<span>松开发送</span>";footerContainer.appendChild(startSpeakDOM);footerContainer.appendChild(stopSpeakDOM);document.getElementById("voice-list").onscroll=function(e){var sum=this.scrollHeight;console.log("sum",sum,this.scrollTop,document.getElementById("voice-list").clientHeight);if(sum<=this.scrollTop+this.clientHeight){console.log("拖动到底,执行加载",EZUIKit.state.page);fetchVoiceList(++EZUIKit.state.page)}};var timeAreaDOM=document.createElement("div");timeAreaDOM.setAttribute("class","time-area");timeAreaDOM.setAttribute("id","time-area");timeAreaDOM.innerHTML="00:00";footerContainer.appendChild(timeAreaDOM);var recorder;document.getElementById("startSpeak").onmousedown=function(){if(EZUIKit.state.countTimer){window.layer.msg("语音设备正忙,请稍后重试");return false}console.log("按住说话");startSpeakDOM.setAttribute("class","speak off hide");stopSpeakDOM.setAttribute("class","speak on");voiceInit();countTime("add",0);setTimeout(function(){EZUIKit.state.recodeTime=0;startRecording()},1e3);if(EZUIKit.state.recodeTimer){clearInterval(EZUIKit.state.recodeTimer)}EZUIKit.state.recodeTimer=setInterval(function(){if(EZUIKit.state.recodeTime>=59){_this.stopTalk();countTime("destory",0);this.setAttribute("class","ptp-talk on hide");startTalkDOM.setAttribute("class","ptp-talk off");window.layer.msg("不超过1分钟")}else{EZUIKit.state.recodeTime=EZUIKit.state.recodeTime+1}},1e3);var audio_context;function startUserMedia(stream){var input=audio_context.createMediaStreamSource(stream);recorder=new window.Recorder(input)}function startRecording(){recorder&&recorder.record()}function voiceInit(){console.log("run init");try{window.AudioContext=window.AudioContext||window.webkitAudioContext;navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia;window.URL=window.URL||window.webkitURL;audio_context=new AudioContext;console.log("Audio context set up.");console.log("navigator.getUserMedia "+(navigator.getUserMedia?"available.":"not present!"))}catch(e){console.log("err",e);window.layer.msg("No web audio support in this browser!")}navigator.getUserMedia({audio:true},startUserMedia,function(e){console.log("No live audio input: "+e)})}};document.getElementById("stopSpeak").onmouseup=function(){console.log("松开发送");stopSpeakDOM.setAttribute("class","speak on hide");stopSpeakFun();function stopSpeakFun(){countTime("destory",0);if(EZUIKit.state.recodeTime<1){window.layer.msg("说话时间过短");clearInterval(EZUIKit.state.recodeTimer);return false}clearInterval(EZUIKit.state.recodeTimer);wavUpload()}function wavUpload(){try{recorder&&recorder.stop();recorder&&recorder.exportWAV(function(wav_file){console.log("wav_file",wav_file);if(wav_file.size<1e3){window.layer.msg("录音失败,请重试");EZUIKit.state.recodeTime=0;return false}countTime("sub",EZUIKit.state.recodeTime+2);var formdata=new FormData;formdata.append("voiceFile",wav_file);formdata.append("accessToken",_this.opt.accessToken);formdata.append("deviceSerial",_this.opt.deviceSerial);formdata.append("channelNo",_this.opt.channelNo);function apiSuccess(data){console.log("data.data",data.data);if(data.code==200){countTime("sub",EZUIKit.state.recodeTime+2)}else if(data.code=="10001"){window.layer.msg("未找到当前语音")}else{window.layer.msg(data.msg||"发送失败,请稍后再试")}}function apiError(err){console.log("err",err)}request(domain+"/api/lapp/voice/sendonce","POST",{voiceFile:wav_file,accessToken:_this.opt.accessToken,deviceSerial:_this.opt.deviceSerial,channelNo:_this.opt.channelNo},"",apiSuccess,apiError)});recorder&&recorder.clear()}catch(err){console.log(err)}}}}}}})});var _this=this;window.addEventListener("message",function(event){event.origin;var id=_this.opt.id;if(event.data.type){switch(event.data.type){case"openSound":if(id==event.data.id&&params.openSoundCallBack){params.openSoundCallBack(event.data)}break;case"closeSound":if(id==event.data.id&&params.closeSoundCallBack){params.closeSoundCallBack(event.data)}break;case"capturePicture":if(id==event.data.id&&params.capturePictureCallBack){params.capturePictureCallBack(event.data)}break;case"startSave":if(id==event.data.id&&params.startSaveCallBack){params.startSaveCallBack(event.data)}break;case"stopSave":if(id==event.data.id&&params.stopSaveCallBack){params.stopSaveCallBack(event.data)}break;case"fullScreen":if(id==event.data.id&&params.fullScreenCallBack){params.fullScreenCallBack(event.data)}break;case"getOSDTime":if(id==event.data.id&&params.getOSDTimeCallBack){params.getOSDTimeCallBack(event.data)}break;case"handleSuccess":if(id==event.data.id&&params.handleSuccess){params.handleSuccess(event.data)}break;case"handleError":if(id==event.data.id&&params.handleError){params.handleError(event.data)}break;case"dblclick":if(id==event.data.id&&_this.opt.bSupporDoubleClickFull){if(_this.opt.fullScreenStatus===0){_this.fullScreen()}else{_this.cancelFullScreen()}}break;case"startTalk":_this.startTalk();_this.closeSound();break;case"stopTalk":_this.stopTalk();_this.openSound();break;case"clickEventHandle":console.log("event.data",event.data);if(params.clickEventHandle){params.clickEventHandle(event.data)}break;case"removeEventHandle":if(params.removeEventHandle){params.removeEventHandle(event.data)}break;case"esc":if(params.clickEventHandle){params.clickEventHandle(event.data)}break;case"iframeFullScreen":if(id==event.data.id){var requestFullScreen=function requestFullScreen(element){var requestMethod=element.requestFullScreen||element.webkitRequestFullScreen||element.mozRequestFullScreen||element.msRequestFullScreen;if(requestMethod){requestMethod.call(element)}else if(typeof window.ActiveXObject!=="undefined"){var wscript=new ActiveXObject("WScript.Shell");if(wscript!==null){wscript.SendKeys("{F11}")}}};requestFullScreen(document.getElementById("EZUIKitPlayer-"+event.data.id))}break}}});function fullscreenchange(data){_this.opt.fullScreenStatus=data?1:0;if(params.fullScreenChangeCallBack){params.fullScreenChangeCallBack({data:data,id:_this.opt.id})}}if(typeof document.fullScreen!=="undefined"){document.addEventListener("fullscreenchange",function(){var e=document.fullscreen||false;fullscreenchange(e)})}else if(typeof document.webkitIsFullScreen!=="undefined"){document.addEventListener("webkitfullscreenchange",function(){var e=document.webkitIsFullScreen||false;fullscreenchange(e)})}else if(typeof document.mozFullScreen!=="undefined"){document.addEventListener("mozfullscreenchange",function(){var e=document.mozFullScreen||false;fullscreenchange(e)})}};EZUIKitPlayer.prototype.play=function(data){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;if(_typeof(data)==="object"&&data.url){this.opt.url=data.url}if(_typeof(data)==="object"&&data.accessToken){this.opt.accessToken=data.accessToken}if(typeof data==="string"){this.opt.url=data}player.postMessage({action:"play",accessToken:this.opt.accessToken,url:this.opt.url},domain+"/ezopen/h5/iframe");var _this=this;this.opt.videoLoading=true;var promise=new Promise(function(resolve,reject){window.addEventListener("message",function(event){var playId=_this.opt.id;if(playId==event.data.id&&event.data.type==="handleSuccess"){setTimeout(function(){_this.opt.videoLoading=false},1e3);resolve(event.data)}})});return promise};EZUIKitPlayer.prototype.stop=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage("stop",domain+"/ezopen/h5/iframe");var _this=this;var promise=new Promise(function(resolve,reject){window.addEventListener("message",function(event){var playId=_this.opt.id;if(playId==event.data.id&&event.data.type==="stop"){resolve(event.data)}})});return promise};EZUIKitPlayer.prototype.openSound=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage("openSound",domain+"/ezopen/h5/iframe");var _this=this;var promise=new Promise(function(resolve,reject){window.addEventListener("message",function(event){var playId=_this.opt.id;if(playId==event.data.id&&event.data.type==="openSound"){resolve(event.data)}})});return promise};EZUIKitPlayer.prototype.closeSound=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage("closeSound",domain+"/ezopen/h5/iframe");var _this=this;var promise=new Promise(function(resolve,reject){window.addEventListener("message",function(event){var playId=_this.opt.id;if(playId==event.data.id&&event.data.type==="closeSound"){resolve(event.data)}})});return promise};EZUIKitPlayer.prototype.startSave=function(fileName){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage({action:"startSave",fileName:fileName||"default"},domain+"/ezopen/h5/iframe");var _this=this;var promise=new Promise(function(resolve,reject){window.addEventListener("message",function(event){var playId=_this.opt.id;if(playId==event.data.id&&event.data.type==="startSave"){resolve(event.data)}})});return promise};EZUIKitPlayer.prototype.stopSave=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage("stopSave",domain+"/ezopen/h5/iframe");var _this=this;var promise=new Promise(function(resolve,reject){window.addEventListener("message",function(event){var playId=_this.opt.id;if(playId==event.data.id&&event.data.type==="stopSave"){resolve(event.data)}})});return promise};EZUIKitPlayer.prototype.fullScreen=function(){if(this.opt.fullScreenStatus===1){return false}var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var width=document.documentElement.clientWidth;var height=document.documentElement.clientHeight;var wrapper=document.body;wrapper=document.getElementById(id);var style="";style+="width:"+height+"px;";style+="height:"+width+"px;";style+="-webkit-transform: rotate(90deg); transform: rotate(90deg);";style+="-webkit-transform-origin: "+width/2+"px "+width/2+"px;";style+="transform-origin: "+width/2+"px "+width/2+"px;";style+="position: fixed;top: 0;left: 0;z-index:10";wrapper.style.cssText=style;setTimeout(function(){player.postMessage("autoResize",domain+"/ezopen/h5/iframe")},500)}else{var requestFullScreen=function requestFullScreen(element){var requestMethod=element.requestFullScreen||element.webkitRequestFullScreen||element.mozRequestFullScreen||element.msRequestFullScreen;if(requestMethod){requestMethod.call(element)}else if(typeof window.ActiveXObject!=="undefined"){var wscript=new ActiveXObject("WScript.Shell");if(wscript!==null){wscript.SendKeys("{F11}")}}};requestFullScreen(document.getElementById(id))}if(this.params.fullScreenCallBack){this.params.fullScreenCallBack(this.opt.id)}this.opt.fullScreenStatus=1};EZUIKitPlayer.prototype.cancelFullScreen=function(){if(this.opt.fullScreenStatus===0){return false}var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var width=document.getElementById(id).width;var height=document.getElementById(id).height;var wrapper=document.body;wrapper=document.getElementById(id);var style="";style+="width:"+width+"px;";style+="height:"+height+"px;";style+="-webkit-transform: none; transform: none;";style+="-webkit-transform-origin: 0 0;";style+="transform-origin: 0 0;";wrapper.style.cssText=style;setTimeout(function(){player.postMessage("autoResize",domain+"/ezopen/h5/iframe")},500);var cancelFullDOMId=id+"cancel-full-screen";var cancelFullDOM=document.getElementById(cancelFullDOMId);if(cancelFullDOM){document.body.removeChild(cancelFullDOM)}}else{if(document.exitFullscreen){document.exitFullscreen()}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}}if(this.params.cancelFullScreenCallBack){this.params.cancelFullScreenCallBack(this.opt.id)}this.opt.fullScreenStatus=0};EZUIKitPlayer.prototype.capturePicture=function(fileName,isUndownload){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage({action:"capturePicture",fileName:fileName||"default",isUndownload:isUndownload},domain+"/ezopen/h5/iframe");var _this=this;var promise=new Promise(function(resolve,reject){window.addEventListener("message",function(event){var playId=_this.opt.id;if(playId==event.data.id&&event.data.type==="capturePicture"){resolve(event.data)}})});return promise};EZUIKitPlayer.prototype.enableZoom=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage("enableZoom",domain+"/ezopen/h5/iframe")};EZUIKitPlayer.prototype.closeZoom=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage("closeZoom",domain+"/ezopen/h5/iframe")};EZUIKitPlayer.prototype.getOSDTime=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage("getOSDTime",domain+"/ezopen/h5/iframe");var _this=this;var promise=new Promise(function(resolve,reject){window.addEventListener("message",function(event){var playId=_this.opt.id;if(playId==event.data.id&&event.data.type==="getOSDTime"){resolve(event.data)}})});return promise};EZUIKitPlayer.prototype.autoResize=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage("autoResize",domain+"/ezopen/h5/iframe")};EZUIKitPlayer.prototype.reSize=function(width,height){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;var containerDOM=document.getElementById(this.opt.id);containerDOM.style.width=width+"px";containerDOM.style.height=height+"px";document.getElementById(this.opt.id).style.width=width+"px";document.getElementById(this.opt.id).style.height=height+"px";var playDOM=document.getElementById(id);playDOM.setAttribute("width",width);playDOM.setAttribute("height",height);playDOM.style.width=width+"px";playDOM.style.height=height+"px";setTimeout(function(){player.postMessage({action:"autoResize"},domain+"/ezopen/h5/iframe")},500)};EZUIKitPlayer.prototype.startTalk=function(){console.log("执行开始对讲");console.log(this.opt);var _this=this;EZUIKit.opt=this.opt;if(window.EZUIKit){window.EZUIKit.opt=this.opt}var apiSuccess=function apiSuccess(data){if(data.code==200){var apiResult=data.data;if(apiResult){var rtcTrunk=apiResult.rtcUrl;if(rtcTrunk.indexOf("ws")===-1){rtcTrunk=rtcTrunk.replace("https","wss").replace("rtcgw","rtcgw-ws")}_this.opt.rtcUrl=rtcTrunk;_this.opt.ttsUrl="tts://"+apiResult.ttsUrl;var talk="talk://"+_this.opt.deviceSerial+":0:"+_this.opt.channelNo+":cas.ys7.com:6500";_this.opt.talkLink=_this.opt.ttsUrl+"/"+talk;_this.opt.stream=apiResult.stream;window.startTalk()}}};request(_this.opt.apiDomain,"POST",{accessToken:_this.opt.accessToken,deviceSerial:_this.opt.deviceSerial,channelNo:_this.opt.channelNo},"",apiSuccess)};EZUIKitPlayer.prototype.stopTalk=function(){console.log("执行结束对讲");window.stopTalk()};EZUIKitPlayer.prototype.edit=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage("edit",domain+"/ezopen/h5/iframe")};EZUIKitPlayer.prototype.btnReRender=function(data){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage({action:"btnReRender",data:data},domain+"/ezopen/h5/iframe")};EZUIKitPlayer.prototype.changePlayUrl=function(data){if(data.deviceSerial){this.opt.deviceSerial=data.deviceSerial}if(data.channelNo){this.opt.channelNo=data.channelNo}if(data.accessToken){this.opt.accessToken=data.accessToken}var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage({action:"changePlayUrl",data:data},domain+"/ezopen/h5/iframe")};EZUIKitPlayer.prototype.fetchThemeData=function(){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage({action:"fetchThemeData"},domain+"/ezopen/h5/iframe")};EZUIKitPlayer.prototype.setThemeData=function(accessToken,header,footer){var id="EZUIKitPlayer-"+this.opt.id;var player=document.getElementById(id).contentWindow;player.postMessage({action:"setThemeData",data:{accessToken:accessToken,header:header,footer:footer}},domain+"/ezopen/h5/iframe")};EZUIKit.EZUIKitPlayer=EZUIKitPlayer;window.EZUIKitV3=EZUIKit;var EZUIKitV3=EZUIKit;return EZUIKitV3});var EZUIKitV3$1=EZUIKitV3;var dist=function debounce(fn){var wait=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var lastCallAt=void 0;var deferred=void 0;var timer=void 0;var pendingArgs=[];return function debounced(){var currentWait=getWait(wait);var currentTime=(new Date).getTime();var isCold=!lastCallAt||currentTime-lastCallAt>currentWait;lastCallAt=currentTime;for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}if(isCold&&options.leading){return options.accumulate?Promise.resolve(fn.call(this,[args])).then(function(result){return result[0]}):Promise.resolve(fn.call.apply(fn,[this].concat(args)))}if(deferred){clearTimeout(timer)}else{deferred=defer()}pendingArgs.push(args);timer=setTimeout(flush.bind(this),currentWait);if(options.accumulate){var argsIndex=pendingArgs.length-1;return deferred.promise.then(function(results){return results[argsIndex]})}return deferred.promise};function flush(){var thisDeferred=deferred;clearTimeout(timer);Promise.resolve(options.accumulate?fn.call(this,pendingArgs):fn.apply(this,pendingArgs[pendingArgs.length-1])).then(thisDeferred.resolve,thisDeferred.reject);pendingArgs=[];deferred=null}};function getWait(wait){return typeof wait==="function"?wait():wait}function defer(){var deferred={};deferred.promise=new Promise(function(resolve,reject){deferred.resolve=resolve;deferred.reject=reject});return deferred}var debounce=getDefaultExportFromCjs(dist);(function(){var h;function l(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var m="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};function n(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof commonjsGlobal&&commonjsGlobal];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object")}var q=n(this);function r(a,b){if(b)a:{var c=q;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&m(c,a,{configurable:!0,writable:!0,value:b})}}r("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.A=f;m(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.A};var d="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",e=0;return b});r("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=q[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&m(d.prototype,a,{configurable:!0,writable:!0,value:function(){return u(l(this))}})}return a});function u(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}function v(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:l(a)}}var w;if("function"==typeof Object.setPrototypeOf)w=Object.setPrototypeOf;else{var y;a:{var z={a:!0},A={};try{A.__proto__=z;y=A.a;break a}catch(a){}y=!1}w=y?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var B=w;function C(){this.m=!1;this.j=null;this.v=void 0;this.h=1;this.u=this.C=0;this.l=null}function D(a){if(a.m)throw new TypeError("Generator is already running");a.m=!0}C.prototype.o=function(a){this.v=a};C.prototype.s=function(a){this.l={D:a,F:!0};this.h=this.C||this.u};C.prototype.return=function(a){this.l={return:a};this.h=this.u};function E(a,b){a.h=3;return{value:b}}function F(a){this.g=new C;this.G=a}F.prototype.o=function(a){D(this.g);if(this.g.j)return G(this,this.g.j.next,a,this.g.o);this.g.o(a);return H(this)};function I(a,b){D(a.g);var c=a.g.j;if(c)return G(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return H(a)}F.prototype.s=function(a){D(this.g);if(this.g.j)return G(this,this.g.j["throw"],a,this.g.o);this.g.s(a);return H(this)};function G(a,b,c,d){try{var e=b.call(a.g.j,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.m=!1,e;var f=e.value}catch(g){return a.g.j=null,a.g.s(g),H(a)}a.g.j=null;d.call(a.g,f);return H(a)}function H(a){for(;a.g.h;)try{var b=a.G(a.g);if(b)return a.g.m=!1,{value:b.value,done:!1}}catch(c){a.g.v=void 0,a.g.s(c)}a.g.m=!1;if(a.g.l){b=a.g.l;a.g.l=null;if(b.F)throw b.D;return{value:b.return,done:!0}}return{value:void 0,done:!0}}function J(a){this.next=function(b){return a.o(b)};this.throw=function(b){return a.s(b)};this.return=function(b){return I(a,b)};this[Symbol.iterator]=function(){return this}}function K(a,b){b=new J(new F(b));B&&a.prototype&&B(b,a.prototype);return b}function L(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}r("Array.prototype.entries",function(a){return a?a:function(){return L(this,function(b,c){return[b,c]})}});if("undefined"!==typeof Blob&&("undefined"===typeof FormData||!FormData.prototype.keys)){var M=function(a,b){for(var c=0;c<a.length;c++)b(a[c])},N=function(a){return a.replace(/\r?\n|\r/g,"\r\n")},O=function(a,b,c){if(b instanceof Blob){c=void 0!==c?String(c+""):"string"===typeof b.name?b.name:"blob";if(b.name!==c||"[object Blob]"===Object.prototype.toString.call(b))b=new File([b],c);return[String(a),b]}return[String(a),String(b)]},P=function(a,b){if(a.length<b)throw new TypeError(b+" argument required, but only "+a.length+" present.")},Q="object"===typeof globalThis?globalThis:"object"===typeof window?window:"object"===typeof self?self:this,R=Q.FormData,S=Q.XMLHttpRequest&&Q.XMLHttpRequest.prototype.send,T=Q.Request&&Q.fetch,U=Q.navigator&&Q.navigator.sendBeacon,V=Q.Element&&Q.Element.prototype,W=Q.Symbol&&Symbol.toStringTag;W&&(Blob.prototype[W]||(Blob.prototype[W]="Blob"),"File"in Q&&!File.prototype[W]&&(File.prototype[W]="File"));try{new File([],"")}catch(a){Q.File=function(b,c,d){b=new Blob(b,d||{});Object.defineProperties(b,{name:{value:c},lastModified:{value:+(d&&void 0!==d.lastModified?new Date(d.lastModified):new Date)},toString:{value:function(){return"[object File]"}}});W&&Object.defineProperty(b,W,{value:"File"});return b}}var escape=function(a){return a.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")},X=function(a){this.i=[];var b=this;a&&M(a.elements,function(c){if(c.name&&!c.disabled&&"submit"!==c.type&&"button"!==c.type&&!c.matches("form fieldset[disabled] *"))if("file"===c.type){var d=c.files&&c.files.length?c.files:[new File([],"",{type:"application/octet-stream"})];M(d,function(e){b.append(c.name,e)})}else"select-multiple"===c.type||"select-one"===c.type?M(c.options,function(e){!e.disabled&&e.selected&&b.append(c.name,e.value)}):"checkbox"===c.type||"radio"===c.type?c.checked&&b.append(c.name,c.value):(d="textarea"===c.type?N(c.value):c.value,b.append(c.name,d))})};h=X.prototype;h.append=function(a,b,c){P(arguments,2);this.i.push(O(a,b,c))};h.delete=function(a){P(arguments,1);var b=[];a=String(a);M(this.i,function(c){c[0]!==a&&b.push(c)});this.i=b};h.entries=function b(){var c,d=this;return K(b,function(e){1==e.h&&(c=0);if(3!=e.h)return c<d.i.length?e=E(e,d.i[c]):(e.h=0,e=void 0),e;c++;e.h=2})};h.forEach=function(b,c){P(arguments,1);for(var d=v(this),e=d.next();!e.done;e=d.next()){var f=v(e.value);e=f.next().value;f=f.next().value;b.call(c,f,e,this)}};h.get=function(b){P(arguments,1);var c=this.i;b=String(b);for(var d=0;d<c.length;d++)if(c[d][0]===b)return c[d][1];return null};h.getAll=function(b){P(arguments,1);var c=[];b=String(b);M(this.i,function(d){d[0]===b&&c.push(d[1])});return c};h.has=function(b){P(arguments,1);b=String(b);for(var c=0;c<this.i.length;c++)if(this.i[c][0]===b)return!0;return!1};h.keys=function c(){var d=this,e,f,g,k,p;return K(c,function(t){1==t.h&&(e=v(d),f=e.next());if(3!=t.h){if(f.done){t.h=0;return}g=f.value;k=v(g);p=k.next().value;return E(t,p)}f=e.next();t.h=2})};h.set=function(c,d,e){P(arguments,2);c=String(c);var f=[],g=O(c,d,e),k=!0;M(this.i,function(p){p[0]===c?k&&(k=!f.push(g)):f.push(p)});k&&f.push(g);this.i=f};h.values=function d(){var e=this,f,g,k,p,t;return K(d,function(x){1==x.h&&(f=v(e),g=f.next());if(3!=x.h){if(g.done){x.h=0;return}k=g.value;p=v(k);p.next();t=p.next().value;return E(x,t)}g=f.next();x.h=2})};X.prototype._asNative=function(){for(var d=new R,e=v(this),f=e.next();!f.done;f=e.next()){var g=v(f.value);f=g.next().value;g=g.next().value;d.append(f,g)}return d};X.prototype._blob=function(){var d="----formdata-polyfill-"+Math.random(),e=[],f="--"+d+'\r\nContent-Disposition: form-data; name="';this.forEach(function(g,k){return"string"==typeof g?e.push(f+escape(N(k))+('"\r\n\r\n'+N(g)+"\r\n")):e.push(f+escape(N(k))+('"; filename="'+escape(g.name)+'"\r\nContent-Type: '+(g.type||"application/octet-stream")+"\r\n\r\n"),g,"\r\n")});e.push("--"+d+"--");return new Blob(e,{type:"multipart/form-data; boundary="+d})};X.prototype[Symbol.iterator]=function(){return this.entries()};X.prototype.toString=function(){return"[object FormData]"};V&&!V.matches&&(V.matches=V.matchesSelector||V.mozMatchesSelector||V.msMatchesSelector||V.oMatchesSelector||V.webkitMatchesSelector||function(d){d=(this.document||this.ownerDocument).querySelectorAll(d);for(var e=d.length;0<=--e&&d.item(e)!==this;);return-1<e});W&&(X.prototype[W]="FormData");if(S){var Y=Q.XMLHttpRequest.prototype.setRequestHeader;Q.XMLHttpRequest.prototype.setRequestHeader=function(d,e){Y.call(this,d,e);"content-type"===d.toLowerCase()&&(this.B=!0)};Q.XMLHttpRequest.prototype.send=function(d){d instanceof X?(d=d._blob(),this.B||this.setRequestHeader("Content-Type",d.type),S.call(this,d)):S.call(this,d)}}T&&(Q.fetch=function(d,e){e&&e.body&&e.body instanceof X&&(e.body=e.body._blob());return T.call(this,d,e)});U&&(Q.navigator.sendBeacon=function(d,e){e instanceof X&&(e=e._asNative());return U.call(this,d,e)});Q.FormData=X}})();var FEC_PLACE_WALL=1;var FEC_PLACE_CEILING=3;var FEC_CORRECT_NULL=0;var FEC_CORRECT_PTZ$1=256;var FEC_CORRECT_360$1=768;var FEC_CORRECT_CYLINDER$1=1536;var FEC_CORRECT_ARCSPHERE_HORIZONTAL=2304;var FEC_PLACE_CEILING_CORRECT_TYPE_LIST=[{place:FEC_PLACE_CEILING,name:"鱼眼不矫正",type:0,correctType:FEC_CORRECT_NULL},{place:FEC_PLACE_CEILING,name:"360°全景",type:1,correctType:FEC_CORRECT_360$1},{place:FEC_PLACE_CEILING,name:"4分屏",type:4,correctList:[{correctType:FEC_CORRECT_PTZ$1,x:.25,y:.25},{correctType:FEC_CORRECT_PTZ$1,x:.75,y:.25},{correctType:FEC_CORRECT_PTZ$1,x:.25,y:.75},{correctType:FEC_CORRECT_PTZ$1,x:.75,y:.75}],correctType:FEC_CORRECT_PTZ$1},{place:FEC_PLACE_CEILING,name:"柱状",type:5,correctType:FEC_CORRECT_CYLINDER$1,viewParam:{x:0,y:0}}];var FEC_PLACE_WALL_CORRECT_TYPE_LIST=[{place:FEC_PLACE_WALL,name:"鱼眼不矫正",type:0,correctType:FEC_CORRECT_NULL},{place:FEC_PLACE_WALL,name:"360°全景",type:1,correctType:FEC_CORRECT_360$1},{place:FEC_PLACE_WALL,name:"4分屏",type:2,correctList:[{correctType:FEC_CORRECT_PTZ$1,x:.25,y:.25},{correctType:FEC_CORRECT_PTZ$1,x:.75,y:.25},{correctType:FEC_CORRECT_PTZ$1,x:.25,y:.75},{correctType:FEC_CORRECT_PTZ$1,x:.75,y:.75}],correctType:FEC_CORRECT_PTZ$1},{place:FEC_PLACE_WALL,name:"广角",type:4,correctType:FEC_CORRECT_ARCSPHERE_HORIZONTAL}];var jsPluginV11_0_0_min={exports:{}};(function(module,exports){(function e(t,n){module.exports=n()})(window,function(){return function(n){var i={};function r(e){if(i[e]){return i[e].exports}var t=i[e]={i:e,l:false,exports:{}};n[e].call(t.exports,t,t.exports,r);t.l=true;return t.exports}r.m=n;r.c=i;r.d=function(e,t,n){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:n})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(t,e){if(e&1)t=r(t);if(e&8)return t;if(e&4&&_typeof(t)==="object"&&t&&t.__esModule)return t;var n=Object.create(null);r.r(n);Object.defineProperty(n,"default",{enumerable:true,value:t});if(e&2&&typeof t!="string")for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n};r.n=function(t){var e=t&&t.__esModule?function e(){return t["default"]}:function e(){return t};r.d(e,"a",e);return e};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=3)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});var i=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();function r(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var a=function(){function e(){r(this,e);this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}i(e,[{key:"$",value:function e(t){var n=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;var i=/^(?:\s*(<[\w\W]+>)[^>]*|.([\w-]*))$/;if(n.test(t)){var r=n.exec(t);return document.getElementById(r[2])}else if(i.test(t)){var a=i.exec(t);var o=document.getElementsByTagName("*");var s=[];for(var l=0,u=o.length;l<u;l++){if(o[l].className.match(new RegExp("(\\s|^)"+a[2]+"(\\s|$)"))){s.push(o[l])}}return s}}},{key:"dateFormat",value:function e(t,n){var i={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};if(/(y+)/.test(n)){n=n.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length))}for(var r in i){if(new RegExp("("+r+")").test(n)){n=n.replace(RegExp.$1,RegExp.$1.length===1?i[r]:("00"+i[r]).substr((""+i[r]).length))}}return n}},{key:"downloadFile",value:function e(t,n){var i=t;if(!(t instanceof Blob||t instanceof File)){i=new Blob([t])}var r=window.URL.createObjectURL(i);var a=window.document.createElement("a");a.href=r;a.download=n;var o=document.createEvent("MouseEvents");o.initEvent("click",true,true);a.dispatchEvent(o)}},{key:"createxmlDoc",value:function e(){var t;var n=["MSXML2.DOMDocument","MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","Microsoft.XmlDom"];for(var i=0,r=n.length;i<r;i++){try{t=new ActiveXObject(n[i]);break}catch(e){t=document.implementation.createDocument("","",null);break}}t.async="false";return t}},{key:"parseXmlFromStr",value:function e(t){if(null===t||""===t){return null}var n=this.createxmlDoc();if(navigator.appName==="Netscape"||navigator.appName==="Opera"){var i=new DOMParser;n=i.parseFromString(t,"text/xml")}else{n.loadXML(t)}return n}},{key:"encode",value:function e(t){var n="";var i;var r;var a;var o;var s;var l;var u;var f=0;t=this._utf8_encode(t);while(f<t.length){i=t.charCodeAt(f++);r=t.charCodeAt(f++);a=t.charCodeAt(f++);o=i>>2;s=(i&3)<<4|r>>4;l=(r&15)<<2|a>>6;u=a&63;if(isNaN(r)){l=u=64}else if(isNaN(a)){u=64}n=n+this._keyStr.charAt(o)+this._keyStr.charAt(s)+this._keyStr.charAt(l)+this._keyStr.charAt(u)}return n}},{key:"decode",value:function e(t){var n="";var i;var r;var a;var o;var s;var l;var u;var f=0;t=t.replace(/[^A-Za-z0-9+/=]/g,"");while(f<t.length){o=this._keyStr.indexOf(t.charAt(f++));s=this._keyStr.indexOf(t.charAt(f++));l=this._keyStr.indexOf(t.charAt(f++));u=this._keyStr.indexOf(t.charAt(f++));i=o<<2|s>>4;r=(s&15)<<4|l>>2;a=(l&3)<<6|u;n=n+String.fromCharCode(i);if(l!==64){n=n+String.fromCharCode(r)}if(u!==64){n=n+String.fromCharCode(a)}}n=this._utf8_decode(n);return n}},{key:"_utf8_encode",value:function e(t){t=t.replace(/\r\n/g,"\n");var n="";for(var i=0;i<t.length;i++){var r=t.charCodeAt(i);if(r<128){n+=String.fromCharCode(r)}else if(r>127&&r<2048){n+=String.fromCharCode(r>>6|192);n+=String.fromCharCode(r&63|128)}else{n+=String.fromCharCode(r>>12|224);n+=String.fromCharCode(r>>6&63|128);n+=String.fromCharCode(r&63|128)}}return n}},{key:"_utf8_decode",value:function e(t){var n="";var i=0;var r=0;var a=0;while(i<t.length){r=t.charCodeAt(i);if(r<128){n+=String.fromCharCode(r);i++}else if(r>191&&r<224){a=t.charCodeAt(i+1);n+=String.fromCharCode((r&31)<<6|a&63);i+=2}else{a=t.charCodeAt(i+1);var o=t.charCodeAt(i+2);n+=String.fromCharCode((r&15)<<12|(a&63)<<6|o&63);i+=3}}return n}},{key:"isFirefox",value:function e(){var t=false;var n=navigator.userAgent.toLowerCase();var i="";var r=-1;if(n.match(/firefox\/([\d.]+)/)){i=n.match(/firefox\/([\d.]+)/)[1];r=parseInt(i.split(".")[0],10);if(r>-1){t=true}}return t}},{key:"isSafari",value:function e(){var t=false;var n=navigator.userAgent.toLowerCase();var i="";var r=-1;if(n.match(/version\/([\d.]+).safari./)){i=n.match(/version\/([\d.]+).safari./)[1];r=parseInt(i.split(".")[0],10);if(r>-1){t=true}}return t}},{key:"isEdge",value:function e(){return navigator.userAgent.toLowerCase().indexOf("edge")>-1}},{key:"isIOS",value:function e(){var t=navigator.userAgent;var n=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return n}}]);return e}();t.oTool=new a},function(fn,cn,e){var dn,hn;(function(e,t){if(_typeof(fn.exports)==="object"){fn.exports=e.document?t(e,true):function(e){if(!e.document){throw new Error("jQuery requires a window with a document")}return t(e)}}else{t(e)}})(typeof window!=="undefined"?window:this,function(se,e){var le=[];var o=Object.getPrototypeOf;var ue=le.slice;var I=le.flat?function(e){return le.flat.call(e)}:function(e){return le.concat.apply([],e)};var s=le.push;var fe=le.indexOf;var n={};var R=n.toString;var ce=n.hasOwnProperty;var z=ce.toString;var E=z.call(Object);var de={};var v=function e(t){return typeof t==="function"&&typeof t.nodeType!=="number"&&typeof t.item!=="function"};var m=function e(t){return t!=null&&t===t.window};var _=se.document;var A={type:true,src:true,nonce:true,noModule:true};function B(e,t,n){n=n||_;var i,r,a=n.createElement("script");a.text=e;if(t){for(i in A){r=t[i]||t.getAttribute&&t.getAttribute(i);if(r){a.setAttribute(i,r)}}}n.head.appendChild(a).parentNode.removeChild(a)}function y(e){if(e==null){return e+""}return _typeof(e)==="object"||typeof e==="function"?n[R.call(e)]||"object":_typeof(e)}var t="3.7.1",F=/HTML$/i,he=function he(e,t){return new he.fn.init(e,t)};he.fn=he.prototype={jquery:t,constructor:he,length:0,toArray:function toArray(){return ue.call(this)},get:function get(e){if(e==null){return ue.call(this)}return e<0?this[e+this.length]:this[e]},pushStack:function pushStack(e){var t=he.merge(this.constructor(),e);t.prevObject=this;return t},each:function each(e){return he.each(this,e)},map:function map(n){return this.pushStack(he.map(this,function(e,t){return n.call(e,t,e)}))},slice:function slice(){return this.pushStack(ue.apply(this,arguments))},first:function first(){return this.eq(0)},last:function last(){return this.eq(-1)},even:function even(){return this.pushStack(he.grep(this,function(e,t){return(t+1)%2}))},odd:function odd(){return this.pushStack(he.grep(this,function(e,t){return t%2}))},eq:function eq(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function end(){return this.prevObject||this.constructor()},push:s,sort:le.sort,splice:le.splice};he.extend=he.fn.extend=function(){var e,t,n,i,r,a,o=arguments[0]||{},s=1,l=arguments.length,u=false;if(typeof o==="boolean"){u=o;o=arguments[s]||{};s++}if(_typeof(o)!=="object"&&!v(o)){o={}}if(s===l){o=this;s--}for(;s<l;s++){if((e=arguments[s])!=null){for(t in e){i=e[t];if(t==="__proto__"||o===i){continue}if(u&&i&&(he.isPlainObject(i)||(r=Array.isArray(i)))){n=o[t];if(r&&!Array.isArray(n)){a=[]}else if(!r&&!he.isPlainObject(n)){a={}}else{a=n}r=false;o[t]=he.extend(u,a,i)}else if(i!==undefined){o[t]=i}}}}return o};he.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:true,error:function error(e){throw new Error(e)},noop:function noop(){},isPlainObject:function isPlainObject(e){var t,n;if(!e||R.call(e)!=="[object Object]"){return false}t=o(e);if(!t){return true}n=ce.call(t,"constructor")&&t.constructor;return typeof n==="function"&&z.call(n)===E},isEmptyObject:function isEmptyObject(e){var t;for(t in e){return false}return true},globalEval:function globalEval(e,t,n){B(e,{nonce:t&&t.nonce},n)},each:function each(e,t){var n,i=0;if(O(e)){n=e.length;for(;i<n;i++){if(t.call(e[i],i,e[i])===false){break}}}else{for(i in e){if(t.call(e[i],i,e[i])===false){break}}}return e},text:function text(e){var t,n="",i=0,r=e.nodeType;if(!r){while(t=e[i++]){n+=he.text(t)}}if(r===1||r===11){return e.textContent}if(r===9){return e.documentElement.textContent}if(r===3||r===4){return e.nodeValue}return n},makeArray:function makeArray(e,t){var n=t||[];if(e!=null){if(O(Object(e))){he.merge(n,typeof e==="string"?[e]:e)}else{s.call(n,e)}}return n},inArray:function inArray(e,t,n){return t==null?-1:fe.call(t,e,n)},isXMLDoc:function isXMLDoc(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!F.test(t||n&&n.nodeName||"HTML")},merge:function merge(e,t){var n=+t.length,i=0,r=e.length;for(;i<n;i++){e[r++]=t[i]}e.length=r;return e},grep:function grep(e,t,n){var i,r=[],a=0,o=e.length,s=!n;for(;a<o;a++){i=!t(e[a],a);if(i!==s){r.push(e[a])}}return r},map:function map(e,t,n){var i,r,a=0,o=[];if(O(e)){i=e.length;for(;a<i;a++){r=t(e[a],a,n);if(r!=null){o.push(r)}}}else{for(a in e){r=t(e[a],a,n);if(r!=null){o.push(r)}}}return I(o)},guid:1,support:de});if(typeof Symbol==="function"){he.fn[Symbol.iterator]=le[Symbol.iterator]}he.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});function O(e){var t=!!e&&"length"in e&&e.length,n=y(e);if(v(e)||m(e)){return false}return n==="array"||t===0||typeof t==="number"&&t>0&&t-1 in e}function pe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var ge=le.pop;var Se=le.sort;var be=le.splice;var ve="[\\x20\\t\\r\\n\\f]";var me=new RegExp("^"+ve+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ve+"+$","g");he.contains=function(e,t){var n=t&&t.parentNode;return e===n||!!(n&&n.nodeType===1&&(e.contains?e.contains(n):e.compareDocumentPosition&&e.compareDocumentPosition(n)&16))};var L=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function U(e,t){if(t){if(e==="\0"){return"�"}return e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" "}return"\\"+e}he.escapeSelector=function(e){return(e+"").replace(L,U)};var ye=_,Pe=s;(function(){var e,b,P,a,o,w=Pe,_,i,C,h,r,S=he.expando,D=0,F=0,n=l(),O=l(),L=l(),p=l(),s=function s(e,t){if(e===t){o=true}return 0},U="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|"+"loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ve+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",N="\\["+ve+"*("+t+")(?:"+ve+"*([*^$|!~]?=)"+ve+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ve+"*\\]",H=":("+t+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|"+".*"+")\\)|)",W=new RegExp(ve+"+","g"),q=new RegExp("^"+ve+"*,"+ve+"*"),Y=new RegExp("^"+ve+"*([>+~]|"+ve+")"+ve+"*"),V=new RegExp(ve+"|>"),j=new RegExp(H),J=new RegExp("^"+t+"$"),c={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ve+"*(even|odd|(([+-]|)(\\d*)n|)"+ve+"*(?:([+-]|)"+ve+"*(\\d+)|))"+ve+"*\\)|)","i"),bool:new RegExp("^(?:"+U+")$","i"),needsContext:new RegExp("^"+ve+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ve+"*((?:-\\d)?\\d*)"+ve+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,v=/[+~]/,d=new RegExp("\\\\[\\da-fA-F]{1,6}"+ve+"?|\\\\([^\\r\\n\\f])","g"),m=function m(e,t){var n="0x"+e.slice(1)-65536;if(t){return t}return n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)},$=function $(){M()},Z=I(function(e){return e.disabled===true&&pe(e,"fieldset")},{dir:"parentNode",next:"legend"});function Q(){try{return _.activeElement}catch(e){}}try{w.apply(le=ue.call(ye.childNodes),ye.childNodes);le[ye.childNodes.length].nodeType}catch(e){w={apply:function apply(e,t){Pe.apply(e,ue.call(t))},call:function call(e){Pe.apply(e,ue.call(arguments,1))}}}function y(t,e,n,i){var r,a,o,s,l,u,f,c=e&&e.ownerDocument,d=e?e.nodeType:9;n=n||[];if(typeof t!=="string"||!t||d!==1&&d!==9&&d!==11){return n}if(!i){M(e);e=e||_;if(C){if(d!==11&&(l=K.exec(t))){if(r=l[1]){if(d===9){if(o=e.getElementById(r)){if(o.id===r){w.call(n,o);return n}}else{return n}}else{if(c&&(o=c.getElementById(r))&&y.contains(e,o)&&o.id===r){w.call(n,o);return n}}}else if(l[2]){w.apply(n,e.getElementsByTagName(t));return n}else if((r=l[3])&&e.getElementsByClassName){w.apply(n,e.getElementsByClassName(r));return n}}if(!p[t+" "]&&(!h||!h.test(t))){f=t;c=e;if(d===1&&(V.test(t)||Y.test(t))){c=v.test(t)&&T(e.parentNode)||e;if(c!=e||!de.scope){if(s=e.getAttribute("id")){s=he.escapeSelector(s)}else{e.setAttribute("id",s=S)}}u=k(t);a=u.length;while(a--){u[a]=(s?"#"+s:":scope")+" "+x(u[a])}f=u.join(",")}try{w.apply(n,c.querySelectorAll(f));return n}catch(e){p(t,true)}finally{if(s===S){e.removeAttribute("id")}}}}}return oe(t.replace(me,"$1"),e,n,i)}function l(){var n=[];function i(e,t){if(n.push(e+" ")>b.cacheLength){delete i[n.shift()]}return i[e+" "]=t}return i}function u(e){e[S]=true;return e}function f(e){var t=_.createElement("fieldset");try{return!!e(t)}catch(e){return false}finally{if(t.parentNode){t.parentNode.removeChild(t)}t=null}}function ee(t){return function(e){return pe(e,"input")&&e.type===t}}function te(t){return function(e){return(pe(e,"input")||pe(e,"button"))&&e.type===t}}function ne(t){return function(e){if("form"in e){if(e.parentNode&&e.disabled===false){if("label"in e){if("label"in e.parentNode){return e.parentNode.disabled===t}else{return e.disabled===t}}return e.isDisabled===t||e.isDisabled!==!t&&Z(e)===t}return e.disabled===t}else if("label"in e){return e.disabled===t}return false}}function g(o){return u(function(a){a=+a;return u(function(e,t){var n,i=o([],e.length,a),r=i.length;while(r--){if(e[n=i[r]]){e[n]=!(t[n]=e[n])}}})})}function T(e){return e&&typeof e.getElementsByTagName!=="undefined"&&e}function M(e){var t,n=e?e.ownerDocument||e:ye;if(n==_||n.nodeType!==9||!n.documentElement){return _}_=n;i=_.documentElement;C=!he.isXMLDoc(_);r=i.matches||i.webkitMatchesSelector||i.msMatchesSelector;if(i.msMatchesSelector&&ye!=_&&(t=_.defaultView)&&t.top!==t){t.addEventListener("unload",$)}de.getById=f(function(e){i.appendChild(e).id=he.expando;return!_.getElementsByName||!_.getElementsByName(he.expando).length});de.disconnectedMatch=f(function(e){return r.call(e,"*")});de.scope=f(function(){return _.querySelectorAll(":scope")});de.cssHas=f(function(){try{_.querySelector(":has(*,:jqfake)");return false}catch(e){return true}});if(de.getById){b.filter.ID=function(e){var t=e.replace(d,m);return function(e){return e.getAttribute("id")===t}};b.find.ID=function(e,t){if(typeof t.getElementById!=="undefined"&&C){var n=t.getElementById(e);return n?[n]:[]}}}else{b.filter.ID=function(e){var n=e.replace(d,m);return function(e){var t=typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id");return t&&t.value===n}};b.find.ID=function(e,t){if(typeof t.getElementById!=="undefined"&&C){var n,i,r,a=t.getElementById(e);if(a){n=a.getAttributeNode("id");if(n&&n.value===e){return[a]}r=t.getElementsByName(e);i=0;while(a=r[i++]){n=a.getAttributeNode("id");if(n&&n.value===e){return[a]}}}return[]}}}b.find.TAG=function(e,t){if(typeof t.getElementsByTagName!=="undefined"){return t.getElementsByTagName(e)}else{return t.querySelectorAll(e)}};b.find.CLASS=function(e,t){if(typeof t.getElementsByClassName!=="undefined"&&C){return t.getElementsByClassName(e)}};h=[];f(function(e){var t;i.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a>"+"<select id='"+S+"-\r\\' disabled='disabled'>"+"<option selected=''></option></select>";if(!e.querySelectorAll("[selected]").length){h.push("\\["+ve+"*(?:value|"+U+")")}if(!e.querySelectorAll("[id~="+S+"-]").length){h.push("~=")}if(!e.querySelectorAll("a#"+S+"+*").length){h.push(".#.+[+~]")}if(!e.querySelectorAll(":checked").length){h.push(":checked")}t=_.createElement("input");t.setAttribute("type","hidden");e.appendChild(t).setAttribute("name","D");i.appendChild(e).disabled=true;if(e.querySelectorAll(":disabled").length!==2){h.push(":enabled",":disabled")}t=_.createElement("input");t.setAttribute("name","");e.appendChild(t);if(!e.querySelectorAll("[name='']").length){h.push("\\["+ve+"*name"+ve+"*="+ve+"*(?:''|\"\")")}});if(!de.cssHas){h.push(":has")}h=h.length&&new RegExp(h.join("|"));s=function s(e,t){if(e===t){o=true;return 0}var n=!e.compareDocumentPosition-!t.compareDocumentPosition;if(n){return n}n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1;if(n&1||!de.sortDetached&&t.compareDocumentPosition(e)===n){if(e===_||e.ownerDocument==ye&&y.contains(ye,e)){return-1}if(t===_||t.ownerDocument==ye&&y.contains(ye,t)){return 1}return a?fe.call(a,e)-fe.call(a,t):0}return n&4?-1:1};return _}y.matches=function(e,t){return y(e,null,null,t)};y.matchesSelector=function(e,t){M(e);if(C&&!p[t+" "]&&(!h||!h.test(t))){try{var n=r.call(e,t);if(n||de.disconnectedMatch||e.document&&e.document.nodeType!==11){return n}}catch(e){p(t,true)}}return y(t,_,null,[e]).length>0};y.contains=function(e,t){if((e.ownerDocument||e)!=_){M(e)}return he.contains(e,t)};y.attr=function(e,t){if((e.ownerDocument||e)!=_){M(e)}var n=b.attrHandle[t.toLowerCase()],i=n&&ce.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):undefined;if(i!==undefined){return i}return e.getAttribute(t)};y.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};he.uniqueSort=function(e){var t,n=[],i=0,r=0;o=!de.sortStable;a=!de.sortStable&&ue.call(e,0);Se.call(e,s);if(o){while(t=e[r++]){if(t===e[r]){i=n.push(r)}}while(i--){be.call(e,n[i],1)}}a=null;return e};he.fn.uniqueSort=function(){return this.pushStack(he.uniqueSort(ue.apply(this)))};b=he.expr={cacheLength:50,createPseudo:u,match:c,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function ATTR(e){e[1]=e[1].replace(d,m);e[3]=(e[3]||e[4]||e[5]||"").replace(d,m);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function CHILD(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){y.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+(e[7]+e[8]||e[3]==="odd")}else if(e[3]){y.error(e[0])}return e},PSEUDO:function PSEUDO(e){var t,n=!e[6]&&e[2];if(c.CHILD.test(e[0])){return null}if(e[3]){e[2]=e[4]||e[5]||""}else if(n&&j.test(n)&&(t=k(n,true))&&(t=n.indexOf(")",n.length-t)-n.length)){e[0]=e[0].slice(0,t);e[2]=n.slice(0,t)}return e.slice(0,3)}},filter:{TAG:function TAG(e){var t=e.replace(d,m).toLowerCase();return e==="*"?function(){return true}:function(e){return pe(e,t)}},CLASS:function CLASS(e){var t=n[e+" "];return t||(t=new RegExp("(^|"+ve+")"+e+"("+ve+"|$)"))&&n(e,function(e){return t.test(typeof e.className==="string"&&e.className||typeof e.getAttribute!=="undefined"&&e.getAttribute("class")||"")})},ATTR:function ATTR(n,i,r){return function(e){var t=y.attr(e,n);if(t==null){return i==="!="}if(!i){return true}t+="";if(i==="="){return t===r}if(i==="!="){return t!==r}if(i==="^="){return r&&t.indexOf(r)===0}if(i==="*="){return r&&t.indexOf(r)>-1}if(i==="$="){return r&&t.slice(-r.length)===r}if(i==="~="){return(" "+t.replace(W," ")+" ").indexOf(r)>-1}if(i==="|="){return t===r||t.slice(0,r.length+1)===r+"-"}return false}},CHILD:function CHILD(h,e,t,p,v){var m=h.slice(0,3)!=="nth",y=h.slice(-4)!=="last",g=e==="of-type";return p===1&&v===0?function(e){return!!e.parentNode}:function(e,t,n){var i,r,a,o,s,l=m!==y?"nextSibling":"previousSibling",u=e.parentNode,f=g&&e.nodeName.toLowerCase(),c=!n&&!g,d=false;if(u){if(m){while(l){a=e;while(a=a[l]){if(g?pe(a,f):a.nodeType===1){return false}}s=l=h==="only"&&!s&&"nextSibling"}return true}s=[y?u.firstChild:u.lastChild];if(y&&c){r=u[S]||(u[S]={});i=r[h]||[];o=i[0]===D&&i[1];d=o&&i[2];a=o&&u.childNodes[o];while(a=++o&&a&&a[l]||(d=o=0)||s.pop()){if(a.nodeType===1&&++d&&a===e){r[h]=[D,o,d];break}}}else{if(c){r=e[S]||(e[S]={});i=r[h]||[];o=i[0]===D&&i[1];d=o}if(d===false){while(a=++o&&a&&a[l]||(d=o=0)||s.pop()){if((g?pe(a,f):a.nodeType===1)&&++d){if(c){r=a[S]||(a[S]={});r[h]=[D,d]}if(a===e){break}}}}}d-=v;return d===p||d%p===0&&d/p>=0}}},PSEUDO:function PSEUDO(e,a){var t,o=b.pseudos[e]||b.setFilters[e.toLowerCase()]||y.error("unsupported pseudo: "+e);if(o[S]){return o(a)}if(o.length>1){t=[e,e,"",a];return b.setFilters.hasOwnProperty(e.toLowerCase())?u(function(e,t){var n,i=o(e,a),r=i.length;while(r--){n=fe.call(e,i[r]);e[n]=!(t[n]=i[r])}}):function(e){return o(e,0,t)}}return o}},pseudos:{not:u(function(e){var i=[],r=[],s=B(e.replace(me,"$1"));return s[S]?u(function(e,t,n,i){var r,a=s(e,null,i,[]),o=e.length;while(o--){if(r=a[o]){e[o]=!(t[o]=r)}}}):function(e,t,n){i[0]=e;s(i,null,n,r);i[0]=null;return!r.pop()}}),has:u(function(t){return function(e){return y(t,e).length>0}}),contains:u(function(t){t=t.replace(d,m);return function(e){return(e.textContent||he.text(e)).indexOf(t)>-1}}),lang:u(function(n){if(!J.test(n||"")){y.error("unsupported lang: "+n)}n=n.replace(d,m).toLowerCase();return function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang")){t=t.toLowerCase();return t===n||t.indexOf(n+"-")===0}}while((e=e.parentNode)&&e.nodeType===1);return false}}),target:function target(e){var t=se.location&&se.location.hash;return t&&t.slice(1)===e.id},root:function root(e){return e===i},focus:function focus(e){return e===Q()&&_.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:ne(false),disabled:ne(true),checked:function checked(e){return pe(e,"input")&&!!e.checked||pe(e,"option")&&!!e.selected},selected:function selected(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},empty:function empty(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeType<6){return false}}return true},parent:function parent(e){return!b.pseudos.empty(e)},header:function header(e){return X.test(e.nodeName)},input:function input(e){return G.test(e.nodeName)},button:function button(e){return pe(e,"input")&&e.type==="button"||pe(e,"button")},text:function text(e){var t;return pe(e,"input")&&e.type==="text"&&((t=e.getAttribute("type"))==null||t.toLowerCase()==="text")},first:g(function(){return[0]}),last:g(function(e,t){return[t-1]}),eq:g(function(e,t,n){return[n<0?n+t:n]}),even:g(function(e,t){var n=0;for(;n<t;n+=2){e.push(n)}return e}),odd:g(function(e,t){var n=1;for(;n<t;n+=2){e.push(n)}return e}),lt:g(function(e,t,n){var i;if(n<0){i=n+t}else if(n>t){i=t}else{i=n}for(;--i>=0;){e.push(i)}return e}),gt:g(function(e,t,n){var i=n<0?n+t:n;for(;++i<t;){e.push(i)}return e})}};b.pseudos.nth=b.pseudos.eq;for(e in{radio:true,checkbox:true,file:true,password:true,image:true}){b.pseudos[e]=ee(e)}for(e in{submit:true,reset:true}){b.pseudos[e]=te(e)}function ie(){}ie.prototype=b.filters=b.pseudos;b.setFilters=new ie;function k(e,t){var n,i,r,a,o,s,l,u=O[e+" "];if(u){return t?0:u.slice(0)}o=e;s=[];l=b.preFilter;while(o){if(!n||(i=q.exec(o))){if(i){o=o.slice(i[0].length)||o}s.push(r=[])}n=false;if(i=Y.exec(o)){n=i.shift();r.push({value:n,type:i[0].replace(me," ")});o=o.slice(n.length)}for(a in b.filter){if((i=c[a].exec(o))&&(!l[a]||(i=l[a](i)))){n=i.shift();r.push({value:n,type:a,matches:i});o=o.slice(n.length)}}if(!n){break}}if(t){return o.length}return o?y.error(e):O(e,s).slice(0)}function x(e){var t=0,n=e.length,i="";for(;t<n;t++){i+=e[t].value}return i}function I(o,e,t){var s=e.dir,l=e.next,u=l||s,f=t&&u==="parentNode",c=F++;return e.first?function(e,t,n){while(e=e[s]){if(e.nodeType===1||f){return o(e,t,n)}}return false}:function(e,t,n){var i,r,a=[D,c];if(n){while(e=e[s]){if(e.nodeType===1||f){if(o(e,t,n)){return true}}}}else{while(e=e[s]){if(e.nodeType===1||f){r=e[S]||(e[S]={});if(l&&pe(e,l)){e=e[s]||e}else if((i=r[u])&&i[0]===D&&i[1]===c){return a[2]=i[2]}else{r[u]=a;if(a[2]=o(e,t,n)){return true}}}}}return false}}function R(r){return r.length>1?function(e,t,n){var i=r.length;while(i--){if(!r[i](e,t,n)){return false}}return true}:r[0]}function re(e,t,n){var i=0,r=t.length;for(;i<r;i++){y(e,t[i],n)}return n}function z(e,t,n,i,r){var a,o=[],s=0,l=e.length,u=t!=null;for(;s<l;s++){if(a=e[s]){if(!n||n(a,i,r)){o.push(a);if(u){t.push(s)}}}}return o}function E(h,p,v,m,y,e){if(m&&!m[S]){m=E(m)}if(y&&!y[S]){y=E(y,e)}return u(function(e,t,n,i){var r,a,o,s,l=[],u=[],f=t.length,c=e||re(p||"*",n.nodeType?[n]:n,[]),d=h&&(e||!p)?z(c,l,h,n,i):c;if(v){s=y||(e?h:f||m)?[]:t;v(d,s,n,i)}else{s=d}if(m){r=z(s,u);m(r,[],n,i);a=r.length;while(a--){if(o=r[a]){s[u[a]]=!(d[u[a]]=o)}}}if(e){if(y||h){if(y){r=[];a=s.length;while(a--){if(o=s[a]){r.push(d[a]=o)}}y(null,s=[],r,i)}a=s.length;while(a--){if((o=s[a])&&(r=y?fe.call(e,o):l[a])>-1){e[r]=!(t[r]=o)}}}}else{s=z(s===t?s.splice(f,s.length):s);if(y){y(null,t,s,i)}else{w.apply(t,s)}}})}function A(e){var r,t,n,i=e.length,a=b.relative[e[0].type],o=a||b.relative[" "],s=a?1:0,l=I(function(e){return e===r},o,true),u=I(function(e){return fe.call(r,e)>-1},o,true),f=[function(e,t,n){var i=!a&&(n||t!=P)||((r=t).nodeType?l(e,t,n):u(e,t,n));r=null;return i}];for(;s<i;s++){if(t=b.relative[e[s].type]){f=[I(R(f),t)]}else{t=b.filter[e[s].type].apply(null,e[s].matches);if(t[S]){n=++s;for(;n<i;n++){if(b.relative[e[n].type]){break}}return E(s>1&&R(f),s>1&&x(e.slice(0,s-1).concat({value:e[s-2].type===" "?"*":""})).replace(me,"$1"),t,s<n&&A(e.slice(s,n)),n<i&&A(e=e.slice(n)),n<i&&x(e))}f.push(t)}}return R(f)}function ae(m,y){var g=y.length>0,S=m.length>0,e=function e(_e2,t,n,i,r){var a,o,s,l=0,u="0",f=_e2&&[],c=[],d=P,h=_e2||S&&b.find.TAG("*",r),p=D+=d==null?1:Math.random()||.1,v=h.length;if(r){P=t==_||t||r}for(;u!==v&&(a=h[u])!=null;u++){if(S&&a){o=0;if(!t&&a.ownerDocument!=_){M(a);n=!C}while(s=m[o++]){if(s(a,t||_,n)){w.call(i,a);break}}if(r){D=p}}if(g){if(a=!s&&a){l--}if(_e2){f.push(a)}}}l+=u;if(g&&u!==l){o=0;while(s=y[o++]){s(f,c,t,n)}if(_e2){if(l>0){while(u--){if(!(f[u]||c[u])){c[u]=ge.call(i)}}}c=z(c)}w.apply(i,c);if(r&&!_e2&&c.length>0&&l+y.length>1){he.uniqueSort(i)}}if(r){D=p;P=d}return f};return g?u(e):e}function B(e,t){var n,i=[],r=[],a=L[e+" "];if(!a){if(!t){t=k(e)}n=t.length;while(n--){a=A(t[n]);if(a[S]){i.push(a)}else{r.push(a)}}a=L(e,ae(r,i));a.selector=e}return a}function oe(e,t,n,i){var r,a,o,s,l,u=typeof e==="function"&&e,f=!i&&k(e=u.selector||e);n=n||[];if(f.length===1){a=f[0]=f[0].slice(0);if(a.length>2&&(o=a[0]).type==="ID"&&t.nodeType===9&&C&&b.relative[a[1].type]){t=(b.find.ID(o.matches[0].replace(d,m),t)||[])[0];if(!t){return n}else if(u){t=t.parentNode}e=e.slice(a.shift().value.length)}r=c.needsContext.test(e)?0:a.length;while(r--){o=a[r];if(b.relative[s=o.type]){break}if(l=b.find[s]){if(i=l(o.matches[0].replace(d,m),v.test(a[0].type)&&T(t.parentNode)||t)){a.splice(r,1);e=i.length&&x(a);if(!e){w.apply(n,i);return n}break}}}}(u||B(e,f))(i,t,!C,n,!t||v.test(e)&&T(t.parentNode)||t);return n}de.sortStable=S.split("").sort(s).join("")===S;M();de.sortDetached=f(function(e){return e.compareDocumentPosition(_.createElement("fieldset"))&1});he.find=y;he.expr[":"]=he.expr.pseudos;he.unique=he.uniqueSort;y.compile=B;y.select=oe;y.setDocument=M;y.tokenize=k;y.escape=he.escapeSelector;y.getText=he.text;y.isXML=he.isXMLDoc;y.selectors=he.expr;y.support=he.support;y.uniqueSort=he.uniqueSort})();var i=function i(e,t,n){var i=[],r=n!==undefined;while((e=e[t])&&e.nodeType!==9){if(e.nodeType===1){if(r&&he(e).is(n)){break}i.push(e)}}return i};var N=function N(e,t){var n=[];for(;e;e=e.nextSibling){if(e.nodeType===1&&e!==t){n.push(e)}}return n};var H=he.expr.match.needsContext;var W=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function q(e,n,i){if(v(n)){return he.grep(e,function(e,t){return!!n.call(e,t,e)!==i})}if(n.nodeType){return he.grep(e,function(e){return e===n!==i})}if(typeof n!=="string"){return he.grep(e,function(e){return fe.call(n,e)>-1!==i})}return he.filter(n,e,i)}he.filter=function(e,t,n){var i=t[0];if(n){e=":not("+e+")"}if(t.length===1&&i.nodeType===1){return he.find.matchesSelector(i,e)?[i]:[]}return he.find.matches(e,he.grep(t,function(e){return e.nodeType===1}))};he.fn.extend({find:function find(e){var t,n,i=this.length,r=this;if(typeof e!=="string"){return this.pushStack(he(e).filter(function(){for(t=0;t<i;t++){if(he.contains(r[t],this)){return true}}}))}n=this.pushStack([]);for(t=0;t<i;t++){he.find(e,r[t],n)}return i>1?he.uniqueSort(n):n},filter:function filter(e){return this.pushStack(q(this,e||[],false))},not:function not(e){return this.pushStack(q(this,e||[],true))},is:function is(e){return!!q(this,typeof e==="string"&&H.test(e)?he(e):e||[],false).length}});var Y,V=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,j=he.fn.init=function(e,t,n){var i,r;if(!e){return this}n=n||Y;if(typeof e==="string"){if(e[0]==="<"&&e[e.length-1]===">"&&e.length>=3){i=[null,e,null]}else{i=V.exec(e)}if(i&&(i[1]||!t)){if(i[1]){t=t instanceof he?t[0]:t;he.merge(this,he.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:_,true));if(W.test(i[1])&&he.isPlainObject(t)){for(i in t){if(v(this[i])){this[i](t[i])}else{this.attr(i,t[i])}}}return this}else{r=_.getElementById(i[2]);if(r){this[0]=r;this.length=1}return this}}else if(!t||t.jquery){return(t||n).find(e)}else{return this.constructor(t).find(e)}}else if(e.nodeType){this[0]=e;this.length=1;return this}else if(v(e)){return n.ready!==undefined?n.ready(e):e(he)}return he.makeArray(e,this)};j.prototype=he.fn;Y=he(_);var J=/^(?:parents|prev(?:Until|All))/,G={children:true,contents:true,next:true,prev:true};he.fn.extend({has:function has(e){var t=he(e,this),n=t.length;return this.filter(function(){var e=0;for(;e<n;e++){if(he.contains(this,t[e])){return true}}})},closest:function closest(e,t){var n,i=0,r=this.length,a=[],o=typeof e!=="string"&&he(e);if(!H.test(e)){for(;i<r;i++){for(n=this[i];n&&n!==t;n=n.parentNode){if(n.nodeType<11&&(o?o.index(n)>-1:n.nodeType===1&&he.find.matchesSelector(n,e))){a.push(n);break}}}}return this.pushStack(a.length>1?he.uniqueSort(a):a)},index:function index(e){if(!e){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof e==="string"){return fe.call(he(e),this[0])}return fe.call(this,e.jquery?e[0]:e)},add:function add(e,t){return this.pushStack(he.uniqueSort(he.merge(this.get(),he(e,t))))},addBack:function addBack(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});function X(e,t){while((e=e[t])&&e.nodeType!==1){}return e}he.each({parent:function parent(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function parents(e){return i(e,"parentNode")},parentsUntil:function parentsUntil(e,t,n){return i(e,"parentNode",n)},next:function next(e){return X(e,"nextSibling")},prev:function prev(e){return X(e,"previousSibling")},nextAll:function nextAll(e){return i(e,"nextSibling")},prevAll:function prevAll(e){return i(e,"previousSibling")},nextUntil:function nextUntil(e,t,n){return i(e,"nextSibling",n)},prevUntil:function prevUntil(e,t,n){return i(e,"previousSibling",n)},siblings:function siblings(e){return N((e.parentNode||{}).firstChild,e)},children:function children(e){return N(e.firstChild)},contents:function contents(e){if(e.contentDocument!=null&&o(e.contentDocument)){return e.contentDocument}if(pe(e,"template")){e=e.content||e}return he.merge([],e.childNodes)}},function(i,r){he.fn[i]=function(e,t){var n=he.map(this,r,e);if(i.slice(-5)!=="Until"){t=e}if(t&&typeof t==="string"){n=he.filter(t,n)}if(this.length>1){if(!G[i]){he.uniqueSort(n)}if(J.test(i)){n.reverse()}}return this.pushStack(n)}});var C=/[^\x20\t\r\n\f]+/g;function K(e){var n={};he.each(e.match(C)||[],function(e,t){n[t]=true});return n}he.Callbacks=function(i){i=typeof i==="string"?K(i):he.extend({},i);var n,e,t,r,a=[],o=[],s=-1,l=function l(){r=r||i.once;t=n=true;for(;o.length;s=-1){e=o.shift();while(++s<a.length){if(a[s].apply(e[0],e[1])===false&&i.stopOnFalse){s=a.length;e=false}}}if(!i.memory){e=false}n=false;if(r){if(e){a=[]}else{a=""}}},u={add:function add(){if(a){if(e&&!n){s=a.length-1;o.push(e)}(function n(e){he.each(e,function(e,t){if(v(t)){if(!i.unique||!u.has(t)){a.push(t)}}else if(t&&t.length&&y(t)!=="string"){n(t)}})})(arguments);if(e&&!n){l()}}return this},remove:function remove(){he.each(arguments,function(e,t){var n;while((n=he.inArray(t,a,n))>-1){a.splice(n,1);if(n<=s){s--}}});return this},has:function has(e){return e?he.inArray(e,a)>-1:a.length>0},empty:function empty(){if(a){a=[]}return this},disable:function disable(){r=o=[];a=e="";return this},disabled:function disabled(){return!a},lock:function lock(){r=o=[];if(!e&&!n){a=e=""}return this},locked:function locked(){return!!r},fireWith:function fireWith(e,t){if(!r){t=t||[];t=[e,t.slice?t.slice():t];o.push(t);if(!n){l()}}return this},fire:function fire(){u.fireWith(this,arguments);return this},fired:function fired(){return!!t}};return u};function f(e){return e}function $(e){throw e}function Z(e,t,n,i){var r;try{if(e&&v(r=e.promise)){r.call(e).done(t).fail(n)}else if(e&&v(r=e.then)){r.call(e,t,n)}else{t.apply(undefined,[e].slice(i))}}catch(e){n.apply(undefined,[e])}}he.extend({Deferred:function Deferred(e){var a=[["notify","progress",he.Callbacks("memory"),he.Callbacks("memory"),2],["resolve","done",he.Callbacks("once memory"),he.Callbacks("once memory"),0,"resolved"],["reject","fail",he.Callbacks("once memory"),he.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function state(){return r},always:function always(){s.done(arguments).fail(arguments);return this},catch:function _catch(e){return o.then(null,e)},pipe:function pipe(){var r=arguments;return he.Deferred(function(i){he.each(a,function(e,t){var n=v(r[t[4]])&&r[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);if(e&&v(e.promise)){e.promise().progress(i.notify).done(i.resolve).fail(i.reject)}else{i[t[0]+"With"](this,n?[e]:arguments)}})});r=null}).promise()},then:function then(t,n,i){var l=0;function u(r,a,o,s){return function(){var n=this,i=arguments,e=function e(){var e,t;if(r<l){return}e=o.apply(n,i);if(e===a.promise()){throw new TypeError("Thenable self-resolution")}t=e&&(_typeof(e)==="object"||typeof e==="function")&&e.then;if(v(t)){if(s){t.call(e,u(l,a,f,s),u(l,a,$,s))}else{l++;t.call(e,u(l,a,f,s),u(l,a,$,s),u(l,a,f,a.notifyWith))}}else{if(o!==f){n=undefined;i=[e]}(s||a.resolveWith)(n,i)}},t=s?e:function(){try{e()}catch(e){if(he.Deferred.exceptionHook){he.Deferred.exceptionHook(e,t.error)}if(r+1>=l){if(o!==$){n=undefined;i=[e]}a.rejectWith(n,i)}}};if(r){t()}else{if(he.Deferred.getErrorHook){t.error=he.Deferred.getErrorHook()}else if(he.Deferred.getStackHook){t.error=he.Deferred.getStackHook()}se.setTimeout(t)}}}return he.Deferred(function(e){a[0][3].add(u(0,e,v(i)?i:f,e.notifyWith));a[1][3].add(u(0,e,v(t)?t:f));a[2][3].add(u(0,e,v(n)?n:$))}).promise()},promise:function promise(e){return e!=null?he.extend(e,o):o}},s={};he.each(a,function(e,t){var n=t[2],i=t[5];o[t[1]]=n.add;if(i){n.add(function(){r=i},a[3-e][2].disable,a[3-e][3].disable,a[0][2].lock,a[0][3].lock)}n.add(t[3].fire);s[t[0]]=function(){s[t[0]+"With"](this===s?undefined:this,arguments);return this};s[t[0]+"With"]=n.fireWith});o.promise(s);if(e){e.call(s,s)}return s},when:function when(e){var n=arguments.length,t=n,i=Array(t),r=ue.call(arguments),a=he.Deferred(),o=function o(t){return function(e){i[t]=this;r[t]=arguments.length>1?ue.call(arguments):e;if(!--n){a.resolveWith(i,r)}}};if(n<=1){Z(e,a.done(o(t)).resolve,a.reject,!n);if(a.state()==="pending"||v(r[t]&&r[t].then)){return a.then()}}while(t--){Z(r[t],o(t),a.reject)}return a.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;he.Deferred.exceptionHook=function(e,t){if(se.console&&se.console.warn&&e&&Q.test(e.name)){se.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)}};he.readyException=function(e){se.setTimeout(function(){throw e})};var ee=he.Deferred();he.fn.ready=function(e){ee.then(e)["catch"](function(e){he.readyException(e)});return this};he.extend({isReady:false,readyWait:1,ready:function ready(e){if(e===true?--he.readyWait:he.isReady){return}he.isReady=true;if(e!==true&&--he.readyWait>0){return}ee.resolveWith(_,[he])}});he.ready.then=ee.then;function te(){_.removeEventListener("DOMContentLoaded",te);se.removeEventListener("load",te);he.ready()}if(_.readyState==="complete"||_.readyState!=="loading"&&!_.documentElement.doScroll){se.setTimeout(he.ready)}else{_.addEventListener("DOMContentLoaded",te);se.addEventListener("load",te)}var c=function c(e,t,n,i,r,a,o){var s=0,l=e.length,u=n==null;if(y(n)==="object"){r=true;for(s in n){c(e,t,s,n[s],true,a,o)}}else if(i!==undefined){r=true;if(!v(i)){o=true}if(u){if(o){t.call(e,i);t=null}else{u=t;t=function t(e,_t2,n){return u.call(he(e),n)}}}if(t){for(;s<l;s++){t(e[s],n,o?i:i.call(e[s],s,t(e[s],n)))}}}if(r){return e}if(u){return t.call(e)}return l?t(e[0],n):a};var ne=/^-ms-/,ie=/-([a-z])/g;function re(e,t){return t.toUpperCase()}function d(e){return e.replace(ne,"ms-").replace(ie,re)}var ae=function ae(e){return e.nodeType===1||e.nodeType===9||!+e.nodeType};function oe(){this.expando=he.expando+oe.uid++}oe.uid=1;oe.prototype={cache:function cache(e){var t=e[this.expando];if(!t){t={};if(ae(e)){if(e.nodeType){e[this.expando]=t}else{Object.defineProperty(e,this.expando,{value:t,configurable:true})}}}return t},set:function set(e,t,n){var i,r=this.cache(e);if(typeof t==="string"){r[d(t)]=n}else{for(i in t){r[d(i)]=t[i]}}return r},get:function get(e,t){return t===undefined?this.cache(e):e[this.expando]&&e[this.expando][d(t)]},access:function access(e,t,n){if(t===undefined||t&&typeof t==="string"&&n===undefined){return this.get(e,t)}this.set(e,t,n);return n!==undefined?n:t},remove:function remove(e,t){var n,i=e[this.expando];if(i===undefined){return}if(t!==undefined){if(Array.isArray(t)){t=t.map(d)}else{t=d(t);t=t in i?[t]:t.match(C)||[]}n=t.length;while(n--){delete i[t[n]]}}if(t===undefined||he.isEmptyObject(i)){if(e.nodeType){e[this.expando]=undefined}else{delete e[this.expando]}}},hasData:function hasData(e){var t=e[this.expando];return t!==undefined&&!he.isEmptyObject(t)}};var g=new oe;var u=new oe;var we=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/[A-Z]/g;function Ce(e){if(e==="true"){return true}if(e==="false"){return false}if(e==="null"){return null}if(e===+e+""){return+e}if(we.test(e)){return JSON.parse(e)}return e}function De(e,t,n){var i;if(n===undefined&&e.nodeType===1){i="data-"+t.replace(_e,"-$&").toLowerCase();n=e.getAttribute(i);if(typeof n==="string"){try{n=Ce(n)}catch(e){}u.set(e,t,n)}else{n=undefined}}return n}he.extend({hasData:function hasData(e){return u.hasData(e)||g.hasData(e)},data:function data(e,t,n){return u.access(e,t,n)},removeData:function removeData(e,t){u.remove(e,t)},_data:function _data(e,t,n){return g.access(e,t,n)},_removeData:function _removeData(e,t){g.remove(e,t)}});he.fn.extend({data:function data(n,e){var t,i,r,a=this[0],o=a&&a.attributes;if(n===undefined){if(this.length){r=u.get(a);if(a.nodeType===1&&!g.get(a,"hasDataAttrs")){t=o.length;while(t--){if(o[t]){i=o[t].name;if(i.indexOf("data-")===0){i=d(i.slice(5));De(a,i,r[i])}}}g.set(a,"hasDataAttrs",true)}}return r}if(_typeof(n)==="object"){return this.each(function(){u.set(this,n)})}return c(this,function(e){var t;if(a&&e===undefined){t=u.get(a,n);if(t!==undefined){return t}t=De(a,n);if(t!==undefined){return t}return}this.each(function(){u.set(this,n,e)})},null,e,arguments.length>1,null,true)},removeData:function removeData(e){return this.each(function(){u.remove(this,e)})}});he.extend({queue:function queue(e,t,n){var i;if(e){t=(t||"fx")+"queue";i=g.get(e,t);if(n){if(!i||Array.isArray(n)){i=g.access(e,t,he.makeArray(n))}else{i.push(n)}}return i||[]}},dequeue:function dequeue(e,t){t=t||"fx";var n=he.queue(e,t),i=n.length,r=n.shift(),a=he._queueHooks(e,t),o=function o(){he.dequeue(e,t)};if(r==="inprogress"){r=n.shift();i--}if(r){if(t==="fx"){n.unshift("inprogress")}delete a.stop;r.call(e,o,a)}if(!i&&a){a.empty.fire()}},_queueHooks:function _queueHooks(e,t){var n=t+"queueHooks";return g.get(e,n)||g.access(e,n,{empty:he.Callbacks("once memory").add(function(){g.remove(e,[t+"queue",n])})})}});he.fn.extend({queue:function queue(t,n){var e=2;if(typeof t!=="string"){n=t;t="fx";e--}if(arguments.length<e){return he.queue(this[0],t)}return n===undefined?this:this.each(function(){var e=he.queue(this,t,n);he._queueHooks(this,t);if(t==="fx"&&e[0]!=="inprogress"){he.dequeue(this,t)}})},dequeue:function dequeue(e){return this.each(function(){he.dequeue(this,e)})},clearQueue:function clearQueue(e){return this.queue(e||"fx",[])},promise:function promise(e,t){var n,i=1,r=he.Deferred(),a=this,o=this.length,s=function s(){if(!--i){r.resolveWith(a,[a])}};if(typeof e!=="string"){t=e;e=undefined}e=e||"fx";while(o--){n=g.get(a[o],e+"queueHooks");if(n&&n.empty){i++;n.empty.add(s)}}s();return r.promise(t)}});var Te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;var Me=new RegExp("^(?:([+-])=|)("+Te+")([a-z%]*)$","i");var h=["Top","Right","Bottom","Left"];var S=_.documentElement;var b=function b(e){return he.contains(e.ownerDocument,e)},ke={composed:true};if(S.getRootNode){b=function b(e){return he.contains(e.ownerDocument,e)||e.getRootNode(ke)===e.ownerDocument}}var xe=function xe(e,t){e=t||e;return e.style.display==="none"||e.style.display===""&&b(e)&&he.css(e,"display")==="none"};function Ie(e,t,n,i){var r,a,o=20,s=i?function(){return i.cur()}:function(){return he.css(e,t,"")},l=s(),u=n&&n[3]||(he.cssNumber[t]?"":"px"),f=e.nodeType&&(he.cssNumber[t]||u!=="px"&&+l)&&Me.exec(he.css(e,t));if(f&&f[3]!==u){l=l/2;u=u||f[3];f=+l||1;while(o--){he.style(e,t,f+u);if((1-a)*(1-(a=s()/l||.5))<=0){o=0}f=f/a}f=f*2;he.style(e,t,f+u);n=n||[]}if(n){f=+f||+l||0;r=n[1]?f+(n[1]+1)*n[2]:+n[2];if(i){i.unit=u;i.start=f;i.end=r}}return r}var Re={};function ze(e){var t,n=e.ownerDocument,i=e.nodeName,r=Re[i];if(r){return r}t=n.body.appendChild(n.createElement(i));r=he.css(t,"display");t.parentNode.removeChild(t);if(r==="none"){r="block"}Re[i]=r;return r}function P(e,t){var n,i,r=[],a=0,o=e.length;for(;a<o;a++){i=e[a];if(!i.style){continue}n=i.style.display;if(t){if(n==="none"){r[a]=g.get(i,"display")||null;if(!r[a]){i.style.display=""}}if(i.style.display===""&&xe(i)){r[a]=ze(i)}}else{if(n!=="none"){r[a]="none";g.set(i,"display",n)}}}for(a=0;a<o;a++){if(r[a]!=null){e[a].style.display=r[a]}}return e}he.fn.extend({show:function show(){return P(this,true)},hide:function hide(){return P(this)},toggle:function toggle(e){if(typeof e==="boolean"){return e?this.show():this.hide()}return this.each(function(){if(xe(this)){he(this).show()}else{he(this).hide()}})}});var Ee=/^(?:checkbox|radio)$/i;var Ae=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var Be=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=_.createDocumentFragment(),t=e.appendChild(_.createElement("div")),n=_.createElement("input");n.setAttribute("type","radio");n.setAttribute("checked","checked");n.setAttribute("name","t");t.appendChild(n);de.checkClone=t.cloneNode(true).cloneNode(true).lastChild.checked;t.innerHTML="<textarea>x</textarea>";de.noCloneChecked=!!t.cloneNode(true).lastChild.defaultValue;t.innerHTML="<option></option>";de.option=!!t.lastChild})();var w={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};w.tbody=w.tfoot=w.colgroup=w.caption=w.thead;w.th=w.td;if(!de.option){w.optgroup=w.option=[1,"<select multiple='multiple'>","</select>"]}function D(e,t){var n;if(typeof e.getElementsByTagName!=="undefined"){n=e.getElementsByTagName(t||"*")}else if(typeof e.querySelectorAll!=="undefined"){n=e.querySelectorAll(t||"*")}else{n=[]}if(t===undefined||t&&pe(e,t)){return he.merge([e],n)}return n}function Fe(e,t){var n=0,i=e.length;for(;n<i;n++){g.set(e[n],"globalEval",!t||g.get(t[n],"globalEval"))}}var Oe=/<|&#?\w+;/;function Le(e,t,n,i,r){var a,o,s,l,u,f,c=t.createDocumentFragment(),d=[],h=0,p=e.length;for(;h<p;h++){a=e[h];if(a||a===0){if(y(a)==="object"){he.merge(d,a.nodeType?[a]:a)}else if(!Oe.test(a)){d.push(t.createTextNode(a))}else{o=o||c.appendChild(t.createElement("div"));s=(Ae.exec(a)||["",""])[1].toLowerCase();l=w[s]||w._default;o.innerHTML=l[1]+he.htmlPrefilter(a)+l[2];f=l[0];while(f--){o=o.lastChild}he.merge(d,o.childNodes);o=c.firstChild;o.textContent=""}}}c.textContent="";h=0;while(a=d[h++]){if(i&&he.inArray(a,i)>-1){if(r){r.push(a)}continue}u=b(a);o=D(c.appendChild(a),"script");if(u){Fe(o)}if(n){f=0;while(a=o[f++]){if(Be.test(a.type||"")){n.push(a)}}}}return c}var Ue=/^([^.]*)(?:\.(.+)|)/;function r(){return true}function l(){return false}function Ne(e,t,n,i,r,a){var o,s;if(_typeof(t)==="object"){if(typeof n!=="string"){i=i||n;n=undefined}for(s in t){Ne(e,s,n,i,t[s],a)}return e}if(i==null&&r==null){r=n;i=n=undefined}else if(r==null){if(typeof n==="string"){r=i;i=undefined}else{r=i;i=n;n=undefined}}if(r===false){r=l}else if(!r){return e}if(a===1){o=r;r=function r(e){he().off(e);return o.apply(this,arguments)};r.guid=o.guid||(o.guid=he.guid++)}return e.each(function(){he.event.add(this,t,r,i,n)})}he.event={global:{},add:function add(t,e,n,i,r){var a,o,s,l,u,f,c,d,h,p,v,m=g.get(t);if(!ae(t)){return}if(n.handler){a=n;n=a.handler;r=a.selector}if(r){he.find.matchesSelector(S,r)}if(!n.guid){n.guid=he.guid++}if(!(l=m.events)){l=m.events=Object.create(null)}if(!(o=m.handle)){o=m.handle=function(e){return typeof he!=="undefined"&&he.event.triggered!==e.type?he.event.dispatch.apply(t,arguments):undefined}}e=(e||"").match(C)||[""];u=e.length;while(u--){s=Ue.exec(e[u])||[];h=v=s[1];p=(s[2]||"").split(".").sort();if(!h){continue}c=he.event.special[h]||{};h=(r?c.delegateType:c.bindType)||h;c=he.event.special[h]||{};f=he.extend({type:h,origType:v,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&he.expr.match.needsContext.test(r),namespace:p.join(".")},a);if(!(d=l[h])){d=l[h]=[];d.delegateCount=0;if(!c.setup||c.setup.call(t,i,p,o)===false){if(t.addEventListener){t.addEventListener(h,o)}}}if(c.add){c.add.call(t,f);if(!f.handler.guid){f.handler.guid=n.guid}}if(r){d.splice(d.delegateCount++,0,f)}else{d.push(f)}he.event.global[h]=true}},remove:function remove(e,t,n,i,r){var a,o,s,l,u,f,c,d,h,p,v,m=g.hasData(e)&&g.get(e);if(!m||!(l=m.events)){return}t=(t||"").match(C)||[""];u=t.length;while(u--){s=Ue.exec(t[u])||[];h=v=s[1];p=(s[2]||"").split(".").sort();if(!h){for(h in l){he.event.remove(e,h+t[u],n,i,true)}continue}c=he.event.special[h]||{};h=(i?c.delegateType:c.bindType)||h;d=l[h]||[];s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)");o=a=d.length;while(a--){f=d[a];if((r||v===f.origType)&&(!n||n.guid===f.guid)&&(!s||s.test(f.namespace))&&(!i||i===f.selector||i==="**"&&f.selector)){d.splice(a,1);if(f.selector){d.delegateCount--}if(c.remove){c.remove.call(e,f)}}}if(o&&!d.length){if(!c.teardown||c.teardown.call(e,p,m.handle)===false){he.removeEvent(e,h,m.handle)}delete l[h]}}if(he.isEmptyObject(l)){g.remove(e,"handle events")}},dispatch:function dispatch(e){var t,n,i,r,a,o,s=new Array(arguments.length),l=he.event.fix(e),u=(g.get(this,"events")||Object.create(null))[l.type]||[],f=he.event.special[l.type]||{};s[0]=l;for(t=1;t<arguments.length;t++){s[t]=arguments[t]}l.delegateTarget=this;if(f.preDispatch&&f.preDispatch.call(this,l)===false){return}o=he.event.handlers.call(this,l,u);t=0;while((r=o[t++])&&!l.isPropagationStopped()){l.currentTarget=r.elem;n=0;while((a=r.handlers[n++])&&!l.isImmediatePropagationStopped()){if(!l.rnamespace||a.namespace===false||l.rnamespace.test(a.namespace)){l.handleObj=a;l.data=a.data;i=((he.event.special[a.origType]||{}).handle||a.handler).apply(r.elem,s);if(i!==undefined){if((l.result=i)===false){l.preventDefault();l.stopPropagation()}}}}}if(f.postDispatch){f.postDispatch.call(this,l)}return l.result},handlers:function handlers(e,t){var n,i,r,a,o,s=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!(e.type==="click"&&e.button>=1)){for(;u!==this;u=u.parentNode||this){if(u.nodeType===1&&!(e.type==="click"&&u.disabled===true)){a=[];o={};for(n=0;n<l;n++){i=t[n];r=i.selector+" ";if(o[r]===undefined){o[r]=i.needsContext?he(r,this).index(u)>-1:he.find(r,this,null,[u]).length}if(o[r]){a.push(i)}}if(a.length){s.push({elem:u,handlers:a})}}}}u=this;if(l<t.length){s.push({elem:u,handlers:t.slice(l)})}return s},addProp:function addProp(t,e){Object.defineProperty(he.Event.prototype,t,{enumerable:true,configurable:true,get:v(e)?function(){if(this.originalEvent){return e(this.originalEvent)}}:function(){if(this.originalEvent){return this.originalEvent[t]}},set:function set(e){Object.defineProperty(this,t,{enumerable:true,configurable:true,writable:true,value:e})}})},fix:function fix(e){return e[he.expando]?e:new he.Event(e)},special:{load:{noBubble:true},click:{setup:function setup(e){var t=this||e;if(Ee.test(t.type)&&t.click&&pe(t,"input")){He(t,"click",true)}return false},trigger:function trigger(e){var t=this||e;if(Ee.test(t.type)&&t.click&&pe(t,"input")){He(t,"click")}return true},_default:function _default(e){var t=e.target;return Ee.test(t.type)&&t.click&&pe(t,"input")&&g.get(t,"click")||pe(t,"a")}},beforeunload:{postDispatch:function postDispatch(e){if(e.result!==undefined&&e.originalEvent){e.originalEvent.returnValue=e.result}}}}};function He(e,i,t){if(!t){if(g.get(e,i)===undefined){he.event.add(e,i,r)}return}g.set(e,i,false);he.event.add(e,i,{namespace:false,handler:function handler(e){var t,n=g.get(this,i);if(e.isTrigger&1&&this[i]){if(!n){n=ue.call(arguments);g.set(this,i,n);this[i]();t=g.get(this,i);g.set(this,i,false);if(n!==t){e.stopImmediatePropagation();e.preventDefault();return t}}else if((he.event.special[i]||{}).delegateType){e.stopPropagation()}}else if(n){g.set(this,i,he.event.trigger(n[0],n.slice(1),this));e.stopPropagation();e.isImmediatePropagationStopped=r}}})}he.removeEvent=function(e,t,n){if(e.removeEventListener){e.removeEventListener(t,n)}};he.Event=function(e,t){if(!(this instanceof he.Event)){return new he.Event(e,t)}if(e&&e.type){this.originalEvent=e;this.type=e.type;this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===undefined&&e.returnValue===false?r:l;this.target=e.target&&e.target.nodeType===3?e.target.parentNode:e.target;this.currentTarget=e.currentTarget;this.relatedTarget=e.relatedTarget}else{this.type=e}if(t){he.extend(this,t)}this.timeStamp=e&&e.timeStamp||Date.now();this[he.expando]=true};he.Event.prototype={constructor:he.Event,isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,isSimulated:false,preventDefault:function preventDefault(){var e=this.originalEvent;this.isDefaultPrevented=r;if(e&&!this.isSimulated){e.preventDefault()}},stopPropagation:function stopPropagation(){var e=this.originalEvent;this.isPropagationStopped=r;if(e&&!this.isSimulated){e.stopPropagation()}},stopImmediatePropagation:function stopImmediatePropagation(){var e=this.originalEvent;this.isImmediatePropagationStopped=r;if(e&&!this.isSimulated){e.stopImmediatePropagation()}this.stopPropagation()}};he.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,char:true,code:true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:true},he.event.addProp);he.each({focus:"focusin",blur:"focusout"},function(i,r){function a(e){if(_.documentMode){var t=g.get(this,"handle"),n=he.event.fix(e);n.type=e.type==="focusin"?"focus":"blur";n.isSimulated=true;t(e);if(n.target===n.currentTarget){t(n)}}else{he.event.simulate(r,e.target,he.event.fix(e))}}he.event.special[i]={setup:function setup(){var e;He(this,i,true);if(_.documentMode){e=g.get(this,r);if(!e){this.addEventListener(r,a)}g.set(this,r,(e||0)+1)}else{return false}},trigger:function trigger(){He(this,i);return true},teardown:function teardown(){var e;if(_.documentMode){e=g.get(this,r)-1;if(!e){this.removeEventListener(r,a);g.remove(this,r)}else{g.set(this,r,e)}}else{return false}},_default:function _default(e){return g.get(e.target,i)},delegateType:r};he.event.special[r]={setup:function setup(){var e=this.ownerDocument||this.document||this,t=_.documentMode?this:e,n=g.get(t,r);if(!n){if(_.documentMode){this.addEventListener(r,a)}else{e.addEventListener(i,a,true)}}g.set(t,r,(n||0)+1)},teardown:function teardown(){var e=this.ownerDocument||this.document||this,t=_.documentMode?this:e,n=g.get(t,r)-1;if(!n){if(_.documentMode){this.removeEventListener(r,a)}else{e.removeEventListener(i,a,true)}g.remove(t,r)}else{g.set(t,r,n)}}}});he.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,a){he.event.special[e]={delegateType:a,bindType:a,handle:function handle(e){var t,n=this,i=e.relatedTarget,r=e.handleObj;if(!i||i!==n&&!he.contains(n,i)){e.type=r.origType;t=r.handler.apply(this,arguments);e.type=a}return t}}});he.fn.extend({on:function on(e,t,n,i){return Ne(this,e,t,n,i)},one:function one(e,t,n,i){return Ne(this,e,t,n,i,1)},off:function off(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj){i=e.handleObj;he(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler);return this}if(_typeof(e)==="object"){for(r in e){this.off(r,t,e[r])}return this}if(t===false||typeof t==="function"){n=t;t=undefined}if(n===false){n=l}return this.each(function(){he.event.remove(this,e,n,t)})}});var We=/<script|<style|<link/i,qe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ye=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ve(e,t){if(pe(e,"table")&&pe(t.nodeType!==11?t:t.firstChild,"tr")){return he(e).children("tbody")[0]||e}return e}function je(e){e.type=(e.getAttribute("type")!==null)+"/"+e.type;return e}function Je(e){if((e.type||"").slice(0,5)==="true/"){e.type=e.type.slice(5)}else{e.removeAttribute("type")}return e}function Ge(e,t){var n,i,r,a,o,s,l;if(t.nodeType!==1){return}if(g.hasData(e)){a=g.get(e);l=a.events;if(l){g.remove(t,"handle events");for(r in l){for(n=0,i=l[r].length;n<i;n++){he.event.add(t,r,l[r][n])}}}}if(u.hasData(e)){o=u.access(e);s=he.extend({},o);u.set(t,s)}}function Xe(e,t){var n=t.nodeName.toLowerCase();if(n==="input"&&Ee.test(e.type)){t.checked=e.checked}else if(n==="input"||n==="textarea"){t.defaultValue=e.defaultValue}}function T(n,i,r,a){i=I(i);var e,t,o,s,l,u,f=0,c=n.length,d=c-1,h=i[0],p=v(h);if(p||c>1&&typeof h==="string"&&!de.checkClone&&qe.test(h)){return n.each(function(e){var t=n.eq(e);if(p){i[0]=h.call(this,e,t.html())}T(t,i,r,a)})}if(c){e=Le(i,n[0].ownerDocument,false,n,a);t=e.firstChild;if(e.childNodes.length===1){e=t}if(t||a){o=he.map(D(e,"script"),je);s=o.length;for(;f<c;f++){l=e;if(f!==d){l=he.clone(l,true,true);if(s){he.merge(o,D(l,"script"))}}r.call(n[f],l,f)}if(s){u=o[o.length-1].ownerDocument;he.map(o,Je);for(f=0;f<s;f++){l=o[f];if(Be.test(l.type||"")&&!g.access(l,"globalEval")&&he.contains(u,l)){if(l.src&&(l.type||"").toLowerCase()!=="module"){if(he._evalUrl&&!l.noModule){he._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},u)}}else{B(l.textContent.replace(Ye,""),l,u)}}}}}}return n}function Ke(e,t,n){var i,r=t?he.filter(t,e):e,a=0;for(;(i=r[a])!=null;a++){if(!n&&i.nodeType===1){he.cleanData(D(i))}if(i.parentNode){if(n&&b(i)){Fe(D(i,"script"))}i.parentNode.removeChild(i)}}return e}he.extend({htmlPrefilter:function htmlPrefilter(e){return e},clone:function clone(e,t,n){var i,r,a,o,s=e.cloneNode(true),l=b(e);if(!de.noCloneChecked&&(e.nodeType===1||e.nodeType===11)&&!he.isXMLDoc(e)){o=D(s);a=D(e);for(i=0,r=a.length;i<r;i++){Xe(a[i],o[i])}}if(t){if(n){a=a||D(e);o=o||D(s);for(i=0,r=a.length;i<r;i++){Ge(a[i],o[i])}}else{Ge(e,s)}}o=D(s,"script");if(o.length>0){Fe(o,!l&&D(e,"script"))}return s},cleanData:function cleanData(e){var t,n,i,r=he.event.special,a=0;for(;(n=e[a])!==undefined;a++){if(ae(n)){if(t=n[g.expando]){if(t.events){for(i in t.events){if(r[i]){he.event.remove(n,i)}else{he.removeEvent(n,i,t.handle)}}}n[g.expando]=undefined}if(n[u.expando]){n[u.expando]=undefined}}}}});he.fn.extend({detach:function detach(e){return Ke(this,e,true)},remove:function remove(e){return Ke(this,e)},text:function text(e){return c(this,function(e){return e===undefined?he.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=e}})},null,e,arguments.length)},append:function append(){return T(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Ve(this,e);t.appendChild(e)}})},prepend:function prepend(){return T(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=Ve(this,e);t.insertBefore(e,t.firstChild)}})},before:function before(){return T(this,arguments,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this)}})},after:function after(){return T(this,arguments,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this.nextSibling)}})},empty:function empty(){var e,t=0;for(;(e=this[t])!=null;t++){if(e.nodeType===1){he.cleanData(D(e,false));e.textContent=""}}return this},clone:function clone(e,t){e=e==null?false:e;t=t==null?e:t;return this.map(function(){return he.clone(this,e,t)})},html:function html(e){return c(this,function(e){var t=this[0]||{},n=0,i=this.length;if(e===undefined&&t.nodeType===1){return t.innerHTML}if(typeof e==="string"&&!We.test(e)&&!w[(Ae.exec(e)||["",""])[1].toLowerCase()]){e=he.htmlPrefilter(e);try{for(;n<i;n++){t=this[n]||{};if(t.nodeType===1){he.cleanData(D(t,false));t.innerHTML=e}}t=0}catch(e){}}if(t){this.empty().append(e)}},null,e,arguments.length)},replaceWith:function replaceWith(){var n=[];return T(this,arguments,function(e){var t=this.parentNode;if(he.inArray(this,n)<0){he.cleanData(D(this));if(t){t.replaceChild(e,this)}}},n)}});he.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,o){he.fn[e]=function(e){var t,n=[],i=he(e),r=i.length-1,a=0;for(;a<=r;a++){t=a===r?this:this.clone(true);he(i[a])[o](t);s.apply(n,t.get())}return this.pushStack(n)}});var $e=new RegExp("^("+Te+")(?!px)[a-z%]+$","i");var Ze=/^--/;var Qe=function Qe(e){var t=e.ownerDocument.defaultView;if(!t||!t.opener){t=se}return t.getComputedStyle(e)};var et=function et(e,t,n){var i,r,a={};for(r in t){a[r]=e.style[r];e.style[r]=t[r]}i=n.call(e);for(r in t){e.style[r]=a[r]}return i};var tt=new RegExp(h.join("|"),"i");(function(){function e(){if(!u){return}l.style.cssText="position:absolute;left:-11111px;width:60px;"+"margin-top:1px;padding:0;border:0";u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;"+"margin:auto;border:1px;padding:1px;"+"width:60%;top:1%";S.appendChild(l).appendChild(u);var e=se.getComputedStyle(u);n=e.top!=="1%";s=t(e.marginLeft)===12;u.style.right="60%";a=t(e.right)===36;i=t(e.width)===36;u.style.position="absolute";r=t(u.offsetWidth/3)===12;S.removeChild(l);u=null}function t(e){return Math.round(parseFloat(e))}var n,i,r,a,o,s,l=_.createElement("div"),u=_.createElement("div");if(!u.style){return}u.style.backgroundClip="content-box";u.cloneNode(true).style.backgroundClip="";de.clearCloneStyle=u.style.backgroundClip==="content-box";he.extend(de,{boxSizingReliable:function boxSizingReliable(){e();return i},pixelBoxStyles:function pixelBoxStyles(){e();return a},pixelPosition:function pixelPosition(){e();return n},reliableMarginLeft:function reliableMarginLeft(){e();return s},scrollboxSize:function scrollboxSize(){e();return r},reliableTrDimensions:function reliableTrDimensions(){var e,t,n,i;if(o==null){e=_.createElement("table");t=_.createElement("tr");n=_.createElement("div");e.style.cssText="position:absolute;left:-11111px;border-collapse:separate";t.style.cssText="box-sizing:content-box;border:1px solid";t.style.height="1px";n.style.height="9px";n.style.display="block";S.appendChild(e).appendChild(t).appendChild(n);i=se.getComputedStyle(t);o=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===t.offsetHeight;S.removeChild(e)}return o}})})();function nt(e,t,n){var i,r,a,o,s=Ze.test(t),l=e.style;n=n||Qe(e);if(n){o=n.getPropertyValue(t)||n[t];if(s&&o){o=o.replace(me,"$1")||undefined}if(o===""&&!b(e)){o=he.style(e,t)}if(!de.pixelBoxStyles()&&$e.test(o)&&tt.test(t)){i=l.width;r=l.minWidth;a=l.maxWidth;l.minWidth=l.maxWidth=l.width=o;o=n.width;l.width=i;l.minWidth=r;l.maxWidth=a}}return o!==undefined?o+"":o}function it(e,t){return{get:function get(){if(e()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}var rt=["Webkit","Moz","ms"],at=_.createElement("div").style,ot={};function st(e){var t=e[0].toUpperCase()+e.slice(1),n=rt.length;while(n--){e=rt[n]+t;if(e in at){return e}}}function lt(e){var t=he.cssProps[e]||ot[e];if(t){return t}if(e in at){return e}return ot[e]=st(e)||e}var ut=/^(none|table(?!-c[ea]).+)/,ft={position:"absolute",visibility:"hidden",display:"block"},ct={letterSpacing:"0",fontWeight:"400"};function dt(e,t,n){var i=Me.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function ht(e,t,n,i,r,a){var o=t==="width"?1:0,s=0,l=0,u=0;if(n===(i?"border":"content")){return 0}for(;o<4;o+=2){if(n==="margin"){u+=he.css(e,n+h[o],true,r)}if(!i){l+=he.css(e,"padding"+h[o],true,r);if(n!=="padding"){l+=he.css(e,"border"+h[o]+"Width",true,r)}else{s+=he.css(e,"border"+h[o]+"Width",true,r)}}else{if(n==="content"){l-=he.css(e,"padding"+h[o],true,r)}if(n!=="margin"){l-=he.css(e,"border"+h[o]+"Width",true,r)}}}if(!i&&a>=0){l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-l-s-.5))||0}return l+u}function pt(e,t,n){var i=Qe(e),r=!de.boxSizingReliable()||n,a=r&&he.css(e,"boxSizing",false,i)==="border-box",o=a,s=nt(e,t,i),l="offset"+t[0].toUpperCase()+t.slice(1);if($e.test(s)){if(!n){return s}s="auto"}if((!de.boxSizingReliable()&&a||!de.reliableTrDimensions()&&pe(e,"tr")||s==="auto"||!parseFloat(s)&&he.css(e,"display",false,i)==="inline")&&e.getClientRects().length){a=he.css(e,"boxSizing",false,i)==="border-box";o=l in e;if(o){s=e[l]}}s=parseFloat(s)||0;return s+ht(e,t,n||(a?"border":"content"),o,i,s)+"px"}he.extend({cssHooks:{opacity:{get:function get(e,t){if(t){var n=nt(e,"opacity");return n===""?"1":n}}}},cssNumber:{animationIterationCount:true,aspectRatio:true,borderImageSlice:true,columnCount:true,flexGrow:true,flexShrink:true,fontWeight:true,gridArea:true,gridColumn:true,gridColumnEnd:true,gridColumnStart:true,gridRow:true,gridRowEnd:true,gridRowStart:true,lineHeight:true,opacity:true,order:true,orphans:true,scale:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeMiterlimit:true,strokeOpacity:true},cssProps:{},style:function style(e,t,n,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style){return}var r,a,o,s=d(t),l=Ze.test(t),u=e.style;if(!l){t=lt(s)}o=he.cssHooks[t]||he.cssHooks[s];if(n!==undefined){a=_typeof(n);if(a==="string"&&(r=Me.exec(n))&&r[1]){n=Ie(e,t,r);a="number"}if(n==null||n!==n){return}if(a==="number"&&!l){n+=r&&r[3]||(he.cssNumber[s]?"":"px")}if(!de.clearCloneStyle&&n===""&&t.indexOf("background")===0){u[t]="inherit"}if(!o||!("set"in o)||(n=o.set(e,n,i))!==undefined){if(l){u.setProperty(t,n)}else{u[t]=n}}}else{if(o&&"get"in o&&(r=o.get(e,false,i))!==undefined){return r}return u[t]}},css:function css(e,t,n,i){var r,a,o,s=d(t),l=Ze.test(t);if(!l){t=lt(s)}o=he.cssHooks[t]||he.cssHooks[s];if(o&&"get"in o){r=o.get(e,true,n)}if(r===undefined){r=nt(e,t,i)}if(r==="normal"&&t in ct){r=ct[t]}if(n===""||n){a=parseFloat(r);return n===true||isFinite(a)?a||0:r}return r}});he.each(["height","width"],function(e,u){he.cssHooks[u]={get:function get(e,t,n){if(t){return ut.test(he.css(e,"display"))&&(!e.getClientRects().length||!e.getBoundingClientRect().width)?et(e,ft,function(){return pt(e,u,n)}):pt(e,u,n)}},set:function set(e,t,n){var i,r=Qe(e),a=!de.scrollboxSize()&&r.position==="absolute",o=a||n,s=o&&he.css(e,"boxSizing",false,r)==="border-box",l=n?ht(e,u,n,s,r):0;if(s&&a){l-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(r[u])-ht(e,u,"border",false,r)-.5)}if(l&&(i=Me.exec(t))&&(i[3]||"px")!=="px"){e.style[u]=t;t=he.css(e,u)}return dt(e,t,l)}}});he.cssHooks.marginLeft=it(de.reliableMarginLeft,function(e,t){if(t){return(parseFloat(nt(e,"marginLeft"))||e.getBoundingClientRect().left-et(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}});he.each({margin:"",padding:"",border:"Width"},function(r,a){he.cssHooks[r+a]={expand:function expand(e){var t=0,n={},i=typeof e==="string"?e.split(" "):[e];for(;t<4;t++){n[r+h[t]+a]=i[t]||i[t-2]||i[0]}return n}};if(r!=="margin"){he.cssHooks[r+a].set=dt}});he.fn.extend({css:function css(e,t){return c(this,function(e,t,n){var i,r,a={},o=0;if(Array.isArray(t)){i=Qe(e);r=t.length;for(;o<r;o++){a[t[o]]=he.css(e,t[o],false,i)}return a}return n!==undefined?he.style(e,t,n):he.css(e,t)},e,t,arguments.length>1)}});function a(e,t,n,i,r){return new a.prototype.init(e,t,n,i,r)}he.Tween=a;a.prototype={constructor:a,init:function init(e,t,n,i,r,a){this.elem=e;this.prop=n;this.easing=r||he.easing._default;this.options=t;this.start=this.now=this.cur();this.end=i;this.unit=a||(he.cssNumber[n]?"":"px")},cur:function cur(){var e=a.propHooks[this.prop];return e&&e.get?e.get(this):a.propHooks._default.get(this)},run:function run(e){var t,n=a.propHooks[this.prop];if(this.options.duration){this.pos=t=he.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration)}else{this.pos=t=e}this.now=(this.end-this.start)*t+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(n&&n.set){n.set(this)}else{a.propHooks._default.set(this)}return this}};a.prototype.init.prototype=a.prototype;a.propHooks={_default:{get:function get(e){var t;if(e.elem.nodeType!==1||e.elem[e.prop]!=null&&e.elem.style[e.prop]==null){return e.elem[e.prop]}t=he.css(e.elem,e.prop,"");return!t||t==="auto"?0:t},set:function set(e){if(he.fx.step[e.prop]){he.fx.step[e.prop](e)}else if(e.elem.nodeType===1&&(he.cssHooks[e.prop]||e.elem.style[lt(e.prop)]!=null)){he.style(e.elem,e.prop,e.now+e.unit)}else{e.elem[e.prop]=e.now}}}};a.propHooks.scrollTop=a.propHooks.scrollLeft={set:function set(e){if(e.elem.nodeType&&e.elem.parentNode){e.elem[e.prop]=e.now}}};he.easing={linear:function linear(e){return e},swing:function swing(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"};he.fx=a.prototype.init;he.fx.step={};var p,vt,mt=/^(?:toggle|show|hide)$/,yt=/queueHooks$/;function gt(){if(vt){if(_.hidden===false&&se.requestAnimationFrame){se.requestAnimationFrame(gt)}else{se.setTimeout(gt,he.fx.interval)}he.fx.tick()}}function St(){se.setTimeout(function(){p=undefined});return p=Date.now()}function bt(e,t){var n,i=0,r={height:e};t=t?1:0;for(;i<4;i+=2-t){n=h[i];r["margin"+n]=r["padding"+n]=e}if(t){r.opacity=r.width=e}return r}function Pt(e,t,n){var i,r=(M.tweeners[t]||[]).concat(M.tweeners["*"]),a=0,o=r.length;for(;a<o;a++){if(i=r[a].call(n,t,e)){return i}}}function wt(e,t,n){var i,r,a,o,s,l,u,f,c="width"in t||"height"in t,d=this,h={},p=e.style,v=e.nodeType&&xe(e),m=g.get(e,"fxshow");if(!n.queue){o=he._queueHooks(e,"fx");if(o.unqueued==null){o.unqueued=0;s=o.empty.fire;o.empty.fire=function(){if(!o.unqueued){s()}}}o.unqueued++;d.always(function(){d.always(function(){o.unqueued--;if(!he.queue(e,"fx").length){o.empty.fire()}})})}for(i in t){r=t[i];if(mt.test(r)){delete t[i];a=a||r==="toggle";if(r===(v?"hide":"show")){if(r==="show"&&m&&m[i]!==undefined){v=true}else{continue}}h[i]=m&&m[i]||he.style(e,i)}}l=!he.isEmptyObject(t);if(!l&&he.isEmptyObject(h)){return}if(c&&e.nodeType===1){n.overflow=[p.overflow,p.overflowX,p.overflowY];u=m&&m.display;if(u==null){u=g.get(e,"display")}f=he.css(e,"display");if(f==="none"){if(u){f=u}else{P([e],true);u=e.style.display||u;f=he.css(e,"display");P([e])}}if(f==="inline"||f==="inline-block"&&u!=null){if(he.css(e,"float")==="none"){if(!l){d.done(function(){p.display=u});if(u==null){f=p.display;u=f==="none"?"":f}}p.display="inline-block"}}}if(n.overflow){p.overflow="hidden";d.always(function(){p.overflow=n.overflow[0];p.overflowX=n.overflow[1];p.overflowY=n.overflow[2]})}l=false;for(i in h){if(!l){if(m){if("hidden"in m){v=m.hidden}}else{m=g.access(e,"fxshow",{display:u})}if(a){m.hidden=!v}if(v){P([e],true)}d.done(function(){if(!v){P([e])}g.remove(e,"fxshow");for(i in h){he.style(e,i,h[i])}})}l=Pt(v?m[i]:0,i,d);if(!(i in m)){m[i]=l.start;if(v){l.end=l.start;l.start=0}}}}function _t(e,t){var n,i,r,a,o;for(n in e){i=d(n);r=t[i];a=e[n];if(Array.isArray(a)){r=a[1];a=e[n]=a[0]}if(n!==i){e[i]=a;delete e[n]}o=he.cssHooks[i];if(o&&"expand"in o){a=o.expand(a);delete e[i];for(n in a){if(!(n in e)){e[n]=a[n];t[n]=r}}}else{t[i]=r}}}function M(o,e,t){var n,s,i=0,r=M.prefilters.length,l=he.Deferred().always(function(){delete a.elem}),a=function a(){if(s){return false}var e=p||St(),t=Math.max(0,u.startTime+u.duration-e),n=t/u.duration||0,i=1-n,r=0,a=u.tweens.length;for(;r<a;r++){u.tweens[r].run(i)}l.notifyWith(o,[u,i,t]);if(i<1&&a){return t}if(!a){l.notifyWith(o,[u,1,0])}l.resolveWith(o,[u]);return false},u=l.promise({elem:o,props:he.extend({},e),opts:he.extend(true,{specialEasing:{},easing:he.easing._default},t),originalProperties:e,originalOptions:t,startTime:p||St(),duration:t.duration,tweens:[],createTween:function createTween(e,t){var n=he.Tween(o,u.opts,e,t,u.opts.specialEasing[e]||u.opts.easing);u.tweens.push(n);return n},stop:function stop(e){var t=0,n=e?u.tweens.length:0;if(s){return this}s=true;for(;t<n;t++){u.tweens[t].run(1)}if(e){l.notifyWith(o,[u,1,0]);l.resolveWith(o,[u,e])}else{l.rejectWith(o,[u,e])}return this}}),f=u.props;_t(f,u.opts.specialEasing);for(;i<r;i++){n=M.prefilters[i].call(u,o,f,u.opts);if(n){if(v(n.stop)){he._queueHooks(u.elem,u.opts.queue).stop=n.stop.bind(n)}return n}}he.map(f,Pt,u);if(v(u.opts.start)){u.opts.start.call(o,u)}u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always);he.fx.timer(he.extend(a,{elem:o,anim:u,queue:u.opts.queue}));return u}he.Animation=he.extend(M,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);Ie(n.elem,e,Me.exec(t),n);return n}]},tweener:function tweener(e,t){if(v(e)){t=e;e=["*"]}else{e=e.match(C)}var n,i=0,r=e.length;for(;i<r;i++){n=e[i];M.tweeners[n]=M.tweeners[n]||[];M.tweeners[n].unshift(t)}},prefilters:[wt],prefilter:function prefilter(e,t){if(t){M.prefilters.unshift(e)}else{M.prefilters.push(e)}}});he.speed=function(e,t,n){var i=e&&_typeof(e)==="object"?he.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};if(he.fx.off){i.duration=0}else{if(typeof i.duration!=="number"){if(i.duration in he.fx.speeds){i.duration=he.fx.speeds[i.duration]}else{i.duration=he.fx.speeds._default}}}if(i.queue==null||i.queue===true){i.queue="fx"}i.old=i.complete;i.complete=function(){if(v(i.old)){i.old.call(this)}if(i.queue){he.dequeue(this,i.queue)}};return i};he.fn.extend({fadeTo:function fadeTo(e,t,n,i){return this.filter(xe).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function animate(t,e,n,i){var r=he.isEmptyObject(t),a=he.speed(e,n,i),o=function o(){var e=M(this,he.extend({},t),a);if(r||g.get(this,"finish")){e.stop(true)}};o.finish=o;return r||a.queue===false?this.each(o):this.queue(a.queue,o)},stop:function stop(r,e,a){var o=function o(e){var t=e.stop;delete e.stop;t(a)};if(typeof r!=="string"){a=e;e=r;r=undefined}if(e){this.queue(r||"fx",[])}return this.each(function(){var e=true,t=r!=null&&r+"queueHooks",n=he.timers,i=g.get(this);if(t){if(i[t]&&i[t].stop){o(i[t])}}else{for(t in i){if(i[t]&&i[t].stop&&yt.test(t)){o(i[t])}}}for(t=n.length;t--;){if(n[t].elem===this&&(r==null||n[t].queue===r)){n[t].anim.stop(a);e=false;n.splice(t,1)}}if(e||!a){he.dequeue(this,r)}})},finish:function finish(o){if(o!==false){o=o||"fx"}return this.each(function(){var e,t=g.get(this),n=t[o+"queue"],i=t[o+"queueHooks"],r=he.timers,a=n?n.length:0;t.finish=true;he.queue(this,o,[]);if(i&&i.stop){i.stop.call(this,true)}for(e=r.length;e--;){if(r[e].elem===this&&r[e].queue===o){r[e].anim.stop(true);r.splice(e,1)}}for(e=0;e<a;e++){if(n[e]&&n[e].finish){n[e].finish.call(this)}}delete t.finish})}});he.each(["toggle","show","hide"],function(e,i){var r=he.fn[i];he.fn[i]=function(e,t,n){return e==null||typeof e==="boolean"?r.apply(this,arguments):this.animate(bt(i,true),e,t,n)}});he.each({slideDown:bt("show"),slideUp:bt("hide"),slideToggle:bt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,i){he.fn[e]=function(e,t,n){return this.animate(i,e,t,n)}});he.timers=[];he.fx.tick=function(){var e,t=0,n=he.timers;p=Date.now();for(;t<n.length;t++){e=n[t];if(!e()&&n[t]===e){n.splice(t--,1)}}if(!n.length){he.fx.stop()}p=undefined};he.fx.timer=function(e){he.timers.push(e);he.fx.start()};he.fx.interval=13;he.fx.start=function(){if(vt){return}vt=true;gt()};he.fx.stop=function(){vt=null};he.fx.speeds={slow:600,fast:200,_default:400};he.fn.delay=function(i,e){i=he.fx?he.fx.speeds[i]||i:i;e=e||"fx";return this.queue(e,function(e,t){var n=se.setTimeout(e,i);t.stop=function(){se.clearTimeout(n)}})};(function(){var e=_.createElement("input"),t=_.createElement("select"),n=t.appendChild(_.createElement("option"));e.type="checkbox";de.checkOn=e.value!=="";de.optSelected=n.selected;e=_.createElement("input");e.value="t";e.type="radio";de.radioValue=e.value==="t"})();var Ct,Dt=he.expr.attrHandle;he.fn.extend({attr:function attr(e,t){return c(this,he.attr,e,t,arguments.length>1)},removeAttr:function removeAttr(e){return this.each(function(){he.removeAttr(this,e)})}});he.extend({attr:function attr(e,t,n){var i,r,a=e.nodeType;if(a===3||a===8||a===2){return}if(typeof e.getAttribute==="undefined"){return he.prop(e,t,n)}if(a!==1||!he.isXMLDoc(e)){r=he.attrHooks[t.toLowerCase()]||(he.expr.match.bool.test(t)?Ct:undefined)}if(n!==undefined){if(n===null){he.removeAttr(e,t);return}if(r&&"set"in r&&(i=r.set(e,n,t))!==undefined){return i}e.setAttribute(t,n+"");return n}if(r&&"get"in r&&(i=r.get(e,t))!==null){return i}i=he.find.attr(e,t);return i==null?undefined:i},attrHooks:{type:{set:function set(e,t){if(!de.radioValue&&t==="radio"&&pe(e,"input")){var n=e.value;e.setAttribute("type",t);if(n){e.value=n}return t}}}},removeAttr:function removeAttr(e,t){var n,i=0,r=t&&t.match(C);if(r&&e.nodeType===1){while(n=r[i++]){e.removeAttribute(n)}}}});Ct={set:function set(e,t,n){if(t===false){he.removeAttr(e,n)}else{e.setAttribute(n,n)}return n}};he.each(he.expr.match.bool.source.match(/\w+/g),function(e,t){var o=Dt[t]||he.find.attr;Dt[t]=function(e,t,n){var i,r,a=t.toLowerCase();if(!n){r=Dt[a];Dt[a]=i;i=o(e,t,n)!=null?a:null;Dt[a]=r}return i}});var Tt=/^(?:input|select|textarea|button)$/i,Mt=/^(?:a|area)$/i;he.fn.extend({prop:function prop(e,t){return c(this,he.prop,e,t,arguments.length>1)},removeProp:function removeProp(e){return this.each(function(){delete this[he.propFix[e]||e]})}});he.extend({prop:function prop(e,t,n){var i,r,a=e.nodeType;if(a===3||a===8||a===2){return}if(a!==1||!he.isXMLDoc(e)){t=he.propFix[t]||t;r=he.propHooks[t]}if(n!==undefined){if(r&&"set"in r&&(i=r.set(e,n,t))!==undefined){return i}return e[t]=n}if(r&&"get"in r&&(i=r.get(e,t))!==null){return i}return e[t]},propHooks:{tabIndex:{get:function get(e){var t=he.find.attr(e,"tabindex");if(t){return parseInt(t,10)}if(Tt.test(e.nodeName)||Mt.test(e.nodeName)&&e.href){return 0}return-1}}},propFix:{for:"htmlFor",class:"className"}});if(!de.optSelected){he.propHooks.selected={get:function get(e){var t=e.parentNode;if(t&&t.parentNode){t.parentNode.selectedIndex}return null},set:function set(e){var t=e.parentNode;if(t){t.selectedIndex;if(t.parentNode){t.parentNode.selectedIndex}}}}}he.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){he.propFix[this.toLowerCase()]=this});function k(e){var t=e.match(C)||[];return t.join(" ")}function x(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){if(Array.isArray(e)){return e}if(typeof e==="string"){return e.match(C)||[]}return[]}he.fn.extend({addClass:function addClass(t){var e,n,i,r,a,o;if(v(t)){return this.each(function(e){he(this).addClass(t.call(this,e,x(this)))})}e=kt(t);if(e.length){return this.each(function(){i=x(this);n=this.nodeType===1&&" "+k(i)+" ";if(n){for(a=0;a<e.length;a++){r=e[a];if(n.indexOf(" "+r+" ")<0){n+=r+" "}}o=k(n);if(i!==o){this.setAttribute("class",o)}}})}return this},removeClass:function removeClass(t){var e,n,i,r,a,o;if(v(t)){return this.each(function(e){he(this).removeClass(t.call(this,e,x(this)))})}if(!arguments.length){return this.attr("class","")}e=kt(t);if(e.length){return this.each(function(){i=x(this);n=this.nodeType===1&&" "+k(i)+" ";if(n){for(a=0;a<e.length;a++){r=e[a];while(n.indexOf(" "+r+" ")>-1){n=n.replace(" "+r+" "," ")}}o=k(n);if(i!==o){this.setAttribute("class",o)}}})}return this},toggleClass:function toggleClass(t,n){var e,i,r,a,o=_typeof(t),s=o==="string"||Array.isArray(t);if(v(t)){return this.each(function(e){he(this).toggleClass(t.call(this,e,x(this),n),n)})}if(typeof n==="boolean"&&s){return n?this.addClass(t):this.removeClass(t)}e=kt(t);return this.each(function(){if(s){a=he(this);for(r=0;r<e.length;r++){i=e[r];if(a.hasClass(i)){a.removeClass(i)}else{a.addClass(i)}}}else if(t===undefined||o==="boolean"){i=x(this);if(i){g.set(this,"__className__",i)}if(this.setAttribute){this.setAttribute("class",i||t===false?"":g.get(this,"__className__")||"")}}})},hasClass:function hasClass(e){var t,n,i=0;t=" "+e+" ";while(n=this[i++]){if(n.nodeType===1&&(" "+k(x(n))+" ").indexOf(t)>-1){return true}}return false}});var xt=/\r/g;he.fn.extend({val:function val(n){var i,e,r,t=this[0];if(!arguments.length){if(t){i=he.valHooks[t.type]||he.valHooks[t.nodeName.toLowerCase()];if(i&&"get"in i&&(e=i.get(t,"value"))!==undefined){return e}e=t.value;if(typeof e==="string"){return e.replace(xt,"")}return e==null?"":e}return}r=v(n);return this.each(function(e){var t;if(this.nodeType!==1){return}if(r){t=n.call(this,e,he(this).val())}else{t=n}if(t==null){t=""}else if(typeof t==="number"){t+=""}else if(Array.isArray(t)){t=he.map(t,function(e){return e==null?"":e+""})}i=he.valHooks[this.type]||he.valHooks[this.nodeName.toLowerCase()];if(!i||!("set"in i)||i.set(this,t,"value")===undefined){this.value=t}})}});he.extend({valHooks:{option:{get:function get(e){var t=he.find.attr(e,"value");return t!=null?t:k(he.text(e))}},select:{get:function get(e){var t,n,i,r=e.options,a=e.selectedIndex,o=e.type==="select-one",s=o?null:[],l=o?a+1:r.length;if(a<0){i=l}else{i=o?a:0}for(;i<l;i++){n=r[i];if((n.selected||i===a)&&!n.disabled&&(!n.parentNode.disabled||!pe(n.parentNode,"optgroup"))){t=he(n).val();if(o){return t}s.push(t)}}return s},set:function set(e,t){var n,i,r=e.options,a=he.makeArray(t),o=r.length;while(o--){i=r[o];if(i.selected=he.inArray(he.valHooks.option.get(i),a)>-1){n=true}}if(!n){e.selectedIndex=-1}return a}}}});he.each(["radio","checkbox"],function(){he.valHooks[this]={set:function set(e,t){if(Array.isArray(t)){return e.checked=he.inArray(he(e).val(),t)>-1}}};if(!de.checkOn){he.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value}}});var It=se.location;var Rt={guid:Date.now()};var zt=/\?/;he.parseXML=function(e){var t,n;if(!e||typeof e!=="string"){return null}try{t=(new se.DOMParser).parseFromString(e,"text/xml")}catch(e){}n=t&&t.getElementsByTagName("parsererror")[0];if(!t||n){he.error("Invalid XML: "+(n?he.map(n.childNodes,function(e){return e.textContent}).join("\n"):e))}return t};var Et=/^(?:focusinfocus|focusoutblur)$/,At=function At(e){e.stopPropagation()};he.extend(he.event,{trigger:function trigger(e,t,n,i){var r,a,o,s,l,u,f,c,d=[n||_],h=ce.call(e,"type")?e.type:e,p=ce.call(e,"namespace")?e.namespace.split("."):[];a=c=o=n=n||_;if(n.nodeType===3||n.nodeType===8){return}if(Et.test(h+he.event.triggered)){return}if(h.indexOf(".")>-1){p=h.split(".");h=p.shift();p.sort()}l=h.indexOf(":")<0&&"on"+h;e=e[he.expando]?e:new he.Event(h,_typeof(e)==="object"&&e);e.isTrigger=i?2:3;e.namespace=p.join(".");e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;e.result=undefined;if(!e.target){e.target=n}t=t==null?[e]:he.makeArray(t,[e]);f=he.event.special[h]||{};if(!i&&f.trigger&&f.trigger.apply(n,t)===false){return}if(!i&&!f.noBubble&&!m(n)){s=f.delegateType||h;if(!Et.test(s+h)){a=a.parentNode}for(;a;a=a.parentNode){d.push(a);o=a}if(o===(n.ownerDocument||_)){d.push(o.defaultView||o.parentWindow||se)}}r=0;while((a=d[r++])&&!e.isPropagationStopped()){c=a;e.type=r>1?s:f.bindType||h;u=(g.get(a,"events")||Object.create(null))[e.type]&&g.get(a,"handle");if(u){u.apply(a,t)}u=l&&a[l];if(u&&u.apply&&ae(a)){e.result=u.apply(a,t);if(e.result===false){e.preventDefault()}}}e.type=h;if(!i&&!e.isDefaultPrevented()){if((!f._default||f._default.apply(d.pop(),t)===false)&&ae(n)){if(l&&v(n[h])&&!m(n)){o=n[l];if(o){n[l]=null}he.event.triggered=h;if(e.isPropagationStopped()){c.addEventListener(h,At)}n[h]();if(e.isPropagationStopped()){c.removeEventListener(h,At)}he.event.triggered=undefined;if(o){n[l]=o}}}}return e.result},simulate:function simulate(e,t,n){var i=he.extend(new he.Event,n,{type:e,isSimulated:true});he.event.trigger(i,null,t)}});he.fn.extend({trigger:function trigger(e,t){return this.each(function(){he.event.trigger(e,t,this)})},triggerHandler:function triggerHandler(e,t){var n=this[0];if(n){return he.event.trigger(e,t,n,true)}}});var Bt=/\[\]$/,Ft=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Lt=/^(?:input|select|textarea|keygen)/i;function Ut(n,e,i,r){var t;if(Array.isArray(e)){he.each(e,function(e,t){if(i||Bt.test(n)){r(n,t)}else{Ut(n+"["+(_typeof(t)==="object"&&t!=null?e:"")+"]",t,i,r)}})}else if(!i&&y(e)==="object"){for(t in e){Ut(n+"["+t+"]",e[t],i,r)}}else{r(n,e)}}he.param=function(e,t){var n,i=[],r=function r(e,t){var n=v(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(n==null?"":n)};if(e==null){return""}if(Array.isArray(e)||e.jquery&&!he.isPlainObject(e)){he.each(e,function(){r(this.name,this.value)})}else{for(n in e){Ut(n,e[n],t,r)}}return i.join("&")};he.fn.extend({serialize:function serialize(){return he.param(this.serializeArray())},serializeArray:function serializeArray(){return this.map(function(){var e=he.prop(this,"elements");return e?he.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!he(this).is(":disabled")&&Lt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!Ee.test(e))}).map(function(e,t){var n=he(this).val();if(n==null){return null}if(Array.isArray(n)){return he.map(n,function(e){return{name:t.name,value:e.replace(Ft,"\r\n")}})}return{name:t.name,value:n.replace(Ft,"\r\n")}}).get()}});var Nt=/%20/g,Ht=/#.*$/,Wt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Yt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Vt=/^(?:GET|HEAD)$/,jt=/^\/\//,Jt={},Gt={},Xt="*/".concat("*"),Kt=_.createElement("a");Kt.href=It.href;function $t(a){return function(e,t){if(typeof e!=="string"){t=e;e="*"}var n,i=0,r=e.toLowerCase().match(C)||[];if(v(t)){while(n=r[i++]){if(n[0]==="+"){n=n.slice(1)||"*";(a[n]=a[n]||[]).unshift(t)}else{(a[n]=a[n]||[]).push(t)}}}}}function Zt(t,r,a,o){var s={},l=t===Gt;function u(e){var i;s[e]=true;he.each(t[e]||[],function(e,t){var n=t(r,a,o);if(typeof n==="string"&&!l&&!s[n]){r.dataTypes.unshift(n);u(n);return false}else if(l){return!(i=n)}});return i}return u(r.dataTypes[0])||!s["*"]&&u("*")}function Qt(e,t){var n,i,r=he.ajaxSettings.flatOptions||{};for(n in t){if(t[n]!==undefined){(r[n]?e:i||(i={}))[n]=t[n]}}if(i){he.extend(true,e,i)}return e}function en(e,t,n){var i,r,a,o,s=e.contents,l=e.dataTypes;while(l[0]==="*"){l.shift();if(i===undefined){i=e.mimeType||t.getResponseHeader("Content-Type")}}if(i){for(r in s){if(s[r]&&s[r].test(i)){l.unshift(r);break}}}if(l[0]in n){a=l[0]}else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){a=r;break}if(!o){o=r}}a=a||o}if(a){if(a!==l[0]){l.unshift(a)}return n[a]}}function tn(e,t,n,i){var r,a,o,s,l,u={},f=e.dataTypes.slice();if(f[1]){for(o in e.converters){u[o.toLowerCase()]=e.converters[o]}}a=f.shift();while(a){if(e.responseFields[a]){n[e.responseFields[a]]=t}if(!l&&i&&e.dataFilter){t=e.dataFilter(t,e.dataType)}l=a;a=f.shift();if(a){if(a==="*"){a=l}else if(l!=="*"&&l!==a){o=u[l+" "+a]||u["* "+a];if(!o){for(r in u){s=r.split(" ");if(s[1]===a){o=u[l+" "+s[0]]||u["* "+s[0]];if(o){if(o===true){o=u[r]}else if(u[r]!==true){a=s[0];f.unshift(s[1])}break}}}}if(o!==true){if(o&&e["throws"]){t=o(t)}else{try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+a}}}}}}}return{state:"success",data:t}}he.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:It.href,type:"GET",isLocal:Yt.test(It.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":JSON.parse,"text xml":he.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function ajaxSetup(e,t){return t?Qt(Qt(e,he.ajaxSettings),t):Qt(he.ajaxSettings,e)},ajaxPrefilter:$t(Jt),ajaxTransport:$t(Gt),ajax:function ajax(e,t){if(_typeof(e)==="object"){t=e;e=undefined}t=t||{};var f,c,d,n,h,i,p,v,r,a,m=he.ajaxSetup({},t),y=m.context||m,g=m.context&&(y.nodeType||y.jquery)?he(y):he.event,S=he.Deferred(),b=he.Callbacks("once memory"),P=m.statusCode||{},o={},s={},l="canceled",w={readyState:0,getResponseHeader:function getResponseHeader(e){var t;if(p){if(!n){n={};while(t=qt.exec(d)){n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}}t=n[e.toLowerCase()+" "]}return t==null?null:t.join(", ")},getAllResponseHeaders:function getAllResponseHeaders(){return p?d:null},setRequestHeader:function setRequestHeader(e,t){if(p==null){e=s[e.toLowerCase()]=s[e.toLowerCase()]||e;o[e]=t}return this},overrideMimeType:function overrideMimeType(e){if(p==null){m.mimeType=e}return this},statusCode:function statusCode(e){var t;if(e){if(p){w.always(e[w.status])}else{for(t in e){P[t]=[P[t],e[t]]}}}return this},abort:function abort(e){var t=e||l;if(f){f.abort(t)}u(0,t);return this}};S.promise(w);m.url=((e||m.url||It.href)+"").replace(jt,It.protocol+"//");m.type=t.method||t.type||m.method||m.type;m.dataTypes=(m.dataType||"*").toLowerCase().match(C)||[""];if(m.crossDomain==null){i=_.createElement("a");try{i.href=m.url;i.href=i.href;m.crossDomain=Kt.protocol+"//"+Kt.host!==i.protocol+"//"+i.host}catch(e){m.crossDomain=true}}if(m.data&&m.processData&&typeof m.data!=="string"){m.data=he.param(m.data,m.traditional)}Zt(Jt,m,t,w);if(p){return w}v=he.event&&m.global;if(v&&he.active++===0){he.event.trigger("ajaxStart")}m.type=m.type.toUpperCase();m.hasContent=!Vt.test(m.type);c=m.url.replace(Ht,"");if(!m.hasContent){a=m.url.slice(c.length);if(m.data&&(m.processData||typeof m.data==="string")){c+=(zt.test(c)?"&":"?")+m.data;delete m.data}if(m.cache===false){c=c.replace(Wt,"$1");a=(zt.test(c)?"&":"?")+"_="+Rt.guid+++a}m.url=c+a}else if(m.data&&m.processData&&(m.contentType||"").indexOf("application/x-www-form-urlencoded")===0){m.data=m.data.replace(Nt,"+")}if(m.ifModified){if(he.lastModified[c]){w.setRequestHeader("If-Modified-Since",he.lastModified[c])}if(he.etag[c]){w.setRequestHeader("If-None-Match",he.etag[c])}}if(m.data&&m.hasContent&&m.contentType!==false||t.contentType){w.setRequestHeader("Content-Type",m.contentType)}w.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+(m.dataTypes[0]!=="*"?", "+Xt+"; q=0.01":""):m.accepts["*"]);for(r in m.headers){w.setRequestHeader(r,m.headers[r])}if(m.beforeSend&&(m.beforeSend.call(y,w,m)===false||p)){return w.abort()}l="abort";b.add(m.complete);w.done(m.success);w.fail(m.error);f=Zt(Gt,m,t,w);if(!f){u(-1,"No Transport")}else{w.readyState=1;if(v){g.trigger("ajaxSend",[w,m])}if(p){return w}if(m.async&&m.timeout>0){h=se.setTimeout(function(){w.abort("timeout")},m.timeout)}try{p=false;f.send(o,u)}catch(e){if(p){throw e}u(-1,e)}}function u(e,t,n,i){var r,a,o,s,l,u=t;if(p){return}p=true;if(h){se.clearTimeout(h)}f=undefined;d=i||"";w.readyState=e>0?4:0;r=e>=200&&e<300||e===304;if(n){s=en(m,w,n)}if(!r&&he.inArray("script",m.dataTypes)>-1&&he.inArray("json",m.dataTypes)<0){m.converters["text script"]=function(){}}s=tn(m,s,w,r);if(r){if(m.ifModified){l=w.getResponseHeader("Last-Modified");if(l){he.lastModified[c]=l}l=w.getResponseHeader("etag");if(l){he.etag[c]=l}}if(e===204||m.type==="HEAD"){u="nocontent"}else if(e===304){u="notmodified"}else{u=s.state;a=s.data;o=s.error;r=!o}}else{o=u;if(e||!u){u="error";if(e<0){e=0}}}w.status=e;w.statusText=(t||u)+"";if(r){S.resolveWith(y,[a,u,w])}else{S.rejectWith(y,[w,u,o])}w.statusCode(P);P=undefined;if(v){g.trigger(r?"ajaxSuccess":"ajaxError",[w,m,r?a:o])}b.fireWith(y,[w,u]);if(v){g.trigger("ajaxComplete",[w,m]);if(!--he.active){he.event.trigger("ajaxStop")}}}return w},getJSON:function getJSON(e,t,n){return he.get(e,t,n,"json")},getScript:function getScript(e,t){return he.get(e,undefined,t,"script")}});he.each(["get","post"],function(e,r){he[r]=function(e,t,n,i){if(v(t)){i=i||n;n=t;t=undefined}return he.ajax(he.extend({url:e,type:r,dataType:i,data:t,success:n},he.isPlainObject(e)&&e))}});he.ajaxPrefilter(function(e){var t;for(t in e.headers){if(t.toLowerCase()==="content-type"){e.contentType=e.headers[t]||""}}});he._evalUrl=function(e,t,n){return he.ajax({url:e,type:"GET",dataType:"script",cache:true,async:false,global:false,converters:{"text script":function textScript(){}},dataFilter:function dataFilter(e){he.globalEval(e,t,n)}})};he.fn.extend({wrapAll:function wrapAll(e){var t;if(this[0]){if(v(e)){e=e.call(this[0])}t=he(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){t.insertBefore(this[0])}t.map(function(){var e=this;while(e.firstElementChild){e=e.firstElementChild}return e}).append(this)}return this},wrapInner:function wrapInner(n){if(v(n)){return this.each(function(e){he(this).wrapInner(n.call(this,e))})}return this.each(function(){var e=he(this),t=e.contents();if(t.length){t.wrapAll(n)}else{e.append(n)}})},wrap:function wrap(t){var n=v(t);return this.each(function(e){he(this).wrapAll(n?t.call(this,e):t)})},unwrap:function unwrap(e){this.parent(e).not("body").each(function(){he(this).replaceWith(this.childNodes)});return this}});he.expr.pseudos.hidden=function(e){return!he.expr.pseudos.visible(e)};he.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)};he.ajaxSettings.xhr=function(){try{return new se.XMLHttpRequest}catch(e){}};var nn={0:200,1223:204},rn=he.ajaxSettings.xhr();de.cors=!!rn&&"withCredentials"in rn;de.ajax=rn=!!rn;he.ajaxTransport(function(r){var _a,o;if(de.cors||rn&&!r.crossDomain){return{send:function send(e,t){var n,i=r.xhr();i.open(r.type,r.url,r.async,r.username,r.password);if(r.xhrFields){for(n in r.xhrFields){i[n]=r.xhrFields[n]}}if(r.mimeType&&i.overrideMimeType){i.overrideMimeType(r.mimeType)}if(!r.crossDomain&&!e["X-Requested-With"]){e["X-Requested-With"]="XMLHttpRequest"}for(n in e){i.setRequestHeader(n,e[n])}_a=function a(e){return function(){if(_a){_a=o=i.onload=i.onerror=i.onabort=i.ontimeout=i.onreadystatechange=null;if(e==="abort"){i.abort()}else if(e==="error"){if(typeof i.status!=="number"){t(0,"error")}else{t(i.status,i.statusText)}}else{t(nn[i.status]||i.status,i.statusText,(i.responseType||"text")!=="text"||typeof i.responseText!=="string"?{binary:i.response}:{text:i.responseText},i.getAllResponseHeaders())}}}};i.onload=_a();o=i.onerror=i.ontimeout=_a("error");if(i.onabort!==undefined){i.onabort=o}else{i.onreadystatechange=function(){if(i.readyState===4){se.setTimeout(function(){if(_a){o()}})}}}_a=_a("abort");try{i.send(r.hasContent&&r.data||null)}catch(e){if(_a){throw e}}},abort:function abort(){if(_a){_a()}}}}});he.ajaxPrefilter(function(e){if(e.crossDomain){e.contents.script=false}});he.ajaxSetup({accepts:{script:"text/javascript, application/javascript, "+"application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function textScript(e){he.globalEval(e);return e}}});he.ajaxPrefilter("script",function(e){if(e.cache===undefined){e.cache=false}if(e.crossDomain){e.type="GET"}});he.ajaxTransport("script",function(n){if(n.crossDomain||n.scriptAttrs){var i,_r;return{send:function send(e,t){i=he("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",_r=function r(e){i.remove();_r=null;if(e){t(e.type==="error"?404:200,e.type)}});_.head.appendChild(i[0])},abort:function abort(){if(_r){_r()}}}}});var an=[],on=/(=)\?(?=&|$)|\?\?/;he.ajaxSetup({jsonp:"callback",jsonpCallback:function jsonpCallback(){var e=an.pop()||he.expando+"_"+Rt.guid++;this[e]=true;return e}});he.ajaxPrefilter("json jsonp",function(e,t,n){var i,r,a,o=e.jsonp!==false&&(on.test(e.url)?"url":typeof e.data==="string"&&(e.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&on.test(e.data)&&"data");if(o||e.dataTypes[0]==="jsonp"){i=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback;if(o){e[o]=e[o].replace(on,"$1"+i)}else if(e.jsonp!==false){e.url+=(zt.test(e.url)?"&":"?")+e.jsonp+"="+i}e.converters["script json"]=function(){if(!a){he.error(i+" was not called")}return a[0]};e.dataTypes[0]="json";r=se[i];se[i]=function(){a=arguments};n.always(function(){if(r===undefined){he(se).removeProp(i)}else{se[i]=r}if(e[i]){e.jsonpCallback=t.jsonpCallback;an.push(i)}if(a&&v(r)){r(a[0])}a=r=undefined});return"script"}});de.createHTMLDocument=function(){var e=_.implementation.createHTMLDocument("").body;e.innerHTML="<form></form><form></form>";return e.childNodes.length===2}();he.parseHTML=function(e,t,n){if(typeof e!=="string"){return[]}if(typeof t==="boolean"){n=t;t=false}var i,r,a;if(!t){if(de.createHTMLDocument){t=_.implementation.createHTMLDocument("");i=t.createElement("base");i.href=_.location.href;t.head.appendChild(i)}else{t=_}}r=W.exec(e);a=!n&&[];if(r){return[t.createElement(r[1])]}r=Le([e],t,a);if(a&&a.length){he(a).remove()}return he.merge([],r.childNodes)};he.fn.load=function(e,t,n){var i,r,a,o=this,s=e.indexOf(" ");if(s>-1){i=k(e.slice(s));e=e.slice(0,s)}if(v(t)){n=t;t=undefined}else if(t&&_typeof(t)==="object"){r="POST"}if(o.length>0){he.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){a=arguments;o.html(i?he("<div>").append(he.parseHTML(e)).find(i):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,a||[e.responseText,t,e])})})}return this};he.expr.pseudos.animated=function(t){return he.grep(he.timers,function(e){return t===e.elem}).length};he.offset={setOffset:function setOffset(e,t,n){var i,r,a,o,s,l,u,f=he.css(e,"position"),c=he(e),d={};if(f==="static"){e.style.position="relative"}s=c.offset();a=he.css(e,"top");l=he.css(e,"left");u=(f==="absolute"||f==="fixed")&&(a+l).indexOf("auto")>-1;if(u){i=c.position();o=i.top;r=i.left}else{o=parseFloat(a)||0;r=parseFloat(l)||0}if(v(t)){t=t.call(e,n,he.extend({},s))}if(t.top!=null){d.top=t.top-s.top+o}if(t.left!=null){d.left=t.left-s.left+r}if("using"in t){t.using.call(e,d)}else{c.css(d)}}};he.fn.extend({offset:function offset(t){if(arguments.length){return t===undefined?this:this.each(function(e){he.offset.setOffset(this,t,e)})}var e,n,i=this[0];if(!i){return}if(!i.getClientRects().length){return{top:0,left:0}}e=i.getBoundingClientRect();n=i.ownerDocument.defaultView;return{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}},position:function position(){if(!this[0]){return}var e,t,n,i=this[0],r={top:0,left:0};if(he.css(i,"position")==="fixed"){t=i.getBoundingClientRect()}else{t=this.offset();n=i.ownerDocument;e=i.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&he.css(e,"position")==="static"){e=e.parentNode}if(e&&e!==i&&e.nodeType===1){r=he(e).offset();r.top+=he.css(e,"borderTopWidth",true);r.left+=he.css(e,"borderLeftWidth",true)}}return{top:t.top-r.top-he.css(i,"marginTop",true),left:t.left-r.left-he.css(i,"marginLeft",true)}},offsetParent:function offsetParent(){return this.map(function(){var e=this.offsetParent;while(e&&he.css(e,"position")==="static"){e=e.offsetParent}return e||S})}});he.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var a="pageYOffset"===r;he.fn[t]=function(e){return c(this,function(e,t,n){var i;if(m(e)){i=e}else if(e.nodeType===9){i=e.defaultView}if(n===undefined){return i?i[r]:e[t]}if(i){i.scrollTo(!a?n:i.pageXOffset,a?n:i.pageYOffset)}else{e[t]=n}},t,e,arguments.length)}});he.each(["top","left"],function(e,n){he.cssHooks[n]=it(de.pixelPosition,function(e,t){if(t){t=nt(e,n);return $e.test(t)?he(e).position()[n]+"px":t}})});he.each({Height:"height",Width:"width"},function(o,s){he.each({padding:"inner"+o,content:s,"":"outer"+o},function(i,a){he.fn[a]=function(e,t){var n=arguments.length&&(i||typeof e!=="boolean"),r=i||(e===true||t===true?"margin":"border");return c(this,function(e,t,n){var i;if(m(e)){return a.indexOf("outer")===0?e["inner"+o]:e.document.documentElement["client"+o]}if(e.nodeType===9){i=e.documentElement;return Math.max(e.body["scroll"+o],i["scroll"+o],e.body["offset"+o],i["offset"+o],i["client"+o])}return n===undefined?he.css(e,t,r):he.style(e,t,n,r)},s,n?e:undefined,n)}})});he.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){he.fn[t]=function(e){return this.on(t,e)}});he.fn.extend({bind:function bind(e,t,n){return this.on(e,null,t,n)},unbind:function unbind(e,t){return this.off(e,null,t)},delegate:function delegate(e,t,n,i){return this.on(t,e,n,i)},undelegate:function undelegate(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},hover:function hover(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}});he.each(("blur focus focusin focusout resize scroll click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup contextmenu").split(" "),function(e,n){he.fn[n]=function(e,t){return arguments.length>0?this.on(n,null,e,t):this.trigger(n)}});var sn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;he.proxy=function(e,t){var n,i,r;if(typeof t==="string"){n=e[t];t=e;e=n}if(!v(e)){return undefined}i=ue.call(arguments,2);r=function r(){return e.apply(t||this,i.concat(ue.call(arguments)))};r.guid=e.guid=e.guid||he.guid++;return r};he.holdReady=function(e){if(e){he.readyWait++}else{he.ready(true)}};he.isArray=Array.isArray;he.parseJSON=JSON.parse;he.nodeName=pe;he.isFunction=v;he.isWindow=m;he.camelCase=d;he.type=y;he.now=Date.now;he.isNumeric=function(e){var t=he.type(e);return(t==="number"||t==="string")&&!isNaN(e-parseFloat(e))};he.trim=function(e){return e==null?"":(e+"").replace(sn,"$1")};{!(dn=[],hn=function(){return he}.apply(cn,dn),hn!==undefined&&(fn.exports=hn))}var ln=se.jQuery,un=se.$;he.noConflict=function(e){if(se.$===he){se.$=un}if(e&&se.jQuery===he){se.jQuery=ln}return he};if(typeof e==="undefined"){se.jQuery=se.$=he}return he})},function(F,e,t){t.r(e);t.d(e,"v1",function(){return c});t.d(e,"v3",function(){return N});t.d(e,"v4",function(){return W});t.d(e,"v5",function(){return J});t.d(e,"NIL",function(){return G});t.d(e,"version",function(){return K});t.d(e,"validate",function(){return o});t.d(e,"stringify",function(){return v});t.d(e,"parse",function(){return h});var n;var i=new Uint8Array(16);function p(){if(!n){n=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!n){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return n(i)}var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function a(e){return typeof e==="string"&&r.test(e)}var o=a;var s=[];for(var l=0;l<256;++l){s.push((l+256).toString(16).substr(1))}function u(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var n=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!o(n)){throw TypeError("Stringified UUID is invalid")}return n}var v=u;var m;var y;var g=0;var S=0;function f(e,t,n){var i=t&&n||0;var r=t||new Array(16);e=e||{};var a=e.node||m;var o=e.clockseq!==undefined?e.clockseq:y;if(a==null||o==null){var s=e.random||(e.rng||p)();if(a==null){a=m=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]}if(o==null){o=y=(s[6]<<8|s[7])&16383}}var l=e.msecs!==undefined?e.msecs:Date.now();var u=e.nsecs!==undefined?e.nsecs:S+1;var f=l-g+(u-S)/1e4;if(f<0&&e.clockseq===undefined){o=o+1&16383}if((f<0||l>g)&&e.nsecs===undefined){u=0}if(u>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}g=l;S=u;y=o;l+=122192928e5;var c=((l&268435455)*1e4+u)%4294967296;r[i++]=c>>>24&255;r[i++]=c>>>16&255;r[i++]=c>>>8&255;r[i++]=c&255;var d=l/4294967296*1e4&268435455;r[i++]=d>>>8&255;r[i++]=d&255;r[i++]=d>>>24&15|16;r[i++]=d>>>16&255;r[i++]=o>>>8|128;r[i++]=o&255;for(var h=0;h<6;++h){r[i+h]=a[h]}return t||v(r)}var c=f;function d(e){if(!o(e)){throw TypeError("Invalid UUID")}var t;var n=new Uint8Array(16);n[0]=(t=parseInt(e.slice(0,8),16))>>>24;n[1]=t>>>16&255;n[2]=t>>>8&255;n[3]=t&255;n[4]=(t=parseInt(e.slice(9,13),16))>>>8;n[5]=t&255;n[6]=(t=parseInt(e.slice(14,18),16))>>>8;n[7]=t&255;n[8]=(t=parseInt(e.slice(19,23),16))>>>8;n[9]=t&255;n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;n[11]=t/4294967296&255;n[12]=t>>>24&255;n[13]=t>>>16&255;n[14]=t>>>8&255;n[15]=t&255;return n}var h=d;function b(e){e=unescape(encodeURIComponent(e));var t=[];for(var n=0;n<e.length;++n){t.push(e.charCodeAt(n))}return t}var P="6ba7b810-9dad-11d1-80b4-00c04fd430c8";var w="6ba7b811-9dad-11d1-80b4-00c04fd430c8";var _=function _(e,o,s){function t(e,t,n,i){if(typeof e==="string"){e=b(e)}if(typeof t==="string"){t=h(t)}if(t.length!==16){throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)")}var r=new Uint8Array(16+e.length);r.set(t);r.set(e,t.length);r=s(r);r[6]=r[6]&15|o;r[8]=r[8]&63|128;if(n){i=i||0;for(var a=0;a<16;++a){n[i+a]=r[a]}return n}return v(r)}try{t.name=e}catch(e){}t.DNS=P;t.URL=w;return t};function C(e){if(typeof e==="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n){e[n]=t.charCodeAt(n)}}return D(M(k(e),e.length*8))}function D(e){var t=[];var n=e.length*32;var i="0123456789abcdef";for(var r=0;r<n;r+=8){var a=e[r>>5]>>>r%32&255;var o=parseInt(i.charAt(a>>>4&15)+i.charAt(a&15),16);t.push(o)}return t}function T(e){return(e+64>>>9<<4)+14+1}function M(e,t){e[t>>5]|=128<<t%32;e[T(t)-1]=t;var n=1732584193;var i=-271733879;var r=-1732584194;var a=271733878;for(var o=0;o<e.length;o+=16){var s=n;var l=i;var u=r;var f=a;n=R(n,i,r,a,e[o],7,-680876936);a=R(a,n,i,r,e[o+1],12,-389564586);r=R(r,a,n,i,e[o+2],17,606105819);i=R(i,r,a,n,e[o+3],22,-1044525330);n=R(n,i,r,a,e[o+4],7,-176418897);a=R(a,n,i,r,e[o+5],12,1200080426);r=R(r,a,n,i,e[o+6],17,-1473231341);i=R(i,r,a,n,e[o+7],22,-45705983);n=R(n,i,r,a,e[o+8],7,1770035416);a=R(a,n,i,r,e[o+9],12,-1958414417);r=R(r,a,n,i,e[o+10],17,-42063);i=R(i,r,a,n,e[o+11],22,-1990404162);n=R(n,i,r,a,e[o+12],7,1804603682);a=R(a,n,i,r,e[o+13],12,-40341101);r=R(r,a,n,i,e[o+14],17,-1502002290);i=R(i,r,a,n,e[o+15],22,1236535329);n=z(n,i,r,a,e[o+1],5,-165796510);a=z(a,n,i,r,e[o+6],9,-1069501632);r=z(r,a,n,i,e[o+11],14,643717713);i=z(i,r,a,n,e[o],20,-373897302);n=z(n,i,r,a,e[o+5],5,-701558691);a=z(a,n,i,r,e[o+10],9,38016083);r=z(r,a,n,i,e[o+15],14,-660478335);i=z(i,r,a,n,e[o+4],20,-405537848);n=z(n,i,r,a,e[o+9],5,568446438);a=z(a,n,i,r,e[o+14],9,-1019803690);r=z(r,a,n,i,e[o+3],14,-187363961);i=z(i,r,a,n,e[o+8],20,1163531501);n=z(n,i,r,a,e[o+13],5,-1444681467);a=z(a,n,i,r,e[o+2],9,-51403784);r=z(r,a,n,i,e[o+7],14,1735328473);i=z(i,r,a,n,e[o+12],20,-1926607734);n=E(n,i,r,a,e[o+5],4,-378558);a=E(a,n,i,r,e[o+8],11,-2022574463);r=E(r,a,n,i,e[o+11],16,1839030562);i=E(i,r,a,n,e[o+14],23,-35309556);n=E(n,i,r,a,e[o+1],4,-1530992060);a=E(a,n,i,r,e[o+4],11,1272893353);r=E(r,a,n,i,e[o+7],16,-155497632);i=E(i,r,a,n,e[o+10],23,-1094730640);n=E(n,i,r,a,e[o+13],4,681279174);a=E(a,n,i,r,e[o],11,-358537222);r=E(r,a,n,i,e[o+3],16,-722521979);i=E(i,r,a,n,e[o+6],23,76029189);n=E(n,i,r,a,e[o+9],4,-640364487);a=E(a,n,i,r,e[o+12],11,-421815835);r=E(r,a,n,i,e[o+15],16,530742520);i=E(i,r,a,n,e[o+2],23,-995338651);n=A(n,i,r,a,e[o],6,-198630844);a=A(a,n,i,r,e[o+7],10,1126891415);r=A(r,a,n,i,e[o+14],15,-1416354905);i=A(i,r,a,n,e[o+5],21,-57434055);n=A(n,i,r,a,e[o+12],6,1700485571);a=A(a,n,i,r,e[o+3],10,-1894986606);r=A(r,a,n,i,e[o+10],15,-1051523);i=A(i,r,a,n,e[o+1],21,-2054922799);n=A(n,i,r,a,e[o+8],6,1873313359);a=A(a,n,i,r,e[o+15],10,-30611744);r=A(r,a,n,i,e[o+6],15,-1560198380);i=A(i,r,a,n,e[o+13],21,1309151649);n=A(n,i,r,a,e[o+4],6,-145523070);a=A(a,n,i,r,e[o+11],10,-1120210379);r=A(r,a,n,i,e[o+2],15,718787259);i=A(i,r,a,n,e[o+9],21,-343485551);n=x(n,s);i=x(i,l);r=x(r,u);a=x(a,f)}return[n,i,r,a]}function k(e){if(e.length===0){return[]}var t=e.length*8;var n=new Uint32Array(T(t));for(var i=0;i<t;i+=8){n[i>>5]|=(e[i/8]&255)<<i%32}return n}function x(e,t){var n=(e&65535)+(t&65535);var i=(e>>16)+(t>>16)+(n>>16);return i<<16|n&65535}function O(e,t){return e<<t|e>>>32-t}function I(e,t,n,i,r,a){return x(O(x(x(t,e),x(i,a)),r),n)}function R(e,t,n,i,r,a,o){return I(t&n|~t&i,e,t,r,a,o)}function z(e,t,n,i,r,a,o){return I(t&i|n&~i,e,t,r,a,o)}function E(e,t,n,i,r,a,o){return I(t^n^i,e,t,r,a,o)}function A(e,t,n,i,r,a,o){return I(n^(t|~i),e,t,r,a,o)}var L=C;var U=_("v3",48,L);var N=U;function H(e,t,n){e=e||{};var i=e.random||(e.rng||p)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;if(t){n=n||0;for(var r=0;r<16;++r){t[n+r]=i[r]}return t}return v(i)}var W=H;function q(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:return t^n^i;case 2:return t&n^t&i^n&i;case 3:return t^n^i}}function B(e,t){return e<<t|e>>>32-t}function Y(e){var t=[1518500249,1859775393,2400959708,3395469782];var n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e==="string"){var i=unescape(encodeURIComponent(e));e=[];for(var r=0;r<i.length;++r){e.push(i.charCodeAt(r))}}else if(!Array.isArray(e)){e=Array.prototype.slice.call(e)}e.push(128);var a=e.length/4+2;var o=Math.ceil(a/16);var s=new Array(o);for(var l=0;l<o;++l){var u=new Uint32Array(16);for(var f=0;f<16;++f){u[f]=e[l*64+f*4]<<24|e[l*64+f*4+1]<<16|e[l*64+f*4+2]<<8|e[l*64+f*4+3]}s[l]=u}s[o-1][14]=(e.length-1)*8/Math.pow(2,32);s[o-1][14]=Math.floor(s[o-1][14]);s[o-1][15]=(e.length-1)*8&4294967295;for(var c=0;c<o;++c){var d=new Uint32Array(80);for(var h=0;h<16;++h){d[h]=s[c][h]}for(var p=16;p<80;++p){d[p]=B(d[p-3]^d[p-8]^d[p-14]^d[p-16],1)}var v=n[0];var m=n[1];var y=n[2];var g=n[3];var S=n[4];for(var b=0;b<80;++b){var P=Math.floor(b/20);var w=B(v,5)+q(P,m,y,g)+S+t[P]+d[b]>>>0;S=g;g=y;y=B(m,30)>>>0;m=v;v=w}n[0]=n[0]+v>>>0;n[1]=n[1]+m>>>0;n[2]=n[2]+y>>>0;n[3]=n[3]+g>>>0;n[4]=n[4]+S>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}var V=Y;var j=_("v5",80,V);var J=j;var G="00000000-0000-0000-0000-000000000000";function X(e){if(!o(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var K=X},function(e,t,n){e.exports=n(4)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});t.JSPluginV1=undefined;var i=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();var z=n(0);var E=n(5);var A=n(12);var B=n(14);var F=n(16);var r=n(1);var O=a(r);function a(e){return e&&e.__esModule?e:{default:e}}function L(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var o=function(){var s=-1;var o=0;var g=0;var S=1;var b=40;var P=1024*1024*4;var w=1001;var _=1002;var u=1003;var f=2002;var C=Symbol("OPTIONS");var l=Symbol("CURRENTPLAYRATE");var c=Symbol("CURRENTSOUNDWND");var D=Symbol("MAXWNDNUM");var T=Symbol("MAXWNDNUM");var M=Symbol("DRAWCANVAS");var d=Symbol("SHAPEID");var h=Symbol("WINDOWFULL");var p=Symbol("SINGLEWINDOW");var v=Symbol("FILETMP");var m=Symbol("STATUSTMP");var y=Symbol("UPGRADESTATUSURL");var k=Symbol("CURWNDINDEX");var x=Symbol("CALLBACKFUNCTION");var I=Symbol("PLUGINVERSION");var R=Symbol("CANFULLSCREEN");var e=function(){function a(e){L(this,a);this.oStreamClient=new E.StreamClient;this.oStorageManager=null;this.oJSPlugin=null;if(typeof e.staticPath==="string"){this.staticPath=e.staticPath}var t=this;var n={szId:"playWnd",iMode:0,iType:1,iWidth:400,iHeight:300,iMaxSplit:4,iCurrentSplit:2,szBasePath:"./"};this[C]=Object.assign(n,e);this.iWidth=e.iWidth;this.iHeight=e.iHeight;this.b3DZoom=false;this.bEZoom=false;var i={border:"#000000",borderSelect:"#FFCC00",background:"#4C4B4B"};i=Object.assign(i,e.oStyle);this[C].oStyle=i;if(this[C].iCurrentSplit>this[C].iMaxSplit){this[C].iCurrentSplit=this[C].iMaxSplit}this[l]=1;this[c]=-1;this[D]=this[C].iMaxSplit*this[C].iMaxSplit;this[d]="";this[h]=false;this[p]=null;this[v]=null;this[m]="";this[y]="";this[k]=-1;this[x]=null;this[R]=true;this[I]="V1.2.0 build20190123";this.bPlay=false;t.oStorageManager=new B.StorageManager(this[C].szBasePath+"/transform",{staticPath:this.staticPath});if(typeof t[C].szId==="string"){t.oJSPlugin=(0,O["default"])("#"+t[C].szId)}else{t.oJSPlugin=t[C].szId}this[T]=[];for(var r=0;r<this[D];r++){this[T][r]={};this[T][r].bSelect=false;this[T][r].bPlay=false;this[T][r].bPause=false;this[T][r].bRecord=false;this[T][r].oPlayCtrl=null;this[T][r].szPlayType="";this[T][r].szStorageUUID="";this[T][r].szStreamUUID="";this[T][r].aHead=[];this[T][r].bLoad=false;this[T][r].windowID=t[C].szId+"canvas"+r;this[T][r].drawID=t[C].szId+"canvas_draw"+r;this[T][r].iRate=1;this[T][r].bEZoom=false;this[T][r].szSecretKey="";this[T][r].bFrameForward=false;this[T][r].iDecodeType=g;this[T][r].bFirstFrame=false}t.listenBrowserVisibility();if(this[C].iMode===0){t.createWindows()}else if(this[C].iMode===1);else if(this[C].iMode===2){t.createIMGWindows()}if(this[C].iType===0){t.oJSPlugin.hide()}t.initEvent();t.EventCallback.windowEventSelect(0);window.JSPlayerModuleLoaded=true}i(a,[{key:"listenBrowserVisibility",value:function e(){var n=this;document.addEventListener("visibilitychange",function(){if(document.hidden){for(var e=0;e<16;e++){if(n[T][e]&&n[T][e].bLoad){n[T][e].oPlayCtrl.PlayM4_IsVisible(false)}}}else{for(var t=0;t<16;t++){if(n[T][t]&&n[T][t].bLoad){n[T][t].oPlayCtrl.PlayM4_IsVisible(true)}}}},false)}},{key:"createWindows",value:function e(t,n){var i=this;if(t&&n){i.iWidth=t;i.iHeight=n}var r=i.iWidth%i[C].iCurrentSplit;var a=i.iHeight%i[C].iCurrentSplit;var o=(i.iWidth-r-i[C].iCurrentSplit*2)/i[C].iCurrentSplit;var s=(i.iHeight-a-i[C].iCurrentSplit*2)/i[C].iCurrentSplit;var l=(i.iWidth-r)/i[C].iCurrentSplit;var u=(i.iHeight-a)/i[C].iCurrentSplit;var f=i[C].iCurrentSplit;if(typeof i[C].szId==="string"){i.oJSPlugin=(0,O["default"])("#"+i[C].szId)}else{i.oJSPlugin=i[C].szId}var c='<div class="'+i[C].szId+'parent-wnd" style="overflow:hidden;width:100%; height:100%; position: relative;">';var d=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if(d){for(var h=0;h<1;h++){t=o+(h%f===f-1?r:0);n=s+(h+f>=Math.pow(f,2)?a:0);var p=l+(h%f===f-1?r:0);var v=u+(h+f>=Math.pow(f,2)?a:0);p=p*2;v=v*2;c+='<div style="transform: scale(0.5);-webkit-transform: scale(0.5);-webkit-transform-origin:0 0;text-align:left;transform-origin:0 0; width:'+p+"px;height:"+v+'px;"><div style="float:left; background-color: '+i[C].oStyle.background+'; position: relative; width:100%; height:100%;">'+'<canvas id="'+i[C].szId+"canvas_draw"+h+'"  class="'+i[C].szId+'draw-window" style="position:absolute; top:0; left:0; z-index:999;" wid="'+h+'" width='+p+" height="+v+"></canvas>"+(h===0?'<img style="display:none;" id="playImg'+h+'" src="">':"")+'<canvas id="'+i[C].szId+"canvas"+h+'" class="'+i[C].szId+'play-window" style="z-index:9;" wid="'+h+'" width="'+p+'" height="'+v+'"></canvas>'+"</div></div>"}}else{for(var m=0;m<i[D];m++){t=o+(m%f===f-1?r:0);n=s+(m+f>=Math.pow(f,2)?a:0);var y=l+(m%f===f-1?r:0);var g=u+(m+f>=Math.pow(f,2)?a:0);c+='<div style="float:left; background-color: '+i[C].oStyle.background+"; position: relative; width: "+y+"px; height: "+g+'px;">'+'<canvas id="'+i[C].szId+"canvas"+m+'" class="'+i[C].szId+'play-window" style="z-index:9;" wid="'+m+'" width="'+y+'" height="'+g+'"></canvas>'+(m===0?'<img style="display:none;" id="playImg'+m+'" src="">':"")+'<canvas id="'+i[C].szId+"canvas_draw"+m+'"  class="'+i[C].szId+'draw-window" style="position:absolute; top:0; left:0; z-index:999;" wid="'+m+'" width='+t+" height="+n+"></canvas>"+"</div>"}}c+="</div>";i.oJSPlugin.html(c)}},{key:"createIMGWindows",value:function e(t,n){var i=this;if(t&&n){i.iWidth=t;i.iHeight=n}var r=i.iWidth%i[C].iCurrentSplit;var a=i.iHeight%i[C].iCurrentSplit;var o=(i.iWidth-r-i[C].iCurrentSplit*2)/i[C].iCurrentSplit;var s=(i.iHeight-a-i[C].iCurrentSplit*2)/i[C].iCurrentSplit;var l=(i.iWidth-r)/i[C].iCurrentSplit;var u=(i.iHeight-a)/i[C].iCurrentSplit;var f=i[C].iCurrentSplit;if(typeof i[C].szId==="string"){i.oJSPlugin=(0,O["default"])("#"+i[C].szId)}else{i.oJSPlugin=i[C].szId}i.oJSPlugin.html("");var c='<div class="'+i[C].szId+'parent-wnd" style="overflow:hidden;width:100%; height:100%; position: relative;">';for(var d=0;d<i[D];d++){t=o+(d%f===f-1?r:0);n=s+(d+f>=Math.pow(f,2)?a:0);var h=l+(d%f===f-1?r:0);var p=u+(d+f>=Math.pow(f,2)?a:0);c+='<div style="float:left; background-color: '+i[C].oStyle.background+"; position: relative; width: "+h+"px; height: "+p+'px;">'+'<img id="'+i[C].szId+"canvas"+d+'" class="'+i[C].szId+'play-window" wid="'+d+'" width="'+h+'" height="'+p+'"></img>'+'<canvas id="'+i[C].szId+"canvas_draw"+d+'"  class="'+i[C].szId+'draw-window" style="position:absolute; top:0; left:0; z-index:999;" wid="'+d+'" width='+t+" height="+n+"></canvas>"+"</div>"}c+="</div>";i.oJSPlugin.html(c)}},{key:"initCallbackEvent",value:function e(){var n=this;n.EventCallback=function(){return{openStreamCallback:function e(){window.openStreamCallback&&window.openStreamCallback()},getStreamHeaderCallback:function e(){window.getStreamHeaderCallback&&window.getStreamHeaderCallback()},getVideoStreamCallback:function e(){window.getVideoStreamCallback&&window.getVideoStreamCallback()},appearFirstFrameCallback:function e(){window.appearFirstFrameCallback&&window.appearFirstFrameCallback()},averageStreamSuccessCallback:function e(){window.averageStreamSuccessCallback&&window.averageStreamSuccessCallback()},loadEventHandler:function e(){window.loadEventHandler&&window.loadEventHandler()},zoomEventResponse:function e(){},windowEventSelect:function e(t){if(n[k]===t){return}n[k]=t;if(n[T][t].bEZoom||n.b3DZoom){(0,O["default"])("."+n[C].szId+"draw-window").unbind();n[M].setDrawStatus(false);n[M]=null;n[M]=new F.ESCanvas(n[C].szId+"canvas_draw0");n[M].setShapeType("Rect");n[M].setDrawStyle("#ff0000","",0);if(n[T][t].bEZoom){n[M].setDrawStatus(true,function(e){if(e.startPos&&e.endPos){if(e.startPos[0]>e.endPos[0]){n[T][t].oPlayCtrl.PlayM4_SetDisplayRegion(null,false)}else{n[T][t].oPlayCtrl.PlayM4_SetDisplayRegion({left:e.startPos[0],top:e.startPos[1],right:e.endPos[0],bottom:e.endPos[1]},true)}}})}else if(n.b3DZoom){n[M].setDrawStatus(true,function(e){n[x](e)})}}window.GetSelectWndInfo&&window.GetSelectWndInfo(t)},pluginErrorHandler:function e(t,n,i){window.PluginEventHandler&&window.PluginEventHandler(t,n,i)},windowEventOver:function e(t){window.windowEventOver&&window.windowEventOver(t)},windowEventOut:function e(t){window.windowEventOut&&window.windowEventOut(t)},windowEventUp:function e(t){window.windowEventUp&&window.windowEventUp(t)},windowFullCcreenChange:function e(t){window.windowFullCcreenChange&&window.windowFullCcreenChange(t)},firstFrameDisplay:function e(t,n,i){window.firstFrameDisplay&&window.firstFrameDisplay(t,n,i)},performanceLack:function e(){window.performanceLack&&window.performanceLack()},mouseEvent:function e(t,n,i){var r='<?xml version="1.0"?><MouseEvent><WndIndex>0</WndIndex><EventType>'+t+"</EventType>"+"<Position><x>"+n+"</x><y>"+i+"</y><delta>0</delta></Position></MouseEvent>";window.onMouseEvent&&window.onMouseEvent(r)}}}()}},{key:"initEvent",value:function e(){var a=this;a.initCallbackEvent();a.oJSPlugin.find("."+a[C].szId+"parent-wnd").eq(0).children().each(function(i){var e=this;var r=false;(0,O["default"])(e).unbind().bind("mousedown",function(){a.EventCallback.windowEventSelect(parseInt(a.oJSPlugin.find("."+a[C].szId+"parent-wnd").eq(0).children().eq(i).find("."+a[C].szId+"play-window").eq(0).attr("wid"),10))});(0,O["default"])(e).bind("mouseenter",function(e){var t=a[C].szId;if(e.target.id&&e.target.id.indexOf("_")===-1){t=e.target.id.split("canvas0")[0]}else{t=e.target.id.split("canvas_draw0")[0]}(0,O["default"])("#"+t+"canvas_draw0").css("pointer-events","all");if(a.bEZoom||a.b3DZoom){if(e.target.id&&e.target.id.indexOf("_")===-1){a[M]=null;(0,O["default"])("."+t+"draw-window").unbind();a[M]=new F.ESCanvas(t+"canvas_draw0");a[M].setShapeType("Rect");a[M].setDrawStyle("#ff0000","",0);if(a.b3DZoom){a[M].setDrawStatus(true,function(e){a[x](e)})}}}else{(0,O["default"])("#"+t+"canvas_draw0").css("pointer-events","none")}});(0,O["default"])(e).bind("mouseleave",function(e){var t=a[C].szId;if(e.target.id&&e.target.id.indexOf("_")===-1){t=e.target.id.split("canvas0")[0]}else{t=e.target.id.split("canvas_draw0")[0]}(0,O["default"])("#"+t+"canvas_draw0").css("pointer-events","none")});(0,O["default"])(e).bind("mouseover",function(e){a.EventCallback.windowEventOver(i);e.stopPropagation()});(0,O["default"])(e).bind("mouseout",function(e){a.EventCallback.windowEventOut(i);e.stopPropagation()});(0,O["default"])(e).bind("mousedown",function(e){if(a[M]){r=true;var t=e.offsetX/a[M].m_iCanvasWidth;var n=e.offsetY/a[M].m_iCanvasHeight;if(e.button===2){a.EventCallback.mouseEvent(4,t,n)}else if(e.button===0){a.EventCallback.mouseEvent(1,t,n)}}e.stopPropagation()});(0,O["default"])(e).bind("mousemove",function(e){if(a[M]){var t=e.offsetX/a[M].m_iCanvasWidth;var n=e.offsetY/a[M].m_iCanvasHeight;if(r){a.EventCallback.mouseEvent(7,t,n)}else{a.EventCallback.mouseEvent(6,t,n)}}e.stopPropagation()});(0,O["default"])(e).bind("mousewheel",function(e){if(a[M]){var t=e.offsetX/a[M].m_iCanvasWidth;var n=e.offsetY/a[M].m_iCanvasHeight;a.EventCallback.mouseEvent(8,t,n)}e.stopPropagation()});(0,O["default"])(e).bind("mouseup",function(e){r=false;a.EventCallback.windowEventUp(i);if(a[M]){var t=e.offsetX/a[M].m_iCanvasWidth;var n=e.offsetY/a[M].m_iCanvasHeight;if(e.button===2){a.EventCallback.mouseEvent(5,t,n)}else if(e.button===0){a.EventCallback.mouseEvent(3,t,n)}}});(new Date).getTime();function n(){var e=document.getElementsByTagName("body")[0];var t=document.getElementsByTagName("html")[0];switch(window.orientation){case-90:case 90:setTimeout(function(){a.JS_FullScreenDisplay(true);t.style["overflow-y"]="hidden";t.style["height"]="100%";e.style["overflow-y"]="hidden";e.style["height"]="100%"},200);break;case 0:case 180:setTimeout(function(){a.JS_CancelFullScreenDisplay(true);t.style["overflow-y"]="auto";e.style["overflow-y"]="auto"},200);break}}window.addEventListener("orientationchange",n,false)});if(typeof document.fullScreen!=="undefined"){document.addEventListener("fullscreenchange",function(){var e=document.fullscreen||false;a.EventCallback.windowFullCcreenChange(e)})}else if(typeof document.webkitIsFullScreen!=="undefined"){document.addEventListener("webkitfullscreenchange",function(){var e=document.webkitIsFullScreen||false;a.EventCallback.windowFullCcreenChange(e)})}else if(typeof document.mozFullScreen!=="undefined"){document.addEventListener("mozfullscreenchange",function(){var e=document.mozFullScreen||false;a.EventCallback.windowFullCcreenChange(e)})}}},{key:"updateWnd",value:function e(){var t=this;var n=t.oJSPlugin.find("."+t[C].szId+"parent-wnd").eq(0).children().length;var i=t.iWidth%t[C].iCurrentSplit;var r=t.iHeight%t[C].iCurrentSplit;var a=(t.iWidth-i-t[C].iCurrentSplit*2)/t[C].iCurrentSplit;var o=(t.iHeight-r-t[C].iCurrentSplit*2)/t[C].iCurrentSplit;var s=(t.iWidth-i)/t[C].iCurrentSplit;var l=(t.iHeight-r)/t[C].iCurrentSplit;var u=t[C].iCurrentSplit;for(var f=0;f<n;f++){var c=a+(f%u===u-1?i:0);var d=o+(f+u>=Math.pow(u,2)?r:0);var h=s+(f%u===u-1?i:0);var p=l+(f+u>=Math.pow(u,2)?r:0);t.oJSPlugin.find("."+t[C].szId+"parent-wnd").eq(0).children().eq(f).width(h);t.oJSPlugin.find("."+t[C].szId+"parent-wnd").eq(0).children().eq(f).height(p);t.oJSPlugin.find("."+t[C].szId+"parent-wnd").eq(0).children().eq(f).find("."+t[C].szId+"draw-window").attr("width",c);t.oJSPlugin.find("."+t[C].szId+"parent-wnd").eq(0).children().eq(f).find("."+t[C].szId+"draw-window").attr("height",d);t.oJSPlugin.find("."+t[C].szId+"parent-wnd").eq(0).children().eq(f).find("."+t[C].szId+"play-window").attr("width",h);t.oJSPlugin.find("."+t[C].szId+"parent-wnd").eq(0).children().eq(f).find("."+t[C].szId+"play-window").attr("height",p)}}},{key:"cbPlayCtrlCallback",value:function e(t,p,v,n,i,r,m){var y=this;if(!(0,O["default"])("#"+y[T][v].windowID).length){return}var a=false;if(n&&i){a=true}y[T][v].bLoad=true;if(y.EventCallback&&y.EventCallback.openStreamCallback){y.EventCallback.openStreamCallback()}y.oStreamClient.openStream(t,p,function(e){if(e.errorCode&&e.errorCode!="1"){if(y.EventCallback&&y.EventCallback.pluginErrorHandler){y.EventCallback.pluginErrorHandler(v,e.errorCode,e);m(e)}}if(e.bHead&&!y[T][v].bPlay){console.log(y.EventCallback);if(y.EventCallback&&y.EventCallback.getStreamHeaderCallback){y.EventCallback.getStreamHeaderCallback()}y.firstGetData=true;y[T][v].bPlay=true;y.bPlay=true;y[T][v].aHead=new Uint8Array(e.buf);y[T][v].oPlayCtrl.PlayM4_OpenStream(e.buf,b,1024*1024*2);try{var t=function e(t,n){var i=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i");var r=n.match(i);if(r!=null){return unescape(r[2])}return null};var n=t("begin",p.playURL);var i=parseInt(n.slice(0,4));var r=parseInt(n.slice(4,6));var a=parseInt(n.slice(6,8));var o=parseInt(n.slice(9,11));var s=parseInt(n.slice(11,13));var l=parseInt(n.slice(13,15))+3;console.log("设置OSD时间: ",i+":"+r+":"+a+":"+o+":"+s+":"+l+":"+0);y[T][v].oPlayCtrl.PlayM4_SetGlobalBaseTime(i,r,a,o,s,l,0)}catch(e){console.log("PlayM4_SetGlobalBaseTime:",e)}if(y[T][v].szSecretKey!==""){y[T][v].oPlayCtrl.PlayM4_SetSecretKey(1,y[T][v].szSecretKey,128)}if(y[T][v].aHead[8]===4){console.log("PlayM4_SetStreamOpenMode:0");y[T][v].oPlayCtrl.PlayM4_SetStreamOpenMode(0)}else{console.log("PlayM4_SetStreamOpenMode:1");y[T][v].oPlayCtrl.PlayM4_SetStreamOpenMode(1)}var u=y[T][v].oPlayCtrl.PlayM4_SetRunTimeInfoCallBackEx(1,function(e,t,n,i,r){if(y.EventCallback&&y.EventCallback.setRunTimeInfoCallBack){y.EventCallback.setRunTimeInfoCallBack(e,t,n,i,r)}});console.log("错误实时信息回调:",u);y[T][v].oPlayCtrl.PlayM4_SetInputBufSize(P);y[T][v].oPlayCtrl.PlayM4_Play(y[T][v].windowID)}else{var f=new Uint8Array(e.buf);var c=y[T][v].oPlayCtrl.PlayM4_GetInputBufSize();var d=y[T][v].oPlayCtrl.PlayM4_GetYUVBufSize();var h=y[T][v].oPlayCtrl.PlayM4_GetDecodeFrameType();if(c>P*.5&&c<P*.8&&y[T][v].iRate===1){if(h!==S&&!y[T][v].bFrameForward){y[T][v].oPlayCtrl.PlayM4_SetDecodeFrameType(S);y.EventCallback.performanceLack()}}if(d>10&&d<15&&!y[T][v].bFrameForward){if(h!==S){y[T][v].oPlayCtrl.PlayM4_SetDecodeFrameType(S);y.EventCallback.performanceLack()}}if(d<10&&c<P*.5){if(h!==g&&y[T][v].iRate===1){y[T][v].oPlayCtrl.PlayM4_SetDecodeFrameType(g)}}if(e.statusString){y.EventCallback.pluginErrorHandler(v,w,e)}else if(e.type&&e.type==="exception"){y.EventCallback.pluginErrorHandler(v,_,e)}else{if(y.firstGetData){y.firstGetData=false;console.log("第一次获取数据-----------6");if(y.EventCallback&&y.EventCallback.getVideoStreamCallback){y.EventCallback.getVideoStreamCallback()}}y[T][v].oPlayCtrl.PlayM4_InputData(f,f.length)}if(!y[T][v].bFirstFrame&&e.errorCode&&e.errorCode=="1"){y[T][v].oPlayCtrl.PlayM4_GetFrameResolution(function(e,t){if(e!=0&&t!=0){console.log("iWidth--------",e);console.log("iHeight--------",t);y[T][v].bFirstFrame=true;y.EventCallback.firstFrameDisplay(v,e,t);if(y.EventCallback&&y.EventCallback.appearFirstFrameCallback){y.EventCallback.appearFirstFrameCallback()}if(y.EventCallback&&y.EventCallback.averageStreamSuccessCallback){y.EventCallback.averageStreamSuccessCallback()}}})}}if(y[T][v].szStorageUUID){y.oStorageManager.inputData(y[T][v].szStorageUUID,e.buf)}e=null},function(){}).then(function(e){y[T][v].szStreamUUID=e;y.oStreamClient.startPlay(e,n,i).then(function(){if(a){y[T][v].szPlayType="playback";y[T][v].iRate=1;y[T][v].oPlayCtrl.PlayM4_PlayRate(y[T][v].iRate)}else{y[T][v].szPlayType="realplay"}r()},function(e){m(e)})},function(e){m(e)})}},{key:"cbPlayIMGCallback",value:function e(t,n,i,r,a,o,s){var l=this;if(!(0,O["default"])("#"+l[T][i].windowID).length){return}l[T][i].bPlay=true;l.bPlay=true;l.oStreamClient.openStream(t,n,function(e){if(!e.bHead){var t=new Blob([e.buf],{type:"image/jpeg"});var n=URL.createObjectURL(t);if((0,O["default"])("#"+l[C].szId+"canvas"+i).length){document.getElementById(l[C].szId+"canvas"+i).src=n}}},function(){if(l[T][i].bPlay){l.EventCallback.pluginErrorHandler(i,u);l[T][i].bPlay=false;var e=l[T][i].oPlayCtrl.PlayM4_GetInputBufSize();console.log("PlayM4_GetInputBufSize2:::",e);l.bPlay=false}}).then(function(e){l[T][i].szStreamUUID=e;l.oStreamClient.startPlay(e,r,a).then(function(){l[T][i].szPlayType="realplay";o()},function(e){s(e)})},function(e){s(e)})}},{key:"JS_UpdateWindowStyle",value:function e(t){var n=this;this[C].oStyle=t;n.updateWnd()}},{key:"JS_GetPluginVersion",value:function e(){var t=this;return t[I]}},{key:"JS_ArrangeWindow",value:function e(t){var n=this;if(t<n[C].iMaxSplit){n[C].iCurrentSplit=t}else{n[C].iCurrentSplit=n[C].iMaxSplit}if(z.oTool.isFirefox()){for(var i=0;i<n[C].iMaxSplit*n[C].iMaxSplit;i++){if(n[T][i].oPlayCtrl){n[T][i].oPlayCtrl.PlayM4_ClearCanvas()}}}n.updateWnd();n.EventCallback.windowEventSelect(0)}},{key:"JS_SetSecretKey",value:function e(t,n){if(t<0){return-1}if(n===""||typeof n==="undefined"){return-1}this[T][t].szSecretKey=n;return 0}},{key:"JS_Play",value:function e(i,r,a,o,s){console.log("JS_Play");var l=this;l.playURL=r.playURL;l.szUrl=i;var t=new Promise(function(t,n){if(a<0||a>l[D]-1){n();return}if(l[T][a].bFrameForward){n();return}if(l[T][a].bPlay){l.JS_Stop(a)}if(l[C].iMode===0){setTimeout(function(){l[T][a].bFirstFrame=false;l[T][a].iDecodeType=g;if(l[T][a].oPlayCtrl){l.cbPlayCtrlCallback(i,r,a,o,s,t,n)}else{l[T][a].oPlayCtrl=new A.JSPlayCtrl(l[C].szBasePath+"/playctrl/",function(e){if(e.cmd==="loaded"&&!l[T][a].bLoad){l.cbPlayCtrlCallback(i,r,a,o,s,t,n)}else if(e.cmd==="OnebyOne"){if(!e.status){if(!l[T][a].bPause){l.oStreamClient.pause(l[T][a].szStreamUUID);l[T][a].bPause=true}}else{if(l[T][a].bPause){l.oStreamClient.resume(l[T][a].szStreamUUID);l[T][a].bPause=false}}}else if(e.cmd==="GetFrameData");},a,l.staticPath)}},200)}else if(l[C].iMode===1);else if(l[C].iMode===2){var e=(0,O["default"])("."+l[C].szId+"play-window").eq(a);e.show();l.cbPlayIMGCallback(i,r,a,o,s,t,n)}});return t}},{key:"JS_Seek",value:function e(n,i,r){var a=this;var t=new Promise(function(e,t){if(n<0||n>a[D]-1){t();return}if(!a[T][n].bPlay){t();return}console.log("seek,清理缓存");a[T][n].oPlayCtrl.aVideoYUVBuffer.splice(0,a[T][n].oPlayCtrl.aVideoYUVBuffer.length);a.oStreamClient.seek(a[T][n].szStreamUUID,i,r);e()});return t}},{key:"JS_GetSdkVersion",value:function e(){var t=this;return t[T][0].oPlayCtrl.PlayM4_GetSdkVersion()}},{key:"JS_isInited",value:function e(){var t=this;return t[T][0].bLoad}},{key:"JS_SetLostFrameMode",value:function e(t){var n=this;return n[T][0].oPlayCtrl.PlayM4_SetLostFrameMode(t)}},{key:"JS_DestroyWorker",value:function e(){var t=this;t[T].forEach(function(e){if(e.bPlay){e.oPlayCtrl.PlayM4_CloseStream()}if(e.oPlayCtrl){e.oPlayCtrl.PlayM4_Destroy();e.oPlayCtrl=null;e.bLoad=false}});if(t[M]){t[M].setShapeType("")}}},{key:"JS_Stop",value:function e(n){var i=this;var t=new Promise(function(t,e){if(n<0||n>i[D]-1){e();return}if(i[T][n].szStorageUUID){i.JS_StopSave(n)}if(i[T][n].bEZoom){i.JS_DisableZoom(n)}if(i[c]===n){i[c]=-1}i.oStreamClient.stopAll(i[T][n].szStreamUUID).then(function(){i[T][n].bPlay=false;i.bPlay=false;i[T][n].bFrameForward=false;i[T][n].iRate=1;if(i[C].iMode===0){if(i[T][n].oPlayCtrl){i[T][n].oPlayCtrl.PlayM4_Stop&&i[T][n].oPlayCtrl.PlayM4_Stop();i[T][n].oPlayCtrl.PlayM4_CloseStream&&i[T][n].oPlayCtrl.PlayM4_CloseStream()}}else if(i[C].iMode===2){var e=(0,O["default"])("."+i[C].szId+"play-window").eq(n);e.hide()}setTimeout(function(){t()},500)},function(){setTimeout(function(){e()},500)})});return t}},{key:"JS_Pause",value:function e(o,s){console.log("JS_Pause");var l=this;var t=new Promise(function(r,a){if(o<0||o>l[D]-1){a();return}if(l[T][o].szStorageUUID){l.JS_StopSave(o)}var e=function e(t){if(t.fileUint8Array){console.log("暂停缓存截图数据 start",t.fileUint8Array);l[T][o].tmpCapturePictureData=t.fileUint8Array}};l.JS_CapturePicture(0,""+(new Date).getTime(),"JPEG",e,true).then(function(){})["catch"](function(e){return console.log(e)});if(!l[T][o].bPlay){a();return}if(l[T][o].bFrameForward){a();return}l.JS_GetOSDTime(0).then(function(e){var t=new Date(e*1e3);var n=""+t.getFullYear()+(t.getMonth()>8?t.getMonth()+1:"0"+(t.getMonth()+1))+(t.getDate()>9?t.getDate():"0"+t.getDate())+(t.getHours()>9?t.getHours():"0"+t.getHours())+(t.getMinutes()>9?t.getMinutes():"0"+t.getMinutes())+(t.getSeconds()>9?t.getSeconds():"0"+t.getSeconds());l[T][o].pauseTime=n;l[T][o].pauseDate=t.valueOf();if(s){l.oStreamClient.stopAll(l[T][o].szStreamUUID).then(function(){l[T][o].bPlay=false;l.bPlay=false;l[T][o].bFrameForward=false;l[T][o].iRate=1;if(l[C].iMode===0){if(l[T][o].oPlayCtrl){l[T][o].oPlayCtrl.PlayM4_Stop&&l[T][o].oPlayCtrl.PlayM4_Stop();l[T][o].oPlayCtrl.PlayM4_CloseStream&&l[T][o].oPlayCtrl.PlayM4_CloseStream()}}else if(l[C].iMode===2){var e=(0,O["default"])("."+l[C].szId+"play-window").eq(o);e.hide()}setTimeout(function(){l[T][o].bPause=true;r({pauseDate:t})},500)},function(){setTimeout(function(){a()},500)})}else{l[T][o].bPlay=false;l.bPlay=false;if(l[C].iMode===0){if(l[T][o].oPlayCtrl){l[T][o].oPlayCtrl.PlayM4_Pause&&l[T][o].oPlayCtrl.PlayM4_Pause(true)}}else if(l[C].iMode===2){var i=(0,O["default"])("."+l[C].szId+"play-window").eq(o);i.hide()}setTimeout(function(){l[T][o].bPause=true;r({pauseDate:t})},500)}})["catch"](function(e){a()})});return t}},{key:"JS_Resume",value:function e(r){console.log("JS_Resume");var a=0;var o=this;var t=new Promise(function(t,n){if(a>o[D]-1){n();return}if(r){if(o[T][a].pauseTime){o[T][a].pauseTime=o[T][a].pauseTime.slice(0,14-r.length)+r}else{o[T][a].pauseTime=r}}if(o.playURL.indexOf("playback")!==-1){var e=o[T][a].pauseTime;console.log("pauseTime",e);o.playURL=o.playURL.replace(/begin=[0-9]{8}T[0-9]{6}Z/gi,"begin="+e.slice(0,8)+"T"+e.slice(8,14)+"Z")}if(o.playURL.indexOf("cloudplayback")!==-1){var i=o[T][a].pauseDate;o.playURL=o.playURL.replace(/"startTime":[0-9]{13}/gi,'"startTime":'+i);console.log("playURL:",o.playURL)}if(r){o.JS_Play(o.szUrl,{playURL:o.playURL},a).then(function(e){t(e)})["catch"](function(e){n(e)});o[T][a].bPause=false}else{if(o[T][a].oPlayCtrl){o[T][a].oPlayCtrl.PlayM4_Pause&&o[T][a].oPlayCtrl.PlayM4_Pause(false)}o[T][a].bPause=false;o[T][a].bPlay=true;o.bPlay=true;t()}});return t}},{key:"JS_Slow",value:function e(n){var i=this;var t=new Promise(function(e,t){if(n<0||n>i[D]-1){t();return}if(!i[T][n].bPlay){t();return}if(i[T][n].iRate===-8){t();return}if(i[T][n].bFrameForward){t();return}if(i[T][n].iRate<0&&i[T][n].iRate>-8){i[T][n].iRate*=2}if(i[T][n].iRate===1){i[T][n].iRate*=-2}if(i[T][n].iRate>1){i[T][n].iRate/=2}i.oStreamClient.setPlayRate(i[T][n].szStreamUUID,i[T][n].iRate).then(function(){if(i[T][n].iRate<2){i[T][n].oPlayCtrl.PlayM4_SetDecodeFrameType(g)}else{console.log("单线程倍速,只解析I帧",i[T][n].iRate);i[T][n].oPlayCtrl.PlayM4_SetDecodeFrameType(S);i[T][n].oPlayCtrl.PlayM4_SetIFrameDecInterval(0)}i[T][n].oPlayCtrl.PlayM4_PlayRate(i[T][n].iRate);e()},function(e){t(e)})});return t}},{key:"JS_Fast",value:function e(n,i){var r=this;var t=new Promise(function(e,t){if(n<0||n>r[D]-1){t();return}if(!r[T][n].bPlay){t();return}if(i){switch(i){case 1:case 2:case 4:r[T][n].iRate=i;break;case 3:r[T][n].iRate=3;break;default:r[T][n].iRate=this.iRate;break}}else{if(r[T][n].bFrameForward){t();return}if(r[T][n].iRate===8){t();return}if(r[T][n].iRate===-2){r[T][n].iRate=1}else if(r[T][n].iRate<-2){r[T][n].iRate/=2}else if(r[T][n].iRate>0&&r[T][n].iRate<8){r[T][n].iRate*=2}}r.oStreamClient.setPlayRate(r[T][n].szStreamUUID,r[T][n].iRate).then(function(){if(r[T][n].iRate<2){console.log("单线程倍速,全解析",r[T][n].iRate);r[T][n].oPlayCtrl.PlayM4_SetDecodeFrameType(g)}else{console.log("单线程倍速,只解析I帧",r[T][n].iRate);r[T][n].oPlayCtrl.PlayM4_SetDecodeFrameType(S);if(r[T][n].iRate===8){r[T][n].oPlayCtrl.PlayM4_SetIFrameDecInterval(2)}else{r[T][n].oPlayCtrl.PlayM4_SetIFrameDecInterval(0)}}r[T][n].oPlayCtrl.PlayM4_PlayRate(r[T][n].iRate);e()},function(e){t(e)})});return t}},{key:"JS_Speed",value:function e(n){var i=this;var r=0;var t=new Promise(function(e,t){if(r>i[D]-1){t();return}if(!i[T][r].bPlay){t();return}if(i[T][r].bFrameForward){t();return}if(i[T][r].iRate===8){t();return}i[T][r].iRate=n;i.oStreamClient.setPlayRate(i[T][r].szStreamUUID,i[T][r].iRate).then(function(){if(i[T][r].iRate<=2||i[T][r].iRate===3){console.log("单线程倍速,全解",i[T][r].iRate);i[T][r].oPlayCtrl.PlayM4_SetDecodeFrameType(g)}else{console.log("单线程倍速,只解析I帧",i[T][r].iRate);i[T][r].oPlayCtrl.PlayM4_SetDecodeFrameType(S)}i[T][r].oPlayCtrl.PlayM4_PlayRate(i[T][r].iRate);e()},function(e){t(e)})});return t}},{key:"JS_Transmission",value:function e(i,r){var a=this;var t=new Promise(function(t,n){if(i<0||i>a[D]-1){n();return}if(!a[T][i].szStreamUUID){n();return}a.oStreamClient.transmission(a[T][i].szStreamUUID,r).then(function(e){t(e)},function(e){n(e)})});return t}},{key:"JS_FrameForward",value:function e(n){var i=this;var t=new Promise(function(e,t){if(n<0||n>i[D]-1){t();return}if(!i[T][n].bPlay){t();return}if(i[T][n].iRate!==1){i[T][n].iRate=1;i[l]=i[T][n].iRate;i.oStreamClient.setPlayRate(i[T][n].szStreamUUID,i[T][n].iRate).then(function(){i[T][n].oPlayCtrl.PlayM4_PlayRate(i[T][n].iRate);i[T][n].oPlayCtrl.PlayM4_SetDecodeFrameType(g);i[T][n].oPlayCtrl.PlayM4_OneByOne();i[T][n].bFrameForward=true},function(e){t(e)})}else{i[T][n].oPlayCtrl.PlayM4_PlayRate(i[T][n].iRate);i[T][n].oPlayCtrl.PlayM4_SetDecodeFrameType(g);i[T][n].oPlayCtrl.PlayM4_OneByOne();i[T][n].bFrameForward=true}e()});return t}},{key:"JS_GetOSDTime",value:function e(n){var r=this;var t=new Promise(function(i,e){if(n<0||n>r[D]-1){e(s);return}if(!r[T][n].bPlay){e(s);return}var t=r[T][n].oPlayCtrl.PlayM4_GetOSDTime(function(e){var t=z.oTool.isIOS()||z.oTool.isSafari()||z.oTool.isEdge()?"/":" ";var n=Date.parse(e.replace(/-/g,t))/1e3;i(n)});if(t!==0){e(s);return}});return t}},{key:"JS_OpenSound",value:function e(t){var n=this;if(t<0||t>n[D]-1){return s}if(!n[T][t].bPlay){return s}if(n[c]===t){return s}if(n[c]!==-1){n[T][n[c]].oPlayCtrl.PlayM4_StopSound()}if(n[T][t].oPlayCtrl.PlayM4_PlaySound(t)!==1){return s}n[c]=t;return o}},{key:"JS_GetVolume",value:function e(t,n){var i=this;var r=i[T][t].oPlayCtrl.PlayM4_GetVolume(function(e){if(n){n(e)}});return r}},{key:"JS_SetVolume",value:function e(t,n){var i=this;if(i[T][t].oPlayCtrl.PlayM4_SetVolume(n)!==0){return s}return o}},{key:"JS_CloseSound",value:function e(){var t=this;var n=t[c];if(n<0||n>t[D]-1){return s}if(!t[T][n].bPlay){return s}if(t[T][n].oPlayCtrl.PlayM4_StopSound()!==1){return s}t[c]=-1;return o}},{key:"JS_EnableZoom",value:function e(t){var n=this;if(t<0||t>n[D]-1){return s}if(!n[T][t].bPlay){return s}(0,O["default"])("."+n[C].szId+"draw-window").unbind();this[M]=new F.ESCanvas(n[C].szId+"canvas_draw0");this[M].setShapeType("Rect");this[M].setDrawStyle("#ff0000","",0);this[M].setDrawStatus(true,function(e){if(e.startPos&&e.endPos){if(e.startPos[0]>e.endPos[0]){n[T][t].oPlayCtrl.PlayM4_SetDisplayRegion(null,false)}else{n[T][t].oPlayCtrl.PlayM4_SetDisplayRegion({left:e.startPos[0],top:e.startPos[1],right:e.endPos[0],bottom:e.endPos[1]},true)}}});n[T][t].bEZoom=true;return o}},{key:"JS_DisableZoom",value:function e(t){var n=this;if(t<0||t>n[D]-1){return s}if(!n[T][t].bPlay){return s}this[M].setDrawStatus(false);if(this[T][t].oPlayCtrl.PlayM4_SetDisplayRegion(null,false)!==0){return s}this[T][t].bEZoom=false;return o}},{key:"JS_Enable3DZoom",value:function e(t,n){var i=this;if(t<0||t>i[D]-1){return s}if(!i[T][t].bPlay){return s}var r=this._JSPlayM4_GetFrameInfo();this._JSPlayM4_SetDisplayRegion(0,r.width,0,r.height);(0,O["default"])("."+i[C].szId+"draw-window").unbind();this[x]=n;this[M]=new F.ESCanvas(i[C].szId+"canvas_draw0");this[M].setShapeType("Rect");this[M].setDrawStyle("#ff0000","",0);this[M].setDrawStatus(true,function(e){n(e)});this.b3DZoom=true;return o}},{key:"JS_Disable3DZoom",value:function e(t){var n=this;if(t<0||t>n[D]-1){return s}if(!n[T][t].bPlay){return s}this[M].setDrawStatus(false);this.b3DZoom=false;return o}},{key:"JS_CapturePicture",value:function e(r,a,o,s,l){var u=this;return new Promise(function(t,n){if(r<0||r>u[D]-1){n({code:-1,msg:"窗口号错误"});return}if(!u[T][r].bPlay&&u[T][r].bPause&&u[T][r].tmpCapturePictureData){console.log("不在播放状态,使用缓存的截图");i(u[T][r].tmpCapturePictureData);t({code:1,data:i(u[T][r].tmpCapturePictureData)})}if(!u[T][r].bPlay){n({code:-1,msg:"获取图片数据失败!"});return}if(!o){o="JPEG"}if(o==="BMP"){u[T][r].oPlayCtrl.PlayM4_GetBMP(function(e){if(e===6){n({code:-1,msg:"获取图片数据失败!"})}else{if(s){s(e)}else{z.oTool.downloadFile(e,a+".BMP")}t({code:1,data:{fileName:a+".BMP",fileUint8Array:e}})}})}else if(o==="JPEG"){try{u[T][r].oPlayCtrl.PlayM4_GetJPEG(function(e){if(e===6){n({code:f,msg:"内存不足,抓图失败"})}else{t({code:1,data:i(e)})}})}catch(e){console.log("JS_CapturePicture error",e)}}function i(e){var t=function e(t){var n=new Uint8Array(t);var i="";for(var r=0;r<n.length;r++){i+=String.fromCharCode(n[r])}return"data:image/jpeg;base64,"+window.btoa(i)};var n={fileName:a+".jpeg",fileUint8Array:e,base64:t(e)};if(s){s(n);if(!l){z.oTool.downloadFile(e,a+".jpeg")}}else{z.oTool.downloadFile(e,a+".jpeg")}return n}})}},{key:"JS_StopRealPlayAll",value:function e(){var n=this;n.oStreamClient.stopAll();n[T].forEach(function(e,t){if(e.bPlay){if(e.szStorageUUID){n.JS_StopSave(t)}if(e.bEZoom){n.JS_DisableZoom(t)}if(n[C].iMode===0){e.oPlayCtrl.PlayM4_Stop();e.oPlayCtrl.PlayM4_CloseStream()}else if(n[C].iMode===2){(0,O["default"])("."+n[C].szId+"play-window").hide()}}e.bPlay=false});n.bPlay=false;n[c]=-1}},{key:"JS_StartSave",value:function e(a,o,s){var l=this;var t=new Promise(function(t,e){var n=0;if(s){n=s.iPackage}if(a<0||a>l[D]-1){e();return}if(!l[T][a].bPlay){e();return}if(o.indexOf(".mp4")<0){o=o+".mp4"}var i=l[T][a].aHead;var r=0;if(l[T][a].szPlayType==="playback"){r=1}l.oStorageManager.startRecord(o,i,2,r,{cbEventHandler:function e(t){l.EventCallback.pluginErrorHandler(a,t)},iPackage:n}).then(function(e){l[T][a].szStorageUUID=e;t()},function(){e()})});return t}},{key:"JS_StopSave",value:function e(n){var i=this;var t=new Promise(function(e,t){if(!i[T][n].szStorageUUID){t();return}i.oStorageManager.stopRecord(i[T][n].szStorageUUID).then(function(){i[T][n].szStorageUUID="";e()},function(e){t(e)})});return t}},{key:"JS_GetLocalConfig",value:function e(){return""}},{key:"JS_SetLocalConfig",value:function e(){return 0}},{key:"JS_SetGridInfo",value:function e(t){if(t===null||typeof t==="undefined"){return-1}var n="#ff0000";if(t.drawColor){n=t.drawColor}this[M].setDrawStyle(n);this[M].setShapesInfoByType("Grid",[{szGridMap:t.gridMap,iGridColNum:t.gridColNum,iGridRowNum:t.gridRowNum}]);return 0}},{key:"JS_GetGridInfo",value:function e(){if(!this[M]){return{}}var t=this[M].getShapesInfoByType("Grid")[0];if(!t){return{iGridRowNum:18,iGridColNum:22,szGridMap:""}}return{gridColNum:t.iGridColNum,gridRowNum:t.iGridRowNum,gridMap:t.szGridMap}}},{key:"JS_SetDrawShapeInfo",value:function e(t,n){if(typeof t==="undefined"||t===""){return-1}this[M].setShapeType(t);this[M].setDrawStyle(n.szDrawColor||"",n.szFillColor||"",n.iTranslucent||0);if(n.iMaxShapeSupport&&n.iMaxShapeSupport>0){this[M].setMaxShapeSupport(n.iMaxShapeSupport)}if(n.iMaxShapeSupport>0){this[M].setCurrentShapeInfo({szId:"",szTips:n.szTips||"",iMinClosed:3,iMaxPointNum:n.iMaxPointSupport,iPolygonType:1,szDrawColor:n.szDrawColor||"",szFillColor:n.szFillColor||"",iTranslucent:n.iTranslucent||0})}}},{key:"JS_SetPolygonInfo",value:function e(t){if(typeof t==="undefined"||!t.length){return-1}var n=[];if(t.length>0){for(var i=0,r=t.length;i<r;i++){var a=t[i].aPoint;if(a.length>0){n.push(t[i])}}}if(n.length>0){this[M].setShapesInfoByType("Polygon",n);return 0}return-1}},{key:"JS_GetPolygonInfo",value:function e(){var t=[];var n=this[M].getShapesInfoByType("Polygon");for(var i=0,r=n.length;i<r;i++){var a=n[i];var o={aPoint:a.aPoint,bClosed:a.bClosed,szTips:a.szTips};t.push(o)}return t}},{key:"JS_SetLineInfo",value:function e(t){if(typeof t==="undefined"||!t.length){return-1}var n=[];if(t.length>0){for(var i=0,r=t.length;i<r;i++){var a=t[i].aPoint;if(a.length>0){n.push(t[i])}}}if(n.length>0){this[M].setShapesInfoByType("Line",n);return 0}return-1}},{key:"JS_GetLineInfo",value:function e(){var t=[];var n=this[M].getShapesInfoByType("Line");for(var i=0,r=n.length;i<r;i++){var a=n[i];var o={iLineType:a.iLineType,aPoint:a.aPoint,szTips:a.szTips};t.push(o)}return t}},{key:"JS_SetRectInfo",value:function e(t){if(typeof t==="undefined"||!t.length){return-1}var n=[];if(t.length>0){for(var i=0,r=t.length;i<r;i++){var a=t[i].aPoint;if(a.length>0){n.push(t[i])}}}if(n.length>0){this[M].setShapesInfoByType("Rect",n);return 0}return-1}},{key:"JS_GetRectInfo",value:function e(){var t=[];var n=this[M].getShapesInfoByType("Rect");for(var i=0,r=n.length;i<r;i++){var a=n[i];var o={aPoint:a.aPoint,szTips:a.szTips};t.push(o)}return t}},{key:"JS_SetRegionInfo",value:function e(t){var a=this;this[M].clearAllShape();var n=z.oTool.parseXmlFromStr(t);this[M].setDrawStyle("#ff0000","#343434",.3);if((0,O["default"])(n).find("DetectionRegionInfo").length>0){this[M].setShapeType("Rect");var i=parseInt((0,O["default"])(n).find("MaxRegionNum").eq(0).text(),10);this[M].setMaxShapeSupport(i);this[M].m_szDisplayMode=(0,O["default"])(n).find("DisplayMode").eq(0).text();this[M].m_szVideoFormat=(0,O["default"])(n).find("videoFormat").eq(0).text();this[M].m_iHorizontalResolution=parseInt((0,O["default"])(n).find("HorizontalResolution").eq(0).text(),10);this[M].m_iVerticalResolution=parseInt((0,O["default"])(n).find("VerticalResolution").eq(0).text(),10);var o=[];(0,O["default"])(n).find("DetectionRegion").each(function(){var e=[];for(var t=0,n=(0,O["default"])(this).find("positionX").length;t<n;t++){var i=Math.round((0,O["default"])(this).find("positionX").eq(t).text())*a[M].m_iCanvasWidth/a[M].m_iHorizontalResolution;var r=(a[M].m_iVerticalResolution-Math.round((0,O["default"])(this).find("positionY").eq(t).text()))*a[M].m_iCanvasHeight/a[M].m_iVerticalResolution;e.push([i,r])}if(e.length>0&&!(e[0][0]===0&&e[1][0]===0&&e[2][0]===0&&e[3][0]===0)){o.push({aPoint:e,iEditType:a[M].m_szDisplayMode==="transparent"?1:0,szDrawColor:"#ff0000",szFillColor:"#343434",iTranslucent:.3})}});this[M].setShapesInfoByType("Rect",o)}else if((0,O["default"])(n).find("MoveDetection").length>0){this[M].setShapeType("Grid");var r=parseInt((0,O["default"])(n).find("columnGranularity").eq(0).text(),10);var s=parseInt((0,O["default"])(n).find("rowGranularity").eq(0).text(),10);var l=(0,O["default"])(n).find("gridMap").eq(0).text();this[M].setShapesInfoByType("Grid",[{szGridMap:l,iGridColNum:r,iGridRowNum:s}])}return 0}},{key:"JS_GetRegionInfo",value:function e(){if(!this[M]){return""}var t=this[M].getShapeType();var n='<?xml version="1.0" encoding="utf-8"?>';if(t==="Rect"){n+="<DetectionRegionInfo>";n+="<videoFormat>"+this[M].m_szVideoFormat+"</videoFormat><RegionType>roi</RegionType>";n+="<ROI><HorizontalResolution>"+this[M].m_iHorizontalResolution+"</HorizontalResolution><VerticalResolution>"+this[M].m_iVerticalResolution+"</VerticalResolution></ROI>";n+="<DisplayMode>"+this[M].m_szDisplayMode+"</DisplayMode><MaxRegionNum>"+this[M].getMaxShapeSupport()+"</MaxRegionNum>";n+="<DetectionRegionList>";var i=this[M].getShapesInfoByType("Rect");for(var r=0,a=i.length;r<a;r++){var o=i[r].aPoint;n+="<DetectionRegion><RegionCoordinatesList>";n+="<RegionCoordinates><positionX>"+Math.round(o[3][0]*this[M].m_iHorizontalResolution/this[M].m_iCanvasWidth)+"</positionX><positionY>"+(this[M].m_iVerticalResolution-Math.round(o[3][1]*this[M].m_iVerticalResolution/this[M].m_iCanvasHeight))+"</positionY></RegionCoordinates>";n+="<RegionCoordinates><positionX>"+Math.round(o[2][0]*this[M].m_iHorizontalResolution/this[M].m_iCanvasWidth)+"</positionX><positionY>"+(this[M].m_iVerticalResolution-Math.round(o[2][1]*this[M].m_iVerticalResolution/this[M].m_iCanvasHeight))+"</positionY></RegionCoordinates>";n+="<RegionCoordinates><positionX>"+Math.round(o[1][0]*this[M].m_iHorizontalResolution/this[M].m_iCanvasWidth)+"</positionX><positionY>"+(this[M].m_iVerticalResolution-Math.round(o[1][1]*this[M].m_iVerticalResolution/this[M].m_iCanvasHeight))+"</positionY></RegionCoordinates>";n+="<RegionCoordinates><positionX>"+Math.round(o[0][0]*this[M].m_iHorizontalResolution/this[M].m_iCanvasWidth)+"</positionX><positionY>"+(this[M].m_iVerticalResolution-Math.round(o[0][1]*this[M].m_iVerticalResolution/this[M].m_iCanvasHeight))+"</positionY></RegionCoordinates>";n+="</RegionCoordinatesList></DetectionRegion>"}n+="</DetectionRegionList>";n+="</DetectionRegionInfo>"}else if(t==="Grid"){var s=this[M].getShapesInfoByType("Grid")[0];if(!s){s={iGridRowNum:18,iGridColNum:22,szGridMap:""}}n+="<MoveDetection><videoFormat>PAL</videoFormat><RegionType>grid</RegionType>";n+="<Grid><rowGranularity>"+s.iGridRowNum+"</rowGranularity><columnGranularity>"+s.iGridColNum+"</columnGranularity></Grid>";n+="<DisplayMode>transparent</DisplayMode>";n+="<gridMap>"+s.szGridMap+"</gridMap></MoveDetection>"}return n}},{key:"JS_SetDrawStatus",value:function e(t){if(!this[M]){return-1}this[M].setDrawStatus(t);return 0}},{key:"JS_ClearRegion",value:function e(){if(!this[M]){return-1}this[M].clearAllShape();return 0}},{key:"JS_GetTextOverlay",value:function e(){if(!this[M]){return""}var t='<?xml version="1.0" encoding="utf-8"?>';t+="<OSD>";t+="<videoResolutionWidth>"+this[M].m_iHorizontalResolution+"</videoResolutionWidth>";t+="<videoResolutionHeight>"+this[M].m_iVerticalResolution+"</videoResolutionHeight>";var n="";var i="";var r="";var a=this[M].getShapesInfoByType("RectOSD");for(var o=0,s=a.length;o<s;o++){var l=a[o];var u=Math.round(l.iPositionX*this[M].m_iHorizontalResolution/this[M].m_iCanvasWidth);var f=Math.round(l.iPositionY*this[M].m_iVerticalResolution/this[M].m_iCanvasHeight);if(l.szOSDType==="overlay-date"){n+="<DateTimeOverlay><Type>"+l.szDateStyle+"</Type>";n+="<clockType>"+l.szClockType+"</clockType>";n+="<displayWeek>"+l.szDisplayWeek+"</displayWeek>";n+="<enabled>"+l.szEnabled+"</enabled>";n+="<alignment>"+l.szAlignment+"</alignment>";n+="<positionX>"+u+"</positionX><positionY>"+f+"</positionY></DateTimeOverlay>"}else if(l.szOSDType==="overlay-ch"){i+="<channelNameOverlay><enabled>"+l.szEnabled+"</enabled>";i+="<ChannelName>"+l.szText+"</ChannelName>";i+="<alignment>"+l.szAlignment+"</alignment>";i+="<positionX>"+u+"</positionX><positionY>"+f+"</positionY></channelNameOverlay>"}else if(l.szOSDType==="overlay-text"){r+="<TextOverlay><id>"+l.szId+"</id><enabled>"+l.szEnabled+"</enabled>";r+="<alignment>"+l.szAlignment+"</alignment>";r+="<displayText>"+l.szText+"</displayText>";r+="<positionX>"+u+"</positionX><positionY>"+f+"</positionY></TextOverlay>"}}t+=n;t+=i;t+="<TextOverlayList>";t+=r;t+="</TextOverlayList>";t+="</OSD>";return t}},{key:"JS_SetTextOverlay",value:function e(t){var o=this;this[M].setMaxShapeSupport(20);var n=z.oTool.parseXmlFromStr(t);this[M].clearShapeByType("RectOSD");if((0,O["default"])(n).find("OSD").length>0){this[M].setDrawStyle("#ff0000","#343434",.7);this[M].m_iHorizontalResolution=parseInt((0,O["default"])(n).find("videoResolutionWidth").eq(0).text(),10);this[M].m_iVerticalResolution=parseInt((0,O["default"])(n).find("videoResolutionHeight").eq(0).text(),10);if((0,O["default"])(n).find("channelNameOverlay").length>0){var i=(0,O["default"])(n).find("channelNameOverlay").eq(0);var r=(0,O["default"])(i).find("ChannelName").eq(0).text();var a=(0,O["default"])(i).find("enabled").eq(0).text();var s=Math.round((0,O["default"])(i).find("positionX").eq(0).text())*this[M].m_iCanvasWidth/this[M].m_iHorizontalResolution;var l=Math.round((0,O["default"])(i).find("positionY").eq(0).text())*this[M].m_iCanvasHeight/this[M].m_iVerticalResolution;var u=(0,O["default"])(i).find("alignment").eq(0).text()||"0";this[M].addOSDShape(r,a,s,l,{szOSDType:"overlay-ch",szAlignment:u})}if((0,O["default"])(n).find("DateTimeOverlay").length>0){var f=(0,O["default"])(n).find("DateTimeOverlay").eq(0);var c=(0,O["default"])(f).find("enabled").eq(0).text();var d=(0,O["default"])(f).find("Type").eq(0).text()||(0,O["default"])(f).find("type").eq(0).text();var h=(0,O["default"])(f).find("displayWeek").eq(0).text();var p=(0,O["default"])(f).find("clockType").eq(0).text();var v="";var m="";var y=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var g=new Date;if(h==="true"){m=y[g.getDay()]}if(p==="24hour"){p=""}else{p="AM/PM"}switch(d){case"0":v="YYYY-MM-DD "+m+" hh:mm:ss "+p;break;case"1":v="MM-DD-YYYY "+m+" hh:mm:ss "+p;break;case"2":v="CHR-YYYY-MM-DD "+m+" hh:mm:ss "+p;break;case"3":v="CHR-MM-DD-YYYY "+m+" hh:mm:ss "+p;break;case"4":v="DD-MM-YYYY "+m+" hh:mm:ss "+p;break;case"5":v="CHR-DD-MM-YYYY "+m+" hh:mm:ss "+p;break}var S=Math.round((0,O["default"])(f).find("positionX").eq(0).text())*this[M].m_iCanvasWidth/this[M].m_iHorizontalResolution;var b=Math.round((0,O["default"])(f).find("positionY").eq(0).text())*this[M].m_iCanvasHeight/this[M].m_iVerticalResolution;var P=(0,O["default"])(f).find("alignment").eq(0).text()||"0";this[M].addOSDShape(v,c,S,b,{szOSDType:"overlay-date",szDateStyle:d,szDisplayWeek:h,szClockType:p,szAlignment:P})}if((0,O["default"])(n).find("TextOverlayList").length>0){(0,O["default"])(n).find("TextOverlayList").eq(0).find("TextOverlay").each(function(){var e=(0,O["default"])(this).find("displayText").eq(0).text();var t=(0,O["default"])(this).find("enabled").eq(0).text();var n=(0,O["default"])(this).find("id").eq(0).text();var i=Math.round((0,O["default"])(this).find("positionX").eq(0).text())*o[M].m_iCanvasWidth/o[M].m_iHorizontalResolution;var r=Math.round((0,O["default"])(this).find("positionY").eq(0).text())*o[M].m_iCanvasHeight/o[M].m_iVerticalResolution;var a=(0,O["default"])(this).find("alignment").eq(0).text()||"0";o[M].addOSDShape(e,t,i,r,{szOSDType:"overlay-text",szId:n,szAlignment:a})})}}return 0}},{key:"JS_ClearSnapInfo",value:function e(t){if(!this[M]){return-1}if(t===0){this[M].clearShapeByType("Rect")}else if(t===1){this[M].clearShapeByType("Polygon")}else if(t===2){this[M].clearShapeByType("Line")}else if(t===3){this[M].clearShapeByType("Rect");this[M].clearShapeByType("Polygon")}else if(t===5){this[M].clearShapeByType("Point")}else{this[M].clearAllShape()}return 0}},{key:"JS_ClearTargetPolygon",value:function e(t){var n=z.oTool.parseXmlFromStr(t);var i=this[M].getAllShapesInfo();var r=i.length;if(r>0){for(var a=0;a<r;a++){var o=(0,O["default"])(n).find("id").eq(0).text();if(i[a].szType==="Polygon"){if(i[a].szId===o){this[M].deleteShape(a);break}}}}}},{key:"JS_SetSnapPolygonInfo",value:function e(t){var d=this;this[M].setShapeType("Polygon");this[M].setMaxShapeSupport(20);this[M].setDrawStyle("#FFFF00","#FFFF00",.1);var n=z.oTool.parseXmlFromStr(t);var i=this[M].getAllShapesInfo();var r=i.length;if(r>0){for(var a=0;a<r;a++){var o=(0,O["default"])(n).find("id").eq(0).text();if(i[a].szType==="Polygon"){if(i[a].szId===o){this[M].deleteShape(a);break}}}}var h=[];if((0,O["default"])(n).find("SnapPolygonList").length>0){(0,O["default"])(n).find("SnapPolygonList").eq(0).find("SnapPolygon").each(function(){var e=(0,O["default"])(this).find("id").eq(0).text();var t=parseInt((0,O["default"])(this).find("polygonType").eq(0).text()||"1",10);var n=(0,O["default"])(this).find("Tips").eq(0).text()||(0,O["default"])(this).find("tips").eq(0).text();var i=parseInt((0,O["default"])(this).find("MinClosed").eq(0).text(),10);var r=parseInt((0,O["default"])(this).find("PointNumMax").eq(0).text(),10);var a=parseInt((0,O["default"])(this).find("EditType").eq(0).text(),10)||parseInt((0,O["default"])(this).find("editType").eq(0).text(),10)||0;var o=(0,O["default"])(this).find("isClosed").eq(0).text()==="true";var s="rgb("+(0,O["default"])(this).find("r").eq(0).text()+","+(0,O["default"])(this).find("g").eq(0).text()+","+(0,O["default"])(this).find("b").eq(0).text()+")";var l=s;var u=.1;var f=parseInt((0,O["default"])(this).find("RedrawMode").eq(0).text(),10)||0;var c=[];(0,O["default"])(this).find("pointList").eq(0).find("point").each(function(e){c[e]=[];c[e][0]=Math.round((0,O["default"])(this).find("x").eq(0).text()*d[M].m_iCanvasWidth);c[e][1]=Math.round((0,O["default"])(this).find("y").eq(0).text()*d[M].m_iCanvasHeight)});if(c.length>0){h.push({szId:e,iPolygonType:t,iMinClosed:i,iMaxPointNum:r,iEditType:a,aPoint:c,bClosed:o,szTips:n,szDrawColor:s,szFillColor:l,iTranslucent:u,iRedrawMode:f});d[M].setDrawStatus(false)}else{d[M].setCurrentShapeInfo({szId:e,szTips:n,iMinClosed:i,iMaxPointNum:r,iPolygonType:t,szDrawColor:s,szFillColor:l,iTranslucent:u,iRedrawMode:f});d[M].setDrawStatus(true)}})}if(h.length>0){this[M].setShapesInfoByType("Polygon",h)}return 0}},{key:"JS_GetSnapPolygonInfo",value:function e(){var t="<?xml version='1.0' encoding='utf-8'?><SnapPolygonList>";var n=this[M].getShapesInfoByType("Polygon");for(var i=0,r=n.length;i<r;i++){var a=n[i];t+="<SnapPolygon>";t+="<id>"+a.szId+"</id>";t+="<polygonType>"+a.iPolygonType+"</polygonType>";t+="<color>";var o=a.szDrawColor.substring(4,a.szDrawColor.length-1).split(",");t+="<r>"+o[0]+"</r>";t+="<g>"+o[1]+"</g>";t+="<b>"+o[2]+"</b>";t+="</color>";t+="<tips>"+a.szTips+"</tips>";t+="<isClosed>"+a.bClosed+"</isClosed>";var s=a.aPoint;t+="<pointList>";for(var l=0,u=s.length;l<u;l++){t+="<point><x>"+(s[l][0]/this[M].m_iCanvasWidth).toFixed(6)+"</x><y>"+(s[l][1]/this[M].m_iCanvasHeight).toFixed(6)+"</y></point>"}t+="</pointList>";t+="</SnapPolygon>"}t+="</SnapPolygonList>";return t}},{key:"JS_SetSnapDrawMode",value:function e(t,n){var i=this;if(!this[M]){return-1}this[M].setDrawMutiShapeOneTime(false);if(t===0&&n===3){i[M].setDrawStatus(false)}return 0}},{key:"JS_SetSnapLineInfo",value:function e(t){var s=this;this[M].setShapeType("Line");this[M].setMaxShapeSupport(20);this[M].setDrawStyle("#FFFF00","#FFFF00",.1);var n=z.oTool.parseXmlFromStr(t);var i=this[M].getAllShapesInfo();var r=i.length;if(r>0){for(var a=0;a<r;a++){var o=(0,O["default"])(n).find("id").eq(0).text();if(i[a].szType==="Line"){if(i[a].szId===o){this[M].deleteShape(a);break}}}}var l=[];if((0,O["default"])(n).find("SnapLineList").length>0){(0,O["default"])(n).find("SnapLineList").eq(0).find("SnapLine").each(function(){var e=(0,O["default"])(this).find("id").eq(0).text();var t=parseInt((0,O["default"])(this).find("LineTypeEx").eq(0).text(),10);var n=parseInt((0,O["default"])(this).find("CustomType").text()||(0,O["default"])(this).find("LineType").text(),10);var i=parseInt((0,O["default"])(this).find("ArrowType").text()||0,10);var r=(0,O["default"])(this).find("Tips").eq(0).text()||(0,O["default"])(this).find("tips").eq(0).text();var a="rgb("+(0,O["default"])(this).find("r").eq(0).text()+","+(0,O["default"])(this).find("g").eq(0).text()+","+(0,O["default"])(this).find("b").eq(0).text()+")";var o=[];o[0]=[];o[1]=[];o[0][0]=Math.round((0,O["default"])(this).find("StartPos").eq(0).find("x").eq(0).text()*s[M].m_iCanvasWidth);o[0][1]=Math.round((0,O["default"])(this).find("StartPos").eq(0).find("y").eq(0).text()*s[M].m_iCanvasHeight);o[1][0]=Math.round((0,O["default"])(this).find("EndPos").eq(0).find("x").eq(0).text()*s[M].m_iCanvasWidth);o[1][1]=Math.round((0,O["default"])(this).find("EndPos").eq(0).find("y").eq(0).text()*s[M].m_iCanvasHeight);if(o.length>0){l.push({szId:e,iLineType:t,aPoint:o,szTips:r,iDirection:n,iArrowType:i,szDrawColor:a});s[M].setDrawStatus(false)}})}if(l.length>0){this[M].setShapesInfoByType("Line",l)}return 0}},{key:"JS_GetSnapLineInfo",value:function e(){var t=this;var n="<?xml version='1.0' encoding='utf-8'?><SnapLineList>";var i=this[M].getShapesInfoByType("Line");for(var r=0,a=i.length;r<a;r++){n+="<SnapLine>";n+="<id>"+i[r].szId+"</id>";n+="<LineTypeEx>"+i[r].iLineType+"</LineTypeEx>";n+="<CustomType>0</CustomType><MoveChange>0</MoveChange><ArrowType>"+i[r].iArrowType+"</ArrowType>";n+="<tips>"+i[r].szTips+"</tips>";var o=i[r].aPoint;n+="<StartPos><x>"+(o[0][0]/t[M].m_iCanvasWidth).toFixed(6)+"</x><y>"+(o[0][1]/t[M].m_iCanvasHeight).toFixed(6)+"</y></StartPos>";n+="<EndPos><x>"+(o[1][0]/t[M].m_iCanvasWidth).toFixed(6)+"</x><y>"+(o[1][1]/t[M].m_iCanvasHeight).toFixed(6)+"</y></EndPos>";n+="<LineSelected>false</LineSelected>";if(i[r].aCrossArrowPoint.length>0){n+="<PDCArrow><Sp_x>"+(i[r].aCrossArrowPoint[0][0]/t[M].m_iCanvasWidth).toFixed(6)+"</Sp_x>";n+="<Sp_y>"+(i[r].aCrossArrowPoint[0][1]/t[M].m_iCanvasWidth).toFixed(6)+"</Sp_y>";n+="<Ep_x>"+(i[r].aCrossArrowPoint[1][0]/t[M].m_iCanvasWidth).toFixed(6)+"</Ep_x>";n+="<Ep_y>"+(i[r].aCrossArrowPoint[1][1]/t[M].m_iCanvasWidth).toFixed(6)+"</Ep_y></PDCArrow>"}n+="<PDCShowMark>false</PDCShowMark>";var s=i[r].szDrawColor.split(",")[0].split("(")[1];var l=i[r].szDrawColor.split(",")[1];var u=i[r].szDrawColor.split(",")[2].split(")")[0];n+="<color><r>"+(s||"255")+"</r><g>"+(l||"255")+"</g><b>"+(u||"0")+"</b></color>";n+="</SnapLine>"}n+="</SnapLineList>";return n}},{key:"JS_GetSnapPointInfo",value:function e(){return""}},{key:"JS_SelectShapeById",value:function e(t,n){if(!t){return-1}this[M].selectShapeById(t,n);return 0}},{key:"JS_DeleteChoosedShape",value:function e(){var t=this[M].getAllShapesInfo();var n=t.length;if(n>0){for(var i=0;i<n;i++){if(t[i].bChoosed){this[M].deleteShape(i);return t[i].szId}}return""}return""}},{key:"JS_SetSnapPointInfo",value:function e(t){var i=this;var n=z.oTool.parseXmlFromStr(t);if((0,O["default"])(n).find("mode").eq(0).text()==="1"){var r=(0,O["default"])(n).find("id").eq(0).text();var a="rgb("+(0,O["default"])(n).find("r").eq(0).text()+","+(0,O["default"])(n).find("g").eq(0).text()+","+(0,O["default"])(n).find("b").eq(0).text()+")";this[M].setShapeType("Point");this[M].setDrawStatus(true);this[M].setMaxShapeSupport(12);i[M].setCurrentShapeInfo({szId:r,szDrawColor:a,iTranslucent:1})}else{var o=[];this[M].clearShapeByType("Point");this[M].setMaxShapeSupport(12);this[M].setDrawStatus(false);if((0,O["default"])(n).find("SnapPointList").length>0){(0,O["default"])(n).find("SnapPointList").eq(0).find("SnapPoint").each(function(){var e=(0,O["default"])(this).find("id").eq(0).text();var t="rgb("+(0,O["default"])(this).find("r").eq(0).text()+","+(0,O["default"])(this).find("g").eq(0).text()+","+(0,O["default"])(this).find("b").eq(0).text()+")";var n=[];n[0]=[];n[0][0]=Math.round((0,O["default"])(this).find("positionX").eq(0).text()*i[M].m_iCanvasWidth);n[0][1]=Math.round((0,O["default"])(this).find("positionY").eq(0).text()*i[M].m_iCanvasHeight);if(n.length>0){o.push({szId:e,aPoint:n,szDrawColor:t,iTranslucent:1})}})}if(o.length>0){this[M].setShapesInfoByType("Point",o)}}return 0}},{key:"JS_FullScreenDisplay",value:function e(t){var n=this;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var i=document.documentElement.clientWidth;var r=document.documentElement.clientHeight;var a=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if(a){i=i*2;r=r*2;n.oJSPlugin.find("."+n[C].szId+"parent-wnd").eq(0).css({width:i,height:r,"z-index":1e4})}var o=document.body;o=(0,O["default"])("#"+n[C].szId).find("canvas#"+n[C].szId+"canvas0")[0];var s="";if(i>=r){s+="width:"+i+"px;";s+="height:"+r+"px;";s+="-webkit-transform: none";s+="-webkit-transform-origin: 0 0;";s+="transform-origin: 0 0;"}else{s+="width:"+r+"px;";s+="height:"+i+"px;";s+="-webkit-transform: rotate(90deg); transform: rotate(90deg);";s+="-webkit-transform-origin: "+i/2+"px "+i/2+"px;";s+="transform-origin: "+i/2+"px "+i/2+"px;"}s+="position: fixed;top: 0;left: 0;z-index:10";o.style.cssText=s;this[h]=t}else{if(t){var l=n.oJSPlugin.get(0);if(l.requestFullScreen){l.requestFullScreen()}else if(l.webkitRequestFullScreen){l.webkitRequestFullScreen()}else if(l.mozRequestFullScreen){l.mozRequestFullScreen()}else if(l.msRequestFullscreen){l.msRequestFullscreen()}else if(l.oRequestFullscreen){l.oRequestFullscreen()}}this[h]=t}}},{key:"JS_CancelFullScreenDisplay",value:function e(){var t=this;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var n=(0,O["default"])("."+t[C].szId+"parent-wnd").parent().eq(0).width();var i=(0,O["default"])("."+t[C].szId+"parent-wnd").parent().eq(0).height();var r=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if(r){n=n*2;i=i*2;t.oJSPlugin.find("."+t[C].szId+"parent-wnd").eq(0).css({width:n,height:i,"z-index":0})}var a=document.body;a=(0,O["default"])("#"+t[C].szId).find("canvas#"+t[C].szId+"canvas0")[0];var o="";if(n>=i){o+="width:"+n+"px;";o+="height:"+i+"px;";o+="-webkit-transform: none";o+="-webkit-transform-origin: 0 0;";o+="transform-origin: 0 0;"}else{o+="width:"+i+"px;";o+="height:"+n+"px;";o+="-webkit-transform: rotate(90deg); transform: rotate(90deg);";o+="-webkit-transform-origin: "+n/2+"px "+n/2+"px;";o+="transform-origin: "+n/2+"px "+n/2+"px;"}a.style.cssText=o}else{if(t.oJSPlugin.find("."+t[C].szId+"parent-wnd").eq(0).width()===(0,O["default"])(window).width()){return}if(document.exitFullscreen){document.exitFullscreen()}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}}this[p]=null;this[h]=false}},{key:"JS_FullScreenSingle",value:function e(t){var n=this;if(!n[T][t].bPlay){return}var i=document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||false;var r=n.oJSPlugin.find("."+n[C].szId+"parent-wnd").eq(0).children().eq(t).get(0);if(!i){if(r.requestFullScreen){r.requestFullScreen()}else if(r.webkitRequestFullScreen){r.webkitRequestFullScreen()}else if(r.mozRequestFullScreen){r.mozRequestFullScreen()}n[p]=n.oJSPlugin.find("."+n[C].szId+"parent-wnd").eq(0).children().eq(t)}else{if(n.oJSPlugin.find("."+n[C].szId+"parent-wnd").eq(0).width()===(0,O["default"])(window).width()){return}if(document.exitFullscreen){document.exitFullscreen()}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}n[p]=null;n[h]=false}}},{key:"JS_StartDownload",value:function e(t,n,i,r){var a=(0,O["default"])(z.oTool.parseXmlFromStr(r)).find("playbackURI").eq(0).text();var o=t+"?playbackURI="+a;var s=".mp4";if(t.indexOf("picture/Streaming/tracks")>0){o=t;s=".jpg"}var l=o.indexOf("&name=")+6;var u=o.indexOf("&size=");i=o.substring(l,u);(0,O["default"])("body").append('<a id="jsplugin_download_a" href="'+o+'" download='+i+s+'><li id="jsplugin_download_li"></li></a>');(0,O["default"])("#jsplugin_download_li").trigger("click");(0,O["default"])("#jsplugin_download_a").remove();return 0}},{key:"JS_Resize",value:function e(t,n,i){var r=this;var a=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if(a){t=t*2;n=n*2}var o=document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||false;if(this[h]&&o){t=(0,O["default"])(window).width();n=(0,O["default"])(window).height();r.oJSPlugin.css({width:t,height:n})}else{r.oJSPlugin.css({width:a?t/2:t,height:a?n/2:n})}var s=document.body;s=(0,O["default"])("#"+r[C].szId).find("canvas#"+r[C].szId+"canvas0")[0];var l="";l+="width:"+t+"px;";l+="height:"+n+"px;";l+="-webkit-transform: none;";l+="-webkit-transform-origin: 0 0;";l+="transform-origin: 0 0;";l+="z-index: 0;";s.style.cssText=l;if(a){var u=document.body;u=(0,O["default"])("#"+r[C].szId).find("canvas#"+r[C].szId+"canvas_draw0")[0];var f="";f+="width:"+t+"px;";f+="height:"+n+"px;";f+="position:absolute; top:0; left:0; z-index:999;";u.style.cssText=f;if(this.b3DZoom){(0,O["default"])("."+r[C].szId+"draw-window").unbind();r[M]=new F.ESCanvas(r[C].szId+"canvas_draw0",i||false);r[M].setShapeType("Rect");r[M].setDrawStyle("#ff0000","",0);r[M].setDrawStatus(true,function(e){r[x](e)})}}this[C].iWidth=t;this[C].iHeight=n;this.iWidth=t;this.iHeight=n;if(z.oTool.isFirefox()){for(var c=0;c<r[C].iMaxSplit*r[C].iMaxSplit;c++){if(r[T][c].oPlayCtrl){r[T][c].oPlayCtrl.PlayM4_ClearCanvas()}}}r.updateWnd();if(r[p]&&o){t=(0,O["default"])(window).width();n=(0,O["default"])(window).height();r[p].css({width:t,height:n});r[p].find("."+r[C].szId+"play-window").attr("width",t);r[p].find("."+r[C].szId+"play-window").attr("height",n);r[p].find("."+r[C].szId+"draw-window").attr("width",t-2);r[p].find("."+r[C].szId+"draw-window").attr("height",n-2)}if(!o){r[p]=null;r[h]=false}if(r[M]){r[M].resizeCanvas&&r[M].resizeCanvas();r[M].canvasRedraw&&r[M].canvasRedraw()}}},{key:"JS_WndCreate",value:function e(t,n,i){var r=this;r.createWindows(n,i);this[M].updateCanvas(r[C].szId+"canvas_draw0");this[M].clearAllShape();if(t===0){r.oJSPlugin.hide()}else{r.oJSPlugin.show()}r.EventCallback.windowEventSelect(0);r.initEvent();r[v]=null}},{key:"JS_ExportDeviceConfig",value:function e(t){(0,O["default"])("body").append('<a id="jsplugin_download_a" href="'+t+'"><li id="jsplugin_download_li"></li></a>');(0,O["default"])("#jsplugin_download_li").trigger("click");(0,O["default"])("#jsplugin_download_a").remove();return 0}},{key:"JS_OpenFileBrowser",value:function e(t,n,i,r,a){var o=this;o[v]=null;var s=window.document.createElement("input");s.type="file";if(n.toLowerCase()==="bmp"){s.accept="image/bmp";s.style.display="none";(0,O["default"])("body").append(s)}if(t===0){s.setAttribute("webkitdirectory","")}s.addEventListener("change",function(){if(t===1){o[v]=s.files[0];i[r]=s.files[0].name;a&&a.$digest(function(){i[r]=s.files[0].name})}else if(t===0){o[v]=s.files}});var l=document.createEvent("MouseEvents");l.that.initEvent("click",true,true);s.dispatchEvent(l)}},{key:"JS_UploadFile",value:function e(t,n,i,r){var a=this;var o=0;var s=new XMLHttpRequest;s.onreadystatechange=function(){if(s.readyState===4){if(s.status!==200){o=-1}}};s.open("put",t,false);s.setRequestHeader("Content-Type",r);s.send(a[v]);return o}},{key:"JS_StartAsynUpload",value:function e(t){var n=this;var i=new XMLHttpRequest;i.onreadystatechange=function(){if(i.readyState===4){n[m]=i.responseText}};i.open("put",t,true);i.send(n[v]);return 0}},{key:"JS_StopAsynUpload",value:function e(){var t=this;t[m]=""}},{key:"JS_GetUploadErrorInfo",value:function e(){var t=this;if(typeof t[m]==="string"&&t[m].length>0){return t[m]}return""}},{key:"JS_StartUpgradeEx",value:function e(r,a){var o=this;var t=new Promise(function(t,n){if(!r){n();return s}if(!a){n();return s}o[m]=0;var i=new XMLHttpRequest;i.onreadystatechange=function(){if(i.readyState===4){if(i.status===200){o[m]=100;t()}else{o[m]=1;var e=z.oTool.parseXmlFromStr(i.responseText);if((0,O["default"])(e).find("subStatusCode").text()==="lowPrivilege"){n(403)}else{n()}}}};i.open("put",r,true);i.send(o[v]);o[y]=a;setTimeout(function(){t()},3e3)});return t}},{key:"JS_UpgradeStatus",value:function e(){var t=this;if(t[m]===100){return 0}return t[m]}},{key:"JS_UpgradeProgress",value:function e(){var t=this;var n=0;var i=new XMLHttpRequest;i.onreadystatechange=function(){if(i.readyState===4){if(i.status===200){n=parseInt((0,O["default"])(z.oTool.parseXmlFromStr(i.responseText)).find("percent").text(),10)}}};i.open("get",t[y],false);i.send(null);if(t[m]===100){return 100}return n}},{key:"JS_StopUpgrade",value:function e(){var t=this;t[v]=null;return 0}},{key:"JS_ExportDeviceLog",value:function e(t,n){n="Log.txt";var i=[];var r=[];i=i.concat((0,O["default"])(t).find("searchMatchItem").toArray());for(var a=0;a<i.length;a++){r[a]=[];r[a][0]=(0,O["default"])(i[a]).find("logtime").text().replace("T"," ").replace("Z","");r[a][1]=(0,O["default"])(i[a]).find("majortype").text();r[a][2]=(0,O["default"])(i[a]).find("minortype").text();r[a][3]=(0,O["default"])(i[a]).find("channelid").text();r[a][4]=(0,O["default"])(i[a]).find("userName").text();r[a][5]=(0,O["default"])(i[a]).find("remoteaddress").text()}var o=[];function s(e){o.push(e);var t=e.slice("");if(/^[\u4e00-\u9fa5]/.test(e)){for(var n=0;n<30-t.length*2;n++){o.push(" ")}}else{for(var i=0;i<30-t.length;i++){o.push(" ")}}}s(" ");s((0,O["default"])(t).find("laLogTime").text());s((0,O["default"])(t).find("laLogMajorType").text());s((0,O["default"])(t).find("laLogMinorType").text());s((0,O["default"])(t).find("laLogChannel").text());s((0,O["default"])(t).find("laLogRemoteUser").text());s((0,O["default"])(t).find("laLogRemoteIP").text());o.push("\r\n");for(var l=0;l<r.length;l++){var u=(l+1).toString();s(u);for(var f=0;f<6;f++){s(r[l][f])}o.push("\r\n")}o=o.join("");var c=new Blob([o],{type:"text/plain"});var d=(window.URL||window.webkitURL).createObjectURL(c);var h=window.document.createElement("a");h.href=d;h.download=n;var p=document.createEvent("MouseEvents");p.that.initEvent("click",true,true);h.dispatchEvent(p)}},{key:"outCsv",value:function e(t,n,i,r){var a="";var o="";for(var s=0;s<i.length;s++){o+=(0,O["default"])(t).find(i[s]).eq(0).text()+","}o=o.slice(0,-1);a+=o+"\r\n";for(var l=0;l<r.length;l++){o="";for(var u=0;u<i.length;u++){o+='"'+r[l][u]+'",'}o.slice(0,o.length-1);a+=o+"\r\n"}if(a===""){return}var f="";f+=n;var c="\ufeff";if(window.navigator.msSaveOrOpenBlob){var d=c+a;var h=new Blob([decodeURIComponent(encodeURI(d))],{type:"data:text/csv;charset=utf-8,"});navigator.msSaveBlob(h,f+".csv")}else{c="data:text/csv;charset=utf-8,\ufeff";var p=c+a;var v=encodeURI(p);var m=document.createElement("a");m.setAttribute("href",v);m.setAttribute("download",f+".csv");document.body.appendChild(m);m.click()}}},{key:"JS_ExportReport",value:function e(m,y,g){var S=this;var t=new Promise(function(e){var t=[];var n=[];var i=(0,O["default"])(m).find("NameList").text().split(",");t=t.concat((0,O["default"])(m).find("tDataItem").toArray());for(var r=0;r<t.length;r++){n[r]=[];for(var a=0;a<i.length;a++){n[r][a]=(0,O["default"])(t[r]).find(i[a]).text();if(i[a]==="logtime"){n[r][a]=n[r][a].replace("T"," ").replace("Z","")}}}var o=[];if(g===1){S.outCsv(m,y,i,n)}else{var s=function e(t){o.push(t);var n=t.slice("");if(/^[\u4e00-\u9fa5]/.test(t)){for(var i=0;i<30-n.length*2;i++){o.push(" ")}}else{for(var r=0;r<30-n.length;r++){o.push(" ")}}};s(" ");for(var l=0;l<i.length;l++){s((0,O["default"])(m).find(i[l]).eq(0).text())}o.push("\r\n");for(var u=0;u<n.length;u++){var f=(u+1).toString();s(f);for(var c=0;c<i.length;c++){s(n[u][c])}o.push("\r\n")}o=o.join("");var d=void 0;d=new Blob([o],{type:"text/plain"});var h=(window.URL||window.webkitURL).createObjectURL(d);var p=window.document.createElement("a");p.href=h;p.download=y;var v=document.createEvent("MouseEvents");v.that.initEvent("click",true,true);p.dispatchEvent(v)}e()});return t}},{key:"JS_GetWndContainer",value:function e(t){var n=this;if(t<0||typeof t==="undefined"||t===null){return-1}return n.oJSPlugin.find("."+n[C].szId+"parent-wnd").eq(0).children().eq(t)[0]}},{key:"JS_GetWndStatus",value:function e(t){if(t<0||typeof t==="undefined"||t===null){return-1}var n={bPlay:this[T][t].bPlay,bSound:this[c]===t,bSelect:this[T][t].bSelect,iRate:this[T][t].iRate};return n}},{key:"JS_SelectWnd",value:function e(t){var n=this;n.oJSPlugin.find("."+n[C].szId+"parent-wnd").eq(0).children().eq(t).mousedown()}},{key:"JS_PlayWithImg",value:function e(t){var n=this;if(this[C].iType!==1){return}var i=(0,O["default"])("#"+n[C].szId+"canvas0");var r=(0,O["default"])("#"+n[C].szId+"canvas0").width();var a=(0,O["default"])("#"+n[C].szId+"canvas0").height();i.hide();var o=(0,O["default"])("#playImg0");o.show();o.css({width:r+"px",height:a+"px"});o.attr("src",t)}},{key:"JS_SetCanFullScreen",value:function e(t){this[R]=t}},{key:"JS_OpenPlayerSDKPrintLog",value:function e(t){var n=this;n[T][t].oPlayCtrl.PlayM4_OpenPlayerSDKPrintLog(true)}},{key:"JS_DownloadYUVdata",value:function e(t){var n=this;n[T][t].oPlayCtrl.PlayM4_DownloadYUVdata()}},{key:"JS_DownloadPCMdata",value:function e(t){var n=this;n[T][t].oPlayCtrl.PlayM4_DownloadPCMdata()}},{key:"_JSPlayM4_GetFrameInfo",value:function e(){var t=this;var n=t[T][0].oPlayCtrl;return{width:n.nWidth,height:n.nHeight}}},{key:"_JSPlayM4_SetDisplayRegion",value:function e(t,n,i,r){var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:true;var o=arguments[5];var s=this;var l=s[T][0].oPlayCtrl;console.log("canvasInfo:",s.iWidth,s.iHeight);console.log("canvasW:"+l.nWidth+",canvasH:"+l.nHeight+",left:"+t+",right:"+n+",top:"+i+",bottom:"+r);if(o){s[T][0].oPlayCtrl.PlayM4_SetDisplayRegion({left:t*s.iWidth/l.nHeight,top:i*s.iHeight/l.nWidth,right:n*s.iWidth/l.nHeight,bottom:r*s.iHeight/l.nWidth},a)}else{s[T][0].oPlayCtrl.PlayM4_SetDisplayRegion({left:t*s.iWidth/l.nWidth,top:i*s.iHeight/l.nHeight,right:n*s.iWidth/l.nWidth,bottom:r*s.iHeight/l.nHeight},a)}}},{key:"_JSPlayM4_SetDisplayFrameData",value:function e(t,n,i,r,a){var o=this;o[T][0].oPlayCtrl.oSuperRender.SR_DisplayFrameData(t,n,i,r,a)}},{key:"_JSPlayM4_SetRunTimeInfoCallBackEx",value:function e(t){var n=this;if(n.EventCallback&&typeof n.EventCallback.setRunTimeInfoCallback==="function"&&t===1){console.log("PlayM4_SetRunTimeInfoCallBackEx 设置实时信息回调","解析模块",t);n[T][0].oPlayCtrl.PlayM4_SetRunTimeInfoCallBackEx(t,n.EventCallback.setRunTimeInfoCallback)}}}]);return a}();return e}();window.JSPluginV1=o;t.JSPluginV1=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});t.StreamClient=undefined;var i=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();var d=n(2);var r=n(6);var a=n(7);var o=n(8);var s=n(11);function l(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var u=function(){var C=Symbol("WEBSOCKET");var D=Symbol("GETINDEX");var T=Symbol("PROTOCOLVERSION");var M=Symbol("CIPHERSUITES");var c=new r.DirectDeviceCustom;var k=new a.DirectDevice;var x=new o.LiveMedia;var I=new s.LocalService;var e=function(){function e(){l(this,e);this[T]="0.1";this[M]=0;this[C]=[];this.ERRORS={};this[D]=function(e){var t=-1;for(var n=0,i=this[C].length;n<i;n++){if(this[C][n].id===e){t=n;break}}return t}}i(e,[{key:"openStream",value:function e(t,p,v,n){var i=false;if(t.indexOf("[")>-1){i=true}var m=this;var r=t.split("://");var a=r[0];var y="";var g=7681;var S=1;var b=0;var o=false;if(i){y=r[1].split("]:")[0]+"]";g=Math.floor(r[1].split("]:")[1].split("/")[0]);S=Math.floor(r[1].split("]:")[1].split("/")[1]/100);b=Math.floor(r[1].split("]:")[1].split("/")[1]%100)-1}else{y=r[1].split(":")[0];g=Math.floor(r[1].split(":")[1].split("/")[0]);S=Math.floor(r[1].split(":")[1].split("/")[1]/100);b=Math.floor(r[1].split(":")[1].split("/")[1]%100)-1;var s=r[1].split(":")[1].split("/")[2];if(s!==""&&s==="webSocketVideoCtrlProxy"){o=true}}if(S===0){b=0}p=p||{};var l="&sessionID=";if(p.token&&!p.playURL){l="&token="}var u=p.sessionID||p.session||(p.playURL?"":p.token)||"";var P=new window.WebSocket(a+"://"+y+":"+g+(p.mode?"/"+p.mode:"")+(o?"/webSocketVideoCtrlProxy":"")+"?version="+m[T]+"&cipherSuites="+m[M]+l+u+(p.proxy?"&proxy="+p.proxy:""));P.binaryType="arraybuffer";var w=(0,d.v4)();var _=-1;var f=new Promise(function(d,h){P.onopen=function(){if(!p.playURL&&!p.sessionID&&!p.deviceSerial&&!p.token){m[C].push(c.createClientObject(P,w,S,b));d(w)}};P.onmessage=function(e){if(typeof e.data==="string"){var t=JSON.parse(e.data);var n=m[D](w);if(t&&t.version&&t.cipherSuite){m[T]=t.version;m[M]=parseInt(t.cipherSuite,10);if(t&&t.PKD&&t.rand){m[C].push(x.createClientObject(P,w,t.PKD,t.rand,p))}else{var i="live://"+y+":"+g+"/"+S+"/"+b;if(m[M]===-1){m[C].push(I.createClientObject(P,w,i,p))}else{m[C].push(k.createClientObject(P,w,i))}}d(w);return}if(t&&t.sdp){var r=k.getMediaFromSdp(t.sdp);v({bHead:true,buf:r})}if(t&&t.cmd){if(t.cmd==="end"){v({type:"exception",cmd:t.cmd})}}if(t&&t.statusString){if(t.statusString.toLowerCase()==="ok"){if(m[C][n].resolve){m[C][n].resolve(t)}}if(t.statusString.toLowerCase()!=="ok"){var a=k.getError(t);if(n>-1){if(m[C][n].reject){m[C][n].reject(a)}}else{h(a)}}}if(t&&t.errorCode){v(t)}}else{var o={};var s=new Uint8Array(e.data);_++;if(s.byteLength===64||s.byteLength===40){var l=-1;var u=s.byteLength;for(var f=0;f<u;f++){if(s[f]===73&&s[f+1]===77&&s[f+2]===75&&s[f+3]===72){l=f;break}}if(l!==-1){var c=s.slice(l,l+40);o={bHead:true,buf:c}}else{o={bHead:false,buf:s}}v(o)}else{if(_>0){o={bHead:false,buf:s};v(o)}}s=null;o=null;e=null}};P.onclose=function(){for(var e=0,t=m[C].length;e<t;e++){if(m[C][e].id===w){m[C][e].resolve();m[C].splice(e,1);setTimeout(function(){n()},200);break}}h()}});return f}},{key:"startPlay",value:function e(t,i,r){var a=this;var o=this[D](t);if(i&&r&&a[T]==="0.1"){i=i.replace(/-/g,"").replace(/:/g,"");r=r.replace(/-/g,"").replace(/:/g,"")}var n=new Promise(function(e,t){if(o>-1){a[C][o].resolve=e;a[C][o].reject=t;var n=null;if(!i||!r){if(a[C][o].iCurChannel===0&&a[T]==="0.1"){n=c.zeroPlayCmd(a[C][o].iCurChannel,a[C][o].iCurStream)}else{if(a[T]!=="0.1"){if(a[M]===0){n=x.playCmd(a[C][o])}else if(a[M]===1){n=k.playCmd(a[C][o].playURL)}else if(a[M]===-1){n=I.playCmd(a[C][o])}}else{n=c.playCmd(a[C][o].iCurChannel,a[C][o].iCurStream)}}}else{if(a[T]!=="0.1"){if(a[M]===0){n=x.playbackCmd(a[C][o],i,r)}else if(a[M]===1){n=k.playbackCmd(i,r,a[C][o].playURL)}else if(a[M]===-1){n=I.playbackCmd(a[C][o],i,r)}}else{n=c.playbackCmd(i,r,a[C][o].iCurChannel,a[C][o].iCurStream)}}a[C][o].socket.send(n);if(a[T]==="0.1"){e()}}else{if(a[T]==="0.1"){t()}}});return n}},{key:"singleFrame",value:function e(){}},{key:"setPlayRate",value:function e(o,s){var l=this;var t=new Promise(function(e,t){for(var n=0,i=l[C].length;n<i;n++){if(l[C][n].id===o){if(l[T]==="0.1"){console.log("DirectDeviceCustom.playRateCmd:",s);var r=c.playRateCmd(s);l[C][n].socket.send(r);e();break}else{l[C][n].resolve=e;l[C][n].reject=t;console.log("DirectDevice.playRateCmd:",s);var a=k.playRateCmd(s);l[C][n].socket.send(a);e()}}}});return t}},{key:"seek",value:function e(a,o,s){var l=this;var t=new Promise(function(e,t){for(var n=0,i=l[C].length;n<i;n++){if(l[C][n].id===a){l[C][n].resolve=e;l[C][n].reject=t;var r=x.seekCmd(o,s);l[C][n].socket.send(r)}}});return t}},{key:"pause",value:function e(o){var s=this;var t=new Promise(function(e,t){for(var n=0,i=s[C].length;n<i;n++){if(s[C][n].id===o){if(s[T]==="0.1"){var r=c.pauseCmd();s[C][n].socket.send(r);e();break}else{s[C][n].resolve=e;s[C][n].reject=t;var a=k.pauseCmd();s[C][n].socket.send(a)}}}});return t}},{key:"transmission",value:function e(r,a){var o=this;var t=new Promise(function(e,t){for(var n=0,i=o[C].length;n<i;n++){if(o[C][n].id===r){o[C][n].resolve=e;o[C][n].reject=t;o[C][n].socket.send(a)}}});return t}},{key:"resume",value:function e(o){var s=this;var t=new Promise(function(e,t){for(var n=0,i=s[C].length;n<i;n++){if(s[C][n].id===o){if(s[T]==="0.1"){var r=c.resumeCmd();s[C][n].socket.send(r);e();break}else{s[C][n].resolve=e;s[C][n].reject=t;var a=k.resumeCmd();s[C][n].socket.send(a)}}}});return t}},{key:"stop",value:function e(a){var o=this;var t=new Promise(function(e,t){if(!a){t()}else{var n=-1;for(var i=0,r=o[C].length;i<r;i++){if(o[C][i].id===a){n=i;o[C][i].resolve=e;o[C][i].socket.close(1e3,"CLOSE");break}}if(n===-1){t()}}});return t}},{key:"stopAll",value:function e(){var r=this;var t=new Promise(function(e,t){for(var n=0,i=r[C].length;n<i;n++){r[C][n].socket.close(1e3,"CLOSE")}console.log("停止所有流");e()});return t}}]);return e}();return e}();t.StreamClient=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});var i=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();function r(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var a=function(){var e=function(){function e(){r(this,e)}i(e,[{key:"createClientObject",value:function e(t,n,i,r){return{socket:t,id:n,iCurChannel:i,iCurStream:r,resolve:null,reject:null}}},{key:"zeroPlayCmd",value:function e(t,n){var i=[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,t+1,0,0,0,n,0,0,4,0];return new Uint8Array(i)}},{key:"playCmd",value:function e(t,n){var i=[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,t,0,0,0,n,0,0,4,0];return new Uint8Array(i)}},{key:"playbackCmd",value:function e(t,n,i,r){var a=t.split("T")[0];var o=t.split("T")[1];var s="0"+parseInt(a.substring(0,4),10).toString(16);var l=parseInt(a.substring(4,6),10);var u=parseInt(a.substring(6),10);var f=parseInt(o.substring(0,2),10);var c=parseInt(o.substring(2,4),10);var d=parseInt(o.substring(4,6),10);var h=n.split("T")[0];var p=n.split("T")[1];var v="0"+parseInt(h.substring(0,4),10).toString(16);var m=parseInt(h.substring(4,6),10);var y=parseInt(p.substring(0,2),10);var g=parseInt(p.substring(2,4),10);var S=parseInt(p.substring(4,6),10);var b=[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,i,0,0,parseInt(s.substring(0,2),16),parseInt(s.substring(2,4),16),0,0,0,l,0,0,0,u,0,0,0,f,0,0,0,c,0,0,0,d,0,0,parseInt(v.substring(0,2),16),parseInt(v.substring(2,4),16),0,0,0,m,0,0,0,u,0,0,0,y,0,0,0,g,0,0,0,S,0,0,0,0,0,0,0,0,r,0,0,0];return new Uint8Array(b)}},{key:"playRateCmd",value:function e(t){var n=(parseInt(t,10)>>>0).toString(16).toLocaleUpperCase().toString(16);for(var i=n.length;i<8;i++){n="0"+n}var r=[0,0,0,0];for(var a=0,o=n.length;a<o;a=a+2){r[Math.floor(a/2)]=parseInt(n.substring(a,a+2),16)}var s=[0,0,0,36,0,0,0,0,0,0,0,0,0,3,1,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r[0],r[1],r[2],r[3]];return new Uint8Array(s)}},{key:"pauseCmd",value:function e(){var t=[0,0,0,32,0,0,0,0,0,0,0,0,0,3,1,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];return new Uint8Array(t)}},{key:"resumeCmd",value:function e(){var t=[0,0,0,32,0,0,0,0,0,0,0,0,0,3,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];return new Uint8Array(t)}}]);return e}();return e}();t.DirectDeviceCustom=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});var i=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();function r(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var a=3001;var o=3002;var s=3003;var l=function(){var e=function(){function e(){r(this,e)}i(e,[{key:"createClientObject",value:function e(t,n,i){return{socket:t,id:n,playURL:i,resolve:null,reject:null}}},{key:"getMediaFromSdp",value:function e(t){var n=t.indexOf("MEDIAINFO=")+10;var i=t.slice(n,n+80);var r=[];for(var a=0,o=i.length/2;a<o;a++){r[a]=parseInt(i.slice(a*2,a*2+2),16)}return new Uint8Array(r)}},{key:"playCmd",value:function e(t){var n={sequence:0,cmd:"realplay",url:t};return JSON.stringify(n)}},{key:"playbackCmd",value:function e(t,n,i){var r={sequence:0,cmd:"playback",url:i,startTime:t,endTime:n};return JSON.stringify(r)}},{key:"playRateCmd",value:function e(t){var n={sequence:0,cmd:"changespeed",speed:t};return JSON.stringify(n)}},{key:"pauseCmd",value:function e(){var t={sequence:0,cmd:"pause"};return JSON.stringify(t)}},{key:"resumeCmd",value:function e(){var t={sequence:0,cmd:"resume"};return JSON.stringify(t)}},{key:"getError",value:function e(t){var n=a;if(t){if(parseInt(t.statusCode,10)===6&&t.subStatusCode==="streamLimit"){n=o}else if(parseInt(t.statusCode,10)===4&&t.subStatusCode==="badAuthorization"){n=s}}return{iErrorNum:n,oError:t}}}]);return e}();return e}();t.DirectDevice=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});t.LiveMedia=undefined;var i=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();var r=n(9);var a=s(r);var o=n(10);var l=s(o);function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var f=function(){var e=function(){function e(){u(this,e)}i(e,[{key:"createClientObject",value:function e(t,n,i,r,a){var o=l["default"].AES.encrypt((new Date).getTime().toString(),l["default"].enc.Hex.parse("1234567891234567123456789123456712345678912345671234567891234567"),{mode:l["default"].mode.CBC,iv:l["default"].enc.Hex.parse("12345678912345671234567891234567"),padding:l["default"].pad.Pkcs7}).ciphertext.toString();if(o.length<64){o=o+o}var s=l["default"].AES.encrypt((new Date).getTime().toString(),l["default"].enc.Hex.parse("12345678912345671234567891234567"),{mode:l["default"].mode.CBC,iv:l["default"].enc.Hex.parse("12345678912345671234567891234567"),padding:l["default"].pad.Pkcs7}).ciphertext.toString();return{socket:t,id:n,PKD:i,rand:r,playURL:a.playURL||"",auth:a.auth||"",token:a.token||"",key:o,iv:s,resolve:null,reject:null}}},{key:"playCmd",value:function e(t){var n={sequence:0,cmd:"realplay",url:t.playURL,key:a["default"].encrypt(t.iv+":"+t.key,t.PKD).cipher.split("?")[0],authorization:l["default"].AES.encrypt(t.rand+":"+t.auth,l["default"].enc.Hex.parse(t.key),{mode:l["default"].mode.CBC,iv:l["default"].enc.Hex.parse(t.iv),padding:l["default"].pad.Pkcs7}).ciphertext.toString(),token:l["default"].AES.encrypt(t.token,l["default"].enc.Hex.parse(t.key),{mode:l["default"].mode.CBC,iv:l["default"].enc.Hex.parse(t.iv),padding:l["default"].pad.Pkcs7}).ciphertext.toString()};return JSON.stringify(n)}},{key:"playbackCmd",value:function e(t,n,i){var r={sequence:0,cmd:"playback",url:t.playURL,key:a["default"].encrypt(t.iv+":"+t.key,t.PKD).cipher.split("?")[0],authorization:l["default"].AES.encrypt(t.rand+":"+t.auth,l["default"].enc.Hex.parse(t.key),{mode:l["default"].mode.CBC,iv:l["default"].enc.Hex.parse(t.iv),padding:l["default"].pad.Pkcs7}).ciphertext.toString(),token:l["default"].AES.encrypt(t.token,l["default"].enc.Hex.parse(t.key),{mode:l["default"].mode.CBC,iv:l["default"].enc.Hex.parse(t.iv),padding:l["default"].pad.Pkcs7}).ciphertext.toString(),startTime:n,endTime:i};return JSON.stringify(r)}},{key:"seekCmd",value:function e(t,n){var i={sequence:0,cmd:"seek",startTime:t,endTime:n};return JSON.stringify(i)}}]);return e}();return e}();t.LiveMedia=f},function(L,U,N){var H=typeof Symbol==="function"&&_typeof(Symbol.iterator)==="symbol"?function(e){return _typeof(e)}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof(e)};var t;function m(e,t,n){e!=null&&("number"==typeof e?this.fromNumber(e,t,n):t==null&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function y(){return new m(null)}function V(e,t,n,i,r,a){var o=t&16383;for(t>>=14;--a>=0;){var s=this[e]&16383,l=this[e++]>>14,u=t*s+l*o,s=o*s+((u&16383)<<14)+n[i]+r,r=(s>>28)+(u>>14)+t*l;n[i++]=s&268435455}return r}m.prototype.am=V,t=28;m.prototype.DB=t;m.prototype.DM=(1<<t)-1;m.prototype.DV=1<<t;var r=52;m.prototype.FV=Math.pow(2,r);m.prototype.F1=r-t;m.prototype.F2=2*t-r;var j="0123456789abcdefghijklmnopqrstuvwxyz",a=[],o,s;o="0".charCodeAt(0);for(s=0;s<=9;++s){a[o++]=s}o="a".charCodeAt(0);for(s=10;s<36;++s){a[o++]=s}o="A".charCodeAt(0);for(s=10;s<36;++s){a[o++]=s}function u(e){return j.charAt(e)}function f(e,t){var n=a[e.charCodeAt(t)];return n==null?-1:n}function J(e){for(var t=this.t-1;t>=0;--t){e[t]=this[t]}e.t=this.t;e.s=this.s}function G(e){this.t=1;this.s=e<0?-1:0;e>0?this[0]=e:e<-1?this[0]=e+DV:this.t=0}function p(e){var t=y();t.fromInt(e);return t}function X(e,t){var n;if(t==16)n=4;else if(t==8)n=3;else if(t==256)n=8;else if(t==2)n=1;else if(t==32)n=5;else if(t==4)n=2;else{this.fromRadix(e,t);return}this.s=this.t=0;for(var i=e.length,r=!1,a=0;--i>=0;){var o=n==8?e[i]&255:f(e,i);o<0?e.charAt(i)=="-"&&(r=!0):(r=!1,a==0?this[this.t++]=o:a+n>this.DB?(this[this.t-1]|=(o&(1<<this.DB-a)-1)<<a,this[this.t++]=o>>this.DB-a):this[this.t-1]|=o<<a,a+=n,a>=this.DB&&(a-=this.DB))}if(n==8&&(e[0]&128)!=0)this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a);this.clamp();r&&m.ZERO.subTo(this,this)}function K(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;){--this.t}}function $(e){if(this.s<0)return"-"+this.negate().toString(e);if(e==16)e=4;else if(e==8)e=3;else if(e==2)e=1;else if(e==32)e=5;else if(e==64)e=6;else if(e==4)e=2;else return this.toRadix(e);var t=(1<<e)-1,n,i=!1,r="",a=this.t,o=this.DB-a*this.DB%e;if(a-- >0){if(o<this.DB&&(n=this[a]>>o)>0)i=!0,r=u(n);for(;a>=0;){o<e?(n=(this[a]&(1<<o)-1)<<e-o,n|=this[--a]>>(o+=this.DB-e)):(n=this[a]>>(o-=e)&t,o<=0&&(o+=this.DB,--a)),n>0&&(i=!0),i&&(r+=u(n))}}return i?r:"0"}function Z(){var e=y();m.ZERO.subTo(this,e);return e}function Q(){return this.s<0?this.negate():this}function ee(e){var t=this.s-e.s;if(t!=0)return t;var n=this.t,t=n-e.t;if(t!=0)return t;for(;--n>=0;){if((t=this[n]-e[n])!=0)return t}return 0}function g(e){var t=1,n;if((n=e>>>16)!=0)e=n,t+=16;if((n=e>>8)!=0)e=n,t+=8;if((n=e>>4)!=0)e=n,t+=4;if((n=e>>2)!=0)e=n,t+=2;e>>1!=0&&(t+=1);return t}function te(){return this.t<=0?0:this.DB*(this.t-1)+g(this[this.t-1]^this.s&this.DM)}function ne(e,t){var n;for(n=this.t-1;n>=0;--n){t[n+e]=this[n]}for(n=e-1;n>=0;--n){t[n]=0}t.t=this.t+e;t.s=this.s}function ie(e,t){for(var n=e;n<this.t;++n){t[n-e]=this[n]}t.t=Math.max(this.t-e,0);t.s=this.s}function re(e,t){var n=e%this.DB,i=this.DB-n,r=(1<<i)-1,a=Math.floor(e/this.DB),o=this.s<<n&this.DM,s;for(s=this.t-1;s>=0;--s){t[s+a+1]=this[s]>>i|o,o=(this[s]&r)<<n}for(s=a-1;s>=0;--s){t[s]=0}t[a]=o;t.t=this.t+a+1;t.s=this.s;t.clamp()}function ae(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var i=e%this.DB,r=this.DB-i,a=(1<<i)-1;t[0]=this[n]>>i;for(var o=n+1;o<this.t;++o){t[o-n-1]|=(this[o]&a)<<r,t[o-n]=this[o]>>i}i>0&&(t[this.t-n-1]|=(this.s&a)<<r);t.t=this.t-n;t.clamp()}}function oe(e,t){for(var n=0,i=0,r=Math.min(e.t,this.t);n<r;){i+=this[n]-e[n],t[n++]=i&this.DM,i>>=this.DB}if(e.t<this.t){for(i-=e.s;n<this.t;){i+=this[n],t[n++]=i&this.DM,i>>=this.DB}i+=this.s}else{for(i+=this.s;n<e.t;){i-=e[n],t[n++]=i&this.DM,i>>=this.DB}i-=e.s}t.s=i<0?-1:0;i<-1?t[n++]=this.DV+i:i>0&&(t[n++]=i);t.t=n;t.clamp()}function se(e,t){var n=this.abs(),i=e.abs(),r=n.t;for(t.t=r+i.t;--r>=0;){t[r]=0}for(r=0;r<i.t;++r){t[r+n.t]=n.am(0,i[r],t,r,0,n.t)}t.s=0;t.clamp();this.s!=e.s&&m.ZERO.subTo(t,t)}function le(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;){e[n]=0}for(n=0;n<t.t-1;++n){var i=t.am(n,t[n],e,2*n,0,1);if((e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,i,t.t-n-1))>=t.DV)e[n+t.t]-=t.DV,e[n+t.t+1]=1}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1));e.s=0;e.clamp()}function ue(e,t,n){var i=e.abs();if(!(i.t<=0)){var r=this.abs();if(r.t<i.t)t!=null&&t.fromInt(0),n!=null&&this.copyTo(n);else{n==null&&(n=y());var a=y(),o=this.s,e=e.s,s=this.DB-g(i[i.t-1]);s>0?(i.lShiftTo(s,a),r.lShiftTo(s,n)):(i.copyTo(a),r.copyTo(n));i=a.t;r=a[i-1];if(r!=0){var l=r*(1<<this.F1)+(i>1?a[i-2]>>this.F2:0),u=this.FV/l,l=(1<<this.F1)/l,f=1<<this.F2,c=n.t,d=c-i,h=t==null?y():t;a.dlShiftTo(d,h);n.compareTo(h)>=0&&(n[n.t++]=1,n.subTo(h,n));m.ONE.dlShiftTo(i,h);for(h.subTo(a,a);a.t<i;){a[a.t++]=0}for(;--d>=0;){var p=n[--c]==r?this.DM:Math.floor(n[c]*u+(n[c-1]+f)*l);if((n[c]+=a.am(0,p,n,d,0,i))<p){a.dlShiftTo(d,h);for(n.subTo(h,n);n[c]<--p;){n.subTo(h,n)}}}t!=null&&(n.drShiftTo(i,t),o!=e&&m.ZERO.subTo(t,t));n.t=i;n.clamp();s>0&&n.rShiftTo(s,n);o<0&&m.ZERO.subTo(n,n)}}}}function fe(e){var t=y();this.abs().divRemTo(e,null,t);this.s<0&&t.compareTo(m.ZERO)>0&&e.subTo(t,t);return t}function S(e){this.m=e}function ce(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function de(e){return e}function he(e){e.divRemTo(this.m,null,e)}function pe(e,t,n){e.multiplyTo(t,n);this.reduce(n)}function ve(e,t){e.squareTo(t);this.reduce(t)}S.prototype.convert=ce;S.prototype.revert=de;S.prototype.reduce=he;S.prototype.mulTo=pe;S.prototype.sqrTo=ve;function me(){if(this.t<1)return 0;var e=this[0];if((e&1)==0)return 0;var t=e&3,t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV;return t>0?this.DV-t:-t}function b(e){this.m=e;this.mp=e.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<e.DB-15)-1;this.mt2=2*e.t}function ye(e){var t=y();e.abs().dlShiftTo(this.m.t,t);t.divRemTo(this.m,null,t);e.s<0&&t.compareTo(m.ZERO)>0&&this.m.subTo(t,t);return t}function ge(e){var t=y();e.copyTo(t);this.reduce(t);return t}function Se(e){for(;e.t<=this.mt2;){e[e.t++]=0}for(var t=0;t<this.m.t;++t){var n=e[t]&32767,i=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM,n=t+this.m.t;for(e[n]+=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);e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function be(e,t){e.squareTo(t);this.reduce(t)}function Pe(e,t,n){e.multiplyTo(t,n);this.reduce(n)}b.prototype.convert=ye;b.prototype.revert=ge;b.prototype.reduce=Se;b.prototype.mulTo=Pe;b.prototype.sqrTo=be;function we(){return(this.t>0?this[0]&1:this.s)==0}function _e(e,t){if(e>4294967295||e<1)return m.ONE;var n=y(),i=y(),r=t.convert(this),a=g(e)-1;for(r.copyTo(n);--a>=0;){if(t.sqrTo(n,i),(e&1<<a)>0)t.mulTo(i,r,n);else var o=n,n=i,i=o}return t.revert(n)}function Ce(e,t){var n;n=e<256||t.isEven()?new S(t):new b(t);return this.exp(e,n)}m.prototype.copyTo=J;m.prototype.fromInt=G;m.prototype.fromString=X;m.prototype.clamp=K;m.prototype.dlShiftTo=ne;m.prototype.drShiftTo=ie;m.prototype.lShiftTo=re;m.prototype.rShiftTo=ae;m.prototype.subTo=oe;m.prototype.multiplyTo=se;m.prototype.squareTo=le;m.prototype.divRemTo=ue;m.prototype.invDigit=me;m.prototype.isEven=we;m.prototype.exp=_e;m.prototype.toString=$;m.prototype.negate=Z;m.prototype.abs=Q;m.prototype.compareTo=ee;m.prototype.bitLength=te;m.prototype.mod=fe;m.prototype.modPowInt=Ce;m.ZERO=p(0);m.ONE=p(1);function De(){var e=y();this.copyTo(e);return e}function Te(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else{if(this.t==0)return-1}}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function Me(){return this.t==0?this.s:this[0]<<24>>24}function ke(){return this.t==0?this.s:this[0]<<16>>16}function xe(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function Ie(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function Re(e){e==null&&(e=10);if(this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),t=Math.pow(e,t),n=p(t),i=y(),r=y(),a="";for(this.divRemTo(n,i,r);i.signum()>0;){a=(t+r.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,r)}return r.intValue().toString(e)+a}function ze(e,t){this.fromInt(0);t==null&&(t=10);for(var n=this.chunkSize(t),i=Math.pow(t,n),r=!1,a=0,o=0,s=0;s<e.length;++s){var l=f(e,s);l<0?e.charAt(s)=="-"&&this.signum()==0&&(r=!0):(o=t*o+l,++a>=n&&(this.dMultiply(i),this.dAddOffset(o,0),o=a=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(o,0));r&&m.ZERO.subTo(this,this)}function Ee(e,t,n){if("number"==typeof t){if(e<2)this.fromInt(1);else{this.fromNumber(e,n);this.testBit(e-1)||this.bitwiseTo(m.ONE.shiftLeft(e-1),l,this);for(this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);){this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(m.ONE.shiftLeft(e-1),this)}}}else{var n=[],i=e&7;n.length=(e>>3)+1;t.nextBytes(n);i>0?n[0]&=(1<<i)-1:n[0]=0;this.fromString(n,256)}}function Ae(){var e=this.t,t=[];t[0]=this.s;var n=this.DB-e*this.DB%8,i,r=0;if(e-- >0){if(n<this.DB&&(i=this[e]>>n)!=(this.s&this.DM)>>n)t[r++]=i|this.s<<this.DB-n;for(;e>=0;){if(n<8?(i=(this[e]&(1<<n)-1)<<8-n,i|=this[--e]>>(n+=this.DB-8)):(i=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),(i&128)!=0&&(i|=-256),r==0&&(this.s&128)!=(i&128)&&++r,r>0||i!=this.s)t[r++]=i}}return t}function Be(e){return this.compareTo(e)==0}function Fe(e){return this.compareTo(e)<0?this:e}function Oe(e){return this.compareTo(e)>0?this:e}function Le(e,t,n){var i,r,a=Math.min(e.t,this.t);for(i=0;i<a;++i){n[i]=t(this[i],e[i])}if(e.t<this.t){r=e.s&this.DM;for(i=a;i<this.t;++i){n[i]=t(this[i],r)}n.t=this.t}else{r=this.s&this.DM;for(i=a;i<e.t;++i){n[i]=t(r,e[i])}n.t=e.t}n.s=t(this.s,e.s);n.clamp()}function Ue(e,t){return e&t}function Ne(e){var t=y();this.bitwiseTo(e,Ue,t);return t}function l(e,t){return e|t}function He(e){var t=y();this.bitwiseTo(e,l,t);return t}function c(e,t){return e^t}function We(e){var t=y();this.bitwiseTo(e,c,t);return t}function d(e,t){return e&~t}function qe(e){var t=y();this.bitwiseTo(e,d,t);return t}function Ye(){for(var e=y(),t=0;t<this.t;++t){e[t]=this.DM&~this[t]}e.t=this.t;e.s=~this.s;return e}function Ve(e){var t=y();e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t);return t}function je(e){var t=y();e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t);return t}function Je(e){if(e==0)return-1;var t=0;(e&65535)==0&&(e>>=16,t+=16);(e&255)==0&&(e>>=8,t+=8);(e&15)==0&&(e>>=4,t+=4);(e&3)==0&&(e>>=2,t+=2);(e&1)==0&&++t;return t}function Ge(){for(var e=0;e<this.t;++e){if(this[e]!=0)return e*this.DB+Je(this[e])}return this.s<0?this.t*this.DB:-1}function Xe(e){for(var t=0;e!=0;){e&=e-1,++t}return t}function Ke(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n){e+=Xe(this[n]^t)}return e}function $e(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<e%this.DB)!=0}function Ze(e,t){var n=m.ONE.shiftLeft(e);this.bitwiseTo(n,t,n);return n}function Qe(e){return this.changeBit(e,l)}function et(e){return this.changeBit(e,d)}function tt(e){return this.changeBit(e,c)}function nt(e,t){for(var n=0,i=0,r=Math.min(e.t,this.t);n<r;){i+=this[n]+e[n],t[n++]=i&this.DM,i>>=this.DB}if(e.t<this.t){for(i+=e.s;n<this.t;){i+=this[n],t[n++]=i&this.DM,i>>=this.DB}i+=this.s}else{for(i+=this.s;n<e.t;){i+=e[n],t[n++]=i&this.DM,i>>=this.DB}i+=e.s}t.s=i<0?-1:0;i>0?t[n++]=i:i<-1&&(t[n++]=this.DV+i);t.t=n;t.clamp()}function it(e){var t=y();this.addTo(e,t);return t}function rt(e){var t=y();this.subTo(e,t);return t}function at(e){var t=y();this.multiplyTo(e,t);return t}function ot(){var e=y();this.squareTo(e);return e}function st(e){var t=y();this.divRemTo(e,t,null);return t}function lt(e){var t=y();this.divRemTo(e,null,t);return t}function ut(e){var t=y(),n=y();this.divRemTo(e,t,n);return[t,n]}function ft(e){this[this.t]=this.am(0,e-1,this,0,0,this.t);++this.t;this.clamp()}function ct(e,t){if(e!=0){for(;this.t<=t;){this[this.t++]=0}for(this[t]+=e;this[t]>=this.DV;){this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}}function h(){}function P(e){return e}function dt(e,t,n){e.multiplyTo(t,n)}function ht(e,t){e.squareTo(t)}h.prototype.convert=P;h.prototype.revert=P;h.prototype.mulTo=dt;h.prototype.sqrTo=ht;function pt(e){return this.exp(e,new h)}function vt(e,t,n){var i=Math.min(this.t+e.t,t);n.s=0;for(n.t=i;i>0;){n[--i]=0}var r;for(r=n.t-this.t;i<r;++i){n[i+this.t]=this.am(0,e[i],n,i,0,this.t)}for(r=Math.min(e.t,t);i<r;++i){this.am(0,e[i],n,i,0,t-i)}n.clamp()}function mt(e,t,n){--t;var i=n.t=this.t+e.t-t;for(n.s=0;--i>=0;){n[i]=0}for(i=Math.max(t-this.t,0);i<e.t;++i){n[this.t+i-t]=this.am(t-i,e[i],n,0,0,this.t+i-t)}n.clamp();n.drShiftTo(1,n)}function w(e){this.r2=y();this.q3=y();m.ONE.dlShiftTo(2*e.t,this.r2);this.mu=this.r2.divide(e);this.m=e}function yt(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);else if(e.compareTo(this.m)<0)return e;else{var t=y();e.copyTo(t);this.reduce(t);return t}}function gt(e){return e}function St(e){e.drShiftTo(this.m.t-1,this.r2);if(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);for(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);e.compareTo(this.m)>=0;){e.subTo(this.m,e)}}function bt(e,t){e.squareTo(t);this.reduce(t)}function Pt(e,t,n){e.multiplyTo(t,n);this.reduce(n)}w.prototype.convert=yt;w.prototype.revert=gt;w.prototype.reduce=St;w.prototype.mulTo=Pt;w.prototype.sqrTo=bt;function wt(e,t){var n=e.bitLength(),i,r=p(1),a;if(n<=0)return r;else i=n<18?1:n<48?3:n<144?4:n<768?5:6;a=n<8?new S(t):t.isEven()?new w(t):new b(t);var o=[],s=3,l=i-1,u=(1<<i)-1;o[1]=a.convert(this);if(i>1){n=y();for(a.sqrTo(o[1],n);s<=u;){o[s]=y(),a.mulTo(n,o[s-2],o[s]),s+=2}}for(var f=e.t-1,c,d=!0,h=y(),n=g(e[f])-1;f>=0;){n>=l?c=e[f]>>n-l&u:(c=(e[f]&(1<<n+1)-1)<<l-n,f>0&&(c|=e[f-1]>>this.DB+n-l));for(s=i;(c&1)==0;){c>>=1,--s}if((n-=s)<0)n+=this.DB,--f;if(d)o[c].copyTo(r),d=!1;else{for(;s>1;){a.sqrTo(r,h),a.sqrTo(h,r),s-=2}s>0?a.sqrTo(r,h):(s=r,r=h,h=s);a.mulTo(h,o[c],r)}for(;f>=0&&(e[f]&1<<n)==0;){a.sqrTo(r,h),s=r,r=h,h=s,--n<0&&(n=this.DB-1,--f)}}return a.revert(r)}function _t(e){var t=this.s<0?this.negate():this.clone(),e=e.s<0?e.negate():e.clone();if(t.compareTo(e)<0)var n=t,t=e,e=n;var n=t.getLowestSetBit(),i=e.getLowestSetBit();if(i<0)return t;n<i&&(i=n);i>0&&(t.rShiftTo(i,t),e.rShiftTo(i,e));for(;t.signum()>0;){(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),t.compareTo(e)>=0?(t.subTo(e,t),t.rShiftTo(1,t)):(e.subTo(t,e),e.rShiftTo(1,e))}i>0&&e.lShiftTo(i,e);return e}function Ct(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(t==0)n=this[0]%e;else for(var i=this.t-1;i>=0;--i){n=(t*n+this[i])%e}return n}function Dt(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return m.ZERO;for(var n=e.clone(),i=this.clone(),r=p(1),a=p(0),o=p(0),s=p(1);n.signum()!=0;){for(;n.isEven();){n.rShiftTo(1,n);if(t){if(!r.isEven()||!a.isEven())r.addTo(this,r),a.subTo(e,a);r.rShiftTo(1,r)}else a.isEven()||a.subTo(e,a);a.rShiftTo(1,a)}for(;i.isEven();){i.rShiftTo(1,i);if(t){if(!o.isEven()||!s.isEven())o.addTo(this,o),s.subTo(e,s);o.rShiftTo(1,o)}else s.isEven()||s.subTo(e,s);s.rShiftTo(1,s)}n.compareTo(i)>=0?(n.subTo(i,n),t&&r.subTo(o,r),a.subTo(s,a)):(i.subTo(n,i),t&&o.subTo(r,o),s.subTo(a,s))}if(i.compareTo(m.ONE)!=0)return m.ZERO;if(s.compareTo(e)>=0)return s.subtract(e);if(s.signum()<0)s.addTo(e,s);else return s;return s.signum()<0?s.add(e):s}var _=[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],Tt=67108864/_[_.length-1];function Mt(e){var t,n=this.abs();if(n.t==1&&n[0]<=_[_.length-1]){for(t=0;t<_.length;++t){if(n[0]==_[t])return!0}return!1}if(n.isEven())return!1;for(t=1;t<_.length;){for(var i=_[t],r=t+1;r<_.length&&i<Tt;){i*=_[r++]}for(i=n.modInt(i);t<r;){if(i%_[t++]==0)return!1}}return n.millerRabin(e)}function kt(e){var t=this.subtract(m.ONE),n=t.getLowestSetBit();if(n<=0)return!1;var i=t.shiftRight(n),e=e+1>>1;if(e>_.length)e=_.length;for(var r=y(),a=0;a<e;++a){r.fromInt(_[Math.floor(Math.random()*_.length)]);var o=r.modPow(i,this);if(o.compareTo(m.ONE)!=0&&o.compareTo(t)!=0){for(var s=1;s++<n&&o.compareTo(t)!=0;){if(o=o.modPowInt(2,this),o.compareTo(m.ONE)==0)return!1}if(o.compareTo(t)!=0)return!1}}return!0}m.prototype.chunkSize=xe;m.prototype.toRadix=Re;m.prototype.fromRadix=ze;m.prototype.fromNumber=Ee;m.prototype.bitwiseTo=Le;m.prototype.changeBit=Ze;m.prototype.addTo=nt;m.prototype.dMultiply=ft;m.prototype.dAddOffset=ct;m.prototype.multiplyLowerTo=vt;m.prototype.multiplyUpperTo=mt;m.prototype.modInt=Ct;m.prototype.millerRabin=kt;m.prototype.clone=De;m.prototype.intValue=Te;m.prototype.byteValue=Me;m.prototype.shortValue=ke;m.prototype.signum=Ie;m.prototype.toByteArray=Ae;m.prototype.equals=Be;m.prototype.min=Fe;m.prototype.max=Oe;m.prototype.and=Ne;m.prototype.or=He;m.prototype.xor=We;m.prototype.andNot=qe;m.prototype.not=Ye;m.prototype.shiftLeft=Ve;m.prototype.shiftRight=je;m.prototype.getLowestSetBit=Ge;m.prototype.bitCount=Ke;m.prototype.testBit=$e;m.prototype.setBit=Qe;m.prototype.clearBit=et;m.prototype.flipBit=tt;m.prototype.add=it;m.prototype.subtract=rt;m.prototype.multiply=at;m.prototype.divide=st;m.prototype.remainder=lt;m.prototype.divideAndRemainder=ut;m.prototype.modPow=wt;m.prototype.modInverse=Dt;m.prototype.pow=pt;m.prototype.gcd=_t;m.prototype.isProbablePrime=Mt;m.prototype.square=ot;(function(r,a,l,o,s,u,f){function c(e){var t,n,s=this,i=e.length,r=0,a=s.i=s.j=s.m=0;s.S=[];s.c=[];for(i||(e=[i++]);r<l;){s.S[r]=r++}for(r=0;r<l;r++){t=s.S[r],a=a+t+e[r%i]&l-1,n=s.S[a],s.S[r]=n,s.S[a]=t}s.g=function(e){var t=s.S,n=s.i+1&l-1,i=t[n],r=s.j+i&l-1,a=t[r];t[n]=a;t[r]=i;for(var o=t[i+a&l-1];--e;){n=n+1&l-1,i=t[n],r=r+i&l-1,a=t[r],t[n]=a,t[r]=i,o=o*l+t[i+a&l-1]}s.i=n;s.j=r;return o};s.g(l)}function d(e,t,n,i,r){n=[];r=typeof e==="undefined"?"undefined":H(e);if(t&&r=="object")for(i in e){if(i.indexOf("S")<5)try{n.push(d(e[i],t-1))}catch(e){}}return n.length?n:e+(r!="string"?"\0":"")}function h(e,t,n,i){e+="";for(i=n=0;i<e.length;i++){var r=t,a=i&l-1,o=(n^=t[i&l-1]*19)+e.charCodeAt(i);r[a]=o&l-1}e="";for(i in t){e+=String.fromCharCode(t[i])}return e}a.seedrandom=function(e,t){var n=[],i,e=h(d(t?[e,r]:arguments.length?e:[(new Date).getTime(),r,window],3),n);i=new c(n);h(i.S,r);a.random=function(){for(var e=i.g(o),t=f,n=0;e<s;){e=(e+n)*l,t*=l,n=i.g(1)}for(;e>=u;){e/=2,t/=2,n>>>=1}return(e+n)/t};return e};f=a.pow(l,o);s=a.pow(2,s);u=s*2;h(a.random(),r)})([],Math,256,6,52);function C(){}function xt(e){var t;for(t=0;t<e.length;t++){e[t]=Math.floor(Math.random()*256)}}C.prototype.nextBytes=xt;function D(){this.j=this.i=0;this.S=[]}function It(e){var t,n,i;for(t=0;t<256;++t){this.S[t]=t}for(t=n=0;t<256;++t){n=n+this.S[t]+e[t%e.length]&255,i=this.S[t],this.S[t]=this.S[n],this.S[n]=i}this.j=this.i=0}function Rt(){var e;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;e=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=e;return this.S[e+this.S[this.i]&255]}D.prototype.init=It;D.prototype.next=Rt;function zt(){return new D}var T=256,M,k,x;function Et(e){k[x++]^=e&255;k[x++]^=e>>8&255;k[x++]^=e>>16&255;k[x++]^=e>>24&255;x>=T&&(x-=T)}function At(){Et((new Date).getTime())}if(k==null){k=[];x=0;var I;for(;x<T;){I=Math.floor(65536*Math.random()),k[x++]=I>>>8,k[x++]=I&255}x=0;At()}function Ft(){if(M==null){At();M=zt();M.init(k);for(x=0;x<k.length;++x){k[x]=0}x=0}return M.next()}function Ot(e){var t;for(t=0;t<e.length;++t){e[t]=Ft()}}function R(){}R.prototype.nextBytes=Ot;function Lt(e){function y(e,t){var n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function g(e,t){return e>>>t|e<<32-t}e=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t+=String.fromCharCode(i):(i>127&&i<2048?t+=String.fromCharCode(i>>6|192):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128)),t+=String.fromCharCode(i&63|128))}return t}(e);return function(e){for(var t="",n=0;n<e.length*4;n++){t+="0123456789abcdef".charAt(e[n>>2]>>(3-n%4)*8+4&15)+"0123456789abcdef".charAt(e[n>>2]>>(3-n%4)*8&15)}return t}(function(e,t){var n=[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],i=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],r=Array(64),a,o,s,l,u,f,c,d,h,p,v,m;e[t>>5]|=128<<24-t%32;e[(t+64>>9<<4)+15]=t;for(h=0;h<e.length;h+=16){a=i[0];o=i[1];s=i[2];l=i[3];u=i[4];f=i[5];c=i[6];d=i[7];for(p=0;p<64;p++){r[p]=p<16?e[p+h]:y(y(y(g(r[p-2],17)^g(r[p-2],19)^r[p-2]>>>10,r[p-7]),g(r[p-15],7)^g(r[p-15],18)^r[p-15]>>>3),r[p-16]),v=y(y(y(y(d,g(u,6)^g(u,11)^g(u,25)),u&f^~u&c),n[p]),r[p]),m=y(g(a,2)^g(a,13)^g(a,22),a&o^a&s^o&s),d=c,c=f,f=u,u=y(l,v),l=s,s=o,o=a,a=y(v,m)}i[0]=y(a,i[0]);i[1]=y(o,i[1]);i[2]=y(s,i[2]);i[3]=y(l,i[3]);i[4]=y(u,i[4]);i[5]=y(f,i[5]);i[6]=y(c,i[6]);i[7]=y(d,i[7])}return i}(function(e){for(var t=[],n=0;n<e.length*8;n+=8){t[n>>5]|=(e.charCodeAt(n/8)&255)<<24-n%32}return t}(e),e.length*8))}var Ut={hex:function e(t){return Lt(t)}};function Nt(e){function t(e,t){return e<<t|e>>>32-t}function n(e){var t="",n,i;for(n=7;n>=0;n--){i=e>>>n*4&15,t+=i.toString(16)}return t}var i,r,a=Array(80),o=1732584193,s=4023233417,l=2562383102,u=271733878,f=3285377520,c,d,h,p,v,e=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t+=String.fromCharCode(i):(i>127&&i<2048?t+=String.fromCharCode(i>>6|192):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128)),t+=String.fromCharCode(i&63|128))}return t}(e);c=e.length;var m=[];for(i=0;i<c-3;i+=4){r=e.charCodeAt(i)<<24|e.charCodeAt(i+1)<<16|e.charCodeAt(i+2)<<8|e.charCodeAt(i+3),m.push(r)}switch(c%4){case 0:i=2147483648;break;case 1:i=e.charCodeAt(c-1)<<24|8388608;break;case 2:i=e.charCodeAt(c-2)<<24|e.charCodeAt(c-1)<<16|32768;break;case 3:i=e.charCodeAt(c-3)<<24|e.charCodeAt(c-2)<<16|e.charCodeAt(c-1)<<8|128}for(m.push(i);m.length%16!=14;){m.push(0)}m.push(c>>>29);m.push(c<<3&4294967295);for(e=0;e<m.length;e+=16){for(i=0;i<16;i++){a[i]=m[e+i]}for(i=16;i<=79;i++){a[i]=t(a[i-3]^a[i-8]^a[i-14]^a[i-16],1)}r=o;c=s;d=l;h=u;p=f;for(i=0;i<=19;i++){v=t(r,5)+(c&d|~c&h)+p+a[i]+1518500249&4294967295,p=h,h=d,d=t(c,30),c=r,r=v}for(i=20;i<=39;i++){v=t(r,5)+(c^d^h)+p+a[i]+1859775393&4294967295,p=h,h=d,d=t(c,30),c=r,r=v}for(i=40;i<=59;i++){v=t(r,5)+(c&d|c&h|d&h)+p+a[i]+2400959708&4294967295,p=h,h=d,d=t(c,30),c=r,r=v}for(i=60;i<=79;i++){v=t(r,5)+(c^d^h)+p+a[i]+3395469782&4294967295,p=h,h=d,d=t(c,30),c=r,r=v}o=o+r&4294967295;s=s+c&4294967295;l=l+d&4294967295;u=u+h&4294967295;f=f+p&4294967295}v=n(o)+n(s)+n(l)+n(u)+n(f);return v.toLowerCase()}var Ht={hex:function e(t){return Nt(t)}},Wt=function e(t){function s(e,t){var n,i,r,a,o;r=e&2147483648;a=t&2147483648;n=e&1073741824;i=t&1073741824;o=(e&1073741823)+(t&1073741823);return n&i?o^2147483648^r^a:n|i?o&1073741824?o^3221225472^r^a:o^1073741824^r^a:o^r^a}function n(e,t,n,i,r,a,o){e=s(e,s(s(t&n|~t&i,r),o));return s(e<<a|e>>>32-a,t)}function i(e,t,n,i,r,a,o){e=s(e,s(s(t&i|n&~i,r),o));return s(e<<a|e>>>32-a,t)}function r(e,t,n,i,r,a,o){e=s(e,s(s(t^n^i,r),o));return s(e<<a|e>>>32-a,t)}function a(e,t,n,i,r,a,o){e=s(e,s(s(n^(t|~i),r),o));return s(e<<a|e>>>32-a,t)}function o(e){var t="",n="",i;for(i=0;i<=3;i++){n=e>>>i*8&255,n="0"+n.toString(16),t+=n.substr(n.length-2,2)}return t}var l=[],u,f,c,d,h,p,v,m,t=function(e){for(var e=e.replace(/\r\n/g,"\n"),t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t+=String.fromCharCode(i):(i>127&&i<2048?t+=String.fromCharCode(i>>6|192):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128)),t+=String.fromCharCode(i&63|128))}return t}(t),l=function(e){var t,n=e.length;t=n+8;for(var i=((t-t%64)/64+1)*16,r=Array(i-1),a=0,o=0;o<n;){t=(o-o%4)/4,a=o%4*8,r[t]|=e.charCodeAt(o)<<a,o++}r[(o-o%4)/4]|=128<<o%4*8;r[i-2]=n<<3;r[i-1]=n>>>29;return r}(t);h=1732584193;p=4023233417;v=2562383102;m=271733878;for(t=0;t<l.length;t+=16){u=h,f=p,c=v,d=m,h=n(h,p,v,m,l[t+0],7,3614090360),m=n(m,h,p,v,l[t+1],12,3905402710),v=n(v,m,h,p,l[t+2],17,606105819),p=n(p,v,m,h,l[t+3],22,3250441966),h=n(h,p,v,m,l[t+4],7,4118548399),m=n(m,h,p,v,l[t+5],12,1200080426),v=n(v,m,h,p,l[t+6],17,2821735955),p=n(p,v,m,h,l[t+7],22,4249261313),h=n(h,p,v,m,l[t+8],7,1770035416),m=n(m,h,p,v,l[t+9],12,2336552879),v=n(v,m,h,p,l[t+10],17,4294925233),p=n(p,v,m,h,l[t+11],22,2304563134),h=n(h,p,v,m,l[t+12],7,1804603682),m=n(m,h,p,v,l[t+13],12,4254626195),v=n(v,m,h,p,l[t+14],17,2792965006),p=n(p,v,m,h,l[t+15],22,1236535329),h=i(h,p,v,m,l[t+1],5,4129170786),m=i(m,h,p,v,l[t+6],9,3225465664),v=i(v,m,h,p,l[t+11],14,643717713),p=i(p,v,m,h,l[t+0],20,3921069994),h=i(h,p,v,m,l[t+5],5,3593408605),m=i(m,h,p,v,l[t+10],9,38016083),v=i(v,m,h,p,l[t+15],14,3634488961),p=i(p,v,m,h,l[t+4],20,3889429448),h=i(h,p,v,m,l[t+9],5,568446438),m=i(m,h,p,v,l[t+14],9,3275163606),v=i(v,m,h,p,l[t+3],14,4107603335),p=i(p,v,m,h,l[t+8],20,1163531501),h=i(h,p,v,m,l[t+13],5,2850285829),m=i(m,h,p,v,l[t+2],9,4243563512),v=i(v,m,h,p,l[t+7],14,1735328473),p=i(p,v,m,h,l[t+12],20,2368359562),h=r(h,p,v,m,l[t+5],4,4294588738),m=r(m,h,p,v,l[t+8],11,2272392833),v=r(v,m,h,p,l[t+11],16,1839030562),p=r(p,v,m,h,l[t+14],23,4259657740),h=r(h,p,v,m,l[t+1],4,2763975236),m=r(m,h,p,v,l[t+4],11,1272893353),v=r(v,m,h,p,l[t+7],16,4139469664),p=r(p,v,m,h,l[t+10],23,3200236656),h=r(h,p,v,m,l[t+13],4,681279174),m=r(m,h,p,v,l[t+0],11,3936430074),v=r(v,m,h,p,l[t+3],16,3572445317),p=r(p,v,m,h,l[t+6],23,76029189),h=r(h,p,v,m,l[t+9],4,3654602809),m=r(m,h,p,v,l[t+12],11,3873151461),v=r(v,m,h,p,l[t+15],16,530742520),p=r(p,v,m,h,l[t+2],23,3299628645),h=a(h,p,v,m,l[t+0],6,4096336452),m=a(m,h,p,v,l[t+7],10,1126891415),v=a(v,m,h,p,l[t+14],15,2878612391),p=a(p,v,m,h,l[t+5],21,4237533241),h=a(h,p,v,m,l[t+12],6,1700485571),m=a(m,h,p,v,l[t+3],10,2399980690),v=a(v,m,h,p,l[t+10],15,4293915773),p=a(p,v,m,h,l[t+1],21,2240044497),h=a(h,p,v,m,l[t+8],6,1873313359),m=a(m,h,p,v,l[t+15],10,4264355552),v=a(v,m,h,p,l[t+6],15,2734768916),p=a(p,v,m,h,l[t+13],21,1309151649),h=a(h,p,v,m,l[t+4],6,4149444226),m=a(m,h,p,v,l[t+11],10,3174756917),v=a(v,m,h,p,l[t+2],15,718787259),p=a(p,v,m,h,l[t+9],21,3951481745),h=s(h,u),p=s(p,f),v=s(v,c),m=s(m,d)}return(o(h)+o(p)+o(v)+o(m)).toLowerCase()};function z(e,t){return new m(e,t)}function Vt(e,t){if(t<e.length+11)throw"Message too long for RSA (n="+t+", l="+e.length+")";for(var n=[],i=e.length-1;i>=0&&t>0;){var r=e.charCodeAt(i--);r<128?n[--t]=r:r>127&&r<2048?(n[--t]=r&63|128,n[--t]=r>>6|192):(n[--t]=r&63|128,n[--t]=r>>6&63|128,n[--t]=r>>12|224)}n[--t]=0;i=new R;for(r=[];t>2;){for(r[0]=0;r[0]==0;){i.nextBytes(r)}n[--t]=r[0]}n[--t]=2;n[--t]=0;return new m(n)}function E(){this.n=null;this.e=0;this.coeff=this.dmq1=this.dmp1=this.q=this.p=this.d=null}function jt(e,t){e!=null&&t!=null&&e.length>0&&t.length>0?(this.n=z(e,16),this.e=parseInt(t,16)):alert("Invalid RSA public key")}function Jt(e){return e.modPowInt(this.e,this.n)}function Gt(e){e=Vt(e,this.n.bitLength()+7>>3);if(e==null)return null;e=this.doPublic(e);if(e==null)return null;e=e.toString(16);return(e.length&1)==0?e:"0"+e}E.prototype.doPublic=Jt;E.prototype.setPublic=jt;E.prototype.encrypt=Gt;function Xt(e,t){for(var n=e.toByteArray(),i=0;i<n.length&&n[i]==0;){++i}if(n.length-i!=t-1||n[i]!=2)return null;for(++i;n[i]!=0;){if(++i>=n.length)return null}for(var r="";++i<n.length;){var a=n[i]&255;a<128?r+=String.fromCharCode(a):a>191&&a<224?(r+=String.fromCharCode((a&31)<<6|n[i+1]&63),++i):(r+=String.fromCharCode((a&15)<<12|(n[i+1]&63)<<6|n[i+2]&63),i+=2)}return r}function Kt(e,t,n){e!=null&&t!=null&&e.length>0&&t.length>0?(this.n=z(e,16),this.e=parseInt(t,16),this.d=z(n,16)):alert("Invalid RSA private key")}function $t(e,t,n,i,r,a,o,s){e!=null&&t!=null&&e.length>0&&t.length>0?(this.n=z(e,16),this.e=parseInt(t,16),this.d=z(n,16),this.p=z(i,16),this.q=z(r,16),this.dmp1=z(a,16),this.dmq1=z(o,16),this.coeff=z(s,16)):alert("Invalid RSA private key")}function Zt(e,t){var n=new C,i=e>>1;this.e=parseInt(t,16);for(var r=new m(t,16);;){for(;;){if(this.p=new m(e-i,1,n),this.p.subtract(m.ONE).gcd(r).compareTo(m.ONE)==0&&this.p.isProbablePrime(10))break}for(;;){if(this.q=new m(i,1,n),this.q.subtract(m.ONE).gcd(r).compareTo(m.ONE)==0&&this.q.isProbablePrime(10))break}if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q;this.q=a}var a=this.p.subtract(m.ONE),o=this.q.subtract(m.ONE),s=a.multiply(o);if(s.gcd(r).compareTo(m.ONE)==0){this.n=this.p.multiply(this.q);this.d=r.modInverse(s);this.dmp1=this.d.mod(a);this.dmq1=this.d.mod(o);this.coeff=this.q.modInverse(this.p);break}}}function Qt(e){if(this.p==null||this.q==null)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)}function en(e){e=this.doPrivate(z(e,16));return e==null?null:Xt(e,this.n.bitLength()+7>>3)}E.prototype.doPrivate=Qt;E.prototype.setPrivate=Kt;E.prototype.setPrivateEx=$t;E.prototype.generate=Zt;E.prototype.decrypt=en;var A=[];A.sha1="3021300906052b0e03021a05000414";A.sha256="3031300d060960864801650304020105000420";var B=[];B.sha1=Ht.hex;B.sha256=Ut.hex;function F(e,t,n){t/=4;for(var e=(0,B[n])(e),n="00"+A[n]+e,e="",t=t-4-n.length,i=0;i<t;i+=2){e+="ff"}return sPaddedMessageHex="0001"+e+n}function tn(e,t){var n=F(e,this.n.bitLength(),t);return this.doPrivate(z(n,16)).toString(16)}function nn(e){e=F(e,this.n.bitLength(),"sha1");return this.doPrivate(z(e,16)).toString(16)}function rn(e){e=F(e,this.n.bitLength(),"sha256");return this.doPrivate(z(e,16)).toString(16)}function an(e,t,n){var i=new E;i.setPublic(t,n);return i.doPublic(e)}function on(e,t,n){return an(e,t,n).toString(16).replace(/^1f+00/,"")}function sn(e){for(var t in A){var n=A[t],i=n.length;if(e.substring(0,i)==n)return[t,e.substring(i)]}return[]}function ln(e,t,n,i){t=on(t,n,i);n=sn(t);if(n.length==0)return!1;t=n[1];e=(0,B[n[0]])(e);return t==e}function un(e,t){var n=z(e,16);return ln(t,n,this.n.toString(16),this.e.toString(16))}function fn(e,t){var t=t.replace(/[ \n]+/g,""),n=this.doPublic(z(t,16)).toString(16).replace(/^1f+00/,""),i=sn(n);if(i.length==0)return!1;n=i[1];i=(0,B[i[0]])(e);return n==i}E.prototype.signString=tn;E.prototype.signStringWithSHA1=nn;E.prototype.signStringWithSHA256=rn;E.prototype.verifyString=fn;E.prototype.verifyHexSignatureForMessage=un;var O=function(){var u={Sbox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ShiftRowTab:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11]};u.Init=function(){u.Sbox_Inv=Array(256);for(var e=0;e<256;e++){u.Sbox_Inv[u.Sbox[e]]=e}u.ShiftRowTab_Inv=Array(16);for(e=0;e<16;e++){u.ShiftRowTab_Inv[u.ShiftRowTab[e]]=e}u.xtime=Array(256);for(e=0;e<128;e++){u.xtime[e]=e<<1,u.xtime[128+e]=e<<1^27}};u.Done=function(){delete u.Sbox_Inv;delete u.ShiftRowTab_Inv;delete u.xtime};u.ExpandKey=function(e){var t=e.length,n,i=1;switch(t){case 16:n=176;break;case 24:n=208;break;case 32:n=240;break;default:alert("my.ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!")}for(var r=t;r<n;r+=4){var a=e.slice(r-4,r);if(r%t==0){if(a=[u.Sbox[a[1]]^i,u.Sbox[a[2]],u.Sbox[a[3]],u.Sbox[a[0]]],(i<<=1)>=256)i^=283}else t>24&&r%t==16&&(a=[u.Sbox[a[0]],u.Sbox[a[1]],u.Sbox[a[2]],u.Sbox[a[3]]]);for(var o=0;o<4;o++){e[r+o]=e[r+o-t]^a[o]}}};u.Encrypt=function(e,t){var n=t.length;u.AddRoundKey(e,t.slice(0,16));for(var i=16;i<n-16;i+=16){u.SubBytes(e,u.Sbox),u.ShiftRows(e,u.ShiftRowTab),u.MixColumns(e),u.AddRoundKey(e,t.slice(i,i+16))}u.SubBytes(e,u.Sbox);u.ShiftRows(e,u.ShiftRowTab);u.AddRoundKey(e,t.slice(i,n))};u.Decrypt=function(e,t){var n=t.length;u.AddRoundKey(e,t.slice(n-16,n));u.ShiftRows(e,u.ShiftRowTab_Inv);u.SubBytes(e,u.Sbox_Inv);for(n-=32;n>=16;n-=16){u.AddRoundKey(e,t.slice(n,n+16)),u.MixColumns_Inv(e),u.ShiftRows(e,u.ShiftRowTab_Inv),u.SubBytes(e,u.Sbox_Inv)}u.AddRoundKey(e,t.slice(0,16))};u.SubBytes=function(e,t){for(var n=0;n<16;n++){e[n]=t[e[n]]}};u.AddRoundKey=function(e,t){for(var n=0;n<16;n++){e[n]^=t[n]}};u.ShiftRows=function(e,t){for(var n=[].concat(e),i=0;i<16;i++){e[i]=n[t[i]]}};u.MixColumns=function(e){for(var t=0;t<16;t+=4){var n=e[t+0],i=e[t+1],r=e[t+2],a=e[t+3],o=n^i^r^a;e[t+0]^=o^u.xtime[n^i];e[t+1]^=o^u.xtime[i^r];e[t+2]^=o^u.xtime[r^a];e[t+3]^=o^u.xtime[a^n]}};u.MixColumns_Inv=function(e){for(var t=0;t<16;t+=4){var n=e[t+0],i=e[t+1],r=e[t+2],a=e[t+3],o=n^i^r^a,s=u.xtime[o],l=u.xtime[u.xtime[s^n^r]]^o;o^=u.xtime[u.xtime[s^i^a]];e[t+0]^=l^u.xtime[n^i];e[t+1]^=o^u.xtime[i^r];e[t+2]^=l^u.xtime[r^a];e[t+3]^=o^u.xtime[a^n]}};return u}(),cn=function(){var l={};O.Init();l.b256to64=function(e){var t,n,i,r="",o=0,s=e.length;for(i=0;i<s;i++){n=e.charCodeAt(i),o==0?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>2&63),t=(n&3)<<4):o==1?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t|n>>4&15),t=(n&15)<<2):o==2&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t|n>>6&3),r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n&63)),o+=1,o==3&&(o=0)}o>0&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t),r+="=");o==1&&(r+="=");return r};l.b64to256=function(e){var t,n,i="",r=0,a=0,o=e.length;for(n=0;n<o;n++){t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n)),t>=0&&(r&&(i+=String.fromCharCode(a|t>>6-r&255)),r=r+2&7,a=t<<r&255)}return i};l.b16to64=function(e){var t,n,i="";e.length%2==1&&(e="0"+e);for(t=0;t+3<=e.length;t+=3){n=parseInt(e.substring(t,t+3),16),i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n&63)}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((n&3)<<4));for(;(i.length&3)>0;){i+="="}return i};l.b64to16=function(e){var t="",n,i=0,r;for(n=0;n<e.length;++n){if(e.charAt(n)=="=")break;v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n));v<0||(i==0?(t+=u(v>>2),r=v&3,i=1):i==1?(t+=u(r<<2|v>>4),r=v&15,i=2):i==2?(t+=u(r),t+=u(v>>2),r=v&3,i=3):(t+=u(r<<2|v>>4),t+=u(v&15),i=0))}i==1&&(t+=u(r<<2));return t};l.string2bytes=function(e){for(var t=[],n=0;n<e.length;n++){t.push(e.charCodeAt(n))}return t};l.bytes2string=function(e){for(var t="",n=0;n<e.length;n++){t+=String.fromCharCode(e[n])}return t};l.blockXOR=function(e,t){for(var n=Array(16),i=0;i<16;i++){n[i]=e[i]^t[i]}return n};l.blockIV=function(){var e=new R,t=Array(16);e.nextBytes(t);return t};l.pad16=function(e){var t=e.slice(0),n=(16-e.length%16)%16;for(i=e.length;i<e.length+n;i++){t.push(0)}return t};l.depad=function(e){for(e=e.slice(0);e[e.length-1]==0;){e=e.slice(0,e.length-1)}return e};l.encryptAESCBC=function(e,t){var n=t.slice(0);O.ExpandKey(n);for(var i=l.string2bytes(e),i=l.pad16(i),r=l.blockIV(),a=0;a<i.length/16;a++){var o=i.slice(a*16,a*16+16),s=r.slice(a*16,a*16+16),o=l.blockXOR(s,o);O.Encrypt(o,n);r=r.concat(o)}n=l.bytes2string(r);return l.b256to64(n)};l.decryptAESCBC=function(e,t){var n=t.slice(0);O.ExpandKey(n);for(var e=l.b64to256(e),i=l.string2bytes(e),r=[],a=1;a<i.length/16;a++){var o=i.slice(a*16,a*16+16),s=i.slice((a-1)*16,(a-1)*16+16);O.Decrypt(o,n);o=l.blockXOR(s,o);r=r.concat(o)}r=l.depad(r);return l.bytes2string(r)};l.wrap60=function(e){for(var t="",n=0;n<e.length;n++){n%60==0&&n!=0&&(t+="\n"),t+=e[n]}return t};l.generateAESKey=function(){var e=Array(16);(new R).nextBytes(e);return e};l.generateRSAKey=function(e,t){Math.seedrandom(Ut.hex(e));var n=new E;n.generate(t,"10001");return n};l.publicKeyString=function(e){return pubkey=e.n.toString(16)};l.publicKeyID=function(e){return Wt(e)};l.publicKeyFromString=function(e){var e=e.split("|")[0],t=new E;t.setPublic(e,"10001");return t};l.encrypt=function(e,t,n){var i="";try{var r=l.publicKeyFromString(t);i+=r.encrypt(e)+"?"}catch(e){return{status:"Invalid public key"}}return{status:"success",cipher:i}};l.decrypt=function(e,t){var n=e.split("?"),i=t.decrypt(n[0]);return{status:"success",plaintext:i,signature:"unsigned"}};return l}();L.exports=cn},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});var _=_||function(l,i){var e={},t=e.lib={},r=function e(){},n=t.Base={extend:function e(t){r.prototype=this;var n=new r;t&&n.mixIn(t);n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)});n.init.prototype=n;n.$super=this;return n},create:function e(){var t=this.extend();t.init.apply(t,arguments);return t},init:function e(){},mixIn:function e(t){for(var n in t){t.hasOwnProperty(n)&&(this[n]=t[n])}t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function e(){return this.init.prototype.extend(this)}},u=t.WordArray=n.extend({init:function e(t,n){t=this.words=t||[];this.sigBytes=n!=i?n:4*t.length},toString:function e(t){return(t||o).stringify(this)},concat:function e(t){var n=this.words,i=t.words,r=this.sigBytes;t=t.sigBytes;this.clamp();if(r%4)for(var a=0;a<t;a++){n[r+a>>>2]|=(i[a>>>2]>>>24-8*(a%4)&255)<<24-8*((r+a)%4)}else if(65535<i.length)for(a=0;a<t;a+=4){n[r+a>>>2]=i[a>>>2]}else n.push.apply(n,i);this.sigBytes+=t;return this},clamp:function e(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-8*(n%4);t.length=l.ceil(n/4)},clone:function e(){var t=n.clone.call(this);t.words=this.words.slice(0);return t},random:function e(t){for(var n=[],i=0;i<t;i+=4){n.push(4294967296*l.random()|0)}return new u.init(n,t)}}),a=e.enc={},o=a.Hex={stringify:function e(t){var n=t.words;t=t.sigBytes;for(var i=[],r=0;r<t;r++){var a=n[r>>>2]>>>24-8*(r%4)&255;i.push((a>>>4).toString(16));i.push((a&15).toString(16))}return i.join("")},parse:function e(t){for(var n=t.length,i=[],r=0;r<n;r+=2){i[r>>>3]|=parseInt(t.substr(r,2),16)<<24-4*(r%8)}return new u.init(i,n/2)}},s=a.Latin1={stringify:function e(t){var n=t.words;t=t.sigBytes;for(var i=[],r=0;r<t;r++){i.push(String.fromCharCode(n[r>>>2]>>>24-8*(r%4)&255))}return i.join("")},parse:function e(t){for(var n=t.length,i=[],r=0;r<n;r++){i[r>>>2]|=(t.charCodeAt(r)&255)<<24-8*(r%4)}return new u.init(i,n)}},f=a.Utf8={stringify:function e(t){try{return decodeURIComponent(escape(s.stringify(t)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function e(t){return s.parse(unescape(encodeURIComponent(t)))}},c=t.BufferedBlockAlgorithm=n.extend({reset:function e(){this._data=new u.init;this._nDataBytes=0},_append:function e(t){"string"==typeof t&&(t=f.parse(t));this._data.concat(t);this._nDataBytes+=t.sigBytes},_process:function e(t){var n=this._data,i=n.words,r=n.sigBytes,a=this.blockSize,o=r/(4*a),o=t?l.ceil(o):l.max((o|0)-this._minBufferSize,0);t=o*a;r=l.min(4*t,r);if(t){for(var s=0;s<t;s+=a){this._doProcessBlock(i,s)}s=i.splice(0,t);n.sigBytes-=r}return new u.init(s,r)},clone:function e(){var t=n.clone.call(this);t._data=this._data.clone();return t},_minBufferSize:0});t.Hasher=c.extend({cfg:n.extend(),init:function e(t){this.cfg=this.cfg.extend(t);this.reset()},reset:function e(){c.reset.call(this);this._doReset()},update:function e(t){this._append(t);this._process();return this},finalize:function e(t){t&&this._append(t);return this._doFinalize()},blockSize:16,_createHelper:function e(n){return function(e,t){return new n.init(t).finalize(e)}},_createHmacHelper:function e(n){return function(e,t){return new d.HMAC.init(n,t).finalize(e)}}});var d=e.algo={};return e}(Math);(function(){var e=_,u=e.lib.WordArray;e.enc.Base64={stringify:function e(t){var n=t.words,i=t.sigBytes,r=this._map;t.clamp();t=[];for(var a=0;a<i;a+=3){for(var o=(n[a>>>2]>>>24-8*(a%4)&255)<<16|(n[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|n[a+2>>>2]>>>24-8*((a+2)%4)&255,s=0;4>s&&a+.75*s<i;s++){t.push(r.charAt(o>>>6*(3-s)&63))}}if(n=r.charAt(64))for(;t.length%4;){t.push(n)}return t.join("")},parse:function e(t){var n=t.length,i=this._map,r=i.charAt(64);r&&(r=t.indexOf(r),-1!=r&&(n=r));for(var r=[],a=0,o=0;o<n;o++){if(o%4){var s=i.indexOf(t.charAt(o-1))<<2*(o%4),l=i.indexOf(t.charAt(o))>>>6-2*(o%4);r[a>>>2]|=(s|l)<<24-8*(a%4);a++}}return u.create(r,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();(function(o){function C(e,t,n,i,r,a,o){e=e+(t&n|~t&i)+r+o;return(e<<a|e>>>32-a)+t}function D(e,t,n,i,r,a,o){e=e+(t&i|n&~i)+r+o;return(e<<a|e>>>32-a)+t}function T(e,t,n,i,r,a,o){e=e+(t^n^i)+r+o;return(e<<a|e>>>32-a)+t}function M(e,t,n,i,r,a,o){e=e+(n^(t|~i))+r+o;return(e<<a|e>>>32-a)+t}for(var e=_,t=e.lib,n=t.WordArray,i=t.Hasher,t=e.algo,k=[],r=0;64>r;r++){k[r]=4294967296*o.abs(o.sin(r+1))|0}t=t.MD5=i.extend({_doReset:function e(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function e(t,n){for(var i=0;16>i;i++){var r=n+i,a=t[r];t[r]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}var i=this._hash.words,r=t[n+0],a=t[n+1],o=t[n+2],s=t[n+3],l=t[n+4],u=t[n+5],f=t[n+6],c=t[n+7],d=t[n+8],h=t[n+9],p=t[n+10],v=t[n+11],m=t[n+12],y=t[n+13],g=t[n+14],S=t[n+15],b=i[0],P=i[1],w=i[2],_=i[3],b=C(b,P,w,_,r,7,k[0]),_=C(_,b,P,w,a,12,k[1]),w=C(w,_,b,P,o,17,k[2]),P=C(P,w,_,b,s,22,k[3]),b=C(b,P,w,_,l,7,k[4]),_=C(_,b,P,w,u,12,k[5]),w=C(w,_,b,P,f,17,k[6]),P=C(P,w,_,b,c,22,k[7]),b=C(b,P,w,_,d,7,k[8]),_=C(_,b,P,w,h,12,k[9]),w=C(w,_,b,P,p,17,k[10]),P=C(P,w,_,b,v,22,k[11]),b=C(b,P,w,_,m,7,k[12]),_=C(_,b,P,w,y,12,k[13]),w=C(w,_,b,P,g,17,k[14]),P=C(P,w,_,b,S,22,k[15]),b=D(b,P,w,_,a,5,k[16]),_=D(_,b,P,w,f,9,k[17]),w=D(w,_,b,P,v,14,k[18]),P=D(P,w,_,b,r,20,k[19]),b=D(b,P,w,_,u,5,k[20]),_=D(_,b,P,w,p,9,k[21]),w=D(w,_,b,P,S,14,k[22]),P=D(P,w,_,b,l,20,k[23]),b=D(b,P,w,_,h,5,k[24]),_=D(_,b,P,w,g,9,k[25]),w=D(w,_,b,P,s,14,k[26]),P=D(P,w,_,b,d,20,k[27]),b=D(b,P,w,_,y,5,k[28]),_=D(_,b,P,w,o,9,k[29]),w=D(w,_,b,P,c,14,k[30]),P=D(P,w,_,b,m,20,k[31]),b=T(b,P,w,_,u,4,k[32]),_=T(_,b,P,w,d,11,k[33]),w=T(w,_,b,P,v,16,k[34]),P=T(P,w,_,b,g,23,k[35]),b=T(b,P,w,_,a,4,k[36]),_=T(_,b,P,w,l,11,k[37]),w=T(w,_,b,P,c,16,k[38]),P=T(P,w,_,b,p,23,k[39]),b=T(b,P,w,_,y,4,k[40]),_=T(_,b,P,w,r,11,k[41]),w=T(w,_,b,P,s,16,k[42]),P=T(P,w,_,b,f,23,k[43]),b=T(b,P,w,_,h,4,k[44]),_=T(_,b,P,w,m,11,k[45]),w=T(w,_,b,P,S,16,k[46]),P=T(P,w,_,b,o,23,k[47]),b=M(b,P,w,_,r,6,k[48]),_=M(_,b,P,w,c,10,k[49]),w=M(w,_,b,P,g,15,k[50]),P=M(P,w,_,b,u,21,k[51]),b=M(b,P,w,_,m,6,k[52]),_=M(_,b,P,w,s,10,k[53]),w=M(w,_,b,P,p,15,k[54]),P=M(P,w,_,b,a,21,k[55]),b=M(b,P,w,_,d,6,k[56]),_=M(_,b,P,w,S,10,k[57]),w=M(w,_,b,P,f,15,k[58]),P=M(P,w,_,b,y,21,k[59]),b=M(b,P,w,_,l,6,k[60]),_=M(_,b,P,w,v,10,k[61]),w=M(w,_,b,P,o,15,k[62]),P=M(P,w,_,b,h,21,k[63]);i[0]=i[0]+b|0;i[1]=i[1]+P|0;i[2]=i[2]+w|0;i[3]=i[3]+_|0},_doFinalize:function e(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var a=o.floor(i/4294967296);n[(r+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;n[(r+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360;t.sigBytes=4*(n.length+1);this._process();t=this._hash;n=t.words;for(i=0;4>i;i++){r=n[i],n[i]=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360}return t},clone:function e(){var t=i.clone.call(this);t._hash=this._hash.clone();return t}});e.MD5=i._createHelper(t);e.HmacMD5=i._createHmacHelper(t)})(Math);(function(){var e=_,t=e.lib,n=t.Base,f=t.WordArray,t=e.algo,i=t.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function e(t){this.cfg=this.cfg.extend(t)},compute:function e(t,n){for(var i=this.cfg,r=i.hasher.create(),a=f.create(),o=a.words,s=i.keySize,i=i.iterations;o.length<s;){l&&r.update(l);var l=r.update(t).finalize(n);r.reset();for(var u=1;u<i;u++){l=r.finalize(l),r.reset()}a.concat(l)}a.sigBytes=4*s;return a}});e.EvpKDF=function(e,t,n){return i.create(n).compute(e,t)}})();_.lib.Cipher||function(o){var e=_,t=e.lib,n=t.Base,s=t.WordArray,i=t.BufferedBlockAlgorithm,r=e.enc.Base64,a=e.algo.EvpKDF,l=t.Cipher=i.extend({cfg:n.extend(),createEncryptor:function e(t,n){return this.create(this._ENC_XFORM_MODE,t,n)},createDecryptor:function e(t,n){return this.create(this._DEC_XFORM_MODE,t,n)},init:function e(t,n,i){this.cfg=this.cfg.extend(i);this._xformMode=t;this._key=n;this.reset()},reset:function e(){i.reset.call(this);this._doReset()},process:function e(t){this._append(t);return this._process()},finalize:function e(t){t&&this._append(t);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function e(r){return{encrypt:function e(t,n,i){return("string"==typeof n?p:h).encrypt(r,t,n,i)},decrypt:function e(t,n,i){return("string"==typeof n?p:h).decrypt(r,t,n,i)}}}});t.StreamCipher=l.extend({_doFinalize:function e(){return this._process(!0)},blockSize:1});var u=e.mode={},f=function e(t,n,i){var r=this._iv;r?this._iv=o:r=this._prevBlock;for(var a=0;a<i;a++){t[n+a]^=r[a]}},c=(t.BlockCipherMode=n.extend({createEncryptor:function e(t,n){return this.Encryptor.create(t,n)},createDecryptor:function e(t,n){return this.Decryptor.create(t,n)},init:function e(t,n){this._cipher=t;this._iv=n}})).extend();c.Encryptor=c.extend({processBlock:function e(t,n){var i=this._cipher,r=i.blockSize;f.call(this,t,n,r);i.encryptBlock(t,n);this._prevBlock=t.slice(n,n+r)}});c.Decryptor=c.extend({processBlock:function e(t,n){var i=this._cipher,r=i.blockSize,a=t.slice(n,n+r);i.decryptBlock(t,n);f.call(this,t,n,r);this._prevBlock=a}});u=u.CBC=c;c=(e.pad={}).Pkcs7={pad:function e(t,n){for(var i=4*n,i=i-t.sigBytes%i,r=i<<24|i<<16|i<<8|i,a=[],o=0;o<i;o+=4){a.push(r)}i=s.create(a,i);t.concat(i)},unpad:function e(t){t.sigBytes-=t.words[t.sigBytes-1>>>2]&255}};t.BlockCipher=l.extend({cfg:l.cfg.extend({mode:u,padding:c}),reset:function e(){l.reset.call(this);var t=this.cfg,n=t.iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=t.createEncryptor;else i=t.createDecryptor,this._minBufferSize=1;this._mode=i.call(t,this,n&&n.words)},_doProcessBlock:function e(t,n){this._mode.processBlock(t,n)},_doFinalize:function e(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var n=this._process(!0)}else n=this._process(!0),t.unpad(n);return n},blockSize:4});var d=t.CipherParams=n.extend({init:function e(t){this.mixIn(t)},toString:function e(t){return(t||this.formatter).stringify(this)}}),u=(e.format={}).OpenSSL={stringify:function e(t){var n=t.ciphertext;t=t.salt;return(t?s.create([1398893684,1701076831]).concat(t).concat(n):n).toString(r)},parse:function e(t){t=r.parse(t);var n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var i=s.create(n.slice(2,4));n.splice(0,4);t.sigBytes-=16}return d.create({ciphertext:t,salt:i})}},h=t.SerializableCipher=n.extend({cfg:n.extend({format:u}),encrypt:function e(t,n,i,r){r=this.cfg.extend(r);var a=t.createEncryptor(i,r);n=a.finalize(n);a=a.cfg;return d.create({ciphertext:n,key:i,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function e(t,n,i,r){r=this.cfg.extend(r);n=this._parse(n,r.format);return t.createDecryptor(i,r).finalize(n.ciphertext)},_parse:function e(t,n){return"string"==typeof t?n.parse(t,this):t}}),e=(e.kdf={}).OpenSSL={execute:function e(t,n,i,r){r||(r=s.random(8));t=a.create({keySize:n+i}).compute(t,r);i=s.create(t.words.slice(n),4*i);t.sigBytes=4*n;return d.create({key:t,iv:i,salt:r})}},p=t.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:e}),encrypt:function e(t,n,i,r){r=this.cfg.extend(r);i=r.kdf.execute(i,t.keySize,t.ivSize);r.iv=i.iv;t=h.encrypt.call(this,t,n,i.key,r);t.mixIn(i);return t},decrypt:function e(t,n,i,r){r=this.cfg.extend(r);n=this._parse(n,r.format);i=r.kdf.execute(i,t.keySize,t.ivSize,n.salt);r.iv=i.iv;return h.decrypt.call(this,t,n,i.key,r)}})}();(function(){for(var e=_,t=e.lib.BlockCipher,n=e.algo,s=[],r=[],i=[],a=[],o=[],l=[],u=[],f=[],c=[],d=[],h=[],p=0;256>p;p++){h[p]=128>p?p<<1:p<<1^283}for(var v=0,m=0,p=0;256>p;p++){var y=m^m<<1^m<<2^m<<3^m<<4,y=y>>>8^y&255^99;s[v]=y;r[y]=v;var g=h[v],S=h[g],b=h[S],P=257*h[y]^16843008*y;i[v]=P<<24|P>>>8;a[v]=P<<16|P>>>16;o[v]=P<<8|P>>>24;l[v]=P;P=16843009*b^65537*S^257*g^16843008*v;u[y]=P<<24|P>>>8;f[y]=P<<16|P>>>16;c[y]=P<<8|P>>>24;d[y]=P;v?(v=g^h[h[h[b^g]]],m^=h[h[m]]):v=m=1}var w=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=t.extend({_doReset:function e(){for(var t=this._key,n=t.words,i=t.sigBytes/4,t=4*((this._nRounds=i+6)+1),r=this._keySchedule=[],a=0;a<t;a++){if(a<i)r[a]=n[a];else{var o=r[a-1];a%i?6<i&&4==a%i&&(o=s[o>>>24]<<24|s[o>>>16&255]<<16|s[o>>>8&255]<<8|s[o&255]):(o=o<<8|o>>>24,o=s[o>>>24]<<24|s[o>>>16&255]<<16|s[o>>>8&255]<<8|s[o&255],o^=w[a/i|0]<<24);r[a]=r[a-i]^o}}n=this._invKeySchedule=[];for(i=0;i<t;i++){a=t-i,o=i%4?r[a]:r[a-4],n[i]=4>i||4>=a?o:u[s[o>>>24]]^f[s[o>>>16&255]]^c[s[o>>>8&255]]^d[s[o&255]]}},encryptBlock:function e(t,n){this._doCryptBlock(t,n,this._keySchedule,i,a,o,l,s)},decryptBlock:function e(t,n){var i=t[n+1];t[n+1]=t[n+3];t[n+3]=i;this._doCryptBlock(t,n,this._invKeySchedule,u,f,c,d,r);i=t[n+1];t[n+1]=t[n+3];t[n+3]=i},_doCryptBlock:function e(t,n,i,r,a,o,s,l){for(var u=this._nRounds,f=t[n]^i[0],c=t[n+1]^i[1],d=t[n+2]^i[2],h=t[n+3]^i[3],p=4,v=1;v<u;v++){var m=r[f>>>24]^a[c>>>16&255]^o[d>>>8&255]^s[h&255]^i[p++],y=r[c>>>24]^a[d>>>16&255]^o[h>>>8&255]^s[f&255]^i[p++],g=r[d>>>24]^a[h>>>16&255]^o[f>>>8&255]^s[c&255]^i[p++],h=r[h>>>24]^a[f>>>16&255]^o[c>>>8&255]^s[d&255]^i[p++],f=m,c=y,d=g}m=(l[f>>>24]<<24|l[c>>>16&255]<<16|l[d>>>8&255]<<8|l[h&255])^i[p++];y=(l[c>>>24]<<24|l[d>>>16&255]<<16|l[h>>>8&255]<<8|l[f&255])^i[p++];g=(l[d>>>24]<<24|l[h>>>16&255]<<16|l[f>>>8&255]<<8|l[c&255])^i[p++];h=(l[h>>>24]<<24|l[f>>>16&255]<<16|l[c>>>8&255]<<8|l[d&255])^i[p++];t[n]=m;t[n+1]=y;t[n+2]=g;t[n+3]=h},keySize:8});e.AES=t._createHelper(n)})();t["default"]=_},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});var i=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();function r(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var a=function(){var e=function(){function e(){r(this,e)}i(e,[{key:"createClientObject",value:function e(t,n,i,r){return{socket:t,id:n,playURL:i,deviceSerial:r.deviceSerial||"",verificationCode:r.verificationCode||"",resolve:null,reject:null}}},{key:"playCmd",value:function e(t){var n={sequence:0,cmd:"realplay",deviceSerial:t.deviceSerial,verificationCode:t.verificationCode,url:t.playURL};return JSON.stringify(n)}},{key:"playbackCmd",value:function e(t,n,i){var r={sequence:0,cmd:"playback",deviceSerial:t.deviceSerial,verificationCode:t.verificationCode,url:t.playURL,startTime:n,endTime:i};return JSON.stringify(r)}}]);return e}();return e}();t.LocalService=a},function(w,e,t){Object.defineProperty(e,"__esModule",{value:true});e.JSPlayCtrl=undefined;var n=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();var i=t(13);var r=a(i);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var D=0;var T=1;var f=2;var M=11;var k=16;var x=31;var I=35;var R=36;var z=48;var l=60;var o=61;var u=63;var E=100;var A=101;var c=0;var d=1;var h=0;var p=1;var v=0;var B=1;var F=15;var m=8;var y=1;var O=50;var L=5;var q=2;var Y=5*1024*1024;var g=1024*20;var J=100;var G=20;var X=100;var S=200;var K={width:0,height:0,frameNum:0,yuvData:null};var $={width:0,height:0,frameNum:0,yuvData:null};var Z={sampleRate:0,channel:0,bitsPerSample:0,length:0,pcmData:null};var Q={id:null,cmd:null,data:null,errorCode:0,status:null};e.JSPlayCtrl=function(){function i(e,t,o,n){s(this,i);if(e!=null&&e!==undefined&&typeof e==="string"){this.szBasePath=e}else{return D}if(t&&typeof t==="function"){this.fnCallBack=t}else{return D}if(typeof n==="string"){this.staticPath=n}this.decodeWorker=null;this.streamOpenMode=null;this.bOpenStream=false;this.audioRenderer=null;this.aAudioBuffer=[];this.iAudioBufferSize=0;this.Volume=0;this.oSuperRender=null;this.aVideoFrameBuffer=[];this.YUVBufferSize=y;this.szOSDTime=null;this.bJSPrintLog=false;this.bWriteYUVData=false;this.iYUV10size=0;this.aVideoYUVBuffer=[];this.bWritePCMData=false;this.iAudioBuffer500Size=0;this.aAudioPCMBuffer=[];this.bWriteRawData=false;this.iRawDataSize=0;this.aRawDataBuffer=[];this.bWriteRTPData=true;this.iRTPDataSize=0;this.aRTPDataBuffer=[];this.downloadRTP=false;this.rtpNum=0;this.bPlaySound=false;this.bPlay=false;this.bPause=false;this.bOnebyOne=false;this.bPlayRateChange=false;this.audioNum=0;this.videoNum=0;this.FrameForwardLen=1;this.bOnlyPlaySound=false;this.bVideoCropInfo=false;this.dataCallBackFun=null;this.YUVBufSizeCBFun=null;this.DecCallBackFun=null;this.DisplayCallBackFun=null;this.PCMCallBackFun=null;this.DecInfoYUV=K;this.DisplayInfoYUV=$;this.DecInfoPCM=Z;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=true;this.nDecFrameType=v;this.runtimeInfoCBFun=null;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=false;this.stYUVRect={top:0,left:0,right:0,bottom:0};this.aInputDataLens=[];this.aInputDataBuffer=[];this.bIsGetYUV=false;this.bIsFirstFrame=true;this.iInputMaxBufSize=Y;this.bIsInput=false;this.bIsInputBufOver=false;this.bIsInputBufWillOver=false;this.iInputDataLen=g;var C=this;this.errorCode=T;this.loopNum=0;this.setCallBack=function(e,t,n,i,r){var a=Q;a.id=o;a.cmd=t;a.data=n;a.errorCode=i;a.status=r;e.fnCallBack(a)};this.convertErrorCode=function(e){switch(e){case 1:return T;case 98:return D;default:return e}};this.arrayBufferCopy=function(e){var t=e.byteLength;var n=new Uint8Array(t);var i=new Uint8Array(e);var r=0;for(r=0;r<t;r++){n[r]=i[r]}return n};this.inputDataFun=function(){var e;var t;var n=0;C.bIsGetYUV=false;if(C.bIsInputBufOver||C.bIsInputBufWillOver){e=new Uint8Array(1);t=new Uint8Array(e);var i={command:"InputData",data:t.buffer,dataSize:0};C.decodeWorker.postMessage(i,[i.data])}else{if(C.bPlay&&(!C.bPause||C.bOnebyOne)||this.bOnlyPlaySound){while(C.aInputDataLens.length>0){n+=C.aInputDataLens.shift();if(n>C.iInputDataLen){break}}e=C.aInputDataBuffer.splice(0,n);t=new Uint8Array(e);var i={command:"InputData",data:t.buffer,dataSize:n};C.decodeWorker.postMessage(i,[i.data])}}e=null;t=null};this.getPic=function(e,t){if(this.decodeWorker==null||this.oSuperRender==null){return f}if(!this.bPlay){return f}if(e&&typeof e==="function"){this.dataCallBackFun=e}else{return D}if(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}else{var n=this.nWidth/this.iCanvasWidth;var i=this.nHeight/this.iCanvasHeight;this.stYUVRect.left=Math.round(this.stDisplayRect.left*n);this.stYUVRect.top=Math.round(this.stDisplayRect.top*i);this.stYUVRect.right=Math.round(this.stDisplayRect.right*n);this.stYUVRect.bottom=Math.round(this.stDisplayRect.bottom*i)}if(this.stYUVRect.right-this.stYUVRect.left<32||this.stYUVRect.bottom-this.stYUVRect.top<32){return D}}if(this.aDisplayBuf==null){return f}var r=this.arrayBufferCopy(this.aDisplayBuf);var a={command:t,data:r.buffer,width:this.nWidth,height:this.nHeight,rect:this.stYUVRect};this.decodeWorker.postMessage(a,[a.data]);return T};this.createWorker=function(_){if(window.Worker){if(this.decodeWorker==null){var e=new Blob([(0,r["default"])(this.staticPath)]);var t=URL.createObjectURL(e);this.decodeWorker=new Worker(t);if(_.bJSPrintLog){console.log(">>>JSPlayV1.1 createWorker success!")}if(this.decodeWorker==null){return l}}this.decodeWorker.onmessage=function(e){var t=null;var n=e.data;switch(n["function"]){case"printLog":console.log("print JSPlayerSDK log failed");break;case"loaded":t="loaded";_.setCallBack(_,"loaded",0,0,true);break;case"SetStreamOpenMode":t="SetStreamOpenMode";break;case"OpenStream":t="OpenStream";if(1===n.errorCode){C.bOpenStream=true;return}break;case"InputData":t="InputData";if(n.errorCode===M){C.bIsInputBufOver=true;console.log("yff inputBuffer over set key frame \n");if(C.nDecFrameType!=B){C.PlayM4_SetDecodeFrameType(B)}}if(n.errorCode===R){C.bIsInputBufWillOver=true}if(n.errorCode===x){C.bIsInputBufOver=false;C.bIsInputBufWillOver=false;if(C.aInputDataLens.length>0&&C.bIsInput){C.inputDataFun();C.bIsInput=false}else{C.bIsGetYUV=true}}break;case"GetFrameData":t="GetFrameData";if(!C.bOnlyPlaySound){if(n.data!=null&&n.frameInfo!=null){n.frameInfo.width;n.frameInfo.height}if(!C.bPlay){return}C.errorCode=n.errorCode;if(!C.bIsFirstFrame&&(n.errorCode===x||n.errorCode===I)){if(n.errorCode===x){C.bIsInputBufOver=false;C.bIsInputBufWillOver=false}if(C.loopNum>5){C.bIsGetYUV=true;C.loopNum=0}else{C.inputDataFun();C.loopNum++}break}else if(C.bIsInputBufOver||C.bIsInputBufWillOver){C.inputDataFun()}else{if(n.type==="videoType"){if(C.aInputDataLens.length>0&&C.bIsInput){C.inputDataFun();C.bIsInput=false}else{C.bIsGetYUV=true}C.bIsFirstFrame=false}}}if(C.bVisibility){if(T===n.errorCode){switch(n.type){case"videoType":if(n.data==null||n.frameInfo==null){return D}if(C.DecCallBackFun!=null){C.DecInfoYUV.height=n.frameInfo.height;C.DecInfoYUV.width=n.frameInfo.width;C.DecInfoYUV.frameNum=n.frameInfo.frameNum;C.DecInfoYUV.yuvData=new Uint8Array(n.data);C.DecCallBackFun(C.DecInfoYUV)}C.bIsFirstFrame=false;_.nWidth=n.frameInfo.width;_.nHeight=n.frameInfo.height;_.nSPSCropLeft=n.frameInfo.cropLeft;_.nSPSCropRight=n.frameInfo.cropRight;_.nSPSCropTop=n.frameInfo.cropTop;_.nSPSCropBottom=n.frameInfo.cropBottom;var a=new Object;a.data=n.data;a.osdTime=n.osd;a.nWidth=n.frameInfo.width;a.nHeight=n.frameInfo.height;a.frameNum=n.frameInfo.frameNum;a.timeStamp=n.frameInfo.timeStamp;if(_.bWriteYUVData){var o=new Uint8Array(n.data);var s=_.aVideoYUVBuffer.length;for(var l=0,u=o.length;l<u;l++){_.aVideoYUVBuffer[s+l]=o[l]}_.iYUV10size++;o=null}if(_.bWriteYUVData&&_.iYUV10size>=G){var f=new Uint8Array(_.aVideoYUVBuffer);_.downloadFile(f,"videoYUV.data");_.aVideoYUVBuffer.splice(0,_.aVideoYUVBuffer.length);_.bWriteYUVData=false;_.iYUV10size=0;f=null}_.aVideoFrameBuffer.push(a);a=null;var c=_.aVideoFrameBuffer.length;if(c>L){if(!_.bOnebyOne){_.aVideoFrameBuffer.splice(0,q)}}if(_.bOnebyOne){if(_.aVideoFrameBuffer.length>=F){_.setCallBack(_,"OnebyOne",0,0,false);_.bIsFirstFrame=true;break}}break;case"audioType":if(_.bPlaySound&&!_.bPlayRateChange||C.bOnlyPlaySound){if(C.PCMCallBackFun!=null){C.DecInfoPCM.sampleRate=n.frameInfo.samplesPerSec;C.DecInfoPCM.channel=n.frameInfo.channels;C.DecInfoPCM.bitsPerSample=n.frameInfo.bitsPerSample;C.DecInfoPCM.pcmData=new Uint8Array(n.data);C.DecInfoPCM.length=C.DecInfoPCM.pcmData.length;C.PCMCallBackFun(C.DecInfoPCM)}var o=new Uint8Array(n.data);var s=_.aAudioBuffer.length;for(var l=0,u=o.length;l<u;l++){_.aAudioBuffer[s+l]=o[l]}_.iAudioBufferSize++;o=null;if(_.bWritePCMData){var o=new Uint8Array(n.data);var s=_.aAudioPCMBuffer.length;for(var l=0,u=o.length;l<u;l++){_.aAudioPCMBuffer[s+l]=o[l]}console.log("audio_type num:"+_.iAudioBuffer500Size+", len:"+o.length);_.iAudioBuffer500Size++;o=null}if(_.bWritePCMData&&_.iAudioBuffer500Size>=J){var d=new Uint8Array(_.aAudioPCMBuffer);_.downloadFile(d,"audioPCM.data");_.aAudioPCMBuffer.splice(0,_.aAudioPCMBuffer.length);_.bWritePCMData=false;_.iAudioBuffer500Size=0;d=null}if(_.iAudioBufferSize>=O){_.audioRenderer.Play(_.aAudioBuffer,_.aAudioBuffer.length,n.frameInfo);_.aAudioBuffer.splice(0,_.aAudioBuffer.length);_.aAudioBuffer.length=0;_.iAudioBufferSize=0}}break}}}break;case"GetRawData":t="GetRawData";if(_.bWriteRawData){var h=new Uint8Array(n.data);var p=_.aRawDataBuffer.length;for(var l=0,u=h.length;l<u;l++){_.aRawDataBuffer[p+l]=h[l]}_.iRawDataSize++;h=null}if(_.bWriteRawData&&_.iRawDataSize>=X){var v=new Uint8Array(_.aRawDataBuffer);_.downloadFile(v,"rawBuffer.data");_.aRawDataBuffer.splice(0,_.aRawDataBuffer.length);_.bWriteRawData=false;_.iRawDataSize=0;v=null}break;case"PlaySound":t="PlaySound";break;case"GetJPEG":t="GetJPEG";if(n.errorCode!==T){console.log("GetJPEG ErrorParam");return}var m=n.data;_.dataCallBackFun(m);break;case"GetBMP":t="GetBMP";if(n.errorCode!==T){console.log("GetBMP ErrorParam");return}var y=n.data;_.dataCallBackFun(y);break;case"RunTimeInfoCallBack":t="RunTimeInfoCallBack";var g=n.nRunTimeModule;var S=n.nStrVersion;var b=n.nFrameTimeStamp;var P=n.nFrameNum;var w=n.nErrorCode;if(_.runtimeInfoCBFun!=null){_.runtimeInfoCBFun(g,S,b,P,w)}}if("GetFrameData"!==t&&"loaded"!=t){_.setCallBack(_,t,0,_.convertErrorCode(n.errorCode),true)}else{if(k===n.errorCode||A===n.errorCode||E===n.errorCode||z===n.errorCode){_.setCallBack(_,t,0,_.convertErrorCode(n.errorCode),true)}}}}};this.createWorker(C);this.draw=function(){if(C.bPlay){if(!C.bPause||C.bOnebyOne){requestAnimationFrame(C.draw);var e=C.aVideoFrameBuffer.length;if(C.YUVBufSizeCBFun!=null){C.YUVBufSizeCBFun(e)}if(C.bOnebyOne){if(e<=m){C.setCallBack(C,"OnebyOne",0,x,true)}if(e<=C.FrameForwardLen+1){C.setCallBack(C,"OnebyOne",0,x,true);return}else{var t=C.FrameForwardLen;while(t>1){C.aVideoFrameBuffer.shift();t--}}C.bOnebyOne=false}if(e>0){var i=C.aVideoFrameBuffer.shift();C.aDisplayBuf=i.data;var r=new Uint8Array(C.aDisplayBuf);if(C.bVideoCropInfo){C.oSuperRender.SR_DisplayFrameData(i.nWidth,i.nHeight,r,i.nWidth-C.nSPSCropLeft-C.nSPSCropRight,i.nHeight-C.nSPSCropTop-C.nSPSCropBottom)}else{C.oSuperRender.SR_DisplayFrameData(i.nWidth,i.nHeight,r,i.nWidth,i.nHeight)}if(C.DisplayCallBackFun!=null){C.DisplayInfoYUV.height=i.nHeight;C.DisplayInfoYUV.width=i.nWidth;C.DisplayInfoYUV.frameNum=i.frameNum;C.DisplayInfoYUV.yuvData=new Uint8Array(r);C.DisplayCallBackFun(C.DisplayInfoYUV)}r=null;C.szOSDTime=i.osdTime;i=null}else{C.setCallBack(C,"Play",0,x,true)}}}else{if(!C.bPlay){C.aVideoFrameBuffer.splice(0,C.aVideoFrameBuffer.length);C.aAudioBuffer.splice(0,C.aAudioBuffer.length)}}}}n(i,[{key:"PlayM4_SetCurrentFrameNum",value:function e(t,n){return k}},{key:"PlayM4_OpenPlayerSDKPrintLog",value:function e(t){if(t===true){this.bJSPrintLog=true;this.decodeWorker.postMessage({command:"printLog",data:t})}else{this.bJSPrintLog=false;this.decodeWorker.postMessage({command:"printLog",data:t})}return T}},{key:"PlayM4_DownloadYUVdata",value:function e(){this.bWriteYUVData=true;return T}},{key:"PlayM4_DownloadPCMdata",value:function e(){this.bWritePCMData=true;return T}},{key:"PlayM4_SetDecCallBack",value:function e(t){if(t&&typeof t==="function"){this.DecCallBackFun=t;return T}else{return D}}},{key:"PlayM4_SetDisplayCallBack",value:function e(t){if(t&&typeof t==="function"){this.DisplayCallBackFun=t;return T}else{return D}}},{key:"PlayM4_SetPCMCallBack",value:function e(t){if(t&&typeof t==="function"){this.PCMCallBackFun=t;return T}else{return D}}},{key:"PlayM4_SetStreamOpenMode",value:function e(t){if(t==null||t===undefined){return D}if(t!==h&&t!==p){return D}this.streamOpenMode=t;return T}},{key:"PlayM4_DownloadRTPData",value:function e(t){this.downloadRTP=t}},{key:"PlayM4_SetVideoCropInfo",value:function e(t){if(t==null||t===undefined){return D}if(typeof t!=="boolean"){return D}this.bVideoCropInfo=t;return T}},{key:"PlayM4_OpenStream",value:function e(t,n,i){if(this.bJSPrintLog){console.log(">>>JS PlayM4_OpenStream nSysTime:"+((new Date).getMonth()+1)+"-"+(new Date).getDate()+" "+(new Date).getHours()+":"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds())}if(this.decodeWorker==null){return f}if(this.downloadRTP){var r=new Uint8Array(t.buffer);this.DownloadRTPData(r);console.log("write 40 hik head")}if(t==null||n<=0||i<=0){return D}this.bPlay=false;this.bPause=false;this.bOnebyOne=false;this.bIsFirstFrame=true;this.bIsGetYUV=false;this.bIsInput=false;this.decodeWorker.postMessage({command:"SetStreamOpenMode",data:this.streamOpenMode});this.decodeWorker.postMessage({command:"OpenStream",data:t,dataSize:n,bufPoolSize:i});this.bOpenStream=true;return T}},{key:"PlayM4_CloseStream",value:function e(){if(this.decodeWorker===null||this.bOpenStream===false){return f}this.bOnlyPlaySound=false;this.PlayM4_Stop();this.decodeWorker.postMessage({command:"CloseStream"});if(this.oSuperRender!==null){this.oSuperRender.SR_Destroy();this.oSuperRender=null}if(this.audioRenderer!==null){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.aVideoYUVBuffer.splice(0,this.aVideoYUVBuffer.length);this.aAudioPCMBuffer.splice(0,this.aAudioPCMBuffer.length);this.aRawDataBuffer.splice(0,this.aRawDataBuffer.length);this.bOpenStream=false;this.iAudioBufferSize=0;this.szOSDTime=null;return T}},{key:"PlayM4_Destroy",value:function e(){if(this.decodeWorker===null){return T}this.PlayM4_CloseStream();this.decodeWorker.terminate();this.decodeWorker=null;return T}},{key:"PlayM4_InputData",value:function e(t,n){var i=this.aInputDataBuffer.length;if(n===4){var r=new Uint8Array(t.buffer);if(r[0]===1&&r[1]===2&&r[2]===3&&r[3]===4){if(this.bIsFirstFrame){this.inputDataFun()}else{if(this.bIsGetYUV){this.inputDataFun()}else{this.bIsInput=true}}r=null;return T}}if(i+n>this.iInputMaxBufSize){console.log("input over");if(this.bIsGetYUV){this.inputDataFun()}else{this.bIsInput=true}return M}var a=null;var o=n;switch(this.streamOpenMode){case p:a=new Uint8Array(t.buffer);if(this.downloadRTP){this.DownloadRTPData(a);this.rtpNum++;console.log("STREAM_FILE psNUm:"+this.rtpNum)}this.aInputDataLens.push(n);break;case h:o=n+4;var s=new Uint32Array([n]);var l=new Uint8Array(s.buffer);a=new Uint8Array(o);a.set(l,0);a.set(t,4);if(this.downloadRTP){this.DownloadRTPData(a);this.rtpNum++;console.log("STREAM_REALTIME rtpNUm:"+this.rtpNum)}s=null;l=null;this.aInputDataLens.push(n+4);break;default:return k}for(var u=0;u<o;u++){this.aInputDataBuffer[i+u]=a[u]}if(!this.bPlay&&!this.bOnlyPlaySound||this.decodeWorker===null||this.bOpenStream===false){return T}a=null;if(this.bOnlyPlaySound){this.inputDataFun()}else{if(this.bIsFirstFrame){this.inputDataFun()}else{if(this.bIsGetYUV){this.inputDataFun()}else{this.bIsInput=true}}}return T}},{key:"DownloadRTPData",value:function e(t){if(this.bWriteRTPData){var n=new Uint8Array(t);var i=this.aRTPDataBuffer.length;for(var r=0,a=n.length;r<a;r++){this.aRTPDataBuffer[i+r]=n[r]}this.iRTPDataSize++;n=null}if(this.bWriteRTPData&&this.iRTPDataSize>=S){console.log("download"+S+"RTPdata");var o=new Uint8Array(this.aRTPDataBuffer);this.downloadFile(o,"RTP.data");this.aRTPDataBuffer.splice(0,this.aRTPDataBuffer.length);this.iRTPDataSize=0;this.rtpNum=0;this.downloadRTP=false;o=null}}},{key:"PlayM4_Play",value:function e(t){if(this.decodeWorker===null){return f}if(this.bJSPrintLog){console.log(">>>JS PlayM4_Play canvasID: "+t)}if(t===null){this.bOnlyPlaySound=true;this.decodeWorker.postMessage({command:"OnlyPlaySound"});this.sCanvasId=null}else{if(typeof t!=="string"){return D}if(this.bOnebyOne){this.bPlayRateChange=false;this.bOnebyOne=false;this.bPause=false;this.draw()}if(this.bPlay){return T}if(this.oSuperRender==null){this.oSuperRender=new SuperRender(t,this.szBasePath);if(this.oSuperRender==null){return o}}this.sCanvasId=t;this.bPlay=true;this.bPause=false;this.bOnebyOne=false;this.bPlayRateChange=false;this.bOnlyPlaySound=false;this.draw()}if(this.audioRenderer==null){this.audioRenderer=new AudioRenderer;if(this.audioRenderer==null){return o}}this.decodeWorker.postMessage({command:"Play"});return T}},{key:"PlayM4_Stop",value:function e(){if(this.decodeWorker==null||this.oSuperRender==null){return f}if(!this.bPlay){return f}if(this.bPlaySound){this.PlayM4_StopSound();this.bPlaySound=true}this.bPlay=false;this.bOnebyOne=false;this.bPause=false;this.oSuperRender.SR_SetDisplayRect(null);this.iZoomNum=0;this.bDisRect=false;return T}},{key:"PlayM4_PlayRate",value:function e(t){if(this.decodeWorker==null){return f}if(t===1){this.bPlayRateChange=false}else{this.bPlayRateChange=true}if(t<1){t=1}this.iInputDataLen=t*g;this.decodeWorker.postMessage({command:"PlayRate",playRate:t});return T}},{key:"PlayM4_Pause",value:function e(t){if(this.decodeWorker==null||this.oSuperRender==null){return f}if(!this.bPlay){return f}if(this.bOnebyOne){return f}if(this.bPause==t){return f}if(typeof t!=="boolean"){return D}this.bPause=t;this.bIsFirstFrame=true;if(t){if(this.bPlaySound){this.PlayM4_StopSound();this.bPlaySound=true}}else{if(this.bPlaySound){this.PlayM4_PlaySound()}this.draw()}return T}},{key:"PlayM4_OneByOne",value:function e(t){if(this.decodeWorker==null||this.oSuperRender==null){return f}if(!this.bPlay){return f}if(t>10||t<=0){return D}if(!t){t=1}this.iInputDataLen=g;this.FrameForwardLen=t;this.bPause=true;this.bOnebyOne=true;this.bIsFirstFrame=true;this.draw();return T}},{key:"PlayM4_PlaySound",value:function e(t){if(this.decodeWorker===null||this.bOpenStream===false){return f}if(t<0||t>16){return D}if(this.audioRenderer==null){this.audioRenderer=new AudioRenderer;if(this.audioRenderer==null){return o}}this.decodeWorker.postMessage({command:"PlaySound"});this.audioRenderer.SetWndNum(t);if(this.Volume!==0){this.audioRenderer.SetVolume(this.Volume)}this.audioRenderer.oAudioContext.resume();this.bPlaySound=true;return T}},{key:"PlayM4_StopSound",value:function e(){if(this.decodeWorker==null||this.audioRenderer==null){return f}if(!this.bPlaySound){return f}this.decodeWorker.postMessage({command:"StopSound"});this.bPlaySound=false;return T}},{key:"PlayM4_SetDisplayBuf",value:function e(t){if(this.decodeWorker==null){return f}if(t<=0){return D}this.YUVBufferSize=t;return T}},{key:"PlayM4_SetSecretKey",value:function e(t,n,i){if(this.decodeWorker==null||this.bOpenStream===false){return f}if(n==null){return D}if(d===t){if(128===i){if(n==null||n===undefined){return D}}else{return D}}else if(c===t);else{return D}this.decodeWorker.postMessage({command:"SetSecretKey",data:n,nKeyType:t,nKeyLen:i});return T}},{key:"PlayM4_SetDecodeFrameType",value:function e(t){console.log("PlayM4_SetDecodeFrameType nFrameType:"+t);if(this.decodeWorker==null||this.oSuperRender==null){return f}if(t!==v&&t!==B){return D}if(this.bJSPrintLog){console.log(">>>JS PlayM4_SetDecodeFrameType :"+t)}this.nDecFrameType=t;this.decodeWorker.postMessage({command:"SetDecodeFrameType",data:t});return T}},{key:"PlayM4_SetIFrameDecInterval",value:function e(t){if(this.nDecFrameType!==B){return f}if(t<0){return D}this.decodeWorker.postMessage({command:"SetIFrameDecInterval",data:t});return T}},{key:"PlayM4_SetLostFrameMode",value:function e(t){if(t<0||t>1){return D}this.decodeWorker.postMessage({command:"SetLostFrameMode",data:t});return T}},{key:"PlayM4_SetDisplayRegion",value:function e(t,n){if(this.decodeWorker===null||this.bPlay===false||this.oSuperRender===null){return f}if(this.canvasId===null){return f}if(n===true){if(t===null||t===undefined){return D}if(typeof t.left==="number"&&typeof t.top==="number"&&typeof t.right==="number"&&typeof t.bottom==="number"){if(t.right<0||t.left<0||t.top<0||t.bottom<0){return D}var i=t.left;var r=t.right;var a=t.top;var o=t.bottom;var s=document.getElementById(this.sCanvasId).getBoundingClientRect();this.iCanvasWidth=s.width;this.iCanvasHeight=s.height;if(r-i<16||o-a<16||r-i>this.iCanvasWidth||o-a>this.iCanvasHeight){return D}if(this.iZoomNum!==0){i=Math.round(i/this.iRatio_x)+this.stDisplayRect.left;a=Math.round(a/this.iRatio_y)+this.stDisplayRect.top;r=Math.round(r/this.iRatio_x)+this.stDisplayRect.left;o=Math.round(o/this.iRatio_y)+this.stDisplayRect.top}this.stDisplayRect={top:a,left:i,right:r,bottom:o};this.oSuperRender.SR_SetDisplayRect(this.stDisplayRect);this.bDisRect=true;var l=r-i;var u=o-a;this.iRatio_x=this.iCanvasWidth/l;this.iRatio_y=this.iCanvasHeight/u}else{return D}}else{this.oSuperRender.SR_SetDisplayRect(null);this.iZoomNum=0;this.bDisRect=false}if(this.bPause||this.bOnebyOne||this.bPlayRateChange){if(this.bVideoCropInfo){this.oSuperRender.SR_DisplayFrameData(this.nWidth,this.nHeight,new Uint8Array(this.aDisplayBuf),this.nWidth-this.nSPSCropLeft-this.nSPSCropRight,this.nHeight-this.nSPSCropTop-this.nSPSCropBottom)}else{this.oSuperRender.SR_DisplayFrameData(this.nWidth,this.nHeight,new Uint8Array(this.aDisplayBuf),this.nWidth,this.nHeight)}}return T}},{key:"PlayM4_GetBMP",value:function e(t){return this.getPic(t,"GetBMP")}},{key:"PlayM4_GetJPEG",value:function e(t){return this.getPic(t,"GetJPEG")}},{key:"PlayM4_SetVolume",value:function e(t){if(this.decodeWorker==null){return f}if(this.audioRenderer==null){return f}if(t<0||t>100||t===""){return D}this.Volume=t;this.audioRenderer.SetVolume(t);return T}},{key:"PlayM4_GetVolume",value:function e(t){if(this.decodeWorker==null){return f}if(this.audioRenderer==null){return f}if(t&&typeof t==="function"){var n=this.audioRenderer.GetVolume();if(n===null){return u}else{t(n);return T}}else{return D}}},{key:"PlayM4_GetOSDTime",value:function e(t){if(this.decodeWorker==null){return f}if(!this.bPlay){return f}if(t&&typeof t==="function"){t(this.szOSDTime);return T}else{return D}}},{key:"PlayM4_IsVisible",value:function e(t){this.bVisibility=t;return T}},{key:"PlayM4_GetSdkVersion",value:function e(){return"07040005"}},{key:"PlayM4_GetBuildDate",value:function e(){return"20230303"}},{key:"PlayM4_GetInputBufSize",value:function e(){return this.aInputDataBuffer.length}},{key:"PlayM4_SetInputBufSize",value:function e(t){if(t>0){this.iInputMaxBufSize=t;console.log(">>JSBufferSize SetInputBufSize:"+this.iInputMaxBufSize);return T}else{return D}}},{key:"PlayM4_GetYUVBufSize",value:function e(){return this.aVideoFrameBuffer.length}},{key:"PlayM4_GetFrameResolution",value:function e(t){if(this.decodeWorker==null){return f}if(t&&typeof t==="function"){t(this.nWidth,this.nHeight);return T}else{return D}}},{key:"PlayM4_RegisterYUVBufSizeCB",value:function e(t){if(t&&typeof t==="function"){this.YUVBufSizeCBFun=t;return T}else{return D}}},{key:"PlayM4_UnRegisterYUVBufSizeCB",value:function e(){if(this.YUVBufSizeCBFun!=null){this.YUVBufSizeCBFun=null}return T}},{key:"PlayM4_ClearCanvas",value:function e(){if(this.oSuperRender==null){return f}if(this.bVideoCropInfo){this.oSuperRender.SR_DisplayFrameData(this.nWidth,this.nHeight,null,this.nWidth-this.nSPSCropLeft-this.nSPSCropRight,this.nHeight-this.nSPSCropTop-this.nSPSCropBottom)}else{this.oSuperRender.SR_DisplayFrameData(this.nWidth,this.nHeight,null,this.nWidth,this.nHeight)}return T}},{key:"PlayM4_ReleaseInputBuffer",value:function e(){if(this.aInputDataBuffer===null){return f}this.aInputDataBuffer.splice(0,this.aInputDataBuffer.length);this.aInputDataLens.splice(0,this.aInputDataLens.length);return T}},{key:"PlayM4_GetDecodeFrameType",value:function e(){return this.nDecFrameType}},{key:"PlayM4_SetRunTimeInfoCallBackEx",value:function e(t,n){this.runtimeInfoCBFun=n;this.decodeWorker.postMessage({command:"SetRunTimeInfoCB",nModuleType:t});return T}},{key:"PlayM4_SetDemuxModel",value:function e(t,n){this.decodeWorker.postMessage({command:"SetDemuxModel",nIdemuxType:t,bTrue:n});return T}},{key:"PlayM4_SkipErrorData",value:function e(t){this.decodeWorker.postMessage({command:"SkipErrorData",bSkip:t});return T}},{key:"PlayM4_SetDecodeERC",value:function e(t){this.decodeWorker.postMessage({command:"SetDecodeERC",nLevel:t});return T}},{key:"PlayM4_SetANRParam",value:function e(t,n){this.decodeWorker.postMessage({command:"SetANRParam",nEnable:t,nANRLevel:n});return T}},{key:"PlayM4_SetResampleValue",value:function e(t,n){this.decodeWorker.postMessage({command:"SetResampleValue",nEnable:t,resampleValue:n});return T}},{key:"PlayM4_SetGlobalBaseTime",value:function e(t,n,i,r,a,o,s){if(t<2e3||t>3e3){return k}if(n<1||n>12){return k}if(t<0||n<0||i<0||r<0||a<0||o<0||s<0){return k}this.decodeWorker.postMessage({command:"SetGlobalBaseTime",year:t,month:n,day:i,hour:r,min:a,sec:o,ms:s});return T}},{key:"downloadFile",value:function e(t,n){var i=t;if(!(t instanceof Blob||t instanceof File)){i=new Blob([t])}var r=window.URL.createObjectURL(i);var a=window.document.createElement("a");a.href=r;a.download=n;var o=document.createEvent("MouseEvents");o.initEvent("click",true,true);a.dispatchEvent(o)}}]);return i}()},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});var i=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"https://open.ys7.com/assets/ezuikit_v3.6";return"\n/**\n * Created by wangweijie5 on 2016/12/5.\n */\n(function (event) {\n    const AUDIO_TYPE = 0;\t// 音频\n    const VIDEO_TYPE = 1;   // 视频\n    const PRIVT_TYPE = 2;  // 私有帧\n\n    const PLAYM4_AUDIO_FRAME = 100; // 音频帧\n    const PLAYM4_VIDEO_FRAME = 101; // 视频帧\n\n    const PLAYM4_OK = 1;\n    const PLAYM4_ORDER_ERROR = 2;\n    const PLAYM4_DECODE_ERROR = 44 \t// 解码失败\n    const PLAYM4_NOT_KEYFRAME = 48; \t// 非关键帧\n    const PLAYM4_NEED_MORE_DATA = 31;   // 需要更多数据才能解析\n    const PLAYM4_NEED_NEET_LOOP = 35; //丢帧需要下个循环\n    const PLAYM4_SYS_NOT_SUPPORT = 16; \t// 不支持\n\n    importScripts('"+t+'/js/playctrl/Decoder.js\');\n    Module.addOnPostRun(function () {\n        postMessage({ \'function\': "loaded" });\n    });\n\n    var iStreamMode = 0;  // 流模式\n\n    var bOpenMode = false;\n    var bOpenStream = false;\n\n    var funGetFrameData = null;\n    var funGetAudFrameData = null;\n\n    var bWorkerPrintLog = false;//worker层log开关\n\n    var g_nPort = -1;\n\n    self.JSPlayM4_RunTimeInfoCallBack = function (nPort, pstRunTimeInfo, pUser) {\n        let port = nPort;\n        let user = pUser;\n        let nRunTimeModule = Module.HEAP32[pstRunTimeInfo >> 2];\n        let nStrVersion = Module.HEAP32[pstRunTimeInfo + 4 >> 2];\n        let nFrameTimeStamp = Module.HEAP32[pstRunTimeInfo + 8 >> 2];\n        let nFrameNum = Module.HEAP32[pstRunTimeInfo + 12 >> 2];\n        let nErrorCode = Module.HEAP32[pstRunTimeInfo + 16 >> 2];\n        // console.log("nRunTimeModule:"+nRunTimeModule+",nFrameNum:"+nFrameNum+",nErrorCode:"+nErrorCode);\n        postMessage({ \'function\': "RunTimeInfoCallBack", \'nRunTimeModule\': nRunTimeModule, \'nStrVersion\': nStrVersion, \'nFrameTimeStamp\': nFrameTimeStamp, \'nFrameNum\': nFrameNum, \'nErrorCode\': nErrorCode });\n    }\n\n    onmessage = function (event) {\n        var eventData = event.data;\n        var res = 0;\n        switch (eventData.command) {\n            case "printLog":\n                let downloadFlag = eventData.data;\n                if (downloadFlag === true) {\n                    bWorkerPrintLog = true;\n                    res = Module._SetPrintLogFlag(g_nPort, downloadFlag);\n                }\n                else {\n                    bWorkerPrintLog = false;\n                    res = Module._SetPrintLogFlag(g_nPort, downloadFlag);\n                }\n\n                if (res !== PLAYM4_OK) {\n                    console.log("DecodeWorker.js: PlayerSDK print log failed,res" + res);\n                    postMessage({ \'function\': "printLog", \'errorCode\': res });\n                }\n                break;\n            case "SetPlayPosition":\n                let nFrameNumOrTime = eventData.data;\n                let enPosType = eventData.type;\n                // res = Module._SetPlayPosition(nFrameNumOrTime,enPosType);\n                // if (res !== PLAYM4_OK)\n                // {\n                //     postMessage({\'function\': "SetPlayPosition", \'errorCode\': res});\n                //     return;\n                // }\n                // //有没有buffer需要清除\n\n                break;\n            case "SetStreamOpenMode":\n                //获取端口号\n                g_nPort = Module._GetPort();\n                //设置流打开模式\n                iStreamMode = eventData.data;\n                res = Module._SetStreamOpenMode(g_nPort, iStreamMode);\n                if (res !== PLAYM4_OK) {\n                    postMessage({ \'function\': "SetStreamOpenMode", \'errorCode\': res });\n                    return;\n                }\n                bOpenMode = true;\n                break;\n\n            case "OpenStream":\n                // 接收到的数据\n                var iHeadLen = eventData.dataSize;\n                var pHead = Module._malloc(iHeadLen + 4);\n                if (pHead === null) {\n                    return;\n                }\n                var aHead = Module.HEAPU8.subarray(pHead, pHead + iHeadLen);\n                aHead.set(eventData.data);\n                res = Module._OpenStream(g_nPort, pHead, iHeadLen, eventData.bufPoolSize);\n                postMessage({ \'function\': "OpenStream", \'errorCode\': res });\n                if (res !== PLAYM4_OK) {\n                    //释放内存\n                    Module._free(pHead);\n                    pHead = null;\n                    return;\n                }\n                bOpenStream = true;\n                break;\n            case "Play":\n                let resP = Module._Play(g_nPort);\n                if (resP !== PLAYM4_OK) {\n                    return;\n                }\n                break;\n            case "InputData":\n                // 接收到的数据\n                var iLen = eventData.dataSize;\n                if (iLen > 0) {\n                    var pInputData = Module._malloc(iLen);\n                    if (pInputData === null) {\n                        return;\n                    }\n                    var inputData = new Uint8Array(eventData.data);\n                    // var aInputData = Module.HEAPU8.subarray(pInputData, pInputData + iLen);\n                    // aInputData.set(inputData);\n                    Module.writeArrayToMemory(inputData, pInputData);\n                    inputData = null;\n                    res = Module._InputData(g_nPort, pInputData, iLen);\n                    if (res !== PLAYM4_OK) {\n                        let errorCode = Module._GetLastError(g_nPort);\n                        let sourceRemain = Module._GetSourceBufferRemain(g_nPort);\n                        postMessage({ \'function\': "InputData", \'errorCode\': errorCode, "sourceRemain": sourceRemain });\n                    }\n                    Module._free(pInputData);\n                    pInputData = null;\n                } else {\n                    let sourceRemain = Module._GetSourceBufferRemain(g_nPort);\n                    if (sourceRemain == 0) {\n                        // console.log("C buffer and JS buffer size is both 0");\n                        postMessage({ \'function\': "InputData", \'errorCode\': PLAYM4_NEED_MORE_DATA });\n                        return;\n                    }\n                }\n\n                /////////////////////\n                if (funGetFrameData === null) {\n                    funGetFrameData = Module.cwrap(\'GetFrameData\', \'number\');\n                }\n\n                while (bOpenMode && bOpenStream) {\n\n                    var ret = getFrameData(funGetFrameData);\n                    // 直到获取视频帧或数据不足为止\n                    if (PLAYM4_VIDEO_FRAME === ret || PLAYM4_NEED_MORE_DATA === ret || PLAYM4_ORDER_ERROR === ret || PLAYM4_NEED_NEET_LOOP === ret)//PLAYM4_VIDEO_FRAME === ret ||\n                    {\n                        break;\n                    }\n                }\n                break;\n\n            case "SetSecretKey":\n                var keyLen = eventData.nKeyLen;\n                var pKeyData = Module._malloc(keyLen);\n                if (pKeyData === null) {\n                    return;\n                }\n                var nKeySize = eventData.data.length\n                var bufData = stringToBytes(eventData.data);\n                var aKeyData = Module.HEAPU8.subarray(pKeyData, pKeyData + keyLen);\n                let u8array = new Uint8Array(keyLen);\n                aKeyData.set(u8array, 0);\n                aKeyData.set(new Uint8Array(bufData));\n                aKeyData = null;\n                u8array = null;\n\n                res = Module._SetSecretKey(g_nPort, eventData.nKeyType, pKeyData, keyLen);//, nKeySize\n                if (res !== PLAYM4_OK) {\n                    postMessage({ \'function\': "SetSecretKey", \'errorCode\': res });\n                    Module._free(pKeyData);\n                    pKeyData = null;\n                    return;\n                }\n\n                Module._free(pKeyData);\n                pKeyData = null;\n                break;\n\n            case "GetBMP":\n                var nBMPWidth = eventData.width;\n                var nBMPHeight = eventData.height;\n                var pYUVData = eventData.data;\n                var nYUVSize = nBMPWidth * nBMPHeight * 3 / 2;\n                var oBMPCropRect = eventData.rect;\n\n                var pDataYUV = Module._malloc(nYUVSize);\n                if (pDataYUV === null) {\n                    return;\n                }\n\n                Module.writeArrayToMemory(new Uint8Array(pYUVData, 0, nYUVSize), pDataYUV);\n\n                // 分配BMP空间\n                var nBmpSize = nBMPWidth * nBMPHeight * 4 + 60;\n                var pBmpData = Module._malloc(nBmpSize);\n                var pBmpSize = Module._malloc(4);\n                if (pBmpData === null || pBmpSize === null) {\n                    Module._free(pDataYUV);\n                    pDataYUV = null;\n\n                    if (pBmpData != null) {\n                        Module._free(pBmpData);\n                        pBmpData = null;\n                    }\n\n                    if (pBmpSize != null) {\n                        Module._free(pBmpSize);\n                        pBmpSize = null;\n                    }\n                    return;\n                }\n\n                //Module._memset(pBmpSize, nBmpSize, 4); // 防止bmp截图出现输入数据过大的错误码\n                Module.setValue(pBmpSize, nBmpSize, "i32");\n                res = Module._GetBMP(g_nPort, pDataYUV, nYUVSize, pBmpData, pBmpSize,\n                    oBMPCropRect.left, oBMPCropRect.top, oBMPCropRect.right, oBMPCropRect.bottom);\n                if (res !== PLAYM4_OK) {\n                    postMessage({ \'function\': "GetBMP", \'errorCode\': res });\n                    Module._free(pDataYUV);\n                    pDataYUV = null;\n                    Module._free(pBmpData);\n                    pBmpData = null;\n                    Module._free(pBmpSize);\n                    pBmpSize = null;\n                    return;\n                }\n\n                // 获取BMP图片大小\n                var nBmpDataSize = Module.getValue(pBmpSize, "i32");\n\n                // 获取BMP图片数据\n                var aBmpData = new Uint8Array(nBmpDataSize);\n                aBmpData.set(Module.HEAPU8.subarray(pBmpData, pBmpData + nBmpDataSize));\n\n                postMessage({ \'function\': "GetBMP", \'data\': aBmpData, \'errorCode\': res }, [aBmpData.buffer]);\n                aBmpData = null;\n                if (pDataYUV != null) {\n                    Module._free(pDataYUV);\n                    pDataYUV = null;\n                }\n                if (pBmpData != null) {\n                    Module._free(pBmpData);\n                    pBmpData = null;\n                }\n                if (pBmpSize != null) {\n                    Module._free(pBmpSize);\n                    pBmpSize = null;\n                }\n                break;\n\n            case "GetJPEG":\n                var nJpegWidth = eventData.width;\n                var nJpegHeight = eventData.height;\n                var pYUVData1 = eventData.data;\n                var nYUVSize1 = nJpegWidth * nJpegHeight * 3 / 2;\n                var oJpegCropRect = eventData.rect;\n\n                var pDataYUV1 = Module._malloc(nYUVSize1);\n                if (pDataYUV1 === null) {\n                    return;\n                }\n\n                Module.writeArrayToMemory(new Uint8Array(pYUVData1, 0, nYUVSize1), pDataYUV1);\n\n                // 分配JPEG空间\n                var pJpegData = Module._malloc(nYUVSize1);\n                var pJpegSize = Module._malloc(4);\n                if (pJpegData === null || pJpegSize === null) {\n                    if (pJpegData != null) {\n                        Module._free(pJpegData);\n                        pJpegData = null;\n                    }\n\n                    if (pJpegSize != null) {\n                        Module._free(pJpegSize);\n                        pJpegSize = null;\n                    }\n\n                    if (pDataYUV1 != null) {\n                        Module._free(pDataYUV1);\n                        pDataYUV1 = null;\n                    }\n                    return;\n                }\n\n                Module.setValue(pJpegSize, nJpegWidth * nJpegHeight * 2, "i32");    // JPEG抓图,输入缓冲长度不小于当前帧YUV大小\n\n                res = Module._GetJPEG(g_nPort, pDataYUV1, nYUVSize1, pJpegData, pJpegSize,\n                    oJpegCropRect.left, oJpegCropRect.top, oJpegCropRect.right, oJpegCropRect.bottom);\n                if (res !== PLAYM4_OK) {\n                    postMessage({ \'function\': "GetJPEG", \'errorCode\': res });\n                    if (pJpegData != null) {\n                        Module._free(pJpegData);\n                        pJpegData = null;\n                    }\n\n                    if (pJpegSize != null) {\n                        Module._free(pJpegSize);\n                        pJpegSize = null;\n                    }\n\n                    if (pDataYUV1 != null) {\n                        Module._free(pDataYUV1);\n                        pDataYUV1 = null;\n                    }\n                    return;\n                }\n\n                // 获取JPEG图片大小\n                var nJpegSize = Module.getValue(pJpegSize, "i32");\n\n                // 获取JPEG图片数据\n                var aJpegData = new Uint8Array(nJpegSize);\n                aJpegData.set(Module.HEAPU8.subarray(pJpegData, pJpegData + nJpegSize));\n\n                postMessage({ \'function\': "GetJPEG", \'data\': aJpegData, \'errorCode\': res }, [aJpegData.buffer]);\n\n                nJpegSize = null;\n                aJpegData = null;\n\n                if (pDataYUV1 != null) {\n                    Module._free(pDataYUV1);\n                    pDataYUV1 = null;\n                }\n                if (pJpegData != null) {\n                    Module._free(pJpegData);\n                    pJpegData = null;\n                }\n                if (pJpegSize != null) {\n                    Module._free(pJpegSize);\n                    pJpegSize = null;\n                }\n                break;\n\n            case "SetDecodeFrameType":\n                var nFrameType = eventData.data;\n                res = Module._SetDecodeFrameType(g_nPort, nFrameType);\n                if (res !== PLAYM4_OK) {\n                    postMessage({ \'function\': "SetDecodeFrameType", \'errorCode\': res });\n                    return;\n                }\n                break;\n            case "CloseStream":\n                //stop\n                let resS = Module._Stop(g_nPort);\n                if (resS !== PLAYM4_OK) {\n                    postMessage({ \'function\': "Stop", \'errorCode\': res });\n                    return;\n                }\n                //closeStream\n                res = Module._CloseStream(g_nPort);\n                if (res !== PLAYM4_OK) {\n                    postMessage({ \'function\': "CloseStream", \'errorCode\': res });\n                    return;\n                }\n                //freePort\n                let resF = Module._FreePort(g_nPort);\n                if (resF !== PLAYM4_OK) {\n                    postMessage({ \'function\': "FreePort", \'errorCode\': res });\n                    return;\n                }\n                break;\n            case "PlaySound":\n                let resPS = Module._PlaySound(g_nPort);\n                if (resPS !== PLAYM4_OK) {\n                    console.log("PlaySound failed");\n                    return;\n                }\n                break;\n            case "StopSound":\n                let resSS = Module._StopSound();\n                if (resSS !== PLAYM4_OK) {\n                    console.log("StopSound failed");\n                    return;\n                }\n                break;\n            case "SetVolume":\n                let resSV = Module._SetVolume(g_nPort, eventData.volume);\n                if (resSV !== PLAYM4_OK) {\n                    console.log("Audio SetVolume failed");\n                    return;\n                }\n                break;\n            case "GetVolume":\n                let volume = Module._GetVolume();\n                if (volume > 0) {\n                    postMessage({ \'function\': "GetVolume", \'volume\': volume });\n                }\n                else {\n                    console.log("Audio GetVolume failed");\n                    return;\n                }\n                break;\n            case "OnlyPlaySound":\n                let resOPS = Module._OnlyPlaySound(g_nPort);\n                if (resOPS !== PLAYM4_OK) {\n                    console.log("OnlyPlaySound failed");\n                    return;\n                }\n                break;\n            case "Pause":\n                let resPa = Module._Pause(g_nPort, eventData.bPlay);\n                if (resPa !== PLAYM4_OK) {\n                    console.log("Pause failed");\n                    return;\n                }\n            case "PlayRate":\n                Module._SetPlayRate(g_nPort, eventData.playRate);\n                break;\n            case "SetIFrameDecInterval":\n                Module._SetIFrameDecInterval(g_nPort, eventData.data);\n                break;\n            case "SetLostFrameMode":\n                Module._SetLostFrameMode(g_nPort, eventData.data);\n                break;\n            case "SetDemuxModel":\n                Module._SetDemuxModel(g_nPort, eventData.nIdemuxType, eventData.bTrue);\n                break;\n            case "SkipErrorData":\n                Module._SkipErrorData(g_nPort, eventData.bSkip);\n                break;\n            case "SetDecodeERC":\n                Module._SetDecodeERC(g_nPort, eventData.nLevel);\n                break;\n            case "SetANRParam":\n                Module._SetANRParam(g_nPort, eventData.nEnable, eventData.nANRLevel);\n                break;\n            case "SetResampleValue":\n                Module._SetResampleValue(g_nPort, eventData.nEnable, eventData.resampleValue);\n                break;\n            case "GetLastError":\n                let errorCode = Module._GetLastError(g_nPort);\n                postMessage({ \'function\': "GetLastError", \'errorCode\': errorCode });\n                break;\n            case "SetGlobalBaseTime":\n                Module._SetGlobalBaseTime(g_nPort, eventData.year, eventData.month, eventData.day, eventData.hour, eventData.min, eventData.sec, eventData.ms);\n                break;\n            case "SetRunTimeInfoCB":\n                Module._SetRunTimeInfoCallBackEx(g_nPort, eventData.nModuleType, 0);\n                break;\n            default:\n                break;\n        }\n    };\n\n    function getOSDTime(oFrameInfo) {\n        var iYear = oFrameInfo.year;\n        var iMonth = oFrameInfo.month;\n        var iDay = oFrameInfo.day;\n        var iHour = oFrameInfo.hour;\n        var iMinute = oFrameInfo.minute;\n        var iSecond = oFrameInfo.second;\n\n        if (iMonth < 10) {\n            iMonth = "0" + iMonth;\n        }\n        if (iDay < 10) {\n            iDay = "0" + iDay;\n        }\n        if (iHour < 10) {\n            iHour = "0" + iHour;\n        }\n        if (iMinute < 10) {\n            iMinute = "0" + iMinute;\n        }\n        if (iSecond < 10) {\n            iSecond = "0" + iSecond;\n        }\n\n        return iYear + "-" + iMonth + "-" + iDay + " " + iHour + ":" + iMinute + ":" + iSecond;\n    }\n    // 获取帧数据\n    function getFrameData(fun) {\n        // function getFrameData() {\n        // 获取帧数据\n        // var res = Module._GetFrameData();\n        var res = fun();\n        if (res === PLAYM4_OK) {\n            var oFrameInfo = Module._GetFrameInfo();\n            switch (oFrameInfo.frameType) {\n                case AUDIO_TYPE:\n                    var iSize = oFrameInfo.frameSize;\n                    if (0 === iSize) {\n                        return -1;\n                    }\n                    var pPCM = Module._GetFrameBuffer();\n                    // var audioBuf = new ArrayBuffer(iSize);\n                    var aPCMData = new Uint8Array(iSize);\n                    aPCMData.set(Module.HEAPU8.subarray(pPCM, pPCM + iSize));\n                    if (bWorkerPrintLog) {\n                        console.log("<<<Worker: audio media Info: nSise:" + oFrameInfo.frameSize + ",nSampleRate:" + oFrameInfo.samplesPerSec + \',channel:\' + oFrameInfo.channels + \',bitsPerSample:\' + oFrameInfo.bitsPerSample);\n                    }\n                    postMessage({\n                        \'function\': "GetFrameData", \'type\': "audioType", \'data\': aPCMData.buffer,\n                        \'frameInfo\': oFrameInfo, \'errorCode\': res\n                    }, [aPCMData.buffer]);\n\n                    oFrameInfo = null;\n                    pPCM = null;\n                    aPCMData = null;\n                    return PLAYM4_AUDIO_FRAME;\n\n                case VIDEO_TYPE:\n                    var szOSDTime = getOSDTime(oFrameInfo);\n\n                    var iWidth = oFrameInfo.width;\n                    var iHeight = oFrameInfo.height;\n\n                    var iYUVSize = iWidth * iHeight * 3 / 2;\n                    if (0 === iYUVSize) {\n                        return -1;\n                    }\n\n                    var pYUV = Module._GetFrameBuffer();\n\n                    // 图像数据渲染后压回,若从主码流切到子码流,存在数组大小与图像大小不匹配现象\n                    var aYUVData = new Uint8Array(iYUVSize);\n                    aYUVData.set(Module.HEAPU8.subarray(pYUV, pYUV + iYUVSize));\n                    if (bWorkerPrintLog) {\n                        console.log("<<<Worker: video media Info: Width:" + oFrameInfo.width + ",Height:" + oFrameInfo.height + ",timeStamp:" + oFrameInfo.timeStamp);\n                    }\n\n                    postMessage({\n                        \'function\': "GetFrameData", \'type\': "videoType", \'data\': aYUVData.buffer,\n                        \'dataLen\': aYUVData.length, \'osd\': szOSDTime, \'frameInfo\': oFrameInfo, \'errorCode\': res\n                    }, [aYUVData.buffer]);\n\n                    oFrameInfo = null;\n                    pYUV = null;\n                    aYUVData = null;\n                    return PLAYM4_VIDEO_FRAME;\n\n                case PRIVT_TYPE:\n                    postMessage({\n                        \'function\': "GetFrameData", \'type\': "", \'data\': null,\n                        \'dataLen\': -1, \'osd\': 0, \'frameInfo\': null, \'errorCode\': PLAYM4_SYS_NOT_SUPPORT\n                    });\n                    return PLAYM4_SYS_NOT_SUPPORT;\n\n                default:\n                    postMessage({\n                        \'function\': "GetFrameData", \'type\': "", \'data\': null,\n                        \'dataLen\': -1, \'osd\': 0, \'frameInfo\': null, \'errorCode\': PLAYM4_SYS_NOT_SUPPORT\n                    });\n                    return PLAYM4_SYS_NOT_SUPPORT;\n            }\n        }\n        else {\n            let errorCode = Module._GetLastError(g_nPort);\n            //解码失败返回裸数据\n            if (PLAYM4_DECODE_ERROR === errorCode) {\n                var rawInfo = Module._GetRawDataInfo();\n                var pRawData = Module._GetRawDataBuffer();\n                var aRawData = new Uint8Array(rawInfo.isize);\n                aRawData.set(Module.HEAPU8.subarray(pRawData, pRawData + rawInfo.isize));\n                postMessage({\n                    \'function\': "GetRawData", \'type\': "", \'data\': aRawData.buffer,\n                    \'rawDataLen\': rawInfo.isize, \'osd\': 0, \'frameInfo\': null, \'errorCode\': errorCode\n                });\n                rawInfo = null;\n                pRawData = null;\n                aRawData = null;\n            }\n            //需要更多数据\n            if (PLAYM4_NEED_MORE_DATA === errorCode || PLAYM4_SYS_NOT_SUPPORT === errorCode || PLAYM4_NEED_NEET_LOOP === errorCode) {\n                postMessage({\n                    \'function\': "GetFrameData", \'type\': "", \'data\': null,\n                    \'dataLen\': -1, \'osd\': 0, \'frameInfo\': null, \'errorCode\': errorCode\n                });\n            }\n            return errorCode;\n        }\n    }\n\n    // 开始计算时间\n    function startTime() {\n        return new Date().getTime();\n    }\n\n    // 结束计算时间\n    function endTime() {\n        return new Date().getTime();\n    }\n\n    // 字母字符串转byte数组\n    function stringToBytes(str) {\n        var ch, st, re = [];\n        for (var i = 0; i < str.length; i++) {\n            ch = str.charCodeAt(i);  // get char\n            st = [];                 // set up "stack"\n            do {\n                st.push(ch & 0xFF);  // push byte to stack\n                ch = ch >> 8;          // shift value down by 1 byte\n            }\n            while (ch);\n            // add stack contents to result\n            // done because chars have "wrong" endianness\n            re = re.concat(st.reverse());\n        }\n        // return an array of bytes\n        return re;\n    }\n})();\n'};t["default"]=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});t.StorageManager=undefined;var a=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();var d=n(2);var i=n(0);var r=n(15);var o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var l="Web/RecordFiles/";var f="Web/PlaybackFiles/";var c=1e3;var h=1;var p=3001;window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem;window.URL=window.URL||window.webkitURL;var v=function(){function r(e,t,n,i){u(this,r);this.szUUID=e;this.szFileName=t;this.iStreamType=n;this.szPath="";this.bStart=false;this.aStreamList=[];this.options=i}a(r,[{key:"init",value:function e(){var n=this;if(0===this.iStreamType){this.szPath=l}else if(1===this.iStreamType){this.szPath=f}this.szPath+=this.getDateDir();var i=n.szPath.split("/");var t=new Promise(function(t){window.requestFileSystem(window.TEMPORARY,n.options.iFileSize,function(e){n.createDir(e.root,i,function(){t()})},n.errorHandler)});return t}},{key:"getDateDir",value:function e(){return i.oTool.dateFormat(new Date,"yyyy-MM-dd")}},{key:"createDir",value:function e(t,n,i){var r=this;if(n.length){t.getDirectory(n[0],{create:true},function(e){r.createDir(e,n.slice(1),i)},r.errorHandler)}else{i()}}},{key:"errorHandler",value:function e(){}},{key:"writeFileHeader",value:function e(n){var i=this;window.requestFileSystem(window.TEMPORARY,i.options.iFileSize,function(e){e.root.getFile(i.szPath+"/"+i.szFileName,{create:true},function(e){e.createWriter(function(e){e.onwriteend=function(){i.bStart=true;i.writeFile(e)};e.onerror=function(){};e.seek(e.length);var t=new Blob([n]);e.write(t)},i.errorHandler)},i.errorHandler)},i.errorHandler)}},{key:"writeFileContent",value:function e(t){this.aStreamList.push(t)}},{key:"writeFile",value:function e(t){var n=this;if(this.bStart){if(this.aStreamList.length>0){var i=this.aStreamList.shift();t.seek(t.length);if(t.length>=this.options.iFileSize){if(this.options.cbEventHandler){this.options.cbEventHandler(p,this.szUUID)}return}var r=new Blob([i]);t.write(r)}else{setTimeout(function(){n.writeFile(t)},c)}}}},{key:"stopWriteFile",value:function e(){var n=this;this.bStart=false;this.aStreamList.length=0;var t=new Promise(function(t){window.requestFileSystem(window.TEMPORARY,n.options.iFileSize,function(e){e.root.getFile(n.szPath+"/"+n.szFileName,{create:false},function(e){e.file(function(e){t();i.oTool.downloadFile(e,e.name)})},n.errorHandler)},n.errorHandler)});return t}}]);return r}();var m=function(){function l(e,t,n,i,r,a,o,s){u(this,l);this.szBasePath=e;this.szUUID=t;this.szFileName=n;this.aHeadBuf=new Uint8Array(i);this.iPackType=r;this.iStreamType=a;this.oWorker=null;this.oFileSystem=null;this.options=o;this.bHead=true;this.staticPath=s}a(l,[{key:"init",value:function e(){var n=this;var t=new Promise(function(e,t){n.initFileSystem().then(function(){n.initWorker().then(function(){e(n.szUUID)},function(e){t(e)})},function(e){t(e)})});return t}},{key:"initFileSystem",value:function e(){var n=this;this.oFileSystem=new v(this.szUUID,this.szFileName,this.iStreamType,this.options);var t=new Promise(function(e,t){n.oFileSystem.init().then(function(){e()},function(e){t(e)})});return t}},{key:"initWorker",value:function e(){var a=this;var t=new Promise(function(r){var e=new Blob([(0,o["default"])(a.staticPath)]);var t=URL.createObjectURL(e);a.oWorker=new Worker(t);a.oWorker.onmessage=function(e){var t=e.data;var n=a.iPackType;if(a.options.iPackage===1){n=12}if("loaded"===t.type){a.oWorker.postMessage({type:"create",buf:a.aHeadBuf.buffer,len:40,packType:n},[a.aHeadBuf.buffer])}else if("created"===t.type){r()}else if("outputData"===t.type){var i=new Uint8Array(t.buf);if(a.options.iPackage===1){if(a.bHead){a.oFileSystem.writeFileHeader(i);a.bHead=false}else{a.oFileSystem.writeFileContent(i)}}else{if(h===t.dType){a.oFileSystem.writeFileHeader(i)}else{a.oFileSystem.writeFileContent(i)}}}}});return t}},{key:"inputData",value:function e(t){if(this.oWorker){var n=new Uint8Array(t);this.oWorker.postMessage({type:"inputData",buf:n.buffer,len:n.length},[n.buffer])}}},{key:"stopRecord",value:function e(){var n=this;var t=new Promise(function(e,t){if(n.oWorker){n.oWorker.postMessage({type:"release"})}else{t()}if(n.oFileSystem){n.oFileSystem.stopWriteFile().then(function(){n.bHead=true;e()},function(){t()})}else{t()}});return t}}]);return l}();var y=function(){var c=Symbol("STORAGELIST");var e=function(){function i(e,t,n){u(this,i);this.szBasePath=e;this[c]={};this.options={iFileSize:1024*1024*1024};Object.assign(this.options,t);if(typeof t.staticPath==="string"){this.staticPath=t.staticPath}}a(i,[{key:"startRecord",value:function e(t,n,i,r,a){var o=this;var s=(0,d.v4)();var l=Object.assign({},this.options,a);var u=new m(this.szBasePath,s,t,n,i,r,l,this.staticPath);var f=new Promise(function(t,n){u.init().then(function(e){o[c][e]=u;t(e)},function(e){n(e)})});return f}},{key:"inputData",value:function e(t,n){var i=this[c][t];if(i){i.inputData(n)}}},{key:"stopRecord",value:function e(i){var r=this;var t=new Promise(function(e,t){var n=r[c][i];if(n){n.stopRecord().then(function(){delete r[c][i];e()},function(){t()})}else{t()}});return t}}]);return i}();return e}();t.StorageManager=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});var i=function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"https://open.ys7.com/assets/ezuikit_v3.6";return"(function() {\n    const RECORDRTP = 0;  //录制一份未经过转封装的码流原始数据,用于定位问题\n    self.Module = { memoryInitializerRequest: loadMemInitFile(), TOTAL_MEMORY: 128*1024*1024 };\n    importScripts('"+t+'/js/transform/SystemTransform.js\');\n\n    Module.postRun.push(function() {\n        postMessage({type: "loaded"});\n    });\n\n    onmessage = function (e) {\n        var data = e.data;\n\n        if ("create" === data.type) {\n            var iHeadLen = data.len;\n            var pHead = Module._malloc(iHeadLen);\n\n            var aData = Module.HEAPU8.subarray(pHead, pHead + iHeadLen);\n            aData.set(new Uint8Array(data.buf));\n\n            var iTransType = data.packType;//目标格式 RTP->PS\n            if (RECORDRTP) {\n                postMessage({type: "created"});\n                postMessage({type: "outputData", buf: data.buf, dType: 1}, [data.buf]);\n            } else {\n                var iRet = Module._ST_Create(pHead, iHeadLen, iTransType);\n                if (iRet != 0) {\n                    console.log("_ST_Create failed!");\n                } else {\n                    Module._ST_Start();\n                    postMessage({type: "created"});\n                }\n            }\n\n        } else if ("inputData" === data.type) {\n            if (RECORDRTP) {\n                var aFileData = new Uint8Array(data.buf);  // 拷贝一份\n                var iBufferLen = aFileData.length;\n                var szBufferLen = iBufferLen.toString(16);\n                if (szBufferLen.length === 1) {\n                    szBufferLen = "000" + szBufferLen;\n                } else if (szBufferLen.length === 2) {\n                    szBufferLen = "00" + szBufferLen;\n                } else if (szBufferLen.length === 3) {\n                    szBufferLen = "0" + szBufferLen;\n                }\n                var aData = [0, 0, parseInt(szBufferLen.substring(0, 2), 16), parseInt(szBufferLen.substring(2, 4), 16)];\n                for(var iIndex = 0, iDataLength = aFileData.length; iIndex < iDataLength; iIndex++) {\n                    aData[iIndex + 4] = aFileData[iIndex]\n                }\n                var dataUint8 = new Uint8Array(aData);\n                postMessage({type: "outputData", buf: dataUint8.buffer, dType: 2}, [dataUint8.buffer]);\n            } else {\n                var iDataLen = data.len;\n                var pData = Module._malloc(iDataLen);\n\n                var aData = Module.HEAPU8.subarray(pData, pData + iDataLen);\n                aData.set(new Uint8Array(data.buf));\n\n                var iRet = Module._ST_InputData(0, pData, iDataLen);\n                if (iRet != 0) {\n                    //console.log("_ST_InputData failed!");// 一开始会有一些失败,但是不影响后面的文件存储\n                }\n\n                Module._free(pData);\n            }\n        } else if ("release" === data.type) {\n            Module._ST_Stop();\n            Module._ST_Release();\n\n            close();\n        }\n    };\n\n    function loadMemInitFile() {\n        var req = new XMLHttpRequest();\n        req.open(\'GET\', \''+t+"/js/transform/SystemTransform.js.mem');\n        req.responseType = 'arraybuffer';\n        req.send();\n\n        return req;\n    }\n})();"};t["default"]=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:true});t.ESCanvas=undefined;var a=function(){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}}();var i=n(1);var s=r(i);function r(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(_typeof(t)==="object"||typeof t==="function")?t:e}function f(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+_typeof(t))}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t}function c(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var o=function(){var g=null;var h=Symbol("TRANS");var p=Symbol("CANVAS");var S=Symbol("CONTEXT");var v=Symbol("SHAPES");var m=Symbol("DRAWSTATUS");var y=Symbol("SHAPETYPE");var b=Symbol("MAXSHAPENUMSUPPORT");var r=Symbol("SHAPESTYLE");var P=Symbol("POLYGONDRAWING");var w=Symbol("CURRENTSHAPEINFO");var _=Symbol("DRAWSHAPEMULTIONETIME");var C=Symbol("EVENTCALLBACK");function D(){g[S].clearRect(0,0,g.m_iCanvasWidth,g.m_iCanvasHeight);for(var e=0,t=g[v].length;e<t;e++){g[v][e].draw()}}function T(e){var t=g[v].length;if(t<g[b]){g[v].push(e)}}function i(){var a=false;var n={};var o=0;var s=0;var i=0;var r=0;var l=0;var u=0;var f="draw";var c=null;function d(){var e=-1;for(var t=0,n=g[v].length;t<n;t++){if(g[v][t].m_bChoosed){e=t;break}}return e}g[p][0].oncontextmenu=function(){return false};g[p][0].onselectstart=function(){return false};g[p].unbind();g[p].bind("mousedown",function(e){if(e.button===2){if(g[P]&&c){if(c.m_aPoint.length>=c.m_iMinClosed){c.m_bClosed=true;g[P]=false;c.setPointInfo(c.m_aPoint);T(c);D();a=false;if(!g[_]){g[m]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(c.m_szType,"onDrawEnd",c.m_szId)}}}else if(e.button===0){if(a){if(Math.abs(e.offsetX-o)>2&&Math.abs(e.offsetY-s)>2){T(c);if(!g[_]){g[m]=false}}if(g[C]){var t={startPos:[],endPos:[]};t.startPos=[o,s];t.endPos=[e.offsetX,e.offsetY];g[C]&&g[C](t);g.clearAllShape()}c=null;a=false;return}o=e.offsetX;s=e.offsetY;f="draw";if(!g[P]){var n=d();if(n!==-1){if(g[v][n].inArc(e.offsetX,e.offsetY,5)){f="stretch"}}if(f!=="stretch"){for(var i=0,r=g[v].length;i<r;i++){if(g[v][i].inShape(e.offsetX,e.offsetY)&&g[v][i].m_iEditType!==2){g[v][i].m_bChoosed=true;g[v][i].getMouseDownPoints(e.offsetX,e.offsetY);f="drag";window.onDrawShapeEvent&&window.onDrawShapeEvent(g[v][i].m_szType,"onChoose",g[v][i].m_szId)}else{g[v][i].m_bChoosed=false}}}if(f==="drag"){g[p][0].style.cursor="move"}else{g[p][0].style.cursor="default"}if("draw"===f&&1===g[v].length&&1===g[v][0].m_iRedrawMode){g.deleteRepeatPolyonById(g[v][0].m_szId);g[m]=true}if(g[m]&&!g[_]){f="draw"}}if(f==="draw"){if(g[m]){if(g[b]<=g[v].length&&g[y]!=="Grid"&&g[y]!=="Point"){return}if(g[y]==="Rect"){c=new M;c.m_szTips=g[w].szTips||""}else if(g[y]==="Grid"){if(g[v].length===0){c=new k;T(c)}}else if(g[y]==="Polygon"){if(!g[P]){g[P]=true;c=new x;c.m_szId=g[w].szId||"";c.m_szTips=g[w].szTips||"";c.m_iMinClosed=g[w].iMinClosed||3;c.m_iMaxPointNum=g[w].iMaxPointNum||11;c.m_iPolygonType=g[w].iPolygonType;c.m_szDrawColor=g[w].szDrawColor;c.m_szFillColor=g[w].szFillColor;c.m_iTranslucent=g[w].iTranslucent;c.m_iRedrawMode=g[w].iRedrawMode}if(c.m_iPolygonType===1){c.addPoint(o,s);if(c.m_aPoint.length===c.m_iMaxPointNum){c.m_bClosed=true;g[P]=false;T(c);D();a=false;if(!g[_]){g[m]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(c.m_szType,"onDrawEnd",c.m_szId)}}}else if(g[y]==="Point"){g.clearShapeByType("Point");c=new I;c.m_szId=g[w].szId||"";c.m_szDrawColor=g[w].szDrawColor;c.setPointInfo([[o,s]]);T(c);D()}}}a=true}});g[p].bind("mouseenter",function(e){n={isIn:true,offsetX:e.offsetX,offsetY:e.offsetY};if(g[m]){if(a){if(g[y]==="Rect"){c.move([[o,s],[e.offsetX,e.offsetY]])}else if(g[y]==="Grid"){g[v][0].move(o,s,e.offsetX,e.offsetY)}}}});g[p].bind("mouseleave",function(e){n={isIn:false,offsetX:e.offsetX,offsetY:e.offsetY}});g[p].bind("mousemove",function(e){if(!g[P]){var t=d();if(t>-1){if(a){if(f==="drag"){g[v][t].drag(e.offsetX,e.offsetY);window.onDrawShapeEvent&&window.onDrawShapeEvent(g[v][t].m_szType,"onDrag",g[v][t].m_szId)}else if(f==="stretch"){g[v][t].stretch(e.offsetX,e.offsetY);window.onDrawShapeEvent&&window.onDrawShapeEvent(g[v][t].m_szType,"onStretch",g[v][t].m_szId)}}}else{if(g[m]){if(a){if(n.isIn){if(g[y]==="Rect"){c.move([[o,s],[e.offsetX,e.offsetY]])}else if(g[y]==="Grid"){g[v][0].move(o,s,e.offsetX,e.offsetY)}}}}}}else{if(g[m]){if(a){if(g[y]==="Polygon"&&c.m_iPolygonType===0){c.m_bClosed=true}D();c.move(e.offsetX,e.offsetY,o,s)}}}});g[p].bind("mouseup",function(e){g[p][0].style.cursor="default";if(c!==null&&typeof c!=="undefined"&&f==="draw"){if(g[y]==="Rect"){if(Math.abs(e.offsetX-o)>2&&Math.abs(e.offsetY-s)>2){T(c);if(!g[_]){g[m]=false}}if(g[C]){var t={startPos:[],endPos:[]};t.startPos=[o,s];t.endPos=[e.offsetX,e.offsetY];g[C]&&g[C](t);g.clearAllShape()}c=null}else if(g[y]==="Polygon"&&c.m_iPolygonType===0&&g[P]){if(Math.abs(e.offsetX-o)>2&&Math.abs(e.offsetY-s)>2){T(c);g[P]=false;if(!g[_]){g[m]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(c.m_szType,"onDrawEnd",c.m_szId)}}}if(!g[P]){a=false}else{a=true}if(!g[P]){D()}});g[p].bind("dblclick",function(){if(g[m]){if(g[y]==="Grid"){g[v][0].m_szGridMap="fffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffc";D()}}});g[p].bind("touchstart",function(e){var t=e.target.getBoundingClientRect();if(e.touches&&e.touches[0]){if(g[h]){i=parseInt(e.touches[0].clientY-t.x)>0?parseInt(e.touches[0].clientY-t.x):0;r=parseInt(e.touches[0].clientX-t.y)>0?parseInt(e.touches[0].clientX-t.y):0}else{i=parseInt(e.touches[0].clientX-t.x)>0?parseInt(e.touches[0].clientX-t.x):0;r=parseInt(e.touches[0].clientY-t.y)>0?parseInt(e.touches[0].clientY-t.y):0}f="draw";if(g[m]){if(g[b]<=g[v].length&&g[y]!=="Grid"&&g[y]!=="Point"){return}if(g[y]==="Rect"){c=new M;c.m_szTips=g[w].szTips||""}else if(g[y]==="Grid"){if(g[v].length===0){c=new k;T(c)}}else if(g[y]==="Polygon"){if(!g[P]){g[P]=true;c=new x;c.m_szId=g[w].szId||"";c.m_szTips=g[w].szTips||"";c.m_iMinClosed=g[w].iMinClosed||3;c.m_iMaxPointNum=g[w].iMaxPointNum||11;c.m_iPolygonType=g[w].iPolygonType;c.m_szDrawColor=g[w].szDrawColor;c.m_szFillColor=g[w].szFillColor;c.m_iTranslucent=g[w].iTranslucent;c.m_iRedrawMode=g[w].iRedrawMode}if(c.m_iPolygonType===1){c.addPoint(i,r);if(c.m_aPoint.length===c.m_iMaxPointNum){c.m_bClosed=true;g[P]=false;T(c);D();a=false;if(!g[_]){g[m]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(c.m_szType,"onDrawEnd",c.m_szId)}}}else if(g[y]==="Point"){g.clearShapeByType("Point");c=new I;c.m_szId=g[w].szId||"";c.m_szDrawColor=g[w].szDrawColor;c.setPointInfo([[i,r]]);T(c);D()}}a=true}});g[p].bind("touchmove",function(e){var t=e.target.getBoundingClientRect();if(e.touches&&e.touches[0]){if(g[h]){l=parseInt(e.touches[0].clientY-t.x)>0?parseInt(e.touches[0].clientY-t.x):0;u=parseInt(e.touches[0].clientX-t.y)>0?parseInt(e.touches[0].clientX-t.y):0}else{l=parseInt(e.touches[0].clientX-t.x)>0?parseInt(e.touches[0].clientX-t.x):0;u=parseInt(e.touches[0].clientY-t.y)>0?parseInt(e.touches[0].clientY-t.y):0}if(!g[P]){var n=d();if(n>-1){if(a){if(f==="drag"){g[v][n].drag(l,u);window.onDrawShapeEvent&&window.onDrawShapeEvent(g[v][n].m_szType,"onDrag",g[v][n].m_szId)}else if(f==="stretch"){g[v][n].stretch(l,u);window.onDrawShapeEvent&&window.onDrawShapeEvent(g[v][n].m_szType,"onStretch",g[v][n].m_szId)}}}else{if(g[m]){if(a){if(g[y]==="Rect"){if(g[h]){c.move([[i*2,(t.width-r)*2],[l*2,(t.width-u)*2]])}else{c.move([[i*2,r*2],[l*2,u*2]])}}else if(g[y]==="Grid"){g[v][0].move(i,r,l,u)}}}}}else{if(g[m]){if(a){if(g[y]==="Polygon"&&c.m_iPolygonType===0){c.m_bClosed=true}D();c.move(e.touches[0].offsetX,e.touches[0].offsetY,i,r)}}}}});g[p].bind("touchend",function(e){console.log("起始点坐标:",i,r);console.log("结束点坐标:",l,u);if(!(i==l&&r==u)){g[p][0].style.cursor="default";if(c!==null&&typeof c!=="undefined"&&f==="draw"){if(g[y]==="Rect"){if(Math.abs(l-i)>2&&Math.abs(u-r)>2){T(c);if(!g[_]){g[m]=false}}if(g[C]&&Math.abs(l-i)>15&&Math.abs(u-r)>15){var t={startPos:[],endPos:[]};t.startPos=[i,r];t.endPos=[l,u];g[C]&&g[C](t)}g.clearAllShape();c=null}else if(g[y]==="Polygon"&&c.m_iPolygonType===0&&g[P]){if(Math.abs(l-i)>2&&Math.abs(u-r)>2){T(c);g[P]=false;if(!g[_]){g[m]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(c.m_szType,"onDrawEnd",c.m_szId)}}}if(!g[P]){a=false}else{a=true}if(!g[P]){D()}}})}var e=function(){function e(){c(this,e);this.m_szId="";this.m_aPoint=[];this.m_bChoosed=false;this.m_szDrawColor=g[r].szDrawColor;this.m_szFillColor=g[r].szFillColor;this.m_iTranslucent=g[r].iTranslucent;this.m_iIndexChoosePoint=-1;this.m_iDriftStartX=0;this.m_iDriftStartY=0;this.m_oEdgePoints={top:{x:0,y:0},left:{x:0,y:0},right:{x:0,y:0},bottom:{x:0,y:0}};this.m_szTips="";this.m_iEditType=0;this.m_iMinClosed=3;this.m_iMaxPointNum=11;this.m_bClosed=false;this.m_iRedrawMode=0}a(e,[{key:"draw",value:function e(){}},{key:"drag",value:function e(t,n){if(this.m_iEditType!==2){var i=this.m_aPoint.length;var r=0;for(r=0;r<i;r++){if(this.m_aPoint[r][0]+t-this.m_iDriftStartX>g.m_iCanvasWidth||this.m_aPoint[r][1]+n-this.m_iDriftStartY>g.m_iCanvasHeight||this.m_aPoint[r][0]+t-this.m_iDriftStartX<0||this.m_aPoint[r][1]+n-this.m_iDriftStartY<0){this.m_iDriftStartX=t;this.m_iDriftStartY=n;return}}for(r=0;r<i;r++){this.m_aPoint[r][0]=this.m_aPoint[r][0]+t-this.m_iDriftStartX;this.m_aPoint[r][1]=this.m_aPoint[r][1]+n-this.m_iDriftStartY}this.m_iDriftStartX=t;this.m_iDriftStartY=n;this.setPointInfo(this.m_aPoint);D()}}},{key:"stretch",value:function e(t,n){if(this.m_iEditType===0){if(this.m_iIndexChoosePoint!==-1){this.m_aPoint[this.m_iIndexChoosePoint][0]=t;this.m_aPoint[this.m_iIndexChoosePoint][1]=n}this.setPointInfo(this.m_aPoint);D()}}},{key:"inShape",value:function e(t,n){var i=false;var r=this.m_aPoint.length;for(var a=0,o=r-1;a<r;o=a++){if(this.m_aPoint[a][1]>n!==this.m_aPoint[o][1]>n&&t<(this.m_aPoint[o][0]-this.m_aPoint[a][0])*(n-this.m_aPoint[a][1])/(this.m_aPoint[o][1]-this.m_aPoint[a][1])+this.m_aPoint[a][0]){i=!i}}return i}},{key:"inArc",value:function e(t,n,i){var r=false;for(var a=0,o=this.m_aPoint.length;a<o;a++){var s=Math.sqrt((t-this.m_aPoint[a][0])*(t-this.m_aPoint[a][0])+(n-this.m_aPoint[a][1])*(n-this.m_aPoint[a][1]));if(s<i){r=true;this.m_iIndexChoosePoint=a;break}}return r}},{key:"getMouseDownPoints",value:function e(t,n){this.m_iDriftStartX=t;this.m_iDriftStartY=n}},{key:"getPointInfo",value:function e(){return this.m_aPoint}},{key:"setPointInfo",value:function e(t){if(t!==null&&typeof t!=="undefined"&&t.length>0){this.m_aPoint=t;this.setEdgePoints(t)}}},{key:"addPoint",value:function e(t,n){if(this.m_aPoint.length<this.m_iMaxPointNum){this.m_aPoint.push([t,n])}if(this.m_aPoint.length===this.m_iMaxPointNum){this.setPointInfo(this.m_aPoint)}}},{key:"setEdgePoints",value:function e(t){for(var n=0,i=t.length;n<i;n++){if(n===0){this.m_oEdgePoints.top.x=t[n][0];this.m_oEdgePoints.top.y=t[n][1];this.m_oEdgePoints.left.x=t[n][0];this.m_oEdgePoints.left.y=t[n][1];this.m_oEdgePoints.right.x=t[n][0];this.m_oEdgePoints.right.y=t[n][1];this.m_oEdgePoints.bottom.x=t[n][0];this.m_oEdgePoints.bottom.y=t[n][1]}else{if(t[n][1]<this.m_oEdgePoints.top.y){this.m_oEdgePoints.top.x=t[n][0];this.m_oEdgePoints.top.y=t[n][1]}if(t[n][0]>this.m_oEdgePoints.right.x){this.m_oEdgePoints.right.x=t[n][0];this.m_oEdgePoints.right.y=t[n][1]}if(t[n][1]>this.m_oEdgePoints.bottom.y){this.m_oEdgePoints.bottom.x=t[n][0];this.m_oEdgePoints.bottom.y=t[n][1]}if(t[n][0]<this.m_oEdgePoints.left.x){this.m_oEdgePoints.left.x=t[n][0];this.m_oEdgePoints.left.y=t[n][1]}}}}}]);return e}();var M=function(e){f(t,e);function t(){c(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.m_szType="Rect";return e}a(t,[{key:"setPointInfo",value:function e(t){if(t!==null&&typeof t!=="undefined"){var n=t[0][0];var i=t[0][1];var r=t[0][0];var a=t[0][1];for(var o=0,s=t.length;o<s;o++){if(n>t[o][0]){n=t[o][0]}if(i>t[o][1]){i=t[o][1]}if(r<t[o][0]){r=t[o][0]}if(a<t[o][1]){a=t[o][1]}}this.m_aPoint=[[n,i],[r,i],[r,a],[n,a]]}}},{key:"draw",value:function e(){g[S].fillStyle=this.m_szFillColor;g[S].strokeStyle=this.m_szDrawColor;var t=this.m_aPoint[0][0];var n=this.m_aPoint[0][1];var i=this.m_aPoint[2][0]-t;var r=this.m_aPoint[2][1]-n;g[S].globalAlpha=this.m_iTranslucent;g[S].fillRect(t,n,i,r);g[S].globalAlpha=1;g[S].fillText(this.m_szTips,(t+this.m_aPoint[2][0])/2,(n+this.m_aPoint[2][1])/2);if(this.m_bChoosed){var a=Math.round(i/2);var o=Math.round(r/2);if(this.m_iEditType===0){var s=[t,t+a,t+i,t,t+i,t,t+a,t+i];var l=[n,n,n,n+o,n+o,n+r,n+r,n+r];for(var u=0;u<8;u++){g[S].beginPath();g[S].arc(s[u],l[u],3,0,360,false);g[S].fillStyle=this.m_szDrawColor;g[S].closePath();g[S].fill()}}}g[S].strokeRect(t,n,i,r)}},{key:"stretch",value:function e(t,n){if(this.m_iEditType===0){if(this.m_iIndexChoosePoint===0){if(t<this.m_aPoint[2][0]&&n<this.m_aPoint[2][1]){this.m_aPoint[0][0]=t;this.m_aPoint[0][1]=n;this.m_aPoint[3][0]=t;this.m_aPoint[1][1]=n}}else if(this.m_iIndexChoosePoint===1){if(n<this.m_aPoint[2][1]){this.m_aPoint[0][1]=n;this.m_aPoint[1][1]=n}}else if(this.m_iIndexChoosePoint===2){if(t>this.m_aPoint[3][0]&&n<this.m_aPoint[3][1]){this.m_aPoint[1][0]=t;this.m_aPoint[1][1]=n;this.m_aPoint[2][0]=t;this.m_aPoint[0][1]=n}}else if(this.m_iIndexChoosePoint===3){if(t<this.m_aPoint[2][0]){this.m_aPoint[0][0]=t;this.m_aPoint[3][0]=t}}else if(this.m_iIndexChoosePoint===4){if(t>this.m_aPoint[0][0]){this.m_aPoint[1][0]=t;this.m_aPoint[2][0]=t}}else if(this.m_iIndexChoosePoint===5){if(t<this.m_aPoint[1][0]&&n>this.m_aPoint[1][1]){this.m_aPoint[3][0]=t;this.m_aPoint[3][1]=n;this.m_aPoint[0][0]=t;this.m_aPoint[2][1]=n}}else if(this.m_iIndexChoosePoint===6){if(n>this.m_aPoint[1][1]){this.m_aPoint[2][1]=n;this.m_aPoint[3][1]=n}}else if(this.m_iIndexChoosePoint===7){if(t>this.m_aPoint[0][0]&&n>this.m_aPoint[0][1]){this.m_aPoint[2][0]=t;this.m_aPoint[2][1]=n;this.m_aPoint[1][0]=t;this.m_aPoint[3][1]=n}}D()}}},{key:"move",value:function e(t){D();this.m_bChoosed=true;var n=t[0][0];var i=t[0][1];var r=t[1][0];var a=t[1][1];this.setPointInfo([[n,i],[r,i],[r,a],[n,a]]);this.draw()}},{key:"inArc",value:function e(t,n,i){var r=this.m_aPoint[0][0];var a=this.m_aPoint[0][1];var o=this.m_aPoint[2][0]-r;var s=this.m_aPoint[2][1]-a;var l=Math.round(o/2);var u=Math.round(s/2);var f=[r,r+l,r+o,r,r+o,r,r+l,r+o];var c=[a,a,a,a+u,a+u,a+s,a+s,a+s];for(var d=0;d<8;d++){var h=Math.sqrt((t-f[d])*(t-f[d])+(n-c[d])*(n-c[d]));if(h<i){this.m_iIndexChoosePoint=d;return true}}return false}}]);return t}(e);var l=function(e){f(i,e);function i(e,t){c(this,i);var n=u(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));n.m_szType="RectOSD";n.m_szOSDType="overlay-date";n.m_szText=e||"";n.m_szEnabled=t||"";n.m_szDateStyle="";n.m_szClockType="";n.m_szDisplayWeek="";n.m_szId="";n.m_szAlignment="0";return n}a(i,[{key:"draw",value:function e(){if(this.m_szEnabled==="true"){var t=this.m_aPoint[0][0];var n=this.m_aPoint[0][1];var i=this.m_aPoint[2][0]-t;var r=this.m_aPoint[2][1]-n;g[S].beginPath();g[S].strokeStyle=this.m_szDrawColor;g[S].globalAlpha=1;g[S].rect(t,n,i,r);g[S].font="15px serif";g[S].strokeText(this.m_szText,t,n+15);g[S].stroke()}}},{key:"drag",value:function e(t,n){var i=this.m_aPoint.length;var r=0;if("0"===this.m_szAlignment){for(r=0;r<i;r++){if(this.m_aPoint[r][1]+n-this.m_iDriftStartY>g.m_iCanvasHeight||this.m_aPoint[r][0]+t-this.m_iDriftStartX<0||this.m_aPoint[r][1]+n-this.m_iDriftStartY<0){this.m_iDriftStartX=t;this.m_iDriftStartY=n;return}}for(r=0;r<i;r++){this.m_aPoint[r][0]=this.m_aPoint[r][0]+t-this.m_iDriftStartX;this.m_aPoint[r][1]=this.m_aPoint[r][1]+n-this.m_iDriftStartY}}else if("1"===this.m_szAlignment||"2"===this.m_szAlignment){for(r=0;r<i;r++){if(this.m_aPoint[r][1]+n-this.m_iDriftStartY>g.m_iCanvasHeight||this.m_aPoint[r][1]+n-this.m_iDriftStartY<0){this.m_iDriftStartX=t;this.m_iDriftStartY=n;return}}for(r=0;r<i;r++){this.m_aPoint[r][1]=this.m_aPoint[r][1]+n-this.m_iDriftStartY}}this.m_iDriftStartX=t;this.m_iDriftStartY=n;this.setEdgePoints(this.m_aPoint);D()}},{key:"stretch",value:function e(){}}]);return i}(e);var k=function(e){f(t,e);function t(){c(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.m_szType="Grid";e.m_iGridColNum=22;e.m_iGridRowNum=18;e.m_szGridMap="";e.m_aAddGridMap=[];return e}a(t,[{key:"draw",value:function e(){var t=g.m_iCanvasWidth/this.m_iGridColNum;var n=g.m_iCanvasHeight/this.m_iGridRowNum;var i="";for(var r=0;r<this.m_iGridRowNum;r++){var a=this.m_szGridMap.substring(r*6,r*6+6);var o=parseInt("f"+a,16).toString(2).split("").slice(4);var s="";for(var l=0;l<this.m_iGridColNum;l++){var u="";if(o[l]==="1"){g[S].strokeStyle=this.m_szDrawColor;g[S].globalAlpha=1;g[S].strokeRect(t*l,n*r,t,n);u="1"}else{u="0"}if(this.m_aAddGridMap.length){if(this.m_aAddGridMap[r][l]===1){g[S].strokeStyle=this.m_szDrawColor;g[S].strokeRect(t*l,n*r,t,n);u="1"}}s+=u}i+=parseInt("1111"+s+"00",2).toString(16).substring(1)}this.m_szGridMap=i}},{key:"move",value:function e(t,n,i,r){var a=g.m_iCanvasWidth/this.m_iGridColNum;var o=g.m_iCanvasHeight/this.m_iGridRowNum;var s=Math.floor(t/a);var l=Math.floor(n/o);var u=Math.floor(Math.abs(i-t)/a);var f=Math.floor(Math.abs(r-n)/o);var c=1;var d=1;if(i-t>0){c=1}else{c=-1}if(r-n>0){d=1}else{d=-1}var h=[];for(var p=0;p<this.m_iGridRowNum;p++){h[p]=[];for(var v=0;v<this.m_iGridColNum;v++){if(c===1){if(d===1){if(p>=l&&p<=l+f&&v>=s&&v<=s+u){h[p][v]=1}else{h[p][v]=0}}else{if(p<=l&&p>=l-f&&v>=s&&v<=s+u){h[p][v]=1}else{h[p][v]=0}}}else{if(d===1){if(p>=l&&p<=l+f&&v<=s&&v>=s-u){h[p][v]=1}else{h[p][v]=0}}else{if(p<=l&&p>=l-f&&v<=s&&v>=s-u){h[p][v]=1}else{h[p][v]=0}}}}}this.m_aAddGridMap=h;this.draw()}}]);return t}(e);var o=function(e){f(t,e);function t(){c(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.m_szType="Line";e.m_iLineType=0;e.m_iDirection=0;e.m_iArrowType=0;e.m_aCrossArrowPoint=[];return e}a(t,[{key:"draw",value:function e(){if(this.m_iLineType===0){this.drawNormalLine()}else if(this.m_iLineType===1){this.drawArrowLine()}else if(this.m_iLineType===3){this.drawCrossLine()}else if(this.m_iLineType===4){this.drawLineCount()}}},{key:"drawNormalLine",value:function e(){g[S].globalAlpha=1;if(this.m_aPoint.length>0){g[S].beginPath();g[S].strokeStyle=this.m_szDrawColor;g[S].lineWidth=2;g[S].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(var t=1,n=this.m_aPoint.length;t<n;t++){g[S].lineTo(this.m_aPoint[t][0],this.m_aPoint[t][1])}g[S].stroke();if(this.m_bChoosed){for(var i=0,r=this.m_aPoint.length;i<r;i++){g[S].beginPath();g[S].fillStyle=this.m_szDrawColor;g[S].arc(this.m_aPoint[i][0],this.m_aPoint[i][1],3,0,Math.PI*2,true);g[S].closePath();g[S].fill()}}if(this.m_szTips!==""){g[S].strokeStyle=this.m_szDrawColor;g[S].fillText(this.m_szTips,this.m_aPoint[0][0]+10,this.m_aPoint[0][1]+4)}}}},{key:"drawArrowLine",value:function e(t,n,i,r,a,o,s,l){o=typeof o!=="undefined"?o:30;s=typeof s!=="undefined"?s:10;l=typeof l!=="undefined"?l:1;var u=Math.atan2(i-a,n-r)*180/Math.PI;var f=(u+o)*Math.PI/180;var c=(u-o)*Math.PI/180;var d=s*Math.cos(f);var h=s*Math.sin(f);var p=s*Math.cos(c);var v=s*Math.sin(c);g[S].save();g[S].beginPath();var m=n-d;var y=i-h;g[S].moveTo(m,y);g[S].lineTo(n,i);m=n-p;y=i-v;g[S].lineTo(m,y);g[S].moveTo(n,i);g[S].lineTo(r,a);if(t===1){m=r+d;y=a+h;g[S].moveTo(m,y);g[S].lineTo(r,a);m=r+p;y=a+v;g[S].lineTo(m,y)}g[S].strokeStyle=this.m_szDrawColor;g[S].lineWidth=l;g[S].stroke();g[S].restore()}},{key:"drawCrossLine",value:function e(){this.drawNormalLine();var t=(this.m_aPoint[0][0]+this.m_aPoint[1][0])/2;var n=(this.m_aPoint[0][1]+this.m_aPoint[1][1])/2;var i=Math.atan2(n-this.m_aPoint[0][1],t-this.m_aPoint[0][0])*180/Math.PI;var r=(i+90)*Math.PI/180;var a=(i-90)*Math.PI/180;var o=25*Math.cos(r);var s=25*Math.sin(r);var l=25*Math.cos(a);var u=25*Math.sin(a);var f=0;var c=0;f=t-o;c=n-s;var d=0;var h=0;if(this.m_iDirection===0){d=-10;h=-15}else if(this.m_iDirection===1){d=10;h=10}else{d=10;h=-15}if(this.m_iDirection!==0){this.drawArrowLine(0,f,c,t,n)}g[S].strokeStyle=this.m_szDrawColor;g[S].font="8px";g[S].strokeText("A",f+d,c+4);f=t-l;c=n-u;if(this.m_iDirection!==1){this.drawArrowLine(0,f,c,t,n)}g[S].strokeStyle=this.m_szDrawColor;g[S].font="8px";g[S].strokeText("B",f+h,c+4)}},{key:"drawLineCount",value:function e(){this.drawNormalLine();var t=(this.m_aPoint[0][0]+this.m_aPoint[1][0])/2;var n=(this.m_aPoint[0][1]+this.m_aPoint[1][1])/2;var i=Math.atan2(n-this.m_aPoint[0][1],t-this.m_aPoint[0][0])*180/Math.PI;var r=(i+90)*Math.PI/180;var a=(i-90)*Math.PI/180;var o=25*Math.cos(r);var s=25*Math.sin(r);var l=25*Math.cos(a);var u=25*Math.sin(a);var f=0;var c=0;f=t-o;c=n-s;if(this.m_iArrowType===1){f=t-l;c=n-u;this.drawArrowLine(0,f,c,t,n)}else if(this.m_iArrowType===0){this.drawArrowLine(0,f,c,t,n)}this.m_aCrossArrowPoint=[[t,n],[f,c]]}},{key:"inShape",value:function e(t,n){var i=false;for(var r=0,a=this.m_aPoint.length-1;r<a;r++){var o=Math.sqrt((this.m_aPoint[r+1][0]-this.m_aPoint[r][0])*(this.m_aPoint[r+1][0]-this.m_aPoint[r][0])+(this.m_aPoint[r+1][1]-this.m_aPoint[r][1])*(this.m_aPoint[r+1][1]-this.m_aPoint[r][1]));var s=Math.sqrt((t-this.m_aPoint[r][0])*(t-this.m_aPoint[r][0])+(n-this.m_aPoint[r][1])*(n-this.m_aPoint[r][1]));var l=Math.sqrt((t-this.m_aPoint[r+1][0])*(t-this.m_aPoint[r+1][0])+(n-this.m_aPoint[r+1][1])*(n-this.m_aPoint[r+1][1]));if(s+l-o<1){i=true}}return i}}]);return t}(e);var x=function(e){f(t,e);function t(){c(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.m_szType="Polygon";e.m_iPolygonType=1;return e}a(t,[{key:"setPointInfo",value:function e(t){if(t!==null&&typeof t!=="undefined"){if(this.m_iPolygonType===0){var n=t[0][0];var i=t[0][1];var r=t[0][0];var a=t[0][1];for(var o=0,s=t.length;o<s;o++){if(n>t[o][0]){n=t[o][0]}if(i>t[o][1]){i=t[o][1]}if(r<t[o][0]){r=t[o][0]}if(a<t[o][1]){a=t[o][1]}}this.m_aPoint=[[n,i],[r,i],[r,a],[n,a]]}else if(this.m_iPolygonType===1){this.m_aPoint=t}else{this.m_aPoint=t}this.setEdgePoints(t)}}},{key:"draw",value:function e(){if(this.m_aPoint.length>0){g[S].fillStyle=this.m_szFillColor;g[S].strokeStyle=this.m_szDrawColor;g[S].globalAlpha=1;var t=0;var n=0;if(this.m_bChoosed){for(t=0,n=this.m_aPoint.length;t<n;t++){g[S].beginPath();g[S].arc(this.m_aPoint[t][0],this.m_aPoint[t][1],3,0,360,false);g[S].fillStyle=this.m_szDrawColor;g[S].closePath();g[S].fill()}}g[S].beginPath();g[S].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(t=0,n=this.m_aPoint.length;t<n;t++){if(t!==0){g[S].lineTo(this.m_aPoint[t][0],this.m_aPoint[t][1])}}g[S].stroke();if(this.m_bClosed){g[S].fillText(this.m_szTips,(this.m_oEdgePoints.left.x+this.m_oEdgePoints.right.x)/2,(this.m_oEdgePoints.top.y+this.m_oEdgePoints.bottom.y)/2);g[S].closePath();g[S].stroke();g[S].globalAlpha=this.m_iTranslucent;g[S].fill()}}}},{key:"move",value:function e(t,n,i,r){if(this.m_iPolygonType===1){if(this.m_aPoint.length<this.m_iMaxPointNum&&this.m_aPoint.length>0){g[S].fillStyle=this.m_szFillColor;g[S].strokeStyle=this.m_szDrawColor;g[S].globalAlpha=1;var a=0;var o=0;for(a=0,o=this.m_aPoint.length;a<o;a++){g[S].beginPath();g[S].arc(this.m_aPoint[a][0],this.m_aPoint[a][1],3,0,360,false);g[S].fillStyle=this.m_szDrawColor;g[S].closePath();g[S].fill()}g[S].beginPath();g[S].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(a=0,o=this.m_aPoint.length;a<o;a++){if(a!==0){g[S].lineTo(this.m_aPoint[a][0],this.m_aPoint[a][1])}}g[S].lineTo(t,n);g[S].closePath();g[S].stroke()}}else if(this.m_iPolygonType===0){this.m_bChoosed=true;var s=i;var l=r;var u=t;var f=n;this.setPointInfo([[s,l],[u,l],[u,f],[s,f]]);this.draw()}}},{key:"stretch",value:function e(t,n){if(this.m_iEditType===0){if(this.m_iPolygonType===1){if(this.m_iIndexChoosePoint!==-1){this.m_aPoint[this.m_iIndexChoosePoint][0]=t;this.m_aPoint[this.m_iIndexChoosePoint][1]=n}}else{if(this.m_iIndexChoosePoint===0){if(t<this.m_aPoint[2][0]&&n<this.m_aPoint[2][1]){this.m_aPoint[0][0]=t;this.m_aPoint[0][1]=n;this.m_aPoint[3][0]=t;this.m_aPoint[1][1]=n}}else if(this.m_iIndexChoosePoint===1){if(t>this.m_aPoint[3][0]&&n<this.m_aPoint[3][1]){this.m_aPoint[1][0]=t;this.m_aPoint[1][1]=n;this.m_aPoint[2][0]=t;this.m_aPoint[0][1]=n}}else if(this.m_iIndexChoosePoint===2){if(t>this.m_aPoint[0][0]&&n>this.m_aPoint[0][1]){this.m_aPoint[2][0]=t;this.m_aPoint[2][1]=n;this.m_aPoint[1][0]=t;this.m_aPoint[3][1]=n}}else if(this.m_iIndexChoosePoint===3){if(t<this.m_aPoint[1][0]&&n>this.m_aPoint[1][1]){this.m_aPoint[3][0]=t;this.m_aPoint[3][1]=n;this.m_aPoint[0][0]=t;this.m_aPoint[2][1]=n}}}this.setPointInfo(this.m_aPoint);D()}}}]);return t}(e);var I=function(e){f(t,e);function t(){c(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.m_szType="Point";e.m_szId="";return e}a(t,[{key:"draw",value:function e(){g[S].beginPath();g[S].fillStyle=this.m_szDrawColor;g[S].globalAlpha=1;g[S].arc(this.m_aPoint[0][0],this.m_aPoint[0][1],10,0,Math.PI*2,true);g[S].closePath();g[S].fill()}},{key:"drag",value:function e(){}},{key:"stretch",value:function e(){}}]);return t}(e);var t=function(){function n(e,t){c(this,n);g=this;this[p]=(0,s["default"])("#"+e);this[h]=t||false;this[S]=this[p][0].getContext("2d");this[v]=[];this[m]=false;this[y]="Rect";this[b]=10;this[_]=true;this[w]={};this[C]=null;this[r]={szDrawColor:"#ff0000",szFillColor:"#343434",iTranslucent:.7};this[P]=false;this.m_iCanvasWidth=this[p].width();this.m_iCanvasHeight=this[p].height();this.m_iHorizontalResolution=0;this.m_iVerticalResolution=0;this.m_szDisplayMode="";this.m_szVideoFormat="";i();this[v].length=0}a(n,[{key:"setDrawMutiShapeOneTime",value:function e(t){this[_]=t}},{key:"setMaxShapeSupport",value:function e(t){this[b]=t}},{key:"getMaxShapeSupport",value:function e(){return this[b]}},{key:"setDrawStatus",value:function e(t,n){this[m]=t;if(n&&t){this[C]=n}if(!t){this[C]=null}}},{key:"setShapeType",value:function e(t){this[y]=t;D()}},{key:"setCurrentShapeInfo",value:function e(t){this[w]=t||{szId:"",szTips:"",iMinClosed:3,iMaxPointNum:11,iPolygonType:1,iRedrawMode:0}}},{key:"getShapeType",value:function e(){return this[y]}},{key:"getAllShapesInfo",value:function e(){var t=[];for(var n=0,i=this[v].length;n<i;n++){if(this[v][n].m_szType==="Grid"){t.push({szType:this[v][n].m_szType,szGridMap:this[v][n].m_szGridMap,iGridColNum:this[v][n].m_iGridColNum,iGridRowNum:this[v][n].m_iGridRowNum})}else if(this[v][n].m_szType==="RectOSD"){t.push({szType:this[v][n].m_szType,szText:this[v][n].m_szText,szEnabled:this[v][n].m_szEnabled,szOSDType:this[v][n].m_szOSDType,iPositionX:this[v][n].m_aPoint[0][0],iPositionY:this[v][n].m_aPoint[0][1],szDateStyle:this[v][n].m_szDateStyle,szClockType:this[v][n].m_szClockType,szDisplayWeek:this[v][n].m_szDisplayWeek,szId:this[v][n].m_szId,szAlignment:this[v][n].m_szAlignment})}else{t.push({szType:this[v][n].m_szType,aPoint:this[v][n].m_aPoint,szId:this[v][n].m_szId,bChoosed:this[v][n].m_bChoosed})}}return t}},{key:"deleteRepeatPolyonById",value:function e(t){var n=this.getAllShapesInfo();var i=n.length;if(i>0){for(var r=0;r<i;r++){if(n[r].szType==="Polygon"){if(n[r].szId===t){this.deleteShape(r)}}}}}},{key:"getShapesInfoByType",value:function e(t){var n=[];for(var i=0,r=this[v].length;i<r;i++){if(this[v][i].m_szType===t){if(this[v][i].m_szType==="Grid"){n.push({szType:this[v][i].m_szType,szGridMap:this[v][i].m_szGridMap,iGridColNum:this[v][i].m_iGridColNum,iGridRowNum:this[v][i].m_iGridRowNum})}else if(this[v][i].m_szType==="RectOSD"){n.push({szType:this[v][i].m_szType,szText:this[v][i].m_szText,szEnabled:this[v][i].m_szEnabled,szOSDType:this[v][i].m_szOSDType,iPositionX:this[v][i].m_aPoint[0][0],iPositionY:this[v][i].m_aPoint[0][1],szDateStyle:this[v][i].m_szDateStyle,szClockType:this[v][i].m_szClockType,szDisplayWeek:this[v][i].m_szDisplayWeek,szId:this[v][i].m_szId,szAlignment:this[v][i].m_szAlignment})}else if(t==="Polygon"){n.push({szType:this[v][i].m_szType,szId:this[v][i].m_szId,iPolygonType:this[v][i].m_iPolygonType,iMinClosed:this[v][i].m_iMinClosed,iMaxPointNum:this[v][i].m_iMaxPointNum,iEditType:this[v][i].m_iEditType,aPoint:this[v][i].m_aPoint,bClosed:this[v][i].m_bClosed,szTips:this[v][i].m_szTips,szDrawColor:this[v][i].m_szDrawColor,szFillColor:this[v][i].m_szFillColor,iTranslucent:this[v][i].m_iTranslucent})}else if(t==="Line"){n.push({szType:this[v][i].m_szType,szId:this[v][i].m_szId,aPoint:this[v][i].m_aPoint,szTips:this[v][i].m_szTips,iLineType:this[v][i].m_iLineType,iDirection:this[v][i].m_iDirection,iArrowType:this[v][i].m_iArrowType,szDrawColor:this[v][i].m_szDrawColor,aCrossArrowPoint:this[v][i].m_aCrossArrowPoint})}else if(t==="Rect"){n.push({szType:this[v][i].m_szType,iEditType:this[v][i].m_iEditType,aPoint:this[v][i].m_aPoint,szTips:this[v][i].m_szTips,szDrawColor:this[v][i].m_szDrawColor,szFillColor:this[v][i].m_szFillColor,iTranslucent:this[v][i].m_iTranslucent})}else{n.push({szType:this[v][i].m_szType,aPoint:this[v][i].m_aPoint})}}}return n}},{key:"setShapesInfoByType",value:function e(t,n){if(!n){n=[]}var i=null;if(t==="Rect"||t==="Polygon"||t==="Line"||t==="Point"){for(var r=0,a=n.length;r<a;r++){if(t==="Rect"){i=new M;i.m_iEditType=n[r].iEditType;i.m_szTips=n[r].szTips||"";i.m_szDrawColor=n[r].szDrawColor;i.m_szFillColor=n[r].szFillColor;i.m_iTranslucent=n[r].iTranslucent;i.m_iRedrawMode=n[r].iRedrawMode}else if(t==="Polygon"){i=new x;if(n[r].iPolygonType===0){i.m_bClosed=true}else{i.m_bClosed=n[r].bClosed}i.m_szTips=n[r].szTips||"";i.m_szId=n[r].szId||"";i.m_iPolygonType=n[r].iPolygonType;i.m_iMinClosed=n[r].iMinClosed||3;i.m_iMaxPointNum=n[r].iMaxPointNum||11;i.m_iEditType=n[r].iEditType;i.m_szDrawColor=n[r].szDrawColor;i.m_szFillColor=n[r].szFillColor;i.m_iTranslucent=n[r].iTranslucent;i.m_iRedrawMode=n[r].iRedrawMode}else if(t==="Line"){i=new o;i.m_iLineType=n[r].iLineType;i.m_szTips=n[r].szTips||"";i.m_szId=n[r].szId;i.m_iDirection=n[r].iDirection;i.m_iArrowType=n[r].iArrowType;i.m_szDrawColor=n[r].szDrawColor;i.setPointInfo(n[r].aPoint)}else if(t==="Point"){i=new I;i.m_szId=n[r].szId;i.m_szDrawColor=n[r].szDrawColor;i.setPointInfo(n[r].aPoint)}i.setPointInfo(n[r].aPoint);if(r===0){i.m_bChoosed=true}T(i)}}else if(t==="Grid"){i=new k;i.m_szGridMap=n[0].szGridMap||"";i.m_iGridColNum=n[0].iGridColNum||22;i.m_iGridRowNum=n[0].iGridRowNum||18;T(i)}D()}},{key:"addOSDShape",value:function e(t,n,i,r,a){if(!i&&!r){i=0;r=0}if(!a){a={}}var o=new l(t,n);var s=t.replace(/[^x00-xff]/g,"rr").length*10;o.m_szOSDType=a.szOSDType||"";o.m_szDateStyle=a.szDateStyle||"";o.m_szClockType=a.szClockType||"";o.m_szDisplayWeek=a.szDisplayWeek||"";o.m_szId=a.szId||"";o.m_szAlignment=""+a.szAlignment||"0";if("0"===o.m_szAlignment){o.m_aPoint=[[i,r],[s+i,r],[s+i,r+20],[i,r+20]]}else if("1"===o.m_szAlignment){o.m_aPoint=[[0,r],[s,r],[s,r+20],[0,r+20]]}else if("2"===o.m_szAlignment){o.m_aPoint=[[this.m_iCanvasWidth-s,r],[this.m_iCanvasWidth,r],[this.m_iCanvasWidth,r+20],[this.m_iCanvasWidth-s,r+20]]}else{o.m_aPoint=[[i,r],[s+i,r],[s+i,r+20],[i,r+20]]}T(o);D()}},{key:"selectShapeById",value:function e(t,n){for(var i=0,r=g[v].length;i<r;i++){if(t===g[v][i].m_szType){if(n===g[v][i].m_szId){g[v][i].m_bChoosed=true}else{g[v][i].m_bChoosed=false}}}D()}},{key:"setCanvasSize",value:function e(t,n){if(t>0&&n>0){this.m_iCanvasWidth=t;this.m_iCanvasHeight=n;D()}}},{key:"setDrawStyle",value:function e(t,n,i){this[r]={szDrawColor:t,szFillColor:n,iTranslucent:i}}},{key:"clearAllShape",value:function e(){this[v].length=0;g[P]=false;D()}},{key:"clearShapeByType",value:function e(t){var n=this[v].length;for(var i=n;i>0;i--){if(this[v][i-1].m_szType===t){if(t==="Grid"){this[v][i-1].m_szGridMap="";this[v][i-1].m_aAddGridMap=[]}else{this[v].splice(i-1,1)}}}if("Polygon"===t){g[P]=false}D()}},{key:"deleteShape",value:function e(t){if(this[v].length>t){this[v].splice(t,1)}D()}},{key:"updateCanvas",value:function e(t){this[p]=(0,s["default"])("#"+t);this[S]=this[p][0].getContext("2d");this.m_iCanvasWidth=this[p].width();this.m_iCanvasHeight=this[p].height();i()}},{key:"resizeCanvas",value:function e(){this.m_iCanvasWidth=this[p].width();this.m_iCanvasHeight=this[p].height()}},{key:"canvasRedraw",value:function e(){D()}}]);return n}();return t}();t.ESCanvas=o}])})})(jsPluginV11_0_0_min);var streamClient1_2_0_min={exports:{}};(function(module,exports){(function webpackUniversalModuleDefinition(root,factory){module.exports=factory()})(window,function(){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{enumerable:true,get:getter})}};__webpack_require__.r=function(exports){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(exports,"__esModule",{value:true})};__webpack_require__.t=function(value,mode){if(mode&1)value=__webpack_require__(value);if(mode&8)return value;if(mode&4&&typeof value==="object"&&value&&value.__esModule)return value;var ns=Object.create(null);__webpack_require__.r(ns);Object.defineProperty(ns,"default",{enumerable:true,value:value});if(mode&2&&typeof value!="string")for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module["default"]}:function getModuleExports(){return module};__webpack_require__.d(getter,"a",getter);return getter};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=1)}([function(module,exports){var dbits;function BigInteger(a,b,c){a!=null&&("number"==typeof a?this.fromNumber(a,b,c):b==null&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function nbi(){return new BigInteger(null)}function am3(a,b,c,d,e,g){var h=b&16383;for(b>>=14;--g>=0;){var f=this[a]&16383,o=this[a++]>>14,p=b*f+o*h,f=h*f+((p&16383)<<14)+c[d]+e,e=(f>>28)+(p>>14)+b*o;c[d++]=f&268435455}return e}BigInteger.prototype.am=am3,dbits=28;BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz",BI_RC=[],rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;function int2char(a){return BI_RM.charAt(a)}function intAt(a,b){var c=BI_RC[a.charCodeAt(b)];return c==null?-1:c}function bnpCopyTo(a){for(var b=this.t-1;b>=0;--b)a[b]=this[b];a.t=this.t;a.s=this.s}function bnpFromInt(a){this.t=1;this.s=a<0?-1:0;a>0?this[0]=a:a<-1?this[0]=a+DV:this.t=0}function nbv(a){var b=nbi();b.fromInt(a);return b}function bnpFromString(a,b){var c;if(b==16)c=4;else if(b==8)c=3;else if(b==256)c=8;else if(b==2)c=1;else if(b==32)c=5;else if(b==4)c=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var d=a.length,e=!1,g=0;--d>=0;){var h=c==8?a[d]&255:intAt(a,d);h<0?a.charAt(d)=="-"&&(e=!0):(e=!1,g==0?this[this.t++]=h:g+c>this.DB?(this[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this[this.t++]=h>>this.DB-g):this[this.t-1]|=h<<g,g+=c,g>=this.DB&&(g-=this.DB))}if(c==8&&(a[0]&128)!=0)this.s=-1,g>0&&(this[this.t-1]|=(1<<this.DB-g)-1<<g);this.clamp();e&&BigInteger.ZERO.subTo(this,this)}function bnpClamp(){for(var a=this.s&this.DM;this.t>0&&this[this.t-1]==a;)--this.t}function bnToString(a){if(this.s<0)return"-"+this.negate().toString(a);if(a==16)a=4;else if(a==8)a=3;else if(a==2)a=1;else if(a==32)a=5;else if(a==64)a=6;else if(a==4)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,e="",g=this.t,h=this.DB-g*this.DB%a;if(g-- >0){if(h<this.DB&&(c=this[g]>>h)>0)d=!0,e=int2char(c);for(;g>=0;)h<a?(c=(this[g]&(1<<h)-1)<<a-h,c|=this[--g]>>(h+=this.DB-a)):(c=this[g]>>(h-=a)&b,h<=0&&(h+=this.DB,--g)),c>0&&(d=!0),d&&(e+=int2char(c))}return d?e:"0"}function bnNegate(){var a=nbi();BigInteger.ZERO.subTo(this,a);return a}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var b=this.s-a.s;if(b!=0)return b;var c=this.t,b=c-a.t;if(b!=0)return b;for(;--c>=0;)if((b=this[c]-a[c])!=0)return b;return 0}function nbits(a){var b=1,c;if((c=a>>>16)!=0)a=c,b+=16;if((c=a>>8)!=0)a=c,b+=8;if((c=a>>4)!=0)a=c,b+=4;if((c=a>>2)!=0)a=c,b+=2;a>>1!=0&&(b+=1);return b}function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(a,b){var c;for(c=this.t-1;c>=0;--c)b[c+a]=this[c];for(c=a-1;c>=0;--c)b[c]=0;b.t=this.t+a;b.s=this.s}function bnpDRShiftTo(a,b){for(var c=a;c<this.t;++c)b[c-a]=this[c];b.t=Math.max(this.t-a,0);b.s=this.s}function bnpLShiftTo(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),h=this.s<<c&this.DM,f;for(f=this.t-1;f>=0;--f)b[f+g+1]=this[f]>>d|h,h=(this[f]&e)<<c;for(f=g-1;f>=0;--f)b[f]=0;b[g]=h;b.t=this.t+g+1;b.s=this.s;b.clamp()}function bnpRShiftTo(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b[0]=this[c]>>d;for(var h=c+1;h<this.t;++h)b[h-c-1]|=(this[h]&g)<<e,b[h-c]=this[h]>>d;d>0&&(b[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}}function bnpSubTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]-a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a[c],b[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=d<0?-1:0;d<-1?b[c++]=this.DV+d:d>0&&(b[c++]=d);b.t=c;b.clamp()}function bnpMultiplyTo(a,b){var c=this.abs(),d=a.abs(),e=c.t;for(b.t=e+d.t;--e>=0;)b[e]=0;for(e=0;e<d.t;++e)b[e+c.t]=c.am(0,d[e],b,e,0,c.t);b.s=0;b.clamp();this.s!=a.s&&BigInteger.ZERO.subTo(b,b)}function bnpSquareTo(a){for(var b=this.abs(),c=a.t=2*b.t;--c>=0;)a[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b[c],a,2*c,0,1);if((a[c+b.t]+=b.am(c+1,2*b[c],a,2*c+1,d,b.t-c-1))>=b.DV)a[c+b.t]-=b.DV,a[c+b.t+1]=1}a.t>0&&(a[a.t-1]+=b.am(c,b[c],a,2*c,0,1));a.s=0;a.clamp()}function bnpDivRemTo(a,b,c){var d=a.abs();if(!(d.t<=0)){var e=this.abs();if(e.t<d.t)b!=null&&b.fromInt(0),c!=null&&this.copyTo(c);else{c==null&&(c=nbi());var g=nbi(),h=this.s,a=a.s,f=this.DB-nbits(d[d.t-1]);f>0?(d.lShiftTo(f,g),e.lShiftTo(f,c)):(d.copyTo(g),e.copyTo(c));d=g.t;e=g[d-1];if(e!=0){var o=e*(1<<this.F1)+(d>1?g[d-2]>>this.F2:0),p=this.FV/o,o=(1<<this.F1)/o,q=1<<this.F2,n=c.t,k=n-d,j=b==null?nbi():b;g.dlShiftTo(k,j);c.compareTo(j)>=0&&(c[c.t++]=1,c.subTo(j,c));BigInteger.ONE.dlShiftTo(d,j);for(j.subTo(g,g);g.t<d;)g[g.t++]=0;for(;--k>=0;){var l=c[--n]==e?this.DM:Math.floor(c[n]*p+(c[n-1]+q)*o);if((c[n]+=g.am(0,l,c,k,0,d))<l){g.dlShiftTo(k,j);for(c.subTo(j,c);c[n]<--l;)c.subTo(j,c)}}b!=null&&(c.drShiftTo(d,b),h!=a&&BigInteger.ZERO.subTo(b,b));c.t=d;c.clamp();f>0&&c.rShiftTo(f,c);h<0&&BigInteger.ZERO.subTo(c,c)}}}}function bnMod(a){var b=nbi();this.abs().divRemTo(a,null,b);this.s<0&&b.compareTo(BigInteger.ZERO)>0&&a.subTo(b,b);return b}function Classic(a){this.m=a}function cConvert(a){return a.s<0||a.compareTo(this.m)>=0?a.mod(this.m):a}function cRevert(a){return a}function cReduce(a){a.divRemTo(this.m,null,a)}function cMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}function cSqrTo(a,b){a.squareTo(b);this.reduce(b)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1)return 0;var a=this[0];if((a&1)==0)return 0;var b=a&3,b=b*(2-(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return b>0?this.DV-b:-b}function Montgomery(a){this.m=a;this.mp=a.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function montConvert(a){var b=nbi();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);a.s<0&&b.compareTo(BigInteger.ZERO)>0&&this.m.subTo(b,b);return b}function montRevert(a){var b=nbi();a.copyTo(b);this.reduce(b);return b}function montReduce(a){for(;a.t<=this.mt2;)a[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=a[b]&32767,d=c*this.mpl+((c*this.mph+(a[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a[c]+=this.m.am(0,d,a,b,0,this.m.t);a[c]>=a.DV;)a[c]-=a.DV,a[++c]++}a.clamp();a.drShiftTo(this.m.t,a);a.compareTo(this.m)>=0&&a.subTo(this.m,a)}function montSqrTo(a,b){a.squareTo(b);this.reduce(b)}function montMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(a,b){if(a>4294967295||a<1)return BigInteger.ONE;var c=nbi(),d=nbi(),e=b.convert(this),g=nbits(a)-1;for(e.copyTo(c);--g>=0;)if(b.sqrTo(c,d),(a&1<<g)>0)b.mulTo(d,e,c);else var h=c,c=d,d=h;return b.revert(c)}function bnModPowInt(a,b){var c;c=a<256||b.isEven()?new Classic(b):new Montgomery(b);return this.exp(a,c)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnClone(){var a=nbi();this.copyTo(a);return a}function bnIntValue(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else{if(this.t==0)return-1}}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function bnByteValue(){return this.t==0?this.s:this[0]<<24>>24}function bnShortValue(){return this.t==0?this.s:this[0]<<16>>16}function bnpChunkSize(a){return Math.floor(Math.LN2*this.DB/Math.log(a))}function bnSigNum(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function bnpToRadix(a){a==null&&(a=10);if(this.signum()==0||a<2||a>36)return"0";var b=this.chunkSize(a),b=Math.pow(a,b),c=nbv(b),d=nbi(),e=nbi(),g="";for(this.divRemTo(c,d,e);d.signum()>0;)g=(b+e.intValue()).toString(a).substr(1)+g,d.divRemTo(c,d,e);return e.intValue().toString(a)+g}function bnpFromRadix(a,b){this.fromInt(0);b==null&&(b=10);for(var c=this.chunkSize(b),d=Math.pow(b,c),e=!1,g=0,h=0,f=0;f<a.length;++f){var o=intAt(a,f);o<0?a.charAt(f)=="-"&&this.signum()==0&&(e=!0):(h=b*h+o,++g>=c&&(this.dMultiply(d),this.dAddOffset(h,0),h=g=0))}g>0&&(this.dMultiply(Math.pow(b,g)),this.dAddOffset(h,0));e&&BigInteger.ZERO.subTo(this,this)}function bnpFromNumber(a,b,c){if("number"==typeof b){if(a<2)this.fromInt(1);else{this.fromNumber(a,c);this.testBit(a-1)||this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);for(this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(BigInteger.ONE.shiftLeft(a-1),this)}}else{var c=[],d=a&7;c.length=(a>>3)+1;b.nextBytes(c);d>0?c[0]&=(1<<d)-1:c[0]=0;this.fromString(c,256)}}function bnToByteArray(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(a-- >0){if(c<this.DB&&(d=this[a]>>c)!=(this.s&this.DM)>>c)b[e++]=d|this.s<<this.DB-c;for(;a>=0;)if(c<8?(d=(this[a]&(1<<c)-1)<<8-c,d|=this[--a]>>(c+=this.DB-8)):(d=this[a]>>(c-=8)&255,c<=0&&(c+=this.DB,--a)),(d&128)!=0&&(d|=-256),e==0&&(this.s&128)!=(d&128)&&++e,e>0||d!=this.s)b[e++]=d}return b}function bnEquals(a){return this.compareTo(a)==0}function bnMin(a){return this.compareTo(a)<0?this:a}function bnMax(a){return this.compareTo(a)>0?this:a}function bnpBitwiseTo(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=0;d<g;++d)c[d]=b(this[d],a[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c[d]=b(this[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c[d]=b(e,a[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()}function op_and(a,b){return a&b}function bnAnd(a){var b=nbi();this.bitwiseTo(a,op_and,b);return b}function op_or(a,b){return a|b}function bnOr(a){var b=nbi();this.bitwiseTo(a,op_or,b);return b}function op_xor(a,b){return a^b}function bnXor(a){var b=nbi();this.bitwiseTo(a,op_xor,b);return b}function op_andnot(a,b){return a&~b}function bnAndNot(a){var b=nbi();this.bitwiseTo(a,op_andnot,b);return b}function bnNot(){for(var a=nbi(),b=0;b<this.t;++b)a[b]=this.DM&~this[b];a.t=this.t;a.s=~this.s;return a}function bnShiftLeft(a){var b=nbi();a<0?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b}function bnShiftRight(a){var b=nbi();a<0?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b}function lbit(a){if(a==0)return-1;var b=0;(a&65535)==0&&(a>>=16,b+=16);(a&255)==0&&(a>>=8,b+=8);(a&15)==0&&(a>>=4,b+=4);(a&3)==0&&(a>>=2,b+=2);(a&1)==0&&++b;return b}function bnGetLowestSetBit(){for(var a=0;a<this.t;++a)if(this[a]!=0)return a*this.DB+lbit(this[a]);return this.s<0?this.t*this.DB:-1}function cbit(a){for(var b=0;a!=0;)a&=a-1,++b;return b}function bnBitCount(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c)a+=cbit(this[c]^b);return a}function bnTestBit(a){var b=Math.floor(a/this.DB);return b>=this.t?this.s!=0:(this[b]&1<<a%this.DB)!=0}function bnpChangeBit(a,b){var c=BigInteger.ONE.shiftLeft(a);this.bitwiseTo(c,b,c);return c}function bnSetBit(a){return this.changeBit(a,op_or)}function bnClearBit(a){return this.changeBit(a,op_andnot)}function bnFlipBit(a){return this.changeBit(a,op_xor)}function bnpAddTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]+a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a[c],b[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=d<0?-1:0;d>0?b[c++]=d:d<-1&&(b[c++]=this.DV+d);b.t=c;b.clamp()}function bnAdd(a){var b=nbi();this.addTo(a,b);return b}function bnSubtract(a){var b=nbi();this.subTo(a,b);return b}function bnMultiply(a){var b=nbi();this.multiplyTo(a,b);return b}function bnSquare(){var a=nbi();this.squareTo(a);return a}function bnDivide(a){var b=nbi();this.divRemTo(a,b,null);return b}function bnRemainder(a){var b=nbi();this.divRemTo(a,null,b);return b}function bnDivideAndRemainder(a){var b=nbi(),c=nbi();this.divRemTo(a,b,c);return[b,c]}function bnpDMultiply(a){this[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(a,b){if(a!=0){for(;this.t<=b;)this[this.t++]=0;for(this[b]+=a;this[b]>=this.DV;)this[b]-=this.DV,++b>=this.t&&(this[this.t++]=0),++this[b]}}function NullExp(){}function nNop(a){return a}function nMulTo(a,b,c){a.multiplyTo(b,c)}function nSqrTo(a,b){a.squareTo(b)}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(a){return this.exp(a,new NullExp)}function bnpMultiplyLowerTo(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;d>0;)c[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c[d+this.t]=this.am(0,a[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a[d],c,d,0,b-d);c.clamp()}function bnpMultiplyUpperTo(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;--d>=0;)c[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c[this.t+d-b]=this.am(b-d,a[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,c)}function Barrett(a){this.r2=nbi();this.q3=nbi();BigInteger.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function barrettConvert(a){if(a.s<0||a.t>2*this.m.t)return a.mod(this.m);else if(a.compareTo(this.m)<0)return a;else{var b=nbi();a.copyTo(b);this.reduce(b);return b}}function barrettRevert(a){return a}function barrettReduce(a){a.drShiftTo(this.m.t-1,this.r2);if(a.t>this.m.t+1)a.t=this.m.t+1,a.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);a.compareTo(this.r2)<0;)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);a.compareTo(this.m)>=0;)a.subTo(this.m,a)}function barrettSqrTo(a,b){a.squareTo(b);this.reduce(b)}function barrettMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}Barrett.prototype.convert=barrettConvert;Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;function bnModPow(a,b){var c=a.bitLength(),d,e=nbv(1),g;if(c<=0)return e;else d=c<18?1:c<48?3:c<144?4:c<768?5:6;g=c<8?new Classic(b):b.isEven()?new Barrett(b):new Montgomery(b);var h=[],f=3,o=d-1,p=(1<<d)-1;h[1]=g.convert(this);if(d>1){c=nbi();for(g.sqrTo(h[1],c);f<=p;)h[f]=nbi(),g.mulTo(c,h[f-2],h[f]),f+=2}for(var q=a.t-1,n,k=!0,j=nbi(),c=nbits(a[q])-1;q>=0;){c>=o?n=a[q]>>c-o&p:(n=(a[q]&(1<<c+1)-1)<<o-c,q>0&&(n|=a[q-1]>>this.DB+c-o));for(f=d;(n&1)==0;)n>>=1,--f;if((c-=f)<0)c+=this.DB,--q;if(k)h[n].copyTo(e),k=!1;else{for(;f>1;)g.sqrTo(e,j),g.sqrTo(j,e),f-=2;f>0?g.sqrTo(e,j):(f=e,e=j,j=f);g.mulTo(j,h[n],e)}for(;q>=0&&(a[q]&1<<c)==0;)g.sqrTo(e,j),f=e,e=j,j=f,--c<0&&(c=this.DB-1,--q)}return g.revert(e)}function bnGCD(a){var b=this.s<0?this.negate():this.clone(),a=a.s<0?a.negate():a.clone();if(b.compareTo(a)<0)var c=b,b=a,a=c;var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(d<0)return b;c<d&&(d=c);d>0&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;b.signum()>0;)(c=b.getLowestSetBit())>0&&b.rShiftTo(c,b),(c=a.getLowestSetBit())>0&&a.rShiftTo(c,a),b.compareTo(a)>=0?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));d>0&&a.lShiftTo(d,a);return a}function bnpModInt(a){if(a<=0)return 0;var b=this.DV%a,c=this.s<0?a-1:0;if(this.t>0)if(b==0)c=this[0]%a;else for(var d=this.t-1;d>=0;--d)c=(b*c+this[d])%a;return c}function bnModInverse(a){var b=a.isEven();if(this.isEven()&&b||a.signum()==0)return BigInteger.ZERO;for(var c=a.clone(),d=this.clone(),e=nbv(1),g=nbv(0),h=nbv(0),f=nbv(1);c.signum()!=0;){for(;c.isEven();){c.rShiftTo(1,c);if(b){if(!e.isEven()||!g.isEven())e.addTo(this,e),g.subTo(a,g);e.rShiftTo(1,e)}else g.isEven()||g.subTo(a,g);g.rShiftTo(1,g)}for(;d.isEven();){d.rShiftTo(1,d);if(b){if(!h.isEven()||!f.isEven())h.addTo(this,h),f.subTo(a,f);h.rShiftTo(1,h)}else f.isEven()||f.subTo(a,f);f.rShiftTo(1,f)}c.compareTo(d)>=0?(c.subTo(d,c),b&&e.subTo(h,e),g.subTo(f,g)):(d.subTo(c,d),b&&h.subTo(e,h),f.subTo(g,f))}if(d.compareTo(BigInteger.ONE)!=0)return BigInteger.ZERO;if(f.compareTo(a)>=0)return f.subtract(a);if(f.signum()<0)f.addTo(a,f);else return f;return f.signum()<0?f.add(a):f}var lowprimes=[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],lplim=67108864/lowprimes[lowprimes.length-1];function bnIsProbablePrime(a){var b,c=this.abs();if(c.t==1&&c[0]<=lowprimes[lowprimes.length-1]){for(b=0;b<lowprimes.length;++b)if(c[0]==lowprimes[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<lowprimes.length;){for(var d=lowprimes[b],e=b+1;e<lowprimes.length&&d<lplim;)d*=lowprimes[e++];for(d=c.modInt(d);b<e;)if(d%lowprimes[b++]==0)return!1}return c.millerRabin(a)}function bnpMillerRabin(a){var b=this.subtract(BigInteger.ONE),c=b.getLowestSetBit();if(c<=0)return!1;var d=b.shiftRight(c),a=a+1>>1;if(a>lowprimes.length)a=lowprimes.length;for(var e=nbi(),g=0;g<a;++g){e.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var h=e.modPow(d,this);if(h.compareTo(BigInteger.ONE)!=0&&h.compareTo(b)!=0){for(var f=1;f++<c&&h.compareTo(b)!=0;)if(h=h.modPowInt(2,this),h.compareTo(BigInteger.ONE)==0)return!1;if(h.compareTo(b)!=0)return!1}}return!0}BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.fromNumber=bnpFromNumber;BigInteger.prototype.bitwiseTo=bnpBitwiseTo;BigInteger.prototype.changeBit=bnpChangeBit;BigInteger.prototype.addTo=bnpAddTo;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo;BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo;BigInteger.prototype.modInt=bnpModInt;BigInteger.prototype.millerRabin=bnpMillerRabin;BigInteger.prototype.clone=bnClone;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.byteValue=bnByteValue;BigInteger.prototype.shortValue=bnShortValue;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.toByteArray=bnToByteArray;BigInteger.prototype.equals=bnEquals;BigInteger.prototype.min=bnMin;BigInteger.prototype.max=bnMax;BigInteger.prototype.and=bnAnd;BigInteger.prototype.or=bnOr;BigInteger.prototype.xor=bnXor;BigInteger.prototype.andNot=bnAndNot;BigInteger.prototype.not=bnNot;BigInteger.prototype.shiftLeft=bnShiftLeft;BigInteger.prototype.shiftRight=bnShiftRight;BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit;BigInteger.prototype.bitCount=bnBitCount;BigInteger.prototype.testBit=bnTestBit;BigInteger.prototype.setBit=bnSetBit;BigInteger.prototype.clearBit=bnClearBit;BigInteger.prototype.flipBit=bnFlipBit;BigInteger.prototype.add=bnAdd;BigInteger.prototype.subtract=bnSubtract;BigInteger.prototype.multiply=bnMultiply;BigInteger.prototype.divide=bnDivide;BigInteger.prototype.remainder=bnRemainder;BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder;BigInteger.prototype.modPow=bnModPow;BigInteger.prototype.modInverse=bnModInverse;BigInteger.prototype.pow=bnPow;BigInteger.prototype.gcd=bnGCD;BigInteger.prototype.isProbablePrime=bnIsProbablePrime;BigInteger.prototype.square=bnSquare;(function(a,b,c,d,e,g,h){function f(a){var b,d,e=this,g=a.length,f=0,h=e.i=e.j=e.m=0;e.S=[];e.c=[];for(g||(a=[g++]);f<c;)e.S[f]=f++;for(f=0;f<c;f++)b=e.S[f],h=h+b+a[f%g]&c-1,d=e.S[h],e.S[f]=d,e.S[h]=b;e.g=function(a){var b=e.S,d=e.i+1&c-1,g=b[d],f=e.j+g&c-1,h=b[f];b[d]=h;b[f]=g;for(var k=b[g+h&c-1];--a;)d=d+1&c-1,g=b[d],f=f+g&c-1,h=b[f],b[d]=h,b[f]=g,k=k*c+b[g+h&c-1];e.i=d;e.j=f;return k};e.g(c)}function o(a,b,c,d,e){c=[];e=typeof a;if(b&&e=="object")for(d in a)if(d.indexOf("S")<5)try{c.push(o(a[d],b-1))}catch(g){}return c.length?c:a+(e!="string"?"\0":"")}function p(a,b,d,e){a+="";for(e=d=0;e<a.length;e++){var g=b,f=e&c-1,h=(d^=b[e&c-1]*19)+a.charCodeAt(e);g[f]=h&c-1}a="";for(e in b)a+=String.fromCharCode(b[e]);return a}b.seedrandom=function(q,n){var k=[],j,q=p(o(n?[q,a]:arguments.length?q:[(new Date).getTime(),a,window],3),k);j=new f(k);p(j.S,a);b.random=function(){for(var a=j.g(d),b=h,f=0;a<e;)a=(a+f)*c,b*=c,f=j.g(1);for(;a>=g;)a/=2,b/=2,f>>>=1;return(a+f)/b};return q};h=b.pow(c,d);e=b.pow(2,e);g=e*2;p(b.random(),a)})([],Math,256,6,52);function SeededRandom(){}function SRnextBytes(a){var b;for(b=0;b<a.length;b++)a[b]=Math.floor(Math.random()*256)}SeededRandom.prototype.nextBytes=SRnextBytes;function Arcfour(){this.j=this.i=0;this.S=[]}function ARC4init(a){var b,c,d;for(b=0;b<256;++b)this.S[b]=b;for(b=c=0;b<256;++b)c=c+this.S[b]+a[b%a.length]&255,d=this.S[b],this.S[b]=this.S[c],this.S[c]=d;this.j=this.i=0}function ARC4next(){var a;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;a=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=a;return this.S[a+this.S[this.i]&255]}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool,rng_pptr;function rng_seed_int(a){rng_pool[rng_pptr++]^=a&255;rng_pool[rng_pptr++]^=a>>8&255;rng_pool[rng_pptr++]^=a>>16&255;rng_pool[rng_pptr++]^=a>>24&255;rng_pptr>=rng_psize&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}if(rng_pool==null){rng_pool=[];rng_pptr=0;var t;for(;rng_pptr<rng_psize;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=t&255;rng_pptr=0;rng_seed_time()}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(a){var b;for(b=0;b<a.length;++b)a[b]=rng_get_byte()}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;function SHA256(a){function b(a,b){var c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535}function c(a,b){return a>>>b|a<<32-b}a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var h=a.charCodeAt(c);h<128?b+=String.fromCharCode(h):(h>127&&h<2048?b+=String.fromCharCode(h>>6|192):(b+=String.fromCharCode(h>>12|224),b+=String.fromCharCode(h>>6&63|128)),b+=String.fromCharCode(h&63|128))}return b}(a);return function(a){for(var b="",c=0;c<a.length*4;c++)b+="0123456789abcdef".charAt(a[c>>2]>>(3-c%4)*8+4&15)+"0123456789abcdef".charAt(a[c>>2]>>(3-c%4)*8&15);return b}(function(a,e){var g=[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],h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f=Array(64),o,p,q,n,k,j,l,m,s,r,u,w;a[e>>5]|=128<<24-e%32;a[(e+64>>9<<4)+15]=e;for(s=0;s<a.length;s+=16){o=h[0];p=h[1];q=h[2];n=h[3];k=h[4];j=h[5];l=h[6];m=h[7];for(r=0;r<64;r++)f[r]=r<16?a[r+s]:b(b(b(c(f[r-2],17)^c(f[r-2],19)^f[r-2]>>>10,f[r-7]),c(f[r-15],7)^c(f[r-15],18)^f[r-15]>>>3),f[r-16]),u=b(b(b(b(m,c(k,6)^c(k,11)^c(k,25)),k&j^~k&l),g[r]),f[r]),w=b(c(o,2)^c(o,13)^c(o,22),o&p^o&q^p&q),m=l,l=j,j=k,k=b(n,u),n=q,q=p,p=o,o=b(u,w);h[0]=b(o,h[0]);h[1]=b(p,h[1]);h[2]=b(q,h[2]);h[3]=b(n,h[3]);h[4]=b(k,h[4]);h[5]=b(j,h[5]);h[6]=b(l,h[6]);h[7]=b(m,h[7])}return h}(function(a){for(var b=[],c=0;c<a.length*8;c+=8)b[c>>5]|=(a.charCodeAt(c/8)&255)<<24-c%32;return b}(a),a.length*8))}var sha256={hex:function(a){return SHA256(a)}};function SHA1(a){function b(a,b){return a<<b|a>>>32-b}function c(a){var b="",c,d;for(c=7;c>=0;c--)d=a>>>c*4&15,b+=d.toString(16);return b}var d,e,g=Array(80),h=1732584193,f=4023233417,o=2562383102,p=271733878,q=3285377520,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b}(a);n=a.length;var s=[];for(d=0;d<n-3;d+=4)e=a.charCodeAt(d)<<24|a.charCodeAt(d+1)<<16|a.charCodeAt(d+2)<<8|a.charCodeAt(d+3),s.push(e);switch(n%4){case 0:d=2147483648;break;case 1:d=a.charCodeAt(n-1)<<24|8388608;break;case 2:d=a.charCodeAt(n-2)<<24|a.charCodeAt(n-1)<<16|32768;break;case 3:d=a.charCodeAt(n-3)<<24|a.charCodeAt(n-2)<<16|a.charCodeAt(n-1)<<8|128}for(s.push(d);s.length%16!=14;)s.push(0);s.push(n>>>29);s.push(n<<3&4294967295);for(a=0;a<s.length;a+=16){for(d=0;d<16;d++)g[d]=s[a+d];for(d=16;d<=79;d++)g[d]=b(g[d-3]^g[d-8]^g[d-14]^g[d-16],1);e=h;n=f;k=o;j=p;l=q;for(d=0;d<=19;d++)m=b(e,5)+(n&k|~n&j)+l+g[d]+1518500249&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=20;d<=39;d++)m=b(e,5)+(n^k^j)+l+g[d]+1859775393&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=40;d<=59;d++)m=b(e,5)+(n&k|n&j|k&j)+l+g[d]+2400959708&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=60;d<=79;d++)m=b(e,5)+(n^k^j)+l+g[d]+3395469782&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;h=h+e&4294967295;f=f+n&4294967295;o=o+k&4294967295;p=p+j&4294967295;q=q+l&4294967295}m=c(h)+c(f)+c(o)+c(p)+c(q);return m.toLowerCase()}var sha1={hex:function(a){return SHA1(a)}},MD5=function(a){function b(a,b){var c,d,e,f,g;e=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;g=(a&1073741823)+(b&1073741823);return c&d?g^2147483648^e^f:c|d?g&1073741824?g^3221225472^e^f:g^1073741824^e^f:g^e^f}function c(a,c,d,e,f,g,h){a=b(a,b(b(c&d|~c&e,f),h));return b(a<<g|a>>>32-g,c)}function d(a,c,d,e,f,g,h){a=b(a,b(b(c&e|d&~e,f),h));return b(a<<g|a>>>32-g,c)}function e(a,c,d,e,f,g,h){a=b(a,b(b(c^d^e,f),h));return b(a<<g|a>>>32-g,c)}function g(a,c,d,e,f,g,h){a=b(a,b(b(d^(c|~e),f),h));return b(a<<g|a>>>32-g,c)}function h(a){var b="",c="",d;for(d=0;d<=3;d++)c=a>>>d*8&255,c="0"+c.toString(16),b+=c.substr(c.length-2,2);return b}var f=[],o,p,q,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b}(a),f=function(a){var b,c=a.length;b=c+8;for(var d=((b-b%64)/64+1)*16,e=Array(d-1),f=0,g=0;g<c;)b=(g-g%4)/4,f=g%4*8,e[b]|=a.charCodeAt(g)<<f,g++;e[(g-g%4)/4]|=128<<g%4*8;e[d-2]=c<<3;e[d-1]=c>>>29;return e}(a);k=1732584193;j=4023233417;l=2562383102;m=271733878;for(a=0;a<f.length;a+=16)o=k,p=j,q=l,n=m,k=c(k,j,l,m,f[a+0],7,3614090360),m=c(m,k,j,l,f[a+1],12,3905402710),l=c(l,m,k,j,f[a+2],17,606105819),j=c(j,l,m,k,f[a+3],22,3250441966),k=c(k,j,l,m,f[a+4],7,4118548399),m=c(m,k,j,l,f[a+5],12,1200080426),l=c(l,m,k,j,f[a+6],17,2821735955),j=c(j,l,m,k,f[a+7],22,4249261313),k=c(k,j,l,m,f[a+8],7,1770035416),m=c(m,k,j,l,f[a+9],12,2336552879),l=c(l,m,k,j,f[a+10],17,4294925233),j=c(j,l,m,k,f[a+11],22,2304563134),k=c(k,j,l,m,f[a+12],7,1804603682),m=c(m,k,j,l,f[a+13],12,4254626195),l=c(l,m,k,j,f[a+14],17,2792965006),j=c(j,l,m,k,f[a+15],22,1236535329),k=d(k,j,l,m,f[a+1],5,4129170786),m=d(m,k,j,l,f[a+6],9,3225465664),l=d(l,m,k,j,f[a+11],14,643717713),j=d(j,l,m,k,f[a+0],20,3921069994),k=d(k,j,l,m,f[a+5],5,3593408605),m=d(m,k,j,l,f[a+10],9,38016083),l=d(l,m,k,j,f[a+15],14,3634488961),j=d(j,l,m,k,f[a+4],20,3889429448),k=d(k,j,l,m,f[a+9],5,568446438),m=d(m,k,j,l,f[a+14],9,3275163606),l=d(l,m,k,j,f[a+3],14,4107603335),j=d(j,l,m,k,f[a+8],20,1163531501),k=d(k,j,l,m,f[a+13],5,2850285829),m=d(m,k,j,l,f[a+2],9,4243563512),l=d(l,m,k,j,f[a+7],14,1735328473),j=d(j,l,m,k,f[a+12],20,2368359562),k=e(k,j,l,m,f[a+5],4,4294588738),m=e(m,k,j,l,f[a+8],11,2272392833),l=e(l,m,k,j,f[a+11],16,1839030562),j=e(j,l,m,k,f[a+14],23,4259657740),k=e(k,j,l,m,f[a+1],4,2763975236),m=e(m,k,j,l,f[a+4],11,1272893353),l=e(l,m,k,j,f[a+7],16,4139469664),j=e(j,l,m,k,f[a+10],23,3200236656),k=e(k,j,l,m,f[a+13],4,681279174),m=e(m,k,j,l,f[a+0],11,3936430074),l=e(l,m,k,j,f[a+3],16,3572445317),j=e(j,l,m,k,f[a+6],23,76029189),k=e(k,j,l,m,f[a+9],4,3654602809),m=e(m,k,j,l,f[a+12],11,3873151461),l=e(l,m,k,j,f[a+15],16,530742520),j=e(j,l,m,k,f[a+2],23,3299628645),k=g(k,j,l,m,f[a+0],6,4096336452),m=g(m,k,j,l,f[a+7],10,1126891415),l=g(l,m,k,j,f[a+14],15,2878612391),j=g(j,l,m,k,f[a+5],21,4237533241),k=g(k,j,l,m,f[a+12],6,1700485571),m=g(m,k,j,l,f[a+3],10,2399980690),l=g(l,m,k,j,f[a+10],15,4293915773),j=g(j,l,m,k,f[a+1],21,2240044497),k=g(k,j,l,m,f[a+8],6,1873313359),m=g(m,k,j,l,f[a+15],10,4264355552),l=g(l,m,k,j,f[a+6],15,2734768916),j=g(j,l,m,k,f[a+13],21,1309151649),k=g(k,j,l,m,f[a+4],6,4149444226),m=g(m,k,j,l,f[a+11],10,3174756917),l=g(l,m,k,j,f[a+2],15,718787259),j=g(j,l,m,k,f[a+9],21,3951481745),k=b(k,o),j=b(j,p),l=b(l,q),m=b(m,n);return(h(k)+h(j)+h(l)+h(m)).toLowerCase()};function parseBigInt(a,b){return new BigInteger(a,b)}function pkcs1pad2(a,b){if(b<a.length+11)throw"Message too long for RSA (n="+b+", l="+a.length+")";for(var c=[],d=a.length-1;d>=0&&b>0;){var e=a.charCodeAt(d--);e<128?c[--b]=e:e>127&&e<2048?(c[--b]=e&63|128,c[--b]=e>>6|192):(c[--b]=e&63|128,c[--b]=e>>6&63|128,c[--b]=e>>12|224)}c[--b]=0;d=new SecureRandom;for(e=[];b>2;){for(e[0]=0;e[0]==0;)d.nextBytes(e);c[--b]=e[0]}c[--b]=2;c[--b]=0;return new BigInteger(c)}function RSAKey(){this.n=null;this.e=0;this.coeff=this.dmq1=this.dmp1=this.q=this.p=this.d=null}function RSASetPublic(a,b){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16)):alert("Invalid RSA public key")}function RSADoPublic(a){return a.modPowInt(this.e,this.n)}function RSAEncrypt(a){a=pkcs1pad2(a,this.n.bitLength()+7>>3);if(a==null)return null;a=this.doPublic(a);if(a==null)return null;a=a.toString(16);return(a.length&1)==0?a:"0"+a}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;function pkcs1unpad2(a,b){for(var c=a.toByteArray(),d=0;d<c.length&&c[d]==0;)++d;if(c.length-d!=b-1||c[d]!=2)return null;for(++d;c[d]!=0;)if(++d>=c.length)return null;for(var e="";++d<c.length;){var g=c[d]&255;g<128?e+=String.fromCharCode(g):g>191&&g<224?(e+=String.fromCharCode((g&31)<<6|c[d+1]&63),++d):(e+=String.fromCharCode((g&15)<<12|(c[d+1]&63)<<6|c[d+2]&63),d+=2)}return e}function RSASetPrivate(a,b,c){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16)):alert("Invalid RSA private key")}function RSASetPrivateEx(a,b,c,d,e,g,h,f){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16),this.p=parseBigInt(d,16),this.q=parseBigInt(e,16),this.dmp1=parseBigInt(g,16),this.dmq1=parseBigInt(h,16),this.coeff=parseBigInt(f,16)):alert("Invalid RSA private key")}function RSAGenerate(a,b){var c=new SeededRandom,d=a>>1;this.e=parseInt(b,16);for(var e=new BigInteger(b,16);;){for(;;)if(this.p=new BigInteger(a-d,1,c),this.p.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.p.isProbablePrime(10))break;for(;;)if(this.q=new BigInteger(d,1,c),this.q.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var g=this.p;this.p=this.q;this.q=g}var g=this.p.subtract(BigInteger.ONE),h=this.q.subtract(BigInteger.ONE),f=g.multiply(h);if(f.gcd(e).compareTo(BigInteger.ONE)==0){this.n=this.p.multiply(this.q);this.d=e.modInverse(f);this.dmp1=this.d.mod(g);this.dmq1=this.d.mod(h);this.coeff=this.q.modInverse(this.p);break}}}function RSADoPrivate(a){if(this.p==null||this.q==null)return a.modPow(this.d,this.n);for(var b=a.mod(this.p).modPow(this.dmp1,this.p),a=a.mod(this.q).modPow(this.dmq1,this.q);b.compareTo(a)<0;)b=b.add(this.p);return b.subtract(a).multiply(this.coeff).mod(this.p).multiply(this.q).add(a)}function RSADecrypt(a){a=this.doPrivate(parseBigInt(a,16));return a==null?null:pkcs1unpad2(a,this.n.bitLength()+7>>3)}RSAKey.prototype.doPrivate=RSADoPrivate;RSAKey.prototype.setPrivate=RSASetPrivate;RSAKey.prototype.setPrivateEx=RSASetPrivateEx;RSAKey.prototype.generate=RSAGenerate;RSAKey.prototype.decrypt=RSADecrypt;var _RSASIGN_DIHEAD=[];_RSASIGN_DIHEAD.sha1="3021300906052b0e03021a05000414";_RSASIGN_DIHEAD.sha256="3031300d060960864801650304020105000420";var _RSASIGN_HASHHEXFUNC=[];_RSASIGN_HASHHEXFUNC.sha1=sha1.hex;_RSASIGN_HASHHEXFUNC.sha256=sha256.hex;function _rsasign_getHexPaddedDigestInfoForString(a,b,c){b/=4;for(var a=(0,_RSASIGN_HASHHEXFUNC[c])(a),c="00"+_RSASIGN_DIHEAD[c]+a,a="",b=b-4-c.length,d=0;d<b;d+=2)a+="ff";return sPaddedMessageHex="0001"+a+c}function _rsasign_signString(a,b){var c=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),b);return this.doPrivate(parseBigInt(c,16)).toString(16)}function _rsasign_signStringWithSHA1(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha1");return this.doPrivate(parseBigInt(a,16)).toString(16)}function _rsasign_signStringWithSHA256(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha256");return this.doPrivate(parseBigInt(a,16)).toString(16)}function _rsasign_getDecryptSignatureBI(a,b,c){var d=new RSAKey;d.setPublic(b,c);return d.doPublic(a)}function _rsasign_getHexDigestInfoFromSig(a,b,c){return _rsasign_getDecryptSignatureBI(a,b,c).toString(16).replace(/^1f+00/,"")}function _rsasign_getAlgNameAndHashFromHexDisgestInfo(a){for(var b in _RSASIGN_DIHEAD){var c=_RSASIGN_DIHEAD[b],d=c.length;if(a.substring(0,d)==c)return[b,a.substring(d)]}return[]}function _rsasign_verifySignatureWithArgs(a,b,c,d){b=_rsasign_getHexDigestInfoFromSig(b,c,d);c=_rsasign_getAlgNameAndHashFromHexDisgestInfo(b);if(c.length==0)return!1;b=c[1];a=(0,_RSASIGN_HASHHEXFUNC[c[0]])(a);return b==a}function _rsasign_verifyHexSignatureForMessage(a,b){var c=parseBigInt(a,16);return _rsasign_verifySignatureWithArgs(b,c,this.n.toString(16),this.e.toString(16))}function _rsasign_verifyString(a,b){var b=b.replace(/[ \n]+/g,""),c=this.doPublic(parseBigInt(b,16)).toString(16).replace(/^1f+00/,""),d=_rsasign_getAlgNameAndHashFromHexDisgestInfo(c);if(d.length==0)return!1;c=d[1];d=(0,_RSASIGN_HASHHEXFUNC[d[0]])(a);return c==d}RSAKey.prototype.signString=_rsasign_signString;RSAKey.prototype.signStringWithSHA1=_rsasign_signStringWithSHA1;RSAKey.prototype.signStringWithSHA256=_rsasign_signStringWithSHA256;RSAKey.prototype.verifyString=_rsasign_verifyString;RSAKey.prototype.verifyHexSignatureForMessage=_rsasign_verifyHexSignatureForMessage;var aes=function(){var a={Sbox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ShiftRowTab:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11]};a.Init=function(){a.Sbox_Inv=Array(256);for(var b=0;b<256;b++)a.Sbox_Inv[a.Sbox[b]]=b;a.ShiftRowTab_Inv=Array(16);for(b=0;b<16;b++)a.ShiftRowTab_Inv[a.ShiftRowTab[b]]=b;a.xtime=Array(256);for(b=0;b<128;b++)a.xtime[b]=b<<1,a.xtime[128+b]=b<<1^27};a.Done=function(){delete a.Sbox_Inv;delete a.ShiftRowTab_Inv;delete a.xtime};a.ExpandKey=function(b){var c=b.length,d,e=1;switch(c){case 16:d=176;break;case 24:d=208;break;case 32:d=240;break;default:alert("my.ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!")}for(var g=c;g<d;g+=4){var h=b.slice(g-4,g);if(g%c==0){if(h=[a.Sbox[h[1]]^e,a.Sbox[h[2]],a.Sbox[h[3]],a.Sbox[h[0]]],(e<<=1)>=256)e^=283}else c>24&&g%c==16&&(h=[a.Sbox[h[0]],a.Sbox[h[1]],a.Sbox[h[2]],a.Sbox[h[3]]]);for(var f=0;f<4;f++)b[g+f]=b[g+f-c]^h[f]}};a.Encrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(0,16));for(var e=16;e<d-16;e+=16)a.SubBytes(b,a.Sbox),a.ShiftRows(b,a.ShiftRowTab),a.MixColumns(b),a.AddRoundKey(b,c.slice(e,e+16));a.SubBytes(b,a.Sbox);a.ShiftRows(b,a.ShiftRowTab);a.AddRoundKey(b,c.slice(e,d))};a.Decrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(d-16,d));a.ShiftRows(b,a.ShiftRowTab_Inv);a.SubBytes(b,a.Sbox_Inv);for(d-=32;d>=16;d-=16)a.AddRoundKey(b,c.slice(d,d+16)),a.MixColumns_Inv(b),a.ShiftRows(b,a.ShiftRowTab_Inv),a.SubBytes(b,a.Sbox_Inv);a.AddRoundKey(b,c.slice(0,16))};a.SubBytes=function(a,c){for(var d=0;d<16;d++)a[d]=c[a[d]]};a.AddRoundKey=function(a,c){for(var d=0;d<16;d++)a[d]^=c[d]};a.ShiftRows=function(a,c){for(var d=[].concat(a),e=0;e<16;e++)a[e]=d[c[e]]};a.MixColumns=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h;b[c+0]^=f^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=f^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d]}};a.MixColumns_Inv=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h,o=a.xtime[f],p=a.xtime[a.xtime[o^d^g]]^f;f^=a.xtime[a.xtime[o^e^h]];b[c+0]^=p^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=p^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d]}};return a}(),cryptico=function(){var a={};aes.Init();a.b256to64=function(a){var c,d,e,g="",f=0,o=a.length;for(e=0;e<o;e++)d=a.charCodeAt(e),f==0?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2&63),c=(d&3)<<4):f==1?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>4&15),c=(d&15)<<2):f==2&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>6&3),g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63)),f+=1,f==3&&(f=0);f>0&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c),g+="=");f==1&&(g+="=");return g};a.b64to256=function(a){var c,d,e="",g=0,h=0,f=a.length;for(d=0;d<f;d++)c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d)),c>=0&&(g&&(e+=String.fromCharCode(h|c>>6-g&255)),g=g+2&7,h=c<<g&255);return e};a.b16to64=function(a){var c,d,e="";a.length%2==1&&(a="0"+a);for(c=0;c+3<=a.length;c+=3)d=parseInt(a.substring(c,c+3),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63);c+1==a.length?(d=parseInt(a.substring(c,c+1),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d<<2)):c+2==a.length&&(d=parseInt(a.substring(c,c+2),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4));for(;(e.length&3)>0;)e+="=";return e};a.b64to16=function(a){var c="",d,e=0,g;for(d=0;d<a.length;++d){if(a.charAt(d)=="=")break;v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d));v<0||(e==0?(c+=int2char(v>>2),g=v&3,e=1):e==1?(c+=int2char(g<<2|v>>4),g=v&15,e=2):e==2?(c+=int2char(g),c+=int2char(v>>2),g=v&3,e=3):(c+=int2char(g<<2|v>>4),c+=int2char(v&15),e=0))}e==1&&(c+=int2char(g<<2));return c};a.string2bytes=function(a){for(var c=[],d=0;d<a.length;d++)c.push(a.charCodeAt(d));return c};a.bytes2string=function(a){for(var c="",d=0;d<a.length;d++)c+=String.fromCharCode(a[d]);return c};a.blockXOR=function(a,c){for(var d=Array(16),e=0;e<16;e++)d[e]=a[e]^c[e];return d};a.blockIV=function(){var a=new SecureRandom,c=Array(16);a.nextBytes(c);return c};a.pad16=function(a){var c=a.slice(0),d=(16-a.length%16)%16;for(i=a.length;i<a.length+d;i++)c.push(0);return c};a.depad=function(a){for(a=a.slice(0);a[a.length-1]==0;)a=a.slice(0,a.length-1);return a};a.encryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var e=a.string2bytes(b),e=a.pad16(e),g=a.blockIV(),h=0;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=g.slice(h*16,h*16+16),f=a.blockXOR(o,f);aes.Encrypt(f,d);g=g.concat(f)}d=a.bytes2string(g);return a.b256to64(d)};a.decryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var b=a.b64to256(b),e=a.string2bytes(b),g=[],h=1;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=e.slice((h-1)*16,(h-1)*16+16);aes.Decrypt(f,d);f=a.blockXOR(o,f);g=g.concat(f)}g=a.depad(g);return a.bytes2string(g)};a.wrap60=function(a){for(var c="",d=0;d<a.length;d++)d%60==0&&d!=0&&(c+="\n"),c+=a[d];return c};a.generateAESKey=function(){var a=Array(16);(new SecureRandom).nextBytes(a);return a};a.generateRSAKey=function(a,c){Math.seedrandom(sha256.hex(a));var d=new RSAKey;d.generate(c,"10001");return d};a.publicKeyString=function(b){return pubkey=b.n.toString(16)};a.publicKeyID=function(a){return MD5(a)};a.publicKeyFromString=function(b){var b=b.split("|")[0],c=new RSAKey;c.setPublic(b,"10001");return c};a.encrypt=function(b,c,d){var e="";try{var h=a.publicKeyFromString(c);e+=h.encrypt(b)+"?"}catch(f){return{status:"Invalid public key"}}return{status:"success",cipher:e}};a.decrypt=function(b,c){var d=b.split("?"),e=c.decrypt(d[0]);return{status:"success",plaintext:e,signature:"unsigned"}};return a}();module.exports=cryptico},function(module,exports,__webpack_require__){module.exports=__webpack_require__(2)},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,"StreamClient",function(){return StreamClient});var getRandomValues;var rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){getRandomValues=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!getRandomValues){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return getRandomValues(rnds8)}var regex=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(uuid){return typeof uuid==="string"&&regex.test(uuid)}var esm_browser_validate=validate;var byteToHex=[];for(var stringify_i=0;stringify_i<256;++stringify_i){byteToHex.push((stringify_i+256).toString(16).substr(1))}function stringify(arr){var offset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var uuid=(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+"-"+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+"-"+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+"-"+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+"-"+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase();if(!esm_browser_validate(uuid)){throw TypeError("Stringified UUID is invalid")}return uuid}var esm_browser_stringify=stringify;function v4(options,buf,offset){options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){offset=offset||0;for(var i=0;i<16;++i){buf[offset+i]=rnds[i]}return buf}return esm_browser_stringify(rnds)}var esm_browser_v4=v4;let DirectDeviceCustom=function(){class DeviceDirect{constructor(){}createClientObject(oWebsocket,szId,iCurChannel,iCurStream){return{socket:oWebsocket,id:szId,iCurChannel:iCurChannel,iCurStream:iCurStream,resolve:null,reject:null}}zeroPlayCmd(iCurChannel,iCurStream){let aCmd=[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,iCurChannel+1,0,0,0,iCurStream,0,0,4,0];return new Uint8Array(aCmd)}playCmd(iCurChannel,iCurStream){let aCmd=[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,iCurChannel,0,0,0,iCurStream,0,0,4,0];return new Uint8Array(aCmd)}playbackCmd(szStartTime,szStopTime,iCurChannel,iCurStream){let szStartDayMonthYear=szStartTime.split("T")[0];let szStartHourMinSec=szStartTime.split("T")[1];let szStartYear="0"+parseInt(szStartDayMonthYear.substring(0,4),10).toString(16);let iStartMonth=parseInt(szStartDayMonthYear.substring(4,6),10);let iStartDay=parseInt(szStartDayMonthYear.substring(6),10);let iStartHour=parseInt(szStartHourMinSec.substring(0,2),10);let iStartMin=parseInt(szStartHourMinSec.substring(2,4),10);let iStartSec=parseInt(szStartHourMinSec.substring(4,6),10);let szStopDayMonthYear=szStopTime.split("T")[0];let szStopHourMinSec=szStopTime.split("T")[1];let szStopYear="0"+parseInt(szStopDayMonthYear.substring(0,4),10).toString(16);let iStopMonth=parseInt(szStopDayMonthYear.substring(4,6),10);let iStopHour=parseInt(szStopHourMinSec.substring(0,2),10);let iStopMin=parseInt(szStopHourMinSec.substring(2,4),10);let iStopSec=parseInt(szStopHourMinSec.substring(4,6),10);let aCmd=[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,iCurChannel,0,0,parseInt(szStartYear.substring(0,2),16),parseInt(szStartYear.substring(2,4),16),0,0,0,iStartMonth,0,0,0,iStartDay,0,0,0,iStartHour,0,0,0,iStartMin,0,0,0,iStartSec,0,0,parseInt(szStopYear.substring(0,2),16),parseInt(szStopYear.substring(2,4),16),0,0,0,iStopMonth,0,0,0,iStartDay,0,0,0,iStopHour,0,0,0,iStopMin,0,0,0,iStopSec,0,0,0,0,0,0,0,0,iCurStream,0,0,0];return new Uint8Array(aCmd)}playRateCmd(iRate){let szHex=(parseInt(iRate,10)>>>0).toString(16).toLocaleUpperCase().toString(16);for(let j=szHex.length;j<8;j++){szHex="0"+szHex}let aRate=[0,0,0,0];for(let j=0,iLenRate=szHex.length;j<iLenRate;j=j+2){aRate[Math.floor(j/2)]=parseInt(szHex.substring(j,j+2),16)}let aCmd=[0,0,0,36,0,0,0,0,0,0,0,0,0,3,1,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,aRate[0],aRate[1],aRate[2],aRate[3]];return new Uint8Array(aCmd)}pauseCmd(){let aCmd=[0,0,0,32,0,0,0,0,0,0,0,0,0,3,1,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];return new Uint8Array(aCmd)}resumeCmd(){let aCmd=[0,0,0,32,0,0,0,0,0,0,0,0,0,3,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];return new Uint8Array(aCmd)}}return DeviceDirect}();const ERROR_STREAM_UNKNOWN=3001;const ERROR_STREAM_LIMIT=3002;const ERROR_BAD_AUTH=3003;let DirectDevice=function(){class DeviceDirect{constructor(){}createClientObject(oWebsocket,szId,szPlayURL){return{socket:oWebsocket,id:szId,playURL:szPlayURL,resolve:null,reject:null}}getMediaFromSdp(szSdp){let iMediaIndex=szSdp.indexOf("MEDIAINFO=")+10;let szMediaInfo=szSdp.slice(iMediaIndex,iMediaIndex+80);let aMediaInfo=[];for(let i=0,iLen=szMediaInfo.length/2;i<iLen;i++){aMediaInfo[i]=parseInt(szMediaInfo.slice(i*2,i*2+2),16)}return new Uint8Array(aMediaInfo)}playCmd(szPlayURL){let oCmd={sequence:0,cmd:"realplay",url:szPlayURL};return JSON.stringify(oCmd)}playbackCmd(szStartTime,szStopTime,szPlayURL){let oCmd={sequence:0,cmd:"playback",url:szPlayURL,startTime:szStartTime,endTime:szStopTime};return JSON.stringify(oCmd)}playRateCmd(iRate){let oCmd={sequence:0,cmd:"changespeed",speed:iRate};return JSON.stringify(oCmd)}pauseCmd(){let oCmd={sequence:0,cmd:"pause"};return JSON.stringify(oCmd)}resumeCmd(){let oCmd={sequence:0,cmd:"resume"};return JSON.stringify(oCmd)}getError(oError){let iErrorNum=ERROR_STREAM_UNKNOWN;if(oError){if(parseInt(oError.statusCode,10)===6&&oError.subStatusCode==="streamLimit"){iErrorNum=ERROR_STREAM_LIMIT}else if(parseInt(oError.statusCode,10)===4&&oError.subStatusCode==="badAuthorization"){iErrorNum=ERROR_BAD_AUTH}}return{iErrorNum:iErrorNum,oError:oError}}}return DeviceDirect}();var cryptico=__webpack_require__(0);var cryptico_default=__webpack_require__.n(cryptico);var CryptoJS=CryptoJS||function(u,p){var d={},l=d.lib={},s=function(){},t=l.Base={extend:function(a){s.prototype=this;var c=new s;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},r=l.WordArray=t.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=p?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,e=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var k=0;k<a;k++)c[j+k>>>2]|=(e[k>>>2]>>>24-8*(k%4)&255)<<24-8*((j+k)%4);else if(65535<e.length)for(k=0;k<a;k+=4)c[j+k>>>2]=e[k>>>2];else c.push.apply(c,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=t.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],e=0;e<a;e+=4)c.push(4294967296*u.random()|0);return new r.init(c,a)}}),w=d.enc={},v=w.Hex={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++){var k=c[j>>>2]>>>24-8*(j%4)&255;e.push((k>>>4).toString(16));e.push((k&15).toString(16))}return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j<c;j+=2)e[j>>>3]|=parseInt(a.substr(j,2),16)<<24-4*(j%8);return new r.init(e,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++)e.push(String.fromCharCode(c[j>>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j<c;j++)e[j>>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new r.init(e,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data")}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}},q=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,e=c.words,j=c.sigBytes,k=this.blockSize,b=j/(4*k),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*k;j=u.min(4*a,j);if(a){for(var q=0;q<a;q+=k)this._doProcessBlock(e,q);q=e.splice(0,a);c.sigBytes-=j}return new r.init(q,j)},clone:function(){var a=t.clone.call(this);a._data=this._data.clone();return a},_minBufferSize:0});l.Hasher=q.extend({cfg:t.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){q.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,e){return new a.init(e).finalize(b)}},_createHmacHelper:function(a){return function(b,e){return new n.HMAC.init(a,e).finalize(b)}}});var n=d.algo={};return d}(Math);(function(){var u=CryptoJS,p=u.lib.WordArray;u.enc.Base64={stringify:function(d){var l=d.words,p=d.sigBytes,t=this._map;d.clamp();d=[];for(var r=0;r<p;r+=3)for(var w=(l[r>>>2]>>>24-8*(r%4)&255)<<16|(l[r+1>>>2]>>>24-8*((r+1)%4)&255)<<8|l[r+2>>>2]>>>24-8*((r+2)%4)&255,v=0;4>v&&r+.75*v<p;v++)d.push(t.charAt(w>>>6*(3-v)&63));if(l=t.charAt(64))for(;d.length%4;)d.push(l);return d.join("")},parse:function(d){var l=d.length,s=this._map,t=s.charAt(64);t&&(t=d.indexOf(t),-1!=t&&(l=t));for(var t=[],r=0,w=0;w<l;w++)if(w%4){var v=s.indexOf(d.charAt(w-1))<<2*(w%4),b=s.indexOf(d.charAt(w))>>>6-2*(w%4);t[r>>>2]|=(v|b)<<24-8*(r%4);r++}return p.create(t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();(function(u){function p(b,n,a,c,e,j,k){b=b+(n&a|~n&c)+e+k;return(b<<j|b>>>32-j)+n}function d(b,n,a,c,e,j,k){b=b+(n&c|a&~c)+e+k;return(b<<j|b>>>32-j)+n}function l(b,n,a,c,e,j,k){b=b+(n^a^c)+e+k;return(b<<j|b>>>32-j)+n}function s(b,n,a,c,e,j,k){b=b+(a^(n|~c))+e+k;return(b<<j|b>>>32-j)+n}for(var t=CryptoJS,r=t.lib,w=r.WordArray,v=r.Hasher,r=t.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;r=r.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(q,n){for(var a=0;16>a;a++){var c=n+a,e=q[c];q[c]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360}var a=this._hash.words,c=q[n+0],e=q[n+1],j=q[n+2],k=q[n+3],z=q[n+4],r=q[n+5],t=q[n+6],w=q[n+7],v=q[n+8],A=q[n+9],B=q[n+10],C=q[n+11],u=q[n+12],D=q[n+13],E=q[n+14],x=q[n+15],f=a[0],m=a[1],g=a[2],h=a[3],f=p(f,m,g,h,c,7,b[0]),h=p(h,f,m,g,e,12,b[1]),g=p(g,h,f,m,j,17,b[2]),m=p(m,g,h,f,k,22,b[3]),f=p(f,m,g,h,z,7,b[4]),h=p(h,f,m,g,r,12,b[5]),g=p(g,h,f,m,t,17,b[6]),m=p(m,g,h,f,w,22,b[7]),f=p(f,m,g,h,v,7,b[8]),h=p(h,f,m,g,A,12,b[9]),g=p(g,h,f,m,B,17,b[10]),m=p(m,g,h,f,C,22,b[11]),f=p(f,m,g,h,u,7,b[12]),h=p(h,f,m,g,D,12,b[13]),g=p(g,h,f,m,E,17,b[14]),m=p(m,g,h,f,x,22,b[15]),f=d(f,m,g,h,e,5,b[16]),h=d(h,f,m,g,t,9,b[17]),g=d(g,h,f,m,C,14,b[18]),m=d(m,g,h,f,c,20,b[19]),f=d(f,m,g,h,r,5,b[20]),h=d(h,f,m,g,B,9,b[21]),g=d(g,h,f,m,x,14,b[22]),m=d(m,g,h,f,z,20,b[23]),f=d(f,m,g,h,A,5,b[24]),h=d(h,f,m,g,E,9,b[25]),g=d(g,h,f,m,k,14,b[26]),m=d(m,g,h,f,v,20,b[27]),f=d(f,m,g,h,D,5,b[28]),h=d(h,f,m,g,j,9,b[29]),g=d(g,h,f,m,w,14,b[30]),m=d(m,g,h,f,u,20,b[31]),f=l(f,m,g,h,r,4,b[32]),h=l(h,f,m,g,v,11,b[33]),g=l(g,h,f,m,C,16,b[34]),m=l(m,g,h,f,E,23,b[35]),f=l(f,m,g,h,e,4,b[36]),h=l(h,f,m,g,z,11,b[37]),g=l(g,h,f,m,w,16,b[38]),m=l(m,g,h,f,B,23,b[39]),f=l(f,m,g,h,D,4,b[40]),h=l(h,f,m,g,c,11,b[41]),g=l(g,h,f,m,k,16,b[42]),m=l(m,g,h,f,t,23,b[43]),f=l(f,m,g,h,A,4,b[44]),h=l(h,f,m,g,u,11,b[45]),g=l(g,h,f,m,x,16,b[46]),m=l(m,g,h,f,j,23,b[47]),f=s(f,m,g,h,c,6,b[48]),h=s(h,f,m,g,w,10,b[49]),g=s(g,h,f,m,E,15,b[50]),m=s(m,g,h,f,r,21,b[51]),f=s(f,m,g,h,u,6,b[52]),h=s(h,f,m,g,k,10,b[53]),g=s(g,h,f,m,B,15,b[54]),m=s(m,g,h,f,e,21,b[55]),f=s(f,m,g,h,v,6,b[56]),h=s(h,f,m,g,x,10,b[57]),g=s(g,h,f,m,t,15,b[58]),m=s(m,g,h,f,D,21,b[59]),f=s(f,m,g,h,z,6,b[60]),h=s(h,f,m,g,C,10,b[61]),g=s(g,h,f,m,j,15,b[62]),m=s(m,g,h,f,A,21,b[63]);a[0]=a[0]+f|0;a[1]=a[1]+m|0;a[2]=a[2]+g|0;a[3]=a[3]+h|0},_doFinalize:function(){var b=this._data,n=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;n[c>>>5]|=128<<24-c%32;var e=u.floor(a/4294967296);n[(c+64>>>9<<4)+15]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;n[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(n.length+1);this._process();b=this._hash;n=b.words;for(a=0;4>a;a++)c=n[a],n[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});t.MD5=v._createHelper(r);t.HmacMD5=v._createHmacHelper(r)})(Math);(function(){var u=CryptoJS,p=u.lib,d=p.Base,l=p.WordArray,p=u.algo,s=p.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:p.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,r){for(var p=this.cfg,s=p.hasher.create(),b=l.create(),u=b.words,q=p.keySize,p=p.iterations;u.length<q;){n&&s.update(n);var n=s.update(d).finalize(r);s.reset();for(var a=1;a<p;a++)n=s.finalize(n),s.reset();b.concat(n)}b.sigBytes=4*q;return b}});u.EvpKDF=function(d,l,p){return s.create(p).compute(d,l)}})();CryptoJS.lib.Cipher||function(u){var p=CryptoJS,d=p.lib,l=d.Base,s=d.WordArray,t=d.BufferedBlockAlgorithm,r=p.enc.Base64,w=p.algo.EvpKDF,v=d.Cipher=t.extend({cfg:l.extend(),createEncryptor:function(e,a){return this.create(this._ENC_XFORM_MODE,e,a)},createDecryptor:function(e,a){return this.create(this._DEC_XFORM_MODE,e,a)},init:function(e,a,b){this.cfg=this.cfg.extend(b);this._xformMode=e;this._key=a;this.reset()},reset:function(){t.reset.call(this);this._doReset()},process:function(e){this._append(e);return this._process()},finalize:function(e){e&&this._append(e);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(b,k,d){return("string"==typeof k?c:a).encrypt(e,b,k,d)},decrypt:function(b,k,d){return("string"==typeof k?c:a).decrypt(e,b,k,d)}}}});d.StreamCipher=v.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var b=p.mode={},x=function(e,a,b){var c=this._iv;c?this._iv=u:c=this._prevBlock;for(var d=0;d<b;d++)e[a+d]^=c[d]},q=(d.BlockCipherMode=l.extend({createEncryptor:function(e,a){return this.Encryptor.create(e,a)},createDecryptor:function(e,a){return this.Decryptor.create(e,a)},init:function(e,a){this._cipher=e;this._iv=a}})).extend();q.Encryptor=q.extend({processBlock:function(e,a){var b=this._cipher,c=b.blockSize;x.call(this,e,a,c);b.encryptBlock(e,a);this._prevBlock=e.slice(a,a+c)}});q.Decryptor=q.extend({processBlock:function(e,a){var b=this._cipher,c=b.blockSize,d=e.slice(a,a+c);b.decryptBlock(e,a);x.call(this,e,a,c);this._prevBlock=d}});b=b.CBC=q;q=(p.pad={}).Pkcs7={pad:function(a,b){for(var c=4*b,c=c-a.sigBytes%c,d=c<<24|c<<16|c<<8|c,l=[],n=0;n<c;n+=4)l.push(d);c=s.create(l,c);a.concat(c)},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:q}),reset:function(){v.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var n=d.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(p.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?s.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=s.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return n.create({ciphertext:a,salt:c})}},a=d.SerializableCipher=l.extend({cfg:l.extend({format:b}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var l=a.createEncryptor(c,d);b=l.finalize(b);l=l.cfg;return n.create({ciphertext:b,key:c,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),p=(p.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=s.random(8));a=w.create({keySize:b+c}).compute(a,d);c=s.create(a.words.slice(b),4*c);a.sigBytes=4*b;return n.create({key:a,iv:c,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function(b,c,d,l){l=this.cfg.extend(l);d=l.kdf.execute(d,b.keySize,b.ivSize);l.iv=d.iv;b=a.encrypt.call(this,b,c,d.key,l);b.mixIn(d);return b},decrypt:function(b,c,d,l){l=this.cfg.extend(l);c=this._parse(c,l.format);d=l.kdf.execute(d,b.keySize,b.ivSize,c.salt);l.iv=d.iv;return a.decrypt.call(this,b,c,d.key,l)}})}();(function(){for(var u=CryptoJS,p=u.lib.BlockCipher,d=u.algo,l=[],s=[],t=[],r=[],w=[],v=[],b=[],x=[],q=[],n=[],a=[],c=0;256>c;c++)a[c]=128>c?c<<1:c<<1^283;for(var e=0,j=0,c=0;256>c;c++){var k=j^j<<1^j<<2^j<<3^j<<4,k=k>>>8^k&255^99;l[e]=k;s[k]=e;var z=a[e],F=a[z],G=a[F],y=257*a[k]^16843008*k;t[e]=y<<24|y>>>8;r[e]=y<<16|y>>>16;w[e]=y<<8|y>>>24;v[e]=y;y=16843009*G^65537*F^257*z^16843008*e;b[k]=y<<24|y>>>8;x[k]=y<<16|y>>>16;q[k]=y<<8|y>>>24;n[k]=y;e?(e=z^a[a[a[G^z]]],j^=a[a[j]]):e=j=1}var H=[0,1,2,4,8,16,32,64,128,27,54],d=d.AES=p.extend({_doReset:function(){for(var a=this._key,c=a.words,d=a.sigBytes/4,a=4*((this._nRounds=d+6)+1),e=this._keySchedule=[],j=0;j<a;j++)if(j<d)e[j]=c[j];else{var k=e[j-1];j%d?6<d&&4==j%d&&(k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255]):(k=k<<8|k>>>24,k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255],k^=H[j/d|0]<<24);e[j]=e[j-d]^k}c=this._invKeySchedule=[];for(d=0;d<a;d++)j=a-d,k=d%4?e[j]:e[j-4],c[d]=4>d||4>=j?k:b[l[k>>>24]]^x[l[k>>>16&255]]^q[l[k>>>8&255]]^n[l[k&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,t,r,w,v,l)},decryptBlock:function(a,c){var d=a[c+1];a[c+1]=a[c+3];a[c+3]=d;this._doCryptBlock(a,c,this._invKeySchedule,b,x,q,n,s);d=a[c+1];a[c+1]=a[c+3];a[c+3]=d},_doCryptBlock:function(a,b,c,d,e,j,l,f){for(var m=this._nRounds,g=a[b]^c[0],h=a[b+1]^c[1],k=a[b+2]^c[2],n=a[b+3]^c[3],p=4,r=1;r<m;r++)var q=d[g>>>24]^e[h>>>16&255]^j[k>>>8&255]^l[n&255]^c[p++],s=d[h>>>24]^e[k>>>16&255]^j[n>>>8&255]^l[g&255]^c[p++],t=d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j[h>>>8&255]^l[k&255]^c[p++],g=q,h=s,k=t;q=(f[g>>>24]<<24|f[h>>>16&255]<<16|f[k>>>8&255]<<8|f[n&255])^c[p++];s=(f[h>>>24]<<24|f[k>>>16&255]<<16|f[n>>>8&255]<<8|f[g&255])^c[p++];t=(f[k>>>24]<<24|f[n>>>16&255]<<16|f[g>>>8&255]<<8|f[h&255])^c[p++];n=(f[n>>>24]<<24|f[g>>>16&255]<<16|f[h>>>8&255]<<8|f[k&255])^c[p++];a[b]=q;a[b+1]=s;a[b+2]=t;a[b+3]=n},keySize:8});u.AES=p._createHelper(d)})();var aes=CryptoJS;let LiveMedia=function(){class MediaLive{constructor(){}createClientObject(oWebsocket,szId,szPKD,szRand,oParams){let key=aes.AES.encrypt((new Date).getTime().toString(),aes.enc.Hex.parse("1234567891234567123456789123456712345678912345671234567891234567"),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse("12345678912345671234567891234567"),padding:aes.pad.Pkcs7}).ciphertext.toString();if(key.length<64){key=key+key}let iv=aes.AES.encrypt((new Date).getTime().toString(),aes.enc.Hex.parse("12345678912345671234567891234567"),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse("12345678912345671234567891234567"),padding:aes.pad.Pkcs7}).ciphertext.toString();return{socket:oWebsocket,id:szId,PKD:szPKD,rand:szRand,playURL:oParams.playURL||"",auth:oParams.auth||"",token:oParams.token||"",key:key,iv:iv,resolve:null,reject:null}}playCmd(oWebsocket){let oCmd={sequence:0,cmd:"realplay",url:oWebsocket.playURL,key:cryptico_default.a.encrypt(oWebsocket.iv+":"+oWebsocket.key,oWebsocket.PKD).cipher.split("?")[0],authorization:aes.AES.encrypt(oWebsocket.rand+":"+oWebsocket.auth,aes.enc.Hex.parse(oWebsocket.key),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse(oWebsocket.iv),padding:aes.pad.Pkcs7}).ciphertext.toString(),token:aes.AES.encrypt(oWebsocket.token,aes.enc.Hex.parse(oWebsocket.key),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse(oWebsocket.iv),padding:aes.pad.Pkcs7}).ciphertext.toString()};return JSON.stringify(oCmd)}playbackCmd(oWebsocket,szStartTime,szStopTime){let oCmd={sequence:0,cmd:"playback",url:oWebsocket.playURL,key:cryptico_default.a.encrypt(oWebsocket.iv+":"+oWebsocket.key,oWebsocket.PKD).cipher.split("?")[0],authorization:aes.AES.encrypt(oWebsocket.rand+":"+oWebsocket.auth,aes.enc.Hex.parse(oWebsocket.key),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse(oWebsocket.iv),padding:aes.pad.Pkcs7}).ciphertext.toString(),token:aes.AES.encrypt(oWebsocket.token,aes.enc.Hex.parse(oWebsocket.key),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse(oWebsocket.iv),padding:aes.pad.Pkcs7}).ciphertext.toString(),startTime:szStartTime,endTime:szStopTime};return JSON.stringify(oCmd)}seekCmd(szStartTime,szStopTime){let oCmd={sequence:0,cmd:"seek",startTime:szStartTime,endTime:szStopTime};return JSON.stringify(oCmd)}}return MediaLive}();let LocalService=function(){class LocalServer{constructor(){}createClientObject(oWebsocket,szId,szPlayURL,oParams){return{socket:oWebsocket,id:szId,playURL:szPlayURL,deviceSerial:oParams.deviceSerial||"",verificationCode:oParams.verificationCode||"",resolve:null,reject:null}}playCmd(oWebsocket){let oCmd={sequence:0,cmd:"realplay",deviceSerial:oWebsocket.deviceSerial,verificationCode:oWebsocket.verificationCode,url:oWebsocket.playURL};return JSON.stringify(oCmd)}playbackCmd(oWebsocket,szStartTime,szStopTime){let oCmd={sequence:0,cmd:"playback",deviceSerial:oWebsocket.deviceSerial,verificationCode:oWebsocket.verificationCode,url:oWebsocket.playURL,startTime:szStartTime,endTime:szStopTime};return JSON.stringify(oCmd)}}return LocalServer}();let StreamClient=function(){const WEBSOCKET=Symbol("WEBSOCKET");const GETINDEX=Symbol("GETINDEX");const PROTOCOLVERSION=Symbol("PROTOCOLVERSION");const CIPHERSUITES=Symbol("CIPHERSUITES");let oDirectDeviceCustom=new DirectDeviceCustom;let oDirectDevice=new DirectDevice;let oLiveMedia=new LiveMedia;let oLocalService=new LocalService;class WebsocketClient{constructor(){this[PROTOCOLVERSION]="0.1";this[CIPHERSUITES]=0;this[WEBSOCKET]=[];this.ERRORS={};this[GETINDEX]=function(id){let iIndex=-1;for(let i=0,iLen=this[WEBSOCKET].length;i<iLen;i++){if(this[WEBSOCKET][i].id===id){iIndex=i;break}}return iIndex}}openStream(szUrl,oParams,cbMessage,cbClose){let bIpv6=false;if(szUrl.indexOf("[")>-1){bIpv6=true}let that=this;let aUrl=szUrl.split("://");let szProtocol=aUrl[0];let szHostname="";let iPort=7681;let iCurChannel=1;let iCurStream=0;let bWebSocketVideoCtrlProxy=false;if(bIpv6){szHostname=aUrl[1].split("]:")[0]+"]";iPort=Math.floor(aUrl[1].split("]:")[1].split("/")[0]);iCurChannel=Math.floor(aUrl[1].split("]:")[1].split("/")[1]/100);iCurStream=Math.floor(aUrl[1].split("]:")[1].split("/")[1]%100)-1}else{szHostname=aUrl[1].split(":")[0];iPort=Math.floor(aUrl[1].split(":")[1].split("/")[0]);iCurChannel=Math.floor(aUrl[1].split(":")[1].split("/")[1]/100);iCurStream=Math.floor(aUrl[1].split(":")[1].split("/")[1]%100)-1;let szProxyFlag=aUrl[1].split(":")[1].split("/")[2];if(szProxyFlag!==""&&szProxyFlag==="webSocketVideoCtrlProxy"){bWebSocketVideoCtrlProxy=true}}if(iCurChannel===0){iCurStream=0}oParams=oParams||{};let szAuthType="&sessionID=";if(oParams.token&&!oParams.playURL){szAuthType="&token="}let szSessionID=oParams.sessionID||oParams.session||(oParams.playURL?"":oParams.token)||"";let oWebsocket=new window.WebSocket(szProtocol+"://"+szHostname+":"+iPort+(oParams.mode?"/"+oParams.mode:"")+(bWebSocketVideoCtrlProxy?"/webSocketVideoCtrlProxy":"")+"?version="+that[PROTOCOLVERSION]+"&cipherSuites="+that[CIPHERSUITES]+szAuthType+szSessionID+(oParams.proxy?"&proxy="+oParams.proxy:""));oWebsocket.binaryType="arraybuffer";let szId=esm_browser_v4();let iDataIndex=-1;let promise=new Promise(function(resolve,reject){oWebsocket.onopen=function(){if(!oParams.playURL&&!oParams.sessionID&&!oParams.deviceSerial&&!oParams.token){that[WEBSOCKET].push(oDirectDeviceCustom.createClientObject(oWebsocket,szId,iCurChannel,iCurStream));resolve(szId)}};oWebsocket.onmessage=function(e){if(typeof e.data==="string"){let oJSON=JSON.parse(e.data);let iWebsocketIndex=that[GETINDEX](szId);if(oJSON&&oJSON.version&&oJSON.cipherSuite){that[PROTOCOLVERSION]=oJSON.version;that[CIPHERSUITES]=parseInt(oJSON.cipherSuite,10);if(oJSON&&oJSON.PKD&&oJSON.rand){that[WEBSOCKET].push(oLiveMedia.createClientObject(oWebsocket,szId,oJSON.PKD,oJSON.rand,oParams))}else{let szPlayURL="live://"+szHostname+":"+iPort+"/"+iCurChannel+"/"+iCurStream;if(that[CIPHERSUITES]===-1){that[WEBSOCKET].push(oLocalService.createClientObject(oWebsocket,szId,szPlayURL,oParams))}else{that[WEBSOCKET].push(oDirectDevice.createClientObject(oWebsocket,szId,szPlayURL))}}resolve(szId);return}if(oJSON&&oJSON.sdp){let aSadpHeadBuf=oDirectDevice.getMediaFromSdp(oJSON.sdp);cbMessage({bHead:true,buf:aSadpHeadBuf})}if(oJSON&&oJSON.cmd){if(oJSON.cmd==="end"){cbMessage({type:"exception",cmd:oJSON.cmd})}}if(oJSON&&oJSON.statusString){if(oJSON.statusString.toLowerCase()==="ok"){if(that[WEBSOCKET][iWebsocketIndex].resolve){that[WEBSOCKET][iWebsocketIndex].resolve(oJSON)}}if(oJSON.statusString.toLowerCase()!=="ok"){let oError=oDirectDevice.getError(oJSON);if(iWebsocketIndex>-1){if(that[WEBSOCKET][iWebsocketIndex].reject){that[WEBSOCKET][iWebsocketIndex].reject(oError)}}else{reject(oError)}}}if(oJSON&&oJSON.errorCode){cbMessage(oJSON)}}else{let dataObj={};let dataBuf=new Uint8Array(e.data);iDataIndex++;if(dataBuf.byteLength===64||dataBuf.byteLength===40){let iMediaHeadIndex=-1;let iLen=dataBuf.byteLength;for(let i=0;i<iLen;i++){if(dataBuf[i]===73&&dataBuf[i+1]===77&&dataBuf[i+2]===75&&dataBuf[i+3]===72){iMediaHeadIndex=i;break}}if(iMediaHeadIndex!==-1){let aHeadBuf=dataBuf.slice(iMediaHeadIndex,iMediaHeadIndex+40);dataObj={bHead:true,buf:aHeadBuf}}else{dataObj={bHead:false,buf:dataBuf}}cbMessage(dataObj)}else{if(iDataIndex>0){dataObj={bHead:false,buf:dataBuf};cbMessage(dataObj)}}dataBuf=null;dataObj=null;e=null}};oWebsocket.onclose=function(){for(let i=0,iLen=that[WEBSOCKET].length;i<iLen;i++){if(that[WEBSOCKET][i].id===szId){that[WEBSOCKET][i].resolve();that[WEBSOCKET].splice(i,1);setTimeout(function(){cbClose()},200);break}}reject()}});return promise}startPlay(id,szStartTime,szStopTime){let that=this;let iWebsocketIndex=this[GETINDEX](id);if(szStartTime&&szStopTime&&that[PROTOCOLVERSION]==="0.1"){szStartTime=szStartTime.replace(/-/g,"").replace(/:/g,"");szStopTime=szStopTime.replace(/-/g,"").replace(/:/g,"")}let promise=new Promise(function(resolve,reject){if(iWebsocketIndex>-1){that[WEBSOCKET][iWebsocketIndex].resolve=resolve;that[WEBSOCKET][iWebsocketIndex].reject=reject;let uIntCmd=null;if(!szStartTime||!szStopTime){if(that[WEBSOCKET][iWebsocketIndex].iCurChannel===0&&that[PROTOCOLVERSION]==="0.1"){uIntCmd=oDirectDeviceCustom.zeroPlayCmd(that[WEBSOCKET][iWebsocketIndex].iCurChannel,that[WEBSOCKET][iWebsocketIndex].iCurStream)}else{if(that[PROTOCOLVERSION]!=="0.1"){if(that[CIPHERSUITES]===0){uIntCmd=oLiveMedia.playCmd(that[WEBSOCKET][iWebsocketIndex])}else if(that[CIPHERSUITES]===1){uIntCmd=oDirectDevice.playCmd(that[WEBSOCKET][iWebsocketIndex].playURL)}else if(that[CIPHERSUITES]===-1){uIntCmd=oLocalService.playCmd(that[WEBSOCKET][iWebsocketIndex])}}else{uIntCmd=oDirectDeviceCustom.playCmd(that[WEBSOCKET][iWebsocketIndex].iCurChannel,that[WEBSOCKET][iWebsocketIndex].iCurStream)}}}else{if(that[PROTOCOLVERSION]!=="0.1"){if(that[CIPHERSUITES]===0){uIntCmd=oLiveMedia.playbackCmd(that[WEBSOCKET][iWebsocketIndex],szStartTime,szStopTime)}else if(that[CIPHERSUITES]===1){uIntCmd=oDirectDevice.playbackCmd(szStartTime,szStopTime,that[WEBSOCKET][iWebsocketIndex].playURL)}else if(that[CIPHERSUITES]===-1){uIntCmd=oLocalService.playbackCmd(that[WEBSOCKET][iWebsocketIndex],szStartTime,szStopTime)}}else{uIntCmd=oDirectDeviceCustom.playbackCmd(szStartTime,szStopTime,that[WEBSOCKET][iWebsocketIndex].iCurChannel,that[WEBSOCKET][iWebsocketIndex].iCurStream)}}that[WEBSOCKET][iWebsocketIndex].socket.send(uIntCmd);if(that[PROTOCOLVERSION]==="0.1"){resolve()}}else{if(that[PROTOCOLVERSION]==="0.1"){reject()}}});return promise}singleFrame(){}setPlayRate(id,iRate){let that=this;let promise=new Promise(function(resolve,reject){for(let i=0,iLen=that[WEBSOCKET].length;i<iLen;i++){if(that[WEBSOCKET][i].id===id){if(that[PROTOCOLVERSION]==="0.1"){let uIntCmd=oDirectDeviceCustom.playRateCmd(iRate);that[WEBSOCKET][i].socket.send(uIntCmd);resolve();break}else{that[WEBSOCKET][i].resolve=resolve;that[WEBSOCKET][i].reject=reject;let szCmd=oDirectDevice.playRateCmd(iRate);that[WEBSOCKET][i].socket.send(szCmd)}}}});return promise}seek(id,szStartTime,szStopTime){let that=this;let promise=new Promise(function(resolve,reject){for(let i=0,iLen=that[WEBSOCKET].length;i<iLen;i++){if(that[WEBSOCKET][i].id===id){that[WEBSOCKET][i].resolve=resolve;that[WEBSOCKET][i].reject=reject;let szCmd=oLiveMedia.seekCmd(szStartTime,szStopTime);that[WEBSOCKET][i].socket.send(szCmd)}}});return promise}pause(id){let that=this;let promise=new Promise(function(resolve,reject){for(let i=0,iLen=that[WEBSOCKET].length;i<iLen;i++){if(that[WEBSOCKET][i].id===id){if(that[PROTOCOLVERSION]==="0.1"){let uIntCmd=oDirectDeviceCustom.pauseCmd();that[WEBSOCKET][i].socket.send(uIntCmd);resolve();break}else{that[WEBSOCKET][i].resolve=resolve;that[WEBSOCKET][i].reject=reject;let szCmd=oDirectDevice.pauseCmd();that[WEBSOCKET][i].socket.send(szCmd)}}}});return promise}transmission(id,szCmd){let that=this;let promise=new Promise(function(resolve,reject){for(let i=0,iLen=that[WEBSOCKET].length;i<iLen;i++){if(that[WEBSOCKET][i].id===id){that[WEBSOCKET][i].resolve=resolve;that[WEBSOCKET][i].reject=reject;that[WEBSOCKET][i].socket.send(szCmd)}}});return promise}resume(id){let that=this;let promise=new Promise(function(resolve,reject){for(let i=0,iLen=that[WEBSOCKET].length;i<iLen;i++){if(that[WEBSOCKET][i].id===id){if(that[PROTOCOLVERSION]==="0.1"){let uIntCmd=oDirectDeviceCustom.resumeCmd();that[WEBSOCKET][i].socket.send(uIntCmd);resolve();break}else{that[WEBSOCKET][i].resolve=resolve;that[WEBSOCKET][i].reject=reject;let szCmd=oDirectDevice.resumeCmd();that[WEBSOCKET][i].socket.send(szCmd)}}}});return promise}stop(id){let that=this;let promise=new Promise(function(resolve,reject){if(!id){reject()}else{let iIndex=-1;for(let i=0,iLen=that[WEBSOCKET].length;i<iLen;i++){if(that[WEBSOCKET][i].id===id){iIndex=i;that[WEBSOCKET][i].resolve=resolve;that[WEBSOCKET][i].socket.close(1e3,"CLOSE");break}}if(iIndex===-1){reject()}}});return promise}stopAll(){let that=this;let promise=new Promise(function(resolve,reject){for(let i=0,iLen=that[WEBSOCKET].length;i<iLen;i++){that[WEBSOCKET][i].socket.close(1e3,"CLOSE")}console.log("停止所有流");resolve()});return promise}}return WebsocketClient}()}])})})(streamClient1_2_0_min);var streamClient1_2_0_minExports=streamClient1_2_0_min.exports;var getRandomValues;var rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){getRandomValues=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!getRandomValues){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return getRandomValues(rnds8)}var REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(uuid){return typeof uuid==="string"&&REGEX.test(uuid)}var byteToHex=[];for(var i$1=0;i$1<256;++i$1){byteToHex.push((i$1+256).toString(16).substr(1))}function stringify(arr){var offset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var uuid=(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+"-"+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+"-"+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+"-"+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+"-"+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase();if(!validate(uuid)){throw TypeError("Stringified UUID is invalid")}return uuid}function v4(options,buf,offset){options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){offset=offset||0;for(var i=0;i<16;++i){buf[offset+i]=rnds[i]}return buf}return stringify(rnds)}class Tool{constructor(){this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}$(strExpr){var idExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;var classExpr=/^(?:\s*(<[\w\W]+>)[^>]*|.([\w-]*))$/;if(idExpr.test(strExpr)){var idMatch=idExpr.exec(strExpr);return document.getElementById(idMatch[2])}else if(classExpr.test(strExpr)){var classMatch=classExpr.exec(strExpr);var allElement=document.getElementsByTagName("*");var ClassMatch=[];for(var i=0,l=allElement.length;i<l;i++){if(allElement[i].className.match(new RegExp("(\\s|^)"+classMatch[2]+"(\\s|$)"))){ClassMatch.push(allElement[i])}}return ClassMatch}}dateFormat(oDate,fmt){var o={"M+":oDate.getMonth()+1,"d+":oDate.getDate(),"h+":oDate.getHours(),"m+":oDate.getMinutes(),"s+":oDate.getSeconds(),"q+":Math.floor((oDate.getMonth()+3)/3),S:oDate.getMilliseconds()};if(/(y+)/.test(fmt)){fmt=fmt.replace(RegExp.$1,(oDate.getFullYear()+"").substr(4-RegExp.$1.length))}for(var k in o){if(new RegExp("("+k+")").test(fmt)){fmt=fmt.replace(RegExp.$1,RegExp.$1.length===1?o[k]:("00"+o[k]).substr((""+o[k]).length))}}return fmt}downloadFile(oData,szName){let oBlob=oData;if(!(oData instanceof Blob||oData instanceof File)){oBlob=new Blob([oData])}var szFileUrl=window.URL.createObjectURL(oBlob);var oLink=window.document.createElement("a");oLink.href=szFileUrl;oLink.download=szName;var oClick=document.createEvent("MouseEvents");oClick.initEvent("click",true,true);oLink.dispatchEvent(oClick)}createxmlDoc(){var xmlDoc;var aVersions=["MSXML2.DOMDocument","MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","Microsoft.XmlDom"];for(var i=0,len=aVersions.length;i<len;i++){try{xmlDoc=new ActiveXObject(aVersions[i]);break}catch(e){xmlDoc=document.implementation.createDocument("","",null);break}}xmlDoc.async="false";return xmlDoc}parseXmlFromStr(szXml){if(null===szXml||""===szXml){return null}var xmlDoc=this.createxmlDoc();if(navigator.appName==="Netscape"||navigator.appName==="Opera"){var oParser=new DOMParser;xmlDoc=oParser.parseFromString(szXml,"text/xml")}else{xmlDoc.loadXML(szXml)}return xmlDoc}encode(input){var output="";var chr1;var chr2;var chr3;var enc1;var enc2;var enc3;var enc4;var i=0;input=this._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4)}return output}decode(input){var output="";var chr1;var chr2;var chr3;var enc1;var enc2;var enc3;var enc4;var i=0;input=input.replace(/[^A-Za-z0-9+/=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}output=this._utf8_decode(output);return output}_utf8_encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else if(c>127&&c<2048){utftext+=String.fromCharCode(c>>6|192);utftext+=String.fromCharCode(c&63|128)}else{utftext+=String.fromCharCode(c>>12|224);utftext+=String.fromCharCode(c>>6&63|128);utftext+=String.fromCharCode(c&63|128)}}return utftext}_utf8_decode(utftext){var string="";var i=0;var c=0;var c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++}else if(c>191&&c<224){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode((c&31)<<6|c2&63);i+=2}else{c2=utftext.charCodeAt(i+1);var c3=utftext.charCodeAt(i+2);string+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63);i+=3}}return string}isFirefox(){var bRet=false;var szUserAgent=navigator.userAgent.toLowerCase();var szBrowserVersion="";var iBrowserVersion=-1;if(szUserAgent.match(/firefox\/([\d.]+)/)){szBrowserVersion=szUserAgent.match(/firefox\/([\d.]+)/)[1];iBrowserVersion=parseInt(szBrowserVersion.split(".")[0],10);if(iBrowserVersion>-1){bRet=true}}return bRet}isSafari(){var bRet=false;var szUserAgent=navigator.userAgent.toLowerCase();var szBrowserVersion="";var iBrowserVersion=-1;if(szUserAgent.match(/version\/([\d.]+).safari./)){szBrowserVersion=szUserAgent.match(/version\/([\d.]+).safari./)[1];iBrowserVersion=parseInt(szBrowserVersion.split(".")[0],10);if(iBrowserVersion>-1){bRet=true}}return bRet}isEdge(){return navigator.userAgent.toLowerCase().indexOf("edge")>-1}isIOS(){let u=navigator.userAgent;let bIOS=!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return bIOS}}let oTool=new Tool;const systemTransformWorkerString=(staticPath="https://open.ys7.com/assets/ezuikit_v3.6")=>`(function() {
    const RECORDRTP = 0;  //录制一份未经过转封装的码流原始数据,用于定位问题
    self.Module = { memoryInitializerRequest: loadMemInitFile(), TOTAL_MEMORY: 128*1024*1024 };
    importScripts = (function (globalEval) {
        var xhr = new XMLHttpRequest;
        return function importScripts() {
          var
            args = Array.prototype.slice.call(arguments)
            , len = args.length
            , i = 0
            , meta
            , data
            , content
            ;
          for (; i < len; i++) {
            if (args[i].substr(0, 5).toLowerCase() === "data:") {
              data = args[i];
              content = data.indexOf(",");
              meta = data.substr(5, content).toLowerCase();
              data = decodeURIComponent(data.substr(content + 1));
              if (/;\s*base64\s*[;,]/.test(meta)) {
                data = atob(data);
              }
              if (/;\s*charset=[uU][tT][fF]-?8\s*[;,]/.test(meta)) {
                data = decodeURIComponent(escape(data));
              }
            } else {
              xhr.open("GET", args[i], false);
              xhr.send(null);
              data = xhr.responseText;
            }
            globalEval(data);
          }
        };
      }(eval));
    importScripts('${staticPath}/js/transform/SystemTransform.js');

    Module.postRun.push(function() {
        postMessage({type: "loaded"});
    });

    onmessage = function (e) {
        var data = e.data;

        if ("create" === data.type) {
            var iHeadLen = data.len;
            var pHead = Module._malloc(iHeadLen);

            var aData = Module.HEAPU8.subarray(pHead, pHead + iHeadLen);
            aData.set(new Uint8Array(data.buf));

            var iTransType = data.packType;//目标格式 RTP->PS
            if (RECORDRTP) {
                postMessage({type: "created"});
                postMessage({type: "outputData", buf: data.buf, dType: 1}, [data.buf]);
            } else {
                var iRet = Module._ST_Create(pHead, iHeadLen, iTransType);
                if (iRet != 0) {
                    console.log("_ST_Create failed!");
                } else {
                    Module._ST_Start();
                    postMessage({type: "created"});
                }
            }

        } else if ("inputData" === data.type) {
            if (RECORDRTP) {
                var aFileData = new Uint8Array(data.buf);  // 拷贝一份
                var iBufferLen = aFileData.length;
                var szBufferLen = iBufferLen.toString(16);
                if (szBufferLen.length === 1) {
                    szBufferLen = "000" + szBufferLen;
                } else if (szBufferLen.length === 2) {
                    szBufferLen = "00" + szBufferLen;
                } else if (szBufferLen.length === 3) {
                    szBufferLen = "0" + szBufferLen;
                }
                var aData = [0, 0, parseInt(szBufferLen.substring(0, 2), 16), parseInt(szBufferLen.substring(2, 4), 16)];
                for(var iIndex = 0, iDataLength = aFileData.length; iIndex < iDataLength; iIndex++) {
                    aData[iIndex + 4] = aFileData[iIndex]
                }
                var dataUint8 = new Uint8Array(aData);
                postMessage({type: "outputData", buf: dataUint8.buffer, dType: 2}, [dataUint8.buffer]);
            } else {
                var iDataLen = data.len;
                var pData = Module._malloc(iDataLen);

                var aData = Module.HEAPU8.subarray(pData, pData + iDataLen);
                aData.set(new Uint8Array(data.buf));

                var iRet = Module._ST_InputData(0, pData, iDataLen);
                if (iRet != 0) {
                    //console.log("_ST_InputData failed!");// 一开始会有一些失败,但是不影响后面的文件存储
                }

                Module._free(pData);
            }
        } else if ("release" === data.type) {
            Module._ST_Stop();
            Module._ST_Release();

            close();
        }
    };

    function loadMemInitFile() {
        var req = new XMLHttpRequest();
        req.open('GET', '${staticPath}/js/transform/SystemTransform.js.mem');
        req.responseType = 'arraybuffer';
        req.send();

        return req;
    }
})();`;const STORAGE_RECORD_PATH="Web/RecordFiles/";const STORAGE_CLIPS_PATH="Web/PlaybackFiles/";const STORAGE_TIMEOUT=1e3;const TRANS_SYSHEAD=1;const ERROR_MAX_FILE_SIZE=3001;window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem;window.URL=window.URL||window.webkitURL;class FileSystem{constructor(szUUID,szFileName,iStreamType,options){this.szUUID=szUUID;this.szFileName=szFileName;this.iStreamType=iStreamType;this.szPath="";this.bStart=false;this.aStreamList=[];this.options=options}init(){var that=this;if(0===this.iStreamType){this.szPath=STORAGE_RECORD_PATH}else if(1===this.iStreamType){this.szPath=STORAGE_CLIPS_PATH}this.szPath+=this.getDateDir();var aPath=that.szPath.split("/");var oPromise=new Promise(function(resolve){window.requestFileSystem(window.TEMPORARY,that.options.iFileSize,function(fs){that.createDir(fs.root,aPath,function(){resolve()})},that.errorHandler)});return oPromise}getDateDir(){return oTool.dateFormat(new Date,"yyyy-MM-dd")}createDir(rootDirEntry,floders,cbFunc){var that=this;if(floders.length){rootDirEntry.getDirectory(floders[0],{create:true},function(dirEntry){that.createDir(dirEntry,floders.slice(1),cbFunc)},that.errorHandler)}else{cbFunc()}}errorHandler(){}writeFileHeader(aData){var that=this;window.requestFileSystem(window.TEMPORARY,that.options.iFileSize,function(fs){fs.root.getFile(that.szPath+"/"+that.szFileName,{create:true},function(fileEntry){fileEntry.createWriter(function(fileWriter){fileWriter.onwriteend=function(){that.bStart=true;that.writeFile(fileWriter)};fileWriter.onerror=function(){};fileWriter.seek(fileWriter.length);var oBlob=new Blob([aData]);fileWriter.write(oBlob)},that.errorHandler)},that.errorHandler)},that.errorHandler)}writeFileContent(aData){this.aStreamList.push(aData)}writeFile(fileWriter){var that=this;if(this.bStart){if(this.aStreamList.length>0){var aData=this.aStreamList.shift();fileWriter.seek(fileWriter.length);if(fileWriter.length>=this.options.iFileSize){if(this.options.cbEventHandler){this.options.cbEventHandler(ERROR_MAX_FILE_SIZE,this.szUUID)}return}var oBlob=new Blob([aData]);fileWriter.write(oBlob)}else{setTimeout(function(){that.writeFile(fileWriter)},STORAGE_TIMEOUT)}}}stopWriteFile(){var that=this;this.bStart=false;this.aStreamList.length=0;var oPromise=new Promise(function(resolve){window.requestFileSystem(window.TEMPORARY,that.options.iFileSize,function(fs){fs.root.getFile(that.szPath+"/"+that.szFileName,{create:false},function(fileEntry){fileEntry.file(function(file){resolve();oTool.downloadFile(file,file.name)})},that.errorHandler)},that.errorHandler)});return oPromise}}class Storage{constructor(szBasePath,szUUID,szFileName,aHeadBuf,iPackType,iStreamType,options,staticPath){this.szBasePath=szBasePath;this.szUUID=szUUID;this.szFileName=szFileName;this.aHeadBuf=new Uint8Array(aHeadBuf);this.iPackType=iPackType;this.iStreamType=iStreamType;this.oWorker=null;this.oFileSystem=null;this.options=options;this.bHead=true;this.staticPath=staticPath}init(){var that=this;var oPromise=new Promise(function(resolve,reject){that.initFileSystem().then(function(){that.initWorker().then(function(){resolve(that.szUUID)},function(iError){reject(iError)})},function(iError){reject(iError)})});return oPromise}initFileSystem(){var that=this;this.oFileSystem=new FileSystem(this.szUUID,this.szFileName,this.iStreamType,this.options);var oPromise=new Promise(function(resolve,reject){that.oFileSystem.init().then(function(){resolve()},function(iError){reject(iError)})});return oPromise}initWorker(){var that=this;var oPromise=new Promise(function(resolve){var workBlob=new Blob([systemTransformWorkerString(that.staticPath)]);const url=URL.createObjectURL(workBlob);that.oWorker=new Worker(url);that.oWorker.onmessage=function(e){var data=e.data;let packType=that.iPackType;if(that.options.iPackage===1){packType=12}if("loaded"===data.type){that.oWorker.postMessage({type:"create",buf:that.aHeadBuf.buffer,len:40,packType:packType},[that.aHeadBuf.buffer])}else if("created"===data.type){resolve()}else if("outputData"===data.type){var aFileData=new Uint8Array(data.buf);if(that.options.iPackage===1){if(that.bHead){that.oFileSystem.writeFileHeader(aFileData);that.bHead=false}else{that.oFileSystem.writeFileContent(aFileData)}}else{if(TRANS_SYSHEAD===data.dType){that.oFileSystem.writeFileHeader(aFileData)}else{that.oFileSystem.writeFileContent(aFileData)}}}}});return oPromise}inputData(aData){if(this.oWorker){var aPostData=new Uint8Array(aData);this.oWorker.postMessage({type:"inputData",buf:aPostData.buffer,len:aPostData.length},[aPostData.buffer])}}stopRecord(){var that=this;var oPromise=new Promise(function(resolve,reject){if(that.oWorker){that.oWorker.postMessage({type:"release"})}else{reject()}if(that.oFileSystem){that.oFileSystem.stopWriteFile().then(function(){that.bHead=true;resolve()},function(){reject()})}else{reject()}});return oPromise}}var StorageManager=function(){var STORAGELIST=Symbol("STORAGELIST");class StorageManage{constructor(szBasePath,options,staticPath){this.szBasePath=szBasePath;this[STORAGELIST]={};this.options={iFileSize:1024*1024*1024};Object.assign(this.options,options);if(typeof options.staticPath==="string"){this.staticPath=options.staticPath}}startRecord(szFileName,aHeadBuf,iPackType,iStreamType,options){var that=this;var szUUID=v4();var oOptions=Object.assign({},this.options,options);var oStorage=new Storage(this.szBasePath,szUUID,szFileName,aHeadBuf,iPackType,iStreamType,oOptions,this.staticPath);var oPromise=new Promise(function(resolve,reject){oStorage.init().then(function(szID){that[STORAGELIST][szID]=oStorage;resolve(szID)},function(iError){reject(iError)})});return oPromise}inputData(szUUID,aData){var oStorage=this[STORAGELIST][szUUID];if(oStorage){oStorage.inputData(aData)}}stopRecord(szUUID){var that=this;var oPromise=new Promise(function(resolve,reject){var oStorage=that[STORAGELIST][szUUID];if(oStorage){oStorage.stopRecord().then(function(){delete that[STORAGELIST][szUUID];resolve()},function(){reject()})}else{reject()}});return oPromise}}return StorageManage}();var jquery={exports:{}};(function(module){(function(global,factory){{module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document")}return factory(w)}}})(typeof window!=="undefined"?window:commonjsGlobal,function(window,noGlobal){var arr=[];var getProto=Object.getPrototypeOf;var slice=arr.slice;var flat=arr.flat?function(array){return arr.flat.call(array)}:function(array){return arr.concat.apply([],array)};var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};var isFunction=function isFunction(obj){return typeof obj==="function"&&typeof obj.nodeType!=="number"&&typeof obj.item!=="function"};var isWindow=function isWindow(obj){return obj!=null&&obj===obj.window};var document=window.document;var preservedScriptAttributes={type:true,src:true,nonce:true,noModule:true};function DOMEval(code,node,doc){doc=doc||document;var i,val,script=doc.createElement("script");script.text=code;if(node){for(i in preservedScriptAttributes){val=node[i]||node.getAttribute&&node.getAttribute(i);if(val){script.setAttribute(i,val)}}}doc.head.appendChild(script).parentNode.removeChild(script)}function toType(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj}var version="3.7.1",rhtmlSuffix=/HTML$/i,jQuery=function(selector,context){return new jQuery.fn.init(selector,context)};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,length:0,toArray:function(){return slice.call(this)},get:function(num){if(num==null){return slice.call(this)}return num<0?this[num+this.length]:this[num]},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;return ret},each:function(callback){return jQuery.each(this,callback)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(jQuery.grep(this,function(_elem,i){return(i+1)%2}))},odd:function(){return this.pushStack(jQuery.grep(this,function(_elem,i){return i%2}))},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor()},push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==="boolean"){deep=target;target=arguments[i]||{};i++}if(typeof target!=="object"&&!isFunction(target)){target={}}if(i===length){target=this;i--}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){copy=options[name];if(name==="__proto__"||target===copy){continue}if(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))){src=target[name];if(copyIsArray&&!Array.isArray(src)){clone=[]}else if(!copyIsArray&&!jQuery.isPlainObject(src)){clone={}}else{clone=src}copyIsArray=false;target[name]=jQuery.extend(deep,clone,copy)}else if(copy!==undefined){target[name]=copy}}}}return target};jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:true,error:function(msg){throw new Error(msg)},noop:function(){},isPlainObject:function(obj){var proto,Ctor;if(!obj||toString.call(obj)!=="[object Object]"){return false}proto=getProto(obj);if(!proto){return true}Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},globalEval:function(code,options,doc){DOMEval(code,{nonce:options&&options.nonce},doc)},each:function(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i<length;i++){if(callback.call(obj[i],i,obj[i])===false){break}}}else{for(i in obj){if(callback.call(obj[i],i,obj[i])===false){break}}}return obj},text:function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while(node=elem[i++]){ret+=jQuery.text(node)}}if(nodeType===1||nodeType===11){return elem.textContent}if(nodeType===9){return elem.documentElement.textContent}if(nodeType===3||nodeType===4){return elem.nodeValue}return ret},makeArray:function(arr,results){var ret=results||[];if(arr!=null){if(isArrayLike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr)}else{push.call(ret,arr)}}return ret},inArray:function(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i)},isXMLDoc:function(elem){var namespace=elem&&elem.namespaceURI,docElem=elem&&(elem.ownerDocument||elem).documentElement;return!rhtmlSuffix.test(namespace||docElem&&docElem.nodeName||"HTML")},merge:function(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j]}first.length=i;return first},grep:function(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i])}}return matches},map:function(elems,callback,arg){var length,value,i=0,ret=[];if(isArrayLike(elems)){length=elems.length;for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}else{for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value)}}}return flat(ret)},guid:1,support:support});if(typeof Symbol==="function"){jQuery.fn[Symbol.iterator]=arr[Symbol.iterator]}jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(_i,name){class2type["[object "+name+"]"]=name.toLowerCase()});function isArrayLike(obj){var length=!!obj&&"length"in obj&&obj.length,type=toType(obj);if(isFunction(obj)||isWindow(obj)){return false}return type==="array"||length===0||typeof length==="number"&&length>0&&length-1 in obj}function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()}var pop=arr.pop;var sort=arr.sort;var splice=arr.splice;var whitespace="[\\x20\\t\\r\\n\\f]";var rtrimCSS=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g");jQuery.contains=function(a,b){var bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(a.contains?a.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))};var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function fcssescape(ch,asCodePoint){if(asCodePoint){if(ch==="\0"){return"�"}return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" "}return"\\"+ch}jQuery.escapeSelector=function(sel){return(sel+"").replace(rcssescape,fcssescape)};var preferredDoc=document,pushNative=push;(function(){var i,Expr,outermostContext,sortInput,hasDuplicate,push=pushNative,document,documentElement,documentIsHTML,rbuggyQSA,matches,expando=jQuery.expando,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),nonnativeSelectorCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|"+"loop|multiple|open|readonly|required|scoped",identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+".*"+")\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rleadingCombinator=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rdescend=new RegExp(whitespace+"|>"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\([^\\r\\n\\f])","g"),funescape=function(escape,nonHex){var high="0x"+escape.slice(1)-65536;if(nonHex){return nonHex}return high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()},inDisabledFieldset=addCombinator(function(elem){return elem.disabled===true&&nodeName(elem,"fieldset")},{dir:"parentNode",next:"legend"});function safeActiveElement(){try{return document.activeElement}catch(err){}}try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:function(target,els){pushNative.apply(target,slice.call(els))},call:function(target){pushNative.apply(target,slice.call(arguments,1))}}}function find(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed){setDocument(context);context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if(m=match[1]){if(nodeType===9){if(elem=context.getElementById(m)){if(elem.id===m){push.call(results,elem);return results}}else{return results}}else{if(newContext&&(elem=newContext.getElementById(m))&&find.contains(context,elem)&&elem.id===m){push.call(results,elem);return results}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else if((m=match[3])&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}if(!nonnativeSelectorCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){newSelector=selector;newContext=context;if(nodeType===1&&(rdescend.test(selector)||rleadingCombinator.test(selector))){newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;if(newContext!=context||!support.scope){if(nid=context.getAttribute("id")){nid=jQuery.escapeSelector(nid)}else{context.setAttribute("id",nid=expando)}}groups=tokenize(selector);i=groups.length;while(i--){groups[i]=(nid?"#"+nid:":scope")+" "+toSelector(groups[i])}newSelector=groups.join(",")}try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){nonnativeSelectorCache(selector,true)}finally{if(nid===expando){context.removeAttribute("id")}}}}}return select(selector.replace(rtrimCSS,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return cache[key+" "]=value}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el)}catch(e){return false}finally{if(el.parentNode){el.parentNode.removeChild(el)}el=null}}function createInputPseudo(type){return function(elem){return nodeName(elem,"input")&&elem.type===type}}function createButtonPseudo(type){return function(elem){return(nodeName(elem,"input")||nodeName(elem,"button"))&&elem.type===type}}function createDisabledPseudo(disabled){return function(elem){if("form"in elem){if(elem.parentNode&&elem.disabled===false){if("label"in elem){if("label"in elem.parentNode){return elem.parentNode.disabled===disabled}else{return elem.disabled===disabled}}return elem.isDisabled===disabled||elem.isDisabled!==!disabled&&inDisabledFieldset(elem)===disabled}return elem.disabled===disabled}else if("label"in elem){return elem.disabled===disabled}return false}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context}function setDocument(node){var subWindow,doc=node?node.ownerDocument||node:preferredDoc;if(doc==document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;documentElement=document.documentElement;documentIsHTML=!jQuery.isXMLDoc(document);matches=documentElement.matches||documentElement.webkitMatchesSelector||documentElement.msMatchesSelector;if(documentElement.msMatchesSelector&&preferredDoc!=document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){subWindow.addEventListener("unload",unloadHandler)}support.getById=assert(function(el){documentElement.appendChild(el).id=jQuery.expando;return!document.getElementsByName||!document.getElementsByName(jQuery.expando).length});support.disconnectedMatch=assert(function(el){return matches.call(el,"*")});support.scope=assert(function(){return document.querySelectorAll(":scope")});support.cssHas=assert(function(){try{document.querySelector(":has(*,:jqfake)");return false}catch(e){return true}});if(support.getById){Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}};Expr.find.ID=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[]}}}else{Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId}};Expr.find.ID=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem]}elems=context.getElementsByName(id);i=0;while(elem=elems[i++]){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem]}}}return[]}}}Expr.find.TAG=function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag)}else{return context.querySelectorAll(tag)}};Expr.find.CLASS=function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className)}};rbuggyQSA=[];assert(function(el){var input;documentElement.appendChild(el).innerHTML="<a id='"+expando+"' href='' disabled='disabled'></a>"+"<select id='"+expando+"-\r\\' disabled='disabled'>"+"<option selected=''></option></select>";if(!el.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!el.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=")}if(!el.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]")}if(!el.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}input=document.createElement("input");input.setAttribute("type","hidden");el.appendChild(input).setAttribute("name","D");documentElement.appendChild(el).disabled=true;if(el.querySelectorAll(":disabled").length!==2){rbuggyQSA.push(":enabled",":disabled")}input=document.createElement("input");input.setAttribute("name","");el.appendChild(input);if(!el.querySelectorAll("[name='']").length){rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+whitespace+"*(?:''|\"\")")}});if(!support.cssHas){rbuggyQSA.push(":has")}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));sortOrder=function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)==(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===document||a.ownerDocument==preferredDoc&&find.contains(preferredDoc,a)){return-1}if(b===document||b.ownerDocument==preferredDoc&&find.contains(preferredDoc,b)){return 1}return sortInput?indexOf.call(sortInput,a)-indexOf.call(sortInput,b):0}return compare&4?-1:1};return document}find.matches=function(expr,elements){return find(expr,null,null,elements)};find.matchesSelector=function(elem,expr){setDocument(elem);if(documentIsHTML&&!nonnativeSelectorCache[expr+" "]&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){nonnativeSelectorCache(expr,true)}}return find(expr,document,null,[elem]).length>0};find.contains=function(context,elem){if((context.ownerDocument||context)!=document){setDocument(context)}return jQuery.contains(context,elem)};find.attr=function(elem,name){if((elem.ownerDocument||elem)!=document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;if(val!==undefined){return val}return elem.getAttribute(name)};find.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};jQuery.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.sortStable;sortInput=!support.sortStable&&slice.call(results,0);sort.call(results,sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i)}}while(j--){splice.call(results,duplicates[j],1)}}sortInput=null;return results};jQuery.fn.uniqueSort=function(){return this.pushStack(jQuery.uniqueSort(slice.apply(this)))};Expr=jQuery.expr={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){find.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd")}else if(match[3]){find.error(match[0])}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr.CHILD.test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var expectedNodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return nodeName(elem,expectedNodeName)}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=find.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";if(operator==="="){return result===check}if(operator==="!="){return result!==check}if(operator==="^="){return check&&result.indexOf(check)===0}if(operator==="*="){return check&&result.indexOf(check)>-1}if(operator==="$="){return check&&result.slice(-check.length)===check}if(operator==="~="){return(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1}if(operator==="|="){return result===check||result.slice(0,check.length+1)===check+"-"}return false}},CHILD:function(type,what,_argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,_context,xml){var cache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?nodeName(node,name):node.nodeType===1){return false}}start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){outerCache=parent[expando]||(parent[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}}else{if(useCache){outerCache=elem[expando]||(elem[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex}if(diff===false){while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?nodeName(node,name):node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});outerCache[type]=[dirruns,diff]}if(node===elem){break}}}}}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||find.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf.call(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrimCSS,"$1"));return matcher[expando]?markFunction(function(seed,matches,_context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem)}}}):function(elem,_context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),has:markFunction(function(selector){return function(elem){return find(selector,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||jQuery.text(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){find.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===documentElement},focus:function(elem){return elem===safeActiveElement()&&document.hasFocus()&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:createDisabledPseudo(false),disabled:createDisabledPseudo(true),checked:function(elem){return nodeName(elem,"input")&&!!elem.checked||nodeName(elem,"option")&&!!elem.selected},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){return nodeName(elem,"input")&&elem.type==="button"||nodeName(elem,"button")},text:function(elem){var attr;return nodeName(elem,"input")&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(_matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(_matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i)}return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){var i;if(argument<0){i=argument+length}else if(argument>length){i=length}else{i=argument}for(;--i>=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i)}return matchIndexes})}};Expr.pseudos.nth=Expr.pseudos.eq;for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i)}for(i in{submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i)}function setFilters(){}setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters;function tokenize(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached){return parseOnly?0:cached.slice(0)}soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){if(!matched||(match=rcomma.exec(soFar))){if(match){soFar=soFar.slice(match[0].length)||soFar}groups.push(tokens=[])}matched=false;if(match=rleadingCombinator.exec(soFar)){matched=match.shift();tokens.push({value:matched,type:match[0].replace(rtrimCSS," ")});soFar=soFar.slice(matched.length)}for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length)}}if(!matched){break}}if(parseOnly){return soFar.length}return soFar?find.error(selector):tokenCache(selector,groups).slice(0)}function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value}return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&key==="parentNode",doneName=done++;return combinator.first?function(elem,context,xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml)}}return false}:function(elem,context,xml){var oldCache,outerCache,newCache=[dirruns,doneName];if(xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true}}}}else{while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});if(skip&&nodeName(elem,skip)){elem=elem[dir]||elem}else if((oldCache=outerCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName){return newCache[2]=oldCache[2]}else{outerCache[key]=newCache;if(newCache[2]=matcher(elem,context,xml)){return true}}}}}return false}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){find(selector,contexts[i],results)}return results}function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if(elem=unmatched[i]){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i)}}}}return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter)}if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector)}return markFunction(function(seed,results,context,xml){var temp,i,elem,matcherOut,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems;if(matcher){matcherOut=postFinder||(seed?preFilter:preexisting||postFilter)?[]:results;matcher(matcherIn,matcherOut,context,xml)}else{matcherOut=matcherIn}if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);i=temp.length;while(i--){if(elem=temp[i]){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem)}}}if(seed){if(postFinder||preFilter){if(postFinder){temp=[];i=matcherOut.length;while(i--){if(elem=matcherOut[i]){temp.push(matcherIn[i]=elem)}}postFinder(null,matcherOut=[],temp,xml)}i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!=outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i<len;i++){if(matcher=Expr.relative[tokens[i].type]){matchers=[addCombinator(elementMatcher(matchers),matcher)]}else{matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);if(matcher[expando]){j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break}}return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrimCSS,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens))}matchers.push(matcher)}}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;if(outermost){outermostContext=context==document||context||outermost}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!=document){setDocument(elem);xml=!documentIsHTML}while(matcher=elementMatchers[j++]){if(matcher(elem,context||document,xml)){push.call(results,elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if(elem=!matcher&&elem){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){jQuery.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}function compile(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached}function select(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else if(compiled){context=context.parentNode}selector=selector.slice(tokens.shift().value.length)}i=matchExpr.needsContext.test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[type=token.type]){break}if(find=Expr.find[type]){if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results}support.sortStable=expando.split("").sort(sortOrder).join("")===expando;setDocument();support.sortDetached=assert(function(el){return el.compareDocumentPosition(document.createElement("fieldset"))&1});jQuery.find=find;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=jQuery.uniqueSort;find.compile=compile;find.select=select;find.setDocument=setDocument;find.tokenize=tokenize;find.escape=jQuery.escapeSelector;find.getText=jQuery.text;find.isXML=jQuery.isXMLDoc;find.selectors=jQuery.expr;find.support=jQuery.support;find.uniqueSort=jQuery.uniqueSort})();var dir=function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched};var siblings=function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched};var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function winnow(elements,qualifier,not){if(isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not})}if(typeof qualifier!=="string"){return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not})}return jQuery.filter(qualifier,elements,not)}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}if(elems.length===1&&elem.nodeType===1){return jQuery.find.matchesSelector(elem,expr)?[elem]:[]}return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true}}}))}ret=this.pushStack([]);for(i=0;i<len;i++){jQuery.find(selector,self[i],ret)}return len>1?jQuery.uniqueSort(ret):ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this}root=root||rootjQuery;if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem){this[0]=elem;this.length=1}return this}}else if(!context||context.jquery){return(context||root).find(selector)}else{return this.constructor(context).find(selector)}}else if(selector.nodeType){this[0]=selector;this.length=1;return this}else if(isFunction(selector)){return root.ready!==undefined?root.ready(selector):selector(jQuery)}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true}}})},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],targets=typeof selectors!=="string"&&jQuery(selectors);if(!rneedsContext.test(selectors)){for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){if(cur.nodeType<11&&(targets?targets.index(cur)>-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched)},index:function(elem){if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return dir(elem,"parentNode")},parentsUntil:function(elem,_i,until){return dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return dir(elem,"nextSibling")},prevAll:function(elem){return dir(elem,"previousSibling")},nextUntil:function(elem,_i,until){return dir(elem,"nextSibling",until)},prevUntil:function(elem,_i,until){return dir(elem,"previousSibling",until)},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem)},children:function(elem){return siblings(elem.firstChild)},contents:function(elem){if(elem.contentDocument!=null&&getProto(elem.contentDocument)){return elem.contentDocument}if(nodeName(elem,"template")){elem=elem.content||elem}return jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until}if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery.uniqueSort(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnothtmlwhite=/[^\x20\t\r\n\f]+/g;function createOptions(options){var object={};jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options==="string"?createOptions(options):jQuery.extend({},options);var firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){locked=locked||options.once;fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){firingIndex=list.length;memory=false}}}if(!options.memory){memory=false}firing=false;if(locked){if(memory){list=[]}else{list=""}}},self={add:function(){if(list){if(memory&&!firing){firingIndex=list.length-1;queue.push(memory)}(function add(args){jQuery.each(args,function(_,arg){if(isFunction(arg)){if(!options.unique||!self.has(arg)){list.push(arg)}}else if(arg&&arg.length&&toType(arg)!=="string"){add(arg)}})})(arguments);if(memory&&!firing){fire()}}return this},remove:function(){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);if(index<=firingIndex){firingIndex--}}});return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0},empty:function(){if(list){list=[]}return this},disable:function(){locked=queue=[];list=memory="";return this},disabled:function(){return!list},lock:function(){locked=queue=[];if(!memory&&!firing){list=memory=""}return this},locked:function(){return!!locked},fireWith:function(context,args){if(!locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire()}}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return!!fired}};return self};function Identity(v){return v}function Thrower(ex){throw ex}function adoptValue(value,resolve,reject,noValue){var method;try{if(value&&isFunction(method=value.promise)){method.call(value).done(resolve).fail(reject)}else if(value&&isFunction(method=value.then)){method.call(value,resolve,reject)}else{resolve.apply(undefined,[value].slice(noValue))}}catch(value){reject.apply(undefined,[value])}}jQuery.extend({Deferred:function(func){var tuples=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],state="pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},catch:function(fn){return promise.then(null,fn)},pipe:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(_i,tuple){var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject)}else{newDefer[tuple[0]+"With"](this,fn?[returned]:arguments)}})});fns=null}).promise()},then:function(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(depth<maxDepth){return}returned=handler.apply(that,args);if(returned===deferred.promise()){throw new TypeError("Thenable self-resolution")}then=returned&&(typeof returned==="object"||typeof returned==="function")&&returned.then;if(isFunction(then)){if(special){then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special))}else{maxDepth++;then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith))}}else{if(handler!==Identity){that=undefined;args=[returned]}(special||deferred.resolveWith)(that,args)}},process=special?mightThrow:function(){try{mightThrow()}catch(e){if(jQuery.Deferred.exceptionHook){jQuery.Deferred.exceptionHook(e,process.error)}if(depth+1>=maxDepth){if(handler!==Thrower){that=undefined;args=[e]}deferred.rejectWith(that,args)}}};if(depth){process()}else{if(jQuery.Deferred.getErrorHook){process.error=jQuery.Deferred.getErrorHook()}else if(jQuery.Deferred.getStackHook){process.error=jQuery.Deferred.getStackHook()}window.setTimeout(process)}}}return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity));tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower))}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[3-i][2].disable,tuples[3-i][3].disable,tuples[0][2].lock,tuples[0][3].lock)}list.add(tuple[3].fire);deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(singleValue){var remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=slice.call(arguments),primary=jQuery.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this;resolveValues[i]=arguments.length>1?slice.call(arguments):value;if(!--remaining){primary.resolveWith(resolveContexts,resolveValues)}}};if(remaining<=1){adoptValue(singleValue,primary.done(updateFunc(i)).resolve,primary.reject,!remaining);if(primary.state()==="pending"||isFunction(resolveValues[i]&&resolveValues[i].then)){return primary.then()}}while(i--){adoptValue(resolveValues[i],updateFunc(i),primary.reject)}return primary.promise()}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,asyncError){if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,asyncError)}};jQuery.readyException=function(error){window.setTimeout(function(){throw error})};var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){readyList.then(fn).catch(function(error){jQuery.readyException(error)});return this};jQuery.extend({isReady:false,readyWait:1,ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return}jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return}readyList.resolveWith(document,[jQuery])}});jQuery.ready.then=readyList.then;function completed(){document.removeEventListener("DOMContentLoaded",completed);window.removeEventListener("load",completed);jQuery.ready()}if(document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll){window.setTimeout(jQuery.ready)}else{document.addEventListener("DOMContentLoaded",completed);window.addEventListener("load",completed)}var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(toType(key)==="object"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw)}}else if(value!==undefined){chainable=true;if(!isFunction(value)){raw=true}if(bulk){if(raw){fn.call(elems,value);fn=null}else{bulk=fn;fn=function(elem,_key,value){return bulk.call(jQuery(elem),value)}}}if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)))}}}if(chainable){return elems}if(bulk){return fn.call(elems)}return len?fn(elems[0],key):emptyGet};var rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g;function fcamelCase(_all,letter){return letter.toUpperCase()}function camelCase(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)}var acceptData=function(owner){return owner.nodeType===1||owner.nodeType===9||!+owner.nodeType};function Data(){this.expando=jQuery.expando+Data.uid++}Data.uid=1;Data.prototype={cache:function(owner){var value=owner[this.expando];if(!value){value={};if(acceptData(owner)){if(owner.nodeType){owner[this.expando]=value}else{Object.defineProperty(owner,this.expando,{value:value,configurable:true})}}}return value},set:function(owner,data,value){var prop,cache=this.cache(owner);if(typeof data==="string"){cache[camelCase(data)]=value}else{for(prop in data){cache[camelCase(prop)]=data[prop]}}return cache},get:function(owner,key){return key===undefined?this.cache(owner):owner[this.expando]&&owner[this.expando][camelCase(key)]},access:function(owner,key,value){if(key===undefined||key&&typeof key==="string"&&value===undefined){return this.get(owner,key)}this.set(owner,key,value);return value!==undefined?value:key},remove:function(owner,key){var i,cache=owner[this.expando];if(cache===undefined){return}if(key!==undefined){if(Array.isArray(key)){key=key.map(camelCase)}else{key=camelCase(key);key=key in cache?[key]:key.match(rnothtmlwhite)||[]}i=key.length;while(i--){delete cache[key[i]]}}if(key===undefined||jQuery.isEmptyObject(cache)){if(owner.nodeType){owner[this.expando]=undefined}else{delete owner[this.expando]}}},hasData:function(owner){var cache=owner[this.expando];return cache!==undefined&&!jQuery.isEmptyObject(cache)}};var dataPriv=new Data;var dataUser=new Data;var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;function getData(data){if(data==="true"){return true}if(data==="false"){return false}if(data==="null"){return null}if(data===+data+""){return+data}if(rbrace.test(data)){return JSON.parse(data)}return data}function dataAttr(elem,key,data){var name;if(data===undefined&&elem.nodeType===1){name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=getData(data)}catch(e){}dataUser.set(elem,key,data)}else{data=undefined}}return data}jQuery.extend({hasData:function(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem)},data:function(elem,name,data){return dataUser.access(elem,name,data)},removeData:function(elem,name){dataUser.remove(elem,name)},_data:function(elem,name,data){return dataPriv.access(elem,name,data)},_removeData:function(elem,name){dataPriv.remove(elem,name)}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=camelCase(name.slice(5));dataAttr(elem,name,data[name])}}}dataPriv.set(elem,"hasDataAttrs",true)}}return data}if(typeof key==="object"){return this.each(function(){dataUser.set(this,key)})}return access(this,function(value){var data;if(elem&&value===undefined){data=dataUser.get(elem,key);if(data!==undefined){return data}data=dataAttr(elem,key);if(data!==undefined){return data}return}this.each(function(){dataUser.set(this,key,value)})},null,value,arguments.length>1,null,true)},removeData:function(key){return this.each(function(){dataUser.remove(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=dataPriv.get(elem,type);if(data){if(!queue||Array.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}if(fn){if(type==="fx"){queue.unshift("inprogress")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key])})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.length<setter){return jQuery.queue(this[0],type)}return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){if(!--count){defer.resolveWith(elements,[elements])}};if(typeof type!=="string"){obj=type;type=undefined}type=type||"fx";while(i--){tmp=dataPriv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve)}}resolve();return defer.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");var cssExpand=["Top","Right","Bottom","Left"];var documentElement=document.documentElement;var isAttached=function(elem){return jQuery.contains(elem.ownerDocument,elem)},composed={composed:true};if(documentElement.getRootNode){isAttached=function(elem){return jQuery.contains(elem.ownerDocument,elem)||elem.getRootNode(composed)===elem.ownerDocument}}var isHiddenWithinTree=function(elem,el){elem=el||elem;return elem.style.display==="none"||elem.style.display===""&&isAttached(elem)&&jQuery.css(elem,"display")==="none"};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale,maxIterations=20,currentValue=tween?function(){return tween.cur()}:function(){return jQuery.css(elem,prop,"")},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),initialInUnit=elem.nodeType&&(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){initial=initial/2;unit=unit||initialInUnit[3];initialInUnit=+initial||1;while(maxIterations--){jQuery.style(elem,prop,initialInUnit+unit);if((1-scale)*(1-(scale=currentValue()/initial||.5))<=0){maxIterations=0}initialInUnit=initialInUnit/scale}initialInUnit=initialInUnit*2;jQuery.style(elem,prop,initialInUnit+unit);valueParts=valueParts||[]}if(valueParts){initialInUnit=+initialInUnit||+initial||0;adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted}}return adjusted}var defaultDisplayMap={};function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];if(display){return display}temp=doc.body.appendChild(doc.createElement(nodeName));display=jQuery.css(temp,"display");temp.parentNode.removeChild(temp);if(display==="none"){display="block"}defaultDisplayMap[nodeName]=display;return display}function showHide(elements,show){var display,elem,values=[],index=0,length=elements.length;for(;index<length;index++){elem=elements[index];if(!elem.style){continue}display=elem.style.display;if(show){if(display==="none"){values[index]=dataPriv.get(elem,"display")||null;if(!values[index]){elem.style.display=""}}if(elem.style.display===""&&isHiddenWithinTree(elem)){values[index]=getDefaultDisplay(elem)}}else{if(display!=="none"){values[index]="none";dataPriv.set(elem,"display",display)}}}for(index=0;index<length;index++){if(values[index]!=null){elements[index].style.display=values[index]}}return elements}jQuery.fn.extend({show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide()}return this.each(function(){if(isHiddenWithinTree(this)){jQuery(this).show()}else{jQuery(this).hide()}})}});var rcheckableType=/^(?:checkbox|radio)$/i;var rtagName=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var rscriptType=/^$|^module$|\/(?:java|ecma)script/i;(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;div.innerHTML="<option></option>";support.option=!!div.lastChild})();var wrapMap={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!support.option){wrapMap.optgroup=wrapMap.option=[1,"<select multiple='multiple'>","</select>"]}function getAll(context,tag){var ret;if(typeof context.getElementsByTagName!=="undefined"){ret=context.getElementsByTagName(tag||"*")}else if(typeof context.querySelectorAll!=="undefined"){ret=context.querySelectorAll(tag||"*")}else{ret=[]}if(tag===undefined||tag&&nodeName(context,tag)){return jQuery.merge([context],ret)}return ret}function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){dataPriv.set(elems[i],"globalEval",!refElements||dataPriv.get(refElements[i],"globalEval"))}}var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,attached,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){if(toType(elem)==="object"){jQuery.merge(nodes,elem.nodeType?[elem]:elem)}else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem))}else{tmp=tmp||fragment.appendChild(context.createElement("div"));tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}}}fragment.textContent="";i=0;while(elem=nodes[i++]){if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem)}continue}attached=isAttached(elem);tmp=getAll(fragment.appendChild(elem),"script");if(attached){setGlobalEval(tmp)}if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||"")){scripts.push(elem)}}}}return fragment}var rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true}function returnFalse(){return false}function on(elem,types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined}for(type in types){on(elem,type,selector,data,types[type],one)}return elem}if(data==null&&fn==null){fn=selector;data=selector=undefined}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined}else{fn=data;data=selector;selector=undefined}}if(fn===false){fn=returnFalse}else if(!fn){return elem}if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments)};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)}return elem.each(function(){jQuery.event.add(this,types,fn,data,selector)})}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(!acceptData(elem)){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(selector){jQuery.find.matchesSelector(documentElement,selector)}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events=Object.create(null)}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined}}types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return}types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,"handle events")}},dispatch:function(nativeEvent){var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),event=jQuery.event.fix(nativeEvent),handlers=(dataPriv.get(this,"events")||Object.create(null))[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;for(i=1;i<arguments.length;i++){args[i]=arguments[i]}event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.rnamespace||handleObj.namespace===false||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&!(event.type==="click"&&event.button>=1)){for(;cur!==this;cur=cur.parentNode||this){if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i=0;i<delegateCount;i++){handleObj=handlers[i];sel=handleObj.selector+" ";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length}if(matchedSelectors[sel]){matchedHandlers.push(handleObj)}}if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers})}}}}cur=this;if(delegateCount<handlers.length){handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)})}return handlerQueue},addProp:function(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:true,configurable:true,get:isFunction(hook)?function(){if(this.originalEvent){return hook(this.originalEvent)}}:function(){if(this.originalEvent){return this.originalEvent[name]}},set:function(value){Object.defineProperty(this,name,{enumerable:true,configurable:true,writable:true,value:value})}})},fix:function(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent)},special:{load:{noBubble:true},click:{setup:function(data){var el=this||data;if(rcheckableType.test(el.type)&&el.click&&nodeName(el,"input")){leverageNative(el,"click",true)}return false},trigger:function(data){var el=this||data;if(rcheckableType.test(el.type)&&el.click&&nodeName(el,"input")){leverageNative(el,"click")}return true},_default:function(event){var target=event.target;return rcheckableType.test(target.type)&&target.click&&nodeName(target,"input")&&dataPriv.get(target,"click")||nodeName(target,"a")}},beforeunload:{postDispatch:function(event){if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result}}}}};function leverageNative(el,type,isSetup){if(!isSetup){if(dataPriv.get(el,type)===undefined){jQuery.event.add(el,type,returnTrue)}return}dataPriv.set(el,type,false);jQuery.event.add(el,type,{namespace:false,handler:function(event){var result,saved=dataPriv.get(this,type);if(event.isTrigger&1&&this[type]){if(!saved){saved=slice.call(arguments);dataPriv.set(this,type,saved);this[type]();result=dataPriv.get(this,type);dataPriv.set(this,type,false);if(saved!==result){event.stopImmediatePropagation();event.preventDefault();return result}}else if((jQuery.event.special[type]||{}).delegateType){event.stopPropagation()}}else if(saved){dataPriv.set(this,type,jQuery.event.trigger(saved[0],saved.slice(1),this));event.stopPropagation();event.isImmediatePropagationStopped=returnTrue}}})}jQuery.removeEvent=function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle)}};jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props)}if(src&&src.type){this.originalEvent=src;this.type=src.type;this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&src.returnValue===false?returnTrue:returnFalse;this.target=src.target&&src.target.nodeType===3?src.target.parentNode:src.target;this.currentTarget=src.currentTarget;this.relatedTarget=src.relatedTarget}else{this.type=src}if(props){jQuery.extend(this,props)}this.timeStamp=src&&src.timeStamp||Date.now();this[jQuery.expando]=true};jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&!this.isSimulated){e.preventDefault()}},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopPropagation()}},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopImmediatePropagation()}this.stopPropagation()}};jQuery.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,char:true,code:true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:true},jQuery.event.addProp);jQuery.each({focus:"focusin",blur:"focusout"},function(type,delegateType){function focusMappedHandler(nativeEvent){if(document.documentMode){var handle=dataPriv.get(this,"handle"),event=jQuery.event.fix(nativeEvent);event.type=nativeEvent.type==="focusin"?"focus":"blur";event.isSimulated=true;handle(nativeEvent);if(event.target===event.currentTarget){handle(event)}}else{jQuery.event.simulate(delegateType,nativeEvent.target,jQuery.event.fix(nativeEvent))}}jQuery.event.special[type]={setup:function(){var attaches;leverageNative(this,type,true);if(document.documentMode){attaches=dataPriv.get(this,delegateType);if(!attaches){this.addEventListener(delegateType,focusMappedHandler)}dataPriv.set(this,delegateType,(attaches||0)+1)}else{return false}},trigger:function(){leverageNative(this,type);return true},teardown:function(){var attaches;if(document.documentMode){attaches=dataPriv.get(this,delegateType)-1;if(!attaches){this.removeEventListener(delegateType,focusMappedHandler);dataPriv.remove(this,delegateType)}else{dataPriv.set(this,delegateType,attaches)}}else{return false}},_default:function(event){return dataPriv.get(event.target,type)},delegateType:delegateType};jQuery.event.special[delegateType]={setup:function(){var doc=this.ownerDocument||this.document||this,dataHolder=document.documentMode?this:doc,attaches=dataPriv.get(dataHolder,delegateType);if(!attaches){if(document.documentMode){this.addEventListener(delegateType,focusMappedHandler)}else{doc.addEventListener(type,focusMappedHandler,true)}}dataPriv.set(dataHolder,delegateType,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this.document||this,dataHolder=document.documentMode?this:doc,attaches=dataPriv.get(dataHolder,delegateType)-1;if(!attaches){if(document.documentMode){this.removeEventListener(delegateType,focusMappedHandler)}else{doc.removeEventListener(type,focusMappedHandler,true)}dataPriv.remove(dataHolder,delegateType)}else{dataPriv.set(dataHolder,delegateType,attaches)}}}});jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;if(!related||related!==target&&!jQuery.contains(target,related)){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix}return ret}}});jQuery.fn.extend({on:function(types,selector,data,fn){return on(this,types,selector,data,fn)},one:function(types,selector,data,fn){return on(this,types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this}if(typeof types==="object"){for(type in types){this.off(type,selector,types[type])}return this}if(selector===false||typeof selector==="function"){fn=selector;selector=undefined}if(fn===false){fn=returnFalse}return this.each(function(){jQuery.event.remove(this,types,fn,selector)})}});var rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rcleanScript=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function manipulationTarget(elem,content){if(nodeName(elem,"table")&&nodeName(content.nodeType!==11?content:content.firstChild,"tr")){return jQuery(elem).children("tbody")[0]||elem}return elem}function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem}function restoreScript(elem){if((elem.type||"").slice(0,5)==="true/"){elem.type=elem.type.slice(5)}else{elem.removeAttribute("type")}return elem}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,udataOld,udataCur,events;if(dest.nodeType!==1){return}if(dataPriv.hasData(src)){pdataOld=dataPriv.get(src);events=pdataOld.events;if(events){dataPriv.remove(dest,"handle events");for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i])}}}}if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery.extend({},udataOld);dataUser.set(dest,udataCur)}}function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();if(nodeName==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked}else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue}}function domManip(collection,args,callback,ignored){args=flat(args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],valueIsFunction=isFunction(value);if(valueIsFunction||l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value)){return collection.each(function(index){var self=collection.eq(index);if(valueIsFunction){args[0]=value.call(this,index,self.html())}domManip(self,args,callback,ignored)})}if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first||ignored){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);if(hasScripts){jQuery.merge(scripts,getAll(node,"script"))}}callback.call(collection[i],node,i)}if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;jQuery.map(scripts,restoreScript);for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src&&(node.type||"").toLowerCase()!=="module"){if(jQuery._evalUrl&&!node.noModule){jQuery._evalUrl(node.src,{nonce:node.nonce||node.getAttribute("nonce")},doc)}}else{DOMEval(node.textContent.replace(rcleanScript,""),node,doc)}}}}}}return collection}function remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node))}if(node.parentNode){if(keepData&&isAttached(node)){setGlobalEval(getAll(node,"script"))}node.parentNode.removeChild(node)}}return elem}jQuery.extend({htmlPrefilter:function(html){return html},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=isAttached(elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i])}}if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i])}}else{cloneCopyEvent(elem,clone)}}destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"))}return clone},cleanData:function(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type)}else{jQuery.removeEvent(elem,type,data.handle)}}}elem[dataPriv.expando]=undefined}if(elem[dataUser.expando]){elem[dataUser.expando]=undefined}}}}});jQuery.fn.extend({detach:function(selector){return remove(this,selector,true)},remove:function(selector){return remove(this,selector)},text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value}})},null,value,arguments.length)},append:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=""}}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML}if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++){elem=this[i]||{};if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value}}elem=0}catch(e){}}if(elem){this.empty().append(value)}},null,value,arguments.length)},replaceWith:function(){var ignored=[];return domManip(this,arguments,function(elem){var parent=this.parentNode;if(jQuery.inArray(this,ignored)<0){jQuery.cleanData(getAll(this));if(parent){parent.replaceChild(elem,this)}}},ignored)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);push.apply(ret,elems.get())}return this.pushStack(ret)}});var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var rcustomProp=/^--/;var getStyles=function(elem){var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window}return view.getComputedStyle(elem)};var swap=function(elem,options,callback){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.call(elem);for(name in options){elem.style[name]=old[name]}return ret};var rboxStyle=new RegExp(cssExpand.join("|"),"i");(function(){function computeStyleTests(){if(!div){return}container.style.cssText="position:absolute;left:-11111px;width:60px;"+"margin-top:1px;padding:0;border:0";div.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;"+"margin:auto;border:1px;padding:1px;"+"width:60%;top:1%";documentElement.appendChild(container).appendChild(div);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!=="1%";reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;div.style.right="60%";pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;div.style.position="absolute";scrollboxSizeVal=roundPixelMeasures(div.offsetWidth/3)===12;documentElement.removeChild(container);div=null}function roundPixelMeasures(measure){return Math.round(parseFloat(measure))}var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,reliableTrDimensionsVal,reliableMarginLeftVal,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return}div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";jQuery.extend(support,{boxSizingReliable:function(){computeStyleTests();return boxSizingReliableVal},pixelBoxStyles:function(){computeStyleTests();return pixelBoxStylesVal},pixelPosition:function(){computeStyleTests();return pixelPositionVal},reliableMarginLeft:function(){computeStyleTests();return reliableMarginLeftVal},scrollboxSize:function(){computeStyleTests();return scrollboxSizeVal},reliableTrDimensions:function(){var table,tr,trChild,trStyle;if(reliableTrDimensionsVal==null){table=document.createElement("table");tr=document.createElement("tr");trChild=document.createElement("div");table.style.cssText="position:absolute;left:-11111px;border-collapse:separate";tr.style.cssText="box-sizing:content-box;border:1px solid";tr.style.height="1px";trChild.style.height="9px";trChild.style.display="block";documentElement.appendChild(table).appendChild(tr).appendChild(trChild);trStyle=window.getComputedStyle(tr);reliableTrDimensionsVal=parseInt(trStyle.height,10)+parseInt(trStyle.borderTopWidth,10)+parseInt(trStyle.borderBottomWidth,10)===tr.offsetHeight;documentElement.removeChild(table)}return reliableTrDimensionsVal}})})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,isCustomProp=rcustomProp.test(name),style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name];if(isCustomProp&&ret){ret=ret.replace(rtrimCSS,"$1")||undefined}if(ret===""&&!isAttached(elem)){ret=jQuery.style(elem,name)}if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==undefined?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}var cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document.createElement("div").style,vendorProps={};function vendorPropName(name){var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name}}}function finalPropName(name){var final=jQuery.cssProps[name]||vendorProps[name];if(final){return final}if(name in emptyStyle){return name}return vendorProps[name]=vendorPropName(name)||name}var rdisplayswap=/^(none|table(?!-c[ea]).+)/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"};function setPositiveNumber(_elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value}function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){var i=dimension==="width"?1:0,extra=0,delta=0,marginDelta=0;if(box===(isBorderBox?"border":"content")){return 0}for(;i<4;i+=2){if(box==="margin"){marginDelta+=jQuery.css(elem,box+cssExpand[i],true,styles)}if(!isBorderBox){delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(box!=="padding"){delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}else{extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}else{if(box==="content"){delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles)}if(box!=="margin"){delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}}if(!isBorderBox&&computedVal>=0){delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-computedVal-delta-extra-.5))||0}return delta+marginDelta}function getWidthOrHeight(elem,dimension,extra){var styles=getStyles(elem),boxSizingNeeded=!support.boxSizingReliable()||extra,isBorderBox=boxSizingNeeded&&jQuery.css(elem,"boxSizing",false,styles)==="border-box",valueIsBorderBox=isBorderBox,val=curCSS(elem,dimension,styles),offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);if(rnumnonpx.test(val)){if(!extra){return val}val="auto"}if((!support.boxSizingReliable()&&isBorderBox||!support.reliableTrDimensions()&&nodeName(elem,"tr")||val==="auto"||!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline")&&elem.getClientRects().length){isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";valueIsBorderBox=offsetProp in elem;if(valueIsBorderBox){val=elem[offsetProp]}}val=parseFloat(val)||0;return val+boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,val)+"px"}jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret}}}},cssNumber:{animationIterationCount:true,aspectRatio:true,borderImageSlice:true,columnCount:true,flexGrow:true,flexShrink:true,fontWeight:true,gridArea:true,gridColumn:true,gridColumnEnd:true,gridColumnStart:true,gridRow:true,gridRowEnd:true,gridRowStart:true,lineHeight:true,opacity:true,order:true,orphans:true,scale:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeMiterlimit:true,strokeOpacity:true},cssProps:{},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return}var ret,type,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;if(!isCustomProp){name=finalPropName(origName)}hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);type="number"}if(value==null||value!==value){return}if(type==="number"&&!isCustomProp){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px")}if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit"}if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){if(isCustomProp){style.setProperty(name,value)}else{style[name]=value}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret}return style[name]}},css:function(elem,name,extra,styles){var val,num,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name);if(!isCustomProp){name=finalPropName(origName)}hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra)}if(val===undefined){val=curCSS(elem,name,styles)}if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name]}if(extra===""||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val}return val}});jQuery.each(["height","width"],function(_i,dimension){jQuery.cssHooks[dimension]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,"display"))&&(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,dimension,extra)}):getWidthOrHeight(elem,dimension,extra)}},set:function(elem,value,extra){var matches,styles=getStyles(elem),scrollboxSizeBuggy=!support.scrollboxSize()&&styles.position==="absolute",boxSizingNeeded=scrollboxSizeBuggy||extra,isBorderBox=boxSizingNeeded&&jQuery.css(elem,"boxSizing",false,styles)==="border-box",subtract=extra?boxModelAdjustment(elem,dimension,extra,isBorderBox,styles):0;if(isBorderBox&&scrollboxSizeBuggy){subtract-=Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-parseFloat(styles[dimension])-boxModelAdjustment(elem,dimension,"border",false,styles)-.5)}if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||"px")!=="px"){elem.style[dimension]=value;value=jQuery.css(elem,dimension)}return setPositiveNumber(elem,value,subtract)}}});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left}))+"px"}});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0]}return expanded}};if(prefix!=="margin"){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles)}return map}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop]}result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween)}else if(tween.elem.nodeType===1&&(jQuery.cssHooks[tween.prop]||tween.elem.style[finalPropName(tween.prop)]!=null)){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2},_default:"swing"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document.hidden===false&&window.requestAnimationFrame){window.requestAnimationFrame(schedule)}else{window.setTimeout(schedule,jQuery.fx.interval)}jQuery.fx.tick()}}function createFxNow(){window.setTimeout(function(){fxNow=undefined});return fxNow=Date.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type}if(includeWidth){attrs.opacity=attrs.width=type}return attrs}function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if(tween=collection[index].call(animation,prop,value)){return tween}}}function defaultPrefilter(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props||"height"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire()}}}hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire()}})})}for(prop in props){value=props[prop];if(rfxtypes.test(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true}else{continue}}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}}propTween=!jQuery.isEmptyObject(props);if(!propTween&&jQuery.isEmptyObject(orig)){return}if(isBox&&elem.nodeType===1){opts.overflow=[style.overflow,style.overflowX,style.overflowY];restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,"display")}display=jQuery.css(elem,"display");if(display==="none"){if(restoreDisplay){display=restoreDisplay}else{showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery.css(elem,"display");showHide([elem])}}if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){if(jQuery.css(elem,"float")==="none"){if(!propTween){anim.done(function(){style.display=restoreDisplay});if(restoreDisplay==null){display=style.display;restoreDisplay=display==="none"?"":display}}style.display="inline-block"}}}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2]})}propTween=false;for(prop in orig){if(!propTween){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden}}else{dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay})}if(toggle){dataShow.hidden=!hidden}if(hidden){showHide([elem],true)}anim.done(function(){if(!hidden){showHide([elem])}dataPriv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop])}})}propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0}}}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=camelCase(index);easing=specialEasing[name];value=props[index];if(Array.isArray(value)){easing=value[1];value=props[index]=value[0]}if(index!==name){props[name]=value;delete props[index]}hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing}}}else{specialEasing[name]=easing}}}function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped){return false}var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent)}deferred.notifyWith(elem,[animation,percent,remaining]);if(percent<1&&length){return remaining}if(!length){deferred.notifyWith(elem,[animation,1,0])}deferred.resolveWith(elem,[animation]);return false},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped){return this}stopped=true;for(;index<length;index++){animation.tweens[index].run(1)}if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd])}else{deferred.rejectWith(elem,[animation,gotoEnd])}return this}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=Animation.prefilters[index].call(animation,elem,props,animation.opts);if(result){if(isFunction(result.stop)){jQuery._queueHooks(animation.elem,animation.opts.queue).stop=result.stop.bind(result)}return result}}jQuery.map(props,createTween,animation);if(isFunction(animation.opts.start)){animation.opts.start.call(elem,animation)}animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation}jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween}]},tweener:function(props,callback){if(isFunction(props)){callback=props;props=["*"]}else{props=props.match(rnothtmlwhite)}var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback)}},prefilters:[defaultPrefilter],prefilter:function(callback,prepend){if(prepend){Animation.prefilters.unshift(callback)}else{Animation.prefilters.push(callback)}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!isFunction(easing)&&easing};if(jQuery.fx.off){opt.duration=0}else{if(typeof opt.duration!=="number"){if(opt.duration in jQuery.fx.speeds){opt.duration=jQuery.fx.speeds[opt.duration]}else{opt.duration=jQuery.fx.speeds._default}}}if(opt.queue==null||opt.queue===true){opt.queue="fx"}opt.old=opt.complete;opt.complete=function(){if(isFunction(opt.old)){opt.old.call(this)}if(opt.queue){jQuery.dequeue(this,opt.queue)}};return opt};jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHiddenWithinTree).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);if(empty||dataPriv.get(this,"finish")){anim.stop(true)}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd)};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined}if(clearQueue){this.queue(type||"fx",[])}return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=dataPriv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index])}}else{for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index])}}}for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1)}}if(dequeue||!gotoEnd){jQuery.dequeue(this,type)}})},finish:function(type){if(type!==false){type=type||"fx"}return this.each(function(){var index,data=dataPriv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;data.finish=true;jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true)}for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1)}}for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this)}}delete data.finish})}});jQuery.each(["toggle","show","hide"],function(_i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback)}});jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=Date.now();for(;i<timers.length;i++){timer=timers[i];if(!timer()&&timers[i]===timer){timers.splice(i--,1)}}if(!timers.length){jQuery.fx.stop()}fxNow=undefined};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);jQuery.fx.start()};jQuery.fx.interval=13;jQuery.fx.start=function(){if(inProgress){return}inProgress=true;schedule()};jQuery.fx.stop=function(){inProgress=null};jQuery.fx.speeds={slow:600,fast:200,_default:400};jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout)}})};(function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox";support.checkOn=input.value!=="";support.optSelected=opt.selected;input=document.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t"})();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute==="undefined"){return jQuery.prop(elem,name,value)}if(nType!==1||!jQuery.isXMLDoc(elem)){hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:undefined)}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return}if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}elem.setAttribute(name,value+"");return value}if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val}return value}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while(name=attrNames[i++]){elem.removeAttribute(name)}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(_i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();if(!isXML){handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return}if(nType!==1||!jQuery.isXMLDoc(elem)){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}return elem[name]=value}if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}return elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");if(tabindex){return parseInt(tabindex,10)}if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0}return-1}}},propFix:{for:"htmlFor",class:"className"}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex}return null},set:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex}}}}}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(" ")}function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||""}function classesToArray(value){if(Array.isArray(value)){return value}if(typeof value==="string"){return value.match(rnothtmlwhite)||[]}return[]}jQuery.fn.extend({addClass:function(value){var classNames,cur,curValue,className,i,finalValue;if(isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)))})}classNames=classesToArray(value);if(classNames.length){return this.each(function(){curValue=getClass(this);cur=this.nodeType===1&&" "+stripAndCollapse(curValue)+" ";if(cur){for(i=0;i<classNames.length;i++){className=classNames[i];if(cur.indexOf(" "+className+" ")<0){cur+=className+" "}}finalValue=stripAndCollapse(cur);if(curValue!==finalValue){this.setAttribute("class",finalValue)}}})}return this},removeClass:function(value){var classNames,cur,curValue,className,i,finalValue;if(isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)))})}if(!arguments.length){return this.attr("class","")}classNames=classesToArray(value);if(classNames.length){return this.each(function(){curValue=getClass(this);cur=this.nodeType===1&&" "+stripAndCollapse(curValue)+" ";if(cur){for(i=0;i<classNames.length;i++){className=classNames[i];while(cur.indexOf(" "+className+" ")>-1){cur=cur.replace(" "+className+" "," ")}}finalValue=stripAndCollapse(cur);if(curValue!==finalValue){this.setAttribute("class",finalValue)}}})}return this},toggleClass:function(value,stateVal){var classNames,className,i,self,type=typeof value,isValidValue=type==="string"||Array.isArray(value);if(isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal)})}if(typeof stateVal==="boolean"&&isValidValue){return stateVal?this.addClass(value):this.removeClass(value)}classNames=classesToArray(value);return this.each(function(){if(isValidValue){self=jQuery(this);for(i=0;i<classNames.length;i++){className=classNames[i];if(self.hasClass(className)){self.removeClass(className)}else{self.addClass(className)}}}else if(value===undefined||type==="boolean"){className=getClass(this);if(className){dataPriv.set(this,"__className__",className)}if(this.setAttribute){this.setAttribute("class",className||value===false?"":dataPriv.get(this,"__className__")||"")}}})},hasClass:function(selector){var className,elem,i=0;className=" "+selector+" ";while(elem=this[i++]){if(elem.nodeType===1&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){return true}}return false}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,valueIsFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret}ret=elem.value;if(typeof ret==="string"){return ret.replace(rreturn,"")}return ret==null?"":ret}return}valueIsFunction=isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return}if(valueIsFunction){val=value.call(this,i,jQuery(this).val())}else{val=value}if(val==null){val=""}else if(typeof val==="number"){val+=""}else if(Array.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+""})}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val}})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:stripAndCollapse(jQuery.text(elem))}},select:{get:function(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one",values=one?null:[],max=one?index+1:options.length;if(index<0){i=max}else{i=one?index:0}for(;i<max;i++){option=options[i];if((option.selected||i===index)&&!option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,"optgroup"))){value=jQuery(option).val();if(one){return value}values.push(value)}}return values},set:function(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];if(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(Array.isArray(value)){return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});var location=window.location;var nonce={guid:Date.now()};var rquery=/\?/;jQuery.parseXML=function(data){var xml,parserErrorElem;if(!data||typeof data!=="string"){return null}try{xml=(new window.DOMParser).parseFromString(data,"text/xml")}catch(e){}parserErrorElem=xml&&xml.getElementsByTagName("parsererror")[0];if(!xml||parserErrorElem){jQuery.error("Invalid XML: "+(parserErrorElem?jQuery.map(parserErrorElem.childNodes,function(el){return el.textContent}).join("\n"):data))}return xml};var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation()};jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=lastElement=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){lastElement=cur;event.type=i>1?bubbleType:special.bindType||type;handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&dataPriv.get(cur,"handle");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){if(ontype&&isFunction(elem[type])&&!isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;if(event.isPropagationStopped()){lastElement.addEventListener(type,stopPropagationCallback)}elem[type]();if(event.isPropagationStopped()){lastElement.removeEventListener(type,stopPropagationCallback)}jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem)}});jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true)}}});var rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",v,traditional,add)}})}else if(!traditional&&toType(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add)}}else{add(prefix,obj)}}jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value==null?"":value)};if(a==null){return""}if(Array.isArray(a)||a.jquery&&!jQuery.isPlainObject(a)){jQuery.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join("&")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(_i,elem){var val=jQuery(this).val();if(val==null){return null}if(Array.isArray(val)){return jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}})}return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");originAnchor.href=location.href;function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*"}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(isFunction(func)){while(dataType=dataTypes[i++]){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else if(seekingTransport){return!(selected=dataTypeOrTransport)}});return selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key]}}if(deep){jQuery.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type")}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}}}if(dataTypes[0]in responses){finalDataType=dataTypes[0]}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}if(!firstDataType){firstDataType=type}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}break}}}}if(conv!==true){if(conv&&s.throws){response=conv(response)}else{try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}}}}}return{state:"success",data:response}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders){responseHeaders={};while(match=rheaders.exec(responseHeadersString)){responseHeaders[match[1].toLowerCase()+" "]=(responseHeaders[match[1].toLowerCase()+" "]||[]).concat(match[2])}}match=responseHeaders[key.toLowerCase()+" "]}return match==null?null:match.join(", ")},getAllResponseHeaders:function(){return completed?responseHeadersString:null},setRequestHeader:function(name,value){if(completed==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type){if(completed==null){s.mimeType=type}return this},statusCode:function(map){var code;if(map){if(completed){jqXHR.always(map[jqXHR.status])}else{for(code in map){statusCode[code]=[statusCode[code],map[code]]}}}return this},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR);s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];if(s.crossDomain==null){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url;urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==urlAnchor.protocol+"//"+urlAnchor.host}catch(e){s.crossDomain=true}}if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(completed){return jqXHR}fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url.replace(rhash,"");if(!s.hasContent){uncached=s.url.slice(cacheURL.length);if(s.data&&(s.processData||typeof s.data==="string")){cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;delete s.data}if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,"$1");uncached=(rquery.test(cacheURL)?"&":"?")+"_="+nonce.guid+++uncached}s.url=cacheURL+uncached}else if(s.data&&s.processData&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){s.data=s.data.replace(r20,"+")}if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL])}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType)}jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){return jqXHR.abort()}strAbort="abort";completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s])}if(completed){return jqXHR}if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout")},s.timeout)}try{completed=false;transport.send(requestHeaders,done)}catch(e){if(completed){throw e}done(-1,e)}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(completed){return}completed=true;if(timeoutTimer){window.clearTimeout(timeoutTimer)}transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}if(!isSuccess&&jQuery.inArray("script",s.dataTypes)>-1&&jQuery.inArray("json",s.dataTypes)<0){s.converters["text script"]=function(){}}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified}}if(status===204||s.type==="HEAD"){statusText="nocontent"}else if(status===304){statusText="notmodified"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script")}});jQuery.each(["get","post"],function(_i,method){jQuery[method]=function(url,data,callback,type){if(isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url))}});jQuery.ajaxPrefilter(function(s){var i;for(i in s.headers){if(i.toLowerCase()==="content-type"){s.contentType=s.headers[i]||""}}});jQuery._evalUrl=function(url,options,doc){return jQuery.ajax({url:url,type:"GET",dataType:"script",cache:true,async:false,global:false,converters:{"text script":function(){}},dataFilter:function(response){jQuery.globalEval(response,options,doc)}})};jQuery.fn.extend({wrapAll:function(html){var wrap;if(this[0]){if(isFunction(html)){html=html.call(this[0])}wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function(html){if(isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))})}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html)}else{self.append(html)}})},wrap:function(html){var htmlIsFunction=isFunction(html);return this.each(function(i){jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html)})},unwrap:function(selector){this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes)});return this}});jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem)};jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length)};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&"withCredentials"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest"}for(i in headers){xhr.setRequestHeader(i,headers[i])}callback=function(type){return function(){if(callback){callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null;if(type==="abort"){xhr.abort()}else if(type==="error"){if(typeof xhr.status!=="number"){complete(0,"error")}else{complete(xhr.status,xhr.statusText)}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders())}}}};xhr.onload=callback();errorCallback=xhr.onerror=xhr.ontimeout=callback("error");if(xhr.onabort!==undefined){xhr.onabort=errorCallback}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window.setTimeout(function(){if(callback){errorCallback()}})}}}callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback){throw e}}},abort:function(){if(callback){callback()}}}}});jQuery.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, "+"application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false}if(s.crossDomain){s.type="GET"}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain||s.scriptAttrs){var script,callback;return{send:function(_,complete){script=jQuery("<script>").attr(s.scriptAttrs||{}).prop({charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove();callback=null;if(evt){complete(evt.type==="error"?404:200,evt.type)}});document.head.appendChild(script[0])},abort:function(){if(callback){callback()}}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce.guid++;this[callback]=true;return callback}});jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&rjsonp.test(s.data)&&"data");if(jsonProp||s.dataTypes[0]==="jsonp"){callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName)}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName}s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called")}return responseContainer[0]};s.dataTypes[0]="json";overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments};jqXHR.always(function(){if(overwritten===undefined){jQuery(window).removeProp(callbackName)}else{window[callbackName]=overwritten}if(s[callbackName]){s.jsonpCallback=originalSettings.jsonpCallback;oldCallbacks.push(callbackName)}if(responseContainer&&isFunction(overwritten)){overwritten(responseContainer[0])}responseContainer=overwritten=undefined});return"script"}});support.createHTMLDocument=function(){var body=document.implementation.createHTMLDocument("").body;body.innerHTML="<form></form><form></form>";return body.childNodes.length===2}();jQuery.parseHTML=function(data,context,keepScripts){if(typeof data!=="string"){return[]}if(typeof context==="boolean"){keepScripts=context;context=false}var base,parsed,scripts;if(!context){if(support.createHTMLDocument){context=document.implementation.createHTMLDocument("");base=context.createElement("base");base.href=document.location.href;context.head.appendChild(base)}else{context=document}}parsed=rsingleTag.exec(data);scripts=!keepScripts&&[];if(parsed){return[context.createElement(parsed[1])]}parsed=buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove()}return jQuery.merge([],parsed.childNodes)};jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(" ");if(off>-1){selector=stripAndCollapse(url.slice(off));url=url.slice(0,off)}if(isFunction(params)){callback=params;params=undefined}else if(params&&typeof params==="object"){type="POST"}if(self.length>0){jQuery.ajax({url:url,type:type||"GET",dataType:"html",data:params}).done(function(responseText){response=arguments;self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR])})})}return this};jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};if(position==="static"){elem.style.position="relative"}curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left}else{curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0}if(isFunction(options)){options=options.call(elem,i,jQuery.extend({},curOffset))}if(options.top!=null){props.top=options.top-curOffset.top+curTop}if(options.left!=null){props.left=options.left-curOffset.left+curLeft}if("using"in options){options.using.call(elem,props)}else{curElem.css(props)}}};jQuery.fn.extend({offset:function(options){if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)})}var rect,win,elem=this[0];if(!elem){return}if(!elem.getClientRects().length){return{top:0,left:0}}rect=elem.getBoundingClientRect();win=elem.ownerDocument.defaultView;return{top:rect.top+win.pageYOffset,left:rect.left+win.pageXOffset}},position:function(){if(!this[0]){return}var offsetParent,offset,doc,elem=this[0],parentOffset={top:0,left:0};if(jQuery.css(elem,"position")==="fixed"){offset=elem.getBoundingClientRect()}else{offset=this.offset();doc=elem.ownerDocument;offsetParent=elem.offsetParent||doc.documentElement;while(offsetParent&&(offsetParent===doc.body||offsetParent===doc.documentElement)&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.parentNode}if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){parentOffset=jQuery(offsetParent).offset();parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true)}}return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.offsetParent}return offsetParent||documentElement})}});jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win;if(isWindow(elem)){win=elem}else if(elem.nodeType===9){win=elem.defaultView}if(val===undefined){return win?win[prop]:elem[method]}if(win){win.scrollTo(!top?val:win.pageXOffset,top?val:win.pageYOffset)}else{elem[method]=val}},method,val,arguments.length)}});jQuery.each(["top","left"],function(_i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed}})});jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(isWindow(elem)){return funcName.indexOf("outer")===0?elem["inner"+name]:elem.document.documentElement["client"+name]}if(elem.nodeType===9){doc=elem.documentElement;return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])}return value===undefined?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:undefined,chainable)}})});jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(_i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}});jQuery.fn.extend({bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn)},hover:function(fnOver,fnOut){return this.on("mouseenter",fnOver).on("mouseleave",fnOut||fnOver)}});jQuery.each(("blur focus focusin focusout resize scroll click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup contextmenu").split(" "),function(_i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});var rtrim=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;jQuery.proxy=function(fn,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp}if(!isFunction(fn)){return undefined}args=slice.call(arguments,2);proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))};proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy};jQuery.holdReady=function(hold){if(hold){jQuery.readyWait++}else{jQuery.ready(true)}};jQuery.isArray=Array.isArray;jQuery.parseJSON=JSON.parse;jQuery.nodeName=nodeName;jQuery.isFunction=isFunction;jQuery.isWindow=isWindow;jQuery.camelCase=camelCase;jQuery.type=toType;jQuery.now=Date.now;jQuery.isNumeric=function(obj){var type=jQuery.type(obj);return(type==="number"||type==="string")&&!isNaN(obj-parseFloat(obj))};jQuery.trim=function(text){return text==null?"":(text+"").replace(rtrim,"$1")};var _jQuery=window.jQuery,_$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$}if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery}return jQuery};if(typeof noGlobal==="undefined"){window.jQuery=window.$=jQuery}return jQuery})})(jquery);var jqueryExports=jquery.exports;var $$1=getDefaultExportFromCjs(jqueryExports);let ESCanvas=function(){let self=null;const CANVAS=Symbol("CANVAS");const CONTEXT=Symbol("CONTEXT");const SHAPES=Symbol("SHAPES");const DRAWSTATUS=Symbol("DRAWSTATUS");const SHAPETYPE=Symbol("SHAPETYPE");const MAXSHAPENUMSUPPORT=Symbol("MAXSHAPENUMSUPPORT");const SHAPESTYLE=Symbol("SHAPESTYLE");const POLYGONDRAWING=Symbol("POLYGONDRAWING");const CURRENTSHAPEINFO=Symbol("CURRENTSHAPEINFO");const DRAWSHAPEMULTIONETIME=Symbol("DRAWSHAPEMULTIONETIME");const EVENTCALLBACK=Symbol("EVENTCALLBACK");function redraw(){self[CONTEXT].clearRect(0,0,self.m_iCanvasWidth,self.m_iCanvasHeight);for(let i=0,len=self[SHAPES].length;i<len;i++){self[SHAPES][i].draw()}}function addShape(oShape){let iLen=self[SHAPES].length;if(iLen<self[MAXSHAPENUMSUPPORT]){self[SHAPES].push(oShape)}}function initEvent(){let bPainting=false;let inCanvas={};let iMouseDownX=0;let iMouseDownY=0;let iTouchDownX=0;let iTouchDownY=0;let iTouchUpX=0;let iTouchUpY=0;let szStatus="draw";let oShape=null;function getChooseBoxIndex(){let iIndex=-1;for(let i=0,iLen=self[SHAPES].length;i<iLen;i++){if(self[SHAPES][i].m_bChoosed){iIndex=i;break}}return iIndex}self[CANVAS][0].oncontextmenu=function(){return false};self[CANVAS][0].onselectstart=function(){return false};self[CANVAS].unbind();self[CANVAS].bind("mousedown",function(e){if(e.button===2){if(self[POLYGONDRAWING]&&oShape){if(oShape.m_aPoint.length>=oShape.m_iMinClosed){oShape.m_bClosed=true;self[POLYGONDRAWING]=false;oShape.setPointInfo(oShape.m_aPoint);addShape(oShape);redraw();bPainting=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId)}}}else if(e.button===0){if(bPainting){if(Math.abs(e.offsetX-iMouseDownX)>2&&Math.abs(e.offsetY-iMouseDownY)>2){addShape(oShape);if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false}}if(self[EVENTCALLBACK]){let oRECT={startPos:[],endPos:[]};oRECT.startPos=[iMouseDownX,iMouseDownY];oRECT.endPos=[e.offsetX,e.offsetY];self[EVENTCALLBACK]&&self[EVENTCALLBACK](oRECT);self.clearAllShape()}oShape=null;bPainting=false;return}iMouseDownX=e.offsetX;iMouseDownY=e.offsetY;szStatus="draw";if(!self[POLYGONDRAWING]){let iBoxIndex=getChooseBoxIndex();if(iBoxIndex!==-1){if(self[SHAPES][iBoxIndex].inArc(e.offsetX,e.offsetY,5)){szStatus="stretch"}}if(szStatus!=="stretch"){for(let i=0,iLen=self[SHAPES].length;i<iLen;i++){if(self[SHAPES][i].inShape(e.offsetX,e.offsetY)&&self[SHAPES][i].m_iEditType!==2){self[SHAPES][i].m_bChoosed=true;self[SHAPES][i].getMouseDownPoints(e.offsetX,e.offsetY);szStatus="drag";window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][i].m_szType,"onChoose",self[SHAPES][i].m_szId)}else{self[SHAPES][i].m_bChoosed=false}}}if(szStatus==="drag"){self[CANVAS][0].style.cursor="move"}else{self[CANVAS][0].style.cursor="default"}if("draw"===szStatus&&1===self[SHAPES].length&&1===self[SHAPES][0].m_iRedrawMode){self.deleteRepeatPolyonById(self[SHAPES][0].m_szId);self[DRAWSTATUS]=true}if(self[DRAWSTATUS]&&!self[DRAWSHAPEMULTIONETIME]){szStatus="draw"}}if(szStatus==="draw"){if(self[DRAWSTATUS]){if(self[MAXSHAPENUMSUPPORT]<=self[SHAPES].length&&self[SHAPETYPE]!=="Grid"&&self[SHAPETYPE]!=="Point"){return}if(self[SHAPETYPE]==="Rect"){oShape=new Rect;oShape.m_szTips=self[CURRENTSHAPEINFO].szTips||""}else if(self[SHAPETYPE]==="Grid"){if(self[SHAPES].length===0){oShape=new MotionGrid;addShape(oShape)}}else if(self[SHAPETYPE]==="Polygon"){if(!self[POLYGONDRAWING]){self[POLYGONDRAWING]=true;oShape=new Polygon;oShape.m_szId=self[CURRENTSHAPEINFO].szId||"";oShape.m_szTips=self[CURRENTSHAPEINFO].szTips||"";oShape.m_iMinClosed=self[CURRENTSHAPEINFO].iMinClosed||3;oShape.m_iMaxPointNum=self[CURRENTSHAPEINFO].iMaxPointNum||11;oShape.m_iPolygonType=self[CURRENTSHAPEINFO].iPolygonType;oShape.m_szDrawColor=self[CURRENTSHAPEINFO].szDrawColor;oShape.m_szFillColor=self[CURRENTSHAPEINFO].szFillColor;oShape.m_iTranslucent=self[CURRENTSHAPEINFO].iTranslucent;oShape.m_iRedrawMode=self[CURRENTSHAPEINFO].iRedrawMode}if(oShape.m_iPolygonType===1){oShape.addPoint(iMouseDownX,iMouseDownY);if(oShape.m_aPoint.length===oShape.m_iMaxPointNum){oShape.m_bClosed=true;self[POLYGONDRAWING]=false;addShape(oShape);redraw();bPainting=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId)}}}else if(self[SHAPETYPE]==="Point"){self.clearShapeByType("Point");oShape=new Point;oShape.m_szId=self[CURRENTSHAPEINFO].szId||"";oShape.m_szDrawColor=self[CURRENTSHAPEINFO].szDrawColor;oShape.setPointInfo([[iMouseDownX,iMouseDownY]]);addShape(oShape);redraw()}}}bPainting=true}});self[CANVAS].bind("mouseenter",function(e){inCanvas={isIn:true,offsetX:e.offsetX,offsetY:e.offsetY};if(self[DRAWSTATUS]){if(bPainting){if(self[SHAPETYPE]==="Rect"){oShape.move([[iMouseDownX,iMouseDownY],[e.offsetX,e.offsetY]])}else if(self[SHAPETYPE]==="Grid"){self[SHAPES][0].move(iMouseDownX,iMouseDownY,e.offsetX,e.offsetY)}}}});self[CANVAS].bind("mouseleave",function(e){inCanvas={isIn:false,offsetX:e.offsetX,offsetY:e.offsetY}});self[CANVAS].bind("mousemove",function(e){if(!self[POLYGONDRAWING]){let iBoxIndex=getChooseBoxIndex();if(iBoxIndex>-1){if(bPainting){if(szStatus==="drag"){self[SHAPES][iBoxIndex].drag(e.offsetX,e.offsetY);window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][iBoxIndex].m_szType,"onDrag",self[SHAPES][iBoxIndex].m_szId)}else if(szStatus==="stretch"){self[SHAPES][iBoxIndex].stretch(e.offsetX,e.offsetY);window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][iBoxIndex].m_szType,"onStretch",self[SHAPES][iBoxIndex].m_szId)}}}else{if(self[DRAWSTATUS]){if(bPainting){if(inCanvas.isIn){if(self[SHAPETYPE]==="Rect"){oShape.move([[iMouseDownX,iMouseDownY],[e.offsetX,e.offsetY]])}else if(self[SHAPETYPE]==="Grid"){self[SHAPES][0].move(iMouseDownX,iMouseDownY,e.offsetX,e.offsetY)}}}}}}else{if(self[DRAWSTATUS]){if(bPainting){if(self[SHAPETYPE]==="Polygon"&&oShape.m_iPolygonType===0){oShape.m_bClosed=true}redraw();oShape.move(e.offsetX,e.offsetY,iMouseDownX,iMouseDownY)}}}});self[CANVAS].bind("mouseup",function(e){self[CANVAS][0].style.cursor="default";if(oShape!==null&&typeof oShape!=="undefined"&&szStatus==="draw"){if(self[SHAPETYPE]==="Rect"){if(Math.abs(e.offsetX-iMouseDownX)>2&&Math.abs(e.offsetY-iMouseDownY)>2){addShape(oShape);if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false}}if(self[EVENTCALLBACK]){let oRECT={startPos:[],endPos:[]};oRECT.startPos=[iMouseDownX,iMouseDownY];oRECT.endPos=[e.offsetX,e.offsetY];self[EVENTCALLBACK]&&self[EVENTCALLBACK](oRECT);self.clearAllShape()}oShape=null}else if(self[SHAPETYPE]==="Polygon"&&oShape.m_iPolygonType===0&&self[POLYGONDRAWING]){if(Math.abs(e.offsetX-iMouseDownX)>2&&Math.abs(e.offsetY-iMouseDownY)>2){addShape(oShape);self[POLYGONDRAWING]=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId)}}}if(!self[POLYGONDRAWING]){bPainting=false}else{bPainting=true}if(!self[POLYGONDRAWING]){redraw()}});self[CANVAS].bind("dblclick",function(){if(self[DRAWSTATUS]){if(self[SHAPETYPE]==="Grid"){self[SHAPES][0].m_szGridMap="fffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffc";redraw()}}});self[CANVAS].bind("touchstart",function(e){const viewRect=e.target.getBoundingClientRect();console.log("开始触摸:",e,viewRect);if(e.touches&&e.touches[0]){iTouchDownX=parseInt(e.touches[0].clientX-viewRect.x)>0?parseInt(e.touches[0].clientX-viewRect.x):0;iTouchDownY=parseInt(e.touches[0].clientY-viewRect.y)>0?parseInt(e.touches[0].clientY-viewRect.y):0;szStatus="draw";if(self[DRAWSTATUS]){if(self[MAXSHAPENUMSUPPORT]<=self[SHAPES].length&&self[SHAPETYPE]!=="Grid"&&self[SHAPETYPE]!=="Point"){return}if(self[SHAPETYPE]==="Rect"){oShape=new Rect;oShape.m_szTips=self[CURRENTSHAPEINFO].szTips||""}else if(self[SHAPETYPE]==="Grid"){if(self[SHAPES].length===0){oShape=new MotionGrid;addShape(oShape)}}else if(self[SHAPETYPE]==="Polygon"){if(!self[POLYGONDRAWING]){self[POLYGONDRAWING]=true;oShape=new Polygon;oShape.m_szId=self[CURRENTSHAPEINFO].szId||"";oShape.m_szTips=self[CURRENTSHAPEINFO].szTips||"";oShape.m_iMinClosed=self[CURRENTSHAPEINFO].iMinClosed||3;oShape.m_iMaxPointNum=self[CURRENTSHAPEINFO].iMaxPointNum||11;oShape.m_iPolygonType=self[CURRENTSHAPEINFO].iPolygonType;oShape.m_szDrawColor=self[CURRENTSHAPEINFO].szDrawColor;oShape.m_szFillColor=self[CURRENTSHAPEINFO].szFillColor;oShape.m_iTranslucent=self[CURRENTSHAPEINFO].iTranslucent;oShape.m_iRedrawMode=self[CURRENTSHAPEINFO].iRedrawMode}if(oShape.m_iPolygonType===1){oShape.addPoint(iTouchDownX,iTouchDownY);if(oShape.m_aPoint.length===oShape.m_iMaxPointNum){oShape.m_bClosed=true;self[POLYGONDRAWING]=false;addShape(oShape);redraw();bPainting=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId)}}}else if(self[SHAPETYPE]==="Point"){self.clearShapeByType("Point");oShape=new Point;oShape.m_szId=self[CURRENTSHAPEINFO].szId||"";oShape.m_szDrawColor=self[CURRENTSHAPEINFO].szDrawColor;oShape.setPointInfo([[iTouchDownX,iTouchDownY]]);addShape(oShape);redraw()}}bPainting=true}});self[CANVAS].bind("touchmove",function(e){const viewRect=e.target.getBoundingClientRect();if(e.touches&&e.touches[0]){iTouchUpX=parseInt(e.touches[0].clientX-viewRect.x)>0?parseInt(e.touches[0].clientX-viewRect.x):0;iTouchUpY=parseInt(e.touches[0].clientY-viewRect.y)>0?parseInt(e.touches[0].clientY-viewRect.y):0;if(!self[POLYGONDRAWING]){let iBoxIndex=getChooseBoxIndex();if(iBoxIndex>-1){if(bPainting){if(szStatus==="drag"){self[SHAPES][iBoxIndex].drag(iTouchUpX,iTouchUpY);window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][iBoxIndex].m_szType,"onDrag",self[SHAPES][iBoxIndex].m_szId)}else if(szStatus==="stretch"){self[SHAPES][iBoxIndex].stretch(iTouchUpX,iTouchUpY);window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][iBoxIndex].m_szType,"onStretch",self[SHAPES][iBoxIndex].m_szId)}}}else{if(self[DRAWSTATUS]){if(bPainting){if(self[SHAPETYPE]==="Rect"){oShape.move([[iTouchDownX*2,iTouchDownY*2],[iTouchUpX*2,iTouchUpY*2]])}else if(self[SHAPETYPE]==="Grid"){self[SHAPES][0].move(iTouchDownX,iTouchDownY,iTouchUpX,iTouchUpY)}}}}}else{if(self[DRAWSTATUS]){if(bPainting){if(self[SHAPETYPE]==="Polygon"&&oShape.m_iPolygonType===0){oShape.m_bClosed=true}redraw();oShape.move(e.touches[0].offsetX,e.touches[0].offsetY,iTouchDownX,iTouchDownY)}}}}});self[CANVAS].bind("touchend",function(e){if(!(iTouchDownX==iTouchUpX&&iTouchDownY==iTouchUpY)){self[CANVAS][0].style.cursor="default";if(oShape!==null&&typeof oShape!=="undefined"&&szStatus==="draw"){if(self[SHAPETYPE]==="Rect"){if(Math.abs(iTouchUpX-iTouchDownX)>2&&Math.abs(iTouchUpY-iTouchDownY)>2){addShape(oShape);if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false}}if(self[EVENTCALLBACK]&&Math.abs(iTouchUpX-iTouchDownX)>15&&Math.abs(iTouchUpY-iTouchDownY)>15){let oRECT={startPos:[],endPos:[]};oRECT.startPos=[iTouchDownX,iTouchDownY];oRECT.endPos=[iTouchUpX,iTouchUpY];self[EVENTCALLBACK]&&self[EVENTCALLBACK](oRECT)}self.clearAllShape();oShape=null}else if(self[SHAPETYPE]==="Polygon"&&oShape.m_iPolygonType===0&&self[POLYGONDRAWING]){if(Math.abs(iTouchUpX-iTouchDownX)>2&&Math.abs(iTouchUpY-iTouchDownY)>2){addShape(oShape);self[POLYGONDRAWING]=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId)}}}if(!self[POLYGONDRAWING]){bPainting=false}else{bPainting=true}if(!self[POLYGONDRAWING]){redraw()}}})}class Shape{constructor(){this.m_szId="";this.m_aPoint=[];this.m_bChoosed=false;this.m_szDrawColor=self[SHAPESTYLE].szDrawColor;this.m_szFillColor=self[SHAPESTYLE].szFillColor;this.m_iTranslucent=self[SHAPESTYLE].iTranslucent;this.m_iIndexChoosePoint=-1;this.m_iDriftStartX=0;this.m_iDriftStartY=0;this.m_oEdgePoints={top:{x:0,y:0},left:{x:0,y:0},right:{x:0,y:0},bottom:{x:0,y:0}};this.m_szTips="";this.m_iEditType=0;this.m_iMinClosed=3;this.m_iMaxPointNum=11;this.m_bClosed=false;this.m_iRedrawMode=0}draw(){}drag(iPointX,iPointY){if(this.m_iEditType!==2){let iLength=this.m_aPoint.length;let i=0;for(i=0;i<iLength;i++){if(this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX>self.m_iCanvasWidth||this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY>self.m_iCanvasHeight||this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX<0||this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY<0){this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;return}}for(i=0;i<iLength;i++){this.m_aPoint[i][0]=this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX;this.m_aPoint[i][1]=this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY}this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;this.setPointInfo(this.m_aPoint);redraw()}}stretch(iPointX,iPointY){if(this.m_iEditType===0){if(this.m_iIndexChoosePoint!==-1){this.m_aPoint[this.m_iIndexChoosePoint][0]=iPointX;this.m_aPoint[this.m_iIndexChoosePoint][1]=iPointY}this.setPointInfo(this.m_aPoint);redraw()}}inShape(iPointX,iPointY){let bRet=false;let iLen=this.m_aPoint.length;for(let i=0,j=iLen-1;i<iLen;j=i++){if(this.m_aPoint[i][1]>iPointY!==this.m_aPoint[j][1]>iPointY&&iPointX<(this.m_aPoint[j][0]-this.m_aPoint[i][0])*(iPointY-this.m_aPoint[i][1])/(this.m_aPoint[j][1]-this.m_aPoint[i][1])+this.m_aPoint[i][0]){bRet=!bRet}}return bRet}inArc(iPointX,iPointY,iRadius){let bRet=false;for(let i=0,iLen=this.m_aPoint.length;i<iLen;i++){let iDistance=Math.sqrt((iPointX-this.m_aPoint[i][0])*(iPointX-this.m_aPoint[i][0])+(iPointY-this.m_aPoint[i][1])*(iPointY-this.m_aPoint[i][1]));if(iDistance<iRadius){bRet=true;this.m_iIndexChoosePoint=i;break}}return bRet}getMouseDownPoints(iMouseDownX,iMouseDownY){this.m_iDriftStartX=iMouseDownX;this.m_iDriftStartY=iMouseDownY}getPointInfo(){return this.m_aPoint}setPointInfo(aPoint){if(aPoint!==null&&typeof aPoint!=="undefined"&&aPoint.length>0){this.m_aPoint=aPoint;this.setEdgePoints(aPoint)}}addPoint(iMouseDownX,iMouseDownY){if(this.m_aPoint.length<this.m_iMaxPointNum){this.m_aPoint.push([iMouseDownX,iMouseDownY])}if(this.m_aPoint.length===this.m_iMaxPointNum){this.setPointInfo(this.m_aPoint)}}setEdgePoints(aPoint){for(let i=0,iLen=aPoint.length;i<iLen;i++){if(i===0){this.m_oEdgePoints.top.x=aPoint[i][0];this.m_oEdgePoints.top.y=aPoint[i][1];this.m_oEdgePoints.left.x=aPoint[i][0];this.m_oEdgePoints.left.y=aPoint[i][1];this.m_oEdgePoints.right.x=aPoint[i][0];this.m_oEdgePoints.right.y=aPoint[i][1];this.m_oEdgePoints.bottom.x=aPoint[i][0];this.m_oEdgePoints.bottom.y=aPoint[i][1]}else{if(aPoint[i][1]<this.m_oEdgePoints.top.y){this.m_oEdgePoints.top.x=aPoint[i][0];this.m_oEdgePoints.top.y=aPoint[i][1]}if(aPoint[i][0]>this.m_oEdgePoints.right.x){this.m_oEdgePoints.right.x=aPoint[i][0];this.m_oEdgePoints.right.y=aPoint[i][1]}if(aPoint[i][1]>this.m_oEdgePoints.bottom.y){this.m_oEdgePoints.bottom.x=aPoint[i][0];this.m_oEdgePoints.bottom.y=aPoint[i][1]}if(aPoint[i][0]<this.m_oEdgePoints.left.x){this.m_oEdgePoints.left.x=aPoint[i][0];this.m_oEdgePoints.left.y=aPoint[i][1]}}}}}class Rect extends Shape{constructor(){super();this.m_szType="Rect"}setPointInfo(aPoint){if(aPoint!==null&&typeof aPoint!=="undefined"){let iStartX=aPoint[0][0];let iStartY=aPoint[0][1];let iEndX=aPoint[0][0];let iEndY=aPoint[0][1];for(let i=0,iLen=aPoint.length;i<iLen;i++){if(iStartX>aPoint[i][0]){iStartX=aPoint[i][0]}if(iStartY>aPoint[i][1]){iStartY=aPoint[i][1]}if(iEndX<aPoint[i][0]){iEndX=aPoint[i][0]}if(iEndY<aPoint[i][1]){iEndY=aPoint[i][1]}}this.m_aPoint=[[iStartX,iStartY],[iEndX,iStartY],[iEndX,iEndY],[iStartX,iEndY]]}}draw(){self[CONTEXT].fillStyle=this.m_szFillColor;self[CONTEXT].strokeStyle=this.m_szDrawColor;let iStartX=this.m_aPoint[0][0];let iStartY=this.m_aPoint[0][1];let iWidth=this.m_aPoint[2][0]-iStartX;let iHeight=this.m_aPoint[2][1]-iStartY;self[CONTEXT].globalAlpha=this.m_iTranslucent;self[CONTEXT].fillRect(iStartX,iStartY,iWidth,iHeight);self[CONTEXT].globalAlpha=1;self[CONTEXT].fillText(this.m_szTips,(iStartX+this.m_aPoint[2][0])/2,(iStartY+this.m_aPoint[2][1])/2);if(this.m_bChoosed){let iHalfWidth=Math.round(iWidth/2);let iHalfHeight=Math.round(iHeight/2);if(this.m_iEditType===0){let aPointX=[iStartX,iStartX+iHalfWidth,iStartX+iWidth,iStartX,iStartX+iWidth,iStartX,iStartX+iHalfWidth,iStartX+iWidth];let aPointY=[iStartY,iStartY,iStartY,iStartY+iHalfHeight,iStartY+iHalfHeight,iStartY+iHeight,iStartY+iHeight,iStartY+iHeight];for(let i=0;i<8;i++){self[CONTEXT].beginPath();self[CONTEXT].arc(aPointX[i],aPointY[i],3,0,360,false);self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].closePath();self[CONTEXT].fill()}}}self[CONTEXT].strokeRect(iStartX,iStartY,iWidth,iHeight)}stretch(iPointX,iPointY){if(this.m_iEditType===0){if(this.m_iIndexChoosePoint===0){if(iPointX<this.m_aPoint[2][0]&&iPointY<this.m_aPoint[2][1]){this.m_aPoint[0][0]=iPointX;this.m_aPoint[0][1]=iPointY;this.m_aPoint[3][0]=iPointX;this.m_aPoint[1][1]=iPointY}}else if(this.m_iIndexChoosePoint===1){if(iPointY<this.m_aPoint[2][1]){this.m_aPoint[0][1]=iPointY;this.m_aPoint[1][1]=iPointY}}else if(this.m_iIndexChoosePoint===2){if(iPointX>this.m_aPoint[3][0]&&iPointY<this.m_aPoint[3][1]){this.m_aPoint[1][0]=iPointX;this.m_aPoint[1][1]=iPointY;this.m_aPoint[2][0]=iPointX;this.m_aPoint[0][1]=iPointY}}else if(this.m_iIndexChoosePoint===3){if(iPointX<this.m_aPoint[2][0]){this.m_aPoint[0][0]=iPointX;this.m_aPoint[3][0]=iPointX}}else if(this.m_iIndexChoosePoint===4){if(iPointX>this.m_aPoint[0][0]){this.m_aPoint[1][0]=iPointX;this.m_aPoint[2][0]=iPointX}}else if(this.m_iIndexChoosePoint===5){if(iPointX<this.m_aPoint[1][0]&&iPointY>this.m_aPoint[1][1]){this.m_aPoint[3][0]=iPointX;this.m_aPoint[3][1]=iPointY;this.m_aPoint[0][0]=iPointX;this.m_aPoint[2][1]=iPointY}}else if(this.m_iIndexChoosePoint===6){if(iPointY>this.m_aPoint[1][1]){this.m_aPoint[2][1]=iPointY;this.m_aPoint[3][1]=iPointY}}else if(this.m_iIndexChoosePoint===7){if(iPointX>this.m_aPoint[0][0]&&iPointY>this.m_aPoint[0][1]){this.m_aPoint[2][0]=iPointX;this.m_aPoint[2][1]=iPointY;this.m_aPoint[1][0]=iPointX;this.m_aPoint[3][1]=iPointY}}redraw()}}move(aPoint){redraw();this.m_bChoosed=true;let iStartX=aPoint[0][0];let iStartY=aPoint[0][1];let iEndX=aPoint[1][0];let iEndY=aPoint[1][1];this.setPointInfo([[iStartX,iStartY],[iEndX,iStartY],[iEndX,iEndY],[iStartX,iEndY]]);this.draw()}inArc(iPointX,iPointY,iRadius){let iStartX=this.m_aPoint[0][0];let iStartY=this.m_aPoint[0][1];let iWidth=this.m_aPoint[2][0]-iStartX;let iHeight=this.m_aPoint[2][1]-iStartY;let iHalfWidth=Math.round(iWidth/2);let iHalfHeight=Math.round(iHeight/2);let aPointX=[iStartX,iStartX+iHalfWidth,iStartX+iWidth,iStartX,iStartX+iWidth,iStartX,iStartX+iHalfWidth,iStartX+iWidth];let aPointY=[iStartY,iStartY,iStartY,iStartY+iHalfHeight,iStartY+iHalfHeight,iStartY+iHeight,iStartY+iHeight,iStartY+iHeight];for(let i=0;i<8;i++){let iDistance=Math.sqrt((iPointX-aPointX[i])*(iPointX-aPointX[i])+(iPointY-aPointY[i])*(iPointY-aPointY[i]));if(iDistance<iRadius){this.m_iIndexChoosePoint=i;return true}}return false}}class RectOSD extends Shape{constructor(szText,szEnabled){super();this.m_szType="RectOSD";this.m_szOSDType="overlay-date";this.m_szText=szText||"";this.m_szEnabled=szEnabled||"";this.m_szDateStyle="";this.m_szClockType="";this.m_szDisplayWeek="";this.m_szId="";this.m_szAlignment="0"}draw(){if(this.m_szEnabled==="true"){let iStartX=this.m_aPoint[0][0];let iStartY=this.m_aPoint[0][1];let iWidth=this.m_aPoint[2][0]-iStartX;let iHeight=this.m_aPoint[2][1]-iStartY;self[CONTEXT].beginPath();self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;self[CONTEXT].rect(iStartX,iStartY,iWidth,iHeight);self[CONTEXT].font="15px serif";self[CONTEXT].strokeText(this.m_szText,iStartX,iStartY+15);self[CONTEXT].stroke()}}drag(iPointX,iPointY){let iLength=this.m_aPoint.length;let i=0;if("0"===this.m_szAlignment){for(i=0;i<iLength;i++){if(this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY>self.m_iCanvasHeight||this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX<0||this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY<0){this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;return}}for(i=0;i<iLength;i++){this.m_aPoint[i][0]=this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX;this.m_aPoint[i][1]=this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY}}else if("1"===this.m_szAlignment||"2"===this.m_szAlignment){for(i=0;i<iLength;i++){if(this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY>self.m_iCanvasHeight||this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY<0){this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;return}}for(i=0;i<iLength;i++){this.m_aPoint[i][1]=this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY}}this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;this.setEdgePoints(this.m_aPoint);redraw()}stretch(){}}class MotionGrid extends Shape{constructor(){super();this.m_szType="Grid";this.m_iGridColNum=22;this.m_iGridRowNum=18;this.m_szGridMap="";this.m_aAddGridMap=[]}draw(){let iWidth=self.m_iCanvasWidth/this.m_iGridColNum;let iHeight=self.m_iCanvasHeight/this.m_iGridRowNum;let szResultGridMap="";for(let i=0;i<this.m_iGridRowNum;i++){let szGridRowMap=this.m_szGridMap.substring(i*6,i*6+6);let aBinaryMap=parseInt("f"+szGridRowMap,16).toString(2).split("").slice(4);let szResultGridMapRow="";for(let j=0;j<this.m_iGridColNum;j++){let szResultGridMapRowCol="";if(aBinaryMap[j]==="1"){self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;self[CONTEXT].strokeRect(iWidth*j,iHeight*i,iWidth,iHeight);szResultGridMapRowCol="1"}else{szResultGridMapRowCol="0"}if(this.m_aAddGridMap.length){if(this.m_aAddGridMap[i][j]===1){self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].strokeRect(iWidth*j,iHeight*i,iWidth,iHeight);szResultGridMapRowCol="1"}}szResultGridMapRow+=szResultGridMapRowCol}szResultGridMap+=parseInt("1111"+szResultGridMapRow+"00",2).toString(16).substring(1)}this.m_szGridMap=szResultGridMap}move(iMouseDownX,iMouseDownY,iMouseMoveX,iMouseMoveY){let iWidth=self.m_iCanvasWidth/this.m_iGridColNum;let iHeight=self.m_iCanvasHeight/this.m_iGridRowNum;let iStartX=Math.floor(iMouseDownX/iWidth);let iStartY=Math.floor(iMouseDownY/iHeight);let iRectColNum=Math.floor(Math.abs(iMouseMoveX-iMouseDownX)/iWidth);let iRectRowNum=Math.floor(Math.abs(iMouseMoveY-iMouseDownY)/iHeight);let iCoefficientX=1;let iCoefficientY=1;if(iMouseMoveX-iMouseDownX>0){iCoefficientX=1}else{iCoefficientX=-1}if(iMouseMoveY-iMouseDownY>0){iCoefficientY=1}else{iCoefficientY=-1}let aAddGridMap=[];for(let i=0;i<this.m_iGridRowNum;i++){aAddGridMap[i]=[];for(let j=0;j<this.m_iGridColNum;j++){if(iCoefficientX===1){if(iCoefficientY===1){if(i>=iStartY&&i<=iStartY+iRectRowNum&&j>=iStartX&&j<=iStartX+iRectColNum){aAddGridMap[i][j]=1}else{aAddGridMap[i][j]=0}}else{if(i<=iStartY&&i>=iStartY-iRectRowNum&&j>=iStartX&&j<=iStartX+iRectColNum){aAddGridMap[i][j]=1}else{aAddGridMap[i][j]=0}}}else{if(iCoefficientY===1){if(i>=iStartY&&i<=iStartY+iRectRowNum&&j<=iStartX&&j>=iStartX-iRectColNum){aAddGridMap[i][j]=1}else{aAddGridMap[i][j]=0}}else{if(i<=iStartY&&i>=iStartY-iRectRowNum&&j<=iStartX&&j>=iStartX-iRectColNum){aAddGridMap[i][j]=1}else{aAddGridMap[i][j]=0}}}}}this.m_aAddGridMap=aAddGridMap;this.draw()}}class Line extends Shape{constructor(){super();this.m_szType="Line";this.m_iLineType=0;this.m_iDirection=0;this.m_iArrowType=0;this.m_aCrossArrowPoint=[]}draw(){if(this.m_iLineType===0){this.drawNormalLine()}else if(this.m_iLineType===1){this.drawArrowLine()}else if(this.m_iLineType===3){this.drawCrossLine()}else if(this.m_iLineType===4){this.drawLineCount()}}drawNormalLine(){self[CONTEXT].globalAlpha=1;if(this.m_aPoint.length>0){self[CONTEXT].beginPath();self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].lineWidth=2;self[CONTEXT].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(let i=1,iLen=this.m_aPoint.length;i<iLen;i++){self[CONTEXT].lineTo(this.m_aPoint[i][0],this.m_aPoint[i][1])}self[CONTEXT].stroke();if(this.m_bChoosed){for(let i=0,iLen=this.m_aPoint.length;i<iLen;i++){self[CONTEXT].beginPath();self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].arc(this.m_aPoint[i][0],this.m_aPoint[i][1],3,0,Math.PI*2,true);self[CONTEXT].closePath();self[CONTEXT].fill()}}if(this.m_szTips!==""){self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].fillText(this.m_szTips,this.m_aPoint[0][0]+10,this.m_aPoint[0][1]+4)}}}drawArrowLine(iType,fromX,fromY,toX,toY,theta,headlen,width){theta=typeof theta!=="undefined"?theta:30;headlen=typeof headlen!=="undefined"?headlen:10;width=typeof width!=="undefined"?width:1;let angle=Math.atan2(fromY-toY,fromX-toX)*180/Math.PI;let angle1=(angle+theta)*Math.PI/180;let angle2=(angle-theta)*Math.PI/180;let topX=headlen*Math.cos(angle1);let topY=headlen*Math.sin(angle1);let botX=headlen*Math.cos(angle2);let botY=headlen*Math.sin(angle2);self[CONTEXT].save();self[CONTEXT].beginPath();let arrowX=fromX-topX;let arrowY=fromY-topY;self[CONTEXT].moveTo(arrowX,arrowY);self[CONTEXT].lineTo(fromX,fromY);arrowX=fromX-botX;arrowY=fromY-botY;self[CONTEXT].lineTo(arrowX,arrowY);self[CONTEXT].moveTo(fromX,fromY);self[CONTEXT].lineTo(toX,toY);if(iType===1){arrowX=toX+topX;arrowY=toY+topY;self[CONTEXT].moveTo(arrowX,arrowY);self[CONTEXT].lineTo(toX,toY);arrowX=toX+botX;arrowY=toY+botY;self[CONTEXT].lineTo(arrowX,arrowY)}self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].lineWidth=width;self[CONTEXT].stroke();self[CONTEXT].restore()}drawCrossLine(){this.drawNormalLine();let iMiddleX=(this.m_aPoint[0][0]+this.m_aPoint[1][0])/2;let iMiddleY=(this.m_aPoint[0][1]+this.m_aPoint[1][1])/2;let angle=Math.atan2(iMiddleY-this.m_aPoint[0][1],iMiddleX-this.m_aPoint[0][0])*180/Math.PI;let angle1=(angle+90)*Math.PI/180;let angle2=(angle-90)*Math.PI/180;let topX=25*Math.cos(angle1);let topY=25*Math.sin(angle1);let botX=25*Math.cos(angle2);let botY=25*Math.sin(angle2);let arrowX=0;let arrowY=0;arrowX=iMiddleX-topX;arrowY=iMiddleY-topY;let iTextPositionA=0;let iTextPositionB=0;if(this.m_iDirection===0){iTextPositionA=-10;iTextPositionB=-15}else if(this.m_iDirection===1){iTextPositionA=10;iTextPositionB=10}else{iTextPositionA=10;iTextPositionB=-15}if(this.m_iDirection!==0){this.drawArrowLine(0,arrowX,arrowY,iMiddleX,iMiddleY)}self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].font="8px";self[CONTEXT].strokeText("A",arrowX+iTextPositionA,arrowY+4);arrowX=iMiddleX-botX;arrowY=iMiddleY-botY;if(this.m_iDirection!==1){this.drawArrowLine(0,arrowX,arrowY,iMiddleX,iMiddleY)}self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].font="8px";self[CONTEXT].strokeText("B",arrowX+iTextPositionB,arrowY+4)}drawLineCount(){this.drawNormalLine();let iMiddleX=(this.m_aPoint[0][0]+this.m_aPoint[1][0])/2;let iMiddleY=(this.m_aPoint[0][1]+this.m_aPoint[1][1])/2;let angle=Math.atan2(iMiddleY-this.m_aPoint[0][1],iMiddleX-this.m_aPoint[0][0])*180/Math.PI;let angle1=(angle+90)*Math.PI/180;let angle2=(angle-90)*Math.PI/180;let topX=25*Math.cos(angle1);let topY=25*Math.sin(angle1);let botX=25*Math.cos(angle2);let botY=25*Math.sin(angle2);let arrowX=0;let arrowY=0;arrowX=iMiddleX-topX;arrowY=iMiddleY-topY;if(this.m_iArrowType===1){arrowX=iMiddleX-botX;arrowY=iMiddleY-botY;this.drawArrowLine(0,arrowX,arrowY,iMiddleX,iMiddleY)}else if(this.m_iArrowType===0){this.drawArrowLine(0,arrowX,arrowY,iMiddleX,iMiddleY)}this.m_aCrossArrowPoint=[[iMiddleX,iMiddleY],[arrowX,arrowY]]}inShape(iPointX,iPointY){let bRet=false;for(let i=0,iLen=this.m_aPoint.length-1;i<iLen;i++){let iLineLen=Math.sqrt((this.m_aPoint[i+1][0]-this.m_aPoint[i][0])*(this.m_aPoint[i+1][0]-this.m_aPoint[i][0])+(this.m_aPoint[i+1][1]-this.m_aPoint[i][1])*(this.m_aPoint[i+1][1]-this.m_aPoint[i][1]));let iLineLen1=Math.sqrt((iPointX-this.m_aPoint[i][0])*(iPointX-this.m_aPoint[i][0])+(iPointY-this.m_aPoint[i][1])*(iPointY-this.m_aPoint[i][1]));let iLineLen2=Math.sqrt((iPointX-this.m_aPoint[i+1][0])*(iPointX-this.m_aPoint[i+1][0])+(iPointY-this.m_aPoint[i+1][1])*(iPointY-this.m_aPoint[i+1][1]));if(iLineLen1+iLineLen2-iLineLen<1){bRet=true}}return bRet}}class Polygon extends Shape{constructor(){super();this.m_szType="Polygon";this.m_iPolygonType=1}setPointInfo(aPoint){if(aPoint!==null&&typeof aPoint!=="undefined"){if(this.m_iPolygonType===0){let iStartX=aPoint[0][0];let iStartY=aPoint[0][1];let iEndX=aPoint[0][0];let iEndY=aPoint[0][1];for(let i=0,iLen=aPoint.length;i<iLen;i++){if(iStartX>aPoint[i][0]){iStartX=aPoint[i][0]}if(iStartY>aPoint[i][1]){iStartY=aPoint[i][1]}if(iEndX<aPoint[i][0]){iEndX=aPoint[i][0]}if(iEndY<aPoint[i][1]){iEndY=aPoint[i][1]}}this.m_aPoint=[[iStartX,iStartY],[iEndX,iStartY],[iEndX,iEndY],[iStartX,iEndY]]}else if(this.m_iPolygonType===1){this.m_aPoint=aPoint}else{this.m_aPoint=aPoint}this.setEdgePoints(aPoint)}}draw(){if(this.m_aPoint.length>0){self[CONTEXT].fillStyle=this.m_szFillColor;self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;let i=0;let iLen=0;if(this.m_bChoosed){for(i=0,iLen=this.m_aPoint.length;i<iLen;i++){self[CONTEXT].beginPath();self[CONTEXT].arc(this.m_aPoint[i][0],this.m_aPoint[i][1],3,0,360,false);self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].closePath();self[CONTEXT].fill()}}self[CONTEXT].beginPath();self[CONTEXT].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(i=0,iLen=this.m_aPoint.length;i<iLen;i++){if(i!==0){self[CONTEXT].lineTo(this.m_aPoint[i][0],this.m_aPoint[i][1])}}self[CONTEXT].stroke();if(this.m_bClosed){self[CONTEXT].fillText(this.m_szTips,(this.m_oEdgePoints.left.x+this.m_oEdgePoints.right.x)/2,(this.m_oEdgePoints.top.y+this.m_oEdgePoints.bottom.y)/2);self[CONTEXT].closePath();self[CONTEXT].stroke();self[CONTEXT].globalAlpha=this.m_iTranslucent;self[CONTEXT].fill()}}}move(iMouseMoveX,iMouseMoveY,iMouseDownX,iMouseDownY){if(this.m_iPolygonType===1){if(this.m_aPoint.length<this.m_iMaxPointNum&&this.m_aPoint.length>0){self[CONTEXT].fillStyle=this.m_szFillColor;self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;let i=0;let iLen=0;for(i=0,iLen=this.m_aPoint.length;i<iLen;i++){self[CONTEXT].beginPath();self[CONTEXT].arc(this.m_aPoint[i][0],this.m_aPoint[i][1],3,0,360,false);self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].closePath();self[CONTEXT].fill()}self[CONTEXT].beginPath();self[CONTEXT].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(i=0,iLen=this.m_aPoint.length;i<iLen;i++){if(i!==0){self[CONTEXT].lineTo(this.m_aPoint[i][0],this.m_aPoint[i][1])}}self[CONTEXT].lineTo(iMouseMoveX,iMouseMoveY);self[CONTEXT].closePath();self[CONTEXT].stroke()}}else if(this.m_iPolygonType===0){this.m_bChoosed=true;let iStartX=iMouseDownX;let iStartY=iMouseDownY;let iEndX=iMouseMoveX;let iEndY=iMouseMoveY;this.setPointInfo([[iStartX,iStartY],[iEndX,iStartY],[iEndX,iEndY],[iStartX,iEndY]]);this.draw()}}stretch(iPointX,iPointY){if(this.m_iEditType===0){if(this.m_iPolygonType===1){if(this.m_iIndexChoosePoint!==-1){this.m_aPoint[this.m_iIndexChoosePoint][0]=iPointX;this.m_aPoint[this.m_iIndexChoosePoint][1]=iPointY}}else{if(this.m_iIndexChoosePoint===0){if(iPointX<this.m_aPoint[2][0]&&iPointY<this.m_aPoint[2][1]){this.m_aPoint[0][0]=iPointX;this.m_aPoint[0][1]=iPointY;this.m_aPoint[3][0]=iPointX;this.m_aPoint[1][1]=iPointY}}else if(this.m_iIndexChoosePoint===1){if(iPointX>this.m_aPoint[3][0]&&iPointY<this.m_aPoint[3][1]){this.m_aPoint[1][0]=iPointX;this.m_aPoint[1][1]=iPointY;this.m_aPoint[2][0]=iPointX;this.m_aPoint[0][1]=iPointY}}else if(this.m_iIndexChoosePoint===2){if(iPointX>this.m_aPoint[0][0]&&iPointY>this.m_aPoint[0][1]){this.m_aPoint[2][0]=iPointX;this.m_aPoint[2][1]=iPointY;this.m_aPoint[1][0]=iPointX;this.m_aPoint[3][1]=iPointY}}else if(this.m_iIndexChoosePoint===3){if(iPointX<this.m_aPoint[1][0]&&iPointY>this.m_aPoint[1][1]){this.m_aPoint[3][0]=iPointX;this.m_aPoint[3][1]=iPointY;this.m_aPoint[0][0]=iPointX;this.m_aPoint[2][1]=iPointY}}}this.setPointInfo(this.m_aPoint);redraw()}}}class Point extends Shape{constructor(){super();this.m_szType="Point";this.m_szId=""}draw(){self[CONTEXT].beginPath();self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;self[CONTEXT].arc(this.m_aPoint[0][0],this.m_aPoint[0][1],10,0,Math.PI*2,true);self[CONTEXT].closePath();self[CONTEXT].fill()}drag(){}stretch(){}}class DrawCanvas{constructor(szCanvasId){self=this;this[CANVAS]=$$1("#"+szCanvasId);this[CONTEXT]=this[CANVAS][0].getContext("2d");this[SHAPES]=[];this[DRAWSTATUS]=false;this[SHAPETYPE]="Rect";this[MAXSHAPENUMSUPPORT]=10;this[DRAWSHAPEMULTIONETIME]=true;this[CURRENTSHAPEINFO]={};this[EVENTCALLBACK]=null;this[SHAPESTYLE]={szDrawColor:"#ff0000",szFillColor:"#343434",iTranslucent:.7};this[POLYGONDRAWING]=false;this.m_iCanvasWidth=this[CANVAS].width();this.m_iCanvasHeight=this[CANVAS].height();this.m_iHorizontalResolution=0;this.m_iVerticalResolution=0;this.m_szDisplayMode="";this.m_szVideoFormat="";initEvent();this[SHAPES].length=0}setDrawMutiShapeOneTime(bDrawMuti){this[DRAWSHAPEMULTIONETIME]=bDrawMuti}setMaxShapeSupport(iMax){this[MAXSHAPENUMSUPPORT]=iMax}getMaxShapeSupport(){return this[MAXSHAPENUMSUPPORT]}setDrawStatus(bDrawStatus,cbCallback){this[DRAWSTATUS]=bDrawStatus;if(cbCallback&&bDrawStatus){this[EVENTCALLBACK]=cbCallback}if(!bDrawStatus){this[EVENTCALLBACK]=null}}setShapeType(szType){this[SHAPETYPE]=szType;redraw()}setCurrentShapeInfo(oShapeInfo){this[CURRENTSHAPEINFO]=oShapeInfo||{szId:"",szTips:"",iMinClosed:3,iMaxPointNum:11,iPolygonType:1,iRedrawMode:0}}getShapeType(){return this[SHAPETYPE]}getAllShapesInfo(){let aShape=[];for(let i=0,iLen=this[SHAPES].length;i<iLen;i++){if(this[SHAPES][i].m_szType==="Grid"){aShape.push({szType:this[SHAPES][i].m_szType,szGridMap:this[SHAPES][i].m_szGridMap,iGridColNum:this[SHAPES][i].m_iGridColNum,iGridRowNum:this[SHAPES][i].m_iGridRowNum})}else if(this[SHAPES][i].m_szType==="RectOSD"){aShape.push({szType:this[SHAPES][i].m_szType,szText:this[SHAPES][i].m_szText,szEnabled:this[SHAPES][i].m_szEnabled,szOSDType:this[SHAPES][i].m_szOSDType,iPositionX:this[SHAPES][i].m_aPoint[0][0],iPositionY:this[SHAPES][i].m_aPoint[0][1],szDateStyle:this[SHAPES][i].m_szDateStyle,szClockType:this[SHAPES][i].m_szClockType,szDisplayWeek:this[SHAPES][i].m_szDisplayWeek,szId:this[SHAPES][i].m_szId,szAlignment:this[SHAPES][i].m_szAlignment})}else{aShape.push({szType:this[SHAPES][i].m_szType,aPoint:this[SHAPES][i].m_aPoint,szId:this[SHAPES][i].m_szId,bChoosed:this[SHAPES][i].m_bChoosed})}}return aShape}deleteRepeatPolyonById(id){let aShapes=this.getAllShapesInfo();let iShapesLen=aShapes.length;if(iShapesLen>0){for(let i=0;i<iShapesLen;i++){if(aShapes[i].szType==="Polygon"){if(aShapes[i].szId===id){this.deleteShape(i)}}}}}getShapesInfoByType(szType){let aShape=[];for(let i=0,iLen=this[SHAPES].length;i<iLen;i++){if(this[SHAPES][i].m_szType===szType){if(this[SHAPES][i].m_szType==="Grid"){aShape.push({szType:this[SHAPES][i].m_szType,szGridMap:this[SHAPES][i].m_szGridMap,iGridColNum:this[SHAPES][i].m_iGridColNum,iGridRowNum:this[SHAPES][i].m_iGridRowNum})}else if(this[SHAPES][i].m_szType==="RectOSD"){aShape.push({szType:this[SHAPES][i].m_szType,szText:this[SHAPES][i].m_szText,szEnabled:this[SHAPES][i].m_szEnabled,szOSDType:this[SHAPES][i].m_szOSDType,iPositionX:this[SHAPES][i].m_aPoint[0][0],iPositionY:this[SHAPES][i].m_aPoint[0][1],szDateStyle:this[SHAPES][i].m_szDateStyle,szClockType:this[SHAPES][i].m_szClockType,szDisplayWeek:this[SHAPES][i].m_szDisplayWeek,szId:this[SHAPES][i].m_szId,szAlignment:this[SHAPES][i].m_szAlignment})}else if(szType==="Polygon"){aShape.push({szType:this[SHAPES][i].m_szType,szId:this[SHAPES][i].m_szId,iPolygonType:this[SHAPES][i].m_iPolygonType,iMinClosed:this[SHAPES][i].m_iMinClosed,iMaxPointNum:this[SHAPES][i].m_iMaxPointNum,iEditType:this[SHAPES][i].m_iEditType,aPoint:this[SHAPES][i].m_aPoint,bClosed:this[SHAPES][i].m_bClosed,szTips:this[SHAPES][i].m_szTips,szDrawColor:this[SHAPES][i].m_szDrawColor,szFillColor:this[SHAPES][i].m_szFillColor,iTranslucent:this[SHAPES][i].m_iTranslucent})}else if(szType==="Line"){aShape.push({szType:this[SHAPES][i].m_szType,szId:this[SHAPES][i].m_szId,aPoint:this[SHAPES][i].m_aPoint,szTips:this[SHAPES][i].m_szTips,iLineType:this[SHAPES][i].m_iLineType,iDirection:this[SHAPES][i].m_iDirection,iArrowType:this[SHAPES][i].m_iArrowType,szDrawColor:this[SHAPES][i].m_szDrawColor,aCrossArrowPoint:this[SHAPES][i].m_aCrossArrowPoint})}else if(szType==="Rect"){aShape.push({szType:this[SHAPES][i].m_szType,iEditType:this[SHAPES][i].m_iEditType,aPoint:this[SHAPES][i].m_aPoint,szTips:this[SHAPES][i].m_szTips,szDrawColor:this[SHAPES][i].m_szDrawColor,szFillColor:this[SHAPES][i].m_szFillColor,iTranslucent:this[SHAPES][i].m_iTranslucent})}else{aShape.push({szType:this[SHAPES][i].m_szType,aPoint:this[SHAPES][i].m_aPoint})}}}return aShape}setShapesInfoByType(szType,aShapesInfo){if(!aShapesInfo){aShapesInfo=[]}let oShape=null;if(szType==="Rect"||szType==="Polygon"||szType==="Line"||szType==="Point"){for(let i=0,iLen=aShapesInfo.length;i<iLen;i++){if(szType==="Rect"){oShape=new Rect;oShape.m_iEditType=aShapesInfo[i].iEditType;oShape.m_szTips=aShapesInfo[i].szTips||"";oShape.m_szDrawColor=aShapesInfo[i].szDrawColor;oShape.m_szFillColor=aShapesInfo[i].szFillColor;oShape.m_iTranslucent=aShapesInfo[i].iTranslucent;oShape.m_iRedrawMode=aShapesInfo[i].iRedrawMode}else if(szType==="Polygon"){oShape=new Polygon;if(aShapesInfo[i].iPolygonType===0){oShape.m_bClosed=true}else{oShape.m_bClosed=aShapesInfo[i].bClosed}oShape.m_szTips=aShapesInfo[i].szTips||"";oShape.m_szId=aShapesInfo[i].szId||"";oShape.m_iPolygonType=aShapesInfo[i].iPolygonType;oShape.m_iMinClosed=aShapesInfo[i].iMinClosed||3;oShape.m_iMaxPointNum=aShapesInfo[i].iMaxPointNum||11;oShape.m_iEditType=aShapesInfo[i].iEditType;oShape.m_szDrawColor=aShapesInfo[i].szDrawColor;oShape.m_szFillColor=aShapesInfo[i].szFillColor;oShape.m_iTranslucent=aShapesInfo[i].iTranslucent;oShape.m_iRedrawMode=aShapesInfo[i].iRedrawMode}else if(szType==="Line"){oShape=new Line;oShape.m_iLineType=aShapesInfo[i].iLineType;oShape.m_szTips=aShapesInfo[i].szTips||"";oShape.m_szId=aShapesInfo[i].szId;oShape.m_iDirection=aShapesInfo[i].iDirection;oShape.m_iArrowType=aShapesInfo[i].iArrowType;oShape.m_szDrawColor=aShapesInfo[i].szDrawColor;oShape.setPointInfo(aShapesInfo[i].aPoint)}else if(szType==="Point"){oShape=new Point;oShape.m_szId=aShapesInfo[i].szId;oShape.m_szDrawColor=aShapesInfo[i].szDrawColor;oShape.setPointInfo(aShapesInfo[i].aPoint)}oShape.setPointInfo(aShapesInfo[i].aPoint);if(i===0){oShape.m_bChoosed=true}addShape(oShape)}}else if(szType==="Grid"){oShape=new MotionGrid;oShape.m_szGridMap=aShapesInfo[0].szGridMap||"";oShape.m_iGridColNum=aShapesInfo[0].iGridColNum||22;oShape.m_iGridRowNum=aShapesInfo[0].iGridRowNum||18;addShape(oShape)}redraw()}addOSDShape(szText,szEnabled,iStartX,iStartY,oExtend){if(!iStartX&&!iStartY){iStartX=0;iStartY=0}if(!oExtend){oExtend={}}let oRectOSD=new RectOSD(szText,szEnabled);let iWidth=szText.replace(/[^x00-xff]/g,"rr").length*10;oRectOSD.m_szOSDType=oExtend.szOSDType||"";oRectOSD.m_szDateStyle=oExtend.szDateStyle||"";oRectOSD.m_szClockType=oExtend.szClockType||"";oRectOSD.m_szDisplayWeek=oExtend.szDisplayWeek||"";oRectOSD.m_szId=oExtend.szId||"";oRectOSD.m_szAlignment=""+oExtend.szAlignment||"0";if("0"===oRectOSD.m_szAlignment){oRectOSD.m_aPoint=[[iStartX,iStartY],[iWidth+iStartX,iStartY],[iWidth+iStartX,iStartY+20],[iStartX,iStartY+20]]}else if("1"===oRectOSD.m_szAlignment){oRectOSD.m_aPoint=[[0,iStartY],[iWidth,iStartY],[iWidth,iStartY+20],[0,iStartY+20]]}else if("2"===oRectOSD.m_szAlignment){oRectOSD.m_aPoint=[[this.m_iCanvasWidth-iWidth,iStartY],[this.m_iCanvasWidth,iStartY],[this.m_iCanvasWidth,iStartY+20],[this.m_iCanvasWidth-iWidth,iStartY+20]]}else{oRectOSD.m_aPoint=[[iStartX,iStartY],[iWidth+iStartX,iStartY],[iWidth+iStartX,iStartY+20],[iStartX,iStartY+20]]}addShape(oRectOSD);redraw()}selectShapeById(szShapeType,szId){for(let i=0,iLen=self[SHAPES].length;i<iLen;i++){if(szShapeType===self[SHAPES][i].m_szType){if(szId===self[SHAPES][i].m_szId){self[SHAPES][i].m_bChoosed=true}else{self[SHAPES][i].m_bChoosed=false}}}redraw()}setCanvasSize(iWidth,iHeight){if(iWidth>0&&iHeight>0){this.m_iCanvasWidth=iWidth;this.m_iCanvasHeight=iHeight;redraw()}}setDrawStyle(szBorderColor,szFillColor,iTranslucent){this[SHAPESTYLE]={szDrawColor:szBorderColor,szFillColor:szFillColor,iTranslucent:iTranslucent}}clearAllShape(){this[SHAPES].length=0;self[POLYGONDRAWING]=false;redraw()}clearShapeByType(szType){let iLen=this[SHAPES].length;for(let i=iLen;i>0;i--){if(this[SHAPES][i-1].m_szType===szType){if(szType==="Grid"){this[SHAPES][i-1].m_szGridMap="";this[SHAPES][i-1].m_aAddGridMap=[]}else{this[SHAPES].splice(i-1,1)}}}if("Polygon"===szType){self[POLYGONDRAWING]=false}redraw()}deleteShape(iShapeIndex){if(this[SHAPES].length>iShapeIndex){this[SHAPES].splice(iShapeIndex,1)}redraw()}updateCanvas(szCanvasId){this[CANVAS]=$$1("#"+szCanvasId);this[CONTEXT]=this[CANVAS][0].getContext("2d");this.m_iCanvasWidth=this[CANVAS].width();this.m_iCanvasHeight=this[CANVAS].height();initEvent()}resizeCanvas(){this.m_iCanvasWidth=this[CANVAS].width();this.m_iCanvasHeight=this[CANVAS].height()}canvasRedraw(){redraw()}}return DrawCanvas}();var wasmplayer_min={exports:{}};wasmplayer_min.exports;(function(module,exports){function a0_0x5477(_0x59ec6a,_0x172c6c){var _0x27b828=a0_0x27b8();return a0_0x5477=function(_0x5477e7,_0x582b38){_0x5477e7=_0x5477e7-309;var _0x46c6fe=_0x27b828[_0x5477e7];return _0x46c6fe},a0_0x5477(_0x59ec6a,_0x172c6c)}(function(_0x50ba22,_0x172f06){var _0x2664a0=a0_0x5477,_0x47d436=_0x50ba22();while(!![]){try{var _0xb0d99c=parseInt(_0x2664a0(410))/1*(parseInt(_0x2664a0(486))/2)+-parseInt(_0x2664a0(1354))/3+-parseInt(_0x2664a0(1104))/4+-parseInt(_0x2664a0(489))/5+parseInt(_0x2664a0(969))/6*(parseInt(_0x2664a0(916))/7)+-parseInt(_0x2664a0(1423))/8+parseInt(_0x2664a0(1269))/9*(parseInt(_0x2664a0(1397))/10);if(_0xb0d99c===_0x172f06)break;else _0x47d436["push"](_0x47d436["shift"]())}catch(_0x2bd8b7){_0x47d436["push"](_0x47d436["shift"]())}}})(a0_0x27b8,841567),!function(_0x191e34,_0x1ff743){var _0x15ef4f=a0_0x5477;if(_0x15ef4f(1415)=="object"&&_0x15ef4f(1415)=="object")module[_0x15ef4f(509)]=_0x1ff743();else{{var _0x4c759f,_0x3c2c1d=_0x1ff743();for(_0x4c759f in _0x3c2c1d)(_0x15ef4f(1415)=="object"?exports:_0x191e34)[_0x4c759f]=_0x3c2c1d[_0x4c759f]}}}(self,function(){var _0x3578d9=a0_0x5477;return _0x60f968={477:_0x1809a9=>{_0x1809a9["exports"]=function(_0x4c564d,_0x5aa531,_0x3b6afd,_0x5c8376){var _0x280b6e=a0_0x5477,_0x2d1da9,_0x35ad94=self||window;try{try{try{_0x2d1da9=new _0x35ad94[_0x280b6e(540)]([_0x4c564d])}catch(_0x10ffff){(_0x2d1da9=new(_0x35ad94[_0x280b6e(1487)]||_0x35ad94[_0x280b6e(1403)]||_0x35ad94["MozBlobBuilder"]||_0x35ad94[_0x280b6e(548)]))["append"](_0x4c564d),_0x2d1da9=_0x2d1da9["getBlob"]()}var _0x170e38=_0x35ad94[_0x280b6e(1244)]||_0x35ad94[_0x280b6e(1318)],_0x2ae5d5=_0x170e38["createObjectURL"](_0x2d1da9),_0xf87c40=new _0x35ad94[_0x5aa531](_0x2ae5d5,_0x3b6afd);return _0x170e38[_0x280b6e(1261)](_0x2ae5d5),_0xf87c40}catch(_0x56b76b){return new _0x35ad94[_0x5aa531](_0x280b6e(544)[_0x280b6e(1438)](encodeURIComponent(_0x4c564d)),_0x3b6afd)}}catch(_0x522ab8){if(_0x5c8376)return new _0x35ad94[_0x5aa531](_0x5c8376,_0x3b6afd);throw Error(_0x280b6e(935))}}},61:(_0x2429b3,_0x1821f5,_0x456f22)=>{var _0x480f1b=a0_0x5477,_0x311502=_0x456f22(698)["default"];function _0x595251(){var _0x180c05=a0_0x5477;_0x2429b3[_0x180c05(509)]=function(){return _0x39e966},_0x2429b3[_0x180c05(509)][_0x180c05(1249)]=!0,_0x2429b3[_0x180c05(509)][_0x180c05(1507)]=_0x2429b3[_0x180c05(509)];var _0x39e966={},_0x3407d2=Object[_0x180c05(1178)],_0x44d0ea=_0x3407d2[_0x180c05(1340)],_0x3984fd=_0x180c05(1536)==typeof Symbol?Symbol:{},_0x317d93=_0x3984fd["iterator"]||_0x180c05(1568),_0x5e7a6d=_0x3984fd["asyncIterator"]||_0x180c05(931),_0x38bede=_0x3984fd[_0x180c05(1111)]||"@@toStringTag";function _0x5cd6b9(_0x40a93d,_0x11d2e8,_0xed8d30){var _0x2efcff=_0x180c05;return Object[_0x2efcff(645)](_0x40a93d,_0x11d2e8,{value:_0xed8d30,enumerable:!0,configurable:!0,writable:!0}),_0x40a93d[_0x11d2e8]}try{_0x5cd6b9({},"")}catch(_0x277afb){_0x5cd6b9=function(_0x1dba43,_0x51ecf9,_0x347e7b){return _0x1dba43[_0x51ecf9]=_0x347e7b}}function _0x238caf(_0x30b261,_0x17037c,_0x413279,_0x48c722){var _0x451ac3=_0x180c05,_0x95d4ff,_0x33210b,_0xee6e8a,_0x360e99,_0x17037c=_0x17037c&&_0x17037c[_0x451ac3(1178)]instanceof _0x59dc01?_0x17037c:_0x59dc01,_0x17037c=Object[_0x451ac3(1287)](_0x17037c[_0x451ac3(1178)]),_0x48c722=new _0x1b1354(_0x48c722||[]);return _0x17037c["_invoke"]=(_0x95d4ff=_0x30b261,_0x33210b=_0x413279,_0xee6e8a=_0x48c722,_0x360e99=_0x451ac3(1259),function(_0x5c9326,_0x456d22){var _0x510d0f=_0x451ac3;if(_0x510d0f(1556)===_0x360e99)throw new Error(_0x510d0f(1391));if(_0x510d0f(611)===_0x360e99){if(_0x510d0f(1317)===_0x5c9326)throw _0x456d22;return _0x341a5f()}for(_0xee6e8a[_0x510d0f(1515)]=_0x5c9326,_0xee6e8a["arg"]=_0x456d22;;){var _0x336681=_0xee6e8a[_0x510d0f(1218)];if(_0x336681){_0x336681=function _0x58ca42(_0x21b87f,_0x3d769b){var _0x4f3271=_0x510d0f,_0x3015b2=_0x21b87f[_0x4f3271(1528)][_0x3d769b[_0x4f3271(1515)]];if(void 0===_0x3015b2){if(_0x3d769b[_0x4f3271(1218)]=null,_0x4f3271(1317)===_0x3d769b[_0x4f3271(1515)]){if(_0x21b87f[_0x4f3271(1528)][_0x4f3271(678)]&&(_0x3d769b[_0x4f3271(1515)]="return",_0x3d769b[_0x4f3271(529)]=void 0,_0x58ca42(_0x21b87f,_0x3d769b),_0x4f3271(1317)===_0x3d769b["method"]))return _0x871f5d;_0x3d769b[_0x4f3271(1515)]=_0x4f3271(1317),_0x3d769b[_0x4f3271(529)]=new TypeError(_0x4f3271(1593))}return _0x871f5d}_0x3015b2=_0x49132f(_0x3015b2,_0x21b87f[_0x4f3271(1528)],_0x3d769b[_0x4f3271(529)]);if(_0x4f3271(1317)===_0x3015b2[_0x4f3271(1378)])return _0x3d769b[_0x4f3271(1515)]=_0x4f3271(1317),_0x3d769b[_0x4f3271(529)]=_0x3015b2[_0x4f3271(529)],_0x3d769b[_0x4f3271(1218)]=null,_0x871f5d;return _0x3015b2=_0x3015b2[_0x4f3271(529)],_0x3015b2?_0x3015b2["done"]?(_0x3d769b[_0x21b87f[_0x4f3271(1100)]]=_0x3015b2[_0x4f3271(591)],_0x3d769b[_0x4f3271(811)]=_0x21b87f[_0x4f3271(896)],_0x4f3271(678)!==_0x3d769b[_0x4f3271(1515)]&&(_0x3d769b[_0x4f3271(1515)]="next",_0x3d769b[_0x4f3271(529)]=void 0),_0x3d769b[_0x4f3271(1218)]=null,_0x871f5d):_0x3015b2:(_0x3d769b[_0x4f3271(1515)]=_0x4f3271(1317),_0x3d769b[_0x4f3271(529)]=new TypeError(_0x4f3271(1377)),_0x3d769b[_0x4f3271(1218)]=null,_0x871f5d)}(_0x336681,_0xee6e8a);if(_0x336681){if(_0x336681===_0x871f5d)continue;return _0x336681}}if(_0x510d0f(811)===_0xee6e8a[_0x510d0f(1515)])_0xee6e8a[_0x510d0f(1520)]=_0xee6e8a[_0x510d0f(1434)]=_0xee6e8a["arg"];else{if(_0x510d0f(1317)===_0xee6e8a[_0x510d0f(1515)]){if(_0x510d0f(1259)===_0x360e99)throw _0x360e99="completed",_0xee6e8a["arg"];_0xee6e8a["dispatchException"](_0xee6e8a[_0x510d0f(529)])}else"return"===_0xee6e8a[_0x510d0f(1515)]&&_0xee6e8a[_0x510d0f(341)]("return",_0xee6e8a[_0x510d0f(529)])}_0x360e99="executing",_0x336681=_0x49132f(_0x95d4ff,_0x33210b,_0xee6e8a);if(_0x510d0f(655)===_0x336681[_0x510d0f(1378)]){if(_0x360e99=_0xee6e8a["done"]?_0x510d0f(611):_0x510d0f(1525),_0x336681["arg"]===_0x871f5d)continue;return{value:_0x336681[_0x510d0f(529)],done:_0xee6e8a[_0x510d0f(1251)]}}_0x510d0f(1317)===_0x336681[_0x510d0f(1378)]&&(_0x360e99=_0x510d0f(611),_0xee6e8a["method"]=_0x510d0f(1317),_0xee6e8a[_0x510d0f(529)]=_0x336681[_0x510d0f(529)])}}),_0x17037c}function _0x49132f(_0x298469,_0x2df06f,_0x3182ba){var _0x15d72b=_0x180c05;try{return{type:_0x15d72b(655),arg:_0x298469[_0x15d72b(1098)](_0x2df06f,_0x3182ba)}}catch(_0x518db7){return{type:"throw",arg:_0x518db7}}}_0x39e966[_0x180c05(894)]=_0x238caf;var _0x871f5d={};function _0x59dc01(){}function _0x251730(){}function _0x42c8d1(){}var _0x3984fd={},_0x51055b=(_0x5cd6b9(_0x3984fd,_0x317d93,function(){return this}),Object[_0x180c05(1363)]),_0x51055b=_0x51055b&&_0x51055b(_0x51055b(_0x394ac2([]))),_0x4b0ed2=(_0x51055b&&_0x51055b!==_0x3407d2&&_0x44d0ea[_0x180c05(1098)](_0x51055b,_0x317d93)&&(_0x3984fd=_0x51055b),_0x42c8d1[_0x180c05(1178)]=_0x59dc01[_0x180c05(1178)]=Object[_0x180c05(1287)](_0x3984fd));function _0x1469c9(_0x1550e8){var _0x4feb24=_0x180c05;[_0x4feb24(811),"throw",_0x4feb24(678)][_0x4feb24(689)](function(_0xd578e8){_0x5cd6b9(_0x1550e8,_0xd578e8,function(_0x2b6c20){var _0x10ebae=a0_0x5477;return this[_0x10ebae(1352)](_0xd578e8,_0x2b6c20)})})}function _0x580a5e(_0x40278e,_0x5c8996){var _0x305a10=_0x180c05,_0x429991;this[_0x305a10(1352)]=function(_0x1c6c0d,_0x22afa4){var _0x2d0fa2=_0x305a10;function _0x551d5a(){return new _0x5c8996(function(_0x1a1bce,_0x18f41f){!function _0x2fd26a(_0x1434a3,_0x57733c,_0x250c3c,_0x343224){var _0x35725e=a0_0x5477,_0x58bf30,_0x1434a3=_0x49132f(_0x40278e[_0x1434a3],_0x40278e,_0x57733c);if("throw"!==_0x1434a3[_0x35725e(1378)])return(_0x57733c=(_0x58bf30=_0x1434a3[_0x35725e(529)])[_0x35725e(591)])&&"object"==_0x311502(_0x57733c)&&_0x44d0ea[_0x35725e(1098)](_0x57733c,"__await")?_0x5c8996[_0x35725e(1548)](_0x57733c[_0x35725e(1155)])["then"](function(_0x5b0ebb){_0x2fd26a("next",_0x5b0ebb,_0x250c3c,_0x343224)},function(_0xe38af2){var _0x56d035=_0x35725e;_0x2fd26a(_0x56d035(1317),_0xe38af2,_0x250c3c,_0x343224)}):_0x5c8996[_0x35725e(1548)](_0x57733c)[_0x35725e(705)](function(_0x1d9d68){_0x58bf30["value"]=_0x1d9d68,_0x250c3c(_0x58bf30)},function(_0x57cc44){var _0x37559f=_0x35725e;return _0x2fd26a(_0x37559f(1317),_0x57cc44,_0x250c3c,_0x343224)});_0x343224(_0x1434a3[_0x35725e(529)])}(_0x1c6c0d,_0x22afa4,_0x1a1bce,_0x18f41f)})}return _0x429991=_0x429991?_0x429991[_0x2d0fa2(705)](_0x551d5a,_0x551d5a):_0x551d5a()}}function _0x2d8738(_0x45aebc){var _0x36b63a=_0x180c05,_0x465d27={tryLoc:_0x45aebc[0]};1 in _0x45aebc&&(_0x465d27[_0x36b63a(932)]=_0x45aebc[1]),2 in _0x45aebc&&(_0x465d27[_0x36b63a(1482)]=_0x45aebc[2],_0x465d27["afterLoc"]=_0x45aebc[3]),this["tryEntries"][_0x36b63a(962)](_0x465d27)}function _0x155cd6(_0xec2385){var _0x1f17f1=_0x180c05,_0x3dc78d=_0xec2385[_0x1f17f1(929)]||{};_0x3dc78d[_0x1f17f1(1378)]=_0x1f17f1(655),delete _0x3dc78d[_0x1f17f1(529)],_0xec2385[_0x1f17f1(929)]=_0x3dc78d}function _0x1b1354(_0x42abf8){var _0x46fc73=_0x180c05;this[_0x46fc73(1386)]=[{tryLoc:_0x46fc73(1157)}],_0x42abf8[_0x46fc73(689)](_0x2d8738,this),this["reset"](!0)}function _0x394ac2(_0x334e7d){var _0x1b816f=_0x180c05;if(_0x334e7d){var _0x43e9d6,_0x3a0399=_0x334e7d[_0x317d93];if(_0x3a0399)return _0x3a0399[_0x1b816f(1098)](_0x334e7d);if(_0x1b816f(1536)==typeof _0x334e7d[_0x1b816f(811)])return _0x334e7d;if(!isNaN(_0x334e7d[_0x1b816f(525)]))return _0x43e9d6=-1,(_0x3a0399=function _0x4305cc(){var _0x29c830=_0x1b816f;for(;++_0x43e9d6<_0x334e7d["length"];)if(_0x44d0ea[_0x29c830(1098)](_0x334e7d,_0x43e9d6))return _0x4305cc[_0x29c830(591)]=_0x334e7d[_0x43e9d6],_0x4305cc[_0x29c830(1251)]=!1,_0x4305cc;return _0x4305cc[_0x29c830(591)]=void 0,_0x4305cc[_0x29c830(1251)]=!0,_0x4305cc})["next"]=_0x3a0399}return{next:_0x341a5f}}function _0x341a5f(){return{value:void 0,done:!0}}return _0x5cd6b9(_0x4b0ed2,_0x180c05(370),_0x251730[_0x180c05(1178)]=_0x42c8d1),_0x5cd6b9(_0x42c8d1,_0x180c05(370),_0x251730),_0x251730["displayName"]=_0x5cd6b9(_0x42c8d1,_0x38bede,_0x180c05(570)),_0x39e966[_0x180c05(885)]=function(_0x366ac2){var _0x1b2422=_0x180c05;return _0x366ac2=_0x1b2422(1536)==typeof _0x366ac2&&_0x366ac2[_0x1b2422(370)],!!_0x366ac2&&(_0x366ac2===_0x251730||"GeneratorFunction"===(_0x366ac2[_0x1b2422(519)]||_0x366ac2[_0x1b2422(642)]))},_0x39e966["mark"]=function(_0x30c08d){var _0x55d184=_0x180c05;return Object[_0x55d184(767)]?Object[_0x55d184(767)](_0x30c08d,_0x42c8d1):(_0x30c08d[_0x55d184(1323)]=_0x42c8d1,_0x5cd6b9(_0x30c08d,_0x38bede,"GeneratorFunction")),_0x30c08d["prototype"]=Object[_0x55d184(1287)](_0x4b0ed2),_0x30c08d},_0x39e966[_0x180c05(318)]=function(_0x41d8e3){return{__await:_0x41d8e3}},_0x1469c9(_0x580a5e[_0x180c05(1178)]),_0x5cd6b9(_0x580a5e[_0x180c05(1178)],_0x5e7a6d,function(){return this}),_0x39e966[_0x180c05(441)]=_0x580a5e,_0x39e966["async"]=function(_0x54746f,_0x38b089,_0x2ce901,_0x2550f4,_0x2b8ebd){var _0x4dd505=_0x180c05;void 0===_0x2b8ebd&&(_0x2b8ebd=Promise);var _0x37715d=new _0x580a5e(_0x238caf(_0x54746f,_0x38b089,_0x2ce901,_0x2550f4),_0x2b8ebd);return _0x39e966["isGeneratorFunction"](_0x38b089)?_0x37715d:_0x37715d["next"]()[_0x4dd505(705)](function(_0x5a6c7e){var _0x3e259a=_0x4dd505;return _0x5a6c7e[_0x3e259a(1251)]?_0x5a6c7e[_0x3e259a(591)]:_0x37715d[_0x3e259a(811)]()})},_0x1469c9(_0x4b0ed2),_0x5cd6b9(_0x4b0ed2,_0x38bede,"Generator"),_0x5cd6b9(_0x4b0ed2,_0x317d93,function(){return this}),_0x5cd6b9(_0x4b0ed2,_0x180c05(1503),function(){return"[object Generator]"}),_0x39e966[_0x180c05(743)]=function(_0x106d24){var _0x126d34=_0x180c05,_0x542154,_0x536f41=[];for(_0x542154 in _0x106d24)_0x536f41[_0x126d34(962)](_0x542154);return _0x536f41[_0x126d34(408)](),function _0x446c9e(){var _0x18e88b=_0x126d34;for(;_0x536f41[_0x18e88b(525)];){var _0x1d25ba=_0x536f41[_0x18e88b(1162)]();if(_0x1d25ba in _0x106d24)return _0x446c9e[_0x18e88b(591)]=_0x1d25ba,_0x446c9e[_0x18e88b(1251)]=!1,_0x446c9e}return _0x446c9e[_0x18e88b(1251)]=!0,_0x446c9e}},_0x39e966[_0x180c05(1544)]=_0x394ac2,_0x1b1354[_0x180c05(1178)]={constructor:_0x1b1354,reset:function(_0x3e15e6){var _0x331f37=_0x180c05;if(this["prev"]=0,this[_0x331f37(811)]=0,this[_0x331f37(1520)]=this[_0x331f37(1434)]=void 0,this[_0x331f37(1251)]=!1,this["delegate"]=null,this[_0x331f37(1515)]="next",this[_0x331f37(529)]=void 0,this[_0x331f37(1386)][_0x331f37(689)](_0x155cd6),!_0x3e15e6){for(var _0x3e3f50 in this)"t"===_0x3e3f50["charAt"](0)&&_0x44d0ea[_0x331f37(1098)](this,_0x3e3f50)&&!isNaN(+_0x3e3f50["slice"](1))&&(this[_0x3e3f50]=void 0)}},stop:function(){var _0x543e31=_0x180c05;this[_0x543e31(1251)]=!0;var _0x3152d7=this["tryEntries"][0][_0x543e31(929)];if(_0x543e31(1317)===_0x3152d7[_0x543e31(1378)])throw _0x3152d7[_0x543e31(529)];return this[_0x543e31(1472)]},dispatchException:function(_0x5700d8){var _0x117aba=_0x180c05;if(this[_0x117aba(1251)])throw _0x5700d8;var _0x4266cd=this;function _0x29646d(_0x3e7d1b,_0x27e8b6){var _0xd4a42=_0x117aba;return _0x1824e1[_0xd4a42(1378)]=_0xd4a42(1317),_0x1824e1[_0xd4a42(529)]=_0x5700d8,_0x4266cd["next"]=_0x3e7d1b,_0x27e8b6&&(_0x4266cd["method"]=_0xd4a42(811),_0x4266cd[_0xd4a42(529)]=void 0),!!_0x27e8b6}for(var _0x52bcff=this["tryEntries"][_0x117aba(525)]-1;0<=_0x52bcff;--_0x52bcff){var _0xf5e091=this[_0x117aba(1386)][_0x52bcff],_0x1824e1=_0xf5e091[_0x117aba(929)];if("root"===_0xf5e091[_0x117aba(1061)])return _0x29646d(_0x117aba(974));if(_0xf5e091["tryLoc"]<=this[_0x117aba(707)]){var _0x4434df=_0x44d0ea[_0x117aba(1098)](_0xf5e091,_0x117aba(932)),_0x1320bc=_0x44d0ea[_0x117aba(1098)](_0xf5e091,_0x117aba(1482));if(_0x4434df&&_0x1320bc){if(this[_0x117aba(707)]<_0xf5e091[_0x117aba(932)])return _0x29646d(_0xf5e091["catchLoc"],!0);if(this[_0x117aba(707)]<_0xf5e091["finallyLoc"])return _0x29646d(_0xf5e091[_0x117aba(1482)])}else{if(_0x4434df){if(this["prev"]<_0xf5e091[_0x117aba(932)])return _0x29646d(_0xf5e091[_0x117aba(932)],!0)}else{if(!_0x1320bc)throw new Error(_0x117aba(946));if(this["prev"]<_0xf5e091["finallyLoc"])return _0x29646d(_0xf5e091[_0x117aba(1482)])}}}}},abrupt:function(_0xe922,_0x12433b){var _0x5db8c6=_0x180c05;for(var _0x321668=this[_0x5db8c6(1386)]["length"]-1;0<=_0x321668;--_0x321668){var _0xd3ae47=this[_0x5db8c6(1386)][_0x321668];if(_0xd3ae47["tryLoc"]<=this[_0x5db8c6(707)]&&_0x44d0ea[_0x5db8c6(1098)](_0xd3ae47,_0x5db8c6(1482))&&this["prev"]<_0xd3ae47[_0x5db8c6(1482)]){var _0x3a65d0=_0xd3ae47;break}}var _0x2ae0c2=(_0x3a65d0=_0x3a65d0&&(_0x5db8c6(1478)===_0xe922||"continue"===_0xe922)&&_0x3a65d0[_0x5db8c6(1061)]<=_0x12433b&&_0x12433b<=_0x3a65d0[_0x5db8c6(1482)]?null:_0x3a65d0)?_0x3a65d0[_0x5db8c6(929)]:{};return _0x2ae0c2[_0x5db8c6(1378)]=_0xe922,_0x2ae0c2[_0x5db8c6(529)]=_0x12433b,_0x3a65d0?(this[_0x5db8c6(1515)]="next",this[_0x5db8c6(811)]=_0x3a65d0[_0x5db8c6(1482)],_0x871f5d):this[_0x5db8c6(1196)](_0x2ae0c2)},complete:function(_0x26df34,_0x253e1e){var _0x510728=_0x180c05;if(_0x510728(1317)===_0x26df34[_0x510728(1378)])throw _0x26df34[_0x510728(529)];return"break"===_0x26df34[_0x510728(1378)]||_0x510728(1187)===_0x26df34[_0x510728(1378)]?this[_0x510728(811)]=_0x26df34[_0x510728(529)]:_0x510728(678)===_0x26df34[_0x510728(1378)]?(this[_0x510728(1472)]=this[_0x510728(529)]=_0x26df34[_0x510728(529)],this[_0x510728(1515)]=_0x510728(678),this[_0x510728(811)]=_0x510728(974)):_0x510728(655)===_0x26df34[_0x510728(1378)]&&_0x253e1e&&(this[_0x510728(811)]=_0x253e1e),_0x871f5d},finish:function(_0x28caf5){var _0x1be1c4=_0x180c05;for(var _0x17f37a=this[_0x1be1c4(1386)]["length"]-1;0<=_0x17f37a;--_0x17f37a){var _0x2cc59a=this["tryEntries"][_0x17f37a];if(_0x2cc59a[_0x1be1c4(1482)]===_0x28caf5)return this[_0x1be1c4(1196)](_0x2cc59a["completion"],_0x2cc59a[_0x1be1c4(478)]),_0x155cd6(_0x2cc59a),_0x871f5d}},catch:function(_0x1ee09d){var _0x440400=_0x180c05;for(var _0x9530bd=this["tryEntries"]["length"]-1;0<=_0x9530bd;--_0x9530bd){var _0x169ffa,_0x175148,_0x4920f0=this[_0x440400(1386)][_0x9530bd];if(_0x4920f0[_0x440400(1061)]===_0x1ee09d)return"throw"===(_0x169ffa=_0x4920f0["completion"])[_0x440400(1378)]&&(_0x175148=_0x169ffa["arg"],_0x155cd6(_0x4920f0)),_0x175148}throw new Error(_0x440400(1279))},delegateYield:function(_0x3a3ed5,_0x395e64,_0x5e47e4){var _0x595c95=_0x180c05;return this["delegate"]={iterator:_0x394ac2(_0x3a3ed5),resultName:_0x395e64,nextLoc:_0x5e47e4},_0x595c95(811)===this[_0x595c95(1515)]&&(this["arg"]=void 0),_0x871f5d}},_0x39e966}_0x2429b3["exports"]=_0x595251,_0x2429b3["exports"][_0x480f1b(1249)]=!0,_0x2429b3[_0x480f1b(509)]["default"]=_0x2429b3[_0x480f1b(509)]},698:_0x136a4e=>{var _0x31678e=a0_0x5477;function _0x2d9a2a(_0x5a9bfc){var _0xecd744=a0_0x5477;return _0x136a4e[_0xecd744(509)]=_0x2d9a2a=_0xecd744(1536)==typeof Symbol&&_0xecd744(1142)==typeof Symbol[_0xecd744(1528)]?function(_0x59c1c3){return typeof _0x59c1c3}:function(_0x1e1be0){var _0x2a31a5=_0xecd744;return _0x1e1be0&&_0x2a31a5(1536)==typeof Symbol&&_0x1e1be0[_0x2a31a5(370)]===Symbol&&_0x1e1be0!==Symbol[_0x2a31a5(1178)]?"symbol":typeof _0x1e1be0},_0x136a4e["exports"][_0xecd744(1249)]=!0,_0x136a4e[_0xecd744(509)][_0xecd744(1507)]=_0x136a4e[_0xecd744(509)],_0x2d9a2a(_0x5a9bfc)}_0x136a4e[_0x31678e(509)]=_0x2d9a2a,_0x136a4e[_0x31678e(509)]["__esModule"]=!0,_0x136a4e[_0x31678e(509)]["default"]=_0x136a4e[_0x31678e(509)]},687:(_0x1a9373,_0x5f0387,_0x5a6675)=>{var _0x89cb6d=a0_0x5477;_0x5a6675=_0x5a6675(61)(),_0x1a9373["exports"]=_0x5a6675;try{regeneratorRuntime=_0x5a6675}catch(_0x382e63){_0x89cb6d(1415)==typeof globalThis?globalThis[_0x89cb6d(731)]=_0x5a6675:Function("r","regeneratorRuntime = r")(_0x5a6675)}}},_0x209347={},_0x26090d["n"]=_0x518bb0=>{var _0x5ea5b6=a0_0x5477,_0x2c7d90=_0x518bb0&&_0x518bb0["__esModule"]?()=>_0x518bb0[_0x5ea5b6(1507)]:()=>_0x518bb0;return _0x26090d["d"](_0x2c7d90,{a:_0x2c7d90}),_0x2c7d90},_0x26090d["d"]=(_0x26079d,_0xf931b5)=>{var _0x3035a1=a0_0x5477;for(var _0x2103a4 in _0xf931b5)_0x26090d["o"](_0xf931b5,_0x2103a4)&&!_0x26090d["o"](_0x26079d,_0x2103a4)&&Object[_0x3035a1(645)](_0x26079d,_0x2103a4,{enumerable:!0,get:_0xf931b5[_0x2103a4]})},_0x26090d["o"]=(_0x13d0fb,_0xf6e06)=>Object[_0x3578d9(1178)][_0x3578d9(1340)][_0x3578d9(1098)](_0x13d0fb,_0xf6e06),_0x26090d["r"]=_0x41d3da=>{var _0x27a4ee=_0x3578d9;"undefined"!=typeof Symbol&&Symbol[_0x27a4ee(1111)]&&Object["defineProperty"](_0x41d3da,Symbol["toStringTag"],{value:_0x27a4ee(384)}),Object["defineProperty"](_0x41d3da,"__esModule",{value:!0})},_0x55f432={},(()=>{var _0x372e98=_0x3578d9;function _0xd02e6b(_0x5eedeb,_0x562c54,_0x2e2cc8,_0x5795aa,_0x19338d,_0x2f0422,_0x3946c4){var _0x5ab956=a0_0x5477;try{var _0x97a198=_0x5eedeb[_0x2f0422](_0x3946c4),_0x3460f0=_0x97a198[_0x5ab956(591)]}catch(_0x5bee37){return void _0x2e2cc8(_0x5bee37)}_0x97a198[_0x5ab956(1251)]?_0x562c54(_0x3460f0):Promise[_0x5ab956(1548)](_0x3460f0)[_0x5ab956(705)](_0x5795aa,_0x19338d)}function _0x392749(_0x2f3d4a){return function(){var _0x145086=this,_0x2fb954=arguments;return new Promise(function(_0x27cd68,_0x25f67d){var _0x2f465a=a0_0x5477,_0x1a44d0=_0x2f3d4a[_0x2f465a(1089)](_0x145086,_0x2fb954);function _0x23d655(_0x96cd3a){_0xd02e6b(_0x1a44d0,_0x27cd68,_0x25f67d,_0x23d655,_0x47a4ee,"next",_0x96cd3a)}function _0x47a4ee(_0x51712b){_0xd02e6b(_0x1a44d0,_0x27cd68,_0x25f67d,_0x23d655,_0x47a4ee,"throw",_0x51712b)}_0x23d655(void 0)})}}function _0x56ad3b(_0x2c5ffd,_0x516ce2){if(!(_0x2c5ffd instanceof _0x516ce2))throw new TypeError("Cannot call a class as a function")}function _0x2e87ed(_0x5e057a,_0x10016c){var _0x17d1f0=a0_0x5477;for(var _0x171d27=0;_0x171d27<_0x10016c["length"];_0x171d27++){var _0x14de07=_0x10016c[_0x171d27];_0x14de07["enumerable"]=_0x14de07[_0x17d1f0(1296)]||!1,_0x14de07[_0x17d1f0(815)]=!0,_0x17d1f0(591)in _0x14de07&&(_0x14de07[_0x17d1f0(443)]=!0),Object[_0x17d1f0(645)](_0x5e057a,_0x14de07["key"],_0x14de07)}}function _0x5dd832(_0x50962d,_0x367f8f,_0x5a799c){var _0xa6a1b1=a0_0x5477;return _0x367f8f&&_0x2e87ed(_0x50962d[_0xa6a1b1(1178)],_0x367f8f),_0x5a799c&&_0x2e87ed(_0x50962d,_0x5a799c),Object[_0xa6a1b1(645)](_0x50962d,_0xa6a1b1(1178),{writable:!1}),_0x50962d}_0x26090d["r"](_0x55f432),_0x26090d["d"](_0x55f432,{JSPlayCtrl:()=>_0x5115e8});var _0x13e316=_0x26090d(687),_0x5d56c9=_0x26090d["n"](_0x13e316),_0x13e316=_0x26090d(477),_0x3cc31c=_0x26090d["n"](_0x13e316);function _0x23fcd8(){var _0x44015b=a0_0x5477;return _0x3cc31c()(_0x44015b(1586),_0x44015b(845),void 0,void 0)}var _0x299b8b,_0xd9e74a,_0x1cdd19,_0x3baf56,_0x51f6fb,_0x39a6b1,_0x30b0bf=1281,_0x3f04b0=1282,_0x595075=1285,_0x23c904=1287,_0x5defd8=1288,_0x2820eb=1289,_0x1e0258=1302,_0x49644c=1,_0xe316b8=2,_0x1f6e6c=3,_0x58c99c=0,_0x42421f=256,_0x1aded7=512,_0x182632=768,_0x5f5896=1024,_0x32c6be=1280,_0x2d4d8d=1536,_0x1dda95=1792,_0x3dc3ec=2048,_0x3c4369=2304,_0x3cbd45=2560,_0x393e2c=1,_0x3b18af=2,_0x55094c=4,_0x2dc1c=8,_0x3183c9=16,_0x1473f8=32,_0x23142c=function(){var _0x535021=a0_0x5477;function _0x30cd76(_0x517221,_0x188fdf,_0x18626a){var _0x3fe3db=a0_0x5477;_0x56ad3b(this,_0x30cd76),this[_0x3fe3db(1454)]=0,this[_0x3fe3db(1384)]=0,this[_0x3fe3db(1349)]=null,this[_0x3fe3db(1561)]=!0,this[_0x3fe3db(1113)]=[],this[_0x3fe3db(1500)]=!0,this["sab"]=_0x517221,this[_0x3fe3db(964)]=30,this["needSetPreSoft"]=!1,this[_0x3fe3db(1416)]=2,this["decoderOutSuccess"]=!1,this["decoderObjNeedReset"]=!1,this["oVideoRenderHandle"]=_0x188fdf,this[_0x3fe3db(602)]=this[_0x3fe3db(602)]["bind"](this),this[_0x3fe3db(312)]=this[_0x3fe3db(312)][_0x3fe3db(979)](this),(this[_0x3fe3db(1376)]=null)!=_0x18626a&&(this[_0x3fe3db(1376)]=_0x18626a)}return _0x5dd832(_0x30cd76,[{key:_0x535021(1271),value:function(){var _0x449c01=_0x535021,_0x446521;null==this["decoderObj"]&&(_0x446521={output:this[_0x449c01(602)],error:this[_0x449c01(312)]},this[_0x449c01(1349)]=new VideoDecoder(_0x446521)),this[_0x449c01(1500)]&&(this["underflow"]=!1,setTimeout(this[_0x449c01(1439)][_0x449c01(1141)](),0)),this["decoderCurStatus"]=2,this["FirstFrame"]=!0}},{key:_0x535021(1545),value:function(_0x3c1e21,_0xd8b9d4){var _0x281646=_0x535021;null==this["decoderObj"]||_0x281646(600)!=this["decoderObj"][_0x281646(1037)]&&!this[_0x281646(1561)]||this["decodeProcess"](_0x3c1e21,_0xd8b9d4),_0xd8b9d4[_0x281646(386)]&&this[_0x281646(1110)]()}},{key:_0x535021(837),value:function(_0x1f0e4b){var _0x99fa0=_0x535021;for(var _0x52e8d9=0,_0x59c3fc=arguments[_0x99fa0(525)],_0x50efb0=new Array(1<_0x59c3fc?_0x59c3fc-1:0),_0x4a86d4=1;_0x4a86d4<_0x59c3fc;_0x4a86d4++)_0x50efb0[_0x4a86d4-1]=arguments[_0x4a86d4];for(var _0x5864c1=0,_0x27a977=_0x50efb0;_0x5864c1<_0x27a977[_0x99fa0(525)];_0x5864c1++)_0x52e8d9+=_0x27a977[_0x5864c1][_0x99fa0(525)];for(var _0x3c1ae8=new _0x1f0e4b(_0x52e8d9),_0x1f4622=0,_0x11f409=0,_0x1c97f3=_0x50efb0;_0x11f409<_0x1c97f3[_0x99fa0(525)];_0x11f409++){var _0x2c88dc=_0x1c97f3[_0x11f409];_0x3c1ae8[_0x99fa0(483)](_0x2c88dc,_0x1f4622),_0x1f4622+=_0x2c88dc["length"]}return _0x3c1ae8}},{key:_0x535021(523),value:function(_0x2ab39d){var _0x5a6a97=_0x535021;for(var _0x2d0945=null,_0x1750a4=null,_0x29c94a=null,_0xf39c3a=!1,_0xfcd344=!1,_0x5c31c6=0,_0x3e2a67=0;_0x3e2a67<_0x2ab39d["length"]-4;_0x3e2a67++){if(0!=_0x2ab39d[_0x3e2a67]||0!=_0x2ab39d[_0x3e2a67+1]||0!=_0x2ab39d[_0x3e2a67+2]||1!=_0x2ab39d[_0x3e2a67+3]||103!=_0x2ab39d[_0x3e2a67+4]&&39!=_0x2ab39d[_0x3e2a67+4]||(0!=_0x3e2a67?(_0xfcd344=!0,_0x2d0945=_0x2ab39d[_0x5a6a97(809)](_0x3e2a67),_0x5c31c6=_0x3e2a67):_0x2d0945=_0x2ab39d),0==_0x2ab39d[_0x3e2a67]&&0==_0x2ab39d[_0x3e2a67+1]&&0==_0x2ab39d[_0x3e2a67+2]&&1==_0x2ab39d[_0x3e2a67+3]&&(9==_0x2ab39d[_0x3e2a67+4]||6==_0x2ab39d[_0x3e2a67+4])){if(null==_0x2d0945)continue;null==_0x1750a4&&(_0x1750a4=_0x2ab39d["slice"](_0x5c31c6,_0x3e2a67),_0xf39c3a=!0)}if(0==_0x2ab39d[_0x3e2a67]&&0==_0x2ab39d[_0x3e2a67+1]&&0==_0x2ab39d[_0x3e2a67+2]&&1==_0x2ab39d[_0x3e2a67+3]&&(101==_0x2ab39d[_0x3e2a67+4]||37==_0x2ab39d[_0x3e2a67+4])){_0xf39c3a&&(_0x29c94a=_0x2ab39d[_0x5a6a97(809)](_0x3e2a67));break}}return _0xf39c3a?this["concatenate"](Uint8Array,_0x1750a4,_0x29c94a):_0xfcd344?_0x2d0945:_0x2ab39d}},{key:_0x535021(1369),value:function(_0x4cf3d1){return 0!=_0x4cf3d1[0]||0!=_0x4cf3d1[1]||0!=_0x4cf3d1[2]||1!=_0x4cf3d1[3]||9!=_0x4cf3d1[4]&&6!=_0x4cf3d1[4]?_0x4cf3d1:_0x4cf3d1["slice"](5)}},{key:_0x535021(622),value:function(_0x25abb6,_0x405425,_0x3a473f,_0x169584){var _0x5b6e1f=_0x535021,_0x2ccd52="";if(5==_0x405425)_0x2ccd52=_0x5b6e1f(848),console[_0x5b6e1f(1590)]("265 hard decoder");else{if(256==_0x405425){for(var _0x5e4c9f=0;_0x5e4c9f<_0x25abb6[_0x5b6e1f(525)];_0x5e4c9f++)if(103===_0x25abb6[_0x5e4c9f]||39===_0x25abb6[_0x5e4c9f]){for(var _0x1a17cf=_0x25abb6["subarray"](_0x5e4c9f+1,_0x5e4c9f+4),_0x2ccd52=_0x5b6e1f(1510),_0x418feb=0;_0x418feb<3;_0x418feb++){var _0x35ba22=_0x1a17cf[_0x418feb]["toString"](16);_0x2ccd52+=_0x35ba22=_0x35ba22[_0x5b6e1f(525)]<2?"0"+_0x35ba22:_0x35ba22}break}console["log"]("264 hard decoder")}else console[_0x5b6e1f(1590)](_0x5b6e1f(876))}var _0x6532a6={codec:_0x2ccd52,hardwareAcceleration:"prefer-hardware",optimizeForLatency:1};return 5!=_0x405425&&this[_0x5b6e1f(1222)]&&(_0x6532a6[_0x5b6e1f(453)]="prefer-software"),_0x6532a6}},{key:_0x535021(1358),value:function(_0x3122fd,_0xad72b4){var _0x2aff72=_0x535021;this[_0x2aff72(964)]!=_0xad72b4[_0x2aff72(964)]&&(this[_0x2aff72(964)]=_0xad72b4["frameRate"]),this[_0x2aff72(1454)]!=_0xad72b4[_0x2aff72(1454)]&&(this[_0x2aff72(1454)]=_0xad72b4[_0x2aff72(1454)]),this[_0x2aff72(1384)]!=_0xad72b4["height"]&&(this[_0x2aff72(1384)]=_0xad72b4["height"]),_0xad72b4[_0x2aff72(1222)]&&(this[_0x2aff72(1222)]=_0xad72b4[_0x2aff72(1222)]);var _0x590849=_0x3122fd;if(4!=this[_0x2aff72(1416)]&&null!=this[_0x2aff72(1349)]){if("configured"==this[_0x2aff72(1349)][_0x2aff72(1037)]){var _0x361a62=new EncodedVideoChunk({data:_0x590849,timestamp:_0xad72b4[_0x2aff72(432)],type:_0xad72b4[_0x2aff72(1392)]?_0x2aff72(581):_0x2aff72(945)});this[_0x2aff72(1349)][_0x2aff72(1027)](_0x361a62),_0x3122fd=_0x590849=null,_0xad72b4[_0x2aff72(952)]}else{if(_0xad72b4[_0x2aff72(1392)]&&_0x2aff72(1283)==this[_0x2aff72(1349)][_0x2aff72(1037)]){_0x361a62=this[_0x2aff72(622)](_0x3122fd,_0xad72b4[_0x2aff72(714)],_0xad72b4[_0x2aff72(1454)],_0xad72b4[_0x2aff72(1384)]);if(""==_0x361a62["codec"])return-1;this[_0x2aff72(1349)][_0x2aff72(1185)](_0x361a62),_0x590849=this[_0x2aff72(523)](_0x3122fd),this[_0x2aff72(1561)]=!1,_0x361a62=new EncodedVideoChunk({data:_0x590849,timestamp:_0xad72b4["timeStamp"],type:_0xad72b4[_0x2aff72(1392)]?_0x2aff72(581):_0x2aff72(945)}),this[_0x2aff72(1349)][_0x2aff72(1027)](_0x361a62),_0x590849=null}}}}},{key:_0x535021(602),value:function(_0x30ba29){var _0x4ac14f=_0x535021;"configured"==this[_0x4ac14f(1349)][_0x4ac14f(1037)]?(_0x30ba29["format"],_0x30ba29["codedWidth"],_0x30ba29["codedHeight"],_0x30ba29["displayWidth"],_0x30ba29["displayHeight"],_0x30ba29["duration"],_0x30ba29["timestamp"],this[_0x4ac14f(1113)][_0x4ac14f(962)](_0x30ba29),this[_0x4ac14f(345)]||(this[_0x4ac14f(345)]=!0)):_0x30ba29["close"]()}},{key:_0x535021(778),value:function(_0x31bbba){var _0x22081d=_0x535021,_0x1652b5=this;_0x31bbba[_0x22081d(559)],createImageBitmap(_0x31bbba)[_0x22081d(705)](function(_0x41f7f1){var _0x3dac8d=_0x22081d;_0x31bbba[_0x3dac8d(327)](),_0x1652b5[_0x3dac8d(1113)][_0x3dac8d(962)](_0x41f7f1)})}},{key:_0x535021(312),value:function(_0x1194e9){var _0x280d85=_0x535021;console[_0x280d85(1590)]("hardDecode reportError:"+_0x1194e9[_0x280d85(1321)]+_0x280d85(1099)+this[_0x280d85(1349)][_0x280d85(1037)]+",frameRate:"+this["frameRate"]),this[_0x280d85(345)]?this[_0x280d85(503)]=!0:(this[_0x280d85(1439)][_0x280d85(598)](),console[_0x280d85(1590)]("%cswitch hardVideoDecoder to softVideoDecoder",_0x280d85(692)))}},{key:"destroyDecoder",value:function(){var _0x2f1189=this;return new Promise(function(_0x1c48bd,_0x12ad3b){var _0x4dc4b6=a0_0x5477;_0x2f1189["clearDecoderObjBuffer"]()[_0x4dc4b6(705)](function(){var _0x173acc=_0x4dc4b6;null!=_0x2f1189["decoderObj"]&&(_0x173acc(897)!=_0x2f1189[_0x173acc(1349)][_0x173acc(1037)]&&_0x2f1189[_0x173acc(1349)]["close"](),console[_0x173acc(1590)](_0x173acc(1165)),_0x2f1189[_0x173acc(1349)]=null),_0x2f1189[_0x173acc(1416)]=4,_0x2f1189["decoderOutSuccess"]=!1,_0x2f1189[_0x173acc(1561)]=!0,_0x2f1189[_0x173acc(1500)]=!0,_0x2f1189[_0x173acc(1222)]=!1,_0x2f1189[_0x173acc(503)]=!1,_0x1c48bd()},function(){_0x12ad3b()})})}},{key:"resetDecoder",value:function(){var _0x334f43=this;return new Promise(function(_0x53e1a1,_0x458981){var _0x1b4901=a0_0x5477;_0x334f43[_0x1b4901(437)]()[_0x1b4901(705)](function(){var _0xa90927=_0x1b4901;_0x334f43["initDecoder"](),console[_0xa90927(1590)](_0xa90927(1073),"color:red"),_0x53e1a1()},function(){_0x458981()})})}},{key:_0x535021(1579),value:function(){var _0x337ebd=this;return new Promise(function(_0x2e07da,_0x5aa0a1){var _0x29e982=a0_0x5477;for(var _0x44e22a=_0x337ebd["ready_frames"][_0x29e982(525)],_0x3dce5c=0;_0x3dce5c<_0x44e22a;_0x3dce5c++)_0x337ebd[_0x29e982(1113)]["shift"]()[_0x29e982(327)]();_0x337ebd[_0x29e982(1113)][_0x29e982(387)](0,_0x337ebd[_0x29e982(1113)][_0x29e982(525)]),null!=_0x337ebd[_0x29e982(1349)]&&_0x29e982(600)==_0x337ebd[_0x29e982(1349)][_0x29e982(1037)]&&_0x337ebd[_0x29e982(1349)]["reset"](),_0x2e07da()})}},{key:_0x535021(1110),value:function(){var _0x5a6d82=_0x535021;return 0==this[_0x5a6d82(1349)][_0x5a6d82(1537)]&&0==this[_0x5a6d82(1113)]["length"]&&(this["decoderObj"][_0x5a6d82(1468)](),console[_0x5a6d82(1590)](_0x5a6d82(1468))),1}}]),_0x30cd76}(),_0x4780dc={SR_OK:1,SR_ERR_NOT_SUPPORT:2147483649,SR_ERR_SUBPORT:2147483650,SR_ERR_ALLOC_MEMORY:2147483651,SR_ERR_CALL_ORDER:2147483652,SR_ERR_PARAM:2147483653,SR_ERR_CAPTURE:2147483654,SR_ERR_SUBPORT_FULL:2147483655,SR_ERR_SHADER:2147483656,SR_ERR_3D_MODEL:2147483657,SR_ERR_FONT:2147483658,SR_ERR_MEMORY_LIMIT:2147483659,SR_ERR_WEBGPU_RESOURCE:2147483660,SR_ERR_CANVAS:2147483661,SR_ERR_FREETYPE_INIT:2147483662,SR_ERR_FREETYPE_RESOURCE:2147483663},_0x4e9094={SR_DE_NULL:0,SR_DE_FISH_ORIGINAL:1,SR_DE_FISH_PTZ_CEILING:2,SR_DE_FISH_PTZ_FLOOR:3,SR_DE_FISH_PTZ_WALL:4,SR_DE_FISH_PANORAMA_CEILING_360:5,SR_DE_FISH_PANORAMA_CEILING_180:6,SR_DE_FISH_PANORAMA_FLOOR_360:7,SR_DE_FISH_PANORAMA_FLOOR_180:8,SR_DE_FISH_PANORAMA_WALL:9,SR_DE_FISH_SEMISPHERE:10,SR_DE_EAGLEEYE_SEMISPHERE:11,SR_DE_EAGLEEYE_PLANE:12,SR_DE_FISH_CYLINDER_CEILING:13,SR_DE_FISH_CYLINDER_FLOOR:14,SR_DE_FISH_CYLINDER_SPLIT_CEILING:15,SR_DE_FISH_CYLINDER_SPLIT_FLOOR:16,SR_DE_FISH_PLANET:17,SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL:18,SR_DE_FISH_ARCSPHERE_VERTICAL_WALL:19,SR_DE_FISH_ANIMATION_SWITCH_CEILING:20,SR_DE_FISH_ANIMATION_SWITCH_FLOOR:21,SR_DE_PANORAMA_SPHERE:22,SR_DE_PANORAMA_PLANET:23},_0x20ba5d=0,_0x39b681=1,_0x305d9a=2,_0x55fbf0=3,_0xbfab18=4,_0x7c2613=0,_0x22e691=1,_0xbacc34=2,_0x178e93=1,_0x277fe2=2,_0x2b582f=3,_0x16efce=0,_0xfdfdb7=1,_0x1cc4c6=1,_0x11d463=2;function _0x152123(_0x53746c,_0x44cb7b,_0x2709e2){var _0x1a81da=a0_0x5477;_0x44cb7b in _0x53746c?Object[_0x1a81da(645)](_0x53746c,_0x44cb7b,{value:_0x2709e2,enumerable:!0,configurable:!0,writable:!0}):_0x53746c[_0x44cb7b]=_0x2709e2}function _0x4d6057(_0x57942d,_0xa1cf15,_0x2bb9e2,_0x58b694){var _0x190742=a0_0x5477;return _0x57942d[_0x190742(494)](0)<<24|_0xa1cf15[_0x190742(494)](0)<<16|_0x2bb9e2[_0x190742(494)](0)<<8|_0x58b694[_0x190742(494)](0)}var _0x50e478=null,_0x3becaf=_0x5dd832(function _0x55205c(){var _0x2ac168=a0_0x5477;_0x56ad3b(this,_0x55205c),_0x152123(this,_0x2ac168(844),function(){var _0x5ec095=_0x2ac168,_0x5c791f=_0x392749(_0x5d56c9()[_0x5ec095(460)](function _0x1bc9c8(_0x3a9dca,_0x3c78c3,_0x57d21b){var _0x51267e=_0x5ec095,_0x4938c5;return _0x5d56c9()[_0x51267e(894)](function(_0x264f73){var _0x18e695=_0x51267e;for(;;)switch(_0x264f73["prev"]=_0x264f73[_0x18e695(811)]){case 0:null==_0x50e478&&((_0x4938c5=document[_0x18e695(1546)](_0x18e695(1237)))[_0x18e695(1378)]=_0x18e695(953),_0x4938c5["src"]=_0x3a9dca,_0x4938c5[_0x18e695(1173)]=function(){var _0x212f88=_0x18e695;window[_0x212f88(384)]()[_0x212f88(705)](function(_0x50accb){_0x50e478=_0x50accb,_0x3c78c3(_0x57d21b)})},document[_0x18e695(1051)][_0x18e695(1175)](_0x4938c5));case 1:case _0x18e695(974):return _0x264f73[_0x18e695(1476)]()}},_0x1bc9c8)}));return function(_0x40ef65,_0x1816bd,_0x93b416){var _0xd15fa=_0x5ec095;return _0x5c791f[_0xd15fa(1089)](this,arguments)}}()),_0x152123(this,"Error_String",function(_0x1ee3ce){var _0x4e9973=_0x2ac168;return _0x50e478[_0x4e9973(1401)](_0x1ee3ce)}),_0x152123(this,"Library_Version",function(_0x11b647){var _0x5da3f0=_0x2ac168,_0x3c250a=[0],_0x12b7da=[0],_0x499217=[0];return _0x50e478[_0x5da3f0(1583)](_0x11b647["bind"],_0x3c250a,_0x12b7da,_0x499217),{major:_0x3c250a[0],minor:_0x12b7da[0],patch:_0x499217[0]}}),_0x152123(this,"Init_FreeType",function(_0x62c18a){var _0x45678f=_0x2ac168;if(null!=_0x50e478)return _0x50e478[_0x45678f(1375)](_0x62c18a[_0x45678f(979)])}),_0x152123(this,"Done_FreeType",function(_0x44a673){var _0x1eadaa=_0x2ac168;if(null!=_0x50e478)return _0x50e478[_0x1eadaa(792)](_0x44a673[_0x1eadaa(979)])}),_0x152123(this,_0x2ac168(883),function(_0x530440,_0x34e130,_0x445596,_0x1a84ea){var _0x114695=_0x2ac168;if(null!=_0x50e478)return _0x50e478[_0x114695(1338)](_0x530440[_0x114695(979)],_0x34e130,_0x445596,_0x1a84ea[_0x114695(979)])}),_0x152123(this,_0x2ac168(1310),function(_0x4fd8e1){var _0x14dfa6=_0x2ac168;if(null!=_0x50e478)return _0x50e478[_0x14dfa6(853)](_0x4fd8e1[_0x14dfa6(979)])}),_0x152123(this,_0x2ac168(530),function(_0x3ede40,_0x1c5b4c){if(null!=_0x50e478)return _0x50e478["FT_Get_Char_Index"](_0x3ede40["bind"],_0x1c5b4c)}),_0x152123(this,_0x2ac168(1186),function(_0x45b139,_0x1a2dcf){var _0x4ab085=_0x2ac168,_0x3bbac7=2<arguments[_0x4ab085(525)]&&void 0!==arguments[2]?arguments[2]:_0x51f6fb[_0x4ab085(971)];if(null!=_0x50e478)return _0x50e478["FT_Load_Char"](_0x45b139[_0x4ab085(979)],_0x1a2dcf,_0x3bbac7)}),_0x152123(this,_0x2ac168(354),function(_0x17e0f2,_0x19f162,_0x573d18,_0x664281,_0x49030a){var _0x8b0bdc=_0x2ac168;if(null!=_0x50e478)return _0x50e478[_0x8b0bdc(1270)](_0x17e0f2[_0x8b0bdc(979)],_0x19f162,_0x573d18,_0x664281,_0x49030a)}),_0x152123(this,_0x2ac168(1431),function(_0x106c79,_0x5da81e,_0x5a6cf3){var _0x2ef6a3=_0x2ac168;if(null!=_0x50e478)return _0x50e478[_0x2ef6a3(764)](_0x106c79[_0x2ef6a3(979)],_0x5da81e,_0x5a6cf3)}),_0x152123(this,_0x2ac168(1273),function(_0x248099){var _0x2a739d=_0x2ac168,_0x51fd05=1<arguments[_0x2a739d(525)]&&void 0!==arguments[1]?arguments[1]:_0x39a6b1[_0x2a739d(800)];if(null!=_0x50e478)return _0x50e478[_0x2a739d(1118)](_0x248099,_0x51fd05)}),_0x152123(this,_0x2ac168(623),function(_0x437e22,_0xd734d5,_0x3bb041,_0x2ed3d1){var _0x3c1919=_0x2ac168,_0x194fc6=4<arguments[_0x3c1919(525)]&&void 0!==arguments[4]?arguments[4]:new _0xd9e74a;if(null!=_0x50e478)return _0x50e478[_0x3c1919(740)](_0x437e22["bind"],_0xd734d5,_0x3bb041,_0x2ed3d1,_0x194fc6)}),_0x152123(this,_0x2ac168(889),function(_0x5b7415,_0x2a527a,_0x32a27b){var _0x46660b=_0x2ac168;if(null!=_0x50e478)return _0x50e478[_0x46660b(1007)](_0x5b7415,_0x2a527a,_0x32a27b)})}),_0x47dede=((_0x13e316=_0x299b8b=_0x299b8b||{})[_0x13e316["Ok"]=0]="Ok",_0x13e316[_0x13e316[_0x372e98(996)]=1]=_0x372e98(996),_0x13e316[_0x13e316[_0x372e98(653)]=2]="Unknown_File_Format",_0x13e316[_0x13e316[_0x372e98(803)]=3]=_0x372e98(803),_0x13e316[_0x13e316[_0x372e98(807)]=4]=_0x372e98(807),_0x13e316[_0x13e316[_0x372e98(1059)]=5]="Lower_Module_Version",_0x13e316[_0x13e316[_0x372e98(1481)]=6]=_0x372e98(1481),_0x13e316[_0x13e316[_0x372e98(688)]=7]="Unimplemented_Feature",_0x13e316[_0x13e316["Invalid_Table"]=8]=_0x372e98(1448),_0x13e316[_0x13e316[_0x372e98(1031)]=9]=_0x372e98(1031),_0x13e316[_0x13e316[_0x372e98(1289)]=10]=_0x372e98(1289),_0x13e316[_0x13e316[_0x372e98(1460)]=11]=_0x372e98(1460),_0x13e316[_0x13e316[_0x372e98(827)]=12]=_0x372e98(827),_0x13e316[_0x13e316[_0x372e98(1034)]=16]=_0x372e98(1034),_0x13e316[_0x13e316[_0x372e98(1013)]=17]="Invalid_Character_Code",_0x13e316[_0x13e316[_0x372e98(627)]=18]=_0x372e98(627),_0x13e316[_0x13e316[_0x372e98(748)]=19]=_0x372e98(748),_0x13e316[_0x13e316[_0x372e98(1102)]=20]=_0x372e98(1102),_0x13e316[_0x13e316[_0x372e98(1471)]=21]=_0x372e98(1471),_0x13e316[_0x13e316[_0x372e98(557)]=22]="Too_Many_Hints",_0x13e316[_0x13e316[_0x372e98(736)]=23]=_0x372e98(736),_0x13e316[_0x13e316["Invalid_Handle"]=32]=_0x372e98(542),_0x13e316[_0x13e316[_0x372e98(1332)]=33]="Invalid_Library_Handle",_0x13e316[_0x13e316[_0x372e98(887)]=34]="Invalid_Driver_Handle",_0x13e316[_0x13e316[_0x372e98(859)]=35]=_0x372e98(859),_0x13e316[_0x13e316["Invalid_Size_Handle"]=36]=_0x372e98(392),_0x13e316[_0x13e316[_0x372e98(1368)]=37]=_0x372e98(1368),_0x13e316[_0x13e316[_0x372e98(608)]=38]="Invalid_CharMap_Handle",_0x13e316[_0x13e316[_0x372e98(511)]=39]="Invalid_Cache_Handle",_0x13e316[_0x13e316[_0x372e98(898)]=40]=_0x372e98(898),_0x13e316[_0x13e316[_0x372e98(936)]=48]=_0x372e98(936),_0x13e316[_0x13e316["Too_Many_Extensions"]=49]=_0x372e98(679),_0x13e316[_0x13e316[_0x372e98(1121)]=64]=_0x372e98(1121),_0x13e316[_0x13e316[_0x372e98(1390)]=65]=_0x372e98(1390),_0x13e316[_0x13e316[_0x372e98(638)]=81]=_0x372e98(638),_0x13e316[_0x13e316[_0x372e98(1513)]=82]=_0x372e98(1513),_0x13e316[_0x13e316[_0x372e98(524)]=83]=_0x372e98(524),_0x13e316[_0x13e316[_0x372e98(385)]=84]=_0x372e98(385),_0x13e316[_0x13e316[_0x372e98(821)]=85]=_0x372e98(821),_0x13e316[_0x13e316["Invalid_Frame_Operation"]=86]=_0x372e98(546),_0x13e316[_0x13e316[_0x372e98(403)]=87]=_0x372e98(403),_0x13e316[_0x13e316[_0x372e98(1550)]=88]=_0x372e98(1550),_0x13e316[_0x13e316["Raster_Uninitialized"]=96]="Raster_Uninitialized",_0x13e316[_0x13e316[_0x372e98(1534)]=97]=_0x372e98(1534),_0x13e316[_0x13e316[_0x372e98(1493)]=98]=_0x372e98(1493),_0x13e316[_0x13e316[_0x372e98(1050)]=99]=_0x372e98(1050),_0x13e316[_0x13e316["Too_Many_Caches"]=112]=_0x372e98(1406),_0x13e316[_0x13e316[_0x372e98(1191)]=128]=_0x372e98(1191),_0x13e316[_0x13e316[_0x372e98(1319)]=129]="Too_Few_Arguments",_0x13e316[_0x13e316["Stack_Overflow"]=130]=_0x372e98(434),_0x13e316[_0x13e316[_0x372e98(702)]=131]=_0x372e98(702),_0x13e316[_0x13e316[_0x372e98(538)]=132]="Bad_Argument",_0x13e316[_0x13e316[_0x372e98(346)]=133]="Divide_By_Zero",_0x13e316[_0x13e316[_0x372e98(1281)]=134]=_0x372e98(1281),_0x13e316[_0x13e316[_0x372e98(1495)]=135]=_0x372e98(1495),_0x13e316[_0x13e316["ENDF_In_Exec_Stream"]=136]=_0x372e98(849),_0x13e316[_0x13e316[_0x372e98(553)]=137]=_0x372e98(553),_0x13e316[_0x13e316[_0x372e98(865)]=138]=_0x372e98(865),_0x13e316[_0x13e316[_0x372e98(637)]=139]=_0x372e98(637),_0x13e316[_0x13e316[_0x372e98(1428)]=140]="Too_Many_Function_Defs",_0x13e316[_0x13e316[_0x372e98(1506)]=141]=_0x372e98(1506),_0x13e316[_0x13e316[_0x372e98(1560)]=142]="Table_Missing",_0x13e316[_0x13e316[_0x372e98(1297)]=143]="Horiz_Header_Missing",_0x13e316[_0x13e316[_0x372e98(910)]=144]=_0x372e98(910),_0x13e316[_0x13e316[_0x372e98(568)]=145]="Name_Table_Missing",_0x13e316[_0x13e316[_0x372e98(1435)]=146]=_0x372e98(1435),_0x13e316[_0x13e316[_0x372e98(1389)]=147]="Hmtx_Table_Missing",_0x13e316[_0x13e316[_0x372e98(975)]=148]="Post_Table_Missing",_0x13e316[_0x13e316["Invalid_Horiz_Metrics"]=149]=_0x372e98(382),_0x13e316[_0x13e316[_0x372e98(324)]=150]="Invalid_CharMap_Format",_0x13e316[_0x13e316[_0x372e98(620)]=151]=_0x372e98(620),_0x13e316[_0x13e316["Invalid_Vert_Metrics"]=152]="Invalid_Vert_Metrics",_0x13e316[_0x13e316[_0x372e98(1008)]=153]=_0x372e98(1008),_0x13e316[_0x13e316[_0x372e98(1213)]=154]=_0x372e98(1213),_0x13e316[_0x13e316[_0x372e98(1449)]=155]=_0x372e98(1449),_0x13e316[_0x13e316["DEF_In_Glyf_Bytecode"]=156]=_0x372e98(1231),_0x13e316[_0x13e316["Missing_Bitmap"]=157]=_0x372e98(495),_0x13e316[_0x13e316[_0x372e98(566)]=160]=_0x372e98(566),_0x13e316[_0x13e316[_0x372e98(718)]=161]=_0x372e98(718),_0x13e316[_0x13e316[_0x372e98(1225)]=162]=_0x372e98(1225),_0x13e316[_0x13e316[_0x372e98(1234)]=163]=_0x372e98(1234),_0x13e316[_0x13e316[_0x372e98(662)]=164]="Glyph_Too_Big",_0x13e316[_0x13e316[_0x372e98(442)]=176]="Missing_Startfont_Field",_0x13e316[_0x13e316[_0x372e98(618)]=177]=_0x372e98(618),_0x13e316[_0x13e316[_0x372e98(464)]=178]="Missing_Size_Field",_0x13e316[_0x13e316[_0x372e98(888)]=179]=_0x372e98(888),_0x13e316[_0x13e316["Missing_Chars_Field"]=180]=_0x372e98(999),_0x13e316[_0x13e316[_0x372e98(1144)]=181]="Missing_Startchar_Field",_0x13e316[_0x13e316[_0x372e98(788)]=182]=_0x372e98(788),_0x13e316[_0x13e316[_0x372e98(1093)]=183]=_0x372e98(1093),_0x13e316[_0x13e316["Bbx_Too_Big"]=184]=_0x372e98(895),_0x13e316[_0x13e316[_0x372e98(1288)]=185]="Corrupted_Font_Header",_0x13e316[_0x13e316[_0x372e98(735)]=186]=_0x372e98(735),(_0x13e316={NONE:0,0:_0x372e98(672)})[_0x13e316[_0x372e98(1412)]=_0x4d6057("c","o","m","p")]=_0x372e98(1412),_0x13e316[_0x13e316[_0x372e98(339)]=_0x4d6057("b","i","t","s")]="BITMAP",_0x13e316[_0x13e316[_0x372e98(1022)]=_0x4d6057("o","u","t","l")]="OUTLINE",_0x13e316[_0x13e316[_0x372e98(477)]=_0x4d6057("p","l","o","t")]=_0x372e98(477),_0xd9e74a=_0x5dd832(function _0x2b052c(){_0x56ad3b(this,_0x2b052c),this["x"]=0,this["y"]=0}),_0x1cdd19=function(){var _0x1f675d=_0x372e98;function _0x15d4e1(){_0x56ad3b(this,_0x15d4e1),this["bind"]=[null]}return _0x5dd832(_0x15d4e1,[{key:_0x1f675d(520),value:function(){var _0x59529c=_0x1f675d,_0x53b5e9=bind["FT_Init_FreeType"](this[_0x59529c(979)]);if(_0x53b5e9!==_0x299b8b["Ok"])throw new Error("Library:init "+_0x53b5e9[_0x59529c(1503)]())}},{key:"done",value:function(){var _0x4d350c=_0x1f675d,_0x326b4f=bind[_0x4d350c(792)](this[_0x4d350c(979)]);if(_0x326b4f!==_0x299b8b["Ok"])throw new Error("Library:done "+_0x326b4f[_0x4d350c(1503)]())}}]),_0x15d4e1}(),_0x3baf56=function(){var _0x32942b=_0x372e98;function _0xe3cf27(){var _0x510d49=a0_0x5477;_0x56ad3b(this,_0xe3cf27),this[_0x510d49(979)]=[null]}return _0x5dd832(_0xe3cf27,[{key:_0x32942b(1479),get:function(){var _0x5b9c46=_0x32942b;if(null===this[_0x5b9c46(979)][0])throw new Error;return this["bind"][0]}},{key:_0x32942b(1518),get:function(){var _0x5d53f0=_0x32942b;return this[_0x5d53f0(1479)][_0x5d53f0(1518)]}},{key:_0x32942b(709),get:function(){var _0x538017=_0x32942b;return this["_bind"][_0x538017(709)]}},{key:_0x32942b(1276),get:function(){var _0x40d7ef=_0x32942b;return this[_0x40d7ef(1479)][_0x40d7ef(1276)]}},{key:_0x32942b(797),get:function(){var _0x4a28e2=_0x32942b;return this[_0x4a28e2(1479)][_0x4a28e2(797)]}},{key:_0x32942b(1293),get:function(){var _0x20201a=_0x32942b;return this[_0x20201a(1479)][_0x20201a(1293)]}},{key:_0x32942b(1312),get:function(){var _0x29d615=_0x32942b;return this[_0x29d615(1479)][_0x29d615(1312)]}},{key:_0x32942b(1489),get:function(){var _0x2ce249=_0x32942b;return this[_0x2ce249(1479)][_0x2ce249(1489)]}},{key:_0x32942b(673),get:function(){var _0x590a99=_0x32942b;return this[_0x590a99(1479)][_0x590a99(673)]}},{key:_0x32942b(475),get:function(){var _0xbaec04=_0x32942b;return this[_0xbaec04(1479)]["units_per_EM"]}},{key:_0x32942b(1143),get:function(){var _0x16f132=_0x32942b;return this[_0x16f132(1479)][_0x16f132(1143)]}},{key:_0x32942b(470),get:function(){return this["_bind"]["descender"]}},{key:"height",get:function(){var _0x3f6f3f=_0x32942b;return this[_0x3f6f3f(1479)]["height"]}},{key:"max_advance_width",get:function(){var _0x32f323=_0x32942b;return this[_0x32f323(1479)][_0x32f323(1496)]}},{key:_0x32942b(860),get:function(){var _0x434d15=_0x32942b;return this[_0x434d15(1479)][_0x434d15(860)]}},{key:_0x32942b(417),get:function(){var _0x318592=_0x32942b;return this[_0x318592(1479)][_0x318592(417)]}},{key:_0x32942b(590),get:function(){var _0x2f9e01=_0x32942b;return this[_0x2f9e01(1479)][_0x2f9e01(590)]}},{key:_0x32942b(347),get:function(){var _0x6c08e3=_0x32942b;return this[_0x6c08e3(1479)]["glyph"]}}]),_0xe3cf27}(),(_0x13e316=_0x51f6fb=_0x51f6fb||{})[_0x13e316[_0x372e98(971)]=0]=_0x372e98(971),_0x13e316[_0x13e316[_0x372e98(1526)]=1]=_0x372e98(1526),_0x13e316[_0x13e316[_0x372e98(861)]=2]=_0x372e98(861),_0x13e316[_0x13e316[_0x372e98(851)]=4]="RENDER",_0x13e316[_0x13e316[_0x372e98(913)]=8]=_0x372e98(913),_0x13e316[_0x13e316["VERTICAL_LAYOUT"]=16]=_0x372e98(1223),_0x13e316[_0x13e316[_0x372e98(615)]=32]="FORCE_AUTOHINT",_0x13e316[_0x13e316["CROP_BITMAP"]=64]=_0x372e98(1320),_0x13e316[_0x13e316[_0x372e98(340)]=128]=_0x372e98(340),_0x13e316[_0x13e316[_0x372e98(425)]=512]="IGNORE_GLOBAL_ADVANCE_WIDTH",_0x13e316[_0x13e316[_0x372e98(1253)]=1024]="NO_RECURSE",_0x13e316[_0x13e316[_0x372e98(1543)]=2048]="IGNORE_TRANSFORM",_0x13e316[_0x13e316["MONOCHROME"]=4096]=_0x372e98(1393),_0x13e316[_0x13e316["LINEAR_DESIGN"]=8192]=_0x372e98(1202),_0x13e316[_0x13e316[_0x372e98(1445)]=32768]=_0x372e98(1445),_0x13e316[_0x13e316[_0x372e98(1071)]=1048576]=_0x372e98(1071),_0x13e316[_0x13e316["COMPUTE_METRICS"]=2097152]=_0x372e98(1017),_0x13e316[_0x13e316["BITMAP_METRICS_ONLY"]=4194304]="BITMAP_METRICS_ONLY",_0x13e316[_0x13e316[_0x372e98(455)]=256]=_0x372e98(455),_0x13e316[_0x13e316[_0x372e98(377)]=16384]=_0x372e98(377),(_0x13e316=_0x39a6b1=_0x39a6b1||{})[_0x13e316[_0x372e98(800)]=0]=_0x372e98(800),_0x13e316[_0x13e316[_0x372e98(1413)]=1]=_0x372e98(1413),_0x13e316[_0x13e316[_0x372e98(872)]=2]=_0x372e98(872),_0x13e316[_0x13e316["LCD"]=3]=_0x372e98(1587),_0x13e316[_0x13e316[_0x372e98(808)]=4]=_0x372e98(808),_0x13e316[_0x13e316[_0x372e98(701)]=5]=_0x372e98(701),_0x372e98(1475)),_0x16083a=_0x372e98(641),_0x5d4200=_0x372e98(1035),_0x53f981=.05,_0x453d9f=1e-6,_0x1f58a6=3.1415926,_0x99ac9a=.78539815,_0x3016a4=1e-6,_0x36f8f5=_0x372e98(1011)!=typeof Float32Array?Float32Array:Array;Math["hypot"]||(Math[_0x372e98(378)]=function(){for(var _0x19fd03=0,_0x151579=arguments["length"];_0x151579--;)_0x19fd03+=arguments[_0x151579]*arguments[_0x151579];return Math["sqrt"](_0x19fd03)});function _0x38a311(){var _0x519191=new _0x36f8f5(16);return _0x36f8f5!=Float32Array&&(_0x519191[1]=0,_0x519191[2]=0,_0x519191[3]=0,_0x519191[4]=0,_0x519191[6]=0,_0x519191[7]=0,_0x519191[8]=0,_0x519191[9]=0,_0x519191[11]=0,_0x519191[12]=0,_0x519191[13]=0,_0x519191[14]=0),_0x519191[0]=1,_0x519191[5]=1,_0x519191[10]=1,_0x519191[15]=1,_0x519191}function _0x33ed84(_0x17a1ae,_0x541f53,_0x5cfe6){var _0x4d06b3=_0x541f53[0],_0xc4e270=_0x541f53[1],_0x38cdcf=_0x541f53[2],_0x64534e=_0x541f53[3],_0x35eece=_0x541f53[4],_0x4be468=_0x541f53[5],_0x18d7d9=_0x541f53[6],_0x33c32b=_0x541f53[7],_0x1fff18=_0x541f53[8],_0x1bb26e=_0x541f53[9],_0x1561aa=_0x541f53[10],_0x227afd=_0x541f53[11],_0x1d1c40=_0x541f53[12],_0x55804f=_0x541f53[13],_0x211599=_0x541f53[14],_0x541f53=_0x541f53[15],_0x32e996=_0x5cfe6[0],_0x5c02da=_0x5cfe6[1],_0x43928c=_0x5cfe6[2],_0x2481ae=_0x5cfe6[3];return _0x17a1ae[0]=_0x32e996*_0x4d06b3+_0x5c02da*_0x35eece+_0x43928c*_0x1fff18+_0x2481ae*_0x1d1c40,_0x17a1ae[1]=_0x32e996*_0xc4e270+_0x5c02da*_0x4be468+_0x43928c*_0x1bb26e+_0x2481ae*_0x55804f,_0x17a1ae[2]=_0x32e996*_0x38cdcf+_0x5c02da*_0x18d7d9+_0x43928c*_0x1561aa+_0x2481ae*_0x211599,_0x17a1ae[3]=_0x32e996*_0x64534e+_0x5c02da*_0x33c32b+_0x43928c*_0x227afd+_0x2481ae*_0x541f53,_0x32e996=_0x5cfe6[4],_0x5c02da=_0x5cfe6[5],_0x43928c=_0x5cfe6[6],_0x2481ae=_0x5cfe6[7],_0x17a1ae[4]=_0x32e996*_0x4d06b3+_0x5c02da*_0x35eece+_0x43928c*_0x1fff18+_0x2481ae*_0x1d1c40,_0x17a1ae[5]=_0x32e996*_0xc4e270+_0x5c02da*_0x4be468+_0x43928c*_0x1bb26e+_0x2481ae*_0x55804f,_0x17a1ae[6]=_0x32e996*_0x38cdcf+_0x5c02da*_0x18d7d9+_0x43928c*_0x1561aa+_0x2481ae*_0x211599,_0x17a1ae[7]=_0x32e996*_0x64534e+_0x5c02da*_0x33c32b+_0x43928c*_0x227afd+_0x2481ae*_0x541f53,_0x32e996=_0x5cfe6[8],_0x5c02da=_0x5cfe6[9],_0x43928c=_0x5cfe6[10],_0x2481ae=_0x5cfe6[11],_0x17a1ae[8]=_0x32e996*_0x4d06b3+_0x5c02da*_0x35eece+_0x43928c*_0x1fff18+_0x2481ae*_0x1d1c40,_0x17a1ae[9]=_0x32e996*_0xc4e270+_0x5c02da*_0x4be468+_0x43928c*_0x1bb26e+_0x2481ae*_0x55804f,_0x17a1ae[10]=_0x32e996*_0x38cdcf+_0x5c02da*_0x18d7d9+_0x43928c*_0x1561aa+_0x2481ae*_0x211599,_0x17a1ae[11]=_0x32e996*_0x64534e+_0x5c02da*_0x33c32b+_0x43928c*_0x227afd+_0x2481ae*_0x541f53,_0x32e996=_0x5cfe6[12],_0x5c02da=_0x5cfe6[13],_0x43928c=_0x5cfe6[14],_0x2481ae=_0x5cfe6[15],_0x17a1ae[12]=_0x32e996*_0x4d06b3+_0x5c02da*_0x35eece+_0x43928c*_0x1fff18+_0x2481ae*_0x1d1c40,_0x17a1ae[13]=_0x32e996*_0xc4e270+_0x5c02da*_0x4be468+_0x43928c*_0x1bb26e+_0x2481ae*_0x55804f,_0x17a1ae[14]=_0x32e996*_0x38cdcf+_0x5c02da*_0x18d7d9+_0x43928c*_0x1561aa+_0x2481ae*_0x211599,_0x17a1ae[15]=_0x32e996*_0x64534e+_0x5c02da*_0x33c32b+_0x43928c*_0x227afd+_0x2481ae*_0x541f53,_0x17a1ae}function _0x33112c(_0x2c9f14,_0x8cbbaf,_0x1f18c9,_0x4015bb){var _0x2f1e59=_0x372e98,_0x11bfe1,_0xf7d2cc,_0x903176,_0x664590,_0x2802f4,_0x561200,_0x2ef2ac,_0x281922,_0x36d21d,_0x42b033,_0x409f39,_0x28013a,_0x4ebc9c,_0x61d28a,_0x44dc5,_0x5f706,_0x363d61,_0x3e3999,_0x1dd997,_0x5c6bcb,_0x57fcb0=_0x4015bb[0],_0x409841=_0x4015bb[1],_0x4015bb=_0x4015bb[2],_0x5d94e6=Math["hypot"](_0x57fcb0,_0x409841,_0x4015bb);_0x5d94e6<_0x3016a4||(_0x57fcb0*=_0x5d94e6=1/_0x5d94e6,_0x409841*=_0x5d94e6,_0x4015bb*=_0x5d94e6,_0x5d94e6=Math[_0x2f1e59(514)](_0x1f18c9),_0x1f18c9=Math[_0x2f1e59(1268)](_0x1f18c9),_0xf7d2cc=_0x8cbbaf[0],_0x903176=_0x8cbbaf[1],_0x664590=_0x8cbbaf[2],_0x2802f4=_0x8cbbaf[3],_0x561200=_0x8cbbaf[4],_0x2ef2ac=_0x8cbbaf[5],_0x281922=_0x8cbbaf[6],_0x36d21d=_0x8cbbaf[7],_0x42b033=_0x8cbbaf[8],_0x409f39=_0x8cbbaf[9],_0x28013a=_0x8cbbaf[10],_0x4ebc9c=_0x8cbbaf[11],_0x44dc5=_0x57fcb0*_0x409841*(_0x11bfe1=1-_0x1f18c9)-_0x4015bb*_0x5d94e6,_0x5f706=_0x409841*_0x409841*_0x11bfe1+_0x1f18c9,_0x363d61=_0x4015bb*_0x409841*_0x11bfe1+_0x57fcb0*_0x5d94e6,_0x3e3999=_0x57fcb0*_0x4015bb*_0x11bfe1+_0x409841*_0x5d94e6,_0x1dd997=_0x409841*_0x4015bb*_0x11bfe1-_0x57fcb0*_0x5d94e6,_0x5c6bcb=_0x4015bb*_0x4015bb*_0x11bfe1+_0x1f18c9,_0x2c9f14[0]=_0xf7d2cc*(_0x1f18c9=_0x57fcb0*_0x57fcb0*_0x11bfe1+_0x1f18c9)+_0x561200*(_0x61d28a=_0x409841*_0x57fcb0*_0x11bfe1+_0x4015bb*_0x5d94e6)+_0x42b033*(_0x4015bb=_0x4015bb*_0x57fcb0*_0x11bfe1-_0x409841*_0x5d94e6),_0x2c9f14[1]=_0x903176*_0x1f18c9+_0x2ef2ac*_0x61d28a+_0x409f39*_0x4015bb,_0x2c9f14[2]=_0x664590*_0x1f18c9+_0x281922*_0x61d28a+_0x28013a*_0x4015bb,_0x2c9f14[3]=_0x2802f4*_0x1f18c9+_0x36d21d*_0x61d28a+_0x4ebc9c*_0x4015bb,_0x2c9f14[4]=_0xf7d2cc*_0x44dc5+_0x561200*_0x5f706+_0x42b033*_0x363d61,_0x2c9f14[5]=_0x903176*_0x44dc5+_0x2ef2ac*_0x5f706+_0x409f39*_0x363d61,_0x2c9f14[6]=_0x664590*_0x44dc5+_0x281922*_0x5f706+_0x28013a*_0x363d61,_0x2c9f14[7]=_0x2802f4*_0x44dc5+_0x36d21d*_0x5f706+_0x4ebc9c*_0x363d61,_0x2c9f14[8]=_0xf7d2cc*_0x3e3999+_0x561200*_0x1dd997+_0x42b033*_0x5c6bcb,_0x2c9f14[9]=_0x903176*_0x3e3999+_0x2ef2ac*_0x1dd997+_0x409f39*_0x5c6bcb,_0x2c9f14[10]=_0x664590*_0x3e3999+_0x281922*_0x1dd997+_0x28013a*_0x5c6bcb,_0x2c9f14[11]=_0x2802f4*_0x3e3999+_0x36d21d*_0x1dd997+_0x4ebc9c*_0x5c6bcb,_0x8cbbaf!==_0x2c9f14&&(_0x2c9f14[12]=_0x8cbbaf[12],_0x2c9f14[13]=_0x8cbbaf[13],_0x2c9f14[14]=_0x8cbbaf[14],_0x2c9f14[15]=_0x8cbbaf[15]))}var _0x4bb2db=function(_0x28c535,_0x47ad0d,_0x42f033,_0x11bc2,_0x45444d){var _0xca6310=_0x372e98;return _0x47ad0d=1/Math[_0xca6310(616)](_0x47ad0d/2),_0x28c535[0]=_0x47ad0d/_0x42f033,_0x28c535[1]=0,_0x28c535[2]=0,_0x28c535[3]=0,_0x28c535[4]=0,_0x28c535[5]=_0x47ad0d,_0x28c535[6]=0,_0x28c535[7]=0,_0x28c535[8]=0,_0x28c535[9]=0,_0x28c535[11]=-1,_0x28c535[12]=0,_0x28c535[13]=0,_0x28c535[15]=0,null!=_0x45444d&&_0x45444d!==1/0?(_0x28c535[10]=(_0x45444d+_0x11bc2)*(_0x42f033=1/(_0x11bc2-_0x45444d)),_0x28c535[14]=2*_0x45444d*_0x11bc2*_0x42f033):(_0x28c535[10]=-1,_0x28c535[14]=-2*_0x11bc2),_0x28c535},_0x3fb921=function(_0x3a07a2,_0x358d89,_0x389081,_0x4f78f3,_0x216400,_0x447f6b,_0x5f2244){var _0x130d3b=1/(_0x358d89-_0x389081),_0x3f8d92=1/(_0x4f78f3-_0x216400),_0x2d5c11=1/(_0x447f6b-_0x5f2244);return _0x3a07a2[0]=-2*_0x130d3b,_0x3a07a2[1]=0,_0x3a07a2[2]=0,_0x3a07a2[3]=0,_0x3a07a2[4]=0,_0x3a07a2[5]=-2*_0x3f8d92,_0x3a07a2[6]=0,_0x3a07a2[7]=0,_0x3a07a2[8]=0,_0x3a07a2[9]=0,_0x3a07a2[10]=2*_0x2d5c11,_0x3a07a2[11]=0,_0x3a07a2[12]=(_0x358d89+_0x389081)*_0x130d3b,_0x3a07a2[13]=(_0x216400+_0x4f78f3)*_0x3f8d92,_0x3a07a2[14]=(_0x5f2244+_0x447f6b)*_0x2d5c11,_0x3a07a2[15]=1,_0x3a07a2};function _0x3fd301(){var _0x55bc67=new _0x36f8f5(3);return _0x36f8f5!=Float32Array&&(_0x55bc67[0]=0,_0x55bc67[1]=0,_0x55bc67[2]=0),_0x55bc67}function _0x4b3df5(_0x48a7ec,_0x11af08,_0x26e412){var _0x4991c3=new _0x36f8f5(3);return _0x4991c3[0]=_0x48a7ec,_0x4991c3[1]=_0x11af08,_0x4991c3[2]=_0x26e412,_0x4991c3}_0x3fd301(),_0x13e316=new _0x36f8f5(4),_0x36f8f5!=Float32Array&&(_0x13e316[0]=0,_0x13e316[1]=0,_0x13e316[2]=0,_0x13e316[3]=0);function _0x22e5af(){var _0x370319=new _0x36f8f5(4);return _0x36f8f5!=Float32Array&&(_0x370319[0]=0,_0x370319[1]=0,_0x370319[2]=0),_0x370319[3]=1,_0x370319}_0x3fd301(),_0x4b3df5(1,0,0),_0x4b3df5(0,1,0),_0x22e5af(),_0x22e5af(),_0x13e316=new _0x36f8f5(9),_0x36f8f5!=Float32Array&&(_0x13e316[1]=0,_0x13e316[2]=0,_0x13e316[3]=0,_0x13e316[5]=0,_0x13e316[6]=0,_0x13e316[7]=0),_0x13e316[0]=1,_0x13e316[4]=1,_0x13e316[8]=1,_0x13e316=new _0x36f8f5(2),_0x36f8f5!=Float32Array&&(_0x13e316[0]=0,_0x13e316[1]=0);var _0x4d9a25=function(){var _0x2e41cf=_0x372e98;function _0x279859(){var _0x397460=a0_0x5477;_0x56ad3b(this,_0x279859),this[_0x397460(852)]=.785,this[_0x397460(1488)]=1,this[_0x397460(1240)]=.02,this[_0x397460(1505)]=1e3,this[_0x397460(1337)]=0,this[_0x397460(1095)]=0,this[_0x397460(970)]=0,this[_0x397460(649)]=1,this["bOrtho"]=!1,this["matView"]=_0x38a311(),this[_0x397460(1308)]=_0x38a311(),this[_0x397460(1169)]=_0x4b3df5(0,0,0),this["vecCenter"]=_0x4b3df5(0,0,100),this[_0x397460(1581)]=_0x4b3df5(0,1,0)}return _0x5dd832(_0x279859,[{key:_0x2e41cf(338),value:function(_0x40730e){this["fTheta"]=_0x40730e}},{key:"GetYaw",value:function(){var _0x14b7dd=_0x2e41cf;return this[_0x14b7dd(1337)]}},{key:"SetPitch",value:function(_0x30970f){var _0x50bda0=_0x2e41cf;this[_0x50bda0(1095)]=_0x30970f}},{key:_0x2e41cf(1177),value:function(){return this["fAlpha"]}},{key:"SetRoll",value:function(_0x256821){var _0x47ea6b=_0x2e41cf;this[_0x47ea6b(970)]=_0x256821}},{key:_0x2e41cf(348),value:function(){return this["fBeta"]}},{key:_0x2e41cf(995),value:function(_0x5c0851){var _0x4ff080=_0x2e41cf;this[_0x4ff080(649)]=_0x5c0851}},{key:"GetScale",value:function(){var _0x36a91d=_0x2e41cf;return this[_0x36a91d(649)]}},{key:_0x2e41cf(659),value:function(_0x19d3df){var _0x2bf723=_0x2e41cf;this[_0x2bf723(852)]=_0x19d3df}},{key:_0x2e41cf(791),value:function(_0x56e56f){this["fAspect"]=_0x56e56f}},{key:_0x2e41cf(1400),value:function(_0x3601d6){var _0x210a9f=_0x2e41cf;this[_0x210a9f(1240)]=_0x3601d6}},{key:"SetFar",value:function(_0x227206){var _0x95fd7e=_0x2e41cf;this[_0x95fd7e(1505)]=_0x227206}},{key:_0x2e41cf(1136),value:function(_0x2de6d3){var _0x4d49a9=_0x2e41cf;this[_0x4d49a9(1517)]=_0x2de6d3}},{key:_0x2e41cf(311),value:function(_0xb06711,_0x1f2c4d){var _0xaaf662=_0x2e41cf,_0x20da16,_0x522946,_0x36f473,_0x51e6b3,_0x5554e9,_0x29ec4a;_0xb06711<=0||_0x1f2c4d<=0||(1==this[_0xaaf662(1517)]?_0x3fb921(this["matProj"],0,_0xb06711,_0x1f2c4d,0,this[_0xaaf662(1240)],this[_0xaaf662(1505)]):(_0x20da16=this[_0xaaf662(852)]/_0x1f58a6*180,_0x4bb2db(this["matProj"],_0x20da16,_0xb06711/_0x1f2c4d,this[_0xaaf662(1240)],this[_0xaaf662(1505)])),this[_0xaaf662(1169)]=_0x4b3df5(0,0,this["fScale"]),this[_0xaaf662(506)]=_0x4b3df5(0,0,0),this[_0xaaf662(1581)]=_0x4b3df5(0,1,0),_0x20da16=_0x4b3df5(1,0,0),_0xb06711=_0x4b3df5(0,1,0),_0x1f2c4d=_0x4b3df5(0,0,1),function(_0x4ff897,_0x3bf75c,_0x4389e5,_0x3bb717){var _0x351c20=_0xaaf662,_0x16ac66,_0x50de56,_0x53b533,_0x453371,_0x1cf10e=_0x3bf75c[0],_0x2e7a63=_0x3bf75c[1],_0x3bf75c=_0x3bf75c[2],_0x182f07=_0x3bb717[0],_0x320c38=_0x3bb717[1],_0x3bb717=_0x3bb717[2],_0x28df0c=_0x4389e5[0],_0x1bd645=_0x4389e5[1],_0x4389e5=_0x4389e5[2];if(Math[_0x351c20(1502)](_0x1cf10e-_0x28df0c)<_0x3016a4&&Math[_0x351c20(1502)](_0x2e7a63-_0x1bd645)<_0x3016a4&&Math["abs"](_0x3bf75c-_0x4389e5)<_0x3016a4)return(_0x453371=_0x4ff897)[0]=1,_0x453371[1]=0,_0x453371[2]=0,_0x453371[3]=0,_0x453371[4]=0,_0x453371[5]=1,_0x453371[6]=0,_0x453371[7]=0,_0x453371[8]=0,_0x453371[9]=0,_0x453371[10]=1,_0x453371[11]=0,_0x453371[12]=0,_0x453371[13]=0,_0x453371[14]=0,_0x453371[15]=1;_0x453371=_0x3bf75c-_0x4389e5,_0x16ac66=_0x320c38*(_0x453371*=_0x1bd645=1/Math[_0x351c20(378)](_0x4389e5=_0x1cf10e-_0x28df0c,_0x28df0c=_0x2e7a63-_0x1bd645,_0x453371))-_0x3bb717*(_0x28df0c*=_0x1bd645),_0x3bb717=_0x3bb717*(_0x4389e5*=_0x1bd645)-_0x182f07*_0x453371,_0x182f07=_0x182f07*_0x28df0c-_0x320c38*_0x4389e5,(_0x1bd645=Math[_0x351c20(378)](_0x16ac66,_0x3bb717,_0x182f07))?(_0x16ac66*=_0x1bd645=1/_0x1bd645,_0x3bb717*=_0x1bd645,_0x182f07*=_0x1bd645):_0x182f07=_0x3bb717=_0x16ac66=0,_0x320c38=_0x28df0c*_0x182f07-_0x453371*_0x3bb717,_0x50de56=_0x453371*_0x16ac66-_0x4389e5*_0x182f07,_0x53b533=_0x4389e5*_0x3bb717-_0x28df0c*_0x16ac66,(_0x1bd645=Math[_0x351c20(378)](_0x320c38,_0x50de56,_0x53b533))?(_0x320c38*=_0x1bd645=1/_0x1bd645,_0x50de56*=_0x1bd645,_0x53b533*=_0x1bd645):_0x53b533=_0x50de56=_0x320c38=0,_0x4ff897[0]=_0x16ac66,_0x4ff897[1]=_0x320c38,_0x4ff897[2]=_0x4389e5,_0x4ff897[3]=0,_0x4ff897[4]=_0x3bb717,_0x4ff897[5]=_0x50de56,_0x4ff897[6]=_0x28df0c,_0x4ff897[7]=0,_0x4ff897[8]=_0x182f07,_0x4ff897[9]=_0x53b533,_0x4ff897[10]=_0x453371,_0x4ff897[11]=0,_0x4ff897[12]=-(_0x16ac66*_0x1cf10e+_0x3bb717*_0x2e7a63+_0x182f07*_0x3bf75c),_0x4ff897[13]=-(_0x320c38*_0x1cf10e+_0x50de56*_0x2e7a63+_0x53b533*_0x3bf75c),_0x4ff897[14]=-(_0x4389e5*_0x1cf10e+_0x28df0c*_0x2e7a63+_0x453371*_0x3bf75c),_0x4ff897[15]=1}(_0x522946=_0x38a311(),this[_0xaaf662(1169)],this["vecCenter"],this[_0xaaf662(1581)]),_0x36f473=_0x38a311(),_0x51e6b3=_0x38a311(),_0x5554e9=_0x38a311(),_0x29ec4a=_0x38a311(),_0x33112c(_0x51e6b3,_0x36f473,-this[_0xaaf662(1095)],_0x20da16),_0x33112c(_0x5554e9,_0x51e6b3,-this[_0xaaf662(1337)],_0xb06711),_0x33112c(_0x29ec4a,_0x5554e9,-this[_0xaaf662(970)],_0x1f2c4d),_0x33ed84(this[_0xaaf662(956)],_0x522946,_0x29ec4a))}},{key:_0x2e41cf(998),value:function(){var _0x2a3d57=_0x2e41cf;return this[_0x2a3d57(956)]}},{key:_0x2e41cf(1210),value:function(){var _0x244d87=_0x2e41cf;return this[_0x244d87(1308)]}}]),_0x279859}(),_0x39092a=function(){var _0x1ef9d8=_0x372e98;function _0x336a72(){var _0x252946=a0_0x5477;_0x56ad3b(this,_0x336a72),this[_0x252946(863)]=null,this["ctx"]=null,this["videoShaderProgram"]=0,this[_0x252946(309)]=0,this[_0x252946(775)]=0,this["frameDisplayWidth"]=0,this[_0x252946(320)]=0,this[_0x252946(978)]=!1,this[_0x252946(355)]=!1,this[_0x252946(1023)]=!0,this[_0x252946(1571)]=0,this["nMaxPointNum"]=0,this[_0x252946(522)]=null,this[_0x252946(1394)]=null,this[_0x252946(1014)]=0,this["glLineClrBuffer"]=0,this[_0x252946(1256)]=0,this[_0x252946(1108)]=0,this[_0x252946(1065)]=null,this[_0x252946(603)]=null,this["nMaxFillBlockTriNum"]=0,this[_0x252946(1130)]=0,this[_0x252946(1085)]=0,this[_0x252946(560)]=0,this[_0x252946(1096)]=!1,this[_0x252946(782)]=null,this["FreetypeLibHandle"]=null,this["FTFace"]=null,this[_0x252946(411)]=null,this[_0x252946(890)]=0,this[_0x252946(1313)]=0,this["nFontColorTexture"]=0,this[_0x252946(644)]=0,this[_0x252946(551)]=0,this[_0x252946(1328)]=0,this[_0x252946(941)]=[],this[_0x252946(828)]=!1,this[_0x252946(429)]=null,this["enDisplayEffect"]=_0x4e9094["SR_DE_NULL"],this[_0x252946(1491)]=-1,this[_0x252946(582)]=!1,this["pSemiSpherePos"]=null,this["pSemiSphereTex"]=null,this["nSemiSpherePosNum"]=0,this[_0x252946(1566)]=0,this["nSemiSphereTexSize"]=0,this[_0x252946(334)]=null,this[_0x252946(371)]=null,this[_0x252946(801)]=0,this[_0x252946(1109)]=0,this[_0x252946(749)]=0,this["fCylinderHeight"]=0,this[_0x252946(493)]=0,this[_0x252946(983)]=!1,this[_0x252946(482)]=null,this["fRotateX"]=0,this[_0x252946(669)]=0,this["fScale"]=0,this[_0x252946(1333)]=null,this[_0x252946(1075)]=null,this[_0x252946(1230)]=null,this[_0x252946(1411)]=null,this[_0x252946(762)]=!0}var _0x256da5;return _0x5dd832(_0x336a72,[{key:_0x1ef9d8(1359),value:function(_0x2c969e,_0x2c9d41){var _0x45774c=_0x1ef9d8,_0x57cb0e=this[_0x45774c(926)];if(null==_0x57cb0e||null==_0x2c969e||null==_0x2c9d41)return-1;var _0x44b334=_0x57cb0e[_0x45774c(855)](_0x57cb0e[_0x45774c(353)]);if(_0x57cb0e["shaderSource"](_0x44b334,_0x2c969e),_0x57cb0e[_0x45774c(1307)](_0x44b334),!_0x57cb0e["getShaderParameter"](_0x44b334,_0x57cb0e[_0x45774c(629)]))return console[_0x45774c(1590)](_0x45774c(407)+_0x57cb0e[_0x45774c(813)](_0x44b334)),-1;_0x2c969e=_0x57cb0e["createShader"](_0x57cb0e[_0x45774c(539)]);if(_0x57cb0e[_0x45774c(532)](_0x2c969e,_0x2c9d41),_0x57cb0e[_0x45774c(1307)](_0x2c969e),!_0x57cb0e[_0x45774c(757)](_0x2c969e,_0x57cb0e[_0x45774c(629)]))return console[_0x45774c(1590)](_0x45774c(906)+_0x57cb0e[_0x45774c(813)](_0x2c969e)),-1;return _0x2c9d41=_0x57cb0e["createProgram"](),_0x57cb0e[_0x45774c(730)](_0x2c9d41,_0x44b334),_0x57cb0e[_0x45774c(730)](_0x2c9d41,_0x2c969e),_0x57cb0e[_0x45774c(1573)](_0x2c9d41),_0x57cb0e["getProgramParameter"](_0x2c9d41,_0x57cb0e[_0x45774c(1149)])?(_0x57cb0e[_0x45774c(1205)](_0x44b334),_0x57cb0e[_0x45774c(1205)](_0x2c969e),_0x2c9d41):(console[_0x45774c(1590)]("Program failed to compile: "+_0x57cb0e[_0x45774c(950)](_0x2c9d41)),-1)}},{key:_0x1ef9d8(1483),value:function(_0x1d2cfd){var _0x513f79=_0x1ef9d8;return null==_0x1d2cfd?_0x4780dc[_0x513f79(650)]:(this[_0x513f79(863)]=_0x1d2cfd,this[_0x513f79(926)]=this[_0x513f79(863)]["getContext"](_0x513f79(1549)),this[_0x513f79(926)]||(this[_0x513f79(926)]=this[_0x513f79(863)][_0x513f79(1021)]("webgl")||this[_0x513f79(863)]["getContext"](_0x513f79(763)),this[_0x513f79(978)]=!0,console[_0x513f79(1590)]("only support webgl1")),this[_0x513f79(926)]?_0x4780dc["SR_OK"]:(console[_0x513f79(1590)]("your browser does not support WebGL"),_0x4780dc[_0x513f79(1129)]))}},{key:"SR_Draw",value:function(_0x2f89ac){var _0x30ee0c=_0x1ef9d8;if(null==this[_0x30ee0c(926)])return _0x4780dc["SR_ERR_CALL_ORDER"];if(null==_0x2f89ac)return _0x4780dc["SR_ERR_PARAM"];if(0==this["videoShaderProgram"]||0==this[_0x30ee0c(309)]||0==this[_0x30ee0c(775)])return _0x4780dc[_0x30ee0c(1538)];if(this[_0x30ee0c(1584)]==_0x2f89ac[_0x30ee0c(1501)]&&this[_0x30ee0c(320)]==_0x2f89ac[_0x30ee0c(526)]||(this[_0x30ee0c(1584)]=_0x2f89ac[_0x30ee0c(1501)],this[_0x30ee0c(320)]=_0x2f89ac[_0x30ee0c(526)]),1==this["bRecreateTex"]){0!=this[_0x30ee0c(1571)]&&(_0x1125cf=this[_0x30ee0c(1571)],this["ctx"]["deleteTexture"](_0x1125cf),this[_0x30ee0c(1571)]=0);var _0x1125cf=this[_0x30ee0c(926)][_0x30ee0c(1514)]();if(_0x1125cf<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)]["bindTexture"](this[_0x30ee0c(926)]["TEXTURE_2D"],_0x1125cf),1==this["bAntialias"]?this[_0x30ee0c(926)][_0x30ee0c(760)](this[_0x30ee0c(926)][_0x30ee0c(588)],this["ctx"][_0x30ee0c(373)],this[_0x30ee0c(926)]["LINEAR_MIPMAP_NEAREST"]):this[_0x30ee0c(926)][_0x30ee0c(760)](this[_0x30ee0c(926)][_0x30ee0c(588)],this["ctx"][_0x30ee0c(373)],this[_0x30ee0c(926)]["LINEAR"]),this[_0x30ee0c(926)][_0x30ee0c(760)](this[_0x30ee0c(926)]["TEXTURE_2D"],this[_0x30ee0c(926)][_0x30ee0c(715)],this[_0x30ee0c(926)][_0x30ee0c(406)]),this[_0x30ee0c(926)][_0x30ee0c(760)](this[_0x30ee0c(926)][_0x30ee0c(588)],this[_0x30ee0c(926)][_0x30ee0c(976)],this[_0x30ee0c(926)]["CLAMP_TO_EDGE"]),this[_0x30ee0c(926)]["texParameteri"](this[_0x30ee0c(926)][_0x30ee0c(588)],this[_0x30ee0c(926)]["TEXTURE_WRAP_T"],this["ctx"]["CLAMP_TO_EDGE"]),this[_0x30ee0c(1571)]=_0x1125cf,this[_0x30ee0c(1023)]=!1}this[_0x30ee0c(926)][_0x30ee0c(756)](this[_0x30ee0c(1257)]),this["ctx"][_0x30ee0c(1044)](this["ctx"][_0x30ee0c(1331)],this[_0x30ee0c(309)]),_0x1125cf=this[_0x30ee0c(926)][_0x30ee0c(416)](this[_0x30ee0c(1257)],"xy");if(_0x1125cf<0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)]["vertexAttribPointer"](_0x1125cf,3,this[_0x30ee0c(926)][_0x30ee0c(1473)],!1,0,0),this[_0x30ee0c(926)][_0x30ee0c(1362)](_0x1125cf),this["ctx"][_0x30ee0c(1044)](this[_0x30ee0c(926)][_0x30ee0c(1331)],this[_0x30ee0c(775)]),_0x1125cf=this[_0x30ee0c(926)][_0x30ee0c(416)](this["videoShaderProgram"],"uv");if(_0x1125cf<0)return _0x4780dc["SR_ERR_WEBGL_RESOURCE"];this[_0x30ee0c(926)][_0x30ee0c(1193)](_0x1125cf,2,this["ctx"][_0x30ee0c(1473)],!1,0,0),this[_0x30ee0c(926)][_0x30ee0c(1362)](_0x1125cf),this[_0x30ee0c(926)][_0x30ee0c(1044)](this[_0x30ee0c(926)][_0x30ee0c(1331)],null);var _0x1126a6=this["enDisplayEffect"];switch(_0x1126a6){case _0x4e9094[_0x30ee0c(1347)]:break;case _0x4e9094["SR_DE_FISH_ORIGINAL"]:case _0x4e9094[_0x30ee0c(1282)]:case _0x4e9094[_0x30ee0c(474)]:case _0x4e9094[_0x30ee0c(994)]:case _0x4e9094[_0x30ee0c(1379)]:case _0x4e9094[_0x30ee0c(1212)]:case _0x4e9094[_0x30ee0c(472)]:case _0x4e9094["SR_DE_FISH_PANORAMA_FLOOR_180"]:case _0x4e9094["SR_DE_FISH_PANORAMA_WALL"]:if(null==this[_0x30ee0c(429)])return _0x4780dc[_0x30ee0c(1538)];var _0x1e5fdc=[],_0xb39a72=this["pFishParamManager"][_0x30ee0c(796)](this[_0x30ee0c(1491)],_0x1e5fdc);if(_0x4780dc[_0x30ee0c(593)]!=_0xb39a72)return _0xb39a72;if(_0x4e9094[_0x30ee0c(677)]==_0x1126a6){_0xb39a72=this["ctx"][_0x30ee0c(893)](this["videoShaderProgram"],_0x30ee0c(368));if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)][_0x30ee0c(871)](_0xb39a72,_0x1e5fdc["bBlack"]),_0xb39a72=this[_0x30ee0c(926)]["getUniformLocation"](this[_0x30ee0c(1257)],_0x30ee0c(818));if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this["ctx"][_0x30ee0c(871)](_0xb39a72,_0x1e5fdc[_0x30ee0c(818)])}if(_0x4e9094["SR_DE_FISH_PTZ_CEILING"]==_0x1126a6||_0x4e9094[_0x30ee0c(474)]==_0x1126a6||_0x4e9094["SR_DE_FISH_PTZ_WALL"]==_0x1126a6){_0xb39a72=this[_0x30ee0c(926)][_0x30ee0c(893)](this[_0x30ee0c(1257)],_0x30ee0c(988));if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this["ctx"]["uniform1f"](_0xb39a72,_0x1e5fdc[_0x30ee0c(780)]),_0xb39a72=this[_0x30ee0c(926)]["getUniformLocation"](this["videoShaderProgram"],_0x30ee0c(1211));if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)]["uniform1f"](_0xb39a72,_0x1e5fdc["fSinH"]),_0xb39a72=this["ctx"]["getUniformLocation"](this["videoShaderProgram"],_0x30ee0c(927));if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)]["uniform1f"](_0xb39a72,_0x1e5fdc[_0x30ee0c(1025)]),_0xb39a72=this[_0x30ee0c(926)][_0x30ee0c(893)](this["videoShaderProgram"],_0x30ee0c(451));if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)]["uniform1f"](_0xb39a72,_0x1e5fdc["fSinV"]),_0xb39a72=this[_0x30ee0c(926)][_0x30ee0c(893)](this[_0x30ee0c(1257)],_0x30ee0c(1580));if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)][_0x30ee0c(375)](_0xb39a72,_0x1e5fdc[_0x30ee0c(1580)])}if(_0x4e9094[_0x30ee0c(1379)]==_0x1126a6||_0x4e9094[_0x30ee0c(1212)]==_0x1126a6||_0x4e9094[_0x30ee0c(472)]==_0x1126a6||_0x4e9094["SR_DE_FISH_PANORAMA_FLOOR_180"]==_0x1126a6){_0xb39a72=this[_0x30ee0c(926)]["getUniformLocation"](this["videoShaderProgram"],"fAngle");if(_0xb39a72<=0)return _0x4780dc["SR_ERR_WEBGL_RESOURCE"];this[_0x30ee0c(926)][_0x30ee0c(375)](_0xb39a72,_0x1e5fdc[_0x30ee0c(1485)])}_0xb39a72=this["ctx"]["getUniformLocation"](this["videoShaderProgram"],"fRX1");if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this["ctx"][_0x30ee0c(375)](_0xb39a72,_0x1e5fdc[_0x30ee0c(473)]),_0xb39a72=this[_0x30ee0c(926)][_0x30ee0c(893)](this["videoShaderProgram"],_0x30ee0c(332));if(_0xb39a72<=0)return _0x4780dc["SR_ERR_WEBGL_RESOURCE"];this["ctx"][_0x30ee0c(375)](_0xb39a72,_0x1e5fdc[_0x30ee0c(919)]),_0xb39a72=this[_0x30ee0c(926)][_0x30ee0c(893)](this[_0x30ee0c(1257)],_0x30ee0c(737));if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)]["uniform1f"](_0xb39a72,_0x1e5fdc[_0x30ee0c(1171)]),_0xb39a72=this["ctx"][_0x30ee0c(893)](this[_0x30ee0c(1257)],"fRY2");if(_0xb39a72<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)][_0x30ee0c(375)](_0xb39a72,_0x1e5fdc[_0x30ee0c(825)]);break;case _0x4e9094[_0x30ee0c(1010)]:this[_0x30ee0c(482)][_0x30ee0c(995)](this[_0x30ee0c(649)]),this[_0x30ee0c(482)]["SetPitch"](3.14-this[_0x30ee0c(420)]),this[_0x30ee0c(482)]["SetYaw"](-this[_0x30ee0c(669)]),this["pCamera"][_0x30ee0c(311)](this[_0x30ee0c(863)][_0x30ee0c(1454)],this[_0x30ee0c(863)][_0x30ee0c(1384)]);var _0xb39a72=this[_0x30ee0c(482)][_0x30ee0c(998)](),_0x1e5fdc=this[_0x30ee0c(482)][_0x30ee0c(1210)](),_0x263e49=this["ctx"][_0x30ee0c(893)](this[_0x30ee0c(1257)],_0x30ee0c(956));if(_0x263e49<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)][_0x30ee0c(1541)](_0x263e49,!1,_0xb39a72),_0x263e49=this[_0x30ee0c(926)][_0x30ee0c(893)](this["videoShaderProgram"],_0x30ee0c(1308));if(_0x263e49<=0)return _0x4780dc[_0x30ee0c(528)];this["ctx"]["uniformMatrix4fv"](_0x263e49,!1,_0x1e5fdc);break;case _0x4e9094["SR_DE_FISH_CYLINDER_CEILING"]:case _0x4e9094[_0x30ee0c(405)]:this["pCamera"][_0x30ee0c(995)](this["fScale"]),this[_0x30ee0c(482)][_0x30ee0c(515)](-this["fRotateX"]),this[_0x30ee0c(482)][_0x30ee0c(338)](-this[_0x30ee0c(669)]),this["pCamera"][_0x30ee0c(311)](this[_0x30ee0c(863)][_0x30ee0c(1454)],this[_0x30ee0c(863)][_0x30ee0c(1384)]),_0xb39a72=this[_0x30ee0c(482)][_0x30ee0c(998)](),_0x263e49=this[_0x30ee0c(482)][_0x30ee0c(1210)](),_0x1e5fdc=this["ctx"]["getUniformLocation"](this[_0x30ee0c(1257)],_0x30ee0c(956));if(_0x1e5fdc<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)]["uniformMatrix4fv"](_0x1e5fdc,!1,_0xb39a72),_0x1e5fdc=this[_0x30ee0c(926)][_0x30ee0c(893)](this[_0x30ee0c(1257)],_0x30ee0c(1308));if(_0x1e5fdc<=0)return _0x4780dc[_0x30ee0c(528)];this[_0x30ee0c(926)]["uniformMatrix4fv"](_0x1e5fdc,!1,_0x263e49)}if(this["canvas"]["width"]<=0||this["canvas"][_0x30ee0c(1384)]<=0)return _0x4780dc[_0x30ee0c(1129)];if(this[_0x30ee0c(926)][_0x30ee0c(349)](0,0,this[_0x30ee0c(863)][_0x30ee0c(1454)],this[_0x30ee0c(863)][_0x30ee0c(1384)]),this["ctx"]["clearColor"](0,0,0,1),this[_0x30ee0c(926)]["clear"](this[_0x30ee0c(926)][_0x30ee0c(744)]|this[_0x30ee0c(926)]["DEPTH_BUFFER_BIT"]),this[_0x30ee0c(983)]&&(this[_0x30ee0c(926)][_0x30ee0c(326)](this[_0x30ee0c(926)]["DEPTH_TEST"]),this[_0x30ee0c(926)][_0x30ee0c(610)](this["ctx"]["LESS"]),this["ctx"][_0x30ee0c(1383)](!0),1==this[_0x30ee0c(762)]?this["ctx"][_0x30ee0c(326)](this[_0x30ee0c(926)][_0x30ee0c(533)]):this[_0x30ee0c(926)]["disable"](this["ctx"][_0x30ee0c(533)])),this["ctx"][_0x30ee0c(1227)](this[_0x30ee0c(926)]["TEXTURE_2D"],0,this[_0x30ee0c(926)]["RGBA"],this["ctx"][_0x30ee0c(917)],this["ctx"][_0x30ee0c(1084)],_0x2f89ac),1==this[_0x30ee0c(355)]&&this[_0x30ee0c(926)][_0x30ee0c(450)](this["ctx"][_0x30ee0c(588)]),this["onlySupportedWebGL1"]||this[_0x30ee0c(926)][_0x30ee0c(314)](this[_0x30ee0c(926)][_0x30ee0c(1078)],0,1,0),0==this[_0x30ee0c(983)])this["ctx"][_0x30ee0c(908)](this["ctx"][_0x30ee0c(424)],0,4);else{if(this[_0x30ee0c(1198)]==_0x4e9094[_0x30ee0c(1010)]){if(this[_0x30ee0c(794)]<=0)return _0x4780dc["SR_ERR_CALL_ORDER"];this["ctx"][_0x30ee0c(908)](this[_0x30ee0c(926)][_0x30ee0c(1381)],0,this["nSemiSpherePosNum"])}else{if(this[_0x30ee0c(1198)]==_0x4e9094[_0x30ee0c(364)]){if(this[_0x30ee0c(801)]<=0)return _0x4780dc["SR_ERR_CALL_ORDER"];this[_0x30ee0c(926)]["drawArrays"](this[_0x30ee0c(926)]["TRIANGLES"],0,this[_0x30ee0c(801)])}}}return this[_0x30ee0c(926)][_0x30ee0c(756)](null),0==this[_0x30ee0c(582)]&&null!=this[_0x30ee0c(429)]&&-1!=(_0x1125cf=this["pFishParamManager"][_0x30ee0c(631)]())&&_0x1125cf==this[_0x30ee0c(1491)]&&this[_0x30ee0c(617)](),null!=this[_0x30ee0c(1333)]&&this[_0x30ee0c(1333)](this[_0x30ee0c(1230)]),null!=this[_0x30ee0c(1075)]&&this[_0x30ee0c(1075)](this[_0x30ee0c(1411)]),_0x4780dc[_0x30ee0c(593)]}},{key:_0x1ef9d8(617),value:function(){var _0x93a6ad=_0x1ef9d8;if(null==this[_0x93a6ad(429)])return _0x4780dc["SR_ERR_CALL_ORDER"];for(var _0xc774b9=this[_0x93a6ad(429)][_0x93a6ad(1062)](),_0x18e64d=0,_0x10b38b=[],_0x5b9dcf=(_0x10b38b["fR"]=0,_0x10b38b["fG"]=0,_0x10b38b["fB"]=0,_0x10b38b["fA"]=0,_0x4780dc[_0x93a6ad(593)]),_0x456f17=0;_0x456f17<32;++_0x456f17)if(0!=this[_0x93a6ad(429)]["IsPortAllocated"](_0x456f17)){if(_0x18e64d=2,_0x5b9dcf=this[_0x93a6ad(429)][_0x93a6ad(613)](_0x456f17,_0x10b38b),_0x4780dc[_0x93a6ad(593)]!=_0x5b9dcf)return _0x5b9dcf;1==this[_0x93a6ad(429)][_0x93a6ad(954)](_0x456f17)&&(_0x18e64d+=1);var _0x59e049=this[_0x93a6ad(429)][_0x93a6ad(631)]();if(_0x456f17!=_0x59e049&&_0xbacc34==_0xc774b9){if(_0x4e9094[_0x93a6ad(677)]==this["pFishParamManager"]["GetDisplayEffect"](_0x59e049)){var _0x8f86f9=[],_0x5b9dcf=this[_0x93a6ad(429)][_0x93a6ad(802)](_0x456f17,_0x8f86f9,_0xbacc34);if(_0x4780dc["SR_OK"]!=_0x5b9dcf)return _0x5b9dcf;if(null!=_0x8f86f9[_0x93a6ad(319)]&&0!=_0x8f86f9["nPointNum"]&&(_0x5b9dcf=this["SR_DrawLines"](_0x8f86f9[_0x93a6ad(319)],_0x8f86f9[_0x93a6ad(665)],!0,_0x10b38b,_0x18e64d,!1),_0x4780dc[_0x93a6ad(593)]!=_0x5b9dcf))return _0x5b9dcf}}else{if(_0x456f17!=_0x59e049&&_0x22e691==_0xc774b9){_0x8f86f9=[];if(_0x5b9dcf=this[_0x93a6ad(429)][_0x93a6ad(802)](_0x456f17,_0x8f86f9,_0x22e691),_0x4780dc[_0x93a6ad(593)]!=_0x5b9dcf)return _0x5b9dcf;if(null!=_0x8f86f9[_0x93a6ad(319)]&&0!=_0x8f86f9["nPointNum"]&&(_0x5b9dcf=this[_0x93a6ad(691)](_0x8f86f9["pstPoints"],_0x8f86f9[_0x93a6ad(665)],!0,_0x10b38b,_0x18e64d,!1),_0x4780dc[_0x93a6ad(593)]!=_0x5b9dcf))return _0x5b9dcf}}}return _0x4780dc["SR_OK"]}},{key:_0x1ef9d8(508),value:function(_0x5d8080,_0x3f88f0,_0x19dc8f){var _0x279bf8=_0x1ef9d8;if(null==this["ctx"])return _0x4780dc[_0x279bf8(1538)];if(null==_0x5d8080||_0x3f88f0<1||_0x19dc8f<2)return _0x4780dc[_0x279bf8(650)];for(var _0x18168e=0,_0x2d9840=0;_0x2d9840<_0x3f88f0;++_0x2d9840){if(null==_0x5d8080[_0x2d9840][_0x279bf8(319)]||_0x5d8080[_0x2d9840]["nPointNum"]<3||!0!==_0x5d8080[_0x2d9840][_0x279bf8(667)]||null==_0x5d8080[_0x2d9840][_0x279bf8(556)])return _0x4780dc[_0x279bf8(650)];_0x18168e+=_0x5d8080[_0x2d9840][_0x279bf8(665)]}if(_0x18168e!==_0x19dc8f)return _0x4780dc[_0x279bf8(650)];_0x19dc8f-=2*_0x3f88f0;if(_0x19dc8f>this[_0x279bf8(1038)]&&(this["pFillBlockPosVertices"]=null,this[_0x279bf8(603)]=null,this[_0x279bf8(1038)]=_0x19dc8f),0==this[_0x279bf8(1130)]&&(this[_0x279bf8(1130)]=this[_0x279bf8(926)]["createBuffer"](),0==this["glBlockPosBuffer"]))return _0x4780dc[_0x279bf8(528)];if(0==this[_0x279bf8(1085)]&&(this["glBlockClrBuffer"]=this[_0x279bf8(926)][_0x279bf8(1450)](),0==this[_0x279bf8(1085)]))return _0x4780dc[_0x279bf8(528)];if(null==this[_0x279bf8(1065)]){var _0x4cd1cb=this["nMaxFillBlockTriNum"];if(this[_0x279bf8(1065)]=new Float32Array(3*_0x4cd1cb*3),null==this[_0x279bf8(1065)])return _0x4780dc[_0x279bf8(694)]}if(this["pFillBlockPosVertices"][_0x279bf8(329)](0),null==this[_0x279bf8(603)]){_0x4cd1cb=this["nMaxFillBlockTriNum"];if(this[_0x279bf8(603)]=new Float32Array(4*_0x4cd1cb*3),null==this[_0x279bf8(603)])return _0x4780dc[_0x279bf8(694)]}this[_0x279bf8(603)][_0x279bf8(329)](0);for(var _0x55584f,_0x1369c0,_0x368337,_0x5c30be=0,_0x1ace99=0,_0x308456={},_0x242282={},_0x7b1654={},_0x91d4f7=0;_0x91d4f7<_0x3f88f0;++_0x91d4f7){_0x55584f=_0x5d8080[_0x91d4f7]["nPointNum"],_0x1369c0=_0x5d8080[_0x91d4f7]["pstPoints"],_0x368337=_0x5d8080[_0x91d4f7][_0x279bf8(556)],_0x308456["fX"]=2*_0x1369c0[0]["fX"]-1,_0x308456["fY"]=1-2*_0x1369c0[0]["fY"];for(var _0x5573b1=1;_0x5573b1<_0x55584f-1;_0x5573b1++)_0x242282["fX"]=2*_0x1369c0[_0x5573b1]["fX"]-1,_0x242282["fY"]=1-2*_0x1369c0[_0x5573b1]["fY"],_0x7b1654["fX"]=2*_0x1369c0[_0x5573b1+1]["fX"]-1,_0x7b1654["fY"]=1-2*_0x1369c0[_0x5573b1+1]["fY"],this[_0x279bf8(1065)][_0x5c30be++]=_0x308456["fX"],this[_0x279bf8(1065)][_0x5c30be++]=_0x308456["fY"],this[_0x279bf8(1065)][_0x5c30be++]=0,this[_0x279bf8(603)][_0x1ace99++]=_0x368337["fR"],this[_0x279bf8(603)][_0x1ace99++]=_0x368337["fG"],this[_0x279bf8(603)][_0x1ace99++]=_0x368337["fB"],this[_0x279bf8(603)][_0x1ace99++]=_0x368337["fA"],this["pFillBlockPosVertices"][_0x5c30be++]=_0x242282["fX"],this["pFillBlockPosVertices"][_0x5c30be++]=_0x242282["fY"],this[_0x279bf8(1065)][_0x5c30be++]=0,this[_0x279bf8(603)][_0x1ace99++]=_0x368337["fR"],this[_0x279bf8(603)][_0x1ace99++]=_0x368337["fG"],this["pFillBlockClrVertices"][_0x1ace99++]=_0x368337["fB"],this["pFillBlockClrVertices"][_0x1ace99++]=_0x368337["fA"],this["pFillBlockPosVertices"][_0x5c30be++]=_0x7b1654["fX"],this["pFillBlockPosVertices"][_0x5c30be++]=_0x7b1654["fY"],this[_0x279bf8(1065)][_0x5c30be++]=0,this[_0x279bf8(603)][_0x1ace99++]=_0x368337["fR"],this[_0x279bf8(603)][_0x1ace99++]=_0x368337["fG"],this["pFillBlockClrVertices"][_0x1ace99++]=_0x368337["fB"],this[_0x279bf8(603)][_0x1ace99++]=_0x368337["fA"]}if(0==this["nBlockShaderProgram"]&&(this["nBlockShaderProgram"]=this["CompileProgram"](_0x16083a,_0x5d4200),0==this[_0x279bf8(560)]))return _0x4780dc["SR_ERR_WEBGL_RESOURCE"];return this[_0x279bf8(926)][_0x279bf8(326)](this["ctx"]["BLEND"]),this[_0x279bf8(926)]["blendFunc"](this[_0x279bf8(926)][_0x279bf8(858)],this[_0x279bf8(926)][_0x279bf8(921)]),this["ctx"]["bindBuffer"](this[_0x279bf8(926)][_0x279bf8(1331)],this[_0x279bf8(1130)]),this[_0x279bf8(926)]["bufferData"](this[_0x279bf8(926)][_0x279bf8(1331)],this[_0x279bf8(1065)],this[_0x279bf8(926)][_0x279bf8(914)]),this["ctx"][_0x279bf8(1044)](this[_0x279bf8(926)]["ARRAY_BUFFER"],null),this[_0x279bf8(926)][_0x279bf8(1044)](this[_0x279bf8(926)]["ARRAY_BUFFER"],this[_0x279bf8(1085)]),this[_0x279bf8(926)][_0x279bf8(724)](this["ctx"][_0x279bf8(1331)],this[_0x279bf8(603)],this[_0x279bf8(926)][_0x279bf8(914)]),this[_0x279bf8(926)][_0x279bf8(1044)](this["ctx"][_0x279bf8(1331)],null),this[_0x279bf8(926)]["useProgram"](this["nBlockShaderProgram"]),this[_0x279bf8(926)]["bindBuffer"](this["ctx"][_0x279bf8(1331)],this[_0x279bf8(1130)]),_0x4cd1cb=this[_0x279bf8(926)][_0x279bf8(416)](this[_0x279bf8(560)],_0x279bf8(1052)),this[_0x279bf8(926)][_0x279bf8(1362)](_0x4cd1cb),this[_0x279bf8(926)][_0x279bf8(1193)](_0x4cd1cb,3,this[_0x279bf8(926)][_0x279bf8(1473)],!1,0,0),this[_0x279bf8(926)][_0x279bf8(1044)](this[_0x279bf8(926)][_0x279bf8(1331)],null),this[_0x279bf8(926)][_0x279bf8(1044)](this[_0x279bf8(926)][_0x279bf8(1331)],this[_0x279bf8(1085)]),_0x4cd1cb=this["ctx"]["getAttribLocation"](this[_0x279bf8(560)],_0x279bf8(882)),this["ctx"][_0x279bf8(1362)](_0x4cd1cb),this[_0x279bf8(926)][_0x279bf8(1193)](_0x4cd1cb,4,this[_0x279bf8(926)][_0x279bf8(1473)],!1,0,0),this["ctx"][_0x279bf8(1044)](this["ctx"][_0x279bf8(1331)],null),this[_0x279bf8(926)]["drawArrays"](this[_0x279bf8(926)]["TRIANGLES"],0,3*_0x19dc8f),this[_0x279bf8(926)]["useProgram"](null),this[_0x279bf8(926)][_0x279bf8(1076)](this[_0x279bf8(926)][_0x279bf8(661)]),_0x4780dc[_0x279bf8(593)]}},{key:"ComputeLinePoint",value:function(_0x2dd688,_0x20e3b2){var _0x111e9f=_0x1ef9d8;if(null==_0x2dd688||_0x20e3b2<1)return _0x4780dc[_0x111e9f(650)];if(null==this[_0x111e9f(522)]||null==this[_0x111e9f(1394)])return _0x4780dc[_0x111e9f(1538)];for(var _0x14d407,_0x241253,_0x179aa5=0,_0x4e1b18=0,_0xb53bfa=0,_0x2d5c82=0,_0x5d0b39=0,_0x30ca58=0,_0x1098c1=0,_0x2289e0=0,_0x5704a1=0;_0x5704a1<_0x20e3b2;++_0x5704a1){var _0x2836bd=[],_0x1af2ee=_0x2dd688[_0x5704a1][_0x111e9f(665)];if(!(_0x1af2ee<=0)){for(var _0x115df9=0;_0x115df9<_0x1af2ee;++_0x115df9){var _0x2267c4={};_0x2267c4["fX"]=_0x2dd688[_0x5704a1][_0x111e9f(319)][_0x115df9]["fX"],_0x2267c4["fX"]=2*_0x2267c4["fX"]-1,_0x2267c4["fY"]=_0x2dd688[_0x5704a1]["pstPoints"][_0x115df9]["fY"],_0x2267c4["fY"]=1-2*_0x2267c4["fY"],_0x2836bd["push"](_0x2267c4)}if(this["canvas"][_0x111e9f(1454)]<=0||this[_0x111e9f(863)][_0x111e9f(1384)]<=0)return _0x4780dc["SR_ERR_CANVAS"];if(_0x14d407=3.5*_0x2dd688[_0x5704a1][_0x111e9f(609)]/this["canvas"][_0x111e9f(1454)],_0x241253=3.5*_0x2dd688[_0x5704a1][_0x111e9f(609)]/this[_0x111e9f(863)]["height"],_0x14d407<=0||_0x241253<=0)return _0x4780dc[_0x111e9f(650)];var _0x56edc4=_0x2dd688[_0x5704a1][_0x111e9f(556)];if(null==_0x56edc4)return _0x4780dc["SR_ERR_PARAM"];for(var _0x3ff9b1=0;_0x3ff9b1<_0x1af2ee-1;++_0x3ff9b1)_0x4e1b18=_0x2836bd[_0x3ff9b1+1]["fX"]-_0x2836bd[_0x3ff9b1]["fX"],_0xb53bfa=_0x2836bd[_0x3ff9b1+1]["fY"]-_0x2836bd[_0x3ff9b1]["fY"],_0x179aa5=Math[_0x111e9f(1540)](_0x4e1b18*_0x4e1b18+_0xb53bfa*_0xb53bfa),Math[_0x111e9f(1502)](+_0x179aa5)<1e-6||(_0x5d0b39=_0x241253*_0x4e1b18/_0x179aa5/2,this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1]["fX"]+(_0x2d5c82=-_0x14d407*_0xb53bfa/_0x179aa5/2),this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1]["fY"]+_0x5d0b39,this["pLinePosVertices"][_0x1098c1++]=-1,this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fR"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fG"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1+1]["fX"]-_0x2d5c82,this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1+1]["fY"]-_0x5d0b39,this[_0x111e9f(522)][_0x1098c1++]=1,this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fR"],this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fG"],this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1]["fX"]-_0x2d5c82,this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1]["fY"]-_0x5d0b39,this["pLinePosVertices"][_0x1098c1++]=1,this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fR"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fG"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fB"],this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1]["fX"]+_0x2d5c82,this["pLinePosVertices"][_0x1098c1++]=_0x2836bd[_0x3ff9b1]["fY"]+_0x5d0b39,this[_0x111e9f(522)][_0x1098c1++]=-1,this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fR"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fG"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1+1]["fX"]+_0x2d5c82,this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1+1]["fY"]+_0x5d0b39,this["pLinePosVertices"][_0x1098c1++]=-1,this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fR"],this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fG"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x3ff9b1+1]["fX"]-_0x2d5c82,this["pLinePosVertices"][_0x1098c1++]=_0x2836bd[_0x3ff9b1+1]["fY"]-_0x5d0b39,this["pLinePosVertices"][_0x1098c1++]=1,this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fR"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fG"],this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],_0x30ca58+=2);1==_0x2dd688[_0x5704a1][_0x111e9f(667)]&&2<_0x1af2ee&&(_0x4e1b18=_0x2836bd[_0x1af2ee-1]["fX"]-_0x2836bd[0]["fX"],_0xb53bfa=_0x2836bd[_0x1af2ee-1]["fY"]-_0x2836bd[0]["fY"],_0x179aa5=Math[_0x111e9f(1540)](_0x4e1b18*_0x4e1b18+_0xb53bfa*_0xb53bfa),1e-6<Math[_0x111e9f(1502)](+_0x179aa5)&&(_0x5d0b39=_0x241253*_0x4e1b18/_0x179aa5/2,this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[0]["fX"]+(_0x2d5c82=-_0x14d407*_0xb53bfa/_0x179aa5/2),this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[0]["fY"]+_0x5d0b39,this[_0x111e9f(522)][_0x1098c1++]=-1,this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fR"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fG"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x1af2ee-1]["fX"]-_0x2d5c82,this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x1af2ee-1]["fY"]-_0x5d0b39,this[_0x111e9f(522)][_0x1098c1++]=1,this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fR"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fG"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[0]["fX"]-_0x2d5c82,this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[0]["fY"]-_0x5d0b39,this[_0x111e9f(522)][_0x1098c1++]=1,this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fR"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fG"],this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fB"],this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[0]["fX"]+_0x2d5c82,this["pLinePosVertices"][_0x1098c1++]=_0x2836bd[0]["fY"]+_0x5d0b39,this["pLinePosVertices"][_0x1098c1++]=-1,this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fR"],this["pLineClrVertices"][_0x2289e0++]=_0x56edc4["fG"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x1af2ee-1]["fX"]+_0x2d5c82,this["pLinePosVertices"][_0x1098c1++]=_0x2836bd[_0x1af2ee-1]["fY"]+_0x5d0b39,this[_0x111e9f(522)][_0x1098c1++]=-1,this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fR"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fG"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x1af2ee-1]["fX"]-_0x2d5c82,this[_0x111e9f(522)][_0x1098c1++]=_0x2836bd[_0x1af2ee-1]["fY"]-_0x5d0b39,this[_0x111e9f(522)][_0x1098c1++]=1,this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fR"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fG"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fB"],this[_0x111e9f(1394)][_0x2289e0++]=_0x56edc4["fA"],_0x30ca58+=2))}}return 0==_0x30ca58?_0x4780dc[_0x111e9f(650)]:(this[_0x111e9f(1256)]=_0x30ca58,_0x4780dc[_0x111e9f(593)])}},{key:"SR_DrawLines",value:function(_0x5d7415,_0x33ac6f,_0x1c415f,_0x349e07,_0x3f903b,_0x1e2051){var _0x4d8a0e=_0x1ef9d8,_0x577da9=[],_0x2007b5=[];return _0x2007b5[_0x4d8a0e(319)]=_0x5d7415,_0x2007b5[_0x4d8a0e(665)]=_0x33ac6f,_0x2007b5[_0x4d8a0e(667)]=_0x1c415f,_0x2007b5["pstColor"]=_0x349e07,_0x2007b5[_0x4d8a0e(609)]=_0x3f903b,_0x577da9[_0x4d8a0e(962)](_0x2007b5),this["SR_DrawLinesEx"](_0x577da9,1,_0x33ac6f,_0x1e2051)}},{key:_0x1ef9d8(1521),value:function(_0x22fa63,_0x466f5f,_0x13c818,_0x2c165b){var _0x11225f=_0x1ef9d8;if(null==this[_0x11225f(926)])return _0x4780dc[_0x11225f(1538)];if(null==_0x22fa63||_0x466f5f<1||_0x13c818<2)return _0x4780dc[_0x11225f(650)];if(0==this[_0x11225f(1108)]){var _0x3492ca=this[_0x11225f(1359)](_0x16083a,_0x5d4200);if(_0x3492ca<=0)return _0x4780dc["SR_ERR_WEBGL_RESOURCE"];this[_0x11225f(1108)]=_0x3492ca}if(1==_0x2c165b)return this[_0x11225f(508)](_0x22fa63,_0x466f5f,_0x13c818);for(var _0x7b6df7=0,_0x4c9d47=0;_0x4c9d47<_0x466f5f;++_0x4c9d47){if(null==_0x22fa63[_0x4c9d47][_0x11225f(319)]||_0x22fa63[_0x4c9d47]["nPointNum"]<=1||1024<=_0x22fa63[_0x4c9d47][_0x11225f(665)]||_0x22fa63[_0x4c9d47][_0x11225f(609)]<=0||null==_0x22fa63[_0x4c9d47][_0x11225f(556)])return _0x4780dc[_0x11225f(650)];_0x7b6df7+=_0x22fa63[_0x4c9d47][_0x11225f(665)]}if(_0x7b6df7!=_0x13c818)return _0x4780dc[_0x11225f(650)];if((_0x7b6df7+=_0x466f5f)>this[_0x11225f(607)]&&(this[_0x11225f(607)]=_0x7b6df7,this[_0x11225f(522)]=null,this["pLineClrVertices"]=null),null==this[_0x11225f(522)]&&(this[_0x11225f(522)]=new Float32Array(6*this["nMaxPointNum"]*3),null==this["pLinePosVertices"]))return _0x4780dc[_0x11225f(694)];if(this[_0x11225f(522)][_0x11225f(329)](0),null==this[_0x11225f(1394)]&&(this[_0x11225f(1394)]=new Float32Array(6*this[_0x11225f(607)]*4),null==this["pLineClrVertices"]))return _0x4780dc[_0x11225f(694)];if(this[_0x11225f(1394)][_0x11225f(329)](0),0==this[_0x11225f(1014)]&&(this["glLinePosBuffer"]=this[_0x11225f(926)][_0x11225f(1450)](),0==this[_0x11225f(1014)]))return _0x4780dc[_0x11225f(528)];if(0==this[_0x11225f(541)]&&(this[_0x11225f(541)]=this[_0x11225f(926)]["createBuffer"](),0==this[_0x11225f(541)]))return _0x4780dc[_0x11225f(528)];_0x3492ca=this[_0x11225f(1189)](_0x22fa63,_0x466f5f);if(_0x4780dc["SR_OK"]!=_0x3492ca)return _0x3492ca;this["ctx"][_0x11225f(326)](this["ctx"]["BLEND"]),this[_0x11225f(926)]["blendFunc"](this[_0x11225f(926)][_0x11225f(858)],this[_0x11225f(926)][_0x11225f(921)]);var _0x2c165b=this[_0x11225f(1108)],_0x13c818=(this["ctx"]["useProgram"](_0x2c165b),this[_0x11225f(1014)]),_0x3492ca=this["glLineClrBuffer"],_0x5451da=this[_0x11225f(1256)],_0x2a18af=this[_0x11225f(522)],_0x27a705=this["pLineClrVertices"],_0x13c818=(this[_0x11225f(926)]["bindBuffer"](this[_0x11225f(926)][_0x11225f(1331)],_0x13c818),this[_0x11225f(926)][_0x11225f(724)](this[_0x11225f(926)][_0x11225f(1331)],_0x2a18af,this["ctx"][_0x11225f(914)]),this[_0x11225f(926)][_0x11225f(416)](_0x2c165b,"position")),_0x2a18af=(this[_0x11225f(926)][_0x11225f(1362)](_0x13c818),this[_0x11225f(926)]["vertexAttribPointer"](_0x13c818,3,this[_0x11225f(926)]["FLOAT"],!1,0,0),this[_0x11225f(926)][_0x11225f(1044)](this["ctx"][_0x11225f(1331)],_0x3492ca),this["ctx"][_0x11225f(724)](this[_0x11225f(926)]["ARRAY_BUFFER"],_0x27a705,this["ctx"][_0x11225f(914)]),this[_0x11225f(926)][_0x11225f(416)](_0x2c165b,_0x11225f(882)));return this["ctx"]["enableVertexAttribArray"](_0x2a18af),this["ctx"]["vertexAttribPointer"](_0x2a18af,4,this[_0x11225f(926)][_0x11225f(1473)],!1,0,0),this[_0x11225f(926)][_0x11225f(1044)](this[_0x11225f(926)][_0x11225f(1331)],null),this[_0x11225f(926)][_0x11225f(349)](0,0,this[_0x11225f(863)][_0x11225f(1454)],this[_0x11225f(863)][_0x11225f(1384)]),this[_0x11225f(926)]["drawArrays"](this[_0x11225f(926)][_0x11225f(1381)],0,3*_0x5451da),this["ctx"][_0x11225f(756)](null),this[_0x11225f(926)]["disable"](this["ctx"][_0x11225f(661)]),_0x4780dc["SR_OK"]}},{key:_0x1ef9d8(1408),value:(_0x256da5=_0x392749(_0x5d56c9()[_0x1ef9d8(460)](function _0x2fd132(_0xbc071f){var _0x4c0a7f=_0x1ef9d8,_0x288413,_0xf4048a,_0x3e89d0,_0x3f25b7,_0x41e3f4,_0x5ddbf8,_0x29debf,_0x355ba4;return _0x5d56c9()[_0x4c0a7f(894)](function(_0x4ffca5){var _0x5f50d7=_0x4c0a7f;for(;;)switch(_0x4ffca5[_0x5f50d7(707)]=_0x4ffca5[_0x5f50d7(811)]){case 0:if(null==_0xbc071f)return _0x4ffca5[_0x5f50d7(341)]("return");_0x4ffca5[_0x5f50d7(811)]=2;break;case 2:if(null==(_0xf4048a=(_0x288413=_0xbc071f)["FreetypeLibHandle"]))return _0x4ffca5["abrupt"](_0x5f50d7(678),_0x4780dc["SR_ERR_PARAM"]);_0x4ffca5["next"]=6;break;case 6:if(null==(_0x3e89d0=new _0x1cdd19))return _0x4ffca5[_0x5f50d7(341)](_0x5f50d7(678),_0x4780dc[_0x5f50d7(694)]);_0x4ffca5["next"]=9;break;case 9:if((_0x3f25b7=_0xf4048a[_0x5f50d7(436)](_0x3e89d0))!==_0x299b8b["Ok"])throw new Error(_0xf4048a[_0x5f50d7(754)](_0x3f25b7));_0x4ffca5[_0x5f50d7(811)]=12;break;case 12:if(null==_0x288413[_0x5f50d7(782)]||null==_0x288413[_0x5f50d7(782)])return _0x4ffca5["abrupt"](_0x5f50d7(678),_0x4780dc["SR_ERR_CALL_ORDER"]);_0x4ffca5["next"]=14;break;case 14:return _0x4ffca5[_0x5f50d7(811)]=16,fetch(_0x288413[_0x5f50d7(782)]);case 16:if(null==(_0x41e3f4=_0x4ffca5[_0x5f50d7(1520)]))return _0x4ffca5[_0x5f50d7(341)](_0x5f50d7(678),_0x4780dc[_0x5f50d7(713)]);_0x4ffca5["next"]=19;break;case 19:return _0x4ffca5[_0x5f50d7(811)]=21,_0x41e3f4[_0x5f50d7(415)]();case 21:if(null==(_0x5ddbf8=_0x4ffca5[_0x5f50d7(1520)]))return _0x4ffca5["abrupt"](_0x5f50d7(678),_0x4780dc[_0x5f50d7(713)]);_0x4ffca5["next"]=24;break;case 24:if(null==(_0x29debf=new Uint8Array(_0x5ddbf8)))return _0x4ffca5[_0x5f50d7(341)](_0x5f50d7(678),_0x4780dc["SR_ERR_FREETYPE_INIT"]);_0x4ffca5[_0x5f50d7(811)]=27;break;case 27:if(null==(_0x355ba4=new _0x3baf56))return _0x4ffca5[_0x5f50d7(341)]("return",_0x4780dc[_0x5f50d7(713)]);_0x4ffca5["next"]=30;break;case 30:if((_0x3f25b7=_0xf4048a[_0x5f50d7(883)](_0x3e89d0,_0x29debf,0,_0x355ba4))!==_0x299b8b["Ok"])throw _0x288413["FreetypeLibHandle"]=null,new Error(_0xf4048a[_0x5f50d7(754)](_0x3f25b7));_0x4ffca5[_0x5f50d7(811)]=34;break;case 34:_0x288413[_0x5f50d7(411)]=_0x3e89d0,_0x288413[_0x5f50d7(1043)]=_0x355ba4;case 36:case"end":return _0x4ffca5[_0x5f50d7(1476)]()}},_0x2fd132)})),function(_0x176697){var _0x3cf652=_0x1ef9d8;return _0x256da5[_0x3cf652(1089)](this,arguments)})},{key:_0x1ef9d8(578),value:function(_0x56a35e,_0x5797e5){var _0x3600f6=_0x1ef9d8;if(null==_0x5797e5)return _0x4780dc[_0x3600f6(650)];if(!this[_0x3600f6(1096)]){var _0xaa223=new _0x3becaf;if(null==_0xaa223)return _0x4780dc[_0x3600f6(366)];this["pFontPath"]=_0x5797e5,_0x5797e5=this[_0x3600f6(1408)],(this[_0x3600f6(1522)]=_0xaa223)["loadWasm"](_0x56a35e,_0x5797e5,this),this[_0x3600f6(1096)]=!0}return _0x4780dc["SR_OK"]}},{key:"SR_DrawFont",value:function(_0x4c1181,_0x4ce8d7,_0xc380f8,_0x48e7b9,_0x574110,_0x92bc51,_0x4b6eaa){var _0x548b40=_0x1ef9d8;if(null==_0x4c1181||null==_0x4ce8d7||null==_0xc380f8||_0x48e7b9<=1||_0x574110<=1)return _0x4780dc[_0x548b40(650)];if(1==_0x92bc51&&null==_0x4b6eaa)return _0x4780dc[_0x548b40(650)];var _0x24dd27=[],_0x59230e=[];return _0x59230e[_0x548b40(1002)]=_0x92bc51,_0x59230e["nFontWidth"]=_0x48e7b9,_0x59230e["nFontHeight"]=_0x574110,_0x59230e["pstBGColor"]=_0x4b6eaa,_0x59230e[_0x548b40(1474)]=_0xc380f8,_0x59230e[_0x548b40(400)]=_0x4c1181,_0x59230e[_0x548b40(1267)]=_0x4ce8d7,_0x24dd27[_0x548b40(962)](_0x59230e),this[_0x548b40(1419)](_0x24dd27,1)}},{key:_0x1ef9d8(1419),value:function(_0x2c8666,_0x41780b){var _0x4e38a0=_0x1ef9d8;if(null==this[_0x4e38a0(926)]||null==this["FreetypeLibHandle"])return _0x4780dc[_0x4e38a0(1538)];if(_0x41780b<0||null==_0x2c8666)return _0x4780dc[_0x4e38a0(650)];if(this["nDrawFontWidth"]==this[_0x4e38a0(863)][_0x4e38a0(1454)]/4*4&&this[_0x4e38a0(863)][_0x4e38a0(1384)]==this[_0x4e38a0(1277)]/4*4||(this[_0x4e38a0(644)]=null,this[_0x4e38a0(835)]=0,this["nDrawFontWidth"]=this[_0x4e38a0(863)]["width"]/4*4,this[_0x4e38a0(1313)]=this["canvas"][_0x4e38a0(1384)]/4*4),null==this[_0x4e38a0(644)]||0==this[_0x4e38a0(835)]){if(this[_0x4e38a0(644)]=new Uint8Array(this[_0x4e38a0(890)]*this[_0x4e38a0(1313)]*4),null==this["pFontColorBuffer"])return _0x4780dc["SR_ERR_ALLOC_MEMORY"];if(this["pFontColorBuffer"][_0x4e38a0(329)](0),this[_0x4e38a0(835)]=this["ctx"][_0x4e38a0(1514)](),0==this[_0x4e38a0(835)])return _0x4780dc[_0x4e38a0(528)];this[_0x4e38a0(926)]["bindTexture"](this["ctx"]["TEXTURE_2D"],this[_0x4e38a0(835)]),this["ctx"]["texParameteri"](this[_0x4e38a0(926)][_0x4e38a0(588)],this[_0x4e38a0(926)][_0x4e38a0(715)],this["ctx"]["LINEAR"]),this[_0x4e38a0(926)]["texParameteri"](this[_0x4e38a0(926)][_0x4e38a0(588)],this[_0x4e38a0(926)][_0x4e38a0(373)],this[_0x4e38a0(926)][_0x4e38a0(406)]),this[_0x4e38a0(926)]["texParameteri"](this[_0x4e38a0(926)][_0x4e38a0(588)],this[_0x4e38a0(926)][_0x4e38a0(976)],this[_0x4e38a0(926)][_0x4e38a0(597)]),this[_0x4e38a0(926)]["texParameteri"](this[_0x4e38a0(926)]["TEXTURE_2D"],this["ctx"][_0x4e38a0(1132)],this[_0x4e38a0(926)]["CLAMP_TO_EDGE"])}for(var _0x43f774=0,_0x3c42be=0;_0x3c42be<_0x41780b;_0x3c42be++)_0x2c8666[_0x3c42be][_0x4e38a0(452)]&&_0x43f774++;if(this[_0x4e38a0(1328)]<_0x43f774){for(var _0x4efd7f=0;_0x4efd7f<this["nFontBGNum"];++_0x4efd7f)this[_0x4e38a0(941)][_0x4efd7f][_0x4e38a0(319)]=null,this[_0x4e38a0(941)][_0x4efd7f][_0x4e38a0(556)]=null;this["pstFontBGLines"]=null,this[_0x4e38a0(941)]=[];for(var _0x5a9372=0;_0x5a9372<_0x43f774;++_0x5a9372)this[_0x4e38a0(941)][_0x5a9372][_0x4e38a0(319)]=[],this[_0x4e38a0(941)][_0x5a9372][_0x4e38a0(556)]=[];this[_0x4e38a0(1328)]=_0x43f774}for(var _0x43f774=0,_0x32a833=0;_0x32a833<_0x41780b;++_0x32a833){var _0x4afa8d=_0x2c8666[_0x32a833]["pstStartPos"]["fX"]*this["nDrawFontWidth"],_0x7aae6a=_0x2c8666[_0x32a833][_0x4e38a0(1267)]["fY"]*this[_0x4e38a0(1313)],_0x3422d3=_0x2c8666[_0x32a833][_0x4e38a0(400)][_0x4e38a0(525)],_0x27fe0c=(_0x2c8666[_0x32a833]["nFontWidth"]==_0x2c8666[_0x32a833]["nFontHeight"]&&(_0x2c8666[_0x32a833][_0x4e38a0(1570)]=_0x2c8666[_0x32a833]["nFontHeight"]-1),this[_0x4e38a0(1313)]),_0xab641=0,_0x4ca855=255*_0x2c8666[_0x32a833][_0x4e38a0(1474)]["fA"],_0x3f4c29=255*_0x2c8666[_0x32a833][_0x4e38a0(1474)]["fR"],_0x112989=255*_0x2c8666[_0x32a833][_0x4e38a0(1474)]["fG"],_0x8aa9bb=255*_0x2c8666[_0x32a833]["pstFontColor"]["fB"];if((_0x3f2575=this["FreetypeLibHandle"][_0x4e38a0(354)](this[_0x4e38a0(1043)],64*this["nDrawFontWidth"],64*this[_0x4e38a0(1313)],300,300))!==_0x299b8b["Ok"])throw new Error(this["FreetypeLibHandle"]["Error_String"](_0x3f2575));for(var _0x5c6759=0;_0x5c6759<_0x3422d3;++_0x5c6759){var _0x3f2575,_0x35c057=_0x2c8666[_0x32a833][_0x4e38a0(400)][_0x4e38a0(494)](_0x5c6759);if((_0x3f2575=this[_0x4e38a0(1522)][_0x4e38a0(1186)](this["FTFace"],_0x35c057,_0x51f6fb[_0x4e38a0(1526)]))!=_0x299b8b["Ok"])throw new Error(this[_0x4e38a0(1522)][_0x4e38a0(754)](_0x3f2575));var _0x2f66a3=this[_0x4e38a0(1043)][_0x4e38a0(347)];if((_0x3f2575=this[_0x4e38a0(1522)][_0x4e38a0(1273)](_0x2f66a3,_0x39a6b1[_0x4e38a0(800)]))!==_0x299b8b["Ok"])throw new Error(_0x3becaf[_0x4e38a0(754)](_0x3f2575));var _0x4fa110=_0x2f66a3[_0x4e38a0(1555)];_0x4afa8d+=_0x2f66a3[_0x4e38a0(1348)],(_0x35c057=this[_0x4e38a0(1313)]-_0x2f66a3[_0x4e38a0(654)])<_0x27fe0c&&(_0x27fe0c=_0x35c057),_0xab641<(_0x35c057=_0x4fa110["row"])&&(_0xab641=_0x35c057);for(var _0x1887f3=0;_0x1887f3<_0x4fa110[_0x4e38a0(419)]*_0x4fa110["width"];++_0x1887f3){var _0x2f26ef,_0x1cac97=Math[_0x4e38a0(1265)](_0x2c8666[_0x32a833][_0x4e38a0(1570)]-_0x2f66a3[_0x4e38a0(654)]+_0x7aae6a+_0x1887f3/_0x4fa110[_0x4e38a0(1454)]);_0x1cac97>=this[_0x4e38a0(1313)]||(_0x1cac97=_0x4afa8d+_0x1cac97*this[_0x4e38a0(890)]+_0x1887f3%_0x4fa110["width"])<0||_0x1cac97>=this[_0x4e38a0(890)]*this[_0x4e38a0(1313)]||0<_0x4fa110["buffer"][_0x1887f3]&&((_0x2f26ef=this["pFontColorBuffer"])[4*_0x1cac97]=_0x8aa9bb,_0x2f26ef[4*_0x1cac97+1]=_0x112989,_0x2f26ef[4*_0x1cac97+2]=_0x3f4c29,_0x2f26ef[4*_0x1cac97+3]=_0x4ca855)}_0x4afa8d+=_0x4fa110[_0x4e38a0(1454)]}var _0x49cbbe=[];_0x49cbbe[_0x4e38a0(1575)]=_0x2c8666[_0x32a833][_0x4e38a0(1267)]["fX"],_0x49cbbe[_0x4e38a0(322)]=_0x2c8666[_0x32a833]["pstStartPos"]["fY"]+_0x27fe0c/this["nDrawFontHeight"],_0x49cbbe[_0x4e38a0(518)]=_0x4afa8d/this[_0x4e38a0(890)],_0x49cbbe[_0x4e38a0(1209)]=_0xab641/this[_0x4e38a0(1313)]+_0x49cbbe[_0x4e38a0(322)],_0x49cbbe[_0x4e38a0(1575)]-=.01,_0x49cbbe[_0x4e38a0(322)]-=.01,_0x49cbbe["fRight"]+=.01,_0x49cbbe[_0x4e38a0(1209)]+=.01,1==_0x2c8666[_0x32a833][_0x4e38a0(452)]&&(this["pstFontBGLines"][_0x43f774][_0x4e38a0(319)]=_0x49cbbe,this[_0x4e38a0(941)][_0x43f774][_0x4e38a0(665)]=4,this["pstFontBGLines"][_0x43f774][_0x4e38a0(667)]=!0,this["pstFontBGLines"][_0x43f774][_0x4e38a0(556)]=_0x2c8666[_0x32a833][_0x4e38a0(940)],_0x43f774+=this[_0x4e38a0(941)][_0x43f774]["nLineWidth"]=1)}0!=_0x43f774&&this[_0x4e38a0(1521)](this[_0x4e38a0(941)],_0x43f774,4*_0x43f774,!1),this[_0x4e38a0(926)][_0x4e38a0(317)](this["ctx"][_0x4e38a0(588)],this[_0x4e38a0(835)]),this[_0x4e38a0(926)]["texImage2D"](this[_0x4e38a0(926)][_0x4e38a0(588)],0,this["ctx"][_0x4e38a0(917)],this[_0x4e38a0(890)],this["nDrawFontHeight"],0,this[_0x4e38a0(926)][_0x4e38a0(917)],this[_0x4e38a0(926)][_0x4e38a0(1084)],this[_0x4e38a0(644)]),0==this[_0x4e38a0(551)]&&(this["nFontShaderProgram"]=this[_0x4e38a0(1359)](_0x4e38a0(676),_0x4e38a0(766))),this["ctx"][_0x4e38a0(349)](0,0,this[_0x4e38a0(863)][_0x4e38a0(1454)],this[_0x4e38a0(863)][_0x4e38a0(1384)]),this[_0x4e38a0(926)][_0x4e38a0(326)](this[_0x4e38a0(926)][_0x4e38a0(661)]),this[_0x4e38a0(926)][_0x4e38a0(823)](this[_0x4e38a0(926)][_0x4e38a0(858)],this[_0x4e38a0(926)]["ONE_MINUS_SRC_ALPHA"]),this[_0x4e38a0(926)]["useProgram"](this[_0x4e38a0(551)]),this[_0x4e38a0(926)]["activeTexture"](this["ctx"][_0x4e38a0(599)]),this[_0x4e38a0(926)]["bindTexture"](this[_0x4e38a0(926)]["TEXTURE_2D"],this[_0x4e38a0(835)]);var _0x1d38be=this[_0x4e38a0(926)][_0x4e38a0(893)](this[_0x4e38a0(551)],_0x4e38a0(1236)),_0x1d38be=(this[_0x4e38a0(926)][_0x4e38a0(871)](_0x1d38be,0),this["ctx"][_0x4e38a0(1044)](this[_0x4e38a0(926)][_0x4e38a0(1331)],this["vertexPosBuffer"]),this[_0x4e38a0(926)]["getAttribLocation"](this[_0x4e38a0(551)],_0x4e38a0(1052))),_0x1d38be=(this[_0x4e38a0(926)][_0x4e38a0(1362)](_0x1d38be),this[_0x4e38a0(926)][_0x4e38a0(1193)](_0x1d38be,3,this[_0x4e38a0(926)][_0x4e38a0(1473)],!1,0,0),this[_0x4e38a0(926)][_0x4e38a0(1044)](this[_0x4e38a0(926)][_0x4e38a0(1331)],this[_0x4e38a0(775)]),this[_0x4e38a0(926)][_0x4e38a0(416)](this[_0x4e38a0(551)],_0x4e38a0(567)));return this["ctx"][_0x4e38a0(1362)](_0x1d38be),this[_0x4e38a0(926)][_0x4e38a0(1193)](_0x1d38be,2,this[_0x4e38a0(926)][_0x4e38a0(1473)],!1,0,0),this[_0x4e38a0(926)]["bindBuffer"](this[_0x4e38a0(926)][_0x4e38a0(1331)],null),this[_0x4e38a0(926)][_0x4e38a0(908)](this[_0x4e38a0(926)][_0x4e38a0(1381)],0,6),this[_0x4e38a0(926)][_0x4e38a0(756)](null),this[_0x4e38a0(926)][_0x4e38a0(1076)](this[_0x4e38a0(926)]["BLEND"]),_0x4780dc[_0x4e38a0(593)]}},{key:"SR_AddSubPort",value:function(_0x3448a7){var _0x2af8d8=_0x1ef9d8;if(null==this["ctx"])return _0x4780dc[_0x2af8d8(1538)];var _0x542f08,_0x6e0de4,_0x4420f4=-1;if(_0x3448a7==_0x4e9094["SR_DE_NULL"])_0x4420f4=0;else{if(-1==(_0x4420f4=null!=this[_0x2af8d8(429)]?this[_0x2af8d8(429)]["GetFECPort"](_0x3448a7):_0x4420f4))return _0x4420f4}switch(this[_0x2af8d8(1491)]=_0x4420f4,_0x3448a7){case _0x4e9094[_0x2af8d8(1347)]:_0x542f08=_0x47dede,this[_0x2af8d8(983)]=!(_0x6e0de4="\nvarying highp vec2 v_uv;\nuniform sampler2D texture;\nvoid main(void) {\n  gl_FragColor = texture2D(texture, v_uv);\n}\n");break;case _0x4e9094[_0x2af8d8(677)]:_0x542f08=_0x47dede,_0x6e0de4="\nprecision mediump float;\nvarying vec2 v_uv;\nuniform sampler2D texture;\nuniform float fRX1;\nuniform float fRX2;\nuniform float fRY1;\nuniform float fRY2;\nuniform int bBlack; \nuniform int bCut;\n\nvoid main()\n{ \n\tfloat r,g,b;\n\tvec4 origin;\n\n\tfloat  w;\n\tfloat  h;\n\tfloat  fCenterX;\n\tfloat  fCenterY;\n\tfloat  fRadius;\n\tw = 1.0;\n\th = (fRX2 - fRX1) / (fRY2 - fRY1);\n\tfCenterX = (fRX1 + fRX2) / 2.0 * w;    ///<圆心实际坐标\n\tfCenterY = (fRY1 + fRY2) / 2.0 * h;\n\tfRadius = (fRX2 - fRX1) / 2.0 * w;     ///<半径实际长度\n\tfloat  leftCut = 0.0;\n\tfloat  rightCut = 1.0;\n\tfloat  topCut = 0.0;\n\tfloat  bottomCut = 1.0;\n\tif(bCut == 1)\n\t{\n\t\tif(fRX1 > 0.0)\n\t\t{\n\t\t\tleftCut = fRX1;\n\t\t}\n\t\tif(fRX2 < 1.0)\n\t\t{\n\t\t\trightCut = fRX2;\n\t\t}\n\t\tif(fRY1 > 0.0)\n\t\t{\n\t\t\ttopCut = fRY1;\n\t\t}\n\t\tif(fRY2 < 1.0)\n\t\t{\n\t\t\tbottomCut = fRY2;\n\t\t}\n\t}\n\torigin.s = v_uv.s * (rightCut-leftCut) + leftCut;\n\torigin.t = v_uv.t * (bottomCut-topCut) + topCut;\n\n\tr = texture2D(texture, origin.st).r; \n\tg = texture2D(texture, origin.st).g; \n\tb = texture2D(texture, origin.st).b; \n\n\tif(bBlack == 1)\n\t{\n\t\tfloat tmpX, tmpY;\n\t\ttmpX = origin.s * w; \n\t\ttmpY = origin.t * h; \n\t\tfloat d2 = (tmpX-fCenterX)*(tmpX-fCenterX) + (tmpY-fCenterY)*(tmpY-fCenterY);\n\t\tif(d2 > fRadius*fRadius)\n\t\t{\n\t\t\tr = 0.0; \n\t\t\tg = 0.0; \n\t\t\tb = 0.0; \n\t\t}\n\t}\n\n\tgl_FragColor = vec4(r ,g ,b , 1.0);\n}\n",this[_0x2af8d8(828)]=!0,this[_0x2af8d8(983)]=!1;break;case _0x4e9094[_0x2af8d8(1282)]:_0x542f08=_0x47dede,_0x6e0de4=_0x2af8d8(1082),this[_0x2af8d8(828)]=!0,this[_0x2af8d8(983)]=!1;break;case _0x4e9094[_0x2af8d8(474)]:_0x542f08=_0x47dede,_0x6e0de4=_0x2af8d8(1087),this[_0x2af8d8(828)]=!0;break;case _0x4e9094[_0x2af8d8(994)]:_0x542f08=_0x47dede,_0x6e0de4="\nprecision mediump float;\nvarying vec2 v_uv;\nuniform sampler2D texture;\nuniform float fHAngleCos;\nuniform float fHAngleSin;  \nuniform float fVAngleCos;  \nuniform float fVAngleSin;  \nuniform float fZoom;\n\nuniform float fRX1; \nuniform float fRX2; \nuniform float fRY1; \nuniform float fRY2; \n\nvoid main()\n{\n    float r,g,b;  \n\n    vec4 origin1;\n    vec4 origin2;\n    vec4 origin3;\n    vec4 result;\n    float  z1;\n    float  z2;\n    float  z3;\n    float  dnew;\n\n    float  w;\n    float  h;\n    float  fCenterX;\n    float  fCenterY;\n    float  fRadius;\n    w = 1.0;\n    h = (fRX2 - fRX1) / (fRY2 - fRY1);\n    fCenterX = (fRX1 + fRX2) / 2.0 * w;    ///<Բ��ʵ������\n    fCenterY = (fRY1 + fRY2) / 2.0 * h;\n    fRadius = (fRX2 - fRX1) / 2.0 * w;    ///<�뾶ʵ�ʳ���\n\n    origin1.s = v_uv.s - 0.5;\n    origin1.t = v_uv.t - 0.5;\n    z1 = fZoom ;\n\n    origin2.s = origin1.s ;\n    origin2.t = (origin1.t*fVAngleCos + z1*fVAngleSin);\n    z2 = z1*fVAngleCos - origin1.t*fVAngleSin;\n\n    origin3.s = origin2.s*fHAngleCos + z2*fHAngleSin ;\n    origin3.t = origin2.y;\n    z3 = z2*fHAngleCos - origin2.x*fHAngleSin;\n\n    dnew = sqrt(origin3.s*origin3.s + origin3.t*origin3.t) ;\n    float d = sqrt(origin3.s*origin3.s + origin3.t*origin3.t + z3*z3);\n    float theta = asin(dnew/d);\n    float tmp = theta / 1.5707963 * 0.5;\n    result.s = (tmp*origin3.s / dnew * fRadius * 2.0 + fCenterX)/w;\n    result.t = (tmp*origin3.t / dnew * fRadius * 2.0 + fCenterY)/h;\n\n    r = texture2D(texture, result.st).r; \n    g = texture2D(texture, result.st).g; \n    b = texture2D(texture, result.st).b; \n    if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n    {\n        r = 0.0; \n        g = 0.0; \n        b = 0.0; \n    }\n    gl_FragColor = vec4(r ,g ,b , 1.0);\n} \n",this[_0x2af8d8(828)]=!0,this["b3DPort"]=!1;break;case _0x4e9094[_0x2af8d8(1379)]:_0x542f08=_0x47dede,_0x6e0de4=_0x2af8d8(830),this[_0x2af8d8(828)]=!0,this[_0x2af8d8(983)]=!1;break;case _0x4e9094[_0x2af8d8(1212)]:_0x542f08=_0x47dede,_0x6e0de4="\n    precision highp float;\n    varying vec2 v_uv;\n    uniform sampler2D texture;\n    uniform float fAngle;\n    uniform float fRX1; \n    uniform float fRX2; \n    uniform float fRY1; \n    uniform float fRY2; \n    \n    void main()\n    {\n        float r,g,b;  \n    \n        vec4 origin;\n        vec4 result;\n        float  thetabase;\n        float  d;\n    \n        vec4 newpp;  ///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\n        if (v_uv.t  <= 0.5)\n        {\n            newpp.s =  v_uv.s / 2.0 + 0.5;\n            newpp.t =  v_uv.t * 2.0;\n        }\n        else\n        {\n            newpp.s =  v_uv.s / 2.0;\n            newpp.t =  (v_uv.t - 0.5) * 2.0;\n        }\n        float  w;\n        float  h;\n        float  fCenterX;\n        float  fCenterY;\n        float  fRadius;\n        w = 1.0;\n        h = (fRX2 - fRX1) / (fRY2 - fRY1);\n        fCenterX = (fRX1 + fRX2) / 2.0 * w;     ///<圆心实际坐标\n        fCenterY = (fRY1 + fRY2) / 2.0 * h;\n        fRadius = (fRX2 - fRX1) / 2.0 * w;     ///<半径实际长度\n        float fMax = 0.0;\n        if(fRX2 > 1.0 || fRY2 > 1.0 || fRX1 < 0.0 || fRY1 < 0.0) ///<如果不是一个完整的圆\n        {\n            float tmp;\n            if(fRX1 < 0.0)\n            {\n                tmp = -fRX1 * w; ///<左边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRX2 > 1.0)\n            {\n                tmp = (fRX2 - 1.0) * w; ///<右边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRY1 < 0.0)\n            {\n                tmp = -fRY1 * h; ///<上边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRY2 > 1.0)\n            {\n                tmp = (fRY2 - 1.0) * h; ///<下边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n        }\n        float topCut = fMax / fRadius;   ///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\n        float bottomCut = 0.8;           ///<为矫正效果,最终矫正图固定切掉下面一部分\n        origin.s = newpp.s;\n        origin.t = (bottomCut - topCut) * newpp.t + topCut;\n        thetabase = 6.2831853 * origin.s + fAngle;\n        d = fRadius * (1.0 - origin.t);\n        result.s = (fCenterX - d*sin(thetabase)) / w;\n        result.t = (fCenterY + d*cos(thetabase)) / h;\n    \n        r = texture2D(texture, result.st).r;\n        g = texture2D(texture, result.st).g;\n        b = texture2D(texture, result.st).b;\n        if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n        {\n            r = 0.0;\n            g = 0.0;\n            b = 0.0;\n        }\n        gl_FragColor = vec4(r ,g ,b , 1.0);\n    }\n",this["bFECHandle"]=!0,this[_0x2af8d8(983)]=!1;break;case _0x4e9094[_0x2af8d8(472)]:_0x542f08=_0x47dede,_0x6e0de4=_0x2af8d8(1067),this[_0x2af8d8(828)]=!0,this[_0x2af8d8(983)]=!1;break;case _0x4e9094[_0x2af8d8(1366)]:_0x542f08=_0x47dede,_0x6e0de4=_0x2af8d8(1101),this[_0x2af8d8(828)]=!0,this[_0x2af8d8(983)]=!1;break;case _0x4e9094[_0x2af8d8(1018)]:_0x542f08=_0x47dede,_0x6e0de4=SHADER_PS_RGBA_PANORAMA_WALL,this[_0x2af8d8(828)]=!0,this["b3DPort"]=!1;break;case _0x4e9094[_0x2af8d8(1010)]:case _0x4e9094["SR_DE_FISH_CYLINDER_CEILING"]:case _0x4e9094[_0x2af8d8(405)]:_0x542f08=_0x2af8d8(335),_0x6e0de4=_0x2af8d8(1535),this[_0x2af8d8(828)]=!0,this[_0x2af8d8(983)]=!0}var _0x4420f4=this[_0x2af8d8(1359)](_0x542f08,_0x6e0de4),_0x4420f4=(this["videoShaderProgram"]=_0x4420f4,null),_0x93391c=null,_0xb2e88c=(0==this["b3DPort"]?(_0x4420f4=new Float32Array([-1,-1,0,-1,1,0,1,1,0,1,-1,0]),_0x93391c=new Float32Array([0,1,0,0,1,0,1,1])):_0x3448a7==_0x4e9094[_0x2af8d8(1010)]&&(this["CreateSemiSphere"](0,1,0,1),_0x4420f4=this[_0x2af8d8(881)],_0x93391c=this[_0x2af8d8(1524)]),this["ctx"]["createBuffer"]()),_0x4420f4=(this[_0x2af8d8(926)]["bindBuffer"](this[_0x2af8d8(926)][_0x2af8d8(1331)],_0xb2e88c),this[_0x2af8d8(926)][_0x2af8d8(724)](this[_0x2af8d8(926)]["ARRAY_BUFFER"],_0x4420f4,this[_0x2af8d8(926)][_0x2af8d8(914)]),this["vertexPosBuffer"]=_0xb2e88c,this[_0x2af8d8(926)]["createBuffer"]()),_0xb2e88c=(this[_0x2af8d8(926)]["bindBuffer"](this["ctx"]["ARRAY_BUFFER"],_0x4420f4),this[_0x2af8d8(926)][_0x2af8d8(724)](this["ctx"][_0x2af8d8(1331)],_0x93391c,this[_0x2af8d8(926)][_0x2af8d8(914)]),this[_0x2af8d8(775)]=_0x4420f4,this["ctx"]["bindBuffer"](this["ctx"][_0x2af8d8(1331)],null),this["InitCamera"](_0x3448a7));return _0x4780dc["SR_OK"]!=_0xb2e88c?-1:(this[_0x2af8d8(1198)]=_0x3448a7,this[_0x2af8d8(1491)])}},{key:_0x1ef9d8(943),value:function(_0x5ac2de){var _0x557c80=_0x1ef9d8;return null==this[_0x557c80(926)]?_0x4780dc["SR_ERR_CALL_ORDER"]:(null!=this["pFishParamManager"]&&this[_0x557c80(429)][_0x557c80(1360)](_0x5ac2de),this["bFECHandle"]=!1,this[_0x557c80(1198)]=_0x4e9094[_0x557c80(1347)],0!=this[_0x557c80(1257)]&&null!=this[_0x557c80(926)]&&(this[_0x557c80(926)][_0x557c80(1124)](this[_0x557c80(1257)]),this["videoShaderProgram"]=0),0!=this[_0x557c80(309)]&&null!=this[_0x557c80(926)]&&(this["ctx"]["deleteBuffer"](this[_0x557c80(309)]),this[_0x557c80(309)]=0),0!=this[_0x557c80(775)]&&null!=this[_0x557c80(926)]&&(this[_0x557c80(926)]["deleteBuffer"](this["texturePosBuffer"]),this[_0x557c80(775)]=0),this[_0x557c80(607)]=0,this[_0x557c80(522)]=null,this["pLineClrVertices"]=null,0!=this[_0x557c80(1014)]&&null!=this[_0x557c80(926)]&&(this["ctx"][_0x557c80(1443)](this[_0x557c80(1014)]),this[_0x557c80(1014)]=0),0!=this[_0x557c80(1539)]&&null!=this[_0x557c80(926)]&&(this["ctx"][_0x557c80(1443)](this[_0x557c80(1539)]),this[_0x557c80(1539)]=0),(this["nLineTriangleNum"]=0)!=this[_0x557c80(1108)]&&null!=this["ctx"]&&(this[_0x557c80(926)][_0x557c80(1124)](this["nLineShaderProgram"]),this[_0x557c80(1108)]=0),this["pFillBlockPosVertices"]=null,this[_0x557c80(603)]=null,(this[_0x557c80(1038)]=0)!=this[_0x557c80(1130)]&&null!=this[_0x557c80(926)]&&(this[_0x557c80(926)]["deleteBuffer"](this[_0x557c80(1130)]),this[_0x557c80(1130)]=0),0!=this["glBlockClrBuffer"]&&null!=this[_0x557c80(926)]&&(this[_0x557c80(926)]["deleteBuffer"](this[_0x557c80(1085)]),this[_0x557c80(1085)]=0),0!=this[_0x557c80(560)]&&null!=this[_0x557c80(926)]&&(this[_0x557c80(926)][_0x557c80(1124)](this[_0x557c80(560)]),this[_0x557c80(560)]=0),null!=this[_0x557c80(1522)]&&null!=this[_0x557c80(1043)]&&(this[_0x557c80(1522)][_0x557c80(1310)](this[_0x557c80(1043)]),this[_0x557c80(1043)]=null),null!=this["FreetypeLibHandle"]&&null!=this[_0x557c80(411)]&&(this[_0x557c80(1522)]["Done_FreeType"](this[_0x557c80(411)]),this[_0x557c80(411)]=null),this[_0x557c80(1096)]=!1,this["pFontPath"]=null,this["FreetypeLibHandle"]=null,this[_0x557c80(890)]=0,(this[_0x557c80(1313)]=0)!=this[_0x557c80(835)]&&null!=this[_0x557c80(926)]&&(this[_0x557c80(926)][_0x557c80(1470)](this["nFontColorTexture"]),this["nFontColorTexture"]=0),(this[_0x557c80(644)]=0)!=this[_0x557c80(551)]&&null!=this[_0x557c80(926)]&&(this[_0x557c80(926)]["deleteProgram"](this[_0x557c80(551)]),this[_0x557c80(551)]=0),this["nFontBGNum"]=0,this[_0x557c80(941)]=null,this["pSemiSpherePos"]=null,this[_0x557c80(1524)]=null,this[_0x557c80(794)]=0,this[_0x557c80(1566)]=0,this[_0x557c80(1229)]=0,this[_0x557c80(334)]=null,this[_0x557c80(371)]=null,this[_0x557c80(801)]=0,this[_0x557c80(1109)]=0,this[_0x557c80(749)]=0,this["fCylinderHeight"]=0,this["fCylinderRadius"]=0,this[_0x557c80(983)]=!1,this["pCamera"]=null,this["fRotateX"]=0,this["fRotateY"]=0,this["fScale"]=0,this[_0x557c80(1333)]=null,this[_0x557c80(1075)]=null,this[_0x557c80(1230)]=null,this["pUserOut"]=null,this[_0x557c80(926)][_0x557c80(1076)](this["ctx"][_0x557c80(533)]),this[_0x557c80(926)]["disable"](this[_0x557c80(926)]["DEPTH_TEST"]),_0x4780dc[_0x557c80(593)])}},{key:_0x1ef9d8(1116),value:function(_0x577fbf){var _0x53bec9=_0x1ef9d8;return null==_0x577fbf?_0x4780dc[_0x53bec9(650)]:null==this[_0x53bec9(429)]?_0x4780dc[_0x53bec9(1538)]:this[_0x53bec9(429)][_0x53bec9(444)](this["nFECPort"],_0x577fbf)}},{key:_0x1ef9d8(412),value:function(_0x405f59){var _0x23b6b8=_0x1ef9d8;return null==_0x405f59?_0x4780dc[_0x23b6b8(650)]:null==this[_0x23b6b8(429)]?_0x4780dc["SR_ERR_CALL_ORDER"]:this[_0x23b6b8(429)][_0x23b6b8(1057)](this[_0x23b6b8(1491)],_0x405f59)}},{key:"SR_SetDisplayRect",value:function(_0x25b722,_0x345a87,_0x3700e1,_0x5068f6){var _0x4a9717=_0x1ef9d8;if(null==this[_0x4a9717(926)])return _0x4780dc[_0x4a9717(1538)];var _0x3794a2,_0xd339ff,_0x3befbe=null;return _0x3befbe=0<this[_0x4a9717(1584)]&&0<this[_0x4a9717(320)]?(_0x3794a2=_0x25b722/this[_0x4a9717(1584)],_0xd339ff=_0x345a87/this[_0x4a9717(320)],_0x25b722=(_0x25b722+_0x3700e1)/this[_0x4a9717(1584)],_0x3700e1=(_0x345a87+_0x5068f6)/this[_0x4a9717(320)],new Float32Array([_0x3794a2,_0x3700e1,_0x3794a2,_0xd339ff,_0x25b722,_0xd339ff,_0x25b722,_0x3700e1])):new Float32Array([0,1,0,0,1,0,1,1]),this[_0x4a9717(926)][_0x4a9717(1044)](this[_0x4a9717(926)]["ARRAY_BUFFER"],this[_0x4a9717(775)]),this[_0x4a9717(926)][_0x4a9717(440)](this[_0x4a9717(926)][_0x4a9717(1331)],0,_0x3befbe),this[_0x4a9717(926)][_0x4a9717(1044)](this[_0x4a9717(926)][_0x4a9717(1331)],null),_0x4780dc["SR_OK"]}},{key:_0x1ef9d8(1577),value:function(){var _0x583a17=_0x1ef9d8;return null==this[_0x583a17(926)]?_0x4780dc[_0x583a17(1538)]:(this[_0x583a17(1584)]=0,(this["frameDisplayHeight"]=0)!=this["nSurfaceTexture"]&&null!=this[_0x583a17(926)]&&(this[_0x583a17(926)][_0x583a17(1470)](this[_0x583a17(1571)]),this[_0x583a17(1571)]=0),0==this[_0x583a17(828)]?this[_0x583a17(943)](0):-1!=this[_0x583a17(1491)]&&this[_0x583a17(943)](this[_0x583a17(1491)]),this[_0x583a17(978)]=!1,this[_0x583a17(355)]=!1,this[_0x583a17(1023)]=!0,this["pFishParamManager"]=null,this["canvas"]=null,this["ctx"]=null,_0x4780dc[_0x583a17(593)])}},{key:_0x1ef9d8(422),value:function(_0x53164b,_0x4a8699){var _0x460356=_0x1ef9d8;return this["canvas"]["width"]=_0x53164b,this[_0x460356(863)][_0x460356(1384)]=_0x4a8699,_0x4780dc[_0x460356(593)]}},{key:_0x1ef9d8(918),value:function(){var _0x4adfde=_0x1ef9d8;return console[_0x4adfde(1590)](_0x4adfde(720)+this[_0x4adfde(863)]["width"]+_0x4adfde(468)+this[_0x4adfde(863)][_0x4adfde(1384)]),_0x4780dc[_0x4adfde(593)]}},{key:_0x1ef9d8(552),value:function(_0x4ea036){var _0x303818=_0x1ef9d8;return 1==this[_0x303818(978)]?_0x4780dc[_0x303818(1112)]:(this[_0x303818(355)]!=_0x4ea036&&(this[_0x303818(1023)]=!0,this[_0x303818(355)]=_0x4ea036),_0x4780dc[_0x303818(593)])}},{key:_0x1ef9d8(328),value:function(_0x1883b8){var _0x41fbf6=_0x1ef9d8;return null==this[_0x41fbf6(429)]?_0x4780dc[_0x41fbf6(1538)]:this["pFishParamManager"][_0x41fbf6(728)](_0x1883b8)}},{key:_0x1ef9d8(1299),value:function(_0x471d30){var _0x518540=_0x1ef9d8;return null!=this["pFishParamManager"]?_0x4780dc[_0x518540(1112)]:(this[_0x518540(429)]=_0x471d30,_0x4780dc[_0x518540(593)])}},{key:_0x1ef9d8(1322),value:function(_0x37c8ea,_0x48703a,_0x20bf0e,_0x3c9965){var _0x499b2f=_0x1ef9d8;if(null!=this["pSemiSpherePos"]||null!=this[_0x499b2f(1524)])return _0x4780dc[_0x499b2f(1538)];this[_0x499b2f(881)]=new Float32Array(43200),this[_0x499b2f(1524)]=new Float32Array(28800);for(var _0x2638bb=(_0x48703a-_0x37c8ea)/(_0x3c9965-_0x20bf0e),_0x3e243c=(_0x48703a-_0x37c8ea)/2*1,_0x2d7cd3=2*_0x1f58a6/60,_0x44b300=_0x1f58a6/2/40,_0x1704db=0,_0x4bb494=0,_0x366bd8=0,_0x2935c6=0;_0x2935c6<60;++_0x2935c6)for(var _0x14a591=0;_0x14a591<40;++_0x14a591){var _0x2772b3,_0x5e330a,_0x5b2686=_0x2935c6*_0x2d7cd3,_0x54125d=(0==_0x2935c6&&(_0x1704db=_0x5b2686),59==_0x2935c6?_0x1704db:(_0x2935c6+1)*_0x2d7cd3),_0xad4e7f=-_0x14a591*_0x44b300,_0x5acb4f=-(_0x14a591+1)*_0x44b300;this[_0x499b2f(881)][_0x4bb494]=-1*Math[_0x499b2f(1268)](_0xad4e7f)*Math[_0x499b2f(1268)](_0x5b2686),this[_0x499b2f(881)][_0x4bb494+1]=+Math[_0x499b2f(514)](_0xad4e7f),this[_0x499b2f(881)][_0x4bb494+2]=-1*Math["cos"](_0xad4e7f)*Math[_0x499b2f(514)](_0x5b2686),_0x5e330a=.5-.5*(1+_0xad4e7f/(_0x1f58a6/2))*Math[_0x499b2f(514)](_0x5b2686),_0x2772b3=.5-.5*(1+_0xad4e7f/(_0x1f58a6/2))*Math[_0x499b2f(1268)](_0x5b2686),this[_0x499b2f(1524)][_0x366bd8++]=2*_0x2772b3*_0x3e243c+ +_0x37c8ea,this[_0x499b2f(1524)][_0x366bd8++]=(2*_0x5e330a*_0x3e243c+_0x20bf0e*_0x2638bb)/_0x2638bb,_0x4bb494+=3,this[_0x499b2f(881)][_0x4bb494]=-1*Math[_0x499b2f(1268)](_0x5acb4f)*Math["cos"](_0x5b2686),this["pSemiSpherePos"][_0x4bb494+1]=+Math[_0x499b2f(514)](_0x5acb4f),this[_0x499b2f(881)][_0x4bb494+2]=-1*Math[_0x499b2f(1268)](_0x5acb4f)*Math[_0x499b2f(514)](_0x5b2686),_0x5e330a=.5-.5*(1+_0x5acb4f/(_0x1f58a6/2))*Math[_0x499b2f(514)](_0x5b2686),_0x2772b3=.5-.5*(1+_0x5acb4f/(_0x1f58a6/2))*Math[_0x499b2f(1268)](_0x5b2686),this[_0x499b2f(1524)][_0x366bd8++]=2*_0x2772b3*_0x3e243c+ +_0x37c8ea,this[_0x499b2f(1524)][_0x366bd8++]=(2*_0x5e330a*_0x3e243c+_0x20bf0e*_0x2638bb)/_0x2638bb,_0x4bb494+=3,this[_0x499b2f(881)][_0x4bb494]=-1*Math["cos"](_0xad4e7f)*Math[_0x499b2f(1268)](_0x54125d),this[_0x499b2f(881)][_0x4bb494+1]=+Math[_0x499b2f(514)](_0xad4e7f),this["pSemiSpherePos"][_0x4bb494+2]=-1*Math[_0x499b2f(1268)](_0xad4e7f)*Math[_0x499b2f(514)](_0x54125d),_0x5e330a=.5-.5*(1+_0xad4e7f/(_0x1f58a6/2))*Math["sin"](_0x54125d),_0x2772b3=.5-.5*(1+_0xad4e7f/(_0x1f58a6/2))*Math[_0x499b2f(1268)](_0x54125d),this[_0x499b2f(1524)][_0x366bd8++]=2*_0x2772b3*_0x3e243c+ +_0x37c8ea,this["pSemiSphereTex"][_0x366bd8++]=(2*_0x5e330a*_0x3e243c+_0x20bf0e*_0x2638bb)/_0x2638bb,_0x4bb494+=3,this[_0x499b2f(881)][_0x4bb494]=-1*Math[_0x499b2f(1268)](_0xad4e7f)*Math[_0x499b2f(1268)](_0x54125d),this[_0x499b2f(881)][_0x4bb494+1]=+Math[_0x499b2f(514)](_0xad4e7f),this[_0x499b2f(881)][_0x4bb494+2]=-1*Math[_0x499b2f(1268)](_0xad4e7f)*Math[_0x499b2f(514)](_0x54125d),_0x5e330a=.5-.5*(1+_0xad4e7f/(_0x1f58a6/2))*Math[_0x499b2f(514)](_0x54125d),_0x2772b3=.5-.5*(1+_0xad4e7f/(_0x1f58a6/2))*Math[_0x499b2f(1268)](_0x54125d),this["pSemiSphereTex"][_0x366bd8++]=2*_0x2772b3*_0x3e243c+ +_0x37c8ea,this[_0x499b2f(1524)][_0x366bd8++]=(2*_0x5e330a*_0x3e243c+_0x20bf0e*_0x2638bb)/_0x2638bb,_0x4bb494+=3,this[_0x499b2f(881)][_0x4bb494]=-1*Math[_0x499b2f(1268)](_0x5acb4f)*Math[_0x499b2f(1268)](_0x5b2686),this[_0x499b2f(881)][_0x4bb494+1]=+Math[_0x499b2f(514)](_0x5acb4f),this["pSemiSpherePos"][_0x4bb494+2]=-1*Math["cos"](_0x5acb4f)*Math[_0x499b2f(514)](_0x5b2686),_0x5e330a=.5-.5*(1+_0x5acb4f/(_0x1f58a6/2))*Math[_0x499b2f(514)](_0x5b2686),_0x2772b3=.5-.5*(1+_0x5acb4f/(_0x1f58a6/2))*Math[_0x499b2f(1268)](_0x5b2686),this["pSemiSphereTex"][_0x366bd8++]=2*_0x2772b3*_0x3e243c+ +_0x37c8ea,this["pSemiSphereTex"][_0x366bd8++]=(2*_0x5e330a*_0x3e243c+_0x20bf0e*_0x2638bb)/_0x2638bb,_0x4bb494+=3,this[_0x499b2f(881)][_0x4bb494]=-1*Math[_0x499b2f(1268)](_0x5acb4f)*Math[_0x499b2f(1268)](_0x54125d),this[_0x499b2f(881)][_0x4bb494+1]=+Math[_0x499b2f(514)](_0x5acb4f),this[_0x499b2f(881)][_0x4bb494+2]=-1*Math[_0x499b2f(1268)](_0x5acb4f)*Math[_0x499b2f(514)](_0x54125d),_0x5e330a=.5-.5*(1+_0x5acb4f/(_0x1f58a6/2))*Math[_0x499b2f(514)](_0x54125d),_0x2772b3=.5-.5*(1+_0x5acb4f/(_0x1f58a6/2))*Math[_0x499b2f(1268)](_0x54125d),this["pSemiSphereTex"][_0x366bd8++]=2*_0x2772b3*_0x3e243c+ +_0x37c8ea,this[_0x499b2f(1524)][_0x366bd8++]=(2*_0x5e330a*_0x3e243c+_0x20bf0e*_0x2638bb)/_0x2638bb,_0x4bb494+=3}return this[_0x499b2f(794)]=_0x4bb494/3,this[_0x499b2f(1566)]=3,this[_0x499b2f(1229)]=2,_0x4780dc[_0x499b2f(593)]}},{key:_0x1ef9d8(742),value:function(_0xe667d7){var _0x1fd6de=_0x1ef9d8;if(null!=this["pCamera"])return SR_ERR_CALL_ORDER;switch(_0xe667d7){case _0x4e9094[_0x1fd6de(1347)]:case _0x4e9094[_0x1fd6de(677)]:case _0x4e9094[_0x1fd6de(1282)]:case _0x4e9094["SR_DE_FISH_PTZ_FLOOR"]:case _0x4e9094["SR_DE_FISH_PTZ_WALL"]:case _0x4e9094[_0x1fd6de(1379)]:case _0x4e9094[_0x1fd6de(1212)]:case _0x4e9094["SR_DE_FISH_PANORAMA_FLOOR_360"]:case _0x4e9094[_0x1fd6de(1366)]:case _0x4e9094[_0x1fd6de(1018)]:return _0x4780dc["SR_OK"];case _0x4e9094[_0x1fd6de(1010)]:if(this[_0x1fd6de(482)]=new _0x4d9a25,null==this[_0x1fd6de(482)])return _0x4780dc[_0x1fd6de(694)];this[_0x1fd6de(482)]["SetFov"](_0x99ac9a),this["pCamera"]["SetNear"](.02),this[_0x1fd6de(482)][_0x1fd6de(824)](1e3),this[_0x1fd6de(420)]=1.57,this[_0x1fd6de(482)][_0x1fd6de(515)](3.14-this["fRotateX"]),this[_0x1fd6de(649)]=3,this[_0x1fd6de(482)][_0x1fd6de(995)](this[_0x1fd6de(649)]);break;case _0x4e9094[_0x1fd6de(364)]:case _0x4e9094["SR_DE_FISH_CYLINDER_FLOOR"]:if(this[_0x1fd6de(482)]=new _0x4d9a25,null==this[_0x1fd6de(482)])return _0x4780dc[_0x1fd6de(694)];this[_0x1fd6de(482)][_0x1fd6de(659)](_0x99ac9a),this[_0x1fd6de(482)][_0x1fd6de(1400)](.02),this[_0x1fd6de(482)][_0x1fd6de(824)](1e3),this["fRotateX"]=-.785,this[_0x1fd6de(482)][_0x1fd6de(515)](-this["fRotateX"]),this[_0x1fd6de(649)]=6,this[_0x1fd6de(482)][_0x1fd6de(995)](this[_0x1fd6de(649)]);break;case _0x4e9094[_0x1fd6de(414)]:case _0x4e9094[_0x1fd6de(1139)]:if(this[_0x1fd6de(482)]=new _0x4d9a25,null==this[_0x1fd6de(482)])return _0x4780dc[_0x1fd6de(694)];this[_0x1fd6de(482)][_0x1fd6de(1136)](!0),this[_0x1fd6de(482)][_0x1fd6de(1400)](.02),this["pCamera"]["SetFar"](1e3),this[_0x1fd6de(649)]=3,this[_0x1fd6de(482)][_0x1fd6de(995)](this[_0x1fd6de(649)]);break;default:return _0x4780dc[_0x1fd6de(1112)]}return _0x4780dc[_0x1fd6de(593)]}},{key:_0x1ef9d8(1294),value:function(_0x2cfdb7,_0x46ff8c){var _0x3c1698=_0x1ef9d8;if(!this[_0x3c1698(983)])return _0x4780dc["SR_ERR_NOT_SUPPORT"];switch(_0x2cfdb7){case _0x178e93:this[_0x3c1698(420)]=_0x46ff8c;break;case _0x277fe2:this[_0x3c1698(669)]=_0x46ff8c;break;case _0x2b582f:if(this[_0x3c1698(1198)]==_0x4e9094[_0x3c1698(1010)]){if(_0x46ff8c<-.8||900<_0x46ff8c)return _0x4780dc[_0x3c1698(650)]}else{if((this[_0x3c1698(1198)]==_0x4e9094[_0x3c1698(405)]||this["enDisplayEffect"]==_0x4e9094[_0x3c1698(364)])&&(_0x46ff8c<0||900<_0x46ff8c))return _0x4780dc[_0x3c1698(650)]}this[_0x3c1698(649)]=_0x46ff8c;break;default:return _0x4780dc[_0x3c1698(1112)]}return _0x4780dc[_0x3c1698(593)]}},{key:_0x1ef9d8(418),value:function(_0x5c966b){var _0x61fb42=_0x1ef9d8;if(!this[_0x61fb42(983)])return _0x4780dc[_0x61fb42(1112)];var _0x29ea25=0;switch(_0x5c966b){case _0x178e93:_0x29ea25=this[_0x61fb42(420)];break;case _0x277fe2:_0x29ea25=this[_0x61fb42(669)];break;case _0x2b582f:_0x29ea25=this[_0x61fb42(649)]}return _0x29ea25}},{key:_0x1ef9d8(504),value:function(_0x4f2838,_0x3357b6,_0x192945){var _0x327cf4=_0x1ef9d8;switch(_0x192945){case _0x16efce:this[_0x327cf4(1333)]=_0x4f2838,this["pUserIn"]=_0x3357b6;break;case _0xfdfdb7:this[_0x327cf4(1075)]=_0x4f2838,this[_0x327cf4(1411)]=_0x3357b6;break;default:return _0x4780dc[_0x327cf4(1112)]}return _0x4780dc[_0x327cf4(593)]}},{key:"SR_SetRenderState",value:function(_0x1c9870,_0x93b14f){var _0x585ba9=_0x1ef9d8;switch(_0x1c9870){case _0x1cc4c6:if(this[_0x585ba9(983)])return _0x4780dc[_0x585ba9(1112)];break;case _0x11d463:if(!this[_0x585ba9(983)])return _0x4780dc[_0x585ba9(1112)];Math[_0x585ba9(1502)](+_0x93b14f)<_0x453d9f?this[_0x585ba9(762)]=!1:this[_0x585ba9(762)]=!0;break;default:return _0x4780dc[_0x585ba9(1112)]}return _0x4780dc["SR_OK"]}},{key:_0x1ef9d8(1372),value:function(_0x236bd3,_0x72fa91){var _0x208e82=_0x1ef9d8;return null==this["pFishParamManager"]?_0x4780dc["SR_ERR_CALL_ORDER"]:this[_0x208e82(429)][_0x208e82(1486)](_0x236bd3,_0x72fa91)}},{key:"SR_GetPTZColor",value:function(_0x54f9fa,_0x53fad4){var _0x162de9=_0x1ef9d8;return null==this[_0x162de9(429)]?_0x4780dc[_0x162de9(1538)]:this[_0x162de9(429)][_0x162de9(613)](_0x54f9fa,_0x53fad4)}},{key:_0x1ef9d8(1551),value:function(_0x578fbd){var _0x4d133c=_0x1ef9d8;return null==this["pFishParamManager"]?_0x4780dc[_0x4d133c(1538)]:this[_0x4d133c(429)][_0x4d133c(430)](_0x578fbd)}},{key:"SR_GetPTZPort",value:function(_0x250170,_0x44fb58){var _0x520282=_0x1ef9d8;return null==this[_0x520282(429)]?_0x4780dc["SR_ERR_CALL_ORDER"]:this[_0x520282(429)][_0x520282(993)](_0x250170,_0x44fb58)}}]),_0x336a72}(),_0x2b10fa=function(){var _0x5a4183=_0x372e98;function _0xafa041(){var _0x3e8d8b=a0_0x5477;_0x56ad3b(this,_0xafa041),this[_0x3e8d8b(863)]=null,this[_0x3e8d8b(926)]=null,this[_0x3e8d8b(795)]=0,this[_0x3e8d8b(521)]=0,this[_0x3e8d8b(379)]=0,this["regionSh"]=0,this[_0x3e8d8b(1009)]=!1,this[_0x3e8d8b(355)]=!1,this[_0x3e8d8b(668)]=!1}return _0x5dd832(_0xafa041,[{key:"SR_Init",value:function(_0x4a7d33){var _0x3a7883=a0_0x5477;this[_0x3a7883(863)]=_0x4a7d33,this[_0x3a7883(926)]=this[_0x3a7883(863)][_0x3a7883(1021)]("2d"),this[_0x3a7883(926)]||console[_0x3a7883(1590)](_0x3a7883(944))}},{key:"SR_Draw",value:function(_0x811d94){var _0x33a9b3=a0_0x5477;this[_0x33a9b3(1009)]?this[_0x33a9b3(926)][_0x33a9b3(1079)](_0x811d94,this[_0x33a9b3(795)],this[_0x33a9b3(521)],this[_0x33a9b3(379)],this[_0x33a9b3(1365)],0,0,this[_0x33a9b3(863)][_0x33a9b3(1454)],this[_0x33a9b3(863)][_0x33a9b3(1384)]):this[_0x33a9b3(926)][_0x33a9b3(1079)](_0x811d94,0,0,_0x811d94[_0x33a9b3(1501)],_0x811d94[_0x33a9b3(526)],0,0,this[_0x33a9b3(863)][_0x33a9b3(1454)],this["canvas"][_0x33a9b3(1384)])}},{key:_0x5a4183(943),value:function(_0x391c83){return 0}},{key:_0x5a4183(856),value:function(_0x4c5f07){return 0}},{key:_0x5a4183(1166),value:function(_0x45860c,_0x33461a,_0x788738,_0x2ef99e){var _0x3ce076=_0x5a4183;this[_0x3ce076(795)]=_0x45860c,this[_0x3ce076(521)]=_0x33461a,this[_0x3ce076(379)]=_0x788738,this["regionSh"]=_0x2ef99e,this[_0x3ce076(1009)]=!0}},{key:_0x5a4183(1577),value:function(){var _0xf165a1=_0x5a4183;this["canvas"]=null,this[_0xf165a1(926)]=null,this[_0xf165a1(795)]=0,this["regionSy"]=0,this[_0xf165a1(379)]=0,this["regionSh"]=0,this[_0xf165a1(1009)]=!1}},{key:_0x5a4183(422),value:function(_0x54b4d0,_0x1bac0c){var _0x23c2e1=_0x5a4183;this[_0x23c2e1(863)][_0x23c2e1(1454)]=_0x54b4d0,this[_0x23c2e1(863)]["height"]=_0x1bac0c}},{key:_0x5a4183(918),value:function(){var _0x2f2a4c=_0x5a4183;console[_0x2f2a4c(1590)](_0x2f2a4c(720)+this["canvas"][_0x2f2a4c(1454)]+",height:"+this[_0x2f2a4c(863)][_0x2f2a4c(1384)])}},{key:_0x5a4183(552),value:function(_0x5b22d8){var _0x3f6f37=_0x5a4183;return _0x5b22d8!=this[_0x3f6f37(355)]?(this["bAntialias"]=_0x5b22d8,this[_0x3f6f37(668)]=!0):this[_0x3f6f37(668)]=!1,this[_0x3f6f37(668)]&&(this[_0x3f6f37(355)]?(this["canvas"][_0x3f6f37(1454)]=5*this[_0x3f6f37(863)][_0x3f6f37(1454)],this[_0x3f6f37(863)][_0x3f6f37(1384)]=5*this[_0x3f6f37(863)]["height"],this[_0x3f6f37(863)][_0x3f6f37(396)]["transform"]=_0x3f6f37(1199)):(this["canvas"][_0x3f6f37(1454)]=this["canvas"][_0x3f6f37(1454)]/5,this[_0x3f6f37(863)][_0x3f6f37(1384)]=this[_0x3f6f37(863)]["height"]/5,this["canvas"][_0x3f6f37(396)][_0x3f6f37(1492)]="scale(1)"),this["canvas"]["style"][_0x3f6f37(390)]=_0x3f6f37(706)),1}}]),_0xafa041}(),_0x28824e=function(){var _0x7c8a86=_0x372e98;function _0x32d1fc(){var _0xddfce=a0_0x5477;_0x56ad3b(this,_0x32d1fc),this[_0xddfce(1105)]=[],this["pRenderParam"]=[],this[_0xddfce(812)]=[],this[_0xddfce(1208)]=[],this[_0xddfce(739)]=null,this[_0xddfce(1042)]=[],this[_0xddfce(652)]=[],this[_0xddfce(1405)]=[],this["nPTZFragmentNum"]=[],this[_0xddfce(884)]=[],this[_0xddfce(1325)]=[],this[_0xddfce(1459)]=[],this[_0xddfce(1343)]=[],this[_0xddfce(1120)]=_0x7c2613,this[_0xddfce(915)]=0,this[_0xddfce(332)]=1,this[_0xddfce(737)]=0,this[_0xddfce(402)]=1,this[_0xddfce(368)]=!1,this["pOriPTZPoints"]=[],this[_0xddfce(884)]=[],this[_0xddfce(1398)]=-1,this[_0xddfce(1252)]=0,this[_0xddfce(1138)]=[],this[_0xddfce(646)]=[],this["nPTZDisplayMode"]=_0xbacc34;for(var _0x377aa9=0;_0x377aa9<32;++_0x377aa9){this[_0xddfce(1105)][_0x377aa9]=!1,this["bPTZSelected"][_0x377aa9]=!1,this[_0xddfce(675)][_0x377aa9]=[],this["pRenderParam"][_0x377aa9][_0xddfce(780)]=1,this[_0xddfce(675)][_0x377aa9][_0xddfce(1181)]=0,this[_0xddfce(675)][_0x377aa9][_0xddfce(1025)]=1,this["pRenderParam"][_0x377aa9][_0xddfce(810)]=0,this[_0xddfce(675)][_0x377aa9]["fAngle"]=0,this[_0xddfce(675)][_0x377aa9][_0xddfce(1580)]=0,this["pRenderParam"][_0x377aa9][_0xddfce(915)]=0,this[_0xddfce(675)][_0x377aa9][_0xddfce(332)]=1,this[_0xddfce(675)][_0x377aa9]["fRY1"]=0,this[_0xddfce(675)][_0x377aa9][_0xddfce(402)]=1,this["pRenderParam"][_0x377aa9]["nDisplayEffect"]=0,this[_0xddfce(675)][_0x377aa9][_0xddfce(368)]=!1,this[_0xddfce(675)][_0x377aa9]["bCut"]=!1,this[_0xddfce(812)][_0x377aa9]=[],this[_0xddfce(812)][_0x377aa9]["nFishParamType"]=0,this[_0xddfce(812)][_0x377aa9]["fRXLeft"]=0,this[_0xddfce(812)][_0x377aa9][_0xddfce(919)]=1,this[_0xddfce(812)][_0x377aa9]["fRYTop"]=0,this[_0xddfce(812)][_0x377aa9][_0xddfce(825)]=1,this[_0xddfce(812)][_0x377aa9]["bBlack"]=!1,this["pFishParam"][_0x377aa9][_0xddfce(818)]=!1,this[_0xddfce(812)][_0x377aa9][_0xddfce(1485)]=0,this[_0xddfce(812)][_0x377aa9][_0xddfce(1580)]=0,this["pFishParam"][_0x377aa9]["fPTZX"]=.5,this[_0xddfce(812)][_0x377aa9][_0xddfce(660)]=.5,this["stPTZColor"][_0x377aa9]=[],this["stPTZColor"][_0x377aa9]["fR"]=0,this[_0xddfce(1208)][_0x377aa9]["fG"]=0,this[_0xddfce(1208)][_0x377aa9]["fB"]=0,this[_0xddfce(1208)][_0x377aa9]["fA"]=0,this[_0xddfce(1042)][_0x377aa9]=0,this["nOriPTZPointNum"][_0x377aa9]=0,this[_0xddfce(1405)][_0x377aa9]=0,this[_0xddfce(1343)][_0x377aa9]=0,this[_0xddfce(1325)][_0x377aa9]=[],this[_0xddfce(1459)][_0x377aa9]=[],this[_0xddfce(884)][_0x377aa9]=[],this[_0xddfce(1183)][_0x377aa9]=[];for(var _0x230d80=0;_0x230d80<4;++_0x230d80)this[_0xddfce(1459)][_0x377aa9][_0x230d80]=[],this[_0xddfce(1459)][_0x377aa9][_0x230d80]["fX"]=0,this[_0xddfce(1459)][_0x377aa9][_0x230d80]["fY"]=0;for(var _0x267732=0;_0x267732<1024;++_0x267732)this[_0xddfce(884)][_0x377aa9][_0x267732]=[],this[_0xddfce(884)][_0x377aa9][_0x267732]["fX"]=0,this[_0xddfce(884)][_0x377aa9][_0x267732]["fY"]=0,this[_0xddfce(1183)][_0x377aa9][_0x267732]=[],this[_0xddfce(1183)][_0x377aa9][_0x267732]["fX"]=0,this[_0xddfce(1183)][_0x377aa9][_0x267732]["fY"]=0,this[_0xddfce(1325)][_0x377aa9][_0x267732]=[],this[_0xddfce(1325)][_0x377aa9][_0x267732]["fX"]=0,this[_0xddfce(1325)][_0x377aa9][_0x267732]["fY"]=0;this[_0xddfce(733)][_0x377aa9]=0,this["nPTZFragmentNode"][_0x377aa9]=[];for(var _0xb5f455=0;_0xb5f455<100;++_0xb5f455)this[_0xddfce(1138)][_0x377aa9][_0xb5f455]=0}this[_0xddfce(948)]()}return _0x5dd832(_0x32d1fc,[{key:_0x7c8a86(1385),value:function(_0x108802){var _0x304501=_0x7c8a86;for(var _0x4e4e04=-1,_0x4d5986=0;_0x4d5986<32;++_0x4d5986)if(0==this[_0x304501(1105)][_0x4d5986]){_0x4e4e04=_0x4d5986;break}if(-1!=_0x4e4e04){var _0x14cd41=this[_0x304501(817)](_0x108802);if(_0x4780dc[_0x304501(593)]!=_0x14cd41)return this[_0x304501(1360)](_0x4e4e04),_0x4e4e04=-1;if(_0x4e9094[_0x304501(1379)]==_0x108802||_0x4e9094[_0x304501(1212)]==_0x108802||_0x4e9094[_0x304501(472)]==_0x108802||_0x4e9094[_0x304501(1366)]==_0x108802||_0x4e9094[_0x304501(1018)]==_0x108802||_0x4e9094[_0x304501(677)]==_0x108802){if(-1!=this[_0x304501(1398)])return this["FreeFECPort"](_0x4e4e04),_0x4e4e04=-1;this[_0x304501(1398)]=_0x4e4e04}if(!(_0x4e9094[_0x304501(1282)]!=_0x108802&&_0x4e9094[_0x304501(474)]!=_0x108802&&_0x4e9094[_0x304501(994)]!=_0x108802||-1==this[_0x304501(1398)]||null==this[_0x304501(675)][this[_0x304501(1398)]]||_0x4e9094["SR_DE_FISH_PANORAMA_CEILING_180"]!=this["pRenderParam"][this[_0x304501(1398)]][_0x304501(310)]&&_0x4e9094["SR_DE_FISH_PANORAMA_FLOOR_180"]!=this[_0x304501(675)][this[_0x304501(1398)]]["nDisplayEffect"]))return this[_0x304501(1360)](_0x4e4e04),_0x4e4e04=-1;if(_0x4e9094[_0x304501(1212)]==_0x108802||_0x4e9094[_0x304501(1366)]==_0x108802){for(var _0x4f33cc=0;_0x4f33cc<32;++_0x4f33cc)if(null!=this[_0x304501(675)][_0x4f33cc]&&(_0x4e9094[_0x304501(1282)]==this[_0x304501(675)][_0x4f33cc][_0x304501(310)]||_0x4e9094["SR_DE_FISH_PTZ_FLOOR"]==this[_0x304501(675)][_0x4f33cc]["nDisplayEffect"]||_0x4e9094[_0x304501(994)]==this[_0x304501(675)][_0x4f33cc]["nDisplayEffect"]))return this[_0x304501(1360)](_0x4e4e04),_0x4e4e04=-1}if(_0x4e9094["SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL"]==_0x108802){for(var _0x2547c4=0;_0x2547c4<32;++_0x2547c4)if(null!=this[_0x304501(675)][_0x2547c4]&&_0x4e9094[_0x304501(614)]==this[_0x304501(675)][_0x2547c4]["nDisplayEffect"])return this[_0x304501(1360)](_0x4e4e04),_0x4e4e04=-1}if(_0x4e9094[_0x304501(614)]==_0x108802){for(var _0x2d9767=0;_0x2d9767<32;++_0x2d9767)if(null!=this["pRenderParam"][_0x2d9767]&&_0x4e9094["SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL"]==this[_0x304501(675)][_0x2d9767]["nDisplayEffect"])return this[_0x304501(1360)](_0x4e4e04),_0x4e4e04=-1}this["pRenderParam"][_0x4e4e04][_0x304501(780)]=1,this[_0x304501(675)][_0x4e4e04][_0x304501(1181)]=0,this["pRenderParam"][_0x4e4e04][_0x304501(1025)]=1,this[_0x304501(675)][_0x4e4e04][_0x304501(1181)]=0,this[_0x304501(675)][_0x4e4e04]["fAngle"]=0,this[_0x304501(675)][_0x4e4e04][_0x304501(915)]=this["fRX1"],this[_0x304501(675)][_0x4e4e04][_0x304501(332)]=this[_0x304501(332)],this["pRenderParam"][_0x4e4e04][_0x304501(737)]=this["fRY1"],this[_0x304501(675)][_0x4e4e04][_0x304501(402)]=this["fRY2"],this["pRenderParam"][_0x4e4e04][_0x304501(368)]=this[_0x304501(368)],this[_0x304501(675)][_0x4e4e04][_0x304501(1580)]=.035+.8,this[_0x304501(675)][_0x4e4e04][_0x304501(310)]=_0x108802,this[_0x304501(812)][_0x4e4e04][_0x304501(1485)]=this["pRenderParam"][_0x4e4e04]["fAngle"],this[_0x304501(812)][_0x4e4e04][_0x304501(875)]=.5,this[_0x304501(812)][_0x4e4e04][_0x304501(660)]=.5,this[_0x304501(812)][_0x4e4e04][_0x304501(473)]=this[_0x304501(675)][_0x4e4e04][_0x304501(915)],this["pFishParam"][_0x4e4e04][_0x304501(919)]=this[_0x304501(675)][_0x4e4e04]["fRX2"],this[_0x304501(812)][_0x4e4e04][_0x304501(1171)]=this[_0x304501(675)][_0x4e4e04][_0x304501(737)],this["pFishParam"][_0x4e4e04]["fRYBottom"]=this["pRenderParam"][_0x4e4e04]["fRY2"],this[_0x304501(812)][_0x4e4e04][_0x304501(368)]=this[_0x304501(675)][_0x4e4e04][_0x304501(368)],this[_0x304501(812)][_0x4e4e04][_0x304501(1580)]=(this[_0x304501(675)][_0x4e4e04][_0x304501(1580)]-.8)/7,this[_0x304501(1105)][_0x4e4e04]=!0}return _0x4e4e04}},{key:_0x7c8a86(1360),value:function(_0x1bc95a){var _0x4406e9=_0x7c8a86;if(_0x1bc95a<0||32<=_0x1bc95a)return _0x4780dc[_0x4406e9(650)];this[_0x4406e9(1398)]==_0x1bc95a&&(this[_0x4406e9(1398)]=-1),this[_0x4406e9(675)][_0x1bc95a][_0x4406e9(780)]=1,this[_0x4406e9(675)][_0x1bc95a]["fSinH"]=0,this[_0x4406e9(675)][_0x1bc95a][_0x4406e9(1025)]=1,this[_0x4406e9(675)][_0x1bc95a][_0x4406e9(810)]=0,this[_0x4406e9(675)][_0x1bc95a]["fAngle"]=0,this[_0x4406e9(675)][_0x1bc95a][_0x4406e9(1580)]=0,this[_0x4406e9(675)][_0x1bc95a][_0x4406e9(915)]=0,this["pRenderParam"][_0x1bc95a][_0x4406e9(332)]=1,this[_0x4406e9(675)][_0x1bc95a][_0x4406e9(737)]=0,this[_0x4406e9(675)][_0x1bc95a]["fRY2"]=1,this[_0x4406e9(675)][_0x1bc95a][_0x4406e9(310)]=0,this[_0x4406e9(675)][_0x1bc95a]["bBlack"]=!1,this["pRenderParam"][_0x1bc95a][_0x4406e9(818)]=!1,this[_0x4406e9(812)][_0x1bc95a][_0x4406e9(572)]=0,this["pFishParam"][_0x1bc95a][_0x4406e9(473)]=0,this[_0x4406e9(812)][_0x1bc95a][_0x4406e9(919)]=1,this[_0x4406e9(812)][_0x1bc95a][_0x4406e9(1171)]=0,this[_0x4406e9(812)][_0x1bc95a][_0x4406e9(825)]=1,this[_0x4406e9(812)][_0x1bc95a]["bBlack"]=!1,this[_0x4406e9(812)][_0x1bc95a]["bCut"]=!1,this["pFishParam"][_0x1bc95a][_0x4406e9(1485)]=0,this[_0x4406e9(812)][_0x1bc95a][_0x4406e9(1580)]=0,this["pFishParam"][_0x1bc95a][_0x4406e9(875)]=.5,this[_0x4406e9(812)][_0x1bc95a][_0x4406e9(660)]=.5,this[_0x4406e9(1042)][_0x1bc95a]=0,this[_0x4406e9(652)][_0x1bc95a]=0,this[_0x4406e9(1405)][_0x1bc95a]=0;for(var _0x46aa98=this[_0x4406e9(1343)][_0x1bc95a]=0;_0x46aa98<4;++_0x46aa98)this[_0x4406e9(1459)][_0x1bc95a][_0x46aa98]["fX"]=0,this["pRectPoints"][_0x1bc95a][_0x46aa98]["fY"]=0;for(var _0x143a75=0;_0x143a75<1024;++_0x143a75)this[_0x4406e9(884)][_0x1bc95a][_0x143a75]["fX"]=0,this["pBasePTZPoints"][_0x1bc95a][_0x143a75]["fY"]=0,this[_0x4406e9(1183)][_0x1bc95a][_0x143a75]["fX"]=0,this[_0x4406e9(1183)][_0x1bc95a][_0x143a75]["fY"]=0,this["pPanoPTZPoints"][_0x1bc95a][_0x143a75]["fX"]=0,this[_0x4406e9(1325)][_0x1bc95a][_0x143a75]["fY"]=0;if(null!=this[_0x4406e9(739)]&&(this[_0x4406e9(739)][_0x1bc95a]["fA"]=0,this["pPTZSetColor"][_0x1bc95a]["fR"]=0,this["pPTZSetColor"][_0x1bc95a]["fG"]=0,this["pPTZSetColor"][_0x1bc95a]["fB"]=0),this[_0x4406e9(646)][_0x1bc95a]=!1,0!=this[_0x4406e9(1252)]){var _0x41c34d=!1;if(null!=this[_0x4406e9(675)][i]){for(var _0x36a061=0;_0x36a061<32;++_0x36a061)if(null!=this[_0x4406e9(675)][_0x36a061]&&(_0x4e9094["SR_DE_FISH_PTZ_CEILING"]==this[_0x4406e9(675)][_0x36a061]["nDisplayEffect"]||_0x4e9094[_0x4406e9(474)]==this["pRenderParam"][_0x36a061][_0x4406e9(310)]||_0x4e9094[_0x4406e9(994)]==this[_0x4406e9(675)][_0x36a061][_0x4406e9(310)]||_0x4e9094["SR_DE_FISH_PANORAMA_CEILING_360"]==this[_0x4406e9(675)][_0x36a061][_0x4406e9(310)]||_0x4e9094["SR_DE_FISH_PANORAMA_CEILING_180"]==this[_0x4406e9(675)][_0x36a061]["nDisplayEffect"]||_0x4e9094[_0x4406e9(472)]==this["pRenderParam"][_0x36a061]["nDisplayEffect"]||_0x4e9094[_0x4406e9(1366)]==this["pRenderParam"][_0x36a061][_0x4406e9(310)]||_0x4e9094[_0x4406e9(1018)]==this["pRenderParam"][_0x36a061]["nDisplayEffect"]||_0x4e9094[_0x4406e9(364)]==this["pRenderParam"][_0x36a061][_0x4406e9(310)]||_0x4e9094[_0x4406e9(405)]==this[_0x4406e9(675)][_0x36a061][_0x4406e9(310)]||_0x4e9094[_0x4406e9(414)]==this[_0x4406e9(675)][_0x36a061][_0x4406e9(310)]||_0x4e9094[_0x4406e9(1139)]==this["pRenderParam"][_0x36a061][_0x4406e9(310)]||_0x4e9094["SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL"]==this["pRenderParam"][_0x36a061]["nDisplayEffect"]||_0x4e9094[_0x4406e9(614)]==this[_0x4406e9(675)][_0x36a061][_0x4406e9(310)])){_0x41c34d=!0;break}}_0x41c34d||(this["nPlaceType"]=0)}for(var _0x3c7c24=!1,_0x2889bd=0;_0x2889bd<32;++_0x2889bd)if(null!=this[_0x4406e9(675)][_0x2889bd]){_0x3c7c24=!0;break}_0x3c7c24||(this[_0x4406e9(915)]=0,this[_0x4406e9(332)]=1,this[_0x4406e9(737)]=0,this[_0x4406e9(402)]=1,this[_0x4406e9(368)]=!1);for(var _0x4ea0be=this["nPTZFragmentNum"][_0x1bc95a]=0;_0x4ea0be<100;++_0x4ea0be)this[_0x4406e9(1138)][_0x1bc95a][_0x4ea0be]=0;return this[_0x4406e9(1105)][_0x1bc95a]=!1,_0x4780dc[_0x4406e9(593)]}},{key:_0x7c8a86(505),value:function(){var _0x1fbdc2=_0x7c8a86;for(var _0x532417=0;_0x532417<32;++_0x532417){for(var _0x48d6dd=0;_0x48d6dd<4;++_0x48d6dd)this[_0x1fbdc2(1459)][_0x532417][_0x48d6dd]=null;for(var _0x5ab3f9=0;_0x5ab3f9<1024;++_0x5ab3f9)this["pBasePTZPoints"][_0x532417][_0x5ab3f9]=null,this[_0x1fbdc2(1183)][_0x532417][_0x5ab3f9]=null,this["pPanoPTZPoints"][_0x532417][_0x5ab3f9]=null;this[_0x1fbdc2(733)][_0x532417]=0,this["nPTZFragmentNode"][_0x532417]=null,this["bPortAllocated"][_0x532417]=!1,this[_0x1fbdc2(646)][_0x532417]=!1,this["pRenderParam"][_0x532417]=null,this[_0x1fbdc2(812)][_0x532417]=null,this[_0x1fbdc2(1208)][_0x532417]=null,this[_0x1fbdc2(1042)][_0x532417]=0,this[_0x1fbdc2(652)][_0x532417]=0,this["nPanoPTZPointNum"][_0x532417]=0,this[_0x1fbdc2(1343)][_0x532417]=0,this["pPanoPTZPoints"][_0x532417]=null,this["pRectPoints"][_0x532417]=null,this[_0x1fbdc2(884)][_0x532417]=null,this[_0x1fbdc2(1183)][_0x532417]=null}this[_0x1fbdc2(1105)]=null,this["pRenderParam"]=null,this[_0x1fbdc2(812)]=null,this[_0x1fbdc2(1208)]=null,this[_0x1fbdc2(739)]=null,this["nBasePTZPointNum"]=null,this[_0x1fbdc2(652)]=null,this[_0x1fbdc2(1405)]=null,this["nPTZFragmentNum"]=null,this["pBasePTZPoints"]=null,this["pPanoPTZPoints"]=null,this[_0x1fbdc2(1459)]=null,this["nPTZRectNum"]=null,this[_0x1fbdc2(1120)]=_0x7c2613,this[_0x1fbdc2(915)]=0,this[_0x1fbdc2(332)]=1,this["fRY1"]=0,this[_0x1fbdc2(402)]=1,this[_0x1fbdc2(368)]=!1,this["pOriPTZPoints"]=null,this["pBasePTZPoints"]=null,this[_0x1fbdc2(1398)]=-1,this["nPlaceType"]=0,this[_0x1fbdc2(1138)]=null,this[_0x1fbdc2(646)]=null,this[_0x1fbdc2(1120)]=_0xbacc34}},{key:"InitColorList",value:function(){var _0x39b3e8=_0x7c8a86;this["stPTZColor"][0]["fR"]=.5,this[_0x39b3e8(1208)][0]["fG"]=.5,this[_0x39b3e8(1208)][0]["fB"]=0,this["stPTZColor"][0]["fA"]=1,this[_0x39b3e8(1208)][1]["fR"]=1,this[_0x39b3e8(1208)][1]["fG"]=0,this[_0x39b3e8(1208)][1]["fB"]=0,this[_0x39b3e8(1208)][1]["fA"]=1,this[_0x39b3e8(1208)][2]["fR"]=0,this["stPTZColor"][2]["fG"]=1,this[_0x39b3e8(1208)][2]["fB"]=0,this["stPTZColor"][2]["fA"]=1,this[_0x39b3e8(1208)][3]["fR"]=0,this[_0x39b3e8(1208)][3]["fG"]=0,this["stPTZColor"][3]["fB"]=1,this[_0x39b3e8(1208)][3]["fA"]=1,this["stPTZColor"][4]["fR"]=1,this["stPTZColor"][4]["fG"]=1,this[_0x39b3e8(1208)][4]["fB"]=0,this[_0x39b3e8(1208)][4]["fA"]=1,this[_0x39b3e8(1208)][5]["fR"]=.5,this["stPTZColor"][5]["fG"]=0,this[_0x39b3e8(1208)][5]["fB"]=1,this[_0x39b3e8(1208)][5]["fA"]=1,this[_0x39b3e8(1208)][6]["fR"]=0,this["stPTZColor"][6]["fG"]=1,this[_0x39b3e8(1208)][6]["fB"]=1,this[_0x39b3e8(1208)][6]["fA"]=1,this[_0x39b3e8(1208)][7]["fR"]=1,this[_0x39b3e8(1208)][7]["fG"]=.5,this["stPTZColor"][7]["fB"]=0,this[_0x39b3e8(1208)][7]["fA"]=1,this[_0x39b3e8(1208)][8]["fR"]=0,this[_0x39b3e8(1208)][8]["fG"]=.5,this[_0x39b3e8(1208)][8]["fB"]=.5,this[_0x39b3e8(1208)][8]["fA"]=1;for(var _0x193458=9;_0x193458<32;_0x193458++)this[_0x39b3e8(1208)][_0x193458]["fR"]=+_0x193458/32,this[_0x39b3e8(1208)][_0x193458]["fG"]=+_0x193458/32,this[_0x39b3e8(1208)][_0x193458]["fB"]=+_0x193458/32,this[_0x39b3e8(1208)][_0x193458]["fA"]=1;return _0x4780dc[_0x39b3e8(593)]}},{key:_0x7c8a86(391),value:function(_0x5818e8){var _0x8cf53e=_0x7c8a86;if(_0x5818e8<0||32<=_0x5818e8)return _0x4780dc["SR_ERR_PARAM"];if(null==this[_0x8cf53e(675)][_0x5818e8])return _0x4780dc["SR_ERR_CALL_ORDER"];var _0x10ca50=0,_0x582789=0;switch(this[_0x8cf53e(652)][_0x5818e8]=0,this[_0x8cf53e(1042)][_0x5818e8]=0,this["pRenderParam"][_0x5818e8][_0x8cf53e(310)]){case _0x4e9094[_0x8cf53e(1282)]:for(_0x582789=0;_0x582789<1;_0x582789+=.01)this[_0x8cf53e(1003)](_0x10ca50,_0x582789,_0x5818e8);for(_0x582789=.9995,_0x10ca50=0;_0x10ca50<1;_0x10ca50+=.02)this["GetFishPTZCeiling"](_0x10ca50,_0x582789,_0x5818e8);for(_0x10ca50=.999,_0x582789=.9995;0<=_0x582789;_0x582789-=.01)this[_0x8cf53e(1003)](_0x10ca50,_0x582789,_0x5818e8);for(_0x582789=0,_0x10ca50=.999;0<=_0x10ca50;_0x10ca50-=.02)this["GetFishPTZCeiling"](_0x10ca50,_0x582789,_0x5818e8);break;case _0x4e9094[_0x8cf53e(474)]:for(_0x582789=0;_0x582789<1;_0x582789+=.01)this[_0x8cf53e(576)](_0x10ca50,_0x582789,_0x5818e8);for(_0x582789=.9995,_0x10ca50=0;_0x10ca50<1;_0x10ca50+=.02)this[_0x8cf53e(576)](_0x10ca50,_0x582789,_0x5818e8);for(_0x10ca50=.999,_0x582789=.9995;0<=_0x582789;_0x582789-=.01)this["GetFishPTZFloor"](_0x10ca50,_0x582789,_0x5818e8);for(_0x582789=0,_0x10ca50=.999;0<=_0x10ca50;_0x10ca50-=.02)this[_0x8cf53e(576)](_0x10ca50,_0x582789,_0x5818e8);break;case _0x4e9094[_0x8cf53e(994)]:for(_0x582789=0;_0x582789<1;_0x582789+=.01)this[_0x8cf53e(1090)](_0x10ca50,_0x582789,_0x5818e8);for(_0x582789=.9995,_0x10ca50=0;_0x10ca50<1;_0x10ca50+=.02)this[_0x8cf53e(1090)](_0x10ca50,_0x582789,_0x5818e8);for(_0x10ca50=.999,_0x582789=.9995;0<=_0x582789;_0x582789-=.01)this["GetFishPTZWALL"](_0x10ca50,_0x582789,_0x5818e8);for(_0x582789=0,_0x10ca50=.999;0<=_0x10ca50;_0x10ca50-=.02)this["GetFishPTZWALL"](_0x10ca50,_0x582789,_0x5818e8)}return _0x4780dc[_0x8cf53e(593)]}},{key:_0x7c8a86(838),value:function(_0x333f12){var _0x1f1225=_0x7c8a86;if(-1==this["nWndPort"])return _0x4780dc[_0x1f1225(1538)];if(null==this[_0x1f1225(884)][_0x333f12]||null==this[_0x1f1225(675)][this[_0x1f1225(1398)]])return _0x4780dc[_0x1f1225(1538)];this[_0x1f1225(1405)][_0x333f12]=0;var _0x171bec=_0x4780dc[_0x1f1225(593)],_0x2adc53=this[_0x1f1225(1398)];switch(this[_0x1f1225(675)][_0x2adc53][_0x1f1225(310)]){case _0x4e9094[_0x1f1225(1018)]:if(_0x171bec=this[_0x1f1225(1024)](_0x333f12),_0x4780dc[_0x1f1225(593)]!=_0x171bec)return _0x171bec;break;case _0x4e9094[_0x1f1225(472)]:if(_0x171bec=this[_0x1f1225(1356)](_0x333f12),_0x4780dc[_0x1f1225(593)]!=_0x171bec)return _0x171bec;break;case _0x4e9094[_0x1f1225(1379)]:if(_0x171bec=this[_0x1f1225(1091)](_0x333f12),_0x4780dc["SR_OK"]!=_0x171bec)return _0x171bec;break;default:return _0x4780dc[_0x1f1225(1112)]}return this[_0x1f1225(779)](_0x333f12),_0x4780dc[_0x1f1225(593)]}},{key:"GetRectPoints",value:function(_0x547615){var _0x19e599=_0x7c8a86;if(_0x547615<0||32<=_0x547615)return _0x4780dc[_0x19e599(650)];if(-1==this[_0x19e599(1398)])return _0x4780dc["SR_ERR_CALL_ORDER"];if(null==this[_0x19e599(675)][this[_0x19e599(1398)]]||null==this[_0x19e599(812)][_0x547615])return _0x4780dc["SR_ERR_CALL_ORDER"];var _0x58fbdc=this[_0x19e599(675)][this[_0x19e599(1398)]][_0x19e599(310)],_0x2499ca=_0x4780dc[_0x19e599(593)],_0x2a58d3=[];switch(_0x2a58d3["fX"]=0,_0x2a58d3["fY"]=0,_0x58fbdc){case _0x4e9094["SR_DE_FISH_PANORAMA_WALL"]:if(_0x2499ca=this[_0x19e599(1238)](_0x2a58d3,this[_0x19e599(812)][_0x547615][_0x19e599(875)],this["pFishParam"][_0x547615][_0x19e599(660)]),_0x4780dc[_0x19e599(593)]!=_0x2499ca)return _0x2499ca;break;case _0x4e9094[_0x19e599(472)]:if(_0x2499ca=this[_0x19e599(1077)](_0x2a58d3,this[_0x19e599(812)][_0x547615][_0x19e599(875)],this[_0x19e599(812)][_0x547615][_0x19e599(660)]),_0x4780dc[_0x19e599(593)]!=_0x2499ca)return _0x4780dc[_0x19e599(1112)]==_0x2499ca&&(this["pRectPoints"][_0x547615]=null),_0x2499ca;break;case _0x4e9094[_0x19e599(1379)]:if(_0x2499ca=this["GetPointFish2PanoCeiling"](_0x2a58d3,this[_0x19e599(812)][_0x547615][_0x19e599(875)],this[_0x19e599(812)][_0x547615]["fPTZY"]),_0x4780dc[_0x19e599(593)]!=_0x2499ca)return _0x4780dc[_0x19e599(1112)]==_0x2499ca&&(this["pRectPoints"][_0x547615]=null),_0x2499ca;break;case _0x4e9094["SR_DE_FISH_ORIGINAL"]:_0x2a58d3["fX"]=this["pFishParam"][_0x547615]["fPTZX"],_0x2a58d3["fY"]=this[_0x19e599(812)][_0x547615][_0x19e599(660)];break;default:return _0x4780dc["SR_ERR_NOT_SUPPORT"]}if(null==this[_0x19e599(1459)][_0x547615]){this[_0x19e599(1459)][_0x547615]=[];for(var _0x1a6986=0;_0x1a6986<4;++_0x1a6986)this[_0x19e599(1459)][_0x547615][_0x1a6986]=[],this["pRectPoints"][_0x547615][_0x1a6986]["fX"]=0,this["pRectPoints"][_0x547615][_0x1a6986]["fY"]=0}return this[_0x19e599(1459)][_0x547615][0]["fX"]=_0x2a58d3["fX"]-_0x53f981,this[_0x19e599(1459)][_0x547615][0]["fY"]=_0x2a58d3["fY"]-_0x53f981,this[_0x19e599(1459)][_0x547615][1]["fX"]=_0x2a58d3["fX"]+_0x53f981,this[_0x19e599(1459)][_0x547615][1]["fY"]=_0x2a58d3["fY"]-_0x53f981,this[_0x19e599(1459)][_0x547615][2]["fX"]=_0x2a58d3["fX"]+_0x53f981,this[_0x19e599(1459)][_0x547615][2]["fY"]=_0x2a58d3["fY"]+_0x53f981,this["pRectPoints"][_0x547615][3]["fX"]=_0x2a58d3["fX"]-_0x53f981,this["pRectPoints"][_0x547615][3]["fY"]=_0x2a58d3["fY"]+_0x53f981,this[_0x19e599(1343)][_0x547615]=4,_0x4780dc[_0x19e599(593)]}},{key:_0x7c8a86(1003),value:function(_0x5063b5,_0x1ea16d,_0x51c2b2){var _0x148360=_0x7c8a86,_0x3508df=[],_0x28921a=(_0x3508df["fX"]=0,_0x3508df["fY"]=0,[]),_0x3bd491=(_0x28921a["fX"]=0,_0x28921a["fY"]=0,[]),_0x3432b6=(_0x3bd491["fX"]=0,_0x3bd491["fY"]=0,[]),_0xd78337=(this["fRX2"]-this[_0x148360(915)])/(this[_0x148360(402)]-this[_0x148360(737)]),_0x2f4160=(this["fRX1"]+this[_0x148360(332)])/2*1,_0x28d2fb=(this[_0x148360(737)]+this[_0x148360(402)])/2*_0xd78337,_0x371e1f=(this["fRX2"]-this[_0x148360(915)])/2*1,_0x5063b5=(_0x3508df["fX"]=_0x1ea16d-.5,_0x3508df["fY"]=.5-_0x5063b5,_0x1ea16d=this[_0x148360(675)][_0x51c2b2][_0x148360(1580)],_0x28921a["fX"]=_0x3508df["fX"],_0x28921a["fY"]=_0x3508df["fY"]*this[_0x148360(675)][_0x51c2b2][_0x148360(1025)]+_0x1ea16d*this[_0x148360(675)][_0x51c2b2]["fSinV"],_0x1ea16d*this[_0x148360(675)][_0x51c2b2][_0x148360(1025)]-_0x3508df["fY"]*this[_0x148360(675)][_0x51c2b2]["fSinV"]),_0x1ea16d=Math[_0x148360(1540)](_0x28921a["fX"]*_0x28921a["fX"]+_0x28921a["fY"]*_0x28921a["fY"]),_0x3508df=Math[_0x148360(1540)](_0x28921a["fX"]*_0x28921a["fX"]+_0x28921a["fY"]*_0x28921a["fY"]+_0x5063b5*_0x5063b5),_0x5063b5=Math[_0x148360(925)](_0x1ea16d/_0x3508df)/1.5707963*.5,_0x3508df=(_0x28921a["fX"]=_0x5063b5*_0x28921a["fX"]/_0x1ea16d,_0x28921a["fY"]=_0x5063b5*_0x28921a["fY"]/_0x1ea16d,_0x3bd491["fX"]=_0x28921a["fX"]*this["pRenderParam"][_0x51c2b2][_0x148360(780)]-_0x28921a["fY"]*this[_0x148360(675)][_0x51c2b2][_0x148360(1181)],_0x3bd491["fY"]=_0x28921a["fX"]*this["pRenderParam"][_0x51c2b2][_0x148360(1181)]+_0x28921a["fY"]*this["pRenderParam"][_0x51c2b2][_0x148360(780)],_0x3432b6["fX"]=2*_0x3bd491["fX"]*_0x371e1f+_0x2f4160,_0x3432b6["fY"]=2*-_0x3bd491["fY"]*_0x371e1f+_0x28d2fb,this[_0x148360(1042)][_0x51c2b2]),_0x5063b5=(this["pBasePTZPoints"][_0x51c2b2][_0x3508df]["fX"]=_0x3bd491["fX"]+.5,this[_0x148360(884)][_0x51c2b2][_0x3508df]["fY"]=.5-_0x3bd491["fY"],this["nBasePTZPointNum"][_0x51c2b2]=this[_0x148360(1042)][_0x51c2b2]+1,this[_0x148360(915)]<=0?0:+this["fRX1"]),_0x1ea16d=this[_0x148360(737)]<=0?0:this["fRY1"]*_0xd78337,_0x28921a=1<=this[_0x148360(332)]?1-_0x5063b5:+this[_0x148360(332)]-_0x5063b5,_0x2f4160=1<=this[_0x148360(402)]?_0xd78337-_0x1ea16d:this[_0x148360(402)]*_0xd78337-_0x1ea16d;return _0x3432b6["fX"]=(_0x3432b6["fX"]-_0x5063b5)/_0x28921a,_0x3432b6["fY"]=(_0x3432b6["fY"]-_0x1ea16d)/_0x2f4160,_0x3432b6["fX"]<=1&&_0x3432b6["fY"]<=1&&0<=_0x3432b6["fX"]&&0<=_0x3432b6["fY"]&&(_0x371e1f=this[_0x148360(652)][_0x51c2b2],this[_0x148360(1183)][_0x51c2b2][_0x371e1f]["fX"]=_0x3432b6["fX"],this["pOriPTZPoints"][_0x51c2b2][_0x371e1f]["fY"]=_0x3432b6["fY"],this[_0x148360(652)][_0x51c2b2]=this[_0x148360(652)][_0x51c2b2]+1),_0x4780dc[_0x148360(593)]}},{key:_0x7c8a86(576),value:function(_0x221494,_0x366080,_0x443514){var _0x6e18e3=_0x7c8a86,_0x1c2846=[],_0x5af407=(_0x1c2846["fX"]=0,_0x1c2846["fY"]=0,[]),_0x1b9977=(_0x5af407["fX"]=0,_0x5af407["fY"]=0,[]),_0x57b022=(_0x1b9977["fX"]=0,_0x1b9977["fY"]=0,[]),_0x852f05=(this[_0x6e18e3(332)]-this[_0x6e18e3(915)])/(this["fRY2"]-this[_0x6e18e3(737)]),_0x28d27e=(this[_0x6e18e3(915)]+this["fRX2"])/2*1,_0x27ec61=(this["fRY1"]+this[_0x6e18e3(402)])/2*_0x852f05,_0x1ee315=(this[_0x6e18e3(332)]-this["fRX1"])/2*1,_0x366080=(_0x1c2846["fX"]=_0x221494-.5,_0x1c2846["fY"]=_0x366080-.5,_0x221494=this[_0x6e18e3(675)][_0x443514][_0x6e18e3(1580)],_0x5af407["fX"]=_0x1c2846["fX"],_0x5af407["fY"]=_0x1c2846["fY"]*this["pRenderParam"][_0x443514][_0x6e18e3(1025)]+_0x221494*this["pRenderParam"][_0x443514]["fSinV"],_0x221494*this["pRenderParam"][_0x443514][_0x6e18e3(1025)]-_0x1c2846["fY"]*this[_0x6e18e3(675)][_0x443514][_0x6e18e3(810)]),_0x221494=Math[_0x6e18e3(1540)](_0x5af407["fX"]*_0x5af407["fX"]+_0x5af407["fY"]*_0x5af407["fY"]),_0x1c2846=Math[_0x6e18e3(1540)](_0x5af407["fX"]*_0x5af407["fX"]+_0x5af407["fY"]*_0x5af407["fY"]+_0x366080*_0x366080),_0x366080=Math["asin"](_0x221494/_0x1c2846)/1.5707963*.5,_0x1c2846=(_0x5af407["fX"]=_0x366080*_0x5af407["fX"]/_0x221494,_0x5af407["fY"]=_0x366080*_0x5af407["fY"]/_0x221494,_0x1b9977["fX"]=_0x5af407["fX"]*this[_0x6e18e3(675)][_0x443514]["fCosH"]-_0x5af407["fY"]*this[_0x6e18e3(675)][_0x443514][_0x6e18e3(1181)],_0x1b9977["fY"]=_0x5af407["fX"]*this[_0x6e18e3(675)][_0x443514][_0x6e18e3(1181)]+_0x5af407["fY"]*this["pRenderParam"][_0x443514][_0x6e18e3(780)],_0x57b022["fX"]=2*_0x1b9977["fX"]*_0x1ee315+_0x28d27e,_0x57b022["fY"]=2*_0x1b9977["fY"]*_0x1ee315+_0x27ec61,this[_0x6e18e3(1042)][_0x443514]),_0x366080=(this[_0x6e18e3(884)][_0x443514][_0x1c2846]["fX"]=_0x1b9977["fX"]+.5,this["pBasePTZPoints"][_0x443514][_0x1c2846]["fY"]=_0x1b9977["fY"]+.5,this[_0x6e18e3(1042)][_0x443514]=this["nBasePTZPointNum"][_0x443514]+1,this[_0x6e18e3(915)]<=0?0:+this[_0x6e18e3(915)]),_0x221494=this[_0x6e18e3(737)]<=0?0:this[_0x6e18e3(737)]*_0x852f05,_0x5af407=1<=this[_0x6e18e3(332)]?1-_0x366080:+this[_0x6e18e3(332)]-_0x366080,_0x28d27e=1<=this[_0x6e18e3(402)]?_0x852f05-_0x221494:this[_0x6e18e3(402)]*_0x852f05-_0x221494;return _0x57b022["fX"]=(_0x57b022["fX"]-_0x366080)/_0x5af407,_0x57b022["fY"]=(_0x57b022["fY"]-_0x221494)/_0x28d27e,_0x57b022["fX"]<=1&&_0x57b022["fY"]<=1&&0<=_0x57b022["fX"]&&0<=_0x57b022["fY"]&&(_0x1ee315=this[_0x6e18e3(652)][_0x443514],this[_0x6e18e3(1183)][_0x443514][_0x1ee315]["fX"]=_0x57b022["fX"],this["pOriPTZPoints"][_0x443514][_0x1ee315]["fY"]=_0x57b022["fY"],this[_0x6e18e3(652)][_0x443514]=this[_0x6e18e3(652)][_0x443514]+1),_0x4780dc[_0x6e18e3(593)]}},{key:_0x7c8a86(1090),value:function(_0x4351db,_0x5aaf0b,_0x568cf5){var _0xd894c=_0x7c8a86,_0x2aaf72=[],_0x5ddca1=(_0x2aaf72["fX"]=0,_0x2aaf72["fY"]=0,[]),_0x14f68a=(_0x5ddca1["fX"]=0,_0x5ddca1["fY"]=0,[]),_0x2dbda1=(_0x14f68a["fX"]=0,_0x14f68a["fY"]=0,[]),_0x4dbe4b=(this[_0xd894c(332)]-this["fRX1"])/(this[_0xd894c(402)]-this[_0xd894c(737)]),_0x51f62f=(this["fRX1"]+this[_0xd894c(332)])/2*1,_0x415be8=(this[_0xd894c(737)]+this["fRY2"])/2*_0x4dbe4b,_0x29b052=(this[_0xd894c(332)]-this["fRX1"])/2*1,_0x5aaf0b=(_0x2aaf72["fX"]=_0x5aaf0b-.5,_0x2aaf72["fY"]=_0x4351db-.5,_0x5aaf0b=this[_0xd894c(675)][_0x568cf5]["fZoom"],_0x5ddca1["fX"]=_0x2aaf72["fX"],_0x5ddca1["fY"]=_0x2aaf72["fY"]*this[_0xd894c(675)][_0x568cf5][_0xd894c(1025)]+_0x5aaf0b*this[_0xd894c(675)][_0x568cf5][_0xd894c(810)],_0x4351db=_0x5aaf0b*this[_0xd894c(675)][_0x568cf5][_0xd894c(1025)]-_0x2aaf72["fY"]*this[_0xd894c(675)][_0x568cf5][_0xd894c(810)],_0x14f68a["fX"]=_0x5ddca1["fX"]*this[_0xd894c(675)][_0x568cf5][_0xd894c(780)]+_0x4351db*this[_0xd894c(675)][_0x568cf5][_0xd894c(1181)],_0x14f68a["fY"]=_0x5ddca1["fY"],_0x4351db*this[_0xd894c(675)][_0x568cf5][_0xd894c(780)]-_0x5ddca1["fX"]*this[_0xd894c(675)][_0x568cf5][_0xd894c(1181)]),_0x2aaf72=Math["sqrt"](_0x14f68a["fX"]*_0x14f68a["fX"]+_0x14f68a["fY"]*_0x14f68a["fY"]),_0x4351db=Math["sqrt"](_0x14f68a["fX"]*_0x14f68a["fX"]+_0x14f68a["fY"]*_0x14f68a["fY"]+_0x5aaf0b*_0x5aaf0b),_0x5ddca1=Math["asin"](_0x2aaf72/_0x4351db)/1.5707963*.5,_0x5aaf0b=(_0x2dbda1["fX"]=_0x5ddca1*_0x14f68a["fX"]/_0x2aaf72*_0x29b052*2+_0x51f62f,_0x2dbda1["fY"]=_0x5ddca1*_0x14f68a["fY"]/_0x2aaf72*_0x29b052*2+_0x415be8,this["nBasePTZPointNum"][_0x568cf5]),_0x4351db=(this[_0xd894c(884)][_0x568cf5][_0x5aaf0b]["fX"]=_0x5ddca1*_0x14f68a["fX"]/_0x2aaf72+.5,this["pBasePTZPoints"][_0x568cf5][_0x5aaf0b]["fY"]=_0x5ddca1*_0x14f68a["fY"]/_0x2aaf72+.5,this[_0xd894c(1042)][_0x568cf5]=this["nBasePTZPointNum"][_0x568cf5]+1,this[_0xd894c(915)]<=0?0:+this[_0xd894c(915)]),_0x51f62f=this["fRY1"]<=0?0:this[_0xd894c(737)]*_0x4dbe4b,_0x29b052=1<=this[_0xd894c(332)]?1-_0x4351db:+this["fRX2"]-_0x4351db,_0x415be8=1<=this[_0xd894c(402)]?_0x4dbe4b-_0x51f62f:this[_0xd894c(402)]*_0x4dbe4b-_0x51f62f;return _0x2dbda1["fX"]=(_0x2dbda1["fX"]-_0x4351db)/_0x29b052,_0x2dbda1["fY"]=(_0x2dbda1["fY"]-_0x51f62f)/_0x415be8,_0x2dbda1["fX"]<=1&&_0x2dbda1["fY"]<=1&&0<=_0x2dbda1["fX"]&&0<=_0x2dbda1["fY"]&&(_0x5aaf0b=this[_0xd894c(652)][_0x568cf5],this[_0xd894c(1183)][_0x568cf5][_0x5aaf0b]["fX"]=_0x2dbda1["fX"],this[_0xd894c(1183)][_0x568cf5][_0x5aaf0b]["fY"]=_0x2dbda1["fY"],this[_0xd894c(652)][_0x568cf5]=this[_0xd894c(652)][_0x568cf5]+1),_0x4780dc[_0xd894c(593)]}},{key:_0x7c8a86(1091),value:function(_0x5ed038){var _0xef23cc=_0x7c8a86;if(null==this["pRenderParam"][_0x5ed038]||null==this["pRenderParam"][this[_0xef23cc(1398)]])return _0x4780dc["SR_ERR_CALL_ORDER"];if(null==this[_0xef23cc(884)][_0x5ed038])return _0x4780dc[_0xef23cc(1538)];var _0x14365b,_0x5d4d2a=this[_0xef23cc(1042)][_0x5ed038],_0x232302=(this[_0xef23cc(332)]-this[_0xef23cc(915)])/(this[_0xef23cc(402)]-this[_0xef23cc(737)]),_0x278d15=(this["fRX2"]-this[_0xef23cc(915)])/2*1,_0x3d1feb=0,_0x500ade=((1<this["fRX2"]||1<this[_0xef23cc(402)]||this[_0xef23cc(737)]<0||this[_0xef23cc(915)]<0)&&(this[_0xef23cc(915)]<0&&_0x3d1feb<(_0x14365b=-this[_0xef23cc(915)])&&(_0x3d1feb=_0x14365b),1<this[_0xef23cc(332)]&&_0x3d1feb<(_0x14365b=this["fRX2"]-1)&&(_0x3d1feb=_0x14365b),this["fRY1"]<0&&_0x3d1feb<(_0x14365b=-this[_0xef23cc(737)]*_0x232302)&&(_0x3d1feb=_0x14365b),1<this[_0xef23cc(402)]&&_0x3d1feb<(_0x14365b=(this[_0xef23cc(402)]-1)*_0x232302)&&(_0x3d1feb=_0x14365b)),_0x3d1feb/_0x278d15),_0x58b9a2=[],_0x23d27f=(_0x58b9a2["fX"]=0,_0x58b9a2["fY"]=0,[]);_0x23d27f["fX"]=0;for(var _0x25e573,_0x3ca420,_0x3d127b,_0x21c987,_0x1adbdf=_0x23d27f["fY"]=0;_0x1adbdf<_0x5d4d2a;++_0x1adbdf)_0x23d27f["fX"]=this[_0xef23cc(884)][_0x5ed038][_0x1adbdf]["fX"],_0x23d27f["fY"]=this[_0xef23cc(884)][_0x5ed038][_0x1adbdf]["fY"],Math[_0xef23cc(1502)](_0x23d27f["fX"]-.5)<_0x453d9f&&Math[_0xef23cc(1502)](_0x23d27f["fY"]-.5)<_0x453d9f||((_0x3d127b=[])["fX"]=0,_0x3d127b["fY"]=0,(_0x25e573=[])["fX"]=0,_0x25e573["fY"]=0,_0x3d127b["fX"]=_0x23d27f["fX"]-.5,_0x3d127b["fY"]=_0x23d27f["fY"]-.5,_0x25e573["fX"]=-.5*Math["sin"](this[_0xef23cc(675)][this[_0xef23cc(1398)]]["fAngle"]),_0x25e573["fY"]=.5*Math[_0xef23cc(1268)](this[_0xef23cc(675)][this["nWndPort"]]["fAngle"]),_0x3ca420=Math[_0xef23cc(1540)](_0x3d127b["fX"]*_0x3d127b["fX"]+_0x3d127b["fY"]*_0x3d127b["fY"]),_0x21c987=Math[_0xef23cc(1540)](_0x25e573["fX"]*_0x25e573["fX"]+_0x25e573["fY"]*_0x25e573["fY"]),_0x21c987=Math[_0xef23cc(1200)]((_0x3d127b["fX"]*_0x25e573["fX"]+_0x3d127b["fY"]*_0x25e573["fY"])/(_0x3ca420*_0x21c987)),0<_0x3d127b["fX"]*_0x25e573["fY"]-_0x3d127b["fY"]*_0x25e573["fX"]&&(_0x21c987=6.2831852-_0x21c987),_0x58b9a2["fX"]=_0x21c987/6.2831853,_0x58b9a2["fY"]=(2*(.5-_0x3ca420)-_0x500ade)/(.8-_0x500ade),0<=_0x58b9a2["fY"]&&0<=_0x58b9a2["fX"]&&_0x58b9a2["fY"]<=1&&_0x58b9a2["fX"]<=1&&(_0x3d127b=this["nPanoPTZPointNum"][_0x5ed038],this[_0xef23cc(1325)][_0x5ed038][_0x3d127b]["fX"]=_0x58b9a2["fX"],this["pPanoPTZPoints"][_0x5ed038][_0x3d127b]["fY"]=_0x58b9a2["fY"],this[_0xef23cc(1405)][_0x5ed038]=this[_0xef23cc(1405)][_0x5ed038]+1));return _0x4780dc["SR_OK"]}},{key:"GetPanoPTZFloor",value:function(_0x5627f1){var _0x5568ef=_0x7c8a86;if(null==this[_0x5568ef(675)][_0x5627f1]||null==this["pRenderParam"][this["nWndPort"]])return _0x4780dc[_0x5568ef(1538)];if(null==this[_0x5568ef(884)][_0x5627f1])return _0x4780dc[_0x5568ef(1538)];var _0x5a2ba9,_0x4ddce1=this[_0x5568ef(1042)][_0x5627f1],_0x2f1f11=(this[_0x5568ef(332)]-this[_0x5568ef(915)])/(this[_0x5568ef(402)]-this[_0x5568ef(737)]),_0xdbe3c0=(this["fRX2"]-this["fRX1"])/2*1,_0x21fcc1=0,_0x422e52=((1<this[_0x5568ef(332)]||1<this[_0x5568ef(402)]||this[_0x5568ef(737)]<0||this[_0x5568ef(915)]<0)&&(this[_0x5568ef(915)]<0&&_0x21fcc1<(_0x5a2ba9=-this["fRX1"])&&(_0x21fcc1=_0x5a2ba9),1<this["fRX2"]&&_0x21fcc1<(_0x5a2ba9=this["fRX2"]-1)&&(_0x21fcc1=_0x5a2ba9),this[_0x5568ef(737)]<0&&_0x21fcc1<(_0x5a2ba9=-this["fRY1"]*_0x2f1f11)&&(_0x21fcc1=_0x5a2ba9),1<this["fRY2"]&&_0x21fcc1<(_0x5a2ba9=(this[_0x5568ef(402)]-1)*_0x2f1f11)&&(_0x21fcc1=_0x5a2ba9)),_0x21fcc1/_0xdbe3c0),_0x475a1b=[],_0x33306b=(_0x475a1b["fX"]=0,_0x475a1b["fY"]=0,[]);_0x33306b["fX"]=0;for(var _0x270c57,_0x4ddec8,_0x1f7bc2,_0x30be07,_0x1930c5=_0x33306b["fY"]=0;_0x1930c5<_0x4ddce1;++_0x1930c5)_0x33306b["fX"]=this["pBasePTZPoints"][_0x5627f1][_0x1930c5]["fX"],_0x33306b["fY"]=this[_0x5568ef(884)][_0x5627f1][_0x1930c5]["fY"],Math[_0x5568ef(1502)](_0x33306b["fX"]-.5)<_0x453d9f&&Math["abs"](_0x33306b["fY"]-.5)<_0x453d9f||((_0x1f7bc2=[])["fX"]=0,_0x1f7bc2["fY"]=0,(_0x270c57=[])["fX"]=0,_0x270c57["fY"]=0,_0x1f7bc2["fX"]=_0x33306b["fX"]-.5,_0x1f7bc2["fY"]=_0x33306b["fY"]-.5,_0x270c57["fX"]=-.5*Math[_0x5568ef(514)](this[_0x5568ef(675)][this[_0x5568ef(1398)]][_0x5568ef(1485)]),_0x270c57["fY"]=.5*Math[_0x5568ef(1268)](this[_0x5568ef(675)][this[_0x5568ef(1398)]][_0x5568ef(1485)]),_0x4ddec8=Math["sqrt"](_0x1f7bc2["fX"]*_0x1f7bc2["fX"]+_0x1f7bc2["fY"]*_0x1f7bc2["fY"]),_0x30be07=Math[_0x5568ef(1540)](_0x270c57["fX"]*_0x270c57["fX"]+_0x270c57["fY"]*_0x270c57["fY"]),_0x30be07=Math["acos"]((_0x1f7bc2["fX"]*_0x270c57["fX"]+_0x1f7bc2["fY"]*_0x270c57["fY"])/(_0x4ddec8*_0x30be07)),0<_0x1f7bc2["fX"]*_0x270c57["fY"]-_0x1f7bc2["fY"]*_0x270c57["fX"]&&(_0x30be07=6.2831852-_0x30be07),_0x475a1b["fX"]=1-_0x30be07/6.2831853,_0x475a1b["fY"]=1-(2*(.5-_0x4ddec8)-_0x422e52)/(.8-_0x422e52),0<=_0x475a1b["fY"]&&0<=_0x475a1b["fX"]&&_0x475a1b["fY"]<=1&&_0x475a1b["fX"]<=1&&(_0x1f7bc2=this[_0x5568ef(1405)][_0x5627f1],this[_0x5568ef(1325)][_0x5627f1][_0x1f7bc2]["fX"]=_0x475a1b["fX"],this[_0x5568ef(1325)][_0x5627f1][_0x1f7bc2]["fY"]=_0x475a1b["fY"],this[_0x5568ef(1405)][_0x5627f1]=this[_0x5568ef(1405)][_0x5627f1]+1));return _0x4780dc[_0x5568ef(593)]}},{key:_0x7c8a86(1024),value:function(_0x1bc327){var _0x12d928=_0x7c8a86;if(null==this[_0x12d928(675)][_0x1bc327]||null==this[_0x12d928(675)][this["nWndPort"]])return _0x4780dc[_0x12d928(1538)];if(null==this[_0x12d928(884)][_0x1bc327])return _0x4780dc[_0x12d928(1538)];var _0x3abac3,_0x3de0d2=this[_0x12d928(1042)][_0x1bc327],_0x20147e=(this[_0x12d928(332)]-this[_0x12d928(915)])/(this[_0x12d928(402)]-this["fRY1"]),_0x485809=(this[_0x12d928(332)]-this["fRX1"])/2*1,_0x20fe7a=0,_0x5820c9=1,_0x59832d=.1,_0x21cc79=.9,_0x3d426=(this[_0x12d928(915)]<0&&(_0x3abac3=-this[_0x12d928(915)],_0x20fe7a=_0x3abac3/=2*_0x485809),1<this[_0x12d928(332)]&&(_0x3abac3=this["fRX2"]-1,_0x5820c9=1-(_0x3abac3/=2*_0x485809)),this[_0x12d928(737)]<0&&(_0x3abac3=-this["fRY1"]*_0x20147e,_0x59832d=.1<(_0x3abac3/=2*_0x485809)?_0x3abac3:.1),1<this["fRY2"]&&(_0x3abac3=(this[_0x12d928(402)]-1)*_0x20147e,_0x21cc79=1-.9<(_0x3abac3/=2*_0x485809)?1-_0x3abac3:.9),[]),_0x43c075=(_0x3d426["fX"]=0,_0x3d426["fY"]=0,[]);_0x43c075["fX"]=0;for(var _0x106854=_0x43c075["fY"]=0;_0x106854<_0x3de0d2;++_0x106854){_0x43c075["fX"]=this[_0x12d928(884)][_0x1bc327][_0x106854]["fX"],_0x43c075["fY"]=this[_0x12d928(884)][_0x1bc327][_0x106854]["fY"];var _0x46ba1b=2*_0x43c075["fX"]*_0x485809,_0x5ba3c7=2*_0x43c075["fY"]*_0x485809,_0x5e2a62=Math["sqrt"](_0x485809*_0x485809-(_0x5ba3c7-_0x485809)*(_0x5ba3c7-_0x485809));Math[_0x12d928(1502)](_0x5e2a62)<_0x453d9f||(_0x43c075["fX"]=_0x485809*(_0x46ba1b-_0x485809)/_0x5e2a62+_0x485809,_0x43c075["fY"]=_0x5ba3c7,_0x3d426["fX"]=(_0x43c075["fX"]-2*_0x20fe7a*_0x485809)/(2*(_0x5820c9-_0x20fe7a)*_0x485809),_0x3d426["fY"]=(_0x43c075["fY"]-2*_0x59832d*_0x485809)/(2*(_0x21cc79-_0x59832d)*_0x485809),0<=_0x3d426["fY"]&&0<=_0x3d426["fX"]&&_0x3d426["fY"]<=1&&_0x3d426["fX"]<=1&&(_0x46ba1b=this[_0x12d928(1405)][_0x1bc327],this[_0x12d928(1325)][_0x1bc327][_0x46ba1b]["fX"]=_0x3d426["fX"],this[_0x12d928(1325)][_0x1bc327][_0x46ba1b]["fY"]=_0x3d426["fY"],this[_0x12d928(1405)][_0x1bc327]=this[_0x12d928(1405)][_0x1bc327]+1))}return _0x4780dc["SR_OK"]}},{key:_0x7c8a86(1436),value:function(_0x34d728,_0x32a141,_0x11fc80){var _0xa1115=_0x7c8a86;if(null==_0x34d728||null==this[_0xa1115(675)][this["nWndPort"]])return _0x4780dc[_0xa1115(1538)];var _0x326729=(this[_0xa1115(332)]-this[_0xa1115(915)])/(this[_0xa1115(402)]-this["fRY1"]),_0x22b147=(this[_0xa1115(332)]-this[_0xa1115(915)])/2*1,_0x151b2=0,_0x326729=((1<this["fRX2"]||1<this[_0xa1115(402)]||this["fRX1"]<0||this["fRY1"]<0)&&(this[_0xa1115(915)]<0&&_0x151b2<(_0x1c3631=-this[_0xa1115(915)])&&(_0x151b2=_0x1c3631),1<this[_0xa1115(332)]&&_0x151b2<(_0x1c3631=this["fRX2"]-1)&&(_0x151b2=_0x1c3631),this[_0xa1115(737)]<0&&_0x151b2<(_0x1c3631=-this[_0xa1115(737)]*_0x326729)&&(_0x151b2=_0x1c3631),1<this["fRY2"]&&_0x151b2<(_0x1c3631=(this["fRY2"]-1)*_0x326729)&&(_0x151b2=_0x1c3631)),_0x151b2/_0x22b147),_0x1c3631=[];if(Math[_0xa1115(1502)](_0x32a141-.5)<_0x453d9f&&Math[_0xa1115(1502)](_0x11fc80-.5)<_0x453d9f)return _0x4780dc["SR_ERR_NOT_SUPPORT"];return _0x151b2=[],_0x151b2["fX"]=0,_0x151b2["fY"]=0,_0x22b147=[],_0x22b147["fX"]=0,_0x151b2["fX"]=_0x32a141-.5,_0x151b2["fY"]=_0x11fc80-.5,_0x22b147["fX"]=-.5*Math[_0xa1115(514)](this[_0xa1115(675)][this[_0xa1115(1398)]][_0xa1115(1485)]),_0x22b147["fY"]=.5*Math[_0xa1115(1268)](this[_0xa1115(675)][this[_0xa1115(1398)]][_0xa1115(1485)]),_0x32a141=Math[_0xa1115(1540)](_0x151b2["fX"]*_0x151b2["fX"]+_0x151b2["fY"]*_0x151b2["fY"]),_0x11fc80=Math[_0xa1115(1540)](_0x22b147["fX"]*_0x22b147["fX"]+_0x22b147["fY"]*_0x22b147["fY"]),_0x11fc80=Math["acos"]((_0x151b2["fX"]*_0x22b147["fX"]+_0x151b2["fY"]*_0x22b147["fY"])/(_0x32a141*_0x11fc80)),0<_0x151b2["fX"]*_0x22b147["fY"]-_0x151b2["fY"]*_0x22b147["fX"]&&(_0x11fc80=6.2831852-_0x11fc80),_0x1c3631["fX"]=_0x11fc80/6.2861853,_0x1c3631["fY"]=(2*(.5-_0x32a141)-_0x326729)/(.8-_0x326729),0<=_0x1c3631["fY"]&&0<=_0x1c3631["fX"]&&_0x1c3631["fY"]<=1&&_0x1c3631["fX"]<=1?(_0x34d728["fX"]=_0x1c3631["fX"],_0x34d728["fY"]=_0x1c3631["fY"],_0x4780dc[_0xa1115(593)]):_0x4780dc[_0xa1115(650)]}},{key:_0x7c8a86(690),value:function(_0x1bac8a,_0x56461b,_0x268c0b){var _0x15155e=_0x7c8a86;if(null==this[_0x15155e(675)][this["nWndPort"]])return _0x4780dc[_0x15155e(1538)];if(null==_0x1bac8a)return _0x4780dc[_0x15155e(650)];var _0x381a55=(this[_0x15155e(332)]-this[_0x15155e(915)])/(this[_0x15155e(402)]-this[_0x15155e(737)]),_0x2ba56c=(this[_0x15155e(332)]-this["fRX1"])/2*1,_0x2330b2=0,_0xc5f260=1,_0x581189=0,_0xe65926=1,_0x150366=0,_0x381a55=((1<this[_0x15155e(332)]||1<this[_0x15155e(402)]||this[_0x15155e(915)]<0||this[_0x15155e(737)]<0)&&(this[_0x15155e(915)]<0&&(_0x150366<(_0x314e99=-this[_0x15155e(915)])&&(_0x150366=_0x314e99),_0x2330b2=_0x314e99/=2*_0x2ba56c),1<this[_0x15155e(332)]&&(_0x150366<(_0x314e99=this[_0x15155e(332)]-1)&&(_0x150366=_0x314e99),_0xc5f260=1-(_0x314e99/=2*_0x2ba56c)),this[_0x15155e(737)]<0&&(_0x150366<(_0x314e99=-this[_0x15155e(737)]*_0x381a55)&&(_0x150366=_0x314e99),_0x581189=_0x314e99/=2*_0x2ba56c),1<this[_0x15155e(402)]&&(_0x150366<(_0x314e99=(this[_0x15155e(402)]-1)*_0x381a55)&&(_0x150366=_0x314e99),_0xe65926=1-(_0x314e99/=2*_0x2ba56c))),_0x150366/_0x2ba56c),_0x314e99=[],_0x150366=[];return _0x314e99["fX"]=1-_0x56461b,_0x314e99["fY"]=(.8-_0x381a55)*(1-_0x268c0b)+_0x381a55,_0x2ba56c=6.2831853*_0x314e99["fX"]+this[_0x15155e(675)][this["nWndPort"]][_0x15155e(1485)],_0x56461b=.5*(1-_0x314e99["fY"]),_0x150366["fX"]=.5-_0x56461b*Math["sin"](_0x2ba56c),_0x150366["fY"]=.5+_0x56461b*Math[_0x15155e(1268)](_0x2ba56c),_0x150366["fX"]=(_0x150366["fX"]-_0x2330b2)/(_0xc5f260-_0x2330b2),_0x150366["fY"]=(_0x150366["fY"]-_0x581189)/(_0xe65926-_0x581189),_0x1bac8a["fX"]=_0x150366["fX"],_0x1bac8a["fY"]=_0x150366["fY"],_0x4780dc[_0x15155e(593)]}},{key:_0x7c8a86(630),value:function(_0x2b1af6,_0x281422,_0x35f172){var _0x3aa583=_0x7c8a86;if(null==this["pRenderParam"][this["nWndPort"]])return _0x4780dc[_0x3aa583(1538)];if(null==_0x2b1af6)return _0x4780dc[_0x3aa583(650)];var _0x267e7c=(this["fRX2"]-this[_0x3aa583(915)])/(this[_0x3aa583(402)]-this[_0x3aa583(737)]),_0x40a9d8=(this["fRX2"]-this[_0x3aa583(915)])/2*1,_0x290781=0,_0x671251=1,_0x50c7a2=.1,_0x1321dc=.9,_0x267e7c=(this[_0x3aa583(915)]<0&&(_0x10418e=-this[_0x3aa583(915)],_0x290781=_0x10418e/=2*_0x40a9d8),1<this["fRX2"]&&(_0x10418e=this[_0x3aa583(332)]-1,_0x671251=1-(_0x10418e/=2*_0x40a9d8)),this[_0x3aa583(737)]<0&&(_0x10418e=-this[_0x3aa583(737)]*_0x267e7c,_0x50c7a2=.1<(_0x10418e/=2*_0x40a9d8)?_0x10418e:.1),1<this[_0x3aa583(402)]&&(_0x10418e=(this[_0x3aa583(402)]-1)*_0x267e7c,_0x1321dc=1-.9<(_0x10418e/=2*_0x40a9d8)?1-_0x10418e:.9),[]),_0x10418e=2*_0x281422*_0x40a9d8,_0x87b7bb=2*_0x35f172*_0x40a9d8,_0xc698da=Math[_0x3aa583(1540)](_0x40a9d8*_0x40a9d8-(_0x87b7bb-_0x40a9d8)*(_0x87b7bb-_0x40a9d8));return Math[_0x3aa583(1502)](_0xc698da)<_0x453d9f?_0x4780dc[_0x3aa583(650)]:(_0x35f172=_0x87b7bb,_0x267e7c["fX"]=((_0x281422=_0x40a9d8*(_0x10418e-_0x40a9d8)/_0xc698da+_0x40a9d8)-2*_0x290781*_0x40a9d8)/(2*(_0x671251-_0x290781)*_0x40a9d8),_0x267e7c["fY"]=(_0x35f172-2*_0x50c7a2*_0x40a9d8)/(2*(_0x1321dc-_0x50c7a2)*_0x40a9d8),0<=_0x267e7c["fY"]&&0<=_0x267e7c["fX"]&&_0x267e7c["fY"]<=1&&_0x267e7c["fX"]<=1?(_0x2b1af6["fX"]=_0x267e7c["fX"],_0x2b1af6["fY"]=_0x267e7c["fY"],_0x4780dc[_0x3aa583(593)]):_0x4780dc[_0x3aa583(650)])}},{key:_0x7c8a86(1361),value:function(_0x958e18,_0x533191,_0x3ffe58){var _0x1b81d9=_0x7c8a86;if(null==this[_0x1b81d9(675)][_0x958e18])return _0x4780dc[_0x1b81d9(1538)];var _0x26072f=[],_0x5d46c0=(_0x26072f["fHAngleSin"]=0,_0x26072f[_0x1b81d9(988)]=0,_0x26072f[_0x1b81d9(451)]=0,_0x26072f[_0x1b81d9(927)]=0,_0x4780dc["SR_OK"]);if(_0x4e9094["SR_DE_FISH_PTZ_FLOOR"]==this[_0x1b81d9(675)][_0x958e18][_0x1b81d9(310)]||_0x4e9094[_0x1b81d9(1282)]==this[_0x1b81d9(675)][_0x958e18]["nDisplayEffect"]){if((_0x5d46c0=this[_0x1b81d9(331)](_0x533191,_0x3ffe58,_0x26072f,this[_0x1b81d9(675)][_0x958e18][_0x1b81d9(310)]))!=_0x4780dc["SR_OK"])return _0x5d46c0}else{if(_0x4e9094[_0x1b81d9(994)]!=this[_0x1b81d9(675)][_0x958e18]["nDisplayEffect"])return _0x4780dc[_0x1b81d9(1112)];if((_0x5d46c0=this["ComputeAngleHorizontal"](_0x533191,_0x3ffe58,_0x26072f))!=_0x4780dc[_0x1b81d9(593)])return _0x5d46c0}return 0==this[_0x1b81d9(725)](this[_0x1b81d9(915)],this[_0x1b81d9(332)],this[_0x1b81d9(737)],this[_0x1b81d9(402)],_0x26072f,this[_0x1b81d9(675)][_0x958e18][_0x1b81d9(1580)],this[_0x1b81d9(675)][_0x958e18]["nDisplayEffect"])?_0x4780dc[_0x1b81d9(650)]:(this["pRenderParam"][_0x958e18][_0x1b81d9(780)]=_0x26072f[_0x1b81d9(988)],this["pRenderParam"][_0x958e18][_0x1b81d9(1181)]=_0x26072f[_0x1b81d9(1211)],this[_0x1b81d9(675)][_0x958e18][_0x1b81d9(1025)]=_0x26072f[_0x1b81d9(927)],this[_0x1b81d9(675)][_0x958e18][_0x1b81d9(810)]=_0x26072f["fVAngleSin"],_0x4780dc[_0x1b81d9(593)])}},{key:_0x7c8a86(817),value:function(_0x2736cf){var _0x2a459b=_0x7c8a86,_0x40edf0=0;switch(_0x40edf0){case 0:return _0x40edf0=this[_0x2a459b(841)](_0x2736cf),4==this[_0x2a459b(1252)]&&(this[_0x2a459b(1252)]=0),_0x4780dc["SR_OK"];case 3:return(_0x40edf0=this[_0x2a459b(841)](_0x2736cf))==this[_0x2a459b(1252)]||4==this[_0x2a459b(1252)]?_0x4780dc[_0x2a459b(593)]:_0x4780dc[_0x2a459b(1112)];case 2:case 1:return(_0x40edf0=this["GetPlaceType"](_0x2736cf))==this[_0x2a459b(1252)]||4==_0x40edf0?_0x4780dc[_0x2a459b(593)]:_0x4780dc[_0x2a459b(1112)];default:return _0x4780dc["SR_ERR_NOT_SUPPORT"]}return _0x4780dc["SR_ERR_NOT_SUPPORT"]}},{key:_0x7c8a86(841),value:function(_0x17ddb4){var _0x3cb0a0=_0x7c8a86;switch(_0x17ddb4){case _0x4e9094[_0x3cb0a0(1282)]:case _0x4e9094["SR_DE_FISH_PANORAMA_CEILING_360"]:case _0x4e9094[_0x3cb0a0(1212)]:case _0x4e9094["SR_DE_FISH_CYLINDER_CEILING"]:case _0x4e9094[_0x3cb0a0(414)]:return 3;case _0x4e9094[_0x3cb0a0(474)]:case _0x4e9094[_0x3cb0a0(472)]:case _0x4e9094[_0x3cb0a0(563)]:case _0x4e9094[_0x3cb0a0(405)]:case _0x4e9094[_0x3cb0a0(1139)]:return 2;case _0x4e9094["SR_DE_FISH_PTZ_WALL"]:case _0x4e9094[_0x3cb0a0(1018)]:case _0x4e9094["SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL"]:case _0x4e9094["SR_DE_FISH_ARCSPHERE_VERTICAL_WALL"]:return 1;case _0x4e9094["SR_DE_FISH_SEMISPHERE"]:case _0x4e9094[_0x3cb0a0(677)]:case _0x4e9094[_0x3cb0a0(1262)]:case _0x4e9094[_0x3cb0a0(1046)]:case _0x4e9094[_0x3cb0a0(1262)]:return 4;default:return 0}return 0}},{key:_0x7c8a86(1057),value:function(_0x2a81d1,_0x33d77a){var _0xd84c1d=_0x7c8a86;if(_0x2a81d1<0||32<=_0x2a81d1)return _0x4780dc[_0xd84c1d(650)];if(null==_0x33d77a)return _0x4780dc[_0xd84c1d(650)];if(null==this[_0xd84c1d(675)][_0x2a81d1])return _0x4780dc[_0xd84c1d(1538)];var _0x45236a=_0x4780dc[_0xd84c1d(593)];switch(_0x33d77a[_0xd84c1d(572)]){case _0x39b681:if((_0x45236a=this[_0xd84c1d(922)](_0x33d77a[_0xd84c1d(473)],_0x33d77a[_0xd84c1d(919)],_0x33d77a[_0xd84c1d(1171)],_0x33d77a[_0xd84c1d(825)]))!=_0x4780dc[_0xd84c1d(593)])return _0x45236a;this[_0xd84c1d(675)][_0x2a81d1][_0xd84c1d(818)]=_0x33d77a[_0xd84c1d(818)],this[_0xd84c1d(368)]=_0x33d77a[_0xd84c1d(368)];break;case _0x305d9a:if(_0x4e9094[_0xd84c1d(1379)]!=this[_0xd84c1d(675)][_0x2a81d1][_0xd84c1d(310)]&&_0x4e9094[_0xd84c1d(1212)]!=this["pRenderParam"][_0x2a81d1][_0xd84c1d(310)]&&_0x4e9094[_0xd84c1d(472)]!=this[_0xd84c1d(675)][_0x2a81d1][_0xd84c1d(310)]&&_0x4e9094[_0xd84c1d(1366)]!=this["pRenderParam"][_0x2a81d1][_0xd84c1d(310)])return _0x4780dc["SR_ERR_NOT_SUPPORT"];if((_0x45236a=this[_0xd84c1d(955)](_0x2a81d1,_0x33d77a[_0xd84c1d(1485)]))!=_0x4780dc[_0xd84c1d(593)])return _0x45236a;this[_0xd84c1d(812)][_0x2a81d1][_0xd84c1d(1485)]=_0x33d77a[_0xd84c1d(1485)];break;case _0x55fbf0:if(_0x4e9094[_0xd84c1d(994)]!=this[_0xd84c1d(675)][_0x2a81d1][_0xd84c1d(310)]&&_0x4e9094["SR_DE_FISH_PTZ_CEILING"]!=this[_0xd84c1d(675)][_0x2a81d1][_0xd84c1d(310)]&&_0x4e9094[_0xd84c1d(474)]!=this[_0xd84c1d(675)][_0x2a81d1][_0xd84c1d(310)])return _0x4780dc[_0xd84c1d(1112)];if((_0x45236a=this[_0xd84c1d(891)](_0x2a81d1,_0x33d77a[_0xd84c1d(1580)]))!=_0x4780dc[_0xd84c1d(593)])return _0x45236a;this[_0xd84c1d(812)][_0x2a81d1][_0xd84c1d(1580)]=_0x33d77a["fZoom"];break;case _0xbfab18:if(_0x4e9094[_0xd84c1d(994)]!=this[_0xd84c1d(675)][_0x2a81d1]["nDisplayEffect"]&&_0x4e9094["SR_DE_FISH_PTZ_CEILING"]!=this[_0xd84c1d(675)][_0x2a81d1][_0xd84c1d(310)]&&_0x4e9094["SR_DE_FISH_PTZ_FLOOR"]!=this[_0xd84c1d(675)][_0x2a81d1][_0xd84c1d(310)])return _0x4780dc[_0xd84c1d(1112)];if((_0x45236a=this["UpdatePTZPosition"](_0x2a81d1,_0x33d77a[_0xd84c1d(875)],_0x33d77a[_0xd84c1d(660)],this[_0xd84c1d(675)][_0x2a81d1][_0xd84c1d(1580)],!0))!=_0x4780dc[_0xd84c1d(593)])return _0x45236a;this[_0xd84c1d(812)][_0x2a81d1]["fPTZX"]=_0x33d77a[_0xd84c1d(875)],this[_0xd84c1d(812)][_0x2a81d1][_0xd84c1d(660)]=_0x33d77a[_0xd84c1d(660)];break;case _0x20ba5d:return _0x4780dc[_0xd84c1d(1112)]}return _0x45236a=this[_0xd84c1d(439)]()}},{key:_0x7c8a86(444),value:function(_0x200965,_0x3ad7ea){var _0x9c2f3f=_0x7c8a86;return _0x200965<0||32<=_0x200965||null==_0x3ad7ea||null==this[_0x9c2f3f(812)][_0x200965]?_0x4780dc[_0x9c2f3f(650)]:(_0x3ad7ea["fRXLeft"]=this[_0x9c2f3f(915)],_0x3ad7ea[_0x9c2f3f(919)]=this[_0x9c2f3f(332)],_0x3ad7ea[_0x9c2f3f(1171)]=this["fRY1"],_0x3ad7ea[_0x9c2f3f(825)]=this[_0x9c2f3f(402)],_0x3ad7ea[_0x9c2f3f(368)]=this[_0x9c2f3f(368)],_0x3ad7ea[_0x9c2f3f(818)]=this[_0x9c2f3f(675)][_0x200965][_0x9c2f3f(818)],_0x3ad7ea["nFishParamType"]=this[_0x9c2f3f(812)][_0x200965][_0x9c2f3f(572)],_0x3ad7ea["fAngle"]=this[_0x9c2f3f(812)][_0x200965][_0x9c2f3f(1485)],_0x3ad7ea[_0x9c2f3f(1580)]=this["pFishParam"][_0x200965]["fZoom"],_0x3ad7ea["fPTZX"]=this["pFishParam"][_0x200965][_0x9c2f3f(875)],_0x3ad7ea[_0x9c2f3f(660)]=this[_0x9c2f3f(812)][_0x200965]["fPTZY"],_0x4780dc[_0x9c2f3f(593)])}},{key:_0x7c8a86(796),value:function(_0x322412,_0x36ae49){var _0x37342d=_0x7c8a86;return _0x322412<0||32<=_0x322412||null==_0x36ae49||null==this[_0x37342d(675)][_0x322412]?_0x4780dc[_0x37342d(650)]:(_0x36ae49[_0x37342d(473)]=this[_0x37342d(915)],_0x36ae49[_0x37342d(919)]=this["fRX2"],_0x36ae49["fRYTop"]=this["fRY1"],_0x36ae49[_0x37342d(825)]=this[_0x37342d(402)],_0x36ae49[_0x37342d(368)]=this[_0x37342d(368)],_0x36ae49["fCosH"]=this[_0x37342d(675)][_0x322412][_0x37342d(780)],_0x36ae49[_0x37342d(1181)]=this[_0x37342d(675)][_0x322412][_0x37342d(1181)],_0x36ae49[_0x37342d(1025)]=this[_0x37342d(675)][_0x322412][_0x37342d(1025)],_0x36ae49[_0x37342d(810)]=this[_0x37342d(675)][_0x322412][_0x37342d(810)],_0x36ae49["fAngle"]=this[_0x37342d(675)][_0x322412]["fAngle"],_0x36ae49[_0x37342d(1580)]=this[_0x37342d(675)][_0x322412][_0x37342d(1580)],_0x36ae49["nDisplayEffect"]=this["pRenderParam"][_0x322412][_0x37342d(310)],_0x36ae49[_0x37342d(818)]=this[_0x37342d(675)][_0x322412][_0x37342d(818)],_0x4780dc[_0x37342d(593)])}},{key:_0x7c8a86(922),value:function(_0x4a4cfa,_0x37760b,_0x181261,_0x63c425){var _0xe95c24=_0x7c8a86;if(_0x4a4cfa<=-.5||.4<=_0x4a4cfa||_0x37760b<=.6||1.5<=_0x37760b||_0x181261<=-.5||.4<=_0x181261||_0x63c425<=.6||1.5<=_0x63c425||_0x4a4cfa+_0x37760b<=.8||1.2<=_0x4a4cfa+_0x37760b||_0x181261+_0x63c425<=.8||1.2<=_0x181261+_0x63c425)return _0x4780dc[_0xe95c24(650)];if(_0x4a4cfa<0||1<_0x37760b||_0x181261<0||1<_0x63c425){for(var _0x2e6173=0;_0x2e6173<32;++_0x2e6173)if(_0x4e9094[_0xe95c24(1282)]==this[_0xe95c24(675)][_0x2e6173][_0xe95c24(310)]||_0x4e9094["SR_DE_FISH_PTZ_FLOOR"]==this[_0xe95c24(675)][_0x2e6173]["nDisplayEffect"]||_0x4e9094[_0xe95c24(994)]==this[_0xe95c24(675)][_0x2e6173]["nDisplayEffect"]){var _0x38e2dc=[];if(_0x38e2dc["fHAngleCos"]=this["pRenderParam"][_0x2e6173]["fCosH"],_0x38e2dc["fHAngleSin"]=this[_0xe95c24(675)][_0x2e6173]["fSinH"],_0x38e2dc[_0xe95c24(927)]=this[_0xe95c24(675)][_0x2e6173][_0xe95c24(1025)],_0x38e2dc[_0xe95c24(451)]=this["pRenderParam"][_0x2e6173][_0xe95c24(810)],0==this[_0xe95c24(725)](_0x4a4cfa,_0x37760b,_0x181261,_0x63c425,_0x38e2dc,this[_0xe95c24(675)][_0x2e6173][_0xe95c24(1580)],this[_0xe95c24(675)][_0x2e6173]["nDisplayEffect"]))return _0x4780dc[_0xe95c24(650)]}}return this[_0xe95c24(915)]=_0x4a4cfa,this[_0xe95c24(332)]=_0x37760b,this["fRY1"]=_0x181261,this[_0xe95c24(402)]=_0x63c425,_0x4780dc[_0xe95c24(593)]}},{key:_0x7c8a86(955),value:function(_0x5f256d,_0x509fd5){var _0x21e5af=_0x7c8a86;return null==this[_0x21e5af(675)][_0x5f256d]?_0x4780dc[_0x21e5af(1538)]:(_0x4e9094[_0x21e5af(472)]==this[_0x21e5af(675)][_0x5f256d][_0x21e5af(310)]||_0x4e9094[_0x21e5af(1366)]==this[_0x21e5af(675)][_0x5f256d][_0x21e5af(310)]?this["pRenderParam"][_0x5f256d][_0x21e5af(1485)]=_0x509fd5:_0x4e9094[_0x21e5af(1379)]!=this["pRenderParam"][_0x5f256d][_0x21e5af(310)]&&_0x4e9094["SR_DE_FISH_PANORAMA_CEILING_180"]!=this[_0x21e5af(675)][_0x5f256d][_0x21e5af(310)]||(this[_0x21e5af(675)][_0x5f256d][_0x21e5af(1485)]=-_0x509fd5),_0x4780dc["SR_OK"])}},{key:"ComputeAngleVertical",value:function(_0x51534b,_0x2c5763,_0x3db413,_0x10ae70){var _0x553b12=_0x7c8a86,_0xf7ae=Math[_0x553b12(1540)]((_0x2c5763-.5)*(_0x2c5763-.5)+(_0x51534b-.5)*(_0x51534b-.5));if(.5<_0xf7ae)return _0x4780dc[_0x553b12(650)];if(_0xf7ae<.001)return _0x3db413[_0x553b12(927)]=1,_0x3db413[_0x553b12(451)]=0,_0x3db413[_0x553b12(988)]=1,_0x3db413["fHAngleSin"]=0,_0x4780dc[_0x553b12(593)];if(_0x10ae70==_0x4e9094[_0x553b12(1282)]){_0x3db413[_0x553b12(988)]=(.5-_0x2c5763)/_0xf7ae,_0x3db413[_0x553b12(1211)]=(.5-_0x51534b)/_0xf7ae;var _0x20f1f5=_0xf7ae*_0x1f58a6;_0x3db413[_0x553b12(927)]=Math[_0x553b12(1268)](_0x20f1f5),_0x3db413[_0x553b12(451)]=Math[_0x553b12(514)](_0x20f1f5)}else{if(_0x10ae70!=_0x4e9094[_0x553b12(474)])return _0x4780dc[_0x553b12(650)];_0x3db413[_0x553b12(988)]=(_0x2c5763-.5)/_0xf7ae,_0x3db413[_0x553b12(1211)]=(.5-_0x51534b)/_0xf7ae,_0x20f1f5=_0xf7ae*_0x1f58a6,_0x3db413[_0x553b12(927)]=Math[_0x553b12(1268)](_0x20f1f5),_0x3db413[_0x553b12(451)]=Math["sin"](_0x20f1f5)}return _0x4780dc[_0x553b12(593)]}},{key:_0x7c8a86(456),value:function(_0x4b9218,_0xf785e2,_0x5820c0){var _0x57cb36=_0x7c8a86,_0x2d78a9,_0x322474;return.25<(_0xf785e2-.5)*(_0xf785e2-.5)+(_0x4b9218-.5)*(_0x4b9218-.5)?_0x4780dc[_0x57cb36(650)]:(_0xf785e2=(_0xf785e2-.5)/.5*_0x1f58a6/2,_0x2d78a9=Math["cos"](_0xf785e2),_0xf785e2=Math["sin"](_0xf785e2),1<(_0x4b9218-.5)/.5/_0x2d78a9||(_0x4b9218-.5)/.5/_0x2d78a9<-1?SR_ERR_PARAM:(_0x4b9218=(_0x4b9218-.5)/.5/_0x2d78a9*_0x1f58a6/2,_0x322474=Math[_0x57cb36(1268)](_0x4b9218),_0x4b9218=Math[_0x57cb36(514)](_0x4b9218),_0x5820c0[_0x57cb36(927)]=_0x2d78a9,_0x5820c0[_0x57cb36(451)]=_0xf785e2,_0x5820c0[_0x57cb36(988)]=_0x322474,_0x5820c0[_0x57cb36(1211)]=_0x4b9218,_0x4780dc[_0x57cb36(593)]))}},{key:_0x7c8a86(725),value:function(_0x3d29a5,_0x1bbed8,_0x355c44,_0x7f0d2d,_0x49f14a,_0x47d478,_0x9131ef){var _0x34bbc7=_0x7c8a86;return 1!=this[_0x34bbc7(656)](_0x3d29a5,_0x1bbed8,_0x355c44,_0x7f0d2d,_0x49f14a[_0x34bbc7(988)],_0x49f14a[_0x34bbc7(1211)],_0x49f14a[_0x34bbc7(927)],_0x49f14a["fVAngleSin"],_0x47d478,1,.5,_0x9131ef)&&1!=this[_0x34bbc7(656)](_0x3d29a5,_0x1bbed8,_0x355c44,_0x7f0d2d,_0x49f14a["fHAngleCos"],_0x49f14a[_0x34bbc7(1211)],_0x49f14a["fVAngleCos"],_0x49f14a[_0x34bbc7(451)],_0x47d478,0,.5,_0x9131ef)&&1!=this[_0x34bbc7(656)](_0x3d29a5,_0x1bbed8,_0x355c44,_0x7f0d2d,_0x49f14a["fHAngleCos"],_0x49f14a[_0x34bbc7(1211)],_0x49f14a[_0x34bbc7(927)],_0x49f14a["fVAngleSin"],_0x47d478,.5,1,_0x9131ef)&&1!=this["IsOutofImage"](_0x3d29a5,_0x1bbed8,_0x355c44,_0x7f0d2d,_0x49f14a[_0x34bbc7(988)],_0x49f14a[_0x34bbc7(1211)],_0x49f14a[_0x34bbc7(927)],_0x49f14a[_0x34bbc7(451)],_0x47d478,.5,0,_0x9131ef)&&1!=this[_0x34bbc7(656)](_0x3d29a5,_0x1bbed8,_0x355c44,_0x7f0d2d,_0x49f14a[_0x34bbc7(988)],_0x49f14a["fHAngleSin"],_0x49f14a[_0x34bbc7(927)],_0x49f14a[_0x34bbc7(451)],_0x47d478,0,0,_0x9131ef)&&1!=this[_0x34bbc7(656)](_0x3d29a5,_0x1bbed8,_0x355c44,_0x7f0d2d,_0x49f14a[_0x34bbc7(988)],_0x49f14a["fHAngleSin"],_0x49f14a[_0x34bbc7(927)],_0x49f14a[_0x34bbc7(451)],_0x47d478,0,1,_0x9131ef)&&1!=this[_0x34bbc7(656)](_0x3d29a5,_0x1bbed8,_0x355c44,_0x7f0d2d,_0x49f14a["fHAngleCos"],_0x49f14a[_0x34bbc7(1211)],_0x49f14a[_0x34bbc7(927)],_0x49f14a[_0x34bbc7(451)],_0x47d478,1,1,_0x9131ef)&&1!=this[_0x34bbc7(656)](_0x3d29a5,_0x1bbed8,_0x355c44,_0x7f0d2d,_0x49f14a[_0x34bbc7(988)],_0x49f14a[_0x34bbc7(1211)],_0x49f14a[_0x34bbc7(927)],_0x49f14a["fVAngleSin"],_0x47d478,1,0,_0x9131ef)}},{key:_0x7c8a86(656),value:function(_0x5ae41e,_0x568f94,_0x55c755,_0x4c1ea4,_0x17dee5,_0x63aae4,_0x5cdb3d,_0x49b7d4,_0x4b8d62,_0x110153,_0x18ac5b,_0x309ccf){var _0x4b0fa1=_0x7c8a86,_0x1e217a,_0x42b5eb,_0x3fc2fc,_0x46fe10=(_0x568f94-_0x5ae41e)/(_0x4c1ea4-_0x55c755),_0x3f5e79=(_0x5ae41e+_0x568f94)/2*1,_0x55c755=(_0x55c755+_0x4c1ea4)/2*_0x46fe10,_0x4c1ea4=(_0x568f94-_0x5ae41e)/2*1;if(_0x309ccf==SR_DE_FISH_PTZ_CEILING){if(_0x5e6f1f=_0x110153-.5,_0x41afd7=(_0x1e217a=.5-_0x18ac5b)*_0x5cdb3d+(_0x42b5eb=_0x4b8d62)*_0x49b7d4,(_0x3fc2fc=_0x42b5eb*_0x5cdb3d-_0x1e217a*_0x49b7d4)<=0)return!0;var _0x5e6f1f,_0x41afd7,_0x57a064,_0x57ece6=Math[_0x4b0fa1(1540)](_0x5e6f1f*_0x5e6f1f+_0x41afd7*_0x41afd7),_0x568f94=Math["sqrt"](_0x5e6f1f*_0x5e6f1f+_0x41afd7*_0x41afd7+_0x3fc2fc*_0x3fc2fc),_0x5ae41e=Math[_0x4b0fa1(925)](_0x57ece6/_0x568f94)/1.5707963*.5,_0x19af22=(-((_0x5e6f1f=_0x5ae41e*_0x5e6f1f/_0x57ece6)*_0x63aae4+(_0x41afd7=_0x5ae41e*_0x41afd7/_0x57ece6)*_0x17dee5)*_0x4c1ea4*2+_0x55c755)/_0x46fe10;if((_0x57a064=(_0x5e6f1f*_0x17dee5-_0x41afd7*_0x63aae4)*_0x4c1ea4*2+_0x3f5e79)<0||1<_0x57a064||_0x19af22<0||1<_0x19af22)return!0}if(_0x309ccf==SR_DE_FISH_PTZ_FLOOR){if(_0x5e6f1f=_0x110153-.5,_0x41afd7=(_0x1e217a=_0x18ac5b-.5)*_0x5cdb3d+(_0x42b5eb=_0x4b8d62)*_0x49b7d4,(_0x3fc2fc=_0x42b5eb*_0x5cdb3d-_0x1e217a*_0x49b7d4)<=0)return!0;_0x57ece6=Math[_0x4b0fa1(1540)](_0x5e6f1f*_0x5e6f1f+_0x41afd7*_0x41afd7),_0x568f94=Math[_0x4b0fa1(1540)](_0x5e6f1f*_0x5e6f1f+_0x41afd7*_0x41afd7+_0x3fc2fc*_0x3fc2fc),_0x5ae41e=Math["asin"](_0x57ece6/_0x568f94)/1.5707963*.5;if(_0x19af22=(((_0x5e6f1f=_0x5ae41e*_0x5e6f1f/_0x57ece6)*_0x63aae4+(_0x41afd7=_0x5ae41e*_0x41afd7/_0x57ece6)*_0x17dee5)*_0x4c1ea4*2+_0x55c755)/_0x46fe10,(_0x57a064=(_0x5e6f1f*_0x17dee5-_0x41afd7*_0x63aae4)*_0x4c1ea4*2+_0x3f5e79)<0||1<_0x57a064||_0x19af22<0||1<_0x19af22)return!0}if(_0x309ccf==SR_DE_FISH_PTZ_WALL){if(_0x57a064=(_0x5e6f1f=_0x110153-.5)*_0x17dee5+(_0x3fc2fc=(_0x42b5eb=_0x4b8d62)*_0x5cdb3d-(_0x1e217a=_0x18ac5b-.5)*_0x49b7d4)*_0x63aae4,_0x19af22=_0x41afd7=_0x1e217a*_0x5cdb3d+_0x42b5eb*_0x49b7d4,(_0x568f94=_0x3fc2fc*_0x17dee5-_0x5e6f1f*_0x63aae4)<=0)return!0;_0x57ece6=Math[_0x4b0fa1(1540)](_0x57a064*_0x57a064+_0x19af22*_0x19af22),_0x5ae41e=Math[_0x4b0fa1(1540)](_0x57a064*_0x57a064+_0x19af22*_0x19af22+_0x568f94*_0x568f94),_0x309ccf=Math[_0x4b0fa1(925)](_0x57ece6/_0x5ae41e)/1.5707963*.5;if(_0x19af22=(_0x309ccf*_0x19af22/_0x57ece6*_0x4c1ea4*2+_0x55c755)/_0x46fe10,(_0x57a064=_0x309ccf*_0x57a064/_0x57ece6*_0x4c1ea4*2+_0x3f5e79)<0||1<_0x57a064||_0x19af22<0||1<_0x19af22)return!0}return!1}},{key:_0x7c8a86(439),value:function(){var _0x775cc3=_0x7c8a86;if(-1==this["nWndPort"])return _0x4780dc[_0x775cc3(1538)];for(var _0xaebd36,_0x181c3b=0;_0x181c3b<32;++_0x181c3b)null==this[_0x775cc3(675)][_0x181c3b]||_0x4e9094[_0x775cc3(1282)]!=this[_0x775cc3(675)][_0x181c3b]["nDisplayEffect"]&&_0x4e9094[_0x775cc3(474)]!=this[_0x775cc3(675)][_0x181c3b][_0x775cc3(310)]&&_0x4e9094[_0x775cc3(994)]!=this["pRenderParam"][_0x181c3b]["nDisplayEffect"]||(_0xaebd36=_0x4780dc[_0x775cc3(593)],this[_0x775cc3(1120)]==_0xbacc34?(_0xaebd36=this[_0x775cc3(391)](_0x181c3b),_0x4780dc[_0x775cc3(593)]==_0xaebd36&&(_0xaebd36=this[_0x775cc3(838)](_0x181c3b))):this["nPTZDisplayMode"]==_0x22e691&&(_0xaebd36=this[_0x775cc3(755)](_0x181c3b)));return _0x4780dc[_0x775cc3(593)]}},{key:_0x7c8a86(631),value:function(){var _0x10f193=_0x7c8a86;return this[_0x10f193(1398)]}},{key:_0x7c8a86(1062),value:function(){var _0x1cf7d3=_0x7c8a86;return this[_0x1cf7d3(1120)]}},{key:"GetPTZColor",value:function(_0x4acc00,_0x14ad31){var _0x2762a6=_0x7c8a86;return _0x4acc00<0||32<=_0x4acc00||null==_0x14ad31?_0x4780dc["SR_ERR_PARAM"]:(_0x14ad31["fA"]=this[_0x2762a6(1208)][_0x4acc00]["fA"],_0x14ad31["fR"]=this[_0x2762a6(1208)][_0x4acc00]["fR"],_0x14ad31["fG"]=this["stPTZColor"][_0x4acc00]["fG"],_0x14ad31["fB"]=this[_0x2762a6(1208)][_0x4acc00]["fB"],null!=this[_0x2762a6(739)]&&(Math["abs"](this["pPTZSetColor"][_0x4acc00]["fA"])<_0x453d9f||Math[_0x2762a6(1502)](this[_0x2762a6(739)][_0x4acc00]["fR"])<_0x453d9f||Math[_0x2762a6(1502)](this[_0x2762a6(739)][_0x4acc00]["fG"])<_0x453d9f||Math["abs"](this[_0x2762a6(739)][_0x4acc00]["fB"])<_0x453d9f)&&(_0x14ad31["fA"]=this["pPTZSetColor"][_0x4acc00]["fA"],_0x14ad31["fR"]=this[_0x2762a6(739)][_0x4acc00]["fR"],_0x14ad31["fG"]=this[_0x2762a6(739)][_0x4acc00]["fG"],_0x14ad31["fB"]=this[_0x2762a6(739)][_0x4acc00]["fB"]),_0x4780dc["SR_OK"])}},{key:_0x7c8a86(1486),value:function(_0x245dfc,_0x3e7454){var _0x23a57b=_0x7c8a86;if(_0x245dfc<0||32<=_0x245dfc)return _0x4780dc[_0x23a57b(650)];if(null==_0x3e7454)return _0x4780dc[_0x23a57b(650)];if(null==this[_0x23a57b(739)]){this["pPTZSetColor"]=[];for(var _0x34e9c1=0;_0x34e9c1<32;++_0x34e9c1)this[_0x23a57b(739)][_0x34e9c1]=[],this[_0x23a57b(739)][_0x34e9c1]["fR"]=0,this[_0x23a57b(739)][_0x34e9c1]["fG"]=0,this["pPTZSetColor"][_0x34e9c1]["fB"]=0,this[_0x23a57b(739)][_0x34e9c1]["fA"]=1}return this[_0x23a57b(739)][_0x245dfc]["fR"]=_0x3e7454["fR"],this["pPTZSetColor"][_0x245dfc]["fG"]=_0x3e7454["fG"],this["pPTZSetColor"][_0x245dfc]["fB"]=_0x3e7454["fB"],this["pPTZSetColor"][_0x245dfc]["fA"]=_0x3e7454["fA"],_0x4780dc["SR_OK"]}},{key:"IsPTZSelected",value:function(_0x38dda2){return!(_0x38dda2<0||32<=_0x38dda2)&&this["bPTZSelected"][_0x38dda2]}},{key:_0x7c8a86(993),value:function(_0x10a372,_0x5d1714){var _0x2a3ea6=_0x7c8a86;if(-1==this[_0x2a3ea6(1398)])return-1;if(null==this[_0x2a3ea6(675)][this["nWndPort"]])return-1;var _0x4c299d=32,_0x56b639=[];_0x56b639["fX"]=_0x10a372,_0x56b639["fY"]=_0x5d1714;for(var _0x11a880=0;_0x11a880<32;++_0x11a880)this[_0x2a3ea6(646)][_0x11a880]=!1;if(this[_0x2a3ea6(1120)]==_0xbacc34){switch(this["pRenderParam"][this["nWndPort"]][_0x2a3ea6(310)]){case _0x4e9094[_0x2a3ea6(472)]:this[_0x2a3ea6(690)](_0x56b639,_0x10a372,_0x5d1714);break;case _0x4e9094["SR_DE_FISH_PANORAMA_CEILING_360"]:this[_0x2a3ea6(1436)](_0x56b639,_0x10a372,_0x5d1714);break;case _0x4e9094[_0x2a3ea6(1018)]:this[_0x2a3ea6(630)](_0x56b639,_0x10a372,_0x5d1714)}for(var _0x42fd44=0;_0x42fd44<32;++_0x42fd44)if(0!=this[_0x2a3ea6(652)][_0x42fd44]){var _0x1015ff=[],_0x5d5aba=(_0x1015ff["fX"]=this[_0x2a3ea6(1183)][_0x42fd44][0]["fX"],_0x1015ff["fY"]=this[_0x2a3ea6(1183)][_0x42fd44][0]["fY"],[]);_0x5d5aba["fX"]=this[_0x2a3ea6(1183)][_0x42fd44][0]["fX"],_0x5d5aba["fY"]=this[_0x2a3ea6(1183)][_0x42fd44][0]["fY"];for(var _0x3f1880=1;_0x3f1880<this[_0x2a3ea6(652)][_0x42fd44];++_0x3f1880)this[_0x2a3ea6(640)](_0x1015ff,_0x5d5aba,this[_0x2a3ea6(1183)][_0x42fd44][_0x3f1880]);if(_0x56b639["fX"]<=_0x1015ff["fX"]&&_0x56b639["fX"]>=_0x5d5aba["fX"]&&_0x56b639["fY"]>=_0x5d5aba["fY"]&&_0x56b639["fY"]<=_0x1015ff["fY"]){_0x4c299d=_0x42fd44;break}}}else{if(this["nPTZDisplayMode"]!=_0x22e691)return-1;for(var _0x4ebc3a=0;_0x4ebc3a<32;++_0x4ebc3a)if(_0x56b639["fX"]<=this[_0x2a3ea6(1459)][_0x4ebc3a][2]["fX"]&&_0x56b639["fX"]>=this[_0x2a3ea6(1459)][_0x4ebc3a][0]["fX"]&&_0x56b639["fY"]>=this["pRectPoints"][_0x4ebc3a][0]["fY"]&&_0x56b639["fY"]<=this[_0x2a3ea6(1459)][_0x4ebc3a][2]["fY"]){_0x4c299d=_0x4ebc3a;break}}return _0x4c299d<32?(this["bPTZSelected"][_0x4c299d]=!0,_0x4c299d):-1}},{key:_0x7c8a86(430),value:function(_0x1c7d11){var _0x1e7327=_0x7c8a86;if(_0x1c7d11<0||32<=_0x1c7d11)return _0x4780dc["SR_ERR_PARAM"];for(var _0x11f5b8=0;_0x11f5b8<32;++_0x11f5b8)this[_0x1e7327(646)][_0x11f5b8]=!1;if(this["nPTZDisplayMode"]==_0xbacc34){if(0==this[_0x1e7327(652)][_0x1c7d11])return _0x4780dc[_0x1e7327(650)];this["bPTZSelected"][_0x1c7d11]=!0}else{if(0==this[_0x1e7327(1343)][_0x1c7d11])return _0x4780dc["SR_ERR_PARAM"];this["bPTZSelected"][_0x1c7d11]=!0}return _0x4780dc["SR_OK"]}},{key:_0x7c8a86(640),value:function(_0x5ea844,_0x57d0f1,_0xdaa325){var _0x556ebf=_0x7c8a86;return _0xdaa325["fX"]<_0x57d0f1["fX"]&&(_0x57d0f1["fX"]=_0xdaa325["fX"]),_0xdaa325["fY"]<_0x57d0f1["fY"]&&(_0x57d0f1["fY"]=_0xdaa325["fY"]),_0xdaa325["fX"]>_0x5ea844["fX"]&&(_0x5ea844["fX"]=_0xdaa325["fX"]),_0xdaa325["fY"]>_0x5ea844["fY"]&&(_0x5ea844["fY"]=_0xdaa325["fY"]),_0x4780dc[_0x556ebf(593)]}},{key:_0x7c8a86(802),value:function(_0x22dbb4,_0x357d66,_0x13326e){var _0x111d75=_0x7c8a86;return _0x22dbb4<0||32<=_0x22dbb4?_0x4780dc[_0x111d75(650)]:null==this[_0x111d75(675)][this[_0x111d75(1398)]]?_0x4780dc[_0x111d75(1538)]:(_0xbacc34==_0x13326e?null!=this[_0x111d75(1183)][_0x22dbb4]&&0!=this["nOriPTZPointNum"][_0x22dbb4]&&(_0x357d66["pstPoints"]=this[_0x111d75(1183)][_0x22dbb4],_0x357d66["nPointNum"]=this[_0x111d75(652)][_0x22dbb4]):_0x22e691==_0x13326e&&null!=this[_0x111d75(1459)][_0x22dbb4]&&(_0x357d66[_0x111d75(319)]=this[_0x111d75(1459)][_0x22dbb4],_0x357d66[_0x111d75(665)]=4),_0x4780dc[_0x111d75(593)])}},{key:_0x7c8a86(728),value:function(_0x2a54d4){var _0x55cf25=_0x7c8a86;return this[_0x55cf25(1120)]=_0x2a54d4,this[_0x55cf25(439)]()}},{key:_0x7c8a86(1154),value:function(_0x10fa89){var _0x5cc958=_0x7c8a86;return _0x10fa89<0||32<=_0x10fa89?_0x4780dc[_0x5cc958(650)]:null==this[_0x5cc958(675)]?_0x4780dc[_0x5cc958(1538)]:this["pRenderParam"][_0x10fa89][_0x5cc958(310)]}},{key:_0x7c8a86(1504),value:function(_0x4f26b4,_0x29df9d,_0x277661){var _0x455ad6=_0x7c8a86;if(_0x4f26b4<0||32<=_0x4f26b4)return _0x4780dc["SR_ERR_PARAM"];if(null==this[_0x455ad6(1325)][_0x4f26b4]||0==this[_0x455ad6(1405)][_0x4f26b4])return _0x4780dc[_0x455ad6(650)];var _0x5cf2fc=this[_0x455ad6(1138)][_0x4f26b4][_0x277661];if(_0x29df9d["nPointNum"]=this[_0x455ad6(1138)][_0x4f26b4][_0x277661+1]-this[_0x455ad6(1138)][_0x4f26b4][_0x277661],_0x29df9d["nPointNum"]<0)return _0x4780dc[_0x455ad6(1538)];_0x29df9d[_0x455ad6(319)]=[];for(var _0x1cf113=0;_0x1cf113<_0x29df9d[_0x455ad6(665)];++_0x1cf113){var _0xc5bc81=[];_0xc5bc81["fX"]=this[_0x455ad6(1325)][_0x4f26b4][_0x5cf2fc+_0x1cf113]["fX"],_0xc5bc81["fY"]=this[_0x455ad6(1325)][_0x4f26b4][_0x5cf2fc+_0x1cf113]["fY"],_0x29df9d[_0x455ad6(319)][_0x455ad6(962)](_0xc5bc81)}return _0x4780dc[_0x455ad6(593)]}},{key:"GetPTZFragmentNum",value:function(_0x3e3e33){var _0x4dfd58=_0x7c8a86;return _0x3e3e33<0||32<=_0x3e3e33?_0x4780dc[_0x4dfd58(650)]:0==this[_0x4dfd58(733)][_0x3e3e33]?_0x4780dc[_0x4dfd58(1538)]:this[_0x4dfd58(733)][_0x3e3e33]}},{key:_0x7c8a86(779),value:function(_0x5394ce){var _0x163507=_0x7c8a86;if(_0x5394ce<0||32<=_0x5394ce)return _0x4780dc["SR_ERR_PARAM"];if(null==this[_0x163507(1325)][_0x5394ce]||0==this[_0x163507(1405)][_0x5394ce])return _0x4780dc["SR_ERR_CALL_ORDER"];this[_0x163507(1138)][_0x5394ce][0]=0,this[_0x163507(733)][_0x5394ce]=1;for(var _0x53b9d9=0,_0x37a6bc=0;_0x37a6bc<this[_0x163507(1405)][_0x5394ce]-1;_0x37a6bc++).5<Math[_0x163507(1502)](this[_0x163507(1325)][_0x5394ce][_0x37a6bc+1]["fX"]-this[_0x163507(1325)][_0x5394ce][_0x37a6bc]["fX"])&&(_0x53b9d9=this[_0x163507(733)][_0x5394ce],this["nPTZFragmentNode"][_0x5394ce][_0x53b9d9]=_0x37a6bc+1,this["nPTZFragmentNum"][_0x5394ce]=this[_0x163507(733)][_0x5394ce]+1);var _0x1b2b98=this[_0x163507(1405)][_0x5394ce];return Math[_0x163507(1502)](this["pPanoPTZPoints"][_0x5394ce][0]["fX"]-this[_0x163507(1325)][_0x5394ce][_0x1b2b98-1]["fX"])<.5&&(this[_0x163507(1325)][_0x5394ce][_0x1b2b98]["fX"]=this[_0x163507(1325)][_0x5394ce][0]["fX"],this[_0x163507(1325)][_0x5394ce][_0x1b2b98]["fY"]=this[_0x163507(1325)][_0x5394ce][0]["fY"],this["nPanoPTZPointNum"][_0x5394ce]=this[_0x163507(1405)][_0x5394ce]+1),_0x53b9d9=this[_0x163507(733)][_0x5394ce],this[_0x163507(1138)][_0x5394ce][_0x53b9d9]=this["nPanoPTZPointNum"][_0x5394ce],_0x4780dc[_0x163507(593)]}},{key:_0x7c8a86(433),value:function(_0x47c783){var _0x3e0105=_0x7c8a86;return this[_0x3e0105(1105)][_0x47c783]}},{key:_0x7c8a86(886),value:function(_0x33b8a7,_0x4d3a0e,_0x58aab6){var _0x159381=_0x7c8a86;if(null==this["pRenderParam"][this[_0x159381(1398)]])return _0x4780dc[_0x159381(1538)];if(null==_0x33b8a7)return _0x4780dc["SR_ERR_PARAM"];var _0x2ab7ec=(this["fRX2"]-this[_0x159381(915)])/(this[_0x159381(402)]-this[_0x159381(737)]),_0x20bc7=(this["fRX2"]-this["fRX1"])/2*1,_0x93bd83=0,_0x2ab7ec=((1<this[_0x159381(332)]||1<this["fRY2"]||this["fRX1"]<0||this[_0x159381(737)]<0)&&(this[_0x159381(915)]<0&&_0x93bd83<(_0x2f273b=-this[_0x159381(915)])&&(_0x93bd83=_0x2f273b),1<this[_0x159381(332)]&&_0x93bd83<(_0x2f273b=this[_0x159381(332)]-1)&&(_0x93bd83=_0x2f273b),this[_0x159381(737)]<0&&_0x93bd83<(_0x2f273b=-this[_0x159381(737)]*_0x2ab7ec)&&(_0x93bd83=_0x2f273b),1<this[_0x159381(402)]&&_0x93bd83<(_0x2f273b=(this["fRY2"]-1)*_0x2ab7ec)&&(_0x93bd83=_0x2f273b)),_0x93bd83/_0x20bc7),_0x2f273b=[];if(_0x2f273b["fX"]=0,_0x2f273b["fY"]=0,Math[_0x159381(1502)](_0x4d3a0e-.5)<_0x453d9f&&Math[_0x159381(1502)](_0x58aab6-.5)<_0x453d9f)return _0x4780dc[_0x159381(1112)];return _0x93bd83=[],_0x20bc7=[],_0x93bd83["fX"]=_0x4d3a0e-.5,_0x93bd83["fY"]=_0x58aab6-.5,_0x20bc7["fX"]=-.5*Math[_0x159381(514)](this[_0x159381(675)][this[_0x159381(1398)]][_0x159381(1485)]),_0x20bc7["fY"]=.5*Math[_0x159381(1268)](this[_0x159381(675)][this[_0x159381(1398)]]["fAngle"]),_0x4d3a0e=Math["sqrt"](_0x93bd83["fX"]*_0x93bd83["fX"]+_0x93bd83["fY"]*_0x93bd83["fY"]),_0x58aab6=Math[_0x159381(1540)](_0x20bc7["fX"]*_0x20bc7["fX"]+_0x20bc7["fY"]*_0x20bc7["fY"]),_0x58aab6=Math[_0x159381(1200)]((_0x93bd83["fX"]*_0x20bc7["fX"]+_0x93bd83["fY"]*_0x20bc7["fY"])/(_0x4d3a0e*_0x58aab6)),0<_0x93bd83["fX"]*_0x20bc7["fY"]-_0x93bd83["fY"]*_0x20bc7["fX"]&&(_0x58aab6=6.2831852-_0x58aab6),_0x2f273b["fX"]=_0x58aab6/6.2831853,_0x2f273b["fY"]=(2*(.5-_0x4d3a0e)-_0x2ab7ec)/(.8-_0x2ab7ec),0<=_0x2f273b["fY"]&&0<=_0x2f273b["fX"]&&_0x2f273b["fY"]<=1&&_0x2f273b["fX"]<=1?(_0x33b8a7["fX"]=_0x2f273b["fX"],_0x33b8a7["fY"]=_0x2f273b["fY"],_0x4780dc[_0x159381(593)]):_0x4780dc[_0x159381(650)]}},{key:_0x7c8a86(1077),value:function(_0x224a5e,_0xa85ef7,_0x1750cb){var _0x3ed56d=_0x7c8a86;if(null==this[_0x3ed56d(675)][this[_0x3ed56d(1398)]])return _0x4780dc[_0x3ed56d(1538)];if(null==_0x224a5e)return _0x4780dc[_0x3ed56d(650)];var _0x12afb1=(this["fRX2"]-this["fRX1"])/(this[_0x3ed56d(402)]-this[_0x3ed56d(737)]),_0x33825d=(this[_0x3ed56d(332)]-this["fRX1"])/2*1,_0x210911=0,_0x12afb1=((1<this[_0x3ed56d(332)]||1<this["fRY2"]||this["fRX1"]<0||this[_0x3ed56d(737)]<0)&&(this["fRX1"]<0&&_0x210911<(_0x5a87d5=-this[_0x3ed56d(915)])&&(_0x210911=_0x5a87d5),1<this[_0x3ed56d(332)]&&_0x210911<(_0x5a87d5=this[_0x3ed56d(332)]-1)&&(_0x210911=_0x5a87d5),this[_0x3ed56d(737)]<0&&_0x210911<(_0x5a87d5=-this[_0x3ed56d(737)]*_0x12afb1)&&(_0x210911=_0x5a87d5),1<this[_0x3ed56d(402)]&&_0x210911<(_0x5a87d5=(this["fRY2"]-1)*_0x12afb1)&&(_0x210911=_0x5a87d5)),_0x210911/_0x33825d),_0x5a87d5=[];if(_0x5a87d5["fX"]=0,_0x5a87d5["fY"]=0,Math["abs"](_0xa85ef7-.5)<_0x453d9f&&Math[_0x3ed56d(1502)](_0x1750cb-.5)<_0x453d9f)return _0x4780dc[_0x3ed56d(1112)];return _0x210911=[],_0x33825d=[],_0x210911["fX"]=_0xa85ef7-.5,_0x210911["fY"]=_0x1750cb-.5,_0x33825d["fX"]=-.5*Math[_0x3ed56d(514)](this["pRenderParam"][this[_0x3ed56d(1398)]][_0x3ed56d(1485)]),_0x33825d["fY"]=.5*Math[_0x3ed56d(1268)](this["pRenderParam"][this[_0x3ed56d(1398)]][_0x3ed56d(1485)]),_0xa85ef7=Math[_0x3ed56d(1540)](_0x210911["fX"]*_0x210911["fX"]+_0x210911["fY"]*_0x210911["fY"]),_0x1750cb=Math[_0x3ed56d(1540)](_0x33825d["fX"]*_0x33825d["fX"]+_0x33825d["fY"]*_0x33825d["fY"]),_0x1750cb=Math[_0x3ed56d(1200)]((_0x210911["fX"]*_0x33825d["fX"]+_0x210911["fY"]*_0x33825d["fY"])/(_0xa85ef7*_0x1750cb)),0<_0x210911["fX"]*_0x33825d["fY"]-_0x210911["fY"]*_0x33825d["fX"]&&(_0x1750cb=6.2831852-_0x1750cb),_0x5a87d5["fX"]=1-_0x1750cb/6.2831853,_0x5a87d5["fY"]=1-(2*(.5-_0xa85ef7)-_0x12afb1)/(.8-_0x12afb1),0<=_0x5a87d5["fY"]&&0<=_0x5a87d5["fX"]&&_0x5a87d5["fY"]<=1&&_0x5a87d5["fX"]<=1?(_0x224a5e["fX"]=_0x5a87d5["fX"],_0x224a5e["fY"]=_0x5a87d5["fY"],_0x4780dc[_0x3ed56d(593)]):_0x4780dc[_0x3ed56d(650)]}},{key:"GetPointFish2PanoWall",value:function(_0x1faad0,_0x83e1ed,_0x1d1ba2){var _0x19fe17=_0x7c8a86;if(null==this[_0x19fe17(675)][this[_0x19fe17(1398)]])return _0x4780dc[_0x19fe17(1538)];if(null==_0x1faad0)return _0x4780dc[_0x19fe17(650)];var _0x43ac79=(this[_0x19fe17(332)]-this["fRX1"])/(this["fRY2"]-this[_0x19fe17(737)]),_0x3c9d40=(this[_0x19fe17(332)]-this[_0x19fe17(915)])/2*1,_0x11cdef=0,_0x501f91=1,_0x366f1f=.1,_0x11f9e7=.9,_0x43ac79=(this[_0x19fe17(915)]<0&&(_0x5f0c8c=-this[_0x19fe17(915)],_0x11cdef=_0x5f0c8c/=2*_0x3c9d40),1<this["fRX2"]&&(_0x5f0c8c=this["fRX2"]-1,_0x501f91=1-(_0x5f0c8c/=2*_0x3c9d40)),this["fRY1"]<0&&(_0x5f0c8c=-this["fRY1"]*_0x43ac79,_0x366f1f=.1<(_0x5f0c8c/=2*_0x3c9d40)?_0x5f0c8c:.1),1<this[_0x19fe17(402)]&&(_0x5f0c8c=(this[_0x19fe17(402)]-1)*_0x43ac79,_0x11f9e7=1-.9<(_0x5f0c8c/=2*_0x3c9d40)?1-_0x5f0c8c:.9),[]),_0x5f0c8c=(_0x43ac79["fX"]=0,_0x43ac79["fY"]=0,2*_0x83e1ed*_0x3c9d40),_0x27a14e=2*_0x1d1ba2*_0x3c9d40,_0x445bda=Math["sqrt"](_0x3c9d40*_0x3c9d40-(_0x27a14e-_0x3c9d40)*(_0x27a14e-_0x3c9d40));return Math[_0x19fe17(1502)](_0x445bda)<_0x453d9f?SR_ERR_PARAM:(_0x1d1ba2=_0x27a14e,_0x43ac79["fX"]=((_0x83e1ed=_0x3c9d40*(_0x5f0c8c-_0x3c9d40)/_0x445bda+_0x3c9d40)-2*_0x11cdef*_0x3c9d40)/(2*(_0x501f91-_0x11cdef)*_0x3c9d40),_0x43ac79["fY"]=(_0x1d1ba2-2*_0x366f1f*_0x3c9d40)/(2*(_0x11f9e7-_0x366f1f)*_0x3c9d40),0<=_0x43ac79["fY"]&&0<=_0x43ac79["fX"]&&_0x43ac79["fY"]<=1&&_0x43ac79["fX"]<=1?(_0x1faad0["fX"]=_0x43ac79["fX"],_0x1faad0["fY"]=_0x43ac79["fY"],_0x4780dc[_0x19fe17(593)]):_0x4780dc["SR_ERR_PARAM"])}}]),_0x32d1fc}(),_0x58f0d9=function(){var _0x2d57cf=_0x372e98;function _0x5acb8f(){var _0x48ffac=a0_0x5477;_0x56ad3b(this,_0x5acb8f),this[_0x48ffac(1264)]=_0x48ffac(1258),this[_0x48ffac(1128)]=null,this["mainCanvasID"]="",this[_0x48ffac(1233)]=0,this[_0x48ffac(359)]=_0x4e9094[_0x48ffac(1347)],this[_0x48ffac(752)]=0,this[_0x48ffac(723)]=0,this[_0x48ffac(1346)]=0,this[_0x48ffac(429)],this[_0x48ffac(867)]()}return _0x5dd832(_0x5acb8f,[{key:_0x2d57cf(867),value:function(){var _0x54f1b3=_0x2d57cf;this[_0x54f1b3(902)]=[];for(var _0x40e3db=0;_0x40e3db<32;_0x40e3db++)this[_0x54f1b3(902)][_0x40e3db]={},this["stFishEyeManager"][_0x40e3db][_0x54f1b3(1512)]=null,this[_0x54f1b3(902)][_0x40e3db][_0x54f1b3(1404)]=0,this[_0x54f1b3(902)][_0x40e3db][_0x54f1b3(352)]="",this["stFishEyeManager"][_0x40e3db][_0x54f1b3(960)]=0,this[_0x54f1b3(902)][_0x40e3db]["bInit"]=0,this[_0x54f1b3(902)][_0x40e3db][_0x54f1b3(1305)]=0,this[_0x54f1b3(902)][_0x40e3db][_0x54f1b3(985)]=_0x1f6e6c,this[_0x54f1b3(902)][_0x40e3db][_0x54f1b3(1490)]=_0x58c99c,this[_0x54f1b3(902)][_0x40e3db][_0x54f1b3(776)]=_0x4e9094["SR_DE_FISH_ORIGINAL"];this["stFishParam"]=[];for(var _0x2d7e0e=0;_0x2d7e0e<32;_0x2d7e0e++)this["stFishParam"][_0x2d7e0e]={},this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(1278)]=0,this[_0x54f1b3(1324)][_0x2d7e0e]["stPTZParam"]={},this[_0x54f1b3(1324)][_0x2d7e0e]["stPTZParam"]["fPTZPositionX"]=0,this["stFishParam"][_0x2d7e0e][_0x54f1b3(1458)][_0x54f1b3(1357)]=0,this["stFishParam"][_0x2d7e0e][_0x54f1b3(612)]={},this["stFishParam"][_0x2d7e0e]["stCycleParam"][_0x54f1b3(313)]=0,this[_0x54f1b3(1324)][_0x2d7e0e]["stCycleParam"][_0x54f1b3(586)]=0,this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(612)][_0x54f1b3(554)]=0,this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(612)][_0x54f1b3(550)]=0,this["stFishParam"][_0x2d7e0e][_0x54f1b3(1580)]=0,this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(545)]=0,this[_0x54f1b3(1324)][_0x2d7e0e]["stPTZColor"]={},this["stFishParam"][_0x2d7e0e][_0x54f1b3(1208)]["nR"]=0,this[_0x54f1b3(1324)][_0x2d7e0e]["stPTZColor"]["nG"]=0,this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(1208)]["nB"]=0,this[_0x54f1b3(1324)][_0x2d7e0e]["stPTZColor"][_0x54f1b3(991)]=0,this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(750)]={},this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(750)][_0x54f1b3(322)]=0,this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(750)][_0x54f1b3(1209)]=0,this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(750)][_0x54f1b3(1575)]=0,this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(750)][_0x54f1b3(518)]=0,this[_0x54f1b3(1324)][_0x2d7e0e][_0x54f1b3(834)]=0}},{key:_0x2d57cf(814),value:function(_0x40b7e1){return 1}},{key:_0x2d57cf(1480),value:function(_0x5bfde9,_0x24f09f){var _0x1a6c08=_0x2d57cf;return this[_0x1a6c08(1264)]=_0x24f09f,this[_0x1a6c08(831)]=_0x5bfde9,null==this[_0x1a6c08(429)]&&(this["pFishParamManager"]=new _0x28824e),"2d"===this[_0x1a6c08(1264)]||"2D"===this[_0x1a6c08(1264)]?(this[_0x1a6c08(1128)]=new _0x2b10fa,console[_0x1a6c08(1590)]("2d render")):(this[_0x1a6c08(1128)]=new _0x39092a,this[_0x1a6c08(1128)][_0x1a6c08(1299)](this[_0x1a6c08(429)]),console["log"](_0x1a6c08(873))),this["oVideoHandle"]["SR_Init"](_0x5bfde9),this[_0x1a6c08(1233)]=this[_0x1a6c08(1128)][_0x1a6c08(856)](this[_0x1a6c08(359)]),null==this[_0x1a6c08(902)][0]["pRender"]&&this["mainFECCorrect"]!==_0x4e9094[_0x1a6c08(1347)]&&(this[_0x1a6c08(902)][0][_0x1a6c08(1512)]=this["oVideoHandle"],this["stFishEyeManager"][0][_0x1a6c08(1404)]=0,this[_0x1a6c08(902)][0][_0x1a6c08(352)]=this[_0x1a6c08(831)],this[_0x1a6c08(902)][0][_0x1a6c08(960)]=1,this[_0x1a6c08(902)][0][_0x1a6c08(1033)]=1,this[_0x1a6c08(902)][0]["nValidSubPort"]=0),-1==this["mainSubPort"]?(console[_0x1a6c08(786)](_0x1a6c08(1529),_0x1a6c08(692),this[_0x1a6c08(1233)]),0):1}},{key:_0x2d57cf(785),value:function(){var _0x428e3b=_0x2d57cf;null!=this[_0x428e3b(1128)]&&(this[_0x428e3b(1128)][_0x428e3b(943)](this[_0x428e3b(1233)]),this["oVideoHandle"]["SR_Destroy"](),this[_0x428e3b(1128)]=null);for(var _0x28a176=0;_0x28a176<32;_0x28a176++)this[_0x428e3b(902)][_0x28a176][_0x428e3b(1512)]=null;return this[_0x428e3b(902)][_0x428e3b(387)](0,this[_0x428e3b(902)][_0x428e3b(525)]),this[_0x428e3b(1324)][_0x428e3b(387)](0,this["stFishParam"][_0x428e3b(525)]),this[_0x428e3b(429)][_0x428e3b(505)](),this[_0x428e3b(429)]=null,1}},{key:_0x2d57cf(700),value:function(_0x39c369){var _0x38d191=_0x2d57cf;return null!=this[_0x38d191(1128)]?this[_0x38d191(1128)][_0x38d191(658)](_0x39c369):0}},{key:_0x2d57cf(399),value:function(_0xa7d936,_0x3e5173,_0x55e081,_0x54053e){var _0x53527b=_0x2d57cf;return null!=this[_0x53527b(1128)]?this[_0x53527b(1128)]["SR_SetDisplayRect"](_0xa7d936,_0x3e5173,_0x55e081,_0x54053e):0}},{key:_0x2d57cf(343),value:function(_0x15f466,_0xe897fd){var _0x2d402c=_0x2d57cf;return null!=this[_0x2d402c(1128)]?this[_0x2d402c(1128)][_0x2d402c(422)](_0x15f466,_0xe897fd):0}},{key:"GetCanvasSize",value:function(){var _0x222da3=_0x2d57cf;return null!=this["oVideoHandle"]?this[_0x222da3(1128)][_0x222da3(918)]():0}},{key:"SetAntialias",value:function(_0x543f35){var _0x2f5e65=_0x2d57cf;return null!=this[_0x2f5e65(1128)]?this[_0x2f5e65(1128)][_0x2f5e65(552)](_0x543f35):0}},{key:_0x2d57cf(1206),value:function(_0x20d79b,_0x395bce,_0x489f9b){var _0x2f5177=_0x2d57cf;if(_0x489f9b!=_0x58c99c&&_0x489f9b!=_0x1aded7&&_0x489f9b!=_0x182632&&_0x489f9b!=_0x32c6be)return console["log"]("%c 20230516 hardDecoder not support correctType:%d",_0x2f5177(657),_0x489f9b),16;var _0x29f922=this[_0x2f5177(1457)](_0x395bce,_0x489f9b);return 0==_0x20d79b?(null!=this[_0x2f5177(1128)]&&(this["oVideoHandle"][_0x2f5177(943)](this[_0x2f5177(1233)]),this[_0x2f5177(1233)]=this[_0x2f5177(1128)][_0x2f5177(856)](_0x29f922),null==this[_0x2f5177(902)][_0x20d79b][_0x2f5177(1512)]&&(this["stFishEyeManager"][_0x20d79b]["pRender"]=this[_0x2f5177(1128)],this["stFishEyeManager"][_0x20d79b][_0x2f5177(1404)]=0,this[_0x2f5177(902)][_0x20d79b][_0x2f5177(352)]=this[_0x2f5177(831)],this[_0x2f5177(902)][_0x20d79b][_0x2f5177(960)]=1,this[_0x2f5177(902)][_0x20d79b][_0x2f5177(1033)]=1,this[_0x2f5177(902)][_0x20d79b]["nValidSubPort"]=this[_0x2f5177(1233)])),this[_0x2f5177(902)][_0x20d79b][_0x2f5177(985)]=_0x395bce,this[_0x2f5177(902)][_0x20d79b][_0x2f5177(1490)]=_0x489f9b,this[_0x2f5177(902)][_0x20d79b][_0x2f5177(776)]=_0x29f922,this["mainFECCorrect"]=_0x29f922,_0x32c6be<=this[_0x2f5177(902)][_0x20d79b][_0x2f5177(1490)]&&(_0x395bce=this[_0x2f5177(902)][_0x20d79b][_0x2f5177(1512)]["SR_SetRenderState"](_0x11d463,0),_0x4780dc["SR_OK"]!=_0x395bce&&console["log"](_0x2f5177(487),_0x395bce))):null!=this[_0x2f5177(902)][_0x20d79b][_0x2f5177(1512)]?(this[_0x2f5177(902)][_0x20d79b][_0x2f5177(1512)]["SR_DelSubPort"](this[_0x2f5177(902)][_0x20d79b][_0x2f5177(1305)]),this[_0x2f5177(902)][_0x20d79b][_0x2f5177(1305)]=this[_0x2f5177(902)][_0x20d79b]["pRender"][_0x2f5177(856)](_0x29f922)):console[_0x2f5177(786)](_0x2f5177(492),_0x2f5177(657)),1}},{key:"FEC_GetPort",value:function(_0x2fba64,_0x5bdd69){var _0x74d1c0=_0x2d57cf;if((_0xe316b8==_0x2fba64||_0x1f6e6c==_0x2fba64)&&_0x5f5896==_0x5bdd69)return this[_0x74d1c0(752)]=_0x595075,-1;if(_0x49644c==_0x2fba64&&_0x2d4d8d==_0x5bdd69)return this[_0x74d1c0(752)]=_0x595075,-1;if(_0x49644c==_0x2fba64&&_0x1dda95==_0x5bdd69)return this[_0x74d1c0(752)]=_0x595075,-1;if((_0xe316b8==_0x2fba64||_0x1f6e6c==_0x2fba64)&&_0x3c4369==_0x5bdd69)return this[_0x74d1c0(752)]=_0x595075,-1;if((_0xe316b8==_0x2fba64||_0x1f6e6c==_0x2fba64)&&_0x3cbd45==_0x5bdd69)return this[_0x74d1c0(752)]=_0x595075,-1;if(_0x49644c!=_0x2fba64&&_0xe316b8!=_0x2fba64&&_0x1f6e6c!=_0x2fba64)return this["FECErrorCode"]=MP_E_SUPPORT,-1;if(0!=_0x5bdd69&&_0x5bdd69!=_0x42421f&&_0x5bdd69!=_0x1aded7&&_0x5bdd69!=_0x182632&&_0x5bdd69!=_0x5f5896&&_0x5bdd69!=_0x32c6be&&_0x5bdd69!=_0x2d4d8d&&_0x5bdd69!=_0x1dda95&&_0x5bdd69!=_0x3dc3ec&&_0x5bdd69!=_0x3c4369&&_0x5bdd69!=_0x3cbd45)return this[_0x74d1c0(752)]=MP_E_SUPPORT,-1;for(var _0x3edf2c=0,_0x2c74b2=1;_0x2c74b2<32;_0x2c74b2++){if(this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(960)]&&this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(985)]!=_0x2fba64)return this["FECErrorCode"]=1303,-1;if(this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(960)]&&this["stFishEyeManager"][_0x2c74b2][_0x74d1c0(1490)]!=_0x42421f&&this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(1490)]!=_0x32c6be&&this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(1490)]!=_0x2d4d8d&&this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(1490)]!=_0x1dda95&&this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(1490)]!=_0x3dc3ec&&this[_0x74d1c0(902)][_0x2c74b2]["emCorrectType"]!=_0x3c4369&&this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(1490)]!=_0x3cbd45&&_0x5bdd69!=_0x42421f&&_0x5bdd69!=_0x32c6be&&_0x5bdd69!=_0x2d4d8d&&_0x5bdd69!=_0x1dda95&&_0x5bdd69!=_0x3dc3ec&&_0x5bdd69!=_0x3c4369&&_0x5bdd69!=_0x3cbd45)return this[_0x74d1c0(752)]=1304,-1;if(this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(960)]&&(this["stFishEyeManager"][_0x2c74b2][_0x74d1c0(1490)]==_0x42421f&&_0x5bdd69==_0x1aded7||this[_0x74d1c0(902)][_0x2c74b2]["emCorrectType"]==_0x1aded7&&_0x5bdd69==_0x42421f))return this[_0x74d1c0(752)]=1304,-1;if(_0x3cbd45==_0x5bdd69&&(this[_0x74d1c0(1324)][0][_0x74d1c0(612)]["fRadiusLeft"]<=-.5||0<this[_0x74d1c0(1324)][0]["stCycleParam"][_0x74d1c0(313)]||this["stFishParam"][0][_0x74d1c0(612)][_0x74d1c0(586)]<1||1.5<=this[_0x74d1c0(1324)][0][_0x74d1c0(612)][_0x74d1c0(586)]||this["stFishParam"][0][_0x74d1c0(612)]["fRadiusTop"]<=-.5||.4<=this["stFishParam"][0][_0x74d1c0(612)][_0x74d1c0(554)]||this["stFishParam"][0][_0x74d1c0(612)]["fRadiusBottom"]<=.6||1.5<=this["stFishParam"][0][_0x74d1c0(612)][_0x74d1c0(550)]||this[_0x74d1c0(1324)][0][_0x74d1c0(612)][_0x74d1c0(313)]+this[_0x74d1c0(1324)][0][_0x74d1c0(612)][_0x74d1c0(586)]<=.8||1.2<=this["stFishParam"][0][_0x74d1c0(612)][_0x74d1c0(313)]+this["stFishParam"][0][_0x74d1c0(612)][_0x74d1c0(586)]||this[_0x74d1c0(1324)][0][_0x74d1c0(612)][_0x74d1c0(554)]+this[_0x74d1c0(1324)][0][_0x74d1c0(612)][_0x74d1c0(550)]<=.8||1.2<=this[_0x74d1c0(1324)][0]["stCycleParam"]["fRadiusTop"]+this["stFishParam"][0]["stCycleParam"][_0x74d1c0(550)]))return this[_0x74d1c0(752)]=_0x5defd8,-1}for(_0x2c74b2=1;_0x2c74b2<32;_0x2c74b2++)if(0==this["stFishEyeManager"][_0x2c74b2][_0x74d1c0(1404)]&&0==this[_0x74d1c0(902)][_0x2c74b2]["bUsed"]){this["stFishEyeManager"][_0x2c74b2][_0x74d1c0(1404)]=_0x2c74b2,this[_0x74d1c0(902)][_0x3edf2c][_0x74d1c0(1305)]=-1,this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(960)]=1,this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(985)]=_0x2fba64,this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(1490)]=_0x5bdd69,_0x3edf2c=_0x2c74b2;break}if(32==_0x2c74b2)return this[_0x74d1c0(752)]=1284,-1;var _0x5d2bbf=this[_0x74d1c0(1457)](this[_0x74d1c0(902)][_0x3edf2c][_0x74d1c0(985)],this[_0x74d1c0(902)][_0x3edf2c][_0x74d1c0(1490)]);return _0x4e9094[_0x74d1c0(677)]!=_0x5d2bbf?(0==this[_0x74d1c0(902)][_0x3edf2c][_0x74d1c0(761)]&&(this["stFishEyeManager"][_0x3edf2c][_0x74d1c0(776)]=_0x5d2bbf,this[_0x74d1c0(902)][_0x3edf2c][_0x74d1c0(761)]=0,this["stFishParam"][_0x3edf2c]["fZoom"]=.005,this[_0x74d1c0(1324)][_0x3edf2c][_0x74d1c0(1458)][_0x74d1c0(989)]=.5,this[_0x74d1c0(1324)][_0x3edf2c][_0x74d1c0(1458)][_0x74d1c0(1357)]=.5,this[_0x74d1c0(1324)][_0x3edf2c]["fWideScanOffset"]=0),this["FECErrorCode"]=0,this["subPortNum"]++,_0x2c74b2):_0x3edf2c<32&&0==this[_0x74d1c0(902)][_0x3edf2c][_0x74d1c0(761)]?(this[_0x74d1c0(902)][_0x3edf2c]["emEffect"]=_0x5d2bbf,this[_0x74d1c0(902)][_0x3edf2c][_0x74d1c0(761)]=0,this[_0x74d1c0(1324)][_0x3edf2c][_0x74d1c0(1580)]=0,this[_0x74d1c0(1324)][_0x3edf2c][_0x74d1c0(1458)][_0x74d1c0(989)]=0,this[_0x74d1c0(1324)][_0x3edf2c][_0x74d1c0(1458)][_0x74d1c0(1357)]=0,this[_0x74d1c0(1324)][_0x3edf2c][_0x74d1c0(545)]=0,this[_0x74d1c0(752)]=0,this[_0x74d1c0(723)]++,_0x2c74b2):(this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(1512)]=null,this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(1404)]=0,this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(352)]="",this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(960)]=0,this[_0x74d1c0(902)][_0x2c74b2]["bInit"]=0,this["stFishEyeManager"][_0x2c74b2][_0x74d1c0(1305)]=0,this[_0x74d1c0(902)][_0x2c74b2][_0x74d1c0(985)]=_0x1f6e6c,this[_0x74d1c0(902)][_0x2c74b2]["emCorrectType"]=_0x58c99c,this[_0x74d1c0(902)][_0x2c74b2]["emEffect"]=_0x4e9094[_0x74d1c0(677)],this["FECErrorCode"]=_0x595075,-1)}},{key:_0x2d57cf(1015),value:function(_0x2d5141){var _0x83b7f8=_0x2d57cf;return null!==this["stFishEyeManager"][_0x2d5141][_0x83b7f8(1512)]&&(this[_0x83b7f8(752)]=1301,returnmpCtrlDefine[_0x83b7f8(1275)]),null==this[_0x83b7f8(902)][_0x2d5141][_0x83b7f8(1512)]&&(this[_0x83b7f8(902)][_0x2d5141][_0x83b7f8(1512)]=new _0x39092a,this[_0x83b7f8(902)][_0x2d5141][_0x83b7f8(1512)]["SR_SetFishParamManager"](this[_0x83b7f8(429)])),1}},{key:_0x2d57cf(1145),value:function(_0x35dc19,_0x504916){var _0x4ed692=_0x2d57cf;if(null==this[_0x4ed692(902)][_0x35dc19][_0x4ed692(1512)])return this[_0x4ed692(752)]=_0x30b0bf;if(_0x35dc19<1||31<_0x35dc19)return this[_0x4ed692(752)]=1298;if(0==this[_0x4ed692(902)][_0x35dc19][_0x4ed692(960)])return this[_0x4ed692(752)]=_0x3f04b0;if(null==_0x504916)return this["FECErrorCode"]=1305;if(0==this[_0x4ed692(902)][_0x35dc19][_0x4ed692(1404)]||0==this[_0x4ed692(902)][_0x35dc19][_0x4ed692(960)])return this[_0x4ed692(752)]=_0x3f04b0;if(0!=this[_0x4ed692(902)][_0x35dc19][_0x4ed692(761)]&&null!=this[_0x4ed692(902)][_0x35dc19][_0x4ed692(352)])return _0x504916!=this[_0x4ed692(902)][_0x35dc19][_0x4ed692(352)]?this[_0x4ed692(752)]=1286:1;SR_DE_FISH_ORIGINAL;var _0x94fd6=this[_0x4ed692(1457)](this[_0x4ed692(902)][_0x35dc19][_0x4ed692(985)],this[_0x4ed692(902)][_0x35dc19][_0x4ed692(1490)]),_0x1464d5=this[_0x4ed692(902)][_0x35dc19][_0x4ed692(1512)][_0x4ed692(1483)](_0x504916);return this[_0x4ed692(902)][_0x35dc19]["nValidSubPort"]=this[_0x4ed692(902)][_0x35dc19][_0x4ed692(1512)]["SR_AddSubPort"](_0x94fd6),_0x4780dc[_0x4ed692(593)]!=_0x1464d5||_0x4780dc[_0x4ed692(593)]!=retSASP?(this[_0x4ed692(902)][_0x35dc19]["bInited"]=0,this["stFishEyeManager"][_0x35dc19]["sCanvasID"]=null,this[_0x4ed692(752)]=_0x3f04b0):(this[_0x4ed692(902)][_0x35dc19][_0x4ed692(761)]=1,this["stFishEyeManager"][_0x35dc19][_0x4ed692(352)]=_0x504916,_0x32c6be<=this["stFishEyeManager"][_0x35dc19]["emCorrectType"]&&(_0x94fd6=this[_0x4ed692(902)][_0x35dc19][_0x4ed692(1512)][_0x4ed692(924)](_0x11d463,0),_0x4780dc[_0x4ed692(593)]!=_0x94fd6&&console[_0x4ed692(1590)](_0x4ed692(487),_0x94fd6)),0<this[_0x4ed692(1346)]&&(this[_0x4ed692(902)][_0x35dc19][_0x4ed692(1512)][_0x4ed692(328)](this[_0x4ed692(1346)]),this["FECShowMode"]=0),1)}},{key:_0x2d57cf(1582),value:function(_0x3d090d,_0x193532,_0x5762fd){var _0x4a34cb=_0x2d57cf;return 0!=_0x3d090d&&(1==this["stFishEyeManager"][_0x3d090d][_0x4a34cb(761)]&&(_0x4780dc[_0x4a34cb(593)]==this[_0x4a34cb(902)][_0x3d090d][_0x4a34cb(1512)]["SR_DelSubPort"](this[_0x4a34cb(902)][_0x3d090d][_0x4a34cb(1305)])&&(this[_0x4a34cb(902)][_0x3d090d]["bInited"]=0,this[_0x4a34cb(902)][_0x3d090d][_0x4a34cb(1305)]=-1),this[_0x4a34cb(902)][_0x3d090d][_0x4a34cb(1512)][_0x4a34cb(1577)]()),this["stFishEyeManager"][_0x3d090d][_0x4a34cb(1512)]=null,this[_0x4a34cb(902)][_0x3d090d]["nSubPort"]=0,this[_0x4a34cb(902)][_0x3d090d][_0x4a34cb(352)]="",this["stFishEyeManager"][_0x3d090d][_0x4a34cb(960)]=0,this[_0x4a34cb(902)][_0x3d090d][_0x4a34cb(1033)]=0,this[_0x4a34cb(902)][_0x3d090d][_0x4a34cb(1305)]=0,this[_0x4a34cb(902)][_0x3d090d][_0x4a34cb(985)]=_0x1f6e6c,this[_0x4a34cb(902)][_0x3d090d][_0x4a34cb(1490)]=_0x58c99c,this["stFishEyeManager"][_0x3d090d]["emEffect"]=_0x4e9094["SR_DE_FISH_ORIGINAL"]),1}},{key:"FEC_DelPort",value:function(_0x255ee1){var _0x468d7c=_0x2d57cf;if(0!=_0x255ee1){if(_0x255ee1<1||31<_0x255ee1)return this[_0x468d7c(752)]=1298;if(0==this["stFishEyeManager"][_0x255ee1][_0x468d7c(960)])return this["FECErrorCode"]=_0x3f04b0;this["stFishParam"][_0x255ee1][_0x468d7c(612)][_0x468d7c(313)]=0,this[_0x468d7c(1324)][_0x255ee1][_0x468d7c(612)][_0x468d7c(586)]=1,this[_0x468d7c(1324)][_0x255ee1][_0x468d7c(612)]["fRadiusTop"]=0,this[_0x468d7c(1324)][_0x255ee1][_0x468d7c(612)]["fRadiusBottom"]=1,this[_0x468d7c(752)]=0,(this[_0x468d7c(1346)]=0)<this[_0x468d7c(723)]&&this["subPortNum"]--}return 1}},{key:_0x2d57cf(671),value:function(_0x2e03f5,_0x293a4c){var _0x28c4b8=_0x2d57cf;if(this["FECErrorCode"]=0,null==this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1512)])return this["FECErrorCode"]=_0x30b0bf;if(0==this["stFishEyeManager"][_0x2e03f5][_0x28c4b8(960)])return this[_0x28c4b8(752)]=_0x3f04b0;if(this[_0x28c4b8(902)][_0x2e03f5]["emCorrectType"]>=_0x32c6be&&this["stFishEyeManager"][_0x2e03f5]["emCorrectType"]<=_0x3cbd45&&30&_0x293a4c["upDateType"])return this[_0x28c4b8(752)]=_0x2820eb;if(_0x393e2c&_0x293a4c[_0x28c4b8(457)]){if(null==_0x293a4c[_0x28c4b8(612)])return _0x5defd8;for(var _0x4fb686=1;_0x4fb686<32;_0x4fb686++){if(this[_0x28c4b8(902)][_0x4fb686]["bUsed"]&&this["stFishEyeManager"][_0x4fb686][_0x28c4b8(1404)]&&_0x3c4369==this[_0x28c4b8(902)][_0x4fb686][_0x28c4b8(1490)]&&(_0x293a4c[_0x28c4b8(612)][_0x28c4b8(313)]<=-.5||.4<=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(313)]||_0x293a4c[_0x28c4b8(612)][_0x28c4b8(586)]<=.6||1.5<=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(586)]||_0x293a4c[_0x28c4b8(612)][_0x28c4b8(554)]<=-.5||0<_0x293a4c["stCycleParam"][_0x28c4b8(554)]||_0x293a4c[_0x28c4b8(612)][_0x28c4b8(550)]<1||1.5<=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(550)]||_0x293a4c[_0x28c4b8(612)][_0x28c4b8(313)]+_0x293a4c[_0x28c4b8(612)][_0x28c4b8(586)]<=.8||1.2<=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(313)]+_0x293a4c[_0x28c4b8(612)][_0x28c4b8(586)]||_0x293a4c[_0x28c4b8(612)][_0x28c4b8(554)]+_0x293a4c[_0x28c4b8(612)][_0x28c4b8(550)]<=.8||1.2<=_0x293a4c["stCycleParam"]["fRadiusTop"]+_0x293a4c[_0x28c4b8(612)]["fRadiusBottom"]))return this[_0x28c4b8(752)]=_0x5defd8;if(this[_0x28c4b8(902)][_0x4fb686][_0x28c4b8(960)]&&this[_0x28c4b8(902)][_0x4fb686][_0x28c4b8(1404)]&&_0x3cbd45==this["stFishEyeManager"][_0x4fb686][_0x28c4b8(1490)]&&(_0x293a4c[_0x28c4b8(612)][_0x28c4b8(313)]<=-.5||0<_0x293a4c["stCycleParam"][_0x28c4b8(313)]||_0x293a4c[_0x28c4b8(612)]["fRadiusRight"]<1||1.5<=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(586)]||_0x293a4c[_0x28c4b8(612)]["fRadiusTop"]<=-.5||.4<=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(554)]||_0x293a4c[_0x28c4b8(612)][_0x28c4b8(550)]<=.6||1.5<=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(550)]||_0x293a4c["stCycleParam"]["fRadiusLeft"]+_0x293a4c[_0x28c4b8(612)][_0x28c4b8(586)]<=.8||1.2<=_0x293a4c["stCycleParam"]["fRadiusLeft"]+_0x293a4c[_0x28c4b8(612)][_0x28c4b8(586)]||_0x293a4c[_0x28c4b8(612)]["fRadiusTop"]+_0x293a4c[_0x28c4b8(612)][_0x28c4b8(550)]<=.8||1.2<=_0x293a4c["stCycleParam"]["fRadiusTop"]+_0x293a4c["stCycleParam"][_0x28c4b8(550)]))return this[_0x28c4b8(752)]=_0x5defd8}}if(0==this["stFishEyeManager"][_0x2e03f5][_0x28c4b8(761)]){if(_0x55094c&_0x293a4c[_0x28c4b8(457)]){if(_0x1aded7!=this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1490)]&&_0x182632!=this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1490)]||_0x49644c==this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(985)])return this["FECErrorCode"]=_0x2820eb;for(var _0x2289c3=1;_0x2289c3<32;_0x2289c3++)if(this["stFishEyeManager"][_0x2289c3][_0x28c4b8(1404)]&&this[_0x28c4b8(902)][_0x2289c3][_0x28c4b8(960)]&&this[_0x28c4b8(902)][_0x2289c3][_0x28c4b8(1490)]==_0x42421f)return this[_0x28c4b8(752)]=_0x23c904;this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(545)]=_0x293a4c[_0x28c4b8(1303)]}if(_0x3183c9&_0x293a4c[_0x28c4b8(457)]){if(null==_0x293a4c[_0x28c4b8(1208)])return _0x5defd8;if(255<_0x293a4c[_0x28c4b8(1208)]["nR"]||255<_0x293a4c["stPTZColor"]["nG"]||255<_0x293a4c["stPTZColor"]["nB"]||255<_0x293a4c[_0x28c4b8(1208)][_0x28c4b8(991)])return this[_0x28c4b8(752)]=_0x2820eb;this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(1208)]["nR"]=_0x293a4c[_0x28c4b8(1208)]["nR"],this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(1208)]["nG"]=_0x293a4c[_0x28c4b8(1208)]["nG"],this["stFishParam"][_0x2e03f5][_0x28c4b8(1208)]["nB"]=_0x293a4c[_0x28c4b8(1208)]["nB"],this[_0x28c4b8(1324)][_0x2e03f5]["stPTZColor"]["nAlpha"]=_0x293a4c["stPTZColor"][_0x28c4b8(991)]}if(_0x2dc1c&_0x293a4c[_0x28c4b8(457)]){if(_0x42421f!=this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1490)])return this[_0x28c4b8(752)]=_0x2820eb;this["stFishParam"][_0x2e03f5][_0x28c4b8(1458)]["fPTZPositionX"]=_0x293a4c["fPTZParam"][_0x28c4b8(989)],this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(1458)][_0x28c4b8(1357)]=_0x293a4c[_0x28c4b8(626)][_0x28c4b8(1357)]}if(_0x3b18af&_0x293a4c["upDateType"]){if(_0x42421f!=this["stFishEyeManager"][_0x2e03f5][_0x28c4b8(1490)])return this[_0x28c4b8(752)]=_0x2820eb;this[_0x28c4b8(1324)][_0x2e03f5]["fZoom"]=_0x293a4c[_0x28c4b8(431)]}if(_0x1473f8&_0x293a4c["upDateType"]){if(null==this["stFishParam"][_0x28c4b8(750)])return _0x2820eb;if(_0x42421f!=this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1490)])return this[_0x28c4b8(752)]=_0x2820eb;this["stFishParam"][_0x28c4b8(750)][_0x28c4b8(322)]=_0x293a4c[_0x28c4b8(750)]["fTop"],this["stFishParam"][_0x28c4b8(750)][_0x28c4b8(1209)]=_0x293a4c["stPTZSelect"][_0x28c4b8(1209)],this["stFishParam"][_0x28c4b8(750)][_0x28c4b8(1575)]=_0x293a4c["stPTZSelect"][_0x28c4b8(1575)],this["stFishParam"][_0x28c4b8(750)][_0x28c4b8(518)]=_0x293a4c["stPTZSelect"][_0x28c4b8(518)]}if(_0x393e2c&_0x293a4c[_0x28c4b8(457)]){if(null==_0x293a4c[_0x28c4b8(612)])return _0x5defd8;if(0==this[_0x28c4b8(1094)](_0x293a4c[_0x28c4b8(612)]))return this[_0x28c4b8(752)]=_0x5defd8;this[_0x28c4b8(1324)][0][_0x28c4b8(612)][_0x28c4b8(313)]=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(313)],this[_0x28c4b8(1324)][0][_0x28c4b8(612)][_0x28c4b8(586)]=_0x293a4c[_0x28c4b8(612)]["fRadiusRight"],this["stFishParam"][0]["stCycleParam"][_0x28c4b8(554)]=_0x293a4c[_0x28c4b8(612)]["fRadiusTop"],this["stFishParam"][0][_0x28c4b8(612)][_0x28c4b8(550)]=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(550)]}return 1}if(_0x55094c&_0x293a4c["upDateType"]){if(_0x1aded7!=this[_0x28c4b8(902)][_0x2e03f5]["emCorrectType"]&&_0x182632!=this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1490)]||_0x49644c==this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(985)])return this[_0x28c4b8(752)]=_0x2820eb;for(var _0x11e95e=1;_0x11e95e<32;_0x11e95e++)if(this[_0x28c4b8(902)][_0x11e95e][_0x28c4b8(1404)]&&this["stFishEyeManager"][_0x11e95e][_0x28c4b8(960)]&&this[_0x28c4b8(902)][_0x11e95e][_0x28c4b8(1490)]==_0x42421f)return this[_0x28c4b8(752)]=_0x23c904;var _0xf74431={};if(_0xf74431[_0x28c4b8(572)]=_0x305d9a,_0xf74431["bBlack"]=0,_0xf74431[_0x28c4b8(1485)]=_0x293a4c[_0x28c4b8(1303)],_0x4780dc["SR_OK"]!=this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1512)][_0x28c4b8(412)](_0xf74431))return this["FECErrorCode"]=_0x23c904;this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(545)]=_0x293a4c[_0x28c4b8(1303)]}if(_0x3183c9&_0x293a4c[_0x28c4b8(457)]){if(null==_0x293a4c[_0x28c4b8(1208)])return _0x2820eb;if(255<_0x293a4c[_0x28c4b8(1208)]["nR"]||255<_0x293a4c[_0x28c4b8(1208)]["nG"]||255<_0x293a4c[_0x28c4b8(1208)]["nB"]||255<_0x293a4c[_0x28c4b8(1208)][_0x28c4b8(991)])return this[_0x28c4b8(752)]=_0x2820eb;_0xf74431={},_0xf74431["fR"]=float(_0x293a4c["stPTZColor"]["nR"]/255),_0xf74431["fG"]=float(_0x293a4c[_0x28c4b8(1208)]["nG"]/255),_0xf74431["fB"]=float(_0x293a4c[_0x28c4b8(1208)]["nB"]/255),_0xf74431["fA"]=float(_0x293a4c[_0x28c4b8(1208)][_0x28c4b8(991)]/255),this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(1208)]["nR"]=_0x293a4c["stPTZColor"]["nR"],this["stFishParam"][_0x2e03f5]["stPTZColor"]["nG"]=_0x293a4c["stPTZColor"]["nG"],this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(1208)]["nB"]=_0x293a4c[_0x28c4b8(1208)]["nB"],this[_0x28c4b8(1324)][_0x2e03f5]["stPTZColor"][_0x28c4b8(991)]=_0x293a4c["stPTZColor"][_0x28c4b8(991)]}if(_0x2dc1c&_0x293a4c[_0x28c4b8(457)]){if(_0x42421f!=this[_0x28c4b8(902)][_0x2e03f5]["emCorrectType"])return this["FECErrorCode"]=_0x2820eb;_0xf74431={};if(_0xf74431[_0x28c4b8(572)]=_0xbfab18,_0xf74431[_0x28c4b8(368)]=0,_0xf74431["fPTZX"]=_0x293a4c[_0x28c4b8(626)][_0x28c4b8(989)],_0xf74431[_0x28c4b8(660)]=_0x293a4c[_0x28c4b8(626)][_0x28c4b8(1357)],_0x4780dc[_0x28c4b8(593)]!=this["stFishEyeManager"][_0x2e03f5]["pRender"][_0x28c4b8(412)](_0xf74431))return this["FECErrorCode"]=_0x23c904;this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(1458)]["fPTZPositionX"]=_0x293a4c["fPTZParam"]["fPTZPositionX"],this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(1458)][_0x28c4b8(1357)]=_0x293a4c[_0x28c4b8(626)][_0x28c4b8(1357)]}if(_0x3b18af&_0x293a4c[_0x28c4b8(457)]){if(_0x42421f!=this["stFishEyeManager"][_0x2e03f5]["emCorrectType"])return this[_0x28c4b8(752)]=_0x2820eb;_0xf74431={};if(_0xf74431[_0x28c4b8(572)]=_0x55fbf0,_0xf74431[_0x28c4b8(368)]=0,_0xf74431[_0x28c4b8(1580)]=_0x293a4c[_0x28c4b8(431)],_0x4780dc["SR_OK"]!=this[_0x28c4b8(902)][_0x2e03f5]["pRender"][_0x28c4b8(412)](_0xf74431))return this["FECErrorCode"]=_0x23c904;this[_0x28c4b8(1324)][_0x2e03f5][_0x28c4b8(1580)]=_0x293a4c[_0x28c4b8(431)]}if(_0x393e2c&_0x293a4c["upDateType"]){if(0==this[_0x28c4b8(1094)](_0x293a4c[_0x28c4b8(612)]))return this["FECErrorCode"]=_0x5defd8;_0xf74431={};if(_0xf74431["nFishParamType"]=_0x39b681,_0xf74431[_0x28c4b8(368)]=1,_0xf74431[_0x28c4b8(473)]=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(313)],_0xf74431[_0x28c4b8(919)]=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(586)],_0xf74431[_0x28c4b8(1171)]=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(554)],_0xf74431["fRYBottom"]=_0x293a4c["stCycleParam"][_0x28c4b8(550)],_0x4780dc[_0x28c4b8(593)]!=this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1512)]["SR_SetFishParam"](this[_0x28c4b8(902)][_0x2e03f5]["nValidSubPort"],_0xf74431))return this["FECErrorCode"]=_0x5defd8;this[_0x28c4b8(1324)][0][_0x28c4b8(612)]["fRadiusLeft"]=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(313)],this[_0x28c4b8(1324)][0][_0x28c4b8(612)][_0x28c4b8(586)]=_0x293a4c[_0x28c4b8(612)][_0x28c4b8(586)],this[_0x28c4b8(1324)][0][_0x28c4b8(612)]["fRadiusTop"]=_0x293a4c["stCycleParam"][_0x28c4b8(554)],this[_0x28c4b8(1324)][0][_0x28c4b8(612)][_0x28c4b8(550)]=_0x293a4c["stCycleParam"][_0x28c4b8(550)]}return _0x1473f8&_0x293a4c[_0x28c4b8(457)]&&_0x42421f==this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1490)]&&_0x4780dc[_0x28c4b8(593)]!=this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(1512)][_0x28c4b8(412)](this[_0x28c4b8(902)][_0x2e03f5][_0x28c4b8(750)])?this["FECErrorCode"]=1299:1}},{key:"IsValidRadiusParam",value:function(_0x2f11ca){var _0x4e646b=_0x2d57cf;return _0x2f11ca["fRadiusBottom"]<=_0x2f11ca[_0x4e646b(554)]||_0x2f11ca[_0x4e646b(586)]<=_0x2f11ca[_0x4e646b(313)]?0:1}},{key:"FEC_SetViewParam",value:function(_0x5646e9,_0xfd7ca7,_0x353c96){var _0x50d564=_0x2d57cf;return _0xfd7ca7<_0x178e93||_0x2b582f<_0xfd7ca7?this[_0x50d564(752)]=_0x1e0258:(this[_0x50d564(752)]=0,null==this["stFishEyeManager"][_0x5646e9]["pRender"]?this[_0x50d564(752)]=_0x30b0bf:0==this[_0x50d564(902)][_0x5646e9][_0x50d564(761)]?this[_0x50d564(752)]=_0x3f04b0:_0x32c6be<=this[_0x50d564(902)][_0x5646e9][_0x50d564(1490)]?_0x4780dc[_0x50d564(593)]!=this[_0x50d564(902)][_0x5646e9][_0x50d564(1512)][_0x50d564(1294)](_0xfd7ca7,_0x353c96)?this["FECErrorCode"]=_0x1e0258:1:this[_0x50d564(752)]=_0x2820eb)}},{key:_0x2d57cf(1578),value:function(_0x4aed51,_0x4ba4a8){var _0x236351=_0x2d57cf;return!(_0x4ba4a8<1||3<_0x4ba4a8||0==this[_0x236351(902)][_0x4aed51][_0x236351(761)])&&_0x32c6be<=this["stFishEyeManager"][_0x4aed51][_0x236351(1490)]?this[_0x236351(902)][_0x4aed51][_0x236351(1512)][_0x236351(418)](_0x4ba4a8):-1}},{key:_0x2d57cf(1345),value:function(_0x2736b4,_0x5a717b,_0x21b8be,_0x47e444,_0x4d1a1f,_0xbfd4e6,_0x14c520){var _0x3b96f7=_0x2d57cf;return null==this[_0x3b96f7(902)][_0x2736b4][_0x3b96f7(1512)]?this[_0x3b96f7(752)]=_0x30b0bf:0!=_0x5a717b||0!=_0x21b8be?_0x1e0258:this[_0x3b96f7(902)][_0x2736b4]["emCorrectType"]!=_0x58c99c&&this[_0x3b96f7(902)][_0x2736b4][_0x3b96f7(1490)]!=_0x1aded7&&this[_0x3b96f7(902)][_0x2736b4][_0x3b96f7(1490)]!=_0x182632&&this["stFishEyeManager"][_0x2736b4]["emCorrectType"]!=_0x5f5896?_0x595075:0==this["stFishEyeManager"][_0x2736b4]["bInited"]?this[_0x3b96f7(752)]=_0x3f04b0:_0x47e444<0||_0x4d1a1f<0||_0xbfd4e6<0||_0x14c520<0?_0x1e0258:_0x4780dc[_0x3b96f7(593)]!=this[_0x3b96f7(902)][_0x2736b4][_0x3b96f7(1512)][_0x3b96f7(1166)](_0x47e444,_0x4d1a1f,_0xbfd4e6,_0x14c520)?this["FECErrorCode"]=1297:1}},{key:_0x2d57cf(1020),value:function(_0x335759,_0x1c8cad){var _0x4672f6=_0x2d57cf;return null==this[_0x4672f6(902)][_0x335759][_0x4672f6(1512)]?this[_0x4672f6(752)]=_0x30b0bf:0==this["stFishEyeManager"][_0x335759][_0x4672f6(761)]?this[_0x4672f6(752)]=_0x3f04b0:_0x4780dc[_0x4672f6(593)]!=this[_0x4672f6(902)][_0x335759][_0x4672f6(1512)][_0x4672f6(924)](_0x11d463,_0x1c8cad)?this[_0x4672f6(752)]=1297:1}},{key:"_ConvertDisplayEffect",value:function(_0x587f09,_0x45375e){var _0x1d473d=_0x2d57cf;switch(_0x587f09){case _0x49644c:return _0x42421f==_0x45375e?_0x4e9094["SR_DE_FISH_PTZ_WALL"]:_0x182632==_0x45375e||_0x5f5896==_0x45375e?_0x4e9094[_0x1d473d(1018)]:_0x32c6be==_0x45375e?_0x4e9094[_0x1d473d(1010)]:_0x3dc3ec==_0x45375e?_0x4e9094["SR_DE_FISH_PLANET"]:_0x3c4369==_0x45375e?_0x4e9094[_0x1d473d(1174)]:_0x3cbd45==_0x45375e?_0x4e9094[_0x1d473d(614)]:_0x4e9094[_0x1d473d(677)];case _0xe316b8:return _0x42421f==_0x45375e?_0x4e9094[_0x1d473d(474)]:_0x182632==_0x45375e?_0x4e9094[_0x1d473d(472)]:_0x1aded7==_0x45375e?_0x4e9094[_0x1d473d(1366)]:_0x5f5896==_0x45375e?_0x4e9094["SR_DE_FISH_PANORAMA_WALL"]:_0x32c6be==_0x45375e?_0x4e9094[_0x1d473d(1010)]:_0x2d4d8d==_0x45375e?_0x4e9094[_0x1d473d(405)]:_0x1dda95==_0x45375e?_0x4e9094[_0x1d473d(1139)]:_0x3dc3ec==_0x45375e?_0x4e9094[_0x1d473d(1262)]:_0x4e9094[_0x1d473d(677)];case _0x1f6e6c:return _0x42421f==_0x45375e?_0x4e9094[_0x1d473d(1282)]:_0x182632==_0x45375e?_0x4e9094[_0x1d473d(1379)]:_0x1aded7==_0x45375e?_0x4e9094["SR_DE_FISH_PANORAMA_CEILING_180"]:_0x5f5896==_0x45375e?_0x4e9094[_0x1d473d(1018)]:_0x32c6be==_0x45375e?_0x4e9094["SR_DE_FISH_SEMISPHERE"]:_0x2d4d8d==_0x45375e?_0x4e9094[_0x1d473d(364)]:_0x1dda95==_0x45375e?_0x4e9094[_0x1d473d(414)]:_0x3dc3ec==_0x45375e?_0x4e9094[_0x1d473d(1262)]:_0x4e9094[_0x1d473d(677)];default:return _0x4e9094["SR_DE_FISH_ORIGINAL"]}}}]),_0x5acb8f}(),_0x38fb29=function(){var _0x2bd020=_0x372e98;function _0x12564a(){var _0x3b3157=a0_0x5477;_0x56ad3b(this,_0x12564a),this[_0x3b3157(491)]=0,this[_0x3b3157(587)]=0,this[_0x3b3157(745)]=0,this[_0x3b3157(1274)]=0,this[_0x3b3157(606)]=0}return _0x5dd832(_0x12564a,[{key:_0x2bd020(577),value:function(){var _0x559309=_0x2bd020;this["startTime"]=this[_0x559309(687)]()}},{key:_0x2bd020(687),value:function(){var _0x5c2960=_0x2bd020;return this[_0x5c2960(587)]=60*(new Date)[_0x5c2960(697)]()*60*1e3+60*(new Date)[_0x5c2960(721)]()*1e3+1e3*(new Date)["getSeconds"]()+(new Date)[_0x5c2960(1216)](),this[_0x5c2960(1274)]=(new Date)[_0x5c2960(734)](),this[_0x5c2960(587)]}},{key:_0x2bd020(536),value:function(){var _0x785a9b=_0x2bd020,_0x278a37=this[_0x785a9b(687)]()-this[_0x785a9b(491)];return this[_0x785a9b(1274)]!==(new Date)[_0x785a9b(734)]()&&(_0x278a37+=24*((new Date)["getDate"]()-this["lastDate"])*60*60*1e3),_0x278a37}},{key:"timerReset",value:function(){var _0x3d83ed=_0x2bd020;this["startTime"]=0,this[_0x3d83ed(587)]=0,this[_0x3d83ed(745)]=0,this[_0x3d83ed(1274)]=0,this["preTimerStamp"]=0}}]),_0x12564a}(),_0x4f4531=function(){var _0x5deccb=_0x372e98;function _0x466b48(){var _0xfa02a1=a0_0x5477,_0x35939b=0<arguments[_0xfa02a1(525)]&&void 0!==arguments[0]?arguments[0]:null;_0x56ad3b(this,_0x466b48),this[_0xfa02a1(863)]=null,this[_0xfa02a1(1326)]=0,this[_0xfa02a1(857)]=null,this[_0xfa02a1(1215)]=null,this[_0xfa02a1(1569)]=[],this["initTimer"]=!1,this[_0xfa02a1(1133)]=0,this["baseTimeStamp"]=0,this["resetTimer"]=!0,this["RenderFrame"]=this[_0xfa02a1(1141)][_0xfa02a1(979)](this),this["renderCurStatus"]=2,this[_0xfa02a1(1147)]=1,this[_0xfa02a1(555)]=1,this[_0xfa02a1(1498)]=14,this[_0xfa02a1(949)]=!1,this[_0xfa02a1(942)]=!0,this["getImageType"]="",this["getImageJPEG"]=!1,this[_0xfa02a1(1302)]=!1,this[_0xfa02a1(1501)]=0,this[_0xfa02a1(526)]=0,this[_0xfa02a1(1424)]=null,this[_0xfa02a1(1254)]=[],this["curFrameInfo"]={},this[_0xfa02a1(1030)][_0xfa02a1(432)]=0,this["sx"]=0,this["sy"]=0,this["sw"]=0,this["sh"]=0,this[_0xfa02a1(595)]=!1,this[_0xfa02a1(980)]=!1,this[_0xfa02a1(1295)]=!0,this[_0xfa02a1(704)]=null,this[_0xfa02a1(1048)]=0,this[_0xfa02a1(1246)]=this[_0xfa02a1(1501)]*this[_0xfa02a1(526)]*3/2,this[_0xfa02a1(703)]=!0,(this[_0xfa02a1(1376)]=null)!=_0x35939b&&(this[_0xfa02a1(1376)]=_0x35939b),this[_0xfa02a1(1264)]=_0xfa02a1(1258),this[_0xfa02a1(774)]=null}return _0x5dd832(_0x466b48,[{key:_0x5deccb(520),value:function(_0x54cb2e,_0xc6568f,_0xf39424,_0x576b19){var _0x23a23b=_0x5deccb;this[_0x23a23b(863)]=_0x54cb2e,this["streamOpenMode"]=_0xc6568f,this["renderEngine"]=_0x576b19,this[_0x23a23b(774)]=new _0x58f0d9,this["oVideoRender"][_0x23a23b(1480)](this[_0x23a23b(863)],this[_0x23a23b(1264)]),this["SetCurStatus"](2),null==this[_0x23a23b(1215)]&&(this[_0x23a23b(1215)]=new _0x23142c(_0xf39424,this,this[_0x23a23b(1376)]),this[_0x23a23b(1569)]=this["oVideoDecoder"][_0x23a23b(1113)],null!==this[_0x23a23b(1215)]&&this[_0x23a23b(1215)][_0x23a23b(1271)]()),null==this[_0x23a23b(704)]&&(this[_0x23a23b(704)]=new _0x38fb29)}},{key:"HardDecodeError",value:function(){var _0x173776=_0x5deccb;this[_0x173776(1376)][_0x173776(806)](),this["player"][_0x173776(682)](0),this[_0x173776(1376)][_0x173776(772)]()}},{key:_0x5deccb(1545),value:function(_0x4a70a6,_0x465ba5){var _0x405c91=_0x5deccb,_0x58ea25={};_0x58ea25[_0x405c91(798)]=_0x465ba5["port"],_0x58ea25["codecType"]=_0x465ba5[_0x405c91(714)],_0x58ea25["frameType"]=_0x465ba5[_0x405c91(952)],_0x58ea25[_0x405c91(1119)]=_0x465ba5["frameSize"],_0x58ea25["width"]=_0x465ba5["width"],_0x58ea25["height"]=_0x465ba5[_0x405c91(1384)],_0x58ea25["timeStamp"]=_0x465ba5[_0x405c91(432)],_0x58ea25[_0x405c91(964)]=_0x465ba5[_0x405c91(964)],_0x58ea25[_0x405c91(666)]=_0x465ba5["frameNum"],_0x58ea25[_0x405c91(389)]=_0x465ba5["interlace"],_0x58ea25[_0x405c91(1070)]=_0x465ba5["streamEnd"],_0x58ea25["cropLeft"]=_0x465ba5[_0x405c91(1444)],_0x58ea25[_0x405c91(1552)]=_0x465ba5[_0x405c91(1552)],_0x58ea25["cropTop"]=_0x465ba5["cropTop"],_0x58ea25[_0x405c91(1429)]=_0x465ba5["cropBottom"],_0x58ea25[_0x405c91(628)]=_0x465ba5[_0x405c91(628)],_0x58ea25[_0x405c91(500)]=_0x465ba5[_0x405c91(500)],_0x58ea25[_0x405c91(727)]=_0x465ba5[_0x405c91(727)],_0x58ea25[_0x405c91(394)]=_0x465ba5[_0x405c91(394)],_0x58ea25[_0x405c91(1380)]=_0x465ba5["hour"],_0x58ea25[_0x405c91(1088)]=_0x465ba5["minute"],_0x58ea25[_0x405c91(939)]=_0x465ba5["second"],_0x58ea25[_0x405c91(1221)]=_0x465ba5["milliseconds"],this[_0x405c91(1254)][_0x405c91(962)](_0x58ea25),this[_0x405c91(1215)][_0x405c91(1545)](_0x4a70a6,_0x465ba5)}},{key:_0x5deccb(854),value:function(){var _0x4ef419=this;return new Promise(function(_0x2647ad,_0x366d5e){var _0x29364f=a0_0x5477;_0x4ef419[_0x29364f(1215)][_0x29364f(564)]()[_0x29364f(705)](function(){var _0x59cec1=_0x29364f;_0x4ef419[_0x59cec1(1254)][_0x59cec1(387)](0,_0x4ef419[_0x59cec1(1254)][_0x59cec1(525)]),_0x4ef419["curFrameInfo"]={},_0x4ef419["renderCurStatus"]=2,_0x4ef419[_0x59cec1(1376)]?_0x4ef419["player"][_0x59cec1(1103)]():postMessage({function:_0x59cec1(1123)}),_0x2647ad()},function(){_0x366d5e()})})}},{key:_0x5deccb(1446),value:function(){var _0x4c2dd6=_0x5deccb;this["initTimer"]=!1,this[_0x4c2dd6(1133)]=0,this["baseTimeStamp"]=0,this["resetTimer"]=!0,null!=this[_0x4c2dd6(704)]&&this[_0x4c2dd6(704)]["timerReset"](),this[_0x4c2dd6(1141)]=this[_0x4c2dd6(1141)][_0x4c2dd6(979)](this),this[_0x4c2dd6(1335)]=2,this[_0x4c2dd6(1418)]=0,this[_0x4c2dd6(879)]=null,this[_0x4c2dd6(1266)]=!1,this[_0x4c2dd6(1302)]=!1,this[_0x4c2dd6(595)]=!1,this["getCropImageBMP"]=!1,this["curFrameIsDisplay"]=!0,this[_0x4c2dd6(1424)]=null,this["displayFrameInfo"][_0x4c2dd6(387)](0,this[_0x4c2dd6(1254)]["length"]),this["curFrameInfo"]={}}},{key:_0x5deccb(722),value:function(){var _0x27da50=_0x5deccb,_0x1fb843=this;this[_0x27da50(1215)][_0x27da50(437)]()[_0x27da50(705)](function(){var _0xcd3cbb=_0x27da50;(_0x1fb843[_0xcd3cbb(1215)]=null)!=_0x1fb843[_0xcd3cbb(774)]&&(_0x1fb843[_0xcd3cbb(774)][_0xcd3cbb(785)](),_0x1fb843["oVideoRender"]=null),_0x1fb843[_0xcd3cbb(1446)](),_0x1fb843[_0xcd3cbb(704)]=null,console["log"](_0xcd3cbb(461)),_0x1fb843[_0xcd3cbb(1295)]=!1},function(){var _0x117b24=_0x27da50;console[_0x117b24(1590)](_0x117b24(1140))})}},{key:_0x5deccb(1141),value:function(){var _0x598b70=_0x5deccb,_0x1f4033,_0x1642a9,_0x202c45,_0x5a4aad=this;switch(this[_0x598b70(1335)]){case 0:this["_resetRenderTimer"](),this["_resetDecoder"]()[_0x598b70(705)](function(){setTimeout(function(){var _0x182bb0=a0_0x5477;_0x5a4aad[_0x182bb0(1141)]()},1)},function(){});break;case 2:this["displayRunning"]?(this[_0x598b70(879)]=this[_0x598b70(1272)](),-1==this[_0x598b70(1498)]||0==this[_0x598b70(1326)]?(null!=this["chosenFrame"]&&(this["curTimeStamp"]=this[_0x598b70(879)][_0x598b70(559)],this[_0x598b70(963)](this[_0x598b70(879)])),requestAnimationFrame(this[_0x598b70(1141)])):null!=this[_0x598b70(879)]?(this[_0x598b70(1364)]&&!this["resetTimer"]||(this[_0x598b70(704)][_0x598b70(577)](),this[_0x598b70(1364)]=!0,this["resetTimer"]=!1,this[_0x598b70(1133)]=this[_0x598b70(879)]["timestamp"],this[_0x598b70(1334)]=this[_0x598b70(879)]["timestamp"]),this[_0x598b70(1418)]=this["chosenFrame"][_0x598b70(559)],_0x1f4033=this[_0x598b70(1418)]-this[_0x598b70(1133)],_0x202c45=this["curTimeStamp"]-this[_0x598b70(1334)],(5e3<_0x1f4033||_0x1f4033<0||_0x202c45<0)&&(this[_0x598b70(704)][_0x598b70(577)](),this["preTimeStamp"]=this[_0x598b70(879)][_0x598b70(559)],this[_0x598b70(1334)]=this[_0x598b70(1418)]),(_0x1f4033=(this["curTimeStamp"]-this["baseTimeStamp"])/this["playSpeed"]-this[_0x598b70(704)][_0x598b70(536)]())<15&&-15<_0x1f4033?(this[_0x598b70(963)](this["chosenFrame"]),this[_0x598b70(1133)]=this[_0x598b70(1418)],this[_0x598b70(1141)]()):_0x1f4033<0?(setTimeout(this[_0x598b70(963)](this[_0x598b70(879)]),1),this["preTimeStamp"]=this[_0x598b70(1418)],this["RenderFrame"]()):_0x1642a9=setTimeout(function(){var _0x41708d=_0x598b70;2==_0x5a4aad["renderCurStatus"]?(_0x5a4aad[_0x41708d(963)](_0x5a4aad["chosenFrame"]),_0x5a4aad["preTimeStamp"]=_0x5a4aad[_0x41708d(1418)]):_0x5a4aad[_0x41708d(703)]=!1,_0x5a4aad[_0x41708d(1141)](),clearTimeout(_0x1642a9)},_0x1f4033-5)):(_0x202c45=5,2<this["playSpeed"]&&(_0x202c45=1),setTimeout(function(){var _0x51a63d=_0x598b70;_0x5a4aad[_0x51a63d(1141)]()},_0x202c45))):setTimeout(function(){var _0x5ef09a=_0x598b70;_0x5a4aad[_0x5ef09a(1141)]()},5);break;case 3:setTimeout(function(){var _0x12606c=_0x598b70;_0x5a4aad[_0x12606c(643)](),_0x5a4aad[_0x12606c(1141)]()},5);break;case 5:this["needForward"]&&(this[_0x598b70(879)]=this["chooseFrame"](),null!=this[_0x598b70(879)]&&setTimeout(function(){var _0x3f93ab=_0x598b70;_0x5a4aad[_0x3f93ab(963)](_0x5a4aad[_0x3f93ab(879)]),_0x5a4aad[_0x3f93ab(949)]=!1},1)),setTimeout(function(){var _0x1c571b=_0x598b70;_0x5a4aad[_0x1c571b(643)](),_0x5a4aad["RenderFrame"]()},5);break;case 4:return void this[_0x598b70(722)]();default:return}}},{key:"paint",value:function(_0x23b8b5){var _0x1331fd=_0x5deccb,_0x2a0398,_0x288b2c,_0x195c9b=this;4!=this[_0x1331fd(1447)]&&null!=_0x23b8b5&&(this[_0x1331fd(1048)]===_0x23b8b5[_0x1331fd(559)]&&(this["resetTimer"]=!0),null!=this[_0x1331fd(774)]&&(this[_0x1331fd(774)][_0x1331fd(700)](_0x23b8b5),null!==this[_0x1331fd(1424)]&&this[_0x1331fd(648)](_0x23b8b5["timestamp"]),(this[_0x1331fd(1266)]||this[_0x1331fd(1302)]||this[_0x1331fd(595)]||this[_0x1331fd(980)])&&(this[_0x1331fd(1501)]===_0x23b8b5[_0x1331fd(1501)]&&this[_0x1331fd(526)]==_0x23b8b5[_0x1331fd(526)]||(this["displayWidth"]=_0x23b8b5[_0x1331fd(1501)],this[_0x1331fd(526)]=_0x23b8b5[_0x1331fd(526)],this[_0x1331fd(1246)]=this[_0x1331fd(1501)]*this[_0x1331fd(526)]*3/2),_0x2a0398=new Uint8Array(this[_0x1331fd(1246)]),_0x288b2c=_0x23b8b5[_0x1331fd(959)],_0x23b8b5[_0x1331fd(685)](_0x2a0398)["then"](function(){var _0x4b2981=_0x1331fd;_0x195c9b[_0x4b2981(454)](_0x2a0398,_0x288b2c)})),this[_0x1331fd(942)]&&(null!=this[_0x1331fd(1376)]?null!=this["player"][_0x1331fd(409)]&&this[_0x1331fd(1376)][_0x1331fd(409)]():postMessage({function:"firstFrameCB",value:!0}),this["firstFrame"]=!1)))}},{key:_0x5deccb(648),value:function(_0x5501c7){var _0x2528f6=_0x5deccb;if(0!=this[_0x2528f6(1254)][_0x2528f6(525)]&&this[_0x2528f6(1030)][_0x2528f6(432)]!==_0x5501c7){for(var _0x3036eb={},_0x133e97=0;_0x133e97<this["displayFrameInfo"]["length"]&&(_0x3036eb=this[_0x2528f6(1254)]["shift"]())["timeStamp"]!=_0x5501c7;_0x133e97++);this[_0x2528f6(1030)][_0x2528f6(798)]=_0x3036eb["port"],this[_0x2528f6(1030)]["codecType"]=_0x3036eb["codecType"],this["curFrameInfo"][_0x2528f6(952)]=_0x3036eb[_0x2528f6(952)],this[_0x2528f6(1030)][_0x2528f6(1119)]=_0x3036eb[_0x2528f6(1119)],this[_0x2528f6(1030)][_0x2528f6(1454)]=_0x3036eb[_0x2528f6(1454)],this[_0x2528f6(1030)][_0x2528f6(1384)]=_0x3036eb[_0x2528f6(1384)],this["curFrameInfo"][_0x2528f6(432)]=_0x3036eb[_0x2528f6(432)],this["curFrameInfo"]["frameRate"]=_0x3036eb["frameRate"],this["curFrameInfo"][_0x2528f6(666)]=_0x3036eb[_0x2528f6(666)],this["curFrameInfo"][_0x2528f6(389)]=_0x3036eb[_0x2528f6(389)],this["curFrameInfo"][_0x2528f6(1070)]=_0x3036eb[_0x2528f6(1070)],this[_0x2528f6(1030)][_0x2528f6(1444)]=_0x3036eb[_0x2528f6(1444)],this[_0x2528f6(1030)][_0x2528f6(1552)]=_0x3036eb[_0x2528f6(1552)],this[_0x2528f6(1030)][_0x2528f6(633)]=_0x3036eb[_0x2528f6(633)],this[_0x2528f6(1030)][_0x2528f6(1429)]=_0x3036eb[_0x2528f6(1429)],this[_0x2528f6(1030)][_0x2528f6(628)]=_0x3036eb[_0x2528f6(628)],this[_0x2528f6(1030)][_0x2528f6(500)]=_0x3036eb[_0x2528f6(500)],this[_0x2528f6(1030)][_0x2528f6(727)]=_0x3036eb[_0x2528f6(727)],this["curFrameInfo"][_0x2528f6(394)]=_0x3036eb[_0x2528f6(394)],this[_0x2528f6(1030)][_0x2528f6(1380)]=_0x3036eb["hour"],this["curFrameInfo"]["minute"]=_0x3036eb[_0x2528f6(1088)],this[_0x2528f6(1030)]["second"]=_0x3036eb[_0x2528f6(939)],this[_0x2528f6(1030)][_0x2528f6(1221)]=_0x3036eb[_0x2528f6(1221)],this["displayFrameInfoCB"](this["curFrameInfo"])}}},{key:_0x5deccb(454),value:function(_0x459290,_0x5910cd){var _0x2f328f=_0x5deccb;this[_0x2f328f(1376)]?(this[_0x2f328f(1266)]&&(this["getImageJPEG"]=!1,this[_0x2f328f(1376)][_0x2f328f(625)](_0x459290,this[_0x2f328f(1246)],this[_0x2f328f(1501)],this[_0x2f328f(526)],"jpeg",_0x5910cd,0,0,0,0)),this[_0x2f328f(1302)]&&(this[_0x2f328f(1302)]=!1,this[_0x2f328f(1376)]["_GetImage2"](_0x459290,this[_0x2f328f(1246)],this[_0x2f328f(1501)],this[_0x2f328f(526)],_0x2f328f(1292),_0x5910cd,0,0,0,0)),this[_0x2f328f(595)]&&(this[_0x2f328f(595)]=!1,this[_0x2f328f(1376)][_0x2f328f(625)](_0x459290,this[_0x2f328f(1246)],this[_0x2f328f(1501)],this[_0x2f328f(526)],_0x2f328f(1239),_0x5910cd,this["sx"],this["sy"],this["sw"],this["sh"])),this[_0x2f328f(980)]&&(this[_0x2f328f(980)]=!1,this[_0x2f328f(1376)]["_GetImage2"](_0x459290,this[_0x2f328f(1246)],this["displayWidth"],this[_0x2f328f(526)],"bmp",_0x5910cd,this["sx"],this["sy"],this["sw"],this["sh"]))):(this["getImageJPEG"]&&(this[_0x2f328f(1266)]=!1,postMessage({function:_0x2f328f(934),value:_0x459290[_0x2f328f(1074)],size:this[_0x2f328f(1246)],width:this[_0x2f328f(1501)],height:this["displayHeight"],type:"jpeg",yuvType:_0x5910cd,sx:0,sy:0,sw:0,sh:0},[_0x459290[_0x2f328f(1074)]])),this[_0x2f328f(1302)]&&(this[_0x2f328f(1302)]=!1,postMessage({function:_0x2f328f(934),value:_0x459290[_0x2f328f(1074)],size:this["yuvLength"],width:this[_0x2f328f(1501)],height:this[_0x2f328f(526)],type:_0x2f328f(1292),yuvType:_0x5910cd,sx:0,sy:0,sw:0,sh:0},[_0x459290["buffer"]])),this["getCropImageJPEG"]&&(this[_0x2f328f(595)]=!1,postMessage({function:_0x2f328f(934),value:_0x459290[_0x2f328f(1074)],size:this[_0x2f328f(1246)],width:this["displayWidth"],height:this[_0x2f328f(526)],type:_0x2f328f(1239),yuvType:_0x5910cd,sx:this["sx"],sy:this["sy"],sw:this["sw"],sh:this["sh"]},[_0x459290["buffer"]])),this[_0x2f328f(980)]&&(this[_0x2f328f(980)]=!1,postMessage({function:_0x2f328f(934),value:_0x459290[_0x2f328f(1074)],size:this[_0x2f328f(1246)],width:this["displayWidth"],height:this["displayHeight"],type:"bmp",yuvType:_0x5910cd,sx:this["sx"],sy:this["sy"],sw:this["sw"],sh:this["sh"]},[_0x459290[_0x2f328f(1074)]])))}},{key:_0x5deccb(1272),value:function(){var _0x2c03bd=_0x5deccb,_0x35df36=this;if(1==this[_0x2c03bd(1326)]){if(this[_0x2c03bd(1569)][_0x2c03bd(525)]<2)return null}else{if(this["frameBuffers"][_0x2c03bd(525)]<1)return null}if(!this[_0x2c03bd(703)])return this[_0x2c03bd(703)]=!0,this[_0x2c03bd(1569)][0];{if(null!=this["chosenFrame"]&&(this["frameBuffers"][_0x2c03bd(1158)]()[_0x2c03bd(327)](),this[_0x2c03bd(879)][_0x2c03bd(327)](),this["chosenFrame"]=null),!this[_0x2c03bd(1215)]["decoderObjNeedReset"])return this[_0x2c03bd(1569)][_0x2c03bd(525)]<1?null:this[_0x2c03bd(1569)][0];this["oVideoDecoder"]["resetDecoder"]()["then"](function(){var _0x2292ae=_0x2c03bd;return _0x35df36["oVideoDecoder"][_0x2292ae(503)]=!1,null},function(){return null})}}},{key:_0x5deccb(1053),value:function(_0x515fcb,_0x5a6cb8,_0xba23e5,_0x33ba80){var _0x1321d2=_0x5deccb;return null==this[_0x1321d2(774)]?0:(this["sx"]=_0x515fcb,this["sy"]=_0x5a6cb8,this["sw"]=_0xba23e5,this["sh"]=_0x33ba80,this["oVideoRender"][_0x1321d2(399)](_0x515fcb,_0x5a6cb8,_0xba23e5,_0x33ba80))}},{key:"SetCurStatus",value:function(_0x109826){this["renderCurStatus"]=_0x109826}},{key:"fast",value:function(){var _0x27b8e3=_0x5deccb,_0x124cb4=this[_0x27b8e3(862)](this[_0x27b8e3(555)]);return this["_SetPlaySpeed"](_0x124cb4)}},{key:_0x5deccb(1207),value:function(){var _0x221534=_0x5deccb,_0x120d61=this[_0x221534(1395)](this[_0x221534(555)]);return this["_SetPlaySpeed"](_0x120d61)}},{key:_0x5deccb(1080),value:function(_0x3bcfc4){var _0x5e2da2=_0x5deccb;if(_0x3bcfc4)this[_0x5e2da2(1315)](3);else{if(3!==this[_0x5e2da2(1335)])return-1;this[_0x5e2da2(1315)](2),this[_0x5e2da2(1516)]=!0}return 1}},{key:_0x5deccb(643),value:function(){var _0x4a2d7d=_0x5deccb;0!=this[_0x4a2d7d(1569)][_0x4a2d7d(525)]&&this[_0x4a2d7d(963)](this[_0x4a2d7d(1569)][0])}},{key:_0x5deccb(869),value:function(_0x33a04d){var _0x171d59=_0x5deccb;if(_0x33a04d)this[_0x171d59(1315)](5),this["needForward"]=!0;else{if(5!==this[_0x171d59(1335)])return-1;this[_0x171d59(1315)](2),this["resetTimer"]=!0,this[_0x171d59(949)]=!1,this[_0x171d59(716)](1)}return 1}},{key:_0x5deccb(343),value:function(_0x3baaab,_0x58cc13){var _0x17f77b=_0x5deccb;return null!=this[_0x17f77b(774)]&&this[_0x17f77b(774)][_0x17f77b(343)](_0x3baaab,_0x58cc13)}},{key:"GetCanvasSize",value:function(){var _0x2d5983=_0x5deccb;return null!=this["oVideoRender"]&&this[_0x2d5983(774)][_0x2d5983(1370)]()}},{key:"GetPlayedTime",value:function(){var _0x18814b=_0x5deccb;return this[_0x18814b(1418)]}},{key:_0x5deccb(716),value:function(_0x2049cb){var _0x4ed806=_0x5deccb;switch(_0x2049cb){case-16:case-8:case-4:case-2:case 1:case 2:case 4:case 8:case 16:case 32:case 64:break;default:return-1}return _0x2049cb!==this[_0x4ed806(555)]&&(this[_0x4ed806(555)]=_0x2049cb,this[_0x4ed806(1147)]=0<_0x2049cb?_0x2049cb:-1/_0x2049cb,console[_0x4ed806(1590)](_0x4ed806(1005)+this[_0x4ed806(1147)]),this["resetTimer"]=!0,this["needForward"]=!1,2!=this[_0x4ed806(1335)]&&this[_0x4ed806(1315)](2)),1}},{key:"_GetFastSpeed",value:function(_0x44abd7){var _0x2ffed2=0;switch(_0x44abd7){case-16:_0x2ffed2=-8;break;case-8:_0x2ffed2=-4;break;case-4:_0x2ffed2=-2;break;case-2:_0x2ffed2=1;break;case 1:_0x2ffed2=2;break;case 2:_0x2ffed2=4;break;case 4:_0x2ffed2=8;break;case 8:_0x2ffed2=16;break;case 16:_0x2ffed2=32;break;case 32:_0x2ffed2=64;break;default:_0x2ffed2=0}return _0x2ffed2}},{key:_0x5deccb(1395),value:function(_0x47f737){var _0x2b4a11=0;switch(_0x47f737){case-8:_0x2b4a11=-16;break;case-4:_0x2b4a11=-8;break;case-2:_0x2b4a11=-4;break;case 1:_0x2b4a11=-2;break;case 2:_0x2b4a11=1;break;case 4:_0x2b4a11=2;break;case 8:_0x2b4a11=4;break;case 16:_0x2b4a11=8;break;case 32:_0x2b4a11=16;break;case 64:_0x2b4a11=32;break;default:_0x2b4a11=0}return _0x2b4a11}},{key:"SetDisplayBuf",value:function(_0x4e58a0){var _0x5dc50a=_0x5deccb;return this[_0x5dc50a(1498)]=_0x4e58a0,1}},{key:_0x5deccb(784),value:function(){var _0x3c8794=_0x5deccb;return this[_0x3c8794(1266)]=!0,this[_0x3c8794(325)]=_0x3c8794(1239),1}},{key:"GetBMP",value:function(){var _0x4fc89f=_0x5deccb;return this[_0x4fc89f(1302)]=!0,this[_0x4fc89f(325)]=_0x4fc89f(1292),1}},{key:_0x5deccb(1125),value:function(){var _0x3eff6c=_0x5deccb;return this[_0x3eff6c(595)]=!0,this[_0x3eff6c(325)]=_0x3eff6c(1060),1}},{key:_0x5deccb(1417),value:function(){var _0x239bec=_0x5deccb;return this["getCropImageBMP"]=!0,this["getImageType"]=_0x239bec(981),1}},{key:"SetDecodeFrameType",value:function(_0x47bd7){var _0x27b600=_0x5deccb;return this[_0x27b600(1048)]=_0x47bd7,1}},{key:"SetStreamEnd",value:function(){var _0x32cf1a=_0x5deccb;return this["oVideoDecoder"][_0x32cf1a(1110)](),1}},{key:_0x5deccb(558),value:function(_0x1d431c){var _0x5976e9=_0x5deccb;return null!=this[_0x5976e9(774)]?this[_0x5976e9(774)][_0x5976e9(558)](_0x1d431c):0}},{key:_0x5deccb(1203),value:function(_0x3998cd,_0x1935cd){var _0x4dcd6c=_0x5deccb;return this[_0x4dcd6c(1424)]=_0x1935cd?_0x3998cd:null,1}},{key:_0x5deccb(814),value:function(_0x475ddc){var _0x5dda6a=_0x5deccb;return"2d"===this["renderEngine"]||"2D"===this[_0x5dda6a(1264)]?(console[_0x5dda6a(1590)](_0x5dda6a(1342),_0x5dda6a(657)),0):null!=this[_0x5dda6a(774)]?this[_0x5dda6a(774)]["FEC_SetCanvasID"](_0x475ddc):0}},{key:_0x5deccb(1206),value:function(_0x2d22ce,_0x8f54a3,_0x52ffcd){var _0x346539=_0x5deccb;return"2d"===this[_0x346539(1264)]||"2D"===this[_0x346539(1264)]?(console["log"](_0x346539(1342),_0x346539(657)),0):null!=this[_0x346539(774)]?this["oVideoRender"][_0x346539(1206)](_0x2d22ce,_0x8f54a3,_0x52ffcd):0}},{key:"FEC_GetPort",value:function(_0x1ceee5,_0x8344db){var _0x59a096=_0x5deccb;return"2d"===this[_0x59a096(1264)]||"2D"===this[_0x59a096(1264)]?(console["log"](_0x59a096(1342),"color:red"),0):null!=this["oVideoRender"]?this[_0x59a096(774)][_0x59a096(1012)](_0x1ceee5,_0x8344db):0}},{key:_0x5deccb(1015),value:function(_0x1cb959){var _0x2bbb1c=_0x5deccb;return"2d"===this[_0x2bbb1c(1264)]||"2D"===this[_0x2bbb1c(1264)]?(console[_0x2bbb1c(1590)]("%c 2D render not support FEC correct",_0x2bbb1c(657)),0):null!=this[_0x2bbb1c(774)]?this[_0x2bbb1c(774)][_0x2bbb1c(1015)](_0x1cb959):0}},{key:_0x5deccb(671),value:function(_0x3d4fa2,_0x565c92){var _0x1bfc4c=_0x5deccb;return"2d"===this[_0x1bfc4c(1264)]||"2D"===this[_0x1bfc4c(1264)]?(console[_0x1bfc4c(1590)](_0x1bfc4c(1342),_0x1bfc4c(657)),0):null!=this[_0x1bfc4c(774)]?this[_0x1bfc4c(774)][_0x1bfc4c(671)](_0x3d4fa2,_0x565c92):0}},{key:_0x5deccb(992),value:function(_0x5838d8,_0x472d3f,_0x16efa0){var _0x1a2784=_0x5deccb;return"2d"===this[_0x1a2784(1264)]||"2D"===this[_0x1a2784(1264)]?(console["log"](_0x1a2784(1342),_0x1a2784(657)),0):null!=this["oVideoRender"]?this[_0x1a2784(774)][_0x1a2784(992)](_0x5838d8,_0x472d3f,_0x16efa0):0}},{key:"FEC_GetViewParam",value:function(_0x20bb78,_0x48a743){var _0x5d1e1e=_0x5deccb;return"2d"===this[_0x5d1e1e(1264)]||"2D"===this["renderEngine"]?(console[_0x5d1e1e(1590)](_0x5d1e1e(1342),_0x5d1e1e(657)),0):null!=this[_0x5d1e1e(774)]?this[_0x5d1e1e(774)][_0x5d1e1e(1578)](_0x20bb78,_0x48a743):0}},{key:_0x5deccb(1145),value:function(_0x5cb1b0,_0x28e54b){var _0x43c411=_0x5deccb;return"2d"===this[_0x43c411(1264)]||"2D"===this[_0x43c411(1264)]?(console["log"](_0x43c411(1342),_0x43c411(657)),0):null!=this[_0x43c411(774)]?this[_0x43c411(774)]["FEC_SetWnd"](_0x5cb1b0,_0x28e54b):0}},{key:_0x5deccb(1582),value:function(_0x1e8ce5,_0x50bd41,_0x50fac6){var _0x11fec5=_0x5deccb;return"2d"===this[_0x11fec5(1264)]||"2D"===this[_0x11fec5(1264)]?(console["log"](_0x11fec5(1342),_0x11fec5(657)),0):null!=this["oVideoRender"]?this[_0x11fec5(774)][_0x11fec5(1582)](_0x1e8ce5,_0x50bd41,_0x50fac6):0}},{key:_0x5deccb(832),value:function(_0x4ee86e){var _0x5bb64f=_0x5deccb;return"2d"===this[_0x5bb64f(1264)]||"2D"===this[_0x5bb64f(1264)]?(console[_0x5bb64f(1590)](_0x5bb64f(1342),_0x5bb64f(657)),0):null!=this["oVideoRender"]?this[_0x5bb64f(774)][_0x5bb64f(832)](_0x4ee86e):0}},{key:_0x5deccb(1345),value:function(_0x3ba013,_0x4ba074,_0x71386,_0x1fecc5,_0x22463e,_0x950e86,_0x5353bc){var _0x32b5d3=_0x5deccb;return"2d"===this[_0x32b5d3(1264)]||"2D"===this[_0x32b5d3(1264)]?(console[_0x32b5d3(1590)](_0x32b5d3(1342),_0x32b5d3(657)),0):null!=this[_0x32b5d3(774)]?this[_0x32b5d3(774)][_0x32b5d3(1345)](_0x3ba013,_0x4ba074,_0x71386,_0x1fecc5,_0x22463e,_0x950e86,_0x5353bc):0}},{key:_0x5deccb(1020),value:function(_0x4dbc12,_0x232899){var _0x178311=_0x5deccb;return"2d"===this[_0x178311(1264)]||"2D"===this["renderEngine"]?(console[_0x178311(1590)]("%c 2D render not support FEC correct",_0x178311(657)),0):null!=this["oVideoRender"]?this[_0x178311(774)]["FEC_SetBackCilling"](_0x4dbc12,_0x232899):0}}]),_0x466b48}(),_0x3664f3=function(){var _0x2bbcb4=_0x372e98;function _0x45290b(_0x4e91b6){var _0x53f1d7=a0_0x5477;_0x56ad3b(this,_0x45290b),this[_0x53f1d7(1376)]=_0x4e91b6,this[_0x53f1d7(1565)]=new _0x4f4531(_0x4e91b6)}return _0x5dd832(_0x45290b,[{key:_0x2bbcb4(520),value:function(_0x52949c,_0x2a526a,_0x4858b1,_0x3c54e1){var _0x35d6c0=_0x2bbcb4;if(null===this[_0x35d6c0(1565)])return 0;this[_0x35d6c0(1565)][_0x35d6c0(520)](_0x52949c,_0x2a526a,_0x4858b1,_0x3c54e1)}},{key:_0x2bbcb4(1545),value:function(_0x37ae47,_0x35ae60){var _0x26fd9e=_0x2bbcb4;this["oVideoPlayCtrl"][_0x26fd9e(1545)](_0x37ae47,_0x35ae60)}},{key:"SetDisplayRegion",value:function(_0x2a96fa,_0x4a0430,_0x185434,_0x6a35c3){var _0x398122=_0x2bbcb4;if(null===this[_0x398122(1565)])return 0;this["oVideoPlayCtrl"][_0x398122(1053)](_0x2a96fa,_0x4a0430,_0x185434,_0x6a35c3)}},{key:_0x2bbcb4(1476),value:function(){var _0x1a520d=_0x2bbcb4,_0x5f5dc4=this;if(null===this[_0x1a520d(1565)])return 0;this[_0x1a520d(1565)][_0x1a520d(1315)](4);var _0x2de6fe=setInterval(function(){var _0x3145ca=_0x1a520d;_0x5f5dc4[_0x3145ca(1565)]["displayRunning"]||(_0x5f5dc4[_0x3145ca(1565)]=null,clearInterval(_0x2de6fe),_0x2de6fe=null,console[_0x3145ca(1590)](">>>JS 03 destroy oVideoPlayCtrl"))},2)}},{key:"fast",value:function(){var _0x37e06c=_0x2bbcb4;return null===this[_0x37e06c(1565)]||1!==this[_0x37e06c(1565)][_0x37e06c(1589)]()?0:void 0}},{key:_0x2bbcb4(1207),value:function(){var _0x59e8a7=_0x2bbcb4;return null===this["oVideoPlayCtrl"]||1!==this["oVideoPlayCtrl"][_0x59e8a7(1207)]()?0:void 0}},{key:_0x2bbcb4(1047),value:function(_0x3da65a){var _0x391103=_0x2bbcb4;return null===this[_0x391103(1565)]||1!==this["oVideoPlayCtrl"]["SetDisplayBuf"](_0x3da65a)?0:void 0}},{key:"Pause",value:function(_0xd1d20a){var _0x2afef9=_0x2bbcb4;return null===this["oVideoPlayCtrl"]||1!==this[_0x2afef9(1565)][_0x2afef9(1080)](_0xd1d20a)?0:void 0}},{key:_0x2bbcb4(869),value:function(_0x512069){var _0x3f4773=_0x2bbcb4;return null===this["oVideoPlayCtrl"]||1!==this["oVideoPlayCtrl"][_0x3f4773(869)](_0x512069)?0:void 0}},{key:_0x2bbcb4(343),value:function(_0x36f041,_0xa6ad59){var _0x36da85=_0x2bbcb4;return null===this[_0x36da85(1565)]||1!==this["oVideoPlayCtrl"][_0x36da85(343)](_0x36f041,_0xa6ad59)?0:void 0}},{key:"GetCanvasSize",value:function(){var _0x34276c=_0x2bbcb4;return null===this[_0x34276c(1565)]||1!==this[_0x34276c(1565)]["GetCanvasSize"]()?0:void 0}},{key:_0x2bbcb4(768),value:function(){var _0x5b169a=_0x2bbcb4;return null===this["oVideoPlayCtrl"]?0:this["oVideoPlayCtrl"][_0x5b169a(768)]()}},{key:_0x2bbcb4(1388),value:function(){var _0x72900f=_0x2bbcb4;this[_0x72900f(1565)][_0x72900f(1315)](0)}},{key:_0x2bbcb4(784),value:function(){var _0x31622f=_0x2bbcb4;this[_0x31622f(1565)][_0x31622f(784)]()}},{key:_0x2bbcb4(1351),value:function(){var _0x3c0cd7=_0x2bbcb4;this["oVideoPlayCtrl"][_0x3c0cd7(1351)]()}},{key:"GetCropJPEG",value:function(){var _0x49d9a0=_0x2bbcb4;this[_0x49d9a0(1565)]["GetCropJPEG"]()}},{key:"GetCropBMP",value:function(){var _0xa49a0a=_0x2bbcb4;this[_0xa49a0a(1565)][_0xa49a0a(1417)]()}},{key:_0x2bbcb4(1564),value:function(_0x37e922){var _0x159376=_0x2bbcb4;this[_0x159376(1565)][_0x159376(1564)](_0x37e922)}},{key:_0x2bbcb4(1070),value:function(){this["oVideoPlayCtrl"]["SetStreamEnd"]()}},{key:_0x2bbcb4(558),value:function(_0x6084e2){var _0x413cee=_0x2bbcb4;return this[_0x413cee(1565)][_0x413cee(558)](_0x6084e2)}},{key:_0x2bbcb4(1203),value:function(_0x1538bc,_0x41c999){var _0x1ec82e=_0x2bbcb4;return this[_0x1ec82e(1565)][_0x1ec82e(1203)](_0x1538bc,_0x41c999)}},{key:_0x2bbcb4(814),value:function(_0x4ee318){var _0x51e105=_0x2bbcb4;return this[_0x51e105(1565)][_0x51e105(814)](_0x4ee318)}},{key:"FEC_ResetCorrectType",value:function(_0x361d9e,_0x23b775,_0x25fec4){var _0x38c2fb=_0x2bbcb4;return this[_0x38c2fb(1565)][_0x38c2fb(1206)](_0x361d9e,_0x23b775,_0x25fec4)}},{key:_0x2bbcb4(1012),value:function(_0x475f9a,_0x571081){var _0x153516=_0x2bbcb4;return this[_0x153516(1565)][_0x153516(1012)](_0x475f9a,_0x571081)}},{key:_0x2bbcb4(1015),value:function(_0xd380e2){var _0x4c6142=_0x2bbcb4;return this[_0x4c6142(1565)][_0x4c6142(1015)](_0xd380e2)}},{key:_0x2bbcb4(671),value:function(_0x54d7c5,_0x3e9b45){var _0x482212=_0x2bbcb4;return this["oVideoPlayCtrl"][_0x482212(671)](_0x54d7c5,_0x3e9b45)}},{key:_0x2bbcb4(992),value:function(_0x54ed3e,_0x5f2ab0,_0x5a3205){var _0x13e7d6=_0x2bbcb4;return this[_0x13e7d6(1565)]["FEC_SetViewParam"](_0x54ed3e,_0x5f2ab0,_0x5a3205)}},{key:"FEC_GetViewParam",value:function(_0x1faea3,_0x208521){var _0xbeaac0=_0x2bbcb4;return this[_0xbeaac0(1565)][_0xbeaac0(1578)](_0x1faea3,_0x208521)}},{key:_0x2bbcb4(1145),value:function(_0x4cae96,_0x3823ea){var _0x5ec387=_0x2bbcb4;return this[_0x5ec387(1565)][_0x5ec387(1145)](_0x4cae96,_0x3823ea)}},{key:_0x2bbcb4(1582),value:function(_0x4d1756,_0xdc1b68,_0x46e48e){var _0x585ea4=_0x2bbcb4;return this[_0x585ea4(1565)]["FEC_Disable"](_0x4d1756,_0xdc1b68,_0x46e48e)}},{key:_0x2bbcb4(832),value:function(_0x3908d8){var _0x59ce9c=_0x2bbcb4;return this["oVideoPlayCtrl"][_0x59ce9c(832)](_0x3908d8)}},{key:"FEC_SetDisplayRegion",value:function(_0x340744,_0x4f0f29,_0x2820b6,_0x318213,_0x87b02e,_0x38b428,_0x5e8020){var _0x4b540e=_0x2bbcb4;return this[_0x4b540e(1565)][_0x4b540e(1345)](_0x340744,_0x4f0f29,_0x2820b6,_0x318213,_0x87b02e,_0x38b428,_0x5e8020)}},{key:_0x2bbcb4(1020),value:function(_0x1a5813,_0x3f8cbf){return this["oVideoPlayCtrl"]["FEC_SetBackCilling"](_0x1a5813,_0x3f8cbf)}}]),_0x45290b}(),_0x54d839=new Array(8)[_0x372e98(329)](0)[_0x372e98(458)](function(_0x1da30c){return new Array(128)}),_0x2cfc34=null,_0x2258bb={bSupHardOrSoft:!0,bSupHardDecAVC:!0,bSupHardDecHEVC:!0},_0x5115e8=(window[_0x372e98(1232)]=function(_0x120284,_0x1f0312,_0x5a9ead,_0x14e5c7){_0x54d839[_0x14e5c7][_0x120284]["JSPlayM4_InputRawData"](_0x120284,_0x1f0312,_0x5a9ead)},function(){var _0x72d96d=_0x372e98;function _0x304885(_0x50f62f,_0x77f0db){var _0x16fc82=a0_0x5477,_0x22dd01=this,_0x2174db=2<arguments[_0x16fc82(525)]&&void 0!==arguments[2]?arguments[2]:0,_0x2186e3=3<arguments["length"]&&void 0!==arguments[3]?arguments[3]:_0x16fc82(1258),_0x559c6d=4<arguments[_0x16fc82(525)]&&void 0!==arguments[4]?arguments[4]:0,_0x28124a=5<arguments[_0x16fc82(525)]&&void 0!==arguments[5]?arguments[5]:-1,_0x238c9f=(_0x56ad3b(this,_0x304885),this["szBasePath"]=_0x50f62f,(this[_0x16fc82(816)]=this)[_0x16fc82(798)]=-1,this[_0x16fc82(549)]=_0x559c6d,this[_0x16fc82(1591)]=_0x2174db,this[_0x16fc82(1264)]=_0x2186e3,this[_0x16fc82(1058)]=null,this["decodeWorker"]=null,this["offscreen"]=null,this[_0x16fc82(1159)]="",this[_0x16fc82(1201)]=null,this[_0x16fc82(1081)]=1,this["hevcDecodeEngine"]=1,this[_0x16fc82(1106)]=1,this[_0x16fc82(868)]=null,this[_0x16fc82(490)]=204800,this["canvasIDData"]=null,this[_0x16fc82(1156)]=!1,this[_0x16fc82(1326)]=0,this[_0x16fc82(1454)]=0,this[_0x16fc82(1384)]=0,this["rawDataFrameInfoBuffer"]=null,this[_0x16fc82(1226)]={},this[_0x16fc82(1254)]={},this[_0x16fc82(512)]=0,this["decodeFrameType"]=0,this[_0x16fc82(537)]=!1,this[_0x16fc82(1498)]=0,this[_0x16fc82(1561)]=!0,this[_0x16fc82(714)]=0,this[_0x16fc82(1463)]=0,this[_0x16fc82(1147)]=1,this[_0x16fc82(569)]=!1,this[_0x16fc82(531)]=!1,this[_0x16fc82(892)]=0,this[_0x16fc82(829)]=0,this[_0x16fc82(501)]=0,this[_0x16fc82(846)]=0,this[_0x16fc82(1429)]=0,this["cropLeft"]=0,this[_0x16fc82(1552)]=0,this[_0x16fc82(633)]=0,this[_0x16fc82(363)]=960,this[_0x16fc82(1421)]=480,this["NoHIKHead"]=1,this[_0x16fc82(481)]=0,this["setHasThread"]=_0x28124a,this[_0x16fc82(997)]=0,this["aTotalBuffer"]=[],this[_0x16fc82(1255)]=0,this[_0x16fc82(1467)]=!0,this["downloadFlag"]=!1,this[_0x16fc82(664)]=!0,this[_0x16fc82(1260)]=[],this["iAudioANRFrameNum"]=0,this["bWriteAudioBefDecData"]=!0,this[_0x16fc82(1462)]=[],this[_0x16fc82(1180)]=0,this[_0x16fc82(928)]=!0,this["audioAfDecOUTBuffer"]=[],this[_0x16fc82(1440)]=0,this[_0x16fc82(1559)]=!0,this[_0x16fc82(1530)]=[],this["iAudioBeRenOUTFrameNum"]=0,this[_0x16fc82(664)]=!0,this[_0x16fc82(1131)]=[],this[_0x16fc82(383)]=0,this[_0x16fc82(990)]=null,this[_0x16fc82(947)]=0,this[_0x16fc82(463)]=null,this[_0x16fc82(1107)]=null,this[_0x16fc82(589)]=!1,this[_0x16fc82(372)]=null,this[_0x16fc82(1542)]=0,this[_0x16fc82(1040)]=null,this[_0x16fc82(488)]=null,this[_0x16fc82(1146)]=!1,this[_0x16fc82(459)]=[],this[_0x16fc82(1554)]=2097152,this["stDisplayRect"]={top:0,left:0,right:0,bottom:0},this[_0x16fc82(621)]=0,this[_0x16fc82(397)]=1,this[_0x16fc82(435)]=1,this[_0x16fc82(1068)]=null,this[_0x16fc82(357)]=0,this[_0x16fc82(1451)]=0,this[_0x16fc82(575)]=1,this[_0x16fc82(1469)]=1,this[_0x16fc82(874)]={top:0,left:0,right:0,bottom:0},this["currentFishSubPort"]=-1,this[_0x16fc82(1176)]=[],this[_0x16fc82(398)]=null,this[_0x16fc82(409)]=null,this[_0x16fc82(367)]=null,this[_0x16fc82(1327)]=null,this["decCallBackFun"]=null,this[_0x16fc82(476)]=null,this[_0x16fc82(448)]=null,this["fn"]=_0x77f0db,this[_0x16fc82(965)]=!!window[_0x16fc82(741)],this[_0x16fc82(1179)]=_0x2258bb,this[_0x16fc82(710)]());-1==_0x238c9f?(console[_0x16fc82(786)]("%c1>your browser does not support hard Decoder,please install chrome",_0x16fc82(692)),this[_0x16fc82(1106)]=0,this[_0x16fc82(1041)]=0,this[_0x16fc82(1179)][_0x16fc82(1092)]=!1,this[_0x16fc82(1179)][_0x16fc82(1e3)]=!1,this[_0x16fc82(965)]?this[_0x16fc82(1179)][_0x16fc82(547)]=!0:this["callBackParameter"][_0x16fc82(547)]=!1):_0x238c9f<94?(console[_0x16fc82(786)](_0x16fc82(958),_0x16fc82(692),_0x238c9f),this[_0x16fc82(1106)]=0,this[_0x16fc82(1041)]=0,this[_0x16fc82(1179)][_0x16fc82(1092)]=!1,this[_0x16fc82(1179)][_0x16fc82(1e3)]=!1,this[_0x16fc82(965)]?this["callBackParameter"][_0x16fc82(547)]=!0:this[_0x16fc82(1179)][_0x16fc82(547)]=!1):(_0x238c9f<107&&(console["info"](_0x16fc82(1001),_0x16fc82(692),_0x238c9f),this[_0x16fc82(1041)]=0),this[_0x16fc82(1179)]["bSupHardDecAVC"]=!0,this[_0x16fc82(1179)][_0x16fc82(1e3)]=!1,this[_0x16fc82(1179)][_0x16fc82(547)]=!0),console["log"](_0x16fc82(485)+(new Date)[_0x16fc82(721)]()+":"+(new Date)[_0x16fc82(579)]()+"."+(new Date)["getMilliseconds"](),_0x16fc82(1063)),null==_0x2cfc34&&this["callBackParameter"]["bSupHardOrSoft"]?(_0x50f62f=this[_0x16fc82(984)],(_0x559c6d=document[_0x16fc82(1546)](_0x16fc82(1237)))[_0x16fc82(1378)]=_0x16fc82(953),_0x559c6d[_0x16fc82(510)]=_0x50f62f,console[_0x16fc82(786)](_0x16fc82(1410),"color: green",_0x50f62f),_0x559c6d[_0x16fc82(1173)]=function(){var _0x387db6=_0x16fc82;window["JSPlayerModule"]()[_0x387db6(705)](function(_0xe7acea){var _0x597cd9=_0x387db6;_0x2cfc34=_0xe7acea,_0x22dd01["_decoderLoaded"]=!0,console["log"](_0x597cd9(843)+(new Date)[_0x597cd9(721)]()+":"+(new Date)[_0x597cd9(579)]()+"."+(new Date)["getMilliseconds"](),"color: blue"),94<=_0x238c9f?VideoDecoder[_0x597cd9(699)]({codec:_0x597cd9(848),hardwareAcceleration:_0x597cd9(356)})["then"](function(_0x51df64){var _0x14db73=_0x597cd9;_0x51df64["supported"]?(_0x22dd01[_0x14db73(1179)]["bSupHardDecHEVC"]=!0,console[_0x14db73(786)](_0x14db73(977),"color: green")):(console[_0x14db73(1414)]("%c1>your PC does not support 265 hard Decoder, if you want to hard decode 265 ,try to update the GPU driver","color: red"),_0x22dd01[_0x14db73(1041)]=0),_0x22dd01["fn"](_0x22dd01["callBackParameter"])})[_0x597cd9(1301)](function(){var _0x513b55=_0x597cd9;_0x22dd01["fn"](_0x22dd01[_0x513b55(1179)]),console[_0x513b55(1590)]("%c hevc supported error",_0x513b55(692))}):_0x22dd01["fn"](_0x22dd01[_0x597cd9(1179)])})},document[_0x16fc82(1051)]["appendChild"](_0x559c6d)):new Promise(function(_0x143ef8,_0x2dba60){_0x143ef8()})[_0x16fc82(705)](function(){var _0x2009ca=_0x16fc82;_0x22dd01["fn"](_0x22dd01[_0x2009ca(1179)])})}function _0x4b6cf2(_0x2f9981,_0x163a8d){return _0x59976e["apply"](this,arguments)}var _0x59976e;return _0x5dd832(_0x304885,[{key:_0x72d96d(712),value:(_0x59976e=function(_0x3f32cc,_0x2a84c0){var _0x1d479f=_0x72d96d;if(window[_0x1d479f(845)]){if(null==_0x2a84c0[_0x1d479f(877)]){if(_0x2a84c0["decodeWorker"]=new _0x23fcd8,null==_0x2a84c0[_0x1d479f(877)])return 0;console[_0x1d479f(1590)](_0x1d479f(708))}_0x2a84c0[_0x1d479f(1201)]=document[_0x1d479f(380)](_0x3f32cc),_0x2a84c0[_0x1d479f(820)]=_0x2a84c0[_0x1d479f(1201)][_0x1d479f(957)](),_0x2a84c0[_0x1d479f(877)]["postMessage"]({command:_0x1d479f(520),streamOpenMode:_0x2a84c0[_0x1d479f(1326)],canvas:_0x2a84c0[_0x1d479f(820)],sab:_0x2a84c0[_0x1d479f(965)],renderEngine:_0x2a84c0[_0x1d479f(1264)]},[_0x2a84c0[_0x1d479f(820)]]),0!=_0x2a84c0[_0x1d479f(1498)]&&_0x2a84c0[_0x1d479f(877)][_0x1d479f(1086)]({command:_0x1d479f(1047),value:_0x2a84c0[_0x1d479f(1498)]}),_0x2a84c0[_0x1d479f(877)][_0x1d479f(1066)]=function(_0x105e0e){var _0x169a25=_0x1d479f,_0x3df1c2=_0x105e0e[_0x169a25(864)];switch(_0x3df1c2[_0x169a25(1536)]){case _0x169a25(1235):startWorker(_0x2a84c0[_0x169a25(1159)],_0x2a84c0);break;case _0x169a25(663):var _0x4db86d=new Uint8Array(_0x3df1c2["data"]);_0x2a84c0[_0x169a25(1367)](_0x4db86d);break;case"GetRawData":_0x2a84c0[_0x169a25(850)]();break;case _0x169a25(1309):console[_0x169a25(1590)](_0x169a25(507));break;case _0x169a25(768):_0x4db86d=_0x3df1c2[_0x169a25(591)],_0x2a84c0[_0x169a25(476)]&&_0x2a84c0[_0x169a25(476)](_0x4db86d-_0x2a84c0[_0x169a25(512)]);break;case _0x169a25(1123):_0x2a84c0[_0x169a25(1103)]();break;case _0x169a25(1555):var _0x4db86d=_0x3df1c2["value"],_0xf2a354=_0x3df1c2[_0x169a25(1378)];_0x2a84c0[_0x169a25(787)](_0x4db86d,_0xf2a354);break;case"imageYUV":var _0x4db86d=new Uint8Array(_0x3df1c2["value"]),_0xf2a354=_0x3df1c2[_0x169a25(1242)],_0x4db86d=new Uint8Array(_0x4db86d),_0x42257b=_0x3df1c2["type"],_0x137bec=_0x3df1c2[_0x169a25(1454)],_0x493dfa=_0x3df1c2[_0x169a25(1384)],_0x104c97=_0x3df1c2[_0x169a25(840)],_0x55e573=_0x3df1c2["sx"],_0x5ccf36=_0x3df1c2["sy"],_0x54b2f1=_0x3df1c2["sw"],_0x2e66dd=_0x3df1c2["sh"];_0x2a84c0[_0x169a25(625)](_0x4db86d,_0xf2a354,_0x137bec,_0x493dfa,_0x42257b,_0x104c97,_0x55e573,_0x5ccf36,_0x54b2f1,_0x2e66dd),_0x3df1c2[_0x169a25(591)]=null;break;case _0x169a25(1476):_0x2a84c0["decodeWorker"]=null,console["log"]("HardWorker is null");break;case _0x169a25(1350):null!=_0x2a84c0[_0x169a25(409)]&&_0x2a84c0[_0x169a25(409)]();break;case _0x169a25(1203):_0x2a84c0[_0x169a25(1254)][_0x169a25(798)]=_0x3df1c2["curFrameInfo"]["port"],_0x2a84c0[_0x169a25(1254)][_0x169a25(714)]=_0x3df1c2["curFrameInfo"][_0x169a25(714)],_0x2a84c0[_0x169a25(1254)]["frameType"]=_0x3df1c2[_0x169a25(1030)]["frameType"],_0x2a84c0[_0x169a25(1254)]["frameSize"]=_0x3df1c2[_0x169a25(1030)]["frameSize"],_0x2a84c0[_0x169a25(1254)][_0x169a25(1454)]=_0x3df1c2[_0x169a25(1030)]["width"],_0x2a84c0["displayFrameInfo"]["height"]=_0x3df1c2[_0x169a25(1030)][_0x169a25(1384)],_0x2a84c0[_0x169a25(1254)][_0x169a25(432)]=_0x3df1c2[_0x169a25(1030)][_0x169a25(432)],_0x2a84c0[_0x169a25(1254)][_0x169a25(964)]=_0x3df1c2["curFrameInfo"][_0x169a25(964)],_0x2a84c0[_0x169a25(1254)][_0x169a25(666)]=_0x3df1c2[_0x169a25(1030)][_0x169a25(666)],_0x2a84c0["displayFrameInfo"]["interlace"]=_0x3df1c2[_0x169a25(1030)]["interlace"],_0x2a84c0[_0x169a25(1254)]["streamEnd"]=_0x3df1c2[_0x169a25(1030)][_0x169a25(1070)],_0x2a84c0[_0x169a25(1254)][_0x169a25(1444)]=_0x3df1c2["curFrameInfo"][_0x169a25(1444)],_0x2a84c0["displayFrameInfo"][_0x169a25(1552)]=_0x3df1c2[_0x169a25(1030)][_0x169a25(1552)],_0x2a84c0[_0x169a25(1254)]["cropTop"]=_0x3df1c2[_0x169a25(1030)]["cropTop"],_0x2a84c0[_0x169a25(1254)][_0x169a25(1429)]=_0x3df1c2[_0x169a25(1030)][_0x169a25(1429)],_0x2a84c0[_0x169a25(1254)][_0x169a25(628)]=_0x3df1c2["curFrameInfo"]["year"],_0x2a84c0[_0x169a25(1254)]["month"]=_0x3df1c2["curFrameInfo"][_0x169a25(500)],_0x2a84c0[_0x169a25(1254)][_0x169a25(727)]=_0x3df1c2[_0x169a25(1030)][_0x169a25(727)],_0x2a84c0["displayFrameInfo"][_0x169a25(394)]=_0x3df1c2[_0x169a25(1030)][_0x169a25(394)],_0x2a84c0[_0x169a25(1254)][_0x169a25(1380)]=_0x3df1c2["curFrameInfo"][_0x169a25(1380)],_0x2a84c0[_0x169a25(1254)][_0x169a25(1088)]=_0x3df1c2["curFrameInfo"]["minute"],_0x2a84c0[_0x169a25(1254)][_0x169a25(939)]=_0x3df1c2[_0x169a25(1030)][_0x169a25(939)],_0x2a84c0["displayFrameInfo"]["milliseconds"]=_0x3df1c2[_0x169a25(1030)][_0x169a25(1221)];break;case"FECGetViewParam":_0x4db86d=_0x3df1c2[_0x169a25(1303)],null!=_0x2a84c0["FECViewParamCB"]&&_0x2a84c0[_0x169a25(398)](_0x4db86d)}},_0x2a84c0[_0x1d479f(877)][_0x1d479f(1153)]("error",function(_0xcdb234){var _0x289f85=_0x1d479f;console[_0x289f85(1235)](_0xcdb234)})}},_0x4b6cf2[_0x72d96d(1503)]=function(){var _0x5afd37=_0x72d96d;return _0x59976e[_0x5afd37(1503)]()},_0x4b6cf2)},{key:_0x72d96d(1137),value:function(){return 0}},{key:_0x72d96d(804),value:function(){var _0x1bd42b=_0x72d96d;return this[_0x1bd42b(531)]&&console["log"](_0x1bd42b(315)),null===_0x2cfc34?0:(this[_0x1bd42b(798)]=_0x2cfc34[_0x1bd42b(670)](),_0x54d839[this[_0x1bd42b(1591)]][this[_0x1bd42b(798)]]=this[_0x1bd42b(816)],this[_0x1bd42b(531)]&&console[_0x1bd42b(1590)](">>>>>yff>>> JSPlayM4_GetPort 2"),0==this[_0x1bd42b(549)]&&(this[_0x1bd42b(1058)]=new _0x3664f3(this)),1)}},{key:_0x72d96d(1508),value:function(_0x1a20a2){var _0x234012=_0x72d96d;return this[_0x234012(531)]&&console[_0x234012(1590)](_0x234012(907)+_0x1a20a2),null===_0x2cfc34?0:(this[_0x234012(1326)]=_0x1a20a2,this[_0x234012(531)]&&console[_0x234012(1590)](">>>>>yff>>>>> JSPlayM4_SetStreamOpenMode 2  mode:"+_0x1a20a2),_0x2cfc34["_JSPlayM4_SetStreamOpenMode"](this[_0x234012(798)],_0x1a20a2))}},{key:_0x72d96d(1399),value:function(_0xc0d40f,_0x377722,_0x510905){var _0x4d9bd5=_0x72d96d;if(this[_0x4d9bd5(531)]&&console[_0x4d9bd5(1590)](">>>>>yff>>>>> JSPlayM4_OpenStream 1 :"+_0xc0d40f),null===_0x2cfc34)return 0;var _0x22bda0=_0x2cfc34["_malloc"](_0x377722);if(null===_0x22bda0)return console["log"](_0x4d9bd5(1072)),0;this[_0x4d9bd5(531)]&&console[_0x4d9bd5(1590)](_0x4d9bd5(746)+_0xc0d40f);var _0x261f03=new Uint8Array(_0xc0d40f[_0x4d9bd5(1074)]);if(73==_0xc0d40f[0]&&77==_0xc0d40f[1]&&75==_0xc0d40f[2]&&72==_0xc0d40f[3]&&(this[_0x4d9bd5(362)]=0),5==_0xc0d40f[10]&&0==_0xc0d40f[11]){if(this[_0x4d9bd5(714)]=5,!this["callBackParameter"][_0x4d9bd5(1e3)]&&!this[_0x4d9bd5(965)])return 16;this["printfFlag"]&&console[_0x4d9bd5(1590)](">>>>>yff>>>>> JSPlayM4_OpenStream 3:"+_0xc0d40f)}else 1==_0xc0d40f[10]&&0==_0xc0d40f[11]?(this[_0x4d9bd5(714)]=1,this[_0x4d9bd5(531)]&&console["log"](_0x4d9bd5(1382)+_0xc0d40f)):0==_0xc0d40f[10]&&1==_0xc0d40f[11]?(this["codecType"]=256,this["printfFlag"]&&console[_0x4d9bd5(1590)](_0x4d9bd5(480)+_0xc0d40f)):this[_0x4d9bd5(714)]=0;return _0x2cfc34[_0x4d9bd5(1523)](_0x261f03,_0x22bda0),_0xc0d40f=_0x2cfc34[_0x4d9bd5(717)](this[_0x4d9bd5(798)],_0x22bda0,_0x377722,_0x510905),null!==_0x22bda0&&(_0x2cfc34[_0x4d9bd5(573)](_0x22bda0),0),_0xc0d40f}},{key:_0x72d96d(682),value:function(_0x518d4e){var _0x22a2d3=_0x72d96d;return this[_0x22a2d3(531)]&&console["log"](_0x22a2d3(1127)+_0x518d4e),0!=_0x518d4e&&1!=_0x518d4e?(console[_0x22a2d3(1590)](_0x22a2d3(1387)+_0x518d4e),0):(this[_0x22a2d3(1081)]=_0x518d4e,1)}},{key:_0x72d96d(1533),value:function(){var _0x275e38=_0x72d96d;return this[_0x275e38(1054)]=!0,1}},{key:_0x72d96d(987),value:function(_0x231293,_0x21beae,_0x4a763f){var _0x20fb63=_0x72d96d;if(this[_0x20fb63(1588)]=_0x4a763f,this["rawDataFrameInfo"][_0x20fb63(798)]=_0x231293,this[_0x20fb63(1226)][_0x20fb63(714)]=_0x2cfc34["HEAP32"][this[_0x20fb63(1588)]+4>>2],this[_0x20fb63(1226)][_0x20fb63(952)]=_0x2cfc34[_0x20fb63(1039)][this["rawDataFrameInfoBuffer"]+12>>2],this[_0x20fb63(1226)][_0x20fb63(1119)]=_0x2cfc34[_0x20fb63(1039)][this[_0x20fb63(1588)]+16>>2],this["rawDataFrameInfo"][_0x20fb63(1454)]=_0x2cfc34[_0x20fb63(1039)][this["rawDataFrameInfoBuffer"]+20>>2],this[_0x20fb63(1226)][_0x20fb63(1384)]=_0x2cfc34[_0x20fb63(1039)][this[_0x20fb63(1588)]+24>>2],this[_0x20fb63(1226)]["timeStamp"]=_0x2cfc34["HEAP32"][this[_0x20fb63(1588)]+28>>2],this["rawDataFrameInfo"][_0x20fb63(964)]=_0x2cfc34["HEAP32"][this[_0x20fb63(1588)]+32>>2],this[_0x20fb63(1226)]["frameNum"]=_0x2cfc34[_0x20fb63(1039)][this[_0x20fb63(1588)]+36>>2],this[_0x20fb63(1226)][_0x20fb63(1392)]=_0x2cfc34[_0x20fb63(1039)][this[_0x20fb63(1588)]+40>>2],this["rawDataFrameInfo"][_0x20fb63(389)]=_0x2cfc34[_0x20fb63(1039)][this[_0x20fb63(1588)]+44>>2],this[_0x20fb63(1226)][_0x20fb63(1070)]=_0x2cfc34[_0x20fb63(1039)][this[_0x20fb63(1588)]+48>>2],this[_0x20fb63(1226)][_0x20fb63(1444)]=_0x2cfc34[_0x20fb63(1039)][this[_0x20fb63(1588)]+52>>2],this[_0x20fb63(1226)][_0x20fb63(1552)]=_0x2cfc34[_0x20fb63(1039)][this[_0x20fb63(1588)]+56>>2],this[_0x20fb63(1226)][_0x20fb63(633)]=_0x2cfc34[_0x20fb63(1039)][this[_0x20fb63(1588)]+60>>2],this[_0x20fb63(1226)][_0x20fb63(1429)]=_0x2cfc34[_0x20fb63(1039)][this["rawDataFrameInfoBuffer"]+64>>2],this[_0x20fb63(1226)]["year"]=_0x2cfc34[_0x20fb63(1006)][this[_0x20fb63(1588)]+68>>1],this["rawDataFrameInfo"]["month"]=_0x2cfc34["HEAP16"][this[_0x20fb63(1588)]+70>>1],this[_0x20fb63(1226)][_0x20fb63(727)]=_0x2cfc34["HEAP16"][this[_0x20fb63(1588)]+72>>1],this[_0x20fb63(1226)]["day"]=_0x2cfc34[_0x20fb63(1006)][this[_0x20fb63(1588)]+74>>1],this["rawDataFrameInfo"][_0x20fb63(1380)]=_0x2cfc34[_0x20fb63(1006)][this[_0x20fb63(1588)]+76>>1],this[_0x20fb63(1226)][_0x20fb63(1088)]=_0x2cfc34[_0x20fb63(1006)][this[_0x20fb63(1588)]+78>>1],this[_0x20fb63(1226)][_0x20fb63(939)]=_0x2cfc34[_0x20fb63(1006)][this[_0x20fb63(1588)]+80>>1],this["rawDataFrameInfo"][_0x20fb63(1221)]=_0x2cfc34[_0x20fb63(1006)][this[_0x20fb63(1588)]+82>>1],this[_0x20fb63(1226)]["needSetPreSoft"]=!1,(this["rawDataFrameInfo"][_0x20fb63(964)]<1||1==this["rawDataFrameInfo"][_0x20fb63(389)])&&(this["rawDataFrameInfo"][_0x20fb63(1222)]=!0),0!=this[_0x20fb63(1454)]&&0!=this[_0x20fb63(1384)]||(this["width"]=this[_0x20fb63(1226)]["width"],this["height"]=this[_0x20fb63(1226)][_0x20fb63(1384)],this[_0x20fb63(512)]=this[_0x20fb63(1226)][_0x20fb63(432)],this[_0x20fb63(1561)]=!1),0==this[_0x20fb63(1226)][_0x20fb63(1444)]&&0==this[_0x20fb63(1226)]["cropRight"]&&0==this[_0x20fb63(1226)]["cropTop"]&&0==this[_0x20fb63(1226)]["cropBottom"]||(this[_0x20fb63(1429)]=this[_0x20fb63(1226)][_0x20fb63(1429)],this[_0x20fb63(1444)]=this[_0x20fb63(1226)]["cropLeft"],this[_0x20fb63(1552)]=this[_0x20fb63(1226)][_0x20fb63(1552)],this[_0x20fb63(633)]=this[_0x20fb63(1226)][_0x20fb63(633)]),1==this[_0x20fb63(469)]){if(1!==this[_0x20fb63(1226)][_0x20fb63(1392)])return 1;this[_0x20fb63(569)]&&(this["hasWebWorker"]?this[_0x20fb63(877)][_0x20fb63(1086)]({command:_0x20fb63(1564),timestamp:this["rawDataFrameInfo"][_0x20fb63(432)]}):this[_0x20fb63(1058)][_0x20fb63(1564)](this[_0x20fb63(1226)][_0x20fb63(432)]),this[_0x20fb63(569)]=!1)}if(0==this[_0x20fb63(469)]&&1==this["switchDecodeFrame"]){if(1!==this[_0x20fb63(1226)][_0x20fb63(1392)])return 1;this[_0x20fb63(537)]=!1}if(this[_0x20fb63(1054)]&&this["downloadRTPData"](_0x21beae),this[_0x20fb63(549)]){if(null===this[_0x20fb63(877)])return _0x21beae=null,0;this[_0x20fb63(877)]["postMessage"]({command:"inputData",rawData:_0x21beae[_0x20fb63(1074)],rawDataFrameInfo:this["rawDataFrameInfo"]},[_0x21beae[_0x20fb63(1074)]])}else this[_0x20fb63(1058)][_0x20fb63(1545)](_0x21beae,this[_0x20fb63(1226)])}},{key:_0x72d96d(850),value:function(){_0x2cfc34["_JSPlayM4_GetRawData"](this["port"])}},{key:_0x72d96d(1103),value:function(){var _0x22fdcb=_0x72d96d;return _0x2cfc34[_0x22fdcb(920)](this[_0x22fdcb(798)])}},{key:_0x72d96d(1574),value:function(_0x3408ca,_0xb2f45b,_0x2fa59d){var _0x2e10a4=_0x72d96d;return console["log"](_0x2e10a4(961)),this["hasWebWorker"]?null!=_0x54d839[_0x2fa59d][_0x3408ca]["decodeWorker"]&&_0x54d839[_0x2fa59d][_0x3408ca]["decodeWorker"][_0x2e10a4(1086)]({command:"needReset"}):this[_0x2e10a4(1058)][_0x2e10a4(1388)](),1}},{key:_0x72d96d(1329),value:function(_0x19cb3d){var _0x3da8a8=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x3da8a8(880)](this["port"],_0x19cb3d)}},{key:_0x72d96d(772),value:function(){var _0x39c0ce=_0x72d96d,_0x2ace76=0<arguments[_0x39c0ce(525)]&&void 0!==arguments[0]?arguments[0]:null;if(this[_0x39c0ce(531)]&&console["log"](">>>>>yff>>>>> JSPlayM4_Play 1 this.canvasID:"+this["canvasID"]+",this.sab:"+this["sab"]),null===_0x2cfc34)return 0;if(this[_0x39c0ce(531)]&&console["log"](_0x39c0ce(870)+decodeEngine),0===this[_0x39c0ce(1041)]&&5===this[_0x39c0ce(714)]?(this[_0x39c0ce(1081)]=0,console[_0x39c0ce(786)](_0x39c0ce(639),"color: green")):0!==this[_0x39c0ce(1106)]||256!==this[_0x39c0ce(714)]&&1!==this[_0x39c0ce(714)]||(this[_0x39c0ce(1081)]=0,console[_0x39c0ce(786)](_0x39c0ce(1311),_0x39c0ce(1464))),!this["sab"]&&0===this[_0x39c0ce(1081)])return console[_0x39c0ce(786)](_0x39c0ce(1126),"color: red"),0;-1!=this[_0x39c0ce(1190)]&&(this[_0x39c0ce(997)]=this["setHasThread"]),_0x2cfc34[_0x39c0ce(426)](this[_0x39c0ce(798)],this["decodeEngine"],this[_0x39c0ce(997)]),console["log"](_0x39c0ce(1170),_0x39c0ce(1464),this["decodeEngine"],this[_0x39c0ce(714)]),null!=_0x2ace76&&(this[_0x39c0ce(1159)]=_0x2ace76,this[_0x39c0ce(363)]=document["getElementById"](this[_0x39c0ce(1159)])[_0x39c0ce(1454)],this[_0x39c0ce(1421)]=document[_0x39c0ce(380)](this["canvasID"])["height"]),null!=this[_0x39c0ce(1159)]&&(_0x2ace76=document[_0x39c0ce(380)](this[_0x39c0ce(1159)]))&&(this[_0x39c0ce(360)]=_0x2ace76[_0x39c0ce(1402)](!0),this["clonedCanvasParentNode"]=_0x2ace76[_0x39c0ce(467)],this[_0x39c0ce(471)][_0x39c0ce(777)](this["clonedCanvas"],_0x2ace76)),this["printfFlag"]&&console["log"](_0x39c0ce(904)+this[_0x39c0ce(1159)]+",this.sab:"+this[_0x39c0ce(965)]+",this.decodeEngine:"+this[_0x39c0ce(1081)]),_0x2ace76=1;if(1===this[_0x39c0ce(1081)]){this["hasWebWorker"]?this["startWorker"](this["canvasID"],this):(this[_0x39c0ce(1201)]=document[_0x39c0ce(380)](this[_0x39c0ce(1159)]),this[_0x39c0ce(1058)][_0x39c0ce(520)](this[_0x39c0ce(1201)],this[_0x39c0ce(1326)],this[_0x39c0ce(965)],this[_0x39c0ce(1264)]),0!=this[_0x39c0ce(1498)]&&this[_0x39c0ce(1058)][_0x39c0ce(1047)](this[_0x39c0ce(1498)])),_0x2cfc34[_0x39c0ce(1553)](this[_0x39c0ce(798)],this[_0x39c0ce(1591)]);var _0x43c06c=_0x2cfc34["addFunction"](this[_0x39c0ce(1574)],_0x39c0ce(388));_0x2cfc34[_0x39c0ce(937)](this[_0x39c0ce(798)],_0x43c06c,this[_0x39c0ce(1591)]),1==(_0x2ace76=_0x2cfc34[_0x39c0ce(842)](this[_0x39c0ce(798)],null))&&(this[_0x39c0ce(1463)]=2)}else{if(0===this[_0x39c0ce(1081)]){if(""!=this[_0x39c0ce(1159)]&&null!=this[_0x39c0ce(1159)]){var _0x43c06c=this["_stringToBytes"]("#"+this[_0x39c0ce(1159)]),_0x51c395=2*(this[_0x39c0ce(1159)][_0x39c0ce(525)]+1);if(this["canvasIDData"]=_0x2cfc34["_malloc"](_0x51c395),null===this[_0x39c0ce(1433)])return 0;var _0x49f1d1=_0x2cfc34[_0x39c0ce(447)][_0x39c0ce(350)](this["canvasIDData"],this["canvasIDData"]+_0x51c395),_0x51c395=new Uint8Array(_0x51c395);_0x49f1d1[_0x39c0ce(483)](_0x51c395,0),_0x49f1d1[_0x39c0ce(483)](new Uint8Array(_0x43c06c)),_0x49f1d1=null}1==(_0x2ace76=_0x2cfc34[_0x39c0ce(842)](this[_0x39c0ce(798)],this["canvasIDData"]))&&(this[_0x39c0ce(1463)]=2)}}return 0!=this[_0x39c0ce(459)]["length"]&&(this[_0x39c0ce(1432)](new Uint8Array(this[_0x39c0ce(459)]),this[_0x39c0ce(459)][_0x39c0ce(525)]),this[_0x39c0ce(459)][_0x39c0ce(387)](0,this[_0x39c0ce(459)]["length"])),this[_0x39c0ce(1519)](1),_0x2ace76}},{key:_0x72d96d(1432),value:function(_0x2907bf,_0xa72fb9){var _0x359f0a=_0x72d96d;if(this["printfFlag"]&&console[_0x359f0a(1590)](">>>>>yff>>>>> JSPlayM4_InputData 1 res:"+_0x3cf1f9+",inputSize:"+_0xa72fb9),null===_0x2cfc34){var _0x3d3ef2=this[_0x359f0a(459)]["length"];if(_0x3d3ef2+_0xa72fb9>this["iInputMaxBufSize"])return console["log"](_0x359f0a(938)),0;for(var _0x35e3db=0;_0x35e3db<_0xa72fb9;_0x35e3db++)this[_0x359f0a(459)][_0x3d3ef2+_0x35e3db]=_0x2907bf[_0x35e3db];return 0}if(this[_0x359f0a(490)]<_0xa72fb9&&(null!==this[_0x359f0a(868)]&&(_0x2cfc34[_0x359f0a(573)](this["inputDataBuffer"]),this["inputDataBuffer"]=null),this["inputDataBufferSize"]=_0xa72fb9),null===this["inputDataBuffer"]&&(this[_0x359f0a(868)]=_0x2cfc34[_0x359f0a(1420)](this[_0x359f0a(490)])),null===this[_0x359f0a(868)])return console[_0x359f0a(1590)](_0x359f0a(365)),0;1==this[_0x359f0a(481)]&&(this["JSPlayM4_SetCanvasSize"](this[_0x359f0a(363)],this[_0x359f0a(1421)]),this[_0x359f0a(481)]=0),this["NoHIKHead"]&&(_0x388f40=(_0x3c4ffa=this["JSPlayM4_GetFrameInfo"]())[_0x359f0a(1454)],_0x3c4ffa=_0x3c4ffa[_0x359f0a(1384)],_0x388f40&&_0x3c4ffa&&(this["JSPlayM4_SetCanvasSize"](this[_0x359f0a(363)],this[_0x359f0a(1421)]-1),this[_0x359f0a(362)]=0,this[_0x359f0a(481)]=1));var _0x3c4ffa,_0x388f40=new Uint8Array(_0x2907bf[_0x359f0a(1074)]),_0x3cf1f9=(_0x2cfc34[_0x359f0a(1523)](_0x388f40,this[_0x359f0a(868)]),_0x2cfc34["_JSPlayM4_InputData"](this[_0x359f0a(798)],this[_0x359f0a(868)],_0xa72fb9));return this[_0x359f0a(531)]&&console[_0x359f0a(1590)](_0x359f0a(1243)+_0x3cf1f9+_0x359f0a(604)+_0xa72fb9),_0x3cf1f9}},{key:_0x72d96d(806),value:function(){var _0x171fc4=_0x72d96d,_0x223396=!(0<arguments[_0x171fc4(525)]&&void 0!==arguments[0])||arguments[0];if(null===_0x2cfc34)return 0;if(this["hasWebWorker"]?null!=this["decodeWorker"]&&this["decodeWorker"]["postMessage"]({command:_0x171fc4(1476)}):null!=this[_0x171fc4(1058)]&&this["pcVideoManager"][_0x171fc4(1476)](),this[_0x171fc4(1467)]&&0<this[_0x171fc4(1255)]&&(console["log"](_0x171fc4(369)+this[_0x171fc4(1255)]+_0x171fc4(900)),_0x5d83cb=new Uint8Array(this[_0x171fc4(601)]),this[_0x171fc4(1163)](_0x5d83cb,_0x171fc4(930)),this[_0x171fc4(601)][_0x171fc4(387)](0,this[_0x171fc4(601)][_0x171fc4(525)]),this[_0x171fc4(1467)]=!1,this[_0x171fc4(1255)]=0,_0x5d83cb=null),2!=this[_0x171fc4(1463)]&&5!=this[_0x171fc4(1463)])return 1;var _0x5d83cb=_0x2cfc34[_0x171fc4(903)](this["port"]);if(1==_0x5d83cb&&(this[_0x171fc4(1463)]=4),1==_0x5d83cb&&_0x223396){_0x223396=document[_0x171fc4(380)](this[_0x171fc4(1159)]);if(_0x223396&&(this["clonedCanvas"]=_0x223396["cloneNode"](!0),this["clonedCanvasParentNode"]=_0x223396[_0x171fc4(467)],this[_0x171fc4(471)][_0x171fc4(777)](this[_0x171fc4(360)],_0x223396)),0!=this[_0x171fc4(1176)][_0x171fc4(525)])for(var _0x456d9d=0;_0x456d9d<this["FECcanvasIDArray"]["length"];_0x456d9d++){var _0x3bc4ee=document["getElementById"](this[_0x171fc4(1176)][_0x456d9d]);_0x3bc4ee&&(this["clonedCanvas"]=_0x3bc4ee[_0x171fc4(1402)](!0),this[_0x171fc4(471)]=_0x3bc4ee["parentNode"],this[_0x171fc4(471)]["replaceChild"](this[_0x171fc4(360)],_0x3bc4ee))}}return _0x5d83cb}},{key:"JSPlayM4_CloseStream",value:function(){var _0xd2658c=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_CloseStream"](this[_0xd2658c(798)])}},{key:_0x72d96d(1306),value:function(){var _0xa05188=_0x72d96d;return null===_0x2cfc34?0:(null!==this[_0xa05188(868)]&&(_0x2cfc34[_0xa05188(573)](this[_0xa05188(868)]),this[_0xa05188(868)]=null),null!==this["canvasIDData"]&&(_0x2cfc34["_free"](this[_0xa05188(1433)]),this[_0xa05188(1433)]=null,this[_0xa05188(1561)]=!0),null!=this[_0xa05188(1068)]&&(_0x2cfc34["_free"](this[_0xa05188(1068)]),this[_0xa05188(1068)]=null),null!=this[_0xa05188(990)]&&(_0x2cfc34[_0xa05188(573)](this[_0xa05188(990)]),this[_0xa05188(990)]=null),null!=this[_0xa05188(463)]&&(_0x2cfc34[_0xa05188(573)](this["pBmpSizeData"]),this[_0xa05188(463)]=null),null!=this[_0xa05188(372)]&&(_0x2cfc34[_0xa05188(573)](this[_0xa05188(372)]),this[_0xa05188(372)]=null),null!=this["pJPEGSizeData"]&&(_0x2cfc34[_0xa05188(573)](this[_0xa05188(1040)]),this[_0xa05188(1040)]=null),this[_0xa05188(1107)]=null,this[_0xa05188(488)]=null,this[_0xa05188(601)]["splice"](0,this[_0xa05188(601)][_0xa05188(525)]),this[_0xa05188(1260)]["splice"](0,this[_0xa05188(1260)]["length"]),this["audioBefDecBuffer"][_0xa05188(387)](0,this["audioBefDecBuffer"][_0xa05188(525)]),this[_0xa05188(1016)]["splice"](0,this[_0xa05188(1016)]["length"]),this[_0xa05188(1530)]["splice"](0,this[_0xa05188(1530)]["length"]),this[_0xa05188(1131)]["splice"](0,this[_0xa05188(1131)][_0xa05188(525)]),this[_0xa05188(459)]["splice"](0,this[_0xa05188(459)][_0xa05188(525)]),this[_0xa05188(1454)]=0,this[_0xa05188(1384)]=0,this[_0xa05188(1463)]=1,this[_0xa05188(1058)]=null,this[_0xa05188(621)]=0,this[_0xa05188(1588)]=null,this[_0xa05188(1254)]={},this[_0xa05188(1226)]={},_0x2cfc34[_0xa05188(729)](this[_0xa05188(798)]))}},{key:_0x72d96d(819),value:function(_0x59aae9){var _0x4bc119=_0x72d96d;return null===_0x2cfc34?0:1===this[_0x4bc119(1081)]?(0==_0x59aae9&&1==this[_0x4bc119(469)]&&(this["switchDecodeFrame"]=!0),1==(this[_0x4bc119(469)]=_0x59aae9)&&(this["needWaitIFrame"]=!0),1):_0x2cfc34[_0x4bc119(674)](this[_0x4bc119(798)],_0x59aae9)}},{key:_0x72d96d(711),value:function(){var _0xfcfc15=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0xfcfc15(1341)](this["port"])}},{key:_0x72d96d(381),value:function(_0x5bbaaa,_0x595aee,_0x5659a7){return new Promise(function(){var _0x3ca330=a0_0x5477,_0x321444=_0x392749(_0x5d56c9()[_0x3ca330(460)](function _0x56b86a(_0x2bb70a,_0x5f28ab){var _0x2e3012=_0x3ca330,_0x17e7b6;return _0x5d56c9()[_0x2e3012(894)](function(_0x1fe496){var _0x42d888=_0x2e3012;for(;;)switch(_0x1fe496[_0x42d888(707)]=_0x1fe496[_0x42d888(811)]){case 0:(_0x17e7b6=document[_0x42d888(1546)]("img"))[_0x42d888(1173)]=function(){var _0x406f47=_0x42d888,_0x181d8b=document[_0x406f47(1546)](_0x406f47(863)),_0x45faf2=_0x181d8b[_0x406f47(1021)]("2d"),_0x45faf2=(_0x181d8b[_0x406f47(1454)]=_0x595aee,_0x181d8b[_0x406f47(1384)]=_0x5659a7,_0x45faf2[_0x406f47(1079)](this,0,0,_0x595aee,_0x5659a7),_0x181d8b["toDataURL"]());_0x2bb70a(_0x45faf2)},_0x17e7b6["src"]=_0x5bbaaa;case 3:case _0x42d888(974):return _0x1fe496[_0x42d888(1476)]()}},_0x56b86a)}));return function(_0x15c69b,_0x2115b1){var _0x3e03fb=_0x3ca330;return _0x321444[_0x3e03fb(1089)](this,arguments)}}())}},{key:_0x72d96d(787),value:function(_0x208a0b,_0x2d974f){var _0x4884ae=_0x72d96d,_0x5b9304,_0xfcd21d,_0x119ac1;1===this["decodeEngine"]&&_0x208a0b[_0x4884ae(1454)]&&_0x208a0b[_0x4884ae(1384)]&&(_0x5b9304="image/"+_0x2d974f,_0xfcd21d=document[_0x4884ae(1546)](_0x4884ae(863)),_0x119ac1=_0xfcd21d[_0x4884ae(1021)]("2d"),_0xfcd21d[_0x4884ae(1454)]=_0x208a0b["width"],_0xfcd21d[_0x4884ae(1384)]=_0x208a0b[_0x4884ae(1384)],_0x119ac1[_0x4884ae(1079)](_0x208a0b,0,0,_0x208a0b[_0x4884ae(1454)],_0x208a0b[_0x4884ae(1384)]),_0xfcd21d[_0x4884ae(783)](function(_0x387dfd){var _0x31a292=_0x4884ae;console[_0x31a292(1590)](_0x31a292(1195)+_0x387dfd);var _0x387dfd=window[_0x31a292(1244)]["createObjectURL"](_0x387dfd),_0x60d31d=document[_0x31a292(1546)]("a");_0x60d31d[_0x31a292(369)]=(new Date)["getTime"]()+"."+_0x2d974f,_0x60d31d[_0x31a292(1531)]=_0x387dfd,_0x60d31d["dataset"]["downloadurl"]=[_0x5b9304,_0x60d31d[_0x31a292(369)],_0x60d31d[_0x31a292(1531)]][_0x31a292(462)](":"),document[_0x31a292(1051)]["appendChild"](_0x60d31d),_0x60d31d[_0x31a292(1168)](),document[_0x31a292(1051)][_0x31a292(1026)](_0x60d31d),_0x208a0b[_0x31a292(327)](),_0x119ac1=null},_0x5b9304))}},{key:"_GetImage2",value:function(_0x3566f6,_0xa4c074,_0xb8cb42,_0x23fc7f,_0x5bcc4b,_0x17970b,_0x29549b,_0x32603e,_0x12942c,_0x5e2242){var _0x310c53=this;setTimeout(function(){var _0x861c7c=a0_0x5477;if(0!=_0xb8cb42&&0!=_0x23fc7f){var _0x37de1c=_0x2cfc34[_0x861c7c(1420)](_0xa4c074);if(null!==_0x37de1c){_0x2cfc34["writeArrayToMemory"](new Uint8Array(_0x3566f6,0,_0xa4c074),_0x37de1c);var _0x523e1d=0,_0x523e1d=704!=_0xb8cb42||288!=_0x23fc7f&&240!=_0x23fc7f?_0xb8cb42*_0x23fc7f*4+60:_0xb8cb42*_0x23fc7f*8+60,_0x12e494=_0x2cfc34[_0x861c7c(1420)](_0x523e1d),_0x38baf6=_0x2cfc34[_0x861c7c(1420)](4);if(null===_0x12e494||null===_0x38baf6)return _0x2cfc34[_0x861c7c(573)](_0x37de1c),(_0x37de1c=null)!=_0x12e494&&(_0x2cfc34[_0x861c7c(573)](_0x12e494),_0x12e494=null),void(null!=_0x38baf6&&(_0x2cfc34[_0x861c7c(573)](_0x38baf6),_0x38baf6=null));_0x2cfc34[_0x861c7c(496)](_0x38baf6,_0x523e1d,_0x861c7c(1298)),_0x523e1d=2,_0x37de1c=("nv12"===_0x17970b?_0x523e1d=2:_0x861c7c(624)===_0x17970b&&(_0x523e1d=3),"jpeg"==_0x5bcc4b?_0x2cfc34[_0x861c7c(1194)](_0x310c53[_0x861c7c(798)],_0x37de1c,_0xa4c074,_0x12e494,_0x38baf6,_0xb8cb42,_0x23fc7f,_0x523e1d,_0x29549b,_0x32603e,_0x12942c,_0x5e2242):_0x861c7c(1292)==_0x5bcc4b&&_0x2cfc34[_0x861c7c(527)](_0x310c53[_0x861c7c(798)],_0x37de1c,_0xa4c074,_0x12e494,_0x38baf6,_0xb8cb42,_0x23fc7f,_0x523e1d,_0x29549b,_0x32603e,_0x12942c,_0x5e2242),_0x2cfc34[_0x861c7c(1461)](_0x38baf6,_0x861c7c(1298))),_0x523e1d=new Uint8Array(_0x37de1c),_0x523e1d[_0x861c7c(483)](_0x2cfc34["HEAPU8"][_0x861c7c(350)](_0x12e494,_0x12e494+_0x37de1c)),0==_0x29549b&&0==_0x32603e&&0==_0x12942c&&0==_0x5e2242?_0x861c7c(1239)==_0x5bcc4b?(null!=_0x310c53["jpegDataCallback"]&&_0x310c53["jpegDataCallback"](_0x523e1d,_0x37de1c),_0x310c53["jpegDownloadFlag"]&&_0x310c53[_0x861c7c(1163)](_0x523e1d,_0x861c7c(561)+_0x5bcc4b),_0x310c53["jpegDataCallback"]=null,_0x310c53[_0x861c7c(1146)]=!1):_0x861c7c(1292)==_0x5bcc4b&&(null!=_0x310c53[_0x861c7c(1107)]&&_0x310c53[_0x861c7c(1107)](_0x523e1d,_0x37de1c),_0x310c53[_0x861c7c(589)]&&_0x310c53[_0x861c7c(1163)](_0x523e1d,_0x861c7c(561)+_0x5bcc4b),_0x310c53[_0x861c7c(1107)]=null,_0x310c53["bmpDownloadFlag"]=!1):_0x310c53[_0x861c7c(1163)](_0x523e1d,"GetCropImage."+_0x5bcc4b),(_0x523e1d=null)!=_0x12e494&&(_0x2cfc34["_free"](_0x12e494),_0x12e494=null),null!=_0x38baf6&&_0x2cfc34[_0x861c7c(573)](_0x38baf6)}}},0)}},{key:_0x72d96d(1547),value:function(){var _0x43e4ad=_0x72d96d,_0x253a0d=0<arguments[_0x43e4ad(525)]&&void 0!==arguments[0]?arguments[0]:null,_0x536351=!(1<arguments[_0x43e4ad(525)]&&void 0!==arguments[1])||arguments[1];if(this["jpegDataCallback"]=_0x253a0d,this[_0x43e4ad(1146)]=_0x536351,1===this[_0x43e4ad(1081)])return this[_0x43e4ad(549)]?this[_0x43e4ad(877)][_0x43e4ad(1086)]({command:_0x43e4ad(784)}):null!=this[_0x43e4ad(1058)]&&this[_0x43e4ad(1058)]["GetJPEG"](),1;var _0x366b3c=_0x2cfc34["_JSPlayM4_GetFrameInfo"](this["port"]);if(this["width"]=_0x2cfc34[_0x43e4ad(1039)][_0x366b3c+12>>2],this[_0x43e4ad(1384)]=_0x2cfc34[_0x43e4ad(1039)][_0x366b3c+16>>2],0==this[_0x43e4ad(1454)]||0==this["height"])return 0;var _0x1c7c55,_0x3065d3,_0x366b3c=this["width"]*this["height"]*4+60;if(!(null==this["pJpegData"]||this[_0x43e4ad(1247)]<_0x366b3c)||(null!=this[_0x43e4ad(372)]&&(_0x2cfc34[_0x43e4ad(573)](this[_0x43e4ad(372)]),this[_0x43e4ad(372)]=null),this["nJPEGDataSize"]=_0x366b3c,this[_0x43e4ad(372)]=_0x2cfc34[_0x43e4ad(1420)](this["nJPEGDataSize"]),null!==this[_0x43e4ad(372)]))return null==this["pJPEGSizeData"]&&(this["pJPEGSizeData"]=_0x2cfc34[_0x43e4ad(1420)](4)),_0x366b3c=_0x2cfc34[_0x43e4ad(498)](this[_0x43e4ad(798)],this[_0x43e4ad(372)],this[_0x43e4ad(1247)],this["pJPEGSizeData"]),1!=_0x366b3c&&(_0x1c7c55=_0x2cfc34[_0x43e4ad(972)](this["port"]),console[_0x43e4ad(1590)](_0x43e4ad(695)+_0x1c7c55)),1==_0x366b3c&&(_0x1c7c55=_0x2cfc34[_0x43e4ad(1461)](this[_0x43e4ad(1040)],_0x43e4ad(1298)),(_0x3065d3=new Uint8Array(_0x1c7c55))[_0x43e4ad(483)](_0x2cfc34[_0x43e4ad(447)][_0x43e4ad(350)](this[_0x43e4ad(372)],this["pJpegData"]+_0x1c7c55)),null!=_0x253a0d&&_0x253a0d(_0x3065d3,_0x1c7c55),_0x536351&&this["_downloadFile"](_0x3065d3,"GetJPEG.jpeg"),this["jpegDataCallback"]=_0x3065d3=null,this[_0x43e4ad(1146)]=!1),_0x366b3c}},{key:_0x72d96d(1114),value:function(){var _0x3922a6=_0x72d96d,_0x5e197b=0<arguments[_0x3922a6(525)]&&void 0!==arguments[0]?arguments[0]:null,_0x4253d8=!(1<arguments[_0x3922a6(525)]&&void 0!==arguments[1])||arguments[1];if(this["bmpDataCallback"]=_0x5e197b,this[_0x3922a6(589)]=_0x4253d8,1===this[_0x3922a6(1081)])return this["hasWebWorker"]?this["decodeWorker"]["postMessage"]({command:_0x3922a6(1351)}):null!=this[_0x3922a6(1058)]&&this[_0x3922a6(1058)][_0x3922a6(1351)](),1;var _0x563d04=_0x2cfc34[_0x3922a6(635)](this["port"]);if(this[_0x3922a6(1454)]=_0x2cfc34[_0x3922a6(1039)][_0x563d04+12>>2],this[_0x3922a6(1384)]=_0x2cfc34[_0x3922a6(1039)][_0x563d04+16>>2],0==this[_0x3922a6(1454)]||0==this[_0x3922a6(1384)])return 0;var _0x12d3fc,_0x563d04=0,_0x563d04=704!=this[_0x3922a6(1454)]||288!=this[_0x3922a6(1384)]&&240!=this[_0x3922a6(1384)]?this[_0x3922a6(1454)]*this[_0x3922a6(1384)]*4+60:this["width"]*this[_0x3922a6(1384)]*8+60;if(!(null==this[_0x3922a6(990)]||this["nBmpDataSize"]<_0x563d04)||(null!=this["pBmpData"]&&(_0x2cfc34[_0x3922a6(573)](this[_0x3922a6(990)]),this[_0x3922a6(990)]=null),this[_0x3922a6(947)]=_0x563d04,this[_0x3922a6(990)]=_0x2cfc34[_0x3922a6(1420)](this[_0x3922a6(947)]),null!==this["pBmpData"]))return null==this[_0x3922a6(463)]&&(this[_0x3922a6(463)]=_0x2cfc34["_malloc"](4)),_0x563d04=_0x2cfc34[_0x3922a6(693)](this["port"],this[_0x3922a6(990)],this["nBmpDataSize"],this["pBmpSizeData"]),1!=_0x563d04&&(_0x12d3fc=_0x2cfc34[_0x3922a6(972)](this[_0x3922a6(798)]),console[_0x3922a6(1590)](_0x3922a6(695)+_0x12d3fc)),1==_0x563d04&&(_0x12d3fc=_0x2cfc34["getValue"](this[_0x3922a6(463)],_0x3922a6(1298)),(_0x563d04=new Uint8Array(_0x12d3fc))[_0x3922a6(483)](_0x2cfc34[_0x3922a6(447)][_0x3922a6(350)](this[_0x3922a6(990)],this[_0x3922a6(990)]+_0x12d3fc)),null!=_0x5e197b&&_0x5e197b(_0x563d04,_0x12d3fc),_0x4253d8&&this[_0x3922a6(1163)](_0x563d04,_0x3922a6(594)),this[_0x3922a6(1107)]=_0x563d04=null,this[_0x3922a6(589)]=!1),1}},{key:"JSPlayM4_GetCropJPEG",value:function(){var _0x26b297=_0x72d96d;if(1===this[_0x26b297(1081)])return this[_0x26b297(549)]?this["decodeWorker"]["postMessage"]({command:_0x26b297(1125)}):null!=this[_0x26b297(1058)]&&this[_0x26b297(1058)][_0x26b297(1125)](),1;var _0x5bbbfa=_0x2cfc34[_0x26b297(635)](this[_0x26b297(798)]);if(this[_0x26b297(1454)]=_0x2cfc34[_0x26b297(1039)][_0x5bbbfa+12>>2],this[_0x26b297(1384)]=_0x2cfc34["HEAP32"][_0x5bbbfa+16>>2],0==this["width"]||0==this[_0x26b297(1384)])return 0;var _0x5bbbfa=this[_0x26b297(1454)]*this[_0x26b297(1384)]*4+60,_0x57c188=_0x2cfc34["_malloc"](_0x5bbbfa),_0x1b1554=_0x2cfc34[_0x26b297(1420)](4),_0x580d29=this[_0x26b297(892)],_0x3dd1bf=this["SetDisRegionLeft"],_0x53441f=this[_0x26b297(501)],_0x1c02f5=this["SetDisRegionTop"];if(null!==_0x57c188)return _0x5bbbfa=_0x2cfc34[_0x26b297(1494)](this["port"],_0x57c188,_0x5bbbfa,_0x1b1554,0,0,_0x3dd1bf,_0x1c02f5,_0x53441f,_0x580d29),1!=_0x5bbbfa&&(_0x3dd1bf=_0x2cfc34[_0x26b297(972)](this[_0x26b297(798)]),console["log"](_0x26b297(695)+_0x3dd1bf)),1==_0x5bbbfa&&(_0x1c02f5=_0x2cfc34[_0x26b297(1461)](_0x1b1554,_0x26b297(1298)),(_0x53441f=new Uint8Array(_0x1c02f5))["set"](_0x2cfc34[_0x26b297(447)][_0x26b297(350)](_0x57c188,_0x57c188+_0x1c02f5)),this[_0x26b297(1163)](_0x53441f,_0x26b297(1045)),_0x53441f=null),null!=_0x57c188&&(_0x2cfc34[_0x26b297(573)](_0x57c188),_0x57c188=null),null!=_0x1b1554&&(_0x2cfc34["_free"](_0x1b1554),_0x1b1554=null),_0x5bbbfa}},{key:_0x72d96d(1314),value:function(){var _0x5dc06b=_0x72d96d;if(1===this[_0x5dc06b(1081)])return this[_0x5dc06b(549)]?this["decodeWorker"][_0x5dc06b(1086)]({command:_0x5dc06b(1417)}):null!=this["pcVideoManager"]&&this[_0x5dc06b(1058)][_0x5dc06b(1417)](),1;var _0x578420=_0x2cfc34[_0x5dc06b(635)](this["port"]);if(this[_0x5dc06b(1454)]=_0x2cfc34["HEAP32"][_0x578420+12>>2],this[_0x5dc06b(1384)]=_0x2cfc34["HEAP32"][_0x578420+16>>2],0==this[_0x5dc06b(1454)]||0==this[_0x5dc06b(1384)])return 0;var _0x578420=this[_0x5dc06b(1454)]*this[_0x5dc06b(1384)]*4+60,_0x41c32c=_0x2cfc34[_0x5dc06b(1420)](_0x578420),_0xdfc055=_0x2cfc34["_malloc"](4),_0x183aeb=this[_0x5dc06b(892)],_0x125d0e=this["SetDisRegionLeft"],_0x2ff83d=this[_0x5dc06b(501)],_0x3a47a6=this[_0x5dc06b(846)];if(null!==_0x41c32c)return _0x578420=_0x2cfc34[_0x5dc06b(951)](this[_0x5dc06b(798)],_0x41c32c,_0x578420,_0xdfc055,0,0,_0x125d0e,_0x3a47a6,_0x2ff83d,_0x183aeb),1!=_0x578420&&(_0x125d0e=_0x2cfc34[_0x5dc06b(972)](this[_0x5dc06b(798)]),console[_0x5dc06b(1590)](_0x5dc06b(695)+_0x125d0e)),1==_0x578420&&(_0x3a47a6=_0x2cfc34[_0x5dc06b(1461)](_0xdfc055,"i32"),(_0x2ff83d=new Uint8Array(_0x3a47a6))[_0x5dc06b(483)](_0x2cfc34[_0x5dc06b(447)][_0x5dc06b(350)](_0x41c32c,_0x41c32c+_0x3a47a6)),this[_0x5dc06b(1163)](_0x2ff83d,"GetCropBmp.bmp"),_0x2ff83d=null),null!=_0x41c32c&&(_0x2cfc34["_free"](_0x41c32c),_0x41c32c=null),null!=_0xdfc055&&(_0x2cfc34[_0x5dc06b(573)](_0xdfc055),_0xdfc055=null),1}},{key:_0x72d96d(1285),value:function(){var _0x1460bd=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x1460bd(421)]()}},{key:_0x72d96d(1250),value:function(){var _0x196d10=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x196d10(401)]()}},{key:"JSPlayM4_GetBuildDate",value:function(){return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_GetBuildDate"]()}},{key:"JSPlayM4_GetLastError",value:function(){var _0x3216ba=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x3216ba(972)](this[_0x3216ba(798)])}},{key:_0x72d96d(773),value:function(){var _0x584562=_0x72d96d;if(null===_0x2cfc34)return 0;if(0===this[_0x584562(1326)])return 1;if(1===this[_0x584562(1081)]){if(this[_0x584562(549)]){if(null===this[_0x584562(877)])return 0;this[_0x584562(877)][_0x584562(1086)]({command:_0x584562(1589)})}else null!=this["pcVideoManager"]&&this[_0x584562(1058)]["fast"]()}var _0x139051=_0x2cfc34[_0x584562(543)](this[_0x584562(798)]);return 1==_0x139051&&(this[_0x584562(1147)]=2*this[_0x584562(1147)]),_0x139051}},{key:_0x72d96d(1220),value:function(){var _0x49314e=_0x72d96d;if(null===_0x2cfc34)return 0;if(0===this[_0x49314e(1326)])return 1;if(1===this[_0x49314e(1081)]){if(this[_0x49314e(549)]){if(null===this[_0x49314e(877)])return 0;this[_0x49314e(877)]["postMessage"]({command:"slow"})}else null!=this["pcVideoManager"]&&this[_0x49314e(1058)]["slow"]()}var _0x49dfe0=_0x2cfc34["_JSPlayM4_Slow"](this["port"]);return 1==_0x49dfe0&&(this[_0x49314e(1147)]=this[_0x49314e(1147)]/2),console[_0x49314e(1590)](_0x49314e(1263)+this["playSpeed"]),_0x49dfe0}},{key:_0x72d96d(793),value:function(_0x4f2bb8){var _0x1c5199=_0x72d96d;return null===_0x2cfc34?0:1===this["decodeEngine"]?1:_0x2cfc34[_0x1c5199(1115)](this[_0x1c5199(798)],_0x4f2bb8)}},{key:_0x72d96d(1055),value:function(_0xd52e){var _0x20acb8=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x20acb8(751)](this[_0x20acb8(798)],_0xd52e)}},{key:_0x72d96d(966),value:function(_0x1fafc9){var _0x304e77=_0x72d96d;return null===_0x2cfc34?0:0===this[_0x304e77(1326)]?1:(1===this[_0x304e77(1081)]&&(this["hasWebWorker"]?this["decodeWorker"][_0x304e77(1086)]({command:_0x304e77(1080),value:_0x1fafc9}):null!=this["pcVideoManager"]&&this[_0x304e77(1058)]["Pause"](_0x1fafc9)),_0x2cfc34["_JSPlayM4_Pause"](this[_0x304e77(798)],_0x1fafc9))}},{key:"JSPlayM4_OneByOne",value:function(){var _0x11e92e=_0x72d96d;return null===_0x2cfc34?0:0===this["streamOpenMode"]?1:(this[_0x11e92e(1463)]=5,1===this[_0x11e92e(1081)]&&(this["hasWebWorker"]?this[_0x11e92e(877)][_0x11e92e(1086)]({command:_0x11e92e(869),value:1}):null!=this[_0x11e92e(1058)]&&this["pcVideoManager"][_0x11e92e(869)](1)),_0x2cfc34[_0x11e92e(799)](this[_0x11e92e(798)]))}},{key:"JSPlayM4_OneByOneResume",value:function(){var _0x3c3431=_0x72d96d;return null===_0x2cfc34?0:0===this[_0x3c3431(1326)]?1:(this[_0x3c3431(1463)]=2,1===this[_0x3c3431(1081)]&&(this["hasWebWorker"]?this["decodeWorker"][_0x3c3431(1086)]({command:"OneByOne",value:0}):null!=this[_0x3c3431(1058)]&&this[_0x3c3431(1058)][_0x3c3431(869)](0)),_0x2cfc34["_JSPlayM4_Play"](this[_0x3c3431(798)],this[_0x3c3431(1433)]))}},{key:_0x72d96d(1452),value:function(_0x4e255f){var _0x136eb3=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x136eb3(499)](this[_0x136eb3(798)],_0x4e255f)}},{key:_0x72d96d(330),value:function(){var _0x1d1cfd=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x1d1cfd(912)](this["port"])}},{key:"JSPlayM4_SetDisplayRegion",value:function(_0x24fb47,_0x57f6ab,_0x2b130b,_0xf96032,_0x3217b8){var _0x51cea1=_0x72d96d,_0x2a58e4=5<arguments[_0x51cea1(525)]&&void 0!==arguments[5]&&arguments[5],_0x4be3d0=!(6<arguments["length"]&&void 0!==arguments[6])||arguments[6];if(null===_0x2cfc34)return 0;var _0xbbc657=1,_0x24b770=_0x57f6ab,_0x5e87c9=_0xf96032,_0xeb1174=_0x2b130b,_0x18bc1e=_0x3217b8;if("number"!=typeof _0x57f6ab||_0x51cea1(911)!=typeof _0xf96032||_0x51cea1(911)!=typeof _0x2b130b||"number"!=typeof _0x3217b8)return console["log"](_0x51cea1(681)),0;if(_0x2a58e4)_0xeb1174=this[_0x51cea1(363)],_0x18bc1e=this[_0x51cea1(1421)],this["iZoomNum"]=_0x5e87c9=_0x24b770=0,this[_0x51cea1(397)]=1,this[_0x51cea1(435)]=1;else{if(_0x4be3d0){if(_0x24b770<0||_0xeb1174<0||_0x5e87c9<0||_0x18bc1e<0)return 0;0!==this[_0x51cea1(621)]&&(_0x24b770=Math[_0x51cea1(1437)](_0x24b770/this["iRatio_x"])+this[_0x51cea1(847)][_0x51cea1(1161)],_0x5e87c9=Math[_0x51cea1(1437)](_0x5e87c9/this[_0x51cea1(435)])+this[_0x51cea1(847)][_0x51cea1(449)],_0xeb1174=Math[_0x51cea1(1437)](_0xeb1174/this[_0x51cea1(397)])+this[_0x51cea1(847)][_0x51cea1(1161)],_0x18bc1e=Math[_0x51cea1(1437)](_0x18bc1e/this[_0x51cea1(435)])+this[_0x51cea1(847)][_0x51cea1(449)])}}if(this[_0x51cea1(847)]={top:_0x5e87c9,left:_0x24b770,right:_0xeb1174,bottom:_0x18bc1e},_0xeb1174-_0x24b770<16||_0x18bc1e-_0x5e87c9<16||_0xeb1174-_0x24b770>this[_0x51cea1(363)]||_0x18bc1e-_0x5e87c9>this[_0x51cea1(1421)])return console["log"](_0x51cea1(686)+_0x57f6ab+_0x51cea1(905)+_0x2b130b+_0x51cea1(632)+_0xf96032+_0x51cea1(833)+_0x3217b8+",bClose:"+_0x2a58e4+_0x51cea1(1344)+_0x4be3d0+_0x51cea1(1284)+this[_0x51cea1(621)]+_0x51cea1(574)+this["canvasWidth"]+_0x51cea1(933)+this["canvasHeight"]),0;if(1===this[_0x51cea1(1081)]){if(this[_0x51cea1(892)]=_0x18bc1e/this[_0x51cea1(1421)]*this[_0x51cea1(1384)],this["SetDisRegionLeft"]=_0x24b770/this["canvasWidth"]*this[_0x51cea1(1454)],this[_0x51cea1(501)]=_0xeb1174/this["canvasWidth"]*this["width"],this[_0x51cea1(846)]=_0x5e87c9/this[_0x51cea1(1421)]*this[_0x51cea1(1384)],this["hasWebWorker"]){if(null===this[_0x51cea1(877)])return 0;this[_0x51cea1(877)]["postMessage"]({command:_0x51cea1(1053),sx:this[_0x51cea1(829)],sy:this[_0x51cea1(846)],sw:this["SetDisRegionRight"]-this[_0x51cea1(829)],sh:this["SetDisRegionBottom"]-this[_0x51cea1(846)]})}else null!=this[_0x51cea1(1058)]&&this[_0x51cea1(1058)][_0x51cea1(1053)](this["SetDisRegionLeft"],this[_0x51cea1(846)],this["SetDisRegionRight"]-this[_0x51cea1(829)],this[_0x51cea1(892)]-this[_0x51cea1(846)])}else _0x57f6ab=_0x2cfc34[_0x51cea1(635)](this[_0x51cea1(798)]),this["width"]=_0x2cfc34[_0x51cea1(1039)][_0x57f6ab+12>>2],this[_0x51cea1(1384)]=_0x2cfc34[_0x51cea1(1039)][_0x57f6ab+16>>2],this[_0x51cea1(892)]=_0x18bc1e/this[_0x51cea1(1421)]*this["height"],this[_0x51cea1(829)]=_0x24b770/this["canvasWidth"]*this[_0x51cea1(1454)],this[_0x51cea1(501)]=_0xeb1174/this[_0x51cea1(363)]*this["width"],this["SetDisRegionTop"]=_0x5e87c9/this[_0x51cea1(1421)]*this[_0x51cea1(1384)],_0xbbc657=_0x2cfc34[_0x51cea1(465)](this["port"],this[_0x51cea1(1159)],this[_0x51cea1(829)],this[_0x51cea1(501)],this[_0x51cea1(846)],this["SetDisRegionBottom"]);return _0x4be3d0&&(this[_0x51cea1(397)]=this[_0x51cea1(363)]/(_0xeb1174-_0x24b770),this[_0x51cea1(435)]=this[_0x51cea1(1421)]/(_0x18bc1e-_0x5e87c9),this["iZoomNum"]++),_0xbbc657}},{key:_0x72d96d(427),value:function(_0x219b60){var _0x2c5cdf=_0x72d96d;return null===_0x2cfc34?0:(this[_0x2c5cdf(531)]=Number(_0x219b60),_0x2cfc34[_0x2c5cdf(1064)](this[_0x2c5cdf(798)],_0x219b60))}},{key:_0x72d96d(1160),value:function(_0x2f51cf,_0x42ca1c){var _0x1dd4c1=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x1dd4c1(790)](this[_0x1dd4c1(798)],_0x2f51cf,_0x42ca1c)}},{key:"JSPlayM4_RenderPrivateDataEx",value:function(_0x1a3b9c,_0x3a837f,_0x527b7f){var _0x26675f=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x26675f(1219)](this[_0x26675f(798)],_0x1a3b9c,_0x3a837f,_0x527b7f)}},{key:_0x72d96d(438),value:function(_0x4ed993,_0x5e8213){var _0x202077=_0x72d96d,_0x2e182c=2<arguments[_0x202077(525)]&&void 0!==arguments[2]?arguments[2]:0;if(_0x4ed993<16||_0x5e8213<16||null===this[_0x202077(1159)])return 0;if(this[_0x202077(363)]=_0x4ed993,this[_0x202077(1421)]=_0x5e8213,1!==this[_0x202077(1081)])return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_SetCanvasSize"](this[_0x202077(798)],_0x4ed993,_0x5e8213,_0x2e182c);if(this[_0x202077(549)]){if(null==this["decodeWorker"])return 0;this["decodeWorker"][_0x202077(1086)]({command:"SetCanvasSize",width:_0x4ed993,height:_0x5e8213})}else null!=this[_0x202077(1058)]&&this[_0x202077(1058)]["SetCanvasSize"](_0x4ed993,_0x5e8213);return 1}},{key:_0x72d96d(1466),value:function(_0x251763){var _0x1f3ef6=_0x72d96d;return null===_0x2cfc34?0:(1===this[_0x1f3ef6(1081)]&&(this[_0x1f3ef6(549)]?null===this[_0x1f3ef6(877)]?this[_0x1f3ef6(1498)]=_0x251763:this[_0x1f3ef6(877)][_0x1f3ef6(1086)]({command:_0x1f3ef6(1047),value:_0x251763}):null!=this["pcVideoManager"]&&this[_0x1f3ef6(1058)]["SetDisplayBuf"](_0x251763)),_0x2cfc34["_JSPlayM4_SetDisplayBuf"](this[_0x1f3ef6(798)],_0x251763))}},{key:_0x72d96d(404),value:function(){var _0x494af7=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x494af7(680)](this[_0x494af7(798)])}},{key:_0x72d96d(973),value:function(_0x295555){var _0x5bf225=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x5bf225(923)](this["port"],_0x295555)}},{key:_0x72d96d(1151),value:function(){var _0x2cf5d5=_0x72d96d;return null===_0x2cfc34?0:0===this[_0x2cf5d5(1326)]?1:_0x2cfc34["_JSPlayM4_ReversePlay"](this[_0x2cf5d5(798)])}},{key:_0x72d96d(1562),value:function(_0x34d2b7){return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_SetDecodeThreadNum"](this["port"],_0x34d2b7)}},{key:_0x72d96d(1509),value:function(){var _0x44c216=_0x72d96d,_0x1f6b93=0<arguments[_0x44c216(525)]&&void 0!==arguments[0]?arguments[0]:0;return null===_0x2cfc34?0:1===this[_0x44c216(1081)]?(this[_0x44c216(549)]?this["decodeWorker"][_0x44c216(1086)]({command:_0x44c216(1370)}):null!=this["pcVideoManager"]&&this["pcVideoManager"][_0x44c216(1370)](),1):_0x2cfc34[_0x44c216(753)](this[_0x44c216(798)],_0x1f6b93)}},{key:_0x72d96d(1291),value:function(_0x418cce,_0x44f412,_0x1b99c0){var _0x2835d9=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_DisplayLostFrames"](this[_0x2835d9(798)],_0x418cce,_0x44f412,_0x1b99c0)}},{key:"JSPlayM4_SetANRParam",value:function(_0x3a9d44,_0x149969){var _0x5c17a7=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x5c17a7(651)](this[_0x5c17a7(798)],_0x3a9d44,_0x149969)}},{key:"JSPlayM4_SetResampleValue",value:function(_0x13fd40,_0x171d86){var _0x27fde1=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x27fde1(423)](this["port"],_0x13fd40,_0x171d86)}},{key:"JSPlayM4_SetAntialias",value:function(_0x3d4bf8){var _0x192704=_0x72d96d,_0x5ed887=1;if(1===this[_0x192704(1081)])this[_0x192704(549)]?null!=this[_0x192704(877)]&&this[_0x192704(877)][_0x192704(1086)]({command:_0x192704(558),value:_0x3d4bf8}):null!=this[_0x192704(1058)]&&(_0x5ed887=this["pcVideoManager"][_0x192704(558)](_0x3d4bf8));else{if(null===_0x2cfc34)return 0;_0x5ed887=_0x2cfc34[_0x192704(1353)](this[_0x192704(798)],_0x3d4bf8)}return _0x5ed887}},{key:_0x72d96d(361),value:function(_0x4e7bc9){var _0x44dde7=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x44dde7(333)](this[_0x44dde7(798)],_0x4e7bc9)}},{key:"JSPlayM4_SetAudioThreadModel",value:function(_0x463c1a){return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_SetAudioThreadModel"](this["port"],_0x463c1a)}},{key:"JSPlayM4_SetDecodeERC",value:function(_0x1d3f13){var _0x3404bd=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x3404bd(1499)](this[_0x3404bd(798)],_0x1d3f13)}},{key:"JSPlayM4_SkipErrorData",value:function(_0x4b805d){var _0x277873=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_SkipErrorData"](this[_0x277873(798)],_0x4b805d)}},{key:_0x72d96d(899),value:function(_0x43fd90,_0x109880){var _0x99dff2=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x99dff2(1484)](this[_0x99dff2(798)],_0x43fd90,_0x109880)}},{key:_0x72d96d(1214),value:function(_0x4b6aa1,_0x5d5236){var _0x339ba7=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_SetD3DPostProcess"](this[_0x339ba7(798)],_0x4b6aa1,_0x5d5236)}},{key:_0x72d96d(323),value:function(_0x35f601,_0x4ff5e7){var _0x43d852=_0x72d96d;if(!(_0x4ff5e7&&"function"==typeof _0x4ff5e7||null===_0x4ff5e7))return 0;if(this[_0x43d852(409)]=_0x4ff5e7,null===_0x2cfc34)return 0;return _0x4ff5e7=1,_0x4ff5e7=0===this[_0x43d852(1081)]?_0x2cfc34["_JSPlayM4_SetFirstFrameCallBack"](this[_0x43d852(798)],_0x35f601,this[_0x43d852(1591)]):_0x4ff5e7}},{key:_0x72d96d(967),value:function(_0x2fea1f,_0x51544e){var _0x2fe7f7=_0x72d96d;return _0x51544e&&_0x2fe7f7(1536)==typeof _0x51544e||null===_0x51544e?(this[_0x2fe7f7(1164)]=_0x51544e,null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_SetDecCallBack"](this["port"],_0x2fea1f,this[_0x2fe7f7(1591)])):0}},{key:_0x72d96d(316),value:function(_0x3180f7,_0x20bf3f){var _0xf1f135=_0x72d96d;return _0x20bf3f&&_0xf1f135(1536)==typeof _0x20bf3f||null===_0x20bf3f?(this[_0xf1f135(1327)]=_0x20bf3f,null===_0x2cfc34?0:_0x2cfc34[_0xf1f135(636)](this[_0xf1f135(798)],_0x3180f7,this[_0xf1f135(1591)])):0}},{key:_0x72d96d(1519),value:function(_0x2685c7){var _0x2588a8=_0x72d96d,_0x4c2f93=this,_0x1866f7=1;return 1===this[_0x2588a8(1081)]?this["hasWebWorker"]?null!=this[_0x2588a8(877)]&&this[_0x2588a8(877)][_0x2588a8(1086)]({command:_0x2588a8(1203),value:_0x2685c7}):null!=this[_0x2588a8(1058)]&&(_0x1866f7=this[_0x2588a8(1058)][_0x2588a8(1203)](function(_0x4429b8){var _0x34c121=_0x2588a8;_0x4c2f93[_0x34c121(1254)]["port"]=_0x4429b8[_0x34c121(798)],_0x4c2f93[_0x34c121(1254)][_0x34c121(714)]=_0x4429b8["codecType"],_0x4c2f93[_0x34c121(1254)][_0x34c121(952)]=_0x4429b8["frameType"],_0x4c2f93[_0x34c121(1254)][_0x34c121(1119)]=_0x4429b8[_0x34c121(1119)],_0x4c2f93[_0x34c121(1254)][_0x34c121(1454)]=_0x4429b8[_0x34c121(1454)],_0x4c2f93[_0x34c121(1254)][_0x34c121(1384)]=_0x4429b8[_0x34c121(1384)],_0x4c2f93[_0x34c121(1254)][_0x34c121(432)]=_0x4429b8[_0x34c121(432)],_0x4c2f93[_0x34c121(1254)]["frameRate"]=_0x4429b8["frameRate"],_0x4c2f93[_0x34c121(1254)][_0x34c121(666)]=_0x4429b8["frameNum"],_0x4c2f93[_0x34c121(1254)][_0x34c121(389)]=_0x4429b8[_0x34c121(389)],_0x4c2f93[_0x34c121(1254)][_0x34c121(1070)]=_0x4429b8[_0x34c121(1070)],_0x4c2f93[_0x34c121(1254)]["cropLeft"]=_0x4429b8[_0x34c121(1444)],_0x4c2f93[_0x34c121(1254)][_0x34c121(1552)]=_0x4429b8[_0x34c121(1552)],_0x4c2f93[_0x34c121(1254)][_0x34c121(633)]=_0x4429b8[_0x34c121(633)],_0x4c2f93[_0x34c121(1254)][_0x34c121(1429)]=_0x4429b8[_0x34c121(1429)],_0x4c2f93["displayFrameInfo"][_0x34c121(628)]=_0x4429b8[_0x34c121(628)],_0x4c2f93[_0x34c121(1254)][_0x34c121(500)]=_0x4429b8[_0x34c121(500)],_0x4c2f93[_0x34c121(1254)]["week"]=_0x4429b8[_0x34c121(727)],_0x4c2f93["displayFrameInfo"][_0x34c121(394)]=_0x4429b8["day"],_0x4c2f93[_0x34c121(1254)][_0x34c121(1380)]=_0x4429b8["hour"],_0x4c2f93[_0x34c121(1254)][_0x34c121(1088)]=_0x4429b8[_0x34c121(1088)],_0x4c2f93[_0x34c121(1254)][_0x34c121(939)]=_0x4429b8["second"],_0x4c2f93["displayFrameInfo"][_0x34c121(1221)]=_0x4429b8[_0x34c121(1221)]},_0x2685c7)):_0x1866f7=_0x2cfc34[_0x2588a8(968)](this[_0x2588a8(798)],_0x2685c7),_0x1866f7}},{key:_0x72d96d(805),value:function(_0x127b19){var _0x32a576=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34[_0x32a576(571)](this[_0x32a576(798)],_0x127b19)}},{key:_0x72d96d(1135),value:function(){var _0x1943ae=_0x72d96d;if(null===_0x2cfc34)return 0;var _0x15e4b4,_0x1e29e0={};return 0==this[_0x1943ae(1081)]?(_0x15e4b4=_0x2cfc34[_0x1943ae(635)](this["port"]),_0x1e29e0[_0x1943ae(798)]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4>>2],_0x1e29e0["frameType"]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+4>>2],_0x1e29e0[_0x1943ae(1119)]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+8>>2],_0x1e29e0[_0x1943ae(1454)]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+12>>2],_0x1e29e0["height"]=_0x2cfc34["HEAP32"][_0x15e4b4+16>>2],_0x1e29e0[_0x1943ae(432)]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+20>>2],_0x1e29e0[_0x1943ae(964)]=_0x2cfc34["HEAP32"][_0x15e4b4+24>>2],_0x1e29e0[_0x1943ae(1248)]=_0x2cfc34["HEAP32"][_0x15e4b4+28>>2],_0x1e29e0[_0x1943ae(1316)]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+32>>2],_0x1e29e0[_0x1943ae(1371)]=_0x2cfc34["HEAP32"][_0x15e4b4+36>>2],_0x1e29e0["frameNum"]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+40>>2],_0x1e29e0[_0x1943ae(1444)]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+44>>2],_0x1e29e0[_0x1943ae(1552)]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+48>>2],_0x1e29e0[_0x1943ae(633)]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+52>>2],_0x1e29e0["cropBottom"]=_0x2cfc34[_0x1943ae(1039)][_0x15e4b4+56>>2],_0x1e29e0[_0x1943ae(628)]=_0x2cfc34["HEAP16"][_0x15e4b4+60>>1],_0x1e29e0["month"]=_0x2cfc34[_0x1943ae(1006)][_0x15e4b4+62>>1],_0x1e29e0["week"]=_0x2cfc34[_0x1943ae(1006)][_0x15e4b4+64>>1],_0x1e29e0[_0x1943ae(394)]=_0x2cfc34[_0x1943ae(1006)][_0x15e4b4+66>>1],_0x1e29e0["hour"]=_0x2cfc34[_0x1943ae(1006)][_0x15e4b4+68>>1],_0x1e29e0["minute"]=_0x2cfc34["HEAP16"][_0x15e4b4+70>>1],_0x1e29e0["second"]=_0x2cfc34[_0x1943ae(1006)][_0x15e4b4+72>>1],_0x1e29e0["milliseconds"]=_0x2cfc34[_0x1943ae(1006)][_0x15e4b4+74>>1],this[_0x1943ae(1454)]=_0x1e29e0["width"],this[_0x1943ae(1384)]=_0x1e29e0[_0x1943ae(1384)]):_0x1e29e0=this[_0x1943ae(1254)],_0x1e29e0}},{key:_0x72d96d(878),value:function(){var _0x4eb1e5=_0x72d96d;if(null===_0x2cfc34)return 0;var _0x135d92=_0x2cfc34[_0x4eb1e5(1122)](this[_0x4eb1e5(798)]);return null[_0x4eb1e5(1290)]=_0x2cfc34[_0x4eb1e5(1039)][_0x135d92>>2],null[_0x4eb1e5(758)]=_0x2cfc34[_0x4eb1e5(1039)][_0x135d92+4>>2],null[_0x4eb1e5(1148)]=_0x2cfc34[_0x4eb1e5(1039)][_0x135d92+8>>2],null[_0x4eb1e5(596)]=_0x2cfc34[_0x4eb1e5(1039)][_0x135d92+12>>2],null[_0x4eb1e5(1567)]=_0x2cfc34[_0x4eb1e5(1039)][_0x135d92+16>>2],null[_0x4eb1e5(1592)]=new Uint8Array(dataLength),additionDataBuffer["set"](_0x2cfc34[_0x4eb1e5(447)][_0x4eb1e5(350)](pData,pData+dataLength)),null}},{key:_0x72d96d(1557),value:function(_0x5c8863,_0x5e0d08,_0x42a1c1){var _0x35e3b6=_0x72d96d;return null!==_0x2cfc34&&(_0x42a1c1&&_0x35e3b6(1536)==typeof _0x42a1c1||null===_0x42a1c1)?(this[_0x35e3b6(367)]=_0x42a1c1,_0x2cfc34["_JSPlayM4_SetAdditionDataCallBack"](this[_0x35e3b6(798)],_0x5c8863,_0x5e0d08,this[_0x35e3b6(1591)])):0}},{key:_0x72d96d(428),value:function(_0x48ea7c){var _0x14f777=_0x72d96d;return null!==_0x2cfc34&&(_0x48ea7c&&_0x14f777(1536)==typeof _0x48ea7c||null===_0x48ea7c)?(this["getPlayTimeCallBackFun"]=_0x48ea7c,void(1===this[_0x14f777(1081)]?this[_0x14f777(549)]?this[_0x14f777(877)][_0x14f777(1086)]({command:_0x14f777(768)}):null!=this[_0x14f777(1058)]&&(_0x48ea7c=this["pcVideoManager"][_0x14f777(768)](),this["getPlayTimeCallBackFun"]&&this[_0x14f777(476)](_0x48ea7c-this["startTimeStamp"])):(_0x48ea7c=_0x2cfc34[_0x14f777(1028)](this[_0x14f777(798)]),this["getPlayTimeCallBackFun"](_0x48ea7c)))):0}},{key:_0x72d96d(909),value:function(){var _0x1d0bc6=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_GetFileTime"](this[_0x1d0bc6(798)])}},{key:_0x72d96d(839),value:function(_0x850bfb){var _0x193aec=_0x72d96d;return null===_0x2cfc34?0:this[_0x193aec(909)]()<_0x850bfb?-1:(1===this["decodeEngine"]&&(this["hasWebWorker"]?this[_0x193aec(877)][_0x193aec(1086)]({command:_0x193aec(1388)}):null!=this[_0x193aec(1058)]&&this[_0x193aec(1058)][_0x193aec(1388)]()),_0x2cfc34[_0x193aec(770)](this[_0x193aec(798)],_0x850bfb))}},{key:_0x72d96d(592),value:function(_0x247c5e){return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_ResetBuffer"](this["port"],_0x247c5e)}},{key:_0x72d96d(822),value:function(_0x302fc2,_0x22b358,_0x3279f2,_0x476e50,_0x8f40a,_0x5e7422,_0x44b82f){var _0xea208e=_0x72d96d;return null===_0x2cfc34?0:_0x2cfc34["_JSPlayM4_SetGlobalBaseTime"](this[_0xea208e(798)],_0x302fc2,_0x22b358,_0x3279f2,_0x476e50,_0x8f40a,_0x5e7422,_0x44b82f)}},{key:"JSPlayM4_SetSecretKey",value:function(_0x420fd0){var _0x4653c4=_0x72d96d,_0x51839d,_0x41e764,_0x420fd0=this[_0x4653c4(619)](_0x420fd0),_0x502e8f=_0x2cfc34[_0x4653c4(1420)](128);if(null!==_0x502e8f)return _0x51839d=_0x2cfc34[_0x4653c4(447)]["subarray"](_0x502e8f,_0x502e8f+128),_0x41e764=new Uint8Array(128),_0x51839d["set"](_0x41e764,0),_0x51839d[_0x4653c4(483)](new Uint8Array(_0x420fd0)),_0x41e764=_0x51839d=null,_0x420fd0=_0x2cfc34[_0x4653c4(769)](this["port"],1,_0x502e8f,128),null!==_0x502e8f&&_0x2cfc34[_0x4653c4(573)](_0x502e8f),_0x420fd0}},{key:_0x72d96d(344),value:function(_0x5df393,_0x1acc13){var _0x59bb40=_0x72d96d;return this[_0x59bb40(448)]=_0x1acc13,_0x2cfc34[_0x59bb40(738)](this[_0x59bb40(798)],_0x5df393,this[_0x59bb40(1591)])}},{key:_0x72d96d(583),value:function(_0x4fe986){var _0x20b77c=_0x72d96d;return 0==this[_0x20b77c(1081)]?_0x2cfc34["_JSPlayM4_SetPlayOrBackSwitchMode"](this["port"],_0x4fe986):0}},{key:_0x72d96d(395),value:function(_0x582c94){var _0xa69ad2=_0x72d96d;return _0x2cfc34[_0xa69ad2(789)](this[_0xa69ad2(798)],_0x582c94)}},{key:_0x72d96d(1330),value:function(_0x28b2ca){var _0x24595e=_0x72d96d;return _0x2cfc34[_0x24595e(771)](this[_0x24595e(798)],_0x28b2ca)}},{key:_0x72d96d(866),value:function(){var _0xccc12c=_0x72d96d,_0x5d15b1=0<arguments[_0xccc12c(525)]&&void 0!==arguments[0]?arguments[0]:null,_0x58355d=1;if(null!=_0x5d15b1&&""!=_0x5d15b1){if(this[_0xccc12c(1176)]=_0x5d15b1["split"](","),1!==this[_0xccc12c(1081)]){for(var _0x3c142c="",_0x2ec646=0;_0x2ec646<this[_0xccc12c(1176)][_0xccc12c(525)];_0x2ec646++)_0x2ec646==this[_0xccc12c(1176)]["length"]-1?_0x3c142c+="#"+this[_0xccc12c(1176)][_0x2ec646]:_0x3c142c+="#"+this["FECcanvasIDArray"][_0x2ec646]+",";if(0!=this[_0xccc12c(1176)][_0xccc12c(525)])for(var _0x240369=0;_0x240369<this[_0xccc12c(1176)]["length"];_0x240369++){var _0xf6b938,_0xf74625=document[_0xccc12c(380)](this[_0xccc12c(1176)][_0x240369]);_0xf74625&&(_0xf6b938=_0xf74625[_0xccc12c(1402)](!0),_0xf74625["parentNode"]["replaceChild"](_0xf6b938,_0xf74625))}var _0x17ae93=this[_0xccc12c(619)](_0x3c142c),_0x508c06=2*_0x3c142c[_0xccc12c(525)];if(this["pFECTotalCanvasIDData"]=_0x2cfc34[_0xccc12c(1420)](_0x508c06),null===this[_0xccc12c(1068)])return 0;var _0x384205=_0x2cfc34[_0xccc12c(447)][_0xccc12c(350)](this["pFECTotalCanvasIDData"],this[_0xccc12c(1068)]+_0x508c06),_0x508c06=new Uint8Array(_0x508c06);_0x384205[_0xccc12c(483)](_0x508c06,0),_0x384205[_0xccc12c(483)](new Uint8Array(_0x17ae93)),_0x384205=null,_0x58355d=_0x2cfc34[_0xccc12c(765)](this[_0xccc12c(798)],this[_0xccc12c(1068)])}}else console[_0xccc12c(1590)](_0xccc12c(1056)+_0x5d15b1),_0x58355d=0;return _0x58355d}},{key:"JSPlayM4_FEC_ResetCorrectType",value:function(_0xe72f15,_0x2c0726,_0x526722){var _0x4b11e4=_0x72d96d,_0x432efc=1;return 1===this["decodeEngine"]?this["hasWebWorker"]?null!=this[_0x4b11e4(877)]?this[_0x4b11e4(877)][_0x4b11e4(1086)]({command:_0x4b11e4(1280),fishSubPort:_0xe72f15,placeType:_0x2c0726,correctType:_0x526722}):_0x432efc=0:_0x432efc=null!=this[_0x4b11e4(1058)]?this[_0x4b11e4(1058)][_0x4b11e4(1206)](_0xe72f15,_0x2c0726,_0x526722):0:_0x432efc=_0x2cfc34[_0x4b11e4(1339)](this[_0x4b11e4(798)],_0xe72f15,_0x2c0726,_0x526722),_0x432efc}},{key:_0x72d96d(1576),value:function(_0x5b574d,_0x1d8642){var _0x2bdb1b=_0x72d96d;this[_0x2bdb1b(531)]&&console[_0x2bdb1b(1590)](_0x2bdb1b(781)+this[_0x2bdb1b(1081)]+_0x2bdb1b(513)+_0x5b574d+",correctType:"+_0x1d8642);var _0x4a0a6b=1;return 0==this[_0x2bdb1b(696)]?(console["log"](_0x2bdb1b(516)),_0x4a0a6b=_0x2cfc34[_0x2bdb1b(1339)](this[_0x2bdb1b(798)],0,_0x5b574d,_0x1d8642)):1===this[_0x2bdb1b(1081)]?this[_0x2bdb1b(549)]?null!=this[_0x2bdb1b(877)]?this["decodeWorker"][_0x2bdb1b(1086)]({command:_0x2bdb1b(445),placeType:_0x5b574d,correctType:_0x1d8642}):_0x4a0a6b=0:_0x4a0a6b=null!=this[_0x2bdb1b(1058)]?this[_0x2bdb1b(1058)][_0x2bdb1b(1012)](_0x5b574d,_0x1d8642):0:_0x4a0a6b=_0x2cfc34[_0x2bdb1b(1032)](this["port"],_0x5b574d,_0x1d8642),_0x4a0a6b}},{key:_0x72d96d(1241),value:function(_0x4f1743){var _0x33b9a8=_0x72d96d;this[_0x33b9a8(696)]=_0x4f1743,this["printfFlag"]&&console[_0x33b9a8(1590)](_0x33b9a8(1197)+this[_0x33b9a8(1081)]+_0x33b9a8(1172)+_0x4f1743);var _0x1214bd=1;return 0==_0x4f1743?console[_0x33b9a8(1590)](_0x33b9a8(1217)):1===this["decodeEngine"]?this[_0x33b9a8(549)]?null!=this[_0x33b9a8(877)]?this[_0x33b9a8(877)][_0x33b9a8(1086)]({command:_0x33b9a8(584),fishSubPort:_0x4f1743}):_0x1214bd=0:_0x1214bd=null!=this["pcVideoManager"]?this[_0x33b9a8(1058)]["FEC_Enable"](_0x4f1743):0:_0x1214bd=_0x2cfc34[_0x33b9a8(1336)](this["port"],_0x4f1743),_0x1214bd}},{key:_0x72d96d(479),value:function(_0x827666,_0x178a26){var _0x29b575=_0x72d96d;this[_0x29b575(531)]&&console["log"](_0x29b575(1572)+this[_0x29b575(1081)]+_0x29b575(1172)+_0x827666+_0x29b575(647)+_0x178a26[_0x29b575(457)]+_0x29b575(1097)+_0x178a26[_0x29b575(1303)]);var _0x2f323a,_0x46e99a=1;return 1===this[_0x29b575(1081)]?this["hasWebWorker"]?null!=this[_0x29b575(877)]?this["decodeWorker"]["postMessage"]({command:_0x29b575(1477),fishSubPort:_0x827666,param2d:_0x178a26}):_0x46e99a=0:_0x46e99a=null!=this["pcVideoManager"]?this["pcVideoManager"][_0x29b575(671)](_0x827666,_0x178a26):0:(_0x2f323a=_0x2cfc34[_0x29b575(342)](),null!=_0x178a26[_0x29b575(457)]&&(_0x2cfc34[_0x29b575(1039)][_0x2f323a>>2]=_0x178a26[_0x29b575(457)]),null!=_0x178a26["fPTZParam"]&&null!=_0x178a26[_0x29b575(626)][_0x29b575(989)]&&null!=_0x178a26[_0x29b575(626)]["fPTZPositionY"]&&(_0x2cfc34[_0x29b575(683)][_0x2f323a+8>>2]=_0x178a26["fPTZParam"][_0x29b575(989)],_0x2cfc34["HEAPF32"][_0x2f323a+12>>2]=_0x178a26[_0x29b575(626)][_0x29b575(1357)]),null!=_0x178a26[_0x29b575(626)]&&(_0x2cfc34["HEAPF32"][_0x2f323a+32>>2]=_0x178a26[_0x29b575(431)]),null!=_0x178a26[_0x29b575(1303)]&&(_0x2cfc34["HEAPF32"][_0x2f323a+36>>2]=_0x178a26[_0x29b575(1303)]),_0x46e99a=_0x2cfc34[_0x29b575(585)](this[_0x29b575(798)],_0x827666)),_0x46e99a}},{key:_0x72d96d(826),value:function(_0x4f2a85,_0x268252,_0xda8a72){var _0x3e9417=_0x72d96d;this[_0x3e9417(531)]&&console[_0x3e9417(1590)](_0x3e9417(336)+this[_0x3e9417(1081)]+_0x3e9417(1172)+_0x4f2a85+_0x3e9417(647)+_0x268252+_0x3e9417(1097)+_0xda8a72);var _0x119a6b=1;return 1===this[_0x3e9417(1081)]?this[_0x3e9417(549)]?null!=this[_0x3e9417(877)]?this[_0x3e9417(877)]["postMessage"]({command:_0x3e9417(1355),fishSubPort:_0x4f2a85,upDateType:_0x268252,fValue:_0xda8a72}):_0x119a6b=0:_0x119a6b=null!=this[_0x3e9417(1058)]?this[_0x3e9417(1058)][_0x3e9417(992)](_0x4f2a85,_0x268252,_0xda8a72):0:_0x119a6b=_0x2cfc34[_0x3e9417(719)](this[_0x3e9417(798)],_0x4f2a85,_0x268252,_0xda8a72),_0x119a6b}},{key:_0x72d96d(1409),value:function(_0x47c948,_0x3fe0f5,_0x58da6a){var _0x17bef0=_0x72d96d,_0x35e603=1;return this[_0x17bef0(398)]=_0x58da6a,1===this["decodeEngine"]?this["hasWebWorker"]?null!=this["decodeWorker"]?this["decodeWorker"][_0x17bef0(1086)]({command:_0x17bef0(1286),fishSubPort:_0x47c948,upDateType:_0x3fe0f5}):_0x35e603=0:(_0x35e603=null!=this["pcVideoManager"]?this[_0x17bef0(1058)][_0x17bef0(1578)](_0x47c948,_0x3fe0f5):0,null!=this[_0x17bef0(398)]&&this["FECViewParamCB"](_0x35e603)):(_0x35e603=_0x2cfc34[_0x17bef0(1374)](this[_0x17bef0(798)],_0x47c948,_0x3fe0f5),null!=this["FECViewParamCB"]&&this["FECViewParamCB"](_0x35e603)),_0x35e603}},{key:_0x72d96d(1425),value:function(_0x46a9c2,_0xc1518c){var _0x174d20=_0x72d96d;this[_0x174d20(531)]&&console[_0x174d20(1590)](_0x174d20(732)+this[_0x174d20(1081)]+_0x174d20(1172)+_0x46a9c2+_0x174d20(747)+_0xc1518c);var _0x26f952,_0x3a35e3,_0x541f19,_0x3ab231,_0x11828f=1;return 0==_0x46a9c2?console[_0x174d20(1590)]("fishPort is 0 ,main canvas doesn't need call FEC_SetWnd"):null!=_0xc1518c?1===this[_0x174d20(1081)]?(_0x26f952=document[_0x174d20(380)](_0xc1518c),this[_0x174d20(549)]?(_0x3a35e3=_0x26f952[_0x174d20(957)](),null!=this["decodeWorker"]?this[_0x174d20(877)][_0x174d20(1086)]({command:_0x174d20(1184),fishSubPort:_0x46a9c2,offscrrenCnv:_0x3a35e3},[_0x3a35e3]):_0x11828f=0):_0x11828f=null!=this["pcVideoManager"]?this[_0x174d20(1058)]["FEC_SetWnd"](_0x46a9c2,_0x26f952):0):((_0x3a35e3=null)!=_0xc1518c&&(_0x26f952=this[_0x174d20(619)]("#"+_0xc1518c),_0x3ab231=2*(_0xc1518c[_0x174d20(525)]+1),_0x3a35e3=_0x2cfc34["_malloc"](_0x3ab231),_0x541f19=_0x2cfc34[_0x174d20(447)][_0x174d20(350)](_0x3a35e3,_0x3a35e3+_0x3ab231),_0x3ab231=new Uint8Array(_0x3ab231),_0x541f19[_0x174d20(483)](_0x3ab231,0),_0x541f19[_0x174d20(483)](new Uint8Array(_0x26f952)),_0x3ab231=_0x541f19=null),_0x11828f=_0x2cfc34[_0x174d20(565)](this[_0x174d20(798)],_0x46a9c2,_0x3a35e3),null!=_0x3a35e3&&(_0x2cfc34[_0x174d20(573)](_0x3a35e3),_0x3a35e3=null)):(console[_0x174d20(1590)](_0x174d20(1029)+this[_0x174d20(1081)]+_0x174d20(1172)+_0x46a9c2+",hWnd:"+_0xc1518c),_0x11828f=0),_0x11828f}},{key:_0x72d96d(535),value:function(){var _0x45e1fb=_0x72d96d,_0x5073bd=0<arguments[_0x45e1fb(525)]&&void 0!==arguments[0]?arguments[0]:0,_0x5d36a8=!(1<arguments[_0x45e1fb(525)]&&void 0!==arguments[1])||arguments[1],_0x19a281=2<arguments[_0x45e1fb(525)]&&void 0!==arguments[2]&&arguments[2],_0x128868=1;return 0==_0x5073bd?console[_0x45e1fb(1590)]("fishPort is 0 ,main canvas doesn't need call FEC_Disable"):1===this[_0x45e1fb(1081)]?this[_0x45e1fb(549)]?null!=this[_0x45e1fb(877)]?this[_0x45e1fb(877)][_0x45e1fb(1086)]({command:_0x45e1fb(1134),fishSubPort:_0x5073bd,clearFECCanvas:_0x5d36a8,clearContext:_0x19a281}):_0x128868=0:_0x128868=null!=this[_0x45e1fb(1058)]?this[_0x45e1fb(1058)][_0x45e1fb(1582)](_0x5073bd,_0x5d36a8,_0x19a281):0:_0x128868=_0x2cfc34[_0x45e1fb(982)](this["port"],_0x5073bd,_0x5d36a8,_0x19a281),_0x128868}},{key:_0x72d96d(1036),value:function(_0x10c9c8){var _0x41b68b=_0x72d96d;this[_0x41b68b(531)]&&console[_0x41b68b(1590)](_0x41b68b(759)+this["decodeEngine"]+_0x41b68b(1172)+_0x10c9c8);var _0x2d2b94=1;return 0==_0x10c9c8?(this[_0x41b68b(696)]=_0x10c9c8,console["log"](_0x41b68b(1019)),1):(1===this["decodeEngine"]?this[_0x41b68b(549)]?null!=this[_0x41b68b(877)]?this["decodeWorker"][_0x41b68b(1086)]({command:_0x41b68b(358),fishSubPort:_0x10c9c8}):_0x2d2b94=0:_0x2d2b94=null!=this[_0x41b68b(1058)]?this["pcVideoManager"][_0x41b68b(832)](_0x10c9c8):0:_0x2d2b94=_0x2cfc34["_JSPlayM4_FEC_DelPort"](this[_0x41b68b(798)],_0x10c9c8),_0x2d2b94)}},{key:"JSPlayM4_FEC_SetDisplayRegion",value:function(_0x18029e){var _0x222f56=_0x72d96d,_0x47e946,_0x5bbc74,_0x478d92,_0x248c35,_0x4739a9=1<arguments[_0x222f56(525)]&&void 0!==arguments[1]?arguments[1]:0,_0x459898=2<arguments[_0x222f56(525)]&&void 0!==arguments[2]?arguments[2]:0,_0x2fb0e1=3<arguments[_0x222f56(525)]?arguments[3]:void 0,_0x16bd0a=4<arguments[_0x222f56(525)]&&void 0!==arguments[4]?arguments[4]:null,_0x376264=5<arguments["length"]?arguments[5]:void 0,_0x397244=6<arguments[_0x222f56(525)]?arguments[6]:void 0,_0x403bbc=(this[_0x222f56(531)]&&console[_0x222f56(1590)](">>>JS JSPlayM4_FEC_SetDisplayRegion this.decodeEngine:"+this[_0x222f56(1081)]+_0x222f56(1172)+_0x18029e+_0x222f56(517)+_0x2fb0e1[_0x222f56(1161)]+",right:"+_0x2fb0e1[_0x222f56(1422)]+",top:"+_0x2fb0e1[_0x222f56(449)]+_0x222f56(833)+_0x2fb0e1[_0x222f56(497)]),1),_0x348007=_0x2fb0e1["left"],_0x1c1bc7=_0x2fb0e1["right"],_0x60a9a0=_0x2fb0e1[_0x222f56(449)],_0x2fb0e1=_0x2fb0e1["bottom"];if("number"!=typeof _0x348007||_0x222f56(911)!=typeof _0x1c1bc7||"number"!=typeof _0x2fb0e1||_0x222f56(911)!=typeof _0x60a9a0)return console["log"](_0x222f56(681)),0;if(_0x376264){if(_0x397244){if(_0x348007<0||_0x1c1bc7<0||_0x60a9a0<0||_0x2fb0e1<0)return 0;0!==this[_0x222f56(1451)]&&(_0x348007=Math[_0x222f56(1437)](_0x348007/this[_0x222f56(575)])+this[_0x222f56(874)][_0x222f56(1161)],_0x60a9a0=Math[_0x222f56(1437)](_0x60a9a0/this[_0x222f56(1469)])+this[_0x222f56(874)][_0x222f56(449)],_0x1c1bc7=Math["round"](_0x1c1bc7/this[_0x222f56(575)])+this["stFECDisplayRect"][_0x222f56(1161)],_0x2fb0e1=Math[_0x222f56(1437)](_0x2fb0e1/this[_0x222f56(1469)])+this[_0x222f56(874)][_0x222f56(449)])}}else _0x1c1bc7=this[_0x222f56(363)],_0x2fb0e1=this[_0x222f56(1421)],this[_0x222f56(1451)]=_0x60a9a0=_0x348007=0,this[_0x222f56(575)]=1,this[_0x222f56(1469)]=1;return this[_0x222f56(874)]={top:_0x60a9a0,left:_0x348007,right:_0x1c1bc7,bottom:_0x2fb0e1},_0x1c1bc7-_0x348007<16||_0x2fb0e1-_0x60a9a0<16||_0x1c1bc7-_0x348007>this[_0x222f56(363)]||_0x2fb0e1-_0x60a9a0>this["canvasHeight"]?0:(1===this[_0x222f56(1081)]?(_0x5bbc74=_0x348007/this[_0x222f56(363)]*this[_0x222f56(1454)],_0x47e946=_0x1c1bc7/this["canvasWidth"]*this[_0x222f56(1454)],_0x248c35=_0x60a9a0/this[_0x222f56(1421)]*this[_0x222f56(1384)],_0x478d92=_0x2fb0e1/this[_0x222f56(1421)]*this[_0x222f56(1384)],this[_0x222f56(549)]?null!=this[_0x222f56(877)]?this[_0x222f56(877)][_0x222f56(1086)]({command:_0x222f56(562),fishSubPort:_0x18029e,type:_0x4739a9,regionNum:_0x459898,sx:_0x5bbc74,sy:_0x248c35,sw:_0x47e946-_0x5bbc74,sh:_0x478d92-_0x248c35}):_0x403bbc=0:_0x403bbc=null!=this["pcVideoManager"]?this[_0x222f56(1058)][_0x222f56(1345)](_0x18029e,_0x4739a9,_0x459898,_0x5bbc74,_0x248c35,_0x47e946-_0x5bbc74,_0x478d92-_0x248c35):0):_0x403bbc=null!==_0x2cfc34?(_0x47e946=_0x348007/this[_0x222f56(363)]*1e3,_0x5bbc74=_0x1c1bc7/this[_0x222f56(363)]*1e3,_0x478d92=_0x60a9a0/this["canvasHeight"]*1e3,_0x248c35=_0x2fb0e1/this[_0x222f56(1421)]*1e3,_0x376264?_0x2cfc34[_0x222f56(446)](this[_0x222f56(798)],_0x18029e,_0x4739a9,_0x459898,_0x47e946,_0x5bbc74,_0x478d92,_0x248c35,_0x16bd0a,_0x376264):_0x2cfc34[_0x222f56(446)](this[_0x222f56(798)],_0x18029e,0,0,0,0,0,0,null,_0x376264)):0,_0x397244&&(this[_0x222f56(575)]=this["canvasWidth"]/(_0x1c1bc7-_0x348007),this["iFECRatio_y"]=this[_0x222f56(1421)]/(_0x2fb0e1-_0x60a9a0),this[_0x222f56(1451)]++),_0x403bbc)}},{key:_0x72d96d(986),value:function(_0x247edd,_0x15ffd3){var _0x5556a2=_0x72d96d,_0x504fd0=1;return 1===this[_0x5556a2(1081)]?this[_0x5556a2(549)]?null!=this[_0x5556a2(877)]?this[_0x5556a2(877)]["postMessage"]({command:_0x5556a2(1396),fishSubPort:_0x247edd,bValue:_0x15ffd3}):_0x504fd0=0:_0x504fd0=null!=this[_0x5556a2(1058)]?this["pcVideoManager"][_0x5556a2(1020)](_0x247edd,_0x15ffd3):0:_0x504fd0=_0x2cfc34[_0x5556a2(1150)](this[_0x5556a2(798)],_0x247edd,_0x15ffd3),_0x504fd0}},{key:_0x72d96d(710),value:function(){var _0x4403cc=_0x72d96d,_0x2979c3,_0x2d48bd={},_0x20cca0=navigator[_0x4403cc(1426)][_0x4403cc(1558)]();return(_0x2979c3=_0x20cca0[_0x4403cc(1300)](/rv:([\d.]+)\) like gecko/))||(_0x2979c3=_0x20cca0["match"](/msie ([\d\.]+)/))?_0x2d48bd["ie"]=_0x2979c3[1]:(_0x2979c3=_0x20cca0[_0x4403cc(1300)](/edge\/([\d\.]+)/))?_0x2d48bd[_0x4403cc(684)]=_0x2979c3[1]:(_0x2979c3=_0x20cca0[_0x4403cc(1300)](/firefox\/([\d\.]+)/))?_0x2d48bd[_0x4403cc(605)]=_0x2979c3[1]:(_0x2979c3=_0x20cca0[_0x4403cc(1300)](/(?:opera|opr).([\d\.]+)/))?_0x2d48bd[_0x4403cc(1427)]=_0x2979c3[1]:(_0x2979c3=_0x20cca0[_0x4403cc(1300)](/chrome\/([\d\.]+)/))?_0x2d48bd[_0x4403cc(1497)]=_0x2979c3[1]:(_0x2979c3=_0x20cca0["match"](/version\/([\d\.]+).*safari/))&&(_0x2d48bd[_0x4403cc(413)]=_0x2979c3[1]),_0x2d48bd[_0x4403cc(1497)]?(_0x2979c3=(_0x20cca0=_0x2d48bd[_0x4403cc(1497)])["indexOf"]("."),Number(_0x20cca0["substring"](0,_0x2979c3))):(_0x2d48bd["ie"]?console[_0x4403cc(786)](_0x4403cc(484),_0x4403cc(692)):_0x2d48bd[_0x4403cc(413)]?console[_0x4403cc(786)](_0x4403cc(1407),_0x4403cc(692)):_0x2d48bd["firefox"]?console[_0x4403cc(786)](_0x4403cc(1441),"color: red"):console["info"](_0x4403cc(1224),_0x4403cc(692)),-1)}},{key:_0x72d96d(619),value:function(_0x5d1685){var _0x2941dd=_0x72d96d;for(var _0x3f2a0d,_0x32eb65,_0x34cddb=[],_0x3d4fbd=0;_0x3d4fbd<_0x5d1685[_0x2941dd(525)];_0x3d4fbd++){for(_0x3f2a0d=_0x5d1685[_0x2941dd(494)](_0x3d4fbd),_0x32eb65=[];_0x32eb65[_0x2941dd(962)](255&_0x3f2a0d),_0x3f2a0d>>=8;);_0x34cddb=_0x34cddb[_0x2941dd(1438)](_0x32eb65[_0x2941dd(408)]())}return _0x34cddb}},{key:_0x72d96d(1163),value:function(_0x100d76,_0x36b15d){var _0x494a63=_0x72d96d,_0x35c254=_0x100d76,_0x100d76=(_0x100d76 instanceof Blob||_0x100d76 instanceof File||(_0x35c254=new Blob([_0x100d76])),window[_0x494a63(1244)][_0x494a63(1245)](_0x35c254)),_0x35c254=window[_0x494a63(502)][_0x494a63(1546)]("a"),_0x100d76=(_0x35c254[_0x494a63(1531)]=_0x100d76,_0x35c254["download"]=_0x36b15d,document[_0x494a63(1117)](_0x494a63(1585)));_0x100d76[_0x494a63(1152)](_0x494a63(1168),!0,!0),_0x35c254[_0x494a63(534)](_0x100d76)}},{key:"downloadRTPData",value:function(_0xa2c37){var _0xdaf966=_0x72d96d;if(this["bWriteData"]){var _0x3066dd=_0xa2c37,_0x135522=this[_0xdaf966(601)][_0xdaf966(525)];console[_0xdaf966(1590)](_0xdaf966(1167)+_0x135522);for(var _0x495050=0,_0x3944aa=_0x3066dd[_0xdaf966(525)];_0x495050<_0x3944aa;_0x495050++)this["aTotalBuffer"][_0x135522+_0x495050]=_0x3066dd[_0x495050];this["iFrameNum"]++,_0x3066dd=null,console["log"]("downloadRTPdata iFrameNum:"+this[_0xdaf966(1255)])}this[_0xdaf966(1467)]&&600<=this[_0xdaf966(1255)]&&(console[_0xdaf966(1590)](_0xdaf966(726)),_0xa2c37=new Uint8Array(this[_0xdaf966(601)]),this["_downloadFile"](_0xa2c37,_0xdaf966(1430)),this["aTotalBuffer"][_0xdaf966(387)](0,this["aTotalBuffer"][_0xdaf966(525)]),this[_0xdaf966(1467)]=!1,this[_0xdaf966(1255)]=0)}},{key:_0x72d96d(1453),value:function(_0x192727){var _0x3357dc=_0x72d96d;if(this[_0x3357dc(1455)]){for(var _0x18e2c7=_0x192727,_0x482c9c=this["audioANRBuffer"][_0x3357dc(525)],_0x3b38da=0,_0x199261=_0x18e2c7[_0x3357dc(525)];_0x3b38da<_0x199261;_0x3b38da++)this["audioANRBuffer"][_0x482c9c+_0x3b38da]=_0x18e2c7[_0x3b38da];this["iAudioANRFrameNum"]++,_0x18e2c7=null,console["log"](_0x3357dc(1465)+this[_0x3357dc(1182)])}this[_0x3357dc(1455)]&&this["iAudioANRFrameNum"]>=WRITE_PCM_NUM&&(console[_0x3357dc(1590)](_0x3357dc(369)+WRITE_PCM_NUM+_0x3357dc(1228)),_0x192727=new Uint8Array(this[_0x3357dc(1260)]),this[_0x3357dc(1163)](_0x192727,_0x3357dc(1373)),this[_0x3357dc(1260)][_0x3357dc(387)](0,this[_0x3357dc(1260)][_0x3357dc(525)]),this["bWriteAudioANRData"]=!1,this[_0x3357dc(1182)]=0)}},{key:_0x72d96d(1069),value:function(_0x1c1945){var _0x10b1b3=_0x72d96d;if(this[_0x10b1b3(1188)]){for(var _0x4ad2d5=_0x1c1945,_0x5ca40a=this["audioBefDecBuffer"][_0x10b1b3(525)],_0x4afa3c=0,_0x2bc97a=_0x4ad2d5["length"];_0x4afa3c<_0x2bc97a;_0x4afa3c++)this["audioBefDecBuffer"][_0x5ca40a+_0x4afa3c]=_0x4ad2d5[_0x4afa3c];this["iAudioBefDecFrameNum"]++,_0x4ad2d5=null,console["log"](_0x10b1b3(374)+this[_0x10b1b3(1180)])}this[_0x10b1b3(1188)]&&this[_0x10b1b3(1180)]>=WRITE_PCM_NUM&&(console["log"]("download"+WRITE_PCM_NUM+"this.audioBefDecBuffer"),_0x1c1945=new Uint8Array(this[_0x10b1b3(1462)]),this[_0x10b1b3(1163)](_0x1c1945,_0x10b1b3(351)),this["audioBefDecBuffer"]["splice"](0,this[_0x10b1b3(1462)][_0x10b1b3(525)]),this[_0x10b1b3(1188)]=!1,this[_0x10b1b3(1180)]=0)}},{key:_0x72d96d(1192),value:function(_0x4fbe93){var _0x38b809=_0x72d96d;if(this[_0x38b809(928)]){for(var _0x1f08e9=_0x4fbe93,_0x1d279e=this[_0x38b809(1016)]["length"],_0x11eb09=0,_0xd4c3fa=_0x1f08e9[_0x38b809(525)];_0x11eb09<_0xd4c3fa;_0x11eb09++)this["audioAfDecOUTBuffer"][_0x1d279e+_0x11eb09]=_0x1f08e9[_0x11eb09];this[_0x38b809(1440)]++,_0x1f08e9=null,console[_0x38b809(1590)]("download 2 After Decode AudioData FrameNum:"+this["iAudioAfDecOUTFrameNum"])}this[_0x38b809(928)]&&this[_0x38b809(1440)]>=WRITE_PCM_NUM&&(console[_0x38b809(1590)](_0x38b809(369)+WRITE_PCM_NUM+"this.audioAfDecOUTBuffer"),_0x4fbe93=new Uint8Array(this[_0x38b809(1016)]),this[_0x38b809(1163)](_0x4fbe93,_0x38b809(1563)),this[_0x38b809(1016)][_0x38b809(387)](0,this[_0x38b809(1016)][_0x38b809(525)]),this[_0x38b809(928)]=!1,this[_0x38b809(1440)]=0)}},{key:_0x72d96d(321),value:function(_0x4f1f97){var _0xcc1694=_0x72d96d;if(this[_0xcc1694(1559)]){for(var _0x100f5c=_0x4f1f97,_0x5406e3=this[_0xcc1694(1530)][_0xcc1694(525)],_0xc7f5ea=0,_0xbfec22=_0x100f5c["length"];_0xc7f5ea<_0xbfec22;_0xc7f5ea++)this[_0xcc1694(1530)][_0x5406e3+_0xc7f5ea]=_0x100f5c[_0xc7f5ea];this[_0xcc1694(1456)]++,_0x100f5c=null,console[_0xcc1694(1590)](_0xcc1694(393)+this["iAudioBeRenOUTFrameNum"])}this[_0xcc1694(1559)]&&this[_0xcc1694(1456)]>=WRITE_PCM_NUM&&(console[_0xcc1694(1590)](_0xcc1694(369)+WRITE_PCM_NUM+_0xcc1694(1527)),_0x4f1f97=new Uint8Array(this["audioBeRenOUTBuffer"]),this["_downloadFile"](_0x4f1f97,_0xcc1694(1442)),this[_0xcc1694(1530)][_0xcc1694(387)](0,this[_0xcc1694(1530)][_0xcc1694(525)]),this["bWriteAudioBeforeRender"]=!1,this[_0xcc1694(1456)]=0)}},{key:"downloadAudioResampleData",value:function(_0x4bced4){var _0x587e11=_0x72d96d;if(this[_0x587e11(664)]){for(var _0x44af78=_0x4bced4,_0x33741e=this[_0x587e11(1131)][_0x587e11(525)],_0x5b0d90=0,_0x5a82d9=_0x44af78[_0x587e11(525)];_0x5b0d90<_0x5a82d9;_0x5b0d90++)this[_0x587e11(1131)][_0x33741e+_0x5b0d90]=_0x44af78[_0x5b0d90];this[_0x587e11(383)]++,_0x44af78=null,console[_0x587e11(1590)](_0x587e11(1083)+this[_0x587e11(383)])}this[_0x587e11(664)]&&this[_0x587e11(383)]>=WRITE_PCM_NUM&&(console["log"]("download"+WRITE_PCM_NUM+_0x587e11(1532)),_0x4bced4=new Uint8Array(this[_0x587e11(1131)]),this[_0x587e11(1163)](_0x4bced4,"AudioResampleData.data"),this[_0x587e11(1131)][_0x587e11(387)](0,this[_0x587e11(1131)][_0x587e11(525)]),this["bWriteAudioResampleData"]=!1,this[_0x587e11(383)]=0)}}]),_0x304885}());window[_0x372e98(1304)]=function(_0x38b104,_0xe1b2c1,_0x244409){var _0x29cfd9=_0x372e98,_0xf24cb5={};_0xf24cb5[_0x29cfd9(1290)]=_0x2cfc34["HEAP32"][_0xe1b2c1>>2],_0xf24cb5[_0x29cfd9(758)]=_0x2cfc34["HEAP32"][_0xe1b2c1+4>>2],_0xf24cb5[_0x29cfd9(1148)]=_0x2cfc34["HEAP32"][_0xe1b2c1+8>>2],_0xf24cb5["dataLength"]=_0x2cfc34[_0x29cfd9(1039)][_0xe1b2c1+12>>2],_0xf24cb5[_0x29cfd9(1567)]=_0x2cfc34[_0x29cfd9(1039)][_0xe1b2c1+16>>2],_0xf24cb5[_0x29cfd9(1592)]=new Uint8Array(_0xf24cb5[_0x29cfd9(596)]),_0xf24cb5["additionDataBuffer"][_0x29cfd9(483)](_0x2cfc34[_0x29cfd9(447)][_0x29cfd9(350)](_0xf24cb5[_0x29cfd9(1567)],_0xf24cb5[_0x29cfd9(1567)]+_0xf24cb5[_0x29cfd9(596)])),null!=_0x54d839[_0x244409][_0x38b104]["addtionCallBackFun"]&&_0x54d839[_0x244409][_0x38b104][_0x29cfd9(367)](_0xf24cb5)},window[_0x372e98(337)]=function(_0x22cb1b,_0x3defcb,_0xa62a8b,_0x4638bc,_0x67a9c0){var _0x3500ba=_0x372e98,_0x4e4cb2={};_0x4e4cb2[_0x3500ba(1511)]=_0x3defcb,_0x4e4cb2[_0x3500ba(1049)]=_0xa62a8b,_0x4e4cb2["timeStamp"]=_0x4638bc,null!=_0x54d839[_0x67a9c0][_0x22cb1b]["displayCallBackFun"]&&_0x54d839[_0x67a9c0][_0x22cb1b][_0x3500ba(1327)](_0x4e4cb2)},window[_0x372e98(580)]=function(_0xf86f97,_0x9a40c,_0x393295,_0x411420,_0x46ccd2,_0x3c8479){var _0x35718e=_0x372e98,_0x209a4f={};_0x209a4f[_0x35718e(798)]=_0xf86f97,_0x209a4f["Data"]=_0x9a40c,_0x209a4f["isize"]=_0x393295,_0x209a4f[_0x35718e(901)]=_0x411420,_0x209a4f[_0x35718e(466)]=_0x46ccd2,null!=_0x54d839[_0x3c8479][_0xf86f97]["decCallBackFun"]&&_0x54d839[_0x3c8479][_0xf86f97][_0x35718e(1164)](_0x209a4f)},window[_0x372e98(376)]=function(_0x528071,_0x309cfd,_0x55758c){var _0xa0718=_0x372e98,_0x3b2c3f,_0x438e6d,_0xd4176b,_0x4a5064;null!=_0x54d839[_0x55758c][_0x528071][_0xa0718(448)]&&(_0x3b2c3f=_0x2cfc34[_0xa0718(1039)][_0x309cfd>>2],_0x438e6d=_0x2cfc34[_0xa0718(1039)][_0x309cfd+4>>2],_0xd4176b=_0x2cfc34[_0xa0718(1039)][_0x309cfd+8>>2],_0x4a5064=_0x2cfc34[_0xa0718(1039)][_0x309cfd+12>>2],_0x309cfd=_0x2cfc34[_0xa0718(1039)][_0x309cfd+16>>2],_0x54d839[_0x55758c][_0x528071]["runtimeCBFun"](_0x3b2c3f,_0x438e6d,_0xd4176b,_0x4a5064,_0x309cfd))},window[_0x372e98(836)]=function(_0x497089,_0x52349a){var _0x49e43f=_0x372e98;null!=_0x54d839[_0x52349a][_0x497089][_0x49e43f(409)]&&_0x54d839[_0x52349a][_0x497089][_0x49e43f(409)]()},window["JSPlayM4_AudioANRCallBack"]=function(_0x2f5751,_0xba5697,_0x3362dd,_0x584053){var _0x22ee9c=_0x372e98;_0x54d839[_0x584053][_0x2f5751][_0x22ee9c(1453)](_0xba5697)},window[_0x372e98(1004)]=function(_0x3a0bcf,_0x3b6de5,_0xfb1f7c,_0x40da3d){var _0x1cf1ef=_0x372e98;_0x54d839[_0x40da3d][_0x3a0bcf][_0x1cf1ef(1069)](_0x3b6de5)},window["JSPlayM4_AudioAfterDecodeCallBack"]=function(_0x56ae89,_0x329259,_0x436214,_0xc20eb){var _0x411362=_0x372e98;_0x54d839[_0xc20eb][_0x56ae89][_0x411362(1192)](_0x329259)},window[_0x372e98(698)]=function(_0x13cef3,_0x634206,_0xb4cad5,_0x53e64b){_0x54d839[_0x53e64b][_0x13cef3]["downloadAudioBeforeRenderData"](_0x634206)},window[_0x372e98(634)]=function(_0x9a2760,_0x2b3291,_0x3646bc,_0x1416b1){_0x54d839[_0x1416b1][_0x9a2760]["downloadAudioResampleData"](_0x2b3291)},window[_0x372e98(1204)]=function(_0x426edc,_0x1e72d9,_0x5ad3ec){_0x54d839[_0x5ad3ec][port]["downloadRTPData"](_0x426edc)}})(),_0x55f432;function _0x26090d(_0x1c1e2b){var _0x3cf875=_0x3578d9,_0x4233be=_0x209347[_0x1c1e2b];if(void 0!==_0x4233be)return _0x4233be[_0x3cf875(509)];return _0x4233be=_0x209347[_0x1c1e2b]={exports:{}},_0x60f968[_0x1c1e2b](_0x4233be,_0x4233be[_0x3cf875(509)],_0x26090d),_0x4233be[_0x3cf875(509)]}var _0x60f968,_0x209347,_0x55f432});function a0_0x27b8(){var _0x3789eb=["Too_Few_Arguments","CROP_BITMAP","message","CreateSemiSphere","__proto__","stFishParam","pPanoPTZPoints","streamOpenMode","displayCallBackFun","nFontBGNum","JSPlayM4_SetAudioDisplayBuf","JSPlayM4_SetSycGroup","ARRAY_BUFFER","Invalid_Library_Handle","pfuncCBIn","baseTimeStamp","renderCurStatus","_JSPlayM4_FEC_Enable","fTheta","FT_New_Memory_Face","_JSPlayM4_FEC_ResetCorrectType","hasOwnProperty","_JSPlayM4_PlaySound","%c 2D render not support FEC correct","nPTZRectNum",",bZoomEnable:","FEC_SetDisplayRegion","FECShowMode","SR_DE_NULL","bitmap_left","decoderObj","firstFrameCB","GetBMP","_invoke","_JSPlayM4_SetAntialias","4848423qxTZsW","FECSetViewParam","GetPanoPTZFloor","fPTZPositionY","decodeProcess","CompileProgram","FreeFECPort","UpdatePTZPosition","enableVertexAttribArray","getPrototypeOf","initTimer","regionSh","SR_DE_FISH_PANORAMA_FLOOR_180","downloadRTPData","Invalid_Slot_Handle","processData1","GetCanvasSize","channel","SR_SetPTZColor","AudioANR.data","_JSPlayM4_GetViewParam","FT_Init_FreeType","player","iterator result is not an object","type","SR_DE_FISH_PANORAMA_CEILING_360","hour","TRIANGLES",">>>>>yff>>>>> JSPlayM4_OpenStream 4:","depthMask","height","GetFECPort","tryEntries","0 is softDecode, 1 is hardDecoder,decodeEngine:","needReset","Hmtx_Table_Missing","Unlisted_Object","Generator is already running","isKeyFrame","MONOCHROME","pLineClrVertices","_GetSlowSpeed","FECSetBackCilling","174710DkIqze","nWndPort","JSPlayM4_OpenStream","SetNear","FT_Error_String","cloneNode","WebKitBlobBuilder","nSubPort","nPanoPTZPointNum","Too_Many_Caches","%c1>your browser is safari ,it does not support softV2.0 or hard decode","FreetypeWasmLoadedCB","JSPlayM4_FEC_GetViewParam","%c>>>>The Decoder.js path:%s","pUserOut","COMPOSITE","LIGHT","warn","object","decoderCurStatus","GetCropBMP","curTimeStamp","SR_DrawFontEx","_malloc","canvasHeight","right","7607872XSOPqC","displayFrameInfoCB","JSPlayM4_FEC_SetWnd","userAgent","opera","Too_Many_Function_Defs","cropBottom","Raw600.data","Set_Pixel_Size","JSPlayM4_InputData","canvasIDData","_sent","CMap_Table_Missing","GetPointPano2FishCeiling","round","concat","oVideoRenderHandle","iAudioAfDecOUTFrameNum","%c1>your browser is Firefox ,it only support soft decode","AudioBeforeRender.data","deleteBuffer","cropLeft","NO_AUTOHINT","_resetRenderTimer","curstatus","Invalid_Table","Invalid_Post_Table","createBuffer","iFECZoomNum","JSPlayM4_SetVolume","downloadAudioANRData","width","bWriteAudioANRData","iAudioBeRenOUTFrameNum","_ConvertDisplayEffect","stPTZParam","pRectPoints","Missing_Module","getValue","audioBefDecBuffer","curStatus","color: green","download ANR Decode AudioData FrameNum:","JSPlayM4_SetDisplayBuf","bWriteData","flush","iFECRatio_y","deleteTexture","Invalid_Composite","rval","FLOAT","pstFontColor","\nattribute vec3 xy;\nattribute vec2 uv;\nvarying highp vec2 v_uv;\nvoid main(void) {\n  gl_Position = vec4(xy, 1.0);\n  // Map vertex coordinates (-1 to +1) to UV coordinates (0 to 1).\n  // UV coordinates are Y-flipped relative to vertex coordinates.\n  //v_uv = vec2((1.0 + xy.x) / 2.0, (1.0 - xy.y) / 2.0);\n  v_uv = uv;\n}\n","stop","FECSetParam","break","_bind","InitDisplay","Invalid_Argument","finallyLoc","SR_Init","_JSPlayM4_SetDemuxModel","fAngle","SetPTZColor","BlobBuilder","fAspect","style_name","emCorrectType","nFECPort","transform","Raster_Overflow","_JSPlayM4_GetCropJPEG","Debug_OpCode","max_advance_width","chrome","displayBuf","_JSPlayM4_SetDecodeERC","underflow","displayWidth","abs","toString","GetPTZFragmentPoints","fFar","Too_Many_Instruction_Defs","default","JSPlayM4_SetStreamOpenMode","JSPlayM4_GetCanvasSize","avc1.","yuvData","pRender","Invalid_Stream_Seek","createTexture","method","resetTimer","bOrtho","num_faces","JSPlayM4_SetFrameInfoCallBack","sent","SR_DrawLinesEx","FreetypeLibHandle","writeArrayToMemory","pSemiSphereTex","suspendedYield","NO_SCALE","this.audioBeRenOUTBuffer","iterator","%c SR_AddSubPort error subport:%d","audioBeRenOUTBuffer","href","this.audioResampleBuffer","JSPlayM4_DownloadData","Raster_Corrupted","\n    varying highp vec2 v_uv;\n    uniform sampler2D texture;\n    void main(void) {\n        gl_FragColor = texture2D(texture, v_uv);\n    }\n","function","decodeQueueSize","SR_ERR_CALL_ORDER","glLineTexBuffer","sqrt","uniformMatrix4fv","nJpegDataSize","IGNORE_TRANSFORM","values","inputData","createElement","JSPlayM4_GetJPEG","resolve","webgl2","Invalid_Frame_Read","SR_SetPTZPort","cropRight","_JSPlayM4_SetVideoRawDataCallBack","iInputMaxBufSize","bitmap","executing","JSPlayM4_SetAdditionDataCallBack","toLowerCase","bWriteAudioBeforeRender","Table_Missing","FirstFrame","JSPlayM4_SetDecodeThreadNum","AudioAfterDecode.data","SetDecodeFrameType","oVideoPlayCtrl","nSemiSpherePosSize","pData","@@iterator","frameBuffers","nFontHeight","nSurfaceTexture",">>>JS JSPlayM4_FEC_SetParam 1 this.decodeEngine:","linkProgram","JSPlayM4_NeedReset","fLeft","JSPlayM4_FEC_GetPort","SR_Destroy","FEC_GetViewParam","clearDecoderObjBuffer","fZoom","vecUp","FEC_Disable","FT_Library_Version","frameDisplayWidth","MouseEvents","function a0_0x1593(_0x3ac32f,_0x2aab05){var _0xd9f682=a0_0xd9f6();return a0_0x1593=function(_0x1593c7,_0x596b7f){_0x1593c7=_0x1593c7-0x1cd;var _0x58f871=_0xd9f682[_0x1593c7];return _0x58f871;},a0_0x1593(_0x3ac32f,_0x2aab05);}(function(_0xff34d7,_0x5d32c1){var _0x135cc6=a0_0x1593,_0x177edd=_0xff34d7();while(!![]){try{var _0x399e07=parseInt(_0x135cc6(0x4be))/0x1*(parseInt(_0x135cc6(0x228))/0x2)+parseInt(_0x135cc6(0x3d3))/0x3+parseInt(_0x135cc6(0x2a8))/0x4*(-parseInt(_0x135cc6(0x517))/0x5)+parseInt(_0x135cc6(0x3f1))/0x6+-parseInt(_0x135cc6(0x2ed))/0x7+-parseInt(_0x135cc6(0x1ea))/0x8*(parseInt(_0x135cc6(0x45e))/0x9)+parseInt(_0x135cc6(0x48c))/0xa;if(_0x399e07===_0x5d32c1)break;else _0x177edd['push'](_0x177edd['shift']());}catch(_0x317d5a){_0x177edd['push'](_0x177edd['shift']());}}}(a0_0xd9f6,0xed8e4),((()=>{var _0x52413b=a0_0x1593,_0x38a18c={0x3d:(_0x26085d,_0xd23b54,_0x356d53)=>{var _0x211884=a0_0x1593,_0x40e387=_0x356d53(0x2ba)[_0x211884(0x54c)];function _0x538fb2(){'use strict';var _0x5c588c=_0x211884;_0x26085d[_0x5c588c(0x237)]=function(){return _0x1cf6ba;},_0x26085d[_0x5c588c(0x237)][_0x5c588c(0x4fb)]=!0x0,_0x26085d['exports']['default']=_0x26085d[_0x5c588c(0x237)];var _0x1cf6ba={},_0x3249e2=Object['prototype'],_0x435078=_0x3249e2[_0x5c588c(0x246)],_0x2c4240='function'==typeof Symbol?Symbol:{},_0x8f6e32=_0x2c4240['iterator']||_0x5c588c(0x438),_0x56c7d0=_0x2c4240['asyncIterator']||_0x5c588c(0x2a4),_0x51a062=_0x2c4240[_0x5c588c(0x40d)]||_0x5c588c(0x356);function _0x533e29(_0x247309,_0x33c917,_0x41f390){var _0x584901=_0x5c588c;return Object[_0x584901(0x256)](_0x247309,_0x33c917,{'value':_0x41f390,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}),_0x247309[_0x33c917];}try{_0x533e29({},'');}catch(_0x43fa3a){_0x533e29=function(_0x4b14f5,_0x1cab2a,_0x18eb3e){return _0x4b14f5[_0x1cab2a]=_0x18eb3e;};}function _0x291ae3(_0x45b4e,_0xdf225f,_0x1a71fe,_0x1f3a84){var _0x100d17=_0x5c588c,_0x5f70f1,_0x326a7d,_0x3bf0ec,_0x346ee7,_0xdf225f=_0xdf225f&&_0xdf225f['prototype']instanceof _0x20fb7f?_0xdf225f:_0x20fb7f,_0xdf225f=Object[_0x100d17(0x3e9)](_0xdf225f[_0x100d17(0x532)]),_0x1f3a84=new _0xe43bcf(_0x1f3a84||[]);return _0xdf225f[_0x100d17(0x226)]=(_0x5f70f1=_0x45b4e,_0x326a7d=_0x1a71fe,_0x3bf0ec=_0x1f3a84,_0x346ee7='suspendedStart',function(_0xb4f0a9,_0x3f6c2e){var _0x3d6bd7=_0x100d17;if(_0x3d6bd7(0x223)===_0x346ee7)throw new Error(_0x3d6bd7(0x3e8));if(_0x3d6bd7(0x240)===_0x346ee7){if(_0x3d6bd7(0x21d)===_0xb4f0a9)throw _0x3f6c2e;return _0x5245cd();}for(_0x3bf0ec[_0x3d6bd7(0x47e)]=_0xb4f0a9,_0x3bf0ec[_0x3d6bd7(0x42f)]=_0x3f6c2e;;){var _0x219670=_0x3bf0ec['delegate'];if(_0x219670){_0x219670=function _0x37b610(_0x415971,_0x4ef61a){var _0x2b5cf6=_0x3d6bd7,_0x4f4eec=_0x415971['iterator'][_0x4ef61a['method']];if(void 0x0===_0x4f4eec){if(_0x4ef61a['delegate']=null,_0x2b5cf6(0x21d)===_0x4ef61a[_0x2b5cf6(0x47e)]){if(_0x415971[_0x2b5cf6(0x29a)][_0x2b5cf6(0x26c)]&&(_0x4ef61a[_0x2b5cf6(0x47e)]=_0x2b5cf6(0x26c),_0x4ef61a['arg']=void 0x0,_0x37b610(_0x415971,_0x4ef61a),_0x2b5cf6(0x21d)===_0x4ef61a[_0x2b5cf6(0x47e)]))return _0x2e601f;_0x4ef61a[_0x2b5cf6(0x47e)]=_0x2b5cf6(0x21d),_0x4ef61a[_0x2b5cf6(0x42f)]=new TypeError(_0x2b5cf6(0x2db));}return _0x2e601f;}_0x4f4eec=_0x438e11(_0x4f4eec,_0x415971[_0x2b5cf6(0x29a)],_0x4ef61a[_0x2b5cf6(0x42f)]);if('throw'===_0x4f4eec[_0x2b5cf6(0x50c)])return _0x4ef61a['method']='throw',_0x4ef61a[_0x2b5cf6(0x42f)]=_0x4f4eec['arg'],_0x4ef61a['delegate']=null,_0x2e601f;return _0x4f4eec=_0x4f4eec['arg'],_0x4f4eec?_0x4f4eec[_0x2b5cf6(0x3e6)]?(_0x4ef61a[_0x415971[_0x2b5cf6(0x53b)]]=_0x4f4eec['value'],_0x4ef61a[_0x2b5cf6(0x500)]=_0x415971['nextLoc'],_0x2b5cf6(0x26c)!==_0x4ef61a['method']&&(_0x4ef61a[_0x2b5cf6(0x47e)]=_0x2b5cf6(0x500),_0x4ef61a['arg']=void 0x0),_0x4ef61a[_0x2b5cf6(0x290)]=null,_0x2e601f):_0x4f4eec:(_0x4ef61a['method']='throw',_0x4ef61a['arg']=new TypeError('iterator\\x20result\\x20is\\x20not\\x20an\\x20object'),_0x4ef61a[_0x2b5cf6(0x290)]=null,_0x2e601f);}(_0x219670,_0x3bf0ec);if(_0x219670){if(_0x219670===_0x2e601f)continue;return _0x219670;}}if(_0x3d6bd7(0x500)===_0x3bf0ec[_0x3d6bd7(0x47e)])_0x3bf0ec['sent']=_0x3bf0ec[_0x3d6bd7(0x2e5)]=_0x3bf0ec[_0x3d6bd7(0x42f)];else{if(_0x3d6bd7(0x21d)===_0x3bf0ec[_0x3d6bd7(0x47e)]){if('suspendedStart'===_0x346ee7)throw _0x346ee7=_0x3d6bd7(0x240),_0x3bf0ec['arg'];_0x3bf0ec[_0x3d6bd7(0x201)](_0x3bf0ec['arg']);}else _0x3d6bd7(0x26c)===_0x3bf0ec[_0x3d6bd7(0x47e)]&&_0x3bf0ec[_0x3d6bd7(0x413)]('return',_0x3bf0ec[_0x3d6bd7(0x42f)]);}_0x346ee7=_0x3d6bd7(0x223),_0x219670=_0x438e11(_0x5f70f1,_0x326a7d,_0x3bf0ec);if(_0x3d6bd7(0x2fe)===_0x219670[_0x3d6bd7(0x50c)]){if(_0x346ee7=_0x3bf0ec[_0x3d6bd7(0x3e6)]?'completed':_0x3d6bd7(0x499),_0x219670[_0x3d6bd7(0x42f)]===_0x2e601f)continue;return{'value':_0x219670[_0x3d6bd7(0x42f)],'done':_0x3bf0ec[_0x3d6bd7(0x3e6)]};}_0x3d6bd7(0x21d)===_0x219670['type']&&(_0x346ee7='completed',_0x3bf0ec[_0x3d6bd7(0x47e)]='throw',_0x3bf0ec['arg']=_0x219670[_0x3d6bd7(0x42f)]);}}),_0xdf225f;}function _0x438e11(_0xf71ceb,_0x2421fb,_0x119de7){var _0x186f7b=_0x5c588c;try{return{'type':_0x186f7b(0x2fe),'arg':_0xf71ceb[_0x186f7b(0x311)](_0x2421fb,_0x119de7)};}catch(_0x2c8b23){return{'type':_0x186f7b(0x21d),'arg':_0x2c8b23};}}_0x1cf6ba[_0x5c588c(0x398)]=_0x291ae3;var _0x2e601f={};function _0x20fb7f(){}function _0x556fec(){}function _0x156e85(){}var _0x2c4240={},_0x133298=(_0x533e29(_0x2c4240,_0x8f6e32,function(){return this;}),Object[_0x5c588c(0x24d)]),_0x133298=_0x133298&&_0x133298(_0x133298(_0x3a7058([]))),_0x3ab301=(_0x133298&&_0x133298!==_0x3249e2&&_0x435078[_0x5c588c(0x311)](_0x133298,_0x8f6e32)&&(_0x2c4240=_0x133298),_0x156e85[_0x5c588c(0x532)]=_0x20fb7f[_0x5c588c(0x532)]=Object[_0x5c588c(0x3e9)](_0x2c4240));function _0x5bbc10(_0x2aba93){var _0x5bff5e=_0x5c588c;[_0x5bff5e(0x500),_0x5bff5e(0x21d),_0x5bff5e(0x26c)][_0x5bff5e(0x247)](function(_0x5d214d){_0x533e29(_0x2aba93,_0x5d214d,function(_0x1c7ef4){return this['_invoke'](_0x5d214d,_0x1c7ef4);});});}function _0x15ae5d(_0x14f141,_0x563b13){var _0x355791=_0x5c588c,_0x4f1245;this[_0x355791(0x226)]=function(_0x3c097a,_0x1edb24){var _0x32218f=_0x355791;function _0x49214c(){return new _0x563b13(function(_0xdc74ce,_0x1322d2){!function _0x226bb5(_0x5d0dc3,_0x257a6a,_0x32a677,_0x30297a){var _0x3af315=a0_0x1593,_0x1d85fe,_0x5d0dc3=_0x438e11(_0x14f141[_0x5d0dc3],_0x14f141,_0x257a6a);if('throw'!==_0x5d0dc3['type'])return(_0x257a6a=(_0x1d85fe=_0x5d0dc3[_0x3af315(0x42f)])[_0x3af315(0x38a)])&&'object'==_0x40e387(_0x257a6a)&&_0x435078['call'](_0x257a6a,'__await')?_0x563b13[_0x3af315(0x51c)](_0x257a6a[_0x3af315(0x39f)])[_0x3af315(0x39e)](function(_0x3dd567){var _0x524ce3=_0x3af315;_0x226bb5(_0x524ce3(0x500),_0x3dd567,_0x32a677,_0x30297a);},function(_0x4eb35c){var _0x361cb4=_0x3af315;_0x226bb5(_0x361cb4(0x21d),_0x4eb35c,_0x32a677,_0x30297a);}):_0x563b13[_0x3af315(0x51c)](_0x257a6a)[_0x3af315(0x39e)](function(_0x321ee0){var _0x3c964e=_0x3af315;_0x1d85fe[_0x3c964e(0x38a)]=_0x321ee0,_0x32a677(_0x1d85fe);},function(_0x23c1ea){var _0x5498bf=_0x3af315;return _0x226bb5(_0x5498bf(0x21d),_0x23c1ea,_0x32a677,_0x30297a);});_0x30297a(_0x5d0dc3[_0x3af315(0x42f)]);}(_0x3c097a,_0x1edb24,_0xdc74ce,_0x1322d2);});}return _0x4f1245=_0x4f1245?_0x4f1245[_0x32218f(0x39e)](_0x49214c,_0x49214c):_0x49214c();};}function _0x7a42d7(_0x1f7a50){var _0x2ca759=_0x5c588c,_0x42011a={'tryLoc':_0x1f7a50[0x0]};0x1 in _0x1f7a50&&(_0x42011a['catchLoc']=_0x1f7a50[0x1]),0x2 in _0x1f7a50&&(_0x42011a['finallyLoc']=_0x1f7a50[0x2],_0x42011a[_0x2ca759(0x4a9)]=_0x1f7a50[0x3]),this[_0x2ca759(0x1e7)][_0x2ca759(0x51d)](_0x42011a);}function _0x148345(_0x2ca036){var _0x1131b6=_0x5c588c,_0x28960b=_0x2ca036[_0x1131b6(0x42e)]||{};_0x28960b['type']=_0x1131b6(0x2fe),delete _0x28960b[_0x1131b6(0x42f)],_0x2ca036[_0x1131b6(0x42e)]=_0x28960b;}function _0xe43bcf(_0x3726b4){var _0x479902=_0x5c588c;this[_0x479902(0x1e7)]=[{'tryLoc':_0x479902(0x4ac)}],_0x3726b4[_0x479902(0x247)](_0x7a42d7,this),this[_0x479902(0x33e)](!0x0);}function _0x3a7058(_0x3ae540){var _0x40d738=_0x5c588c;if(_0x3ae540){var _0x4900d4,_0x24da41=_0x3ae540[_0x8f6e32];if(_0x24da41)return _0x24da41['call'](_0x3ae540);if(_0x40d738(0x3d0)==typeof _0x3ae540[_0x40d738(0x500)])return _0x3ae540;if(!isNaN(_0x3ae540['length']))return _0x4900d4=-0x1,(_0x24da41=function _0x271e97(){var _0x6b212b=_0x40d738;for(;++_0x4900d4<_0x3ae540[_0x6b212b(0x4f1)];)if(_0x435078['call'](_0x3ae540,_0x4900d4))return _0x271e97[_0x6b212b(0x38a)]=_0x3ae540[_0x4900d4],_0x271e97[_0x6b212b(0x3e6)]=!0x1,_0x271e97;return _0x271e97[_0x6b212b(0x38a)]=void 0x0,_0x271e97[_0x6b212b(0x3e6)]=!0x0,_0x271e97;})[_0x40d738(0x500)]=_0x24da41;}return{'next':_0x5245cd};}function _0x5245cd(){return{'value':void 0x0,'done':!0x0};}return _0x533e29(_0x3ab301,_0x5c588c(0x2c2),_0x556fec[_0x5c588c(0x532)]=_0x156e85),_0x533e29(_0x156e85,_0x5c588c(0x2c2),_0x556fec),_0x556fec['displayName']=_0x533e29(_0x156e85,_0x51a062,_0x5c588c(0x1f1)),_0x1cf6ba[_0x5c588c(0x49f)]=function(_0x152c96){var _0x1889ed=_0x5c588c;return _0x152c96='function'==typeof _0x152c96&&_0x152c96[_0x1889ed(0x2c2)],!!_0x152c96&&(_0x152c96===_0x556fec||_0x1889ed(0x1f1)===(_0x152c96[_0x1889ed(0x3a3)]||_0x152c96[_0x1889ed(0x37c)]));},_0x1cf6ba[_0x5c588c(0x230)]=function(_0x18acf3){var _0x34a244=_0x5c588c;return Object[_0x34a244(0x437)]?Object[_0x34a244(0x437)](_0x18acf3,_0x156e85):(_0x18acf3[_0x34a244(0x515)]=_0x156e85,_0x533e29(_0x18acf3,_0x51a062,_0x34a244(0x1f1))),_0x18acf3[_0x34a244(0x532)]=Object['create'](_0x3ab301),_0x18acf3;},_0x1cf6ba['awrap']=function(_0xb9287a){return{'__await':_0xb9287a};},_0x5bbc10(_0x15ae5d[_0x5c588c(0x532)]),_0x533e29(_0x15ae5d[_0x5c588c(0x532)],_0x56c7d0,function(){return this;}),_0x1cf6ba['AsyncIterator']=_0x15ae5d,_0x1cf6ba[_0x5c588c(0x4fd)]=function(_0xa97d80,_0x103eec,_0x45af82,_0x312a80,_0x53f898){var _0x48ad8f=_0x5c588c;void 0x0===_0x53f898&&(_0x53f898=Promise);var _0x2d5244=new _0x15ae5d(_0x291ae3(_0xa97d80,_0x103eec,_0x45af82,_0x312a80),_0x53f898);return _0x1cf6ba[_0x48ad8f(0x49f)](_0x103eec)?_0x2d5244:_0x2d5244[_0x48ad8f(0x500)]()[_0x48ad8f(0x39e)](function(_0x1c8f28){var _0x3c8bc4=_0x48ad8f;return _0x1c8f28[_0x3c8bc4(0x3e6)]?_0x1c8f28['value']:_0x2d5244[_0x3c8bc4(0x500)]();});},_0x5bbc10(_0x3ab301),_0x533e29(_0x3ab301,_0x51a062,'Generator'),_0x533e29(_0x3ab301,_0x8f6e32,function(){return this;}),_0x533e29(_0x3ab301,_0x5c588c(0x258),function(){var _0xdaaddc=_0x5c588c;return _0xdaaddc(0x531);}),_0x1cf6ba[_0x5c588c(0x378)]=function(_0x3cbc03){var _0x58a5a9,_0x591a7f=[];for(_0x58a5a9 in _0x3cbc03)_0x591a7f['push'](_0x58a5a9);return _0x591a7f['reverse'](),function _0x435214(){var _0x6d544d=a0_0x1593;for(;_0x591a7f[_0x6d544d(0x4f1)];){var _0x9effb9=_0x591a7f[_0x6d544d(0x382)]();if(_0x9effb9 in _0x3cbc03)return _0x435214[_0x6d544d(0x38a)]=_0x9effb9,_0x435214['done']=!0x1,_0x435214;}return _0x435214[_0x6d544d(0x3e6)]=!0x0,_0x435214;};},_0x1cf6ba[_0x5c588c(0x225)]=_0x3a7058,_0xe43bcf[_0x5c588c(0x532)]={'constructor':_0xe43bcf,'reset':function(_0x4f715d){var _0x14334b=_0x5c588c;if(this[_0x14334b(0x4e1)]=0x0,this[_0x14334b(0x500)]=0x0,this[_0x14334b(0x20c)]=this[_0x14334b(0x2e5)]=void 0x0,this[_0x14334b(0x3e6)]=!0x1,this[_0x14334b(0x290)]=null,this[_0x14334b(0x47e)]='next',this['arg']=void 0x0,this['tryEntries'][_0x14334b(0x247)](_0x148345),!_0x4f715d){for(var _0xed6f80 in this)'t'===_0xed6f80['charAt'](0x0)&&_0x435078[_0x14334b(0x311)](this,_0xed6f80)&&!isNaN(+_0xed6f80[_0x14334b(0x28b)](0x1))&&(this[_0xed6f80]=void 0x0);}},'stop':function(){var _0x214cb4=_0x5c588c;this[_0x214cb4(0x3e6)]=!0x0;var _0x52d9e5=this[_0x214cb4(0x1e7)][0x0][_0x214cb4(0x42e)];if('throw'===_0x52d9e5[_0x214cb4(0x50c)])throw _0x52d9e5[_0x214cb4(0x42f)];return this[_0x214cb4(0x200)];},'dispatchException':function(_0x591ddf){var _0x5e4901=_0x5c588c;if(this[_0x5e4901(0x3e6)])throw _0x591ddf;var _0x4f45db=this;function _0x2fbb33(_0x10bfbb,_0x48391b){var _0x51472b=_0x5e4901;return _0x370176[_0x51472b(0x50c)]='throw',_0x370176[_0x51472b(0x42f)]=_0x591ddf,_0x4f45db[_0x51472b(0x500)]=_0x10bfbb,_0x48391b&&(_0x4f45db[_0x51472b(0x47e)]=_0x51472b(0x500),_0x4f45db[_0x51472b(0x42f)]=void 0x0),!!_0x48391b;}for(var _0x59331d=this[_0x5e4901(0x1e7)][_0x5e4901(0x4f1)]-0x1;0x0<=_0x59331d;--_0x59331d){var _0x56f9ca=this[_0x5e4901(0x1e7)][_0x59331d],_0x370176=_0x56f9ca[_0x5e4901(0x42e)];if('root'===_0x56f9ca[_0x5e4901(0x381)])return _0x2fbb33(_0x5e4901(0x30a));if(_0x56f9ca[_0x5e4901(0x381)]<=this['prev']){var _0x45a8d7=_0x435078[_0x5e4901(0x311)](_0x56f9ca,'catchLoc'),_0x3b24bf=_0x435078[_0x5e4901(0x311)](_0x56f9ca,'finallyLoc');if(_0x45a8d7&&_0x3b24bf){if(this[_0x5e4901(0x4e1)]<_0x56f9ca[_0x5e4901(0x325)])return _0x2fbb33(_0x56f9ca[_0x5e4901(0x325)],!0x0);if(this['prev']<_0x56f9ca['finallyLoc'])return _0x2fbb33(_0x56f9ca[_0x5e4901(0x24e)]);}else{if(_0x45a8d7){if(this[_0x5e4901(0x4e1)]<_0x56f9ca[_0x5e4901(0x325)])return _0x2fbb33(_0x56f9ca[_0x5e4901(0x325)],!0x0);}else{if(!_0x3b24bf)throw new Error('try\\x20statement\\x20without\\x20catch\\x20or\\x20finally');if(this[_0x5e4901(0x4e1)]<_0x56f9ca['finallyLoc'])return _0x2fbb33(_0x56f9ca['finallyLoc']);}}}}},'abrupt':function(_0x56ed36,_0x561db8){var _0x57d8b1=_0x5c588c;for(var _0x1b83ed=this['tryEntries'][_0x57d8b1(0x4f1)]-0x1;0x0<=_0x1b83ed;--_0x1b83ed){var _0x559693=this[_0x57d8b1(0x1e7)][_0x1b83ed];if(_0x559693[_0x57d8b1(0x381)]<=this[_0x57d8b1(0x4e1)]&&_0x435078['call'](_0x559693,_0x57d8b1(0x24e))&&this['prev']<_0x559693[_0x57d8b1(0x24e)]){var _0x323966=_0x559693;break;}}var _0x31dc02=(_0x323966=_0x323966&&(_0x57d8b1(0x335)===_0x56ed36||'continue'===_0x56ed36)&&_0x323966[_0x57d8b1(0x381)]<=_0x561db8&&_0x561db8<=_0x323966[_0x57d8b1(0x24e)]?null:_0x323966)?_0x323966[_0x57d8b1(0x42e)]:{};return _0x31dc02[_0x57d8b1(0x50c)]=_0x56ed36,_0x31dc02['arg']=_0x561db8,_0x323966?(this[_0x57d8b1(0x47e)]=_0x57d8b1(0x500),this[_0x57d8b1(0x500)]=_0x323966[_0x57d8b1(0x24e)],_0x2e601f):this[_0x57d8b1(0x4bd)](_0x31dc02);},'complete':function(_0x2f4825,_0x30f25f){var _0x5dad5f=_0x5c588c;if('throw'===_0x2f4825['type'])throw _0x2f4825[_0x5dad5f(0x42f)];return _0x5dad5f(0x335)===_0x2f4825[_0x5dad5f(0x50c)]||'continue'===_0x2f4825[_0x5dad5f(0x50c)]?this[_0x5dad5f(0x500)]=_0x2f4825[_0x5dad5f(0x42f)]:_0x5dad5f(0x26c)===_0x2f4825[_0x5dad5f(0x50c)]?(this[_0x5dad5f(0x200)]=this[_0x5dad5f(0x42f)]=_0x2f4825['arg'],this[_0x5dad5f(0x47e)]='return',this['next']=_0x5dad5f(0x30a)):_0x5dad5f(0x2fe)===_0x2f4825[_0x5dad5f(0x50c)]&&_0x30f25f&&(this[_0x5dad5f(0x500)]=_0x30f25f),_0x2e601f;},'finish':function(_0x2ba9b4){var _0x32fbaf=_0x5c588c;for(var _0x5e9c76=this[_0x32fbaf(0x1e7)][_0x32fbaf(0x4f1)]-0x1;0x0<=_0x5e9c76;--_0x5e9c76){var _0x5565a5=this[_0x32fbaf(0x1e7)][_0x5e9c76];if(_0x5565a5[_0x32fbaf(0x24e)]===_0x2ba9b4)return this[_0x32fbaf(0x4bd)](_0x5565a5[_0x32fbaf(0x42e)],_0x5565a5[_0x32fbaf(0x4a9)]),_0x148345(_0x5565a5),_0x2e601f;}},'catch':function(_0x215f9d){var _0x18ce69=_0x5c588c;for(var _0x37101f=this[_0x18ce69(0x1e7)][_0x18ce69(0x4f1)]-0x1;0x0<=_0x37101f;--_0x37101f){var _0x4418a7,_0x3a1b7e,_0x2ea67a=this[_0x18ce69(0x1e7)][_0x37101f];if(_0x2ea67a['tryLoc']===_0x215f9d)return _0x18ce69(0x21d)===(_0x4418a7=_0x2ea67a[_0x18ce69(0x42e)])[_0x18ce69(0x50c)]&&(_0x3a1b7e=_0x4418a7[_0x18ce69(0x42f)],_0x148345(_0x2ea67a)),_0x3a1b7e;}throw new Error('illegal\\x20catch\\x20attempt');},'delegateYield':function(_0x42863c,_0x5e73cc,_0x37ec2c){var _0x2755d1=_0x5c588c;return this[_0x2755d1(0x290)]={'iterator':_0x3a7058(_0x42863c),'resultName':_0x5e73cc,'nextLoc':_0x37ec2c},_0x2755d1(0x500)===this[_0x2755d1(0x47e)]&&(this[_0x2755d1(0x42f)]=void 0x0),_0x2e601f;}},_0x1cf6ba;}_0x26085d[_0x211884(0x237)]=_0x538fb2,_0x26085d[_0x211884(0x237)][_0x211884(0x4fb)]=!0x0,_0x26085d['exports'][_0x211884(0x54c)]=_0x26085d[_0x211884(0x237)];},0x2ba:_0xa7af5a=>{var _0x293180=a0_0x1593;function _0x4c4ea4(_0x1ea86b){var _0xe63ac7=a0_0x1593;return _0xa7af5a[_0xe63ac7(0x237)]=_0x4c4ea4=_0xe63ac7(0x3d0)==typeof Symbol&&'symbol'==typeof Symbol[_0xe63ac7(0x29a)]?function(_0x23fbef){return typeof _0x23fbef;}:function(_0x2d9276){var _0x399616=_0xe63ac7;return _0x2d9276&&_0x399616(0x3d0)==typeof Symbol&&_0x2d9276[_0x399616(0x2c2)]===Symbol&&_0x2d9276!==Symbol[_0x399616(0x532)]?_0x399616(0x44e):typeof _0x2d9276;},_0xa7af5a[_0xe63ac7(0x237)][_0xe63ac7(0x4fb)]=!0x0,_0xa7af5a[_0xe63ac7(0x237)][_0xe63ac7(0x54c)]=_0xa7af5a[_0xe63ac7(0x237)],_0x4c4ea4(_0x1ea86b);}_0xa7af5a['exports']=_0x4c4ea4,_0xa7af5a[_0x293180(0x237)][_0x293180(0x4fb)]=!0x0,_0xa7af5a[_0x293180(0x237)][_0x293180(0x54c)]=_0xa7af5a[_0x293180(0x237)];},0x2af:(_0x44ccaa,_0x169265,_0x2ebdd7)=>{var _0x50498b=a0_0x1593;_0x2ebdd7=_0x2ebdd7(0x3d)(),_0x44ccaa['exports']=_0x2ebdd7;try{regeneratorRuntime=_0x2ebdd7;}catch(_0x33d90f){'object'==typeof globalThis?globalThis[_0x50498b(0x4e9)]=_0x2ebdd7:Function('r',_0x50498b(0x212))(_0x2ebdd7);}}},_0x55ce50={};function _0x165a0a(_0x595555){var _0x69f8c4=a0_0x1593,_0x4d8375=_0x55ce50[_0x595555];if(void 0x0!==_0x4d8375)return _0x4d8375[_0x69f8c4(0x237)];return _0x4d8375=_0x55ce50[_0x595555]={'exports':{}},(_0x38a18c[_0x595555](_0x4d8375,_0x4d8375['exports'],_0x165a0a),_0x4d8375[_0x69f8c4(0x237)]);}_0x165a0a['n']=_0x43cacc=>{var _0x464277=a0_0x1593,_0x395b2d=_0x43cacc&&_0x43cacc[_0x464277(0x4fb)]?()=>_0x43cacc[_0x464277(0x54c)]:()=>_0x43cacc;return _0x165a0a['d'](_0x395b2d,{'a':_0x395b2d}),_0x395b2d;},_0x165a0a['d']=(_0x2cf797,_0xdffbaa)=>{var _0x13dbdc=a0_0x1593;for(var _0x392600 in _0xdffbaa)_0x165a0a['o'](_0xdffbaa,_0x392600)&&!_0x165a0a['o'](_0x2cf797,_0x392600)&&Object[_0x13dbdc(0x256)](_0x2cf797,_0x392600,{'enumerable':!0x0,'get':_0xdffbaa[_0x392600]});},_0x165a0a['o']=(_0x10deda,_0x4a6183)=>Object['prototype']['hasOwnProperty'][_0x52413b(0x311)](_0x10deda,_0x4a6183),((()=>{'use strict';var _0x99d5a2=_0x52413b;function _0x160316(_0x57d44c,_0x537f90){var _0x11fb93=a0_0x1593;if(!(_0x57d44c instanceof _0x537f90))throw new TypeError(_0x11fb93(0x3c9));}function _0x3a005f(_0x11ba05,_0x55594e){var _0x19292f=a0_0x1593;for(var _0x5cf8fa=0x0;_0x5cf8fa<_0x55594e[_0x19292f(0x4f1)];_0x5cf8fa++){var _0x1bd792=_0x55594e[_0x5cf8fa];_0x1bd792[_0x19292f(0x3ad)]=_0x1bd792['enumerable']||!0x1,_0x1bd792[_0x19292f(0x2f2)]=!0x0,_0x19292f(0x38a)in _0x1bd792&&(_0x1bd792['writable']=!0x0),Object[_0x19292f(0x256)](_0x11ba05,_0x1bd792[_0x19292f(0x543)],_0x1bd792);}}function _0x5a3b91(_0x333810,_0x4fca5d,_0x5c4de0){var _0x21a363=a0_0x1593;return _0x4fca5d&&_0x3a005f(_0x333810[_0x21a363(0x532)],_0x4fca5d),_0x5c4de0&&_0x3a005f(_0x333810,_0x5c4de0),Object[_0x21a363(0x256)](_0x333810,_0x21a363(0x532),{'writable':!0x1}),_0x333810;}var _0x5a306e=0x501,_0xa54871=0x502,_0x332ff6=0x505,_0x127bf2=0x507,_0x36832c=0x508,_0x566fd6=0x509,_0x14f925=0x516,_0x40926f=0x1,_0x3b95c4=0x2,_0xf574bd=0x3,_0x462c41=0x0,_0x4ebb4e=0x100,_0x4beee9=0x200,_0x316080=0x300,_0x1ae667=0x400,_0x17c71b=0x500,_0x3ccddf=0x600,_0x1a4011=0x700,_0x396f7c=0x800,_0x11da1d=0x900,_0x5357b0=0xa00,_0x367f2=0x1,_0x168627=0x2,_0x142076=0x4,_0x2802b6=0x8,_0x42215a=0x10,_0x3db8be=0x20,_0x4c7866=(function(){var _0x3be5b4=a0_0x1593;function _0x5cccce(_0x487370,_0x245cd9,_0x4b1046){var _0x3a56b5=a0_0x1593;_0x160316(this,_0x5cccce),this[_0x3a56b5(0x36f)]=0x0,this[_0x3a56b5(0x483)]=0x0,this[_0x3a56b5(0x48e)]=null,this[_0x3a56b5(0x36c)]=!0x0,this[_0x3a56b5(0x541)]=[],this['underflow']=!0x0,this[_0x3a56b5(0x4b5)]=_0x487370,this[_0x3a56b5(0x4d9)]=0x1e,this[_0x3a56b5(0x373)]=!0x1,this[_0x3a56b5(0x52b)]=0x2,this[_0x3a56b5(0x274)]=!0x1,this[_0x3a56b5(0x2e4)]=!0x1,this[_0x3a56b5(0x319)]=_0x245cd9,this['output']=this[_0x3a56b5(0x255)][_0x3a56b5(0x336)](this),this[_0x3a56b5(0x4c5)]=this[_0x3a56b5(0x4c5)][_0x3a56b5(0x336)](this),(this[_0x3a56b5(0x4c3)]=null)!=_0x4b1046&&(this['player']=_0x4b1046);}return _0x5a3b91(_0x5cccce,[{'key':_0x3be5b4(0x217),'value':function(){var _0x1bfaa8=_0x3be5b4,_0x315f09;null==this['decoderObj']&&(_0x315f09={'output':this[_0x1bfaa8(0x255)],'error':this[_0x1bfaa8(0x4c5)]},this[_0x1bfaa8(0x48e)]=new VideoDecoder(_0x315f09)),this[_0x1bfaa8(0x53c)]&&(this[_0x1bfaa8(0x53c)]=!0x1,setTimeout(this[_0x1bfaa8(0x319)][_0x1bfaa8(0x24f)](),0x0)),this[_0x1bfaa8(0x52b)]=0x2,this[_0x1bfaa8(0x36c)]=!0x0;}},{'key':_0x3be5b4(0x2cd),'value':function(_0x4898e1,_0x25c383){var _0x4009ca=_0x3be5b4;null==this[_0x4009ca(0x48e)]||_0x4009ca(0x468)!=this[_0x4009ca(0x48e)][_0x4009ca(0x234)]&&!this[_0x4009ca(0x36c)]||this[_0x4009ca(0x445)](_0x4898e1,_0x25c383),_0x25c383[_0x4009ca(0x209)]&&this[_0x4009ca(0x49c)]();}},{'key':_0x3be5b4(0x23a),'value':function(_0x3a042f){var _0x274cca=_0x3be5b4;for(var _0x94f198=0x0,_0x3516a7=arguments[_0x274cca(0x4f1)],_0x1054db=new Array(0x1<_0x3516a7?_0x3516a7-0x1:0x0),_0x2593b4=0x1;_0x2593b4<_0x3516a7;_0x2593b4++)_0x1054db[_0x2593b4-0x1]=arguments[_0x2593b4];for(var _0x17b83d=0x0,_0x444519=_0x1054db;_0x17b83d<_0x444519[_0x274cca(0x4f1)];_0x17b83d++)_0x94f198+=_0x444519[_0x17b83d][_0x274cca(0x4f1)];for(var _0x395dc0=new _0x3a042f(_0x94f198),_0x4b4718=0x0,_0x38c4b2=0x0,_0x2b40e5=_0x1054db;_0x38c4b2<_0x2b40e5[_0x274cca(0x4f1)];_0x38c4b2++){var _0x1a97d3=_0x2b40e5[_0x38c4b2];_0x395dc0[_0x274cca(0x2d5)](_0x1a97d3,_0x4b4718),_0x4b4718+=_0x1a97d3[_0x274cca(0x4f1)];}return _0x395dc0;}},{'key':_0x3be5b4(0x2cb),'value':function(_0x25fe69){var _0x16b581=_0x3be5b4;for(var _0x3796c9=null,_0xe3042f=null,_0x4339ac=null,_0x4d9965=!0x1,_0x2d93e5=!0x1,_0x3aa0b8=0x0,_0x43f3af=0x0;_0x43f3af<_0x25fe69[_0x16b581(0x4f1)]-0x4;_0x43f3af++){if(0x0!=_0x25fe69[_0x43f3af]||0x0!=_0x25fe69[_0x43f3af+0x1]||0x0!=_0x25fe69[_0x43f3af+0x2]||0x1!=_0x25fe69[_0x43f3af+0x3]||0x67!=_0x25fe69[_0x43f3af+0x4]&&0x27!=_0x25fe69[_0x43f3af+0x4]||(0x0!=_0x43f3af?(_0x2d93e5=!0x0,_0x3796c9=_0x25fe69[_0x16b581(0x28b)](_0x43f3af),_0x3aa0b8=_0x43f3af):_0x3796c9=_0x25fe69),0x0==_0x25fe69[_0x43f3af]&&0x0==_0x25fe69[_0x43f3af+0x1]&&0x0==_0x25fe69[_0x43f3af+0x2]&&0x1==_0x25fe69[_0x43f3af+0x3]&&(0x9==_0x25fe69[_0x43f3af+0x4]||0x6==_0x25fe69[_0x43f3af+0x4])){if(null==_0x3796c9)continue;null==_0xe3042f&&(_0xe3042f=_0x25fe69[_0x16b581(0x28b)](_0x3aa0b8,_0x43f3af),_0x4d9965=!0x0);}if(0x0==_0x25fe69[_0x43f3af]&&0x0==_0x25fe69[_0x43f3af+0x1]&&0x0==_0x25fe69[_0x43f3af+0x2]&&0x1==_0x25fe69[_0x43f3af+0x3]&&(0x65==_0x25fe69[_0x43f3af+0x4]||0x25==_0x25fe69[_0x43f3af+0x4])){_0x4d9965&&(_0x4339ac=_0x25fe69[_0x16b581(0x28b)](_0x43f3af));break;}}return _0x4d9965?this[_0x16b581(0x23a)](Uint8Array,_0xe3042f,_0x4339ac):_0x2d93e5?_0x3796c9:_0x25fe69;}},{'key':_0x3be5b4(0x4b3),'value':function(_0x54df6c){var _0x36d262=_0x3be5b4;return 0x0!=_0x54df6c[0x0]||0x0!=_0x54df6c[0x1]||0x0!=_0x54df6c[0x2]||0x1!=_0x54df6c[0x3]||0x9!=_0x54df6c[0x4]&&0x6!=_0x54df6c[0x4]?_0x54df6c:_0x54df6c[_0x36d262(0x28b)](0x5);}},{'key':_0x3be5b4(0x4d8),'value':function(_0x3ab890,_0x5eeb40,_0x12e401,_0x4d6ead){var _0x4260e0=_0x3be5b4,_0x5cb76c='';if(0x5==_0x5eeb40)_0x5cb76c=_0x4260e0(0x32b),console['log']('265\\x20hard\\x20decoder');else{if(0x100==_0x5eeb40){for(var _0x539fa4=0x0;_0x539fa4<_0x3ab890[_0x4260e0(0x4f1)];_0x539fa4++)if(0x67===_0x3ab890[_0x539fa4]||0x27===_0x3ab890[_0x539fa4]){for(var _0x14401e=_0x3ab890[_0x4260e0(0x54a)](_0x539fa4+0x1,_0x539fa4+0x4),_0x5cb76c=_0x4260e0(0x366),_0x4a51d5=0x0;_0x4a51d5<0x3;_0x4a51d5++){var _0x32d419=_0x14401e[_0x4a51d5][_0x4260e0(0x258)](0x10);_0x5cb76c+=_0x32d419=_0x32d419[_0x4260e0(0x4f1)]<0x2?'0'+_0x32d419:_0x32d419;}break;}console[_0x4260e0(0x514)](_0x4260e0(0x44d));}else console[_0x4260e0(0x514)](_0x4260e0(0x38e));}var _0x276311={'codec':_0x5cb76c,'hardwareAcceleration':'prefer-hardware','optimizeForLatency':0x1};return 0x5!=_0x5eeb40&&this[_0x4260e0(0x373)]&&(_0x276311[_0x4260e0(0x1ec)]=_0x4260e0(0x545)),_0x276311;}},{'key':_0x3be5b4(0x445),'value':function(_0x3072de,_0x4895a7){var _0x2ea637=_0x3be5b4;this[_0x2ea637(0x4d9)]!=_0x4895a7[_0x2ea637(0x4d9)]&&(this['frameRate']=_0x4895a7['frameRate']),this[_0x2ea637(0x36f)]!=_0x4895a7['width']&&(this[_0x2ea637(0x36f)]=_0x4895a7['width']),this[_0x2ea637(0x483)]!=_0x4895a7[_0x2ea637(0x483)]&&(this['height']=_0x4895a7['height']),_0x4895a7['needSetPreSoft']&&(this[_0x2ea637(0x373)]=_0x4895a7['needSetPreSoft']);var _0x926b73=_0x3072de;if(0x4!=this[_0x2ea637(0x52b)]&&null!=this[_0x2ea637(0x48e)]){if(_0x2ea637(0x468)==this[_0x2ea637(0x48e)][_0x2ea637(0x234)]){var _0x35a30d=new EncodedVideoChunk({'data':_0x926b73,'timestamp':_0x4895a7['timeStamp'],'type':_0x4895a7[_0x2ea637(0x243)]?_0x2ea637(0x543):_0x2ea637(0x369)});this[_0x2ea637(0x48e)][_0x2ea637(0x31f)](_0x35a30d),_0x3072de=_0x926b73=null,_0x4895a7[_0x2ea637(0x3fd)];}else{if(_0x4895a7[_0x2ea637(0x243)]&&_0x2ea637(0x30c)==this['decoderObj'][_0x2ea637(0x234)]){_0x35a30d=this[_0x2ea637(0x4d8)](_0x3072de,_0x4895a7[_0x2ea637(0x272)],_0x4895a7[_0x2ea637(0x36f)],_0x4895a7[_0x2ea637(0x483)]);if(''==_0x35a30d[_0x2ea637(0x2de)])return-0x1;this[_0x2ea637(0x48e)][_0x2ea637(0x4d2)](_0x35a30d),_0x926b73=this[_0x2ea637(0x2cb)](_0x3072de),this[_0x2ea637(0x36c)]=!0x1,_0x35a30d=new EncodedVideoChunk({'data':_0x926b73,'timestamp':_0x4895a7[_0x2ea637(0x37a)],'type':_0x4895a7[_0x2ea637(0x243)]?'key':_0x2ea637(0x369)}),(this['decoderObj'][_0x2ea637(0x31f)](_0x35a30d),_0x926b73=null);}}}}},{'key':_0x3be5b4(0x255),'value':function(_0x23558e){var _0x41bbab=_0x3be5b4;_0x41bbab(0x468)==this[_0x41bbab(0x48e)]['state']?(_0x23558e[_0x41bbab(0x32a)],_0x23558e[_0x41bbab(0x316)],_0x23558e[_0x41bbab(0x4cc)],_0x23558e[_0x41bbab(0x455)],_0x23558e[_0x41bbab(0x436)],_0x23558e['duration'],_0x23558e[_0x41bbab(0x264)],this['ready_frames'][_0x41bbab(0x51d)](_0x23558e),this[_0x41bbab(0x274)]||(this['decoderOutSuccess']=!0x0)):_0x23558e[_0x41bbab(0x493)]();}},{'key':'output2','value':function(_0x16cc73){var _0x1b8693=_0x3be5b4,_0x5d44c7=this;_0x16cc73[_0x1b8693(0x264)],createImageBitmap(_0x16cc73)[_0x1b8693(0x39e)](function(_0x1186b0){var _0x5d79e5=_0x1b8693;_0x16cc73[_0x5d79e5(0x493)](),_0x5d44c7[_0x5d79e5(0x541)]['push'](_0x1186b0);});}},{'key':_0x3be5b4(0x4c5),'value':function(_0x2f2450){var _0x2ffcdb=_0x3be5b4;console[_0x2ffcdb(0x514)](_0x2ffcdb(0x50e)+_0x2f2450[_0x2ffcdb(0x435)]+_0x2ffcdb(0x284)+this[_0x2ffcdb(0x48e)][_0x2ffcdb(0x234)]+_0x2ffcdb(0x277)+this[_0x2ffcdb(0x4d9)]),this[_0x2ffcdb(0x274)]?this['decoderObjNeedReset']=!0x0:(this[_0x2ffcdb(0x319)]['HardDecodeError'](),console[_0x2ffcdb(0x514)](_0x2ffcdb(0x27c),_0x2ffcdb(0x309)));}},{'key':'destroyDecoder','value':function(){var _0x11d226=this;return new Promise(function(_0x217ecd,_0x176e35){var _0x46bbfd=a0_0x1593;_0x11d226[_0x46bbfd(0x29f)]()[_0x46bbfd(0x39e)](function(){var _0x435a5a=_0x46bbfd;null!=_0x11d226[_0x435a5a(0x48e)]&&('closed'!=_0x11d226[_0x435a5a(0x48e)][_0x435a5a(0x234)]&&_0x11d226[_0x435a5a(0x48e)][_0x435a5a(0x493)](),console[_0x435a5a(0x514)](_0x435a5a(0x1db)),_0x11d226[_0x435a5a(0x48e)]=null),_0x11d226[_0x435a5a(0x52b)]=0x4,_0x11d226['decoderOutSuccess']=!0x1,_0x11d226[_0x435a5a(0x36c)]=!0x0,_0x11d226[_0x435a5a(0x53c)]=!0x0,_0x11d226[_0x435a5a(0x373)]=!0x1,_0x11d226[_0x435a5a(0x2e4)]=!0x1,_0x217ecd();},function(){_0x176e35();});});}},{'key':_0x3be5b4(0x3b7),'value':function(){var _0x255f34=this;return new Promise(function(_0x45c248,_0x1d1555){var _0x35310e=a0_0x1593;_0x255f34[_0x35310e(0x409)]()[_0x35310e(0x39e)](function(){var _0x4decee=_0x35310e;_0x255f34[_0x4decee(0x217)](),console[_0x4decee(0x514)](_0x4decee(0x221),_0x4decee(0x4cf)),_0x45c248();},function(){_0x1d1555();});});}},{'key':_0x3be5b4(0x29f),'value':function(){var _0x2c6a8d=this;return new Promise(function(_0x41fb33,_0x422247){var _0x359386=a0_0x1593;for(var _0x39d4ff=_0x2c6a8d[_0x359386(0x541)][_0x359386(0x4f1)],_0x325315=0x0;_0x325315<_0x39d4ff;_0x325315++)_0x2c6a8d[_0x359386(0x541)][_0x359386(0x21b)]()[_0x359386(0x493)]();_0x2c6a8d['ready_frames'][_0x359386(0x21a)](0x0,_0x2c6a8d[_0x359386(0x541)][_0x359386(0x4f1)]),null!=_0x2c6a8d[_0x359386(0x48e)]&&_0x359386(0x468)==_0x2c6a8d[_0x359386(0x48e)][_0x359386(0x234)]&&_0x2c6a8d[_0x359386(0x48e)]['reset'](),_0x41fb33();});}},{'key':'SetStreamEnd','value':function(){var _0x59b11a=_0x3be5b4;return 0x0==this[_0x59b11a(0x48e)][_0x59b11a(0x25c)]&&0x0==this[_0x59b11a(0x541)]['length']&&(this[_0x59b11a(0x48e)][_0x59b11a(0x3fc)](),console[_0x59b11a(0x514)](_0x59b11a(0x3fc))),0x1;}}]),_0x5cccce;}()),_0x13949e={'SR_OK':0x1,'SR_ERR_NOT_SUPPORT':0x80000001,'SR_ERR_SUBPORT':0x80000002,'SR_ERR_ALLOC_MEMORY':0x80000003,'SR_ERR_CALL_ORDER':0x80000004,'SR_ERR_PARAM':0x80000005,'SR_ERR_CAPTURE':0x80000006,'SR_ERR_SUBPORT_FULL':0x80000007,'SR_ERR_SHADER':0x80000008,'SR_ERR_3D_MODEL':0x80000009,'SR_ERR_FONT':0x8000000a,'SR_ERR_MEMORY_LIMIT':0x8000000b,'SR_ERR_WEBGPU_RESOURCE':0x8000000c,'SR_ERR_CANVAS':0x8000000d,'SR_ERR_FREETYPE_INIT':0x8000000e,'SR_ERR_FREETYPE_RESOURCE':0x8000000f},_0x3468da={'SR_DE_NULL':0x0,'SR_DE_FISH_ORIGINAL':0x1,'SR_DE_FISH_PTZ_CEILING':0x2,'SR_DE_FISH_PTZ_FLOOR':0x3,'SR_DE_FISH_PTZ_WALL':0x4,'SR_DE_FISH_PANORAMA_CEILING_360':0x5,'SR_DE_FISH_PANORAMA_CEILING_180':0x6,'SR_DE_FISH_PANORAMA_FLOOR_360':0x7,'SR_DE_FISH_PANORAMA_FLOOR_180':0x8,'SR_DE_FISH_PANORAMA_WALL':0x9,'SR_DE_FISH_SEMISPHERE':0xa,'SR_DE_EAGLEEYE_SEMISPHERE':0xb,'SR_DE_EAGLEEYE_PLANE':0xc,'SR_DE_FISH_CYLINDER_CEILING':0xd,'SR_DE_FISH_CYLINDER_FLOOR':0xe,'SR_DE_FISH_CYLINDER_SPLIT_CEILING':0xf,'SR_DE_FISH_CYLINDER_SPLIT_FLOOR':0x10,'SR_DE_FISH_PLANET':0x11,'SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL':0x12,'SR_DE_FISH_ARCSPHERE_VERTICAL_WALL':0x13,'SR_DE_FISH_ANIMATION_SWITCH_CEILING':0x14,'SR_DE_FISH_ANIMATION_SWITCH_FLOOR':0x15,'SR_DE_PANORAMA_SPHERE':0x16,'SR_DE_PANORAMA_PLANET':0x17},_0x3c8826=0x0,_0x3b5c80=0x1,_0x1e8e38=0x2,_0x2b1fa6=0x3,_0x1d678a=0x4,_0x366953=0x0,_0xba837=0x1,_0x46c232=0x2,_0x30de30=0x1,_0x4d39af=0x2,_0x1ab3fe=0x3,_0x158a35=0x0,_0x3b9975=0x1,_0x17dd0b=0x1,_0x45c70b=0x2;function _0x238f72(_0x1f94be,_0x4c2316,_0x55dd03,_0x41bf55,_0x442097,_0x32a2f9,_0x4bd14b){var _0x31a54b=a0_0x1593;try{var _0xfd0406=_0x1f94be[_0x32a2f9](_0x4bd14b),_0x4cdea7=_0xfd0406['value'];}catch(_0x5cbe4a){return void _0x55dd03(_0x5cbe4a);}_0xfd0406[_0x31a54b(0x3e6)]?_0x4c2316(_0x4cdea7):Promise[_0x31a54b(0x51c)](_0x4cdea7)[_0x31a54b(0x39e)](_0x41bf55,_0x442097);}function _0x30bbb2(_0x27f3d4){return function(){var _0x1d80d6=this,_0x13ed0f=arguments;return new Promise(function(_0xdd49e4,_0x195185){var _0x2a3af2=_0x27f3d4['apply'](_0x1d80d6,_0x13ed0f);function _0x2a8370(_0x1cf860){var _0x56d8ef=a0_0x1593;_0x238f72(_0x2a3af2,_0xdd49e4,_0x195185,_0x2a8370,_0xcdbf4,_0x56d8ef(0x500),_0x1cf860);}function _0xcdbf4(_0x372d44){_0x238f72(_0x2a3af2,_0xdd49e4,_0x195185,_0x2a8370,_0xcdbf4,'throw',_0x372d44);}_0x2a8370(void 0x0);});};}var _0x5342a5,_0x4f76fc,_0x1bf079,_0x125374,_0x151f60,_0x2afdcd,_0x27d008=_0x165a0a(0x2af),_0x148935=_0x165a0a['n'](_0x27d008);function _0x88c779(_0x375065,_0x5b1587,_0x47584d){var _0xec6465=a0_0x1593;_0x5b1587 in _0x375065?Object[_0xec6465(0x256)](_0x375065,_0x5b1587,{'value':_0x47584d,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x375065[_0x5b1587]=_0x47584d;}function _0x49c293(_0x3e9167,_0x4b688c,_0x289973,_0x35cee1){var _0x57eb45=a0_0x1593;return _0x3e9167[_0x57eb45(0x27a)](0x0)<<0x18|_0x4b688c['charCodeAt'](0x0)<<0x10|_0x289973['charCodeAt'](0x0)<<0x8|_0x35cee1[_0x57eb45(0x27a)](0x0);}var _0x5338d8=null,_0x30397f=_0x5a3b91(function _0x2cabee(){var _0x4a2d1a=a0_0x1593;_0x160316(this,_0x2cabee),_0x88c779(this,_0x4a2d1a(0x297),(function(){var _0x46f26a=_0x30bbb2(_0x148935()['mark'](function _0x7f8ef5(_0x28b098,_0x12ede3,_0x510526){var _0x199de3=a0_0x1593,_0x3fe32f;return _0x148935()[_0x199de3(0x398)](function(_0x8885bf){var _0x326aaf=_0x199de3;for(;;)switch(_0x8885bf['prev']=_0x8885bf[_0x326aaf(0x500)]){case 0x0:null==_0x5338d8&&((_0x3fe32f=document[_0x326aaf(0x2d1)](_0x326aaf(0x4e4)))[_0x326aaf(0x50c)]=_0x326aaf(0x51a),_0x3fe32f[_0x326aaf(0x269)]=_0x28b098,_0x3fe32f[_0x326aaf(0x48f)]=function(){var _0x5f423f=_0x326aaf;window[_0x5f423f(0x1cd)]()[_0x5f423f(0x39e)](function(_0x3332e5){_0x5338d8=_0x3332e5,_0x12ede3(_0x510526);});},document[_0x326aaf(0x1d8)][_0x326aaf(0x359)](_0x3fe32f));case 0x1:case'end':return _0x8885bf[_0x326aaf(0x43b)]();}},_0x7f8ef5);}));return function(_0x57b552,_0x96c00c,_0x420f8c){var _0x4557ee=a0_0x1593;return _0x46f26a[_0x4557ee(0x4f6)](this,arguments);};}())),_0x88c779(this,_0x4a2d1a(0x2d0),function(_0x245364){var _0x3ceb1c=_0x4a2d1a;return _0x5338d8[_0x3ceb1c(0x33b)](_0x245364);}),_0x88c779(this,_0x4a2d1a(0x250),function(_0xc8abd8){var _0x22228d=_0x4a2d1a,_0x2183bf=[0x0],_0x2156ed=[0x0],_0x4faa39=[0x0];return _0x5338d8[_0x22228d(0x245)](_0xc8abd8[_0x22228d(0x336)],_0x2183bf,_0x2156ed,_0x4faa39),{'major':_0x2183bf[0x0],'minor':_0x2156ed[0x0],'patch':_0x4faa39[0x0]};}),_0x88c779(this,_0x4a2d1a(0x2bd),function(_0x596592){var _0x451f77=_0x4a2d1a;if(null!=_0x5338d8)return _0x5338d8[_0x451f77(0x444)](_0x596592[_0x451f77(0x336)]);}),_0x88c779(this,'Done_FreeType',function(_0x461db4){var _0x531b17=_0x4a2d1a;if(null!=_0x5338d8)return _0x5338d8[_0x531b17(0x2b4)](_0x461db4[_0x531b17(0x336)]);}),_0x88c779(this,'New_Memory_Face',function(_0x1966f3,_0x309c80,_0x407a37,_0x5f5ca6){var _0x227efd=_0x4a2d1a;if(null!=_0x5338d8)return _0x5338d8['FT_New_Memory_Face'](_0x1966f3[_0x227efd(0x336)],_0x309c80,_0x407a37,_0x5f5ca6['bind']);}),_0x88c779(this,_0x4a2d1a(0x278),function(_0x32d236){var _0xd0ed18=_0x4a2d1a;if(null!=_0x5338d8)return _0x5338d8[_0xd0ed18(0x34e)](_0x32d236['bind']);}),_0x88c779(this,_0x4a2d1a(0x3e2),function(_0x4be041,_0x50855c){var _0x3c5c5b=_0x4a2d1a;if(null!=_0x5338d8)return _0x5338d8[_0x3c5c5b(0x4ec)](_0x4be041[_0x3c5c5b(0x336)],_0x50855c);}),_0x88c779(this,'Load_Char',function(_0x14a803,_0x5a9937){var _0x589e80=_0x4a2d1a,_0x2c062b=0x2<arguments['length']&&void 0x0!==arguments[0x2]?arguments[0x2]:_0x151f60[_0x589e80(0x401)];if(null!=_0x5338d8)return _0x5338d8[_0x589e80(0x537)](_0x14a803[_0x589e80(0x336)],_0x5a9937,_0x2c062b);}),_0x88c779(this,_0x4a2d1a(0x4b0),function(_0xfa7ad0,_0x40f563,_0x4bb0d8,_0x2492ab,_0x349dd2){var _0x2b4145=_0x4a2d1a;if(null!=_0x5338d8)return _0x5338d8['FT_Set_Char_Size'](_0xfa7ad0[_0x2b4145(0x336)],_0x40f563,_0x4bb0d8,_0x2492ab,_0x349dd2);}),_0x88c779(this,'Set_Pixel_Size',function(_0x47a1cc,_0x197740,_0x29f552){var _0x20300e=_0x4a2d1a;if(null!=_0x5338d8)return _0x5338d8[_0x20300e(0x397)](_0x47a1cc[_0x20300e(0x336)],_0x197740,_0x29f552);}),_0x88c779(this,_0x4a2d1a(0x4af),function(_0x57f635){var _0x50b595=_0x4a2d1a,_0x45887b=0x1<arguments[_0x50b595(0x4f1)]&&void 0x0!==arguments[0x1]?arguments[0x1]:_0x2afdcd[_0x50b595(0x4da)];if(null!=_0x5338d8)return _0x5338d8[_0x50b595(0x4cb)](_0x57f635,_0x45887b);}),_0x88c779(this,_0x4a2d1a(0x23c),function(_0x2be896,_0xe07356,_0x46fa75,_0x63996d){var _0x38d24a=_0x4a2d1a,_0x17e511=0x4<arguments[_0x38d24a(0x4f1)]&&void 0x0!==arguments[0x4]?arguments[0x4]:new _0x4f76fc();if(null!=_0x5338d8)return _0x5338d8[_0x38d24a(0x47d)](_0x2be896[_0x38d24a(0x336)],_0xe07356,_0x46fa75,_0x63996d,_0x17e511);}),_0x88c779(this,_0x4a2d1a(0x318),function(_0x5e1d6e,_0x2178f9,_0x252d9f){var _0xb220df=_0x4a2d1a;if(null!=_0x5338d8)return _0x5338d8[_0xb220df(0x387)](_0x5e1d6e,_0x2178f9,_0x252d9f);});}),_0xe651be=((_0x27d008=_0x5342a5=_0x5342a5||{})[_0x27d008['Ok']=0x0]='Ok',_0x27d008[_0x27d008[_0x99d5a2(0x35f)]=0x1]=_0x99d5a2(0x35f),_0x27d008[_0x27d008[_0x99d5a2(0x2eb)]=0x2]=_0x99d5a2(0x2eb),_0x27d008[_0x27d008[_0x99d5a2(0x2d9)]=0x3]='Invalid_File_Format',_0x27d008[_0x27d008[_0x99d5a2(0x291)]=0x4]='Invalid_Version',_0x27d008[_0x27d008[_0x99d5a2(0x244)]=0x5]='Lower_Module_Version',_0x27d008[_0x27d008['Invalid_Argument']=0x6]=_0x99d5a2(0x3f0),_0x27d008[_0x27d008['Unimplemented_Feature']=0x7]=_0x99d5a2(0x322),_0x27d008[_0x27d008[_0x99d5a2(0x4ae)]=0x8]='Invalid_Table',_0x27d008[_0x27d008[_0x99d5a2(0x328)]=0x9]=_0x99d5a2(0x328),_0x27d008[_0x27d008[_0x99d5a2(0x2ff)]=0xa]=_0x99d5a2(0x2ff),_0x27d008[_0x27d008[_0x99d5a2(0x3dc)]=0xb]=_0x99d5a2(0x3dc),_0x27d008[_0x27d008[_0x99d5a2(0x219)]=0xc]='Missing_Property',_0x27d008[_0x27d008[_0x99d5a2(0x48b)]=0x10]=_0x99d5a2(0x48b),_0x27d008[_0x27d008['Invalid_Character_Code']=0x11]=_0x99d5a2(0x2fa),_0x27d008[_0x27d008[_0x99d5a2(0x481)]=0x12]='Invalid_Glyph_Format',_0x27d008[_0x27d008['Cannot_Render_Glyph']=0x13]=_0x99d5a2(0x508),_0x27d008[_0x27d008['Invalid_Outline']=0x14]='Invalid_Outline',_0x27d008[_0x27d008['Invalid_Composite']=0x15]=_0x99d5a2(0x4c1),_0x27d008[_0x27d008[_0x99d5a2(0x4d0)]=0x16]=_0x99d5a2(0x4d0),_0x27d008[_0x27d008[_0x99d5a2(0x261)]=0x17]=_0x99d5a2(0x261),_0x27d008[_0x27d008[_0x99d5a2(0x2ef)]=0x20]=_0x99d5a2(0x2ef),_0x27d008[_0x27d008['Invalid_Library_Handle']=0x21]=_0x99d5a2(0x473),_0x27d008[_0x27d008['Invalid_Driver_Handle']=0x22]='Invalid_Driver_Handle',_0x27d008[_0x27d008[_0x99d5a2(0x463)]=0x23]=_0x99d5a2(0x463),_0x27d008[_0x27d008['Invalid_Size_Handle']=0x24]='Invalid_Size_Handle',_0x27d008[_0x27d008[_0x99d5a2(0x1ce)]=0x25]=_0x99d5a2(0x1ce),_0x27d008[_0x27d008[_0x99d5a2(0x47a)]=0x26]=_0x99d5a2(0x47a),_0x27d008[_0x27d008[_0x99d5a2(0x38c)]=0x27]=_0x99d5a2(0x38c),_0x27d008[_0x27d008[_0x99d5a2(0x421)]=0x28]='Invalid_Stream_Handle',_0x27d008[_0x27d008[_0x99d5a2(0x466)]=0x30]=_0x99d5a2(0x466),_0x27d008[_0x27d008[_0x99d5a2(0x204)]=0x31]=_0x99d5a2(0x204),_0x27d008[_0x27d008[_0x99d5a2(0x426)]=0x40]=_0x99d5a2(0x426),_0x27d008[_0x27d008[_0x99d5a2(0x46e)]=0x41]='Unlisted_Object',_0x27d008[_0x27d008[_0x99d5a2(0x474)]=0x51]='Cannot_Open_Stream',_0x27d008[_0x27d008[_0x99d5a2(0x4ea)]=0x52]=_0x99d5a2(0x4ea),_0x27d008[_0x27d008[_0x99d5a2(0x253)]=0x53]='Invalid_Stream_Skip',_0x27d008[_0x27d008[_0x99d5a2(0x467)]=0x54]='Invalid_Stream_Read',_0x27d008[_0x27d008[_0x99d5a2(0x3c7)]=0x55]=_0x99d5a2(0x3c7),_0x27d008[_0x27d008[_0x99d5a2(0x44f)]=0x56]='Invalid_Frame_Operation',_0x27d008[_0x27d008[_0x99d5a2(0x23e)]=0x57]=_0x99d5a2(0x23e),_0x27d008[_0x27d008[_0x99d5a2(0x1d1)]=0x58]=_0x99d5a2(0x1d1),_0x27d008[_0x27d008[_0x99d5a2(0x411)]=0x60]=_0x99d5a2(0x411),_0x27d008[_0x27d008[_0x99d5a2(0x424)]=0x61]=_0x99d5a2(0x424),_0x27d008[_0x27d008[_0x99d5a2(0x43f)]=0x62]=_0x99d5a2(0x43f),_0x27d008[_0x27d008[_0x99d5a2(0x472)]=0x63]=_0x99d5a2(0x472),_0x27d008[_0x27d008[_0x99d5a2(0x33f)]=0x70]='Too_Many_Caches',_0x27d008[_0x27d008[_0x99d5a2(0x3de)]=0x80]=_0x99d5a2(0x3de),_0x27d008[_0x27d008[_0x99d5a2(0x1e8)]=0x81]='Too_Few_Arguments',_0x27d008[_0x27d008[_0x99d5a2(0x298)]=0x82]=_0x99d5a2(0x298),_0x27d008[_0x27d008['Code_Overflow']=0x83]=_0x99d5a2(0x26e),_0x27d008[_0x27d008['Bad_Argument']=0x84]='Bad_Argument',_0x27d008[_0x27d008[_0x99d5a2(0x25d)]=0x85]='Divide_By_Zero',_0x27d008[_0x27d008['Invalid_Reference']=0x86]=_0x99d5a2(0x282),_0x27d008[_0x27d008['Debug_OpCode']=0x87]=_0x99d5a2(0x385),_0x27d008[_0x27d008[_0x99d5a2(0x27f)]=0x88]=_0x99d5a2(0x27f),_0x27d008[_0x27d008[_0x99d5a2(0x2b1)]=0x89]=_0x99d5a2(0x2b1),_0x27d008[_0x27d008[_0x99d5a2(0x37e)]=0x8a]=_0x99d5a2(0x37e),_0x27d008[_0x27d008[_0x99d5a2(0x2ca)]=0x8b]=_0x99d5a2(0x2ca),_0x27d008[_0x27d008[_0x99d5a2(0x452)]=0x8c]=_0x99d5a2(0x452),_0x27d008[_0x27d008[_0x99d5a2(0x43c)]=0x8d]=_0x99d5a2(0x43c),_0x27d008[_0x27d008['Table_Missing']=0x8e]=_0x99d5a2(0x295),_0x27d008[_0x27d008['Horiz_Header_Missing']=0x8f]=_0x99d5a2(0x346),_0x27d008[_0x27d008[_0x99d5a2(0x494)]=0x90]=_0x99d5a2(0x494),_0x27d008[_0x27d008[_0x99d5a2(0x20f)]=0x91]=_0x99d5a2(0x20f),_0x27d008[_0x27d008['CMap_Table_Missing']=0x92]=_0x99d5a2(0x2a0),_0x27d008[_0x27d008['Hmtx_Table_Missing']=0x93]=_0x99d5a2(0x374),_0x27d008[_0x27d008[_0x99d5a2(0x4f4)]=0x94]=_0x99d5a2(0x4f4),_0x27d008[_0x27d008[_0x99d5a2(0x384)]=0x95]=_0x99d5a2(0x384),_0x27d008[_0x27d008['Invalid_CharMap_Format']=0x96]=_0x99d5a2(0x44c),_0x27d008[_0x27d008[_0x99d5a2(0x35a)]=0x97]='Invalid_PPem',_0x27d008[_0x27d008[_0x99d5a2(0x2d6)]=0x98]=_0x99d5a2(0x2d6),_0x27d008[_0x27d008[_0x99d5a2(0x471)]=0x99]=_0x99d5a2(0x471),_0x27d008[_0x27d008[_0x99d5a2(0x3a2)]=0x9a]='Invalid_Post_Table_Format',_0x27d008[_0x27d008[_0x99d5a2(0x3cf)]=0x9b]=_0x99d5a2(0x3cf),_0x27d008[_0x27d008[_0x99d5a2(0x42a)]=0x9c]='DEF_In_Glyf_Bytecode',_0x27d008[_0x27d008['Missing_Bitmap']=0x9d]=_0x99d5a2(0x456),_0x27d008[_0x27d008['Syntax_Error']=0xa0]=_0x99d5a2(0x31c),_0x27d008[_0x27d008[_0x99d5a2(0x1d7)]=0xa1]=_0x99d5a2(0x1d7),_0x27d008[_0x27d008[_0x99d5a2(0x2f7)]=0xa2]=_0x99d5a2(0x2f7),_0x27d008[_0x27d008[_0x99d5a2(0x24c)]=0xa3]=_0x99d5a2(0x24c),_0x27d008[_0x27d008[_0x99d5a2(0x333)]=0xa4]=_0x99d5a2(0x333),_0x27d008[_0x27d008['Missing_Startfont_Field']=0xb0]=_0x99d5a2(0x239),_0x27d008[_0x27d008[_0x99d5a2(0x3b9)]=0xb1]=_0x99d5a2(0x3b9),_0x27d008[_0x27d008[_0x99d5a2(0x23b)]=0xb2]=_0x99d5a2(0x23b),_0x27d008[_0x27d008[_0x99d5a2(0x1f4)]=0xb3]=_0x99d5a2(0x1f4),_0x27d008[_0x27d008[_0x99d5a2(0x2a5)]=0xb4]=_0x99d5a2(0x2a5),_0x27d008[_0x27d008['Missing_Startchar_Field']=0xb5]=_0x99d5a2(0x2f8),_0x27d008[_0x27d008[_0x99d5a2(0x35d)]=0xb6]=_0x99d5a2(0x35d),_0x27d008[_0x27d008[_0x99d5a2(0x377)]=0xb7]=_0x99d5a2(0x377),_0x27d008[_0x27d008['Bbx_Too_Big']=0xb8]=_0x99d5a2(0x449),_0x27d008[_0x27d008['Corrupted_Font_Header']=0xb9]=_0x99d5a2(0x242),_0x27d008[_0x27d008[_0x99d5a2(0x4d3)]=0xba]=_0x99d5a2(0x4d3),(_0x27d008={'NONE':0x0,0x0:_0x99d5a2(0x1da)})[_0x27d008[_0x99d5a2(0x20b)]=_0x49c293('c','o','m','p')]=_0x99d5a2(0x20b),_0x27d008[_0x27d008['BITMAP']=_0x49c293('b','i','t','s')]=_0x99d5a2(0x293),_0x27d008[_0x27d008['OUTLINE']=_0x49c293('o','u','t','l')]='OUTLINE',_0x27d008[_0x27d008[_0x99d5a2(0x35c)]=_0x49c293('p','l','o','t')]=_0x99d5a2(0x35c),_0x4f76fc=_0x5a3b91(function _0x5bad77(){_0x160316(this,_0x5bad77),this['x']=0x0,this['y']=0x0;}),0x0,_0x1bf079=(function(){var _0x59149e=_0x99d5a2;function _0x357cc6(){var _0x4b32e4=a0_0x1593;_0x160316(this,_0x357cc6),this[_0x4b32e4(0x336)]=[null];}return _0x5a3b91(_0x357cc6,[{'key':'init','value':function(){var _0x2436b6=a0_0x1593,_0x2255c7=bind[_0x2436b6(0x444)](this['bind']);if(_0x2255c7!==_0x5342a5['Ok'])throw new Error(_0x2436b6(0x535)+_0x2255c7[_0x2436b6(0x258)]());}},{'key':_0x59149e(0x3e6),'value':function(){var _0x5ed2d1=_0x59149e,_0x4e4cf2=bind[_0x5ed2d1(0x2b4)](this[_0x5ed2d1(0x336)]);if(_0x4e4cf2!==_0x5342a5['Ok'])throw new Error(_0x5ed2d1(0x1f3)+_0x4e4cf2[_0x5ed2d1(0x258)]());}}]),_0x357cc6;}()),_0x125374=(function(){var _0x22397f=_0x99d5a2;function _0x4b0363(){var _0x2e1c61=a0_0x1593;_0x160316(this,_0x4b0363),this[_0x2e1c61(0x336)]=[null];}return _0x5a3b91(_0x4b0363,[{'key':_0x22397f(0x4a8),'get':function(){if(null===this['bind'][0x0])throw new Error();return this['bind'][0x0];}},{'key':_0x22397f(0x3e4),'get':function(){return this['_bind']['num_faces'];}},{'key':_0x22397f(0x3bf),'get':function(){var _0x297487=_0x22397f;return this['_bind'][_0x297487(0x3bf)];}},{'key':_0x22397f(0x2e2),'get':function(){var _0x504c21=_0x22397f;return this[_0x504c21(0x4a8)]['face_flags'];}},{'key':'style_flags','get':function(){var _0x596e14=_0x22397f;return this[_0x596e14(0x4a8)][_0x596e14(0x403)];}},{'key':_0x22397f(0x211),'get':function(){var _0x5955ba=_0x22397f;return this[_0x5955ba(0x4a8)]['num_glyphs'];}},{'key':_0x22397f(0x30d),'get':function(){var _0x50edb9=_0x22397f;return this[_0x50edb9(0x4a8)][_0x50edb9(0x30d)];}},{'key':_0x22397f(0x521),'get':function(){var _0x42d7f=_0x22397f;return this[_0x42d7f(0x4a8)][_0x42d7f(0x521)];}},{'key':_0x22397f(0x1e0),'get':function(){var _0x35e165=_0x22397f;return this[_0x35e165(0x4a8)][_0x35e165(0x1e0)];}},{'key':_0x22397f(0x2c5),'get':function(){var _0x555a50=_0x22397f;return this[_0x555a50(0x4a8)][_0x555a50(0x2c5)];}},{'key':_0x22397f(0x476),'get':function(){var _0x13fa38=_0x22397f;return this[_0x13fa38(0x4a8)][_0x13fa38(0x476)];}},{'key':_0x22397f(0x301),'get':function(){var _0x3799c9=_0x22397f;return this[_0x3799c9(0x4a8)]['descender'];}},{'key':_0x22397f(0x483),'get':function(){var _0x1d2220=_0x22397f;return this['_bind'][_0x1d2220(0x483)];}},{'key':'max_advance_width','get':function(){var _0x105daa=_0x22397f;return this['_bind'][_0x105daa(0x496)];}},{'key':_0x22397f(0x22c),'get':function(){var _0x4e74f1=_0x22397f;return this[_0x4e74f1(0x4a8)][_0x4e74f1(0x22c)];}},{'key':_0x22397f(0x549),'get':function(){var _0x181e20=_0x22397f;return this[_0x181e20(0x4a8)]['underline_position'];}},{'key':'underline_thickness','get':function(){var _0xa2b222=_0x22397f;return this['_bind'][_0xa2b222(0x28e)];}},{'key':_0x22397f(0x43e),'get':function(){var _0x531177=_0x22397f;return this[_0x531177(0x4a8)][_0x531177(0x43e)];}}]),_0x4b0363;}()),(_0x27d008=_0x151f60=_0x151f60||{})[_0x27d008[_0x99d5a2(0x401)]=0x0]=_0x99d5a2(0x401),_0x27d008[_0x27d008['NO_SCALE']=0x1]=_0x99d5a2(0x4f7),_0x27d008[_0x27d008[_0x99d5a2(0x32e)]=0x2]=_0x99d5a2(0x32e),_0x27d008[_0x27d008[_0x99d5a2(0x2ec)]=0x4]=_0x99d5a2(0x2ec),_0x27d008[_0x27d008[_0x99d5a2(0x3ac)]=0x8]='NO_BITMAP',_0x27d008[_0x27d008[_0x99d5a2(0x233)]=0x10]=_0x99d5a2(0x233),_0x27d008[_0x27d008[_0x99d5a2(0x1d5)]=0x20]=_0x99d5a2(0x1d5),_0x27d008[_0x27d008[_0x99d5a2(0x372)]=0x40]='CROP_BITMAP',_0x27d008[_0x27d008[_0x99d5a2(0x461)]=0x80]='PEDANTIC',_0x27d008[_0x27d008[_0x99d5a2(0x308)]=0x200]=_0x99d5a2(0x308),_0x27d008[_0x27d008[_0x99d5a2(0x25b)]=0x400]=_0x99d5a2(0x25b),_0x27d008[_0x27d008[_0x99d5a2(0x418)]=0x800]='IGNORE_TRANSFORM',_0x27d008[_0x27d008[_0x99d5a2(0x389)]=0x1000]='MONOCHROME',_0x27d008[_0x27d008[_0x99d5a2(0x518)]=0x2000]='LINEAR_DESIGN',_0x27d008[_0x27d008['NO_AUTOHINT']=0x8000]=_0x99d5a2(0x4ca),_0x27d008[_0x27d008[_0x99d5a2(0x30b)]=0x100000]=_0x99d5a2(0x30b),_0x27d008[_0x27d008[_0x99d5a2(0x428)]=0x200000]=_0x99d5a2(0x428),_0x27d008[_0x27d008[_0x99d5a2(0x1f9)]=0x400000]='BITMAP_METRICS_ONLY',_0x27d008[_0x27d008[_0x99d5a2(0x29d)]=0x100]=_0x99d5a2(0x29d),_0x27d008[_0x27d008[_0x99d5a2(0x365)]=0x4000]=_0x99d5a2(0x365),(_0x27d008=_0x2afdcd=_0x2afdcd||{})[_0x27d008['NORMAL']=0x0]=_0x99d5a2(0x4da),_0x27d008[_0x27d008[_0x99d5a2(0x49b)]=0x1]=_0x99d5a2(0x49b),_0x27d008[_0x27d008[_0x99d5a2(0x2b5)]=0x2]=_0x99d5a2(0x2b5),_0x27d008[_0x27d008[_0x99d5a2(0x1f0)]=0x3]='LCD',_0x27d008[_0x27d008[_0x99d5a2(0x315)]=0x4]=_0x99d5a2(0x315),_0x27d008[_0x27d008[_0x99d5a2(0x42c)]=0x5]=_0x99d5a2(0x42c),0x0,_0x99d5a2(0x512)),_0x5971cc=_0x99d5a2(0x443),_0x466d10='\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20mediump\\x20float\\x20pp;\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20lowp\\x20vec4\\x20\\x20colorOut;\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20colorOut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20mediump\\x20float\\x20fx\\x20=\\x20abs(pp);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if\\x20(fx\\x20>\\x200.2)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor.a\\x20=\\x20colorOut.a*(1.25\\x20-\\x201.25*fx);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x20\\x0a\\x20\\x20\\x20\\x20}\\x20\\x0a',_0x473777=0.05,_0x3e9a49=0.000001,_0x48e6bf=3.1415926,_0x479a0f=0.78539815,_0x1ec236=0.000001,_0x1096f2=_0x99d5a2(0x294)!=typeof Float32Array?Float32Array:Array;Math['random'],Math['PI'],Math['hypot']||(Math['hypot']=function(){var _0x2f0633=_0x99d5a2;for(var _0x502a4a=0x0,_0x2dc010=arguments[_0x2f0633(0x4f1)];_0x2dc010--;)_0x502a4a+=arguments[_0x2dc010]*arguments[_0x2dc010];return Math[_0x2f0633(0x41c)](_0x502a4a);});function _0x1189d8(){var _0x1dc269=new _0x1096f2(0x10);return _0x1096f2!=Float32Array&&(_0x1dc269[0x1]=0x0,_0x1dc269[0x2]=0x0,_0x1dc269[0x3]=0x0,_0x1dc269[0x4]=0x0,_0x1dc269[0x6]=0x0,_0x1dc269[0x7]=0x0,_0x1dc269[0x8]=0x0,_0x1dc269[0x9]=0x0,_0x1dc269[0xb]=0x0,_0x1dc269[0xc]=0x0,_0x1dc269[0xd]=0x0,_0x1dc269[0xe]=0x0),_0x1dc269[0x0]=0x1,_0x1dc269[0x5]=0x1,_0x1dc269[0xa]=0x1,_0x1dc269[0xf]=0x1,_0x1dc269;}function _0x28ce33(_0x2d7c40,_0x56ab10,_0x209785){var _0x2bb9d0=_0x56ab10[0x0],_0x1439e6=_0x56ab10[0x1],_0x142a16=_0x56ab10[0x2],_0x1ab07e=_0x56ab10[0x3],_0x31345e=_0x56ab10[0x4],_0x39d9f0=_0x56ab10[0x5],_0x15d623=_0x56ab10[0x6],_0x27bf4a=_0x56ab10[0x7],_0x43d798=_0x56ab10[0x8],_0x2bbfd4=_0x56ab10[0x9],_0x9b149f=_0x56ab10[0xa],_0x3f48b3=_0x56ab10[0xb],_0x226daf=_0x56ab10[0xc],_0x54b94b=_0x56ab10[0xd],_0x5098e6=_0x56ab10[0xe],_0x56ab10=_0x56ab10[0xf],_0x490bfd=_0x209785[0x0],_0x1d5c1a=_0x209785[0x1],_0x251250=_0x209785[0x2],_0x17e8d9=_0x209785[0x3];return _0x2d7c40[0x0]=_0x490bfd*_0x2bb9d0+_0x1d5c1a*_0x31345e+_0x251250*_0x43d798+_0x17e8d9*_0x226daf,_0x2d7c40[0x1]=_0x490bfd*_0x1439e6+_0x1d5c1a*_0x39d9f0+_0x251250*_0x2bbfd4+_0x17e8d9*_0x54b94b,_0x2d7c40[0x2]=_0x490bfd*_0x142a16+_0x1d5c1a*_0x15d623+_0x251250*_0x9b149f+_0x17e8d9*_0x5098e6,_0x2d7c40[0x3]=_0x490bfd*_0x1ab07e+_0x1d5c1a*_0x27bf4a+_0x251250*_0x3f48b3+_0x17e8d9*_0x56ab10,_0x490bfd=_0x209785[0x4],_0x1d5c1a=_0x209785[0x5],_0x251250=_0x209785[0x6],_0x17e8d9=_0x209785[0x7],_0x2d7c40[0x4]=_0x490bfd*_0x2bb9d0+_0x1d5c1a*_0x31345e+_0x251250*_0x43d798+_0x17e8d9*_0x226daf,_0x2d7c40[0x5]=_0x490bfd*_0x1439e6+_0x1d5c1a*_0x39d9f0+_0x251250*_0x2bbfd4+_0x17e8d9*_0x54b94b,_0x2d7c40[0x6]=_0x490bfd*_0x142a16+_0x1d5c1a*_0x15d623+_0x251250*_0x9b149f+_0x17e8d9*_0x5098e6,_0x2d7c40[0x7]=_0x490bfd*_0x1ab07e+_0x1d5c1a*_0x27bf4a+_0x251250*_0x3f48b3+_0x17e8d9*_0x56ab10,_0x490bfd=_0x209785[0x8],_0x1d5c1a=_0x209785[0x9],_0x251250=_0x209785[0xa],_0x17e8d9=_0x209785[0xb],_0x2d7c40[0x8]=_0x490bfd*_0x2bb9d0+_0x1d5c1a*_0x31345e+_0x251250*_0x43d798+_0x17e8d9*_0x226daf,_0x2d7c40[0x9]=_0x490bfd*_0x1439e6+_0x1d5c1a*_0x39d9f0+_0x251250*_0x2bbfd4+_0x17e8d9*_0x54b94b,_0x2d7c40[0xa]=_0x490bfd*_0x142a16+_0x1d5c1a*_0x15d623+_0x251250*_0x9b149f+_0x17e8d9*_0x5098e6,_0x2d7c40[0xb]=_0x490bfd*_0x1ab07e+_0x1d5c1a*_0x27bf4a+_0x251250*_0x3f48b3+_0x17e8d9*_0x56ab10,_0x490bfd=_0x209785[0xc],_0x1d5c1a=_0x209785[0xd],_0x251250=_0x209785[0xe],_0x17e8d9=_0x209785[0xf],_0x2d7c40[0xc]=_0x490bfd*_0x2bb9d0+_0x1d5c1a*_0x31345e+_0x251250*_0x43d798+_0x17e8d9*_0x226daf,_0x2d7c40[0xd]=_0x490bfd*_0x1439e6+_0x1d5c1a*_0x39d9f0+_0x251250*_0x2bbfd4+_0x17e8d9*_0x54b94b,_0x2d7c40[0xe]=_0x490bfd*_0x142a16+_0x1d5c1a*_0x15d623+_0x251250*_0x9b149f+_0x17e8d9*_0x5098e6,_0x2d7c40[0xf]=_0x490bfd*_0x1ab07e+_0x1d5c1a*_0x27bf4a+_0x251250*_0x3f48b3+_0x17e8d9*_0x56ab10,_0x2d7c40;}function _0x4e0779(_0x4b7f1b,_0x3660fe,_0x16ba13,_0x269d9a){var _0x2834dd=_0x99d5a2,_0x52c017,_0x10b949,_0x5058ee,_0x2a7f13,_0x2b6f50,_0x1b5b36,_0x488897,_0x87dada,_0x5cae01,_0x11ff8d,_0x326684,_0x3f726e,_0x40cba0,_0x3a8a23,_0x4160d2,_0x55ef08,_0x5564ca,_0x5eb7ed,_0x575c15,_0x1df085,_0x3fc2c9=_0x269d9a[0x0],_0x2f5b6a=_0x269d9a[0x1],_0x269d9a=_0x269d9a[0x2],_0x17af05=Math[_0x2834dd(0x241)](_0x3fc2c9,_0x2f5b6a,_0x269d9a);_0x17af05<_0x1ec236||(_0x3fc2c9*=_0x17af05=0x1/_0x17af05,_0x2f5b6a*=_0x17af05,_0x269d9a*=_0x17af05,_0x17af05=Math['sin'](_0x16ba13),_0x16ba13=Math[_0x2834dd(0x34b)](_0x16ba13),_0x10b949=_0x3660fe[0x0],_0x5058ee=_0x3660fe[0x1],_0x2a7f13=_0x3660fe[0x2],_0x2b6f50=_0x3660fe[0x3],_0x1b5b36=_0x3660fe[0x4],_0x488897=_0x3660fe[0x5],_0x87dada=_0x3660fe[0x6],_0x5cae01=_0x3660fe[0x7],_0x11ff8d=_0x3660fe[0x8],_0x326684=_0x3660fe[0x9],_0x3f726e=_0x3660fe[0xa],_0x40cba0=_0x3660fe[0xb],_0x4160d2=_0x3fc2c9*_0x2f5b6a*(_0x52c017=0x1-_0x16ba13)-_0x269d9a*_0x17af05,_0x55ef08=_0x2f5b6a*_0x2f5b6a*_0x52c017+_0x16ba13,_0x5564ca=_0x269d9a*_0x2f5b6a*_0x52c017+_0x3fc2c9*_0x17af05,_0x5eb7ed=_0x3fc2c9*_0x269d9a*_0x52c017+_0x2f5b6a*_0x17af05,_0x575c15=_0x2f5b6a*_0x269d9a*_0x52c017-_0x3fc2c9*_0x17af05,_0x1df085=_0x269d9a*_0x269d9a*_0x52c017+_0x16ba13,_0x4b7f1b[0x0]=_0x10b949*(_0x16ba13=_0x3fc2c9*_0x3fc2c9*_0x52c017+_0x16ba13)+_0x1b5b36*(_0x3a8a23=_0x2f5b6a*_0x3fc2c9*_0x52c017+_0x269d9a*_0x17af05)+_0x11ff8d*(_0x269d9a=_0x269d9a*_0x3fc2c9*_0x52c017-_0x2f5b6a*_0x17af05),_0x4b7f1b[0x1]=_0x5058ee*_0x16ba13+_0x488897*_0x3a8a23+_0x326684*_0x269d9a,_0x4b7f1b[0x2]=_0x2a7f13*_0x16ba13+_0x87dada*_0x3a8a23+_0x3f726e*_0x269d9a,_0x4b7f1b[0x3]=_0x2b6f50*_0x16ba13+_0x5cae01*_0x3a8a23+_0x40cba0*_0x269d9a,_0x4b7f1b[0x4]=_0x10b949*_0x4160d2+_0x1b5b36*_0x55ef08+_0x11ff8d*_0x5564ca,_0x4b7f1b[0x5]=_0x5058ee*_0x4160d2+_0x488897*_0x55ef08+_0x326684*_0x5564ca,_0x4b7f1b[0x6]=_0x2a7f13*_0x4160d2+_0x87dada*_0x55ef08+_0x3f726e*_0x5564ca,_0x4b7f1b[0x7]=_0x2b6f50*_0x4160d2+_0x5cae01*_0x55ef08+_0x40cba0*_0x5564ca,_0x4b7f1b[0x8]=_0x10b949*_0x5eb7ed+_0x1b5b36*_0x575c15+_0x11ff8d*_0x1df085,_0x4b7f1b[0x9]=_0x5058ee*_0x5eb7ed+_0x488897*_0x575c15+_0x326684*_0x1df085,_0x4b7f1b[0xa]=_0x2a7f13*_0x5eb7ed+_0x87dada*_0x575c15+_0x3f726e*_0x1df085,_0x4b7f1b[0xb]=_0x2b6f50*_0x5eb7ed+_0x5cae01*_0x575c15+_0x40cba0*_0x1df085,_0x3660fe!==_0x4b7f1b&&(_0x4b7f1b[0xc]=_0x3660fe[0xc],_0x4b7f1b[0xd]=_0x3660fe[0xd],_0x4b7f1b[0xe]=_0x3660fe[0xe],_0x4b7f1b[0xf]=_0x3660fe[0xf]));}var _0x1b7aa6=function(_0x52d41e,_0x5c0ec5,_0x20391b,_0x42750a,_0x3b24cb){var _0x171452=_0x99d5a2;return _0x5c0ec5=0x1/Math[_0x171452(0x343)](_0x5c0ec5/0x2),_0x52d41e[0x0]=_0x5c0ec5/_0x20391b,_0x52d41e[0x1]=0x0,_0x52d41e[0x2]=0x0,_0x52d41e[0x3]=0x0,_0x52d41e[0x4]=0x0,_0x52d41e[0x5]=_0x5c0ec5,_0x52d41e[0x6]=0x0,_0x52d41e[0x7]=0x0,_0x52d41e[0x8]=0x0,_0x52d41e[0x9]=0x0,_0x52d41e[0xb]=-0x1,_0x52d41e[0xc]=0x0,_0x52d41e[0xd]=0x0,_0x52d41e[0xf]=0x0,null!=_0x3b24cb&&_0x3b24cb!==0x1/0x0?(_0x52d41e[0xa]=(_0x3b24cb+_0x42750a)*(_0x20391b=0x1/(_0x42750a-_0x3b24cb)),_0x52d41e[0xe]=0x2*_0x3b24cb*_0x42750a*_0x20391b):(_0x52d41e[0xa]=-0x1,_0x52d41e[0xe]=-0x2*_0x42750a),_0x52d41e;},_0x2500fe=function(_0xb3bf13,_0x448f76,_0x14bf99,_0x24a439,_0x455e24,_0x462b21,_0x41a8b5){var _0x5285d6=0x1/(_0x448f76-_0x14bf99),_0x1bf7d7=0x1/(_0x24a439-_0x455e24),_0x5ac5ef=0x1/(_0x462b21-_0x41a8b5);return _0xb3bf13[0x0]=-0x2*_0x5285d6,_0xb3bf13[0x1]=0x0,_0xb3bf13[0x2]=0x0,_0xb3bf13[0x3]=0x0,_0xb3bf13[0x4]=0x0,_0xb3bf13[0x5]=-0x2*_0x1bf7d7,_0xb3bf13[0x6]=0x0,_0xb3bf13[0x7]=0x0,_0xb3bf13[0x8]=0x0,_0xb3bf13[0x9]=0x0,_0xb3bf13[0xa]=0x2*_0x5ac5ef,_0xb3bf13[0xb]=0x0,_0xb3bf13[0xc]=(_0x448f76+_0x14bf99)*_0x5285d6,_0xb3bf13[0xd]=(_0x455e24+_0x24a439)*_0x1bf7d7,_0xb3bf13[0xe]=(_0x41a8b5+_0x462b21)*_0x5ac5ef,_0xb3bf13[0xf]=0x1,_0xb3bf13;};function _0x18c8c9(){var _0x26597c=new _0x1096f2(0x3);return _0x1096f2!=Float32Array&&(_0x26597c[0x0]=0x0,_0x26597c[0x1]=0x0,_0x26597c[0x2]=0x0),_0x26597c;}function _0x56305e(_0x5b84f7,_0x22e570,_0x20f9b9){var _0x573a0f=new _0x1096f2(0x3);return _0x573a0f[0x0]=_0x5b84f7,_0x573a0f[0x1]=_0x22e570,_0x573a0f[0x2]=_0x20f9b9,_0x573a0f;}_0x18c8c9(),(_0x27d008=new _0x1096f2(0x4),_0x1096f2!=Float32Array&&(_0x27d008[0x0]=0x0,_0x27d008[0x1]=0x0,_0x27d008[0x2]=0x0,_0x27d008[0x3]=0x0));function _0x4c98bb(){var _0x12b267=new _0x1096f2(0x4);return _0x1096f2!=Float32Array&&(_0x12b267[0x0]=0x0,_0x12b267[0x1]=0x0,_0x12b267[0x2]=0x0),_0x12b267[0x3]=0x1,_0x12b267;}_0x18c8c9(),_0x56305e(0x1,0x0,0x0),_0x56305e(0x0,0x1,0x0),_0x4c98bb(),_0x4c98bb(),_0x27d008=new _0x1096f2(0x9),_0x1096f2!=Float32Array&&(_0x27d008[0x1]=0x0,_0x27d008[0x2]=0x0,_0x27d008[0x3]=0x0,_0x27d008[0x5]=0x0,_0x27d008[0x6]=0x0,_0x27d008[0x7]=0x0),_0x27d008[0x0]=0x1,_0x27d008[0x4]=0x1,_0x27d008[0x8]=0x1,(_0x27d008=new _0x1096f2(0x2),_0x1096f2!=Float32Array&&(_0x27d008[0x0]=0x0,_0x27d008[0x1]=0x0));var _0x95cd63,_0x53ee33=(function(){var _0x2c4b4d=_0x99d5a2;function _0x415ef1(){var _0x3a66c1=a0_0x1593;_0x160316(this,_0x415ef1),this[_0x3a66c1(0x3ba)]=0.785,this[_0x3a66c1(0x227)]=0x1,this[_0x3a66c1(0x4ef)]=0.02,this['fFar']=0x3e8,this['fTheta']=0x0,this[_0x3a66c1(0x498)]=0x0,this['fBeta']=0x0,this[_0x3a66c1(0x44a)]=0x1,this[_0x3a66c1(0x3d8)]=!0x1,this['matView']=_0x1189d8(),this[_0x3a66c1(0x1d6)]=_0x1189d8(),this[_0x3a66c1(0x337)]=_0x56305e(0x0,0x0,0x0),this['vecCenter']=_0x56305e(0x0,0x0,0x64),this[_0x3a66c1(0x1ef)]=_0x56305e(0x0,0x1,0x0);}return _0x5a3b91(_0x415ef1,[{'key':_0x2c4b4d(0x210),'value':function(_0x660a1a){var _0x5e6f56=_0x2c4b4d;this[_0x5e6f56(0x39c)]=_0x660a1a;}},{'key':'GetYaw','value':function(){var _0x2ba25b=_0x2c4b4d;return this[_0x2ba25b(0x39c)];}},{'key':_0x2c4b4d(0x458),'value':function(_0x531ad9){var _0x37e999=_0x2c4b4d;this[_0x37e999(0x498)]=_0x531ad9;}},{'key':_0x2c4b4d(0x480),'value':function(){return this['fAlpha'];}},{'key':_0x2c4b4d(0x45c),'value':function(_0x3d657e){this['fBeta']=_0x3d657e;}},{'key':_0x2c4b4d(0x351),'value':function(){var _0x237606=_0x2c4b4d;return this[_0x237606(0x273)];}},{'key':_0x2c4b4d(0x26d),'value':function(_0x1df02d){var _0xdc8df5=_0x2c4b4d;this[_0xdc8df5(0x44a)]=_0x1df02d;}},{'key':_0x2c4b4d(0x484),'value':function(){var _0x5cf5ba=_0x2c4b4d;return this[_0x5cf5ba(0x44a)];}},{'key':_0x2c4b4d(0x3a6),'value':function(_0x43f759){var _0xa7cc7b=_0x2c4b4d;this[_0xa7cc7b(0x3ba)]=_0x43f759;}},{'key':'SetAspect','value':function(_0x52e423){var _0x267b63=_0x2c4b4d;this[_0x267b63(0x227)]=_0x52e423;}},{'key':_0x2c4b4d(0x420),'value':function(_0x4b3844){this['fNear']=_0x4b3844;}},{'key':_0x2c4b4d(0x3af),'value':function(_0x1c98cd){var _0xee9d33=_0x2c4b4d;this[_0xee9d33(0x345)]=_0x1c98cd;}},{'key':_0x2c4b4d(0x43a),'value':function(_0x5a92b4){var _0xed8cd3=_0x2c4b4d;this[_0xed8cd3(0x3d8)]=_0x5a92b4;}},{'key':_0x2c4b4d(0x34a),'value':function(_0x481a1c,_0x3d5dc9){var _0x2b5393=_0x2c4b4d,_0xaca978,_0xc4dc36,_0x5c603e,_0x47c201,_0x154893,_0x5c2d3b;_0x481a1c<=0x0||_0x3d5dc9<=0x0||(0x1==this['bOrtho']?_0x2500fe(this[_0x2b5393(0x1d6)],0x0,_0x481a1c,_0x3d5dc9,0x0,this[_0x2b5393(0x4ef)],this[_0x2b5393(0x345)]):(_0xaca978=this['fFov']/_0x48e6bf*0xb4,_0x1b7aa6(this[_0x2b5393(0x1d6)],_0xaca978,_0x481a1c/_0x3d5dc9,this[_0x2b5393(0x4ef)],this[_0x2b5393(0x345)])),this[_0x2b5393(0x337)]=_0x56305e(0x0,0x0,this[_0x2b5393(0x44a)]),this[_0x2b5393(0x32c)]=_0x56305e(0x0,0x0,0x0),this[_0x2b5393(0x1ef)]=_0x56305e(0x0,0x1,0x0),_0xaca978=_0x56305e(0x1,0x0,0x0),_0x481a1c=_0x56305e(0x0,0x1,0x0),_0x3d5dc9=_0x56305e(0x0,0x0,0x1),function(_0x111f03,_0xdc1831,_0x229b70,_0x21b0e4){var _0x463328=_0x2b5393,_0x4b8d6c,_0x257e6f,_0x41eaaf,_0x243a15,_0x1bcdd7=_0xdc1831[0x0],_0x29159f=_0xdc1831[0x1],_0xdc1831=_0xdc1831[0x2],_0xead032=_0x21b0e4[0x0],_0x974d6d=_0x21b0e4[0x1],_0x21b0e4=_0x21b0e4[0x2],_0x51af13=_0x229b70[0x0],_0x55dd27=_0x229b70[0x1],_0x229b70=_0x229b70[0x2];if(Math[_0x463328(0x1e6)](_0x1bcdd7-_0x51af13)<_0x1ec236&&Math[_0x463328(0x1e6)](_0x29159f-_0x55dd27)<_0x1ec236&&Math['abs'](_0xdc1831-_0x229b70)<_0x1ec236)return(_0x243a15=_0x111f03)[0x0]=0x1,_0x243a15[0x1]=0x0,_0x243a15[0x2]=0x0,_0x243a15[0x3]=0x0,_0x243a15[0x4]=0x0,_0x243a15[0x5]=0x1,_0x243a15[0x6]=0x0,_0x243a15[0x7]=0x0,_0x243a15[0x8]=0x0,_0x243a15[0x9]=0x0,_0x243a15[0xa]=0x1,_0x243a15[0xb]=0x0,_0x243a15[0xc]=0x0,_0x243a15[0xd]=0x0,_0x243a15[0xe]=0x0,_0x243a15[0xf]=0x1;_0x243a15=_0xdc1831-_0x229b70,_0x4b8d6c=_0x974d6d*(_0x243a15*=_0x55dd27=0x1/Math['hypot'](_0x229b70=_0x1bcdd7-_0x51af13,_0x51af13=_0x29159f-_0x55dd27,_0x243a15))-_0x21b0e4*(_0x51af13*=_0x55dd27),_0x21b0e4=_0x21b0e4*(_0x229b70*=_0x55dd27)-_0xead032*_0x243a15,_0xead032=_0xead032*_0x51af13-_0x974d6d*_0x229b70,(_0x55dd27=Math[_0x463328(0x241)](_0x4b8d6c,_0x21b0e4,_0xead032))?(_0x4b8d6c*=_0x55dd27=0x1/_0x55dd27,_0x21b0e4*=_0x55dd27,_0xead032*=_0x55dd27):_0xead032=_0x21b0e4=_0x4b8d6c=0x0,_0x974d6d=_0x51af13*_0xead032-_0x243a15*_0x21b0e4,_0x257e6f=_0x243a15*_0x4b8d6c-_0x229b70*_0xead032,_0x41eaaf=_0x229b70*_0x21b0e4-_0x51af13*_0x4b8d6c,(_0x55dd27=Math[_0x463328(0x241)](_0x974d6d,_0x257e6f,_0x41eaaf))?(_0x974d6d*=_0x55dd27=0x1/_0x55dd27,_0x257e6f*=_0x55dd27,_0x41eaaf*=_0x55dd27):_0x41eaaf=_0x257e6f=_0x974d6d=0x0,_0x111f03[0x0]=_0x4b8d6c,_0x111f03[0x1]=_0x974d6d,_0x111f03[0x2]=_0x229b70,_0x111f03[0x3]=0x0,_0x111f03[0x4]=_0x21b0e4,_0x111f03[0x5]=_0x257e6f,_0x111f03[0x6]=_0x51af13,_0x111f03[0x7]=0x0,_0x111f03[0x8]=_0xead032,_0x111f03[0x9]=_0x41eaaf,_0x111f03[0xa]=_0x243a15,_0x111f03[0xb]=0x0,_0x111f03[0xc]=-(_0x4b8d6c*_0x1bcdd7+_0x21b0e4*_0x29159f+_0xead032*_0xdc1831),_0x111f03[0xd]=-(_0x974d6d*_0x1bcdd7+_0x257e6f*_0x29159f+_0x41eaaf*_0xdc1831),_0x111f03[0xe]=-(_0x229b70*_0x1bcdd7+_0x51af13*_0x29159f+_0x243a15*_0xdc1831),_0x111f03[0xf]=0x1;}(_0xc4dc36=_0x1189d8(),this['vecEye'],this['vecCenter'],this[_0x2b5393(0x1ef)]),_0x5c603e=_0x1189d8(),_0x47c201=_0x1189d8(),_0x154893=_0x1189d8(),_0x5c2d3b=_0x1189d8(),_0x4e0779(_0x47c201,_0x5c603e,-this[_0x2b5393(0x498)],_0xaca978),_0x4e0779(_0x154893,_0x47c201,-this[_0x2b5393(0x39c)],_0x481a1c),_0x4e0779(_0x5c2d3b,_0x154893,-this[_0x2b5393(0x273)],_0x3d5dc9),_0x28ce33(this[_0x2b5393(0x1f7)],_0xc4dc36,_0x5c2d3b));}},{'key':_0x2c4b4d(0x522),'value':function(){return this['matView'];}},{'key':_0x2c4b4d(0x25a),'value':function(){var _0x482dca=_0x2c4b4d;return this[_0x482dca(0x1d6)];}}]),_0x415ef1;}()),_0x50f103=(function(){var _0x41470a=_0x99d5a2;function _0x27b1ac(){var _0x5253ad=a0_0x1593;_0x160316(this,_0x27b1ac),this[_0x5253ad(0x42d)]=null,this[_0x5253ad(0x51e)]=null,this[_0x5253ad(0x1e9)]=0x0,this[_0x5253ad(0x52e)]=0x0,this[_0x5253ad(0x53d)]=0x0,this[_0x5253ad(0x502)]=0x0,this[_0x5253ad(0x3b0)]=0x0,this[_0x5253ad(0x1f2)]=!0x1,this[_0x5253ad(0x4a5)]=!0x1,this[_0x5253ad(0x4c4)]=!0x0,this['nSurfaceTexture']=0x0,this[_0x5253ad(0x540)]=0x0,this[_0x5253ad(0x2a7)]=null,this[_0x5253ad(0x232)]=null,this['glLinePosBuffer']=0x0,this[_0x5253ad(0x4fc)]=0x0,this[_0x5253ad(0x350)]=0x0,this['nLineShaderProgram']=0x0,this[_0x5253ad(0x38b)]=null,this[_0x5253ad(0x23d)]=null,this['nMaxFillBlockTriNum']=0x0,this[_0x5253ad(0x383)]=0x0,this[_0x5253ad(0x50b)]=0x0,this[_0x5253ad(0x470)]=0x0,this[_0x5253ad(0x215)]=!0x1,this[_0x5253ad(0x2c3)]=null,this[_0x5253ad(0x53e)]=null,this['FTFace']=null,this[_0x5253ad(0x327)]=null,this['nDrawFontWidth']=0x0,this['nDrawFontHeight']=0x0,this[_0x5253ad(0x2f6)]=0x0,this['pFontColorBuffer']=0x0,this[_0x5253ad(0x3c8)]=0x0,this['nFontBGNum']=0x0,this['pstFontBGLines']=[],this[_0x5253ad(0x2bc)]=!0x1,this[_0x5253ad(0x292)]=null,this[_0x5253ad(0x4d6)]=_0x3468da[_0x5253ad(0x3c1)],this[_0x5253ad(0x29e)]=-0x1,this[_0x5253ad(0x330)]=!0x1,this[_0x5253ad(0x2ea)]=null,this[_0x5253ad(0x2d7)]=null,this[_0x5253ad(0x340)]=0x0,this[_0x5253ad(0x53a)]=0x0,this['nSemiSphereTexSize']=0x0,this['pCylinderPos']=null,this[_0x5253ad(0x4c0)]=null,this['nCylinderPosNum']=0x0,this[_0x5253ad(0x3ff)]=0x0,this[_0x5253ad(0x4f8)]=0x0,this[_0x5253ad(0x2c1)]=0x0,this['fCylinderRadius']=0x0,this[_0x5253ad(0x367)]=!0x1,this['pCamera']=null,this[_0x5253ad(0x3da)]=0x0,this[_0x5253ad(0x2a3)]=0x0,this[_0x5253ad(0x44a)]=0x0,this[_0x5253ad(0x229)]=null,this[_0x5253ad(0x46c)]=null,this[_0x5253ad(0x252)]=null,this[_0x5253ad(0x4d5)]=null,this[_0x5253ad(0x3dd)]=!0x0;}var _0xeda133;return _0x5a3b91(_0x27b1ac,[{'key':_0x41470a(0x2b3),'value':function(_0x463b67,_0x36ef02){var _0x102e79=_0x41470a,_0x183858=this['ctx'];if(null==_0x183858||null==_0x463b67||null==_0x36ef02)return-0x1;var _0x3b91c2=_0x183858[_0x102e79(0x4b9)](_0x183858[_0x102e79(0x45d)]);if(_0x183858[_0x102e79(0x2b9)](_0x3b91c2,_0x463b67),_0x183858[_0x102e79(0x305)](_0x3b91c2),!_0x183858[_0x102e79(0x218)](_0x3b91c2,_0x183858[_0x102e79(0x2aa)]))return console[_0x102e79(0x514)]('Vertex\\x20shader\\x20failed\\x20to\\x20compile:\\x20'+_0x183858[_0x102e79(0x475)](_0x3b91c2)),-0x1;_0x463b67=_0x183858[_0x102e79(0x4b9)](_0x183858[_0x102e79(0x368)]);if(_0x183858[_0x102e79(0x2b9)](_0x463b67,_0x36ef02),_0x183858['compileShader'](_0x463b67),!_0x183858['getShaderParameter'](_0x463b67,_0x183858['COMPILE_STATUS']))return console[_0x102e79(0x514)](_0x102e79(0x347)+_0x183858['getShaderInfoLog'](_0x463b67)),-0x1;return _0x36ef02=_0x183858[_0x102e79(0x527)](),(_0x183858[_0x102e79(0x2f9)](_0x36ef02,_0x3b91c2),_0x183858[_0x102e79(0x2f9)](_0x36ef02,_0x463b67),_0x183858[_0x102e79(0x28f)](_0x36ef02),_0x183858[_0x102e79(0x348)](_0x36ef02,_0x183858[_0x102e79(0x3b4)])?(_0x183858[_0x102e79(0x30f)](_0x3b91c2),_0x183858[_0x102e79(0x30f)](_0x463b67),_0x36ef02):(console['log']('Program\\x20failed\\x20to\\x20compile:\\x20'+_0x183858[_0x102e79(0x4df)](_0x36ef02)),-0x1));}},{'key':_0x41470a(0x3e5),'value':function(_0x505490){var _0x3f8e8b=_0x41470a;return null==_0x505490?_0x13949e['SR_ERR_PARAM']:(this[_0x3f8e8b(0x42d)]=_0x505490,this[_0x3f8e8b(0x51e)]=this[_0x3f8e8b(0x42d)]['getContext'](_0x3f8e8b(0x412)),this[_0x3f8e8b(0x51e)]||(this[_0x3f8e8b(0x51e)]=this['canvas'][_0x3f8e8b(0x2b2)]('webgl')||this[_0x3f8e8b(0x42d)][_0x3f8e8b(0x2b2)](_0x3f8e8b(0x1e4)),this[_0x3f8e8b(0x1f2)]=!0x0,console[_0x3f8e8b(0x514)](_0x3f8e8b(0x2ad))),this[_0x3f8e8b(0x51e)]?_0x13949e[_0x3f8e8b(0x4a6)]:(console['log'](_0x3f8e8b(0x3d2)),_0x13949e[_0x3f8e8b(0x4e3)]));}},{'key':_0x41470a(0x28d),'value':function(_0x4f5373){var _0x143117=_0x41470a;if(null==this['ctx'])return _0x13949e[_0x143117(0x2cf)];if(null==_0x4f5373)return _0x13949e[_0x143117(0x203)];if(0x0==this[_0x143117(0x1e9)]||0x0==this[_0x143117(0x52e)]||0x0==this['texturePosBuffer'])return _0x13949e['SR_ERR_CALL_ORDER'];if(this['frameDisplayWidth']==_0x4f5373[_0x143117(0x455)]&&this[_0x143117(0x3b0)]==_0x4f5373[_0x143117(0x436)]||(this[_0x143117(0x502)]=_0x4f5373['displayWidth'],this['frameDisplayHeight']=_0x4f5373[_0x143117(0x436)]),0x1==this['bRecreateTex']){0x0!=this[_0x143117(0x516)]&&(_0x47f13=this['nSurfaceTexture'],this[_0x143117(0x51e)][_0x143117(0x300)](_0x47f13),this['nSurfaceTexture']=0x0);var _0x47f13=this[_0x143117(0x51e)]['createTexture']();if(_0x47f13<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x310)](this[_0x143117(0x51e)][_0x143117(0x352)],_0x47f13),0x1==this['bAntialias']?this[_0x143117(0x51e)][_0x143117(0x2af)](this[_0x143117(0x51e)][_0x143117(0x352)],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx'][_0x143117(0x440)]):this[_0x143117(0x51e)][_0x143117(0x2af)](this['ctx'][_0x143117(0x352)],this[_0x143117(0x51e)][_0x143117(0x1d4)],this[_0x143117(0x51e)][_0x143117(0x20a)]),this[_0x143117(0x51e)][_0x143117(0x2af)](this[_0x143117(0x51e)][_0x143117(0x352)],this['ctx'][_0x143117(0x4b4)],this[_0x143117(0x51e)][_0x143117(0x20a)]),this[_0x143117(0x51e)][_0x143117(0x2af)](this[_0x143117(0x51e)][_0x143117(0x352)],this[_0x143117(0x51e)][_0x143117(0x4a0)],this['ctx'][_0x143117(0x3e7)]),this[_0x143117(0x51e)][_0x143117(0x2af)](this[_0x143117(0x51e)][_0x143117(0x352)],this['ctx'][_0x143117(0x3b5)],this[_0x143117(0x51e)]['CLAMP_TO_EDGE']),this[_0x143117(0x516)]=_0x47f13,this['bRecreateTex']=!0x1;}this[_0x143117(0x51e)][_0x143117(0x288)](this['videoShaderProgram']),this[_0x143117(0x51e)][_0x143117(0x408)](this['ctx'][_0x143117(0x2f4)],this[_0x143117(0x52e)]),_0x47f13=this[_0x143117(0x51e)][_0x143117(0x1ff)](this[_0x143117(0x1e9)],'xy');if(_0x47f13<0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)]['vertexAttribPointer'](_0x47f13,0x3,this['ctx'][_0x143117(0x4f2)],!0x1,0x0,0x0),this['ctx'][_0x143117(0x2e6)](_0x47f13),this[_0x143117(0x51e)][_0x143117(0x408)](this[_0x143117(0x51e)][_0x143117(0x2f4)],this['texturePosBuffer']),_0x47f13=this[_0x143117(0x51e)][_0x143117(0x1ff)](this[_0x143117(0x1e9)],'uv');if(_0x47f13<0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x3c2)](_0x47f13,0x2,this[_0x143117(0x51e)][_0x143117(0x4f2)],!0x1,0x0,0x0),this[_0x143117(0x51e)]['enableVertexAttribArray'](_0x47f13),this[_0x143117(0x51e)]['bindBuffer'](this[_0x143117(0x51e)][_0x143117(0x2f4)],null);var _0x5c403e=this[_0x143117(0x4d6)];switch(_0x5c403e){case _0x3468da[_0x143117(0x3c1)]:break;case _0x3468da[_0x143117(0x224)]:case _0x3468da[_0x143117(0x2b7)]:case _0x3468da[_0x143117(0x4c2)]:case _0x3468da['SR_DE_FISH_PTZ_WALL']:case _0x3468da[_0x143117(0x208)]:case _0x3468da[_0x143117(0x4f5)]:case _0x3468da[_0x143117(0x2f5)]:case _0x3468da[_0x143117(0x3a8)]:case _0x3468da['SR_DE_FISH_PANORAMA_WALL']:if(null==this[_0x143117(0x292)])return _0x13949e['SR_ERR_CALL_ORDER'];var _0x3d2401=[],_0x3980fd=this[_0x143117(0x292)]['GetRenderParam'](this[_0x143117(0x29e)],_0x3d2401);if(_0x13949e[_0x143117(0x4a6)]!=_0x3980fd)return _0x3980fd;if(_0x3468da[_0x143117(0x224)]==_0x5c403e){_0x3980fd=this[_0x143117(0x51e)][_0x143117(0x2b6)](this['videoShaderProgram'],_0x143117(0x40f));if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x2cc)](_0x3980fd,_0x3d2401['bBlack']),_0x3980fd=this[_0x143117(0x51e)][_0x143117(0x2b6)](this[_0x143117(0x1e9)],_0x143117(0x324));if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x2cc)](_0x3980fd,_0x3d2401[_0x143117(0x324)]);}if(_0x3468da['SR_DE_FISH_PTZ_CEILING']==_0x5c403e||_0x3468da[_0x143117(0x4c2)]==_0x5c403e||_0x3468da['SR_DE_FISH_PTZ_WALL']==_0x5c403e){_0x3980fd=this['ctx'][_0x143117(0x2b6)](this[_0x143117(0x1e9)],'fHAngleCos');if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x271)](_0x3980fd,_0x3d2401['fCosH']),_0x3980fd=this[_0x143117(0x51e)][_0x143117(0x2b6)](this[_0x143117(0x1e9)],_0x143117(0x1e2));if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)]['uniform1f'](_0x3980fd,_0x3d2401[_0x143117(0x2ee)]),_0x3980fd=this[_0x143117(0x51e)][_0x143117(0x2b6)](this[_0x143117(0x1e9)],'fVAngleCos');if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x271)](_0x3980fd,_0x3d2401['fCosV']),_0x3980fd=this[_0x143117(0x51e)][_0x143117(0x2b6)](this[_0x143117(0x1e9)],_0x143117(0x528));if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this['ctx']['uniform1f'](_0x3980fd,_0x3d2401[_0x143117(0x3e0)]),_0x3980fd=this['ctx'][_0x143117(0x2b6)](this['videoShaderProgram'],_0x143117(0x3f4));if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)]['uniform1f'](_0x3980fd,_0x3d2401[_0x143117(0x3f4)]);}if(_0x3468da[_0x143117(0x208)]==_0x5c403e||_0x3468da[_0x143117(0x4f5)]==_0x5c403e||_0x3468da[_0x143117(0x2f5)]==_0x5c403e||_0x3468da[_0x143117(0x3a8)]==_0x5c403e){_0x3980fd=this['ctx']['getUniformLocation'](this[_0x143117(0x1e9)],_0x143117(0x314));if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x271)](_0x3980fd,_0x3d2401[_0x143117(0x314)]);}_0x3980fd=this[_0x143117(0x51e)][_0x143117(0x2b6)](this[_0x143117(0x1e9)],_0x143117(0x1f8));if(_0x3980fd<=0x0)return _0x13949e['SR_ERR_WEBGL_RESOURCE'];this[_0x143117(0x51e)]['uniform1f'](_0x3980fd,_0x3d2401[_0x143117(0x27e)]),_0x3980fd=this['ctx']['getUniformLocation'](this[_0x143117(0x1e9)],_0x143117(0x3aa));if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this['ctx'][_0x143117(0x271)](_0x3980fd,_0x3d2401[_0x143117(0x469)]),_0x3980fd=this[_0x143117(0x51e)][_0x143117(0x2b6)](this[_0x143117(0x1e9)],_0x143117(0x34c));if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x271)](_0x3980fd,_0x3d2401[_0x143117(0x2bb)]),_0x3980fd=this[_0x143117(0x51e)][_0x143117(0x2b6)](this[_0x143117(0x1e9)],_0x143117(0x4ed));if(_0x3980fd<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x271)](_0x3980fd,_0x3d2401[_0x143117(0x2e9)]);break;case _0x3468da[_0x143117(0x2e3)]:this[_0x143117(0x2e1)][_0x143117(0x26d)](this['fScale']),this[_0x143117(0x2e1)][_0x143117(0x458)](3.14-this['fRotateX']),this[_0x143117(0x2e1)][_0x143117(0x210)](-this[_0x143117(0x2a3)]),this[_0x143117(0x2e1)][_0x143117(0x34a)](this[_0x143117(0x42d)]['width'],this['canvas'][_0x143117(0x483)]);var _0x3980fd=this['pCamera'][_0x143117(0x522)](),_0x3d2401=this['pCamera'][_0x143117(0x25a)](),_0x44bf90=this[_0x143117(0x51e)][_0x143117(0x2b6)](this[_0x143117(0x1e9)],'matView');if(_0x44bf90<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x479)](_0x44bf90,!0x1,_0x3980fd),_0x44bf90=this['ctx']['getUniformLocation'](this[_0x143117(0x1e9)],_0x143117(0x1d6));if(_0x44bf90<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x479)](_0x44bf90,!0x1,_0x3d2401);break;case _0x3468da['SR_DE_FISH_CYLINDER_CEILING']:case _0x3468da[_0x143117(0x3a9)]:this[_0x143117(0x2e1)][_0x143117(0x26d)](this['fScale']),this[_0x143117(0x2e1)][_0x143117(0x458)](-this[_0x143117(0x3da)]),this[_0x143117(0x2e1)][_0x143117(0x210)](-this[_0x143117(0x2a3)]),this[_0x143117(0x2e1)][_0x143117(0x34a)](this['canvas'][_0x143117(0x36f)],this['canvas'][_0x143117(0x483)]),(_0x3980fd=this['pCamera'][_0x143117(0x522)](),_0x44bf90=this['pCamera'][_0x143117(0x25a)](),_0x3d2401=this[_0x143117(0x51e)][_0x143117(0x2b6)](this[_0x143117(0x1e9)],_0x143117(0x1f7)));if(_0x3d2401<=0x0)return _0x13949e[_0x143117(0x392)];this[_0x143117(0x51e)][_0x143117(0x479)](_0x3d2401,!0x1,_0x3980fd),_0x3d2401=this[_0x143117(0x51e)][_0x143117(0x2b6)](this['videoShaderProgram'],_0x143117(0x1d6));if(_0x3d2401<=0x0)return _0x13949e[_0x143117(0x392)];this['ctx']['uniformMatrix4fv'](_0x3d2401,!0x1,_0x44bf90);}if(this['canvas'][_0x143117(0x36f)]<=0x0||this[_0x143117(0x42d)][_0x143117(0x483)]<=0x0)return _0x13949e['SR_ERR_CANVAS'];if(this[_0x143117(0x51e)][_0x143117(0x2e8)](0x0,0x0,this['canvas'][_0x143117(0x36f)],this[_0x143117(0x42d)][_0x143117(0x483)]),this['ctx']['clearColor'](0x0,0x0,0x0,0x1),this['ctx'][_0x143117(0x3c3)](this[_0x143117(0x51e)][_0x143117(0x546)]|this['ctx'][_0x143117(0x2ce)]),this[_0x143117(0x367)]&&(this[_0x143117(0x51e)][_0x143117(0x3ce)](this[_0x143117(0x51e)][_0x143117(0x3cb)]),this[_0x143117(0x51e)][_0x143117(0x4ce)](this[_0x143117(0x51e)][_0x143117(0x36a)]),this[_0x143117(0x51e)]['depthMask'](!0x0),0x1==this[_0x143117(0x3dd)]?this[_0x143117(0x51e)][_0x143117(0x3ce)](this[_0x143117(0x51e)][_0x143117(0x238)]):this[_0x143117(0x51e)]['disable'](this[_0x143117(0x51e)]['CULL_FACE'])),this['ctx'][_0x143117(0x27d)](this[_0x143117(0x51e)][_0x143117(0x352)],0x0,this[_0x143117(0x51e)][_0x143117(0x45a)],this[_0x143117(0x51e)][_0x143117(0x45a)],this['ctx'][_0x143117(0x22b)],_0x4f5373),0x1==this[_0x143117(0x4a5)]&&this[_0x143117(0x51e)][_0x143117(0x22a)](this[_0x143117(0x51e)][_0x143117(0x352)]),this[_0x143117(0x1f2)]||this[_0x143117(0x51e)][_0x143117(0x446)](this[_0x143117(0x51e)][_0x143117(0x361)],0x0,0x1,0x0),0x0==this[_0x143117(0x367)])this[_0x143117(0x51e)][_0x143117(0x52a)](this[_0x143117(0x51e)]['TRIANGLE_FAN'],0x0,0x4);else{if(this[_0x143117(0x4d6)]==_0x3468da[_0x143117(0x2e3)]){if(this[_0x143117(0x340)]<=0x0)return _0x13949e[_0x143117(0x2cf)];this[_0x143117(0x51e)]['drawArrays'](this['ctx'][_0x143117(0x526)],0x0,this['nSemiSpherePosNum']);}else{if(this['enDisplayEffect']==_0x3468da[_0x143117(0x4dc)]){if(this[_0x143117(0x312)]<=0x0)return _0x13949e[_0x143117(0x2cf)];this[_0x143117(0x51e)][_0x143117(0x52a)](this[_0x143117(0x51e)][_0x143117(0x526)],0x0,this[_0x143117(0x312)]);}}}return this[_0x143117(0x51e)][_0x143117(0x288)](null),0x0==this[_0x143117(0x330)]&&null!=this[_0x143117(0x292)]&&-0x1!=(_0x47f13=this[_0x143117(0x292)]['GetWndPort']())&&_0x47f13==this['nFECPort']&&this['DrawPTZLines'](),null!=this['pfuncCBIn']&&this['pfuncCBIn'](this[_0x143117(0x252)]),null!=this['pfuncCBOut']&&this['pfuncCBOut'](this[_0x143117(0x4d5)]),_0x13949e[_0x143117(0x4a6)];}},{'key':_0x41470a(0x22f),'value':function(){var _0x21e98b=_0x41470a;if(null==this[_0x21e98b(0x292)])return _0x13949e['SR_ERR_CALL_ORDER'];for(var _0x5c7f1e=this['pFishParamManager'][_0x21e98b(0x40b)](),_0x2db678=0x0,_0x40dedc=[],_0x418a7a=(_0x40dedc['fR']=0x0,_0x40dedc['fG']=0x0,_0x40dedc['fB']=0x0,_0x40dedc['fA']=0x0,_0x13949e[_0x21e98b(0x4a6)]),_0x11b4fb=0x0;_0x11b4fb<0x20;++_0x11b4fb)if(0x0!=this[_0x21e98b(0x292)][_0x21e98b(0x1dd)](_0x11b4fb)){if(_0x2db678=0x2,_0x418a7a=this[_0x21e98b(0x292)][_0x21e98b(0x1f6)](_0x11b4fb,_0x40dedc),_0x13949e[_0x21e98b(0x4a6)]!=_0x418a7a)return _0x418a7a;0x1==this[_0x21e98b(0x292)][_0x21e98b(0x303)](_0x11b4fb)&&(_0x2db678+=0x1);var _0x138fa4=this[_0x21e98b(0x292)][_0x21e98b(0x289)]();if(_0x11b4fb!=_0x138fa4&&_0x46c232==_0x5c7f1e){if(_0x3468da[_0x21e98b(0x224)]==this['pFishParamManager'][_0x21e98b(0x4ad)](_0x138fa4)){var _0x4ac4c6=[],_0x418a7a=this[_0x21e98b(0x292)][_0x21e98b(0x4a4)](_0x11b4fb,_0x4ac4c6,_0x46c232);if(_0x13949e['SR_OK']!=_0x418a7a)return _0x418a7a;if(null!=_0x4ac4c6[_0x21e98b(0x2f3)]&&0x0!=_0x4ac4c6[_0x21e98b(0x216)]&&(_0x418a7a=this[_0x21e98b(0x3ec)](_0x4ac4c6[_0x21e98b(0x2f3)],_0x4ac4c6[_0x21e98b(0x216)],!0x0,_0x40dedc,_0x2db678,!0x1),_0x13949e[_0x21e98b(0x4a6)]!=_0x418a7a))return _0x418a7a;}}else{if(_0x11b4fb!=_0x138fa4&&_0xba837==_0x5c7f1e){_0x4ac4c6=[];if(_0x418a7a=this['pFishParamManager'][_0x21e98b(0x4a4)](_0x11b4fb,_0x4ac4c6,_0xba837),_0x13949e[_0x21e98b(0x4a6)]!=_0x418a7a)return _0x418a7a;if(null!=_0x4ac4c6['pstPoints']&&0x0!=_0x4ac4c6[_0x21e98b(0x216)]&&(_0x418a7a=this[_0x21e98b(0x3ec)](_0x4ac4c6[_0x21e98b(0x2f3)],_0x4ac4c6['nPointNum'],!0x0,_0x40dedc,_0x2db678,!0x1),_0x13949e['SR_OK']!=_0x418a7a))return _0x418a7a;}}}return _0x13949e['SR_OK'];}},{'key':_0x41470a(0x259),'value':function(_0x4ffb5a,_0x516320,_0xdba9c2){var _0x5754c5=_0x41470a;if(null==this[_0x5754c5(0x51e)])return _0x13949e[_0x5754c5(0x2cf)];if(null==_0x4ffb5a||_0x516320<0x1||_0xdba9c2<0x2)return _0x13949e[_0x5754c5(0x203)];for(var _0x9b8d10=0x0,_0x2fc8f5=0x0;_0x2fc8f5<_0x516320;++_0x2fc8f5){if(null==_0x4ffb5a[_0x2fc8f5][_0x5754c5(0x2f3)]||_0x4ffb5a[_0x2fc8f5]['nPointNum']<0x3||!0x0!==_0x4ffb5a[_0x2fc8f5]['bLoop']||null==_0x4ffb5a[_0x2fc8f5][_0x5754c5(0x36d)])return _0x13949e[_0x5754c5(0x203)];_0x9b8d10+=_0x4ffb5a[_0x2fc8f5][_0x5754c5(0x216)];}if(_0x9b8d10!==_0xdba9c2)return _0x13949e['SR_ERR_PARAM'];_0xdba9c2-=0x2*_0x516320;if(_0xdba9c2>this[_0x5754c5(0x453)]&&(this[_0x5754c5(0x38b)]=null,this[_0x5754c5(0x23d)]=null,this['nMaxFillBlockTriNum']=_0xdba9c2),0x0==this[_0x5754c5(0x383)]&&(this[_0x5754c5(0x383)]=this[_0x5754c5(0x51e)]['createBuffer'](),0x0==this['glBlockPosBuffer']))return _0x13949e['SR_ERR_WEBGL_RESOURCE'];if(0x0==this['glBlockClrBuffer']&&(this[_0x5754c5(0x50b)]=this[_0x5754c5(0x51e)][_0x5754c5(0x33d)](),0x0==this['glBlockClrBuffer']))return _0x13949e[_0x5754c5(0x392)];if(null==this['pFillBlockPosVertices']){var _0x55889b=this[_0x5754c5(0x453)];if(this['pFillBlockPosVertices']=new Float32Array(0x3*_0x55889b*0x3),null==this['pFillBlockPosVertices'])return _0x13949e[_0x5754c5(0x37b)];}if(this[_0x5754c5(0x38b)][_0x5754c5(0x542)](0x0),null==this['pFillBlockClrVertices']){_0x55889b=this[_0x5754c5(0x453)];if(this[_0x5754c5(0x23d)]=new Float32Array(0x4*_0x55889b*0x3),null==this['pFillBlockClrVertices'])return _0x13949e['SR_ERR_ALLOC_MEMORY'];}this[_0x5754c5(0x23d)][_0x5754c5(0x542)](0x0);for(var _0x62c238,_0x556e0e,_0x3049d4,_0x40a2cd=0x0,_0x4a74bd=0x0,_0x432cca={},_0x54c665={},_0x127802={},_0x1d4117=0x0;_0x1d4117<_0x516320;++_0x1d4117){_0x62c238=_0x4ffb5a[_0x1d4117][_0x5754c5(0x216)],_0x556e0e=_0x4ffb5a[_0x1d4117]['pstPoints'],_0x3049d4=_0x4ffb5a[_0x1d4117]['pstColor'],_0x432cca['fX']=0x2*_0x556e0e[0x0]['fX']-0x1,_0x432cca['fY']=0x1-0x2*_0x556e0e[0x0]['fY'];for(var _0xf077f4=0x1;_0xf077f4<_0x62c238-0x1;_0xf077f4++)_0x54c665['fX']=0x2*_0x556e0e[_0xf077f4]['fX']-0x1,_0x54c665['fY']=0x1-0x2*_0x556e0e[_0xf077f4]['fY'],_0x127802['fX']=0x2*_0x556e0e[_0xf077f4+0x1]['fX']-0x1,_0x127802['fY']=0x1-0x2*_0x556e0e[_0xf077f4+0x1]['fY'],this[_0x5754c5(0x38b)][_0x40a2cd++]=_0x432cca['fX'],this[_0x5754c5(0x38b)][_0x40a2cd++]=_0x432cca['fY'],this[_0x5754c5(0x38b)][_0x40a2cd++]=0x0,this['pFillBlockClrVertices'][_0x4a74bd++]=_0x3049d4['fR'],this[_0x5754c5(0x23d)][_0x4a74bd++]=_0x3049d4['fG'],this['pFillBlockClrVertices'][_0x4a74bd++]=_0x3049d4['fB'],this[_0x5754c5(0x23d)][_0x4a74bd++]=_0x3049d4['fA'],this[_0x5754c5(0x38b)][_0x40a2cd++]=_0x54c665['fX'],this['pFillBlockPosVertices'][_0x40a2cd++]=_0x54c665['fY'],this[_0x5754c5(0x38b)][_0x40a2cd++]=0x0,this[_0x5754c5(0x23d)][_0x4a74bd++]=_0x3049d4['fR'],this[_0x5754c5(0x23d)][_0x4a74bd++]=_0x3049d4['fG'],this[_0x5754c5(0x23d)][_0x4a74bd++]=_0x3049d4['fB'],this['pFillBlockClrVertices'][_0x4a74bd++]=_0x3049d4['fA'],this[_0x5754c5(0x38b)][_0x40a2cd++]=_0x127802['fX'],this[_0x5754c5(0x38b)][_0x40a2cd++]=_0x127802['fY'],this[_0x5754c5(0x38b)][_0x40a2cd++]=0x0,this[_0x5754c5(0x23d)][_0x4a74bd++]=_0x3049d4['fR'],this[_0x5754c5(0x23d)][_0x4a74bd++]=_0x3049d4['fG'],this['pFillBlockClrVertices'][_0x4a74bd++]=_0x3049d4['fB'],this[_0x5754c5(0x23d)][_0x4a74bd++]=_0x3049d4['fA'];}if(0x0==this[_0x5754c5(0x470)]&&(this[_0x5754c5(0x470)]=this['CompileProgram'](_0x5971cc,_0x466d10),0x0==this[_0x5754c5(0x470)]))return _0x13949e[_0x5754c5(0x392)];return this[_0x5754c5(0x51e)]['enable'](this[_0x5754c5(0x51e)]['BLEND']),this['ctx'][_0x5754c5(0x263)](this['ctx'][_0x5754c5(0x275)],this[_0x5754c5(0x51e)][_0x5754c5(0x231)]),this[_0x5754c5(0x51e)][_0x5754c5(0x408)](this[_0x5754c5(0x51e)]['ARRAY_BUFFER'],this[_0x5754c5(0x383)]),this['ctx'][_0x5754c5(0x416)](this[_0x5754c5(0x51e)][_0x5754c5(0x2f4)],this['pFillBlockPosVertices'],this['ctx'][_0x5754c5(0x33a)]),this['ctx']['bindBuffer'](this['ctx'][_0x5754c5(0x2f4)],null),this[_0x5754c5(0x51e)][_0x5754c5(0x408)](this[_0x5754c5(0x51e)]['ARRAY_BUFFER'],this['glBlockClrBuffer']),this[_0x5754c5(0x51e)]['bufferData'](this[_0x5754c5(0x51e)]['ARRAY_BUFFER'],this[_0x5754c5(0x23d)],this[_0x5754c5(0x51e)][_0x5754c5(0x33a)]),this['ctx']['bindBuffer'](this[_0x5754c5(0x51e)][_0x5754c5(0x2f4)],null),this['ctx'][_0x5754c5(0x288)](this[_0x5754c5(0x470)]),this['ctx']['bindBuffer'](this[_0x5754c5(0x51e)][_0x5754c5(0x2f4)],this[_0x5754c5(0x383)]),(_0x55889b=this[_0x5754c5(0x51e)]['getAttribLocation'](this[_0x5754c5(0x470)],_0x5754c5(0x3ef)),this['ctx'][_0x5754c5(0x2e6)](_0x55889b),this['ctx'][_0x5754c5(0x3c2)](_0x55889b,0x3,this[_0x5754c5(0x51e)]['FLOAT'],!0x1,0x0,0x0),this[_0x5754c5(0x51e)]['bindBuffer'](this[_0x5754c5(0x51e)][_0x5754c5(0x2f4)],null),this['ctx'][_0x5754c5(0x408)](this[_0x5754c5(0x51e)][_0x5754c5(0x2f4)],this['glBlockClrBuffer']),_0x55889b=this['ctx'][_0x5754c5(0x1ff)](this['nBlockShaderProgram'],_0x5754c5(0x35e))),(this[_0x5754c5(0x51e)]['enableVertexAttribArray'](_0x55889b),this[_0x5754c5(0x51e)][_0x5754c5(0x3c2)](_0x55889b,0x4,this[_0x5754c5(0x51e)]['FLOAT'],!0x1,0x0,0x0),this['ctx'][_0x5754c5(0x408)](this[_0x5754c5(0x51e)]['ARRAY_BUFFER'],null),this['ctx'][_0x5754c5(0x52a)](this[_0x5754c5(0x51e)][_0x5754c5(0x526)],0x0,0x3*_0xdba9c2),this[_0x5754c5(0x51e)]['useProgram'](null),this[_0x5754c5(0x51e)][_0x5754c5(0x54d)](this[_0x5754c5(0x51e)]['BLEND']),_0x13949e[_0x5754c5(0x4a6)]);}},{'key':_0x41470a(0x34d),'value':function(_0x28db65,_0x57df95){var _0x2eb24d=_0x41470a;if(null==_0x28db65||_0x57df95<0x1)return _0x13949e['SR_ERR_PARAM'];if(null==this[_0x2eb24d(0x2a7)]||null==this[_0x2eb24d(0x232)])return _0x13949e['SR_ERR_CALL_ORDER'];for(var _0x5593d4,_0x4b76b4,_0x524d66=0x0,_0x407140=0x0,_0x45c10c=0x0,_0xed833=0x0,_0x4eace5=0x0,_0x5a4396=0x0,_0x59928b=0x0,_0x55d38a=0x0,_0x3c5f70=0x0;_0x3c5f70<_0x57df95;++_0x3c5f70){var _0x2a48b3=[],_0x3ab94b=_0x28db65[_0x3c5f70][_0x2eb24d(0x216)];if(!(_0x3ab94b<=0x0)){for(var _0x4ac18a=0x0;_0x4ac18a<_0x3ab94b;++_0x4ac18a){var _0x584e8d={};_0x584e8d['fX']=_0x28db65[_0x3c5f70]['pstPoints'][_0x4ac18a]['fX'],_0x584e8d['fX']=0x2*_0x584e8d['fX']-0x1,_0x584e8d['fY']=_0x28db65[_0x3c5f70]['pstPoints'][_0x4ac18a]['fY'],_0x584e8d['fY']=0x1-0x2*_0x584e8d['fY'],_0x2a48b3[_0x2eb24d(0x51d)](_0x584e8d);}if(this[_0x2eb24d(0x42d)][_0x2eb24d(0x36f)]<=0x0||this[_0x2eb24d(0x42d)][_0x2eb24d(0x483)]<=0x0)return _0x13949e[_0x2eb24d(0x4e3)];if(_0x5593d4=3.5*_0x28db65[_0x3c5f70][_0x2eb24d(0x205)]/this[_0x2eb24d(0x42d)][_0x2eb24d(0x36f)],_0x4b76b4=3.5*_0x28db65[_0x3c5f70][_0x2eb24d(0x205)]/this[_0x2eb24d(0x42d)]['height'],_0x5593d4<=0x0||_0x4b76b4<=0x0)return _0x13949e['SR_ERR_PARAM'];var _0x34199d=_0x28db65[_0x3c5f70][_0x2eb24d(0x36d)];if(null==_0x34199d)return _0x13949e[_0x2eb24d(0x203)];for(var _0x57e7a3=0x0;_0x57e7a3<_0x3ab94b-0x1;++_0x57e7a3)_0x407140=_0x2a48b3[_0x57e7a3+0x1]['fX']-_0x2a48b3[_0x57e7a3]['fX'],_0x45c10c=_0x2a48b3[_0x57e7a3+0x1]['fY']-_0x2a48b3[_0x57e7a3]['fY'],_0x524d66=Math[_0x2eb24d(0x41c)](_0x407140*_0x407140+_0x45c10c*_0x45c10c),Math['abs'](+_0x524d66)<0.000001||(_0x4eace5=_0x4b76b4*_0x407140/_0x524d66/0x2,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3]['fX']+(_0xed833=-_0x5593d4*_0x45c10c/_0x524d66/0x2),this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3]['fY']+_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=-0x1,this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fB'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fA'],this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3+0x1]['fX']-_0xed833,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3+0x1]['fY']-_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fB'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fA'],this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3]['fX']-_0xed833,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3]['fY']-_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fB'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fA'],this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3]['fX']+_0xed833,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3]['fY']+_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=-0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fB'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fA'],this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3+0x1]['fX']+_0xed833,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3+0x1]['fY']+_0x4eace5,this['pLinePosVertices'][_0x59928b++]=-0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fB'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fA'],this['pLinePosVertices'][_0x59928b++]=_0x2a48b3[_0x57e7a3+0x1]['fX']-_0xed833,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x57e7a3+0x1]['fY']-_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fB'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fA'],_0x5a4396+=0x2);0x1==_0x28db65[_0x3c5f70][_0x2eb24d(0x431)]&&0x2<_0x3ab94b&&(_0x407140=_0x2a48b3[_0x3ab94b-0x1]['fX']-_0x2a48b3[0x0]['fX'],_0x45c10c=_0x2a48b3[_0x3ab94b-0x1]['fY']-_0x2a48b3[0x0]['fY'],_0x524d66=Math[_0x2eb24d(0x41c)](_0x407140*_0x407140+_0x45c10c*_0x45c10c),0.000001<Math[_0x2eb24d(0x1e6)](+_0x524d66)&&(_0x4eace5=_0x4b76b4*_0x407140/_0x524d66/0x2,this['pLinePosVertices'][_0x59928b++]=_0x2a48b3[0x0]['fX']+(_0xed833=-_0x5593d4*_0x45c10c/_0x524d66/0x2),this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[0x0]['fY']+_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=-0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fB'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fA'],this['pLinePosVertices'][_0x59928b++]=_0x2a48b3[_0x3ab94b-0x1]['fX']-_0xed833,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x3ab94b-0x1]['fY']-_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fB'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fA'],this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[0x0]['fX']-_0xed833,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[0x0]['fY']-_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=0x1,this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fB'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fA'],this['pLinePosVertices'][_0x59928b++]=_0x2a48b3[0x0]['fX']+_0xed833,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[0x0]['fY']+_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=-0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fG'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fB'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fA'],this['pLinePosVertices'][_0x59928b++]=_0x2a48b3[_0x3ab94b-0x1]['fX']+_0xed833,this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x3ab94b-0x1]['fY']+_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=-0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fG'],this['pLineClrVertices'][_0x55d38a++]=_0x34199d['fB'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fA'],this[_0x2eb24d(0x2a7)][_0x59928b++]=_0x2a48b3[_0x3ab94b-0x1]['fX']-_0xed833,this['pLinePosVertices'][_0x59928b++]=_0x2a48b3[_0x3ab94b-0x1]['fY']-_0x4eace5,this[_0x2eb24d(0x2a7)][_0x59928b++]=0x1,this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fR'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fG'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fB'],this[_0x2eb24d(0x232)][_0x55d38a++]=_0x34199d['fA'],_0x5a4396+=0x2));}}return 0x0==_0x5a4396?_0x13949e[_0x2eb24d(0x203)]:(this[_0x2eb24d(0x350)]=_0x5a4396,_0x13949e['SR_OK']);}},{'key':_0x41470a(0x3ec),'value':function(_0x4a4177,_0x34d8db,_0xccb171,_0x4fa834,_0x405218,_0x5c4f68){var _0xd97f84=_0x41470a,_0x222e90=[],_0x3a1a9f=[];return _0x3a1a9f[_0xd97f84(0x2f3)]=_0x4a4177,_0x3a1a9f[_0xd97f84(0x216)]=_0x34d8db,_0x3a1a9f['bLoop']=_0xccb171,_0x3a1a9f[_0xd97f84(0x36d)]=_0x4fa834,_0x3a1a9f[_0xd97f84(0x205)]=_0x405218,_0x222e90[_0xd97f84(0x51d)](_0x3a1a9f),this[_0xd97f84(0x267)](_0x222e90,0x1,_0x34d8db,_0x5c4f68);}},{'key':_0x41470a(0x267),'value':function(_0xaafb4d,_0x2e3bb7,_0x165451,_0x1094cc){var _0x20ab7d=_0x41470a;if(null==this[_0x20ab7d(0x51e)])return _0x13949e[_0x20ab7d(0x2cf)];if(null==_0xaafb4d||_0x2e3bb7<0x1||_0x165451<0x2)return _0x13949e[_0x20ab7d(0x203)];if(0x0==this[_0x20ab7d(0x37f)]){var _0x528a0a=this[_0x20ab7d(0x2b3)](_0x5971cc,_0x466d10);if(_0x528a0a<=0x0)return _0x13949e['SR_ERR_WEBGL_RESOURCE'];this[_0x20ab7d(0x37f)]=_0x528a0a;}if(0x1==_0x1094cc)return this['DrawFillBlock'](_0xaafb4d,_0x2e3bb7,_0x165451);for(var _0x22b4cb=0x0,_0x2bc3e4=0x0;_0x2bc3e4<_0x2e3bb7;++_0x2bc3e4){if(null==_0xaafb4d[_0x2bc3e4][_0x20ab7d(0x2f3)]||_0xaafb4d[_0x2bc3e4][_0x20ab7d(0x216)]<=0x1||0x400<=_0xaafb4d[_0x2bc3e4][_0x20ab7d(0x216)]||_0xaafb4d[_0x2bc3e4]['nLineWidth']<=0x0||null==_0xaafb4d[_0x2bc3e4][_0x20ab7d(0x36d)])return _0x13949e['SR_ERR_PARAM'];_0x22b4cb+=_0xaafb4d[_0x2bc3e4][_0x20ab7d(0x216)];}if(_0x22b4cb!=_0x165451)return _0x13949e[_0x20ab7d(0x203)];if((_0x22b4cb+=_0x2e3bb7)>this[_0x20ab7d(0x540)]&&(this[_0x20ab7d(0x540)]=_0x22b4cb,this['pLinePosVertices']=null,this[_0x20ab7d(0x232)]=null),null==this['pLinePosVertices']&&(this[_0x20ab7d(0x2a7)]=new Float32Array(0x6*this[_0x20ab7d(0x540)]*0x3),null==this['pLinePosVertices']))return _0x13949e[_0x20ab7d(0x37b)];if(this[_0x20ab7d(0x2a7)][_0x20ab7d(0x542)](0x0),null==this['pLineClrVertices']&&(this[_0x20ab7d(0x232)]=new Float32Array(0x6*this[_0x20ab7d(0x540)]*0x4),null==this[_0x20ab7d(0x232)]))return _0x13949e[_0x20ab7d(0x37b)];if(this[_0x20ab7d(0x232)][_0x20ab7d(0x542)](0x0),0x0==this[_0x20ab7d(0x442)]&&(this[_0x20ab7d(0x442)]=this[_0x20ab7d(0x51e)][_0x20ab7d(0x33d)](),0x0==this['glLinePosBuffer']))return _0x13949e[_0x20ab7d(0x392)];if(0x0==this[_0x20ab7d(0x4fc)]&&(this[_0x20ab7d(0x4fc)]=this[_0x20ab7d(0x51e)]['createBuffer'](),0x0==this[_0x20ab7d(0x4fc)]))return _0x13949e[_0x20ab7d(0x392)];_0x528a0a=this[_0x20ab7d(0x34d)](_0xaafb4d,_0x2e3bb7);if(_0x13949e[_0x20ab7d(0x4a6)]!=_0x528a0a)return _0x528a0a;this[_0x20ab7d(0x51e)][_0x20ab7d(0x3ce)](this[_0x20ab7d(0x51e)]['BLEND']),this['ctx'][_0x20ab7d(0x263)](this[_0x20ab7d(0x51e)]['SRC_ALPHA'],this[_0x20ab7d(0x51e)][_0x20ab7d(0x231)]);var _0x1094cc=this[_0x20ab7d(0x37f)],_0x165451=(this['ctx']['useProgram'](_0x1094cc),this[_0x20ab7d(0x442)]),_0x528a0a=this[_0x20ab7d(0x4fc)],_0x3bbd21=this[_0x20ab7d(0x350)],_0x3023ba=this[_0x20ab7d(0x2a7)],_0x25978a=this[_0x20ab7d(0x232)],_0x165451=(this[_0x20ab7d(0x51e)]['bindBuffer'](this[_0x20ab7d(0x51e)][_0x20ab7d(0x2f4)],_0x165451),this[_0x20ab7d(0x51e)][_0x20ab7d(0x416)](this[_0x20ab7d(0x51e)][_0x20ab7d(0x2f4)],_0x3023ba,this[_0x20ab7d(0x51e)][_0x20ab7d(0x33a)]),this[_0x20ab7d(0x51e)]['getAttribLocation'](_0x1094cc,_0x20ab7d(0x3ef))),_0x3023ba=(this[_0x20ab7d(0x51e)][_0x20ab7d(0x2e6)](_0x165451),this[_0x20ab7d(0x51e)]['vertexAttribPointer'](_0x165451,0x3,this[_0x20ab7d(0x51e)][_0x20ab7d(0x4f2)],!0x1,0x0,0x0),this[_0x20ab7d(0x51e)]['bindBuffer'](this[_0x20ab7d(0x51e)][_0x20ab7d(0x2f4)],_0x528a0a),this[_0x20ab7d(0x51e)][_0x20ab7d(0x416)](this[_0x20ab7d(0x51e)][_0x20ab7d(0x2f4)],_0x25978a,this[_0x20ab7d(0x51e)][_0x20ab7d(0x33a)]),this[_0x20ab7d(0x51e)][_0x20ab7d(0x1ff)](_0x1094cc,_0x20ab7d(0x35e)));return this[_0x20ab7d(0x51e)][_0x20ab7d(0x2e6)](_0x3023ba),this[_0x20ab7d(0x51e)]['vertexAttribPointer'](_0x3023ba,0x4,this[_0x20ab7d(0x51e)][_0x20ab7d(0x4f2)],!0x1,0x0,0x0),this['ctx'][_0x20ab7d(0x408)](this[_0x20ab7d(0x51e)]['ARRAY_BUFFER'],null),this['ctx'][_0x20ab7d(0x2e8)](0x0,0x0,this['canvas'][_0x20ab7d(0x36f)],this['canvas']['height']),this['ctx'][_0x20ab7d(0x52a)](this[_0x20ab7d(0x51e)][_0x20ab7d(0x526)],0x0,0x3*_0x3bbd21),this[_0x20ab7d(0x51e)][_0x20ab7d(0x288)](null),this['ctx'][_0x20ab7d(0x54d)](this[_0x20ab7d(0x51e)]['BLEND']),_0x13949e['SR_OK'];}},{'key':'FreetypeWasmLoadedCB','value':(_0xeda133=_0x30bbb2(_0x148935()[_0x41470a(0x230)](function _0x2b5372(_0x47f994){var _0x375965=_0x41470a,_0x1f3bcb,_0x5ce856,_0x4d82c7,_0x510b2e,_0x23723e,_0x28c851,_0x532f41,_0x55abd6;return _0x148935()[_0x375965(0x398)](function(_0x30bfe0){var _0x56e15d=_0x375965;for(;;)switch(_0x30bfe0[_0x56e15d(0x4e1)]=_0x30bfe0[_0x56e15d(0x500)]){case 0x0:if(null==_0x47f994)return _0x30bfe0[_0x56e15d(0x413)]('return');_0x30bfe0[_0x56e15d(0x500)]=0x2;break;case 0x2:if(null==(_0x5ce856=(_0x1f3bcb=_0x47f994)[_0x56e15d(0x53e)]))return _0x30bfe0[_0x56e15d(0x413)](_0x56e15d(0x26c),_0x13949e[_0x56e15d(0x203)]);_0x30bfe0['next']=0x6;break;case 0x6:if(null==(_0x4d82c7=new _0x1bf079()))return _0x30bfe0[_0x56e15d(0x413)]('return',_0x13949e['SR_ERR_ALLOC_MEMORY']);_0x30bfe0[_0x56e15d(0x500)]=0x9;break;case 0x9:if((_0x510b2e=_0x5ce856[_0x56e15d(0x2bd)](_0x4d82c7))!==_0x5342a5['Ok'])throw new Error(_0x5ce856[_0x56e15d(0x2d0)](_0x510b2e));_0x30bfe0['next']=0xc;break;case 0xc:if(null==_0x1f3bcb['pFontPath']||null==_0x1f3bcb[_0x56e15d(0x2c3)])return _0x30bfe0[_0x56e15d(0x413)]('return',_0x13949e['SR_ERR_CALL_ORDER']);_0x30bfe0[_0x56e15d(0x500)]=0xe;break;case 0xe:return _0x30bfe0['next']=0x10,fetch(_0x1f3bcb[_0x56e15d(0x2c3)]);case 0x10:if(null==(_0x23723e=_0x30bfe0['sent']))return _0x30bfe0['abrupt'](_0x56e15d(0x26c),_0x13949e[_0x56e15d(0x1fd)]);_0x30bfe0[_0x56e15d(0x500)]=0x13;break;case 0x13:return _0x30bfe0[_0x56e15d(0x500)]=0x15,_0x23723e[_0x56e15d(0x505)]();case 0x15:if(null==(_0x28c851=_0x30bfe0[_0x56e15d(0x20c)]))return _0x30bfe0[_0x56e15d(0x413)](_0x56e15d(0x26c),_0x13949e['SR_ERR_FREETYPE_INIT']);_0x30bfe0[_0x56e15d(0x500)]=0x18;break;case 0x18:if(null==(_0x532f41=new Uint8Array(_0x28c851)))return _0x30bfe0[_0x56e15d(0x413)](_0x56e15d(0x26c),_0x13949e[_0x56e15d(0x1fd)]);_0x30bfe0[_0x56e15d(0x500)]=0x1b;break;case 0x1b:if(null==(_0x55abd6=new _0x125374()))return _0x30bfe0[_0x56e15d(0x413)](_0x56e15d(0x26c),_0x13949e[_0x56e15d(0x1fd)]);_0x30bfe0[_0x56e15d(0x500)]=0x1e;break;case 0x1e:if((_0x510b2e=_0x5ce856['New_Memory_Face'](_0x4d82c7,_0x532f41,0x0,_0x55abd6))!==_0x5342a5['Ok'])throw _0x1f3bcb[_0x56e15d(0x53e)]=null,new Error(_0x5ce856['Error_String'](_0x510b2e));_0x30bfe0[_0x56e15d(0x500)]=0x22;break;case 0x22:_0x1f3bcb['FTLibrary']=_0x4d82c7,_0x1f3bcb[_0x56e15d(0x395)]=_0x55abd6;case 0x24:case _0x56e15d(0x30a):return _0x30bfe0[_0x56e15d(0x43b)]();}},_0x2b5372);})),function(_0x39716a){var _0x437f2d=_0x41470a;return _0xeda133[_0x437f2d(0x4f6)](this,arguments);})},{'key':'SR_SetFontPath','value':function(_0x46c401,_0x18051d){var _0x532d8c=_0x41470a;if(null==_0x18051d)return _0x13949e[_0x532d8c(0x203)];if(!this[_0x532d8c(0x215)]){var _0x1f5dff=new _0x30397f();if(null==_0x1f5dff)return _0x13949e[_0x532d8c(0x3ea)];this[_0x532d8c(0x2c3)]=_0x18051d,_0x18051d=this[_0x532d8c(0x488)],((this[_0x532d8c(0x53e)]=_0x1f5dff)[_0x532d8c(0x297)](_0x46c401,_0x18051d,this),this[_0x532d8c(0x215)]=!0x0);}return _0x13949e['SR_OK'];}},{'key':_0x41470a(0x379),'value':function(_0x3e4f00,_0x3689e6,_0x4c723c,_0x28420d,_0x146901,_0x204aaa,_0x1bd6b4){var _0x1071b4=_0x41470a;if(null==_0x3e4f00||null==_0x3689e6||null==_0x4c723c||_0x28420d<=0x1||_0x146901<=0x1)return _0x13949e[_0x1071b4(0x203)];if(0x1==_0x204aaa&&null==_0x1bd6b4)return _0x13949e['SR_ERR_PARAM'];var _0x512635=[],_0x34cf0f=[];return _0x34cf0f[_0x1071b4(0x4c6)]=_0x204aaa,_0x34cf0f[_0x1071b4(0x1de)]=_0x28420d,_0x34cf0f['nFontHeight']=_0x146901,_0x34cf0f[_0x1071b4(0x251)]=_0x1bd6b4,_0x34cf0f[_0x1071b4(0x50f)]=_0x4c723c,_0x34cf0f[_0x1071b4(0x26a)]=_0x3e4f00,_0x34cf0f[_0x1071b4(0x386)]=_0x3689e6,_0x512635[_0x1071b4(0x51d)](_0x34cf0f),this['SR_DrawFontEx'](_0x512635,0x1);}},{'key':'SR_DrawFontEx','value':function(_0x2b650a,_0x4dd772){var _0x884ebc=_0x41470a;if(null==this[_0x884ebc(0x51e)]||null==this[_0x884ebc(0x53e)])return _0x13949e['SR_ERR_CALL_ORDER'];if(_0x4dd772<0x0||null==_0x2b650a)return _0x13949e['SR_ERR_PARAM'];if(this[_0x884ebc(0x391)]==this[_0x884ebc(0x42d)][_0x884ebc(0x36f)]/0x4*0x4&&this['canvas'][_0x884ebc(0x483)]==this[_0x884ebc(0x2f1)]/0x4*0x4||(this[_0x884ebc(0x2a6)]=null,this[_0x884ebc(0x2f6)]=0x0,this[_0x884ebc(0x391)]=this[_0x884ebc(0x42d)]['width']/0x4*0x4,this[_0x884ebc(0x457)]=this[_0x884ebc(0x42d)][_0x884ebc(0x483)]/0x4*0x4),null==this[_0x884ebc(0x2a6)]||0x0==this[_0x884ebc(0x2f6)]){if(this[_0x884ebc(0x2a6)]=new Uint8Array(this[_0x884ebc(0x391)]*this['nDrawFontHeight']*0x4),null==this['pFontColorBuffer'])return _0x13949e[_0x884ebc(0x37b)];if(this[_0x884ebc(0x2a6)][_0x884ebc(0x542)](0x0),this['nFontColorTexture']=this[_0x884ebc(0x51e)][_0x884ebc(0x415)](),0x0==this[_0x884ebc(0x2f6)])return _0x13949e[_0x884ebc(0x392)];this[_0x884ebc(0x51e)][_0x884ebc(0x310)](this[_0x884ebc(0x51e)][_0x884ebc(0x352)],this[_0x884ebc(0x2f6)]),this['ctx'][_0x884ebc(0x2af)](this[_0x884ebc(0x51e)][_0x884ebc(0x352)],this[_0x884ebc(0x51e)][_0x884ebc(0x4b4)],this[_0x884ebc(0x51e)][_0x884ebc(0x20a)]),this[_0x884ebc(0x51e)]['texParameteri'](this['ctx'][_0x884ebc(0x352)],this[_0x884ebc(0x51e)][_0x884ebc(0x1d4)],this['ctx'][_0x884ebc(0x20a)]),this[_0x884ebc(0x51e)][_0x884ebc(0x2af)](this['ctx'][_0x884ebc(0x352)],this[_0x884ebc(0x51e)]['TEXTURE_WRAP_S'],this[_0x884ebc(0x51e)][_0x884ebc(0x3e7)]),this[_0x884ebc(0x51e)][_0x884ebc(0x2af)](this[_0x884ebc(0x51e)][_0x884ebc(0x352)],this[_0x884ebc(0x51e)][_0x884ebc(0x3b5)],this['ctx']['CLAMP_TO_EDGE']);}for(var _0x2c2a19=0x0,_0x2320a4=0x0;_0x2320a4<_0x4dd772;_0x2320a4++)_0x2b650a[_0x2320a4][_0x884ebc(0x513)]&&_0x2c2a19++;if(this['nFontBGNum']<_0x2c2a19){for(var _0xf285ee=0x0;_0xf285ee<this[_0x884ebc(0x31b)];++_0xf285ee)this[_0x884ebc(0x520)][_0xf285ee]['pstPoints']=null,this[_0x884ebc(0x520)][_0xf285ee][_0x884ebc(0x36d)]=null;this['pstFontBGLines']=null,this[_0x884ebc(0x520)]=[];for(var _0x239e34=0x0;_0x239e34<_0x2c2a19;++_0x239e34)this['pstFontBGLines'][_0x239e34]['pstPoints']=[],this['pstFontBGLines'][_0x239e34]['pstColor']=[];this[_0x884ebc(0x31b)]=_0x2c2a19;}for(var _0x2c2a19=0x0,_0x5ce3f0=0x0;_0x5ce3f0<_0x4dd772;++_0x5ce3f0){var _0x4aa3d8=_0x2b650a[_0x5ce3f0][_0x884ebc(0x386)]['fX']*this[_0x884ebc(0x391)],_0x3255b2=_0x2b650a[_0x5ce3f0][_0x884ebc(0x386)]['fY']*this[_0x884ebc(0x457)],_0x58129c=_0x2b650a[_0x5ce3f0]['pString'][_0x884ebc(0x4f1)],_0x19d542=(_0x2b650a[_0x5ce3f0][_0x884ebc(0x1de)]==_0x2b650a[_0x5ce3f0][_0x884ebc(0x2a2)]&&(_0x2b650a[_0x5ce3f0][_0x884ebc(0x2a2)]=_0x2b650a[_0x5ce3f0][_0x884ebc(0x2a2)]-0x1),this[_0x884ebc(0x457)]),_0x49db03=0x0,_0x544a59=0xff*_0x2b650a[_0x5ce3f0][_0x884ebc(0x50f)]['fA'],_0x1c4f2e=0xff*_0x2b650a[_0x5ce3f0][_0x884ebc(0x50f)]['fR'],_0x538032=0xff*_0x2b650a[_0x5ce3f0][_0x884ebc(0x50f)]['fG'],_0x774127=0xff*_0x2b650a[_0x5ce3f0]['pstFontColor']['fB'];if((_0x33fcec=this[_0x884ebc(0x53e)][_0x884ebc(0x4b0)](this[_0x884ebc(0x395)],0x40*this[_0x884ebc(0x391)],0x40*this[_0x884ebc(0x457)],0x12c,0x12c))!==_0x5342a5['Ok'])throw new Error(this['FreetypeLibHandle'][_0x884ebc(0x2d0)](_0x33fcec));for(var _0x54134a=0x0;_0x54134a<_0x58129c;++_0x54134a){var _0x33fcec,_0x8f414e=_0x2b650a[_0x5ce3f0][_0x884ebc(0x26a)]['charCodeAt'](_0x54134a);if((_0x33fcec=this[_0x884ebc(0x53e)][_0x884ebc(0x4cd)](this[_0x884ebc(0x395)],_0x8f414e,_0x151f60['NO_SCALE']))!=_0x5342a5['Ok'])throw new Error(this['FreetypeLibHandle'][_0x884ebc(0x2d0)](_0x33fcec));var _0x4b50f6=this['FTFace'][_0x884ebc(0x43e)];if((_0x33fcec=this[_0x884ebc(0x53e)][_0x884ebc(0x4af)](_0x4b50f6,_0x2afdcd[_0x884ebc(0x4da)]))!==_0x5342a5['Ok'])throw new Error(_0x30397f[_0x884ebc(0x2d0)](_0x33fcec));var _0x50aa40=_0x4b50f6[_0x884ebc(0x504)];_0x4aa3d8+=_0x4b50f6[_0x884ebc(0x2c6)],(_0x8f414e=this['nDrawFontHeight']-_0x4b50f6[_0x884ebc(0x27b)])<_0x19d542&&(_0x19d542=_0x8f414e),_0x49db03<(_0x8f414e=_0x50aa40[_0x884ebc(0x4a1)])&&(_0x49db03=_0x8f414e);for(var _0x3f98a1=0x0;_0x3f98a1<_0x50aa40[_0x884ebc(0x2dd)]*_0x50aa40[_0x884ebc(0x36f)];++_0x3f98a1){var _0x3391d9,_0x14a609=Math[_0x884ebc(0x3f7)](_0x2b650a[_0x5ce3f0]['nFontHeight']-_0x4b50f6[_0x884ebc(0x27b)]+_0x3255b2+_0x3f98a1/_0x50aa40[_0x884ebc(0x36f)]);_0x14a609>=this['nDrawFontHeight']||((_0x14a609=_0x4aa3d8+_0x14a609*this[_0x884ebc(0x391)]+_0x3f98a1%_0x50aa40['width'])<0x0||_0x14a609>=this[_0x884ebc(0x391)]*this['nDrawFontHeight']||0x0<_0x50aa40['buffer'][_0x3f98a1]&&((_0x3391d9=this[_0x884ebc(0x2a6)])[0x4*_0x14a609]=_0x774127,_0x3391d9[0x4*_0x14a609+0x1]=_0x538032,_0x3391d9[0x4*_0x14a609+0x2]=_0x1c4f2e,_0x3391d9[0x4*_0x14a609+0x3]=_0x544a59));}_0x4aa3d8+=_0x50aa40[_0x884ebc(0x36f)];}var _0x224ed7=[];_0x224ed7[_0x884ebc(0x478)]=_0x2b650a[_0x5ce3f0][_0x884ebc(0x386)]['fX'],_0x224ed7[_0x884ebc(0x24a)]=_0x2b650a[_0x5ce3f0][_0x884ebc(0x386)]['fY']+_0x19d542/this[_0x884ebc(0x457)],_0x224ed7['fRight']=_0x4aa3d8/this[_0x884ebc(0x391)],_0x224ed7['fBottom']=_0x49db03/this[_0x884ebc(0x457)]+_0x224ed7[_0x884ebc(0x24a)],_0x224ed7[_0x884ebc(0x478)]-=0.01,_0x224ed7['fTop']-=0.01,_0x224ed7[_0x884ebc(0x2d2)]+=0.01,_0x224ed7[_0x884ebc(0x339)]+=0.01,0x1==_0x2b650a[_0x5ce3f0]['bBackGround']&&(this[_0x884ebc(0x520)][_0x2c2a19][_0x884ebc(0x2f3)]=_0x224ed7,this[_0x884ebc(0x520)][_0x2c2a19][_0x884ebc(0x216)]=0x4,this[_0x884ebc(0x520)][_0x2c2a19][_0x884ebc(0x431)]=!0x0,this['pstFontBGLines'][_0x2c2a19][_0x884ebc(0x36d)]=_0x2b650a[_0x5ce3f0][_0x884ebc(0x251)],_0x2c2a19+=this[_0x884ebc(0x520)][_0x2c2a19]['nLineWidth']=0x1);}0x0!=_0x2c2a19&&this[_0x884ebc(0x267)](this[_0x884ebc(0x520)],_0x2c2a19,0x4*_0x2c2a19,!0x1),this['ctx']['bindTexture'](this[_0x884ebc(0x51e)]['TEXTURE_2D'],this['nFontColorTexture']),this[_0x884ebc(0x51e)][_0x884ebc(0x27d)](this[_0x884ebc(0x51e)]['TEXTURE_2D'],0x0,this['ctx']['RGBA'],this[_0x884ebc(0x391)],this[_0x884ebc(0x457)],0x0,this[_0x884ebc(0x51e)]['RGBA'],this[_0x884ebc(0x51e)][_0x884ebc(0x22b)],this[_0x884ebc(0x2a6)]),0x0==this['nFontShaderProgram']&&(this['nFontShaderProgram']=this[_0x884ebc(0x2b3)](_0x884ebc(0x506),'\\x0a\\x20\\x20\\x20\\x20varying\\x20lowp\\x20vec4\\x20pp;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main(void)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20texture2D(texture,\\x20pp.st);\\x0a\\x20\\x20\\x20\\x20}\\x0a')),this[_0x884ebc(0x51e)]['viewport'](0x0,0x0,this[_0x884ebc(0x42d)]['width'],this[_0x884ebc(0x42d)][_0x884ebc(0x483)]),this[_0x884ebc(0x51e)][_0x884ebc(0x3ce)](this[_0x884ebc(0x51e)][_0x884ebc(0x487)]),this[_0x884ebc(0x51e)][_0x884ebc(0x263)](this[_0x884ebc(0x51e)][_0x884ebc(0x275)],this[_0x884ebc(0x51e)][_0x884ebc(0x231)]),this['ctx'][_0x884ebc(0x288)](this[_0x884ebc(0x3c8)]),this[_0x884ebc(0x51e)][_0x884ebc(0x425)](this[_0x884ebc(0x51e)][_0x884ebc(0x30e)]),this[_0x884ebc(0x51e)]['bindTexture'](this[_0x884ebc(0x51e)]['TEXTURE_2D'],this[_0x884ebc(0x2f6)]);var _0x2f820a=this[_0x884ebc(0x51e)]['getUniformLocation'](this[_0x884ebc(0x3c8)],_0x884ebc(0x4ee)),_0x2f820a=(this['ctx'][_0x884ebc(0x2cc)](_0x2f820a,0x0),this[_0x884ebc(0x51e)][_0x884ebc(0x408)](this['ctx']['ARRAY_BUFFER'],this[_0x884ebc(0x52e)]),this[_0x884ebc(0x51e)][_0x884ebc(0x1ff)](this[_0x884ebc(0x3c8)],'position')),_0x2f820a=(this[_0x884ebc(0x51e)][_0x884ebc(0x2e6)](_0x2f820a),this[_0x884ebc(0x51e)][_0x884ebc(0x3c2)](_0x2f820a,0x3,this[_0x884ebc(0x51e)][_0x884ebc(0x4f2)],!0x1,0x0,0x0),this[_0x884ebc(0x51e)][_0x884ebc(0x408)](this[_0x884ebc(0x51e)][_0x884ebc(0x2f4)],this[_0x884ebc(0x53d)]),this['ctx'][_0x884ebc(0x1ff)](this[_0x884ebc(0x3c8)],_0x884ebc(0x34f)));return this[_0x884ebc(0x51e)][_0x884ebc(0x2e6)](_0x2f820a),this[_0x884ebc(0x51e)][_0x884ebc(0x3c2)](_0x2f820a,0x2,this[_0x884ebc(0x51e)][_0x884ebc(0x4f2)],!0x1,0x0,0x0),this['ctx'][_0x884ebc(0x408)](this[_0x884ebc(0x51e)][_0x884ebc(0x2f4)],null),this[_0x884ebc(0x51e)][_0x884ebc(0x52a)](this[_0x884ebc(0x51e)]['TRIANGLES'],0x0,0x6),this[_0x884ebc(0x51e)][_0x884ebc(0x288)](null),this[_0x884ebc(0x51e)][_0x884ebc(0x54d)](this[_0x884ebc(0x51e)][_0x884ebc(0x487)]),_0x13949e[_0x884ebc(0x4a6)];}},{'key':_0x41470a(0x485),'value':function(_0x2ec840){var _0x1e3d1c=_0x41470a;if(null==this[_0x1e3d1c(0x51e)])return _0x13949e['SR_ERR_CALL_ORDER'];var _0x12592a,_0x5c2048,_0x2d3c80=-0x1;if(_0x2ec840==_0x3468da[_0x1e3d1c(0x3c1)])_0x2d3c80=0x0;else{if(-0x1==(_0x2d3c80=null!=this[_0x1e3d1c(0x292)]?this[_0x1e3d1c(0x292)][_0x1e3d1c(0x276)](_0x2ec840):_0x2d3c80))return _0x2d3c80;}switch(this[_0x1e3d1c(0x29e)]=_0x2d3c80,_0x2ec840){case _0x3468da['SR_DE_NULL']:_0x12592a=_0xe651be,this[_0x1e3d1c(0x367)]=!(_0x5c2048=_0x1e3d1c(0x4b8));break;case _0x3468da[_0x1e3d1c(0x224)]:_0x12592a=_0xe651be,_0x5c2048=_0x1e3d1c(0x2c9),this['bFECHandle']=!0x0,this[_0x1e3d1c(0x367)]=!0x1;break;case _0x3468da['SR_DE_FISH_PTZ_CEILING']:_0x12592a=_0xe651be,_0x5c2048='\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20vec2\\x20v_uv;\\x0auniform\\x20sampler2D\\x20texture;\\x0auniform\\x20float\\x20fHAngleCos;\\x0auniform\\x20float\\x20fHAngleSin;\\x0auniform\\x20float\\x20fVAngleCos;\\x0auniform\\x20float\\x20fVAngleSin;\\x0auniform\\x20float\\x20fZoom;\\x0a\\x0auniform\\x20float\\x20fRX1;\\x20\\x0auniform\\x20float\\x20fRX2;\\x20\\x0auniform\\x20float\\x20fRY1;\\x20\\x0auniform\\x20float\\x20fRY2;\\x20\\x0a\\x0avoid\\x20main()\\x0a{\\x0a\\x20\\x20\\x20\\x20float\\x20r,g,b;\\x20\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin1;\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin2;\\x0a\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z1;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z2;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20dnew;\\x0a\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20origin1.s\\x20=\\x20v_uv.s\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin1.t\\x20=\\x200.5\\x20-\\x20v_uv.t;\\x0a\\x20\\x20\\x20\\x20z1\\x20=\\x20fZoom\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20origin1.s\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20(origin1.t*fVAngleCos\\x20+\\x20z1*fVAngleSin);\\x0a\\x20\\x20\\x20\\x20z2\\x20=\\x20z1*fVAngleCos\\x20-\\x20origin1.t*fVAngleSin;\\x0a\\x0a\\x20\\x20\\x20\\x20dnew\\x20=\\x20sqrt(origin2.s*origin2.s\\x20+\\x20origin2.t*origin2.t)\\x20;\\x0a\\x20\\x20\\x20\\x20float\\x20d\\x20=\\x20sqrt(origin2.s*origin2.s\\x20+\\x20origin2.t*origin2.t\\x20+\\x20z2*z2);\\x0a\\x20\\x20\\x20\\x20float\\x20theta\\x20=\\x20asin(dnew/d);\\x0a\\x20\\x20\\x20\\x20float\\x20tmp\\x20=\\x20theta\\x20/\\x201.5707963\\x20*\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20tmp*origin2.s\\x20/\\x20dnew\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20tmp*origin2.t\\x20/\\x20dnew\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20result.s\\x20=\\x20((origin2.s*fHAngleCos\\x20-\\x20origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\\x0a\\x20\\x20\\x20\\x20result.t\\x20=\\x20(-(origin2.s*fHAngleSin\\x20+\\x20origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\\x0a\\x0a\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(texture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(texture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(texture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a}\\x20\\x0a',this[_0x1e3d1c(0x2bc)]=!0x0,this[_0x1e3d1c(0x367)]=!0x1;break;case _0x3468da[_0x1e3d1c(0x4c2)]:_0x12592a=_0xe651be,_0x5c2048=_0x1e3d1c(0x21f),this[_0x1e3d1c(0x2bc)]=!0x0;break;case _0x3468da[_0x1e3d1c(0x4bf)]:_0x12592a=_0xe651be,_0x5c2048='\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20vec2\\x20v_uv;\\x0auniform\\x20sampler2D\\x20texture;\\x0auniform\\x20float\\x20fHAngleCos;\\x0auniform\\x20float\\x20fHAngleSin;\\x20\\x20\\x0auniform\\x20float\\x20fVAngleCos;\\x20\\x20\\x0auniform\\x20float\\x20fVAngleSin;\\x20\\x20\\x0auniform\\x20float\\x20fZoom;\\x0a\\x0auniform\\x20float\\x20fRX1;\\x20\\x0auniform\\x20float\\x20fRX2;\\x20\\x0auniform\\x20float\\x20fRY1;\\x20\\x0auniform\\x20float\\x20fRY2;\\x20\\x0a\\x0avoid\\x20main()\\x0a{\\x0a\\x20\\x20\\x20\\x20float\\x20r,g,b;\\x20\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin1;\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin2;\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin3;\\x0a\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z1;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z2;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z3;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20dnew;\\x0a\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<Բ��ʵ������\\x0a\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<�뾶ʵ�ʳ���\\x0a\\x0a\\x20\\x20\\x20\\x20origin1.s\\x20=\\x20v_uv.s\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin1.t\\x20=\\x20v_uv.t\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20z1\\x20=\\x20fZoom\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20origin1.s\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20(origin1.t*fVAngleCos\\x20+\\x20z1*fVAngleSin);\\x0a\\x20\\x20\\x20\\x20z2\\x20=\\x20z1*fVAngleCos\\x20-\\x20origin1.t*fVAngleSin;\\x0a\\x0a\\x20\\x20\\x20\\x20origin3.s\\x20=\\x20origin2.s*fHAngleCos\\x20+\\x20z2*fHAngleSin\\x20;\\x0a\\x20\\x20\\x20\\x20origin3.t\\x20=\\x20origin2.y;\\x0a\\x20\\x20\\x20\\x20z3\\x20=\\x20z2*fHAngleCos\\x20-\\x20origin2.x*fHAngleSin;\\x0a\\x0a\\x20\\x20\\x20\\x20dnew\\x20=\\x20sqrt(origin3.s*origin3.s\\x20+\\x20origin3.t*origin3.t)\\x20;\\x0a\\x20\\x20\\x20\\x20float\\x20d\\x20=\\x20sqrt(origin3.s*origin3.s\\x20+\\x20origin3.t*origin3.t\\x20+\\x20z3*z3);\\x0a\\x20\\x20\\x20\\x20float\\x20theta\\x20=\\x20asin(dnew/d);\\x0a\\x20\\x20\\x20\\x20float\\x20tmp\\x20=\\x20theta\\x20/\\x201.5707963\\x20*\\x200.5;\\x0a\\x20\\x20\\x20\\x20result.s\\x20=\\x20(tmp*origin3.s\\x20/\\x20dnew\\x20*\\x20fRadius\\x20*\\x202.0\\x20+\\x20fCenterX)/w;\\x0a\\x20\\x20\\x20\\x20result.t\\x20=\\x20(tmp*origin3.t\\x20/\\x20dnew\\x20*\\x20fRadius\\x20*\\x202.0\\x20+\\x20fCenterY)/h;\\x0a\\x0a\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(texture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(texture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(texture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a}\\x20\\x0a',this['bFECHandle']=!0x0,this['b3DPort']=!0x1;break;case _0x3468da[_0x1e3d1c(0x208)]:_0x12592a=_0xe651be,_0x5c2048=_0x1e3d1c(0x388),this[_0x1e3d1c(0x2bc)]=!0x0,this[_0x1e3d1c(0x367)]=!0x1;break;case _0x3468da[_0x1e3d1c(0x4f5)]:_0x12592a=_0xe651be,_0x5c2048=_0x1e3d1c(0x364),this['bFECHandle']=!0x0,this[_0x1e3d1c(0x367)]=!0x1;break;case _0x3468da[_0x1e3d1c(0x2f5)]:_0x12592a=_0xe651be,_0x5c2048=_0x1e3d1c(0x2be),this[_0x1e3d1c(0x2bc)]=!0x0,this['b3DPort']=!0x1;break;case _0x3468da[_0x1e3d1c(0x3a8)]:_0x12592a=_0xe651be,_0x5c2048='\\x0a\\x20\\x20\\x20\\x20precision\\x20highp\\x20float;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec2\\x20v_uv;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY2;\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20r,g,b;\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20origin;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20thetabase;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20d;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20newpp;\\x20\\x20///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if\\x20(v_uv.t\\x20\\x20<=\\x200.5)\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.s\\x20=\\x20\\x20v_uv.s\\x20/\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.t\\x20=\\x20\\x20v_uv.t\\x20*\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.s\\x20=\\x20\\x20v_uv.s\\x20/\\x202.0\\x20+\\x200.5;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.t\\x20=\\x20\\x20(v_uv.t\\x20-\\x200.5)\\x20*\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20fMax\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0\\x20||\\x20fRY2\\x20>\\x201.0\\x20||\\x20fRX1\\x20<\\x200.0\\x20||\\x20fRY1\\x20<\\x200.0)\\x20///<如果不是一个完整的圆\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRX1\\x20*\\x20w;\\x20///<左边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRX2\\x20-\\x201.0)\\x20*\\x20w;\\x20///<右边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRY1\\x20*\\x20h;\\x20///<上边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRY2\\x20-\\x201.0)\\x20*\\x20h;\\x20///<下边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20topCut\\x20=\\x20fMax\\x20/\\x20fRadius;\\x20\\x20\\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20bottomCut\\x20=\\x200.8;\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20///<为矫正效果,最终矫正图固定切掉下面一部分\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.s\\x20=\\x201.0\\x20-\\x20newpp.s;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.t\\x20=\\x20(bottomCut\\x20-\\x20topCut)\\x20*\\x20(1.0\\x20-\\x20newpp.t)\\x20+\\x20topCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20thetabase\\x20=\\x206.2831853\\x20*\\x20origin.s\\x20+\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20d\\x20=\\x20fRadius\\x20*\\x20(1.0\\x20-\\x20origin.t);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.s\\x20=\\x20(fCenterX\\x20-\\x20d*sin(thetabase))\\x20/\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.t\\x20=\\x20(fCenterY\\x20+\\x20d*cos(thetabase))\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(texture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(texture,\\x20result.st).g;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(texture,\\x20result.st).b;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x20\\x0a',this[_0x1e3d1c(0x2bc)]=!0x0,this['b3DPort']=!0x1;break;case _0x3468da[_0x1e3d1c(0x33c)]:_0x12592a=_0xe651be,_0x5c2048=SHADER_PS_RGBA_PANORAMA_WALL,this[_0x1e3d1c(0x2bc)]=!0x0,this['b3DPort']=!0x1;break;case _0x3468da['SR_DE_FISH_SEMISPHERE']:case _0x3468da[_0x1e3d1c(0x4dc)]:case _0x3468da[_0x1e3d1c(0x3a9)]:_0x12592a=_0x1e3d1c(0x332),_0x5c2048=_0x1e3d1c(0x423),this[_0x1e3d1c(0x2bc)]=!0x0,this[_0x1e3d1c(0x367)]=!0x0;}var _0x2d3c80=this[_0x1e3d1c(0x2b3)](_0x12592a,_0x5c2048),_0x2d3c80=(this[_0x1e3d1c(0x1e9)]=_0x2d3c80,null),_0x1a3228=null,_0x4fb145=(0x0==this[_0x1e3d1c(0x367)]?(_0x2d3c80=new Float32Array([-0x1,-0x1,0x0,-0x1,0x1,0x0,0x1,0x1,0x0,0x1,-0x1,0x0]),_0x1a3228=new Float32Array([0x0,0x1,0x0,0x0,0x1,0x0,0x1,0x1])):_0x2ec840==_0x3468da[_0x1e3d1c(0x2e3)]&&(this[_0x1e3d1c(0x354)](0x0,0x1,0x0,0x1),_0x2d3c80=this[_0x1e3d1c(0x2ea)],_0x1a3228=this[_0x1e3d1c(0x2d7)]),this[_0x1e3d1c(0x51e)]['createBuffer']()),_0x2d3c80=(this[_0x1e3d1c(0x51e)][_0x1e3d1c(0x408)](this[_0x1e3d1c(0x51e)][_0x1e3d1c(0x2f4)],_0x4fb145),this[_0x1e3d1c(0x51e)][_0x1e3d1c(0x416)](this['ctx'][_0x1e3d1c(0x2f4)],_0x2d3c80,this[_0x1e3d1c(0x51e)]['STATIC_DRAW']),this[_0x1e3d1c(0x52e)]=_0x4fb145,this[_0x1e3d1c(0x51e)][_0x1e3d1c(0x33d)]()),_0x4fb145=(this[_0x1e3d1c(0x51e)][_0x1e3d1c(0x408)](this['ctx'][_0x1e3d1c(0x2f4)],_0x2d3c80),this[_0x1e3d1c(0x51e)][_0x1e3d1c(0x416)](this[_0x1e3d1c(0x51e)]['ARRAY_BUFFER'],_0x1a3228,this['ctx'][_0x1e3d1c(0x33a)]),this[_0x1e3d1c(0x53d)]=_0x2d3c80,this[_0x1e3d1c(0x51e)][_0x1e3d1c(0x408)](this[_0x1e3d1c(0x51e)][_0x1e3d1c(0x2f4)],null),this['InitCamera'](_0x2ec840));return _0x13949e[_0x1e3d1c(0x4a6)]!=_0x4fb145?-0x1:(this[_0x1e3d1c(0x4d6)]=_0x2ec840,this['nFECPort']);}},{'key':_0x41470a(0x41e),'value':function(_0x2a4887){var _0x316efb=_0x41470a;return null==this['ctx']?_0x13949e[_0x316efb(0x2cf)]:(null!=this[_0x316efb(0x292)]&&this[_0x316efb(0x292)][_0x316efb(0x32d)](_0x2a4887),this['bFECHandle']=!0x1,this['enDisplayEffect']=_0x3468da[_0x316efb(0x3c1)],0x0!=this[_0x316efb(0x1e9)]&&null!=this[_0x316efb(0x51e)]&&(this[_0x316efb(0x51e)][_0x316efb(0x482)](this[_0x316efb(0x1e9)]),this['videoShaderProgram']=0x0),0x0!=this[_0x316efb(0x52e)]&&null!=this[_0x316efb(0x51e)]&&(this['ctx'][_0x316efb(0x459)](this['vertexPosBuffer']),this[_0x316efb(0x52e)]=0x0),0x0!=this[_0x316efb(0x53d)]&&null!=this['ctx']&&(this[_0x316efb(0x51e)][_0x316efb(0x459)](this[_0x316efb(0x53d)]),this[_0x316efb(0x53d)]=0x0),this[_0x316efb(0x540)]=0x0,this[_0x316efb(0x2a7)]=null,this[_0x316efb(0x232)]=null,0x0!=this['glLinePosBuffer']&&null!=this[_0x316efb(0x51e)]&&(this[_0x316efb(0x51e)]['deleteBuffer'](this[_0x316efb(0x442)]),this[_0x316efb(0x442)]=0x0),0x0!=this['glLineTexBuffer']&&null!=this[_0x316efb(0x51e)]&&(this[_0x316efb(0x51e)]['deleteBuffer'](this[_0x316efb(0x29c)]),this[_0x316efb(0x29c)]=0x0),(this[_0x316efb(0x350)]=0x0)!=this[_0x316efb(0x37f)]&&null!=this[_0x316efb(0x51e)]&&(this[_0x316efb(0x51e)]['deleteProgram'](this[_0x316efb(0x37f)]),this[_0x316efb(0x37f)]=0x0),this[_0x316efb(0x38b)]=null,this[_0x316efb(0x23d)]=null,(this[_0x316efb(0x453)]=0x0)!=this[_0x316efb(0x383)]&&null!=this[_0x316efb(0x51e)]&&(this[_0x316efb(0x51e)][_0x316efb(0x459)](this[_0x316efb(0x383)]),this['glBlockPosBuffer']=0x0),0x0!=this['glBlockClrBuffer']&&null!=this[_0x316efb(0x51e)]&&(this['ctx'][_0x316efb(0x459)](this[_0x316efb(0x50b)]),this[_0x316efb(0x50b)]=0x0),0x0!=this[_0x316efb(0x470)]&&null!=this[_0x316efb(0x51e)]&&(this[_0x316efb(0x51e)][_0x316efb(0x482)](this[_0x316efb(0x470)]),this[_0x316efb(0x470)]=0x0),null!=this['FreetypeLibHandle']&&null!=this[_0x316efb(0x395)]&&(this[_0x316efb(0x53e)]['Done_Face'](this[_0x316efb(0x395)]),this[_0x316efb(0x395)]=null),null!=this[_0x316efb(0x53e)]&&null!=this[_0x316efb(0x327)]&&(this[_0x316efb(0x53e)][_0x316efb(0x357)](this[_0x316efb(0x327)]),this[_0x316efb(0x327)]=null),this[_0x316efb(0x215)]=!0x1,this[_0x316efb(0x2c3)]=null,this[_0x316efb(0x53e)]=null,this[_0x316efb(0x391)]=0x0,(this['nDrawFontHeight']=0x0)!=this[_0x316efb(0x2f6)]&&null!=this[_0x316efb(0x51e)]&&(this[_0x316efb(0x51e)][_0x316efb(0x300)](this[_0x316efb(0x2f6)]),this[_0x316efb(0x2f6)]=0x0),(this[_0x316efb(0x2a6)]=0x0)!=this[_0x316efb(0x3c8)]&&null!=this['ctx']&&(this['ctx'][_0x316efb(0x482)](this[_0x316efb(0x3c8)]),this[_0x316efb(0x3c8)]=0x0),this['nFontBGNum']=0x0,this[_0x316efb(0x520)]=null,this[_0x316efb(0x2ea)]=null,this[_0x316efb(0x2d7)]=null,this[_0x316efb(0x340)]=0x0,this['nSemiSpherePosSize']=0x0,this[_0x316efb(0x406)]=0x0,this[_0x316efb(0x441)]=null,this[_0x316efb(0x4c0)]=null,this[_0x316efb(0x312)]=0x0,this[_0x316efb(0x3ff)]=0x0,this[_0x316efb(0x4f8)]=0x0,this[_0x316efb(0x2c1)]=0x0,this[_0x316efb(0x338)]=0x0,this[_0x316efb(0x367)]=!0x1,this[_0x316efb(0x2e1)]=null,this[_0x316efb(0x3da)]=0x0,this[_0x316efb(0x2a3)]=0x0,this[_0x316efb(0x44a)]=0x0,this[_0x316efb(0x229)]=null,this[_0x316efb(0x46c)]=null,this[_0x316efb(0x252)]=null,this[_0x316efb(0x4d5)]=null,this[_0x316efb(0x51e)][_0x316efb(0x54d)](this[_0x316efb(0x51e)]['CULL_FACE']),this[_0x316efb(0x51e)][_0x316efb(0x54d)](this[_0x316efb(0x51e)][_0x316efb(0x3cb)]),_0x13949e['SR_OK']);}},{'key':_0x41470a(0x511),'value':function(_0x30a173){var _0x52b312=_0x41470a;return null==_0x30a173?_0x13949e[_0x52b312(0x203)]:null==this[_0x52b312(0x292)]?_0x13949e[_0x52b312(0x2cf)]:this[_0x52b312(0x292)][_0x52b312(0x3e3)](this[_0x52b312(0x29e)],_0x30a173);}},{'key':_0x41470a(0x4f0),'value':function(_0x322778){var _0x1aa028=_0x41470a;return null==_0x322778?_0x13949e[_0x1aa028(0x203)]:null==this[_0x1aa028(0x292)]?_0x13949e[_0x1aa028(0x2cf)]:this['pFishParamManager']['SetFishParam'](this[_0x1aa028(0x29e)],_0x322778);}},{'key':'SR_SetDisplayRect','value':function(_0x2b0089,_0x6076ae,_0x183e35,_0x475f0e){var _0x307de6=_0x41470a;if(null==this[_0x307de6(0x51e)])return _0x13949e[_0x307de6(0x2cf)];var _0x58b1ac,_0x48adad,_0x3d05f0=null;return _0x3d05f0=0x0<this['frameDisplayWidth']&&0x0<this['frameDisplayHeight']?(_0x58b1ac=_0x2b0089/this[_0x307de6(0x502)],_0x48adad=_0x6076ae/this[_0x307de6(0x3b0)],_0x2b0089=(_0x2b0089+_0x183e35)/this[_0x307de6(0x502)],_0x183e35=(_0x6076ae+_0x475f0e)/this[_0x307de6(0x3b0)],new Float32Array([_0x58b1ac,_0x183e35,_0x58b1ac,_0x48adad,_0x2b0089,_0x48adad,_0x2b0089,_0x183e35])):new Float32Array([0x0,0x1,0x0,0x0,0x1,0x0,0x1,0x1]),this[_0x307de6(0x51e)][_0x307de6(0x408)](this[_0x307de6(0x51e)][_0x307de6(0x2f4)],this[_0x307de6(0x53d)]),this[_0x307de6(0x51e)][_0x307de6(0x306)](this[_0x307de6(0x51e)][_0x307de6(0x2f4)],0x0,_0x3d05f0),this['ctx'][_0x307de6(0x408)](this['ctx'][_0x307de6(0x2f4)],null),_0x13949e[_0x307de6(0x4a6)];}},{'key':_0x41470a(0x4b2),'value':function(){var _0x33b71d=_0x41470a;return null==this[_0x33b71d(0x51e)]?_0x13949e[_0x33b71d(0x2cf)]:(this['frameDisplayWidth']=0x0,(this[_0x33b71d(0x3b0)]=0x0)!=this[_0x33b71d(0x516)]&&null!=this[_0x33b71d(0x51e)]&&(this[_0x33b71d(0x51e)][_0x33b71d(0x300)](this['nSurfaceTexture']),this[_0x33b71d(0x516)]=0x0),0x0==this['bFECHandle']?this[_0x33b71d(0x41e)](0x0):-0x1!=this[_0x33b71d(0x29e)]&&this[_0x33b71d(0x41e)](this[_0x33b71d(0x29e)]),this[_0x33b71d(0x1f2)]=!0x1,this[_0x33b71d(0x4a5)]=!0x1,this['bRecreateTex']=!0x0,this[_0x33b71d(0x292)]=null,this[_0x33b71d(0x42d)]=null,this[_0x33b71d(0x51e)]=null,_0x13949e['SR_OK']);}},{'key':'SR_SetCanvasSize','value':function(_0x207390,_0x1713c2){var _0x24221c=_0x41470a;return this[_0x24221c(0x42d)][_0x24221c(0x36f)]=_0x207390,this[_0x24221c(0x42d)][_0x24221c(0x483)]=_0x1713c2,_0x13949e[_0x24221c(0x4a6)];}},{'key':_0x41470a(0x547),'value':function(){var _0x4eca94=_0x41470a;return console[_0x4eca94(0x514)]('canvas\\x20width:'+this[_0x4eca94(0x42d)][_0x4eca94(0x36f)]+_0x4eca94(0x254)+this['canvas'][_0x4eca94(0x483)]),_0x13949e[_0x4eca94(0x4a6)];}},{'key':'SR_SetAntialias','value':function(_0x1679a2){var _0x46f517=_0x41470a;return 0x1==this[_0x46f517(0x1f2)]?_0x13949e[_0x46f517(0x38d)]:(this['bAntialias']!=_0x1679a2&&(this['bRecreateTex']=!0x0,this[_0x46f517(0x4a5)]=_0x1679a2),_0x13949e[_0x46f517(0x4a6)]);}},{'key':_0x41470a(0x2e7),'value':function(_0x317974){var _0x445de9=_0x41470a;return null==this[_0x445de9(0x292)]?_0x13949e[_0x445de9(0x2cf)]:this[_0x445de9(0x292)][_0x445de9(0x524)](_0x317974);}},{'key':_0x41470a(0x32f),'value':function(_0x2131ed){var _0x49d7dd=_0x41470a;return null!=this[_0x49d7dd(0x292)]?_0x13949e['SR_ERR_NOT_SUPPORT']:(this[_0x49d7dd(0x292)]=_0x2131ed,_0x13949e[_0x49d7dd(0x4a6)]);}},{'key':'CreateSemiSphere','value':function(_0x588ab8,_0x1c765f,_0x5931b2,_0x3aff66){var _0x11a651=_0x41470a;if(null!=this[_0x11a651(0x2ea)]||null!=this[_0x11a651(0x2d7)])return _0x13949e['SR_ERR_CALL_ORDER'];this['pSemiSpherePos']=new Float32Array(0xa8c0),this[_0x11a651(0x2d7)]=new Float32Array(0x7080);for(var _0x89f603=(_0x1c765f-_0x588ab8)/(_0x3aff66-_0x5931b2),_0x2dc0d6=(_0x1c765f-_0x588ab8)/0x2*0x1,_0x29f8b8=0x2*_0x48e6bf/0x3c,_0x477a78=_0x48e6bf/0x2/0x28,_0x565c8b=0x0,_0x979fe=0x0,_0x2b59f3=0x0,_0x36fa65=0x0;_0x36fa65<0x3c;++_0x36fa65)for(var _0x1fea2a=0x0;_0x1fea2a<0x28;++_0x1fea2a){var _0x386255,_0x229ce8,_0x52e92e=_0x36fa65*_0x29f8b8,_0x493bfb=(0x0==_0x36fa65&&(_0x565c8b=_0x52e92e),0x3b==_0x36fa65?_0x565c8b:(_0x36fa65+0x1)*_0x29f8b8),_0x528b78=-_0x1fea2a*_0x477a78,_0x4246b9=-(_0x1fea2a+0x1)*_0x477a78;this[_0x11a651(0x2ea)][_0x979fe]=-0x1*Math[_0x11a651(0x34b)](_0x528b78)*Math[_0x11a651(0x34b)](_0x52e92e),this[_0x11a651(0x2ea)][_0x979fe+0x1]=+Math['sin'](_0x528b78),this['pSemiSpherePos'][_0x979fe+0x2]=-0x1*Math[_0x11a651(0x34b)](_0x528b78)*Math['sin'](_0x52e92e),_0x229ce8=0.5-0.5*(0x1+_0x528b78/(_0x48e6bf/0x2))*Math[_0x11a651(0x202)](_0x52e92e),_0x386255=0.5-0.5*(0x1+_0x528b78/(_0x48e6bf/0x2))*Math[_0x11a651(0x34b)](_0x52e92e),this[_0x11a651(0x2d7)][_0x2b59f3++]=0x2*_0x386255*_0x2dc0d6+ +_0x588ab8,this[_0x11a651(0x2d7)][_0x2b59f3++]=(0x2*_0x229ce8*_0x2dc0d6+_0x5931b2*_0x89f603)/_0x89f603,_0x979fe+=0x3,this['pSemiSpherePos'][_0x979fe]=-0x1*Math['cos'](_0x4246b9)*Math[_0x11a651(0x34b)](_0x52e92e),this[_0x11a651(0x2ea)][_0x979fe+0x1]=+Math['sin'](_0x4246b9),this['pSemiSpherePos'][_0x979fe+0x2]=-0x1*Math[_0x11a651(0x34b)](_0x4246b9)*Math[_0x11a651(0x202)](_0x52e92e),_0x229ce8=0.5-0.5*(0x1+_0x4246b9/(_0x48e6bf/0x2))*Math[_0x11a651(0x202)](_0x52e92e),_0x386255=0.5-0.5*(0x1+_0x4246b9/(_0x48e6bf/0x2))*Math[_0x11a651(0x34b)](_0x52e92e),this[_0x11a651(0x2d7)][_0x2b59f3++]=0x2*_0x386255*_0x2dc0d6+ +_0x588ab8,this[_0x11a651(0x2d7)][_0x2b59f3++]=(0x2*_0x229ce8*_0x2dc0d6+_0x5931b2*_0x89f603)/_0x89f603,_0x979fe+=0x3,this[_0x11a651(0x2ea)][_0x979fe]=-0x1*Math[_0x11a651(0x34b)](_0x528b78)*Math[_0x11a651(0x34b)](_0x493bfb),this[_0x11a651(0x2ea)][_0x979fe+0x1]=+Math[_0x11a651(0x202)](_0x528b78),this[_0x11a651(0x2ea)][_0x979fe+0x2]=-0x1*Math[_0x11a651(0x34b)](_0x528b78)*Math['sin'](_0x493bfb),_0x229ce8=0.5-0.5*(0x1+_0x528b78/(_0x48e6bf/0x2))*Math[_0x11a651(0x202)](_0x493bfb),_0x386255=0.5-0.5*(0x1+_0x528b78/(_0x48e6bf/0x2))*Math[_0x11a651(0x34b)](_0x493bfb),this[_0x11a651(0x2d7)][_0x2b59f3++]=0x2*_0x386255*_0x2dc0d6+ +_0x588ab8,this[_0x11a651(0x2d7)][_0x2b59f3++]=(0x2*_0x229ce8*_0x2dc0d6+_0x5931b2*_0x89f603)/_0x89f603,_0x979fe+=0x3,this[_0x11a651(0x2ea)][_0x979fe]=-0x1*Math[_0x11a651(0x34b)](_0x528b78)*Math[_0x11a651(0x34b)](_0x493bfb),this[_0x11a651(0x2ea)][_0x979fe+0x1]=+Math[_0x11a651(0x202)](_0x528b78),this[_0x11a651(0x2ea)][_0x979fe+0x2]=-0x1*Math['cos'](_0x528b78)*Math[_0x11a651(0x202)](_0x493bfb),_0x229ce8=0.5-0.5*(0x1+_0x528b78/(_0x48e6bf/0x2))*Math['sin'](_0x493bfb),_0x386255=0.5-0.5*(0x1+_0x528b78/(_0x48e6bf/0x2))*Math[_0x11a651(0x34b)](_0x493bfb),this[_0x11a651(0x2d7)][_0x2b59f3++]=0x2*_0x386255*_0x2dc0d6+ +_0x588ab8,this[_0x11a651(0x2d7)][_0x2b59f3++]=(0x2*_0x229ce8*_0x2dc0d6+_0x5931b2*_0x89f603)/_0x89f603,_0x979fe+=0x3,this[_0x11a651(0x2ea)][_0x979fe]=-0x1*Math[_0x11a651(0x34b)](_0x4246b9)*Math[_0x11a651(0x34b)](_0x52e92e),this[_0x11a651(0x2ea)][_0x979fe+0x1]=+Math[_0x11a651(0x202)](_0x4246b9),this['pSemiSpherePos'][_0x979fe+0x2]=-0x1*Math['cos'](_0x4246b9)*Math[_0x11a651(0x202)](_0x52e92e),_0x229ce8=0.5-0.5*(0x1+_0x4246b9/(_0x48e6bf/0x2))*Math[_0x11a651(0x202)](_0x52e92e),_0x386255=0.5-0.5*(0x1+_0x4246b9/(_0x48e6bf/0x2))*Math[_0x11a651(0x34b)](_0x52e92e),this[_0x11a651(0x2d7)][_0x2b59f3++]=0x2*_0x386255*_0x2dc0d6+ +_0x588ab8,this[_0x11a651(0x2d7)][_0x2b59f3++]=(0x2*_0x229ce8*_0x2dc0d6+_0x5931b2*_0x89f603)/_0x89f603,_0x979fe+=0x3,this[_0x11a651(0x2ea)][_0x979fe]=-0x1*Math['cos'](_0x4246b9)*Math[_0x11a651(0x34b)](_0x493bfb),this[_0x11a651(0x2ea)][_0x979fe+0x1]=+Math['sin'](_0x4246b9),this[_0x11a651(0x2ea)][_0x979fe+0x2]=-0x1*Math['cos'](_0x4246b9)*Math[_0x11a651(0x202)](_0x493bfb),_0x229ce8=0.5-0.5*(0x1+_0x4246b9/(_0x48e6bf/0x2))*Math[_0x11a651(0x202)](_0x493bfb),_0x386255=0.5-0.5*(0x1+_0x4246b9/(_0x48e6bf/0x2))*Math[_0x11a651(0x34b)](_0x493bfb),this[_0x11a651(0x2d7)][_0x2b59f3++]=0x2*_0x386255*_0x2dc0d6+ +_0x588ab8,this[_0x11a651(0x2d7)][_0x2b59f3++]=(0x2*_0x229ce8*_0x2dc0d6+_0x5931b2*_0x89f603)/_0x89f603,_0x979fe+=0x3;}return this[_0x11a651(0x340)]=_0x979fe/0x3,this['nSemiSpherePosSize']=0x3,this[_0x11a651(0x406)]=0x2,_0x13949e[_0x11a651(0x4a6)];}},{'key':_0x41470a(0x41d),'value':function(_0x47413c){var _0x591aa0=_0x41470a;if(null!=this[_0x591aa0(0x2e1)])return SR_ERR_CALL_ORDER;switch(_0x47413c){case _0x3468da['SR_DE_NULL']:case _0x3468da[_0x591aa0(0x224)]:case _0x3468da[_0x591aa0(0x2b7)]:case _0x3468da['SR_DE_FISH_PTZ_FLOOR']:case _0x3468da['SR_DE_FISH_PTZ_WALL']:case _0x3468da[_0x591aa0(0x208)]:case _0x3468da[_0x591aa0(0x4f5)]:case _0x3468da['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x3468da['SR_DE_FISH_PANORAMA_FLOOR_180']:case _0x3468da[_0x591aa0(0x33c)]:return _0x13949e[_0x591aa0(0x4a6)];case _0x3468da['SR_DE_FISH_SEMISPHERE']:if(this['pCamera']=new _0x53ee33(),null==this[_0x591aa0(0x2e1)])return _0x13949e[_0x591aa0(0x37b)];this[_0x591aa0(0x2e1)]['SetFov'](_0x479a0f),this[_0x591aa0(0x2e1)][_0x591aa0(0x420)](0.02),this['pCamera'][_0x591aa0(0x3af)](0x3e8),this[_0x591aa0(0x3da)]=1.57,this[_0x591aa0(0x2e1)][_0x591aa0(0x458)](3.14-this[_0x591aa0(0x3da)]),this['fScale']=0x3,this[_0x591aa0(0x2e1)][_0x591aa0(0x26d)](this[_0x591aa0(0x44a)]);break;case _0x3468da[_0x591aa0(0x4dc)]:case _0x3468da[_0x591aa0(0x3a9)]:if(this[_0x591aa0(0x2e1)]=new _0x53ee33(),null==this['pCamera'])return _0x13949e[_0x591aa0(0x37b)];this[_0x591aa0(0x2e1)][_0x591aa0(0x3a6)](_0x479a0f),this[_0x591aa0(0x2e1)][_0x591aa0(0x420)](0.02),this[_0x591aa0(0x2e1)]['SetFar'](0x3e8),this[_0x591aa0(0x3da)]=-0.785,this['pCamera'][_0x591aa0(0x458)](-this[_0x591aa0(0x3da)]),this[_0x591aa0(0x44a)]=0x6,this['pCamera'][_0x591aa0(0x26d)](this[_0x591aa0(0x44a)]);break;case _0x3468da[_0x591aa0(0x3f3)]:case _0x3468da[_0x591aa0(0x4f9)]:if(this['pCamera']=new _0x53ee33(),null==this[_0x591aa0(0x2e1)])return _0x13949e[_0x591aa0(0x37b)];this[_0x591aa0(0x2e1)][_0x591aa0(0x43a)](!0x0),this['pCamera']['SetNear'](0.02),this['pCamera'][_0x591aa0(0x3af)](0x3e8),this[_0x591aa0(0x44a)]=0x3,this[_0x591aa0(0x2e1)][_0x591aa0(0x26d)](this[_0x591aa0(0x44a)]);break;default:return _0x13949e['SR_ERR_NOT_SUPPORT'];}return _0x13949e[_0x591aa0(0x4a6)];}},{'key':'SR_SetViewParam','value':function(_0x1fe8af,_0x595f9f){var _0x46cae3=_0x41470a;if(!this[_0x46cae3(0x367)])return _0x13949e[_0x46cae3(0x38d)];switch(_0x1fe8af){case _0x30de30:this[_0x46cae3(0x3da)]=_0x595f9f;break;case _0x4d39af:this['fRotateY']=_0x595f9f;break;case _0x1ab3fe:if(this['enDisplayEffect']==_0x3468da['SR_DE_FISH_SEMISPHERE']){if(_0x595f9f<-0.8||0x384<_0x595f9f)return _0x13949e['SR_ERR_PARAM'];}else{if((this['enDisplayEffect']==_0x3468da[_0x46cae3(0x3a9)]||this['enDisplayEffect']==_0x3468da[_0x46cae3(0x4dc)])&&(_0x595f9f<0x0||0x384<_0x595f9f))return _0x13949e[_0x46cae3(0x203)];}this[_0x46cae3(0x44a)]=_0x595f9f;break;default:return _0x13949e['SR_ERR_NOT_SUPPORT'];}return _0x13949e['SR_OK'];}},{'key':'SR_GetViewParam','value':function(_0x4441eb){var _0x5ea28a=_0x41470a;if(!this[_0x5ea28a(0x367)])return _0x13949e[_0x5ea28a(0x38d)];var _0x33a1bc=0x0;switch(_0x4441eb){case _0x30de30:_0x33a1bc=this[_0x5ea28a(0x3da)];break;case _0x4d39af:_0x33a1bc=this[_0x5ea28a(0x2a3)];break;case _0x1ab3fe:_0x33a1bc=this[_0x5ea28a(0x44a)];}return _0x33a1bc;}},{'key':_0x41470a(0x1cf),'value':function(_0x46c4c9,_0x3fd11a,_0x1dc6f8){var _0x5c215d=_0x41470a;switch(_0x1dc6f8){case _0x158a35:this[_0x5c215d(0x229)]=_0x46c4c9,this[_0x5c215d(0x252)]=_0x3fd11a;break;case _0x3b9975:this[_0x5c215d(0x46c)]=_0x46c4c9,this[_0x5c215d(0x4d5)]=_0x3fd11a;break;default:return _0x13949e[_0x5c215d(0x38d)];}return _0x13949e[_0x5c215d(0x4a6)];}},{'key':_0x41470a(0x3a7),'value':function(_0x602221,_0x550a34){var _0x2dac91=_0x41470a;switch(_0x602221){case _0x17dd0b:if(this['b3DPort'])return _0x13949e['SR_ERR_NOT_SUPPORT'];break;case _0x45c70b:if(!this[_0x2dac91(0x367)])return _0x13949e['SR_ERR_NOT_SUPPORT'];Math[_0x2dac91(0x1e6)](+_0x550a34)<_0x3e9a49?this[_0x2dac91(0x3dd)]=!0x1:this[_0x2dac91(0x3dd)]=!0x0;break;default:return _0x13949e['SR_ERR_NOT_SUPPORT'];}return _0x13949e['SR_OK'];}},{'key':_0x41470a(0x4a2),'value':function(_0xe205e6,_0x20791a){var _0x1c3566=_0x41470a;return null==this[_0x1c3566(0x292)]?_0x13949e['SR_ERR_CALL_ORDER']:this['pFishParamManager'][_0x1c3566(0x52c)](_0xe205e6,_0x20791a);}},{'key':_0x41470a(0x222),'value':function(_0x29e130,_0x2e3087){var _0x540248=_0x41470a;return null==this['pFishParamManager']?_0x13949e[_0x540248(0x2cf)]:this['pFishParamManager'][_0x540248(0x1f6)](_0x29e130,_0x2e3087);}},{'key':_0x41470a(0x235),'value':function(_0x5a6d67){var _0x55929a=_0x41470a;return null==this[_0x55929a(0x292)]?_0x13949e[_0x55929a(0x2cf)]:this[_0x55929a(0x292)][_0x55929a(0x3ca)](_0x5a6d67);}},{'key':_0x41470a(0x400),'value':function(_0x12abc9,_0x117dd9){var _0x5119f3=_0x41470a;return null==this[_0x5119f3(0x292)]?_0x13949e[_0x5119f3(0x2cf)]:this['pFishParamManager'][_0x5119f3(0x533)](_0x12abc9,_0x117dd9);}}]),_0x27b1ac;}()),_0x56d25f=(function(){var _0x194ca7=_0x99d5a2;function _0x396cfd(){var _0xc5ce7f=a0_0x1593;_0x160316(this,_0x396cfd),this[_0xc5ce7f(0x42d)]=null,this[_0xc5ce7f(0x51e)]=null,this[_0xc5ce7f(0x45f)]=0x0,this[_0xc5ce7f(0x3d7)]=0x0,this['regionSw']=0x0,this[_0xc5ce7f(0x206)]=0x0,this[_0xc5ce7f(0x1fc)]=!0x1,this['bAntialias']=!0x1,this[_0xc5ce7f(0x3fa)]=!0x1;}return _0x5a3b91(_0x396cfd,[{'key':'SR_Init','value':function(_0x4f15ab){var _0x143e71=a0_0x1593;this[_0x143e71(0x42d)]=_0x4f15ab,this['ctx']=this['canvas'][_0x143e71(0x2b2)]('2d'),this[_0x143e71(0x51e)]||console['log'](_0x143e71(0x236));}},{'key':_0x194ca7(0x28d),'value':function(_0x5f4a25){var _0x315fd6=_0x194ca7;this[_0x315fd6(0x1fc)]?this['ctx'][_0x315fd6(0x283)](_0x5f4a25,this['regionSx'],this[_0x315fd6(0x3d7)],this['regionSw'],this[_0x315fd6(0x206)],0x0,0x0,this[_0x315fd6(0x42d)][_0x315fd6(0x36f)],this['canvas'][_0x315fd6(0x483)]):this[_0x315fd6(0x51e)][_0x315fd6(0x283)](_0x5f4a25,0x0,0x0,_0x5f4a25['displayWidth'],_0x5f4a25['displayHeight'],0x0,0x0,this['canvas'][_0x315fd6(0x36f)],this[_0x315fd6(0x42d)][_0x315fd6(0x483)]);}},{'key':_0x194ca7(0x41e),'value':function(_0xfa3fbc){return 0x0;}},{'key':'SR_AddSubPort','value':function(_0x37b347){return 0x0;}},{'key':'SR_SetDisplayRect','value':function(_0x1b52b1,_0x25a882,_0x4089d7,_0x57c4c0){var _0x35e773=_0x194ca7;this['regionSx']=_0x1b52b1,this[_0x35e773(0x3d7)]=_0x25a882,this[_0x35e773(0x214)]=_0x4089d7,this[_0x35e773(0x206)]=_0x57c4c0,this[_0x35e773(0x1fc)]=!0x0;}},{'key':_0x194ca7(0x4b2),'value':function(){var _0x1354c2=_0x194ca7;this['canvas']=null,this[_0x1354c2(0x51e)]=null,this[_0x1354c2(0x45f)]=0x0,this[_0x1354c2(0x3d7)]=0x0,this[_0x1354c2(0x214)]=0x0,this[_0x1354c2(0x206)]=0x0,this[_0x1354c2(0x1fc)]=!0x1;}},{'key':_0x194ca7(0x375),'value':function(_0x2a45c5,_0x4547c6){var _0x457b41=_0x194ca7;this[_0x457b41(0x42d)][_0x457b41(0x36f)]=_0x2a45c5,this[_0x457b41(0x42d)]['height']=_0x4547c6;}},{'key':'SR_GetCanvasSize','value':function(){var _0x383cab=_0x194ca7;console[_0x383cab(0x514)](_0x383cab(0x4bb)+this[_0x383cab(0x42d)][_0x383cab(0x36f)]+_0x383cab(0x254)+this[_0x383cab(0x42d)][_0x383cab(0x483)]);}},{'key':_0x194ca7(0x49d),'value':function(_0x515c7b){var _0x3308cd=_0x194ca7;return _0x515c7b!=this[_0x3308cd(0x4a5)]?(this['bAntialias']=_0x515c7b,this['bRecreateAntia']=!0x0):this['bRecreateAntia']=!0x1,this[_0x3308cd(0x3fa)]&&(this['bAntialias']?(this[_0x3308cd(0x42d)]['width']=0x5*this[_0x3308cd(0x42d)]['width'],this[_0x3308cd(0x42d)][_0x3308cd(0x483)]=0x5*this[_0x3308cd(0x42d)][_0x3308cd(0x483)],this['canvas'][_0x3308cd(0x21e)]['transform']=_0x3308cd(0x262)):(this['canvas'][_0x3308cd(0x36f)]=this[_0x3308cd(0x42d)][_0x3308cd(0x36f)]/0x5,this[_0x3308cd(0x42d)][_0x3308cd(0x483)]=this[_0x3308cd(0x42d)][_0x3308cd(0x483)]/0x5,this[_0x3308cd(0x42d)][_0x3308cd(0x21e)]['transform']=_0x3308cd(0x51f)),this['canvas'][_0x3308cd(0x21e)]['transformOrigin']=_0x3308cd(0x2f0)),0x1;}}]),_0x396cfd;}()),_0x30e60b=(function(){var _0x22f0ab=_0x99d5a2;function _0x92cc8d(){var _0x4f934c=a0_0x1593;_0x160316(this,_0x92cc8d),this[_0x4f934c(0x3ee)]=[],this[_0x4f934c(0x45b)]=[],this[_0x4f934c(0x1ee)]=[],this[_0x4f934c(0x320)]=[],this['pPTZSetColor']=null,this[_0x4f934c(0x43d)]=[],this[_0x4f934c(0x21c)]=[],this[_0x4f934c(0x538)]=[],this[_0x4f934c(0x371)]=[],this['pBasePTZPoints']=[],this[_0x4f934c(0x3ab)]=[],this[_0x4f934c(0x47b)]=[],this[_0x4f934c(0x4bc)]=[],this[_0x4f934c(0x334)]=_0x366953,this[_0x4f934c(0x1f8)]=0x0,this[_0x4f934c(0x3aa)]=0x1,this[_0x4f934c(0x34c)]=0x0,this[_0x4f934c(0x4ed)]=0x1,this[_0x4f934c(0x40f)]=!0x1,this[_0x4f934c(0x22d)]=[],this[_0x4f934c(0x3bb)]=[],this[_0x4f934c(0x270)]=-0x1,this[_0x4f934c(0x344)]=0x0,this[_0x4f934c(0x3ae)]=[],this[_0x4f934c(0x447)]=[],this['nPTZDisplayMode']=_0x46c232;for(var _0xf4bb4d=0x0;_0xf4bb4d<0x20;++_0xf4bb4d){this[_0x4f934c(0x3ee)][_0xf4bb4d]=!0x1,this[_0x4f934c(0x447)][_0xf4bb4d]=!0x1,this['pRenderParam'][_0xf4bb4d]=[],this[_0x4f934c(0x45b)][_0xf4bb4d][_0x4f934c(0x265)]=0x1,this[_0x4f934c(0x45b)][_0xf4bb4d]['fSinH']=0x0,this[_0x4f934c(0x45b)][_0xf4bb4d][_0x4f934c(0x405)]=0x1,this[_0x4f934c(0x45b)][_0xf4bb4d]['fSinV']=0x0,this[_0x4f934c(0x45b)][_0xf4bb4d][_0x4f934c(0x314)]=0x0,this[_0x4f934c(0x45b)][_0xf4bb4d][_0x4f934c(0x3f4)]=0x0,this['pRenderParam'][_0xf4bb4d]['fRX1']=0x0,this['pRenderParam'][_0xf4bb4d][_0x4f934c(0x3aa)]=0x1,this[_0x4f934c(0x45b)][_0xf4bb4d][_0x4f934c(0x34c)]=0x0,this['pRenderParam'][_0xf4bb4d][_0x4f934c(0x4ed)]=0x1,this[_0x4f934c(0x45b)][_0xf4bb4d]['nDisplayEffect']=0x0,this[_0x4f934c(0x45b)][_0xf4bb4d]['bBlack']=!0x1,this[_0x4f934c(0x45b)][_0xf4bb4d][_0x4f934c(0x324)]=!0x1,this[_0x4f934c(0x1ee)][_0xf4bb4d]=[],this[_0x4f934c(0x1ee)][_0xf4bb4d]['nFishParamType']=0x0,this['pFishParam'][_0xf4bb4d][_0x4f934c(0x27e)]=0x0,this[_0x4f934c(0x1ee)][_0xf4bb4d][_0x4f934c(0x469)]=0x1,this[_0x4f934c(0x1ee)][_0xf4bb4d][_0x4f934c(0x2bb)]=0x0,this['pFishParam'][_0xf4bb4d][_0x4f934c(0x2e9)]=0x1,this['pFishParam'][_0xf4bb4d][_0x4f934c(0x40f)]=!0x1,this[_0x4f934c(0x1ee)][_0xf4bb4d]['bCut']=!0x1,this[_0x4f934c(0x1ee)][_0xf4bb4d][_0x4f934c(0x314)]=0x0,this[_0x4f934c(0x1ee)][_0xf4bb4d][_0x4f934c(0x3f4)]=0x0,this['pFishParam'][_0xf4bb4d][_0x4f934c(0x3d6)]=0.5,this['pFishParam'][_0xf4bb4d][_0x4f934c(0x40c)]=0.5,this[_0x4f934c(0x320)][_0xf4bb4d]=[],this[_0x4f934c(0x320)][_0xf4bb4d]['fR']=0x0,this[_0x4f934c(0x320)][_0xf4bb4d]['fG']=0x0,this['stPTZColor'][_0xf4bb4d]['fB']=0x0,this[_0x4f934c(0x320)][_0xf4bb4d]['fA']=0x0,this['nBasePTZPointNum'][_0xf4bb4d]=0x0,this[_0x4f934c(0x21c)][_0xf4bb4d]=0x0,this[_0x4f934c(0x538)][_0xf4bb4d]=0x0,this['nPTZRectNum'][_0xf4bb4d]=0x0,this[_0x4f934c(0x3ab)][_0xf4bb4d]=[],this[_0x4f934c(0x47b)][_0xf4bb4d]=[],this[_0x4f934c(0x3bb)][_0xf4bb4d]=[],this[_0x4f934c(0x22d)][_0xf4bb4d]=[];for(var _0x28d702=0x0;_0x28d702<0x4;++_0x28d702)this['pRectPoints'][_0xf4bb4d][_0x28d702]=[],this[_0x4f934c(0x47b)][_0xf4bb4d][_0x28d702]['fX']=0x0,this['pRectPoints'][_0xf4bb4d][_0x28d702]['fY']=0x0;for(var _0xbb769f=0x0;_0xbb769f<0x400;++_0xbb769f)this[_0x4f934c(0x3bb)][_0xf4bb4d][_0xbb769f]=[],this[_0x4f934c(0x3bb)][_0xf4bb4d][_0xbb769f]['fX']=0x0,this[_0x4f934c(0x3bb)][_0xf4bb4d][_0xbb769f]['fY']=0x0,this[_0x4f934c(0x22d)][_0xf4bb4d][_0xbb769f]=[],this[_0x4f934c(0x22d)][_0xf4bb4d][_0xbb769f]['fX']=0x0,this[_0x4f934c(0x22d)][_0xf4bb4d][_0xbb769f]['fY']=0x0,this[_0x4f934c(0x3ab)][_0xf4bb4d][_0xbb769f]=[],this[_0x4f934c(0x3ab)][_0xf4bb4d][_0xbb769f]['fX']=0x0,this[_0x4f934c(0x3ab)][_0xf4bb4d][_0xbb769f]['fY']=0x0;this[_0x4f934c(0x371)][_0xf4bb4d]=0x0,this[_0x4f934c(0x3ae)][_0xf4bb4d]=[];for(var _0x1897e7=0x0;_0x1897e7<0x64;++_0x1897e7)this[_0x4f934c(0x3ae)][_0xf4bb4d][_0x1897e7]=0x0;}this[_0x4f934c(0x331)]();}return _0x5a3b91(_0x92cc8d,[{'key':_0x22f0ab(0x276),'value':function(_0x56bf04){var _0x87e280=_0x22f0ab;for(var _0x2a3532=-0x1,_0x3e7f70=0x0;_0x3e7f70<0x20;++_0x3e7f70)if(0x0==this[_0x87e280(0x3ee)][_0x3e7f70]){_0x2a3532=_0x3e7f70;break;}if(-0x1!=_0x2a3532){var _0x4f8a2f=this['JudgeDisplayEffect'](_0x56bf04);if(_0x13949e[_0x87e280(0x4a6)]!=_0x4f8a2f)return this[_0x87e280(0x32d)](_0x2a3532),_0x2a3532=-0x1;if(_0x3468da['SR_DE_FISH_PANORAMA_CEILING_360']==_0x56bf04||_0x3468da[_0x87e280(0x4f5)]==_0x56bf04||_0x3468da[_0x87e280(0x2f5)]==_0x56bf04||_0x3468da[_0x87e280(0x3a8)]==_0x56bf04||_0x3468da['SR_DE_FISH_PANORAMA_WALL']==_0x56bf04||_0x3468da[_0x87e280(0x224)]==_0x56bf04){if(-0x1!=this[_0x87e280(0x270)])return this[_0x87e280(0x32d)](_0x2a3532),_0x2a3532=-0x1;this['nWndPort']=_0x2a3532;}if(!(_0x3468da[_0x87e280(0x2b7)]!=_0x56bf04&&_0x3468da[_0x87e280(0x4c2)]!=_0x56bf04&&_0x3468da['SR_DE_FISH_PTZ_WALL']!=_0x56bf04||-0x1==this[_0x87e280(0x270)]||null==this['pRenderParam'][this[_0x87e280(0x270)]]||_0x3468da[_0x87e280(0x4f5)]!=this['pRenderParam'][this[_0x87e280(0x270)]][_0x87e280(0x1fe)]&&_0x3468da[_0x87e280(0x3a8)]!=this[_0x87e280(0x45b)][this[_0x87e280(0x270)]][_0x87e280(0x1fe)]))return this[_0x87e280(0x32d)](_0x2a3532),_0x2a3532=-0x1;if(_0x3468da[_0x87e280(0x4f5)]==_0x56bf04||_0x3468da[_0x87e280(0x3a8)]==_0x56bf04){for(var _0x3cbb7b=0x0;_0x3cbb7b<0x20;++_0x3cbb7b)if(null!=this[_0x87e280(0x45b)][_0x3cbb7b]&&(_0x3468da[_0x87e280(0x2b7)]==this[_0x87e280(0x45b)][_0x3cbb7b][_0x87e280(0x1fe)]||_0x3468da[_0x87e280(0x4c2)]==this['pRenderParam'][_0x3cbb7b]['nDisplayEffect']||_0x3468da[_0x87e280(0x4bf)]==this[_0x87e280(0x45b)][_0x3cbb7b][_0x87e280(0x1fe)]))return this[_0x87e280(0x32d)](_0x2a3532),_0x2a3532=-0x1;}if(_0x3468da['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']==_0x56bf04){for(var _0x31b750=0x0;_0x31b750<0x20;++_0x31b750)if(null!=this['pRenderParam'][_0x31b750]&&_0x3468da[_0x87e280(0x26f)]==this['pRenderParam'][_0x31b750][_0x87e280(0x1fe)])return this[_0x87e280(0x32d)](_0x2a3532),_0x2a3532=-0x1;}if(_0x3468da[_0x87e280(0x26f)]==_0x56bf04){for(var _0x2938a6=0x0;_0x2938a6<0x20;++_0x2938a6)if(null!=this[_0x87e280(0x45b)][_0x2938a6]&&_0x3468da[_0x87e280(0x36e)]==this[_0x87e280(0x45b)][_0x2938a6][_0x87e280(0x1fe)])return this[_0x87e280(0x32d)](_0x2a3532),_0x2a3532=-0x1;}this[_0x87e280(0x45b)][_0x2a3532][_0x87e280(0x265)]=0x1,this[_0x87e280(0x45b)][_0x2a3532][_0x87e280(0x2ee)]=0x0,this[_0x87e280(0x45b)][_0x2a3532][_0x87e280(0x405)]=0x1,this[_0x87e280(0x45b)][_0x2a3532]['fSinH']=0x0,this['pRenderParam'][_0x2a3532][_0x87e280(0x314)]=0x0,this[_0x87e280(0x45b)][_0x2a3532][_0x87e280(0x1f8)]=this[_0x87e280(0x1f8)],this['pRenderParam'][_0x2a3532][_0x87e280(0x3aa)]=this[_0x87e280(0x3aa)],this[_0x87e280(0x45b)][_0x2a3532][_0x87e280(0x34c)]=this[_0x87e280(0x34c)],this['pRenderParam'][_0x2a3532][_0x87e280(0x4ed)]=this['fRY2'],this[_0x87e280(0x45b)][_0x2a3532]['bBlack']=this[_0x87e280(0x40f)],this['pRenderParam'][_0x2a3532][_0x87e280(0x3f4)]=0.035+0.8,this[_0x87e280(0x45b)][_0x2a3532]['nDisplayEffect']=_0x56bf04,this['pFishParam'][_0x2a3532][_0x87e280(0x314)]=this['pRenderParam'][_0x2a3532][_0x87e280(0x314)],this[_0x87e280(0x1ee)][_0x2a3532][_0x87e280(0x3d6)]=0.5,this[_0x87e280(0x1ee)][_0x2a3532][_0x87e280(0x40c)]=0.5,this[_0x87e280(0x1ee)][_0x2a3532][_0x87e280(0x27e)]=this[_0x87e280(0x45b)][_0x2a3532][_0x87e280(0x1f8)],this[_0x87e280(0x1ee)][_0x2a3532][_0x87e280(0x469)]=this['pRenderParam'][_0x2a3532][_0x87e280(0x3aa)],this[_0x87e280(0x1ee)][_0x2a3532][_0x87e280(0x2bb)]=this[_0x87e280(0x45b)][_0x2a3532][_0x87e280(0x34c)],this['pFishParam'][_0x2a3532][_0x87e280(0x2e9)]=this['pRenderParam'][_0x2a3532]['fRY2'],this[_0x87e280(0x1ee)][_0x2a3532]['bBlack']=this['pRenderParam'][_0x2a3532][_0x87e280(0x40f)],this[_0x87e280(0x1ee)][_0x2a3532][_0x87e280(0x3f4)]=(this[_0x87e280(0x45b)][_0x2a3532]['fZoom']-0.8)/0x7,this['bPortAllocated'][_0x2a3532]=!0x0;}return _0x2a3532;}},{'key':_0x22f0ab(0x32d),'value':function(_0x19122a){var _0x44bf54=_0x22f0ab;if(_0x19122a<0x0||0x20<=_0x19122a)return _0x13949e[_0x44bf54(0x203)];this[_0x44bf54(0x270)]==_0x19122a&&(this['nWndPort']=-0x1),this['pRenderParam'][_0x19122a][_0x44bf54(0x265)]=0x1,this['pRenderParam'][_0x19122a][_0x44bf54(0x2ee)]=0x0,this[_0x44bf54(0x45b)][_0x19122a][_0x44bf54(0x405)]=0x1,this['pRenderParam'][_0x19122a][_0x44bf54(0x3e0)]=0x0,this[_0x44bf54(0x45b)][_0x19122a][_0x44bf54(0x314)]=0x0,this[_0x44bf54(0x45b)][_0x19122a][_0x44bf54(0x3f4)]=0x0,this[_0x44bf54(0x45b)][_0x19122a][_0x44bf54(0x1f8)]=0x0,this[_0x44bf54(0x45b)][_0x19122a][_0x44bf54(0x3aa)]=0x1,this['pRenderParam'][_0x19122a][_0x44bf54(0x34c)]=0x0,this[_0x44bf54(0x45b)][_0x19122a][_0x44bf54(0x4ed)]=0x1,this[_0x44bf54(0x45b)][_0x19122a][_0x44bf54(0x1fe)]=0x0,this[_0x44bf54(0x45b)][_0x19122a][_0x44bf54(0x40f)]=!0x1,this[_0x44bf54(0x45b)][_0x19122a][_0x44bf54(0x324)]=!0x1,this[_0x44bf54(0x1ee)][_0x19122a][_0x44bf54(0x260)]=0x0,this[_0x44bf54(0x1ee)][_0x19122a]['fRXLeft']=0x0,this[_0x44bf54(0x1ee)][_0x19122a][_0x44bf54(0x469)]=0x1,this[_0x44bf54(0x1ee)][_0x19122a][_0x44bf54(0x2bb)]=0x0,this[_0x44bf54(0x1ee)][_0x19122a][_0x44bf54(0x2e9)]=0x1,this[_0x44bf54(0x1ee)][_0x19122a]['bBlack']=!0x1,this[_0x44bf54(0x1ee)][_0x19122a][_0x44bf54(0x324)]=!0x1,this['pFishParam'][_0x19122a]['fAngle']=0x0,this[_0x44bf54(0x1ee)][_0x19122a]['fZoom']=0x0,this[_0x44bf54(0x1ee)][_0x19122a][_0x44bf54(0x3d6)]=0.5,this['pFishParam'][_0x19122a][_0x44bf54(0x40c)]=0.5,this['nBasePTZPointNum'][_0x19122a]=0x0,this[_0x44bf54(0x21c)][_0x19122a]=0x0,this[_0x44bf54(0x538)][_0x19122a]=0x0;for(var _0x3f4ea3=this[_0x44bf54(0x4bc)][_0x19122a]=0x0;_0x3f4ea3<0x4;++_0x3f4ea3)this[_0x44bf54(0x47b)][_0x19122a][_0x3f4ea3]['fX']=0x0,this[_0x44bf54(0x47b)][_0x19122a][_0x3f4ea3]['fY']=0x0;for(var _0x3d5dd5=0x0;_0x3d5dd5<0x400;++_0x3d5dd5)this['pBasePTZPoints'][_0x19122a][_0x3d5dd5]['fX']=0x0,this[_0x44bf54(0x3bb)][_0x19122a][_0x3d5dd5]['fY']=0x0,this[_0x44bf54(0x22d)][_0x19122a][_0x3d5dd5]['fX']=0x0,this[_0x44bf54(0x22d)][_0x19122a][_0x3d5dd5]['fY']=0x0,this['pPanoPTZPoints'][_0x19122a][_0x3d5dd5]['fX']=0x0,this['pPanoPTZPoints'][_0x19122a][_0x3d5dd5]['fY']=0x0;if(null!=this[_0x44bf54(0x3eb)]&&(this[_0x44bf54(0x3eb)][_0x19122a]['fA']=0x0,this['pPTZSetColor'][_0x19122a]['fR']=0x0,this[_0x44bf54(0x3eb)][_0x19122a]['fG']=0x0,this[_0x44bf54(0x3eb)][_0x19122a]['fB']=0x0),this['bPTZSelected'][_0x19122a]=!0x1,0x0!=this['nPlaceType']){var _0x188ac5=!0x1;if(null!=this['pRenderParam'][i]){for(var _0x565c4d=0x0;_0x565c4d<0x20;++_0x565c4d)if(null!=this[_0x44bf54(0x45b)][_0x565c4d]&&(_0x3468da[_0x44bf54(0x2b7)]==this['pRenderParam'][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da['SR_DE_FISH_PTZ_FLOOR']==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da[_0x44bf54(0x4bf)]==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da[_0x44bf54(0x208)]==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da['SR_DE_FISH_PANORAMA_CEILING_180']==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da[_0x44bf54(0x2f5)]==this[_0x44bf54(0x45b)][_0x565c4d]['nDisplayEffect']||_0x3468da[_0x44bf54(0x3a8)]==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da[_0x44bf54(0x33c)]==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da[_0x44bf54(0x4dc)]==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da[_0x44bf54(0x3a9)]==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da[_0x44bf54(0x3f3)]==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da[_0x44bf54(0x4f9)]==this['pRenderParam'][_0x565c4d]['nDisplayEffect']||_0x3468da[_0x44bf54(0x36e)]==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)]||_0x3468da['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']==this[_0x44bf54(0x45b)][_0x565c4d][_0x44bf54(0x1fe)])){_0x188ac5=!0x0;break;}}_0x188ac5||(this['nPlaceType']=0x0);}for(var _0x6f6c24=!0x1,_0x2650a4=0x0;_0x2650a4<0x20;++_0x2650a4)if(null!=this['pRenderParam'][_0x2650a4]){_0x6f6c24=!0x0;break;}_0x6f6c24||(this[_0x44bf54(0x1f8)]=0x0,this[_0x44bf54(0x3aa)]=0x1,this[_0x44bf54(0x34c)]=0x0,this[_0x44bf54(0x4ed)]=0x1,this['bBlack']=!0x1);for(var _0x2d2ee9=this[_0x44bf54(0x371)][_0x19122a]=0x0;_0x2d2ee9<0x64;++_0x2d2ee9)this[_0x44bf54(0x3ae)][_0x19122a][_0x2d2ee9]=0x0;return this[_0x44bf54(0x3ee)][_0x19122a]=!0x1,_0x13949e[_0x44bf54(0x4a6)];}},{'key':'DeInit','value':function(){var _0x19548c=_0x22f0ab;for(var _0xcd4be7=0x0;_0xcd4be7<0x20;++_0xcd4be7){for(var _0x52fa88=0x0;_0x52fa88<0x4;++_0x52fa88)this[_0x19548c(0x47b)][_0xcd4be7][_0x52fa88]=null;for(var _0xcd362f=0x0;_0xcd362f<0x400;++_0xcd362f)this[_0x19548c(0x3bb)][_0xcd4be7][_0xcd362f]=null,this[_0x19548c(0x22d)][_0xcd4be7][_0xcd362f]=null,this[_0x19548c(0x3ab)][_0xcd4be7][_0xcd362f]=null;this[_0x19548c(0x371)][_0xcd4be7]=0x0,this[_0x19548c(0x3ae)][_0xcd4be7]=null,this[_0x19548c(0x3ee)][_0xcd4be7]=!0x1,this[_0x19548c(0x447)][_0xcd4be7]=!0x1,this[_0x19548c(0x45b)][_0xcd4be7]=null,this['pFishParam'][_0xcd4be7]=null,this[_0x19548c(0x320)][_0xcd4be7]=null,this[_0x19548c(0x43d)][_0xcd4be7]=0x0,this['nOriPTZPointNum'][_0xcd4be7]=0x0,this[_0x19548c(0x538)][_0xcd4be7]=0x0,this[_0x19548c(0x4bc)][_0xcd4be7]=0x0,this[_0x19548c(0x3ab)][_0xcd4be7]=null,this[_0x19548c(0x47b)][_0xcd4be7]=null,this[_0x19548c(0x3bb)][_0xcd4be7]=null,this['pOriPTZPoints'][_0xcd4be7]=null;}this[_0x19548c(0x3ee)]=null,this[_0x19548c(0x45b)]=null,this['pFishParam']=null,this[_0x19548c(0x320)]=null,this[_0x19548c(0x3eb)]=null,this['nBasePTZPointNum']=null,this['nOriPTZPointNum']=null,this[_0x19548c(0x538)]=null,this[_0x19548c(0x371)]=null,this[_0x19548c(0x3bb)]=null,this[_0x19548c(0x3ab)]=null,this[_0x19548c(0x47b)]=null,this['nPTZRectNum']=null,this['nPTZDisplayMode']=_0x366953,this['fRX1']=0x0,this['fRX2']=0x1,this['fRY1']=0x0,this[_0x19548c(0x4ed)]=0x1,this[_0x19548c(0x40f)]=!0x1,this[_0x19548c(0x22d)]=null,this[_0x19548c(0x3bb)]=null,this[_0x19548c(0x270)]=-0x1,this[_0x19548c(0x344)]=0x0,this[_0x19548c(0x3ae)]=null,this[_0x19548c(0x447)]=null,this[_0x19548c(0x334)]=_0x46c232;}},{'key':'InitColorList','value':function(){var _0x32ea58=_0x22f0ab;this[_0x32ea58(0x320)][0x0]['fR']=0.5,this[_0x32ea58(0x320)][0x0]['fG']=0.5,this['stPTZColor'][0x0]['fB']=0x0,this[_0x32ea58(0x320)][0x0]['fA']=0x1,this[_0x32ea58(0x320)][0x1]['fR']=0x1,this[_0x32ea58(0x320)][0x1]['fG']=0x0,this['stPTZColor'][0x1]['fB']=0x0,this[_0x32ea58(0x320)][0x1]['fA']=0x1,this[_0x32ea58(0x320)][0x2]['fR']=0x0,this[_0x32ea58(0x320)][0x2]['fG']=0x1,this[_0x32ea58(0x320)][0x2]['fB']=0x0,this[_0x32ea58(0x320)][0x2]['fA']=0x1,this[_0x32ea58(0x320)][0x3]['fR']=0x0,this['stPTZColor'][0x3]['fG']=0x0,this[_0x32ea58(0x320)][0x3]['fB']=0x1,this['stPTZColor'][0x3]['fA']=0x1,this[_0x32ea58(0x320)][0x4]['fR']=0x1,this['stPTZColor'][0x4]['fG']=0x1,this[_0x32ea58(0x320)][0x4]['fB']=0x0,this[_0x32ea58(0x320)][0x4]['fA']=0x1,this[_0x32ea58(0x320)][0x5]['fR']=0.5,this['stPTZColor'][0x5]['fG']=0x0,this[_0x32ea58(0x320)][0x5]['fB']=0x1,this[_0x32ea58(0x320)][0x5]['fA']=0x1,this['stPTZColor'][0x6]['fR']=0x0,this[_0x32ea58(0x320)][0x6]['fG']=0x1,this[_0x32ea58(0x320)][0x6]['fB']=0x1,this[_0x32ea58(0x320)][0x6]['fA']=0x1,this[_0x32ea58(0x320)][0x7]['fR']=0x1,this['stPTZColor'][0x7]['fG']=0.5,this[_0x32ea58(0x320)][0x7]['fB']=0x0,this[_0x32ea58(0x320)][0x7]['fA']=0x1,this[_0x32ea58(0x320)][0x8]['fR']=0x0,this['stPTZColor'][0x8]['fG']=0.5,this[_0x32ea58(0x320)][0x8]['fB']=0.5,this[_0x32ea58(0x320)][0x8]['fA']=0x1;for(var _0x4bf059=0x9;_0x4bf059<0x20;_0x4bf059++)this['stPTZColor'][_0x4bf059]['fR']=+_0x4bf059/0x20,this[_0x32ea58(0x320)][_0x4bf059]['fG']=+_0x4bf059/0x20,this[_0x32ea58(0x320)][_0x4bf059]['fB']=+_0x4bf059/0x20,this[_0x32ea58(0x320)][_0x4bf059]['fA']=0x1;return _0x13949e['SR_OK'];}},{'key':'GetRangePoints','value':function(_0x300580){var _0x1c92d6=_0x22f0ab;if(_0x300580<0x0||0x20<=_0x300580)return _0x13949e['SR_ERR_PARAM'];if(null==this[_0x1c92d6(0x45b)][_0x300580])return _0x13949e[_0x1c92d6(0x2cf)];var _0x31586b=0x0,_0x5c2563=0x0;switch(this[_0x1c92d6(0x21c)][_0x300580]=0x0,this[_0x1c92d6(0x43d)][_0x300580]=0x0,this[_0x1c92d6(0x45b)][_0x300580][_0x1c92d6(0x1fe)]){case _0x3468da['SR_DE_FISH_PTZ_CEILING']:for(_0x5c2563=0x0;_0x5c2563<0x1;_0x5c2563+=0.01)this[_0x1c92d6(0x1eb)](_0x31586b,_0x5c2563,_0x300580);for(_0x5c2563=0.9995,_0x31586b=0x0;_0x31586b<0x1;_0x31586b+=0.02)this[_0x1c92d6(0x1eb)](_0x31586b,_0x5c2563,_0x300580);for(_0x31586b=0.999,_0x5c2563=0.9995;0x0<=_0x5c2563;_0x5c2563-=0.01)this[_0x1c92d6(0x1eb)](_0x31586b,_0x5c2563,_0x300580);for(_0x5c2563=0x0,_0x31586b=0.999;0x0<=_0x31586b;_0x31586b-=0.02)this['GetFishPTZCeiling'](_0x31586b,_0x5c2563,_0x300580);break;case _0x3468da[_0x1c92d6(0x4c2)]:for(_0x5c2563=0x0;_0x5c2563<0x1;_0x5c2563+=0.01)this[_0x1c92d6(0x486)](_0x31586b,_0x5c2563,_0x300580);for(_0x5c2563=0.9995,_0x31586b=0x0;_0x31586b<0x1;_0x31586b+=0.02)this['GetFishPTZFloor'](_0x31586b,_0x5c2563,_0x300580);for(_0x31586b=0.999,_0x5c2563=0.9995;0x0<=_0x5c2563;_0x5c2563-=0.01)this['GetFishPTZFloor'](_0x31586b,_0x5c2563,_0x300580);for(_0x5c2563=0x0,_0x31586b=0.999;0x0<=_0x31586b;_0x31586b-=0.02)this['GetFishPTZFloor'](_0x31586b,_0x5c2563,_0x300580);break;case _0x3468da[_0x1c92d6(0x4bf)]:for(_0x5c2563=0x0;_0x5c2563<0x1;_0x5c2563+=0.01)this['GetFishPTZWALL'](_0x31586b,_0x5c2563,_0x300580);for(_0x5c2563=0.9995,_0x31586b=0x0;_0x31586b<0x1;_0x31586b+=0.02)this[_0x1c92d6(0x25e)](_0x31586b,_0x5c2563,_0x300580);for(_0x31586b=0.999,_0x5c2563=0.9995;0x0<=_0x5c2563;_0x5c2563-=0.01)this[_0x1c92d6(0x25e)](_0x31586b,_0x5c2563,_0x300580);for(_0x5c2563=0x0,_0x31586b=0.999;0x0<=_0x31586b;_0x31586b-=0.02)this[_0x1c92d6(0x25e)](_0x31586b,_0x5c2563,_0x300580);}return _0x13949e[_0x1c92d6(0x4a6)];}},{'key':_0x22f0ab(0x38f),'value':function(_0x1509b5){var _0x4d100a=_0x22f0ab;if(-0x1==this[_0x4d100a(0x270)])return _0x13949e[_0x4d100a(0x2cf)];if(null==this[_0x4d100a(0x3bb)][_0x1509b5]||null==this['pRenderParam'][this[_0x4d100a(0x270)]])return _0x13949e['SR_ERR_CALL_ORDER'];this[_0x4d100a(0x538)][_0x1509b5]=0x0;var _0x6702aa=_0x13949e['SR_OK'],_0x38fa33=this['nWndPort'];switch(this[_0x4d100a(0x45b)][_0x38fa33][_0x4d100a(0x1fe)]){case _0x3468da['SR_DE_FISH_PANORAMA_WALL']:if(_0x6702aa=this[_0x4d100a(0x4e2)](_0x1509b5),_0x13949e[_0x4d100a(0x4a6)]!=_0x6702aa)return _0x6702aa;break;case _0x3468da['SR_DE_FISH_PANORAMA_FLOOR_360']:if(_0x6702aa=this[_0x4d100a(0x490)](_0x1509b5),_0x13949e[_0x4d100a(0x4a6)]!=_0x6702aa)return _0x6702aa;break;case _0x3468da[_0x4d100a(0x208)]:if(_0x6702aa=this[_0x4d100a(0x220)](_0x1509b5),_0x13949e[_0x4d100a(0x4a6)]!=_0x6702aa)return _0x6702aa;break;default:return _0x13949e[_0x4d100a(0x38d)];}return this['CalcPTZFragmentPoints'](_0x1509b5),_0x13949e[_0x4d100a(0x4a6)];}},{'key':'GetRectPoints','value':function(_0x32f114){var _0x248c9f=_0x22f0ab;if(_0x32f114<0x0||0x20<=_0x32f114)return _0x13949e[_0x248c9f(0x203)];if(-0x1==this[_0x248c9f(0x270)])return _0x13949e[_0x248c9f(0x2cf)];if(null==this[_0x248c9f(0x45b)][this[_0x248c9f(0x270)]]||null==this['pFishParam'][_0x32f114])return _0x13949e[_0x248c9f(0x2cf)];var _0xefc3=this[_0x248c9f(0x45b)][this['nWndPort']]['nDisplayEffect'],_0x195b20=_0x13949e['SR_OK'],_0x3c0e67=[];switch(_0x3c0e67['fX']=0x0,_0x3c0e67['fY']=0x0,_0xefc3){case _0x3468da['SR_DE_FISH_PANORAMA_WALL']:if(_0x195b20=this[_0x248c9f(0x3bd)](_0x3c0e67,this[_0x248c9f(0x1ee)][_0x32f114][_0x248c9f(0x3d6)],this[_0x248c9f(0x1ee)][_0x32f114][_0x248c9f(0x40c)]),_0x13949e[_0x248c9f(0x4a6)]!=_0x195b20)return _0x195b20;break;case _0x3468da[_0x248c9f(0x2f5)]:if(_0x195b20=this['GetPointFish2PanoFloor'](_0x3c0e67,this[_0x248c9f(0x1ee)][_0x32f114]['fPTZX'],this[_0x248c9f(0x1ee)][_0x32f114][_0x248c9f(0x40c)]),_0x13949e[_0x248c9f(0x4a6)]!=_0x195b20)return _0x13949e['SR_ERR_NOT_SUPPORT']==_0x195b20&&(this[_0x248c9f(0x47b)][_0x32f114]=null),_0x195b20;break;case _0x3468da['SR_DE_FISH_PANORAMA_CEILING_360']:if(_0x195b20=this[_0x248c9f(0x523)](_0x3c0e67,this[_0x248c9f(0x1ee)][_0x32f114]['fPTZX'],this[_0x248c9f(0x1ee)][_0x32f114][_0x248c9f(0x40c)]),_0x13949e['SR_OK']!=_0x195b20)return _0x13949e[_0x248c9f(0x38d)]==_0x195b20&&(this[_0x248c9f(0x47b)][_0x32f114]=null),_0x195b20;break;case _0x3468da[_0x248c9f(0x224)]:_0x3c0e67['fX']=this[_0x248c9f(0x1ee)][_0x32f114]['fPTZX'],_0x3c0e67['fY']=this[_0x248c9f(0x1ee)][_0x32f114][_0x248c9f(0x40c)];break;default:return _0x13949e[_0x248c9f(0x38d)];}if(null==this[_0x248c9f(0x47b)][_0x32f114]){this['pRectPoints'][_0x32f114]=[];for(var _0x1a8285=0x0;_0x1a8285<0x4;++_0x1a8285)this[_0x248c9f(0x47b)][_0x32f114][_0x1a8285]=[],this[_0x248c9f(0x47b)][_0x32f114][_0x1a8285]['fX']=0x0,this['pRectPoints'][_0x32f114][_0x1a8285]['fY']=0x0;}return this[_0x248c9f(0x47b)][_0x32f114][0x0]['fX']=_0x3c0e67['fX']-_0x473777,this[_0x248c9f(0x47b)][_0x32f114][0x0]['fY']=_0x3c0e67['fY']-_0x473777,this[_0x248c9f(0x47b)][_0x32f114][0x1]['fX']=_0x3c0e67['fX']+_0x473777,this[_0x248c9f(0x47b)][_0x32f114][0x1]['fY']=_0x3c0e67['fY']-_0x473777,this[_0x248c9f(0x47b)][_0x32f114][0x2]['fX']=_0x3c0e67['fX']+_0x473777,this[_0x248c9f(0x47b)][_0x32f114][0x2]['fY']=_0x3c0e67['fY']+_0x473777,this[_0x248c9f(0x47b)][_0x32f114][0x3]['fX']=_0x3c0e67['fX']-_0x473777,this['pRectPoints'][_0x32f114][0x3]['fY']=_0x3c0e67['fY']+_0x473777,this[_0x248c9f(0x4bc)][_0x32f114]=0x4,_0x13949e['SR_OK'];}},{'key':_0x22f0ab(0x1eb),'value':function(_0xc4cf39,_0x3e0af4,_0x5dd1d0){var _0x3866dc=_0x22f0ab,_0x449b7d=[],_0x25a237=(_0x449b7d['fX']=0x0,_0x449b7d['fY']=0x0,[]),_0x128fe1=(_0x25a237['fX']=0x0,_0x25a237['fY']=0x0,[]),_0x8e09c3=(_0x128fe1['fX']=0x0,_0x128fe1['fY']=0x0,[]),_0x124c1c=(this['fRX2']-this[_0x3866dc(0x1f8)])/(this['fRY2']-this['fRY1']),_0x42c2aa=(this[_0x3866dc(0x1f8)]+this[_0x3866dc(0x3aa)])/0x2*0x1,_0x5ab76b=(this[_0x3866dc(0x34c)]+this[_0x3866dc(0x4ed)])/0x2*_0x124c1c,_0x48241c=(this[_0x3866dc(0x3aa)]-this['fRX1'])/0x2*0x1,_0xc4cf39=(_0x449b7d['fX']=_0x3e0af4-0.5,_0x449b7d['fY']=0.5-_0xc4cf39,_0x3e0af4=this['pRenderParam'][_0x5dd1d0]['fZoom'],_0x25a237['fX']=_0x449b7d['fX'],_0x25a237['fY']=_0x449b7d['fY']*this['pRenderParam'][_0x5dd1d0][_0x3866dc(0x405)]+_0x3e0af4*this[_0x3866dc(0x45b)][_0x5dd1d0][_0x3866dc(0x3e0)],_0x3e0af4*this[_0x3866dc(0x45b)][_0x5dd1d0][_0x3866dc(0x405)]-_0x449b7d['fY']*this[_0x3866dc(0x45b)][_0x5dd1d0][_0x3866dc(0x3e0)]),_0x3e0af4=Math[_0x3866dc(0x41c)](_0x25a237['fX']*_0x25a237['fX']+_0x25a237['fY']*_0x25a237['fY']),_0x449b7d=Math[_0x3866dc(0x41c)](_0x25a237['fX']*_0x25a237['fX']+_0x25a237['fY']*_0x25a237['fY']+_0xc4cf39*_0xc4cf39),_0xc4cf39=Math['asin'](_0x3e0af4/_0x449b7d)/1.5707963*0.5,_0x449b7d=(_0x25a237['fX']=_0xc4cf39*_0x25a237['fX']/_0x3e0af4,_0x25a237['fY']=_0xc4cf39*_0x25a237['fY']/_0x3e0af4,_0x128fe1['fX']=_0x25a237['fX']*this[_0x3866dc(0x45b)][_0x5dd1d0][_0x3866dc(0x265)]-_0x25a237['fY']*this[_0x3866dc(0x45b)][_0x5dd1d0][_0x3866dc(0x2ee)],_0x128fe1['fY']=_0x25a237['fX']*this[_0x3866dc(0x45b)][_0x5dd1d0][_0x3866dc(0x2ee)]+_0x25a237['fY']*this[_0x3866dc(0x45b)][_0x5dd1d0][_0x3866dc(0x265)],_0x8e09c3['fX']=0x2*_0x128fe1['fX']*_0x48241c+_0x42c2aa,_0x8e09c3['fY']=0x2*-_0x128fe1['fY']*_0x48241c+_0x5ab76b,this[_0x3866dc(0x43d)][_0x5dd1d0]),_0xc4cf39=(this[_0x3866dc(0x3bb)][_0x5dd1d0][_0x449b7d]['fX']=_0x128fe1['fX']+0.5,this[_0x3866dc(0x3bb)][_0x5dd1d0][_0x449b7d]['fY']=0.5-_0x128fe1['fY'],this[_0x3866dc(0x43d)][_0x5dd1d0]=this[_0x3866dc(0x43d)][_0x5dd1d0]+0x1,this[_0x3866dc(0x1f8)]<=0x0?0x0:+this[_0x3866dc(0x1f8)]),_0x3e0af4=this[_0x3866dc(0x34c)]<=0x0?0x0:this[_0x3866dc(0x34c)]*_0x124c1c,_0x25a237=0x1<=this[_0x3866dc(0x3aa)]?0x1-_0xc4cf39:+this['fRX2']-_0xc4cf39,_0x42c2aa=0x1<=this[_0x3866dc(0x4ed)]?_0x124c1c-_0x3e0af4:this[_0x3866dc(0x4ed)]*_0x124c1c-_0x3e0af4;return _0x8e09c3['fX']=(_0x8e09c3['fX']-_0xc4cf39)/_0x25a237,_0x8e09c3['fY']=(_0x8e09c3['fY']-_0x3e0af4)/_0x42c2aa,_0x8e09c3['fX']<=0x1&&_0x8e09c3['fY']<=0x1&&0x0<=_0x8e09c3['fX']&&0x0<=_0x8e09c3['fY']&&(_0x48241c=this['nOriPTZPointNum'][_0x5dd1d0],this[_0x3866dc(0x22d)][_0x5dd1d0][_0x48241c]['fX']=_0x8e09c3['fX'],this['pOriPTZPoints'][_0x5dd1d0][_0x48241c]['fY']=_0x8e09c3['fY'],this[_0x3866dc(0x21c)][_0x5dd1d0]=this[_0x3866dc(0x21c)][_0x5dd1d0]+0x1),_0x13949e[_0x3866dc(0x4a6)];}},{'key':_0x22f0ab(0x486),'value':function(_0x328e50,_0x36324b,_0x37f64a){var _0x182c99=_0x22f0ab,_0x69f57e=[],_0x874c3c=(_0x69f57e['fX']=0x0,_0x69f57e['fY']=0x0,[]),_0x52b303=(_0x874c3c['fX']=0x0,_0x874c3c['fY']=0x0,[]),_0x5e6c32=(_0x52b303['fX']=0x0,_0x52b303['fY']=0x0,[]),_0x2a6b73=(this[_0x182c99(0x3aa)]-this[_0x182c99(0x1f8)])/(this[_0x182c99(0x4ed)]-this[_0x182c99(0x34c)]),_0x569474=(this[_0x182c99(0x1f8)]+this[_0x182c99(0x3aa)])/0x2*0x1,_0x2ea78=(this[_0x182c99(0x34c)]+this['fRY2'])/0x2*_0x2a6b73,_0x3fe769=(this[_0x182c99(0x3aa)]-this['fRX1'])/0x2*0x1,_0x36324b=(_0x69f57e['fX']=_0x328e50-0.5,_0x69f57e['fY']=_0x36324b-0.5,_0x328e50=this[_0x182c99(0x45b)][_0x37f64a]['fZoom'],_0x874c3c['fX']=_0x69f57e['fX'],_0x874c3c['fY']=_0x69f57e['fY']*this[_0x182c99(0x45b)][_0x37f64a][_0x182c99(0x405)]+_0x328e50*this[_0x182c99(0x45b)][_0x37f64a][_0x182c99(0x3e0)],_0x328e50*this[_0x182c99(0x45b)][_0x37f64a]['fCosV']-_0x69f57e['fY']*this[_0x182c99(0x45b)][_0x37f64a]['fSinV']),_0x328e50=Math[_0x182c99(0x41c)](_0x874c3c['fX']*_0x874c3c['fX']+_0x874c3c['fY']*_0x874c3c['fY']),_0x69f57e=Math['sqrt'](_0x874c3c['fX']*_0x874c3c['fX']+_0x874c3c['fY']*_0x874c3c['fY']+_0x36324b*_0x36324b),_0x36324b=Math[_0x182c99(0x2c8)](_0x328e50/_0x69f57e)/1.5707963*0.5,_0x69f57e=(_0x874c3c['fX']=_0x36324b*_0x874c3c['fX']/_0x328e50,_0x874c3c['fY']=_0x36324b*_0x874c3c['fY']/_0x328e50,_0x52b303['fX']=_0x874c3c['fX']*this['pRenderParam'][_0x37f64a]['fCosH']-_0x874c3c['fY']*this[_0x182c99(0x45b)][_0x37f64a][_0x182c99(0x2ee)],_0x52b303['fY']=_0x874c3c['fX']*this[_0x182c99(0x45b)][_0x37f64a][_0x182c99(0x2ee)]+_0x874c3c['fY']*this['pRenderParam'][_0x37f64a][_0x182c99(0x265)],_0x5e6c32['fX']=0x2*_0x52b303['fX']*_0x3fe769+_0x569474,_0x5e6c32['fY']=0x2*_0x52b303['fY']*_0x3fe769+_0x2ea78,this[_0x182c99(0x43d)][_0x37f64a]),_0x36324b=(this['pBasePTZPoints'][_0x37f64a][_0x69f57e]['fX']=_0x52b303['fX']+0.5,this[_0x182c99(0x3bb)][_0x37f64a][_0x69f57e]['fY']=_0x52b303['fY']+0.5,this[_0x182c99(0x43d)][_0x37f64a]=this[_0x182c99(0x43d)][_0x37f64a]+0x1,this['fRX1']<=0x0?0x0:+this[_0x182c99(0x1f8)]),_0x328e50=this[_0x182c99(0x34c)]<=0x0?0x0:this['fRY1']*_0x2a6b73,_0x874c3c=0x1<=this['fRX2']?0x1-_0x36324b:+this[_0x182c99(0x3aa)]-_0x36324b,_0x569474=0x1<=this[_0x182c99(0x4ed)]?_0x2a6b73-_0x328e50:this[_0x182c99(0x4ed)]*_0x2a6b73-_0x328e50;return _0x5e6c32['fX']=(_0x5e6c32['fX']-_0x36324b)/_0x874c3c,_0x5e6c32['fY']=(_0x5e6c32['fY']-_0x328e50)/_0x569474,_0x5e6c32['fX']<=0x1&&_0x5e6c32['fY']<=0x1&&0x0<=_0x5e6c32['fX']&&0x0<=_0x5e6c32['fY']&&(_0x3fe769=this[_0x182c99(0x21c)][_0x37f64a],this[_0x182c99(0x22d)][_0x37f64a][_0x3fe769]['fX']=_0x5e6c32['fX'],this[_0x182c99(0x22d)][_0x37f64a][_0x3fe769]['fY']=_0x5e6c32['fY'],this[_0x182c99(0x21c)][_0x37f64a]=this[_0x182c99(0x21c)][_0x37f64a]+0x1),_0x13949e[_0x182c99(0x4a6)];}},{'key':_0x22f0ab(0x25e),'value':function(_0x22fa02,_0x2b3be5,_0x7bfbc8){var _0x45b53a=_0x22f0ab,_0x2022f3=[],_0xd1701f=(_0x2022f3['fX']=0x0,_0x2022f3['fY']=0x0,[]),_0x19ab1c=(_0xd1701f['fX']=0x0,_0xd1701f['fY']=0x0,[]),_0x4a0a53=(_0x19ab1c['fX']=0x0,_0x19ab1c['fY']=0x0,[]),_0x243f3a=(this[_0x45b53a(0x3aa)]-this[_0x45b53a(0x1f8)])/(this[_0x45b53a(0x4ed)]-this['fRY1']),_0x1233e0=(this[_0x45b53a(0x1f8)]+this[_0x45b53a(0x3aa)])/0x2*0x1,_0x2b29d7=(this['fRY1']+this[_0x45b53a(0x4ed)])/0x2*_0x243f3a,_0x3fe90d=(this[_0x45b53a(0x3aa)]-this[_0x45b53a(0x1f8)])/0x2*0x1,_0x2b3be5=(_0x2022f3['fX']=_0x2b3be5-0.5,_0x2022f3['fY']=_0x22fa02-0.5,_0x2b3be5=this[_0x45b53a(0x45b)][_0x7bfbc8]['fZoom'],_0xd1701f['fX']=_0x2022f3['fX'],_0xd1701f['fY']=_0x2022f3['fY']*this[_0x45b53a(0x45b)][_0x7bfbc8]['fCosV']+_0x2b3be5*this[_0x45b53a(0x45b)][_0x7bfbc8][_0x45b53a(0x3e0)],_0x22fa02=_0x2b3be5*this['pRenderParam'][_0x7bfbc8]['fCosV']-_0x2022f3['fY']*this['pRenderParam'][_0x7bfbc8][_0x45b53a(0x3e0)],_0x19ab1c['fX']=_0xd1701f['fX']*this[_0x45b53a(0x45b)][_0x7bfbc8][_0x45b53a(0x265)]+_0x22fa02*this[_0x45b53a(0x45b)][_0x7bfbc8][_0x45b53a(0x2ee)],_0x19ab1c['fY']=_0xd1701f['fY'],_0x22fa02*this[_0x45b53a(0x45b)][_0x7bfbc8][_0x45b53a(0x265)]-_0xd1701f['fX']*this['pRenderParam'][_0x7bfbc8]['fSinH']),_0x2022f3=Math[_0x45b53a(0x41c)](_0x19ab1c['fX']*_0x19ab1c['fX']+_0x19ab1c['fY']*_0x19ab1c['fY']),_0x22fa02=Math[_0x45b53a(0x41c)](_0x19ab1c['fX']*_0x19ab1c['fX']+_0x19ab1c['fY']*_0x19ab1c['fY']+_0x2b3be5*_0x2b3be5),_0xd1701f=Math[_0x45b53a(0x2c8)](_0x2022f3/_0x22fa02)/1.5707963*0.5,_0x2b3be5=(_0x4a0a53['fX']=_0xd1701f*_0x19ab1c['fX']/_0x2022f3*_0x3fe90d*0x2+_0x1233e0,_0x4a0a53['fY']=_0xd1701f*_0x19ab1c['fY']/_0x2022f3*_0x3fe90d*0x2+_0x2b29d7,this[_0x45b53a(0x43d)][_0x7bfbc8]),_0x22fa02=(this['pBasePTZPoints'][_0x7bfbc8][_0x2b3be5]['fX']=_0xd1701f*_0x19ab1c['fX']/_0x2022f3+0.5,this[_0x45b53a(0x3bb)][_0x7bfbc8][_0x2b3be5]['fY']=_0xd1701f*_0x19ab1c['fY']/_0x2022f3+0.5,this[_0x45b53a(0x43d)][_0x7bfbc8]=this['nBasePTZPointNum'][_0x7bfbc8]+0x1,this[_0x45b53a(0x1f8)]<=0x0?0x0:+this['fRX1']),_0x1233e0=this['fRY1']<=0x0?0x0:this[_0x45b53a(0x34c)]*_0x243f3a,_0x3fe90d=0x1<=this['fRX2']?0x1-_0x22fa02:+this[_0x45b53a(0x3aa)]-_0x22fa02,_0x2b29d7=0x1<=this[_0x45b53a(0x4ed)]?_0x243f3a-_0x1233e0:this[_0x45b53a(0x4ed)]*_0x243f3a-_0x1233e0;return _0x4a0a53['fX']=(_0x4a0a53['fX']-_0x22fa02)/_0x3fe90d,_0x4a0a53['fY']=(_0x4a0a53['fY']-_0x1233e0)/_0x2b29d7,_0x4a0a53['fX']<=0x1&&_0x4a0a53['fY']<=0x1&&0x0<=_0x4a0a53['fX']&&0x0<=_0x4a0a53['fY']&&(_0x2b3be5=this[_0x45b53a(0x21c)][_0x7bfbc8],this[_0x45b53a(0x22d)][_0x7bfbc8][_0x2b3be5]['fX']=_0x4a0a53['fX'],this[_0x45b53a(0x22d)][_0x7bfbc8][_0x2b3be5]['fY']=_0x4a0a53['fY'],this[_0x45b53a(0x21c)][_0x7bfbc8]=this[_0x45b53a(0x21c)][_0x7bfbc8]+0x1),_0x13949e['SR_OK'];}},{'key':'GetPanoPTZCeiling','value':function(_0x175dcd){var _0x4b76af=_0x22f0ab;if(null==this['pRenderParam'][_0x175dcd]||null==this[_0x4b76af(0x45b)][this[_0x4b76af(0x270)]])return _0x13949e['SR_ERR_CALL_ORDER'];if(null==this[_0x4b76af(0x3bb)][_0x175dcd])return _0x13949e[_0x4b76af(0x2cf)];var _0x2631e9,_0x4d8e0d=this[_0x4b76af(0x43d)][_0x175dcd],_0x330989=(this['fRX2']-this['fRX1'])/(this[_0x4b76af(0x4ed)]-this['fRY1']),_0x475f41=(this['fRX2']-this[_0x4b76af(0x1f8)])/0x2*0x1,_0x3fff26=0x0,_0x583088=((0x1<this[_0x4b76af(0x3aa)]||0x1<this[_0x4b76af(0x4ed)]||this[_0x4b76af(0x34c)]<0x0||this['fRX1']<0x0)&&(this[_0x4b76af(0x1f8)]<0x0&&_0x3fff26<(_0x2631e9=-this['fRX1'])&&(_0x3fff26=_0x2631e9),0x1<this['fRX2']&&_0x3fff26<(_0x2631e9=this[_0x4b76af(0x3aa)]-0x1)&&(_0x3fff26=_0x2631e9),this['fRY1']<0x0&&_0x3fff26<(_0x2631e9=-this[_0x4b76af(0x34c)]*_0x330989)&&(_0x3fff26=_0x2631e9),0x1<this['fRY2']&&_0x3fff26<(_0x2631e9=(this['fRY2']-0x1)*_0x330989)&&(_0x3fff26=_0x2631e9)),_0x3fff26/_0x475f41),_0x5bc94b=[],_0x305081=(_0x5bc94b['fX']=0x0,_0x5bc94b['fY']=0x0,[]);_0x305081['fX']=0x0;for(var _0x54c260,_0xa064c6,_0x57afb4,_0x1b589d,_0x2cfa31=_0x305081['fY']=0x0;_0x2cfa31<_0x4d8e0d;++_0x2cfa31)_0x305081['fX']=this[_0x4b76af(0x3bb)][_0x175dcd][_0x2cfa31]['fX'],_0x305081['fY']=this[_0x4b76af(0x3bb)][_0x175dcd][_0x2cfa31]['fY'],Math[_0x4b76af(0x1e6)](_0x305081['fX']-0.5)<_0x3e9a49&&Math[_0x4b76af(0x1e6)](_0x305081['fY']-0.5)<_0x3e9a49||((_0x57afb4=[])['fX']=0x0,_0x57afb4['fY']=0x0,(_0x54c260=[])['fX']=0x0,_0x54c260['fY']=0x0,_0x57afb4['fX']=_0x305081['fX']-0.5,_0x57afb4['fY']=_0x305081['fY']-0.5,_0x54c260['fX']=-0.5*Math[_0x4b76af(0x202)](this['pRenderParam'][this['nWndPort']][_0x4b76af(0x314)]),_0x54c260['fY']=0.5*Math['cos'](this[_0x4b76af(0x45b)][this[_0x4b76af(0x270)]][_0x4b76af(0x314)]),_0xa064c6=Math['sqrt'](_0x57afb4['fX']*_0x57afb4['fX']+_0x57afb4['fY']*_0x57afb4['fY']),_0x1b589d=Math['sqrt'](_0x54c260['fX']*_0x54c260['fX']+_0x54c260['fY']*_0x54c260['fY']),_0x1b589d=Math[_0x4b76af(0x432)]((_0x57afb4['fX']*_0x54c260['fX']+_0x57afb4['fY']*_0x54c260['fY'])/(_0xa064c6*_0x1b589d)),0x0<_0x57afb4['fX']*_0x54c260['fY']-_0x57afb4['fY']*_0x54c260['fX']&&(_0x1b589d=6.2831852-_0x1b589d),_0x5bc94b['fX']=_0x1b589d/6.2831853,_0x5bc94b['fY']=(0x2*(0.5-_0xa064c6)-_0x583088)/(0.8-_0x583088),0x0<=_0x5bc94b['fY']&&0x0<=_0x5bc94b['fX']&&_0x5bc94b['fY']<=0x1&&_0x5bc94b['fX']<=0x1&&(_0x57afb4=this[_0x4b76af(0x538)][_0x175dcd],this['pPanoPTZPoints'][_0x175dcd][_0x57afb4]['fX']=_0x5bc94b['fX'],this[_0x4b76af(0x3ab)][_0x175dcd][_0x57afb4]['fY']=_0x5bc94b['fY'],this[_0x4b76af(0x538)][_0x175dcd]=this[_0x4b76af(0x538)][_0x175dcd]+0x1));return _0x13949e[_0x4b76af(0x4a6)];}},{'key':'GetPanoPTZFloor','value':function(_0x8dcfbf){var _0x4f4c24=_0x22f0ab;if(null==this['pRenderParam'][_0x8dcfbf]||null==this[_0x4f4c24(0x45b)][this[_0x4f4c24(0x270)]])return _0x13949e['SR_ERR_CALL_ORDER'];if(null==this['pBasePTZPoints'][_0x8dcfbf])return _0x13949e[_0x4f4c24(0x2cf)];var _0x1f3af0,_0x41fad2=this[_0x4f4c24(0x43d)][_0x8dcfbf],_0x124557=(this[_0x4f4c24(0x3aa)]-this[_0x4f4c24(0x1f8)])/(this[_0x4f4c24(0x4ed)]-this[_0x4f4c24(0x34c)]),_0x54b645=(this['fRX2']-this[_0x4f4c24(0x1f8)])/0x2*0x1,_0x3c5ce1=0x0,_0x446175=((0x1<this[_0x4f4c24(0x3aa)]||0x1<this[_0x4f4c24(0x4ed)]||this[_0x4f4c24(0x34c)]<0x0||this[_0x4f4c24(0x1f8)]<0x0)&&(this[_0x4f4c24(0x1f8)]<0x0&&_0x3c5ce1<(_0x1f3af0=-this[_0x4f4c24(0x1f8)])&&(_0x3c5ce1=_0x1f3af0),0x1<this['fRX2']&&_0x3c5ce1<(_0x1f3af0=this['fRX2']-0x1)&&(_0x3c5ce1=_0x1f3af0),this[_0x4f4c24(0x34c)]<0x0&&_0x3c5ce1<(_0x1f3af0=-this[_0x4f4c24(0x34c)]*_0x124557)&&(_0x3c5ce1=_0x1f3af0),0x1<this[_0x4f4c24(0x4ed)]&&_0x3c5ce1<(_0x1f3af0=(this[_0x4f4c24(0x4ed)]-0x1)*_0x124557)&&(_0x3c5ce1=_0x1f3af0)),_0x3c5ce1/_0x54b645),_0xb401bf=[],_0x7470e2=(_0xb401bf['fX']=0x0,_0xb401bf['fY']=0x0,[]);_0x7470e2['fX']=0x0;for(var _0x95d1ca,_0x436efe,_0x452569,_0x56a612,_0x2b996d=_0x7470e2['fY']=0x0;_0x2b996d<_0x41fad2;++_0x2b996d)_0x7470e2['fX']=this['pBasePTZPoints'][_0x8dcfbf][_0x2b996d]['fX'],_0x7470e2['fY']=this['pBasePTZPoints'][_0x8dcfbf][_0x2b996d]['fY'],Math[_0x4f4c24(0x1e6)](_0x7470e2['fX']-0.5)<_0x3e9a49&&Math[_0x4f4c24(0x1e6)](_0x7470e2['fY']-0.5)<_0x3e9a49||((_0x452569=[])['fX']=0x0,_0x452569['fY']=0x0,(_0x95d1ca=[])['fX']=0x0,_0x95d1ca['fY']=0x0,_0x452569['fX']=_0x7470e2['fX']-0.5,_0x452569['fY']=_0x7470e2['fY']-0.5,_0x95d1ca['fX']=-0.5*Math[_0x4f4c24(0x202)](this['pRenderParam'][this['nWndPort']][_0x4f4c24(0x314)]),_0x95d1ca['fY']=0.5*Math[_0x4f4c24(0x34b)](this[_0x4f4c24(0x45b)][this[_0x4f4c24(0x270)]][_0x4f4c24(0x314)]),_0x436efe=Math[_0x4f4c24(0x41c)](_0x452569['fX']*_0x452569['fX']+_0x452569['fY']*_0x452569['fY']),_0x56a612=Math[_0x4f4c24(0x41c)](_0x95d1ca['fX']*_0x95d1ca['fX']+_0x95d1ca['fY']*_0x95d1ca['fY']),_0x56a612=Math['acos']((_0x452569['fX']*_0x95d1ca['fX']+_0x452569['fY']*_0x95d1ca['fY'])/(_0x436efe*_0x56a612)),0x0<_0x452569['fX']*_0x95d1ca['fY']-_0x452569['fY']*_0x95d1ca['fX']&&(_0x56a612=6.2831852-_0x56a612),_0xb401bf['fX']=0x1-_0x56a612/6.2831853,_0xb401bf['fY']=0x1-(0x2*(0.5-_0x436efe)-_0x446175)/(0.8-_0x446175),0x0<=_0xb401bf['fY']&&0x0<=_0xb401bf['fX']&&_0xb401bf['fY']<=0x1&&_0xb401bf['fX']<=0x1&&(_0x452569=this[_0x4f4c24(0x538)][_0x8dcfbf],this['pPanoPTZPoints'][_0x8dcfbf][_0x452569]['fX']=_0xb401bf['fX'],this['pPanoPTZPoints'][_0x8dcfbf][_0x452569]['fY']=_0xb401bf['fY'],this[_0x4f4c24(0x538)][_0x8dcfbf]=this[_0x4f4c24(0x538)][_0x8dcfbf]+0x1));return _0x13949e['SR_OK'];}},{'key':_0x22f0ab(0x4e2),'value':function(_0x40ad31){var _0x265690=_0x22f0ab;if(null==this[_0x265690(0x45b)][_0x40ad31]||null==this['pRenderParam'][this[_0x265690(0x270)]])return _0x13949e[_0x265690(0x2cf)];if(null==this[_0x265690(0x3bb)][_0x40ad31])return _0x13949e[_0x265690(0x2cf)];var _0x2319a0,_0x266be0=this[_0x265690(0x43d)][_0x40ad31],_0x501f9a=(this['fRX2']-this[_0x265690(0x1f8)])/(this[_0x265690(0x4ed)]-this[_0x265690(0x34c)]),_0x550125=(this['fRX2']-this[_0x265690(0x1f8)])/0x2*0x1,_0x4d5753=0x0,_0x1948bd=0x1,_0x579887=0.1,_0x1bd7c9=0.9,_0x1d1cca=(this[_0x265690(0x1f8)]<0x0&&(_0x2319a0=-this['fRX1'],_0x4d5753=_0x2319a0/=0x2*_0x550125),0x1<this[_0x265690(0x3aa)]&&(_0x2319a0=this[_0x265690(0x3aa)]-0x1,_0x1948bd=0x1-(_0x2319a0/=0x2*_0x550125)),this['fRY1']<0x0&&(_0x2319a0=-this[_0x265690(0x34c)]*_0x501f9a,_0x579887=0.1<(_0x2319a0/=0x2*_0x550125)?_0x2319a0:0.1),0x1<this[_0x265690(0x4ed)]&&(_0x2319a0=(this[_0x265690(0x4ed)]-0x1)*_0x501f9a,_0x1bd7c9=0x1-0.9<(_0x2319a0/=0x2*_0x550125)?0x1-_0x2319a0:0.9),[]),_0x90f489=(_0x1d1cca['fX']=0x0,_0x1d1cca['fY']=0x0,[]);_0x90f489['fX']=0x0;for(var _0x47c336=_0x90f489['fY']=0x0;_0x47c336<_0x266be0;++_0x47c336){_0x90f489['fX']=this[_0x265690(0x3bb)][_0x40ad31][_0x47c336]['fX'],_0x90f489['fY']=this[_0x265690(0x3bb)][_0x40ad31][_0x47c336]['fY'];var _0x17b290=0x2*_0x90f489['fX']*_0x550125,_0x14ab03=0x2*_0x90f489['fY']*_0x550125,_0x30823c=Math[_0x265690(0x41c)](_0x550125*_0x550125-(_0x14ab03-_0x550125)*(_0x14ab03-_0x550125));Math[_0x265690(0x1e6)](_0x30823c)<_0x3e9a49||(_0x90f489['fX']=_0x550125*(_0x17b290-_0x550125)/_0x30823c+_0x550125,_0x90f489['fY']=_0x14ab03,_0x1d1cca['fX']=(_0x90f489['fX']-0x2*_0x4d5753*_0x550125)/(0x2*(_0x1948bd-_0x4d5753)*_0x550125),_0x1d1cca['fY']=(_0x90f489['fY']-0x2*_0x579887*_0x550125)/(0x2*(_0x1bd7c9-_0x579887)*_0x550125),0x0<=_0x1d1cca['fY']&&0x0<=_0x1d1cca['fX']&&_0x1d1cca['fY']<=0x1&&_0x1d1cca['fX']<=0x1&&(_0x17b290=this['nPanoPTZPointNum'][_0x40ad31],this[_0x265690(0x3ab)][_0x40ad31][_0x17b290]['fX']=_0x1d1cca['fX'],this['pPanoPTZPoints'][_0x40ad31][_0x17b290]['fY']=_0x1d1cca['fY'],this['nPanoPTZPointNum'][_0x40ad31]=this[_0x265690(0x538)][_0x40ad31]+0x1));}return _0x13949e[_0x265690(0x4a6)];}},{'key':_0x22f0ab(0x1d9),'value':function(_0x70619e,_0x3be3a2,_0x11f844){var _0x48c64e=_0x22f0ab;if(null==_0x70619e||null==this[_0x48c64e(0x45b)][this[_0x48c64e(0x270)]])return _0x13949e[_0x48c64e(0x2cf)];var _0x15aba3=(this[_0x48c64e(0x3aa)]-this['fRX1'])/(this[_0x48c64e(0x4ed)]-this[_0x48c64e(0x34c)]),_0x51f570=(this[_0x48c64e(0x3aa)]-this['fRX1'])/0x2*0x1,_0x40a1ba=0x0,_0x15aba3=((0x1<this[_0x48c64e(0x3aa)]||0x1<this[_0x48c64e(0x4ed)]||this['fRX1']<0x0||this['fRY1']<0x0)&&(this['fRX1']<0x0&&_0x40a1ba<(_0x186799=-this[_0x48c64e(0x1f8)])&&(_0x40a1ba=_0x186799),0x1<this[_0x48c64e(0x3aa)]&&_0x40a1ba<(_0x186799=this[_0x48c64e(0x3aa)]-0x1)&&(_0x40a1ba=_0x186799),this[_0x48c64e(0x34c)]<0x0&&_0x40a1ba<(_0x186799=-this[_0x48c64e(0x34c)]*_0x15aba3)&&(_0x40a1ba=_0x186799),0x1<this[_0x48c64e(0x4ed)]&&_0x40a1ba<(_0x186799=(this[_0x48c64e(0x4ed)]-0x1)*_0x15aba3)&&(_0x40a1ba=_0x186799)),_0x40a1ba/_0x51f570),_0x186799=[];if(Math[_0x48c64e(0x1e6)](_0x3be3a2-0.5)<_0x3e9a49&&Math[_0x48c64e(0x1e6)](_0x11f844-0.5)<_0x3e9a49)return _0x13949e[_0x48c64e(0x38d)];return _0x40a1ba=[],_0x40a1ba['fX']=0x0,_0x40a1ba['fY']=0x0,_0x51f570=[],_0x51f570['fX']=0x0,_0x40a1ba['fX']=_0x3be3a2-0.5,_0x40a1ba['fY']=_0x11f844-0.5,_0x51f570['fX']=-0.5*Math['sin'](this['pRenderParam'][this[_0x48c64e(0x270)]][_0x48c64e(0x314)]),_0x51f570['fY']=0.5*Math[_0x48c64e(0x34b)](this[_0x48c64e(0x45b)][this[_0x48c64e(0x270)]][_0x48c64e(0x314)]),_0x3be3a2=Math[_0x48c64e(0x41c)](_0x40a1ba['fX']*_0x40a1ba['fX']+_0x40a1ba['fY']*_0x40a1ba['fY']),_0x11f844=Math['sqrt'](_0x51f570['fX']*_0x51f570['fX']+_0x51f570['fY']*_0x51f570['fY']),_0x11f844=Math[_0x48c64e(0x432)]((_0x40a1ba['fX']*_0x51f570['fX']+_0x40a1ba['fY']*_0x51f570['fY'])/(_0x3be3a2*_0x11f844)),(0x0<_0x40a1ba['fX']*_0x51f570['fY']-_0x40a1ba['fY']*_0x51f570['fX']&&(_0x11f844=6.2831852-_0x11f844),_0x186799['fX']=_0x11f844/6.2861853,_0x186799['fY']=(0x2*(0.5-_0x3be3a2)-_0x15aba3)/(0.8-_0x15aba3),0x0<=_0x186799['fY']&&0x0<=_0x186799['fX']&&_0x186799['fY']<=0x1&&_0x186799['fX']<=0x1?(_0x70619e['fX']=_0x186799['fX'],_0x70619e['fY']=_0x186799['fY'],_0x13949e[_0x48c64e(0x4a6)]):_0x13949e[_0x48c64e(0x203)]);}},{'key':_0x22f0ab(0x510),'value':function(_0x1260ad,_0x6e91ea,_0x412b2f){var _0x3b1220=_0x22f0ab;if(null==this[_0x3b1220(0x45b)][this[_0x3b1220(0x270)]])return _0x13949e[_0x3b1220(0x2cf)];if(null==_0x1260ad)return _0x13949e[_0x3b1220(0x203)];var _0x346002=(this['fRX2']-this[_0x3b1220(0x1f8)])/(this['fRY2']-this['fRY1']),_0x47c81f=(this[_0x3b1220(0x3aa)]-this['fRX1'])/0x2*0x1,_0x4dcf12=0x0,_0x5ef05d=0x1,_0x48221e=0x0,_0x29a943=0x1,_0x6c8a76=0x0,_0x346002=((0x1<this[_0x3b1220(0x3aa)]||0x1<this[_0x3b1220(0x4ed)]||this[_0x3b1220(0x1f8)]<0x0||this[_0x3b1220(0x34c)]<0x0)&&(this[_0x3b1220(0x1f8)]<0x0&&(_0x6c8a76<(_0x1e9f9f=-this[_0x3b1220(0x1f8)])&&(_0x6c8a76=_0x1e9f9f),_0x4dcf12=_0x1e9f9f/=0x2*_0x47c81f),0x1<this[_0x3b1220(0x3aa)]&&(_0x6c8a76<(_0x1e9f9f=this[_0x3b1220(0x3aa)]-0x1)&&(_0x6c8a76=_0x1e9f9f),_0x5ef05d=0x1-(_0x1e9f9f/=0x2*_0x47c81f)),this['fRY1']<0x0&&(_0x6c8a76<(_0x1e9f9f=-this[_0x3b1220(0x34c)]*_0x346002)&&(_0x6c8a76=_0x1e9f9f),_0x48221e=_0x1e9f9f/=0x2*_0x47c81f),0x1<this[_0x3b1220(0x4ed)]&&(_0x6c8a76<(_0x1e9f9f=(this[_0x3b1220(0x4ed)]-0x1)*_0x346002)&&(_0x6c8a76=_0x1e9f9f),_0x29a943=0x1-(_0x1e9f9f/=0x2*_0x47c81f))),_0x6c8a76/_0x47c81f),_0x1e9f9f=[],_0x6c8a76=[];return _0x1e9f9f['fX']=0x1-_0x6e91ea,_0x1e9f9f['fY']=(0.8-_0x346002)*(0x1-_0x412b2f)+_0x346002,_0x47c81f=6.2831853*_0x1e9f9f['fX']+this['pRenderParam'][this['nWndPort']][_0x3b1220(0x314)],_0x6e91ea=0.5*(0x1-_0x1e9f9f['fY']),_0x6c8a76['fX']=0.5-_0x6e91ea*Math['sin'](_0x47c81f),_0x6c8a76['fY']=0.5+_0x6e91ea*Math[_0x3b1220(0x34b)](_0x47c81f),_0x6c8a76['fX']=(_0x6c8a76['fX']-_0x4dcf12)/(_0x5ef05d-_0x4dcf12),_0x6c8a76['fY']=(_0x6c8a76['fY']-_0x48221e)/(_0x29a943-_0x48221e),_0x1260ad['fX']=_0x6c8a76['fX'],_0x1260ad['fY']=_0x6c8a76['fY'],_0x13949e[_0x3b1220(0x4a6)];}},{'key':_0x22f0ab(0x548),'value':function(_0x42c74f,_0x3186d2,_0x308acc){var _0x3017de=_0x22f0ab;if(null==this[_0x3017de(0x45b)][this[_0x3017de(0x270)]])return _0x13949e[_0x3017de(0x2cf)];if(null==_0x42c74f)return _0x13949e['SR_ERR_PARAM'];var _0x15a2de=(this[_0x3017de(0x3aa)]-this[_0x3017de(0x1f8)])/(this['fRY2']-this[_0x3017de(0x34c)]),_0x5c8031=(this['fRX2']-this[_0x3017de(0x1f8)])/0x2*0x1,_0xbfd907=0x0,_0x23a02c=0x1,_0x405ea8=0.1,_0xf4bbd3=0.9,_0x15a2de=(this['fRX1']<0x0&&(_0x37ddc3=-this['fRX1'],_0xbfd907=_0x37ddc3/=0x2*_0x5c8031),0x1<this[_0x3017de(0x3aa)]&&(_0x37ddc3=this['fRX2']-0x1,_0x23a02c=0x1-(_0x37ddc3/=0x2*_0x5c8031)),this[_0x3017de(0x34c)]<0x0&&(_0x37ddc3=-this[_0x3017de(0x34c)]*_0x15a2de,_0x405ea8=0.1<(_0x37ddc3/=0x2*_0x5c8031)?_0x37ddc3:0.1),0x1<this[_0x3017de(0x4ed)]&&(_0x37ddc3=(this[_0x3017de(0x4ed)]-0x1)*_0x15a2de,_0xf4bbd3=0x1-0.9<(_0x37ddc3/=0x2*_0x5c8031)?0x1-_0x37ddc3:0.9),[]),_0x37ddc3=0x2*_0x3186d2*_0x5c8031,_0x23c0bb=0x2*_0x308acc*_0x5c8031,_0x1fe403=Math[_0x3017de(0x41c)](_0x5c8031*_0x5c8031-(_0x23c0bb-_0x5c8031)*(_0x23c0bb-_0x5c8031));return Math[_0x3017de(0x1e6)](_0x1fe403)<_0x3e9a49?_0x13949e['SR_ERR_PARAM']:(_0x308acc=_0x23c0bb,_0x15a2de['fX']=((_0x3186d2=_0x5c8031*(_0x37ddc3-_0x5c8031)/_0x1fe403+_0x5c8031)-0x2*_0xbfd907*_0x5c8031)/(0x2*(_0x23a02c-_0xbfd907)*_0x5c8031),_0x15a2de['fY']=(_0x308acc-0x2*_0x405ea8*_0x5c8031)/(0x2*(_0xf4bbd3-_0x405ea8)*_0x5c8031),0x0<=_0x15a2de['fY']&&0x0<=_0x15a2de['fX']&&_0x15a2de['fY']<=0x1&&_0x15a2de['fX']<=0x1?(_0x42c74f['fX']=_0x15a2de['fX'],_0x42c74f['fY']=_0x15a2de['fY'],_0x13949e[_0x3017de(0x4a6)]):_0x13949e[_0x3017de(0x203)]);}},{'key':'UpdatePTZPosition','value':function(_0x3b30a6,_0x7f0329,_0x2cae23){var _0x147548=_0x22f0ab;if(null==this['pRenderParam'][_0x3b30a6])return _0x13949e[_0x147548(0x2cf)];var _0x265c03=[],_0x53303d=(_0x265c03[_0x147548(0x1e2)]=0x0,_0x265c03[_0x147548(0x25f)]=0x0,_0x265c03[_0x147548(0x528)]=0x0,_0x265c03[_0x147548(0x299)]=0x0,_0x13949e[_0x147548(0x4a6)]);if(_0x3468da['SR_DE_FISH_PTZ_FLOOR']==this[_0x147548(0x45b)][_0x3b30a6]['nDisplayEffect']||_0x3468da[_0x147548(0x2b7)]==this[_0x147548(0x45b)][_0x3b30a6][_0x147548(0x1fe)]){if((_0x53303d=this[_0x147548(0x207)](_0x7f0329,_0x2cae23,_0x265c03,this[_0x147548(0x45b)][_0x3b30a6][_0x147548(0x1fe)]))!=_0x13949e[_0x147548(0x4a6)])return _0x53303d;}else{if(_0x3468da[_0x147548(0x4bf)]!=this[_0x147548(0x45b)][_0x3b30a6][_0x147548(0x1fe)])return _0x13949e['SR_ERR_NOT_SUPPORT'];if((_0x53303d=this[_0x147548(0x525)](_0x7f0329,_0x2cae23,_0x265c03))!=_0x13949e[_0x147548(0x4a6)])return _0x53303d;}return 0x0==this[_0x147548(0x2ac)](this[_0x147548(0x1f8)],this[_0x147548(0x3aa)],this[_0x147548(0x34c)],this[_0x147548(0x4ed)],_0x265c03,this[_0x147548(0x45b)][_0x3b30a6]['fZoom'],this[_0x147548(0x45b)][_0x3b30a6][_0x147548(0x1fe)])?_0x13949e[_0x147548(0x203)]:(this[_0x147548(0x45b)][_0x3b30a6][_0x147548(0x265)]=_0x265c03[_0x147548(0x25f)],this[_0x147548(0x45b)][_0x3b30a6][_0x147548(0x2ee)]=_0x265c03[_0x147548(0x1e2)],this[_0x147548(0x45b)][_0x3b30a6][_0x147548(0x405)]=_0x265c03[_0x147548(0x299)],this[_0x147548(0x45b)][_0x3b30a6][_0x147548(0x3e0)]=_0x265c03[_0x147548(0x528)],_0x13949e['SR_OK']);}},{'key':'JudgeDisplayEffect','value':function(_0x10e182){var _0xae0cd8=_0x22f0ab,_0x4f9b01=0x0;switch(_0x4f9b01){case 0x0:return _0x4f9b01=this[_0xae0cd8(0x4f3)](_0x10e182),0x4==this['nPlaceType']&&(this['nPlaceType']=0x0),_0x13949e[_0xae0cd8(0x4a6)];case 0x3:return(_0x4f9b01=this[_0xae0cd8(0x4f3)](_0x10e182))==this[_0xae0cd8(0x344)]||0x4==this['nPlaceType']?_0x13949e[_0xae0cd8(0x4a6)]:_0x13949e[_0xae0cd8(0x38d)];case 0x2:case 0x1:return(_0x4f9b01=this['GetPlaceType'](_0x10e182))==this[_0xae0cd8(0x344)]||0x4==_0x4f9b01?_0x13949e['SR_OK']:_0x13949e[_0xae0cd8(0x38d)];default:return _0x13949e[_0xae0cd8(0x38d)];}return _0x13949e['SR_ERR_NOT_SUPPORT'];}},{'key':_0x22f0ab(0x4f3),'value':function(_0x1e0375){var _0x375394=_0x22f0ab;switch(_0x1e0375){case _0x3468da['SR_DE_FISH_PTZ_CEILING']:case _0x3468da[_0x375394(0x208)]:case _0x3468da[_0x375394(0x4f5)]:case _0x3468da['SR_DE_FISH_CYLINDER_CEILING']:case _0x3468da[_0x375394(0x3f3)]:return 0x3;case _0x3468da[_0x375394(0x4c2)]:case _0x3468da[_0x375394(0x2f5)]:case _0x3468da[_0x375394(0x2d3)]:case _0x3468da[_0x375394(0x3a9)]:case _0x3468da['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:return 0x2;case _0x3468da[_0x375394(0x4bf)]:case _0x3468da[_0x375394(0x33c)]:case _0x3468da['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:case _0x3468da[_0x375394(0x26f)]:return 0x1;case _0x3468da['SR_DE_FISH_SEMISPHERE']:case _0x3468da['SR_DE_FISH_ORIGINAL']:case _0x3468da['SR_DE_FISH_PLANET']:case _0x3468da[_0x375394(0x4c9)]:case _0x3468da[_0x375394(0x4dd)]:return 0x4;default:return 0x0;}return 0x0;}},{'key':_0x22f0ab(0x323),'value':function(_0x4e7581,_0x20c108){var _0x7b4ead=_0x22f0ab;if(_0x4e7581<0x0||0x20<=_0x4e7581)return _0x13949e['SR_ERR_PARAM'];if(null==_0x20c108)return _0x13949e[_0x7b4ead(0x203)];if(null==this[_0x7b4ead(0x45b)][_0x4e7581])return _0x13949e[_0x7b4ead(0x2cf)];var _0x516513=_0x13949e['SR_OK'];switch(_0x20c108[_0x7b4ead(0x260)]){case _0x3b5c80:if((_0x516513=this[_0x7b4ead(0x4e7)](_0x20c108[_0x7b4ead(0x27e)],_0x20c108[_0x7b4ead(0x469)],_0x20c108[_0x7b4ead(0x2bb)],_0x20c108['fRYBottom']))!=_0x13949e[_0x7b4ead(0x4a6)])return _0x516513;this[_0x7b4ead(0x45b)][_0x4e7581]['bCut']=_0x20c108[_0x7b4ead(0x324)],this['bBlack']=_0x20c108[_0x7b4ead(0x40f)];break;case _0x1e8e38:if(_0x3468da[_0x7b4ead(0x208)]!=this[_0x7b4ead(0x45b)][_0x4e7581][_0x7b4ead(0x1fe)]&&_0x3468da[_0x7b4ead(0x4f5)]!=this[_0x7b4ead(0x45b)][_0x4e7581][_0x7b4ead(0x1fe)]&&_0x3468da[_0x7b4ead(0x2f5)]!=this[_0x7b4ead(0x45b)][_0x4e7581][_0x7b4ead(0x1fe)]&&_0x3468da['SR_DE_FISH_PANORAMA_FLOOR_180']!=this[_0x7b4ead(0x45b)][_0x4e7581][_0x7b4ead(0x1fe)])return _0x13949e[_0x7b4ead(0x38d)];if((_0x516513=this[_0x7b4ead(0x2c0)](_0x4e7581,_0x20c108[_0x7b4ead(0x314)]))!=_0x13949e[_0x7b4ead(0x4a6)])return _0x516513;this[_0x7b4ead(0x1ee)][_0x4e7581][_0x7b4ead(0x314)]=_0x20c108['fAngle'];break;case _0x2b1fa6:if(_0x3468da[_0x7b4ead(0x4bf)]!=this['pRenderParam'][_0x4e7581][_0x7b4ead(0x1fe)]&&_0x3468da[_0x7b4ead(0x2b7)]!=this[_0x7b4ead(0x45b)][_0x4e7581][_0x7b4ead(0x1fe)]&&_0x3468da[_0x7b4ead(0x4c2)]!=this['pRenderParam'][_0x4e7581]['nDisplayEffect'])return _0x13949e['SR_ERR_NOT_SUPPORT'];if((_0x516513=this[_0x7b4ead(0x28c)](_0x4e7581,_0x20c108[_0x7b4ead(0x3f4)]))!=_0x13949e[_0x7b4ead(0x4a6)])return _0x516513;this['pFishParam'][_0x4e7581][_0x7b4ead(0x3f4)]=_0x20c108[_0x7b4ead(0x3f4)];break;case _0x1d678a:if(_0x3468da[_0x7b4ead(0x4bf)]!=this[_0x7b4ead(0x45b)][_0x4e7581][_0x7b4ead(0x1fe)]&&_0x3468da[_0x7b4ead(0x2b7)]!=this[_0x7b4ead(0x45b)][_0x4e7581]['nDisplayEffect']&&_0x3468da[_0x7b4ead(0x4c2)]!=this['pRenderParam'][_0x4e7581][_0x7b4ead(0x1fe)])return _0x13949e[_0x7b4ead(0x38d)];if((_0x516513=this[_0x7b4ead(0x1ed)](_0x4e7581,_0x20c108[_0x7b4ead(0x3d6)],_0x20c108[_0x7b4ead(0x40c)],this[_0x7b4ead(0x45b)][_0x4e7581][_0x7b4ead(0x3f4)],!0x0))!=_0x13949e[_0x7b4ead(0x4a6)])return _0x516513;this[_0x7b4ead(0x1ee)][_0x4e7581][_0x7b4ead(0x3d6)]=_0x20c108[_0x7b4ead(0x3d6)],this[_0x7b4ead(0x1ee)][_0x4e7581][_0x7b4ead(0x40c)]=_0x20c108[_0x7b4ead(0x40c)];break;case _0x3c8826:return _0x13949e[_0x7b4ead(0x38d)];}return _0x516513=this['ComputePTZPoints']();}},{'key':_0x22f0ab(0x3e3),'value':function(_0x143d41,_0x429ae0){var _0x5f2252=_0x22f0ab;return _0x143d41<0x0||0x20<=_0x143d41||null==_0x429ae0||null==this[_0x5f2252(0x1ee)][_0x143d41]?_0x13949e[_0x5f2252(0x203)]:(_0x429ae0[_0x5f2252(0x27e)]=this['fRX1'],_0x429ae0[_0x5f2252(0x469)]=this[_0x5f2252(0x3aa)],_0x429ae0[_0x5f2252(0x2bb)]=this['fRY1'],_0x429ae0[_0x5f2252(0x2e9)]=this[_0x5f2252(0x4ed)],_0x429ae0[_0x5f2252(0x40f)]=this['bBlack'],_0x429ae0['bCut']=this[_0x5f2252(0x45b)][_0x143d41][_0x5f2252(0x324)],_0x429ae0[_0x5f2252(0x260)]=this[_0x5f2252(0x1ee)][_0x143d41][_0x5f2252(0x260)],_0x429ae0[_0x5f2252(0x314)]=this[_0x5f2252(0x1ee)][_0x143d41][_0x5f2252(0x314)],_0x429ae0[_0x5f2252(0x3f4)]=this[_0x5f2252(0x1ee)][_0x143d41][_0x5f2252(0x3f4)],_0x429ae0[_0x5f2252(0x3d6)]=this['pFishParam'][_0x143d41][_0x5f2252(0x3d6)],_0x429ae0[_0x5f2252(0x40c)]=this[_0x5f2252(0x1ee)][_0x143d41][_0x5f2252(0x40c)],_0x13949e[_0x5f2252(0x4a6)]);}},{'key':_0x22f0ab(0x503),'value':function(_0x538050,_0x20a220){var _0x140b11=_0x22f0ab;return _0x538050<0x0||0x20<=_0x538050||null==_0x20a220||null==this['pRenderParam'][_0x538050]?_0x13949e['SR_ERR_PARAM']:(_0x20a220[_0x140b11(0x27e)]=this[_0x140b11(0x1f8)],_0x20a220['fRXRight']=this[_0x140b11(0x3aa)],_0x20a220[_0x140b11(0x2bb)]=this[_0x140b11(0x34c)],_0x20a220[_0x140b11(0x2e9)]=this['fRY2'],_0x20a220[_0x140b11(0x40f)]=this[_0x140b11(0x40f)],_0x20a220['fCosH']=this[_0x140b11(0x45b)][_0x538050][_0x140b11(0x265)],_0x20a220[_0x140b11(0x2ee)]=this[_0x140b11(0x45b)][_0x538050][_0x140b11(0x2ee)],_0x20a220[_0x140b11(0x405)]=this['pRenderParam'][_0x538050][_0x140b11(0x405)],_0x20a220[_0x140b11(0x3e0)]=this['pRenderParam'][_0x538050][_0x140b11(0x3e0)],_0x20a220['fAngle']=this[_0x140b11(0x45b)][_0x538050]['fAngle'],_0x20a220[_0x140b11(0x3f4)]=this['pRenderParam'][_0x538050][_0x140b11(0x3f4)],_0x20a220[_0x140b11(0x1fe)]=this[_0x140b11(0x45b)][_0x538050][_0x140b11(0x1fe)],_0x20a220[_0x140b11(0x324)]=this[_0x140b11(0x45b)][_0x538050]['bCut'],_0x13949e[_0x140b11(0x4a6)]);}},{'key':_0x22f0ab(0x4e7),'value':function(_0xc43460,_0x43a0e9,_0xe4dbc8,_0x34708e){var _0x449b89=_0x22f0ab;if(_0xc43460<=-0.5||0.4<=_0xc43460||_0x43a0e9<=0.6||1.5<=_0x43a0e9||_0xe4dbc8<=-0.5||0.4<=_0xe4dbc8||_0x34708e<=0.6||1.5<=_0x34708e||_0xc43460+_0x43a0e9<=0.8||1.2<=_0xc43460+_0x43a0e9||_0xe4dbc8+_0x34708e<=0.8||1.2<=_0xe4dbc8+_0x34708e)return _0x13949e[_0x449b89(0x203)];if(_0xc43460<0x0||0x1<_0x43a0e9||_0xe4dbc8<0x0||0x1<_0x34708e){for(var _0x41e2a6=0x0;_0x41e2a6<0x20;++_0x41e2a6)if(_0x3468da[_0x449b89(0x2b7)]==this['pRenderParam'][_0x41e2a6][_0x449b89(0x1fe)]||_0x3468da[_0x449b89(0x4c2)]==this[_0x449b89(0x45b)][_0x41e2a6][_0x449b89(0x1fe)]||_0x3468da[_0x449b89(0x4bf)]==this[_0x449b89(0x45b)][_0x41e2a6]['nDisplayEffect']){var _0x423ca2=[];if(_0x423ca2[_0x449b89(0x25f)]=this[_0x449b89(0x45b)][_0x41e2a6]['fCosH'],_0x423ca2[_0x449b89(0x1e2)]=this[_0x449b89(0x45b)][_0x41e2a6][_0x449b89(0x2ee)],_0x423ca2[_0x449b89(0x299)]=this[_0x449b89(0x45b)][_0x41e2a6]['fCosV'],_0x423ca2[_0x449b89(0x528)]=this[_0x449b89(0x45b)][_0x41e2a6][_0x449b89(0x3e0)],0x0==this[_0x449b89(0x2ac)](_0xc43460,_0x43a0e9,_0xe4dbc8,_0x34708e,_0x423ca2,this[_0x449b89(0x45b)][_0x41e2a6]['fZoom'],this[_0x449b89(0x45b)][_0x41e2a6][_0x449b89(0x1fe)]))return _0x13949e[_0x449b89(0x203)];}}return this[_0x449b89(0x1f8)]=_0xc43460,this[_0x449b89(0x3aa)]=_0x43a0e9,this[_0x449b89(0x34c)]=_0xe4dbc8,this[_0x449b89(0x4ed)]=_0x34708e,_0x13949e[_0x449b89(0x4a6)];}},{'key':'UpdateWideScanAngle','value':function(_0x3a6b5f,_0x5536f3){var _0x4429f8=_0x22f0ab;return null==this['pRenderParam'][_0x3a6b5f]?_0x13949e[_0x4429f8(0x2cf)]:(_0x3468da[_0x4429f8(0x2f5)]==this[_0x4429f8(0x45b)][_0x3a6b5f][_0x4429f8(0x1fe)]||_0x3468da['SR_DE_FISH_PANORAMA_FLOOR_180']==this[_0x4429f8(0x45b)][_0x3a6b5f][_0x4429f8(0x1fe)]?this['pRenderParam'][_0x3a6b5f]['fAngle']=_0x5536f3:_0x3468da['SR_DE_FISH_PANORAMA_CEILING_360']!=this[_0x4429f8(0x45b)][_0x3a6b5f][_0x4429f8(0x1fe)]&&_0x3468da[_0x4429f8(0x4f5)]!=this[_0x4429f8(0x45b)][_0x3a6b5f][_0x4429f8(0x1fe)]||(this[_0x4429f8(0x45b)][_0x3a6b5f][_0x4429f8(0x314)]=-_0x5536f3),_0x13949e[_0x4429f8(0x4a6)]);}},{'key':_0x22f0ab(0x207),'value':function(_0x2cdf66,_0x2a4fbb,_0x3bfb0f,_0x2f451a){var _0x432c17=_0x22f0ab,_0x52c448=Math['sqrt']((_0x2a4fbb-0.5)*(_0x2a4fbb-0.5)+(_0x2cdf66-0.5)*(_0x2cdf66-0.5));if(0.5<_0x52c448)return _0x13949e['SR_ERR_PARAM'];if(_0x52c448<0.001)return _0x3bfb0f[_0x432c17(0x299)]=0x1,_0x3bfb0f['fVAngleSin']=0x0,_0x3bfb0f[_0x432c17(0x25f)]=0x1,_0x3bfb0f['fHAngleSin']=0x0,_0x13949e[_0x432c17(0x4a6)];if(_0x2f451a==_0x3468da[_0x432c17(0x2b7)]){_0x3bfb0f[_0x432c17(0x25f)]=(0.5-_0x2a4fbb)/_0x52c448,_0x3bfb0f['fHAngleSin']=(0.5-_0x2cdf66)/_0x52c448;var _0x203ee9=_0x52c448*_0x48e6bf;_0x3bfb0f['fVAngleCos']=Math[_0x432c17(0x34b)](_0x203ee9),_0x3bfb0f['fVAngleSin']=Math[_0x432c17(0x202)](_0x203ee9);}else{if(_0x2f451a!=_0x3468da[_0x432c17(0x4c2)])return _0x13949e['SR_ERR_PARAM'];_0x3bfb0f[_0x432c17(0x25f)]=(_0x2a4fbb-0.5)/_0x52c448,_0x3bfb0f[_0x432c17(0x1e2)]=(0.5-_0x2cdf66)/_0x52c448,_0x203ee9=_0x52c448*_0x48e6bf,(_0x3bfb0f[_0x432c17(0x299)]=Math[_0x432c17(0x34b)](_0x203ee9),_0x3bfb0f[_0x432c17(0x528)]=Math['sin'](_0x203ee9));}return _0x13949e[_0x432c17(0x4a6)];}},{'key':_0x22f0ab(0x525),'value':function(_0x298627,_0x1d1ea5,_0x3085db){var _0x3e6163=_0x22f0ab,_0x4c5cd2,_0x4ec552;return 0.25<(_0x1d1ea5-0.5)*(_0x1d1ea5-0.5)+(_0x298627-0.5)*(_0x298627-0.5)?_0x13949e[_0x3e6163(0x203)]:(_0x1d1ea5=(_0x1d1ea5-0.5)/0.5*_0x48e6bf/0x2,_0x4c5cd2=Math[_0x3e6163(0x34b)](_0x1d1ea5),_0x1d1ea5=Math[_0x3e6163(0x202)](_0x1d1ea5),0x1<(_0x298627-0.5)/0.5/_0x4c5cd2||(_0x298627-0.5)/0.5/_0x4c5cd2<-0x1?SR_ERR_PARAM:(_0x298627=(_0x298627-0.5)/0.5/_0x4c5cd2*_0x48e6bf/0x2,_0x4ec552=Math[_0x3e6163(0x34b)](_0x298627),_0x298627=Math['sin'](_0x298627),_0x3085db[_0x3e6163(0x299)]=_0x4c5cd2,_0x3085db[_0x3e6163(0x528)]=_0x1d1ea5,_0x3085db[_0x3e6163(0x25f)]=_0x4ec552,_0x3085db['fHAngleSin']=_0x298627,_0x13949e[_0x3e6163(0x4a6)]));}},{'key':_0x22f0ab(0x2ac),'value':function(_0x24afa7,_0x44f8b6,_0x33e2fb,_0x34afb0,_0x5c6caf,_0x3a99ba,_0x1c89f7){var _0x34b12a=_0x22f0ab;return 0x1!=this['IsOutofImage'](_0x24afa7,_0x44f8b6,_0x33e2fb,_0x34afb0,_0x5c6caf['fHAngleCos'],_0x5c6caf[_0x34b12a(0x1e2)],_0x5c6caf['fVAngleCos'],_0x5c6caf[_0x34b12a(0x528)],_0x3a99ba,0x1,0.5,_0x1c89f7)&&(0x1!=this['IsOutofImage'](_0x24afa7,_0x44f8b6,_0x33e2fb,_0x34afb0,_0x5c6caf[_0x34b12a(0x25f)],_0x5c6caf[_0x34b12a(0x1e2)],_0x5c6caf[_0x34b12a(0x299)],_0x5c6caf['fVAngleSin'],_0x3a99ba,0x0,0.5,_0x1c89f7)&&(0x1!=this[_0x34b12a(0x3f2)](_0x24afa7,_0x44f8b6,_0x33e2fb,_0x34afb0,_0x5c6caf[_0x34b12a(0x25f)],_0x5c6caf[_0x34b12a(0x1e2)],_0x5c6caf['fVAngleCos'],_0x5c6caf[_0x34b12a(0x528)],_0x3a99ba,0.5,0x1,_0x1c89f7)&&(0x1!=this['IsOutofImage'](_0x24afa7,_0x44f8b6,_0x33e2fb,_0x34afb0,_0x5c6caf[_0x34b12a(0x25f)],_0x5c6caf[_0x34b12a(0x1e2)],_0x5c6caf[_0x34b12a(0x299)],_0x5c6caf[_0x34b12a(0x528)],_0x3a99ba,0.5,0x0,_0x1c89f7)&&(0x1!=this[_0x34b12a(0x3f2)](_0x24afa7,_0x44f8b6,_0x33e2fb,_0x34afb0,_0x5c6caf[_0x34b12a(0x25f)],_0x5c6caf[_0x34b12a(0x1e2)],_0x5c6caf[_0x34b12a(0x299)],_0x5c6caf['fVAngleSin'],_0x3a99ba,0x0,0x0,_0x1c89f7)&&(0x1!=this[_0x34b12a(0x3f2)](_0x24afa7,_0x44f8b6,_0x33e2fb,_0x34afb0,_0x5c6caf['fHAngleCos'],_0x5c6caf['fHAngleSin'],_0x5c6caf[_0x34b12a(0x299)],_0x5c6caf['fVAngleSin'],_0x3a99ba,0x0,0x1,_0x1c89f7)&&(0x1!=this[_0x34b12a(0x3f2)](_0x24afa7,_0x44f8b6,_0x33e2fb,_0x34afb0,_0x5c6caf[_0x34b12a(0x25f)],_0x5c6caf[_0x34b12a(0x1e2)],_0x5c6caf[_0x34b12a(0x299)],_0x5c6caf[_0x34b12a(0x528)],_0x3a99ba,0x1,0x1,_0x1c89f7)&&0x1!=this[_0x34b12a(0x3f2)](_0x24afa7,_0x44f8b6,_0x33e2fb,_0x34afb0,_0x5c6caf[_0x34b12a(0x25f)],_0x5c6caf[_0x34b12a(0x1e2)],_0x5c6caf[_0x34b12a(0x299)],_0x5c6caf['fVAngleSin'],_0x3a99ba,0x1,0x0,_0x1c89f7)))))));}},{'key':_0x22f0ab(0x3f2),'value':function(_0x4cc7ca,_0x5c0d8d,_0x43c536,_0x2dfe4c,_0x4a902e,_0x364b79,_0x8c51ef,_0x122369,_0x336385,_0x35ea07,_0x5bed77,_0x59b13c){var _0x14a46d=_0x22f0ab,_0x1719e2,_0x5bb98f,_0x18125f,_0x4fcc36=(_0x5c0d8d-_0x4cc7ca)/(_0x2dfe4c-_0x43c536),_0x2645d3=(_0x4cc7ca+_0x5c0d8d)/0x2*0x1,_0x43c536=(_0x43c536+_0x2dfe4c)/0x2*_0x4fcc36,_0x2dfe4c=(_0x5c0d8d-_0x4cc7ca)/0x2*0x1;if(_0x59b13c==SR_DE_FISH_PTZ_CEILING){if(_0x27bb8a=_0x35ea07-0.5,_0x2cbbf2=(_0x1719e2=0.5-_0x5bed77)*_0x8c51ef+(_0x5bb98f=_0x336385)*_0x122369,(_0x18125f=_0x5bb98f*_0x8c51ef-_0x1719e2*_0x122369)<=0x0)return!0x0;var _0x27bb8a,_0x2cbbf2,_0x25edb6,_0x557a3c=Math[_0x14a46d(0x41c)](_0x27bb8a*_0x27bb8a+_0x2cbbf2*_0x2cbbf2),_0x5c0d8d=Math['sqrt'](_0x27bb8a*_0x27bb8a+_0x2cbbf2*_0x2cbbf2+_0x18125f*_0x18125f),_0x4cc7ca=Math[_0x14a46d(0x2c8)](_0x557a3c/_0x5c0d8d)/1.5707963*0.5,_0x3b5866=(-((_0x27bb8a=_0x4cc7ca*_0x27bb8a/_0x557a3c)*_0x364b79+(_0x2cbbf2=_0x4cc7ca*_0x2cbbf2/_0x557a3c)*_0x4a902e)*_0x2dfe4c*0x2+_0x43c536)/_0x4fcc36;if((_0x25edb6=(_0x27bb8a*_0x4a902e-_0x2cbbf2*_0x364b79)*_0x2dfe4c*0x2+_0x2645d3)<0x0||0x1<_0x25edb6||_0x3b5866<0x0||0x1<_0x3b5866)return!0x0;}if(_0x59b13c==SR_DE_FISH_PTZ_FLOOR){if(_0x27bb8a=_0x35ea07-0.5,_0x2cbbf2=(_0x1719e2=_0x5bed77-0.5)*_0x8c51ef+(_0x5bb98f=_0x336385)*_0x122369,(_0x18125f=_0x5bb98f*_0x8c51ef-_0x1719e2*_0x122369)<=0x0)return!0x0;_0x557a3c=Math[_0x14a46d(0x41c)](_0x27bb8a*_0x27bb8a+_0x2cbbf2*_0x2cbbf2),(_0x5c0d8d=Math['sqrt'](_0x27bb8a*_0x27bb8a+_0x2cbbf2*_0x2cbbf2+_0x18125f*_0x18125f),_0x4cc7ca=Math['asin'](_0x557a3c/_0x5c0d8d)/1.5707963*0.5);if(_0x3b5866=(((_0x27bb8a=_0x4cc7ca*_0x27bb8a/_0x557a3c)*_0x364b79+(_0x2cbbf2=_0x4cc7ca*_0x2cbbf2/_0x557a3c)*_0x4a902e)*_0x2dfe4c*0x2+_0x43c536)/_0x4fcc36,(_0x25edb6=(_0x27bb8a*_0x4a902e-_0x2cbbf2*_0x364b79)*_0x2dfe4c*0x2+_0x2645d3)<0x0||0x1<_0x25edb6||_0x3b5866<0x0||0x1<_0x3b5866)return!0x0;}if(_0x59b13c==SR_DE_FISH_PTZ_WALL){if(_0x25edb6=(_0x27bb8a=_0x35ea07-0.5)*_0x4a902e+(_0x18125f=(_0x5bb98f=_0x336385)*_0x8c51ef-(_0x1719e2=_0x5bed77-0.5)*_0x122369)*_0x364b79,_0x3b5866=_0x2cbbf2=_0x1719e2*_0x8c51ef+_0x5bb98f*_0x122369,(_0x5c0d8d=_0x18125f*_0x4a902e-_0x27bb8a*_0x364b79)<=0x0)return!0x0;_0x557a3c=Math[_0x14a46d(0x41c)](_0x25edb6*_0x25edb6+_0x3b5866*_0x3b5866),(_0x4cc7ca=Math[_0x14a46d(0x41c)](_0x25edb6*_0x25edb6+_0x3b5866*_0x3b5866+_0x5c0d8d*_0x5c0d8d),_0x59b13c=Math['asin'](_0x557a3c/_0x4cc7ca)/1.5707963*0.5);if(_0x3b5866=(_0x59b13c*_0x3b5866/_0x557a3c*_0x2dfe4c*0x2+_0x43c536)/_0x4fcc36,(_0x25edb6=_0x59b13c*_0x25edb6/_0x557a3c*_0x2dfe4c*0x2+_0x2645d3)<0x0||0x1<_0x25edb6||_0x3b5866<0x0||0x1<_0x3b5866)return!0x0;}return!0x1;}},{'key':_0x22f0ab(0x4d7),'value':function(){var _0x18aa5a=_0x22f0ab;if(-0x1==this['nWndPort'])return _0x13949e[_0x18aa5a(0x2cf)];for(var _0x255d41,_0x18cee9=0x0;_0x18cee9<0x20;++_0x18cee9)null==this['pRenderParam'][_0x18cee9]||_0x3468da['SR_DE_FISH_PTZ_CEILING']!=this['pRenderParam'][_0x18cee9][_0x18aa5a(0x1fe)]&&_0x3468da[_0x18aa5a(0x4c2)]!=this['pRenderParam'][_0x18cee9]['nDisplayEffect']&&_0x3468da['SR_DE_FISH_PTZ_WALL']!=this[_0x18aa5a(0x45b)][_0x18cee9][_0x18aa5a(0x1fe)]||(_0x255d41=_0x13949e[_0x18aa5a(0x4a6)],this[_0x18aa5a(0x334)]==_0x46c232?(_0x255d41=this['GetRangePoints'](_0x18cee9),_0x13949e[_0x18aa5a(0x4a6)]==_0x255d41&&(_0x255d41=this[_0x18aa5a(0x38f)](_0x18cee9))):this[_0x18aa5a(0x334)]==_0xba837&&(_0x255d41=this['GetRectPoints'](_0x18cee9)));return _0x13949e[_0x18aa5a(0x4a6)];}},{'key':_0x22f0ab(0x289),'value':function(){var _0x50c128=_0x22f0ab;return this[_0x50c128(0x270)];}},{'key':_0x22f0ab(0x40b),'value':function(){var _0x8fd81f=_0x22f0ab;return this[_0x8fd81f(0x334)];}},{'key':'GetPTZColor','value':function(_0x547ab5,_0x4b15de){var _0x3cb11b=_0x22f0ab;return _0x547ab5<0x0||0x20<=_0x547ab5||null==_0x4b15de?_0x13949e[_0x3cb11b(0x203)]:(_0x4b15de['fA']=this[_0x3cb11b(0x320)][_0x547ab5]['fA'],_0x4b15de['fR']=this['stPTZColor'][_0x547ab5]['fR'],_0x4b15de['fG']=this[_0x3cb11b(0x320)][_0x547ab5]['fG'],_0x4b15de['fB']=this[_0x3cb11b(0x320)][_0x547ab5]['fB'],null!=this['pPTZSetColor']&&(Math[_0x3cb11b(0x1e6)](this[_0x3cb11b(0x3eb)][_0x547ab5]['fA'])<_0x3e9a49||Math[_0x3cb11b(0x1e6)](this[_0x3cb11b(0x3eb)][_0x547ab5]['fR'])<_0x3e9a49||Math['abs'](this[_0x3cb11b(0x3eb)][_0x547ab5]['fG'])<_0x3e9a49||Math[_0x3cb11b(0x1e6)](this[_0x3cb11b(0x3eb)][_0x547ab5]['fB'])<_0x3e9a49)&&(_0x4b15de['fA']=this[_0x3cb11b(0x3eb)][_0x547ab5]['fA'],_0x4b15de['fR']=this[_0x3cb11b(0x3eb)][_0x547ab5]['fR'],_0x4b15de['fG']=this[_0x3cb11b(0x3eb)][_0x547ab5]['fG'],_0x4b15de['fB']=this['pPTZSetColor'][_0x547ab5]['fB']),_0x13949e[_0x3cb11b(0x4a6)]);}},{'key':_0x22f0ab(0x52c),'value':function(_0x44c32e,_0x3b828d){var _0x16bb48=_0x22f0ab;if(_0x44c32e<0x0||0x20<=_0x44c32e)return _0x13949e[_0x16bb48(0x203)];if(null==_0x3b828d)return _0x13949e[_0x16bb48(0x203)];if(null==this[_0x16bb48(0x3eb)]){this[_0x16bb48(0x3eb)]=[];for(var _0x458351=0x0;_0x458351<0x20;++_0x458351)this['pPTZSetColor'][_0x458351]=[],this['pPTZSetColor'][_0x458351]['fR']=0x0,this['pPTZSetColor'][_0x458351]['fG']=0x0,this['pPTZSetColor'][_0x458351]['fB']=0x0,this[_0x16bb48(0x3eb)][_0x458351]['fA']=0x1;}return this[_0x16bb48(0x3eb)][_0x44c32e]['fR']=_0x3b828d['fR'],this[_0x16bb48(0x3eb)][_0x44c32e]['fG']=_0x3b828d['fG'],this[_0x16bb48(0x3eb)][_0x44c32e]['fB']=_0x3b828d['fB'],this[_0x16bb48(0x3eb)][_0x44c32e]['fA']=_0x3b828d['fA'],_0x13949e[_0x16bb48(0x4a6)];}},{'key':_0x22f0ab(0x303),'value':function(_0x206b44){return!(_0x206b44<0x0||0x20<=_0x206b44)&&this['bPTZSelected'][_0x206b44];}},{'key':_0x22f0ab(0x533),'value':function(_0x1ec40c,_0x501f73){var _0x26790e=_0x22f0ab;if(-0x1==this['nWndPort'])return-0x1;if(null==this[_0x26790e(0x45b)][this[_0x26790e(0x270)]])return-0x1;var _0x4c2285=0x20,_0x136752=[];_0x136752['fX']=_0x1ec40c,_0x136752['fY']=_0x501f73;for(var _0xd802d9=0x0;_0xd802d9<0x20;++_0xd802d9)this['bPTZSelected'][_0xd802d9]=!0x1;if(this[_0x26790e(0x334)]==_0x46c232){switch(this['pRenderParam'][this[_0x26790e(0x270)]][_0x26790e(0x1fe)]){case _0x3468da[_0x26790e(0x2f5)]:this[_0x26790e(0x510)](_0x136752,_0x1ec40c,_0x501f73);break;case _0x3468da[_0x26790e(0x208)]:this[_0x26790e(0x1d9)](_0x136752,_0x1ec40c,_0x501f73);break;case _0x3468da[_0x26790e(0x33c)]:this['GetPointPano2FishWall'](_0x136752,_0x1ec40c,_0x501f73);}for(var _0x386aa3=0x0;_0x386aa3<0x20;++_0x386aa3)if(0x0!=this['nOriPTZPointNum'][_0x386aa3]){var _0x31a50a=[],_0x46f960=(_0x31a50a['fX']=this['pOriPTZPoints'][_0x386aa3][0x0]['fX'],_0x31a50a['fY']=this[_0x26790e(0x22d)][_0x386aa3][0x0]['fY'],[]);_0x46f960['fX']=this['pOriPTZPoints'][_0x386aa3][0x0]['fX'],_0x46f960['fY']=this['pOriPTZPoints'][_0x386aa3][0x0]['fY'];for(var _0x494da2=0x1;_0x494da2<this[_0x26790e(0x21c)][_0x386aa3];++_0x494da2)this[_0x26790e(0x285)](_0x31a50a,_0x46f960,this[_0x26790e(0x22d)][_0x386aa3][_0x494da2]);if(_0x136752['fX']<=_0x31a50a['fX']&&_0x136752['fX']>=_0x46f960['fX']&&_0x136752['fY']>=_0x46f960['fY']&&_0x136752['fY']<=_0x31a50a['fY']){_0x4c2285=_0x386aa3;break;}}}else{if(this[_0x26790e(0x334)]!=_0xba837)return-0x1;for(var _0xa00358=0x0;_0xa00358<0x20;++_0xa00358)if(_0x136752['fX']<=this[_0x26790e(0x47b)][_0xa00358][0x2]['fX']&&_0x136752['fX']>=this['pRectPoints'][_0xa00358][0x0]['fX']&&_0x136752['fY']>=this[_0x26790e(0x47b)][_0xa00358][0x0]['fY']&&_0x136752['fY']<=this[_0x26790e(0x47b)][_0xa00358][0x2]['fY']){_0x4c2285=_0xa00358;break;}}return _0x4c2285<0x20?(this[_0x26790e(0x447)][_0x4c2285]=!0x0,_0x4c2285):-0x1;}},{'key':_0x22f0ab(0x3ca),'value':function(_0x8c11fc){var _0x554a23=_0x22f0ab;if(_0x8c11fc<0x0||0x20<=_0x8c11fc)return _0x13949e[_0x554a23(0x203)];for(var _0x548255=0x0;_0x548255<0x20;++_0x548255)this[_0x554a23(0x447)][_0x548255]=!0x1;if(this['nPTZDisplayMode']==_0x46c232){if(0x0==this[_0x554a23(0x21c)][_0x8c11fc])return _0x13949e[_0x554a23(0x203)];this[_0x554a23(0x447)][_0x8c11fc]=!0x0;}else{if(0x0==this[_0x554a23(0x4bc)][_0x8c11fc])return _0x13949e['SR_ERR_PARAM'];this[_0x554a23(0x447)][_0x8c11fc]=!0x0;}return _0x13949e[_0x554a23(0x4a6)];}},{'key':'GetPTZRectange','value':function(_0x56216f,_0x56d46d,_0x1de57b){var _0x20ac8f=_0x22f0ab;return _0x1de57b['fX']<_0x56d46d['fX']&&(_0x56d46d['fX']=_0x1de57b['fX']),_0x1de57b['fY']<_0x56d46d['fY']&&(_0x56d46d['fY']=_0x1de57b['fY']),_0x1de57b['fX']>_0x56216f['fX']&&(_0x56216f['fX']=_0x1de57b['fX']),_0x1de57b['fY']>_0x56216f['fY']&&(_0x56216f['fY']=_0x1de57b['fY']),_0x13949e[_0x20ac8f(0x4a6)];}},{'key':'GetPTZPoints','value':function(_0x42a0d4,_0x346ed6,_0x3f96c9){var _0x4ecd0d=_0x22f0ab;return _0x42a0d4<0x0||0x20<=_0x42a0d4?_0x13949e[_0x4ecd0d(0x203)]:null==this[_0x4ecd0d(0x45b)][this['nWndPort']]?_0x13949e[_0x4ecd0d(0x2cf)]:(_0x46c232==_0x3f96c9?null!=this['pOriPTZPoints'][_0x42a0d4]&&0x0!=this[_0x4ecd0d(0x21c)][_0x42a0d4]&&(_0x346ed6['pstPoints']=this[_0x4ecd0d(0x22d)][_0x42a0d4],_0x346ed6[_0x4ecd0d(0x216)]=this[_0x4ecd0d(0x21c)][_0x42a0d4]):_0xba837==_0x3f96c9&&null!=this['pRectPoints'][_0x42a0d4]&&(_0x346ed6[_0x4ecd0d(0x2f3)]=this[_0x4ecd0d(0x47b)][_0x42a0d4],_0x346ed6[_0x4ecd0d(0x216)]=0x4),_0x13949e[_0x4ecd0d(0x4a6)]);}},{'key':_0x22f0ab(0x524),'value':function(_0x105384){var _0x200023=_0x22f0ab;return this[_0x200023(0x334)]=_0x105384,this[_0x200023(0x4d7)]();}},{'key':_0x22f0ab(0x4ad),'value':function(_0x1e2546){var _0x36542a=_0x22f0ab;return _0x1e2546<0x0||0x20<=_0x1e2546?_0x13949e[_0x36542a(0x203)]:null==this[_0x36542a(0x45b)]?_0x13949e[_0x36542a(0x2cf)]:this['pRenderParam'][_0x1e2546]['nDisplayEffect'];}},{'key':_0x22f0ab(0x3b6),'value':function(_0x5d4b04,_0x4918e4,_0x18c305){var _0x586ca4=_0x22f0ab;if(_0x5d4b04<0x0||0x20<=_0x5d4b04)return _0x13949e[_0x586ca4(0x203)];if(null==this[_0x586ca4(0x3ab)][_0x5d4b04]||0x0==this[_0x586ca4(0x538)][_0x5d4b04])return _0x13949e[_0x586ca4(0x203)];var _0x215c72=this['nPTZFragmentNode'][_0x5d4b04][_0x18c305];if(_0x4918e4['nPointNum']=this[_0x586ca4(0x3ae)][_0x5d4b04][_0x18c305+0x1]-this[_0x586ca4(0x3ae)][_0x5d4b04][_0x18c305],_0x4918e4['nPointNum']<0x0)return _0x13949e[_0x586ca4(0x2cf)];_0x4918e4[_0x586ca4(0x2f3)]=[];for(var _0x1b99ff=0x0;_0x1b99ff<_0x4918e4['nPointNum'];++_0x1b99ff){var _0x24a3cd=[];_0x24a3cd['fX']=this[_0x586ca4(0x3ab)][_0x5d4b04][_0x215c72+_0x1b99ff]['fX'],_0x24a3cd['fY']=this['pPanoPTZPoints'][_0x5d4b04][_0x215c72+_0x1b99ff]['fY'],_0x4918e4['pstPoints'][_0x586ca4(0x51d)](_0x24a3cd);}return _0x13949e['SR_OK'];}},{'key':'GetPTZFragmentNum','value':function(_0x576f06){var _0x29db8c=_0x22f0ab;return _0x576f06<0x0||0x20<=_0x576f06?_0x13949e[_0x29db8c(0x203)]:0x0==this[_0x29db8c(0x371)][_0x576f06]?_0x13949e[_0x29db8c(0x2cf)]:this[_0x29db8c(0x371)][_0x576f06];}},{'key':'CalcPTZFragmentPoints','value':function(_0x51dc93){var _0x43d5bf=_0x22f0ab;if(_0x51dc93<0x0||0x20<=_0x51dc93)return _0x13949e[_0x43d5bf(0x203)];if(null==this['pPanoPTZPoints'][_0x51dc93]||0x0==this[_0x43d5bf(0x538)][_0x51dc93])return _0x13949e[_0x43d5bf(0x2cf)];this['nPTZFragmentNode'][_0x51dc93][0x0]=0x0,this[_0x43d5bf(0x371)][_0x51dc93]=0x1;for(var _0x566de4=0x0,_0x3f224a=0x0;_0x3f224a<this[_0x43d5bf(0x538)][_0x51dc93]-0x1;_0x3f224a++)0.5<Math[_0x43d5bf(0x1e6)](this[_0x43d5bf(0x3ab)][_0x51dc93][_0x3f224a+0x1]['fX']-this[_0x43d5bf(0x3ab)][_0x51dc93][_0x3f224a]['fX'])&&(_0x566de4=this['nPTZFragmentNum'][_0x51dc93],this['nPTZFragmentNode'][_0x51dc93][_0x566de4]=_0x3f224a+0x1,this['nPTZFragmentNum'][_0x51dc93]=this[_0x43d5bf(0x371)][_0x51dc93]+0x1);var _0x401f53=this[_0x43d5bf(0x538)][_0x51dc93];return Math['abs'](this[_0x43d5bf(0x3ab)][_0x51dc93][0x0]['fX']-this[_0x43d5bf(0x3ab)][_0x51dc93][_0x401f53-0x1]['fX'])<0.5&&(this[_0x43d5bf(0x3ab)][_0x51dc93][_0x401f53]['fX']=this['pPanoPTZPoints'][_0x51dc93][0x0]['fX'],this['pPanoPTZPoints'][_0x51dc93][_0x401f53]['fY']=this[_0x43d5bf(0x3ab)][_0x51dc93][0x0]['fY'],this[_0x43d5bf(0x538)][_0x51dc93]=this['nPanoPTZPointNum'][_0x51dc93]+0x1),_0x566de4=this[_0x43d5bf(0x371)][_0x51dc93],this[_0x43d5bf(0x3ae)][_0x51dc93][_0x566de4]=this[_0x43d5bf(0x538)][_0x51dc93],_0x13949e[_0x43d5bf(0x4a6)];}},{'key':_0x22f0ab(0x1dd),'value':function(_0x1bf892){var _0x14fccb=_0x22f0ab;return this[_0x14fccb(0x3ee)][_0x1bf892];}},{'key':_0x22f0ab(0x523),'value':function(_0x175f2a,_0x5d6bc9,_0x2ea935){var _0x4ec4f4=_0x22f0ab;if(null==this['pRenderParam'][this['nWndPort']])return _0x13949e[_0x4ec4f4(0x2cf)];if(null==_0x175f2a)return _0x13949e['SR_ERR_PARAM'];var _0x9d481c=(this['fRX2']-this[_0x4ec4f4(0x1f8)])/(this[_0x4ec4f4(0x4ed)]-this[_0x4ec4f4(0x34c)]),_0x490014=(this['fRX2']-this[_0x4ec4f4(0x1f8)])/0x2*0x1,_0x416e60=0x0,_0x9d481c=((0x1<this[_0x4ec4f4(0x3aa)]||0x1<this[_0x4ec4f4(0x4ed)]||this[_0x4ec4f4(0x1f8)]<0x0||this[_0x4ec4f4(0x34c)]<0x0)&&(this['fRX1']<0x0&&_0x416e60<(_0x877d52=-this[_0x4ec4f4(0x1f8)])&&(_0x416e60=_0x877d52),0x1<this['fRX2']&&_0x416e60<(_0x877d52=this[_0x4ec4f4(0x3aa)]-0x1)&&(_0x416e60=_0x877d52),this[_0x4ec4f4(0x34c)]<0x0&&_0x416e60<(_0x877d52=-this['fRY1']*_0x9d481c)&&(_0x416e60=_0x877d52),0x1<this[_0x4ec4f4(0x4ed)]&&_0x416e60<(_0x877d52=(this[_0x4ec4f4(0x4ed)]-0x1)*_0x9d481c)&&(_0x416e60=_0x877d52)),_0x416e60/_0x490014),_0x877d52=[];if(_0x877d52['fX']=0x0,_0x877d52['fY']=0x0,Math[_0x4ec4f4(0x1e6)](_0x5d6bc9-0.5)<_0x3e9a49&&Math[_0x4ec4f4(0x1e6)](_0x2ea935-0.5)<_0x3e9a49)return _0x13949e['SR_ERR_NOT_SUPPORT'];return _0x416e60=[],_0x490014=[],_0x416e60['fX']=_0x5d6bc9-0.5,_0x416e60['fY']=_0x2ea935-0.5,_0x490014['fX']=-0.5*Math[_0x4ec4f4(0x202)](this[_0x4ec4f4(0x45b)][this[_0x4ec4f4(0x270)]][_0x4ec4f4(0x314)]),_0x490014['fY']=0.5*Math[_0x4ec4f4(0x34b)](this[_0x4ec4f4(0x45b)][this[_0x4ec4f4(0x270)]][_0x4ec4f4(0x314)]),_0x5d6bc9=Math[_0x4ec4f4(0x41c)](_0x416e60['fX']*_0x416e60['fX']+_0x416e60['fY']*_0x416e60['fY']),_0x2ea935=Math[_0x4ec4f4(0x41c)](_0x490014['fX']*_0x490014['fX']+_0x490014['fY']*_0x490014['fY']),_0x2ea935=Math['acos']((_0x416e60['fX']*_0x490014['fX']+_0x416e60['fY']*_0x490014['fY'])/(_0x5d6bc9*_0x2ea935)),(0x0<_0x416e60['fX']*_0x490014['fY']-_0x416e60['fY']*_0x490014['fX']&&(_0x2ea935=6.2831852-_0x2ea935),_0x877d52['fX']=_0x2ea935/6.2831853,_0x877d52['fY']=(0x2*(0.5-_0x5d6bc9)-_0x9d481c)/(0.8-_0x9d481c),0x0<=_0x877d52['fY']&&0x0<=_0x877d52['fX']&&_0x877d52['fY']<=0x1&&_0x877d52['fX']<=0x1?(_0x175f2a['fX']=_0x877d52['fX'],_0x175f2a['fY']=_0x877d52['fY'],_0x13949e['SR_OK']):_0x13949e['SR_ERR_PARAM']);}},{'key':'GetPointFish2PanoFloor','value':function(_0x47c7ab,_0x7bc0a8,_0x2b85f4){var _0x227715=_0x22f0ab;if(null==this['pRenderParam'][this['nWndPort']])return _0x13949e[_0x227715(0x2cf)];if(null==_0x47c7ab)return _0x13949e[_0x227715(0x203)];var _0x451cd7=(this[_0x227715(0x3aa)]-this[_0x227715(0x1f8)])/(this['fRY2']-this[_0x227715(0x34c)]),_0x1b56bb=(this['fRX2']-this[_0x227715(0x1f8)])/0x2*0x1,_0x575d8b=0x0,_0x451cd7=((0x1<this[_0x227715(0x3aa)]||0x1<this[_0x227715(0x4ed)]||this[_0x227715(0x1f8)]<0x0||this[_0x227715(0x34c)]<0x0)&&(this[_0x227715(0x1f8)]<0x0&&_0x575d8b<(_0x1256ad=-this[_0x227715(0x1f8)])&&(_0x575d8b=_0x1256ad),0x1<this[_0x227715(0x3aa)]&&_0x575d8b<(_0x1256ad=this[_0x227715(0x3aa)]-0x1)&&(_0x575d8b=_0x1256ad),this[_0x227715(0x34c)]<0x0&&_0x575d8b<(_0x1256ad=-this[_0x227715(0x34c)]*_0x451cd7)&&(_0x575d8b=_0x1256ad),0x1<this['fRY2']&&_0x575d8b<(_0x1256ad=(this[_0x227715(0x4ed)]-0x1)*_0x451cd7)&&(_0x575d8b=_0x1256ad)),_0x575d8b/_0x1b56bb),_0x1256ad=[];if(_0x1256ad['fX']=0x0,_0x1256ad['fY']=0x0,Math[_0x227715(0x1e6)](_0x7bc0a8-0.5)<_0x3e9a49&&Math[_0x227715(0x1e6)](_0x2b85f4-0.5)<_0x3e9a49)return _0x13949e[_0x227715(0x38d)];return _0x575d8b=[],_0x1b56bb=[],_0x575d8b['fX']=_0x7bc0a8-0.5,_0x575d8b['fY']=_0x2b85f4-0.5,_0x1b56bb['fX']=-0.5*Math['sin'](this['pRenderParam'][this[_0x227715(0x270)]]['fAngle']),_0x1b56bb['fY']=0.5*Math[_0x227715(0x34b)](this['pRenderParam'][this[_0x227715(0x270)]][_0x227715(0x314)]),_0x7bc0a8=Math['sqrt'](_0x575d8b['fX']*_0x575d8b['fX']+_0x575d8b['fY']*_0x575d8b['fY']),_0x2b85f4=Math[_0x227715(0x41c)](_0x1b56bb['fX']*_0x1b56bb['fX']+_0x1b56bb['fY']*_0x1b56bb['fY']),_0x2b85f4=Math[_0x227715(0x432)]((_0x575d8b['fX']*_0x1b56bb['fX']+_0x575d8b['fY']*_0x1b56bb['fY'])/(_0x7bc0a8*_0x2b85f4)),(0x0<_0x575d8b['fX']*_0x1b56bb['fY']-_0x575d8b['fY']*_0x1b56bb['fX']&&(_0x2b85f4=6.2831852-_0x2b85f4),_0x1256ad['fX']=0x1-_0x2b85f4/6.2831853,_0x1256ad['fY']=0x1-(0x2*(0.5-_0x7bc0a8)-_0x451cd7)/(0.8-_0x451cd7),0x0<=_0x1256ad['fY']&&0x0<=_0x1256ad['fX']&&_0x1256ad['fY']<=0x1&&_0x1256ad['fX']<=0x1?(_0x47c7ab['fX']=_0x1256ad['fX'],_0x47c7ab['fY']=_0x1256ad['fY'],_0x13949e[_0x227715(0x4a6)]):_0x13949e[_0x227715(0x203)]);}},{'key':'GetPointFish2PanoWall','value':function(_0x5663f8,_0x1b4776,_0x255510){var _0x2fe0d9=_0x22f0ab;if(null==this['pRenderParam'][this[_0x2fe0d9(0x270)]])return _0x13949e[_0x2fe0d9(0x2cf)];if(null==_0x5663f8)return _0x13949e['SR_ERR_PARAM'];var _0x57e68a=(this['fRX2']-this[_0x2fe0d9(0x1f8)])/(this[_0x2fe0d9(0x4ed)]-this['fRY1']),_0xc2dd78=(this[_0x2fe0d9(0x3aa)]-this[_0x2fe0d9(0x1f8)])/0x2*0x1,_0x51bc6b=0x0,_0x85b815=0x1,_0x2945ea=0.1,_0x4f88ba=0.9,_0x57e68a=(this[_0x2fe0d9(0x1f8)]<0x0&&(_0x1fe26d=-this[_0x2fe0d9(0x1f8)],_0x51bc6b=_0x1fe26d/=0x2*_0xc2dd78),0x1<this[_0x2fe0d9(0x3aa)]&&(_0x1fe26d=this['fRX2']-0x1,_0x85b815=0x1-(_0x1fe26d/=0x2*_0xc2dd78)),this[_0x2fe0d9(0x34c)]<0x0&&(_0x1fe26d=-this[_0x2fe0d9(0x34c)]*_0x57e68a,_0x2945ea=0.1<(_0x1fe26d/=0x2*_0xc2dd78)?_0x1fe26d:0.1),0x1<this[_0x2fe0d9(0x4ed)]&&(_0x1fe26d=(this[_0x2fe0d9(0x4ed)]-0x1)*_0x57e68a,_0x4f88ba=0x1-0.9<(_0x1fe26d/=0x2*_0xc2dd78)?0x1-_0x1fe26d:0.9),[]),_0x1fe26d=(_0x57e68a['fX']=0x0,_0x57e68a['fY']=0x0,0x2*_0x1b4776*_0xc2dd78),_0x40967f=0x2*_0x255510*_0xc2dd78,_0x4dd0bb=Math[_0x2fe0d9(0x41c)](_0xc2dd78*_0xc2dd78-(_0x40967f-_0xc2dd78)*(_0x40967f-_0xc2dd78));return Math[_0x2fe0d9(0x1e6)](_0x4dd0bb)<_0x3e9a49?SR_ERR_PARAM:(_0x255510=_0x40967f,_0x57e68a['fX']=((_0x1b4776=_0xc2dd78*(_0x1fe26d-_0xc2dd78)/_0x4dd0bb+_0xc2dd78)-0x2*_0x51bc6b*_0xc2dd78)/(0x2*(_0x85b815-_0x51bc6b)*_0xc2dd78),_0x57e68a['fY']=(_0x255510-0x2*_0x2945ea*_0xc2dd78)/(0x2*(_0x4f88ba-_0x2945ea)*_0xc2dd78),0x0<=_0x57e68a['fY']&&0x0<=_0x57e68a['fX']&&_0x57e68a['fY']<=0x1&&_0x57e68a['fX']<=0x1?(_0x5663f8['fX']=_0x57e68a['fX'],_0x5663f8['fY']=_0x57e68a['fY'],_0x13949e[_0x2fe0d9(0x4a6)]):_0x13949e['SR_ERR_PARAM']);}}]),_0x92cc8d;}()),_0x174ce8=(function(){var _0x43f8ac=_0x99d5a2;function _0x5bd09b(){var _0x461f55=a0_0x1593;_0x160316(this,_0x5bd09b),this[_0x461f55(0x2c7)]='webgl',this[_0x461f55(0x47f)]=null,this[_0x461f55(0x448)]='',this[_0x461f55(0x422)]=0x0,this[_0x461f55(0x4a7)]=_0x3468da[_0x461f55(0x3c1)],this[_0x461f55(0x407)]=0x0,this[_0x461f55(0x376)]=0x0,this['FECShowMode']=0x0,this[_0x461f55(0x292)],this['InitFECParam']();}return _0x5a3b91(_0x5bd09b,[{'key':_0x43f8ac(0x4e8),'value':function(){var _0x3b847b=_0x43f8ac;this[_0x3b847b(0x4de)]=[];for(var _0xb399a4=0x0;_0xb399a4<0x20;_0xb399a4++)this[_0x3b847b(0x4de)][_0xb399a4]={},this['stFishEyeManager'][_0xb399a4]['pRender']=null,this[_0x3b847b(0x4de)][_0xb399a4][_0x3b847b(0x539)]=0x0,this[_0x3b847b(0x4de)][_0xb399a4][_0x3b847b(0x1e3)]='',this[_0x3b847b(0x4de)][_0xb399a4][_0x3b847b(0x29b)]=0x0,this[_0x3b847b(0x4de)][_0xb399a4][_0x3b847b(0x4fe)]=0x0,this['stFishEyeManager'][_0xb399a4][_0x3b847b(0x477)]=0x0,this[_0x3b847b(0x4de)][_0xb399a4][_0x3b847b(0x26b)]=_0xf574bd,this[_0x3b847b(0x4de)][_0xb399a4][_0x3b847b(0x1e5)]=_0x462c41,this[_0x3b847b(0x4de)][_0xb399a4][_0x3b847b(0x46b)]=_0x3468da[_0x3b847b(0x224)];this[_0x3b847b(0x3c0)]=[];for(var _0x52886b=0x0;_0x52886b<0x20;_0x52886b++)this[_0x3b847b(0x3c0)][_0x52886b]={},this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x3c5)]=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x302)]={},this['stFishParam'][_0x52886b]['stPTZParam']['fPTZPositionX']=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x302)][_0x3b847b(0x54b)]=0x0,this['stFishParam'][_0x52886b]['stCycleParam']={},this['stFishParam'][_0x52886b]['stCycleParam'][_0x3b847b(0x249)]=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x460)][_0x3b847b(0x326)]=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x460)][_0x3b847b(0x489)]=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x460)][_0x3b847b(0x394)]=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x3f4)]=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x1d0)]=0x0,this[_0x3b847b(0x3c0)][_0x52886b]['stPTZColor']={},this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x320)]['nR']=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x320)]['nG']=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x320)]['nB']=0x0,this['stFishParam'][_0x52886b][_0x3b847b(0x320)]['nAlpha']=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x39b)]={},this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x39b)]['fTop']=0x0,this['stFishParam'][_0x52886b]['stPTZSelect'][_0x3b847b(0x339)]=0x0,this['stFishParam'][_0x52886b]['stPTZSelect'][_0x3b847b(0x478)]=0x0,this['stFishParam'][_0x52886b][_0x3b847b(0x39b)][_0x3b847b(0x2d2)]=0x0,this[_0x3b847b(0x3c0)][_0x52886b][_0x3b847b(0x1f5)]=0x0;}},{'key':'FEC_SetCanvasID','value':function(_0x164b33){return 0x1;}},{'key':_0x43f8ac(0x213),'value':function(_0x398d95,_0x21daea){var _0x217218=_0x43f8ac;return this[_0x217218(0x2c7)]=_0x21daea,this[_0x217218(0x448)]=_0x398d95,null==this[_0x217218(0x292)]&&(this[_0x217218(0x292)]=new _0x30e60b()),'2d'===this['renderEngine']||'2D'===this['renderEngine']?(this[_0x217218(0x47f)]=new _0x56d25f(),console[_0x217218(0x514)](_0x217218(0x287))):(this[_0x217218(0x47f)]=new _0x50f103(),this[_0x217218(0x47f)]['SR_SetFishParamManager'](this[_0x217218(0x292)]),console['log'](_0x217218(0x4ff))),this[_0x217218(0x47f)]['SR_Init'](_0x398d95),this[_0x217218(0x422)]=this[_0x217218(0x47f)][_0x217218(0x485)](this['mainFECCorrect']),null==this['stFishEyeManager'][0x0][_0x217218(0x3c4)]&&this[_0x217218(0x4a7)]!==_0x3468da[_0x217218(0x3c1)]&&(this['stFishEyeManager'][0x0][_0x217218(0x3c4)]=this[_0x217218(0x47f)],this[_0x217218(0x4de)][0x0][_0x217218(0x539)]=0x0,this['stFishEyeManager'][0x0][_0x217218(0x1e3)]=this['mainCanvasID'],this[_0x217218(0x4de)][0x0][_0x217218(0x29b)]=0x1,this[_0x217218(0x4de)][0x0][_0x217218(0x4fe)]=0x1,this[_0x217218(0x4de)][0x0]['nValidSubPort']=0x0),-0x1==this['mainSubPort']?(console[_0x217218(0x434)]('%c\\x20SR_AddSubPort\\x20error\\x20subport:%d',_0x217218(0x309),this[_0x217218(0x422)]),0x0):0x1;}},{'key':_0x43f8ac(0x4c7),'value':function(){var _0x484c68=_0x43f8ac;null!=this[_0x484c68(0x47f)]&&(this[_0x484c68(0x47f)][_0x484c68(0x41e)](this[_0x484c68(0x422)]),this['oVideoHandle'][_0x484c68(0x4b2)](),this[_0x484c68(0x47f)]=null);for(var _0x51de8c=0x0;_0x51de8c<0x20;_0x51de8c++)this[_0x484c68(0x4de)][_0x51de8c]['pRender']=null;return this[_0x484c68(0x4de)][_0x484c68(0x21a)](0x0,this[_0x484c68(0x4de)][_0x484c68(0x4f1)]),this[_0x484c68(0x3c0)][_0x484c68(0x21a)](0x0,this[_0x484c68(0x3c0)][_0x484c68(0x4f1)]),this[_0x484c68(0x292)][_0x484c68(0x3db)](),this[_0x484c68(0x292)]=null,0x1;}},{'key':_0x43f8ac(0x46a),'value':function(_0x3f330e){var _0x3ded4f=_0x43f8ac;return null!=this['oVideoHandle']?this[_0x3ded4f(0x47f)][_0x3ded4f(0x28d)](_0x3f330e):0x0;}},{'key':_0x43f8ac(0x355),'value':function(_0x12724d,_0x2631fe,_0x336758,_0x19d2e1){var _0x279ec5=_0x43f8ac;return null!=this[_0x279ec5(0x47f)]?this[_0x279ec5(0x47f)][_0x279ec5(0x414)](_0x12724d,_0x2631fe,_0x336758,_0x19d2e1):0x0;}},{'key':_0x43f8ac(0x4b7),'value':function(_0x310450,_0x3c976b){var _0x577b82=_0x43f8ac;return null!=this[_0x577b82(0x47f)]?this['oVideoHandle'][_0x577b82(0x375)](_0x310450,_0x3c976b):0x0;}},{'key':_0x43f8ac(0x286),'value':function(){var _0x57d180=_0x43f8ac;return null!=this['oVideoHandle']?this[_0x57d180(0x47f)][_0x57d180(0x547)]():0x0;}},{'key':_0x43f8ac(0x41f),'value':function(_0x364b18){var _0x368b02=_0x43f8ac;return null!=this[_0x368b02(0x47f)]?this[_0x368b02(0x47f)][_0x368b02(0x49d)](_0x364b18):0x0;}},{'key':'FEC_ResetCorrectType','value':function(_0x1e2813,_0x35ffd0,_0xd8b532){var _0x207ca8=_0x43f8ac;if(_0xd8b532!=_0x462c41&&_0xd8b532!=_0x4beee9&&_0xd8b532!=_0x316080&&_0xd8b532!=_0x17c71b)return console[_0x207ca8(0x514)](_0x207ca8(0x4db),_0x207ca8(0x4cf),_0xd8b532),0x10;var _0x5cf78a=this[_0x207ca8(0x380)](_0x35ffd0,_0xd8b532);return 0x0==_0x1e2813?(null!=this[_0x207ca8(0x47f)]&&(this[_0x207ca8(0x47f)][_0x207ca8(0x41e)](this[_0x207ca8(0x422)]),this[_0x207ca8(0x422)]=this[_0x207ca8(0x47f)][_0x207ca8(0x485)](_0x5cf78a),null==this[_0x207ca8(0x4de)][_0x1e2813][_0x207ca8(0x3c4)]&&(this[_0x207ca8(0x4de)][_0x1e2813][_0x207ca8(0x3c4)]=this['oVideoHandle'],this[_0x207ca8(0x4de)][_0x1e2813][_0x207ca8(0x539)]=0x0,this[_0x207ca8(0x4de)][_0x1e2813][_0x207ca8(0x1e3)]=this['mainCanvasID'],this['stFishEyeManager'][_0x1e2813]['bUsed']=0x1,this[_0x207ca8(0x4de)][_0x1e2813][_0x207ca8(0x4fe)]=0x1,this['stFishEyeManager'][_0x1e2813][_0x207ca8(0x477)]=this[_0x207ca8(0x422)])),this[_0x207ca8(0x4de)][_0x1e2813][_0x207ca8(0x26b)]=_0x35ffd0,this[_0x207ca8(0x4de)][_0x1e2813]['emCorrectType']=_0xd8b532,this[_0x207ca8(0x4de)][_0x1e2813][_0x207ca8(0x46b)]=_0x5cf78a,this['mainFECCorrect']=_0x5cf78a,_0x17c71b<=this[_0x207ca8(0x4de)][_0x1e2813]['emCorrectType']&&(_0x35ffd0=this[_0x207ca8(0x4de)][_0x1e2813][_0x207ca8(0x3c4)][_0x207ca8(0x3a7)](_0x45c70b,0x0),_0x13949e[_0x207ca8(0x4a6)]!=_0x35ffd0&&console['log'](_0x207ca8(0x307),_0x35ffd0))):null!=this[_0x207ca8(0x4de)][_0x1e2813]['pRender']?(this[_0x207ca8(0x4de)][_0x1e2813]['pRender'][_0x207ca8(0x41e)](this[_0x207ca8(0x4de)][_0x1e2813]['nValidSubPort']),this[_0x207ca8(0x4de)][_0x1e2813][_0x207ca8(0x477)]=this[_0x207ca8(0x4de)][_0x1e2813]['pRender'][_0x207ca8(0x485)](_0x5cf78a)):console['info']('%c\\x20FEC_ResetCorrectType\\x20error\\x20this\\x20canvas\\x20not\\x20play',_0x207ca8(0x4cf)),0x1;}},{'key':_0x43f8ac(0x20d),'value':function(_0x43ad98,_0x541ead){var _0x418bbf=_0x43f8ac;if((_0x3b95c4==_0x43ad98||_0xf574bd==_0x43ad98)&&_0x1ae667==_0x541ead)return this[_0x418bbf(0x407)]=_0x332ff6,-0x1;if(_0x40926f==_0x43ad98&&_0x3ccddf==_0x541ead)return this[_0x418bbf(0x407)]=_0x332ff6,-0x1;if(_0x40926f==_0x43ad98&&_0x1a4011==_0x541ead)return this[_0x418bbf(0x407)]=_0x332ff6,-0x1;if((_0x3b95c4==_0x43ad98||_0xf574bd==_0x43ad98)&&_0x11da1d==_0x541ead)return this[_0x418bbf(0x407)]=_0x332ff6,-0x1;if((_0x3b95c4==_0x43ad98||_0xf574bd==_0x43ad98)&&_0x5357b0==_0x541ead)return this[_0x418bbf(0x407)]=_0x332ff6,-0x1;if(_0x40926f!=_0x43ad98&&_0x3b95c4!=_0x43ad98&&_0xf574bd!=_0x43ad98)return this[_0x418bbf(0x407)]=MP_E_SUPPORT,-0x1;if(0x0!=_0x541ead&&_0x541ead!=_0x4ebb4e&&_0x541ead!=_0x4beee9&&_0x541ead!=_0x316080&&_0x541ead!=_0x1ae667&&_0x541ead!=_0x17c71b&&_0x541ead!=_0x3ccddf&&_0x541ead!=_0x1a4011&&_0x541ead!=_0x396f7c&&_0x541ead!=_0x11da1d&&_0x541ead!=_0x5357b0)return this[_0x418bbf(0x407)]=MP_E_SUPPORT,-0x1;for(var _0x22a23f=0x0,_0x123209=0x1;_0x123209<0x20;_0x123209++){if(this['stFishEyeManager'][_0x123209]['bUsed']&&this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x26b)]!=_0x43ad98)return this['FECErrorCode']=0x517,-0x1;if(this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x29b)]&&this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x1e5)]!=_0x4ebb4e&&this['stFishEyeManager'][_0x123209][_0x418bbf(0x1e5)]!=_0x17c71b&&this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x1e5)]!=_0x3ccddf&&this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x1e5)]!=_0x1a4011&&this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x1e5)]!=_0x396f7c&&this['stFishEyeManager'][_0x123209]['emCorrectType']!=_0x11da1d&&this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x1e5)]!=_0x5357b0&&_0x541ead!=_0x4ebb4e&&_0x541ead!=_0x17c71b&&_0x541ead!=_0x3ccddf&&_0x541ead!=_0x1a4011&&_0x541ead!=_0x396f7c&&_0x541ead!=_0x11da1d&&_0x541ead!=_0x5357b0)return this[_0x418bbf(0x407)]=0x518,-0x1;if(this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x29b)]&&(this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x1e5)]==_0x4ebb4e&&_0x541ead==_0x4beee9||this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x1e5)]==_0x4beee9&&_0x541ead==_0x4ebb4e))return this[_0x418bbf(0x407)]=0x518,-0x1;if(_0x5357b0==_0x541ead&&(this[_0x418bbf(0x3c0)][0x0][_0x418bbf(0x460)][_0x418bbf(0x249)]<=-0.5||0x0<this[_0x418bbf(0x3c0)][0x0][_0x418bbf(0x460)][_0x418bbf(0x249)]||this[_0x418bbf(0x3c0)][0x0][_0x418bbf(0x460)][_0x418bbf(0x326)]<0x1||1.5<=this[_0x418bbf(0x3c0)][0x0][_0x418bbf(0x460)][_0x418bbf(0x326)]||this[_0x418bbf(0x3c0)][0x0]['stCycleParam'][_0x418bbf(0x489)]<=-0.5||0.4<=this['stFishParam'][0x0]['stCycleParam']['fRadiusTop']||this['stFishParam'][0x0][_0x418bbf(0x460)][_0x418bbf(0x394)]<=0.6||1.5<=this[_0x418bbf(0x3c0)][0x0]['stCycleParam']['fRadiusBottom']||this[_0x418bbf(0x3c0)][0x0]['stCycleParam'][_0x418bbf(0x249)]+this['stFishParam'][0x0]['stCycleParam'][_0x418bbf(0x326)]<=0.8||1.2<=this['stFishParam'][0x0][_0x418bbf(0x460)][_0x418bbf(0x249)]+this[_0x418bbf(0x3c0)][0x0][_0x418bbf(0x460)]['fRadiusRight']||this[_0x418bbf(0x3c0)][0x0][_0x418bbf(0x460)][_0x418bbf(0x489)]+this[_0x418bbf(0x3c0)][0x0][_0x418bbf(0x460)][_0x418bbf(0x394)]<=0.8||1.2<=this[_0x418bbf(0x3c0)][0x0][_0x418bbf(0x460)]['fRadiusTop']+this[_0x418bbf(0x3c0)][0x0][_0x418bbf(0x460)][_0x418bbf(0x394)]))return this[_0x418bbf(0x407)]=_0x36832c,-0x1;}for(_0x123209=0x1;_0x123209<0x20;_0x123209++)if(0x0==this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x539)]&&0x0==this['stFishEyeManager'][_0x123209]['bUsed']){this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x539)]=_0x123209,this[_0x418bbf(0x4de)][_0x22a23f][_0x418bbf(0x477)]=-0x1,this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x29b)]=0x1,this['stFishEyeManager'][_0x123209][_0x418bbf(0x26b)]=_0x43ad98,this['stFishEyeManager'][_0x123209][_0x418bbf(0x1e5)]=_0x541ead,_0x22a23f=_0x123209;break;}if(0x20==_0x123209)return this[_0x418bbf(0x407)]=0x504,-0x1;var _0x16209e=this['_ConvertDisplayEffect'](this[_0x418bbf(0x4de)][_0x22a23f][_0x418bbf(0x26b)],this['stFishEyeManager'][_0x22a23f]['emCorrectType']);return _0x3468da[_0x418bbf(0x224)]!=_0x16209e?(0x0==this['stFishEyeManager'][_0x22a23f][_0x418bbf(0x454)]&&(this[_0x418bbf(0x4de)][_0x22a23f][_0x418bbf(0x46b)]=_0x16209e,this[_0x418bbf(0x4de)][_0x22a23f][_0x418bbf(0x454)]=0x0,this['stFishParam'][_0x22a23f][_0x418bbf(0x3f4)]=0.005,this['stFishParam'][_0x22a23f][_0x418bbf(0x302)][_0x418bbf(0x3d1)]=0.5,this[_0x418bbf(0x3c0)][_0x22a23f]['stPTZParam'][_0x418bbf(0x54b)]=0.5,this[_0x418bbf(0x3c0)][_0x22a23f][_0x418bbf(0x1d0)]=0x0),this['FECErrorCode']=0x0,this['subPortNum']++,_0x123209):_0x22a23f<0x20&&0x0==this[_0x418bbf(0x4de)][_0x22a23f][_0x418bbf(0x454)]?(this['stFishEyeManager'][_0x22a23f][_0x418bbf(0x46b)]=_0x16209e,this[_0x418bbf(0x4de)][_0x22a23f][_0x418bbf(0x454)]=0x0,this[_0x418bbf(0x3c0)][_0x22a23f][_0x418bbf(0x3f4)]=0x0,this[_0x418bbf(0x3c0)][_0x22a23f][_0x418bbf(0x302)][_0x418bbf(0x3d1)]=0x0,this[_0x418bbf(0x3c0)][_0x22a23f]['stPTZParam'][_0x418bbf(0x54b)]=0x0,this['stFishParam'][_0x22a23f]['fWideScanOffset']=0x0,this['FECErrorCode']=0x0,this[_0x418bbf(0x376)]++,_0x123209):(this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x3c4)]=null,this['stFishEyeManager'][_0x123209]['nSubPort']=0x0,this[_0x418bbf(0x4de)][_0x123209]['sCanvasID']='',this[_0x418bbf(0x4de)][_0x123209]['bUsed']=0x0,this[_0x418bbf(0x4de)][_0x123209]['bInit']=0x0,this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x477)]=0x0,this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x26b)]=_0xf574bd,this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x1e5)]=_0x462c41,this[_0x418bbf(0x4de)][_0x123209][_0x418bbf(0x46b)]=_0x3468da[_0x418bbf(0x224)],this[_0x418bbf(0x407)]=_0x332ff6,-0x1);}},{'key':_0x43f8ac(0x4e0),'value':function(_0x18dba9){var _0x5df788=_0x43f8ac;return null!==this[_0x5df788(0x4de)][_0x18dba9][_0x5df788(0x3c4)]&&(this[_0x5df788(0x407)]=0x515,returnmpCtrlDefine[_0x5df788(0x519)]),null==this[_0x5df788(0x4de)][_0x18dba9][_0x5df788(0x3c4)]&&(this[_0x5df788(0x4de)][_0x18dba9]['pRender']=new _0x50f103(),this['stFishEyeManager'][_0x18dba9][_0x5df788(0x3c4)]['SR_SetFishParamManager'](this['pFishParamManager'])),1;}},{'key':_0x43f8ac(0x281),'value':function(_0x1ccc70,_0x1725b3){var _0x29e977=_0x43f8ac;if(null==this['stFishEyeManager'][_0x1ccc70][_0x29e977(0x3c4)])return this[_0x29e977(0x407)]=_0x5a306e;if(_0x1ccc70<0x1||0x1f<_0x1ccc70)return this[_0x29e977(0x407)]=0x512;if(0x0==this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x29b)])return this[_0x29e977(0x407)]=_0xa54871;if(null==_0x1725b3)return this[_0x29e977(0x407)]=0x519;if(0x0==this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x539)]||0x0==this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x29b)])return this['FECErrorCode']=_0xa54871;if(0x0!=this[_0x29e977(0x4de)][_0x1ccc70]['bInited']&&null!=this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x1e3)])return _0x1725b3!=this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x1e3)]?this[_0x29e977(0x407)]=0x506:0x1;SR_DE_FISH_ORIGINAL;var _0xdeac49=this[_0x29e977(0x380)](this['stFishEyeManager'][_0x1ccc70][_0x29e977(0x26b)],this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x1e5)]),_0x2db78=this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x3c4)][_0x29e977(0x3e5)](_0x1725b3);return this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x477)]=this['stFishEyeManager'][_0x1ccc70][_0x29e977(0x3c4)][_0x29e977(0x485)](_0xdeac49),_0x13949e['SR_OK']!=_0x2db78||_0x13949e['SR_OK']!=retSASP?(this['stFishEyeManager'][_0x1ccc70][_0x29e977(0x454)]=0x0,this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x1e3)]=null,this[_0x29e977(0x407)]=_0xa54871):(this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x454)]=0x1,this[_0x29e977(0x4de)][_0x1ccc70]['sCanvasID']=_0x1725b3,_0x17c71b<=this['stFishEyeManager'][_0x1ccc70][_0x29e977(0x1e5)]&&(_0xdeac49=this[_0x29e977(0x4de)][_0x1ccc70]['pRender'][_0x29e977(0x3a7)](_0x45c70b,0x0),_0x13949e['SR_OK']!=_0xdeac49&&console[_0x29e977(0x514)](_0x29e977(0x307),_0xdeac49)),0x0<this[_0x29e977(0x501)]&&(this[_0x29e977(0x4de)][_0x1ccc70][_0x29e977(0x3c4)][_0x29e977(0x2e7)](this[_0x29e977(0x501)]),this[_0x29e977(0x501)]=0x0),0x1);}},{'key':_0x43f8ac(0x3ed),'value':function(_0x42bad4,_0x524b3c,_0x578b65){var _0x13d559=_0x43f8ac;return 0x0!=_0x42bad4&&(0x1==this['stFishEyeManager'][_0x42bad4][_0x13d559(0x454)]&&(_0x13949e[_0x13d559(0x4a6)]==this[_0x13d559(0x4de)][_0x42bad4]['pRender'][_0x13d559(0x41e)](this['stFishEyeManager'][_0x42bad4][_0x13d559(0x477)])&&(this[_0x13d559(0x4de)][_0x42bad4][_0x13d559(0x454)]=0x0,this[_0x13d559(0x4de)][_0x42bad4][_0x13d559(0x477)]=-0x1),this['stFishEyeManager'][_0x42bad4][_0x13d559(0x3c4)][_0x13d559(0x4b2)]()),this[_0x13d559(0x4de)][_0x42bad4][_0x13d559(0x3c4)]=null,this[_0x13d559(0x4de)][_0x42bad4][_0x13d559(0x539)]=0x0,this['stFishEyeManager'][_0x42bad4][_0x13d559(0x1e3)]='',this['stFishEyeManager'][_0x42bad4][_0x13d559(0x29b)]=0x0,this[_0x13d559(0x4de)][_0x42bad4]['bInit']=0x0,this[_0x13d559(0x4de)][_0x42bad4]['nValidSubPort']=0x0,this[_0x13d559(0x4de)][_0x42bad4]['emPlaceType']=_0xf574bd,this[_0x13d559(0x4de)][_0x42bad4][_0x13d559(0x1e5)]=_0x462c41,this[_0x13d559(0x4de)][_0x42bad4][_0x13d559(0x46b)]=_0x3468da['SR_DE_FISH_ORIGINAL']),0x1;}},{'key':_0x43f8ac(0x3fb),'value':function(_0x418f60){var _0x329f65=_0x43f8ac;if(0x0!=_0x418f60){if(_0x418f60<0x1||0x1f<_0x418f60)return this[_0x329f65(0x407)]=0x512;if(0x0==this['stFishEyeManager'][_0x418f60][_0x329f65(0x29b)])return this[_0x329f65(0x407)]=_0xa54871;this['stFishParam'][_0x418f60][_0x329f65(0x460)]['fRadiusLeft']=0x0,this[_0x329f65(0x3c0)][_0x418f60][_0x329f65(0x460)]['fRadiusRight']=0x1,this['stFishParam'][_0x418f60][_0x329f65(0x460)][_0x329f65(0x489)]=0x0,this[_0x329f65(0x3c0)][_0x418f60][_0x329f65(0x460)]['fRadiusBottom']=0x1,this['FECErrorCode']=0x0,(this['FECShowMode']=0x0)<this[_0x329f65(0x376)]&&this['subPortNum']--;}return 0x1;}},{'key':_0x43f8ac(0x362),'value':function(_0x4f21ba,_0xa5d4c0){var _0x110f49=_0x43f8ac;if(this['FECErrorCode']=0x0,null==this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x3c4)])return this[_0x110f49(0x407)]=_0x5a306e;if(0x0==this['stFishEyeManager'][_0x4f21ba][_0x110f49(0x29b)])return this[_0x110f49(0x407)]=_0xa54871;if(this['stFishEyeManager'][_0x4f21ba][_0x110f49(0x1e5)]>=_0x17c71b&&this['stFishEyeManager'][_0x4f21ba][_0x110f49(0x1e5)]<=_0x5357b0&&0x1e&_0xa5d4c0[_0x110f49(0x49e)])return this[_0x110f49(0x407)]=_0x566fd6;if(_0x367f2&_0xa5d4c0[_0x110f49(0x49e)]){if(null==_0xa5d4c0[_0x110f49(0x460)])return _0x36832c;for(var _0x12d85b=0x1;_0x12d85b<0x20;_0x12d85b++){if(this[_0x110f49(0x4de)][_0x12d85b][_0x110f49(0x29b)]&&this[_0x110f49(0x4de)][_0x12d85b][_0x110f49(0x539)]&&_0x11da1d==this[_0x110f49(0x4de)][_0x12d85b][_0x110f49(0x1e5)]&&(_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x249)]<=-0.5||0.4<=_0xa5d4c0['stCycleParam'][_0x110f49(0x249)]||_0xa5d4c0['stCycleParam'][_0x110f49(0x326)]<=0.6||1.5<=_0xa5d4c0['stCycleParam'][_0x110f49(0x326)]||_0xa5d4c0[_0x110f49(0x460)]['fRadiusTop']<=-0.5||0x0<_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x489)]||_0xa5d4c0[_0x110f49(0x460)]['fRadiusBottom']<0x1||1.5<=_0xa5d4c0['stCycleParam'][_0x110f49(0x394)]||_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x249)]+_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x326)]<=0.8||1.2<=_0xa5d4c0[_0x110f49(0x460)]['fRadiusLeft']+_0xa5d4c0['stCycleParam'][_0x110f49(0x326)]||_0xa5d4c0['stCycleParam'][_0x110f49(0x489)]+_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x394)]<=0.8||1.2<=_0xa5d4c0['stCycleParam'][_0x110f49(0x489)]+_0xa5d4c0['stCycleParam'][_0x110f49(0x394)]))return this[_0x110f49(0x407)]=_0x36832c;if(this[_0x110f49(0x4de)][_0x12d85b][_0x110f49(0x29b)]&&this[_0x110f49(0x4de)][_0x12d85b][_0x110f49(0x539)]&&_0x5357b0==this[_0x110f49(0x4de)][_0x12d85b][_0x110f49(0x1e5)]&&(_0xa5d4c0[_0x110f49(0x460)]['fRadiusLeft']<=-0.5||0x0<_0xa5d4c0[_0x110f49(0x460)]['fRadiusLeft']||_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x326)]<0x1||1.5<=_0xa5d4c0[_0x110f49(0x460)]['fRadiusRight']||_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x489)]<=-0.5||0.4<=_0xa5d4c0['stCycleParam'][_0x110f49(0x489)]||_0xa5d4c0[_0x110f49(0x460)]['fRadiusBottom']<=0.6||1.5<=_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x394)]||_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x249)]+_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x326)]<=0.8||1.2<=_0xa5d4c0['stCycleParam'][_0x110f49(0x249)]+_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x326)]||_0xa5d4c0[_0x110f49(0x460)]['fRadiusTop']+_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x394)]<=0.8||1.2<=_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x489)]+_0xa5d4c0['stCycleParam'][_0x110f49(0x394)]))return this[_0x110f49(0x407)]=_0x36832c;}}if(0x0==this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x454)]){if(_0x142076&_0xa5d4c0[_0x110f49(0x49e)]){if(_0x4beee9!=this['stFishEyeManager'][_0x4f21ba][_0x110f49(0x1e5)]&&_0x316080!=this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x1e5)]||_0x40926f==this[_0x110f49(0x4de)][_0x4f21ba]['emPlaceType'])return this[_0x110f49(0x407)]=_0x566fd6;for(var _0x4272d5=0x1;_0x4272d5<0x20;_0x4272d5++)if(this[_0x110f49(0x4de)][_0x4272d5]['nSubPort']&&this[_0x110f49(0x4de)][_0x4272d5][_0x110f49(0x29b)]&&this[_0x110f49(0x4de)][_0x4272d5]['emCorrectType']==_0x4ebb4e)return this[_0x110f49(0x407)]=_0x127bf2;this['stFishParam'][_0x4f21ba][_0x110f49(0x1d0)]=_0xa5d4c0[_0x110f49(0x47c)];}if(_0x42215a&_0xa5d4c0[_0x110f49(0x49e)]){if(null==_0xa5d4c0[_0x110f49(0x320)])return _0x36832c;if(0xff<_0xa5d4c0[_0x110f49(0x320)]['nR']||0xff<_0xa5d4c0['stPTZColor']['nG']||0xff<_0xa5d4c0[_0x110f49(0x320)]['nB']||0xff<_0xa5d4c0['stPTZColor'][_0x110f49(0x24b)])return this[_0x110f49(0x407)]=_0x566fd6;this['stFishParam'][_0x4f21ba][_0x110f49(0x320)]['nR']=_0xa5d4c0[_0x110f49(0x320)]['nR'],this[_0x110f49(0x3c0)][_0x4f21ba]['stPTZColor']['nG']=_0xa5d4c0[_0x110f49(0x320)]['nG'],this['stFishParam'][_0x4f21ba][_0x110f49(0x320)]['nB']=_0xa5d4c0['stPTZColor']['nB'],this['stFishParam'][_0x4f21ba][_0x110f49(0x320)]['nAlpha']=_0xa5d4c0[_0x110f49(0x320)]['nAlpha'];}if(_0x2802b6&_0xa5d4c0[_0x110f49(0x49e)]){if(_0x4ebb4e!=this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x1e5)])return this[_0x110f49(0x407)]=_0x566fd6;this[_0x110f49(0x3c0)][_0x4f21ba][_0x110f49(0x302)][_0x110f49(0x3d1)]=_0xa5d4c0[_0x110f49(0x4a3)]['fPTZPositionX'],this[_0x110f49(0x3c0)][_0x4f21ba][_0x110f49(0x302)]['fPTZPositionY']=_0xa5d4c0[_0x110f49(0x4a3)][_0x110f49(0x54b)];}if(_0x168627&_0xa5d4c0[_0x110f49(0x49e)]){if(_0x4ebb4e!=this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x1e5)])return this[_0x110f49(0x407)]=_0x566fd6;this[_0x110f49(0x3c0)][_0x4f21ba][_0x110f49(0x3f4)]=_0xa5d4c0['fPTZZoom'];}if(_0x3db8be&_0xa5d4c0[_0x110f49(0x49e)]){if(null==this[_0x110f49(0x3c0)]['stPTZSelect'])return _0x566fd6;if(_0x4ebb4e!=this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x1e5)])return this['FECErrorCode']=_0x566fd6;this['stFishParam']['stPTZSelect'][_0x110f49(0x24a)]=_0xa5d4c0[_0x110f49(0x39b)]['fTop'],this[_0x110f49(0x3c0)][_0x110f49(0x39b)][_0x110f49(0x339)]=_0xa5d4c0[_0x110f49(0x39b)]['fBottom'],this[_0x110f49(0x3c0)][_0x110f49(0x39b)]['fLeft']=_0xa5d4c0[_0x110f49(0x39b)][_0x110f49(0x478)],this[_0x110f49(0x3c0)][_0x110f49(0x39b)]['fRight']=_0xa5d4c0[_0x110f49(0x39b)][_0x110f49(0x2d2)];}if(_0x367f2&_0xa5d4c0['upDateType']){if(null==_0xa5d4c0[_0x110f49(0x460)])return _0x36832c;if(0x0==this[_0x110f49(0x3cc)](_0xa5d4c0[_0x110f49(0x460)]))return this[_0x110f49(0x407)]=_0x36832c;this[_0x110f49(0x3c0)][0x0][_0x110f49(0x460)][_0x110f49(0x249)]=_0xa5d4c0['stCycleParam'][_0x110f49(0x249)],this[_0x110f49(0x3c0)][0x0][_0x110f49(0x460)][_0x110f49(0x326)]=_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x326)],this[_0x110f49(0x3c0)][0x0]['stCycleParam']['fRadiusTop']=_0xa5d4c0[_0x110f49(0x460)]['fRadiusTop'],this[_0x110f49(0x3c0)][0x0][_0x110f49(0x460)][_0x110f49(0x394)]=_0xa5d4c0['stCycleParam']['fRadiusBottom'];}return 0x1;}if(_0x142076&_0xa5d4c0['upDateType']){if(_0x4beee9!=this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x1e5)]&&_0x316080!=this['stFishEyeManager'][_0x4f21ba][_0x110f49(0x1e5)]||_0x40926f==this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x26b)])return this[_0x110f49(0x407)]=_0x566fd6;for(var _0x130833=0x1;_0x130833<0x20;_0x130833++)if(this[_0x110f49(0x4de)][_0x130833][_0x110f49(0x539)]&&this[_0x110f49(0x4de)][_0x130833][_0x110f49(0x29b)]&&this[_0x110f49(0x4de)][_0x130833][_0x110f49(0x1e5)]==_0x4ebb4e)return this[_0x110f49(0x407)]=_0x127bf2;var _0x20ce2b={};if(_0x20ce2b['nFishParamType']=_0x1e8e38,_0x20ce2b[_0x110f49(0x40f)]=0x0,_0x20ce2b['fAngle']=_0xa5d4c0[_0x110f49(0x47c)],_0x13949e[_0x110f49(0x4a6)]!=this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x3c4)][_0x110f49(0x4f0)](_0x20ce2b))return this[_0x110f49(0x407)]=_0x127bf2;this[_0x110f49(0x3c0)][_0x4f21ba][_0x110f49(0x1d0)]=_0xa5d4c0[_0x110f49(0x47c)];}if(_0x42215a&_0xa5d4c0[_0x110f49(0x49e)]){if(null==_0xa5d4c0[_0x110f49(0x320)])return _0x566fd6;if(0xff<_0xa5d4c0[_0x110f49(0x320)]['nR']||0xff<_0xa5d4c0['stPTZColor']['nG']||0xff<_0xa5d4c0['stPTZColor']['nB']||0xff<_0xa5d4c0[_0x110f49(0x320)]['nAlpha'])return this[_0x110f49(0x407)]=_0x566fd6;_0x20ce2b={},(_0x20ce2b['fR']=float(_0xa5d4c0[_0x110f49(0x320)]['nR']/0xff),_0x20ce2b['fG']=float(_0xa5d4c0[_0x110f49(0x320)]['nG']/0xff),_0x20ce2b['fB']=float(_0xa5d4c0[_0x110f49(0x320)]['nB']/0xff),_0x20ce2b['fA']=float(_0xa5d4c0['stPTZColor'][_0x110f49(0x24b)]/0xff),this['stFishParam'][_0x4f21ba][_0x110f49(0x320)]['nR']=_0xa5d4c0['stPTZColor']['nR'],this['stFishParam'][_0x4f21ba]['stPTZColor']['nG']=_0xa5d4c0[_0x110f49(0x320)]['nG'],this[_0x110f49(0x3c0)][_0x4f21ba][_0x110f49(0x320)]['nB']=_0xa5d4c0['stPTZColor']['nB'],this[_0x110f49(0x3c0)][_0x4f21ba][_0x110f49(0x320)][_0x110f49(0x24b)]=_0xa5d4c0[_0x110f49(0x320)][_0x110f49(0x24b)]);}if(_0x2802b6&_0xa5d4c0['upDateType']){if(_0x4ebb4e!=this['stFishEyeManager'][_0x4f21ba][_0x110f49(0x1e5)])return this[_0x110f49(0x407)]=_0x566fd6;_0x20ce2b={};if(_0x20ce2b['nFishParamType']=_0x1d678a,_0x20ce2b[_0x110f49(0x40f)]=0x0,_0x20ce2b[_0x110f49(0x3d6)]=_0xa5d4c0[_0x110f49(0x4a3)][_0x110f49(0x3d1)],_0x20ce2b[_0x110f49(0x40c)]=_0xa5d4c0[_0x110f49(0x4a3)]['fPTZPositionY'],_0x13949e[_0x110f49(0x4a6)]!=this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x3c4)][_0x110f49(0x4f0)](_0x20ce2b))return this[_0x110f49(0x407)]=_0x127bf2;this[_0x110f49(0x3c0)][_0x4f21ba]['stPTZParam'][_0x110f49(0x3d1)]=_0xa5d4c0[_0x110f49(0x4a3)]['fPTZPositionX'],this[_0x110f49(0x3c0)][_0x4f21ba][_0x110f49(0x302)][_0x110f49(0x54b)]=_0xa5d4c0[_0x110f49(0x4a3)][_0x110f49(0x54b)];}if(_0x168627&_0xa5d4c0[_0x110f49(0x49e)]){if(_0x4ebb4e!=this['stFishEyeManager'][_0x4f21ba]['emCorrectType'])return this[_0x110f49(0x407)]=_0x566fd6;_0x20ce2b={};if(_0x20ce2b[_0x110f49(0x260)]=_0x2b1fa6,_0x20ce2b[_0x110f49(0x40f)]=0x0,_0x20ce2b[_0x110f49(0x3f4)]=_0xa5d4c0[_0x110f49(0x50d)],_0x13949e[_0x110f49(0x4a6)]!=this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x3c4)][_0x110f49(0x4f0)](_0x20ce2b))return this['FECErrorCode']=_0x127bf2;this[_0x110f49(0x3c0)][_0x4f21ba][_0x110f49(0x3f4)]=_0xa5d4c0[_0x110f49(0x50d)];}if(_0x367f2&_0xa5d4c0[_0x110f49(0x49e)]){if(0x0==this['IsValidRadiusParam'](_0xa5d4c0[_0x110f49(0x460)]))return this[_0x110f49(0x407)]=_0x36832c;_0x20ce2b={};if(_0x20ce2b[_0x110f49(0x260)]=_0x3b5c80,_0x20ce2b[_0x110f49(0x40f)]=0x1,_0x20ce2b[_0x110f49(0x27e)]=_0xa5d4c0['stCycleParam']['fRadiusLeft'],_0x20ce2b[_0x110f49(0x469)]=_0xa5d4c0['stCycleParam'][_0x110f49(0x326)],_0x20ce2b['fRYTop']=_0xa5d4c0[_0x110f49(0x460)]['fRadiusTop'],_0x20ce2b[_0x110f49(0x2e9)]=_0xa5d4c0['stCycleParam'][_0x110f49(0x394)],_0x13949e[_0x110f49(0x4a6)]!=this['stFishEyeManager'][_0x4f21ba][_0x110f49(0x3c4)][_0x110f49(0x4f0)](this['stFishEyeManager'][_0x4f21ba][_0x110f49(0x477)],_0x20ce2b))return this[_0x110f49(0x407)]=_0x36832c;this[_0x110f49(0x3c0)][0x0][_0x110f49(0x460)][_0x110f49(0x249)]=_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x249)],this['stFishParam'][0x0][_0x110f49(0x460)][_0x110f49(0x326)]=_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x326)],this[_0x110f49(0x3c0)][0x0][_0x110f49(0x460)][_0x110f49(0x489)]=_0xa5d4c0[_0x110f49(0x460)][_0x110f49(0x489)],this['stFishParam'][0x0][_0x110f49(0x460)]['fRadiusBottom']=_0xa5d4c0['stCycleParam']['fRadiusBottom'];}return _0x3db8be&_0xa5d4c0['upDateType']&&_0x4ebb4e==this[_0x110f49(0x4de)][_0x4f21ba]['emCorrectType']&&_0x13949e[_0x110f49(0x4a6)]!=this[_0x110f49(0x4de)][_0x4f21ba]['pRender']['SR_SetFishParam'](this[_0x110f49(0x4de)][_0x4f21ba][_0x110f49(0x39b)])?this[_0x110f49(0x407)]=0x513:0x1;}},{'key':_0x43f8ac(0x3cc),'value':function(_0x58b8b4){var _0x399f36=_0x43f8ac;return _0x58b8b4[_0x399f36(0x394)]<=_0x58b8b4[_0x399f36(0x489)]||_0x58b8b4[_0x399f36(0x326)]<=_0x58b8b4['fRadiusLeft']?0x0:0x1;}},{'key':'FEC_SetViewParam','value':function(_0x14f9dd,_0x3fd041,_0x3c156d){var _0x417574=_0x43f8ac;return _0x3fd041<_0x30de30||_0x1ab3fe<_0x3fd041?this['FECErrorCode']=_0x14f925:(this[_0x417574(0x407)]=0x0,null==this['stFishEyeManager'][_0x14f9dd]['pRender']?this[_0x417574(0x407)]=_0x5a306e:0x0==this[_0x417574(0x4de)][_0x14f9dd]['bInited']?this[_0x417574(0x407)]=_0xa54871:_0x17c71b<=this['stFishEyeManager'][_0x14f9dd][_0x417574(0x1e5)]?_0x13949e['SR_OK']!=this[_0x417574(0x4de)][_0x14f9dd]['pRender'][_0x417574(0x4c8)](_0x3fd041,_0x3c156d)?this[_0x417574(0x407)]=_0x14f925:0x1:this['FECErrorCode']=_0x566fd6);}},{'key':_0x43f8ac(0x22e),'value':function(_0x29e239,_0x105bcf){var _0x1d32dd=_0x43f8ac;return!(_0x105bcf<0x1||0x3<_0x105bcf||0x0==this['stFishEyeManager'][_0x29e239][_0x1d32dd(0x454)])&&_0x17c71b<=this[_0x1d32dd(0x4de)][_0x29e239][_0x1d32dd(0x1e5)]?this[_0x1d32dd(0x4de)][_0x29e239][_0x1d32dd(0x3c4)][_0x1d32dd(0x2ab)](_0x105bcf):-0x1;}},{'key':_0x43f8ac(0x544),'value':function(_0x16c02c,_0xc338c3,_0x2b49af,_0x96543,_0x4da71b,_0x1c0388,_0x42667f){var _0x4d5b8c=_0x43f8ac;return null==this[_0x4d5b8c(0x4de)][_0x16c02c][_0x4d5b8c(0x3c4)]?this['FECErrorCode']=_0x5a306e:0x0!=_0xc338c3||0x0!=_0x2b49af?_0x14f925:this['stFishEyeManager'][_0x16c02c]['emCorrectType']!=_0x462c41&&this[_0x4d5b8c(0x4de)][_0x16c02c][_0x4d5b8c(0x1e5)]!=_0x4beee9&&this[_0x4d5b8c(0x4de)][_0x16c02c][_0x4d5b8c(0x1e5)]!=_0x316080&&this[_0x4d5b8c(0x4de)][_0x16c02c]['emCorrectType']!=_0x1ae667?_0x332ff6:0x0==this[_0x4d5b8c(0x4de)][_0x16c02c][_0x4d5b8c(0x454)]?this['FECErrorCode']=_0xa54871:_0x96543<0x0||_0x4da71b<0x0||_0x1c0388<0x0||_0x42667f<0x0?_0x14f925:_0x13949e[_0x4d5b8c(0x4a6)]!=this['stFishEyeManager'][_0x16c02c]['pRender']['SR_SetDisplayRect'](_0x96543,_0x4da71b,_0x1c0388,_0x42667f)?this['FECErrorCode']=0x511:0x1;}},{'key':_0x43f8ac(0x40e),'value':function(_0x523b63,_0x1cd530){var _0x5c3e70=_0x43f8ac;return null==this[_0x5c3e70(0x4de)][_0x523b63][_0x5c3e70(0x3c4)]?this[_0x5c3e70(0x407)]=_0x5a306e:0x0==this['stFishEyeManager'][_0x523b63]['bInited']?this[_0x5c3e70(0x407)]=_0xa54871:_0x13949e[_0x5c3e70(0x4a6)]!=this[_0x5c3e70(0x4de)][_0x523b63][_0x5c3e70(0x3c4)][_0x5c3e70(0x3a7)](_0x45c70b,_0x1cd530)?this['FECErrorCode']=0x511:0x1;}},{'key':_0x43f8ac(0x380),'value':function(_0x17f479,_0x25517d){var _0x19f2c6=_0x43f8ac;switch(_0x17f479){case _0x40926f:return _0x4ebb4e==_0x25517d?_0x3468da[_0x19f2c6(0x4bf)]:_0x316080==_0x25517d||_0x1ae667==_0x25517d?_0x3468da['SR_DE_FISH_PANORAMA_WALL']:_0x17c71b==_0x25517d?_0x3468da[_0x19f2c6(0x2e3)]:_0x396f7c==_0x25517d?_0x3468da[_0x19f2c6(0x4dd)]:_0x11da1d==_0x25517d?_0x3468da[_0x19f2c6(0x36e)]:_0x5357b0==_0x25517d?_0x3468da[_0x19f2c6(0x26f)]:_0x3468da[_0x19f2c6(0x224)];case _0x3b95c4:return _0x4ebb4e==_0x25517d?_0x3468da[_0x19f2c6(0x4c2)]:_0x316080==_0x25517d?_0x3468da[_0x19f2c6(0x2f5)]:_0x4beee9==_0x25517d?_0x3468da[_0x19f2c6(0x3a8)]:_0x1ae667==_0x25517d?_0x3468da[_0x19f2c6(0x33c)]:_0x17c71b==_0x25517d?_0x3468da['SR_DE_FISH_SEMISPHERE']:_0x3ccddf==_0x25517d?_0x3468da[_0x19f2c6(0x3a9)]:_0x1a4011==_0x25517d?_0x3468da[_0x19f2c6(0x4f9)]:_0x396f7c==_0x25517d?_0x3468da['SR_DE_FISH_PLANET']:_0x3468da[_0x19f2c6(0x224)];case _0xf574bd:return _0x4ebb4e==_0x25517d?_0x3468da[_0x19f2c6(0x2b7)]:_0x316080==_0x25517d?_0x3468da[_0x19f2c6(0x208)]:_0x4beee9==_0x25517d?_0x3468da['SR_DE_FISH_PANORAMA_CEILING_180']:_0x1ae667==_0x25517d?_0x3468da[_0x19f2c6(0x33c)]:_0x17c71b==_0x25517d?_0x3468da[_0x19f2c6(0x2e3)]:_0x3ccddf==_0x25517d?_0x3468da['SR_DE_FISH_CYLINDER_CEILING']:_0x1a4011==_0x25517d?_0x3468da[_0x19f2c6(0x3f3)]:_0x396f7c==_0x25517d?_0x3468da['SR_DE_FISH_PLANET']:_0x3468da[_0x19f2c6(0x224)];default:return _0x3468da[_0x19f2c6(0x224)];}return _0x3468da[_0x19f2c6(0x224)];}}]),_0x5bd09b;}()),_0x3b510c=(function(){var _0x19c763=_0x99d5a2;function _0x3bf9bf(){var _0x494c7e=a0_0x1593;_0x160316(this,_0x3bf9bf),this[_0x494c7e(0x1d3)]=0x0,this[_0x494c7e(0x2a1)]=0x0,this[_0x494c7e(0x2da)]=0x0,this['lastDate']=0x0,this['preTimerStamp']=0x0;}return _0x5a3b91(_0x3bf9bf,[{'key':_0x19c763(0x3a0),'value':function(){var _0x2e8656=_0x19c763;this[_0x2e8656(0x1d3)]=this[_0x2e8656(0x404)]();}},{'key':'GetCurTime','value':function(){var _0x27eaee=_0x19c763;return this[_0x27eaee(0x2a1)]=0x3c*new Date()[_0x27eaee(0x4e6)]()*0x3c*0x3e8+0x3c*new Date()[_0x27eaee(0x4d1)]()*0x3e8+0x3e8*new Date()[_0x27eaee(0x44b)]()+new Date()['getMilliseconds'](),this[_0x27eaee(0x1df)]=new Date()[_0x27eaee(0x31a)](),this[_0x27eaee(0x2a1)];}},{'key':_0x19c763(0x20e),'value':function(){var _0x1ada06=_0x19c763,_0x22054f=this[_0x1ada06(0x404)]()-this[_0x1ada06(0x1d3)];return this['lastDate']!==new Date()['getDate']()&&(_0x22054f+=0x18*(new Date()[_0x1ada06(0x31a)]()-this[_0x1ada06(0x1df)])*0x3c*0x3c*0x3e8),_0x22054f;}},{'key':_0x19c763(0x257),'value':function(){var _0x3f3041=_0x19c763;this[_0x3f3041(0x1d3)]=0x0,this[_0x3f3041(0x2a1)]=0x0,this[_0x3f3041(0x2da)]=0x0,this['lastDate']=0x0,this[_0x3f3041(0x1fa)]=0x0;}}]),_0x3bf9bf;}());_0x95cd63=new(function(){var _0xea9a0b=_0x99d5a2;function _0x24ab98(){var _0x85f1d5=a0_0x1593,_0x41dda4=0x0<arguments[_0x85f1d5(0x4f1)]&&void 0x0!==arguments[0x0]?arguments[0x0]:null;_0x160316(this,_0x24ab98),this[_0x85f1d5(0x42d)]=null,this[_0x85f1d5(0x2ae)]=0x0,this[_0x85f1d5(0x48d)]=null,this[_0x85f1d5(0x3d5)]=null,this[_0x85f1d5(0x1fb)]=[],this[_0x85f1d5(0x313)]=!0x1,this[_0x85f1d5(0x353)]=0x0,this[_0x85f1d5(0x3bc)]=0x0,this[_0x85f1d5(0x329)]=!0x0,this[_0x85f1d5(0x24f)]=this['RenderFrame'][_0x85f1d5(0x336)](this),this[_0x85f1d5(0x23f)]=0x2,this[_0x85f1d5(0x439)]=0x1,this[_0x85f1d5(0x36b)]=0x1,this[_0x85f1d5(0x3fe)]=0xe,this[_0x85f1d5(0x3b8)]=!0x1,this[_0x85f1d5(0x509)]=!0x0,this[_0x85f1d5(0x2b0)]='',this[_0x85f1d5(0x2fb)]=!0x1,this[_0x85f1d5(0x4fa)]=!0x1,this[_0x85f1d5(0x455)]=0x0,this[_0x85f1d5(0x436)]=0x0,this[_0x85f1d5(0x52d)]=null,this[_0x85f1d5(0x4b1)]=[],this['curFrameInfo']={},this[_0x85f1d5(0x360)][_0x85f1d5(0x37a)]=0x0,this['sx']=0x0,this['sy']=0x0,this['sw']=0x0,this['sh']=0x0,this[_0x85f1d5(0x279)]=!0x1,this[_0x85f1d5(0x1e1)]=!0x1,this['displayRunning']=!0x0,this[_0x85f1d5(0x37d)]=null,this[_0x85f1d5(0x3d4)]=0x0,this[_0x85f1d5(0x39a)]=this[_0x85f1d5(0x455)]*this[_0x85f1d5(0x436)]*0x3/0x2,this['curFrameIsDisplay']=!0x0,(this[_0x85f1d5(0x4c3)]=null)!=_0x41dda4&&(this[_0x85f1d5(0x4c3)]=_0x41dda4),this[_0x85f1d5(0x2c7)]=_0x85f1d5(0x4eb),this[_0x85f1d5(0x3df)]=null;}return _0x5a3b91(_0x24ab98,[{'key':_0xea9a0b(0x462),'value':function(_0x5c1eba,_0x3b6194,_0x3446a3,_0x5be7bc){var _0xeaa69=_0xea9a0b;this[_0xeaa69(0x42d)]=_0x5c1eba,this[_0xeaa69(0x2ae)]=_0x3b6194,this[_0xeaa69(0x2c7)]=_0x5be7bc,this[_0xeaa69(0x3df)]=new _0x174ce8(),this[_0xeaa69(0x3df)][_0xeaa69(0x213)](this[_0xeaa69(0x42d)],this[_0xeaa69(0x2c7)]),this[_0xeaa69(0x3b2)](0x2),null==this['oVideoDecoder']&&(this['oVideoDecoder']=new _0x4c7866(_0x3446a3,this,this[_0xeaa69(0x4c3)]),this['frameBuffers']=this['oVideoDecoder']['ready_frames'],null!==this[_0xeaa69(0x3d5)]&&this['oVideoDecoder']['initDecoder']()),null==this[_0xeaa69(0x37d)]&&(this[_0xeaa69(0x37d)]=new _0x3b510c());}},{'key':_0xea9a0b(0x46f),'value':function(){var _0x339af2=_0xea9a0b;this[_0x339af2(0x4c3)][_0x339af2(0x41b)](),this[_0x339af2(0x4c3)][_0x339af2(0x507)](0x0),this[_0x339af2(0x4c3)][_0x339af2(0x497)]();}},{'key':_0xea9a0b(0x2cd),'value':function(_0x9ae98,_0x302653){var _0x50b2e9=_0xea9a0b,_0x172b73={};_0x172b73['port']=_0x302653[_0x50b2e9(0x3c6)],_0x172b73[_0x50b2e9(0x272)]=_0x302653['codecType'],_0x172b73[_0x50b2e9(0x3fd)]=_0x302653[_0x50b2e9(0x3fd)],_0x172b73[_0x50b2e9(0x495)]=_0x302653[_0x50b2e9(0x495)],_0x172b73[_0x50b2e9(0x36f)]=_0x302653['width'],_0x172b73['height']=_0x302653[_0x50b2e9(0x483)],_0x172b73['timeStamp']=_0x302653[_0x50b2e9(0x37a)],_0x172b73[_0x50b2e9(0x4d9)]=_0x302653['frameRate'],_0x172b73[_0x50b2e9(0x1dc)]=_0x302653[_0x50b2e9(0x1dc)],_0x172b73[_0x50b2e9(0x50a)]=_0x302653['interlace'],_0x172b73[_0x50b2e9(0x2c4)]=_0x302653[_0x50b2e9(0x2c4)],_0x172b73[_0x50b2e9(0x46d)]=_0x302653[_0x50b2e9(0x46d)],_0x172b73['cropRight']=_0x302653[_0x50b2e9(0x2fd)],_0x172b73[_0x50b2e9(0x2ba)]=_0x302653[_0x50b2e9(0x2ba)],_0x172b73[_0x50b2e9(0x268)]=_0x302653['cropBottom'],_0x172b73[_0x50b2e9(0x321)]=_0x302653[_0x50b2e9(0x321)],_0x172b73[_0x50b2e9(0x3e1)]=_0x302653[_0x50b2e9(0x3e1)],_0x172b73['week']=_0x302653[_0x50b2e9(0x451)],_0x172b73[_0x50b2e9(0x3cd)]=_0x302653[_0x50b2e9(0x3cd)],_0x172b73[_0x50b2e9(0x2d4)]=_0x302653['hour'],_0x172b73[_0x50b2e9(0x3f9)]=_0x302653[_0x50b2e9(0x3f9)],_0x172b73[_0x50b2e9(0x430)]=_0x302653[_0x50b2e9(0x430)],_0x172b73[_0x50b2e9(0x465)]=_0x302653[_0x50b2e9(0x465)],this[_0x50b2e9(0x4b1)][_0x50b2e9(0x51d)](_0x172b73),this['oVideoDecoder']['inputData'](_0x9ae98,_0x302653);}},{'key':_0xea9a0b(0x31e),'value':function(){var _0x269949=this;return new Promise(function(_0x5871c6,_0x42657f){var _0x564e7=a0_0x1593;_0x269949[_0x564e7(0x3d5)][_0x564e7(0x3b7)]()[_0x564e7(0x39e)](function(){var _0xe37438=_0x564e7;_0x269949[_0xe37438(0x4b1)][_0xe37438(0x21a)](0x0,_0x269949[_0xe37438(0x4b1)][_0xe37438(0x4f1)]),_0x269949['curFrameInfo']={},_0x269949['renderCurStatus']=0x2,_0x269949[_0xe37438(0x4c3)]?_0x269949['player'][_0xe37438(0x450)]():postMessage({'function':'resetEnd'}),_0x5871c6();},function(){_0x42657f();});});}},{'key':_0xea9a0b(0x341),'value':function(){var _0x46697f=_0xea9a0b;this['initTimer']=!0x1,this[_0x46697f(0x353)]=0x0,this[_0x46697f(0x3bc)]=0x0,this[_0x46697f(0x329)]=!0x0,null!=this[_0x46697f(0x37d)]&&this[_0x46697f(0x37d)]['timerReset'](),this[_0x46697f(0x24f)]=this[_0x46697f(0x24f)]['bind'](this),this[_0x46697f(0x23f)]=0x2,this[_0x46697f(0x31d)]=0x0,this[_0x46697f(0x402)]=null,this[_0x46697f(0x2fb)]=!0x1,this[_0x46697f(0x4fa)]=!0x1,this[_0x46697f(0x279)]=!0x1,this['getCropImageBMP']=!0x1,this[_0x46697f(0x390)]=!0x0,this[_0x46697f(0x52d)]=null,this['displayFrameInfo']['splice'](0x0,this[_0x46697f(0x4b1)][_0x46697f(0x4f1)]),this[_0x46697f(0x360)]={};}},{'key':'_destroyPlayCtrl','value':function(){var _0x22b82e=_0xea9a0b,_0x20110c=this;this['oVideoDecoder'][_0x22b82e(0x409)]()[_0x22b82e(0x39e)](function(){var _0x54c9c9=_0x22b82e;(_0x20110c[_0x54c9c9(0x3d5)]=null)!=_0x20110c[_0x54c9c9(0x3df)]&&(_0x20110c['oVideoRender'][_0x54c9c9(0x4c7)](),_0x20110c[_0x54c9c9(0x3df)]=null),_0x20110c[_0x54c9c9(0x341)](),_0x20110c[_0x54c9c9(0x37d)]=null,console[_0x54c9c9(0x514)](_0x54c9c9(0x3b3)),_0x20110c[_0x54c9c9(0x248)]=!0x1;},function(){var _0x1fc14b=_0x22b82e;console[_0x1fc14b(0x514)](_0x1fc14b(0x296));});}},{'key':_0xea9a0b(0x24f),'value':function(){var _0xaa4da6=_0xea9a0b,_0x51240b,_0x52d931,_0x449d91,_0x475db2=this;switch(this[_0xaa4da6(0x23f)]){case 0x0:this[_0xaa4da6(0x341)](),this[_0xaa4da6(0x31e)]()['then'](function(){setTimeout(function(){var _0x163b8e=a0_0x1593;_0x475db2[_0x163b8e(0x24f)]();},0x1);},function(){});break;case 0x2:this[_0xaa4da6(0x248)]?(this[_0xaa4da6(0x402)]=this[_0xaa4da6(0x304)](),-0x1==this['displayBuf']||0x0==this[_0xaa4da6(0x2ae)]?(null!=this['chosenFrame']&&(this[_0xaa4da6(0x31d)]=this['chosenFrame'][_0xaa4da6(0x264)],this[_0xaa4da6(0x396)](this['chosenFrame'])),requestAnimationFrame(this[_0xaa4da6(0x24f)])):null!=this['chosenFrame']?(this[_0xaa4da6(0x313)]&&!this['resetTimer']||(this[_0xaa4da6(0x37d)][_0xaa4da6(0x3a0)](),this[_0xaa4da6(0x313)]=!0x0,this[_0xaa4da6(0x329)]=!0x1,this[_0xaa4da6(0x353)]=this[_0xaa4da6(0x402)][_0xaa4da6(0x264)],this[_0xaa4da6(0x3bc)]=this[_0xaa4da6(0x402)]['timestamp']),this[_0xaa4da6(0x31d)]=this[_0xaa4da6(0x402)][_0xaa4da6(0x264)],_0x51240b=this[_0xaa4da6(0x31d)]-this['preTimeStamp'],_0x449d91=this[_0xaa4da6(0x31d)]-this[_0xaa4da6(0x3bc)],(0x1388<_0x51240b||_0x51240b<0x0||_0x449d91<0x0)&&(this[_0xaa4da6(0x37d)][_0xaa4da6(0x3a0)](),this['preTimeStamp']=this[_0xaa4da6(0x402)]['timestamp'],this[_0xaa4da6(0x3bc)]=this[_0xaa4da6(0x31d)]),(_0x51240b=(this[_0xaa4da6(0x31d)]-this[_0xaa4da6(0x3bc)])/this[_0xaa4da6(0x439)]-this['oRenderTimer'][_0xaa4da6(0x20e)]())<0xf&&-0xf<_0x51240b?(this['paint'](this[_0xaa4da6(0x402)]),this[_0xaa4da6(0x353)]=this['curTimeStamp'],this[_0xaa4da6(0x24f)]()):_0x51240b<0x0?(setTimeout(this[_0xaa4da6(0x396)](this[_0xaa4da6(0x402)]),0x1),this[_0xaa4da6(0x353)]=this[_0xaa4da6(0x31d)],this[_0xaa4da6(0x24f)]()):_0x52d931=setTimeout(function(){var _0x3b4cff=_0xaa4da6;0x2==_0x475db2[_0x3b4cff(0x23f)]?(_0x475db2[_0x3b4cff(0x396)](_0x475db2[_0x3b4cff(0x402)]),_0x475db2['preTimeStamp']=_0x475db2['curTimeStamp']):_0x475db2[_0x3b4cff(0x390)]=!0x1,_0x475db2[_0x3b4cff(0x24f)](),clearTimeout(_0x52d931);},_0x51240b-0x5)):(_0x449d91=0x5,0x2<this[_0xaa4da6(0x439)]&&(_0x449d91=0x1),setTimeout(function(){var _0xe89497=_0xaa4da6;_0x475db2[_0xe89497(0x24f)]();},_0x449d91))):setTimeout(function(){var _0x4c3ab8=_0xaa4da6;_0x475db2[_0x4c3ab8(0x24f)]();},0x5);break;case 0x3:setTimeout(function(){var _0x13b3c5=_0xaa4da6;_0x475db2[_0x13b3c5(0x410)](),_0x475db2[_0x13b3c5(0x24f)]();},0x5);break;case 0x5:this[_0xaa4da6(0x3b8)]&&(this['chosenFrame']=this['chooseFrame'](),null!=this[_0xaa4da6(0x402)]&&setTimeout(function(){var _0x5c3099=_0xaa4da6;_0x475db2[_0x5c3099(0x396)](_0x475db2[_0x5c3099(0x402)]),_0x475db2[_0x5c3099(0x3b8)]=!0x1;},0x1)),setTimeout(function(){var _0x3e7f51=_0xaa4da6;_0x475db2[_0x3e7f51(0x410)](),_0x475db2['RenderFrame']();},0x5);break;case 0x4:return void this[_0xaa4da6(0x4d4)]();default:return;}}},{'key':_0xea9a0b(0x396),'value':function(_0x7dffa7){var _0x494d32=_0xea9a0b,_0x4baac6,_0x28620e,_0x33d7b9=this;0x4!=this[_0x494d32(0x3d9)]&&null!=_0x7dffa7&&(this[_0x494d32(0x3d4)]===_0x7dffa7['timestamp']&&(this[_0x494d32(0x329)]=!0x0),null!=this[_0x494d32(0x3df)]&&(this[_0x494d32(0x3df)][_0x494d32(0x46a)](_0x7dffa7),null!==this['displayFrameInfoCB']&&this[_0x494d32(0x4e5)](_0x7dffa7['timestamp']),(this[_0x494d32(0x2fb)]||this['getImageBMP']||this[_0x494d32(0x279)]||this[_0x494d32(0x1e1)])&&(this[_0x494d32(0x455)]===_0x7dffa7['displayWidth']&&this[_0x494d32(0x436)]==_0x7dffa7[_0x494d32(0x436)]||(this[_0x494d32(0x455)]=_0x7dffa7['displayWidth'],this['displayHeight']=_0x7dffa7['displayHeight'],this[_0x494d32(0x39a)]=this[_0x494d32(0x455)]*this[_0x494d32(0x436)]*0x3/0x2),_0x4baac6=new Uint8Array(this[_0x494d32(0x39a)]),_0x28620e=_0x7dffa7[_0x494d32(0x32a)],_0x7dffa7['copyTo'](_0x4baac6)[_0x494d32(0x39e)](function(){_0x33d7b9['postImageData'](_0x4baac6,_0x28620e);})),this['firstFrame']&&(null!=this[_0x494d32(0x4c3)]?null!=this['player'][_0x494d32(0x2dc)]&&this[_0x494d32(0x4c3)]['FFCallBackFun']():postMessage({'function':'firstFrameCB','value':!0x0}),this['firstFrame']=!0x1)));}},{'key':_0xea9a0b(0x4e5),'value':function(_0x445787){var _0x372813=_0xea9a0b;if(0x0!=this[_0x372813(0x4b1)]['length']&&this[_0x372813(0x360)][_0x372813(0x37a)]!==_0x445787){for(var _0x3ded74={},_0x34ce27=0x0;_0x34ce27<this[_0x372813(0x4b1)][_0x372813(0x4f1)]&&(_0x3ded74=this[_0x372813(0x4b1)][_0x372813(0x21b)]())['timeStamp']!=_0x445787;_0x34ce27++);this[_0x372813(0x360)][_0x372813(0x3c6)]=_0x3ded74[_0x372813(0x3c6)],this[_0x372813(0x360)]['codecType']=_0x3ded74[_0x372813(0x272)],this[_0x372813(0x360)]['frameType']=_0x3ded74[_0x372813(0x3fd)],this[_0x372813(0x360)][_0x372813(0x495)]=_0x3ded74['frameSize'],this[_0x372813(0x360)][_0x372813(0x36f)]=_0x3ded74[_0x372813(0x36f)],this['curFrameInfo']['height']=_0x3ded74[_0x372813(0x483)],this['curFrameInfo'][_0x372813(0x37a)]=_0x3ded74[_0x372813(0x37a)],this[_0x372813(0x360)]['frameRate']=_0x3ded74[_0x372813(0x4d9)],this[_0x372813(0x360)][_0x372813(0x1dc)]=_0x3ded74[_0x372813(0x1dc)],this['curFrameInfo'][_0x372813(0x50a)]=_0x3ded74[_0x372813(0x50a)],this[_0x372813(0x360)][_0x372813(0x2c4)]=_0x3ded74[_0x372813(0x2c4)],this['curFrameInfo'][_0x372813(0x46d)]=_0x3ded74[_0x372813(0x46d)],this['curFrameInfo'][_0x372813(0x2fd)]=_0x3ded74[_0x372813(0x2fd)],this[_0x372813(0x360)]['cropTop']=_0x3ded74[_0x372813(0x2ba)],this[_0x372813(0x360)][_0x372813(0x268)]=_0x3ded74[_0x372813(0x268)],this[_0x372813(0x360)][_0x372813(0x321)]=_0x3ded74[_0x372813(0x321)],this[_0x372813(0x360)]['month']=_0x3ded74[_0x372813(0x3e1)],this[_0x372813(0x360)][_0x372813(0x451)]=_0x3ded74[_0x372813(0x451)],this[_0x372813(0x360)][_0x372813(0x3cd)]=_0x3ded74[_0x372813(0x3cd)],this[_0x372813(0x360)][_0x372813(0x2d4)]=_0x3ded74[_0x372813(0x2d4)],this[_0x372813(0x360)][_0x372813(0x3f9)]=_0x3ded74[_0x372813(0x3f9)],this[_0x372813(0x360)][_0x372813(0x430)]=_0x3ded74[_0x372813(0x430)],this[_0x372813(0x360)][_0x372813(0x465)]=_0x3ded74[_0x372813(0x465)],this[_0x372813(0x52d)](this['curFrameInfo']);}}},{'key':_0xea9a0b(0x342),'value':function(_0x3b6eb6,_0x3d131d){var _0x262edd=_0xea9a0b;this[_0x262edd(0x4c3)]?(this[_0x262edd(0x2fb)]&&(this[_0x262edd(0x2fb)]=!0x1,this[_0x262edd(0x4c3)][_0x262edd(0x2df)](_0x3b6eb6,this[_0x262edd(0x39a)],this[_0x262edd(0x455)],this[_0x262edd(0x436)],_0x262edd(0x529),_0x3d131d,0x0,0x0,0x0,0x0)),this[_0x262edd(0x4fa)]&&(this['getImageBMP']=!0x1,this[_0x262edd(0x4c3)][_0x262edd(0x2df)](_0x3b6eb6,this['yuvLength'],this[_0x262edd(0x455)],this['displayHeight'],'bmp',_0x3d131d,0x0,0x0,0x0,0x0)),this[_0x262edd(0x279)]&&(this[_0x262edd(0x279)]=!0x1,this['player'][_0x262edd(0x2df)](_0x3b6eb6,this[_0x262edd(0x39a)],this[_0x262edd(0x455)],this['displayHeight'],_0x262edd(0x529),_0x3d131d,this['sx'],this['sy'],this['sw'],this['sh'])),this[_0x262edd(0x1e1)]&&(this[_0x262edd(0x1e1)]=!0x1,this['player']['_GetImage2'](_0x3b6eb6,this['yuvLength'],this[_0x262edd(0x455)],this['displayHeight'],_0x262edd(0x317),_0x3d131d,this['sx'],this['sy'],this['sw'],this['sh']))):(this[_0x262edd(0x2fb)]&&(this['getImageJPEG']=!0x1,postMessage({'function':_0x262edd(0x3f5),'value':_0x3b6eb6[_0x262edd(0x3b1)],'size':this[_0x262edd(0x39a)],'width':this[_0x262edd(0x455)],'height':this['displayHeight'],'type':'jpeg','yuvType':_0x3d131d,'sx':0x0,'sy':0x0,'sw':0x0,'sh':0x0},[_0x3b6eb6[_0x262edd(0x3b1)]])),this['getImageBMP']&&(this[_0x262edd(0x4fa)]=!0x1,postMessage({'function':_0x262edd(0x3f5),'value':_0x3b6eb6[_0x262edd(0x3b1)],'size':this['yuvLength'],'width':this['displayWidth'],'height':this[_0x262edd(0x436)],'type':_0x262edd(0x317),'yuvType':_0x3d131d,'sx':0x0,'sy':0x0,'sw':0x0,'sh':0x0},[_0x3b6eb6[_0x262edd(0x3b1)]])),this[_0x262edd(0x279)]&&(this[_0x262edd(0x279)]=!0x1,postMessage({'function':_0x262edd(0x3f5),'value':_0x3b6eb6['buffer'],'size':this[_0x262edd(0x39a)],'width':this[_0x262edd(0x455)],'height':this['displayHeight'],'type':_0x262edd(0x529),'yuvType':_0x3d131d,'sx':this['sx'],'sy':this['sy'],'sw':this['sw'],'sh':this['sh']},[_0x3b6eb6['buffer']])),this[_0x262edd(0x1e1)]&&(this['getCropImageBMP']=!0x1,postMessage({'function':_0x262edd(0x3f5),'value':_0x3b6eb6['buffer'],'size':this[_0x262edd(0x39a)],'width':this[_0x262edd(0x455)],'height':this[_0x262edd(0x436)],'type':_0x262edd(0x317),'yuvType':_0x3d131d,'sx':this['sx'],'sy':this['sy'],'sw':this['sw'],'sh':this['sh']},[_0x3b6eb6[_0x262edd(0x3b1)]])));}},{'key':_0xea9a0b(0x304),'value':function(){var _0x5b4c7a=_0xea9a0b,_0x3af6b5=this;if(0x1==this[_0x5b4c7a(0x2ae)]){if(this['frameBuffers']['length']<0x2)return null;}else{if(this[_0x5b4c7a(0x1fb)][_0x5b4c7a(0x4f1)]<0x1)return null;}if(!this['curFrameIsDisplay'])return this[_0x5b4c7a(0x390)]=!0x0,this[_0x5b4c7a(0x1fb)][0x0];{if(null!=this[_0x5b4c7a(0x402)]&&(this[_0x5b4c7a(0x1fb)][_0x5b4c7a(0x21b)]()[_0x5b4c7a(0x493)](),this[_0x5b4c7a(0x402)][_0x5b4c7a(0x493)](),this['chosenFrame']=null),!this[_0x5b4c7a(0x3d5)][_0x5b4c7a(0x2e4)])return this['frameBuffers']['length']<0x1?null:this[_0x5b4c7a(0x1fb)][0x0];this['oVideoDecoder'][_0x5b4c7a(0x3b7)]()['then'](function(){var _0x4256dc=_0x5b4c7a;return _0x3af6b5[_0x4256dc(0x3d5)][_0x4256dc(0x2e4)]=!0x1,null;},function(){return null;});}}},{'key':'SetDisplayRegion','value':function(_0x1e036b,_0x5536fe,_0x1ab49a,_0x16bcc0){var _0x2c9369=_0xea9a0b;return null==this['oVideoRender']?0x0:(this['sx']=_0x1e036b,this['sy']=_0x5536fe,this['sw']=_0x1ab49a,this['sh']=_0x16bcc0,this[_0x2c9369(0x3df)][_0x2c9369(0x355)](_0x1e036b,_0x5536fe,_0x1ab49a,_0x16bcc0));}},{'key':'SetCurStatus','value':function(_0x27b202){this['renderCurStatus']=_0x27b202;}},{'key':_0xea9a0b(0x3a4),'value':function(){var _0x4b8a4a=_0xea9a0b,_0x437f9f=this['_GetFastSpeed'](this['nplaySpeed']);return this[_0x4b8a4a(0x48a)](_0x437f9f);}},{'key':_0xea9a0b(0x536),'value':function(){var _0x3d5697=_0xea9a0b,_0xe47372=this[_0x3d5697(0x492)](this[_0x3d5697(0x36b)]);return this[_0x3d5697(0x48a)](_0xe47372);}},{'key':_0xea9a0b(0x1d2),'value':function(_0x118a98){var _0x1a08d4=_0xea9a0b;if(_0x118a98)this[_0x1a08d4(0x3b2)](0x3);else{if(0x3!==this[_0x1a08d4(0x23f)])return-0x1;this['SetCurStatus'](0x2),this[_0x1a08d4(0x329)]=!0x0;}return 0x1;}},{'key':'_refresh','value':function(){var _0x4e609d=_0xea9a0b;0x0!=this[_0x4e609d(0x1fb)][_0x4e609d(0x4f1)]&&this['paint'](this[_0x4e609d(0x1fb)][0x0]);}},{'key':_0xea9a0b(0x419),'value':function(_0x12dbd8){var _0x5884f6=_0xea9a0b;if(_0x12dbd8)this[_0x5884f6(0x3b2)](0x5),this[_0x5884f6(0x3b8)]=!0x0;else{if(0x5!==this[_0x5884f6(0x23f)])return-0x1;this[_0x5884f6(0x3b2)](0x2),this['resetTimer']=!0x0,this[_0x5884f6(0x3b8)]=!0x1,this[_0x5884f6(0x48a)](0x1);}return 0x1;}},{'key':_0xea9a0b(0x4b7),'value':function(_0x2dbc59,_0xce39a4){var _0x4402be=_0xea9a0b;return null!=this[_0x4402be(0x3df)]&&this['oVideoRender'][_0x4402be(0x4b7)](_0x2dbc59,_0xce39a4);}},{'key':_0xea9a0b(0x286),'value':function(){var _0x201fe7=_0xea9a0b;return null!=this[_0x201fe7(0x3df)]&&this[_0x201fe7(0x3df)][_0x201fe7(0x286)]();}},{'key':_0xea9a0b(0x417),'value':function(){var _0x5d0e83=_0xea9a0b;return this[_0x5d0e83(0x31d)];}},{'key':_0xea9a0b(0x48a),'value':function(_0x275baf){var _0x3287b8=_0xea9a0b;switch(_0x275baf){case-0x10:case-0x8:case-0x4:case-0x2:case 0x1:case 0x2:case 0x4:case 0x8:case 0x10:case 0x20:case 0x40:break;default:return-0x1;}return _0x275baf!==this[_0x3287b8(0x36b)]&&(this[_0x3287b8(0x36b)]=_0x275baf,this[_0x3287b8(0x439)]=0x0<_0x275baf?_0x275baf:-0x1/_0x275baf,console[_0x3287b8(0x514)](_0x3287b8(0x349)+this[_0x3287b8(0x439)]),this[_0x3287b8(0x329)]=!0x0,this[_0x3287b8(0x3b8)]=!0x1,0x2!=this[_0x3287b8(0x23f)]&&this[_0x3287b8(0x3b2)](0x2)),0x1;}},{'key':_0xea9a0b(0x3f8),'value':function(_0x145035){var _0x5d2d4d=0x0;switch(_0x145035){case-0x10:_0x5d2d4d=-0x8;break;case-0x8:_0x5d2d4d=-0x4;break;case-0x4:_0x5d2d4d=-0x2;break;case-0x2:_0x5d2d4d=0x1;break;case 0x1:_0x5d2d4d=0x2;break;case 0x2:_0x5d2d4d=0x4;break;case 0x4:_0x5d2d4d=0x8;break;case 0x8:_0x5d2d4d=0x10;break;case 0x10:_0x5d2d4d=0x20;break;case 0x20:_0x5d2d4d=0x40;break;default:_0x5d2d4d=0x0;}return _0x5d2d4d;}},{'key':_0xea9a0b(0x492),'value':function(_0x187aa1){var _0x2748d1=0x0;switch(_0x187aa1){case-0x8:_0x2748d1=-0x10;break;case-0x4:_0x2748d1=-0x8;break;case-0x2:_0x2748d1=-0x4;break;case 0x1:_0x2748d1=-0x2;break;case 0x2:_0x2748d1=0x1;break;case 0x4:_0x2748d1=0x2;break;case 0x8:_0x2748d1=0x4;break;case 0x10:_0x2748d1=0x8;break;case 0x20:_0x2748d1=0x10;break;case 0x40:_0x2748d1=0x20;break;default:_0x2748d1=0x0;}return _0x2748d1;}},{'key':_0xea9a0b(0x2b8),'value':function(_0x36ab92){var _0x5cdd52=_0xea9a0b;return this[_0x5cdd52(0x3fe)]=_0x36ab92,0x1;}},{'key':_0xea9a0b(0x3be),'value':function(){var _0x48423f=_0xea9a0b;return this[_0x48423f(0x2fb)]=!0x0,this['getImageType']=_0x48423f(0x529),0x1;}},{'key':_0xea9a0b(0x40a),'value':function(){var _0xdf5952=_0xea9a0b;return this['getImageBMP']=!0x0,this[_0xdf5952(0x2b0)]=_0xdf5952(0x317),0x1;}},{'key':'GetCropJPEG','value':function(){var _0x13bd51=_0xea9a0b;return this[_0x13bd51(0x279)]=!0x0,this['getImageType']='Cropjpeg',0x1;}},{'key':'GetCropBMP','value':function(){var _0x227fef=_0xea9a0b;return this[_0x227fef(0x1e1)]=!0x0,this[_0x227fef(0x2b0)]='Cropbmp',0x1;}},{'key':_0xea9a0b(0x534),'value':function(_0x28b7b1){var _0x59e2cf=_0xea9a0b;return this[_0x59e2cf(0x3d4)]=_0x28b7b1,0x1;}},{'key':_0xea9a0b(0x49c),'value':function(){var _0x29ca06=_0xea9a0b;return this[_0x29ca06(0x3d5)][_0x29ca06(0x49c)](),0x1;}},{'key':'SetAntialias','value':function(_0x1233e9){var _0x366f21=_0xea9a0b;return null!=this[_0x366f21(0x3df)]?this[_0x366f21(0x3df)][_0x366f21(0x41f)](_0x1233e9):0x0;}},{'key':_0xea9a0b(0x427),'value':function(_0x4999e8,_0x37b739){var _0x368bd9=_0xea9a0b;return this[_0x368bd9(0x52d)]=_0x37b739?_0x4999e8:null,0x1;}},{'key':'FEC_SetCanvasID','value':function(_0x384d1b){var _0x5bb786=_0xea9a0b;return'2d'===this[_0x5bb786(0x2c7)]||'2D'===this[_0x5bb786(0x2c7)]?(console[_0x5bb786(0x514)](_0x5bb786(0x2d8),'color:red'),0x0):null!=this[_0x5bb786(0x3df)]?this[_0x5bb786(0x3df)][_0x5bb786(0x2bf)](_0x384d1b):0x0;}},{'key':'FEC_ResetCorrectType','value':function(_0x536d6d,_0x5449e1,_0x29ecc8){var _0x4ac92b=_0xea9a0b;return'2d'===this[_0x4ac92b(0x2c7)]||'2D'===this[_0x4ac92b(0x2c7)]?(console[_0x4ac92b(0x514)](_0x4ac92b(0x2d8),_0x4ac92b(0x4cf)),0x0):null!=this['oVideoRender']?this['oVideoRender'][_0x4ac92b(0x49a)](_0x536d6d,_0x5449e1,_0x29ecc8):0x0;}},{'key':'FEC_GetPort','value':function(_0x2f4e33,_0x11e80b){var _0x21d93d=_0xea9a0b;return'2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log'](_0x21d93d(0x2d8),'color:red'),0x0):null!=this['oVideoRender']?this[_0x21d93d(0x3df)]['FEC_GetPort'](_0x2f4e33,_0x11e80b):0x0;}},{'key':_0xea9a0b(0x4e0),'value':function(_0x568f9b){var _0xcefcda=_0xea9a0b;return'2d'===this[_0xcefcda(0x2c7)]||'2D'===this[_0xcefcda(0x2c7)]?(console['log']('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct',_0xcefcda(0x4cf)),0x0):null!=this[_0xcefcda(0x3df)]?this[_0xcefcda(0x3df)][_0xcefcda(0x4e0)](_0x568f9b):0x0;}},{'key':_0xea9a0b(0x362),'value':function(_0x4ba09b,_0x283978){var _0x202c08=_0xea9a0b;return'2d'===this[_0x202c08(0x2c7)]||'2D'===this[_0x202c08(0x2c7)]?(console[_0x202c08(0x514)](_0x202c08(0x2d8),_0x202c08(0x4cf)),0x0):null!=this[_0x202c08(0x3df)]?this['oVideoRender'][_0x202c08(0x362)](_0x4ba09b,_0x283978):0x0;}},{'key':_0xea9a0b(0x4b6),'value':function(_0x34cd97,_0x373ca6,_0x18c2d3){var _0x529723=_0xea9a0b;return'2d'===this[_0x529723(0x2c7)]||'2D'===this[_0x529723(0x2c7)]?(console[_0x529723(0x514)](_0x529723(0x2d8),_0x529723(0x4cf)),0x0):null!=this[_0x529723(0x3df)]?this[_0x529723(0x3df)][_0x529723(0x4b6)](_0x34cd97,_0x373ca6,_0x18c2d3):0x0;}},{'key':_0xea9a0b(0x22e),'value':function(_0x196177,_0x2827e7){var _0x20c1df=_0xea9a0b;return'2d'===this[_0x20c1df(0x2c7)]||'2D'===this[_0x20c1df(0x2c7)]?(console[_0x20c1df(0x514)](_0x20c1df(0x2d8),_0x20c1df(0x4cf)),0x0):null!=this[_0x20c1df(0x3df)]?this[_0x20c1df(0x3df)][_0x20c1df(0x22e)](_0x196177,_0x2827e7):0x0;}},{'key':_0xea9a0b(0x281),'value':function(_0x47c68c,_0x68e551){var _0x595882=_0xea9a0b;return'2d'===this[_0x595882(0x2c7)]||'2D'===this[_0x595882(0x2c7)]?(console['log'](_0x595882(0x2d8),'color:red'),0x0):null!=this[_0x595882(0x3df)]?this[_0x595882(0x3df)]['FEC_SetWnd'](_0x47c68c,_0x68e551):0x0;}},{'key':'FEC_Disable','value':function(_0x16811c,_0xd2488b,_0x4f7c73){var _0x3d73e2=_0xea9a0b;return'2d'===this[_0x3d73e2(0x2c7)]||'2D'===this[_0x3d73e2(0x2c7)]?(console[_0x3d73e2(0x514)]('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct',_0x3d73e2(0x4cf)),0x0):null!=this['oVideoRender']?this[_0x3d73e2(0x3df)][_0x3d73e2(0x3ed)](_0x16811c,_0xd2488b,_0x4f7c73):0x0;}},{'key':'FEC_DelPort','value':function(_0xbdf370){var _0x2a2289=_0xea9a0b;return'2d'===this['renderEngine']||'2D'===this[_0x2a2289(0x2c7)]?(console[_0x2a2289(0x514)](_0x2a2289(0x2d8),'color:red'),0x0):null!=this[_0x2a2289(0x3df)]?this[_0x2a2289(0x3df)][_0x2a2289(0x3fb)](_0xbdf370):0x0;}},{'key':_0xea9a0b(0x544),'value':function(_0x30b6ba,_0x2ff878,_0x11104e,_0x4fd018,_0x85a955,_0x119c7d,_0x568b0b){var _0x5569dd=_0xea9a0b;return'2d'===this[_0x5569dd(0x2c7)]||'2D'===this['renderEngine']?(console[_0x5569dd(0x514)]('%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct',_0x5569dd(0x4cf)),0x0):null!=this[_0x5569dd(0x3df)]?this[_0x5569dd(0x3df)][_0x5569dd(0x544)](_0x30b6ba,_0x2ff878,_0x11104e,_0x4fd018,_0x85a955,_0x119c7d,_0x568b0b):0x0;}},{'key':_0xea9a0b(0x40e),'value':function(_0xcbb05,_0x481dd8){var _0x5951c0=_0xea9a0b;return'2d'===this[_0x5951c0(0x2c7)]||'2D'===this['renderEngine']?(console['log'](_0x5951c0(0x2d8),_0x5951c0(0x4cf)),0x0):null!=this['oVideoRender']?this[_0x5951c0(0x3df)][_0x5951c0(0x40e)](_0xcbb05,_0x481dd8):0x0;}}]),_0x24ab98;}())(),self[_0x99d5a2(0x266)]=function(_0x4a7850){var _0x4e129c=_0x99d5a2,_0x7023b=_0x4a7850[_0x4e129c(0x39d)];switch(_0x7023b[_0x4e129c(0x429)]){case _0x4e129c(0x462):_0x95cd63[_0x4e129c(0x462)](_0x7023b[_0x4e129c(0x42d)],_0x7023b[_0x4e129c(0x2ae)],_0x7023b[_0x4e129c(0x4b5)],_0x7023b[_0x4e129c(0x2c7)]);break;case _0x4e129c(0x2cd):var _0x215010=new Uint8Array(_0x7023b[_0x4e129c(0x41a)]),_0x487c62=_0x7023b[_0x4e129c(0x2fc)];_0x95cd63[_0x4e129c(0x2cd)](_0x215010,_0x487c62),0x0;break;case _0x4e129c(0x433):null===_0x95cd63&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x399)}),_0x95cd63['SetDisplayRegion'](_0x7023b['sx'],_0x7023b['sy'],_0x7023b['sw'],_0x7023b['sh']);break;case'stop':null===_0x95cd63&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x399)}),_0x95cd63[_0x4e129c(0x3b2)](0x4);let _0x546ac0=setInterval(()=>{var _0x4f30b8=_0x4e129c;_0x95cd63[_0x4f30b8(0x248)]||(_0x95cd63=null,self[_0x4f30b8(0x4ab)]({'function':'stop'}),clearInterval(_0x546ac0),_0x546ac0=null,self[_0x4f30b8(0x493)](),console['log']('>>>JS\\x2003\\x20destroy\\x20oVideoPlayCtrl\\x20and\\x20worker'));},0x2);break;case'fast':null===_0x95cd63&&self['postMessage']({'function':_0x4e129c(0x399)}),0x1!==_0x95cd63[_0x4e129c(0x3a4)]()&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x4ba)});break;case'slow':null===_0x95cd63&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x399)}),0x1!==_0x95cd63[_0x4e129c(0x536)]()&&self[_0x4e129c(0x4ab)]({'function':'paraError'});break;case _0x4e129c(0x2b8):null===_0x95cd63&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x399)}),0x1!==_0x95cd63[_0x4e129c(0x2b8)](_0x7023b[_0x4e129c(0x38a)])&&self[_0x4e129c(0x4ab)]({'function':'paraError'});break;case'Pause':null===_0x95cd63&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x399)}),0x1!==_0x95cd63['Pause'](_0x7023b[_0x4e129c(0x38a)])&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x4ba)});break;case _0x4e129c(0x419):null===_0x95cd63&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x399)}),0x1!==_0x95cd63[_0x4e129c(0x419)](_0x7023b['value'])&&self['postMessage']({'function':'paraError'});break;case _0x4e129c(0x4b7):null===_0x95cd63&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x399)}),0x1!==_0x95cd63[_0x4e129c(0x4b7)](_0x7023b[_0x4e129c(0x36f)],_0x7023b[_0x4e129c(0x483)])&&self['postMessage']({'function':_0x4e129c(0x4ba)});break;case _0x4e129c(0x286):null===_0x95cd63&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x399)}),0x1!==_0x95cd63[_0x4e129c(0x286)]()&&self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x4ba)});break;case _0x4e129c(0x417):null===_0x95cd63&&self[_0x4e129c(0x4ab)]({'function':'OrderError'}),_0x215010=_0x95cd63[_0x4e129c(0x417)](),0x0!==_0x215010&&self[_0x4e129c(0x4ab)]({'function':'GetPlayedTime','value':_0x215010});break;case _0x4e129c(0x35b):_0x95cd63['SetCurStatus'](0x0);break;case _0x4e129c(0x3be):_0x95cd63['GetJPEG']();break;case _0x4e129c(0x40a):_0x95cd63[_0x4e129c(0x40a)]();break;case _0x4e129c(0x393):_0x95cd63[_0x4e129c(0x393)]();break;case _0x4e129c(0x464):_0x95cd63[_0x4e129c(0x464)]();break;case'SetDecodeFrameType':_0x95cd63[_0x4e129c(0x534)](_0x7023b[_0x4e129c(0x264)]);break;case _0x4e129c(0x2c4):_0x95cd63[_0x4e129c(0x49c)]();break;case _0x4e129c(0x41f):_0x95cd63[_0x4e129c(0x41f)](_0x7023b[_0x4e129c(0x38a)]);break;case _0x4e129c(0x427):_0x95cd63['SetFrameInfoCallBack'](_0x29c143=>{var _0x3a09fa=_0x4e129c;self[_0x3a09fa(0x4ab)]({'function':_0x3a09fa(0x427),'curFrameInfo':_0x29c143});},_0x7023b[_0x4e129c(0x38a)]);case'FEC_SetCanvasID':_0x95cd63['FEC_SetCanvasID'](_0x7023b[_0x4e129c(0x280)]);break;case _0x4e129c(0x3a5):_0x95cd63[_0x4e129c(0x49a)](_0x7023b[_0x4e129c(0x370)],_0x7023b['placeType'],_0x7023b[_0x4e129c(0x2e0)]);break;case _0x4e129c(0x363):_0x95cd63[_0x4e129c(0x20d)](_0x7023b[_0x4e129c(0x3a1)],_0x7023b[_0x4e129c(0x2e0)]);break;case _0x4e129c(0x53f):_0x95cd63[_0x4e129c(0x4e0)](_0x7023b['fishSubPort']);break;case _0x4e129c(0x3f6):_0x95cd63[_0x4e129c(0x362)](_0x7023b[_0x4e129c(0x370)],_0x7023b['param2d']);break;case _0x4e129c(0x2a9):_0x95cd63[_0x4e129c(0x4b6)](_0x7023b['fishSubPort'],_0x7023b[_0x4e129c(0x49e)],_0x7023b[_0x4e129c(0x47c)]);break;case _0x4e129c(0x358):_0x487c62=_0x95cd63[_0x4e129c(0x22e)](_0x7023b[_0x4e129c(0x370)],_0x7023b[_0x4e129c(0x49e)]),self[_0x4e129c(0x4ab)]({'function':_0x4e129c(0x358),'fValue':_0x487c62});break;case'FECSetWnd':_0x95cd63[_0x4e129c(0x281)](_0x7023b['fishSubPort'],_0x7023b['offscrrenCnv']);break;case _0x4e129c(0x530):_0x95cd63[_0x4e129c(0x3ed)](_0x7023b['fishSubPort'],_0x7023b[_0x4e129c(0x28a)],_0x7023b[_0x4e129c(0x4aa)]);break;case _0x4e129c(0x51b):_0x95cd63[_0x4e129c(0x3fb)](_0x7023b[_0x4e129c(0x370)]);break;case _0x4e129c(0x42b):_0x95cd63['FEC_SetDisplayRegion'](_0x7023b[_0x4e129c(0x370)],_0x7023b[_0x4e129c(0x50c)],_0x7023b[_0x4e129c(0x491)],_0x7023b['sx'],_0x7023b['sy'],_0x7023b['sw'],_0x7023b['sh']);break;case'FECSetBackCilling':_0x95cd63[_0x4e129c(0x40e)](_0x7023b['fishSubPort'],_0x7023b[_0x4e129c(0x52f)]);}};})());})()));function a0_0xd9f6(){var _0x382391=['fPTZX','regionSy','bOrtho','curstatus','fRotateX','DeInit','Missing_Module','bCullBack','Invalid_Opcode','oVideoRender','fSinV','month','Get_Char_Index','GetFishParam','num_faces','SR_Init','done','CLAMP_TO_EDGE','Generator\\x20is\\x20already\\x20running','create','SR_ERR_FREETYPE_RESOURCE','pPTZSetColor','SR_DrawLines','FEC_Disable','bPortAllocated','position','Invalid_Argument','9876336DDWcsr','IsOutofImage','SR_DE_FISH_CYLINDER_SPLIT_CEILING','fZoom','imageYUV','FECSetParam','trunc','_GetFastSpeed','minute','bRecreateAntia','FEC_DelPort','flush','frameType','displayBuf','nCylinderPosSize','SR_GetPTZPort','DEFAULT','chosenFrame','style_flags','GetCurTime','fCosV','nSemiSphereTexSize','FECErrorCode','bindBuffer','destroyDecoder','GetBMP','GetPTZDisplayMode','fPTZY','toStringTag','FEC_SetBackCilling','bBlack','_refresh','Raster_Uninitialized','webgl2','abrupt','SR_SetDisplayRect','createTexture','bufferData','GetPlayedTime','IGNORE_TRANSFORM','OneByOne','rawData','JSPlayM4_Stop','sqrt','InitCamera','SR_DelSubPort','SetAntialias','SetNear','Invalid_Stream_Handle','mainSubPort','\\x0a\\x20\\x20\\x20\\x20varying\\x20highp\\x20vec2\\x20v_uv;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x0a\\x20\\x20\\x20\\x20void\\x20main(void)\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20texture2D(texture,\\x20v_uv);\\x0a\\x20\\x20\\x20\\x20}\\x0a','Raster_Corrupted','activeTexture','Out_Of_Memory','SetFrameInfoCallBack','COMPUTE_METRICS','command','DEF_In_Glyf_Bytecode','FECSetDisplayRegion','MAX','canvas','completion','arg','second','bLoop','acos','SetDisplayRegion','info','message','displayHeight','setPrototypeOf','@@iterator','playSpeed','SetOrtho','stop','Too_Many_Instruction_Defs','nBasePTZPointNum','glyph','Raster_Overflow','LINEAR_MIPMAP_NEAREST','pCylinderPos','glLinePosBuffer','\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec3\\x20position;\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20\\x20color;\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20\\x20float\\x20\\x20pp;\\x0a\\x20\\x20\\x20\\x20varying\\x20\\x20\\x20vec4\\x20\\x20colorOut;\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20vec4(position.x,\\x20position.y,\\x200.0,\\x201.0);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20pp\\x20=\\x20position.z;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20colorOut\\x20=\\x20color;\\x0a\\x20\\x20\\x20\\x20}\\x0a','FT_Init_FreeType','decodeProcess','clearBufferfi','bPTZSelected','mainCanvasID','Bbx_Too_Big','fScale','getSeconds','Invalid_CharMap_Format','264\\x20hard\\x20decoder','symbol','Invalid_Frame_Operation','JSPlayM4_ResetEnd','week','Too_Many_Function_Defs','nMaxFillBlockTriNum','bInited','displayWidth','Missing_Bitmap','nDrawFontHeight','SetPitch','deleteBuffer','RGBA','pRenderParam','SetRoll','VERTEX_SHADER','288yOchCO','regionSx','stCycleParam','PEDANTIC','init','Invalid_Face_Handle','GetCropBMP','milliseconds','Too_Many_Drivers','Invalid_Stream_Read','configured','fRXRight','DisplayFrame','emEffect','pfuncCBOut','cropLeft','Unlisted_Object','HardDecodeError','nBlockShaderProgram','Could_Not_Find_Context','Raster_Negative_Height','Invalid_Library_Handle','Cannot_Open_Stream','getShaderInfoLog','ascender','nValidSubPort','fLeft','uniformMatrix4fv','Invalid_CharMap_Handle','pRectPoints','fValue','FT_Get_Kerning','method','oVideoHandle','GetPitch','Invalid_Glyph_Format','deleteProgram','height','GetScale','SR_AddSubPort','GetFishPTZFloor','BLEND','FreetypeWasmLoadedCB','fRadiusTop','_SetPlaySpeed','Invalid_Glyph_Index','23456990eUZFpy','context','decoderObj','onload','GetPanoPTZFloor','regionNum','_GetSlowSpeed','close','Locations_Missing','frameSize','max_advance_width','JSPlayM4_Play','fAlpha','suspendedYield','FEC_ResetCorrectType','LIGHT','SetStreamEnd','SR_SetAntialias','upDateType','isGeneratorFunction','TEXTURE_WRAP_S','row','SR_SetPTZColor','fPTZParam','GetPTZPoints','bAntialias','SR_OK','mainFECCorrect','_bind','afterLoc','clearContext','postMessage','root','GetDisplayEffect','Invalid_Table','Render_Glyph','Set_Char_Size','displayFrameInfo','SR_Destroy','processData1','TEXTURE_MAG_FILTER','sab','FEC_SetViewParam','SetCanvasSize','\\x0avarying\\x20highp\\x20vec2\\x20v_uv;\\x0auniform\\x20sampler2D\\x20texture;\\x0avoid\\x20main(void)\\x20{\\x0a\\x20\\x20gl_FragColor\\x20=\\x20texture2D(texture,\\x20v_uv);\\x0a}\\x0a','createShader','paraError','canvas\\x20width:','nPTZRectNum','complete','4516myHmdm','SR_DE_FISH_PTZ_WALL','pCylinderTex','Invalid_Composite','SR_DE_FISH_PTZ_FLOOR','player','bRecreateTex','reportError','bBackground','ReleaseDisplay','SR_SetViewParam','SR_DE_FISH_SPHERE','NO_AUTOHINT','FT_Render_Glyph','codedHeight','Load_Char','depthFunc','color:red','Too_Many_Hints','getMinutes','configure','Corrupted_Font_Glyphs','_destroyPlayCtrl','pUserOut','enDisplayEffect','ComputePTZPoints','formatVideoDecoderConfigure','frameRate','NORMAL','%c\\x2020230516\\x20hardDecoder\\x20not\\x20support\\x20correctType:%d','SR_DE_FISH_CYLINDER_CEILING','SR_DE_FISH_PLANET','stFishEyeManager','getProgramInfoLog','FEC_Enable','prev','GetPanoPTZWall','SR_ERR_CANVAS','script','respondFrameInfoCB','getHours','UpdateCircyeParam','InitFECParam','regeneratorRuntime','Invalid_Stream_Seek','webgl','FT_Get_Char_Index','fRY2','texture','fNear','SR_SetFishParam','length','FLOAT','GetPlaceType','Post_Table_Missing','SR_DE_FISH_PANORAMA_CEILING_180','apply','NO_SCALE','nCylinderTexSize','SR_DE_FISH_CYLINDER_SPLIT_FLOOR','getImageBMP','__esModule','glLineClrBuffer','async','bInit','webgl\\x20render','next','FECShowMode','frameDisplayWidth','GetRenderParam','bitmap','arrayBuffer','\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20position;\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20\\x20texCoord;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec4\\x20\\x20pp;\\x20\\x0a\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.x\\x20\\x20=\\x20position.x;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.y\\x20\\x20=\\x20position.y;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.z\\x20\\x20=\\x200.1;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position.w\\x20\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20pp\\x20=\\x20texCoord;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a','JSPlayM4_SetDecodeEngine','Cannot_Render_Glyph','firstFrame','interlace','glBlockClrBuffer','type','fPTZZoom','hardDecode\\x20reportError:','pstFontColor','GetPointPano2FishFloor','SR_GetFishParam','\\x0aattribute\\x20vec3\\x20xy;\\x0aattribute\\x20vec2\\x20uv;\\x0avarying\\x20highp\\x20vec2\\x20v_uv;\\x0avoid\\x20main(void)\\x20{\\x0a\\x20\\x20gl_Position\\x20=\\x20vec4(xy,\\x201.0);\\x0a\\x20\\x20//\\x20Map\\x20vertex\\x20coordinates\\x20(-1\\x20to\\x20+1)\\x20to\\x20UV\\x20coordinates\\x20(0\\x20to\\x201).\\x0a\\x20\\x20//\\x20UV\\x20coordinates\\x20are\\x20Y-flipped\\x20relative\\x20to\\x20vertex\\x20coordinates.\\x0a\\x20\\x20//v_uv\\x20=\\x20vec2((1.0\\x20+\\x20xy.x)\\x20/\\x202.0,\\x20(1.0\\x20-\\x20xy.y)\\x20/\\x202.0);\\x0a\\x20\\x20v_uv\\x20=\\x20uv;\\x0a}\\x0a','bBackGround','log','__proto__','nSurfaceTexture','5769620COWrYT','LINEAR_DESIGN','FEC_ERR_ENABLED','text/javascript','FECDelPort','resolve','push','ctx','scale(1)','pstFontBGLines','style_name','GetView','GetPointFish2PanoCeiling','SetPTZDisplayMode','ComputeAngleHorizontal','TRIANGLES','createProgram','fVAngleSin','jpeg','drawArrays','decoderCurStatus','SetPTZColor','displayFrameInfoCB','vertexPosBuffer','bValue','FECDisable','[object\\x20Generator]','prototype','GetPTZPort','SetDecodeFrameType','Library:init\\x20','slow','FT_Load_Char','nPanoPTZPointNum','nSubPort','nSemiSpherePosSize','resultName','underflow','texturePosBuffer','FreetypeLibHandle','FECEnable','nMaxPointNum','ready_frames','fill','key','FEC_SetDisplayRegion','prefer-software','COLOR_BUFFER_BIT','SR_GetCanvasSize','GetPointPano2FishWall','underline_position','subarray','fPTZPositionY','default','disable','Module','Invalid_Slot_Handle','SR_SetCallBack','fWideScanOffset','Invalid_Frame_Read','Pause','startTime','TEXTURE_MIN_FILTER','FORCE_AUTOHINT','matProj','Stack_Underflow','body','GetPointPano2FishCeiling','NONE','>>>JS\\x2001\\x20destroy\\x20decoderObj','frameNum','IsPortAllocated','nFontWidth','lastDate','bbox','getCropImageBMP','fHAngleSin','sCanvasID','experimental-webgl','emCorrectType','abs','tryEntries','Too_Few_Arguments','videoShaderProgram','354880YIvBTM','GetFishPTZCeiling','hardwareAcceleration','UpdatePTZPosition','pFishParam','vecUp','LCD','GeneratorFunction','onlySupportedWebGL1','Library:done\\x20','Missing_Fontboundingbox_Field','nCut','GetPTZColor','matView','fRX1','BITMAP_METRICS_ONLY','preTimerStamp','frameBuffers','needRect','SR_ERR_FREETYPE_INIT','nDisplayEffect','getAttribLocation','rval','dispatchException','sin','SR_ERR_PARAM','Too_Many_Extensions','nLineWidth','regionSh','ComputeAngleVertical','SR_DE_FISH_PANORAMA_CEILING_360','nStreamEnd','LINEAR','COMPOSITE','sent','FEC_GetPort','GetTimerWalk','Name_Table_Missing','SetYaw','num_glyphs','regeneratorRuntime\\x20=\\x20r','InitDisplay','regionSw','bInitFreetype','nPointNum','initDecoder','getShaderParameter','Missing_Property','splice','shift','nOriPTZPointNum','throw','style','\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20vec2\\x20v_uv;\\x0auniform\\x20sampler2D\\x20texture;\\x20\\x20\\x0auniform\\x20float\\x20fHAngleCos;\\x20\\x20\\x0auniform\\x20float\\x20fHAngleSin;\\x20\\x0auniform\\x20float\\x20fVAngleCos;\\x20\\x20\\x0auniform\\x20float\\x20fVAngleSin;\\x20\\x20\\x0auniform\\x20float\\x20fZoom;\\x0a\\x0auniform\\x20float\\x20fRX1;\\x20\\x0auniform\\x20float\\x20fRX2;\\x20\\x0auniform\\x20float\\x20fRY1;\\x20\\x0auniform\\x20float\\x20fRY2;\\x20\\x0a\\x0avoid\\x20main()\\x0a{\\x0a\\x20\\x20\\x20\\x20float\\x20r,g,b;\\x0a\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin1;\\x0a\\x20\\x20\\x20\\x20vec4\\x20origin2;\\x0a\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z1;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20z2;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20dnew;\\x0a\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<Բ��ʵ������\\x0a\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<�뾶ʵ�ʳ���\\x0a\\x20\\x20\\x20\\x20origin1.s\\x20=\\x20v_uv.s\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin1.t\\x20=\\x20v_uv.t\\x20-\\x200.5;\\x0a\\x20\\x20\\x20\\x20z1\\x20=\\x20fZoom\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20origin1.s\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20(origin1.t*fVAngleCos\\x20+\\x20z1*fVAngleSin);\\x0a\\x20\\x20\\x20\\x20z2\\x20=\\x20z1*fVAngleCos\\x20-\\x20origin1.t*fVAngleSin;\\x0a\\x0a\\x20\\x20\\x20\\x20dnew\\x20=\\x20sqrt(origin2.s*origin2.s\\x20+\\x20origin2.t*origin2.t)\\x20;\\x0a\\x20\\x20\\x20\\x20float\\x20d\\x20=\\x20sqrt(origin2.s*origin2.s\\x20+\\x20origin2.t*origin2.t\\x20+\\x20z2*z2);\\x0a\\x20\\x20\\x20\\x20float\\x20theta\\x20=\\x20asin(dnew/d);\\x0a\\x20\\x20\\x20\\x20float\\x20tmp\\x20=\\x20theta\\x20/\\x201.5707963\\x20*\\x200.5;\\x0a\\x20\\x20\\x20\\x20origin2.s\\x20=\\x20tmp*origin2.s\\x20/\\x20dnew\\x20;\\x0a\\x20\\x20\\x20\\x20origin2.t\\x20=\\x20tmp*origin2.t\\x20/\\x20dnew\\x20;\\x0a\\x0a\\x20\\x20\\x20\\x20result.s\\x20=\\x20((origin2.s*fHAngleCos\\x20-\\x20origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\\x0a\\x20\\x20\\x20\\x20result.t\\x20=\\x20((origin2.s*fHAngleSin\\x20+\\x20origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\\x0a\\x0a\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(texture,\\x20result.st).r;\\x20\\x0a\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(texture,\\x20result.st).g;\\x20\\x0a\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(texture,\\x20result.st).b;\\x20\\x0a\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a}\\x20\\x0a','GetPanoPTZCeiling','%c\\x20reset\\x20hard\\x20decoder','SR_GetPTZColor','executing','SR_DE_FISH_ORIGINAL','values','_invoke','fAspect','188hshwen','pfuncCBIn','generateMipmap','UNSIGNED_BYTE','max_advance_height','pOriPTZPoints','FEC_GetViewParam','DrawPTZLines','mark','ONE_MINUS_SRC_ALPHA','pLineClrVertices','VERTICAL_LAYOUT','state','SR_SetPTZPort','your\\x20browser\\x20does\\x20not\\x20support\\x202d\\x20render','exports','CULL_FACE','Missing_Startfont_Field','concatenate','Missing_Size_Field','Get_Kerning','pFillBlockClrVertices','Nested_Frame_Access','renderCurStatus','completed','hypot','Corrupted_Font_Header','isKeyFrame','Lower_Module_Version','FT_Library_Version','hasOwnProperty','forEach','displayRunning','fRadiusLeft','fTop','nAlpha','No_Unicode_Glyph_Name','getPrototypeOf','finallyLoc','RenderFrame','Library_Version','pstBGColor','pUserIn','Invalid_Stream_Skip',',height:','output','defineProperty','timerReset','toString','DrawFillBlock','GetProj','NO_RECURSE','decodeQueueSize','Divide_By_Zero','GetFishPTZWALL','fHAngleCos','nFishParamType','Invalid_Pixel_Size','scale(0.2)','blendFunc','timestamp','fCosH','onmessage','SR_DrawLinesEx','cropBottom','src','pString','emPlaceType','return','SetScale','Code_Overflow','SR_DE_FISH_ARCSPHERE_VERTICAL_WALL','nWndPort','uniform1f','codecType','fBeta','decoderOutSuccess','SRC_ALPHA','GetFECPort',',frameRate:','Done_Face','getCropImageJPEG','charCodeAt','bitmap_top','%cswitch\\x20hardVideoDecoder\\x20to\\x20softVideoDecoder','texImage2D','fRXLeft','ENDF_In_Exec_Stream','canvasID','FEC_SetWnd','Invalid_Reference','drawImage',',state:','GetPTZRectange','GetCanvasSize','2d\\x20render','useProgram','GetWndPort','clearFECCanvas','slice','UpdateRangeParam','SR_Draw','underline_thickness','linkProgram','delegate','Invalid_Version','pFishParamManager','BITMAP','undefined','Table_Missing','stop\\x20failed\\x20','loadWasm','Stack_Overflow','fVAngleCos','iterator','bUsed','glLineTexBuffer','ADVANCE_ONLY','nFECPort','clearDecoderObjBuffer','CMap_Table_Missing','curTime','nFontHeight','fRotateY','@@asyncIterator','Missing_Chars_Field','pFontColorBuffer','pLinePosVertices','4zRxQyx','FECSetViewParam','COMPILE_STATUS','SR_GetViewParam','IsInImage','only\\x20support\\x20webgl1','streamOpenMode','texParameteri','getImageType','Nested_DEFS','getContext','CompileProgram','FT_Done_FreeType','MONO','getUniformLocation','SR_DE_FISH_PTZ_CEILING','SetDisplayBuf','shaderSource','cropTop','fRYTop','bFECHandle','Init_FreeType','\\x0a\\x20\\x20\\x20\\x20precision\\x20highp\\x20float;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec2\\x20v_uv;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY2;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20r,g,b;\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20origin;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20thetabase;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20d;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20fMax\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0\\x20||\\x20fRY2\\x20>\\x201.0\\x20||\\x20fRX1\\x20<\\x200.0\\x20||\\x20fRY1\\x20<\\x200.0)\\x20///<如果不是一个完整的圆\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRX1\\x20*\\x20w;\\x20///<左边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRX2\\x20-\\x201.0)\\x20*\\x20w;\\x20///<右边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRY1\\x20*\\x20h;\\x20///<上边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRY2\\x20-\\x201.0)\\x20*\\x20h;\\x20///<下边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20topCut\\x20=\\x20fMax\\x20/\\x20fRadius;\\x20\\x20\\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20bottomCut\\x20=\\x200.8;\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20///<为矫正效果,最终矫正图固定切掉下面一部分\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.s\\x20=\\x201.0\\x20-\\x20v_uv.s;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.t\\x20=\\x20(bottomCut\\x20-\\x20topCut)\\x20*\\x20(1.0\\x20-\\x20v_uv.t)\\x20+\\x20topCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20thetabase\\x20=\\x206.2831853\\x20*\\x20origin.s\\x20+\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20d\\x20=\\x20fRadius\\x20*\\x20(1.0\\x20-\\x20origin.t);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.s\\x20=\\x20(fCenterX\\x20-\\x20d*sin(thetabase))\\x20/\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.t\\x20=\\x20(fCenterY\\x20+\\x20d*cos(thetabase))\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(texture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(texture,\\x20result.st).g;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(texture,\\x20result.st).b;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x0a','FEC_SetCanvasID','UpdateWideScanAngle','fCylinderHeight','constructor','pFontPath','streamEnd','units_per_EM','bitmap_left','renderEngine','asin','\\x0aprecision\\x20mediump\\x20float;\\x0avarying\\x20vec2\\x20v_uv;\\x0auniform\\x20sampler2D\\x20texture;\\x0auniform\\x20float\\x20fRX1;\\x0auniform\\x20float\\x20fRX2;\\x0auniform\\x20float\\x20fRY1;\\x0auniform\\x20float\\x20fRY2;\\x0auniform\\x20int\\x20bBlack;\\x20\\x0auniform\\x20int\\x20bCut;\\x0a\\x0avoid\\x20main()\\x0a{\\x20\\x0a\\x09float\\x20r,g,b;\\x0a\\x09vec4\\x20origin;\\x0a\\x0a\\x09float\\x20\\x20w;\\x0a\\x09float\\x20\\x20h;\\x0a\\x09float\\x20\\x20fCenterX;\\x0a\\x09float\\x20\\x20fCenterY;\\x0a\\x09float\\x20\\x20fRadius;\\x0a\\x09w\\x20=\\x201.0;\\x0a\\x09h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x09fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x09fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x09fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x09float\\x20\\x20leftCut\\x20=\\x200.0;\\x0a\\x09float\\x20\\x20rightCut\\x20=\\x201.0;\\x0a\\x09float\\x20\\x20topCut\\x20=\\x200.0;\\x0a\\x09float\\x20\\x20bottomCut\\x20=\\x201.0;\\x0a\\x09if(bCut\\x20==\\x201)\\x0a\\x09{\\x0a\\x09\\x09if(fRX1\\x20>\\x200.0)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09leftCut\\x20=\\x20fRX1;\\x0a\\x09\\x09}\\x0a\\x09\\x09if(fRX2\\x20<\\x201.0)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09rightCut\\x20=\\x20fRX2;\\x0a\\x09\\x09}\\x0a\\x09\\x09if(fRY1\\x20>\\x200.0)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09topCut\\x20=\\x20fRY1;\\x0a\\x09\\x09}\\x0a\\x09\\x09if(fRY2\\x20<\\x201.0)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09bottomCut\\x20=\\x20fRY2;\\x0a\\x09\\x09}\\x0a\\x09}\\x0a\\x09origin.s\\x20=\\x20v_uv.s\\x20*\\x20(rightCut-leftCut)\\x20+\\x20leftCut;\\x0a\\x09origin.t\\x20=\\x20v_uv.t\\x20*\\x20(bottomCut-topCut)\\x20+\\x20topCut;\\x0a\\x0a\\x09r\\x20=\\x20texture2D(texture,\\x20origin.st).r;\\x20\\x0a\\x09g\\x20=\\x20texture2D(texture,\\x20origin.st).g;\\x20\\x0a\\x09b\\x20=\\x20texture2D(texture,\\x20origin.st).b;\\x20\\x0a\\x0a\\x09if(bBlack\\x20==\\x201)\\x0a\\x09{\\x0a\\x09\\x09float\\x20tmpX,\\x20tmpY;\\x0a\\x09\\x09tmpX\\x20=\\x20origin.s\\x20*\\x20w;\\x20\\x0a\\x09\\x09tmpY\\x20=\\x20origin.t\\x20*\\x20h;\\x20\\x0a\\x09\\x09float\\x20d2\\x20=\\x20(tmpX-fCenterX)*(tmpX-fCenterX)\\x20+\\x20(tmpY-fCenterY)*(tmpY-fCenterY);\\x0a\\x09\\x09if(d2\\x20>\\x20fRadius*fRadius)\\x0a\\x09\\x09{\\x0a\\x09\\x09\\x09r\\x20=\\x200.0;\\x20\\x0a\\x09\\x09\\x09g\\x20=\\x200.0;\\x20\\x0a\\x09\\x09\\x09b\\x20=\\x200.0;\\x20\\x0a\\x09\\x09}\\x0a\\x09}\\x0a\\x0a\\x09gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a}\\x0a','Execution_Too_Long','processData','uniform1i','inputData','DEPTH_BUFFER_BIT','SR_ERR_CALL_ORDER','Error_String','createElement','fRight','SR_DE_FISH_PANARAMA_FLOOR_180','hour','set','Invalid_Vert_Metrics','pSemiSphereTex','%c\\x202D\\x20render\\x20not\\x20support\\x20FEC\\x20correct','Invalid_File_Format','timeWalk','The\\x20iterator\\x20does\\x20not\\x20provide\\x20a\\x20\\x27throw\\x27\\x20method','FFCallBackFun','rows','codec','_GetImage2','correctType','pCamera','face_flags','SR_DE_FISH_SEMISPHERE','decoderObjNeedReset','_sent','enableVertexAttribArray','SR_SetPTZDisplayMode','viewport','fRYBottom','pSemiSpherePos','Unknown_File_Format','RENDER','9465953NilOJJ','fSinH','Invalid_Handle','0\\x200','nWndHeight','configurable','pstPoints','ARRAY_BUFFER','SR_DE_FISH_PANORAMA_FLOOR_360','nFontColorTexture','Ignore','Missing_Startchar_Field','attachShader','Invalid_Character_Code','getImageJPEG','rawDataFrameInfo','cropRight','normal','Array_Too_Large','deleteTexture','descender','stPTZParam','IsPTZSelected','chooseFrame','compileShader','bufferSubData','>>>VideoRender.js\\x20SR_SetRenderState\\x20failed\\x20ret:%08x\\x0a','IGNORE_GLOBAL_ADVANCE_WIDTH','color:\\x20red','end','COLOR','unconfigured','family_name','TEXTURE0','deleteShader','bindTexture','call','nCylinderPosNum','initTimer','fAngle','LCD_V','codedWidth','bmp','Outline_Decompose','oVideoRenderHandle','getDate','nFontBGNum','Syntax_Error','curTimeStamp','_resetDecoder','decode','stPTZColor','year','Unimplemented_Feature','SetFishParam','bCut','catchLoc','fRadiusRight','FTLibrary','Invalid_Offset','resetTimer','format','hvc1.1.6.L123.00','vecCenter','FreeFECPort','NO_HINTING','SR_SetFishParamManager','bIsCapturing','InitColorList','\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec4\\x20xy;\\x0a\\x20\\x20\\x20\\x20attribute\\x20vec2\\x20uv;\\x0a\\x20\\x20\\x20\\x20varying\\x20highp\\x20vec2\\x20v_uv;\\x0a\\x0a\\x20\\x20\\x20\\x20uniform\\x20mat4\\x20matProj;\\x0a\\x20\\x20\\x20\\x20uniform\\x20mat4\\x20matView;\\x0a\\x20\\x20\\x20\\x20void\\x20main(void)\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_Position\\x20=\\x20matProj\\x20*\\x20matView\\x20*\\x20xy;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20v_uv\\x20=\\x20uv;\\x0a\\x20\\x20\\x20\\x20}\\x0a','Glyph_Too_Big','nPTZDisplayMode','break','bind','vecEye','fCylinderRadius','fBottom','STATIC_DRAW','FT_Error_String','SR_DE_FISH_PANORAMA_WALL','createBuffer','reset','Too_Many_Caches','nSemiSpherePosNum','_resetRenderTimer','postImageData','tan','nPlaceType','fFar','Horiz_Header_Missing','Fragment\\x20shader\\x20failed\\x20to\\x20compile:\\x20','getProgramParameter','playSpeed:','UpdateCamera','cos','fRY1','ComputeLinePoint','FT_Done_Face','texCoord','nLineTriangleNum','GetRoll','TEXTURE_2D','preTimeStamp','CreateSemiSphere','SetDisplayRect','@@toStringTag','Done_FreeType','FECGetViewParam','appendChild','Invalid_PPem','needReset','PLOTTER','Missing_Encoding_Field','color','Cannot_Open_Resource','curFrameInfo','DEPTH_STENCIL','FEC_SetParam','FECGetPort','\\x0a\\x20\\x20\\x20\\x20precision\\x20highp\\x20float;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec2\\x20v_uv;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX1;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX2;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY1;\\x20\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY2;\\x20\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20r,g,b;\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20origin;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20thetabase;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20d;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20newpp;\\x20\\x20///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if\\x20(v_uv.t\\x20\\x20<=\\x200.5)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.s\\x20=\\x20\\x20v_uv.s\\x20/\\x202.0\\x20+\\x200.5;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.t\\x20=\\x20\\x20v_uv.t\\x20*\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20else\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.s\\x20=\\x20\\x20v_uv.s\\x20/\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20newpp.t\\x20=\\x20\\x20(v_uv.t\\x20-\\x200.5)\\x20*\\x202.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20fMax\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0\\x20||\\x20fRY2\\x20>\\x201.0\\x20||\\x20fRX1\\x20<\\x200.0\\x20||\\x20fRY1\\x20<\\x200.0)\\x20///<如果不是一个完整的圆\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRX1\\x20*\\x20w;\\x20///<左边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRX2\\x20-\\x201.0)\\x20*\\x20w;\\x20///<右边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRY1\\x20*\\x20h;\\x20///<上边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRY2\\x20-\\x201.0)\\x20*\\x20h;\\x20///<下边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20topCut\\x20=\\x20fMax\\x20/\\x20fRadius;\\x20\\x20\\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20bottomCut\\x20=\\x200.8;\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20///<为矫正效果,最终矫正图固定切掉下面一部分\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.s\\x20=\\x20newpp.s;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.t\\x20=\\x20(bottomCut\\x20-\\x20topCut)\\x20*\\x20newpp.t\\x20+\\x20topCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20thetabase\\x20=\\x206.2831853\\x20*\\x20origin.s\\x20+\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20d\\x20=\\x20fRadius\\x20*\\x20(1.0\\x20-\\x20origin.t);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.s\\x20=\\x20(fCenterX\\x20-\\x20d*sin(thetabase))\\x20/\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.t\\x20=\\x20(fCenterY\\x20+\\x20d*cos(thetabase))\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(texture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(texture,\\x20result.st).g;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(texture,\\x20result.st).b;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r\\x20,g\\x20,b\\x20,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x0a','SBITS_ONLY','avc1.','b3DPort','FRAGMENT_SHADER','delta','LESS','nplaySpeed','FirstFrame','pstColor','SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL','width','fishSubPort','nPTZFragmentNum','CROP_BITMAP','needSetPreSoft','Hmtx_Table_Missing','SR_SetCanvasSize','subPortNum','Missing_Bbx_Field','keys','SR_DrawFont','timeStamp','SR_ERR_ALLOC_MEMORY','name','oRenderTimer','Invalid_CodeRange','nLineShaderProgram','_ConvertDisplayEffect','tryLoc','pop','glBlockPosBuffer','Invalid_Horiz_Metrics','Debug_OpCode','pstStartPos','FT_Outline_Decompose','\\x0a\\x20\\x20\\x20\\x20precision\\x20highp\\x20float;\\x0a\\x20\\x20\\x20\\x20varying\\x20vec2\\x20v_uv;\\x0a\\x20\\x20\\x20\\x20uniform\\x20sampler2D\\x20texture;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRX2;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY1;\\x0a\\x20\\x20\\x20\\x20uniform\\x20float\\x20fRY2;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20void\\x20main()\\x0a\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20r,g,b;\\x20\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20origin;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20vec4\\x20result;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20thetabase;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20d;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterX;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fCenterY;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20\\x20fRadius;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20w\\x20=\\x201.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20h\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x20(fRY2\\x20-\\x20fRY1);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterX\\x20=\\x20(fRX1\\x20+\\x20fRX2)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<圆心实际坐标\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fCenterY\\x20=\\x20(fRY1\\x20+\\x20fRY2)\\x20/\\x202.0\\x20*\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fRadius\\x20=\\x20(fRX2\\x20-\\x20fRX1)\\x20/\\x202.0\\x20*\\x20w;\\x20\\x20\\x20\\x20///<半径实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20fMax\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0\\x20||\\x20fRY2\\x20>\\x201.0\\x20||\\x20fRX1\\x20<\\x200.0\\x20||\\x20fRY1\\x20<\\x200.0)\\x20///<如果不是一个完整的圆\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRX1\\x20*\\x20w;\\x20///<左边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRX2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRX2\\x20-\\x201.0)\\x20*\\x20w;\\x20///<右边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY1\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20-fRY1\\x20*\\x20h;\\x20///<上边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(fRY2\\x20>\\x201.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20tmp\\x20=\\x20(fRY2\\x20-\\x201.0)\\x20*\\x20h;\\x20///<下边超出图像部分最大实际长度\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(tmp\\x20>\\x20fMax)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20fMax\\x20=\\x20tmp;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20topCut\\x20=\\x20fMax\\x20/\\x20fRadius;\\x20\\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20float\\x20bottomCut\\x20=\\x200.8;\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20///<为矫正效果,最终矫正图固定切掉下面一部分\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.s\\x20=\\x20v_uv.s;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20origin.t\\x20=\\x20(bottomCut\\x20-\\x20topCut)\\x20*\\x20v_uv.t\\x20+\\x20topCut;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20thetabase\\x20=\\x206.2831853\\x20*\\x20origin.s\\x20+\\x20fAngle;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20d\\x20=\\x20fRadius\\x20*\\x20(1.0\\x20-\\x20origin.t);\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.s\\x20=\\x20(fCenterX\\x20-\\x20d*sin(thetabase))\\x20/\\x20w;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20result.t\\x20=\\x20(fCenterY\\x20+\\x20d*cos(thetabase))\\x20/\\x20h;\\x0a\\x20\\x20\\x20\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x20texture2D(texture,\\x20result.st).r;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x20texture2D(texture,\\x20result.st).g;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x20texture2D(texture,\\x20result.st).b;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20if(result.s\\x20>\\x201.0\\x20||\\x20result.t\\x20>\\x201.0\\x20||\\x20result.s\\x20<\\x200.0\\x20||\\x20result.t\\x20<\\x200.0)\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20{\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20r\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20g\\x20=\\x200.0;\\x20\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20b\\x20=\\x200.0;\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20}\\x0a\\x20\\x20\\x20\\x20\\x20\\x20\\x20\\x20gl_FragColor\\x20=\\x20vec4(r,\\x20g,\\x20b,\\x201.0);\\x0a\\x20\\x20\\x20\\x20}\\x0a','MONOCHROME','value','pFillBlockPosVertices','Invalid_Cache_Handle','SR_ERR_NOT_SUPPORT','Support\\x20Error:\\x20hard\\x20decoder\\x20only\\x20support\\x20264\\x20and\\x20265\\x20!!!','TransformPTZRangePoints','curFrameIsDisplay','nDrawFontWidth','SR_ERR_WEBGL_RESOURCE','GetCropJPEG','fRadiusBottom','FTFace','paint','FT_Set_Pixel_Size','wrap','OrderError','yuvLength','stPTZSelect','fTheta','data','then','__await','Init','placeType','Invalid_Post_Table_Format','displayName','fast','FECResetCorrectType','SetFov','SR_SetRenderState','SR_DE_FISH_PANORAMA_FLOOR_180','SR_DE_FISH_CYLINDER_FLOOR','fRX2','pPanoPTZPoints','NO_BITMAP','enumerable','nPTZFragmentNode','SetFar','frameDisplayHeight','buffer','SetCurStatus','>>>JS\\x2002\\x20destroy\\x20oVideoDecoder/oVideoRender','LINK_STATUS','TEXTURE_WRAP_T','GetPTZFragmentPoints','resetDecoder','needForward','Missing_Font_Field','fFov','pBasePTZPoints','baseTimeStamp','GetPointFish2PanoWall','GetJPEG','face_index','stFishParam','SR_DE_NULL','vertexAttribPointer','clear','pRender','nUpDateType','port','Invalid_Stream_Operation','nFontShaderProgram','Cannot\\x20call\\x20a\\x20class\\x20as\\x20a\\x20function','SetPTZPort','DEPTH_TEST','IsValidRadiusParam','day','enable','Invalid_Post_Table','function','fPTZPositionX','your\\x20browser\\x20does\\x20not\\x20support\\x20WebGL','1447476ftHFsH','waitIFrameTimestamp','oVideoDecoder'];a0_0xd9f6=function(){return _0x382391;};return a0_0xd9f6();}","LCD","rawDataFrameInfoBuffer","fast","log","nUser","additionDataBuffer","The iterator does not provide a 'throw' method","vertexPosBuffer","nDisplayEffect","UpdateCamera","reportError","fRadiusLeft","clearBufferfi",">>>>>yff>>> JSPlayM4_GetPort 1","JSPlayM4_SetDisplayCallBack","bindTexture","awrap","pstPoints","frameDisplayHeight","downloadAudioBeforeRenderData","fTop","JSPlayM4_SetFirstFrameCallBack","Invalid_CharMap_Format","getImageType","enable","close","SR_SetPTZDisplayMode","fill","JSPlayM4_GetVolume","ComputeAngleVertical","fRX2","_JSPlayM4_SyncToAudio","pCylinderPos","\n    attribute vec4 xy;\n    attribute vec2 uv;\n    varying highp vec2 v_uv;\n\n    uniform mat4 matProj;\n    uniform mat4 matView;\n    void main(void) {\n        gl_Position = matProj * matView * xy;\n        v_uv = uv;\n    }\n",">>>JS JSPlayM4_FEC_SetViewParam JSPlayM4_FEC_SetViewParam this.decodeEngine:","JSPlayM4_DisplayCallBack","SetYaw","BITMAP","PEDANTIC","abrupt","_JSPlayM4_GetFishEye2DParam","SetCanvasSize","JSPlayM4_SetRunTimeInfoCallBackEx","decoderOutSuccess","Divide_By_Zero","glyph","GetRoll","viewport","subarray","AudioBeforeDecode.data","sCanvasID","VERTEX_SHADER","Set_Char_Size","bAntialias","prefer-hardware","iFECCanvasIDLen","FECDelPort","mainFECCorrect","clonedCanvas","JSPlayM4_SyncToAudio","NoHIKHead","canvasWidth","SR_DE_FISH_CYLINDER_CEILING","inputdata malloc failed!!!","SR_ERR_FREETYPE_RESOURCE","addtionCallBackFun","bBlack","download","constructor","pCylinderTex","pJpegData","TEXTURE_MIN_FILTER","download 1 Before Decode AudioData FrameNum:","uniform1f","JSPlayM4_RunTimeInfoCallBack","SBITS_ONLY","hypot","regionSw","getElementById","resizedataURL","Invalid_Horiz_Metrics","iAudioResampleFrameNum","Module","Invalid_Stream_Read","nStreamEnd","splice","viii","interlace","transformOrigin","GetRangePoints","Invalid_Size_Handle","download 3 Before Render AudioData FrameNum:","day","JSPlayM4_IgnoreHeaderAudioDefine","style","iRatio_x","FECViewParamCB","SetDisplayRect","pString","_JSPlayM4_GetSDKVersion","fRY2","Nested_Frame_Access","JSPlayM4_GetSourceBufferRemain","SR_DE_FISH_CYLINDER_FLOOR","LINEAR","Vertex shader failed to compile: ","reverse","FFCallBackFun","3271NcoGeP","FTLibrary","SR_SetFishParam","safari","SR_DE_FISH_CYLINDER_SPLIT_CEILING","arrayBuffer","getAttribLocation","underline_position","SR_GetViewParam","rows","fRotateX","_JSPlayM4_StopSound","SR_SetCanvasSize","_JSPlayM4_SetResampleValue","TRIANGLE_FAN","IGNORE_GLOBAL_ADVANCE_WIDTH","_JSPlayM4_SetDecodeEngine","JSPlayM4_SetPrintLogFlag","JSPlayM4_GetPlayedTimeEx","pFishParamManager","SetPTZPort","fPTZZoom","timeStamp","IsPortAllocated","Stack_Overflow","iRatio_y","Init_FreeType","destroyDecoder","JSPlayM4_SetCanvasSize","ComputePTZPoints","bufferSubData","AsyncIterator","Missing_Startfont_Field","writable","GetFishParam","FECGetPort","_JSPlayM4_FEC_SetDisplayRegion","HEAPU8","runtimeCBFun","top","generateMipmap","fVAngleSin","bBackGround","hardwareAcceleration","postImageData","ADVANCE_ONLY","ComputeAngleHorizontal","upDateType","map","aInputDataBuffer","mark",">>>JS 02 destroy oVideoDecoder/oVideoRender","join","pBmpSizeData","Missing_Size_Field","_JSPlayM4_SetDisplayRegion","SampleRate","parentNode",",height:","decodeFrameType","descender","clonedCanvasParentNode","SR_DE_FISH_PANORAMA_FLOOR_360","fRXLeft","SR_DE_FISH_PTZ_FLOOR","units_per_EM","getPlayTimeCallBackFun","PLOTTER","afterLoc","JSPlayM4_FEC_SetParam",">>>>>yff>>>>> JSPlayM4_OpenStream 5:","needResetCanvasSize","pCamera","set","%c1>your browser is IE ,it does not support play without plugin","%cstart load Decoder.js time:","1018QPxUaK",">>>VideoRender.js SR_SetRenderState failed ret:%08x\n","jpegDataCallback","544210lIBlqT","inputDataBufferSize","startTime","%c FEC_ResetCorrectType error this canvas not play","fCylinderRadius","charCodeAt","Missing_Bitmap","setValue","bottom","_JSPlayM4_GetJPEG","_JSPlayM4_SetVolume","month","SetDisRegionRight","document","decoderObjNeedReset","SR_SetCallBack","DeInit","vecCenter",">>>JS OrderError","DrawFillBlock","exports","src","Invalid_Cache_Handle","startTimeStamp",",placeType:","sin","SetPitch","fishPort is 0 ,main canvas doesn't need call FEC_GetPort",",left:","fRight","displayName","init","regionSy","pLinePosVertices","processData","Invalid_Stream_Skip","length","displayHeight","_JSPlayM4_VideoDataToBMP","SR_ERR_WEBGL_RESOURCE","arg","Get_Char_Index","printfFlag","shaderSource","CULL_FACE","dispatchEvent","JSPlayM4_FEC_Disable","GetTimerWalk","switchDecodeFrame","Bad_Argument","FRAGMENT_SHADER","Blob","glLineClrBuffer","Invalid_Handle","_JSPlayM4_Fast","data:application/javascript,","fWideScanOffset","Invalid_Frame_Operation","bSupHardOrSoft","MSBlobBuilder","hasWebWorker","fRadiusBottom","nFontShaderProgram","SR_SetAntialias","Nested_DEFS","fRadiusTop","nplaySpeed","pstColor","Too_Many_Hints","SetAntialias","timestamp","nBlockShaderProgram","GetImage.","FECSetDisplayRegion","SR_DE_FISH_PANARAMA_FLOOR_180","resetDecoder","_JSPlayM4_FEC_SetWnd","Syntax_Error","texCoord","Name_Table_Missing","needWaitIFrame","GeneratorFunction","_JSPlayM4_SetDecCBStream","nFishParamType","_free",",canvasWidth:","iFECRatio_x","GetFishPTZFloor","Init","SR_SetFontPath","getSeconds","JSPlayM4_DecCallBack","key","bIsCapturing","JSPlayM4_SetPlayOrBackSwitchMode","FECEnable","_JSPlayM4_FEC_SetParam","fRadiusRight","curTime","TEXTURE_2D","bmpDownloadFlag","underline_thickness","value","JSPlayM4_ResetBuffer","SR_OK","GetBmp.bmp","getCropImageJPEG","dataLength","CLAMP_TO_EDGE","HardDecodeError","TEXTURE0","configured","aTotalBuffer","output","pFillBlockClrVertices",",inputSize:","firefox","preTimerStamp","nMaxPointNum","Invalid_CharMap_Handle","nLineWidth","depthFunc","completed","stCycleParam","GetPTZColor","SR_DE_FISH_ARCSPHERE_VERTICAL_WALL","FORCE_AUTOHINT","tan","DrawPTZLines","Missing_Font_Field","_stringToBytes","Invalid_PPem","iZoomNum","formatVideoDecoderConfigure","Get_Kerning","I420","_GetImage2","fPTZParam","Invalid_Glyph_Format","year","COMPILE_STATUS","GetPointPano2FishWall","GetWndPort",",top:","cropTop","JSPlayM4_AudioResampleCallBack","_JSPlayM4_GetFrameInfo","_JSPlayM4_SetDisplayCallBack","Execution_Too_Long","Cannot_Open_Stream","%c2>there will decode 265 by softDecoder","GetPTZRectange","\n    attribute vec3 position;\n    attribute vec4   color;\n    varying   float  pp;\n    varying   vec4  colorOut;\n    void main()\n    {\n        gl_Position = vec4(position.x, position.y, 0.0, 1.0);\n        pp = position.z;\n        colorOut = color;\n    }\n","name","_refresh","pFontColorBuffer","defineProperty","bPTZSelected",",upDateType:","respondFrameInfoCB","fScale","SR_ERR_PARAM","_JSPlayM4_SetANRParam","nOriPTZPointNum","Unknown_File_Format","bitmap_top","normal","IsOutofImage","color:red","SR_Draw","SetFov","fPTZY","BLEND","Glyph_Too_Big","GetFrameData","bWriteAudioResampleData","nPointNum","frameNum","bLoop","bRecreateAntia","fRotateY","_JSPlayM4_GetPort","FEC_SetParam","NONE","bbox","_JSPlayM4_SetDecodeFrameType","pRenderParam","\n    attribute vec4  position;\n    attribute vec4  texCoord;\n    varying vec4  pp; \n\n    void main()\n    { \n        gl_Position.x  = position.x;\n        gl_Position.y  = position.y;\n        gl_Position.z  = 0.1;\n        gl_Position.w  = 1.0;\n        pp = texCoord; \n    }\n","SR_DE_FISH_ORIGINAL","return","Too_Many_Extensions","_JSPlayM4_GetSourceBufferRemain","param is not number","JSPlayM4_SetDecodeEngine","HEAPF32","edge","copyTo",">>>JS left:","GetCurTime","Unimplemented_Feature","forEach","GetPointPano2FishFloor","SR_DrawLines","color: red","_JSPlayM4_GetBMP","SR_ERR_ALLOC_MEMORY","errorcode:","currentFishSubPort","getHours","JSPlayM4_AudioBeforeRenderCallBack","isConfigSupported","DisplayFrame","MAX","Code_Overflow","curFrameIsDisplay","oRenderTimer","then","0 0","prev","decodeWorker create success!","face_index","_getExplore","JSPlayM4_PlaySound","startWorker","SR_ERR_FREETYPE_INIT","codecType","TEXTURE_MAG_FILTER","_SetPlaySpeed","_JSPlayM4_OpenStream","Stack_Underflow","_JSPlayM4_FEC_SetViewParam","canvas width:","getMinutes","_destroyPlayCtrl","subPortNum","bufferData","IsInImage","download600RawData","week","SetPTZDisplayMode","_JSPlayM4_FreePort","attachShader","regeneratorRuntime",">>>JS JSPlayM4_FEC_SetWnd this.decodeEngine:","nPTZFragmentNum","getDate","Corrupted_Font_Glyphs","Invalid_Pixel_Size","fRY1","_JSPlayM4_SetRunTimeInfoCallBackEx","pPTZSetColor","FT_Get_Kerning","SharedArrayBuffer","InitCamera","keys","COLOR_BUFFER_BIT","timeWalk",">>>>>yff>>>>> JSPlayM4_OpenStream 2:",",hWnd:","Cannot_Render_Glyph","nCylinderTexSize","stPTZSelect","_JSPlayM4_SetDecodeThread","FECErrorCode","_JSPlayM4_GetCanvasSize","Error_String","GetRectPoints","useProgram","getShaderParameter","dataStrVersion",">>>JS JSPlayM4_FEC_DelPort this.decodeEngine:","texParameteri","bInited","bCullBack","experimental-webgl","FT_Set_Pixel_Size","_JSPlayM4_FEC_SetCanvasID","\n    varying lowp vec4 pp;\n    uniform sampler2D texture;\n\n    void main(void)\n    {\n        gl_FragColor = texture2D(texture, pp.st);\n    }\n","setPrototypeOf","GetPlayedTime","_JSPlayM4_SetSecretKey","_JSPlayM4_GetMpOffset","_JSPlayM4_SetSycGroup","JSPlayM4_Play","JSPlayM4_Fast","oVideoRender","texturePosBuffer","emEffect","replaceChild","output2","CalcPTZFragmentPoints","fCosH",">>>JS JSPlayM4_FEC_GetPort this.decodeEngine:","pFontPath","toBlob","GetJPEG","ReleaseDisplay","info","_GetImage","Missing_Encoding_Field","_JSPlayM4_IgnoreHeaderAudioDefine","_JSPlayM4_RenderPrivateData","SetAspect","FT_Done_FreeType","JSPlayM4_SetIFrameDecInterval","nSemiSpherePosNum","regionSx","GetRenderParam","style_flags","port","_JSPlayM4_OneByOne","NORMAL","nCylinderPosNum","GetPTZPoints","Invalid_File_Format","JSPlayM4_GetPort","JSPlayM4_SetDecCBStream","JSPlayM4_Stop","Invalid_Version","LCD_V","slice","fSinV","next","pFishParam","getShaderInfoLog","FEC_SetCanvasID","configurable","oJSPlayerObj","JudgeDisplayEffect","bCut","JSPlayM4_SetDecodeFrameType","offscreen","Invalid_Stream_Operation","JSPlayM4_SetGlobalBaseTime","blendFunc","SetFar","fRYBottom","JSPlayM4_FEC_SetViewParam","Missing_Property","bFECHandle","SetDisRegionLeft","\n    precision highp float;\n    varying vec2 v_uv;\n    uniform sampler2D texture;\n    uniform float fAngle;\n    uniform float fRX1;\n    uniform float fRX2;\n    uniform float fRY1;\n    uniform float fRY2;\n    \n    void main()\n    {\n    \n        float r,g,b; \n    \n        vec4 origin;\n        vec4 result;\n        float  thetabase;\n        float  d;\n    \n        float  w;\n        float  h;\n        float  fCenterX;\n        float  fCenterY;\n        float  fRadius;\n        w = 1.0;\n        h = (fRX2 - fRX1) / (fRY2 - fRY1);\n        fCenterX = (fRX1 + fRX2) / 2.0 * w;    ///<圆心实际坐标\n        fCenterY = (fRY1 + fRY2) / 2.0 * h;\n        fRadius = (fRX2 - fRX1) / 2.0 * w;    ///<半径实际长度\n        float fMax = 0.0;\n        if(fRX2 > 1.0 || fRY2 > 1.0 || fRX1 < 0.0 || fRY1 < 0.0) ///<如果不是一个完整的圆\n        {\n            float tmp;\n            if(fRX1 < 0.0)\n            {\n                tmp = -fRX1 * w; ///<左边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRX2 > 1.0)\n            {\n                tmp = (fRX2 - 1.0) * w; ///<右边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRY1 < 0.0)\n            {\n                tmp = -fRY1 * h; ///<上边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRY2 > 1.0)\n            {\n                tmp = (fRY2 - 1.0) * h; ///<下边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n        }\n        float topCut = fMax / fRadius;  ///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\n        float bottomCut = 0.8;           ///<为矫正效果,最终矫正图固定切掉下面一部分\n        origin.s = v_uv.s;\n        origin.t = (bottomCut - topCut) * v_uv.t + topCut;\n        thetabase = 6.2831853 * origin.s + fAngle;\n        d = fRadius * (1.0 - origin.t);\n        result.s = (fCenterX - d*sin(thetabase)) / w;\n        result.t = (fCenterY + d*cos(thetabase)) / h;\n    \n        r = texture2D(texture, result.st).r;\n        g = texture2D(texture, result.st).g;\n        b = texture2D(texture, result.st).b;\n        if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n        {\n            r = 0.0; \n            g = 0.0; \n            b = 0.0;\n        }\n        gl_FragColor = vec4(r, g, b, 1.0);\n    }\n","mainCanvasID","FEC_DelPort",",bottom:","nCut","nFontColorTexture","JSPlayM4_FirstFrameCallBack","concatenate","TransformPTZRangePoints","JSPlayM4_GetMpOffset","yuvType","GetPlaceType","_JSPlayM4_Play","%cEnd load Decoder.js time:","loadWasm","Worker","SetDisRegionTop","stDisplayRect","hvc1.1.6.L123.00","ENDF_In_Exec_Stream","JSPlayM4_GetRawData","RENDER","fFov","FT_Done_Face","_resetDecoder","createShader","SR_AddSubPort","context","SRC_ALPHA","Invalid_Face_Handle","max_advance_height","NO_HINTING","_GetFastSpeed","canvas","data","Invalid_CodeRange","JSPlayM4_FEC_SetCanvasID","InitFECParam","inputDataBuffer","OneByOne",">>>>>yff>>>>> JSPlayM4_Play 2:","uniform1i","MONO","webgl render","stFECDisplayRect","fPTZX","Support Error: hard decoder only support 264 and 265 !!!","decodeWorker","JSPlayM4_GetAdditionData","chosenFrame","_JSPlayM4_SetAudioDisplayBuf","pSemiSpherePos","color","New_Memory_Face","pBasePTZPoints","isGeneratorFunction","GetPointFish2PanoCeiling","Invalid_Driver_Handle","Missing_Fontboundingbox_Field","Outline_Decompose","nDrawFontWidth","UpdateRangeParam","SetDisRegionBottom","getUniformLocation","wrap","Bbx_Too_Big","nextLoc","closed","Invalid_Stream_Handle","JSPlayM4_SetDemuxModel","Psdata","iDataType","stFishEyeManager","_JSPlayM4_Stop",">>>>>yff>>>>> JSPlayM4_Play 2 this.canvasID:",",right:","Fragment shader failed to compile: ",">>>>>yff>>>>> JSPlayM4_SetStreamOpenMode 1 mode:","drawArrays","JSPlayM4_GetFileTime","Locations_Missing","number","_JSPlayM4_GetVolume","NO_BITMAP","STATIC_DRAW","fRX1","63BKMzml","RGBA","SR_GetCanvasSize","fRXRight","_JSPlayM4_ResetEnd","ONE_MINUS_SRC_ALPHA","UpdateCircyeParam","_JSPlayM4_GetBufferValue","SR_SetRenderState","asin","ctx","fVAngleCos","bWriteAudioAfterDecode","completion","RTPRaw.data","@@asyncIterator","catchLoc",",canvasHeight:","imageYUV","Inline worker is not supported","Too_Many_Drivers","_JSPlayM4_SetResetCallBack","WasmPlayerV3.0 input over","second","pstBGColor","pstFontBGLines","firstFrame","SR_DelSubPort","your browser does not support 2d render","delta","try statement without catch or finally","nBmpDataSize","InitColorList","needForward","getProgramInfoLog","_JSPlayM4_GetCropBMP","frameType","text/javascript","IsPTZSelected","UpdateWideScanAngle","matView","transferControlToOffscreen","%c1>your chrome version %d does not support 264/265 hard Decoder,please update the latest version above chromeV107","format","bUsed","JSPlayM4 need reset","push","paint","frameRate","sab","JSPlayM4_Pause","JSPlayM4_SetDecCallBack","_JSPlayM4_SetFrameInfoCallBack","30306rqBNkZ","fBeta","DEFAULT","_JSPlayM4_GetLastError","JSPlayM4_GetBufferValue","end","Post_Table_Missing","TEXTURE_WRAP_S","%c1>your browser support 264/265 hard Decoder","onlySupportedWebGL1","bind","getCropImageBMP","Cropbmp","_JSPlayM4_FEC_Disable","b3DPort","szBasePath","emPlaceType","JSPlayM4_FEC_SetBackCilling","JSPlayM4_InputRawData","fHAngleCos","fPTZPositionX","pBmpData","nAlpha","FEC_SetViewParam","GetPTZPort","SR_DE_FISH_PTZ_WALL","SetScale","Cannot_Open_Resource","hasThread","GetView","Missing_Chars_Field","bSupHardDecHEVC","%c1>your chrome version %d does not support 265 hard Decoder,please update the latest version above chromeV107","bBackground","GetFishPTZCeiling","JSPlayM4_AudioBeforeDecodeCallBack","playSpeed:","HEAP16","FT_Outline_Decompose","Could_Not_Find_Context","needRect","SR_DE_FISH_SEMISPHERE","undefined","FEC_GetPort","Invalid_Character_Code","glLinePosBuffer","FEC_Enable","audioAfDecOUTBuffer","COMPUTE_METRICS","SR_DE_FISH_PANORAMA_WALL","fishPort is 0 ,main canvas doesn't need call FEC_DelPort","FEC_SetBackCilling","getContext","OUTLINE","bRecreateTex","GetPanoPTZWall","fCosV","removeChild","decode","_JSPlayM4_GetPlayedTimeEx",">>>JS JSPlayM4_FEC_SetWnd hwnd error this.decodeEngine:","curFrameInfo","Invalid_Offset","_JSPlayM4_FEC_GetPort","bInit","Invalid_Glyph_Index","\n    varying  mediump float pp;\n    varying  lowp vec4  colorOut;\n    void main()\n    {\n        gl_FragColor = colorOut;\n        mediump float fx = abs(pp);\n        if (fx > 0.2)\n        { \n            gl_FragColor.a = colorOut.a*(1.25 - 1.25*fx);\n        } \n    } \n","JSPlayM4_FEC_DelPort","state","nMaxFillBlockTriNum","HEAP32","pJPEGSizeData","hevcDecodeEngine","nBasePTZPointNum","FTFace","bindBuffer","GetCropJPEG.jpeg","SR_DE_FISH_SPHERE","SetDisplayBuf","waitIFrameTimestamp","isize","Raster_Negative_Height","body","position","SetDisplayRegion","downloadFlag","JSPlayM4_SetDecodeThread"," JSPlayM4_FEC_SetCanvasID canvasID is null :","SetFishParam","pcVideoManager","Lower_Module_Version","Cropjpeg","tryLoc","GetPTZDisplayMode","color: blue","_JSPlayM4_SetPrintLogFlag","pFillBlockPosVertices","onmessage","\n    precision highp float;\n    varying vec2 v_uv;\n    uniform sampler2D texture;\n    uniform float fAngle;\n    uniform float fRX1;\n    uniform float fRX2;\n    uniform float fRY1;\n    uniform float fRY2;\n    \n    void main()\n    {\n        float r,g,b;  \n    \n        vec4 origin;\n        vec4 result;\n        float  thetabase;\n        float  d;\n    \n        float  w;\n        float  h;\n        float  fCenterX;\n        float  fCenterY;\n        float  fRadius;\n        w = 1.0;\n        h = (fRX2 - fRX1) / (fRY2 - fRY1);\n        fCenterX = (fRX1 + fRX2) / 2.0 * w;    ///<圆心实际坐标\n        fCenterY = (fRY1 + fRY2) / 2.0 * h;\n        fRadius = (fRX2 - fRX1) / 2.0 * w;    ///<半径实际长度\n        float fMax = 0.0;\n        if(fRX2 > 1.0 || fRY2 > 1.0 || fRX1 < 0.0 || fRY1 < 0.0) ///<如果不是一个完整的圆\n        {\n            float tmp;\n            if(fRX1 < 0.0)\n            {\n                tmp = -fRX1 * w; ///<左边超出图像部分最大实际长度\n                if(tmp > fMax)\n                   fMax = tmp;\n            }\n            if(fRX2 > 1.0)\n            {\n                tmp = (fRX2 - 1.0) * w; ///<右边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRY1 < 0.0)\n            {\n                tmp = -fRY1 * h; ///<上边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRY2 > 1.0)\n            {\n                tmp = (fRY2 - 1.0) * h; ///<下边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n        }\n        float topCut = fMax / fRadius;   ///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\n        float bottomCut = 0.8;           ///<为矫正效果,最终矫正图固定切掉下面一部分\n        origin.s = 1.0 - v_uv.s;\n        origin.t = (bottomCut - topCut) * (1.0 - v_uv.t) + topCut;\n        thetabase = 6.2831853 * origin.s + fAngle;\n        d = fRadius * (1.0 - origin.t);\n        result.s = (fCenterX - d*sin(thetabase)) / w;\n        result.t = (fCenterY + d*cos(thetabase)) / h;\n    \n        r = texture2D(texture, result.st).r;\n        g = texture2D(texture, result.st).g;\n        b = texture2D(texture, result.st).b;\n        if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n        {\n            r = 0.0; \n            g = 0.0; \n            b = 0.0; \n        }\n        gl_FragColor = vec4(r ,g ,b , 1.0);\n    }\n","pFECTotalCanvasIDData","downloadAudioBeforeDecodeData","streamEnd","COLOR","hikHeadBuffer malloc failed","%c reset hard decoder","buffer","pfuncCBOut","disable","GetPointFish2PanoFloor","DEPTH_STENCIL","drawImage","Pause","decodeEngine","\nprecision mediump float;\nvarying vec2 v_uv;\nuniform sampler2D texture;\nuniform float fHAngleCos;\nuniform float fHAngleSin;\nuniform float fVAngleCos;\nuniform float fVAngleSin;\nuniform float fZoom;\n\nuniform float fRX1; \nuniform float fRX2; \nuniform float fRY1; \nuniform float fRY2; \n\nvoid main()\n{\n    float r,g,b;  \n\n    vec4 origin1;\n    vec4 origin2;\n    vec4 result;\n    float  z1;\n    float  z2;\n    float  dnew;\n\n    float  w;\n    float  h;\n    float  fCenterX;\n    float  fCenterY;\n    float  fRadius;\n    w = 1.0;\n    h = (fRX2 - fRX1) / (fRY2 - fRY1);\n    fCenterX = (fRX1 + fRX2) / 2.0 * w;    \n    fCenterY = (fRY1 + fRY2) / 2.0 * h;\n    fRadius = (fRX2 - fRX1) / 2.0 * w; \n\n    origin1.s = v_uv.s - 0.5;\n    origin1.t = 0.5 - v_uv.t;\n    z1 = fZoom ;\n\n    origin2.s = origin1.s ;\n    origin2.t = (origin1.t*fVAngleCos + z1*fVAngleSin);\n    z2 = z1*fVAngleCos - origin1.t*fVAngleSin;\n\n    dnew = sqrt(origin2.s*origin2.s + origin2.t*origin2.t) ;\n    float d = sqrt(origin2.s*origin2.s + origin2.t*origin2.t + z2*z2);\n    float theta = asin(dnew/d);\n    float tmp = theta / 1.5707963 * 0.5;\n    origin2.s = tmp*origin2.s / dnew ;\n    origin2.t = tmp*origin2.t / dnew ;\n\n    result.s = ((origin2.s*fHAngleCos - origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\n    result.t = (-(origin2.s*fHAngleSin + origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\n\n    r = texture2D(texture, result.st).r; \n    g = texture2D(texture, result.st).g; \n    b = texture2D(texture, result.st).b; \n    if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n    {\n        r = 0.0; \n        g = 0.0; \n        b = 0.0; \n    }\n    gl_FragColor = vec4(r ,g ,b , 1.0);\n} \n","download 3 Resample Decode AudioData  FrameNum:","UNSIGNED_BYTE","glBlockClrBuffer","postMessage","\nprecision mediump float;\nvarying vec2 v_uv;\nuniform sampler2D texture;  \nuniform float fHAngleCos;  \nuniform float fHAngleSin; \nuniform float fVAngleCos;  \nuniform float fVAngleSin;  \nuniform float fZoom;\n\nuniform float fRX1; \nuniform float fRX2; \nuniform float fRY1; \nuniform float fRY2; \n\nvoid main()\n{\n    float r,g,b;\n\n    vec4 origin1;\n    vec4 origin2;\n    vec4 result;\n    float  z1;\n    float  z2;\n    float  dnew;\n\n    float  w;\n    float  h;\n    float  fCenterX;\n    float  fCenterY;\n    float  fRadius;\n    w = 1.0;\n    h = (fRX2 - fRX1) / (fRY2 - fRY1);\n    fCenterX = (fRX1 + fRX2) / 2.0 * w;     ///<Բ��ʵ������\n    fCenterY = (fRY1 + fRY2) / 2.0 * h;\n    fRadius = (fRX2 - fRX1) / 2.0 * w;     ///<�뾶ʵ�ʳ���\n    origin1.s = v_uv.s - 0.5;\n    origin1.t = v_uv.t - 0.5;\n    z1 = fZoom ;\n\n    origin2.s = origin1.s ;\n    origin2.t = (origin1.t*fVAngleCos + z1*fVAngleSin);\n    z2 = z1*fVAngleCos - origin1.t*fVAngleSin;\n\n    dnew = sqrt(origin2.s*origin2.s + origin2.t*origin2.t) ;\n    float d = sqrt(origin2.s*origin2.s + origin2.t*origin2.t + z2*z2);\n    float theta = asin(dnew/d);\n    float tmp = theta / 1.5707963 * 0.5;\n    origin2.s = tmp*origin2.s / dnew ;\n    origin2.t = tmp*origin2.t / dnew ;\n\n    result.s = ((origin2.s*fHAngleCos - origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\n    result.t = ((origin2.s*fHAngleSin + origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\n\n    r = texture2D(texture, result.st).r; \n    g = texture2D(texture, result.st).g; \n    b = texture2D(texture, result.st).b; \n    if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n    {\n        r = 0.0;\n        g = 0.0; \n        b = 0.0; \n    }\n    gl_FragColor = vec4(r ,g ,b , 1.0);\n} \n","minute","apply","GetFishPTZWALL","GetPanoPTZCeiling","bSupHardDecAVC","Missing_Bbx_Field","IsValidRadiusParam","fAlpha","bInitFreetype",",fValue:","call",",state:","resultName","\n    precision highp float;\n    varying vec2 v_uv;\n    uniform sampler2D texture;\n    uniform float fAngle;\n    uniform float fRX1;\n    uniform float fRX2;\n    uniform float fRY1;\n    uniform float fRY2;\n\n    void main()\n    {\n        float r,g,b;  \n        vec4 origin;\n        vec4 result;\n        float  thetabase;\n        float  d;\n    \n        vec4 newpp;  ///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\n        if (v_uv.t  <= 0.5) \n        {\n            newpp.s =  v_uv.s / 2.0;\n            newpp.t =  v_uv.t * 2.0;\n        }\n        else\n        {\n            newpp.s =  v_uv.s / 2.0 + 0.5;\n            newpp.t =  (v_uv.t - 0.5) * 2.0;\n        }\n        float  w;\n        float  h;\n        float  fCenterX;\n        float  fCenterY;\n        float  fRadius;\n        w = 1.0;\n        h = (fRX2 - fRX1) / (fRY2 - fRY1);\n        fCenterX = (fRX1 + fRX2) / 2.0 * w;    ///<圆心实际坐标\n        fCenterY = (fRY1 + fRY2) / 2.0 * h;\n        fRadius = (fRX2 - fRX1) / 2.0 * w;     ///<半径实际长度\n        float fMax = 0.0;\n        if(fRX2 > 1.0 || fRY2 > 1.0 || fRX1 < 0.0 || fRY1 < 0.0) ///<如果不是一个完整的圆\n        {\n             float tmp;\n            if(fRX1 < 0.0)\n            {\n                tmp = -fRX1 * w; ///<左边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRX2 > 1.0)\n            {\n                tmp = (fRX2 - 1.0) * w; ///<右边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRY1 < 0.0)\n            {\n                tmp = -fRY1 * h; ///<上边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n            if(fRY2 > 1.0)\n            {\n                tmp = (fRY2 - 1.0) * h; ///<下边超出图像部分最大实际长度\n                if(tmp > fMax)\n                    fMax = tmp;\n            }\n        }\n        float topCut = fMax / fRadius;   ///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\n        float bottomCut = 0.8;           ///<为矫正效果,最终矫正图固定切掉下面一部分\n        origin.s = 1.0 - newpp.s;\n        origin.t = (bottomCut - topCut) * (1.0 - newpp.t) + topCut;\n        thetabase = 6.2831853 * origin.s + fAngle;\n        d = fRadius * (1.0 - origin.t);\n        result.s = (fCenterX - d*sin(thetabase)) / w;\n        result.t = (fCenterY + d*cos(thetabase)) / h;\n    \n        r = texture2D(texture, result.st).r; \n        g = texture2D(texture, result.st).g;\n        b = texture2D(texture, result.st).b;\n        if(result.s > 1.0 || result.t > 1.0 || result.s < 0.0 || result.t < 0.0)\n        {\n            r = 0.0; \n            g = 0.0; \n            b = 0.0; \n        }\n        gl_FragColor = vec4(r ,g ,b , 1.0);\n    } \n","Invalid_Outline","JSPlayM4_ResetEnd","668348lmxozK","bPortAllocated","avcDecodeEngine","bmpDataCallback","nLineShaderProgram","nCylinderPosSize","SetStreamEnd","toStringTag","SR_ERR_NOT_SUPPORT","ready_frames","JSPlayM4_GetBMP","_JSPlayM4_SetIFrameDecInterval","SR_GetFishParam","createEvent","FT_Render_Glyph","frameSize","nPTZDisplayMode","Out_Of_Memory","_JSPlayM4_GetAdditionData","resetEnd","deleteProgram","GetCropJPEG","%c3>SharedArrayBuffer Error , does not support Soft Decdoe!!!!!",">>>>>yff>>>>> JSPlayM4_SetDecodeEngine 1:","oVideoHandle","SR_ERR_CANVAS","glBlockPosBuffer","audioResampleBuffer","TEXTURE_WRAP_T","preTimeStamp","FECDisable","JSPlayM4_GetFrameInfo","SetOrtho","JSPlayM4_SetStreamEnd","nPTZFragmentNode","SR_DE_FISH_CYLINDER_SPLIT_FLOOR","stop failed ","RenderFrame","symbol","ascender","Missing_Startchar_Field","FEC_SetWnd","jpegDownloadFlag","playSpeed","dataTimeStamp","LINK_STATUS","_JSPlayM4_FEC_SetBackCilling","JSPlayM4_ReversePlay","initEvent","addEventListener","GetDisplayEffect","__await","_decoderLoaded","root","shift","canvasID","JSPlayM4_RenderPrivateData","left","pop","_downloadFile","decCallBackFun",">>>JS 01 destroy decoderObj","SR_SetDisplayRect","totalLength:","click","vecEye","%cThe final decodeEngine is %d (0 is soft,1 is hard),codecType:%d","fRYTop",",fishSubPort:","onload","SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL","appendChild","FECcanvasIDArray","GetPitch","prototype","callBackParameter","iAudioBefDecFrameNum","fSinH","iAudioANRFrameNum","pOriPTZPoints","FECSetWnd","configure","Load_Char","continue","bWriteAudioBefDecData","ComputeLinePoint","setHasThread","Invalid_Opcode","downloadAudioAfterDecodeData","vertexAttribPointer","_JSPlayM4_VideoDataToJpeg","blob:","complete",">>>JS JSPlayM4_FEC_Enable this.decodeEngine:","enDisplayEffect","scale(0.2)","acos","canvasCnv","LINEAR_DESIGN","SetFrameInfoCallBack","JSPlayM4_RTPRawDataCallBack","deleteShader","FEC_ResetCorrectType","slow","stPTZColor","fBottom","GetProj","fHAngleSin","SR_DE_FISH_PANORAMA_CEILING_180","Invalid_Post_Table_Format","JSPlayM4_SetD3DPostProcess","oVideoDecoder","getMilliseconds","fishPort is 0 ,main canvas doesn't need call FEC_Enable","delegate","_JSPlayM4_RenderPrivateDataEx","JSPlayM4_Slow","milliseconds","needSetPreSoft","VERTICAL_LAYOUT","%c1>your browser does not support play without plugin","Ignore","rawDataFrameInfo","texImage2D","this.audioANRBuffer","nSemiSphereTexSize","pUserIn","DEF_In_Glyf_Bytecode","JSPlayM4_RawDataCallBack","mainSubPort","No_Unicode_Glyph_Name","error","texture","script","GetPointFish2PanoWall","jpeg","fNear","JSPlayM4_FEC_Enable","size",">>>>>yff>>>>> JSPlayM4_InputData 2 res:","URL","createObjectURL","yuvLength","nJPEGDataSize","bitPerSample","__esModule","JSPlayM4_GetSDKVersion","done","nPlaceType","NO_RECURSE","displayFrameInfo","iFrameNum","nLineTriangleNum","videoShaderProgram","webgl","suspendedStart","audioANRBuffer","revokeObjectURL","SR_DE_FISH_PLANET","this.playSpeed:","renderEngine","trunc","getImageJPEG","pstStartPos","cos","1017FfAjnz","FT_Set_Char_Size","initDecoder","chooseFrame","Render_Glyph","lastDate","FEC_ERR_ENABLED","face_flags","nWndHeight","nUpDateType","illegal catch attempt","FECResetCorrectType","Invalid_Reference","SR_DE_FISH_PTZ_CEILING","unconfigured",",iZoomNum:","JSPlayM4_StopSound","FECGetViewParam","create","Corrupted_Font_Header","Array_Too_Large","dataType","JSPlayM4_DisplayLostFrames","bmp","num_glyphs","SR_SetViewParam","displayRunning","enumerable","Horiz_Header_Missing","i32","SR_SetFishParamManager","match","catch","getImageBMP","fValue","JSPlayM4_AdditionDataCBFun","nValidSubPort","JSPlayM4_FreePort","compileShader","matProj","OrderError","Done_Face","%c2>there will decode 264 by softDecoder","family_name","nDrawFontHeight","JSPlayM4_GetCropBMP","SetCurStatus","samplesPerSec","throw","webkitURL"];a0_0x27b8=function(){return _0x3789eb};return a0_0x27b8()}})(wasmplayer_min,wasmplayer_min.exports);var wasmplayer_minExports=wasmplayer_min.exports;const FEC_CORRECT_PTZ=256;const FEC_CORRECT_180=512;const FEC_CORRECT_360=768;const FEC_CORRECT_CYLINDER=1536;const defaultCoors={port:0,start:{x:0,y:0},total:{x:0,y:0},diff:{x:0,y:0},startPTZPosition:{x:0,y:0},lastCorrdsY:0,param2d:{upDateType:4,fValue:0,fPTZParam:{fPTZPositionX:0,fPTZPositionY:0},fPTZZoom:0}};class JSPluginV3{constructor(props){this.nWidth=0;this.nHeight=0;this.useHardDev=typeof props.useHardDev!=="undefined"?props.useHardDev:false;this.isHardH264=props.isHardH264||true;this.isHardH265=props.isHardH265||true;this.isSharedArrayBuffer=props.isSharedArrayBuffer||false;this.bGpuSupHardDecHEVC=false;this.oStreamClient=new streamClient1_2_0_minExports.StreamClient;this.oStorageManager=new StorageManager("./transform",{staticPath:"https://open.ys7.com/assets/ezuikit_v4.0"});this.aHead=[];this.pCanvasData=null;this.bPlaySound=-1;this.szStorageUUID="";this.szStreamUUID="";this.g_port=0;this.szId=props.szId;this.iWidth=props.iWidth;this.iHeight=props.iHeight;this.iRate=1;this.decoderVersion="2.0";this.staticPath=props.staticPath||"https://open.ys7.com/assets/ezuikit_v5.0";this.bPause=false;this.bPlay=false;this.bInit=false;this.portAvailable=true;this.esCanvas=null;this.b3DZoom=false;this.oJSPlugin=null;this.bPauseDate=null;this.FECSplitIds="";this.canvasFECSubPort=new Map;this.correctType=null;document.getElementById(props.szId).style=`display:inline-block;width:${props.iWidth}px;height:${props.iHeight}px;background:#000000;background-size:100% 100%;vertical-align:top;`;this.JS_Init();this.oStyle=Object.assign({border:"#000000",borderSelect:"#FFCC00",background:"#4C4B4B"},props.oStyle);if(typeof props.szId==="string"){this.oJSPlugin=$$1("#"+props.szId)}else{this.oJSPlugin=props.szId}this.createWindows();this.esCanvas=new ESCanvas(this.szId+"canvas_draw0");const that=this;this.oJSPlugin.find("."+props.szId+"parent-wnd").eq(0).children().each(function(i){let self=this;$$1(self).bind("mouseenter",function(e){$$1("#"+props.szId+"canvas_draw0").css("pointer-events","all");if(that.b3DZoom){console.log("e",e);console.log("id:",props.szId);that.esCanvas=null;$$1("."+props.szId+"draw-window").unbind();that.esCanvas=new ESCanvas(props.szId+"canvas_draw0");that.esCanvas.setShapeType("Rect");that.esCanvas.setDrawStyle("#ff0000","",0);that.esCanvas.setDrawStatus(true,function(oRECT){that.fCallback&&that.fCallback(oRECT)})}else{$$1("#"+props.szId+"canvas_draw0").css("pointer-events","none")}});$$1(self).bind("mouseleave",function(e){$$1("#"+props.szId+"canvas_draw0").css("pointer-events","none")})})}createWindows(iWidth,iHeight){var that=this;if(iWidth&&iHeight){that.iWidth=iWidth;that.iHeight=iHeight}let iFixWidth=that.iWidth;let iFixHeight=that.iHeight;let iPerWidth=that.iWidth-iFixWidth-2*2;let iPerHeight=that.iHeight-iFixHeight-2*2;let iWndWidth=that.iWidth-iFixWidth;let iWndHeight=that.iHeight-iFixHeight;let iType=1;if(typeof this.szId==="string"){that.oJSPlugin=$$1("#"+this.szId)}else{that.oJSPlugin=this.szId}let szHtml='<div class="'+this.szId+'parent-wnd" style="overflow:hidden;width:100%; height:100%; position: relative;">';let isNeedScale=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if(isNeedScale){for(let i=0;i<1;i++){iWidth=iPerWidth+(i%iType===iType-1?iFixWidth:0);iHeight=iPerHeight+(i+iType>=Math.pow(iType,2)?iFixHeight:0);let iPlayWndWidth=iWndWidth+(i%iType===iType-1?iFixWidth:0);let iPlayWndHeight=iWndHeight+(i+iType>=Math.pow(iType,2)?iFixHeight:0);iPlayWndWidth=iPlayWndWidth*2;iPlayWndHeight=iPlayWndHeight*2;szHtml+='<div style="transform: scale(0.5);-webkit-transform: scale(0.5);-webkit-transform-origin:0 0;text-align:left;transform-origin:0 0; width:'+iPlayWndWidth+"px;height:"+iPlayWndHeight+'px;"><div style="float:left; background-color: '+this.oStyle.background+'; position: relative; width:100%; height:100%;">'+'<canvas id="'+this.szId+"canvas"+i+'" class="'+this.szId+'play-window" wid="'+i+'" width="'+iPlayWndWidth+'" height="'+iPlayWndHeight+'"></canvas>'+(i===0?'<img style="display:none;" id="playImg'+i+'" src="">':"")+'<canvas id="'+this.szId+"canvas_draw"+i+'"  class="'+this.szId+'draw-window" style="position:absolute; top:0; left:0;" wid="'+i+'" width='+iWidth+" height="+iHeight+"></canvas>"+"</div></div>"}}else{for(let i=0;i<1;i++){iWidth=iPerWidth+(i%iType===iType-1?iFixWidth:0);iHeight=iPerHeight+(i+iType>=Math.pow(iType,2)?iFixHeight:0);let iPlayWndWidth=iWndWidth+(i%iType===iType-1?iFixWidth:0);let iPlayWndHeight=iWndHeight+(i+iType>=Math.pow(iType,2)?iFixHeight:0);szHtml+='<div id="'+this.szId+"-container-"+i+'" style="float:left; background-color: '+this.oStyle.background+"; position: relative; width: "+iPlayWndWidth+"px; height: "+iPlayWndHeight+'px;">'+'<canvas id="'+this.szId+"-player"+'" class="'+this.szId+'play-window" wid="'+i+'" width="'+iPlayWndWidth+'" height="'+iPlayWndHeight+'"></canvas>'+(i===0?'<img style="display:none;" id="playImg'+i+'" src="">':"")+'<canvas id="'+this.szId+"canvas_draw"+i+'"  class="'+this.szId+'draw-window" style="position:absolute; top:0; left:0;" wid="'+i+'" width='+iWidth+" height="+iHeight+"></canvas>"+"</div>"}}szHtml+="</div>";that.oJSPlugin.html(szHtml)}JS_Init(){var that=this;if(that.initIng){return}that.initIng=true;var that=this;if(this.bPlay){return false}const promise=new Promise((resolve,reject)=>{if(window[`wasmplayer-${this.szId}`]){that.bInit=true;resolve()}const wasmplayer=new wasmplayer_minExports.JSPlayCtrl(`${that.staticPath}/js/PlayCtrlWasm/${this.isSharedArrayBuffer?"hasWorker":"noWorker"}/Decoder.js`,({bGpuSupHardDecHEVC})=>{that.bInit=true;window.JSPlayerModuleLoaded=true;that.initIng=false;if(bGpuSupHardDecHEVC==false){console.log("当前GPU不支持H265硬解")}else{console.log("当前GPU支持H265硬解")}},0,"webgl");window[`wasmplayer-${this.szId}`]=wasmplayer;resolve()});return promise}PlayM4_openStream(fileHead){const wasmplayer=window[`wasmplayer-${this.szId}`];const that=this;new Uint8Array(fileHead.buffer);let resO=wasmplayer.JSPlayM4_OpenStream(fileHead,40,4*1024*1024);let resS=wasmplayer.JSPlayM4_SetDecodeEngine((this.isHardH264||this.isHardH265)&&this.useHardDev?1:0);console.log("JSPlayM4_SetDecodeEngine:::",(this.isHardH264||this.isHardH265)&&this.useHardDev?1:0,resS);wasmplayer.JSPlayM4_SetFirstFrameCallBack(1,()=>{console.log("%cfirst frame display end:"+(new Date).getMinutes()+":"+(new Date).getSeconds()+"."+(new Date).getMilliseconds(),"color:blue")});wasmplayer.JSPlayM4_SetRunTimeInfoCallBackEx(1,(nRunTimeModule,nStrVersion,nFrameTimeStamp,nFrameNum,nErrorCode)=>{if(that.EventCallback&&that.EventCallback.setRunTimeInfoCallBack){that.EventCallback.setRunTimeInfoCallBack(nRunTimeModule,nStrVersion,nFrameTimeStamp,nFrameNum,nErrorCode)}});console.log("3.打开流 resO:"+resO)}_doPlay(szUrl,oParams,iWndNum,szStartTime,szStopTime){const wasmplayer=window[`wasmplayer-${this.szId}`];this.bPlayIng=true;const _this=this;_this.playURL=oParams.playURL;_this.szUrl=szUrl;if(!document.getElementById(_this.szId+"-player")){let canvasList=document.getElementById(_this.szId+"-container-0");let canvas=document.createElement("canvas");canvasList.appendChild(canvas);if(document.getElementById(_this.szId)){canvas.width=document.getElementById(_this.szId).offsetWidth;canvas.height=document.getElementById(_this.szId).offsetHeight}else{canvas.width=_this.iWidth;canvas.height=_this.iHeight}canvas.id=_this.szId+"-player"}else{let canvasList=document.getElementById(_this.szId+"-container-0");let oldcanv=document.getElementById(this.szId+"-player");console.log(oldcanv);oldcanv.style="position: absolute;";canvasList.removeChild(oldcanv);let canvas=document.createElement("canvas");if(document.getElementById(_this.szId)){canvas.width=document.getElementById(_this.szId).offsetWidth;canvas.height=document.getElementById(_this.szId).offsetHeight}else{canvas.width=_this.iWidth;canvas.height=_this.iHeight}canvas.id=_this.szId+"-player";canvasList.appendChild(canvas)}let promise=new Promise((resolve,reject)=>{this.oStreamClient.stopAll();_this.g_port=wasmplayer.JSPlayM4_GetPort();console.log("1.获取播放库端口号 g_port:"+_this.g_port);this.portAvailable=false;if(_this.EventCallback&&_this.EventCallback.openStreamCallback){console.log("开始取流-----v2");_this.EventCallback.openStreamCallback()}_this.oStreamClient.openStream(szUrl,oParams,data=>{this.oParams=oParams;if(data.errorCode&&data.errorCode!="1"){if(_this.EventCallback&&_this.EventCallback.pluginErrorHandler){_this.EventCallback.pluginErrorHandler(iWndNum,data.errorCode,data)}}if(data.bHead){if(_this.EventCallback&&_this.EventCallback.getStreamHeaderCallback){console.log("完成取流返回流头");_this.EventCallback.getStreamHeaderCallback()}_this.PlayM4_openStream(data.buf);_this.aHead=new Uint8Array(data.buf);if(!!_this.secretKey){wasmplayer.JSPlayM4_SetSecretKey(_this.secretKey)}try{const getQueryString=(name,url)=>{const reg=new RegExp("(^|&)"+name+"=([^&]*)(&|$)","i");const r=url.match(reg);if(r!=null){return unescape(r[2])}return null};const date=getQueryString("begin",oParams.playURL);const year=parseInt(date.slice(0,4));const month=parseInt(date.slice(4,6));const day=parseInt(date.slice(6,8));const hour=parseInt(date.slice(9,11));const min=parseInt(date.slice(11,13));const second=parseInt(date.slice(13,15))+3;const setRes=wasmplayer.JSPlayM4_SetGlobalBaseTime(year,month,day,hour,min,second,0);console.log("设置OSD时间: ",year+":"+month+":"+day+":"+hour+":"+min+":"+second+":"+0);console.log("设置OSD时间res:",setRes)}catch(error){console.log("JSPlayM4_SetGlobalBaseTime:",error)}_this.bPlay=true;_this.bPlayIng=false;let resFCB=wasmplayer.JSPlayM4_SetFrameInfoCallBack(1);if(resFCB!=1){let resFrameInfoError=wasmplayer.JSPlayM4_GetLastError();console.log("resFrameInfoError:"+resFrameInfoError)}wasmplayer.JSPlayM4_RenderPrivateData(4,1);this.firstFlag=true;this.firstGetData=true;wasmplayer.JSPlayM4_FEC_SetCanvasID(this.FECSplitIds);let resP=wasmplayer.JSPlayM4_Play(`${_this.szId}-player`);this.canvasFECSubPort.set(`${_this.szId}-player`,{...defaultCoors});console.log("4.开始播放 resP:"+resP,`${_this.szId}-player`);resolve(resP)}else{if(this.firstGetData){this.firstGetData=false;if(_this.EventCallback&&_this.EventCallback.getVideoStreamCallback){_this.EventCallback.getVideoStreamCallback()}}if(this.firstFlag){let oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();let nWidth=oFrameInfo.width;let nHeight=oFrameInfo.height;this.nWidth=nWidth;this.nHeight=nHeight;if(nWidth){if(_this.EventCallback&&_this.EventCallback.appearFirstFrameCallback){console.log("出现首帧画面(播放成功)------多线程");_this.EventCallback.appearFirstFrameCallback()}if(_this.EventCallback&&_this.EventCallback.averageStreamSuccessCallback){_this.EventCallback.averageStreamSuccessCallback()}console.log("首帧展示",nWidth,nHeight);this.firstFlag=false}}let aBuffer=new Uint8Array(data.buf);if(data.statusString){if(_this.EventCallback&&_this.EventCallback.pluginErrorHandler){_this.EventCallback.pluginErrorHandler(0,1001,data)}}else if(data.type&&data.type==="exception"){if(_this.EventCallback&&_this.EventCallback.pluginErrorHandler){_this.EventCallback.pluginErrorHandler(0,1002,data)}}wasmplayer.JSPlayM4_InputData(aBuffer,aBuffer.length);aBuffer=null}if(_this.szStorageUUID){_this.oStorageManager.inputData(_this.szStorageUUID,data.buf)}},function(){if(_this.bPlay){if(_this.EventCallback&&_this.EventCallback.pluginErrorHandler){_this.EventCallback.pluginErrorHandler(iWndNum,1003)}}_this.bPlayIng=false;reject()}).then(id=>{_this.szStreamUUID=id;_this.oStreamClient.startPlay(id).then(()=>{let resSSOM=wasmplayer.JSPlayM4_SetStreamOpenMode(1);console.log("2.设置流模式 resSSOM:"+resSSOM)}).catch(err=>{console.log("err",err);_this.bPlayIng=false;reject(err.oError)})},function(oError){_this.bPlayIng=false;_this._doRelease();reject(oError)})});return promise}JSPlayM4_SetDecodeEngine(useHard){this.useHard=useHard}JS_Play(szUrl="",oParams={playURL:""},iWndNum,szStartTime,szStopTime){return new Promise((resolve,reject)=>{let loadWasmTimer=setInterval(()=>{if(window.JSPlayerModuleLoaded){clearInterval(loadWasmTimer);this._doPlay(szUrl,oParams,iWndNum,szStartTime,szStopTime).then(data=>{resolve(data)}).catch(err=>{reject(err)})}},50)})}JS_SetSecretKey(iWndNum,secretKey){const wasmplayer=window[`wasmplayer-${this.szId}`];console.log("secretKey:::",secretKey);this.secretKey=secretKey;let resS=wasmplayer.JSPlayM4_SetSecretKey(secretKey);console.log("resSetSecretKey:"+resS)}JS_OpenSound(){const wasmplayer=window[`wasmplayer-${this.szId}`];let resPS=wasmplayer.JSPlayM4_PlaySound();if(resPS===1){this.bPlaySound=1}return resPS}JS_CloseSound(){const wasmplayer=window[`wasmplayer-${this.szId}`];let resPS=wasmplayer.JSPlayM4_StopSound();if(resPS===1){this.bPlaySound=-1}return resPS}JS_Enable3DZoom(iWin,fCallback){if(!this.bPlay){return-1}const wasmplayer=window[`wasmplayer-${this.szId}`];const info=wasmplayer.JSPlayM4_GetFrameInfo();this.JSPlayM4_SetDisplayRegion(0,info.width,0,info.height);$$1("."+this.szId+"draw-window").unbind();this.fCallback=fCallback;this.esCanvas=new ESCanvas(this.szId+"canvas_draw0");this.esCanvas.setShapeType("Rect");this.esCanvas.setDrawStyle("#ff0000","",0);this.esCanvas.setDrawStatus(true,function(oRECT){fCallback(oRECT)});this.b3DZoom=true;return 0}JS_Disable3DZoom(){if(!this.bPlay){return-1}this.esCanvas.setDrawStatus(false);this.b3DZoom=false;return 0}JS_StartSave(g_port,fileName=`${(new Date).getTime()}`){this.oStorageManager.startRecord(`${fileName}.mp4`,this.aHead,2,0,{cbEventHandler:function(iErrorType){console.log("录制错误",iErrorType)},iPackage:0}).then(szUUID=>{this.szStorageUUID=szUUID},function(){})}JS_StopSave(){this.oStorageManager.stopRecord(this.szStorageUUID).then(()=>{this.szStorageUUID=""},function(iError){console.log("iError",iError)})}_JSPlayM4_GetFrameInfo(){const wasmplayer=window[`wasmplayer-${this.szId}`];let oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();let width=oFrameInfo.width;let height=oFrameInfo.height;console.log("width:"+width+",height:"+height);let year=oFrameInfo.year;let month=oFrameInfo.month;let day=oFrameInfo.day;let hour=oFrameInfo.hour;let minute=oFrameInfo.minute;let second=oFrameInfo.second;let milliseconds=oFrameInfo.milliseconds;console.log("OSD时间:"+year+"-"+month+"-"+day+"-"+hour+"-"+minute+"-"+second+"-"+milliseconds);return{width:width,height:height,year:year,month:month,day:day,hour:hour,minute:minute,second:second}}_JSPlayM4_SetDisplayRegion(left,right,top,bottom,flag=true){const that=this;new Promise((resolve,reject)=>{const wasmplayer=window[`wasmplayer-${this.szId}`];const resDR=wasmplayer.JSPlayM4_SetDisplayRegion(`${this.szId}-player`,that.iWidth*left/that.nWidth,that.iWidth*right/that.nWidth,that.iHeight*top/that.nHeight,that.iHeight*bottom/that.nHeight,!flag,false);console.log("oFrameInfo:",that.nWidth,that.nHeight);console.log("canvasInfo:",that.iWidth,that.iHeight);console.log("SetDisplayRegionRes:",resDR,`${this.szId}-player`,that.iWidth*left/that.nWidth,that.iWidth*right/that.nWidth,that.iHeight*top/that.nHeight,that.iHeight*bottom/that.nHeight);resolve({code:0,data:resDR})})}JS_SetFrameInfoCallBack(value){const wasmplayer=window[`wasmplayer-${this.szId}`];let resFCB=wasmplayer.JSPlayM4_SetFrameInfoCallBack(this.g_port,value);if(resFCB!=1){let resFrameInfoError=wasmplayer.JSPlayM4_GetLastError(this.g_port);console.log("resFrameInfoError:"+resFrameInfoError)}console.log("resFCB:"+resFCB)}JS_CapturePicture(port,fileName,format,callback,flag){const wasmplayer=window[`wasmplayer-${this.szId}`];const arrayBufferToBase64Img=buffer=>{const arr=new Uint8Array(buffer);let str="";for(let i=0;i<arr.length;i++){str+=String.fromCharCode(arr[i])}return`data:image/jpeg;base64,${window.btoa(str)}`};function doCapturePicture(aJpegData){if(fileName.indexOf(".jpeg")===-1){fileName+=".jpeg"}if(callback){callback({fileName:fileName,fileUint8Array:aJpegData,base64:arrayBufferToBase64Img(aJpegData)})}}if(!this.bPlay&&this.bPause&&this.tmpCapturePictureData){reject({code:-1,msg:"暂停状态下无法截图"})}let oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();this.nWidth=oFrameInfo.width;this.nHeight=oFrameInfo.height;let promise;const JPEGRes=wasmplayer.JSPlayM4_GetJPEG((jpegData,jpegDataSize)=>{if(!!jpegData){promise=new Promise((resolve,reject)=>{let jpegdatabuffer=new Uint8Array(jpegDataSize);jpegdatabuffer.set(jpegData.subarray(0,jpegDataSize));doCapturePicture(jpegData);if(!callback){wasmplayer._downloadFile(jpegdatabuffer,`${fileName||"capturePicture.jpeg"}`)}resolve({code:1,data:{fileName:fileName,fileUint8Array:jpegData,base64:arrayBufferToBase64Img(jpegData)}})})}else{promise=new Promise((resolve,reject)=>{reject({code:-1,msg:"截图失败"})})}},0);if(JPEGRes===0){promise=new Promise((resolve,reject)=>{reject({code:-1,msg:"截图失败"})})}return promise}JS_GetOSDTime(){const wasmplayer=window[`wasmplayer-${this.szId}`];const promise=new Promise((resolve,reject)=>{let oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();let year=oFrameInfo.year;let month=oFrameInfo.month;let day=oFrameInfo.day;let hour=oFrameInfo.hour;let minute=oFrameInfo.minute;let second=oFrameInfo.second;var time=new Date(`${year}-${month}-${day} ${hour}:${minute}:${second}`).getTime()/1e3;resolve(time)});return promise}JS_Resize(width,height){const wasmplayer=window[`wasmplayer-${this.szId}`];console.log("width:"+width+",height:"+height);let resSet=wasmplayer.JSPlayM4_SetCanvasSize(width,height);this.iWidth=width;this.iHeight=height;document.getElementById(this.szId).style.height=height+"px";document.getElementById(this.szId).style.width=width+"px";let oldcanv=document.getElementById(this.szId+"-player");if(oldcanv){oldcanv.style.height=height+"px";oldcanv.style.width=width+"px"}let container=document.getElementById(this.szId+"-container-0");if(container){container.style.height=height+"px";container.style.width=width+"px"}let drawer=document.getElementById(this.szId+"-drawer0");if(drawer){drawer.style.height=height+"px";drawer.style.width=width+"px"}console.log("resSet:"+resSet)}JS_GetSDKVersion(){const wasmplayer=window[`wasmplayer-${this.szId}`];let res=wasmplayer.JSPlayM4_GetSDKVersion();return res.toString(16)}_doRelease(){const wasmplayer=window[`wasmplayer-${this.szId}`];let resCS=wasmplayer.JSPlayM4_CloseStream();let resFP=wasmplayer.JSPlayM4_FreePort();if(resFP===1){this.portAvailable=true}console.log("doRelease",resCS,resFP);console.log("stop end");this.bPlay=false;this.bPlayIng=false}JS_Stop(){const{szStreamUUID}=this;const wasmplayer=window[`wasmplayer-${this.szId}`];if(this.szStorageUUID){this.JS_StopSave()}const arrayBufferToBase64Img=buffer=>{const arr=new Uint8Array(buffer);var str="";for(let i=0;i<arr.length;i++){str+=String.fromCharCode(arr[i])}return`data:image/jpeg;base64,${window.btoa(str)}`};const promise=new Promise((resolve,reject)=>{wasmplayer.JSPlayM4_GetJPEG((jpegData,jpegDataSize)=>{let canvasList=document.getElementById(this.szId+"-container-0");let oldcanv=document.getElementById(this.szId+"-player");if(oldcanv){canvasList.removeChild(oldcanv)}let jpegdatabuffer=new Uint8Array(jpegDataSize);jpegdatabuffer.set(jpegData.subarray(0,jpegDataSize));this.tmpCapturePictureData=jpegData;if(this.correctType===null){canvasList.style.backgroundImage=`url(${arrayBufferToBase64Img(jpegData)})`}else{canvasList.style.backgroundImage=""}canvasList.style.backgroundSize=`100% 100%`},0);setTimeout(()=>{var stopStreamPromise=this.oStreamClient.stopAll(szStreamUUID);stopStreamPromise.then(data=>{console.log("防抖 停止取流成功");this._colseFECAllSubWnd();let resS=wasmplayer.JSPlayM4_Stop(false);if(resS==1){this._doRelease();resolve({resS:resS})}else{var jsPluginErrorCode=wasmplayer.JSPlayM4_GetLastError();if(jsPluginErrorCode==35){let timer10=setInterval(()=>{if(!resS){resS=wasmplayer.JSPlayM4_Stop(false);if(resS==1){this._doRelease();resolve({resS:resS})}else{jsPluginErrorCode=wasmplayer.JSPlayM4_GetLastError();console.log("stop error ",jsPluginErrorCode)}}else{clearInterval(timer10)}},50)}else{console.log("stop - other error, still resolve",jsPluginErrorCode,resS);this._doRelease();resolve({resS:resS,jsPluginErrorCode:jsPluginErrorCode})}}}).catch(err=>{console.log("停止取流失败_jsPluginErrorCode",err);this._doRelease();var jsPluginErrorCode=wasmplayer.JSPlayM4_GetLastError();console.log("停止取流失败_jsPluginErrorCode",jsPluginErrorCode);resolve({jsPluginErrorCode:jsPluginErrorCode})});resolve()},300)});return promise}JS_DestroyWorker(){const wasmplayer=window[`wasmplayer-${this.szId}`];this._colseFECAllSubWnd();let canvasList=document.getElementById(this.szId+"-container-0");let oldcanv=document.getElementById(this.szId+"-player");if(oldcanv){canvasList.removeChild(oldcanv)}if(this.pCanvasData!==null){wasmplayer._free(this.pCanvasData);this.pCanvasData=null}this.pCanvasString=null;console.log("stop end")}JS_Fast(iWind,next){var nextRate=this.iRate;const wasmplayer=window[`wasmplayer-${this.szId}`];if(next){switch(next){case 1:case 2:case 4:nextRate=next;break;case 3:nextRate=.5;break;default:nextRate=this.iRate;break}}else{switch(this.iRate){case 1:nextRate=2;break;case 2:nextRate=4;break;default:nextRate=this.iRate;break}}this.oStreamClient.setPlayRate(this.szStreamUUID,nextRate);this.iRate=nextRate;console.log("开启倍速播放,多线程倍速,全解",nextRate);if(nextRate==4){let SetDecodeThreadNumRes=wasmplayer.JSPlayM4_SetDecodeThreadNum(8);console.log("SetDecodeThreadNumRes",SetDecodeThreadNumRes)}let res=wasmplayer.JSPlayM4_Fast();console.log("res",res)}JS_Slow(){var nextRate=this.iRate;switch(this.iRate){case 2:nextRate=1;break;case 4:nextRate=2;break;default:nextRate=this.iRate;break}this.oStreamClient.setPlayRate(this.szStreamUUID,nextRate);this.iRate=nextRate;console.log("开启倍速播放",nextRate)}JS_Speed(nextRate){const wasmplayer=window[`wasmplayer-${this.szId}`];this.oStreamClient.setPlayRate(this.szStreamUUID,nextRate!==3?nextRate:.5);if(this.iRate===3){if(nextRate===1){wasmplayer.JSPlayM4_Fast()}if(nextRate===2){wasmplayer.JSPlayM4_Fast();wasmplayer.JSPlayM4_Fast()}if(nextRate===4){wasmplayer.JSPlayM4_Fast();wasmplayer.JSPlayM4_Fast();wasmplayer.JSPlayM4_Fast()}}if(this.iRate===1){if(nextRate===3){wasmplayer.JSPlayM4_Slow()}if(nextRate===2){wasmplayer.JSPlayM4_Fast()}if(nextRate===4){wasmplayer.JSPlayM4_Fast();wasmplayer.JSPlayM4_Fast()}}if(this.iRate===2){if(nextRate===1){wasmplayer.JSPlayM4_Slow()}if(nextRate===3){wasmplayer.JSPlayM4_Slow();wasmplayer.JSPlayM4_Slow()}if(nextRate===4){wasmplayer.JSPlayM4_Fast()}}if(this.iRate===4){if(nextRate===1){wasmplayer.JSPlayM4_Slow();wasmplayer.JSPlayM4_Slow()}if(nextRate===2){wasmplayer.JSPlayM4_Slow()}if(nextRate===3){wasmplayer.JSPlayM4_Slow();wasmplayer.JSPlayM4_Slow();wasmplayer.JSPlayM4_Slow()}}if(nextRate==4){wasmplayer.JSPlayM4_SetDecodeThreadNum(8)}this.iRate=nextRate;console.log("开启倍速播放",nextRate)}JS_Seek(iWndNum,szStartTime,szStopTime){let oPromise=new Promise((resolve,reject)=>{const wasmplayer=window[`wasmplayer-${this.szId}`];var res=wasmplayer.JSPlayM4_ResetBuffer(1);console.log("seek 清理缓存",res);this.oStreamClient.seek(this.szStreamUUID,szStartTime,szStopTime);resolve()});return oPromise}JSPlayM4_SetPrintLogFlag(){const wasmplayer=window[`wasmplayer-${this.szId}`];let resDR=wasmplayer.JSPlayM4_SetPrintLogFlag(2);console.log("LogValue:"+2+",resDR:"+resDR)}JSPlayM4_SetDisplayRegion(left,right,top,bottom){new Promise((resolve,reject)=>{const wasmplayer=window[`wasmplayer-${this.szId}`];let resDR=wasmplayer.JSPlayM4_SetDisplayRegion(`${this.szId}-player`,left,right,top,bottom,false,true);resolve({code:0,data:resDR})})}JS_Pause(iWndNum,date){if(!this.bPlay){console.log("当前不是播放状态,无法暂停");return new Promise((resolve,reject)=>{reject({code:0,msg:"当前不是播放状态,不需要暂停"})})}const that=this;const wasmplayer=window[`wasmplayer-${that.szId}`];let oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();let year=oFrameInfo.year;let month=oFrameInfo.month;let day=oFrameInfo.day;let hour=oFrameInfo.hour;let minute=oFrameInfo.minute;let second=oFrameInfo.second;const time=new Date(`${year}-${month}-${day} ${hour}:${minute}:${second}`).getTime()/1e3;const pauseDate=new Date(time*1e3);that.bPauseDate=pauseDate.valueOf();that.bPauseTime=`${year}`+(month>9?month:`0${month}`)+(day>9?day:`0${day}`)+(hour>9?hour:`0${hour}`)+(minute>9?minute:`0${minute}`)+(second>9?second:`0${second}`);console.log("this.bPauseDate:::",that.bPauseDate);console.log("this.bPauseTime:::",that.bPauseTime);const promise=new Promise((resolve,reject)=>{if(date){that.JS_Stop().then(()=>{that.bPlay=false;that.bPause=true;that.bPauseDate=date.valueOf();resolve({code:1,msg:"暂停成功",pauseDate:pauseDate})}).catch(err=>{reject({code:0,msg:"暂停失败"});console.log("err",err)})}else{that.oStreamClient.stopAll();let res=wasmplayer.JSPlayM4_Pause(1);if(res){that.bPlay=false;that.bPlayIng=false;that.bPause=true;if(that.szStorageUUID){this.JS_StopSave()}resolve({pauseDate:pauseDate})}else{reject()}}});return promise}JS_Resume(resumeTime){const that=this;const wasmplayer=window[`wasmplayer-${that.szId}`];const promise=new Promise((resolve,reject)=>{if(resumeTime){if(this.bPauseTime){this.bPauseTime=this.bPauseTime.slice(0,14-resumeTime.length)+resumeTime}else{this.bPauseTime=resumeTime}}if(that.playURL.indexOf("playback")!==-1){that.playURL=that.playURL.replace(/begin=[0-9]{8}T[0-9]{6}Z/gi,`begin=${that.bPauseTime.slice(0,8)}T${that.bPauseTime.slice(8,14)}Z`)}if(that.playURL.indexOf("cloudplayback")!==-1){that.playURL=that.playURL.replace(/"startTime":[0-9]{13}/gi,`"startTime":${that.bPauseDate}`)}if(resumeTime){that.JS_Play(that.szUrl,{playURL:that.playURL}).then(data=>{resolve(data)}).catch(err=>{reject(err)})}else{let url=that.szUrl;if(url.indexOf("playback")!==-1){url=url.replace(/begin=[0-9]{8}T[0-9]{6}Z/gi,`begin=${that.bPauseTime.slice(0,8)}T${that.bPauseTime.slice(8,14)}Z`)}if(url.indexOf("cloudplayback")!==-1){url=url.replace(/"startTime":[0-9]{13}/gi,`"startTime":${that.bPauseDate}`)}that.oStreamClient.openStream(url,{playURL:that.playURL},data=>{if(data.errorCode&&data.errorCode!="1"){if(that.EventCallback&&that.EventCallback.pluginErrorHandler){that.EventCallback.pluginErrorHandler(that.g_port,data.errorCode,data)}reject()}if(data.bHead){if(that.EventCallback&&that.EventCallback.getStreamHeaderCallback){that.EventCallback.getStreamHeaderCallback()}that.aHead=new Uint8Array(data.buf);if(!!that.secretKey){wasmplayer.JSPlayM4_SetSecretKey(that.secretKey)}try{const getQueryString=(name,url)=>{const reg=new RegExp("(^|&)"+name+"=([^&]*)(&|$)","i");const r=url.match(reg);if(r!=null){return unescape(r[2])}return null};const date=getQueryString("begin",oParams.playURL);const year=parseInt(date.slice(0,4));const month=parseInt(date.slice(4,6));const day=parseInt(date.slice(6,8));const hour=parseInt(date.slice(9,11));const min=parseInt(date.slice(11,13));const second=parseInt(date.slice(13,15))+3;const setRes=wasmplayer.JSPlayM4_SetGlobalBaseTime(year,month,day,hour,min,second,0)}catch(error){console.log("JSPlayM4_SetGlobalBaseTime:",error)}that.bPlay=true;that.bPlayIng=false;let resFCB=wasmplayer.JSPlayM4_SetFrameInfoCallBack(1);if(resFCB!=1){wasmplayer.JSPlayM4_GetLastError()}wasmplayer.JSPlayM4_RenderPrivateData(4,1);that.firstFlag=true;that.firstGetData=true}else{if(that.firstGetData){that.firstGetData=false;if(that.EventCallback&&that.EventCallback.getVideoStreamCallback){that.EventCallback.getVideoStreamCallback()}}if(that.firstFlag){let oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();let nWidth=oFrameInfo.width;let nHeight=oFrameInfo.height;that.nWidth=nWidth;that.nHeight=nHeight;if(nWidth){if(that.EventCallback&&that.EventCallback.appearFirstFrameCallback){that.EventCallback.appearFirstFrameCallback()}if(that.EventCallback&&that.EventCallback.averageStreamSuccessCallback){that.EventCallback.averageStreamSuccessCallback()}that.firstFlag=false}}let aBuffer=new Uint8Array(data.buf);if(data.statusString){if(that.EventCallback&&that.EventCallback.pluginErrorHandler){that.EventCallback.pluginErrorHandler(0,1001,data)}}else if(data.type&&data.type==="exception"){if(that.EventCallback&&that.EventCallback.pluginErrorHandler){that.EventCallback.pluginErrorHandler(0,1002,data)}}wasmplayer.JSPlayM4_InputData(aBuffer,aBuffer.length);aBuffer=null}if(that.szStorageUUID){that.oStorageManager.inputData(that.szStorageUUID,data.buf)}},function(){if(that.bPlay){if(that.EventCallback&&that.EventCallback.pluginErrorHandler){that.EventCallback.pluginErrorHandler(iWndNum,1003)}}that.bPlayIng=false;reject()}).then(id=>{that.szStreamUUID=id;that.oStreamClient.startPlay(id).then(()=>{let res=wasmplayer.JSPlayM4_Pause(0);if(res){that.bPlay=true;that.bPlayIng=true;that.bPause=false;that.bPauseDate=null;resolve(res)}else{reject()}}).catch(err=>{that.bPlayIng=false;reject(err.oError)})},function(oError){that.bPlayIng=false;that._doRelease();reject(oError)})}});return promise}JS_FECCorrectType(type,ids){this.FECSplitIds=ids;this.correctType=type;return new Promise((resolve,reject)=>{const res=this._createSplitVideos(type,ids);const hasErr=res.find(item=>item.code===-1);if(hasErr||res.length===0){reject(res)}else{resolve(res)}})}JS_FECSetParam2D(fishSubPort,param2d){const wasmplayer=window[`wasmplayer-${this.szId}`];return wasmplayer.JSPlayM4_FEC_SetParam(fishSubPort,param2d)}_createSplitVideos(type,ids){const that=this;const mainCanvasID=`${that.szId}-player`;ids=mainCanvasID+","+ids;const idsArr=ids?ids.split(","):[];const wasmplayer=window[`wasmplayer-${that.szId}`];const result=[];if(type.correctList&&type.correctList.length>0){for(let i=0;i<type.correctList.length;i++){if(i===0&&type.correctList[i].hidden){continue}if(i===0){setMainCorrectType(type.correctList[0]);continue}if(!idsArr[i]||!document.getElementById(idsArr[i])||document.getElementById(idsArr[i]).nodeName!=="CANVAS"){return[]}let fishSubPort=wasmplayer.JSPlayM4_FEC_GetPort(type.place,type.correctList[i].correctType);let resE=wasmplayer.JSPlayM4_FEC_Enable(fishSubPort);let resFECSW=wasmplayer.JSPlayM4_FEC_SetWnd(fishSubPort,idsArr[i]);const param2d={upDateType:that._matchUpDateType(type.correctList[i].correctType),fValue:0,fPTZParam:{fPTZPositionX:type.correctList[i].x||0,fPTZPositionY:type.correctList[i].y||0},fPTZZoom:1e-5};const resParam=that.JS_FECSetParam2D(fishSubPort,param2d);if(resE===0||resFECSW===0||resParam===0){result.push({code:-1,msg:"失败",port:fishSubPort,id:idsArr[i]})}else{result.push({code:0,msg:"成功",port:fishSubPort,id:idsArr[i]});that.canvasFECSubPort.set(idsArr[i],{...defaultCoors,port:fishSubPort,param2d:param2d,startPTZPosition:{x:param2d.fPTZParam.fPTZPositionX,y:param2d.fPTZParam.fPTZPositionY}});document.getElementById(idsArr[i]).setAttribute("data-port",fishSubPort);that._spliceCanvasMouseEvents(idsArr[i],type.correctList[i])}}}else{setMainCorrectType(type)}function setMainCorrectType(typeItem){const param2d={upDateType:that._matchUpDateType(typeItem.correctType),fValue:0,fPTZParam:{fPTZPositionX:typeItem.x||0,fPTZPositionY:typeItem.y||0},fPTZZoom:1e-5};const{port}=that.canvasFECSubPort.get(mainCanvasID);if(port===undefined){console.log("this canvas not display");return result}const mainRes=wasmplayer.JSPlayM4_FEC_ResetCorrectType(port,type.place,typeItem.correctType);if(mainRes===1){result.push({code:0,msg:"成功",port:port,id:mainCanvasID})}else{result.push({code:-1,msg:"失败",port:port,id:mainCanvasID});return}if(typeItem.correctType<=FEC_CORRECT_360)that.JS_FECSetParam2D(port,param2d);else{if(typeItem.viewParam){setTimeout(()=>{if(typeof typeItem.viewParam.x==="number"&&typeof typeItem.viewParam.y==="number"){wasmplayer.JSPlayM4_FEC_SetViewParam(port,2,typeItem.viewParam.x);wasmplayer.JSPlayM4_FEC_SetViewParam(port,1,typeItem.viewParam.y)}if(typeof typeItem.viewParam.zoom==="number"){wasmplayer.JSPlayM4_FEC_SetViewParam(port,3,typeItem.viewParam.zoom)}},200)}}that.canvasFECSubPort.set(mainCanvasID,{...defaultCoors,port:port,param2d:param2d,startPTZPosition:{x:param2d.fPTZParam.fPTZPositionX,y:param2d.fPTZParam.fPTZPositionY}});that._spliceCanvasMouseEvents(mainCanvasID,typeItem)}return result}_matchUpDateType(correctType){switch(correctType){case FEC_CORRECT_360:return 4;case FEC_CORRECT_PTZ:return 8}return 2}_spliceCanvasMouseEvents(canvasId,type){if(canvasId===undefined){return}const canvas=document.getElementById(canvasId);if(canvas===null){return}const that=this;const wasmplayer=window[`wasmplayer-${that.szId}`];const canvasID=canvas.getAttribute("id");let coords=that.canvasFECSubPort.get(canvasID);if(coords.port===undefined){return}const canvasWidth=canvas.width;const canvasHeight=canvas.height;function showCoords(e){const arCoords=[e.clientX,e.clientY];coords.diff.y=arCoords[1]-coords.start.y;let inputYValue=(coords.total.y+coords.diff.y)/canvasHeight*2*Math.PI;let moveLenY=(arCoords[1]-coords.lastCorrdsY)/(canvasHeight*2);let alpha=Math.atan2(coords.startPTZPosition.y-.5,coords.startPTZPosition.x-.5);let PTZPositionX1=coords.startPTZPosition.x+moveLenY*Math.cos(alpha);let PTZPositionY1=coords.startPTZPosition.y+moveLenY*Math.sin(alpha);coords.diff.x=arCoords[0]-coords.start.x;let inputXValue=(coords.total.x+coords.diff.x)/canvasWidth*2*Math.PI;let R=Math.sqrt(Math.pow(PTZPositionX1-.5,2)+Math.pow(PTZPositionY1-.5,2));let theta=-inputXValue;let PTZPositionX=.5+R*Math.cos(theta);let PTZPositionY=.5+R*Math.sin(theta);if(type.correctType<=FEC_CORRECT_360){switch(type.correctType){case FEC_CORRECT_360:coords.param2d.upDateType=4;break;case FEC_CORRECT_180:coords.param2d.upDateType=4;break;case FEC_CORRECT_PTZ:coords.param2d.upDateType=8;let len=Math.sqrt(Math.pow(PTZPositionX-.5,2)+Math.pow(PTZPositionY-.5,2));if(len>.4){return}break}coords.param2d.fValue=inputXValue;coords.param2d.fPTZParam.fPTZPositionX=PTZPositionX;coords.param2d.fPTZParam.fPTZPositionY=PTZPositionY;wasmplayer.JSPlayM4_FEC_SetParam(coords.port,coords.param2d)}else if(type.correctType===FEC_CORRECT_CYLINDER){wasmplayer.JSPlayM4_FEC_SetViewParam(coords.port,2,inputXValue);wasmplayer.JSPlayM4_FEC_SetViewParam(coords.port,1,inputYValue)}}let _moveFn=()=>{};function _canvasMouseDown(event){coords.start.x=event.pageX;coords.start.y=event.pageY;coords.lastCorrdsY=event.pageY;_moveFn=e=>{showCoords(e)};canvas.addEventListener("mousemove",_moveFn)}canvas.addEventListener("mousedown",_canvasMouseDown);const removeMoveEvent=()=>{if(_moveFn!==null){canvas.removeEventListener("mousemove",_moveFn);_moveFn=null;coords.total.x+=coords.diff.x;coords.total.y+=coords.diff.y}};canvas.addEventListener("mouseup",removeMoveEvent);canvas.addEventListener("mouseleave",removeMoveEvent);canvas.addEventListener("mouseout",removeMoveEvent)}_colseFECAllSubWnd(){if(this.FECSplitIds&&this.canvasFECSubPort){const ids=this.FECSplitIds.split(",");for(let id of ids){if(id){const canvasFECSubPortItem=this.canvasFECSubPort.get(id);if(canvasFECSubPortItem===undefined||canvasFECSubPortItem.port===undefined){continue}this.canvasFECSubPort.delete(id);const wasmplayer=window[`wasmplayer-${this.szId}`];wasmplayer.JSPlayM4_FEC_Disable(canvasFECSubPortItem.port,true);wasmplayer.JSPlayM4_FEC_DelPort(canvasFECSubPortItem.port)}}}}FEC_Set3DViewParam(param){const wasmplayer=window[`wasmplayer-${this.szId}`];if(this.FECSplitIds&&this.canvasFECSubPort&&this.correctType){let res=wasmplayer.JSPlayM4_FEC_SetViewParam(param.port,param.upDateType,param.fValue);if(res===1){return Promise.resolve(true)}else{return Promise.reject(false)}}return Promise.reject(undefined)}FEC_Get3DViewParam(param){const wasmplayer=window[`wasmplayer-${this.szId}`];return new Promise((resolve,reject)=>{const cb=Param3D=>{resolve(Param3D)};if(this.FECSplitIds&&this.canvasFECSubPort&&this.correctType){let res=wasmplayer.JSPlayM4_FEC_GetViewParam(param.port,param.upDateType,cb);if(res!==1){return reject(false)}}return reject(undefined)})}}window.JSPluginV3=JSPluginV3;var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var __instance=function(){var instance=void 0;return function(newInstance){if(newInstance)instance=newInstance;return instance}}();(function(){function AudioRenderer(){_classCallCheck(this,AudioRenderer);if(__instance())return __instance();if(AudioRenderer.unique!==undefined){return AudioRenderer.unique}AudioRenderer.unique=this;this.oAudioContext=null;this.currentVolume=80;this.bSetVolume=false;this.gainNode=null;this.iWndNum=-1;this.mVolumes=new Map;var AudioContext=window.AudioContext||window.webkitAudioContext;this.oAudioContext=new AudioContext;this.writeString=function(view,offset,string){for(var i=0;i<string.length;i++){view.setUint8(offset+i,string.charCodeAt(i))}};this.setBufferToDataview=function(output,offset,input){for(var i=0;i<input.length;i++,offset++){output.setUint8(offset,input[i])}};__instance(this)}_createClass(AudioRenderer,[{key:"Play",value:function Play(dataBuf,dataLen,audioInfo){var bufferData=new ArrayBuffer(44+dataLen);var viewTalk=new DataView(bufferData);var sampleRates=audioInfo.samplesPerSec;var channels=audioInfo.channels;var bitsPerSample=audioInfo.bitsPerSample;this.writeString(viewTalk,0,"RIFF");viewTalk.setUint32(4,32+dataLen*2,true);this.writeString(viewTalk,8,"WAVE");this.writeString(viewTalk,12,"fmt ");viewTalk.setUint32(16,16,true);viewTalk.setUint16(20,1,true);viewTalk.setUint16(22,channels,true);viewTalk.setUint32(24,sampleRates,true);viewTalk.setUint32(28,sampleRates*2,true);viewTalk.setUint16(32,channels*bitsPerSample/8,true);viewTalk.setUint16(34,bitsPerSample,true);this.writeString(viewTalk,36,"data");viewTalk.setUint32(40,dataLen,true);this.setBufferToDataview(viewTalk,44,dataBuf);var self=this;this.oAudioContext.decodeAudioData(viewTalk.buffer,function(buffer){var bufferSource=self.oAudioContext.createBufferSource();if(bufferSource==null){return-1}bufferSource.buffer=buffer;bufferSource.start(0);if(self.gainNode==null||self.bSetVolume){self.gainNode=self.oAudioContext.createGain();self.bSetVolume=false}self.gainNode.gain.value=self.currentVolume/100;self.gainNode.connect(self.oAudioContext.destination);bufferSource.connect(self.gainNode)},function(e){console.log("decode error");return-1});return 0}},{key:"Stop",value:function Stop(){if(this.gainNode!=null){this.gainNode.disconnect();this.gainNode=null}return true}},{key:"SetVolume",value:function SetVolume(iVolume){this.bSetVolume=true;this.currentVolume=iVolume;this.mVolumes.set(this.iWndNum,this.currentVolume);return true}},{key:"SetWndNum",value:function SetWndNum(iWndNum){this.iWndNum=iWndNum;var iVolume=this.mVolumes.get(iWndNum);if(iVolume==undefined){iVolume=80}this.currentVolume=iVolume;return true}},{key:"GetVolume",value:function GetVolume(){var iVolume=this.mVolumes.get(this.iWndNum);if(iVolume==undefined){iVolume=80}return iVolume}}]);window.AudioRenderer=AudioRenderer;return AudioRenderer})();var vertexYUVShader=["attribute vec4 vertexPos;","attribute vec2 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos;","}"].join("\n");var fragmentYUVShader=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler,  textureCoord).r;","highp float u = texture2D(uSampler,  textureCoord).r;","highp float v = texture2D(vSampler,  textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n");(function(root,factory){window.SuperRender=factory()})(undefined,function(){function RenderManager(canvas){this.canvasElement=document.getElementById(canvas);this.initContextGL();if(this.contextGL){this.YUVProgram=this.initProgram(vertexYUVShader,fragmentYUVShader);this.initBuffers();this.initTextures()}}RenderManager.prototype.initContextGL=function(){var canvas=this.canvasElement;var gl=null;try{gl=canvas.getContext("webgl")||canvas.getContext("experimental-webgl")}catch(e){gl=null}if(!gl||typeof gl.getParameter!=="function"){gl=null}this.contextGL=gl;console.log("WebGL1.0")};RenderManager.prototype.initProgram=function(vertexShaderScript,fragmentShaderScript){var gl=this.contextGL;var vertexShader=gl.createShader(gl.VERTEX_SHADER);gl.shaderSource(vertexShader,vertexShaderScript);gl.compileShader(vertexShader);if(!gl.getShaderParameter(vertexShader,gl.COMPILE_STATUS)){console.log("Vertex shader failed to compile: "+gl.getShaderInfoLog(vertexShader))}var fragmentShader=gl.createShader(gl.FRAGMENT_SHADER);gl.shaderSource(fragmentShader,fragmentShaderScript);gl.compileShader(fragmentShader);if(!gl.getShaderParameter(fragmentShader,gl.COMPILE_STATUS)){console.log("Fragment shader failed to compile: "+gl.getShaderInfoLog(fragmentShader))}var program=gl.createProgram();gl.attachShader(program,vertexShader);gl.attachShader(program,fragmentShader);gl.linkProgram(program);if(!gl.getProgramParameter(program,gl.LINK_STATUS)){console.log("Program failed to compile: "+gl.getProgramInfoLog(program))}gl.deleteShader(vertexShader);gl.deleteShader(fragmentShader);return program};RenderManager.prototype.initBuffers=function(){var gl=this.contextGL;var vertexPosBuffer=gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,vertexPosBuffer);gl.bufferData(gl.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),gl.STATIC_DRAW);gl.bindBuffer(gl.ARRAY_BUFFER,null);var texturePosBuffer=gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,texturePosBuffer);gl.bufferData(gl.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),gl.DYNAMIC_DRAW);gl.bindBuffer(gl.ARRAY_BUFFER,null);this.vertexPosBuffer=vertexPosBuffer;this.texturePosBuffer=texturePosBuffer};RenderManager.prototype.initTexture=function(){var gl=this.contextGL;var textureRef=gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,textureRef);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.LINEAR);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.LINEAR);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);gl.bindTexture(gl.TEXTURE_2D,null);return textureRef};RenderManager.prototype.initTextures=function(){var gl=this.contextGL;var program=this.YUVProgram;gl.useProgram(program);var yTextureRef=this.initTexture();var ySamplerRef=gl.getUniformLocation(program,"ySampler");gl.uniform1i(ySamplerRef,0);this.yTextureRef=yTextureRef;var uTextureRef=this.initTexture();var uSamplerRef=gl.getUniformLocation(program,"uSampler");gl.uniform1i(uSamplerRef,1);this.uTextureRef=uTextureRef;var vTextureRef=this.initTexture();var vSamplerRef=gl.getUniformLocation(program,"vSampler");gl.uniform1i(vSamplerRef,2);this.vTextureRef=vTextureRef;gl.useProgram(null)};RenderManager.prototype.SR_DisplayFrameData=function(nWidth,nHeight,pData,dWidth,dHeight){if(nWidth<=0||nHeight<=0){return}var gl=this.contextGL;if(null==pData){gl.clearColor(0,0,0,0);gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);return}var canvas=this.canvasElement;this.nWindowWidth=canvas.width;this.nWindowHeight=canvas.height;var nWindowWidth=this.nWindowWidth;var nWindowHeight=this.nWindowHeight;gl.clearColor(.8,.8,1,1);gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);gl.viewport(0,0,nWindowWidth,nWindowHeight);this.updateFrameData(nWidth,nHeight,pData,dWidth,dHeight);var program=this.YUVProgram;gl.useProgram(program);var vertexPosBuffer=this.vertexPosBuffer;gl.bindBuffer(gl.ARRAY_BUFFER,vertexPosBuffer);var vertexPosRef=gl.getAttribLocation(program,"vertexPos");gl.enableVertexAttribArray(vertexPosRef);gl.vertexAttribPointer(vertexPosRef,2,gl.FLOAT,false,0,0);gl.bindBuffer(gl.ARRAY_BUFFER,null);var texturePosBuffer=this.texturePosBuffer;gl.bindBuffer(gl.ARRAY_BUFFER,texturePosBuffer);var texturePosRef=gl.getAttribLocation(program,"texturePos");gl.enableVertexAttribArray(texturePosRef);gl.vertexAttribPointer(texturePosRef,2,gl.FLOAT,false,0,0);gl.bindBuffer(gl.ARRAY_BUFFER,null);gl.drawArrays(gl.TRIANGLE_STRIP,0,4);gl.disableVertexAttribArray(vertexPosRef);gl.disableVertexAttribArray(texturePosRef);gl.useProgram(null)};RenderManager.prototype.updateFrameData=function(width,height,data,dWidth,dHeight){var gl=this.contextGL;var yTextureRef=this.yTextureRef;var uTextureRef=this.uTextureRef;var vTextureRef=this.vTextureRef;var i420Data=data;if(width==dWidth&&height==dHeight){var yDataLength=width*height;var yData=i420Data.subarray(0,yDataLength);gl.activeTexture(gl.TEXTURE0);gl.bindTexture(gl.TEXTURE_2D,yTextureRef);gl.texImage2D(gl.TEXTURE_2D,0,gl.LUMINANCE,width,height,0,gl.LUMINANCE,gl.UNSIGNED_BYTE,yData);var cbDataLength=width/2*height/2;var cbData=i420Data.subarray(width*height,width*height+cbDataLength);gl.activeTexture(gl.TEXTURE2);gl.bindTexture(gl.TEXTURE_2D,vTextureRef);gl.texImage2D(gl.TEXTURE_2D,0,gl.LUMINANCE,width/2,height/2,0,gl.LUMINANCE,gl.UNSIGNED_BYTE,cbData);var crDataLength=cbDataLength;var crData=i420Data.subarray(width*height+width*height/4,width*height+width*height/4+crDataLength);gl.activeTexture(gl.TEXTURE1);gl.bindTexture(gl.TEXTURE_2D,uTextureRef);gl.texImage2D(gl.TEXTURE_2D,0,gl.LUMINANCE,width/2,height/2,0,gl.LUMINANCE,gl.UNSIGNED_BYTE,crData)}else{var yDataLength=dWidth*dHeight;var yData=new Uint8Array(yDataLength);for(var i=0;i<dHeight;i++){var ySonData=i420Data.subarray(i*width,i*width+dWidth);for(var j=0;j<dWidth;j++){yData[i*dWidth+j]=ySonData[j]}}gl.activeTexture(gl.TEXTURE0);gl.bindTexture(gl.TEXTURE_2D,yTextureRef);gl.texImage2D(gl.TEXTURE_2D,0,gl.LUMINANCE,dWidth,dHeight,0,gl.LUMINANCE,gl.UNSIGNED_BYTE,yData);yData=null;ySonData=null;var cbDataLength=dWidth/2*dHeight/2;var cbData=new Uint8Array(cbDataLength);for(var i=0;i<dHeight/2;i++){var cbSonData=i420Data.subarray(width*height+i*width/2,width*height+i*width/2+dWidth/2);for(var j=0;j<dWidth/2;j++){cbData[i*dWidth/2+j]=cbSonData[j]}}gl.activeTexture(gl.TEXTURE2);gl.bindTexture(gl.TEXTURE_2D,vTextureRef);gl.texImage2D(gl.TEXTURE_2D,0,gl.LUMINANCE,dWidth/2,dHeight/2,0,gl.LUMINANCE,gl.UNSIGNED_BYTE,cbData);cbData=null;cbSonData=null;var crDataLength=cbDataLength;var crData=new Uint8Array(crDataLength);for(var i=0;i<dHeight/2;i++){var crSonData=i420Data.subarray(width*height*5/4+i*width/2,width*height*5/4+i*width/2+dWidth/2);for(var j=0;j<dWidth/2;j++){crData[i*dWidth/2+j]=crSonData[j]}}gl.activeTexture(gl.TEXTURE1);gl.bindTexture(gl.TEXTURE_2D,uTextureRef);gl.texImage2D(gl.TEXTURE_2D,0,gl.LUMINANCE,dWidth/2,dHeight/2,0,gl.LUMINANCE,gl.UNSIGNED_BYTE,crData);crData=null;crSonData=null}};RenderManager.prototype.SR_SetDisplayRect=function(stDisplayRect){var gl=this.contextGL;var nWindowWidth=this.nWindowWidth;var nWindowHeight=this.nWindowHeight;var texturePosValues=null;if(stDisplayRect&&nWindowWidth>0&&nWindowHeight>0){var fLeft=stDisplayRect.left/nWindowWidth;var fTop=stDisplayRect.top/nWindowHeight;var fRight=stDisplayRect.right/nWindowWidth;var fBottom=stDisplayRect.bottom/nWindowHeight;texturePosValues=new Float32Array([fRight,fTop,fLeft,fTop,fRight,fBottom,fLeft,fBottom])}else{texturePosValues=new Float32Array([1,0,0,0,1,1,0,1])}var texturePosBuffer=this.texturePosBuffer;gl.bindBuffer(gl.ARRAY_BUFFER,texturePosBuffer);gl.bufferSubData(gl.ARRAY_BUFFER,0,texturePosValues);gl.bindBuffer(gl.ARRAY_BUFFER,null)};RenderManager.prototype.SR_Destroy=function(){var gl=this.contextGL;var YUVProgram=this.YUVProgram;gl.deleteProgram(YUVProgram);var vertexPosBuffer=this.vertexPosBuffer;var texturePosBuffer=this.texturePosBuffer;gl.deleteBuffer(vertexPosBuffer);gl.deleteBuffer(texturePosBuffer);var yTextureRef=this.yTextureRef;var uTextureRef=this.uTextureRef;var vTextureRef=this.vTextureRef;gl.deleteTexture(yTextureRef);gl.deleteTexture(uTextureRef);gl.deleteTexture(vTextureRef)};return RenderManager});var uikitStaticDomain="https://openstatic.ys7.com";var uikitStaticPathV3="".concat(uikitStaticDomain,"/ezuikit_js/ezuikit_static/v65/v3");var uikitStaticPathV1="".concat(uikitStaticDomain,"/ezuikit_js/ezuikit_static/v65/v1");var matchTemplate=function matchTemplate(templateName,params){var IFRAMETEMPLATE=["theme","standard"];var LOCALTEMPLATE=["pcLive","pcRec","mobileLive","mobileRec","noData","security","voice","simple","mobileCall","miniRec"];if(typeof templateName==="undefined"){if(params.themeData){return{templateType:"themeData",templateId:"themeData"}}return{templateType:"local",templateId:""}}if(typeof templateName==="string"){if(templateName.length===32){return{templateType:"remote",templateId:templateName}}else if(IFRAMETEMPLATE.indexOf(templateName)!==-1){if(templateName==="simple"&&typeof params.header==="undefined"&&typeof params.footer==="undefined"){return{templateType:"local",templateId:""}}return{templateType:"iframe",templateId:templateName}}else if(LOCALTEMPLATE.indexOf(templateName)!==-1){if(params.url.indexOf("rec")!=-1&&params.template!="simple"&&params.id!="miniRec"){return{templateType:"local",templateId:isMobile()?"mobileRec":"pcRec"}}return{templateType:"local",templateId:templateName}}else{if(!!params&&params.isCall){return{templateType:"invalid",templateId:templateName}}}}};var isVersion2Available=function isVersion2Available(){var ua=window.navigator.userAgent.toLowerCase();var info={sa:/version.*safari/.test(ua),ch:/chrome/.test(ua),ff:/gecko/.test(ua)&&!/webkit/.test(ua)};if(isMobile()){return false}else if(info.ch){var getChromeVersion=function getChromeVersion(){var arr=window.navigator.userAgent.split(" ");var chromeVersion="";for(var i=0;i<arr.length;i++){if(/chrome/i.test(arr[i]))chromeVersion=arr[i]}if(chromeVersion){return Number(chromeVersion.split("/")[1].split(".")[0])}else{return false}};return getChromeVersion()>91&&!!window.SharedArrayBuffer}return false};var EZUIKitPlayer=function(){function EZUIKitPlayer(params){var _this=this;_classCallCheck$1(this,EZUIKitPlayer);this.isStoping=false;var _params$autoplay=params.autoplay,autoplay=_params$autoplay===void 0?true:_params$autoplay;if(params.template||params.themeData){autoplay=false}this.params=params;this.autoplay=autoplay;window.EZUIKit[params.id]={state:{EZUIKitPlayer:{init:window.EZUIKit[params.id]&&window.EZUIKit[params.id].state&&window.EZUIKit[params.id].state.EZUIKitPlayer.init||false,themeInit:window.EZUIKit[params.id]&&window.EZUIKit[params.id].state&&window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit||false,talkInit:window.EZUIKit[params.id]&&window.EZUIKit[params.id].state&&window.EZUIKit[params.id].state.EZUIKitPlayer.talkInit||false}}};if(matchTemplate(this.params.template,params).templateType!=="iframe"){this.id=params.id;this.width=params.width;this.height=params.height;this.fullScreenWidth=0;this.fullScreenHeight=0;this.isCall=params.isCall||false;this.isWebConsole=params.isWebConsole||false;this.callTime=params.callTime||null;this.hangUpCallback=params.hangUpCallback||null;this.isNeedBellRing=params.isNeedBellRing===false?false:true;this.url=params.url;this.accessToken=params.accessToken;this.deviceSerial=matchEzopenUrl(params.url).deviceSerial;this.channelNo=matchEzopenUrl(params.url).channelNo;this.themeId=matchTemplate(params.template,params).templateId;this.sourceThemeId=matchTemplate(params.template,params).templateId;this.id=params.id;this.audio=true;this.poster=params.poster;this.speed=1;this.disabledTimeLine=false;this.disabledPTZ=false;this.enableSharedArrayBufferGuide=false;this.capacity=null;this.playTimer=null;this.env={domain:"https://open.ys7.com"};this.isMobile=isMobile();this.support3DZoom=false;this.use3DZoom=false;this.is3DZooming=false;this.useHardDev=typeof params.useHardDev!=="undefined"?params.useHardDev:false;this.isInspect=params.isInspect||false;this.inspectRecordingDuration=params.inspectRecordingDuration||4*60*60*1e3;this.inspectVideoWidth=params.inspectVideoWidth||290;this.inspectVideoHeight=params.inspectVideoHeight||170;this._FECCorrectType=null;this._FECSplitIds="";if(document.getElementById("".concat(this.id,"-wrap"))){document.getElementById("".concat(this.id,"-wrap")).innerHTML="";document.getElementById("".concat(this.id,"-wrap")).id=this.id}this.staticPath=uikitStaticPathV1;var isV3=!this.useHardDev&&isVersion2Available()||this.useHardDev&&!this._IsSupHardDecAVC()&&!this._IsSupHardDecHEVC()&&isVersion2Available()||this.useHardDev&&(this._IsSupHardDecAVC()||this._IsSupHardDecHEVC()||isVersion2Available());this.isV3=isV3;if(isV3){this.staticPath=uikitStaticPathV3}if(typeof params.staticPath==="string"){if(params.staticPath.startsWith("http")){this.staticPath=params.staticPath}else{this.staticPath=window.location.protocol+"//"+window.location.host+params.staticPath}if(isV3){this.staticPath+="/v3"}else{this.staticPath+="/v1"}}if(typeof params.audio!=="undefined"){this.audio=params.audio}if(typeof params.env!=="undefined"){this.env=Object.assign(this.env,params.env)}if(typeof params.isMobile!=="undefined"){this.isMobile=params.isMobile}if(typeof params.disabledTimeLine!=="undefined"){this.disabledTimeLine=params.disabledTimeLine}if(typeof params.disabledPTZ!=="undefined"){this.disabledPTZ=params.disabledPTZ}if(typeof params.enableSharedArrayBufferGuide!=="undefined"){this.enableSharedArrayBufferGuide=params.enableSharedArrayBufferGuide}var doInit=function doInit(){if(isVersion2Available()){console.log("启用多线程解析视频")}else{var getChromeVersion=function getChromeVersion(){var arr=navigator.userAgent.split(" ");var chromeVersion="";for(var i=0;i<arr.length;i++){if(/chrome/i.test(arr[i])){chromeVersion=arr[i]}}if(chromeVersion){return Number(chromeVersion.split("/")[1].split(".")[0])}return false};if(!isMobile&&91<getChromeVersion&&_this.enableSharedArrayBufferGuide){console.log("提示用户开启谷歌实验室特性");var wapDomId="".concat(_this.id,"-wrap");var guideDom=document.createElement("div");var guideSpan=document.createElement("span");guideSpan.innerHTML="您当前浏览器可以开启谷歌实验室多线程特性,获取更好播放体验,避免浏览器卡顿及崩溃,详见";guideDom.appendChild(guideSpan);var guideLink=document.createElement("a");guideLink.href="https://open.ys7.com/help/384";guideLink.setAttribute("target","_blank");guideDom.appendChild(guideLink);guideLink.innerHTML="开启说明";guideDom.id="".concat(_this.id,"-guide");guideDom.style="font-size:12px;color:red;";setTimeout(function(){if(document.getElementById(wapDomId)){document.getElementById(wapDomId).insertBefore(guideDom,document.getElementById(_this.id))}},5e3)}}_this.pluginStatus=new Status(_this,_this.id);_this.videoInitTime=Date.now();_this.videoPlayState=1;window.monitorExtendsInfo={protocol:"ezopen",url:_this.url,serial:_this.deviceSerial,no:_this.channelNo,env:_this.env.domain,type:matchEzopenUrl(_this.url).type};window.ezuikitMonitor.report({action:1,logInfo:{pluginVersion:isV3?"v3":"v1",params:params}});_this.initTime=(new Date).getTime();if(_this.autoplay){var initEZUIKitPlayerPromise=_this.initEZUIKitPlayer(params);var getRealUrlPromise=_this._getRealUrlPromise(params.accessToken,params.url);Promise.all([initEZUIKitPlayerPromise,getRealUrlPromise]).then(function(values){if(values[1]){_this.playStartTime=(new Date).getTime();_this._pluginPlay(values[1],function(){if(_this.videoPlayState===1||_this.videoPlayState===4){_this.videoPlayState=2;var now=Date.now();window.ezuikitMonitor.report({action:2,logInfo:{pluginVersion:_this.isV3?"v3":"v1",loadTime:now-_this.videoInitTime,loadTimeDesc:{initTime:_this.playStartTime-_this.videoInitTime,stopTime:0,getWsTime:_this.doCreateWsTime-_this.playStartTime,createWsTime:now-_this.doCreateWsTime}}})}console.log("自动播放成功")},function(){console.log("自动播放失败")})}else{console.log("promise of one",values)}window.EZUIKit[params.id].state.EZUIKitPlayer.init=true;if(document.getElementById("".concat(params.id,"canvas_draw0"))){document.getElementById("".concat(params.id,"canvas_draw0")).style.border="none"}})["catch"](function(err){console.log("err",err);if(_this.videoPlayState===1||_this.videoPlayState===4){_this.videoPlayState=3;var now=Date.now();window.ezuikitMonitor.report({action:3,logInfo:{pluginVersion:_this.isV3?"v3":"v1",loadTime:now-_this.videoInitTime,err:err}})}if(_this.Theme){_this.Theme.setDisabled(true)}_this.pluginStatus.loadingClear();if(_this.isInspect){_this.pluginStatus.loadingSetTextWithBtn({mask:true,maskStyle:"url(".concat(_this.staticPath,"/imgs/bg.svg) no-repeat 100%/cover"),text:err&&err.msg,btnName:"重试",type:1});_this.Theme.jSPlugin.Zoom&&_this.Theme.jSPlugin.Zoom.stopZoom();_this.Theme&&_this.Theme.inspect&&_this.Theme.inspect.InspectEvent&&_this.Theme.inspect.InspectEvent.disableEvidenceBtn()}else{_this.pluginStatus.loadingSetText({text:err&&err.msg||"获取播放地址失败",color:"red"})}})}else{var initEZUIKitPlayerPromise=_this.initEZUIKitPlayer(params);initEZUIKitPlayerPromise.then(function(data){console.log("初始化成功",data);window.EZUIKit[params.id].state.EZUIKitPlayer.init=true;if(document.getElementById("".concat(params.id,"canvas_draw0"))){document.getElementById("".concat(params.id,"canvas_draw0")).style.border="none"}_this.initSuccessTime=(new Date).getTime()})}if(params.plugin&&params.plugin.indexOf("talk")!==-1){_this.Talk=new Talk(_this);window.EZUIKit[params.id].state.EZUIKitPlayer.talkInit=true}_this.getDeviceCapacity()};doInit()}else{return new EZUIKitV3$1.EZUIKitPlayer(params)}this.play=debounce(function(options){return _this._play(options)},500,true);this.resume=debounce(function(time){return _this._resume(time)},500,true);this.changePlayUrl=debounce(function(options,callback,reSetTheme){return _this._changePlayUrl(options,callback,reSetTheme)},500);window.addEventListener("beforeunload",function(){console.log("退出页面,停止视频流");_this.stop()})}_createClass$1(EZUIKitPlayer,[{key:"_getExplore",value:function _getExplore(){var Sys={};var ua=navigator.userAgent.toLowerCase();var s;(s=ua.match(/rv:([\d.]+)\) like gecko/))?Sys.ie=s[1]:(s=ua.match(/msie ([\d\.]+)/))?Sys.ie=s[1]:(s=ua.match(/edge\/([\d\.]+)/))?Sys.edge=s[1]:(s=ua.match(/firefox\/([\d\.]+)/))?Sys.firefox=s[1]:(s=ua.match(/(?:opera|opr).([\d\.]+)/))?Sys.opera=s[1]:(s=ua.match(/chrome\/([\d\.]+)/))?Sys.chrome=s[1]:(s=ua.match(/version\/([\d\.]+).*safari/))?Sys.safari=s[1]:0;if(Sys.chrome){var chromeStr=Sys.chrome;var startIndex=chromeStr.indexOf(".");var sn=Number(chromeStr.substring(0,startIndex));return sn}else if(Sys.ie){console.info("%c1>your browser is IE ,it does not support play without plugin","color: red")}else if(Sys.safari){console.info("%c1>your browser is safari ,it does not support softV2.0 or hard decode","color: red")}else if(Sys.firefox){console.info("%c1>your browser is Firefox ,it only support soft decode","color: red")}else{console.info("%c1>your browser does not support play without plugin","color: red")}return-1}},{key:"_IsSupHardDecAVC",value:function _IsSupHardDecAVC(callback){var chromeVersion=this._getExplore();if(chromeVersion>=94){callback&&callback(true);return true}callback&&callback(false);return false}},{key:"_IsSupHardDecHEVC",value:function _IsSupHardDecHEVC(callback){var bSupHardDecHEVC=false;var chromeVersion=this._getExplore();if(chromeVersion>=107){var config={codec:"hvc1.1.6.L123.00",hardwareAcceleration:"prefer-hardware"};VideoDecoder.isConfigSupported(config).then(function(configInfo){if(configInfo.supported){bSupHardDecHEVC=true;callback&&callback({bSupHardDecHEVC:bSupHardDecHEVC})}else{callback&&callback({bSupHardDecHEVC:bSupHardDecHEVC})}})}else{callback&&callback({bSupHardDecHEVC:bSupHardDecHEVC})}}},{key:"initEZUIKitPlayer",value:function initEZUIKitPlayer(params){var _this2=this;var id=params.id,_params$width=params.width,width=_params$width===void 0?600:_params$width,_params$height=params.height,height=_params$height===void 0?400:_params$height;if(!params.width||!params.height){var videoDOMBounding=document.getElementById(id).getBoundingClientRect();if(!params.width&&videoDOMBounding.width>0){width=videoDOMBounding.width}if(!params.height&&videoDOMBounding.height>0){height=videoDOMBounding.height}}if(this.isInspect){this.width-=this.inspectVideoWidth;this.height-=this.inspectVideoHeight;width=this.width;height=this.height}if(!document.getElementById("".concat(id,"-wrap"))){var wapDom=document.createElement("div");wapDom.id="".concat(id,"-wrap");wapDom.style="display:inline-block;width:".concat(width,"px;position:relative;vertical-align: bottom;");document.getElementById(id).parentNode.insertBefore(wapDom,document.getElementById(id));document.getElementById(id).parentNode.removeChild(document.getElementById(id));wapDom.innerHTML="<div id=".concat(id,"></div>");document.getElementById(id).style="display:inline-block;width:".concat(width,"px;height:").concat(height,"px;");document.getElementById(id).style.verticalAlign="top"}if(this.themeId){console.log(this.themeId);if(params.isCall==true){this.Theme=new CallTheme(this,params.id)}else if(params.isInspect==true){this.Theme=new InspectTheme(this)}else{this.Theme=new Theme(this,params.id)}window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit=true;if(typeof this.params.handleThemeChange==="function"){this.handleThemeChange=this.params.handleThemeChange}}var pluginMessage=new Message$1(this,id);this.Message=pluginMessage;var initDecoder=function initDecoder(resolve,reject){console.log("开始初始化decoder:",(new Date).getTime());var that=_this2;var jSPlugin;if(!_this2.useHardDev&&isVersion2Available()||_this2.useHardDev&&!_this2._IsSupHardDecAVC()&&!_this2._IsSupHardDecHEVC()&&isVersion2Available()||_this2.useHardDev&&(_this2._IsSupHardDecAVC()||_this2._IsSupHardDecHEVC()||isVersion2Available())){jSPlugin=new JSPluginV3({szId:id,iType:2,iWidth:width,iHeight:height,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",useHardDev:_this2.useHardDev,isHardH264:_this2._IsSupHardDecAVC(),isHardH265:_this2._IsSupHardDecHEVC(),isSharedArrayBuffer:isVersion2Available(),staticPath:_this2.staticPath,oStyle:{border:"none",background:"#000000"}})}else{jSPlugin=new window.JSPluginV1({szId:id,iType:2,iWidth:width,iHeight:height,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",staticPath:_this2.staticPath,oStyle:{border:"none",background:"#000000"}})}_this2.pluginStatus.loadingStart(id);if(!!_this2.isCall||!!_this2.isInspect){_this2.pluginStatus.loadingSetText({text:"视频加载中"})}else if(_this2.themeId=="miniRec"){_this2.pluginStatus.loadingSetText({text:""})}else{_this2.pluginStatus.loadingSetText({text:"初始化播放器完成"})}var RunTimeInfoFlag=false;jSPlugin.EventCallback={openStreamCallback:function openStreamCallback(){console.log("开启取流---v1");_this2.openStreamTime=(new Date).getTime();RunTimeInfoFlag=false},getStreamHeaderCallback:function getStreamHeaderCallback(){console.log("完成取流返回流头");_this2.getStreamHeaderTime=(new Date).getTime();RunTimeInfoFlag=false},getVideoStreamCallback:function getVideoStreamCallback(){console.log("返回视频流(首次)");_this2.getVideoStreamTime=(new Date).getTime();if(_this2.isCall&&_this2.Theme&&_this2.Theme.decoderState&&_this2.Theme.decoderState.state.rejection){console.log("挂断/拒绝状态------------stop");_this2.stop(function(){_this2.pluginStatus.loadingClear();_this2.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:_this2.isMobile,type:2})})}if(_this2.isInspect&&_this2.Theme.decoderState.state.play){if(_this2.Theme.inspectMode!=="map"&&_this2.Theme.jSPlugin.Zoom){setTimeout(function(){_this2.Theme.jSPlugin.Zoom.startZoom()},1e3)}_this2.Theme&&_this2.Theme.inspect&&_this2.Theme.inspect.InspectEvent&&_this2.Theme.inspect.InspectEvent.enableEvidenceBtn()}},appearFirstFrameCallback:function appearFirstFrameCallback(){console.log("出现首帧画面(播放成功)");_this2.appearFirstFrameTime=(new Date).getTime()},averageStreamSuccessCallback:function averageStreamSuccessCallback(){_this2.averageStreamSuccessTime=_this2.initSuccessTime-_this2.initTime+(_this2.gotWsUrlTime-_this2.startGetWsUrlTime)+(_this2.appearFirstFrameTime-_this2.openStreamTime);console.log("平均成功取流的出流耗时:",_this2.averageStreamSuccessTime)},loadEventHandler:function loadEventHandler(){},zoomEventResponse:function zoomEventResponse(){},windowEventSelect:function windowEventSelect(iWndIndex){},pluginErrorHandler:function pluginErrorHandler(iWndIndex,iErrorCode,oError){if(_this2.isCall&&_this2.Theme&&_this2.Theme.decoderState&&_this2.Theme.decoderState.state.rejection){return}if(iErrorCode===1003){console.log("断流");if(_this2.Theme){_this2.Theme.setDecoderState({play:false})}_this2.pluginStatus.setPlayStatus({play:false});if(!jSPlugin.bPlay){_this2.pluginStatus.loadingClear();if(_this2.isCall){_this2.pluginStatus.loadingSetTextWithBtn({text:"连接断开,请重试",color:"white",btnName:_this2.isMobile?"重试":"重新加载",isMobile:_this2.isMobile,type:_this2.isCall?1:2})}else if(_this2.isInspect){_this2.pluginStatus.loadingSetTextWithBtn({mask:true,text:"连接断开,请重试",btnName:"重试",type:1});_this2.Theme.jSPlugin.Zoom&&_this2.Theme.jSPlugin.Zoom.stopZoom();_this2.Theme&&_this2.Theme.inspect&&_this2.Theme.inspect.InspectEvent&&_this2.Theme.inspect.InspectEvent.disableEvidenceBtn()}else{_this2.pluginStatus.loadingSetText({text:"连接断开,请重试",color:"red"})}}if(typeof _this2.params.handleError==="function"){_this2.params.handleError({msg:"连接断开,请重试",retcode:1003,id:_this2.params.id,type:"handleError"})}}else{if(oError.errorCode!=1){var now=Date.now();if(_this2.videoPlayState===1||_this2.videoPlayState===4){_this2.videoPlayState=3;window.ezuikitMonitor.report({action:3,logInfo:{pluginVersion:_this2.isV3?"v3":"v1",err:oError,loadTime:now-_this2.videoInitTime}})}else if(_this2.videoPlayState===2){_this2.videoPlayState=5;window.ezuikitMonitor.report({action:5,logInfo:{pluginVersion:_this2.isV3?"v3":"v1",err:oError,loadTime:now-_this2.videoInitTime}})}console.log("errorCode----------",oError.errorCode);var errorInfo=_this2.errorHander.matchErrorInfo(oError.errorCode);var msg="连接断开,请重试";if(errorInfo&&errorInfo.msg){msg=errorInfo.msg}else if(errorInfo&&errorInfo.description){msg=errorInfo.description}if(_this2.Theme){_this2.Theme.setDecoderState({play:false})}_this2.pluginStatus.setPlayStatus({play:false});_this2.pluginStatus.loadingClear();if(_this2.isCall){_this2.pluginStatus.loadingSetTextWithBtn({text:msg,color:"white",btnName:_this2.isMobile?"重试":"重新加载",isMobile:_this2.isMobile})}else if(_this2.isInspect){_this2.Theme.jSPlugin.Zoom&&_this2.Theme.jSPlugin.Zoom.stopZoom();_this2.pluginStatus.loadingSetTextWithBtn({mask:true,text:msg,btnName:"重试",type:1});_this2.Theme&&_this2.Theme.inspect&&_this2.Theme.inspect.InspectEvent&&_this2.Theme.inspect.InspectEvent.disableEvidenceBtn()}else{_this2.pluginStatus.loadingSetText({text:msg,color:"red"})}if(typeof _this2.params.handleError==="function"){_this2.params.handleError({msg:msg,retcode:oError.errorCode,id:_this2.params.id,type:"handleError"})}}else{_this2.pluginStatus.loadingClear();if(_this2.Theme){_this2.Theme.setDisabled(false)}}}},windowEventOver:function windowEventOver(iWndIndex){},windowEventOut:function windowEventOut(iWndIndex){},windowEventUp:function windowEventUp(iWndIndex){},windowFullCcreenChange:function windowFullCcreenChange(bFull){},firstFrameDisplay:function firstFrameDisplay(iWndIndex,iWidth,iHeight){console.log(iWidth,iHeight);jSPlugin.JS_SetCanFullScreen(false)},performanceLack:function performanceLack(){},mouseEvent:function mouseEvent(iMouseEventType,iMouseX,iMouseY){},setRunTimeInfoCallBack:function setRunTimeInfoCallBack(nRunTimeModule,nStrVersion,nFrameTimeStamp,nFrameNum,nErrorCode){if(nErrorCode===5){that.pluginStatus.loadingClear();if(that.isInspect){that.Theme.jSPlugin.Zoom&&that.Theme.jSPlugin.Zoom.stopZoom();that.pluginStatus.loadingSetTextWithBtn({mask:true,maskStyle:"url(".concat(_this2.staticPath,"/imgs/bg.svg) no-repeat 100%/cover"),text:"设备已加密",color:"white",btnName:"重试",type:1})}else{that.pluginStatus.loadingSetText({text:"设备已加密",color:"red"})}}if(typeof _this2.params.handleError==="function"&&!RunTimeInfoFlag){params.handleError({retcode:-1,data:{nRunTimeModule:nRunTimeModule,nStrVersion:nStrVersion,nFrameTimeStamp:nFrameTimeStamp,nFrameNum:nFrameNum,nErrorCode:nErrorCode},id:_this2.params.id,type:"handleRunTimeInfoError"})}RunTimeInfoFlag=true}};_this2.env={domain:"https://open.ys7.com"};if(typeof params.env!=="undefined"){_this2.env=Object.assign(_this2.env,params.env)}if(typeof params.handleTalkSuccess!=="undefined"){_this2.handleTalkSuccess=params.handleTalkSuccess}if(typeof params.handleTalkError!=="undefined"){_this2.handleTalkError=params.handleTalkError}_this2.errorHander=new Code;_this2.jSPlugin=jSPlugin;var checkTimer=setInterval(function(){if(window.JSPlayerModuleLoaded){clearInterval(checkTimer);if(typeof _this2.params.handleInitSuccess==="function"){_this2.params.handleInitSuccess({retcode:0,id:_this2.params.id,type:"handleInitSuccess"})}resolve({meta:{retcode:200,msg:"初始化成功"}})}},50)};var initDecoderPromise=new Promise(initDecoder);return initDecoderPromise}},{key:"_getRealUrlPromise",value:function _getRealUrlPromise(accessToken,url){var _this3=this;console.log("开始获取ws播放地址: url => ".concat(url," ").concat(this.accessToken));this.startGetWsTime=Date.now();this.startGetWsUrlTime=(new Date).getTime();var apiDomain=this.env.domain;if(this.env){apiDomain=this.env.domain}var getRealUrlPromise=function getRealUrlPromise(resolve,reject){var realUrl="";var apiUrl=apiDomain+"/api/lapp/live/url/ezopen";var data=new FormData;data.append("ezopen",url);data.append("isFlv","false");data.append("userAgent",window.navigator.userAgent);data.append("isHttp","false");data.append("accessToken",accessToken);fetch(apiUrl,{method:"POST",body:data}).then(function(response){return response.json()}).then(function(data){if(data.code==200||data.retcode==0){var playUrl="";var stream="";if(data.ext&&data.ext.token){realUrl+=data.data;stream=data.ext.token;playUrl=data.data}else if(data.data&&data.data.token){realUrl+=data.data.url;stream=data.data.token;playUrl=data.data.url}var type=url.indexOf("live")!==-1?"live":"playback";if(type==="live"){realUrl=realUrl+"&ssn="+stream+"&auth=1&biz=4&cln=100"}else{realUrl=realUrl+"&ssn="+stream+"&auth=1&cln=100"}console.log(realUrl);var validateCode=getQueryString("checkCode",realUrl);if(validateCode){if(typeof _this3.jSPlugin.decoderVersion!=="undefined"&&_this3.jSPlugin.decoderVersion==="2.0"){_this3.validateCode=validateCode}else{console.log("设置密钥",validateCode);_this3.validateCode=validateCode;_this3.jSPlugin.JS_SetSecretKey(0,validateCode)}}if(realUrl.indexOf("playback")!==-1){var wsBegin=getQueryString("begin",playUrl)||getQueryString("begin",url);var wsEnd=getQueryString("end",playUrl)||getQueryString("end",url);if(!wsBegin){var defaultDate=new Date;realUrl=realUrl+"&begin="+defaultDate.Format("yyyyMMdd")+"T000000Z"}else{realUrl=realUrl.replace("&begin="+getQueryString("begin",playUrl),"&begin="+formatRecTime(wsBegin,"000000"));if(!getQueryString("begin",realUrl)){realUrl+="&begin="+formatRecTime(wsBegin,"000000")}}if(!wsEnd){realUrl=realUrl+"&end="+formatRecTime(getQueryString("begin",realUrl).substr(0,8),"235959")}else{realUrl=realUrl.replace("&end="+getQueryString("end",playUrl),"&end="+formatRecTime(wsEnd,"235959"));if(!getQueryString("end",realUrl)){realUrl+="&end="+formatRecTime(wsEnd,"235959")}}if(!getQueryString("stream",playUrl)){realUrl=realUrl.replace("stream","&stream")}if(url.indexOf(".cloud")!==-1){var recAPISuccess=function recAPISuccess(data){if(data.code==200){var recSliceArr=[];if(data.data&&data.data.files&&data.data.files.length>0){var dataArr=data.data.files;var nextFileTime=(new Date).getTime();var isAll=data.data.isAll;if(isAll){recSliceArr=recSliceArrFun(dataArr);var recSliceArrJSON=JSON.stringify(recSliceArr).replace("\\","");realUrl+="&recSlice="+recSliceArrJSON.replace("\\","")+"&r="+Math.random();resolve(realUrl)}else{var recTransaction=function recTransaction(){function recAPIV2Success(data){if(data.data&&data.data.files&&data.data.files.length>0){if(data.data.isAll==false){if(data.data.files){dataArr=dataArr.concat(data.data.files)}nextFileTime=data.data.nextFileTime>0?data.data.nextFileTime:(new Date).getTime();recTransaction()}else{recSliceArr=recSliceArrFun(dataArr);var recSliceArrJSON=JSON.stringify(recSliceArr).replace("\\","");realUrl+="&recSlice="+recSliceArrJSON.replace("\\","")+"&r="+Math.random();resolve(realUrl)}}else{recSliceArr=recSliceArrFun(dataArr);var recSliceArrJSON=JSON.stringify(recSliceArr).replace("\\","");realUrl+="&recSlice="+recSliceArrJSON.replace("\\","")+"&r="+Math.random();resolve(realUrl)}}recSliceParams.startTime=nextFileTime;request(recSliceUrl,"POST",recSliceParams,"",recAPIV2Success)};recTransaction()}}else{reject({retcode:-1,msg:"未找到录像片段"})}}else{reject({retcode:-1,msg:"未找到录像片段"})}function recSliceArrFun(data){var downloadPathArr=[];data.forEach(function(item,index){if(downloadPathArr.length==0||item.downloadPath!==downloadPathArr[downloadPathArr.length-1].downloadPath){downloadPathArr.push({downloadPath:item.downloadPath,ownerId:item.ownerId,iStorageVersion:item.iStorageVersion,videoType:item.videoType,iPlaySpeed:0,startTime:item.startTime,endTime:item.endTime})}else{downloadPathArr[downloadPathArr.length-1].endTime=item.endTime}});return downloadPathArr}};var recBegin=reRormatRecTime(getQueryString("begin",realUrl));var recEnd=reRormatRecTime(getQueryString("end",realUrl));var deviceSerial=getQueryString("serial",realUrl);var channelNo=getQueryString("chn",realUrl);var recSliceUrl=apiDomain+"/api/lapp/video/by/time";var recSliceParams={accessToken:_this3.accessToken,recType:1,deviceSerial:deviceSerial,channelNo:channelNo,startTime:recBegin,endTime:recEnd,version:"2.0"};request(recSliceUrl,"POST",recSliceParams,"",recAPISuccess)}else{if(url.indexOf("alarmId")!==-1){var _recAPISuccess=function _recAPISuccess(data){if(data.code==200){var recSliceArr=[];if(data.data){recSliceArr=recSliceArrFun([data.data]);var recSliceArrJSON=JSON.stringify(recSliceArr).replace("\\","");realUrl+="&recSlice="+recSliceArrJSON.replace("\\","");console.log("realUrl",realUrl,data.data.recType);if(data.data.recType==1){realUrl=realUrl.replace("/playback","/cloudplayback")}else{realUrl=realUrl.replace("/cloudplayback","/playback")}resolve(realUrl)}}function recSliceArrFun(data){var downloadPathArr=[];data.forEach(function(item,index){if(downloadPathArr.length==0||item.downloadPath!==downloadPathArr[downloadPathArr.length-1].downloadPath){downloadPathArr.push({downloadPath:item.downloadPath,ownerId:item.ownerId,iStorageVersion:item.iStorageVersion,videoType:item.videoType,iPlaySpeed:0,startTime:item.startTime,endTime:item.endTime})}else{downloadPathArr[downloadPathArr.length-1].endTime=item.endTime}});console.log("downloadPathArr",downloadPathArr);return downloadPathArr}};console.log("进入alarmId回放");var alarmId=getQueryString("alarmId",realUrl);var recBegin=reRormatRecTime(getQueryString("begin",realUrl));var recEnd=reRormatRecTime(getQueryString("end",realUrl));var deviceSerial=getQueryString("serial",realUrl);var channelNo=getQueryString("chn",realUrl);var recSliceUrl=apiDomain+"/api/lapp/video/by/id";var recSliceParams={accessToken:_this3.accessToken,deviceSerial:deviceSerial,channelNo:channelNo,alarmId:alarmId};request(recSliceUrl,"POST",recSliceParams,"",_recAPISuccess)}else{resolve(realUrl)}}}else{resolve(realUrl)}}else{if(_this3.Theme){_this3.Theme.setDisabled(true);_this3.Theme.setDecoderState({play:false})}_this3.pluginStatus.setPlayStatus({play:false});_this3.pluginStatus.loadingClear();if(_this3.isInspect){_this3.Theme.jSPlugin.Zoom&&_this3.Theme.jSPlugin.Zoom.stopZoom();_this3.pluginStatus.loadingSetTextWithBtn({mask:true,maskStyle:"url(".concat(_this3.staticPath,"/imgs/bg.svg) no-repeat 100%/cover"),text:data.msg,color:"white",btnName:"重试",type:1});_this3.Theme&&_this3.Theme.inspect&&_this3.Theme.inspect.InspectEvent&&_this3.Theme.inspect.InspectEvent.disableEvidenceBtn()}else{_this3.pluginStatus.loadingSetText({text:data.msg,color:"red"})}if(typeof _this3.params.handleError==="function"){_this3.params.handleError({retcode:data.code,msg:data.msg,id:_this3.params.id,type:"handleError"})}reject(data)}})};return new Promise(function(resolve,reject){return getRealUrlPromise(resolve,reject)});function formatRecTime(time,defaultTime){var reg=/^[0-9]{8}T[0-9]{6}Z$/;if(reg.test(time)){return time}else if(/[0-9]{8,14}/.test(time)){var start=6-(14-time.length);var end=defaultTime.length;var standardTime=time+defaultTime.substring(start,end);return standardTime.slice(0,8)+"T"+standardTime.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}function reRormatRecTime(time){var year=time.slice(0,4);var month=time.slice(4,6);var day=time.slice(6,8);var hour=time.slice(9,11);var minute=time.slice(11,13);var second=time.slice(13,15);var date=year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second;return new Date(date.replace(/-/g,"/")).getTime()}}},{key:"_pluginPlay",value:function _pluginPlay(data,successCallback,errorCallback){var _this4=this;console.log("执行播放 _pluginPlay",data);if(!data){return false}function getPlayParams(url){var websocketConnectUrl=url.split("?")[0].replace("/live","").replace("/playback","");var websocketStreamingParam=(url.indexOf("/live")===-1?url.indexOf("cloudplayback")!==-1?"/cloudplayback?":"/playback?":"/live?")+url.split("?")[1];if(websocketStreamingParam.indexOf("/playback")!==-1){websocketStreamingParam=websocketStreamingParam.replace("stream=2","stream=1")}return{websocketConnectUrl:websocketConnectUrl,websocketStreamingParam:websocketStreamingParam}}var wsUrl=getPlayParams(data).websocketConnectUrl;if(this.env&&this.env.wsUrl){wsUrl=this.env.wsUrl}this.doCreateWsTime=Date.now();this.gotWsUrlTime=(new Date).getTime();var wsParams={playURL:getPlayParams(data).websocketStreamingParam};console.log("播放前 stop 阶段 结束");this.isStoping=false;var now=Date.now();console.log("执行播放 ... this.jSPlugin.JS_Play at ",now);this.jSPlugin.JS_Play(wsUrl,wsParams,0).then(function(){console.log("执行播放 ... this.jSPlugin.JS_Play 播放成功",wsUrl,wsParams);console.log("执行播放耗时 ",Date.now()-now);if(_this4.isStoping){console.log("现在在播放前 stop 阶段,此次应为无效播放成功触发。不执行后续回调, 此次耗时无效");return}if(_this4.validateCode&&typeof _this4.jSPlugin.decoderVersion!=="undefined"&&_this4.jSPlugin.decoderVersion==="2.0"){_this4.jSPlugin.JS_SetSecretKey(0,_this4.validateCode)}_this4.pluginStatus.loadingClear();_this4.pluginStatus.setPlayStatus({play:true,loading:false});if(_this4.Theme){_this4.Theme.setDecoderState({play:true});if(!_this4.isCall&&Object.keys(_this4.Theme.themeData).length>0){var isOpenSound=_.findIndex(_this4.Theme.themeData.footer.btnList,function(v){return v.iconId==="sound"&&v.isrender===1&&v.defaultActive===1})>-1}_this4.audio=isOpenSound}if(_this4.audio){setTimeout(function(){_this4.openSound()},100)}if(typeof _this4.params.handleSuccess==="function"){_this4.params.handleSuccess({retcode:0,id:_this4.params.id,type:"handleSuccess"})}successCallback(wsParams)},function(err){console.log("err",err);var msg="播放失败,请检查设备及客户端网络";var retcode=-1;if(_this4.jSPlugin.bPlay){return false}if(err&&err.errorCode){var errorInfo=_this4.errorHander.matchErrorInfo(err.errorCode);if(_this4.Theme){_this4.Theme.setDisabled(true)}if(errorInfo&&errorInfo.msg){msg=errorInfo.msg}else if(errorInfo&&errorInfo.description){msg=errorInfo.description}else{msg="播放失败,请检查设备及客户端网络"}retcode=err.errorCode}if(_this4.isCall){if(_this4.Theme&&_this4.Theme.decoderState&&_this4.Theme.decoderState.state.rejection);else{_this4.pluginStatus.loadingClear();_this4.pluginStatus.loadingSetTextWithBtn({text:msg,color:"white",btnName:_this4.isMobile?"重试":"重新加载",isMobile:_this4.isMobile})}}else{_this4.pluginStatus.loadingClear();if(_this4.isInspect){_this4.Theme.jSPlugin.Zoom&&_this4.Theme.jSPlugin.Zoom.stopZoom();if(retcode===5404){if(!document.getElementById("".concat(_this4.id,"-no-inspect-box"))){_this4.Theme&&_this4.Theme.inspectEnding()}}else{_this4.pluginStatus.loadingSetTextWithBtn({mask:true,text:msg,color:"white",btnName:"重试",type:1})}_this4.Theme&&_this4.Theme.inspect&&_this4.Theme.inspect.InspectEvent&&_this4.Theme.inspect.InspectEvent.disableEvidenceBtn()}else{_this4.pluginStatus.loadingSetText({text:msg,color:"red"})}}if(typeof _this4.params.handleError==="function"){_this4.params.handleError({retcode:retcode,msg:msg,id:_this4.params.id,type:"handleError"})}errorCallback()})}},{key:"_play",value:function _play(options){var _this5=this;console.log("执行播放 play options.url =>",options);this.pluginStatus.setPlayStatus({play:false,loading:true});this.playStartTime=(new Date).getTime();if(options){if(typeof options==="string"){this.url=options}if(typeof options.url==="string"){this.url=options.url}if(typeof options.accessToken==="string"){this.accessToken=options.accessToken}if(typeof matchEzopenUrl(this.url).deviceSerial==="string"){this.deviceSerial=matchEzopenUrl(this.url).deviceSerial}if(typeof matchEzopenUrl(this.url).channelNo==="string"){this.channelNo=matchEzopenUrl(this.url).channelNo}if(this.Theme&&(typeof options.url==="string"||typeof options.accessToken==="string")){this.Theme.getDeviceInfo(function(data){})}}var promise=new Promise(function(resolve,reject){console.log("执行 播放前 stop");_this5.isStoping=true;_this5.jSPlugin.JS_Stop(0).then(function(){_this5.stopTime=Date.now();console.log("播放前 stop 执行成功 this.url => ".concat(_this5.url," ").concat(_this5.accessToken));_this5._getRealUrlPromise(_this5.accessToken,_this5.url).then(function(data){_this5._pluginPlay(data,function(params){console.log("---------------------播放成功回调");console.log("this.videoPlayState",_this5.videoPlayState);if(_this5.videoPlayState===1||_this5.videoPlayState===4){_this5.videoPlayState=2;var now=Date.now();window.ezuikitMonitor.report({action:2,logInfo:{pluginVersion:_this5.isV3?"v3":"v1",loadTime:now-_this5.videoInitTime,loadTimeDesc:{initTime:_this5.playStartTime-_this5.videoInitTime,stopTime:_this5.stopTime-_this5.playStartTime,getWsTime:_this5.doCreateWsTime-_this5.stopTime,createWsTime:now-_this5.doCreateWsTime}}})}setTimeout(function(){_this5.pluginStatus.loadingClear();if(_this5.isCall&&_this5.Theme&&_this5.Theme.decoderState&&_this5.Theme.decoderState.state.rejection){console.log("挂断/拒绝状态------------stop");_this5.stop(function(){_this5.pluginStatus.loadingClear();_this5.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:_this5.isMobile,type:2})})}},500);if(_this5.jSPlugin&&_this5._FECSplitIds&&_this5._FECCorrectType){_this5.jSPlugin.JS_FECCorrectType(_this5._FECCorrectType,_this5._FECSplitIds)}resolve(true)},function(){return reject(false)})})["catch"](function(err){var now=Date.now();if(_this5.videoPlayState===1||_this5.videoPlayState===4){_this5.videoPlayState=3;window.ezuikitMonitor.report({action:3,logInfo:{pluginVersion:_this5.isV3?"v3":"v1",err:err,loadTime:now-_this5.videoInitTime}})}else if(_this5.videoPlayState===2){_this5.videoPlayState=5;window.ezuikitMonitor.report({action:5,logInfo:{pluginVersion:_this5.isV3?"v3":"v1",err:err,loadTime:now-_this5.videoInitTime}})}var msg=err.msg?err.msg:"播放失败,请检查设备及客户端网络";if(_this5.Theme){_this5.Theme.setDisabled(true)}if(_this5.isCall){if(_this5.Theme&&_this5.Theme.decoderState&&_this5.Theme.decoderState.state.rejection){if(err&&err.code==20018){_this5.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:_this5.isMobile,type:2})}else{_this5.pluginStatus.loadingSetTextWithBtn({text:"通话已结束",color:"white",isMobile:_this5.isMobile,type:2})}}else{if(err&&err.code==20018){_this5.pluginStatus.loadingSetTextWithBtn({text:"该用户不拥有该设备",color:"white",isMobile:_this5.isMobile,type:2});if(!_this5.isWebConsole&&_this5.Theme&&!!_this5.Theme.call){_this5.Theme.call.userNoDevice()}}else{_this5.pluginStatus.loadingSetTextWithBtn({text:msg,color:"white",btnName:_this5.isMobile?"重试":"重新加载",isMobile:_this5.isMobile})}}}else if(_this5.isInspect){_this5.Theme.jSPlugin.Zoom&&_this5.Theme.jSPlugin.Zoom.stopZoom();_this5.pluginStatus.loadingSetTextWithBtn({mask:true,maskStyle:"url(".concat(_this5.staticPath,"/imgs/bg.svg) no-repeat 100%/cover"),text:msg,color:"white",btnName:"重试",type:1});_this5.Theme&&_this5.Theme.inspect&&_this5.Theme.inspect.InspectEvent&&_this5.Theme.inspect.InspectEvent.disableEvidenceBtn()}else{_this5.pluginStatus.loadingSetText({text:msg,color:"red"})}if(typeof _this5.params.handleError==="function"){_this5.params.handleError({retcode:err.oError?err.oError.errorCode:-1,msg:msg,id:_this5.params.id,type:"handleError"})}reject({retcode:err.oError?err.oError.errorCode:-1,msg:msg,id:_this5.params.id,type:"handleError"})})})});return promise}},{key:"stop",value:function stop(){var _this6=this;var callBack=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(){};this.pluginStatus.setPlayStatus({loading:true});this.reSetTheme();return this.jSPlugin.JS_Stop(0).then(function(){console.log("停止成功");_this6.pluginStatus.setPlayStatus({play:false,loading:false});if(_this6.Theme){_this6.Theme.setDecoderState({play:false})}callBack()})}},{key:"changeVideoLevel",value:function changeVideoLevel(definition){var initUrl=this.url;var url=initUrl;if(typeof definition==="number"){url=definition===1?initUrl.replace(".live",".hd.live"):initUrl.replace(".hd.live",".live");this.jSPlugin.playURL=definition?this.jSPlugin.playURL.replace("stream=2","stream=1"):this.jSPlugin.playURL.replace("stream=1","stream=2");console.warn("changeVideoLevel","该方法将不在支持传入number类型的参数,建议使用对象类型的参数")}if(_typeof(definition)==="object"){if(typeof definition.streamType==="number"&&["sd","hd"].includes(definition.level)){url=definition.level==="hd"?initUrl.replace(".live",".hd.live"):initUrl.replace(".hd.live",".live")}this.jSPlugin.playURL=definition.streamType===1?this.jSPlugin.playURL.replace("stream=2","stream=1"):this.jSPlugin.playURL.replace("stream=1","stream=2")}this.url=url;var changeRT=this.changePlayUrl({url:url},function(){},false);if(isPromise(changeRT)){return changeRT}return new Promise(function(resolve){resolve(changeRT)})}},{key:"reSetTheme",value:function reSetTheme(){var resetList=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];if(this.Theme&&this.Theme.Ptz){this.Theme.setDecoderState({pantile:false});this.Theme.Ptz.hide()}if(this.Theme){if(this.Theme.decoderState.state.recordvideo){this.Theme.setDecoderState({recordvideo:false})}}if(resetList.indexOf("zoom")>-1){if(this.use3DZoom){this.is3DZooming=false;this.close3DZoom()}else{if(this.Zoom&&this.Zoom.currentScale>1){this.Zoom.stopZoom()}}if(this.Theme){this.Theme.setDecoderState({zoom:false})}}if(this.Theme&&this.Theme.decoderState.state.talk){this.stopTalk();this.Theme.setDecoderState({talk:false})}if(this.Theme&&this.Theme.Rec&&!this.Theme.isMobile){this.Theme.Rec.datepickerHide()}if(this.Theme&&this.Theme.Rec){this.Theme.changeRecSpeed(1);this.Theme.nextRate=1;this.speed=1;this.Theme.setDecoderState({speed:false})}}},{key:"_changePlayUrl",value:function _changePlayUrl(options){var _this7=this;var callback=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){};var reSetTheme=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;this.reSetTheme(["zoom"]);this.getDeviceCapacity({accessToken:options.accessToken||this.accessToken,deviceSerial:options.deviceSerial||this.deviceSerial});var initUrl=this.url;var url=matchUrl(initUrl,options);if(options.accessToken){this.accessToken=options.accessToken;this.deviceSerial=options.deviceSerial;this.channelNo=options.channelNo}this.url=url;this.videoInitTime=Date.now();this.videoPlayState=1;window.monitorExtendsInfo={protocol:"ezopen",url:this.url,serial:this.deviceSerial,no:this.channelNo,env:this.env.domain,type:matchEzopenUrl(this.url).type};window.ezuikitMonitor.report({action:4,logInfo:{pluginVersion:this.isV3?"v3":"v1",type:matchEzopenUrl(this.url).type,params:options}});callback();this.pluginStatus.loadingStart(this.id);this.pluginStatus.loadingSetText({text:"加载中,请稍后"});var promise=new Promise(function(resolve,reject){var changePlayUrlParams={url:url};if(options.accessToken){changePlayUrlParams["accessToken"]=options.accessToken}console.log("切换播放地址 参数 ",changePlayUrlParams);return _this7.play(changePlayUrlParams).then(function(){console.log("切换播放地址 play 执行成功 ",_this7.url,_this7.accessToken);if(reSetTheme){if(options.type){if(_this7.Theme){if(options.type=="rec"||options.type=="cloud.rec"){_this7.Theme.changeTheme(_this7.isMobile?"mobileRec":"pcRec")}else if(options.type=="miniRec"){_this7.Theme.changeTheme("miniRec")}else{_this7.Theme.changeTheme(_this7.isMobile?"mobileLive":"pcLive");_this7.Theme.Rec.unSyncTimeLine()}}}else{if(_this7.Theme){if(_this7.url.indexOf(".rec")>-1){_this7.Theme.changeTheme(_this7.isMobile?"mobileRec":"pcRec")}else{if(_this7.isCall){_this7.Theme.changeTheme(_this7.isMobile?"mobileCall":"webCall")}else{_this7.Theme.changeTheme(_this7.themeId)}_this7.Theme.Rec.unSyncTimeLine()}}}}if(options&&options.begin&&options.deviceSerial&&_this7.Theme){_this7.Theme.Rec.setDatepickerDate(options.begin)}if(_this7.Theme){_this7.Theme.setDisabled(false)}resolve(url)})["catch"](function(err){reject(url);if(err&&err.msg){if(_this7.Theme){_this7.Theme.setDisabled(true)}_this7.pluginStatus.loadingClear();if(_this7.isInspect){_this7.Theme.jSPlugin.Zoom&&_this7.Theme.jSPlugin.Zoom.stopZoom();_this7.pluginStatus.loadingSetTextWithBtn({mask:true,maskStyle:"url(".concat(_this7.staticPath,"/imgs/bg.svg) no-repeat 100%/cover"),text:err.msg,color:"white",btnName:"重试",type:1});_this7.Theme&&_this7.Theme.inspect&&_this7.Theme.inspect.InspectEvent&&_this7.Theme.inspect.InspectEvent.disableEvidenceBtn()}else{_this7.pluginStatus.loadingSetText({text:err.msg,color:"red"})}}})});function matchUrl(matchInitUrl,matchOptions){if(matchOptions.url){return matchOptions.url}console.log("--------------matchInitUrl",matchInitUrl);var type=matchInitUrl.split("/")[4].split(".")[matchInitUrl.split("/")[4].split(".").length-1].split("?")[0];if(type==="rec"&&matchInitUrl.indexOf(".cloud.rec")!==-1){type="cloud.rec"}if(matchOptions.type){type=matchOptions.type=="miniRec"?"rec":matchOptions.type}var deviceSerial=matchInitUrl.split("/")[3];if(matchOptions.deviceSerial){deviceSerial=matchOptions.deviceSerial}var channelNo=matchInitUrl.split("/")[4].split(".")[0];if(matchOptions.channelNo){channelNo=matchOptions.channelNo}var validCode=matchInitUrl.split("/")[2].split("@").length===2?matchInitUrl.split("/")[2].split("@")[0]:"";if(typeof matchOptions.validCode!=="undefined"){validCode=matchOptions.validCode}var hd=typeof matchOptions.hd==="undefined"?matchInitUrl.indexOf(".hd")!==-1:matchOptions.hd;var result="ezopen://".concat(validCode?"".concat(validCode,"@"):"","open.ys7.com/").concat(deviceSerial,"/").concat(channelNo).concat(hd?".hd":"",".").concat(type);if(type==="live"){return result}result="ezopen://".concat(validCode?"".concat(validCode,"@"):"","open.ys7.com/").concat(deviceSerial,"/").concat(channelNo,".").concat(type);if(matchOptions.begin&&matchOptions.end){result+="?begin=".concat(matchOptions.begin,"&end=").concat(matchOptions.end)}else if(matchOptions.begin){result+="?begin=".concat(matchOptions.begin)}else if(getQueryString("begin",matchInitUrl)&&getQueryString("end",matchInitUrl)){result+="?begin=".concat(getQueryString("begin",matchInitUrl),"&end=").concat(getQueryString("end",matchInitUrl))}else if(getQueryString("begin",matchInitUrl)){result+="?begin=".concat(getQueryString("begin",matchInitUrl))}return result}return promise}},{key:"getOSDTime",value:function getOSDTime(){var _this8=this;var promise=new Promise(function(resolve,reject){_this8.jSPlugin.JS_GetOSDTime(0).then(function(data){resolve({code:0,retcode:0,data:data});if(typeof _this8.params.getOSDTimeCallBack==="function"){_this8.params.getOSDTimeCallBack({id:_this8.id,type:"getOSDTime",code:0,data:data})}})["catch"](function(err){reject({code:-1,retcode:-1,data:err});if(typeof _this8.params.getOSDTimeCallBack==="function"){_this8.params.getOSDTimeCallBack({id:_this8.id,type:"getOSDTime",code:-1,data:-1})}})});return promise}},{key:"capturePicture",value:function capturePicture(name){var _this9=this;var callback=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var capturePictureRT=this.jSPlugin.JS_CapturePicture(0,name||(new Date).getTime(),"JPEG",callback,!!callback);if(isPromise(capturePictureRT)){return new Promise(function(resolve,reject){capturePictureRT.then(function(res){if(typeof _this9.params.capturePictureCallBack==="function"){_this9.params.capturePictureCallBack({id:_this9.id,type:"capturePicture",code:0})}var result={id:_this9.id,code:0,data:res.data,type:"handleCapturePicture"};if(typeof _this9.params.handleCapturePicture==="function")_this9.params.handleCapturePicture(result);resolve(result)},function(err){if(typeof _this9.params.capturePictureCallBack==="function"){_this9.params.capturePictureCallBack({id:_this9.id,type:"capturePicture",code:-1})}var result=Object.assign({id:_this9.id,type:"handleCapturePicture",code:-1},err);if(typeof _this9.params.handleCapturePicture==="function")_this9.params.handleCapturePicture(result);reject(result)})})}}},{key:"startSave",value:function startSave(name){var _this10=this;var startSaveRT=this.jSPlugin.JS_StartSave(0,name);if(isPromise(startSaveRT)){if(typeof this.params.startSaveCallBack==="function"){startSaveRT.then(function(){_this10.params.startSaveCallBack({id:_this10.id,type:"startSave",code:0})})["catch"](function(){_this10.params.startSaveCallBack({id:_this10.id,type:"startSave",code:-1})})}return startSaveRT}if(this.Theme){this.Theme.setDecoderState({recordvideo:true})}return new Promise(function(resolve){resolve(startSaveRT)})}},{key:"stopSave",value:function stopSave(){var _this11=this;var stopSaveRT=this.jSPlugin.JS_StopSave(0);if(isPromise(stopSaveRT)){if(typeof this.params.startSaveCallBack==="function"){stopSaveRT.then(function(){_this11.params.stopSaveCallBack({id:_this11.id,type:"stopSave",code:0})})["catch"](function(){_this11.params.stopSaveCallBack({id:_this11.id,type:"stopSave",code:-1})})}return stopSaveRT}if(this.Theme){this.Theme.setDecoderState({recordvideo:false})}return new Promise(function(resolve){resolve(stopSaveRT)})}},{key:"openSound",value:function openSound(){var openSoundRT=this.jSPlugin.JS_OpenSound(0);console.log("打开声音",openSoundRT);if(isPromise(openSoundRT)){return openSoundRT}if(this.Theme){this.Theme.setDecoderState({sound:true})}if(typeof this.params.openSoundCallBack==="function"){this.params.openSoundCallBack({id:this.id,type:"openSound",code:openSoundRT})}return new Promise(function(resolve){resolve(openSoundRT)})}},{key:"closeSound",value:function closeSound(){var closeSoundRT=this.jSPlugin.JS_CloseSound(0);if(isPromise(closeSoundRT)){return closeSoundRT}if(this.Theme){this.Theme.setDecoderState({sound:false})}if(typeof this.params.closeSoundCallBack==="function"){this.params.closeSoundCallBack({id:this.id,type:"closeSound",code:closeSoundRT})}return new Promise(function(resolve){resolve(closeSoundRT)})}},{key:"enableZoom",value:function enableZoom(){var enableZoomRT=this.jSPlugin.JS_EnableZoom(0);if(isPromise(enableZoomRT)){return enableZoomRT}return new Promise(function(resolve){resolve(enableZoomRT)})}},{key:"closeZoom",value:function closeZoom(){var closeZoomRT=this.jSPlugin.JS_DisableZoom(0);if(isPromise(closeZoomRT)){return closeZoomRT}return new Promise(function(resolve){resolve(closeZoomRT)})}},{key:"enable3DZoom",value:function enable3DZoom(){var _this12=this;if(!this.use3DZoom){return new Promise(function(resolve,reject){reject({code:-1,msg:"未启用3D定位功能"})})}function getZoomDirection(rect,isTrans){if(!rect||!rect.startPos||!rect.endPos){return-1}var startX=rect.startPos[0];var startY=rect.startPos[1];var endX=rect.endPos[0];var endY=rect.endPos[1];if(isTrans){if(endX>startX&&endY<startY){return 1}else if(endX<startX&&endY>startY){return 0}else{return-1}}else{if(endX>startX&&endY>startY){return 1}else if(endX<startX&&endY<startY){return 0}else{return-1}}}function getZoomMultiple(width,height,rect){var maxRate=arguments.length>3&&arguments[3]!==undefined?arguments[3]:5;if(!width||!height||!rect||!rect.startPos||!rect.endPos){return-1}var startX=rect.startPos[0];var startY=rect.startPos[1];var endX=rect.endPos[0];var endY=rect.endPos[1];var targetWidth=Math.abs(endX-startX);var targetHeight=Math.abs(endY-startY);var targetCenterX=parseInt((startX+endX)/2);var targetCenterY=parseInt((startY+endY)/2);var zoomRate=Math.round(width*height/(targetWidth*targetHeight));console.log("最大缩放倍数:",maxRate);console.log("计算缩放倍数:",width*height/(targetWidth*targetHeight));console.log("下发缩放倍数:",zoomRate>maxRate?maxRate:zoomRate);return{startPointX:parseInt(startX/width*256),startPointY:parseInt(startY/height*256),endPointX:parseInt(endX/width*256),endPointY:parseInt(endY/height*256),zoomRate:zoomRate>maxRate?maxRate:zoomRate,targetCenterX:targetCenterX,targetCenterY:targetCenterY,targetWidth:targetWidth,targetHeight:targetHeight}}if(!this.is3DZooming){if(!this.isMobile){if(this.Zoom){this.Zoom.stopZoom()}if(this.Theme){this.Theme.setDecoderState({zoom:false})}}if(this.support3DZoom){this.is3DZooming=true;if(this.Theme){this.Theme.setDecoderState({zoom:true})}if(document.getElementById("".concat(this.id,"-zoom-content"))){document.getElementById("".concat(this.id,"-zoom-content")).title="3D定位"}var enable3DZoomRT=this.jSPlugin.JS_Enable3DZoom(0,function(r){var screenWidth=_this12.Theme&&_this12.Theme.decoderState.state.expend&&_this12.isMobile?_this12.fullScreenWidth:_this12.width;var screenHeight=_this12.Theme&&_this12.Theme.decoderState.state.expend&&_this12.isMobile?_this12.fullScreenHeight:_this12.height;var zoomDirection=getZoomDirection(r,_this12.Theme&&_this12.Theme.decoderState.state.expend);if(zoomDirection>-1){try{var param=getZoomMultiple(screenWidth,screenHeight,r,_this12.capacity&&_this12.capacity.support_zoomOut_maxTime?_this12.capacity.support_zoomOut_maxTime:5);var apiUrl=_this12.env.domain+"/api/v3/das/device/3d/zoom?accessToken=".concat(_this12.accessToken,"&deviceSerial=").concat(matchEzopenUrl(_this12.url).deviceSerial,"&channelNo=").concat(matchEzopenUrl(_this12.url).channelNo,"&command=").concat(zoomDirection==0?9:8,"&zoomTimes=").concat(param.zoomRate,"&startPointX=").concat(param.startPointX,"&startPointY=").concat(param.startPointY,"&endPointX=").concat(param.endPointX,"&endPointY=").concat(param.endPointY,"&length=").concat(parseInt(screenHeight),"&width=").concat(parseInt(screenWidth),"&midPointX=").concat(param.targetCenterX,"&midPointY=").concat(param.targetCenterY,"&lengthX=").concat(param.targetWidth,"&lengthY=").concat(param.targetHeight);fetch(apiUrl,{method:"POST"}).then(function(response){return response.json()}).then(function(res){if(res.code!=200){_this12.pluginStatus.loadingSetText({text:res.msg,color:"red",delayClear:2e3})}})["catch"](function(error){_this12.pluginStatus.loadingSetText({text:"3D定位失败,请重试",color:"red",delayClear:2e3})})}catch(error){_this12.pluginStatus.loadingSetText({text:"3D定位失败,请重试",color:"red",delayClear:2e3})}}});this.Zoom=new Zoom(this);if(isPromise(enable3DZoomRT)){return enable3DZoomRT}return new Promise(function(resolve){resolve(enable3DZoomRT)})}else{this.is3DZooming=false;if(document.getElementById("".concat(this.id,"-zoom-content"))){document.getElementById("".concat(this.id,"-zoom-content")).title="电子放大"}return new Promise(function(resolve,reject){reject({code:-1,msg:"当前设备不支持3D定位功能"})})}}else{return new Promise(function(resolve,reject){reject({code:-1,msg:"3D定位已处于开启状态"})})}}},{key:"close3DZoom",value:function close3DZoom(){if(!this.use3DZoom){return new Promise(function(resolve,reject){reject({code:-1,msg:"未启用3D定位功能"})})}if(this.is3DZooming){if(this.Theme){this.Theme.setDecoderState({zoom:false})}var close3DZoomRT=this.jSPlugin.JS_Disable3DZoom(0);this.Zoom=new Zoom(this);this.is3DZooming=false;if(isPromise(close3DZoomRT)){return close3DZoomRT}return new Promise(function(resolve){resolve(close3DZoomRT)})}else{return new Promise(function(resolve,reject){reject({code:-1,msg:"3D定位已处于关闭状态"})})}}},{key:"changeZoomType",value:function changeZoomType(flag){var _this13=this;if(flag&&this.capacity&&!this.support3DZoom){return{code:-1,msg:"当前设备不支持开启3D定位功能"}}if(this.is3DZooming){this.close3DZoom()}else if(this.Theme&&this.Theme.decoderState.state.zoom){this.Zoom&&this.Zoom.stopZoom()}if(this.Theme){this.Theme.setDecoderState({zoom:false})}this.use3DZoom=flag;this.Zoom=new Zoom(this);setTimeout(function(){if(flag){if(document.getElementById("".concat(_this13.id,"-zoom-content"))){document.getElementById("".concat(_this13.id,"-zoom-content")).title="3D定位"}}else{if(document.getElementById("".concat(_this13.id,"-zoom-content"))){document.getElementById("".concat(_this13.id,"-zoom-content")).title="电子放大"}}if(_this13.isMobile&&flag){_this13.enable3DZoom()}},500)}},{key:"setPoster",value:function setPoster(url){if(isVersion2Available()){if(document.getElementById("".concat(this.id))){document.getElementById("".concat(this.id)).style.backgroundImage="url(".concat(url,")");document.getElementById("".concat(this.id)).style.backgroundSize="100% 100%"}}else{if(document.getElementById("".concat(this.id,"canvas0"))){document.getElementById("".concat(this.id,"canvas0")).style.backgroundImage="url(".concat(url,")");document.getElementById("".concat(this.id,"canvas0")).style.backgroundSize="cover"}}}},{key:"reSize",value:function reSize(width,height){var headerHeight=0;var timeLineHeight=0;this.params.height=height;this.params.width=width;if(this.Theme&&this.Theme.isNeedRenderHeader&&document.getElementById("".concat(this.id,"-headControl"))){headerHeight=parseInt(document.getElementById("".concat(this.id,"-headControl")).style.height,10)}if(this.Theme&&this.Theme.isNeedRenderTimeLine&&!this.isMobile){timeLineHeight=48}height=height-headerHeight-timeLineHeight;this.width=width;this.height=height;document.getElementById("".concat(this.id,"-wrap")).style="width:".concat(width,"px;position:relative;display:inline-block;vertical-align: bottom;");document.getElementById("".concat(this.id)).style.width=width+"px";document.getElementById("".concat(this.id)).style.height=height+"px";if(this.jSPlugin&&this.jSPlugin.bPlay){if(this.jSPlugin){this.jSPlugin.iHeight=height;this.jSPlugin.iWidth=width}this.jSPlugin.JS_Resize(width,height)}else{if(document.getElementById("".concat(this.id,"-player"))){document.getElementById("".concat(this.id,"-player")).width=width;document.getElementById("".concat(this.id,"-player")).height=height;document.getElementById("".concat(this.id,"-player")).style.width=width+"px";document.getElementById("".concat(this.id,"-player")).style.height=height+"px";document.getElementById("".concat(this.id,"-container-0")).style.height=height+"px"}var scale=1;if(document.getElementById("".concat(this.id,"canvas0"))){var isNeedScale=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if(isNeedScale){scale=2}document.getElementById("".concat(this.id,"canvas0")).style.width=width*scale+"px";document.getElementById("".concat(this.id,"canvas0")).style.height=height*scale+"px";document.getElementById("".concat(this.id,"canvas0")).width=width*scale;document.getElementById("".concat(this.id,"canvas0")).height=height*scale;document.getElementById("".concat(this.id,"canvas0")).parentNode.style.width=width*scale+"px";document.getElementById("".concat(this.id,"canvas0")).parentNode.style.height=height*scale+"px";document.getElementById("".concat(this.id,"canvas_draw0")).height=height*scale}if(this.jSPlugin){this.jSPlugin.iHeight=height*scale;this.jSPlugin.iWidth=width*scale}}}},{key:"fast",value:function fast(next){var _this14=this;var speed=this.speed;if(next){var fastRT=this.jSPlugin.JS_Speed(next);if(this.Theme){this.Theme.changeRecSpeed(next);this.Theme.nextRate=next}}else{if(speed===1){speed=2}else if(speed===2){speed=4}else{console.log("当前已经是最大播放倍数");if(typeof this.params.handleError==="function"){this.params.handleError({msg:"播放速度最大为4倍速度",retcode:1003,id:this.id,type:"handleError"})}return new Promise(function(resolve,reject){_this14.speed=speed;reject({code:-1,data:{speed:speed,result:"播放速度最大为4倍速度"}})})}var fastRT=this.jSPlugin.JS_Speed(speed);if(this.Theme){this.Theme.changeRecSpeed(speed);this.Theme.nextRate=speed}}return new Promise(function(resolve){_this14.speed=speed;resolve({code:0,data:{speed:speed,result:fastRT}})})}},{key:"slow",value:function slow(){var _this15=this;var speed=this.speed;if(speed===4){speed=2}else if(speed===2){speed=1}else{console.log("当前已经是最小播放倍数");if(typeof this.params.handleError==="function"){this.params.handleError({msg:"播放速度最小为1倍速度",retcode:1003,id:this.id,type:"handleError"})}return new Promise(function(resolve,reject){_this15.speed=speed;reject({code:-1,data:{speed:speed,result:"播放速度最小为1倍速度"}})})}var slowRT=this.jSPlugin.JS_Speed(speed);return new Promise(function(resolve){_this15.speed=speed;resolve({code:0,data:{speed:speed,result:slowRT}})})}},{key:"seek",value:function seek(startTime,endTime){var url=this.url;var currentDay=(getQueryString("begin",url)||(new Date).Format("yyyyMMdd")).substr(0,8);endTime=formatRecTime(currentDay,"235959");if(startTime.length===6){startTime=formatRecTime(currentDay,startTime)}else if(startTime.length===16){if(startTime.substr(0,8)!==currentDay){if(typeof this.params.handleError==="function"){this.params.handleError({msg:"seek时间不能跨日期",retcode:-1,id:this.id,type:"handleError"})}return false}}else{if(typeof this.params.handleError==="function"){this.params.handleError({msg:"seek时间格式错误",retcode:-1,id:this.id,type:"handleError"})}return false}function formatRecTime(time,defaultTime){var reg=/^[0-9]{8}T[0-9]{6}Z$/;if(reg.test(time)){return time}else if(/[0-9]{8,14}/.test(time)){var start=6-(14-time.length);var end=defaultTime.length;var standardTime=time+defaultTime.substring(start,end);return standardTime.slice(0,8)+"T"+standardTime.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}var seekRT=this.jSPlugin.JS_Seek(0,startTime,endTime);console.log("seekRT",seekRT);if(isPromise(seekRT)){return seekRT}return new Promise(function(resolve){resolve(seekRT)})}},{key:"fullScreen",value:function fullScreen(){var _this16=this;var promise=requestFullScreenPromise(document.getElementById("".concat(this.id)));promise.then(function(data){console.log("全屏promise",window.screen.availWidth);_this16.jSPlugin.JS_Resize(window.screen.availWidth,window.screen.availHeight);if(typeof _this16.params.fullScreenCallBack==="function"){_this16.params.fullScreenCallBack({id:_this16.id,type:"fullScreen",code:0})}});var fullscreenchange=function fullscreenchange(){var isFullScreen=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(!isFullScreen){_this16.jSPlugin.JS_Resize(_this16.width,_this16.height)}if(typeof _this16.params.fullScreenChangeCallBack==="function"){_this16.params.fullScreenChangeCallBack({id:_this16.id,type:"fullScreen",code:isFullScreen})}};["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(item){window.addEventListener(item,function(data){return fullscreenchange()})})}},{key:"cancelFullScreen",value:function cancelFullScreen(){var _this17=this;var cancelPromise=cancelFullScreenPromise();cancelPromise.then(function(data){console.log("取消全屏",data,_this17.jSPlugin);_this17.jSPlugin.JS_Resize(_this17.width,_this17.height)})}},{key:"startTalk",value:function startTalk(){this.Talk.startTalk()}},{key:"stopTalk",value:function stopTalk(){this.Talk.stopTalk()}},{key:"destroy",value:function destroy(){if(this.Theme){if(this.Theme.decoderState.state.play){this.stop()}this.Theme=null;window.EZUIKit[this.params.id].state.EZUIKitPlayer.themeInit=false}var destroyRT=this.jSPlugin.JS_DestroyWorker(0);if(isPromise(destroyRT)){return destroyRT}return new Promise(function(resolve){resolve(destroyRT)})}},{key:"getDeviceCapacity",value:function getDeviceCapacity(params){var _this18=this;var apiDomain=this.env.domain;this.capacity={};if(this.env){apiDomain=this.env.domain}var capacityUrl=apiDomain+"/api/lapp/device/capacity";var capacitySuccess=function capacitySuccess(data){_this18.support3DZoom=false;if(document.getElementById("".concat(_this18.id,"-zoom-content"))){document.getElementById("".concat(_this18.id,"-zoom-content")).title="电子放大"}if(data.code==200&&data.data){_this18.capacity=data.data;if(_this18.isMobile&&_this18.isCall){if(!_this18.capacity["support_doorcall_playback"]||_this18.capacity["support_doorcall_playback"]!=1){console.log("小窗口initMiniRec-------------设备能力集失败");if(!!_this18.isWebConsole){return}setTimeout(function(){if(document.getElementById("".concat(_this18.jSPlugin.id,"-wrap"))&&document.getElementById("miniRecbox")){document.getElementById("".concat(_this18.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniClose"));document.getElementById("".concat(_this18.jSPlugin.id,"-wrap")).removeChild(document.getElementById("miniRecbox"))}},1500)}}if(_this18.capacity&&_this18.capacity.support_3d_position=="1"&&_this18.url.indexOf(".live")>-1){_this18.support3DZoom=true;if(_this18.params.use3DZoom){_this18.use3DZoom=true;if(document.getElementById("".concat(_this18.id,"-zoom-content"))){document.getElementById("".concat(_this18.id,"-zoom-content")).title="3D定位"}}}}};var capacityParams=params||{accessToken:this.accessToken,deviceSerial:matchEzopenUrl(this.url).deviceSerial};request(capacityUrl,"POST",capacityParams,"",capacitySuccess)}},{key:"pause",value:function pause(date){var _this19=this;return new Promise(function(resolve,reject){_this19.jSPlugin.JS_CloseSound(0);_this19.jSPlugin.JS_Pause(0,date).then(function(data){if(_this19.Theme){_this19.Theme.setDecoderState({play:false,pauseDate:data.pauseDate})}resolve()})["catch"](function(err){console.log(err);reject(err)})})}},{key:"_resume",value:function _resume(time){var _this20=this;return new Promise(function(resolve,reject){_this20.pluginStatus.setPlayStatus({play:false,loading:true});if(_this20.validateCode&&_this20.validateCode!=""){_this20.jSPlugin.JS_SetSecretKey(0,_this20.validateCode)}_this20.jSPlugin.JS_Resume(time).then(function(data){setTimeout(function(){if(_this20.url.indexOf(".rec")!==-1&&_this20.speed!=1){_this20.jSPlugin.JS_Speed(_this20.speed)}},500);if(_this20.Theme){_this20.Theme.setDecoderState({play:true});_this20.fast(_this20.speed);var isOpenSound=_this20.Theme.decoderState.state.sound;if(isOpenSound){setTimeout(function(){_this20.openSound()},500)}}resolve(data)})["catch"](function(err){console.log("resume err",err);reject(err)})})}},{key:"getDefinitionList",value:function getDefinitionList(){if(this.Theme){return this.Theme.decoderState.state.hdList}else{return[]}}},{key:"getDefinition",value:function getDefinition(){if(this.Theme){return this.Theme.decoderState.state.hd}else{return false}}},{key:"setDefinition",value:function setDefinition(type){var definition=this.getDefinitionList().find(function(item){if(typeof type==="string"){return item.level===type}if(_typeof(type)==="object"){return item.level===type.level}});if(!definition){console.log("请输入正确的清晰度");return}this.changeVideoLevel(definition);if(this.Theme){this.Theme.setDecoderState({hd:definition});this.Theme.resetMobileZoomStatus()}if(this.Theme&&this.Theme.decoderState.state.recordvideo){this.Theme.setDecoderState({recordvideo:false})}}},{key:"getPtzStatus",value:function getPtzStatus(){if(this.Theme){console.log("当前是否开启云台:",this.Theme.Ptz.showPtz);return this.Theme.Ptz.showPtz}}},{key:"openPtz",value:function openPtz(){if(this.Theme){if(this.isMobile&&this.Theme&&!this.Theme.decoderState.state.expend){console.log("移动端,非全屏状态不展示云台");return false}console.log("显示云台");this.Theme.setDecoderState({pantile:true});this.Theme.Ptz.show()}else{return{code:-1,msg:"未加载Theme模块,无法操作云台"}}}},{key:"closePtz",value:function closePtz(){if(this.Theme){console.log("隐藏云台");this.Theme.setDecoderState({pantile:false});this.Theme.Ptz.hide()}else{return{code:-1,msg:"未加载Theme模块,无法操作云台"}}}},{key:"isBrowserFullscreen",value:function isBrowserFullscreen(){if(this.Theme){console.log("当前是否为浏览器全屏状态:",this.Theme.decoderState.state.webExpend);return this.Theme.decoderState.state.webExpend}}},{key:"browserFullscreen",value:function browserFullscreen(){if(this.Theme){this.Theme.webExpend();this.Theme.setDecoderState({webExpend:true})}}},{key:"exitBrowserFullscreen",value:function exitBrowserFullscreen(width,height){var _this21=this;var cancelPromise=cancelFullScreenPromise();cancelPromise.then(function(data){_this21.jSPlugin.JS_Resize(width?width:_this21.width,height?height:_this21.height);if(_this21.Theme){if(_this21.Theme.Rec){_this21.Theme.Rec.recAutoSize()}_this21.Theme.setDecoderState({webExpend:false})}})}},{key:"getPlayRate",value:function getPlayRate(){console.log("当前播放速度:",this.speed);return this.speed}},{key:"setMiooroFlip",value:function setMiooroFlip(command){if(typeof command!=="number"){return Promise.reject({code:-1,msg:"翻转参数类型错误"})}return postDevicePtzMirror(this.env.domain,this.accessToken,this.deviceSerial,this.channelNo,command)}},{key:"setFECCorrectType",value:function setFECCorrectType(type,ids){var _this22=this;if(!this.capacity||this.capacity&&this.capacity.support_fisheye_mode!=="1"){return Promise.reject({code:-1,msg:"设备不支持鱼眼模式"})}if(!this.jSPlugin.JS_FECCorrectType||(this.jSPlugin.isHardH264||this.jSPlugin.isHardH265)&&this.jSPlugin.useHardDev){return Promise.reject({code:-1,msg:"现只有V3软解支持鱼眼矫正"})}var list=type.place===1?FEC_PLACE_WALL_CORRECT_TYPE_LIST:type.place===3?FEC_PLACE_CEILING_CORRECT_TYPE_LIST:[];var correctType=list.find(function(item){return item.type===type.type&&item.place===type.place});if(!correctType){return Promise.reject({code:-1,msg:"鱼眼矫正类型暂时不支持"})}if(correctType.split>0&&_typeof(ids)===undefined){return Promise.reject({code:-1,msg:"鱼眼矫正类型需要分屏,但是没有传".concat(correctType.split-1,"个分屏的canvas id")})}this.jSPlugin.FECSplitIds=ids;this.jSPlugin.correctType=correctType;this._FECCorrectType=correctType;this._FECSplitIds=ids;return this.stop().then(function(){return _this22.play().then(function(res){if(!(correctType.place===1&&correctType.correctType===0||correctType.place===3&&correctType.correctType===0)){_this22.Theme.disabledFECBtn()}else{_this22.Theme.resumeFECBtn()}return res})})}},{key:"setFEC3DViewParam",value:function setFEC3DViewParam(param){if(!this._FECCorrectType||(this.jSPlugin.isHardH264||this.jSPlugin.isHardH265)&&this.jSPlugin.useHardDev){return Promise.reject({code:-1,msg:"现只有V3软解支持鱼眼矫正"})}if(this.jSPlugin.FEC_Set3DViewParam&&this._FECCorrectType&&(this._FECCorrectType.place===3&&this._FECCorrectType.correctType===FEC_CORRECT_CYLINDER$1||this._FECCorrectType.place===1&&this._FECCorrectType.correctType===FEC_CORRECT_ARCSPHERE_HORIZONTAL)){return this.jSPlugin.FEC_Set3DViewParam(param)}return Promise.reject({code:-1,msg:"该矫正类型不能设置3D矫正视角参数"})}},{key:"getFEC3DViewParam",value:function getFEC3DViewParam(param){if(!this._FECCorrectType||(this.jSPlugin.isHardH264||this.jSPlugin.isHardH265)&&this.jSPlugin.useHardDev){return Promise.reject({code:-1,msg:"现只有V3软解支持鱼眼矫正获取3D矫正视角参数"})}if(this.jSPlugin.FEC_Set3DViewParam&&this._FECCorrectType&&(this._FECCorrectType.place===3&&this._FECCorrectType.correctType===FEC_CORRECT_CYLINDER$1||this._FECCorrectType.place===1&&this._FECCorrectType.correctType===FEC_CORRECT_ARCSPHERE_HORIZONTAL)){return this.jSPlugin.FEC_Get3DViewParam(param)}return Promise.reject({code:-1,msg:"该矫正类型不能获取3D矫正视角参数"})}}]);return EZUIKitPlayer}();var oWebControl=null;function WebControlInit(id,cbConnectSuccess,cbConnectError,cbConnectClose){return new WebControl({szPluginContainer:id,iServicePortStart:14510,iServicePortEnd:14519,cbConnectSuccess:cbConnectSuccess,cbConnectError:cbConnectError,cbConnectClose:cbConnectClose})}function WebControlDistory(){if(oWebControl!=null){oWebControl.JS_DestroyWnd().then(function(){console.log("JS_DestroyWnd")},function(){});oWebControl.JS_StopService("window").then(function(){oWebControl.JS_Disconnect().then(function(){console.log("JS_Disconnect")},function(){})})}}function cbIntegrationCallBack(oData){if(oData.responseMsg.eventName==="FireTransFunction");console.log(oData.responseMsg)}function cbConnectSuccess(){oWebControl.JS_SetWindowControlCallback({cbIntegrationCallBack:cbIntegrationCallBack});oWebControl.JS_StartService("window",{dllPath:"./chain/cloudTransform.dll"}).then(function(){oWebControl.JS_CreateWnd("playWnd",900,500).then(function(){console.log("JS_CreateWnd success")})})}function cbConnectError(){console.log("cbConnectError");oWebControl=null;console.error("确认本地进程是否已安装并开启成功!")}function cbConnectClose(bNormalClose){console.log("cbConnectClose");oWebControl=null}window.onscroll=function(){if(oWebControl!=null){oWebControl.JS_Resize(900,500)}};window.onresize=function(){if(oWebControl!=null){oWebControl.JS_Resize(900,500)}};window.onunload=function(){try{oWebControl.JS_HideWnd();WebControlDistory()}catch(error){console.error(error)}};window.onpagehide=function(){try{oWebControl.JS_HideWnd()}catch(error){console.error(error)}};var EZUIKitHD=function(){function EZUIKitHD(params){var _this=this;_classCallCheck$1(this,EZUIKitHD);_defineProperty(this,"changeModel",function(num,playParams){var self=_this;_this.switchVideo=parseInt(num);if(oWebControl){oWebControl.JS_RequestInterface({funcName:"ChangeModel",arguments:encodeURI(JSON.stringify({model:num}))}).then(function(oData){if(num==0){self.play({deviceSerial:playParams.deviceSerial,channelNo:playParams.channelNo,validateCode:playParams.validateCode})}else{self.play({deviceSerial:playParams.deviceSerial,channelNo:playParams.channelNo,validateCode:playParams.validateCode,startTime:playParams.startTime,endTime:playParams.endTime})}})}});_defineProperty(this,"init",function(initParams){var _argumentsPram;var self=_this;if(!initParams.appKey||!initParams.accessToken){self.showTips(false,"请输入appkey和token");return}if(typeof initParams.appKey!=="undefined"){_this.appKey=initParams.appKey}if(typeof initParams.accessToken!=="undefined"){_this.accessToken=initParams.accessToken}if(typeof initParams.platformId!=="undefined"){_this.platformId=initParams.platformId}var argumentsPram=(_argumentsPram={layout:+self.layout,userName:"",waterMark:""},_defineProperty(_argumentsPram,"waterMark","1"),_defineProperty(_argumentsPram,"iWndType",0),_defineProperty(_argumentsPram,"intelligenceEnable",1),_defineProperty(_argumentsPram,"isRecord",1),_defineProperty(_argumentsPram,"isSetPos",1),_defineProperty(_argumentsPram,"motionDetectEnable",0),_defineProperty(_argumentsPram,"playBackAlarmOverlyingEnable",0),_defineProperty(_argumentsPram,"response",{code:0,message:null,data:{appKey:initParams.appKey,ezvizToken:initParams.accessToken,videoLevel:0,logLevel:3,showMainTool:1,showSubTool:1,waterMark:"1",userName:"openteam",platformId:initParams.platformId}}),_argumentsPram);console.log("初始化入参",argumentsPram);window.ezuikitMonitor.report({protocol:"hd",appKey:initParams.appKey,action:1,logInfo:{argumentsPram:argumentsPram}});oWebControl.JS_RequestInterface({funcName:"Init",arguments:encodeURI(JSON.stringify(argumentsPram))}).then(function(oData){console.log(oData.responseMsg);self.showTips(true,"视频初始化成功!")})});_defineProperty(this,"play",function(playParams){var self=_this;if(!playParams.deviceSerial||!playParams.channelNo){return}if(typeof playParams.deviceSerial!=="undefined"){_this.deviceSerial=playParams.deviceSerial}if(typeof playParams.channelNo!=="undefined"){_this.channelNo=playParams.channelNo}if(typeof playParams.startTime!=="undefined"&&playParams.startTime){_this.startTime=playParams.startTime+" 00:00:00"}if(typeof playParams.endTime!=="undefined"&&playParams.endTime){_this.endTime=playParams.endTime+" 23:59:59"}if(typeof playParams.validateCode!=="undefined"&&playParams.validateCode){_this.validateCode=playParams.validateCode}var argumentsPram={response:{code:0,message:null,data:{deviceSerial:playParams.deviceSerial,channelCode:playParams.channelNo,channelNo:+playParams.channelNo,codeIsEncrypt:0,validateCode:playParams.validateCode,deviceClass:self.deviceClass,deviceType:"10222",channelId:"2222222222",channelName:"channelNameTest",storeName:"storeName",storeId:"storeid",startTime:_this.startTime,endTime:_this.endTime}}};if(self.deviceClass==="1"){argumentsPram.response.data.channelCode=self.channelNo;argumentsPram.response.data.platformId=self.platformId}else{argumentsPram.response.data.channelNo=+self.channelNo}if(_this.switchVideo===1){if(_this.startTime)argumentsPram.response.data.startTime=_this.startTime;if(_this.endTime)argumentsPram.response.data.endTime=_this.endTime}console.log("预览/回放入参",argumentsPram);oWebControl.JS_RequestInterface({funcName:_this.switchVideo===0?"StartPreview":"StartPlayback",arguments:encodeURI(JSON.stringify(argumentsPram))}).then(function(oData){console.log(oData.responseMsg);self.showTips(true,"预览/回放成功!")})["catch"](function(res){console.log("开始播放:",res)})});_defineProperty(this,"showCBInfo",function(message){_this.callbackMessage=_this.callbackMessage+JSON.stringify(message)+"\n\n";console.log(_this.callbackMessage)});_defineProperty(this,"showTips",function(status,message){});_defineProperty(this,"hideVideo",function(){oWebControl.JS_HideWnd()});_defineProperty(this,"showVideo",function(){oWebControl.JS_ShowWnd()});_defineProperty(this,"GetLayout",function(){var data=null;oWebControl.JS_RequestInterface({funcName:"GetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:data}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"capturePicture",function(wndId){var data=null;oWebControl.JS_RequestInterface({funcName:"CaptureJPGEx",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:data}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"stop",function(){var wndId=arguments.length>0&&arguments[0]!==undefined?arguments[0]:-1;oWebControl.JS_RequestInterface({funcName:"StopPlay",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(wndId)}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"setLayout",function(num){var layout=parseInt(num);if(isNaN(layout)||layout==0||layout>=13){console.log("不支持实际布局大于16的窗口数");return}_this.layout=layout;oWebControl.JS_RequestInterface({funcName:"SetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{layout:layout}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"setSoundVolumn",function(){var wndId=arguments.length>0&&arguments[0]!==undefined?arguments[0]:-1;var num=arguments.length>1?arguments[1]:undefined;oWebControl.JS_RequestInterface({funcName:"SoundVolumn",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(wndId),volumn:parseInt(num)}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"testMute",function(){var num=parseInt(prompt("请输入窗口ID"));oWebControl.JS_RequestInterface({funcName:"MuteOnOff",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:num}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"testSelectWnd",function(){var num=parseInt(prompt("请输入窗口ID"));oWebControl.JS_RequestInterface({funcName:"SelectPlayWnd",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:num}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"setVideoLevel",function(wndId,level){oWebControl.JS_RequestInterface({funcName:"SetVideoLevel",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:_this.switchVideo==1?0:parseInt(wndId),level:parseInt(level,10)}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"startTalk",function(wndId){oWebControl.JS_RequestInterface({funcName:"StartTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(wndId)}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"stopTalk",function(wndId){oWebControl.JS_RequestInterface({funcName:"StopTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(wndId)}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"startSave",function(wndId){oWebControl.JS_RequestInterface({funcName:"StartRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(wndId)}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});_defineProperty(this,"stopSave",function(wndId){oWebControl.JS_RequestInterface({funcName:"StopRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(wndId)}}}))}).then(function(oData){console.log(JSON.stringify(oData.responseMsg));console.log(oData.responseMsg)})});this.appKey="b9a3ad6e8026410095d8252169fa430a",this.accessToken="at.2vtum8873rrcwbrv431qb6pn94dkbv23-8dw2twn355-1u3x014-wrthellzk",this.deviceSerial="C33368372",this.channelNo="1",this.validateCode="";this.deviceClass="0";this.platformId="";this.startTime="";this.endTime="";this.layout=2;this.switchVideo=0;this.tips="调用成功";this.successTip=false;this.tipsShow=false;oWebControl=WebControlInit("playWnd",cbConnectSuccess,cbConnectError,cbConnectClose)}_createClass$1(EZUIKitHD,[{key:"alarmMsg",value:function alarmMsg(){var res={request:{body:{alarmTypes:[10800,0,0,0,0],channelId:"066dde0465dd4abaab6afe355baf9d0b",endTime:"1621007999000",startTime:"1620921600000"},callBack:"GetAlarmMsgOrders",majorKey:"",method:"POST",storeId:"",url:"/videoplugin/message/getMessageByTypes"},response:{code:0,message:null,data:[{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620921217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920678e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919513e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919483e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919333e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918913e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918305e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917858e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917658e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917244e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917064e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916668e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916529e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916343e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916081e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915825e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915394e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915197e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914971e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914644e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914533e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914457e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914376e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914284e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913431e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912354e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912275e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912093e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091189e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911839e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091176e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911682e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091127e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911184e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910982e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910781e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910727e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910677e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910647e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910588e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910544e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091041e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091035e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910278e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910124e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909939e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909847e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909817e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909664e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909605e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909575e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090912e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909028e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908999e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908969e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908909e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090888e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908835e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090875e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090872e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908652e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908582e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908552e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908456e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090805e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907918e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907758e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907625e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907386e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907292e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907127e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906828e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906797e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906747e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906717e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906632e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906368e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906013e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905946e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905823e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905622e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905511e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905382e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905352e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905322e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905262e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905196e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090515e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904813e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090473e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209047e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904618e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904286e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904173e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904053e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904023e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903854e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903723e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903643e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903573e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903505e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209032e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090312e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902977e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090286e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090277e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902639e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902517e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902373e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090232e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902253e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902198e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902132e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090194e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090185e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901685e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901638e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090152e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901489e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901424e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901271e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901233e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900915e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900774e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900744e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090065e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090044e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900409e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900175e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900134e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900069e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900016e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899908e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899826e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899756e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899467e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899406e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899265e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899211e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089914e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089911e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089905e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898785e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898666e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898507e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898248e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898218e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898088e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089802e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089796e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089785e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089769e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089763e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16208976e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089757e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089754e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897475e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897369e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897339e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897279e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897237e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897207e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897172e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896985e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896874e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896814e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896783e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896621e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896447e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896358e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896307e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896277e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896214e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089604e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895953e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895921e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895868e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089577e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895704e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089559e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089548e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895377e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895347e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895171e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895136e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895017e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894896e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894738e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894539e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894359e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894213e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894183e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893964e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893934e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893754e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893606e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089353e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893452e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893423e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893357e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892904e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892824e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892764e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892479e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892311e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892281e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892209e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892063e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089187e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089181e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891708e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891655e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891585e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891401e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891257e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891178e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891128e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891033e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089094e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890794e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890714e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890469e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890179e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890108e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890041e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889937e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889635e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889451e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889317e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889227e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889139e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888902e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888837e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888767e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888737e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888706e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888633e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888413e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888353e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888323e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888249e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888162e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888e6},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887859e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887776e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887734e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887692e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887619e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887355e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088732e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887289e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887126e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887066e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088697e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886884e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886804e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886728e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886538e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886396e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886334e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886246e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886111e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885956e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885894e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885696e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885514e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885341e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885306e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885276e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885186e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885114e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885037e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884975e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884945e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884911e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088478e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884696e3}],success:true}};console.log(res);oWebControl.JS_RequestInterface({funcName:"TransFunctionResult",arguments:encodeURI(JSON.stringify(res))})}}]);return EZUIKitHD}();Janus$1.sessions={};Janus$1.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia){return true}if(window.navigator.userAgent.match("Chrome")){var chromever=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10);var maxver=33;if(window.navigator.userAgent.match("Linux"))maxver=35;if(chromever>=26&&chromever<=maxver){return true}return Janus$1.extension.isInstalled()}else{return true}};var defaultExtension={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function isInstalled(){return document.querySelector("#janus-extension-installed")!==null},getScreen:function getScreen(callback){var pending=window.setTimeout(function(){var error=new Error("NavigatorUserMediaError");error.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)';return callback(error)},1e3);this.cache[pending]=callback;window.postMessage({type:"janusGetScreen",id:pending},"*")},init:function init(){var cache={};this.cache=cache;window.addEventListener("message",function(event){if(event.origin!=window.location.origin)return;if(event.data.type=="janusGotScreen"&&cache[event.data.id]){var callback=cache[event.data.id];delete cache[event.data.id];if(event.data.sourceId===""){var error=new Error("NavigatorUserMediaError");error.name="You cancelled the request for permission, giving up...";callback(error)}else{callback(null,event.data.sourceId)}}else if(event.data.type=="janusGetScreenPending"){console.log("clearing ",event.data.id);window.clearTimeout(event.data.id)}})}};Janus$1.useDefaultDependencies=function(deps){var f=deps&&deps.fetch||fetch;var p=deps&&deps.Promise||Promise;var socketCls=deps&&deps.WebSocket||WebSocket;return{newWebSocket:function newWebSocket(server,proto){return new socketCls(server,proto)},extension:deps&&deps.extension||defaultExtension,isArray:function isArray(arr){return Array.isArray(arr)},webRTCAdapter:deps&&deps.adapter||adapter,httpAPICall:function httpAPICall(url,options){var fetchOptions={method:options.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};if(options.verb==="POST"){fetchOptions.headers["Content-Type"]="application/json"}if(options.withCredentials!==undefined){fetchOptions.credentials=options.withCredentials===true?"include":options.withCredentials?options.withCredentials:"omit"}if(options.body!==undefined){fetchOptions.body=JSON.stringify(options.body)}var fetching=f(url,fetchOptions)["catch"](function(error){return p.reject({message:"Probably a network error, is the server down?",error:error})});if(options.timeout!==undefined){var timeout=new p(function(resolve,reject){var timerId=setTimeout(function(){clearTimeout(timerId);return reject({message:"Request timed out",timeout:options.timeout})},options.timeout)});fetching=p.race([fetching,timeout])}fetching.then(function(response){if(response.ok){if(_typeof(options.success)===_typeof(Janus$1.noop)){return response.json().then(function(parsed){options.success(parsed)})["catch"](function(error){return p.reject({message:"Failed to parse response body",error:error,response:response})})}}else{return p.reject({message:"API call failed",response:response})}})["catch"](function(error){if(_typeof(options.error)===_typeof(Janus$1.noop)){options.error(error.message||"<< internal error >>",error)}});return fetching}}};Janus$1.useOldDependencies=function(deps){var jq=deps&&deps.jQuery||jQuery;var socketCls=deps&&deps.WebSocket||WebSocket;return{newWebSocket:function newWebSocket(server,proto){return new socketCls(server,proto)},isArray:function isArray(arr){return jq.isArray(arr)},extension:deps&&deps.extension||defaultExtension,webRTCAdapter:deps&&deps.adapter||adapter,httpAPICall:function httpAPICall(url,options){var payload=options.body!==undefined?{contentType:"application/json",data:JSON.stringify(options.body)}:{};var credentials=options.withCredentials!==undefined?{xhrFields:{withCredentials:options.withCredentials}}:{};return jq.ajax(jq.extend(payload,credentials,{url:url,type:options.verb,cache:false,dataType:"json",async:options.async,timeout:options.timeout,success:function success(result){if(_typeof(options.success)===_typeof(Janus$1.noop)){options.success(result)}},error:function error(xhr,status,err){if(_typeof(options.error)===_typeof(Janus$1.noop)){options.error(status,err)}}}))}}};Janus$1.noop=function(){};Janus$1.dataChanDefaultLabel="JanusDataChannel";Janus$1.endOfCandidates=null;Janus$1.init=function(options){options=options||{};options.callback=typeof options.callback=="function"?options.callback:Janus$1.noop;if(Janus$1.initDone===true){options.callback()}else{if(typeof console=="undefined"||typeof console.log=="undefined")console={log:function log(){}};Janus$1.trace=Janus$1.noop;Janus$1.debug=Janus$1.noop;Janus$1.vdebug=Janus$1.noop;Janus$1.log=Janus$1.noop;Janus$1.warn=Janus$1.noop;Janus$1.error=Janus$1.noop;if(options.debug===true||options.debug==="all"){Janus$1.trace=console.trace.bind(console);Janus$1.debug=console.debug.bind(console);Janus$1.vdebug=console.debug.bind(console);Janus$1.log=console.log.bind(console);Janus$1.warn=console.warn.bind(console);Janus$1.error=console.error.bind(console)}else if(Array.isArray(options.debug)){for(var i in options.debug){var d=options.debug[i];switch(d){case"trace":Janus$1.trace=console.trace.bind(console);break;case"debug":Janus$1.debug=console.debug.bind(console);break;case"vdebug":Janus$1.vdebug=console.debug.bind(console);break;case"log":Janus$1.log=console.log.bind(console);break;case"warn":Janus$1.warn=console.warn.bind(console);break;case"error":Janus$1.error=console.error.bind(console);break;default:console.error("Unknown debugging option '"+d+"' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')");break}}}Janus$1.log("Initializing library");var usedDependencies=options.dependencies||Janus$1.useDefaultDependencies();Janus$1.isArray=usedDependencies.isArray;Janus$1.webRTCAdapter=usedDependencies.webRTCAdapter;Janus$1.httpAPICall=usedDependencies.httpAPICall;Janus$1.newWebSocket=usedDependencies.newWebSocket;Janus$1.extension=usedDependencies.extension;Janus$1.extension.init();Janus$1.listDevices=function(callback,config){callback=typeof callback=="function"?callback:Janus$1.noop;if(config==null)config={audio:true,video:true};if(Janus$1.isGetUserMediaAvailable()){navigator.mediaDevices.getUserMedia(config).then(function(stream){navigator.mediaDevices.enumerateDevices().then(function(devices){Janus$1.debug(devices);callback(devices);try{var tracks=stream.getTracks();for(var i in tracks){var mst=tracks[i];if(mst!==null&&mst!==undefined)mst.stop()}}catch(e){}})})["catch"](function(err){Janus$1.error(err);callback([])})}else{Janus$1.warn("navigator.mediaDevices unavailable");callback([])}};Janus$1.attachMediaStream=function(element,stream){if(Janus$1.webRTCAdapter.browserDetails.browser==="chrome"){var chromever=Janus$1.webRTCAdapter.browserDetails.version;if(chromever>=52){element.srcObject=stream}else if(typeof element.src!=="undefined"){element.src=URL.createObjectURL(stream)}else{Janus$1.error("Error attaching stream to element")}}else{element.srcObject=stream}};Janus$1.reattachMediaStream=function(to,from){if(Janus$1.webRTCAdapter.browserDetails.browser==="chrome"){var chromever=Janus$1.webRTCAdapter.browserDetails.version;if(chromever>=52){to.srcObject=from.srcObject}else if(typeof to.src!=="undefined"){to.src=from.src}else{Janus$1.error("Error reattaching stream to element")}}else{to.srcObject=from.srcObject}};var iOS=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0;var eventName=iOS?"pagehide":"beforeunload";var oldOBF=window["on"+eventName];window.addEventListener(eventName,function(event){Janus$1.log("Closing window");for(var s in Janus$1.sessions){if(Janus$1.sessions[s]!==null&&Janus$1.sessions[s]!==undefined&&Janus$1.sessions[s].destroyOnUnload){Janus$1.log("Destroying session "+s);Janus$1.sessions[s].destroy({asyncRequest:false,notifyDestroyed:false})}}if(oldOBF&&typeof oldOBF=="function")oldOBF()});Janus$1.safariVp8=false;if(Janus$1.webRTCAdapter.browserDetails.browser==="safari"&&Janus$1.webRTCAdapter.browserDetails.version>=605){if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(var i in RTCRtpSender.getCapabilities("video").codecs){var codec=RTCRtpSender.getCapabilities("video").codecs[i];if(codec&&codec.mimeType&&codec.mimeType.toLowerCase()==="video/vp8"){Janus$1.safariVp8=true;break}}if(Janus$1.safariVp8){Janus$1.log("This version of Safari supports VP8")}else{Janus$1.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, "+"try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}}else{var testpc=new RTCPeerConnection({},{});testpc.createOffer({offerToReceiveVideo:true}).then(function(offer){Janus$1.safariVp8=offer.sdp.indexOf("VP8")!==-1;if(Janus$1.safariVp8){Janus$1.log("This version of Safari supports VP8")}else{Janus$1.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, "+"try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}testpc.close();testpc=null})}}Janus$1.unifiedPlan=false;if(Janus$1.webRTCAdapter.browserDetails.browser==="firefox"&&Janus$1.webRTCAdapter.browserDetails.version>=59){Janus$1.unifiedPlan=true}else if(Janus$1.webRTCAdapter.browserDetails.browser==="chrome"&&Janus$1.webRTCAdapter.browserDetails.version<72){Janus$1.unifiedPlan=false}else if(!("currentDirection"in RTCRtpTransceiver.prototype)){Janus$1.unifiedPlan=false}else{var tempPc=new RTCPeerConnection;try{tempPc.addTransceiver("audio");Janus$1.unifiedPlan=true}catch(e){}tempPc.close()}Janus$1.initDone=true;options.callback()}};Janus$1.isWebrtcSupported=function(){return window.RTCPeerConnection!==undefined&&window.RTCPeerConnection!==null};Janus$1.isGetUserMediaAvailable=function(){return navigator.mediaDevices!==undefined&&navigator.mediaDevices!==null&&navigator.mediaDevices.getUserMedia!==undefined&&navigator.mediaDevices.getUserMedia!==null};Janus$1.randomString=function(len){var charSet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";var randomString="";for(var i=0;i<len;i++){var randomPoz=Math.floor(Math.random()*charSet.length);randomString+=charSet.substring(randomPoz,randomPoz+1)}return randomString};function Janus$1(gatewayCallbacks,requestOpt){if(Janus$1.initDone===undefined){gatewayCallbacks.error("Library not initialized");return{}}if(!Janus$1.isWebrtcSupported()){gatewayCallbacks.error("WebRTC not supported by this browser");return{}}Janus$1.log("Library initialized: "+Janus$1.initDone);gatewayCallbacks=gatewayCallbacks||{};gatewayCallbacks.success=typeof gatewayCallbacks.success=="function"?gatewayCallbacks.success:Janus$1.noop;gatewayCallbacks.error=typeof gatewayCallbacks.error=="function"?gatewayCallbacks.error:Janus$1.noop;gatewayCallbacks.destroyed=typeof gatewayCallbacks.destroyed=="function"?gatewayCallbacks.destroyed:Janus$1.noop;if(gatewayCallbacks.server===null||gatewayCallbacks.server===undefined){gatewayCallbacks.error("Invalid server url");return{}}var websockets=false;var ws=null;var wsHandlers={};var wsKeepaliveTimeoutId=null;var servers=null,serversIndex=0;var server=gatewayCallbacks.server;if(Janus$1.isArray(server)){Janus$1.log("Multiple servers provided ("+server.length+"), will use the first that works");server=null;servers=gatewayCallbacks.server;Janus$1.debug(servers)}else{if(server.indexOf("ws")===0){websockets=true;Janus$1.log("Using WebSockets to contact Janus: "+server)}else{websockets=false;Janus$1.log("Using REST API to contact Janus: "+server)}}var iceServers=gatewayCallbacks.iceServers;if(iceServers===undefined||iceServers===null)iceServers=[{urls:"stun:stun.l.google.com:19302"}];var iceTransportPolicy=gatewayCallbacks.iceTransportPolicy;var bundlePolicy=gatewayCallbacks.bundlePolicy;var ipv6Support=gatewayCallbacks.ipv6;if(ipv6Support===undefined||ipv6Support===null)ipv6Support=false;var withCredentials=false;if(gatewayCallbacks.withCredentials!==undefined&&gatewayCallbacks.withCredentials!==null)withCredentials=gatewayCallbacks.withCredentials===true;var maxev=10;if(gatewayCallbacks.max_poll_events!==undefined&&gatewayCallbacks.max_poll_events!==null)maxev=gatewayCallbacks.max_poll_events;if(maxev<1)maxev=1;var token=null;if(gatewayCallbacks.token!==undefined&&gatewayCallbacks.token!==null)token=gatewayCallbacks.token;var apisecret=null;if(gatewayCallbacks.apisecret!==undefined&&gatewayCallbacks.apisecret!==null)apisecret=gatewayCallbacks.apisecret;this.destroyOnUnload=true;if(gatewayCallbacks.destroyOnUnload!==undefined&&gatewayCallbacks.destroyOnUnload!==null)this.destroyOnUnload=gatewayCallbacks.destroyOnUnload===true;var keepAlivePeriod=25e3;if(gatewayCallbacks.keepAlivePeriod!==undefined&&gatewayCallbacks.keepAlivePeriod!==null)keepAlivePeriod=gatewayCallbacks.keepAlivePeriod;if(isNaN(keepAlivePeriod))keepAlivePeriod=25e3;var longPollTimeout=6e4;if(gatewayCallbacks.longPollTimeout!==undefined&&gatewayCallbacks.longPollTimeout!==null)longPollTimeout=gatewayCallbacks.longPollTimeout;if(isNaN(longPollTimeout))longPollTimeout=6e4;function getMaxBitrates(simulcastMaxBitrates){var maxBitrates={high:9e5,medium:3e5,low:1e5};if(simulcastMaxBitrates!==undefined&&simulcastMaxBitrates!==null){if(simulcastMaxBitrates.high)maxBitrates.high=simulcastMaxBitrates.high;if(simulcastMaxBitrates.medium)maxBitrates.medium=simulcastMaxBitrates.medium;if(simulcastMaxBitrates.low)maxBitrates.low=simulcastMaxBitrates.low}return maxBitrates}var connected=false;var sessionId=null;var pluginHandles={};var that=this;var retries=0;var transactions={};createSession(gatewayCallbacks);this.getServer=function(){return server};this.isConnected=function(){return connected};this.reconnect=function(callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$1.noop;callbacks["reconnect"]=true;createSession(callbacks)};this.getSessionId=function(){return sessionId};this.destroy=function(callbacks){destroySession(callbacks)};this.attach=function(callbacks){createHandle(callbacks)};function eventHandler(){if(sessionId==null)return;Janus$1.debug("Long poll...");if(!connected){Janus$1.warn("Is the server down? (connected=false)");return}var longpoll=server+"/"+sessionId+"?rid="+(new Date).getTime();if(maxev!==undefined&&maxev!==null)longpoll=longpoll+"&maxev="+maxev;if(token!==null&&token!==undefined)longpoll=longpoll+"&token="+encodeURIComponent(token);if(apisecret!==null&&apisecret!==undefined)longpoll=longpoll+"&apisecret="+encodeURIComponent(apisecret);Janus$1.httpAPICall(longpoll,{verb:"GET",withCredentials:withCredentials,success:handleEvent,timeout:longPollTimeout,error:function error(textStatus,errorThrown){Janus$1.error(textStatus+":",errorThrown);retries++;if(retries>3){connected=false;gatewayCallbacks.error("Lost connection to the server (is it down?)");return}eventHandler()}})}function handleEvent(json,skipTimeout){retries=0;if(!websockets&&sessionId!==undefined&&sessionId!==null&&skipTimeout!==true)eventHandler();if(!websockets&&Janus$1.isArray(json)){for(var i=0;i<json.length;i++){handleEvent(json[i],true)}return}if(json["rtcgw"]==="keepalive"){Janus$1.vdebug("Got a keepalive on session "+sessionId);return}else if(json["rtcgw"]==="ack"){Janus$1.debug("Got an ack on session "+sessionId);Janus$1.debug(json);var transaction=json["transaction"];if(transaction!==null&&transaction!==undefined){var reportSuccess=transactions[transaction];if(reportSuccess!==null&&reportSuccess!==undefined){reportSuccess(json)}delete transactions[transaction]}return}else if(json["rtcgw"]==="success"){Janus$1.debug("Got a success on session "+sessionId);Janus$1.debug(json);var transaction=json["transaction"];if(transaction!==null&&transaction!==undefined){var reportSuccess=transactions[transaction];if(reportSuccess!==null&&reportSuccess!==undefined){reportSuccess(json)}delete transactions[transaction]}return}else if(json["rtcgw"]==="trickle"){var sender=json["sender"];if(sender===undefined||sender===null){Janus$1.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$1.debug("This handle is not attached to this session");return}var candidate=json["candidate"];Janus$1.debug("Got a trickled candidate on session "+sessionId);Janus$1.debug(candidate);var config=pluginHandle.webrtcStuff;if(config.pc&&config.remoteSdp){Janus$1.debug("Adding remote candidate:",candidate);if(!candidate||candidate.completed===true){config.pc.addIceCandidate(Janus$1.endOfCandidates)}else{config.pc.addIceCandidate(candidate)}}else{Janus$1.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate");if(!config.candidates)config.candidates=[];config.candidates.push(candidate);Janus$1.debug(config.candidates)}}else if(json["rtcgw"]==="webrtcup"){Janus$1.debug("Got a webrtcup event on session "+sessionId);Janus$1.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$1.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$1.debug("This handle is not attached to this session");return}pluginHandle.webrtcState(true);return}else if(json["rtcgw"]==="hangup"){Janus$1.debug("Got a hangup event on session "+sessionId);Janus$1.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$1.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$1.debug("This handle is not attached to this session");return}pluginHandle.webrtcState(false,json["reason"]);pluginHandle.hangup()}else if(json["rtcgw"]==="detached"){Janus$1.debug("Got a detached event on session "+sessionId);Janus$1.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$1.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){return}pluginHandle.detached=true;pluginHandle.ondetached();pluginHandle.detach()}else if(json["rtcgw"]==="media"){Janus$1.debug("Got a media event on session "+sessionId);Janus$1.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$1.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$1.debug("This handle is not attached to this session");return}pluginHandle.mediaState(json["type"],json["receiving"])}else if(json["rtcgw"]==="slowlink"){Janus$1.debug("Got a slowlink event on session "+sessionId);Janus$1.debug(json);console.log("json的所有信息打印-----------------------------------------------",json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$1.warn("Missing sender...");return}var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$1.debug("This handle is not attached to this session");return}pluginHandle.slowLink(json["uplink"],json["lost"])}else if(json["rtcgw"]==="error"){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason);Janus$1.debug(json);var transaction=json["transaction"];if(transaction!==null&&transaction!==undefined){var reportSuccess=transactions[transaction];if(reportSuccess!==null&&reportSuccess!==undefined){reportSuccess(json)}delete transactions[transaction]}return}else if(json["rtcgw"]==="event"){Janus$1.debug("Got a plugin event on session "+sessionId);Janus$1.debug(json);var sender=json["sender"];if(sender===undefined||sender===null){Janus$1.warn("Missing sender...");return}var plugindata=json["plugindata"];if(plugindata===undefined||plugindata===null){Janus$1.warn("Missing plugindata...");return}Janus$1.debug("  -- Event is coming from "+sender+" ("+plugindata["plugin"]+")");var data=plugindata["data"];Janus$1.debug(data);var pluginHandle=pluginHandles[sender];if(pluginHandle===undefined||pluginHandle===null){Janus$1.warn("This handle is not attached to this session");return}var jsep=json["jsep"];if(jsep!==undefined&&jsep!==null){Janus$1.debug("Handling SDP as well...");Janus$1.debug(jsep)}var callback=pluginHandle.onmessage;if(callback!==null&&callback!==undefined){Janus$1.debug("Notifying application...");callback(data,jsep)}else{Janus$1.debug("No provided notification callback")}}else if(json["rtcgw"]==="timeout"){Janus$1.error("Timeout on session "+sessionId);Janus$1.debug(json);if(websockets){ws.close(3504,"Gateway timeout")}return}else{Janus$1.warn("Unknown message/event  '"+json["rtcgw"]+"' on session "+sessionId);Janus$1.debug(json)}}function keepAlive(){if(server===null||!websockets||!connected)return;wsKeepaliveTimeoutId=setTimeout(keepAlive,keepAlivePeriod);var request={rtcgw:"keepalive",session_id:sessionId,transaction:Janus$1.randomString(12)};if(token!==null&&token!==undefined)request["token"]=token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;ws.send(JSON.stringify(request))}function createSession(callbacks){var transaction=Janus$1.randomString(12);var request={rtcgw:"create",transaction:transaction,token:"testtoken"};request=Object.assign({},request,requestOpt);if(callbacks["reconnect"]){connected=false;request["rtcgw"]="claim";request["session_id"]=sessionId;if(ws){ws.onopen=null;ws.onerror=null;ws.onclose=null;if(wsKeepaliveTimeoutId){clearTimeout(wsKeepaliveTimeoutId);wsKeepaliveTimeoutId=null}}}if(token!==null&&token!==undefined)request["token"]=token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(server===null&&Janus$1.isArray(servers)){server=servers[serversIndex];if(server.indexOf("ws")===0){websockets=true;Janus$1.log("Server #"+(serversIndex+1)+": trying WebSockets to contact Janus ("+server+")")}else{websockets=false;Janus$1.log("Server #"+(serversIndex+1)+": trying REST API to contact Janus ("+server+")")}}if(websockets){ws=Janus$1.newWebSocket(server,"rtcgw-protocol");wsHandlers={error:function error(){Janus$1.error("Error connecting to the Janus WebSockets server... "+server);if(Janus$1.isArray(servers)&&!callbacks["reconnect"]){serversIndex++;if(serversIndex==servers.length){callbacks.error("Error connecting to any of the provided Janus servers: Is the server down?");return}server=null;setTimeout(function(){createSession(callbacks)},200);return}callbacks.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function open(){transactions[transaction]=function(json){Janus$1.debug(json);if(json["rtcgw"]!=="success"){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error(json["error"].reason);return}wsKeepaliveTimeoutId=setTimeout(keepAlive,keepAlivePeriod);connected=true;sessionId=json["session_id"]?json["session_id"]:json.data["id"];if(callbacks["reconnect"]){Janus$1.log("Claimed session: "+sessionId)}else{Janus$1.log("Created session: "+sessionId)}Janus$1.sessions[sessionId]=that;callbacks.success(sessionId)};ws.send(JSON.stringify(request))},message:function message(event){handleEvent(JSON.parse(event.data))}};for(var eventName in wsHandlers){ws.addEventListener(eventName,wsHandlers[eventName])}return}Janus$1.httpAPICall(server,{verb:"POST",withCredentials:withCredentials,body:request,success:function success(json){Janus$1.debug(json);if(json["rtcgw"]!=="success"){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error(json["error"].reason);return}connected=true;sessionId=json["session_id"]?json["session_id"]:json.data["id"];if(callbacks["reconnect"]){Janus$1.log("Claimed session: "+sessionId)}else{Janus$1.log("Created session: "+sessionId)}Janus$1.sessions[sessionId]=that;eventHandler();callbacks.success()},error:function error(textStatus,errorThrown){Janus$1.error(textStatus+":",errorThrown);if(Janus$1.isArray(servers)&&!callbacks["reconnect"]){serversIndex++;if(serversIndex==servers.length){callbacks.error("Error connecting to any of the provided Janus servers: Is the server down?");return}server=null;setTimeout(function(){createSession(callbacks)},200);return}if(errorThrown==="")callbacks.error(textStatus+": Is the server down?");else callbacks.error(textStatus+": "+errorThrown)}})}function destroySession(callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;var asyncRequest=true;if(callbacks.asyncRequest!==undefined&&callbacks.asyncRequest!==null)asyncRequest=callbacks.asyncRequest===true;var notifyDestroyed=true;if(callbacks.notifyDestroyed!==undefined&&callbacks.notifyDestroyed!==null)notifyDestroyed=callbacks.notifyDestroyed===true;var cleanupHandles=false;if(callbacks.cleanupHandles!==undefined&&callbacks.cleanupHandles!==null)cleanupHandles=callbacks.cleanupHandles===true;Janus$1.log("Destroying session "+sessionId+" (async="+asyncRequest+")");if(!connected){Janus$1.warn("Is the server down? (connected=false)");callbacks.success();return}if(sessionId===undefined||sessionId===null){Janus$1.warn("No session to destroy");callbacks.success();if(notifyDestroyed)gatewayCallbacks.destroyed();return}if(cleanupHandles){for(var handleId in pluginHandles)destroyHandle(handleId,{noRequest:true})}var request={rtcgw:"destroy",transaction:Janus$1.randomString(12)};if(token!==null&&token!==undefined)request["token"]=token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(websockets){request["session_id"]=sessionId;var unbindWebSocket=function unbindWebSocket(){for(var eventName in wsHandlers){ws.removeEventListener(eventName,wsHandlers[eventName])}ws.removeEventListener("message",onUnbindMessage);ws.removeEventListener("error",onUnbindError);if(wsKeepaliveTimeoutId){clearTimeout(wsKeepaliveTimeoutId)}ws.close()};var onUnbindMessage=function onUnbindMessage(event){var data=JSON.parse(event.data);if(data.session_id==request.session_id&&data.transaction==request.transaction){unbindWebSocket();callbacks.success();if(notifyDestroyed)gatewayCallbacks.destroyed()}};var onUnbindError=function onUnbindError(event){unbindWebSocket();callbacks.error("Failed to destroy the server: Is the server down?");if(notifyDestroyed)gatewayCallbacks.destroyed()};ws.addEventListener("message",onUnbindMessage);ws.addEventListener("error",onUnbindError);ws.send(JSON.stringify(request));return}Janus$1.httpAPICall(server+"/"+sessionId,{verb:"POST",async:asyncRequest,withCredentials:withCredentials,body:request,success:function success(json){Janus$1.log("Destroyed session:");Janus$1.debug(json);sessionId=null;connected=false;if(json["rtcgw"]!=="success"){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason)}callbacks.success();if(notifyDestroyed)gatewayCallbacks.destroyed()},error:function error(textStatus,errorThrown){Janus$1.error(textStatus+":",errorThrown);sessionId=null;connected=false;callbacks.success();if(notifyDestroyed)gatewayCallbacks.destroyed();pluginHandlesp}})}function createHandle(callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$1.noop;callbacks.consentDialog=typeof callbacks.consentDialog=="function"?callbacks.consentDialog:Janus$1.noop;callbacks.iceState=typeof callbacks.iceState=="function"?callbacks.iceState:Janus$1.noop;callbacks.mediaState=typeof callbacks.mediaState=="function"?callbacks.mediaState:Janus$1.noop;callbacks.webrtcState=typeof callbacks.webrtcState=="function"?callbacks.webrtcState:Janus$1.noop;callbacks.slowLink=typeof callbacks.slowLink=="function"?callbacks.slowLink:Janus$1.noop;callbacks.onmessage=typeof callbacks.onmessage=="function"?callbacks.onmessage:Janus$1.noop;callbacks.onlocalstream=typeof callbacks.onlocalstream=="function"?callbacks.onlocalstream:Janus$1.noop;callbacks.onremotestream=typeof callbacks.onremotestream=="function"?callbacks.onremotestream:Janus$1.noop;callbacks.ondata=typeof callbacks.ondata=="function"?callbacks.ondata:Janus$1.noop;callbacks.ondataopen=typeof callbacks.ondataopen=="function"?callbacks.ondataopen:Janus$1.noop;callbacks.oncleanup=typeof callbacks.oncleanup=="function"?callbacks.oncleanup:Janus$1.noop;callbacks.ondetached=typeof callbacks.ondetached=="function"?callbacks.ondetached:Janus$1.noop;if(!connected){Janus$1.warn("Is the server down? (connected=false)");callbacks.error("Is the server down? (connected=false)");return}var plugin=callbacks.plugin;if(plugin===undefined||plugin===null){Janus$1.error("Invalid plugin");callbacks.error("Invalid plugin");return}var opaqueId=callbacks.opaqueId;var handleToken=callbacks.token?callbacks.token:token;var transaction=Janus$1.randomString(12);var request={rtcgw:"attach",plugin:plugin,opaque_id:opaqueId,transaction:transaction};if(handleToken!==null&&handleToken!==undefined)request["token"]=handleToken;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(websockets){transactions[transaction]=function(json){Janus$1.debug(json);if(json["rtcgw"]!=="success"){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error("Ooops: "+json["error"].code+" "+json["error"].reason);return}var handleId=json.data["id"];Janus$1.log("Created handle: "+handleId);var pluginHandle={session:that,plugin:plugin,id:handleId,token:handleToken,detached:false,webrtcStuff:{started:false,myStream:null,streamExternal:false,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:true,iceDone:false,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function getId(){return handleId},getPlugin:function getPlugin(){return plugin},getVolume:function getVolume(){return _getVolume(handleId,true)},getRemoteVolume:function getRemoteVolume(){return _getVolume(handleId,true)},getLocalVolume:function getLocalVolume(){return _getVolume(handleId,false)},isAudioMuted:function isAudioMuted(){return isMuted(handleId,false)},muteAudio:function muteAudio(){return mute(handleId,false,true)},unmuteAudio:function unmuteAudio(){return mute(handleId,false,false)},isVideoMuted:function isVideoMuted(){return isMuted(handleId,true)},muteVideo:function muteVideo(){return mute(handleId,true,true)},unmuteVideo:function unmuteVideo(){return mute(handleId,true,false)},getBitrate:function getBitrate(){return _getBitrate(handleId)},getNetworkQuality:function getNetworkQuality(callbacks){_getNetworkQuality(handleId,callbacks)},send:function send(callbacks){sendMessage(handleId,callbacks)},data:function data(callbacks){sendData(handleId,callbacks)},dtmf:function dtmf(callbacks){sendDtmf(handleId,callbacks)},consentDialog:callbacks.consentDialog,iceState:callbacks.iceState,mediaState:callbacks.mediaState,webrtcState:callbacks.webrtcState,slowLink:callbacks.slowLink,onmessage:callbacks.onmessage,createOffer:function createOffer(callbacks){prepareWebrtc(handleId,true,callbacks)},createAnswer:function createAnswer(callbacks){prepareWebrtc(handleId,false,callbacks)},handleRemoteJsep:function handleRemoteJsep(callbacks){prepareWebrtcPeer(handleId,callbacks)},onlocalstream:callbacks.onlocalstream,onremotestream:callbacks.onremotestream,ondata:callbacks.ondata,ondataopen:callbacks.ondataopen,oncleanup:callbacks.oncleanup,ondetached:callbacks.ondetached,hangup:function hangup(sendRequest){cleanupWebrtc(handleId,sendRequest===true)},detach:function detach(callbacks){destroyHandle(handleId,callbacks)}};pluginHandles[handleId]=pluginHandle;callbacks.success(pluginHandle)};request["session_id"]=sessionId;ws.send(JSON.stringify(request));return}Janus$1.httpAPICall(server+"/"+sessionId,{verb:"POST",withCredentials:withCredentials,body:request,success:function success(json){Janus$1.debug(json);if(json["rtcgw"]!=="success"){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error("Ooops: "+json["error"].code+" "+json["error"].reason);return}var handleId=json.data["id"];Janus$1.log("Created handle: "+handleId);var pluginHandle={session:that,plugin:plugin,id:handleId,token:handleToken,detached:false,webrtcStuff:{started:false,myStream:null,streamExternal:false,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:true,iceDone:false,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function getId(){return handleId},getPlugin:function getPlugin(){return plugin},getVolume:function getVolume(){return _getVolume(handleId,true)},getRemoteVolume:function getRemoteVolume(){return _getVolume(handleId,true)},getLocalVolume:function getLocalVolume(){return _getVolume(handleId,false)},isAudioMuted:function isAudioMuted(){return isMuted(handleId,false)},muteAudio:function muteAudio(){return mute(handleId,false,true)},unmuteAudio:function unmuteAudio(){return mute(handleId,false,false)},isVideoMuted:function isVideoMuted(){return isMuted(handleId,true)},muteVideo:function muteVideo(){return mute(handleId,true,true)},unmuteVideo:function unmuteVideo(){return mute(handleId,true,false)},getBitrate:function getBitrate(){return _getBitrate(handleId)},getNetworkQuality:function getNetworkQuality(callbacks){_getNetworkQuality(handleId,callbacks)},send:function send(callbacks){sendMessage(handleId,callbacks)},data:function data(callbacks){sendData(handleId,callbacks)},dtmf:function dtmf(callbacks){sendDtmf(handleId,callbacks)},consentDialog:callbacks.consentDialog,iceState:callbacks.iceState,mediaState:callbacks.mediaState,webrtcState:callbacks.webrtcState,slowLink:callbacks.slowLink,onmessage:callbacks.onmessage,createOffer:function createOffer(callbacks){prepareWebrtc(handleId,true,callbacks)},createAnswer:function createAnswer(callbacks){prepareWebrtc(handleId,false,callbacks)},handleRemoteJsep:function handleRemoteJsep(callbacks){prepareWebrtcPeer(handleId,callbacks)},onlocalstream:callbacks.onlocalstream,onremotestream:callbacks.onremotestream,ondata:callbacks.ondata,ondataopen:callbacks.ondataopen,oncleanup:callbacks.oncleanup,ondetached:callbacks.ondetached,hangup:function hangup(sendRequest){cleanupWebrtc(handleId,sendRequest===true)},detach:function detach(callbacks){destroyHandle(handleId,callbacks)}};pluginHandles[handleId]=pluginHandle;callbacks.success(pluginHandle)},error:function error(textStatus,errorThrown){Janus$1.error(textStatus+":",errorThrown)}})}function sendMessage(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$1.noop;if(!connected){Janus$1.warn("Is the server down? (connected=false)");callbacks.error("Is the server down? (connected=false)");return}var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");callbacks.error("Invalid handle");return}var message=callbacks.message;var jsep=callbacks.jsep;var transaction=Janus$1.randomString(12);var request={rtcgw:"message",body:message,transaction:transaction};if(pluginHandle.token!==null&&pluginHandle.token!==undefined)request["token"]=pluginHandle.token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(jsep!==null&&jsep!==undefined)request.jsep=jsep;Janus$1.debug("Sending message to plugin (handle="+handleId+"):");Janus$1.debug(request);if(websockets){request["session_id"]=sessionId;request["handle_id"]=handleId;transactions[transaction]=function(json){Janus$1.debug("Message sent!");Janus$1.debug(json);if(json["rtcgw"]==="success"){var plugindata=json["plugindata"];if(plugindata===undefined||plugindata===null){Janus$1.warn("Request succeeded, but missing plugindata...");callbacks.success();return}Janus$1.log("Synchronous transaction successful ("+plugindata["plugin"]+")");var data=plugindata["data"];Janus$1.debug(data);callbacks.success(data);return}else if(json["rtcgw"]!=="ack"){if(json["error"]!==undefined&&json["error"]!==null){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error(json["error"].code+" "+json["error"].reason)}else{Janus$1.error("Unknown error");callbacks.error("Unknown error")}return}callbacks.success()};ws.send(JSON.stringify(request));return}Janus$1.httpAPICall(server+"/"+sessionId+"/"+handleId,{verb:"POST",withCredentials:withCredentials,body:request,success:function success(json){Janus$1.debug("Message sent!");Janus$1.debug(json);if(json["rtcgw"]==="success"){var plugindata=json["plugindata"];if(plugindata===undefined||plugindata===null){Janus$1.warn("Request succeeded, but missing plugindata...");callbacks.success();return}Janus$1.log("Synchronous transaction successful ("+plugindata["plugin"]+")");var data=plugindata["data"];Janus$1.debug(data);callbacks.success(data);return}else if(json["rtcgw"]!=="ack"){if(json["error"]!==undefined&&json["error"]!==null){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason);callbacks.error(json["error"].code+" "+json["error"].reason)}else{Janus$1.error("Unknown error");callbacks.error("Unknown error")}return}callbacks.success()},error:function error(textStatus,errorThrown){Janus$1.error(textStatus+":",errorThrown);callbacks.error(textStatus+": "+errorThrown)}})}function sendTrickleCandidate(handleId,candidate){if(!connected){Janus$1.warn("Is the server down? (connected=false)");return}var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");return}var request={rtcgw:"trickle",candidate:candidate,transaction:Janus$1.randomString(12)};if(pluginHandle.token!==null&&pluginHandle.token!==undefined)request["token"]=pluginHandle.token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;Janus$1.vdebug("Sending trickle candidate (handle="+handleId+"):");Janus$1.vdebug(request);if(websockets){request["session_id"]=sessionId;request["handle_id"]=handleId;ws.send(JSON.stringify(request));return}Janus$1.httpAPICall(server+"/"+sessionId+"/"+handleId,{verb:"POST",withCredentials:withCredentials,body:request,success:function success(json){Janus$1.vdebug("Candidate sent!");Janus$1.vdebug(json);if(json["rtcgw"]!=="ack"){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason);return}},error:function error(textStatus,errorThrown){Janus$1.error(textStatus+":",errorThrown)}})}function createDataChannel(handleId,dclabel,incoming,pendingText){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");return}var config=pluginHandle.webrtcStuff;var onDataChannelMessage=function onDataChannelMessage(event){Janus$1.log("Received message on data channel:",event);var label=event.target.label;pluginHandle.ondata(event.data,label)};var onDataChannelStateChange=function onDataChannelStateChange(event){Janus$1.log("Received state change on data channel:",event);var label=event.target.label;var dcState=config.dataChannel[label]?config.dataChannel[label].readyState:"null";Janus$1.log("State change on <"+label+"> data channel: "+dcState);if(dcState==="open"){if(config.dataChannel[label].pending&&config.dataChannel[label].pending.length>0){Janus$1.log("Sending pending messages on <"+label+">:",config.dataChannel[label].pending.length);for(var i in config.dataChannel[label].pending){var text=config.dataChannel[label].pending[i];Janus$1.log("Sending string on data channel <"+label+">: "+text);config.dataChannel[label].send(text)}config.dataChannel[label].pending=[]}pluginHandle.ondataopen(label)}};var onDataChannelError=function onDataChannelError(error){Janus$1.error("Got error on data channel:",error)};if(!incoming){config.dataChannel[dclabel]=config.pc.createDataChannel(dclabel,{ordered:false})}else{config.dataChannel[dclabel]=incoming}config.dataChannel[dclabel].onmessage=onDataChannelMessage;config.dataChannel[dclabel].onopen=onDataChannelStateChange;config.dataChannel[dclabel].onclose=onDataChannelStateChange;config.dataChannel[dclabel].onerror=onDataChannelError;config.dataChannel[dclabel].pending=[];if(pendingText)config.dataChannel[dclabel].pending.push(pendingText)}function sendData(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$1.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;var text=callbacks.text;if(text===null||text===undefined){Janus$1.warn("Invalid text");callbacks.error("Invalid text");return}var label=callbacks.label?callbacks.label:Janus$1.dataChanDefaultLabel;if(!config.dataChannel[label]){createDataChannel(handleId,label,false,text);callbacks.success();return}if(config.dataChannel[label].readyState!=="open"){config.dataChannel[label].pending.push(text);callbacks.success();return}Janus$1.log("Sending string on data channel <"+label+">: "+text);config.dataChannel[label].send(text);callbacks.success()}function sendDtmf(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$1.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;if(config.dtmfSender===null||config.dtmfSender===undefined){if(config.pc!==undefined&&config.pc!==null){var senders=config.pc.getSenders();var audioSender=senders.find(function(sender){return sender.track&&sender.track.kind==="audio"});if(!audioSender){Janus$1.warn("Invalid DTMF configuration (no audio track)");callbacks.error("Invalid DTMF configuration (no audio track)");return}config.dtmfSender=audioSender.dtmf;if(config.dtmfSender){Janus$1.log("Created DTMF Sender");config.dtmfSender.ontonechange=function(tone){Janus$1.debug("Sent DTMF tone: "+tone.tone)}}}if(config.dtmfSender===null||config.dtmfSender===undefined){Janus$1.warn("Invalid DTMF configuration");callbacks.error("Invalid DTMF configuration");return}}var dtmf=callbacks.dtmf;if(dtmf===null||dtmf===undefined){Janus$1.warn("Invalid DTMF parameters");callbacks.error("Invalid DTMF parameters");return}var tones=dtmf.tones;if(tones===null||tones===undefined){Janus$1.warn("Invalid DTMF string");callbacks.error("Invalid DTMF string");return}var duration=dtmf.duration;if(duration===null||duration===undefined)duration=500;var gap=dtmf.gap;if(gap===null||gap===undefined)gap=50;Janus$1.debug("Sending DTMF string "+tones+" (duration "+duration+"ms, gap "+gap+"ms)");config.dtmfSender.insertDTMF(tones,duration,gap);callbacks.success()}function destroyHandle(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$1.noop;var asyncRequest=true;if(callbacks.asyncRequest!==undefined&&callbacks.asyncRequest!==null)asyncRequest=callbacks.asyncRequest===true;var noRequest=true;if(callbacks.noRequest!==undefined&&callbacks.noRequest!==null)noRequest=callbacks.noRequest===true;Janus$1.log("Destroying handle "+handleId+" (async="+asyncRequest+")");cleanupWebrtc(handleId);var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.detached){delete pluginHandles[handleId];callbacks.success();return}if(noRequest){delete pluginHandles[handleId];callbacks.success();return}if(!connected){Janus$1.warn("Is the server down? (connected=false)");callbacks.error("Is the server down? (connected=false)");return}var request={rtcgw:"detach",transaction:Janus$1.randomString(12)};if(pluginHandle.token!==null&&pluginHandle.token!==undefined)request["token"]=pluginHandle.token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;if(websockets){request["session_id"]=sessionId;request["handle_id"]=handleId;ws.send(JSON.stringify(request));delete pluginHandles[handleId];callbacks.success();return}Janus$1.httpAPICall(server+"/"+sessionId+"/"+handleId,{verb:"POST",async:asyncRequest,withCredentials:withCredentials,body:request,success:function success(json){Janus$1.log("Destroyed handle:");Janus$1.debug(json);if(json["rtcgw"]!=="success"){Janus$1.error("Ooops: "+json["error"].code+" "+json["error"].reason)}delete pluginHandles[handleId];callbacks.success()},error:function error(textStatus,errorThrown){Janus$1.error(textStatus+":",errorThrown);delete pluginHandles[handleId];callbacks.success()}})}function streamsDone(handleId,jsep,media,callbacks,stream){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;Janus$1.debug("streamsDone:",stream);if(stream){Janus$1.debug("  -- Audio tracks:",stream.getAudioTracks());Janus$1.debug("  -- Video tracks:",stream.getVideoTracks())}var addTracks=false;if(!config.myStream||!media.update||config.streamExternal){config.myStream=stream;addTracks=true}else{if((!media.update&&isAudioSendEnabled(media)||media.update&&(media.addAudio||media.replaceAudio))&&stream.getAudioTracks()&&stream.getAudioTracks().length){config.myStream.addTrack(stream.getAudioTracks()[0]);if(Janus$1.unifiedPlan){Janus$1.log((media.replaceAudio?"Replacing":"Adding")+" audio track:",stream.getAudioTracks()[0]);var audioTransceiver=null;var transceivers=config.pc.getTransceivers();if(transceivers&&transceivers.length>0){for(var i in transceivers){var t=transceivers[i];if(t.sender&&t.sender.track&&t.sender.track.kind==="audio"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="audio"){audioTransceiver=t;break}}}if(audioTransceiver&&audioTransceiver.sender){audioTransceiver.sender.replaceTrack(stream.getAudioTracks()[0])}else{config.pc.addTrack(stream.getAudioTracks()[0],stream)}}else{Janus$1.log((media.replaceAudio?"Replacing":"Adding")+" audio track:",stream.getAudioTracks()[0]);config.pc.addTrack(stream.getAudioTracks()[0],stream)}}if((!media.update&&isVideoSendEnabled(media)||media.update&&(media.addVideo||media.replaceVideo))&&stream.getVideoTracks()&&stream.getVideoTracks().length){config.myStream.addTrack(stream.getVideoTracks()[0]);if(Janus$1.unifiedPlan){Janus$1.log((media.replaceVideo?"Replacing":"Adding")+" video track:",stream.getVideoTracks()[0]);var videoTransceiver=null;var transceivers=config.pc.getTransceivers();if(transceivers&&transceivers.length>0){for(var i in transceivers){var t=transceivers[i];if(t.sender&&t.sender.track&&t.sender.track.kind==="video"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="video"){videoTransceiver=t;break}}}if(videoTransceiver&&videoTransceiver.sender){videoTransceiver.sender.replaceTrack(stream.getVideoTracks()[0])}else{config.pc.addTrack(stream.getVideoTracks()[0],stream)}}else{Janus$1.log((media.replaceVideo?"Replacing":"Adding")+" video track:",stream.getVideoTracks()[0]);config.pc.addTrack(stream.getVideoTracks()[0],stream)}}}if(!config.pc){var pc_config={iceServers:iceServers,iceTransportPolicy:iceTransportPolicy,bundlePolicy:bundlePolicy};if(Janus$1.webRTCAdapter.browserDetails.browser==="chrome"){pc_config["sdpSemantics"]=Janus$1.webRTCAdapter.browserDetails.version<72?"plan-b":"unified-plan"}var pc_constraints={optional:[{DtlsSrtpKeyAgreement:true}]};if(ipv6Support===true){pc_constraints.optional.push({googIPv6:true})}if(callbacks.rtcConstraints&&_typeof(callbacks.rtcConstraints)==="object"){Janus$1.debug("Adding custom PeerConnection constraints:",callbacks.rtcConstraints);for(var i in callbacks.rtcConstraints){pc_constraints.optional.push(callbacks.rtcConstraints[i])}}if(Janus$1.webRTCAdapter.browserDetails.browser==="edge"){pc_config.bundlePolicy="max-bundle"}Janus$1.log("Creating PeerConnection");Janus$1.debug(pc_constraints);config.pc=new RTCPeerConnection(pc_config,pc_constraints);Janus$1.debug(config.pc);if(config.pc.getStats){config.volume={};config.bitrate.value="0 kbits/sec"}Janus$1.log("Preparing local SDP and gathering candidates (trickle="+config.trickle+")");config.pc.oniceconnectionstatechange=function(e){if(config.pc)pluginHandle.iceState(config.pc.iceConnectionState)};config.pc.onicecandidate=function(event){if(event.candidate==null||Janus$1.webRTCAdapter.browserDetails.browser==="edge"&&event.candidate.candidate.indexOf("endOfCandidates")>0){Janus$1.log("End of candidates.");config.iceDone=true;if(config.trickle===true){sendTrickleCandidate(handleId,{completed:true})}else{sendSDP(handleId,callbacks)}}else{var candidate={candidate:event.candidate.candidate,sdpMid:event.candidate.sdpMid,sdpMLineIndex:event.candidate.sdpMLineIndex};if(config.trickle===true){sendTrickleCandidate(handleId,candidate)}}};config.pc.ontrack=function(event){Janus$1.log("Handling Remote Track");Janus$1.debug(event);if(!event.streams)return;config.remoteStream=event.streams[0];pluginHandle.onremotestream(config.remoteStream);if(event.track.onended)return;Janus$1.log("Adding onended callback to track:",event.track);event.track.onended=function(ev){Janus$1.log("Remote track muted/removed:",ev);if(config.remoteStream){config.remoteStream.removeTrack(ev.target);pluginHandle.onremotestream(config.remoteStream)}};event.track.onmute=event.track.onended;event.track.onunmute=function(ev){Janus$1.log("Remote track flowing again:",ev);try{config.remoteStream.addTrack(ev.target);pluginHandle.onremotestream(config.remoteStream)}catch(e){Janus$1.error(e)}}}}if(addTracks&&stream!==null&&stream!==undefined){Janus$1.log("Adding local stream");console.log("callbacks",callbacks);if(callbacks.media.video=="screen"){var simulcast2=callbacks.simulcast2===true?true:false;stream.getTracks().forEach(function(track){Janus$1.log("Adding local track:",track);track.applyConstraints({frameRate:5});if(!simulcast2){config.pc.addTrack(track,stream)}else{if(track.kind==="audio"){config.pc.addTrack(track,stream)}else{Janus$1.log("Enabling rid-based simulcasting:",track);var maxBitrates=getMaxBitrates(callbacks.simulcastMaxBitrates);config.pc.addTransceiver(track,{direction:"sendrecv",streams:[stream],sendEncodings:[{rid:"h",active:true,maxBitrate:maxBitrates.high},{rid:"m",active:true,maxBitrate:maxBitrates.medium,scaleResolutionDownBy:2},{rid:"l",active:true,maxBitrate:maxBitrates.low,scaleResolutionDownBy:4}]})}}})}else{var simulcast2=callbacks.simulcast2===true?true:false;var tracks=stream.getTracks();var videoTrack=tracks[0];if(videoTrack){var settings=videoTrack.getSettings();console.log("videoTrack",videoTrack);console.log("videosettings",settings)}var audioTracks=stream.getAudioTracks();var audioTrack=audioTracks[0];if(audioTrack){var _settings=audioTrack.getSettings();console.log("audiosettings",_settings)}tracks.forEach(function(track){track.applyConstraints({frameRate:{max:callbacks.frameRate}});Janus$1.log("Adding local track:",track);if(simulcast2){config.pc.addTrack(track,stream);var vsender=null;var senders=config.pc.getSenders();for(var index in senders){var s=senders[index];if(s&&s.track&&s.track.kind==="video"){vsender=s}}var parameters=null;if(vsender){parameters=vsender.getParameters()}if(parameters&&parameters.encodings){parameters.encodings[0].maxBitrate=1e5;vsender.setParameters(parameters).then(function(res){console.log("Successed to set parameters!",parameters)})["catch"](function(err){console.log("err",err);console.error(err)})}}else{if(track.kind==="audio"){config.pc.addTrack(track,stream)}else{Janus$1.log("Enabling rid-based simulcasting:",track);var maxBitrate=callbacks.bitrate||1e5;config.pc.addTransceiver(track,{direction:"sendrecv",streams:[stream],sendEncodings:[{rid:"h",active:true,maxBitrate:maxBitrate}]})}}})}}if(isDataEnabled(media)&&!config.dataChannel[Janus$1.dataChanDefaultLabel]){Janus$1.log("Creating data channel");createDataChannel(handleId,Janus$1.dataChanDefaultLabel,false);config.pc.ondatachannel=function(event){Janus$1.log("Data channel created by Janus:",event);createDataChannel(handleId,event.channel.label,event.channel)}}if(config.myStream)pluginHandle.onlocalstream(config.myStream);if(jsep===null||jsep===undefined){createOffer(handleId,media,callbacks)}else{config.pc.setRemoteDescription(jsep).then(function(){Janus$1.log("Remote description accepted!");config.remoteSdp=jsep.sdp;if(config.candidates&&config.candidates.length>0){for(var i=0;i<config.candidates.length;i++){var candidate=config.candidates[i];Janus$1.debug("Adding remote candidate:",candidate);if(!candidate||candidate.completed===true){config.pc.addIceCandidate(Janus$1.endOfCandidates)}else{config.pc.addIceCandidate(candidate)}}config.candidates=[]}createAnswer(handleId,media,callbacks)},callbacks.error)}}function prepareWebrtc(handleId,offer,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:webrtcError;var jsep=callbacks.jsep;if(offer&&jsep){Janus$1.error("Provided a JSEP to a createOffer");callbacks.error("Provided a JSEP to a createOffer");return}else if(!offer&&(!jsep||!jsep.type||!jsep.sdp)){Janus$1.error("A valid JSEP is required for createAnswer");callbacks.error("A valid JSEP is required for createAnswer");return}callbacks.media=callbacks.media||{audio:true,video:true};var media=callbacks.media;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;config.trickle=isTrickleEnabled(callbacks.trickle);if(config.pc===undefined||config.pc===null){media.update=false;media.keepAudio=false;media.keepVideo=false}else if(config.pc!==undefined&&config.pc!==null){Janus$1.log("Updating existing media session");media.update=true;if(callbacks.stream!==null&&callbacks.stream!==undefined){if(callbacks.stream!==config.myStream){Janus$1.log("Renegotiation involves a new external stream")}}else{if(media.addAudio){media.keepAudio=false;media.replaceAudio=false;media.removeAudio=false;media.audioSend=true;if(config.myStream&&config.myStream.getAudioTracks()&&config.myStream.getAudioTracks().length){Janus$1.error("Can't add audio stream, there already is one");callbacks.error("Can't add audio stream, there already is one");return}}else if(media.removeAudio){media.keepAudio=false;media.replaceAudio=false;media.addAudio=false;media.audioSend=false}else if(media.replaceAudio){media.keepAudio=false;media.addAudio=false;media.removeAudio=false;media.audioSend=true}if(config.myStream===null||config.myStream===undefined){if(media.replaceAudio){media.keepAudio=false;media.replaceAudio=false;media.addAudio=true;media.audioSend=true}if(isAudioSendEnabled(media)){media.keepAudio=false;media.addAudio=true}}else{if(config.myStream.getAudioTracks()===null||config.myStream.getAudioTracks()===undefined||config.myStream.getAudioTracks().length===0){if(media.replaceAudio){media.keepAudio=false;media.replaceAudio=false;media.addAudio=true;media.audioSend=true}if(isAudioSendEnabled(media)){media.keepVideo=false;media.addAudio=true}}else{if(isAudioSendEnabled(media)&&!media.removeAudio&&!media.replaceAudio){media.keepAudio=true}}}if(media.addVideo){media.keepVideo=false;media.replaceVideo=false;media.removeVideo=false;media.videoSend=true;if(config.myStream&&config.myStream.getVideoTracks()&&config.myStream.getVideoTracks().length){Janus$1.error("Can't add video stream, there already is one");callbacks.error("Can't add video stream, there already is one");return}}else if(media.removeVideo){media.keepVideo=false;media.replaceVideo=false;media.addVideo=false;media.videoSend=false}else if(media.replaceVideo){media.keepVideo=false;media.addVideo=false;media.removeVideo=false;media.videoSend=true}if(config.myStream===null||config.myStream===undefined){if(media.replaceVideo){media.keepVideo=false;media.replaceVideo=false;media.addVideo=true;media.videoSend=true}if(isVideoSendEnabled(media)){media.keepVideo=false;media.addVideo=true}}else{if(config.myStream.getVideoTracks()===null||config.myStream.getVideoTracks()===undefined||config.myStream.getVideoTracks().length===0){if(media.replaceVideo){media.keepVideo=false;media.replaceVideo=false;media.addVideo=true;media.videoSend=true}if(isVideoSendEnabled(media)){media.keepVideo=false;media.addVideo=true}}else{if(isVideoSendEnabled(media)&&!media.removeVideo&&!media.replaceVideo){media.keepVideo=true}}}if(media.addData)media.data=true}if(isAudioSendEnabled(media)&&media.keepAudio&&isVideoSendEnabled(media)&&media.keepVideo){pluginHandle.consentDialog(false);streamsDone(handleId,jsep,media,callbacks,config.myStream);return}}if(media.update&&!config.streamExternal){if(media.removeAudio||media.replaceAudio){if(config.myStream&&config.myStream.getAudioTracks()&&config.myStream.getAudioTracks().length){var s=config.myStream.getAudioTracks()[0];Janus$1.log("Removing audio track:",s);config.myStream.removeTrack(s);try{s.stop()}catch(e){}}if(config.pc.getSenders()&&config.pc.getSenders().length){var ra=true;if(media.replaceAudio&&Janus$1.unifiedPlan){ra=false}if(ra){for(var index in config.pc.getSenders()){var s=config.pc.getSenders()[index];if(s&&s.track&&s.track.kind==="audio"){Janus$1.log("Removing audio sender:",s);config.pc.removeTrack(s)}}}}}if(media.removeVideo||media.replaceVideo){if(config.myStream&&config.myStream.getVideoTracks()&&config.myStream.getVideoTracks().length){var s=config.myStream.getVideoTracks()[0];Janus$1.log("Removing video track:",s);config.myStream.removeTrack(s);try{s.stop()}catch(e){}}if(config.pc.getSenders()&&config.pc.getSenders().length){var rv=true;if(media.replaceVideo&&Janus$1.unifiedPlan){rv=false}if(rv){for(var index in config.pc.getSenders()){var s=config.pc.getSenders()[index];if(s&&s.track&&s.track.kind==="video"){Janus$1.log("Removing video sender:",s);config.pc.removeTrack(s)}}}}}}if(callbacks.stream!==null&&callbacks.stream!==undefined){var stream=callbacks.stream;Janus$1.log("MediaStream provided by the application");Janus$1.debug(stream);if(media.update){if(config.myStream&&config.myStream!==callbacks.stream&&!config.streamExternal){try{var tracks=config.myStream.getTracks();for(var i in tracks){var mst=tracks[i];Janus$1.log(mst);if(mst!==null&&mst!==undefined)mst.stop()}}catch(e){}config.myStream=null}}config.streamExternal=true;pluginHandle.consentDialog(false);streamsDone(handleId,jsep,media,callbacks,stream);return}if(isAudioSendEnabled(media)||isVideoSendEnabled(media)){if(!Janus$1.isGetUserMediaAvailable()){callbacks.error("getUserMedia not available");return}var constraints={mandatory:{},optional:[]};pluginHandle.consentDialog(true);var audioSupport=isAudioSendEnabled(media);if(audioSupport===true&&media!=undefined&&media!=null){if(_typeof(media.audio)==="object"){audioSupport=media.audio}}var videoSupport=isVideoSendEnabled(media);if(videoSupport===true&&media!=undefined&&media!=null){var simulcast=callbacks.simulcast===true?true:false;var simulcast2=callbacks.simulcast2===true?true:false;if((simulcast||simulcast2)&&!jsep&&(media.video===undefined||media.video===false))media.video="hires";if(media.video&&media.video!="screen"&&media.video!="window"){if(_typeof(media.video)==="object"){videoSupport=media.video}else{var width=0;var height=0;if(media.video==="lowres"){height=240;width=320}else if(media.video==="lowres-16:9"){height=180;width=320}else if(media.video==="hires"||media.video==="hires-16:9"||media.video==="hdres"){height=720;width=1280}else if(media.video==="fhdres"){height=1080;width=1920}else if(media.video==="4kres"){height=2160;width=3840}else if(media.video==="stdres"){height=480;width=640}else if(media.video==="stdres-16:9"){height=360;width=640}else{Janus$1.log("Default video setting is stdres 4:3");height=480;width=640}Janus$1.log("Adding media constraint:",media.video);videoSupport={height:{ideal:height},width:{ideal:width}};Janus$1.log("Adding video constraint:",videoSupport)}}else if(media.video==="screen"||media.video==="window"){var callbackUserMedia=function callbackUserMedia(error,stream){pluginHandle.consentDialog(false);if(error){callbacks.error(error)}else{streamsDone(handleId,jsep,media,callbacks,stream)}};var getScreenMedia=function getScreenMedia(constraints,gsmCallback,useAudio){Janus$1.log("Adding media constraint (screen capture)");Janus$1.debug(constraints);navigator.mediaDevices.getUserMedia(constraints).then(function(stream){if(useAudio){navigator.mediaDevices.getUserMedia({audio:true,video:false}).then(function(audioStream){stream.addTrack(audioStream.getAudioTracks()[0]);gsmCallback(null,stream)})}else{gsmCallback(null,stream)}})["catch"](function(error){pluginHandle.consentDialog(false);gsmCallback(error)})};if(!media.screenshareFrameRate){media.screenshareFrameRate=3}if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia){navigator.mediaDevices.getDisplayMedia({video:true}).then(function(stream){pluginHandle.consentDialog(false);if(isAudioSendEnabled(media)&&!media.keepAudio){navigator.mediaDevices.getUserMedia({audio:true,video:false}).then(function(audioStream){stream.addTrack(audioStream.getAudioTracks()[0]);streamsDone(handleId,jsep,media,callbacks,stream)})}else{streamsDone(handleId,jsep,media,callbacks,stream)}},function(error){pluginHandle.consentDialog(false);callbacks.error(error)});return}if(Janus$1.webRTCAdapter.browserDetails.browser==="chrome"){var chromever=Janus$1.webRTCAdapter.browserDetails.version;var maxver=33;if(window.navigator.userAgent.match("Linux"))maxver=35;if(chromever>=26&&chromever<=maxver){constraints={video:{mandatory:{googLeakyBucket:true,maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:media.screenshareFrameRate,maxFrameRate:media.screenshareFrameRate,chromeMediaSource:"screen"}},audio:isAudioSendEnabled(media)&&!media.keepAudio};getScreenMedia(constraints,callbackUserMedia)}else{Janus$1.extension.getScreen(function(error,sourceId){if(error){pluginHandle.consentDialog(false);return callbacks.error(error)}constraints={audio:false,video:{mandatory:{chromeMediaSource:"desktop",maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:media.screenshareFrameRate,maxFrameRate:media.screenshareFrameRate},optional:[{googLeakyBucket:true},{googTemporalLayeredScreencast:true}]}};constraints.video.mandatory.chromeMediaSourceId=sourceId;getScreenMedia(constraints,callbackUserMedia,isAudioSendEnabled(media)&&!media.keepAudio)})}}else if(Janus$1.webRTCAdapter.browserDetails.browser==="firefox"){if(Janus$1.webRTCAdapter.browserDetails.version>=33){constraints={video:{mozMediaSource:media.video,mediaSource:media.video},audio:isAudioSendEnabled(media)&&!media.keepAudio};getScreenMedia(constraints,function(err,stream){callbackUserMedia(err,stream);if(!err){var lastTime=stream.currentTime;var polly=window.setInterval(function(){if(!stream)window.clearInterval(polly);if(stream.currentTime==lastTime){window.clearInterval(polly);if(stream.onended){stream.onended()}}lastTime=stream.currentTime},500)}})}else{var error=new Error("NavigatorUserMediaError");error.name="Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)";pluginHandle.consentDialog(false);callbacks.error(error);return}}return}}if(media===null||media===undefined||media.video!=="screen"){navigator.mediaDevices.enumerateDevices().then(function(devices){var audioExist=devices.some(function(device){return device.kind==="audioinput"}),videoExist=isScreenSendEnabled(media)||devices.some(function(device){return device.kind==="videoinput"});var audioSend=isAudioSendEnabled(media);var videoSend=isVideoSendEnabled(media);var needAudioDevice=isAudioSendRequired(media);var needVideoDevice=isVideoSendRequired(media);if(audioSend||videoSend||needAudioDevice||needVideoDevice){var haveAudioDevice=audioSend?audioExist:false;var haveVideoDevice=videoSend?videoExist:false;if(!haveAudioDevice&&!haveVideoDevice){pluginHandle.consentDialog(false);callbacks.error("No capture device found");return false}else if(!haveAudioDevice&&needAudioDevice){pluginHandle.consentDialog(false);callbacks.error("Audio capture is required, but no capture device found");return false}else if(!haveVideoDevice&&needVideoDevice){pluginHandle.consentDialog(false);callbacks.error("Video capture is required, but no capture device found");return false}}var gumConstraints={audio:audioExist&&!media.keepAudio?audioSupport:false,video:videoExist&&!media.keepVideo?videoSupport:false};if(media.encodings){gumConstraints=media.encodings}Janus$1.debug("getUserMedia constraints",gumConstraints);if(!gumConstraints.audio&&!gumConstraints.video){pluginHandle.consentDialog(false);streamsDone(handleId,jsep,media,callbacks,stream)}else{console.log("gumConstraints_________",gumConstraints,media.encodings);navigator.mediaDevices.getUserMedia(media.encodings?media.encodings:gumConstraints).then(function(stream){pluginHandle.consentDialog(false);streamsDone(handleId,jsep,media,callbacks,stream)})["catch"](function(error){pluginHandle.consentDialog(false);callbacks.error({code:error.code,name:error.name,message:error.message})})}})["catch"](function(error){pluginHandle.consentDialog(false);callbacks.error("enumerateDevices error",error)})}}else{streamsDone(handleId,jsep,media,callbacks)}}function prepareWebrtcPeer(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:webrtcError;var jsep=callbacks.jsep;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;if(jsep!==undefined&&jsep!==null){if(config.pc===null){Janus$1.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep");callbacks.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");return}config.pc.setRemoteDescription(jsep).then(function(){Janus$1.log("Remote description accepted!");config.remoteSdp=jsep.sdp;if(config.candidates&&config.candidates.length>0){for(var i=0;i<config.candidates.length;i++){var candidate=config.candidates[i];Janus$1.debug("Adding remote candidate:",candidate);if(!candidate||candidate.completed===true){config.pc.addIceCandidate(Janus$1.endOfCandidates)}else{config.pc.addIceCandidate(candidate)}}config.candidates=[]}callbacks.success()},callbacks.error)}else{callbacks.error("Invalid JSEP")}}function createOffer(handleId,media,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$1.noop;callbacks.customizeSdp=typeof callbacks.customizeSdp=="function"?callbacks.customizeSdp:Janus$1.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;var simulcast=callbacks.simulcast===true?true:false;if(!simulcast){Janus$1.log("Creating offer (iceDone="+config.iceDone+")")}else{Janus$1.log("Creating offer (iceDone="+config.iceDone+", simulcast="+simulcast+")")}var mediaConstraints={};if(Janus$1.unifiedPlan){var audioTransceiver=null,videoTransceiver=null;var transceivers=config.pc.getTransceivers();if(transceivers&&transceivers.length>0){for(var i in transceivers){var t=transceivers[i];if(t.sender&&t.sender.track&&t.sender.track.kind==="audio"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="audio"){if(!audioTransceiver)audioTransceiver=t;continue}if(t.sender&&t.sender.track&&t.sender.track.kind==="video"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="video"){if(!videoTransceiver)videoTransceiver=t;continue}}}var audioSend=isAudioSendEnabled(media);var audioRecv=isAudioRecvEnabled(media);if(!audioSend&&!audioRecv){if(media.removeAudio&&audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("inactive")}else{audioTransceiver.direction="inactive"}Janus$1.log("Setting audio transceiver to inactive:",audioTransceiver)}}else{if(audioSend&&audioRecv){if(audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("sendrecv")}else{audioTransceiver.direction="sendrecv"}Janus$1.log("Setting audio transceiver to sendrecv:",audioTransceiver)}}else if(audioSend&&!audioRecv){if(audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("sendonly")}else{audioTransceiver.direction="sendonly"}Janus$1.log("Setting audio transceiver to sendonly:",audioTransceiver)}}else if(!audioSend&&audioRecv){if(audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("recvonly")}else{audioTransceiver.direction="recvonly"}Janus$1.log("Setting audio transceiver to recvonly:",audioTransceiver)}else{audioTransceiver=config.pc.addTransceiver("audio",{direction:"recvonly"});Janus$1.log("Adding recvonly audio transceiver:",audioTransceiver)}}}var videoSend=isVideoSendEnabled(media);var videoRecv=isVideoRecvEnabled(media);if(!videoSend&&!videoRecv){if(media.removeVideo&&videoTransceiver){if(videoTransceiver.setDirection){videoTransceiver.setDirection("inactive")}else{videoTransceiver.direction="inactive"}Janus$1.log("Setting video transceiver to inactive:",videoTransceiver)}}else{if(videoSend&&videoRecv){if(videoTransceiver){if(videoTransceiver.setDirection){videoTransceiver.setDirection("sendrecv")}else{videoTransceiver.direction="sendrecv"}Janus$1.log("Setting video transceiver to sendrecv:",videoTransceiver)}}else if(videoSend&&!videoRecv){if(videoTransceiver){if(videoTransceiver.setDirection){videoTransceiver.setDirection("sendonly")}else{videoTransceiver.direction="sendonly"}Janus$1.log("Setting video transceiver to sendonly:",videoTransceiver)}}else if(!videoSend&&videoRecv){if(videoTransceiver){if(videoTransceiver.setDirection){videoTransceiver.setDirection("recvonly")}else{videoTransceiver.direction="recvonly"}Janus$1.log("Setting video transceiver to recvonly:",videoTransceiver)}else{videoTransceiver=config.pc.addTransceiver("video",{direction:"recvonly"});Janus$1.log("Adding recvonly video transceiver:",videoTransceiver)}}}}else{mediaConstraints["offerToReceiveAudio"]=isAudioRecvEnabled(media);mediaConstraints["offerToReceiveVideo"]=isVideoRecvEnabled(media)}var iceRestart=callbacks.iceRestart===true?true:false;if(iceRestart){mediaConstraints["iceRestart"]=true}Janus$1.debug(mediaConstraints);var sendVideo=isVideoSendEnabled(media);if(sendVideo&&simulcast&&Janus$1.webRTCAdapter.browserDetails.browser==="firefox"){Janus$1.log("Enabling Simulcasting for Firefox (RID)");var sender=config.pc.getSenders().find(function(s){return s.track.kind=="video"});if(sender){var parameters=sender.getParameters();if(!parameters)parameters={};var maxBitrates=getMaxBitrates(callbacks.simulcastMaxBitrates);parameters.encodings=[{rid:"h",active:true,maxBitrate:maxBitrates.high},{rid:"m",active:true,maxBitrate:maxBitrates.medium,scaleResolutionDownBy:2},{rid:"l",active:true,maxBitrate:maxBitrates.low,scaleResolutionDownBy:4}];sender.setParameters(parameters)}}config.pc.createOffer(mediaConstraints).then(function(offer){Janus$1.debug(offer);var jsep={type:offer.type,sdp:offer.sdp};callbacks.customizeSdp(jsep);offer.sdp=jsep.sdp;Janus$1.log("Setting local description");if(sendVideo&&simulcast){if(Janus$1.webRTCAdapter.browserDetails.browser==="chrome"||Janus$1.webRTCAdapter.browserDetails.browser==="safari"){Janus$1.log("Enabling Simulcasting for Chrome (SDP munging)");offer.sdp=mungeSdpForSimulcasting(offer.sdp)}else if(Janus$1.webRTCAdapter.browserDetails.browser!=="firefox"){Janus$1.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")}}config.mySdp=offer.sdp;config.pc.setLocalDescription(offer)["catch"](callbacks.error);config.mediaConstraints=mediaConstraints;if(!config.iceDone&&!config.trickle){Janus$1.log("Waiting for all candidates...");return}Janus$1.log("Offer ready");Janus$1.debug(callbacks);callbacks.success(offer)},callbacks.error)}function createAnswer(handleId,media,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$1.noop;callbacks.customizeSdp=typeof callbacks.customizeSdp=="function"?callbacks.customizeSdp:Janus$1.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");callbacks.error("Invalid handle");return}var config=pluginHandle.webrtcStuff;var simulcast=callbacks.simulcast===true?true:false;if(!simulcast){Janus$1.log("Creating answer (iceDone="+config.iceDone+")")}else{Janus$1.log("Creating answer (iceDone="+config.iceDone+", simulcast="+simulcast+")")}var mediaConstraints=null;if(Janus$1.unifiedPlan){mediaConstraints={};var audioTransceiver=null,videoTransceiver=null;var transceivers=config.pc.getTransceivers();if(transceivers&&transceivers.length>0){for(var i in transceivers){var t=transceivers[i];if(t.sender&&t.sender.track&&t.sender.track.kind==="audio"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="audio"){if(!audioTransceiver)audioTransceiver=t;continue}if(t.sender&&t.sender.track&&t.sender.track.kind==="video"||t.receiver&&t.receiver.track&&t.receiver.track.kind==="video"){if(!videoTransceiver)videoTransceiver=t;continue}}}var audioSend=isAudioSendEnabled(media);var audioRecv=isAudioRecvEnabled(media);if(!audioSend&&!audioRecv){if(media.removeAudio&&audioTransceiver){try{if(audioTransceiver.setDirection){audioTransceiver.setDirection("inactive")}else{audioTransceiver.direction="inactive"}Janus$1.log("Setting audio transceiver to inactive:",audioTransceiver)}catch(e){Janus$1.error(e)}}}else{if(audioSend&&audioRecv){if(audioTransceiver){try{if(audioTransceiver.setDirection){audioTransceiver.setDirection("sendrecv")}else{audioTransceiver.direction="sendrecv"}Janus$1.log("Setting audio transceiver to sendrecv:",audioTransceiver)}catch(e){Janus$1.error(e)}}}else if(audioSend&&!audioRecv){try{if(audioTransceiver){if(audioTransceiver.setDirection){audioTransceiver.setDirection("sendonly")}else{audioTransceiver.direction="sendonly"}Janus$1.log("Setting audio transceiver to sendonly:",audioTransceiver)}}catch(e){Janus$1.error(e)}}else if(!audioSend&&audioRecv){if(audioTransceiver){try{if(audioTransceiver.setDirection){audioTransceiver.setDirection("recvonly")}else{audioTransceiver.direction="recvonly"}Janus$1.log("Setting audio transceiver to recvonly:",audioTransceiver)}catch(e){Janus$1.error(e)}}else{audioTransceiver=config.pc.addTransceiver("audio",{direction:"recvonly"});Janus$1.log("Adding recvonly audio transceiver:",audioTransceiver)}}}var videoSend=isVideoSendEnabled(media);var videoRecv=isVideoRecvEnabled(media);if(!videoSend&&!videoRecv){if(media.removeVideo&&videoTransceiver){try{if(videoTransceiver.setDirection){videoTransceiver.setDirection("inactive")}else{videoTransceiver.direction="inactive"}Janus$1.log("Setting video transceiver to inactive:",videoTransceiver)}catch(e){Janus$1.error(e)}}}else{if(videoSend&&videoRecv){if(videoTransceiver){try{if(videoTransceiver.setDirection){videoTransceiver.setDirection("sendrecv")}else{videoTransceiver.direction="sendrecv"}Janus$1.log("Setting video transceiver to sendrecv:",videoTransceiver)}catch(e){Janus$1.error(e)}}}else if(videoSend&&!videoRecv){if(videoTransceiver){try{if(videoTransceiver.setDirection){videoTransceiver.setDirection("sendonly")}else{videoTransceiver.direction="sendonly"}Janus$1.log("Setting video transceiver to sendonly:",videoTransceiver)}catch(e){Janus$1.error(e)}}}else if(!videoSend&&videoRecv){if(videoTransceiver){try{if(videoTransceiver.setDirection){videoTransceiver.setDirection("recvonly")}else{videoTransceiver.direction="recvonly"}Janus$1.log("Setting video transceiver to recvonly:",videoTransceiver)}catch(e){Janus$1.error(e)}}else{videoTransceiver=config.pc.addTransceiver("video",{direction:"recvonly"});Janus$1.log("Adding recvonly video transceiver:",videoTransceiver)}}}}else{if(Janus$1.webRTCAdapter.browserDetails.browser=="firefox"||Janus$1.webRTCAdapter.browserDetails.browser=="edge"){mediaConstraints={offerToReceiveAudio:isAudioRecvEnabled(media),offerToReceiveVideo:isVideoRecvEnabled(media)}}else{mediaConstraints={mandatory:{OfferToReceiveAudio:isAudioRecvEnabled(media),OfferToReceiveVideo:isVideoRecvEnabled(media)}}}}Janus$1.debug(mediaConstraints);var sendVideo=isVideoSendEnabled(media);if(sendVideo&&simulcast&&Janus$1.webRTCAdapter.browserDetails.browser==="firefox"){Janus$1.log("Enabling Simulcasting for Firefox (RID)");var sender=config.pc.getSenders()[1];Janus$1.log(sender);var parameters=sender.getParameters();Janus$1.log(parameters);var maxBitrates=getMaxBitrates(callbacks.simulcastMaxBitrates);sender.setParameters({encodings:[{rid:"high",active:true,priority:"high",maxBitrate:maxBitrates.high},{rid:"medium",active:true,priority:"medium",maxBitrate:maxBitrates.medium},{rid:"low",active:true,priority:"low",maxBitrate:maxBitrates.low}]})}config.pc.createAnswer(mediaConstraints).then(function(answer){Janus$1.debug(answer);var jsep={type:answer.type,sdp:answer.sdp};callbacks.customizeSdp(jsep);answer.sdp=jsep.sdp;Janus$1.log("Setting local description");if(sendVideo&&simulcast){if(Janus$1.webRTCAdapter.browserDetails.browser==="chrome"){Janus$1.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it")}else if(Janus$1.webRTCAdapter.browserDetails.browser!=="firefox"){Janus$1.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")}}config.mySdp=answer.sdp;config.pc.setLocalDescription(answer)["catch"](callbacks.error);config.mediaConstraints=mediaConstraints;if(!config.iceDone&&!config.trickle){Janus$1.log("Waiting for all candidates...");return}callbacks.success(answer)},callbacks.error)}function sendSDP(handleId,callbacks){callbacks=callbacks||{};callbacks.success=typeof callbacks.success=="function"?callbacks.success:Janus$1.noop;callbacks.error=typeof callbacks.error=="function"?callbacks.error:Janus$1.noop;var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle, not sending anything");return}var config=pluginHandle.webrtcStuff;Janus$1.log("Sending offer/answer SDP...");if(config.mySdp===null||config.mySdp===undefined){Janus$1.warn("Local SDP instance is invalid, not sending anything...");return}config.mySdp={type:config.pc.localDescription.type,sdp:config.pc.localDescription.sdp};if(config.trickle===false)config.mySdp["trickle"]=false;Janus$1.debug(callbacks);config.sdpSent=true;callbacks.success(config.mySdp)}function _getVolume(handleId,remote){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");return 0}var stream=remote?"remote":"local";var config=pluginHandle.webrtcStuff;if(!config.volume[stream])config.volume[stream]={value:0};if(config.pc.getStats&&Janus$1.webRTCAdapter.browserDetails.browser==="chrome"){if(remote&&(config.remoteStream===null||config.remoteStream===undefined)){Janus$1.warn("Remote stream unavailable");return 0}else if(!remote&&(config.myStream===null||config.myStream===undefined)){Janus$1.warn("Local stream unavailable");return 0}if(config.volume[stream].timer===null||config.volume[stream].timer===undefined){Janus$1.log("Starting "+stream+" volume monitor");config.volume[stream].timer=setInterval(function(){config.pc.getStats(function(stats){var results=stats.result();for(var i=0;i<results.length;i++){var res=results[i];if(res.type=="ssrc"){if(remote&&res.stat("audioOutputLevel"))config.volume[stream].value=parseInt(res.stat("audioOutputLevel"));else if(!remote&&res.stat("audioInputLevel"))config.volume[stream].value=parseInt(res.stat("audioInputLevel"))}}})},200);return 0}return config.volume[stream].value}else{Janus$1.warn("Getting the "+stream+" volume unsupported by browser");return 0}}function isMuted(handleId,video){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");return true}var config=pluginHandle.webrtcStuff;if(config.pc===null||config.pc===undefined){Janus$1.warn("Invalid PeerConnection");return true}if(config.myStream===undefined||config.myStream===null){Janus$1.warn("Invalid local MediaStream");return true}if(video){if(config.myStream.getVideoTracks()===null||config.myStream.getVideoTracks()===undefined||config.myStream.getVideoTracks().length===0){Janus$1.warn("No video track");return true}return!config.myStream.getVideoTracks()[0].enabled}else{if(config.myStream.getAudioTracks()===null||config.myStream.getAudioTracks()===undefined||config.myStream.getAudioTracks().length===0){Janus$1.warn("No audio track");return true}return!config.myStream.getAudioTracks()[0].enabled}}function mute(handleId,video,mute){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");return false}var config=pluginHandle.webrtcStuff;if(config.pc===null||config.pc===undefined){Janus$1.warn("Invalid PeerConnection");return false}if(config.myStream===undefined||config.myStream===null){Janus$1.warn("Invalid local MediaStream");return false}if(video){if(config.myStream.getVideoTracks()===null||config.myStream.getVideoTracks()===undefined||config.myStream.getVideoTracks().length===0){Janus$1.warn("No video track");return false}config.myStream.getVideoTracks()[0].enabled=mute?false:true;return true}else{if(config.myStream.getAudioTracks()===null||config.myStream.getAudioTracks()===undefined||config.myStream.getAudioTracks().length===0){Janus$1.warn("No audio track");return false}config.myStream.getAudioTracks()[0].enabled=mute?false:true;return true}}function _getNetworkQuality(handleId,callbacks){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");return"Invalid handle"}var config=pluginHandle.webrtcStuff;if(config.pc===null||config.pc===undefined)return"Invalid PeerConnection";if(config.pc.getStats){config.pc.getStats().then(function(stats){stats.forEach(function(res){if(!res)return;var inStats=false;if((res.mediaType==="video"||res.id.toLowerCase().indexOf("video")>-1)&&res.type==="inbound-rtp"&&res.id.indexOf("rtcp")<0){inStats=true}else if(res.type=="ssrc"&&res.bytesReceived&&(res.googCodecName==="VP8"||res.googCodecName==="")){inStats=true}if(inStats){callbacks&&callbacks(res);config.bitrate.bsnow=res.bytesReceived;config.bitrate.tsnow=res.timestamp;if(config.bitrate.bsbefore===null||config.bitrate.tsbefore===null){config.bitrate.bsbefore=config.bitrate.bsnow;config.bitrate.tsbefore=config.bitrate.tsnow}else{var timePassed=config.bitrate.tsnow-config.bitrate.tsbefore;if(Janus$1.webRTCAdapter.browserDetails.browser=="safari")timePassed=timePassed/1e3;var bitRate=Math.round((config.bitrate.bsnow-config.bitrate.bsbefore)*8/timePassed);if(Janus$1.webRTCAdapter.browserDetails.browser==="safari")bitRate=parseInt(bitRate/1e3);config.bitrate.value=bitRate+" kbits/sec";config.bitrate.bsbefore=config.bitrate.bsnow;config.bitrate.tsbefore=config.bitrate.tsnow}}})})}else{Janus$1.warn("Getting the video bitrate unsupported by browser");return"Feature unsupported by browser"}}function _getBitrate(handleId){var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined||pluginHandle.webrtcStuff===null||pluginHandle.webrtcStuff===undefined){Janus$1.warn("Invalid handle");return"Invalid handle"}var config=pluginHandle.webrtcStuff;if(config.pc===null||config.pc===undefined)return"Invalid PeerConnection";if(config.pc.getStats){if(config.bitrate.timer===null||config.bitrate.timer===undefined){Janus$1.log("Starting bitrate timer (via getStats)");config.bitrate.timer=setInterval(function(){config.pc.getStats().then(function(stats){stats.forEach(function(res){if(!res)return;var inStats=false;if((res.mediaType==="video"||res.id.toLowerCase().indexOf("video")>-1)&&res.type==="inbound-rtp"&&res.id.indexOf("rtcp")<0){inStats=true}else if(res.type=="ssrc"&&res.bytesReceived&&(res.googCodecName==="VP8"||res.googCodecName==="")){inStats=true}if(inStats){config.bitrate.bsnow=res.bytesReceived;config.bitrate.tsnow=res.timestamp;if(config.bitrate.bsbefore===null||config.bitrate.tsbefore===null){config.bitrate.bsbefore=config.bitrate.bsnow;config.bitrate.tsbefore=config.bitrate.tsnow}else{var timePassed=config.bitrate.tsnow-config.bitrate.tsbefore;if(Janus$1.webRTCAdapter.browserDetails.browser=="safari")timePassed=timePassed/1e3;var bitRate=Math.round((config.bitrate.bsnow-config.bitrate.bsbefore)*8/timePassed);if(Janus$1.webRTCAdapter.browserDetails.browser==="safari")bitRate=parseInt(bitRate/1e3);config.bitrate.value=bitRate+" kbits/sec";config.bitrate.bsbefore=config.bitrate.bsnow;config.bitrate.tsbefore=config.bitrate.tsnow}}})})},1e3);return"0 kbits/sec"}return config.bitrate.value}else{Janus$1.warn("Getting the video bitrate unsupported by browser");return"Feature unsupported by browser"}}function webrtcError(error){Janus$1.error("WebRTC error:",error)}function cleanupWebrtc(handleId,hangupRequest){Janus$1.log("Cleaning WebRTC stuff");var pluginHandle=pluginHandles[handleId];if(pluginHandle===null||pluginHandle===undefined){return}var config=pluginHandle.webrtcStuff;if(config!==null&&config!==undefined){if(hangupRequest===true){var request={rtcgw:"hangup",transaction:Janus$1.randomString(12)};if(pluginHandle.token!==null&&pluginHandle.token!==undefined)request["token"]=pluginHandle.token;if(apisecret!==null&&apisecret!==undefined)request["apisecret"]=apisecret;Janus$1.debug("Sending hangup request (handle="+handleId+"):");Janus$1.debug(request);if(websockets){request["session_id"]=sessionId;request["handle_id"]=handleId;ws.send(JSON.stringify(request))}else{Janus$1.httpAPICall(server+"/"+sessionId+"/"+handleId,{verb:"POST",withCredentials:withCredentials,body:request})}}config.remoteStream=null;if(config.volume){if(config.volume["local"]&&config.volume["local"].timer)clearInterval(config.volume["local"].timer);if(config.volume["remote"]&&config.volume["remote"].timer)clearInterval(config.volume["remote"].timer)}config.volume={};if(config.bitrate.timer)clearInterval(config.bitrate.timer);config.bitrate.timer=null;config.bitrate.bsnow=null;config.bitrate.bsbefore=null;config.bitrate.tsnow=null;config.bitrate.tsbefore=null;config.bitrate.value=null;try{if(!config.streamExternal&&config.myStream!==null&&config.myStream!==undefined){Janus$1.log("Stopping local stream tracks");var tracks=config.myStream.getTracks();for(var i in tracks){var mst=tracks[i];Janus$1.log(mst);if(mst!==null&&mst!==undefined)mst.stop()}}}catch(e){}config.streamExternal=false;config.myStream=null;try{config.pc.close()}catch(e){}config.pc=null;config.candidates=null;config.mySdp=null;config.remoteSdp=null;config.iceDone=false;config.dataChannel={};config.dtmfSender=null}pluginHandle.oncleanup()}function mungeSdpForSimulcasting(sdp){var lines=sdp.split("\r\n");var video=false;var ssrc=[-1],ssrc_fid=[-1];var cname=null,msid=null,mslabel=null,label=null;var insertAt=-1;for(var i=0;i<lines.length;i++){var mline=lines[i].match(/m=(\w+) */);if(mline){var medium=mline[1];if(medium==="video"){if(ssrc[0]<0){video=true}else{insertAt=i;break}}else{if(ssrc[0]>-1){insertAt=i;break}}continue}if(!video)continue;var fid=lines[i].match(/a=ssrc-group:FID (\d+) (\d+)/);if(fid){ssrc[0]=fid[1];ssrc_fid[0]=fid[2];lines.splice(i,1);i--;continue}if(ssrc[0]){var match=lines[i].match("a=ssrc:"+ssrc[0]+" cname:(.+)");if(match){cname=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" msid:(.+)");if(match){msid=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" mslabel:(.+)");if(match){mslabel=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" label:(.+)");if(match){label=match[1]}if(lines[i].indexOf("a=ssrc:"+ssrc_fid[0])===0){lines.splice(i,1);i--;continue}if(lines[i].indexOf("a=ssrc:"+ssrc[0])===0){lines.splice(i,1);i--;continue}}if(lines[i].length==0){lines.splice(i,1);i--;continue}}if(ssrc[0]<0){insertAt=-1;video=false;for(var i=0;i<lines.length;i++){var mline=lines[i].match(/m=(\w+) */);if(mline){var medium=mline[1];if(medium==="video"){if(ssrc[0]<0){video=true}else{insertAt=i;break}}else{if(ssrc[0]>-1){insertAt=i;break}}continue}if(!video)continue;if(ssrc[0]<0){var value=lines[i].match(/a=ssrc:(\d+)/);if(value){ssrc[0]=value[1];lines.splice(i,1);i--;continue}}else{var match=lines[i].match("a=ssrc:"+ssrc[0]+" cname:(.+)");if(match){cname=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" msid:(.+)");if(match){msid=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" mslabel:(.+)");if(match){mslabel=match[1]}match=lines[i].match("a=ssrc:"+ssrc[0]+" label:(.+)");if(match){label=match[1]}if(lines[i].indexOf("a=ssrc:"+ssrc_fid[0])===0){lines.splice(i,1);i--;continue}if(lines[i].indexOf("a=ssrc:"+ssrc[0])===0){lines.splice(i,1);i--;continue}}if(lines[i].length==0){lines.splice(i,1);i--;continue}}}if(ssrc[0]<0){Janus$1.warn("Couldn't find the video SSRC, simulcasting NOT enabled");return sdp}if(insertAt<0){insertAt=lines.length}ssrc[1]=Math.floor(Math.random()*4294967295);ssrc[2]=Math.floor(Math.random()*4294967295);ssrc_fid[1]=Math.floor(Math.random()*4294967295);ssrc_fid[2]=Math.floor(Math.random()*4294967295);for(var i=0;i<ssrc.length;i++){if(cname){lines.splice(insertAt,0,"a=ssrc:"+ssrc[i]+" cname:"+cname);insertAt++}if(msid){lines.splice(insertAt,0,"a=ssrc:"+ssrc[i]+" msid:"+msid);insertAt++}if(mslabel){lines.splice(insertAt,0,"a=ssrc:"+ssrc[i]+" mslabel:"+mslabel);insertAt++}if(label){lines.splice(insertAt,0,"a=ssrc:"+ssrc[i]+" label:"+label);insertAt++}if(cname){lines.splice(insertAt,0,"a=ssrc:"+ssrc_fid[i]+" cname:"+cname);insertAt++}if(msid){lines.splice(insertAt,0,"a=ssrc:"+ssrc_fid[i]+" msid:"+msid);insertAt++}if(mslabel){lines.splice(insertAt,0,"a=ssrc:"+ssrc_fid[i]+" mslabel:"+mslabel);insertAt++}if(label){lines.splice(insertAt,0,"a=ssrc:"+ssrc_fid[i]+" label:"+label);insertAt++}}lines.splice(insertAt,0,"a=ssrc-group:FID "+ssrc[2]+" "+ssrc_fid[2]);lines.splice(insertAt,0,"a=ssrc-group:FID "+ssrc[1]+" "+ssrc_fid[1]);lines.splice(insertAt,0,"a=ssrc-group:FID "+ssrc[0]+" "+ssrc_fid[0]);lines.splice(insertAt,0,"a=ssrc-group:SIM "+ssrc[0]+" "+ssrc[1]+" "+ssrc[2]);sdp=lines.join("\r\n");if(!sdp.endsWith("\r\n"))sdp+="\r\n";return sdp}function isAudioSendEnabled(media){Janus$1.debug("isAudioSendEnabled:",media);if(media===undefined||media===null)return true;if(media.audio===false)return false;if(media.audioSend===undefined||media.audioSend===null)return true;return media.audioSend===true}function isAudioSendRequired(media){Janus$1.debug("isAudioSendRequired:",media);if(media===undefined||media===null)return false;if(media.audio===false||media.audioSend===false)return false;if(media.failIfNoAudio===undefined||media.failIfNoAudio===null)return false;return media.failIfNoAudio===true}function isAudioRecvEnabled(media){Janus$1.debug("isAudioRecvEnabled:",media);if(media===undefined||media===null)return true;if(media.audio===false)return false;if(media.audioRecv===undefined||media.audioRecv===null)return true;return media.audioRecv===true}function isVideoSendEnabled(media){Janus$1.debug("isVideoSendEnabled:",media);if(media===undefined||media===null)return true;if(media.video===false)return false;if(media.videoSend===undefined||media.videoSend===null)return true;return media.videoSend===true}function isVideoSendRequired(media){Janus$1.debug("isVideoSendRequired:",media);if(media===undefined||media===null)return false;if(media.video===false||media.videoSend===false)return false;if(media.failIfNoVideo===undefined||media.failIfNoVideo===null)return false;return media.failIfNoVideo===true}function isVideoRecvEnabled(media){Janus$1.debug("isVideoRecvEnabled:",media);if(media===undefined||media===null)return true;if(media.video===false)return false;if(media.videoRecv===undefined||media.videoRecv===null)return true;return media.videoRecv===true}function isScreenSendEnabled(media){Janus$1.debug("isScreenSendEnabled:",media);if(media===undefined||media===null)return false;if(_typeof(media.video)!=="object"||_typeof(media.video.mandatory)!=="object")return false;var constraints=media.video.mandatory;if(constraints.chromeMediaSource)return constraints.chromeMediaSource==="desktop"||constraints.chromeMediaSource==="screen";else if(constraints.mozMediaSource)return constraints.mozMediaSource==="window"||constraints.mozMediaSource==="screen";else if(constraints.mediaSource)return constraints.mediaSource==="window"||constraints.mediaSource==="screen";return false}function isDataEnabled(media){Janus$1.debug("isDataEnabled:",media);if(Janus$1.webRTCAdapter.browserDetails.browser=="edge"){Janus$1.warn("Edge doesn't support data channels yet");return false}if(media===undefined||media===null)return false;return media.data===true}function isTrickleEnabled(trickle){Janus$1.debug("isTrickleEnabled:",trickle);if(trickle===undefined||trickle===null)return true;return trickle===true}}window.Janus=Janus$1;var werbrtcInfo={version:"V1.0",apiDomain:"https://open.ys7.com"};var listenList={};var listen=function listen(key,fn){if(!listenList[key]){listenList[key]=[]}listenList[key].push(fn)};var trigger=function trigger(){var key=Array.prototype.shift.call(arguments),fns=listenList[key];if(!fns||fns.length===0)return false;for(var i=0,fn;fn=fns[i];i++){fn.apply(this,arguments)}};function deffer(){var deferred={};deferred.promise=new Promise(function(resolve,reject){deferred.resolve=resolve;deferred.reject=reject});return deferred}var EZWebRtc=function(){function EZWebRtc(_params){_classCallCheck$1(this,EZWebRtc);_defineProperty(this,"subscribe",function(params){var _deffer=deffer();var body={cmdType:"subremote",streamtype:params.type,customId:params.clientId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId};var remoteFeed=null;window["ezuikit-webrtc"].opt.janus.attach({plugin:"rtcgw.plugin.sts",opaqueId:window["ezuikit-webrtc"].opt.opaqueId,success:function success(pluginHandle){console.log("pluginHandle",pluginHandle);if(params.type==8){window["ezuikit-webrtc"].opt.subscribeScreenHandle=pluginHandle}else{window["ezuikit-webrtc"].opt["".concat(params.clientId)]=pluginHandle;if(params.type==1){window["ezuikit-webrtc"].opt["".concat(params.clientId)].send({message:{cmdType:"unsubremote",streamtype:2,customId:params.clientId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId},success:function success(){},error:function error(_error){}})}}remoteFeed=pluginHandle;remoteFeed.createOffer({media:{videoSend:false,audioSend:false,audioRecv:true,videoRecv:true,audio:true,video:true,data:false},simulcast:false,simulcast2:false,success:function success(jsep){Janus.debug("remoteFeed createOffer Got SDP!");Janus.debug(jsep);remoteFeed.send({message:body,jsep:jsep})},error:function error(_error2){Janus.error("remoteFeed WebRTC error:",_error2);_deffer.reject(_error2)}})},error:function error(_error3){console.error("  -- Error attaching plugin...",_error3);_deffer.reject(_error3)},consentDialog:function consentDialog(on){Janus.debug("Consent dialog should be "+(on?"on":"off")+" now")},iceState:function iceState(state){Janus.log("ICE state changed to "+state);switch(state){case"connected":console.log("ice connect success");break;case"disconnected":console.log("ice connect loss");break}},mediaState:function mediaState(medium,on){Janus.log("Janus "+(on?"started":"stopped")+" receiving our "+medium)},webrtcState:function webrtcState(on){Janus.log("Janus says our WebRTC PeerConnection is "+(on?"up":"down")+" now")},slowLink:function slowLink(uplink,lost){Janus.warn("Janus reports problems "+(uplink?"sending":"receiving")+" packets on this PeerConnection ("+lost+" lost packets)")},onmessage:function onmessage(msg,jsep){Janus.debug(" ::: Got a message :::");Janus.debug(msg);if(jsep!==undefined&&jsep!==null){Janus.debug("Handling SDP as well...");Janus.debug(jsep);remoteFeed.handleRemoteJsep({jsep:jsep})}if(msg["rtcgw"]==="subremoteack"){trigger("subremoteack",msg)}},onlocalstream:function onlocalstream(stream){},onremotestream:function onremotestream(stream){console.log("remoteStream==================================",stream);var msg={clientId:params.clientId,stream:stream,streamType:params.type};_deffer.resolve(msg);trigger("remoteStream",msg)},ondataopen:function ondataopen(data){Janus.log("The DataChannel is available!")},ondata:function ondata(data){Janus.debug("We got data from the DataChannel! "+data)},oncleanup:function oncleanup(){Janus.log(" ::: Got a cleanup notification :::")}});return _deffer.promise});_defineProperty(this,"subscribeStream",function(params){var _deffer=deffer();var body={cmdType:"resumesubremote",streamtype:params.type,customId:params.clientId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId};if(window["ezuikit-webrtc"].opt["".concat(params.clientId)]){window["ezuikit-webrtc"].opt["".concat(params.clientId)].send({message:body,success:function success(){_deffer.resolve("success")},error:function error(_error4){_deffer.reject(_error4)}})}return _deffer.promise});_defineProperty(this,"unsubscribe",function(params){var _deffer=deffer();var body={cmdType:"unsubremote",streamtype:params.type,customId:params.clientId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId};if(params.type==8){window["ezuikit-webrtc"].opt.subscribeScreenHandle.send({message:body,success:function success(){window["ezuikit-webrtc"].opt.subscribeScreenHandle.detach({noRequest:false,success:function success(){_deffer.resolve("success")}})},error:function error(_error5){_deffer.reject(_error5)}})}else{window["ezuikit-webrtc"].opt["".concat(params.clientId)].send({message:body,success:function success(){if(params.type==3){window["ezuikit-webrtc"].opt["".concat(params.clientId)].detach({noRequest:false,success:function success(){_deffer.resolve("success")}})}else{_deffer.resolve("success")}},error:function error(_error6){_deffer.reject(_error6)}})}return _deffer.promise});_defineProperty(this,"unsubscribeStream",function(params){var _deffer=deffer();var body={cmdType:"pausesubremote",streamtype:params.type,customId:params.clientId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId};window["ezuikit-webrtc"].opt["".concat(params.clientId)].send({message:body,success:function success(){_deffer.resolve("success")},error:function error(_error7){_deffer.reject(_error7)}});return _deffer.promise});_defineProperty(this,"listen",function(){return listen.apply(void 0,arguments)});this.initEZWEBPlayer(_params)}_createClass$1(EZWebRtc,[{key:"initEZWEBPlayer",value:function initEZWEBPlayer(params){console.log("params",params);window["ezuikit-webrtc"]={opt:{roomParams:{room:0,userId:params.userId,video:1,internalRoomId:null,roomId:params.roomId,clientId:null,rtctoken:params.rtctoken},janus:null,mainHandle:null,sts:null,screenHandle:null,subscribeScreenHandle:null,opaqueId:"sts-"+Janus.randomString(12),localStreamType:null,server:null,accessToken:params.accessToken,stream:"",screenStream:null,apiDomain:werbrtcInfo.apiDomain,cln:{local:{username:"",client_id:""}}},videoParams:{},audioParams:{},cameraId:null,microphoneId:null,bitrate:1e5,frameRate:15,width:320,height:240};request("".concat(werbrtcInfo.apiDomain,"/api/v3/rtc/wss"),"POST",{appId:params.appId,roomId:params.roomId,customId:params.userId,accessToken:params.accessToken},{"Content-Type":"application/x-www-form-urlencoded",accessToken:params.accessToken},logSuccess);function logSuccess(data){console.log("data",data);if(data.meta.code!=200){params.handleError(data.meta);return}var _data$data=data.data;_data$data.clientId;var domain=_data$data.domain;_data$data.internalRoomId;var wssPath=_data$data.wssPath;window["ezuikit-webrtc"].opt.server="wss://".concat(domain,"/").concat(wssPath);window["ezuikit-webrtc"].opt.roomParams.internalRoomId=data.data.internalRoomId;window["ezuikit-webrtc"].opt.roomParams.clientId=data.data.clientId;var Janusparams={token:"token=".concat(params.rtctoken,"&userId=").concat(params.userId,"&roomId=").concat(params.roomId,"&appId=").concat(params.appId),authtype:23};Janus.init({debug:"all",callback:function callback(){window["ezuikit-webrtc"].opt.janus=new Janus({server:window["ezuikit-webrtc"].opt.server,success:function success(sessionId){if(sessionId){params.onMessage(sessionId)}},error:function error(_error8){params.handleError(_error8)},destroyed:function destroyed(){}},Janusparams)}})}}},{key:"getVersion",value:function getVersion(){var _deffer=deffer();{_deffer.resolve(werbrtcInfo.version)}return _deffer.promise}},{key:"getSupport",value:function getSupport(){var _deffer=deffer();var obj={isWebrtcSupport:true,isH264Support:true};var myVideo=document.createElement("video");if(myVideo.canPlayType){if(myVideo.canPlayType("video/mp4;codecs=“avc1.64001E”")){obj.isH264Support=true}else{obj.isH264Support=false}}if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia){obj.isWebrtcSupport=true;_deffer.resolve(obj)}else{obj.isWebrtcSupport=false;_deffer.reject(obj)}return _deffer.promise}},{key:"getMediaList",value:function getMediaList(){var _deffer=deffer();if(navigator.mediaDevices){navigator.mediaDevices.enumerateDevices().then(function(devices){_deffer.resolve(devices)})}else{_deffer.reject("no devices")}return _deffer.promise}},{key:"getCamerasList",value:function getCamerasList(){var _deffer=deffer();if(navigator.mediaDevices){navigator.mediaDevices.enumerateDevices().then(function(devices){var arr=[];devices.map(function(item){if(item.kind=="videoinput"){arr.push(item)}});_deffer.resolve(arr)})}else{_deffer.reject("no devices")}return _deffer.promise}},{key:"getMicrophonesList",value:function getMicrophonesList(){var _deffer=deffer();if(navigator.mediaDevices){navigator.mediaDevices.enumerateDevices().then(function(devices){var arr=[];devices.map(function(item){if(item.kind=="audioinput"){arr.push(item)}});_deffer.resolve(arr)})}else{_deffer.reject("no devices")}return _deffer.promise}},{key:"getSpeakersList",value:function getSpeakersList(){var _deffer=deffer();if(navigator.mediaDevices){navigator.mediaDevices.enumerateDevices().then(function(devices){var arr=[];devices.map(function(item){if(item.kind=="audiooutput"){arr.push(item)}});_deffer.resolve(arr)})}else{_deffer.reject("no devices")}return _deffer.promise}},{key:"play",value:function play(params){var _deffer=deffer();var localVideo=document.getElementById(params.domId);var localStream=window["ezuikit-webrtc"].opt.cln.local.stream;Janus.attachMediaStream(localVideo,localStream);localVideo.play();if(document.getElementById(params.domId)){_deffer.resolve("success")}else{_deffer.reject("no video dom")}return _deffer.promise}},{key:"leaveRoom",value:function leaveRoom(params){var _deffer=deffer();var body={cmdType:"exitRoom",customId:window["ezuikit-webrtc"].opt.roomParams.userId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId};window["ezuikit-webrtc"].opt.mainHandle.send({message:body,success:function success(){window["ezuikit-webrtc"].opt.janus.destroy({success:function success(){}});_deffer.resolve("success")},error:function error(_error9){console.error("  -- Error attaching plugin...",_error9);_deffer.reject(_error9)}});return _deffer.promise}},{key:"setCameraDevice",value:function setCameraDevice(params){var _deffer=deffer();window["ezuikit-webrtc"].cameraId=params.deviceId;if(window["ezuikit-webrtc"].opt.sts){window["ezuikit-webrtc"].opt.sts.createOffer({media:{video:{deviceId:params.deviceId},replaceVideo:true,audio:window["ezuikit-webrtc"].opt.localStreamType==1?false:true},simulcast:false,simulcast2:false,bitrate:window["ezuikit-webrtc"].bitrate,frameRate:window["ezuikit-webrtc"].frameRate,success:function success(jsep){console.log("createOffersuccess");Janus.debug("Got SDP!");Janus.debug(jsep);_deffer.resolve("success")},error:function error(_error10){console.log("createOffererror");Janus.error("WebRTC error:",_error10);_deffer.reject(_error10)}})}return _deffer.promise}},{key:"setMicrophoneDevice",value:function setMicrophoneDevice(params){var _deffer=deffer();window["ezuikit-webrtc"].microphoneId=params.deviceId;if(window["ezuikit-webrtc"].opt.sts){window["ezuikit-webrtc"].opt.sts.createOffer({media:{audio:{deviceId:params.deviceId},replaceAudio:true,video:window["ezuikit-webrtc"].opt.localStreamType==2?false:true},simulcast:false,simulcast2:false,bitrate:window["ezuikit-webrtc"].bitrate,frameRate:window["ezuikit-webrtc"].frameRate,success:function success(jsep){console.log("createOffersuccess");Janus.debug("Got SDP!");Janus.debug(jsep);_deffer.resolve("success")},error:function error(_error11){console.log("createOffererror");Janus.error("WebRTC error:",_error11);_deffer.reject(_error11)}})}return _deffer.promise}},{key:"setVideoProfile",value:function setVideoProfile(data){var _deffer=deffer();var params={video:{width:data.video.width||360,height:data.video.height||640,frameRate:data.video.frameRate},bitrate:data.video.bitrate||5e5,id:data.id};window["ezuikit-webrtc"].videoParams=params.video;window["ezuikit-webrtc"].bitrate=params.bitrate*1e3;window["ezuikit-webrtc"].frameRate=data.video.frameRate;window["ezuikit-webrtc"].width=data.video.width;window["ezuikit-webrtc"].height=data.video.height;_deffer.resolve("success");return _deffer.promise}},{key:"setAudioProfile",value:function setAudioProfile(data){var params={audio:{deviceId:window["ezuikit-webrtc"].cameraId,sampleRate:data.audio.sampleRate||"32000HZ",sampleSize:data.audio.sampleSize||16,channelCount:data.audio.channelCount||1},id:data.id};window["ezuikit-webrtc"].audioParams=params.audio;console.log("window['ezuikit-webrtc'].videoParams",window["ezuikit-webrtc"])}},{key:"joinRoom",value:function joinRoom(params){var _deffer=deffer();window["ezuikit-webrtc"].opt.janus.attach({plugin:"rtcgw.plugin.sts",opaqueId:window["ezuikit-webrtc"].opt.opaqueId,success:function success(pluginHandle){console.log("pluginHandle",pluginHandle);window["ezuikit-webrtc"].opt.mainHandle=pluginHandle;Janus.debug("Trying a createOffer too (audio/video sendrecv)");var body={cmdType:"enterRoom",customId:window["ezuikit-webrtc"].opt.roomParams.userId,clientId:window["ezuikit-webrtc"].opt.roomParams.clientId,strroomId:window["ezuikit-webrtc"].opt.roomParams.roomId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId,authtype:23,authentication:window["ezuikit-webrtc"].opt.roomParams.rtctoken};pluginHandle.send({message:body});_deffer.resolve(pluginHandle.id)},error:function error(_error12){console.error("  -- Error attaching plugin...",_error12);_deffer.reject(_error12)},consentDialog:function consentDialog(on){Janus.debug("Consent dialog should be "+(on?"on":"off")+" now")},iceState:function iceState(state){Janus.log("ICE state changed to "+state);switch(state){case"connected":console.log("ice connect success");break;case"disconnected":console.log("ice connect loss");break}},mediaState:function mediaState(medium,on){Janus.log("Janus "+(on?"started":"stopped")+" receiving our "+medium)},webrtcState:function webrtcState(on){Janus.log("Janus says our WebRTC PeerConnection is "+(on?"up":"down")+" now")},slowLink:function slowLink(uplink,lost){Janus.warn("Janus reports problems "+(uplink?"sending":"receiving")+" packets on this PeerConnection ("+lost+" lost packets)")},onmessage:function onmessage(msg,jsep){Janus.debug(" ::: Got a message :::");Janus.debug(msg);if(jsep!==undefined&&jsep!==null){Janus.debug("Handling SDP as well...");Janus.debug(jsep);window["ezuikit-webrtc"].opt.mainHandle.handleRemoteJsep({jsep:jsep})}var result=msg["result"];if(result!==null&&result!==undefined){if(result==="done"){return}result["status"]}if(msg["rtcgw"]==="enterRoomack"){trigger("enterRoomack",msg)}if(msg["rtcgw"]==="clientJoin"){trigger("clientJoin",msg)}if(msg["rtcgw"]==="clientLeave"){trigger("clientLeave",msg)}if(msg["rtcgw"]==="stream-added"){trigger("steam-added",msg)}if(msg["rtcgw"]==="stream-removed"){trigger("stream-removed",msg)}if(msg["rtcgw"]==="audioleve"){trigger("audioleve",msg)}if(msg["rtcgw"]==="networkquality"){trigger("networkquality",msg)}if(msg["rtcgw"]==="error"){trigger("error",msg)}if(msg["rtcgw"]==="audioleve"){trigger("audioleve",msg)}if(msg["rtcgw"]==="publishlocalstreamack"){trigger("publishlocalstreamack",msg)}if(msg["rtcgw"]==="subremoteack"){trigger("subremoteack",msg)}},onlocalstream:function onlocalstream(stream){console.log("onlocalstream",stream);Janus.debug(" ::: Got a local stream :::");Janus.debug(stream);window["ezuikit-webrtc"].opt.cln.local.stream=stream},onremotestream:function onremotestream(stream){},ondataopen:function ondataopen(data){Janus.log("The DataChannel is available!")},ondata:function ondata(data){Janus.debug("We got data from the DataChannel! "+data)},oncleanup:function oncleanup(){Janus.log(" ::: Got a cleanup notification :::")}});return _deffer.promise}},{key:"getLocalStream",value:function getLocalStream(params){var _deffer=deffer();if(window["ezuikit-webrtc"].opt.cln.local.stream){_deffer.resolve(window["ezuikit-webrtc"].opt.cln.local.stream)}else{_deffer.reject("no stream")}return _deffer.promise}},{key:"getScreenStream",value:function getScreenStream(params){var _deffer=deffer();if(window["ezuikit-webrtc"].opt.screenStream){_deffer.resolve(window["ezuikit-webrtc"].opt.screenStream)}else{_deffer.reject("no stream")}return _deffer.promise}},{key:"suspendStream",value:function suspendStream(params){var that=this;that.controlStream(params,"suspend")}},{key:"controlStream",value:function controlStream(params,controlType){var _deffer=deffer();var body={cmdType:controlType=="resume"?"resumelocalstream":"pauselocalstream",streamtype:params.type,customId:window["ezuikit-webrtc"].opt.roomParams.userId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId};if(params.type==2){window["ezuikit-webrtc"].opt.cln.local.stream.getTracks().forEach(function(track){if(track.kind=="audio"){if(controlType=="resume"){track.enabled=true}else{track.enabled=false}}})}if(params.type==1){window["ezuikit-webrtc"].opt.cln.local.stream.getTracks().forEach(function(track){if(track.kind=="video"){if(controlType=="resume"){track.enabled=true}else{track.enabled=false}}})}if(params.type==8){console.log(" window['ezuikit-webrtc'].opt.screenStream.getTracks()",window["ezuikit-webrtc"].opt.screenStream.getTracks());window["ezuikit-webrtc"].opt.screenStream.getTracks().forEach(function(track){if(controlType=="resume"){track.enabled=true}else{track.enabled=false}})}if(params.type==3){window["ezuikit-webrtc"].opt.cln.local.stream.getTracks().forEach(function(track){if(controlType=="resume"){track.enabled=true}else{track.enabled=false}})}if(params.type==8){window["ezuikit-webrtc"].opt.screenHandle.send({message:body,success:function success(){_deffer.resolve("success")},error:function error(_error13){_deffer.reject(_error13)}})}else{window["ezuikit-webrtc"].opt.sts.send({message:body,success:function success(){_deffer.resolve("success")},error:function error(_error14){_deffer.reject(_error14)}})}return _deffer.promise}},{key:"resumeStream",value:function resumeStream(params){var that=this;that.controlStream(params,"resume")}},{key:"publishStream",value:function publishStream(params){var _deffer=deffer();var body={cmdType:"publishlocalstream",streamtype:params.type,customId:window["ezuikit-webrtc"].opt.roomParams.userId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId};if(params.type!=8){window["ezuikit-webrtc"].opt.localStreamType=params.type}({audio:true,video:window["ezuikit-webrtc"].videoParams});var media={videoSend:true,audioSend:true,audioRecv:true,videoRecv:true,data:false,video:"stdres",audio:true};switch(params.type){case 1:media={videoSend:true,audioSend:true,audioRecv:true,videoRecv:true,data:false,video:{deviceId:window["ezuikit-webrtc"].cameraId,width:window["ezuikit-webrtc"].width,height:window["ezuikit-webrtc"].height},audio:false};break;case 2:media={videoSend:true,audioSend:true,audioRecv:true,videoRecv:true,data:false,video:false,audio:{deviceId:window["ezuikit-webrtc"].microphoneId}};break;case 3:media={videoSend:true,audioSend:true,audioRecv:true,videoRecv:true,data:false,video:{deviceId:window["ezuikit-webrtc"].cameraId,width:window["ezuikit-webrtc"].width,height:window["ezuikit-webrtc"].height},audio:{deviceId:window["ezuikit-webrtc"].microphoneId}};break;case 8:media={audioRecv:false,videoRecv:true,data:false,audioSend:false,videoSend:true,video:"screen",screenshareFrameRate:3};break}console.log("media-----------",media);console.log("window['ezuikit-webrtc'].bitrate",window["ezuikit-webrtc"].bitrate);console.log("window['ezuikit-webrtc'].opt.sts",window["ezuikit-webrtc"].opt.sts);if(window["ezuikit-webrtc"].opt.sts&&params.type!=8){window["ezuikit-webrtc"].opt.sts.createOffer({media:media,simulcast:false,simulcast2:false,bitrate:window["ezuikit-webrtc"].bitrate,frameRate:window["ezuikit-webrtc"].frameRate,success:function success(jsep){console.log("createOffersuccess");Janus.debug("Got SDP!");Janus.debug(jsep);window["ezuikit-webrtc"].opt.sts.send({message:body,jsep:jsep});_deffer.resolve("success")},error:function error(_error15){console.log("createOffererror");Janus.error("WebRTC error:",_error15);_deffer.reject(_error15)}})}else{window["ezuikit-webrtc"].opt.janus.attach({plugin:"rtcgw.plugin.sts",opaqueId:window["ezuikit-webrtc"].opt.opaqueId,success:function success(pluginHandle){console.log("pluginHandle",pluginHandle);if(params.type==8){window["ezuikit-webrtc"].opt.screenHandle=pluginHandle}else{window["ezuikit-webrtc"].opt.sts=pluginHandle}Janus.debug("Trying a createOffer too (audio/video sendrecv)");pluginHandle.createOffer({media:media,simulcast:false,simulcast2:false,bitrate:window["ezuikit-webrtc"].bitrate,frameRate:window["ezuikit-webrtc"].frameRate,success:function success(jsep){console.log("createOffersuccess");Janus.debug("Got SDP!");Janus.debug(jsep);pluginHandle.send({message:body,jsep:jsep});_deffer.resolve("success")},error:function error(_error16){console.log("createOffererror");Janus.error("WebRTC error:",_error16);_deffer.reject(_error16)}})},error:function error(_error17){console.error("  -- Error attaching plugin...",_error17);_deffer.reject(_error17)},consentDialog:function consentDialog(on){Janus.debug("Consent dialog should be "+(on?"on":"off")+" now")},iceState:function iceState(state){Janus.log("ICE state changed to "+state);switch(state){case"connected":console.log("ice connect success");break;case"disconnected":console.log("ice connect loss");break}},mediaState:function mediaState(medium,on){Janus.log("Janus "+(on?"started":"stopped")+" receiving our "+medium)},webrtcState:function webrtcState(on){Janus.log("Janus says our WebRTC PeerConnection is "+(on?"up":"down")+" now")},slowLink:function slowLink(uplink,lost){Janus.warn("Janus reports problems "+(uplink?"sending":"receiving")+" packets on this PeerConnection ("+lost+" lost packets)")},onmessage:function onmessage(msg,jsep){console.log("消息回调+++++++++++++++++++++++++++++++++++++++++",msg,jsep);Janus.debug(" ::: Got a message :::");Janus.debug(msg);if(jsep!==undefined&&jsep!==null){Janus.debug("Handling SDP as well...");Janus.debug(jsep);if(params.type==8){window["ezuikit-webrtc"].opt.screenHandle.handleRemoteJsep({jsep:jsep})}else{window["ezuikit-webrtc"].opt.sts.handleRemoteJsep({jsep:jsep})}}},onlocalstream:function onlocalstream(stream){console.log("onlocalstream",stream);Janus.debug(" ::: Got a local stream :::");Janus.debug(stream);if(params.type==8){window["ezuikit-webrtc"].opt.screenStream=stream;stream.getVideoTracks()[0].addEventListener("ended",function(){console.log("停止了屏幕共享-----------------------");var screenBody={cmdType:"unpublishlocalstream",streamtype:8,customId:window["ezuikit-webrtc"].opt.roomParams.userId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId};if(window["ezuikit-webrtc"].opt.screenHandle){window["ezuikit-webrtc"].opt.screenHandle.send({message:screenBody,success:function success(){window["ezuikit-webrtc"].opt.screenHandle.detach({noRequest:false});window["ezuikit-webrtc"].opt.screenHandle=null},error:function error(_error18){}})}})}else{window["ezuikit-webrtc"].opt.cln.local.stream=stream}},onremotestream:function onremotestream(stream){},ondataopen:function ondataopen(data){Janus.log("The DataChannel is available!")},ondata:function ondata(data){Janus.debug("We got data from the DataChannel! "+data)},oncleanup:function oncleanup(){Janus.log(" ::: Got a cleanup notification :::")}})}return _deffer.promise}},{key:"unpublishStream",value:function unpublishStream(params){var _deffer=deffer();var body={cmdType:"unpublishlocalstream",streamtype:3,customId:window["ezuikit-webrtc"].opt.roomParams.userId,roomId:window["ezuikit-webrtc"].opt.roomParams.internalRoomId};if(params.type==8){window["ezuikit-webrtc"].opt.screenHandle.send({message:_objectSpread2(_objectSpread2({},body),{},{streamtype:8}),success:function success(){window["ezuikit-webrtc"].opt.screenHandle.detach({noRequest:false});window["ezuikit-webrtc"].opt.screenHandle=null;_deffer.resolve("success")},error:function error(_error19){_deffer.reject(_error19)}})}else{window["ezuikit-webrtc"].opt.sts.send({message:body,success:function success(){window["ezuikit-webrtc"].opt.sts.detach({noRequest:false});window["ezuikit-webrtc"].opt.sts=null;_deffer.resolve("success")},error:function error(_error20){_deffer.reject(_error20)}})}return _deffer.promise}},{key:"ezwebTrigger",value:function ezwebTrigger(params){var localStream=window["ezuikit-webrtc"].opt.cln.local.stream;var event={stream:localStream,clientId:"cliendId-".concat(Math.random()*20)};trigger("steam-added",event)}},{key:"playRemoteSteam",value:function playRemoteSteam(params){var localVideo=document.getElementById(params.domId);Janus.attachMediaStream(localVideo,params.stream);localVideo.load();var playPromise=localVideo.play();if(playPromise!==undefined){playPromise.then(function(){localVideo.play()})["catch"](function(e){})}}},{key:"getQuality",value:function getQuality(params){window["ezuikit-webrtc"].opt["z3"].getNetworkQuality(params.handleId,function(info){console.log("NetworkQuality",info)})}}]);return EZWebRtc}();var name="ezuikit-js";var maintainers=["jzy"];var version="1.0.2";var description="ezuikit javascript for npm";var main="ezuikit.js";var scripts={test:'echo "Error: no test specified" && exit 1'};var repository={type:"git",url:"git+https://github.com/Hikvision-Ezviz/EZUIKit-JavaScript-npm.git"};var files=["ezuikit_static/","ezuikit.js","README.md","CHANGELOG.md"];var keywords=["video","ezuikit"];var author="yujianbo";var license="ISC";var bugs={url:"https://github.com/Hikvision-Ezviz/EZUIKit-JavaScript-npm/issues"};var homepage="https://github.com/Hikvision-Ezviz/EZUIKit-JavaScript-npm#readme";var pkg={name:name,maintainers:maintainers,version:version,description:description,main:main,scripts:scripts,repository:repository,files:files,keywords:keywords,author:author,license:license,bugs:bugs,homepage:homepage};class ErrorCategoryEnum{static get JS_ERROR(){return"js_error"}static get RESOURCE_ERROR(){return"resource_error"}static get VUE_ERROR(){return"vue_error"}static get PROMISE_ERROR(){return"promise_error"}static get AJAX_ERROR(){return"ajax_error"}static get CONSOLE_INFO(){return"console_info"}static get CONSOLE_WARN(){return"console_warn"}static get CONSOLE_ERROR(){return"console_error"}static get CROSS_SCRIPT_ERROR(){return"cross_srcipt_error"}static get UNKNOW_ERROR(){return"unknow_error"}static get PERFORMANCE(){return"performance"}static get BUSINESS(){return"business"}}class ErrorLevelEnum{static get ERROR(){return"Error"}static get WARN(){return"Warning"}static get INFO(){return"Info"}}class AjaxLibEnum{static get FETCH(){return"fetch"}static get DEFAULT(){return"default"}}var DeviceInfo=function(){var root=typeof self!=="undefined"?self:this;var _window=root||{};var VariableLibrary={navigator:typeof root.navigator!="undefined"?root.navigator:{},infoMap:{engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","360","360SE","360EE","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet","iPad"]}};var MethodLibrary=function(){return{getMatchMap:function(u){return{Trident:u.indexOf("Trident")>-1||u.indexOf("NET CLR")>-1,Presto:u.indexOf("Presto")>-1,WebKit:u.indexOf("AppleWebKit")>-1,Gecko:u.indexOf("Gecko/")>-1,Safari:u.indexOf("Safari")>-1,Chrome:u.indexOf("Chrome")>-1||u.indexOf("CriOS")>-1,IE:u.indexOf("MSIE")>-1||u.indexOf("Trident")>-1,Edge:u.indexOf("Edge")>-1,Firefox:u.indexOf("Firefox")>-1||u.indexOf("FxiOS")>-1,"Firefox Focus":u.indexOf("Focus")>-1,Chromium:u.indexOf("Chromium")>-1,Opera:u.indexOf("Opera")>-1||u.indexOf("OPR")>-1,Vivaldi:u.indexOf("Vivaldi")>-1,Yandex:u.indexOf("YaBrowser")>-1,Arora:u.indexOf("Arora")>-1,Lunascape:u.indexOf("Lunascape")>-1,QupZilla:u.indexOf("QupZilla")>-1,"Coc Coc":u.indexOf("coc_coc_browser")>-1,Kindle:u.indexOf("Kindle")>-1||u.indexOf("Silk/")>-1,Iceweasel:u.indexOf("Iceweasel")>-1,Konqueror:u.indexOf("Konqueror")>-1,Iceape:u.indexOf("Iceape")>-1,SeaMonkey:u.indexOf("SeaMonkey")>-1,Epiphany:u.indexOf("Epiphany")>-1,360:u.indexOf("QihooBrowser")>-1||u.indexOf("QHBrowser")>-1,"360EE":u.indexOf("360EE")>-1,"360SE":u.indexOf("360SE")>-1,UC:u.indexOf("UC")>-1||u.indexOf(" UBrowser")>-1,QQBrowser:u.indexOf("QQBrowser")>-1,QQ:u.indexOf("QQ/")>-1,Baidu:u.indexOf("Baidu")>-1||u.indexOf("BIDUBrowser")>-1,Maxthon:u.indexOf("Maxthon")>-1,Sogou:u.indexOf("MetaSr")>-1||u.indexOf("Sogou")>-1,LBBROWSER:u.indexOf("LBBROWSER")>-1,"2345Explorer":u.indexOf("2345Explorer")>-1,TheWorld:u.indexOf("TheWorld")>-1,XiaoMi:u.indexOf("MiuiBrowser")>-1,Quark:u.indexOf("Quark")>-1,Qiyu:u.indexOf("Qiyu")>-1,Wechat:u.indexOf("MicroMessenger")>-1,Taobao:u.indexOf("AliApp(TB")>-1,Alipay:u.indexOf("AliApp(AP")>-1,Weibo:u.indexOf("Weibo")>-1,Douban:u.indexOf("com.douban.frodo")>-1,Suning:u.indexOf("SNEBUY-APP")>-1,iQiYi:u.indexOf("IqiyiApp")>-1,Windows:u.indexOf("Windows")>-1,Linux:u.indexOf("Linux")>-1||u.indexOf("X11")>-1,"Mac OS":u.indexOf("Macintosh")>-1,Android:u.indexOf("Android")>-1||u.indexOf("Adr")>-1,Ubuntu:u.indexOf("Ubuntu")>-1,FreeBSD:u.indexOf("FreeBSD")>-1,Debian:u.indexOf("Debian")>-1,"Windows Phone":u.indexOf("IEMobile")>-1||u.indexOf("Windows Phone")>-1,BlackBerry:u.indexOf("BlackBerry")>-1||u.indexOf("RIM")>-1,MeeGo:u.indexOf("MeeGo")>-1,Symbian:u.indexOf("Symbian")>-1,iOS:u.indexOf("like Mac OS X")>-1,"Chrome OS":u.indexOf("CrOS")>-1,WebOS:u.indexOf("hpwOS")>-1,Mobile:u.indexOf("Mobi")>-1||u.indexOf("iPh")>-1||u.indexOf("480")>-1,Tablet:u.indexOf("Tablet")>-1||u.indexOf("Nexus 7")>-1,iPad:u.indexOf("iPad")>-1}},matchInfoMap:function(_this){var u=VariableLibrary.navigator.userAgent||{};var match=MethodLibrary.getMatchMap(u);for(var s in VariableLibrary.infoMap){for(var i=0;i<VariableLibrary.infoMap[s].length;i++){var value=VariableLibrary.infoMap[s][i];if(match[value]){_this[s]=value}}}},getOS:function(){var _this=this;MethodLibrary.matchInfoMap(_this);return _this.os},getOSVersion:function(){var _this=this;var u=VariableLibrary.navigator.userAgent||{};_this.osVersion="";var osVersion={Windows:function(){var v=u.replace(/^.*Windows NT ([\d.]+);.*$/,"$1");var oldWindowsVersionMap={6.4:"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP",5.1:"XP","5.0":"2000"};return oldWindowsVersionMap[v]||v},Android:function(){return u.replace(/^.*Android ([\d.]+);.*$/,"$1")},iOS:function(){return u.replace(/^.*OS ([\d_]+) like.*$/,"$1").replace(/_/g,".")},Debian:function(){return u.replace(/^.*Debian\/([\d.]+).*$/,"$1")},"Windows Phone":function(){return u.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/,"$2")},"Mac OS":function(){return u.replace(/^.*Mac OS X ([\d_]+).*$/,"$1").replace(/_/g,".")},WebOS:function(){return u.replace(/^.*hpwOS\/([\d.]+);.*$/,"$1")}};if(osVersion[_this.os]){_this.osVersion=osVersion[_this.os]();if(_this.osVersion==u){_this.osVersion=""}}return _this.osVersion},getOrientationStatu:function(){var orientationStatus="";var orientation=window.matchMedia("(orientation: portrait)");if(orientation.matches){orientationStatus="竖屏"}else{orientationStatus="横屏"}return orientationStatus},getDeviceType:function(){var _this=this;_this.device="PC";MethodLibrary.matchInfoMap(_this);return _this.device},getNetwork:function(){var netWork=navigator&&navigator.connection&&navigator.connection.effectiveType;return netWork},getLanguage:function(){var _this=this;_this.language=function(){var language=VariableLibrary.navigator.browserLanguage||VariableLibrary.navigator.language;var arr=language.split("-");if(arr[1]){arr[1]=arr[1].toUpperCase()}return arr.join("_")}();return _this.language},createFingerprint:function(domain){var fingerprint;function bin2hex(s){var i,l,n,o="";s+="";for(i=0,l=s.length;i<l;i++){n=s.charCodeAt(i).toString(16);o+=n.length<2?"0"+n:n}return o}var canvas=document.createElement("canvas");var ctx=canvas.getContext("2d");var txt=domain||window.location.host;ctx.textBaseline="top";ctx.font="14px 'Arial'";ctx.textBaseline="tencent";ctx.fillStyle="#f60";ctx.fillRect(125,1,62,20);ctx.fillStyle="#069";ctx.fillText(txt,2,15);ctx.fillStyle="rgba(102, 204, 0, 0.7)";ctx.fillText(txt,4,17);var b64=canvas.toDataURL().replace("data:image/png;base64,","");var bin=atob(b64);var crc=bin2hex(bin.slice(-16,-12));fingerprint=crc;return fingerprint},getBrowserInfo:function(){var _this=this;MethodLibrary.matchInfoMap(_this);var u=VariableLibrary.navigator.userAgent||{};var _mime=function(option,value){var mimeTypes=VariableLibrary.navigator.mimeTypes;for(var key in mimeTypes){if(mimeTypes[key][option]==value){return true}}return false};var match=MethodLibrary.getMatchMap(u);var is360=false;if(_window.chrome){var chrome_vision=u.replace(/^.*Chrome\/([\d]+).*$/,"$1");if(chrome_vision>36&&_window.showModalDialog){is360=true}else if(chrome_vision>45){is360=_mime("type","application/vnd.chromium.remoting-viewer")}}if(match["Baidu"]&&match["Opera"]){match["Baidu"]=false}if(match["Mobile"]){match["Mobile"]=!(u.indexOf("iPad")>-1)}if(is360){if(_mime("type","application/gameplugin")){match["360SE"]=true}else if(VariableLibrary.navigator&&typeof VariableLibrary.navigator["connection"]["saveData"]=="undefined"){match["360SE"]=true}else{match["360EE"]=true}}if(match["IE"]||match["Edge"]){var navigator_top=window.screenTop-window.screenY;switch(navigator_top){case 71:break;case 74:break;case 99:break;case 102:match["360EE"]=true;break;case 75:break;case 74:break;case 105:break;case 104:match["360SE"]=true;break}}var browerVersionMap={Safari:function(){return u.replace(/^.*Version\/([\d.]+).*$/,"$1")},Chrome:function(){return u.replace(/^.*Chrome\/([\d.]+).*$/,"$1").replace(/^.*CriOS\/([\d.]+).*$/,"$1")},IE:function(){return u.replace(/^.*MSIE ([\d.]+).*$/,"$1").replace(/^.*rv:([\d.]+).*$/,"$1")},Edge:function(){return u.replace(/^.*Edge\/([\d.]+).*$/,"$1")},Firefox:function(){return u.replace(/^.*Firefox\/([\d.]+).*$/,"$1").replace(/^.*FxiOS\/([\d.]+).*$/,"$1")},"Firefox Focus":function(){return u.replace(/^.*Focus\/([\d.]+).*$/,"$1")},Chromium:function(){return u.replace(/^.*Chromium\/([\d.]+).*$/,"$1")},Opera:function(){return u.replace(/^.*Opera\/([\d.]+).*$/,"$1").replace(/^.*OPR\/([\d.]+).*$/,"$1")},Vivaldi:function(){return u.replace(/^.*Vivaldi\/([\d.]+).*$/,"$1")},Yandex:function(){return u.replace(/^.*YaBrowser\/([\d.]+).*$/,"$1")},Arora:function(){return u.replace(/^.*Arora\/([\d.]+).*$/,"$1")},Lunascape:function(){return u.replace(/^.*Lunascape[\/\s]([\d.]+).*$/,"$1")},QupZilla:function(){return u.replace(/^.*QupZilla[\/\s]([\d.]+).*$/,"$1")},"Coc Coc":function(){return u.replace(/^.*coc_coc_browser\/([\d.]+).*$/,"$1")},Kindle:function(){return u.replace(/^.*Version\/([\d.]+).*$/,"$1")},Iceweasel:function(){return u.replace(/^.*Iceweasel\/([\d.]+).*$/,"$1")},Konqueror:function(){return u.replace(/^.*Konqueror\/([\d.]+).*$/,"$1")},Iceape:function(){return u.replace(/^.*Iceape\/([\d.]+).*$/,"$1")},SeaMonkey:function(){return u.replace(/^.*SeaMonkey\/([\d.]+).*$/,"$1")},Epiphany:function(){return u.replace(/^.*Epiphany\/([\d.]+).*$/,"$1")},360:function(){return u.replace(/^.*QihooBrowser\/([\d.]+).*$/,"$1")},"360SE":function(){var hash={63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"};var chrome_vision=u.replace(/^.*Chrome\/([\d]+).*$/,"$1");return hash[chrome_vision]||""},"360EE":function(){var hash={69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"};var chrome_vision=u.replace(/^.*Chrome\/([\d]+).*$/,"$1");return hash[chrome_vision]||""},Maxthon:function(){return u.replace(/^.*Maxthon\/([\d.]+).*$/,"$1")},QQBrowser:function(){return u.replace(/^.*QQBrowser\/([\d.]+).*$/,"$1")},QQ:function(){return u.replace(/^.*QQ\/([\d.]+).*$/,"$1")},Baidu:function(){return u.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/,"$1")},UC:function(){return u.replace(/^.*UC?Browser\/([\d.]+).*$/,"$1")},Sogou:function(){return u.replace(/^.*SE ([\d.X]+).*$/,"$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/,"$1")},LBBROWSER:function(){var hash={57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"};var chrome_vision=navigator.userAgent.replace(/^.*Chrome\/([\d]+).*$/,"$1");return hash[chrome_vision]||""},"2345Explorer":function(){return u.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1")},TheWorld:function(){return u.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return u.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return u.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return u.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return u.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},Taobao:function(){return u.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return u.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return u.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return u.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return u.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return u.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")}};_this.browserVersion="";if(browerVersionMap[_this.browser]){_this.browserVersion=browerVersionMap[_this.browser]();if(_this.browserVersion==u){_this.browserVersion=""}}if(_this.browser=="Edge"){_this.engine="EdgeHTML"}if(_this.browser=="Chrome"&&parseInt(_this.browserVersion)>27){_this.engine="Blink"}if(_this.browser=="Opera"&&parseInt(_this.browserVersion)>12){_this.engine="Blink"}if(_this.browser=="Yandex"){_this.engine="Blink"}return _this.browser+"(版本: "+_this.browserVersion+"&nbsp;&nbsp;内核: "+_this.engine+")"}}}();var LogicLibrary=function(){return{DeviceInfoObj:function(params){params=params||{domain:""};var info={deviceType:MethodLibrary.getDeviceType(),OS:MethodLibrary.getOS(),OSVersion:MethodLibrary.getOSVersion(),screenHeight:_window.screen.height,screenWidth:_window.screen.width,language:MethodLibrary.getLanguage(),netWork:MethodLibrary.getNetwork(),orientation:MethodLibrary.getOrientationStatu(),browserInfo:MethodLibrary.getBrowserInfo(),fingerprint:MethodLibrary.createFingerprint(params.domain),userAgent:VariableLibrary.navigator.userAgent};if(!params.info||params.info.length==0){return info}var infoTemp={};for(var i in info){params.info.forEach(function(item){if(item.toLowerCase()==i.toLowerCase()){item=i;infoTemp[item]=info[item]}})}return infoTemp}}}();return{getDeviceInfo:function(params){return LogicLibrary.DeviceInfoObj(params)}}}();var utils={type(obj){return Object.prototype.toString.call(obj).replace(/\[object\s|\]/g,"")},isFunction(func){return this.type(func)==="Function"},isArray(list){return this.type(list)==="Array"},isNull(str){return str==undefined||str==""||str==null},objectIsNull(obj){return JSON.stringify(obj)==="{}"},isObject(obj){return this.type(obj)==="Object"}};class ByXHR{toReport(url,data){try{let dataStr=JSON.stringify(data);var xhr=new XMLHttpRequest;xhr.open("POST",url,true);xhr.setRequestHeader("Content-Type","application/json");xhr.send(dataStr)}catch(error){console.log(error)}}}class ByFetch{toReport(url,data){try{let dataStr=JSON.stringify(data);fetch(url,{headers:{"Content-Type":"application/json"},method:"POST",body:dataStr,mode:"same-origin",keepalive:true})}catch(error){(new ByXHR).toReport(url,data);console.log("fetch请求异常",error)}}}class ByImg{toReport(url,data){try{var img=new Image;img.src=url+"?st="+(new Date).getTime()+"&"+this.formatParams(data)}catch(error){console.log(error)}}formatParams(data){var arr=[];for(var name in data){arr.push(encodeURIComponent(name)+"="+encodeURIComponent(data[name]))}return arr.join("&")}}class ByNavigator{toReport(url,data){try{data.st=(new Date).getTime();navigator.sendBeacon&&navigator.sendBeacon(url,this.formatParamsByURLSearchParams(data))}catch(error){console.log(error)}}formatParamsByFormData(data){const form=new FormData;for(var name in data){form.append(name,data[name])}return form}formatParamsByURLSearchParams(data){const form=new URLSearchParams;for(var name in data){if(typeof data[name]==="object"){data[name]=JSON.stringify(data[name])}form.append(name,data[name])}return form}formatParams(data){var arr=[];for(var name in data){arr.push(encodeURIComponent(name)+"="+encodeURIComponent(data[name]))}return arr.join("&")}}class API{constructor(url){this.url=url}report(data,reportWay){let defaultWay={isFetch:false,isXHR:false,isImg:false,isNavigator:false};reportWay=reportWay||defaultWay;if(!this.checkUrl(this.url)){console.log("上报信息url地址格式不正确,url=",this.url);return}this.sendInfo(data,reportWay)}sendInfo(data,reportWay={}){let byFetch=new ByFetch;let byImg=new ByImg;let byXHR=new ByXHR;let byNavigator=new ByNavigator;if(reportWay.isImg){byImg.toReport(this.url,data);return}if(reportWay.isFetch){byFetch.toReport(this.url,data);return}if(reportWay.isXHR){byXHR.toReport(this.url,data);return}if(reportWay.isNavigator){byNavigator.toReport(this.url,data);return}let isDefault=!!(reportWay.isFetch&&reportWay.isImg&&reportWay.isXHR&&reportWay.isNavigator);if(!isDefault){byNavigator.toReport(this.url,data);return}}checkUrl(url){if(!url){return false}var urlRule=/^[hH][tT][tT][pP]([sS]?):\/\//;return urlRule.test(url)}}var TaskQueue={isStop:true,queues:[],add:function(reportUrl,data){this.queues.push({reportUrl:reportUrl,data:data})},fire:function(){if(!this.queues||this.queues.length===0){this.isStop=true;return}this.isStop=false;let item=this.queues[0];item.reportUrl&&new API(item.reportUrl).report(item.data);this.queues.splice(0,1);this.fire()}};class BaseMonitor{constructor(params){this.category=ErrorCategoryEnum.UNKNOW_ERROR;this.level=ErrorLevelEnum.INFO;this.msg="";this.url="";this.line="";this.col="";this.errorObj="";this.reportUrl=params.reportUrl;this.extendsInfo=params.extendsInfo}recordError(){this.handleRecordError();TaskQueue.isStop&&TaskQueue.fire()}handleRecordError(){try{if(!this.msg){return}if(this.reportUrl&&this.url&&this.url.toLowerCase().indexOf(this.reportUrl.toLowerCase())>=0){console.log("统计错误接口异常",this.msg);return}let errorInfo=this.handleErrorInfo();TaskQueue.add(this.reportUrl,errorInfo)}catch(error){console.log(error)}}handleErrorInfo(){let extendsInfo=this.getExtendsInfo();let recordInfo=extendsInfo;let txt="";let action=0;switch(this.category){case ErrorCategoryEnum.BUSINESS:if(this.msg.textKey){txt=JSON.stringify(this.msg);action=1;recordInfo.textKey=this.msg.textKey;if(this.msg.h){recordInfo.h=this.msg.h}if(this.msg.text){recordInfo.text=this.msg.text}}else{recordInfo=Object.assign({},recordInfo,this.msg);recordInfo.l=window.location.href;return recordInfo}break;case ErrorCategoryEnum.PERFORMANCE:txt=JSON.stringify(this.msg);action=1e3;recordInfo.clientInfo=this.getDeviceInfo();break;case ErrorCategoryEnum.AJAX_ERROR:txt=JSON.stringify(this.msg);action=100;break;case ErrorCategoryEnum.RESOURCE_ERROR:const errorInfo={msg:this.msg,url:encodeURIComponent(this.url)};txt=JSON.stringify(errorInfo);action=101;break;case ErrorCategoryEnum.JS_ERROR:txt="错误类别: "+this.category+"\r\n";txt+="日志信息: "+this.msg+"\r\n";txt+="url: "+encodeURIComponent(this.url)+"\r\n";txt+="错误行号: "+this.line+"\r\n";txt+="错误列号: "+this.col+"\r\n";if(this.errorObj&&this.errorObj.stack){txt+="错误栈: "+this.errorObj.stack+"\r\n"}action=102;break;default:txt=this.msg;action=106;break}recordInfo.logInfo=txt;recordInfo.l=window.location.pathname;recordInfo.action=action;return recordInfo}getExtendsInfo(){try{let ret={};let extendsInfo=this.extendsInfo||{};let dynamicParams;if(utils.isFunction(extendsInfo.getDynamic)){dynamicParams=extendsInfo.getDynamic()}if(utils.isObject(dynamicParams)){extendsInfo={...extendsInfo,...dynamicParams}}for(var key in extendsInfo){if(!utils.isFunction(extendsInfo[key])){ret[key]=extendsInfo[key]}}return ret}catch(error){console.log("call getExtendsInfo error",error);return{}}}getDeviceInfo(){try{let deviceInfo=DeviceInfo.getDeviceInfo();return JSON.stringify(deviceInfo)}catch(error){console.log(error);return""}}}function isMatchAjaxDomain(ajaxDomain,url){if(!ajaxDomain){return true}if(typeof ajaxDomain==="string"){if(url.startsWith("/")){if(window.location.hostname.endsWith(ajaxDomain)){return true}}else{const u=new URL(url);if(u.hostname.endsWith(ajaxDomain)){return true}}return false}if(typeof ajaxDomain==="object"&&ajaxDomain instanceof Array){let isMatch=false;ajaxDomain.forEach(item=>{if(typeof item==="string"){if(url.startsWith("/")){if(window.location.hostname.endsWith(item)){isMatch=true}}else{const u=new URL(url);if(u.hostname.endsWith(item)){isMatch=true}}}});return isMatch}return false}class AjaxError{constructor(params){this.params=params}handleError(type){switch(type){case AjaxLibEnum.FETCH:new FetchError(this.params).handleError();break;case AjaxLibEnum.DEFAULT:new XHRError(this.params).handleError();break;default:new FetchError(this.params).handleError();new XHRError(this.params).handleError();break}}}const isString=obj=>typeof obj==="string";class FetchError extends BaseMonitor{constructor(params){super(params);this.ajaxDomain=params.ajaxDomain}handleError(){if(!window.fetch){return}this.level=ErrorLevelEnum.WARN;this.category=ErrorCategoryEnum.AJAX_ERROR;let _self=this;let _oldFetch=window.fetch;window.fetch=function(){let _arguments=arguments;let _fetchStart=(new Date).getTime();let _status=null;return _oldFetch.apply(this,arguments).then(function(_response){try{const contentType=_response.headers?_response.headers.get("content-type"):"";const canToJson=isString(contentType)&&contentType.includes("application/json");if(canToJson){const response=_response.clone();_status=response.status;let _fetchEnd=(new Date).getTime();let _loadTime=_fetchEnd-_fetchStart;response.json().then(function(data){const requestInfo={fetchStart:_fetchStart,url:_arguments[0],requestOptions:_arguments[1],status:_status,responseBody:data,loadTime:_loadTime};_self.msg=requestInfo;if(isMatchAjaxDomain(_self.ajaxDomain,requestInfo.url)){_self.recordError()}})}else{const response=_response.clone();_status=response.status;let _fetchEnd=(new Date).getTime();let _loadTime=_fetchEnd-_fetchStart;response.text().then(function(data){try{data=JSON.parse(data)}catch(e){console.log("JSON.parse 失败")}const requestInfo={fetchStart:_fetchStart,url:_arguments[0],requestOptions:_arguments[1],status:_status,responseBody:data,loadTime:_loadTime};_self.msg=requestInfo;if(isMatchAjaxDomain(_self.ajaxDomain,requestInfo.url)){_self.recordError()}})}}catch(e){console.log("获取响应数据上报异常");console.log(e)}return _response}).catch(function(error){console.log("获取响应数据上报异常");console.log(error)})}}}class XHRError extends BaseMonitor{constructor(params){super(params);this.ajaxDomain=params.ajaxDomain}handleError(){if(!window.XMLHttpRequest){return}this.level=ErrorLevelEnum.WARN;this.category=ErrorCategoryEnum.AJAX_ERROR;let _self=this;let xhrOpen=XMLHttpRequest.prototype.open;let xhrSend=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(method,url,async){this._url=typeof url==="string"?url:url.href;this._method=method;return xhrOpen.call(this,method,this._url,typeof async==="boolean"?async:true)};XMLHttpRequest.prototype.send=function(){let _fetchStart=(new Date).getTime();if(this.addEventListener){this.addEventListener("readystatechange",function(){if(this.readyState===4){if(this.status>=200&&this.status<300){let _fetchEnd=(new Date).getTime();let _loadTime=_fetchEnd-_fetchStart;const requestOptions={method:this._method};const requestInfo={fetchStart:_fetchStart,url:this._url,requestOptions:requestOptions,responseBody:this.response,status:this.status,loadTime:_loadTime};_self.msg=requestInfo;if(isMatchAjaxDomain(_self.ajaxDomain,requestInfo.url)){_self.recordError()}}else{let _fetchEnd=(new Date).getTime();let _loadTime=_fetchEnd-_fetchStart;const requestOptions={method:this._method};const requestInfo={fetchStart:_fetchStart,url:this._url,requestOptions:requestOptions,status:this.status,loadTime:_loadTime};_self.msg=requestInfo;if(isMatchAjaxDomain(_self.ajaxDomain,requestInfo.url)){_self.recordError()}}}})}return xhrSend.apply(this,arguments)}}}class ConsoleError extends BaseMonitor{constructor(params){super(params)}handleError(){this.registerInfo();this.registerWarn();this.registerError()}registerInfo(){let t=this;console.tInfo=function(){t.handleLog(ErrorLevelEnum.INFO,ErrorCategoryEnum.CONSOLE_INFO,arguments)}}registerWarn(){let t=this;console.tWarn=function(){t.handleLog(ErrorLevelEnum.WARN,ErrorCategoryEnum.CONSOLE_WARN,arguments)}}registerError(){let t=this;console.tError=function(){t.handleLog(ErrorLevelEnum.ERROR,ErrorCategoryEnum.CONSOLE_ERROR,arguments)}}handleLog(level,category,args){try{this.level=level;let params=[...args];this.msg=params.join("\r\n");this.url=location.href;this.category=category;this.recordError()}catch(error){console.log("console统计错误异常",level,error)}}}(function(){if(!window.console){window.console={}}let funcs=["tInfo","tWarn","tError"];funcs.forEach((func,index)=>{if(!console[func]){console[func]=function(){}}})})();class JSError extends BaseMonitor{constructor(params){super(params)}handleError(){window.onerror=(msg,url,line,col,error)=>{console.log("monitor onerror");try{this.level=ErrorLevelEnum.WARN;this.category=ErrorCategoryEnum.JS_ERROR;this.msg=msg;this.url=url;this.line=line;this.col=col;this.errorObj=error;this.recordError()}catch(error){console.log("js错误异常",error)}}}}class PromiseError extends BaseMonitor{constructor(params){super(params)}handleError(){window.addEventListener("unhandledrejection",event=>{try{if(!event||!event.reason){return}if(event.reason.config&&event.reason.config.url){this.url=event.reason.config.url}this.level=ErrorLevelEnum.WARN;this.category=ErrorCategoryEnum.PROMISE_ERROR;this.msg=event.reason;this.recordError()}catch(error){console.log(error)}},true)}}class ResourceError extends BaseMonitor{constructor(params){super(params)}handleError(){window.addEventListener("error",event=>{console.log("monitor addEventListener error");try{if(!event){return}this.category=ErrorCategoryEnum.RESOURCE_ERROR;let target=event.target||event.srcElement;var isElementTarget=target instanceof HTMLScriptElement||target instanceof HTMLLinkElement||target instanceof HTMLImageElement;if(!isElementTarget){return}this.level=target.tagName.toUpperCase()==="IMG"?ErrorLevelEnum.WARN:ErrorLevelEnum.ERROR;this.msg="加载 "+target.tagName+" 资源错误";this.url=target.src||target.href;this.errorObj=target;this.recordError()}catch(error){console.log("资源加载收集异常",error)}},true)}}var e,n,t,r,a=-1,o=function(e){addEventListener("pageshow",function(n){n.persisted&&(a=n.timeStamp,e(n))},!0)},c=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},u=function(){var e=c();return e&&e.activationStart||0},f=function(e,n){var t=c(),r="navigate";a>=0?r="back-forward-cache":t&&(document.prerendering||u()>0?r="prerender":document.wasDiscarded?r="restore":t.type&&(r=t.type.replace(/_/g,"-")));return{name:e,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},s=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(e){Promise.resolve().then(function(){n(e.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},d=function(e,n,t,r){var i,a;return function(o){n.value>=0&&(o||r)&&((a=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=a,n.rating=function(e,n){return e>n[1]?"poor":e>n[0]?"needs-improvement":"good"}(n.value,t),e(n))}},l=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},p=function(e){var n=function(n){"pagehide"!==n.type&&"hidden"!==document.visibilityState||e(n)};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},v$1=function(e){var n=!1;return function(t){n||(e(t),n=!0)}},m=-1,h=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},g=function(e){"hidden"===document.visibilityState&&m>-1&&(m="visibilitychange"===e.type?e.timeStamp:0,T())},y=function(){addEventListener("visibilitychange",g,!0),addEventListener("prerenderingchange",g,!0)},T=function(){removeEventListener("visibilitychange",g,!0),removeEventListener("prerenderingchange",g,!0)},E=function(){return m<0&&(m=h(),y(),o(function(){setTimeout(function(){m=h(),y()},0)})),{get firstHiddenTime(){return m}}},C=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},L=[1800,3e3],b=function(e,n){n=n||{},C(function(){var t,r=E(),i=f("FCP"),a=s("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(a.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-u(),0),i.entries.push(e),t(!0)))})});a&&(t=d(e,i,L,n.reportAllChanges),o(function(r){i=f("FCP"),t=d(e,i,L,n.reportAllChanges),l(function(){i.value=performance.now()-r.timeStamp,t(!0)})}))})},w=[.1,.25],S=function(e,n){n=n||{},b(v$1(function(){var t,r=f("CLS",0),i=0,a=[],c=function(e){e.forEach(function(e){if(!e.hadRecentInput){var n=a[0],t=a[a.length-1];i&&e.startTime-t.startTime<1e3&&e.startTime-n.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e])}}),i>r.value&&(r.value=i,r.entries=a,t())},u=s("layout-shift",c);u&&(t=d(e,r,w,n.reportAllChanges),p(function(){c(u.takeRecords()),t(!0)}),o(function(){i=0,r=f("CLS",0),t=d(e,r,w,n.reportAllChanges),l(function(){return t()})}),setTimeout(t,0))}))},A={passive:!0,capture:!0},I=new Date,P=function(r,i){e||(e=i,n=r,t=new Date,k(removeEventListener),F())},F=function(){if(n>=0&&n<t-I){var i={entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+n};r.forEach(function(e){e(i)}),r=[]}},M=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){P(e,n),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,A),removeEventListener("pointercancel",r,A)};addEventListener("pointerup",t,A),addEventListener("pointercancel",r,A)}(n,e):P(n,e)}},k=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(n){return e(n,M,A)})},D=[100,300],x=function(t,i){i=i||{},C(function(){var a,c=E(),u=f("FID"),l=function(e){e.startTime<c.firstHiddenTime&&(u.value=e.processingStart-e.startTime,u.entries.push(e),a(!0))},m=function(e){e.forEach(l)},h=s("first-input",m);a=d(t,u,D,i.reportAllChanges),h&&p(v$1(function(){m(h.takeRecords()),h.disconnect()})),h&&o(function(){var o;u=f("FID"),a=d(t,u,D,i.reportAllChanges),r=[],n=-1,e=null,k(addEventListener),o=l,r.push(o),F()})})},U=[2500,4e3],V={},W=function(e,n){n=n||{},C(function(){var t,r=E(),i=f("LCP"),a=function(e){var n=e[e.length-1];n&&n.startTime<r.firstHiddenTime&&(i.value=Math.max(n.startTime-u(),0),i.entries=[n],t())},c=s("largest-contentful-paint",a);if(c){t=d(e,i,U,n.reportAllChanges);var m=v$1(function(){V[i.id]||(a(c.takeRecords()),c.disconnect(),V[i.id]=!0,t(!0))});["keydown","click"].forEach(function(e){addEventListener(e,m,!0)}),p(m),o(function(r){i=f("LCP"),t=d(e,i,U,n.reportAllChanges),l(function(){i.value=performance.now()-r.timeStamp,V[i.id]=!0,t(!0)})})}})},X=[800,1800],Y=function e(n){document.prerendering?C(function(){return e(n)}):"complete"!==document.readyState?addEventListener("load",function(){return e(n)},!0):setTimeout(n,0)},Z=function(e,n){n=n||{};var t=f("TTFB"),r=d(e,t,X,n.reportAllChanges);Y(function(){var i=c();if(i){var a=i.responseStart;if(a<=0||a>performance.now())return;t.value=Math.max(a-u(),0),t.entries=[i],r(!0),o(function(){t=f("TTFB",0),(r=d(e,t,X,n.reportAllChanges))(!0)})}})};class Performance extends BaseMonitor{constructor(options){super(options||{});this.category=ErrorCategoryEnum.PERFORMANCE;this.reportUrl=options.reportUrl||"";this.performanceData={};this.saveData=this.saveData.bind(this);b(this.saveData);x(this.saveData);W(this.saveData);S(this.saveData);Z(this.saveData)}saveData(data){this.performanceData[data.name]=data.value;if(data.name==="LCP"){this.record(this.performanceData)}}record(data){this.msg=data;this.recordError()}}const ATTRIBUTE_KEY="textkey";const DEFAULT_A_TEXTKEY="common_a";const targetReg=/((<(A|B|BUTTON|DIV|H1|H2|H3|H4|H5|H6|P|IMG|SPAN|TABLE|TD|TEXTAREA|VIDEO)([^<>])*>)([^<>])+(<\/(A|B|BUTTON|DIV|H1|H2|H3|H4|H5|H6|P|IMG|SPAN|TABLE|TD|TEXTAREA|VIDEO)>)|(<(IMG|VIDEO)(.)+>))/i;const MAXLENGTH=20;function matchInnerText(target){var targetName=target.nodeName;var targetText="";if(target.hasAttribute("data-monitor")&&target.getAttribute("data-monitor")){targetText=target.getAttribute("data-monitor");return`${targetText}`.slice(0,MAXLENGTH)}var targetMatch=target.outerHTML.match(targetReg);if(targetMatch&&targetMatch.length>0){switch(targetName){case"IMG":targetText=target.getAttribute("alt");break;default:targetText=targetMatch[0].match(/>[^<>]+<\//)?targetMatch[0].match(/>[^<>]+<\//)[0]:"";targetText=targetText.replace(/[^A-Za-z0-9\u4e00-\u9fa5]/g,"");break}}return`${targetText}`.slice(0,MAXLENGTH)}class Business extends BaseMonitor{constructor(options){super(options||{});this.category=ErrorCategoryEnum.BUSINESS;this.reportUrl=options.reportUrl||"";const keyName=options.keyName||ATTRIBUTE_KEY;const that=this;window.addEventListener("click",function(event){let target=event.target;if(!target){return false}let key=target.getAttribute(keyName);let href=target.getAttribute("link")||target.getAttribute("href");if(key||href){const data={textKey:key||DEFAULT_A_TEXTKEY};if(href){data.h=href}const text=matchInnerText(target);if(text){data.text=text}that.record(data)}else{while(!key&&!href&&target.parentNode){target=target.parentNode;if(target.getAttribute){key=target.getAttribute(keyName);href=target.getAttribute("link")||target.getAttribute("href")}}if(key||href){const data={textKey:key||DEFAULT_A_TEXTKEY};if(href){data.h=href}const text=matchInnerText(target);if(text){data.text=text}that.record(data)}}})}record(data){this.msg=data;this.recordError()}}class Manual extends BaseMonitor{constructor(options){super(options||{});this.category=ErrorCategoryEnum.BUSINESS;this.reportUrl=options.reportUrl||""}record(data){this.msg=data;this.recordError()}}Date.prototype.format=function(fmt){let o={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours()%12==0?12:this.getHours()%12,"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};let week={0:"/u65e5",1:"/u4e00",2:"/u4e8c",3:"/u4e09",4:"/u56db",5:"/u4e94",6:"/u516d"};if(/(y+)/.test(fmt)){fmt=fmt.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))}if(/(E+)/.test(fmt)){fmt=fmt.replace(RegExp.$1,(RegExp.$1.length>1?RegExp.$1.length>2?"/u661f/u671f":"/u5468":"")+week[this.getDay()+""])}for(let k in o){if(new RegExp("("+k+")").test(fmt)){fmt=fmt.replace(RegExp.$1,RegExp.$1.length==1?o[k]:("00"+o[k]).substr((""+o[k]).length))}}return fmt};class EzMonitor{constructor(options){this.jsError=true;this.promiseError=true;this.resourceError=true;this.ajaxError=true;this.ajaxDomain=null;this.isReportHref=false;this.consoleError=false;options=options||{};this.jsError=!(options.jsError===false);this.promiseError=!(options.promiseError===false);this.resourceError=!(options.resourceError===false);this.consoleError=options.consoleError===true;this.ajaxError=!(options.ajaxError===false);this.ajaxDomain=options.ajaxDomain||this.ajaxDomain;this.isReportHref=options.isReportHref||this.isReportHref;this.business=!(options.business===false);this.reportUrl=options.url;this.performace=!(options.performace===false);this.extendsInfo=options.extendsInfo||{};let param={reportUrl:this.reportUrl,extendsInfo:this.extendsInfo};if(this.jsError){new JSError(param).handleError()}if(this.promiseError){new PromiseError(param).handleError()}if(this.resourceError){new ResourceError(param).handleError()}if(this.ajaxError){let ajaxParam=Object.assign({},param,{ajaxDomain:this.ajaxDomain});new AjaxError(ajaxParam).handleError()}if(this.consoleError){new ConsoleError(param).handleError()}if(this.performace){new Performance(param)}if(this.business){new Business(param)}this.manual=new Manual(param)}report(args){if(!typeof args==="object"){console.log("输入参数不正确");return false}this.manual&&this.manual.record(args);return this}}var dclogUrl="https://log.ys7.com/statistics.do/opensdk_ezuikit";window.monitorExtendsInfo={};window.ezuikitMonitor=new EzMonitor({ajaxDomain:["open.ys7.com",".ezvizlife.com"],url:dclogUrl,extendsInfo:{v:pkg.version,getDynamic:function getDynamic(){return window.monitorExtendsInfo}}});var EZUIKit={Core:Core,HLS:HLS,FLV:FLV,EZUIKitPlayer:EZUIKitPlayer,EZUIKitHD:EZUIKitHD,EZWebRtc:EZWebRtc};window.EZUIKit=EZUIKit;return EZUIKit});