PlayerControl.js 712 KB

1
  1. var PlayerControl=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=105)}([function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";(function(t){var r=n(121),i=n(122),a=n(123);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(o()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(t,e,n);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,n,r):"string"===typeof e?function(t,e,n){"string"===typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),i=(t=s(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|d(e.length);return 0===(t=s(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||(r=e.length)!==r?s(t,0):h(t,e);if("Buffer"===e.type&&a(e.data))return h(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=s(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|d(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function d(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"===typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var a,o=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,s/=2,u/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var l=-1;for(a=n;a<s;a++)if(c(t,a)===c(e,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===u)return l*o}else-1!==l&&(a-=a-l),l=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){for(var f=!0,h=0;h<u;h++)if(c(t,a+h)!==c(e,h)){f=!1;break}if(f)return a}return-1}function y(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=e.length;if(a%2!==0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(e.substr(2*o,2),16);if(isNaN(s))return o;t[n+o]=s}return o}function w(t,e,n,r){return V(U(e,t.length-n),t,n,r)}function b(t,e,n,r){return V(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return b(t,e,n,r)}function D(t,e,n,r){return V(z(e),t,n,r)}function _(t,e,n,r){return V(function(t,e){for(var n,r,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)n=t.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(e,t.length-n),t,n,r)}function x(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var a,o,s,u,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128===(192&(a=t[i+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=t[i+1],o=t[i+2],128===(192&a)&&128===(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128===(192&a)&&128===(192&o)&&128===(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=T));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=o(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?s(t,e):void 0!==n?"string"===typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return f(null,t)},u.allocUnsafeSlow=function(t){return f(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return k(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return x(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(e>>>=0),s=Math.min(a,o),c=this.slice(r,i),l=t.slice(e,n),f=0;f<s;++f)if(c[f]!==l[f]){a=c[f],o=l[f];break}return a<o?-1:o<a?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"===typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return b(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return D(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function A(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=e;a<n;++a)i+=N(t[a]);return i}function R(t,e,n){for(var r=t.slice(e,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function M(t,e,n){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,n,r,i,a){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function P(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-n,2);i<a;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-n,4);i<a;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function B(t,e,n,r,i,a){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,r,a){return a||B(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,a){return a||B(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var r=e,i=1,a=this[t+--r];r>0&&(i*=256);)a+=this[t+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},u.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[e]=255&t;++a<n&&(i*=256);)this[e+a]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):O(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<n&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):O(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&n<e&&e<r)for(i=a-1;i>=0;--i)t[i+e]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},u.prototype.fill=function(t,e,n,r){if("string"===typeof t){if("string"===typeof e?(r=e,e=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var a;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(a=e;a<n;++a)this[a]=t;else{var o=u.isBuffer(t)?t:U(new u(t,r).toString()),s=o.length;for(a=0;a<n-e;++a)this[a+e]=o[a%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var n;e=e||1/0;for(var r=t.length,i=null,a=[],o=0;o<r;++o){if((n=t.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function V(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(30))},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(186);t.exports=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(17).default,i=n(187);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?i(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){(function(e){t.exports=function(){var t=t||function(t,r){var i;if("undefined"!==typeof window&&window.crypto&&(i=window.crypto),"undefined"!==typeof self&&self.crypto&&(i=self.crypto),"undefined"!==typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!==typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&"undefined"!==typeof e&&e.crypto&&(i=e.crypto),!i)try{i=n(206)}catch(t){}var a=function(){if(i){if("function"===typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"===typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),s={},u=s.lib={},c=u.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},l=u.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;e[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(a());return new l.init(e,t)}}),f=s.enc={},h=f.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var a=e[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((15&a).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},d=f.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var a=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new l.init(n,e)}},p=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},v=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=4*o,u=a/s,c=(u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0))*o,f=t.min(4*c,a);if(c){for(var h=0;h<c;h+=o)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=f}return new l.init(n,f)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),g=(u.Hasher=v.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new g.HMAC.init(t,n).finalize(e)}}}),s.algo={});return s}(Math);return t}()}).call(this,n(30))},function(t,e,n){(function(){var e;function n(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function r(){return new n(null)}var i="undefined"!==typeof navigator;i&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(t,e,n,r,i,a){for(var o=32767&e,s=e>>15;--a>=0;){var u=32767&this[t],c=this[t++]>>15,l=s*u+c*o;i=((u=o*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+s*c+(i>>>30),n[r++]=1073741823&u}return i},e=30):i&&"Netscape"!=navigator.appName?(n.prototype.am=function(t,e,n,r,i,a){for(;--a>=0;){var o=e*this[t++]+n[r]+i;i=Math.floor(o/67108864),n[r++]=67108863&o}return i},e=26):(n.prototype.am=function(t,e,n,r,i,a){for(var o=16383&e,s=e>>14;--a>=0;){var u=16383&this[t],c=this[t++]>>14,l=s*u+c*o;i=((u=o*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+s*c,n[r++]=268435455&u}return i},e=28),n.prototype.DB=e,n.prototype.DM=(1<<e)-1,n.prototype.DV=1<<e;n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-e,n.prototype.F2=2*e-52;var a,o,s="0123456789abcdefghijklmnopqrstuvwxyz",u=new Array;for(a="0".charCodeAt(0),o=0;o<=9;++o)u[a++]=o;for(a="a".charCodeAt(0),o=10;o<36;++o)u[a++]=o;for(a="A".charCodeAt(0),o=10;o<36;++o)u[a++]=o;function c(t){return s.charAt(t)}function l(t,e){var n=u[t.charCodeAt(e)];return null==n?-1:n}function f(t){var e=r();return e.fromInt(t),e}function h(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function d(t){this.m=t}function p(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function v(t,e){return t&e}function g(t,e){return t|e}function m(t,e){return t^e}function y(t,e){return t&~e}function w(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function b(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function S(){}function D(t){return t}function _(t){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}d.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},d.prototype.revert=function(t){return t},d.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},d.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},p.prototype.convert=function(t){var e=r();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e},p.prototype.revert=function(t){var e=r();return t.copyTo(e),this.reduce(e),e},p.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},p.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},p.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},n.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},n.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},n.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,a=!1,o=0;--i>=0;){var s=8==r?255&t[i]:l(t,i);s<0?"-"==t.charAt(i)&&(a=!0):(a=!1,0==o?this[this.t++]=s:o+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=r)>=this.DB&&(o-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),a&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},n.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},n.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},n.prototype.lShiftTo=function(t,e){var n,r=t%this.DB,i=this.DB-r,a=(1<<i)-1,o=Math.floor(t/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)e[n+o+1]=this[n]>>i|s,s=(this[n]&a)<<r;for(n=o-1;n>=0;--n)e[n]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},n.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,a=(1<<r)-1;e[0]=this[n]>>r;for(var o=n+1;o<this.t;++o)e[o-n-1]|=(this[o]&a)<<i,e[o-n]=this[o]>>r;r>0&&(e[this.t-n-1]|=(this.s&a)<<i),e.t=this.t-n,e.clamp()}},n.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},n.prototype.multiplyTo=function(t,e){var r=this.abs(),i=t.abs(),a=r.t;for(e.t=a+i.t;--a>=0;)e[a]=0;for(a=0;a<i.t;++a)e[a+r.t]=r.am(0,i[a],e,a,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)},n.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},n.prototype.divRemTo=function(t,e,i){var a=t.abs();if(!(a.t<=0)){var o=this.abs();if(o.t<a.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=r());var s=r(),u=this.s,c=t.s,l=this.DB-h(a[a.t-1]);l>0?(a.lShiftTo(l,s),o.lShiftTo(l,i)):(a.copyTo(s),o.copyTo(i));var f=s.t,d=s[f-1];if(0!=d){var p=d*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0),v=this.FV/p,g=(1<<this.F1)/p,m=1<<this.F2,y=i.t,w=y-f,b=null==e?r():e;for(s.dlShiftTo(w,b),i.compareTo(b)>=0&&(i[i.t++]=1,i.subTo(b,i)),n.ONE.dlShiftTo(f,b),b.subTo(s,s);s.t<f;)s[s.t++]=0;for(;--w>=0;){var S=i[--y]==d?this.DM:Math.floor(i[y]*v+(i[y-1]+m)*g);if((i[y]+=s.am(0,S,i,w,0,f))<S)for(s.dlShiftTo(w,b),i.subTo(b,i);i[y]<--S;)i.subTo(b,i)}null!=e&&(i.drShiftTo(f,e),u!=c&&n.ZERO.subTo(e,e)),i.t=f,i.clamp(),l>0&&i.rShiftTo(l,i),u<0&&n.ZERO.subTo(i,i)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var i=r(),a=r(),o=e.convert(this),s=h(t)-1;for(o.copyTo(i);--s>=0;)if(e.sqrTo(i,a),(t&1<<s)>0)e.mulTo(a,o,i);else{var u=i;i=a,a=u}return e.revert(i)},n.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,a="",o=this.t,s=this.DB-o*this.DB%e;if(o-- >0)for(s<this.DB&&(n=this[o]>>s)>0&&(i=!0,a=c(n));o>=0;)s<e?(n=(this[o]&(1<<s)-1)<<e-s,n|=this[--o]>>(s+=this.DB-e)):(n=this[o]>>(s-=e)&r,s<=0&&(s+=this.DB,--o)),n>0&&(i=!0),i&&(a+=c(n));return i?a:"0"},n.prototype.negate=function(){var t=r();return n.ZERO.subTo(this,t),t},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(t){var e=r();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e},n.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new d(e):new p(e),this.exp(t,n)},n.ZERO=f(0),n.ONE=f(1),S.prototype.convert=D,S.prototype.revert=D,S.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},S.prototype.sqrTo=function(t,e){t.squareTo(e)},_.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=r();return t.copyTo(e),this.reduce(e),e},_.prototype.revert=function(t){return t},_.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},_.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},_.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var x,E,T,k=[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],I=(1<<26)/k[k.length-1];function A(){var t;t=(new Date).getTime(),E[T++]^=255&t,E[T++]^=t>>8&255,E[T++]^=t>>16&255,E[T++]^=t>>24&255,T>=F&&(T-=F)}if(n.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},n.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),i=f(n),a=r(),o=r(),s="";for(this.divRemTo(i,a,o);a.signum()>0;)s=(n+o.intValue()).toString(t).substr(1)+s,a.divRemTo(i,a,o);return o.intValue().toString(t)+s},n.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),a=!1,o=0,s=0,u=0;u<t.length;++u){var c=l(t,u);c<0?"-"==t.charAt(u)&&0==this.signum()&&(a=!0):(s=e*s+c,++o>=r&&(this.dMultiply(i),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),a&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var i=new Array,a=7&t;i.length=1+(t>>3),e.nextBytes(i),a>0?i[0]&=(1<<a)-1:i[0]=0,this.fromString(i,256)}},n.prototype.bitwiseTo=function(t,e,n){var r,i,a=Math.min(t.t,this.t);for(r=0;r<a;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=a;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=a;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},n.prototype.changeBit=function(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},n.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},n.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},n.prototype.multiplyLowerTo=function(t,e,n){var r,i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,t[i],n,i,0,this.t);for(r=Math.min(t.t,e);i<r;++i)this.am(0,t[i],n,i,0,e-i);n.clamp()},n.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},n.prototype.millerRabin=function(t){var e=this.subtract(n.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var a=e.shiftRight(i);(t=t+1>>1)>k.length&&(t=k.length);for(var o=r(),s=0;s<t;++s){o.fromInt(k[Math.floor(Math.random()*k.length)]);var u=o.modPow(a,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var c=1;c++<i&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},n.prototype.clone=function(){var t=r();return this.copyTo(t),t},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},n.prototype.equals=function(t){return 0==this.compareTo(t)},n.prototype.min=function(t){return this.compareTo(t)<0?this:t},n.prototype.max=function(t){return this.compareTo(t)>0?this:t},n.prototype.and=function(t){var e=r();return this.bitwiseTo(t,v,e),e},n.prototype.or=function(t){var e=r();return this.bitwiseTo(t,g,e),e},n.prototype.xor=function(t){var e=r();return this.bitwiseTo(t,m,e),e},n.prototype.andNot=function(t){var e=r();return this.bitwiseTo(t,y,e),e},n.prototype.not=function(){for(var t=r(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},n.prototype.shiftLeft=function(t){var e=r();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},n.prototype.shiftRight=function(t){var e=r();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},n.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+w(this[t]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=b(this[n]^e);return t},n.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},n.prototype.setBit=function(t){return this.changeBit(t,g)},n.prototype.clearBit=function(t){return this.changeBit(t,y)},n.prototype.flipBit=function(t){return this.changeBit(t,m)},n.prototype.add=function(t){var e=r();return this.addTo(t,e),e},n.prototype.subtract=function(t){var e=r();return this.subTo(t,e),e},n.prototype.multiply=function(t){var e=r();return this.multiplyTo(t,e),e},n.prototype.divide=function(t){var e=r();return this.divRemTo(t,e,null),e},n.prototype.remainder=function(t){var e=r();return this.divRemTo(t,null,e),e},n.prototype.divideAndRemainder=function(t){var e=r(),n=r();return this.divRemTo(t,e,n),new Array(e,n)},n.prototype.modPow=function(t,e){var n,i,a=t.bitLength(),o=f(1);if(a<=0)return o;n=a<18?1:a<48?3:a<144?4:a<768?5:6,i=a<8?new d(e):e.isEven()?new _(e):new p(e);var s=new Array,u=3,c=n-1,l=(1<<n)-1;if(s[1]=i.convert(this),n>1){var v=r();for(i.sqrTo(s[1],v);u<=l;)s[u]=r(),i.mulTo(v,s[u-2],s[u]),u+=2}var g,m,y=t.t-1,w=!0,b=r();for(a=h(t[y])-1;y>=0;){for(a>=c?g=t[y]>>a-c&l:(g=(t[y]&(1<<a+1)-1)<<c-a,y>0&&(g|=t[y-1]>>this.DB+a-c)),u=n;0==(1&g);)g>>=1,--u;if((a-=u)<0&&(a+=this.DB,--y),w)s[g].copyTo(o),w=!1;else{for(;u>1;)i.sqrTo(o,b),i.sqrTo(b,o),u-=2;u>0?i.sqrTo(o,b):(m=o,o=b,b=m),i.mulTo(b,s[g],o)}for(;y>=0&&0==(t[y]&1<<a);)i.sqrTo(o,b),m=o,o=b,b=m,--a<0&&(a=this.DB-1,--y)}return i.revert(o)},n.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),a=f(1),o=f(0),s=f(0),u=f(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(a.isEven()&&o.isEven()||(a.addTo(this,a),o.subTo(t,o)),a.rShiftTo(1,a)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),e?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(t,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&a.subTo(s,a),o.subTo(u,o)):(i.subTo(r,i),e&&s.subTo(a,s),u.subTo(o,u))}return 0!=i.compareTo(n.ONE)?n.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},n.prototype.pow=function(t){return this.exp(t,new S)},n.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)return e;for(i<a&&(a=i),a>0&&(e.rShiftTo(a,e),n.rShiftTo(a,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n},n.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=k[k.length-1]){for(e=0;e<k.length;++e)if(n[0]==k[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<k.length;){for(var r=k[e],i=e+1;i<k.length&&r<I;)r*=k[i++];for(r=n.modInt(r);e<i;)if(r%k[e++]==0)return!1}return n.millerRabin(t)},n.prototype.square=function(){var t=r();return this.squareTo(t),t},n.prototype.Barrett=_,null==E){var R;if(E=new Array,T=0,"undefined"!==typeof window&&window.crypto)if(window.crypto.getRandomValues){var M=new Uint8Array(32);for(window.crypto.getRandomValues(M),R=0;R<32;++R)E[T++]=M[R]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var C=window.crypto.random(32);for(R=0;R<C.length;++R)E[T++]=255&C.charCodeAt(R)}for(;T<F;)R=Math.floor(65536*Math.random()),E[T++]=R>>>8,E[T++]=255&R;T=0,A()}function P(){if(null==x){for(A(),(x=new B).init(E),T=0;T<E.length;++T)E[T]=0;T=0}return x.next()}function O(){}function B(){this.i=0,this.j=0,this.S=new Array}O.prototype.nextBytes=function(t){var e;for(e=0;e<t.length;++e)t[e]=P()},B.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0},B.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var F=256;t.exports={default:n,BigInteger:n,SecureRandom:O}}).call(this)},function(t,e,n){"use strict";t.exports={ATOM_MOOV:"moov",ATOM_MVHD:"mvhd",ATOM_TRAK:"trak",ATOM_TKHD:"tkhd",ATOM_MDIA:"mdia",ATOM_MDHD:"mdhd",ATOM_MINF:"minf",ATOM_HDLR:"hdlr",ATOM_VMHD:"vmhd",ATOM_SMHD:"smhd",ATOM_STBL:"stbl",ATOM_STSZ:"stsz",ATOM_STCO:"stco",ATOM_STSS:"stss",ATOM_STTS:"stts",ATOM_STSC:"stsc",ATOM_CO64:"co64",ATOM_STSD:"stsd",ATOM_CTTS:"ctts",ATOM_AVC1:"avc1",ATOM_AVCC:"avcC",ATOM_HEV1:"hev1",ATOM_HVC1:"hvc1",ATOM_HVCC:"hvcC",ATOM_MP4A:"mp4a",ATOM_ESDS:"esds",ATOM_MDAT:"mdat",ATOM_FTYP:"ftyp",TRACK_TYPE_VIDEO:"vide",TRACK_TYPE_AUDIO:"soun",COMPONENT_NAME_VIDEO:"VideoHandler",COMPONENT_NAME_AUDIO:"SoundHandler",COMPRESSOR_NAME:"NodeVideoLibrary",createAtom:function(t){return new(n(193)("./atom-"+t))}}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.util=void 0;var i=r(n(18)),a=n(11),o={moveFlag:!1,selectLineDiff:300,selectPointDiff:320,resizeFlag:!1,zindex:1,shapeId:1,drawState:0,coordinate:{},midLineLength:20,arrayLength:10,eventEnabled:!0,eventName:{drawFinish:"drawFinish",moveFinish:"moveFinish",resizeFinish:"resizeFinish",deleteFinish:"deleteFinish",selectedFinish:"selectedFinish",addFinish:"addFinish",drawStart:"drawStart"},defalutCoordinate:{width:8191,height:8191},resolution:{width:1920,height:1080},setCoordinate:function(t,e){this.coordinate={widthDraw:t/this.defalutCoordinate.width,heightDraw:e/this.defalutCoordinate.height,widthMouse:this.defalutCoordinate.width/t,heightMouse:this.defalutCoordinate.height/e}},onLine:function(t,e){var n,r,i,a,o=(e[1][1]-e[0][1])/(e[1][0]-e[0][0]),s=(e[1][0]*e[0][1]-e[0][0]*e[1][1])/(e[1][0]-e[0][0]),u=Math.abs((o*t[0]-t[1]+s)/Math.sqrt(Math.pow(o,2)+1));return e[0][0]>e[1][0]?(n=e[0][0],r=e[1][0]):(n=e[1][0],r=e[0][0]),e[0][1]>e[1][1]?(i=e[0][1],a=e[1][1]):(i=e[1][1],a=e[0][1]),n===r&&t[0]>=r-this.selectLineDiff&&t[0]<=n+this.selectLineDiff&&t[1]>=a-this.selectLineDiff&&t[1]<=i+this.selectLineDiff||t[0]>=r-this.selectLineDiff&&t[0]<=n+this.selectLineDiff&&t[1]>=a-this.selectLineDiff&&t[1]<=i+this.selectLineDiff&&u<=this.selectLineDiff},pointInPoly:function(t,e){for(var n=!1,r=-1,i=e.length,a=i-1;++r<i;a=r)(e[r][1]<=t[1]&&t[1]<e[a][1]||e[a][1]<=t[1]&&t[1]<e[r][1])&&t[0]<(e[a][0]-e[r][0])*(t[1]-e[r][1])/(e[a][1]-e[r][1])+e[r][0]&&(n=!n);return n},pointInCircle:function(t,e,n){return!(Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))>n)},pointInRect:function(t,e){for(var n=this.rectToPoly(e),r=t[0],i=t[1],a=0,o=0,s=n.length,u=s-1;o<s;u=o,o++){var c=n[o][0],l=n[o][1],f=n[u][0],h=n[u][1],d=Math.atan2(l-i,c-r)-Math.atan2(h-i,f-r);d>=Math.PI?d-=2*Math.PI:d<=-Math.PI&&(d+=2*Math.PI),a+=d}return 0!==Math.round(a/Math.PI)},rectToPoly:function(t){var e=[],n={};return n[0]=t[0][0],n[1]=t[0][1],e.push(n),(n={})[0]=t[1][0],n[1]=t[0][1],e.push(n),(n={})[0]=t[1][0],n[1]=t[1][1],e.push(n),(n={})[0]=t[0][0],n[1]=t[1][1],e.push(n),e},setUnSelected:function(t){for(var e=0;e<t.length;e++)t[e].option.selected=!1},onPoint:function(t,e,n,r){if(n)return Array.isArray(r)?e=this.getNormalizeRect(e):r=new Array(4).fill(this.selectPointDiff),Math.sqrt(Math.pow(t[0]-e[0][0],2)+Math.pow(t[1]-e[0][1],2))<r[0]?0:Math.sqrt(Math.pow(t[0]-e[1][0],2)+Math.pow(t[1]-e[0][1],2))<r[1]?1:Math.sqrt(Math.pow(t[0]-e[1][0],2)+Math.pow(t[1]-e[1][1],2))<r[2]?2:Math.sqrt(Math.pow(t[0]-e[0][0],2)+Math.pow(t[1]-e[1][1],2))<r[3]&&3;for(var i=0;i<e.length;i++)if(Math.sqrt(Math.pow(t[0]-e[i][0],2)+Math.pow(t[1]-e[i][1],2))<this.selectPointDiff)return i;return!1},segmentsIntr:function(t,e,n,r){var i=(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0]),a=(t[0]-r[0])*(e[1]-r[1])-(t[1]-r[1])*(e[0]-r[0]);if(i*a>=0)return!1;var o=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);if(o*(o+i-a)>=0)return!1;var s=o/(a-i),u=s*(e[0]-t[0]),c=s*(e[1]-t[1]);return[t[0]+u,t[1]+c]},segmentsInLine:function(t,e,n,r,i,a,o,s){var u=(r-e)*(o-i)-(t-n)*(a-s);if(0===u)return!1;var c=((n-t)*(o-i)*(a-e)+(r-e)*(o-i)*t-(s-a)*(n-t)*i)/u,l=-((r-e)*(s-a)*(i-t)+(n-t)*(s-a)*e-(o-i)*(r-e)*a)/u;return(c-i)*(c-o)<=0&&(l-a)*(l-s)<=0&&[Math.floor(c),Math.floor(l)]},lineCross:function(t,e){for(var n=0;n<e.length;n++){if(this.segmentsIntr(t[0],t[1],e[n][0],e[n][1]))return!0}return!1},lineAverageNum:function(t,e){if(e<2)return[];for(var n=[],r=1;r<e;r++)n[r-1]=[Math.floor(((e-r)*t[0][0]+r*t[1][0])/e),Math.floor(((e-r)*t[0][1]+r*t[1][1])/e)];return n},lineCrossPoly:function(t,e){if(t.length<=3)return!1;for(var n,r,i=[],s=0;s<t.length;s++)s===t.length-1?i.push([t[s],t[0]]):i.push([t[s],t[s+1]]);if(e===t.length-1){n=i.pop(),r=i.pop();var u=a.jQlib.extend(!0,[],i);if(u.pop(),!0===o.lineCross(r,u))return!0;var c=a.jQlib.extend(!0,[],i);return c.shift(),o.lineCross(n,c)}if(0===e){r=i.pop(),n=i.shift();var l=a.jQlib.extend(!0,[],i);if(l.pop(),!0===o.lineCross(r,l))return!0;var f=a.jQlib.extend(!0,[],i);return f.shift(),o.lineCross(n,f)}r=i.splice(e,1),n=i.splice(e-1,1);var h=a.jQlib.extend(!0,[],i);if(h.splice(e-1,1),!0===o.lineCross(r[0],h))return!0;var d=a.jQlib.extend(!0,[],i);return e-2<0?d.pop():d.splice(e-2,1),o.lineCross(n[0],d)},compare:function(t,e){return t.option.zindex-e.option.zindex},compareDesc:function(t,e){return e.option.zindex-t.option.zindex},compareArray:function(t,e){return t-e},drawSelectRect:function(t,e,n,r,i){r=r||2,t.beginPath(),t.fillStyle=i||"#FFFF00",t.fillRect(e-r,n-r,2*r,2*r),t.closePath()},getArrayLines:function(t,e,n,r){var i=this;if(!t||!e||t[0]===e[0]&&t[1]===e[1])return null;var a,o,s,u,c=i.getArrayLineMiddle(t,e),l=[],f=[(t[0]+e[0])/2,(t[1]+e[1])/2],h=[(f[0]+c[0][0])/2,(f[1]+c[0][1])/2],d=[(f[0]+c[1][0])/2,(f[1]+c[1][1])/2];if(l.push(c),2!==n&&1!==n||(a=i.getRotateByDegree(h,c[0],30),o=i.getRotateByDegree(h,c[0],330),l.push(a,o)),2!==n&&0!==n||(s=i.getRotateByDegree(d,c[1],30),u=i.getRotateByDegree(d,c[1],330),l.push(s,u)),r){var p=this.pointInPoly(d,r);"Both"!==n&&"Leave"!==n||(!0===p?(s=i.getRotateByDegree(h,c[0],30),u=i.getRotateByDegree(h,c[0],330)):(s=i.getRotateByDegree(d,c[1],30),u=i.getRotateByDegree(d,c[1],330)),l.push(s,u)),"Both"!==n&&"Enter"!==n||(!0===p?(s=i.getRotateByDegree(d,c[1],30),u=i.getRotateByDegree(d,c[1],330)):(s=i.getRotateByDegree(h,c[0],30),u=i.getRotateByDegree(h,c[0],330)),l.push(s,u))}return l},getArrayLineMiddle:function(t,e,n){var r;n=void 0!==n?n:this.midLineLength,r=e[0]===t[0]?Math.PI/180*90:Math.atan((e[1]-t[1])/(e[0]-t[0]));var i=[Math.sin(r),Math.cos(r)],a=i[0],o=i[1],s=[],u=[],c=[],l=[(t[0]+e[0])/2-n*a,(t[1]+e[1])/2+n*o];s[0]=l[0],s[1]=l[1];var f=[(t[0]+e[0])/2+n*a,(t[1]+e[1])/2-n*o];if(u[0]=f[0],u[1]=f[1],e[0]>=t[0]){var h=[u,s];c[0]=h[0],c[1]=h[1]}else{var d=[s,u];c[0]=d[0],c[1]=d[1]}return c},getVerticalSegmentOfLine:function(t,e,n,r){var i;r=r||this.midLineLength,i=e[0]===t[0]?Math.PI/180*90:Math.atan((e[1]-t[1])/(e[0]-t[0]));var a=[Math.sin(i),Math.cos(i)],o=a[0],s=a[1],u=[],c=[],l=[],f=[n[0]-r*o,n[1]+r*s];u[0]=f[0],u[1]=f[1];var h=[n[0]+r*o,n[1]-r*s];if(c[0]=h[0],c[1]=h[1],e[0]>=t[0]){var d=[c,u];l[0]=d[0],l[1]=d[1]}else{var p=[u,c];l[0]=p[0],l[1]=p[1]}return l},getRotateByDegree:function(t,e,n){var r=Math.sin(Math.PI/180*n),i=Math.cos(Math.PI/180*n),a=(t[0]-e[0])*i-(t[1]-e[1])*r+e[0],o=(t[1]-e[1])*i+(t[0]-e[0])*r+e[1];return[[e[0],e[1]],[a,o]]},lineInPoly:function(t,e){var n=this.pointInPoly(t[0],e),r=this.pointInPoly(t[1],e);if(!n||!r)return!1;for(var i=0;i<e.length;i++){var a=void 0,o=void 0;if(i===e.length-1?(a=e[0],o=e[i]):(a=e[i],o=e[i+1]),this.segmentsIntr(t[0],t[1],a,o))return!1}return!0},strokeText:function(t,e,n,r,i,a){t.textAlign=i||"left",t.fillStyle=a||"#FFFF00",t.fillText(e,n,r)},getStrokeTextAlign:function(t,e,n,r){var i="left";return e-r-t.measureText(n).width<0&&(i="right"),i},getPositionByLine:function(t,e,n){var r=[];r[0]=a.jQlib.extend(!0,[],e[0]),r[1]=a.jQlib.extend(!0,[],e[1]),e[1][1]<e[0][1]&&n&&(r[0]=a.jQlib.extend(!0,[],e[1]),r[1]=a.jQlib.extend(!0,[],e[0]));var i=r[1][1]-r[0][1],o=r[0][0]-r[1][0],s=r[1][0]*r[0][1]-r[0][0]*r[1][1],u=i*t[0]+o*t[1]+s;return u<0?"left":u>0?"right":"middle"},getNunberSign:function(t,e){return t-e>0?1:t-e<0?-1:0},getCoordinatePoint:function(t,e,n,r,i){var a=null,o=[],s=null,u=null;return n===t?(o[0]=t,o[1]=e>=r?e-i<r?r:e-i:e+i>r?r:e+i):(a=Math.atan((r-e)/(n-t)),s=i*Math.cos(a),u=i*Math.sin(a),t<n&&e<=r?(o[0]=t+s<n?t+s:n,o[1]=e+u<r?e+u:r):t<n&&e>r?(o[0]=t+s<n?t+s:n,o[1]=e+u>r?e+u:r):t>n&&e>=r?(o[0]=t-s>n?t-s:n,o[1]=e-u>r?e-u:r):(o[0]=t-s>n?t-s:n,o[1]=e-u<r?e-u:r)),o},drawAppendLine:function(t,e,n){t.beginPath(),n?(t.moveTo(e[0][0]*n.widthDraw,e[0][1]*n.heightDraw),t.lineTo(e[1][0]*n.widthDraw,e[1][1]*n.heightDraw)):(t.moveTo(e[0][0],e[0][1]),t.lineTo(e[1][0],e[1][1])),t.stroke()},setResolution:function(t){this.resolution={},this.resolution.width=t.width,this.resolution.height=t.height},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.scrollY,left:e.left+window.scrollX}},isConvexShape:function(t){var e=!0,n=t.length;if(n<4)e=!0;else for(var r=void 0,i=0;i<n;i++){var a=t[i%n],o=t[(i+1)%n],s=t[(i+2)%n],u={x:o[0]-a[0],y:o[1]-a[1]},c={x:s[0]-o[0],y:s[1]-o[1]},l=1;if(u.x*c.y-u.y*c.x<0&&(l=-1),r||(r=l),r*l<0){e=!1;break}}return e},getCenter:function(t){return t.reduce(function(e,n,r){return e[0]+=n[0],e[1]+=n[1],r===t.length-1&&(e[0]/=t.length,e[1]/=t.length),e},[0,0])},getNormalizeRect:function(t){var e=(0,i.default)(t[0]),n=(0,i.default)(t[1]),r=[(e[0]+n[0])/2,[e[1]+n[1]]/2],a=Math.abs(e[0]-n[0]),o=Math.abs(e[1]-n[1]);return[e=[r[0]-a/2,r[1]-o/2],n=[r[0]+a/2,r[1]+o/2]]}};e.util=o},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.jQlib=void 0;var i=r(n(17)),a={}.hasOwnProperty,o={class2type:{"object Boolean":"boolean","object Number":"number","object String":"string","object Function":"function","object Array":"array","object Date":"date","object RegExp":"regexp","object Object":"object","object Error":"error"},deepCopy:function(t,e,n){var r,a,o,s=e;if("object"===(0,i.default)(n))for(var u in n)n.hasOwnProperty(u)&&(r=s[u],o=n[u],"object"!==(0,i.default)(o)?s[u]=o:(a=r||(Array.isArray(o)?[]:{}),s[u]=this.deepCopy(t,a,o)));else s=n;return s},extend:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e[1],i=2;i<e.length;i++)e[i]&&(r=this.deepCopy(!0,r,e[i]));return r},isFunction:function(t){return"function"===this.type(t)},isArray:Array.isArray||function(t){return"array"===this.type(t)},isWindow:function(t){return null!==t&&t===t.window},isPlainObject:function(t){if(!t||"object"!==this.type(t)||t.nodeType||this.isWindow(t))return!1;try{if(t.constructor&&!a.call(t,"constructor")&&!a.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},type:function(t){return null===t?t+"":"object"===(0,i.default)(t)||"function"===typeof t?this.class2type[toString.call(t)]||"object":(0,i.default)(t)},each:function(t,e,n){var r=0,i=t.length,a=this.isArraylike(t);if(n){if(a)for(;r<i&&!1!==e.apply(t[r],n);r++);else for(r in t)if(!1===e.apply(t[r],n))break}else if(a)for(;r<i&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},isArraylike:function(t){var e=t.length,n=this.type(t);return"function"!==n&&!this.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===n||0===e||"number"===typeof e&&e>0&&e-1 in t))},getHeight:function(t){var e=this;if(null!==t.getAttribute("height")&&t.getAttribute("height")>0)return parseFloat(t.getAttribute("height"));if(parseFloat(e._getStyleValue(t,"height"))>0)return parseFloat(e._getStyleValue(t,"height"));if(t.offsetHeight>0){var n=e._getStyleValue(t,"borderTopWidth"),r=e._getStyleValue(t,"borderBottomWidth"),i=e._getStyleValue(t,"paddingTop"),a=e._getStyleValue(t,"paddingBottom"),o=parseFloat(t.offsetHeight)-parseFloat(n)-parseFloat(r)-parseFloat(i)-parseFloat(a);return parseFloat(o)}return 0},getWidth:function(t){var e=this;if(null!==t.getAttribute("width")&&t.getAttribute("width")>0)return parseFloat(t.getAttribute("width"));if(parseFloat(e._getStyleValue(t,"width"))>0)return parseFloat(e._getStyleValue(t,"width"));if(t.offsetWidth>0){var n=e._getStyleValue(t,"borderLeftWidth"),r=e._getStyleValue(t,"borderRightWidth"),i=e._getStyleValue(t,"paddingLeft"),a=e._getStyleValue(t,"paddingRight"),o=parseFloat(t.offsetWidth)-parseFloat(n)-parseFloat(r)-parseFloat(i)-parseFloat(a);return parseFloat(o)}return 0},_getStyleValue:function(t,e){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=window),t.currentStyle?t.currentStyle[e]:n.getComputedStyle(t)[e]}};e.jQlib=o},function(t,e,n){"use strict";var r,i=n(55),a=Object.prototype.toString,o=(r=Object.create(null),function(t){var e=a.call(t);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())});function s(t){return t=t.toLowerCase(),function(e){return o(e)===t}}function u(t){return Array.isArray(t)}function c(t){return"undefined"===typeof t}var l=s("ArrayBuffer");function f(t){return null!==t&&"object"===typeof t}function h(t){if("object"!==o(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var d=s("Date"),p=s("File"),v=s("Blob"),g=s("FileList");function m(t){return"[object Function]"===a.call(t)}var y=s("URLSearchParams");function w(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),u(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}var b,S=(b="undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return b&&t instanceof b});t.exports={isArray:u,isArrayBuffer:l,isBuffer:function(t){return null!==t&&!c(t)&&null!==t.constructor&&!c(t.constructor)&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return t&&("function"===typeof FormData&&t instanceof FormData||"[object FormData]"===a.call(t)||m(t.toString)&&"[object FormData]"===t.toString())},isArrayBufferView:function(t){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&l(t.buffer)},isString:function(t){return"string"===typeof t},isNumber:function(t){return"number"===typeof t},isObject:f,isPlainObject:h,isUndefined:c,isDate:d,isFile:p,isBlob:v,isFunction:m,isStream:function(t){return f(t)&&m(t.pipe)},isURLSearchParams:y,isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!==typeof window&&"undefined"!==typeof document},forEach:w,merge:function t(){var e={};function n(n,r){h(e[r])&&h(n)?e[r]=t(e[r],n):h(n)?e[r]=t({},n):u(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)w(arguments[r],n);return e},extend:function(t,e,n){return w(e,function(e,r){t[r]=n&&"function"===typeof e?i(e,n):e}),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,n,r){t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,n&&Object.assign(t.prototype,n)},toFlatObject:function(t,e,n){var r,i,a,o={};e=e||{};do{for(i=(r=Object.getOwnPropertyNames(t)).length;i-- >0;)o[a=r[i]]||(e[a]=t[a],o[a]=!0);t=Object.getPrototypeOf(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:o,kindOfTest:s,endsWith:function(t,e,n){t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;var r=t.indexOf(e,n);return-1!==r&&r===n},toArray:function(t){if(!t)return null;var e=t.length;if(c(e))return null;for(var n=new Array(e);e-- >0;)n[e]=t[e];return n},isTypedArray:S,isFileList:g}},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(19),void(a.lib.Cipher||function(t){var e=a,n=e.lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,s=e.enc,u=(s.Utf8,s.Base64),c=e.algo,l=c.EvpKDF,f=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?_:b}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()}),h=(n.StreamCipher=f.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),e.mode={}),d=n.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),p=h.CBC=function(){var e=d.extend();function n(e,n,r){var i,a=this._iv;a?(i=a,this._iv=t):i=this._prevBlock;for(var o=0;o<r;o++)e[n+o]^=i[o]}return e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;n.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),e.Decryptor=e.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,a=t.slice(e,e+i);r.decryptBlock(t,e),n.call(this,t,e,i),this._prevBlock=a}}),e}(),v=e.pad={},g=v.Pkcs7={pad:function(t,e){for(var n=4*e,r=n-t.sigBytes%n,a=r<<24|r<<16|r<<8|r,o=[],s=0;s<r;s+=4)o.push(a);var u=i.create(o,r);t.concat(u)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},m=(n.BlockCipher=f.extend({cfg:f.cfg.extend({mode:p,padding:g}),reset:function(){var t;f.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),n.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=e.format={},w=y.OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?i.create([1398893684,1701076831]).concat(n).concat(e):e).toString(u)},parse:function(t){var e,n=u.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=i.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:e})}},b=n.SerializableCipher=r.extend({cfg:r.extend({format:w}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),a=i.finalize(e),o=i.cfg;return m.create({ciphertext:a,key:n,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=t.createDecryptor(n,r).finalize(e.ciphertext);return i},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),S=e.kdf={},D=S.OpenSSL={execute:function(t,e,n,r){r||(r=i.random(8));var a=l.create({keySize:e+n}).compute(t,r),o=i.create(a.words.slice(e),4*n);return a.sigBytes=4*e,m.create({key:a,iv:o,salt:r})}},_=n.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:D}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var a=b.encrypt.call(this,t,e,i.key,r);return a.mixIn(i),a},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);r.iv=i.iv;var a=b.decrypt.call(this,t,e,i.key,r);return a}})}()))}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EventManager=void 0;var r={events:new WeakMap,on:function(t,e,n){if(t&&e){var r=e.split("."),i={};return i.fullType=e,i.type=r[0],i.fn=n,this.events.has(t)?this.events.get(t).push(i):this.events.set(t,[i]),t.addEventListener(r[0],i.fn),this}},off:function(t,e){if(!t)return this;var n=this.events.get(t)||[];if(!e){for(var r=0;r<n.length;r++)t.removeEventListener(n[r].type,n[r].fn);return this.events.set(t,[]),this}var i=e.split(".");if(2!==i.length){for(var a=[],o=0;o<n.length;o++)(u=n[o]).type===i[0]?t.removeEventListener(u.type,u.fn):a.push(u);return this.events.set(t,a),this}for(var s=0;s<n.length;s++){var u=n[s];if(u.fullType===e)return t.removeEventListener(u.type,u.fn),this.events.get(t).splice(s,1),this}return this},trigger:function(t,e){if(!t||!e)return this;var n=e.split("."),r=new Event(n[0]);return window.dispatchEvent(r),this}};e.EventManager=r},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,[{key:"type",value:function(){}},{key:"parse",value:function(){}},{key:"build",value:function(){}},{key:"bufferSize",value:function(){}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserDetect=function(){var t=navigator.userAgent.toLowerCase(),e=navigator.appName,n=null;"Microsoft Internet Explorer"===e||t.indexOf("trident")>-1||t.indexOf("edge/")>-1?(n="ie","Microsoft Internet Explorer"===e?(t=/msie ([0-9]{1,}[\.0-9]{0,})/.exec(t),n+=parseInt(t[1])):t.indexOf("trident")>-1?n+=11:t.indexOf("edge/")>-1&&(n="edge")):t.indexOf("safari")>-1?n=t.indexOf("chrome")>-1?"chrome":"safari":t.indexOf("firefox")>-1&&(n="firefox");return n},e.BrowserDetectDetail=function(){var t=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),n=t.match(/(opera|ie|trident|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|rv:(\d.?)|$)/)||[null,"unknown",0],r=("ie"==n[1]||"trident"==n[1])&&document.documentMode,i={name:"version"==n[1]?n[3]:"trident"==n[1]?"ie":n[1],version:r||parseFloat("opera"==n[1]&&n[4]?n[4]:"trident"==n[1]&&n[5]?n[5]:n[2]),Platform:{name:t.match(/ip(?:ad|od|hone)/)?"ios":(t.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||["other"])[0]}};i[i.name]=!0,i[i.name+parseInt(i.version,10)]=!0,i.Platform[i.Platform.name]=!0,i.Platform.ios&&(i.Platform.ipod=!0);i.Engine={};var a=function(t,e){i.Engine.name=t,i.Engine[t+e]=!0,i.Engine.version=e};if(i.ie)switch(i.Engine.trident=!0,i.version){case 6:a("trident",4);break;case 7:a("trident",5);break;case 8:a("trident",6)}i.firefox&&(i.Engine.gecko=!0,i.version>=3?a("gecko",19):a("gecko",18));if(i.safari||i.chrome)switch(i.Engine.webkit=!0,i.version){case 2:a("webkit",419);break;case 3:a("webkit",420);break;case 4:a("webkit",525)}i.opera&&(i.Engine.presto=!0,i.version>=9.6?a("presto",960):i.version>=9.5?a("presto",950):a("presto",925));if("unknown"==i.name)switch((t.match(/(?:webkit|khtml|gecko)/)||[])[0]){case"webkit":case"khtml":i.Engine.webkit=!0;break;case"gecko":i.Engine.gecko=!0}return i},e.CommonAudioUtil=function(){var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384],e=function(t,e,n){var r=0,i=0;for(r=0;r<n&&!(t<e[i]);r++)i++;return r},n=function(n,r){var i=0,a=0,o=0,s=0,u=0;return a=e(i=n>0?n:8191&-n,t,15)-6,o=a+(r>>6&15)-13,s=(0===i?32:a>=0?i>>a:i<<-a)*(r&parseInt("077",8))+48>>4,u=o>=0?s<<o&32767:s>>-o,(n^r)<0?-u:u};this.g726InitState=function(){var t={},e=0;for(t.pp=new Array(2),t.zp=new Array(6),t.pk=new Array(2),t.dq=new Array(6),t.sr=new Array(2),t.yl=34816,t.yu=544,t.dms=0,t.dml=0,t.ppp=0,e=0;e<2;e++)t.pp[e]=0,t.pk[e]=0,t.sr[e]=32;for(e=0;e<6;e++)t.zp[e]=0,t.dq[e]=32;return t.td=0,t},this.predictorZero=function(t){var e=0,r=0;for(r=n(t.zp[0]>>2,t.dq[0]),e=1;e<6;e++)r+=n(t.zp[e]>>2,t.dq[e]);return r},this.predictorPole=function(t){return n(t.pp[1]>>2,t.sr[1])+n(t.pp[0]>>2,t.sr[0])},this.stepSize=function(t){var e=0,n=0,r=0;return t.ppp>=256?t.yu:(e=t.yl>>6,n=t.yu-e,r=t.ppp>>2,n>0?e+=n*r>>6:n<0&&(e+=n*r+63>>6),e)},this.quantize=function(n,r,i,a){var o=0,s=0,u=0;return o=Math.abs(n),s=e(o>>1,t,15),u=e((s<<7)+(o<<7>>s&127)-(r>>2),i,a),n<0?1+(a<<1)-u:0===u?1+(a<<1):u},this.reconstruct=function(t,e,n){var r=0,i=0;return(r=e+(n>>2))<0?t?-32768:0:(i=128+(127&r)<<7>>14-(r>>7&15),t?i-32768:i)},this.update=function(n,r,i,a,o,s,u,c){var l=0,f=0,h=0,d=0,p=0,v=0,g=0,m=0,y=0,w=0,b=0,S=0,D=0,_=0;if(_=u<0?1:0,f=32767&o,y=c.yl>>15,S=c.yl>>10&31,D=32+S<<y,b=(w=y>9?31744:D)+(w>>1)>>1,m=0===c.td?0:f<=b?0:1,c.yu=r+(i-r>>5),c.yu<544?c.yu=544:c.yu>5120&&(c.yu=5120),c.yl+=c.yu+(-c.yl>>6),1===m)c.pp[0]=0,c.pp[1]=0,c.zp[0]=0,c.zp[1]=0,c.zp[2]=0,c.zp[3]=0,c.zp[4]=0,c.zp[5]=0,d=0;else for(v=_^c.pk[0],d=c.pp[1]-(c.pp[1]>>7),0!==u&&((g=v?c.pp[0]:-c.pp[0])<-8191?d-=256:d+=g>8191?255:g>>5,_^c.pk[1]?d<=-12160?d=-12288:d>=12416?d=12288:d-=128:d<=-12416?d=-12288:d>=12160?d=12288:d+=128),c.pp[1]=d,c.pp[0]-=c.pp[0]>>8,0!==u&&(0===v?c.pp[0]+=192:c.pp[0]-=192),p=15360-d,c.pp[0]<-p?c.pp[0]=-p:c.pp[0]>p&&(c.pp[0]=p),l=0;l<6;l++)c.zp[l]-=5===n?c.zp[l]>>9:c.zp[l]>>8,32767&o&&((o^c.dq[l])>=0?c.zp[l]+=128:c.zp[l]-=128);for(l=5;l>0;l--)c.dq[l]=c.dq[l-1];return 0===f?c.dq[0]=o>=0?32:64544:(h=e(f,t,15),c.dq[0]=o>=0?(h<<6)+(f<<6>>h):(h<<6)+(f<<6>>h)-1024),c.sr[1]=c.sr[0],0===s?c.sr[0]=32:s>0?(h=e(s,t,15),c.sr[0]=(h<<6)+(s<<6>>h)):s>-32768?(h=e(f=-s,t,15),c.sr[0]=(h<<6)+(f<<6>>h)-1024):c.sr[0]=64544,c.pk[1]=c.pk[0],c.pk[0]=_,c.td=1===m?0:d<-11776?1:0,c.dms+=a-c.dms>>5,c.dml+=(a<<2)-c.dml>>7,1===m?c.ppp=256:r<1536?c.ppp+=512-c.ppp>>4:1===c.td?c.ppp+=512-c.ppp>>4:Math.abs((c.dms<<2)-c.dml)>=c.dml>>3?c.ppp+=512-c.ppp>>4:c.ppp+=-c.ppp>>4,c}},e.Texture=e.Shader=e.Script=e.Queue=e.Program=e.PLAYER_STATE_CODE=void 0,e.VideoBufferList=function(){var t=0,e=0,n=null;function r(){t=360,e=240,n=null,this._length=0,this.head=null,this.tail=null,this.curIdx=0}return r.prototype={push:function(t,r,i,a,o,s){var u=new VideoBufferNode(t,r,i,a,o,s);return this._length>0?(this.tail.next=u,u.previous=this.tail,this.tail=u):(this.head=u,this.tail=u),this._length+=1,null!==n&&this._length>=e&&n(),u},pop:function(){var t=null;return this._length>1&&(t=this.head,this.head=this.head.next,null!==this.head?this.head.previous=null:this.tail=null,this._length-=1),t},setMaxLength:function(e){(t=e)>360?t=360:t<30&&(t=30)},setBUFFERING:function(t){(e=t)>240?e=240:e<6&&(e=6)},setBufferFullCallback:function(t){n=t},searchTimestamp:function(t){var e=this.head,n=this._length,r=1;if(0===n||t<=0||null===e)throw new Error("Failure: non-existent node in this list.");for(;null!==e&&(e.timeStamp.timestamp!==t.timestamp||e.timeStamp.timestamp_usec!==t.timestamp_usec);)e=e.next,r++;return n<r?e=null:this.curIdx=r,e},findIFrame:function(t){var e=this.head,n=this._length,r=1;if(0===n)throw new Error("Failure: non-existent node in this list.");for(;r<this.curIdx;)e=e.next,r++;if(!0===t)for(;"I"!==e.frameType;)e=e.next,r++;else for(;"I"!==e.frameType;)e=e.previous,r--;return n<r?e=null:this.curIdx=r,e}},new r},e.debug=e.commonOption=e.YUV2RGBMODE=void 0,e.formAuthorizationResponse=function(t,e,n,r,i,a){var s=null,u=null;return s=(0,o.default)(t+":"+r+":"+e).toLowerCase(),u=(0,o.default)(a+":"+n).toLowerCase(),(0,o.default)(s+":"+i+":"+u).toLowerCase()},e.pubsub=void 0,e.stringToUint8Array=function(t){for(var e=t.length,n=new Uint8Array(new ArrayBuffer(e)),r=0;r<e;r++)n[r]=t.charCodeAt(r);return n};var i=r(n(1)),a=r(n(2)),o=r(n(69)),s={log:function(){},error:function(){},count:function(){},info:function(){}};e.debug=s;var u={};e.commonOption=u,u.VIDEOENCODETYPE={H264:1,H265:2},u.AUDIOENCODETYPE={G711A:1,G711U:2};e.YUV2RGBMODE={BT709:"bt709",FULLRANGE:"fullrange",BT601:"bt601",LIMITED:"limited"};e.PLAYER_STATE_CODE={TIMEOUT:101,NOT_SUPPORT_MIME:102,LIMIT_SPEED:103,ADDBUFFER_ERROR:104,MSE_ERROR:105,UNSUPPORTED_AUDIO_FORMAT:201,OPEN_WS_ERROR:202,KMS_NOT_CONNECTED:203,CHANNEL_AUTH_FAILED:204,PASSWORD_NOT_INITIALIZE:205,MAX_NUMBER_CONNECTION:206,WS_CLOSED:207,RTSP_NOT_FOUND:404,INVALID_RANGE:457,INTERNAL_SERVER_ERROR:500,SERVICE_UNAVILABLE:503,TALK_SERVICE_UNAVILABLE:504,TALK_BUSY_LINE:505,TALK_ClOSE:506};var c=function(){function t(){}return t.createFromElementId=function(e){for(var n=document.getElementById(e),r="",i=n.firstChild;i;)3===i.nodeType&&(r+=i.textContent),i=i.nextSibling;var a=new t;return a.type=n.type,a.source=r,a},t.createFromSource=function(e,n){var r=new t;return r.type=e,r.source=n,r},t}();e.Script=c;var l=function(){return function(t,e){if("x-shader/x-fragment"===e.type)this.shader=t.createShader(t.FRAGMENT_SHADER);else{if("x-shader/x-vertex"!==e.type)return void error("Unknown shader type: "+e.type);this.shader=t.createShader(t.VERTEX_SHADER)}t.shaderSource(this.shader,e.source),t.compileShader(this.shader),t.getShaderParameter(this.shader,t.COMPILE_STATUS)||error("An error occurred compiling the shaders: "+t.getShaderInfoLog(this.shader))}}();e.Shader=l;var f=function(){function t(t){this.gl=t,this.program=this.gl.createProgram()}return t.prototype={attach:function(t){this.gl.attachShader(this.program,t.shader)},link:function(){this.gl.linkProgram(this.program)},use:function(){this.gl.useProgram(this.program)},getAttributeLocation:function(t){return this.gl.getAttribLocation(this.program,t)},setMatrixUniform:function(t,e){var n=this.gl.getUniformLocation(this.program,t);this.gl.uniformMatrix4fv(n,!1,e)}},t}();e.Program=f;var h=function(){var t=null;function e(t,e,n){this.gl=t,this.size=e,this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),this.format=n||t.LUMINANCE,t.texImage2D(t.TEXTURE_2D,0,this.format,e.w,e.h,0,this.format,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.pixelStorei(t.UNPACK_ALIGNMENT,1)}return e.prototype={fill:function(t,e){var n=this.gl;n.bindTexture(n.TEXTURE_2D,this.texture),e?n.texSubImage2D(n.TEXTURE_2D,0,0,0,this.size.w,this.size.h,this.format,n.UNSIGNED_BYTE,t):n.texImage2D(n.TEXTURE_2D,0,this.format,this.size.w,this.size.h,0,this.format,n.UNSIGNED_BYTE,t)},bind:function(e,n,r){var i=this.gl;t||(t=[i.TEXTURE0,i.TEXTURE1,i.TEXTURE2]),i.activeTexture(t[e]),i.bindTexture(i.TEXTURE_2D,this.texture),i.uniform1i(i.getUniformLocation(n.program,r),e)}},e}();e.Texture=h;var d=function(){function t(){(0,i.default)(this,t),this.first=null,this.size=0}return(0,a.default)(t,[{key:"enqueue",value:function(t){if(null===this.first)this.first=t;else{for(var e=this.first;null!==e.next;)e=e.next;e.next=t}this.size+=1}},{key:"dequeue",value:function(){var t=null;return null!==this.first&&(t=this.first,this.first=this.first.next,this.size-=1),t}},{key:"clear",value:function(){this.size=0,this.first=null}}]),t}();e.Queue=d;var p={},v=-1,g={publish:function(t,e){if(!p[t])return!1;for(var n=p[t],r=n?n.length:0;r--;)n[r].func(e);return this},subscribe:function(t,e){p[t]||(p[t]=[]);var n=(++v).toString();return p[t].push({token:n,func:e}),n},unsubscribe:function(t){for(var e in p)if(p[e])for(var n=0,r=p[e].length;n<r;n++)if(p[e][n].token===t)return p[e].splice(n,1),t},getTopicFunc:function(t){return p[t]?p[t]:[]}};e.pubsub=g},function(t,e){function n(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(110),i=n(111),a=n(112),o=n(113);t.exports=function(t){return r(t)||i(t)||a(t)||o()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(51),n(52),function(){var t=a,e=t.lib,n=e.Base,r=e.WordArray,i=t.algo,o=i.MD5,s=i.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n,i=this.cfg,a=i.hasher.create(),o=r.create(),s=o.words,u=i.keySize,c=i.iterations;s.length<u;){n&&a.update(n),n=a.update(t).finalize(e),a.reset();for(var l=1;l<c;l++)n=a.finalize(n),a.reset();o.concat(n)}return o.sigBytes=4*u,o}});t.EvpKDF=function(t,e,n){return s.create(n).compute(t,e)}}(),a.EvpKDF)}()},function(t,e,n){"use strict";var r=n(12);function i(t,e,n,r,i){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var a=i.prototype,o={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(t){o[t]={value:t}}),Object.defineProperties(i,o),Object.defineProperty(a,"isAxiosError",{value:!0}),i.from=function(t,e,n,o,s,u){var c=Object.create(a);return r.toFlatObject(t,c,function(t){return t!==Error.prototype}),i.call(c,t.message,e,n,o,s),c.name=t.name,u&&Object.assign(c,u),c},t.exports=i},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var h=n(15),d=n(9),p=function(t){(0,o.default)(n,t);var e=f(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).atoms=[],t}return(0,a.default)(n,[{key:"availableAtoms",value:function(){return[]}},{key:"addAtom",value:function(t){this.atoms.push(t)}},{key:"createAtom",value:function(t){var e=d.createAtom(t);return this.addAtom(e),e}},{key:"getAtoms",value:function(t){var e,n=[],r=c(this.atoms);try{for(r.s();!(e=r.n()).done;){var i=e.value;i.type()===t&&n.push(i)}}catch(t){r.e(t)}finally{r.f()}return n}},{key:"getAtom",value:function(t){var e,n=c(this.atoms);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.type()===t)return r}}catch(t){n.e(t)}finally{n.f()}return null}},{key:"parse",value:function(t){for(var e=t.length,n=0;n<e;){var r=t.readUInt32BE(n),i=t.toString("ascii",n+4,n+8);if(0===r)break;if(n+=8,-1!==this.availableAtoms().indexOf(i)){var a=d.createAtom(i);null!==a&&(a.parse(t.slice(n,n+r-8)),this.addAtom(a))}if(!(n+r-8<=e))break;n+=r-8}}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),e+=8;var n,r=c(this.atoms);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.build(t,e),e+=i.bufferSize()}}catch(t){r.e(t)}finally{r.f()}}},{key:"bufferSize",value:function(){return 8+this.atoms.reduce(function(t,e){return t+e.bufferSize()},0)}}]),n}(h);t.exports=p},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),function(){var t=i,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],a=0;a<n;a+=3)for(var o=(e[a>>>2]>>>24-a%4*8&255)<<16|(e[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|e[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s<n;s++)i.push(r.charAt(o>>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var n=t.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a<r.length;a++)i[r.charCodeAt(a)]=a}var o=r.charAt(64);if(o){var s=t.indexOf(o);-1!==s&&(n=s)}return function(t,n,r){for(var i=[],a=0,o=0;o<n;o++)if(o%4){var s=r[t.charCodeAt(o-1)]<<o%4*2,u=r[t.charCodeAt(o)]>>>6-o%4*2,c=s|u;i[a>>>2]|=c<<24-a%4*8,a++}return e.create(i,a)}(t,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),i.enc.Base64)}()},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),function(t){var e=i,n=e.lib,r=n.WordArray,a=n.Hasher,o=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=o.MD5=a.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=t[e+0],u=t[e+1],d=t[e+2],p=t[e+3],v=t[e+4],g=t[e+5],m=t[e+6],y=t[e+7],w=t[e+8],b=t[e+9],S=t[e+10],D=t[e+11],_=t[e+12],x=t[e+13],E=t[e+14],T=t[e+15],k=a[0],I=a[1],A=a[2],R=a[3];k=c(k,I,A,R,o,7,s[0]),R=c(R,k,I,A,u,12,s[1]),A=c(A,R,k,I,d,17,s[2]),I=c(I,A,R,k,p,22,s[3]),k=c(k,I,A,R,v,7,s[4]),R=c(R,k,I,A,g,12,s[5]),A=c(A,R,k,I,m,17,s[6]),I=c(I,A,R,k,y,22,s[7]),k=c(k,I,A,R,w,7,s[8]),R=c(R,k,I,A,b,12,s[9]),A=c(A,R,k,I,S,17,s[10]),I=c(I,A,R,k,D,22,s[11]),k=c(k,I,A,R,_,7,s[12]),R=c(R,k,I,A,x,12,s[13]),A=c(A,R,k,I,E,17,s[14]),k=l(k,I=c(I,A,R,k,T,22,s[15]),A,R,u,5,s[16]),R=l(R,k,I,A,m,9,s[17]),A=l(A,R,k,I,D,14,s[18]),I=l(I,A,R,k,o,20,s[19]),k=l(k,I,A,R,g,5,s[20]),R=l(R,k,I,A,S,9,s[21]),A=l(A,R,k,I,T,14,s[22]),I=l(I,A,R,k,v,20,s[23]),k=l(k,I,A,R,b,5,s[24]),R=l(R,k,I,A,E,9,s[25]),A=l(A,R,k,I,p,14,s[26]),I=l(I,A,R,k,w,20,s[27]),k=l(k,I,A,R,x,5,s[28]),R=l(R,k,I,A,d,9,s[29]),A=l(A,R,k,I,y,14,s[30]),k=f(k,I=l(I,A,R,k,_,20,s[31]),A,R,g,4,s[32]),R=f(R,k,I,A,w,11,s[33]),A=f(A,R,k,I,D,16,s[34]),I=f(I,A,R,k,E,23,s[35]),k=f(k,I,A,R,u,4,s[36]),R=f(R,k,I,A,v,11,s[37]),A=f(A,R,k,I,y,16,s[38]),I=f(I,A,R,k,S,23,s[39]),k=f(k,I,A,R,x,4,s[40]),R=f(R,k,I,A,o,11,s[41]),A=f(A,R,k,I,p,16,s[42]),I=f(I,A,R,k,m,23,s[43]),k=f(k,I,A,R,b,4,s[44]),R=f(R,k,I,A,_,11,s[45]),A=f(A,R,k,I,T,16,s[46]),k=h(k,I=f(I,A,R,k,d,23,s[47]),A,R,o,6,s[48]),R=h(R,k,I,A,y,10,s[49]),A=h(A,R,k,I,E,15,s[50]),I=h(I,A,R,k,g,21,s[51]),k=h(k,I,A,R,_,6,s[52]),R=h(R,k,I,A,p,10,s[53]),A=h(A,R,k,I,S,15,s[54]),I=h(I,A,R,k,u,21,s[55]),k=h(k,I,A,R,w,6,s[56]),R=h(R,k,I,A,T,10,s[57]),A=h(A,R,k,I,m,15,s[58]),I=h(I,A,R,k,x,21,s[59]),k=h(k,I,A,R,v,6,s[60]),R=h(R,k,I,A,D,10,s[61]),A=h(A,R,k,I,d,15,s[62]),I=h(I,A,R,k,b,21,s[63]),a[0]=a[0]+k|0,a[1]=a[1]+I|0,a[2]=a[2]+A|0,a[3]=a[3]+R|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,n,r,i,a,o){var s=t+(e&n|~e&r)+i+o;return(s<<a|s>>>32-a)+e}function l(t,e,n,r,i,a,o){var s=t+(e&r|n&~r)+i+o;return(s<<a|s>>>32-a)+e}function f(t,e,n,r,i,a,o){var s=t+(e^n^r)+i+o;return(s<<a|s>>>32-a)+e}function h(t,e,n,r,i,a,o){var s=t+(n^(e|~r))+i+o;return(s<<a|s>>>32-a)+e}e.MD5=a._createHelper(u),e.HmacMD5=a._createHmacHelper(u)}(Math),i.MD5)}()},function(t,e,n){var r=n(3).Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"===typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(r.isBuffer(t)){for(var e=new Uint8Array(t.length),n=t.length,i=0;i<n;i++)e[i]=t[i];return e.buffer}throw new Error("Argument must be a Buffer")}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(5)),o=r(n(6)),s=r(n(4));function u(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,o.default)(this,n)}}var c=function(t){(0,a.default)(n,t);var e=u(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).compositionOffset=0,t.keyframe=!1,t}return n}(n(45));t.exports=c},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(5)),o=r(n(6)),s=r(n(4));function u(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,o.default)(this,n)}}var c=function(t){(0,a.default)(n,t);var e=u(n);function n(){return(0,i.default)(this,n),e.call(this)}return n}(n(45));t.exports=c},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=4294967295,s=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"readUInt64BE",value:function(t,e){var n=t.readUInt32BE(e),r=t.readUInt32BE(e+4);return n>0&&(r+=n*(o+1)),r}},{key:"writeUInt64BE",value:function(t,e,n){var r=0,i=e;e>o&&(r=e/(o+1)<<0,i=e%(o+1)),t.writeUInt32BE(r,n),t.writeUInt32BE(i,n+4)}}]),t}();t.exports=s},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=function(t){(0,o.default)(n,t);var e=c(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).entries=[],t}return(0,a.default)(n,[{key:"countMultiplier",value:function(){return 1}},{key:"parse",value:function(t){var e=t.readUInt32BE(4);this.entries=new Array(e*this.countMultiplier());for(var n=0,r=this.entries.length;n<r;n++)this.entries[n]=t.readUInt32BE(8+4*n)}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.writeUInt32BE(this.entries.length/this.countMultiplier()<<0,e+12);for(var n=0,r=this.entries.length;n<r;n++)t.writeUInt32BE(this.entries[n],e+16+4*n)}},{key:"bufferSize",value:function(){return 16+4*this.entries.length}}]),n}(n(15));t.exports=l},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(20);function i(t){r.call(this,null==t?"canceled":t,r.ERR_CANCELED),this.name="CanceledError"}n(12).inherits(i,r,{__CANCEL__:!0}),t.exports=i},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(5)),o=r(n(6)),s=r(n(4));function u(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,s.default)(t);if(e){var i=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,o.default)(this,n)}}var c=function(t){(0,a.default)(n,t);var e=u(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).channels=null,t.sampleRate=null,t.sampleSize=null,t}return n}(n(44));t.exports=c},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=function(t){(0,o.default)(n,t);var e=c(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).width=0,t.height=0,t}return(0,a.default)(n,[{key:"resolution",value:function(){return this.width&&this.height?"".concat(this.width,"x").concat(this.height):""}}]),n}(n(44));t.exports=l},function(t,e,n){"use strict";(function(e){var r=n(0),i=r(n(1)),a=r(n(2)),o=n(47),s=n(190),u=n(191),c=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"create",value:function(t){return t instanceof o?t:t instanceof e?new u(t):new s(t)}}]),t}();t.exports=c}).call(this,n(3).Buffer)},function(t,e,n){"use strict";t.exports={CODEC_AAC:"aac",CODEC_H264:"h264",CODEC_H265:"h265"}},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),function(t){var e=i,n=e.lib,r=n.Base,a=n.WordArray,o=e.x64={};o.Word=r.extend({init:function(t,e){this.high=t,this.low=e}}),o.WordArray=r.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r<e;r++){var i=t[r];n.push(i.high),n.push(i.low)}return a.create(n,this.sigBytes)},clone:function(){for(var t=r.clone.call(this),e=t.words=this.words.slice(0),n=e.length,i=0;i<n;i++)e[i]=e[i].clone();return t}})}(),i)}()},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e._setSession=e._setCookie=e._sendEx=e._send=e._outData=e._multicall=e._intelliSchemeMulticall=e._intelliSchemeConfig=e._getSession=e._getCookie=e._dataEx=e._data=e._config=void 0,e.default=function(){this.Global=_.Global(),this.ConfigManager=_.ConfigManager(),this.UserManager=_.UserManager(),this.RecordFinder=_.RecordFinder(),this.DevInit=_.DevInit(),this.Security=_.Security(),this.System=_.System(),this.Encode=_.Encode(),this.MediaFileFind=_.MediaFileFind(),this.PTZ=_.PTZ(),this.WebInit=_.WebInit(),this.DevVideoInput=_.DevVideoInput(),this.MagicBox=_.MagicBox(),this.Storage=_.Storage(),this.LogicDeviceManager=_.LogicDeviceManager()},e.setIP=e.getIP=void 0;var i,a=r(n(25)),o=r(n(54)),s=(r(n(39)),n(136));function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){(0,a.default)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var l=1,f=0,h=null,d=function(){return f};e._getSession=d;var p=function(t){f=t};e._setSession=p;var v=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;return c(c({},{method:t,params:e,id:l++,session:d()}),n)};e._data=v;var g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;return c(c({},{method:t,params:e,id:l++,session:e.sessionId}),n)};e._dataEx=g;var m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;return c(c({},{method:t,params:e,id:l++}),n)};e._outData=m;var y=function(t){var e=t.name,n=void 0===e?[]:e,r=t.channel,i=t.params,a=t.options,o=void 0===a?[]:a,s=t.onlyLocal,u=t.type,c={method:"configManager.".concat(u),params:{name:n},id:l++,session:d()};return(r||0===r)&&(c.params.channel=r-0),null!==i&&void 0!==i&&(c.params.table=i),o&&(c.params.options=o),s&&(c.params.onlyLocal=s.onlyLocal),c};e._config=y;e._intelliSchemeConfig=function(t){var e=t.id,n=t.name,r=void 0===n?[]:n,i=t.channel,a=t.params,o=t.options,s=void 0===o?[]:o,u=t.onlyLocal,c=t.type,f={method:"intelliScheme.".concat(c),params:{name:r},id:l++,session:d()};return e&&(f.params.schemeID=e),(i||0===i)&&(f.params.channel=i-0),a&&(f.params.table=a),s&&(f.params.options=s),u&&(f.params.onlyLocal=u.onlyLocal),f};var w=function(t){var e=t.name,n=void 0===e?[]:e,r=t.channel,i=t.params,a=void 0===i?[]:i,o=t.options,s=void 0===o?[]:o,u=t.type;if(a.length&&n.length!==a.length)throw new Error("multicall params error");return{method:"system.multicall",params:n.map(function(t,e){var n={method:"configManager.".concat(u),params:{name:t},id:l++,session:d()};return(r||0===r)&&(n.params.channel=r-0),a[e]&&(n.params.table=a[e]),s&&(n.params.options=s),n}),id:l++,session:d()}};e._multicall=w;e._intelliSchemeMulticall=function(t){var e=t.id,n=t.name,r=void 0===n?[]:n,i=t.channel,a=t.params,o=void 0===a?[]:a,s=t.options,u=void 0===s?[]:s,c=t.type;if(o.length&&r.length!==o.length)throw new Error("multicall params error");return{method:"system.multicall",params:r.map(function(t,n){var r={method:"intelliScheme.".concat(c),params:{name:t},id:l++,session:d()};return e&&(r.params.schemeID=e),(i||0===i)&&(r.params.channel=i-0),o[n]&&(r.params.table=o[n]),u&&(r.params.options=u),r}),id:l++,session:d()}};var b=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/RPC2";return new Promise(function(n,r){(0,o.default)({method:"POST",url:e,headers:{"Content-Type":"application/json","Self-TargetIP":h},data:JSON.stringify(t),dataType:"json"}).then(function(i){(i=i.data).result?(i=i.params&&"/RPC2_Login"!==e?i.params.table?i.params.table:i.params:i,n(i)):i.error&&i.error.code&&(287637504===i.error.code||287637505===i.error.code)?("global.keepAlive"!==t.method&&(0,s.reload)(),r(i)):r(i)}).catch(function(e){e.error&&e.error.code&&(287637504===e.error.code||287637505===e.error.code)?("global.keepAlive"!==t.method&&(0,s.reload)(),r(e)):r(e)})})};e._send=b;var S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/RPC2";return new Promise(function(n,r){(0,o.default)({method:"POST",url:e,headers:{"Content-Type":"application/json","Self-TargetIP":t.params.targetIP},data:JSON.stringify(t),dataType:"json"}).then(function(i){(i=i.data).result?(i=i.params&&"/RPC2_Login"!==e?i.params.table?i.params.table:i.params:i,n(i)):i.error&&i.error.code&&(287637504===i.error.code||287637505===i.error.code)?("global.keepAlive"!==t.method&&(0,s.reload)(),r(i)):r(i)}).catch(function(e){e.error&&e.error.code&&(287637504===e.error.code||287637505===e.error.code)?("global.keepAlive"!==t.method&&(0,s.reload)(),r(e)):r(e)})})};e._sendEx=S;var D=function(t,e,n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3);var i="expires="+r.toUTCString();document.cookie=t+"="+e+"; "+i};e._setCookie=D;e._getCookie=function(t){for(var e=t+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1);if(-1!==i.indexOf(e))return i.substring(e.length,i.length)}return""};e.setIP=function(t){h=t};e.getIP=function(){return h};var _=(i={},(0,a.default)(i,"Global",function(){return{firstLogin:function(t,e){var n={method:"global.login",params:c(c({},{userName:t,password:"",clientType:"Web5.0"}),e),id:l++};return b(n,"/RPC2_Login").catch(function(t){return p(t.session),t})},secondLogin:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;return new Promise(function(i,a){b(v("global.login",c(c({},{userName:t,password:e,clientType:"Web5.0"}),n)),"/RPC2_Login").then(function(e){p(e.session),r?D("WebClientSessionID","",-1):D("WebClientSessionID",d()),D("username",t),i(e)}).catch(function(t){a(t)})})},logout:function(){return b(v("global.logout"))},keepAlive:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return S(g("global.keepAlive",{timeout:t,active:!0,sessionId:e,targetIP:n})).then(function(t){return t})},getCurrentTime:function(){return b(v("global.getCurrentTime")).then(function(t){return t.time})},setCurrentTime:function(t,e){return b(v("global.setCurrentTime",{time:t,tolerance:e}))}}}),(0,a.default)(i,"ConfigManager",function(){return{getConfig:function(t,e,n,r){return"[object Object]"===Object.prototype.toString.call(t)?b(y(c(c({},t),{},{type:"getConfig"}))):t instanceof Array?b(w({name:t,channel:e,params:n,type:"getConfig"})):b(y({name:t,channel:e,params:n,onlyLocal:r,type:"getConfig"}))},setConfig:function(t,e,n,r){return"[object Object]"===Object.prototype.toString.call(t)?b(y(c(c({},t),{},{type:"setConfig"}))):t instanceof Array?b(w({name:t,channel:n,params:e,type:"setConfig",options:r})):b(y({name:t,channel:n,params:e,type:"setConfig",options:r}))},getDefault:function(t,e,n){return"[object Object]"===Object.prototype.toString.call(t)?b(y(c(c({},t),{},{type:"getDefault"}))):t instanceof Array?b(w({name:t,channel:e,params:n,type:"getDefault"})):b(y({name:t,channel:e,params:n,type:"getDefault"}))},instance:function(){return b(v("configManager.factory.instance"))},destroy:function(t){return b(v("configManager.destroy",null,{object:t}))},exportPackConfig:function(t){return b(v("configManager.exportPackConfig",null,{object:t}))},restoreExcept:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;return b(v("configManager.restoreExcept",t,{object:e}))},deleteFile:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;return b(v("configManager.deleteFile",t,{object:e}))},restore:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;return b(v("configManager.restore",t,{object:e}))},setTemporaryConfig:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;if(t instanceof Array){var n=[];return t.map(function(t){n.push(v("configManager.setTemporaryConfig",t,e))}),b(v("system.multicall",n))}return b(v("configManager.setTemporaryConfig",t,{object:e}))},restoreTemporaryConfig:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;if(t instanceof Array){var n=[];return t.map(function(t){n.push(v("configManager.restoreTemporaryConfig",t,e))}),b(v("system.multicall",n))}return b(v("configManager.restoreTemporaryConfig",t,{object:e}))},saveFile:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("configManager.saveFile",t))}}}),(0,a.default)(i,"UserManager",function(){return{getAuthorityList:function(){return b(v("userManager.getAuthorityList"))},getTemporaryToken:function(t){return b(v("userManager.getTemporaryToken",t))},getCaps:function(t){return b(v("userManager.getCaps",null,{object:t}))},addGroup:function(t){return b(v("userManager.addGroup",{group:t}))},deleteGroup:function(t){return b(v("userManager.deleteGroup",{name:t}))},modifyGroup:function(t,e){return b(v("userManager.modifyGroup",{name:t,group:e}))},getGroupInfo:function(t){return b(v("userManager.getGroupInfo",{name:t}))},getGroupInfoAll:function(){return b(v("userManager.getGroupInfoAll"))},addUser:function(t){return b(v("userManager.addUser",{user:t}))},deleteUser:function(t){return b(v("userManager.deleteUser",{name:t}))},modifyUser:function(t,e){return b(v("userManager.modifyUser",{name:t,user:e}))},modifyPassword:function(t,e,n){return b(v("userManager.modifyPassword",{name:t,pwd:e,pwdOld:n}))},modifyPasswordByManager:function(t){var e=t.name,n=t.pwd,r=t.nameManager,i=t.pwdManager,a=t.accountType;return b(v("userManager.modifyPasswordByManager",{name:e,pwd:n,nameManager:r,pwdManager:i,accountType:a}))},getUserInfo:function(t){return b(v("userManager.getUserInfo",{name:t}))},getErrorNo:function(){return b(v("userManager.getErrorNo"))},getUserInfoAll:function(){return b(v("userManager.getUserInfoAll"))},setDefault:function(){return b(v("userManager.setDefault"))},getActiveUserInfoAll:function(){return b(v("userManager.getActiveUserInfoAll"))},getAnonymityInfo:function(t){return b(v("userManager.getUserInfo",t))}}}),(0,a.default)(i,"RecordFinder",function(){return{create:function(t){return b(v("RecordFinder.factory.create",{name:t}))},destroy:function(t){return b(v("RecordFinder.destroy",null,{object:t}))},startFind:function(t,e){return b(v("RecordFinder.startFind",{condition:t},{object:e}))},doFind:function(t,e){return b(v("RecordFinder.doFind",{count:t},{object:e}))},doSeekFind:function(t,e,n){return b(v("RecordFinder.doSeekFind",{offset:t,count:e},{object:n}))},stopFind:function(t){return b(v("RecordFinder.stopFind",null,{object:t}))},getQuerySize:function(t){return b(v("RecordFinder.getQuerySize",null,{object:t}))}}}),(0,a.default)(i,"DevVideoInput",function(){return{instance:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return b(v("devVideoInput.factory.instance",{channel:t}))},getFocusPresets:function(t){return b(v("devVideoInput.getFocusPresets",null,{object:t}))},setFocusPreset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.setFocusPreset",e,{object:t}))},removeFocusPreset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.setFocusPreset",e,{object:t}))},gotoFocusPreset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.setFocusPreset",e,{object:t}))},getCollect:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("devVideoInput.factory.getCollect",t))},destroy:function(t){return b(v("devVideoInput.destroy",null,{object:t}))},getCaps:function(t){return b(v("devVideoInput.getCaps",null,{object:t}))},getFocusStatus:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.getFocusStatus",e,{object:t}))},getVideoInStatus:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.getVideoInStatus",e,{object:t}))},adjustFocus:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.adjustFocus",e,{object:t}))},stopAutoFocus:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.stopAutoFocus",e,{object:t}))},autoFocus:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.autoFocus",e,{object:t}))},focusRegion:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.focusRegion",e,{object:t}))},adjustFocusContinuously:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("devVideoInput.adjustFocusContinuously",e,{object:t}))},getCapsEx:function(t,e){return b(v("devVideoInput.getCapsEx",e,{object:t}))},getFishEyeWinInfo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return b(v("devVideoInput.getFishEyeWinInfo",{winIdSet:t,channel:e}))},setFishEyeEPtz:function(t,e,n,r,i,a){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;return b(v("devVideoInput.setFishEyeEPtz",{winID:t,cmd:e,arg1:n,arg2:r,arg3:i,arg4:a,channel:o}))},resetFocusOptions:function(t,e){return b(v("devVideoInput.resetFocusOptions",e,{object:t}))}}}),(0,a.default)(i,"DevInit",function(){return{getStatus:function(){return b(m("DevInit.getStatus"),"/OutsideCmd")},account:function(t){var e=t.cipher,n=t.salt,r=t.content;return b(m("DevInit.account",{cipher:e,salt:n,content:r}),"/OutsideCmd")},getDevCaps:function(){return b(m("DevInit.getDevCaps"),"/OutsideCmd")},setCurrentTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("DevInit.setCurrentTime",t),"/OutsideCmd")},setLocalityConfig:function(t){var e=t.cipher,n=t.salt,r=t.content;return b(v("DevInit.setLocalityConfig",{cipher:e,salt:n,content:r}),"/OutsideCmd")},getLocalityConfig:function(){return b(m("DevInit.getLocalityConfig"),"/OutsideCmd")},getCurrentTime:function(){return b(m("DevInit.getCurrentTime",{}),"/OutsideCmd")},access:function(t){var e=t.salt,n=t.cipher,r=t.content;return b(m("DevInit.access",{salt:e,cipher:n,content:r}),"/OutsideCmd")}}}),(0,a.default)(i,"Security",function(){return{getEncryptInfo:function(){return b(v("Security.getEncryptInfo"))},getEncryptInfoOut:function(){return b(m("Security.getEncryptInfo"),"/OutsideCmd")},getConfig:function(t){var e=t.cipher,n=t.salt,r=t.content;return b(v("Security.getConfig",{cipher:e,salt:n,content:r}))},setConfig:function(t){var e=t.cipher,n=t.salt,r=t.content;return b(v("Security.setConfig",{cipher:e,salt:n,content:r}))},getDefault:function(t){var e=t.cipher,n=t.salt,r=t.content;return b(v("configManager.secGetDefault",{cipher:e,salt:n,content:r}))},addUser:function(t){var e=t.cipher,n=t.salt,r=t.content;return b(v("Security.addUser",{cipher:e,salt:n,content:r}))},addUserPlain:function(t){var e=t.cipher,n=t.salt,r=t.content;return b(v("Security.addUserPlain",{cipher:e,salt:n,content:r}))},modifyPasswordPlain:function(t){var e=t.cipher,n=t.salt,r=t.content;return b(v("Security.modifyPasswordPlain",{cipher:e,salt:n,content:r}))},getCaps:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("Security.getCaps",t))}}}),(0,a.default)(i,"System",function(){return{multiSec:function(t){var e=t.cipher,n=t.salt,r=t.content;return b(v("system.multiSec",{cipher:e,salt:n,content:r}))},multicall:function(t){return t.forEach(function(t){t.id=l++,t.session=d()}),b(v("system.multicall",t))},listMethod:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("system.listMethod",t))}}}),(0,a.default)(i,"Encode",function(){return{getConfigCaps:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("encode.getConfigCaps",t))},getCropCaps:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{channel:0};return b(v("encode.getCropCaps",t))},getSmartCaps:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("encode.getSmartCaps",t))},getCaps:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("encode.getCaps",t))},updateOverlayPicture:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("encode.updateOverlayPicture",t))},getFlexStreamCaps:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("encode.getFlexStreamCaps",t))},getNAACaps:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("encode.getNAACaps",t))}}}),(0,a.default)(i,"MediaFileFind",function(){return{instance:function(){return b(v("mediaFileFind.factory.create"))},destroy:function(t,e){return b(v("mediaFileFind.destroy",e,{object:t}))},close:function(t,e){return b(v("mediaFileFind.close",e,{object:t}))},getCount:function(t,e){return b(v("mediaFileFind.getCount",e,{object:t}))},setQueryResultOptions:function(t,e){return b(v("mediaFileFind.setQueryResultOptions",e,{object:t}))},findFile:function(t,e){return b(v("mediaFileFind.findFile",e,{object:t}))},findNextFile:function(t,e){return b(v("mediaFileFind.findNextFile",e,{object:t}))}}}),(0,a.default)(i,"PTZ",function(){return{instance:function(t){return b(v("ptz.factory.instance",{channel:t}))},destroy:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.destroy",e,{object:t}))},start:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.start",e,{object:t}))},getPresets:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.getPresets",e,{object:t}))},setDirection:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.setDirection",e,{object:t}))},getTours:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.getTours",e,{object:t}))},stop:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.stop",e,{object:t}))},restartPtz:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.restartPtz",e,{object:t}))},lensInit:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.lensInit",e,{object:t}))},reset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.reset",e,{object:t}))},markLimit:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.markLimit",e,{object:t}))},gotoLimit:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.gotoLimit",e,{object:t}))},enableLimit:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.enableLimit",e,{object:t}))},setScanLimit:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.setScanLimit",e,{object:t}))},startScan:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.startScan",e,{object:t}))},stopScan:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.stopScan",e,{object:t}))},getCurrentProtocolCaps:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.getCurrentProtocolCaps",e,{object:t}))},removePreset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.removePreset",e,{object:t}))},setPreset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.setPreset",e,{object:t}))},gotoPreset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.gotoPreset",e,{object:t}))},startPatternReplay:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.startPatternReplay",e,{object:t}))},stopPatternReplay:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.stopPatternReplay",e,{object:t}))},startPatternRecord:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.startPatternRecord",e,{object:t}))},stopPatternRecord:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.stopPatternRecord",e,{object:t}))},startTour:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.startTour",e,{object:t}))},stopTour:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.stopTour",e,{object:t}))},focusRegion:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.focusRegion",e,{object:t}))},getOperationStatus:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.getOperationStatus",e,{object:t}))},getLifetimeEncrypt:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.getLifetimeEncrypt",e,{object:t}))},moveDirectly:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.moveDirectly",e,{object:t}))},getProtocolList:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.getProtocolList",e,{object:t}))},getProtocol:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.getProtocol",e,{object:t}))},getStatus:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.getStatus",e,{object:t}))},moveAbsolutely:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return b(v("ptz.moveAbsolutely",e,{object:t}))}}}),(0,a.default)(i,"WebInit",function(){return{getCaps:function(){return b(m("WebInit.getCaps",null),"/OutsideCmd")}}}),(0,a.default)(i,"MagicBox",function(){return{instance:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("magicBox.factory.instance",t))},getProductDefinition:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return b(v("magicBox.getProductDefinition",{name:t}))}}}),(0,a.default)(i,"Storage",function(){return{instance:function(){return b(v("storage.factory.instance"))},destroy:function(t,e){return b(v("storage.destroy",e,{object:t}))},getDeviceNames:function(t,e){return b(v("storage.getDeviceNames",e,{object:t}))},getGroupNames:function(t,e){return b(v("storage.getGroupNames",e,{object:t}))},getDirectoryPaths:function(t,e){return b(v("storage.getDirectoryPaths",e,{object:t}))},getFileInfo:function(t,e){return b(v("storage.getFileInfo",e,{object:t}))},addFileInfo:function(t,e){return b(v("storage.addFileInfo",e,{object:t}))},attachAddFileInfoState:function(t,e){return b(v("storage.attachAddFileInfoState",e,{object:t}))},detachAddFileInfoState:function(t,e){return b(v("storage.detachAddFileInfoState",e,{object:t}))},markFile:function(t){return b(v("storage.markFile",t))},getiSCSITargets:function(t,e){return b(v("storage.getiSCSITargets",e,{object:t}))},secGetiSCSITargets:function(t,e){return b(v("storage.secGetiSCSITargets",e,{object:t}))},getPortInfo:function(t,e){return b(v("storage.getPortInfo",e,{object:t}))},getStreamUri:function(t,e){return b(v("storage.getStreamUri",e,{object:t}))},testNAS:function(t,e){return b(v("storage.testNAS",e,{object:t}))},secTestNAS:function(t,e){return b(v("storage.secTestNAS",e,{object:t}))},getBoundTime:function(t,e){return b(v("storage.getBoundTime",e,{object:t}))},getBoundTimeEx:function(t,e){return b(v("storage.getBoundTimeEx",e,{object:t}))},getBitmap:function(t,e){return b(v("storage.getBitmap",e,{object:t}))},getBitmapEx:function(t,e){return b(v("storage.getBitmapEx",e,{object:t}))},getiSCSITargetsAll:function(t,e){return b(v("storage.getiSCSITargetsAll",e,{object:t}))},getCaps:function(t,e){return b(v("storage.getCaps",e,{object:t}))},attachRecordInfo:function(t,e){return b(v("storage.attachRecordInfo",e,{object:t}))},detachRecordInfo:function(t,e){return b(v("storage.detachRecordInfo",e,{object:t}))},getDeviceAllInfo:function(t,e){return b(v("storage.getDeviceAllInfo",e,{object:t}))},getTankInfo:function(t,e){return b(v("storage.getTankInfo",e,{object:t}))},startHealthcheck:function(t,e){return b(v("storage.startHealthcheck",e,{object:t}))},getHealthcheckProcess:function(t,e){return b(v("storage.getHealthcheckProcess",e,{object:t}))},getHealthStatusEx:function(t,e){return b(v("storage.getHealthStatusEx",e,{object:t}))}}}),(0,a.default)(i,"LogicDeviceManager",function(){return{getCameraAll:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return b(v("LogicDeviceManager.getCameraAll",{params:t}))}}}),i)},function(t,e,n){"use strict";(function(e){var r=n(12),i=n(120),a=n(20),o=n(58),s=n(59),u={"Content-Type":"application/x-www-form-urlencoded"};function c(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var l={transitional:o,adapter:function(){var t;return"undefined"!==typeof XMLHttpRequest?t=n(60):"undefined"!==typeof e&&"[object process]"===Object.prototype.toString.call(e)&&(t=n(60)),t}(),transformRequest:[function(t,e){if(i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t))return t;if(r.isArrayBufferView(t))return t.buffer;if(r.isURLSearchParams(t))return c(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var n,a=r.isObject(t),o=e&&e["Content-Type"];if((n=r.isFileList(t))||a&&"multipart/form-data"===o){var u=this.env&&this.env.FormData;return s(n?{"files[]":t}:t,u&&new u)}return a||"application/json"===o?(c(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(e||JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||l.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw a.from(t,a.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(131)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(t){l.headers[t]={}}),r.forEach(["post","put","patch"],function(t){l.headers[t]=r.merge(u)}),t.exports=l}).call(this,n(57))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={},i=-1,a={publish:function(t,e){if(!r[t])return!1;for(var n=r[t],i=n?n.length:0;i--;)n[i].func(e);return this},subscribe:function(t,e){r[t]||(r[t]=[]);var n=(++i).toString();return r[t].push({token:n,func:e}),n},unsubscribe:function(t){for(var e in r)if(r[e])for(var n=0,i=r[e].length;n<i;n++)if(r[e][n].token===t)return r[e].splice(n,1),t},getTopicFunc:function(t){return r[t]?r[t]:[]}};e.default=a},function(t,e,n){"use strict";n.r(e),n.d(e,"SM2",function(){return E}),n.d(e,"SM3",function(){return y}),n.d(e,"SM4",function(){return L});var r=n(24),i=n.n(r),a=n(3),o=n(8),s=o.BigInteger.prototype.Barrett;function u(t,e){this.x=e,this.q=t}function c(t,e,n,r){this.curve=t,this.x=e,this.y=n,this.z=null==r?o.BigInteger.ONE:r,this.zinv=null}function l(t,e,n){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(n),this.infinity=new c(this,null,null),this.reducer=new s(this.q)}u.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.x.equals(t.x)},u.prototype.toBigInteger=function(){return this.x},u.prototype.negate=function(){return new u(this.q,this.x.negate().mod(this.q))},u.prototype.add=function(t){return new u(this.q,this.x.add(t.toBigInteger()).mod(this.q))},u.prototype.subtract=function(t){return new u(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))},u.prototype.multiply=function(t){return new u(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))},u.prototype.square=function(){return new u(this.q,this.x.square().mod(this.q))},u.prototype.divide=function(t){return new u(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))},c.prototype.getX=function(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var t=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(t),this.curve.fromBigInteger(t)},c.prototype.getY=function(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var t=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(t),this.curve.fromBigInteger(t)},c.prototype.equals=function(t){return t==this||(this.isInfinity()?t.isInfinity():t.isInfinity()?this.isInfinity():!!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(o.BigInteger.ZERO)&&t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(o.BigInteger.ZERO))},c.prototype.isInfinity=function(){return null==this.x&&null==this.y||this.z.equals(o.BigInteger.ZERO)&&!this.y.toBigInteger().equals(o.BigInteger.ZERO)},c.prototype.negate=function(){return new c(this.curve,this.x,this.y.negate(),this.z)},c.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q),n=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q);if(o.BigInteger.ZERO.equals(n))return o.BigInteger.ZERO.equals(e)?this.twice():this.curve.getInfinity();var r=new o.BigInteger("3"),i=this.x.toBigInteger(),a=this.y.toBigInteger(),s=(t.x.toBigInteger(),t.y.toBigInteger(),n.square()),u=s.multiply(n),l=i.multiply(s),f=e.square().multiply(this.z),h=f.subtract(l.shiftLeft(1)).multiply(t.z).subtract(u).multiply(n).mod(this.curve.q),d=l.multiply(r).multiply(e).subtract(a.multiply(u)).subtract(f.multiply(e)).multiply(t.z).add(e.multiply(u)).mod(this.curve.q),p=u.multiply(this.z).multiply(t.z).mod(this.curve.q);return new c(this.curve,this.curve.fromBigInteger(h),this.curve.fromBigInteger(d),p)},c.prototype.twice=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=new o.BigInteger("3"),e=this.x.toBigInteger(),n=this.y.toBigInteger(),r=n.multiply(this.z),i=r.multiply(n).mod(this.curve.q),a=this.curve.a.toBigInteger(),s=e.square().multiply(t);o.BigInteger.ZERO.equals(a)||(s=s.add(this.z.square().multiply(a)));var u=(s=s.mod(this.curve.q)).square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.q),l=s.multiply(t).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(s.square().multiply(s)).mod(this.curve.q),f=r.square().multiply(r).shiftLeft(3).mod(this.curve.q);return new c(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(l),f)},c.prototype.multiply=function(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,n=t,r=n.multiply(new o.BigInteger("3")),i=this.negate(),a=this;for(e=r.bitLength()-2;e>0;--e){a=a.twice();var s=r.testBit(e);s!=n.testBit(e)&&(a=a.add(s?this:i))}return a},c.prototype.multiplyTwo=function(t,e,n){var r;r=t.bitLength()>n.bitLength()?t.bitLength()-1:n.bitLength()-1;for(var i=this.curve.getInfinity(),a=this.add(e);r>=0;)i=i.twice(),t.testBit(r)?i=n.testBit(r)?i.add(a):i.add(this):n.testBit(r)&&(i=i.add(e)),--r;return i},l.prototype.getQ=function(){return this.q},l.prototype.getA=function(){return this.a},l.prototype.getB=function(){return this.b},l.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)},l.prototype.getInfinity=function(){return this.infinity},l.prototype.fromBigInteger=function(t){return new u(this.q,t)},l.prototype.reduce=function(t){this.reducer.reduce(t)},l.prototype.decodePointHex=function(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var e=(t.length-2)/2,n=t.substr(2,e),r=t.substr(e+2,e);return new c(this,this.fromBigInteger(new o.BigInteger(n,16)),this.fromBigInteger(new o.BigInteger(r,16)));default:return null}},l.prototype.encodePointHex=function(t){if(t.isInfinity())return"00";var e=t.getX().toBigInteger().toString(16),n=t.getY().toBigInteger().toString(16),r=this.getQ().toString(16).length;for(r%2!=0&&r++;e.length<r;)e="0"+e;for(;n.length<r;)n="0"+n;return"04"+e+n};var f=function(t,e){return t<<(e%=32)|t>>>32-e},h=function(t,e){var n=e-t.length;return(n>0?"0".repeat(n):"")+t},d=function(t){return t<16?2043430169:2055708042},p=function(t,e,n,r){return r<16?t^e^n:t&e|t&n|e&n},v=function(t,e,n,r){return r<16?t^e^n:t&e|~t&n},g=function(t,e,n){for(var r,i,a,o,s,u=function(t){var e,n=new Array(132);t.forEach(function(t,e){n[e]=t});for(var r=16;r<68;r++)n[r]=(e=n[r-16]^n[r-9]^f(n[r-3],15))^f(e,15)^f(e,23)^f(n[r-13],7)^n[r-6];for(var i=0;i<64;i++)n[i+68]=n[i]^n[i+4];return n}(e),c=t[0],l=t[1],h=t[2],g=t[3],m=t[4],y=t[5],w=t[6],b=t[7],S=0;S<64;S++)i=(r=f(f(c,12)+m+f(d(S),S),7))^f(c,12),a=p(c,l,h,S)+g+i+u[S+68],o=v(m,y,w,S)+b+r+u[S],g=h,h=f(l,9),l=c,c=a,b=w,w=f(y,19),y=m,m=(s=o)^f(s,9)^f(s,17);return[c^t[0],l^t[1],h^t[2],g^t[3],m^t[4],y^t[5],w^t[6],b^t[7]]},m=function(t,e,n){if("string"==typeof t?t=a.Buffer.from(t,e||"utf8"):t instanceof ArrayBuffer&&(t=a.Buffer.from(t)),!a.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');var r,o,s,u,c,l;r=t,o=a.Buffer.alloc(1,128),u=a.Buffer.alloc(s=(s=r.length%64)>=56?64-s%56-1:56-s-1,0),c=a.Buffer.alloc(8),l=8*r.length,c.writeUInt32BE(Math.floor(l/Math.pow(2,32)),0),c.writeUInt32BE(l%Math.pow(2,32),4);for(var f=(t=a.Buffer.concat([r,o,u,c],r.length+1+s+8)).length/64,h=new Array(f),d=0;d<f;d++){h[d]=new Array(16);for(var p=0;p<16;p++)h[d][p]=t.readUInt32BE(64*d+4*p)}var v=new Array(f);v[0]=[1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214];for(var m=0;m<f;m++)v[m+1]=g(v[m],h[m]);var y=a.Buffer.alloc(32);return v[f].forEach(function(t,e){return y.writeInt32BE(t,4*e)}),n?y.toString(n):i()(y)},y={__proto__:null,digest:m},w=new o.SecureRandom,b=function(){var t=new l(new o.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),new o.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),new o.BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16)),e=t.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:t,G:e,n:new o.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}(),S=b.curve,D=b.G,_=b.n;function x(t,e){for(var n=[],r=Math.ceil(e/32),i=e%32,o=1;o<=r;o++){var s=a.Buffer.allocUnsafe(4);s.writeUInt32BE(o);var u=m(a.Buffer.concat([t,s]));n.push(o===r&&i?a.Buffer.from(u).slice(0,i):a.Buffer.from(u))}return a.Buffer.concat(n,e)}var E={__proto__:null,constants:{C1C2C3:0,C1C3C2:1,PC:"04"},generateKeyPair:function(){var t=new o.BigInteger(_.bitLength(),w).mod(_.subtract(new o.BigInteger("2"))).add(o.BigInteger.ONE),e=h(t.toString(16),64),n=D.multiply(t);return{privateKey:e,publicKey:"04"+h(n.getX().toBigInteger().toString(16),64)+h(n.getY().toBigInteger().toString(16),64)}},encrypt:function(t,e,n){var r=n||{},s=r.mode,u=void 0===s?1:s,c=r.outputEncoding,l=r.pc;if("string"==typeof t?t=a.Buffer.from(t,r.inputEncoding||"utf8"):t instanceof ArrayBuffer&&(t=a.Buffer.from(t)),!a.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');var f=new o.BigInteger(_.bitLength(),w).mod(_.subtract(o.BigInteger.ONE)).add(o.BigInteger.ONE),d=D.multiply(f),p=h(d.getX().toBigInteger().toString(16),64)+h(d.getY().toBigInteger().toString(16),64),v=S.decodePointHex(e).multiply(f),g=h(v.getX().toBigInteger().toString(16),64),y=h(v.getY().toBigInteger().toString(16),64),b=x(a.Buffer.from(g+y,"hex"),t.length),E=h(new o.BigInteger(t.toString("hex"),16).xor(new o.BigInteger(b.toString("hex"),16)).toString(16),2*t.length),T=m(g+t.toString("hex")+y,"hex","hex"),k=a.Buffer.from((l?"04":"")+(0===u?p+E+T:p+T+E),"hex");return c?k.toString(c):i()(k)},decrypt:function(t,e,n){var r=n||{},s=r.mode,u=void 0===s?1:s,c=r.outputEncoding,l=r.pc;if("string"==typeof t?t=a.Buffer.from(t,r.inputEncoding):t instanceof ArrayBuffer&&(t=a.Buffer.from(t)),!a.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');var f=(t=l?t.slice(1):t).slice(0,32).toString("hex"),d=t.slice(32,64).toString("hex"),p=S.decodePointHex("04"+f+d).multiply(new o.BigInteger(e,16)),v=h(p.getX().toBigInteger().toString(16),64),g=h(p.getY().toBigInteger().toString(16),64),y=t.slice(64,96),w=t.slice(96);0===u&&(y=t.slice(t.length-32),w=t.slice(64,t.length-32));var b=x(a.Buffer.from(v+g,"hex"),w.length),D=new o.BigInteger(w.toString("hex"),16).xor(new o.BigInteger(b.toString("hex"),16)).toString(16),_=m(v+D+g,"hex","hex")===y.toString("hex")?a.Buffer.from(D,"hex"):a.Buffer.alloc(0);return c?_.toString(c):i()(_)}},T=[[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5],[43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153],[156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98],[228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166],[71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168],[104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53],[30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135],[212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158],[234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161],[224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227],[29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111],[213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81],[141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216],[10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176],[137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132],[24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]],k=[2746333894,1453994832,1736282519,2993693404],I=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257],A=/^[0-9a-f]{32}$/i,R=function(t){return T[(4026531840&t)>>>28][(251658240&t)>>>24]<<24|T[(15728640&t)>>>20][(983040&t)>>>16]<<16|T[(61440&t)>>>12][(3840&t)>>>8]<<8|T[(240&t)>>>4][(15&t)>>>0]<<0},M=function(t){return(e=R(t))^f(e,2)^f(e,10)^f(e,18)^f(e,24);var e},C=function(t){var e,n=new Array(36);n[0]=t[0]^k[0],n[1]=t[1]^k[1],n[2]=t[2]^k[2],n[3]=t[3]^k[3];for(var r=new Array(32),i=0;i<32;i++)n[i+4]=n[i]^(e=R(n[i+1]^n[i+2]^n[i+3]^I[i]))^f(e,13)^f(e,23),r[i]=n[i+4];return r},P=function(t,e){for(var n=C(e),r=0;r<32;r++)t[r+4]=t[r]^M(t[r+1]^t[r+2]^t[r+3]^n[r]);return[t[35],t[34],t[33],t[32]]},O=function(t,e){for(var n=C(e).reverse(),r=0;r<32;r++)t[r+4]=t[r]^M(t[r+1]^t[r+2]^t[r+3]^n[r]);return[t[35],t[34],t[33],t[32]]},B=function(t){return[t.readInt32BE(0),t.readInt32BE(4),t.readInt32BE(8),t.readInt32BE(12)]},F=function(t){for(var e=a.Buffer.alloc(16),n=0;n<4;n++)e.writeInt32BE(t[n],4*n);return e},L={__proto__:null,constants:{ECB:1,CBC:2},encrypt:function(t,e,n){var r=n||{},o=r.mode,s=r.iv,u=r.outputEncoding;if("string"==typeof t?t=a.Buffer.from(t,r.inputEncoding||"utf8"):t instanceof ArrayBuffer&&(t=a.Buffer.from(t)),!a.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');if(!A.test(e))throw new TypeError("Invalid value of cipher `key`");if(e=a.Buffer.from(e,"hex"),2===o&&!A.test(s))throw new TypeError("Invalid value of `iv` option");return function(t,e,n,r){n&&(n=B(n)),e=B(e);for(var o=[],s=(t=function(t){var e=16-t.length%16,n=a.Buffer.alloc(e,e);return a.Buffer.concat([t,n],t.length+e)}(t)).length/16,u=0;u<s;u++)if(n){var c=16*u,l=[n[0]^t.readInt32BE(c),n[1]^t.readInt32BE(c+4),n[2]^t.readInt32BE(c+8),n[3]^t.readInt32BE(c+12)],f=P(l,e);o.push(F(f)),n=f.slice(0)}else{var h=16*u,d=[t.readInt32BE(h),t.readInt32BE(h+4),t.readInt32BE(h+8),t.readInt32BE(h+12)],p=P(d,e);o.push(F(p))}var v=a.Buffer.concat(o,t.length);return r?v.toString(r):i()(v)}(t,e,s=2===o?a.Buffer.from(s,"hex"):null,u)},decrypt:function(t,e,n){var r=n||{},o=r.mode,s=r.iv,u=r.outputEncoding;if("string"==typeof t?t=a.Buffer.from(t,r.inputEncoding):t instanceof ArrayBuffer&&(t=a.Buffer.from(t)),!a.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');if(!A.test(e))throw new TypeError("Invalid value of cipher `key`");if(e=a.Buffer.from(e,"hex"),2===o&&!A.test(s))throw new TypeError("Invalid value of `iv` option");return function(t,e,n,r){n&&(n=B(n)),e=B(e);var o=[],s=t.length/16;if(n)for(var u=s-1;u>=0;u--){var c,l=16*u;c=u>0?[t.readInt32BE(l-16),t.readInt32BE(l-16+4),t.readInt32BE(l-16+8),t.readInt32BE(l-16+12)]:n;var f=[t.readInt32BE(l),t.readInt32BE(l+4),t.readInt32BE(l+8),t.readInt32BE(l+12)],h=O(f,e);o.unshift(F([h[0]^c[0],h[1]^c[1],h[2]^c[2],h[3]^c[3]]))}else for(var d=0;d<s;d++){var p=16*d,v=[t.readInt32BE(p),t.readInt32BE(p+4),t.readInt32BE(p+8),t.readInt32BE(p+12)],g=O(v,e);o.push(F(g))}var m=a.Buffer.concat(o,t.length-o[o.length-1][15]);return r?m.toString(r):i()(m)}(t,e,s=2===o?a.Buffer.from(s,"hex"):null,u)}}},function(t,e){t.exports={InvalidAsn1Error:function(t){var e=new Error;return e.name="InvalidAsn1Error",e.message=t||"",e}}},function(t,e){t.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2));function o(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var u=n(32),c=n(33),l=function(){function t(){(0,i.default)(this,t),this.duration=0,this.timescale=0,this.tracks=[]}return(0,a.default)(t,[{key:"relativeDuration",value:function(){return this.timescale?this.duration/this.timescale:this.duration||0}},{key:"resolution",value:function(){var t=this.videoTrack();return null!==t?t.resolution():""}},{key:"size",value:function(){return this.tracks.reduce(function(t,e){return t+e.size()},0)}},{key:"addTrack",value:function(t){this.tracks.push(t)}},{key:"videoTrack",value:function(){var t,e=o(this.tracks);try{for(e.s();!(t=e.n()).done;){var n=t.value;if(n instanceof c)return n}}catch(t){e.e(t)}finally{e.f()}return null}},{key:"audioTrack",value:function(){var t,e=o(this.tracks);try{for(e.s();!(t=e.n()).done;){var n=t.value;if(n instanceof u)return n}}catch(t){e.e(t)}finally{e.f()}return null}},{key:"samples",value:function(){return[this.videoTrack(),this.audioTrack()].filter(function(t){return null!==t}).map(function(t){return t.samples}).reduce(function(t,e){return t.concat(e)},[]).sort(function(t,e){return t.timescale===e.timescale?t.timestamp-e.timestamp:t.timestamp*e.timescale-e.timestamp*t.timescale})}},{key:"ensureDuration",value:function(){var t=this;return 0===this.duration&&(this.duration=this.tracks.reduce(function(e,n){return Math.max(e,t.timescale*n.relativeDuration())},0)),this.duration}}]),t}();t.exports=l},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=function(){function t(){(0,i.default)(this,t),this.duration=0,this.timescale=0,this.extraData=null,this.codec=null,this.samples=[]}return(0,a.default)(t,[{key:"relativeDuration",value:function(){return this.timescale?this.duration/this.timescale:this.duration||0}},{key:"size",value:function(){return this.samples.reduce(function(t,e){return t+e.size},0)}},{key:"ensureDuration",value:function(){return 0===this.duration&&(this.duration=this.samples.reduce(function(t,e){return Math.max(t,e.duration)},0)),this.duration}},{key:"sortSamples",value:function(){this.samples.sort(function(t,e){return t.timestamp-e.timestamp})}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=function(){function t(){(0,i.default)(this,t),this.timestamp=0,this.timescale=0,this.size=0,this.offset=0}return(0,a.default)(t,[{key:"relativeTimestamp",value:function(){return this.timescale?this.timestamp/this.timescale:this.timestamp}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=function(){function t(){(0,i.default)(this,t),this.timestamp=0,this.duration=0,this.timescale=0,this.videoExtraData=null,this.audioExtraData=null,this.samples=[]}return(0,a.default)(t,[{key:"hasVideo",value:function(){return null!==this.videoExtraData}},{key:"hasAudio",value:function(){return null!==this.audioExtraData}},{key:"relativeTimestamp",value:function(){return this.timescale?this.timestamp/this.timescale:this.timestamp}},{key:"relativeDuration",value:function(){return this.timescale?this.duration/this.timescale:this.duration||0}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,[{key:"size",value:function(){}},{key:"read",value:function(){}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).width=null,t.height=null,t.extraData=null,t}return(0,a.default)(n,[{key:"extraType",value:function(){}},{key:"parse",value:function(t){var e=24;for(this.width=t.readUInt16BE(e),e+=2,this.height=t.readUInt16BE(e),e+=52;e<t.length-8;){var n=t.readUInt32BE(e);e+=4;var r=t.toString("ascii",e,e+4);if(e+=4,0===n)break;if(r===this.extraType()){this.extraData=t.slice(e-4,e+n-4);break}e+=n-8}}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.writeUInt16BE(1,e+14),t.writeUInt32BE(1,e+20),t.writeUInt16BE(this.width,e+32),t.writeUInt16BE(this.height,e+34),t.writeUInt32BE(72<<16,e+36),t.writeUInt32BE(72<<16,e+40),t.writeUInt16BE(1,e+48),t.write(f.COMPRESSOR_NAME.substring(0,16),e+50),t.writeUInt16BE(24,e+82),t.writeUInt16BE(65535,e+84),t.writeUInt32BE(this.extraData.length+4,e+86),t.write(this.extraType(),e+90),this.extraData.copy(t,e+94,4)}},{key:"bufferSize",value:function(){return 90+this.extraData.length}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o={mp4a:n(197),avcC:n(198),hvcC:n(199)},s=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"parse",value:function(t){var e=t.toString("ascii",0,4),n=o[e];if(n){var r=new n(t.slice(4,t.length));return r.parse(),r}throw new Error("Unknown codec name ".concat(e))}}]),t}();t.exports=s},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,[{key:"type",value:function(){}},{key:"parse",value:function(){}},{key:"codec",value:function(){}}]),t}();t.exports=o},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),function(){var t=i,e=t.lib,n=e.WordArray,r=e.Hasher,a=t.algo,o=[],s=a.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],s=n[3],u=n[4],c=0;c<80;c++){if(c<16)o[c]=0|t[e+c];else{var l=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=l<<1|l>>>31}var f=(r<<5|r>>>27)+u+o[c];f+=c<20?1518500249+(i&a|~i&s):c<40?1859775393+(i^a^s):c<60?(i&a|i&s|a&s)-1894007588:(i^a^s)-899497514,u=s,s=a,a=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(s),t.HmacSHA1=r._createHmacHelper(s)}(),i.SHA1)}()},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),void function(){var t=i,e=t.lib,n=e.Base,r=t.enc,a=r.Utf8,o=t.algo;o.HMAC=n.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=a.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),o=this._iKey=e.clone(),s=i.words,u=o.words,c=0;c<n;c++)s[c]^=1549556828,u[c]^=909522486;i.sigBytes=o.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);e.reset();var r=e.finalize(this._oKey.clone().concat(n));return r}})}())}()},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(115)},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(12);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var a;if(n)a=n(e);else if(r.isURLSearchParams(e))a=e.toString();else{var o=[];r.forEach(e,function(t,e){null!==t&&"undefined"!==typeof t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),o.push(i(e)+"="+i(t))}))}),a=o.join("&")}if(a){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+a}return t}},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},function(t,e,n){"use strict";(function(e){var r=n(12);t.exports=function(t,n){n=n||new FormData;var i=[];function a(t){return null===t?"":r.isDate(t)?t.toISOString():r.isArrayBuffer(t)||r.isTypedArray(t)?"function"===typeof Blob?new Blob([t]):e.from(t):t}return function t(e,o){if(r.isPlainObject(e)||r.isArray(e)){if(-1!==i.indexOf(e))throw Error("Circular reference detected in "+o);i.push(e),r.forEach(e,function(e,i){if(!r.isUndefined(e)){var s,u=o?o+"."+i:i;if(e&&!o&&"object"===typeof e)if(r.endsWith(i,"{}"))e=JSON.stringify(e);else if(r.endsWith(i,"[]")&&(s=r.toArray(e)))return void s.forEach(function(t){!r.isUndefined(t)&&n.append(u,a(t))});t(e,u)}}),i.pop()}else n.append(o,a(e))}(t),n}}).call(this,n(3).Buffer)},function(t,e,n){"use strict";var r=n(12),i=n(124),a=n(125),o=n(56),s=n(61),u=n(128),c=n(129),l=n(58),f=n(20),h=n(31),d=n(130);t.exports=function(t){return new Promise(function(e,n){var p,v=t.data,g=t.headers,m=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}r.isFormData(v)&&r.isStandardBrowserEnv()&&delete g["Content-Type"];var w=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",S=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+S)}var D=s(t.baseURL,t.url);function _(){if(w){var r="getAllResponseHeaders"in w?u(w.getAllResponseHeaders()):null,a={data:m&&"text"!==m&&"json"!==m?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:r,config:t,request:w};i(function(t){e(t),y()},function(t){n(t),y()},a),w=null}}if(w.open(t.method.toUpperCase(),o(D,t.params,t.paramsSerializer),!0),w.timeout=t.timeout,"onloadend"in w?w.onloadend=_:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(_)},w.onabort=function(){w&&(n(new f("Request aborted",f.ECONNABORTED,t,w)),w=null)},w.onerror=function(){n(new f("Network Error",f.ERR_NETWORK,t,w,w)),w=null},w.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||l;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new f(e,r.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,t,w)),w=null},r.isStandardBrowserEnv()){var x=(t.withCredentials||c(D))&&t.xsrfCookieName?a.read(t.xsrfCookieName):void 0;x&&(g[t.xsrfHeaderName]=x)}"setRequestHeader"in w&&r.forEach(g,function(t,e){"undefined"===typeof v&&"content-type"===e.toLowerCase()?delete g[e]:w.setRequestHeader(e,t)}),r.isUndefined(t.withCredentials)||(w.withCredentials=!!t.withCredentials),m&&"json"!==m&&(w.responseType=t.responseType),"function"===typeof t.onDownloadProgress&&w.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){w&&(n(!t||t&&t.type?new h:t),w.abort(),w=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),v||(v=null);var E=d(D);E&&-1===["http","https","file"].indexOf(E)?n(new f("Unsupported protocol "+E+":",f.ERR_BAD_REQUEST,t)):w.send(v)})}},function(t,e,n){"use strict";var r=n(126),i=n(127);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(12);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function a(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function o(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function u(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),function(t){var e=c[t]||a,i=e(t);r.isUndefined(i)&&e!==u||(n[t]=i)}),n}},function(t,e){t.exports={version:"0.27.2"}},function(t,e,n){"use strict";(function(e){var r=n(143);function i(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0}function a(t){return e.Buffer&&"function"===typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=n(144),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function f(t){return!a(t)&&("function"===typeof e.ArrayBuffer&&("function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=t.exports=y,d=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(c)return t.name;var e=t.toString().match(d);return e&&e[1]}}function v(t,e){return"string"===typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(c||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function m(t,e,n,r,i){throw new h.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function y(t,e){t||m(t,!0,e,"==",h.ok)}function w(t,e,n,r){if(t===e)return!0;if(a(t)&&a(e))return 0===i(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"===typeof t||null!==e&&"object"===typeof e){if(f(t)&&f(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(a(t)!==a(e))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==s&&s===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,n,r){if(null===t||void 0===t||null===e||void 0===e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=b(t),a=b(e);if(i&&!a||!i&&a)return!1;if(i)return t=u.call(t),e=u.call(e),w(t,e,n);var s,c,l=_(t),f=_(e);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),c=l.length-1;c>=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(s=l[c],!w(t[s],e[s],n,r))return!1;return!0}(t,e,n,r))}return n?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function S(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function D(t,e,n,r){var i;if("function"!==typeof e)throw new TypeError('"block" argument must be a function');"string"===typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&m(i,n,"Missing expected exception"+r);var a="string"===typeof r,s=!t&&i&&!n;if((!t&&o.isError(i)&&a&&S(i,n)||s)&&m(i,n,"Got unwanted exception"+r),t&&i&&n&&!S(i,n)||!t&&i)throw i}h.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=v(g((e=this).actual),128)+" "+e.operator+" "+v(g(e.expected),128),this.generatedMessage=!0);var n=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var i=r.stack,a=p(n),o=i.indexOf("\n"+a);if(o>=0){var s=i.indexOf("\n",o+1);i=i.substring(s+1)}this.stack=i}}},o.inherits(h.AssertionError,Error),h.fail=m,h.ok=y,h.equal=function(t,e,n){t!=e&&m(t,e,n,"==",h.equal)},h.notEqual=function(t,e,n){t==e&&m(t,e,n,"!=",h.notEqual)},h.deepEqual=function(t,e,n){w(t,e,!1)||m(t,e,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,n){w(t,e,!0)||m(t,e,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,n){w(t,e,!1)&&m(t,e,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,n,r){w(e,n,!0)&&m(e,n,r,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,n){t!==e&&m(t,e,n,"===",h.strictEqual)},h.notStrictEqual=function(t,e,n){t===e&&m(t,e,n,"!==",h.notStrictEqual)},h.throws=function(t,e,n){D(!0,t,e,n)},h.doesNotThrow=function(t,e,n){D(!1,t,e,n)},h.ifError=function(t){if(t)throw t},h.strict=r(function t(e,n){e||m(e,!0,n,"==",t)},h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var _=Object.keys||function(t){var e=[];for(var n in t)s.call(t,n)&&e.push(n);return e}}).call(this,n(30))},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.GetFirstWeekBegDay=v,e.GetWeekIndex=function(t){var e=v(t.getFullYear());t<e&&(e=v(t.getFullYear()-1));var n=Math.floor((t.valueOf()-e.valueOf())/864e5);return Math.floor(n/7)+1},e.arrayInclude=e.arrayErase=e.ajax=void 0,e.chkMutilCallRet=function(t,e){var n=!0;if(Array.isArray(t)){var r=f(t,function(t){return t&&!t.result}).length;n=e?r!==t.length:!r}return n},e.clone=function t(e){var n;if("object"===(0,i.default)(e))if(null===e)n=null;else if(Array.isArray(e)){n=[];for(var r=0,a=e.length;r<a;r++)n.push(t(e[r]))}else for(var o in n={},e)n[o]=t(e[o]);else n=e;return n},e.debounce=e.copy=void 0,e.formatDate=h,e.getBeginDateOfWeek=function(t,e){var n=v(t),r=7*(e-1)*24*36e5,i=n;return i.setTime(n.valueOf()+r),h(i,"yyyy-MM-dd")},e.getBrowserInfo=void 0,e.getEndDateOfWeek=function(t,e){var n=v(t),r=7*(e-1)*24*36e5,i=n;return i.setTime(n.valueOf()+5184e5+r),h(i,"yyyy-MM-dd")},e.getMonthDays=p,e.getMonthEndDate=function(t,e){return h(new Date(t,e,p(t,e)),"yyyy-MM-dd")},e.getMonthStartDate=function(t,e){return h(new Date(t,e,1),"yyyy-MM-dd")},e.getQuarterEndDate=function(t,e){switch(e){case 1:return t+"-03-31";case 2:return t+"-06-30";case 3:return t+"-09-30";case 4:return t+"-12-31"}},e.getQuarterStartDate=function(t,e){switch(e){case 1:return t+"-01-01";case 2:return t+"-04-01";case 3:return t+"-07-01";case 4:return t+"-10-01"}},e.getType=void 0,e.grep=f,e.iframe=void 0,e.isEmptyRect=function(t){if(!Array.isArray(t))return!0;if(2!==t.length)return!0;if(!Array.isArray(t[0]))return!0;if(!Array.isArray(t[1]))return!0;if(t[0][0]||t[0][1]||t[1][0]||t[1][1])return!1;return!1},e.isZeroArray=function(t){if(Array.isArray(t)){var e=t.toString().split(","),n=Math.max.apply(null,e),r=Math.min.apply(null,e);return 0===n&&0===r}return!0},e.translation=e.tl=e.throttle=e.setLanguage=e.setDocumentContains=e.playMode=void 0;var i=r(n(17)),a=n(37),o=void 0,s=1e3,u={},c=function(t){return Object.prototype.toString.call(t).replace(/^\[object |\]$/g,"")};e.getType=c;e.copy=function t(e,n){for(var r in n||(n=e,e="Array"===c(e)?[]:{}),n)"Array"===c(n[r])?(e[r]=e[r]||[],t(e[r],n[r])):"Object"===c(n[r])?(e[r]=e[r]||{},t(e[r],n[r])):e[r]=n[r];return e};var l={devNotify:{comet:!1,form:"",topics:{},initComet:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!1===this.comet){var e="/SubscribeNotify.cgi?sessionId="+t;WebApp.httpOnly&&(e="/SubscribeNotify.cgi"),this.sessionID=t;var n=document.createElement("iframe");n.setAttribute("id","comet_iframe_new"),n.setAttribute("src",e),n.style.display="none",document.body.appendChild(n),this.iframe=n,window.receiveMessage=this.publish.bind(this),this.comet=!0}else window.receiveMessage=this.publish.bind(this)},subscribe:function(t,e){this.topics[t]||(this.topics[t]=new Set),this.topics[t].add(e)},publish:function(t){var e=t.method;if(this.topics[e])try{this.topics[e].forEach(function(e){e(t.params)})}catch(t){}},detach:function(t,e){e?this.topics[t]&&this.topics[t].delete(e):delete this.topics[t]},reconnect:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.iframe.src="/SubscribeNotify.cgi?sessionId="+t,WebApp.httpOnly&&(this.iframe.src="/SubscribeNotify.cgi")}}};function f(t,e,n){for(var r=[],i=0,a=t.length,o=!n;i<a;i++)!e(t[i],i)!==o&&r.push(t[i]);return r}function h(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var r in n)if(new RegExp("(".concat(r,")")).test(e)){var i=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?i:d(i))}return e}function d(t){return("00"+t).substr(t.length)}function p(t,e){var n=new Date(t,e,1);return(new Date(t,e+1,1)-n)/864e5}function v(t){var e=new Date(t,0,1),n=e.getDay();return 1===n?e:(n=0===n?7:n,e=e.setDate(e.getDate()+(8-n)),new Date(e))}e.iframe=l;var g=function(){var t=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),n=t.match(/(opera|ie|trident|firefox|chrome|version)[\s/:]([\w\d.]+)?.*?(safari|version[\s/:]([\w\d.]+)|rv:(\d.?)|$)/)||[null,"unknown",0],r=("ie"===n[1]||"trident"===n[1])&&document.documentMode,i={name:"version"===n[1]?n[3]:"trident"===n[1]?"ie":n[1],version:r||parseFloat("opera"===n[1]&&n[4]?n[4]:"trident"===n[1]&&n[5]?n[5]:n[2]),Platform:{name:t.match(/ip(?:ad|od|hone)/)?"ios":(t.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||["other"])[0]}};return i[i.name]=!0,i[i.name+parseInt(i.version,10)]=!0,i.Platform[i.Platform.name]=!0,i};e.getBrowserInfo=g;var m=g(),y=m.chrome&&m.version>=42||m.firefox&&m.version>=52?"H5":"ocx";e.playMode=y;e.ajax=function(t){var e=Object.assign({},{params:null,session:(0,a._getSession)(),id:s++},{method:t.url});if(t.data=JSON.stringify(e),t.url="RPC2",t.method="post",t.callback=t.callback||"",t.async=t.async||!1,"get"===t.method.toLowerCase()){if("object"===(0,i.default)(t.data))for(var n in t.data=[],t.data)t.data.push(n+"="+t.data[n]),t.data.join("&");t.url+=(t.url.indexOf(!1)?"?":"")+t.data}if("post"===t.method.toLowerCase()&&"object"===(0,i.default)(t.data)){var r=[];for(var o in t.data)r.push(o+"="+t.data[o]);t.data=r.join("&")}var u=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");function c(){200===u.status?t.callback&&t.callback(u.responseText):t.callback&&t.callback("error:"+u.status+u.statusText)}u.open(t.method,t.url,t.async),"post"===t.method?(u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.send(t.data)):u.send(null),!0===t.async&&(u.onreadystatechange=function(){4===u.readyState&&c()}),!1===t.async&&c()};e.throttle=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n=null;return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];clearTimeout(n),r.persist&&r.persist(),n=setTimeout(function(){t.call.apply(t,[o,r].concat(a))},e)}};e.debounce=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];e&&(clearTimeout(e),e=setTimeout(function(){t.call.apply(t,[o].concat(i))},n))}};e.arrayInclude=function(t,e){e.includes(t)||e.push(t)};e.arrayErase=function(t,e){for(var n=e.length;n--;)e[n]===t&&e.splice(n,1)};e.setDocumentContains=function(){Document.prototype.contains||(Document.prototype.contains=function(t){var e=t.parentNode;do{if(e===this)return!0;e=e.parentNode}while(null!==e);return!1})};e.translation=function(t){function e(e){if("function"===typeof t)return t(e)||"";if(function(t){if("object"!==(0,i.default)(t)||null===t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}(t))return t[e]||"";if("function"===typeof w){var n=e.split(/[\[\]]/),r=w(n[0]),a=n[1]-0;if(!isNaN(a)){var o=r.split("|");r=o[a]}return r}return e}document.querySelectorAll("[t]").forEach(function(t,n){var r=t,i=r.getAttribute("t");i&&i.split(";").forEach(function(t,n){var i=t.split("::"),a="";1===i.length?(i[0].split("+").forEach(function(t,n){a+=e(t)}),"INPUT"===r.tagName?r.setAttribute("value",a):r.innerHTML=a):(i[1].split("+").forEach(function(t,n){a+=e(t)}),r.setAttribute(i[0],a))})}),document.querySelectorAll("[title]").forEach(function(t,n){var r=t,i=r.getAttribute("title");i&&r.setAttribute("title",e(i))})};var w=function(t,e){var n=u&&(u[t]||"").trim()||t,r=["s"],i=0;return void 0===e?n:n=n.replace(/(%+)([A-Za-z]{1})/g,function(t,n,a){return t.length>2?t.substr(1,t.length-1):r.indexOf(a)>-1?e instanceof Array?e[i]?e[i++]:e[--i]:0==e||e?e:t:t})};e.tl=w;e.setLanguage=function(t){u=t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PluginCanvasES6=void 0;var r=n(68),i=n(151),a=n(152),o=n(153),s=n(154),u=n(155),c=n(156),l=n(157),f=n(158),h=n(159),d=n(160),p=n(161),v=n(162),g=n(163),m=n(164),y=n(165),w=n(10),b=n(11),S=n(14),D=n(166);e.PluginCanvasES6=function(){var t={strokeColor:"#0000FF",selectedColor:"#FFFF00",lineWidth:1,font:"normal normal 100 10px arial",closeEnable:!0},e=this;this.beginPoint="",this.tempShape="",this.tempData="",this.tempDataCopy="",this.parents={};var n={contextmenuFun:function(t){t.preventDefault()}};this.init=function(D,_){for(var x in e.canvasDom||(e.canvasDom=D,e.ctx=e.canvasDom.getContext("2d"),e.ctx.font=t.font,b.jQlib.getWidth(e.canvasDom),b.jQlib.getHeight(e.canvasDom),e.coordinate={widthDraw:b.jQlib.getWidth(e.canvasDom)/w.util.defalutCoordinate.width,heightDraw:b.jQlib.getHeight(e.canvasDom)/w.util.defalutCoordinate.height,widthMouse:w.util.defalutCoordinate.width/b.jQlib.getWidth(e.canvasDom),heightMouse:w.util.defalutCoordinate.height/b.jQlib.getHeight(e.canvasDom)},t.maxPoly=[[0,0],[b.jQlib.getWidth(e.canvasDom)*e.coordinate.widthMouse,0],[b.jQlib.getWidth(e.canvasDom)*e.coordinate.widthMouse,b.jQlib.getHeight(e.canvasDom)*e.coordinate.heightMouse],[0,b.jQlib.getHeight(e.canvasDom)*e.coordinate.heightMouse]],e.eventFunc=_),w.util.eventEnabled=!0,e.shape={},e.shape.circleShape=new r.CircleShape,e.shape.lineShape=new i.LineShape,e.shape.rectShape=new a.RectShape,e.shape.polyShape=new o.PolyShape,e.shape.ellipseShape=new s.EllipseShape,e.shape.textShape=new c.TextShape,e.shape.laneShape=new u.LaneShape,e.shape.motionDetectShape=new l.MotionDetectShape,e.shape.reSpotShape=new f.ReSpotShape,e.shape.rhombusShape=new h.RhombusShape,e.shape.rectADShape=new d.RectADShape,e.shape.parkingLotShape=new p.ParkingLotShape,e.shape.crossLineShape=new v.CrossLine,e.shape.waterLevelShape=new g.WaterLevel,e.shape.rectRotatableShape=new m.RectRotatableShape,e.shape.imageShape=new y.ImageShape,e.shape)e.shape[x].init(e.canvasDom,e.ctx,e.drawShape,_,e.coordinate);S.EventManager.off(e.canvasDom,"contextmenu").on(e.canvasDom,"contextmenu",n.contextmenuFun)},this.addChangeShapeEvent=function(){var t=null,n={},r=!1,i=[];S.EventManager.off(e.canvasDom,"mousedown.move").on(e.canvasDom,"mousedown.move",function(a){if(r=!1,e.beginPoint=null,1!==w.util.drawState){b.jQlib.each(e.shape,function(t,e){w.util.setUnSelected(e.data)}),w.util.moveFlag=!1,w.util.resizeFlag=!1;var o=[];b.jQlib.each(e.shape,function(t,e){o=o.concat(e.data)}),o.sort(w.util.compareDesc),b.jQlib.each(o,function(r,o){if(e.tempData=e.shape[o.option.type+"Shape"].checkOnPoint(a,o),!1!==e.tempData)return w.util.resizeFlag=!0,i=e.parents[e.tempData.data.shapeId],e.tempShape=e.shape[o.option.type+"Shape"],e.tempData.data.option.zindex=w.util.zindex++,e.tempDataCopy=b.jQlib.extend(!0,{},e.tempData),!1;if("rhombus"===o.option.type){var s=e.shape.rhombusShape.checkOnLine(a,o);if(s)return w.util.moveFlag=!0,t=null,e.tempShape=e.shape[o.option.type+"Shape"],e.tempData=s,e.tempData.data.option.zindex=w.util.zindex++,e.beginPoint=[Math.round((a.clientX-w.util.offset(e.canvasDom).left+window.scrollX)*e.coordinate.widthMouse),Math.round((a.clientY-w.util.offset(e.canvasDom).top+window.scrollY)*e.coordinate.heightMouse)],e.tempDataCopy=b.jQlib.extend(!0,{},s),!1}if(e.tempData=e.shape[o.option.type+"Shape"].checkSelected(a,o),e.tempData){w.util.moveFlag=!0;var u=e.tempData.data.shapeId;e.beginPoint=[Math.round((a.clientX-w.util.offset(e.canvasDom).left+window.scrollX)*e.coordinate.widthMouse),Math.round((a.clientY-w.util.offset(e.canvasDom).top+window.scrollY)*e.coordinate.heightMouse)];var c=e.getParent(u);return c&&c.children&&c.children.length>0?(t={},n={},e.shape[e.getShapeById(c.parentId).option.type+"Shape"],t.parentShapeData=e.getShapeById(c.parentId),e.tempShape=e.shape[t.parentShapeData.option.type+"Shape"],e.tempData.data=t.parentShapeData,t.childrenShapeData=[],e.tempData.data.option.zindex=w.util.zindex++,b.jQlib.each(c.children,function(n,r){var i=e.getShapeById(r);i.option.zindex=w.util.zindex++,i.option.selected=!0,t.childrenShapeData.push(i)}),e.beginPoint=[Math.round((a.clientX-w.util.offset(e.canvasDom).left+window.scrollX)*e.coordinate.widthMouse),Math.round((a.clientY-w.util.offset(e.canvasDom).top+window.scrollY)*e.coordinate.heightMouse)],n=b.jQlib.extend(!0,{},t)):(t=null,e.tempShape=e.shape[o.option.type+"Shape"],e.tempData.data.option.zindex=w.util.zindex++,e.beginPoint=[Math.round((a.clientX-w.util.offset(e.canvasDom).left+window.scrollX)*e.coordinate.widthMouse),Math.round((a.clientY-w.util.offset(e.canvasDom).top+window.scrollY)*e.coordinate.heightMouse)],e.tempDataCopy=b.jQlib.extend(!0,{},e.tempData)),!1}}),e.drawShape()}}),S.EventManager.off(e.canvasDom,"mousemove.move").on(e.canvasDom,"mousemove.move",function(a){if(w.util.resizeFlag&&e.tempData.data.option.resizeEnable){if(r=!0,"poly"===e.tempData.data.option.type&&i&&i.length>0){var o=e.tempDataCopy.point,s=b.jQlib.extend(!0,[],e.tempData.data.data),u=[Math.round((a.clientX-w.util.offset(e.canvasDom).left+window.scrollX)*e.coordinate.widthMouse),Math.round((a.clientY-w.util.offset(e.canvasDom).top+window.scrollY)*e.coordinate.heightMouse)];s[o]=u;var c=o-1,l=o+1;c<0&&(c=e.tempData.data.data.length-1),l>e.tempData.data.data.length-1&&(l=0);var f=[];f[0]=[e.tempData.data.data[c],e.tempData.data.data[o]],f[1]=[e.tempData.data.data[o],e.tempData.data.data[l]];var h=[];h[0]=[s[c],s[o]],h[1]=[s[o],s[l]];for(var d=0;d<i.length;d++){var p=e.getShapeById(i[d]);if(p&&"line"===p.option.type){var v=w.util.lineCross(p.data,f),g=w.util.lineCross(p.data,h);if(!0===v&&!0===g)return}}}e.tempShape.resizeShape(e.tempDataCopy.point,a,e.tempData.data)}else if(w.util.moveFlag&&e.tempData.data.option.moveEnable)if(r=!0,t){if(e.shape[t.parentShapeData.option.type+"Shape"].moveShape(e.beginPoint,n.parentShapeData,a,t.parentShapeData))for(var m=0;m<t.childrenShapeData.length;m++){var y=t.childrenShapeData[m],S=n.childrenShapeData[m];e.shape[y.option.type+"Shape"].moveShape(e.beginPoint,S,a,y,!0)}}else e.tempShape.moveShape(e.beginPoint,e.tempDataCopy.data,a,e.tempData.data,!1,e.tempDataCopy.resizeLineIndex)});var a=function(){if(w.util.moveFlag)if(t){var n=t.parentShapeData;n.event={},n.event.type=r?w.util.eventName.moveFinish:w.util.eventName.selectedFinish,[].push(n),w.util.eventEnabled&&e.eventFunc&&e.eventFunc(n)}else e.tempData.data.event={},e.tempData.data.event.type=r?w.util.eventName.moveFinish:w.util.eventName.selectedFinish,w.util.eventEnabled&&e.eventFunc&&e.eventFunc(e.tempData.data);else w.util.resizeFlag&&(e.tempData.data.event={},e.tempData.data.event.type=r?w.util.eventName.resizeFinish:w.util.eventName.selectedFinish,w.util.eventEnabled&&e.eventFunc&&e.eventFunc(e.tempData.data));w.util.moveFlag=!1,w.util.resizeFlag=!1,r=!1};S.EventManager.off(e.canvasDom,"mouseup.move").on(e.canvasDom,"mouseup.move",a),S.EventManager.off(e.canvasDom,"mouseleave.move").on(e.canvasDom,"mouseleave.move",a)},this.removeShapeEvent=function(){S.EventManager.off(e.canvasDom,"mousedown.move").off(e.canvasDom,"mousemove.move").off(e.canvasDom,"mouseup.move").off(e.canvasDom,"mouseleave.move")},this.removeShapeDrawEvent=function(){S.EventManager.off(e.canvasDom,"mousedown.draw").off(e.canvasDom,"mousemove.draw").off(e.canvasDom,"mouseup.draw").off(e.canvasDom,"mouseleave.draw")},this.setRegionNum=function(t,n){e.shape[t+"Shape"].regionNum=n},this.addShape=function(n,r,i){var a=b.jQlib.extend(!0,{},t,i);a.zindex=w.util.zindex++,a.type=r;var o=e.shape[r+"Shape"].add(n,a);return o?(o.event={},o.event.type=w.util.eventName.addFinish,w.util.eventEnabled&&e.eventFunc&&e.eventFunc(o),o):null},this.drawStart=function(n,r){var i=b.jQlib.extend(!0,{},t,r);e.shape[n+"Shape"].drawStart(i)},this.drawShape=function(){e.ctx.clearRect(0,0,b.jQlib.getWidth(e.canvasDom),b.jQlib.getHeight(e.canvasDom));var t=function(t){var e=[];for(var n in t)e=e.concat(t[n].data);return e.sort(w.util.compare),e}(e.shape);new D.FactoryGridShapeAction(t,e.canvasDom);for(var n=0;n<t.length;n++)e.ctx.lineWidth=t[n].option.lineWidth||1,e.shape[t[n].option.type+"Shape"].draw(t[n])},this.getShapeById=function(t){if(void 0===t||null===t||""===t){var n=[];return b.jQlib.each(e.shape,function(t,e){n=n.concat(e.data)}),b.jQlib.extend(!0,[],n)}for(var r in e.shape){n=e.shape[r].data;for(var i=0;i<n.length;i++)if(n[i].shapeId===t)return n[i]}return!1},this.delShapeById=function(t){if(void 0===t||null===t||""===t)return b.jQlib.each(e.shape,function(t,e){e.data.length=0}),!0;for(var n in e.shape)for(var r=e.shape[n].data,i=0;i<r.length;i++)if(r[i].shapeId===t){var a=b.jQlib.extend(!0,{},r[i]);return a.event={},r.splice(i,1),e.parents&&e.parents[t]&&e.disParent(t),e.parents&&b.jQlib.each(e.parents,function(e,n){if(n)for(var r=0;r<n.length;r++)if(n[r]===t){n.splice(r,1);break}}),a.event.type=w.util.eventName.deleteFinish,w.util.eventEnabled&&e.eventFunc&&e.eventFunc(a),null}return!1},this.selectedById=function(t,n){for(var r in e.shape)for(var i=e.shape[r].data,a=0;a<i.length;a++)if(i[a].shapeId===t)return i[a].option.selected=!0===n,e.drawShape(),i[a];return!1},this.clear=function(){e.ctx.clearRect(0,0,b.jQlib.getWidth(e.canvasDom),b.jQlib.getHeight(e.canvasDom)),e.ctx.globalAlpha=1,S.EventManager.off(e.canvasDom,"contextmenu").on(e.canvasDom,"contextmenu",n.contextmenuFun),e.beginPoint="",e.tempShape="",e.tempData="",e.tempDataCopy="",e.parents={},w.util.moveFlag=!1,w.util.resizeFlag=!1,w.util.zindex=1,w.util.shapeId=1,w.util.drawState=0,w.util.eventEnabled=!0,b.jQlib.each(e.shape,function(t,e){e.regionNum=999999,e.data=[]})},this.resize=function(t,n){for(var r in e.coordinate.widthDraw=b.jQlib.getWidth(e.canvasDom)/w.util.defalutCoordinate.width,e.coordinate.heightDraw=b.jQlib.getHeight(e.canvasDom)/w.util.defalutCoordinate.height,e.coordinate.widthMouse=w.util.defalutCoordinate.width/b.jQlib.getWidth(e.canvasDom),e.coordinate.heightMouse=w.util.defalutCoordinate.height/b.jQlib.getHeight(e.canvasDom),e.shape)"rectShape"===r&&e.shape[r].resize(e.coordinate.widthDraw,e.coordinate.heightDraw,e.coordinate.widthMouse,e.coordinate.heightMouse);e.drawShape()},this.reset=function(){e.ctx.clearRect(0,0,b.jQlib.getWidth(e.canvasDom),b.jQlib.getHeight(e.canvasDom))},this.setParent=function(t,n){e.parents[t]=n},this.disParent=function(t){e.parents[t]=null},this.getParent=function(t){return{parentId:t,children:e.parents[t]}},this.getFamily=function(t){var n=!1;return e.parents[t]?n={parentId:t,children:e.parents[t]}:b.jQlib.each(e.parents,function(r,i){for(var a=0;a<i.length;a++)if(i[a]===t)return n={parentId:t,children:e.parents[t]},!1}),n},this.hideShape=function(t,n,r){for(var i in e.shape)for(var a=e.shape[i].data,o=0;o<a.length;o++)if(a[o].shapeId===t)return a[o].option.hide=n,r||e.drawShape(),a[o]},this.setOption=function(t,n){for(var r in e.shape)for(var i=e.shape[r].data,a=0;a<i.length;a++)if(i[a].shapeId===t)return i[a].option=b.jQlib.extend(!0,i[a].option,n),e.drawShape(),i[a]},this.strokeText=function(t,n,r){t?w.util.strokeText(e.ctx,t,b.jQlib.getWidth(e.canvasDom)/2,b.jQlib.getHeight(e.canvasDom)/2,n,r):e.drawShape()},this.drawGrid=function(t,n){e.shape.motionDetectShape.drawGrid(t,n)},this.setResolution=function(t){w.util.setResolution(t)},this.setEventEnabled=function(t){w.util.eventEnabled=t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CircleShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="circle",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[],t.r=100},this.add=function(e,n){if(t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),a.option.fillStyle=a.option.fillStyle||"#0000FF",a.option.fillStyleSelected=a.option.fillStyleSelected||"#00FF00",t.data.push(a),a}},this.drawStart=function(e){var n=null;a.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(a){if(a.preventDefault(),!r.util.moveFlag&&!r.util.resizeFlag){if(t.data.length>=t.regionNum)return 0,void(n=null);n=[Math.round((a.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((a.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];var o={data:[]};o.option=i.jQlib.extend(!0,{},e),o.shapeId=r.util.shapeId++,o.option.zindex=r.util.zindex++,o.option.type=t.type,o.option.selected=!0,o.option.fillStyle=o.option.fillStyle||"#0000FF",o.option.fillStyleSelected=o.option.fillStyleSelected||"#00FF00",t.data.push(o),t.data[t.data.length-1].data=i.jQlib.extend(!0,[],n),r.util.drawState=1,t.drawFunc()}}),a.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(t){});var o=function(e){if(1===r.util.drawState){var n=t.data[t.data.length-1];n.event={},n.event.type=r.util.eventName.drawFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(n),r.util.drawState=2}};a.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",o),a.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",o)},this.draw=function(e){if(!0!==e.option.hide){e.option.selected?this.ctx.fillStyle=e.option.fillStyleSelected:this.ctx.fillStyle=e.option.fillStyle;var n=e.option.radius||t.r;this.ctx.beginPath(),this.ctx.arc(e.data[0]*this.coordinate.widthDraw,e.data[1]*this.coordinate.heightDraw,n*this.coordinate.widthDraw,0,2*Math.PI,!0),this.ctx.closePath(),"stroke"===e.option.circleStyle?(this.ctx.strokeStyle=this.ctx.fillStyle,this.ctx.stroke()):this.ctx.fill()}},this.checkOnPoint=function(t){return!1},this.checkSelected=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=n.option.radius||t.r,o=r.util.pointInCircle(i,n.data,a);return!!o&&(n.option.selected=!0,{data:n})},this.moveShape=function(e,n,i,a){var o=[Math.round((i.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((i.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],s=o[0]-e[0],u=o[1]-e[1];a.data[0]=n.data[0]+s,a.data[1]=n.data[1]+u,t.drawFunc()}};var r=n(10),i=n(11),a=n(14)},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(17));if("undefined"==typeof a)var a={};a.MD5=function(t){function e(t){var e=(t>>>0).toString(16);return"00000000".substr(0,8-e.length)+e}function n(t,e,n){return t&e|~t&n}function r(t,e,n){return n&t|~n&e}function a(t,e,n){return t^e^n}function o(t,e,n){return e^(t|~n)}function s(t,e){return t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}function u(t){for(var e=[],n=0;n<t.length;n++)if(t.charCodeAt(n)<=127)e.push(t.charCodeAt(n));else for(var r=encodeURIComponent(t.charAt(n)).substr(1).split("%"),i=0;i<r.length;i++)e.push(parseInt(r[i],16));return e}function c(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=t[n];return e}var l=null,f=null;function h(t,e){return 4294967295&t+e}return"string"==typeof t?l=u(t):t.constructor==Array?0===t.length?l=t:"string"==typeof t[0]?l=function(t){for(var e=[],n=0;n<t.length;n++)e=e.concat(u(t[n]));return e}(t):"number"==typeof t[0]?l=t:f=(0,i.default)(t[0]):"undefined"!=typeof ArrayBuffer?t instanceof ArrayBuffer?l=c(new Uint8Array(t)):t instanceof Uint8Array||t instanceof Int8Array?l=c(t):t instanceof Uint32Array||t instanceof Int32Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Float32Array||t instanceof Float64Array?l=c(new Uint8Array(t.buffer)):f=(0,i.default)(t):f=(0,i.default)(t),f&&alert("MD5 type mismatch, cannot process "+f),function(){function t(t,e,n,r){var i,a,o=w;w=y,y=m,m=h(m,(i=h(g,h(t,h(e,n))))<<(a=r)&4294967295|i>>>32-a),g=o}var i=l.length;l.push(128);var u=l.length%64;if(u>56){for(var c=0;c<64-u;c++)l.push(0);u=l.length%64}for(c=0;c<56-u;c++)l.push(0);l=l.concat(function(t){for(var e=[],n=0;n<8;n++)e.push(255&t),t>>>=8;return e}(8*i));var f=1732584193,d=4023233417,p=2562383102,v=271733878,g=0,m=0,y=0,w=0;for(c=0;c<l.length/64;c++){g=f;var b=64*c;t(n(m=d,y=p,w=v),3614090360,s(l,b),7),t(n(m,y,w),3905402710,s(l,b+4),12),t(n(m,y,w),606105819,s(l,b+8),17),t(n(m,y,w),3250441966,s(l,b+12),22),t(n(m,y,w),4118548399,s(l,b+16),7),t(n(m,y,w),1200080426,s(l,b+20),12),t(n(m,y,w),2821735955,s(l,b+24),17),t(n(m,y,w),4249261313,s(l,b+28),22),t(n(m,y,w),1770035416,s(l,b+32),7),t(n(m,y,w),2336552879,s(l,b+36),12),t(n(m,y,w),4294925233,s(l,b+40),17),t(n(m,y,w),2304563134,s(l,b+44),22),t(n(m,y,w),1804603682,s(l,b+48),7),t(n(m,y,w),4254626195,s(l,b+52),12),t(n(m,y,w),2792965006,s(l,b+56),17),t(n(m,y,w),1236535329,s(l,b+60),22),t(r(m,y,w),4129170786,s(l,b+4),5),t(r(m,y,w),3225465664,s(l,b+24),9),t(r(m,y,w),643717713,s(l,b+44),14),t(r(m,y,w),3921069994,s(l,b),20),t(r(m,y,w),3593408605,s(l,b+20),5),t(r(m,y,w),38016083,s(l,b+40),9),t(r(m,y,w),3634488961,s(l,b+60),14),t(r(m,y,w),3889429448,s(l,b+16),20),t(r(m,y,w),568446438,s(l,b+36),5),t(r(m,y,w),3275163606,s(l,b+56),9),t(r(m,y,w),4107603335,s(l,b+12),14),t(r(m,y,w),1163531501,s(l,b+32),20),t(r(m,y,w),2850285829,s(l,b+52),5),t(r(m,y,w),4243563512,s(l,b+8),9),t(r(m,y,w),1735328473,s(l,b+28),14),t(r(m,y,w),2368359562,s(l,b+48),20),t(a(m,y,w),4294588738,s(l,b+20),4),t(a(m,y,w),2272392833,s(l,b+32),11),t(a(m,y,w),1839030562,s(l,b+44),16),t(a(m,y,w),4259657740,s(l,b+56),23),t(a(m,y,w),2763975236,s(l,b+4),4),t(a(m,y,w),1272893353,s(l,b+16),11),t(a(m,y,w),4139469664,s(l,b+28),16),t(a(m,y,w),3200236656,s(l,b+40),23),t(a(m,y,w),681279174,s(l,b+52),4),t(a(m,y,w),3936430074,s(l,b),11),t(a(m,y,w),3572445317,s(l,b+12),16),t(a(m,y,w),76029189,s(l,b+24),23),t(a(m,y,w),3654602809,s(l,b+36),4),t(a(m,y,w),3873151461,s(l,b+48),11),t(a(m,y,w),530742520,s(l,b+60),16),t(a(m,y,w),3299628645,s(l,b+8),23),t(o(m,y,w),4096336452,s(l,b),6),t(o(m,y,w),1126891415,s(l,b+28),10),t(o(m,y,w),2878612391,s(l,b+56),15),t(o(m,y,w),4237533241,s(l,b+20),21),t(o(m,y,w),1700485571,s(l,b+48),6),t(o(m,y,w),2399980690,s(l,b+12),10),t(o(m,y,w),4293915773,s(l,b+40),15),t(o(m,y,w),2240044497,s(l,b+4),21),t(o(m,y,w),1873313359,s(l,b+32),6),t(o(m,y,w),4264355552,s(l,b+60),10),t(o(m,y,w),2734768916,s(l,b+24),15),t(o(m,y,w),1309151649,s(l,b+52),21),t(o(m,y,w),4149444226,s(l,b+16),6),t(o(m,y,w),3174756917,s(l,b+44),10),t(o(m,y,w),718787259,s(l,b+8),15),t(o(m,y,w),3951481745,s(l,b+36),21),f=h(f,g),d=h(d,m),p=h(p,y),v=h(v,w)}return function(t,n,r,i){for(var a="",o=0,s=0,u=3;u>=0;u--)o=255&(s=arguments[u]),o<<=8,o|=255&(s>>>=8),o<<=8,o|=255&(s>>>=8),o<<=8,a+=e(o|=s>>>=8);return a}(v,p,d,f).toUpperCase()}()};var o=function(t){return a.MD5(t)};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.YUVWebGLCanvas=e.WebGLCanvas=e.ImageWebGLCanvas=void 0;var r=n(16),i=n(170),a=function(){function t(t,e,n){r.Texture.call(this,t,e,n)}return t.prototype=c(r.Texture,{fill:function(t,e){var n=this.gl;n.bindTexture(n.TEXTURE_2D,this.texture),e?n.texSubImage2D(n.TEXTURE_2D,0,0,0,this.size.w,this.size.h,this.format,n.UNSIGNED_BYTE,t):n.texImage2D(n.TEXTURE_2D,0,this.format,this.format,n.UNSIGNED_BYTE,t)}}),t}(),o=function(){var t=r.Script.createFromSource("x-shader/x-vertex",l(["attribute vec3 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat4 uMVMatrix;","uniform mat4 uPMatrix;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);"," vTextureCoord = aTextureCoord;","}"])),e=r.Script.createFromSource("x-shader/x-fragment",l(["precision highp float;","varying highp vec2 vTextureCoord;","uniform sampler2D texture;","void main(void) {"," gl_FragColor = texture2D(texture, vTextureCoord);","}"])),n=[192,368,608,1088,1472,1952,3008];function a(t,e,a){this.canvas=t,this.size=e;var c=!0;for(var l in n)e.w===n[l]&&(c=!1);c?this.canvas.width=e.w:192===e.w?this.canvas.width=e.w-12:this.canvas.width=e.w-8,this.canvas.height=e.h,this.onInitWebGL(),this.onInitShaders(),function(){var t=[1,1,0,-1,1,0,1,-1,0,-1,-1,0],e=this.gl;this.quadVPBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.quadVPBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(t),e.STATIC_DRAW),this.quadVPBuffer.itemSize=3,this.quadVPBuffer.numItems=4;this.quadVTCBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.quadVTCBuffer),t=[1,0,0,0,1,1,0,1],e.bufferData(e.ARRAY_BUFFER,new Float32Array(t),e.STATIC_DRAW)}.call(this),a&&function(){var t=this.gl;this.framebuffer=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer),this.framebufferTexture=new r.Texture(this.gl,this.size,t.RGBA);var e=t.createRenderbuffer();t.bindRenderbuffer(t.RENDERBUFFER,e),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,this.size.w,this.size.h),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.framebufferTexture.texture,0),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)}.call(this),this.onInitTextures(),function(){var t=this.gl;this.perspectiveMatrix=function(t,e,n,r){var a=n*Math.tan(t*Math.PI/360),o=-a;return function(t,e,n,r,a,o){var s=2*a/(e-t),u=2*a/(r-n),c=(e+t)/(e-t),l=(r+n)/(r-n),f=-(o+a)/(o-a),h=-2*o*a/(o-a);return(0,i.$M)([[s,0,c,0],[0,u,l,0],[0,0,f,h],[0,0,-1,0]])}(o*e,a*e,o,a,n,r)}(45,1,.1,100),o.call(this),s.call(this,[0,0,-2.415]),t.bindBuffer(t.ARRAY_BUFFER,this.quadVPBuffer),t.vertexAttribPointer(this.vertexPositionAttribute,3,t.FLOAT,!1,0,0),t.bindBuffer(t.ARRAY_BUFFER,this.quadVTCBuffer),t.vertexAttribPointer(this.textureCoordAttribute,2,t.FLOAT,!1,0,0),this.onInitSceneTextures(),u.call(this),this.framebuffer&&t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)}.call(this)}function o(){this.mvMatrix=i.Matrix.I(4)}function s(t){(function(t){this.mvMatrix=this.mvMatrix.x(t)}).call(this,i.Matrix.Translation((0,i.$V)([t[0],t[1],t[2]])).ensure4x4())}function u(){this.program.setMatrixUniform("uPMatrix",new Float32Array(this.perspectiveMatrix.flatten())),this.program.setMatrixUniform("uMVMatrix",new Float32Array(this.mvMatrix.flatten()))}return a.prototype={toString:function(){return"WebGLCanvas Size: "+this.size},checkLastError:function(t){var e=this.gl.getError();if(e!==this.gl.NO_ERROR){var n=this.glNames[e];n="undefined"!==typeof n?n+"("+e+")":"Unknown WebGL ENUM (0x"+e.toString(16)+")",r.debug.trace()}},onInitWebGL:function(){try{this.gl=this.canvas.getContext("experimental-webgl")}catch(t){}if(this.gl||r.debug.error("Unable to initialize WebGL. Your browser may not support it."),!this.glNames)for(var t in this.glNames={},this.gl)"number"===typeof this.gl[t]&&(this.glNames[this.gl[t]]=t)},onInitShaders:function(){this.program=new r.Program(this.gl),this.program.attach(new r.Shader(this.gl,t)),this.program.attach(new r.Shader(this.gl,e)),this.program.link(),this.program.use(),this.vertexPositionAttribute=this.program.getAttributeLocation("aVertexPosition"),this.gl.enableVertexAttribArray(this.vertexPositionAttribute),this.textureCoordAttribute=this.program.getAttributeLocation("aTextureCoord"),this.gl.enableVertexAttribArray(this.textureCoordAttribute)},onInitTextures:function(){var t=this.gl;t.viewport(0,0,this.canvas.width,this.canvas.height),this.texture=new r.Texture(t,this.size,t.RGBA)},onInitSceneTextures:function(){this.texture.bind(0,this.program,"texture")},drawScene:function(){this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4)},updateVertexArray:function(t){this.zoomScene(t)},readPixels:function(t){var e=this.gl;e.readPixels(0,0,this.size.w,this.size.h,e.RGBA,e.UNSIGNED_BYTE,t)},zoomScene:function(t){o.call(this),s.call(this,[t[0],t[1],t[2]]),u.call(this),this.drawScene()},setViewport:function(t,e){var n,r;this.gl.drawingBufferWidth<t||this.gl.drawingBufferHeight<e?(n=this.gl.drawingBufferWidth,r=this.gl.drawingBufferHeight,this.canvas.width=n,this.canvas.height=r):(n=t,r=e),this.gl.viewport(0,0,n,r)},clearCanvas:function(){this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.DEPTH_BUFFER_BIT|this.gl.COLOR_BUFFER_BIT)}},a}();e.WebGLCanvas=o;var s=function(){function t(t,e){o.call(this,t,e)}return t.prototype=c(o,{drawCanvas:function(t){this.texture.fill(t),this.drawScene()},onInitTextures:function(){var t=this.gl;this.setViewport(this.canvas.width,this.canvas.height),this.texture=new a(t,this.size,t.RGBA)},initCanvas:function(){this.gl.clear(this.gl.DEPTH_BUFFER_BIT|this.gl.COLOR_BUFFER_BIT)}}),t}();e.ImageWebGLCanvas=s;var u=function(){var t=r.Script.createFromSource("x-shader/x-vertex",l(["attribute vec3 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat4 uMVMatrix;","uniform mat4 uPMatrix;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);"," vTextureCoord = aTextureCoord;","}"])),e=null;function n(t,n,i){e=i.colour_description_present==r.YUV2RGBMODE.BT601&&i.signal_type_present==r.YUV2RGBMODE.FULLRANGE?r.Script.createFromSource("x-shader/x-fragment",l(["precision highp float;","varying highp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1, 0.00000, 1.402, -0.701,"," 1.0, -.3441, -.7141, 0.529136,"," 1, 1.772, 0, -0.8861,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4( texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"])):r.Script.createFromSource("x-shader/x-fragment",l(["precision highp float;","varying highp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1.16438, 0.00000, 1.59603, -.87079,"," 1.16438, -.39176, -.81297, .52959,"," 1.16438, 2.01723, 0, -1.08139,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4( texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"])),o.call(this,t,n)}return n.prototype=c(o,{onInitShaders:function(){this.program=new r.Program(this.gl),this.program.attach(new r.Shader(this.gl,t)),this.program.attach(new r.Shader(this.gl,e)),this.program.link(),this.program.use(),this.vertexPositionAttribute=this.program.getAttributeLocation("aVertexPosition"),this.gl.enableVertexAttribArray(this.vertexPositionAttribute),this.textureCoordAttribute=this.program.getAttributeLocation("aTextureCoord"),this.gl.enableVertexAttribArray(this.textureCoordAttribute)},onInitTextures:function(){this.setViewport(this.size.w,this.size.h),this.YTexture=new r.Texture(this.gl,this.size),this.UTexture=new r.Texture(this.gl,this.size.getHalfSize()),this.VTexture=new r.Texture(this.gl,this.size.getHalfSize())},onInitSceneTextures:function(){this.YTexture.bind(0,this.program,"YTexture"),this.UTexture.bind(1,this.program,"UTexture"),this.VTexture.bind(2,this.program,"VTexture")},fillYUVTextures:function(t,e,n){this.YTexture.fill(t),this.UTexture.fill(e),this.VTexture.fill(n),this.drawScene()},drawCanvas:function(t,e){var n=new Uint8Array(t.buffer,t.byteOffset,e.ylen*e.height),r=new Uint8Array(t.buffer,t.byteOffset+e.ylen*e.height,e.ylen*e.height/4),i=new Uint8Array(t.buffer,t.byteOffset+e.ylen*e.height*1.25,e.ylen*e.height/4);this.YTexture.fill(n),this.UTexture.fill(r),this.VTexture.fill(i),this.drawScene()},updateVertexArray:function(t){this.zoomScene(t)},toString:function(){return"YUVCanvas Size: "+this.size},initCanvas:function(){this.gl.clear(this.gl.DEPTH_BUFFER_BIT|this.gl.COLOR_BUFFER_BIT)}}),n}();function c(t,e){for(var n=Object.create(t.prototype),r=Object.keys(e),i=0;i<r.length;i++)n[r[i]]=e[r[i]];return n}function l(t){return t.join("\n")}e.YUVWebGLCanvas=u},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(1)),a=r(n(2)),o=r(n(183)),s=n(184),u=function(){function t(){(0,i.default)(this,t),this.CodecCallback=function(){},this.TrackCallback=function(){}}return(0,a.default)(t,[{key:"init",value:function(t){this.MovieBuffer=new Uint8Array(0),this.currentFrame=0,this.currentDeleteLen=0,this.length=0,this.position=0,this.isMoov=0,this.isSeek=!1,this.track=this.concatArray(t.tracks[0].samples,t.tracks[1].samples),this.VideoCodec=this.getCodec(t.tracks[0].codec),this.AudioCodec=this.getCodec(t.tracks[1].codec),this.Framerate=this.getFPS(t.tracks[0].samples),this.clockFreq=t.tracks[1].samples[0].timescale,this.AudioCodecInfo={config:"1408",clockFreq:this.clockFreq,bitrate:void 0},this.packetDHAV=new o.default(0,this.VideoCodec,this.AudioCodec),this.CodecCallback({VideoCodec:this.VideoCodec,AudioCodec:this.AudioCodec,Framerate:this.Framerate,AudioCodecInfo:this.AudioCodecInfo})}},{key:"setMovieData",value:function(t){var e=t.subarray(0,20);if(this.isMoov=e[8],t=t.subarray(20,t.length),this.isMoov){var n=s.MovieParser.parse(t);n&&this.init(n)}else this.length=(e[7]<<24|e[6]<<16|e[5]<<8|e[4])-20,this.position=e[15]<<48|e[14]<<40|e[13]<<32|e[12]<<24|e[11]<<16|e[10]<<8|e[9],this.currentDeleteLen+this.MovieBuffer.length<this.position&&(this.isSeek=!0,this.currentDeleteLen=this.position,this.currentFrame=this.getCurrentSeekFrame(),this.MovieBuffer=new Uint8Array(0)),this.MovieBuffer=this.concatUint8Array(this.MovieBuffer,new Uint8Array(t)),this.getFrameData()}},{key:"getFrameData",value:function(){var t=this.track[this.currentFrame];if(this.MovieBuffer.length+this.currentDeleteLen>=t.offset+t.size){var e=null;if(t instanceof s.VideoSample){var n=this.set_nal_unit_type(this.MovieBuffer.subarray(t.offset-this.currentDeleteLen,t.offset+t.size-this.currentDeleteLen));e=this.packetDHAV.getRTPPacket(n,t)}else e=this.packetDHAV.getRTPPacket(this.MovieBuffer.subarray(t.offset-this.currentDeleteLen,t.offset+t.size-this.currentDeleteLen),t);(this.isSeek&&t.keyframe||!this.isSeek)&&(this.TrackCallback(e),this.isSeek=!1),this.MovieBuffer=this.MovieBuffer.subarray(t.offset+t.size-this.currentDeleteLen,this.MovieBuffer.length),this.currentDeleteLen=t.offset+t.size,this.currentFrame++,this.currentFrame<this.track.length&&this.getFrameData()}}},{key:"getCurrentSeekFrame",value:function(){var t=0,e=this.track.length-1,n=this.position;if(this.track[0].offset>=n)return 0;for(;t<=e;){var r=parseInt((e+t)/2),i=this.track[r];if(n===i.offset)return r;if(n>i.offset){if(n<i.offset+i.size)return r+1;t=r+1}else{if(!(n<i.offset))return-1;e=r-1}}}},{key:"set_nal_unit_type",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array,e=0,n=0,r=function(e,n){var r="";return t.slice(e,n).map(function(t){return r+=1===t.toString(16).length?"0"+t.toString(16):t.toString(16)}),parseInt(r,16)};t.length>4&&n<t.length;)e=r(n,n+4),t.set([0,0,0,1],n),n=n+e+4;return t}},{key:"concatUint8Array",value:function(){for(var t=0,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){t+=a[i].length}for(var o=new Uint8Array(t),s=0,u=0,c=n;u<c.length;u++){var l=c[u];o.set(l,s),s+=l.length}return o}},{key:"concatArray",value:function(t,e){return t.concat(e).sort(function(t,e){return t.offset-e.offset})}},{key:"getCodec",value:function(t){var e="";return/hvc1/g.test(t)&&(e="H265"),/avc1/g.test(t)&&(e="H264"),/mp4a/g.test(t)&&(e="mpeg4-generic"),e}},{key:"getFPS",value:function(t){for(var e=60,n=0,r=t.length>=60?60:t.length;n<r;n++)if(t[n].timestamp<=t[n].timescale&&t[n+1].timestamp>t[n].timescale){e=n;break}return e}},{key:"parseToString",value:function(t){for(var e="",n=0,r=t.length;n<r;n++)e+=(1===t[n].toString(16).length?"0"+t[n].toString(16):t[n].toString(16))+((n+1)%16===0?"\n":(n+1)%8===0?" ":" ");return e}}]),t}();e.default=u},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=n(9),s=n(196),u=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"parse",value:function(t){return new s(t).parse()}},{key:"check",value:function(t){return t.readUInt32BE(0)>0&&-1!==[o.ATOM_FTYP,o.ATOM_MOOV,o.ATOM_MDAT].indexOf(t.toString("ascii",4,8))}}]),t}();t.exports=u},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(48),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_AVC1}},{key:"extraType",value:function(){return f.ATOM_AVCC}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(28),h=n(9),d=function(t){(0,o.default)(n,t);var e=c(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).entries=[],t}return(0,a.default)(n,[{key:"type",value:function(){return h.ATOM_CO64}},{key:"parse",value:function(t){var e=t.readUInt32BE(4);this.entries=new Array(e);for(var n=0;n<e;n++)this.entries[n]=f.readUInt64BE(t,8+8*n)}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.writeUInt32BE(this.entries.length,e+12);for(var n=0,r=this.entries.length;n<r;n++)f.writeUInt64BE(t,this.entries[n],e+16+8*n)}},{key:"bufferSize",value:function(){return 16+8*this.entries.length}}]),n}(l);t.exports=d},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(29),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_CTTS}},{key:"countMultiplier",value:function(){return 2}}]),n}(l);t.exports=h},function(t,e,n){"use strict";(function(e){var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9);function h(t,e){var n,r=0;for(n=0;n<4;n++){var i=255&t[e+n];if(r<<=7,r|=127&i,0===(128&i))break}return{size:r,read:n+1}}var d=function(t){(0,o.default)(r,t);var n=c(r);function r(){var t;return(0,i.default)(this,r),(t=n.call(this)).streamId=null,t.extraData=null,t}return(0,a.default)(r,[{key:"type",value:function(){return f.ATOM_ESDS}},{key:"parse",value:function(t){var n=5;n+=h(t,n).read,this.streamId=t.readUInt16BE(n),n+=2;var r=t[n++];for(1===(r>>7&1)&&(n+=2),1===(r>>6&1)&&(n+=t[n]+1),1===(r>>5&1)&&(n+=2);n<t.length;){var i=t[n++],a=h(t,n);if(n+=a.read,4===i){n+=13,a.size>13&&5===t[n++]&&(n+=(a=h(t,n)).read,this.extraData=e.allocUnsafe(a.size),t.copy(this.extraData,0,n,n+a.size));break}n+=a.size}}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),e+=8,e+=4,t[e++]=3,t[e++]=23+this.extraData.length,t.writeUInt16BE(this.streamId,e),e+=2,t[e++]=0,t[e++]=4,t[e++]=15+this.extraData.length,t[e++]=64,t[e++]=21,e+=11,t[e++]=5,t[e++]=this.extraData.length,this.extraData.copy(t,e),e+=this.extraData.length,t[e++]=6,t[e++]=1,t[e++]=2}},{key:"bufferSize",value:function(){return 37+this.extraData.length}}]),r}(l);t.exports=d}).call(this,n(3).Buffer)},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).majorBrand=null,t.minorVersion=0,t.compatibleBrands=[],t}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_FTYP}},{key:"parse",value:function(t){this.majorBrand=t.toString("ascii",0,4),this.minorVersion=t.readUInt32BE(4);for(var e=0;e<(t.length-8)/4;e++)this.compatibleBrands.push(t.toString("ascii",8+4*e,12+4*e))}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.write(this.majorBrand,e+8),t.writeUInt32BE(this.minorVersion,e+12);for(var n=0;n<this.compatibleBrands.length;n++)t.write(this.compatibleBrands[n],e+16+4*n)}},{key:"bufferSize",value:function(){return 16+4*this.compatibleBrands.length}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).handlerType=null,t.componentName=null,t}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_HDLR}},{key:"parse",value:function(t){this.handlerType=t.toString("ascii",8,12),this.componentName=t.toString("ascii",16)}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.write(this.handlerType.substring(0,4),e+16),t.write(this.componentName.substring(0,16),e+24)}},{key:"bufferSize",value:function(){return 48}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(48),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_HEV1}},{key:"extraType",value:function(){return f.ATOM_HVCC}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(48),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_HVC1}},{key:"extraType",value:function(){return f.ATOM_HVCC}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9),h=n(28),d=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_MDHD}},{key:"parse",value:function(t){1===t[0]?(this.timescale=t.readUInt32BE(20),this.duration=h.readUInt64BE(t,24)):(this.timescale=t.readUInt32BE(12),this.duration=t.readUInt32BE(16))}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.writeUInt32BE(this.timescale,e+20),t.writeUInt32BE(this.duration,e+24)}},{key:"bufferSize",value:function(){return 32}}]),n}(l);t.exports=d},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(21),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_MDIA}},{key:"availableAtoms",value:function(){return[f.ATOM_MDHD,f.ATOM_MINF,f.ATOM_HDLR]}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(21),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_MINF}},{key:"availableAtoms",value:function(){return[f.ATOM_VMHD,f.ATOM_SMHD,f.ATOM_STBL]}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(21),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_MOOV}},{key:"availableAtoms",value:function(){return[f.ATOM_MVHD,f.ATOM_TRAK]}}]),n}(l);t.exports=h},function(t,e,n){"use strict";(function(e){var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9),h=function(t){(0,o.default)(r,t);var n=c(r);function r(){var t;return(0,i.default)(this,r),(t=n.call(this)).channels=null,t.sampleSize=null,t.sampleRate=null,t.streamId=null,t.extraData=null,t}return(0,a.default)(r,[{key:"type",value:function(){return f.ATOM_MP4A}},{key:"parse",value:function(t){var n=8,r=t.readUInt16BE(n);for(n+=8,this.channels=t.readUInt16BE(n),n+=2,this.sampleSize=t.readUInt16BE(n),n+=4,this.sampleRate=t.readUInt32BE(n),n+=6,r>0&&(n+=16);n<t.length-8;){var i=t.readUInt32BE(n),a=t.toString("ascii",n+4,n+8);if(0===i)break;if(n+=8,a===f.ATOM_ESDS){var o=f.createAtom(a);null!==o&&(o.parse(t.slice(n,n+i-8)),this.streamId=o.streamId,o.extraData&&(this.extraData=e.allocUnsafe(4+o.extraData.length),this.extraData.write(f.ATOM_MP4A),o.extraData.copy(this.extraData,4,0)));break}n+=i-8}}},{key:"build",value:function(t,n){t.writeUInt32BE(this.bufferSize(),n),t.write(this.type(),n+4),t.writeUInt16BE(1,n+14),t.writeUInt16BE(this.channels,n+24),t.writeUInt16BE(this.sampleSize,n+26),t.writeUInt32BE(this.sampleRate,n+30);var r=f.createAtom(f.ATOM_ESDS);r.streamId=this.streamId,r.extraData=e.allocUnsafe(this.extraData.length-4),this.extraData.copy(r.extraData,0,4),r.build(t,n+36)}},{key:"bufferSize",value:function(){return 73+this.extraData.length}}]),r}(l);t.exports=h}).call(this,n(3).Buffer)},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9),h=n(28),d=[65536,0,0,0,65536,0,0,0,1073741824],p=function(t){(0,o.default)(n,t);var e=c(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).timescale=null,t.duration=null,t.nextTrackId=null,t}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_MVHD}},{key:"parse",value:function(t){1===t[0]?(this.timescale=t.readUInt32BE(20),this.duration=h.readUInt64BE(t,24),this.nextTrackId=t.readUInt32BE(104)):(this.timescale=t.readUInt32BE(12),this.duration=t.readUInt32BE(16),this.nextTrackId=t.readUInt32BE(96))}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.writeUInt32BE(this.timescale,e+20),t.writeUInt32BE(this.duration,e+24),t.writeUInt32BE(65536,e+28),t.writeUInt16BE(256,e+32);for(var n=0;n<d.length;n++)t.writeUInt32BE(d[n],e+44+4*n);t.writeUInt32BE(this.nextTrackId,e+104)}},{key:"bufferSize",value:function(){return 108}}]),n}(l);t.exports=p},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_SMHD}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4)}},{key:"bufferSize",value:function(){return 16}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(21),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_STBL}},{key:"availableAtoms",value:function(){return[f.ATOM_STSZ,f.ATOM_STCO,f.ATOM_STSS,f.ATOM_STTS,f.ATOM_STSC,f.ATOM_CO64,f.ATOM_STSD,f.ATOM_CTTS]}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(29),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_STCO}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(29),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_STSC}},{key:"countMultiplier",value:function(){return 3}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(194)),s=r(n(5)),u=r(n(6)),c=r(n(4));function l(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function h(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,c.default)(t);if(e){var i=(0,c.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,u.default)(this,n)}}var d=n(21),p=n(9),v=function(t){(0,s.default)(n,t);var e=h(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return p.ATOM_STSD}},{key:"availableAtoms",value:function(){return[p.ATOM_AVC1,p.ATOM_HEV1,p.ATOM_HVC1,p.ATOM_MP4A]}},{key:"getVideoAtom",value:function(){return this.getAtom(p.ATOM_AVC1)||this.getAtom(p.ATOM_HEV1)||this.getAtom(p.ATOM_HVC1)}},{key:"getAudioAtom",value:function(){return this.getAtom(p.ATOM_MP4A)}},{key:"parse",value:function(t){(0,o.default)((0,c.default)(n.prototype),"parse",this).call(this,t.slice(8))}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.writeUInt32BE(1,e+12),e+=16;var n,r=l(this.atoms);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.build(t,e),e+=i.bufferSize()}}catch(t){r.e(t)}finally{r.f()}}},{key:"bufferSize",value:function(){return 8+(0,o.default)((0,c.default)(n.prototype),"bufferSize",this).call(this)}}]),n}(d);t.exports=v},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(29),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_STSS}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).entries=[],t}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_STSZ}},{key:"parse",value:function(t){var e=t.readUInt32BE(4),n=t.readUInt32BE(8);if(this.entries=new Array(n),0===e)for(var r=0;r<n;r++)this.entries[r]=t.readUInt32BE(12+4*r);else this.entries.fill(e)}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.writeUInt32BE(this.entries.length,e+16);for(var n=0,r=this.entries.length;n<r;n++)t.writeUInt32BE(this.entries[n],e+20+4*n)}},{key:"bufferSize",value:function(){return 20+4*this.entries.length}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(29),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_STTS}},{key:"countMultiplier",value:function(){return 2}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(28),h=n(9),d=[65536,0,0,0,65536,0,0,0,1073741824],p=function(t){(0,o.default)(n,t);var e=c(n);function n(){var t;return(0,i.default)(this,n),(t=e.call(this)).duration=null,t.trackId=null,t.width=null,t.height=null,t}return(0,a.default)(n,[{key:"type",value:function(){return h.ATOM_TKHD}},{key:"parse",value:function(t){this.trackId=t.readUInt32BE(12),1===t[0]?(this.duration=f.readUInt64BE(t,28),this.width=t.readUInt16BE(88),this.height=t.readUInt16BE(92)):(this.duration=t.readUInt32BE(20),this.width=t.readUInt16BE(76),this.height=t.readUInt16BE(80))}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.writeUInt32BE(3,e+8),t.writeUInt32BE(this.trackId,e+20),t.writeUInt32BE(this.duration,e+28),null===this.width||null===this.height?(t.writeUInt16BE(1,e+42),t.writeUInt16BE(256,e+44)):(t.writeUInt16BE(this.width,e+84),t.writeUInt16BE(this.height,e+88));for(var n=0;n<d.length;n++)t.writeUInt32BE(d[n],e+48+4*n)}},{key:"bufferSize",value:function(){return 92}}]),n}(l);t.exports=p},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(21),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_TRAK}},{key:"availableAtoms",value:function(){return[f.ATOM_TKHD,f.ATOM_MDIA]}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(15),f=n(9),h=function(t){(0,o.default)(n,t);var e=c(n);function n(){return(0,i.default)(this,n),e.apply(this,arguments)}return(0,a.default)(n,[{key:"type",value:function(){return f.ATOM_VMHD}},{key:"build",value:function(t,e){t.writeUInt32BE(this.bufferSize(),e),t.write(this.type(),e+4),t.writeUInt32BE(1,e+8)}},{key:"bufferSize",value:function(){return 20}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=n(99),s=n(200),u=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"parse",value:function(t){return new s(t).parse()}},{key:"check",value:function(t){return t.toString("ascii",0,3)===o.HEADER_PREFIX&&t[3]===o.HEADER_VERSION}}]),t}();t.exports=u},function(t,e,n){"use strict";t.exports={MOVIE_TIMESCALE:1e3,HEADER_SIZE:9,HEADER_PREFIX:"FLV",HEADER_VERSION:1,TYPE_SCRIPT:18,TYPE_VIDEO:9,TYPE_AUDIO:8,AUDIO_FORMAT_AAC:10,VIDEO_FORMAT_H264:7}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(25));function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){(0,i.default)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(t,e){return e=(e=e.toLowerCase())[0].toUpperCase()+e.substr(1),Object.prototype.toString.call(t)==="[object "+e+"]"}function u(t,e,n){if(void 0===n&&(n=2),void 0===e&&(e=0),(t=t.toString()).length>=n)return t;var r=n-t.length;return new Array(r).fill(String(e)).join("")+t}function c(t,e){return void 0!==t&&t?(e=e||new Date,t=(t=(t=(t=(t=(t=t.replace(/y/gi,u(e.getFullYear()),0)).replace(/m/gi,u(e.getMonth()+1),0)).replace(/d/gi,u(e.getDate()),0)).replace(/h/gi,u(e.getHours()),0)).replace(/i/gi,u(e.getMinutes()),0)).replace(/s/gi,u(e.getSeconds()),0)):""}function l(t,e){var n=(t=t||{}).nameFormat||["ymd_his"];e=e||new Date;var r="";if(s(n,"string"))n=[n,{}];else{if(!s(n,"array"))return void function(t){throw new Error(t)}("name format must be string or array");s(n[0],"string")||(n[0]="ymd_his"),s(n[1],"object")||(n[1]={})}var i=n[0].split(/\{(?:[^{}]+)\}/),a=n[1];n[0].replace(/\{([^{}]*)\}/g,function(t,n,o){var s=i.shift();r+=c(s,e),r+=n in a?a[n]:t});var o=i.shift();return r+=c(o,e)}function f(t,e){this.name=t,this.allowUpDateName=!0,this.byteLength=0,this.options=e,this.startTime=(new Date).toLocaleString()}f.prototype.setEndTime=function(){this.endTime=(new Date).toLocaleString()},f.prototype.updateNameByStream=function(t,e){if(this.allowUpDateName){var n=new Uint8Array(e),r=(n[19]<<24)+(n[18]<<16)+(n[17]<<8)+n[16]>>>0,i="20"+(r>>26)+"/"+(r>>22&15)+"/"+(r>>17&31)+" "+(r>>12&31)+":"+(r>>6&63)+":"+(63&r);if(t.fileName)var a=t.fileName;else a=l(t,new Date(i));this.updateName(a),this.allowUpDateName=!1,n=null}e=null},f.prototype.updateName=function(t){this.name=t};var h=new function(){var t={count:0,total:0,group:[]},e=function(){};return e.prototype.add=function(e){t.count++,t.total+=e.byteLength,t.group.push(e)},e.prototype.get=function(e){return e in t?t[e]:t},new e};var d=function(){var t=1048576,e=null,n=null,r=0,i=void 0,a=null;function s(){this.onMessage=function(){},this.postMessage=function(t){this.__onMessage(t)},this.__postMessage=function(t){this.onMessage(t)}}return s.prototype.__onMessage=function(t){var e=t;switch(e.type){case"init":this.init(e.options);break;case"addBuffer":this.addBuffer(e);break;case"close":this.close()}},s.prototype.init=function(e){this.fullSize=e.fullSize||1/0,this.singleSize=e.singleSize+20*t||520*t,i="init",this.limitOptions=Object.assign({limitBy:"fullSize"},e.limitOptions),this.nameOptions=Object.assign({namedBy:"date",nameFormat:["ymd_his",{}]},e.nameOptions)},s.prototype._malloc=function(t){e&&n&&(n=null,e=null),e=new ArrayBuffer(t),n=new DataView(e),a=new f("__DEFAULT__FILE__")},s.prototype._initVideoMem=function(){!e&&this.singleSize&&this._malloc(this.singleSize)},s.prototype.appendVideoBuf=function(e){var i=e.byteLength,a=r+i;if(a>this.singleSize-20*t)this.inNodePlace(),this.addBuffer({buffer:e});else{for(var o=r;o<a;o++)n.setUint8(o,e[o-r]);r=a,this.__postMessage({type:"pendding",size:r,total:this.singleSize})}},s.prototype.addBuffer=function(t){if("closed"!==i){var e=t.buffer;this._initVideoMem(),i="addBuffer";var n=e.length,a=r+n;h.get("total")+a>this.fullSize?this.close():this.appendVideoBuf(e)}},s.prototype.inNodePlace=function(){if("addBuffer"===i){var t;i="download",this.nameOptions&&this.nameOptions.fileName?a.updateName(this.nameOptions.fileName):a.updateNameByStream(this.nameOptions,e.slice(0,20)),a.byteLength=r,a.setEndTime(),h.add(a),a.name&&(t=a.name),a.name=t;var n=e.slice(0,r);if(this.__postMessage({type:"download",data:o(o({},a),{},{buffer:n})}),this.reset(),n=null,"count"===this.limitOptions.limitBy){var s=this.limitOptions.count;s&&s===h.get("count")&&this.close()}}},s.prototype.reset=function(){r=0,this._malloc(this.singleSize)},s.prototype.close=function(){this.inNodePlace(),"closed"!==i&&void 0!==i&&(i="closed",this.__postMessage({type:"closed",message:"record was closed"}),e=null,n=null)},new s};e.default=d},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(36),n(207),n(208),n(22),n(209),n(23),n(51),n(102),n(210),n(103),n(211),n(212),n(213),n(52),n(214),n(19),n(13),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),a)}()},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),function(t){var e=i,n=e.lib,r=n.WordArray,a=n.Hasher,o=e.algo,s=[],u=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,.5))),u[i]=n(t.pow(r,1/3)),i++),r++}();var c=[],l=o.SHA256=a.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],f=n[6],h=n[7],d=0;d<64;d++){if(d<16)c[d]=0|t[e+d];else{var p=c[d-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[d-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[d]=v+c[d-7]+m+c[d-16]}var y=r&i^r&a^i&a,w=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&f)+u[d]+c[d];h=f,f=l,l=s,s=o+b|0,o=a,a=i,i=r,r=b+(w+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=a._createHelper(l),e.HmacSHA256=a._createHmacHelper(l)}(Math),i.SHA256)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(36),function(){var t=a,e=t.lib.Hasher,n=t.x64,r=n.Word,i=n.WordArray,o=t.algo;function s(){return r.create.apply(r,arguments)}var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var t=0;t<80;t++)c[t]=s()}();var l=o.SHA512=e.extend({_doReset:function(){this._hash=new i.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],f=n[6],h=n[7],d=r.high,p=r.low,v=i.high,g=i.low,m=a.high,y=a.low,w=o.high,b=o.low,S=s.high,D=s.low,_=l.high,x=l.low,E=f.high,T=f.low,k=h.high,I=h.low,A=d,R=p,M=v,C=g,P=m,O=y,B=w,F=b,L=S,j=D,N=_,U=x,z=E,V=T,H=k,W=I,Y=0;Y<80;Y++){var q,X,G=c[Y];if(Y<16)X=G.high=0|t[e+2*Y],q=G.low=0|t[e+2*Y+1];else{var Q=c[Y-15],Z=Q.high,K=Q.low,$=(Z>>>1|K<<31)^(Z>>>8|K<<24)^Z>>>7,J=(K>>>1|Z<<31)^(K>>>8|Z<<24)^(K>>>7|Z<<25),tt=c[Y-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),at=c[Y-7],ot=at.high,st=at.low,ut=c[Y-16],ct=ut.high,lt=ut.low;X=(X=(X=$+ot+((q=J+st)>>>0<J>>>0?1:0))+rt+((q+=it)>>>0<it>>>0?1:0))+ct+((q+=lt)>>>0<lt>>>0?1:0),G.high=X,G.low=q}var ft,ht=L&N^~L&z,dt=j&U^~j&V,pt=A&M^A&P^M&P,vt=R&C^R&O^C&O,gt=(A>>>28|R<<4)^(A<<30|R>>>2)^(A<<25|R>>>7),mt=(R>>>28|A<<4)^(R<<30|A>>>2)^(R<<25|A>>>7),yt=(L>>>14|j<<18)^(L>>>18|j<<14)^(L<<23|j>>>9),wt=(j>>>14|L<<18)^(j>>>18|L<<14)^(j<<23|L>>>9),bt=u[Y],St=bt.high,Dt=bt.low,_t=H+yt+((ft=W+wt)>>>0<W>>>0?1:0),xt=mt+vt;H=z,W=V,z=N,V=U,N=L,U=j,L=B+(_t=(_t=(_t=_t+ht+((ft+=dt)>>>0<dt>>>0?1:0))+St+((ft+=Dt)>>>0<Dt>>>0?1:0))+X+((ft+=q)>>>0<q>>>0?1:0))+((j=F+ft|0)>>>0<F>>>0?1:0)|0,B=P,F=O,P=M,O=C,M=A,C=R,A=_t+(gt+pt+(xt>>>0<mt>>>0?1:0))+((R=ft+xt|0)>>>0<ft>>>0?1:0)|0}p=r.low=p+R,r.high=d+A+(p>>>0<R>>>0?1:0),g=i.low=g+C,i.high=v+M+(g>>>0<C>>>0?1:0),y=a.low=y+O,a.high=m+P+(y>>>0<O>>>0?1:0),b=o.low=b+F,o.high=w+B+(b>>>0<F>>>0?1:0),D=s.low=D+j,s.high=S+L+(D>>>0<j>>>0?1:0),x=l.low=x+U,l.high=_+N+(x>>>0<U>>>0?1:0),T=f.low=T+V,f.high=E+z+(T>>>0<V>>>0?1:0),I=h.low=I+W,h.high=k+H+(I>>>0<W>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(l),t.HmacSHA512=e._createHmacHelper(l)}(),a.SHA512)}()},function(t,e){t.exports=function(){return new Worker("./module/keepAlive.worker.js")}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(106)),a=n(37),o=n(66),s=r(n(39)),u=n(148),c=n(149),l=n(150),f=n(67),h=r(n(167)),d=r(n(232));window.RPC=i.default,window._getSession=a._getSession,window._setSession=a._setSession,window.setIP=a.setIP,window.ajax=o.ajax,window.pubsub=s.default,window.loginError=u.loginError,window.setCookie=c.setCookie,window.BrowserType=l.BrowserType,window.PluginCanvasES6=f.PluginCanvasES6,window.H5Canvas=d.default,window.translation=o.translation,window.setLanguage=o.setLanguage,window.tl=o.tl;var p=function(t){this.wsURL=t.wsURL,this.rtspURL=t.rtspURL,this.isTalkService=t.isTalkService,this.isPlayback=t.playback||!1,this.playBackRange=t.range||!1,this.isPrivateProtocol=t.isPrivateProtocol||!1,this.isAudioFlag=t.isAudioFlag||!1,this.lessRateCanvas=t.lessRateCanvas||!1,this.audioState="stop",this.realm=t.realm||"",this.ws=null,this.decodeMode=t.decodeMode,this.supportExtraError=t.supportExtraError||!1,this.playbackIndex=t.playbackIndex,this.wndIndex=t.wndIndex,this.events={ResolutionChanged:function(){},PlayStart:function(){},DecodeStart:function(){},UpdateCanvas:function(){},GetFrameRate:function(){},FrameTypeChange:function(){},Error:function(){},MSEResolutionChanged:function(){},audioChange:function(){},WorkerReady:function(){},IvsDraw:function(){},FileOver:function(){},Waiting:function(){},UpdateTime:function(){},recordChanged:function(){},GetFirstFrame:function(){},GetPlayOptionDone:function(){},WsConnectDone:function(){},UpdateTimeStamp:function(){},receiveStreamAssistFrame:function(){},GetTotalTime:function(){},decodeIFrame:function(){},IFrameWorkerReady:function(){},GetAudioFloat32Data:function(){}},this.username=t.username,this.password=t.password,this.deployType=t.deployType,this.duration=t.duration,this.h265AccelerationEnabled=t.h265AccelerationEnabled,this.disabledAudio=t.disabledAudio,this.speed=t.speed,this.isDownLoad=t.isDownLoad,this.fileName=t.fileName};p.prototype={init:function(t,e,n){var r={dType:this.deployType,isPrivateProtocol:this.isPrivateProtocol,realm:this.realm,h265AccelerationEnabled:this.h265AccelerationEnabled,disabledAudio:this.disabledAudio,speed:this.speed,isDownLoad:this.isDownLoad,fileName:this.fileName,wndIndex:this.wndIndex};for(var i in this.ws=new h.default(this.wsURL,this.rtspURL,r),this.ws.setExtraError(this.supportExtraError),this.ws.init(t,e,n,this.isPlayback,this.isAudioFlag),this.ws.setLiveMode(this.decodeMode),this.ws.setUserInfo(this.username,this.password),this.ws.setPlayMode(this.isPlayback,this.playBackRange),this.ws.setLessRate(this.lessRateCanvas),this.events)this.ws.setCallback(i,this.events[i]);this.events=null},initIFrame:function(){if(null===this.ws)for(var t in this.ws=new h.default("","",{}),this.ws.initIFrame(),this.events)this.ws.setCallback(t,this.events[t])},decodeIFrame:function(t,e,n){this.ws.decodeIFrame(t,e,n)},startCut:function(t,e){t?this.controlPlayer("startRecord",!0):this.ws&&(this.controlPlayer("startRecord",!1,e),this.ws.disconnect(),this.ws=null)},startRecord:function(t,e){if(t){if(this.ws)return;var n={isRecord:!0,isPrivateProtocol:this.isPrivateProtocol,realm:this.realm};for(var r in Object.assign(n,e),this.ws=new h.default(this.wsURL,this.rtspURL,n),this.ws.setUserInfo(this.username,this.password),this.events)this.ws.setCallback(r,this.events[r]);this.controlPlayer("startRecord",!0),this.connect()}else this.ws&&(this.controlPlayer("startRecord",!1),this.ws.disconnect(),this.ws=null)},connect:function(t){this.ws.connect(),t||(this.audioState="play")},play:function(){this.controlPlayer("PLAY")},pause:function(){this.controlPlayer("PAUSE")},stop:function(){this.controlPlayer("TEARDOWN")},close:function(){this.ws.disconnect(),this.audioState="stop"},closeIFrame:function(){this.ws.disconnectWorker()},playByTime:function(t){t=t<0?0:t,this.duration>0&&t>this.duration&&(t=this.duration),this.controlPlayer("PLAY","video",t)},playFF:function(t){this.controlPlayer("SCALE",t)},playRewind:function(){},playNextFrame:function(){this.controlPlayer("playNextFrame")},getCurFrameInfo:function(){return this.controlPlayer("getCurFrameInfo")},audioPlay:function(){this.controlPlayer("audioPlay","start"),this.audioState="play"},audioStop:function(){this.controlPlayer("audioPlay","stop")},audioPause:function(){this.controlPlayer("audioPlay","pause"),this.audioState="pause"},setAudioSamplingRate:function(t){this.controlPlayer("audioSamplingRate",t)},setAudioVolume:function(t){this.controlPlayer("volumn",t)},gotoSecond:function(t){var e=this;window.clearInterval(e.checkRsPre),window.clearInterval(e.checkRsNext),window.clearInterval(e.checkRsGoto),e.ws.clearMap(),!0===e.running&&(e.pause(),e.running=!1),e.playByTime(t-5),e.running=!0,e.checkRsGoto=window.setTimeout(function(){e.pause(),e.running=!1},12e3)},nextFrame:function(t,e,n){var r=this,i=t>Math.pow(2,32)?0:t,a=r.ws.gotoFrame(i);!1===a?r.nextSecond(e,function(e){n(r.ws.gotoFrame(t))}):n(a)},preFrame:function(t,e,n){var r=this,i=r.ws.gotoFrame(t);!1===i?r.preSecond(e,function(e){n(r.ws.gotoFrame(t))}):n(i)},nextSecond:function(t,e){var n=this,r=n.ws.gotoSecond(t);!1===r?(!1===n.running&&(n.playByTime(t),n.running=!0),n.checkRsNext=window.setInterval(function(){!1!==(r=n.ws.gotoSecond(t))&&(window.clearInterval(n.checkRsNext),window.setTimeout(function(){n.running=!1,n.pause()},9e3),e(r))},2e3)):(n.ws.checkLeftSize(t,"next")<=2&&!1===n.running&&(n.playByTime(t+1),n.running=!0,window.setTimeout(function(){n.pause(),n.running=!1},9e3)),e(r))},preSecond:function(t,e){var n=this,r=n.ws.gotoSecond(t);!1===r?(!1===n.running&&(n.playByTime(t-5),n.running=!0),n.checkRsPre=window.setInterval(function(){!1!==(r=n.ws.gotoSecond(t))&&(window.clearInterval(n.checkRsPre),window.setTimeout(function(){n.running=!1,n.pause()},9e3),e(r))},2e3)):(n.ws.checkLeftSize(t,"pre")<=2&&!1===n.running&&(n.playByTime(t-5),n.running=!0,window.setTimeout(function(){n.pause(),n.running=!1},9e3)),e(r))},controlPlayer:function(t,e,n){var r;return r="video"===e?{command:t,range:n||0}:"audioPlay"===t?{command:t,data:e,range:n||0}:"startRecord"===t?{command:t,data:e,stopDown:n}:{command:t,data:e},this.ws.controlPlayer(r)},setPlayMode:function(t){this.ws.setLiveMode(t)},setPlayPath:function(t){this.ws.setRTSPURL(t)},capture:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ivsCanvasArr:[]};this.ws.capture(t,e)},getCapture:function(t,e){return this.ws.getCapture(t,e)},talk:function(t){if("on"===t){this.ws=new h.default(this.wsURL,this.rtspURL,{isTalkService:this.isTalkService,isPrivateProtocol:this.isPrivateProtocol,realm:this.realm}),this.ws.talkInit(),this.ws.setUserInfo(this.username,this.password);var e=this;for(var n in this.on("AudioWorkerReady",function(){e.ws.connect()}),this.events)this.ws.setCallback(n,this.events[n])}else this.ws.disconnect()},on:function(t,e){this.events[t]=e},setDisabledAudio:function(t){this.ws.setDisabledAudio(t)}};var v=p;e.default=v},function(t,e,n){"use strict";var r=n(107),i=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.getRandomStr=e.default=void 0;var a=i(n(108)),o=i(n(17)),s=i(n(18)),u=i(n(114)),c=r(n(37)),l=i(n(54)),f=i(n(137)),h=i(n(138)),d=i(n(139)),p=i(n(39)),v=n(40),g=v.SM4,m=v.SM2,y=n(140),w=n(3).Buffer,b=g.constants.CBC,S=new c.default,D=20,_=function(t,e){var n={},r=t.split(","),i=r[0].split(":"),a=r[1].split(":");n[i[0]]=i[1],n[a[0]]=a[1];var o=new h.default;return o.setPublic(n.N,n.E),o.encrypt(e)},x=function(t){return d.default.enc.Utf8.parse(t)},E=function(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=window.atob(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r},T=function(t){for(var e=new w(t.byteLength),n=new Uint8Array(t),r=0;r<e.length;++r)e[r]=n[r];return e},k=function(t){for(var e="",n=0;n<t.length;n++){var r=t[n].toString(16);1===r.length&&(r="0"+r),e+=r}return e},I=function(t){return new Uint8Array(t.match(/.{1,2}/g).map(function(t){return parseInt(t,16)}))},A=function(t){if(""===t)return"";for(var e=[],n=0;n<t.length;n++)e.push(t.charCodeAt(n).toString(16));return e.join("")},R=function(t){for(var e="",n=window.crypto||window.msCrypto;e.length<t;){var r=(Math.random().toString().substr(2)-0).toString();n&&(r=n.getRandomValues(new Uint32Array(1))[0].toString()),"0"!==r&&(e+=r)}return e.substr(0,t)};e.getRandomStr=R;var M=R(16)+"",C=A(M),P=A("0000000000000000");function O(t){var e="04"+t.SM.replace("Y:","").replace("X:","").replace(",",""),n=m.encrypt(M,e,{inputEncoding:"utf8",outputEncoding:"base64"});n=E(n);for(var r=[],i=0;i<4;i++){var a=new y.BerWriter;a.startSequence(),0===i?a.writeBuffer(T(n.slice(0,32)),2):1===i?a.writeBuffer(T(n.slice(32,64)),2):2===i?a.writeBuffer(T(n.slice(64,96)),4):a.writeBuffer(T(n.slice(96,n.byteLength)),4),a.endSequence();var o=a.buffer;r.push(k(o))}var s=(r=r.map(function(t){return t.slice(4)})).join(""),u=I(s),c=new y.BerWriter;c.startSequence(),c.writeBuffer(T(u)),c.endSequence();var l=c.buffer;return k(l)}var B=function(t,e,n){return function(r,i){return new Promise(function(a){var o=d.default.mode.ECB,s={padding:d.default.pad.ZeroPadding};e&&t&&(~t.indexOf("ROAE")?o=d.default.mode.ECB:~t.indexOf("RPAC")&&(o=d.default.mode.CBC,s.iv=d.default.enc.Utf8.parse("0000000000000000"))),s.mode=o;var u="";n&&"SM"===n?(u=g.decrypt(r,C,{iv:P,mode:b,inputEncoding:"base64",outputEncoding:"utf8"}),a(JSON.parse(u))):(u=d.default.AES.decrypt(r,i,s),a(JSON.parse(d.default.enc.Utf8.stringify(u))))})}},F=function(t,e,n,r,i){return function(a,o,s){return new Promise(function(u){var c="AES-128",l=d.default.mode.ECB,f={padding:d.default.pad.ZeroPadding};if(n&&e&&(~e.indexOf("ROAE")?(l=d.default.mode.ECB,c="ROAE-256"):~e.indexOf("RPAC")&&(l=d.default.mode.CBC,c="RPAC-256",f.iv=d.default.enc.Utf8.parse("0000000000000000"))),r&&"SM"===r){var h=g.encrypt(JSON.stringify(a),C,{iv:P,mode:b,inputEncoding:"utf8",outputEncoding:"base64"});c="SM4_CBC_PKCS7_PADDING",u({salt:O(i),content:h,cipher:c})}else{f.mode=l;var p=d.default.AES.encrypt(d.default.enc.Utf8.parse(JSON.stringify(a)),s,f).toString();u({salt:_(t,o),content:p,cipher:c})}})}},L={},j=function(){var t=(0,u.default)(a.default.mark(function t(e){var n,r,i,o;return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n={channel:e||0},r=(0,c._getSession)(),i=JSON.stringify(n),!L[r]||!L[r][i]){t.next=7;break}return t.abrupt("return",L[r][i]);case 7:return L[r]={},t.next=10,S.PTZ.instance(e);case 10:return o=t.sent,L[r][i]=o.result,t.abrupt("return",o.result);case 13:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}();function N(){var t=this;c.default.call(this),this.cipher=["AES"],this.saltLen=16,this.pub="",this.newSecVersion=!1,this._getKeyt=function(){return R(t.saltLen)},this._decrypt=B,this._encrypt=F,this.suggestedAsymmetric="",this.pubEx=null,this.keepAliveTimer=[],this._encryptDoFind=function(){var e=(0,u.default)(a.default.mark(function e(n,r){var i,o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=[(0,c._data)("".concat(n,".doFind"),{count:D},{object:r})],e.next=3,t.multiRecordSec(i);case 3:return o=e.sent,e.abrupt("return",o[0].params);case 5:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()}N.prototype={realm:"",login:function(t,e,n){return new Promise(function(r,i){S.Global.firstLogin(t).then(function(a){if(268632075===a.error.code)i(a);else if(a.session){var o=a.params.realm,s=(0,f.default)(t+":"+o+":"+e),u=(0,f.default)(t+":"+a.params.random+":"+s),c={realm:o,random:a.params.random,passwordType:"Default",authorityType:a.params.encryption};S.Global.secondLogin(t,u,c,n).then(function(t){N.prototype.realm=o,r(t)}).catch(function(t){i(t)})}else i(a)}).catch(function(t){i(t)})})},keepAlive:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,o=p.default.subscribe("_clearTime_",function(e){clearInterval(t.keepAliveTimer[e]),t.keepAliveTimer[e]=null,p.default.unsubscribe(o)});clearInterval(this.keepAliveTimer[a]),this.keepAliveTimer[a]=setInterval(function(){return S.Global.keepAlive(e,r,i)},n)},getUrlData:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"POST";return new Promise(function(i,a){(0,l.default)({method:r,url:t,headers:{"Self-TargetIP":(0,c.getIP)()}}).then(function(t){t=t.data,e.saltLen="V2.0"===n.SecurityBaselineVersion||"V2.0"===t.SecurityBaselineVersion?32:16,e.newSecVersion="V2.0"===n.SecurityBaselineVersion||"V2.0"===t.SecurityBaselineVersion,i(t)}).catch(function(t){a()})})},getEncrypt:function(t){var e=this;return S.Security.getEncryptInfoOut().then(function(n){var r=n.cipher,i=n.pub,a=n.suggestedAsymmetric,o=n.pubEx;return e.cipher=r,e.pub=i,e.suggestedAsymmetric=a,e.pubEx=o,t&&(e.saltLen="V2.0"===t.SecurityBaselineVersion?32:16,e.newSecVersion="V2.0"===t.SecurityBaselineVersion),e._decrypt=e._decrypt(e.cipher,e.newSecVersion,e.suggestedAsymmetric),e._encrypt=e._encrypt(e.pub,e.cipher,e.newSecVersion,e.suggestedAsymmetric,e.pubEx),!0}).catch(function(){})},getSecConfig:function(t,e){var n=this;return(0,u.default)(a.default.mark(function r(){var i,o,s,u,l;return a.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,i=n._getKeyt(),o=x(i),s={},!(t instanceof Array)){r.next=14;break}return u=t.map(function(t){return(0,c._config)({name:t,channel:e,type:"getConfig"})}),r.next=8,n._encrypt(u,i,o);case 8:return s=r.sent,r.next=11,S.System.multiSec(s);case 11:s=r.sent,r.next=20;break;case 14:return r.next=16,n._encrypt({name:t},i,o);case 16:return s=r.sent,r.next=19,S.Security.getConfig(s);case 19:s=r.sent;case 20:return r.next=22,n._decrypt(s.content,o);case 22:return l=r.sent,r.abrupt("return",l.table?l.table:l);case 26:throw r.prev=26,r.t0=r.catch(0),r.t0,String("Error:getSecConfig is error,please check ".concat(t," is exists"));case 30:case"end":return r.stop()}},r,null,[[0,26]])}))()},getSecDefault:function(t,e){var n=this;return(0,u.default)(a.default.mark(function r(){var i,o,s,u,l;return a.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,i=n._getKeyt(),o=x(i),s={},!(t instanceof Array)){r.next=14;break}return u=t.map(function(t){return(0,c._config)({name:t,channel:e,type:"getDefault"})}),r.next=8,n._encrypt(u,i,o);case 8:return s=r.sent,r.next=11,S.System.multiSec(s);case 11:s=r.sent,r.next=20;break;case 14:return r.next=16,n._encrypt({name:t},i,o);case 16:return s=r.sent,r.next=19,S.Security.getDefault(s);case 19:s=r.sent;case 20:return r.next=22,n._decrypt(s.content,o);case 22:return l=r.sent,r.abrupt("return",l.table?l.table:l);case 26:throw r.prev=26,r.t0=r.catch(0),String("Error:getSecDefault is error,please check ".concat(t," is exists"));case 29:case"end":return r.stop()}},r,null,[[0,26]])}))()},setSecConfig:function(t,e,n,r){var i=this;return(0,u.default)(a.default.mark(function o(){var s,u,l,f,h;return a.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(a.prev=0,s=i._getKeyt(),u=x(s),l={},!(t instanceof Array)){a.next=16;break}if(!e.length||t.length===e.length){a.next=7;break}throw new Error("setSecConfig params error");case 7:return f=t.map(function(t,i){return(0,c._config)({name:t,channel:n,params:e[i],type:"setConfig",options:r})}),a.next=10,i._encrypt(f,s,u);case 10:return l=a.sent,a.next=13,S.System.multiSec(l);case 13:l=a.sent,a.next=22;break;case 16:return a.next=18,i._encrypt({name:t,table:e},s,u);case 18:return l=a.sent,a.next=21,S.Security.setConfig(l);case 21:l=a.sent;case 22:return a.next=24,i._decrypt(l.content,u);case 24:return h=a.sent,a.abrupt("return",h.table?h.table:h);case 28:throw a.prev=28,a.t0=a.catch(0),a.t0;case 31:case"end":return a.stop()}},o,null,[[0,28]])}))()},access:function(t){var e=this;return(0,u.default)(a.default.mark(function n(){var r,i,o,s;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r=e._getKeyt(),i=x(r),n.next=5,e._encrypt(t,r,i);case 5:return o=n.sent,n.next=8,S.DevInit.access(o);case 8:return s=n.sent,n.abrupt("return",s.table?s.table:s);case 12:throw n.prev=12,n.t0=n.catch(0),String("Error:access is error");case 15:case"end":return n.stop()}},n,null,[[0,12]])}))()},multiSec:function(t){var e=this;return(0,u.default)(a.default.mark(function n(){var r,i,o,s,u,l,f,h,d,p;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=[],t instanceof Array?r=t.map(function(t){return(0,c._data)(t.method,t.params,t.object&&{object:t.object})}):(i=t.method,o=t.params,s=void 0===o?null:o,u=t.object,l=void 0===u?void 0:u,r=[r=(0,c._data)(i,s,l&&{object:l})]),n.prev=2,f=e._getKeyt(),h=x(f),n.next=7,e._encrypt(r,f,h);case 7:return d=n.sent,n.next=10,S.System.multiSec(d);case 10:return d=n.sent,n.next=13,e._decrypt(d.content,h);case 13:return p=n.sent,n.abrupt("return",p.table?p.table:p);case 17:throw n.prev=17,n.t0=n.catch(2),String("Error:multiSec is error");case 20:case"end":return n.stop()}},n,null,[[2,17]])}))()},getRecords:function(t,e){var n=arguments,r=this;return(0,u.default)(a.default.mark(function i(){var o,u,c,l;return a.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return o=!(n.length>2&&void 0!==n[2])||n[2],u={},c="",i.prev=2,i.next=5,S.RecordFinder.create(t);case 5:return l=i.sent,c=l.result,i.next=9,S.RecordFinder.startFind(e,c);case 9:if((l=i.sent).result){i.next=12;break}throw String("startFind is error");case 12:if(!o){i.next=18;break}return i.next=15,r._encryptDoFind("RecordFinder",c);case 15:i.t0=i.sent,i.next=21;break;case 18:return i.next=20,S.RecordFinder.doFind(D,c);case 20:i.t0=i.sent;case 21:l=i.t0,u=l.records;case 23:if(l.found!==D){i.next=37;break}if(!o){i.next=30;break}return i.next=27,r._encryptDoFind("RecordFinder",c);case 27:i.t1=i.sent,i.next=33;break;case 30:return i.next=32,S.RecordFinder.doFind(D,c);case 32:i.t1=i.sent;case 33:l=i.t1,u=null===l.records?(0,s.default)(u):[].concat((0,s.default)(u),(0,s.default)(l.records)),i.next=23;break;case 37:return i.abrupt("return",u||[]);case 40:throw i.prev=40,i.t2=i.catch(2),String("Error:getRecords is error, please check ".concat(t," is exists"));case 43:return i.prev=43,i.next=46,S.RecordFinder.stopFind(c);case 46:return i.next=48,S.RecordFinder.destroy(c);case 48:return i.finish(43);case 49:case"end":return i.stop()}},i,null,[[2,40,43,49]])}))()},createDoSeekFind:function(t,e){var n=this,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=null,o=!1,s=function(){var n=(0,u.default)(a.default.mark(function n(){var r;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!i&&!o){n.next=2;break}return n.abrupt("return");case 2:return o=!0,n.next=5,S.RecordFinder.create(t);case 5:return r=n.sent,n.next=8,S.RecordFinder.startFind(e,r.result);case 8:i=r.result,o=!1;case 10:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}();return{getQuerySize:function(){var e=(0,u.default)(a.default.mark(function e(){var n;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s();case 3:if(i){e.next=6;break}return console.warn("Error:createDoSeekFind is error, please check object is exists"),e.abrupt("return",0);case 6:return e.next=8,S.RecordFinder.getQuerySize(i);case 8:return n=e.sent,e.abrupt("return",n.count);case 12:throw e.prev=12,e.t0=e.catch(0),String("Error:createDoSeekFind is error, please check getQuerySize(".concat(t,") is exists"));case 15:case"end":return e.stop()}},e,null,[[0,12]])}));return function(){return e.apply(this,arguments)}}(),doSeekFind:function(){var e=(0,u.default)(a.default.mark(function e(o){var u,l,f,h;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s();case 2:if(i){e.next=5;break}return console.warn("Error:createDoSeekFind is error, please check object is exists"),e.abrupt("return",!1);case 5:if(u=[],l=null,e.prev=7,f=(o-1)*D,!r){e.next=19;break}return h=[(0,c._data)("RecordFinder.doSeekFind",{offset:f,count:D},{object:i})],e.next=13,n.multiRecordSec(h);case 13:if(!(l=e.sent)[0].error){e.next=16;break}throw String("Error:doSeekFind ".concat(t," is error with Encrypt"));case 16:u=l[0].params.records,e.next=23;break;case 19:return e.next=21,S.RecordFinder.doSeekFind(f,D,i);case 21:l=e.sent,u=l.records;case 23:return e.abrupt("return",u||[]);case 26:throw e.prev=26,e.t0=e.catch(7),String("Error:createDoSeekFind is error, please check doSeekFind(".concat(t,") is exists"));case 29:case"end":return e.stop()}},e,null,[[7,26]])}));return function(t){return e.apply(this,arguments)}}(),destroy:function(){var t=(0,u.default)(a.default.mark(function t(){return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,S.RecordFinder.stopFind(i);case 5:return t.next=7,S.RecordFinder.destroy(i);case 7:return i=null,t.abrupt("return",!0);case 11:throw t.prev=11,t.t0=t.catch(2),String("Error:createDoSeekFind is error, please check object is undefined");case 14:case"end":return t.stop()}},t,null,[[2,11]])}));return function(){return t.apply(this,arguments)}}()}},getVideoCaps:function(t){return(0,u.default)(a.default.mark(function e(){var n,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="",e.prev=1,e.next=4,S.DevVideoInput.instance(t);case 4:return r=e.sent,n=r.result,e.next=8,S.DevVideoInput.getCaps(n);case 8:return r=e.sent,e.abrupt("return",r.caps);case 12:throw e.prev=12,e.t0=e.catch(1),String("Error:getVideoCaps is error, please check channel:".concat(t," is exists"));case 15:return e.prev=15,S.DevVideoInput.destroy(n),e.finish(15);case 18:case"end":return e.stop()}},e,null,[[1,12,15,18]])}))()},DevVideoInputManager:function(t){var e=arguments;return(0,u.default)(a.default.mark(function n(){var r,i,o,s;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:null,i=e.length>2&&void 0!==e[2]?e[2]:0,o="",n.prev=3,n.next=6,S.DevVideoInput.instance(i);case 6:return s=n.sent,o=s.result,n.next=10,S.DevVideoInput[t](o,r);case 10:return s=n.sent,n.abrupt("return",s.caps);case 14:throw n.prev=14,n.t0=n.catch(3),String("Error:getVideoCaps is error, please check channel:".concat(i," is exists"));case 17:return n.prev=17,S.DevVideoInput.destroy(o),n.finish(17);case 20:case"end":return n.stop()}},n,null,[[3,14,17,20]])}))()},getVideoCapsEx:function(t,e){return(0,u.default)(a.default.mark(function n(){var r,i;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r="",n.prev=1,n.next=4,S.DevVideoInput.instance(e);case 4:return i=n.sent,r=i.result,n.next=8,S.DevVideoInput.getCapsEx(r,t);case 8:return i=n.sent,n.abrupt("return",i.caps);case 12:throw n.prev=12,n.t0=n.catch(1),n.t0,String("Error:getVideoCapsEx is error, please check channel:".concat(e," is exists"));case 16:return n.prev=16,S.DevVideoInput.destroy(r),n.finish(16);case 19:case"end":return n.stop()}},n,null,[[1,12,16,19]])}))()},multiRecordSec:function(t){var e=this;return(0,u.default)(a.default.mark(function n(){var r,i,o,s;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r=e._getKeyt(),i=x(r),n.next=5,e._encrypt(t,r,i);case 5:return o=n.sent,n.next=8,S.System.multiSec(o);case 8:return o=n.sent,n.next=11,e._decrypt(o.content,i);case 11:return s=n.sent,n.abrupt("return",s.table?s.table:s);case 15:throw n.prev=15,n.t0=n.catch(0),String("Error:multiRecordSec is error");case 18:case"end":return n.stop()}},n,null,[[0,15]])}))()},getDeviceAllInfo:function(t){var e=arguments;return(0,u.default)(a.default.mark(function n(){var r,i,o;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:null,i="",n.prev=2,n.next=5,S.Storage.instance();case 5:return o=n.sent,i=o.result,n.next=9,S.Storage[t](i,r);case 9:return o=n.sent,n.abrupt("return",o);case 13:throw n.prev=13,n.t0=n.catch(2),String("Error:getDeviceAllInfo is error, please check channel:".concat(t," is exists"));case 16:return n.prev=16,S.Storage.destroy(i),n.finish(16);case 19:case"end":return n.stop()}},n,null,[[2,13,16,19]])}))()},getStorage:function(t){var e=arguments;return(0,u.default)(a.default.mark(function n(){var r,i,o;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:null,i="",n.prev=2,n.next=5,S.Storage.instance();case 5:return o=n.sent,i=o.result,n.next=9,S.Storage[t](i,r);case 9:return o=n.sent,n.abrupt("return",o);case 13:throw n.prev=13,n.t0=n.catch(2),n.t0,String("Error:getStorage is error, please check channel:".concat(t," is exists"));case 17:return n.prev=17,S.Storage.destroy(i),n.finish(17);case 20:case"end":return n.stop()}},n,null,[[2,13,17,20]])}))()},getMediaFile:function(t){var e=arguments;return(0,u.default)(a.default.mark(function n(){var r,i,o;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:null,i="",n.prev=2,n.next=5,S.MediaFileFind.instance();case 5:return o=n.sent,i=o.result,n.next=9,S.MediaFileFind[t](i,r);case 9:return o=n.sent,n.abrupt("return",o);case 13:throw n.prev=13,n.t0=n.catch(2),n.t0,String("Error:getMediaFile is error, please check channel:".concat(t," is exists"));case 17:return n.prev=17,S.MediaFileFind.destroy(i),n.finish(17);case 20:case"end":return n.stop()}},n,null,[[2,13,17,20]])}))()},getPlaybackList:function(t){var e=arguments;return(0,u.default)(a.default.mark(function n(){var r,i,o,s,u,c;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:null,i="",o=r.condition.count,s=r.condition,n.prev=3,n.next=6,S.MediaFileFind.instance();case 6:return c=n.sent,i=c.result,n.next=10,S.MediaFileFind.findFile(i,{condition:s});case 10:if(!(c=n.sent)){n.next=15;break}return n.next=14,S.MediaFileFind.findNextFile(i,{count:o});case 14:u=n.sent;case 15:return n.abrupt("return",u);case 18:throw n.prev=18,n.t0=n.catch(3),"Error:getPlaybackList is error, please check channel:".concat(t," is exists"),n.t0;case 22:return n.prev=22,S.MediaFileFind.destroy(i),n.finish(22);case 25:case"end":return n.stop()}},n,null,[[3,18,22,25]])}))()},getEncode:function(t){var e=arguments;return(0,u.default)(a.default.mark(function n(){var r,i;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:null,n.prev=1,n.next=4,S.Encode[t](r);case 4:return i=n.sent,n.abrupt("return",i);case 8:throw n.prev=8,n.t0=n.catch(1),n.t0,String("Error:Encode is error, please check channel:".concat(t," is exists"));case 12:return n.prev=12,n.finish(12);case 14:case"end":return n.stop()}},n,null,[[1,8,12,14]])}))()},PTZManager:function(t){var e=arguments;return(0,u.default)(a.default.mark(function n(){var r,i,s,u,c;return a.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:0,i=e.length>2&&void 0!==e[2]?e[2]:null,"object"===(0,o.default)(r)&&(s=r,r=i,i=s),n.prev=3,n.next=6,j(r);case 6:return u=n.sent,n.next=9,S.PTZ[t](u,i);case 9:return c=n.sent,n.abrupt("return",c);case 13:throw n.prev=13,n.t0=n.catch(3),n.t0,n.t0;case 17:return n.prev=17,n.finish(17);case 19:case"end":return n.stop()}},n,null,[[3,13,17,19]])}))()}};var U=new N;e.default=U},function(t,e,n){var r=n(17).default;function i(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!==typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=a?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,e&&e.set(t,n),n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){t.exports=n(109)},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),o=new I(r||[]);return a._invoke=function(t,e,n){var r=f;return function(i,a){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw a;return R()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=E(o,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?p:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(t,n,o),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function g(){}function m(){}function y(){}var w={};w[a]=function(){return this};var b=Object.getPrototypeOf,S=b&&b(b(A([])));S&&S!==n&&r.call(S,a)&&(w=S);var D=y.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function x(t,e){var n;this._invoke=function(i,a){function o(){return new e(function(n,o){!function n(i,a,o,s){var u=l(t[i],t,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,o,s)},function(t){n("throw",t,o,s)}):e.resolve(f).then(function(t){c.value=t,o(c)},function(t){return n("throw",t,o,s)})}s(u.arg)}(i,a,n,o)})}return n=n?n.then(o,o):o()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(t){if(t){var n=t[a];if(n)return n.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:R}}function R(){return{value:e,done:!0}}return m.prototype=D.constructor=y,y.constructor=m,m.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,s,"GeneratorFunction")),t.prototype=Object.create(D),t},t.awrap=function(t){return{__await:t}},_(x.prototype),x.prototype[o]=function(){return this},t.AsyncIterator=x,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new x(c(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},_(D),u(D,s,"Generator"),D[a]=function(){return this},D.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=A,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){var r=n(53);t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(53);t.exports=function(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e,n,r,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise(function(i,a){var o=t.apply(e,r);function s(t){n(o,i,a,s,u,"next",t)}function u(t){n(o,i,a,s,u,"throw",t)}s(void 0)})}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(12),i=n(55),a=n(116),o=n(63);var s=function t(e){var n=new a(e),s=i(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return t(o(e,n))},s}(n(38));s.Axios=a,s.CanceledError=n(31),s.CancelToken=n(133),s.isCancel=n(62),s.VERSION=n(64).version,s.toFormData=n(59),s.AxiosError=n(20),s.Cancel=s.CanceledError,s.all=function(t){return Promise.all(t)},s.spread=n(134),s.isAxiosError=n(135),t.exports=s,t.exports.default=s},function(t,e,n){"use strict";var r=n(12),i=n(56),a=n(117),o=n(118),s=n(63),u=n(61),c=n(132),l=c.validators;function f(t){this.defaults=t,this.interceptors={request:new a,response:new a}}f.prototype.request=function(t,e){"string"===typeof t?(e=e||{}).url=t:e=t||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var n=e.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:l.transitional(l.boolean),forcedJSONParsing:l.transitional(l.boolean),clarifyTimeoutError:l.transitional(l.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach(function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(i=i&&t.synchronous,r.unshift(t.fulfilled,t.rejected))});var a,u=[];if(this.interceptors.response.forEach(function(t){u.push(t.fulfilled,t.rejected)}),!i){var f=[o,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(u),a=Promise.resolve(e);f.length;)a=a.then(f.shift(),f.shift());return a}for(var h=e;r.length;){var d=r.shift(),p=r.shift();try{h=d(h)}catch(t){p(t);break}}try{a=o(h)}catch(t){return Promise.reject(t)}for(;u.length;)a=a.then(u.shift(),u.shift());return a},f.prototype.getUri=function(t){t=s(this.defaults,t);var e=u(t.baseURL,t.url);return i(e,t.params,t.paramsSerializer)},r.forEach(["delete","get","head","options"],function(t){f.prototype[t]=function(e,n){return this.request(s(n||{},{method:t,url:e,data:(n||{}).data}))}}),r.forEach(["post","put","patch"],function(t){function e(e){return function(n,r,i){return this.request(s(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}f.prototype[t]=e(),f.prototype[t+"Form"]=e(!0)}),t.exports=f},function(t,e,n){"use strict";var r=n(12);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=i},function(t,e,n){"use strict";var r=n(12),i=n(119),a=n(62),o=n(38),s=n(31);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new s}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||o.adapter)(t).then(function(e){return u(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(u(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(12),i=n(38);t.exports=function(t,e,n){var a=this||i;return r.forEach(n,function(n){t=n.call(a,t,e)}),t}},function(t,e,n){"use strict";var r=n(12);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),o=r[0],s=r[1],u=new a(function(t,e,n){return 3*(e+n)/4-n}(0,o,s)),l=0,f=s>0?o-4:o;for(n=0;n<f;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[l++]=255&e);1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=0,s=n-i;o<s;o+=16383)a.push(l(t,o,o+16383>s?s:o+16383));1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,n){for(var i,a,o=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,d=t[e+f];for(f+=h,a=d&(1<<-l)-1,d>>=-l,l+=s;l>0;a=256*a+t[e+f],f+=h,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+t[e+f],f+=h,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=c}return(d?-1:1)*o*Math.pow(2,a-r)},e.write=function(t,e,n,r,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(e*u-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;t[n+d]=255&o,d+=p,o/=256,c-=8);t[n+d-p]|=128*v}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";var r=n(20);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}},function(t,e,n){"use strict";var r=n(12);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,a,o){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(12),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,a,o={};return t?(r.forEach(t.split("\n"),function(t){if(a=t.indexOf(":"),e=r.trim(t.substr(0,a)).toLowerCase(),n=r.trim(t.substr(a+1)),e){if(o[e]&&i.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}}),o):o}},function(t,e,n){"use strict";var r=n(12);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";t.exports=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}},function(t,e){t.exports=null},function(t,e,n){"use strict";var r=n(64).version,i=n(20),a={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){a[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var o={};a.transitional=function(t,e,n){function a(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,s){if(!1===t)throw new i(a(r," has been removed"+(e?" in "+e:"")),i.ERR_DEPRECATED);return e&&!o[r]&&(o[r]=!0,console.warn(a(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}},t.exports={assertOptions:function(t,e,n){if("object"!==typeof t)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(t),a=r.length;a-- >0;){var o=r[a],s=e[o];if(s){var u=t[o],c=void 0===u||s(u,o,t);if(!0!==c)throw new i("option "+o+" must be "+c,i.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new i("Unknown option "+o,i.ERR_BAD_OPTION)}},validators:a}},function(t,e,n){"use strict";var r=n(31);function i(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;this.promise.then(function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}}),this.promise.then=function(t){var e,r=new Promise(function(t){n.subscribe(t),e=t}).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},i.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";var r=n(12);t.exports=function(t){return r.isObject(t)&&!0===t.isAxiosError}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reload=void 0;var r=function(t){var e=Array.prototype.slice.call(arguments,1)||[];return t=new t,function n(){return e=e.concat(Array.prototype.slice.call(arguments)),0===arguments.length&&0!==e.length?(t.apply(this,e),void(e=[])):n}}(function(){var t=null;return function(n){return t||(t=new e(n)),t};function e(e){return new Promise(function(n){var r=e.setIsLogin;e.$t,alert("\u9274\u6743\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\u3002"),setTimeout(function(){r(!1),sessionStorage.setItem("_Anonymous_",1),setTimeout(function(){window.location.reload()},1e3),t=null,n(!0)},5e3)})}});e.reload=r},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return a.MD5(t)};var i=r(n(17));if("undefined"==typeof a)var a={};a.MD5=function(t){function e(t){var e=(t>>>0).toString(16);return"00000000".substr(0,8-e.length)+e}function n(t,e,n){return t&e|~t&n}function r(t,e,n){return n&t|~n&e}function a(t,e,n){return t^e^n}function o(t,e,n){return e^(t|~n)}function s(t,e){return t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}function u(t){for(var e=[],n=0;n<t.length;n++)if(t.charCodeAt(n)<=127)e.push(t.charCodeAt(n));else for(var r=encodeURIComponent(t.charAt(n)).substr(1).split("%"),i=0;i<r.length;i++)e.push(parseInt(r[i],16));return e}function c(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=t[n];return e}var l=null,f=null;function h(t,e){return 4294967295&t+e}return"string"==typeof t?l=u(t):t.constructor==Array?0===t.length?l=t:"string"==typeof t[0]?l=function(t){for(var e=[],n=0;n<t.length;n++)e=e.concat(u(t[n]));return e}(t):"number"==typeof t[0]?l=t:f=(0,i.default)(t[0]):"undefined"!=typeof ArrayBuffer?t instanceof ArrayBuffer?l=c(new Uint8Array(t)):t instanceof Uint8Array||t instanceof Int8Array?l=c(t):t instanceof Uint32Array||t instanceof Int32Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Float32Array||t instanceof Float64Array?l=c(new Uint8Array(t.buffer)):f=(0,i.default)(t):f=(0,i.default)(t),f&&alert("MD5 type mismatch, cannot process "+f),function(){function t(t,e,n,r){var i,a,o=w;w=y,y=m,m=h(m,(i=h(g,h(t,h(e,n))))<<(a=r)&4294967295|i>>>32-a),g=o}var i=l.length;l.push(128);var u=l.length%64;if(u>56){for(var c=0;c<64-u;c++)l.push(0);u=l.length%64}for(c=0;c<56-u;c++)l.push(0);l=l.concat(function(t){for(var e=[],n=0;n<8;n++)e.push(255&t),t>>>=8;return e}(8*i));var f=1732584193,d=4023233417,p=2562383102,v=271733878,g=0,m=0,y=0,w=0;for(c=0;c<l.length/64;c++){g=f;var b=64*c;t(n(m=d,y=p,w=v),3614090360,s(l,b),7),t(n(m,y,w),3905402710,s(l,b+4),12),t(n(m,y,w),606105819,s(l,b+8),17),t(n(m,y,w),3250441966,s(l,b+12),22),t(n(m,y,w),4118548399,s(l,b+16),7),t(n(m,y,w),1200080426,s(l,b+20),12),t(n(m,y,w),2821735955,s(l,b+24),17),t(n(m,y,w),4249261313,s(l,b+28),22),t(n(m,y,w),1770035416,s(l,b+32),7),t(n(m,y,w),2336552879,s(l,b+36),12),t(n(m,y,w),4294925233,s(l,b+40),17),t(n(m,y,w),2304563134,s(l,b+44),22),t(n(m,y,w),1804603682,s(l,b+48),7),t(n(m,y,w),4254626195,s(l,b+52),12),t(n(m,y,w),2792965006,s(l,b+56),17),t(n(m,y,w),1236535329,s(l,b+60),22),t(r(m,y,w),4129170786,s(l,b+4),5),t(r(m,y,w),3225465664,s(l,b+24),9),t(r(m,y,w),643717713,s(l,b+44),14),t(r(m,y,w),3921069994,s(l,b),20),t(r(m,y,w),3593408605,s(l,b+20),5),t(r(m,y,w),38016083,s(l,b+40),9),t(r(m,y,w),3634488961,s(l,b+60),14),t(r(m,y,w),3889429448,s(l,b+16),20),t(r(m,y,w),568446438,s(l,b+36),5),t(r(m,y,w),3275163606,s(l,b+56),9),t(r(m,y,w),4107603335,s(l,b+12),14),t(r(m,y,w),1163531501,s(l,b+32),20),t(r(m,y,w),2850285829,s(l,b+52),5),t(r(m,y,w),4243563512,s(l,b+8),9),t(r(m,y,w),1735328473,s(l,b+28),14),t(r(m,y,w),2368359562,s(l,b+48),20),t(a(m,y,w),4294588738,s(l,b+20),4),t(a(m,y,w),2272392833,s(l,b+32),11),t(a(m,y,w),1839030562,s(l,b+44),16),t(a(m,y,w),4259657740,s(l,b+56),23),t(a(m,y,w),2763975236,s(l,b+4),4),t(a(m,y,w),1272893353,s(l,b+16),11),t(a(m,y,w),4139469664,s(l,b+28),16),t(a(m,y,w),3200236656,s(l,b+40),23),t(a(m,y,w),681279174,s(l,b+52),4),t(a(m,y,w),3936430074,s(l,b),11),t(a(m,y,w),3572445317,s(l,b+12),16),t(a(m,y,w),76029189,s(l,b+24),23),t(a(m,y,w),3654602809,s(l,b+36),4),t(a(m,y,w),3873151461,s(l,b+48),11),t(a(m,y,w),530742520,s(l,b+60),16),t(a(m,y,w),3299628645,s(l,b+8),23),t(o(m,y,w),4096336452,s(l,b),6),t(o(m,y,w),1126891415,s(l,b+28),10),t(o(m,y,w),2878612391,s(l,b+56),15),t(o(m,y,w),4237533241,s(l,b+20),21),t(o(m,y,w),1700485571,s(l,b+48),6),t(o(m,y,w),2399980690,s(l,b+12),10),t(o(m,y,w),4293915773,s(l,b+40),15),t(o(m,y,w),2240044497,s(l,b+4),21),t(o(m,y,w),1873313359,s(l,b+32),6),t(o(m,y,w),4264355552,s(l,b+60),10),t(o(m,y,w),2734768916,s(l,b+24),15),t(o(m,y,w),1309151649,s(l,b+52),21),t(o(m,y,w),4149444226,s(l,b+16),6),t(o(m,y,w),3174756917,s(l,b+44),10),t(o(m,y,w),718787259,s(l,b+8),15),t(o(m,y,w),3951481745,s(l,b+36),21),f=h(f,g),d=h(d,m),p=h(p,y),v=h(v,w)}return function(t,n,r,i){for(var a="",o=0,s=0,u=3;u>=0;u--)o=255&(s=arguments[u]),o<<=8,o|=255&(s>>>=8),o<<=8,o|=255&(s>>>=8),o<<=8,a+=e(o|=s>>>=8);return a}(v,p,d,f).toUpperCase()}()}},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;function i(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function a(){return new i(null)}"Microsoft Internet Explorer"==navigator.appName?(i.prototype.am=function(t,e,n,r,i,a){for(var o=32767&e,s=e>>15;--a>=0;){var u=32767&this[t],c=this[t++]>>15,l=s*u+c*o;i=((u=o*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+s*c+(i>>>30),n[r++]=1073741823&u}return i},r=30):"Netscape"!=navigator.appName?(i.prototype.am=function(t,e,n,r,i,a){for(;--a>=0;){var o=e*this[t++]+n[r]+i;i=Math.floor(o/67108864),n[r++]=67108863&o}return i},r=26):(i.prototype.am=function(t,e,n,r,i,a){for(var o=16383&e,s=e>>14;--a>=0;){var u=16383&this[t],c=this[t++]>>14,l=s*u+c*o;i=((u=o*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+s*c,n[r++]=268435455&u}return i},r=28),i.prototype.DB=r,i.prototype.DM=(1<<r)-1,i.prototype.DV=1<<r;i.prototype.FV=Math.pow(2,52),i.prototype.F1=52-r,i.prototype.F2=2*r-52;var o,s,u="0123456789abcdefghijklmnopqrstuvwxyz",c=new Array;for(o="0".charCodeAt(0),s=0;s<=9;++s)c[o++]=s;for(o="a".charCodeAt(0),s=10;s<36;++s)c[o++]=s;for(o="A".charCodeAt(0),s=10;s<36;++s)c[o++]=s;function l(t){return u.charAt(t)}function f(t,e){var n=c[t.charCodeAt(e)];return null==n?-1:n}function h(t){var e=a();return e.fromInt(t),e}function d(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function p(t){this.m=t}function v(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function g(){this.i=0,this.j=0,this.S=new Array}p.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},p.prototype.revert=function(t){return t},p.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},p.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},p.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},v.prototype.convert=function(t){var e=a();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(i.ZERO)>0&&this.m.subTo(e,e),e},v.prototype.revert=function(t){var e=a();return t.copyTo(e),this.reduce(e),e},v.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},v.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},v.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},i.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},i.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0},i.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var r=t.length,a=!1,o=0;--r>=0;){var s=8==n?255&t[r]:f(t,r);s<0?"-"==t.charAt(r)&&(a=!0):(a=!1,0==o?this[this.t++]=s:o+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=n)>=this.DB&&(o-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),a&&i.ZERO.subTo(this,this)},i.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},i.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},i.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},i.prototype.lShiftTo=function(t,e){var n,r=t%this.DB,i=this.DB-r,a=(1<<i)-1,o=Math.floor(t/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)e[n+o+1]=this[n]>>i|s,s=(this[n]&a)<<r;for(n=o-1;n>=0;--n)e[n]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},i.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,a=(1<<r)-1;e[0]=this[n]>>r;for(var o=n+1;o<this.t;++o)e[o-n-1]|=(this[o]&a)<<i,e[o-n]=this[o]>>r;r>0&&(e[this.t-n-1]|=(this.s&a)<<i),e.t=this.t-n,e.clamp()}},i.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},i.prototype.multiplyTo=function(t,e){var n=this.abs(),r=t.abs(),a=n.t;for(e.t=a+r.t;--a>=0;)e[a]=0;for(a=0;a<r.t;++a)e[a+n.t]=n.am(0,r[a],e,a,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&i.ZERO.subTo(e,e)},i.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},i.prototype.divRemTo=function(t,e,n){var r=t.abs();if(!(r.t<=0)){var o=this.abs();if(o.t<r.t)return null!=e&&e.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=a());var s=a(),u=this.s,c=t.s,l=this.DB-d(r[r.t-1]);l>0?(r.lShiftTo(l,s),o.lShiftTo(l,n)):(r.copyTo(s),o.copyTo(n));var f=s.t,h=s[f-1];if(0!=h){var p=h*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0),v=this.FV/p,g=(1<<this.F1)/p,m=1<<this.F2,y=n.t,w=y-f,b=null==e?a():e;for(s.dlShiftTo(w,b),n.compareTo(b)>=0&&(n[n.t++]=1,n.subTo(b,n)),i.ONE.dlShiftTo(f,b),b.subTo(s,s);s.t<f;)s[s.t++]=0;for(;--w>=0;){var S=n[--y]==h?this.DM:Math.floor(n[y]*v+(n[y-1]+m)*g);if((n[y]+=s.am(0,S,n,w,0,f))<S)for(s.dlShiftTo(w,b),n.subTo(b,n);n[y]<--S;)n.subTo(b,n)}null!=e&&(n.drShiftTo(f,e),u!=c&&i.ZERO.subTo(e,e)),n.t=f,n.clamp(),l>0&&n.rShiftTo(l,n),u<0&&i.ZERO.subTo(n,n)}}},i.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},i.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},i.prototype.exp=function(t,e){if(t>4294967295||t<1)return i.ONE;var n=a(),r=a(),o=e.convert(this),s=d(t)-1;for(o.copyTo(n);--s>=0;)if(e.sqrTo(n,r),(t&1<<s)>0)e.mulTo(r,o,n);else{var u=n;n=r,r=u}return e.revert(n)},i.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,a="",o=this.t,s=this.DB-o*this.DB%e;if(o-- >0)for(s<this.DB&&(n=this[o]>>s)>0&&(i=!0,a=l(n));o>=0;)s<e?(n=(this[o]&(1<<s)-1)<<e-s,n|=this[--o]>>(s+=this.DB-e)):(n=this[o]>>(s-=e)&r,s<=0&&(s+=this.DB,--o)),n>0&&(i=!0),i&&(a+=l(n));return i?a:"0"},i.prototype.negate=function(){var t=a();return i.ZERO.subTo(this,t),t},i.prototype.abs=function(){return this.s<0?this.negate():this},i.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},i.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+d(this[this.t-1]^this.s&this.DM)},i.prototype.mod=function(t){var e=a();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(i.ZERO)>0&&t.subTo(e,e),e},i.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new p(e):new v(e),this.exp(t,n)},i.ZERO=h(0),i.ONE=h(1),g.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0},g.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var m,y,w,b=256;function S(){var t;t=(new Date).getTime(),y[w++]^=255&t,y[w++]^=t>>8&255,y[w++]^=t>>16&255,y[w++]^=t>>24&255,w>=b&&(w-=b)}if(null==y){var D;if(y=new Array,w=0,"Netscape"==navigator.appName&&navigator.appVersion<"5"&&window.crypto){var _=window.crypto.random(32);for(D=0;D<_.length;++D)y[w++]=255&_.charCodeAt(D)}for(;w<b;)D=Math.floor(65536*Math.random()),y[w++]=D>>>8,y[w++]=255&D;w=0,S()}function x(){if(null==m){for(S(),(m=new g).init(y),w=0;w<y.length;++w)y[w]=0;w=0}return m.next()}function E(){}function T(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}E.prototype.nextBytes=function(t){var e;for(e=0;e<t.length;++e)t[e]=x()},T.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},T.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=new i(t,16),this.e=parseInt(e,16)):alert("Invalid RSA public key")},T.prototype.encrypt=function(t){var e=function(t,e){if(e<t.length+11)return alert("Message too long for RSA"),null;for(var n=new Array,r=t.length-1;r>=0&&e>0;){var a=t.charCodeAt(r--);a<128?n[--e]=a:a>127&&a<2048?(n[--e]=63&a|128,n[--e]=a>>6|192):(n[--e]=63&a|128,n[--e]=a>>6&63|128,n[--e]=a>>12|224)}n[--e]=0;for(var o=new E,s=new Array;e>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);n[--e]=s[0]}return n[--e]=2,n[--e]=0,new i(n)}(t,this.n.bitLength()+7>>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r};var k=T;e.default=k},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=r||function(t,e){var n={},r=n.lib={},i=function(){},a=r.Base={extend:function(t){i.prototype=this;var e=new i;return t&&e.mixIn(t),e.hasOwnProperty("init")||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},o=r.WordArray=a.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes;if(t=t.sigBytes,this.clamp(),r%4)for(var i=0;i<t;i++)e[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<t;i+=4)e[r+i>>>2]=n[i>>>2];else e.push.apply(e,n);return this.sigBytes+=t,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n=[],r=0;r<e;r+=4)n.push(4294967296*t.random()|0);return new o.init(n,e)}}),s=n.enc={},u=s.Hex={stringify:function(t){var e=t.words;t=t.sigBytes;for(var n=[],r=0;r<t;r++){var i=e[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new o.init(n,e/2)}},c=s.Latin1={stringify:function(t){var e=t.words;t=t.sigBytes;for(var n=[],r=0;r<t;r++)n.push(String.fromCharCode(e[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new o.init(n,e)}},l=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},f=r.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a);if(e=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,i=t.min(4*e,i),e){for(var u=0;u<e;u+=a)this._doProcessBlock(r,u);u=r.splice(0,e),n.sigBytes-=i}return new o.init(u,i)},clone:function(){var t=a.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});r.Hasher=f.extend({cfg:a.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new h.HMAC.init(t,n).finalize(e)}}});var h=n.algo={};return n}(Math);!function(){var t=r,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp(),t=[];for(var i=0;i<n;i+=3)for(var a=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,o=0;4>o&&i+.75*o<n;o++)t.push(r.charAt(a>>>6*(3-o)&63));if(e=r.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var n=t.length,r=this._map;(i=r.charAt(64))&&(-1!=(i=t.indexOf(i))&&(n=i));for(var i=[],a=0,o=0;o<n;o++)if(o%4){var s=r.indexOf(t.charAt(o-1))<<o%4*2,u=r.indexOf(t.charAt(o))>>>6-o%4*2;i[a>>>2]|=(s|u)<<24-a%4*8,a++}return e.create(i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){function e(t,e,n,r,i,a,o){return((t=t+(e&n|~e&r)+i+o)<<a|t>>>32-a)+e}function n(t,e,n,r,i,a,o){return((t=t+(e&r|n&~r)+i+o)<<a|t>>>32-a)+e}function i(t,e,n,r,i,a,o){return((t=t+(e^n^r)+i+o)<<a|t>>>32-a)+e}function a(t,e,n,r,i,a,o){return((t=t+(n^(e|~r))+i+o)<<a|t>>>32-a)+e}for(var o=r,s=(c=o.lib).WordArray,u=c.Hasher,c=o.algo,l=[],f=0;64>f;f++)l[f]=4294967296*t.abs(t.sin(f+1))|0;c=c.MD5=u.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,r){for(var o=0;16>o;o++){var s=t[u=r+o];t[u]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}o=this._hash.words;var u=t[r+0],c=(s=t[r+1],t[r+2]),f=t[r+3],h=t[r+4],d=t[r+5],p=t[r+6],v=t[r+7],g=t[r+8],m=t[r+9],y=t[r+10],w=t[r+11],b=t[r+12],S=t[r+13],D=t[r+14],_=t[r+15],x=e(x=o[0],k=o[1],T=o[2],E=o[3],u,7,l[0]),E=e(E,x,k,T,s,12,l[1]),T=e(T,E,x,k,c,17,l[2]),k=e(k,T,E,x,f,22,l[3]);x=e(x,k,T,E,h,7,l[4]),E=e(E,x,k,T,d,12,l[5]),T=e(T,E,x,k,p,17,l[6]),k=e(k,T,E,x,v,22,l[7]),x=e(x,k,T,E,g,7,l[8]),E=e(E,x,k,T,m,12,l[9]),T=e(T,E,x,k,y,17,l[10]),k=e(k,T,E,x,w,22,l[11]),x=e(x,k,T,E,b,7,l[12]),E=e(E,x,k,T,S,12,l[13]),T=e(T,E,x,k,D,17,l[14]),x=n(x,k=e(k,T,E,x,_,22,l[15]),T,E,s,5,l[16]),E=n(E,x,k,T,p,9,l[17]),T=n(T,E,x,k,w,14,l[18]),k=n(k,T,E,x,u,20,l[19]),x=n(x,k,T,E,d,5,l[20]),E=n(E,x,k,T,y,9,l[21]),T=n(T,E,x,k,_,14,l[22]),k=n(k,T,E,x,h,20,l[23]),x=n(x,k,T,E,m,5,l[24]),E=n(E,x,k,T,D,9,l[25]),T=n(T,E,x,k,f,14,l[26]),k=n(k,T,E,x,g,20,l[27]),x=n(x,k,T,E,S,5,l[28]),E=n(E,x,k,T,c,9,l[29]),T=n(T,E,x,k,v,14,l[30]),x=i(x,k=n(k,T,E,x,b,20,l[31]),T,E,d,4,l[32]),E=i(E,x,k,T,g,11,l[33]),T=i(T,E,x,k,w,16,l[34]),k=i(k,T,E,x,D,23,l[35]),x=i(x,k,T,E,s,4,l[36]),E=i(E,x,k,T,h,11,l[37]),T=i(T,E,x,k,v,16,l[38]),k=i(k,T,E,x,y,23,l[39]),x=i(x,k,T,E,S,4,l[40]),E=i(E,x,k,T,u,11,l[41]),T=i(T,E,x,k,f,16,l[42]),k=i(k,T,E,x,p,23,l[43]),x=i(x,k,T,E,m,4,l[44]),E=i(E,x,k,T,b,11,l[45]),T=i(T,E,x,k,_,16,l[46]),x=a(x,k=i(k,T,E,x,c,23,l[47]),T,E,u,6,l[48]),E=a(E,x,k,T,v,10,l[49]),T=a(T,E,x,k,D,15,l[50]),k=a(k,T,E,x,d,21,l[51]),x=a(x,k,T,E,b,6,l[52]),E=a(E,x,k,T,f,10,l[53]),T=a(T,E,x,k,y,15,l[54]),k=a(k,T,E,x,s,21,l[55]),x=a(x,k,T,E,g,6,l[56]),E=a(E,x,k,T,_,10,l[57]),T=a(T,E,x,k,p,15,l[58]),k=a(k,T,E,x,S,21,l[59]),x=a(x,k,T,E,h,6,l[60]),E=a(E,x,k,T,w,10,l[61]),T=a(T,E,x,k,c,15,l[62]),k=a(k,T,E,x,m,21,l[63]);o[0]=o[0]+x|0,o[1]=o[1]+k|0,o[2]=o[2]+T|0,o[3]=o[3]+E|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296);for(n[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(n.length+1),this._process(),n=(e=this._hash).words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return e},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t}}),o.MD5=u._createHelper(c),o.HmacMD5=u._createHmacHelper(c)}(Math),function(){var t,e=r,n=(t=e.lib).Base,i=t.WordArray,a=(t=e.algo).EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=(s=this.cfg).hasher.create(),r=i.create(),a=r.words,o=s.keySize,s=s.iterations;a.length<o;){u&&n.update(u);var u=n.update(t).finalize(e);n.reset();for(var c=1;c<s;c++)u=n.finalize(u),n.reset();r.concat(u)}return r.sigBytes=4*o,r}});e.EvpKDF=function(t,e,n){return a.create(n).compute(t,e)}}(),r.lib.Cipher||function(t){var e=(p=r).lib,n=e.Base,i=e.WordArray,a=e.BufferedBlockAlgorithm,o=p.enc.Base64,s=p.algo.EvpKDF,u=e.Cipher=a.extend({cfg:n.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(t){return{encrypt:function(e,n,r){return("string"==typeof n?v:d).encrypt(t,e,n,r)},decrypt:function(e,n,r){return("string"==typeof n?v:d).decrypt(t,e,n,r)}}}});e.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c=p.mode={},l=function(t,e,n){var r=this._iv;r?this._iv=void 0:r=this._prevBlock;for(var i=0;i<n;i++)t[e+i]^=r[i]},f=(e.BlockCipherMode=n.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}})).extend();f.Encryptor=f.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize;l.call(this,t,e,r),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+r)}}),f.Decryptor=f.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=t.slice(e,e+r);n.decryptBlock(t,e),l.call(this,t,e,r),this._prevBlock=i}}),c=c.CBC=f,f=(p.pad={}).Pkcs7={pad:function(t,e){for(var n,r=(n=(n=4*e)-t.sigBytes%n)<<24|n<<16|n<<8|n,a=[],o=0;o<n;o+=4)a.push(r);n=i.create(a,n),t.concat(n)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},e.BlockCipher=u.extend({cfg:u.cfg.extend({mode:c,padding:f}),reset:function(){u.reset.call(this);var t=(e=this.cfg).iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=e.createEncryptor;else n=e.createDecryptor,this._minBufferSize=1;this._mode=n.call(e,this,t&&t.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4});var h=e.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),d=(c=(p.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return((t=t.salt)?i.create([1398893684,1701076831]).concat(t).concat(e):e).toString(o)},parse:function(t){var e=(t=o.parse(t)).words;if(1398893684==e[0]&&1701076831==e[1]){var n=i.create(e.slice(2,4));e.splice(0,4),t.sigBytes-=16}return h.create({ciphertext:t,salt:n})}},e.SerializableCipher=n.extend({cfg:n.extend({format:c}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r);return e=i.finalize(e),i=i.cfg,h.create({ciphertext:e,key:n,iv:i.iv,algorithm:t,mode:i.mode,padding:i.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}})),p=(p.kdf={}).OpenSSL={execute:function(t,e,n,r){return r||(r=i.random(8)),t=s.create({keySize:e+n}).compute(t,r),n=i.create(t.words.slice(e),4*n),t.sigBytes=4*e,h.create({key:t,iv:n,salt:r})}},v=e.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:p}),encrypt:function(t,e,n,r){return n=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize),r.iv=n.iv,(t=d.encrypt.call(this,t,e,n.key,r)).mixIn(n),t},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),n=r.kdf.execute(n,t.keySize,t.ivSize,e.salt),r.iv=n.iv,d.decrypt.call(this,t,e,n.key,r)}})}(),function(){for(var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],a=[],o=[],s=[],u=[],c=[],l=[],f=[],h=[],d=[],p=[],v=0;256>v;v++)p[v]=128>v?v<<1:v<<1^283;var g=0,m=0;for(v=0;256>v;v++){var y=(y=m^m<<1^m<<2^m<<3^m<<4)>>>8^255&y^99;i[g]=y,a[y]=g;var w=p[g],b=p[w],S=p[b],D=257*p[y]^16843008*y;o[g]=D<<24|D>>>8,s[g]=D<<16|D>>>16,u[g]=D<<8|D>>>24,c[g]=D,D=16843009*S^65537*b^257*w^16843008*g,l[y]=D<<24|D>>>8,f[y]=D<<16|D>>>16,h[y]=D<<8|D>>>24,d[y]=D,g?(g=w^p[p[p[S^w]]],m^=p[p[m]]):g=m=1}var _=[0,1,2,4,8,16,32,64,128,27,54];n=n.AES=e.extend({_doReset:function(){for(var t=(n=this._key).words,e=n.sigBytes/4,n=4*((this._nRounds=e+6)+1),r=this._keySchedule=[],a=0;a<n;a++)if(a<e)r[a]=t[a];else{var o=r[a-1];a%e?6<e&&4==a%e&&(o=i[o>>>24]<<24|i[o>>>16&255]<<16|i[o>>>8&255]<<8|i[255&o]):(o=i[(o=o<<8|o>>>24)>>>24]<<24|i[o>>>16&255]<<16|i[o>>>8&255]<<8|i[255&o],o^=_[a/e|0]<<24),r[a]=r[a-e]^o}for(t=this._invKeySchedule=[],e=0;e<n;e++)a=n-e,o=e%4?r[a]:r[a-4],t[e]=4>e||4>=a?o:l[i[o>>>24]]^f[i[o>>>16&255]]^h[i[o>>>8&255]]^d[i[255&o]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,s,u,c,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,l,f,h,d,a),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,a,o,s){for(var u=this._nRounds,c=t[e]^n[0],l=t[e+1]^n[1],f=t[e+2]^n[2],h=t[e+3]^n[3],d=4,p=1;p<u;p++){var v=r[c>>>24]^i[l>>>16&255]^a[f>>>8&255]^o[255&h]^n[d++],g=r[l>>>24]^i[f>>>16&255]^a[h>>>8&255]^o[255&c]^n[d++],m=r[f>>>24]^i[h>>>16&255]^a[c>>>8&255]^o[255&l]^n[d++];h=r[h>>>24]^i[c>>>16&255]^a[l>>>8&255]^o[255&f]^n[d++],c=v,l=g,f=m}v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^n[d++],m=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^n[d++],h=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^n[d++],t[e]=v,t[e+1]=g,t[e+2]=m,t[e+3]=h},keySize:8});t.AES=e._createHelper(n)}(),r.mode.ECB=function(){var t=r.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),t.Decryptor=t.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),t}(),r.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){for(var e=t.words,n=t.sigBytes-1;!(e[n>>>2]>>>24-n%4*8&255);)n--;t.sigBytes=n+1}};var i=r;e.default=i},function(t,e,n){var r=n(141);e.Ber=r,e.BerReader=r.Reader,e.BerWriter=r.Writer},function(t,e,n){var r=n(41),i=n(42),a=n(142),o=n(147);for(var s in i)i.hasOwnProperty(s)&&(e[s]=i[s]);for(var u in r)r.hasOwnProperty(u)&&(e[u]=r[u]);e.Reader=a,e.Writer=o},function(t,e,n){(function(e){n(65);var r=n(42),i=n(41).InvalidAsn1Error;function a(t){if(!t||!e.isBuffer(t))throw new TypeError("data must be a node Buffer");this._buf=t,this._size=t.length,this._len=0,this._offset=0}Object.defineProperty(a.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(a.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(a.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),a.prototype.readByte=function(t){if(this._size-this._offset<1)return null;var e=255&this._buf[this._offset];return t||(this._offset+=1),e},a.prototype.peek=function(){return this.readByte(!0)},a.prototype.readLength=function(t){if(void 0===t&&(t=this._offset),t>=this._size)return null;var e=255&this._buf[t++];if(null===e)return null;if(128==(128&e)){if(0==(e&=127))throw i("Indefinite length not supported");if(this._size-t<e)return null;this._len=0;for(var n=0;n<e;n++)this._len*=256,this._len+=255&this._buf[t++]}else this._len=e;return t},a.prototype.readSequence=function(t){var e=this.peek();if(null===e)return null;if(void 0!==t&&t!==e)throw i("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var n=this.readLength(this._offset+1);return null===n?null:(this._offset=n,e)},a.prototype.readInt=function(t){return this._readTag(t)},a.prototype.readBoolean=function(t){return"number"!==typeof t&&(t=r.Boolean),0!==this._readTag(t)},a.prototype.readEnumeration=function(t){return"number"!==typeof t&&(t=r.Enumeration),this._readTag(t)},a.prototype.readString=function(t,n){t||(t=r.OctetString);var a=this.peek();if(null===a)return null;if(a!==t)throw i("Expected 0x"+t.toString(16)+": got 0x"+a.toString(16));var o=this.readLength(this._offset+1);if(null===o)return null;if(this.length>this._size-o)return null;if(this._offset=o,0===this.length)return n?e.alloc(0):"";var s=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,n?s:s.toString("utf8")},a.prototype.readOID=function(t){t||(t=r.OID);var e=this.readString(t,!0);if(null===e)return null;for(var n=[],i=0,a=0;a<e.length;a++){var o=255&e[a];i<<=7,i+=127&o,0==(128&o)&&(n.push(i>>>0),i=0)}return i=n.shift(),n.unshift(i%40),n.unshift(i/40>>0),n.join(".")},a.prototype.readBitString=function(t){t||(t=r.BitString);var e=this.peek();if(null===e)return null;if(e!==t)throw i("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var n=this.readLength(this._offset+1);if(null===n)return null;if(this.length>this._size-n)return null;if(this._offset=n,0===this.length)return"";var a=this._buf[this._offset++],o=this._buf.slice(this._offset,this._offset+this.length-1),s=parseInt(o.toString("hex"),16).toString(2).padStart(8*o.length,"0");return this._offset+=this.length-1,s.substring(0,s.length-a)},a.prototype._readTag=function(t){var e=this.peek();if(null===e)return null;if(void 0!==t&&e!==t)throw i("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var n=this.readLength(this._offset+1);if(null===n)return null;if(0===this.length)throw i("Zero-length integer");if(this.length>this._size-n)return null;this._offset=n;for(var r=this._buf.readInt8(this._offset++),a=1;a<this.length;a++)r*=256,r+=this._buf[this._offset++];if(!Number.isSafeInteger(r))throw i("Integer not representable as javascript number");return r},t.exports=a}).call(this,n(3).Buffer)},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,o,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))i.call(n,c)&&(s[c]=n[c]);if(r){o=r(n);for(var l=0;l<o.length;l++)a.call(n,o[l])&&(s[o[l]]=n[o[l]])}}return s}},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,a=r.length,o=String(t).replace(i,function(t){if("%%"===t)return"%";if(n>=a)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n<a;u=r[++n])v(u)||!b(u)?o+=" "+u:o+=" "+s(u);return o},e.deprecate=function(n,r){if("undefined"!==typeof t&&!0===t.noDeprecation)return n;if("undefined"===typeof t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var a,o={};function s(t,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&e._extend(r,n),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"\x1b["+s.colors[n][0]+"m"+t+"\x1b["+s.colors[n][1]+"m":t}function c(t,e){return t}function l(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return m(i)||(i=l(t,i,r)),i}var a=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(m(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(g(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(t,n);if(a)return a;var o=Object.keys(n),s=function(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),D(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(n);if(0===o.length){if(_(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return t.stylize(Date.prototype.toString.call(n),"date");if(D(n))return f(n)}var c,b="",x=!1,E=["{","}"];(d(n)&&(x=!0,E=["[","]"]),_(n))&&(b=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(b=" "+RegExp.prototype.toString.call(n)),S(n)&&(b=" "+Date.prototype.toUTCString.call(n)),D(n)&&(b=" "+f(n)),0!==o.length||x&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=x?function(t,e,n,r,i){for(var a=[],o=0,s=e.length;o<s;++o)k(e,String(o))?a.push(h(t,e,n,r,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(h(t,e,n,r,i,!0))}),a}(t,n,r,s,o):o.map(function(e){return h(t,n,r,s,e,x)}),t.seen.pop(),function(t,e,n){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(c,b,E)):E[0]+b+E[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,r,i,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),k(r,i)||(o="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=v(n)?l(t,u.value,null):l(t,u.value,n-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function d(t){return Array.isArray(t)}function p(t){return"boolean"===typeof t}function v(t){return null===t}function g(t){return"number"===typeof t}function m(t){return"string"===typeof t}function y(t){return void 0===t}function w(t){return b(t)&&"[object RegExp]"===x(t)}function b(t){return"object"===typeof t&&null!==t}function S(t){return b(t)&&"[object Date]"===x(t)}function D(t){return b(t)&&("[object Error]"===x(t)||t instanceof Error)}function _(t){return"function"===typeof t}function x(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(y(a)&&(a=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!o[n])if(new RegExp("\\b"+n+"\\b","i").test(a)){var r=t.pid;o[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else o[n]=function(){};return o[n]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=p,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=m,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=y,e.isRegExp=w,e.isObject=b,e.isDate=S,e.isError=D,e.isFunction=_,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=n(145);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){(function(){var t=new Date,e=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":");[t.getDate(),T[t.getMonth()],e].join(" ")})(),e.format.apply(e,arguments)},e.inherits=n(146),e._extend=function(t,e){if(!e||!b(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var I="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(I&&t[I]){var e;if("function"!==typeof(e=t[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise(function(t,r){e=t,n=r}),i=[],a=0;a<arguments.length;a++)i.push(arguments[a]);i.push(function(t,r){t?n(t):e(r)});try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),I&&Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=I,e.callbackify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!==typeof i)throw new TypeError("The last argument must be of type Function");var a=this,o=function(){return i.apply(a,arguments)};e.apply(this,n).then(function(e){t.nextTick(o,null,e)},function(e){t.nextTick(A,e,o)})}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(57))},function(t,e){t.exports=function(t){return t&&"object"===typeof t&&"function"===typeof t.copy&&"function"===typeof t.fill&&"function"===typeof t.readUInt8}},function(t,e){"function"===typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){(function(e){var r=n(65),i=n(42),a=n(41).InvalidAsn1Error,o={size:1024,growthFactor:8};function s(t){var n,i;n=o,i=t||{},r.ok(n),r.equal(typeof n,"object"),r.ok(i),r.equal(typeof i,"object"),Object.getOwnPropertyNames(n).forEach(function(t){if(!i[t]){var e=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(i,t,e)}}),t=i,this._buf=e.alloc(t.size||1024),this._size=this._buf.length,this._offset=0,this._options=t,this._seq=[]}Object.defineProperty(s.prototype,"buffer",{get:function(){if(this._seq.length)throw new a(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),s.prototype.writeByte=function(t){if("number"!==typeof t)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=t},s.prototype.writeInt=function(t,e){if(!Number.isInteger(t))throw new TypeError("argument must be an integer");"number"!==typeof e&&(e=i.Integer);let n=[];for(;t<-128||t>=128;)n.push(255&t),t=Math.floor(t/256);for(n.push(255&t),this._ensure(2+n.length),this._buf[this._offset++]=e,this._buf[this._offset++]=n.length;n.length;)this._buf[this._offset++]=n.pop()},s.prototype.writeNull=function(){this.writeByte(i.Null),this.writeByte(0)},s.prototype.writeEnumeration=function(t,e){if("number"!==typeof t)throw new TypeError("argument must be a Number");return"number"!==typeof e&&(e=i.Enumeration),this.writeInt(t,e)},s.prototype.writeBoolean=function(t,e){if("boolean"!==typeof t)throw new TypeError("argument must be a Boolean");"number"!==typeof e&&(e=i.Boolean),this._ensure(3),this._buf[this._offset++]=e,this._buf[this._offset++]=1,this._buf[this._offset++]=t?255:0},s.prototype.writeString=function(t,n){if("string"!==typeof t)throw new TypeError("argument must be a string (was: "+typeof t+")");"number"!==typeof n&&(n=i.OctetString);var r=e.byteLength(t);this.writeByte(n),this.writeLength(r),r&&(this._ensure(r),this._buf.write(t,this._offset),this._offset+=r)},s.prototype.writeBuffer=function(t,n){if(!e.isBuffer(t))throw new TypeError("argument must be a buffer");"number"===typeof n&&(this.writeByte(n),this.writeLength(t.length)),t.length>0&&(this._ensure(t.length),t.copy(this._buf,this._offset,0,t.length),this._offset+=t.length)},s.prototype.writeStringArray=function(t,e){if(!(t instanceof Array))throw new TypeError("argument must be an Array[String]");var n=this;t.forEach(function(t){n.writeString(t,e)})},s.prototype.writeOID=function(t,e){if("string"!==typeof t)throw new TypeError("argument must be a string");if("number"!==typeof e&&(e=i.OID),!/^([0-9]+\.){0,}[0-9]+$/.test(t))throw new Error("argument is not a valid OID string");var n=t.split("."),r=[];r.push(40*parseInt(n[0],10)+parseInt(n[1],10)),n.slice(2).forEach(function(t){!function(t,e){e<128?t.push(e):e<16384?(t.push(e>>>7|128),t.push(127&e)):e<2097152?(t.push(e>>>14|128),t.push(255&(e>>>7|128)),t.push(127&e)):e<268435456?(t.push(e>>>21|128),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e)):(t.push(255&(e>>>28|128)),t.push(255&(e>>>21|128)),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e))}(r,parseInt(t,10))});var a=this;this._ensure(2+r.length),this.writeByte(e),this.writeLength(r.length),r.forEach(function(t){a.writeByte(t)})},s.prototype.writeLength=function(t){if("number"!==typeof t)throw new TypeError("argument must be a Number");if(this._ensure(4),t<=127)this._buf[this._offset++]=t;else if(t<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=t;else if(t<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t;else{if(!(t<=16777215))throw new a("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=t>>16,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t}},s.prototype.startSequence=function(t){"number"!==typeof t&&(t=i.Sequence|i.Constructor),this.writeByte(t),this._seq.push(this._offset),this._ensure(3),this._offset+=3},s.prototype.endSequence=function(){var t=this._seq.pop(),e=t+3,n=this._offset-e;if(n<=127)this._shift(e,n,-2),this._buf[t]=n;else if(n<=255)this._shift(e,n,-1),this._buf[t]=129,this._buf[t+1]=n;else if(n<=65535)this._buf[t]=130,this._buf[t+1]=n>>8,this._buf[t+2]=n;else{if(!(n<=16777215))throw new a("Sequence too long");this._shift(e,n,1),this._buf[t]=131,this._buf[t+1]=n>>16,this._buf[t+2]=n>>8,this._buf[t+3]=n}},s.prototype._shift=function(t,e,n){r.ok(void 0!==t),r.ok(void 0!==e),r.ok(n),this._buf.copy(this._buf,t+n,t,t+e),this._offset+=n},s.prototype._ensure=function(t){if(r.ok(t),this._size-this._offset<t){var n=this._size*this._options.growthFactor;n-this._offset<t&&(n+=t);var i=e.alloc(n);this._buf.copy(i,0,0,this._offset),this._buf=i,this._size=n}},t.exports=s}).call(this,n(3).Buffer)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loginError=function(t,e){var n=t.error&&t.error.code,i=t.params&&t.params.remainLockSecond||void 0,a=t.params&&t.params.remainLoginTimes||void 0;switch(n){case 268632081:i?alert("".concat((0,r.tl)("com.ModifyPwdLockedSecond").replace("XXX",i))):alert((0,r.tl)("com.LoginErrorNo5"));break;case 268632085:a?alert("".concat((0,r.tl)("com.AccountOrpasswordFailedTip").replace("%d",a))):alert((0,r.tl)("com.LoginErrorNo1"));break;case 268632070:alert((0,r.tl)("com.LoginErrorNo2"));break;case 268632071:alert((0,r.tl)("com.LoginErrorNo1"));break;case 268632073:alert((0,r.tl)("com.AccoutBlockTip"));break;case 268632074:alert((0,r.tl)("com.LoginErrorNo4"));break;case 268632075:alert((0,r.tl)("com.LoginErrorNo10"));break;case 268632090:alert((0,r.tl)("com.LoginFailedPleaseRefresh"));break;case 268632093:alert((0,r.tl)("com.LoginByPrevent"));break;default:alert((0,r.tl)("com.LoginFailTip"))}};var r=n(66)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setCookie=e.getCookie=void 0;e.setCookie=function(t,e,n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3);var i="expires="+r.toUTCString();document.cookie=t+"="+e+"; "+i};e.getCookie=function(t){for(var e=t+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1);if(-1!==i.indexOf(e))return i.substring(e.length,i.length)}return""}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserInfo=function(){var t=navigator.userAgent.toLowerCase(),e=navigator.platform.toLowerCase(),n=t.match(/(opera|ie|trident|firefox|chrome|version)[\s/:]([\w\d.]+)?.*?(safari|version[\s/:]([\w\d.]+)|rv:(\d.?)|$)/)||[null,"unknown",0],r=("ie"===n[1]||"trident"===n[1])&&document.documentMode,i={name:"version"===n[1]?n[3]:"trident"===n[1]?"ie":n[1],version:r||parseFloat("opera"===n[1]&&n[4]?n[4]:"trident"===n[1]&&n[5]?n[5]:n[2]),Platform:{name:t.match(/ip(?:ad|od|hone)/)?"ios":(t.match(/(?:webos|android)/)||e.match(/mac|win|linux/)||["other"])[0]}};return i[i.name]=!0,i[i.name+parseInt(i.version,10)]=!0,i.Platform[i.Platform.name]=!0,i},e.BrowserType=function(){var t=navigator.userAgent.toLowerCase(),e=navigator.appName,n=null,r=0;if(t.replace(/(chrome\/|firefox\/|version\/|rv:)(\d+)(?=.)/gi,function(t,e,n){r=n}),"Microsoft Internet Explorer"===e||t.indexOf("trident")>-1||t.indexOf("edge/")>-1||t.indexOf("edg/")>-1)return n="ie","Microsoft Internet Explorer"===e?(t=/msie ([0-9]{1,}[.0-9]{0,})/.exec(t),n+=parseInt(t[1])):t.indexOf("trident")>-1?n+=11:(t.indexOf("edge/")>-1||t.indexOf("edg/")>-1)&&(n="edge"),n;t.indexOf("safari")>-1?n=t.indexOf("chrome")>-1?"chrome":"safari":t.indexOf("firefox")>-1&&(n="firefox");return n+"-"+r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="line",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[]},this.add=function(e,n){if(t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),t.data.push(a),a}},this.drawStart=function(e){var n=null,o=0;a.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(a){if(a.preventDefault(),!r.util.moveFlag&&!r.util.resizeFlag)if(n=[Math.round((a.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((a.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],1===++o){if(t.data.length>=t.regionNum)return o=0,void(n=null);var s={data:[]};s.option=i.jQlib.extend(!0,{},e),s.shapeId=r.util.shapeId++,s.option.zindex=r.util.zindex++,s.option.type=t.type,s.option.selected=!0,t.data.push(s),t.data[t.data.length-1].data[0]=i.jQlib.extend(!0,[],n),r.util.drawState=1}else 2===o&&(t.data[t.data.length-1].data[1]=i.jQlib.extend(!0,[],n))}),a.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(e){var n=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(1===o){var a=t.data[t.data.length-1];a.option.vertical?(a.data[1]=[],a.data[1][0]=a.data[0][0],a.data[1][1]=n[1]):a.option.horizontal?(a.data[1]=[],a.data[1][1]=a.data[0][1],a.data[1][0]=n[0]):a.data[1]=i.jQlib.extend(!0,[],n),r.util.drawState=1,t.drawFunc()}});var s=function(e){if(2===o){var n=t.data[t.data.length-1],a=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(n.option.vertical?(n.data[1]=[],n.data[1][0]=n.data[0][0],n.data[1][1]=a[1]):n.option.horizontal?(n.data[1]=[],n.data[1][1]=n.data[0][1],n.data[1][0]=a[0]):n.data[1]=i.jQlib.extend(!0,[],a),n.option.segment&&n.option.segment.length>1){for(var s=[],u=0,c=0;c<n.option.segment.length;c++){var l=r.util.segmentsIntr(n.data[0],n.data[1],n.option.segment[c][0],n.option.segment[c][1]);if(l&&(s[u]=l,u++),s&&2===s.length)break}if(!s||2!==s.length)return t.data.length=t.data.length-1,o=0,r.util.drawState=0,void t.drawFunc();n.data[0]=s[0],n.data[1]=s[1]}if(n.option.maxPoly&&n.option.maxPoly.length>0){var f=r.util.lineInPoly(n.data,n.option.maxPoly);if(!1===f)return t.data.length=t.data.length-1,o=0,r.util.drawState=0,void t.drawFunc()}t.drawFunc(),o=0,n.event={},n.event.type=r.util.eventName.drawFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(n),r.util.drawState=2}};a.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",s),a.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",s)},this.draw=function(e){if(!0!==e.option.hide&&2===e.data.length){var n=null;if(e.option.selected?(this.ctx.strokeStyle=e.option.selectedColor,n=e.option.selectedColor,r.util.drawSelectRect(t.ctx,e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw),t.ctx.closePath()):(this.ctx.strokeStyle=e.option.strokeColor,n=e.option.strokeColor),this.ctx.beginPath(),2===e.option.PenStyle&&this.ctx.setLineDash([10]),this.ctx.moveTo(e.data[0][0]*this.coordinate.widthDraw,e.data[0][1]*this.coordinate.heightDraw),this.ctx.lineTo(e.data[1][0]*this.coordinate.widthDraw,e.data[1][1]*this.coordinate.heightDraw),this.ctx.stroke(),this.ctx.setLineDash([]),this.ctx.closePath(),(0===e.option.direction||1===e.option.direction||2===e.option.direction)&&2===e.data.length){var a=r.util.getArrayLines([e.data[0][0]*this.coordinate.widthDraw,e.data[0][1]*this.coordinate.heightDraw],[e.data[1][0]*this.coordinate.widthDraw,e.data[1][1]*this.coordinate.heightDraw],e.option.direction);if(a&&a.length>=3){i.jQlib.each(a,function(e,n){r.util.drawAppendLine(t.ctx,n)});var o=["A","B"];e.option.directionNames&&2===e.option.directionNames.length&&(o=[e.option.directionNames[0],e.option.directionNames[1]]),r.util.strokeText(t.ctx,o[0],a[0][0][0]+10,a[0][0][1]+10,null,n),r.util.strokeText(t.ctx,o[1],a[0][1][0]+10,a[0][1][1]+10,null,n)}}if(e.option.array){var s=r.util.getCoordinatePoint(e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw,e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw,r.util.arrayLength),u=r.util.getRotateByDegree(s,[e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw],30),c=r.util.getRotateByDegree(s,[e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw],330);r.util.drawAppendLine(t.ctx,u),r.util.drawAppendLine(t.ctx,c)}if(e.option.endPointLineEnable){var l=[e.data[0][0]*this.coordinate.widthDraw,e.data[0][1]*this.coordinate.heightDraw],f=[e.data[1][0]*this.coordinate.widthDraw,e.data[1][1]*this.coordinate.heightDraw],h=r.util.getVerticalSegmentOfLine(l,f,l,e.option.endPointLineLength),d=r.util.getVerticalSegmentOfLine(l,f,f,e.option.endPointLineLength);r.util.drawAppendLine(t.ctx,h),r.util.drawAppendLine(t.ctx,d)}if(e.option.ruleName&&e.option.ruleName.length>0){var p=10,v=r.util.getStrokeTextAlign(t.ctx,t.canvasDom.width,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+p);"right"===v&&(p=-10);var g=10;e.option.font&&(g=parseInt(e.option.font.split(" ")[3]));var m=e.data[0][1]*t.coordinate.heightDraw+g;r.util.strokeText(t.ctx,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+p,m,v,n)}}},this.checkOnPoint=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=r.util.onPoint(i,n.data,!1);return!1!==a&&(n.option.selected=!0,{data:n,point:a})},this.checkSelected=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=r.util.onLine(i,n.data);return!!a&&(n.option.selected=!0,{data:n})},this.moveShape=function(e,n,a,o,s){var u=i.jQlib.extend(!0,[],o.data),c=[Math.round((a.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((a.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],l=c[0]-e[0],f=c[1]-e[1];if(!0===(s=s||o.option.ignoreMaxPoly));else if(o.option.maxPoly&&o.option.maxPoly.length>0){var h=r.util.lineInPoly([[n.data[0][0]+l,n.data[0][1]+f],[n.data[1][0]+l,n.data[1][1]+f]],o.option.maxPoly);if(!1===h)return!0}o.data[0][0]=n.data[0][0]+l,o.data[0][1]=n.data[0][1]+f,o.data[1][0]=n.data[1][0]+l,o.data[1][1]=n.data[1][1]+f,o.beforModifyData=u,t.drawFunc(),delete o.beforModifyData},this.resizeShape=function(e,n,a,o){var s=i.jQlib.extend(!0,[],a.data),u=[Math.round((n.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((n.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===(o=o||a.option.ignoreMaxPoly));else if(a.option.maxPoly&&a.option.maxPoly.length>0){var c;if(a.option.vertical)if(a.option.horizontal){var l=i.jQlib.extend(!0,[],a.data);l[e][0]=u[0],c=r.util.lineInPoly(l,a.option.maxPoly)}else{var f=i.jQlib.extend(!0,[],a.data);f[e][1]=u[1],c=r.util.lineInPoly(f,a.option.maxPoly)}else{var h=i.jQlib.extend(!0,[],a.data);h[e][0]=u[0],h[e][1]=u[1],c=r.util.lineInPoly(h,a.option.maxPoly)}if(!1===c)return!0}a.option.vertical?a.data[e][1]=u[1]:a.option.horizontal?a.data[e][0]=u[0]:(a.data[e][0]=u[0],a.data[e][1]=u[1]),a.beforModifyData=s,t.drawFunc(),delete a.beforModifyData}};var r=n(10),i=n(11),a=n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RectShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="rect",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[]},this.add=function(e,n){if(t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),t.data.push(a),a}},this.drawStart=function(e){var n=null;a.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(a){if(a.preventDefault(),!(r.util.moveFlag||r.util.resizeFlag||t.data.length>=t.regionNum)){n=[Math.round((a.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((a.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];var o={data:[]};o.option=i.jQlib.extend(!0,{},e),o.shapeId=r.util.shapeId++,o.option.zindex=r.util.zindex++,o.option.type=t.type,t.data.push(o),t.data[t.data.length-1].data[0]=i.jQlib.extend(!0,[],n),r.util.drawState=1}}),a.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(e){if(!r.util.moveFlag&&!r.util.resizeFlag){var a=t.data.length-1,o=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(n){if(t.data[a].option.defaultSize)t.data[a].data[1]=[t.data[a].data[0][0]+t.data[a].option.defaultSize.width||2e3,t.data[a].data[0][1]+t.data[a].option.defaultSize.height||1e3];else{var s=t.data[a];if(s.option.lockWH){var u=Math.ceil(0-(s.data[0][0]-o[0])*s.option.lockWH.height/s.option.lockWH.width+s.data[0][1]);if(u>8191||u<0)return;s.data[1]=i.jQlib.extend(!0,[],[o[0],u])}else s.data[1]=i.jQlib.extend(!0,[],o)}r.util.drawState=1,t.drawFunc()}}});var o=function(e){if(!r.util.moveFlag&&!r.util.resizeFlag){var a=null,o=null,s=t.data.length-1;if(n){var u=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(u[0]===n[0]&&u[1]===n[1])t.data.length=t.data.length-1,r.util.drawState=2,n=null;else{if(t.data[s].option.lockWH);else{if(t.data[s].option.maxRect){var c={};c.width=u[0]-t.data[s].data[0][0],c.height=u[1]-t.data[s].data[0][1],a=t.checkRectSize(t.data[s],c,"maxRect")}if(t.data[s].option.minRect){var l={};l.width=u[0]-t.data[s].data[0][0],l.height=u[1]-t.data[s].data[0][1],o=t.checkRectSize(t.data[s],l,"minRect")}t.data[s].option.defaultSize||(t.data[s].data[1]=i.jQlib.extend(!0,[],a||o||u))}t.drawFunc(),r.util.drawState=2,n=null,t.data[s].event={},t.data[s].event.type=r.util.eventName.drawFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(t.data[s]),!0===t.data[s].option.disappear&&(t.data.length=t.data.length-1,t.drawFunc())}}}};a.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",o),a.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",o)},this.draw=function(e){if(!0!==e.option.hide){var n=null;if(e.option.selected?(t.ctx.strokeStyle=e.option.selectedColor,n=e.option.selectedColor,r.util.drawSelectRect(t.ctx,e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,e.data[1][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,e.data[0][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw),t.ctx.closePath()):(t.ctx.strokeStyle=e.option.strokeColor,n=e.option.strokeColor),t.ctx.beginPath(),t.ctx.rect(e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw,(e.data[1][0]-e.data[0][0])*t.coordinate.widthDraw,(e.data[1][1]-e.data[0][1])*t.coordinate.heightDraw),t.ctx.closePath(),t.ctx.stroke(),e.option.fillStyle&&(t.ctx.fillStyle=e.option.fillStyle,t.ctx.fillRect(e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw,(e.data[1][0]-e.data[0][0])*t.coordinate.widthDraw,(e.data[1][1]-e.data[0][1])*t.coordinate.heightDraw)),e.option.title&&r.util.strokeText(t.ctx,e.option.title,(e.data[0][0]/2+e.data[1][0]/2)*t.coordinate.widthDraw,(e.data[0][1]/2+e.data[1][1]/2+100)*t.coordinate.heightDraw,"center",n),(0===e.option.direction||1===e.option.direction||2===e.option.direction)&&2===e.data.length){var a=r.util.getArrayLines([e.data[0][0]*this.coordinate.widthDraw,e.data[0][1]*this.coordinate.heightDraw],[e.data[0][0]*this.coordinate.widthDraw,e.data[1][1]*this.coordinate.heightDraw],e.option.direction);a&&a.length>=3&&(i.jQlib.each(a,function(e,n){r.util.drawAppendLine(t.ctx,n)}),r.util.strokeText(t.ctx,"A",a[0][0][0]+10,a[0][0][1]+10,null,n),r.util.strokeText(t.ctx,"B",a[0][1][0]+10,a[0][1][1]+10,null,n))}if(e.option.ruleName&&e.option.ruleName.length>0){var o=10,s=r.util.getStrokeTextAlign(t.ctx,t.canvasDom.width,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+o);"right"===s&&(o=-10),r.util.strokeText(t.ctx,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+o,e.data[0][1]*t.coordinate.heightDraw+10,s,n)}if(e.option.showSize){var u=Math.ceil(Math.abs(e.data[0][0]-e.data[1][0])*r.util.resolution.width/r.util.defalutCoordinate.width),c=Math.ceil(Math.abs(e.data[0][1]-e.data[1][1])*r.util.resolution.height/r.util.defalutCoordinate.height);r.util.strokeText(t.ctx,u+"*"+c,(e.data[0][0]+e.data[1][0])/2*t.coordinate.widthDraw,(e.data[0][1]+e.data[1][1])/2*t.coordinate.heightDraw,"center",n)}}},this.checkOnPoint=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=r.util.onPoint(i,n.data,!0);return!1!==a&&(n.option.selected=!0,{data:n,point:a})},this.checkSelected=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;if(!n.option.selectType||"onLine"===n.option.selectType){var a=[];a[0]=n.data[0],a[1]=[n.data[1][0],n.data[0][1]],a[2]=n.data[1],a[3]=[n.data[0][0],n.data[1][1]],a[4]=n.data[0];for(var o=0;o<4;o++){var s=r.util.onLine(i,[a[o],a[o+1]]);if(s)return n.option.selected=!0,{data:n}}}if(!n.option.selectType||"inSide"===n.option.selectType){var u=r.util.pointInRect(i,n.data);if(u)return n.option.selected=!0,{data:n}}return!1},this.moveShape=function(e,n,i,a){var o=[Math.round((i.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((i.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],s=o[0]-e[0],u=o[1]-e[1];!0===a.option.horizontalMove&&(u=0);var c=a.option.maxPoly[2][0]||8191,l=a.option.maxPoly[2][1]||8191;return n.data[0][0]+s<0&&(s=0-n.data[0][0]),n.data[0][0]+s>c&&(s=c-n.data[0][0]),n.data[1][0]+s<0&&(s=0-n.data[1][0]),n.data[1][0]+s>c&&(s=c-n.data[1][0]),n.data[0][1]+u<0&&(u=0-n.data[0][1]),n.data[0][1]+u>l&&(u=l-n.data[0][1]),n.data[1][1]+u<0&&(u=0-n.data[1][1]),n.data[1][1]+u>l&&(u=l-n.data[1][1]),a.data[0][0]=n.data[0][0]+s,a.data[0][1]=n.data[0][1]+u,a.data[1][0]=n.data[1][0]+s,a.data[1][1]=n.data[1][1]+u,t.drawFunc(),!0},this.resizeShape=function(e,n,i){var a=[Math.round((n.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((n.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];this.resizeRectByRegion(i,e,a),t.drawFunc()},this.resize=function(e,n,r,i){t.coordinate.widthDraw=e,t.coordinate.heightDraw=n,t.coordinate.widthMouse=r,t.coordinate.heightMouse=i},this.checkRectSize=function(t,e,n){var r=null,i=Math.abs(t.option[n][1][0]-t.option[n][0][0]),a=Math.abs(t.option[n][1][1]-t.option[n][0][1]),o=Math.abs(e.width),s=Math.abs(e.height);return"maxRect"===n?(o>=i||s>=a)&&(r=[],e.width>0?r[0]=t.data[0][0]+i:r[0]=t.data[0][0]-i,e.height>0?r[1]=t.data[0][1]+a:r[1]=t.data[0][1]-a):"minRect"===n&&(o<=i||s<=a)&&(r=[],e.width>0?r[0]=t.data[0][0]+i:r[0]=t.data[0][0]-i,e.height>0?r[1]=t.data[0][1]+a:r[1]=t.data[0][1]-a),r},this.checkRectSizeForResize=function(t,e,n){var r=Math.abs(t.option[n][1][0]-t.option[n][0][0]),i=Math.abs(t.option[n][1][1]-t.option[n][0][1]),a=Math.abs(e.width),o=Math.abs(e.height),s=[];return"maxRect"===n?(a>r&&(s[0]="maxRectWidth"),o>i&&(s[1]="maxRectHeight")):"minRect"===n&&(a<r&&(s[0]="minRectWidth"),o<i&&(s[1]="minRectHeight")),s},this.resizeRectByRegion=function(e,n,r){var i,a,o,s={},u=[],c=[];if(e.option.lockWH)switch(n){case 0:if((o=Math.ceil(0-(e.data[0][0]-r[0])*e.option.lockWH.height/e.option.lockWH.width+e.data[0][1]))>8191||o<0)return;if(r[1]=o,e.option.minRect&&(s.width=r[0]-e.data[1][0],s.height=r[1]-e.data[1][1],"minRectHeight"===(c=t.checkRectSizeForResize(e,s,"minRect"))[1]||"minRectWidth"===c[0]))return;e.data[0]=r;break;case 1:if((o=Math.ceil(0-(r[0]-e.data[0][0])*e.option.lockWH.height/e.option.lockWH.width+e.data[1][1]))>8191||o<0)return;if(r[1]=o,e.option.minRect&&(s.width=r[0]-e.data[0][0],s.height=r[1]-e.data[1][1],"minRectHeight"===(c=t.checkRectSizeForResize(e,s,"minRect"))[1]||"minRectWidth"===c[0]))return;e.data[1][0]=r[0],e.data[0][1]=r[1];break;case 2:if((o=Math.ceil(0-(e.data[0][0]-r[0])*e.option.lockWH.height/e.option.lockWH.width+e.data[0][1]))>8191||o<0)return;if(r[1]=o,e.option.minRect&&(s.width=r[0]-e.data[0][0],s.height=r[1]-e.data[0][1],"minRectHeight"===(c=t.checkRectSizeForResize(e,s,"minRect"))[1]||"minRectWidth"===c[0]))return;e.data[1]=r;break;case 3:if((o=Math.ceil(0-(r[0]-e.data[1][0])*e.option.lockWH.height/e.option.lockWH.width+e.data[0][1]))>8191||o<0)return;if(r[1]=o,e.option.minRect&&(s.width=r[0]-e.data[1][0],s.height=r[1]-e.data[0][1],"minRectHeight"===(c=t.checkRectSizeForResize(e,s,"minRect"))[1]||"minRectWidth"===c[0]))return;e.data[0][0]=r[0],e.data[1][1]=r[1]}else{switch(n){case 0:s.width=r[0]-e.data[1][0],s.height=r[1]-e.data[1][1],i=[0,0],a=[0,1];break;case 1:s.width=r[0]-e.data[0][0],s.height=r[1]-e.data[1][1],i=[1,0],a=[0,1];break;case 2:s.width=r[0]-e.data[0][0],s.height=r[1]-e.data[0][1],i=[1,0],a=[1,1];break;case 3:s.width=r[0]-e.data[1][0],s.height=r[1]-e.data[0][1],i=[0,0],a=[1,1]}e.option.maxRect&&(u=t.checkRectSizeForResize(e,s,"maxRect")),e.option.minRect&&(c=t.checkRectSizeForResize(e,s,"minRect")),"maxRectWidth"!==u[0]&&"minRectWidth"!==c[0]&&(e.data[i[0]][i[1]]=r[0]),(null===u||"maxRectHeight"!==u[1]&&"minRectHeight"!==c[1])&&(e.data[a[0]][a[1]]=r[1])}}};var r=n(10),i=n(11),a=n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolyShape=function(){var t=this;this.init=function(e,n,r,i,o){t.type="poly",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=o,t.anchorPoint=new a.CircleShape,t.anchorPoint.init(e,n,function(){},function(){},o),t.data=[]},this.add=function(e,n){if(t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),t.data.push(a),a}},this.checkAnchorClick=function(t){for(var e=this.anchorPoint.data,n=-1,r=0,i=e.length;r<i;r++)if(this.anchorPoint.checkSelected(t,e[r])){n=r;break}return n},this.addVertexByAnchor=function(e){var n=this.checkAnchorClick(e);if(-1!==n){for(var i=this.anchorPoint.data[n],a=i.data,o=0,s=this.data.length;o<s;o++){var u=this.data[o];if(u.shapeId===i.option.superPolyShapeId){u.data.splice(n+1,0,[a[0],a[1]]),r.util.moveFlag=!1,t.eventFunc(u);break}}t.drawFunc()}},this.drawStart=function(e){var n=0;o.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(a){if(a.preventDefault(),r.util.moveFlag||r.util.resizeFlag||t.data.length>=t.regionNum)t.addVertexByAnchor(a);else if(2===r.util.drawState||0===r.util.drawState){r.util.drawState=1,n=0;var o={data:[]};o.option=i.jQlib.extend(!0,{},e),o.shapeId=r.util.shapeId++,o.option.zindex=r.util.zindex++,o.option.type=t.type,o.option.selected=!0,o.option.maxPointNum=o.option.maxPointNum||20,o.option.minPointNum=o.option.minPointNum||2,t.data.push(o)}}),o.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(e){var i=t.data.length-1;if(1===r.util.drawState){var a=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];t.data[i].data[n]=a,t.drawFunc()}});var a=function(a){if(1===r.util.drawState){var o=[Math.round((a.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((a.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],s=r.util.pointInPoly([o[0],o[1]],t.data[t.data.length-1].option.maxPoly);if(!s)return;if(2!==a.button&&t.data[t.data.length-1].data.length>=t.data[t.data.length-1].option.maxPointNum){if(!0===t.data[t.data.length-1].option.allowLineCrossPoly);else{var u=r.util.lineCrossPoly(t.data[t.data.length-1].data,n);if(!0===u)return}r.util.drawState=2,n=0,t.drawFunc(),t.data[t.data.length-1].event={},t.data[t.data.length-1].event.type=r.util.eventName.drawFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(t.data[t.data.length-1])}else if(2===a.button&&t.data[t.data.length-1].data.length>t.data[t.data.length-1].option.minPointNum)t.drawFunc(),r.util.drawState=2,n=0,t.data[t.data.length-1].data.length=t.data[t.data.length-1].data.length-1,t.drawFunc(),t.data[t.data.length-1].event={},t.data[t.data.length-1].event.type=r.util.eventName.drawFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(t.data[t.data.length-1]);else{if(!0===t.data[t.data.length-1].option.allowLineCrossPoly);else{var c=r.util.lineCrossPoly(t.data[t.data.length-1].data,n);if(!0===c)return}var l=!0,f=i.jQlib.extend(!0,[],t.data[t.data.length-1].data);if(e.convex&&!r.util.isConvexShape(f)&&(l=!1),!l)return;t.data[t.data.length-1].data.push(o),n++,t.drawFunc()}}};o.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",a),o.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",a)},this.draw=function(e){if(!0!==e.option.hide){var n=null,a=null;e.option.selected?(t.ctx.strokeStyle=e.option.selectedColor,n=e.option.selectedColor,i.jQlib.each(e.data,function(e,n){r.util.drawSelectRect(t.ctx,n[0]*t.coordinate.widthDraw,n[1]*t.coordinate.heightDraw)}),t.ctx.closePath()):(t.ctx.strokeStyle=e.option.strokeColor,t.ctx.font=e.option.font,n=e.option.strokeColor,a=n,e.option.fontColor&&(a=e.option.fontColor)),t.ctx.beginPath();for(var o=0;e.data&&e.data.length>1&&o<e.data.length;o++)0===o?t.ctx.moveTo(e.data[o][0]*t.coordinate.widthDraw,e.data[o][1]*t.coordinate.heightDraw):t.ctx.lineTo(e.data[o][0]*t.coordinate.widthDraw,e.data[o][1]*t.coordinate.heightDraw);if(e.option.closeEnable&&e.data&&e.data.length>1&&t.ctx.lineTo(e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw),t.ctx.stroke(),e.option.fillStyle&&(t.ctx.fillStyle=e.option.fillStyle,t.ctx.fill()),t.ctx.closePath(),(0===e.option.direction||1===e.option.direction||2===e.option.direction)&&e.data.length>=2){var s=r.util.getArrayLines([e.data[0][0]*this.coordinate.widthDraw,e.data[0][1]*this.coordinate.heightDraw],[e.data[1][0]*this.coordinate.widthDraw,e.data[1][1]*this.coordinate.heightDraw],e.option.direction);if(s&&s.length>=3){i.jQlib.each(s,function(e,n){r.util.drawAppendLine(t.ctx,n)});var u=["A","B"];e.option.directionNames&&2===e.option.directionNames.length&&(u=[e.option.directionNames[0],e.option.directionNames[1]]),r.util.strokeText(t.ctx,u[0],s[0][0][0]+10,s[0][0][1]+10,null,n),r.util.strokeText(t.ctx,u[1],s[0][1][0]+10,s[0][1][1]+10,null,n)}}else if(("Enter"===e.option.direction||"Leave"===e.option.direction||"Both"===e.option.direction)&&e.data.length>=3){for(var c=[],l=0;l<e.data.length;l++)c[l]=[],c[l][0]=e.data[l][0]*this.coordinate.widthDraw,c[l][1]=e.data[l][1]*this.coordinate.heightDraw;var f=r.util.getArrayLines([e.data[0][0]*this.coordinate.widthDraw,e.data[0][1]*this.coordinate.heightDraw],[e.data[1][0]*this.coordinate.widthDraw,e.data[1][1]*this.coordinate.heightDraw],e.option.direction,c);f&&f.length>=3&&i.jQlib.each(f,function(e,n){r.util.drawAppendLine(t.ctx,n)})}if(e.option.ruleName&&e.option.ruleName.length>0){var h=10,d=r.util.getStrokeTextAlign(t.ctx,t.canvasDom.width,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+h);"right"===d&&(h=-10);var p=10;e.option.font&&(p=parseInt(e.option.font.split(" ")[3]));var v=e.data[0][1]*t.coordinate.heightDraw+p;r.util.strokeText(t.ctx,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+h,v,d,a)}if(e.option.textArr&&e.option.textArr.length>0){var g=10,m=r.util.getStrokeTextAlign(t.ctx,t.canvasDom.width,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+h);"right"===m&&(g=-10);var y=e.data[0][1]*t.coordinate.heightDraw+10;e.option.textArr.forEach(function(n){y+=1.2*parseInt(e.option.font.split(" ")[3]),r.util.strokeText(t.ctx,n,e.data[0][0]*t.coordinate.widthDraw+g,y,m,a)})}this.addAnchorPoint(e)}},this.getLineMiddlePoint=function(t,e){var n=(t[0]+e[0])/2,r=(t[1]+e[1])/2;return[n,r]},this.addAnchorPoint=function(t){if(t.option.showAnchorPoint&&(this.anchorPoint.data.length=0,!(t.data.length>=t.option.maxPointNum))){var e=i.jQlib.extend(!0,{},t.option);e.moveEnable=!1,e.circleStyle=t.option.circleStyle||"fill",e.fillStyleSelected=e.selectedColor,e.superPolyShapeId=t.shapeId,e.radius=t.option.radius;var n=t.data,r=n.length,a=r;if(t.option.closeEnable||(a-=1),r>=2)for(var o=0;o<a;o++){var s=this.getLineMiddlePoint(n[o%r],n[(o+1)%r]);this.anchorPoint.add(s,e)}for(o=0,r=this.anchorPoint.data.length;o<r;o++)this.anchorPoint.draw(this.anchorPoint.data[o])}},this.checkOnPoint=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=r.util.onPoint(i,n.data,!1);return!1!==a&&(n.option.selected=!0,{data:n,point:a})},this.checkSelected=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=null;if((!n.option.selectType||"inSide"===n.option.selectType)&&r.util.pointInPoly(i,n.data))return n.option.selected=!0,{data:n};if(!n.option.selectType||"onLine"===n.option.selectType){for(var o=0;o<n.data.length-1;o++){var s=[n.data[o],n.data[o+1]];if(a=r.util.onLine(i,s))break}if(n.option.closeEnable&&!a){var u=[n.data[n.data.length-1],n.data[0]];a=r.util.onLine(i,u)}if(a)return n.option.selected=!0,{data:n}}return!1},this.moveShape=function(e,n,a,o){for(var s=i.jQlib.extend(!0,[],o.data),u=[Math.round((a.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((a.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],c=u[0]-e[0],l=u[1]-e[1],f=0;f<o.data.length;f++){var h=r.util.pointInPoly([n.data[f][0]+c,n.data[f][1]+l],o.option.maxPoly);if(!h)return!1}for(var d=0;d<o.data.length;d++)o.data[d][0]=n.data[d][0]+c,o.data[d][1]=n.data[d][1]+l;return o.beforModifyData=s,t.drawFunc(),delete o.beforModifyData,!0},this.resizeShape=function(e,n,a){var o=i.jQlib.extend(!0,[],a.data),s=[Math.round((n.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((n.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],u=i.jQlib.extend(!0,[],a);if(u.data[e][0]=s[0],u.data[e][1]=s[1],!0===u.option.allowLineCrossPoly);else{var c=r.util.lineCrossPoly(u.data,e);if(!0===c)return!1}var l=!0;if(a.option.convex&&!r.util.isConvexShape(u.data)&&(l=!1),!l)return!1;var f=r.util.pointInPoly([s[0],s[1]],a.option.maxPoly);if(!f)return!1;a.data[e][0]=s[0],a.data[e][1]=s[1],a.beforModifyData=o,t.drawFunc(),delete a.beforModifyData}};var r=n(10),i=n(11),a=n(68),o=n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EllipseShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="ellipse",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[]},this.add=function(e,n){if(t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),t.data.push(a),a}},this.drawStart=function(e){var n=null;a.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(a){if(a.preventDefault(),!(r.util.moveFlag||r.util.resizeFlag||t.data.length>=t.regionNum)){n=[Math.round((a.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((a.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];var o={data:[]};o.option=i.jQlib.extend(!0,{},e),o.shapeId=r.util.shapeId++,o.option.zindex=r.util.zindex++,o.option.type=t.type,o.option.selected=!0,t.data.push(o),t.data[t.data.length-1].data[0]=i.jQlib.extend(!0,[],n),r.util.drawState=1}}),a.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(e){if(!r.util.moveFlag&&!r.util.resizeFlag){var a=t.data.length-1,o=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];n&&(t.data[a].data[2]=i.jQlib.extend(!0,[],o),t.data[a].data[1]=[t.data[a].data[2][0],t.data[a].data[0][1]],t.data[a].data[3]=[t.data[a].data[0][0],t.data[a].data[2][1]],r.util.drawState=1,t.drawFunc())}});var o=function(e){if(!r.util.moveFlag&&!r.util.resizeFlag){var i=t.data.length-1;n&&(t.drawFunc(),r.util.drawState=2,n=null,t.data[i].event={},t.data[i].event.type=r.util.eventName.drawFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(t.data[i]))}};a.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",o),a.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",o)},this.draw=function(e){if(e&&4===e.data.length&&!0!==e.option.hide){var n=null;if(e.option.selected){t.ctx.strokeStyle=e.option.selectedColor,n=e.option.selectedColor,r.util.drawSelectRect(t.ctx,e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,e.data[2][0]*t.coordinate.widthDraw,e.data[2][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,e.data[3][0]*t.coordinate.widthDraw,e.data[3][1]*t.coordinate.heightDraw);var i=t._getCrossPoint(e.data);r.util.drawSelectRect(t.ctx,i[0][0]*t.coordinate.widthDraw,i[0][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,i[1][0]*t.coordinate.widthDraw,i[1][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,i[2][0]*t.coordinate.widthDraw,i[2][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,i[3][0]*t.coordinate.widthDraw,i[3][1]*t.coordinate.heightDraw),t.ctx.closePath()}else t.ctx.strokeStyle=e.option.strokeColor,n=e.option.strokeColor;e.option.title&&r.util.strokeText(t.ctx,e.option.title,e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw,"left",n),this._drawEllipse(e.data)}},this._drawEllipse=function(t){var e=(t[0][0]*this.coordinate.widthDraw+t[1][0]*this.coordinate.widthDraw)/2,n=(t[0][1]*this.coordinate.heightDraw+t[3][1]*this.coordinate.heightDraw)/2,r=Math.abs(t[0][0]*this.coordinate.widthDraw-t[1][0]*this.coordinate.widthDraw)/2,i=Math.abs(t[0][1]*this.coordinate.heightDraw-t[3][1]*this.coordinate.heightDraw)/2,a=r>i?1/r:1/i;this.ctx.beginPath(),this.ctx.moveTo(e+r,n);for(var o=0;o<2*Math.PI;o+=a)this.ctx.lineTo(e+r*Math.cos(o),n+i*Math.sin(o));this.ctx.closePath(),this.ctx.stroke()},this.checkOnPoint=function(e,n){if(n&&4===n.data.length){var a=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var o=[];o[0]=i.jQlib.extend(!0,[],n.data[0]),o[2]=i.jQlib.extend(!0,[],n.data[1]),o[4]=i.jQlib.extend(!0,[],n.data[2]),o[6]=i.jQlib.extend(!0,[],n.data[3]);var s=t._getCrossPoint(n.data);o[1]=s[0],o[3]=s[1],o[5]=s[2],o[7]=s[3];var u=r.util.onPoint(a,o,!1);if(!1!==u)return n.option.selected=!0,{data:n,point:u}}return!1},this.checkSelected=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=r.util.pointInPoly(i,n.data);return!!a&&(n.option.selected=!0,{data:n})},this.moveShape=function(e,n,i,a){var o=[Math.round((i.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((i.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],s=o[0]-e[0],u=o[1]-e[1],c=r.util.pointInPoly([n.data[0][0]+s,n.data[0][1]+u],a.option.maxPoly),l=r.util.pointInPoly([n.data[2][0]+s,n.data[2][1]+u],a.option.maxPoly);return!(!c||!l)&&(a.data[0][0]=n.data[0][0]+s,a.data[0][1]=n.data[0][1]+u,a.data[2][0]=n.data[2][0]+s,a.data[2][1]=n.data[2][1]+u,a.data[1][0]=a.data[2][0],a.data[1][1]=a.data[0][1],a.data[3][0]=a.data[0][0],a.data[3][1]=a.data[2][1],t.drawFunc(),!0)},this.resizeShape=function(e,n,i){var a=[Math.round((n.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((n.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];this.resizeRectByRegion(i,e,a),t.drawFunc()},this.resizeRectByRegion=function(t,e,n){switch(e){case 0:t.data[0]=n,t.data[1][1]=n[1],t.data[3][0]=n[0];break;case 1:t.data[0][1]=n[1],t.data[1][1]=n[1];break;case 2:t.data[1]=n,t.data[0][1]=n[1],t.data[2][0]=n[0];break;case 3:t.data[1][0]=n[0],t.data[2][0]=n[0];break;case 4:t.data[2]=n,t.data[1][0]=n[0],t.data[3][1]=n[1];break;case 5:t.data[2][1]=n[1],t.data[3][1]=n[1];break;case 6:t.data[3]=n,t.data[0][0]=n[0],t.data[2][1]=n[1];break;case 7:t.data[0][0]=n[0],t.data[3][0]=n[0]}},this._getCrossPoint=function(t){var e=[];return e[0]=[(t[0][0]+t[1][0])/2,t[0][1]],e[1]=[t[1][0],(t[1][1]+t[2][1])/2],e[2]=[(t[0][0]+t[1][0])/2,t[2][1]],e[3]=[t[0][0],(t[0][1]+t[3][1])/2],e}};var r=n(10),i=n(11),a=n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LaneShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="lane",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[],t.tempDetectLine=[]},this.add=function(e,n){if(t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),t.data.push(a),a}},this.drawStart=function(e){var n=null,o=0;t.tempDetectLine=[],a.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(a){if(a.preventDefault(),!(r.util.moveFlag||r.util.resizeFlag||t.data.length>=t.regionNum&&!0!==e.drawDetectLine))if(n=[Math.round((a.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((a.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],!0===e.drawDetectLine){if(0===t.data.length)return;1===++o&&(t.tempDetectLine[0]=i.jQlib.extend(!0,[],n),r.util.drawState=1),2===o&&(t.tempDetectLine[1]=i.jQlib.extend(!0,[],n),r.util.drawState=2)}else if((2===r.util.drawState||0===r.util.drawState)&&(r.util.drawState=1,0===o)){o=0;var s={data:[]};s.option=i.jQlib.extend(!0,{},e),s.shapeId=r.util.shapeId++,s.option.zindex=r.util.zindex++,s.option.type=t.type,s.option.selected=!0,t.data.push(s)}}),a.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(n){var a=[Math.round((n.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((n.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===e.drawDetectLine)1===o&&1===r.util.drawState&&(t.tempDetectLine[1]=i.jQlib.extend(!0,[],a),t.drawFunc());else if(1===r.util.drawState){var s=t.data[t.data.length-1];s.data[o]=a,t.drawFunc()}});a.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",function(i){if(!0===e.drawDetectLine){if(2===r.util.drawState){o=0,r.util.drawState=0;for(var a=[],s=0;s<t.data.length;s++){var u=t.data[s],c=r.util.segmentsIntr(u.data[0],u.data[1],t.tempDetectLine[0],t.tempDetectLine[1]),l=r.util.segmentsIntr(u.data[2],u.data[3],t.tempDetectLine[0],t.tempDetectLine[1]);c&&l&&(u.data[4]=[Math.floor(c[0]),Math.floor(c[1])],u.data[5]=[Math.floor(l[0]),Math.floor(l[1])],u.event={},u.event.type=r.util.eventName.drawFinish,a.push(u))}return t.tempDetectLine=[],t.drawFunc(),n=null,void(r.util.eventEnabled&&t.eventFunc&&t.eventFunc(a))}}else if(1===r.util.drawState){var f=[Math.round((i.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((i.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],h=t.data[t.data.length-1];if(4===h.data.length){h.data[3]=f;var d=r.util.segmentsIntr(h.data[0],h.data[1],h.data[2],h.data[3]);if(!0===h.option.unCheckLeftRight){if(d)return h.data.length=h.data.length-1,void(o=3);var p=r.util.segmentsIntr(h.data[0],h.data[2],h.data[1],h.data[3]);if(p){var v=[h.data[3][0],h.data[3][1]];h.data[3]=[h.data[2][0],h.data[2][1]],h.data[2]=v}}else{var g=r.util.getNunberSign(h.data[0][1],h.data[1][1]),m=r.util.getNunberSign(h.data[2][1],h.data[3][1]),y=r.util.getPositionByLine(f,[h.data[0],h.data[1]],!0);if("right"!==y||g!==m||d)return h.data.length=h.data.length-1,void(o=3)}t.drawFunc(),r.util.drawState=2,n=null,o=0,t.drawFunc(),h.event={},h.event.type=r.util.eventName.drawFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(h)}else{if(h.data[o]=f,h.data.length>2)if(!0===h.option.unCheckLeftRight);else{var w=r.util.getPositionByLine(f,[h.data[0],h.data[1]],!0);if("right"!==w)return void(h.data.length=h.data.length-1)}o++,t.drawFunc()}}})},this.draw=function(e){if(!0!==e.option.hide){var n,a=null;if(e.option.selected?(n=e.option.selectedColor,a=e.option.selectedColor,i.jQlib.each(e.data,function(e,n){r.util.drawSelectRect(t.ctx,n[0]*t.coordinate.widthDraw,n[1]*t.coordinate.heightDraw)})):(n=e.option.strokeColor,a=e.option.strokeColor),1===e.data.length||(2===e.data.length?t.drawLine(e.data[0][0],e.data[0][1],e.data[1][0],e.data[1][1],null,!0,n):3===e.data.length?(t.drawLine(e.data[0][0],e.data[0][1],e.data[1][0],e.data[1][1],null,!0,n),t.drawLine(e.data[1][0],e.data[1][1],e.data[2][0],e.data[2][1],!0,null,"#FFFFFF"),t.drawLine(e.data[2][0],e.data[2][1],e.data[0][0],e.data[0][1],!0,null,"#FFFFFF")):4===e.data.length?(t.drawLine(e.data[0][0],e.data[0][1],e.data[1][0],e.data[1][1],null,!0,n),t.drawLine(e.data[2][0],e.data[2][1],e.data[3][0],e.data[3][1],null,!0,n),t.drawLine(e.data[0][0],e.data[0][1],e.data[2][0],e.data[2][1],!0,null,"#FFFFFF"),t.drawLine(e.data[1][0],e.data[1][1],e.data[3][0],e.data[3][1],!0,null,"#FFFFFF")):!0===e.option.detectLine&&6===e.data.length&&(t.drawLine(e.data[0][0],e.data[0][1],e.data[1][0],e.data[1][1],null,!0,n),t.drawLine(e.data[2][0],e.data[2][1],e.data[3][0],e.data[3][1],null,!0,n),t.drawLine(e.data[0][0],e.data[0][1],e.data[2][0],e.data[2][1],!0,null,"#FFFFFF"),t.drawLine(e.data[1][0],e.data[1][1],e.data[3][0],e.data[3][1],!0,null,"#FFFFFF"),t.ctx.save(),t.drawLine(e.data[4][0],e.data[4][1],e.data[5][0],e.data[5][1],!1,null,e.option.detectLineColor),t.ctx.restore())),e.data.length>=2){t.ctx.strokeStyle=n;var o=r.util.getCoordinatePoint(e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw,e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw,r.util.arrayLength),s=r.util.getRotateByDegree(o,[e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw],30),u=r.util.getRotateByDegree(o,[e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw],330);r.util.drawAppendLine(t.ctx,s),r.util.drawAppendLine(t.ctx,u)}if(e.data.length>=4){t.ctx.strokeStyle=n;var c=r.util.getCoordinatePoint(e.data[3][0]*t.coordinate.widthDraw,e.data[3][1]*t.coordinate.heightDraw,e.data[2][0]*t.coordinate.widthDraw,e.data[2][1]*t.coordinate.heightDraw,r.util.arrayLength),l=r.util.getRotateByDegree(c,[e.data[3][0]*t.coordinate.widthDraw,e.data[3][1]*t.coordinate.heightDraw],30),f=r.util.getRotateByDegree(c,[e.data[3][0]*t.coordinate.widthDraw,e.data[3][1]*t.coordinate.heightDraw],330);r.util.drawAppendLine(t.ctx,l),r.util.drawAppendLine(t.ctx,f)}e.option.leftLaneName&&e.option.leftLaneName.length>0&&e.data.length>=2&&r.util.strokeText(t.ctx,e.option.leftLaneName,(e.data[0][0]+e.data[1][0])/2*t.coordinate.widthDraw+10,(e.data[0][1]+e.data[1][1])/2*t.coordinate.heightDraw+10,null,a),e.option.rightLaneName&&e.option.rightLaneName.length>0&&e.data.length>=4&&r.util.strokeText(t.ctx,e.option.rightLaneName,(e.data[2][0]+e.data[3][0])/2*t.coordinate.widthDraw+10,(e.data[2][1]+e.data[3][1])/2*t.coordinate.heightDraw+10,null,a),2===t.tempDetectLine.length&&(t.ctx.save(),t.drawLine(t.tempDetectLine[0][0],t.tempDetectLine[0][1],t.tempDetectLine[1][0],t.tempDetectLine[1][1],!1,null,e.option.detectLineColor),t.ctx.restore())}},this.checkOnPoint=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=r.util.onPoint(i,n.data,!1);return!1!==a&&(n.option.selected=!0,{data:n,point:a})},this.checkSelected=function(e,n){var a=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var o=[];if(o[0]=i.jQlib.extend(!0,[],n.data[0]),o[1]=i.jQlib.extend(!0,[],n.data[1]),o[2]=i.jQlib.extend(!0,[],n.data[3]),o[3]=i.jQlib.extend(!0,[],n.data[2]),6===n.data.length){var s=r.util.onLine(a,[n.data[4],n.data[5]]);if(!0===s)return{data:n,resizeLineIndex:3}}var u=r.util.onLine(a,[o[0],o[1]]),c=r.util.onLine(a,[o[2],o[3]]);if(!0===u||!0===c)return n.option.selected=!0,{data:n,resizeLineIndex:!0===u?1:2};var l=r.util.pointInPoly(a,o);return!!l&&(n.option.selected=!0,{data:n,resizeLineIndex:0})},this.moveShape=function(e,n,i,a,o,s){var u=[Math.round((i.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((i.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],c=u[0]-e[0],l=u[1]-e[1];if(!0===o);else if(0===s)for(var f=0;f<a.data.length;f++){var h=r.util.pointInPoly([n.data[f][0]+c,n.data[f][1]+l],a.option.maxPoly);if(!h)return!1}else if(1===s){var d=r.util.lineInPoly([[n.data[0][0]+c,n.data[0][1]+l],[n.data[1][0]+c,n.data[1][1]+l]],a.option.maxPoly);if(!d)return!1}else if(2===s){var p=r.util.lineInPoly([[n.data[2][0]+c,n.data[2][1]+l],[n.data[3][0]+c,n.data[3][1]+l]],a.option.maxPoly);if(!p)return!1}if(0===s)for(var v=0;v<a.data.length;v++)a.data[v][0]=n.data[v][0]+c,a.data[v][1]=n.data[v][1]+l;else if(1===s){var g=r.util.segmentsIntr([n.data[0][0]+c,n.data[0][1]+l],[n.data[1][0]+c,n.data[1][1]+l],[a.data[2][0],a.data[2][1]],[a.data[3][0],a.data[3][1]]);if(g)return;if(!0===a.option.detectLine&&6===a.data.length){var m=a.data[4][0],y=a.data[4][1],w=a.data[5][0],b=a.data[5][1],S=r.util.segmentsInLine(m,y,w,b,n.data[0][0]+c,n.data[0][1]+l,n.data[1][0]+c,n.data[1][1]+l);if(!1===S)return!1;a.data[4][0]=S[0],a.data[4][1]=S[1]}a.data[0][0]=n.data[0][0]+c,a.data[0][1]=n.data[0][1]+l,a.data[1][0]=n.data[1][0]+c,a.data[1][1]=n.data[1][1]+l}else if(2===s){var D=r.util.segmentsIntr([n.data[2][0]+c,n.data[2][1]+l],[n.data[3][0]+c,n.data[3][1]+l],[a.data[0][0],a.data[0][1]],[a.data[1][0],a.data[1][1]]);if(D)return;if(!0===a.option.detectLine&&6===a.data.length){var _=a.data[4][0],x=a.data[4][1],E=a.data[5][0],T=a.data[5][1],k=r.util.segmentsInLine(_,x,E,T,n.data[2][0]+c,n.data[2][1]+l,n.data[3][0]+c,n.data[3][1]+l);if(!1===k)return!1;a.data[5][0]=k[0],a.data[5][1]=k[1]}a.data[2][0]=n.data[2][0]+c,a.data[2][1]=n.data[2][1]+l,a.data[3][0]=n.data[3][0]+c,a.data[3][1]=n.data[3][1]+l}else if(3===s){var I=n.data[4][0]+c,A=n.data[4][1]+l,R=n.data[5][0]+c,M=n.data[5][1]+l,C=!1,P=!1;C=r.util.segmentsInLine(I,A,R,M,a.data[0][0],a.data[0][1],a.data[1][0],a.data[1][1]),P=r.util.segmentsInLine(I,A,R,M,a.data[2][0],a.data[2][1],a.data[3][0],a.data[3][1]),!1!==C&&!1!==P&&(a.data[4][0]=C[0],a.data[4][1]=C[1],a.data[5][0]=P[0],a.data[5][1]=P[1])}return t.drawFunc(),!0},this.resizeShape=function(e,n,a){var o=[Math.round((n.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((n.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(e<4){var s=i.jQlib.extend(!0,{},a);s.data[e][0]=o[0],s.data[e][1]=o[1];var u=r.util.segmentsIntr(s.data[0],s.data[1],s.data[2],s.data[3]);if(!0===s.option.unCheckLeftRight){if(u)return}else{var c=r.util.getNunberSign(s.data[0][1],s.data[1][1]),l=r.util.getNunberSign(s.data[2][1],s.data[3][1]);if(2===e||3===e){var f=r.util.getPositionByLine(o,[s.data[0],s.data[1]],!0);if("right"!==f||c!==l||u)return}else if(0===e||1===e){var h=r.util.getPositionByLine(o,[s.data[2],s.data[3]],!0);if("left"!==h||c!==l||u)return}}if(!0===a.option.detectLine&&6===a.data.length){var d=s.data[4][0],p=s.data[4][1],v=s.data[5][0],g=s.data[5][1],m=r.util.segmentsInLine(d,p,v,g,s.data[0][0],s.data[0][1],s.data[1][0],s.data[1][1]),y=r.util.segmentsInLine(d,p,v,g,s.data[2][0],s.data[2][1],s.data[3][0],s.data[3][1]);if(!1===m||!1===y)return!1;a.data[4][0]=m[0],a.data[4][1]=m[1],a.data[5][0]=y[0],a.data[5][1]=y[1]}if(a.data[e][0]=o[0],a.data[e][1]=o[1],!0===a.option.detectLine){a.data[e][0]=o[0],a.data[e][1]=o[1];var w=r.util.segmentsIntr(a.data[0],a.data[2],a.data[1],a.data[3]);if(w)return!1}}t.drawFunc()},this.drawLine=function(e,n,r,i,a,o,s){s=s||"#00FFFF",t.ctx.strokeStyle=s,t.ctx.beginPath(),t.ctx.moveTo(e*t.coordinate.widthDraw,n*t.coordinate.heightDraw),t.ctx.lineTo(r*t.coordinate.widthDraw,i*t.coordinate.heightDraw),t.ctx.setLineDash([]),a&&(t.ctx.setLineDash([3,5]),t.ctx.lineDashOffset=0),t.ctx.closePath(),t.ctx.stroke(),t.ctx.setLineDash([])}};var r=n(10),i=n(11),a=n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="text",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[]},this.add=function(e,n){if(t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),t.data.push(a),a}},this.draw=function(e){if(!0!==e.option.hide){var n=t.ctx.font,i=t.ctx.textAlign,a=t.ctx.textBaseline,o=t.ctx.fillStyle;t.ctx.font=e.option.font,t.ctx.textAlign=e.option.textAlign,t.ctx.textBaseline=e.option.textBaseline,t.ctx.fillStyle=e.option.strokeColor,r.util.strokeText(t.ctx,e.option.title,e.data[0]*t.coordinate.widthDraw,e.data[1]*t.coordinate.heightDraw,e.option.textAlign,e.option.strokeColor),t.ctx.font=n,t.ctx.textAlign=i,t.ctx.textBaseline=a,t.ctx.fillStyle=o}},this.checkOnPoint=function(t){return!1},this.checkSelected=function(t,e){return!1}};var r=n(10),i=n(11);n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MotionDetectShape=function(){var t=this,e=0,n=0,o=0,s=0,u=[],c=[],l=0,f=0;this.init=function(e,n,r,i,a){t.type="motionDetect",t.regionNum=1,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[],u=[]},this.add=function(e,n){if(0===o||0===s)return!1;c=[],l=0;var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),t.data[0]=a,u=[],i.jQlib.each(e,function(t,e){u[t]=[],c[t]=l++,i.jQlib.each(e.Region,function(e,n){var r=function(t,e,n){if(t+="",!e||0===e.length||n<=0)return t;for(;t.length<n;)t=e+t;return t}(n.toString(2),"0",o),i=r.split("");u[t][e]=i})}),t.draw(),a},this.drawGrid=function(r,a){if(o=a,s=r,t.ctx.clearRect(0,0,i.jQlib.getWidth(t.canvasDom),i.jQlib.getHeight(t.canvasDom)),0!==r&&0!==a){var u;for(t.ctx.globalAlpha=.5,e=i.jQlib.getWidth(t.canvasDom)/o,n=i.jQlib.getHeight(t.canvasDom)/s,t.ctx.strokeStyle="#C8C8C8",t.ctx.beginPath(),u=0;u<o+1;u++)t.ctx.moveTo(e*u,0),t.ctx.lineTo(e*u,i.jQlib.getHeight(t.canvasDom));for(u=0;u<s+1;u++)t.ctx.moveTo(0,n*u),t.ctx.lineTo(i.jQlib.getWidth(t.canvasDom),n*u);t.ctx.closePath(),t.ctx.stroke()}},this.drawStart=function(e){var n=null,c=null,l=0;a.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(e){e.preventDefault(),0!==o&&0!==s&&t.data[0]&&t.data[0].data&&t.data[0].data.length>0&&(n=[e.clientX-r.util.offset(t.canvasDom).left+window.scrollX,e.clientY-r.util.offset(t.canvasDom).top+window.scrollY],c=t.getColumnRow(n),l=u[f][c.row][c.column]-0===0?1:0,u[f][c.row][c.column]=l,t.drawFunc())}),a.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(e){if(n){var a=[e.clientX-r.util.offset(t.canvasDom).left+window.scrollX,e.clientY-r.util.offset(t.canvasDom).top+window.scrollY],o=t.getColumnRow(a);if(o.row===c.row&&o.column===c.column)return;var s=t.getDataByRect(n,a);i.jQlib.each(s,function(t,e){u[f][e.row][e.column]=l}),c=i.jQlib.extend(!0,{},o),t.drawFunc()}});var h=function(e){n&&(t.data[0].event={},t.data[0].event.type=r.util.eventName.drawFinish,t.matrixToNumber(u),r.util.eventEnabled&&t.eventFunc&&t.eventFunc(t.data[0])),n=null,null};a.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",h),a.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",h)},this.getColumnRow=function(t){var r=0===t[0]?0:Math.ceil(t[0]/e)-1,i=0===t[1]?0:Math.ceil(t[1]/n)-1;return{column:r,row:i}},this.getDataByRect=function(t,r){var i={},a=[],o=0===t[0]?0:Math.ceil(t[0]/e)-1,s=0===t[1]?0:Math.ceil(t[1]/n)-1,u=0===r[0]?0:Math.ceil(r[0]/e)-1,c=0===r[1]?0:Math.ceil(r[1]/n)-1;if(o>u){var l=o;o=u,u=l}s>c&&(l=s,s=c,c=l);for(var f=u-o,h=c-s,d=o;d<=o+f;d++)for(var p=s;p<=s+h;p++)(i={}).column=d,i.row=p,a.push(i);return a},this.draw=function(e){t.drawGrid(s,o),t.drawData(e)},this.drawData=function(a){var o=i.jQlib.extend(!0,[],c);o.sort(r.util.compareArray);for(var s=0;s<o.length;s++){var l=c.indexOf(o[s]),f=u[l];switch(l+""){case"0":t.ctx.fillStyle="#FF2D11";break;case"1":t.ctx.fillStyle="#FFE011";break;case"2":t.ctx.fillStyle="#06C8F9";break;case"3":t.ctx.fillStyle="#3DFF00"}i.jQlib.each(f,function(r,a){i.jQlib.each(a,function(i,a){1===Number.parseInt(a)&&t.ctx.fillRect(i*e,r*n,e,n)})})}},this.checkOnPoint=function(t){return!1},this.checkSelected=function(t){return!1},this.moveShape=function(t,e,n,r){},this.resizeShape=function(t,e,n){},this.matrixToNumber=function(e){i.jQlib.each(e,function(e,n){i.jQlib.each(n,function(n,r){t.data[0].data[e].Region[n]=parseInt(r.join(""),2)})})},this.deleteMotionDetect=function(e){if(t.data[0]&&t.data[0].data&&t.data[0].data.length>0){if(null===e||void 0===e)i.jQlib.each(t.data[0].data,function(t,e){for(var n=0;n<e.Region.length;n++){e.Region[n]=0;for(var r=0;r<o;r++)u[t][n][r]=0}});else for(var n=0;n<t.data[0].data[e].Region.length;n++){t.data[0].data[e].Region[n]=0;for(var a=0;a<o;a++)u[e][n][a]=0}t.draw(),t.data[0].event={},t.data[0].event.type=r.util.eventName.deleteFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(t.data[0])}else{var s={event:{}};s.event.type=r.util.eventName.deleteFinish,s.data=null,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(s)}},this.setCurrentDrawId=function(e){c[f=e]=l++,t.drawFunc()}};var r=n(10),i=n(11),a=n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReSpotShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="reSpot",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[],t.r=6,t.size={width:70,height:20,distance:10}},this.add=function(e,n){if(t.regionNum=1,t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),t.data[0]=a,t.drawStart(n),a}},this.drawStart=function(e){var n=null;t.regionNum=1,a.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(a){if(a.preventDefault(),!r.util.moveFlag&&!r.util.resizeFlag){n=[Math.round((a.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((a.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];var o={data:[]};o.option=i.jQlib.extend(!0,{},e),o.shapeId=r.util.shapeId++,o.option.zindex=r.util.zindex++,o.option.type=t.type,o.option.selected=!0,o.option.fillStyle=o.option.fillStyle||"#00FF00",t.data[0]=o,t.data[0].data=i.jQlib.extend(!0,[],n),r.util.drawState=1,t.drawFunc()}}),a.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(t){});var o=function(e){if(1===r.util.drawState){var n=t.data[0];n.event={},n.event.type=r.util.eventName.drawFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(n),r.util.drawState=2}};a.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",o),a.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",o)},this.draw=function(e){if(!0!==e.option.hide&&(t.ctx.fillStyle=e.option.fillStyle||"#00FF00",t.ctx.beginPath(),t.ctx.arc(e.data[0]*t.coordinate.widthDraw,e.data[1]*this.coordinate.heightDraw,t.r,0,2*Math.PI,!0),t.ctx.closePath(),t.ctx.fill(),e.option.title)){var n=0,i=0;t.ctx.font="normal normal bold 16px arial";var a=r.util.getStrokeTextAlign(t.ctx,t.canvasDom.width,e.option.title,(e.data[0]+t.size.distance)*t.coordinate.widthDraw);"right"===a&&(n=20,i=t.size.width+20),t.ctx.beginPath(),t.ctx.fillRect(e.data[0]*t.coordinate.widthDraw+t.size.distance-i,e.data[1]*t.coordinate.heightDraw-t.size.height/2,t.size.width,t.size.height),t.ctx.closePath(),r.util.strokeText(t.ctx,e.option.title,e.data[0]*t.coordinate.widthDraw+t.size.distance-n,e.data[1]*t.coordinate.heightDraw+t.size.height/4,a,"#000000"),t.ctx.font="normal normal 100 10px arial"}},this.checkOnPoint=function(t){return!1},this.checkSelected=function(t,e){return!1},this.moveShape=function(t,e,n,r){return!1}};var r=n(10),i=n(11),a=n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RhombusShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="rhombus",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[]},this.add=function(e,n){if(t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),a.option.maxRect||(a.option.maxRect=[[0,0],[8191,8191]]),t.data.push(a),a}},this.drawStart=function(e){var n=0;a.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(a){if(a.preventDefault(),!(r.util.moveFlag||r.util.resizeFlag||t.data.length>=t.regionNum)&&(2===r.util.drawState||0===r.util.drawState)&&(r.util.drawState=1,0===n)){var o={data:[]};o.option=i.jQlib.extend(!0,{},e),o.shapeId=r.util.shapeId++,o.option.zindex=r.util.zindex++,o.option.type=t.type,o.option.selected=!0,o.option.maxRect||(o.option.maxRect=[[0,0],[8191,8191]]),t.data.push(o)}}),a.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(e){if(1===r.util.drawState){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],a=t.data[t.data.length-1];if(a.data[n]=i,a.data.length>=3){var o=a.data[0][0]+a.data[2][0]-a.data[1][0],s=a.data[0][1]+a.data[2][1]-a.data[1][1];a.data[3]=[o,s]}t.drawFunc()}});var o=function(e){if(1===r.util.drawState){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],a=t.data[t.data.length-1];if(4===a.data.length){if(a.data[3][0]<0||a.data[3][0]>a.option.maxRect[1][0]-a.option.maxRect[0][0]||a.data[3][1]<0||a.data[3][1]>a.option.maxRect[1][1]-a.option.maxRect[0][1])return;t.drawFunc(),r.util.drawState=2,n=0,t.drawFunc(),a.event={},a.event.type=r.util.eventName.drawFinish,r.util.eventEnabled&&t.eventFunc&&t.eventFunc(a)}else a.data[n]=i,n++,t.drawFunc()}};a.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",o),a.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",o)},this.draw=function(e){if(!0!==e.option.hide){var n=null;if(e.option.selected?(t.ctx.strokeStyle=e.option.selectedColor,n=e.option.selectedColor,e.data.length>=2&&(r.util.drawSelectRect(t.ctx,e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw)),e.data.length>=3&&(r.util.drawSelectRect(t.ctx,e.data[2][0]*t.coordinate.widthDraw,e.data[2][1]*t.coordinate.heightDraw),r.util.drawSelectRect(t.ctx,e.data[3][0]*t.coordinate.widthDraw,e.data[3][1]*t.coordinate.heightDraw))):(t.ctx.strokeStyle=e.option.strokeColor,n=e.option.strokeColor),t.ctx.beginPath(),e.data.length>=2&&(t.ctx.moveTo(e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw),t.ctx.lineTo(e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw)),e.data.length>=3&&(t.ctx.lineTo(e.data[2][0]*t.coordinate.widthDraw,e.data[2][1]*t.coordinate.heightDraw),t.ctx.lineTo(e.data[3][0]*t.coordinate.widthDraw,e.data[3][1]*t.coordinate.heightDraw),t.ctx.lineTo(e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw)),t.ctx.closePath(),t.ctx.stroke(),(0===e.option.direction||1===e.option.direction||2===e.option.direction)&&e.data.length>=2){var a=r.util.getArrayLines([e.data[0][0]*this.coordinate.widthDraw,e.data[0][1]*this.coordinate.heightDraw],[e.data[1][0]*this.coordinate.widthDraw,e.data[1][1]*this.coordinate.heightDraw],e.option.direction);a&&a.length>=3&&(i.jQlib.each(a,function(e,n){r.util.drawAppendLine(t.ctx,n)}),r.util.strokeText(t.ctx,"A",a[0][0][0]+10,a[0][0][1]+10,null,n),r.util.strokeText(t.ctx,"B",a[0][1][0]+10,a[0][1][1]+10,null,n))}if(e.option.ruleName&&e.option.ruleName.length>0){var o=10,s=r.util.getStrokeTextAlign(t.ctx,t.canvasDom.width,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+o);"right"===s&&(o=-10);var u=10;e.option.font&&(u=parseInt(e.option.font.split(" ")[3]));var c=e.data[0][1]*t.coordinate.heightDraw+u;r.util.strokeText(t.ctx,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+o,c,s,n)}}},this.checkOnPoint=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=r.util.onPoint(i,n.data);return!1!==a&&(n.option.selected=!0,{data:n,point:a})},this.checkOnLine=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;for(var a=0;a<4;a++){var o=[];if(o=3===a?[[n.data[3][0],n.data[3][1]],[n.data[0][0],n.data[0][1]]]:[[n.data[a][0],n.data[a][1]],[n.data[a+1][0],n.data[a+1][1]]],r.util.onLine(i,o))return n.option.selected=!0,{data:n,resizeLineIndex:a}}return!1},this.checkSelected=function(e,n){var i=[Math.round((e.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var a=r.util.pointInPoly(i,n.data);return!!a&&(n.option.selected=!0,{data:n})},this.moveShape=function(e,n,i,a,o,s){for(var u=[Math.round((i.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((i.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],c=u[0]-e[0],l=u[1]-e[1],f=0;f<a.data.length;f++){var h=r.util.pointInPoly([n.data[f][0]+c,n.data[f][1]+l],a.option.maxPoly);if(!h)return!1}if(0===s)a.data[0][0]=n.data[0][0]+c,a.data[0][1]=n.data[0][1]+l,a.data[1][0]=n.data[1][0]+c,a.data[1][1]=n.data[1][1]+l;else if(1===s)a.data[2][0]=n.data[2][0]+c,a.data[2][1]=n.data[2][1]+l,a.data[1][0]=n.data[1][0]+c,a.data[1][1]=n.data[1][1]+l;else if(2===s)a.data[3][0]=n.data[3][0]+c,a.data[3][1]=n.data[3][1]+l,a.data[2][0]=n.data[2][0]+c,a.data[2][1]=n.data[2][1]+l;else if(3===s)a.data[0][0]=n.data[0][0]+c,a.data[0][1]=n.data[0][1]+l,a.data[3][0]=n.data[3][0]+c,a.data[3][1]=n.data[3][1]+l;else for(var d=0;d<a.data.length;d++)a.data[d][0]=n.data[d][0]+c,a.data[d][1]=n.data[d][1]+l;return t.drawFunc(),!0},this.resizeShape=function(e,n,i){var a,o,s,u=[Math.round((n.clientX-r.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((n.clientY-r.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];0===e?(a=i.data[3][0]+i.data[1][0]-u[0],o=i.data[3][1]+i.data[1][1]-u[1],s=2):1===e?(a=i.data[0][0]+i.data[2][0]-u[0],o=i.data[0][1]+i.data[2][1]-u[1],s=3):2===e?(a=i.data[1][0]+i.data[3][0]-u[0],o=i.data[1][1]+i.data[3][1]-u[1],s=0):3===e&&(a=i.data[2][0]+i.data[0][0]-u[0],o=i.data[2][1]+i.data[0][1]-u[1],s=1),a<0||a>i.option.maxRect[1][0]-i.option.maxRect[0][0]||o<0||o>i.option.maxRect[1][1]-i.option.maxRect[0][1]||(i.data[s]=[a,o],i.data[e][0]=u[0],i.data[e][1]=u[1],t.drawFunc())}};var r=n(10),i=n(11),a=n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RectADShape=function(){var t=this,e=[3,3];this.init=function(e,n,r,i,a){t.type="rectAD",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[]},this.add=function(n,a){if(t.data.length<t.regionNum){var o={};o.data=i.jQlib.extend(!0,[],n),o.shapeId=r.util.shapeId++;var s={borderWidth:2,lineDash:e,borderLength:50,centerLength:30};return o.option=i.jQlib.extend(!0,{},a,s),t.data.push(o),o}},this.drawStart=function(t){return!1},this.draw=function(e){if(!0!==e.option.hide){var n=null;e.option.selected?(t.ctx.strokeStyle=e.option.selectedColor,n=e.option.selectedColor):(t.ctx.strokeStyle=e.option.strokeColor,n=e.option.strokeColor),t.ctx.beginPath();var i=[];i[0]=[e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw],i[1]=[e.data[1][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw],i[2]=[e.data[1][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw],i[3]=[e.data[0][0]*t.coordinate.widthDraw,e.data[1][1]*t.coordinate.heightDraw];var a=e.option.borderLength*t.coordinate.widthDraw,o=e.option.borderWidth,s=e.option.lineDash,u=e.option.centerLength*t.coordinate.widthDraw,c=0,l=0;e.option.rectLine&&(c=Math.min(i[1][0]-i[0][0],i[3][1]-i[0][1]),l=Math.floor(c/2),this.ctx.moveTo((i[0][0]+i[1][0])/2,i[0][1]),this.ctx.lineTo((i[0][0]+i[1][0])/2,i[0][1]-l),this.ctx.moveTo(i[1][0],(i[1][1]+i[2][1])/2),this.ctx.lineTo(i[1][0]+l,(i[1][1]+i[2][1])/2),this.ctx.moveTo((i[2][0]+i[3][0])/2,i[2][1]),this.ctx.lineTo((i[2][0]+i[3][0])/2,i[2][1]+l),this.ctx.moveTo(i[3][0],(i[3][1]+i[0][1])/2),this.ctx.lineTo(i[3][0]-l,(i[3][1]+i[0][1])/2));var f=this.ctx.lineWidth;if(this.ctx.lineWidth=o,this.ctx.moveTo(i[0][0],i[0][1]),this.ctx.lineTo(i[0][0]+a,i[0][1]),this.ctx.moveTo(i[0][0],i[0][1]),this.ctx.lineTo(i[0][0],i[0][1]+a),this.ctx.moveTo(i[1][0],i[1][1]),this.ctx.lineTo(i[1][0]-a,i[1][1]),this.ctx.moveTo(i[1][0],i[1][1]),this.ctx.lineTo(i[1][0],i[1][1]+a),this.ctx.moveTo(i[2][0],i[2][1]),this.ctx.lineTo(i[2][0],i[2][1]-a),this.ctx.moveTo(i[2][0],i[2][1]),this.ctx.lineTo(i[2][0]-a,i[2][1]),this.ctx.moveTo(i[3][0],i[3][1]),this.ctx.lineTo(i[3][0]+a,i[3][1]),this.ctx.moveTo(i[3][0],i[3][1]),this.ctx.lineTo(i[3][0],i[3][1]-a),t.ctx.closePath(),t.ctx.stroke(),this.ctx.lineWidth=f,this.ctx.setLineDash(s),this.ctx.moveTo(i[0][0]+a,i[0][1]),this.ctx.lineTo(i[1][0]-a,i[1][1]),this.ctx.moveTo(i[1][0],i[1][1]+a),this.ctx.lineTo(i[2][0],i[2][1]-a),this.ctx.moveTo(i[2][0]-a,i[2][1]),this.ctx.lineTo(i[3][0]+a,i[3][1]),this.ctx.moveTo(i[3][0],i[3][1]-a),this.ctx.lineTo(i[0][0],i[0][1]+a),t.ctx.stroke(),t.ctx.beginPath(),this.ctx.setLineDash([]),this.ctx.moveTo((i[0][0]+i[1][0])/2,i[0][1]),this.ctx.lineTo((i[0][0]+i[1][0])/2,i[0][1]+u),this.ctx.moveTo(i[1][0],(i[1][1]+i[2][1])/2),this.ctx.lineTo(i[1][0]-u,(i[1][1]+i[2][1])/2),this.ctx.moveTo((i[2][0]+i[3][0])/2,i[2][1]),this.ctx.lineTo((i[2][0]+i[3][0])/2,i[2][1]-u),this.ctx.moveTo(i[3][0],(i[3][1]+i[0][1])/2),this.ctx.lineTo(i[3][0]+u,(i[3][1]+i[0][1])/2),e.option.textArr&&e.option.textArr.length>0){var h=10,d=r.util.getStrokeTextAlign(this.ctx,t.canvasDom.width,e.option.textArr,e.data[0][0]*t.coordinate.widthDraw+h);"right"===d&&(h=-10);var p=e.data[0][1]*t.coordinate.heightDraw+10;e.option.textArr.forEach(function(i){p+=1.2*parseInt(e.option.font.split(" ")[3]),r.util.strokeText(t.ctx,i,e.data[0][0]*t.coordinate.widthDraw+h,p,d,n)})}t.ctx.closePath(),t.ctx.stroke()}},this.checkOnPoint=function(t,e){return!1},this.checkSelected=function(t,e){return!1},this.moveShape=function(t,e,n,r,i){return!1},this.resizeShape=function(t,e,n){}};var r=n(10),i=n(11);n(14)},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.ParkingLotShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="parkingLot",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[]},this.add=function(e,n){if(t.data.length<t.regionNum){var r={};return r.data=o.jQlib.extend(!0,[],e),r.shapeId=a.util.shapeId++,r.option=o.jQlib.extend(!0,{},n),t.data.push(r),r}},this.drawStart=function(e){var n=0;s.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(r){if(r.preventDefault(),!(a.util.moveFlag||a.util.resizeFlag||t.data.length>=t.regionNum)&&([Math.round((r.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((r.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],2===a.util.drawState||0===a.util.drawState)){a.util.drawState=1,n=0;var i={data:[]};i.option=o.jQlib.extend(!0,{},e),i.shapeId=a.util.shapeId++,i.option.zindex=a.util.zindex++,i.option.type=t.type,i.option.selected=!0,i.option.maxPointNum=i.option.maxPointNum||20,t.data.push(i)}}),s.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(e){var r=t.data.length-1;if(1===a.util.drawState){var i=[Math.round((e.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];t.data[r].data[n]=i,t.drawFunc()}});var r=function(e){if(1===a.util.drawState){var r=[Math.round((e.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];t.data[t.data.length-1].data;if(2!==e.button&&t.data[t.data.length-1].data.length>=t.data[t.data.length-1].option.maxPointNum)a.util.drawState=2,null,n=0,t.drawFunc(),t.data[t.data.length-1].event={},t.data[t.data.length-1].event.type=a.util.eventName.drawFinish,a.util.eventEnabled&&t.eventFunc&&t.eventFunc(t.data[t.data.length-1]);else if(2===e.button&&t.data[t.data.length-1].data.length>2)t.drawFunc(),a.util.drawState=2,null,n=0,t.data[t.data.length-1].data.length=t.data[t.data.length-1].data.length-1,t.drawFunc(),t.data[t.data.length-1].event={},t.data[t.data.length-1].event.type=a.util.eventName.drawFinish,a.util.eventEnabled&&t.eventFunc&&t.eventFunc(t.data[t.data.length-1]);else{var i=a.util.lineCrossPoly(t.data[t.data.length-1].data,n);if(!1!==i)return;t.data[t.data.length-1].data.push(r),n++,t.drawFunc()}}};s.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",r),s.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",r)},this.draw=function(e){if(!0!==e.option.hide){e.option.selected?(t.ctx.strokeStyle=e.option.selectedColor,e.option.selectedColor):(t.ctx.strokeStyle=e.option.strokeColor,e.option.strokeColor),t.ctx.beginPath();for(var n=0;e.data&&n<4;n++)0===n?t.ctx.moveTo(e.data[n][0]*t.coordinate.widthDraw,e.data[n][1]*t.coordinate.heightDraw):t.ctx.lineTo(e.data[n][0]*t.coordinate.widthDraw,e.data[n][1]*t.coordinate.heightDraw);if(!0===e.option.parkingReload){var r=[],o=[];e.data.length=4,"horizontal"===e.option.parkingDirection?(o=a.util.lineAverageNum([[e.data[2][0],e.data[2][1]],[e.data[1][0],e.data[1][1]]],e.option.parkingNumber),r=a.util.lineAverageNum([[e.data[3][0],e.data[3][1]],[e.data[0][0],e.data[0][1]]],e.option.parkingNumber)):"vertical"===e.option.parkingDirection&&(r=a.util.lineAverageNum([[e.data[0][0],e.data[0][1]],[e.data[1][0],e.data[1][1]]],e.option.parkingNumber),o=a.util.lineAverageNum([[e.data[3][0],e.data[3][1]],[e.data[2][0],e.data[2][1]]],e.option.parkingNumber));for(var s=0;s<r.length;s++)e.data.push(r[s]),e.data.push(o[s])}e.option.parkingReload=!1,t.ctx.lineTo(e.data[0][0]*t.coordinate.widthDraw,e.data[0][1]*t.coordinate.heightDraw);for(var u=4;e.data&&u<e.data.length;u++)u%2===0?t.ctx.moveTo(e.data[u][0]*t.coordinate.widthDraw,e.data[u][1]*t.coordinate.heightDraw):t.ctx.lineTo(e.data[u][0]*t.coordinate.widthDraw,e.data[u][1]*t.coordinate.heightDraw);t.ctx.closePath(),t.ctx.stroke();var c=[0,0],l=(0,i.default)(e.data),f=(e.data.length-4)/2+1;if("vertical"===e.option.parkingDirection){var h=l[1];l[1]=l[3],l[3]=h}for(var d=0;d<f;d++)c=0===d?1===f?a.util.getCenter([l[0],l[1],l[2],l[3]]):a.util.getCenter([l[0],l[1],l[5],l[4]]):d===f-1?a.util.getCenter([l[2*d+2],l[2*d+3],l[2],l[3]]):a.util.getCenter([l[2*d+2],l[2*d+3],l[2*d+5],l[2*d+4]]),a.util.strokeText(t.ctx,e.option.parkingLotTitle[d]||"",c[0]*t.coordinate.widthDraw-6,c[1]*t.coordinate.heightDraw+2);if(e.option.selected){t.ctx.beginPath(),t.ctx.strokeStyle=e.option.selectedColor,e.option.selectedColor;for(var p=0;p<e.data.length;p++){var v=e.data[p];a.util.drawSelectRect(t.ctx,v[0]*t.coordinate.widthDraw,v[1]*t.coordinate.heightDraw)}t.ctx.closePath()}}},this.checkOnPoint=function(e,n){var r=[Math.round((e.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var i=a.util.onPoint(r,n.data,!1);return!1!==i&&(n.option.selected=!0,{data:n,point:i})},this.checkSelected=function(e,n){var r=[Math.round((e.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;for(var i=n.data.slice(0,4),o=n.data.slice(4),s=[],u=0;u<o.length;u++)if(u%2!==0){if(s[1]=o[u],a.util.onLine(r,s))return{data:n,resizeLineIndex:(u+1)/2}}else s.length=0,s[0]=o[u];return a.util.pointInPoly(r,i)?(n.option.selected=!0,{data:n,resizeLineIndex:0}):void 0},this.moveShape=function(e,n,r,i,o,u){var c=[Math.round((r.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((r.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],l=c[0]-e[0],f=c[1]-e[1],h=i.data.slice(0,4);i.data.slice(4);if(!0===o);else if(0===u)for(var d=0;d<h.length;d++){var p=a.util.pointInPoly([n.data[d][0]+l,n.data[d][1]+f],i.option.maxPoly);if(!p)return s.EventManager.trigger(t.canvasDom,"mouseup.draw"),!1}if(0===u)for(var v=0;v<i.data.length;v++)i.data[v][0]=n.data[v][0]+l,i.data[v][1]=n.data[v][1]+f;else{var g=n.data[2*u+2][0]+l,m=n.data[2*u+2][1]+f,y=n.data[2*u+2+1][0]+l,w=n.data[2*u+2+1][1]+f,b=!1,S=!1;"horizontal"===i.option.parkingDirection?(S=a.util.segmentsInLine(g,m,y,w,h[1][0],h[1][1],h[2][0],h[2][1]),b=a.util.segmentsInLine(g,m,y,w,h[3][0],h[3][1],h[0][0],h[0][1])):"vertical"===i.option.parkingDirection&&(b=a.util.segmentsInLine(g,m,y,w,h[0][0],h[0][1],h[1][0],h[1][1]),S=a.util.segmentsInLine(g,m,y,w,h[2][0],h[2][1],h[3][0],h[3][1])),!1!==b&&!1!==S&&(i.data[2*u+2][0]=b[0],i.data[2*u+2][1]=b[1],i.data[2*u+2+1][0]=S[0],i.data[2*u+2+1][1]=S[1])}return t.drawFunc(),!0},this.resizeShape=function(e,n,r){var i=[Math.round((n.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((n.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],s=o.jQlib.extend(!0,[],r),u=o.jQlib.extend(!0,[],r),c=(u.data.slice(0,4),u.data.slice(0,4)),l=u.data.slice(4);s.data[e][0]=i[0],s.data[e][1]=i[1];var f=a.util.pointInPoly([i[0],i[1]],r.option.maxPoly);if(!f)return!1;if(e<4){var h=a.util.lineCrossPoly(s.data.slice(0,4),e);if(!0===h)return!1;c[e][0]=i[0],c[e][1]=i[1];for(var d=[],p=0;p<l.length;p+=2){var v=l[p][0],g=l[p][1],m=l[p+1][0],y=l[p+1][1],w=!1,b=!1;if("horizontal"===r.option.parkingDirection?(b=a.util.segmentsInLine(v,g,m,y,c[1][0],c[1][1],c[2][0],c[2][1]),w=a.util.segmentsInLine(v,g,m,y,c[3][0],c[3][1],c[0][0],c[0][1])):"vertical"===r.option.parkingDirection&&(w=a.util.segmentsInLine(v,g,m,y,c[0][0],c[0][1],c[1][0],c[1][1]),b=a.util.segmentsInLine(v,g,m,y,c[2][0],c[2][1],c[3][0],c[3][1])),!1===w||!1===b)return!1;d[p+4]=[],d[p+4+1]=[],d[p+4][0]=w[0],d[p+4][1]=w[1],d[p+4+1][0]=b[0],d[p+4+1][1]=b[1]}for(var S=0;S<l.length;S+=2)r.data[S+4][0]=d[S+4][0],r.data[S+4][1]=d[S+4][1],r.data[S+4+1][0]=d[S+4+1][0],r.data[S+4+1][1]=d[S+4+1][1];r.data[e][0]=i[0],r.data[e][1]=i[1]}else{var D,_,x,E,T=e-4;e%2===0?(D=i[0],x=i[1],_=l[T+1][0],E=l[T+1][1]):(D=l[T-1][0],x=l[T-1][1],_=i[0],E=i[1]);var k=!1,I=!1;if("horizontal"===r.option.parkingDirection?(I=a.util.segmentsInLine(D,x,_,E,c[1][0],c[1][1],c[2][0],c[2][1]),k=a.util.segmentsInLine(D,x,_,E,c[3][0],c[3][1],c[0][0],c[0][1])):"vertical"===r.option.parkingDirection&&(k=a.util.segmentsInLine(D,x,_,E,c[0][0],c[0][1],c[1][0],c[1][1]),I=a.util.segmentsInLine(D,x,_,E,c[2][0],c[2][1],c[3][0],c[3][1])),!1===k||!1===I)return!1;e%2===0?(r.data[e][0]=k[0],r.data[e][1]=k[1],r.data[e+1][0]=I[0],r.data[e+1][1]=I[1]):(r.data[e-1][0]=k[0],r.data[e-1][1]=k[1],r.data[e][0]=I[0],r.data[e][1]=I[1])}t.drawFunc()}};var i=r(n(18)),a=n(10),o=n(11),s=n(14)},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.CrossLine=function(){var t=this;this.init=function(e,n,r,i,a){t.type="crossLine",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.data=[],t.coordinate=a,t.size={width:70,height:40,distance:2}},this.add=function(e,n){if(t.data.length<t.regionNum){var r={};return r.data=o.jQlib.extend(!0,[],e),r.shapeId=a.util.shapeId++,r.option=o.jQlib.extend(!0,{},n),t.data.push(r),r}},this.drawStart=function(e){var n=null;s.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(r){if(r.preventDefault(),!a.util.moveFlag&&!a.util.resizeFlag)if(n=[Math.round((r.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((r.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],t.data.length>=t.regionNum)n=null;else{var i={data:[]};i.option=o.jQlib.extend(!0,{},e),i.shapeId=a.util.shapeId++,i.option.zindex=a.util.zindex++,i.option.type=t.type,i.option.selected=!0,i.option.fillStyle=i.option.fillStyle||"#00FF00",t.data.push(i),t.data[t.data.length-1].data=o.jQlib.extend(!0,[],n),a.util.drawState=1,t.drawFunc()}}),s.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(t){});var r=function(e){if(1===a.util.drawState){var n=t.data[t.data.length-1];n.event={},n.event.type=a.util.eventName.drawFinish,a.util.eventEnabled&&t.eventFunc&&t.eventFunc(n),a.util.drawState=2}};s.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",r),s.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",r)},this.draw=function(e){var n,r,o,s;if(!0!==e.option.hide){var u=null;e.option.selected?(this.ctx.strokeStyle=e.option.selectedColor,u=e.option.selectedColor):(this.ctx.strokeStyle=e.option.strokeColor,u=e.option.strokeColor);var c=this.getCrossLineCoordinateData(e);this.ctx.beginPath(),(n=this.ctx).moveTo.apply(n,(0,i.default)(c.horizontalLineData[0])),(r=this.ctx).lineTo.apply(r,(0,i.default)(c.horizontalLineData[1])),this.ctx.stroke(),this.ctx.closePath(),this.ctx.beginPath(),(o=this.ctx).moveTo.apply(o,(0,i.default)(c.verticalLineData[0])),(s=this.ctx).lineTo.apply(s,(0,i.default)(c.verticalLineData[1])),this.ctx.stroke(),this.ctx.closePath(),e.option.title&&a.util.strokeText(t.ctx,e.option.title,(c.horizontalLineData[1][0]-c.horizontalLineData[0][0])/2+c.horizontalLineData[0][0]+t.size.distance,c.horizontalLineData[0][1]+t.size.height/4,"left",u)}},this.checkOnPoint=function(t){return!1},this.checkSelected=function(e,n){var r=[Math.round((e.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var i=this.getCrossLineCoordinateData(n,1,1),o=i.verticalLineData,s=i.horizontalLineData;return!(!a.util.onLine(r,o)&&!a.util.onLine(r,s))&&(n.option.selected=!0,{data:n})},this.moveShape=function(e,n,r,i,o){var s=[Math.round((r.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((r.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],u=s[0]-e[0],c=s[1]-e[1],l=this.getCrossLineCoordinateData(n,1,1);if(!0===o);else if(i.option.maxPoly&&i.option.maxPoly.length>0){var f=a.util.lineInPoly([[l.horizontalLineData[0][0]+u,l.horizontalLineData[0][1]+c],[l.horizontalLineData[1][0]+u,l.horizontalLineData[1][1]+c]],i.option.maxPoly),h=a.util.lineInPoly([[l.verticalLineData[0][0]+u,l.verticalLineData[0][1]+c],[l.verticalLineData[1][0]+u,l.verticalLineData[1][1]+c]],i.option.maxPoly);if(!1===f&&!1===h)return!0}i.data[0]=n.data[0]+u,i.data[1]=n.data[1]+c,t.drawFunc()},this.getCrossLineCoordinateData=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.coordinate.widthDraw,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.coordinate.heightDraw;return{horizontalLineData:[[(e.data[0]-e.option.horizontalLength/2)*n,e.data[1]*r],[(e.data[0]+e.option.horizontalLength/2)*n,e.data[1]*r]],verticalLineData:[[e.data[0]*n,(e.data[1]-e.option.verticalLength/2)*r],[e.data[0]*n,(e.data[1]+e.option.verticalLength/2)*r]]}}};var i=r(n(18)),a=n(10),o=n(11),s=n(14)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WaterLevel=function(){var t=this;this.init=function(e,n,r,i,a){t.type="waterLevel",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.data=[],t.coordinate=a,t.size={}},this.add=function(e,n){if(t.data.length<t.regionNum){var a={};return a.data=i.jQlib.extend(!0,[],e),a.shapeId=r.util.shapeId++,a.option=i.jQlib.extend(!0,{},n),t.data.push(a),a}},this.drawStart=function(t){},this.draw=function(e){if(!0!==e.option.hide){var n=e.option.transText,i=n.strWaterStatus,a=void 0===i?"":i,o=n.strUnknown,s=void 0===o?"":o,u=n.strNormal,c=void 0===u?"":u,l=n.strHigtWaterLevel,f=void 0===l?"":l,h=n.strLowWaterLevel,d=void 0===h?"":h,p=n.strWaterValue,v=void 0===p?"":p,g=e.option.lineWidth||1,m=e.option.fontSize||12,y=e.option.textBaseline||"middle";t.ctx.lineWidth=g,t.ctx.textBaseline=y;for(var w=0;w<e.data.waterLevel.length;w++){var b=e.data.waterLevel[w],S="#000000";S=1===b.cColor?"#0000ff":(b.cColor,"#ff0000");var D=[[0,0],[0,0]];D[0][0]=b.point[0].nx*t.coordinate.widthDraw,D[0][1]=b.point[0].ny*t.coordinate.heightDraw,D[1][0]=b.point[1].nx*t.coordinate.widthDraw,D[1][1]=b.point[1].ny*t.coordinate.heightDraw,t.ctx.strokeStyle=S,r.util.drawAppendLine(t.ctx,D);var _=D[0][0]-D[1][0],x=D[0][1]-D[1][1];if(0===x)return;var E=0;E=0===_?Math.PI/2:Math.atan2(x,_);var T=t.getXEquation(D[0],Math.tan(E)),k=Math.sqrt(_*_+x*x),I=b.fDegree-0;I||(I=.01);var A=Math.abs(b.fRealRuler[0]-0-(b.fRealRuler[1]-0))/I,R=k/A,M={x:0,y:0},C={nx:0,ny:0};if(C.nx=b.textPos.nx*t.coordinate.widthDraw,C.ny=b.textPos.ny*t.coordinate.heightDraw,M.x=C.nx,M.y=C.ny,-1!==M.x&&-1!==M.y){M.x=C.nx,C.ny-4*R<=0?M.y=m:M.y=C.ny-4*R,M.x=M.x+m;var P="".concat(a,":");0===b.cStatus?P+=s:1===b.cStatus?P+=c:2===b.cStatus?P+=f:3===b.cStatus&&(P+=d),r.util.strokeText(t.ctx,"".concat(v,":").concat(b.fLevel).concat("m"),M.x,M.y,null,S),r.util.strokeText(t.ctx,P,M.x,M.y+m,null,S)}for(var O=[[0,0],[0,0]],B={x:0,y:0},F={x:0,y:0},L=D[0][1]>D[1][1]?D[0]:D[1],j=0;j<=A;j++){F.y=L[1]-j*Math.abs(x)/A,F.x=T(F.y),O[0][0]=F.x,O[1][0]=F.x+10,O[0][1]=F.y,O[1][1]=F.y,r.util.drawAppendLine(t.ctx,O);var N="".concat((b.fRealRuler[0]-0+j*I).toFixed(2)).concat("m");B.x=O[1][0],B.y=O[1][1],r.util.strokeText(t.ctx,N,B.x,B.y,null,S)}}}},this.checkOnPoint=function(t){return!1},this.checkSelected=function(t,e){return!1},this.moveShape=function(t,e,n,r,i){},this.getXEquation=function(t,e){var n=t[1]-e*t[0];return function(t){return(t-n)/e}}};var r=n(10),i=n(11)},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.RectRotatableShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="rectRotatable",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.coordinate=a,t.data=[]},this.add=function(e,n){if(t.data.length<t.regionNum){var r={};return r.data=o.jQlib.extend(!0,[],e),r.shapeId=a.util.shapeId++,r.option=o.jQlib.extend(!0,{},n),t.data.push(r),r}},this.drawStart=function(e){var n=null;s.EventManager.off(t.canvasDom,"mousedown.draw").on(t.canvasDom,"mousedown.draw",function(r){if(r.preventDefault(),!(a.util.moveFlag||a.util.resizeFlag||t.data.length>=t.regionNum)){n=[Math.round((r.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((r.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];var i={data:[]};i.option=o.jQlib.extend(!0,{},e),i.shapeId=a.util.shapeId++,i.option.zindex=a.util.zindex++,i.option.type=t.type,i.option.selected=!0,i.option._isRotatable=!0,t.data.push(i),t.data[t.data.length-1].data[0]=o.jQlib.extend(!0,[],n),a.util.drawState=1}}),s.EventManager.off(t.canvasDom,"mousemove.draw").on(t.canvasDom,"mousemove.draw",function(e){if(!a.util.moveFlag&&!a.util.resizeFlag){var r=t.data.length-1,i=[Math.round((e.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(n){if(t.data[r].option.defaultSize)t.data[r].data[1]=[t.data[r].data[0][0]+t.data[r].option.defaultSize.width||2e3,t.data[r].data[0][1]+t.data[r].option.defaultSize.height||1e3];else{var s=t.data[r];if(s.option.lockWH){var u=Math.ceil(0-(s.data[0][0]-i[0])*s.option.lockWH.height/s.option.lockWH.width+s.data[0][1]);if(u>8191||u<0)return;s.data[1]=o.jQlib.extend(!0,[],[i[0],u])}else s.data[1]=o.jQlib.extend(!0,[],i)}a.util.drawState=1,t.drawFunc()}}});var r=function(r){if(!a.util.moveFlag&&!a.util.resizeFlag){var i=null,s=null,u=t.data.length-1;if(n){var c=[Math.round((r.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((r.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(e.supportPoint||c[0]!==n[0]||c[1]!==n[1]){if(t.data[u].option.lockWH);else{if(t.data[u].option.maxRect){var l={};l.width=c[0]-t.data[u].data[0][0],l.height=c[1]-t.data[u].data[0][1],i=t.checkRectSize(t.data[u],l,"maxRect")}if(t.data[u].option.minRect){var f={};f.width=c[0]-t.data[u].data[0][0],f.height=c[1]-t.data[u].data[0][1],s=t.checkRectSize(t.data[u],f,"minRect")}t.data[u].option.defaultSize||(t.data[u].data[1]=o.jQlib.extend(!0,[],i||s||c))}t.drawFunc(),a.util.drawState=2,n=null,t.data[u].event={},t.data[u].event.type=a.util.eventName.drawFinish,a.util.eventEnabled&&t.eventFunc&&t.eventFunc(t.data[u])}else t.data.length=t.data.length-1,a.util.drawState=2,n=null}}};s.EventManager.off(t.canvasDom,"mouseup.draw").on(t.canvasDom,"mouseup.draw",r),s.EventManager.off(t.canvasDom,"mouseleave.draw").on(t.canvasDom,"mouseleave.draw",r)},this.draw=function(e){if(!0!==e.option.hide){var n=null,r=t.getRotationReactData(e,t.coordinate),o=r.rectRotationCoordinate,s=r.middleLine;e.option.selected?(t.ctx.strokeStyle=e.option.selectedColor,n=e.option.selectedColor,[].concat((0,i.default)(o),[s[0]]).forEach(function(e){a.util.drawSelectRect.apply(a.util,[t.ctx].concat((0,i.default)(e)))}),a.util.drawAppendLine(t.ctx,s),t.ctx.closePath()):(t.ctx.strokeStyle=e.option.strokeColor,n=e.option.strokeColor),t.ctx.beginPath(),e.option.fillStyle&&(t.ctx.fillStyle=e.option.fillStyle);for(var u=0;u<4;u++)a.util.drawAppendLine(t.ctx,[o[u],3!==u?o[u+1]:o[0]]);if(e.option.title&&a.util.strokeText(t.ctx,e.option.title,(e.data[0][0]/2+e.data[1][0]/2)*t.coordinate.widthDraw,(e.data[0][1]/2+e.data[1][1]/2+100)*t.coordinate.heightDraw,"center",n),e.option.ruleName&&e.option.ruleName.length>0){var c=10,l=a.util.getStrokeTextAlign(t.ctx,t.canvasDom.width,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+c);"right"===l&&(c=-10);var f=10;e.option.font&&(f=parseInt(e.option.font.split(" ")[3]));var h=e.data[0][1]*t.coordinate.heightDraw+f;a.util.strokeText(t.ctx,e.option.ruleName,e.data[0][0]*t.coordinate.widthDraw+c,h,l,n)}if(e.option.showSize){var d=Math.round(Math.abs(e.data[0][0]-e.data[1][0])*a.util.resolution.width/a.util.defalutCoordinate.width),p=Math.round(Math.abs(e.data[0][1]-e.data[1][1])*a.util.resolution.height/a.util.defalutCoordinate.height);a.util.strokeText(t.ctx,d+"*"+p,(e.data[0][0]+e.data[1][0])/2*t.coordinate.widthDraw,(e.data[0][1]+e.data[1][1])/2*t.coordinate.heightDraw,"center",n)}}},this.checkOnPoint=function(e,n){var r=[Math.round((e.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var i=t.getRotationReactData(n,t.coordinate),o=i.middleLine,s=i.rectRotationCoordinate8192,u=a.util.onPoint(r,s,!1);if(n.option._isRotatable){var c=a.util.onPoint(r,[[o[0][0]*t.coordinate.widthMouse,o[0][1]*t.coordinate.heightMouse]],!1);!1!==c&&(u=1111111)}return!1!==u?(n.option.selected=!0,n.option._isRotatable=!0,{data:n,point:u}):(n.option._isRotatable=!1,!1)},this.checkSelected=function(e,n){var r=[Math.round((e.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];if(!0===n.option.hide||!0===!n.option.resizeEnable&&!0===!n.option.moveEnable)return!1;var i=t.getRotationReactData(n,t.coordinate),o=i.rectRotationCoordinate8192;if(n.option.selectType&&"inSide"!==n.option.selectType)n.option._isRotatable=!1;else{var s=t.pointInRect(r,o);if(s)return n.option.selected=!0,n.option._isRotatable=!0,{data:n}}return!1},this.getTowPointDistance=function(t,e){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)},this.getDegreeByPoint=function(t,e,n){var r=180*Math.atan2(t[1]-n[1],t[0]-n[0])/Math.PI,i=180*Math.atan2(e[1]-n[1],e[0]-n[0])/Math.PI;return r<0&&(r+=360),i<0&&(i+=360),i-r},this.getRotationReactData=function(t,e){var n=(0,i.default)(t.data[0]),r=(0,i.default)(t.data[1]);e&&(n[0]*=e.widthDraw,n[1]*=e.heightDraw,r[0]*=e.widthDraw,r[1]*=e.heightDraw);var o=[(n[0]+r[0])/2,[n[1]+r[1]]/2],s=Math.abs(n[0]-r[0]),u=Math.abs(n[1]-r[1]);n=[o[0]-s/2,o[1]-u/2],r=[o[0]+s/2,o[1]+u/2];var c=0,l=[(0,i.default)(n),[r[0],n[1]],(0,i.default)(r),[n[0],r[1]]],f=l.map(function(t){return[Math.round(t[0]*e.widthMouse),Math.round(t[1]*e.heightMouse)]});t.option.normalizeReact&&(t.data=[(0,i.default)(f[0]),(0,i.default)(f[2])]);var h=null,d=null;t.option.rotationEnable&&t.option.rotationAngle&&(c=t.option.rotationAngle%360)<0&&(c+=360),d=l.map(function(t){var n=a.util.getRotateByDegree(t,o,c)[1];return n[0]*=e.widthMouse,n[1]*=e.heightMouse,n}),h=l.map(function(t){var e=a.util.getRotateByDegree(t,o,c)[1];return e});var p=t.option.midLineLength||20;n.some(function(e,n){return Math.abs(e-r[n])<2*(t.option.offsetValue||2)})&&(p=0);var v=a.util.getArrayLineMiddle(n,[r[0],n[1]],p);return v[0][1]-=p,v[1][1]-=p,v=v.map(function(t){return a.util.getRotateByDegree(t,o,c)[1]}),{startPos:n,endPos:r,rotationAngle:c,rectCenter:o,rectCoordinate:l,rectCoordinate8192:f,rectRotationCoordinate:h,rectRotationCoordinate8192:d,middleLine:v}},this.pointInRect=function(t,e){for(var n=t[0],r=t[1],i=0,a=0,o=e.length,s=o-1;a<o;s=a,a++){var u=e[a][0],c=e[a][1],l=e[s][0],f=e[s][1],h=Math.atan2(c-r,u-n)-Math.atan2(f-r,l-n);h>=Math.PI?h-=2*Math.PI:h<=-Math.PI&&(h+=2*Math.PI),i+=h}return 0!==Math.round(i/Math.PI)},this.moveShape=function(e,n,r,i){var o=[Math.round((r.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((r.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],s=o[0]-e[0],u=o[1]-e[1];!0===i.option.horizontalMove&&(u=0);var c=i.option.maxPoly[2][0]||8191,l=i.option.maxPoly[2][1]||8191;return n.data[0][0]+s<0&&(s=0-n.data[0][0]),n.data[0][0]+s>c&&(s=c-n.data[0][0]),n.data[1][0]+s<0&&(s=0-n.data[1][0]),n.data[1][0]+s>c&&(s=c-n.data[1][0]),n.data[0][1]+u<0&&(u=0-n.data[0][1]),n.data[0][1]+u>l&&(u=l-n.data[0][1]),n.data[1][1]+u<0&&(u=0-n.data[1][1]),n.data[1][1]+u>l&&(u=l-n.data[1][1]),i.data[0][0]=n.data[0][0]+s,i.data[0][1]=n.data[0][1]+u,i.data[1][0]=n.data[1][0]+s,i.data[1][1]=n.data[1][1]+u,t.drawFunc(),!0},this.resizeShape=function(e,n,r){var i=[Math.round((n.clientX-a.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((n.clientY-a.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)];this.resizeRectByRegion(r,e,i),t.drawFunc()},this.checkRectSize=function(t,e,n){var r=null,i=Math.abs(t.option[n][1][0]-t.option[n][0][0]),a=Math.abs(t.option[n][1][1]-t.option[n][0][1]),o=Math.abs(e.width),s=Math.abs(e.height);return"maxRect"===n?(o>=i||s>=a)&&(r=[],e.width>0?r[0]=t.data[0][0]+i:r[0]=t.data[0][0]-i,e.height>0?r[1]=t.data[0][1]+a:r[1]=t.data[0][1]-a):"minRect"===n&&(o<=i||s<=a)&&(r=[],e.width>0?r[0]=t.data[0][0]+i:r[0]=t.data[0][0]-i,e.height>0?r[1]=t.data[0][1]+a:r[1]=t.data[0][1]-a),r},this.resizeRectByRegion=function(e,n,r){var i={},o=t.getRotationReactData(e,t.coordinate),s=o.rotationAngle,u=o.rectRotationCoordinate8192,c=o.rectCenter,l=o.middleLine;switch(n){case 0:i.width=t.getTowPointDistance(r,u[1]),i.height=t.getTowPointDistance(r,u[3]);break;case 1:i.width=t.getTowPointDistance(r,u[0]),i.height=t.getTowPointDistance(r,u[2]);break;case 2:i.width=t.getTowPointDistance(r,u[3]),i.height=t.getTowPointDistance(r,u[1]);break;case 3:i.width=t.getTowPointDistance(r,u[2]),i.height=t.getTowPointDistance(r,u[0])}if(1111111!==n){var f=[r,u[(n+2)%4]],h=[(f[0][0]+f[1][0])/2*t.coordinate.widthDraw,(f[0][1]+f[1][1])/2*t.coordinate.heightDraw];e.data=f.map(function(e){var n=a.util.getRotateByDegree([e[0]*t.coordinate.widthDraw,e[1]*t.coordinate.heightDraw],h,360-s)[1];return[Math.round(n[0]*t.coordinate.widthMouse),Math.round(n[1]*t.coordinate.heightMouse)]})}else{var d=t.getDegreeByPoint(l[0],[r[0]*t.coordinate.widthDraw,r[1]*t.coordinate.heightDraw],c);e.option.rotationAngle+=d}}};var i=r(n(18)),a=n(10),o=n(11),s=n(14)},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.ImageShape=function(){var t=this;this.init=function(e,n,r,i,a){t.type="image",t.regionNum=999999,t.canvasDom=e,t.ctx=n,t.drawFunc=r,t.eventFunc=i,t.data=[],t.coordinate=a},this.add=function(e,n){if(t.data.length<t.regionNum){var r={};return r.data=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){(0,a.default)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({coordinate:(0,i.default)(e.coordinate)},e),r.shapeId=o.util.shapeId++,r.option=s.jQlib.extend(!0,{},n),t.data.push(r),r}},this.drawStart=function(){},this.draw=function(e){if(!0!==e.option.hide){var n=e.option.width||e.data.image.width,r=e.option.height||e.data.image.height,i=e.data.image;e.option.mouseoverEnable&&e.option.isMouseover&&(i=e.data.mouseoverImage||e.data.image),this.ctx.drawImage(i,e.data.coordinate[0]*t.coordinate.widthDraw,e.data.coordinate[1]*t.coordinate.heightDraw,n,r)}},this.checkOnPoint=function(t){return!1},this.checkSelected=function(e,n,r){if(!r)return!1;var a=[Math.round((e.clientX-o.util.offset(t.canvasDom).left+window.scrollX)*t.coordinate.widthMouse),Math.round((e.clientY-o.util.offset(t.canvasDom).top+window.scrollY)*t.coordinate.heightMouse)],s=n.option.width||n.data.image.width,u=n.option.height||n.data.image.height,c=o.util.pointInRect(a,[(0,i.default)(n.data.coordinate),[n.data.coordinate[0]+s*t.coordinate.widthMouse,n.data.coordinate[1]+u*t.coordinate.heightMouse]]);return c},this.moveShape=function(t,e,n,r,i){}};var i=r(n(18)),a=r(n(25)),o=n(10),s=n(11);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FactoryGridShapeAction=function(t,e){if(this.toTransDataToInt=function(t,e){var n=function(t){for(var e=0,n=t.length;e<n;e++)for(var r=0,i=t[e].length;r<i;r++)t[e][r]=Math.round(t[e][r])};n(t);for(var r=0,i=e.length;r<i;r++)n(e[r].data)},this.moveLinesInGride=function(t,e){var n=this,r=this.calcLineRelationWrap(t,e),i=r.pointInSide,a=r.calcSide;this.setLineWrapSide(a,i.lineGroup),function(t){for(var e=0,r=t.length;e<r;e++)n.resetMoveLinePos(t[e],t)}(e)},this.isLineIntersectOhterLine=function(t,e){for(var n=t.option,i=t.data,a=i[0][0],o=i[0][1],s=i[1][0],u=i[1][1],c=n.firstSide,l=!0,f=0,h=e.length;f<h;f++){var d=e[f];if(this.equalSide(d.option.firstSide,c))if(d===t);else{var p=d.data,v=t.beforModifyData,g=p[0][0],m=p[0][1],y=p[1][0],w=p[1][1],b=r.util.segmentsInLine(a,o,s,u,g,m,y,w),S=r.util.segmentsInLine(g,m,y,w,a,o,v[0][0],v[0][1]);if(b||S){l=!1;break}}}return!l},this.resetMoveLinePos=function(t,e){var n=t.option,i=n.firstSide,a=n.lastSide,o=t.beforModifyData;if(o){var s=t.data,u=s[0][0],c=s[0][1],l=s[1][0],f=s[1][1],h=r.util.segmentsInLine(u,c,l,f,i[0][0],i[0][1],i[1][0],i[1][1]),d=r.util.segmentsInLine(u,c,l,f,a[0][0],a[0][1],a[1][0],a[1][1]),p=h&&d,v=this.isLineIntersectOhterLine(t,e);p&&!v?this.resetShapeByData(s,[h,d]):(this.resetShapeByData(s,o),this.stopDraw())}},this.resetShapeByData=function(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];i[0]=e[n][0],i[1]=e[n][1]}},this.stopDraw=function(){this.canvasNode.trigger("mouseup.move")},this.calcLineRelationWrap=function(t,e){var n=t[0].data,r=this.getPointNearSide(n,1);return{pointInSide:this.linesRelationSide(r,e),calcSide:r}},this.asyncGrideWrapDataToLine=function(t,e){var n=t[0].beforModifyData,r=t[0].data,i=this.getPointDiffIndex(n,r);0!==i.length&&(1===i.length?this.asyncResizeToLines(t,e,i):this.asyncMoveToLines(t,e))},this.asyncMoveToLines=function(t,e){for(var n=t[0].beforModifyData,r=t[0].data,i=r[0][0]-n[0][0],a=r[0][1]-n[0][1],o=0,s=e.length;o<s;o++){var u=e[o].data;u[0][0]+=i,u[0][1]+=a,u[1][0]+=i,u[1][1]+=a}},this.isWrapConvex=function(t){var e=!0;if(r.util.segmentsIntr(t[0],t[2],t[1],t[3])){for(var n=t.length,i=0;i<n;i++)for(var a=i+1;a<n;a++)if(this.getTwoPointDistance(t[i],t[a])<100){e=!1;break}}else e=!1;return e},this.equalSide=function(t,e){var n=!0;return n=(n=(n=(n=n&&t[0][0]===e[0][0])&&t[0][1]===e[0][1])&&t[1][0]===e[1][0])&&t[1][1]===e[1][1]},this.asyncResizeToLines=function(t,e,n){var r=n[0],i=t[0].beforModifyData,a=t[0].data,o=this.getPointNearSide(i,r),s=this.getPointNearSide(a,r);if(this.isWrapConvex(a)){var u=this.linesRelationSide(o,e);this.setLineWrapSide(s,u.lineGroup),this.setPointPosWithSide(s,u)}else this.resetShapeByData(a,i),this.stopDraw()},this.setLineWrapSide=function(t,e){var n=t.preSide,r=t.nextSide,i=t.oppositePreSide,a=t.oppositeNextSide,o=e[0].slice(),s=e[1].slice(),u=function(t,e){for(var o=1,s=t.length;o<s-1;o++){var u=t[o].option;u.ignoreMaxPoly=!0,"vertical"===e?(u.firstSide=n,u.lastSide=i):"horizontal"===e&&(u.firstSide=r,u.lastSide=a)}};o.unshift({data:[a[1],a[0]]}),o.push({data:r}),s.unshift({data:n}),s.push({data:[i[1],i[0]]}),u(o,"vertical"),u(s,"horizontal")},this.setPointPosWithSide=function(t,e){var n=function(t,e){for(var n=t[0][0],r=t[0][1],i=t[1][0]-t[0][0],a=t[1][1]-t[0][1],o=0,s=e.length;o<s;o++){var u=e[o],c=u.scale;u.dot[0]=n+c*i,u.dot[1]=r+c*a}};n(t.preSide,e.onPreSidePoint),n(t.nextSide,e.onNextSidePoint)},this.getLineOutRect=function(t){var e=[],n=t[0][0],r=t[0][1],i=t[1][0],a=t[1][1];return n>i&&(n^=i,n^=i^=n),r>a&&(r^=a,r^=a^=r),e[0]=[n,r],e[1]=[i,a],e},this.getTwoPointDistance=function(t,e){var n=Math.pow(e[0]-t[0],2),r=Math.pow(e[1]-t[1],2);return Math.sqrt(n+r)},this.dotRelationLine=function(t,e){var n=this,i=r.util.onLine(t,e);return t[0],t[1],e[0][0],e[0][1],e[1][0],e[1][1],{isInline:i,scale:function(){var r=n.getTwoPointDistance(e[0],e[1]);return n.getTwoPointDistance(e[0],t)/r}()}},this.linesRelationSide=function(t,e){for(var n=t.preSide,i=t.nextSide,a=t.oppositePreSide,o=t.oppositeNextSide,s=[],u=[],c=[[],[]],l=0,f=e.length;l<f;l++){var h=e[l],d=h.data,p=d[0],v=d[1],g=null,m=d[0][0],y=d[0][1],w=d[1][0],b=d[1][1],S=n[0][0],D=n[0][1],_=n[1][0],x=n[1][1],E=i[0][0],T=i[0][1],k=i[1][0],I=i[1][1],A=a[0][0],R=a[0][1],M=a[1][0],C=a[1][1],P=o[0][0],O=o[0][1],B=o[1][0],F=o[1][1],L=r.util.segmentsInLine(m,y,w,b,S,D,_,x),j=r.util.segmentsInLine(m,y,w,b,A,R,M,C),N=r.util.segmentsInLine(m,y,w,b,E,T,k,I),U=r.util.segmentsInLine(m,y,w,b,P,O,B,F);L&&j?(g=this.dotRelationLine(p,n))&&g.isInline?(s.push({dot:p,scale:g.scale}),c[0].push(h)):(g=this.dotRelationLine(v,n))&&g.isInline&&(s.push({dot:v,scale:g.scale}),c[0].push(h)):N&&U&&((g=this.dotRelationLine(p,i))&&g.isInline?(u.push({dot:p,scale:g.scale}),c[1].push(h)):(g=this.dotRelationLine(v,i))&&g.isInline&&(u.push({dot:v,scale:g.scale}),c[1].push(h)))}return{onPreSidePoint:s,onNextSidePoint:u,lineGroup:c}},this.getGridShapeInfo=function(t){for(var e=[],n=[],r=0,i=t.length;r<i;r++){var a=t[r];"GridShape"===a.option.composeType&&("poly"===a.option.type?e.push(a):"line"===a.option.type&&n.push(a))}return{polyWrap:e,lineArr:n}},this.getPointDiffIndex=function(t,e){for(var n=[],r=0,i=t.length;r<i;r++){var a=t[r][0]!==e[r][0],o=t[r][1]!==e[r][1];(a||o)&&n.push(r)}return n},this.getPointNearSide=function(t,e){var n=t.length,r=(t[e],(e+1)%n);return{preSide:[t[(e+n-1)%n],t[e]],nextSide:[t[e],t[r]],oppositePreSide:[t[r],t[(r+1)%n]],oppositeNextSide:[t[(r+1)%n],t[(r+2)%n]]}},this.canvasNode=e,0===t.length)return;var n=this.getGridShapeInfo(t),i=n.polyWrap,a=n.lineArr;if(0===i.length)return;var o=i[0].beforModifyData;i[0].data;o?this.asyncGrideWrapDataToLine(i,a):this.moveLinesInGride(i,a);this.toTransDataToInt(i,a)};var r=n(10)},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(168)),a=r(n(179)),o=r(n(181)),s=r(n(231)),u=function(t,e,n){var r=n.dType,u=n.isPrivateProtocol,c=null,l=null;if("Train"===r)l=new a.default;else{var f={};f.h265AccelerationEnabled=n&&n.h265AccelerationEnabled,f.disabledAudio=n&&n.disabledAudio,l=new i.default(f)}var h={wsURL:t,rtspURL:e,workerManager:l,RTSP_STATE:{OK:200,UNAUTHORIZED:401,NOTFOUND:404,INVALID_RANGE:457,NOTSERVICE:503,DISCONNECT:999,BADREQUEST:400,FORBIDDEN:403,INTERNALSERVERERROR:500,SERVICEUNAVAILABLE:503}},d=Object.assign(h,n);function p(){}return c=!0===u?new o.default(d):new s.default(d),p.prototype={init:function(t,e,n,i,a){"Train"===r?l.init(t,n):l.init(t,e,n,i,a,d.wndIndex)},initIFrame:function(){l.initIFrame()},decodeIFrame:function(t,e,n){l.parseRTPDataIFrame(t,e,n)},setExtraError:function(t){c.setExtraError(t)},talkInit:function(){l.talkInit()},connect:function(){c.connect()},disconnect:function(){c.disconnect()},disconnectWorker:function(){l.terminate()},controlPlayer:function(t){return c.controlPlayer(t)},setLiveMode:function(t){l.setLiveMode(t)},setPlayMode:function(t,e){c.setPlayMode(t,e)},setRTSPURL:function(t){c.setSignalURL(t)},setCallback:function(t,e){c.setCallback(t,e)},setUserInfo:function(t,e){c.setUserInfo(t,e)},capture:function(t,e){l.capture(t,e)},setLessRate:function(t){l.setLessRate&&l.setLessRate(t)},gotoSecond:function(t){return l.gotoSecond(t)},gotoFrame:function(t){return l.gotoFrame(t)},checkLeftSize:function(t,e){return l.checkLeftSize(t,e)},clearMap:function(){l.clearMap()},getCapture:function(t,e){return l.getCapture(t,e)},setDisabledAudio:function(t){l.setDisabledAudio(t)}},new p};e.default=u},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(16),a=r(n(169)),o=r(n(171)),s=r(n(172)),u=r(n(173)),c=r(n(174)),l=r(n(175)),f=r(n(176)),h=r(n(177)),d=r(n(178)),p=function(t){var e=t,n=null,r=null,p=null,v=null,g=null,m=null,y=null,w=null,b=null,S=null,D=null,_=null,x=null,E=null,T=null,k=null,I=null,A=null,R=null,M=null,C=null,P=null,O=null,B=null,F=(0,i.BrowserDetect)(),L=null,j=null,N=null,U=null,z=!0,V=!0,H=null,W=0,Y=null,q=!1,X="",G=!0,Q=null,Z=null,K=null,$=!1,J=!1,tt=null,et=null,nt=null,rt={id:1,samples:null,baseMediaDecodeTime:0},it=0,at=0,ot=null,st=1,ut="",ct=null,lt=null,ft=4,ht=1,dt=ft,pt=!1,vt=0,gt=0,mt=0,yt=1e3,wt=null,bt=0,St=0,Dt=0,_t=null,xt=null,Et=null,Tt=!1,kt=0,It={type:"live",codec:"",width:0,height:0,isLimitSpeed:null},At=!1,Rt=null,Mt=null,Ct=null,Pt=!1,Ot=!1,Bt=null,Ft=null,Lt=null,jt=!1,Nt=null,Ut=0,zt=0,Vt="firstFrame",Ht=1,Wt=null,Yt={2:"H264",4:"H264",5:"JPEG",8:"H264",12:"H265",15:"SVAC2"},qt={8:"G729",10:"G711U",14:"G711A",16:"PCM",25:"G723.1",26:"AAC",27:"G726-40",28:"G726-32",29:"G726-24",30:"G726-16",31:"MP2",41:"G722_1_16",34:"G722_1_32",42:"G722_1_24",43:"G722_1c_24",44:"G722_1c_32"},Xt={1:4e3,2:8e3,3:11025,4:16e3,5:2e4,6:22050,7:32e3,8:44100,9:48e3,10:96e3,11:128e3,12:192e3,13:64e3};function Gt(){v=this}function Qt(){return et}function Zt(){null!==x&&x(!1)}Gt.prototype={init:function(t,u,c,f,h,d){if(kt=c,Q=t,ct=u,v.channel=c,Tt=h,Pt=e&&e.h265AccelerationEnabled,Ot=e&&e.disabledAudio,!0===Pt){var p=new i.BrowserDetectDetail;Pt=!!("chrome"==p.name&&p.version>=105&&MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L30.B0"'))}if(window.navigator.userAgent,!Tt){(n=new o.default).onmessage=Kt;var m=!0===f?500:15;g=new a.default(kt,this,Q,m),(B=(0,l.default)()).wndIndex=d,document.getElementById("count-fps"),document.getElementById("span-fps")}!0!==Ot&&((r=new s.default).onmessage=$t)},initIFrame:function(){if(null===n){var t=document.createElement("canvas");t.width="1920",t.height="1080",(n=new o.default).onmessage=Kt,g=new a.default(kt,this,t,15)}},talkInit:function(){q=!0,(r=new s.default).onmessage=$t},setPlaySpeed:function(t){tt&&tt.setPlaySpeed(t),g&&g.setFrameInterval(1/t)},sendSdpInfo:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r={type:"sdpInfo",data:{sdpInfo:t,h265AccelerationEnabled:Pt,aacCodecInfo:e,decodeMode:X,govLength:Y,checkDelay:G,lessRateCanvas:jt,mp4Codec:n}};if(q)try{window.AudioContext=window.AudioContext||window.webkitAudioContext||window.mozAudioContext||window.oAudioContext||window.msAudioContext,(p=new d.default).onmessage=Jt,null===y&&((y=new h.default).init(),y.setSendAudioTalkBufferCallback(te)),p.postMessage(r),r={type:"sampleRate",data:y.initAudioOut()},p.postMessage(r)}catch(t){return void i.debug.error("Web Audio API is not supported in this web browser! : "+t)}j=t,e=e,n=n,wt=null,pt=!1},parseRTPData:function(t,e){var a=e[4],o=128,s=129,u=130,c=131,l=132,f=133,h=136,d=137,p=138,m=139,y=140,w=144,b=145,S=146,D=147,_=148,x=149,T=150,k=151,A=152,M=153,P=154,O=155,B=156,F=160,L=176,W=255,q={type:"MediaData",data:{rtspInterleave:t,payload:e},info:null,channel:v.channel},Q={};if(253==a||254==a||252==a||251==a){if(253===a?Q.IPFrameType="I":252===a&&(Q.IPFrameType="P"),function(){var t=e[22]+24;Q.frameIndex=(e[11]<<24)+(e[10]<<16)+(e[9]<<8)+e[8];for(var n=24;n<t;)if(o==e[n]){if(n+4>t)return-1;Q.width=e[n+2]<<3,Q.height=e[n+3]<<3,n+=4}else if(s==e[n]){if(n+4>e.length)return-1;Q.I_frame_interval=e[n+1],Q.encode_type=e[n+2],Q.frame_rate=e[n+3],n+=4}else if(u==e[n])Q.width=(e[n+5]<<8)+e[n+4],Q.height=(e[n+7]<<8)+e[n+6],n+=8;else if(c==e[n])n+=4;else if(h==e[n])n+=8;else if(l==e[n]){if(n+4>t)return-1;var r=(e[n+2]<<8)+e[n+3];n+=r}else if(_==e[n])Q.h264_svc_flag=!0,Q.svc=e[n+2],n+=4;else if(p==e[n])n+=8;else if(b==e[n])n+=8;else if(M==e[n]){var i=e[n+1],a=e[n+2];n+=8,n+=i*a*16}else if(P==e[n])n+=8;else if(O==e[n])n+=8;else if(S==e[n])n+=8;else if(D==e[n])n+=8;else if(x==e[n])n+=8;else if(F<=e[n]&&e[n]<L)Q.timeStampmsw=(e[n+3]<<8)+e[n+2],n+=4;else if(L<=e[n]&&e[n]<W)n+=e[n+1];else if(f==e[n])n+=4;else if(d==e[n])n+=4;else if(m==e[n])n+=4;else if(w==e[n])n+=8;else if(k==e[n]){var i=e[n+1];n+=8,n+=16*i}else if(A==e[n])n+=4;else{if(B!=e[n])return-1;var t=(e[n+5]<<8)+e[n+4];n+=8,n+=t}Vt!==Q.h264_svc_flag&&"firstFrame"!==Vt&&I(Yt[Q.encode_type]),Vt=Q.h264_svc_flag}(),null!=Rt){if(Rt!=Q.encode_type&&void 0!==Q.encode_type)return Rt=Q.encode_type,void I(Yt[Q.encode_type])}else Rt=Q.encode_type;if(null!==Ct?Ct!==Q.frame_rate&&void 0!==Q.frame_rate&&(Ct=Q.frame_rate,C(Q.frame_rate),null!=tt&&tt.setFPS(Q.frame_rate),"undefined"!==typeof g.setFPS&&g.setFPS(Q.frame_rate)):Ct=Q.frame_rate,null==Mt&&(Mt=Q.encode_type),z&&Q.encode_type&&(253==a||251===a)){var Z=parseInt(Q.frame_rate||0);K({codecName:Yt[Q.encode_type],Framerate:Z},"video"),Z>=0&&(Gt.prototype.setFPS(Z),C(Z))}n&&(q.info=Q,n.postMessage(q))}else if(240==a){if(function(){Q.ChannelCount=0;for(var t=e[22]+24,n=24;n<t;)if(o==e[n])n+=4;else if(s==e[n])n+=4;else if(u==e[n])n+=8;else if(c==e[n])n+=4;else if(y==e[n])n+=e[n+1];else if(h==e[n])n+=8;else if(l==e[n]){var r=e[n+2]<<8+e[n+3];n+=r}else if(T==e[n])Q.ChannelCount=e[n+1],Q.channel=e[n+2],n+=4;else if(x==e[n])n+=8;else if(F==e[n])Q.timeStampmsw=(e[n+3]<<8)+e[n+2],n+=4;else{if(A!=e[n])return-1;n+=4}0==Q.ChannelCount&&(Q.ChannelCount=1,Q.channel=0);for(var t=e[22]+24,n=24;n<t;)if(e[n]==o)n+=4;else if(e[n]==s)n+=4;else if(e[n]==u)n+=8;else if(e[n]==c)Q.audio_type=e[n+2],Q.samplingRate=Xt[e[n+3]],n+=4;else if(e[n]==y)n+=e[n+1];else if(e[n]==h)n+=8;else if(e[n]==l){var r=e[n+2]<<8+e[n+3];n+=r}else if(e[n]==T)n+=4;else if(e[n]==x)n+=8;else if(F==e[n])n+=4;else{if(A!=e[n])return-1;n+=4}}(),null!=Lt){if(Lt!=Q.audio_type)return Lt=Q.audio_type,void R("audioType")}else Lt=Q.audio_type;if(null!=Ft){if(Ft!=Q.samplingRate)return Ft=Q.samplingRate,void R("samplingRate")}else Ft=Q.samplingRate;if(V&&Q.samplingRate&&Q.audio_type){if(!qt[Q.audio_type])return void E({errorCode:i.PLAYER_STATE_CODE.UNSUPPORTED_AUDIO_FORMAT});34!=Q.audio_type&&41!=Q.audio_type&&42!=Q.audio_type&&43!=Q.audio_type&&44!=Q.audio_type||E({errorCode:i.PLAYER_STATE_CODE.UNSUPPORTED_AUDIO_FORMAT}),K({ClockFreq:parseInt(Q.samplingRate),codecName:qt[Q.audio_type]},"audio",t[1])}switch(Q.audio_type+""){case"8":case"10":case"14":case"16":case"25":case"26":case"27":case"28":case"29":case"30":case"31":case"34":case"41":case"42":case"43":case"44":r&&(q.info=Q,r.postMessage(q))}}else 241==a&&n&&(q.info=Q,n.postMessage(q));function K(t,e,i){for(var a=j.length,o=null,s=null,u=0;u<a;u++)if(j[u].Type===e){if("video"===e){j[u].codecName=t.codecName,j[u].Framerate=t.Framerate,o={type:"sdpInfo",data:{sdpInfo:j,decodeMode:X,govLength:Y,checkDelay:G,h265AccelerationEnabled:Pt,lessRateCanvas:jt,mp4Codec:U}},n.postMessage(o),z=!1;break}if("audio"===e&&(s||"recvonly"!==j[u].TalkTransType||j[u].RtpInterlevedID!==i||(s=j[u]),s)){j[u].ClockFreq=t.ClockFreq,j[u].codecName=t.codecName,H={type:"sdpInfo",data:{sdpInfo:j,aacCodecInfo:N,mp4Codec:U}},r&&r.postMessage(H),V=!1;break}}}},parseRTPDataIFrame:function(t,e,r){Ht=void 0!==r&&null!==r?r:1;var i=128,a=129,o=130,s=131,u=132,c=133,l=136,f=137,h=138,d=139,p=144,v=145,g=146,m=147,y=148,w=149,b=151,S=152,D=153,_=154,x=155,E=156,T=160,k=176,I=255,A={};A.channel=e,function(){for(var e=t[22]+24,n=24;n<e;)if(i==t[n]){if(n+4>e)return-1;A.width=t[n+2]<<3,A.height=t[n+3]<<3,n+=4}else if(a==t[n]){if(n+4>t.length)return-1;A.encode_type=t[n+2],n+=4}else if(o==t[n])A.width=(t[n+5]<<8)+t[n+4],A.height=(t[n+7]<<8)+t[n+6],n+=8;else if(s==t[n])n+=4;else if(l==t[n])n+=8;else if(u==t[n]){if(n+4>e)return-1;var r=(t[n+2]<<8)+t[n+3];n+=r}else if(y==t[n])A.h264_svc_flag=!0,A.svc=t[n+2],n+=4;else if(h==t[n])n+=8;else if(v==t[n])n+=8;else if(D==t[n]){var R=t[n+1],M=t[n+2];n+=8,n+=R*M*16}else if(_==t[n])n+=8;else if(x==t[n])n+=8;else if(g==t[n])n+=8;else if(m==t[n])n+=8;else if(w==t[n])n+=8;else if(T<=t[n]&&t[n]<k)A.timeStampmsw=(t[n+3]<<8)+t[n+2],n+=4;else if(k<=t[n]&&t[n]<I)n+=t[n+1];else if(c==t[n])n+=4;else if(f==t[n])n+=4;else if(d==t[n])n+=4;else if(p==t[n])n+=8;else if(b==t[n]){var R=t[n+1];n+=8,n+=16*R}else if(S==t[n])n+=4;else{if(E!=t[n])return-1;var e=(t[n+5]<<8)+t[n+4];n+=8,n+=e}}();var R={type:"MediaData",data:{payload:t,codecName:Yt[A.encode_type]},use:"I"};n&&(R.info=A,n.postMessage(R))},setCallback:function(t,e){switch(t){case"timeStamp":break;case"ResolutionChanged":w=e,null!==g&&g.setResizeCallback(w);break;case"audioTalk":S=e;break;case"stepRequest":D=e;break;case"metaEvent":break;case"videoMode":_=e;break;case"loadingBar":x=e;break;case"Error":E=e;break;case"PlayStart":b=e,null!==g&&g.setBeginDrawCallback(b);break;case"DecodeStart":T=e;break;case"UpdateCanvas":k=e,null!==g&&g.setupdateCanvasCallback(k);break;case"FrameTypeChange":I=e;break;case"MSEResolutionChanged":A=e;break;case"audioChange":R=e;break;case"WorkerReady":_t=e;break;case"AudioWorkerReady":xt=e;break;case"IvsDraw":M=e;break;case"FileOver":this.fileOverCallback=e;break;case"Waiting":this.waitingCallback=e;break;case"UpdateTime":break;case"GetFrameRate":C=e;break;case"receiveStreamAssistFrame":P=e;break;case"decodeIFrame":O=e;break;case"IFrameWorkerReady":Et=e;break;case"GetAudioFloat32Data":Wt=e}},capture:function(t,e){"canvas"===X?g.capture(t,e):"video"===X&&tt.capture(t,e)},getCapture:function(t,e){return"video"===X?tt.getCapture(t,e):g.getCapture(t,e)},getIFrameData:function(t,e){O&&O(t,e)},setDeviceInfo:function(t){K=t.mode},setFPS:function(t){W=0===t?30:t,ee(1!==ht)},setGovLength:function(t){Y=t},setLiveMode:function(t){null!==_&&_(t),"video"===(X=null===t?"canvas":t)?null!==g&&g.renewCanvas():"canvas"===X&&ee(!1)},setPlayMode:function(t){J=t},controlAudio:function(t,e){switch(t){case"audioPlay":"start"===e?null!==m&&m.play():"stop"===e?(bt=0,null!==m&&m.stop()):null!==m&&m.pause();break;case"volumn":bt=e,null!==m&&m.controlVolumn(e,!0);break;case"audioSamplingRate":null!==m&&m.setSamplingRate(e)}},controlAudioTalk:function(t,e){if(null!==y)switch(t){case"onOff":"on"===e||y.stopAudioOut();break;case"volumn":y.controlVolumnOut(e)}},reassignCanvas:function(){null!==g&&g.reassignCanvas()},digitalZoom:function(t){null!==g&&g.digitalZoom(t)},setDisabledAudio:function(t){t!=Ot&&(!0!==t?(Ot=!1,(r=new s.default).onmessage=$t,r&&r.postMessage(H),V=!1,wt=null):(Ot=!0,m&&(m.terminate(),m=null),r&&(r.terminate(),r=null)))},playbackSpeed:function(t){ht=t,g.setFrameInterval(ht)},timeStamp:function(t){k&&k(t)},initVideo:function(t){ee(t)},setFpsFrame:function(t){Dt=0},setCheckDelay:function(t){G=t},initStartTime:function(){Tt||(n.postMessage({type:"initStartTime"}),g.stopRendering(),g.startRendering())},terminate:function(){"backup"!==K&&(n&&(n.terminate(),n=null),r&&(r.terminate(),r=null)),p&&p.terminate(),y&&(y.terminate(),y=null),g&&g.terminate(),m&&m.terminate(),tt&&tt.terminate(),_t&&(_t=null),Et&&(Et=null),xt&&(xt=null),g=null},postRtspOver:function(){n&&n.postMessage({type:"end"}),m&&m.setRtspOver()},pause:function(){tt&&tt.pause(),n&&g.pause()},play:function(){tt&&tt.play(),n&&g.play()},setLessRate:function(t){jt=t},playNextFrame:function(){tt?tt.playNextFrame():n&&g.playNextFrame()},getVideoBufferQueueSize:function(){return tt?tt.getVideoBufferQueueSize():n?g.getVideoBufferQueueSize():void 0},getCurFrameInfo:function(){return tt?tt.getCurFrameInfo():n?g.getCurFrameInfo():void 0},sendBufferToAudioWorker:function(t){$t(t={type:"message",data:{codec:"AAC",data:t,type:"render"}})}};i.PLAYER_STATE_CODE.LIMIT_SPEED;function Kt(t){var e,r,a=t.data;switch(a.type){case"WorkerReady":++Ut>=2&&_t?_t():++zt>=1&&Et&&Et(),1==Ut&&!0===Ot&&_t();break;case"canvasRender":re(0,"currentTime"),e=a.data,r=a.option,null!==e&&null!==g&&((r=r||{}).quality=Ht,"mjpeg"===L.codecType?g.drawMJPEG(e,L.width,L.height,L.codecType,L.frameType,L.timeStamp,L.frameIndex,r):g.draw(e,L.width,L.height,L.codecType,L.frameType,L.timeStamp,L.frameIndex,r));break;case"initSegment":et=a.data,null===Bt&&(Bt=!0===Pt&&12===Mt?new c.default(i.commonOption.VIDEOENCODETYPE.H265):new c.default(i.commonOption.VIDEOENCODETYPE.H264)),ne();break;case"mediaSample":null===rt.samples&&(rt.samples=new Array(dt)),null===a.data.frame_time_stamp&&(a.data.frameDuration=Math.round(yt/W)),1!==ht&&(a.data.frameDuration=yt/Math.abs(ht)),rt.samples[it++]=a.data,gt+=a.data.frameDuration,mt+=a.data.frameDuration;break;case"videoRender":var o=new Uint8Array(a.data.length+at);if(0!==at&&o.set(ot),o.set(a.data,at),at=(ot=o).length,it%dt===0&&0!==it){if(null!==rt.samples[0].frameDuration?(rt.baseMediaDecodeTime=1===st?0:vt,vt=gt):rt.baseMediaDecodeTime=Math.round(yt/W)*dt*(st-1),"chrome"==F&&1===ht)for(var s=rt.samples.length,u=mt/dt,l=0;l<s;l++)rt.samples[l].frameDuration=u;mt=0,nt=Bt.mediaSegment(st,rt,ot,rt.baseMediaDecodeTime),st++,it=0,ot=null,at=0,null!==tt?tt.setMediaSegment(nt,L.frameIndex):!1===pt&&ne(),null!==g&&g.stopRendering()}break;case"mediasegmentData":tt.setMediaSegment(a.data),!1===pt&&ne();break;case"videoInfo":L=a.data,0===Dt&&(Dt=performance.now(),"canvas"===X&&k(L.timeStamp));break;case"time":break;case"videoTimeStamp":lt=a.data,null!==tt&&null!==lt&&(tt.setvideoTimeStamp(lt),k(lt));break;case"firstFrame":g&&(g.startRendering(),"undefined"!==typeof g.setFPS&&g.setFPS(W));break;case"drop":break;case"codecInfo":ut=a.data,null!==tt&&tt.setCodecInfo(ut);break;case"stepPlay":switch(a.data){case"needBuffering":D("request",Z);break;case"BufferFull":D("complete"),At&&(n.postMessage({type:"stepPlay",data:"findIFrame"}),g.startRendering(),At=!1)}break;case"setVideoTagMode":Gt.prototype.setLiveMode(a.data);break;case"playbackFlag":!0===a.data?It.type="playback":It.type="live",null!==tt&&tt.setPlaybackFlag(a.data);break;case"error":null!==E&&E(a.data);break;case"MSEResolutionChanged":A(a.data);break;case"DecodeStart":var f=a.data.width-0,h=a.data.height-0;Q.setAttribute("width",f),Q.setAttribute("height",h),Gt.prototype.setLiveMode(a.data.decodeMode),T(a.data);break;case"ivsDraw":var d=a.data.ivsDraw,p=a.data.channel;if("canvas"===X&&(void 0===L||null===L))break;if("canvas"!==X&&(void 0===lt||null===lt))break;var v="canvas"===X?L.timeStamp:lt;v=1e3*v.timestamp+v.timestamp_usec;var m="canvas"===X?v:v-parseInt(1e3*tt.getDuration());null!==M&&(B.setCallback(M),B.draw(d,m,v,p,B.wndIndex)),P&&P(a.data);break;case"end":tt&&tt.setRtspOver(),g&&g.setRtspOver()}}function $t(t){var e=t.data;switch(Nt!==e.samplingRate&&(Nt=e.samplingRate,null!=m&&m.setSamplingRate(Nt)),e.type){case"WorkerReady":++Ut>=2&&_t&&_t();break;case"AudioWorkerReady":xt&&xt();break;case"render":if(!0===$)break;Wt&&Wt(e),wt!==e.codec&&(null!==m&&(bt=m.getVolume(),St=m.getInitVideoTimeStamp(),m.terminate()),31===e.audio_type&&"edge"===F?(m=null,null!==E&&E({errorCode:i.PLAYER_STATE_CODE.UNSUPPORTED_AUDIO_FORMAT})):(m=new f.default).setSamplingRate(e.samplingRate),null!==m&&(m.setInitVideoTimeStamp(St),!0===q&&(bt=1),m.audioInit(bt)||(m=null)),wt=e.codec),null!==m&&(!0===q&&m.setBufferingFlag(),null===L||"undefined"===typeof L?m.bufferAudio(e.data,e.rtpTimeStamp,null):m.bufferAudio(e.data,e.rtpTimeStamp,L.codecType))}}function Jt(t){var e=t.data;switch(e.type){case"rtpData":S(e.data)}}function te(t){var e={type:"getRtpData",data:t};p.postMessage(e)}function ee(t){null!==tt&&(tt.close(),tt=null),dt=!1===t?ft:Math.abs(ht),rt.samples=new Array(dt),pt=!1,st=1,nt=null,it=0,ot=null,at=0}function ne(){if(pt=!0,null===tt){var t={};t.nVideoEncodeType=i.commonOption.VIDEOENCODETYPE.H264,!0===Pt&&12===Mt&&(t.nVideoEncodeType=i.commonOption.VIDEOENCODETYPE.H265),(tt=(0,u.default)(v,t)).setCodecInfo(ut),tt.setInitSegmentFunc(Qt),tt.setVideoSizeCallback(Zt),tt.setBeginDrawCallback(b),tt.init(ct),tt.setErrorCallback(E),tt.setSpeedPlay(ht),tt.setPlaybackFlag(J),tt.setFPS(W)}else tt.getVideoElement(),tt.setInitSegment();tt.setAudioStartCallback(re)}function re(t,e){null!==m&&m.setBufferingFlag(t,e)}return new Gt};e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;n(16);var r=n(70);var i=function(){this.metrics={},this._clearMetrics(),this._objpool=[]};function a(t,e){function n(t,e){n.prototype.w=t,n.prototype.h=e}return n.prototype={toString:function(){return"("+n.prototype.w+", "+n.prototype.h+")"},getHalfSize:function(){return new a(n.prototype.w>>>1,n.prototype.h>>>1)},length:function(){return n.prototype.w*n.prototype.h}},new n(t,e)}i.prototype.alloc=function(){var t=null;return 0===this._objpool.length?(t=new Image,this.metrics.totalalloc++):(t=this._objpool.pop(),this.metrics.totalfree--),t},i.prototype.free=function(t){t.length>0&&(this._objpool.push(t),this.metrics.totalfree++)},i.prototype.collect=function(t){this._objpool=[];var e=this.metrics.totalalloc-this.metrics.totalfree;this._clearMetrics(e)},i.prototype._clearMetrics=function(t){this.metrics.totalalloc=t||0,this.metrics.totalfree=0};var o=function(t,e,n,o){var s=e,u=o,c=t,l=n,f=null,h=null,d=null,p=null,v=null,g=null,m=null,y=null,w=0,b=null,S=0,D=0,_=0,x=0,E=new i,T=null,k="",I=!1,A=16.7,R=0,M=!1,C={},P=[],O="png",B=1,F=function(t,e,n,r,i,a,o,s){for(var u in function(t){this.buffer=t,this.previous=null,this.next=null}.call(this,t),this.width=e,this.height=n,this.codecType=r,this.frameType=i,this.timeStamp=a,this.frameIndex=o,this.option={},s)this.option[u]=s[u]},L=null;function j(){var t=u||15;function e(){this.first=null,this.size=0}return e.prototype={enqueue:function(e,n,r,i,a,o,s,u){if(!u||253!==u.mediaType||2!==u.subMediaType){this.size>=t&&this.clear();var c=new F(e,n,r,i,a,o,s,u);if(null===this.first)this.first=c;else{for(var l=this.first;null!==l.next;)l=l.next;l.next=c}return this.size+=1,c}},dequeue:function(){var t=null;return null!==this.first&&(t=this.first,this.first=this.first.next,this.size-=1),t},clear:function(){for(var t=null;null!==this.first;)t=this.first,this.first=this.first.next,this.size-=1,t.buffer=null,t=null;this.size=0,this.first=null}},new e}function N(){p="rgb2d",g=null,L=new j,v=A,I=!1}var U=function(t,e,n){var i=new a(t,e);switch(p){case"RGB2d":f=new RGB2dCanvas(l,i,n);break;case"YUVWebGL":f=new r.YUVWebGLCanvas(l,i,n);break;case"ImageWebGL":f=new r.ImageWebGLCanvas(l,i,n);break;case"WebGL":f=new r.WebGLCanvas(l,i,n)}},z=function(t){var e=t.document,n=function(){return t.URL||t.webkitURL||t},r=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in r,a=/constructor/i.test(t.HTMLElement),o=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},u=function(t){setTimeout(function(){"string"===typeof t?n().revokeObjectURL(t):t.remove()},4e4)},c=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},l=function(e,l,f){f||(e=c(e));var h,d=this,p="application/octet-stream"===e.type,v=function(){!function(t,e,n){for(var r=(e=[].concat(e)).length;r--;){var i=t["on"+e[r]];if("function"===typeof i)try{i.call(t,n||t)}catch(t){s(t)}}}(d,"writestart progress write writeend".split(" "))};if(d.readyState=d.INIT,i)return h=n().createObjectURL(e),void setTimeout(function(){r.href=h,r.download=l,function(t){var e=new MouseEvent("click");t.dispatchEvent(e)}(r),v(),u(h),d.readyState=d.DONE});!function(){if((o||p&&a)&&t.FileReader){var r=new FileReader;return r.onloadend=function(){var e=o?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=void 0,d.readyState=d.DONE,v()},r.readAsDataURL(e),void(d.readyState=d.INIT)}h||(h=n().createObjectURL(e)),p?t.location.href=h:t.open(h,"_blank")||(t.location.href=h),d.readyState=d.DONE,v(),u(h)}()},f=l.prototype;return"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,n){return e=e||t.name||"download",n||(t=c(t)),navigator.msSaveOrOpenBlob(t,e)}:(f.readyState=f.INIT=0,f.WRITING=1,f.DONE=2,f.error=f.onwritestart=f.onprogress=f.onwrite=f.onabort=f.onerror=f.onwriteend=null,function(t,e,n){return new l(t,e||t.name||"download",n)})}(window),V=function(t){return 0==L.size&&!0===M?(s.fileOverCallback(),void N.prototype.stopRendering()):null!==(T=L.dequeue())&&null!==T.buffer&&("mjpeg"===T.codecType||T.buffer.length>0)&&("undefined"!==typeof h&&"undefined"!==typeof d&&h===T.width&&d===T.height&&g===T.codecType||(p="h264"===T.codecType||"h265"===T.codecType?"YUVWebGL":"ImageWebGL",U(T.width,T.height,T.option),"undefined"!=h&&null!=h&&0!=h||m("PlayStart"),h=T.width,d=T.height,g=T.codecType),b=T.timeStamp,s.timeStamp(b),"undefined"!==typeof f)&&(f.drawCanvas(T.buffer,T.option),l.updatedCanvas=!0,y(b),Math.abs(b.timestamp-S)>3&&s.waitingCallback(!1),C={frameIndex:T.frameIndex,option:T.option,buffer:T.buffer,timeStamp:T.timeStamp},S=b.timestamp,"mjpeg"===T.codecType?E.free(T.buffer):(delete T.buffer,T.buffer=null),T.previous=null,T.next=null,T=null,!0)},H=function t(e){if(!0===I){if(0===w||e-w<200)return 0===w&&(w=e),void(null!==L&&window.requestAnimationFrame(t));(x+=e-D)>_&&V()&&(_+=v),x>1e3&&(_=0,x=0),D=e,window.requestAnimationFrame(t)}};function W(t){for(var e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(t),i=r.byteLength,a=i%3,o=i-a,s=0,u=0;u<o;u+=3)e+=n[(16515072&(s=r[u]<<16|r[u+1]<<8|r[u+2]))>>18]+n[(258048&s)>>12]+n[(4032&s)>>6]+n[63&s];return 1===a?e+=n[(252&(s=r[o]))>>2]+n[(3&s)<<4]+"==":2===a&&(e+=n[(64512&(s=r[o]<<8|r[o+1]))>>10]+n[(1008&s)>>4]+n[(15&s)<<2]+"="),e}return N.prototype={getDrawingStrategy:function(){return p},reassignCanvas:function(){var t=$('canvas[kind-channel-id="'+c+'"]')[0];l!==t&&(h=0,d=0)},drawMJPEG:function(t,e,n,r,i,a,o,u){if(u&&u.decodeOnlyI&&!0===u.decodeOnlyI){var c="data:image/jpeg;base64,"+W(t);s.getIFrameData(c,u.channelId)}else{var l=E.alloc();l.width=e,l.height=n,l.codecType=r,l.frameType=i,l.frameIndex=o,l.time=a,l.onload=function(){null!==L&&L.enqueue(this,this.width,this.height,this.codecType,this.frameType,this.time,this.frameIndex,this.option)},l.setAttribute("src","data:image/jpeg;base64,"+W(t))}},draw:function(t,e,n,r,i,a,o,u){u.decodeOnlyI&&!0===u.decodeOnlyI?(B=Math.min(Math.max(u.quality,0),1),p="h264"===r||"h265"===r?"YUVWebGL":"ImageWebGL","undefined"!==typeof f&&null!==f&&h===e&&d===n||(U(e,n,u),h=e,d=n),f.drawCanvas(t,u),l.toBlob(function(t){var e=URL.createObjectURL(t);s.getIFrameData(e,u.channelId)},"image/jpeg",B)):null!==L&&(document.hidden&&L.size>=15?L.clear():L.enqueue(t,e,n,r,i,a,o,u))},capture:function(t,e){k=t,P=e.ivsCanvasArr,f.drawCanvas(C.buffer,C.option),function(t,e){var n=l.width,r=l.height,i=document.createElement("canvas");i.width=n,i.height=r;for(var a=i.getContext("2d"),o=0;o<t.length;o++)a.drawImage(t[o],0,0,n,r);for(var s=i.toDataURL(),u=atob(s.substring("data:image/png;base64,".length)),c=new Uint8Array(u.length),f=0,h=u.length;f<h;++f)c[f]=u.charCodeAt(f);var d=new Blob([c.buffer],{type:"image/png"});z(d,e+".png")}([l].concat(P),k)},getCapture:function(t,e){return B=e||1,O="png","jpg"!==t&&"jpeg"!==t||(O="jpeg"),f.drawCanvas(C.buffer,C.option),l.updatedCanvas=!0,l.toDataURL("image/"+O,B)||""},digitalZoom:function(t){"undefined"!==typeof f&&null!==f&&f.updateVertexArray(t)},setResizeCallback:function(t){},getCodecType:function(){return g},getFrameTimestamp:function(){return b},initStartTime:function(){0===w&&window.requestAnimationFrame(H)},startRendering:function(){0===w&&(I=!0,window.requestAnimationFrame(H))},pause:function(){I=!1},play:function(){I=!0},stopRendering:function(){I=!1,w=0},setFPS:function(t){"undefined"===typeof t?v=A:0===t?v=A:v=1e3/t,R=v},setFrameInterval:function(t){v=t*R},getCanvas:function(){return l},renewCanvas:function(){U(h,d),"undefined"!==typeof f&&null!==f&&f.initCanvas()},setBeginDrawCallback:function(t){m=t},setupdateCanvasCallback:function(t){y=t},terminate:function(){w=0,b=null,null!==L&&(L.clear(),L=null),f&&f.clearCanvas(),f=null,M=!1},setRtspOver:function(){M=!0},playNextFrame:V,getVideoBufferQueueSize:function(){return L.size},getCurFrameInfo:function(){return C}},new N};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.$V=e.$P=e.$M=e.$L=void 0,e.Matrix=a;var r=1e-6;function i(){}function a(){}function o(){}function s(){}i.prototype={e:function(t){return t<1||t>this.elements.length?null:this.elements[t-1]},dimensions:function(){return this.elements.length},modulus:function(){return Math.sqrt(this.dot(this))},eql:function(t){var e=this.elements.length,n=t.elements||t;if(e!=n.length)return!1;do{if(Math.abs(this.elements[e-1]-n[e-1])>r)return!1}while(--e);return!0},dup:function(){return i.create(this.elements)},map:function(t){var e=[];return this.each(function(n,r){e.push(t(n,r))}),i.create(e)},each:function(t){var e,n=this.elements.length,r=n;do{e=r-n,t(this.elements[e],e+1)}while(--n)},toUnitVector:function(){var t=this.modulus();return 0===t?this.dup():this.map(function(e){return e/t})},angleFrom:function(t){var e=t.elements||t,n=this.elements.length;if(n!=e.length)return null;var r=0,i=0,a=0;if(this.each(function(t,n){r+=t*e[n-1],i+=t*t,a+=e[n-1]*e[n-1]}),i=Math.sqrt(i),a=Math.sqrt(a),i*a===0)return null;var o=r/(i*a);return o<-1&&(o=-1),o>1&&(o=1),Math.acos(o)},isParallelTo:function(t){var e=this.angleFrom(t);return null===e?null:e<=r},isAntiparallelTo:function(t){var e=this.angleFrom(t);return null===e?null:Math.abs(e-Math.PI)<=r},isPerpendicularTo:function(t){var e=this.dot(t);return null===e?null:Math.abs(e)<=r},add:function(t){var e=t.elements||t;return this.elements.length!=e.length?null:this.map(function(t,n){return t+e[n-1]})},subtract:function(t){var e=t.elements||t;return this.elements.length!=e.length?null:this.map(function(t,n){return t-e[n-1]})},multiply:function(t){return this.map(function(e){return e*t})},x:function(t){return this.multiply(t)},dot:function(t){var e=t.elements||t,n=0,r=this.elements.length;if(r!=e.length)return null;do{n+=this.elements[r-1]*e[r-1]}while(--r);return n},cross:function(t){var e=t.elements||t;if(3!=this.elements.length||3!=e.length)return null;var n=this.elements;return i.create([n[1]*e[2]-n[2]*e[1],n[2]*e[0]-n[0]*e[2],n[0]*e[1]-n[1]*e[0]])},max:function(){var t,e=0,n=this.elements.length,r=n;do{t=r-n,Math.abs(this.elements[t])>Math.abs(e)&&(e=this.elements[t])}while(--n);return e},indexOf:function(t){var e,n=null,r=this.elements.length,i=r;do{e=i-r,null===n&&this.elements[e]==t&&(n=e+1)}while(--r);return n},toDiagonalMatrix:function(){return a.Diagonal(this.elements)},round:function(){return this.map(function(t){return Math.round(t)})},snapTo:function(t){return this.map(function(e){return Math.abs(e-t)<=r?t:e})},distanceFrom:function(t){if(t.anchor)return t.distanceFrom(this);var e=t.elements||t;if(e.length!=this.elements.length)return null;var n,r=0;return this.each(function(t,i){n=t-e[i-1],r+=n*n}),Math.sqrt(r)},liesOn:function(t){return t.contains(this)},liesIn:function(t){return t.contains(this)},rotate:function(t,e){var n,r,o,s,u;switch(this.elements.length){case 2:return 2!=(n=e.elements||e).length?null:(r=a.Rotation(t).elements,o=this.elements[0]-n[0],s=this.elements[1]-n[1],i.create([n[0]+r[0][0]*o+r[0][1]*s,n[1]+r[1][0]*o+r[1][1]*s]));case 3:if(!e.direction)return null;var c=e.pointClosestTo(this).elements;return r=a.Rotation(t,e.direction).elements,o=this.elements[0]-c[0],s=this.elements[1]-c[1],u=this.elements[2]-c[2],i.create([c[0]+r[0][0]*o+r[0][1]*s+r[0][2]*u,c[1]+r[1][0]*o+r[1][1]*s+r[1][2]*u,c[2]+r[2][0]*o+r[2][1]*s+r[2][2]*u]);default:return null}},reflectionIn:function(t){if(t.anchor){var e=this.elements.slice(),n=t.pointClosestTo(e).elements;return i.create([n[0]+(n[0]-e[0]),n[1]+(n[1]-e[1]),n[2]+(n[2]-(e[2]||0))])}var r=t.elements||t;return this.elements.length!=r.length?null:this.map(function(t,e){return r[e-1]+(r[e-1]-t)})},to3D:function(){var t=this.dup();switch(t.elements.length){case 3:break;case 2:t.elements.push(0);break;default:return null}return t},inspect:function(){return"["+this.elements.join(", ")+"]"},setElements:function(t){return this.elements=(t.elements||t).slice(),this}},i.create=function(t){return(new i).setElements(t)},i.i=i.create([1,0,0]),i.j=i.create([0,1,0]),i.k=i.create([0,0,1]),i.Random=function(t){var e=[];do{e.push(Math.random())}while(--t);return i.create(e)},i.Zero=function(t){var e=[];do{e.push(0)}while(--t);return i.create(e)},a.prototype={e:function(t,e){return t<1||t>this.elements.length||e<1||e>this.elements[0].length?null:this.elements[t-1][e-1]},row:function(t){return t>this.elements.length?null:i.create(this.elements[t-1])},col:function(t){if(t>this.elements[0].length)return null;var e,n=[],r=this.elements.length,a=r;do{e=a-r,n.push(this.elements[e][t-1])}while(--r);return i.create(n)},dimensions:function(){return{rows:this.elements.length,cols:this.elements[0].length}},rows:function(){return this.elements.length},cols:function(){return this.elements[0].length},eql:function(t){var e=t.elements||t;if("undefined"==typeof e[0][0]&&(e=a.create(e).elements),this.elements.length!=e.length||this.elements[0].length!=e[0].length)return!1;var n,i,o,s=this.elements.length,u=s,c=this.elements[0].length;do{n=u-s,i=c;do{if(o=c-i,Math.abs(this.elements[n][o]-e[n][o])>r)return!1}while(--i)}while(--s);return!0},dup:function(){return a.create(this.elements)},map:function(t){var e,n,r,i=[],o=this.elements.length,s=o,u=this.elements[0].length;do{n=u,i[e=s-o]=[];do{r=u-n,i[e][r]=t(this.elements[e][r],e+1,r+1)}while(--n)}while(--o);return a.create(i)},isSameSizeAs:function(t){var e=t.elements||t;return"undefined"==typeof e[0][0]&&(e=a.create(e).elements),this.elements.length==e.length&&this.elements[0].length==e[0].length},add:function(t){var e=t.elements||t;return"undefined"==typeof e[0][0]&&(e=a.create(e).elements),this.isSameSizeAs(e)?this.map(function(t,n,r){return t+e[n-1][r-1]}):null},subtract:function(t){var e=t.elements||t;return"undefined"==typeof e[0][0]&&(e=a.create(e).elements),this.isSameSizeAs(e)?this.map(function(t,n,r){return t-e[n-1][r-1]}):null},canMultiplyFromLeft:function(t){var e=t.elements||t;return"undefined"==typeof e[0][0]&&(e=a.create(e).elements),this.elements[0].length==e.length},multiply:function(t){if(!t.elements)return this.map(function(e){return e*t});var e=!!t.modulus;if("undefined"==typeof(p=t.elements||t)[0][0]&&(p=a.create(p).elements),!this.canMultiplyFromLeft(p))return null;var n,r,i,o,s,u,c=this.elements.length,l=c,f=p[0].length,h=this.elements[0].length,d=[];do{d[n=l-c]=[],r=f;do{i=f-r,o=0,s=h;do{u=h-s,o+=this.elements[n][u]*p[u][i]}while(--s);d[n][i]=o}while(--r)}while(--c);var p=a.create(d);return e?p.col(1):p},x:function(t){return this.multiply(t)},minor:function(t,e,n,r){var i,o,s,u=[],c=n,l=this.elements.length,f=this.elements[0].length;do{u[i=n-c]=[],o=r;do{s=r-o,u[i][s]=this.elements[(t+i-1)%l][(e+s-1)%f]}while(--o)}while(--c);return a.create(u)},transpose:function(){var t,e,n,r=this.elements.length,i=this.elements[0].length,o=[],s=i;do{o[t=i-s]=[],e=r;do{n=r-e,o[t][n]=this.elements[n][t]}while(--e)}while(--s);return a.create(o)},isSquare:function(){return this.elements.length==this.elements[0].length},max:function(){var t,e,n,r=0,i=this.elements.length,a=i,o=this.elements[0].length;do{t=a-i,e=o;do{n=o-e,Math.abs(this.elements[t][n])>Math.abs(r)&&(r=this.elements[t][n])}while(--e)}while(--i);return r},indexOf:function(t){var e,n,r,i=this.elements.length,a=i,o=this.elements[0].length;do{e=a-i,n=o;do{if(r=o-n,this.elements[e][r]==t)return{i:e+1,j:r+1}}while(--n)}while(--i);return null},diagonal:function(){if(!this.isSquare)return null;var t,e=[],n=this.elements.length,r=n;do{t=r-n,e.push(this.elements[t][t])}while(--n);return i.create(e)},toRightTriangular:function(){var t,e,n,r,i=this.dup(),a=this.elements.length,o=a,s=this.elements[0].length;do{if(e=o-a,0==i.elements[e][e])for(j=e+1;j<o;j++)if(0!=i.elements[j][e]){t=[],n=s;do{r=s-n,t.push(i.elements[e][r]+i.elements[j][r])}while(--n);i.elements[e]=t;break}if(0!=i.elements[e][e])for(j=e+1;j<o;j++){var u=i.elements[j][e]/i.elements[e][e];t=[],n=s;do{r=s-n,t.push(r<=e?0:i.elements[j][r]-i.elements[e][r]*u)}while(--n);i.elements[j]=t}}while(--a);return i},toUpperTriangular:function(){return this.toRightTriangular()},determinant:function(){if(!this.isSquare())return null;var t,e=this.toRightTriangular(),n=e.elements[0][0],r=e.elements.length-1,i=r;do{t=i-r+1,n*=e.elements[t][t]}while(--r);return n},det:function(){return this.determinant()},isSingular:function(){return this.isSquare()&&0===this.determinant()},trace:function(){if(!this.isSquare())return null;var t,e=this.elements[0][0],n=this.elements.length-1,r=n;do{t=r-n+1,e+=this.elements[t][t]}while(--n);return e},tr:function(){return this.trace()},rank:function(){var t,e,n,i=this.toRightTriangular(),a=0,o=this.elements.length,s=o,u=this.elements[0].length;do{t=s-o,e=u;do{if(n=u-e,Math.abs(i.elements[t][n])>r){a++;break}}while(--e)}while(--o);return a},rk:function(){return this.rank()},augment:function(t){var e=t.elements||t;"undefined"==typeof e[0][0]&&(e=a.create(e).elements);var n,r,i,o=this.dup(),s=o.elements[0].length,u=o.elements.length,c=u,l=e[0].length;if(u!=e.length)return null;do{n=c-u,r=l;do{i=l-r,o.elements[n][s+i]=e[n][i]}while(--r)}while(--u);return o},inverse:function(){if(!this.isSquare()||this.isSingular())return null;var t,e,n,r,i,o,s,u=this.elements.length,c=u,l=this.augment(a.I(u)).toRightTriangular(),f=l.elements[0].length,h=[];do{i=[],n=f,h[t=u-1]=[],o=l.elements[t][t];do{r=f-n,s=l.elements[t][r]/o,i.push(s),r>=c&&h[t].push(s)}while(--n);for(l.elements[t]=i,e=0;e<t;e++){i=[],n=f;do{r=f-n,i.push(l.elements[e][r]-l.elements[t][r]*l.elements[e][t])}while(--n);l.elements[e]=i}}while(--u);return a.create(h)},inv:function(){return this.inverse()},round:function(){return this.map(function(t){return Math.round(t)})},snapTo:function(t){return this.map(function(e){return Math.abs(e-t)<=r?t:e})},inspect:function(){var t,e=[],n=this.elements.length,r=n;do{t=r-n,e.push(i.create(this.elements[t]).inspect())}while(--n);return e.join("\n")},setElements:function(t){var e,n=t.elements||t;if("undefined"!=typeof n[0][0]){var r,i,a,o=n.length,s=o;this.elements=[];do{i=r=n[e=s-o].length,this.elements[e]=[];do{a=i-r,this.elements[e][a]=n[e][a]}while(--r)}while(--o);return this}var u=n.length,c=u;this.elements=[];do{e=c-u,this.elements.push([n[e]])}while(--u);return this}},a.create=function(t){return(new a).setElements(t)},a.I=function(t){var e,n,r,i=[],o=t;do{i[e=o-t]=[],n=o;do{r=o-n,i[e][r]=e==r?1:0}while(--n)}while(--t);return a.create(i)},a.Diagonal=function(t){var e,n=t.length,r=n,i=a.I(n);do{e=r-n,i.elements[e][e]=t[e]}while(--n);return i},a.Rotation=function(t,e){if(!e)return a.create([[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]]);var n=e.dup();if(3!=n.elements.length)return null;var r=n.modulus(),i=n.elements[0]/r,o=n.elements[1]/r,s=n.elements[2]/r,u=Math.sin(t),c=Math.cos(t),l=1-c;return a.create([[l*i*i+c,l*i*o-u*s,l*i*s+u*o],[l*i*o+u*s,l*o*o+c,l*o*s-u*i],[l*i*s-u*o,l*o*s+u*i,l*s*s+c]])},a.RotationX=function(t){var e=Math.cos(t),n=Math.sin(t);return a.create([[1,0,0],[0,e,-n],[0,n,e]])},a.RotationY=function(t){var e=Math.cos(t),n=Math.sin(t);return a.create([[e,0,n],[0,1,0],[-n,0,e]])},a.RotationZ=function(t){var e=Math.cos(t),n=Math.sin(t);return a.create([[e,-n,0],[n,e,0],[0,0,1]])},a.Random=function(t,e){return a.Zero(t,e).map(function(){return Math.random()})},a.Zero=function(t,e){var n,r,i,o=[],s=t;do{o[n=t-s]=[],r=e;do{i=e-r,o[n][i]=0}while(--r)}while(--s);return a.create(o)},o.prototype={eql:function(t){return this.isParallelTo(t)&&this.contains(t.anchor)},dup:function(){return o.create(this.anchor,this.direction)},translate:function(t){var e=t.elements||t;return o.create([this.anchor.elements[0]+e[0],this.anchor.elements[1]+e[1],this.anchor.elements[2]+(e[2]||0)],this.direction)},isParallelTo:function(t){if(t.normal)return t.isParallelTo(this);var e=this.direction.angleFrom(t.direction);return Math.abs(e)<=r||Math.abs(e-Math.PI)<=r},distanceFrom:function(t){if(t.normal)return t.distanceFrom(this);if(t.direction){if(this.isParallelTo(t))return this.distanceFrom(t.anchor);var e=this.direction.cross(t.direction).toUnitVector().elements,n=this.anchor.elements,r=t.anchor.elements;return Math.abs((n[0]-r[0])*e[0]+(n[1]-r[1])*e[1]+(n[2]-r[2])*e[2])}var i=t.elements||t,a=(n=this.anchor.elements,this.direction.elements),o=i[0]-n[0],s=i[1]-n[1],u=(i[2]||0)-n[2],c=Math.sqrt(o*o+s*s+u*u);if(0===c)return 0;var l=(o*a[0]+s*a[1]+u*a[2])/c,f=1-l*l;return Math.abs(c*Math.sqrt(f<0?0:f))},contains:function(t){var e=this.distanceFrom(t);return null!==e&&e<=r},liesIn:function(t){return t.contains(this)},intersects:function(t){return t.normal?t.intersects(this):!this.isParallelTo(t)&&this.distanceFrom(t)<=r},intersectionWith:function(t){if(t.normal)return t.intersectionWith(this);if(!this.intersects(t))return null;var e=this.anchor.elements,n=this.direction.elements,r=t.anchor.elements,a=t.direction.elements,o=n[0],s=n[1],u=n[2],c=a[0],l=a[1],f=a[2],h=e[0]-r[0],d=e[1]-r[1],p=e[2]-r[2],v=c*c+l*l+f*f,g=o*c+s*l+u*f,m=((-o*h-s*d-u*p)*v/(o*o+s*s+u*u)+g*(c*h+l*d+f*p))/(v-g*g);return i.create([e[0]+m*o,e[1]+m*s,e[2]+m*u])},pointClosestTo:function(t){if(t.direction){if(this.intersects(t))return this.intersectionWith(t);if(this.isParallelTo(t))return null;var e=this.direction.elements,n=t.direction.elements,r=e[0],a=e[1],o=e[2],u=n[0],c=n[1],l=n[2],f=o*u-r*l,h=r*c-a*u,d=a*l-o*c,p=i.create([f*l-h*c,h*u-d*l,d*c-f*u]);return(v=s.create(t.anchor,p)).intersectionWith(this)}var v=t.elements||t;if(this.contains(v))return i.create(v);var g=this.anchor.elements,m=(r=(e=this.direction.elements)[0],a=e[1],o=e[2],g[0]),y=g[1],w=g[2],b=(f=r*(v[1]-y)-a*(v[0]-m),h=a*((v[2]||0)-w)-o*(v[1]-y),d=o*(v[0]-m)-r*((v[2]||0)-w),i.create([a*f-o*d,o*h-r*f,r*d-a*h])),S=this.distanceFrom(v)/b.modulus();return i.create([v[0]+b.elements[0]*S,v[1]+b.elements[1]*S,(v[2]||0)+b.elements[2]*S])},rotate:function(t,e){"undefined"==typeof e.direction&&(e=o.create(e.to3D(),i.k));var n=a.Rotation(t,e.direction).elements,r=e.pointClosestTo(this.anchor).elements,s=this.anchor.elements,u=this.direction.elements,c=r[0],l=r[1],f=r[2],h=s[0]-c,d=s[1]-l,p=s[2]-f;return o.create([c+n[0][0]*h+n[0][1]*d+n[0][2]*p,l+n[1][0]*h+n[1][1]*d+n[1][2]*p,f+n[2][0]*h+n[2][1]*d+n[2][2]*p],[n[0][0]*u[0]+n[0][1]*u[1]+n[0][2]*u[2],n[1][0]*u[0]+n[1][1]*u[1]+n[1][2]*u[2],n[2][0]*u[0]+n[2][1]*u[1]+n[2][2]*u[2]])},reflectionIn:function(t){if(t.normal){var e=this.anchor.elements,n=this.direction.elements,r=e[0],i=e[1],a=e[2],s=n[0],u=n[1],c=n[2],l=this.anchor.reflectionIn(t).elements,f=r+s,h=i+u,d=a+c,p=t.pointClosestTo([f,h,d]).elements,v=[p[0]+(p[0]-f)-l[0],p[1]+(p[1]-h)-l[1],p[2]+(p[2]-d)-l[2]];return o.create(l,v)}if(t.direction)return this.rotate(Math.PI,t);var g=t.elements||t;return o.create(this.anchor.reflectionIn([g[0],g[1],g[2]||0]),this.direction)},setVectors:function(t,e){if(t=i.create(t),e=i.create(e),2==t.elements.length&&t.elements.push(0),2==e.elements.length&&e.elements.push(0),t.elements.length>3||e.elements.length>3)return null;var n=e.modulus();return 0===n?null:(this.anchor=t,this.direction=i.create([e.elements[0]/n,e.elements[1]/n,e.elements[2]/n]),this)}},o.create=function(t,e){return(new o).setVectors(t,e)},o.X=o.create(i.Zero(3),i.i),o.Y=o.create(i.Zero(3),i.j),o.Z=o.create(i.Zero(3),i.k),s.prototype={eql:function(t){return this.contains(t.anchor)&&this.isParallelTo(t)},dup:function(){return s.create(this.anchor,this.normal)},translate:function(t){var e=t.elements||t;return s.create([this.anchor.elements[0]+e[0],this.anchor.elements[1]+e[1],this.anchor.elements[2]+(e[2]||0)],this.normal)},isParallelTo:function(t){var e;return t.normal?(e=this.normal.angleFrom(t.normal),Math.abs(e)<=r||Math.abs(Math.PI-e)<=r):t.direction?this.normal.isPerpendicularTo(t.direction):null},isPerpendicularTo:function(t){var e=this.normal.angleFrom(t.normal);return Math.abs(Math.PI/2-e)<=r},distanceFrom:function(t){if(this.intersects(t)||this.contains(t))return 0;if(t.anchor){var e=this.anchor.elements,n=t.anchor.elements,r=this.normal.elements;return Math.abs((e[0]-n[0])*r[0]+(e[1]-n[1])*r[1]+(e[2]-n[2])*r[2])}var i=t.elements||t;e=this.anchor.elements,r=this.normal.elements;return Math.abs((e[0]-i[0])*r[0]+(e[1]-i[1])*r[1]+(e[2]-(i[2]||0))*r[2])},contains:function(t){if(t.normal)return null;if(t.direction)return this.contains(t.anchor)&&this.contains(t.anchor.add(t.direction));var e=t.elements||t,n=this.anchor.elements,i=this.normal.elements;return Math.abs(i[0]*(n[0]-e[0])+i[1]*(n[1]-e[1])+i[2]*(n[2]-(e[2]||0)))<=r},intersects:function(t){return"undefined"==typeof t.direction&&"undefined"==typeof t.normal?null:!this.isParallelTo(t)},intersectionWith:function(t){if(!this.intersects(t))return null;if(t.direction){var e=t.anchor.elements,n=t.direction.elements,r=this.anchor.elements,s=((c=this.normal.elements)[0]*(r[0]-e[0])+c[1]*(r[1]-e[1])+c[2]*(r[2]-e[2]))/(c[0]*n[0]+c[1]*n[1]+c[2]*n[2]);return i.create([e[0]+n[0]*s,e[1]+n[1]*s,e[2]+n[2]*s])}if(t.normal){for(var u=this.normal.cross(t.normal).toUnitVector(),c=this.normal.elements,l=(e=this.anchor.elements,t.normal.elements),f=t.anchor.elements,h=a.Zero(2,2),d=0;h.isSingular();)d++,h=a.create([[c[d%3],c[(d+1)%3]],[l[d%3],l[(d+1)%3]]]);for(var p=h.inverse().elements,v=c[0]*e[0]+c[1]*e[1]+c[2]*e[2],g=l[0]*f[0]+l[1]*f[1]+l[2]*f[2],m=[p[0][0]*v+p[0][1]*g,p[1][0]*v+p[1][1]*g],y=[],w=1;w<=3;w++)y.push(d==w?0:m[(w+(5-d)%3)%3]);return o.create(y,u)}},pointClosestTo:function(t){var e=t.elements||t,n=this.anchor.elements,r=this.normal.elements,a=(n[0]-e[0])*r[0]+(n[1]-e[1])*r[1]+(n[2]-(e[2]||0))*r[2];return i.create([e[0]+r[0]*a,e[1]+r[1]*a,(e[2]||0)+r[2]*a])},rotate:function(t,e){var n=a.Rotation(t,e.direction).elements,r=e.pointClosestTo(this.anchor).elements,i=this.anchor.elements,o=this.normal.elements,u=r[0],c=r[1],l=r[2],f=i[0]-u,h=i[1]-c,d=i[2]-l;return s.create([u+n[0][0]*f+n[0][1]*h+n[0][2]*d,c+n[1][0]*f+n[1][1]*h+n[1][2]*d,l+n[2][0]*f+n[2][1]*h+n[2][2]*d],[n[0][0]*o[0]+n[0][1]*o[1]+n[0][2]*o[2],n[1][0]*o[0]+n[1][1]*o[1]+n[1][2]*o[2],n[2][0]*o[0]+n[2][1]*o[1]+n[2][2]*o[2]])},reflectionIn:function(t){if(t.normal){var e=this.anchor.elements,n=this.normal.elements,r=e[0],i=e[1],a=e[2],o=n[0],u=n[1],c=n[2],l=this.anchor.reflectionIn(t).elements,f=r+o,h=i+u,d=a+c,p=t.pointClosestTo([f,h,d]).elements,v=[p[0]+(p[0]-f)-l[0],p[1]+(p[1]-h)-l[1],p[2]+(p[2]-d)-l[2]];return s.create(l,v)}if(t.direction)return this.rotate(Math.PI,t);var g=t.elements||t;return s.create(this.anchor.reflectionIn([g[0],g[1],g[2]||0]),this.normal)},setVectors:function(t,e,n){if(null===(t=(t=i.create(t)).to3D()))return null;if(null===(e=(e=i.create(e)).to3D()))return null;if("undefined"==typeof n)n=null;else if(null===(n=(n=i.create(n)).to3D()))return null;var r,a,o=t.elements[0],s=t.elements[1],u=t.elements[2],c=e.elements[0],l=e.elements[1],f=e.elements[2];if(null!==n){var h=n.elements[0],d=n.elements[1],p=n.elements[2];if(0===(a=(r=i.create([(l-s)*(p-u)-(f-u)*(d-s),(f-u)*(h-o)-(c-o)*(p-u),(c-o)*(d-s)-(l-s)*(h-o)])).modulus()))return null;r=i.create([r.elements[0]/a,r.elements[1]/a,r.elements[2]/a])}else{if(0===(a=Math.sqrt(c*c+l*l+f*f)))return null;r=i.create([e.elements[0]/a,e.elements[1]/a,e.elements[2]/a])}return this.anchor=t,this.normal=r,this}},a.Translation=function(t){var e;if(2===t.elements.length)return(e=a.I(3)).elements[2][0]=t.elements[0],e.elements[2][1]=t.elements[1],e;if(3===t.elements.length)return(e=a.I(4)).elements[0][3]=t.elements[0],e.elements[1][3]=t.elements[1],e.elements[2][3]=t.elements[2],e;throw"Invalid length for Translation"},a.prototype.flatten=function(){var t=[];if(0===this.elements.length)return[];for(var e=0;e<this.elements[0].length;e++)for(var n=0;n<this.elements.length;n++)t.push(this.elements[n][e]);return t},a.prototype.ensure4x4=function(){var t;if(4===this.elements.length&&4===this.elements[0].length)return this;if(this.elements.length>4||this.elements[0].length>4)return null;for(t=0;t<this.elements.length;t++)for(var e=this.elements[t].length;e<4;e++)t===e?this.elements[t].push(1):this.elements[t].push(0);for(t=this.elements.length;t<4;t++)0===t?this.elements.push([1,0,0,0]):1===t?this.elements.push([0,1,0,0]):2===t?this.elements.push([0,0,1,0]):3===t&&this.elements.push([0,0,0,1]);return this},a.prototype.make3x3=function(){return 4!==this.elements.length||4!==this.elements[0].length?null:a.create([[this.elements[0][0],this.elements[0][1],this.elements[0][2]],[this.elements[1][0],this.elements[1][1],this.elements[1][2]],[this.elements[2][0],this.elements[2][1],this.elements[2][2]]])},s.create=function(t,e,n){return(new s).setVectors(t,e,n)},s.XY=s.create(i.Zero(3),i.k),s.YZ=s.create(i.Zero(3),i.i),s.ZX=s.create(i.Zero(3),i.j),s.YX=s.XY,s.ZY=s.YZ,s.XZ=s.ZX;var u=i.create;e.$V=u;var c=a.create;e.$M=c;var l=o.create;e.$L=l;var f=s.create;e.$P=f},function(t,e){t.exports=function(){return new Worker("./module/videoWorker.worker.js")}},function(t,e){t.exports=function(){return new Worker("./module/audioWorker.worker.js")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(16);var i=function(t){var e=null,n="",i=null,a=null,o=null,s=null,u=null,c=1,l={timestamp:0,timestamp_usec:0,timezone:0},f={timestamp:0,timestamp_usec:0,timezone:0},h=null,d=!1,p=null,v=null,g=null,m=!1,y=!0,w=0,b=t,S=!1,D=[],_=.5,x=null,E=null,T=null,k=0,I=0,A=!1,R=null,M="png",C=1,P=(0,r.BrowserDetect)(),O=null,B=0,F=0,L=0,j=8,N=null,U=!1,z=!1,V=[],H=[],W={},Y=25,q=.5;function X(){}function G(){Z()}function Q(){var t=0;if(null!==p)for(t=0;t<p.length;t++)T.removeEventListener(p[t].type,p[t].function);if(null!==g)for(t=0;t<g.length;t++)E.removeEventListener(g[t].type,g[t].function);if(null!==v)for(t=0;t<v.length;t++)x.removeEventListener(v[t].type,v[t].function)}function Z(){if(null===E||"ended"===E.readyState)return function(t){(g=[]).push({type:"sourceopen",function:G}),g.push({type:"error",function:rt});for(var e=0;e<g.length;e++)t.addEventListener(g[e].type,g[e].function)}(E=new MediaSource),void(x.src=window.URL.createObjectURL(E));if(0===E.sourceBuffers.length){E.duration=0;var t=n;if(!MediaSource.isTypeSupported(t))return void(N&&N({errorCode:r.PLAYER_STATE_CODE.NOT_SUPPORT_MIME}));!function(t){(p=[]).push({type:"error",function:it}),p.push({type:"updateend",function:et}),p.push({type:"update",function:nt});for(var e=0;e<p.length;e++)t.addEventListener(p[e].type,p[e].function)}(T=E.addSourceBuffer(t))}var i=e();null!==i?T.appendBuffer(i):E.endOfStream("network")}function K(){x.paused&&(a(),m||U||x.play())}function $(){x.paused||y||x.pause()}function J(){V.length&&function(t,e){if(null!==T&&"closed"!==E.readyState&&"ended"!==E.readyState)try{if(D.length>0)return r.debug.count("1.segmentWaitDecode.length: "+D.length),D.push(t),void r.debug.count("2.segmentWaitDecode.length: "+D.length);T.updating?D.push(t):(T.appendBuffer(t),W.frameIndex=e)}catch(t){D.length=0,b.initVideo(!1),N&&N({errorCode:r.PLAYER_STATE_CODE.ADDBUFFER_ERROR})}}(V.shift(),H.shift())}function tt(){if(null!==E)try{if(T&&T.buffered.length>0&&(function(){var t=d?7200:60,e=1*T.buffered.start(T.buffered.length-1),n=1*T.buffered.end(T.buffered.length-1);n-e>t&&T.remove(e,n-10)}(),z&&!U||x.duration>q&&(x.currentTime=(x.duration-q).toFixed(3),q+=Y<10?.5:.1),x&&x.duration-x.currentTime>j&&N&&N({errorCode:r.PLAYER_STATE_CODE.TIMEOUT}),!d)){var t=1*T.buffered.start(T.buffered.length-1),e=1*T.buffered.end(T.buffered.length-1);if((0===x.currentTime?e-t:e-x.currentTime)>=_+.1){if(T.updating)return;var n=e-_;x.currentTime=n.toFixed(3)}}}catch(t){}}function et(){}function nt(){D.length>0&&(r.debug.count("1. onSourceUpdate .segmentWaitDecode.length: "+D.length),T.updating||(r.debug.count("2. onSourceUpdate .appendBuffer: "+D.length+" "+D[0].length),T.appendBuffer(D[0]),D.shift()))}function rt(){}function it(){}function at(){$(),N&&N({errorCode:r.PLAYER_STATE_CODE.MSE_ERROR})}function ot(){m=!0,y=!1,z=!0,A||(A=!0,s("PlayStart"))}function st(){m=!1,y=!0}function ut(){var t=parseInt(E.duration,10),e=parseInt(x.currentTime,10),n={timestamp:l.timestamp-c*(t-e+(1!==c?1:0)),timestamp_usec:0,timezone:l.timezone};0===e||isNaN(t)||(d&&b.waitingCallback(!1),!d&&Math.abs(t-e)>4&&1===c||x.paused||(null===h?(h=n,o(0,"currentTime")):h.timestamp<=n.timestamp&&c>=1||h.timestamp>n.timestamp&&c<1?(b.timeStamp(n),h=n,++w>4&&o(n.timestamp,"currentTime")):h.timestamp<=n.timestamp&&c<1&&(b.timeStamp(n),h=n)))}function ct(){K(),tt()}function lt(){a()}function ft(){K()}function ht(){if(S=!1,d&&m&&b.waitingCallback(!0),0==I)k=Date.now(),I++;else{I++;var t=Date.now()-k;I>=5&&t<6e4&&_<=1.8&&(_+=.1,I=0,k=0)}}function dt(){}function pt(){S=!0}function vt(){}function gt(t,e,n){for(var r=t.width,i=t.height,a=t.getContext("2d"),o=0;o<e.length;o++)a.drawImage(e[o],0,0,r,i);for(var s=t.toDataURL(),u=atob(s.substring("data:image/png;base64,".length)),c=new Uint8Array(u.length),l=0,f=u.length;l<f;++l)c[l]=u.charCodeAt(l);var h=new Blob([c.buffer],{type:"image/png"});mt(h,n+".png")}X.prototype={init:function(t){u=(0,r.BrowserDetect)(),(x=t).autoplay="safari"!==u,x.controls=!1,x.preload="auto",function(t){(v=[]).push({type:"durationchange",function:ct}),v.push({type:"playing",function:ot}),v.push({type:"error",function:at}),v.push({type:"pause",function:st}),v.push({type:"timeupdate",function:ut}),v.push({type:"resize",function:lt}),v.push({type:"seeked",function:ft}),v.push({type:"waiting",function:ht}),v.push({type:"canplaythrough",function:pt}),v.push({type:"canplay",function:dt}),v.push({type:"loadedmetadata",function:vt});for(var e=0;e<v.length;e++)t.addEventListener(v[e].type,v[e].function)}(x),Z()},setInitSegmentFunc:function(t){e=t},getVideoElement:function(){return x},setCodecInfo:function(t){n=t},setMediaSegment:function(t,e){V.push(t),H.push(e),U||J()},capture:function(t,e){R&&clearInterval(R);var n=document.createElement("canvas");n.width=x.videoWidth,n.height=x.videoHeight;var r=e.ivsCanvasArr;S||"edge"===P?(n.getContext("2d").drawImage(x,0,0,n.width,n.height),gt(n,r,t)):R=setInterval(function(){S&&(n.getContext("2d").drawImage(x,0,0,n.width,n.height),gt(n,r,t),clearInterval(R))},200)},getCapture:function(t,e){R&&clearInterval(R),C=e||1,M="png","jpg"!==t&&"jpeg"!==t||(M="jpeg");var n=document.createElement("canvas"),r=null;return n.width=x.videoWidth,n.height=x.videoHeight,S||"edge"===P?(n.getContext("2d").drawImage(x,0,0,n.width,n.height),r=n.toDataURL("image/"+M,C)):S&&(n.getContext("2d").drawImage(x,0,0,n.width,n.height),r=n.toDataURL("image/"+M,C)),r},setInitSegment:function(){Z()},setTimeStamp:function(t,e){i=t},setVideoSizeCallback:function(t){a=t},setAudioStartCallback:function(t){o=t},getPlaybackTimeStamp:function(){return i},setPlaySpeed:function(t){c!=t&&(c=t,x.playbackRate=t)},setSpeedPlay:function(t){c=t},setvideoTimeStamp:function(t){var e=Math.abs(l.timestamp-t.timestamp)>3;0===f.timestamp&&b.timeStamp(t),!0===e&&(w=0,o((f=t).timestamp,"init"),0!==l.timestamp&&d&&(x.currentTime=E.duration-.1,b.waitingCallback(!1)),h=null),l=t},pause:function(){U=!0,$()},play:function(){U=!1},setPlaybackFlag:function(t){d=t},setTimeStampInit:function(){h=null,f={timestamp:0,timestamp_usec:0,timezone:0}},close:function(){Q(),$()},setBeginDrawCallback:function(t){s=t},setErrorCallback:function(t){N=t},terminate:function(){null!==x&&(Q(),"open"===E.readyState&&(T&&E.removeSourceBuffer(T),E.endOfStream()),x.src="",T=null,E=null,x=null,R&&(clearInterval(R),R=null),O&&(clearInterval(O),O=null),L=0,F=0,B=0)},getDuration:function(){return x.duration-x.currentTime},setFPS:function(t){t&&(_=(Y=t)<5?2:Y>=5&&Y<=9?1:Y>9&&Y<15?.8:.5)},setRtspOver:function(){x.duration.toFixed(4)-0===x.currentTime.toFixed(4)-0?(b.timeStamp(l),b.fileOverCallback()):(B=parseInt(x.currentTime),F=parseInt(x.duration),O=setInterval(function(){B===parseInt(x.currentTime)&&F===parseInt(x.duration)?L++>10&&(O&&clearInterval(O),O=null,b.timeStamp(l),b.fileOverCallback()):parseInt(x.currentTime)>=parseInt(x.duration)?(O&&clearInterval(O),O=null,b.timeStamp(l),b.fileOverCallback()):(B=parseInt(x.currentTime),F=parseInt(x.duration),L=0)},150))},getVideoBufferQueueSize:function(){return V.length},playNextFrame:function(){J()},getCurFrameInfo:function(){return W.src=function(){var t=document.createElement("canvas");return t.width=x.videoWidth,t.height=x.videoHeight,t.getContext("2d").drawImage(x,0,0,t.width,t.height),t.toDataURL()}(),W}};var mt=function(t){var e=t.document,n=function(){return t.URL||t.webkitURL||t},r=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in r,a=/constructor/i.test(t.HTMLElement),o=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},u=function(t){setTimeout(function(){"string"===typeof t?n().revokeObjectURL(t):t.remove()},4e4)},c=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},l=function(e,l,f){f||(e=c(e));var h,d=this,p="application/octet-stream"===e.type,v=function(){!function(t,e,n){for(var r=(e=[].concat(e)).length;r--;){var i=t["on"+e[r]];if("function"===typeof i)try{i.call(t,n||t)}catch(t){s(t)}}}(d,"writestart progress write writeend".split(" "))};if(d.readyState=d.INIT,i)return h=n().createObjectURL(e),void setTimeout(function(){r.href=h,r.download=l,function(t){var e=new MouseEvent("click");t.dispatchEvent(e)}(r),v(),u(h),d.readyState=d.DONE});!function(){if((o||p&&a)&&t.FileReader){var r=new FileReader;return r.onloadend=function(){var e=o?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=void 0,d.readyState=d.DONE,v()},r.readAsDataURL(e),void(d.readyState=d.INIT)}h||(h=n().createObjectURL(e)),p?t.location.href=h:t.open(h,"_blank")||(t.location.href=h),d.readyState=d.DONE,v(),u(h)}()},f=l.prototype;return"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,n){return e=e||t.name||"download",n||(t=c(t)),navigator.msSaveOrOpenBlob(t,e)}:(f.readyState=f.INIT=0,f.WRITING=1,f.DONE=2,f.error=f.onwritestart=f.onprogress=f.onwrite=f.onabort=f.onerror=f.onwriteend=null,function(t,e,n){return new l(t,e||t.name||"download",n)})}(window);return new X};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(16),i=function(t){var e=[],n={},i=t||r.commonOption.VIDEOENCODETYPE.H264;function a(){for(var t in e)e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)];r.commonOption.VIDEOENCODETYPE.H264===i?n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]):r.commonOption.VIDEOENCODETYPE.H265===i&&(n.FTYP=new Uint8Array([105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,97,118,99,49,109,112,52,49])),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.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]),n.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]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}e={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],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:[],hev1:[],hvcC:[]};var o=function(t){for(var e=8,n=Array.prototype.slice.call(arguments,1),r=0;r<n.length;r++)e+=n[r].byteLength;var i=new Uint8Array(e),a=0;for(i[a++]=e>>>24&255,i[a++]=e>>>16&255,i[a++]=e>>>8&255,i[a++]=255&e,i.set(t,a),a+=4,r=0;r<n.length;r++)i.set(n[r],a),a+=n[r].byteLength;return i},s=function(t){return o(e.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),function(t){var n=t.config,r=n.length,i=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(n).concat([6,1,2]));return o(e.esds,i)}(t))},u=function(t){return"audio"===t.type?o(e.stsd,n.STSD_PREFIX,s(t)):o(e.stsd,n.STSD_PREFIX,function(t){var n=t.sps||[],a=t.pps||[],s=[],u=[],c=[],l=t.vps||[],f=0;for(f=0;f<l.length;f++)c.push((65280&l[f].byteLength)>>>8),c.push(255&l[f].byteLength),c=c.concat(Array.prototype.slice.call(l[f]));for(f=0;f<n.length;f++)s.push((65280&n[f].byteLength)>>>8),s.push(255&n[f].byteLength),s=s.concat(Array.prototype.slice.call(n[f]));for(f=0;f<a.length;f++)u.push((65280&a[f].byteLength)>>>8),u.push(255&a[f].byteLength),u=u.concat(Array.prototype.slice.call(a[f]));return r.commonOption.VIDEOENCODETYPE.H264===i?o(e.avc1,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,(65280&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,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,0,0,0,0,0,24,17,17]),o(e.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([n.length]).concat(s).concat([a.length]).concat(u)))):r.commonOption.VIDEOENCODETYPE.H265===i?o(e.hev1,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,(65280&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,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,0,0,0,0,0,24,17,17]),o(e.hvcC,new Uint8Array([1,t.general_profile_flag,(4278190080&t.general_profile_compatibility_flags)>>>24,(16711680&t.general_profile_compatibility_flags)>>>16,(65280&t.general_profile_compatibility_flags)>>>8,255&t.general_profile_compatibility_flags,(0xff0000000000&t.general_constraint_indicator_flags)>>>40,(0xff00000000&t.general_constraint_indicator_flags)>>>32,(4278190080&t.general_constraint_indicator_flags)>>>24,(16711680&t.general_constraint_indicator_flags)>>>16,(65280&t.general_constraint_indicator_flags)>>>8,255&t.general_constraint_indicator_flags,t.general_level_idc,240,0,252,252|t.chroma_format_idc,248|t.bitDepthLumaMinus8,248|t.bitDepthChromaMinus8,0,0,t.rate_layers_nested_length,3].concat([32,0,1]).concat(c).concat([33,0,1]).concat(s).concat([34,0,1]).concat(u)))):void 0}(t))},c=function(t){var r=null;return r="audio"===t.type?o(e.smhd,n.SMHD):o(e.vmhd,n.VMHD),o(e.minf,r,o(e.dinf,o(e.dref,n.DREF)),function(t){return o(e.stbl,u(t),o(e.stts,n.STTS),o(e.stsc,n.STSC),o(e.stsz,n.STSZ),o(e.stco,n.STCO))}(t))},l=function(t){return o(e.mdia,function(t){var n=t.timescale,r=t.duration;return o(e.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))}(t),function(t){var r=null;return r="audio"===t.type?n.HDLR_AUDIO:n.HDLR_VIDEO,o(e.hdlr,r)}(t),c(t))},f=function(t){return o(e.trak,function(t){var n=t.id,r=t.duration,i=t.width,a=t.height;return o(e.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,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,i>>>8&255,255&i,0,0,a>>>8&255,255&a,0,0]))}(t),l(t))},h=function(t){return o(e.mvex,function(t){var n=t.id,r=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return o(e.trex,r)}(t))},d=function(t){var n,r,i=(n=t.timescale,r=t.duration,o(e.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,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]))),a=f(t),s=h(t);return o(e.moov,i,a,s)},p=function(t,n){return"audio"===t.type?audioTrun(t,n):function(t,n){var r,i=null,a=null,s=0,u=n;if(null===(r=t.samples||[])[0].frameDuration)for(u+=24+4*r.length,i=trunHeader(r,u),s=0;s<r.length;s++)a=r[s],i=i.concat([(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size]);else for(i=function(t,e){return[0,0,3,5,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e,0,0,0,0]}(r,u+=24+4*r.length+4*r.length),s=0;s<r.length;s++)a=r[s],i=i.concat([(4278190080&a.frameDuration)>>>24,(16711680&a.frameDuration)>>>16,(65280&a.frameDuration)>>>8,255&a.frameDuration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size]);return o(e.trun,new Uint8Array(i))}(t,n)},v=function(t,n){return o(e.moof,function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return o(e.mfhd,n)}(t),function(t){var n,r,i;return n=o(e.tfhd,new Uint8Array([0,2,0,0,0,0,0,1])),r=o(e.tfdt,new Uint8Array([0,0,0,0,t.baseMediaDecodeTime>>>24&255,t.baseMediaDecodeTime>>>16&255,t.baseMediaDecodeTime>>>8&255,255&t.baseMediaDecodeTime])),i=p(t,72),o(e.traf,n,r,i)}(n))};return a.prototype={initSegment:function(t){var r=o(e.ftyp,n.FTYP),i=d(t),a=new Uint8Array(r.byteLength+i.byteLength);return a.set(r,0),a.set(i,r.byteLength),a},mediaSegment:function(t,n,r,i){var a=v(t,n),s=function(t){return o(e.mdat,t)}(r),u=null;return(u=new Uint8Array(a.byteLength+s.byteLength)).set(a),u.set(s,a.byteLength),u}},new a};e.default=i},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(17));n(16);var a=function(){var t={},e=null,n=o(),r=o();function a(t,e){this.data=t,this.timeStamp=e,this.next=null}function o(){function t(){this.first=null,this.size=0}return t.prototype={enqueue:function(t){if(null===this.first)this.first=t;else{for(var e=this.first;null!==e.next;)e=e.next;e.next=t}this.size+=1},dequeue:function(){var t=null;return null!==this.first&&(t=this.first,this.first=this.first.next,this.size-=1),t},clear:function(){this.size=0,this.first=null},delete:function(t){if(null!==this.first){this.first.data.data&&delete this.first.data.data[t];for(var e=this.first;null!==e.next;)(e=e.next).data.data&&delete e.data.data[t]}}},new t}function s(t,n,r){var i=n.first;if(i)if(t>i.timeStamp){for(;i&&t>i.timeStamp;)(i=n.dequeue())&&i.data&&2===i.data.type&&e&&e(i.data,r);i&&e&&e(i.data,r)}else t<i.timeStamp?i.data&&2!==i.data.type&&e&&e(i.data,r):(e&&e(i.data,r),n.dequeue())}function u(){this.wndIndex=0}return u.prototype={draw:function(u,c,l,f,h){var d=u.params;if(d){var p=!!d.isTrack,v=!1,g={type:0,data:null,channel:f};if(d.hasOwnProperty("VideoAnalyseRule")){var m=d.VideoAnalyseRule||[];g.type=0,g.data=m.filter(function(t){return"ObjectDetect"!==t.Class}),e&&e(g,h),g.data=m.filter(function(t){return"ObjectDetect"===t.Class}),g.data=g.data.map(function(t){return v||(v=t&&t.Config&&t.Config.DetectRegion),t&&t.Config}),v&&(g.type=4,e&&e(g,h))}if(d.hasOwnProperty("VideoAnalyseModule")&&(v||(g.type=4,g.data=d.VideoAnalyseModule,e&&e(g,h))),d.hasOwnProperty("FocusStatus")&&(g.type=3,g.data=d.FocusStatus,e&&e(g,h)),d.hasOwnProperty("Event")&&(g.type=2,g.data=d.Event,r.enqueue(new a(JSON.parse(JSON.stringify(g)),l))),d.hasOwnProperty("Events")&&(g.type=9,g.data=d.Events,r.enqueue(new a(JSON.parse(JSON.stringify(g)),l))),d.hasOwnProperty("FloorIdentification")&&(g.type=6,g.data=d.FloorIdentification,e&&e(g,h)),d.hasOwnProperty("Lanes")&&(g.type=8,g.data=d.Lanes,e&&e(g,h)),s(c,r,h),5===u.type)for(var y=d.object,w=d.coordinate,b=0;b<y.length;b++)!function(e){var n=(y[e].classID||"")+y[e].objectId;switch(y[e].operateType){case 1:t[n]={},t[n].show=!0,y[e].hasOwnProperty("track")&&(t[n].pos=y[e].track[0]),t[n].type=y[e].objectType,t[n].coordinate=w,t[n].isTrack=p,t[n].timeout=setTimeout(function(){t[n].show=!1},500);break;case 2:t.hasOwnProperty(n)||(t[n]={},t[n].coordinate=w),y[e].hasOwnProperty("track")&&(t[n].pos=y[e].track[0],t[n].show=!0),t[n].type=y[e].objectType,t[n].isTrack=p,t[n].timeout&&clearTimeout(t[n].timeout),t[n].timeout=setTimeout(function(){t[n].show=!1},500);break;case 3:t.hasOwnProperty(n)&&(t[n].timeout&&clearTimeout(t[n].timeout),delete t[n]);break;case 4:t.hasOwnProperty(n)&&(t[n].show=!1)}}(b);else if(14===u.type)for(var S=function(e){return setTimeout(function(){for(;null!==(r=n.first)&&void 0!==r&&null!==(i=r.data)&&void 0!==i&&null!==(o=i.data)&&void 0!==o&&o.hasOwnProperty(e);){var r,i,o;n.dequeue()}var u={};g.type=1,g.data=u,u[e]={type:14,show:!1},n.enqueue(new a(JSON.parse(JSON.stringify(g)),l)),n.first.next&&n.dequeue(),s(c,n,h),delete t[e],n.delete(e)},500)},D=function(t){return["attribute94","attribute95","attribute96","attribute97","attribute98"].indexOf(t)>-1},_=0;_<d.length;_++){if(w=d[_].coordinate,y=[],d[_].object)for(var x in d[_].object)"commonObject"!==x&&"vehicleObject"!==x||(y=y.concat(d[_].object[x]));for(b=0;b<y.length;b++)!function(e){var n=(d[_].classID||"")+y[e].objectId;for(var r in t[n]||(t[n]={}),y[e])if("object"===(0,i.default)(y[e][r]))if(D(r))switch(y[e].operateType){case 1:case 2:if(t[n].show=!0,t[n].type=y[e].type,t[n][r]=y[e][r],y[e].track){var a={};a.xSize=y[e].xSize,a.ySize=y[e].ySize,a.centerX=y[e].centerX,a.centerY=y[e].centerY,t[n].trackSize=a}clearTimeout(t[n].timeout),t[n].timeout=S(n)}else switch(y[e].operateType){case 1:if(t[n]||(t[n]={}),t[n].objectId=y[e].objectId,t[n].show=!0,y[e].hasOwnProperty("track")?t[n].pos=y[e].track[0]:y[e][r][0].track&&(t[n].pos=y[e][r][0].track[0]),t[n].track=y[e][r][0].track,t[n].type=y[e].type,t[n].coordinate=w,t[n].beliefVal=y[e].beliefVal,2==y[e].type&&y[e].attribute80&&y[e].attribute80[0]&&(t[n].reliability=y[e].attribute80[0].reliability),5==y[e].type&&y[e].attribute82&&y[e].attribute82[0]){var o=[];(s=y[e].attribute82[0].plateInfo||[]).length&&(o=s.filter(function(t){return 0!=t})),t[n].plate=new TextDecoder("gb2312").decode(new Uint8Array(o))}t[n].timeout=S(n);break;case 2:var s;if(t[n].objectId=y[e].objectId,t[n].coordinate=w,2==y[e].type&&y[e].attribute80&&y[e].attribute80[0]&&(t[n].reliability=y[e].attribute80[0].reliability),5==y[e].type&&y[e].attribute82&&y[e].attribute82[0])o=[],(s=y[e].attribute82[0].plateInfo||[]).length&&(o=s.filter(function(t){return 0!=t})),t[n].plate=new TextDecoder("gb2312").decode(new Uint8Array(o));y[e].hasOwnProperty("track")?t[n].pos=y[e].track[0]:y[e][r][0].track&&(t[n].pos=y[e][r][0].track[0]),t[n].track=y[e][r][0].track,t[n].show=!0,t[n].type=y[e].type,t[n].beliefVal=y[e].beliefVal,t[n].timeout&&clearTimeout(t[n].timeout),t[n].timeout=S(n)}}(b)}else if(20===u.type){var E=function(e){return setTimeout(function(){var r={};g.type=1,g.data=r,r[e]={type:20,show:!1};var i=o();i.enqueue(new a(JSON.parse(JSON.stringify(g)),l)),s(c,i,h),delete t[e],n.delete(e)},500)};for(b=0;b<d.length;b++){var T={show:!0,type:20,appInfo:(I=d[b]).appendInfo},k=String("0x14_")+I.objectId;switch(I.objectStatus){case 0:t.hasOwnProperty(k)||(t[k]=T),t[k].data=I.params.object,t[k].timeout&&clearTimeout(t[k].timeout),t[k].timeout=E(k);break;case 1:t.hasOwnProperty(k)&&(t[k].show=!1);break;case 2:t.hasOwnProperty(k)||(t[k]=T),t[k].data=I.params.object,t[k].timeout&&clearTimeout(t[k].timeout),t[k].timeout=E(k);break;case 3:t.hasOwnProperty(k)&&delete t[k]}}}else if(21===u.type)g.type=5,g.data=d,e&&e(g,h);else if(25===u.type)for(E=function(e){return setTimeout(function(){var n={};g.type=1,g.data=n,n[e]={type:25,show:!1};var r=o();r.enqueue(new a(JSON.parse(JSON.stringify(g)),l)),s(c,r,h),delete t[e]},500)},b=0;b<d.length;b++){var I;T={show:!0,type:25,objectType:(I=d[b]).objectType},k=String("0x19_")+I.objectId,t.hasOwnProperty(k)||(t[k]=T),t[k].pos=I.pos,t[k].timeout&&clearTimeout(t[k].timeout),t[k].timeout=E(k)}else 23===u.type&&(g.type=7,g.data=d,e&&e(g,h));g.type=1,g.data=t,n.enqueue(new a(JSON.parse(JSON.stringify(g)),l)),s(c,n,h)}},setCallback:function(t){e||(e=t)}},new u};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=200,e=8e3,n=null,i=null,a=null,o=0,s={type:"G.711",samplingRate:e,bitrate:"8000"},u=0,c=!1,l=0,f=0,h=null,d=!1,p=new Float32Array(8e4),v=0,g=null,m=!1,y=[],w=!1,b=null,S=0,D=0;function _(t){t&&(t.connect(a),t.start(),t.onended=function(){t.disconnect(),S+=D,b.timeUpdate(S),w||(y.length?_(y.shift()):b.audioPlayEnd())})}function x(){}return x.prototype={audioInit:function(t){if(u=0,null!==n&&c)r.debug.info("Audio context already defined!");else try{return n&&!c&&/Apple Computer/.test(navigator.vendor)&&/Safari/.test(navigator.userAgent)&&n.close(),window.AudioContext=window.AudioContext||window.webkitAudioContext||window.mozAudioContext||window.oAudioContext||window.msAudioContext,(n=new AudioContext).onstatechange=function(){r.debug.info("Audio Context State changed :: "+n.state),"running"===n.state&&(c=!0)},i=n.createGain(),(a=n.createBiquadFilter()).connect(i),a.type="lowpass",a.frequency.value=4e3,a.gain.value=40,i.connect(n.destination),this.controlVolumn(t),!0}catch(t){return r.debug.error("Web Audio API is not supported in this web browser! : "+t),!1}},play:function(){this.controlVolumn(o),w=!1,_(y.shift())},stop:function(){o=0,i.gain.value=0,u=0},bufferAudio:function(r,i,o,f){c&&(f?function(t){d||(m||5===y.length&&(m=!0,_(y.shift()),b.audioPlayBegin()),y.push(function(t,e){var r=n.createBuffer(1,t.length,e.samplingRate);return D=t.length/e.samplingRate,r.getChannelData(0).set(t),(g=n.createBufferSource()).buffer=r,g}(t,s)))}(r):function(r,i){if(!(null==r||r.length<=0)){var o=i-l;if((o>t||o<0)&&(u=0,v=0,d=!0,null!==g&&g.stop()),u-n.currentTime<0&&(u=0),l=i,p=function(t,e,n){var r=t;return n+e.length>=r.length&&(r=new Float32Array(r.length+8e4)).set(r,0),r.set(e,n),r}(p,r,v),v+=r.length,!d){var c=0;if(v/r.length>1&&(null!==h&&(c=h*e),c>=v||null===h))return void(v=0);var f=null;/Apple Computer/.test(navigator.vendor)&&/Safari/.test(navigator.userAgent)&&s.samplingRate<32e3?(8e3==s.samplingRate?p=function(t){for(var e=0,n=0,r=0,i=0,a=(1-Math.cos(.2*Math.PI))/2,o=new Float32Array(4*t.length),s=0,u=0;s<t.length;s++)u=4*s,e=t[s],n=s<t.length-1?t[s+1]:e,r=s<t.length-2?t[s+2]:e,i=s<t.length-3?t[s+3]:e,i=(r=(n=e*(1-a)+n*a)*(1-a)+r*a)*(1-a)+i*a,o[u]=e,o[u+1]=n,o[u+2]=r,o[u+3]=i;return o}(p.subarray(c,v)):16e3==s.samplingRate&&(p=function(t){for(var e=0,n=0,r=new Float32Array(2*t.length),i=0,a=0;i<t.length;i++)a=2*i,e=t[i],n=i<t.length-1?t[i+1]:e,r[a]=e,r[a+1]=(e+n)/2;return r}(p.subarray(c,v))),(f=n.createBuffer(1,p.length,32e3)).getChannelData(0).set(p)):(f=n.createBuffer(1,v-c,s.samplingRate)).getChannelData(0).set(p.subarray(c,v)),v=0,(g=n.createBufferSource()).buffer=f,g.connect(a),u||(u=n.currentTime+.1),g.start(u),u+=f.duration}}}(r,i))},controlVolumn:function(t,e){e&&/Apple Computer/.test(navigator.vendor)&&/Safari/.test(navigator.userAgent)&&this.audioInit(1),o=t;var n=t/1;n<=0?(i.gain.value=0,u=0):i.gain.value=n>=1?1:n},getVolume:function(){return o},terminate:function(){n&&"closed"!==n.state&&(u=0,c=!1,n.close())},setBufferingFlag:function(t,e){"init"===e?f=t:d&&(0===t||"undefined"===typeof t||null===t?h=null:(h=t-f,f=0),d=!1)},getBufferingFlag:function(){return d},setInitVideoTimeStamp:function(t){f=t},getInitVideoTimeStamp:function(){return f},setSamplingRate:function(t){s.samplingRate=t},pause:function(){w=!0},timeUpdate:function(){},setRtspOver:function(){!0},audioPlayBegin:function(){},audioPlayEnd:function(){}},b=new x};var r=n(16)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(16),i=function(){var t=null,e=null,n=null,i=null,a=!1,o=null,s={audio:!0,video:!1},u=null;function c(){}return c.prototype={init:function(){if(void 0===t||null===t)try{window.AudioContext=window.AudioContext||window.webkitAudioContext||window.mozAudioContext||window.oAudioContext||window.msAudioContext,(t=new AudioContext).onstatechange=function(){r.debug.info("Audio Context State changed :: "+t.state)}}catch(t){return void r.debug.error("Web Audio API is not supported in this web browser! : "+t)}},initAudioOut:function(){if(null!==e&&null!==n||(e=t.createGain(),(n=t.createScriptProcessor(4096,1,1)).onaudioprocess=function(t){if(null!==o){var e=t.inputBuffer.getChannelData(0);null!==u&&!0===a&&u(e)}},e.connect(n),n.connect(t.destination),i=t.sampleRate,e.gain.value=1),void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(t,e,n){var r=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return r?new Promise(function(e,n){r.call(navigator,t,e,n)}):(n(),Promise.reject(new Error("getUserMedia is not implemented in this browser")))}),navigator.mediaDevices.getUserMedia)return navigator.mediaDevices.getUserMedia(s).then(function(n){o=n,t.createMediaStreamSource(n).connect(e)}).catch(function(t){r.debug.error(t)}),a=!0,i;r.debug.error("Cannot open local media stream! :: navigator.mediaDevices.getUserMedia is not defined!")},controlVolumnOut:function(t){var n=t/20*2;e.gain.value=n<=0?0:n>=10?10:n},stopAudioOut:function(){if(null!==o&&a)try{for(var t=o.getAudioTracks(),e=0,n=t.length;e<n;e++)t[e].stop();a=!1,o=null}catch(t){}},terminate:function(){this.stopAudioOut(),t.close(),e=null,n=null},setSendAudioTalkBufferCallback:function(t){u=t}},new c};e.default=i},function(t,e){t.exports=function(){return new Worker("./module/audioTalkWorker.worker.js")}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(180)),a=(n(16),n(70));function o(t,e){function n(t,e){n.prototype.w=t,n.prototype.h=e}return n.prototype={toString:function(){return"("+n.prototype.w+", "+n.prototype.h+")"},getHalfSize:function(){return new o(n.prototype.w>>>1,n.prototype.h>>>1)},length:function(){return n.prototype.w*n.prototype.h}},new n(t,e)}var s=function(){var t=null,e=null,n=null,r=!0,s=0,u=new Map,c=new Map,l=this,f=null;function h(){}function d(r){var i=r.data;switch(i.type){case"WorkerReady":e&&e();break;case"canvasRender":!function(e,r){if(null!=e){if(null===n){var i=new o(r.ylen,r.height);n=new a.YUVWebGLCanvas(t,i)}var c=Math.floor((p(r.time).getTime()-s)/1e3),l={frameData:e,option:r};u.size>600&&u.clear(),!1===u.has(c)&&u.set(c,l)}}(i.data,i.option)}}function p(t){var e=2e3+(t>>26),n=t>>22&15,r=t>>17&31,i=t>>12&31,a=t>>6&63,o=63&t,s=new Date;return s.setFullYear(e,n-1,r),s.setHours(i,a,o,0),s}return h.prototype={init:function(e,n){t=e,l.channel=n,(f=new i.default).onmessage=d},parseRTPData:function(t,e){!0===r&&(s=p(s=(e[19]<<24)+(e[18]<<16)+(e[17]<<8)+e[16]>>>0).getTime()),r=!1;var n=e[4],i={type:"MediaData",data:{rtspInterleave:t,payload:e},info:null,channel:l.channel};253!=n&&254!=n&&252!=n&&251!=n||f.postMessage(i)},setCallback:function(t,n){switch(t){case"WorkerReady":e=n;break;case"FileOver":this.fileOverCallback=n}},terminate:function(){f&&(f.terminate(),f=null),u&&(u=null),c&&(c=null)},play:function(){},initStartTime:function(){},pause:function(){},setLiveMode:function(){},setPlayMode:function(){},setFPS:function(){},sendSdpInfo:function(){},postRtspOver:function(){},gotoSecond:function(e,r){if(e=(e=e<0?0:e)>r?r:e,!0===u.has(e)){var i=u.get(e);return n.drawCanvas(i.frameData,i.option),{pngData:t.toDataURL(),option:i.option}}return!1},gotoFrame:function(e){if(!0===c.has(e)){var r=c.get(e);return n.drawCanvas(r.frameData,r.option),{pngData:t.toDataURL(),option:r.option}}return!1},checkLeftSize:function(t,e,n,r){var i=!1;if("next"===e)for(var a=1;a<=r;a++){var o=t+a>n?n:t+a;if(!1===(i=u.has(o)))break}else if("pre"===e)for(a=1;a<=r&&(o=t-a<1?1:t-a,!1!==(i=u.has(o)));a++);return i},clearMap:function(){u.clear(),c.clear()}},new h};e.default=s},function(t,e){t.exports=function(){return new Worker("./module/videoWorkerTrain.worker.js")}},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(16),a=r(n(69)),o=r(n(182)),s=r(n(71)),u=r(n(100)),c=r(n(101)),l=r(n(104)),f=n(40).SM3,h=function(t){var e=t.wsURL,n=t.rtspURL,r=null,h=t.isTalkService,d=t.speed,p=t.realm,v=6,g=null,m=null,y=0,w=0,b='Authorization: WSSE profile="UsernameToken"',S=-1!==n.search("&srctype=raw"),D=new s.default,_=t.RTSP_STATE,x=t.workerManager,E=new u.default,T=!1,k=new Function,I=null,A=[],R=0,M=function(){},C={},P="UnAuthorized",O={},B=null,F=null,L=null,j=null,N=!0,U={},z="",V=0,H=!1,W={PLAY:0,PAUSE:1,KEEP_LIVE:2,STOP:3,SCALE:4},Y="",q=null;if(t.isRecord){["init","sendSdpInfo","parseRTPData","setCallback"].forEach(function(t,e){x[t]=function(){}});var X=1048576;E.postMessage({type:"init",options:{singleSize:500*X,nameOptions:t.nameOptions||{fileName:t.fileName,namedBy:"date",nameFormat:["ymd_his"]},limitOptions:{limitBy:"count",count:10}}}),E.onMessage=function(t){switch(t.type){case"pendding":k(t);break;case"download":et(t.data.name,t.data.buffer);break;case"closed":k(t),T=!1}}}t.speed>1&&t.isDownLoad&&(["parseRTPData"].forEach(function(t,e){x[t]=function(){}}),X=1048576,E.postMessage({type:"init",options:{singleSize:500*X,nameOptions:{fileName:t.fileName,namedBy:"date",nameFormat:["ymd_his"]},limitBy:"count",count:10}}),E.onMessage=function(t){switch(t.type){case"pendding":k(t);break;case"download":et(t.data.name,t.data.buffer);break;case"closed":k(t),T=!1}},T=!0);function G(){}function Q(t,r,i){var s=n.indexOf("?")>-1?n+"&":n+"?",u="",c="",l=(0,a.default)(U.username+":"+p+":"+U.password),f=e.split("://")[1].split("/")[0].split(":")[0]+":8086";switch(t){case 0:var v=function(){for(var t=function(){var t=window.crypto||window.msCrypto,e=256*Math.random()|0;return t&&(e=t.getRandomValues(new Uint32Array(1))[0]/4294967296*256|0),e},e=[],n=0;n<32;n++)e.push(String.fromCharCode(t()));return(0,a.default)(e.join(""))}(),g=function(){var t=new Date,e=t.getTimezoneOffset(),n=t.getTime()+60*e*1e3,r=new Date(n),i=r.getFullYear(),a=r.getMonth()+1,o=r.getDate(),s=r.getHours(),u=r.getMinutes(),c=r.getSeconds(),l=function(t){return t<10?"0"+t:t};return i+"-"+l(a)+"-"+l(o)+"T"+l(s)+":"+l(u)+":"+l(c)+"Z"}();!function(t){for(var e,n,r,i,a,o,s,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",l=0;l<t.length;)e=t[l++],n=t[l++],r=t[l++],i=e>>2,a=(3&e)<<4|n>>4,o=(15&n)<<2|r>>6,s=63&r,isNaN(n)?o=s=64:isNaN(r)&&(s=64),c=c+u.charAt(i)+u.charAt(a)+u.charAt(o)+u.charAt(s)}(function(t){var e,n=t.trim(),r="0x"===n.substr(0,2).toLowerCase()?n.substr(2):n,i=r.length;if(i%2!==0)return"";for(var a=[],o=0;o<i;o+=2)e=parseInt(r.substr(o,2),16),a.push(e);return a}((0,o.default)(v+g+l.toUpperCase()))),u="GET "+s+"method="+t+" HTTP/1.1\r\n",u+="Accept-Sdp: Private\r\n",I===b||(u+=I+"\r\n"),u+="Connection: keep-alive\r\nCseq: "+R+Y+"\r\nHost: "+f+"\r\n",r?u+="Range: npt="+r+"-\r\n":"ContinuePlay"!==P&&(u+="Range: npt=0.000000-\r\n"),d&&(u+="Speed:"+d+"\r\n"),!0===h&&(c+="v=0\r\n",c+="o=- 2208989105 2208989105 IN IP4 0.0.0.0\r\n",c+="s=Media Server\r\n",c+="c=IN IP4 0.0.0.0\r\n",c+="t=0 0\r\n",c+="a=control:*\r\n",c+="a=packetization-supported:DH\r\n",c+="a=rtppayload-supported:DH\r\n",c+="a=range:npt=now-\r\n",c+="m=audio 0 RTP/AVP 8\r\n",c+="a=control:trackID=5\r\n",c+="a=rtpmap:8 PCMA/16000\r\n",u+="Private-Length: "+(c+="a=sendonly\r\n").length+"\r\n",u+="Private-Type: application/sdp\r\n"),u+="\r\n",u+=c;break;case 1:u="GET "+s+"method="+t+" HTTP/1.1\r\n",u+="Connection: keep-alive\r\nCseq: "+R+Y+"\r\nHost: "+f+"\r\n\r\n";break;case 2:case 3:u="GET "+s+"method="+t+" HTTP/1.1\r\n",u+="Connection: keep-alive\r\nCseq: "+R+Y+"\r\nHost: "+f+"\r\n\r\n";break;case 4:u="GET "+s+"method=0 HTTP/1.1\r\n",u+=i<8?"Speed: "+i+"\r\n":"Scale: "+i+"\r\n",u+="Connection: keep-alive\r\nCseq: "+R+Y+"\r\nHost: "+f+"\r\n\r\n"}return u}function Z(t){var e,r=t.search("Cseq: ")+5;if(R=parseInt(t.slice(r,r+10))+1,isNaN(R)&&(R=1),(e=function(t){var e={},n=0,r=0,i=null,a=null;if(-1!==t.search("Private-Type: application/sdp")){var o=t.split("\r\n\r\n");a=o[0]}else a=t;var s=a.split("\r\n"),u=s[0].split(" ");if(u.length>2&&(e.ResponseCode=parseInt(u[1]),e.ResponseMessage=u[2]),e.ResponseCode===_.OK){for(n=1;n<s.length;n++)if("Cseq"===(i=s[n].split(":"))[0])e.Cseq=parseInt(i[1]);else if("Private-Type"===i[0])e.ContentType=i[1],-1!==e.ContentType.search("application/sdp")&&(e.SDPData=tt(t));else if("Private-Length"===i[0])e.ContentLength=parseInt(i[1]);else if("Session-Id"===i[0]){var c=i[1].split(";");e.SessionID=parseInt(c[0])}}else if(e.ResponseCode===_.UNAUTHORIZED)for(n=1;n<s.length;n++)if("Cseq"===(i=s[n].split(":"))[0])e.Cseq=parseInt(i[1]);else if("WWW-Authenticate"===i[0]){var l=i[1].split(",");for(r=0;r<l.length;r++){var f=l[r].search("Digest realm=");if(-1!==f){var h=l[r].substr(f+13).split('"');e.Realm=h[1]}if(-1!==(f=l[r].search("nonce="))){var d=l[r].substr(f+6).split('"');e.Nonce=d[1]}}}return e}(t)).ResponseCode===_.UNAUTHORIZED&&I===b)!function(t,e){var r=U.username,a=U.password,o={Method:null,Realm:null,Nonce:null,Uri:null},s=null;o={Method:"GET",Realm:t.Realm,Nonce:t.Nonce,Uri:n};var u=null,l=e&&e.match(/algorithm=[^,\s]+/g);if(l){var h={256:function(t){return c.default.SHA256(t).toString()},SM3:function(t){return f.digest(t,"utf8","hex")}};["256","SM3"].some(function(t){return l.some(function(e){if(e.match(t))return o.algorithm=e,u=h[t],!0})})}if(u){var d=function(t){for(var e="",n=window.crypto||window.msCrypto;e.length<t;){var r=(Math.random().toString().substr(2)-0).toString();n&&(r=n.getRandomValues(new Uint32Array(1))[0].toString()),"0"!==r&&(e+=r)}return e.substr(0,t)}(32),p="00000001",v=o.Method+":"+o.Uri,g=(e+"qop=auth").match(/qop=([^,\s]+)/)[1].replace(/"/g,""),m=u(r+":"+o.Realm+":"+a).toLowerCase(),y=[o.Nonce,p,d,g].join(":"),w=u(v).toLowerCase();s=u(m+":"+y+":"+w).toLowerCase(),u=[o.algorithm,'cnonce="'+d+'"',"qop="+g,"nc="+p]}else s=(0,i.formAuthorizationResponse)(r,a,o.Uri,o.Realm,o.Nonce,o.Method);I=['Authorization: Digest username="'+r+'"','realm="'+o.Realm+'"','nonce="'+o.Nonce+'"','uri="'+o.Uri+'"','response="'+s+'"'],u&&(I=I.concat(u)),I=I.join(", "),K(Q(W.PLAY,V))}(e,t);else if(e.ResponseCode===_.OK)if("UnAuthorized"===P){if((C=tt(t)).Sessions.RecordRange){var a=parseInt(C.Sessions.RecordRange);L&&L(a)}var o=0;for(o=0;o<C.Sessions.length;o+=1){var s={};"JPEG"===C.Sessions[o].CodecMime||"H264"===C.Sessions[o].CodecMime||"H265"===C.Sessions[o].CodecMime||"H264-SVC"==C.Sessions[o].CodecMime||"RAW"==C.Sessions[o].CodecMime||"SVAC2"==C.Sessions[o].CodecMime?(s.codecName=C.Sessions[o].CodecMime,"H264-SVC"===C.Sessions[o].CodecMime&&(s.codecName="H264"),"H265"!==C.Sessions[o].CodecMime&&"RAW"!==C.Sessions[o].CodecMime||G.prototype.setLiveMode("canvas"),s.trackID=C.Sessions[o].ControlURL,s.ClockFreq=C.Sessions[o].ClockFreq,s.Port=parseInt(C.Sessions[o].Port),s.Type=C.Sessions[o].Type,A.push(s)):"PCMU"===C.Sessions[o].CodecMime||-1!==C.Sessions[o].CodecMime.search("G726-16")||-1!==C.Sessions[o].CodecMime.search("G726-24")||-1!==C.Sessions[o].CodecMime.search("G726-32")||-1!==C.Sessions[o].CodecMime.search("G726-40")||"PCMA"===C.Sessions[o].CodecMime||-1!==C.Sessions[o].CodecMime.search("L16")||-1!==C.Sessions[o].CodecMime.search("G7221")||-1!==C.Sessions[o].CodecMime.search("MPA")||-1!==C.Sessions[o].CodecMime.search("G729")||-1!==C.Sessions[o].CodecMime.search("G723.1")?("PCMU"===C.Sessions[o].CodecMime?s.codecName="G.711Mu":"G726-16"===C.Sessions[o].CodecMime?s.codecName="G.726-16":"G726-24"===C.Sessions[o].CodecMime?s.codecName="G.726-24":"G726-32"===C.Sessions[o].CodecMime?s.codecName="G.726-32":"G726-40"===C.Sessions[o].CodecMime?s.codecName="G.726-40":"PCMA"===C.Sessions[o].CodecMime?s.codecName="G.711A":"L16"===C.Sessions[o].CodecMime?s.codecName="PCM":"MPA"===C.Sessions[o].CodecMime?s.codecName="MPEG2-Layer2":"G729"===C.Sessions[o].CodecMime?s.codecName="G.729":"G723.1"===C.Sessions[o].CodecMime?s.codecName="G.723":"G7221"===C.Sessions[o].CodecMime&&(s.codecName="G722.1"),s.trackID=C.Sessions[o].ControlURL,s.ClockFreq=C.Sessions[o].ClockFreq,s.Port=parseInt(C.Sessions[o].Port),s.Bitrate=parseInt(C.Sessions[o].Bitrate),s.TalkTransType=C.Sessions[o].TalkTransType,s.Type=C.Sessions[o].Type,A.push(s)):"mpeg4-generic"===C.Sessions[o].CodecMime||"MPEG4-GENERIC"===C.Sessions[o].CodecMime?(s.codecName="mpeg4-generic",s.trackID=C.Sessions[o].ControlURL,s.ClockFreq=C.Sessions[o].ClockFreq,s.Port=parseInt(C.Sessions[o].Port),s.Bitrate=parseInt(C.Sessions[o].Bitrate),s.TalkTransType=C.Sessions[o].TalkTransType,s.Type=C.Sessions[o].Type,A.push(s)):"vnd.onvif.metadata"===C.Sessions[o].CodecMime?(s.codecName="MetaData",s.trackID=C.Sessions[o].ControlURL,s.ClockFreq=C.Sessions[o].ClockFreq,s.Port=parseInt(C.Sessions[o].Port),A.push(s)):"stream-assist-frame"===C.Sessions[o].CodecMime&&(s.codecName="stream-assist-frame",s.trackID=C.Sessions[o].ControlURL,s.ClockFreq=C.Sessions[o].ClockFreq,s.Port=parseInt(C.Sessions[o].Port),A.push(s))}if(!1===h)return void M({errorCode:i.PLAYER_STATE_CODE.RTSP_NOT_FOUND,description:"rtsp not found"});for(var u=0;u<A.length;u++)A[u].RtpInterlevedID=2*(A[u].trackID.split("=")[1]-0);!S&&x.sendSdpInfo(A,O),!0===h&&x.setCallback("audioTalk",$),(q=new l.default).onmessage=function(){K(Q(W.KEEP_LIVE,null))},P="Playing"}else"ContinuePlay"===P&&(P="Playing");else{if(e.ResponseCode===_.NOTSERVICE)return!0===h?void M({errorCode:i.PLAYER_STATE_CODE.TALK_SERVICE_UNAVILABLE,description:"Talk Service Unavilable",place:"RtspClient.js"}):void M({errorCode:i.PLAYER_STATE_CODE.SERVICE_UNAVILABLE,description:"Service Unavilable"});if(e.ResponseCode===_.NOTFOUND)return void M({errorCode:i.PLAYER_STATE_CODE.RTSP_NOT_FOUND,description:"rtsp not found"});if(e.ResponseCode===_.INTERNALSERVERERROR)return void M({errorCode:i.PLAYER_STATE_CODE.INTERNAL_SERVER_ERROR,description:"Internal Server Error"})}}function K(t){void 0!=t&&null!=t&&""!=t&&r&&r.readyState===WebSocket.OPEN&&void 0!=t&&r.send((0,i.stringToUint8Array)(t))}function $(t){!0===h&&function(t){null!==r&&r.readyState===WebSocket.OPEN&&r.send(t)}(t)}function J(t){var e=new Uint8Array,n=new Uint8Array(t.data);for((e=new Uint8Array(n.length)).set(n,0),y=e.length;y>0;)if(36!==e[0]){var a=String.fromCharCode.apply(null,e),o=null;if(-1!==a.indexOf("OffLine: File Over")&&(r.fileOver=!0,x.postRtspOver(),j&&j()),-1!==a.indexOf("OffLine: KmsUnavailable"))return void M({errorCode:i.PLAYER_STATE_CODE.KMS_NOT_CONNECTED});if(-1!==a.indexOf("OffLine: CheckChannelAuthFailed"))return void M({errorCode:i.PLAYER_STATE_CODE.CHANNEL_AUTH_FAILED});if(-1!==a.indexOf("OffLine: PasswdUnitFailed"))return void M({errorCode:i.PLAYER_STATE_CODE.PASSWORD_NOT_INITIALIZE});if(-1!==a.indexOf("OffLine: OverFlowMaxConnect"))return void M({errorCode:i.PLAYER_STATE_CODE.MAX_NUMBER_CONNECTION});if(-1!==a.indexOf("OffLine: StreamSourceStartFailed"))return void M({errorCode:i.PLAYER_STATE_CODE.RTSP_NOT_FOUND});if(-1!==a.indexOf("OffLine: TalkBusyLine"))return void M({errorCode:i.PLAYER_STATE_CODE.TALK_BUSY_LINE});if(-1!==a.indexOf("Notify: stopTalk"))return void M({errorCode:i.PLAYER_STATE_CODE.TALK_ClOSE});!1===H&&-1!==a.indexOf("200 OK")?(o=a.lastIndexOf("\r\n"),H=!0):o=a.search("\r\n\r\n");var s=a.search("HTTP");if(-1===s)return void(e=new Uint8Array);if(-1===o)return void(y=e.length);g=e.subarray(s,o+v),e=e.subarray(o+v),Z(String.fromCharCode.apply(null,g)),y=e.length}else{if("RAW"===A[0].codecName)return void(/.aac/.test(rtspUrl)?x.sendBufferToAudioWorker(e.subarray(v,e.length)):D.setMovieData(e.subarray(v,e.length)));if(!0===N&&B&&B(),N=!1,m=e.subarray(0,v),!((w=m[2]<<24|m[3]<<16|m[4]<<8|m[5])+v<=e.length))return void(y=e.length);var u=e.subarray(v,w+v),c=(u[19]<<24)+(u[18]<<16)+(u[17]<<8)+u[16]>>>0,l=Date.UTC("20"+(c>>>26),(c>>>22&15)-1,c>>>17&31,c>>>12&31,c>>>6&63,63&c)/1e3;l+=(new Date).getTimezoneOffset()/60*3600,F&&F({timestamp:l}),T&&E.postMessage({type:"addBuffer",buffer:u}),x.parseRTPData(m,u),e=e.subarray(w+v),y=e.length}}function tt(t){var e={Sessions:[]},n=(-1!==t.search("Private-Type: application/sdp")?t.split("\r\n\r\n")[1]:t).split("\r\n"),r=0,i=!1;for(r=0;r<n.length;r++){var a=n[r].split("=");if(a.length>0)switch(a[0]){case"a":var o=a[1].split(":");if(o.length>1){if("control"===o[0]){var s=n[r].search("control:");!0===i?-1!==s&&(e.Sessions[e.Sessions.length-1].ControlURL=n[r].substr(s+8)):-1!==s&&(e.BaseURL=n[r].substr(s+8))}else if("rtpmap"===o[0]){var u=o[1].split(" ");e.Sessions[e.Sessions.length-1].PayloadType=u[0];var c=u[1].split("/");e.Sessions[e.Sessions.length-1].CodecMime=c[0],c.length>1&&(e.Sessions[e.Sessions.length-1].ClockFreq=c[1])}else if("framesize"===o[0]){var l=o[1].split(" ");if(l.length>1){var f=l[1].split("-");e.Sessions[e.Sessions.length-1].Width=f[0],e.Sessions[e.Sessions.length-1].Height=f[1]}}else if("framerate"===o[0])e.Sessions[e.Sessions.length-1].Framerate=o[1];else if("fmtp"===o[0]){var d=n[r].split(" ");if(d.length<2)continue;for(var p=1;p<d.length;p++){var v=d[p].split(";"),g=0;for(g=0;g<v.length;g++){var m=v[g].search("mode=");if(-1!==m&&(e.Sessions[e.Sessions.length-1].mode=v[g].substr(m+5)),-1!==(m=v[g].search("config="))&&(e.Sessions[e.Sessions.length-1].config=v[g].substr(m+7),O.config=e.Sessions[e.Sessions.length-1].config,O.clockFreq=e.Sessions[e.Sessions.length-1].ClockFreq,O.bitrate=e.Sessions[e.Sessions.length-1].Bitrate),-1!==(m=v[g].search("sprop-vps="))&&(e.Sessions[e.Sessions.length-1].VPS=v[g].substr(m+10)),-1!==(m=v[g].search("sprop-sps="))&&(e.Sessions[e.Sessions.length-1].SPS=v[g].substr(m+10)),-1!==(m=v[g].search("sprop-pps="))&&(e.Sessions[e.Sessions.length-1].PPS=v[g].substr(m+10)),-1!==(m=v[g].search("sprop-parameter-sets="))){var y=v[g].substr(m+21).split(",");y.length>1&&(e.Sessions[e.Sessions.length-1].SPS=y[0],e.Sessions[e.Sessions.length-1].PPS=y[1])}}}}else if("range"===o[0]&&a[2]){var w=a[2].split("-")[1];e.Sessions&&w&&(e.Sessions.RecordRange=w)}}else 1===o.length&&("recvonly"===o[0]?e.Sessions[e.Sessions.length-1].TalkTransType="recvonly":"sendonly"===o[0]&&(e.Sessions[e.Sessions.length-1].TalkTransType="sendonly"));break;case"m":var b=a[1].split(" "),S={};S.Type=b[0],S.Port=b[1],S.Payload=b[3],e.Sessions.push(S),i=!0;break;case"b":if(!0===i){var D=a[1].split(":");e.Sessions[e.Sessions.length-1].Bitrate=D[1]}}}if(!0===h)for(var _=0;_<e.Sessions.length;_+=1)"1"!==e.Sessions[_].ControlURL.split("=")[1]&&"2"!==e.Sessions[_].ControlURL.split("=")[1]||e.Sessions.splice(_,1);return e}function et(t,e){t=(t=(t||Date.now())+"").split(".dav")[0];var n=new Blob([e]),r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=t+".dav",r.click(),setTimeout(function(){URL.revokeObjectURL(r.href),r=null},100),e=null}return G.prototype={setExtraError:function(t){t&&(Y="\r\nExtraError: support")},connect:function(){r||((r=new WebSocket(e)).binaryType="arraybuffer",r.fileOver=!1,r.addEventListener("message",J,!1),r.onopen=function(){I=b,K(Q(W.PLAY,V))},r.onerror=function(t){M({errorCode:i.PLAYER_STATE_CODE.OPEN_WS_ERROR,description:"Open WebSocket Error"})},r.onclose=function(t){r&&!r.fileOver&&M({errorCode:i.PLAYER_STATE_CODE.WS_CLOSED,description:"WebSocket Closed"})})},disconnect:function(){K(Q(W.STOP,null)),i.pubsub.publish("_clearTime_"),r&&(r.onerror=null,r.close(),r=null),x.terminate(),q&&q.terminate()},controlPlayer:function(t){var e="",n=null;switch(z=t.command,t.command){case"PLAY":if(x.play(),"PAUSE"===P&&(P="ContinuePlay"),null!==t.range&&void 0!==t.range){e=Q(W.PLAY,t.range);break}e=Q(W.PLAY,null),z&&x.initStartTime();break;case"PAUSE":if("PAUSE"===P)break;P="PAUSE",e=Q(W.PAUSE,null),x.pause();break;case"SCALE":e=Q(W.SCALE,null,t.data),x.setPlaySpeed(t.data);break;case"TEARDOWN":e=Q(W.STOP,null);break;case"audioPlay":if("start"===t.data)P="Playing",e=Q(W.PLAY,t.range);else if("stop"===t.data)e=Q(W.STOP,null);else{if("PAUSE"===P)break;P="PAUSE",e=Q(W.PAUSE,null)}x.controlAudio(t.command,t.data);break;case"volumn":case"audioSamplingRate":x.controlAudio(t.command,t.data);break;case"playNextFrame":x.getVideoBufferQueueSize()<5&&this.getNextFrameData(1e3),x.playNextFrame();break;case"getCurFrameInfo":n=x.getCurFrameInfo();break;case"getCapture":x.getCapture();break;case"startRecord":(T=t.data)||E.postMessage({type:"close"})}if(""!=e&&K(e),n)return n},setLiveMode:function(t){x.setLiveMode(t)},setPlayMode:function(t,e){V=e,x.setPlayMode(t)},setSignalURL:function(t){n=t},setCallback:function(t,e){"GetFirstFrame"===t?B=e:"recordChanged"===t?k=e:"UpdateTimeStamp"===t?F=e:"FileOver"===t?j=e:"GetTotalTime"===t?L=e:x.setCallback(t,e),"Error"==t&&(M=e)},setUserInfo:function(t,e){U.username=t,U.password=e},getNextFrameData:function(t){K(Q(W.PLAY,null)),setTimeout(function(){K(Q(W.PAUSE,null))},t)}},D.CodecCallback=function(t){O=t.AudioCodecInfo,A[0].Framerate=t.Framerate,"H264"===O.VideoCodec&&G.prototype.setLiveMode("video"),x.sendSdpInfo(A,O,t)},D.TrackCallback=function(t){var e=new Uint8Array(t.subarray(6,t.length));x.parseRTPData(t.subarray(0,6),e)},new G};e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=0;function i(t){return o(a(s(t)))}function a(t){return c(l(u(t),8*t.length))}function o(t){for(var e,n=r?"0123456789ABCDEF":"0123456789abcdef",i="",a=0;a<t.length;a++)e=t.charCodeAt(a),i+=n.charAt(e>>>4&15)+n.charAt(15&e);return i}function s(t){for(var e,n,r="",i=-1;++i<t.length;)e=t.charCodeAt(i),n=i+1<t.length?t.charCodeAt(i+1):0,55296<=e&&e<=56319&&56320<=n&&n<=57343&&(e=65536+((1023&e)<<10)+(1023&n),i++),e<=127?r+=String.fromCharCode(e):e<=2047?r+=String.fromCharCode(192|e>>>6&31,128|63&e):e<=65535?r+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):e<=2097151&&(r+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return r}function u(t){for(var e=Array(t.length>>2),n=0;n<e.length;n++)e[n]=0;for(n=0;n<8*t.length;n+=8)e[n>>5]|=(255&t.charCodeAt(n/8))<<24-n%32;return e}function c(t){for(var e="",n=0;n<32*t.length;n+=8)e+=String.fromCharCode(t[n>>5]>>>24-n%32&255);return e}function l(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var n=Array(80),r=1732584193,i=-271733879,a=-1732584194,o=271733878,s=-1009589776,u=0;u<t.length;u+=16){for(var c=r,l=i,v=a,g=o,m=s,y=0;y<80;y++){n[y]=y<16?t[u+y]:p(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var w=d(d(p(r,5),f(y,i,a,o)),d(d(s,n[y]),h(y)));s=o,o=a,a=p(i,30),i=r,r=w}r=d(r,c),i=d(i,l),a=d(a,v),o=d(o,g),s=d(s,m)}return Array(r,i,a,o,s)}function f(t,e,n,r){return t<20?e&n|~e&r:t<40?e^n^r:t<60?e&n|e&r|n&r:e^n^r}function h(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function d(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function p(t,e){return t<<e|t>>>32-e}var v=i;e.default=v},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(18)),a=r(n(1)),o=r(n(2)),s={4000:1,8000:2,11025:3,16000:4,20000:5,22050:6,32000:7,44100:8,48000:9,96000:16,128000:17,192000:18,64000:19};function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=[];if(!0===(arguments.length>2?arguments[2]:void 0))for(var r=0;r<e;r++)n[r]=t>>>8*(e-1-r)&255;else for(var i=0;i<e;i++)n[i]=t>>>8*i&255;return n}var c=function(){function t(e,n,r){(0,a.default)(this,t),this.RtpInterlevedID=e,this.timestamp=0,this.currTime=null,this.preTime=null,this.VideoCodec=n,this.AudioCodec=r,this.MAXFRAMEINTERVAL=65535,this.rtpDataHeadExtLength=12,this.rtpDataHeadLength=24+this.rtpDataHeadExtLength,this.rtpDataFootLength=8,this.rtpPacketHead=[36,e,0,0,0,0],this.DHAV=[68,72,65,86],this.dhav=[100,104,97,118],this.frameNum=245}return(0,o.default)(t,[{key:"getRTPPacket",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ArrayBuffer(0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=0;this.rtpDataHeadExtLength=8+("audio"===e.type?4:e.width>2048||e.height>2048?12:8),this.rtpDataHeadLength=24+this.rtpDataHeadExtLength;var r=new Uint8Array(this.rtpPacketHead.length+this.rtpDataHeadLength+t.byteLength+this.rtpDataFootLength);r.set([36,this.RtpInterlevedID],n),n+=2,r.set(u(this.rtpDataHeadLength+t.byteLength+this.rtpDataFootLength,4,!0),n),n+=4,r.set(this.DHAV,n),n+=4;var a="audio"===e.type?[240]:e.keyframe?[253]:[252];r.set(a,n),n+=1,r.set([0],n),n+=1,r.set([1],n),n+=1,r.set([0],n),n+=1,this.frameNum>65535&&(this.frameNum=240),r.set(u(this.frameNum),n),n+=4,this.frameNum++;var o=u(this.rtpDataHeadLength+t.byteLength+this.rtpDataFootLength);r.set(o,n),n+=4;var c=new Date("2000-01-01 00:00:00").getTime();this.timestamp=1e3*e.timestamp/e.timescale,this.timestamp>this.MAXFRAMEINTERVAL&&(this.timestamp=this.timestamp-this.MAXFRAMEINTERVAL),r.set(u(Math.floor((c+this.timestamp)/1e3)),n),n+=4,r.set(u(this.timestamp,2),n),n+=2,r.set([this.rtpDataHeadExtLength],n),n+=1;var l=function(t,e){for(var n=0,r=e;r<t.length;r++)n+=t[r];return n}(r,6);r.set([l],n),n+=1;var f=[];f="video"===e.type?e.width>2048||e.height>2048?[130,0,0,0].concat((0,i.default)(u(e.width,2)),(0,i.default)(u(e.height,2))):[128,0,e.width/8,e.height/8]:[131,1,26,s[e.timescale]],r.set(f,n),n+=f.length,"video"===e.type&&(r.set([129,0,this.getHexByCodec(this.VideoCodec),50],n),n+=4);var h=function(t,e){for(var n=0,r=0;r<e;r++)n+=t[r]<<r%4*8;return n}(t,t.byteLength);return r.set([136],n),n+=1,r.set(u(h),n),n+=4,r.set([0,0,0],n),n+=3,r.set(t,n),n+=t.byteLength,r.set(this.dhav,n),n+=4,r.set(o,n),r}},{key:"getHexByCodec",value:function(t){var e=8;switch(t){case"H264":e=8;break;case"H265":e=12}return e}}]),t}();e.default=c},function(t,e,n){"use strict";t.exports=n(185)},function(t,e,n){"use strict";var r=n(43),i=n(44),a=n(33),o=n(32),s=n(45),u=n(26),c=n(27),l=n(46),f=n(188),h=n(189),d=n(192),p=n(72),v=n(98),g=n(202);t.exports={Movie:r,Track:i,VideoTrack:a,AudioTrack:o,Sample:s,VideoSample:u,AudioSample:c,Fragment:l,FragmentList:f,FragmentReader:h,MovieParser:d,MP4Parser:p,FLVParser:v,HLSPacketizer:g}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,n(e,r)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=n(46),s=function(){function t(){(0,i.default)(this,t),this.fragmentDuration=0,this.duration=0,this.timescale=0,this.video=null,this.audio=null,this.fragments=[]}return(0,a.default)(t,[{key:"createFragment",value:function(t){var e={timestamp:t,duration:0,samples:[]};return this.fragments.push(e),e}},{key:"chop",value:function(){this.fragments.length>0&&0===this.fragments[this.fragments.length-1].duration&&this.fragments.splice(this.fragments.length-2,1)}},{key:"relativeDuration",value:function(){return this.timescale?this.duration/this.timescale:this.duration||0}},{key:"size",value:function(){return[this.video,this.audio].filter(function(t){return null!==t}).reduce(function(t,e){return t+e.size},0)}},{key:"count",value:function(){return this.fragments.length}},{key:"get",value:function(t){var e=this.fragments[t];if(e){var n=new o;return n.timestamp=e.timestamp,n.duration=e.duration,n.samples=e.samples,n.timescale=this.timescale,this.video&&(n.videoExtraData=this.video.extraData),this.audio&&(n.audioExtraData=this.audio.extraData),n}}}]),t}();t.exports=s},function(t,e,n){"use strict";(function(e){var r=n(0),i=r(n(1)),a=r(n(2)),o=n(34),s=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"readSamples",value:function(t,n){for(var r=t.samples.map(function(t,e){return{index:e,offset:t.offset,size:t.size,bufferIndex:0,bufferOffset:0}}).sort(function(t,e){return t.offset-e.offset}),i=[],a=null,s=0,u=r.length;s<u;s++){var c=r[s];a&&a.offset+a.size>=c.offset+c.size?(c.bufferIndex=i.length-1,c.bufferOffset=c.offset-a.offset):(a={offset:c.offset,size:1048576,buffer:e.allocUnsafe(1048576)},i.push(a),c.bufferIndex=i.length-1,c.bufferOffset=0)}for(var l=o.create(n),f=0,h=i.length;f<h;f++){var d=i[f];l.read(d.buffer,d.offset)}return r.sort(function(t,e){return t.index-e.index}),t.samples.map(function(t,e){var n=r[e];return i[n.bufferIndex].buffer.slice(n.bufferOffset,n.bufferOffset+n.size)})}}]),t}();t.exports=s}).call(this,n(3).Buffer)},function(t,e,n){"use strict";(function(e){var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=function(t){(0,o.default)(r,t);var n=c(r);function r(t){var e;return(0,i.default)(this,r),(e=n.call(this)).fd=t,e}return(0,a.default)(r,[{key:"size",value:function(){return this.fd.byteLength}},{key:"read",value:function(t,e,n){n=n||0;var r=this.fd.slice(e,e+t.length-n);return this.toBuffer(r)}},{key:"toBuffer",value:function(t){for(var n=new e(t.byteLength),r=new Uint8Array(t),i=0;i<n.length;++i)n[i]=r[i];return n}}]),r}(n(47));t.exports=l}).call(this,n(3).Buffer)},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=function(t){(0,o.default)(n,t);var e=c(n);function n(t){var r;return(0,i.default)(this,n),(r=e.call(this)).buffer=t,r}return(0,a.default)(n,[{key:"size",value:function(){return this.buffer.length}},{key:"read",value:function(t,e,n){return n=n||0,this.buffer.copy(t,n,e,e+t.length-n)}}]),n}(n(47));t.exports=l},function(t,e,n){"use strict";(function(e){var r=n(0),i=r(n(1)),a=r(n(2)),o=n(34),s=[n(72),n(98)],u=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"parse",value:function(t){o.create(t),e.allocUnsafe(8);return s[0].parse(t)}}]),t}();t.exports=u}).call(this,n(3).Buffer)},function(t,e,n){var r={"./atom-avc1":73,"./atom-avc1.js":73,"./atom-co64":74,"./atom-co64.js":74,"./atom-ctts":75,"./atom-ctts.js":75,"./atom-esds":76,"./atom-esds.js":76,"./atom-ftyp":77,"./atom-ftyp.js":77,"./atom-hdlr":78,"./atom-hdlr.js":78,"./atom-hev1":79,"./atom-hev1.js":79,"./atom-hvc1":80,"./atom-hvc1.js":80,"./atom-mdhd":81,"./atom-mdhd.js":81,"./atom-mdia":82,"./atom-mdia.js":82,"./atom-minf":83,"./atom-minf.js":83,"./atom-moov":84,"./atom-moov.js":84,"./atom-mp4a":85,"./atom-mp4a.js":85,"./atom-mvhd":86,"./atom-mvhd.js":86,"./atom-smhd":87,"./atom-smhd.js":87,"./atom-stbl":88,"./atom-stbl.js":88,"./atom-stco":89,"./atom-stco.js":89,"./atom-stsc":90,"./atom-stsc.js":90,"./atom-stsd":91,"./atom-stsd.js":91,"./atom-stss":92,"./atom-stss.js":92,"./atom-stsz":93,"./atom-stsz.js":93,"./atom-stts":94,"./atom-stts.js":94,"./atom-tkhd":95,"./atom-tkhd.js":95,"./atom-trak":96,"./atom-trak.js":96,"./atom-vmhd":97,"./atom-vmhd.js":97};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=193},function(t,e,n){var r=n(195);function i(e,n,a){return"undefined"!==typeof Reflect&&Reflect.get?(t.exports=i=Reflect.get,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t,e,n){var i=r(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(n):a.value}},t.exports.default=t.exports,t.exports.__esModule=!0),i(e,n,a||e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var r=n(4);t.exports=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";(function(e){var r=n(0),i=r(n(1)),a=r(n(2));function o(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var u=n(9),c=n(43),l=n(32),f=n(33),h=n(27),d=n(26),p=n(34),v=n(49),g=n(28),m=function(){function t(e){(0,i.default)(this,t),this.source=e,this.isFullMoov=!1,this.reader=p.create(this.source)}return(0,a.default)(t,[{key:"parse",value:function(){if(this._findMoovAtom(),this.isFullMoov){this._createMovie();var t,e=o(this.moovAtom.getAtoms(u.ATOM_TRAK));try{for(e.s();!(t=e.n()).done;){var n=t.value;this._createTrack(n)}}catch(t){e.e(t)}finally{e.f()}this.movie.tracks.forEach(function(t){t.sortSamples(),t.ensureDuration()}),this.movie.ensureDuration()}return this.movie}},{key:"_findMoovAtom",value:function(){this.moovAtom=null;for(var t=0,n=this.reader.size(),r=e.allocUnsafe(8);t<n;){var i=8,a=(r=this.reader.read(r,t)).readUInt32BE(0),o=r.toString("ascii",4);if(0===a?a=n-t:1===a&&(r=this.reader.read(r,t+r.length),a=g.readUInt64BE(r,0),i+=8),u.ATOM_MOOV===o){var s=e.allocUnsafe(a-i);if((s=this.reader.read(s,t+i)).byteLength===s.length){try{this.moovAtom=u.createAtom(o),this.moovAtom.parse(s),this.isFullMoov=!0}catch(t){}break}}else t+=a}this.moovAtom}},{key:"_createMovie",value:function(){this.movie=new c;var t=this.moovAtom.getAtom(u.ATOM_MVHD);t&&(this.movie.timescale=t.timescale,this.movie.duration=t.duration)}},{key:"_createTrack",value:function(e){var n=e.getAtom(u.ATOM_MDIA);if(null!==n){var r=n.getAtom(u.ATOM_HDLR),i=n.getAtom(u.ATOM_MDHD),a=n.getAtom(u.ATOM_MINF);if(null!==r&&null!==i&&null!==a){var o=a.getAtom(u.ATOM_STBL);if(null!==o){var s=o.getAtom(u.ATOM_STSD),c=null,p=null;if(u.TRACK_TYPE_AUDIO===r.handlerType){var g=s.getAudioAtom();null!==g&&(c=new l,p=h.prototype,c.channels=g.channels,c.sampleRate=g.sampleRate,c.sampleSize=g.sampleSize,c.extraData=g.extraData)}else if(u.TRACK_TYPE_VIDEO===r.handlerType){var m=s.getVideoAtom();null!==m&&(c=new f,p=d.prototype,c.width=m.width,c.height=m.height,c.extraData=m.extraData)}if(null!==c){c.duration=i.duration,c.timescale=i.timescale;var y=v.parse(c.extraData);null!==y&&(c.codec=y.codec());var w=t._getEntries(o,u.ATOM_CTTS),b=t._getEntries(o,u.ATOM_STSZ),S=t._getEntries(o,u.ATOM_STSC),D=t._getEntries(o,u.ATOM_STSS),_=t._getEntries(o,u.ATOM_STTS),x=t._getEntries(o,u.ATOM_STCO);0===x.length&&(x=t._getEntries(o,u.ATOM_CO64));var E=0,T=0,k=0,I=0,A=0,R=0,M=0,C=0,P=0,O=0;S.length>0&&(A=S[0],O=S[1]);for(var B=new Array(b.length),F=0,L=0,j=_.length;L<j;L+=2)for(var N=_[L+1]||0,U=0;U<_[L];U++){var z=Object.create(p);if(z.timestamp=E,z.timescale=c.timescale,z.size=b[C],z.offset=x[T]+k,c instanceof f){z.width=c.width,z.height=c.height,z.type="video";var V=0;2*R+1<w.length&&(V=w[2*R+1]||0,++M>=w[2*R]&&(R++,M=0)),z.compositionOffset=V,P<D.length&&D[P]===C+1?(z.keyframe=!0,P++):z.keyframe=!1}else z.type="audio";z.size>0&&(B[F++]=z),++I<O?k+=b[C]:(I=0,k=0,T++,3*A+1<S.length&&T+1>=S[3*A]&&(O=S[3*A+1],A++)),E+=N,C++}F<B.length?c.samples=B.slice(0,F):c.samples=B,c.extraData&&c.samples.length>0&&this.movie.addTrack(c)}}}}}}],[{key:"_getEntries",value:function(t,e){var n=[],r=t.getAtom(e);return null!==r&&(n=r.entries),n}}]),t}();t.exports=m}).call(this,n(3).Buffer)},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(50),f=n(35),h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],d=[0,1,2,3,4,5,6,8],p=function(t){(0,o.default)(n,t);var e=c(n);function n(t){var r;return(0,i.default)(this,n),(r=e.call(this)).extraData=t,r.rateIndex=null,r.sampleRate=null,r.channelsIndex=null,r.channels=null,r.profileObjectType=null,r}return(0,a.default)(n,[{key:"type",value:function(){return f.CODEC_AAC}},{key:"parse",value:function(){var t=this.extraData[0],e=this.extraData[1];this.profileObjectType=(248&t)>>3,this.rateIndex=((7&t)<<1)+((128&e)>>7&1),this.sampleRate=h[this.rateIndex]||null,this.channelsIndex=(127&e)>>3,this.channels=d[this.channelsIndex]||null}},{key:"codec",value:function(){return"mp4a.40.".concat(this.profileObjectType)}}]),n}(l);t.exports=p},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(50),f=n(35);var h=function(t){(0,o.default)(n,t);var e=c(n);function n(t){var r;return(0,i.default)(this,n),(r=e.call(this)).extraData=t,r._units=[],r._pos=0,r}return(0,a.default)(n,[{key:"type",value:function(){return f.CODEC_H264}},{key:"parse",value:function(){this._pos=5;for(var t=31&this.extraData[this._pos++],e=0;e<t;e++)this._units.push(this._readNalUnit());for(var n=this.extraData[this._pos++],r=0;r<n;r++)this._units.push(this._readNalUnit())}},{key:"units",value:function(){return this._units}},{key:"codec",value:function(){for(var t,e,n="",r=1;r<4;r++)n+=(t=this.extraData[r].toString(16),e=2,"0".repeat(Math.max(0,e-t.length))+t);return"avc1.".concat(n)}},{key:"_readNalUnit",value:function(){var t=this.extraData.readUInt16BE(this._pos);this._pos+=2;var e=this.extraData.slice(this._pos,this._pos+t);return this._pos+=t,e}}]),n}(l);t.exports=h},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=r(n(5)),s=r(n(6)),u=r(n(4));function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var n,r=(0,u.default)(t);if(e){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var l=n(50),f=n(35),h=function(t){(0,o.default)(n,t);var e=c(n);function n(t){var r;return(0,i.default)(this,n),(r=e.call(this)).extraData=t,r._units=[],r._pos=0,r}return(0,a.default)(n,[{key:"type",value:function(){return f.CODEC_H265}},{key:"parse",value:function(){this._pos=22;for(var t=this.extraData[this._pos++],e=0;e<t;e++){var n=63&this.extraData[this._pos++],r=this.extraData.readUInt16BE(this._pos);this._pos+=2;for(var i=0;i<r;i++){var a=this._readNalUnit();32!==n&&33!==n&&34!==n||this._units.push(a)}}}},{key:"units",value:function(){return this._units}},{key:"codec",value:function(){for(var t=this.extraData[1],e=1===(t>>5&1),n=this.extraData.readUInt32LE(2).toString(16).replace(/0+$/,""),r=this.extraData[12],i=[],a=6;a<12;a++)i.push(this.extraData[a]);for(var o=0,s=i.length-1;s>0;s--)if(i[s]>0){o=s;break}for(var u=["hvc1",(t>>6)+(31&t),n,"".concat(e?"H":"L").concat(r)],c=0;c<=o;c++)u.push(i[c].toString(16).replace(/0+$/,""));return u.join(".")}},{key:"_readNalUnit",value:function(){var t=this.extraData.readUInt16BE(this._pos);this._pos+=2;var e=this.extraData.slice(this._pos,this._pos+t);return this._pos+=t,e}}]),n}(l);t.exports=h},function(t,e,n){"use strict";(function(e){var r=n(0),i=r(n(1)),a=r(n(2)),o=n(201),s=n(99),u=n(43),c=n(32),l=n(33),f=n(27),h=n(26),d=n(34),p=n(49),v=function(){function t(e){(0,i.default)(this,t),this.source=e,this.reader=d.create(this.source)}return(0,a.default)(t,[{key:"parse",value:function(){var t=this;return this._parseHeader(),this._createMovie(),this._parseBody(),[this.videoTrack,this.audioTrack].forEach(function(e){e.extraData&&e.samples.length>0&&(e.sortSamples(),e.ensureDuration(),t.movie.addTrack(e))}),this.movie.ensureDuration(),this.movie}},{key:"_parseHeader",value:function(){var t=e.allocUnsafe(s.HEADER_SIZE);if(this.reader.read(t,0),t.toString("ascii",0,3)!==s.HEADER_PREFIX||t[3]!==s.HEADER_VERSION)throw new Error("FLV header not found");this.pos=t[8]}},{key:"_createMovie",value:function(){this.movie=new u,this.movie.timescale=s.MOVIE_TIMESCALE,this.videoTrack=new l,this.videoTrack.timescale=s.MOVIE_TIMESCALE,this.audioTrack=new c,this.audioTrack.timescale=s.MOVIE_TIMESCALE}},{key:"_parseBody",value:function(){for(var t=e.allocUnsafe(15),n=this.reader.size();this.pos<n;){this.pos+=this.reader.read(t,this.pos);var r=t[4];if(void 0===r)break;var i=t.readUIntBE(5,3),a=(t[11]<<24)+t.readUIntBE(8,3);s.TYPE_SCRIPT===r?this._parseScript(i):s.TYPE_AUDIO===r?this._parseAudio(i,a):s.TYPE_VIDEO===r&&this._parseVideo(i,a),this.pos+=i}}},{key:"_parseScript",value:function(t){var n=e.allocUnsafe(t);this.reader.read(n,this.pos);var r=o.parse(n);if(r&&r.length>1){var i=r[1];if(void 0!==i.duration){var a=i.duration*s.MOVIE_TIMESCALE;this.movie.duration=a,this.videoTrack.duration=a,this.audioTrack.duration=a}void 0!==i.width&&(this.videoTrack.width=i.width),void 0!==i.height&&(this.videoTrack.height=i.height)}}},{key:"_parseAudio",value:function(t,n){var r=e.allocUnsafe(2);this.reader.read(r,this.pos);var i=r[0],a=1&i,o=(2&i)>>1,u=(12&i)>>2,c=(240&i)>>4;if(s.AUDIO_FORMAT_AAC===c)if(0===r[1]){this.audioTrack.channels=1===a?2:1,this.audioTrack.sampleRate=5512.5*(1<<u)<<0,this.audioTrack.sampleSize=1===o?16:8;var l=e.allocUnsafe(4+t-2);l.write("mp4a"),this.reader.read(l,this.pos+2,4),this.audioTrack.extraData=l,this.audioTrack.codec=p.parse(l).codec()}else{var h=Object.create(f.prototype);h.timestamp=n,h.timescale=this.audioTrack.timescale,h.size=t-2,h.offset=this.pos+2,0<h.size&&this.audioTrack.samples.push(h)}}},{key:"_parseVideo",value:function(t,n){var r=e.allocUnsafe(5);this.reader.read(r,this.pos);var i=r[0],a=15&i,o=(240&i)>>4,u=r.readUIntBE(2,3);if(s.VIDEO_FORMAT_H264===a)if(0===r[1]){var c=e.allocUnsafe(4+t-5);c.write("avcC"),this.reader.read(c,this.pos+5,4),this.videoTrack.extraData=c,this.videoTrack.codec=p.parse(c).codec()}else{var l=Object.create(h.prototype);l.timestamp=n,l.timescale=this.videoTrack.timescale,l.size=t-5,l.offset=this.pos+5,l.compositionOffset=u,l.keyframe=1===o,0<l.size&&this.videoTrack.samples.push(l)}}}]),t}();t.exports=v}).call(this,n(3).Buffer)},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=function(){function t(e){(0,i.default)(this,t),this.buffer=e,this.pos=0}return(0,a.default)(t,[{key:"read",value:function(){for(var t=[];this.pos<this.buffer.length;)t.push(this._readByType(this._readByte()));return t}},{key:"_readByType",value:function(t){switch(t){case 0:return this._readDouble();case 1:return this._readBoolean();case 2:return this._readString();case 3:return this._readObject();case 5:return null;case 6:return;case 13:return null;case 7:return this._readReference();case 8:return this._readEcmaArray();case 10:return this._readStrictArray();case 11:return this._readDate();case 12:return this._readLongString();case 15:return this._readXmlDocument()}}},{key:"_readByte",value:function(){return this.buffer[this.pos++]}},{key:"_readDouble",value:function(){var t=this.buffer.readDoubleBE(this.pos);return this.pos+=8,t}},{key:"_readBoolean",value:function(){return 0!==this._readByte()}},{key:"_readString",value:function(){var t=this.buffer.readUInt16BE(this.pos);this.pos+=2;var e=this.buffer.toString("utf8",this.pos,this.pos+t);return this.pos+=t,e}},{key:"_readObject",value:function(){var t,e,n={};do{t=this._readString(),9!==(e=this._readByte())&&(n[t]=this._readByType(e))}while(9!==e);return n}},{key:"_readReference",value:function(){var t=this.buffer.readUInt16BE(this.pos);return this.pos+=2,"Reference #".concat(t)}},{key:"_readEcmaArray",value:function(){return this.pos+=4,this._readObject()}},{key:"_readStrictArray",value:function(){var t=this.buffer.readUInt32BE(this.pos);this.pos+=4;for(var e=[],n=0;n<t;n++)e.push(this._readByType(this._readByte()));return e}},{key:"_readDate",value:function(){var t=this.buffer.readDoubleBE(this.pos+2);return this.pos+=10,t}},{key:"_readLongString",value:function(){var t=this.buffer.readUInt32BE(this.pos);this.pos+=4;var e=this.buffer.toString("utf8",this.pos,this.pos+t);return this.pos+=t,e}},{key:"_readXmlDocument",value:function(){return this._readLongString()}}]),t}(),s=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"parse",value:function(t){return new o(t).read()}}]),t}();t.exports=s},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=n(46),s=n(203),u=function(){function t(){(0,i.default)(this,t)}return(0,a.default)(t,null,[{key:"packetize",value:function(t,e){if(!(t instanceof o))throw new Error("Argument 1 should be instance of Fragment");return new s(t,e).packFragment()}}]),t}();t.exports=u},function(t,e,n){"use strict";(function(e){var r,i=n(0),a=i(n(1)),o=i(n(2)),s=i(n(25)),u=n(204),c=n(205),l=n(26),f=n(27),h=n(49),d=n(35),p=(r={},(0,s.default)(r,d.CODEC_AAC,15),(0,s.default)(r,d.CODEC_H264,27),(0,s.default)(r,d.CODEC_H265,36),r),v=function(){function t(n,r){(0,a.default)(this,t),this.fragment=n,this.sampleBuffers=r,this._counter=new c,this.fragment.hasAudio()?this._audioCodecInfo=h.parse(this.fragment.audioExtraData):this._audioCodecInfo=null,this.fragment.hasVideo()?(this._videoCodecInfo=h.parse(this.fragment.videoExtraData),this._videoConfig=this._buildVideoConfig()):(this._videoCodecInfo=null,this._videoConfig=e.allocUnsafe(0))}return(0,o.default)(t,[{key:"packFragment",value:function(){var t=[],n=0,r=90*this.fragment.timescale,i=this._buildHeader();t.push(i),n+=i.length;for(var a=[],o=0,s=null,u=0,c=function(){var r=this._packAudioPayload(e.concat(a,o),s,u);t.push(r),n+=r.length,a=[],o=0}.bind(this),h=0,d=this.fragment.samples.length;h<d;h++){var p=this.fragment.samples[h],v=this.sampleBuffers[h],g=r*p.timestamp/p.timescale<<0;if(p instanceof f){var m=this._convertAudioSample(v);5===a.length&&c(),0===a.length&&(s=p,u=g),a.push(m),o+=m.length}else if(p instanceof l){a.length>0&&c();var y=g+(r*p.compositionOffset/p.timescale<<0),w=this._convertVideoSample(v,p.keyframe),b=this._packVideoPayload(w,p,y,g);t.push(b),n+=b.length}}return a.length>0&&c(),e.concat(t,n)}},{key:"_convertAudioSample",value:function(t){var n=7+t.length,r=e.allocUnsafe(n);return r[0]=255,r[1]=241,r[2]=((this._audioCodecInfo.profileObjectType-1&3)<<6)+(this._audioCodecInfo.rateIndex<<2&60)+(this._audioCodecInfo.channelsIndex>>2&1)&255,r[3]=(3&this._audioCodecInfo.channelsIndex)<<6&255,r[5]=5+((7&n)<<5)&255,n>>=3,r[4]=255&n,n>>=8,r[3]+=3&n,r[6]=4092,t.copy(r,7),r}},{key:"_convertVideoSample",value:function(t,n){var r=6+t.length+(n?this._videoConfig.length:0);this._videoCodecInfo.type()===d.CODEC_H265&&r++;var i=e.allocUnsafe(r),a=0;for(i.writeUInt32BE(1,a),a+=4,this._videoCodecInfo.type()===d.CODEC_H265?(i[a++]=70,i[a++]=1):i[a++]=9,i[a++]=16,n&&(this._videoConfig.copy(i,a),a+=this._videoConfig.length),t.copy(i,a);a<i.length;){var o=i.readInt32BE(a);i.writeUInt32BE(1,a),a+=4+o}return i}},{key:"_packAudioPayload",value:function(n,r,i){var a=e.allocUnsafe(14+n.length),o=0,s=8+n.length;return a[o++]=0,a[o++]=0,a[o++]=1,a[o++]=192,a[o++]=s>>8&255,a[o++]=255&s,a[o++]=128,a[o++]=128,a[o++]=5,o+=t._writeTime(a,o,i,32),n.copy(a,o),this._packPayload(a,r,257,i)}},{key:"_packVideoPayload",value:function(n,r,i,a){var o=e.allocUnsafe(19+n.length),s=0;return o[s++]=0,o[s++]=0,o[s++]=1,o[s++]=224,o[s++]=0,o[s++]=0,o[s++]=128,o[s++]=192,o[s++]=10,s+=t._writeTime(o,s,i,48),s+=t._writeTime(o,s,a,16),n.copy(o,s),this._packPayload(o,r,256,a)}},{key:"_packPayload",value:function(t,n,r,i){var a=Math.ceil(t.length/184);n instanceof l&&184*a-8<t.length&&a++;for(var o=e.allocUnsafe(188*a),s=0,u=0;u<a;u++){var c=t.length-s,f=!1;(0===u&&n instanceof l||c<184)&&(f=!0);var h=188*u;if(o[h++]=71,o[h++]=(0===u?64:0)+(r>>8&31),o[h++]=255&r,o[h++]=this._counter.next(n)+(f?48:16),f){var d=0;if(n instanceof l&&0===u&&(d=7),c<183&&(d=Math.max(d,183-c)),o[h++]=d,0<d){var p=1,v=0;n instanceof l&&0===u&&(v=n.keyframe?80:16,p+=6,o[h+1]=i>>25&255,o[h+2]=i>>17&255,o[h+3]=i>>9&255,o[h+4]=i>>1&255,o[h+5]=(1&i)<<7|126,o[h+6]=0),o[h]=v,h+=p,p<d&&(o.fill(-1,h,h+d-p),h+=d-p)}}var g=188*(u+1)-h;0<g&&(t.copy(o,h,s,s+g),s+=g)}return o}},{key:"_buildHeader",value:function(){var n=e.allocUnsafe(376),r=0;n[r++]=71,n[r++]=64,n[r++]=0,n[r++]=16,n[r++]=0;var i=13;n[r++]=0,n[r++]=176+(i>>8&15),n[r++]=255&i,n[r++]=0,n[r++]=1,n[r++]=193,n[r++]=0,n[r++]=0,n[r++]=0,n[r++]=1,n[r++]=239,n[r++]=255,n.writeInt32BE(u.checksum(n,r-i+1,r),r),(r+=4)<188&&(n.fill(-1,r,188),r+=188-r),n[r++]=71,n[r++]=79,n[r++]=255,n[r++]=16,n[r++]=0,i=13;var a=0;return this.fragment.hasAudio()&&(i+=5,a=257),this.fragment.hasVideo()&&(i+=5,a=256),n[r++]=2,n[r++]=176+(i>>8&15),n[r++]=255&i,n[r++]=0,n[r++]=1,n[r++]=193,n[r++]=0,n[r++]=0,r+=t._writePid(n,r,a),this.fragment.hasVideo()&&(n[r++]=p[this._videoCodecInfo.type()]||0,r+=t._writePid(n,r,256)),this.fragment.hasAudio()&&(n[r++]=p[this._audioCodecInfo.type()]||0,r+=t._writePid(n,r,257)),n.writeInt32BE(u.checksum(n,r-i+1,r),r),(r+=4)<376&&n.fill(-1,r),n}},{key:"_buildVideoConfig",value:function(){for(var t=this._videoCodecInfo.units(),n=e.allocUnsafe(4*t.length+t.reduce(function(t,e){return t+e.length},0)),r=0,i=0,a=t.length;i<a;i++){var o=t[i];n.writeUInt32BE(1,r),o.copy(n,r+4),r+=o.length+4}return n}}],[{key:"_writeTime",value:function(t,e,n,r){return t[e+0]=n>>29&14|240&r|1,t[e+1]=n>>22,t[e+2]=n>>14|1,t[e+3]=n>>7,t[e+4]=n<<1|1,5}},{key:"_writePid",value:function(t,e,n){return t[e+0]=224+(n>>8&31),t[e+1]=255&n,t[e+2]=240,t[e+3]=0,4}}]),t}();t.exports=v}).call(this,n(3).Buffer)},function(t,e,n){"use strict";var r=[0,3072180484,1849393673,3643163405,3698721811,1802224919,2991425050,89147166,3102541862,267438370,3604384303,1640713003,1687882805,3548826929,178294332,3183300408,1893405004,3351695432,518034245,2851951169,2897024351,464573531,3264649046,1972065874,3358988650,2133579886,2785909603,286284391,339746169,2740837501,2054922096,3446038132,3770033048,1470882460,2391646609,965763221,1019225995,2346575503,1392223618,3857081478,1482369982,4014402234,912304567,2172479667,2217553837,858844841,3927354788,1561029792,2423075540,661713872,4267094237,1229681113,1276851911,4211537859,572568782,2503833034,679492338,2677930998,1186707707,4054219263,4109778657,1139539941,2597174504,768638444,2003863092,3228387120,424346685,2924922169,2869330471,471548707,3309109294,1914749226,3483209234,2021674774,2712013851,381406495,334203393,2767604485,2110785544,3402483980,128685944,2964739708,1771050353,3733836917,3688731499,1824543343,3051753826,50057318,3209076574,140205658,3514637655,1717623891,1664129869,3559742025,218831172,3122059328,2546378156,551249064,4194117541,1323361953,1269866943,4239220923,629875638,2459361970,791391626,2553703566,1091579779,4128108167,4083001753,1145071773,2640718736,712764052,3877483744,1342207460,2300983017,1044117485,996913395,2356572663,1431319290,3796759550,1609612486,3907878338,835403471,2262237131,2206644437,882604497,3988601564,1520499672,4007660649,1509805421,2161872480,935743332,848693370,2240530814,1554877043,3954199415,1443693647,3775972683,943097414,2401978178,2323316828,1030144344,3829432917,1398621009,2654674213,690412577,4026572588,1193106984,1112348982,4115716146,745970495,2607503931,651564291,2446054407,1223530250,4293940750,4204794128,1304285204,2493223705,596005405,240529393,3108761333,1617800696,3614469372,3525323746,1698556646,3155929579,184969455,3065718743,27715283,3632309726,1872585946,1791828932,3721454272,83272141,3018547401,2123185853,3381723065,280411316,2813033904,2734373550,367459242,3435182247,2078112163,3328194203,1904080799,2824582290,524711318,437662344,2903241612,1949151361,3274731909,2576386653,781011801,4155181140,1085720912,1172737614,4076556106,735906887,2629881155,561873531,2522891135,1329987698,4166762870,4245390952,1242974060,2469397601,606979429,3914046225,1582717461,2272270616,812505116,893230850,2183159302,1527127307,3961248783,1369871159,3871035955,1067258174,2290143290,2379257636,986535456,3823834413,1425462313,2032576965,3459999937,387787724,2684414664,2773528022,307064018,3412799455,2088169179,3251347939,1993760999,2951750634,418243310,498968048,2862638324,1938171897,3298551549,167622793,3202382221,1741044352,3504077700,3582704794,1654029726,3148889747,212729751,2970661039,101544363,3744150182,1748431778,1835447484,3665524152,56440501,3024156593,1];t.exports={checksum:function(t,e,n){e=e||0,n=n||t.length;for(var i,a,o=-1,s=e;s<n;s++)i=255&(o^t[s]),o=r[i]^o>>8&16777215;return(a=o)>>>24|a>>8&65280|a<<8&16711680|a<<24}}},function(t,e,n){"use strict";var r=n(0),i=r(n(1)),a=r(n(2)),o=n(27),s=n(26),u=function(){function t(){(0,i.default)(this,t),this._audioCounter=0,this._videoCounter=0}return(0,a.default)(t,[{key:"next",value:function(t){var e=0;return t instanceof o?(e=this._audioCounter,this._audioCounter=this._audioCounter+1&15):t instanceof s&&(e=this._videoCounter,this._videoCounter=this._videoCounter+1&15),e}}]),t}();t.exports=u},function(t,e){},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),function(){if("function"==typeof ArrayBuffer){var t=i.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!==typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var n=t.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=t[i]<<24-i%4*8;e.call(this,r,n)}else e.apply(this,arguments)}).prototype=t}}(),i.lib.WordArray)}()},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),function(){var t=i,e=t.lib.WordArray,n=t.enc;function r(t){return t<<8&4278255360|t>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i+=2){var a=e[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(a))}return r.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i<n;i++)r[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(r,2*n)}},n.Utf16LE={stringify:function(t){for(var e=t.words,n=t.sigBytes,i=[],a=0;a<n;a+=2){var o=r(e[a>>>2]>>>16-a%4*8&65535);i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var n=t.length,i=[],a=0;a<n;a++)i[a>>>1]|=r(t.charCodeAt(a)<<16-a%2*16);return e.create(i,2*n)}}}(),i.enc.Utf16)}()},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),function(){var t=i,e=t.lib.WordArray;t.enc.Base64url={stringify:function(t,e=!0){var n=t.words,r=t.sigBytes,i=e?this._safe_map:this._map;t.clamp();for(var a=[],o=0;o<r;o+=3)for(var s=(n[o>>>2]>>>24-o%4*8&255)<<16|(n[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|n[o+2>>>2]>>>24-(o+2)%4*8&255,u=0;u<4&&o+.75*u<r;u++)a.push(i.charAt(s>>>6*(3-u)&63));var c=i.charAt(64);if(c)for(;a.length%4;)a.push(c);return a.join("")},parse:function(t,n=!0){var r=t.length,i=n?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o<i.length;o++)a[i.charCodeAt(o)]=o}var s=i.charAt(64);if(s){var u=t.indexOf(s);-1!==u&&(r=u)}return function(t,n,r){for(var i=[],a=0,o=0;o<n;o++)if(o%4){var s=r[t.charCodeAt(o-1)]<<o%4*2,u=r[t.charCodeAt(o)]>>>6-o%4*2,c=s|u;i[a>>>2]|=c<<24-a%4*8,a++}return e.create(i,a)}(t,r,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),i.enc.Base64url)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(102),function(){var t=a,e=t.lib.WordArray,n=t.algo,r=n.SHA256,i=n.SHA224=r.extend({_doReset:function(){this._hash=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=r._doFinalize.call(this);return t.sigBytes-=4,t}});t.SHA224=r._createHelper(i),t.HmacSHA224=r._createHmacHelper(i)}(),a.SHA224)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(36),n(103),function(){var t=a,e=t.x64,n=e.Word,r=e.WordArray,i=t.algo,o=i.SHA512,s=i.SHA384=o.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=o._createHelper(s),t.HmacSHA384=o._createHmacHelper(s)}(),a.SHA384)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(36),function(t){var e=a,n=e.lib,r=n.WordArray,i=n.Hasher,o=e.x64.Word,s=e.algo,u=[],c=[],l=[];!function(){for(var t=1,e=0,n=0;n<24;n++){u[t+5*e]=(n+1)*(n+2)/2%64;var r=(2*t+3*e)%5;t=e%5,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)c[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,a=0;a<24;a++){for(var s=0,f=0,h=0;h<7;h++){if(1&i){var d=(1<<h)-1;d<32?f^=1<<d:s^=1<<d-32}128&i?i=i<<1^113:i<<=1}l[a]=o.create(s,f)}}();var f=[];!function(){for(var t=0;t<25;t++)f[t]=o.create()}();var h=s.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var a=t[e+2*i],o=t[e+2*i+1];a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(I=n[i]).high^=o,I.low^=a}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,v=0;v<5;v++)d^=(I=n[h+5*v]).high,p^=I.low;var g=f[h];g.high=d,g.low=p}for(h=0;h<5;h++){var m=f[(h+4)%5],y=f[(h+1)%5],w=y.high,b=y.low;for(d=m.high^(w<<1|b>>>31),p=m.low^(b<<1|w>>>31),v=0;v<5;v++)(I=n[h+5*v]).high^=d,I.low^=p}for(var S=1;S<25;S++){var D=(I=n[S]).high,_=I.low,x=u[S];x<32?(d=D<<x|_>>>32-x,p=_<<x|D>>>32-x):(d=_<<x-32|D>>>64-x,p=D<<x-32|_>>>64-x);var E=f[c[S]];E.high=d,E.low=p}var T=f[0],k=n[0];for(T.high=k.high,T.low=k.low,h=0;h<5;h++)for(v=0;v<5;v++){var I=n[S=h+5*v],A=f[S],R=f[(h+1)%5+5*v],M=f[(h+2)%5+5*v];I.high=A.high^~R.high&M.high,I.low=A.low^~R.low&M.low}I=n[0];var C=l[s];I.high^=C.high,I.low^=C.low}},_doFinalize:function(){var e=this._data,n=e.words,i=(this._nDataBytes,8*e.sigBytes),a=32*this.blockSize;n[i>>>5]|=1<<24-i%32,n[(t.ceil((i+1)/a)*a>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var o=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],l=0;l<u;l++){var f=o[l],h=f.high,d=f.low;h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),c.push(d),c.push(h)}return new r.init(c,s)},clone:function(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});e.SHA3=i._createHelper(h),e.HmacSHA3=i._createHmacHelper(h)}(Math),a.SHA3)}()},function(t,e,n){!function(e,r){var i;t.exports=(i=n(7),function(t){var e=i,n=e.lib,r=n.WordArray,a=n.Hasher,o=e.algo,s=r.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=r.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=r.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=r.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=r.create([0,1518500249,1859775393,2400959708,2840853838]),h=r.create([1352829926,1548603684,1836072691,2053994217,0]),d=o.RIPEMD160=a.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,d,b,S,D,_,x,E,T,k,I=this._hash.words,A=f.words,R=h.words,M=s.words,C=u.words,P=c.words,O=l.words;for(D=a=I[0],_=o=I[1],x=d=I[2],E=b=I[3],T=S=I[4],n=0;n<80;n+=1)k=a+t[e+M[n]]|0,k+=n<16?p(o,d,b)+A[0]:n<32?v(o,d,b)+A[1]:n<48?g(o,d,b)+A[2]:n<64?m(o,d,b)+A[3]:y(o,d,b)+A[4],k=(k=w(k|=0,P[n]))+S|0,a=S,S=b,b=w(d,10),d=o,o=k,k=D+t[e+C[n]]|0,k+=n<16?y(_,x,E)+R[0]:n<32?m(_,x,E)+R[1]:n<48?g(_,x,E)+R[2]:n<64?v(_,x,E)+R[3]:p(_,x,E)+R[4],k=(k=w(k|=0,O[n]))+T|0,D=T,T=E,E=w(x,10),x=_,_=k;k=I[1]+d+E|0,I[1]=I[2]+b+T|0,I[2]=I[3]+S+D|0,I[3]=I[4]+a+_|0,I[4]=I[0]+o+x|0,I[0]=k},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,n){return t^e^n}function v(t,e,n){return t&e|~t&n}function g(t,e,n){return(t|~e)^n}function m(t,e,n){return t&n|e&~n}function y(t,e,n){return t^(e|~n)}function w(t,e){return t<<e|t>>>32-e}e.RIPEMD160=a._createHelper(d),e.HmacRIPEMD160=a._createHmacHelper(d)}(Math),i.RIPEMD160)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(51),n(52),function(){var t=a,e=t.lib,n=e.Base,r=e.WordArray,i=t.algo,o=i.SHA1,s=i.HMAC,u=i.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,i=s.create(n.hasher,t),a=r.create(),o=r.create([1]),u=a.words,c=o.words,l=n.keySize,f=n.iterations;u.length<l;){var h=i.update(e).finalize(o);i.reset();for(var d=h.words,p=d.length,v=h,g=1;g<f;g++){v=i.finalize(v),i.reset();for(var m=v.words,y=0;y<p;y++)d[y]^=m[y]}a.concat(h),c[0]++}return a.sigBytes=4*l,a}});t.PBKDF2=function(t,e,n){return u.create(n).compute(t,e)}}(),a.PBKDF2)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.mode.CFB=function(){var t=a.lib.BlockCipherMode.extend();function e(t,e,n,r){var i,a=this._iv;a?(i=a.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var o=0;o<n;o++)t[e+o]^=i[o]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i,r),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,a=t.slice(n,n+i);e.call(this,t,n,i,r),this._prevBlock=a}}),t}(),a.mode.CFB)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.mode.CTR=function(){var t=a.lib.BlockCipherMode.extend(),e=t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0);var o=a.slice(0);n.encryptBlock(o,0),a[r-1]=a[r-1]+1|0;for(var s=0;s<r;s++)t[e+s]^=o[s]}});return t.Decryptor=e,t}(),a.mode.CTR)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.mode.CTRGladman=function(){var t=a.lib.BlockCipherMode.extend();function e(t){if(255===(t>>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}var n=t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(o);var s=o.slice(0);r.encryptBlock(s,0);for(var u=0;u<i;u++)t[n+u]^=s[u]}});return t.Decryptor=n,t}(),a.mode.CTRGladman)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.mode.OFB=function(){var t=a.lib.BlockCipherMode.extend(),e=t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,a=this._keystream;i&&(a=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(a,0);for(var o=0;o<r;o++)t[e+o]^=a[o]}});return t.Decryptor=e,t}(),a.mode.OFB)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.mode.ECB=function(){var t=a.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),t.Decryptor=t.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),t}(),a.mode.ECB)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.pad.AnsiX923={pad:function(t,e){var n=t.sigBytes,r=4*e,i=r-n%r,a=n+i-1;t.clamp(),t.words[a>>>2]|=i<<24-a%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},a.pad.Ansix923)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.pad.Iso10126={pad:function(t,e){var n=4*e,r=n-t.sigBytes%n;t.concat(a.lib.WordArray.random(r-1)).concat(a.lib.WordArray.create([r<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},a.pad.Iso10126)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.pad.Iso97971={pad:function(t,e){t.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(t,e)},unpad:function(t){a.pad.ZeroPadding.unpad(t),t.sigBytes--}},a.pad.Iso97971)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){var e=t.words,n=t.sigBytes-1;for(n=t.sigBytes-1;n>=0;n--)if(e[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},a.pad.ZeroPadding)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),a.pad.NoPadding={pad:function(){},unpad:function(){}},a.pad.NoPadding)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(13),function(t){var e=a,n=e.lib.CipherParams,r=e.enc.Hex;e.format.Hex={stringify:function(t){return t.ciphertext.toString(r)},parse:function(t){var e=r.parse(t);return n.create({ciphertext:e})}}}(),a.format.Hex)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(22),n(23),n(19),n(13),function(){var t=a,e=t.lib.BlockCipher,n=t.algo,r=[],i=[],o=[],s=[],u=[],c=[],l=[],f=[],h=[],d=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,a=0;for(e=0;e<256;e++){var p=a^a<<1^a<<2^a<<3^a<<4;p=p>>>8^255&p^99,r[n]=p,i[p]=n;var v=t[n],g=t[v],m=t[g],y=257*t[p]^16843008*p;o[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,u[n]=y<<8|y>>>24,c[n]=y,y=16843009*m^65537*g^257*v^16843008*n,l[p]=y<<24|y>>>8,f[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,d[p]=y,n?(n=v^t[t[t[m^v]]],a^=t[t[a]]):n=a=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],v=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,i=4*((this._nRounds=n+6)+1),a=this._keySchedule=[],o=0;o<i;o++)o<n?a[o]=e[o]:(c=a[o-1],o%n?n>6&&o%n==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=p[o/n|0]<<24),a[o]=a[o-n]^c);for(var s=this._invKeySchedule=[],u=0;u<i;u++){if(o=i-u,u%4)var c=a[o];else c=a[o-4];s[u]=u<4||o<=4?c:l[r[c>>>24]]^f[r[c>>>16&255]]^h[r[c>>>8&255]]^d[r[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,s,u,c,r)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,l,f,h,d,i),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,a,o,s){for(var u=this._nRounds,c=t[e]^n[0],l=t[e+1]^n[1],f=t[e+2]^n[2],h=t[e+3]^n[3],d=4,p=1;p<u;p++){var v=r[c>>>24]^i[l>>>16&255]^a[f>>>8&255]^o[255&h]^n[d++],g=r[l>>>24]^i[f>>>16&255]^a[h>>>8&255]^o[255&c]^n[d++],m=r[f>>>24]^i[h>>>16&255]^a[c>>>8&255]^o[255&l]^n[d++],y=r[h>>>24]^i[c>>>16&255]^a[l>>>8&255]^o[255&f]^n[d++];c=v,l=g,f=m,h=y}v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^n[d++],m=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^n[d++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^n[d++],t[e]=v,t[e+1]=g,t[e+2]=m,t[e+3]=y},keySize:8});t.AES=e._createHelper(v)}(),a.AES)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(22),n(23),n(19),n(13),function(){var t=a,e=t.lib,n=e.WordArray,r=e.BlockCipher,i=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=i.DES=r.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;n<56;n++){var r=o[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],a=0;a<16;a++){var c=i[a]=[],l=u[a];for(n=0;n<24;n++)c[n/6|0]|=e[(s[n]-1+l)%28]<<31-n%6,c[4+(n/6|0)]|=e[28+(s[n+24]-1+l)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],a=this._lBlock,o=this._rBlock,s=0,u=0;u<8;u++)s|=c[u][((o^i[u])&l[u])>>>0];this._lBlock=o,this._rBlock=a^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<<t}function d(t,e){var n=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<<t}t.DES=r._createHelper(f);var p=i.TripleDES=r.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=f.createEncryptor(n.create(e)),this._des2=f.createEncryptor(n.create(r)),this._des3=f.createEncryptor(n.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=r._createHelper(p)}(),a.TripleDES)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(22),n(23),n(19),n(13),function(){var t=a,e=t.lib.StreamCipher,n=t.algo,r=n.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var a=0;i<256;i++){var o=i%n,s=e[o>>>2]>>>24-o%4*8&255;a=(a+r[i]+s)%256;var u=r[i];r[i]=r[a],r[a]=u}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+t[e=(e+1)%256])%256;var a=t[e];t[e]=t[n],t[n]=a,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}t.RC4=e._createHelper(r);var o=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)i.call(this)}});t.RC4Drop=e._createHelper(o)}(),a.RC4)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(22),n(23),n(19),n(13),function(){var t=a,e=t.lib.StreamCipher,n=t.algo,r=[],i=[],o=[],s=n.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)u.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var a=e.words,o=a[0],s=a[1],c=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,h=l<<16|65535&c;for(i[0]^=c,i[1]^=f,i[2]^=l,i[3]^=h,i[4]^=c,i[5]^=f,i[6]^=l,i[7]^=h,n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(t,e){var n=this._X;u.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8),t[e+i]^=r[i]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,n=0;n<8;n++)i[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<i[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<i[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<i[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<i[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<i[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<i[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<i[6]>>>0?1:0)|0,this._b=e[7]>>>0<i[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],a=65535&r,s=r>>>16,u=((a*a>>>17)+a*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=u^c}t[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,t[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,t[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,t[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,t[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,t[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,t[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,t[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.Rabbit=e._createHelper(s)}(),a.Rabbit)}()},function(t,e,n){!function(e,r,i){var a;t.exports=(a=n(7),n(22),n(23),n(19),n(13),function(){var t=a,e=t.lib.StreamCipher,n=t.algo,r=[],i=[],o=[],s=n.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var a=e.words,o=a[0],s=a[1],c=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=c>>>16|4294901760&l,h=l<<16|65535&c;for(r[0]^=c,r[1]^=f,r[2]^=l,r[3]^=h,r[4]^=c,r[5]^=f,r[6]^=l,r[7]^=h,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(t,e){var n=this._X;u.call(this),r[0]=n[0]^n[5]>>>16^n[3]<<16,r[1]=n[2]^n[7]>>>16^n[5]<<16,r[2]=n[4]^n[1]>>>16^n[7]<<16,r[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8),t[e+i]^=r[i]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,n=0;n<8;n++)i[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<i[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<i[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<i[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<i[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<i[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<i[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<i[6]>>>0?1:0)|0,this._b=e[7]>>>0<i[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],a=65535&r,s=r>>>16,u=((a*a>>>17)+a*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);o[n]=u^c}t[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,t[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,t[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,t[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,t[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,t[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,t[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,t[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.RabbitLegacy=e._createHelper(s)}(),a.RabbitLegacy)}()},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(16),a=r(n(71)),o=r(n(100)),s=r(n(101)),u=r(n(104)),c=n(40).SM3,l=function(t){var e=t.wsURL,n=t.rtspURL,r=null,l=t.isTalkService,f=t.speed,h=6,d=null,p=null,v=0,g=0,m=!1,y=!1,w=t.RTSP_STATE,b=-1!==n.search("&srctype=raw"),S=new a.default,D=t.workerManager,_="",x=[],E=1,T=function(){},k={},I="Options",A=null,R=null,M="",C={},P=null,O=null,B=null,F=null,L=null,j=null,N=!0,U={},z="",V=!1,H=0,W=0,Y="",q=new o.default,X=!1,G=new Function,Q=!1,Z=null;if(t.isRecord){["init","sendSdpInfo","parseRTPData","setCallback"].forEach(function(t,e){D[t]=function(){}});var K=1048576;q.postMessage({type:"init",options:{singleSize:500*K,nameOptions:t.nameOptions||{fileName:t.fileName,namedBy:"date",nameFormat:["ymd_his"]},limitOptions:{limitBy:"count",count:10}}}),q.onMessage=function(t){switch(t.type){case"pendding":G(t);break;case"download":ot(t.data.name,t.data.buffer);break;case"closed":G(t),X=!1}}}t.speed>1&&t.isDownLoad&&(["parseRTPData"].forEach(function(t,e){D[t]=function(){}}),K=1048576,q.postMessage({type:"init",options:{singleSize:500*K,nameOptions:{fileName:t.fileName,namedBy:"date",nameFormat:["ymd_his"]},limitOptions:{limitBy:"count",count:10}}}),q.onMessage=function(t){switch(t.type){case"pendding":G(t);break;case"download":ot(t.data.name,t.data.buffer);break;case"closed":G(t),X=!1}});function $(){}function J(t,e,r,i){var a="";switch(t){case"OPTIONS":case"TEARDOWN":case"GET_PARAMETER":case"SET_PARAMETERS":a=t+" "+n+" RTSP/1.0\r\nCSeq: "+E+Y+"\r\n"+_+"\r\n";break;case"DESCRIBE":a=t+" "+n+" RTSP/1.0\r\nCSeq: "+E+Y,!0===l&&(a+="\r\nRequire: www.onvif.org/ver20/backchannel"),a=a+"\r\n"+_+"\r\n";break;case"SETUP":a=t+" "+n+"/trackID="+e+" RTSP/1.0\r\nCSeq: "+E+Y+"\r\n"+_+"Transport: DH/AVP/TCP;unicast;interleaved="+2*e+"-"+(2*e+1)+"\r\n",a+=0!=R?"Session: "+R+"\r\n\r\n":"\r\n";break;case"PLAY":a=t+" "+n+" RTSP/1.0\r\nCSeq: "+E+Y+"\r\nSession: "+R+"\r\n",f&&(a+="Speed: "+f+"\r\n"),void 0!=i&&0!=i?(a+="Range:".concat(b?"byte":"npt","=").concat(i,"-\r\n"),a+=_+"\r\n"):a+=_+"\r\n";break;case"PAUSE":a=t+" "+n+" RTSP/1.0\r\nCSeq: "+E+Y+"\r\nSession: "+R+"\r\n\r\n";break;case"SCALE":a="PLAY "+n+" RTSP/1.0\r\nCSeq: "+E+Y+"\r\nSession: "+R+"\r\n",a+=i<8?"Speed: "+i+"\r\n":"Scale: "+i+"\r\n",a+=_+"\r\n"}return a}function tt(t){var e,r=t.search("CSeq: ")+5;if(E=parseInt(t.slice(r,r+10))+1,(e=function(t){var e={},n=0,r=0,i=null,a=null;if(-1!==t.search("Content-Type: application/sdp")){var o=t.split("\r\n\r\n");a=o[0]}else a=t;var s=a.split("\r\n"),u=s[0].split(" ");if(u.length>2&&(e.ResponseCode=parseInt(u[1]),e.ResponseMessage=u[2]),e.ResponseCode===w.OK){for(n=1;n<s.length;n++)if("Public"===(i=s[n].split(":"))[0])e.MethodsSupported=i[1].split(",");else if("CSeq"===i[0])e.CSeq=parseInt(i[1]);else if("Content-Type"===i[0])e.ContentType=i[1],-1!==e.ContentType.search("application/sdp")&&(e.SDPData=at(t));else if("Content-Length"===i[0])e.ContentLength=parseInt(i[1]);else if("Content-Base"===i[0]){var c=s[n].search("Content-Base:");-1!==c&&(e.ContentBase=s[n].substr(c+13))}else if("Session"===i[0]){var l=i[1].split(";");e.SessionID=parseInt(l[0])}else if("Transport"===i[0]){var f=i[1].split(";");for(r=0;r<f.length;r++){var h=f[r].search("interleaved=");if(-1!==h){var d=f[r].substr(h+12),p=d.split("-");p.length>1&&(e.RtpInterlevedID=parseInt(p[0]),e.RtcpInterlevedID=parseInt(p[1]))}}}else if("RTP-Info"===i[0]){i[1]=s[n].substr(9);var v=i[1].split(",");for(e.RTPInfoList=[],r=0;r<v.length;r++){var g=v[r].split(";"),m={},y=0;for(y=0;y<g.length;y++){var b=g[y].search("url=");-1!==b&&(m.URL=g[y].substr(b+4)),-1!==(b=g[y].search("seq="))&&(m.Seq=parseInt(g[y].substr(b+4)))}e.RTPInfoList.push(m)}}}else if(e.ResponseCode===w.UNAUTHORIZED)for(n=1;n<s.length;n++)if("CSeq"===(i=s[n].split(":"))[0])e.CSeq=parseInt(i[1]);else if("WWW-Authenticate"===i[0]){var S=i[1].split(",");for(r=0;r<S.length;r++){var D=S[r].search("Digest realm=");if(-1!==D){var _=S[r].substr(D+13).split('"');e.Realm=_[1]}if(-1!==(D=S[r].search("nonce="))){var x=S[r].substr(D+6).split('"');e.Nonce=x[1]}}}return e}(t)).ResponseCode===w.UNAUTHORIZED&&""===_)!function(t,e){var r=U.username,a=U.passWord,o={Method:null,Realm:null,Nonce:null,Uri:null},u=null;o={Method:I.toUpperCase(),Realm:t.Realm,Nonce:t.Nonce,Uri:n};var l=null,f=e&&e.match(/algorithm=[^,\s]+/g);if(f){var h={256:function(t){return s.default.SHA256(t).toString()},SM3:function(t){return c.digest(t,"utf8","hex")}};["256","SM3"].some(function(t){return f.some(function(e){if(e.match(t))return o.algorithm=e,l=h[t],!0})})}if(l){var d=function(t){for(var e="",n=window.crypto||window.msCrypto;e.length<t;){var r=(Math.random().toString().substr(2)-0).toString();n&&(r=n.getRandomValues(new Uint32Array(1))[0].toString()),"0"!==r&&(e+=r)}return e.substr(0,t)}(32),p="00000001",v=o.Method+":"+o.Uri,g=(e+"qop=auth").match(/qop=([^,\s]+)/)[1].replace(/"/g,""),m=l(r+":"+o.Realm+":"+a).toLowerCase(),y=[o.Nonce,p,d,g].join(":"),w=l(v).toLowerCase();u=l(m+":"+y+":"+w).toLowerCase(),l=[o.algorithm,'cnonce="'+d+'"',"qop="+g,"nc="+p]}else u=(0,i.formAuthorizationResponse)(r,a,o.Uri,o.Realm,o.Nonce,o.Method);_=['Authorization: Digest username="'+r+'"','realm="'+o.Realm+'"','nonce="'+o.Nonce+'"','uri="'+o.Uri+'"','response="'+u+'"'],l&&(_=_.concat(l)),_=_.join(", "),_+="\r\n",nt(J("OPTIONS",null))}(e,t);else if(e.ResponseCode===w.OK){if("Options"===I)return I="Describe",W=setTimeout(function(){T({errorCode:i.PLAYER_STATE_CODE.RTSP_NOT_FOUND})},15e3),J("DESCRIBE",null);if("Describe"===I){if(W&&clearTimeout(W),W=0,k=at(t),"undefined"!==typeof e.ContentBase&&(k.ContentBase=e.ContentBase),k.Sessions.RecordRange){var a=parseInt(k.Sessions.RecordRange);F&&F(a)}var o=0;for(o=0;o<k.Sessions.length;o+=1){var f={};"JPEG"===k.Sessions[o].CodecMime||"H264"===k.Sessions[o].CodecMime||"H265"===k.Sessions[o].CodecMime||"H264-SVC"==k.Sessions[o].CodecMime||"RAW"==k.Sessions[o].CodecMime||"SVAC2"==k.Sessions[o].CodecMime?(f.codecName=k.Sessions[o].CodecMime,"H264-SVC"===k.Sessions[o].CodecMime&&(f.codecName="H264"),"H265"!==k.Sessions[o].CodecMime&&"RAW"!==k.Sessions[o].CodecMime||$.prototype.setLiveMode("canvas"),f.trackID=k.Sessions[o].ControlURL,f.ClockFreq=k.Sessions[o].ClockFreq,f.Port=parseInt(k.Sessions[o].Port),f.Type=k.Sessions[o].Type,x.push(f)):"PCMU"===k.Sessions[o].CodecMime||-1!==k.Sessions[o].CodecMime.search("G726-16")||-1!==k.Sessions[o].CodecMime.search("G726-24")||-1!==k.Sessions[o].CodecMime.search("G726-32")||-1!==k.Sessions[o].CodecMime.search("G726-40")||"PCMA"===k.Sessions[o].CodecMime||-1!==k.Sessions[o].CodecMime.search("L16")||-1!==k.Sessions[o].CodecMime.search("G7221")||-1!==k.Sessions[o].CodecMime.search("MPA")||-1!==k.Sessions[o].CodecMime.search("G729")||-1!==k.Sessions[o].CodecMime.search("G723.1")?("PCMU"===k.Sessions[o].CodecMime?f.codecName="G.711Mu":"G726-16"===k.Sessions[o].CodecMime?f.codecName="G.726-16":"G726-24"===k.Sessions[o].CodecMime?f.codecName="G.726-24":"G726-32"===k.Sessions[o].CodecMime?f.codecName="G.726-32":"G726-40"===k.Sessions[o].CodecMime?f.codecName="G.726-40":"PCMA"===k.Sessions[o].CodecMime?f.codecName="G.711A":"L16"===k.Sessions[o].CodecMime?f.codecName="PCM":"MPA"===k.Sessions[o].CodecMime?f.codecName="MPEG2-Layer2":"G729"===k.Sessions[o].CodecMime?f.codecName="G.729":"G723.1"===k.Sessions[o].CodecMime?f.codecName="G.723":"G7221"===k.Sessions[o].CodecMime&&(f.codecName="G722.1"),f.trackID=k.Sessions[o].ControlURL,f.ClockFreq=k.Sessions[o].ClockFreq,f.Port=parseInt(k.Sessions[o].Port),f.Bitrate=parseInt(k.Sessions[o].Bitrate),f.TalkTransType=k.Sessions[o].TalkTransType,f.Type=k.Sessions[o].Type,x.push(f)):"mpeg4-generic"===k.Sessions[o].CodecMime||"MPEG4-GENERIC"===k.Sessions[o].CodecMime?(f.codecName="mpeg4-generic",f.trackID=k.Sessions[o].ControlURL,f.ClockFreq=k.Sessions[o].ClockFreq,f.Port=parseInt(k.Sessions[o].Port),f.Bitrate=parseInt(k.Sessions[o].Bitrate),f.TalkTransType=k.Sessions[o].TalkTransType,f.Type=k.Sessions[o].Type,x.push(f)):"vnd.onvif.metadata"===k.Sessions[o].CodecMime?(f.codecName="MetaData",f.trackID=k.Sessions[o].ControlURL,f.ClockFreq=k.Sessions[o].ClockFreq,f.Port=parseInt(k.Sessions[o].Port),x.push(f)):"stream-assist-frame"===k.Sessions[o].CodecMime&&(f.codecName="stream-assist-frame",f.trackID=k.Sessions[o].ControlURL,f.ClockFreq=k.Sessions[o].ClockFreq,f.Port=parseInt(k.Sessions[o].Port),x.push(f))}return!1===l?void T({errorCode:i.PLAYER_STATE_CODE.RTSP_NOT_FOUND,description:"rtsp not found"}):(I="Setup",J("SETUP",x[A=0].trackID.split("=")[1]-0))}if("Setup"===I){if(R=e.SessionID,A<x.length)return x[A].RtpInterlevedID=e.RtpInterlevedID,x[A].RtcpInterlevedID=e.RtcpInterlevedID,(A+=1)!==x.length?J("SETUP",x[A].trackID.split("=")[1]-0):(!b&&D.sendSdpInfo(x,C),!0===l&&D.setCallback("audioTalk",et),I="Play",V?J("PLAY",null,0,H):J("PLAY",null))}else"Play"===I&&(O&&O("GetPlayOptionDone"),R=e.SessionID,(Z=new u.default).onmessage=function(){nt(J("GET_PARAMETER",null))},I="Playing")}else if(e.ResponseCode===w.NOTSERVICE){if("Setup"===I&&"sendonly"===x[A].TalkTransType)return x[A].RtpInterlevedID=-1,x[A].RtcpInterlevedID=-1,A+=1,l=!1,T({errorCode:i.PLAYER_STATE_CODE.TALK_SERVICE_UNAVILABLE,description:"Talk Service Unavilable",place:"RtspClient.js"}),A<x.length?J("SETUP",x[A].trackID):(I="Play",J("PLAY",null));T({errorCode:i.PLAYER_STATE_CODE.SERVICE_UNAVILABLE,description:"Service Unavilable"})}else if(e.ResponseCode===w.NOTFOUND){if("Describe"===I||"Options"===I)return void T({errorCode:i.PLAYER_STATE_CODE.RTSP_NOT_FOUND,description:"rtsp not found"})}else if(e.ResponseCode===w.INVALID_RANGE)return void("backup"!==M&&"playback"!==M||T({errorCode:i.PLAYER_STATE_CODE.INVALID_RANGE,description:"Invalid range"}))}function et(t){!0===l&&function(t){null!==r&&r.readyState===WebSocket.OPEN&&r.send(t)}(t)}function nt(t){void 0!=t&&null!=t&&""!=t&&r&&r.readyState===WebSocket.OPEN&&(!1===y&&-1!==t.search("DESCRIBE")&&(m=!0,y=!0),void 0!=t&&r.send((0,i.stringToUint8Array)(t)))}function rt(t){var e=new Uint8Array,a=new Uint8Array(t.data);for((e=new Uint8Array(a.length)).set(a,0),v=e.length;v>0;)if(36!==e[0]){var o=String.fromCharCode.apply(null,e),s=null;if(-1!==o.indexOf("302 Moved"))return Q=!0,it(n=o.slice(o.indexOf("rtsp://"),o.indexOf("\r\n\r\n"))),$.prototype.disconnect(Q),void $.prototype.connect(Q);-1===o.indexOf("OffLine:File Over")&&-1===o.indexOf("OffLine:Internal Error")||(r.fileOver=!0,D.postRtspOver(),j&&j()),-1!==o.indexOf("OffLine:KmsUnavailable")&&T({errorCode:i.PLAYER_STATE_CODE.KMS_NOT_CONNECTED}),!0===m?(s=o.lastIndexOf("\r\n"),m=!1):s=o.search("\r\n\r\n");var u=o.search("RTSP");if(-1===u)return void(e=new Uint8Array);if(-1===s)return void(v=e.length);d=e.subarray(u,s+h),e=e.subarray(s+h),nt(tt(String.fromCharCode.apply(null,d))),v=e.length}else{if("RAW"===x[0].codecName)return void(/.aac/.test(n)?D.sendBufferToAudioWorker(e.subarray(h,e.length)):S.setMovieData(e.subarray(h,e.length)));if(!0===N&&P&&P(),N=!1,p=e.subarray(0,h),!((g=p[2]<<24|p[3]<<16|p[4]<<8|p[5])+h<=e.length))return void(v=e.length);var c=e.subarray(h,g+h),l=(c[19]<<24)+(c[18]<<16)+(c[17]<<8)+c[16]>>>0,f=Date.UTC("20"+(l>>>26),(l>>>22&15)-1,l>>>17&31,l>>>12&31,l>>>6&63,63&l)/1e3;f+=(new Date).getTimezoneOffset()/60*3600,L&&L({timestamp:f}),X&&q.postMessage({type:"addBuffer",buffer:c}),D.parseRTPData(p,c),e=e.subarray(g+h),v=e.length}}function it(t){var n="https:"===location.protocol?"wss":"ws";e=t.replace("rtsp",n)}function at(t){var e={Sessions:[]},n=(-1!==t.search("Content-Type: application/sdp")?t.split("\r\n\r\n")[1]:t).split("\r\n"),r=0,i=!1;for(r=0;r<n.length;r++){var a=n[r].split("=");if(a.length>0)switch(a[0]){case"a":var o=a[1].split(":");if(o.length>1){if("control"===o[0]){var s=n[r].search("control:");!0===i?-1!==s&&(e.Sessions[e.Sessions.length-1].ControlURL=n[r].substr(s+8)):-1!==s&&(e.BaseURL=n[r].substr(s+8))}else if("rtpmap"===o[0]){var u=o[1].split(" ");e.Sessions[e.Sessions.length-1].PayloadType=u[0];var c=u[1].split("/");e.Sessions[e.Sessions.length-1].CodecMime=c[0],c.length>1&&(e.Sessions[e.Sessions.length-1].ClockFreq=c[1])}else if("framesize"===o[0]){var l=o[1].split(" ");if(l.length>1){var f=l[1].split("-");e.Sessions[e.Sessions.length-1].Width=f[0],e.Sessions[e.Sessions.length-1].Height=f[1]}}else if("framerate"===o[0])e.Sessions[e.Sessions.length-1].Framerate=o[1];else if("fmtp"===o[0]){var h=n[r].split(" ");if(h.length<2)continue;for(var d=1;d<h.length;d++){var p=h[d].split(";"),v=0;for(v=0;v<p.length;v++){var g=p[v].search("mode=");if(-1!==g&&(e.Sessions[e.Sessions.length-1].mode=p[v].substr(g+5)),-1!==(g=p[v].search("config="))&&(e.Sessions[e.Sessions.length-1].config=p[v].substr(g+7),C.config=e.Sessions[e.Sessions.length-1].config,C.clockFreq=e.Sessions[e.Sessions.length-1].ClockFreq,C.bitrate=e.Sessions[e.Sessions.length-1].Bitrate),-1!==(g=p[v].search("sprop-vps="))&&(e.Sessions[e.Sessions.length-1].VPS=p[v].substr(g+10)),-1!==(g=p[v].search("sprop-sps="))&&(e.Sessions[e.Sessions.length-1].SPS=p[v].substr(g+10)),-1!==(g=p[v].search("sprop-pps="))&&(e.Sessions[e.Sessions.length-1].PPS=p[v].substr(g+10)),-1!==(g=p[v].search("sprop-parameter-sets="))){var m=p[v].substr(g+21).split(",");m.length>1&&(e.Sessions[e.Sessions.length-1].SPS=m[0],e.Sessions[e.Sessions.length-1].PPS=m[1])}}}}else if("range"===o[0]&&a[2]){var y=a[2].split("-")[1];e.Sessions&&y&&(e.Sessions.RecordRange=y)}}else 1===o.length&&("recvonly"===o[0]?e.Sessions[e.Sessions.length-1].TalkTransType="recvonly":"sendonly"===o[0]&&(e.Sessions[e.Sessions.length-1].TalkTransType="sendonly"));break;case"m":var w=a[1].split(" "),b={};b.Type=w[0],b.Port=w[1],b.Payload=w[3],e.Sessions.push(b),i=!0;break;case"b":if(!0===i){var S=a[1].split(":");e.Sessions[e.Sessions.length-1].Bitrate=S[1]}}}return e}function ot(t,e){t=(t=(t||Date.now())+"").split(".dav")[0];var n=new Blob([e]),r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=t+".dav",r.click(),setTimeout(function(){URL.revokeObjectURL(r.href),r=null},100),e=null}return $.prototype={setExtraError:function(t){t&&(Y="\r\nExtraError: support")},connect:function(t){r||(t&&(I="Options",m=!1,y=!1),(r=new WebSocket(e)).binaryType="arraybuffer",r.fileOver=!1,r.addEventListener("message",rt,!1),r.onopen=function(){var t="OPTIONS "+n+" RTSP/1.0\r\nCSeq: "+E+Y+"\r\n\r\n",e=(0,i.stringToUint8Array)(t);B&&B("WsConnectDone"),r.send(e)},r.onerror=function(t){T({errorCode:i.PLAYER_STATE_CODE.OPEN_WS_ERROR,type:"error",description:"Open WebSocket Error"})},r.onclose=function(t){r&&!r.fileOver&&T({errorCode:i.PLAYER_STATE_CODE.WS_CLOSED,type:"close",description:"WebSocket Closed"})})},disconnect:function(t){nt(J("TEARDOWN",null)),i.pubsub.publish("_clearTime_"),r&&(r.close(),r=null,R=null),!t&&D.terminate(),!t&&Z&&Z.terminate(),W&&clearTimeout(W)},controlPlayer:function(t){var e="",n=null;switch(z=t.command,t.command){case"PLAY":if(I="Play",D.play(),null!=t.range){e=J("PLAY",null,0,t.range);break}e=J("PLAY",null),z&&D.initStartTime();break;case"PAUSE":if("PAUSE"===I)break;I="PAUSE",e=J("PAUSE",null),D.pause();break;case"SCALE":e=J("SCALE",null,0,t.data),D.setPlaySpeed(t.data);break;case"TEARDOWN":e=J("TEARDOWN",null);break;case"audioPlay":if("start"===t.data)I="Play",e=J("PLAY",null,0,t.range);else if("stop"===t.data)e=J("TEARDOWN",null);else{if("PAUSE"===I)break;I="PAUSE",e=J("PAUSE",null)}D.controlAudio(t.command,t.data);break;case"volumn":case"audioSamplingRate":D.controlAudio(t.command,t.data);break;case"playNextFrame":D.getVideoBufferQueueSize()<5&&this.getNextFrameData(1e3),D.playNextFrame();break;case"getCurFrameInfo":n=D.getCurFrameInfo();break;case"getCapture":D.getCapture();break;case"startRecord":(X=t.data)||q.postMessage({type:"close"})}if(""!=e&&nt(e),n)return n},setLiveMode:function(t){D.setLiveMode(t)},setPlayMode:function(t,e){V=t,H=e,D.setPlayMode(t)},setSignalURL:function(t){n=t},setCallback:function(t,e){"GetFirstFrame"===t?P=e:"recordChanged"===t?G=e:"GetPlayOptionDone"===t?O=e:"WsConnectDone"===t?B=e:"GetTotalTime"===t?F=e:"UpdateTimeStamp"===t?L=e:"FileOver"===t?j=e:D.setCallback(t,e),"Error"==t&&(T=e)},setUserInfo:function(t,e){U.username=t,U.passWord=e},getNextFrameData:function(t){nt(J("PLAY",null)),setTimeout(function(){nt(J("PAUSE",null))},t)}},S.CodecCallback=function(t){C=t.AudioCodecInfo,x[0].Framerate=t.Framerate,"H264"===C.VideoCodec&&$.prototype.setLiveMode("video"),D.sendSdpInfo(x,C,t)},S.TrackCallback=function(t){var e=new Uint8Array(t.subarray(6,t.length));D.parseRTPData(t.subarray(0,6),e)},new $};e.default=l},function(t,e,n){"use strict";var r=n(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(18)),a=r(n(25)),o=n(67),s=r(n(233)),u=n(10),c=n(11);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach(function(e){(0,a.default)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var h=function(){var t={};return{subscribe:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[r]||(t[r]={}),t[r][e]||(t[r][e]=[]),n?t[r][e]=[n]:t[r][e].length=0},publish:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e||!t[r]||!t[r][e])return!1;t[r][e].forEach(function(t,e){t.apply(null,n)})},unsubscribe:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e||!t[r])return!1;if(!n&&t[r][e])t[r][e].length=0;else{var i=t[r][e]||[];i.forEach(function(t,e){t===n&&i.splice(e,1)})}}}}(),d={osdModel:{setOption:function(t){for(var e in t)this.options[e]=t[e]},CreateSuperRegions:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.canvasDraw.setRegionNum("rect",Math.abs(t)),this.SetSuperRegionProperty(e,n),0===t)return this.canvasDraw.delShapeById(),this.canvasDraw.drawShape(),this.data={},this.shapeIndex=[],this.curShapeId=-1,!1;this.canvasDraw.addChangeShapeEvent(),this.canvasDraw.drawStart("rect",this.options)},SetSuperRegionProperty:function(t,e){var n={moveEnable:!0,fillStyle:!!t&&"#000",resizeEnable:e,title:arguments.length>2&&void 0!==arguments[2]&&arguments[2]};this.setOption(n)},SetSuperRegionData:function(t,e,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];this.setOption({title:a});var o=[[e,n],[r,i]],s=this.canvasDraw.addShape(o,"rect",this.options);this.canvasDraw.drawShape();var u=this.shapeIndex;this.data[s.shapeId]=o,this.curShapeId=s.shapeId;for(var c=0,l=u.length;c<=l;c++)void 0===u[c]&&(u[c]=s.shapeId)},SelectSuperRegion:function(t){this.canvasDraw.selectedById(this.curShapeId,!1),this.curShapeId=this.shapeIndex[t],this.canvasDraw.selectedById(this.curShapeId,!0)},RedrawSelectedSuperRegion:function(){this.canvasDraw.delShapeById(this.curShapeId),this.canvasDraw.drawShape();var t=Object.keys(this.data);t[0]&&(this.canvasDraw.selectedById(t[0]),this.curShapeId=t[0]-0)},RedrawAllSuperRegions:function(){this.canvasDraw.delShapeById(),this.canvasDraw.drawShape(),this.data={},this.shapeIndex=[]},SetSuperRegionTip:function(t,e){this.setOption({title:e,resizeEnable:!1})},DeleteAllSuperRegions:function(t){var e=this;t?this.shapeIndex.forEach(function(t){e.canvasDraw.delShapeById(t)}):this.canvasDraw.delShapeById(),this.canvasDraw.drawShape(),this.data={},this.shapeIndex=[],this.curShapeId=-1,this.canvasDraw.setRegionNum("rect",0)},ActiveLocalFocus:function(t){t?this.canvasDraw.drawStart("rect"):(this.canvasDraw.delShapeById(this.curShapeId),this.canvasDraw.drawShape(),this.canvasDraw.removeShapeDrawEvent())},ActivePTZLocate:function(t){t?this.canvasDraw.drawStart("rect",{disappear:!0}):this.canvasDraw.removeShapeDrawEvent()},RegionClip:function(t,e,n,r,i,a){},ActivateReactAreaSelection:function(t,e){this.eventName="ReactAreaSelected",this.reactName=t,this.canvasDraw.drawStart("rect",{modelName:"osdModel",supportPoint:e})},DeactivateReactAreaSelection:function(){this.canvasDraw.removeShapeDrawEvent(),this.eventName="SuperRegionDataChangeded",this.reactName=""},DisableReactAreaDrawing:function(){this.canvasDraw.delShapeById(this.curShapeId),this.canvasDraw.drawShape()}},ivsModel:{CreateVideoAnalyseContainer:function(){var t=(1e6*Math.random()).toFixed();return this.containerID=t,this.data[t]={},this.EnableVideoAnalyseContainer(!0),t},ReleaseVideoAnalyseContainer:function(t){this.canvasDraw.clear(),delete this.data[t],this.shapeNum={},this.EnableVideoAnalyseContainer(!1)},EnableVideoAnalyseContainer:function(t){t?this.canvasDraw.addChangeShapeEvent():(this.canvasDraw.removeShapeEvent(),this.canvasDraw.removeShapeDrawEvent())},CreateMainVideoAnalyseShape:function(t,e,n,r,i,a){var o=this;this.containerID=t,"UserComposeShape"===n&&(n="ComposeShape");var s=(1e6*Math.random()).toFixed()+"",u=y(n,r,!0),c=u.canvasShapeType;if(a)try{if((a=JSON.parse(a)).selectType&&(u.options.selectType=a.selectType),void 0!==a.PenStyle&&(u.options.PenStyle=a.PenStyle),"LimitRectangleShape"===n&&a.limit&&6===a.limit.length){var l=a.limit,f=l[0],h=l[1],d=Math.floor(8191*l[2]/f),p=Math.floor(8191*l[3]/h),v=Math.floor(8191*l[4]/f),g=Math.floor(8191*l[5]/h);u.options.maxRect=[[0,0],[d,p]],u.options.minRect=[[0,0],[v,g]]}}catch(t){}var m={ruleType:n,type:c,relShapeId:"",eventName:e,markedName:r,subShape:{},_typeInfo:u};if(this.curShapeId=s,this.data[t][s]=m,["ParkingDetection"].includes(n))return this.drawParkingLot("ParkingDetection",s),i&&(i=JSON.parse(i||"{}").ParkingDetection,this.SetVideoAnalyseLimitRegion(t,s,i,!0)),s;if(!c)return s;if(this.shapeNum[c]||(this.shapeNum[c]=0),this.shapeNum[c]+=1,this.canvasDraw.setRegionNum(c,this.shapeNum[c]),"RegionClip"===n)return function(t,e){return new Promise(function(n,r){!function r(){if(e.width){var i=[t[1],t[2]],a=t[0],o=Math.floor(8191*a[0]/e.width),s=Math.floor(8191*a[1]/e.height);t[1][0]||t[1][1]||t[2][0]||t[2][1]||(i=[[(8191-o)/2,(8191-s)/2],[(8191-o)/2+o,(8191-s)/2+s]]);var u={resizeEnable:!0,moveEnable:!0,lockWH:{width:o,height:s},minRect:[[0,0],[o,s]]};n({pos:i,clipOptions:u})}else window.setTimeout(r,1e3)}()})}(JSON.parse(i)[r],this.resolution).then(function(t){var e=t.pos,n=t.clipOptions;o.canvasDraw.drawStart(c,n);var r=o.canvasDraw.addShape(e,"rect",n);m.relShapeId=r.shapeId,m.data=e,o.canvasDraw.drawShape()}),s;if(i&&(i=JSON.parse(i),"ScaleRectangle"===n&&i.rate&&(u.options.lockWH={width:i.rate*(9/16),height:1},i.area?delete i.rate:i=""),i&&(i=JSON.stringify(i))),i){if(i=JSON.parse(i),"OvalShape"===n){var w=i.OvalShape;i.OvalShape=[w[0],[w[1][0],w[0][1]],w[1],[w[0][0],w[1][1]]],u.options.title=u.options.ruleName}for(var b in"PointShape"===n&&(i.Point=i.Point[0],u.options.horizontalLength=200,u.options.verticalLength=200,u.options.title=u.options.ruleName),i){var S=this.canvasDraw.addShape(i[b],c,Object.assign({moveEnable:!1,resizeEnable:!1,shapeId:s,modelName:"ivsModel"},u.options));m.relShapeId=S.shapeId,m.data=i[b]}this.canvasDraw.drawShape()}else this.canvasDraw.drawStart(c,Object.assign({moveEnable:!0,resizeEnable:!0,shapeId:s,modelName:"ivsModel"},u.options));return s},AddSubVideoAnalyseShape:function(t,e,n,r,i){if(this.containerID=t,!this.data[t])return!1;if("ParkPolygon"===n||"ParkLine"===n)return this.drawParkingLot(n,e,r,i),!1;var a=(1e6*Math.random()).toFixed()+"",o=y(n,void 0),s=o.canvasShapeType,u=this.data[t][e];!function(t,e){if("GridShape"===t.ruleType){var n=e.options;n.selectType="onLine",n.composeType="GridShape"}}(u,o);var c={ruleType:s,type:s,relShapeId:"",markedName:n,eventName:u.eventName};0===Object.getOwnPropertyNames(u.subShape).length&&(c.isFirst=!0),this.curShapeId=a,u.subShape[a]=c,this.shapeNum[s]||(this.shapeNum[s]=0),this.shapeNum[s]+=1;var l=D("draw",u,c);if(Object.assign(l,{moveEnable:!0,resizeEnable:!0,shapeId:a},o.options),"LeftLane"===s||"RightLane"===s)return function(){c.data=r?JSON.parse(r)[s]:r,"LeftLane"===c.type?c.linkRight=void 0:c.linkLeft=void 0;var t=u.subShape,e=[],n=[],i=null;for(var l in t){var f=t[l];if(!f.linkLeft&&!f.linkRight){if("LeftLane"===f.type)if(void 0!==n[0]){var h=n.shift();h.linkLeft=l,f.linkRight=h.__subId,i=[f.data,h.data]}else f.__subId=l,e.unshift(f);if("RightLane"===f.type)if(void 0!==e[0]){var d=e.shift();d.linkRight=l,f.linkLeft=d.__subId,i=[d.data,f.data]}else f.__subId=l,n.unshift(f)}}i&&(this.canvasDraw.setRegionNum("lane",this.shapeNum.RightLane),r||this.canvasDraw.drawStart("lane",Object.assign({moveEnable:!0,resizeEnable:!0,shapeId:a,modelName:"ivsModel",detectLineColor:"#FF0000"},{detectLine:!0},o.options)),i=null)}.call(this),a;if("XLaneShape"===u.ruleType&&"poly"===c.type)return function(){if(this.canvasDraw.setRegionNum("lane",this.shapeNum.RightLane),r){var t=u.subShape,e=[];for(var n in t){var i=t[n];if("LeftLane"!==i.type&&"RightLane"!==i.type);else if(!i.linkDetectLine&&i.data){i.linkDetectLine=a,c.isDetectLinked=!0,e.push(i),"LeftLane"===i.type?(t[i.linkRight].linkDetectLine=a,e.push(t[i.linkRight])):"RightLane"===i.type&&(t[i.linkLeft].linkDetectLine=a,e.unshift(t[i.linkLeft]));break}}if(2!==e.length)throw new Error("XLaneShape Error occurred");var s=[];if(e[0].data.length>2){var f=JSON.parse(r).DetectLine;(s=e[0].data)[4]=f[0],s[5]=f[1]}else s=(s=(s=s.concat(e[0].data)).concat(e[1].data)).concat(JSON.parse(r).DetectLine);l.shapeId=e[1].linkLeft;var h=this.canvasDraw.addShape(s,"lane",Object.assign(l,{detectLine:!0,modelName:"ivsModel",detectLineColor:"#FF0000"}));h?(c.relShapeId=h.shapeId,e[0].relShapeId=h.shapeId,e[1].relShapeId=h.shapeId):c.relShapeId=e[0].relShapeId,c.data=JSON.parse(r).DetectLine[0],this.canvasDraw.drawShape(),D.apply(this,["show",u,c])}else this.canvasDraw.drawStart("lane",Object.assign({moveEnable:!0,resizeEnable:!0,shapeId:a,modelName:"ivsModel",detectLineColor:"#FF0000"},{drawDetectLine:!0},o.options))}.call(this),a;if(this.canvasDraw.setRegionNum(s,this.shapeNum[s]),r){for(var f in r=JSON.parse(r)){var h=S(r[f],n),d=this.canvasDraw.addShape(h,s,l);c.relShapeId=d.shapeId,c.data=h}this.canvasDraw.drawShape(),D.apply(this,["show",u,c])}else this.canvasDraw.drawStart(s,l);return a},SetShapeParam:function(t,e,n){"ParkingDetection"===e?(n.dir&&(this.parkData[t].dir=n.dir),n.num&&(this.parkData[t].num=n.num),n.name&&(this.parkData[t].name[n.index]=n.name,this.SetVideoAnalyseShapeOption(t,{parkingLotTitle:this.parkData[t].name}))):this.SetVideoAnalyseShapeOption(t,n)},SetVideoAnalyseLimitRegion:function(t,e,n,r){this.containerID=t;var i=this.data[t][e];if(!e||!i)return!1;var a=i._typeInfo&&i._typeInfo.options||{};if(r){if(!(n=n||[]).length)return!1;var o=this.canvasDraw.addShape(n,"poly",Object.assign({strokeColor:"#FFFF00",moveEnable:!1,resizeEnable:!1},a));a.maxPoly=n,i.limitShpeId=o&&o.shapeId,this.SetVideoAnalyseShapeOption(e,{maxPoly:n})}else{if(!i.limitShpeId)return!1;var s=i.limitShpeId;this.SetVideoAnalyseShapeOption(e,{maxPoly:[[0,0],[8191,0],[8191,8191],[0,8191]]}),this.canvasDraw.delShapeById(s),a.maxPoly=[],i.limitShpeId=0}this.canvasDraw.drawShape()},DeleteVideoAnalyseShape:function(t,e,n){this.containerID=t;var r=this.data[t];if(!e||!this.data[t])return!1;var i=b(r,e);if(void 0===i.mainShapeId){if(!r[e])return!1;var a=r[e].type;if(a)i.relShapeId&&("parkingLot"===a&&delete this.parkData[e],this.canvasDraw.delShapeById(i.relShapeId));else{var o=r[e].subShape;if(o)for(var s in r[e].parentsId&&this.canvasDraw.disParent(r[e].parentsId),o){var u=o[s].type;o[s].relShapeId&&this.canvasDraw.delShapeById(o[s].relShapeId),this.shapeNum[u]-=1,this.canvasDraw.setRegionNum(u,this.shapeNum[u])}delete r[e]}if(n){r[e].relShapeId="",r[e].subShapes={};var c=y(r[e].ruleType||r[e].type,r[e].markedName);this.canvasDraw.drawStart(a,Object.assign({moveEnable:!0,resizeEnable:!0},c.options))}else a&&(this.shapeNum[a]-=1,this.canvasDraw.setRegionNum(a,this.shapeNum[a]),delete r[e])}else if(a=(o=r[i.mainShapeId].subShape)[e].type,i.relShapeId&&("XLaneShape"===r[i.mainShapeId].ruleType&&"poly"===a||this.canvasDraw.delShapeById(i.relShapeId)),c=y(o[e].markedName),n){o[e].relShapeId="";var l=D("draw",r[i.mainShapeId],o[e]);Object.assign(l,{moveEnable:!0,resizeEnable:!0},c.options),this.canvasDraw.drawStart(a,l)}else{if(this.shapeNum[a]-=1,"LeftLane"===a||"RightLane"===a)this.canvasDraw.setRegionNum("lane",this.shapeNum[a]);else if("XLaneShape"===r[i.mainShapeId].ruleType&&"poly"===a){var f=r[i.mainShapeId].subShape,h=!1;for(var d in f)f[d].linkDetectLine===e&&(h=!0,f[d].linkDetectLine=void 0,f[d].relShapeId=i.relShapeId);if(h)this.canvasDraw.shape.laneShape.data.map(function(t,e){t.shapeId===i.relShapeId&&(t.data.length=4)});else this.shapeNum.lane-=1,this.canvasDraw.delShapeById(i.relShapeId)}else this.canvasDraw.setRegionNum(a,this.shapeNum[a]);delete o[e]}this.curShapeId=e,this.canvasDraw.drawShape()},DeleteAllVideoAnalyseShape:function(t){for(var e in this.containerID=t,this.canvasDraw.delShapeById(),this.data[t]={},this.parkData=null,this.shapeNum)"LeftLane"!==e&&"RightLane"!==e&&this.canvasDraw.setRegionNum(e,0);this.shapeNum={},this.canvasDraw.drawShape()},SelectVideoAnalyseShape:function(t,e,n){var r=b(this.data[t],e);void 0!==e&&(this.curShapeId=e,this.canvasDraw.selectedById(r.relShapeId,n))},SetVideoAnalyseShapeDirection:function(t,e,n){var r=this.data[t],i=b(r,e);r[i.mainShapeId]&&"lane"===r[i.mainShapeId].type&&"XLaneShape"===r[i.mainShapeId].ruleType?(this.canvasDraw.shape.laneShape.data.map(function(t,e){if(t.shapeId===i.relShapeId){var r=t.data,a=!1;switch(n){case 3:r[0][1]<r[1][1]&&(a=!0);break;case 4:r[0][1]>r[1][1]&&(a=!0)}if(a){var o=[r[0],r[1]];r[1]=o[0],r[0]=o[1];var s=[r[2],r[3]];r[3]=s[0],r[2]=s[1]}}}),this.canvasDraw.drawShape()):this.canvasDraw.setOption(i.relShapeId,{direction:n})},EnableVideoAnalyseShape:function(t,e,n){var r=b(this.data[t],e);this.curShapeId=e,this.canvasDraw.setOption(r.relShapeId,{moveEnable:n,resizeEnable:n,selected:n})},MoveVideoAnalyseShape:function(t,e){var n=this.containerID,r=b(this.data[n],t);this.curShapeId=t,this.canvasDraw.setOption(r.relShapeId,{moveEnable:e})},RedrawVideoAnalyseShape:function(t,e){this.DeleteVideoAnalyseShape(t,e,!0)},ShowVideoAnalyseShape:function(t,e,n){if(!e)return!1;var r=this.data[t],i=b(r,e);if(void 0===i.mainShapeId){var a=r[e]&&r[e].subShape;if(a)for(var o in a)this.canvasDraw.hideShape(a[o].relShapeId,!n)}""!==i.relShapeId&&this.canvasDraw.hideShape(i.relShapeId,!n)},SetVideoAnalyseShapeColor:function(t,e,n,r,i,o){if(!e)return!1;var s=b(this.data[t],e),u="#"+((1<<24)+(n<<16)+(r<<8)+i).toString(16).slice(1);""!==s.relShapeId&&this.canvasDraw.setOption(s.relShapeId,(0,a.default)({},o?"selectedColor":"strokeColor",u))},SetVideoAnalyseShapeShowName:function(t,e,n){if(!e)return!1;var r=b(this.data[t],e);""!==r.relShapeId&&this.canvasDraw.setOption(r.relShapeId,{ruleName:n})},SetVideoAnalyseShapeTip:function(t,e,n,r){if(!e)return!1;var i=b(this.data[t],e);""!==i.relShapeId&&this.canvasDraw.setOption(i.relShapeId,(0,a.default)({},r||"ruleName",n))},SetVideoAnalyseContainerTip:function(t,e){this.canvasDraw.strokeText(e,"center")},SetMaxPointNum:function(t,e,n){if(!e)return!1;var r=this.data[t],i=r[e]&&r[e]._typeInfo;i&&i.options&&(i.options.maxPointNum=n,this.canvasDraw.drawStart(i.canvasShapeType,Object.assign({moveEnable:!0,resizeEnable:!0,shapeId:e,modelName:"ivsModel"},i.options)))},SetMinPointNum:function(t,e,n){if(!e)return!1;var r=this.data[t],i=r[e]&&r[e]._typeInfo;i&&i.options&&(i.options.minPointNum=n,this.canvasDraw.drawStart(i.canvasShapeType,Object.assign({moveEnable:!0,resizeEnable:!0,shapeId:e,modelName:"ivsModel"},i.options)))},GetVideoAnalyseShapeConfigData:function(t,e){var n=this.data[t],r=null;if(n[e])if("parkingLot"===n[e].type){var i=this.parkData[e];r=function(t,e,n){for(var r=e.length,i=[],a=0;a<r;a++){var o=null;o=0===a?1===r?"vertical"===n?[t[3],t[0],t[1],t[2]]:[t[0],t[1],t[2],t[3]]:"vertical"===n?[t[3],t[0],t[4],t[5]]:[t[0],t[1],t[5],t[4]]:a===r-1?"vertical"===n?[t[2*a+3],t[2*a+2],t[1],t[2]]:[t[2*a+2],t[2*a+3],t[2],t[3]]:"vertical"===n?[t[2*a+3],t[2*a+2],t[2*a+4],t[2*a+5]]:[t[2*a+2],t[2*a+3],t[2*a+5],t[2*a+4]],i.push({name:e[a],data:o})}return i}(n[e].data.concat([]),i.name,i.dir)}else r={data:n[e].data};else{var o=function(t,e){var n=t[e],r=null,i=null,a=null,o=null;if("LeftLane"===n.type)i=t[(r=n).linkRight],a=t[r.linkDetectLine];else if("RightLane"===n.type)r=t[(i=n).linkLeft],a=t[i.linkDetectLine];else if("poly"===n.type)for(var s in a=n,t)t[s].linkDetectLine===e&&("LeftLane"===t[s].type?r=t[s]:"RightLane"===t[s].type&&(i=t[s]));r&&i&&a&&(o=(o=(o=r.relShapeId)||i.relShapeId)||a.relShapeId,r.relShapeId=o,i.relShapeId=o,a.relShapeId=o)};for(var s in n){var u=n[s].subShape;if(u[e]){u[e].relShapeId||o(u,e);var c=this.canvasDraw.getShapeById(u[e].relShapeId),l=u[e].type;"LeftLane"===l||"RightLane"===l?"LeftLane"===l?r=(0,a.default)({},u[e].markedName,c.data.slice(0,2)):"RightLane"===l&&(r=(0,a.default)({},u[e].markedName,c.data.slice(2,4))):"poly"===l&&u[e].isDetectLinked?r=(0,a.default)({},u[e].markedName,c.data.slice(4,6)):(u[e].data=c.data,r=(0,a.default)({},u[e].markedName,u[e].data));break}}}return JSON.stringify(r)},SetVideoAnalyseShapeOption:function(t,e){var n=this.containerID,r=b(this.data[n],t);""!==r.relShapeId&&this.canvasDraw.setOption(r.relShapeId,e)},ChangeLimitOption:function(t,e){var n,r=this.data[this.containerID][t],i=r.subShape;if("CalibrateRegion"===r.ruleType&&"poly"===e.type)for(n in i)"line"===i[n].type&&this.SetVideoAnalyseShapeOption(n,{maxPoly:e.data});if("ComposeShape"===r.ruleType&&e.isFirst)for(n in i)if(!i[n].isFirst){var a=e.data;if(2===e.data.length){var o=[a[0],[a[0][0],a[1][1]],a[1],[a[1][0],a[0][1]]];this.SetVideoAnalyseShapeOption(n,{maxPoly:o})}else this.SetVideoAnalyseShapeOption(n,{maxPoly:a})}if("DRectSmall"===e.markedName)for(n in i)"DRectBig"===i[n].markedName&&this.SetVideoAnalyseShapeOption(n,{minRect:e.data});else if("DRectBig"===e.markedName)for(n in i)"DRectSmall"===i[n].markedName&&this.SetVideoAnalyseShapeOption(n,{maxRect:e.data})},drawParkingLot:function(t,e,n,r){if("ParkingDetection"===t)this.parkData||(this.parkData={},this.shapeNum.parkingLot=0),this.shapeNum.parkingLot+=1,this.canvasDraw.setRegionNum("parkingLot",this.shapeNum.parkingLot),this.parkData[e]={data:[],name:[]};else{if(n=JSON.parse(n),-1!==this.parkData[e].name.indexOf("name"))return;this.parkData[e].name.push(r);var i=function(t,e){if("vertical"!==e)return t;if(4===t.length){var n=t.splice(0,1);Array.prototype.push.apply(t,n)}else 2===t.length&&t.reverse();return t}(Object.values(n)[0],this.parkData[e].dir);Array.prototype.push.apply(this.parkData[e].data,i);var a=this.data[this.containerID][e]._typeInfo.options||{};if(this.parkData[e].name.length===this.parkData[e].num){var o=this.parkData[e],s=this.canvasDraw.addShape(this.parkData[e].data,"parkingLot",{resizeEnable:!0,moveEnable:!0,parkingDirection:o.dir,parkingNumber:o.num,parkingLotTitle:o.name,maxPoly:a.maxPoly||[]});this.data[this.containerID][e].relShapeId=s.shapeId,this.data[this.containerID][e].data=this.parkData[e].data,this.canvasDraw.drawShape()}}}},previewModel:{SetIVSEnable:function(t){this.ivsEnable=t,this.clear(),t||this.clearDetect()},SetRuleEnable:function(t){this.ruleEnable=t,t||this.clear()},SetIVSTrackEnable:function(t){},ActivateAutoFocus:function(t){this.focusEnable=t},SetBoxTailEnable:function(t){this.boxTailEnable=t},SetDetectEnable:function(t){this.detectEnable=t,t||this.clearDetect()},SetFloorIdentificationEnable:function(t){this.floorIdentificationEnable=t;var e=this.highThrowData;for(var n in e)(function(t){var e=!0;return-1===n.indexOf("Floor")&&(e=!1),e})()&&(e[n].bling||(this.ivsCanvasDraw.delShapeById(e[n].shapeId),delete this.highThrowData[n]))},SetAFEnable:function(t){if(this.AFEnable=t,!t){var e=this.AFData;e.curAF.shapeId&&(this.ivsCanvasDraw.delShapeById(e.curAF.shapeId),this.ivsCanvasDraw.delShapeById(e.maxAF.shapeId)),this.AFData={curAF:{},maxAF:{}},this.drawAF()}}},motionModel:{SetNumberOfGrid:function(t,e){this.canvasDraw.removeShapeEvent(),this.options.row=t,this.options.column=e,this.canvasDraw.drawGrid(t,e)},CreateFilledGridAreas:function(t){var e=t.split(" "),n=[];e.forEach(function(t,e){var r=t.split("-")[1].split(":");n.push({Region:r.map(function(t){return t-0})})}),this.canvasDraw.addShape(n,"motionDetect",this.options),this.canvasDraw.drawStart("motionDetect")},SetCurrentDrawId:function(t){this.curAreaID=t,this.canvasDraw.shape.motionDetectShape.setCurrentDrawId(t)},ResetGridArea:function(t){this.canvasDraw.shape.motionDetectShape.deleteMotionDetect(t)},ResetAllGridArea:function(){this.canvasDraw.shape.motionDetectShape.deleteMotionDetect()}}},p={osdModel:function(){this.num=0,this.options={modelName:"osdModel",moveEnable:!0,resizeEnable:!0,fillStyle:!1,title:!1},this.curShapeId=-1,this.data={},this.shapeIndex=[],this.eventName="SuperRegionDataChangeded",this.reactName="",this.receiveData=function(t){var e=t.event.type,n=t.shapeId,r=this.shapeIndex,i=r.indexOf(n),a=t.data;switch(this.curShapeId=n,e){case"drawFinish":this.data[n]=t.data;for(var o=0,s=r.length;o<=s;o++)if(void 0===r[o]){r[o]=n,i=o;break}break;case"moveFinish":case"resizeFinish":for(var u in this.data)u===n&&(this.data[u]=t.data);break;case"deleteFinish":a=[[0,0],[0,0]],delete this.data[n],r[i]=void 0}return"SuperRegionDataChangeded"===this.eventName?{name:"SuperRegionDataChangeded",data:[i,a[0][0],a[0][1],a[1][0],a[1][1]]}:"ReactAreaSelected"===this.eventName?!(!t.option.supportPoint&&a[0][0]===a[1][0]||"deleteFinish"===e)&&{name:"ReactAreaSelected",data:[this.reactName,{left:a[0][0],top:a[0][1],right:a[1][0],bottom:a[1][1]}]}:void 0},this.clear=function(){this.data={},this.shapeIndex=[],this.curShapeId=-1,this.SetSuperRegionProperty(!1,!0,!0,!1)}},ivsModel:function(){this.num=0,this.options={modelName:"ivsModel",moveEnable:!0,resizeEnable:!0,title:!1,closeEnable:!0},this.curShapeId=-1,this.data={},this.shapeNum={},this.receiveData=function(t){Array.isArray(t)&&(t=t[0]);var e,n=t.event.type,r=t.shapeId,i=t.data,a=this.data[this.containerID],o=function(t,e,n,r){if("LeftLane"===e.type||"RightLane"===e.type){var i="LeftLane"===e.type?e.linkRight:e.linkLeft;if(a[t].subShape[i][n]=r,!e.linkDetectLine){var o=a[t].subShape;for(var s in o)if("poly"===o[s].type&&!o[s].isDetectLinked){o[s].isDetectLinked=!0,o[s][n]=r,e.linkDetectLine=s,a[t].subShape[i].linkDetectLine=s;break}}}};switch(t.option&&t.option.shapeId&&t.option.shapeId!==this.curShapeId&&(this.curShapeId=t.option.shapeId),n){case"addFinish":return!(!(e=a[this.curShapeId])||"RegionClip"!==e.ruleType)&&{name:"VideoAnalyzeConfig",data:[this.curShapeId,i,3,4,0,e.eventName,e.markedName,e.ruleType]};case"drawFinish":if(a[this.curShapeId])e=a[this.curShapeId];else for(var s in a)if(a[s].subShape[this.curShapeId]&&((e=a[s].subShape[this.curShapeId]).relShapeId=r,o(s,e,"relShapeId",r,a[s]),o(s,e,"data",i)),"CalibrateRegion"===a[s].ruleType||"ComposeShape"===a[s].ruleType){var u=[],c="",l="",f=a[s].subShape;for(c in f)"poly"===f[c].type&&"CalibrateRegion"===a[s].ruleType||f[c].isFirst?l=f[c].relShapeId:u.push(f[c].relShapeId);this.canvasDraw.disParent(l),this.canvasDraw.setParent(l,u),a[s].parentsId=l}return e.relShapeId=r,e.data=i,this.canvasDraw.addChangeShapeEvent(),{name:"VideoAnalyzeConfig",data:[this.curShapeId,i,3,2,0,e.eventName,e.markedName,e.ruleType],baseShapeInfo:e};case"moveFinish":case"resizeFinish":case"selectedFinish":var h=function(t,e){var n={};for(var r in t){if(t[r].relShapeId===e){n.mainShapeId=r;break}var i=t[r].subShape;if(i)for(var a in i)if(i[a].relShapeId===e){n.mainShapeId=r,n.subShapeId=a;break}}return n}(a,r);void 0!==h.subShapeId?(e=a[h.mainShapeId].subShape[h.subShapeId],this.curShapeId=h.subShapeId,e.data=i,o(h.mainShapeId,e,"data",i),this.ChangeLimitOption(h.mainShapeId,e)):(e=a[h.mainShapeId],this.curShapeId=h.mainShapeId,e.data=i);var d=4;if("selectedFinish"===n&&(d=3),function(){if("RightLane"===e.type||"LeftLane"===e.type){var t=[],n=a[h.mainShapeId].subShape;for(var r in n)"poly"!==n[r].type||n[r].isDetectLinked||t.push(r);e.linkDetectLine||(e.linkDetectLine=t.shift(),e.linkDetectLine&&(n[e.linkDetectLine].isDetectLinked=!0))}}.call(this),"poly"===e.type&&"XLaneShape"===a[h.mainShapeId].ruleType){var p=a[h.mainShapeId].subShape,v=null;for(var g in p)if(p[g].linkDetectLine===h.subShapeId){v=p[g];break}return{name:"VideoAnalyzeConfig",data:[g,i,3,d,0,v.eventName,v.markedName,v.ruleType],baseShapeInfo:v}}return{name:"VideoAnalyzeConfig",data:[this.curShapeId,i,3,d,0,e.eventName,e.markedName,e.ruleType],baseShapeInfo:e}}},this.clear=function(){this.ReleaseVideoAnalyseContainer()}},previewModel:function(){this.ivsEnable=!0,this.ruleEnable=!0,this.focusEnable=!0,this.boxTailEnable=!0,this.detectEnable=!0,this.AFEnable=!1,this.floorIdentificationEnable=!0,this.ivsData={},this.highThrowData={},this.objectData={},this.alarmObject={},this.detectData={},this.AFData={curAF:{},maxAF:{}},this.waterRulerData={},this.iotboxCommData={},this.drawRule=k,this.drawObject=C,this.MSTrackData={},this.drawSDEV=B,this.drawFloorIdentification=_,this.drawWaterRuler=x,this.drawEvent=F,this.drawEvents=E,this.blingbling=L,this.drawDetect=j,this.drawRuleInfo=N,this.drawAF=U,this.drawGlobalRule=z,this.prepareToDrawFloor=function(){},this.clear=function(){this.ivsCanvasDraw.delShapeById(),this.ivsCanvasDraw.drawShape(),this.ivsData={},this.highThrowData={},this.ivsRuleData={},this.objectData={},this.alarmObject={},this.AFData={curAF:{},maxAF:{}},this.MSTrackData={}},this.clearDetect=function(){this.detectData={},this.detectCanvasDraw.delShapeById(),this.detectCanvasDraw.drawShape()}},motionModel:function(){this.options={modelName:"motionModel",column:22,row:18},this.curAreaID=0,this.data={},this.receiveData=function(t){return{name:"MotionDetectConfig",data:[t.data]}},this.clear=function(){}}};p.osdModel.prototype=d.osdModel,p.ivsModel.prototype=d.ivsModel,p.previewModel.prototype=d.previewModel,p.motionModel.prototype=d.motionModel,p.factory=function(t){return new p[t]},p.addMethod=function(t,e,n){for(var r in d[n])t[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r)};var v={LocalFocus:"osdModel",SuperRegionDataChangeded:"osdModel",VideoAnalyzeConfig:"ivsModel",AnalysisShapeSelected:"ivsModel",MotionDetectConfig:"motionModel",ReactAreaSelected:"ivsModel"},g=["FocusStatus"];function m(t,e,n,r){this.viewIndex=r,this.channel=0,this.ivsCanvasDom=t,this.canvasDom=e,this.detectCanvasDom=n,this.models={},this.modelList=["osdModel","ivsModel","previewModel","motionModel"],this.curModel=null,this.curEvents=[],this.resolution={width:"",height:""},this.init()}function y(t,e,n){var r="",i={lineWidth:2};switch(e&&(i.ruleName=e),t){case"CrossLineDetection":case"DetectLine":case"CrossFenceDetection":case"CrossFenceDetectionDown":r="poly",i.closeEnable=!1,i.allowLineCrossPoly=!0;break;case"HorizontalLine":case"TrafficLine":case"line":case"Line":case"XLineShape":case"LineShape":r="line";break;case"ArrowLineShape":r="line",i.array=!0;break;case"Horizontal":r="line",i.horizontal=!0;break;case"VerticalLine":case"Vertical":r="line",i.vertical=!0;break;case"CrossRegionDetection":case"TakenAwayDetection":case"MoveDetection":case"WanderDetection":case"RioterDetection":case"LeftDetection":case"Polygon":case"ExcludeRegion":case"ObjectPlacement":case"ObjectRemoval":r="poly",i.closeEnable=!0,i.selectType="onLine",n&&(i.selectType="inSide");break;case"BigSmallFilterBox":case"CalibrateRegion":case"DRectBigSmallShape":case"ComposeShape":case"UserComposeShape":case"GridShape":r="";break;case"DRectSmall":case"DRectBig":r="rect",i.selectType="onLine",i.showSize=!0;break;case"Rect":case"Rectangle":case"SubRect":case"DetectRegion":case"ScaleRectangle":case"LimitRectangleShape":r="rect",i.selectType="onLine",i.showSize=!1,n&&(i.selectType="inSide");break;case"DFilterSmall":case"DFilter":r="rect",i.selectType="inSide",i.showSize=!1,delete i.ruleName;break;case"PixelCountShape":case"PixelRectangle":r="rect",i.showSize=!0,delete i.ruleName;break;case"XLaneShape":i.detectLine=!0,i.unCheckLeftRight=!1,r="lane",i.leftLaneName="itc.LEFT",i.rightLaneName="itc.RIGHT",i.closeEnable=!1;break;case"TrafficLane":case"lane":r="lane",i.leftLaneName="itc.LEFT",i.rightLaneName="itc.RIGHT",i.closeEnable=!1;break;case"RegionClip":r="rect";break;case"ParkingDetection":r="parkingLot";break;case"PrivacyMaskPolygon":r="poly",i.maxPointNum=4;break;case"OvalShape":r="ellipse";break;case"PointShape":r="crossLine";break;default:r=t}return{canvasShapeType:r,options:i}}function w(t,e){var n={None:-1,Enter:"Enter",Leave:"Leave",LeftToRight:0,RightToLeft:1,Both:2},r={},i=e&&e.DetectRegion&&(Array.isArray(e.DetectRegion)?e.DetectRegion:e.DetectRegion.value);switch(t){case"ParkingStatusChangeDetection":case"ParkingLotStatusDetection":case"TrafficParkingStatistics":case"ParkingLimitDetection":r=(e.ParkingGroup||[]).reduce(function(t,e){var n=e.ParkingArray.reduce(function(t,n){return t.concat([{data:n.Region,shapeType:"poly",showName:!1},{data:n.CenterPoint,shapeType:"circle",options:{fillStyle:e.RealParkingNum>0?"#00ff00":"#ff0000",radius:40},ID:n.ID,showName:!1}])},[]);return t.concat(n)},[]);break;case"CrossLineDetection":r.data=e.DetectLine,r.shapeType="poly",r.options={closeEnable:!1,direction:n[e.Direction]};break;case"CrossRegionDetection":case"LeftDetection":case"TakenAwayDetection":case"WanderDetection":case"ManStandDetection":case"ManNumDetection":case"RioterDetection":case"MoveDetection":case"ObjectPlacement":case"ObjectRemoval":"CrossRegionDetection"===t&&-1===e.Action.indexOf("Cross")&&(e.Direction="None"),r.data=i,r.shapeType="poly",r.options={closeEnable:!0,direction:{None:-1,Enter:"Enter",Leave:"Leave",LeftToRight:0,RightToLeft:1,Both:"Both"}[e.Direction]};break;case"NumberStat":(r=[]).push({data:i,shapeType:"poly",options:{closeEnable:!0}},{data:e.DetectLine,shapeType:"poly",options:{closeEnable:!1,direction:e.Direction[0][0]>e.Direction[1][0]&&e.Direction[0][1]>e.Direction[1][1]?n.RightToLeft:n.LeftToRight},showName:!1});break;case"FaceDetection":case"FaceAnalysis":case"RelayTrack":r=null;break;case"CrossFenceDetection":(r=[]).push({data:e.UpstairsLine,shapeType:"poly",options:{closeEnable:!1,direction:n[e.Direction]}},{data:e.DownstairsLine,shapeType:"poly",options:{closeEnable:!1}});break;case"FloorIdentification":r={data:e.coordinate,shapeType:"poly",options:{closeEnable:!0,fontColor:"#FFFF00"}};break;case"":(r=[]).push({data:i,shapeType:"poly",options:{closeEnable:!0}},{data:e.BedMiddleLine,shapeType:"line",options:{}},{data:e.Direction,shapeType:"line",options:{array:!0}});break;case"TrafficParkingSpaceNoParking":r=null;break;case"TrafficParkingSpaceParking":(r=[]).push({data:i,shapeType:"poly",options:{closeEnable:!!e.DetectRegion,direction:n[e.Direction]}},{data:e.DetectLine,shapeType:"line",options:{closeEnable:!!e.DetectLine,direction:n[e.DetectLine]},showName:!1}),e.DetectLine||(r=r[0]);break;case"TrafficParking":(r=[]).push({data:i,shapeType:"poly",options:{closeEnable:!!e.DetectRegion,direction:n[e.Direction]}});break;case"SewageDetection":(r=[]).push({data:i,shapeType:"poly",options:{closeEnable:!!e.DetectRegion,direction:n[e.Direction]}},{data:e.DetectLine,shapeType:"line",options:{closeEnable:!!e.DetectLine},showName:!1});break;case"TrafficCarLine":r=e&&e.DetectLine&&e.LeftLine&&e.RightLine?{data:e.LeftLine.concat(e.RightLine).concat(e.DetectLine),shapeType:"lane",options:{lineWidth:2,detectLine:!0,detectLineColor:"#FF0000"}}:null;break;default:e&&(e.DetectRegion||e.DetectLine)?(r.data=i||e.DetectLine,r.shapeType="poly",r.options={closeEnable:!!e.DetectRegion,direction:n[e.Direction]}):r=null}return r}function b(t,e){var n={};if(t[e])n={relShapeId:t[e].relShapeId};else for(var r in t){var i=t[r].subShape;if(i[e]){n={relShapeId:i[e].relShapeId,mainShapeId:r};break}}return n}function S(t,e){var n=[];switch(e){case"DRectSmall":case"DRectBig":var r=Math.round((8192-t[0])/2),i=Math.round((8192-t[1])/2);n[0]=[r,i],n[1]=[r+t[0],i+t[1]];break;default:n=t}return n}function D(t,e,n){var r,i=e.subShape;if("draw"===t){if("CalibrateRegion"===e.ruleType&&("line"===n.type||"Vertical"===n.type||"Horizontal"===n.type))for(r in i)if("Polygon"===i[r].markedName)return{maxPoly:i[r].data};if("ComposeShape"===e.ruleType&&!n.isFirst)for(r in i)if(i[r].isFirst){var a=i[r].data;return 2===a.length?{maxPoly:[a[0],[a[0][0],a[1][1]],a[1],[a[1][0],a[0][1]]]}:{maxPoly:a}}if("DRectSmall"===n.markedName){for(r in i)if("DRectBig"===i[r].markedName)return{maxRect:i[r].data}}else if("DRectBig"===n.markedName){for(r in i)if("DRectSmall"===i[r].markedName)return{minRect:i[r].data}}else if("TrafficLine"===n.markedName){return{segment:[[e.data[0],e.data[1]],[e.data[2],e.data[3]]]}}}else if("show"===t){if("CalibrateRegion"===e.ruleType){var o,s=[];for(r in i)"poly"===i[r].type?o=i[r].relShapeId:s.push(i[r].relShapeId);s.length&&(this.canvasDraw.setParent(o,s),e.parentsId=o)}if("ComposeShape"===e.ruleType){var u,c=[];for(r in i)i[r].isFirst?u=i[r].relShapeId:c.push(i[r].relShapeId);c.length&&(this.canvasDraw.setParent(u,c),e.parentsId=u)}if("DRectSmall"===n.markedName)for(r in i)"DRectBig"===i[r].markedName&&(this.canvasDraw.setOption(i[r].relShapeId,{minRect:n.data}),this.canvasDraw.setOption(n.relShapeId,{maxRect:i[r].data}));"DFilterSmall"===n.markedName&&this.canvasDraw.setParent(e.relShapeId,[n.relShapeId])}return{}}function _(t){if(function(t,e){if(e=e||function(){return!0},!t||!t.length)return this.clear(),!1;var n=this.highThrowData;for(var r in n)e(r)&&(n[r].bling||(this.ivsCanvasDraw.delShapeById(n[r].shapeId),delete this.highThrowData[r]));return!0}.call(this,t,function(t){var e=!0;return-1===t.indexOf("Floor")&&(e=!1),e})&&this.floorIdentificationEnable){var e=this;t.forEach(function(t,n){var r=w("FloorIdentification",t);if(t.BoxNameEnable&&(r.options.ruleName=t.BoxName),t.BoxEnable){var i=e.ivsCanvasDraw.addShape(r.data,r.shapeType,r.options);r.shapeId=i.shapeId,e.highThrowData["Floor"+n]=r}}),e.ivsCanvasDraw.drawShape()}}function x(t){var e=this;e.waterRulerData.shapeId&&e.ivsCanvasDraw.delShapeById(e.waterRulerData.shapeId);window.plugin&&window.plugin.$t;var n=e.ivsCanvasDraw.addShape(t,"waterLevel",{transText:{strWaterStatus:"Water Level Status",strUnknown:"Unknown",strNormal:"Normal",strHigtWaterLevel:"High Water Level",strLowWaterLevel:"Low Water Level",strWaterValue:"Water Level Value"},font:"normal normal bold 16px Arial",fontSize:24,lineWidth:3});e.waterRulerData.shapeId=n.shapeId,e.ivsCanvasDraw.drawShape()}function E(t){var e=this;e.iotboxCommData.shapeId&&e.ivsCanvasDraw.delShapeById(e.iotboxCommData.shapeId);var n=e.ivsCanvasDraw.addShape(t,"waterLevel",{transText:{strWaterStatus:"Water Level Status",strUnknown:"Unknown",strNormal:"Normal",strHigtWaterLevel:"High Water Level",strLowWaterLevel:"Low Water Level",strWaterValue:"Water Level Value"},font:"normal normal bold 16px Arial",fontSize:24,lineWidth:3});e.waterRulerData.shapeId=n.shapeId,e.ivsCanvasDraw.drawShape()}m.prototype={constructor:m,init:function(){var t=this;this.ivsCanvasDraw=new o.PluginCanvasES6,this.ivsCanvasDraw.init(this.ivsCanvasDom),this.detectCanvasDom&&(this.detectCanvasDraw=new o.PluginCanvasES6,this.detectCanvasDraw.init(this.detectCanvasDom)),this.canvasDraw=new o.PluginCanvasES6,this.canvasDraw.init(this.canvasDom,this.receiveData.bind(this)),this.modelList.forEach(function(e){t.models[e]=p.factory(e),t.models[e].canvasDraw=t.canvasDraw,t.models[e].ivsCanvasDraw=t.ivsCanvasDraw,t.detectCanvasDom&&(t.models[e].detectCanvasDraw=t.detectCanvasDraw),t.models[e].resolution=t.resolution,p.addMethod(t,t.models[e],e)})},setModel:function(t){this.curModel=t},close:function(){this.canvasDraw.clear(),this.ivsCanvasDraw.clear(),this.detectCanvasDraw&&this.detectCanvasDraw.clear()},resize:function(){this.ivsCanvasDraw.resize(),this.canvasDraw.resize(),this.detectCanvasDraw&&this.detectCanvasDraw.resize()},addEvent:function(t,e){if(-1===g.indexOf(t))if(e)h.subscribe(t,e,this.channel),this.curEvents.push(t);else{var n=this.curEvents.indexOf(t);h.unsubscribe(t,e,this.channel),this.curEvents.splice(n,1);var r=v[t];r&&this.models[r].clear()}else this.addStreamEvent(t,e)},addStreamEvent:function(t,e){e?h.subscribe(t,e,this.channel):h.unsubscribe(t,e,this.channel)},receiveData:function(t){if(!this.curEvents.length)return!1;var e=this.curEvents[this.curEvents.length-1],n=v[e],r=[],i=[];if(Array.isArray(t)){if(!t[0])return;if(!t[0].option.modelName)return;(function(){var e=t[0].option.modelName,n=this.models[e],a=n.containerID,o=(n.curShapeId,n.data[a]),s=function(t){var e=[],n=[];return t.map(function(t,r){var i=function(t,e){var n={};for(var r in t){if(t[r].relShapeId===e){n.mainShapeId=r;break}var i=t[r].subShape;if(i)for(var a in i)if(i[a].relShapeId===e&&"poly"===i[a].type){n.mainShapeId=r,n.subShapeId=a;break}}return n}(o,t.shapeId);void 0!==i.subShapeId&&o[i.mainShapeId].subShape[i.subShapeId].isDetectLinked?n.push({shapeId:i.subShapeId,data:t,shapeInfo:o[i.mainShapeId].subShape[i.subShapeId]}):e.push(t)}),{remainResult:e,fullResult:n}}(t),u=s.remainResult,c=s.fullResult;0===u.length&&0===c.length||(t=(t=u[0])||c[0],i=c,r=u.slice(1),this.canvasDraw.removeShapeDrawEvent())}).call(this)}if(t.option&&t.option.modelName&&(n=t.option.modelName),!n)return!1;var a=this.models[n].receiveData(t);if(a)if("RightLane"===a.data[7]||"LeftLane"===a.data[7]){var o="LeftLane"===a.data[7]?a.data[0]:a.baseShapeInfo.linkLeft,u="RightLane"===a.data[7]?a.data[0]:a.baseShapeInfo.linkRight,c=a.baseShapeInfo.linkDetectLine,l={name:a.name,data:a.data.slice()},f={name:a.name,data:a.data.slice()},d={name:a.name,data:a.data.slice()};l.data[0]=o,l.data[6]="LeftLane",l.data[7]="LeftLane",l.data[1]=l.data[1].slice(0,2),f.data[0]=u,f.data[6]="RightLane",f.data[7]="RightLane",f.data[1]=f.data[1].slice(2,4),d.data[0]=c,d.data[6]="DetectLine",d.data[7]="DetectLine",d.data[1]=d.data[1].slice(4,6),h.publish(l.name,l.data,this.channel),h.publish(f.name,f.data,this.channel),d.data[1].length>0&&h.publish(d.name,d.data,this.channel),function(){var t=this.channel;r.length>0&&r.forEach(function(e,n){var r={name:a.name,data:a.data.slice()};r.data[0]=void 0,r.data[1]=e.data.slice(4,6),r.data[2]=0,r.data[3]=0,r.data[6]="Lane",r.data[7]="Lane",h.publish(r.name,r.data,t)}),i.length>0&&i.forEach(function(e,n){e.shapeInfo;var r={name:a.name,data:a.data.slice()};r.data[0]=e.shapeId,r.data[6]="DetectLine",r.data[7]="DetectLine",r.data[1]=e.data.data.slice(4,6),h.publish(r.name,r.data,t)})}.call(this)}else if("OvalShape"===a.data[7]){var p=s.default.cloneDeep(a.data);p[1][0][0]=Math.min(a.data[1][0][0],a.data[1][2][0]),p[1][0][1]=Math.min(a.data[1][0][1],a.data[1][2][1]),p[1][2][0]=Math.max(a.data[1][0][0],a.data[1][2][0]),p[1][2][1]=Math.max(a.data[1][0][1],a.data[1][2][1]),p[1].splice(3,1),p[1].splice(1,1),h.publish(a.name,p,this.channel)}else if("PointShape"===a.data[7]){var g=s.default.cloneDeep(a.data);g[1]=[a.data[1]],h.publish(a.name,g,this.channel)}else h.publish(a.name,a.data,this.channel)},receiveDataFromStream:function(t,e,n){var r=this;if(!t)return!1;var a=t.type,o=t.data;switch(this.models.previewModel.MSTrackData.data=o,a){case 3:this.models.previewModel.focusEnable&&h.publish("FocusStatus",[o.Focus,o.Zoom,o.Status,e],this.channel),this.models.previewModel.AFEnable&&o.AutofocusPeak&&this.models.previewModel.drawAF(o.AutofocusPeak,e)}if(!this.models.previewModel.ivsEnable)return!1;if(4===a&&this.models.previewModel.detectEnable&&this.models.previewModel.drawDetect(o),!this.models.previewModel.ruleEnable)return!1;switch(a){case 0:this.models.previewModel.drawRule(o);break;case 1:var s={},l={};for(var f in o)if(20===o[f].type){var d=o[f].appInfo,p=this.models.previewModel.ivsOptions;void 0===p||"all"===p.appInfo?l[f]=o[f]:20===p.type&&d===p.appInfo&&(l[f]=o[f])}else{-1!==[1,2,16,17].indexOf(o[f].type)&&function(){c.jQlib.getWidth(r.canvasDraw.canvasDom),u.util.defalutCoordinate.width,c.jQlib.getHeight(r.canvasDraw.canvasDom),u.util.defalutCoordinate.height;var t=u.util.defalutCoordinate.width/c.jQlib.getWidth(r.canvasDraw.canvasDom),n=u.util.defalutCoordinate.height/c.jQlib.getHeight(r.canvasDraw.canvasDom);r.canvasDraw.canvasDom.addEventListener("click",function i(a){var s=[Math.round((a.clientX-u.util.offset(r.canvasDraw.canvasDom).left+window.scrollX)*t),Math.round((a.clientY-u.util.offset(r.canvasDraw.canvasDom).top+window.scrollY)*n)];for(var c in o){var l=V(o[c].pos,o[c].coordinate);if(Array.isArray(l)){var f=[[l[0],l[1]],[l[2],l[3]]];if(u.util.pointInRect(s,f)){var d={objectID:c.replace(/\D*/,"")-0,channel:e||0};h.publish("IPCManualTrack",[d.channel,d.objectID],r.channel)}}}r.canvasDraw.canvasDom.removeEventListener("click",i,!1)},!1)}(),s[f]=o[f]}"{}"!==JSON.stringify(l)&&this.models.previewModel.drawSDEV(l),"{}"!==JSON.stringify(s)&&this.models.previewModel.drawObject(s);break;case 2:this.models.previewModel.drawEvent(o);break;case 6:this.models.previewModel.prepareToDrawFloor=function(){return r.models.previewModel.drawFloorIdentification((0,i.default)(o))};break;case 5:this.models.previewModel.drawRuleInfo(o,e);break;case 7:this.models.previewModel.drawWaterRuler(o);break;case 8:this.models.previewModel.drawGlobalRule(o,e);break;case 9:this.models.previewModel.drawEvents(o)}},setResolution:function(t){this.canvasDraw.setResolution(t),this.resolution.width=t.width,this.resolution.height=t.height}};var T=["Traffic"];function k(t){var e=this;if(!t||!t.length)return this.clear(),!1;var n=e.ivsData;for(var r in n)n[r].bling||(e.ivsCanvasDraw.delShapeById(n[r].shapeId),delete e.ivsData[r]);this.prepareToDrawFloor(),t.forEach(function(t,n){var r;if(!(r="OpenIntelli"===t.Class?w(t.Type,t.Config.RuleConfig):w(t.Type,t.Config))||T.includes(t.Class)&&!["ParkVehicleDetection"].includes(t.Type))return!1;if(Array.isArray(r))e.ivsData[t.Name]||(r.forEach(function(n,r){if(n.options&&!1!==n.showName){var i=s.default.get(e,["ivsRuleData","setRuleName"]),a=t.Name;i&&(a=e.ivsRuleData.setRuleName(t,a,n.options)),n.options.ruleName=a,n.options.lineWidth=2}var o=e.ivsCanvasDraw.addShape(n.data,n.shapeType,n.options);n.shapeId=o.shapeId}),e.ivsData[t.Name]=r);else{var i=s.default.get(e,["ivsRuleData","setRuleName"]),a=t.Name;if(i&&(a=e.ivsRuleData.setRuleName(t,a,r.options)),r.options.ruleName=a,r.options.lineWidth=2,!e.ivsData[t.Name]){var o=e.ivsCanvasDraw.addShape(r.data,r.shapeType,r.options);r.shapeId=o.shapeId,e.ivsData[t.Name]=r}}}),e.ivsCanvasDraw.drawShape()}var I={1:"#00CCFF",2:"#FFD800",16:"#FFD800",17:"#24FF00"},A={1:"#FFD800",2:"#00CCFF"},R={0:"\u672a\u77e5",1:"\u4eba\u4f53",2:"\u673a\u52a8\u8f66",3:"\u706b",4:"\u70df",5:"\u8f66\u724c",6:"\u4eba\u8138",7:"\u96c6\u88c5\u7bb1",8:"\u52a8\u7269",9:"\u4ea4\u901a\u706f",10:"\u8d34\u6761",11:"\u4eba\u5934",12:"\u4ea4\u901a\u7ebf",13:"\u666e\u901a\u7269\u4f53",14:"\u5f39\u5b54",15:"\u4eba\u8138\u7279\u5f81\u7b97\u6cd5\u79c1\u6709\u6570\u636e",16:"\u673a\u52a8\u8f66",17:"\u975e\u673a\u52a8\u8f66",18:"\u4fe1\u53f7\u673a\u6d41\u91cf",19:"\u4eba\u884c\u9053\u884c\u4eba\u4fe1\u606f",20:"\u8054\u52a8\u7ec6\u8282\u76f8\u673a\u4fe1\u606f",21:"X\u5149\u7269\u54c1\u68c0\u6d4b\u5f71\u50cf",22:"\u5360\u9053\u7ecf\u8425\u7269\u4f53",23:"\u6d41\u52a8\u644a\u8d29\u7269\u4f53",24:"\u6c34\u4f4d\u5c3a",25:"\u8239\u53ea",26:"\u6c34\u679c",27:"\u4e8c\u7ef4\u7801",28:"\u624b\u5957",29:"\u68af\u5b50",30:"\u5e03\u5e54",31:"\u56f4\u680f",32:"\u6807\u8bc6\u724c",33:"\u7535\u529b\u5b89\u5168\u5e26",34:"\u505c\u8f66\u573a\u8f66\u4f4d",35:"\u4eba\u6c11\u5e01",36:"\u94a5\u5319",37:"\u5370\u7ae0",38:"\u5916\u5e01",39:"\u6c34\u9762\u6f02\u6d6e\u7269",40:"\u6d88\u9632\u5360\u9053\u7269"},M="#24FF00";function C(t,e){var n=this;window.plugin&&window.plugin.$t;for(var r in n.objectData)n.ivsCanvasDraw.delShapeById(n.objectData[r].shapeId),n.objectData[r].trackId&&n.ivsCanvasDraw.delShapeById(n.objectData[r].trackId);for(var i in n.objectData={},t)if(t[i].show){var a=I[t[i].type]||M,o=R[t[i].type]||t[i].type,s={strokeColor:a},u=[],c={};25===t[i].type&&(s.strokeColor=A[t[i].objectType]||M);var l=t[i].beliefVal||0;if(e&&e.showObjectInfoText&&(s.textArr=[i,o,"Confidence Level".concat(l)]),(n.alarmObject[i]||t[i].isTrack)&&(s.strokeColor="#FF0000"),t[i].track&&t[i].track.length>1&&n.boxTailEnable){u=V(t[i].track[t[i].track.length-1],t[i].coordinate);var h=t[i].track.map(function(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]});c=n.ivsCanvasDraw.addShape(h,"poly",f(f({},s),{},{closeEnable:!1}))}else u=t[i].track&&t[i].track.length>1?V(t[i].track[t[i].track.length-1],t[i].coordinate):V(t[i].pos,t[i].coordinate);var d=null;if(n.MSTrackData&&n.MSTrackData.option&&this.MSTrackData.option.MSTrackId&&i===this.MSTrackData.option.MSTrackId){var p=n.MSTrackData.option.MSTrackId;u=V(t[p].pos,t[p].coordinate),s.strokeColor=n.MSTrackData.option.MSTrackColor,s.rectLine=!0,d=n.ivsCanvasDraw.addShape([[u[0],u[1]],[u[2],u[3]]],"rectAD",f(f({},s),{},{lineWidth:2}))}else d=n.ivsCanvasDraw.addShape([[u[0],u[1]],[u[2],u[3]]],"rectAD",f(f({},s),{},{lineWidth:2}));n.objectData[i]={pos:u,shapeId:d.shapeId,trackId:c.shapeId}}n.ivsCanvasDraw.drawShape()}function P(t){var e=t.slice(),n=e.pop();return n=(n/255).toFixed(2),e.push(n),"rgba("+e.join(",")+")"}function O(t,e,n){var r=n.borderColor,i=n.fillColor;switch(r=P(r),i=P(i),e){case 0:t.strokeColor="rgba(0, 0, 0, 0)",t.fillStyle="rgba(0, 0, 0, 0)";break;case 1:t.strokeColor=r,t.fillStyle="rgba(0, 0, 0, 0)";break;case 2:t.strokeColor=r,t.fillStyle="rgba(0, 0, 0, 0)",t.dashed=[5,5];break;case 16:t.lineWidth=0,t.strokeColor="rgba(0, 0, 0, 0)",t.fillStyle=i;break;case 17:t.strokeColor=r,t.fillStyle=i;break;case 18:t.strokeColor=r,t.fillStyle=i,t.dashed=[5,5]}}function B(t){var e=this;for(var n in e.objectData)e.ivsCanvasDraw.delShapeById(e.objectData[n].shapeId),e.objectData[n].trackId&&e.ivsCanvasDraw.delShapeById(e.objectData[n].trackId);for(var r in e.objectDataSDEV)e.ivsCanvasDraw.delShapeById(e.objectDataSDEV[r].shapeId);for(r in e.objectDataSDEV={},t)if(t[r].show)for(var i=t[r].data,a=0,o=i.length;a<o;a++)!function(t){var n,a,o,s,u,c=i[t];switch(c.type){case 1:n=c.lineWidth,a=c.coordinate,o=c.strokeStyle,O(s={lineWidth:n,radius:c.radius},o,c),s.dashed&&(s.dashed=[2*n,2*n]),u=e.ivsCanvasDraw.addShape(a,"circle",s),e.objectDataSDEV[u.shapeId]={shapeId:u.shapeId};break;case 2:n=c.lineWidth;var l=c.lineColor;l=P(l),a=c.coordinate,s={lineWidth:n,strokeColor:l,closeEnable:!1},2===(o=c.strokeStyle)&&(s.dashed=[2*n,2*n]),u=e.ivsCanvasDraw.addShape(a,"poly",s),e.objectDataSDEV[u.shapeId]={shapeId:u.shapeId};break;case 3:n=c.lineWidth,a=c.coordinate,o=c.strokeStyle;if(s={lineWidth:n},-1===[0,1,2,16,17,18].indexOf(o))return;O(s,o,c),e.alarmObject[r]&&(s.strokeColor="#FF0000"),s.dashed&&(s.dashed=[2*n,2*n]),u=e.ivsCanvasDraw.addShape(a,"poly",s),e.objectDataSDEV[u.shapeId]={shapeId:u.shapeId},e.objectData[r]={shapeId:u.shapeId};break;case 4:var f=c.fontColor;f=P(f),s={font:c.fontSize+"px Arial",textAlign:["left","right"][c.textAlign],textBaseline:c.textBaseline,strokeColor:f,title:c.content},u=e.ivsCanvasDraw.addShape([c.coordinate[0],c.coordinate[1]],"text",s),e.objectDataSDEV[u.shapeId]={shapeId:u.shapeId}}}(a);e.ivsCanvasDraw.drawShape()}function F(t){var e=this;t.forEach(function(t,n){var r=e.ivsData[t.Data.Name];if(["ParkingStatusChangeDetection","ParkingLotStatusDetection","TrafficParkingStatistics","ParkingLimitDetection"].includes(t.Code))return r.bling=void 0,void r.forEach(function(n){"circle"===n.shapeType&&t.Data.ParkingStatus.some(function(t){if(t.ID===n.ID)return 0===t.ParkedNumber?n.options.fillStyle="#00ff00":(n.options.fillStyle="#ff0000",r.bling=1),e.ivsCanvasDraw.setOption(n.shapeId,n.options),!0})});if(Array.isArray(r))r.forEach(function(t){if(t&&!t.bling){var n=t.options;n.strokeColor="#FF0000",e.ivsCanvasDraw.setOption(t.shapeId,n),t.bling=1}});else if(r&&!r.bling){var i=r.options;i.strokeColor="#FF0000",e.ivsCanvasDraw.setOption(r.shapeId,i),r.bling=1}else r={};var a=[],o=t.Data.Class,s=t.Data.Objects||[];t.Data.Object&&s.push(t.Data.Object),s.forEach(function(t,n){var r=o+t.ObjectID;a.push(r),e.alarmObject[r]?e.alarmObject[r]+=1:e.alarmObject[r]=1;try{e.ivsCanvasDraw.setOption(e.objectData[r].shapeId,{strokeColor:"#FF0000"})}catch(t){e.objectData}}),Array.isArray(r)?r.map(function(t){e.blingbling(t,a)}):e.blingbling(r,a)})}function L(t,e){var n=this;if(t.bling<20)t.shapeId&&n.ivsCanvasDraw.hideShape(t.shapeId,!!(t.bling%2)),t.bling++,window.setTimeout(function(){n.blingbling(t,e)},100);else{var r=t.options;r&&(r.strokeColor="#0000ff",n.ivsCanvasDraw.setOption(t.shapeId,r),n.ivsCanvasDraw.hideShape(t.shapeId,!1)),t.bling=0,e.forEach(function(t,e){var r=n.alarmObject[t];1===r?delete n.alarmObject[t]:n.alarmObject[t]=r-1})}}function j(t){var e=this,n=[],r=e.detectData;if(e.detectCanvasDraw)if(t){for(var i in r)s.default.get(r,"".concat(i,".shapeId"),[]).forEach(function(t){e.detectCanvasDraw.delShapeById(t)}),delete r[i];Array.isArray(t)||(t=[t]),t.forEach(function(t,i){if(t){var a=s.default.get(t,"DetectRegion"),o=s.default.get(t,"ExcludeRegion");a&&n.push({type:"DetectRegion"+i,data:[a],shapeType:"poly",shapeId:[],options:{strokeColor:"#FF5700",lineWidth:2}}),o&&n.push({type:"ExcludeRegion"+i,data:o,shapeType:"poly",shapeId:[],options:{strokeColor:"#FFFFFF",lineWidth:2}}),n.forEach(function(t,n){if(!t)return!1;t.data.forEach(function(n){var r=e.detectCanvasDraw.addShape(n,t.shapeType,t.options);t.shapeId.push(r.shapeId)}),r[t.type]=t})}}),e.detectCanvasDraw.drawShape()}else this.clearDetect()}function N(t,e){var n=this,r=(window.plugin&&window.plugin.$t,s.default.get(t,["classType"])),i={};"VehiclesDistri"===r?i={data:t,setRuleName:function(t,e,n){var r=this.data.data||[],i=r.findIndex(function(e){return e.ruleId===t.Id});if(-1===i)return e;var a=r[i];return e="".concat(e,":Vehicle Statistics:").concat(a.carNum,"vehicles"),n.fontColor="#ffffff",n.font="normal normal 100 25px arial",e}}:"NumberStat"===r&&(i={data:t,setRuleName:function(t,e,r){var i="",a=[255,255,255],o=s.default.get(n,["resolution","height"]),u=s.default.get(n,["resolution","width"]),c=20;if(o&&u){var l=o*u,f=n.canvasDraw.canvasDom.width*n.canvasDraw.canvasDom.height;c=Math.floor(c*Math.sqrt(f/l))}var h="#"+((1<<24)+(a[0]<<16)+(a[1]<<8)+a[2]).toString(16).slice(1),d={enter:"com.Enter",leave:"com.Exits",in:"com.PeopleNum",cross:"com.Passed",enterAgain:"ivs.RepeatEnter",leaveAgain:"ivs.RepeatLeave"},p=this.data.data||[],v=s.default.get(t,["Config","AreaID"]),g=p.findIndex(function(e){return e.ruleType===t.Type}),m=s.default.get(p,[g,"data",v]);return m?(Object.keys(d).forEach(function(t){void 0!==m[t]&&(i+="".concat(tl(d[t]),": ").concat(m[t]," "))}),r.textArr=[i,e],r.fontColor=h,r.font="normal normal 100 ".concat(c,"px arial"),""):e}}),this.ivsRuleData=i}function U(t,e){var n=this,r=function(t){var e=[255,255,255];return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+e[2]).toString(16).slice(1)}(),i=n.AFData,a=window.plugin&&1===window.plugin.totalViews?"normal normal 500 50px arial":"normal normal 200 25px arial";i.curAF.shapeId&&(n.ivsCanvasDraw.delShapeById(i.curAF.shapeId),n.ivsCanvasDraw.delShapeById(i.maxAF.shapeId)),(t>i.maxAF.data||!i.maxAF.data)&&(i.maxAF.data=t);var o=n.AFEnable&&n.ivsCanvasDraw.addShape([100,1e3],"text",{title:"AF Peak: ".concat(t),font:a,strokeColor:r}),s=n.AFEnable&&n.ivsCanvasDraw.addShape([100,2e3],"text",{title:"AF Max: ".concat(i.maxAF.data),font:a,strokeColor:r});i.curAF.shapeId=o.shapeId,i.maxAF.shapeId=s.shapeId,n.ivsCanvasDraw.drawShape()}function z(t){var e=this;window.plugin&&window.plugin.$t;if(t){for(var n in e.ivsData)n.includes("TrafficCarLine")&&(s.default.get(e.ivsData,"".concat(n,".shapeId"),[]).forEach(function(t){e.ivsCanvasDraw.delShapeById(t)}),delete e.ivsData[n]);Array.isArray(t)||(t=[t]),t.forEach(function(t,n){var r=w("TrafficCarLine",t);if(r){t.Number;r.options.leftLaneName="";var i=e.ivsCanvasDraw.addShape(r.data,r.shapeType,r.options);r.shapeId=i.shapeId,e.ivsData["TrafficCarLine"+n]=r}}),e.ivsCanvasDraw.drawShape()}else this.clear()}function V(t,e){return"1024"!==e&&1024!==e||(t=t.map(function(t){return"number"===typeof t?8*t:t.map(function(t){return 8*t})})),t}var H=m;e.default=H},function(t,e,n){(function(t,r){var i;(function(){var a,o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",d=1,p=2,v=4,g=1,m=2,y=1,w=2,b=4,S=8,D=16,_=32,x=64,E=128,T=256,k=512,I=30,A="...",R=800,M=16,C=1,P=2,O=1/0,B=9007199254740991,F=1.7976931348623157e308,L=NaN,j=4294967295,N=j-1,U=j>>>1,z=[["ary",E],["bind",y],["bindKey",w],["curry",S],["curryRight",D],["flip",k],["partial",_],["partialRight",x],["rearg",T]],V="[object Arguments]",H="[object Array]",W="[object AsyncFunction]",Y="[object Boolean]",q="[object Date]",X="[object DOMException]",G="[object Error]",Q="[object Function]",Z="[object GeneratorFunction]",K="[object Map]",$="[object Number]",J="[object Null]",tt="[object Object]",et="[object Proxy]",nt="[object RegExp]",rt="[object Set]",it="[object String]",at="[object Symbol]",ot="[object Undefined]",st="[object WeakMap]",ut="[object WeakSet]",ct="[object ArrayBuffer]",lt="[object DataView]",ft="[object Float32Array]",ht="[object Float64Array]",dt="[object Int8Array]",pt="[object Int16Array]",vt="[object Int32Array]",gt="[object Uint8Array]",mt="[object Uint8ClampedArray]",yt="[object Uint16Array]",wt="[object Uint32Array]",bt=/\b__p \+= '';/g,St=/\b(__p \+=) '' \+/g,Dt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,Et=RegExp(_t.source),Tt=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mt=/^\w*$/,Ct=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pt=/[\\^$.*+?()[\]{}|]/g,Ot=RegExp(Pt.source),Bt=/^\s+/,Ft=/\s/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,jt=/\{\n\/\* \[wrapped with (.+)\] \*/,Nt=/,? & /,Ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zt=/[()=,{}\[\]\/\s]/,Vt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wt=/\w*$/,Yt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Xt=/^\[object .+?Constructor\]$/,Gt=/^0o[0-7]+$/i,Qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,$t=/['\n\r\u2028\u2029\\]/g,Jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",ee="[\\ud800-\\udfff]",ne="["+te+"]",re="["+Jt+"]",ie="\\d+",ae="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",se="[^\\ud800-\\udfff"+te+ie+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ue="\\ud83c[\\udffb-\\udfff]",ce="[^\\ud800-\\udfff]",le="(?:\\ud83c[\\udde6-\\uddff]){2}",fe="[\\ud800-\\udbff][\\udc00-\\udfff]",he="[A-Z\\xc0-\\xd6\\xd8-\\xde]",de="(?:"+oe+"|"+se+")",pe="(?:"+he+"|"+se+")",ve="(?:"+re+"|"+ue+")"+"?",ge="[\\ufe0e\\ufe0f]?"+ve+("(?:\\u200d(?:"+[ce,le,fe].join("|")+")[\\ufe0e\\ufe0f]?"+ve+")*"),me="(?:"+[ae,le,fe].join("|")+")"+ge,ye="(?:"+[ce+re+"?",re,le,fe,ee].join("|")+")",we=RegExp("['\u2019]","g"),be=RegExp(re,"g"),Se=RegExp(ue+"(?="+ue+")|"+ye+ge,"g"),De=RegExp([he+"?"+oe+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ne,he,"$"].join("|")+")",pe+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ne,he+de,"$"].join("|")+")",he+"?"+de+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",he+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ie,me].join("|"),"g"),_e=RegExp("[\\u200d\\ud800-\\udfff"+Jt+"\\ufe0e\\ufe0f]"),xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ee=["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"],Te=-1,ke={};ke[ft]=ke[ht]=ke[dt]=ke[pt]=ke[vt]=ke[gt]=ke[mt]=ke[yt]=ke[wt]=!0,ke[V]=ke[H]=ke[ct]=ke[Y]=ke[lt]=ke[q]=ke[G]=ke[Q]=ke[K]=ke[$]=ke[tt]=ke[nt]=ke[rt]=ke[it]=ke[st]=!1;var Ie={};Ie[V]=Ie[H]=Ie[ct]=Ie[lt]=Ie[Y]=Ie[q]=Ie[ft]=Ie[ht]=Ie[dt]=Ie[pt]=Ie[vt]=Ie[K]=Ie[$]=Ie[tt]=Ie[nt]=Ie[rt]=Ie[it]=Ie[at]=Ie[gt]=Ie[mt]=Ie[yt]=Ie[wt]=!0,Ie[G]=Ie[Q]=Ie[st]=!1;var Ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Re=parseFloat,Me=parseInt,Ce="object"==typeof t&&t&&t.Object===Object&&t,Pe="object"==typeof self&&self&&self.Object===Object&&self,Oe=Ce||Pe||Function("return this")(),Be=e&&!e.nodeType&&e,Fe=Be&&"object"==typeof r&&r&&!r.nodeType&&r,Le=Fe&&Fe.exports===Be,je=Le&&Ce.process,Ne=function(){try{var t=Fe&&Fe.require&&Fe.require("util").types;return t||je&&je.binding&&je.binding("util")}catch(t){}}(),Ue=Ne&&Ne.isArrayBuffer,ze=Ne&&Ne.isDate,Ve=Ne&&Ne.isMap,He=Ne&&Ne.isRegExp,We=Ne&&Ne.isSet,Ye=Ne&&Ne.isTypedArray;function qe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Xe(t,e,n,r){for(var i=-1,a=null==t?0:t.length;++i<a;){var o=t[i];e(r,o,n(o),t)}return r}function Ge(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Qe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ze(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ke(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}function $e(t,e){return!!(null==t?0:t.length)&&cn(t,e,0)>-1}function Je(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function tn(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function en(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function nn(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}function rn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function an(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var on=dn("length");function sn(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function un(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}function cn(t,e,n){return e===e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):un(t,fn,n)}function ln(t,e,n,r){for(var i=n-1,a=t.length;++i<a;)if(r(t[i],e))return i;return-1}function fn(t){return t!==t}function hn(t,e){var n=null==t?0:t.length;return n?gn(t,e)/n:L}function dn(t){return function(e){return null==e?a:e[t]}}function pn(t){return function(e){return null==t?a:t[e]}}function vn(t,e,n,r,i){return i(t,function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)}),n}function gn(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);o!==a&&(n=n===a?o:n+o)}return n}function mn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function yn(t){return t?t.slice(0,Bn(t)+1).replace(Bt,""):t}function wn(t){return function(e){return t(e)}}function bn(t,e){return tn(e,function(e){return t[e]})}function Sn(t,e){return t.has(e)}function Dn(t,e){for(var n=-1,r=t.length;++n<r&&cn(e,t[n],0)>-1;);return n}function _n(t,e){for(var n=t.length;n--&&cn(e,t[n],0)>-1;);return n}var xn=pn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),En=pn({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Tn(t){return"\\"+Ae[t]}function kn(t){return _e.test(t)}function In(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function An(t,e){return function(n){return t(e(n))}}function Rn(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var o=t[n];o!==e&&o!==h||(t[n]=h,a[i++]=n)}return a}function Mn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function Cn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function Pn(t){return kn(t)?function(t){var e=Se.lastIndex=0;for(;Se.test(t);)++e;return e}(t):on(t)}function On(t){return kn(t)?function(t){return t.match(Se)||[]}(t):function(t){return t.split("")}(t)}function Bn(t){for(var e=t.length;e--&&Ft.test(t.charAt(e)););return e}var Fn=pn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Ln=function t(e){var n=(e=null==e?Oe:Ln.defaults(Oe.Object(),e,Ln.pick(Oe,Ee))).Array,r=e.Date,i=e.Error,Ft=e.Function,Jt=e.Math,te=e.Object,ee=e.RegExp,ne=e.String,re=e.TypeError,ie=n.prototype,ae=Ft.prototype,oe=te.prototype,se=e["__core-js_shared__"],ue=ae.toString,ce=oe.hasOwnProperty,le=0,fe=function(){var t=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),he=oe.toString,de=ue.call(te),pe=Oe._,ve=ee("^"+ue.call(ce).replace(Pt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ge=Le?e.Buffer:a,me=e.Symbol,ye=e.Uint8Array,Se=ge?ge.allocUnsafe:a,_e=An(te.getPrototypeOf,te),Ae=te.create,Ce=oe.propertyIsEnumerable,Pe=ie.splice,Be=me?me.isConcatSpreadable:a,Fe=me?me.iterator:a,je=me?me.toStringTag:a,Ne=function(){try{var t=Na(te,"defineProperty");return t({},"",{}),t}catch(t){}}(),on=e.clearTimeout!==Oe.clearTimeout&&e.clearTimeout,pn=r&&r.now!==Oe.Date.now&&r.now,jn=e.setTimeout!==Oe.setTimeout&&e.setTimeout,Nn=Jt.ceil,Un=Jt.floor,zn=te.getOwnPropertySymbols,Vn=ge?ge.isBuffer:a,Hn=e.isFinite,Wn=ie.join,Yn=An(te.keys,te),qn=Jt.max,Xn=Jt.min,Gn=r.now,Qn=e.parseInt,Zn=Jt.random,Kn=ie.reverse,$n=Na(e,"DataView"),Jn=Na(e,"Map"),tr=Na(e,"Promise"),er=Na(e,"Set"),nr=Na(e,"WeakMap"),rr=Na(te,"create"),ir=nr&&new nr,ar={},or=fo($n),sr=fo(Jn),ur=fo(tr),cr=fo(er),lr=fo(nr),fr=me?me.prototype:a,hr=fr?fr.valueOf:a,dr=fr?fr.toString:a;function pr(t){if(As(t)&&!ys(t)&&!(t instanceof yr)){if(t instanceof mr)return t;if(ce.call(t,"__wrapped__"))return ho(t)}return new mr(t)}var vr=function(){function t(){}return function(e){if(!Is(e))return{};if(Ae)return Ae(e);t.prototype=e;var n=new t;return t.prototype=a,n}}();function gr(){}function mr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=a}function yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function wr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Sr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Dr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Sr;++e<n;)this.add(t[e])}function _r(t){var e=this.__data__=new br(t);this.size=e.size}function xr(t,e){var n=ys(t),r=!n&&ms(t),i=!n&&!r&&Ds(t),a=!n&&!r&&!i&&Ls(t),o=n||r||i||a,s=o?mn(t.length,ne):[],u=s.length;for(var c in t)!e&&!ce.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||qa(c,u))||s.push(c);return s}function Er(t){var e=t.length;return e?t[Di(0,e-1)]:a}function Tr(t,e){return uo(ra(t),Br(e,0,t.length))}function kr(t){return uo(ra(t))}function Ir(t,e,n){(n===a||ps(t[e],n))&&(n!==a||e in t)||Pr(t,e,n)}function Ar(t,e,n){var r=t[e];ce.call(t,e)&&ps(r,n)&&(n!==a||e in t)||Pr(t,e,n)}function Rr(t,e){for(var n=t.length;n--;)if(ps(t[n][0],e))return n;return-1}function Mr(t,e,n,r){return Ur(t,function(t,i,a){e(r,t,n(t),a)}),r}function Cr(t,e){return t&&ia(e,au(e),t)}function Pr(t,e,n){"__proto__"==e&&Ne?Ne(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Or(t,e){for(var r=-1,i=e.length,o=n(i),s=null==t;++r<i;)o[r]=s?a:tu(t,e[r]);return o}function Br(t,e,n){return t===t&&(n!==a&&(t=t<=n?t:n),e!==a&&(t=t>=e?t:e)),t}function Fr(t,e,n,r,i,o){var s,u=e&d,c=e&p,l=e&v;if(n&&(s=i?n(t,r,i,o):n(t)),s!==a)return s;if(!Is(t))return t;var f=ys(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ce.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return ra(t,s)}else{var h=Va(t),g=h==Q||h==Z;if(Ds(t))return Ki(t,u);if(h==tt||h==V||g&&!i){if(s=c||g?{}:Wa(t),!u)return c?function(t,e){return ia(t,za(t),e)}(t,function(t,e){return t&&ia(e,ou(e),t)}(s,t)):function(t,e){return ia(t,Ua(t),e)}(t,Cr(s,t))}else{if(!Ie[h])return i?t:{};s=function(t,e,n){var r,i=t.constructor;switch(e){case ct:return $i(t);case Y:case q:return new i(+t);case lt:return function(t,e){var n=e?$i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case ft:case ht:case dt:case pt:case vt:case gt:case mt:case yt:case wt:return Ji(t,n);case K:return new i;case $:case it:return new i(t);case nt:return function(t){var e=new t.constructor(t.source,Wt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case rt:return new i;case at:return r=t,hr?te(hr.call(r)):{}}}(t,h,u)}}o||(o=new _r);var m=o.get(t);if(m)return m;o.set(t,s),Os(t)?t.forEach(function(r){s.add(Fr(r,e,n,r,t,o))}):Rs(t)&&t.forEach(function(r,i){s.set(i,Fr(r,e,n,i,t,o))});var y=f?a:(l?c?Ca:Ma:c?ou:au)(t);return Ge(y||t,function(r,i){y&&(r=t[i=r]),Ar(s,i,Fr(r,e,n,i,t,o))}),s}function Lr(t,e,n){var r=n.length;if(null==t)return!r;for(t=te(t);r--;){var i=n[r],o=e[i],s=t[i];if(s===a&&!(i in t)||!o(s))return!1}return!0}function jr(t,e,n){if("function"!=typeof t)throw new re(u);return io(function(){t.apply(a,n)},e)}function Nr(t,e,n,r){var i=-1,a=$e,s=!0,u=t.length,c=[],l=e.length;if(!u)return c;n&&(e=tn(e,wn(n))),r?(a=Je,s=!1):e.length>=o&&(a=Sn,s=!1,e=new Dr(e));t:for(;++i<u;){var f=t[i],h=null==n?f:n(f);if(f=r||0!==f?f:0,s&&h===h){for(var d=l;d--;)if(e[d]===h)continue t;c.push(f)}else a(e,h,r)||c.push(f)}return c}pr.templateSettings={escape:kt,evaluate:It,interpolate:At,variable:"",imports:{_:pr}},pr.prototype=gr.prototype,pr.prototype.constructor=pr,mr.prototype=vr(gr.prototype),mr.prototype.constructor=mr,yr.prototype=vr(gr.prototype),yr.prototype.constructor=yr,wr.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},wr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},wr.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===l?a:n}return ce.call(e,t)?e[t]:a},wr.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==a:ce.call(e,t)},wr.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===a?l:e,this},br.prototype.clear=function(){this.__data__=[],this.size=0},br.prototype.delete=function(t){var e=this.__data__,n=Rr(e,t);return!(n<0)&&(n==e.length-1?e.pop():Pe.call(e,n,1),--this.size,!0)},br.prototype.get=function(t){var e=this.__data__,n=Rr(e,t);return n<0?a:e[n][1]},br.prototype.has=function(t){return Rr(this.__data__,t)>-1},br.prototype.set=function(t,e){var n=this.__data__,r=Rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Sr.prototype.clear=function(){this.size=0,this.__data__={hash:new wr,map:new(Jn||br),string:new wr}},Sr.prototype.delete=function(t){var e=La(this,t).delete(t);return this.size-=e?1:0,e},Sr.prototype.get=function(t){return La(this,t).get(t)},Sr.prototype.has=function(t){return La(this,t).has(t)},Sr.prototype.set=function(t,e){var n=La(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Dr.prototype.add=Dr.prototype.push=function(t){return this.__data__.set(t,l),this},Dr.prototype.has=function(t){return this.__data__.has(t)},_r.prototype.clear=function(){this.__data__=new br,this.size=0},_r.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},_r.prototype.get=function(t){return this.__data__.get(t)},_r.prototype.has=function(t){return this.__data__.has(t)},_r.prototype.set=function(t,e){var n=this.__data__;if(n instanceof br){var r=n.__data__;if(!Jn||r.length<o-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Sr(r)}return n.set(t,e),this.size=n.size,this};var Ur=sa(Gr),zr=sa(Qr,!0);function Vr(t,e){var n=!0;return Ur(t,function(t,r,i){return n=!!e(t,r,i)}),n}function Hr(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],s=e(o);if(null!=s&&(u===a?s===s&&!Fs(s):n(s,u)))var u=s,c=o}return c}function Wr(t,e){var n=[];return Ur(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Yr(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=Ya),i||(i=[]);++a<o;){var s=t[a];e>0&&n(s)?e>1?Yr(s,e-1,n,r,i):en(i,s):r||(i[i.length]=s)}return i}var qr=ua(),Xr=ua(!0);function Gr(t,e){return t&&qr(t,e,au)}function Qr(t,e){return t&&Xr(t,e,au)}function Zr(t,e){return Ke(e,function(e){return Es(t[e])})}function Kr(t,e){for(var n=0,r=(e=Xi(e,t)).length;null!=t&&n<r;)t=t[lo(e[n++])];return n&&n==r?t:a}function $r(t,e,n){var r=e(t);return ys(t)?r:en(r,n(t))}function Jr(t){return null==t?t===a?ot:J:je&&je in te(t)?function(t){var e=ce.call(t,je),n=t[je];try{t[je]=a;var r=!0}catch(t){}var i=he.call(t);return r&&(e?t[je]=n:delete t[je]),i}(t):function(t){return he.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&ce.call(t,e)}function ni(t,e){return null!=t&&e in te(t)}function ri(t,e,r){for(var i=r?Je:$e,o=t[0].length,s=t.length,u=s,c=n(s),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=tn(h,wn(e))),l=Xn(h.length,l),c[u]=!r&&(e||o>=120&&h.length>=120)?new Dr(u&&h):a}h=t[0];var d=-1,p=c[0];t:for(;++d<o&&f.length<l;){var v=h[d],g=e?e(v):v;if(v=r||0!==v?v:0,!(p?Sn(p,g):i(f,g,r))){for(u=s;--u;){var m=c[u];if(!(m?Sn(m,g):i(t[u],g,r)))continue t}p&&p.push(g),f.push(v)}}return f}function ii(t,e,n){var r=null==(t=eo(t,e=Xi(e,t)))?t:t[lo(xo(e))];return null==r?a:qe(r,t,n)}function ai(t){return As(t)&&Jr(t)==V}function oi(t,e,n,r,i){return t===e||(null==t||null==e||!As(t)&&!As(e)?t!==t&&e!==e:function(t,e,n,r,i,o){var s=ys(t),u=ys(e),c=s?H:Va(t),l=u?H:Va(e),f=(c=c==V?tt:c)==tt,h=(l=l==V?tt:l)==tt,d=c==l;if(d&&Ds(t)){if(!Ds(e))return!1;s=!0,f=!1}if(d&&!f)return o||(o=new _r),s||Ls(t)?Aa(t,e,n,r,i,o):function(t,e,n,r,i,a,o){switch(n){case lt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ct:return!(t.byteLength!=e.byteLength||!a(new ye(t),new ye(e)));case Y:case q:case $:return ps(+t,+e);case G:return t.name==e.name&&t.message==e.message;case nt:case it:return t==e+"";case K:var s=In;case rt:var u=r&g;if(s||(s=Mn),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;r|=m,o.set(t,e);var l=Aa(s(t),s(e),r,i,a,o);return o.delete(t),l;case at:if(hr)return hr.call(t)==hr.call(e)}return!1}(t,e,c,n,r,i,o);if(!(n&g)){var p=f&&ce.call(t,"__wrapped__"),v=h&&ce.call(e,"__wrapped__");if(p||v){var y=p?t.value():t,w=v?e.value():e;return o||(o=new _r),i(y,w,n,r,o)}}return!!d&&(o||(o=new _r),function(t,e,n,r,i,o){var s=n&g,u=Ma(t),c=u.length,l=Ma(e).length;if(c!=l&&!s)return!1;for(var f=c;f--;){var h=u[f];if(!(s?h in e:ce.call(e,h)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var v=!0;o.set(t,e),o.set(e,t);for(var m=s;++f<c;){h=u[f];var y=t[h],w=e[h];if(r)var b=s?r(w,y,h,e,t,o):r(y,w,h,t,e,o);if(!(b===a?y===w||i(y,w,n,r,o):b)){v=!1;break}m||(m="constructor"==h)}if(v&&!m){var S=t.constructor,D=e.constructor;S!=D&&"constructor"in t&&"constructor"in e&&!("function"==typeof S&&S instanceof S&&"function"==typeof D&&D instanceof D)&&(v=!1)}return o.delete(t),o.delete(e),v}(t,e,n,r,i,o))}(t,e,n,r,oi,i))}function si(t,e,n,r){var i=n.length,o=i,s=!r;if(null==t)return!o;for(t=te(t);i--;){var u=n[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){var c=(u=n[i])[0],l=t[c],f=u[1];if(s&&u[2]){if(l===a&&!(c in t))return!1}else{var h=new _r;if(r)var d=r(l,f,c,t,e,h);if(!(d===a?oi(f,l,g|m,r,h):d))return!1}}return!0}function ui(t){return!(!Is(t)||(e=t,fe&&fe in e))&&(Es(t)?ve:Xt).test(fo(t));var e}function ci(t){return"function"==typeof t?t:null==t?Mu:"object"==typeof t?ys(t)?vi(t[0],t[1]):pi(t):Uu(t)}function li(t){if(!Ka(t))return Yn(t);var e=[];for(var n in te(t))ce.call(t,n)&&"constructor"!=n&&e.push(n);return e}function fi(t){if(!Is(t))return function(t){var e=[];if(null!=t)for(var n in te(t))e.push(n);return e}(t);var e=Ka(t),n=[];for(var r in t)("constructor"!=r||!e&&ce.call(t,r))&&n.push(r);return n}function hi(t,e){return t<e}function di(t,e){var r=-1,i=bs(t)?n(t.length):[];return Ur(t,function(t,n,a){i[++r]=e(t,n,a)}),i}function pi(t){var e=ja(t);return 1==e.length&&e[0][2]?Ja(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function vi(t,e){return Ga(t)&&$a(e)?Ja(lo(t),e):function(n){var r=tu(n,t);return r===a&&r===e?eu(n,t):oi(e,r,g|m)}}function gi(t,e,n,r,i){t!==e&&qr(e,function(o,s){if(i||(i=new _r),Is(o))!function(t,e,n,r,i,o,s){var u=no(t,n),c=no(e,n),l=s.get(c);if(l)Ir(t,n,l);else{var f=o?o(u,c,n+"",t,e,s):a,h=f===a;if(h){var d=ys(c),p=!d&&Ds(c),v=!d&&!p&&Ls(c);f=c,d||p||v?ys(u)?f=u:Ss(u)?f=ra(u):p?(h=!1,f=Ki(c,!0)):v?(h=!1,f=Ji(c,!0)):f=[]:Cs(c)||ms(c)?(f=u,ms(u)?f=Ys(u):Is(u)&&!Es(u)||(f=Wa(c))):h=!1}h&&(s.set(c,f),i(f,c,r,o,s),s.delete(c)),Ir(t,n,f)}}(t,e,s,n,gi,r,i);else{var u=r?r(no(t,s),o,s+"",t,e,i):a;u===a&&(u=o),Ir(t,s,u)}},ou)}function mi(t,e){var n=t.length;if(n)return qa(e+=e<0?n:0,n)?t[e]:a}function yi(t,e,n){e=e.length?tn(e,function(t){return ys(t)?function(e){return Kr(e,1===t.length?t[0]:t)}:t}):[Mu];var r=-1;return e=tn(e,wn(Fa())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(di(t,function(t,n,i){return{criteria:tn(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,a=e.criteria,o=i.length,s=n.length;++r<o;){var u=ta(i[r],a[r]);if(u){if(r>=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)})}function wi(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],s=Kr(t,o);n(s,o)&&ki(a,Xi(o,t),s)}return a}function bi(t,e,n,r){var i=r?ln:cn,a=-1,o=e.length,s=t;for(t===e&&(e=ra(e)),n&&(s=tn(t,wn(n)));++a<o;)for(var u=0,c=e[a],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Pe.call(s,u,1),Pe.call(t,u,1);return t}function Si(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==a){var a=i;qa(i)?Pe.call(t,i,1):Ni(t,i)}}return t}function Di(t,e){return t+Un(Zn()*(e-t+1))}function _i(t,e){var n="";if(!t||e<1||e>B)return n;do{e%2&&(n+=t),(e=Un(e/2))&&(t+=t)}while(e);return n}function xi(t,e){return ao(to(t,e,Mu),t+"")}function Ei(t){return Er(pu(t))}function Ti(t,e){var n=pu(t);return uo(n,Br(e,0,n.length))}function ki(t,e,n,r){if(!Is(t))return t;for(var i=-1,o=(e=Xi(e,t)).length,s=o-1,u=t;null!=u&&++i<o;){var c=lo(e[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=s){var f=u[c];(l=r?r(f,c,u):a)===a&&(l=Is(f)?f:qa(e[i+1])?[]:{})}Ar(u,c,l),u=u[c]}return t}var Ii=ir?function(t,e){return ir.set(t,e),t}:Mu,Ai=Ne?function(t,e){return Ne(t,"toString",{configurable:!0,enumerable:!1,value:Iu(e),writable:!0})}:Mu;function Ri(t){return uo(pu(t))}function Mi(t,e,r){var i=-1,a=t.length;e<0&&(e=-e>a?0:a+e),(r=r>a?a:r)<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var o=n(a);++i<a;)o[i]=t[i+e];return o}function Ci(t,e){var n;return Ur(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Pi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e===e&&i<=U){for(;r<i;){var a=r+i>>>1,o=t[a];null!==o&&!Fs(o)&&(n?o<=e:o<e)?r=a+1:i=a}return i}return Oi(t,e,Mu,n)}function Oi(t,e,n,r){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(e=n(e))!==e,u=null===e,c=Fs(e),l=e===a;i<o;){var f=Un((i+o)/2),h=n(t[f]),d=h!==a,p=null===h,v=h===h,g=Fs(h);if(s)var m=r||v;else m=l?v&&(r||d):u?v&&d&&(r||!p):c?v&&d&&!p&&(r||!g):!p&&!g&&(r?h<=e:h<e);m?i=f+1:o=f}return Xn(o,N)}function Bi(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var o=t[n],s=e?e(o):o;if(!n||!ps(s,u)){var u=s;a[i++]=0===o?0:o}}return a}function Fi(t){return"number"==typeof t?t:Fs(t)?L:+t}function Li(t){if("string"==typeof t)return t;if(ys(t))return tn(t,Li)+"";if(Fs(t))return dr?dr.call(t):"";var e=t+"";return"0"==e&&1/t==-O?"-0":e}function ji(t,e,n){var r=-1,i=$e,a=t.length,s=!0,u=[],c=u;if(n)s=!1,i=Je;else if(a>=o){var l=e?null:_a(t);if(l)return Mn(l);s=!1,i=Sn,c=new Dr}else c=e?[]:u;t:for(;++r<a;){var f=t[r],h=e?e(f):f;if(f=n||0!==f?f:0,s&&h===h){for(var d=c.length;d--;)if(c[d]===h)continue t;e&&c.push(h),u.push(f)}else i(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function Ni(t,e){return null==(t=eo(t,e=Xi(e,t)))||delete t[lo(xo(e))]}function Ui(t,e,n,r){return ki(t,e,n(Kr(t,e)),r)}function zi(t,e,n,r){for(var i=t.length,a=r?i:-1;(r?a--:++a<i)&&e(t[a],a,t););return n?Mi(t,r?0:a,r?a+1:i):Mi(t,r?a+1:0,r?i:a)}function Vi(t,e){var n=t;return n instanceof yr&&(n=n.value()),nn(e,function(t,e){return e.func.apply(e.thisArg,en([t],e.args))},n)}function Hi(t,e,r){var i=t.length;if(i<2)return i?ji(t[0]):[];for(var a=-1,o=n(i);++a<i;)for(var s=t[a],u=-1;++u<i;)u!=a&&(o[a]=Nr(o[a]||s,t[u],e,r));return ji(Yr(o,1),e,r)}function Wi(t,e,n){for(var r=-1,i=t.length,o=e.length,s={};++r<i;){var u=r<o?e[r]:a;n(s,t[r],u)}return s}function Yi(t){return Ss(t)?t:[]}function qi(t){return"function"==typeof t?t:Mu}function Xi(t,e){return ys(t)?t:Ga(t,e)?[t]:co(qs(t))}var Gi=xi;function Qi(t,e,n){var r=t.length;return n=n===a?r:n,!e&&n>=r?t:Mi(t,e,n)}var Zi=on||function(t){return Oe.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=Se?Se(n):new t.constructor(n);return t.copy(r),r}function $i(t){var e=new t.constructor(t.byteLength);return new ye(e).set(new ye(t)),e}function Ji(t,e){var n=e?$i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ta(t,e){if(t!==e){var n=t!==a,r=null===t,i=t===t,o=Fs(t),s=e!==a,u=null===e,c=e===e,l=Fs(e);if(!u&&!l&&!o&&t>e||o&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!o&&!l&&t<e||l&&n&&i&&!r&&!o||u&&n&&i||!s&&i||!c)return-1}return 0}function ea(t,e,r,i){for(var a=-1,o=t.length,s=r.length,u=-1,c=e.length,l=qn(o-s,0),f=n(c+l),h=!i;++u<c;)f[u]=e[u];for(;++a<s;)(h||a<o)&&(f[r[a]]=t[a]);for(;l--;)f[u++]=t[a++];return f}function na(t,e,r,i){for(var a=-1,o=t.length,s=-1,u=r.length,c=-1,l=e.length,f=qn(o-u,0),h=n(f+l),d=!i;++a<f;)h[a]=t[a];for(var p=a;++c<l;)h[p+c]=e[c];for(;++s<u;)(d||a<o)&&(h[p+r[s]]=t[a++]);return h}function ra(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function ia(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var u=e[o],c=r?r(n[u],t[u],u,n,t):a;c===a&&(c=t[u]),i?Pr(n,u,c):Ar(n,u,c)}return n}function aa(t,e){return function(n,r){var i=ys(n)?Xe:Mr,a=e?e():{};return i(n,t,Fa(r,2),a)}}function oa(t){return xi(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:a,s=i>2?n[2]:a;for(o=t.length>3&&"function"==typeof o?(i--,o):a,s&&Xa(n[0],n[1],s)&&(o=i<3?a:o,i=1),e=te(e);++r<i;){var u=n[r];u&&t(e,u,r,o)}return e})}function sa(t,e){return function(n,r){if(null==n)return n;if(!bs(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=te(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}function ua(t){return function(e,n,r){for(var i=-1,a=te(e),o=r(e),s=o.length;s--;){var u=o[t?s:++i];if(!1===n(a[u],u,a))break}return e}}function ca(t){return function(e){var n=kn(e=qs(e))?On(e):a,r=n?n[0]:e.charAt(0),i=n?Qi(n,1).join(""):e.slice(1);return r[t]()+i}}function la(t){return function(e){return nn(Eu(mu(e).replace(we,"")),t,"")}}function fa(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=vr(t.prototype),r=t.apply(n,e);return Is(r)?r:n}}function ha(t){return function(e,n,r){var i=te(e);if(!bs(e)){var o=Fa(n,3);e=au(e),n=function(t){return o(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[o?e[s]:s]:a}}function da(t){return Ra(function(e){var n=e.length,r=n,i=mr.prototype.thru;for(t&&e.reverse();r--;){var o=e[r];if("function"!=typeof o)throw new re(u);if(i&&!s&&"wrapper"==Oa(o))var s=new mr([],!0)}for(r=s?r:n;++r<n;){var c=Oa(o=e[r]),l="wrapper"==c?Pa(o):a;s=l&&Qa(l[0])&&l[1]==(E|S|_|T)&&!l[4].length&&1==l[9]?s[Oa(l[0])].apply(s,l[3]):1==o.length&&Qa(o)?s[c]():s.thru(o)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&ys(r))return s.plant(r).value();for(var i=0,a=n?e[i].apply(this,t):r;++i<n;)a=e[i].call(this,a);return a}})}function pa(t,e,r,i,o,s,u,c,l,f){var h=e&E,d=e&y,p=e&w,v=e&(S|D),g=e&k,m=p?a:fa(t);return function y(){for(var w=arguments.length,b=n(w),S=w;S--;)b[S]=arguments[S];if(v)var D=Ba(y),_=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(b,D);if(i&&(b=ea(b,i,o,v)),s&&(b=na(b,s,u,v)),w-=_,v&&w<f){var x=Rn(b,D);return Sa(t,e,pa,y.placeholder,r,b,x,c,l,f-w)}var E=d?r:this,T=p?E[t]:t;return w=b.length,c?b=function(t,e){for(var n=t.length,r=Xn(e.length,n),i=ra(t);r--;){var o=e[r];t[r]=qa(o,n)?i[o]:a}return t}(b,c):g&&w>1&&b.reverse(),h&&l<w&&(b.length=l),this&&this!==Oe&&this instanceof y&&(T=m||fa(T)),T.apply(E,b)}}function va(t,e){return function(n,r){return function(t,e,n,r){return Gr(t,function(t,i,a){e(r,n(t),i,a)}),r}(n,t,e(r),{})}}function ga(t,e){return function(n,r){var i;if(n===a&&r===a)return e;if(n!==a&&(i=n),r!==a){if(i===a)return r;"string"==typeof n||"string"==typeof r?(n=Li(n),r=Li(r)):(n=Fi(n),r=Fi(r)),i=t(n,r)}return i}}function ma(t){return Ra(function(e){return e=tn(e,wn(Fa())),xi(function(n){var r=this;return t(e,function(t){return qe(t,r,n)})})})}function ya(t,e){var n=(e=e===a?" ":Li(e)).length;if(n<2)return n?_i(e,t):e;var r=_i(e,Nn(t/Pn(e)));return kn(e)?Qi(On(r),0,t).join(""):r.slice(0,t)}function wa(t){return function(e,r,i){return i&&"number"!=typeof i&&Xa(e,r,i)&&(r=i=a),e=zs(e),r===a?(r=e,e=0):r=zs(r),function(t,e,r,i){for(var a=-1,o=qn(Nn((e-t)/(r||1)),0),s=n(o);o--;)s[i?o:++a]=t,t+=r;return s}(e,r,i=i===a?e<r?1:-1:zs(i),t)}}function ba(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Ws(e),n=Ws(n)),t(e,n)}}function Sa(t,e,n,r,i,o,s,u,c,l){var f=e&S;e|=f?_:x,(e&=~(f?x:_))&b||(e&=~(y|w));var h=[t,e,i,f?o:a,f?s:a,f?a:o,f?a:s,u,c,l],d=n.apply(a,h);return Qa(t)&&ro(d,h),d.placeholder=r,oo(d,t,e)}function Da(t){var e=Jt[t];return function(t,n){if(t=Ws(t),(n=null==n?0:Xn(Vs(n),292))&&Hn(t)){var r=(qs(t)+"e").split("e");return+((r=(qs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var _a=er&&1/Mn(new er([,-0]))[1]==O?function(t){return new er(t)}:Fu;function xa(t){return function(e){var n=Va(e);return n==K?In(e):n==rt?Cn(e):function(t,e){return tn(e,function(e){return[e,t[e]]})}(e,t(e))}}function Ea(t,e,r,i,o,s,c,l){var f=e&w;if(!f&&"function"!=typeof t)throw new re(u);var d=i?i.length:0;if(d||(e&=~(_|x),i=o=a),c=c===a?c:qn(Vs(c),0),l=l===a?l:Vs(l),d-=o?o.length:0,e&x){var p=i,v=o;i=o=a}var g=f?a:Pa(t),m=[t,e,r,i,o,p,v,s,c,l];if(g&&function(t,e){var n=t[1],r=e[1],i=n|r,a=i<(y|w|E),o=r==E&&n==S||r==E&&n==T&&t[7].length<=e[8]||r==(E|T)&&e[7].length<=e[8]&&n==S;if(!a&&!o)return t;r&y&&(t[2]=e[2],i|=n&y?0:b);var s=e[3];if(s){var u=t[3];t[3]=u?ea(u,s,e[4]):s,t[4]=u?Rn(t[3],h):e[4]}(s=e[5])&&(u=t[5],t[5]=u?na(u,s,e[6]):s,t[6]=u?Rn(t[5],h):e[6]),(s=e[7])&&(t[7]=s),r&E&&(t[8]=null==t[8]?e[8]:Xn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(m,g),t=m[0],e=m[1],r=m[2],i=m[3],o=m[4],!(l=m[9]=m[9]===a?f?0:t.length:qn(m[9]-d,0))&&e&(S|D)&&(e&=~(S|D)),e&&e!=y)k=e==S||e==D?function(t,e,r){var i=fa(t);return function o(){for(var s=arguments.length,u=n(s),c=s,l=Ba(o);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:Rn(u,l);return(s-=f.length)<r?Sa(t,e,pa,o.placeholder,a,u,f,a,a,r-s):qe(this&&this!==Oe&&this instanceof o?i:t,this,u)}}(t,e,l):e!=_&&e!=(y|_)||o.length?pa.apply(a,m):function(t,e,r,i){var a=e&y,o=fa(t);return function e(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),h=this&&this!==Oe&&this instanceof e?o:t;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return qe(h,a?r:this,f)}}(t,e,r,i);else var k=function(t,e,n){var r=e&y,i=fa(t);return function e(){return(this&&this!==Oe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,r);return oo((g?Ii:ro)(k,m),t,e)}function Ta(t,e,n,r){return t===a||ps(t,oe[n])&&!ce.call(r,n)?e:t}function ka(t,e,n,r,i,o){return Is(t)&&Is(e)&&(o.set(e,t),gi(t,e,a,ka,o),o.delete(e)),t}function Ia(t){return Cs(t)?a:t}function Aa(t,e,n,r,i,o){var s=n&g,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=o.get(t),f=o.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=n&m?new Dr:a;for(o.set(t,e),o.set(e,t);++h<u;){var v=t[h],y=e[h];if(r)var w=s?r(y,v,h,e,t,o):r(v,y,h,t,e,o);if(w!==a){if(w)continue;d=!1;break}if(p){if(!an(e,function(t,e){if(!Sn(p,e)&&(v===t||i(v,t,n,r,o)))return p.push(e)})){d=!1;break}}else if(v!==y&&!i(v,y,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Ra(t){return ao(to(t,a,wo),t+"")}function Ma(t){return $r(t,au,Ua)}function Ca(t){return $r(t,ou,za)}var Pa=ir?function(t){return ir.get(t)}:Fu;function Oa(t){for(var e=t.name+"",n=ar[e],r=ce.call(ar,e)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==t)return i.name}return e}function Ba(t){return(ce.call(pr,"placeholder")?pr:t).placeholder}function Fa(){var t=pr.iteratee||Cu;return t=t===Cu?ci:t,arguments.length?t(arguments[0],arguments[1]):t}function La(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function ja(t){for(var e=au(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,$a(i)]}return e}function Na(t,e){var n=function(t,e){return null==t?a:t[e]}(t,e);return ui(n)?n:a}var Ua=zn?function(t){return null==t?[]:(t=te(t),Ke(zn(t),function(e){return Ce.call(t,e)}))}:Hu,za=zn?function(t){for(var e=[];t;)en(e,Ua(t)),t=_e(t);return e}:Hu,Va=Jr;function Ha(t,e,n){for(var r=-1,i=(e=Xi(e,t)).length,a=!1;++r<i;){var o=lo(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&ks(i)&&qa(o,i)&&(ys(t)||ms(t))}function Wa(t){return"function"!=typeof t.constructor||Ka(t)?{}:vr(_e(t))}function Ya(t){return ys(t)||ms(t)||!!(Be&&t&&t[Be])}function qa(t,e){var n=typeof t;return!!(e=null==e?B:e)&&("number"==n||"symbol"!=n&&Qt.test(t))&&t>-1&&t%1==0&&t<e}function Xa(t,e,n){if(!Is(n))return!1;var r=typeof e;return!!("number"==r?bs(n)&&qa(e,n.length):"string"==r&&e in n)&&ps(n[e],t)}function Ga(t,e){if(ys(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Fs(t))||Mt.test(t)||!Rt.test(t)||null!=e&&t in te(e)}function Qa(t){var e=Oa(t),n=pr[e];if("function"!=typeof n||!(e in yr.prototype))return!1;if(t===n)return!0;var r=Pa(n);return!!r&&t===r[0]}($n&&Va(new $n(new ArrayBuffer(1)))!=lt||Jn&&Va(new Jn)!=K||tr&&"[object Promise]"!=Va(tr.resolve())||er&&Va(new er)!=rt||nr&&Va(new nr)!=st)&&(Va=function(t){var e=Jr(t),n=e==tt?t.constructor:a,r=n?fo(n):"";if(r)switch(r){case or:return lt;case sr:return K;case ur:return"[object Promise]";case cr:return rt;case lr:return st}return e});var Za=se?Es:Wu;function Ka(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||oe)}function $a(t){return t===t&&!Is(t)}function Ja(t,e){return function(n){return null!=n&&n[t]===e&&(e!==a||t in te(n))}}function to(t,e,r){return e=qn(e===a?t.length-1:e,0),function(){for(var i=arguments,a=-1,o=qn(i.length-e,0),s=n(o);++a<o;)s[a]=i[e+a];a=-1;for(var u=n(e+1);++a<e;)u[a]=i[a];return u[e]=r(s),qe(t,this,u)}}function eo(t,e){return e.length<2?t:Kr(t,Mi(e,0,-1))}function no(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}var ro=so(Ii),io=jn||function(t,e){return Oe.setTimeout(t,e)},ao=so(Ai);function oo(t,e,n){var r=e+"";return ao(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Lt,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ge(z,function(n){var r="_."+n[0];e&n[1]&&!$e(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(jt);return e?e[1].split(Nt):[]}(r),n)))}function so(t){var e=0,n=0;return function(){var r=Gn(),i=M-(r-n);if(n=r,i>0){if(++e>=R)return arguments[0]}else e=0;return t.apply(a,arguments)}}function uo(t,e){var n=-1,r=t.length,i=r-1;for(e=e===a?r:e;++n<e;){var o=Di(n,i),s=t[o];t[o]=t[n],t[n]=s}return t.length=e,t}var co=function(t){var e=us(t,function(t){return n.size===f&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ct,function(t,n,r,i){e.push(r?i.replace(Vt,"$1"):n||t)}),e});function lo(t){if("string"==typeof t||Fs(t))return t;var e=t+"";return"0"==e&&1/t==-O?"-0":e}function fo(t){if(null!=t){try{return ue.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function ho(t){if(t instanceof yr)return t.clone();var e=new mr(t.__wrapped__,t.__chain__);return e.__actions__=ra(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var po=xi(function(t,e){return Ss(t)?Nr(t,Yr(e,1,Ss,!0)):[]}),vo=xi(function(t,e){var n=xo(e);return Ss(n)&&(n=a),Ss(t)?Nr(t,Yr(e,1,Ss,!0),Fa(n,2)):[]}),go=xi(function(t,e){var n=xo(e);return Ss(n)&&(n=a),Ss(t)?Nr(t,Yr(e,1,Ss,!0),a,n):[]});function mo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Vs(n);return i<0&&(i=qn(r+i,0)),un(t,Fa(e,3),i)}function yo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==a&&(i=Vs(n),i=n<0?qn(r+i,0):Xn(i,r-1)),un(t,Fa(e,3),i,!0)}function wo(t){return null!=t&&t.length?Yr(t,1):[]}function bo(t){return t&&t.length?t[0]:a}var So=xi(function(t){var e=tn(t,Yi);return e.length&&e[0]===t[0]?ri(e):[]}),Do=xi(function(t){var e=xo(t),n=tn(t,Yi);return e===xo(n)?e=a:n.pop(),n.length&&n[0]===t[0]?ri(n,Fa(e,2)):[]}),_o=xi(function(t){var e=xo(t),n=tn(t,Yi);return(e="function"==typeof e?e:a)&&n.pop(),n.length&&n[0]===t[0]?ri(n,a,e):[]});function xo(t){var e=null==t?0:t.length;return e?t[e-1]:a}var Eo=xi(To);function To(t,e){return t&&t.length&&e&&e.length?bi(t,e):t}var ko=Ra(function(t,e){var n=null==t?0:t.length,r=Or(t,e);return Si(t,tn(e,function(t){return qa(t,n)?+t:t}).sort(ta)),r});function Io(t){return null==t?t:Kn.call(t)}var Ao=xi(function(t){return ji(Yr(t,1,Ss,!0))}),Ro=xi(function(t){var e=xo(t);return Ss(e)&&(e=a),ji(Yr(t,1,Ss,!0),Fa(e,2))}),Mo=xi(function(t){var e=xo(t);return e="function"==typeof e?e:a,ji(Yr(t,1,Ss,!0),a,e)});function Co(t){if(!t||!t.length)return[];var e=0;return t=Ke(t,function(t){if(Ss(t))return e=qn(t.length,e),!0}),mn(e,function(e){return tn(t,dn(e))})}function Po(t,e){if(!t||!t.length)return[];var n=Co(t);return null==e?n:tn(n,function(t){return qe(e,a,t)})}var Oo=xi(function(t,e){return Ss(t)?Nr(t,e):[]}),Bo=xi(function(t){return Hi(Ke(t,Ss))}),Fo=xi(function(t){var e=xo(t);return Ss(e)&&(e=a),Hi(Ke(t,Ss),Fa(e,2))}),Lo=xi(function(t){var e=xo(t);return e="function"==typeof e?e:a,Hi(Ke(t,Ss),a,e)}),jo=xi(Co);var No=xi(function(t){var e=t.length,n=e>1?t[e-1]:a;return n="function"==typeof n?(t.pop(),n):a,Po(t,n)});function Uo(t){var e=pr(t);return e.__chain__=!0,e}function zo(t,e){return e(t)}var Vo=Ra(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Or(e,t)};return!(e>1||this.__actions__.length)&&r instanceof yr&&qa(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:zo,args:[i],thisArg:a}),new mr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(a),t})):this.thru(i)});var Ho=aa(function(t,e,n){ce.call(t,n)?++t[n]:Pr(t,n,1)});var Wo=ha(mo),Yo=ha(yo);function qo(t,e){return(ys(t)?Ge:Ur)(t,Fa(e,3))}function Xo(t,e){return(ys(t)?Qe:zr)(t,Fa(e,3))}var Go=aa(function(t,e,n){ce.call(t,n)?t[n].push(e):Pr(t,n,[e])});var Qo=xi(function(t,e,r){var i=-1,a="function"==typeof e,o=bs(t)?n(t.length):[];return Ur(t,function(t){o[++i]=a?qe(e,t,r):ii(t,e,r)}),o}),Zo=aa(function(t,e,n){Pr(t,n,e)});function Ko(t,e){return(ys(t)?tn:di)(t,Fa(e,3))}var $o=aa(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Jo=xi(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Xa(t,e[0],e[1])?e=[]:n>2&&Xa(e[0],e[1],e[2])&&(e=[e[0]]),yi(t,Yr(e,1),[])}),ts=pn||function(){return Oe.Date.now()};function es(t,e,n){return e=n?a:e,e=t&&null==e?t.length:e,Ea(t,E,a,a,a,a,e)}function ns(t,e){var n;if("function"!=typeof e)throw new re(u);return t=Vs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=a),n}}var rs=xi(function(t,e,n){var r=y;if(n.length){var i=Rn(n,Ba(rs));r|=_}return Ea(t,r,e,n,i)}),is=xi(function(t,e,n){var r=y|w;if(n.length){var i=Rn(n,Ba(is));r|=_}return Ea(e,r,t,n,i)});function as(t,e,n){var r,i,o,s,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new re(u);function v(e){var n=r,o=i;return r=i=a,f=e,s=t.apply(o,n)}function g(t){var n=t-l;return l===a||n>=e||n<0||d&&t-f>=o}function m(){var t=ts();if(g(t))return y(t);c=io(m,function(t){var n=e-(t-l);return d?Xn(n,o-(t-f)):n}(t))}function y(t){return c=a,p&&r?v(t):(r=i=a,s)}function w(){var t=ts(),n=g(t);if(r=arguments,i=this,l=t,n){if(c===a)return function(t){return f=t,c=io(m,e),h?v(t):s}(l);if(d)return Zi(c),c=io(m,e),v(l)}return c===a&&(c=io(m,e)),s}return e=Ws(e)||0,Is(n)&&(h=!!n.leading,o=(d="maxWait"in n)?qn(Ws(n.maxWait)||0,e):o,p="trailing"in n?!!n.trailing:p),w.cancel=function(){c!==a&&Zi(c),f=0,r=l=i=c=a},w.flush=function(){return c===a?s:y(ts())},w}var os=xi(function(t,e){return jr(t,1,e)}),ss=xi(function(t,e,n){return jr(t,Ws(e)||0,n)});function us(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new re(u);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(us.Cache||Sr),n}function cs(t){if("function"!=typeof t)throw new re(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}us.Cache=Sr;var ls=Gi(function(t,e){var n=(e=1==e.length&&ys(e[0])?tn(e[0],wn(Fa())):tn(Yr(e,1),wn(Fa()))).length;return xi(function(r){for(var i=-1,a=Xn(r.length,n);++i<a;)r[i]=e[i].call(this,r[i]);return qe(t,this,r)})}),fs=xi(function(t,e){var n=Rn(e,Ba(fs));return Ea(t,_,a,e,n)}),hs=xi(function(t,e){var n=Rn(e,Ba(hs));return Ea(t,x,a,e,n)}),ds=Ra(function(t,e){return Ea(t,T,a,a,a,e)});function ps(t,e){return t===e||t!==t&&e!==e}var vs=ba(ti),gs=ba(function(t,e){return t>=e}),ms=ai(function(){return arguments}())?ai:function(t){return As(t)&&ce.call(t,"callee")&&!Ce.call(t,"callee")},ys=n.isArray,ws=Ue?wn(Ue):function(t){return As(t)&&Jr(t)==ct};function bs(t){return null!=t&&ks(t.length)&&!Es(t)}function Ss(t){return As(t)&&bs(t)}var Ds=Vn||Wu,_s=ze?wn(ze):function(t){return As(t)&&Jr(t)==q};function xs(t){if(!As(t))return!1;var e=Jr(t);return e==G||e==X||"string"==typeof t.message&&"string"==typeof t.name&&!Cs(t)}function Es(t){if(!Is(t))return!1;var e=Jr(t);return e==Q||e==Z||e==W||e==et}function Ts(t){return"number"==typeof t&&t==Vs(t)}function ks(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=B}function Is(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function As(t){return null!=t&&"object"==typeof t}var Rs=Ve?wn(Ve):function(t){return As(t)&&Va(t)==K};function Ms(t){return"number"==typeof t||As(t)&&Jr(t)==$}function Cs(t){if(!As(t)||Jr(t)!=tt)return!1;var e=_e(t);if(null===e)return!0;var n=ce.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==de}var Ps=He?wn(He):function(t){return As(t)&&Jr(t)==nt};var Os=We?wn(We):function(t){return As(t)&&Va(t)==rt};function Bs(t){return"string"==typeof t||!ys(t)&&As(t)&&Jr(t)==it}function Fs(t){return"symbol"==typeof t||As(t)&&Jr(t)==at}var Ls=Ye?wn(Ye):function(t){return As(t)&&ks(t.length)&&!!ke[Jr(t)]};var js=ba(hi),Ns=ba(function(t,e){return t<=e});function Us(t){if(!t)return[];if(bs(t))return Bs(t)?On(t):ra(t);if(Fe&&t[Fe])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Fe]());var e=Va(t);return(e==K?In:e==rt?Mn:pu)(t)}function zs(t){return t?(t=Ws(t))===O||t===-O?(t<0?-1:1)*F:t===t?t:0:0===t?t:0}function Vs(t){var e=zs(t),n=e%1;return e===e?n?e-n:e:0}function Hs(t){return t?Br(Vs(t),0,j):0}function Ws(t){if("number"==typeof t)return t;if(Fs(t))return L;if(Is(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Is(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=yn(t);var n=qt.test(t);return n||Gt.test(t)?Me(t.slice(2),n?2:8):Yt.test(t)?L:+t}function Ys(t){return ia(t,ou(t))}function qs(t){return null==t?"":Li(t)}var Xs=oa(function(t,e){if(Ka(e)||bs(e))ia(e,au(e),t);else for(var n in e)ce.call(e,n)&&Ar(t,n,e[n])}),Gs=oa(function(t,e){ia(e,ou(e),t)}),Qs=oa(function(t,e,n,r){ia(e,ou(e),t,r)}),Zs=oa(function(t,e,n,r){ia(e,au(e),t,r)}),Ks=Ra(Or);var $s=xi(function(t,e){t=te(t);var n=-1,r=e.length,i=r>2?e[2]:a;for(i&&Xa(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],s=ou(o),u=-1,c=s.length;++u<c;){var l=s[u],f=t[l];(f===a||ps(f,oe[l])&&!ce.call(t,l))&&(t[l]=o[l])}return t}),Js=xi(function(t){return t.push(a,ka),qe(uu,a,t)});function tu(t,e,n){var r=null==t?a:Kr(t,e);return r===a?n:r}function eu(t,e){return null!=t&&Ha(t,e,ni)}var nu=va(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=he.call(e)),t[e]=n},Iu(Mu)),ru=va(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=he.call(e)),ce.call(t,e)?t[e].push(n):t[e]=[n]},Fa),iu=xi(ii);function au(t){return bs(t)?xr(t):li(t)}function ou(t){return bs(t)?xr(t,!0):fi(t)}var su=oa(function(t,e,n){gi(t,e,n)}),uu=oa(function(t,e,n,r){gi(t,e,n,r)}),cu=Ra(function(t,e){var n={};if(null==t)return n;var r=!1;e=tn(e,function(e){return e=Xi(e,t),r||(r=e.length>1),e}),ia(t,Ca(t),n),r&&(n=Fr(n,d|p|v,Ia));for(var i=e.length;i--;)Ni(n,e[i]);return n});var lu=Ra(function(t,e){return null==t?{}:function(t,e){return wi(t,e,function(e,n){return eu(t,n)})}(t,e)});function fu(t,e){if(null==t)return{};var n=tn(Ca(t),function(t){return[t]});return e=Fa(e),wi(t,n,function(t,n){return e(t,n[0])})}var hu=xa(au),du=xa(ou);function pu(t){return null==t?[]:bn(t,au(t))}var vu=la(function(t,e,n){return e=e.toLowerCase(),t+(n?gu(e):e)});function gu(t){return xu(qs(t).toLowerCase())}function mu(t){return(t=qs(t))&&t.replace(Zt,xn).replace(be,"")}var yu=la(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),wu=la(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),bu=ca("toLowerCase");var Su=la(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var Du=la(function(t,e,n){return t+(n?" ":"")+xu(e)});var _u=la(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),xu=ca("toUpperCase");function Eu(t,e,n){return t=qs(t),(e=n?a:e)===a?function(t){return xe.test(t)}(t)?function(t){return t.match(De)||[]}(t):function(t){return t.match(Ut)||[]}(t):t.match(e)||[]}var Tu=xi(function(t,e){try{return qe(t,a,e)}catch(t){return xs(t)?t:new i(t)}}),ku=Ra(function(t,e){return Ge(e,function(e){e=lo(e),Pr(t,e,rs(t[e],t))}),t});function Iu(t){return function(){return t}}var Au=da(),Ru=da(!0);function Mu(t){return t}function Cu(t){return ci("function"==typeof t?t:Fr(t,d))}var Pu=xi(function(t,e){return function(n){return ii(n,t,e)}}),Ou=xi(function(t,e){return function(n){return ii(t,n,e)}});function Bu(t,e,n){var r=au(e),i=Zr(e,r);null!=n||Is(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Zr(e,au(e)));var a=!(Is(n)&&"chain"in n)||!!n.chain,o=Es(t);return Ge(i,function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(a||e){var n=t(this.__wrapped__);return(n.__actions__=ra(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,en([this.value()],arguments))})}),t}function Fu(){}var Lu=ma(tn),ju=ma(Ze),Nu=ma(an);function Uu(t){return Ga(t)?dn(lo(t)):function(t){return function(e){return Kr(e,t)}}(t)}var zu=wa(),Vu=wa(!0);function Hu(){return[]}function Wu(){return!1}var Yu=ga(function(t,e){return t+e},0),qu=Da("ceil"),Xu=ga(function(t,e){return t/e},1),Gu=Da("floor");var Qu=ga(function(t,e){return t*e},1),Zu=Da("round"),Ku=ga(function(t,e){return t-e},0);return pr.after=function(t,e){if("function"!=typeof e)throw new re(u);return t=Vs(t),function(){if(--t<1)return e.apply(this,arguments)}},pr.ary=es,pr.assign=Xs,pr.assignIn=Gs,pr.assignInWith=Qs,pr.assignWith=Zs,pr.at=Ks,pr.before=ns,pr.bind=rs,pr.bindAll=ku,pr.bindKey=is,pr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ys(t)?t:[t]},pr.chain=Uo,pr.chunk=function(t,e,r){e=(r?Xa(t,e,r):e===a)?1:qn(Vs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,s=0,u=n(Nn(i/e));o<i;)u[s++]=Mi(t,o,o+=e);return u},pr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var a=t[e];a&&(i[r++]=a)}return i},pr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return en(ys(r)?ra(r):[r],Yr(e,1))},pr.cond=function(t){var e=null==t?0:t.length,n=Fa();return t=e?tn(t,function(t){if("function"!=typeof t[1])throw new re(u);return[n(t[0]),t[1]]}):[],xi(function(n){for(var r=-1;++r<e;){var i=t[r];if(qe(i[0],this,n))return qe(i[1],this,n)}})},pr.conforms=function(t){return function(t){var e=au(t);return function(n){return Lr(n,t,e)}}(Fr(t,d))},pr.constant=Iu,pr.countBy=Ho,pr.create=function(t,e){var n=vr(t);return null==e?n:Cr(n,e)},pr.curry=function t(e,n,r){var i=Ea(e,S,a,a,a,a,a,n=r?a:n);return i.placeholder=t.placeholder,i},pr.curryRight=function t(e,n,r){var i=Ea(e,D,a,a,a,a,a,n=r?a:n);return i.placeholder=t.placeholder,i},pr.debounce=as,pr.defaults=$s,pr.defaultsDeep=Js,pr.defer=os,pr.delay=ss,pr.difference=po,pr.differenceBy=vo,pr.differenceWith=go,pr.drop=function(t,e,n){var r=null==t?0:t.length;return r?Mi(t,(e=n||e===a?1:Vs(e))<0?0:e,r):[]},pr.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Mi(t,0,(e=r-(e=n||e===a?1:Vs(e)))<0?0:e):[]},pr.dropRightWhile=function(t,e){return t&&t.length?zi(t,Fa(e,3),!0,!0):[]},pr.dropWhile=function(t,e){return t&&t.length?zi(t,Fa(e,3),!0):[]},pr.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Xa(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=Vs(n))<0&&(n=-n>i?0:i+n),(r=r===a||r>i?i:Vs(r))<0&&(r+=i),r=n>r?0:Hs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},pr.filter=function(t,e){return(ys(t)?Ke:Wr)(t,Fa(e,3))},pr.flatMap=function(t,e){return Yr(Ko(t,e),1)},pr.flatMapDeep=function(t,e){return Yr(Ko(t,e),O)},pr.flatMapDepth=function(t,e,n){return n=n===a?1:Vs(n),Yr(Ko(t,e),n)},pr.flatten=wo,pr.flattenDeep=function(t){return null!=t&&t.length?Yr(t,O):[]},pr.flattenDepth=function(t,e){return null!=t&&t.length?Yr(t,e=e===a?1:Vs(e)):[]},pr.flip=function(t){return Ea(t,k)},pr.flow=Au,pr.flowRight=Ru,pr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},pr.functions=function(t){return null==t?[]:Zr(t,au(t))},pr.functionsIn=function(t){return null==t?[]:Zr(t,ou(t))},pr.groupBy=Go,pr.initial=function(t){return null!=t&&t.length?Mi(t,0,-1):[]},pr.intersection=So,pr.intersectionBy=Do,pr.intersectionWith=_o,pr.invert=nu,pr.invertBy=ru,pr.invokeMap=Qo,pr.iteratee=Cu,pr.keyBy=Zo,pr.keys=au,pr.keysIn=ou,pr.map=Ko,pr.mapKeys=function(t,e){var n={};return e=Fa(e,3),Gr(t,function(t,r,i){Pr(n,e(t,r,i),t)}),n},pr.mapValues=function(t,e){var n={};return e=Fa(e,3),Gr(t,function(t,r,i){Pr(n,r,e(t,r,i))}),n},pr.matches=function(t){return pi(Fr(t,d))},pr.matchesProperty=function(t,e){return vi(t,Fr(e,d))},pr.memoize=us,pr.merge=su,pr.mergeWith=uu,pr.method=Pu,pr.methodOf=Ou,pr.mixin=Bu,pr.negate=cs,pr.nthArg=function(t){return t=Vs(t),xi(function(e){return mi(e,t)})},pr.omit=cu,pr.omitBy=function(t,e){return fu(t,cs(Fa(e)))},pr.once=function(t){return ns(2,t)},pr.orderBy=function(t,e,n,r){return null==t?[]:(ys(e)||(e=null==e?[]:[e]),ys(n=r?a:n)||(n=null==n?[]:[n]),yi(t,e,n))},pr.over=Lu,pr.overArgs=ls,pr.overEvery=ju,pr.overSome=Nu,pr.partial=fs,pr.partialRight=hs,pr.partition=$o,pr.pick=lu,pr.pickBy=fu,pr.property=Uu,pr.propertyOf=function(t){return function(e){return null==t?a:Kr(t,e)}},pr.pull=Eo,pr.pullAll=To,pr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?bi(t,e,Fa(n,2)):t},pr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?bi(t,e,a,n):t},pr.pullAt=ko,pr.range=zu,pr.rangeRight=Vu,pr.rearg=ds,pr.reject=function(t,e){return(ys(t)?Ke:Wr)(t,cs(Fa(e,3)))},pr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],a=t.length;for(e=Fa(e,3);++r<a;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return Si(t,i),n},pr.rest=function(t,e){if("function"!=typeof t)throw new re(u);return xi(t,e=e===a?e:Vs(e))},pr.reverse=Io,pr.sampleSize=function(t,e,n){return e=(n?Xa(t,e,n):e===a)?1:Vs(e),(ys(t)?Tr:Ti)(t,e)},pr.set=function(t,e,n){return null==t?t:ki(t,e,n)},pr.setWith=function(t,e,n,r){return r="function"==typeof r?r:a,null==t?t:ki(t,e,n,r)},pr.shuffle=function(t){return(ys(t)?kr:Ri)(t)},pr.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Xa(t,e,n)?(e=0,n=r):(e=null==e?0:Vs(e),n=n===a?r:Vs(n)),Mi(t,e,n)):[]},pr.sortBy=Jo,pr.sortedUniq=function(t){return t&&t.length?Bi(t):[]},pr.sortedUniqBy=function(t,e){return t&&t.length?Bi(t,Fa(e,2)):[]},pr.split=function(t,e,n){return n&&"number"!=typeof n&&Xa(t,e,n)&&(e=n=a),(n=n===a?j:n>>>0)?(t=qs(t))&&("string"==typeof e||null!=e&&!Ps(e))&&!(e=Li(e))&&kn(t)?Qi(On(t),0,n):t.split(e,n):[]},pr.spread=function(t,e){if("function"!=typeof t)throw new re(u);return e=null==e?0:qn(Vs(e),0),xi(function(n){var r=n[e],i=Qi(n,0,e);return r&&en(i,r),qe(t,this,i)})},pr.tail=function(t){var e=null==t?0:t.length;return e?Mi(t,1,e):[]},pr.take=function(t,e,n){return t&&t.length?Mi(t,0,(e=n||e===a?1:Vs(e))<0?0:e):[]},pr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Mi(t,(e=r-(e=n||e===a?1:Vs(e)))<0?0:e,r):[]},pr.takeRightWhile=function(t,e){return t&&t.length?zi(t,Fa(e,3),!1,!0):[]},pr.takeWhile=function(t,e){return t&&t.length?zi(t,Fa(e,3)):[]},pr.tap=function(t,e){return e(t),t},pr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new re(u);return Is(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),as(t,e,{leading:r,maxWait:e,trailing:i})},pr.thru=zo,pr.toArray=Us,pr.toPairs=hu,pr.toPairsIn=du,pr.toPath=function(t){return ys(t)?tn(t,lo):Fs(t)?[t]:ra(co(qs(t)))},pr.toPlainObject=Ys,pr.transform=function(t,e,n){var r=ys(t),i=r||Ds(t)||Ls(t);if(e=Fa(e,4),null==n){var a=t&&t.constructor;n=i?r?new a:[]:Is(t)&&Es(a)?vr(_e(t)):{}}return(i?Ge:Gr)(t,function(t,r,i){return e(n,t,r,i)}),n},pr.unary=function(t){return es(t,1)},pr.union=Ao,pr.unionBy=Ro,pr.unionWith=Mo,pr.uniq=function(t){return t&&t.length?ji(t):[]},pr.uniqBy=function(t,e){return t&&t.length?ji(t,Fa(e,2)):[]},pr.uniqWith=function(t,e){return e="function"==typeof e?e:a,t&&t.length?ji(t,a,e):[]},pr.unset=function(t,e){return null==t||Ni(t,e)},pr.unzip=Co,pr.unzipWith=Po,pr.update=function(t,e,n){return null==t?t:Ui(t,e,qi(n))},pr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:a,null==t?t:Ui(t,e,qi(n),r)},pr.values=pu,pr.valuesIn=function(t){return null==t?[]:bn(t,ou(t))},pr.without=Oo,pr.words=Eu,pr.wrap=function(t,e){return fs(qi(e),t)},pr.xor=Bo,pr.xorBy=Fo,pr.xorWith=Lo,pr.zip=jo,pr.zipObject=function(t,e){return Wi(t||[],e||[],Ar)},pr.zipObjectDeep=function(t,e){return Wi(t||[],e||[],ki)},pr.zipWith=No,pr.entries=hu,pr.entriesIn=du,pr.extend=Gs,pr.extendWith=Qs,Bu(pr,pr),pr.add=Yu,pr.attempt=Tu,pr.camelCase=vu,pr.capitalize=gu,pr.ceil=qu,pr.clamp=function(t,e,n){return n===a&&(n=e,e=a),n!==a&&(n=(n=Ws(n))===n?n:0),e!==a&&(e=(e=Ws(e))===e?e:0),Br(Ws(t),e,n)},pr.clone=function(t){return Fr(t,v)},pr.cloneDeep=function(t){return Fr(t,d|v)},pr.cloneDeepWith=function(t,e){return Fr(t,d|v,e="function"==typeof e?e:a)},pr.cloneWith=function(t,e){return Fr(t,v,e="function"==typeof e?e:a)},pr.conformsTo=function(t,e){return null==e||Lr(t,e,au(e))},pr.deburr=mu,pr.defaultTo=function(t,e){return null==t||t!==t?e:t},pr.divide=Xu,pr.endsWith=function(t,e,n){t=qs(t),e=Li(e);var r=t.length,i=n=n===a?r:Br(Vs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},pr.eq=ps,pr.escape=function(t){return(t=qs(t))&&Tt.test(t)?t.replace(xt,En):t},pr.escapeRegExp=function(t){return(t=qs(t))&&Ot.test(t)?t.replace(Pt,"\\$&"):t},pr.every=function(t,e,n){var r=ys(t)?Ze:Vr;return n&&Xa(t,e,n)&&(e=a),r(t,Fa(e,3))},pr.find=Wo,pr.findIndex=mo,pr.findKey=function(t,e){return sn(t,Fa(e,3),Gr)},pr.findLast=Yo,pr.findLastIndex=yo,pr.findLastKey=function(t,e){return sn(t,Fa(e,3),Qr)},pr.floor=Gu,pr.forEach=qo,pr.forEachRight=Xo,pr.forIn=function(t,e){return null==t?t:qr(t,Fa(e,3),ou)},pr.forInRight=function(t,e){return null==t?t:Xr(t,Fa(e,3),ou)},pr.forOwn=function(t,e){return t&&Gr(t,Fa(e,3))},pr.forOwnRight=function(t,e){return t&&Qr(t,Fa(e,3))},pr.get=tu,pr.gt=vs,pr.gte=gs,pr.has=function(t,e){return null!=t&&Ha(t,e,ei)},pr.hasIn=eu,pr.head=bo,pr.identity=Mu,pr.includes=function(t,e,n,r){t=bs(t)?t:pu(t),n=n&&!r?Vs(n):0;var i=t.length;return n<0&&(n=qn(i+n,0)),Bs(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&cn(t,e,n)>-1},pr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Vs(n);return i<0&&(i=qn(r+i,0)),cn(t,e,i)},pr.inRange=function(t,e,n){return e=zs(e),n===a?(n=e,e=0):n=zs(n),function(t,e,n){return t>=Xn(e,n)&&t<qn(e,n)}(t=Ws(t),e,n)},pr.invoke=iu,pr.isArguments=ms,pr.isArray=ys,pr.isArrayBuffer=ws,pr.isArrayLike=bs,pr.isArrayLikeObject=Ss,pr.isBoolean=function(t){return!0===t||!1===t||As(t)&&Jr(t)==Y},pr.isBuffer=Ds,pr.isDate=_s,pr.isElement=function(t){return As(t)&&1===t.nodeType&&!Cs(t)},pr.isEmpty=function(t){if(null==t)return!0;if(bs(t)&&(ys(t)||"string"==typeof t||"function"==typeof t.splice||Ds(t)||Ls(t)||ms(t)))return!t.length;var e=Va(t);if(e==K||e==rt)return!t.size;if(Ka(t))return!li(t).length;for(var n in t)if(ce.call(t,n))return!1;return!0},pr.isEqual=function(t,e){return oi(t,e)},pr.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:a)?n(t,e):a;return r===a?oi(t,e,a,n):!!r},pr.isError=xs,pr.isFinite=function(t){return"number"==typeof t&&Hn(t)},pr.isFunction=Es,pr.isInteger=Ts,pr.isLength=ks,pr.isMap=Rs,pr.isMatch=function(t,e){return t===e||si(t,e,ja(e))},pr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:a,si(t,e,ja(e),n)},pr.isNaN=function(t){return Ms(t)&&t!=+t},pr.isNative=function(t){if(Za(t))throw new i(s);return ui(t)},pr.isNil=function(t){return null==t},pr.isNull=function(t){return null===t},pr.isNumber=Ms,pr.isObject=Is,pr.isObjectLike=As,pr.isPlainObject=Cs,pr.isRegExp=Ps,pr.isSafeInteger=function(t){return Ts(t)&&t>=-B&&t<=B},pr.isSet=Os,pr.isString=Bs,pr.isSymbol=Fs,pr.isTypedArray=Ls,pr.isUndefined=function(t){return t===a},pr.isWeakMap=function(t){return As(t)&&Va(t)==st},pr.isWeakSet=function(t){return As(t)&&Jr(t)==ut},pr.join=function(t,e){return null==t?"":Wn.call(t,e)},pr.kebabCase=yu,pr.last=xo,pr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==a&&(i=(i=Vs(n))<0?qn(r+i,0):Xn(i,r-1)),e===e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):un(t,fn,i,!0)},pr.lowerCase=wu,pr.lowerFirst=bu,pr.lt=js,pr.lte=Ns,pr.max=function(t){return t&&t.length?Hr(t,Mu,ti):a},pr.maxBy=function(t,e){return t&&t.length?Hr(t,Fa(e,2),ti):a},pr.mean=function(t){return hn(t,Mu)},pr.meanBy=function(t,e){return hn(t,Fa(e,2))},pr.min=function(t){return t&&t.length?Hr(t,Mu,hi):a},pr.minBy=function(t,e){return t&&t.length?Hr(t,Fa(e,2),hi):a},pr.stubArray=Hu,pr.stubFalse=Wu,pr.stubObject=function(){return{}},pr.stubString=function(){return""},pr.stubTrue=function(){return!0},pr.multiply=Qu,pr.nth=function(t,e){return t&&t.length?mi(t,Vs(e)):a},pr.noConflict=function(){return Oe._===this&&(Oe._=pe),this},pr.noop=Fu,pr.now=ts,pr.pad=function(t,e,n){t=qs(t);var r=(e=Vs(e))?Pn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return ya(Un(i),n)+t+ya(Nn(i),n)},pr.padEnd=function(t,e,n){t=qs(t);var r=(e=Vs(e))?Pn(t):0;return e&&r<e?t+ya(e-r,n):t},pr.padStart=function(t,e,n){t=qs(t);var r=(e=Vs(e))?Pn(t):0;return e&&r<e?ya(e-r,n)+t:t},pr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Qn(qs(t).replace(Bt,""),e||0)},pr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Xa(t,e,n)&&(e=n=a),n===a&&("boolean"==typeof e?(n=e,e=a):"boolean"==typeof t&&(n=t,t=a)),t===a&&e===a?(t=0,e=1):(t=zs(t),e===a?(e=t,t=0):e=zs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Zn();return Xn(t+i*(e-t+Re("1e-"+((i+"").length-1))),e)}return Di(t,e)},pr.reduce=function(t,e,n){var r=ys(t)?nn:vn,i=arguments.length<3;return r(t,Fa(e,4),n,i,Ur)},pr.reduceRight=function(t,e,n){var r=ys(t)?rn:vn,i=arguments.length<3;return r(t,Fa(e,4),n,i,zr)},pr.repeat=function(t,e,n){return e=(n?Xa(t,e,n):e===a)?1:Vs(e),_i(qs(t),e)},pr.replace=function(){var t=arguments,e=qs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},pr.result=function(t,e,n){var r=-1,i=(e=Xi(e,t)).length;for(i||(i=1,t=a);++r<i;){var o=null==t?a:t[lo(e[r])];o===a&&(r=i,o=n),t=Es(o)?o.call(t):o}return t},pr.round=Zu,pr.runInContext=t,pr.sample=function(t){return(ys(t)?Er:Ei)(t)},pr.size=function(t){if(null==t)return 0;if(bs(t))return Bs(t)?Pn(t):t.length;var e=Va(t);return e==K||e==rt?t.size:li(t).length},pr.snakeCase=Su,pr.some=function(t,e,n){var r=ys(t)?an:Ci;return n&&Xa(t,e,n)&&(e=a),r(t,Fa(e,3))},pr.sortedIndex=function(t,e){return Pi(t,e)},pr.sortedIndexBy=function(t,e,n){return Oi(t,e,Fa(n,2))},pr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Pi(t,e);if(r<n&&ps(t[r],e))return r}return-1},pr.sortedLastIndex=function(t,e){return Pi(t,e,!0)},pr.sortedLastIndexBy=function(t,e,n){return Oi(t,e,Fa(n,2),!0)},pr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Pi(t,e,!0)-1;if(ps(t[n],e))return n}return-1},pr.startCase=Du,pr.startsWith=function(t,e,n){return t=qs(t),n=null==n?0:Br(Vs(n),0,t.length),e=Li(e),t.slice(n,n+e.length)==e},pr.subtract=Ku,pr.sum=function(t){return t&&t.length?gn(t,Mu):0},pr.sumBy=function(t,e){return t&&t.length?gn(t,Fa(e,2)):0},pr.template=function(t,e,n){var r=pr.templateSettings;n&&Xa(t,e,n)&&(e=a),t=qs(t),e=Qs({},e,r,Ta);var o,s,u=Qs({},e.imports,r.imports,Ta),l=au(u),f=bn(u,l),h=0,d=e.interpolate||Kt,p="__p += '",v=ee((e.escape||Kt).source+"|"+d.source+"|"+(d===At?Ht:Kt).source+"|"+(e.evaluate||Kt).source+"|$","g"),g="//# sourceURL="+(ce.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Te+"]")+"\n";t.replace(v,function(e,n,r,i,a,u){return r||(r=i),p+=t.slice(h,u).replace($t,Tn),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=u+e.length,e}),p+="';\n";var m=ce.call(e,"variable")&&e.variable;if(m){if(zt.test(m))throw new i(c)}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(bt,""):p).replace(St,"$1").replace(Dt,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Tu(function(){return Ft(l,g+"return "+p).apply(a,f)});if(y.source=p,xs(y))throw y;return y},pr.times=function(t,e){if((t=Vs(t))<1||t>B)return[];var n=j,r=Xn(t,j);e=Fa(e),t-=j;for(var i=mn(r,e);++n<t;)e(n);return i},pr.toFinite=zs,pr.toInteger=Vs,pr.toLength=Hs,pr.toLower=function(t){return qs(t).toLowerCase()},pr.toNumber=Ws,pr.toSafeInteger=function(t){return t?Br(Vs(t),-B,B):0===t?t:0},pr.toString=qs,pr.toUpper=function(t){return qs(t).toUpperCase()},pr.trim=function(t,e,n){if((t=qs(t))&&(n||e===a))return yn(t);if(!t||!(e=Li(e)))return t;var r=On(t),i=On(e);return Qi(r,Dn(r,i),_n(r,i)+1).join("")},pr.trimEnd=function(t,e,n){if((t=qs(t))&&(n||e===a))return t.slice(0,Bn(t)+1);if(!t||!(e=Li(e)))return t;var r=On(t);return Qi(r,0,_n(r,On(e))+1).join("")},pr.trimStart=function(t,e,n){if((t=qs(t))&&(n||e===a))return t.replace(Bt,"");if(!t||!(e=Li(e)))return t;var r=On(t);return Qi(r,Dn(r,On(e))).join("")},pr.truncate=function(t,e){var n=I,r=A;if(Is(e)){var i="separator"in e?e.separator:i;n="length"in e?Vs(e.length):n,r="omission"in e?Li(e.omission):r}var o=(t=qs(t)).length;if(kn(t)){var s=On(t);o=s.length}if(n>=o)return t;var u=n-Pn(r);if(u<1)return r;var c=s?Qi(s,0,u).join(""):t.slice(0,u);if(i===a)return c+r;if(s&&(u+=c.length-u),Ps(i)){if(t.slice(u).search(i)){var l,f=c;for(i.global||(i=ee(i.source,qs(Wt.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var h=l.index;c=c.slice(0,h===a?u:h)}}else if(t.indexOf(Li(i),u)!=u){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},pr.unescape=function(t){return(t=qs(t))&&Et.test(t)?t.replace(_t,Fn):t},pr.uniqueId=function(t){var e=++le;return qs(t)+e},pr.upperCase=_u,pr.upperFirst=xu,pr.each=qo,pr.eachRight=Xo,pr.first=bo,Bu(pr,function(){var t={};return Gr(pr,function(e,n){ce.call(pr.prototype,n)||(t[n]=e)}),t}(),{chain:!1}),pr.VERSION="4.17.21",Ge(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){pr[t].placeholder=pr}),Ge(["drop","take"],function(t,e){yr.prototype[t]=function(n){n=n===a?1:qn(Vs(n),0);var r=this.__filtered__&&!e?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=Xn(n,r.__takeCount__):r.__views__.push({size:Xn(n,j),type:t+(r.__dir__<0?"Right":"")}),r},yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ge(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==C||3==n;yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Fa(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Ge(["head","last"],function(t,e){var n="take"+(e?"Right":"");yr.prototype[t]=function(){return this[n](1).value()[0]}}),Ge(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");yr.prototype[t]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Mu)},yr.prototype.find=function(t){return this.filter(t).head()},yr.prototype.findLast=function(t){return this.reverse().find(t)},yr.prototype.invokeMap=xi(function(t,e){return"function"==typeof t?new yr(this):this.map(function(n){return ii(n,t,e)})}),yr.prototype.reject=function(t){return this.filter(cs(Fa(t)))},yr.prototype.slice=function(t,e){t=Vs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new yr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==a&&(n=(e=Vs(e))<0?n.dropRight(-e):n.take(e-t)),n)},yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},yr.prototype.toArray=function(){return this.take(j)},Gr(yr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=pr[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(pr.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof yr,c=s[0],l=u||ys(e),f=function(t){var e=i.apply(pr,en([t],s));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=o&&!h,v=u&&!d;if(!o&&l){e=v?e:new yr(this);var g=t.apply(e,s);return g.__actions__.push({func:zo,args:[f],thisArg:a}),new mr(g,h)}return p&&v?t.apply(this,s):(g=this.thru(f),p?r?g.value()[0]:g.value():g)})}),Ge(["pop","push","shift","sort","splice","unshift"],function(t){var e=ie[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);pr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(ys(i)?i:[],t)}return this[n](function(n){return e.apply(ys(n)?n:[],t)})}}),Gr(yr.prototype,function(t,e){var n=pr[e];if(n){var r=n.name+"";ce.call(ar,r)||(ar[r]=[]),ar[r].push({name:e,func:n})}}),ar[pa(a,w).name]=[{name:"wrapper",func:a}],yr.prototype.clone=function(){var t=new yr(this.__wrapped__);return t.__actions__=ra(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ra(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ra(this.__views__),t},yr.prototype.reverse=function(){if(this.__filtered__){var t=new yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=ys(t),r=e<0,i=n?t.length:0,a=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=Xn(e,t+o);break;case"takeRight":t=qn(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=a.start,s=a.end,u=s-o,c=r?s:o-1,l=this.__iteratees__,f=l.length,h=0,d=Xn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return Vi(t,this.__actions__);var p=[];t:for(;u--&&h<d;){for(var v=-1,g=t[c+=e];++v<f;){var m=l[v],y=m.iteratee,w=m.type,b=y(g);if(w==P)g=b;else if(!b){if(w==C)continue t;break t}}p[h++]=g}return p},pr.prototype.at=Vo,pr.prototype.chain=function(){return Uo(this)},pr.prototype.commit=function(){return new mr(this.value(),this.__chain__)},pr.prototype.next=function(){this.__values__===a&&(this.__values__=Us(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?a:this.__values__[this.__index__++]}},pr.prototype.plant=function(t){for(var e,n=this;n instanceof gr;){var r=ho(n);r.__index__=0,r.__values__=a,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},pr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof yr){var e=t;return this.__actions__.length&&(e=new yr(this)),(e=e.reverse()).__actions__.push({func:zo,args:[Io],thisArg:a}),new mr(e,this.__chain__)}return this.thru(Io)},pr.prototype.toJSON=pr.prototype.valueOf=pr.prototype.value=function(){return Vi(this.__wrapped__,this.__actions__)},pr.prototype.first=pr.prototype.head,Fe&&(pr.prototype[Fe]=function(){return this}),pr}();Oe._=Ln,(i=function(){return Ln}.call(e,n,e,r))===a||(r.exports=i)}).call(this)}).call(this,n(30),n(234)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}}]).default;