/*! For license information please see imou-player.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.library=e():t.library=e()}(self,(()=>(()=>{var t={132:(t,e,n)=>{var i;function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}!function(t){var e,n=t.document,i={modules:{},status:{},timeout:10,event:{}},o=function(){this.v="2.6.7"},r=t.LAYUI_GLOBAL||{},s=(e=n.currentScript?n.currentScript.src:function(){for(var t,e=n.scripts,i=e.length-1,a=i;a>0;a--)if("interactive"===e[a].readyState){t=e[a].src;break}return t||e[i].src}(),i.dir=r.dir||e.substring(0,e.lastIndexOf("/")+1)),c=function(e,n){n=n||"log",t.console&&console[n]&&console[n]("layui error hint: ".concat(e))},l="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u=i.builtin={lay:"lay",layer:"layer",laydate:"laydate",laypage:"laypage",laytpl:"laytpl",layedit:"layedit",form:"form",upload:"upload",dropdown:"dropdown",transfer:"transfer",tree:"tree",table:"table",element:"element",rate:"rate",colorpicker:"colorpicker",slider:"slider",carousel:"carousel",flow:"flow",util:"util",code:"code",jquery:"jquery",all:"all","layui.all":"layui.all"};o.prototype.cache=i,o.prototype.define=function(t,e){return"function"==typeof t&&(e=t,t=[]),this.use(t,(function(){var t=function(t,e){m[t]=e,i.status[t]=!0};return"function"==typeof e&&e((function(n,a){t(n,a),i.callback[n]=function(){e(t)}})),this}),null,"define"),this},o.prototype.use=function(e,a,o,r){var d=this,h=i.dir=i.dir?i.dir:s,y=n.getElementsByTagName("head")[0];e="string"==typeof e?[e]:"function"==typeof e?(a=e,["all"]):e,t.jQuery&&jQuery.fn.on&&(d.each(e,(function(t,n){"jquery"===n&&e.splice(t,1)})),m.jquery=m.$=jQuery);var f=e[0],p=0;function g(t,e){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===t.type||n.test((t.currentTarget||t.srcElement).readyState))&&(i.modules[f]=e,y.removeChild(T),function t(){if(++p>1e3*i.timeout/4)return c("".concat(f," is not a valid module"),"error");i.status[f]?v():setTimeout(t,4)}())}function v(){o.push(m[f]),e.length>1?d.use(e.slice(1),a,o,r):"function"==typeof a&&function(){if(m.jquery&&"function"==typeof m.jquery&&"define"!==r)return m.jquery((function(){a.apply(m,o)}));a.apply(m,o)}()}if(o=o||[],i.host=i.host||(h.match(/\/\/([\s\S]+?)\//)||["//".concat(location.host,"/")])[0],0===e.length||m["layui.all"]&&u[f])return v(),d;var b,w="".concat((u[f]?"".concat(h,"modules/"):/^\{\/\}/.test(d.modules[f])?"":i.base||"")+(d.modules[f]||f),".js");if(w=w.replace(/^\{\/\}/,""),!i.modules[f]&&m[f]&&(i.modules[f]=w),i.modules[f])!function t(){if(++p>1e3*i.timeout/4)return c("".concat(f," is not a valid module"),"error");"string"==typeof i.modules[f]&&i.status[f]?v():setTimeout(t,4)}();else{var T=n.createElement("script");T.async=!0,T.charset="utf-8",T.src=w+((b=!0===i.version?i.v||(new Date).getTime():i.version||"")?"?v=".concat(b):""),y.appendChild(T),!T.attachEvent||T.attachEvent.toString&&T.attachEvent.toString().indexOf("[native code")<0||l?T.addEventListener("load",(function(t){g(t,w)}),!1):T.attachEvent("onreadystatechange",(function(t){g(t,w)})),i.modules[f]=w}return d},o.prototype.getStyle=function(e,n){var i=e.currentStyle?e.currentStyle:t.getComputedStyle(e,null);return i[i.getPropertyValue?"getPropertyValue":"getAttribute"](n)},o.prototype.link=function(t,e,a){var o=this,r=n.getElementsByTagName("head")[0],s=n.createElement("link");"string"==typeof e&&(a=e);var l=(a||t).replace(/\.|\//g,""),u=s.id="layuicss-".concat(l),d="creating",h=0;return s.rel="stylesheet",s.href=t+(i.debug?"?v=".concat((new Date).getTime()):""),s.media="all",n.getElementById(u)||r.appendChild(s),"function"!=typeof e||function a(r){var s=n.getElementById(u);if(++h>1e3*i.timeout/100)return c("".concat(t," timeout"));1989===parseInt(o.getStyle(s,"width"))?(r===d&&s.removeAttribute("lay-status"),s.getAttribute("lay-status")===d?setTimeout(a,100):e()):(s.setAttribute("lay-status",d),setTimeout((function(){a(d)}),100))}(),o},o.prototype.addcss=function(t,e,n){return function(){}},i.callback={},o.prototype.factory=function(t){if(m[t])return"function"==typeof i.callback[t]?i.callback[t]:null},o.prototype.img=function(t,e,n){var i=new Image;if(i.src=t,i.complete)return e(i);i.onload=function(){i.onload=null,"function"==typeof e&&e(i)},i.onerror=function(t){i.onerror=null,"function"==typeof n&&n(t)}},o.prototype.config=function(t){for(var e in t=t||{})i[e]=t[e];return this},o.prototype.modules=function(){var t={};for(var e in u)t[e]=u[e];return t}(),o.prototype.extend=function(t){var e=this;for(var n in t=t||{})e[n]||e.modules[n]?c("".concat(n," Module already exists"),"error"):e.modules[n]=t[n];return e},o.prototype.router=function(t){var e={path:[],search:{},hash:((t=t||location.hash).match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(t)?(t=t.replace(/^#\//,""),e.href="/".concat(t),t=t.replace(/([^#])(#.*$)/,"$1").split("/")||[],this.each(t,(function(t,n){/^\w+=/.test(n)?(n=n.split("="),e.search[n[0]]=n[1]):e.path.push(n)})),e):e},o.prototype.url=function(t){var e,n;return{pathname:(t?((t.match(/\.[^.]+?\/.+/)||[])[0]||"").replace(/^[^\/]+/,"").replace(/\?.+/,""):location.pathname).replace(/^\//,"").split("/"),search:(e={},n=(t?((t.match(/\?.+/)||[])[0]||"").replace(/\#.+/,""):location.search).replace(/^\?+/,"").split("&"),this.each(n,(function(t,n){var i=n.indexOf("="),a=i<0?n.substr(0,n.length):0!==i&&n.substr(0,i);a&&(e[a]=i>0?n.substr(i+1):null)})),e),hash:this.router(t?(t.match(/#.+/)||[])[0]||"/":location.hash)}},o.prototype.data=function(e,n,i){if(e=e||"layui",i=i||localStorage,t.JSON&&t.JSON.parse){if(null===n)return delete i[e];n="object"===a(n)?n:{key:n};try{var o=JSON.parse(i[e])}catch(t){o={}}return"value"in n&&(o[n.key]=n.value),n.remove&&delete o[n.key],i[e]=JSON.stringify(o),n.key?o[n.key]:o}},o.prototype.sessionData=function(t,e){return this.data(t,e,sessionStorage)},o.prototype.device=function(e){var n=navigator.userAgent.toLowerCase(),i=function(t){var e=new RegExp("".concat(t,"/([^\\s\\_\\-]+)"));return(t=(n.match(e)||[])[1])||!1},a={os:/windows/.test(n)?"windows":/linux/.test(n)?"linux":/iphone|ipod|ipad|ios/.test(n)?"ios":/mac/.test(n)?"mac":void 0,ie:!(!t.ActiveXObject&&!("ActiveXObject"in t))&&((n.match(/msie\s(\d+)/)||[])[1]||"11"),weixin:i("micromessenger")};return e&&!a[e]&&(a[e]=i(e)),a.android=/android/.test(n),a.ios="ios"===a.os,a.mobile=!(!a.android&&!a.ios),a},o.prototype.hint=function(){return{error:c}},o.prototype._typeof=function(t){return null===t?String(t):"object"===a(t)||"function"==typeof t?(e=(e=Object.prototype.toString.call(t).match(/\s(.+)\]$/)||[])[1]||"Object",new RegExp("\\b(".concat("Function|Array|Date|RegExp|Object|Error|Symbol",")\\b")).test(e)?e.toLowerCase():"object"):a(t);var e},o.prototype._isArray=function(e){var n,i=this._typeof(e);return!(!e||"object"!==a(e)||e===t)&&(n="length"in e&&e.length,"array"===i||0===n||"number"==typeof n&&n>0&&n-1 in e)},o.prototype.each=function(t,e){var n,i=this,a=function(t,n){return e.call(n[t],t,n[t])};if("function"!=typeof e)return i;if(t=t||[],i._isArray(t))for(n=0;n(window.innerHeight||y.documentElement.clientHeight)},f.position=function(t,e,n){if(e){n=n||{},t!==y&&t!==f("body")[0]||(n.clickType="right");var i,a="right"===n.clickType?{left:(i=n.e||window.event||{}).clientX,top:i.clientY,right:i.clientX,bottom:i.clientY}:t.getBoundingClientRect(),o=e.offsetWidth,r=e.offsetHeight,s=function(t){return t=t?"scrollLeft":"scrollTop",y.body[t]|y.documentElement[t]},c=function(t){return y.documentElement[t?"clientWidth":"clientHeight"]},l=a.left,u=a.bottom;l+o+5>c("width")&&(l=c("width")-o-5),u+r+5>c()&&(a.top>r+5?u=a.top-r-10:"right"===n.clickType&&(u=c()-r-10)<0&&(u=0));var d=n.position;if(d&&(e.style.position=d),e.style.left="".concat(l+("fixed"===d?0:s(1)),"px"),e.style.top="".concat(u+("fixed"===d?0:s()),"px"),!f.hasScrollbar()){var h=e.getBoundingClientRect();!n.SYSTEM_RELOAD&&h.bottom+5>c()&&(n.SYSTEM_RELOAD=!0,setTimeout((function(){f.position(t,e,n)}),50))}}},f.options=function(t,e){var n=f(t),i=e||"lay-options";try{return new Function("return ".concat(n.attr(i)||"{}"))()}catch(t){return hint.error("parseerror:".concat(t),"error"),{}}},f.isTopElem=function(t){var e=[y,f("body")[0]],n=!1;return f.each(e,(function(e,i){if(i===t)return n=!0})),n},p.addStr=function(t,e){return t=t.replace(/\s+/," "),e=e.replace(/\s+/," ").split(" "),f.each(e,(function(e,n){new RegExp("\\b".concat(n,"\\b")).test(t)||(t="".concat(t," ").concat(n))})),t.replace(/^\s|\s$/,"")},p.removeStr=function(t,e){return t=t.replace(/\s+/," "),e=e.replace(/\s+/," ").split(" "),f.each(e,(function(e,n){var i=new RegExp("\\b".concat(n,"\\b"));i.test(t)&&(t=t.replace(i,""))})),t.replace(/\s+/," ").replace(/^\s|\s$/,"")},p.prototype.find=function(t){var e=this,n=0,i=[],o="object"===a(t);return this.each((function(a,r){for(var s=o?r.contains(t):r.querySelectorAll(t||null);n0)return n[0].style[t]}():n.each((function(n,o){"object"===a(t)?f.each(t,(function(t,e){o.style[t]=i(e)})):o.style[t]=i(e)}))},p.prototype.width=function(t){var e=this;return void 0===t?function(){if(e.length>0)return e[0].offsetWidth}():e.each((function(n,i){e.css("width",t)}))},p.prototype.height=function(t){var e=this;return void 0===t?function(){if(e.length>0)return e[0].offsetHeight}():e.each((function(n,i){e.css("height",t)}))},p.prototype.attr=function(t,e){var n=this;return void 0===e?function(){if(n.length>0)return n[0].getAttribute(t)}():n.each((function(n,i){i.setAttribute(t,e)}))},p.prototype.removeAttr=function(t){return this.each((function(e,n){n.removeAttribute(t)}))},p.prototype.html=function(t){var e=this;return void 0===t?function(){if(e.length>0)return e[0].innerHTML}():this.each((function(e,n){n.innerHTML=t}))},p.prototype.val=function(t){var e=this;return void 0===t?function(){if(e.length>0)return e[0].value}():this.each((function(e,n){n.value=t}))},p.prototype.append=function(t){return this.each((function(e,n){"object"===a(t)?n.appendChild(t):n.innerHTML+=t}))},p.prototype.remove=function(t){return this.each((function(e,n){t?n.removeChild(t):n.parentNode.removeChild(n)}))},p.prototype.on=function(t,e){return this.each((function(n,i){i.attachEvent?i.attachEvent("on".concat(t),(function(t){t.target=t.srcElement,e.call(i,t)})):i.addEventListener(t,e,!1)}))},p.prototype.off=function(t,e){return this.each((function(n,i){i.detachEvent?i.detachEvent("on".concat(t),e):i.removeEventListener(t,e,!1)}))},window.lay=f,window.layui&&m.define&&m.define((function(t){t("lay",f)}))}(window,window.document),function(a,o){var r=a.layui&&layui.define,s={getPath:a.lay&&lay.getPath?lay.getPath:"",link:function(t,e,n){e()}},c=a.LAYUI_GLOBAL||{},l={v:"5.3.1",config:{},index:a.laydate&&a.laydate.v?1e5:0,path:c.laydate_dir||s.getPath,set:function(t){var e=this;return e.config=lay.extend({},e.config,t),e},ready:function(t){var e="laydate",n="".concat(r?"modules/laydate/":"theme/","default/laydate.css?v=").concat(l.v).concat("");return r?layui.addcss(n,t,e):s.link(n,t,e),this}},u=function t(){var e=this,n=e.config.id;return t.that[n]=e,{hint:function(t){e.hint.call(e,t)},config:e.config}},d="laydate",h="layui-this",m="laydate-disabled",y=[100,2e5],f="layui-laydate-static",p="layui-laydate-list",g="layui-laydate-hint",v=".laydate-btns-confirm",b="laydate-time-text",w="laydate-btns-time",T="layui-laydate-preview",_=function(t){var e=this;e.index=++l.index,e.config=lay.extend({},e.config,l.config,t),(t=e.config).id="id"in t?t.id:e.index,l.ready((function(){e.init()}))},x="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s";u.formatArr=function(t){return(t||"").match(new RegExp("".concat(x,"|."),"g"))||[]},_.isLeapYear=function(t){return t%4==0&&t%100!=0||t%400==0},_.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"click",show:!1,showBottom:!0,isPreview:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},_.prototype.lang=function(){var t={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"},timeout:"结束时间不能早于开始时间
请重新选择",invalidDate:"不在有效日期或时间范围内",formatError:["日期格式不合法
必须遵循下述格式:
","
已为你重置"],preview:"当前选中的结果"},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"},timeout:"End time cannot be less than start Time
Please re-select",invalidDate:"Invalid date",formatError:["The date format error
Must be followed:
","
It has been reset"],preview:"The selected result"}};return t[this.config.lang]||t.cn},_.prototype.init=function(){var t=this,e=t.config,n="static"===e.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};e.elem=lay(e.elem),e.eventElem=lay(e.eventElem),e.elem[0]&&(t.rangeStr=e.range?"string"==typeof e.range?e.range:"-":"",e.range&&e.range.constructor===Array&&(t.rangeElem=[lay(e.range[0]),lay(e.range[1])]),i[e.type]||(a.console&&console.error&&console.error("laydate type error:'".concat(e.type,"' is not supported")),e.type="date"),e.format===i.date&&(e.format=i[e.type]||i.date),t.format=u.formatArr(e.format),t.EXP_IF="",t.EXP_SPLIT="",lay.each(t.format,(function(e,n){var i=new RegExp(x).test(n)?"\\d{".concat(new RegExp(x).test(t.format[0===e?e+1:e-1]||"")?/^yyyy|y$/.test(n)?4:n.length:/^yyyy$/.test(n)?"1,4":/^y$/.test(n)?"1,308":"1,2","}"):"\\".concat(n);t.EXP_IF+=i,t.EXP_SPLIT="".concat(t.EXP_SPLIT,"(").concat(i,")")})),t.EXP_IF_ONE=new RegExp("^".concat(t.EXP_IF,"$")),t.EXP_IF=new RegExp("^".concat(e.range?"".concat(t.EXP_IF,"\\s\\").concat(t.rangeStr,"\\s").concat(t.EXP_IF):t.EXP_IF,"$")),t.EXP_SPLIT=new RegExp("^".concat(t.EXP_SPLIT,"$"),""),t.isInput(e.elem[0])||"focus"===e.trigger&&(e.trigger="click"),e.elem.attr("lay-key")||(e.elem.attr("lay-key",t.index),e.eventElem.attr("lay-key",t.index)),e.mark=lay.extend({},e.calendar&&"cn"===e.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},e.mark),lay.each(["min","max"],(function(t,n){var i=[],a=[];if("number"==typeof e[n]){var o=e[n],r=(new Date).getTime(),s=864e5,c=new Date(o?o0)return!0;var e=lay.elem("div",{class:"layui-laydate-header"}),n=[function(){var t=lay.elem("i",{class:"layui-icon laydate-icon laydate-prev-y"});return t.innerHTML="<<",t}(),function(){var t=lay.elem("i",{class:"layui-icon laydate-icon laydate-prev-m"});return t.innerHTML="<",t}(),function(){var t=lay.elem("div",{class:"laydate-set-ym"}),e=lay.elem("span"),n=lay.elem("span");return t.appendChild(e),t.appendChild(n),t}(),function(){var t=lay.elem("i",{class:"layui-icon laydate-icon laydate-next-m"});return t.innerHTML=">",t}(),function(){var t=lay.elem("i",{class:"layui-icon laydate-icon laydate-next-y"});return t.innerHTML=">>",t}()],o=lay.elem("div",{class:"layui-laydate-content"}),r=lay.elem("table"),s=lay.elem("thead"),l=lay.elem("tr");lay.each(n,(function(t,n){e.appendChild(n)})),s.appendChild(l),lay.each(new Array(6),(function(t){var e=r.insertRow(0);lay.each(new Array(7),(function(n){if(0===t){var i=lay.elem("th");i.innerHTML=a.weeks[n],l.appendChild(i)}e.insertCell(n)}))})),r.insertBefore(s,r.children[0]),o.appendChild(r),c[t]=lay.elem("div",{class:"layui-laydate-main laydate-main-list-".concat(t)}),c[t].appendChild(e),c[t].appendChild(o),u.push(n),d.push(o),h.push(r)})),lay(m).html((t=[],e=[],"datetime"===i.type&&t.push('').concat(a.timeTips,"")),(i.range||"datetime"!==i.type)&&t.push('')),lay.each(i.btns,(function(t,n){var o=a.tools[n]||"btn";i.range&&"now"===n||(r&&"clear"===n&&(o="cn"===i.lang?"重置":"Reset"),e.push('').concat(o,"")))})),t.push('")),t.join(""))),lay.each(c,(function(t,e){s.appendChild(e)})),i.showBottom&&s.appendChild(m),/^#/.test(i.theme)){var y=lay.elem("style"),p=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,n.elemID).replace(/{{theme}}/g,i.theme);"styleSheet"in y?(y.setAttribute("type","text/css"),y.styleSheet.cssText=p):y.innerHTML=p,lay(s).addClass("laydate-theme-molv"),s.appendChild(y)}l.thisId=i.id,n.remove(_.thisElemDate),r?i.elem.append(s):(o.body.appendChild(s),n.position()),n.checkDate().calendar(null,0,"init"),n.changeEvent(),_.thisElemDate=n.elemID,"function"==typeof i.ready&&i.ready(lay.extend({},i.dateTime,{month:i.dateTime.month+1})),n.preview()},_.prototype.remove=function(t){var e=this,n=(e.config,lay("#".concat(t||e.elemID)));return n[0]?(n.hasClass(f)||e.checkDate((function(){n.remove()})),e):e},_.prototype.position=function(){var t=this,e=t.config;return lay.position(t.bindElem||e.elem[0],t.elem,{position:e.position}),t},_.prototype.hint=function(t){var e=this,n=(e.config,lay.elem("div",{class:g}));e.elem&&(n.innerHTML=t||"",lay(e.elem).find(".".concat(g)).remove(),e.elem.appendChild(n),clearTimeout(e.hinTimer),e.hinTimer=setTimeout((function(){lay(e.elem).find(".".concat(g)).remove()}),3e3))},_.prototype.getAsYM=function(t,e,n){return n?e--:e++,e<0&&(e=11,t--),e>11&&(e=0,t++),[t,e]},_.prototype.systemDate=function(t){var e=t||new Date;return{year:e.getFullYear(),month:e.getMonth(),date:e.getDate(),hours:t?t.getHours():0,minutes:t?t.getMinutes():0,seconds:t?t.getSeconds():0}},_.prototype.checkDate=function(t){var e,n,i=this,a=(new Date,i.config),o=i.lang(),r=a.dateTime=a.dateTime||i.systemDate(),s=i.bindElem||a.elem[0],c=(i.isInput(s),function(){if(i.rangeElem){var t=[i.rangeElem[0].val(),i.rangeElem[1].val()];if(t[0]&&t[1])return t.join(" ".concat(i.rangeStr," "))}return i.isInput(s)?s.value:"static"===a.position?"":lay(s).attr("lay-date")}()),u=function(t){t.year>y[1]&&(t.year=y[1],n=!0),t.month>11&&(t.month=11,n=!0),t.hours>23&&(t.hours=0,n=!0),t.minutes>59&&(t.minutes=0,t.hours++,n=!0),t.seconds>59&&(t.seconds=0,t.minutes++,n=!0),e=l.getEndDate(t.month+1,t.year),t.date>e&&(t.date=e,n=!0)},d=function(t,e,o){var r=["startTime","endTime"];e=(e.match(i.EXP_SPLIT)||[]).slice(1),o=o||0,a.range&&(i[r[o]]=i[r[o]]||{}),lay.each(i.format,(function(s,c){var l=parseFloat(e[s]);e[s].lengthm(a.max)||m(r)m(a.max))&&(i.endDate=lay.extend({},a.max)),t&&t(),i},_.prototype.mark=function(t,e){var n,i=this.config;return lay.each(i.mark,(function(t,i){var a=t.split("-");a[0]!=e[0]&&0!=a[0]||a[1]!=e[1]&&0!=a[1]||a[2]!=e[2]||(n=i||e[2])})),n&&t.html(''.concat(n,"")),this},_.prototype.limit=function(t,e,n,i){var a,o=this,r=o.config,s={},c=r[n>41?"endDate":"dateTime"],l=lay.extend({},c,e||{});return lay.each({now:l,min:r.min,max:r.max},(function(t,e){var n;s[t]=o.newDate(lay.extend({year:e.year,month:e.month,date:e.date},(n={},lay.each(i,(function(t,i){n[i]=e[i]})),n))).getTime()})),a=s.nows.max,t&&t[a?"addClass":"removeClass"](m),a},_.prototype.thisDateTime=function(t){var e=this.config;return t?this.endDate:e.dateTime},_.prototype.calendar=function(t,e,n){var i,a,o,r=this,s=r.config,c=(e=e?1:0,t||r.thisDateTime(e)),u=new Date,d=r.lang(),m="date"!==s.type&&"datetime"!==s.type,f=lay(r.table[e]).find("td"),p=lay(r.elemHeader[e][2]).find("span");return c.yeary[1]&&(c.year=y[1],r.hint(d.invalidDate)),r.firstDate||(r.firstDate=lay.extend({},c)),u.setFullYear(c.year,c.month,1),i=u.getDay(),a=l.getEndDate(c.month||12,c.year),o=l.getEndDate(c.month+1,c.year),lay.each(f,(function(t,e){var n=[c.year,c.month],s=0;(e=lay(e)).removeAttr("class"),t=i&&t=n.firstDate.year&&(o.month=i.max.month,o.date=i.max.date),n.limit(lay(a),o,e),x++})),lay(l[y?0:1]).attr("lay-ym","".concat(x-8,"-").concat(g[1])).html("".concat(E+f," - ").concat(x-1+f))}else if("month"===t)lay.each(new Array(12),(function(t){var a=lay.elem("li",{"lay-ym":t}),r={year:g[0],month:t};t+1==g[1]&&lay(a).addClass(h),a.innerHTML=o.month[t]+(y?"月":""),s.appendChild(a),g[0]=n.firstDate.year&&(r.date=i.max.date),n.limit(lay(a),r,e)})),lay(l[y?0:1]).attr("lay-ym","".concat(g[0],"-").concat(g[1])).html(g[0]+f);else if("time"===t){var L=function(){lay(s).find("ol").each((function(t,i){lay(i).find("li").each((function(i,a){n.limit(lay(a),[{hours:i},{hours:n[_].hours,minutes:i},{hours:n[_].hours,minutes:n[_].minutes,seconds:i}][t],e,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][t])}))})),i.range||n.limit(lay(n.footer).find(v),n[_],0,["hours","minutes","seconds"])};i.range?n[_]||(n[_]="startTime"===_?a:n.endDate):n[_]=a,lay.each([24,60,60],(function(t,e){var i=lay.elem("li"),a=["

".concat(o.time[t],"

    ")];lay.each(new Array(e),(function(e){a.push("").concat(lay.digit(e,2),""))})),i.innerHTML="".concat(a.join(""),"
"),s.appendChild(i)})),L()}if(d&&u.removeChild(d),u.appendChild(s),"year"===t||"month"===t)lay(n.elemMain[e]).addClass("laydate-ym-show"),lay(s).find("li").on("click",(function(){var o=0|lay(this).attr("lay-ym");lay(this).hasClass(m)||(0===e?(a[t]=o,n.limit(lay(n.footer).find(v),null,0)):n.endDate[t]=o,"year"===i.type||"month"===i.type?(lay(s).find(".".concat(h)).removeClass(h),lay(this).addClass(h),"month"===i.type&&"year"===t&&(n.listYM[e][0]=o,r&&((e?n.endDate:a).year=o),n.list("month",e))):(n.checkDate("limit").calendar(null,e),n.closeList()),n.setBtnStatus(),i.range||("month"===i.type&&"month"===t||"year"===i.type&&"year"===t)&&n.setValue(n.parse()).remove().done(),n.done(null,"change"),lay(n.footer).find(".".concat(w)).removeClass(m))}));else{var D=lay.elem("span",{class:b}),k=function(){lay(s).find("ol").each((function(t){var e=this,i=lay(e).find("li");e.scrollTop=30*(n[_][T[t]]-2),e.scrollTop<=0&&i.each((function(t,n){if(!lay(this).hasClass(m))return e.scrollTop=30*(t-2),!0}))}))},M=lay(c[2]).find(".".concat(b));k(),D.innerHTML=i.range?[o.startTime,o.endTime][e]:o.timeTips,lay(n.elemMain[e]).addClass("laydate-time-show"),M[0]&&M.remove(),c[2].appendChild(D),lay(s).find("ol").each((function(t){var e=this;lay(e).find("li").on("click",(function(){var o=0|this.innerHTML;lay(this).hasClass(m)||(i.range?n[_][T[t]]=o:a[T[t]]=o,lay(e).find(".".concat(h)).removeClass(h),lay(this).addClass(h),L(),k(),(n.endDate||"time"===i.type)&&n.done(null,"change"),n.setBtnStatus())}))}))}return n},_.prototype.listYM=[],_.prototype.closeList=function(){var t=this;t.config,lay.each(t.elemCont,(function(e,n){lay(this).find(".".concat(p)).remove(),lay(t.elemMain[e]).removeClass("laydate-ym-show laydate-time-show")})),lay(t.elem).find(".".concat(b)).remove()},_.prototype.setBtnStatus=function(t,e,n){var i,a=this,o=a.config,r=a.lang(),s=lay(a.footer).find(v);o.range&&"time"!==o.type&&(e=e||o.dateTime,n=n||a.endDate,i=a.newDate(e).getTime()>a.newDate(n).getTime(),a.limit(null,e)||a.limit(null,n)?s.addClass(m):s[i?"addClass":"removeClass"](m),t&&i&&a.hint("string"==typeof t?r.timeout.replace(/日期/g,t):r.timeout))},_.prototype.parse=function(t,e){var n=this,i=n.config,a=e||("end"==t?lay.extend({},n.endDate,n.endTime):i.range?lay.extend({},i.dateTime,n.startTime):i.dateTime),o=l.parse(a,n.format,1);return i.range&&void 0===t?"".concat(o," ").concat(n.rangeStr," ").concat(n.parse("end")):o},_.prototype.newDate=function(t){return t=t||{},new Date(t.year||1,t.month||0,t.date||1,t.hours||0,t.minutes||0,t.seconds||0)},_.prototype.setValue=function(t){var e=this,n=e.config,i=e.bindElem||n.elem[0];return"static"===n.position||(t=t||"",e.isInput(i)?lay(i).val(t):e.rangeElem?(e.rangeElem[0].val(t?e.parse("start"):""),e.rangeElem[1].val(t?e.parse("end"):"")):(0===lay(i).find("*").length&&lay(i).html(t),lay(i).attr("lay-date",t))),e},_.prototype.preview=function(){var t=this,e=t.config;if(e.isPreview){var n=lay(t.elem).find(".".concat(T)),i=e.range?t.endDate?t.parse():"":t.parse();n.html(i).css({color:"#5FB878","font-size":"14px;"}),setTimeout((function(){n.css({color:"#666","font-size":"12px;"})}),300)}},_.prototype.done=function(t,e){var n=this,i=n.config,a=lay.extend({},lay.extend(i.dateTime,n.startTime)),o=lay.extend({},lay.extend(n.endDate,n.endTime));return lay.each([a,o],(function(t,e){"month"in e&&lay.extend(e,{month:e.month+1})})),n.preview(),t=t||[n.parse(),a,o],"function"==typeof i[e||"done"]&&i[e||"done"].apply(i,t),n},_.prototype.choose=function(t,e){var n=this,i=n.config,a=n.thisDateTime(e),o=(lay(n.elem).find("td"),t.attr("lay-ymd").split("-"));o={year:0|o[0],month:(0|o[1])-1,date:0|o[2]},t.hasClass(m)||(lay.extend(a,o),i.range?(lay.each(["startTime","endTime"],(function(t,e){n[e]=n[e]||{hours:0,minutes:0,seconds:0}})),n.calendar(null,e).done(null,"change")):"static"===i.position?n.calendar().done().done(null,"change"):"date"===i.type?n.setValue(n.parse()).remove().done():"datetime"===i.type&&n.calendar().done(null,"change"))},_.prototype.tool=function(t,e){var n=this,i=n.config,a=n.lang(),o=i.dateTime,r="static"===i.position,s={datetime:function(){lay(t).hasClass(m)||(n.list("time",0),i.range&&n.list("time",1),lay(t).attr("lay-type","date").html(n.lang().dateTips))},date:function(){n.closeList(),lay(t).attr("lay-type","datetime").html(n.lang().timeTips)},clear:function(){r&&(lay.extend(o,n.firstDate),n.calendar()),i.range&&(delete i.dateTime,delete n.endDate,delete n.startTime,delete n.endTime),n.setValue("").remove(),n.done(["",{},{}])},now:function(){var t=new Date;lay.extend(o,n.systemDate(),{hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds()}),n.setValue(n.parse()).remove(),r&&n.calendar(),n.done()},confirm:function(){if(i.range){if(lay(t).hasClass(m))return n.hint("time"===i.type?a.timeout.replace(/日期/g,"时间"):a.timeout)}else if(lay(t).hasClass(m))return n.hint(a.invalidDate);n.done(),n.setValue(n.parse()).remove()}};s[e]&&s[e]()},_.prototype.change=function(t){var e=this,n=e.config,i=e.thisDateTime(t),a=n.range&&("year"===n.type||"month"===n.type),o=e.elemCont[t||0],r=e.listYM[t],s=function(s){var c=lay(o).find(".laydate-year-list")[0],l=lay(o).find(".laydate-month-list")[0];return c&&(r[0]=s?r[0]-15:r[0]+15,e.list("year",t)),l&&(s?r[0]--:r[0]++,e.list("month",t)),(c||l)&&(lay.extend(i,{year:r[0]}),a&&(i.year=r[0]),n.range||e.done(null,"change"),n.range||e.limit(lay(e.footer).find(v),{year:r[0]})),e.setBtnStatus(),c||l};return{prevYear:function(){s("sub")||(i.year--,e.checkDate("limit").calendar(null,t),e.done(null,"change"))},prevMonth:function(){var n=e.getAsYM(i.year,i.month,"sub");lay.extend(i,{year:n[0],month:n[1]}),e.checkDate("limit").calendar(null,t),e.done(null,"change")},nextMonth:function(){var n=e.getAsYM(i.year,i.month);lay.extend(i,{year:n[0],month:n[1]}),e.checkDate("limit").calendar(null,t),e.done(null,"change")},nextYear:function(){s()||(i.year++,e.checkDate("limit").calendar(null,t),e.done(null,"change"))}}},_.prototype.changeEvent=function(){var t=this;t.config,lay(t.elem).on("click",(function(t){lay.stope(t)})).on("mousedown",(function(t){lay.stope(t)})),lay.each(t.elemHeader,(function(e,n){lay(n[0]).on("click",(function(n){t.change(e).prevYear()})),lay(n[1]).on("click",(function(n){t.change(e).prevMonth()})),lay(n[2]).find("span").on("click",(function(n){var i=lay(this),a=i.attr("lay-ym"),o=i.attr("lay-type");a&&(a=a.split("-"),t.listYM[e]=[0|a[0],0|a[1]],t.list(o,e),lay(t.footer).find(".".concat(w)).addClass(m))})),lay(n[3]).on("click",(function(n){t.change(e).nextMonth()})),lay(n[4]).on("click",(function(n){t.change(e).nextYear()}))})),lay.each(t.table,(function(e,n){lay(n).find("td").on("click",(function(){t.choose(lay(this),e)}))})),lay(t.footer).find("span").on("click",(function(){var e=lay(this).attr("lay-type");t.tool(this,e)}))},_.prototype.isInput=function(t){return/input|textarea/.test(t.tagName.toLocaleLowerCase())},_.prototype.events=function(){var t=this,e=t.config,n=function(n,i){n.on(e.trigger,(function(){i&&(t.bindElem=this),t.render()}))};e.elem[0]&&!e.elem[0].eventHandler&&(n(e.elem,"bind"),n(e.eventElem),e.elem[0].eventHandler=!0)},u.that={},u.getThis=function(t){var e=u.that[t];return e||hint.error(t?"".concat(d," instance with ID '").concat(t,"' not found"):"ID argument required"),e},s.run=function(t){t(o).on("mousedown",(function(e){if(l.thisId){var n=u.getThis(l.thisId);if(n){var i=n.config;e.target!==i.elem[0]&&e.target!==i.eventElem[0]&&e.target!==t(i.closeStop)[0]&&n.remove()}}})).on("keydown",(function(e){if(l.thisId){var n=u.getThis(l.thisId);n&&13===e.keyCode&&t("#".concat(n.elemID))[0]&&n.elemID===_.thisElemDate&&(e.preventDefault(),t(n.footer).find(v)[0].click())}})),t(a).on("resize",(function(){if(l.thisId){var e=u.getThis(l.thisId);if(e)return!(!e.elem||!t(".layui-laydate")[0])&&void e.position()}}))},l.render=function(t){var e=new _(t);return u.call(e)},l.parse=function(t,e,n){return t=t||{},"string"==typeof e&&(e=u.formatArr(e)),e=(e||[]).concat(),lay.each(e,(function(i,a){/yyyy|y/.test(a)?e[i]=lay.digit(t.year,a.length):/MM|M/.test(a)?e[i]=lay.digit(t.month+(n||0),a.length):/dd|d/.test(a)?e[i]=lay.digit(t.date,a.length):/HH|H/.test(a)?e[i]=lay.digit(t.hours,a.length):/mm|m/.test(a)?e[i]=lay.digit(t.minutes,a.length):/ss|s/.test(a)&&(e[i]=lay.digit(t.seconds,a.length))})),e.join("")},l.getEndDate=function(t,e){var n=new Date;return n.setFullYear(e||n.getFullYear(),t||n.getMonth()+1,1),new Date(n.getTime()-864e5).getDate()},r?(l.ready(),layui.define("lay",(function(t){l.path=layui.cache.dir,s.run(lay),t(d,l)}))):void 0===(i=function(){return s.run(lay),l}.call(e,n,e,t))||(t.exports=i)}(window,window.document)},484:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",i="second",a="minute",o="hour",r="day",s="week",c="month",l="quarter",u="year",d="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},p=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},g={s:p,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),a=n%60;return(e<=0?"+":"-")+p(i,2,"0")+":"+p(a,2,"0")},m:function t(e,n){if(e.date()1)return t(r[0])}else{var s=e.name;b[s]=e,a=s}return!i&&a&&(v=a),a||!i&&v},_=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new E(n)},x=g;x.l=T,x.i=w,x.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var E=function(){function f(t){this.$L=T(t.locale,null,!0),this.parse(t)}var p=f.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(x.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(m);if(i){var a=i[2]-1||0,o=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return x},p.isValid=function(){return!(this.$d.toString()===h)},p.isSame=function(t,e){var n=_(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return _(t){var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.r(i),n.d(i,{default:()=>v});var t=n(484),e=n.n(t);function a(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=document.getElementById("imou_player_icon_root_".concat(t)),i=document.getElementById("imou_player_timeLine-web_".concat(t)),a=document.getElementById("imou_player_timeLine-celeContainer_".concat(t));e?(n.style.visibility="hidden",i&&(i.style.display="none",a.style.display="none")):(n.style.visibility="",i&&(i.style.display="",a.style.display=""))}var o=n(132),r=n.n(o);function s(t,e,n,i,a,o,r){t.beginPath(),t.moveTo(e,n),t.lineTo(i,a),t.strokeStyle=o,t.lineWidth=r,t.closePath(),t.stroke()}function c(t,e,n,i,a,o){t.fillStyle=o,t.fillRect(e,n,i,a)}function l(t,e){for(var n=0;n9?e:"0".concat(e),":").concat(n>9?n:"0".concat(n),":").concat(i>9?i:"0".concat(i))}var d=function(){function t(e){var n=this,i=e.elem,a=e.width,o=e.beginTime,r=e.height,s=e.Obj;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.elem=i,this.ctx=i.getContext("2d"),this.width=a,this.height=r,i.width=a,i.height=r,this.record=[],this.beginTime=o,this.timestamp=o||0,this.elem.onmousedown=function(t){n.onmousedown(t)},this.elem.ondragstart=function(){return!1},this.Obj=s,this.step=10}var e,n;return e=t,n=[{key:"onmousedown",value:function(t){var e=this;this.stop(!1),this.startMoveX=t.offsetX,document.onmousemove=function(t){e.onmouseMove(t)},document.onmouseup=function(t){e.onmouseUp(t)},document.onmouseleave=function(t){e.onmouseUp(t)}}},{key:"onmouseMove",value:function(t){var e=this.startMoveX-t.offsetX;this.moveTimestamp=Math.floor(this.timestamp+e),this.moveTimestamp<0&&(this.moveTimestamp=0),this.moveTimestamp>86399&&(this.moveTimestamp=86399),this.reDrawLine(this.width/2-this.moveTimestamp*this.step,this.record)}},{key:"onmouseUp",value:function(){document.onmousemove=null,document.onmouseup=null,document.onmouseleave=null,this.timestamp=this.moveTimestamp,this.Obj.changeImouUrl("beginTime",this.timestamp)}},{key:"start",value:function(){this.loopLine()}},{key:"loopLine",value:function(){var t=this;this.reDrawLine(this.width/2-this.timestamp*this.step,this.record),this.AnimationFrameId=setTimeout((function(){t.loopLine()}),200)}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.AnimationFrameId&&clearTimeout(this.AnimationFrameId),this.timestampTimer&&clearTimeout(this.timestampTimer),this.AnimationFrameId=null,this.timestampTimer=null,t&&(this.timestamp=0,this.record=[],this.reDrawLine(this.width/2,[]))}},{key:"changeProp",value:function(t,e){if("timestamp"===t){var n=this.record,i=this.timestamp,a=this.step;if(e<0)return void(this.timestamp=0);if(!this.AnimationFrameId)return;n.length>0&&i>=n[n.length-1].endTime&&(this.Obj.status.message="播放结束",this.Obj.stop(),this.stop(),this.reDrawLine(this.width/2-n[n.length-1].endTime*a,n))}this[t]=e,"width"===t&&(this.elem.width=e)}},{key:"reDrawLine",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.ctx,i=this.step;n.clearRect(0,0,this.width,this.height);for(var a=0;athis.width)break;(r>0||l>0||rthis.width)break;h%10==0?(s(n,m,0,m,50,"#808080",2),n.font="15px PingFang SC",n.fillStyle="#D8D8D8",n.fillText(u(h),m+12,20)):s(n,m,30,m,50,"#808080",2)}}s(n,this.width/2,0,this.width/2,50,"#f18d00",2)}}],n&&l(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function m(){m=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",r=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var a=e&&e.prototype instanceof d?e:d,o=Object.create(a.prototype),r=new L(i||[]);return o._invoke=function(t,e,n){var i="suspendedStart";return function(a,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===a)throw o;return{value:void 0,done:!0}}for(n.method=a,n.arg=o;;){var r=n.delegate;if(r){var s=_(r,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=l(t,e,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}(t,n,r),o}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 u={};function d(){}function y(){}function f(){}var p={};s(p,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(D([])));v&&v!==e&&n.call(v,a)&&(p=v);var b=f.prototype=d.prototype=Object.create(p);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function i(a,o,r,s){var c=l(t[a],t,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==h(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){i("next",t,r,s)}),(function(t){i("throw",t,r,s)})):e.resolve(d).then((function(t){u.value=t,r(u)}),(function(t){return i("throw",t,r,s)}))}s(c.arg)}var a;this._invoke=function(t,n){function o(){return new e((function(e,a){i(t,n,e,a)}))}return a=a?a.then(o,o):o()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var i=l(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,u;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function x(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function D(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function e(){for(;++i=0;--a){var o=this.tryEntries[a],r=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var a=i.arg;E(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:D(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}function y(t,e,n,i,a,o,r){try{var s=t[o](r),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,a)}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n40?n>80?i>40&&i<80&&(a="right"):i<40?a="up":i>80&&(a="down"):i>40&&i<80&&(a="left"),a&&t.ptzControl(a)})),o.addEventListener("mouseup",(function(){t.ptzControl("stop")})),e.appendChild(o),e}(w):function(t){var n=new DocumentFragment,i=t.iframeId,a=document.createElement("div");a.setAttribute("id","imou_player_icon_root_".concat(i)),a.style.display="none",a.style.position="absolute",a.style.width="100%",a.style.height="100%",a.style.zIndex="99999";var o=document.createElement("div");o.style.color="#f18d00",o.innerHTML="".concat(t.status.deviceId," 通道 ").concat(t.status.channelId),o.setAttribute("class","topLeft"),a.appendChild(o),["play","voice","capture"].forEach((function(t,e){var n=document.createElement("div");n.setAttribute("id","imou_player_icon_".concat(t,"_").concat(i)),n.setAttribute("class","iconfont icon-".concat(t," record-icon position_left_").concat(e)),a.appendChild(n)})),["fullPage","WangYeQuanPing"].forEach((function(t,e){var n=document.createElement("div");n.setAttribute("id","imou_player_icon_".concat(t,"_").concat(i)),n.setAttribute("class","iconfont icon-".concat(t," record-icon position_right_").concat(e)),a.appendChild(n)})),["BenDiLuXiang","YunLuXiang"].forEach((function(e,n){var o=document.createElement("div");o.setAttribute("id","imou_player_icon_".concat(e,"_").concat(i)),o.setAttribute("class","iconfont icon-Icon_".concat(e," record-icon topRight position_right_").concat(n)),"localRecord"===t.status.recordType&&"BenDiLuXiang"===e&&(o.style.color="blue"),"localRecord"!==t.status.recordType&&"YunLuXiang"===e&&(o.style.color="blue"),a.appendChild(o)})),n.appendChild(a),a.addEventListener("click",(function(e){switch(e.target.id){case"imou_player_icon_play_".concat(i):t.status.playing?t.pause():t.play();break;case"imou_player_icon_capture_".concat(i):t.capture();break;case"imou_player_icon_voice_".concat(i):t.volume(!t.status.volume);break;case"imou_player_icon_fullPage_".concat(i):t.status.fullPage=!t.status.fullPage;break;case"imou_player_icon_WangYeQuanPing_".concat(i):t.status.fullWebPage=!t.status.fullWebPage;break;case"imou_player_icon_BenDiLuXiang_".concat(i):t.status.message="切换录像至本地录像中...",t.changeImouUrl("recordType","localRecord");break;case"imou_player_icon_YunLuXiang_".concat(i):t.status.message="切换录像至云录像中...",t.changeImouUrl("recordType","cloud")}}));var s=document.createElement("div");s.setAttribute("id","imou_player_message_root_".concat(i)),s.setAttribute("style","position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:1.2em;color:white;z-index:99999;"),s.style.display="none",n.appendChild(s);var c=document.createElement("canvas");c.setAttribute("id","imou_player_timeLine-web_".concat(i)),c.setAttribute("style","display:none;position:absolute;bottom:0px;z-index:99999;background-color:rgba(60, 60, 60,1);");var l=new d({elem:c,width:t.status.width,height:50,Obj:t,beginTime:e()(t.status.beginTime).unix()-e()(t.status.beginTime).startOf("day").unix()});t.timeLine=l,n.appendChild(c);var u=document.createElement("div");u.setAttribute("id","imou_player_timeLine-celeContainer_".concat(i)),u.setAttribute("style","display:none;position:absolute;bottom:0px;padding-right:10px;right:0px;z-index:99999;width:35px;height:50px;background-color:rgb(60, 60, 60);");var h=document.createElement("div");h.setAttribute("class","iconfont icon-Console_icon_calendar record-icon"),h.setAttribute("style","bottom:10px;left:5px;"),h.addEventListener("click",(function(){""===m.style.display?m.style.display="none":m.style.display=""}));var m=document.createElement("div");return m.setAttribute("id","player_timeLine-cele_".concat(i)),m.setAttribute("style","display:none;position:absolute;top:-332px;left:-274px;width:274px;height:322px;"),setTimeout((function(){var n=t.status.beginTime.split(" ")[0],a=e()().format("YYYY-MM-DD");r().render({elem:"#player_timeLine-cele_".concat(i),type:"date",position:"static",value:n,max:a,btns:[],done:function(e){setTimeout((function(){m.style.display="none",t.changeImouUrl("beginTime x",e)}),100)}})}),3e3),u.appendChild(h),u.appendChild(m),n.appendChild(u),n}(w);this.root.appendChild(T),y&&(this.status.volume=!1),this.crateIframe(b,o,h),this.createHandleClick(["play","pause","stop","capture","ptzControl","talk","volume"]),this.listener={play:function(){},stop:function(){},pause:function(){},audioChange:function(){},talk:function(){},capture:function(){},error:function(){},volume:function(){}},this.playStatus=!1,this.resizeObserver=new ResizeObserver((function(t){var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return f(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)?f(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}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 o,r=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return r=t.done,t},e:function(t){s=!0,o=t},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;a.contentRect&&function(){var t=a.contentRect,e=t.width,n=t.height;document.documentElement.clientWidth!==e&&(i.status.width=e,i.status.height=n),setTimeout((function(){i.timeLine&&i.timeLine.changeProp("width",e)}),50)}()}}catch(t){n.e(t)}finally{n.f()}})),this.resizeObserver.observe(this.root)}var n,i,o,s;return n=t,i=[{key:"crateIframe",value:function(t,e,n){var i=this,a="url=".concat(t,"&kitToken=").concat(e,"&code=").concat(encodeURIComponent(n)),o=encodeURI("".concat(this.domain,"?").concat(a));this.iframeUrl=o;var r=document.createElement("iframe");r.id=this.iframeId,r.src=o,r.width="100%",r.height="100%",r.style="border:0;position:absolute;",r.setAttribute("allow","autoplay;microphone;fullscreen;midi;encrypted-media;"),r.setAttribute("frameborder",0),this.root.appendChild(r),this.iframe=r,this.iframeId=r.id,""!==this.status.message&&"播放结束"!==this.status.message||(this.status.message="加载中···"),this.addMessageListen=this.addMessageListen.bind(this),window.addEventListener("message",this.addMessageListen),r.onload=function(){i.emitMessage({id:r.id,type:"init"})};var s=function(){document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||(i.status.fullPage=!1)};this.exitHandler=s,document.addEventListener("webkitfullscreenchange",s,!1),document.addEventListener("mozfullscreenchange",s,!1),document.addEventListener("fullscreenchange",s,!1),document.addEventListener("MSFullscreenChange",s,!1)}},{key:"addMessageListen",value:function(t){var e=this,n=t.data,i=n.id,o=n.code,r=n.msg;if(i===this.iframe.id)switch(o){case"6001":this.timeLine&&this.timeLine.changeProp("timestamp",t.data.timestamp);break;case"2000":if(this.playing)return;this.status.message="",this.playing=!0,this.status.playing=!0,2===this.status.type&&(this.timeLine&&this.timeLine.start(),this.requestRecordList()),this.listener.play(),setTimeout((function(){!/Mobi|Android|iPhone/i.test(navigator.userAgent)&&e.status.volume&&e.volume(1)}),1e3),this.mouseleaveFunc=function(t){var e=this;a(this.iframeId,!1),this.buttonShowOrHiddenFlag&&clearTimeout(this.buttonShowOrHiddenFlag),this.buttonShowOrHiddenFlag=setTimeout((function(){a(e.iframeId)}),3e3)},this.mouseleaveFunc=this.mouseleaveFunc.bind(this),this.root.addEventListener("mouseover",this.mouseleaveFunc),this.buttonShowOrHiddenFlag=setTimeout((function(){a(e.iframeId)}),3e3);break;case"2001":this.status.playing=!0,this.listener.play&&this.listener.play(t.data);break;case"2002":this.status.playing=!1,this.listener.pause&&this.listener.pause(t.data);break;case"2003":this.status.volume=!0,this.listener.volume(t.data);break;case"4209":this.listener.volume(t.data);break;case"2004":this.status.volume=!1,this.listener.volume(t.data);break;case"2005":this.status.talk=!0,this.listener.talk(t.data);break;case"4000":case"4102":case"4104":case"4105":case"4107":a(this.iframeId,!1),this.status.message=r,this.listener.error(t.data);break;case"2006":case"4201":case"4202":case"4203":case"4204":case"4205":case"4206":case"4207":case"4208":this.status.talk=!1,this.listener.talk(t.data);break;case"6002":this.doRequestRecordList(t.data.recordList)}}},{key:"emitMessage",value:function(t){this.iframe.contentWindow.postMessage(t,this.domain)}},{key:"on",value:function(t,e){this.listener[t]&&(this.listener[t]=e)}},{key:"emit",value:(o=m().mark((function t(e,n){return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.listener[e]){t.next=2;break}return t.abrupt("return");case 2:this.listener[e].forEach((function(t){return t()}));case 3:case"end":return t.stop()}}),t,this)})),s=function(){var t=this,e=arguments;return new Promise((function(n,i){var a=o.apply(t,e);function r(t){y(a,n,i,r,s,"next",t)}function s(t){y(a,n,i,r,s,"throw",t)}r(void 0)}))},function(t,e){return s.apply(this,arguments)})},{key:"createHandleClick",value:function(t){var e=this;t.forEach((function(t){e[t]=function(n){("play"!==t||e.playing)&&e.emitMessage({id:e.iframe.id,type:"".concat(t),params:n})}}))}},{key:"fullScreen",value:function(){var t=this,e=this.root;(e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen).call(e),setTimeout((function(){t.timeLine&&t.timeLine.changeProp("width",window.screen.width)}),50)}},{key:"exitFullScreen",value:function(){var t=this;(document.exitFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen).call(document),setTimeout((function(){t.timeLine&&t.timeLine.changeProp("width",t.status.fullWebPage?document.documentElement.clientWidth:t.status.width)}),100)}},{key:"fullPageScreen",value:function(){var t=this;window.scroll(0,0),document.body.style.overflow="hidden";var e=document.documentElement.clientWidth,n=document.documentElement.clientHeight;this.root.style.position="absolute",this.root.style.left="0",this.root.style.top="0",this.root.style.width="".concat(e,"px"),this.root.style.height="".concat(n,"px"),this.root.style.zIndex="999999",setTimeout((function(){t.timeLine&&t.timeLine.changeProp("width",e)}),100)}},{key:"exitFullPageScreen",value:function(){var t=this;this.root.style.position="relative",this.root.style.width="".concat(this.status.width,"px"),this.root.style.height="".concat(this.status.height,"px"),this.root.style.zIndex="",document.body.style.overflow="",setTimeout((function(){t.timeLine&&t.timeLine.changeProp("width",t.status.width)}),0)}},{key:"changeImouUrl",value:function(t,n){switch(this.destroy(!1),t){case"beginTime":this.status.beginTime=e().unix(e()(this.status.beginTime).startOf("day").unix()+n).format("YYYY-MM-DD HH:mm:ss"),this.status.endTime=e()(this.status.beginTime).endOf("day").format("YYYY-MM-DD HH:mm:ss");break;case"beginTime x":this.status.beginTime=e()(n).format("YYYY-MM-DD HH:mm:ss"),this.status.endTime=e()(this.status.beginTime).endOf("day").format("YYYY-MM-DD HH:mm:ss"),this.record=[],this.timeLine&&this.timeLine.stop(!0),this.status.message="切换日期至".concat(n,"中...");break;case"recordType":this.status.beginTime=e()(this.status.beginTime).startOf("day").format("YYYY-MM-DD HH:mm:ss"),this.status.endTime=e()(this.status.beginTime).endOf("day").format("YYYY-MM-DD HH:mm:ss"),this.record=[],this.timeLine&&this.timeLine.stop(!0),this.status[t]=n;break;default:this.status[t]=n}this.status.yuntai=!1,this.status.talk=!1,this.status.volume=1,this.status.playing=!1;var i=this.status,a="imou://open.lechange.com/".concat(i.deviceId,"/").concat(i.channelId,"/").concat(i.type,"?streamId=").concat(i.clarity,"&recordType=").concat(i.recordType,"&beginTime=").concat(i.beginTime,"&endTime=").concat(i.endTime);this.crateIframe(a,i.token,i.code)}},{key:"destroy",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.iframe;this.iframe.src="about:blank";try{e.contentWindow.document.write(""),e.contentWindow.document.clear()}catch(t){console.log(t)}if(e.parentNode.removeChild(e),document.removeEventListener("webkitfullscreenchange",this.exitHandler),document.removeEventListener("mozfullscreenchange",this.exitHandler),document.removeEventListener("fullscreenchange",this.exitHandler),document.removeEventListener("MSFullscreenChange",this.exitHandler),window.removeEventListener("message",this.addMessageListen),this.root.removeEventListener("mouseover",this.mouseleaveFunc),this.buttonShowOrHiddenFlag&&clearTimeout(this.buttonShowOrHiddenFlag),this.recordListTimer&&clearTimeout(this.recordListTimer),this.timestampTimer&&clearInterval(this.timestampTimer),this.requestRecordListTimer&&clearTimeout(this.requestRecordListTimer),this.timeLine&&this.timeLine.stop(),this.playing=!1,t){for(this.resizeObserver.unobserve(this.root);this.root.firstChild;)this.root.removeChild(this.root.firstChild);this.timeLine=null}}},{key:"requestRecordList",value:function(){if(0===this.record.length)this.emitMessage({type:"getRecordList",params:{beginTime:this.status.beginTime,endTime:this.status.endTime,recordType:this.status.recordType}});else{var t=e()(this.status.beginTime).startOf("day").unix();this.emitMessage({type:"getRecordList",params:{beginTime:e().unix(this.record[this.record.length-1].endTime+t).format("YYYY-MM-DD HH:mm:ss"),endTime:this.status.endTime,recordType:this.status.recordType}})}}},{key:"doRequestRecordList",value:function(t){var n=this,i=e()(this.status.beginTime).startOf("day").unix();this.record=this.record.concat(t.map((function(t){return{beginTime:e()(t.beginTime).unix()-i,endTime:e()(t.endTime).unix()-i}}))),("localRecord"===this.status.recordType&&t.length>=64||t.length>=99)&&(this.requestRecordListTimer=setTimeout((function(){n.requestRecordList()}),3e3)),this.timeLine&&this.timeLine.changeProp("record",this.record)}},{key:"changeRootWidthAndHeight",value:function(t,e){var n=this;this.root.style.width="".concat(t,"px"),this.root.style.height="".concat(e,"px"),setTimeout((function(){n.timeLine&&n.timeLine.changeProp("width",t)}),100)}}],i&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}();window&&(window.imouPlayer=g);const v=g})(),i})()));