baiqiu-cms-decoration-dg 0.6.6 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,9 +6,9 @@ module.exports=function(e){var t={};function i(s){if(t[s])return t[s].exports;va
6
6
  * Available under the MIT license
7
7
  * <https://github.com/kesla/parse-headers/blob/master/LICENCE>
8
8
  */
9
- var a=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();"undefined"===typeof t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function o(e,t){for(var i=0;i<e.length;i++)t(e[i])}function l(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function d(e,t,i){var s=e;return r(t)?(i=t,"string"===typeof e&&(s={uri:e})):s=n({},t,{uri:e}),s.callback=i,s}function u(e,t,i){return t=d(e,t,i),c(t)}function c(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,s,n){t||(t=!0,e.callback(i,s,n))};function s(){4===p.readyState&&setTimeout(o,0)}function n(){var e=void 0;if(e=p.response?p.response:p.responseText||h(p),_)try{e=JSON.parse(e)}catch(t){}return e}function r(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,T)}function o(){if(!c){var t;clearTimeout(f),t=e.useXDR&&void 0===p.status?200:1223===p.status?204:p.status;var s=T,r=null;return 0!==t?(s={body:n(),statusCode:t,method:g,headers:{},url:m,rawRequest:p},p.getAllResponseHeaders&&(s.headers=a(p.getAllResponseHeaders()))):r=new Error("Internal XMLHttpRequest Error"),i(r,s,s.body)}}var d,c,p=e.xhr||null;p||(p=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f,m=p.url=e.uri||e.url,g=p.method=e.method||"GET",y=e.body||e.data,v=p.headers=e.headers||{},b=!!e.sync,_=!1,T={body:void 0,headers:{},statusCode:0,method:g,url:m,rawRequest:p};if("json"in e&&!1!==e.json&&(_=!0,v["accept"]||v["Accept"]||(v["Accept"]="application/json"),"GET"!==g&&"HEAD"!==g&&(v["content-type"]||v["Content-Type"]||(v["Content-Type"]="application/json"),y=JSON.stringify(!0===e.json?y:e.json))),p.onreadystatechange=s,p.onload=o,p.onerror=r,p.onprogress=function(){},p.onabort=function(){c=!0},p.ontimeout=r,p.open(g,m,!b,e.username,e.password),b||(p.withCredentials=!!e.withCredentials),!b&&e.timeout>0&&(f=setTimeout((function(){if(!c){c=!0,p.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}}),e.timeout)),p.setRequestHeader)for(d in v)v.hasOwnProperty(d)&&p.setRequestHeader(d,v[d]);else if(e.headers&&!l(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(p),p.send(y||null),p}function h(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(i){}return null}function p(){}e.exports=u,e.exports.default=u,u.XMLHttpRequest=s.XMLHttpRequest||p,u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:s.XDomainRequest,o(["get","put","post","patch","head","delete"],(function(e){u["delete"===e?"del":e]=function(t,i,s){return i=d(t,i,s),i.method=e.toUpperCase(),c(i)}}))},"36c6":function(e,t){var i,s,n,r,a,o,l,d=9e4;i=function(e){return e*d},s=function(e,t){return e*t},n=function(e){return e/d},r=function(e,t){return e/t},a=function(e,t){return i(r(e,t))},o=function(e,t){return s(n(e),t)},l=function(e,t,i){return n(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:d,secondsToVideoTs:i,secondsToAudioTs:s,videoTsToSeconds:n,audioTsToSeconds:r,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l}},"387f":function(e,t,i){"use strict";e.exports=function(e,t,i,s,n){return e.config=t,i&&(e.code=i),e.request=s,e.response=n,e.isAxiosError=!0,e.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}},e}},3934:function(e,t,i){"use strict";var s=i("c532");e.exports=s.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(e){var s=e;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=n(window.location.href),function(t){var i=s.isString(t)?n(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},"3a34":function(e,t,i){"use strict";var s=i("83ab"),n=i("e8b5"),r=TypeError,a=Object.getOwnPropertyDescriptor,o=s&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=o?function(e,t){if(n(e)&&!a(e,"length").writable)throw new r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},"3a9b":function(e,t,i){"use strict";var s=i("e330");e.exports=s({}.isPrototypeOf)},"3e8c":function(e,t,i){"use strict";i("5156")},"40d5":function(e,t,i){"use strict";var s=i("d039");e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},4362:function(e,t,i){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,s="/";t.cwd=function(){return s},t.chdir=function(t){e||(e=i("df7c")),s=e.resolve(t,s)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"44ad":function(e,t,i){"use strict";var s=i("e330"),n=i("d039"),r=i("c6b6"),a=Object,o=s("".split);e.exports=n((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===r(e)?o(e,""):a(e)}:a},"467f":function(e,t,i){"use strict";var s=i("2d83");e.exports=function(e,t,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(s("Request failed with status code "+i.status,i.config,null,i.request,i)):e(i)}},"485a":function(e,t,i){"use strict";var s=i("c65b"),n=i("1626"),r=i("861d"),a=TypeError;e.exports=function(e,t){var i,o;if("string"===t&&n(i=e.toString)&&!r(o=s(i,e)))return o;if(n(i=e.valueOf)&&!r(o=s(i,e)))return o;if("string"!==t&&n(i=e.toString)&&!r(o=s(i,e)))return o;throw new a("Can't convert object to primitive value")}},"4a0c":function(e){e.exports=JSON.parse('{"_args":[["axios@0.21.4","D:\\\\后台\\\\装修 dg\\\\front-eshop-cms2.0"]],"_from":"axios@0.21.4","_id":"axios@0.21.4","_inBundle":false,"_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.4","name":"axios","escapedName":"axios","rawSpec":"0.21.4","saveSpec":null,"fetchSpec":"0.21.4"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_spec":"0.21.4","_where":"D:\\\\后台\\\\装修 dg\\\\front-eshop-cms2.0","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.14.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"homepage":"https://axios-http.com","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.4"}')},"4a7b":function(e,t,i){"use strict";var s=i("c532");e.exports=function(e,t){t=t||{};var i={},n=["url","method","data"],r=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function l(e,t){return s.isPlainObject(e)&&s.isPlainObject(t)?s.merge(e,t):s.isPlainObject(t)?s.merge({},t):s.isArray(t)?t.slice():t}function d(n){s.isUndefined(t[n])?s.isUndefined(e[n])||(i[n]=l(void 0,e[n])):i[n]=l(e[n],t[n])}s.forEach(n,(function(e){s.isUndefined(t[e])||(i[e]=l(void 0,t[e]))})),s.forEach(r,d),s.forEach(a,(function(n){s.isUndefined(t[n])?s.isUndefined(e[n])||(i[n]=l(void 0,e[n])):i[n]=l(void 0,t[n])})),s.forEach(o,(function(s){s in t?i[s]=l(e[s],t[s]):s in e&&(i[s]=l(void 0,e[s]))}));var u=n.concat(r).concat(a).concat(o),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return s.forEach(c,d),i}},"4a91":function(e,t,i){"use strict";i("9657")},"4d64":function(e,t,i){"use strict";var s=i("fc6a"),n=i("23cb"),r=i("07fa"),a=function(e){return function(t,i,a){var o,l=s(t),d=r(l),u=n(a,d);if(e&&i!==i){while(d>u)if(o=l[u++],o!==o)return!0}else for(;d>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4e9a":function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a}));var s=i("be09"),n=i.n(s),r=function(t){return n.a.atob?n.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=r(e),i=new Uint8Array(t.length),s=0;s<t.length;s++)i[s]=t.charCodeAt(s);return i}}).call(this,i("b639").Buffer)},"50c4":function(e,t,i){"use strict";var s=i("5926"),n=Math.min;e.exports=function(e){var t=s(e);return t>0?n(t,9007199254740991):0}},5156:function(e,t,i){},5270:function(e,t,i){"use strict";var s=i("c532"),n=i("c401"),r=i("2e67"),a=i("2444");function o(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){o(e),e.headers=e.headers||{},e.data=n.call(e,e.data,e.headers,e.transformRequest),e.headers=s.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),s.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||a.adapter;return t(e).then((function(t){return o(e),t.data=n.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return r(t)||(o(e),t&&t.response&&(t.response.data=n.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},5692:function(e,t,i){"use strict";var s=i("c430"),n=i("c6cd");(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.1",mode:s?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(e,t,i){"use strict";var s=i("d066"),n=i("e330"),r=i("241c"),a=i("7418"),o=i("825a"),l=n([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(o(e)),i=a.f;return i?l(t,i(e)):t}},5926:function(e,t,i){"use strict";var s=i("b42e");e.exports=function(e){var t=+e;return t!==t||0===t?0:s(t)}},"59ed":function(e,t,i){"use strict";var s=i("1626"),n=i("0d51"),r=TypeError;e.exports=function(e){if(s(e))return e;throw new r(n(e)+" is not a function")}},"5c6c":function(e,t,i){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5e77":function(e,t,i){"use strict";var s=i("83ab"),n=i("1a2d"),r=Function.prototype,a=s&&Object.getOwnPropertyDescriptor,o=n(r,"name"),l=o&&"something"===function(){}.name,d=o&&(!s||s&&a(r,"name").configurable);e.exports={EXISTS:o,PROPER:l,CONFIGURABLE:d}},"5f02":function(e,t,i){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},"605d":function(e,t,i){"use strict";var s=i("da84"),n=i("c6b6");e.exports="process"===n(s.process)},6330:function(e,t,i){},6374:function(e,t,i){"use strict";var s=i("da84"),n=Object.defineProperty;e.exports=function(e,t){try{n(s,e,{value:t,configurable:!0,writable:!0})}catch(i){s[e]=t}return t}},"63ec":function(e,t,i){"use strict";var s=i("d136"),n=i.n(s),r=i("be09"),a=i.n(r),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var i="function"===typeof a.a.URL,s=/^\/\//.test(e),r=!a.a.location&&!/\/\//i.test(e);if(i?e=new a.a.URL(e,a.a.location||o):/\/\//i.test(e)||(e=n.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),i){var l=new URL(t,e);return r?l.href.slice(o.length):s?l.href.slice(l.protocol.length):l.href}return n.a.buildAbsoluteURL(e,t)};t["a"]=l},6814:function(e,t,i){"use strict";i("ae9f")},"69bf":function(e,t,i){},"69f3":function(e,t,i){"use strict";var s,n,r,a=i("cdce"),o=i("da84"),l=i("861d"),d=i("9112"),u=i("1a2d"),c=i("c6cd"),h=i("f772"),p=i("d012"),f="Object already initialized",m=o.TypeError,g=o.WeakMap,y=function(e){return r(e)?n(e):s(e,{})},v=function(e){return function(t){var i;if(!l(t)||(i=n(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return i}};if(a||c.state){var b=c.state||(c.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,s=function(e,t){if(b.has(e))throw new m(f);return t.facade=e,b.set(e,t),t},n=function(e){return b.get(e)||{}},r=function(e){return b.has(e)}}else{var _=h("state");p[_]=!0,s=function(e,t){if(u(e,_))throw new m(f);return t.facade=e,d(e,_,t),t},n=function(e){return u(e,_)?e[_]:{}},r=function(e){return u(e,_)}}e.exports={set:s,get:n,has:r,enforce:y,getterFor:v}},"6e0d":function(e,t,i){"use strict";i("843d")},7234:function(e,t,i){"use strict";e.exports=function(e){return null===e||void 0===e}},7418:function(e,t,i){"use strict";t.f=Object.getOwnPropertySymbols},"77ed":function(e,t,i){},7839:function(e,t,i){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7a77":function(e,t,i){"use strict";function s(e){this.message=e}s.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},s.prototype.__CANCEL__=!0,e.exports=s},"7aac":function(e,t,i){"use strict";var s=i("c532");e.exports=s.isStandardBrowserEnv()?function(){return{write:function(e,t,i,n,r,a){var o=[];o.push(e+"="+encodeURIComponent(t)),s.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),s.isString(n)&&o.push("path="+n),s.isString(r)&&o.push("domain="+r),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"7b0b":function(e,t,i){"use strict";var s=i("1d80"),n=Object;e.exports=function(e){return n(s(e))}},"81c0":function(e,t,i){var s=i("a968").getUint64,n=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=s(e.subarray(n)),i.firstOffset=s(e.subarray(n+8)),n+=16),n+=2;var r=t.getUint16(n);for(n+=2;r>0;n+=12,r--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i};e.exports=n},"825a":function(e,t,i){"use strict";var s=i("861d"),n=String,r=TypeError;e.exports=function(e){if(s(e))return e;throw new r(n(e)+" is not an object")}},"82e5":function(e,t,i){"use strict";i("fbac")},8362:function(e,t){e.exports=s;var i=Object.prototype.toString;function s(e){if(!e)return!1;var t=i.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}},"83ab":function(e,t,i){"use strict";var s=i("d039");e.exports=!s((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83b9":function(e,t,i){"use strict";var s=i("d925"),n=i("e683");e.exports=function(e,t){return e&&!s(t)?n(e,t):t}},"843d":function(e,t,i){},8484:function(e,t,i){"use strict";i.d(t,"a",(function(){return C})),i.d(t,"b",(function(){return N})),i.d(t,"c",(function(){return Ie})),i.d(t,"d",(function(){return Le}));var s=i("63ec"),n=i("be09"),r=i.n(n),a=function(e,t,i){t.forEach((function(t){for(var s in e.mediaGroups[t])for(var n in e.mediaGroups[t][s]){var r=e.mediaGroups[t][s][n];i(r,t,s,n)}}))},o=i("ffdf"),l=i("210b");const d=e=>!!e&&"object"===typeof e,u=(...e)=>e.reduce((e,t)=>("object"!==typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):d(e[i])&&d(t[i])?e[i]=u(e[i],t[i]):e[i]=t[i]}),e),{}),c=e=>Object.keys(e).map(t=>e[t]),h=(e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i},p=e=>e.reduce((e,t)=>e.concat(t),[]),f=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t},m=(e,t)=>e.reduce((e,i,s)=>(i[t]&&e.push(s),e),[]),g=(e,t)=>c(e.reduce((e,i)=>(i.forEach(i=>{e[t(i)]=i}),e),{}));var y={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const v=({baseUrl:e="",source:t="",range:i="",indexRange:n=""})=>{const a={uri:t,resolvedUri:Object(s["a"])(e||"",t)};if(i||n){const e=i||n,t=e.split("-");let s,o=r.a.BigInt?r.a.BigInt(t[0]):parseInt(t[0],10),l=r.a.BigInt?r.a.BigInt(t[1]):parseInt(t[1],10);o<Number.MAX_SAFE_INTEGER&&"bigint"===typeof o&&(o=Number(o)),l<Number.MAX_SAFE_INTEGER&&"bigint"===typeof l&&(l=Number(l)),s="bigint"===typeof l||"bigint"===typeof o?r.a.BigInt(l)-r.a.BigInt(o)+r.a.BigInt(1):l-o+1,"bigint"===typeof s&&s<Number.MAX_SAFE_INTEGER&&(s=Number(s)),a.byterange={length:s,offset:o}}return a},b=e=>{let t;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?r.a.BigInt(e.offset)+r.a.BigInt(e.length)-r.a.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`},_=e=>(e&&"number"!==typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),T={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=_(e.endNumber),a=t/i;return"number"===typeof r?{start:0,end:r}:"number"===typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,d=_(e.endNumber),u=(t+i)/1e3,c=s+a,h=u+o,p=h-c,f=Math.ceil(p*n/r),m=Math.floor((u-c-l)*n/r),g=Math.floor((u-c)*n/r);return{start:Math.max(0,m),end:"number"===typeof d?d:Math.min(f,g)}}},S=e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}},w=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=T[t](e),l=h(a,o).map(S(e));if("static"===t){const e=l.length-1,t="number"===typeof n?n:r;l[e].duration=t-i/s*e}return l},x=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n="",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(y.NO_BASE_URL);const d=v({baseUrl:t,source:i.sourceURL,range:i.range}),u=v({baseUrl:t,source:t,indexRange:n});if(u.map=d,l){const t=w(e);t.length&&(u.duration=t[0].duration,u.timeline=t[0].timeline)}else s&&(u.duration=s,u.timeline=r);return u.presentationTime=a||r,u.number=o,[u]},C=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,a=e.timeline||0,o=e.sidx.byterange,l=o.offset+o.length,d=t.timescale,u=t.references.filter(e=>1!==e.referenceType),c=[],h=e.endList?"static":"dynamic",p=e.sidx.timeline;let f,m=p,g=e.mediaSequence||0;f="bigint"===typeof t.firstOffset?r.a.BigInt(l)+t.firstOffset:l+t.firstOffset;for(let y=0;y<u.length;y++){const e=t.references[y],o=e.referencedSize,l=e.subsegmentDuration;let u;u="bigint"===typeof f?f+r.a.BigInt(o)-r.a.BigInt(1):f+o-1;const v=`${f}-${u}`,b={baseUrl:i,timescale:d,timeline:a,periodStart:p,presentationTime:m,number:g,duration:l,sourceDuration:n,indexRange:v,type:h},_=x(b)[0];s&&(_.map=s),c.push(_),f+="bigint"===typeof f?r.a.BigInt(o):o,m+=l/d,g++}return e.segments=c,e},E=["AUDIO","SUBTITLES"],k=1/60,I=e=>g(e,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),L=(e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null},P=e=>{let t=[];return a(e,E,(e,i,s,n)=>{t=t.concat(e.playlists||[])}),t},O=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},A=({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=L(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<k}));if(-1===r)return O({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);const a=s.segments[r];a.discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),O({playlist:t,mediaSequence:s.segments[r].number})})},D=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(P(e)),s=t.playlists.concat(P(t));return t.timelineStarts=I([e.timelineStarts,t.timelineStarts]),A({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},N=e=>e&&e.uri+"-"+b(e.byterange),M=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach(e=>{const t=c(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>(e.discontinuityStarts=m(e.segments||[],"discontinuity"),e))},R=(e,t)=>{const i=N(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&C(e,s,e.sidx.resolvedUri),e},U=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=R(e[i],t);return e},B=({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o},j=({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{"undefined"===typeof t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a},F=(e,t={},i=!1)=>{let s;const n=e.reduce((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||"",a=n.attributes.lang||"";let o=n.attributes.label||"main";if(a&&!n.attributes.label){const e=r?` (${r})`:"";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===r,playlists:[],uri:""});const l=R(B(n,i),t);return e[o].playlists.push(l),"undefined"===typeof s&&"main"===r&&(s=n,s.default=!0),e},{});if(!s){const e=Object.keys(n)[0];n[e].default=!0}return n},q=(e,t={})=>e.reduce((e,i)=>{const s=i.attributes.label||i.attributes.lang||"text";return e[s]||(e[s]={language:s,default:!1,autoselect:!1,playlists:[],uri:""}),e[s].playlists.push(R(j(i),t)),e},{}),$=e=>e.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty("aspectRatio")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[s]["3D"]=t["3D"])}),e):e,{}),H=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},V=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,z=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,G=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,J=(e,t)=>{e.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=t.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach((e,t)=>{e.number=t})})},W=e=>e?Object.keys(e).reduce((t,i)=>{const s=e[i];return t.concat(s.playlists)},[]):[],X=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:d}=e[0].attributes,u=M(e.filter(V)).map(H),c=M(e.filter(z)),h=M(e.filter(G)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},["CLOSED-CAPTIONS"]:{},SUBTITLES:{}},uri:"",duration:a,playlists:U(u,s)};d>=0&&(f.minimumUpdatePeriod=1e3*d),t&&(f.locations=t),i&&(f.contentSteering=i),"dynamic"===o&&(f.suggestedPresentationDelay=l),r&&r.length>0&&(f.eventStream=r);const m=0===f.playlists.length,g=c.length?F(c,s,m):null,y=h.length?q(h,s):null,v=u.concat(W(g),W(y)),b=v.map(({timelineStarts:e})=>e);return f.timelineStarts=I(b),J(v,f.timelineStarts),g&&(f.mediaGroups.AUDIO.audio=g),y&&(f.mediaGroups.SUBTITLES.subs=y),p.length&&(f.mediaGroups["CLOSED-CAPTIONS"].cc=$(p)),n?D({oldManifest:n,newManifest:f}):f},Y=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,d=(s+n)/1e3,u=r+o,c=d+l,h=c-u;return Math.ceil((h*a-t)/i)},K=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n="",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,d=[];let u=-1;for(let c=0;c<t.length;c++){const h=t[c],p=h.d,f=h.r||0,m=h.t||0;let g;if(u<0&&(u=m),m&&m>u&&(u=m),f<0){const o=c+1;g=o===t.length?"dynamic"===i&&s>0&&n.indexOf("$Number$")>0?Y(e,u,p):(r*a-u)/p:(t[o].t-u)/p}else g=f+1;const y=o+d.length+g;let v=o+d.length;while(v<y)d.push({number:v,duration:p/a,time:u,timeline:l}),u+=p,v++}return d},Q=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Z=e=>(t,i,s,n)=>{if("$$"===t)return"$";if("undefined"===typeof e[i])return t;const r=""+e[i];return"RepresentationID"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join("0")}${r}`)},ee=(e,t)=>e.replace(Q,Z(t)),te=(e,t)=>e.duration||t?e.duration?w(e):K(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}],ie=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=e,r=v({baseUrl:e.baseUrl,source:ee(n.sourceURL,i),range:n.range}),a=te(e,t);return a.map(t=>{i.Number=t.number,i.Time=t.time;const n=ee(e.media||"",i),a=e.timescale||1,o=e.presentationTimeOffset||0,l=e.periodStart+(t.time-o)/a,d={uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:Object(s["a"])(e.baseUrl||"",n),map:r,number:t.number,presentationTime:l};return d})},se=(e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=v({baseUrl:i,source:s.sourceURL,range:s.range}),r=v({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r},ne=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(y.SEGMENT_TIME_UNSPECIFIED);const r=s.map(t=>se(e,t));let a;i&&(a=w(e)),t&&(a=K(e,t));const o=a.map((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}}).filter(e=>e);return o},re=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=ie,i=u(e,t.template)):t.base?(s=x,i=u(e,t.base)):t.list&&(s=ne,i=u(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},ae=e=>e.map(re),oe=(e,t)=>f(e.childNodes).filter(({tagName:e})=>e===t),le=e=>e.textContent.trim(),de=e=>parseFloat(e.split("/").reduce((e,t)=>e/t)),ue=e=>{const t=31536e3,i=2592e3,s=86400,n=3600,r=60,a=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,o=a.exec(e);if(!o)return 0;const[l,d,u,c,h,p]=o.slice(1);return parseFloat(l||0)*t+parseFloat(d||0)*i+parseFloat(u||0)*s+parseFloat(c||0)*n+parseFloat(h||0)*r+parseFloat(p||0)},ce=e=>{const t=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;return t.test(e)&&(e+="Z"),Date.parse(e)},he={mediaPresentationDuration(e){return ue(e)},availabilityStartTime(e){return ce(e)/1e3},minimumUpdatePeriod(e){return ue(e)},suggestedPresentationDelay(e){return ue(e)},type(e){return e},timeShiftBufferDepth(e){return ue(e)},start(e){return ue(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return de(e)},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){const t=parseInt(e,10);return isNaN(t)?ue(e):t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},DEFAULT(e){return e}},pe=e=>e&&e.attributes?f(e.attributes).reduce((e,t)=>{const i=he[t.name]||he.DEFAULT;return e[t.name]=i(t.value),e},{}):{},fe={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},me=(e,t)=>t.length?p(e.map((function(e){return t.map((function(t){const i=le(t),n=Object(s["a"])(e.baseUrl,i),r=u(pe(t),{baseUrl:n});return n!==i&&!r.serviceLocation&&e.serviceLocation&&(r.serviceLocation=e.serviceLocation),r}))}))):e,ge=e=>{const t=oe(e,"SegmentTemplate")[0],i=oe(e,"SegmentList")[0],s=i&&oe(i,"SegmentURL").map(e=>u({tag:"SegmentURL"},pe(e))),n=oe(e,"SegmentBase")[0],r=i||t,a=r&&oe(r,"SegmentTimeline")[0],o=i||n||t,l=o&&oe(o,"Initialization")[0],d=t&&pe(t);d&&l?d.initialization=l&&pe(l):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const c={template:d,segmentTimeline:a&&oe(a,"S").map(e=>pe(e)),list:i&&u(pe(i),{segmentUrls:s,initialization:pe(l)}),base:n&&u(pe(n),{initialization:pe(l)})};return Object.keys(c).forEach(e=>{c[e]||delete c[e]}),c},ye=(e,t,i)=>s=>{const n=oe(s,"BaseURL"),r=me(t,n),a=u(e,pe(s)),o=ge(s);return r.map(e=>({segmentInfo:u(i,o),attributes:u(a,e)}))},ve=e=>e.reduce((e,t)=>{const i=pe(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=fe[i.schemeIdUri];if(s){e[s]={attributes:i};const n=oe(t,"cenc:pssh")[0];if(n){const t=le(n);e[s].pssh=t&&Object(o["a"])(t)}}return e},{}),be=e=>{if("urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}})}if("urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[i,s=""]=e.split("=");t.channel=i,t.language=e,s.split(",").forEach(e=>{const[i,s]=e.split(":");"lang"===i?t.language=s:"er"===i?t.easyReader=Number(s):"war"===i?t.aspectRatio=Number(s):"3D"===i&&(t["3D"]=Number(s))})}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})}},_e=e=>p(oe(e.node,"EventStream").map(t=>{const i=pe(t),s=i.schemeIdUri;return oe(t,"Event").map(t=>{const n=pe(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:le(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),Te=(e,t,i)=>s=>{const n=pe(s),r=me(t,oe(s,"BaseURL")),a=oe(s,"Role")[0],o={role:pe(a)};let l=u(e,n,o);const d=oe(s,"Accessibility")[0],c=be(pe(d));c&&(l=u(l,{captionServices:c}));const h=oe(s,"Label")[0];if(h&&h.childNodes.length){const e=h.childNodes[0].nodeValue.trim();l=u(l,{label:e})}const f=ve(oe(s,"ContentProtection"));Object.keys(f).length&&(l=u(l,{contentProtection:f}));const m=ge(s),g=oe(s,"Representation"),y=u(i,m);return p(g.map(ye(l,r,y)))},Se=(e,t)=>(i,s)=>{const n=me(t,oe(i.node,"BaseURL")),r=u(e,{periodStart:i.attributes.start});"number"===typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=oe(i.node,"AdaptationSet"),o=ge(i.node);return p(a.map(Te(r,n,o)))},we=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;const i=u({serverURL:le(e[0])},pe(e[0]));return i.queryBeforeStart="true"===i.queryBeforeStart,i},xe=({attributes:e,priorPeriodAttributes:t,mpdType:i})=>"number"===typeof e.start?e.start:t&&"number"===typeof t.start&&"number"===typeof t.duration?t.start+t.duration:t||"static"!==i?null:0,Ce=(e,t={})=>{const{manifestUri:i="",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=oe(e,"Period");if(!a.length)throw new Error(y.INVALID_NUMBER_OF_PERIOD);const o=oe(e,"Location"),l=pe(e),d=me([{baseUrl:i}],oe(e,"BaseURL")),u=oe(e,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(le));const c=[];return a.forEach((e,t)=>{const i=pe(e),s=c[t-1];i.start=xe({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),c.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:we(u,r),representationInfo:p(c.map(Se(l,d))),eventStream:p(c.map(_e))}},Ee=e=>{if(""===e)throw new Error(y.DASH_EMPTY_MANIFEST);const t=new l["DOMParser"];let i,s;try{i=t.parseFromString(e,"application/xml"),s=i&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch(n){}if(!s||s&&s.getElementsByTagName("parsererror").length>0)throw new Error(y.DASH_INVALID_XML);return s},ke=e=>{const t=oe(e,"UTCTiming")[0];if(!t)return null;const i=pe(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(y.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},Ie=(e,t={})=>{const i=Ce(Ee(e),t),s=ae(i.representationInfo);return X({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},Le=e=>ke(Ee(e))},"848b":function(e,t,i){"use strict";var s=i("4a0c"),n={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){n[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));var r={},a=s.version.split(".");function o(e,t){for(var i=t?t.split("."):a,s=e.split("."),n=0;n<3;n++){if(i[n]>s[n])return!0;if(i[n]<s[n])return!1}return!1}function l(e,t,i){if("object"!==typeof e)throw new TypeError("options must be an object");var s=Object.keys(e),n=s.length;while(n-- >0){var r=s[n],a=t[r];if(a){var o=e[r],l=void 0===o||a(o,r,e);if(!0!==l)throw new TypeError("option "+r+" must be "+l)}else if(!0!==i)throw Error("Unknown option "+r)}}n.transitional=function(e,t,i){var n=t&&o(t);function a(e,t){return"[Axios v"+s.version+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return function(i,s,o){if(!1===e)throw new Error(a(s," has been removed in "+t));return n&&!r[s]&&(r[s]=!0,console.warn(a(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,s,o)}},e.exports={isOlderVersion:o,assertOptions:l,validators:n}},"861d":function(e,t,i){"use strict";var s=i("1626");e.exports=function(e){return"object"==typeof e?null!==e:s(e)}},"88f3":function(e,t,i){},8925:function(e,t,i){"use strict";var s=i("e330"),n=i("1626"),r=i("c6cd"),a=s(Function.toString);n(r.inspectSource)||(r.inspectSource=function(e){return a(e)}),e.exports=r.inspectSource},"89a7":function(e,t,i){"use strict";function s(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"===typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}}function n(e,t){return void 0===t&&(t=Object),t&&"function"===typeof t.freeze?t.freeze(e):e}function r(e,t){if(null===e||"object"!==typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}var a=n({HTML:"text/html",isHTML:function(e){return e===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===o.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=r,t.find=s,t.freeze=n,t.MIME_TYPE=a,t.NAMESPACE=o},"8a8a":function(e,t,i){"use strict";i("29a7")},"8b3d":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAC55JREFUeF7tnXuzFcUVR2c+WL5VPgAEIhGfiSUEgkIgRIyUEggGAoKgVDQmGBAKhED5SighUBAIFKghbv1NeXmce2bmdE/v7l791626Pbt3rz2rus+cOTNtQ4MABGYSaGEDAQjMJoAgnB0QWIYAgnB6QABBOAcgMI4AK8g4bhxVCQEEqaTQTHMcAQQZx42jKiGAIJUUmmmOI4Ag47hxVCUEEKSSQjPNcQSCCXL//v0dTdOsbNv2zLhUOAoC/giEFORo0zQ/appmjUS562+6ZASBYQRiCGIZfCFJNg1Lh94Q8EUgliDdLG1VsW3XIV/TJhsI9CMQW5Auiy3f/rGibdtP+6VFLwj4IDCVIDbbb7SarPIxdbKAwHwCUwrSZXNeomyfnx49IJCWQApBuhnv17brvbQIGB0CswmkFKTLar1EuUyhIOCNgAdBjMktSfKMN0DkUzcBL4J0VTgpUd6ouyzM3gsBb4J0XHZJlBNeQJFHnQS8CtJVw7Zc9kXjzTrLw6xTE/AuiPG5otVkXWpYjF8fgRwE6apil4NtNdlXX5mYcSoCOQnSMfqtRDmXChrj1kMgR0G66qzW1stuYaFBIAqBnAUxIHbzo227NkehQ9DqCeQuSFfAwxLlSPUVBUBQAqUI0kF5Sdsu+8EWDQILEyhNEANyT6vJEwvTIUD1BEoUpCvqWa0mr1ZfZQCMJlCyIB2UNyXKB6MpcWC1BGoQpCvuC9p6Xa222kx8MIGaBDE4N7SaPD+YFAdUSaA2QboifyhRdldZdSbdm0CtgnSAdmrbdao3MTpWRaB2Qbpir5Uot6uqPpOdSwBBfkB0SZJsmEuNDtUQQJBHS31Mohyo5ixgojMJIMjsk2ObRLnA+VMvAQSZX3u7W3jF/G70KJEAgvSr6kWtJlv7dadXKQQQZFglD+r7E/ucQquAAIKMK/JGiWJXvmgFE0CQ8cW9I0nsOxRaoQQQZPHCnpYo9q08rTACCBKuoHskyvFwIYmUmgCChK+A3Slsl4avhw9NxKkJIEgc4te0mthvUGgZE0CQuMWzXzHaarI37jBEj0UAQWKRfTCu/S7eRDkzzXCMEooAgoQi2S/OGolyt193eqUmgCDTV8Ce2WWryabph2bEoQQQZCixcP2PSpRD4UISKTQBBAlNdHi8LbriZc8ZpjkjgCA+CmJPqLdt1yof6ZBFRwBBfJ0L57Wa2DtQaA4IIIiDIjwmhf0Sxd6qRUtIAEESwu8x9HqJcrlHX7pEIIAgEaAGDnlLktgbf2kTE0CQiYEvMNxJifLGAjE4dCABBBkIzEF3E8SueJ1wkEvxKSBIviW2LZeJcjPfKfjPHEH812i5DK9o27Uu72n4zR5B/NZmSGZ2OdhWk31DDqLvfAIIMp9RTj3sC0YT5VxOSXvOFUE8V2d8bqu19bJbWGgLEECQBeA5P9RufrTVZLPzPF2nhyCuyxMkucNaTez2etpAAggyEFjG3V+SKPaDLVpPAgjSE1Qh3e5p2/VEIfOJPg0EiY7Y5QBntZrYwyRoyxBAkLpPjzclij2eiPYYAgjCaWEE7AF3dsXrKjgeJIAgnBEdgRtaTezRqTQRQBBOhYcJfChRdoOmaRCEs2AWAXudg227TtWMCEFqrn6/udsLgkyU2/26l9ULQcqqZ6zZ2KvmTJINsQbwGhdBvFbGZ1728lIT5YDP9MJnhSDhmdYQcZs+yNvrsYtuCFJ0eaNPzlaTFdFHSTgAgiSEX8jQtoqYKFsLmc8D00CQEquaZk4Hte2yzynFNAQpppRuJrJRotiVr+wbgmRfQpcTuCNJ7DuUrBuCZF0+98mflij2rXyWDUGyLFt2Se+RKMdzyxxBcqtY3vnancJ2xet6LtNAkFwqVU6e17Sa2G9Q3DcEcV+iYhO0XzHaarLX8wwRxHN16sjNfhdvopzxOF0E8ViVOnNao62XPXnFTUMQN6UgkaZp7Jldtpps8kIDQbxUgjyWErCnQJooh1JjQZDUFWD85Qhs0bbLnjOcpCFIEuwMOoCAPaHeVpNVA44J1hVBgqEkUGQC57Wa2DtQJmsIMhlqBgpEYL9EsbdqRW8IEh0xA0QisF6iXI4U/7uwCBKTLrFjE7glSeyNv1EagkTBStCJCZyUKPYO+aANQYLiJFhiAiaIXfE6ESoPBAlFkjieCDzTtu2PQySEICEoEsMLgY+11doRKiEECUWSOCkJfCUxgr9aDkFSlpWxQxB4WXJ8HiLYwzEQJAZVYk5B4G2JcSTmYAgSky6xYxD4TGJsjhGcFWQKqowRi8BqXcb9OtYACDIVWcYJSeAVrRrnQgbtE4stVh9K9ElF4H2JsS9VAgiSijzjLkfgisRYlxoTgqSuAOM/TOBZyXHTAxoE8VAFcjACuyRGsPuoQmBFkBAUibEIgWh34i6SVHcsgoSgSIwxBOy3HHbn7dNjDp7qGASZijTjLCUwya8BQyBHkBAUidGXwKS/J++b1HL9ECQERWLMI2BPJLHt1PZ5Hb39H0G8VaSsfJI+0yoESgQJQZEYjyOQ/KmIIcqCICEoEmMpATfP1Q1RFgQJQZEYRsDdk9lDlAVBQlAkhst3e4QoC4KEoFhvDHs71Iq2bc+WigBBSq1s3Hll8X7BEAgQJATFemJc1fcZWbyhNkRZECQExTpi2DvObTt1o47pfj9LBKmp2uPmulurxvFxh+d9FILkXb+Y2Z+SGDtjDuI9NoJ4r9D0+d2WGGunH9rfiAjiryYpM9ogOS6lTMLT2AjiqRrpcjkgMY6lS8HnyAjisy5TZXVBYmybasDcxkGQ3CoWJt/7EmNlmHDlRkGQcms7a2ZbJcfF+qY+fMYIMpxZrke8KzEO5jqBFHkjSArq0475L4mxcdphyxgNQcqo46xZPCk57pQ9zXizQ5B4bFNGfk1inE6ZRAljI0gJVfxhDn+TGHvKmla62SBIOvYhR77+bTC70/bnIYMSi7t5SzgHfqFV41oJk/E2B1YQbxXpn88fJMZf+x9Cz6EEEGQosfT9z2g79bv0qZSfAYLkU+O7EuNn+aScf6YIkkcNf6Xt1D/zSLecLBHEdy3fkhjv+E6z3OwQxGdtP9F26tc+06snKwTxV+ufaNX4n7/U6ssIQfzU/DcS4x9+UiITBEl/DvxZ26k/pU+FDB4mgCDpzokvJcYv06XAyPMIIMg8QnH+/5S2U/+NE56ooQggSCiS/eK8rlXjo37d6ZWaAIJMU4G/S4zfTzMco4QigCChSD4+zn8kxnNxhyF6LAIIEots07woOf4dbwgixyaAIOEJ/1Fi/CV8aCJOTQBBwhH/WGLsCBeSSKkJIMjiFfhKl2x/ungoIngjgCCLVeRlrRqfLxaGo70SQJBxlXlbYhwZdzhH5UIAQYZV6jOJsXnYYfTOlQCC9K+cfcawR+t83f8QeuZOAEHmV/AViXFufld6lEYAQWZX9H2Jsa+0ojOf/gQQ5FFWV3TZ1r4Jp1VOAEEePAGe1apxs/LzgumLAIJ8D2KXxDjBmQGBpQRqF+SktlP2Ow0aBB4hUKsgtyTG05wTEFiOQI2CrNd26jKnBgTmEahJkP0S4715UPg/BDoCNQhyXtup7ZQdAkMJlCzINxJj1VAo9IdA6SvIFm2nPqXUEFiEQGkryFGJcXgRKBwLgdJWkC+0ndpEaSEQkkAJK8garRr3QoIhFgSMQM6CvCoxzlJKCMQikKMgH2g7tTcWFOJCIMfPIFclxguUDwJTEchlBXle26kbU4FhHAjk8Blkt1aN45QLAikIeF1BTkmMnSmgMCYEvH4GuaOt1FpKBAEPBDytIBu0alzyAIYcIODlM8gBiXGMkkDAG4GUK8gFibHNGxTygUDqzyD2hMKVlAEC3glMvYJs1apx0TsY8oPAlJ9B3pUYB8EOgZwIxF5B7IqUbac25gSFXCEwxWeQJ7Vq2HcbNAhkSSDGCvKaxDidJRGShsASAqEFeapt2z0QhkApBP4Pc/5pBSHcYZoAAAAASUVORK5CYII="},"8b53":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var s=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,n=/^application\/dash\+xml/i,r=function(e){return s.test(e)?"hls":n.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},"8c00":function(e,t,i){"use strict";var s=i("be09"),n=function(e,t){return void 0===t&&(t=!1),function(i,n,a){if(i)e(i);else if(n.statusCode>=400&&n.statusCode<=599){var o=a;if(t)if(s.TextDecoder){var l=r(n.headers&&n.headers["content-type"]);try{o=new TextDecoder(l).decode(a)}catch(d){}}else o=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:o})}else e(null,a)}};function r(e){return void 0===e&&(e=""),e.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),s=i[0],n=i[1];return"charset"===s.trim()?n.trim():e}),"utf-8")}e.exports=n},"8c10":function(e,t){function i(e,t){var i,s=null;try{i=JSON.parse(e,t)}catch(n){s=n}return[s,i]}e.exports=i},"8df4":function(e,t,i){"use strict";var s=i("7a77");function n(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var i=this;e((function(e){i.reason||(i.reason=new s(e),t(i.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e,t=new n((function(t){e=t}));return{token:t,cancel:e}},e.exports=n},"90e3":function(e,t,i){"use strict";var s=i("e330"),n=0,r=Math.random(),a=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++n+r,36)}},9112:function(e,t,i){"use strict";var s=i("83ab"),n=i("9bf2"),r=i("5c6c");e.exports=s?function(e,t,i){return n.f(e,t,r(1,i))}:function(e,t,i){return e[t]=i,e}},9152:function(e,t){
9
+ var a=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var i=e.indexOf(":"),s=e.slice(0,i).trim().toLowerCase(),n=e.slice(i+1).trim();"undefined"===typeof t[s]?t[s]=n:Array.isArray(t[s])?t[s].push(n):t[s]=[t[s],n]})),t):t};function o(e,t){for(var i=0;i<e.length;i++)t(e[i])}function l(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function d(e,t,i){var s=e;return r(t)?(i=t,"string"===typeof e&&(s={uri:e})):s=n({},t,{uri:e}),s.callback=i,s}function u(e,t,i){return t=d(e,t,i),c(t)}function c(e){if("undefined"===typeof e.callback)throw new Error("callback argument missing");var t=!1,i=function(i,s,n){t||(t=!0,e.callback(i,s,n))};function s(){4===p.readyState&&setTimeout(o,0)}function n(){var e=void 0;if(e=p.response?p.response:p.responseText||h(p),_)try{e=JSON.parse(e)}catch(t){}return e}function r(e){return clearTimeout(f),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,i(e,T)}function o(){if(!c){var t;clearTimeout(f),t=e.useXDR&&void 0===p.status?200:1223===p.status?204:p.status;var s=T,r=null;return 0!==t?(s={body:n(),statusCode:t,method:g,headers:{},url:m,rawRequest:p},p.getAllResponseHeaders&&(s.headers=a(p.getAllResponseHeaders()))):r=new Error("Internal XMLHttpRequest Error"),i(r,s,s.body)}}var d,c,p=e.xhr||null;p||(p=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var f,m=p.url=e.uri||e.url,g=p.method=e.method||"GET",y=e.body||e.data,v=p.headers=e.headers||{},b=!!e.sync,_=!1,T={body:void 0,headers:{},statusCode:0,method:g,url:m,rawRequest:p};if("json"in e&&!1!==e.json&&(_=!0,v["accept"]||v["Accept"]||(v["Accept"]="application/json"),"GET"!==g&&"HEAD"!==g&&(v["content-type"]||v["Content-Type"]||(v["Content-Type"]="application/json"),y=JSON.stringify(!0===e.json?y:e.json))),p.onreadystatechange=s,p.onload=o,p.onerror=r,p.onprogress=function(){},p.onabort=function(){c=!0},p.ontimeout=r,p.open(g,m,!b,e.username,e.password),b||(p.withCredentials=!!e.withCredentials),!b&&e.timeout>0&&(f=setTimeout((function(){if(!c){c=!0,p.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}}),e.timeout)),p.setRequestHeader)for(d in v)v.hasOwnProperty(d)&&p.setRequestHeader(d,v[d]);else if(e.headers&&!l(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&"function"===typeof e.beforeSend&&e.beforeSend(p),p.send(y||null),p}function h(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(i){}return null}function p(){}e.exports=u,e.exports.default=u,u.XMLHttpRequest=s.XMLHttpRequest||p,u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:s.XDomainRequest,o(["get","put","post","patch","head","delete"],(function(e){u["delete"===e?"del":e]=function(t,i,s){return i=d(t,i,s),i.method=e.toUpperCase(),c(i)}}))},"36c6":function(e,t){var i,s,n,r,a,o,l,d=9e4;i=function(e){return e*d},s=function(e,t){return e*t},n=function(e){return e/d},r=function(e,t){return e/t},a=function(e,t){return i(r(e,t))},o=function(e,t){return s(n(e),t)},l=function(e,t,i){return n(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:d,secondsToVideoTs:i,secondsToAudioTs:s,videoTsToSeconds:n,audioTsToSeconds:r,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l}},"387f":function(e,t,i){"use strict";e.exports=function(e,t,i,s,n){return e.config=t,i&&(e.code=i),e.request=s,e.response=n,e.isAxiosError=!0,e.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}},e}},3934:function(e,t,i){"use strict";var s=i("c532");e.exports=s.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(e){var s=e;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=n(window.location.href),function(t){var i=s.isString(t)?n(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},"3a34":function(e,t,i){"use strict";var s=i("83ab"),n=i("e8b5"),r=TypeError,a=Object.getOwnPropertyDescriptor,o=s&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=o?function(e,t){if(n(e)&&!a(e,"length").writable)throw new r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},"3a9b":function(e,t,i){"use strict";var s=i("e330");e.exports=s({}.isPrototypeOf)},"3e8c":function(e,t,i){"use strict";i("5156")},"40d5":function(e,t,i){"use strict";var s=i("d039");e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},4362:function(e,t,i){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,s="/";t.cwd=function(){return s},t.chdir=function(t){e||(e=i("df7c")),s=e.resolve(t,s)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"44ad":function(e,t,i){"use strict";var s=i("e330"),n=i("d039"),r=i("c6b6"),a=Object,o=s("".split);e.exports=n((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===r(e)?o(e,""):a(e)}:a},"467f":function(e,t,i){"use strict";var s=i("2d83");e.exports=function(e,t,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(s("Request failed with status code "+i.status,i.config,null,i.request,i)):e(i)}},"485a":function(e,t,i){"use strict";var s=i("c65b"),n=i("1626"),r=i("861d"),a=TypeError;e.exports=function(e,t){var i,o;if("string"===t&&n(i=e.toString)&&!r(o=s(i,e)))return o;if(n(i=e.valueOf)&&!r(o=s(i,e)))return o;if("string"!==t&&n(i=e.toString)&&!r(o=s(i,e)))return o;throw new a("Can't convert object to primitive value")}},"4a0c":function(e){e.exports=JSON.parse('{"_args":[["axios@0.21.4","D:\\\\后台\\\\装修 dg\\\\front-eshop-cms2.0"]],"_from":"axios@0.21.4","_id":"axios@0.21.4","_inBundle":false,"_integrity":"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.4","name":"axios","escapedName":"axios","rawSpec":"0.21.4","saveSpec":null,"fetchSpec":"0.21.4"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz","_spec":"0.21.4","_where":"D:\\\\后台\\\\装修 dg\\\\front-eshop-cms2.0","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.14.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"homepage":"https://axios-http.com","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.4"}')},"4a7b":function(e,t,i){"use strict";var s=i("c532");e.exports=function(e,t){t=t||{};var i={},n=["url","method","data"],r=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function l(e,t){return s.isPlainObject(e)&&s.isPlainObject(t)?s.merge(e,t):s.isPlainObject(t)?s.merge({},t):s.isArray(t)?t.slice():t}function d(n){s.isUndefined(t[n])?s.isUndefined(e[n])||(i[n]=l(void 0,e[n])):i[n]=l(e[n],t[n])}s.forEach(n,(function(e){s.isUndefined(t[e])||(i[e]=l(void 0,t[e]))})),s.forEach(r,d),s.forEach(a,(function(n){s.isUndefined(t[n])?s.isUndefined(e[n])||(i[n]=l(void 0,e[n])):i[n]=l(void 0,t[n])})),s.forEach(o,(function(s){s in t?i[s]=l(e[s],t[s]):s in e&&(i[s]=l(void 0,e[s]))}));var u=n.concat(r).concat(a).concat(o),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return s.forEach(c,d),i}},"4d64":function(e,t,i){"use strict";var s=i("fc6a"),n=i("23cb"),r=i("07fa"),a=function(e){return function(t,i,a){var o,l=s(t),d=r(l),u=n(a,d);if(e&&i!==i){while(d>u)if(o=l[u++],o!==o)return!0}else for(;d>u;u++)if((e||u in l)&&l[u]===i)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4e9a":function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a}));var s=i("be09"),n=i.n(s),r=function(t){return n.a.atob?n.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=r(e),i=new Uint8Array(t.length),s=0;s<t.length;s++)i[s]=t.charCodeAt(s);return i}}).call(this,i("b639").Buffer)},"50c4":function(e,t,i){"use strict";var s=i("5926"),n=Math.min;e.exports=function(e){var t=s(e);return t>0?n(t,9007199254740991):0}},5156:function(e,t,i){},5270:function(e,t,i){"use strict";var s=i("c532"),n=i("c401"),r=i("2e67"),a=i("2444");function o(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){o(e),e.headers=e.headers||{},e.data=n.call(e,e.data,e.headers,e.transformRequest),e.headers=s.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),s.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||a.adapter;return t(e).then((function(t){return o(e),t.data=n.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return r(t)||(o(e),t&&t.response&&(t.response.data=n.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},5692:function(e,t,i){"use strict";var s=i("c430"),n=i("c6cd");(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.1",mode:s?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(e,t,i){"use strict";var s=i("d066"),n=i("e330"),r=i("241c"),a=i("7418"),o=i("825a"),l=n([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(o(e)),i=a.f;return i?l(t,i(e)):t}},5926:function(e,t,i){"use strict";var s=i("b42e");e.exports=function(e){var t=+e;return t!==t||0===t?0:s(t)}},"59ed":function(e,t,i){"use strict";var s=i("1626"),n=i("0d51"),r=TypeError;e.exports=function(e){if(s(e))return e;throw new r(n(e)+" is not a function")}},"5c6c":function(e,t,i){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5e77":function(e,t,i){"use strict";var s=i("83ab"),n=i("1a2d"),r=Function.prototype,a=s&&Object.getOwnPropertyDescriptor,o=n(r,"name"),l=o&&"something"===function(){}.name,d=o&&(!s||s&&a(r,"name").configurable);e.exports={EXISTS:o,PROPER:l,CONFIGURABLE:d}},"5f02":function(e,t,i){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},"605d":function(e,t,i){"use strict";var s=i("da84"),n=i("c6b6");e.exports="process"===n(s.process)},6330:function(e,t,i){},6374:function(e,t,i){"use strict";var s=i("da84"),n=Object.defineProperty;e.exports=function(e,t){try{n(s,e,{value:t,configurable:!0,writable:!0})}catch(i){s[e]=t}return t}},"63ec":function(e,t,i){"use strict";var s=i("d136"),n=i.n(s),r=i("be09"),a=i.n(r),o="http://example.com",l=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var i="function"===typeof a.a.URL,s=/^\/\//.test(e),r=!a.a.location&&!/\/\//i.test(e);if(i?e=new a.a.URL(e,a.a.location||o):/\/\//i.test(e)||(e=n.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),i){var l=new URL(t,e);return r?l.href.slice(o.length):s?l.href.slice(l.protocol.length):l.href}return n.a.buildAbsoluteURL(e,t)};t["a"]=l},6814:function(e,t,i){"use strict";i("ae9f")},"69bf":function(e,t,i){},"69f3":function(e,t,i){"use strict";var s,n,r,a=i("cdce"),o=i("da84"),l=i("861d"),d=i("9112"),u=i("1a2d"),c=i("c6cd"),h=i("f772"),p=i("d012"),f="Object already initialized",m=o.TypeError,g=o.WeakMap,y=function(e){return r(e)?n(e):s(e,{})},v=function(e){return function(t){var i;if(!l(t)||(i=n(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return i}};if(a||c.state){var b=c.state||(c.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,s=function(e,t){if(b.has(e))throw new m(f);return t.facade=e,b.set(e,t),t},n=function(e){return b.get(e)||{}},r=function(e){return b.has(e)}}else{var _=h("state");p[_]=!0,s=function(e,t){if(u(e,_))throw new m(f);return t.facade=e,d(e,_,t),t},n=function(e){return u(e,_)?e[_]:{}},r=function(e){return u(e,_)}}e.exports={set:s,get:n,has:r,enforce:y,getterFor:v}},"6e0d":function(e,t,i){"use strict";i("843d")},7234:function(e,t,i){"use strict";e.exports=function(e){return null===e||void 0===e}},7418:function(e,t,i){"use strict";t.f=Object.getOwnPropertySymbols},"77ed":function(e,t,i){},7839:function(e,t,i){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7a77":function(e,t,i){"use strict";function s(e){this.message=e}s.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},s.prototype.__CANCEL__=!0,e.exports=s},"7aac":function(e,t,i){"use strict";var s=i("c532");e.exports=s.isStandardBrowserEnv()?function(){return{write:function(e,t,i,n,r,a){var o=[];o.push(e+"="+encodeURIComponent(t)),s.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),s.isString(n)&&o.push("path="+n),s.isString(r)&&o.push("domain="+r),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},"7b0b":function(e,t,i){"use strict";var s=i("1d80"),n=Object;e.exports=function(e){return n(s(e))}},"7ba5":function(e,t,i){"use strict";i("818d")},"818d":function(e,t,i){},"81c0":function(e,t,i){var s=i("a968").getUint64,n=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=s(e.subarray(n)),i.firstOffset=s(e.subarray(n+8)),n+=16),n+=2;var r=t.getUint16(n);for(n+=2;r>0;n+=12,r--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i};e.exports=n},"825a":function(e,t,i){"use strict";var s=i("861d"),n=String,r=TypeError;e.exports=function(e){if(s(e))return e;throw new r(n(e)+" is not an object")}},"82e5":function(e,t,i){"use strict";i("fbac")},8362:function(e,t){e.exports=s;var i=Object.prototype.toString;function s(e){if(!e)return!1;var t=i.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}},"83ab":function(e,t,i){"use strict";var s=i("d039");e.exports=!s((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83b9":function(e,t,i){"use strict";var s=i("d925"),n=i("e683");e.exports=function(e,t){return e&&!s(t)?n(e,t):t}},"843d":function(e,t,i){},8484:function(e,t,i){"use strict";i.d(t,"a",(function(){return C})),i.d(t,"b",(function(){return N})),i.d(t,"c",(function(){return Ie})),i.d(t,"d",(function(){return Le}));var s=i("63ec"),n=i("be09"),r=i.n(n),a=function(e,t,i){t.forEach((function(t){for(var s in e.mediaGroups[t])for(var n in e.mediaGroups[t][s]){var r=e.mediaGroups[t][s][n];i(r,t,s,n)}}))},o=i("ffdf"),l=i("210b");const d=e=>!!e&&"object"===typeof e,u=(...e)=>e.reduce((e,t)=>("object"!==typeof t||Object.keys(t).forEach(i=>{Array.isArray(e[i])&&Array.isArray(t[i])?e[i]=e[i].concat(t[i]):d(e[i])&&d(t[i])?e[i]=u(e[i],t[i]):e[i]=t[i]}),e),{}),c=e=>Object.keys(e).map(t=>e[t]),h=(e,t)=>{const i=[];for(let s=e;s<t;s++)i.push(s);return i},p=e=>e.reduce((e,t)=>e.concat(t),[]),f=e=>{if(!e.length)return[];const t=[];for(let i=0;i<e.length;i++)t.push(e[i]);return t},m=(e,t)=>e.reduce((e,i,s)=>(i[t]&&e.push(s),e),[]),g=(e,t)=>c(e.reduce((e,i)=>(i.forEach(i=>{e[t(i)]=i}),e),{}));var y={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const v=({baseUrl:e="",source:t="",range:i="",indexRange:n=""})=>{const a={uri:t,resolvedUri:Object(s["a"])(e||"",t)};if(i||n){const e=i||n,t=e.split("-");let s,o=r.a.BigInt?r.a.BigInt(t[0]):parseInt(t[0],10),l=r.a.BigInt?r.a.BigInt(t[1]):parseInt(t[1],10);o<Number.MAX_SAFE_INTEGER&&"bigint"===typeof o&&(o=Number(o)),l<Number.MAX_SAFE_INTEGER&&"bigint"===typeof l&&(l=Number(l)),s="bigint"===typeof l||"bigint"===typeof o?r.a.BigInt(l)-r.a.BigInt(o)+r.a.BigInt(1):l-o+1,"bigint"===typeof s&&s<Number.MAX_SAFE_INTEGER&&(s=Number(s)),a.byterange={length:s,offset:o}}return a},b=e=>{let t;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?r.a.BigInt(e.offset)+r.a.BigInt(e.length)-r.a.BigInt(1):e.offset+e.length-1,`${e.offset}-${t}`},_=e=>(e&&"number"!==typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e),T={static(e){const{duration:t,timescale:i=1,sourceDuration:s,periodDuration:n}=e,r=_(e.endNumber),a=t/i;return"number"===typeof r?{start:0,end:r}:"number"===typeof n?{start:0,end:n/a}:{start:0,end:s/a}},dynamic(e){const{NOW:t,clientOffset:i,availabilityStartTime:s,timescale:n=1,duration:r,periodStart:a=0,minimumUpdatePeriod:o=0,timeShiftBufferDepth:l=1/0}=e,d=_(e.endNumber),u=(t+i)/1e3,c=s+a,h=u+o,p=h-c,f=Math.ceil(p*n/r),m=Math.floor((u-c-l)*n/r),g=Math.floor((u-c)*n/r);return{start:Math.max(0,m),end:"number"===typeof d?d:Math.min(f,g)}}},S=e=>t=>{const{duration:i,timescale:s=1,periodStart:n,startNumber:r=1}=e;return{number:r+t,duration:i/s,timeline:n,time:t*i}},w=e=>{const{type:t,duration:i,timescale:s=1,periodDuration:n,sourceDuration:r}=e,{start:a,end:o}=T[t](e),l=h(a,o).map(S(e));if("static"===t){const e=l.length-1,t="number"===typeof n?n:r;l[e].duration=t-i/s*e}return l},x=e=>{const{baseUrl:t,initialization:i={},sourceDuration:s,indexRange:n="",periodStart:r,presentationTime:a,number:o=0,duration:l}=e;if(!t)throw new Error(y.NO_BASE_URL);const d=v({baseUrl:t,source:i.sourceURL,range:i.range}),u=v({baseUrl:t,source:t,indexRange:n});if(u.map=d,l){const t=w(e);t.length&&(u.duration=t[0].duration,u.timeline=t[0].timeline)}else s&&(u.duration=s,u.timeline=r);return u.presentationTime=a||r,u.number=o,[u]},C=(e,t,i)=>{const s=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,a=e.timeline||0,o=e.sidx.byterange,l=o.offset+o.length,d=t.timescale,u=t.references.filter(e=>1!==e.referenceType),c=[],h=e.endList?"static":"dynamic",p=e.sidx.timeline;let f,m=p,g=e.mediaSequence||0;f="bigint"===typeof t.firstOffset?r.a.BigInt(l)+t.firstOffset:l+t.firstOffset;for(let y=0;y<u.length;y++){const e=t.references[y],o=e.referencedSize,l=e.subsegmentDuration;let u;u="bigint"===typeof f?f+r.a.BigInt(o)-r.a.BigInt(1):f+o-1;const v=`${f}-${u}`,b={baseUrl:i,timescale:d,timeline:a,periodStart:p,presentationTime:m,number:g,duration:l,sourceDuration:n,indexRange:v,type:h},_=x(b)[0];s&&(_.map=s),c.push(_),f+="bigint"===typeof f?r.a.BigInt(o):o,m+=l/d,g++}return e.segments=c,e},E=["AUDIO","SUBTITLES"],k=1/60,I=e=>g(e,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),L=(e,t)=>{for(let i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null},P=e=>{let t=[];return a(e,E,(e,i,s,n)=>{t=t.concat(e.playlists||[])}),t},O=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((t,i)=>{t.number=e.mediaSequence+i})},A=({oldPlaylists:e,newPlaylists:t,timelineStarts:i})=>{t.forEach(t=>{t.discontinuitySequence=i.findIndex((function({timeline:e}){return e===t.timeline}));const s=L(e,t.attributes.NAME);if(!s)return;if(t.sidx)return;const n=t.segments[0],r=s.segments.findIndex((function(e){return Math.abs(e.presentationTime-n.presentationTime)<k}));if(-1===r)return O({playlist:t,mediaSequence:s.mediaSequence+s.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),void((!s.segments.length&&t.timeline>s.timeline||s.segments.length&&t.timeline>s.segments[s.segments.length-1].timeline)&&t.discontinuitySequence--);const a=s.segments[r];a.discontinuity&&!n.discontinuity&&(n.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),O({playlist:t,mediaSequence:s.segments[r].number})})},D=({oldManifest:e,newManifest:t})=>{const i=e.playlists.concat(P(e)),s=t.playlists.concat(P(t));return t.timelineStarts=I([e.timelineStarts,t.timelineStarts]),A({oldPlaylists:i,newPlaylists:s,timelineStarts:t.timelineStarts}),t},N=e=>e&&e.uri+"-"+b(e.byterange),M=e=>{const t=e.reduce((function(e,t){return e[t.attributes.baseUrl]||(e[t.attributes.baseUrl]=[]),e[t.attributes.baseUrl].push(t),e}),{});let i=[];return Object.values(t).forEach(e=>{const t=c(e.reduce((e,t)=>{const i=t.attributes.id+(t.attributes.lang||"");return e[i]?(t.segments&&(t.segments[0]&&(t.segments[0].discontinuity=!0),e[i].segments.push(...t.segments)),t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)):(e[i]=t,e[i].attributes.timelineStarts=[]),e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{}));i=i.concat(t)}),i.map(e=>(e.discontinuityStarts=m(e.segments||[],"discontinuity"),e))},R=(e,t)=>{const i=N(e.sidx),s=i&&t[i]&&t[i].sidx;return s&&C(e,s,e.sidx.resolvedUri),e},U=(e,t={})=>{if(!Object.keys(t).length)return e;for(const i in e)e[i]=R(e[i],t);return e},B=({attributes:e,segments:t,sidx:i,mediaSequence:s,discontinuitySequence:n,discontinuityStarts:r},a)=>{const o={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:r,timelineStarts:e.timelineStarts,mediaSequence:s,segments:t};return e.contentProtection&&(o.contentProtection=e.contentProtection),e.serviceLocation&&(o.attributes.serviceLocation=e.serviceLocation),i&&(o.sidx=i),a&&(o.attributes.AUDIO="audio",o.attributes.SUBTITLES="subs"),o},j=({attributes:e,segments:t,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:n})=>{"undefined"===typeof t&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);const r={NAME:e.id,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1};e.codecs&&(r.CODECS=e.codecs);const a={attributes:r,uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:s,discontinuitySequence:n,mediaSequence:i,segments:t};return e.serviceLocation&&(a.attributes.serviceLocation=e.serviceLocation),a},F=(e,t={},i=!1)=>{let s;const n=e.reduce((e,n)=>{const r=n.attributes.role&&n.attributes.role.value||"",a=n.attributes.lang||"";let o=n.attributes.label||"main";if(a&&!n.attributes.label){const e=r?` (${r})`:"";o=`${n.attributes.lang}${e}`}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===r,playlists:[],uri:""});const l=R(B(n,i),t);return e[o].playlists.push(l),"undefined"===typeof s&&"main"===r&&(s=n,s.default=!0),e},{});if(!s){const e=Object.keys(n)[0];n[e].default=!0}return n},q=(e,t={})=>e.reduce((e,i)=>{const s=i.attributes.label||i.attributes.lang||"text";return e[s]||(e[s]={language:s,default:!1,autoselect:!1,playlists:[],uri:""}),e[s].playlists.push(R(j(i),t)),e},{}),$=e=>e.reduce((e,t)=>t?(t.forEach(t=>{const{channel:i,language:s}=t;e[s]={autoselect:!1,default:!1,instreamId:i,language:s},t.hasOwnProperty("aspectRatio")&&(e[s].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[s].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[s]["3D"]=t["3D"])}),e):e,{}),H=({attributes:e,segments:t,sidx:i,discontinuityStarts:s})=>{const n={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1},uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:s,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes["FRAME-RATE"]=e.frameRate),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),i&&(n.sidx=i),n},V=({attributes:e})=>"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType,z=({attributes:e})=>"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType,G=({attributes:e})=>"text/vtt"===e.mimeType||"text"===e.contentType,J=(e,t)=>{e.forEach(e=>{e.mediaSequence=0,e.discontinuitySequence=t.findIndex((function({timeline:t}){return t===e.timeline})),e.segments&&e.segments.forEach((e,t)=>{e.number=t})})},W=e=>e?Object.keys(e).reduce((t,i)=>{const s=e[i];return t.concat(s.playlists)},[]):[],X=({dashPlaylists:e,locations:t,contentSteering:i,sidxMapping:s={},previousManifest:n,eventStream:r})=>{if(!e.length)return{};const{sourceDuration:a,type:o,suggestedPresentationDelay:l,minimumUpdatePeriod:d}=e[0].attributes,u=M(e.filter(V)).map(H),c=M(e.filter(z)),h=M(e.filter(G)),p=e.map(e=>e.attributes.captionServices).filter(Boolean),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},["CLOSED-CAPTIONS"]:{},SUBTITLES:{}},uri:"",duration:a,playlists:U(u,s)};d>=0&&(f.minimumUpdatePeriod=1e3*d),t&&(f.locations=t),i&&(f.contentSteering=i),"dynamic"===o&&(f.suggestedPresentationDelay=l),r&&r.length>0&&(f.eventStream=r);const m=0===f.playlists.length,g=c.length?F(c,s,m):null,y=h.length?q(h,s):null,v=u.concat(W(g),W(y)),b=v.map(({timelineStarts:e})=>e);return f.timelineStarts=I(b),J(v,f.timelineStarts),g&&(f.mediaGroups.AUDIO.audio=g),y&&(f.mediaGroups.SUBTITLES.subs=y),p.length&&(f.mediaGroups["CLOSED-CAPTIONS"].cc=$(p)),n?D({oldManifest:n,newManifest:f}):f},Y=(e,t,i)=>{const{NOW:s,clientOffset:n,availabilityStartTime:r,timescale:a=1,periodStart:o=0,minimumUpdatePeriod:l=0}=e,d=(s+n)/1e3,u=r+o,c=d+l,h=c-u;return Math.ceil((h*a-t)/i)},K=(e,t)=>{const{type:i,minimumUpdatePeriod:s=0,media:n="",sourceDuration:r,timescale:a=1,startNumber:o=1,periodStart:l}=e,d=[];let u=-1;for(let c=0;c<t.length;c++){const h=t[c],p=h.d,f=h.r||0,m=h.t||0;let g;if(u<0&&(u=m),m&&m>u&&(u=m),f<0){const o=c+1;g=o===t.length?"dynamic"===i&&s>0&&n.indexOf("$Number$")>0?Y(e,u,p):(r*a-u)/p:(t[o].t-u)/p}else g=f+1;const y=o+d.length+g;let v=o+d.length;while(v<y)d.push({number:v,duration:p/a,time:u,timeline:l}),u+=p,v++}return d},Q=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Z=e=>(t,i,s,n)=>{if("$$"===t)return"$";if("undefined"===typeof e[i])return t;const r=""+e[i];return"RepresentationID"===i?r:(n=s?parseInt(n,10):1,r.length>=n?r:`${new Array(n-r.length+1).join("0")}${r}`)},ee=(e,t)=>e.replace(Q,Z(t)),te=(e,t)=>e.duration||t?e.duration?w(e):K(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}],ie=(e,t)=>{const i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=e,r=v({baseUrl:e.baseUrl,source:ee(n.sourceURL,i),range:n.range}),a=te(e,t);return a.map(t=>{i.Number=t.number,i.Time=t.time;const n=ee(e.media||"",i),a=e.timescale||1,o=e.presentationTimeOffset||0,l=e.periodStart+(t.time-o)/a,d={uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:Object(s["a"])(e.baseUrl||"",n),map:r,number:t.number,presentationTime:l};return d})},se=(e,t)=>{const{baseUrl:i,initialization:s={}}=e,n=v({baseUrl:i,source:s.sourceURL,range:s.range}),r=v({baseUrl:i,source:t.media,range:t.mediaRange});return r.map=n,r},ne=(e,t)=>{const{duration:i,segmentUrls:s=[],periodStart:n}=e;if(!i&&!t||i&&t)throw new Error(y.SEGMENT_TIME_UNSPECIFIED);const r=s.map(t=>se(e,t));let a;i&&(a=w(e)),t&&(a=K(e,t));const o=a.map((t,i)=>{if(r[i]){const s=r[i],a=e.timescale||1,o=e.presentationTimeOffset||0;return s.timeline=t.timeline,s.duration=t.duration,s.number=t.number,s.presentationTime=n+(t.time-o)/a,s}}).filter(e=>e);return o},re=({attributes:e,segmentInfo:t})=>{let i,s;t.template?(s=ie,i=u(e,t.template)):t.base?(s=x,i=u(e,t.base)):t.list&&(s=ne,i=u(e,t.list));const n={attributes:e};if(!s)return n;const r=s(i,t.segmentTimeline);if(i.duration){const{duration:e,timescale:t=1}=i;i.duration=e/t}else r.length?i.duration=r.reduce((e,t)=>Math.max(e,Math.ceil(t.duration)),0):i.duration=0;return n.attributes=i,n.segments=r,t.base&&i.indexRange&&(n.sidx=r[0],n.segments=[]),n},ae=e=>e.map(re),oe=(e,t)=>f(e.childNodes).filter(({tagName:e})=>e===t),le=e=>e.textContent.trim(),de=e=>parseFloat(e.split("/").reduce((e,t)=>e/t)),ue=e=>{const t=31536e3,i=2592e3,s=86400,n=3600,r=60,a=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,o=a.exec(e);if(!o)return 0;const[l,d,u,c,h,p]=o.slice(1);return parseFloat(l||0)*t+parseFloat(d||0)*i+parseFloat(u||0)*s+parseFloat(c||0)*n+parseFloat(h||0)*r+parseFloat(p||0)},ce=e=>{const t=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;return t.test(e)&&(e+="Z"),Date.parse(e)},he={mediaPresentationDuration(e){return ue(e)},availabilityStartTime(e){return ce(e)/1e3},minimumUpdatePeriod(e){return ue(e)},suggestedPresentationDelay(e){return ue(e)},type(e){return e},timeShiftBufferDepth(e){return ue(e)},start(e){return ue(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return de(e)},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){const t=parseInt(e,10);return isNaN(t)?ue(e):t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},DEFAULT(e){return e}},pe=e=>e&&e.attributes?f(e.attributes).reduce((e,t)=>{const i=he[t.name]||he.DEFAULT;return e[t.name]=i(t.value),e},{}):{},fe={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},me=(e,t)=>t.length?p(e.map((function(e){return t.map((function(t){const i=le(t),n=Object(s["a"])(e.baseUrl,i),r=u(pe(t),{baseUrl:n});return n!==i&&!r.serviceLocation&&e.serviceLocation&&(r.serviceLocation=e.serviceLocation),r}))}))):e,ge=e=>{const t=oe(e,"SegmentTemplate")[0],i=oe(e,"SegmentList")[0],s=i&&oe(i,"SegmentURL").map(e=>u({tag:"SegmentURL"},pe(e))),n=oe(e,"SegmentBase")[0],r=i||t,a=r&&oe(r,"SegmentTimeline")[0],o=i||n||t,l=o&&oe(o,"Initialization")[0],d=t&&pe(t);d&&l?d.initialization=l&&pe(l):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const c={template:d,segmentTimeline:a&&oe(a,"S").map(e=>pe(e)),list:i&&u(pe(i),{segmentUrls:s,initialization:pe(l)}),base:n&&u(pe(n),{initialization:pe(l)})};return Object.keys(c).forEach(e=>{c[e]||delete c[e]}),c},ye=(e,t,i)=>s=>{const n=oe(s,"BaseURL"),r=me(t,n),a=u(e,pe(s)),o=ge(s);return r.map(e=>({segmentInfo:u(i,o),attributes:u(a,e)}))},ve=e=>e.reduce((e,t)=>{const i=pe(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());const s=fe[i.schemeIdUri];if(s){e[s]={attributes:i};const n=oe(t,"cenc:pssh")[0];if(n){const t=le(n);e[s].pssh=t&&Object(o["a"])(t)}}return e},{}),be=e=>{if("urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{let t,i;return i=e,/^CC\d=/.test(e)?[t,i]=e.split("="):/^CC\d$/.test(e)&&(t=e),{channel:t,language:i}})}if("urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri){const t="string"!==typeof e.value?[]:e.value.split(";");return t.map(e=>{const t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){const[i,s=""]=e.split("=");t.channel=i,t.language=e,s.split(",").forEach(e=>{const[i,s]=e.split(":");"lang"===i?t.language=s:"er"===i?t.easyReader=Number(s):"war"===i?t.aspectRatio=Number(s):"3D"===i&&(t["3D"]=Number(s))})}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})}},_e=e=>p(oe(e.node,"EventStream").map(t=>{const i=pe(t),s=i.schemeIdUri;return oe(t,"Event").map(t=>{const n=pe(t),r=n.presentationTime||0,a=i.timescale||1,o=n.duration||0,l=r/a+e.attributes.start;return{schemeIdUri:s,value:i.value,id:n.id,start:l,end:l+o/a,messageData:le(t)||n.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),Te=(e,t,i)=>s=>{const n=pe(s),r=me(t,oe(s,"BaseURL")),a=oe(s,"Role")[0],o={role:pe(a)};let l=u(e,n,o);const d=oe(s,"Accessibility")[0],c=be(pe(d));c&&(l=u(l,{captionServices:c}));const h=oe(s,"Label")[0];if(h&&h.childNodes.length){const e=h.childNodes[0].nodeValue.trim();l=u(l,{label:e})}const f=ve(oe(s,"ContentProtection"));Object.keys(f).length&&(l=u(l,{contentProtection:f}));const m=ge(s),g=oe(s,"Representation"),y=u(i,m);return p(g.map(ye(l,r,y)))},Se=(e,t)=>(i,s)=>{const n=me(t,oe(i.node,"BaseURL")),r=u(e,{periodStart:i.attributes.start});"number"===typeof i.attributes.duration&&(r.periodDuration=i.attributes.duration);const a=oe(i.node,"AdaptationSet"),o=ge(i.node);return p(a.map(Te(r,n,o)))},we=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;const i=u({serverURL:le(e[0])},pe(e[0]));return i.queryBeforeStart="true"===i.queryBeforeStart,i},xe=({attributes:e,priorPeriodAttributes:t,mpdType:i})=>"number"===typeof e.start?e.start:t&&"number"===typeof t.start&&"number"===typeof t.duration?t.start+t.duration:t||"static"!==i?null:0,Ce=(e,t={})=>{const{manifestUri:i="",NOW:s=Date.now(),clientOffset:n=0,eventHandler:r=function(){}}=t,a=oe(e,"Period");if(!a.length)throw new Error(y.INVALID_NUMBER_OF_PERIOD);const o=oe(e,"Location"),l=pe(e),d=me([{baseUrl:i}],oe(e,"BaseURL")),u=oe(e,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=s,l.clientOffset=n,o.length&&(l.locations=o.map(le));const c=[];return a.forEach((e,t)=>{const i=pe(e),s=c[t-1];i.start=xe({attributes:i,priorPeriodAttributes:s?s.attributes:null,mpdType:l.type}),c.push({node:e,attributes:i})}),{locations:l.locations,contentSteeringInfo:we(u,r),representationInfo:p(c.map(Se(l,d))),eventStream:p(c.map(_e))}},Ee=e=>{if(""===e)throw new Error(y.DASH_EMPTY_MANIFEST);const t=new l["DOMParser"];let i,s;try{i=t.parseFromString(e,"application/xml"),s=i&&"MPD"===i.documentElement.tagName?i.documentElement:null}catch(n){}if(!s||s&&s.getElementsByTagName("parsererror").length>0)throw new Error(y.DASH_INVALID_XML);return s},ke=e=>{const t=oe(e,"UTCTiming")[0];if(!t)return null;const i=pe(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(y.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},Ie=(e,t={})=>{const i=Ce(Ee(e),t),s=ae(i.representationInfo);return X({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:i.eventStream})},Le=e=>ke(Ee(e))},"848b":function(e,t,i){"use strict";var s=i("4a0c"),n={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){n[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));var r={},a=s.version.split(".");function o(e,t){for(var i=t?t.split("."):a,s=e.split("."),n=0;n<3;n++){if(i[n]>s[n])return!0;if(i[n]<s[n])return!1}return!1}function l(e,t,i){if("object"!==typeof e)throw new TypeError("options must be an object");var s=Object.keys(e),n=s.length;while(n-- >0){var r=s[n],a=t[r];if(a){var o=e[r],l=void 0===o||a(o,r,e);if(!0!==l)throw new TypeError("option "+r+" must be "+l)}else if(!0!==i)throw Error("Unknown option "+r)}}n.transitional=function(e,t,i){var n=t&&o(t);function a(e,t){return"[Axios v"+s.version+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return function(i,s,o){if(!1===e)throw new Error(a(s," has been removed in "+t));return n&&!r[s]&&(r[s]=!0,console.warn(a(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,s,o)}},e.exports={isOlderVersion:o,assertOptions:l,validators:n}},"861d":function(e,t,i){"use strict";var s=i("1626");e.exports=function(e){return"object"==typeof e?null!==e:s(e)}},"88f3":function(e,t,i){},8925:function(e,t,i){"use strict";var s=i("e330"),n=i("1626"),r=i("c6cd"),a=s(Function.toString);n(r.inspectSource)||(r.inspectSource=function(e){return a(e)}),e.exports=r.inspectSource},"89a7":function(e,t,i){"use strict";function s(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"===typeof i.find)return i.find.call(e,t);for(var s=0;s<e.length;s++)if(Object.prototype.hasOwnProperty.call(e,s)){var n=e[s];if(t.call(void 0,n,s,e))return n}}function n(e,t){return void 0===t&&(t=Object),t&&"function"===typeof t.freeze?t.freeze(e):e}function r(e,t){if(null===e||"object"!==typeof e)throw new TypeError("target is not an object");for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}var a=n({HTML:"text/html",isHTML:function(e){return e===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===o.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=r,t.find=s,t.freeze=n,t.MIME_TYPE=a,t.NAMESPACE=o},"8a8a":function(e,t,i){"use strict";i("29a7")},"8b3d":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAC55JREFUeF7tnXuzFcUVR2c+WL5VPgAEIhGfiSUEgkIgRIyUEggGAoKgVDQmGBAKhED5SighUBAIFKghbv1NeXmce2bmdE/v7l791626Pbt3rz2rus+cOTNtQ4MABGYSaGEDAQjMJoAgnB0QWIYAgnB6QABBOAcgMI4AK8g4bhxVCQEEqaTQTHMcAQQZx42jKiGAIJUUmmmOI4Ag47hxVCUEEKSSQjPNcQSCCXL//v0dTdOsbNv2zLhUOAoC/giEFORo0zQ/appmjUS562+6ZASBYQRiCGIZfCFJNg1Lh94Q8EUgliDdLG1VsW3XIV/TJhsI9CMQW5Auiy3f/rGibdtP+6VFLwj4IDCVIDbbb7SarPIxdbKAwHwCUwrSZXNeomyfnx49IJCWQApBuhnv17brvbQIGB0CswmkFKTLar1EuUyhIOCNgAdBjMktSfKMN0DkUzcBL4J0VTgpUd6ouyzM3gsBb4J0XHZJlBNeQJFHnQS8CtJVw7Zc9kXjzTrLw6xTE/AuiPG5otVkXWpYjF8fgRwE6apil4NtNdlXX5mYcSoCOQnSMfqtRDmXChrj1kMgR0G66qzW1stuYaFBIAqBnAUxIHbzo227NkehQ9DqCeQuSFfAwxLlSPUVBUBQAqUI0kF5Sdsu+8EWDQILEyhNEANyT6vJEwvTIUD1BEoUpCvqWa0mr1ZfZQCMJlCyIB2UNyXKB6MpcWC1BGoQpCvuC9p6Xa222kx8MIGaBDE4N7SaPD+YFAdUSaA2QboifyhRdldZdSbdm0CtgnSAdmrbdao3MTpWRaB2Qbpir5Uot6uqPpOdSwBBfkB0SZJsmEuNDtUQQJBHS31Mohyo5ixgojMJIMjsk2ObRLnA+VMvAQSZX3u7W3jF/G70KJEAgvSr6kWtJlv7dadXKQQQZFglD+r7E/ucQquAAIKMK/JGiWJXvmgFE0CQ8cW9I0nsOxRaoQQQZPHCnpYo9q08rTACCBKuoHskyvFwIYmUmgCChK+A3Slsl4avhw9NxKkJIEgc4te0mthvUGgZE0CQuMWzXzHaarI37jBEj0UAQWKRfTCu/S7eRDkzzXCMEooAgoQi2S/OGolyt193eqUmgCDTV8Ce2WWryabph2bEoQQQZCixcP2PSpRD4UISKTQBBAlNdHi8LbriZc8ZpjkjgCA+CmJPqLdt1yof6ZBFRwBBfJ0L57Wa2DtQaA4IIIiDIjwmhf0Sxd6qRUtIAEESwu8x9HqJcrlHX7pEIIAgEaAGDnlLktgbf2kTE0CQiYEvMNxJifLGAjE4dCABBBkIzEF3E8SueJ1wkEvxKSBIviW2LZeJcjPfKfjPHEH812i5DK9o27Uu72n4zR5B/NZmSGZ2OdhWk31DDqLvfAIIMp9RTj3sC0YT5VxOSXvOFUE8V2d8bqu19bJbWGgLEECQBeA5P9RufrTVZLPzPF2nhyCuyxMkucNaTez2etpAAggyEFjG3V+SKPaDLVpPAgjSE1Qh3e5p2/VEIfOJPg0EiY7Y5QBntZrYwyRoyxBAkLpPjzclij2eiPYYAgjCaWEE7AF3dsXrKjgeJIAgnBEdgRtaTezRqTQRQBBOhYcJfChRdoOmaRCEs2AWAXudg227TtWMCEFqrn6/udsLgkyU2/26l9ULQcqqZ6zZ2KvmTJINsQbwGhdBvFbGZ1728lIT5YDP9MJnhSDhmdYQcZs+yNvrsYtuCFJ0eaNPzlaTFdFHSTgAgiSEX8jQtoqYKFsLmc8D00CQEquaZk4Hte2yzynFNAQpppRuJrJRotiVr+wbgmRfQpcTuCNJ7DuUrBuCZF0+98mflij2rXyWDUGyLFt2Se+RKMdzyxxBcqtY3vnancJ2xet6LtNAkFwqVU6e17Sa2G9Q3DcEcV+iYhO0XzHaarLX8wwRxHN16sjNfhdvopzxOF0E8ViVOnNao62XPXnFTUMQN6UgkaZp7Jldtpps8kIDQbxUgjyWErCnQJooh1JjQZDUFWD85Qhs0bbLnjOcpCFIEuwMOoCAPaHeVpNVA44J1hVBgqEkUGQC57Wa2DtQJmsIMhlqBgpEYL9EsbdqRW8IEh0xA0QisF6iXI4U/7uwCBKTLrFjE7glSeyNv1EagkTBStCJCZyUKPYO+aANQYLiJFhiAiaIXfE6ESoPBAlFkjieCDzTtu2PQySEICEoEsMLgY+11doRKiEECUWSOCkJfCUxgr9aDkFSlpWxQxB4WXJ8HiLYwzEQJAZVYk5B4G2JcSTmYAgSky6xYxD4TGJsjhGcFWQKqowRi8BqXcb9OtYACDIVWcYJSeAVrRrnQgbtE4stVh9K9ElF4H2JsS9VAgiSijzjLkfgisRYlxoTgqSuAOM/TOBZyXHTAxoE8VAFcjACuyRGsPuoQmBFkBAUibEIgWh34i6SVHcsgoSgSIwxBOy3HHbn7dNjDp7qGASZijTjLCUwya8BQyBHkBAUidGXwKS/J++b1HL9ECQERWLMI2BPJLHt1PZ5Hb39H0G8VaSsfJI+0yoESgQJQZEYjyOQ/KmIIcqCICEoEmMpATfP1Q1RFgQJQZEYRsDdk9lDlAVBQlAkhst3e4QoC4KEoFhvDHs71Iq2bc+WigBBSq1s3Hll8X7BEAgQJATFemJc1fcZWbyhNkRZECQExTpi2DvObTt1o47pfj9LBKmp2uPmulurxvFxh+d9FILkXb+Y2Z+SGDtjDuI9NoJ4r9D0+d2WGGunH9rfiAjiryYpM9ogOS6lTMLT2AjiqRrpcjkgMY6lS8HnyAjisy5TZXVBYmybasDcxkGQ3CoWJt/7EmNlmHDlRkGQcms7a2ZbJcfF+qY+fMYIMpxZrke8KzEO5jqBFHkjSArq0475L4mxcdphyxgNQcqo46xZPCk57pQ9zXizQ5B4bFNGfk1inE6ZRAljI0gJVfxhDn+TGHvKmla62SBIOvYhR77+bTC70/bnIYMSi7t5SzgHfqFV41oJk/E2B1YQbxXpn88fJMZf+x9Cz6EEEGQosfT9z2g79bv0qZSfAYLkU+O7EuNn+aScf6YIkkcNf6Xt1D/zSLecLBHEdy3fkhjv+E6z3OwQxGdtP9F26tc+06snKwTxV+ufaNX4n7/U6ssIQfzU/DcS4x9+UiITBEl/DvxZ26k/pU+FDB4mgCDpzokvJcYv06XAyPMIIMg8QnH+/5S2U/+NE56ooQggSCiS/eK8rlXjo37d6ZWaAIJMU4G/S4zfTzMco4QigCChSD4+zn8kxnNxhyF6LAIIEots07woOf4dbwgixyaAIOEJ/1Fi/CV8aCJOTQBBwhH/WGLsCBeSSKkJIMjiFfhKl2x/ungoIngjgCCLVeRlrRqfLxaGo70SQJBxlXlbYhwZdzhH5UIAQYZV6jOJsXnYYfTOlQCC9K+cfcawR+t83f8QeuZOAEHmV/AViXFufld6lEYAQWZX9H2Jsa+0ojOf/gQQ5FFWV3TZ1r4Jp1VOAEEePAGe1apxs/LzgumLAIJ8D2KXxDjBmQGBpQRqF+SktlP2Ow0aBB4hUKsgtyTG05wTEFiOQI2CrNd26jKnBgTmEahJkP0S4715UPg/BDoCNQhyXtup7ZQdAkMJlCzINxJj1VAo9IdA6SvIFm2nPqXUEFiEQGkryFGJcXgRKBwLgdJWkC+0ndpEaSEQkkAJK8garRr3QoIhFgSMQM6CvCoxzlJKCMQikKMgH2g7tTcWFOJCIMfPIFclxguUDwJTEchlBXle26kbU4FhHAjk8Blkt1aN45QLAikIeF1BTkmMnSmgMCYEvH4GuaOt1FpKBAEPBDytIBu0alzyAIYcIODlM8gBiXGMkkDAG4GUK8gFibHNGxTygUDqzyD2hMKVlAEC3glMvYJs1apx0TsY8oPAlJ9B3pUYB8EOgZwIxF5B7IqUbac25gSFXCEwxWeQJ7Vq2HcbNAhkSSDGCvKaxDidJRGShsASAqEFeapt2z0QhkApBP4Pc/5pBSHcYZoAAAAASUVORK5CYII="},"8b53":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var s=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,n=/^application\/dash\+xml/i,r=function(e){return s.test(e)?"hls":n.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},"8c00":function(e,t,i){"use strict";var s=i("be09"),n=function(e,t){return void 0===t&&(t=!1),function(i,n,a){if(i)e(i);else if(n.statusCode>=400&&n.statusCode<=599){var o=a;if(t)if(s.TextDecoder){var l=r(n.headers&&n.headers["content-type"]);try{o=new TextDecoder(l).decode(a)}catch(d){}}else o=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:o})}else e(null,a)}};function r(e){return void 0===e&&(e=""),e.toLowerCase().split(";").reduce((function(e,t){var i=t.split("="),s=i[0],n=i[1];return"charset"===s.trim()?n.trim():e}),"utf-8")}e.exports=n},"8c10":function(e,t){function i(e,t){var i,s=null;try{i=JSON.parse(e,t)}catch(n){s=n}return[s,i]}e.exports=i},"8df4":function(e,t,i){"use strict";var s=i("7a77");function n(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var i=this;e((function(e){i.reason||(i.reason=new s(e),t(i.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e,t=new n((function(t){e=t}));return{token:t,cancel:e}},e.exports=n},"90e3":function(e,t,i){"use strict";var s=i("e330"),n=0,r=Math.random(),a=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++n+r,36)}},9112:function(e,t,i){"use strict";var s=i("83ab"),n=i("9bf2"),r=i("5c6c");e.exports=s?function(e,t,i){return n.f(e,t,r(1,i))}:function(e,t,i){return e[t]=i,e}},9152:function(e,t){
10
10
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
11
- t.read=function(e,t,i,s,n){var r,a,o=8*n-s-1,l=(1<<o)-1,d=l>>1,u=-7,c=i?n-1:0,h=i?-1:1,p=e[t+c];for(c+=h,r=p&(1<<-u)-1,p>>=-u,u+=o;u>0;r=256*r+e[t+c],c+=h,u-=8);for(a=r&(1<<-u)-1,r>>=-u,u+=s;u>0;a=256*a+e[t+c],c+=h,u-=8);if(0===r)r=1-d;else{if(r===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,s),r-=d}return(p?-1:1)*a*Math.pow(2,r-s)},t.write=function(e,t,i,s,n,r){var a,o,l,d=8*r-n-1,u=(1<<d)-1,c=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=s?0:r-1,f=s?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+c>=1?h/l:h*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=u?(o=0,a=u):a+c>=1?(o=(t*l-1)*Math.pow(2,n),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,n),a=0));n>=8;e[i+p]=255&o,p+=f,o/=256,n-=8);for(a=a<<n|o,d+=n;d>0;e[i+p]=255&a,p+=f,a/=256,d-=8);e[i+p-f]|=128*m}},"93d1":function(e,t,i){"use strict";i("097a")},"94ca":function(e,t,i){"use strict";var s=i("d039"),n=i("1626"),r=/#|\.prototype\./,a=function(e,t){var i=l[o(e)];return i===u||i!==d&&(n(t)?s(t):!!t)},o=a.normalize=function(e){return String(e).replace(r,".").toLowerCase()},l=a.data={},d=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},9527:function(e,t,i){"use strict";i("88f3")},9657:function(e,t,i){},"9bf2":function(e,t,i){"use strict";var s=i("83ab"),n=i("0cfb"),r=i("aed9"),a=i("825a"),o=i("a04b"),l=TypeError,d=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c="enumerable",h="configurable",p="writable";t.f=s?r?function(e,t,i){if(a(e),t=o(t),a(i),"function"===typeof e&&"prototype"===t&&"value"in i&&p in i&&!i[p]){var s=u(e,t);s&&s[p]&&(e[t]=i.value,i={configurable:h in i?i[h]:s[h],enumerable:c in i?i[c]:s[c],writable:!1})}return d(e,t,i)}:d:function(e,t,i){if(a(e),t=o(t),a(i),n)try{return d(e,t,i)}catch(s){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},"9faa":function(e,t,i){},a04b:function(e,t,i){"use strict";var s=i("c04e"),n=i("d9b5");e.exports=function(e){var t=s(e,"string");return n(t)?t:t+""}},a559:function(e,t){function i(){return e.exports=i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports["default"]=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},a640:function(e,t,i){"use strict";var s=i("d039");e.exports=function(e,t){var i=[][e];return!!i&&s((function(){i.call(null,t||function(){return 1},1)}))}},a741:function(e,t,i){"use strict";i("ff60")},a7a3:function(e,t,i){},a968:function(e,t){var i=Math.pow(2,32),s=function(e){var t,s=new DataView(e.buffer,e.byteOffset,e.byteLength);return s.getBigUint64?(t=s.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):s.getUint32(0)*i+s.getUint32(4)};e.exports={getUint64:s,MAX_UINT32:i}},ae9f:function(e,t,i){},aeb2:function(e,t,i){"use strict";i("e34c")},aed9:function(e,t,i){"use strict";var s=i("83ab"),n=i("d039");e.exports=s&&n((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},b03c:function(e,t){var i="auto",s={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(e){if("string"!==typeof e)return!1;var t=s[e.toLowerCase()];return!!t&&e.toLowerCase()}function a(e){if("string"!==typeof e)return!1;var t=n[e.toLowerCase()];return!!t&&e.toLowerCase()}function o(e,t,s){this.hasBeenReset=!1;var n="",o=!1,l=e,d=t,u=s,c=null,h="",p=!0,f="auto",m="start",g="auto",y="auto",v=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(e){n=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!e}},startTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");l=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return d},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return h},set:function(e){var t=r(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");h=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return f},set:function(e){if("number"!==typeof e&&e!==i)throw new SyntaxError("Line: an invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=a(e);t?(m=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return y},set:function(e){var t=a(e);t?(y=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(e){var t=a(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");b=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},b074:function(e,t,i){var s=i("89a7"),n=i("e1c8"),r=i("b30f"),a=i("e003"),o=n.DOMImplementation,l=s.NAMESPACE,d=a.ParseError,u=a.XMLReader;function c(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(e,t,i){if(!e){if(t instanceof f)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r("[xmldom "+t+"]\t"+e+g(i))}||function(){}}return i=i||{},r("warning"),r("error"),r("fatalError"),s}function f(){this.cdata=!1}function m(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function g(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function y(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var i=this.options,s=new u,n=i.domBuilder||new f,a=i.errorHandler,o=i.locator,d=i.xmlns||{},h=/\/x?html?$/.test(t),m=h?r.HTML_ENTITIES:r.XML_ENTITIES;o&&n.setDocumentLocator(o),s.errorHandler=p(a,n,o),s.domBuilder=i.domBuilder||n,h&&(d[""]=l.HTML),d.xml=d.xml||l.XML;var g=i.normalizeLineEndings||c;return e&&"string"===typeof e?s.parse(g(e),d,m):s.errorHandler.error("invalid doc source"),n.doc},f.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;v(this,r),this.currentElement=r,this.locator&&m(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),d=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&m(s.getLocator(o),d),d.value=d.nodeValue=l,r.setAttributeNode(d)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName;this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&m(this.locator,i),v(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=y.apply(this,arguments),e){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&m(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=y.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&m(this.locator,s),v(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&m(this.locator,n),v(this,n),this.doc.doctype=n}},warning:function(e){console.warn("[xmldom warning]\t"+e,g(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,g(this.locator))},fatalError:function(e){throw new d(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){f.prototype[e]=function(){return null}})),t.__DOMHandler=f,t.normalizeLineEndings=c,t.DOMParser=h},b30f:function(e,t,i){"use strict";var s=i("89a7").freeze;t.XML_ENTITIES=s({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=s({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},b42e:function(e,t,i){"use strict";var s=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?n:s)(t)}},b50d:function(e,t,i){"use strict";var s=i("c532"),n=i("467f"),r=i("7aac"),a=i("30b5"),o=i("83b9"),l=i("c345"),d=i("3934"),u=i("2d83");e.exports=function(e){return new Promise((function(t,i){var c=e.data,h=e.headers,p=e.responseType;s.isFormData(c)&&delete h["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(m+":"+g)}var y=o(e.baseURL,e.url);function v(){if(f){var s="getAllResponseHeaders"in f?l(f.getAllResponseHeaders()):null,r=p&&"text"!==p&&"json"!==p?f.response:f.responseText,a={data:r,status:f.status,statusText:f.statusText,headers:s,config:e,request:f};n(t,i,a),f=null}}if(f.open(e.method.toUpperCase(),a(y,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,"onloadend"in f?f.onloadend=v:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(v)},f.onabort=function(){f&&(i(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){i(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},s.isStandardBrowserEnv()){var b=(e.withCredentials||d(y))&&e.xsrfCookieName?r.read(e.xsrfCookieName):void 0;b&&(h[e.xsrfHeaderName]=b)}"setRequestHeader"in f&&s.forEach(h,(function(e,t){"undefined"===typeof c&&"content-type"===t.toLowerCase()?delete h[t]:f.setRequestHeader(t,e)})),s.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),p&&"json"!==p&&(f.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),i(e),f=null)})),c||(c=null),f.send(c)}))}},b622:function(e,t,i){"use strict";var s=i("da84"),n=i("5692"),r=i("1a2d"),a=i("90e3"),o=i("04f8"),l=i("fdbf"),d=s.Symbol,u=n("wks"),c=l?d["for"]||d:d&&d.withoutSetter||a;e.exports=function(e){return r(u,e)||(u[e]=o&&r(d,e)?d[e]:c("Symbol."+e)),u[e]}},b639:function(e,t,i){"use strict";(function(e){
11
+ t.read=function(e,t,i,s,n){var r,a,o=8*n-s-1,l=(1<<o)-1,d=l>>1,u=-7,c=i?n-1:0,h=i?-1:1,p=e[t+c];for(c+=h,r=p&(1<<-u)-1,p>>=-u,u+=o;u>0;r=256*r+e[t+c],c+=h,u-=8);for(a=r&(1<<-u)-1,r>>=-u,u+=s;u>0;a=256*a+e[t+c],c+=h,u-=8);if(0===r)r=1-d;else{if(r===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,s),r-=d}return(p?-1:1)*a*Math.pow(2,r-s)},t.write=function(e,t,i,s,n,r){var a,o,l,d=8*r-n-1,u=(1<<d)-1,c=u>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=s?0:r-1,f=s?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+c>=1?h/l:h*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=u?(o=0,a=u):a+c>=1?(o=(t*l-1)*Math.pow(2,n),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,n),a=0));n>=8;e[i+p]=255&o,p+=f,o/=256,n-=8);for(a=a<<n|o,d+=n;d>0;e[i+p]=255&a,p+=f,a/=256,d-=8);e[i+p-f]|=128*m}},"93d1":function(e,t,i){"use strict";i("097a")},"94ca":function(e,t,i){"use strict";var s=i("d039"),n=i("1626"),r=/#|\.prototype\./,a=function(e,t){var i=l[o(e)];return i===u||i!==d&&(n(t)?s(t):!!t)},o=a.normalize=function(e){return String(e).replace(r,".").toLowerCase()},l=a.data={},d=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},9527:function(e,t,i){"use strict";i("88f3")},"9bf2":function(e,t,i){"use strict";var s=i("83ab"),n=i("0cfb"),r=i("aed9"),a=i("825a"),o=i("a04b"),l=TypeError,d=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c="enumerable",h="configurable",p="writable";t.f=s?r?function(e,t,i){if(a(e),t=o(t),a(i),"function"===typeof e&&"prototype"===t&&"value"in i&&p in i&&!i[p]){var s=u(e,t);s&&s[p]&&(e[t]=i.value,i={configurable:h in i?i[h]:s[h],enumerable:c in i?i[c]:s[c],writable:!1})}return d(e,t,i)}:d:function(e,t,i){if(a(e),t=o(t),a(i),n)try{return d(e,t,i)}catch(s){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},"9faa":function(e,t,i){},a04b:function(e,t,i){"use strict";var s=i("c04e"),n=i("d9b5");e.exports=function(e){var t=s(e,"string");return n(t)?t:t+""}},a559:function(e,t){function i(){return e.exports=i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},e.exports.__esModule=!0,e.exports["default"]=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},a640:function(e,t,i){"use strict";var s=i("d039");e.exports=function(e,t){var i=[][e];return!!i&&s((function(){i.call(null,t||function(){return 1},1)}))}},a741:function(e,t,i){"use strict";i("ff60")},a7a3:function(e,t,i){},a968:function(e,t){var i=Math.pow(2,32),s=function(e){var t,s=new DataView(e.buffer,e.byteOffset,e.byteLength);return s.getBigUint64?(t=s.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):s.getUint32(0)*i+s.getUint32(4)};e.exports={getUint64:s,MAX_UINT32:i}},ae9f:function(e,t,i){},aeb2:function(e,t,i){"use strict";i("e34c")},aed9:function(e,t,i){"use strict";var s=i("83ab"),n=i("d039");e.exports=s&&n((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},b03c:function(e,t){var i="auto",s={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(e){if("string"!==typeof e)return!1;var t=s[e.toLowerCase()];return!!t&&e.toLowerCase()}function a(e){if("string"!==typeof e)return!1;var t=n[e.toLowerCase()];return!!t&&e.toLowerCase()}function o(e,t,s){this.hasBeenReset=!1;var n="",o=!1,l=e,d=t,u=s,c=null,h="",p=!0,f="auto",m="start",g="auto",y="auto",v=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(e){n=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!e}},startTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!==typeof e)throw new TypeError("Start time must be set to a number.");l=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return d},set:function(e){if("number"!==typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(e){u=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return h},set:function(e){var t=r(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");h=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(e){p=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return f},set:function(e){if("number"!==typeof e&&e!==i)throw new SyntaxError("Line: an invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=a(e);t?(m=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return y},set:function(e){var t=a(e);t?(y=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(e){var t=a(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");b=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},b074:function(e,t,i){var s=i("89a7"),n=i("e1c8"),r=i("b30f"),a=i("e003"),o=n.DOMImplementation,l=s.NAMESPACE,d=a.ParseError,u=a.XMLReader;function c(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(e,t,i){if(!e){if(t instanceof f)return t;e=t}var s={},n=e instanceof Function;function r(t){var r=e[t];!r&&n&&(r=2==e.length?function(i){e(t,i)}:e),s[t]=r&&function(e){r("[xmldom "+t+"]\t"+e+g(i))}||function(){}}return i=i||{},r("warning"),r("error"),r("fatalError"),s}function f(){this.cdata=!1}function m(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function g(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function y(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var i=this.options,s=new u,n=i.domBuilder||new f,a=i.errorHandler,o=i.locator,d=i.xmlns||{},h=/\/x?html?$/.test(t),m=h?r.HTML_ENTITIES:r.XML_ENTITIES;o&&n.setDocumentLocator(o),s.errorHandler=p(a,n,o),s.domBuilder=i.domBuilder||n,h&&(d[""]=l.HTML),d.xml=d.xml||l.XML;var g=i.normalizeLineEndings||c;return e&&"string"===typeof e?s.parse(g(e),d,m):s.errorHandler.error("invalid doc source"),n.doc},f.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,s){var n=this.doc,r=n.createElementNS(e,i||t),a=s.length;v(this,r),this.currentElement=r,this.locator&&m(this.locator,r);for(var o=0;o<a;o++){e=s.getURI(o);var l=s.getValue(o),d=(i=s.getQName(o),n.createAttributeNS(e,i));this.locator&&m(s.getLocator(o),d),d.value=d.nodeValue=l,r.setAttributeNode(d)}},endElement:function(e,t,i){var s=this.currentElement;s.tagName;this.currentElement=s.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&m(this.locator,i),v(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=y.apply(this,arguments),e){if(this.cdata)var s=this.doc.createCDATASection(e);else s=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(s):/^\s*$/.test(e)&&this.doc.appendChild(s),this.locator&&m(this.locator,s)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=y.apply(this,arguments);var s=this.doc.createComment(e);this.locator&&m(this.locator,s),v(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var n=s.createDocumentType(e,t,i);this.locator&&m(this.locator,n),v(this,n),this.doc.doctype=n}},warning:function(e){console.warn("[xmldom warning]\t"+e,g(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,g(this.locator))},fatalError:function(e){throw new d(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){f.prototype[e]=function(){return null}})),t.__DOMHandler=f,t.normalizeLineEndings=c,t.DOMParser=h},b30f:function(e,t,i){"use strict";var s=i("89a7").freeze;t.XML_ENTITIES=s({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=s({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},b42e:function(e,t,i){"use strict";var s=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?n:s)(t)}},b50d:function(e,t,i){"use strict";var s=i("c532"),n=i("467f"),r=i("7aac"),a=i("30b5"),o=i("83b9"),l=i("c345"),d=i("3934"),u=i("2d83");e.exports=function(e){return new Promise((function(t,i){var c=e.data,h=e.headers,p=e.responseType;s.isFormData(c)&&delete h["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(m+":"+g)}var y=o(e.baseURL,e.url);function v(){if(f){var s="getAllResponseHeaders"in f?l(f.getAllResponseHeaders()):null,r=p&&"text"!==p&&"json"!==p?f.response:f.responseText,a={data:r,status:f.status,statusText:f.statusText,headers:s,config:e,request:f};n(t,i,a),f=null}}if(f.open(e.method.toUpperCase(),a(y,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,"onloadend"in f?f.onloadend=v:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(v)},f.onabort=function(){f&&(i(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){i(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},s.isStandardBrowserEnv()){var b=(e.withCredentials||d(y))&&e.xsrfCookieName?r.read(e.xsrfCookieName):void 0;b&&(h[e.xsrfHeaderName]=b)}"setRequestHeader"in f&&s.forEach(h,(function(e,t){"undefined"===typeof c&&"content-type"===t.toLowerCase()?delete h[t]:f.setRequestHeader(t,e)})),s.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),p&&"json"!==p&&(f.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),i(e),f=null)})),c||(c=null),f.send(c)}))}},b622:function(e,t,i){"use strict";var s=i("da84"),n=i("5692"),r=i("1a2d"),a=i("90e3"),o=i("04f8"),l=i("fdbf"),d=s.Symbol,u=n("wks"),c=l?d["for"]||d:d&&d.withoutSetter||a;e.exports=function(e){return r(u,e)||(u[e]=o&&r(d,e)?d[e]:c("Symbol."+e)),u[e]}},b639:function(e,t,i){"use strict";(function(e){
12
12
  /*!
13
13
  * The buffer module from node.js, for the browser.
14
14
  *
@@ -27,4 +27,4 @@ class Er{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width
27
27
  /*! @name @videojs/http-streaming @version 3.10.0 @license Apache-2.0 */
28
28
  const Or=y["a"],Ar=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Dr=e=>Cr.log.debug?Cr.log.debug.bind(Cr,"VHS:",e+" >"):function(){};function Nr(...e){const t=Cr.obj||Cr,i=t.merge||t.mergeOptions;return i.apply(t,e)}function Mr(...e){const t=Cr.time||Cr,i=t.createTimeRanges||t.createTimeRanges;return i.apply(t,e)}const Rr=1/30,Ur=3*Rr,Br=function(e,t){const i=[];let s;if(e&&e.length)for(s=0;s<e.length;s++)t(e.start(s),e.end(s))&&i.push([e.start(s),e.end(s)]);return Mr(i)},jr=function(e,t){return Br(e,(function(e,i){return e-Ur<=t&&i+Ur>=t}))},Fr=function(e,t){return Br(e,(function(e){return e-Rr>=t}))},qr=function(e){if(e.length<2)return Mr();const t=[];for(let i=1;i<e.length;i++){const s=e.end(i-1),n=e.start(i);t.push([s,n])}return Mr(t)},$r=function(e,t){let i=null,s=null,n=0;const r=[],a=[];if(!e||!e.length||!t||!t.length)return Mr();let o=e.length;while(o--)r.push({time:e.start(o),type:"start"}),r.push({time:e.end(o),type:"end"});o=t.length;while(o--)r.push({time:t.start(o),type:"start"}),r.push({time:t.end(o),type:"end"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)"start"===r[o].type?(n++,2===n&&(i=r[o].time)):"end"===r[o].type&&(n--,1===n&&(s=r[o].time)),null!==i&&null!==s&&(a.push([i,s]),i=null,s=null);return Mr(a)},Hr=e=>{const t=[];if(!e||!e.length)return"";for(let i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},Vr=function(e,t,i=1){const s=e.length?e.end(e.length-1):0;return(s-t)/i},zr=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Gr=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1},Jr=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Wr=function(e,t){let i=0;if(!e||!e.length)return i;for(let s=0;s<e.length;s++){const n=e.start(s),r=e.end(s);t>r||(i+=t>n&&t<=r?r-t:r-n)}return i},Xr=(e,t)=>{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},Yr=e=>(e.segments||[]).reduce((e,t,i)=>(t.parts?t.parts.forEach((function(s,n){e.push({duration:s.duration,segmentIndex:i,partIndex:n,part:s,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e),[]),Kr=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},Qr=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let s=(i||[]).reduce((e,t)=>e+("PART"===t.type?1:0),0);return s+=t&&t.length?t.length:0,s},Zr=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=Kr(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},ea=function(e,t){let i=0,s=t-e.mediaSequence,n=e.segments[s];if(n){if("undefined"!==typeof n.start)return{result:n.start,precise:!0};if("undefined"!==typeof n.end)return{result:n.end-n.duration,precise:!0}}while(s--){if(n=e.segments[s],"undefined"!==typeof n.end)return{result:i+n.end,precise:!0};if(i+=Xr(e,n),"undefined"!==typeof n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}},ta=function(e,t){let i,s=0,n=t-e.mediaSequence;for(;n<e.segments.length;n++){if(i=e.segments[n],"undefined"!==typeof i.start)return{result:i.start-s,precise:!0};if(s+=Xr(e,i),"undefined"!==typeof i.end)return{result:i.end-s,precise:!0}}return{result:-1,precise:!1}},ia=function(e,t,i){if("undefined"===typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const s=ea(e,t);if(s.precise)return s.result;const n=ta(e,t);return n.precise?n.result:s.result+i},sa=function(e,t,i){if(!e)return 0;if("number"!==typeof i&&(i=0),"undefined"===typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return n.a.Infinity}return ia(e,t,i)},na=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:s}){let n=0;if(i>s&&([i,s]=[s,i]),i<0){for(let t=i;t<Math.min(0,s);t++)n+=e;i=0}for(let r=i;r<s;r++)n+=t[r].duration;return n},ra=function(e,t,i,s){if(!e||!e.segments)return null;if(e.endList)return sa(e);if(null===t)return null;t=t||0;let n=ia(e,e.mediaSequence+e.segments.length,t);return i&&(s="number"===typeof s?s:Zr(null,e),n-=s),Math.max(0,n)},aa=function(e,t,i){const s=!0,n=t||0;let r=ra(e,t,s,i);return null===r?Mr():(r<n&&(r=n),Mr(n,r))},oa=function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:s,startTime:n,exactManifestTimings:r}){let a=t-n;const o=Yr(e);let l=0;for(let d=0;d<o.length;d++){const e=o[d];if(i===e.segmentIndex&&("number"!==typeof s||"number"!==typeof e.partIndex||s===e.partIndex)){l=d;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Rr<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:n-na({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let d=l;d<o.length;d++){const t=o[d];a-=t.duration;const i=t.duration>Rr,s=0===a,u=i&&a+Rr>=0;if(!s&&!u||d===o.length-1){if(r){if(a>0)continue}else if(a-Rr>=0)continue;return{partIndex:t.partIndex,segmentIndex:t.segmentIndex,startTime:n+na({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:d})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},la=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},da=function(e){return e.excludeUntil&&e.excludeUntil===1/0},ua=function(e){const t=la(e);return!e.disabled&&!t},ca=function(e){return e.disabled},ha=function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},pa=function(e,t){return t.attributes&&t.attributes[e]},fa=function(e,t,i,s=0){if(!pa("BANDWIDTH",i))return NaN;const n=e*i.attributes.BANDWIDTH;return(n-8*s)/t},ma=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(e=>!!ua(e)&&(e.attributes.BANDWIDTH||0)<i).length},ga=(e,t)=>!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri)))),ya=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let s=!1;for(const n in i){for(const e in i[n])if(s=t(i[n][e]),s)break;if(s)break}return!!s},va=e=>{if(!e||!e.playlists||!e.playlists.length){const t=ya(e,e=>e.playlists&&e.playlists.length||e.uri);return t}for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],s=i.attributes&&i.attributes.CODECS;if(s&&s.split(",").every(e=>Object(b["f"])(e)))continue;const n=ya(e,e=>ga(i,e));if(!n)return!1}return!0};var ba={liveEdgeDelay:Zr,duration:sa,seekable:aa,getMediaInfoForTime:oa,isEnabled:ua,isDisabled:ca,isExcluded:la,isIncompatible:da,playlistEnd:ra,isAes:ha,hasAttribute:pa,estimateSegmentRequestTime:fa,isLowestEnabledRendition:ma,isAudioOnly:va,playlistMatch:ga,segmentDurationWithParts:Xr};const{log:_a}=Cr,Ta=(e,t)=>`${e}-${t}`,Sa=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,wa=({onwarn:e,oninfo:t,manifestString:i,customTagParsers:s=[],customTagMappers:n=[],llhls:r})=>{const a=new v["a"];e&&a.on("warn",e),t&&a.on("info",t),s.forEach(e=>a.addParser(e)),n.forEach(e=>a.addTagMapper(e)),a.push(i),a.end();const o=a.manifest;if(r||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce((e,t)=>Math.max(e,t.duration),0)),e&&e({message:"manifest has no targetDuration defaulting to "+t}),o.targetDuration=t}const l=Kr(o);if(l.length&&!o.partTargetDuration){const t=l.reduce((e,t)=>Math.max(e,t.duration),0);e&&(e({message:"manifest has no partTargetDuration defaulting to "+t}),_a.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=t}return o},xa=(e,t)=>{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(e.mediaGroups[i])for(const s in e.mediaGroups[i])for(const n in e.mediaGroups[i][s]){const r=e.mediaGroups[i][s][n];t(r,i,s,n)}})},Ca=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},Ea=e=>{let t=e.playlists.length;while(t--){const i=e.playlists[t];Ca({playlist:i,id:Ta(t,i.uri)}),i.resolvedUri=Or(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||_a.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},ka=e=>{xa(e,t=>{t.uri&&(t.resolvedUri=Or(e.uri,t.uri))})},Ia=(e,t)=>{const i=Ta(0,t),s={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:n.a.location.href,resolvedUri:n.a.location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[t]=s.playlists[0],s},La=(e,t,i=Sa)=>{e.uri=t;for(let n=0;n<e.playlists.length;n++)if(!e.playlists[n].uri){const t="placeholder-uri-"+n;e.playlists[n].uri=t}const s=va(e);xa(e,(t,n,r,a)=>{if(!t.playlists||!t.playlists.length){if(s&&"AUDIO"===n&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[g()({},t)]}t.playlists.forEach((function(t,s){const o=i(n,r,a,t),l=Ta(s,o);t.uri?t.resolvedUri=t.resolvedUri||Or(e.uri,t.uri):(t.uri=0===s?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))}),Ea(e),ka(e)};class Pa{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((e,t)=>(e.set(t.id,t),e),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach((i,s)=>{if(!this.processedDateRanges_.has(s)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0});for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){const t=new Map(this.processedDateRanges_);t.forEach((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)})}}const{EventTarget:Oa}=Cr,Aa=(e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let s=t.mediaSequence+t.segments.length;if(e){const n=e.parts||[],r=Qr(t)-1;r>-1&&r!==n.length-1&&(i._HLS_part=r),(r>-1||n.length)&&s--}i._HLS_msn=s}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const t=new n.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e},Da=(e,t)=>{if(!e)return t;const i=Nr(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let s=0;s<t.parts.length;s++)e.parts&&e.parts[s]&&(i.parts[s]=Nr(e.parts[s],t.parts[s]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},Na=(e,t,i)=>{const s=e.slice(),n=t.slice();i=i||0;const r=[];let a;for(let o=0;o<n.length;o++){const e=s[o+i],t=n[o];e?(a=e.map||a,r.push(Da(e,t))):(a&&!t.map&&(t.map=a),r.push(t))}return r},Ma=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=Or(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Or(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Or(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Or(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(e=>{e.resolvedUri||(e.resolvedUri=Or(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(e=>{e.resolvedUri||(e.resolvedUri=Or(t,e.uri))})},Ra=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if("MAP"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},Ua=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Ba=(e,t,i=Ua)=>{const s=Nr(e,{}),n=s.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=Ra(t);const r=Nr(n,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=Na(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}r.segments.forEach(e=>{Ma(e,r.resolvedUri)});for(let a=0;a<s.playlists.length;a++)s.playlists[a].id===t.id&&(s.playlists[a]=r);return s.playlists[t.id]=r,s.playlists[t.uri]=r,xa(e,(e,i,s,n)=>{if(e.playlists)for(let a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=r)}),s},ja=(e,t)=>{const i=e.segments||[],s=i[i.length-1],n=s&&s.parts&&s.parts[s.parts.length-1],r=n&&n.duration||s&&s.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)};class Fa extends Oa{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Dr("PlaylistLoader");const{withCredentials:s=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;const n=t.options_;this.customTagParsers=n&&n.customTagParsers||[],this.customTagMappers=n&&n.customTagMappers||[],this.llhls=n&&n.llhls,this.dateRangesStorage_=new Pa,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=Or(this.main.uri,e.uri);this.llhls&&(t=Aa(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials},(e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})})}playlistRequestError(e,t,i){const{uri:s,id:n}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[n],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}parseManifest_({url:e,manifestString:t}){return wa({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}haveMetadata({playlistString:e,playlistObject:t,url:i,id:s}){this.request=null,this.state="HAVE_METADATA";const n=t||this.parseManifest_({url:i,manifestString:e});n.lastRequest=Date.now(),Ca({playlist:n,uri:i,id:s});const r=Ba(this.main,n);this.targetDuration=n.partTargetDuration||n.targetDuration,this.pendingMedia_=null,r?(this.main=r,this.media_=this.main.playlists[s]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(ja(this.media(),!!r)),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),n.a.clearTimeout(this.mediaUpdateTimeout),n.a.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Pa,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"===typeof e){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(n.a.clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=n.a.setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,s=!this.media_||e.id!==this.media_.id,r=this.main.playlists[e.id];if(r&&r.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(s&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(ja(e,!0)),s){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(t,s)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=Ar(e.resolvedUri,s),t)return this.playlistRequestError(this.request,e,i);this.haveMetadata({playlistString:s.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}}pause(){this.mediaUpdateTimeout&&(n.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(n.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=n.a.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(n.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=n.a.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,"object"===typeof this.src)return this.src.uri||(this.src.uri=n.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(e,t)=>{if(!this.request)return;if(this.request=null,e)return this.error={status:t.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:t.responseText,code:2},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.src=Ar(this.src,t);const i=this.parseManifest_({manifestString:t.responseText,url:this.src});this.setupInitialPlaylist(i)})}srcUri(){return"string"===typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,La(this.main,this.srcUri()),e.playlists.forEach(e=>{e.segments=Ra(e),e.segments.forEach(t=>{Ma(t,e.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||n.a.location.href;this.main=Ia(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){const i=this.main,s=e.ID;let n=i.playlists.length;while(n--){const r=i.playlists[n];if(r.attributes["PATHWAY-ID"]===s){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=Ta(s,t),o=this.createCloneAttributes_(s,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[n]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(n,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,s=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][s])for(const t in i.mediaGroups[e])if(t===s){for(const s in i.mediaGroups[e][t]){const n=i.mediaGroups[e][t][s];n.playlists.forEach((e,t)=>{const s=i.playlists[e.id],n=s.id,r=s.resolvedUri;delete i.playlists[n],delete i.playlists[r]})}delete i.mediaGroups[e][t]}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,s=i.playlists.length,n=this.createCloneURI_(t.resolvedUri,e),r=Ta(e.ID,n),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[s]=o,i.playlists[r]=o,i.playlists[n]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e["BASE-ID"],s=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(n=>{if(s.mediaGroups[n]&&!s.mediaGroups[n][t])for(const r in s.mediaGroups[n])if(r===i){s.mediaGroups[n][t]={};for(const i in s.mediaGroups[n][r]){const a=s.mediaGroups[n][r][i];s.mediaGroups[n][t][i]=g()({},a);const o=s.mediaGroups[n][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach((r,a)=>{const l=s.playlists[r.id],d=Sa(n,t,i),u=Ta(t,d);if(l&&!s.playlists[u]){const t=this.createClonePlaylist_(l,u,e),i=t.resolvedUri;s.playlists[u]=t,s.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,u,e)})}}})}createClonePlaylist_(e,t,i,s){const n=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:n,uri:n,id:t};return e.segments&&(r.segments=[]),s&&(r.attributes=s),Nr(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t["URI-REPLACEMENT"].HOST;const s=t["URI-REPLACEMENT"].PARAMS;for(const n of Object.keys(s))i.searchParams.set(n,s[n]);return i.href}createCloneAttributes_(e,t){const i={["PATHWAY-ID"]:e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{t[s]&&(i[s]=e)}),i}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes.keyId;s&&t.add(s.toLowerCase())}return t}}}const{xhr:qa}=Cr,$a=function(e,t,i,s){const n="arraybuffer"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(n||e.responseText)))),s(t,e)},Ha=(e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach(e=>{i=e(i)}),i},Va=(e,t,i,s)=>{e&&e.size&&e.forEach(e=>{e(t,i,s)})},za=function(){const e=function e(t,i){t=Nr({timeout:45e3},t);const s=e.beforeRequest||Cr.Vhs.xhr.beforeRequest,n=e._requestCallbackSet||Cr.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||Cr.Vhs.xhr._responseCallbackSet;s&&"function"===typeof s&&(Cr.log.warn("beforeRequest is deprecated, use onRequest instead."),n.add(s));const a=!0===Cr.Vhs.xhr.original?qa:Cr.Vhs.xhr,o=Ha(n,t);n.delete(s);const l=a(o||t,(function(e,t){return Va(r,l,e,t),$a(l,e,t,i)})),d=l.abort;return l.abort=function(){return l.aborted=!0,d.apply(l,arguments)},l.uri=t.uri,l.requestTime=Date.now(),l};return e.original=!0,e},Ga=function(e){let t;const i=e.offset;return t="bigint"===typeof e.offset||"bigint"===typeof e.length?n.a.BigInt(e.offset)+n.a.BigInt(e.length)-n.a.BigInt(1):e.offset+e.length-1,"bytes="+i+"-"+t},Ja=function(e){const t={};return e.byterange&&(t.Range=Ga(e.byterange)),t},Wa=function(e,t){return e.start(t)+"-"+e.end(t)},Xa=function(e,t){const i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},Ya=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ka=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];Object(T["e"])(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t},Qa=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Za=function(e){return e.resolvedUri},eo=e=>{const t=Array.prototype.slice.call(e),i=16;let s,n,r="";for(let a=0;a<t.length/i;a++)s=t.slice(a*i,a*i+i).map(Xa).join(""),n=t.slice(a*i,a*i+i).map(Ya).join(""),r+=s+" "+n+"\n";return r},to=({bytes:e})=>eo(e),io=e=>{let t,i="";for(t=0;t<e.length;t++)i+=Wa(e,t)+" ";return i};var so=Object.freeze({__proto__:null,createTransferableMessage:Ka,initSegmentId:Qa,segmentKeyId:Za,hexDump:eo,tagDump:to,textRanges:io});const no=.25,ro=(e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,s=t.videoTimingInfo.transmuxedPresentationStart,n=s+i,r=e-n;return new Date(t.dateTimeObject.getTime()+1e3*r)},ao=e=>e.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds,oo=(e,t)=>{let i;try{i=new Date(e)}catch(l){return null}if(!t||!t.segments||0===t.segments.length)return null;let s=t.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let d=0;d<t.segments.length-1;d++){s=t.segments[d];const e=new Date(t.segments[d+1].dateTimeObject);if(i<e)break}const n=t.segments[t.segments.length-1],r=n.dateTimeObject,a=n.videoTimingInfo?ao(n.videoTimingInfo):n.duration+n.duration*no,o=new Date(r.getTime()+1e3*a);return i>o?null:(i>new Date(r)&&(s=n),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:ba.duration(t,t.mediaSequence+t.segments.indexOf(s)),type:s.videoTimingInfo?"accurate":"estimate"})},lo=(e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,s=0;for(let r=0;r<t.segments.length;r++)if(i=t.segments[r],s=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:s+i.duration,e<=s)break;const n=t.segments[t.segments.length-1];if(n.videoTimingInfo&&n.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>s){if(e>s+n.duration*no)return null;i=n}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:s-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}},uo=(e,t)=>{let i,s;try{i=new Date(e),s=new Date(t)}catch(a){}const n=i.getTime(),r=s.getTime();return(r-n)/1e3},co=e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++){const i=e.segments[t];if(!i.dateTimeObject)return!1}return!0},ho=({playlist:e,time:t,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===t)return i({message:"getProgramTime: playlist and time must be provided"});const s=lo(t,e);if(!s)return i({message:"valid programTime was not found"});if("estimate"===s.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});const n={mediaSeconds:t},r=ro(t,s.segment);return r&&(n.programDateTime=r.toISOString()),i(null,n)},po=({programTime:e,playlist:t,retryCount:i=2,seekTo:s,pauseAfterSeek:n=!0,tech:r,callback:a})=>{if(!a)throw new Error("seekToProgramTime: callback must be provided");if("undefined"===typeof e||!t||!s)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!r.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!co(t))return a({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});const o=oo(e,t);if(!o)return a({message:e+" was not found in the stream"});const l=o.segment,d=uo(l.dateTimeObject,e);if("estimate"===o.type)return 0===i?a({message:e+" is not buffered yet. Try again"}):(s(o.estimatedStart+d),void r.one("seeked",()=>{po({programTime:e,playlist:t,retryCount:i-1,seekTo:s,pauseAfterSeek:n,tech:r,callback:a})}));const u=l.start+d,c=()=>a(null,r.currentTime());r.one("seeked",c),n&&r.pause(),s(u)},fo=(e,t)=>{if(4===e.readyState)return t()},mo=(e,t,i)=>{let s,n=[],r=!1;const a=function(e,t,s,n){return t.abort(),r=!0,i(e,t,s,n)},o=function(e,t){if(r)return;if(e)return a(e,t,"",n);const i=t.responseText.substring(n&&n.byteLength||0,t.responseText.length);if(n=Object(T["d"])(n,Object(T["h"])(i,!0)),s=s||Object(C["a"])(n),n.length<10||s&&n.length<s+2)return fo(t,()=>a(e,t,"",n));const o=Object(E["a"])(n);return"ts"===o&&n.length<188||!o&&n.length<376?fo(t,()=>a(e,t,"",n)):a(null,t,o,n)},l={uri:e,beforeSend(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function({total:t,loaded:i}){return $a(e,null,{statusCode:e.status},o)}))}},d=t(l,(function(e,t){return $a(d,e,t,o)}));return d},{EventTarget:go}=Cr,yo=function(e,t){if(!Ua(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(let i=0;i<e.segments.length;i++){const s=e.segments[i],n=t.segments[i];if(s.uri!==n.uri)return!1;if(!s.byterange&&!n.byterange)continue;const r=s.byterange,a=n.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},vo=(e,t,i,s)=>{const n=s.attributes.NAME||i;return`placeholder-uri-${e}-${t}-${n}`},bo=({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:s,previousManifest:n})=>{const r=Object(S["c"])(e,{manifestUri:t,clientOffset:i,sidxMapping:s,previousManifest:n});return La(r,t,vo),r},_o=(e,t)=>{xa(e,(i,s,n,r)=>{r in t.mediaGroups[s][n]||delete e.mediaGroups[s][n][r]})},To=(e,t,i)=>{let s=!0,n=Nr(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let r=0;r<t.playlists.length;r++){const e=t.playlists[r];if(e.sidx){const t=Object(S["b"])(e.sidx);i&&i[t]&&i[t].sidx&&Object(S["a"])(e,i[t].sidx,e.sidx.resolvedUri)}const a=Ba(n,e,yo);a&&(n=a,s=!1)}return xa(t,(e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Ba(n,e.playlists[0],yo);o&&(n=o,r in n.mediaGroups[t][i]||(n.mediaGroups[t][i][r]=e),n.mediaGroups[t][i][r].playlists[0]=n.playlists[a],s=!1)}}),_o(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(s=!1),s?null:n},So=(e,t)=>{const i=Boolean(!e.map&&!t.map),s=i||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length);return s&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},wo=(e,t)=>{const i={};for(const s in e){const n=e[s],r=n.sidx;if(r){const e=Object(S["b"])(r);if(!t[e])break;const s=t[e].sidxInfo;So(s,r)&&(i[e]=t[e])}}return i},xo=(e,t)=>{const i=wo(e.playlists,t);let s=i;return xa(e,(e,i,n,r)=>{if(e.playlists&&e.playlists.length){const i=e.playlists;s=Nr(s,wo(i,t))}}),s};class Co extends go{constructor(e,t,i={},s){super(),this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:n=!1}=i;if(this.vhs_=t,this.withCredentials=n,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=Dr("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}requestErrored_(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!==typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}addSidxSegments_(e,t,i){const s=e.sidx&&Object(S["b"])(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s])return void(this.mediaRequest_=n.a.setTimeout(()=>i(!1),0));const r=Ar(e.sidx.resolvedUri),a=(n,r)=>{if(this.requestErrored_(n,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_;let o;try{o=x()(Object(T["k"])(r.response).subarray(8))}catch(l){return void this.requestErrored_(l,r,t)}return a[s]={sidxInfo:e.sidx,sidx:o},Object(S["a"])(e,o,e.sidx.resolvedUri),i(!0)};this.request=mo(r,this.vhs_.xhr,(t,i,s,n)=>{if(t)return a(t,i);if(!s||"mp4"!==s)return a({status:i.status,message:`Unsupported ${s||"unknown"} container type for sidx segment at URL: ${r}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i);const{offset:o,length:l}=e.sidx.byterange;if(n.length>=l+o)return a(t,{response:n.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:r,responseType:"arraybuffer",headers:Ja({byterange:e.sidx.byterange})},a)})}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},n.a.clearTimeout(this.minimumUpdatePeriodTimeout_),n.a.clearTimeout(this.mediaRequest_),n.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"===typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,i=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),n.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(n.a.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){n.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=n.a.setTimeout(()=>this.load(),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){this.started=!0,this.isMain_?this.requestMain_((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}):this.mediaRequest_=n.a.setTimeout(()=>this.haveMain_(),0)}requestMain_(e){this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(t,i)=>{if(this.requestErrored_(t,i))return void("HAVE_NOTHING"===this.state&&(this.started=!1));const s=i.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Ar(this.mainPlaylistLoader_.srcUrl,i),s?(this.handleMain_(),void this.syncClientServerClock_(()=>e(i,s))):e(i,s)})}syncClientServerClock_(e){const t=Object(S["d"])(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Or(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials},(i,s)=>{if(!this.request)return;if(i)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();let n;n="HEAD"===t.method?s.responseHeaders&&s.responseHeaders.date?Date.parse(s.responseHeaders.date):this.mainLoaded_:Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=n-Date.now(),e()}))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main;let t=bo({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=To(e,t,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=t||e;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];return i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(t),Boolean(t)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(n.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!==typeof t||t<=0?t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`):this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=n.a.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=xo(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,e=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=n.a.setTimeout(()=>{this.trigger("mediaupdatetimeout"),e()},ja(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map(e=>({cueTime:e.start,frames:[{data:e.messageData}]}));this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const s=e.contentProtection[i].attributes["cenc:default_KID"];s&&t.add(s.replace(/-/g,"").toLowerCase())}return t}}}var Eo={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const ko=e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer},Io=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},Lo=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}},Po=function(e){return function(){const t=Lo(e),i=Io(new Worker(t));i.objURL=t;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),s.call(this)},i}},Oo=function(e){return`var browserWorkerPolyFill = ${Io.toString()};\nbrowserWorkerPolyFill(self);\n`+e},Ao=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Do=Oo(Ao((function(){var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},i=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var s;return!!e[t]&&(s=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(s,1),s>-1)},this.trigger=function(t){var i,s,n,r;if(i=e[t],i)if(2===arguments.length)for(n=i.length,s=0;s<n;++s)i[s].call(this,arguments[1]);else{for(r=[],s=arguments.length,s=1;s<arguments.length;++s)r.push(arguments[s]);for(n=i.length,s=0;s<n;++s)i[s].apply(this,r)}},this.dispose=function(){e={}}}};i.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},i.prototype.push=function(e){this.trigger("data",e)},i.prototype.flush=function(e){this.trigger("done",e)},i.prototype.partialFlush=function(e){this.trigger("partialdone",e)},i.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},i.prototype.reset=function(e){this.trigger("reset",e)};var s,n,r,a,o,l,d,u,c,h,p,f,m,g,y,v,b,_,T,S,w,x,C,E,k,I,L,P,O,A,D,N,M,R,U,B,j=i,F=Math.pow(2,32),q=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0),t<Number.MAX_SAFE_INTEGER?Number(t):t):i.getUint32(0)*F+i.getUint32(4)},$={getUint64:q,MAX_UINT32:F},H=$.MAX_UINT32;(function(){var e;if(C={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!==typeof Uint8Array){for(e in C)C.hasOwnProperty(e)&&(C[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),I=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),L=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]),P=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]),O={video:L,audio:P},N=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),M=new Uint8Array([0,0,0,0,0,0,0,0]),R=M,U=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B=M,A=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),s=function(e){var t,i,s,n=[],r=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);t=n.length;while(t--)r+=n[t].byteLength;for(i=new Uint8Array(r+8),s=new DataView(i.buffer,i.byteOffset,i.byteLength),s.setUint32(0,i.byteLength),i.set(e,4),t=0,r=8;t<n.length;t++)i.set(n[t],r),r+=n[t].byteLength;return i},n=function(){return s(C.dinf,s(C.dref,N))},r=function(e){return s(C.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},a=function(){return s(C.ftyp,E,k,E,I)},v=function(e){return s(C.hdlr,O[e])},o=function(e){return s(C.mdat,e)},y=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),s(C.mdhd,t)},g=function(e){return s(C.mdia,y(e),v(e.type),d(e))},l=function(e){return s(C.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},d=function(e){return s(C.minf,"video"===e.type?s(C.vmhd,A):s(C.smhd,D),n(),_(e))},u=function(e,t){var i=[],n=t.length;while(n--)i[n]=S(t[n]);return s.apply(null,[C.moof,l(e)].concat(i))},c=function(e){var t=e.length,i=[];while(t--)i[t]=f(e[t]);return s.apply(null,[C.moov,p(4294967295)].concat(i).concat(h(e)))},h=function(e){var t=e.length,i=[];while(t--)i[t]=w(e[t]);return s.apply(null,[C.mvex].concat(i))},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,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]);return s(C.mvhd,t)},b=function(e){var t,i,n=e.samples||[],r=new Uint8Array(4+n.length);for(i=0;i<n.length;i++)t=n[i].flags,r[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return s(C.sdtp,r)},_=function(e){return s(C.stbl,T(e),s(C.stts,B),s(C.stsc,R),s(C.stsz,U),s(C.stco,M))},function(){var e,t;T=function(i){return s(C.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===i.type?e(i):t(i))},e=function(e){var t,i,n=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(i=[C.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&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s(C.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],o))),s(C.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],d=e.sarRatio[1];i.push(s(C.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&d)>>24,(16711680&d)>>16,(65280&d)>>8,255&d])))}return s.apply(null,i)},t=function(e){return s(C.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))}}(),m=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return s(C.tkhd,t)},S=function(e){var t,i,n,r,a,o,l;return t=s(C.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),o=Math.floor(e.baseMediaDecodeTime/H),l=Math.floor(e.baseMediaDecodeTime%H),i=s(C.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,l>>>24&255,l>>>16&255,l>>>8&255,255&l])),a=92,"audio"===e.type?(n=x(e,a),s(C.traf,t,i,n)):(r=b(e),n=x(e,r.length+a),s(C.traf,t,i,n,r))},f=function(e){return e.duration=e.duration||4294967295,s(C.trak,m(e),g(e))},w=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),s(C.trex,t)},function(){var e,t,i;i=function(e,t){var i=0,s=0,n=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|s|n|r,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var n,r,a,o,l,d;for(o=e.samples||[],t+=20+16*o.length,a=i(o,t),r=new Uint8Array(a.length+16*o.length),r.set(a),n=a.length,d=0;d<o.length;d++)l=o[d],r[n++]=(4278190080&l.duration)>>>24,r[n++]=(16711680&l.duration)>>>16,r[n++]=(65280&l.duration)>>>8,r[n++]=255&l.duration,r[n++]=(4278190080&l.size)>>>24,r[n++]=(16711680&l.size)>>>16,r[n++]=(65280&l.size)>>>8,r[n++]=255&l.size,r[n++]=l.flags.isLeading<<2|l.flags.dependsOn,r[n++]=l.flags.isDependedOn<<6|l.flags.hasRedundancy<<4|l.flags.paddingValue<<1|l.flags.isNonSyncSample,r[n++]=61440&l.flags.degradationPriority,r[n++]=15&l.flags.degradationPriority,r[n++]=(4278190080&l.compositionTimeOffset)>>>24,r[n++]=(16711680&l.compositionTimeOffset)>>>16,r[n++]=(65280&l.compositionTimeOffset)>>>8,r[n++]=255&l.compositionTimeOffset;return s(C.trun,r)},e=function(e,t){var n,r,a,o,l,d;for(o=e.samples||[],t+=20+8*o.length,a=i(o,t),n=new Uint8Array(a.length+8*o.length),n.set(a),r=a.length,d=0;d<o.length;d++)l=o[d],n[r++]=(4278190080&l.duration)>>>24,n[r++]=(16711680&l.duration)>>>16,n[r++]=(65280&l.duration)>>>8,n[r++]=255&l.duration,n[r++]=(4278190080&l.size)>>>24,n[r++]=(16711680&l.size)>>>16,n[r++]=(65280&l.size)>>>8,n[r++]=255&l.size;return s(C.trun,n)},x=function(i,s){return"audio"===i.type?e(i,s):t(i,s)}}();var V,z,G,J,W,X,Y,K,Q={ftyp:a,mdat:o,moof:u,moov:c,initSegment:function(e){var t,i=a(),s=c(e);return t=new Uint8Array(i.byteLength+s.byteLength),t.set(i),t.set(s,i.byteLength),t}},Z=function(e){var t,i,s=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,s.byteLength=0,t=0;t<e.length;t++)i=e[t],"access_unit_delimiter_rbsp"===i.nalUnitType?(s.length&&(s.duration=i.dts-s.dts,n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s)),s=[i],s.byteLength=i.data.byteLength,s.pts=i.pts,s.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(s.keyFrame=!0),s.duration=i.dts-s.dts,s.byteLength+=i.data.byteLength,s.push(i));return n.length&&(!s.duration||s.duration<=0)&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.length,n.duration+=s.duration,n.push(s),n},ee=function(e){var t,i,s=[],n=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)i=e[t],i.keyFrame?(s.length&&(n.push(s),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration),s=[i],s.nalCount=i.length,s.byteLength=i.byteLength,s.pts=i.pts,s.dts=i.dts,s.duration=i.duration):(s.duration+=i.duration,s.nalCount+=i.length,s.byteLength+=i.byteLength,s.push(i));return n.length&&s.duration<=0&&(s.duration=n[n.length-1].duration),n.byteLength+=s.byteLength,n.nalCount+=s.nalCount,n.duration+=s.duration,n.push(s),n},te=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},ie=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},se=function(e,t){var i=ie();return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ne=function(e,t){var i,s,n,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],s=0;s<r.length;s++)a=r[s],n=se(a,o),o+=n.size,l.push(n);return l},re=function(e){var t,i,s,n,r,a,o=0,l=e.byteLength,d=e.nalCount,u=l+4*d,c=new Uint8Array(u),h=new DataView(c.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(r=n[i],s=0;s<r.length;s++)a=r[s],h.setUint32(o,a.data.byteLength),o+=4,c.set(a.data,o),o+=a.data.byteLength;return c},ae=function(e,t){var i,s=t||0,n=[];return i=se(e,s),n.push(i),n},oe=function(e){var t,i,s=0,n=e.byteLength,r=e.length,a=n+4*r,o=new Uint8Array(a),l=new DataView(o.buffer);for(t=0;t<e.length;t++)i=e[t],l.setUint32(s,i.data.byteLength),s+=4,o.set(i.data,s),s+=i.data.byteLength;return o},le={groupNalsIntoFrames:Z,groupFramesIntoGops:ee,extendFirstKeyFrame:te,generateSampleTable:ne,concatenateNalData:re,generateSampleTableForFrame:ae,concatenateNalDataForFrame:oe},de=[33,16,5,32,164,27],ue=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ce=function(e){var t=[];while(e--)t.push(0);return t},he=function(e){return Object.keys(e).reduce((function(t,i){return t[i]=new Uint8Array(e[i].reduce((function(e,t){return e.concat(t)}),[])),t}),{})},pe=function(){if(!V){var e={96e3:[de,[227,64],ce(154),[56]],88200:[de,[231],ce(170),[56]],64e3:[de,[248,192],ce(240),[56]],48e3:[de,[255,192],ce(268),[55,148,128],ce(54),[112]],44100:[de,[255,192],ce(268),[55,163,128],ce(84),[112]],32e3:[de,[255,192],ce(268),[55,234],ce(226),[112]],24e3:[de,[255,192],ce(268),[55,255,128],ce(268),[111,112],ce(126),[224]],16e3:[de,[255,192],ce(268),[55,255,128],ce(268),[111,255],ce(269),[223,108],ce(195),[1,192]],12e3:[ue,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,253,128],ce(259),[56]],11025:[ue,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,255,192],ce(268),[55,175,128],ce(108),[112]],8e3:[ue,ce(268),[3,121,16],ce(47),[7]]};V=he(e)}return V},fe=9e4;z=function(e){return e*fe},G=function(e,t){return e*t},J=function(e){return e/fe},W=function(e,t){return e/t},X=function(e,t){return z(W(e,t))},Y=function(e,t){return G(J(e),t)},K=function(e,t,i){return J(i?e:e-t)};var me={ONE_SECOND_IN_TS:fe,secondsToVideoTs:z,secondsToAudioTs:G,videoTsToSeconds:J,audioTsToSeconds:W,audioTsToVideoTs:X,videoTsToAudioTs:Y,metadataTsToSeconds:K},ge=pe,ye=me,ve=function(e){var t,i,s=0;for(t=0;t<e.length;t++)i=e[t],s+=i.data.byteLength;return s},be=function(e,t,i,s){var n,r,a,o,l=0,d=0,u=0,c=0;if(t.length&&(n=ye.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),l=Math.ceil(ye.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&s&&(d=n-Math.max(i,s),u=Math.floor(d/l),c=u*l),!(u<1||c>ye.ONE_SECOND_IN_TS/2))){for(r=ge()[e.samplerate],r||(r=t[0].data),a=0;a<u;a++)o=t[0],t.splice(0,0,{data:r,dts:o.dts-l,pts:o.pts-l});return e.baseMediaDecodeTime-=Math.floor(ye.videoTsToAudioTs(c,e.samplerate)),c}},_e=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},Te=function(e){var t,i,s=[];for(t=0;t<e.length;t++)i=e[t],s.push({size:i.data.byteLength,duration:1024});return s},Se=function(e){var t,i,s=0,n=new Uint8Array(ve(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,s),s+=i.data.byteLength;return n},we={prefixWithSilence:be,trimAdtsFramesByEarliestDts:_e,generateSampleTable:Te,concatenateFrameData:Se},xe=me.ONE_SECOND_IN_TS,Ce=function(e,t){"number"===typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"===typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Ee=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},ke=function(e,t){var i,s,n=e.minSegmentDts;return t||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===e.type&&(s=e.samplerate/xe,i*=s,i=Math.floor(i)),i},Ie={clearDtsInfo:Ee,calculateTrackBaseMediaDecodeTime:ke,collectDtsInfo:Ce},Le=4,Pe=128,Oe=function(e){var t=0,i={payloadType:-1,payloadSize:0},s=0,n=0;while(t<e.byteLength){if(e[t]===Pe)break;while(255===e[t])s+=255,t++;s+=e[t++];while(255===e[t])n+=255,t++;if(n+=e[t++],!i.payload&&s===Le){var r=String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6]);if("GA94"===r){i.payloadType=s,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,s=0,n=0}return i},Ae=function(e){return 181!==e.payload[0]||49!==(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},De=function(e,t){var i,s,n,r,a=[];if(!(64&t[0]))return a;for(s=31&t[0],i=0;i<s;i++)n=3*i,r={type:3&t[n+2],pts:e},4&t[n+2]&&(r.ccData=t[n+3]<<8|t[n+4],a.push(r));return a},Ne=function(e){var t,i,s=e.byteLength,n=[],r=1;while(r<s-2)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},Me={parseSei:Oe,parseUserData:Ae,parseCaptionPackets:De,discardEmulationPreventionBytes:Ne,USER_DATA_REGISTERED_ITU_T_T35:Le},Re=j,Ue=Me,Be=function(e){e=e||{},Be.prototype.init.call(this),this.parse708captions_="boolean"!==typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ye(0,0),new Ye(0,1),new Ye(1,0),new Ye(1,1)],this.parse708captions_&&(this.cc708Stream_=new Ve({captionServices:e.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Be.prototype=new Re,Be.prototype.push=function(e){var t,i,s;if("sei_rbsp"===e.nalUnitType&&(t=Ue.parseSei(e.escapedRBSP),t.payload&&t.payloadType===Ue.USER_DATA_REGISTERED_ITU_T_T35&&(i=Ue.parseUserData(t),i)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=Ue.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Be.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},Be.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Be.prototype.flush=function(){return this.flushStream("flush")},Be.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Be.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Be.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Be.prototype.setsChannel1Active=function(e){return 4096===(30720&e.ccData)},Be.prototype.setsChannel2Active=function(e){return 6144===(30720&e.ccData)},Be.prototype.setsTextOrXDSActive=function(e){return 256===(28928&e.ccData)||4138===(30974&e.ccData)||6186===(30974&e.ccData)},Be.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var je={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Fe=function(e){var t=je[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)},qe=function(e){return 32<=e&&e<=127||160<=e&&e<=255},$e=function(e){this.windowNum=e,this.reset()};$e.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},$e.prototype.getText=function(){return this.rows.join("\n")},$e.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},$e.prototype.newLine=function(e){this.rows.length>=this.virtualRowCount&&"function"===typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);while(this.rows.length>this.virtualRowCount)this.rows.shift(),this.rowIdx--},$e.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},$e.prototype.addText=function(e){this.rows[this.rowIdx]+=e},$e.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var He=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new $e(-1),this.windows=[],this.stream=i,"string"===typeof t&&this.createTextDecoder(t)};He.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new $e(i),"function"===typeof t&&(this.windows[i].beforeRowOverflow=t)},He.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},He.prototype.createTextDecoder=function(e){if("undefined"===typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Ve=function(e){e=e||{},Ve.prototype.init.call(this);var t,i=this,s=e.captionServices||{},n={};Object.keys(s).forEach(e=>{t=s[e],/^SERVICE/.test(e)&&(n[e]=t.encoding)}),this.serviceEncodings=n,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Ve.prototype=new Re,Ve.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ve.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(s)},Ve.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,s=null,n=0,r=t[n++];for(e.seq=r>>6,e.sizeCode=63&r;n<t.length;n++)r=t[n++],i=r>>5,s=31&r,7===i&&s>0&&(r=t[n++],i=r),this.pushServiceBlock(i,n,s),s>0&&(n+=s-1)},Ve.prototype.pushServiceBlock=function(e,t,i){var s,n=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,n));n<t+i&&n<r.length;n++)s=r[n],qe(s)?n=this.handleText(n,a):24===s?n=this.multiByteCharacter(n,a):16===s?n=this.extendedCommands(n,a):128<=s&&s<=135?n=this.setCurrentWindow(n,a):152<=s&&s<=159?n=this.defineWindow(n,a):136===s?n=this.clearWindows(n,a):140===s?n=this.deleteWindows(n,a):137===s?n=this.displayWindows(n,a):138===s?n=this.hideWindows(n,a):139===s?n=this.toggleWindows(n,a):151===s?n=this.setWindowAttributes(n,a):144===s?n=this.setPenAttributes(n,a):145===s?n=this.setPenColor(n,a):146===s?n=this.setPenLocation(n,a):143===s?a=this.reset(n,a):8===s?a.currentWindow.backspace():12===s?a.currentWindow.clearText():13===s?a.currentWindow.pendingNewLine=!0:14===s?a.currentWindow.clearText():141===s&&n++},Ve.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data,s=i[++e];return qe(s)&&(e=this.handleText(e,t,{isExtended:!0})),e},Ve.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Ve.prototype.initService=function(e,t){var i,s="SERVICE"+e,n=this;return s in this.serviceEncodings&&(i=this.serviceEncodings[s]),this.services[e]=new He(e,i,n),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},Ve.prototype.handleText=function(e,t,i){var s,n,r=i&&i.isExtended,a=i&&i.isMultiByte,o=this.current708Packet.data,l=r?4096:0,d=o[e],u=o[e+1],c=t.currentWindow;function h(e){return e.map(e=>("0"+(255&e).toString(16)).slice(-2)).join("")}if(a?(n=[d,u],e++):n=[d],t.textDecoder_&&!r)s=t.textDecoder_.decode(new Uint8Array(n));else if(a){const e=h(n);s=String.fromCharCode(parseInt(e,16))}else s=Fe(l|d);return c.pendingNewLine&&!c.isEmpty()&&c.newLine(this.getPts(e)),c.pendingNewLine=!1,c.addText(s),e},Ve.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,s=i[e+1],n=i[e+2];return qe(s)&&qe(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Ve.prototype.setCurrentWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;return t.setCurrentWindow(n),e},Ve.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,s=i[e],n=7&s;t.setCurrentWindow(n);var r=t.currentWindow;return s=i[++e],r.visible=(32&s)>>5,r.rowLock=(16&s)>>4,r.columnLock=(8&s)>>3,r.priority=7&s,s=i[++e],r.relativePositioning=(128&s)>>7,r.anchorVertical=127&s,s=i[++e],r.anchorHorizontal=s,s=i[++e],r.anchorPoint=(240&s)>>4,r.rowCount=15&s,s=i[++e],r.columnCount=63&s,s=i[++e],r.windowStyle=(56&s)>>3,r.penStyle=7&s,r.virtualRowCount=r.rowCount+1,e},Ve.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.winAttr;return s=i[++e],n.fillOpacity=(192&s)>>6,n.fillRed=(48&s)>>4,n.fillGreen=(12&s)>>2,n.fillBlue=3&s,s=i[++e],n.borderType=(192&s)>>6,n.borderRed=(48&s)>>4,n.borderGreen=(12&s)>>2,n.borderBlue=3&s,s=i[++e],n.borderType+=(128&s)>>5,n.wordWrap=(64&s)>>6,n.printDirection=(48&s)>>4,n.scrollDirection=(12&s)>>2,n.justify=3&s,s=i[++e],n.effectSpeed=(240&s)>>4,n.effectDirection=(12&s)>>2,n.displayEffect=3&s,e},Ve.prototype.flushDisplayed=function(e,t){for(var i=[],s=0;s<8;s++)t.windows[s].visible&&!t.windows[s].isEmpty()&&i.push(t.windows[s].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},Ve.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Ve.prototype.displayWindows=function(e,t){var i=this.current708Packet.data,s=i[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)s&1<<r&&(t.windows[r].visible=1);return e},Ve.prototype.hideWindows=function(e,t){var i=this.current708Packet.data,s=i[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)s&1<<r&&(t.windows[r].visible=0);return e},Ve.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data,s=i[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)s&1<<r&&(t.windows[r].visible^=1);return e},Ve.prototype.clearWindows=function(e,t){var i=this.current708Packet.data,s=i[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)s&1<<r&&t.windows[r].clearText();return e},Ve.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data,s=i[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var r=0;r<8;r++)s&1<<r&&t.windows[r].reset();return e},Ve.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penAttr;return s=i[++e],n.textTag=(240&s)>>4,n.offset=(12&s)>>2,n.penSize=3&s,s=i[++e],n.italics=(128&s)>>7,n.underline=(64&s)>>6,n.edgeType=(56&s)>>3,n.fontStyle=7&s,e},Ve.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penColor;return s=i[++e],n.fgOpacity=(192&s)>>6,n.fgRed=(48&s)>>4,n.fgGreen=(12&s)>>2,n.fgBlue=3&s,s=i[++e],n.bgOpacity=(192&s)>>6,n.bgRed=(48&s)>>4,n.bgGreen=(12&s)>>2,n.bgBlue=3&s,s=i[++e],n.edgeRed=(48&s)>>4,n.edgeGreen=(12&s)>>2,n.edgeBlue=3&s,e},Ve.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,s=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,s=i[++e],n.row=15&s,s=i[++e],n.column=63&s,e},Ve.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var ze={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ge=function(e){return null===e?"":(e=ze[e]||e,String.fromCharCode(e))},Je=14,We=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Xe=function(){var e=[],t=Je+1;while(t--)e.push({text:"",indent:0,offset:0});return e},Ye=function(e,t){Ye.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,s,n,r;if(t=32639&e.ccData,t!==this.lastControlCode_){if(4096===(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Xe();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Xe();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Xe()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))s=(3&s)<<8,r=Ge(s|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(s,n))"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),s=(3&s)<<8,r=Ge(s|n),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14===(14&n)&&this.addFormatting(e.pts,["i"]),1===(1&n)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(s,n)){const e=3&n;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(s,n)){var a=We.indexOf(7968&t);if("rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&n&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16===(16&t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(n)&&14===(14&n)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(s)&&(0===n&&(n=null),r=Ge(s),r+=Ge(n),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ye.prototype=new Re,Ye.prototype.flushDisplayed=function(e){const t=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},i=[];this.displayed_.forEach((e,s)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(n){t(s)}e.text.length&&i.push({text:e.text,line:s+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else void 0!==e&&null!==e||t(s)}),i.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ye.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Xe(),this.nonDisplayed_=Xe(),this.lastControlCode_=null,this.column_=0,this.row_=Je,this.rollUpRows_=2,this.formatting_=[]},Ye.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ye.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ye.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ye.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ye.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ye.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ye.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ye.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ye.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=Je,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Xe(),this.displayed_=Xe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:"",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ye.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},Ye.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},Ye.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ye.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ye.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.row_+1;e<Je+1;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Ye.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var Ke={CaptionStream:Be,Cea608Stream:Ye,Cea708Stream:Ve},Qe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ze=j,et=8589934592,tt=4294967296,it="shared",st=function(e,t){var i=1;e>t&&(i=-1);while(Math.abs(t-e)>tt)e+=i*et;return e},nt=function(e){var t,i;nt.prototype.init.call(this),this.type_=e||it,this.push=function(e){"metadata"!==e.type?this.type_!==it&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=st(e.dts,i),e.pts=st(e.pts,i),t=e.dts,this.trigger("data",e)):this.trigger("data",e)},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};nt.prototype=new Ze;var rt,at={TimestampRolloverStream:nt,handleRollover:st},ot=(e,t,i)=>{if(!e)return-1;for(var s=i;s<e.length;s++)if(e[s]===t)return s;return-1},lt={typedArrayIndexOf:ot},dt=lt.typedArrayIndexOf,ut={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},ct=function(e,t,i){var s,n="";for(s=t;s<i;s++)n+="%"+("00"+e[s].toString(16)).slice(-2);return n},ht=function(e,t,i){return decodeURIComponent(ct(e,t,i))},pt=function(e,t,i){return unescape(ct(e,t,i))},ft=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},mt={APIC:function(e){var t,i,s=1,n="--\x3e";e.data[0]===ut.Utf8&&(t=dt(e.data,0,s),t<0||(e.mimeType=pt(e.data,s,t),s=t+1,e.pictureType=e.data[s],s++,i=dt(e.data,0,s),i<0||(e.description=ht(e.data,s,i),s=i+1,e.mimeType===n?e.url=pt(e.data,s,e.data.length):e.pictureData=e.data.subarray(s,e.data.length))))},"T*":function(e){e.data[0]===ut.Utf8&&(e.value=ht(e.data,1,e.data.length).replace(/\0*$/,""),e.values=e.value.split("\0"))},TXXX:function(e){var t;e.data[0]===ut.Utf8&&(t=dt(e.data,0,1),-1!==t&&(e.description=ht(e.data,1,t),e.value=ht(e.data,t+1,e.data.length).replace(/\0*$/,""),e.data=e.value))},"W*":function(e){e.url=pt(e.data,0,e.data.length).replace(/\0.*$/,"")},WXXX:function(e){var t;e.data[0]===ut.Utf8&&(t=dt(e.data,0,1),-1!==t&&(e.description=ht(e.data,1,t),e.url=pt(e.data,t+1,e.data.length).replace(/\0.*$/,"")))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=pt(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},gt=function(e){var t,i,s=10,n=0,r=[];if(!(e.length<10||e[0]!=="I".charCodeAt(0)||e[1]!=="D".charCodeAt(0)||e[2]!=="3".charCodeAt(0))){n=ft(e.subarray(6,10)),n+=10;var a=64&e[5];a&&(s+=4,s+=ft(e.subarray(10,14)),n-=ft(e.subarray(16,20)));do{if(t=ft(e.subarray(s+4,s+8)),t<1)break;i=String.fromCharCode(e[s],e[s+1],e[s+2],e[s+3]);var o={id:i,data:e.subarray(s+10,s+t+10)};o.key=o.id,mt[o.id]?mt[o.id](o):"T"===o.id[0]?mt["T*"](o):"W"===o.id[0]&&mt["W*"](o),r.push(o),s+=10,s+=t}while(s<n);return r}},yt={parseId3Frames:gt,parseSyncSafeInteger:ft,frameParsers:mt},vt=j,bt=Qe,_t=yt;rt=function(e){var t,i={descriptor:e&&e.descriptor},s=0,n=[],r=0;if(rt.prototype.init.call(this),this.dispatchType=bt.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l,d;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(r=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(n.push(e),r+=e.data.byteLength,1===n.length&&(s=_t.parseSyncSafeInteger(e.data.subarray(6,10)),s+=10),!(r<s)){for(t={data:new Uint8Array(s),frames:[],pts:n[0].pts,dts:n[0].dts},l=0;l<s;)t.data.set(n[0].data.subarray(0,s-l),l),l+=n[0].data.byteLength,r-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=_t.parseSyncSafeInteger(t.data.subarray(10,14)),s-=_t.parseSyncSafeInteger(t.data.subarray(16,20)));do{if(a=_t.parseSyncSafeInteger(t.data.subarray(i+4,i+8)),a<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(d=String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),o={id:d,data:t.data.subarray(i+10,i+a+10)},o.key=o.id,_t.frameParsers[o.id]?_t.frameParsers[o.id](o):"T"===o.id[0]?_t.frameParsers["T*"](o):"W"===o.id[0]&&_t.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var u=o.data,c=(1&u[3])<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;c*=4,c+=3&u[7],o.timeStamp=c,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),i+=10,i+=a}while(i<s);this.trigger("data",t)}}},rt.prototype=new vt;var Tt,St,wt,xt=rt,Ct=j,Et=Ke,kt=Qe,It=at.TimestampRolloverStream,Lt=188,Pt=71;Tt=function(){var e=new Uint8Array(Lt),t=0;Tt.prototype.init.call(this),this.push=function(i){var s,n=0,r=Lt;t?(s=new Uint8Array(i.byteLength+t),s.set(e.subarray(0,t)),s.set(i,t),t=0):s=i;while(r<s.byteLength)s[n]!==Pt||s[r]!==Pt?(n++,r++):(this.trigger("data",s.subarray(n,r)),n+=Lt,r+=Lt);n<s.byteLength&&(e.set(s.subarray(n),0),t=s.byteLength-n)},this.flush=function(){t===Lt&&e[0]===Pt&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}},Tt.prototype=new Ct,St=function(){var e,t,i,s;St.prototype.init.call(this),s=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,s){var n=0;s.payloadUnitStartIndicator&&(n+=e[n]+1),"pat"===s.type?t(e.subarray(n),s):i(e.subarray(n),s)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},i=function(e,t){var i,n,r,a;if(1&e[5]){s.programMapTable={video:null,audio:null,"timed-metadata":{}},i=(15&e[1])<<8|e[2],n=3+i-4,r=(15&e[10])<<8|e[11],a=12+r;while(a<n){var o=e[a],l=(31&e[a+1])<<8|e[a+2];o===kt.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=l:o===kt.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=l:o===kt.METADATA_STREAM_TYPE&&(s.programMapTable["timed-metadata"][l]=o),a+=5+((15&e[a+3])<<8|e[a+4])}t.programMapTable=s.programMapTable}},this.push=function(t){var i={},s=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(s+=t[s]+1),0===i.pid)i.type="pat",e(t.subarray(s),i),this.trigger("data",i);else if(i.pid===this.pmtPid){i.type="pmt",e(t.subarray(s),i),this.trigger("data",i);while(this.packetsWaitingForPmt.length)this.processPes_.apply(this,this.packetsWaitingForPmt.shift())}else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,s,i]):this.processPes_(t,s,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=kt.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=kt.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},St.prototype=new Ct,St.STREAM_TYPES={h264:27,adts:15},wt=function(){var e,t=this,i=!1,s={data:[],size:0},n={data:[],size:0},r={data:[],size:0},a=function(e,t){var i;const s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!==(4&e[6]),i=e[7],192&i&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))},o=function(e,i,s){var n,r=new Uint8Array(e.size),o={type:i},l=0,d=0,u=!1;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)n=e.data[l],r.set(n.data,d),d+=n.data.byteLength;a(r,o),u="video"===i||o.packetLength<=e.size,(s||u)&&(e.size=0,e.data.length=0),u&&t.trigger("data",o)}};wt.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var e,t;switch(a.streamType){case kt.H264_STREAM_TYPE:e=s,t="video";break;case kt.ADTS_STREAM_TYPE:e=n,t="audio";break;case kt.METADATA_STREAM_TYPE:e=r,t="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(a),e.size+=a.data.byteLength},pmt:function(){var s={type:"metadata",tracks:[]};e=a.programMapTable,null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),i=!0,t.trigger("data",s)}})[a.type]()},this.reset=function(){s.size=0,s.data.length=0,n.size=0,n.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(s,"video"),o(n,"audio"),o(r,"timed-metadata")},this.flush=function(){if(!i&&e){var s={type:"metadata",tracks:[]};null!==e.video&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&s.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",s)}i=!1,this.flushStreams_(),this.trigger("done")}},wt.prototype=new Ct;var Ot={PAT_PID:0,MP2T_PACKET_LENGTH:Lt,TransportPacketStream:Tt,TransportParseStream:St,ElementaryStream:wt,TimestampRolloverStream:It,CaptionStream:Et.CaptionStream,Cea608Stream:Et.Cea608Stream,Cea708Stream:Et.Cea708Stream,MetadataStream:xt};for(var At in kt)kt.hasOwnProperty(At)&&(Ot[At]=kt[At]);var Dt,Nt=Ot,Mt=j,Rt=me.ONE_SECOND_IN_TS,Ut=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Dt=function(e){var t,i=0;Dt.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:`adts skiping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(s){var n,r,a,o,l,d=0;if(e||(i=0),"audio"===s.type){var u;t&&t.length?(a=t,t=new Uint8Array(a.byteLength+s.data.byteLength),t.set(a),t.set(s.data,a.byteLength)):t=s.data;while(d+7<t.length)if(255===t[d]&&240===(246&t[d+1])){if("number"===typeof u&&(this.skipWarn_(u,d),u=null),r=2*(1&~t[d+1]),n=(3&t[d+3])<<11|t[d+4]<<3|(224&t[d+5])>>5,o=1024*(1+(3&t[d+6])),l=o*Rt/Ut[(60&t[d+2])>>>2],t.byteLength-d<n)break;this.trigger("data",{pts:s.pts+i*l,dts:s.dts+i*l,sampleCount:o,audioobjecttype:1+(t[d+2]>>>6&3),channelcount:(1&t[d+2])<<2|(192&t[d+3])>>>6,samplerate:Ut[(60&t[d+2])>>>2],samplingfrequencyindex:(60&t[d+2])>>>2,samplesize:16,data:t.subarray(d+7+r,d+n)}),i++,d+=n}else"number"!==typeof u&&(u=d),d++;"number"===typeof u&&(this.skipWarn_(u,d),u=null),t=t.subarray(d)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},Dt.prototype=new Mt;var Bt,jt=Dt;Bt=function(e){var t=e.byteLength,i=0,s=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+s},this.loadWord=function(){var n=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");r.set(e.subarray(n,n+a)),i=new DataView(r.buffer).getUint32(0),s=8*a,t-=a},this.skipBits=function(e){var n;s>e?(i<<=e,s-=e):(e-=s,n=Math.floor(e/8),e-=8*n,t-=n,this.loadWord(),i<<=e,s-=e)},this.readBits=function(e){var n=Math.min(s,e),r=i>>>32-n;return s-=n,s>0?i<<=n:t>0&&this.loadWord(),n=e-n,n>0?r<<n|this.readBits(n):r},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(0!==(i&2147483648>>>e))return i<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Ft,qt,$t,Ht=Bt,Vt=j,zt=Ht;qt=function(){var e,t,i=0;qt.prototype.init.call(this),this.push=function(s){var n;t?(n=new Uint8Array(t.byteLength+s.data.byteLength),n.set(t),n.set(s.data,t.byteLength),t=n):t=s.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}while(e<r)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3;break}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},qt.prototype=new Vt,$t={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ft=function(){var e,t,i,s,n,r,a,o=new qt;Ft.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:i,dts:s,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=n(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=n(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp";break}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,s,n=8,r=8;for(i=0;i<e;i++)0!==r&&(s=t.readExpGolomb(),r=(n+s+256)%256),n=0===r?n:r},n=function(e){var t,i,s=e.byteLength,n=[],r=1;while(r<s-2)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;t=s-n.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===n[0]&&(a++,n.shift()),i[r]=e[a];return i},r=function(e){var t,i,s,n,r,o,l,d,u,c,h,p,f,m=0,g=0,y=0,v=0,b=[1,1];if(t=new zt(e),i=t.readUnsignedByte(),n=t.readUnsignedByte(),s=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),$t[i]&&(r=t.readUnsignedExpGolomb(),3===r&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==r?8:12,f=0;f<h;f++)t.readBoolean()&&a(f<6?16:64,t);if(t.skipUnsignedExpGolomb(),o=t.readUnsignedExpGolomb(),0===o)t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),f=0;f<l;f++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),d=t.readUnsignedExpGolomb(),u=t.readUnsignedExpGolomb(),c=t.readBits(1),0===c&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(p=t.readUnsignedByte(),p){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()];break}b&&(b[0],b[1])}return{profileIdc:i,levelIdc:s,profileCompatibility:n,width:16*(d+1)-2*m-2*g,height:(2-c)*(u+1)*16-2*y-2*v,sarRatio:b}}},Ft.prototype=new Vt;var Gt,Jt={H264Stream:Ft,NalByteStream:qt},Wt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Xt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],s=e[t+5],n=(16&s)>>4;return i=i>=0?i:0,n?i+20:i+10},Yt=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=Xt(e,t),Yt(e,t))},Kt=function(e){var t=Yt(e,0);return e.length>=t+2&&255===(255&e[t])&&240===(240&e[t+1])&&16===(22&e[t+1])},Qt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Zt=function(e,t,i){var s,n="";for(s=t;s<i;s++)n+="%"+("00"+e[s].toString(16)).slice(-2);return n},ei=function(e,t,i){return unescape(Zt(e,t,i))},ti=function(e,t){var i=(224&e[t+5])>>5,s=e[t+4]<<3,n=6144&e[t+3];return n|s|i},ii=function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240===(240&e[t+1])?"audio":null},si=function(e){var t=0;while(t+5<e.length){if(255===e[t]&&240===(246&e[t+1]))return Wt[(60&e[t+2])>>>2];t++}return null},ni=function(e){var t,i,s,n;t=10,64&e[5]&&(t+=4,t+=Qt(e.subarray(10,14)));do{if(i=Qt(e.subarray(t+4,t+8)),i<1)return null;if(n=String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3]),"PRIV"===n){s=e.subarray(t+10,t+i+10);for(var r=0;r<s.byteLength;r++)if(0===s[r]){var a=ei(s,0,r);if("com.apple.streaming.transportStreamTimestamp"===a){var o=s.subarray(r+1),l=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return l*=4,l+=3&o[7],l}break}}t+=10,t+=i}while(t<e.byteLength);return null},ri={isLikelyAacData:Kt,parseId3TagSize:Xt,parseAdtsSize:ti,parseType:ii,parseSampleRate:si,parseAacTimestamp:ni},ai=j,oi=ri;Gt=function(){var e=new Uint8Array,t=0;Gt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var s,n,r,a,o=0,l=0;e.length?(a=e.length,e=new Uint8Array(i.byteLength+a),e.set(e.subarray(0,a)),e.set(i,a)):e=i;while(e.length-l>=3)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!==(255&e[l])||240!==(240&e[l+1]))l++;else{if(e.length-l<7)break;if(o=oi.parseAdtsSize(e,l),l+o>e.length)break;r={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",r),l+=o}else{if(e.length-l<10)break;if(o=oi.parseId3TagSize(e,l),l+o>e.length)break;n={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",n),l+=o}s=e.length-l,e=s>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}},Gt.prototype=new ai;var li,di,ui,ci,hi=Gt,pi=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],fi=pi,mi=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],gi=mi,yi=j,vi=Q,bi=le,_i=we,Ti=Ie,Si=Nt,wi=me,xi=jt,Ci=Jt.H264Stream,Ei=hi,ki=ri.isLikelyAacData,Ii=me.ONE_SECOND_IN_TS,Li=fi,Pi=gi,Oi=function(e,t){t.stream=e,this.trigger("log",t)},Ai=function(e,t){for(var i=Object.keys(t),s=0;s<i.length;s++){var n=i[s];"headOfPipeline"!==n&&t[n].on&&t[n].on("log",Oi.bind(e,n))}},Di=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ni=function(e,t,i,s,n,r){var a=i-t,o=s-t,l=n-i;return{start:{dts:e,pts:e+a},end:{dts:e+o,pts:e+l},prependedContentDuration:r,baseMediaDecodeTime:e}};di=function(e,t){var i,s=[],n=0,r=0,a=1/0;t=t||{},i=t.firstSequenceNumber||0,di.prototype.init.call(this),this.push=function(t){Ti.collectDtsInfo(e,t),e&&Li.forEach((function(i){e[i]=t[i]})),s.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,d,u,c,h,p;0!==s.length?(o=_i.trimAdtsFramesByEarliestDts(s,e,n),e.baseMediaDecodeTime=Ti.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=_i.prefixWithSilence(e,o,r,a),e.samples=_i.generateSampleTable(o),d=vi.mdat(_i.concatenateFrameData(o)),s=[],l=vi.moof(i,[e]),u=new Uint8Array(l.byteLength+d.byteLength),i++,u.set(l),u.set(d,l.byteLength),Ti.clearDtsInfo(e),c=Math.ceil(1024*Ii/e.samplerate),o.length&&(h=o.length*c,this.trigger("segmentTimingInfo",Ni(wi.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:u}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Ti.clearDtsInfo(e),s=[],this.trigger("reset")}},di.prototype=new yi,li=function(e,t){var i,s,n,r=[],a=[];t=t||{},i=t.firstSequenceNumber||0,li.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Ti.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||s||(s=t.config,e.sps=[t.data],Pi.forEach((function(t){e[t]=s[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){var s,n,o,l,d,u,c,h,p=0;while(r.length){if("access_unit_delimiter_rbsp"===r[0].nalUnitType)break;r.shift()}if(0===r.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(s=bi.groupNalsIntoFrames(r),o=bi.groupFramesIntoGops(s),o[0][0].keyFrame||(n=this.getGopForFusion_(r[0],e),n?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=bi.extendFirstKeyFrame(o)),a.length){var f;if(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o),!f)return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Ti.clearDtsInfo(e),o=f}Ti.collectDtsInfo(e,o),e.samples=bi.generateSampleTable(o),d=vi.mdat(bi.concatenateNalData(o)),e.baseMediaDecodeTime=Ti.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),c=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Ni(e.baseMediaDecodeTime,c.dts,c.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),r=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=vi.moof(i,[e]),u=new Uint8Array(l.byteLength+d.byteLength),i++,u.set(l),u.set(d,l.byteLength),this.trigger("data",{track:e,boxes:u}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){Ti.clearDtsInfo(e),s=void 0,n=void 0},this.getGopForFusion_=function(t){var i,s,n,r,a,o=45e3,l=1e4,d=1/0;for(a=0;a<this.gopCache_.length;a++)r=this.gopCache_[a],n=r.gop,e.pps&&Di(e.pps[0],r.pps[0])&&e.sps&&Di(e.sps[0],r.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration,i>=-l&&i<=o&&(!s||d>i)&&(s=r,d=i)));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,i,s,n,r,o,l,d;r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;while(t<a.length&&i<e.length){if(s=a[t],n=e[i],s.pts===n.pts)break;n.pts>s.pts?t++:(i++,r-=n.byteLength,o-=n.nalCount,l-=n.duration)}return 0===i?e:i===e.length?null:(d=e.slice(i),d.byteLength=r,d.duration=l,d.nalCount=o,d.pts=d[0].pts,d.dts=d[0].dts,d)},this.alignGopsAtEnd_=function(e){var t,i,s,n,r,o,l;t=a.length-1,i=e.length-1,r=null,o=!1;while(t>=0&&i>=0){if(s=a[t],n=e[i],s.pts===n.pts){o=!0;break}s.pts>n.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(l=o?i:r,0===l)return e;var d=e.slice(l),u=d.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return d.byteLength=u.byteLength,d.duration=u.duration,d.nalCount=u.nalCount,d.pts=d[0].pts,d.dts=d[0].dts,d},this.alignGopsWith=function(e){a=e}},li.prototype=new yi,ci=function(e,t){this.numberOfTracks=0,this.metadataStream=t,e=e||{},"undefined"!==typeof e.remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"===typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,ci.prototype.init.call(this),this.push=function(e){return e.content||e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},ci.prototype=new yi,ci.prototype.flush=function(e){var t,i,s,n,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Pi.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Li.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,s=vi.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(s.byteLength),a.initSegment.set(s),a.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)a.data.set(this.pendingBoxes[n],r),r+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)t=this.pendingCaptions[n],t.startTime=wi.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=wi.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)i=this.pendingMetadata[n],i.cueTime=wi.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),n=0;n<a.captions.length;n++)t=a.captions[n],this.trigger("caption",t);for(n=0;n<a.metadata.length;n++)i=a.metadata[n],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},ci.prototype.setRemux=function(e){this.remuxTracks=e},ui=function(e){var t,i,s=this,n=!0;ui.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type="aac",n.metadataStream=new Si.MetadataStream,n.aacStream=new Ei,n.audioTimestampRolloverStream=new Si.TimestampRolloverStream("audio"),n.timedMetadataTimestampRolloverStream=new Si.TimestampRolloverStream("timed-metadata"),n.adtsStream=new xi,n.coalesceStream=new ci(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on("timestamp",(function(e){n.aacStream.setTimestamp(e.timeStamp)})),n.aacStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new di(i,e),n.audioSegmentStream.on("log",s.getLogTrigger_("audioSegmentStream")),n.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),s.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),n.coalesceStream.on("data",this.trigger.bind(this,"data")),n.coalesceStream.on("done",this.trigger.bind(this,"done")),Ai(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type="ts",n.metadataStream=new Si.MetadataStream,n.packetStream=new Si.TransportPacketStream,n.parseStream=new Si.TransportParseStream,n.elementaryStream=new Si.ElementaryStream,n.timestampRolloverStream=new Si.TimestampRolloverStream,n.adtsStream=new xi,n.h264Stream=new Ci,n.captionStream=new Si.CaptionStream(e),n.coalesceStream=new ci(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on("data",(function(r){var a;if("metadata"===r.type){a=r.tracks.length;while(a--)t||"video"!==r.tracks[a].type?i||"audio"!==r.tracks[a].type||(i=r.tracks[a],i.timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(t=r.tracks[a],t.timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime);t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new li(t,e),n.videoSegmentStream.on("log",s.getLogTrigger_("videoSegmentStream")),n.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-s.baseMediaDecodeTime))})),n.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),n.videoSegmentStream.on("segmentTimingInfo",s.trigger.bind(s,"videoSegmentTimingInfo")),n.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),n.videoSegmentStream.on("timingInfo",s.trigger.bind(s,"videoTimingInfo")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new di(i,e),n.audioSegmentStream.on("log",s.getLogTrigger_("audioSegmentStream")),n.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),n.audioSegmentStream.on("segmentTimingInfo",s.trigger.bind(s,"audioSegmentTimingInfo")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),s.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),n.coalesceStream.on("data",this.trigger.bind(this,"data")),n.coalesceStream.on("id3Frame",(function(e){e.dispatchType=n.metadataStream.dispatchType,s.trigger("id3Frame",e)})),n.coalesceStream.on("caption",this.trigger.bind(this,"caption")),n.coalesceStream.on("done",this.trigger.bind(this,"done")),Ai(this,n)},this.setBaseMediaDecodeTime=function(s){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=s),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Ti.clearDtsInfo(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Ti.clearDtsInfo(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(n){var t=ki(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ui.prototype=new yi;var Mi,Ri={Transmuxer:ui,VideoSegmentStream:li,AudioSegmentStream:di,AUDIO_PROPERTIES:Li,VIDEO_PROPERTIES:Pi,generateSegmentTimingInfo:Ni},Ui=function(e){return e>>>0},Bi=function(e){return("00"+e.toString(16)).slice(-2)},ji={toUnsigned:Ui,toHexString:Bi},Fi=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3]),t},qi=Fi,$i=ji.toUnsigned,Hi=qi,Vi=function(e,t){var i,s,n,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)s=$i(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=Hi(e.subarray(i+4,i+8)),r=s>1?i+s:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=Vi(e.subarray(i+8,r),t.slice(1)),a.length&&(o=o.concat(a)))),i=r;return o},zi=Vi,Gi=ji.toUnsigned,Ji=$.getUint64,Wi=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Ji(e.subarray(4)):t.baseMediaDecodeTime=Gi(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Xi=Wi,Yi=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Ki=Yi,Qi=Ki,Zi=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},s=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],d=8&i.flags[1],u=s.getUint32(4),c=8;n&&(i.dataOffset=s.getInt32(c),c+=4),r&&u&&(t={flags:Qi(e.subarray(c,c+4))},c+=4,a&&(t.duration=s.getUint32(c),c+=4),o&&(t.size=s.getUint32(c),c+=4),d&&(1===i.version?t.compositionTimeOffset=s.getInt32(c):t.compositionTimeOffset=s.getUint32(c),c+=4),i.samples.push(t),u--);while(u--)t={},a&&(t.duration=s.getUint32(c),c+=4),o&&(t.size=s.getUint32(c),c+=4),l&&(t.flags=Qi(e.subarray(c,c+4)),c+=4),d&&(1===i.version?t.compositionTimeOffset=s.getInt32(c):t.compositionTimeOffset=s.getUint32(c),c+=4),i.samples.push(t);return i},es=Zi,ts=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&s.flags[2],r=2&s.flags[2],a=8&s.flags[2],o=16&s.flags[2],l=32&s.flags[2],d=65536&s.flags[0],u=131072&s.flags[0];return t=8,n&&(t+=4,s.baseDataOffset=i.getUint32(12),t+=4),r&&(s.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(s.defaultSampleDuration=i.getUint32(t),t+=4),o&&(s.defaultSampleSize=i.getUint32(t),t+=4),l&&(s.defaultSampleFlags=i.getUint32(t)),d&&(s.durationIsEmpty=!0),!n&&u&&(s.baseDataOffsetIsMoof=!0),s},is=ts;Mi="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{};var ss,ns,rs,as,os,ls,ds,us=Mi,cs=Me.discardEmulationPreventionBytes,hs=Ke.CaptionStream,ps=zi,fs=Xi,ms=es,gs=is,ys=us,vs=function(e,t){for(var i=e,s=0;s<t.length;s++){var n=t[s];if(i<n.size)return n;i-=n.size}return null},bs=function(e,t,i){var s,n,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=r)if(r=o.getUint32(n),n+=4,!(r<=0))switch(31&e[n]){case 6:var d=e.subarray(n+1,n+1+r),u=vs(n,t);if(s={nalUnitType:"sei_rbsp",size:r,data:d,escapedRBSP:cs(d),trackId:i},u)s.pts=u.pts,s.dts=u.dts,a=u;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+n+" for trackId "+i+". See mux.js#223."});break}s.pts=a.pts,s.dts=a.dts}l.seiNals.push(s);break}return l},_s=function(e,t,i){var s=t,n=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=ms(e),i=t.samples;i.forEach((function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"===typeof s?(e.pts=s+ys.BigInt(e.compositionTimeOffset),s+=ys.BigInt(e.duration)):(e.pts=s+e.compositionTimeOffset,s+=e.duration)})),o=o.concat(i)})),o},Ts=function(e,t){var i=ps(e,["moof","traf"]),s=ps(e,["mdat"]),n={},r=[];return s.forEach((function(e,t){var s=i[t];r.push({mdat:e,traf:s})})),r.forEach((function(e){var i,s,r=e.mdat,a=e.traf,o=ps(a,["tfhd"]),l=gs(o[0]),d=l.trackId,u=ps(a,["tfdt"]),c=u.length>0?fs(u[0]).baseMediaDecodeTime:0,h=ps(a,["trun"]);t===d&&h.length>0&&(i=_s(h,c,l),s=bs(r,i,d),n[d]||(n[d]={seiNals:[],logs:[]}),n[d].seiNals=n[d].seiNals.concat(s.seiNals),n[d].logs=n[d].logs.concat(s.logs))})),n},Ss=function(e,t,i){var s;if(null===t)return null;s=Ts(e,t);var n=s[t]||{};return{seiNals:n.seiNals,logs:n.logs,timescale:i}},ws=function(){var e,t,i,s,n,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new hs,a=!0,r=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/s,e.endTime=e.endPts/s,n.captions.push(e),n.captionStreams[e.stream]=!0})),e.on("log",(function(e){n.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"===typeof t&&0===Object.keys(t).length)&&(i!==e[0]||s!==t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],s=a[i];else if(null===i||!s)return t.push(e),null;while(t.length>0){var l=t.shift();this.parse(l,r,a)}return o=Ss(e,i,s),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,s=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},xs=ws,Cs=function(e){var t=0,i=String.fromCharCode(e[t]),s="";while("\0"!==i)s+=i,t++,i=String.fromCharCode(e[t]);return s+=i,s},Es={uint8ToCString:Cs},ks=Es.uint8ToCString,Is=$.getUint64,Ls=function(e){var t,i,s,n,r,a,o,l,d=4,u=e[0];if(0===u){t=ks(e.subarray(d)),d+=t.length,i=ks(e.subarray(d)),d+=i.length;var c=new DataView(e.buffer);s=c.getUint32(d),d+=4,r=c.getUint32(d),d+=4,a=c.getUint32(d),d+=4,o=c.getUint32(d),d+=4}else if(1===u){c=new DataView(e.buffer);s=c.getUint32(d),d+=4,n=Is(e.subarray(d)),d+=8,a=c.getUint32(d),d+=4,o=c.getUint32(d),d+=4,t=ks(e.subarray(d)),d+=t.length,i=ks(e.subarray(d)),d+=i.length}l=new Uint8Array(e.subarray(d,e.byteLength));var h={scheme_id_uri:t,value:i,timescale:s||1,presentation_time:n,presentation_time_delta:r,event_duration:a,id:o,message_data:l};return Os(u,h)?h:void 0},Ps=function(e,t,i,s){return e||0===e?e/t:s+i/t},Os=function(e,t){var i="\0"!==t.scheme_id_uri,s=0===e&&As(t.presentation_time_delta)&&i,n=1===e&&As(t.presentation_time)&&i;return!(e>1)&&s||n},As=function(e){return void 0!==e||null!==e},Ds={parseEmsgBox:Ls,scaleTime:Ps},Ns=ji.toUnsigned,Ms=ji.toHexString,Rs=zi,Us=qi,Bs=Ds,js=is,Fs=es,qs=Xi,$s=$.getUint64,Hs=us,Vs=yt.parseId3Frames;ss=function(e){var t={},i=Rs(e,["moov","trak"]);return i.reduce((function(e,t){var i,s,n,r,a;return i=Rs(t,["tkhd"])[0],i?(s=i[0],n=0===s?12:20,r=Ns(i[n]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),a=Rs(t,["mdia","mdhd"])[0],a?(s=a[0],n=0===s?12:20,e[r]=Ns(a[n]<<24|a[n+1]<<16|a[n+2]<<8|a[n+3]),e):null):null}),t)},ns=function(e,t){var i;i=Rs(t,["moof","traf"]);var s=i.reduce((function(t,i){var s,n=Rs(i,["tfhd"])[0],r=Ns(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),a=e[r]||9e4,o=Rs(i,["tfdt"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let d;return s=1===o[0]?$s(o.subarray(4,12)):l.getUint32(4),"bigint"===typeof s?d=s/Hs.BigInt(a):"number"!==typeof s||isNaN(s)||(d=s/a),d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),d<t&&(t=d),t}),1/0);return"bigint"===typeof s||isFinite(s)?s:0},rs=function(e,t){var i,s=Rs(t,["moof","traf"]),n=0,r=0;if(s&&s.length){var a=Rs(s[0],["tfhd"])[0],o=Rs(s[0],["trun"])[0],l=Rs(s[0],["tfdt"])[0];if(a){var d=js(a);i=d.trackId}if(l){var u=qs(l);n=u.baseMediaDecodeTime}if(o){var c=Fs(o);c.samples&&c.samples.length&&(r=c.samples[0].compositionTimeOffset||0)}}var h=e[i]||9e4;"bigint"===typeof n&&(r=Hs.BigInt(r),h=Hs.BigInt(h));var p=(n+r)/h;return"bigint"===typeof p&&p<Number.MAX_SAFE_INTEGER&&(p=Number(p)),p},as=function(e){var t=Rs(e,["moov","trak"]),i=[];return t.forEach((function(e){var t=Rs(e,["mdia","hdlr"]),s=Rs(e,["tkhd"]);t.forEach((function(e,t){var n,r,a,o=Us(e.subarray(8,12)),l=s[t];"vide"===o&&(n=new DataView(l.buffer,l.byteOffset,l.byteLength),r=n.getUint8(0),a=0===r?n.getUint32(12):n.getUint32(20),i.push(a))}))})),i},ls=function(e){var t=e[0],i=0===t?12:20;return Ns(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])},os=function(e){var t=Rs(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,s,n={},r=Rs(e,["tkhd"])[0];r&&(t=new DataView(r.buffer,r.byteOffset,r.byteLength),s=t.getUint8(0),n.id=0===s?t.getUint32(12):t.getUint32(20));var a=Rs(e,["mdia","hdlr"])[0];if(a){var o=Us(a.subarray(8,12));n.type="vide"===o?"video":"soun"===o?"audio":o}var l=Rs(e,["mdia","minf","stbl","stsd"])[0];if(l){var d=l.subarray(8);n.codec=Us(d.subarray(4,8));var u,c,h=Rs(d,[n.codec])[0];h&&(/^[asm]vc[1-9]$/i.test(n.codec)?(u=h.subarray(78),c=Us(u.subarray(4,8)),"avcC"===c&&u.length>11?(n.codec+=".",n.codec+=Ms(u[9]),n.codec+=Ms(u[10]),n.codec+=Ms(u[11])):n.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(n.codec)?(u=h.subarray(28),c=Us(u.subarray(4,8)),"esds"===c&&u.length>20&&0!==u[19]?(n.codec+="."+Ms(u[19]),n.codec+="."+Ms(u[20]>>>2&63).replace(/^0/,"")):n.codec="mp4a.40.2"):n.codec=n.codec.toLowerCase())}var p=Rs(e,["mdia","mdhd"])[0];p&&(n.timescale=ls(p)),i.push(n)})),i},ds=function(e,t=0){var i=Rs(e,["emsg"]);return i.map(e=>{var i=Bs.parseEmsgBox(new Uint8Array(e)),s=Vs(i.message_data);return{cueTime:Bs.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Bs.scaleTime(i.event_duration,i.timescale),frames:s}})};var zs={findBox:Rs,parseType:Us,timescale:ss,startTime:ns,compositionStartTime:rs,videoTrackIds:as,tracks:os,getTimescaleFromMediaHeader:ls,getEmsgID3:ds},Gs=Qe,Js=function(e){var t=31&e[1];return t<<=8,t|=e[2],t},Ws=function(e){return!!(64&e[1])},Xs=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},Ys=function(e,t){var i=Js(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},Ks=function(e){var t=Ws(e),i=4+Xs(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},Qs=function(e){var t={},i=Ws(e),s=4+Xs(e);if(i&&(s+=e[s]+1),1&e[s+5]){var n,r,a;n=(15&e[s+1])<<8|e[s+2],r=3+n-4,a=(15&e[s+10])<<8|e[s+11];var o=12+a;while(o<r){var l=s+o;t[(31&e[l+1])<<8|e[l+2]]=e[l],o+=5+((15&e[l+3])<<8|e[l+4])}return t}},Zs=function(e,t){var i=Js(e),s=t[i];switch(s){case Gs.H264_STREAM_TYPE:return"video";case Gs.ADTS_STREAM_TYPE:return"audio";case Gs.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},en=function(e){var t=Ws(e);if(!t)return null;var i=4+Xs(e);if(i>=e.byteLength)return null;var s,n=null;return s=e[i+7],192&s&&(n={},n.pts=(14&e[i+9])<<27|(255&e[i+10])<<20|(254&e[i+11])<<12|(255&e[i+12])<<5|(254&e[i+13])>>>3,n.pts*=4,n.pts+=(6&e[i+13])>>>1,n.dts=n.pts,64&s&&(n.dts=(14&e[i+14])<<27|(255&e[i+15])<<20|(254&e[i+16])<<12|(255&e[i+17])<<5|(254&e[i+18])>>>3,n.dts*=4,n.dts+=(6&e[i+18])>>>1)),n},tn=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},sn=function(e){for(var t,i=4+Xs(e),s=e.subarray(i),n=0,r=0,a=!1;r<s.byteLength-3;r++)if(1===s[r+2]){n=r+5;break}while(n<s.byteLength)switch(s[n]){case 0:if(0!==s[n-1]){n+=2;break}if(0!==s[n-2]){n++;break}r+3!==n-2&&(t=tn(31&s[r+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(a=!0));do{n++}while(1!==s[n]&&n<s.length);r=n-2,n+=3;break;case 1:if(0!==s[n-1]||0!==s[n-2]){n+=3;break}t=tn(31&s[r+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(a=!0),r=n-2,n+=3;break;default:n+=3;break}return s=s.subarray(r),n-=r,r=0,s&&s.byteLength>3&&(t=tn(31&s[r+3]),"slice_layer_without_partitioning_rbsp_idr"===t&&(a=!0)),a},nn={parseType:Ys,parsePat:Ks,parsePmt:Qs,parsePayloadUnitStartIndicator:Ws,parsePesType:Zs,parsePesTime:en,videoPacketContainsKeyFrame:sn},rn=Qe,an=at.handleRollover,on={};on.ts=nn,on.aac=ri;var ln=me.ONE_SECOND_IN_TS,dn=188,un=71,cn=function(e,t){var i,s,n=0,r=dn;while(r<e.byteLength)if(e[n]!==un||e[r]!==un)n++,r++;else{switch(i=e.subarray(n,r),s=on.ts.parseType(i,t.pid),s){case"pat":t.pid=on.ts.parsePat(i);break;case"pmt":var a=on.ts.parsePmt(i);t.table=t.table||{},Object.keys(a).forEach((function(e){t.table[e]=a[e]}));break}n+=dn,r+=dn}},hn=function(e,t,i){var s,n,r,a,o,l=0,d=dn,u=!1;while(d<=e.byteLength)if(e[l]!==un||e[d]!==un&&d!==e.byteLength)l++,d++;else{switch(s=e.subarray(l,d),n=on.ts.parseType(s,t.pid),n){case"pes":r=on.ts.parsePesType(s,t.table),a=on.ts.parsePayloadUnitStartIndicator(s),"audio"===r&&a&&(o=on.ts.parsePesTime(s),o&&(o.type="audio",i.audio.push(o),u=!0));break}if(u)break;l+=dn,d+=dn}d=e.byteLength,l=d-dn,u=!1;while(l>=0)if(e[l]!==un||e[d]!==un&&d!==e.byteLength)l--,d--;else{switch(s=e.subarray(l,d),n=on.ts.parseType(s,t.pid),n){case"pes":r=on.ts.parsePesType(s,t.table),a=on.ts.parsePayloadUnitStartIndicator(s),"audio"===r&&a&&(o=on.ts.parsePesTime(s),o&&(o.type="audio",i.audio.push(o),u=!0));break}if(u)break;l-=dn,d-=dn}},pn=function(e,t,i){var s,n,r,a,o,l,d,u,c=0,h=dn,p=!1,f={data:[],size:0};while(h<e.byteLength)if(e[c]!==un||e[h]!==un)c++,h++;else{switch(s=e.subarray(c,h),n=on.ts.parseType(s,t.pid),n){case"pes":if(r=on.ts.parsePesType(s,t.table),a=on.ts.parsePayloadUnitStartIndicator(s),"video"===r&&(a&&!p&&(o=on.ts.parsePesTime(s),o&&(o.type="video",i.video.push(o),p=!0)),!i.firstKeyFrame)){if(a&&0!==f.size){l=new Uint8Array(f.size),d=0;while(f.data.length)u=f.data.shift(),l.set(u,d),d+=u.byteLength;if(on.ts.videoPacketContainsKeyFrame(l)){var m=on.ts.parsePesTime(l);m?(i.firstKeyFrame=m,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(s),f.size+=s.byteLength}break}if(p&&i.firstKeyFrame)break;c+=dn,h+=dn}h=e.byteLength,c=h-dn,p=!1;while(c>=0)if(e[c]!==un||e[h]!==un)c--,h--;else{switch(s=e.subarray(c,h),n=on.ts.parseType(s,t.pid),n){case"pes":r=on.ts.parsePesType(s,t.table),a=on.ts.parsePayloadUnitStartIndicator(s),"video"===r&&a&&(o=on.ts.parsePesTime(s),o&&(o.type="video",i.video.push(o),p=!0));break}if(p)break;c-=dn,h-=dn}},fn=function(e,t){if(e.audio&&e.audio.length){var i=t;("undefined"===typeof i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=an(e.dts,i),e.pts=an(e.pts,i),e.dtsTime=e.dts/ln,e.ptsTime=e.pts/ln}))}if(e.video&&e.video.length){var s=t;if(("undefined"===typeof s||isNaN(s))&&(s=e.video[0].dts),e.video.forEach((function(e){e.dts=an(e.dts,s),e.pts=an(e.pts,s),e.dtsTime=e.dts/ln,e.ptsTime=e.pts/ln})),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=an(n.dts,s),n.pts=an(n.pts,s),n.dtsTime=n.dts/ln,n.ptsTime=n.pts/ln}}},mn=function(e){var t,i=!1,s=0,n=null,r=null,a=0,o=0;while(e.length-o>=3){var l=on.aac.parseType(e,o);switch(l){case"timed-metadata":if(e.length-o<10){i=!0;break}if(a=on.aac.parseId3TagSize(e,o),a>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=on.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){i=!0;break}if(a=on.aac.parseAdtsSize(e,o),a>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+a),n=on.aac.parseSampleRate(t)),s++,o+=a;break;default:o++;break}if(i)return null}if(null===n||null===r)return null;var d=ln/n,u={audio:[{type:"audio",dts:r,pts:r},{type:"audio",dts:r+1024*s*d,pts:r+1024*s*d}]};return u},gn=function(e){var t={pid:null,table:null},i={};for(var s in cn(e,t),t.table)if(t.table.hasOwnProperty(s)){var n=t.table[s];switch(n){case rn.H264_STREAM_TYPE:i.video=[],pn(e,t,i),0===i.video.length&&delete i.video;break;case rn.ADTS_STREAM_TYPE:i.audio=[],hn(e,t,i),0===i.audio.length&&delete i.audio;break}}return i},yn=function(e,t){var i,s=on.aac.isLikelyAacData(e);return i=s?mn(e):gn(e),i&&(i.audio||i.video)?(fn(i,t),i):null},vn={inspect:yn,parseAudioPes_:hn};const bn=function(e,t){t.on("data",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const s=t.data;t.data=s.buffer,e.postMessage({action:"data",segment:t,byteOffset:s.byteOffset,byteLength:s.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){const i={start:{decode:me.videoTsToSeconds(t.start.dts),presentation:me.videoTsToSeconds(t.start.pts)},end:{decode:me.videoTsToSeconds(t.end.dts),presentation:me.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:me.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=me.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),t.on("audioSegmentTimingInfo",(function(t){const i={start:{decode:me.videoTsToSeconds(t.start.dts),presentation:me.videoTsToSeconds(t.start.pts)},end:{decode:me.videoTsToSeconds(t.end.dts),presentation:me.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:me.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=me.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:me.videoTsToSeconds(t.start),end:me.videoTsToSeconds(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:me.videoTsToSeconds(t.start),end:me.videoTsToSeconds(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))};class _n{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Ri.Transmuxer(this.options),bn(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new xs,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=zs.startTime(e,t);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=zs.tracks(e);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=zs.getEmsgID3(e,t);this.self.postMessage({action:"probeEmsgID3",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i="number"!==typeof t||isNaN(t)?void 0:t*me.ONE_SECOND_IN_TS,s=vn.inspect(e,i);let n=null;s&&(n={hasVideo:s.video&&2===s.video.length||!1,hasAudio:s.audio&&2===s.audio.length||!1},n.hasVideo&&(n.videoStart=s.video[0].ptsTime),n.hasAudio&&(n.audioStart=s.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:n,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(me.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(me.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new _n(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new _n(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var No=Po(Do);const Mo=(e,t,i)=>{const{type:s,initSegment:n,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:d}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const u=e.data.segment.boxes||{data:e.data.segment.data},c={type:s,data:new Uint8Array(u.data,u.data.byteOffset,u.data.byteLength),initSegment:new Uint8Array(n.data,n.byteOffset,n.byteLength)};"undefined"!==typeof l&&(c.videoFrameDtsTime=l),"undefined"!==typeof d&&(c.videoFramePtsTime=d),i(c)},Ro=({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)},Uo=(e,t)=>{t.gopInfo=e.data.gopInfo},Bo=e=>{const{transmuxer:t,bytes:i,audioAppendStart:s,gopsToAlignWith:n,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:d,onVideoSegmentTimingInfo:u,onAudioSegmentTimingInfo:c,onId3:h,onCaptions:p,onDone:f,onEndedTimeline:m,onTransmuxerLog:g,isEndOfTimeline:y}=e,v={buffer:[]};let b=y;const _=i=>{t.currentTransmux===e&&("data"===i.data.action&&Mo(i,v,a),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&Uo(i,v),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&d(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&u(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&c(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&p(i.data.caption),"endedtimeline"===i.data.action&&(b=!1,m()),"log"===i.data.action&&g(i.data.log),"transmuxed"===i.data.type&&(b||(t.onmessage=null,Ro({transmuxedData:v,callback:f}),jo(t))))};if(t.onmessage=_,s&&t.postMessage({action:"setAudioAppendStart",appendStart:s}),Array.isArray(n)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:n}),"undefined"!==typeof r&&t.postMessage({action:"setRemux",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,s=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:e,byteOffset:s,byteLength:i.byteLength},[e])}y&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},jo=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"===typeof e.currentTransmux?e.currentTransmux():Bo(e.currentTransmux))},Fo=(e,t)=>{e.postMessage({action:t}),jo(e)},qo=(e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void Fo(t,e);t.transmuxQueue.push(Fo.bind(null,t,e))},$o=e=>{qo("reset",e)},Ho=e=>{qo("endTimeline",e)},Vo=e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void Bo(e);e.transmuxer.transmuxQueue.push(e)},zo=e=>{const t=new No;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t};var Go={reset:$o,endTimeline:Ho,transmux:Vo,createTransmuxer:zo};const Jo=function(e){const t=e.transmuxer,i=e.endAction||e.action,s=e.callback,n=g()({},e,{endAction:null,transmuxer:null,callback:null}),r=n=>{n.data.action===i&&(t.removeEventListener("message",r),n.data.data&&(n.data.data=new Uint8Array(n.data.data,e.byteOffset||0,e.byteLength||n.data.data.byteLength),e.data&&(e.data=n.data.data)),s(n.data))};if(t.addEventListener("message",r),e.data){const i=e.data instanceof ArrayBuffer;n.byteOffset=i?0:e.data.byteOffset,n.byteLength=e.data.byteLength;const s=[i?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},Wo={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Xo=e=>{e.forEach(e=>{e.abort()})},Yo=e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}),Ko=e=>{const t=e.target,i=Date.now()-t.requestTime,s={bandwidth:1/0,bytesReceived:0,roundTripTime:i||0};return s.bytesReceived=e.loaded,s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3),s},Qo=(e,t)=>t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Wo.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Wo.ABORTED,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Wo.FAILURE,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Wo.FAILURE,xhr:t}:null,Zo=(e,t,i)=>(s,n)=>{const r=n.response,a=Qo(s,n);if(a)return i(a,e);if(16!==r.byteLength)return i({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:Wo.FAILURE,xhr:n},e);const o=new DataView(r),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=l;return i(null,e)},el=(e,t)=>{const i=Object(E["a"])(e.map.bytes);if("mp4"!==i){const s=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:`Found unsupported ${i||"unknown"} container for initialization segment at URL: ${s}`,code:Wo.FAILURE})}Jo({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:s})=>(e.map.bytes=s,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"===typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),t(null))})},tl=({segment:e,finishProcessingFn:t})=>(i,s)=>{const n=Qo(i,s);if(n)return t(n,e);const r=new Uint8Array(s.response);if(e.map.key)return e.map.encryptedBytes=r,t(null,e);e.map.bytes=r,el(e,(function(i){if(i)return i.xhr=s,i.status=s.status,t(i,e);t(null,e)}))},il=({segment:e,finishProcessingFn:t,responseType:i})=>(s,n)=>{const r=Qo(s,n);if(r)return t(r,e);const a="arraybuffer"!==i&&n.responseText?ko(n.responseText.substring(e.lastReachedChar||0)):n.response;return e.stats=Yo(n),e.key?e.encryptedBytes=new Uint8Array(a):e.bytes=new Uint8Array(a),t(null,e)},sl=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{const p=e.map&&e.map.tracks||{},f=Boolean(p.audio&&p.video);let m=s.bind(null,e,"audio","start");const g=s.bind(null,e,"audio","end");let y=s.bind(null,e,"video","start");const v=s.bind(null,e,"video","end"),b=()=>Vo({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:f,onData:t=>{t.type="combined"===t.type?"video":t.type,u(e,t)},onTrackInfo:t=>{i&&(f&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{m&&"undefined"!==typeof e.start&&(m(e.start),m=null),g&&"undefined"!==typeof e.end&&g(e.end)},onVideoTimingInfo:e=>{y&&"undefined"!==typeof e.start&&(y(e.start),y=null),v&&"undefined"!==typeof e.end&&v(e.end)},onVideoSegmentTimingInfo:e=>{n(e)},onAudioSegmentTimingInfo:e=>{r(e)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{d()},onTransmuxerLog:h,onDone:t=>{c&&(t.type="combined"===t.type?"video":t.type,c(null,e,t))}});Jo({action:"probeTs",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:s=>{e.bytes=t=s.data;const n=s.result;n&&(i(e,{hasAudio:n.hasAudio,hasVideo:n.hasVideo,isMuxed:f}),i=null),b()}})},nl=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{let p=new Uint8Array(t);if(Object(E["b"])(p)){e.isFmp4=!0;const{tracks:n}=e.map,r={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio};n.audio&&n.audio.codec&&"enca"!==n.audio.codec&&(r.audioCodec=n.audio.codec),n.video&&n.video.codec&&"encv"!==n.video.codec&&(r.videoCodec=n.video.codec),n.video&&n.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{u(e,{data:p,type:r.hasAudio&&!r.isMuxed?"audio":"video"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),c(null,e,{})};Jo({action:"probeMp4StartTime",timescales:e.map.timescales,data:p,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=p=i,r.hasAudio&&!r.isMuxed&&s(e,"audio","start",a),r.hasVideo&&s(e,"video","start",a),Jo({action:"probeEmsgID3",data:p,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:s})=>{t=i.buffer,e.bytes=p=i,n.video&&i.byteLength&&e.transmuxer?Jo({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:e.transmuxer,data:p,timescales:e.map.timescales,trackIds:[n.video.id],callback:i=>{t=i.data.buffer,e.bytes=p=i.data,i.logs.forEach((function(e){h(Nr(e,{stream:"mp4CaptionParser"}))})),l(i.captions,s)}}):l(void 0,s)}})}})}else if(e.transmuxer){if("undefined"===typeof e.container&&(e.container=Object(E["a"])(p)),"ts"!==e.container&&"aac"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void c(null,e,{});sl({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})}else c(null,e,{})},rl=function({id:e,key:t,encryptedBytes:i,decryptionWorker:s},n){const r=t=>{if(t.data.source===e){s.removeEventListener("message",r);const e=t.data.decrypted;n(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let a;s.addEventListener("message",r),a=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),s.postMessage(Ka({source:e,encrypted:i,key:a,iv:t.iv}),[i.buffer,a.buffer])},al=({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{rl({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e},e=>{t.bytes=e,nl({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})})},ol=({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})=>{let p=0,f=!1;return(m,g)=>{if(!f){if(m)return f=!0,Xo(e),c(m,g);if(p+=1,p===e.length){const p=function(){if(g.encryptedBytes)return al({decryptionWorker:t,segment:g,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h});nl({segment:g,bytes:g.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:c,onTransmuxerLog:h})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return rl({decryptionWorker:t,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},t=>{g.map.bytes=t,el(g,t=>{if(t)return Xo(e),c(t,g);p()})});p()}}}},ll=({loadendState:e,abortFn:t})=>i=>{const s=i.target;s.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)},dl=({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:n,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u})=>i=>{const s=i.target;if(!s.aborted)return e.stats=Nr(e.stats,Ko(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)},ul=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:s,abortFn:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f,doneFn:m,onTransmuxerLog:g})=>{const y=[],v=ol({activeXhrs:y,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f,doneFn:m,onTransmuxerLog:g});if(s.key&&!s.key.bytes){const i=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&i.push(s.map.key);const n=Nr(t,{uri:s.key.resolvedUri,responseType:"arraybuffer"}),r=Zo(s,i,v),a=e(n,r);y.push(a)}if(s.map&&!s.map.bytes){const i=s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri);if(i){const i=Nr(t,{uri:s.map.key.resolvedUri,responseType:"arraybuffer"}),n=Zo(s,[s.map.key],v),r=e(i,n);y.push(r)}const n=Nr(t,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:Ja(s.map)}),r=tl({segment:s,finishProcessingFn:v}),a=e(n,r);y.push(a)}const b=Nr(t,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:"arraybuffer",headers:Ja(s)}),_=il({segment:s,finishProcessingFn:v,responseType:b.responseType}),T=e(b,_);T.addEventListener("progress",dl({segment:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:d,id3Fn:u,captionsFn:c,isEndOfTimeline:h,endedTimelineFn:p,dataFn:f})),y.push(T);const S={};return y.forEach(e=>{e.addEventListener("loadend",ll({loadendState:S,abortFn:n}))}),()=>Xo(y)},cl=Dr("CodecUtils"),hl=function(e){const t=e.attributes||{};if(t.CODECS)return Object(b["h"])(t.CODECS)},pl=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},fl=(e,t)=>{if(!pl(e,t))return!0;const i=t.attributes||{},s=e.mediaGroups.AUDIO[i.AUDIO];for(const n in s)if(!s[n].uri&&!s[n].playlists)return!0;return!1},ml=function(e){const t={};return e.forEach(({mediaType:e,type:i,details:s})=>{t[e]=t[e]||[],t[e].push(Object(b["i"])(`${i}${s}`))}),Object.keys(t).forEach((function(e){if(t[e].length>1)return cl(`multiple ${e} codecs found as attributes: ${t[e].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),void(t[e]=null);t[e]=t[e][0]})),t},gl=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},yl=function(e,t){const i=t.attributes||{},s=ml(hl(t)||[]);if(pl(e,t)&&!s.audio&&!fl(e,t)){const t=ml(Object(b["d"])(e,i.AUDIO)||[]);t.audio&&(s.audio=t.audio)}return s},vl=Dr("PlaylistSelector"),bl=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},_l=function(e,t){if(!e)return"";const i=n.a.getComputedStyle(e);return i?i[t]:""},Tl=function(e,t){const i=e.slice();e.sort((function(e,s){const n=t(e,s);return 0===n?i.indexOf(e)-i.indexOf(s):n}))},Sl=function(e,t){let i,s;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||n.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),s=s||n.a.Number.MAX_VALUE,i-s},wl=function(e,t){let i,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||n.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),s=s||n.a.Number.MAX_VALUE,i===s&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-s};let xl=function(e,t,i,s,r,a){if(!e)return;const o={bandwidth:t,width:i,height:s,limitRenditionByPlayerDimensions:r};let l=e.playlists;ba.isAudioOnly(e)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);let d=l.map(e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,s=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||n.a.Number.MAX_VALUE,{bandwidth:t,width:i,height:s,playlist:e}});Tl(d,(e,t)=>e.bandwidth-t.bandwidth),d=d.filter(e=>!ba.isIncompatible(e.playlist));let u=d.filter(e=>ba.isEnabled(e.playlist));u.length||(u=d.filter(e=>!ba.isDisabled(e.playlist)));const c=u.filter(e=>e.bandwidth*Eo.BANDWIDTH_VARIANCE<t);let h=c[c.length-1];const p=c.filter(e=>e.bandwidth===h.bandwidth)[0];if(!1===r){const e=p||u[0]||d[0];if(e&&e.playlist){let t="sortedPlaylistReps";return p&&(t="bandwidthBestRep"),u[0]&&(t="enabledPlaylistReps"),vl(`choosing ${bl(e)} using ${t} with options`,o),e.playlist}return vl("could not choose a playlist with options",o),null}const f=c.filter(e=>e.width&&e.height);Tl(f,(e,t)=>e.width-t.width);const m=f.filter(e=>e.width===i&&e.height===s);h=m[m.length-1];const g=m.filter(e=>e.bandwidth===h.bandwidth)[0];let y,v,b,_;if(g||(y=f.filter(e=>e.width>i||e.height>s),v=y.filter(e=>e.width===y[0].width&&e.height===y[0].height),h=v[v.length-1],b=v.filter(e=>e.bandwidth===h.bandwidth)[0]),a.leastPixelDiffSelector){const e=f.map(e=>(e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-s),e));Tl(e,(e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff),_=e[0]}const T=_||b||g||p||u[0]||d[0];if(T&&T.playlist){let e="sortedPlaylistReps";return _?e="leastPixelDiffRep":b?e="resolutionPlusOneRep":g?e="resolutionBestRep":p?e="bandwidthBestRep":u[0]&&(e="enabledPlaylistReps"),vl(`choosing ${bl(T)} using ${e} with options`,o),T.playlist}return vl("could not choose a playlist with options",o),null};const Cl=function(){const e=this.useDevicePixelRatio&&n.a.devicePixelRatio||1;return xl(this.playlists.main,this.systemBandwidth,parseInt(_l(this.tech_.el(),"width"),10)*e,parseInt(_l(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.playlistController_)},El=function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){const s=this.useDevicePixelRatio&&n.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),xl(this.playlists.main,t,parseInt(_l(this.tech_.el(),"width"),10)*s,parseInt(_l(this.tech_.el(),"height"),10)*s,this.limitRenditionByPlayerDimensions,this.playlistController_)}},kl=function(e){const{main:t,currentTime:i,bandwidth:s,duration:n,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,d=t.playlists.filter(e=>!ba.isIncompatible(e));let u=d.filter(ba.isEnabled);u.length||(u=d.filter(e=>!ba.isDisabled(e)));const c=u.filter(ba.hasAttribute.bind(null,"BANDWIDTH")),h=c.map(e=>{const t=l.getSyncPoint(e,n,o,i),d=t?1:2,u=ba.estimateSegmentRequestTime(r,s,e),c=u*d-a;return{playlist:e,rebufferingImpact:c}}),p=h.filter(e=>e.rebufferingImpact<=0);return Tl(p,(e,t)=>Sl(t.playlist,e.playlist)),p.length?p[0]:(Tl(h,(e,t)=>e.rebufferingImpact-t.rebufferingImpact),h[0]||null)},Il=function(){const e=this.playlists.main.playlists.filter(ba.isEnabled);Tl(e,(e,t)=>Sl(e,t));const t=e.filter(e=>!!yl(this.playlists.main,e).video);return t[0]||null},Ll=e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(e=>{t.set(e,i),i+=e.byteLength})),t},Pl=function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"});let s=i;/^cc708_/.test(i)&&(s="SERVICE"+i.split("_")[1]);const n=t.textTracks().getTrackById(s);if(n)e[i]=n;else{const n=t.options_.vhs&&t.options_.vhs.captionServices||{};let r=i,a=i,o=!1;const l=n[s];l&&(r=l.label,a=l.language,o=l.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:s,default:o,label:r,language:a},!1).track}}},Ol=function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const s=n.a.WebKitDataCue||n.a.VTTCue;t.forEach(t=>{const n=t.stream;t.content?t.content.forEach(r=>{const a=new s(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align="left",a.position=r.position,a.positionAlign="line-left",e[n].addCue(a)}):e[n].addCue(new s(t.startTime+i,t.endTime+i,t.text))})},Al=function(e){Object.defineProperties(e.frame,{id:{get(){return Cr.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get(){return Cr.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get(){return Cr.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})},Dl=({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:s})=>{if(!t)return;const r=n.a.WebKitDataCue||n.a.VTTCue,a=e.metadataTrack_;if(!a)return;if(t.forEach(e=>{const t=e.cueTime+i;!("number"!==typeof t||n.a.isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach(e=>{const i=new r(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,Al(i),a.addCue(i)})}),!a.cues||!a.cues.length)return;const o=a.cues,l=[];for(let n=0;n<o.length;n++)o[n]&&l.push(o[n]);const d=l.reduce((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),u=Object.keys(d).sort((e,t)=>Number(e)-Number(t));u.forEach((e,t)=>{const i=d[e],n=isFinite(s)?s:e,r=Number(u[t+1])||n;i.forEach(e=>{e.endTime=r})})},Nl={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},Ml=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),Rl=({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const s=n.a.WebKitDataCue||n.a.VTTCue;t.forEach(e=>{for(const t of Object.keys(e)){if(Ml.has(t))continue;const n=new s(e.startTime,e.endTime,"");n.id=e.id,n.type="com.apple.quicktime.HLS",n.value={key:Nl[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(n.value.data=new Uint8Array(n.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(n)}e.processDateRange()})},Ul=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,Cr.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},Bl=function(e,t,i){let s,n;if(i&&i.cues){s=i.cues.length;while(s--)n=i.cues[s],n.startTime>=e&&n.endTime<=t&&i.removeCue(n)}},jl=function(e){const t=e.cues;if(!t)return;const i={};for(let s=t.length-1;s>=0;s--){const n=t[s],r=`${n.startTime}-${n.endTime}-${n.text}`;i[r]?e.removeCue(n):i[r]=n}},Fl=(e,t,i)=>{if("undefined"===typeof t||null===t||!e.length)return[];const s=Math.ceil((t-i+3)*k["ONE_SECOND_IN_TS"]);let n;for(n=0;n<e.length;n++)if(e[n].pts>s)break;return e.slice(n)},ql=(e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const s=t[0].pts;let n=0;for(n;n<e.length;n++)if(e[n].pts>=s)break;return e.slice(0,n).concat(t)},$l=(e,t,i,s)=>{const n=Math.ceil((t-s)*k["ONE_SECOND_IN_TS"]),r=Math.ceil((i-s)*k["ONE_SECOND_IN_TS"]),a=e.slice();let o=e.length;while(o--)if(e[o].pts<=r)break;if(-1===o)return a;let l=o+1;while(l--)if(e[l].pts<=n)break;return l=Math.max(l,0),a.splice(l,o-l+1),a},Hl=function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;const i=Object.keys(e).sort(),s=Object.keys(t).sort();if(i.length!==s.length)return!1;for(let n=0;n<i.length;n++){const r=i[n];if(r!==s[n])return!1;if(e[r]!==t[r])return!1}return!0},Vl=22,zl=function(e,t,i){t=t||[];const s=[];let n=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(s.push(r),n+=a.duration,n>i))return r}return 0===s.length?0:s[s.length-1]},Gl=1,Jl=500,Wl=e=>"number"===typeof e&&isFinite(e),Xl=1/60,Yl=(e,t,i)=>"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null,Kl=(e,t,i)=>{let s=t-Eo.BACK_BUFFER_LENGTH;e.length&&(s=Math.max(s,e.start(0)));const n=t-i;return Math.min(n,s)},Ql=e=>{const{startOfSegment:t,duration:i,segment:s,part:n,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:d,timeline:u}=e,c=o.length-1;let h="mediaIndex/partIndex increment";e.getMediaInfoForTime?h=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(h="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(h+=" with independent "+e.independent);const p="number"===typeof d,f=e.segment.uri?"segment":"pre-segment",m=p?Qr({preloadSegment:s})-1:0;return`${f} [${r+l}/${r+c}]`+(p?` part [${d}/${m}]`:"")+` segment start/end [${s.start} => ${s.end}]`+(p?` part start/end [${n.start} => ${n.end}]`:"")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${u}]`+` selected by [${h}]`+` playlist [${a}]`},Zl=e=>e+"TimingInfo",ed=({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:s,overrideCheck:n})=>n||e!==t?e<t?i:s.length?s.end(s.length-1):i:null,td=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:s,audioDisabled:n})=>{if(t===i)return!1;if("audio"===s){const t=e.lastTimelineChange({type:"main"});return!t||t.to!==i}if("main"===s&&n){const t=e.pendingTimelineChange({type:"audio"});return!t||t.to!==i}return!1},id=e=>{let t=0;return["video","audio"].forEach((function(i){const s=e[i+"TimingInfo"];if(!s)return;const{start:r,end:a}=s;let o;"bigint"===typeof r||"bigint"===typeof a?o=n.a.BigInt(a)-n.a.BigInt(r):"number"===typeof r&&"number"===typeof a&&(o=a-r),"undefined"!==typeof o&&o>t&&(t=o)})),"bigint"===typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t},sd=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Rr,nd=(e,t)=>{if("hls"!==t)return null;const i=id({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const s=e.playlist.targetDuration,n=sd({segmentDuration:i,maxDuration:2*s}),r=sd({segmentDuration:i,maxDuration:s}),a=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${s}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return n||r?{severity:n?"warn":"info",message:a}:null};class rd extends Cr.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!==typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Dr(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",()=>{this.hasEnoughInfoToLoad_()&&this.processLoadQueue_(),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()})}createTransmuxer_(){return Go.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&n.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,n.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return"undefined"!==typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Go.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Mr();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:s}=e;if(i&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Qa(e);let s=this.initSegments_[i];return t&&!s&&e.bytes&&(this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,t=!1){if(!e)return null;const i=Za(e);let s=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!s&&e.bytes&&(this.keyCache_[i]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const n={resolvedUri:(s||e).resolvedUri};return s&&(n.bytes=s.bytes),n}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;const i=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_(`playlist update [${n} => ${e.id||e.uri}]`),this.syncController_.updateMediaSequenceMap(e,this.currentTime_(),this.loaderType_),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){if(null!==this.mediaIndex){const t=!e.endList&&"number"===typeof e.partTargetDuration;t?this.resetLoader():this.resyncLoader()}return this.currentMediaInfo_=void 0,void this.trigger("playlistupdate")}const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}s&&(s.mediaIndex-=r,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(n.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.resyncLoader()}resyncLoader(){this.transmuxer_&&Go.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.shouldForceTimestampOffsetAfterResync_=!0,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t,i=(()=>{}),s=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let n=1;const r=()=>{n--,0===n&&i()};!s&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,r)),(s||"main"===this.loaderType_)&&(this.gopBuffer_=$l(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,r));for(const a in this.inbandTextTracks_)Bl(e,t,this.inbandTextTracks_[a]);Bl(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&n.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=n.a.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&n.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=n.a.setTimeout(this.monitorBufferTick_.bind(this),Jl)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();e&&("number"===typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const s="number"===typeof e&&t.segments[e],n=e+1===t.segments.length,r=!s||!s.parts||i+1===s.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&n&&r}chooseNextRequest_(){const e=this.buffered_(),t=Jr(e)||0,i=Wr(e,this.currentTime_()),s=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||s||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=zl(this.currentTimeline_,r,t),this.logger_("choose next request. Can not find sync point. Fallback to media Index: "+a.mediaIndex);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i="number"===typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{const{segmentIndex:e,startTime:i,partIndex:s}=ba.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),a.mediaIndex=e,a.startOfSegment=i,a.partIndex=s,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&"number"===typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||"number"===typeof a.partIndex&&!l)return null;"number"!==typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const d=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!d&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent="previous segment")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");const u=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=r.length-1&&u&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(a))}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:s,startOfSegment:n,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,d=i.segments[s],u="number"===typeof a&&d.parts[a],c={requestId:"segment-loader-"+Math.random(),uri:u&&u.resolvedUri||d.resolvedUri,mediaIndex:s,partIndex:u?a:null,isSyncRequest:r,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:d.timeline,duration:u&&u.duration||d.duration,segment:d,part:u,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h="undefined"!==typeof o?o:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:d.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});const p=Jr(this.sourceUpdater_.audioBuffered());return"number"===typeof p&&(c.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=Fl(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c}timestampOffsetForSegment_(e){return ed(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,s=this.pendingSegment_.duration,n=ba.estimateSegmentRequestTime(s,i,this.playlist_,e.bytesReceived),r=Vr(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(n<=r)return;const a=kl({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=n-r,l=o-a.rebufferingImpact;let d=.5;r<=Rr&&(d=1),!a.playlist||a.playlist.uri===this.playlist_.uri||l<d||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Eo.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_("Aborting "+Ql(e)),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")}handleTrackInfo_(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},Hl(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))}handleTimingInfo_(e,t,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const n=this.pendingSegment_,r=Zl(t);n[r]=n[r]||{},n[r][i]=s,this.logger_(`timinginfo: ${t} - ${i} - ${s}`),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_("SegmentLoader received no captions from a caption event");const i=this.pendingSegment_;if(!i.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const s=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),n={};t.forEach(e=>{n[e.stream]=n[e.stream]||{startTime:1/0,captions:[],endTime:0};const t=n[e.stream];t.startTime=Math.min(t.startTime,e.startTime+s),t.endTime=Math.max(t.endTime,e.endTime+s),t.captions.push(e)}),Object.keys(n).forEach(e=>{const{startTime:t,endTime:i,captions:r}=n[e],a=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${i} for ${e}`),Pl(a,this.vhs_.tech_,e),Bl(t,i,a[e]),Ol({captionArray:r,inbandTextTracks:a,timestampOffset:s})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const s=this.pendingSegment_;s.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(e=>e())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(e=>e())}hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!td({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:s,isMuxed:n}=t;return!(s&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!td({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Zl(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let s;t&&(s=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:s,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(e,t){"main"!==this.loaderType_||"number"!==typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:s}){if(i){const e=Qa(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},s){const r=this.sourceUpdater_.audioBuffered(),a=this.sourceUpdater_.videoBuffered();r.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+zr(r).join(", ")),a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+zr(a).join(", "));const o=r.length?r.start(0):0,l=r.length?r.end(r.length-1):0,d=a.length?a.start(0):0,u=a.length?a.end(a.length-1):0;if(l-o<=Gl&&u-d<=Gl)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${zr(r).join(", ")}, video buffer: ${zr(a).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const c=this.currentTime_(),h=c-Gl;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+h),this.remove(0,h,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Gl}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=n.a.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},1e3*Gl)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},s){s&&(s.code!==Vl?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",s),this.error(`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:s,bytes:n}){if(!n){const e=[s];let t=s.byteLength;i&&(e.unshift(i),t+=i.byteLength),n=Ll({bytes:t,segments:e})}this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:n},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:n}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,n=e+"TimingInfo";s[n]||(s[n]={}),s[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,s[n].transmuxedPresentationStart=i.start.presentation,s[n].transmuxedDecodeStart=i.start.decode,s[n].transmuxedPresentationEnd=i.end.presentation,s[n].transmuxedDecodeEnd=i.end.decode,s[n].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:s}=t;if(!s||!s.byteLength)return;if("audio"===i&&this.audioDisabled_)return;const n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s})}loadSegment_(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"===typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push(()=>{const t=g()({},e,{forceTimestampOffset:!0});g()(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)})}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=null!==this.mediaIndex,n=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||s&&n;this.logger_("Requesting "+Ql(e)),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=ul({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:r,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:s})=>{this.logger_(`${Ql(e)} logged from transmuxer stream ${s} as a ${i}: ${t}`)}})}trimBackBuffer_(e){const t=Kl(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,s={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},n=e.playlist.segments[e.mediaIndex-1];if(n&&n.timeline===t.timeline&&(n.videoTimingInfo?s.baseStartTime=n.videoTimingInfo.transmuxedDecodeEnd:n.audioTimingInfo&&(s.baseStartTime=n.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);s.key=this.segmentKey(t.key),s.key.iv=i}return t.map&&(s.map=this.initSegmentForMap(t.map)),s}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<Xl?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+Xl):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Wo.ABORTED)return;return this.pause(),e.code===Wo.TIMEOUT?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=ql(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"===typeof e.start&&"number"===typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:n,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}){if("undefined"!==typeof e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&"undefined"!==typeof l.start&&l.end===s+n?a.start:s}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:i,hasVideo:s,isMuxed:n}=t,r="main"===this.loaderType_&&s,a=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!==typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=Yl(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||"number"!==typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"===typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"===typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo,s=i&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;s&&(e.timingInfo.end="number"===typeof s.end?s.end:s.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=nd(e,this.sourceType_);if(t&&("warn"===t.severity?Cr.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_))return void this.logger_("Throwing away un-appended sync request "+Ql(e));this.logger_("Appended "+Ql(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const i=e.segment,s=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,r=s&&s.end&&this.currentTime_()-s.end>3*e.playlist.partTargetDuration;if(n||r)return this.logger_(`bad ${n?"segment":"part"} ${Ql(e)}`),void this.resetEverything();const a=null!==this.mediaIndex;a&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Xl)return void this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+Xl);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,s=t.end;if(!Wl(i)||!Wl(s))return;Bl(i,s,this.segmentMetadataTrack_);const r=n.a.WebKitDataCue||n.a.VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:s},o=JSON.stringify(a),l=new r(i,s,o);l.value=a,this.segmentMetadataTrack_.addCue(l)}}function ad(){}const od=function(e){return"string"!==typeof e?e:e.replace(/./,e=>e.toUpperCase())},ld=["video","audio"],dd=(e,t)=>{const i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]},ud=(e,t)=>{for(let i=0;i<t.length;i++){const s=t[i];if("mediaSource"===s.type)return null;if(s.type===e)return i}return null},cd=(e,t)=>{if(0===t.queue.length)return;let i=0,s=t.queue[i];if("mediaSource"!==s.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!dd(e,t)){if(s.type!==e){if(i=ud(e,t.queue),null===i)return;s=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=s,s.action(e,t),s.doneFn?void 0:(t.queuePending[e]=null,void cd(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),s.action(t),s.doneFn&&s.doneFn(),cd("audio",t),cd("video",t))},hd=(e,t)=>{const i=t[e+"Buffer"],s=od(e);i&&(i.removeEventListener("updateend",t[`on${s}UpdateEnd_`]),i.removeEventListener("error",t[`on${s}Error_`]),t.codecs[e]=null,t[e+"Buffer"]=null)},pd=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),fd={appendBuffer:(e,t,i)=>(s,n)=>{const r=n[s+"Buffer"];if(pd(n.mediaSource,r)){n.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${s}Buffer`);try{r.appendBuffer(e)}catch(a){n.logger_(`Error with code ${a.code} `+(a.code===Vl?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${s}Buffer`),n.queuePending[s]=null,i(a)}}},remove:(e,t)=>(i,s)=>{const n=s[i+"Buffer"];if(pd(s.mediaSource,n)){s.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{n.remove(e,t)}catch(r){s.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},timestampOffset:e=>(t,i)=>{const s=i[t+"Buffer"];pd(i.mediaSource,s)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),s.timestampOffset=e)},callback:e=>(t,i)=>{e()},endOfStream:e=>t=>{if("open"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||""})`);try{t.mediaSource.endOfStream(e)}catch(i){Cr.log.warn("Failed to call media source endOfStream",i)}}},duration:e=>t=>{t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(i){Cr.log.warn("Failed to set media source duration",i)}},abort:()=>(e,t)=>{if("open"!==t.mediaSource.readyState)return;const i=t[e+"Buffer"];if(pd(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(s){Cr.log.warn(`Failed to abort on ${e}Buffer`,s)}}},addSourceBuffer:(e,t)=>i=>{const s=od(e),n=Object(b["e"])(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(n);r.addEventListener("updateend",i[`on${s}UpdateEnd_`]),r.addEventListener("error",i[`on${s}Error_`]),i.codecs[e]=t,i[e+"Buffer"]=r},removeSourceBuffer:e=>t=>{const i=t[e+"Buffer"];if(hd(e,t),pd(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(s){Cr.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,s)}}},changeType:e=>(t,i)=>{const s=i[t+"Buffer"],n=Object(b["e"])(e);if(pd(i.mediaSource,s)&&i.codecs[t]!==e){i.logger_(`changing ${t}Buffer codec from ${i.codecs[t]} to ${e}`);try{s.changeType(n),i.codecs[t]=e}catch(r){Cr.log.warn(`Failed to changeType on ${t}Buffer`,r)}}}},md=({type:e,sourceUpdater:t,action:i,doneFn:s,name:n})=>{t.queue.push({type:e,action:i,doneFn:s,name:n}),cd(e,t)},gd=(e,t)=>i=>{if(t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[e+"Error_"])}cd(e,t)};class yd extends Cr.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>cd("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Dr("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=gd("video",this),this.onAudioUpdateEnd_=gd("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){md({type:"mediaSource",sourceUpdater:this,action:fd.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){md({type:e,sourceUpdater:this,action:fd.abort(e),name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?md({type:"mediaSource",sourceUpdater:this,action:fd.removeSourceBuffer(e),name:"removeSourceBuffer"}):Cr.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!Cr.browser.IS_FIREFOX&&n.a.MediaSource&&n.a.MediaSource.prototype&&"function"===typeof n.a.MediaSource.prototype.removeSourceBuffer}static canChangeType(){return n.a.SourceBuffer&&n.a.SourceBuffer.prototype&&"function"===typeof n.a.SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?md({type:e,sourceUpdater:this,action:fd.changeType(t),name:"changeType"}):Cr.log.error("changeType is not supported!")}addOrChangeSourceBuffers(e){if(!e||"object"!==typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)})}appendBuffer(e,t){const{segmentInfo:i,type:s,bytes:n}=e;if(this.processedAppend_=!0,"audio"===s&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${n.length} until video append`);const r=t;if(md({type:s,sourceUpdater:this,action:fd.appendBuffer(n,i||{mediaIndex:-1},r),doneFn:t,name:"appendBuffer"}),"video"===s){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach(e=>{this.appendBuffer.apply(this,e)})}}audioBuffered(){return pd(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Mr()}videoBuffered(){return pd(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Mr()}buffered(){const e=pd(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=pd(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():$r(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=ad){md({type:"mediaSource",sourceUpdater:this,action:fd.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=ad){"string"!==typeof e&&(e=void 0),md({type:"mediaSource",sourceUpdater:this,action:fd.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,i=ad){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?md({type:"audio",sourceUpdater:this,action:fd.remove(e,t),doneFn:i,name:"remove"}):i()}removeVideo(e,t,i=ad){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?md({type:"video",sourceUpdater:this,action:fd.remove(e,t),doneFn:i,name:"remove"}):i()}updating(){return!(!dd("audio",this)&&!dd("video",this))}audioTimestampOffset(e){return"undefined"!==typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(md({type:"audio",sourceUpdater:this,action:fd.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return"undefined"!==typeof e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(md({type:"video",sourceUpdater:this,action:fd.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&md({type:"audio",sourceUpdater:this,action:fd.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&md({type:"video",sourceUpdater:this,action:fd.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),ld.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[e+"QueueCallback"](()=>hd(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const vd=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),bd=e=>{const t=new Uint8Array(e);return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")},_d=new Uint8Array("\n\n".split("").map(e=>e.charCodeAt(0)));class Td extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class Sd extends rd{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.loaderType_="subtitle",this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Mr();const e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return Mr([[t,i]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Qa(e);let s=this.initSegments_[i];if(t&&!s&&e.bytes){const t=_d.byteLength+e.bytes.byteLength,n=new Uint8Array(t);n.set(e.bytes),n.set(_d,e.bytes.byteLength),this.initSegments_[i]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}}return s||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return"undefined"===typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){Bl(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){while(e&&e.segment.empty){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Wo.TIMEOUT&&this.handleTimeout_(),e.code===Wo.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const r=s.segment;if(r.map&&(r.map.bytes=t.map.bytes),s.bytes=t.bytes,"function"!==typeof n.a.WebVTT&&"function"===typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,i),()=>this.stopForError({message:"Error loading vtt.js"}));r.requested=!0;try{this.parseVTTCues_(s)}catch(a){return void this.stopForError({message:a.message})}if(this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,s.cues.forEach(e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new n.a.VTTCue(e.startTime,e.endTime,e.text):e)}),jl(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let t,i=!1;if("function"!==typeof n.a.WebVTT)throw new Td;"function"===typeof n.a.TextDecoder?t=new n.a.TextDecoder("utf8"):(t=n.a.WebVTT.StringDecoder(),i=!0);const s=new n.a.WebVTT.Parser(n.a,n.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=t=>{e.timestampmap=t},s.onparsingerror=e=>{Cr.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=vd(t)),s.parse(t)}let r=e.bytes;i&&(r=vd(r)),s.parse(r),s.flush()}updateTimeMapping_(e,t,i){const s=e.segment;if(!t)return;if(!e.cues.length)return void(s.empty=!0);const{MPEGTS:n,LOCAL:r}=e.timestampmap,a=n/k["ONE_SECOND_IN_TS"],o=a-r+t.mapping;if(e.cues.forEach(e=>{const i=e.endTime-e.startTime,s=0===n?e.startTime+o:this.handleRollover_(e.startTime+o,t.time);e.startTime=Math.max(s,0),e.endTime=Math.max(s+i,0)}),!i.syncInfo){const t=e.cues[0].startTime,n=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,n-s.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*k["ONE_SECOND_IN_TS"];const s=t*k["ONE_SECOND_IN_TS"];let n;n=s<i?-8589934592:8589934592;while(Math.abs(i-s)>4294967296)i+=n;return i/k["ONE_SECOND_IN_TS"]}}const wd=function(e,t){const i=e.cues;for(let s=0;s<i.length;s++){const e=i[s];if(t>=e.adStartTime&&t<=e.adEndTime)return e}return null},xd=function(e,t,i=0){if(!e.segments)return;let s,r=i;for(let a=0;a<e.segments.length;a++){const i=e.segments[a];if(s||(s=wd(t,r+i.duration/2)),s){if("cueIn"in i){s.endTime=r,s.adEndTime=r,r+=i.duration,s=null;continue}if(r<s.endTime){r+=i.duration;continue}s.endTime+=i.duration}else if("cueOut"in i&&(s=new n.a.VTTCue(r,r+i.duration,i.cueOut),s.adStartTime=r,s.adEndTime=r+parseFloat(i.cueOut),t.addCue(s)),"cueOutCont"in i){const[e,a]=i.cueOutCont.split("/").map(parseFloat);s=new n.a.VTTCue(r,r+i.duration,""),s.adStartTime=r-e,s.adEndTime=s.adStartTime+a,t.addCue(s)}r+=i.duration}},Cd=86400,Ed=[{name:"VOD",run:(e,t,i,s,n)=>{if(i!==1/0){const e={time:0,segmentIndex:0,partIndex:null};return e}return null}},{name:"MediaSequence",run:(e,t,i,s,n,r)=>{if(!r)return null;const a=e.getMediaSequenceMap(r);if(!a||0===a.size)return null;if(void 0===t.mediaSequence||!Array.isArray(t.segments)||!t.segments.length)return null;let o=t.mediaSequence,l=0;for(const d of t.segments){const e=a.get(o);if(!e)break;if(n>=e.start&&n<e.end){if(Array.isArray(d.parts)&&d.parts.length){let t=e.start,i=0;for(const s of d.parts){const r=t,a=r+s.duration;if(n>=r&&n<a)return{time:e.start,segmentIndex:l,partIndex:i};i++,t=a}}return{time:e.start,segmentIndex:l,partIndex:null}}l++,o++}return null}},{name:"ProgramDateTime",run:(e,t,i,s,n)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=Yr(t);n=n||0;for(let l=0;l<o.length;l++){const i=t.endList||0===n?l:o.length-(l+1),s=o[i],d=s.segment,u=e.timelineToDatetimeMappings[d.timeline];if(!u||!d.dateTimeObject)continue;const c=d.dateTimeObject.getTime()/1e3;let h=c+u;if(d.parts&&"number"===typeof s.partIndex)for(let e=0;e<s.partIndex;e++)h+=d.parts[e].duration;const p=Math.abs(n-h);if(null!==a&&(0===p||a<p))break;a=p,r={time:h,segmentIndex:s.segmentIndex,partIndex:s.partIndex}}return r}},{name:"Segment",run:(e,t,i,s,n)=>{let r=null,a=null;n=n||0;const o=Yr(t);for(let l=0;l<o.length;l++){const e=t.endList||0===n?l:o.length-(l+1),i=o[e],d=i.segment,u=i.part&&i.part.start||d&&d.start;if(d.timeline===s&&"undefined"!==typeof u){const e=Math.abs(n-u);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:u,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:"Discontinuity",run:(e,t,i,s,n)=>{let r=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=e.discontinuities[o];if(l){const e=Math.abs(n-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:"Playlist",run:(e,t,i,s,n)=>{if(t.syncInfo){const e={time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null};return e}return null}}];class kd extends Cr.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={},this.mediaSequenceStorage_=new Map,this.logger_=Dr("SyncController")}getMediaSequenceMap(e){return this.mediaSequenceStorage_.get(e)}updateMediaSequenceMap(e,t,i){if(void 0===e.mediaSequence||!Array.isArray(e.segments)||!e.segments.length)return;const s=this.getMediaSequenceMap(i),n=new Map;let r,a=e.mediaSequence;s?s.has(e.mediaSequence)?r=s.get(e.mediaSequence).start:(this.logger_(`MediaSequence sync for ${i} segment loader - received a gap between playlists.\nFallback base time to: ${t}.\nReceived media sequence: ${a}.\nCurrent map: `,s),r=t):r=0,this.logger_(`MediaSequence sync for ${i} segment loader.\nReceived media sequence: ${a}.\nbase time is ${r}\nCurrent map: `,s),e.segments.forEach(e=>{const t=r,i=t+e.duration,s={start:t,end:i};n.set(a,s),a++,r=i}),this.mediaSequenceStorage_.set(i,n)}getSyncPoint(e,t,i,s,n){if(t!==1/0){const i=Ed.find(({name:e})=>"VOD"===e);return i.run(this,e,t)}const r=this.runStrategies_(e,t,i,s,n);if(!r.length)return null;for(const a of r){const{syncPoint:t,strategy:i}=a,{segmentIndex:n,time:r}=t;if(n<0)continue;const o=e.segments[n],l=r,d=l+o.duration;if(this.logger_(`Strategy: ${i}. Current time: ${s}. selected segment: ${n}. Time: [${l} -> ${d}]}`),s>=l&&s<d)return this.logger_("Found sync point with exact match: ",t),t}return this.selectSyncPoint_(r,{key:"time",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0,"main");if(!i.length)return null;const s=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+na({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,s,n){const r=[];for(let a=0;a<Ed.length;a++){const o=Ed[a],l=o.run(this,e,t,i,s,n);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<s&&(s=a,i=e[r].syncPoint,n=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${n}]: [time:${i.time}, segmentIndex:`+i.segmentIndex+("number"===typeof i.partIndex?",partIndex:"+i.partIndex:"")+"]"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>Cd)Cr.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let s=i-1;s>=0;s--){const i=e.segments[s];if(i&&"undefined"!==typeof i.start){t.syncInfo={mediaSequence:e.mediaSequence+s,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),s=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const n=s.dateTimeObject;s.discontinuity&&t&&n&&(this.timelineToDatetimeMappings[s.timeline]=-n.getTime()/1e3)}timestampOffsetForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return"undefined"===typeof this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const s=e.segment,n=e.part;let r,a,o=this.timelines[e.timeline];if("number"===typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return n&&(n.start=r,n.end=a),(!s.start||r<s.start)&&(s.start=r),s.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const n=t.discontinuityStarts[s],r=t.discontinuitySequence+s+1,a=n-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let s;s=a<0?i.start-na({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+na({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[r]={time:s,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class Id extends Cr.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"===typeof t&&"number"===typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){return"number"===typeof t&&"number"===typeof i&&(this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e],this.trigger("timelinechange")),this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const Ld=Oo(Ao((function(){var t=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,s=0;s<i;++s)t[s].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();
29
29
  /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function i(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}
30
- /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */const s=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],d=[];let u,c,h,p,f,m;for(r=0;r<256;r++)d[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=u||1,o=d[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[c=l[u=l[a]]],m=16843009*h^65537*c^257*u^16843008*a,f=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=f=f<<24^f>>>8,i[r][p]=m=m<<24^m>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e};let n=null;class r{constructor(e){let t,i,r;n||(n=s()),this._tables=[[n[0][0].slice(),n[0][1].slice(),n[0][2].slice(),n[0][3].slice(),n[0][4].slice()],[n[1][0].slice(),n[1][1].slice(),n[1][2].slice(),n[1][3].slice(),n[1][4].slice()]];const a=this._tables[0][4],o=this._tables[1],l=e.length;let d=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");const u=e.slice(0),c=[];for(this._key=[u,c],t=l;t<4*l+28;t++)r=u[t-1],(t%l===0||8===l&&t%l===4)&&(r=a[r>>>24]<<24^a[r>>16&255]<<16^a[r>>8&255]<<8^a[255&r],t%l===0&&(r=r<<8^r>>>24^d<<24,d=d<<1^283*(d>>7))),u[t]=u[t-l]^r;for(i=0;t;i++,t--)r=u[3&i?t:t-4],c[i]=t<=4||i<4?r:o[0][a[r>>>24]]^o[1][a[r>>16&255]]^o[2][a[r>>8&255]]^o[3][a[255&r]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,d,u=e^a[0],c=s^a[1],h=i^a[2],p=t^a[3];const f=a.length/4-2;let m,g=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)o=v[u>>>24]^b[c>>16&255]^_[h>>8&255]^T[255&p]^a[g],l=v[c>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&u]^a[g+1],d=v[h>>>24]^b[p>>16&255]^_[u>>8&255]^T[255&c]^a[g+2],p=v[p>>>24]^b[u>>16&255]^_[c>>8&255]^T[255&h]^a[g+3],g+=4,u=o,c=l,h=d;for(m=0;m<4;m++)n[(3&-m)+r]=S[u>>>24]<<24^S[c>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[g++],o=u,u=c,c=h,h=p,p=o}}class a extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},l=function(e,t,i){const s=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),n=new r(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),l=new Int32Array(a.buffer);let d,u,c,h,p,f,m,g,y;for(d=i[0],u=i[1],c=i[2],h=i[3],y=0;y<s.length;y+=4)p=o(s[y]),f=o(s[y+1]),m=o(s[y+2]),g=o(s[y+3]),n.decrypt(p,f,m,g,l,y),l[y]=o(l[y]^d),l[y+1]=o(l[y+1]^u),l[y+2]=o(l[y+2]^c),l[y+3]=o(l[y+3]^h),d=p,u=f,c=m,h=g;return a};class d{constructor(e,t,s,n){const r=d.STEP,l=new Int32Array(e.buffer),u=new Uint8Array(e.byteLength);let c=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+r),t,s,u)),c=r;c<l.length;c+=r)s=new Uint32Array([o(l[c-4]),o(l[c-3]),o(l[c-2]),o(l[c-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+r),t,s,u));this.asyncStream_.push((function(){n(null,i(u))}))}static get STEP(){return 32e3}decryptChunk_(e,t,i,s){return function(){const n=l(e,t,i);s.set(n,e.byteOffset)}}}var u,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};u="undefined"!==typeof window?window:"undefined"!==typeof c?c:"undefined"!==typeof self?self:{};var h=u,p=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},f=h.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const m=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];p(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new d(i,s,n,(function(e,i){self.postMessage(m({source:t.source,decrypted:i}),[i.buffer])}))}})));var Pd=Po(Ld);const Od=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Ad=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Dd=(e,t)=>{t.activePlaylistLoader=e,e.load()},Nd=(e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Ad(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Dd(a.playlistLoader,n)):o&&s.resetEverything()))},Md=(e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()},Rd=(e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,d=r.lastTrack_;if((!d||!a||d.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Ad(s,r),o)){if(o.isMainPlaylist){if(!a||!d||a.id===d.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${d.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if("AUDIO"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Dd(o.playlistLoader,r)):Dd(o.playlistLoader,r)}},Ud={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter(e=>e.default)[0]||r[0]).id,o=i.tracks[a];if(n!==o){Cr.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;Cr.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const s=i.activeTrack();s&&(s.mode="disabled"),i.onTrackChanged()}},Bd={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on("loadedmetadata",()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&"none"!==s.preload())&&r.load()}),t.on("loadedplaylist",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on("error",Ud[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&"none"!==s.preload())&&r.load()}),t.on("loadedplaylist",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on("error",Ud[e](e,i))}},jd={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:d}},mainPlaylistLoader:u}=t,c=va(u.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},c&&(a[e].main.default.playlists=u.main.playlists));for(const h in a[e]){o[h]||(o[h]=[]);for(const n in a[e][h]){let p,f=a[e][h][n];if(c?(d(`AUDIO group '${h}' label '${n}' is a main playlist`),f.isMainPlaylist=!0,p=null):p="vhs-json"===s&&f.playlists?new Fa(f.playlists[0],i,r):f.resolvedUri?new Fa(f.resolvedUri,i,r):f.playlists&&"dash"===s?new Co(f.playlists[0],i,r,u):null,f=Nr({id:n,playlistLoader:p},f),Bd[e](e,f.playlistLoader,t),o[h].push(f),"undefined"===typeof l[n]){const e=new Cr.AudioTrack({id:n,kind:Od(f),enabled:!1,language:f.language,default:f.default,label:n});l[n]=e}}}n.on("error",Ud[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:d}},mainPlaylistLoader:u}=t;for(const c in o[e]){l[c]||(l[c]=[]);for(const r in o[e][c]){if(!s.options_.useForcedSubtitles&&o[e][c][r].forced)continue;let h,p=o[e][c][r];if("hls"===n)h=new Fa(p.resolvedUri,s,a);else if("dash"===n){const e=p.playlists.filter(e=>e.excludeUntil!==1/0);if(!e.length)return;h=new Co(p.playlists[0],s,a,u)}else"vhs-json"===n&&(h=new Fa(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Nr({id:r,playlistLoader:h},p),Bd[e](e,p.playlistLoader,t),l[c].push(p),"undefined"===typeof d[r]){const e=i.addRemoteTextTrack({id:r,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:r},!1).track;d[r]=e}}}r.on("error",Ud[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const a in s[e]){n[a]||(n[a]=[]);for(const t in s[e][a]){const o=s[e][a][t];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let d={label:t,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[d.instreamId]&&(d=Nr(d,l[d.instreamId])),void 0===d.default&&delete d.default,n[a].push(Nr({id:t},o)),"undefined"===typeof r[t]){const e=i.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;r[t]=e}}}}},Fd=(e,t)=>{for(let i=0;i<e.length;i++){if(ga(t,e[i]))return!0;if(e[i].playlists&&Fd(e[i].playlists,t))return!0}return!1},qd=(e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if("AUDIO"===e&&o.length>1&&va(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Fd(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return"undefined"===typeof i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null},$d={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if("showing"===i[e].mode||"hidden"===i[e].mode)return i[e];return null}},Hd=(e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null},Vd=e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{jd[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{["AUDIO"]:r,main:a}}=e;["AUDIO","SUBTITLES"].forEach(i=>{t[i].activeGroup=qd(i,e),t[i].activeTrack=$d[i](i,e),t[i].onGroupChanged=Nd(i,e),t[i].onGroupChanging=Md(i,e),t[i].onTrackChanged=Rd(i,e),t[i].getActiveGroup=Hd(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();const i=t.AUDIO.getActiveGroup();i.playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:"usage",name:"vhs-audio-change"})};s.audioTracks().addEventListener("change",l),s.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),n.on("dispose",()=>{s.audioTracks().removeEventListener("change",l),s.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),s.clearTracks("audio");for(const d in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[d])},zd=()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:ad,activeTrack:ad,getActiveGroup:ad,onGroupChanged:ad,onTrackChanged:ad,lastTrack_:null,logger_:Dr(`MediaGroups[${t}]`)}}),e};class Gd{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=Or(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Jd extends Cr.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Gd,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Dr("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger("error");i.startsWith("data:")?this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1)):(this.steeringManifest.reloadUri=Or(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();this.request_=this.xhr_({uri:i},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders["retry-after"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}const s=JSON.parse(this.request_.responseText);this.assignSteeringProperties_(s),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new n.a.URL(e),i=new n.a.URL(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(n.a.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new n.a.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger("error");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const t=e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]},i=t(this.steeringManifest.priority);this.currentPathway!==i&&(this.currentPathway=i,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=n.a.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){n.a.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Gd}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(Or(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const Wd=10;let Xd;const Yd=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Kd=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Qd=function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return Cr.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${e&&e.id||"null"} -> ${s.id}`;if(!e)return l(d+" as current playlist is not set"),!0;if(s.id===e.id)return!1;const u=Boolean(jr(t,i).length);if(!e.endList)return u||"number"!==typeof e.partTargetDuration?(l(d+" as current playlist is live"),!0):(l(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const c=Wr(t,i),h=o?Eo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Eo.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${d} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,f=e.attributes.BANDWIDTH;if(p<f&&(!o||c<r)){let e=`${d} as next bandwidth < current bandwidth (${p} < ${f})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${c} < ${r})`),l(e),!0}if((!o||p>f)&&c>=n){let e=`${d} as forwardBuffer >= bufferLowWaterLine (${c} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${f})`),l(e),!0}return l(`not ${d} as no switching criteria met`),!1};class Zd extends Cr.EventTarget{constructor(e){super();const{src:t,withCredentials:i,tech:s,bandwidth:r,externVhs:a,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:d,sourceType:u,cacheEncryptionKeys:c,bufferBasedABR:h,leastPixelDiffSelector:p,captionServices:f}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:m}=e;null!==m&&"undefined"!==typeof m||(m=1/0),Xd=a,this.bufferBasedABR=Boolean(h),this.leastPixelDiffSelector=Boolean(p),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.sourceType_=u,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=m,this.enableLowInitialPlaylist=d,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:m,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=zd(),this.mediaSource=new n.a.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=Mr(),this.hasPlayed_=!1,this.syncController_=new kd(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new Pd,this.sourceUpdater_=new yd(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Id,this.keyStatusMap_=new Map;const g={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:f,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:r,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:c,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_="dash"===this.sourceType_?new Co(t,this.vhs_,Nr(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Fa(t,this.vhs_,Nr(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new rd(Nr(g,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new rd(Nr(g,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new Sd(Nr(g,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){s.off("vttjserror",n),e()}function n(){s.off("vttjsloaded",i),t()}s.one("vttjsloaded",i),s.one("vttjserror",n),s.addWebVttScript_()})}),e);const y=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new Jd(this.vhs_.xhr,y),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),Yd.forEach(e=>{this[e+"_"]=Kd.bind(this,e)}),this.logger_=Dr("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const v="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(v,()=>{const e=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);n&&n!==r&&(this.logger_(`switch media ${n} -> ${r} from ${t}`),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=i.length?i[0].playlists:i.playlists,n=t.filter(e=>e.attributes.serviceLocation===s);n.length&&this.mediaTypes_[e].activePlaylistLoader.media(n[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=n.a.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(n.a.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const a in i)if(i[a][n.label]){const t=i[a][n.label];if(t.playlists&&t.playlists.length)r.push.apply(r,t.playlists);else if(t.uri)r.push(t);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const t=e.playlists[i];t.attributes&&t.attributes.AUDIO&&t.attributes.AUDIO===a&&r.push(t)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ma(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Vd({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial");const i="vhs-json"===this.sourceType_&&this.initialMedia_.segments;if(!i)return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on("error",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ma(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,"dash"===this.sourceType_&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const e=this.mainPlaylistLoader_.media();if("playlist-unchanged"===e.lastExcludeReason_)return;const t=this.stuckAtPlaylistEnd_(e);t&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const r in i.AUDIO)for(const e in i.AUDIO[r]){const t=i.AUDIO[r][e];t.uri||(s=!1)}s&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Xd.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine(),r=this.tech_.buffered();return Qd({buffered:r,currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:Wd}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(()=>{this.tech_.setCurrentTime(this.tech_.currentTime())})}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger("firstplay"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,e=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){const t=this.seekable();if(!t.length)return!1;const i=this.syncController_.getExpiredTime(e,this.duration());if(null===i)return!1;const s=Xd.Playlist.playlistEnd(e,i),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return s-n<=Ur;const a=r.end(r.length-1);return a-n<=Ur&&s-a<=Ur}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(ua),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return Cr.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;s.forEach(i=>{if(i===e)return;const s=i.excludeUntil;"undefined"!==typeof s&&s!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(Cr.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=t.internal?this.logger_:Cr.log.warn,d=t.message?" "+t.message:"";l(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${d} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const u=o.targetDuration/2*1e3||5e3,c="number"===typeof o.lastRequest&&Date.now()-o.lastRequest<=u;return this.switchMedia_(o,"exclude",r||c)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s="all"===e;(s||"main"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||"audio"===e)&&n.push("AUDIO"),(s||"subtitle"===e)&&(n.push("CLOSED-CAPTIONS"),n.push("SUBTITLES")),n.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),["main","audio","subtitle"].forEach(t=>{const s=this[t+"SegmentLoader_"];!s||e!==t&&"all"!==e||i.push(s)}),i.forEach(e=>t.forEach(t=>{"function"===typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=jr(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Xd.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let t=this.mainPlaylistLoader_.media();if(!t)return;let i=this.syncController_.getExpiredTime(t,this.duration());if(null===i)return;const s=this.mainPlaylistLoader_.main,n=Xd.Playlist.seekable(t,i,Xd.Playlist.liveEdgeDelay(s,t));if(0===n.length)return;if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(t,this.duration()),null===i)return;if(e=Xd.Playlist.seekable(t,i,Xd.Playlist.liveEdgeDelay(s,t)),0===e.length)return}let r,a;this.seekable_&&this.seekable_.length&&(r=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>n.end(0)||n.start(0)>e.end(0)?this.seekable_=n:this.seekable_=Mr([[e.start(0)>n.start(0)?e.start(0):n.start(0),e.end(0)<n.end(0)?e.end(0):n.end(0)]]):this.seekable_=n,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===r&&this.seekable_.start(0)===a||(this.logger_(`seekable updated [${Hr(this.seekable_)}]`),this.tech_.trigger("seekablechanged"))}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Xd.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const i in t)t[i].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=yl(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||b["b"]),e.main.isMuxed&&(s.video+=","+(i.audio||e.main.audioCodec||b["a"])),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||b["a"],e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const r=(e,t)=>e?Object(b["c"])(t):Object(b["g"])(t),a={};let o;if(["video","audio"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?"browser":"muxer";a[i]=a[i]||[],a[i].push(s[t]),"audio"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{const s=i.attributes&&i.attributes.AUDIO;s===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): "${s.audio}"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach(t=>{const i=(Object(b["h"])(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,n=(Object(b["h"])(s[t]||"")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`"${this.sourceUpdater_.codecs[t]}" -> "${s[t]}"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce((e,t)=>(e&&(e+=", "),e+=`${t} does not support codec(s): "${a[t].join(",")}"`,e),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=yl(this.main,s),r=[];!n.audio||Object(b["g"])(n.audio)||Object(b["c"])(n.audio)||r.push("audio codec "+n.audio),!n.video||Object(b["g"])(n.video)||Object(b["c"])(n.video)||r.push("video codec "+n.video),n.text&&"stpp.ttml.im1t"===n.text&&r.push("text codec "+n.text),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ml(Object(b["h"])(e)),n=gl(s),r=s.video&&Object(b["h"])(s.video)[0]||null,a=s.audio&&Object(b["h"])(s.audio)[0]||null;Object.keys(i).forEach(e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=yl(this.mainPlaylistLoader_.main,s),d=gl(l);if(l.audio||l.video){if(d!==n&&o.push(`codec count "${d}" !== "${n}"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&Object(b["h"])(l.video)[0]||null,t=l.audio&&Object(b["h"])(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec "${e.type}" !== "${r.type}"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec "${t.type}" !== "${a.type}"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(" && ")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),xd(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Eo.GOAL_BUFFER_LENGTH,i=Eo.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Eo.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Eo.BUFFER_LOW_WATER_LINE,i=Eo.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Eo.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Eo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Eo.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Ul(this.inbandTextTracks_,"com.apple.streaming",this.tech_),Rl({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Ul(this.inbandTextTracks_,e,this.tech_),Dl({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const e=this.main(),t=this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering),i=()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)};(t||i())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main(),i=t.playlists,s=new Set;let n=!1;Object.keys(i).forEach(t=>{const r=i[t],a=this.pathwayAttribute_(r),o=a&&e!==a,l=r.excludeUntil===1/0&&"content-steering"===r.lastExcludeReason_;l&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,n=!0);const d=!r.excludeUntil&&r.excludeUntil!==1/0,u=!s.has(r.id)&&o&&d;u&&(s.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_="content-steering",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(n=!0)}}),n&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main(),t=e.playlists,i=this.contentSteeringController_.currentPathwayClones,s=this.contentSteeringController_.nextPathwayClones,n=i&&i.size||s&&s.size;if(n){for(const[e,t]of i.entries()){const i=s.get(e);i||(this.mainPlaylistLoader_.updateOrDeleteClone(t),this.contentSteeringController_.excludePathway(e))}for(const[e,n]of s.entries()){const s=i.get(e);if(s)this.equalPathwayClones_(s,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(e));else{const i=t.filter(e=>e.attributes["PATHWAY-ID"]===n["BASE-ID"]);i.forEach(e=>{this.mainPlaylistLoader_.addClonePathway(n,e)}),this.contentSteeringController_.addAvailablePathway(e)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...s])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const i=e["URI-REPLACEMENT"].PARAMS,s=t["URI-REPLACEMENT"].PARAMS;for(const n in i)if(i[n]!==s[n])return!1;for(const n in s)if(i[n]!==s[n])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach(s=>{const n="usable",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,Cr.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const i="string"===typeof e,s=i?e:bd(e),n=s.slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${n} added to the keyStatusMap`),this.keyStatusMap_.set(n,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const eu=(e,t,i)=>s=>{const n=e.main.playlists[t],r=da(n),a=ua(n);return"undefined"===typeof s?a:(s?delete n.disabled:n.disabled=!0,s===a||r||(i(),s?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),s)};class tu{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=yl(s.main(),t),this.playlist=t,this.id=i,this.enabled=eu(e.playlists,t.id,n)}}const iu=function(e){e.representations=()=>{const t=e.playlistController_.main(),i=va(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!da(e)).map((t,i)=>new tu(e,t,t.id)):[]}},su=["seeking","seeked","pause","playing","error"];class nu{constructor(e){this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Dr("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),r=()=>this.resetTimeUpdate_(),a=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach(e=>{l[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},a[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),this.tech_.on(["seeked","seeking"],l[e].reset)});const d=e=>{["main","audio"].forEach(t=>{a[t+"SegmentLoader_"][e]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(su,r),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(su,r),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach(e=>{a[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),this.tech_.off(["seeked","seeking"],l[e].reset)}),this.checkCurrentTimeTimeout_&&n.a.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&n.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=n.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[e+"SegmentLoader_"],s=i.buffered_(),n=Gr(this[e+"Buffered_"],s);this[e+"Buffered_"]=s,n?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_(`found #${this[e+"StalledDownloads_"]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:zr(s)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),"subtitle"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0})))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Ur>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){const e=this.tech_.seeking();if(!e)return!1;const t=this.seekable(),i=this.tech_.currentTime(),s=this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let n;if(s){const e=t.end(t.length-1);n=e}if(this.beforeSeekableWindow_(t,i)){const e=t.start(0);n=e+(e===t.end(0)?0:Ur)}if("undefined"!==typeof n)return this.logger_(`Trying to seek outside of seekable at time ${i} with seekable range ${Hr(t)}. Seeking to `+n+"."),this.tech_.setCurrentTime(n),!0;const r=this.playlistController_.sourceUpdater_,a=this.tech_.buffered(),o=r.audioBuffer?r.audioBuffered():null,l=r.videoBuffer?r.videoBuffered():null,d=this.media(),u=d.partTargetDuration?d.partTargetDuration:2*(d.targetDuration-Rr),c=[o,l];for(let p=0;p<c.length;p++){if(!c[p])continue;const e=Wr(c[p],i);if(e<u)return!1}const h=Fr(a,i);return 0!==h.length&&(n=h.start(0)+Ur,this.logger_(`Buffered region starts (${h.start(0)}) just beyond seek point (${i}). Seeking to ${n}.`),this.tech_.setCurrentTime(n),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=jr(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) `+i),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered(),n=this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t});if(n)return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const r=Fr(s,t);return r.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${r.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+Ur;const r=!i.endList,a="number"===typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=jr(e,i-3),r=jr(e,i),a=jr(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{const t=Fr(e,i);t.length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time `+i),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Fr(t,i);this.resetTimeUpdate_(),0!==s.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Rr),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}))}gapFromVideoUnderflow_(e,t){const i=qr(e);for(let s=0;s<i.length;s++){const e=i.start(s),n=i.end(s);if(t-e<4&&t-e>2)return{start:e,end:n}}return null}}const ru={errorInterval:30,getSource(e){const t=this.tech({IWillNotUseThisInPlugins:!0}),i=t.currentSource_||this.currentSource();return e(i)}},au=function(e,t){let i=0,s=0;const n=Nr(ru,t);e.ready(()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const r=function(){s&&e.currentTime(s)},a=function(t){null!==t&&void 0!==t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",r),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(n.getSource&&"function"===typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);Cr.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",r),e.off("error",o),e.off("dispose",l)},d=function(t){l(),au(e,t)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=d},ou=function(e){au(this,e)};var lu="3.10.0",du="7.0.2",uu="1.3.0",cu="7.1.0",hu="4.0.1";const pu={PlaylistLoader:Fa,Playlist:ba,utils:so,STANDARD_PLAYLIST_SELECTOR:Cl,INITIAL_PLAYLIST_SELECTOR:Il,lastBandwidthSelector:Cl,movingAverageBandwidthSelector:El,comparePlaylistBandwidth:Sl,comparePlaylistResolution:wl,xhr:za()};Object.keys(Eo).forEach(e=>{Object.defineProperty(pu,e,{get(){return Cr.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Eo[e]},set(t){Cr.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),"number"!==typeof t||t<0?Cr.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Eo[e]=t}})});const fu="videojs-vhs",mu=function(e,t){const i=t.media();let s=-1;for(let n=0;n<e.length;n++)if(e[n].id===i.id){s=n;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:"change"})},gu=function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),mu(e,t.playlists)};pu.canPlaySource=function(){return Cr.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const yu=(e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ml(Object(b["h"])(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=Object(b["e"])(s.video),r=Object(b["e"])(s.audio),a={};for(const o in e)a[o]={},r&&(a[o].audioContentType=r),n&&(a[o].videoContentType=n),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"===typeof e[o]&&(a[o].url=e[o]);return Nr(e,a)},vu=(e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[]),bu=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=i?s.concat([i]):s,r=vu(n,Object.keys(t)),a=[],o=[];return r.forEach(t=>{o.push(new Promise((t,i)=>{e.tech_.one("keysessioncreated",t)})),a.push(new Promise((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?s(e):i()})}))}),Promise.race([Promise.all(a),Promise.race(o)])},_u=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=yu(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(Cr.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Tu=()=>{if(!n.a.localStorage)return null;const e=n.a.localStorage.getItem(fu);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}},Su=e=>{if(!n.a.localStorage)return!1;let t=Tu();t=t?Nr(t,e):e;try{n.a.localStorage.setItem(fu,JSON.stringify(t))}catch(i){return!1}return t},wu=e=>0===e.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(e.substring(e.indexOf(",")+1)):e,xu=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},Cu=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},Eu=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},ku=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};pu.supportsNativeHls=function(){if(!a.a||!a.a.createElement)return!1;const e=a.a.createElement("video");if(!Cr.getTech("Html5").isSupported())return!1;const t=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return t.some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),pu.supportsNativeDash=function(){return!!(a.a&&a.a.createElement&&Cr.getTech("Html5").isSupported())&&/maybe|probably/i.test(a.a.createElement("video").canPlayType("application/dash+xml"))}(),pu.supportsTypeNatively=e=>"hls"===e?pu.supportsNativeHls:"dash"===e&&pu.supportsNativeDash,pu.isSupported=function(){return Cr.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},pu.xhr.onRequest=function(e){xu(pu.xhr,e)},pu.xhr.onResponse=function(e){Cu(pu.xhr,e)},pu.xhr.offRequest=function(e){Eu(pu.xhr,e)},pu.xhr.offResponse=function(e){ku(pu.xhr,e)};const Iu=Cr.getComponent("Component");class Lu extends Iu{constructor(e,t,i){if(super(t,i.vhs),"number"===typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Dr("VhsHandler"),t.options_&&t.options_.playerId){const e=Cr.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(a.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],e=>{const t=a.a.fullscreenElement||a.a.webkitFullscreenElement||a.a.mozFullScreenElement||a.a.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=Nr(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage="undefined"!==typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!==typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!==typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Tu();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=Eo.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Eo.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(e=>{"undefined"!==typeof this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=wu(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=pu,this.options_.sourceType=Object(_["a"])(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.playlistController_=new Zd(this.options_);const i=Nr({liveRangeSafeTimeDelta:Ur},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new nu(i),this.playlistController_.on("error",()=>{const e=Cr.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!==typeof t||t.code?"string"===typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const s=this.options_.bufferBasedABR?pu.movingAverageBandwidthSelector(.55):pu.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=pu.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=n.a.navigator.connection||n.a.navigator.mozConnection||n.a.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;const i=Math.floor(1/(e+t));return i},set(){Cr.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>zr(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>zr(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&Su({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{iu(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=n.a.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),bu({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=_u({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=Cr.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{gu(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{mu(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":lu,"mux.js":du,"mpd-parser":uu,"m3u8-parser":cu,"aes-decrypter":hu}}version(){return this.constructor.version()}canChangeType(){return yd.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&n.a.URL.revokeObjectURL&&(n.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return ho({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return po({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{xu(this.xhr,e)},this.xhr.onResponse=e=>{Cu(this.xhr,e)},this.xhr.offRequest=e=>{Eu(this.xhr,e)},this.xhr.offResponse=e=>{ku(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}}const Pu={name:"videojs-http-streaming",VERSION:lu,canHandleSource(e,t={}){const i=Nr(Cr.options,t);return Pu.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Nr(Cr.options,i);return t.vhs=new Lu(e,t,s),t.vhs.xhr=za(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=Object(_["a"])(e);if(!i)return"";const s=Pu.getOverrideNative(t),n=pu.supportsTypeNatively(i),r=!n||s;return r?"maybe":""},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(Cr.browser.IS_ANY_SAFARI||Cr.browser.IS_IOS),{overrideNative:s=i}=t;return s}},Ou=()=>Object(b["c"])("avc1.4d400d,mp4a.40.2");Ou()&&Cr.getTech("Html5").registerSourceHandler(Pu,0),Cr.VhsHandler=Lu,Cr.VhsSourceHandler=Pu,Cr.Vhs=pu,Cr.use||Cr.registerComponent("Vhs",pu),Cr.options.vhs=Cr.options.vhs||{},Cr.getPlugin&&Cr.getPlugin("reloadSourceOnError")||Cr.registerPlugin("reloadSourceOnError",ou)}).call(this,i("c8ba"))},f106:function(e,t,i){"use strict";i("9faa")},f107:function(e,t,i){"use strict";i("6330")},f6b4:function(e,t,i){"use strict";var s=i("c532");function n(){this.handlers=[]}n.prototype.use=function(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){s.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=n},f772:function(e,t,i){"use strict";var s=i("5692"),n=i("90e3"),r=s("keys");e.exports=function(e){return r[e]||(r[e]=n(e))}},f8a8:function(e,t,i){"use strict";i.d(t,"a",(function(){return L})),i.d(t,"b",(function(){return P}));var s,n=i("de66"),r=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"===typeof e?Object(n["h"])(e):e}),a=function(e){return Array.isArray(e)?e.map((function(e){return r(e)})):[r(e)]},o=function(e){e=Object(n["k"])(e);var t=[],i=0;while(e.length>i){var r=e[i],a=0,o=0;o++;var l=e[o];o++;while(128&l)a=(127&l)<<7,l=e[o],o++;a+=127&l;for(var d=0;d<s.length;d++){var u=s[d],c=u.id,h=u.parser;if(r===c){t.push(h(e.subarray(o,o+a)));break}}i+=a+o}return t};s=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var i=e[t.size];t.url=Object(n["c"])(e.subarray(t.size+1,t.size+1+i)),t.size+=i}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=o(e.subarray(t.size))||[],t}},{id:4,parser:function(e){var t={tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:o(e.subarray(13))};return t}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var l=function e(t,i,s){void 0===s&&(s=!1),i=a(i),t=Object(n["k"])(t);var r=[];if(!i.length)return r;var o=0;while(o<t.length){var l=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])>>>0,d=t.subarray(o+4,o+8);if(0===l)break;var u=o+l;if(u>t.length){if(s)break;u=t.length}var c=t.subarray(o+8,u);Object(n["a"])(d,i[0])&&(1===i.length?r.push(c):r.push.apply(r,e(c,i.slice(1),s))),o=u}return r},d={EBML:Object(n["k"])([26,69,223,163]),DocType:Object(n["k"])([66,130]),Segment:Object(n["k"])([24,83,128,103]),SegmentInfo:Object(n["k"])([21,73,169,102]),Tracks:Object(n["k"])([22,84,174,107]),Track:Object(n["k"])([174]),TrackNumber:Object(n["k"])([215]),DefaultDuration:Object(n["k"])([35,227,131]),TrackEntry:Object(n["k"])([174]),TrackType:Object(n["k"])([131]),FlagDefault:Object(n["k"])([136]),CodecID:Object(n["k"])([134]),CodecPrivate:Object(n["k"])([99,162]),VideoTrack:Object(n["k"])([224]),AudioTrack:Object(n["k"])([225]),Cluster:Object(n["k"])([31,67,182,117]),Timestamp:Object(n["k"])([231]),TimestampScale:Object(n["k"])([42,215,177]),BlockGroup:Object(n["k"])([160]),BlockDuration:Object(n["k"])([155]),Block:Object(n["k"])([161]),SimpleBlock:Object(n["k"])([163])},u=[128,64,32,16,8,4,2,1],c=function(e){for(var t=1,i=0;i<u.length;i++){if(e&u[i])break;t++}return t},h=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var r=c(e[t]),a=e.subarray(t,t+r);return i&&(a=Array.prototype.slice.call(e,t,t+r),a[0]^=u[r-1]),{length:r,value:Object(n["b"])(a,{signed:s}),bytes:a}},p=function e(t){return"string"===typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"===typeof t?Object(n["f"])(t):t},f=function(e){return Array.isArray(e)?e.map((function(e){return p(e)})):[p(e)]},m=function e(t,i,s){if(s>=i.length)return i.length;var r=h(i,s,!1);if(Object(n["a"])(t.bytes,r.bytes))return s;var a=h(i,s+r.length);return e(t,i,s+a.length+a.value+r.length)},g=function e(t,i){i=f(i),t=Object(n["k"])(t);var s=[];if(!i.length)return s;var r=0;while(r<t.length){var a=h(t,r,!1),o=h(t,r+a.length),l=r+a.length+o.length;127===o.value&&(o.value=m(a,t,l),o.value!==t.length&&(o.value-=l));var d=l+o.value>t.length?t.length:l+o.value,u=t.subarray(l,d);Object(n["a"])(i[0],a.bytes)&&(1===i.length?s.push(u):s=s.concat(e(u,i.slice(1))));var c=a.length+o.length+u.length;r+=c}return s},y=i("321f"),v=Object(n["k"])([0,0,0,1]),b=Object(n["k"])([0,0,1]),_=Object(n["k"])([0,0,3]),T=function(e){var t=[],i=1;while(i<e.length-2)Object(n["a"])(e.subarray(i,i+3),_)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,r=new Uint8Array(s),a=0;for(i=0;i<s;a++,i++)a===t[0]&&(a++,t.shift()),r[i]=e[a];return r},S=function(e,t,i,s){void 0===s&&(s=1/0),e=Object(n["k"])(e),i=[].concat(i);var r,a=0,o=0;while(a<e.length&&(o<s||r)){var l=void 0;if(Object(n["a"])(e.subarray(a),v)?l=4:Object(n["a"])(e.subarray(a),b)&&(l=3),l){if(o++,r)return T(e.subarray(r,a));var d=void 0;"h264"===t?d=31&e[a+l]:"h265"===t&&(d=e[a+l]>>1&63),-1!==i.indexOf(d)&&(r=a+l),a+=l+("h264"===t?1:2)}else a++}return e.subarray(0,0)},w=function(e,t,i){return S(e,"h264",t,i)},x=function(e,t,i){return S(e,"h265",t,i)},C={webm:Object(n["k"])([119,101,98,109]),matroska:Object(n["k"])([109,97,116,114,111,115,107,97]),flac:Object(n["k"])([102,76,97,67]),ogg:Object(n["k"])([79,103,103,83]),ac3:Object(n["k"])([11,119]),riff:Object(n["k"])([82,73,70,70]),avi:Object(n["k"])([65,86,73]),wav:Object(n["k"])([87,65,86,69]),"3gp":Object(n["k"])([102,116,121,112,51,103]),mp4:Object(n["k"])([102,116,121,112]),fmp4:Object(n["k"])([115,116,121,112]),mov:Object(n["k"])([102,116,121,112,113,116]),moov:Object(n["k"])([109,111,111,118]),moof:Object(n["k"])([109,111,111,102])},E={aac:function(e){var t=Object(y["a"])(e);return Object(n["a"])(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(y["a"])(e);return Object(n["a"])(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=g(e,[d.EBML,d.DocType])[0];return Object(n["a"])(t,C.webm)},mkv:function(e){var t=g(e,[d.EBML,d.DocType])[0];return Object(n["a"])(t,C.matroska)},mp4:function(e){return!E["3gp"](e)&&!E.mov(e)&&(!(!Object(n["a"])(e,C.mp4,{offset:4})&&!Object(n["a"])(e,C.fmp4,{offset:4}))||(!(!Object(n["a"])(e,C.moof,{offset:4})&&!Object(n["a"])(e,C.moov,{offset:4}))||void 0))},mov:function(e){return Object(n["a"])(e,C.mov,{offset:4})},"3gp":function(e){return Object(n["a"])(e,C["3gp"],{offset:4})},ac3:function(e){var t=Object(y["a"])(e);return Object(n["a"])(e,C.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];var t=0;while(t+188<e.length&&t<188){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Object(y["a"])(e);return Object(n["a"])(e,C.flac,{offset:t})},ogg:function(e){return Object(n["a"])(e,C.ogg)},avi:function(e){return Object(n["a"])(e,C.riff)&&Object(n["a"])(e,C.avi,{offset:8})},wav:function(e){return Object(n["a"])(e,C.riff)&&Object(n["a"])(e,C.wav,{offset:8})},h264:function(e){return w(e,7,3).length},h265:function(e){return x(e,[32,33],3).length}},k=Object.keys(E).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);k.forEach((function(e){var t=E[e];E[e]=function(e){return t(Object(n["k"])(e))}}));var I=E,L=function(e){e=Object(n["k"])(e);for(var t=0;t<k.length;t++){var i=k[t];if(I[i](e))return i}return""},P=function(e){return l(e,["moof"]).length>0}},f97d:function(e,t){var i={"":!0,up:!0};function s(e){if("string"!==typeof e)return!1;var t=i[e.toLowerCase()];return!!t&&e.toLowerCase()}function n(e){return"number"===typeof e&&e>=0&&e<=100}function r(){var e=100,t=3,i=0,r=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=s(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):l=t}}})}e.exports=r},fb15:function(e,t,i){"use strict";if(i.r(t),i.d(t,"cms",(function(){return Jt})),"undefined"!==typeof window){var s=window.document.currentScript,n=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(i.p=n[1])}var r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{ref:"cms"},[t("div",{class:["lay-wrap",{mobile:"mobile"==e.mode}],style:{width:("pc"==e.mode?1920:750)*e.ratio+"px"}},e._l(e.cmsList,(function(i){return t("div",{key:i.sort,staticClass:"lay-item"},[t("div",{staticClass:"layout-set",style:{width:i.attributeJson.layoutStyle&&2===i.attributeJson.layoutStyle.widthStyle.type?i.attributeJson.layoutStyle.widthStyle.width+"%":"100%",height:i.attributeJson.layoutStyle?Math.round(i.attributeJson.layoutStyle.height*e.ratio)+"px":"auto"}},[t(e.layOutObj[i.layoutType],e._g(e._b({ref:"layModule",refInFor:!0,tag:"component",attrs:{layOutData:i.attributeJson,sort:i.attributeJson.sort,ratio:e.ratio,mode:e.mode,moduleName:i.attributeJson.uniqueName,isVisualShow:e.isVisualShow,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,recordId:i.originalId?i.originalId:i.recordId,envUrl:e.envUrl,path:e.path,isClient:e.isClient},scopedSlots:e._u([{key:"customComponent",fn:function(t){return 3==i.layoutType?[e._t("customComponent",null,{attributeJson:t.attributeJson})]:void 0}},{key:"dgCustomComponent",fn:function(t){return[e._t("dgCustomComponent",null,{data:t.attributeJson})]}}],null,!0)},"component",e.$attrs,!1),e.$listeners))],1)])})),0)])},a=[],o=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"single-layout",style:e.layoutStyle},[t("div",{staticStyle:{width:"100%",height:"100%"}},[e._l(e.layOutData.componentList.filter(e=>e.type<=100),(function(i,s){return t("div",{key:s},[1==i.displayType?t(i.component,e._g(e._b({key:i.sort,ref:"singleComponent",refInFor:!0,tag:"component",style:{zIndex:s+1},attrs:{ratio:e.ratio,attributeJson:i.attributeJson,sortId:i.sort,recordId:e.recordId,sort:e.sort,envUrl:e.envUrl,isClient:e.isClient,stopReport:e.stopReport,extraCategory:e.extraCategory,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig}},"component",e.$attrs,!1),e.$listeners)):e._e()],1)})),t("div",[e._t("dgCustomComponent",null,{attributeJson:e.getCustom()})],2)],2)])},l=[],d=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"text-wrap entrance-con",style:[e.conStyle,e.animationInStyle],attrs:{"data-sensors-click":"","data-sensorsClick":e.attributeJson&&e.attributeJson.linkObj&&e.attributeJson.linkObj.jumpLinkType?"true":"false",id:`entrance_${e.recordId}_${e.sortId}`,name:`entrance_${e.recordId}_${e.sortId}`},on:{click:e.pageClick}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual&&e.visualNumber,expression:"isVisualShow && hasVisual && visualNumber"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber)}})]),t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{ data: tipReportData, envUrl }"}],ref:"text"+e.sortId,class:["text-con","text-con-"+e.sortId,e.animationInObj.type?e.enterClass:""],domProps:{innerHTML:e._s(e.attributeJson.label)}})])},u=[],c=(i("14d9"),i("fda2"),i("bc3a")),h=i.n(c);const p={json:"application/json;",form:"application/x-www-form-urlencoded;",html:"text/html;",file:"multipart/form-data",excel:"msexcel",xml:"application/xml",javascript:"application/x-javascript;charset=utf-8"},f={lang:"Accept-Language",contentType:"Content-Type"};function m(e){if(200===e.status){let t=e.data;return"0"===t.errorCode?t.data:e.data}}h.a.interceptors.response.use(m,e=>Promise.reject(e));class g{static async call(e,{method:t="get",headers:i={},body:s=null,responseType:n=null}={}){let r=e,a={method:t,url:r,responseType:n||"json",headers:i};"get"===t?a.params=s:a.data=s;const o=await h()(a).catch(e=>{e.response?console.error(e.response.status,e.response.data):e.request?console.error(e.request):console.error("Error",e.message?e.message:"")});return o}static get(e,{mask:t=!0,external:i=!1,headers:s={}}={}){return g.call(e,{headers:s,external:i,mask:t})}static postBody(e,{body:t={},language:i="zh-CN",module:s="",method:n="post",mask:r=!0,postData:a=!0,external:o=!1,headers:l={},compat:d}){return g.call(e,{module:s,method:n,headers:Object.assign(l,{[f.contentType]:p.json,common:{languageCode:i}}),body:t,postData:a,external:o,mask:r,compat:d})}}class y{getProductInfo(e,t,i){return g.postBody(e+"service-zuul/manage/search/plp/standard",{body:t,language:i})}getSortProductInfo(e,t,i){return g.postBody(e+"service-zuul/manage/search/cms/sort",{body:t,language:i})}dataSaveDecorationPageComponentEvent(e,t){return g.postBody(e+"service-zuul/data/collect/acquisition",{body:t})}acquisitionBatch(e,t){return g.postBody(e+"/service-zuul/data/collect/acquisitionBatch",{body:t})}}const v=new y;class b{constructor(){this.intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(_(e,this.intersectionObserver),this.intersectionObserver.unobserve(e.target))})}),this.interval&&(clearInterval(this.interval),this.interval=null),this.interval=T()}observe(e,t){e.setAttribute("report-data",JSON.stringify(t.value?t.value.data:null)),this.intersectionObserver.observe(e)}disconnect(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),sessionStorage.setItem("reportData","[]"),this.interval&&(clearInterval(this.interval),this.interval=null),this.isDestroy=!0)}static getInstance(e){return!this.isDestroy&&this.instance||(this.instance=new b),e&&(this.instance.envUrl=e.value?e.value.envUrl:this.instance.envUrl),this.instance}static resetIsDestroy(e){this.isDestroy=Boolean(e),this.isDestroy&&(this.instance=null)}}const _=function(e,t){const i=e.target,s=i.getAttribute("report-data");let n=JSON.parse(sessionStorage.getItem("reportData")||null)||[];"null"!=s&&"undefined"!=s?(n.push(s),sessionStorage.setItem("reportData",JSON.stringify(n))):t.unobserve(i)},T=function(){return setInterval(()=>{let e=JSON.parse(sessionStorage.getItem("reportData")||null)||[];e.length>0&&(sessionStorage.setItem("reportData","[]"),S(e))},1500)},S=function(e){let t=e.map(e=>w(e)),i=b.getInstance().envUrl;i&&v.acquisitionBatch(i,t)},w=function(e){let t=JSON.parse(e);const i={source:"",medium:"",commodity_id:t.popData&&t.popData.productCode||"",commodity_name:t.popData&&t.popData.selectDataShow||"",commodity_sku_id:"",component_name:t.uniqueName,component_id:t.uniqueId,component_type:t.componentType,hot_zone_id:t.popData&&t.popData.uniqueId||"",hot_zone_name:t.popData&&t.popData.uniqueName||"",material_id:t.materialId,material_name:t.materialName,url_path:t.path||"/",refer_info:t.refererPagePath,position:t.position,trigger_Method_Type:t.componentMethodType};let s="";return localStorage.getItem(t.brand+"Cookie")?s=localStorage.getItem(t.brand+"Cookie"):(s=`${parseInt((new Date).getTime())}${Math.floor(1e4*Math.random())}`,localStorage.setItem(t.brand+"Cookie",s)),{eventProperty:JSON.stringify({...i}),event:t.event,distinctId:s}};var x={bind(e,t){"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype&&(b.resetIsDestroy(),b.getInstance(t).observe(e,t))},unbind(){b.resetIsDestroy(!0),b.getInstance().disconnect()}};function C(e,t,i){const s=new y,n={source:"",medium:"",commodity_id:e.popData.productCode||"",commodity_name:e.popData.selectDataShow||"",commodity_sku_id:"",component_name:e.uniqueName,component_id:e.uniqueId,component_type:e.componentType,hot_zone_id:e.popData.uniqueId||"",hot_zone_name:e.popData.uniqueName||"",material_id:e.materialId,material_name:e.materialName,url_path:e.path,refer_info:e.refererPagePath,position:e.position,trigger_Method_Type:e.componentMethodType};let r="";localStorage.getItem(e.brand+"Cookie")?r=localStorage.getItem(e.brand+"Cookie"):(r=`${parseInt((new Date).getTime())}${Math.floor(1e4*Math.random())}`,localStorage.setItem(e.brand+"Cookie",r));let a={eventProperty:JSON.stringify({...n}),event:e.event,distinctId:r};if("click"==i||"exposure"==i)return a;s.dataSaveDecorationPageComponentEvent(t,a)}function E(e,t){var i=null,s=Date.now();return function(){var n=Date.now(),r=t-(n-s),a=this,o=arguments;clearTimeout(i),r<=0?(e.apply(a,o),s=Date.now()):i=setTimeout(e,r)}}function k(e){var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")}function I(){const e=/^.*((iPhone)|(iPad)|(Safari))+.*$/,t=navigator.userAgent,i={trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile/i)||!!t.match(/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1||t.indexOf("Mac")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1===t.indexOf("Safari")};return Boolean(e.test(t)&&(i.iPhone||i.iPad||i.ios))}const L={inheritAttrs:!1,props:{attributeJson:{type:Object,default:function(){}},sort:{type:Number,default:0},item:{type:Object,default:()=>{}},ratio:{type:Number,default:1},envUrl:{type:String,default:""},fontRatio:{type:Number,default:1},mode:{type:String,default:"pc"},language:{type:String,default:"zh-CN"},sortId:{type:Number,default:0},sort:{type:[String,Number],default:0},recordId:{type:[String,Number],default:0},refererPagePath:{type:String},brand:{type:String},path:{type:String},isClient:{type:Boolean,default:!0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null},carouselIndex:{type:Number,default:0}},data(){return{scrollHandle:E(this.scrollThrottle,200),hoverStyle:{},hoverStyleShow:!1,hoverImage:"",fillStyle:{},hoverDirection:"",finishAnimation:!1,entranceShow:!0,enterClass:"",animationInStyle:{},entranceAnimate:{fade:"animate__animated animate__fadeIn",scale:"animate__animated animate__zoomIn"}}},computed:{animationInObj:function(){return this.attributeJson.animationInObj},animationHoverObj:function(){return this.attributeJson.animationHoverObj},baseStyle(){return this.attributeJson.baseStyle},styleType(){return this.attributeJson.styleType},conStyle(){let{attributeJson:e,ratio:t}=this;return{width:Math.round(e.baseStyle.w*t)+"px",height:Math.round(e.baseStyle.h*t)+"px",left:Math.round(e.baseStyle.l*t)+"px",top:Math.round(e.baseStyle.t*t)+"px"}}},watch:{animationHoverObj:{handler(e){this.disposeHoverAnimate(e)},immediate:!0,deep:!0},animationInObj:{handler(){let{type:e,direction:t,delay:i,duration:s}=this.attributeJson.animationInObj;e&&(this.enterClass="",this.enterClass=this.entranceAnimate[e],this.animationInStyle={animationDuration:s+"s",amimationDelay:i+"s",animationName:"slide"!=e?this.entranceAnimate[e]:t,animationPlayState:"paused"})},immediate:!0}},methods:{isInCurrentScreenArea(){const{top:e}=this.$el.getBoundingClientRect();return e<=window.innerHeight-100},scrollThrottle(){this.isInCurrentScreenArea()&&!this.finishAnimation&&(this.animationInStyle.animationName&&(this.$el.style.animationPlayState="running"),this.finishAnimation=!0,this.endObserver())},startObserver(){window.addEventListener("scroll",this.scrollHandle,!0)},endObserver(){window.removeEventListener("scroll",this.scrollHandle,!0)},disposeHoverAnimate(e){let t={};if(2===e.type){let i=e.borderStyle;if(1==i.type&&(t={border:i.borderColor?"2px solid "+i.borderColor:"none"}),2==i.type){let{borderTop:e,borderRight:s,borderBottom:n,borderLeft:r}=i;t={borderTop:e?"2px solid "+e:"none",borderRight:s?"2px solid "+s:"none",borderBottom:n?"2px solid "+n:"none",borderLeft:r?"2px solid "+r:"none"}}}if(3===e.type&&(t={transform:"scale(1.2)",transformOrigin:"center center"}),4===e.type&&(this.hoverDirection=e.bgStyle.direction),5===e.type){let{hoverImgList:t}=e;this.hoverImage=t[0]?t[0].resourcePath:""}this.hoverStyle=t},onDrag:function(e,t){let i=this.ratio;this.attributeJson.baseStyle.l=e/i,this.attributeJson.baseStyle.t=t/i,this.$set(this.attributeJson,"baseStyle",this.attributeJson.baseStyle)},onResize:function(e,t,i,s){let n=this.ratio,r=this.attributeJson.baseStyle;r={w:i/n,h:s/n,l:e/n,t:t/n,isLocked:r.isLocked},this.$set(this.attributeJson,"baseStyle",r)},getRefLineParams(e){this.$emit("getRefLineParams",e)}},directives:{hoverAnimate:{inserted:function(e,t,i){e.onmouseover=function(){i.context.hoverStyleShow=!0,t.value&&(i.context[t.value.key]=t.value.value)},e.onmouseleave=function(){i.context.hoverStyleShow=!1,t.value&&(i.context[t.value.key]=-1)}}},treport:x}};var P={name:"textItem",mixins:[L],components:{},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1}},data(){return{sensorsIsRes:!1}},computed:{tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:12,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1,event:"bannerShow"}},visualNumber(){var e;let t=0;if((null===(e=this.visualData)||void 0===e?void 0:e.length)>0){let e=this.getMktIndex();this.visualData.forEach(i=>{let s=`${this.recordId}_${this.sort}`;Boolean("总和"!=i.date&&"快速总和"!=i.date&&s==i.module_id&&e==i.mkt_rank)&&(t+=i["坑位点击数据"]?i["坑位点击数据"]:0)})}return t}},methods:{getMktIndex(){var e,t,i,s,n,r,a,o,l,d,u,c,h,p,f,m;const g=null!==(e=this.extraCategory)&&void 0!==e&&e.category_index?(null===(t=this.cmsConfig)||void 0===t||null===(t=t.attributeJson)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&null!==(i=this.cmsConfig)&&void 0!==i&&null!==(i=i.attributeJson)&&void 0!==i&&null!==(i=i.list[Number((null===(s=this.extraCategory)||void 0===s?void 0:s.category_index)||1)-1])&&void 0!==i&&null!==(i=i.componentList)&&void 0!==i&&i.find(e=>e.sort===this.attributeJson.sort)?null===(n=this.cmsConfig)||void 0===n||null===(n=n.attributeJson)||void 0===n||null===(n=n.list[Number((null===(r=this.extraCategory)||void 0===r?void 0:r.category_index)||1)-1])||void 0===n||null===(n=n.componentList)||void 0===n?void 0:n.find(e=>e.sort===this.attributeJson.sort):(null===(a=this.cmsConfig)||void 0===a||null===(a=a.attributeJson)||void 0===a||null===(a=a.list)||void 0===a?void 0:a.length)>0&&null!==(o=this.cmsConfig)&&void 0!==o&&null!==(o=o.attributeJson)&&void 0!==o&&null!==(o=o.list[Number((null===(l=this.extraCategory)||void 0===l?void 0:l.category_index)||1)-1])&&void 0!==o&&null!==(o=o.componentList)&&void 0!==o&&o.find(e=>e.sort===this.attributeJson.sort)?null===(d=this.cmsConfig)||void 0===d||null===(d=d.attributeJson)||void 0===d||null===(d=d.list[Number((null===(u=this.extraCategory)||void 0===u?void 0:u.category_index)||1)-1])||void 0===d||null===(d=d.componentList)||void 0===d?void 0:d.find(e=>e.sort===this.attributeJson.sort):null:null!==(c=this.cmsConfig)&&void 0!==c&&null!==(c=c.attributeJson)&&void 0!==c&&null!==(c=c.componentList)&&void 0!==c&&c.find(e=>e.sort===this.attributeJson.sort)?this.cmsConfig.attributeJson.componentList.find(e=>e.sort===this.attributeJson.sort):null!==(h=this.cmsConfig)&&void 0!==h&&null!==(h=h.attributeJson)&&void 0!==h&&null!==(h=h.componentList)&&void 0!==h&&h.find(e=>e.sort===this.attributeJson.sort)?null===(p=this.cmsConfig)||void 0===p||null===(p=p.attributeJson)||void 0===p?void 0:p.componentList.find(e=>e.sort===this.attributeJson.sort):null;let y="";if("simplyText"===(null===g||void 0===g?void 0:g.component)||"textItem"===(null===g||void 0===g?void 0:g.component)||"buttonItem"===(null===g||void 0===g?void 0:g.component)){var v,b,_,T,S;y="";let e=[],t=[];var w,x;if(null!==(v=this.extraCategory)&&void 0!==v&&v.category_index&&(null===(b=this.cmsConfig)||void 0===b||null===(b=b.attributeJson)||void 0===b||null===(b=b.list)||void 0===b?void 0:b.length)>0&&(null===(_=this.cmsConfig)||void 0===_||null===(_=_.attributeJson)||void 0===_||null===(_=_.list[Number((null===(T=this.extraCategory)||void 0===T?void 0:T.category_index)||1)-1])||void 0===_||null===(_=_.componentList)||void 0===_?void 0:_.length)>0)null===(w=this.cmsConfig.attributeJson.list[Number((null===(x=this.extraCategory)||void 0===x?void 0:x.category_index)||1)-1])||void 0===w||w.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"===(null===i||void 0===i?void 0:i.component)&&1===(null===i||void 0===i?void 0:i.displayType)&&[1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)&&t.push(i.attributeJson):e.push(i.attributeJson)});else if((null===(S=this.cmsConfig)||void 0===S||null===(S=S.attributeJson)||void 0===S||null===(S=S.componentList)||void 0===S?void 0:S.length)>0){var C;null===(C=this.cmsConfig)||void 0===C||null===(C=C.attributeJson)||void 0===C||C.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)||t.push(i.attributeJson):e.push(i.attributeJson)})}"textItem"===(null===g||void 0===g?void 0:g.component)||"simplyText"===(null===g||void 0===g?void 0:g.component)?e.length>0&&(y=e.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):""):"buttonItem"===(null===g||void 0===g?void 0:g.component)&&t.length>0&&(y=t.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):"")}let E=y;return E=(E&&null!==(f=this.extraCategory)&&void 0!==f&&f.category_index?(null===(m=this.extraCategory)||void 0===m?void 0:m.category_index)+"-":"")+E,E},needSensorsRep(){},pageClick(){var e;if(this.isVisualShow)return;let t=JSON.parse(JSON.stringify(this.tipReportData));if(t.event="bannerClick",this.attributeJson.linkObj.jumpLinkType)try{let e=C(t,this.envUrl,"click"),i=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(l){console.error(l)}var i,s,n,r,a,o;null!==(e=this.attributeJson)&&void 0!==e&&null!==(e=e.linkObj)&&void 0!==e&&e.jumpLinkType&&this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:this.attributeJson,propsObject:C(JSON.parse(JSON.stringify(t)),this.envUrl,"click"),reportData:t,extraData:{isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",isSpecial:!0,noLabel:!0}});this.$emit("jumpLink",this.attributeJson.linkObj)}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},O=P,A=O;i("c57a");function D(e,t,i,s,n,r,a,o){var l,d="function"===typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=i,d._compiled=!0),s&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=l):n&&(l=o?function(){n.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(d.functional){d._injectStyles=l;var u=d.render;d.render=function(e,t){return l.call(t),u(e,t)}}else{var c=d.beforeCreate;d.beforeCreate=c?[].concat(c,l):[l]}return{exports:e,options:d}}var N=D(A,d,u,!1,null,"ae5e700c",null),M=N.exports,R=M,U=function(){var e,t,i=this,s=i._self._c;i._self._setupProxy;return s("div",{directives:[{name:"onScroll",rawName:"v-onScroll",value:i.scrollMethod,expression:"scrollMethod"}],key:null!==(e=i.attributeJson)&&void 0!==e&&e.sort?i.attributeJson.sort:"",staticClass:"image-list entrance-con",style:{width:Math.ceil(i.attributeJson.baseStyle.w*i.ratio)+"px",height:Math.round(i.attributeJson.baseStyle.h*i.ratio)+"px",left:Math.round(i.attributeJson.baseStyle.l*i.ratio)+"px",top:Math.round(i.attributeJson.baseStyle.t*i.ratio)+"px",...i.animationInStyle}},[i.hasConfig?[s("div",{ref:"img"+(null!==(t=i.attributeJson)&&void 0!==t&&t.sort?i.attributeJson.sort:""),class:["image-warp","image-warp-"+i.sortId],style:{animationDuration:i.animationInObj.duration+"s"}},[i.isSwiper?s("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],style:[i.picStyle,3===i.animationHoverObj.type&&i.hoverStyleShow?i.hoverStyle:""]},[s("div",{ref:"swiper-container"+i.sortId,class:[`swiper-container swiper-container-${i.recordId}${i.sortId}`]},[s("div",{staticClass:"swiper-wrapper",style:{height:(i.baseStyle.h-(i.hasScrollBar?30:0))*i.ratio+"px!important"}},i._l(i.attributeJson.list,(function(e,t){var n,r,a,o,l,d,u,c,h,p,f,m;return s("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:i.tipReportData(t),envUrl:i.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:e.id,ref:`${i.sortId}${t}`,refInFor:!0,staticClass:"swiper-slide",style:{width:i.baseStyle.w/4*i.ratio+"px"}},[s("div",{staticClass:"slide-con",style:{height:(i.baseStyle.h-(i.hasScrollBar?30:0))*i.ratio+"px"}},[s("img",{attrs:{src:(null===e||void 0===e||null===(n=e.picList)||void 0===n?void 0:n.length)>0&&null!==e&&void 0!==e&&null!==(r=e.picList[0])&&void 0!==r&&r.resourcePath?e.picList[0].resourcePath:"",alt:(null===e||void 0===e||null===(a=e.picList)||void 0===a?void 0:a.length)>0&&null!==e&&void 0!==e&&null!==(o=e.picList[0])&&void 0!==o&&o.resourceName?e.picList[0].resourceName.split(".")[0]:""}}),(null===e||void 0===e||null===(l=e.picList)||void 0===l?void 0:l.length)>0&&(null===e||void 0===e||null===(d=e.popList)||void 0===d?void 0:d.length)>0?[s("hotspot",i._g(i._b({ref:`hotspot${i.sortId}${t}`,refInFor:!0,attrs:{componentType:2,parentItem:i.attributeJson,item:e,ratio:i.ratio,path:i.path,envUrl:i.envUrl,sortId:i.sortId,recordId:i.recordId,laySort:i.sort,sort:i.sort,brand:i.brand,uniqueName:i.attributeJson.uniqueName,language:i.language,extraCategory:{isCategory:!(null===(u=i.extraCategory)||void 0===u||!u.isCategory)&&(null===(c=i.extraCategory)||void 0===c?void 0:c.isCategory),category_index:null!==(h=i.extraCategory)&&void 0!==h&&h.category_index?null===(p=i.extraCategory)||void 0===p?void 0:p.category_index:"",category_name:null!==(f=i.extraCategory)&&void 0!==f&&f.category_name?null===(m=i.extraCategory)||void 0===m?void 0:m.category_name:"",MKTIndex:""+(t+1),MKTName:i.attributeJson.list[t].uniqueName},isVisualShow:i.isVisualShow,moduleName:i.moduleName,hasVisual:i.hasVisual,visualData:i.visualData,cmsConfig:i.cmsConfig,stopReport:i.stopReport}},"hotspot",i.$attrs,!1),i.$listeners))]:i._e()],2)])})),0),i.hasSwiperButton?s("div",{class:`swiper-button-prev prev-${i.recordId}${i.sortId}`},[i._t("swiper-button-prev",(function(){return[2==i.indicatorType||3==i.indicatorType?s("div",[s("span",{staticClass:"cms2iconfont iconleft"})]):i._e()]}))],2):i._e(),i.hasSwiperButton?s("div",{class:`swiper-button-next next-${i.recordId}${i.sortId}`},[i._t("swiper-button-next",(function(){return[2==i.indicatorType||3==i.indicatorType?s("div",[s("span",{staticClass:"cms2iconfont iconright"})]):i._e()]}))],2):i._e(),i.hasScrollBar?s("div",{class:`swiper-scrollbar scrollbar-${i.recordId}${i.sortId}`}):i._e()]),2===i.animationHoverObj.type?s("div",{staticClass:"hover-con",style:[i.hoverStyle,{opacity:i.hoverStyleShow?1:0}]}):i._e()]):s("div",{class:["image-warp",3==i.styleType&&"pc"!=i.mode?"image-type3":""],style:[i.picStyle,3===i.animationHoverObj.type&&i.hoverStyleShow?i.hoverStyle:""]},i._l(i.attributeJson.list,(function(e,t){var n,r,a,o,l,d;return s("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:i.tipReportData(t),envUrl:i.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:t,ref:`${i.sortId}${t}`,refInFor:!0,staticClass:"image-item",style:[i.picItemStyle]},[s("img",{class:{contain:1!=i.styleType},attrs:{src:(null===e||void 0===e||null===(n=e.picList)||void 0===n?void 0:n.length)>0&&null!==e&&void 0!==e&&null!==(r=e.picList[0])&&void 0!==r&&r.resourcePath?e.picList[0].resourcePath:"",alt:(null===e||void 0===e||null===(a=e.picList)||void 0===a?void 0:a.length)>0&&null!==e&&void 0!==e&&null!==(o=e.picList[0])&&void 0!==o&&o.resourceName?e.picList[0].resourceName.split(".")[0]:""}}),2===i.animationHoverObj.type?s("div",{staticClass:"hover-con",style:[i.hoverStyle,{opacity:i.hoverStyleShow?1:0}]}):i._e(),5===i.animationHoverObj.type&&i.hoverImage&&i.hoverStyleShow?s("img",{staticClass:"hover-image",attrs:{src:i.hoverImage,alt:""}}):i._e(),(null===e||void 0===e||null===(l=e.picList)||void 0===l?void 0:l.length)>0&&(null===e||void 0===e||null===(d=e.popList)||void 0===d?void 0:d.length)>0?s("div",[s("hotspot",i._g(i._b({ref:`hotspot${i.sortId}${t}`,refInFor:!0,attrs:{isSpecial:!0,parentItem:i.attributeJson,item:e,ratio:i.ratio,path:i.path,brand:i.brand,envUrl:i.envUrl,sortId:i.sortId,sort:i.sort,recordId:i.recordId,componentType:2,uniqueName:i.attributeJson.uniqueName,language:i.language,extraCategory:i.extraCategory,isVisualShow:i.isVisualShow,moduleName:i.moduleName,hasVisual:i.hasVisual,visualData:i.visualData,cmsConfig:i.cmsConfig,stopReport:i.stopReport}},"hotspot",i.$attrs,!1),i.$listeners))],1):i._e()])})),0)])]:i._e()],2)},B=[],j=(i("13d5"),i("02a3")),F=i.n(j),q=(i("a7a3"),function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"pop-wrap",style:{left:e.item.left,top:e.item.top,width:e.item.realWidth*e.ratio+"px"||!1,height:e.item.realHeight*e.ratio+"px"||!1}},e._l(e.item.popList,(function(i,s){var n,r,a;return t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(s),envUrl:e.envUrl},expression:"{ data: tipReportData(index), envUrl }"}],key:s,ref:`${e.sortId}${s}`,refInFor:!0,class:["pop-item"],style:{width:i.width/750*100+"%",height:i.height/(e.item.height/e.proportion)*100+"%",left:i.left/750*100+"%",top:i.top/(e.item.height/e.proportion)*100+"%"},attrs:{"data-sensors-click":"","data-sensorsClick":i&&i.jumpLinkType?"true":"false",id:"pop_"+(e.recordId+"_"+e.sortId+"_"+((null===i||void 0===i||null===(n=i.uniqueId)||void 0===n||null===(n=n.split("_"))||void 0===n?void 0:n.length)>2?i.uniqueId.split("_")[2]:"")),name:"pop_"+(e.recordId+"_"+e.sortId+"_"+((null===i||void 0===i||null===(r=i.uniqueId)||void 0===r||null===(r=r.split("_"))||void 0===r?void 0:r.length)>2?i.uniqueId.split("_")[2]:""))},on:{click:function(t){return e.pageClick(i,s)}}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber(i,s))}})]),null!==i&&void 0!==i&&null!==(a=i.product)&&void 0!==a&&a.openHot?t("div",{staticClass:"product-hover",on:{mouseover:function(t){return e.mouseover(s)},mouseleave:e.mouseLeave}},[0!=i.product.initImage.length?t("div",{staticStyle:{"{\n fontsize":"0"}},[t("img",{attrs:{src:e.hoverIndex==s?i.product.hoverImage[0].resourcePath:i.product.initImage[0].resourcePath,alt:""}})]):e._e(),e.hoverIndex==s?t("div",{staticClass:"product-image"},[t("img",{attrs:{src:1==i.product.imageType?e.productImage[i.productCode]:i.product.productImage[0].resourcePath,alt:""}})]):e._e()]):e._e()])})),0)}),$=[],H={name:"hotspot",props:{isSpecial:{type:Boolean,default:!1},extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},parentItem:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}},width:{type:Number,default:0},height:{type:Number,default:0},ratio:{type:Number,default:1},envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},sortId:{type:Number,default:0},sort:{type:Number,default:0},recordId:{type:Number,default:0},brand:{type:String},componentType:{type:Number},refererPagePath:{type:String},path:{type:String},pathType:{type:Number},uniqueName:{type:String},language:{type:String,default:"zh-CN"},prePosition:{type:Number},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{hasSensorsReList:[],hotList:[],proportion:1,hoverIndex:1,preTotal:0,productImage:{},service:new y,extraData:null}},watch:{"item.width":{handler(e){this.proportion=e/750},deep:!0,immediate:!0},itemCodeList:{handler(e){this.getProductList(e)},immediate:!0,deep:!0}},computed:{itemCodeList(){let e=this.item.popList.filter(e=>{var t,i;return 1==(null===e||void 0===e?void 0:e.jumpLinkType)&&1==(null===e||void 0===e||null===(t=e.product)||void 0===t?void 0:t.imageType)&&(null===e||void 0===e||null===(i=e.product)||void 0===i?void 0:i.openHot)});return e.map(e=>e.productCode)},tipReportData(){let e=JSON.parse(JSON.stringify(this.item.popList));return function(t){var i,s;let n=e[t];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:0,popData:{productCode:n.productCode,selectDataShow:n.selectDataShow,uniqueName:n.uniqueName,uniqueId:this.recordId+"_"+this.sortId+"_"+((null===n||void 0===n||null===(i=n.uniqueId)||void 0===i||null===(i=i.split("_"))||void 0===i?void 0:i.length)>2?n.uniqueId.split("_")[2]:""),brand:1===this.pathType?"defaultPath":this.brand},materialId:null!==(s=this.item)&&void 0!==s&&s.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.preTotal+t+1,event:"bannerShow"}}},visualNumber(){return function(e,t){var i;let s=0;if((null===(i=this.visualData)||void 0===i?void 0:i.length)>0){let i=this.getMktIndex(e,t);this.visualData.forEach(e=>{let t=`${this.recordId}_${this.sort}`;Boolean("总和"!=e.date&&"快速总和"!=e.date&&t==e.module_id&&i==e.mkt_rank)&&(s+=e["坑位点击数据"]?e["坑位点击数据"]:0)})}return s}}},mounted(){this.hotList=JSON.parse(JSON.stringify(this.item.popList))},methods:{getMktIndex(e,t){var i,s;let n=JSON.parse(JSON.stringify(this.cmsConfig)),r="";if(this.isSpecial){var a,o,l,d,u;let t=[];var c,h;if(null!==(a=this.extraCategory)&&void 0!==a&&a.category_index&&(null===n||void 0===n||null===(o=n.attributeJson)||void 0===o||null===(o=o.list)||void 0===o?void 0:o.length)>0&&(null===n||void 0===n||null===(l=n.attributeJson)||void 0===l||null===(l=l.list[Number((null===(d=this.extraCategory)||void 0===d?void 0:d.category_index)||1)-1])||void 0===l||null===(l=l.componentList)||void 0===l?void 0:l.length)>0)null===(c=n.attributeJson.list[Number((null===(h=this.extraCategory)||void 0===h?void 0:h.category_index)||1)-1])||void 0===c||c.componentList.forEach(e=>{var i;"imgNav"===(null===e||void 0===e?void 0:e.component)&&(null===e||void 0===e||null===(i=e.attributeJson)||void 0===i||null===(i=i.list)||void 0===i?void 0:i.length)>0&&1===(null===e||void 0===e?void 0:e.displayType)&&e.attributeJson.list.forEach(e=>{var i,s;(null===e||void 0===e||null===(i=e.picList)||void 0===i?void 0:i.length)>0&&((null===(s=e.popList)||void 0===s?void 0:s.length)>0?e.popListFinal=JSON.parse(JSON.stringify(e.popList)):e.popListFinal=[{jumpLinkType:121,sort:e.sort,uniqueName:e.uniqueName}],t.push(e))})});else(null===n||void 0===n||null===(u=n.attributeJson)||void 0===u||null===(u=u.componentList)||void 0===u?void 0:u.length)>0&&n.attributeJson.componentList.forEach(e=>{var i;"imgNav"===(null===e||void 0===e?void 0:e.component)&&(null===e||void 0===e||null===(i=e.attributeJson)||void 0===i||null===(i=i.list)||void 0===i?void 0:i.length)>0&&1===(null===e||void 0===e?void 0:e.displayType)&&e.attributeJson.list.forEach(e=>{var i,s;(null===e||void 0===e||null===(i=e.picList)||void 0===i?void 0:i.length)>0&&((null===(s=e.popList)||void 0===s?void 0:s.length)>0?e.popListFinal=JSON.parse(JSON.stringify(e.popList)):e.popListFinal=[{jumpLinkType:121,sort:e.sort,uniqueName:e.uniqueName}],t.push(e))})});let i=[];t.forEach(e=>{i=i.concat(e.popListFinal)}),i=i.filter(e=>[1,2,5,121].includes(e.jumpLinkType)),t.length<1&&i.length<1||(e.hasOwnProperty("jumpLinkType")?(r=i.findIndex(t=>t.uniqueId===e.uniqueId),r=-1!==r?String(r+1):""):(r=i.findIndex(t=>t.sort===(null===e||void 0===e?void 0:e.sort)),r=-1!==r?String(r+1):""))}let p=null!==e&&void 0!==e&&e.jumpLinkType?this.isSpecial&&r?r:null!==(i=this.extraCategory)&&void 0!==i&&i.MKTIndex?`${this.extraCategory.MKTIndex}-${String(t+1)}`:String(t+1):"";return p=(p&&null!==(s=this.extraCategory)&&void 0!==s&&s.category_index?this.extraCategory.category_index+"-":"")+p,p},needSensorsRep(e){this.extraData=e,this.stopReport||this.scrollMethod(e)},scrollMethod(e){this.extraData=e,this.stopReport||this.$nextTick(()=>{var t;(null===(t=this.item)||void 0===t||null===(t=t.popList)||void 0===t?void 0:t.length)>0&&this.item.popList.forEach((t,i)=>{const s=this.$refs[`${this.sortId}${i}`];if(s&&s[0]){const n=document.documentElement.clientHeight,r=document.documentElement.clientWidth,a=s[0].getBoundingClientRect(),o=a.top||0,l=a.left||0;o<n&&o>=0&&l<r&&l>=0&&this.sensorsExposure(t,i,e)}})})},sensorsExposure(e,t,i){var s,n,r,a,o,l,d,u,c,h,p,f,m,g,y;if(this.extraData=i,this.hasSensorsReList.find(t=>JSON.stringify(t)==JSON.stringify(e)))return;const v={uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:1,popData:{...e,uniqueId:this.recordId+"_"+this.sortId+"_"+((null===e||void 0===e||null===(s=e.uniqueId)||void 0===s||null===(s=s.split("_"))||void 0===s?void 0:s.length)>2?e.uniqueId.split("_")[2]:""),brand:1===this.pathType?"defaultPath":this.brand},materialId:null!==(n=this.item)&&void 0!==n&&n.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.prePosition?this.prePosition+t+1:1*this.preTotal+t+1,event:"bannerShow"};this.$emit("sensorsCmsRepost",{initObject:this.parentItem,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(v)),this.envUrl,"exposure"),reportData:v,extraData:this.isSpecial?{isCategory:!(null===(r=this.extraCategory)||void 0===r||!r.isCategory)&&(null===(a=this.extraCategory)||void 0===a?void 0:a.isCategory),category_index:null!==(o=this.extraCategory)&&void 0!==o&&o.category_index?null===(l=this.extraCategory)||void 0===l?void 0:l.category_index:"",category_name:null!==(d=this.extraCategory)&&void 0!==d&&d.category_name?null===(u=this.extraCategory)||void 0===u?void 0:u.category_name:"",isSpecial:!0}:{isCategory:!(null===(c=this.extraCategory)||void 0===c||!c.isCategory)&&(null===(h=this.extraCategory)||void 0===h?void 0:h.isCategory),category_index:null!==(p=this.extraCategory)&&void 0!==p&&p.category_index?null===(f=this.extraCategory)||void 0===f?void 0:f.category_index:"",category_name:null!==(m=this.extraCategory)&&void 0!==m&&m.category_name?null===(g=this.extraCategory)||void 0===g?void 0:g.category_name:"",MKTIndex:null!==i&&void 0!==i&&i.MKTIndex?`${i.MKTIndex}-${String(t+1)}`:null!==(y=this.extraCategory)&&void 0!==y&&y.MKTIndex?`${this.extraCategory.MKTIndex}-${String(t+1)}`:String(t+1),MKTName:this.item.popList[t].uniqueName}}),this.hasSensorsReList.push(e)},pageClick(e,t){var i,s;if(this.isVisualShow)return;if(e.jumpLinkType)try{this.dataSend(e,t,1)}catch(b){console.error(b)}const n={uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:1,popData:{...e,uniqueId:this.recordId+"_"+this.sortId+"_"+((null===e||void 0===e||null===(i=e.uniqueId)||void 0===i||null===(i=i.split("_"))||void 0===i?void 0:i.length)>2?e.uniqueId.split("_")[2]:""),brand:1===this.pathType?"defaultPath":this.brand},materialId:null!==(s=this.item)&&void 0!==s&&s.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.prePosition?this.prePosition+t+1:1*this.preTotal+t+1,event:"bannerClick"};var r,a,o,l,d,u,c,h,p,f,m,g,y,v;null!==e&&void 0!==e&&e.jumpLinkType&&this.$emit("sensorsCmsRepost",{initObject:this.parentItem,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(n)),this.envUrl,"click"),reportData:n,extraData:this.isSpecial?{isCategory:!(null===(r=this.extraCategory)||void 0===r||!r.isCategory)&&(null===(a=this.extraCategory)||void 0===a?void 0:a.isCategory),category_index:null!==(o=this.extraCategory)&&void 0!==o&&o.category_index?null===(l=this.extraCategory)||void 0===l?void 0:l.category_index:"",category_name:null!==(d=this.extraCategory)&&void 0!==d&&d.category_name?null===(u=this.extraCategory)||void 0===u?void 0:u.category_name:"",isSpecial:!0}:{isCategory:!(null===(c=this.extraCategory)||void 0===c||!c.isCategory)&&(null===(h=this.extraCategory)||void 0===h?void 0:h.isCategory),category_index:null!==(p=this.extraCategory)&&void 0!==p&&p.category_index?null===(f=this.extraCategory)||void 0===f?void 0:f.category_index:"",category_name:null!==(m=this.extraCategory)&&void 0!==m&&m.category_name?null===(g=this.extraCategory)||void 0===g?void 0:g.category_name:"",MKTIndex:null!==(y=this.extraData)&&void 0!==y&&y.MKTIndex?`${this.extraData.MKTIndex}-${String(t+1)}`:null!==(v=this.extraCategory)&&void 0!==v&&v.MKTIndex?`${this.extraCategory.MKTIndex}-${String(t+1)}`:String(t+1),MKTName:this.item.popList[t].uniqueName}});this.$emit("jumpLink",e)},dataSend(e,t,i){var s,n;let r={uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:i,popData:{...e,uniqueId:this.recordId+"_"+this.sortId+"_"+((null===e||void 0===e||null===(s=e.uniqueId)||void 0===s||null===(s=s.split("_"))||void 0===s?void 0:s.length)>2?e.uniqueId.split("_")[2]:""),brand:1===this.pathType?"defaultPath":this.brand},materialId:null!==(n=this.item)&&void 0!==n&&n.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.prePosition?this.prePosition+t+1:1*this.preTotal+t+1,event:0==i?"bannerShow":"bannerClick"};if(0==i)C(r,this.envUrl);else{let e=C(r,this.envUrl,"click"),t=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",t)}},getProductList(e){if(0==e.length)return;let t={itemCodeList:e,pageNum:1,pageSize:e.length},i={};this.service.getProductInfo(this.envUrl,t,this.language).then(e=>{e&&e.list&&(this.productList=e.list,e.list.forEach(e=>{i[e.code]=e.mainPicUrl}),this.productImage=i)})},mouseover(e){this.hoverIndex=e},mouseLeave(){this.hoverIndex=-1}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}},treport:x}},V=H,z=V,G=(i("8a8a"),D(z,q,$,!1,null,"c9fa21a4",null)),J=G.exports,W=J,X={name:"imgNav",mixins:[L],components:{hotspot:W},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1}},data(){return{hasSensorsReList:[],swiper:"",imageList:[],popList:[],positionList:[],positionTotal:[],hasInitSwiper:!1}},computed:{indicatorType(){return this.attributeJson.indicatorType},picStyle(){let{attributeJson:e,ratio:t,animationInObj:i}=this;return{animationDuration:i.duration+"s",padding:`0 ${e.paddingSpacing*t}px`,width:Math.ceil(e.baseStyle.w*t)+"px"}},picItemStyle(){let{attributeJson:e,ratio:t}=this,{oneLineCount:i}=e;return{width:Math.ceil((e.baseStyle.w*t-2*e.paddingSpacing*t)/i)+"px",height:Math.ceil(e.baseStyle.h*t)+"px",padding:"0 "+e.itemSpacing*t+"px"}},list(){return this.attributeJson.list},isSwiper(){return 3==this.styleType&&2==this.indicatorType&&"pc"==this.mode||2==this.styleType&&2==this.indicatorType&&"mobile"==this.mode},hasConfig(){return this.attributeJson.list.some(e=>0!=e.picList.length)},hasSwiperButton(){return 3==this.styleType&&2==this.indicatorType&&"pc"==this.mode},hasScrollBar(){return 2==this.styleType&&2==this.indicatorType&&"mobile"==this.mode},tipReportData(){let{list:e}=this,t=[],i=[];return e.forEach(e=>{0!=e.popList.length?t.push(e.popList.length):t.push(1)}),t.forEach((e,s)=>{let n=t.slice(0,s),r=n.reduce((e,t)=>e+t,0);i.push(r)}),this.positionList=t,this.positionTotal=i,function(t,i){let s=e[t];return 0==s.popList.length||i?{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:2,popData:{},materialId:this.recordId+"_"+this.sortId+"_"+s.sort,materialName:s.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:this.positionTotal[t]+1,event:"bannerShow"}:void 0}}},watch:{isSwiper:{handler(e){e&&this.initSwiper()},immediate:!0}},mounted(){},methods:{needSensorsRep(){this.stopReport||this.scrollMethod()},scrollMethod(){if(!this.stopReport)if(this.isSwiper){var e;const i=this.$refs[`swiper-container${this.recordId}${this.sortId}`];if(i&&(null===(e=this.attributeJson.list)||void 0===e?void 0:e.length)>0){var t;const e=4,s=null!==i&&void 0!==i&&null!==(t=i.swiper)&&void 0!==t&&t.realIndex?i.swiper.realIndex:0,n=0+e+s;let r=this.attributeJson.list.map((e,t)=>(e.pIndex=t,e)).slice(n-e,n);r.forEach(e=>{const t=this.$refs[`${this.sortId}${e.pIndex}`];if(t&&t[0]){const n=document.documentElement.clientHeight,r=document.documentElement.clientWidth,a=t[0].getBoundingClientRect(),o=a.top||0,l=a.left||0;if(o<n&&o>=0&&l<r&&l>=0){var i,s;const t=(null===(i=this.attributeJson.list[e.pIndex])||void 0===i||null===(i=i.popList)||void 0===i?void 0:i.length)>0&&(null===(s=this.attributeJson.list[e.pIndex])||void 0===s||null===(s=s.popList.filter(e=>[1,2,5].includes(e.jumpLinkType)))||void 0===s?void 0:s.length)>0?this.attributeJson.list[e.pIndex].popList.filter(e=>[1,2,5].includes(e.jumpLinkType)):[];if(t.length>0){const t=this.$refs[`hotspot${this.sortId}${e.pIndex}`];t&&t[0]&&t[0].needSensorsRep({MKTIndex:String(e.pIndex+1),MKTName:this.attributeJson.list[e.pIndex].uniqueName})}else this.sensorsExposure(e,e.pIndex)}}})}}else{var i;(null===(i=this.attributeJson)||void 0===i||null===(i=i.list)||void 0===i?void 0:i.length)>0&&this.attributeJson.list.forEach((e,t)=>{const i=this.$refs[`${this.sortId}${t}`];if(i&&i[0]){const r=document.documentElement.clientHeight,a=document.documentElement.clientWidth,o=i[0].getBoundingClientRect(),l=o.top||0,d=o.left||0;if(l<r&&l>=0&&d<a&&d>=0){var s,n;const i=(null===(s=this.attributeJson.list[t])||void 0===s||null===(s=s.popList)||void 0===s?void 0:s.length)>0&&(null===(n=this.attributeJson.list[t])||void 0===n||null===(n=n.popList.filter(e=>1==e.jumpLinkType||2==e.jumpLinkType))||void 0===n?void 0:n.length)>0?this.attributeJson.list[t].popList.filter(e=>1==e.jumpLinkType||2==e.jumpLinkType):[];if(i.length>0){const e=this.$refs[`hotspot${this.sortId}${t}`];e&&e[0]&&e[0].needSensorsRep({isSpecial:!0})}else this.sensorsExposure(e,t,!0)}}})}},sensorsExposure(e,t,i){var s,n,r,a,o,l,d,u,c,h,p,f;if(this.hasSensorsReList.find(t=>JSON.stringify(t)==JSON.stringify(e)))return;let m=JSON.parse(JSON.stringify(this.tipReportData(t,!0)));this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(m)),this.envUrl,"exposure"),reportData:m,extraData:i?{isCategory:!(null===(s=this.extraCategory)||void 0===s||!s.isCategory)&&(null===(n=this.extraCategory)||void 0===n?void 0:n.isCategory),category_index:null!==(r=this.extraCategory)&&void 0!==r&&r.category_index?null===(a=this.extraCategory)||void 0===a?void 0:a.category_index:"",category_name:null!==(o=this.extraCategory)&&void 0!==o&&o.category_name?null===(l=this.extraCategory)||void 0===l?void 0:l.category_name:"",isSpecial:!0}:{isCategory:!(null===(d=this.extraCategory)||void 0===d||!d.isCategory)&&(null===(u=this.extraCategory)||void 0===u?void 0:u.isCategory),category_index:null!==(c=this.extraCategory)&&void 0!==c&&c.category_index?null===(h=this.extraCategory)||void 0===h?void 0:h.category_index:"",category_name:null!==(p=this.extraCategory)&&void 0!==p&&p.category_name?null===(f=this.extraCategory)||void 0===f?void 0:f.category_name:"",MKTIndex:String(t+1),MKTName:this.attributeJson.list[t].uniqueName}}),this.hasSensorsReList.push(e)},initSwiper(){this.hasConfig&&this.isSwiper&&this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{attributeJson:e}=this;this.options={effect:"slide",autoplay:!1,slidesPerView:this.attributeJson.oneLineCount,spaceBetween:e.itemSpacing},this.hasSwiperButton&&(this.options.navigation={nextEl:`.next-${this.recordId}${this.sortId}`,prevEl:`.prev-${this.recordId}${this.sortId}`}),this.hasScrollBar&&(this.options.scrollbar={el:`.scrollbar-${this.recordId}${this.sortId}`,draggable:!0},this.options.freeMode=!0),this.swiper=new F.a(`.swiper-container-${this.recordId}${this.sortId}`,this.options)})}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},Y=X,K=Y,Q=(i("f106"),D(K,U,B,!1,null,"8f0eadc0",null)),Z=Q.exports,ee=Z,te=function(){var e,t,i=this,s=i._self._c;i._self._setupProxy;return s("div",{directives:[{name:"onScroll",rawName:"v-onScroll",value:i.scrollMethod,expression:"scrollMethod"}],staticClass:"video-wrap entrance-con",style:[i.conStyle,i.animationInStyle]},[0!==i.videoItem.length?s("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:i.tipReportData,envUrl:i.envUrl},expression:"{ data: tipReportData, envUrl }"}],ref:"videoItem"+i.sortId,class:["video-con","video-con-"+i.sortId,i.animationInObj.type?i.enterClass:""],style:{width:Math.round(i.attributeJson.baseStyle.w*i.ratio)+"px",height:Math.round(i.attributeJson.baseStyle.h*i.ratio)+"px"}},[s("myVideoPlayer",{ref:"VideoPlayer"+i.sortId,attrs:{sort:(new Date).getTime(),videoInfo:i.videoInfo,autoPlay:i.autoPlay,recordId:i.recordId,sortId:i.sortId,extraCategory:i.extraCategory,stopReport:i.stopReport,isVisualShow:i.isVisualShow,moduleName:i.moduleName,hasVisual:i.hasVisual,visualData:i.visualData,cmsConfig:i.cmsConfig}}),1===(null===(e=i.attributeJson)||void 0===e?void 0:e.isVideoHasHot)&&(null===(t=i.videoHotPic)||void 0===t?void 0:t.length)>0?s("div",{staticClass:"hot-image"},[s("img",{attrs:{src:i.videoHotPic[0].resourcePath,alt:""}}),s("hotspot",i._g(i._b({ref:"hotspot",attrs:{componentType:3,item:i.hotData,parentItem:i.attributeJson,ratio:i.ratio,envUrl:i.envUrl,language:i.language,recordId:i.recordId,sortId:i.sortId,path:i.path,brand:i.brand,uniqueName:i.attributeJson.uniqueName,extraCategory:i.extraCategory,stopReport:i.stopReport,isVisualShow:i.isVisualShow,moduleName:i.moduleName,hasVisual:i.hasVisual,visualData:i.visualData,cmsConfig:i.cmsConfig,sort:i.sort}},"hotspot",i.$attrs,!1),i.$listeners))],1):i._e()],1):i._e()])},ie=[],se=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticStyle:{height:"100%",position:"relative"},attrs:{id:"myVideo-"+e.sort}},[t("video",{ref:"myVideo-"+e.sort,staticClass:"video-js vjs-default-skin vjs-big-play-centered vjs-16-9 video-item",attrs:{preload:"auto","data-setup":"{}","x5-playsinline":"","x5-video-orientation":"landscape|portrait","x5-video-player-type":"h5","webkit-playsinline":"true",playsinline:"true",controls:e.videoInfo.checkedAttr.indexOf("controls")>-1,autoplay:e.autoPlay,loop:e.videoInfo.checkedAttr.indexOf("loop")>-1,poster:0!=e.videoInfo.list.length?e.videoInfo.list[0].imgUrl:""},domProps:{muted:e.muted}},[t("source",{attrs:{src:0!=e.videoInfo.list.length?e.videoInfo.list[0].resourcePath:""}})]),e.isPlay?e._e():t("div",{staticClass:"video-play-btn",attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:`video_${e.recordId}_${e.sortId}`,name:`video_${e.recordId}_${e.sortId}`},on:{click:e.clickVideo}},[t("img",{attrs:{src:i("8b3d"),alt:""}})])])},ne=[],re=i("f0e2"),ae={name:"videoPlayer",props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},videoInfo:{type:Object,default:()=>{}},autoPlay:{type:Boolean,default:!1},sort:{type:Number,default:0},recordId:{type:Number,default:0},sortId:{type:Number,default:0}},data(){return{isFirst:!0,isPlay:!1,muted:!0,prevent:!1,isDarg:!1}},watch:{autoPlay:{handler(e){this.player&&(e?this.player.play():this.player.pause())},immediate:!0}},mounted(){this.initVideo()},activated(){this.$nextTick(()=>{this.initVideo()})},methods:{initVideo(){let e=this;setTimeout(()=>{this.player=Object(re["a"])(this.$refs["myVideo-"+this.sort],{},(function(){this.on("play",()=>{e.isPlay=!0}),this.on("pause",()=>{e.isDarg||(e.isPlay=!1)})})),this.player.on("volumechange",()=>{if(this.prevent)return void(this.prevent=!1);let e=this.player.volume();this.muted=!(e>0)}),this.$nextTick(()=>{this.getProgress(),this.rewriteControlBar(),this.play()})},100)},rewriteControlBar(){var e=document.querySelector(`#myVideo-${this.sort} .vjs-control-bar`),t=document.createElement("div");t.className="videojs-cover-btn",t.onclick=this.clickVideo,e&&e.appendChild(t);var i=document.querySelector(`#myVideo-${this.sort} .vjs-volume-panel`),s=document.createElement("div");s.className="videojs-mute-btn",s.onclick=this.controlVolume,i&&i.appendChild(s)},getProgress(){let e=this.player.controlBar.progressControl.seekBar;e&&e.on(["mousedown","mouseup"],e=>{"mousedown"==e.type?this.isDarg=!0:"mouseup"==e.type&&this.isPlay&&(this.player.play(),this.isDarg=!1)});let t=document.querySelector(`#myVideo-${this.sort} .vjs-progress-control`);t&&(t.addEventListener("mousedown",()=>{this.isDarg=!0}),t.addEventListener("mouseup",()=>{this.isPlay&&(this.player.play(),this.isDarg=!1)}))},play(){0!=this.videoInfo.list.length&&this.autoPlay&&(this.player.muted(!0),this.player.play(),this.isPlay=!0)},clickVideo(){this.isPlay?this.player.pause():this.player.play()},controlVolume(){this.prevent=!0;let e=this.muted;e&&0==this.player.volume()&&this.player.volume(1),this.player.muted(!e),this.muted=!e}}},oe=ae,le=oe,de=(i("b9bf"),D(le,se,ne,!1,null,"8cd15470",null)),ue=de.exports,ce=ue,he={name:"videoItem",mixins:[L],components:{hotspot:W,myVideoPlayer:ce},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},attributeJson:{type:Object,default:function(){}},ratio:{type:Number,default:1,positionList:[]}},data(){return{sensorsIsRes:!1,autoPlay:!1}},watch:{"videoInfo.checkedAttr":{handler(e){this.autoPlay=e.indexOf("autoPlay")>-1},immediate:!0,deep:!0}},computed:{videoItem(){return this.attributeJson.videoInfo.list},videoHotPic(){return this.attributeJson.videoHotInfo.picList},videoHotPop(){return this.attributeJson.videoHotInfo.popList},videoInfo(){return this.attributeJson.videoInfo},hotData(){let{attributeJson:e}=this;return{popList:e.videoHotInfo.popList,width:e.videoHotInfo.picList[0].width,height:e.videoHotInfo.picList[0].height,realWidth:e.baseStyle.w,realHeight:e.baseStyle.h,top:0,left:0}},tipReportData(){return function(e){return 1!=this.attributeJson.isVideoHasHot||e?{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:3,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,event:"bannerShow",position:1}:void 0}}},methods:{needSensorsRep(){this.stopReport||this.scrollMethod()},scrollMethod(){this.stopReport||this.$nextTick(()=>{const e=this.$refs["videoItem"+this.sortId];if(e){const t=document.documentElement.clientHeight,i=document.documentElement.clientWidth,s=e.getBoundingClientRect(),n=s.top||0,r=s.left||0;n<t&&n>=0&&r<i&&r>=0&&this.sensorsExposure()}})},sensorsExposure(){var e,t,i,s,n,r;if(this.sensorsIsRes)return;let a=JSON.parse(JSON.stringify(this.tipReportData(!0)));this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:this.videoInfo,propsObject:C(JSON.parse(JSON.stringify(a)),this.envUrl,"exposure"),reportData:a,extraData:{isCategory:!(null===(e=this.extraCategory)||void 0===e||!e.isCategory)&&(null===(t=this.extraCategory)||void 0===t?void 0:t.isCategory),category_index:null!==(i=this.extraCategory)&&void 0!==i&&i.category_index?null===(s=this.extraCategory)||void 0===s?void 0:s.category_index:"",category_name:null!==(n=this.extraCategory)&&void 0!==n&&n.category_name?null===(r=this.extraCategory)||void 0===r?void 0:r.category_name:"",isNoMKT:!0}}),this.sensorsIsRes=!0}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},pe=he,fe=pe,me=(i("93d1"),D(fe,te,ie,!1,null,"489d43d9",null)),ge=me.exports,ye=ge,ve=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{directives:[{name:"onScroll",rawName:"v-onScroll",value:e.scrollMethod,expression:"scrollMethod"}],staticClass:"swiper-wrap",style:[e.conStyle,e.animationInStyle]},[e.hasSwiperItem||1===e.bgStyle.status&&0!=e.bgStyle.picList.length?t("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],class:["swiper-con","swiper-con-"+e.mode],style:{backgroundImage:0!=e.bgStyle.picList.length?`url(${e.bgStyle.picList[0].resourcePath})`:""}},[t("div",{staticClass:"entrance-con",style:{"--hoverColor":e.paginationStyle.hoverColor||e.paginationStyle.color,"--activeColor":e.paginationStyle.activeColor,"--color":e.paginationStyle.color,width:e.baseStyle.w*e.ratio+"px",height:e.baseStyle.h*e.ratio+"px"}},[t("div",{key:e.indicatorType,ref:"swiper"+e.attributeJson.sort,class:[`swiper-container swiper-container-${e.recordId}${e.sortId} swiper-container-${e.indicatorType}`,e.animationInObj.type?e.enterClass:""],style:{animationDuration:e.animationInObj.duration+"s"},attrs:{id:"mySwiper-"+e.sortId}},[t("div",{staticClass:"swiper-wrapper"},e._l(e.swiperList,(function(i,s){var n,r,a,o,l,d,u,c,h,p,f,m,g,y,v,b,_,T,S,w,x,C,E,k,I,L,P,O;return t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(s),envUrl:e.envUrl},expression:"{ data: tipReportData(index), envUrl }"}],key:i.sort+s,ref:""+(i.sort+s),refInFor:!0,class:["swiper-slide",{"slide-auto":e.isSpaceSwiper}]},[t("div",{staticClass:"swiper-width",style:{width:(e.baseStyle.w-(2==e.styleType?100:0))*e.ratio+"px!important",height:e.baseStyle.h*e.ratio+"px"}},[1===i.type?t("img",{attrs:{src:(null===i||void 0===i||null===(n=i.picList)||void 0===n?void 0:n.length)>0&&null!==i&&void 0!==i&&null!==(r=i.picList[0])&&void 0!==r&&r.resourcePath?i.picList[0].resourcePath:"",alt:(null===i||void 0===i||null===(a=i.picList)||void 0===a?void 0:a.length)>0&&null!==i&&void 0!==i&&null!==(o=i.picList[0])&&void 0!==o&&o.resourceName?i.picList[0].resourceName.split(".")[0]:""}}):e._e(),2===i.type?t("div",{staticClass:"video-player-con"},[t("myVideoPlayer",{ref:"VideoPlayer"+e.sortId,refInFor:!0,attrs:{recordId:e.recordId,sortId:e.sortId,sort:(new Date).getTime(),videoInfo:i.videoInfo,autoPlay:i.videoInfo.checkedAttr.indexOf("autoPlay")>-1&&e.activeIndex==s,extraCategory:{isCategory:!(null===(l=e.extraCategory)||void 0===l||!l.isCategory)&&(null===(d=e.extraCategory)||void 0===d?void 0:d.isCategory),category_index:null!==(u=e.extraCategory)&&void 0!==u&&u.category_index?null===(c=e.extraCategory)||void 0===c?void 0:c.category_index:"",category_name:null!==(h=e.extraCategory)&&void 0!==h&&h.category_name?null===(p=e.extraCategory)||void 0===p?void 0:p.category_name:"",MKTIndex:""+(s+1>e.swiperList.length/3?s+1>e.swiperList.length/3*2?s+1-e.swiperList.length/3*2:s+1-e.swiperList.length/3:s+1),MKTName:e.swiperList[s].uniqueName},isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,stopReport:!0}}),2==i.type&&1==i.isVideoHasHot&&0!=i.videoHotInfo.picList.length?t("div",{staticClass:"video-hot-image"},[t("img",{attrs:{src:(null===i||void 0===i||null===(f=i.videoHotInfo)||void 0===f||null===(f=f.picList)||void 0===f?void 0:f.length)>0&&null!==i&&void 0!==i&&null!==(m=i.videoHotInfo)&&void 0!==m&&null!==(m=m.picList[0])&&void 0!==m&&m.resourcePath?i.videoHotInfo.picList[0].resourcePath:"",alt:(null===i||void 0===i||null===(g=i.videoHotInfo)||void 0===g||null===(g=g.picList)||void 0===g?void 0:g.length)>0&&null!==i&&void 0!==i&&null!==(y=i.videoHotInfo)&&void 0!==y&&null!==(y=y.picList[0])&&void 0!==y&&y.resourceName?i.videoHotInfo.picList[0].resourceName.split(".")[0]:""}}),(null===i||void 0===i||null===(v=i.videoHotInfo)||void 0===v||null===(v=v.picList)||void 0===v?void 0:v.length)>0?t("div",{staticClass:"swiper-hot"},[t("hotspot",e._g(e._b({ref:`hotspot${e.sortId}${s}`,refInFor:!0,attrs:{parentItem:e.attributeJson,item:{realWidth:i.realWidth,realHeight:i.realHeight,popList:i.videoHotInfo.popList,width:i.videoHotInfo.picList[0].width,height:i.videoHotInfo.picList[0].height},componentType:1,ratio:e.ratio,uniqueName:e.attributeJson.uniqueName,envUrl:e.envUrl,sortId:e.sortId,laySort:e.sort,sort:e.sort,path:e.path,brand:e.brand,prePosition:e.positionTotal[i.i],recordId:e.recordId,extraCategory:{isCategory:!(null===(b=e.extraCategory)||void 0===b||!b.isCategory)&&(null===(_=e.extraCategory)||void 0===_?void 0:_.isCategory),category_index:null!==(T=e.extraCategory)&&void 0!==T&&T.category_index?null===(S=e.extraCategory)||void 0===S?void 0:S.category_index:"",category_name:null!==(w=e.extraCategory)&&void 0!==w&&w.category_name?null===(x=e.extraCategory)||void 0===x?void 0:x.category_name:"",MKTIndex:""+(s+1>e.swiperList.length/3?s+1>e.swiperList.length/3*2?s+1-e.swiperList.length/3*2:s+1-e.swiperList.length/3:s+1),MKTName:e.swiperList[s].uniqueName},isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,stopReport:e.stopReport}},"hotspot",e.$attrs,!1),e.$listeners))],1):e._e()]):e._e()],1):e._e(),1==(null===i||void 0===i?void 0:i.type)&&(null===i||void 0===i||null===(C=i.picList)||void 0===C?void 0:C.length)>0?[t("hotspot",e._g(e._b({ref:`hotspot${e.sortId}${s}`,refInFor:!0,attrs:{parentItem:e.attributeJson,item:i,ratio:e.ratio,componentType:1,uniqueName:e.attributeJson.uniqueName,path:e.path,envUrl:e.envUrl,sortId:e.sortId,brand:e.brand,prePosition:e.positionTotal[i.i],recordId:e.recordId,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,extraCategory:{isCategory:!(null===(E=e.extraCategory)||void 0===E||!E.isCategory)&&(null===(k=e.extraCategory)||void 0===k?void 0:k.isCategory),category_index:null!==(I=e.extraCategory)&&void 0!==I&&I.category_index?null===(L=e.extraCategory)||void 0===L?void 0:L.category_index:"",category_name:null!==(P=e.extraCategory)&&void 0!==P&&P.category_name?null===(O=e.extraCategory)||void 0===O?void 0:O.category_name:"",MKTIndex:""+(s+1>e.swiperList.length/3?s+1>e.swiperList.length/3*2?s+1-e.swiperList.length/3*2:s+1-e.swiperList.length/3:s+1),MKTName:e.swiperList[s].uniqueName},stopReport:e.stopReport,sort:e.sort}},"hotspot",e.$attrs,!1),e.$listeners))]:e._e()],2)])})),0),e.hasScrollBar?t("div",{staticClass:"swiper-scrollbar-own"},[t("div",{staticClass:"swiper-scrollbar-drag",style:{width:100/e.list.length+"%",left:(e.activeIndex>e.list.length?0:100/e.list.length*(e.activeIndex-1))+"%"}})]):e._e(),e.hasSwiperPagination?t("div",{staticClass:"swiper-pagination-custom"},e._l(e.list,(function(i,s){return t("span",{key:s,class:["pagination-custom-bullt",{"bullt-active":e.slideIndex==s}],attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:`pagination_${e.recordId}_${e.sortId}_${Number(s+1)}`,name:`pagination_${e.recordId}_${e.sortId}_${Number(s+1)}`},on:{click:function(t){return e.swiperSlide(s)}}})})),0):e._e(),e.hasSwiperButton?[t("div",{class:["swiper-button-prev",`prev-${e.recordId}${e.sortId}`]},[e._t("swiper-button-prev",(function(){return[2==e.indicatorType||3==e.indicatorType?t("div",[t("span",{staticClass:"cms2iconfont iconleft",style:e.pageStyle})]):e._e(),4==e.indicatorType?t("div",{staticClass:"arrow"},[t("span",{staticClass:"cms2iconfont iconarrow-left",style:e.pageStyle})]):e._e()]}))],2),t("div",{class:["swiper-button-next",`next-${e.recordId}${e.sortId}`]},[e._t("swiper-button-next",(function(){return[2==e.indicatorType||3==e.indicatorType?t("div",[t("span",{staticClass:"cms2iconfont iconright",style:e.pageStyle})]):e._e(),4==e.indicatorType?t("div",{staticClass:"arrow"},[t("span",{staticClass:"cms2iconfont iconarrow-right",style:e.pageStyle})]):e._e()]}))],2)]:e._e()],2)]),2===e.animationHoverObj.type?t("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0}]}):e._e()]):e._e()])},be=[];let _e=0;var Te={name:"swiperItem",mixins:[L],components:{hotspot:W,myVideoPlayer:ce},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},sortId:{type:Number}},data(){return{sleepTimer:null,hasSensorsReList:[],hasSwiperItem:!1,swiper:"",activeIndex:0,slideIndex:0,hasInitSwiper:!1,positionList:[],positionTotal:[]}},computed:{bgStyle(){return this.attributeJson.bgStyle},list(){return this.attributeJson.list},styleType(){return this.attributeJson.styleType},indicatorType(){return this.attributeJson.indicatorType},paginationStyle(){return this.attributeJson.paginationStyle},pageStyle(){return{color:this.attributeJson.paginationStyle.color}},hasSwiperPagination(){return 3==this.indicatorType},hasSwiperButton(){return 1!=this.indicatorType},hasScrollBar(){return"pc"==this.mode&&2==this.indicatorType},isSpaceSwiper(){return"mobile"==this.mode&&2==this.styleType},tipReportData(){let e=[],t=[];return this.list.forEach(t=>{1==t.type&&0!=t.popList.length||0!=t.videoHotInfo.popList.length?e.push(1==t.type?t.popList.length:t.videoHotInfo.popList.length):e.push(1)}),e.forEach((i,s)=>{let n=e.slice(0,s),r=n.reduce((e,t)=>e+t,0);t.push(r)}),this.positionList=e,this.positionTotal=t,function(e){let t=this.swiperList[e];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:1,popData:{},materialId:this.recordId+"_"+this.sortId+"_"+t.sort,materialName:t.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:this.positionTotal[e]+1,event:"bannerShow"}}}},mounted(){this.$nextTick(()=>{this.judgeSwiper()}),window.addEventListener("pageshow",e=>{this.pageshowListen(e)})},activated(){this.$nextTick(()=>{this.judgeSwiper()})},methods:{pageshowListen(e){var t;I()&&(e.persisted||2==(null===(t=window)||void 0===t||null===(t=t.performance)||void 0===t||null===(t=t.navigation)||void 0===t?void 0:t.type))&&this.$nextTick(()=>{this.judgeSwiper()})},needSensorsRep(e){this.stopReport||this.scrollMethod()},sleep(e){return new Promise(async t=>{clearTimeout(this.sleepTimer),this.sleepTimer=setTimeout(()=>{clearTimeout(this.sleepTimer),t("success")},e)})},scrollMethod(){this.stopReport||this.$nextTick(async()=>{var e;await this.sleep(100);const t=this.$refs["swiper"+this.attributeJson.sort];if(t&&(null===(e=this.swiperList)||void 0===e?void 0:e.length)>0){const e=t.swiper.realIndex;this.swiperList.forEach((t,i)=>{const s=this.$refs[""+(t.sort+i)];if(s&&s[0]&&e==i&&i<this.swiperList.length/3*2&&this.swiperList.length/3<=i){const e=document.documentElement.clientHeight,a=document.documentElement.clientWidth,o=s[0].getBoundingClientRect(),l=o.top||0,d=o.left||0;if(l<e&&l>=0&&d<a&&d>=0){var n,r;const e=(null===(n=this.swiperList[i])||void 0===n||null===(n=n.popList)||void 0===n?void 0:n.length)>0&&(null===(r=this.swiperList[i])||void 0===r||null===(r=r.popList.filter(e=>[1,2,5].includes(e.jumpLinkType)))||void 0===r?void 0:r.length)>0?this.swiperList[i].popList.filter(e=>[1,2,5].includes(e.jumpLinkType)):[];if(e.length>0&&1===this.swiperList[i].type){const e=this.$refs[`hotspot${this.sortId}${i}`];e&&e[0]&&e[0].needSensorsRep({MKTIndex:""+(i+1>this.swiperList.length/3?i+1>this.swiperList.length/3*2?i+1-this.swiperList.length/3*2:i+1-this.swiperList.length/3:i+1),MKTName:this.swiperList[i].uniqueName})}else this.sensorsExposure(t,i)}}})}})},sensorsExposure(e,t){var i,s,n,r,a,o;if(this.hasSensorsReList.find(t=>JSON.stringify(t)==JSON.stringify(e)))return;let l=JSON.parse(JSON.stringify(this.tipReportData(t)));this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(l)),this.envUrl,"exposure"),reportData:l,extraData:{isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",MKTIndex:(t+1>this.swiperList.length/3?t+1>this.swiperList.length/3*2?t+1-this.swiperList.length/3*2:t+1-this.swiperList.length/3:t+1)+"_1",MKTName:this.swiperList[t].uniqueName}}),this.hasSensorsReList.push(e)},judgeSwiper(){let e=this.attributeJson.list,t=e.findIndex(e=>0!=e.picList.length||0!=e.videoInfo.list.length);if(this.hasSwiperItem=t>-1,this.hasSwiperItem){e.forEach((e,t)=>{e.i=t});let t=JSON.parse(JSON.stringify(e));this.swiperList=e.concat(JSON.parse(JSON.stringify(t))),this.swiperList=t.concat(this.swiperList),this.scrollMethod(),this.initSwiper(!0)}},initSwiper:function(e){(this.hasSwiperItem||1===this.bgStyle.status&&0!=this.bgStyle.picList.length)&&this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{attributeJson:e}=this;this.options={effect:"slide",observer:!0,observeParents:!0,preventInteractionOnTransition:!0,autoplay:!!e.autoPlay&&{delay:1e3*e.interval,disableOnInteraction:!1,stopOnLastSlide:!1}},"mobile"==this.mode&&2==this.styleType&&(this.options.spaceBetween=10,this.options.loop=!1,this.options.slidesPerView="auto",this.options.centeredSlides=!0),this.hasSwiperButton&&(this.options.navigation={nextEl:`.next-${this.recordId}${this.sortId}`,prevEl:`.prev-${this.recordId}${this.sortId}`});let t=this,i=this.list.length;var s;(this.options.on={slideChangeTransitionEnd:function(){t.activeIndex=this.activeIndex,t.slideIndex=t.swiperList[this.activeIndex].i},slideNextTransitionEnd:function(){this.activeIndex==2*i&&this.slideTo(i,_e)},slidePrevTransitionEnd:function(){this.activeIndex==i-1&&this.slideTo(2*i-1,_e)},slideChange:function(){t.scrollMethod()}},this.swiper=new F.a(`.swiper-container-${this.recordId}${this.sortId}`,this.options),this.swiper)&&(this.swiper instanceof Array?(null===(s=this.swiper)||void 0===s?void 0:s.length)>0&&this.swiper[0].slideTo(i,_e):this.swiper.slideTo(i,_e))})},swiperSlide(e){var t;this.swiper&&(this.swiper instanceof Array?(null===(t=this.swiper)||void 0===t?void 0:t.length)>0&&this.swiper[0].slideTo(e,_e):this.swiper.slideTo(e,_e));this.slideIndex=e}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},Se=Te,we=Se,xe=(i("aeb2"),D(we,ve,be,!1,null,"773d61cf",null)),Ce=xe.exports,Ee=Ce,ke=function(){var e,t,i,s,n,r,a,o,l,d=this,u=d._self._c;d._self._setupProxy;return u("div",{staticClass:"button-wrap",style:[d.conStyle,d.animationInStyle]},[u("span",{directives:[{name:"show",rawName:"v-show",value:d.isVisualShow&&d.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[u("label",{domProps:{innerHTML:d._s(d.visualNumber)}})]),null!==(e=d.attributeJson)&&void 0!==e&&null!==(e=e.linkObj)&&void 0!==e&&e.jumpLinkType?[u("a",{directives:[{name:"createLoadLink",rawName:"v-createLoadLink",value:d.attributeJson.linkObj,expression:"attributeJson.linkObj"}],ref:"button"+d.attributeJson.sort,class:["button-cl","button-cl-"+d.sortId],attrs:{"data-sensors-click":"","data-sensorsClick":d.attributeJson&&d.attributeJson.linkObj&&d.attributeJson.linkObj.jumpLinkType?"true":"false",id:"button_"+(d.recordId+"_"+d.sortId),name:"button_"+(d.recordId+"_"+d.sortId)},on:{click:function(e){return e.preventDefault(),d.pageClick.apply(null,arguments)}}},[u("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:d.tipReportData,envUrl:d.envUrl},expression:"{ data: tipReportData, envUrl }"}],ref:"buttonItem"+d.sortId,staticClass:"button-content",class:[{flexCenterBetween:d.iconImage},4===d.animationHoverObj.type?d.hoverDirection:""],style:[d.buttonStyle,{"--width":d.hoverStyleShow?"100%":"0","--height":d.hoverStyleShow?"100%":"0","--bgColor":d.animationHoverObj.bgStyle.backgroundColor}]},[1===(null===(t=d.iconStyle)||void 0===t?void 0:t.type)&&1===(null===(i=d.iconStyle)||void 0===i?void 0:i.position)&&d.iconImage?u("img",{attrs:{src:d.iconImage,alt:""}}):d._e(),u("div",{staticClass:"label",style:d.buttonTextStyle},[d._v(d._s(d.attributeJson.label||"按钮"))]),1===(null===(s=d.iconStyle)||void 0===s?void 0:s.type)&&2===(null===(n=d.iconStyle)||void 0===n?void 0:n.position)&&d.iconImage?u("img",{attrs:{src:d.iconImage,alt:""}}):d._e(),5===d.animationHoverObj.type&&d.hoverImage&&d.hoverStyleShow?u("img",{staticClass:"hover-image",attrs:{src:d.hoverImage,alt:""}}):d._e()]),2===d.animationHoverObj.type?u("div",{staticClass:"hover-con",style:[d.hoverStyle,{opacity:d.hoverStyleShow?1:0,borderRadius:d.attributeJson.borderStyle.borderRadius+"px"}]}):d._e()])]:[u("div",{ref:"button"+d.attributeJson.sort,class:["button-cl","button-cl-"+d.sortId]},[u("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:d.tipReportData,envUrl:d.envUrl},expression:"{ data: tipReportData, envUrl }"}],ref:"buttonItem"+d.sortId,staticClass:"button-content",class:[{flexCenterBetween:d.iconImage},4===d.animationHoverObj.type?d.hoverDirection:""],style:[d.buttonStyle,{"--width":d.hoverStyleShow?"100%":"0","--height":d.hoverStyleShow?"100%":"0","--bgColor":d.animationHoverObj.bgStyle.backgroundColor}]},[1===(null===(r=d.iconStyle)||void 0===r?void 0:r.type)&&1===(null===(a=d.iconStyle)||void 0===a?void 0:a.position)&&d.iconImage?u("img",{attrs:{src:d.iconImage,alt:""}}):d._e(),u("div",{staticClass:"label",style:d.buttonTextStyle},[d._v(d._s(d.attributeJson.label||"按钮"))]),1===(null===(o=d.iconStyle)||void 0===o?void 0:o.type)&&2===(null===(l=d.iconStyle)||void 0===l?void 0:l.position)&&d.iconImage?u("img",{attrs:{src:d.iconImage,alt:""}}):d._e(),5===d.animationHoverObj.type&&d.hoverImage&&d.hoverStyleShow?u("img",{staticClass:"hover-image",attrs:{src:d.hoverImage,alt:""}}):d._e()]),2===d.animationHoverObj.type?u("div",{staticClass:"hover-con",style:[d.hoverStyle,{opacity:d.hoverStyleShow?1:0,borderRadius:d.attributeJson.borderStyle.borderRadius+"px"}]}):d._e()])]],2)},Ie=[],Le={name:"buttonItem",mixins:[L],components:{},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1}},data(){return{iconImage:"",backgroundImage:"",hoverButtonStyle:{},sensorsIsRes:!1}},watch:{bgStyle:{handler(e){e&&e.picList&&0!=e.picList.length&&(this.backgroundImage=2===e.type?e.picList[0].resourcePath:"")},immediate:!0,deep:!0},iconStyle:{handler(e){e&&e.picList&&0!=e.picList.length&&(this.iconImage=1===e.type?e.picList[0].resourcePath:"")},immediate:!0,deep:!0}},computed:{iconStyle(){return this.attributeJson.iconStyle},bgStyle(){return this.attributeJson.bgStyle},buttonStyle(){let{bgStyle:e,fontStyle:t,borderStyle:i,space:s}=this.attributeJson,{borderTop:n,borderRight:r,borderBottom:a,borderLeft:o,borderColor:l}=i,d="mobile"==this.mode?2*this.ratio:this.ratio,u={fontSize:parseFloat(t.fontSize)*d+"px",color:t.color,backgroundColor:1===e.type?e.backgroundColor:"",fontWeight:t.fontWeight?"bold":"",textDecoration:t.textDecoration?"underline":"",fontStyle:t.fontItalic?"italic":"",borderRadius:i.borderRadius+"px",backgroundImage:`url('${this.backgroundImage}')`,paddingLeft:s.left+"px",paddingRight:s.right+"px"};return 1===i.type&&l&&(u.border="1px solid "+l),2===i.type&&(u.borderTop=n?"1px solid "+n:"none",u.borderRight=r?"1px solid "+r:"none",u.borderBottom=a?"1px solid "+a:"none",u.borderLeft=o?"1px solid "+o:"none"),u},buttonTextStyle(){return{color:this.attributeJson.fontStyle.color,"--hoverColor":this.attributeJson.fontStyle.hoverObj.color||this.attributeJson.fontStyle.color}},tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:17,popData:{},refererPagePath:this.refererPagePath,path:this.path,brand:this.brand,position:1,event:"bannerShow"}},visualNumber(){var e;let t=0;if((null===(e=this.visualData)||void 0===e?void 0:e.length)>0){let e=this.getMktIndex();this.visualData.forEach(i=>{let s=`${this.recordId}_${this.sort}`;Boolean("总和"!=i.date&&"快速总和"!=i.date&&s==i.module_id&&e==i.mkt_rank)&&(t+=i["坑位点击数据"]?i["坑位点击数据"]:0)})}return t}},methods:{getMktIndex(){var e,t,i,s,n,r,a,o,l,d,u,c,h,p,f,m;const g=null!==(e=this.extraCategory)&&void 0!==e&&e.category_index?(null===(t=this.cmsConfig)||void 0===t||null===(t=t.attributeJson)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&null!==(i=this.cmsConfig)&&void 0!==i&&null!==(i=i.attributeJson)&&void 0!==i&&null!==(i=i.list[Number((null===(s=this.extraCategory)||void 0===s?void 0:s.category_index)||1)-1])&&void 0!==i&&null!==(i=i.componentList)&&void 0!==i&&i.find(e=>e.sort===this.attributeJson.sort)?null===(n=this.cmsConfig)||void 0===n||null===(n=n.attributeJson)||void 0===n||null===(n=n.list[Number((null===(r=this.extraCategory)||void 0===r?void 0:r.category_index)||1)-1])||void 0===n||null===(n=n.componentList)||void 0===n?void 0:n.find(e=>e.sort===this.attributeJson.sort):(null===(a=this.cmsConfig)||void 0===a||null===(a=a.attributeJson)||void 0===a||null===(a=a.list)||void 0===a?void 0:a.length)>0&&null!==(o=this.cmsConfig)&&void 0!==o&&null!==(o=o.attributeJson)&&void 0!==o&&null!==(o=o.list[Number((null===(l=this.extraCategory)||void 0===l?void 0:l.category_index)||1)-1])&&void 0!==o&&null!==(o=o.componentList)&&void 0!==o&&o.find(e=>e.sort===this.attributeJson.sort)?null===(d=this.cmsConfig)||void 0===d||null===(d=d.attributeJson)||void 0===d||null===(d=d.list[Number((null===(u=this.extraCategory)||void 0===u?void 0:u.category_index)||1)-1])||void 0===d||null===(d=d.componentList)||void 0===d?void 0:d.find(e=>e.sort===this.attributeJson.sort):null:null!==(c=this.cmsConfig)&&void 0!==c&&null!==(c=c.attributeJson)&&void 0!==c&&null!==(c=c.componentList)&&void 0!==c&&c.find(e=>e.sort===this.attributeJson.sort)?this.cmsConfig.attributeJson.componentList.find(e=>e.sort===this.attributeJson.sort):null!==(h=this.cmsConfig)&&void 0!==h&&null!==(h=h.attributeJson)&&void 0!==h&&null!==(h=h.componentList)&&void 0!==h&&h.find(e=>e.sort===this.attributeJson.sort)?null===(p=this.cmsConfig)||void 0===p||null===(p=p.attributeJson)||void 0===p?void 0:p.componentList.find(e=>e.sort===this.attributeJson.sort):null;let y="";if("simplyText"===(null===g||void 0===g?void 0:g.component)||"textItem"===(null===g||void 0===g?void 0:g.component)||"buttonItem"===(null===g||void 0===g?void 0:g.component)){var v,b,_,T,S;y="";let e=[],t=[];var w,x;if(null!==(v=this.extraCategory)&&void 0!==v&&v.category_index&&(null===(b=this.cmsConfig)||void 0===b||null===(b=b.attributeJson)||void 0===b||null===(b=b.list)||void 0===b?void 0:b.length)>0&&(null===(_=this.cmsConfig)||void 0===_||null===(_=_.attributeJson)||void 0===_||null===(_=_.list[Number((null===(T=this.extraCategory)||void 0===T?void 0:T.category_index)||1)-1])||void 0===_||null===(_=_.componentList)||void 0===_?void 0:_.length)>0)null===(w=this.cmsConfig.attributeJson.list[Number((null===(x=this.extraCategory)||void 0===x?void 0:x.category_index)||1)-1])||void 0===w||w.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"===(null===i||void 0===i?void 0:i.component)&&1===(null===i||void 0===i?void 0:i.displayType)&&[1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)&&t.push(i.attributeJson):e.push(i.attributeJson)});else if((null===(S=this.cmsConfig)||void 0===S||null===(S=S.attributeJson)||void 0===S||null===(S=S.componentList)||void 0===S?void 0:S.length)>0){var C;null===(C=this.cmsConfig)||void 0===C||null===(C=C.attributeJson)||void 0===C||C.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)||t.push(i.attributeJson):e.push(i.attributeJson)})}"textItem"===(null===g||void 0===g?void 0:g.component)||"simplyText"===(null===g||void 0===g?void 0:g.component)?e.length>0&&(y=e.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):""):"buttonItem"===(null===g||void 0===g?void 0:g.component)&&t.length>0&&(y=t.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):"")}let E=y;return E=(E&&null!==(f=this.extraCategory)&&void 0!==f&&f.category_index?(null===(m=this.extraCategory)||void 0===m?void 0:m.category_index)+"-":"")+E,E},needSensorsRep(){},pageClick(){var e;if(this.isVisualShow)return;let t=JSON.parse(JSON.stringify(this.tipReportData));if(t.event="bannerClick",this.attributeJson.linkObj.jumpLinkType)try{let e=C(t,this.envUrl,"click"),i=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(l){}var i,s,n,r,a,o;null!==(e=this.attributeJson)&&void 0!==e&&null!==(e=e.linkObj)&&void 0!==e&&e.jumpLinkType&&this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:this.attributeJson,propsObject:C(JSON.parse(JSON.stringify(t)),this.envUrl,"click"),reportData:t,extraData:{isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",isSpecial:!0}});this.$emit("jumpLink",this.attributeJson.linkObj)}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},Pe=Le,Oe=Pe,Ae=(i("a741"),D(Oe,ke,Ie,!1,null,"4acf858c",null)),De=Ae.exports,Ne=De,Me=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{directives:[{name:"onScroll",rawName:"v-onScroll",value:e.scrollMethod,expression:"scrollMethod"}],class:`product-wrap entrance-con entrance-con-${e.recordId}${e.sortId}`,style:[e.conStyle,e.paginationShow,e.animationInStyle,{height:e.isSwiper?Math.round(e.baseStyle.h*e.ratio)+"px":"auto!important"}]},[t("div",{class:["product-con",e.animationInObj.type?e.enterClass:""],style:[{width:e.baseStyle.w*e.ratio+"px",height:e.isSwiper?e.baseStyle.h*e.ratio+"px":"auto",padding:`0 ${e.attributeJson.goodsPaddingSpacing}px`,animationDuration:e.animationInObj.duration+"s"}]},[e.isSwiper?e._e():t("div",{ref:"slide"+e.sortId,class:`slide-con slide-con-${e.styleType}-${e.mode}`,style:{width:e.attributeJson.baseStyle.w*e.ratio+e.attributeJson.goodsSpacing+"px",margin:"0px -"+e.attributeJson.goodsSpacing/2+"px"}},e._l(e.productList,(function(i,s){return t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(s),envUrl:e.envUrl},expression:"{ data: tipReportData(index), envUrl }"},{name:"hoverAnimate",rawName:"v-hoverAnimate",value:{key:"productIndex",value:s},expression:"{ key: 'productIndex', value: index }"}],key:i.id,ref:`product${i.code}${s}`,refInFor:!0,class:["product-item",`product${i.code}${s}`],style:[e.productStyle],attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:"product_"+(e.recordId+"_"+e.sortId+"_"+i.code),name:"product_"+(e.recordId+"_"+e.sortId+"_"+i.code)},on:{click:function(t){return e.gotoPDP(i.code,i.colorCode,i.name,s,i)}}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber(s+1))}})]),t("div",{staticClass:"product-image"},[t("img",{style:[3===e.animationHoverObj.type&&e.productIndex==s?e.hoverStyle:""],attrs:{src:2==e.attributeJson.goodsImgType&&i.customImage?i.customImage:i.mainPicUrl,alt:i.name}})]),0!=e.attributeJson.showInfo.length?t("div",{class:["product-info","position"+e.attributeJson.infoPoisition,{transparent:2==e.attributeJson.isHover&&e.productIndex!=s}]},[e._t("productInfo",(function(){return[e.attributeJson.showInfo.indexOf(1)>-1?t("div",{staticClass:"product-name"},[e._v(" "+e._s(i.name)+" ")]):e._e(),t("div",{staticClass:"price-con"},[e.attributeJson.showInfo.indexOf(2)>-1?t("div",[e._v(" ¥"+e._s(e.formatNumber(parseInt(i.salesPrice)||0))+" ")]):e._e(),i.salesPrice!=i.standardPrice&&e.attributeJson.showInfo.indexOf(3)>-1?t("div",{staticClass:"standardPrice"},[e._v(" ¥"+e._s(e.formatNumber(parseInt(i.standardPrice)||0))+" ")]):e._e()])]}))],2):e._e(),2===e.animationHoverObj.type?t("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.productIndex===s?1:0,margin:`0 ${e.goodsSpacing/2}px`}]}):e._e()])})),0),e.isSwiper?t("div",{key:e.styleType+e.indicatorType,ref:"slide"+e.sortId,class:`swiper-container swiper-container-${e.recordId}${e.sortId}${e.carouselIndex}`,attrs:{id:"mySwiper-"+e.sortId}},[t("div",{staticClass:"swiper-wrapper",style:[{width:e.baseStyle.w*e.ratio+"px"}]},e._l(e.productList,(function(i,s){return t("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate",value:{key:"productIndex",value:s},expression:"{ key: 'productIndex', value: index }"},{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(s),envUrl:e.envUrl},expression:"{ data: tipReportData(index), envUrl }"}],key:i.id,ref:`product${i.code}${s}`,refInFor:!0,class:`swiper-slide swiper-slide-${e.styleType}-${e.mode}`,style:[e.productStyle]},[t("div",{ref:`product${i.code}${s}`,refInFor:!0,attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:"product_"+(e.recordId+"_"+e.sortId+"_"+i.code),name:"product_"+(e.recordId+"_"+e.sortId+"_"+i.code)},on:{click:function(t){return e.gotoPDP(i.code,i.colorCode,i.name,s,i)}}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber(s+1))}})]),t("div",{staticClass:"product-image"},[t("img",{style:[3===e.animationHoverObj.type&&e.productIndex==s?e.hoverStyle:""],attrs:{src:2==e.attributeJson.goodsImgType&&i.customImage?i.customImage:i.mainPicUrl,alt:""}})]),0!=e.attributeJson.showInfo.length?t("div",{class:["product-info","position"+e.attributeJson.infoPoisition,{transparent:2==e.attributeJson.isHover&&e.productIndex!=s}]},[e._t("productInfo",(function(){return[e.attributeJson.showInfo.indexOf(1)>-1?t("div",{staticClass:"product-name"},[e._v(" "+e._s(i.name)+" ")]):e._e(),t("div",{staticClass:"price-con"},[e.attributeJson.showInfo.indexOf(2)>-1?t("div",[e._v(" ¥"+e._s(e.formatNumber(parseInt(i.salesPrice)||0))+" ")]):e._e(),i.salesPrice!=i.standardPrice&&e.attributeJson.showInfo.indexOf(3)>-1?t("div",{staticClass:"standardPrice"},[e._v(" ¥"+e._s(e.formatNumber(parseInt(i.standardPrice)||0))+" ")]):e._e()])]}))],2):e._e(),2===e.animationHoverObj.type?t("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.productIndex===s?1:0}]}):e._e()])])})),0),e.hasScrollBar?t("div",{class:`swiper-scrollbar scrollbar-${e.recordId}${e.sortId}${e.carouselIndex}`}):e._e(),e.hasSwiperButton?t("div",{class:["swiper-button-left",{disable:e.isBeginning}],on:{click:e.slidePre}},[t("span",{staticClass:"cms2iconfont iconleft",style:e.pageStyle})]):e._e(),e.hasSwiperButton?t("div",{class:["swiper-button-right",{disable:e.isEnd}],on:{click:e.slideNext}},[t("span",{staticClass:"cms2iconfont iconright",style:e.pageStyle})]):e._e()]):e._e()])])},Re=[],Ue={name:"productItem",mixins:[L],components:{},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},sortId:{type:Number},sort:{type:Number,default:0},recordId:{type:Number,default:0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{productTimer:null,sleepTimer:null,hasSensorsReList:[],productList:[],swiper:"",productStyle:{},service:new y,productIndex:"",windowHeight:0,isBeginning:!0,isEnd:!1,initSwiperNow:!1}},watch:{addProduct:{handler(e){clearInterval(this.productTimer),this.productTimer=setInterval(()=>{if("undefined"!==typeof window){if(clearInterval(this.productTimer),1==e.type&&0==e.itemCodeList.length)return;if(2==e.type&&!e.categoryGroupCode)return;if(3==e.type&&!e.cmsSortCode)return;this.getProductList()}},200)},immediate:!0,deep:!0},ratio:{handler(){!this.isSwiper&&this.productStyle.width&&(this.productStyle.width=(this.attributeJson.baseStyle.w*this.ratio-2*this.attributeJson.goodsPaddingSpacing+this.goodsSpacing)/this.showNum+"px")}}},computed:{addProduct(){return this.attributeJson.addProduct},goodsPaddingSpacing(){return this.attributeJson.goodsPaddingSpacing},goodsSpacing(){return this.attributeJson.goodsSpacing},itemsPerLine(){return this.attributeJson.itemsPerLine},indicatorType(){return this.attributeJson.indicatorType},isSwiper(){return"pc"==this.mode&&1==this.styleType||"mobile"==this.mode&&2==this.styleType&&(2==this.indicatorType||3==this.indicatorType)},hasSwiperButton(){return"pc"==this.mode&&1==this.styleType&&2==this.indicatorType||"mobile"==this.mode&&2==this.styleType&&2==this.indicatorType},hasScrollBar(){return"mobile"==this.mode&&2==this.styleType&&3==this.indicatorType},paginationShow(){let{paginationStyle:e}=this.attributeJson;return{"--hoverColor":e.hoverColor||e.color,"--activeColor":e.activeColor,"--color":e.color}},pageStyle(){return{color:this.attributeJson.paginationStyle.color}},showNum(){let e=1;return"pc"==this.mode?e=this.attributeJson.itemsPerLine:1==this.attributeJson.styleType?e=2.5:2==this.attributeJson.styleType&&(e=this.attributeJson.itemsPerLine),e},tipReportData(){return function(e){let t=this.productList[e];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:4,popData:{productCode:t.code,selectDataShow:t.name},materialId:this.recordId+"_"+this.sortId,materialName:this.attributeJson.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:e+1,event:"bannerShow"}}},visualNumber(){return function(e){var t;let i=0;return(null===(t=this.visualData)||void 0===t?void 0:t.length)>0&&this.visualData.forEach(t=>{var s,n;let r=`${this.recordId}_${this.sort}`;e=(null!==(s=this.extraCategory)&&void 0!==s&&s.category_index?(null===(n=this.extraCategory)||void 0===n?void 0:n.category_index)+"-":"")+e,Boolean("总和"!=t.date&&"快速总和"!=t.date&&r==t.module_id&&e==t.mkt_rank)&&(i+=t["坑位点击数据"]?t["坑位点击数据"]:0)}),i}}},mounted(){this.productList=this.attributeJson.productList,this.initProduct()},methods:{needSensorsRep(){this.stopReport||this.scrollMethod()},sleep(e){return new Promise(async t=>{clearTimeout(this.sleepTimer),this.sleepTimer=setTimeout(()=>{clearTimeout(this.sleepTimer),t("success")},e)})},scrollMethod(){this.stopReport||this.$nextTick(async()=>{if(await this.sleep(100),this.isSwiper){var e;const t=this.$refs["slide"+this.sortId];if(t&&(null===(e=this.productList)||void 0===e?void 0:e.length)>0){const e=this.showNum,i=t.swiper.realIndex,s=0+e+i;let n=this.productList.map((e,t)=>(e.pIndex=t,e)).slice(s-e,s);(null===n||void 0===n?void 0:n.length)>0&&n.forEach(e=>{const t=this.$refs[`product${e.code}${e.pIndex}`];if(t&&t[0]){const i=document.documentElement.clientHeight,s=document.documentElement.clientWidth,n=t[0].getBoundingClientRect(),r=n.top||0,a=n.left||0;r<i&&r>=0&&a<s&&a>=0&&this.sensorsExposure(e.pIndex,e)}})}}else{var t;(null===(t=this.productList)||void 0===t?void 0:t.length)>0&&this.productList.forEach((e,t)=>{const i=this.$refs[`product${e.code}${t}`];if(i&&i[0]){const s=document.documentElement.clientHeight,n=document.documentElement.clientWidth,r=i[0].getBoundingClientRect(),a=r.top||0,o=r.left||0;a<s&&a>=0&&o<n&&o>=0&&this.sensorsExposure(t,e)}})}})},sensorsExposure(e,t){var i,s,n,r,a,o;if(this.hasSensorsReList.find(e=>JSON.stringify(e)==JSON.stringify(t)))return;let l=JSON.parse(JSON.stringify(this.tipReportData(e)));t.position=Number(e)+1,this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:t,propsObject:C(JSON.parse(JSON.stringify(l)),this.envUrl,"exposure"),reportData:l,extraData:{isHasPDP:!0,hasPDPItem:t,isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",MKTIndex:String(e+1),MKTName:this.productList[e].name}}),this.hasSensorsReList.push(t)},getProductList:function(){let e={};switch(this.addProduct.type){case 1:e={itemCodeList:this.addProduct.itemCodeList,pageNum:1,pageSize:this.addProduct.itemCodeList.length};break;case 2:e={categoryParam:{categoryCodeList:this.addProduct.categoryCodeList,categoryGroupCode:this.addProduct.categoryGroupCode},pageNum:1,pageSize:this.addProduct.max,sortRuleId:this.addProduct.sortId};break;case 3:e={pageNum:1,pageSize:this.addProduct.max,sortField:this.addProduct.cmsSortCode};break}3==this.addProduct.type?this.service.getSortProductInfo(this.envUrl,e,this.language).then(e=>{e&&e.list?(this.productList=e.list||[],this.getAnimate()):this.productList=[]}):this.service.getProductInfo(this.envUrl,e,this.language).then(e=>{e&&e.list?(this.productList=e.list||[],this.getAnimate()):this.productList=[]})},getAnimate(){let e=document.querySelector(`.entrance-con${this.recordId}${this.sortId}`),t=e&&e.classList.contains("entrance-demonstrate");t&&e.firstChild.style&&(e.firstChild.style.display="block"),this.initProduct()},initProduct:function(){let{attributeJson:e,addProduct:t}=this;var i;2==e.goodsImgType&&0!=t.customImageList.length&&((null===(i=this.productList)||void 0===i?void 0:i.length)>0&&this.productList.forEach((e,i)=>{t.customImageList[i]&&0!=t.customImageList[i].picList.length&&this.$set(e,"customImage",t.customImageList[i].picList[0].resourcePath)}));this.productList&&this.productList.length>0&&(this.scrollMethod(),this.isSwiper?this.initSwiper():this.initSlide())},initSwiper:function(){let{attributeJson:e}=this;this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null),this.options={effect:"slide",autoplay:!1,slidesPerView:this.showNum,spaceBetween:e.goodsSpacing},this.hasScrollBar&&(this.options.scrollbar={el:`.scrollbar-${this.recordId}${this.sortId}${this.carouselIndex}`,draggable:!0},this.options.freeMode=!0);let t=this;this.options.on={slideChange:function(){t.isBeginning=this.isBeginning,t.isEnd=this.isEnd,t.scrollMethod()}},this.swiper=new F.a(`.swiper-container-${this.recordId}${this.sortId}${this.carouselIndex}`,this.options)})},slideNext(){this.swiper&&this.swiper.slideNext()},slidePre(){this.swiper&&this.swiper.slidePrev()},initSlide(){this.productStyle={padding:`0 ${this.goodsSpacing/2}px`,width:(this.attributeJson.baseStyle.w*this.ratio-2*this.attributeJson.goodsPaddingSpacing+this.goodsSpacing)/this.showNum+"px",marginBottom:this.goodsSpacing+"px"}},gotoPDP(e,t,i,s,n){var r,a,o,l,d,u;if(this.isVisualShow)return;let c=JSON.parse(JSON.stringify(this.tipReportData(s)));c.event="bannerClick";try{let e=C(c,this.envUrl,"click"),t=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",t)}catch(h){}n.position=Number(s)+1,this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:n,propsObject:C(JSON.parse(JSON.stringify(c)),this.envUrl,"click"),reportData:c,extraData:{isHasPDP:!0,hasPDPItem:n,isCategory:!(null===(r=this.extraCategory)||void 0===r||!r.isCategory)&&(null===(a=this.extraCategory)||void 0===a?void 0:a.isCategory),category_index:null!==(o=this.extraCategory)&&void 0!==o&&o.category_index?null===(l=this.extraCategory)||void 0===l?void 0:l.category_index:"",category_name:null!==(d=this.extraCategory)&&void 0!==d&&d.category_name?null===(u=this.extraCategory)||void 0===u?void 0:u.category_name:"",MKTIndex:String(s+1),MKTName:this.productList[s].name}}),this.$emit("gotoPDP",{code:e,colorCode:t})},formatNumber:k},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},Be=Ue,je=Be,Fe=(i("f107"),D(je,Me,Re,!1,null,"2285da90",null)),qe=Fe.exports,$e=qe,He=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"simplyText-wrap entrance-con",style:[e.conStyle,e.animationInStyle],attrs:{"data-sensors-click":"","data-sensorsClick":e.attributeJson&&e.attributeJson.linkObj&&e.attributeJson.linkObj.jumpLinkType?"true":"false",id:`entrance_${e.recordId}_${e.sortId}`,name:`entrance_${e.recordId}_${e.sortId}`},on:{click:e.pageClick}},[t("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],staticClass:"text-con"},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual&&e.visualNumber,expression:"isVisualShow && hasVisual && visualNumber"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber)}})]),t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{ data: tipReportData, envUrl }"}],staticClass:"text-show",style:[e.textStyle,e.hoverStyleShow?e.hoverStyle:""]},[e._v(e._s(e.attributeJson.label))])])])},Ve=[],ze={name:"simplyText",inheritAttrs:!1,mixins:[L],props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1}},computed:{textStyle(){let{fontStyle:{fontSize:e,color:t,fontWeight:i,textDecoration:s,lineHeight:n,fontItalic:r,letterSpacing:a,fontBackColor:o,fontFamily:l},textAlign:d}=this.attributeJson,u="mobile"==this.mode?2*this.ratio:this.ratio,c={fontSize:parseFloat(e)*u+"px",color:t,fontWeight:i?"bold":"",textDecoration:s?"underline":"",fontStyle:r?"italic":"",lineHeight:n,letterSpacing:(a||0)+"px",backgroundColor:o||"",fontFamily:l,textAlign:d};return c},tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:24,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1,event:"bannerShow"}},visualNumber(){var e;let t=0;return(null===(e=this.visualData)||void 0===e?void 0:e.length)>0&&this.visualData.forEach(e=>{let i=this.getMktIndex(),s=`${this.recordId}_${this.sort}`;Boolean("总和"!=e.date&&"快速总和"!=e.date&&s==e.module_id&&i==e.mkt_rank)&&(t+=e["坑位点击数据"]?e["坑位点击数据"]:0)}),t}},methods:{getMktIndex(){var e,t,i,s,n,r,a,o,l,d,u,c,h,p,f,m;const g=null!==(e=this.extraCategory)&&void 0!==e&&e.category_index?(null===(t=this.cmsConfig)||void 0===t||null===(t=t.attributeJson)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&null!==(i=this.cmsConfig)&&void 0!==i&&null!==(i=i.attributeJson)&&void 0!==i&&null!==(i=i.list[Number((null===(s=this.extraCategory)||void 0===s?void 0:s.category_index)||1)-1])&&void 0!==i&&null!==(i=i.componentList)&&void 0!==i&&i.find(e=>e.sort===this.attributeJson.sort)?null===(n=this.cmsConfig)||void 0===n||null===(n=n.attributeJson)||void 0===n||null===(n=n.list[Number((null===(r=this.extraCategory)||void 0===r?void 0:r.category_index)||1)-1])||void 0===n||null===(n=n.componentList)||void 0===n?void 0:n.find(e=>e.sort===this.attributeJson.sort):(null===(a=this.cmsConfig)||void 0===a||null===(a=a.attributeJson)||void 0===a||null===(a=a.list)||void 0===a?void 0:a.length)>0&&null!==(o=this.cmsConfig)&&void 0!==o&&null!==(o=o.attributeJson)&&void 0!==o&&null!==(o=o.list[Number((null===(l=this.extraCategory)||void 0===l?void 0:l.category_index)||1)-1])&&void 0!==o&&null!==(o=o.componentList)&&void 0!==o&&o.find(e=>e.sort===this.attributeJson.sort)?null===(d=this.cmsConfig)||void 0===d||null===(d=d.attributeJson)||void 0===d||null===(d=d.list[Number((null===(u=this.extraCategory)||void 0===u?void 0:u.category_index)||1)-1])||void 0===d||null===(d=d.componentList)||void 0===d?void 0:d.find(e=>e.sort===this.attributeJson.sort):null:null!==(c=this.cmsConfig)&&void 0!==c&&null!==(c=c.attributeJson)&&void 0!==c&&null!==(c=c.componentList)&&void 0!==c&&c.find(e=>e.sort===this.attributeJson.sort)?this.cmsConfig.attributeJson.componentList.find(e=>e.sort===this.attributeJson.sort):null!==(h=this.cmsConfig)&&void 0!==h&&null!==(h=h.attributeJson)&&void 0!==h&&null!==(h=h.componentList)&&void 0!==h&&h.find(e=>e.sort===this.attributeJson.sort)?null===(p=this.cmsConfig)||void 0===p||null===(p=p.attributeJson)||void 0===p?void 0:p.componentList.find(e=>e.sort===this.attributeJson.sort):null;let y="";if("simplyText"===(null===g||void 0===g?void 0:g.component)||"textItem"===(null===g||void 0===g?void 0:g.component)||"buttonItem"===(null===g||void 0===g?void 0:g.component)){var v,b,_,T,S;y="";let e=[],t=[];var w,x;if(null!==(v=this.extraCategory)&&void 0!==v&&v.category_index&&(null===(b=this.cmsConfig)||void 0===b||null===(b=b.attributeJson)||void 0===b||null===(b=b.list)||void 0===b?void 0:b.length)>0&&(null===(_=this.cmsConfig)||void 0===_||null===(_=_.attributeJson)||void 0===_||null===(_=_.list[Number((null===(T=this.extraCategory)||void 0===T?void 0:T.category_index)||1)-1])||void 0===_||null===(_=_.componentList)||void 0===_?void 0:_.length)>0)null===(w=this.cmsConfig.attributeJson.list[Number((null===(x=this.extraCategory)||void 0===x?void 0:x.category_index)||1)-1])||void 0===w||w.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"===(null===i||void 0===i?void 0:i.component)&&1===(null===i||void 0===i?void 0:i.displayType)&&[1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)&&t.push(i.attributeJson):e.push(i.attributeJson)});else if((null===(S=this.cmsConfig)||void 0===S||null===(S=S.attributeJson)||void 0===S||null===(S=S.componentList)||void 0===S?void 0:S.length)>0){var C;null===(C=this.cmsConfig)||void 0===C||null===(C=C.attributeJson)||void 0===C||C.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)||t.push(i.attributeJson):e.push(i.attributeJson)})}"textItem"===(null===g||void 0===g?void 0:g.component)||"simplyText"===(null===g||void 0===g?void 0:g.component)?e.length>0&&(y=e.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):""):"buttonItem"===(null===g||void 0===g?void 0:g.component)&&t.length>0&&(y=t.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):"")}let E=y;return E=(E&&null!==(f=this.extraCategory)&&void 0!==f&&f.category_index?(null===(m=this.extraCategory)||void 0===m?void 0:m.category_index)+"-":"")+E,E},needSensorsRep(){},pageClick(){var e;if(this.isVisualShow)return;let t=JSON.parse(JSON.stringify(this.tipReportData));if(t.event="bannerClick",this.attributeJson.linkObj.jumpLinkType)try{let e=C(t,this.envUrl,"click"),i=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(l){}var i,s,n,r,a,o;null!==(e=this.attributeJson)&&void 0!==e&&null!==(e=e.linkObj)&&void 0!==e&&e.jumpLinkType&&this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:this.attributeJson,propsObject:C(JSON.parse(JSON.stringify(t)),this.envUrl,"click"),reportData:t,extraData:{isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",isSpecial:!0,noLabel:!0}});this.$emit("jumpLink",this.attributeJson.linkObj)}}},Ge=ze,Je=Ge,We=(i("c8e5"),D(Je,He,Ve,!1,null,"c5344158",null)),Xe=We.exports,Ye=Xe,Ke={name:"singleLayout",inheritAttrs:!1,components:{textItem:R,imgNav:ee,videoItem:ye,swiperItem:Ee,buttonItem:Ne,productItem:$e,simplyText:Ye},props:{envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},sort:{type:Number,default:0},recordId:{type:Number,default:0},canDragInc:{type:Boolean,default:!0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{vLine:[],hLine:[],componentName:""}},computed:{layoutStyle:function(){return this.layOutData.layoutStyle?{backgroundImage:2===this.layOutData.layoutStyle.bgStyle.type&&0!=this.layOutData.layoutStyle.bgStyle.picList.length&&`url(${this.layOutData.layoutStyle.bgStyle.picList[0].resourcePath})`,backgroundColor:1===this.layOutData.layoutStyle.bgStyle.type&&this.layOutData.layoutStyle.bgStyle.backgroundColor}:{}}},methods:{needSensorsRep(){if(this.stopReport)return;const e=this.$refs.singleComponent;(null===e||void 0===e?void 0:e.length)>0&&e.forEach(e=>{e.needSensorsRep()})},getCustom(){let e=this.layOutData.componentList.filter(e=>e.type>100);return e}}},Qe=Ke,Ze=Qe,et=(i("04f2"),D(Ze,o,l,!1,null,"6e32e9f3",null)),tt=et.exports,it=tt,st=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{key:e.layOutData.layoutStyle.height,staticClass:"multiple-layout",style:{height:Math.round(e.layOutData.layoutStyle.height*e.ratio)+"px"}},[e._l(e.layOutData.list,(function(i,s){return[t("div",{key:s,staticClass:"multiple-item",style:{width:Math.round(i.baseStyle.w*e.ratio)+"px",height:Math.round(e.layOutData.layoutStyle.height*e.ratio)+"px",zIndex:e.currentIndex==s?1:"auto"}},[t("singleLayout",e._g(e._b({ref:"multipleSingle",refInFor:!0,attrs:{sort:e.sort,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,cmsConfig:e.cmsConfig,visualData:e.visualData,envUrl:e.envUrl,isClient:e.isClient,layOutData:i,componentList:i.componentList,"parent-l":i.baseStyle.l,ratio:e.ratio,recordId:e.recordId,mode:e.mode}},"singleLayout",e.$attrs,!1),e.$listeners))],1)]}))],2)},nt=[],rt={name:"multipleLayout",components:{singleLayout:it},props:{envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},sort:{type:Number,default:0},recordId:{type:Number,default:0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},inheritAttrs:!1,data(){return{w:200,currentItem:null,currentIndex:""}},watch:{},mounted(){},methods:{}},at=rt,ot=at,lt=(i("6814"),D(ot,st,nt,!1,null,"44b7f275",null)),dt=lt.exports,ut=dt,ct=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl,isClient:e.isClient},expression:"{ data: tipReportData, envUrl, isClient }"}],ref:"custom"+e.layOutData.sort,staticClass:"custom-layout"},[t("div",{staticClass:"add-con"}),e._t("customComponent",null,{attributeJson:e.layOutData})],2)},ht=[],pt={name:"customLayout",props:{sort:{type:Number,default:0},recordId:{type:Number,default:0},refererPagePath:{type:String},layOutData:{type:Object,default:()=>{}},envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},path:{type:String},isClient:{type:Boolean,default:!0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{sensorsIsRes:!1}},inheritAttrs:!1,computed:{tipReportData(){return{uniqueId:this.layOutData.sort,uniqueName:this.uniqueName,componentType:7,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1}}},methods:{},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}},treport:x}},ft=pt,mt=ft,gt=(i("9527"),D(mt,ct,ht,!1,null,"5d3536cc",null)),yt=gt.exports,vt=yt,bt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"tab-layout"},[e.hasTab?t("div",{staticClass:"tab-detail tab-con"},[t("div",[2==e.tabHeadInfo.showTitle?t("div",{ref:"tabHeadTitleDom",style:e.titleStyle},[t("span",[e._v(e._s(1==e.tabHeadInfo.customTitle?e.tabHeadInfo.title:e.list[e.tabIndex].title))])]):e._e(),t("div",{staticClass:"tab-list"},[t("div",{staticClass:"tab-line"},e._l(e.list,(function(i,s){return t("navItem",{key:s,attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:`nav_${e.recordId}_${e.sort}_${Number(s+1)}`,name:`nav_${e.recordId}_${e.sort}_${Number(s+1)}`,recordId:e.recordId,sort:e.sort,item:i,ratio:e.ratio,mode:e.mode,spacing:e.layOutData.fontStyle.spacing*e.ratio,active:e.tabIndex==s,navStyle:e.navStyle(s),isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,navIndex:s+1},nativeOn:{click:function(t){return e.chooseTab(i,s)}}})})),1)]),t("div",{staticClass:"tab-content",style:{height:Math.ceil(e.list[e.tabIndex].height*e.ratio+1)+"px",transform:`translateX(${100*-e.tabIndex}%)`}},e._l(e.list,(function(i,s){return t("div",{key:s,staticClass:"tab-single"},[t("singleLayout",e._g(e._b({ref:"tabSingle"+s,refInFor:!0,attrs:{layOutData:i,componentList:i.componentList,ratio:e.ratio,recordId:e.recordId,sort:e.sort,mode:e.mode,envUrl:e.envUrl,isClient:e.isClient,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,extraCategory:e.extraCategory(s)}},"singleLayout",e.$attrs,!1),e.$listeners))],1)})),0)])]):e._e()])},_t=[],Tt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:["nav-item",e.item.navStyle.activeBackImage||e.item.navStyle.backImage?"nav-item-image":""],style:[e.navStyle,e.backStyle]},[t("label",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber)}})]),[t("img",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticClass:"back-image",attrs:{src:e.item.navStyle.activeBackImage}}),t("img",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticClass:"back-image",attrs:{src:e.item.navStyle.backImage}})],e.item.title?t("span",{style:{marginLeft:e.spacing+"px"}},[e._v(e._s(e.item.title))]):e._e()],2)},St=[],wt={name:"navItem",props:{item:{type:Object,default:()=>{}},navIndex:{type:Number,default:0},sort:{type:Number,default:0},recordId:{type:Number,default:0},active:{type:Boolean,default:!1},navStyle:{type:Object,default:()=>{}},spacing:{type:[String,Number],default:0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{}},watch:{},computed:{backStyle(){let{item:e,active:t}=this;return{backgroundColor:1==e.navStyle.type?t?e.navStyle.activeColor:e.navStyle.backgroundColor:"",backgroundImage:2==e.navStyle.type?t?`url('${e.navStyle.activeBackImage}')`:`url('${e.navStyle.backImage}')`:""}},visualNumber(){var e;let t=0;return(null===(e=this.visualData)||void 0===e?void 0:e.length)>0&&this.visualData.forEach(e=>{let i=`${this.recordId}_${this.sort}`;Boolean("总和"!=e.date&&"快速总和"!=e.date&&i==e.module_id&&e.mkt_rank==this.navIndex)&&(t+=e["坑位点击数据"]?e["坑位点击数据"]:0)}),t}},methods:{}},xt=wt,Ct=xt,Et=(i("6e0d"),D(Ct,Tt,St,!1,null,"7bfe839a",null)),kt=Et.exports,It=kt,Lt={name:"tabLayout",components:{navItem:It,singleLayout:it},props:{refererPagePath:{type:String},envUrl:{type:String,default:""},path:{type:String},sort:{type:Number,default:0},recordId:{type:Number,default:0},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},mounted(){setTimeout(()=>{this.sensorsTab()},200)},data(){return{tabIndex:0,activeSort:"",tabHeadTitleH:0}},computed:{extraCategory(){return function(e){var t;let i=null;return(null===(t=this.layOutData)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&(i={isCategory:!0,category_index:String(e+1),category_name:this.layOutData.list[e].title}),i}},hasTab(){return this.layOutData.list.some(e=>e.title)},list(){return this.layOutData.list},tabHeadInfo(){return this.layOutData.tabHeadInfo},navStyle(){let{tabHeadInfo:{width:e,height:t},borderStyle:i,fontStyle:{fontSize:s,color:n,fontWeight:r,textDecoration:a,fontItalic:o,hoverObj:{color:l}}}=this.layOutData,{borderTop:d,borderRight:u,borderBottom:c,borderLeft:h,borderColor:p,hoverObj:f}=i;return function(){return{width:e*this.ratio+"px",height:t*this.ratio+"px",color:n,fontSize:s&&s.replace(/px/,"")?Number(s.replace(/px/,""))*this.ratio*("pc"==this.mode?1:2)+"px":"",fontWeight:r?"bold":"",textDecoration:a?"underline":"",fontStyle:o?"italic":"",borderTop:2===i.type&&d?"1px solid "+d:1===i.type&&p?"1px solid "+p:"none",borderRight:2===i.type&&u?"1px solid "+u:1===i.type&&p?"1px solid "+p:"none",borderBottom:2===i.type&&c?"1px solid "+c:1===i.type&&p?"1px solid "+p:"none",borderLeft:2===i.type&&h?"1px solid "+h:1===i.type&&p?"1px solid "+p:"none","--hoverColor":l,"--hoverBorderTop":2===f.type&&f.borderTop?"1px solid "+f.borderTop:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderRight":2===f.type&&f.borderRight?"1px solid "+f.borderRight:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderBottom":2===f.type&&f.borderBottom?"1px solid "+f.borderBottom:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderLeft":2===f.type&&f.borderLeft?"1px solid "+f.borderLeft:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none"}}},titleStyle(){let{tabHeadInfo:{titleStyle:{fontSize:e,color:t,fontWeight:i,textDecoration:s,fontItalic:n}}}=this.layOutData;return{color:t,fontSize:e&&e.replace(/px/,"")?Number(e.replace(/px/,""))*this.ratio*("pc"==this.mode?1:2)+"px":"",fontWeight:i?"bold":"",textDecoration:s?"underline":"",fontStyle:n?"italic":"",paddingLeft:("pc"==this.mode?30:60)*this.ratio+"px",paddingBottom:("pc"==this.mode?40:80)*this.ratio+"px"}}},watch:{"layOutData.tabHeadInfo":{handler:function(){this.$nextTick(()=>{this.tabHeadTitleH=2==this.layOutData.tabHeadInfo.showTitle&&this.$refs["tabHeadTitleDom"]?this.$refs["tabHeadTitleDom"].clientHeight:0,this.setLayoutH()})},immediate:!0,deep:!0},"list.length":{handler:function(){let e=this.list.findIndex(e=>e.sort==this.activeSort);e>-1?this.tabIndex=e:(this.tabIndex=this.tabIndex>0?this.tabIndex-1:0,this.activeSort=this.list[this.tabIndex].sort)},deep:!0},hasTab:{handler:function(e){e&&(this.activeSort=this.list[0].sort,this.tabIndex=0)}}},methods:{chooseTab(e,t){this.activeSort=e.sort,this.tabIndex=t,this.setLayoutH(),this.$emit("updateLayOut",{sort:this.layOutData.sort});const i={uniqueId:this.recordId+"_"+this.sort,uniqueName:this.layOutData.uniqueName,componentMethodType:1,popData:{},materialId:e.sort?this.recordId+"_"+e.sort:this.recordId+"_"+this.sort,materialName:e.title,refererPagePath:this.refererPagePath,path:this.path,componentType:7,brand:this.brand,position:t+1,event:"bannerClick"};this.$emit("sensorsCmsRepost",{initObject:this.layOutData,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(i)),this.envUrl,"click"),reportData:i,extraData:{isTabFirst:!0,component_id:this.recordId+"_"+this.sort,component_type:"tabLayout",isCategory:!0,ignoreCategory:!0,category_index:t+1,category_name:e.title,MKTIndex:t+1,MKTName:e.title}});let s=C(i,this.envUrl,"click"),n=new Blob([JSON.stringify(s)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",n),setTimeout(()=>{this.sensorsTab()},0)},setLayoutH:function(){this.$set(this.layOutData.layoutStyle,"height",1*this.layOutData.list[this.tabIndex].height+1*this.layOutData.tabHeadInfo.height+1*this.tabHeadTitleH/this.ratio)},sensorsTab(){let e=this.$refs["tabSingle"+this.tabIndex];e&&e[0]&&e[0].needSensorsRep()}}},Pt=Lt,Ot=Pt,At=(i("3e8c"),D(Ot,bt,_t,!1,null,"4b6659cf",null)),Dt=At.exports,Nt=Dt,Mt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:"slide-wrap "+e.mode,style:[{"--hoverColor":e.paginationStyle.hoverColor||e.paginationStyle.color,"--activeColor":e.paginationStyle.activeColor,"--color":e.paginationStyle.color},e.allBackStyle]},[t("div",{key:e.indicatorType,class:[`swiper-container swiper-${e.recordId} swiper-container-${e.indicatorType}`],style:e.swiperConStyle,attrs:{id:"mySwiper-"+e.recordId}},[t("div",{staticClass:"swiper-wrapper"},e._l(e.slideList,(function(i,s){return t("div",{key:s,class:["swiper-slide",{"slide-auto":1==e.widthStyle.type||e.centeredSlides}]},[t("div",{staticClass:"slide-con",style:[e.backStyle(i.i),{width:1==e.widthStyle.type?i.slideWidth*e.ratio+"px":e.backStyle(i.i).width}]},[t("singleLayout",e._g(e._b({ref:i.isCopy?"":"slideSingle",refInFor:!0,attrs:{sort:e.sort,carouselIndex:s,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,isClient:e.isClient,envUrl:e.envUrl,layOutData:i,ratio:e.ratio,recordId:e.recordId,mode:e.mode,extraCategory:{category_index:String(s+1>e.slideList.length/3?s+1>e.slideList.length/3*2?s+1-e.slideList.length/3*2:s+1-e.slideList.length/3:s+1)},stopReport:e.realActiveIndex!=s}},"singleLayout",e.$attrs,!1),e.$listeners))],1)])})),0),e.hasSwiperButton?t("div",{class:["swiper-button-prev","prev-"+e.recordId]},[2==e.indicatorType?t("div",{staticClass:"arrow"},[t("span",{staticClass:"cms2iconfont iconarrow-left",style:e.pageStyle})]):e._e(),3==e.indicatorType?t("div",{class:"cms2iconfont "+e.leftButton[e.layOutData.arrowType],style:e.pageStyle}):e._e(),4==e.indicatorType?t("div",{class:"cms2iconfont iconxiangzuo",style:e.pageStyle}):e._e()]):e._e(),e.hasSwiperButton?t("div",{class:["swiper-button-next","next-"+e.recordId]},[2==e.indicatorType?t("div",{staticClass:"arrow"},[t("span",{staticClass:"cms2iconfont iconarrow-right",style:e.pageStyle})]):e._e(),3==e.indicatorType?t("div",{class:"cms2iconfont "+e.rightButton[e.layOutData.arrowType],style:e.pageStyle}):e._e(),4==e.indicatorType?t("div",{class:"cms2iconfont iconxiangyou2",style:e.pageStyle}):e._e()]):e._e(),4==e.indicatorType||5==e.indicatorType?t("div",{staticClass:"slide-bottom"},e._l(e.list,(function(i,s){return t("div",{key:s,class:["slide-bottom-item",{active:s==e.slideIndex%3}]})})),0):e._e()])])},Rt=[],Ut={name:"slideLayout",components:{singleLayout:it},props:{envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},sort:{type:Number,default:0},recordId:{type:Number,default:0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{swiper:"",realActiveIndex:0,slideIndex:0,layWidth:1920,isInit:!1,slideList:[],isMove:!1,leftButton:{1:"iconxiangzuo",2:"iconxiangzuo1"},rightButton:{1:"iconxiangyou2",2:"iconxiangyou1"}}},watch:{layoutStyle:{handler(e){this.layWidth=("pc"==this.mode?1920:750)*(e.widthStyle.width/100)},deep:!0,immediate:!0},slideLen:{handler(){"undefined"!==typeof window&&this.calculateWidth()},immediate:!0,deep:!0}},computed:{extraCategory(){return function(e){var t;let i=null;return(null===(t=this.layOutData)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&(i={category_index:String(e+1>this.slideList.length/3?e+1>this.slideList.length/3*2?e+1-this.slideList.length/3*2:e+1-this.slideList.length/3:e+1)}),i}},layoutStyle(){return this.layOutData.layoutStyle},paginationStyle(){return this.layOutData.paginationStyle},bgStyle(){return this.layOutData.bgStyle},list(){return this.layOutData.list},styleType(){return this.layOutData.styleType},indicatorType(){return this.layOutData.indicatorType},widthStyle(){return this.layOutData.widthStyle},hasSwiperButton(){return 1!=this.indicatorType},pageStyle(){return{color:this.layOutData.paginationStyle.color}},allBackStyle(){let{bgStyle:e}=this,t="",i="";return 1==e.status&&(1==e.type?t=e.backgroundColor||"":i=0!=e.picList.length?`url(${e.picList[0].resourcePath})`:""),{backgroundColor:t,backgroundImage:i}},backStyle(){let{bgStyle:e,layoutStyle:t,styleType:i,mode:s}=this;return function(n){let r=this.list[n],a="",o="";2==e.status&&(1==r.bgStyle.type?a=r.bgStyle.backgroundColor||"":o=0!=r.bgStyle.picList.length?`url(${r.bgStyle.picList[0].resourcePath})`:"");let l="pc"==s&&2==i,d=l?this.layWidth-(this.layOutData.lineSlideNum+1)*("mobile"==s?0:40)-("mobile"==s?0:556):this.layWidth;return{width:3==i?"100%":d/this.layOutData.lineSlideNum*this.ratio+"px",height:t.height*this.ratio+"px",backgroundColor:a,backgroundImage:o}}},slideLen(){var e;return(null===(e=this.layOutData)||void 0===e||null===(e=e.list)||void 0===e?void 0:e.length)>0?this.layOutData.list.length:0},centeredSlides(){return"mobile"==this.mode||"pc"==this.mode&&2==this.styleType},swiperConStyle(){if(3==this.styleType)return{marginLeft:180*this.ratio+"px",width:1740*this.ratio+"px"}}},mounted(){this.$nextTick(()=>{this.initSwiper()}),window.addEventListener("pageshow",e=>{this.pageshowListen(e)})},activated(){this.$nextTick(()=>{this.initSwiper()})},methods:{pageshowListen(e){var t;I()&&(e.persisted||2==(null===(t=window)||void 0===t||null===(t=t.performance)||void 0===t||null===(t=t.navigation)||void 0===t?void 0:t.type))&&this.$nextTick(()=>{this.initSwiper()})},sleep(e){return new Promise(async t=>{clearTimeout(this.sleepTimer),this.sleepTimer=setTimeout(()=>{clearTimeout(this.sleepTimer),t("success")},e)})},calculateWidth:function(){let{list:e}=this;e.forEach((e,t)=>{e.i=t});let t=JSON.parse(JSON.stringify(e));t.forEach(e=>{e.isCopy=!0}),this.slideList=e.concat(JSON.parse(JSON.stringify(t))),this.slideList=t.concat(this.slideList),this.$nextTick(()=>{if(2==this.layOutData.widthStyle.type)return;let{layWidth:e}=this;this.slideList.forEach(t=>{let i=t.componentList[0],s=0;if(i){let t=i.attributeJson;if(2==i.type){let i=t.list.some(e=>{var t;return Boolean((null===e||void 0===e||null===(t=e.picList)||void 0===t?void 0:t.length)>0)});s=i?t.baseStyle.w+t.baseStyle.l:e}else if(3==i.type){var n;let i=Boolean((null===t||void 0===t||null===(n=t.videoInfo)||void 0===n||null===(n=n.list)||void 0===n?void 0:n.length)>0);s=i?t.baseStyle.w+t.baseStyle.l:e}else s=t.baseStyle.w+t.baseStyle.l}else s=e;this.$set(t,"slideWidth",s)})})},initSwiper(){this.$nextTick(()=>{var e;this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{layOutData:t,widthStyle:i,ratio:s,slideLen:n}=this;this.options={effect:"slide",observer:!0,observeParents:!0,slidesPerView:this.centeredSlides||1==i.type?"auto":t.lineSlideNum,preventInteractionOnTransition:!0,slidesPerGroup:1,slidesPerGroupAuto:!0,centeredSlides:this.centeredSlides||1==i.type,spaceBetween:this.centeredSlides?0*s:0,autoplay:!!(t.autoPlay&&(null===(e=this.list)||void 0===e?void 0:e.length)>1)&&{delay:1e3*t.interval,disableOnInteraction:!1,stopOnLastSlide:!1}},1==i.type&&(this.options.loopedSlides=4,this.options.loopAdditionalSlides=2),3==this.styleType&&(this.options.slidesOffsetBefore=180,this.options.slidesPerView=2.02,this.options.spaceBetween=32);let r=this;this.options.on={slideNextTransitionEnd:function(){this.activeIndex==2*n&&this.slideTo(n,0),r.slideIndex=this.activeIndex},slidePrevTransitionEnd:function(){this.activeIndex==n-1&&this.slideTo(2*n-1,0),r.slideIndex=this.activeIndex},slideChange:async function(){var e,t;if((null===(e=r.slideList)||void 0===e?void 0:e.length)>0&&this.realIndex!==(null===(t=r.slideList)||void 0===t?void 0:t.length)/3&&(r.isMove=!0),r.isMove){r.realActiveIndex=this.realIndex;const e=r.$refs.slideSingle;await r.sleep(200),(null===e||void 0===e?void 0:e.length)>0&&e.forEach(e=>{e.needSensorsRep()})}}},this.hasSwiperButton&&(this.options.navigation={nextEl:".next-"+this.recordId,prevEl:".prev-"+this.recordId}),this.swiper=new F.a(".swiper-"+this.recordId,this.options),this.swiper&&(this.swiper instanceof Array?this.swiper[0].slideTo(n,0):this.swiper.slideTo(n,0))})}}},Bt=Ut,jt=Bt,Ft=(i("4a91"),D(jt,Mt,Rt,!1,null,"1b0295fa",null)),qt=Ft.exports,$t=qt,Ht=(i("be35"),i("77ed"),i("1e09"),{name:"cms",inheritAttrs:!1,components:{singleLayout:it,multipleLayout:ut,customLayout:vt,tabLayout:Nt,slideLayout:$t},props:{cmsList:{type:Array,default:()=>[]},canDrag:{type:Boolean,default:!0},mode:{type:String,default:"pc"},ratio:{type:Number,default:1},envUrl:{type:String,default:""},path:{type:String},isClient:{type:Boolean,default:!0},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{chooseSort:"",activeIndex:-1,layOutObj:{1:"singleLayout",2:"multipleLayout",3:"customLayout",4:"tabLayout",5:"slideLayout"}}},computed:{},mounted(){},methods:{chooseLayout(e,t){this.chooseSort=t,this.$emit("updateLayOut",{layoutType:e,sort:t})},updateSort(e){this.chooseSort=e},deleteModule(e,t){t===this.chooseSort?this.$emit("deleteModule",e):(this.cmsList.splice(e,1),this.$emit("saveVersionId"))},showOrHide(e){let t=this.cmsList[e];this.$set(t,"displayType",t.displayType?0:1),this.$emit("componentChange",t.sort)}}}),Vt=Ht,zt=Vt,Gt=(i("82e5"),D(zt,r,a,!1,null,"1bbefdf6",null)),Jt=Gt.exports;const Wt=[Jt],Xt=function(e){Xt.installed||Wt.map(t=>e.component(t.name,t))};var Yt={install:Xt};t["default"]=Yt},fbac:function(e,t,i){},fc6a:function(e,t,i){"use strict";var s=i("44ad"),n=i("1d80");e.exports=function(e){return s(n(e))}},fda2:function(e,t,i){},fdbf:function(e,t,i){"use strict";var s=i("04f8");e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},ff60:function(e,t,i){},ffdf:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a}));var s=i("be09"),n=i.n(s),r=function(t){return n.a.atob?n.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=r(e),i=new Uint8Array(t.length),s=0;s<t.length;s++)i[s]=t.charCodeAt(s);return i}}).call(this,i("b639").Buffer)}});
30
+ /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */const s=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],s=t[4],n=i[4];let r,a,o;const l=[],d=[];let u,c,h,p,f,m;for(r=0;r<256;r++)d[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!s[a];a^=u||1,o=d[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,s[a]=p,n[p]=a,h=l[c=l[u=l[a]]],m=16843009*h^65537*c^257*u^16843008*a,f=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=f=f<<24^f>>>8,i[r][p]=m=m<<24^m>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e};let n=null;class r{constructor(e){let t,i,r;n||(n=s()),this._tables=[[n[0][0].slice(),n[0][1].slice(),n[0][2].slice(),n[0][3].slice(),n[0][4].slice()],[n[1][0].slice(),n[1][1].slice(),n[1][2].slice(),n[1][3].slice(),n[1][4].slice()]];const a=this._tables[0][4],o=this._tables[1],l=e.length;let d=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");const u=e.slice(0),c=[];for(this._key=[u,c],t=l;t<4*l+28;t++)r=u[t-1],(t%l===0||8===l&&t%l===4)&&(r=a[r>>>24]<<24^a[r>>16&255]<<16^a[r>>8&255]<<8^a[255&r],t%l===0&&(r=r<<8^r>>>24^d<<24,d=d<<1^283*(d>>7))),u[t]=u[t-l]^r;for(i=0;t;i++,t--)r=u[3&i?t:t-4],c[i]=t<=4||i<4?r:o[0][a[r>>>24]]^o[1][a[r>>16&255]]^o[2][a[r>>8&255]]^o[3][a[255&r]]}decrypt(e,t,i,s,n,r){const a=this._key[1];let o,l,d,u=e^a[0],c=s^a[1],h=i^a[2],p=t^a[3];const f=a.length/4-2;let m,g=4;const y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)o=v[u>>>24]^b[c>>16&255]^_[h>>8&255]^T[255&p]^a[g],l=v[c>>>24]^b[h>>16&255]^_[p>>8&255]^T[255&u]^a[g+1],d=v[h>>>24]^b[p>>16&255]^_[u>>8&255]^T[255&c]^a[g+2],p=v[p>>>24]^b[u>>16&255]^_[c>>8&255]^T[255&h]^a[g+3],g+=4,u=o,c=l,h=d;for(m=0;m<4;m++)n[(3&-m)+r]=S[u>>>24]<<24^S[c>>16&255]<<16^S[h>>8&255]<<8^S[255&p]^a[g++],o=u,u=c,c=h,h=p,p=o}}class a extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},l=function(e,t,i){const s=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),n=new r(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),l=new Int32Array(a.buffer);let d,u,c,h,p,f,m,g,y;for(d=i[0],u=i[1],c=i[2],h=i[3],y=0;y<s.length;y+=4)p=o(s[y]),f=o(s[y+1]),m=o(s[y+2]),g=o(s[y+3]),n.decrypt(p,f,m,g,l,y),l[y]=o(l[y]^d),l[y+1]=o(l[y+1]^u),l[y+2]=o(l[y+2]^c),l[y+3]=o(l[y+3]^h),d=p,u=f,c=m,h=g;return a};class d{constructor(e,t,s,n){const r=d.STEP,l=new Int32Array(e.buffer),u=new Uint8Array(e.byteLength);let c=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+r),t,s,u)),c=r;c<l.length;c+=r)s=new Uint32Array([o(l[c-4]),o(l[c-3]),o(l[c-2]),o(l[c-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+r),t,s,u));this.asyncStream_.push((function(){n(null,i(u))}))}static get STEP(){return 32e3}decryptChunk_(e,t,i,s){return function(){const n=l(e,t,i);s.set(n,e.byteOffset)}}}var u,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};u="undefined"!==typeof window?window:"undefined"!==typeof c?c:"undefined"!==typeof self?self:{};var h=u,p=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},f=h.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();const m=function(e){const t={};return Object.keys(e).forEach(i=>{const s=e[i];p(s)?t[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[i]=s}),t};self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new d(i,s,n,(function(e,i){self.postMessage(m({source:t.source,decrypted:i}),[i.buffer])}))}})));var Pd=Po(Ld);const Od=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Ad=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Dd=(e,t)=>{t.activePlaylistLoader=e,e.load()},Nd=(e,t)=>()=>{const{segmentLoaders:{[e]:i,main:s},mediaTypes:{[e]:n}}=t,r=n.activeTrack(),a=n.getActiveGroup(),o=n.activePlaylistLoader,l=n.lastGroup_;a&&l&&a.id===l.id||(n.lastGroup_=a,n.lastTrack_=r,Ad(i,n),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),Dd(a.playlistLoader,n)):o&&s.resetEverything()))},Md=(e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:s}}=t;s.lastGroup_=null,i.abort(),i.pause()},Rd=(e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:s,main:n},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,d=r.lastTrack_;if((!d||!a||d.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Ad(s,r),o)){if(o.isMainPlaylist){if(!a||!d||a.id===d.id)return;const e=t.vhs.playlistController_,s=e.selectPlaylist();if(e.media()===s)return;return r.logger_(`track change. Switching main audio from ${d.id} to ${a.id}`),i.pause(),n.resetEverything(),void e.fastQualityChange_(s)}if("AUDIO"===e){if(!o.playlistLoader)return n.setAudio(!0),void n.resetEverything();s.setAudio(!0),n.setAudio(!1)}l!==o.playlistLoader?(s.track&&s.track(a),s.resetEverything(),Dd(o.playlistLoader,r)):Dd(o.playlistLoader,r)}},Ud={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:s}=t,n=i.activeTrack(),r=i.activeGroup(),a=(r.filter(e=>e.default)[0]||r[0]).id,o=i.tracks[a];if(n!==o){Cr.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else s({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;Cr.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const s=i.activeTrack();s&&(s.mode="disabled"),i.onTrackChanged()}},Bd={AUDIO:(e,t,i)=>{if(!t)return;const{tech:s,requestOptions:n,segmentLoaders:{[e]:r}}=i;t.on("loadedmetadata",()=>{const e=t.media();r.playlist(e,n),(!s.paused()||e.endList&&"none"!==s.preload())&&r.load()}),t.on("loadedplaylist",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on("error",Ud[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:s,requestOptions:n,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",()=>{const e=t.media();r.playlist(e,n),r.track(a.activeTrack()),(!s.paused()||e.endList&&"none"!==s.preload())&&r.load()}),t.on("loadedplaylist",()=>{r.playlist(t.media(),n),s.paused()||r.load()}),t.on("error",Ud[e](e,i))}},jd={AUDIO:(e,t)=>{const{vhs:i,sourceType:s,segmentLoaders:{[e]:n},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:d}},mainPlaylistLoader:u}=t,c=va(u.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},c&&(a[e].main.default.playlists=u.main.playlists));for(const h in a[e]){o[h]||(o[h]=[]);for(const n in a[e][h]){let p,f=a[e][h][n];if(c?(d(`AUDIO group '${h}' label '${n}' is a main playlist`),f.isMainPlaylist=!0,p=null):p="vhs-json"===s&&f.playlists?new Fa(f.playlists[0],i,r):f.resolvedUri?new Fa(f.resolvedUri,i,r):f.playlists&&"dash"===s?new Co(f.playlists[0],i,r,u):null,f=Nr({id:n,playlistLoader:p},f),Bd[e](e,f.playlistLoader,t),o[h].push(f),"undefined"===typeof l[n]){const e=new Cr.AudioTrack({id:n,kind:Od(f),enabled:!1,language:f.language,default:f.default,label:n});l[n]=e}}}n.on("error",Ud[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:s,sourceType:n,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:d}},mainPlaylistLoader:u}=t;for(const c in o[e]){l[c]||(l[c]=[]);for(const r in o[e][c]){if(!s.options_.useForcedSubtitles&&o[e][c][r].forced)continue;let h,p=o[e][c][r];if("hls"===n)h=new Fa(p.resolvedUri,s,a);else if("dash"===n){const e=p.playlists.filter(e=>e.excludeUntil!==1/0);if(!e.length)return;h=new Co(p.playlists[0],s,a,u)}else"vhs-json"===n&&(h=new Fa(p.playlists?p.playlists[0]:p.resolvedUri,s,a));if(p=Nr({id:r,playlistLoader:h},p),Bd[e](e,p.playlistLoader,t),l[c].push(p),"undefined"===typeof d[r]){const e=i.addRemoteTextTrack({id:r,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:r},!1).track;d[r]=e}}}r.on("error",Ud[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[e]:{groups:n,tracks:r}}}=t;for(const a in s[e]){n[a]||(n[a]=[]);for(const t in s[e][a]){const o=s[e][a][t];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let d={label:t,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[d.instreamId]&&(d=Nr(d,l[d.instreamId])),void 0===d.default&&delete d.default,n[a].push(Nr({id:t},o)),"undefined"===typeof r[t]){const e=i.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;r[t]=e}}}}},Fd=(e,t)=>{for(let i=0;i<e.length;i++){if(ga(t,e[i]))return!0;if(e[i].playlists&&Fd(e[i].playlists,t))return!0}return!1},qd=(e,t)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[e]:{groups:n}}}=t,r=s.media();if(!r)return null;let a=null;r.attributes[e]&&(a=n[r.attributes[e]]);const o=Object.keys(n);if(!a)if("AUDIO"===e&&o.length>1&&va(t.main))for(let e=0;e<o.length;e++){const t=n[o[e]];if(Fd(t,r)){a=t;break}}else n.main?a=n.main:1===o.length&&(a=n[o[0]]);return"undefined"===typeof i?a:null!==i&&a&&a.filter(e=>e.id===i.id)[0]||null},$d={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if("showing"===i[e].mode||"hidden"===i[e].mode)return i[e];return null}},Hd=(e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null},Vd=e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{jd[t](t,e)});const{mediaTypes:t,mainPlaylistLoader:i,tech:s,vhs:n,segmentLoaders:{["AUDIO"]:r,main:a}}=e;["AUDIO","SUBTITLES"].forEach(i=>{t[i].activeGroup=qd(i,e),t[i].activeTrack=$d[i](i,e),t[i].onGroupChanged=Nd(i,e),t[i].onGroupChanging=Md(i,e),t[i].onTrackChanged=Rd(i,e),t[i].getActiveGroup=Hd(i,e)});const o=t.AUDIO.activeGroup();if(o){const e=(o.filter(e=>e.default)[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged();const i=t.AUDIO.getActiveGroup();i.playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(e=>t[e].onGroupChanging())});const l=()=>{t.AUDIO.onTrackChanged(),s.trigger({type:"usage",name:"vhs-audio-change"})};s.audioTracks().addEventListener("change",l),s.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),n.on("dispose",()=>{s.audioTracks().removeEventListener("change",l),s.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),s.clearTracks("audio");for(const d in t.AUDIO.tracks)s.audioTracks().addTrack(t.AUDIO.tracks[d])},zd=()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:ad,activeTrack:ad,getActiveGroup:ad,onGroupChanged:ad,onTrackChanged:ad,lastTrack_:null,logger_:Dr(`MediaGroups[${t}]`)}}),e};class Gd{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=Or(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(e=>[e.ID,e])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Jd extends Cr.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Gd,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Dr("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger("error");i.startsWith("data:")?this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1)):(this.steeringManifest.reloadUri=Or(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();this.request_=this.xhr_({uri:i},(e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders["retry-after"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}const s=JSON.parse(this.request_.responseText);this.assignSteeringProperties_(s),this.startTTLTimeout_()})}setProxyServerUrl_(e){const t=new n.a.URL(e),i=new n.a.URL(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(n.a.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new n.a.URL(e),i=this.getPathway(),s=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(s){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,s)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger("error");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const t=e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]},i=t(this.steeringManifest.priority);this.currentPathway!==i&&(this.currentPathway=i,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=n.a.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){n.a.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Gd}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(Or(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const Wd=10;let Xd;const Yd=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Kd=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Qd=function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:s,bufferLowWaterLine:n,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!s)return Cr.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${e&&e.id||"null"} -> ${s.id}`;if(!e)return l(d+" as current playlist is not set"),!0;if(s.id===e.id)return!1;const u=Boolean(jr(t,i).length);if(!e.endList)return u||"number"!==typeof e.partTargetDuration?(l(d+" as current playlist is live"),!0):(l(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const c=Wr(t,i),h=o?Eo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Eo.MAX_BUFFER_LOW_WATER_LINE;if(a<h)return l(`${d} as duration < max low water line (${a} < ${h})`),!0;const p=s.attributes.BANDWIDTH,f=e.attributes.BANDWIDTH;if(p<f&&(!o||c<r)){let e=`${d} as next bandwidth < current bandwidth (${p} < ${f})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${c} < ${r})`),l(e),!0}if((!o||p>f)&&c>=n){let e=`${d} as forwardBuffer >= bufferLowWaterLine (${c} >= ${n})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${f})`),l(e),!0}return l(`not ${d} as no switching criteria met`),!1};class Zd extends Cr.EventTarget{constructor(e){super();const{src:t,withCredentials:i,tech:s,bandwidth:r,externVhs:a,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:d,sourceType:u,cacheEncryptionKeys:c,bufferBasedABR:h,leastPixelDiffSelector:p,captionServices:f}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:m}=e;null!==m&&"undefined"!==typeof m||(m=1/0),Xd=a,this.bufferBasedABR=Boolean(h),this.leastPixelDiffSelector=Boolean(p),this.withCredentials=i,this.tech_=s,this.vhs_=s.vhs,this.sourceType_=u,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=m,this.enableLowInitialPlaylist=d,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:m,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=zd(),this.mediaSource=new n.a.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=Mr(),this.hasPlayed_=!1,this.syncController_=new kd(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new Pd,this.sourceUpdater_=new yd(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Id,this.keyStatusMap_=new Map;const g={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:f,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:r,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:c,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_="dash"===this.sourceType_?new Co(t,this.vhs_,Nr(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Fa(t,this.vhs_,Nr(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new rd(Nr(g,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new rd(Nr(g,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new Sd(Nr(g,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((e,t)=>{function i(){s.off("vttjserror",n),e()}function n(){s.off("vttjsloaded",i),t()}s.one("vttjsloaded",i),s.one("vttjserror",n),s.addWebVttScript_()})}),e);const y=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new Jd(this.vhs_.xhr,y),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),Yd.forEach(e=>{this[e+"_"]=Kd.bind(this,e)}),this.logger_=Dr("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const v="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(v,()=>{const e=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const s=this.media(),n=s&&(s.id||s.uri),r=e&&(e.id||e.uri);n&&n!==r&&(this.logger_(`switch media ${n} -> ${r} from ${t}`),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,s=this.contentSteeringController_.getPathway();if(i&&s){const t=i.length?i[0].playlists:i.playlists,n=t.filter(e=>e.attributes.serviceLocation===s);n.length&&this.mediaTypes_[e].activePlaylistLoader.media(n[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=n.a.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(n.a.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,s=Object.keys(i);let n;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||s.length&&i[s[0]];for(const t in e)if(e[t].default){n={label:t};break}}if(!n)return t;const r=[];for(const a in i)if(i[a][n.label]){const t=i[a][n.label];if(t.playlists&&t.playlists.length)r.push.apply(r,t.playlists);else if(t.uri)r.push(t);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const t=e.playlists[i];t.attributes&&t.attributes.AUDIO&&t.attributes.AUDIO===a&&r.push(t)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ma(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),Vd({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial");const i="vhs-json"===this.sourceType_&&this.initialMedia_.segments;if(!i)return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)}),this.mainPlaylistLoader_.on("error",()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;ma(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,"dash"===this.sourceType_&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const e=this.mainPlaylistLoader_.media();if("playlist-unchanged"===e.lastExcludeReason_)return;const t=this.stuckAtPlaylistEnd_(e);t&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let s=!0;const n=Object.keys(i.AUDIO);for(const r in i.AUDIO)for(const e in i.AUDIO[r]){const t=i.AUDIO[r][e];t.uri||(s=!1)}s&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Xd.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),s=this.bufferLowWaterLine(),n=this.bufferHighWaterLine(),r=this.tech_.buffered();return Qd({buffered:r,currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:n,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:Wd}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(()=>{this.tech_.setCurrentTime(this.tech_.currentTime())})}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let s=i;if(e.start){const n=e.start.timeOffset;s=n<0?Math.max(i+n,t.start(0)):Math.min(i,n)}this.trigger("firstplay"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();"undefined"!==typeof e&&"function"===typeof e.then&&e.then(null,e=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){const t=this.seekable();if(!t.length)return!1;const i=this.syncController_.getExpiredTime(e,this.duration());if(null===i)return!1;const s=Xd.Playlist.playlistEnd(e,i),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return s-n<=Ur;const a=r.end(r.length-1);return a-n<=Ur&&s-a<=Ur}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,n=s.filter(ua),r=1===n.length&&n[0]===e;if(1===s.length&&i!==1/0)return Cr.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(t)},i)}let t=!1;s.forEach(i=>{if(i===e)return;const s=i.excludeUntil;"undefined"!==typeof s&&s!==1/0&&(t=!0,delete i.excludeUntil)}),t&&(Cr.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=t.internal?this.logger_:Cr.log.warn,d=t.message?" "+t.message:"";l(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${d} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const u=o.targetDuration/2*1e3||5e3,c="number"===typeof o.lastRequest&&Date.now()-o.lastRequest<=u;return this.switchMedia_(o,"exclude",r||c)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],s="all"===e;(s||"main"===e)&&i.push(this.mainPlaylistLoader_);const n=[];(s||"audio"===e)&&n.push("AUDIO"),(s||"subtitle"===e)&&(n.push("CLOSED-CAPTIONS"),n.push("SUBTITLES")),n.forEach(e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),["main","audio","subtitle"].forEach(t=>{const s=this[t+"SegmentLoader_"];!s||e!==t&&"all"!==e||i.push(s)}),i.forEach(e=>t.forEach(t=>{"function"===typeof e[t]&&e[t]()}))}setCurrentTime(e){const t=jr(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Xd.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let t=this.mainPlaylistLoader_.media();if(!t)return;let i=this.syncController_.getExpiredTime(t,this.duration());if(null===i)return;const s=this.mainPlaylistLoader_.main,n=Xd.Playlist.seekable(t,i,Xd.Playlist.liveEdgeDelay(s,t));if(0===n.length)return;if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(t,this.duration()),null===i)return;if(e=Xd.Playlist.seekable(t,i,Xd.Playlist.liveEdgeDelay(s,t)),0===e.length)return}let r,a;this.seekable_&&this.seekable_.length&&(r=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>n.end(0)||n.start(0)>e.end(0)?this.seekable_=n:this.seekable_=Mr([[e.start(0)>n.start(0)?e.start(0):n.start(0),e.end(0)<n.end(0)?e.end(0):n.end(0)]]):this.seekable_=n,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===r&&this.seekable_.start(0)===a||(this.logger_(`seekable updated [${Hr(this.seekable_)}]`),this.tech_.trigger("seekablechanged"))}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=Xd.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const t=this.mediaTypes_[e].groups;for(const i in t)t[i].forEach(e=>{e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=yl(this.main(),t),s={},n=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=i.video||e.main.videoCodec||b["b"]),e.main.isMuxed&&(s.video+=","+(i.audio||e.main.audioCodec||b["a"])),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||n)&&(s.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||b["a"],e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const r=(e,t)=>e?Object(b["c"])(t):Object(b["g"])(t),a={};let o;if(["video","audio"].forEach((function(t){if(s.hasOwnProperty(t)&&!r(e[t].isFmp4,s[t])){const i=e[t].isFmp4?"browser":"muxer";a[i]=a[i]||[],a[i].push(s[t]),"audio"===t&&(o=i)}})),n&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;this.main().playlists.forEach(i=>{const s=i.attributes&&i.attributes.AUDIO;s===e&&i!==t&&(i.excludeUntil=1/0)}),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): "${s.audio}"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach(t=>{const i=(Object(b["h"])(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,n=(Object(b["h"])(s[t]||"")[0]||{}).type;i&&n&&i.toLowerCase()!==n.toLowerCase()&&e.push(`"${this.sourceUpdater_.codecs[t]}" -> "${s[t]}"`)}),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return s}{const e=Object.keys(a).reduce((e,t)=>(e&&(e+=", "),e+=`${t} does not support codec(s): "${a[t].join(",")}"`,e),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(i=>{const s=e[i];if(-1!==t.indexOf(s.id))return;t.push(s.id);const n=yl(this.main,s),r=[];!n.audio||Object(b["g"])(n.audio)||Object(b["c"])(n.audio)||r.push("audio codec "+n.audio),!n.video||Object(b["g"])(n.video)||Object(b["c"])(n.video)||r.push("video codec "+n.video),n.text&&"stpp.ttml.im1t"===n.text&&r.push("text codec "+n.text),r.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${r.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,s=ml(Object(b["h"])(e)),n=gl(s),r=s.video&&Object(b["h"])(s.video)[0]||null,a=s.audio&&Object(b["h"])(s.audio)[0]||null;Object.keys(i).forEach(e=>{const s=i[e];if(-1!==t.indexOf(s.id)||s.excludeUntil===1/0)return;t.push(s.id);const o=[],l=yl(this.mainPlaylistLoader_.main,s),d=gl(l);if(l.audio||l.video){if(d!==n&&o.push(`codec count "${d}" !== "${n}"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&Object(b["h"])(l.video)[0]||null,t=l.audio&&Object(b["h"])(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec "${e.type}" !== "${r.type}"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec "${t.type}" !== "${a.type}"`)}o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id}: ${o.join(" && ")}`))}})}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),xd(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Eo.GOAL_BUFFER_LENGTH,i=Eo.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Eo.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Eo.BUFFER_LOW_WATER_LINE,i=Eo.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Eo.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Eo.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?n:s)}bufferHighWaterLine(){return Eo.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Ul(this.inbandTextTracks_,"com.apple.streaming",this.tech_),Rl({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Ul(this.inbandTextTracks_,e,this.tech_),Dl({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const e=this.main(),t=this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering),i=()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const s of e.playlists){const e=s.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)};(t||i())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main(),i=t.playlists,s=new Set;let n=!1;Object.keys(i).forEach(t=>{const r=i[t],a=this.pathwayAttribute_(r),o=a&&e!==a,l=r.excludeUntil===1/0&&"content-steering"===r.lastExcludeReason_;l&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,n=!0);const d=!r.excludeUntil&&r.excludeUntil!==1/0,u=!s.has(r.id)&&o&&d;u&&(s.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_="content-steering",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(n=!0)}}),n&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main(),t=e.playlists,i=this.contentSteeringController_.currentPathwayClones,s=this.contentSteeringController_.nextPathwayClones,n=i&&i.size||s&&s.size;if(n){for(const[e,t]of i.entries()){const i=s.get(e);i||(this.mainPlaylistLoader_.updateOrDeleteClone(t),this.contentSteeringController_.excludePathway(e))}for(const[e,n]of s.entries()){const s=i.get(e);if(s)this.equalPathwayClones_(s,n)||(this.mainPlaylistLoader_.updateOrDeleteClone(n,!0),this.contentSteeringController_.addAvailablePathway(e));else{const i=t.filter(e=>e.attributes["PATHWAY-ID"]===n["BASE-ID"]);i.forEach(e=>{this.mainPlaylistLoader_.addClonePathway(n,e)}),this.contentSteeringController_.addAvailablePathway(e)}}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...s])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const i=e["URI-REPLACEMENT"].PARAMS,s=t["URI-REPLACEMENT"].PARAMS;for(const n in i)if(i[n]!==s[n])return!1;for(const n in s)if(i[n]!==s[n])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(i=>{const s=this.mainPlaylistLoader_.getKeyIdSet(i);s&&s.size&&s.forEach(s=>{const n="usable",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===n,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${n}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${n}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,s=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&s&&(delete e.excludeUntil,Cr.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const i="string"===typeof e,s=i?e:bd(e),n=s.slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${n} added to the keyStatusMap`),this.keyStatusMap_.set(n,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const eu=(e,t,i)=>s=>{const n=e.main.playlists[t],r=da(n),a=ua(n);return"undefined"===typeof s?a:(s?delete n.disabled:n.disabled=!0,s===a||r||(i(),s?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),s)};class tu{constructor(e,t,i){const{playlistController_:s}=e,n=s.fastQualityChange_.bind(s);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=yl(s.main(),t),this.playlist=t,this.id=i,this.enabled=eu(e.playlists,t.id,n)}}const iu=function(e){e.representations=()=>{const t=e.playlistController_.main(),i=va(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(e=>!da(e)).map((t,i)=>new tu(e,t,t.id)):[]}},su=["seeking","seeked","pause","playing","error"];class nu{constructor(e){this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Dr("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),r=()=>this.resetTimeUpdate_(),a=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach(e=>{l[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},a[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),this.tech_.on(["seeked","seeking"],l[e].reset)});const d=e=>{["main","audio"].forEach(t=>{a[t+"SegmentLoader_"][e]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(su,r),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(su,r),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach(e=>{a[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),a[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),this.tech_.off(["seeked","seeking"],l[e].reset)}),this.checkCurrentTimeTimeout_&&n.a.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&n.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=n.a.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[e+"SegmentLoader_"],s=i.buffered_(),n=Gr(this[e+"Buffered_"],s);this[e+"Buffered_"]=s,n?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_(`found #${this[e+"StalledDownloads_"]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:zr(s)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),"subtitle"!==e&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0})))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Ur>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){const e=this.tech_.seeking();if(!e)return!1;const t=this.seekable(),i=this.tech_.currentTime(),s=this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let n;if(s){const e=t.end(t.length-1);n=e}if(this.beforeSeekableWindow_(t,i)){const e=t.start(0);n=e+(e===t.end(0)?0:Ur)}if("undefined"!==typeof n)return this.logger_(`Trying to seek outside of seekable at time ${i} with seekable range ${Hr(t)}. Seeking to `+n+"."),this.tech_.setCurrentTime(n),!0;const r=this.playlistController_.sourceUpdater_,a=this.tech_.buffered(),o=r.audioBuffer?r.audioBuffered():null,l=r.videoBuffer?r.videoBuffered():null,d=this.media(),u=d.partTargetDuration?d.partTargetDuration:2*(d.targetDuration-Rr),c=[o,l];for(let p=0;p<c.length;p++){if(!c[p])continue;const e=Wr(c[p],i);if(e<u)return!1}const h=Fr(a,i);return 0!==h.length&&(n=h.start(0)+Ur,this.logger_(`Buffered region starts (${h.start(0)}) just beyond seek point (${i}). Seeking to ${n}.`),this.tech_.setCurrentTime(n),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=jr(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) `+i),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered(),n=this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t});if(n)return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const r=Fr(s,t);return r.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${r.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,s=!1){if(!e.length)return!1;let n=e.end(e.length-1)+Ur;const r=!i.endList,a="number"===typeof i.partTargetDuration;return r&&(a||s)&&(n=e.end(e.length-1)+3*i.targetDuration),t>n}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let s;if(e.length&&t.length){const n=jr(e,i-3),r=jr(e,i),a=jr(t,i);a.length&&!r.length&&n.length&&(s={start:n.end(0),end:a.end(0)})}else{const t=Fr(e,i);t.length||(s=this.gapFromVideoUnderflow_(e,i))}return!!s&&(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time `+i),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),s=Fr(t,i);this.resetTimeUpdate_(),0!==s.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Rr),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}))}gapFromVideoUnderflow_(e,t){const i=qr(e);for(let s=0;s<i.length;s++){const e=i.start(s),n=i.end(s);if(t-e<4&&t-e>2)return{start:e,end:n}}return null}}const ru={errorInterval:30,getSource(e){const t=this.tech({IWillNotUseThisInPlugins:!0}),i=t.currentSource_||this.currentSource();return e(i)}},au=function(e,t){let i=0,s=0;const n=Nr(ru,t);e.ready(()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const r=function(){s&&e.currentTime(s)},a=function(t){null!==t&&void 0!==t&&(s=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",r),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-i<1e3*n.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(n.getSource&&"function"===typeof n.getSource)return i=Date.now(),n.getSource.call(e,a);Cr.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",r),e.off("error",o),e.off("dispose",l)},d=function(t){l(),au(e,t)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=d},ou=function(e){au(this,e)};var lu="3.10.0",du="7.0.2",uu="1.3.0",cu="7.1.0",hu="4.0.1";const pu={PlaylistLoader:Fa,Playlist:ba,utils:so,STANDARD_PLAYLIST_SELECTOR:Cl,INITIAL_PLAYLIST_SELECTOR:Il,lastBandwidthSelector:Cl,movingAverageBandwidthSelector:El,comparePlaylistBandwidth:Sl,comparePlaylistResolution:wl,xhr:za()};Object.keys(Eo).forEach(e=>{Object.defineProperty(pu,e,{get(){return Cr.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),Eo[e]},set(t){Cr.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),"number"!==typeof t||t<0?Cr.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):Eo[e]=t}})});const fu="videojs-vhs",mu=function(e,t){const i=t.media();let s=-1;for(let n=0;n<e.length;n++)if(e[n].id===i.id){s=n;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:"change"})},gu=function(e,t){t.representations().forEach(t=>{e.addQualityLevel(t)}),mu(e,t.playlists)};pu.canPlaySource=function(){return Cr.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const yu=(e,t,i)=>{if(!e)return e;let s={};t&&t.attributes&&t.attributes.CODECS&&(s=ml(Object(b["h"])(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const n=Object(b["e"])(s.video),r=Object(b["e"])(s.audio),a={};for(const o in e)a[o]={},r&&(a[o].audioContentType=r),n&&(a[o].videoContentType=n),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(a[o].pssh=t.contentProtection[o].pssh),"string"===typeof e[o]&&(a[o].url=e[o]);return Nr(e,a)},vu=(e,t)=>e.reduce((e,i)=>{if(!i.contentProtection)return e;const s=t.reduce((e,t)=>{const s=i.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[]),bu=({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:s})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const n=i?s.concat([i]):s,r=vu(n,Object.keys(t)),a=[],o=[];return r.forEach(t=>{o.push(new Promise((t,i)=>{e.tech_.one("keysessioncreated",t)})),a.push(new Promise((i,s)=>{e.eme.initializeMediaKeys({keySystems:t},e=>{e?s(e):i()})}))}),Promise.race([Promise.all(a),Promise.race(o)])},_u=({player:e,sourceKeySystems:t,media:i,audioMedia:s})=>{const n=yu(t,i,s);return!!n&&(e.currentSource().keySystems=n,!(n&&!e.eme)||(Cr.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Tu=()=>{if(!n.a.localStorage)return null;const e=n.a.localStorage.getItem(fu);if(!e)return null;try{return JSON.parse(e)}catch(t){return null}},Su=e=>{if(!n.a.localStorage)return!1;let t=Tu();t=t?Nr(t,e):e;try{n.a.localStorage.setItem(fu,JSON.stringify(t))}catch(i){return!1}return t},wu=e=>0===e.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(e.substring(e.indexOf(",")+1)):e,xu=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},Cu=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},Eu=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},ku=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};pu.supportsNativeHls=function(){if(!a.a||!a.a.createElement)return!1;const e=a.a.createElement("video");if(!Cr.getTech("Html5").isSupported())return!1;const t=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return t.some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),pu.supportsNativeDash=function(){return!!(a.a&&a.a.createElement&&Cr.getTech("Html5").isSupported())&&/maybe|probably/i.test(a.a.createElement("video").canPlayType("application/dash+xml"))}(),pu.supportsTypeNatively=e=>"hls"===e?pu.supportsNativeHls:"dash"===e&&pu.supportsNativeDash,pu.isSupported=function(){return Cr.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},pu.xhr.onRequest=function(e){xu(pu.xhr,e)},pu.xhr.onResponse=function(e){Cu(pu.xhr,e)},pu.xhr.offRequest=function(e){Eu(pu.xhr,e)},pu.xhr.offResponse=function(e){ku(pu.xhr,e)};const Iu=Cr.getComponent("Component");class Lu extends Iu{constructor(e,t,i){if(super(t,i.vhs),"number"===typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Dr("VhsHandler"),t.options_&&t.options_.playerId){const e=Cr.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(a.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],e=>{const t=a.a.fullscreenElement||a.a.webkitFullscreenElement||a.a.mozFullScreenElement||a.a.msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=Nr(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage="undefined"!==typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!==typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!==typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=Tu();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=Eo.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Eo.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(e=>{"undefined"!==typeof this.source_[e]&&(this.options_[e]=this.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=wu(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=pu,this.options_.sourceType=Object(_["a"])(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.playlistController_=new Zd(this.options_);const i=Nr({liveRangeSafeTimeDelta:Ur},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new nu(i),this.playlistController_.on("error",()=>{const e=Cr.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!==typeof t||t.code?"string"===typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});const s=this.options_.bufferBasedABR?pu.movingAverageBandwidthSelector(.55):pu.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=pu.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=n.a.navigator.connection||n.a.navigator.mozConnection||n.a.navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const s=1e3*t.downlink*1e3;e=s>=i&&e>=i?Math.max(e,s):s}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;t=this.throughput>0?1/this.throughput:0;const i=Math.floor(1/(e+t));return i},set(){Cr.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>zr(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>zr(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&Su({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{iu(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=n.a.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),bu({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=_u({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=Cr.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{gu(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{mu(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":lu,"mux.js":du,"mpd-parser":uu,"m3u8-parser":cu,"aes-decrypter":hu}}version(){return this.constructor.version()}canChangeType(){return yd.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&n.a.URL.revokeObjectURL&&(n.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return ho({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,s=2){return po({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{xu(this.xhr,e)},this.xhr.onResponse=e=>{Cu(this.xhr,e)},this.xhr.offRequest=e=>{Eu(this.xhr,e)},this.xhr.offResponse=e=>{ku(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}}const Pu={name:"videojs-http-streaming",VERSION:lu,canHandleSource(e,t={}){const i=Nr(Cr.options,t);return Pu.canPlayType(e.type,i)},handleSource(e,t,i={}){const s=Nr(Cr.options,i);return t.vhs=new Lu(e,t,s),t.vhs.xhr=za(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=Object(_["a"])(e);if(!i)return"";const s=Pu.getOverrideNative(t),n=pu.supportsTypeNatively(i),r=!n||s;return r?"maybe":""},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(Cr.browser.IS_ANY_SAFARI||Cr.browser.IS_IOS),{overrideNative:s=i}=t;return s}},Ou=()=>Object(b["c"])("avc1.4d400d,mp4a.40.2");Ou()&&Cr.getTech("Html5").registerSourceHandler(Pu,0),Cr.VhsHandler=Lu,Cr.VhsSourceHandler=Pu,Cr.Vhs=pu,Cr.use||Cr.registerComponent("Vhs",pu),Cr.options.vhs=Cr.options.vhs||{},Cr.getPlugin&&Cr.getPlugin("reloadSourceOnError")||Cr.registerPlugin("reloadSourceOnError",ou)}).call(this,i("c8ba"))},f106:function(e,t,i){"use strict";i("9faa")},f107:function(e,t,i){"use strict";i("6330")},f6b4:function(e,t,i){"use strict";var s=i("c532");function n(){this.handlers=[]}n.prototype.use=function(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){s.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=n},f772:function(e,t,i){"use strict";var s=i("5692"),n=i("90e3"),r=s("keys");e.exports=function(e){return r[e]||(r[e]=n(e))}},f8a8:function(e,t,i){"use strict";i.d(t,"a",(function(){return L})),i.d(t,"b",(function(){return P}));var s,n=i("de66"),r=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"===typeof e?Object(n["h"])(e):e}),a=function(e){return Array.isArray(e)?e.map((function(e){return r(e)})):[r(e)]},o=function(e){e=Object(n["k"])(e);var t=[],i=0;while(e.length>i){var r=e[i],a=0,o=0;o++;var l=e[o];o++;while(128&l)a=(127&l)<<7,l=e[o],o++;a+=127&l;for(var d=0;d<s.length;d++){var u=s[d],c=u.id,h=u.parser;if(r===c){t.push(h(e.subarray(o,o+a)));break}}i+=a+o}return t};s=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var i=e[t.size];t.url=Object(n["c"])(e.subarray(t.size+1,t.size+1+i)),t.size+=i}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=o(e.subarray(t.size))||[],t}},{id:4,parser:function(e){var t={tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:o(e.subarray(13))};return t}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var l=function e(t,i,s){void 0===s&&(s=!1),i=a(i),t=Object(n["k"])(t);var r=[];if(!i.length)return r;var o=0;while(o<t.length){var l=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])>>>0,d=t.subarray(o+4,o+8);if(0===l)break;var u=o+l;if(u>t.length){if(s)break;u=t.length}var c=t.subarray(o+8,u);Object(n["a"])(d,i[0])&&(1===i.length?r.push(c):r.push.apply(r,e(c,i.slice(1),s))),o=u}return r},d={EBML:Object(n["k"])([26,69,223,163]),DocType:Object(n["k"])([66,130]),Segment:Object(n["k"])([24,83,128,103]),SegmentInfo:Object(n["k"])([21,73,169,102]),Tracks:Object(n["k"])([22,84,174,107]),Track:Object(n["k"])([174]),TrackNumber:Object(n["k"])([215]),DefaultDuration:Object(n["k"])([35,227,131]),TrackEntry:Object(n["k"])([174]),TrackType:Object(n["k"])([131]),FlagDefault:Object(n["k"])([136]),CodecID:Object(n["k"])([134]),CodecPrivate:Object(n["k"])([99,162]),VideoTrack:Object(n["k"])([224]),AudioTrack:Object(n["k"])([225]),Cluster:Object(n["k"])([31,67,182,117]),Timestamp:Object(n["k"])([231]),TimestampScale:Object(n["k"])([42,215,177]),BlockGroup:Object(n["k"])([160]),BlockDuration:Object(n["k"])([155]),Block:Object(n["k"])([161]),SimpleBlock:Object(n["k"])([163])},u=[128,64,32,16,8,4,2,1],c=function(e){for(var t=1,i=0;i<u.length;i++){if(e&u[i])break;t++}return t},h=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var r=c(e[t]),a=e.subarray(t,t+r);return i&&(a=Array.prototype.slice.call(e,t,t+r),a[0]^=u[r-1]),{length:r,value:Object(n["b"])(a,{signed:s}),bytes:a}},p=function e(t){return"string"===typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"===typeof t?Object(n["f"])(t):t},f=function(e){return Array.isArray(e)?e.map((function(e){return p(e)})):[p(e)]},m=function e(t,i,s){if(s>=i.length)return i.length;var r=h(i,s,!1);if(Object(n["a"])(t.bytes,r.bytes))return s;var a=h(i,s+r.length);return e(t,i,s+a.length+a.value+r.length)},g=function e(t,i){i=f(i),t=Object(n["k"])(t);var s=[];if(!i.length)return s;var r=0;while(r<t.length){var a=h(t,r,!1),o=h(t,r+a.length),l=r+a.length+o.length;127===o.value&&(o.value=m(a,t,l),o.value!==t.length&&(o.value-=l));var d=l+o.value>t.length?t.length:l+o.value,u=t.subarray(l,d);Object(n["a"])(i[0],a.bytes)&&(1===i.length?s.push(u):s=s.concat(e(u,i.slice(1))));var c=a.length+o.length+u.length;r+=c}return s},y=i("321f"),v=Object(n["k"])([0,0,0,1]),b=Object(n["k"])([0,0,1]),_=Object(n["k"])([0,0,3]),T=function(e){var t=[],i=1;while(i<e.length-2)Object(n["a"])(e.subarray(i,i+3),_)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var s=e.length-t.length,r=new Uint8Array(s),a=0;for(i=0;i<s;a++,i++)a===t[0]&&(a++,t.shift()),r[i]=e[a];return r},S=function(e,t,i,s){void 0===s&&(s=1/0),e=Object(n["k"])(e),i=[].concat(i);var r,a=0,o=0;while(a<e.length&&(o<s||r)){var l=void 0;if(Object(n["a"])(e.subarray(a),v)?l=4:Object(n["a"])(e.subarray(a),b)&&(l=3),l){if(o++,r)return T(e.subarray(r,a));var d=void 0;"h264"===t?d=31&e[a+l]:"h265"===t&&(d=e[a+l]>>1&63),-1!==i.indexOf(d)&&(r=a+l),a+=l+("h264"===t?1:2)}else a++}return e.subarray(0,0)},w=function(e,t,i){return S(e,"h264",t,i)},x=function(e,t,i){return S(e,"h265",t,i)},C={webm:Object(n["k"])([119,101,98,109]),matroska:Object(n["k"])([109,97,116,114,111,115,107,97]),flac:Object(n["k"])([102,76,97,67]),ogg:Object(n["k"])([79,103,103,83]),ac3:Object(n["k"])([11,119]),riff:Object(n["k"])([82,73,70,70]),avi:Object(n["k"])([65,86,73]),wav:Object(n["k"])([87,65,86,69]),"3gp":Object(n["k"])([102,116,121,112,51,103]),mp4:Object(n["k"])([102,116,121,112]),fmp4:Object(n["k"])([115,116,121,112]),mov:Object(n["k"])([102,116,121,112,113,116]),moov:Object(n["k"])([109,111,111,118]),moof:Object(n["k"])([109,111,111,102])},E={aac:function(e){var t=Object(y["a"])(e);return Object(n["a"])(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(y["a"])(e);return Object(n["a"])(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=g(e,[d.EBML,d.DocType])[0];return Object(n["a"])(t,C.webm)},mkv:function(e){var t=g(e,[d.EBML,d.DocType])[0];return Object(n["a"])(t,C.matroska)},mp4:function(e){return!E["3gp"](e)&&!E.mov(e)&&(!(!Object(n["a"])(e,C.mp4,{offset:4})&&!Object(n["a"])(e,C.fmp4,{offset:4}))||(!(!Object(n["a"])(e,C.moof,{offset:4})&&!Object(n["a"])(e,C.moov,{offset:4}))||void 0))},mov:function(e){return Object(n["a"])(e,C.mov,{offset:4})},"3gp":function(e){return Object(n["a"])(e,C["3gp"],{offset:4})},ac3:function(e){var t=Object(y["a"])(e);return Object(n["a"])(e,C.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];var t=0;while(t+188<e.length&&t<188){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=Object(y["a"])(e);return Object(n["a"])(e,C.flac,{offset:t})},ogg:function(e){return Object(n["a"])(e,C.ogg)},avi:function(e){return Object(n["a"])(e,C.riff)&&Object(n["a"])(e,C.avi,{offset:8})},wav:function(e){return Object(n["a"])(e,C.riff)&&Object(n["a"])(e,C.wav,{offset:8})},h264:function(e){return w(e,7,3).length},h265:function(e){return x(e,[32,33],3).length}},k=Object.keys(E).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);k.forEach((function(e){var t=E[e];E[e]=function(e){return t(Object(n["k"])(e))}}));var I=E,L=function(e){e=Object(n["k"])(e);for(var t=0;t<k.length;t++){var i=k[t];if(I[i](e))return i}return""},P=function(e){return l(e,["moof"]).length>0}},f97d:function(e,t){var i={"":!0,up:!0};function s(e){if("string"!==typeof e)return!1;var t=i[e.toLowerCase()];return!!t&&e.toLowerCase()}function n(e){return"number"===typeof e&&e>=0&&e<=100}function r(){var e=100,t=3,i=0,r=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!==typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=s(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):l=t}}})}e.exports=r},fb15:function(e,t,i){"use strict";if(i.r(t),i.d(t,"cms",(function(){return Jt})),"undefined"!==typeof window){var s=window.document.currentScript,n=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(i.p=n[1])}var r=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{ref:"cms"},[t("div",{class:["lay-wrap",{mobile:"mobile"==e.mode}],style:{width:("pc"==e.mode?1920:750)*e.ratio+"px"}},e._l(e.cmsList,(function(i){return t("div",{key:i.sort,staticClass:"lay-item"},[t("div",{staticClass:"layout-set",style:{width:i.attributeJson.layoutStyle&&2===i.attributeJson.layoutStyle.widthStyle.type?i.attributeJson.layoutStyle.widthStyle.width+"%":"100%",height:i.attributeJson.layoutStyle?Math.round(i.attributeJson.layoutStyle.height*e.ratio)+"px":"auto"}},[t(e.layOutObj[i.layoutType],e._g(e._b({ref:"layModule",refInFor:!0,tag:"component",attrs:{layOutData:i.attributeJson,sort:i.attributeJson.sort,ratio:e.ratio,mode:e.mode,moduleName:i.attributeJson.uniqueName,isVisualShow:e.isVisualShow,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,recordId:i.originalId?i.originalId:i.recordId,envUrl:e.envUrl,path:e.path,isClient:e.isClient},scopedSlots:e._u([{key:"customComponent",fn:function(t){return 3==i.layoutType?[e._t("customComponent",null,{attributeJson:t.attributeJson})]:void 0}},{key:"dgCustomComponent",fn:function(t){return[e._t("dgCustomComponent",null,{data:t.attributeJson})]}}],null,!0)},"component",e.$attrs,!1),e.$listeners))],1)])})),0)])},a=[],o=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"single-layout",style:e.layoutStyle},[t("div",{staticStyle:{width:"100%",height:"100%"}},[e._l(e.layOutData.componentList.filter(e=>e.type<=100),(function(i,s){return t("div",{key:s},[1==i.displayType?t(i.component,e._g(e._b({key:i.sort,ref:"singleComponent",refInFor:!0,tag:"component",style:{zIndex:s+1},attrs:{ratio:e.ratio,attributeJson:i.attributeJson,sortId:i.sort,recordId:e.recordId,sort:e.sort,envUrl:e.envUrl,isClient:e.isClient,stopReport:e.stopReport,extraCategory:e.extraCategory,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig}},"component",e.$attrs,!1),e.$listeners)):e._e()],1)})),t("div",[e._t("dgCustomComponent",null,{attributeJson:e.getCustom()})],2)],2)])},l=[],d=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"text-wrap entrance-con",style:[e.conStyle,e.animationInStyle],attrs:{"data-sensors-click":"","data-sensorsClick":e.attributeJson&&e.attributeJson.linkObj&&e.attributeJson.linkObj.jumpLinkType?"true":"false",id:`entrance_${e.recordId}_${e.sortId}`,name:`entrance_${e.recordId}_${e.sortId}`},on:{click:e.pageClick}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual&&e.visualNumber,expression:"isVisualShow && hasVisual && visualNumber"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber)}})]),t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{ data: tipReportData, envUrl }"}],ref:"text"+e.sortId,class:["text-con","text-con-"+e.sortId,e.animationInObj.type?e.enterClass:""],domProps:{innerHTML:e._s(e.attributeJson.label)}})])},u=[],c=(i("14d9"),i("fda2"),i("bc3a")),h=i.n(c);const p={json:"application/json;",form:"application/x-www-form-urlencoded;",html:"text/html;",file:"multipart/form-data",excel:"msexcel",xml:"application/xml",javascript:"application/x-javascript;charset=utf-8"},f={lang:"Accept-Language",contentType:"Content-Type"};function m(e){if(200===e.status){let t=e.data;return"0"===t.errorCode?t.data:e.data}}h.a.interceptors.response.use(m,e=>Promise.reject(e));class g{static async call(e,{method:t="get",headers:i={},body:s=null,responseType:n=null}={}){let r=e,a={method:t,url:r,responseType:n||"json",headers:i};"get"===t?a.params=s:a.data=s;const o=await h()(a).catch(e=>{e.response?console.error(e.response.status,e.response.data):e.request?console.error(e.request):console.error("Error",e.message?e.message:"")});return o}static get(e,{mask:t=!0,external:i=!1,headers:s={}}={}){return g.call(e,{headers:s,external:i,mask:t})}static postBody(e,{body:t={},language:i="zh-CN",module:s="",method:n="post",mask:r=!0,postData:a=!0,external:o=!1,headers:l={},compat:d}){return g.call(e,{module:s,method:n,headers:Object.assign(l,{[f.contentType]:p.json,common:{languageCode:i}}),body:t,postData:a,external:o,mask:r,compat:d})}}class y{getProductInfo(e,t,i){return g.postBody(e+"service-zuul/manage/search/plp/standard",{body:t,language:i})}getSortProductInfo(e,t,i){return g.postBody(e+"service-zuul/manage/search/cms/sort",{body:t,language:i})}dataSaveDecorationPageComponentEvent(e,t){return g.postBody(e+"service-zuul/data/collect/acquisition",{body:t})}acquisitionBatch(e,t){return g.postBody(e+"/service-zuul/data/collect/acquisitionBatch",{body:t})}}const v=new y;class b{constructor(){this.intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(_(e,this.intersectionObserver),this.intersectionObserver.unobserve(e.target))})}),this.interval&&(clearInterval(this.interval),this.interval=null),this.interval=T()}observe(e,t){e.setAttribute("report-data",JSON.stringify(t.value?t.value.data:null)),this.intersectionObserver.observe(e)}disconnect(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),sessionStorage.setItem("reportData","[]"),this.interval&&(clearInterval(this.interval),this.interval=null),this.isDestroy=!0)}static getInstance(e){return!this.isDestroy&&this.instance||(this.instance=new b),e&&(this.instance.envUrl=e.value?e.value.envUrl:this.instance.envUrl),this.instance}static resetIsDestroy(e){this.isDestroy=Boolean(e),this.isDestroy&&(this.instance=null)}}const _=function(e,t){const i=e.target,s=i.getAttribute("report-data");let n=JSON.parse(sessionStorage.getItem("reportData")||null)||[];"null"!=s&&"undefined"!=s?(n.push(s),sessionStorage.setItem("reportData",JSON.stringify(n))):t.unobserve(i)},T=function(){return setInterval(()=>{let e=JSON.parse(sessionStorage.getItem("reportData")||null)||[];e.length>0&&(sessionStorage.setItem("reportData","[]"),S(e))},1500)},S=function(e){let t=e.map(e=>w(e)),i=b.getInstance().envUrl;i&&v.acquisitionBatch(i,t)},w=function(e){let t=JSON.parse(e);const i={source:"",medium:"",commodity_id:t.popData&&t.popData.productCode||"",commodity_name:t.popData&&t.popData.selectDataShow||"",commodity_sku_id:"",component_name:t.uniqueName,component_id:t.uniqueId,component_type:t.componentType,hot_zone_id:t.popData&&t.popData.uniqueId||"",hot_zone_name:t.popData&&t.popData.uniqueName||"",material_id:t.materialId,material_name:t.materialName,url_path:t.path||"/",refer_info:t.refererPagePath,position:t.position,trigger_Method_Type:t.componentMethodType};let s="";return localStorage.getItem(t.brand+"Cookie")?s=localStorage.getItem(t.brand+"Cookie"):(s=`${parseInt((new Date).getTime())}${Math.floor(1e4*Math.random())}`,localStorage.setItem(t.brand+"Cookie",s)),{eventProperty:JSON.stringify({...i}),event:t.event,distinctId:s}};var x={bind(e,t){"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype&&(b.resetIsDestroy(),b.getInstance(t).observe(e,t))},unbind(){b.resetIsDestroy(!0),b.getInstance().disconnect()}};function C(e,t,i){const s=new y,n={source:"",medium:"",commodity_id:e.popData.productCode||"",commodity_name:e.popData.selectDataShow||"",commodity_sku_id:"",component_name:e.uniqueName,component_id:e.uniqueId,component_type:e.componentType,hot_zone_id:e.popData.uniqueId||"",hot_zone_name:e.popData.uniqueName||"",material_id:e.materialId,material_name:e.materialName,url_path:e.path,refer_info:e.refererPagePath,position:e.position,trigger_Method_Type:e.componentMethodType};let r="";localStorage.getItem(e.brand+"Cookie")?r=localStorage.getItem(e.brand+"Cookie"):(r=`${parseInt((new Date).getTime())}${Math.floor(1e4*Math.random())}`,localStorage.setItem(e.brand+"Cookie",r));let a={eventProperty:JSON.stringify({...n}),event:e.event,distinctId:r};if("click"==i||"exposure"==i)return a;s.dataSaveDecorationPageComponentEvent(t,a)}function E(e,t){var i=null,s=Date.now();return function(){var n=Date.now(),r=t-(n-s),a=this,o=arguments;clearTimeout(i),r<=0?(e.apply(a,o),s=Date.now()):i=setTimeout(e,r)}}function k(e){var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")}function I(){const e=/^.*((iPhone)|(iPad)|(Safari))+.*$/,t=navigator.userAgent,i={trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile/i)||!!t.match(/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1||t.indexOf("Mac")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1===t.indexOf("Safari")};return Boolean(e.test(t)&&(i.iPhone||i.iPad||i.ios))}const L={inheritAttrs:!1,props:{attributeJson:{type:Object,default:function(){}},sort:{type:Number,default:0},item:{type:Object,default:()=>{}},ratio:{type:Number,default:1},envUrl:{type:String,default:""},fontRatio:{type:Number,default:1},mode:{type:String,default:"pc"},language:{type:String,default:"zh-CN"},sortId:{type:Number,default:0},sort:{type:[String,Number],default:0},recordId:{type:[String,Number],default:0},refererPagePath:{type:String},brand:{type:String},path:{type:String},isClient:{type:Boolean,default:!0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null},carouselIndex:{type:Number,default:0}},data(){return{scrollHandle:E(this.scrollThrottle,200),hoverStyle:{},hoverStyleShow:!1,hoverImage:"",fillStyle:{},hoverDirection:"",finishAnimation:!1,entranceShow:!0,enterClass:"",animationInStyle:{},entranceAnimate:{fade:"animate__animated animate__fadeIn",scale:"animate__animated animate__zoomIn"}}},computed:{animationInObj:function(){return this.attributeJson.animationInObj},animationHoverObj:function(){return this.attributeJson.animationHoverObj},baseStyle(){return this.attributeJson.baseStyle},styleType(){return this.attributeJson.styleType},conStyle(){let{attributeJson:e,ratio:t}=this;return{width:Math.round(e.baseStyle.w*t)+"px",height:Math.round(e.baseStyle.h*t)+"px",left:Math.round(e.baseStyle.l*t)+"px",top:Math.round(e.baseStyle.t*t)+"px"}}},watch:{animationHoverObj:{handler(e){this.disposeHoverAnimate(e)},immediate:!0,deep:!0},animationInObj:{handler(){let{type:e,direction:t,delay:i,duration:s}=this.attributeJson.animationInObj;e&&(this.enterClass="",this.enterClass=this.entranceAnimate[e],this.animationInStyle={animationDuration:s+"s",amimationDelay:i+"s",animationName:"slide"!=e?this.entranceAnimate[e]:t,animationPlayState:"paused"})},immediate:!0}},methods:{isInCurrentScreenArea(){const{top:e}=this.$el.getBoundingClientRect();return e<=window.innerHeight-100},scrollThrottle(){this.isInCurrentScreenArea()&&!this.finishAnimation&&(this.animationInStyle.animationName&&(this.$el.style.animationPlayState="running"),this.finishAnimation=!0,this.endObserver())},startObserver(){window.addEventListener("scroll",this.scrollHandle,!0)},endObserver(){window.removeEventListener("scroll",this.scrollHandle,!0)},disposeHoverAnimate(e){let t={};if(2===e.type){let i=e.borderStyle;if(1==i.type&&(t={border:i.borderColor?"2px solid "+i.borderColor:"none"}),2==i.type){let{borderTop:e,borderRight:s,borderBottom:n,borderLeft:r}=i;t={borderTop:e?"2px solid "+e:"none",borderRight:s?"2px solid "+s:"none",borderBottom:n?"2px solid "+n:"none",borderLeft:r?"2px solid "+r:"none"}}}if(3===e.type&&(t={transform:"scale(1.2)",transformOrigin:"center center"}),4===e.type&&(this.hoverDirection=e.bgStyle.direction),5===e.type){let{hoverImgList:t}=e;this.hoverImage=t[0]?t[0].resourcePath:""}this.hoverStyle=t},onDrag:function(e,t){let i=this.ratio;this.attributeJson.baseStyle.l=e/i,this.attributeJson.baseStyle.t=t/i,this.$set(this.attributeJson,"baseStyle",this.attributeJson.baseStyle)},onResize:function(e,t,i,s){let n=this.ratio,r=this.attributeJson.baseStyle;r={w:i/n,h:s/n,l:e/n,t:t/n,isLocked:r.isLocked},this.$set(this.attributeJson,"baseStyle",r)},getRefLineParams(e){this.$emit("getRefLineParams",e)}},directives:{hoverAnimate:{inserted:function(e,t,i){e.onmouseover=function(){i.context.hoverStyleShow=!0,t.value&&(i.context[t.value.key]=t.value.value)},e.onmouseleave=function(){i.context.hoverStyleShow=!1,t.value&&(i.context[t.value.key]=-1)}}},treport:x}};var P={name:"textItem",mixins:[L],components:{},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1}},data(){return{sensorsIsRes:!1}},computed:{tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:12,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1,event:"bannerShow"}},visualNumber(){var e;let t=0;if((null===(e=this.visualData)||void 0===e?void 0:e.length)>0){let e=this.getMktIndex();this.visualData.forEach(i=>{let s=`${this.recordId}_${this.sort}`;Boolean("总和"!=i.date&&"快速总和"!=i.date&&s==i.module_id&&e==i.mkt_rank)&&(t+=i["坑位点击数据"]?i["坑位点击数据"]:0)})}return t}},methods:{getMktIndex(){var e,t,i,s,n,r,a,o,l,d,u,c,h,p,f,m;const g=null!==(e=this.extraCategory)&&void 0!==e&&e.category_index?(null===(t=this.cmsConfig)||void 0===t||null===(t=t.attributeJson)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&null!==(i=this.cmsConfig)&&void 0!==i&&null!==(i=i.attributeJson)&&void 0!==i&&null!==(i=i.list[Number((null===(s=this.extraCategory)||void 0===s?void 0:s.category_index)||1)-1])&&void 0!==i&&null!==(i=i.componentList)&&void 0!==i&&i.find(e=>e.sort===this.attributeJson.sort)?null===(n=this.cmsConfig)||void 0===n||null===(n=n.attributeJson)||void 0===n||null===(n=n.list[Number((null===(r=this.extraCategory)||void 0===r?void 0:r.category_index)||1)-1])||void 0===n||null===(n=n.componentList)||void 0===n?void 0:n.find(e=>e.sort===this.attributeJson.sort):(null===(a=this.cmsConfig)||void 0===a||null===(a=a.attributeJson)||void 0===a||null===(a=a.list)||void 0===a?void 0:a.length)>0&&null!==(o=this.cmsConfig)&&void 0!==o&&null!==(o=o.attributeJson)&&void 0!==o&&null!==(o=o.list[Number((null===(l=this.extraCategory)||void 0===l?void 0:l.category_index)||1)-1])&&void 0!==o&&null!==(o=o.componentList)&&void 0!==o&&o.find(e=>e.sort===this.attributeJson.sort)?null===(d=this.cmsConfig)||void 0===d||null===(d=d.attributeJson)||void 0===d||null===(d=d.list[Number((null===(u=this.extraCategory)||void 0===u?void 0:u.category_index)||1)-1])||void 0===d||null===(d=d.componentList)||void 0===d?void 0:d.find(e=>e.sort===this.attributeJson.sort):null:null!==(c=this.cmsConfig)&&void 0!==c&&null!==(c=c.attributeJson)&&void 0!==c&&null!==(c=c.componentList)&&void 0!==c&&c.find(e=>e.sort===this.attributeJson.sort)?this.cmsConfig.attributeJson.componentList.find(e=>e.sort===this.attributeJson.sort):null!==(h=this.cmsConfig)&&void 0!==h&&null!==(h=h.attributeJson)&&void 0!==h&&null!==(h=h.componentList)&&void 0!==h&&h.find(e=>e.sort===this.attributeJson.sort)?null===(p=this.cmsConfig)||void 0===p||null===(p=p.attributeJson)||void 0===p?void 0:p.componentList.find(e=>e.sort===this.attributeJson.sort):null;let y="";if("simplyText"===(null===g||void 0===g?void 0:g.component)||"textItem"===(null===g||void 0===g?void 0:g.component)||"buttonItem"===(null===g||void 0===g?void 0:g.component)){var v,b,_,T,S;y="";let e=[],t=[];var w,x;if(null!==(v=this.extraCategory)&&void 0!==v&&v.category_index&&(null===(b=this.cmsConfig)||void 0===b||null===(b=b.attributeJson)||void 0===b||null===(b=b.list)||void 0===b?void 0:b.length)>0&&(null===(_=this.cmsConfig)||void 0===_||null===(_=_.attributeJson)||void 0===_||null===(_=_.list[Number((null===(T=this.extraCategory)||void 0===T?void 0:T.category_index)||1)-1])||void 0===_||null===(_=_.componentList)||void 0===_?void 0:_.length)>0)null===(w=this.cmsConfig.attributeJson.list[Number((null===(x=this.extraCategory)||void 0===x?void 0:x.category_index)||1)-1])||void 0===w||w.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"===(null===i||void 0===i?void 0:i.component)&&1===(null===i||void 0===i?void 0:i.displayType)&&[1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)&&t.push(i.attributeJson):e.push(i.attributeJson)});else if((null===(S=this.cmsConfig)||void 0===S||null===(S=S.attributeJson)||void 0===S||null===(S=S.componentList)||void 0===S?void 0:S.length)>0){var C;null===(C=this.cmsConfig)||void 0===C||null===(C=C.attributeJson)||void 0===C||C.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)||t.push(i.attributeJson):e.push(i.attributeJson)})}"textItem"===(null===g||void 0===g?void 0:g.component)||"simplyText"===(null===g||void 0===g?void 0:g.component)?e.length>0&&(y=e.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):""):"buttonItem"===(null===g||void 0===g?void 0:g.component)&&t.length>0&&(y=t.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):"")}let E=y;return E=(E&&null!==(f=this.extraCategory)&&void 0!==f&&f.category_index?(null===(m=this.extraCategory)||void 0===m?void 0:m.category_index)+"-":"")+E,E},needSensorsRep(){},pageClick(){var e;if(this.isVisualShow)return;let t=JSON.parse(JSON.stringify(this.tipReportData));if(t.event="bannerClick",this.attributeJson.linkObj.jumpLinkType)try{let e=C(t,this.envUrl,"click"),i=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(l){console.error(l)}var i,s,n,r,a,o;null!==(e=this.attributeJson)&&void 0!==e&&null!==(e=e.linkObj)&&void 0!==e&&e.jumpLinkType&&this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:this.attributeJson,propsObject:C(JSON.parse(JSON.stringify(t)),this.envUrl,"click"),reportData:t,extraData:{isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",isSpecial:!0,noLabel:!0}});this.$emit("jumpLink",this.attributeJson.linkObj)}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},O=P,A=O;i("c57a");function D(e,t,i,s,n,r,a,o){var l,d="function"===typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=i,d._compiled=!0),s&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},d._ssrRegister=l):n&&(l=o?function(){n.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(d.functional){d._injectStyles=l;var u=d.render;d.render=function(e,t){return l.call(t),u(e,t)}}else{var c=d.beforeCreate;d.beforeCreate=c?[].concat(c,l):[l]}return{exports:e,options:d}}var N=D(A,d,u,!1,null,"ae5e700c",null),M=N.exports,R=M,U=function(){var e,t,i=this,s=i._self._c;i._self._setupProxy;return s("div",{directives:[{name:"onScroll",rawName:"v-onScroll",value:i.scrollMethod,expression:"scrollMethod"}],key:null!==(e=i.attributeJson)&&void 0!==e&&e.sort?i.attributeJson.sort:"",staticClass:"image-list entrance-con",style:{width:Math.ceil(i.attributeJson.baseStyle.w*i.ratio)+"px",height:Math.round(i.attributeJson.baseStyle.h*i.ratio)+"px",left:Math.round(i.attributeJson.baseStyle.l*i.ratio)+"px",top:Math.round(i.attributeJson.baseStyle.t*i.ratio)+"px",...i.animationInStyle}},[i.hasConfig?[s("div",{ref:"img"+(null!==(t=i.attributeJson)&&void 0!==t&&t.sort?i.attributeJson.sort:""),class:["image-warp","image-warp-"+i.sortId],style:{animationDuration:i.animationInObj.duration+"s"}},[i.isSwiper?s("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],style:[i.picStyle,3===i.animationHoverObj.type&&i.hoverStyleShow?i.hoverStyle:""]},[s("div",{ref:"swiper-container"+i.sortId,class:[`swiper-container swiper-container-${i.recordId}${i.sortId}`]},[s("div",{staticClass:"swiper-wrapper",style:{height:(i.baseStyle.h-(i.hasScrollBar?30:0))*i.ratio+"px!important"}},i._l(i.attributeJson.list,(function(e,t){var n,r,a,o,l,d,u,c,h,p,f,m;return s("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:i.tipReportData(t),envUrl:i.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:e.id,ref:`${i.sortId}${t}`,refInFor:!0,staticClass:"swiper-slide",style:{width:i.baseStyle.w/4*i.ratio+"px"}},[s("div",{staticClass:"slide-con",style:{height:(i.baseStyle.h-(i.hasScrollBar?30:0))*i.ratio+"px"}},[s("img",{attrs:{src:(null===e||void 0===e||null===(n=e.picList)||void 0===n?void 0:n.length)>0&&null!==e&&void 0!==e&&null!==(r=e.picList[0])&&void 0!==r&&r.resourcePath?e.picList[0].resourcePath:"",alt:(null===e||void 0===e||null===(a=e.picList)||void 0===a?void 0:a.length)>0&&null!==e&&void 0!==e&&null!==(o=e.picList[0])&&void 0!==o&&o.resourceName?e.picList[0].resourceName.split(".")[0]:""}}),(null===e||void 0===e||null===(l=e.picList)||void 0===l?void 0:l.length)>0&&(null===e||void 0===e||null===(d=e.popList)||void 0===d?void 0:d.length)>0?[s("hotspot",i._g(i._b({ref:`hotspot${i.sortId}${t}`,refInFor:!0,attrs:{componentType:2,parentItem:i.attributeJson,item:e,ratio:i.ratio,path:i.path,envUrl:i.envUrl,sortId:i.sortId,recordId:i.recordId,laySort:i.sort,sort:i.sort,brand:i.brand,uniqueName:i.attributeJson.uniqueName,language:i.language,extraCategory:{isCategory:!(null===(u=i.extraCategory)||void 0===u||!u.isCategory)&&(null===(c=i.extraCategory)||void 0===c?void 0:c.isCategory),category_index:null!==(h=i.extraCategory)&&void 0!==h&&h.category_index?null===(p=i.extraCategory)||void 0===p?void 0:p.category_index:"",category_name:null!==(f=i.extraCategory)&&void 0!==f&&f.category_name?null===(m=i.extraCategory)||void 0===m?void 0:m.category_name:"",MKTIndex:""+(t+1),MKTName:i.attributeJson.list[t].uniqueName},isVisualShow:i.isVisualShow,moduleName:i.moduleName,hasVisual:i.hasVisual,visualData:i.visualData,cmsConfig:i.cmsConfig,stopReport:i.stopReport}},"hotspot",i.$attrs,!1),i.$listeners))]:i._e()],2)])})),0),i.hasSwiperButton?s("div",{class:`swiper-button-prev prev-${i.recordId}${i.sortId}`},[i._t("swiper-button-prev",(function(){return[2==i.indicatorType||3==i.indicatorType?s("div",[s("span",{staticClass:"cms2iconfont iconleft"})]):i._e()]}))],2):i._e(),i.hasSwiperButton?s("div",{class:`swiper-button-next next-${i.recordId}${i.sortId}`},[i._t("swiper-button-next",(function(){return[2==i.indicatorType||3==i.indicatorType?s("div",[s("span",{staticClass:"cms2iconfont iconright"})]):i._e()]}))],2):i._e(),i.hasScrollBar?s("div",{class:`swiper-scrollbar scrollbar-${i.recordId}${i.sortId}`}):i._e()]),2===i.animationHoverObj.type?s("div",{staticClass:"hover-con",style:[i.hoverStyle,{opacity:i.hoverStyleShow?1:0}]}):i._e()]):s("div",{class:["image-warp",3==i.styleType&&"pc"!=i.mode?"image-type3":""],style:[i.picStyle,3===i.animationHoverObj.type&&i.hoverStyleShow?i.hoverStyle:""]},i._l(i.attributeJson.list,(function(e,t){var n,r,a,o,l,d;return s("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:i.tipReportData(t),envUrl:i.envUrl},expression:"{data:tipReportData(index), envUrl}"}],key:t,ref:`${i.sortId}${t}`,refInFor:!0,staticClass:"image-item",style:[i.picItemStyle]},[s("img",{class:{contain:1!=i.styleType},attrs:{src:(null===e||void 0===e||null===(n=e.picList)||void 0===n?void 0:n.length)>0&&null!==e&&void 0!==e&&null!==(r=e.picList[0])&&void 0!==r&&r.resourcePath?e.picList[0].resourcePath:"",alt:(null===e||void 0===e||null===(a=e.picList)||void 0===a?void 0:a.length)>0&&null!==e&&void 0!==e&&null!==(o=e.picList[0])&&void 0!==o&&o.resourceName?e.picList[0].resourceName.split(".")[0]:""}}),2===i.animationHoverObj.type?s("div",{staticClass:"hover-con",style:[i.hoverStyle,{opacity:i.hoverStyleShow?1:0}]}):i._e(),5===i.animationHoverObj.type&&i.hoverImage&&i.hoverStyleShow?s("img",{staticClass:"hover-image",attrs:{src:i.hoverImage,alt:""}}):i._e(),(null===e||void 0===e||null===(l=e.picList)||void 0===l?void 0:l.length)>0&&(null===e||void 0===e||null===(d=e.popList)||void 0===d?void 0:d.length)>0?s("div",[s("hotspot",i._g(i._b({ref:`hotspot${i.sortId}${t}`,refInFor:!0,attrs:{isSpecial:!0,parentItem:i.attributeJson,item:e,ratio:i.ratio,path:i.path,brand:i.brand,envUrl:i.envUrl,sortId:i.sortId,sort:i.sort,recordId:i.recordId,componentType:2,uniqueName:i.attributeJson.uniqueName,language:i.language,extraCategory:i.extraCategory,isVisualShow:i.isVisualShow,moduleName:i.moduleName,hasVisual:i.hasVisual,visualData:i.visualData,cmsConfig:i.cmsConfig,stopReport:i.stopReport}},"hotspot",i.$attrs,!1),i.$listeners))],1):i._e()])})),0)])]:i._e()],2)},B=[],j=(i("13d5"),i("02a3")),F=i.n(j),q=(i("a7a3"),function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"pop-wrap",style:{left:e.item.left,top:e.item.top,width:e.item.realWidth*e.ratio+"px"||!1,height:e.item.realHeight*e.ratio+"px"||!1}},e._l(e.item.popList,(function(i,s){var n,r,a;return t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(s),envUrl:e.envUrl},expression:"{ data: tipReportData(index), envUrl }"}],key:s,ref:`${e.sortId}${s}`,refInFor:!0,class:["pop-item"],style:{width:i.width/750*100+"%",height:i.height/(e.item.height/e.proportion)*100+"%",left:i.left/750*100+"%",top:i.top/(e.item.height/e.proportion)*100+"%"},attrs:{"data-sensors-click":"","data-sensorsClick":i&&i.jumpLinkType?"true":"false",id:"pop_"+(e.recordId+"_"+e.sortId+"_"+((null===i||void 0===i||null===(n=i.uniqueId)||void 0===n||null===(n=n.split("_"))||void 0===n?void 0:n.length)>2?i.uniqueId.split("_")[2]:"")),name:"pop_"+(e.recordId+"_"+e.sortId+"_"+((null===i||void 0===i||null===(r=i.uniqueId)||void 0===r||null===(r=r.split("_"))||void 0===r?void 0:r.length)>2?i.uniqueId.split("_")[2]:""))},on:{click:function(t){return e.pageClick(i,s)}}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber(i,s))}})]),null!==i&&void 0!==i&&null!==(a=i.product)&&void 0!==a&&a.openHot?t("div",{staticClass:"product-hover",on:{mouseover:function(t){return e.mouseover(s)},mouseleave:e.mouseLeave}},[0!=i.product.initImage.length?t("div",{staticStyle:{"{\n fontsize":"0"}},[t("img",{attrs:{src:e.hoverIndex==s?i.product.hoverImage[0].resourcePath:i.product.initImage[0].resourcePath,alt:""}})]):e._e(),e.hoverIndex==s?t("div",{staticClass:"product-image"},[t("img",{attrs:{src:1==i.product.imageType?e.productImage[i.productCode]:i.product.productImage[0].resourcePath,alt:""}})]):e._e()]):e._e()])})),0)}),$=[],H={name:"hotspot",props:{isSpecial:{type:Boolean,default:!1},extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},parentItem:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}},width:{type:Number,default:0},height:{type:Number,default:0},ratio:{type:Number,default:1},envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},sortId:{type:Number,default:0},sort:{type:Number,default:0},recordId:{type:Number,default:0},brand:{type:String},componentType:{type:Number},refererPagePath:{type:String},path:{type:String},pathType:{type:Number},uniqueName:{type:String},language:{type:String,default:"zh-CN"},prePosition:{type:Number},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{hasSensorsReList:[],hotList:[],proportion:1,hoverIndex:1,preTotal:0,productImage:{},service:new y,extraData:null}},watch:{"item.width":{handler(e){this.proportion=e/750},deep:!0,immediate:!0},itemCodeList:{handler(e){this.getProductList(e)},immediate:!0,deep:!0}},computed:{itemCodeList(){let e=this.item.popList.filter(e=>{var t,i;return 1==(null===e||void 0===e?void 0:e.jumpLinkType)&&1==(null===e||void 0===e||null===(t=e.product)||void 0===t?void 0:t.imageType)&&(null===e||void 0===e||null===(i=e.product)||void 0===i?void 0:i.openHot)});return e.map(e=>e.productCode)},tipReportData(){let e=JSON.parse(JSON.stringify(this.item.popList));return function(t){var i,s;let n=e[t];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:0,popData:{productCode:n.productCode,selectDataShow:n.selectDataShow,uniqueName:n.uniqueName,uniqueId:this.recordId+"_"+this.sortId+"_"+((null===n||void 0===n||null===(i=n.uniqueId)||void 0===i||null===(i=i.split("_"))||void 0===i?void 0:i.length)>2?n.uniqueId.split("_")[2]:""),brand:1===this.pathType?"defaultPath":this.brand},materialId:null!==(s=this.item)&&void 0!==s&&s.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.preTotal+t+1,event:"bannerShow"}}},visualNumber(){return function(e,t){var i;let s=0;if((null===(i=this.visualData)||void 0===i?void 0:i.length)>0){let i=this.getMktIndex(e,t);this.visualData.forEach(e=>{let t=`${this.recordId}_${this.sort}`;Boolean("总和"!=e.date&&"快速总和"!=e.date&&t==e.module_id&&i==e.mkt_rank)&&(s+=e["坑位点击数据"]?e["坑位点击数据"]:0)})}return s}}},mounted(){this.hotList=JSON.parse(JSON.stringify(this.item.popList))},methods:{getMktIndex(e,t){var i,s;let n=JSON.parse(JSON.stringify(this.cmsConfig)),r="";if(this.isSpecial){var a,o,l,d,u;let t=[];var c,h;if(null!==(a=this.extraCategory)&&void 0!==a&&a.category_index&&(null===n||void 0===n||null===(o=n.attributeJson)||void 0===o||null===(o=o.list)||void 0===o?void 0:o.length)>0&&(null===n||void 0===n||null===(l=n.attributeJson)||void 0===l||null===(l=l.list[Number((null===(d=this.extraCategory)||void 0===d?void 0:d.category_index)||1)-1])||void 0===l||null===(l=l.componentList)||void 0===l?void 0:l.length)>0)null===(c=n.attributeJson.list[Number((null===(h=this.extraCategory)||void 0===h?void 0:h.category_index)||1)-1])||void 0===c||c.componentList.forEach(e=>{var i;"imgNav"===(null===e||void 0===e?void 0:e.component)&&(null===e||void 0===e||null===(i=e.attributeJson)||void 0===i||null===(i=i.list)||void 0===i?void 0:i.length)>0&&1===(null===e||void 0===e?void 0:e.displayType)&&e.attributeJson.list.forEach(e=>{var i,s;(null===e||void 0===e||null===(i=e.picList)||void 0===i?void 0:i.length)>0&&((null===(s=e.popList)||void 0===s?void 0:s.length)>0?e.popListFinal=JSON.parse(JSON.stringify(e.popList)):e.popListFinal=[{jumpLinkType:121,sort:e.sort,uniqueName:e.uniqueName}],t.push(e))})});else(null===n||void 0===n||null===(u=n.attributeJson)||void 0===u||null===(u=u.componentList)||void 0===u?void 0:u.length)>0&&n.attributeJson.componentList.forEach(e=>{var i;"imgNav"===(null===e||void 0===e?void 0:e.component)&&(null===e||void 0===e||null===(i=e.attributeJson)||void 0===i||null===(i=i.list)||void 0===i?void 0:i.length)>0&&1===(null===e||void 0===e?void 0:e.displayType)&&e.attributeJson.list.forEach(e=>{var i,s;(null===e||void 0===e||null===(i=e.picList)||void 0===i?void 0:i.length)>0&&((null===(s=e.popList)||void 0===s?void 0:s.length)>0?e.popListFinal=JSON.parse(JSON.stringify(e.popList)):e.popListFinal=[{jumpLinkType:121,sort:e.sort,uniqueName:e.uniqueName}],t.push(e))})});let i=[];t.forEach(e=>{i=i.concat(e.popListFinal)}),i=i.filter(e=>[1,2,5,121].includes(e.jumpLinkType)),t.length<1&&i.length<1||(e.hasOwnProperty("jumpLinkType")?(r=i.findIndex(t=>t.uniqueId===e.uniqueId),r=-1!==r?String(r+1):""):(r=i.findIndex(t=>t.sort===(null===e||void 0===e?void 0:e.sort)),r=-1!==r?String(r+1):""))}let p=null!==e&&void 0!==e&&e.jumpLinkType?this.isSpecial&&r?r:null!==(i=this.extraCategory)&&void 0!==i&&i.MKTIndex?`${this.extraCategory.MKTIndex}-${String(t+1)}`:String(t+1):"";return p=(p&&null!==(s=this.extraCategory)&&void 0!==s&&s.category_index?this.extraCategory.category_index+"-":"")+p,p},needSensorsRep(e){this.extraData=e,this.stopReport||this.scrollMethod(e)},scrollMethod(e){this.extraData=e,this.stopReport||this.$nextTick(()=>{var t;(null===(t=this.item)||void 0===t||null===(t=t.popList)||void 0===t?void 0:t.length)>0&&this.item.popList.forEach((t,i)=>{const s=this.$refs[`${this.sortId}${i}`];if(s&&s[0]){const n=document.documentElement.clientHeight,r=document.documentElement.clientWidth,a=s[0].getBoundingClientRect(),o=a.top||0,l=a.left||0;o<n&&o>=0&&l<r&&l>=0&&this.sensorsExposure(t,i,e)}})})},sensorsExposure(e,t,i){var s,n,r,a,o,l,d,u,c,h,p,f,m,g,y;if(this.extraData=i,this.hasSensorsReList.find(t=>JSON.stringify(t)==JSON.stringify(e)))return;const v={uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:1,popData:{...e,uniqueId:this.recordId+"_"+this.sortId+"_"+((null===e||void 0===e||null===(s=e.uniqueId)||void 0===s||null===(s=s.split("_"))||void 0===s?void 0:s.length)>2?e.uniqueId.split("_")[2]:""),brand:1===this.pathType?"defaultPath":this.brand},materialId:null!==(n=this.item)&&void 0!==n&&n.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.prePosition?this.prePosition+t+1:1*this.preTotal+t+1,event:"bannerShow"};this.$emit("sensorsCmsRepost",{initObject:this.parentItem,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(v)),this.envUrl,"exposure"),reportData:v,extraData:this.isSpecial?{isCategory:!(null===(r=this.extraCategory)||void 0===r||!r.isCategory)&&(null===(a=this.extraCategory)||void 0===a?void 0:a.isCategory),category_index:null!==(o=this.extraCategory)&&void 0!==o&&o.category_index?null===(l=this.extraCategory)||void 0===l?void 0:l.category_index:"",category_name:null!==(d=this.extraCategory)&&void 0!==d&&d.category_name?null===(u=this.extraCategory)||void 0===u?void 0:u.category_name:"",isSpecial:!0}:{isCategory:!(null===(c=this.extraCategory)||void 0===c||!c.isCategory)&&(null===(h=this.extraCategory)||void 0===h?void 0:h.isCategory),category_index:null!==(p=this.extraCategory)&&void 0!==p&&p.category_index?null===(f=this.extraCategory)||void 0===f?void 0:f.category_index:"",category_name:null!==(m=this.extraCategory)&&void 0!==m&&m.category_name?null===(g=this.extraCategory)||void 0===g?void 0:g.category_name:"",MKTIndex:null!==i&&void 0!==i&&i.MKTIndex?`${i.MKTIndex}-${String(t+1)}`:null!==(y=this.extraCategory)&&void 0!==y&&y.MKTIndex?`${this.extraCategory.MKTIndex}-${String(t+1)}`:String(t+1),MKTName:this.item.popList[t].uniqueName}}),this.hasSensorsReList.push(e)},pageClick(e,t){var i,s;if(this.isVisualShow)return;if(e.jumpLinkType)try{this.dataSend(e,t,1)}catch(b){console.error(b)}const n={uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:1,popData:{...e,uniqueId:this.recordId+"_"+this.sortId+"_"+((null===e||void 0===e||null===(i=e.uniqueId)||void 0===i||null===(i=i.split("_"))||void 0===i?void 0:i.length)>2?e.uniqueId.split("_")[2]:""),brand:1===this.pathType?"defaultPath":this.brand},materialId:null!==(s=this.item)&&void 0!==s&&s.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.prePosition?this.prePosition+t+1:1*this.preTotal+t+1,event:"bannerClick"};var r,a,o,l,d,u,c,h,p,f,m,g,y,v;null!==e&&void 0!==e&&e.jumpLinkType&&this.$emit("sensorsCmsRepost",{initObject:this.parentItem,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(n)),this.envUrl,"click"),reportData:n,extraData:this.isSpecial?{isCategory:!(null===(r=this.extraCategory)||void 0===r||!r.isCategory)&&(null===(a=this.extraCategory)||void 0===a?void 0:a.isCategory),category_index:null!==(o=this.extraCategory)&&void 0!==o&&o.category_index?null===(l=this.extraCategory)||void 0===l?void 0:l.category_index:"",category_name:null!==(d=this.extraCategory)&&void 0!==d&&d.category_name?null===(u=this.extraCategory)||void 0===u?void 0:u.category_name:"",isSpecial:!0}:{isCategory:!(null===(c=this.extraCategory)||void 0===c||!c.isCategory)&&(null===(h=this.extraCategory)||void 0===h?void 0:h.isCategory),category_index:null!==(p=this.extraCategory)&&void 0!==p&&p.category_index?null===(f=this.extraCategory)||void 0===f?void 0:f.category_index:"",category_name:null!==(m=this.extraCategory)&&void 0!==m&&m.category_name?null===(g=this.extraCategory)||void 0===g?void 0:g.category_name:"",MKTIndex:null!==(y=this.extraData)&&void 0!==y&&y.MKTIndex?`${this.extraData.MKTIndex}-${String(t+1)}`:null!==(v=this.extraCategory)&&void 0!==v&&v.MKTIndex?`${this.extraCategory.MKTIndex}-${String(t+1)}`:String(t+1),MKTName:this.item.popList[t].uniqueName}});this.$emit("jumpLink",e)},dataSend(e,t,i){var s,n;let r={uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.uniqueName,componentMethodType:i,popData:{...e,uniqueId:this.recordId+"_"+this.sortId+"_"+((null===e||void 0===e||null===(s=e.uniqueId)||void 0===s||null===(s=s.split("_"))||void 0===s?void 0:s.length)>2?e.uniqueId.split("_")[2]:""),brand:1===this.pathType?"defaultPath":this.brand},materialId:null!==(n=this.item)&&void 0!==n&&n.sort?this.recordId+"_"+this.item.sort:this.recordId+"_"+this.sortId,materialName:this.item.uniqueName?this.item.uniqueName:this.uniqueName,refererPagePath:this.refererPagePath,path:this.path,componentType:this.componentType,brand:this.brand,position:this.prePosition?this.prePosition+t+1:1*this.preTotal+t+1,event:0==i?"bannerShow":"bannerClick"};if(0==i)C(r,this.envUrl);else{let e=C(r,this.envUrl,"click"),t=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",t)}},getProductList(e){if(0==e.length)return;let t={itemCodeList:e,pageNum:1,pageSize:e.length},i={};this.service.getProductInfo(this.envUrl,t,this.language).then(e=>{e&&e.list&&(this.productList=e.list,e.list.forEach(e=>{i[e.code]=e.mainPicUrl}),this.productImage=i)})},mouseover(e){this.hoverIndex=e},mouseLeave(){this.hoverIndex=-1}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}},treport:x}},V=H,z=V,G=(i("8a8a"),D(z,q,$,!1,null,"c9fa21a4",null)),J=G.exports,W=J,X={name:"imgNav",mixins:[L],components:{hotspot:W},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1}},data(){return{hasSensorsReList:[],swiper:"",imageList:[],popList:[],positionList:[],positionTotal:[],hasInitSwiper:!1}},computed:{indicatorType(){return this.attributeJson.indicatorType},picStyle(){let{attributeJson:e,ratio:t,animationInObj:i}=this;return{animationDuration:i.duration+"s",padding:`0 ${e.paddingSpacing*t}px`,width:Math.ceil(e.baseStyle.w*t)+"px"}},picItemStyle(){let{attributeJson:e,ratio:t}=this,{oneLineCount:i}=e;return{width:Math.ceil((e.baseStyle.w*t-2*e.paddingSpacing*t)/i)+"px",height:Math.ceil(e.baseStyle.h*t)+"px",padding:"0 "+e.itemSpacing*t+"px"}},list(){return this.attributeJson.list},isSwiper(){return 3==this.styleType&&2==this.indicatorType&&"pc"==this.mode||2==this.styleType&&2==this.indicatorType&&"mobile"==this.mode},hasConfig(){return this.attributeJson.list.some(e=>0!=e.picList.length)},hasSwiperButton(){return 3==this.styleType&&2==this.indicatorType&&"pc"==this.mode},hasScrollBar(){return 2==this.styleType&&2==this.indicatorType&&"mobile"==this.mode},tipReportData(){let{list:e}=this,t=[],i=[];return e.forEach(e=>{0!=e.popList.length?t.push(e.popList.length):t.push(1)}),t.forEach((e,s)=>{let n=t.slice(0,s),r=n.reduce((e,t)=>e+t,0);i.push(r)}),this.positionList=t,this.positionTotal=i,function(t,i){let s=e[t];return 0==s.popList.length||i?{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:2,popData:{},materialId:this.recordId+"_"+this.sortId+"_"+s.sort,materialName:s.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:this.positionTotal[t]+1,event:"bannerShow"}:void 0}}},watch:{isSwiper:{handler(e){e&&this.initSwiper()},immediate:!0}},mounted(){},methods:{needSensorsRep(){this.stopReport||this.scrollMethod()},scrollMethod(){if(!this.stopReport)if(this.isSwiper){var e;const i=this.$refs[`swiper-container${this.recordId}${this.sortId}`];if(i&&(null===(e=this.attributeJson.list)||void 0===e?void 0:e.length)>0){var t;const e=4,s=null!==i&&void 0!==i&&null!==(t=i.swiper)&&void 0!==t&&t.realIndex?i.swiper.realIndex:0,n=0+e+s;let r=this.attributeJson.list.map((e,t)=>(e.pIndex=t,e)).slice(n-e,n);r.forEach(e=>{const t=this.$refs[`${this.sortId}${e.pIndex}`];if(t&&t[0]){const n=document.documentElement.clientHeight,r=document.documentElement.clientWidth,a=t[0].getBoundingClientRect(),o=a.top||0,l=a.left||0;if(o<n&&o>=0&&l<r&&l>=0){var i,s;const t=(null===(i=this.attributeJson.list[e.pIndex])||void 0===i||null===(i=i.popList)||void 0===i?void 0:i.length)>0&&(null===(s=this.attributeJson.list[e.pIndex])||void 0===s||null===(s=s.popList.filter(e=>[1,2,5].includes(e.jumpLinkType)))||void 0===s?void 0:s.length)>0?this.attributeJson.list[e.pIndex].popList.filter(e=>[1,2,5].includes(e.jumpLinkType)):[];if(t.length>0){const t=this.$refs[`hotspot${this.sortId}${e.pIndex}`];t&&t[0]&&t[0].needSensorsRep({MKTIndex:String(e.pIndex+1),MKTName:this.attributeJson.list[e.pIndex].uniqueName})}else this.sensorsExposure(e,e.pIndex)}}})}}else{var i;(null===(i=this.attributeJson)||void 0===i||null===(i=i.list)||void 0===i?void 0:i.length)>0&&this.attributeJson.list.forEach((e,t)=>{const i=this.$refs[`${this.sortId}${t}`];if(i&&i[0]){const r=document.documentElement.clientHeight,a=document.documentElement.clientWidth,o=i[0].getBoundingClientRect(),l=o.top||0,d=o.left||0;if(l<r&&l>=0&&d<a&&d>=0){var s,n;const i=(null===(s=this.attributeJson.list[t])||void 0===s||null===(s=s.popList)||void 0===s?void 0:s.length)>0&&(null===(n=this.attributeJson.list[t])||void 0===n||null===(n=n.popList.filter(e=>1==e.jumpLinkType||2==e.jumpLinkType))||void 0===n?void 0:n.length)>0?this.attributeJson.list[t].popList.filter(e=>1==e.jumpLinkType||2==e.jumpLinkType):[];if(i.length>0){const e=this.$refs[`hotspot${this.sortId}${t}`];e&&e[0]&&e[0].needSensorsRep({isSpecial:!0})}else this.sensorsExposure(e,t,!0)}}})}},sensorsExposure(e,t,i){var s,n,r,a,o,l,d,u,c,h,p,f;if(this.hasSensorsReList.find(t=>JSON.stringify(t)==JSON.stringify(e)))return;let m=JSON.parse(JSON.stringify(this.tipReportData(t,!0)));this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(m)),this.envUrl,"exposure"),reportData:m,extraData:i?{isCategory:!(null===(s=this.extraCategory)||void 0===s||!s.isCategory)&&(null===(n=this.extraCategory)||void 0===n?void 0:n.isCategory),category_index:null!==(r=this.extraCategory)&&void 0!==r&&r.category_index?null===(a=this.extraCategory)||void 0===a?void 0:a.category_index:"",category_name:null!==(o=this.extraCategory)&&void 0!==o&&o.category_name?null===(l=this.extraCategory)||void 0===l?void 0:l.category_name:"",isSpecial:!0}:{isCategory:!(null===(d=this.extraCategory)||void 0===d||!d.isCategory)&&(null===(u=this.extraCategory)||void 0===u?void 0:u.isCategory),category_index:null!==(c=this.extraCategory)&&void 0!==c&&c.category_index?null===(h=this.extraCategory)||void 0===h?void 0:h.category_index:"",category_name:null!==(p=this.extraCategory)&&void 0!==p&&p.category_name?null===(f=this.extraCategory)||void 0===f?void 0:f.category_name:"",MKTIndex:String(t+1),MKTName:this.attributeJson.list[t].uniqueName}}),this.hasSensorsReList.push(e)},initSwiper(){this.hasConfig&&this.isSwiper&&this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{attributeJson:e}=this;this.options={effect:"slide",autoplay:!1,slidesPerView:this.attributeJson.oneLineCount,spaceBetween:e.itemSpacing},this.hasSwiperButton&&(this.options.navigation={nextEl:`.next-${this.recordId}${this.sortId}`,prevEl:`.prev-${this.recordId}${this.sortId}`}),this.hasScrollBar&&(this.options.scrollbar={el:`.scrollbar-${this.recordId}${this.sortId}`,draggable:!0},this.options.freeMode=!0),this.swiper=new F.a(`.swiper-container-${this.recordId}${this.sortId}`,this.options)})}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},Y=X,K=Y,Q=(i("f106"),D(K,U,B,!1,null,"8f0eadc0",null)),Z=Q.exports,ee=Z,te=function(){var e,t,i=this,s=i._self._c;i._self._setupProxy;return s("div",{directives:[{name:"onScroll",rawName:"v-onScroll",value:i.scrollMethod,expression:"scrollMethod"}],staticClass:"video-wrap entrance-con",style:[i.conStyle,i.animationInStyle]},[0!==i.videoItem.length?s("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:i.tipReportData,envUrl:i.envUrl},expression:"{ data: tipReportData, envUrl }"}],ref:"videoItem"+i.sortId,class:["video-con","video-con-"+i.sortId,i.animationInObj.type?i.enterClass:""],style:{width:Math.round(i.attributeJson.baseStyle.w*i.ratio)+"px",height:Math.round(i.attributeJson.baseStyle.h*i.ratio)+"px"}},[s("myVideoPlayer",{ref:"VideoPlayer"+i.sortId,attrs:{sort:(new Date).getTime(),videoInfo:i.videoInfo,autoPlay:i.autoPlay,recordId:i.recordId,sortId:i.sortId,extraCategory:i.extraCategory,stopReport:i.stopReport,isVisualShow:i.isVisualShow,moduleName:i.moduleName,hasVisual:i.hasVisual,visualData:i.visualData,cmsConfig:i.cmsConfig}}),1===(null===(e=i.attributeJson)||void 0===e?void 0:e.isVideoHasHot)&&(null===(t=i.videoHotPic)||void 0===t?void 0:t.length)>0?s("div",{staticClass:"hot-image"},[s("img",{attrs:{src:i.videoHotPic[0].resourcePath,alt:""}}),s("hotspot",i._g(i._b({ref:"hotspot",attrs:{componentType:3,item:i.hotData,parentItem:i.attributeJson,ratio:i.ratio,envUrl:i.envUrl,language:i.language,recordId:i.recordId,sortId:i.sortId,path:i.path,brand:i.brand,uniqueName:i.attributeJson.uniqueName,extraCategory:i.extraCategory,stopReport:i.stopReport,isVisualShow:i.isVisualShow,moduleName:i.moduleName,hasVisual:i.hasVisual,visualData:i.visualData,cmsConfig:i.cmsConfig,sort:i.sort}},"hotspot",i.$attrs,!1),i.$listeners))],1):i._e()],1):i._e()])},ie=[],se=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticStyle:{height:"100%",position:"relative"},attrs:{id:"myVideo-"+e.sort}},[t("video",{ref:"myVideo-"+e.sort,staticClass:"video-js vjs-default-skin vjs-big-play-centered vjs-16-9 video-item",attrs:{preload:"auto","data-setup":"{}","x5-playsinline":"","x5-video-orientation":"landscape|portrait","x5-video-player-type":"h5","webkit-playsinline":"true",playsinline:"true",controls:e.videoInfo.checkedAttr.indexOf("controls")>-1,autoplay:e.autoPlay,loop:e.videoInfo.checkedAttr.indexOf("loop")>-1,poster:0!=e.videoInfo.list.length?e.videoInfo.list[0].imgUrl:""},domProps:{muted:e.muted}},[t("source",{attrs:{src:0!=e.videoInfo.list.length?e.videoInfo.list[0].resourcePath:""}})]),e.isPlay?e._e():t("div",{staticClass:"video-play-btn",attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:`video_${e.recordId}_${e.sortId}`,name:`video_${e.recordId}_${e.sortId}`},on:{click:e.clickVideo}},[t("img",{attrs:{src:i("8b3d"),alt:""}})])])},ne=[],re=i("f0e2"),ae={name:"videoPlayer",props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},videoInfo:{type:Object,default:()=>{}},autoPlay:{type:Boolean,default:!1},sort:{type:Number,default:0},recordId:{type:Number,default:0},sortId:{type:Number,default:0}},data(){return{isFirst:!0,isPlay:!1,muted:!0,prevent:!1,isDarg:!1}},watch:{autoPlay:{handler(e){this.player&&(e?this.player.play():this.player.pause())},immediate:!0}},mounted(){this.initVideo()},activated(){this.$nextTick(()=>{this.initVideo()})},methods:{initVideo(){let e=this;setTimeout(()=>{this.player=Object(re["a"])(this.$refs["myVideo-"+this.sort],{},(function(){this.on("play",()=>{e.isPlay=!0}),this.on("pause",()=>{e.isDarg||(e.isPlay=!1)})})),this.player.on("volumechange",()=>{if(this.prevent)return void(this.prevent=!1);let e=this.player.volume();this.muted=!(e>0)}),this.$nextTick(()=>{this.getProgress(),this.rewriteControlBar(),this.play()})},100)},rewriteControlBar(){var e=document.querySelector(`#myVideo-${this.sort} .vjs-control-bar`),t=document.createElement("div");t.className="videojs-cover-btn",t.onclick=this.clickVideo,e&&e.appendChild(t);var i=document.querySelector(`#myVideo-${this.sort} .vjs-volume-panel`),s=document.createElement("div");s.className="videojs-mute-btn",s.onclick=this.controlVolume,i&&i.appendChild(s)},getProgress(){let e=this.player.controlBar.progressControl.seekBar;e&&e.on(["mousedown","mouseup"],e=>{"mousedown"==e.type?this.isDarg=!0:"mouseup"==e.type&&this.isPlay&&(this.player.play(),this.isDarg=!1)});let t=document.querySelector(`#myVideo-${this.sort} .vjs-progress-control`);t&&(t.addEventListener("mousedown",()=>{this.isDarg=!0}),t.addEventListener("mouseup",()=>{this.isPlay&&(this.player.play(),this.isDarg=!1)}))},play(){0!=this.videoInfo.list.length&&this.autoPlay&&(this.player.muted(!0),this.player.play(),this.isPlay=!0)},clickVideo(){this.isPlay?this.player.pause():this.player.play()},controlVolume(){this.prevent=!0;let e=this.muted;e&&0==this.player.volume()&&this.player.volume(1),this.player.muted(!e),this.muted=!e}}},oe=ae,le=oe,de=(i("b9bf"),D(le,se,ne,!1,null,"8cd15470",null)),ue=de.exports,ce=ue,he={name:"videoItem",mixins:[L],components:{hotspot:W,myVideoPlayer:ce},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},attributeJson:{type:Object,default:function(){}},ratio:{type:Number,default:1,positionList:[]}},data(){return{sensorsIsRes:!1,autoPlay:!1}},watch:{"videoInfo.checkedAttr":{handler(e){this.autoPlay=e.indexOf("autoPlay")>-1},immediate:!0,deep:!0}},computed:{videoItem(){return this.attributeJson.videoInfo.list},videoHotPic(){return this.attributeJson.videoHotInfo.picList},videoHotPop(){return this.attributeJson.videoHotInfo.popList},videoInfo(){return this.attributeJson.videoInfo},hotData(){let{attributeJson:e}=this;return{popList:e.videoHotInfo.popList,width:e.videoHotInfo.picList[0].width,height:e.videoHotInfo.picList[0].height,realWidth:e.baseStyle.w,realHeight:e.baseStyle.h,top:0,left:0}},tipReportData(){return function(e){return 1!=this.attributeJson.isVideoHasHot||e?{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:3,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,event:"bannerShow",position:1}:void 0}}},methods:{needSensorsRep(){this.stopReport||this.scrollMethod()},scrollMethod(){this.stopReport||this.$nextTick(()=>{const e=this.$refs["videoItem"+this.sortId];if(e){const t=document.documentElement.clientHeight,i=document.documentElement.clientWidth,s=e.getBoundingClientRect(),n=s.top||0,r=s.left||0;n<t&&n>=0&&r<i&&r>=0&&this.sensorsExposure()}})},sensorsExposure(){var e,t,i,s,n,r;if(this.sensorsIsRes)return;let a=JSON.parse(JSON.stringify(this.tipReportData(!0)));this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:this.videoInfo,propsObject:C(JSON.parse(JSON.stringify(a)),this.envUrl,"exposure"),reportData:a,extraData:{isCategory:!(null===(e=this.extraCategory)||void 0===e||!e.isCategory)&&(null===(t=this.extraCategory)||void 0===t?void 0:t.isCategory),category_index:null!==(i=this.extraCategory)&&void 0!==i&&i.category_index?null===(s=this.extraCategory)||void 0===s?void 0:s.category_index:"",category_name:null!==(n=this.extraCategory)&&void 0!==n&&n.category_name?null===(r=this.extraCategory)||void 0===r?void 0:r.category_name:"",isNoMKT:!0}}),this.sensorsIsRes=!0}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},pe=he,fe=pe,me=(i("93d1"),D(fe,te,ie,!1,null,"489d43d9",null)),ge=me.exports,ye=ge,ve=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{directives:[{name:"onScroll",rawName:"v-onScroll",value:e.scrollMethod,expression:"scrollMethod"}],staticClass:"swiper-wrap",style:[e.conStyle,e.animationInStyle]},[e.hasSwiperItem||1===e.bgStyle.status&&0!=e.bgStyle.picList.length?t("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],class:["swiper-con","swiper-con-"+e.mode],style:{backgroundImage:0!=e.bgStyle.picList.length?`url(${e.bgStyle.picList[0].resourcePath})`:""}},[t("div",{staticClass:"entrance-con",style:{"--hoverColor":e.paginationStyle.hoverColor||e.paginationStyle.color,"--activeColor":e.paginationStyle.activeColor,"--color":e.paginationStyle.color,width:e.baseStyle.w*e.ratio+"px",height:e.baseStyle.h*e.ratio+"px"}},[t("div",{key:e.indicatorType,ref:"swiper"+e.attributeJson.sort,class:[`swiper-container swiper-container-${e.recordId}${e.sortId} swiper-container-${e.indicatorType}`,e.animationInObj.type?e.enterClass:""],style:{animationDuration:e.animationInObj.duration+"s"},attrs:{id:"mySwiper-"+e.sortId}},[t("div",{staticClass:"swiper-wrapper"},e._l(e.swiperList,(function(i,s){var n,r,a,o,l,d,u,c,h,p,f,m,g,y,v,b,_,T,S,w,x,C,E,k,I,L,P,O;return t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(s),envUrl:e.envUrl},expression:"{ data: tipReportData(index), envUrl }"}],key:i.sort+s,ref:""+(i.sort+s),refInFor:!0,class:["swiper-slide",{"slide-auto":e.isSpaceSwiper}]},[t("div",{staticClass:"swiper-width",style:{width:(e.baseStyle.w-(2==e.styleType?100:0))*e.ratio+"px!important",height:e.baseStyle.h*e.ratio+"px"}},[1===i.type?t("img",{attrs:{src:(null===i||void 0===i||null===(n=i.picList)||void 0===n?void 0:n.length)>0&&null!==i&&void 0!==i&&null!==(r=i.picList[0])&&void 0!==r&&r.resourcePath?i.picList[0].resourcePath:"",alt:(null===i||void 0===i||null===(a=i.picList)||void 0===a?void 0:a.length)>0&&null!==i&&void 0!==i&&null!==(o=i.picList[0])&&void 0!==o&&o.resourceName?i.picList[0].resourceName.split(".")[0]:""}}):e._e(),2===i.type?t("div",{staticClass:"video-player-con"},[t("myVideoPlayer",{ref:"VideoPlayer"+e.sortId,refInFor:!0,attrs:{recordId:e.recordId,sortId:e.sortId,sort:(new Date).getTime(),videoInfo:i.videoInfo,autoPlay:i.videoInfo.checkedAttr.indexOf("autoPlay")>-1&&e.activeIndex==s,extraCategory:{isCategory:!(null===(l=e.extraCategory)||void 0===l||!l.isCategory)&&(null===(d=e.extraCategory)||void 0===d?void 0:d.isCategory),category_index:null!==(u=e.extraCategory)&&void 0!==u&&u.category_index?null===(c=e.extraCategory)||void 0===c?void 0:c.category_index:"",category_name:null!==(h=e.extraCategory)&&void 0!==h&&h.category_name?null===(p=e.extraCategory)||void 0===p?void 0:p.category_name:"",MKTIndex:""+(s+1>e.swiperList.length/3?s+1>e.swiperList.length/3*2?s+1-e.swiperList.length/3*2:s+1-e.swiperList.length/3:s+1),MKTName:e.swiperList[s].uniqueName},isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,stopReport:!0}}),2==i.type&&1==i.isVideoHasHot&&0!=i.videoHotInfo.picList.length?t("div",{staticClass:"video-hot-image"},[t("img",{attrs:{src:(null===i||void 0===i||null===(f=i.videoHotInfo)||void 0===f||null===(f=f.picList)||void 0===f?void 0:f.length)>0&&null!==i&&void 0!==i&&null!==(m=i.videoHotInfo)&&void 0!==m&&null!==(m=m.picList[0])&&void 0!==m&&m.resourcePath?i.videoHotInfo.picList[0].resourcePath:"",alt:(null===i||void 0===i||null===(g=i.videoHotInfo)||void 0===g||null===(g=g.picList)||void 0===g?void 0:g.length)>0&&null!==i&&void 0!==i&&null!==(y=i.videoHotInfo)&&void 0!==y&&null!==(y=y.picList[0])&&void 0!==y&&y.resourceName?i.videoHotInfo.picList[0].resourceName.split(".")[0]:""}}),(null===i||void 0===i||null===(v=i.videoHotInfo)||void 0===v||null===(v=v.picList)||void 0===v?void 0:v.length)>0?t("div",{staticClass:"swiper-hot"},[t("hotspot",e._g(e._b({ref:`hotspot${e.sortId}${s}`,refInFor:!0,attrs:{parentItem:e.attributeJson,item:{realWidth:i.realWidth,realHeight:i.realHeight,popList:i.videoHotInfo.popList,width:i.videoHotInfo.picList[0].width,height:i.videoHotInfo.picList[0].height},componentType:1,ratio:e.ratio,uniqueName:e.attributeJson.uniqueName,envUrl:e.envUrl,sortId:e.sortId,laySort:e.sort,sort:e.sort,path:e.path,brand:e.brand,prePosition:e.positionTotal[i.i],recordId:e.recordId,extraCategory:{isCategory:!(null===(b=e.extraCategory)||void 0===b||!b.isCategory)&&(null===(_=e.extraCategory)||void 0===_?void 0:_.isCategory),category_index:null!==(T=e.extraCategory)&&void 0!==T&&T.category_index?null===(S=e.extraCategory)||void 0===S?void 0:S.category_index:"",category_name:null!==(w=e.extraCategory)&&void 0!==w&&w.category_name?null===(x=e.extraCategory)||void 0===x?void 0:x.category_name:"",MKTIndex:""+(s+1>e.swiperList.length/3?s+1>e.swiperList.length/3*2?s+1-e.swiperList.length/3*2:s+1-e.swiperList.length/3:s+1),MKTName:e.swiperList[s].uniqueName},isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,stopReport:e.stopReport}},"hotspot",e.$attrs,!1),e.$listeners))],1):e._e()]):e._e()],1):e._e(),1==(null===i||void 0===i?void 0:i.type)&&(null===i||void 0===i||null===(C=i.picList)||void 0===C?void 0:C.length)>0?[t("hotspot",e._g(e._b({ref:`hotspot${e.sortId}${s}`,refInFor:!0,attrs:{parentItem:e.attributeJson,item:i,ratio:e.ratio,componentType:1,uniqueName:e.attributeJson.uniqueName,path:e.path,envUrl:e.envUrl,sortId:e.sortId,brand:e.brand,prePosition:e.positionTotal[i.i],recordId:e.recordId,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,extraCategory:{isCategory:!(null===(E=e.extraCategory)||void 0===E||!E.isCategory)&&(null===(k=e.extraCategory)||void 0===k?void 0:k.isCategory),category_index:null!==(I=e.extraCategory)&&void 0!==I&&I.category_index?null===(L=e.extraCategory)||void 0===L?void 0:L.category_index:"",category_name:null!==(P=e.extraCategory)&&void 0!==P&&P.category_name?null===(O=e.extraCategory)||void 0===O?void 0:O.category_name:"",MKTIndex:""+(s+1>e.swiperList.length/3?s+1>e.swiperList.length/3*2?s+1-e.swiperList.length/3*2:s+1-e.swiperList.length/3:s+1),MKTName:e.swiperList[s].uniqueName},stopReport:e.stopReport,sort:e.sort}},"hotspot",e.$attrs,!1),e.$listeners))]:e._e()],2)])})),0),e.hasScrollBar?t("div",{staticClass:"swiper-scrollbar-own"},[t("div",{staticClass:"swiper-scrollbar-drag",style:{width:100/e.list.length+"%",left:(e.activeIndex>e.list.length?0:100/e.list.length*(e.activeIndex-1))+"%"}})]):e._e(),e.hasSwiperPagination?t("div",{staticClass:"swiper-pagination-custom"},e._l(e.list,(function(i,s){return t("span",{key:s,class:["pagination-custom-bullt",{"bullt-active":e.slideIndex==s}],attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:`pagination_${e.recordId}_${e.sortId}_${Number(s+1)}`,name:`pagination_${e.recordId}_${e.sortId}_${Number(s+1)}`},on:{click:function(t){return e.swiperSlide(s)}}})})),0):e._e(),e.hasSwiperButton?[t("div",{class:["swiper-button-prev",`prev-${e.recordId}${e.sortId}`]},[e._t("swiper-button-prev",(function(){return[2==e.indicatorType||3==e.indicatorType?t("div",[t("span",{staticClass:"cms2iconfont iconleft",style:e.pageStyle})]):e._e(),4==e.indicatorType?t("div",{staticClass:"arrow"},[t("span",{staticClass:"cms2iconfont iconarrow-left",style:e.pageStyle})]):e._e()]}))],2),t("div",{class:["swiper-button-next",`next-${e.recordId}${e.sortId}`]},[e._t("swiper-button-next",(function(){return[2==e.indicatorType||3==e.indicatorType?t("div",[t("span",{staticClass:"cms2iconfont iconright",style:e.pageStyle})]):e._e(),4==e.indicatorType?t("div",{staticClass:"arrow"},[t("span",{staticClass:"cms2iconfont iconarrow-right",style:e.pageStyle})]):e._e()]}))],2)]:e._e()],2)]),2===e.animationHoverObj.type?t("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.hoverStyleShow?1:0}]}):e._e()]):e._e()])},be=[];let _e=0;var Te={name:"swiperItem",mixins:[L],components:{hotspot:W,myVideoPlayer:ce},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},sortId:{type:Number}},data(){return{sleepTimer:null,hasSensorsReList:[],hasSwiperItem:!1,swiper:"",activeIndex:0,slideIndex:0,hasInitSwiper:!1,positionList:[],positionTotal:[]}},computed:{bgStyle(){return this.attributeJson.bgStyle},list(){return this.attributeJson.list},styleType(){return this.attributeJson.styleType},indicatorType(){return this.attributeJson.indicatorType},paginationStyle(){return this.attributeJson.paginationStyle},pageStyle(){return{color:this.attributeJson.paginationStyle.color}},hasSwiperPagination(){return 3==this.indicatorType},hasSwiperButton(){return 1!=this.indicatorType},hasScrollBar(){return"pc"==this.mode&&2==this.indicatorType},isSpaceSwiper(){return"mobile"==this.mode&&2==this.styleType},tipReportData(){let e=[],t=[];return this.list.forEach(t=>{1==t.type&&0!=t.popList.length||0!=t.videoHotInfo.popList.length?e.push(1==t.type?t.popList.length:t.videoHotInfo.popList.length):e.push(1)}),e.forEach((i,s)=>{let n=e.slice(0,s),r=n.reduce((e,t)=>e+t,0);t.push(r)}),this.positionList=e,this.positionTotal=t,function(e){let t=this.swiperList[e];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:1,popData:{},materialId:this.recordId+"_"+this.sortId+"_"+t.sort,materialName:t.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:this.positionTotal[e]+1,event:"bannerShow"}}}},mounted(){this.$nextTick(()=>{this.judgeSwiper()}),window.addEventListener("pageshow",e=>{this.pageshowListen(e)})},activated(){this.$nextTick(()=>{this.judgeSwiper()})},methods:{pageshowListen(e){var t;I()&&(e.persisted||2==(null===(t=window)||void 0===t||null===(t=t.performance)||void 0===t||null===(t=t.navigation)||void 0===t?void 0:t.type))&&this.$nextTick(()=>{this.judgeSwiper()})},needSensorsRep(e){this.stopReport||this.scrollMethod()},sleep(e){return new Promise(async t=>{clearTimeout(this.sleepTimer),this.sleepTimer=setTimeout(()=>{clearTimeout(this.sleepTimer),t("success")},e)})},scrollMethod(){this.stopReport||this.$nextTick(async()=>{var e;await this.sleep(100);const t=this.$refs["swiper"+this.attributeJson.sort];if(t&&(null===(e=this.swiperList)||void 0===e?void 0:e.length)>0){const e=t.swiper.realIndex;this.swiperList.forEach((t,i)=>{const s=this.$refs[""+(t.sort+i)];if(s&&s[0]&&e==i&&i<this.swiperList.length/3*2&&this.swiperList.length/3<=i){const e=document.documentElement.clientHeight,a=document.documentElement.clientWidth,o=s[0].getBoundingClientRect(),l=o.top||0,d=o.left||0;if(l<e&&l>=0&&d<a&&d>=0){var n,r;const e=(null===(n=this.swiperList[i])||void 0===n||null===(n=n.popList)||void 0===n?void 0:n.length)>0&&(null===(r=this.swiperList[i])||void 0===r||null===(r=r.popList.filter(e=>[1,2,5].includes(e.jumpLinkType)))||void 0===r?void 0:r.length)>0?this.swiperList[i].popList.filter(e=>[1,2,5].includes(e.jumpLinkType)):[];if(e.length>0&&1===this.swiperList[i].type){const e=this.$refs[`hotspot${this.sortId}${i}`];e&&e[0]&&e[0].needSensorsRep({MKTIndex:""+(i+1>this.swiperList.length/3?i+1>this.swiperList.length/3*2?i+1-this.swiperList.length/3*2:i+1-this.swiperList.length/3:i+1),MKTName:this.swiperList[i].uniqueName})}else this.sensorsExposure(t,i)}}})}})},sensorsExposure(e,t){var i,s,n,r,a,o;if(this.hasSensorsReList.find(t=>JSON.stringify(t)==JSON.stringify(e)))return;let l=JSON.parse(JSON.stringify(this.tipReportData(t)));this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(l)),this.envUrl,"exposure"),reportData:l,extraData:{isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",MKTIndex:(t+1>this.swiperList.length/3?t+1>this.swiperList.length/3*2?t+1-this.swiperList.length/3*2:t+1-this.swiperList.length/3:t+1)+"_1",MKTName:this.swiperList[t].uniqueName}}),this.hasSensorsReList.push(e)},judgeSwiper(){let e=this.attributeJson.list,t=e.findIndex(e=>0!=e.picList.length||0!=e.videoInfo.list.length);if(this.hasSwiperItem=t>-1,this.hasSwiperItem){e.forEach((e,t)=>{e.i=t});let t=JSON.parse(JSON.stringify(e));this.swiperList=e.concat(JSON.parse(JSON.stringify(t))),this.swiperList=t.concat(this.swiperList),this.scrollMethod(),this.initSwiper(!0)}},initSwiper:function(e){(this.hasSwiperItem||1===this.bgStyle.status&&0!=this.bgStyle.picList.length)&&this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{attributeJson:e}=this;this.options={effect:"slide",observer:!0,observeParents:!0,preventInteractionOnTransition:!0,autoplay:!!e.autoPlay&&{delay:1e3*e.interval,disableOnInteraction:!1,stopOnLastSlide:!1}},"mobile"==this.mode&&2==this.styleType&&(this.options.spaceBetween=10,this.options.loop=!1,this.options.slidesPerView="auto",this.options.centeredSlides=!0),this.hasSwiperButton&&(this.options.navigation={nextEl:`.next-${this.recordId}${this.sortId}`,prevEl:`.prev-${this.recordId}${this.sortId}`});let t=this,i=this.list.length;var s;(this.options.on={slideChangeTransitionEnd:function(){t.activeIndex=this.activeIndex,t.slideIndex=t.swiperList[this.activeIndex].i},slideNextTransitionEnd:function(){this.activeIndex==2*i&&this.slideTo(i,_e)},slidePrevTransitionEnd:function(){this.activeIndex==i-1&&this.slideTo(2*i-1,_e)},slideChange:function(){t.scrollMethod()}},this.swiper=new F.a(`.swiper-container-${this.recordId}${this.sortId}`,this.options),this.swiper)&&(this.swiper instanceof Array?(null===(s=this.swiper)||void 0===s?void 0:s.length)>0&&this.swiper[0].slideTo(i,_e):this.swiper.slideTo(i,_e))})},swiperSlide(e){var t;this.swiper&&(this.swiper instanceof Array?(null===(t=this.swiper)||void 0===t?void 0:t.length)>0&&this.swiper[0].slideTo(e,_e):this.swiper.slideTo(e,_e));this.slideIndex=e}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},Se=Te,we=Se,xe=(i("aeb2"),D(we,ve,be,!1,null,"773d61cf",null)),Ce=xe.exports,Ee=Ce,ke=function(){var e,t,i,s,n,r,a,o,l,d=this,u=d._self._c;d._self._setupProxy;return u("div",{staticClass:"button-wrap",style:[d.conStyle,d.animationInStyle]},[u("span",{directives:[{name:"show",rawName:"v-show",value:d.isVisualShow&&d.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[u("label",{domProps:{innerHTML:d._s(d.visualNumber)}})]),null!==(e=d.attributeJson)&&void 0!==e&&null!==(e=e.linkObj)&&void 0!==e&&e.jumpLinkType?[u("a",{directives:[{name:"createLoadLink",rawName:"v-createLoadLink",value:d.attributeJson.linkObj,expression:"attributeJson.linkObj"}],ref:"button"+d.attributeJson.sort,class:["button-cl","button-cl-"+d.sortId],attrs:{"data-sensors-click":"","data-sensorsClick":d.attributeJson&&d.attributeJson.linkObj&&d.attributeJson.linkObj.jumpLinkType?"true":"false",id:"button_"+(d.recordId+"_"+d.sortId),name:"button_"+(d.recordId+"_"+d.sortId)},on:{click:function(e){return e.preventDefault(),d.pageClick.apply(null,arguments)}}},[u("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:d.tipReportData,envUrl:d.envUrl},expression:"{ data: tipReportData, envUrl }"}],ref:"buttonItem"+d.sortId,staticClass:"button-content",class:[{flexCenterBetween:d.iconImage},4===d.animationHoverObj.type?d.hoverDirection:""],style:[d.buttonStyle,{"--width":d.hoverStyleShow?"100%":"0","--height":d.hoverStyleShow?"100%":"0","--bgColor":d.animationHoverObj.bgStyle.backgroundColor}]},[1===(null===(t=d.iconStyle)||void 0===t?void 0:t.type)&&1===(null===(i=d.iconStyle)||void 0===i?void 0:i.position)&&d.iconImage?u("img",{attrs:{src:d.iconImage,alt:""}}):d._e(),u("div",{staticClass:"label",style:d.buttonTextStyle},[d._v(d._s(d.attributeJson.label||"按钮"))]),1===(null===(s=d.iconStyle)||void 0===s?void 0:s.type)&&2===(null===(n=d.iconStyle)||void 0===n?void 0:n.position)&&d.iconImage?u("img",{attrs:{src:d.iconImage,alt:""}}):d._e(),5===d.animationHoverObj.type&&d.hoverImage&&d.hoverStyleShow?u("img",{staticClass:"hover-image",attrs:{src:d.hoverImage,alt:""}}):d._e()]),2===d.animationHoverObj.type?u("div",{staticClass:"hover-con",style:[d.hoverStyle,{opacity:d.hoverStyleShow?1:0,borderRadius:d.attributeJson.borderStyle.borderRadius+"px"}]}):d._e()])]:[u("div",{ref:"button"+d.attributeJson.sort,class:["button-cl","button-cl-"+d.sortId]},[u("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"},{name:"treport",rawName:"v-treport",value:{data:d.tipReportData,envUrl:d.envUrl},expression:"{ data: tipReportData, envUrl }"}],ref:"buttonItem"+d.sortId,staticClass:"button-content",class:[{flexCenterBetween:d.iconImage},4===d.animationHoverObj.type?d.hoverDirection:""],style:[d.buttonStyle,{"--width":d.hoverStyleShow?"100%":"0","--height":d.hoverStyleShow?"100%":"0","--bgColor":d.animationHoverObj.bgStyle.backgroundColor}]},[1===(null===(r=d.iconStyle)||void 0===r?void 0:r.type)&&1===(null===(a=d.iconStyle)||void 0===a?void 0:a.position)&&d.iconImage?u("img",{attrs:{src:d.iconImage,alt:""}}):d._e(),u("div",{staticClass:"label",style:d.buttonTextStyle},[d._v(d._s(d.attributeJson.label||"按钮"))]),1===(null===(o=d.iconStyle)||void 0===o?void 0:o.type)&&2===(null===(l=d.iconStyle)||void 0===l?void 0:l.position)&&d.iconImage?u("img",{attrs:{src:d.iconImage,alt:""}}):d._e(),5===d.animationHoverObj.type&&d.hoverImage&&d.hoverStyleShow?u("img",{staticClass:"hover-image",attrs:{src:d.hoverImage,alt:""}}):d._e()]),2===d.animationHoverObj.type?u("div",{staticClass:"hover-con",style:[d.hoverStyle,{opacity:d.hoverStyleShow?1:0,borderRadius:d.attributeJson.borderStyle.borderRadius+"px"}]}):d._e()])]],2)},Ie=[],Le={name:"buttonItem",mixins:[L],components:{},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1}},data(){return{iconImage:"",backgroundImage:"",hoverButtonStyle:{},sensorsIsRes:!1}},watch:{bgStyle:{handler(e){e&&e.picList&&0!=e.picList.length&&(this.backgroundImage=2===e.type?e.picList[0].resourcePath:"")},immediate:!0,deep:!0},iconStyle:{handler(e){e&&e.picList&&0!=e.picList.length&&(this.iconImage=1===e.type?e.picList[0].resourcePath:"")},immediate:!0,deep:!0}},computed:{iconStyle(){return this.attributeJson.iconStyle},bgStyle(){return this.attributeJson.bgStyle},buttonStyle(){let{bgStyle:e,fontStyle:t,borderStyle:i,space:s}=this.attributeJson,{borderTop:n,borderRight:r,borderBottom:a,borderLeft:o,borderColor:l}=i,d="mobile"==this.mode?2*this.ratio:this.ratio,u={fontSize:parseFloat(t.fontSize)*d+"px",color:t.color,backgroundColor:1===e.type?e.backgroundColor:"",fontWeight:t.fontWeight?"bold":"",textDecoration:t.textDecoration?"underline":"",fontStyle:t.fontItalic?"italic":"",borderRadius:i.borderRadius+"px",backgroundImage:`url('${this.backgroundImage}')`,paddingLeft:s.left+"px",paddingRight:s.right+"px"};return 1===i.type&&l&&(u.border="1px solid "+l),2===i.type&&(u.borderTop=n?"1px solid "+n:"none",u.borderRight=r?"1px solid "+r:"none",u.borderBottom=a?"1px solid "+a:"none",u.borderLeft=o?"1px solid "+o:"none"),u},buttonTextStyle(){return{color:this.attributeJson.fontStyle.color,"--hoverColor":this.attributeJson.fontStyle.hoverObj.color||this.attributeJson.fontStyle.color}},tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:17,popData:{},refererPagePath:this.refererPagePath,path:this.path,brand:this.brand,position:1,event:"bannerShow"}},visualNumber(){var e;let t=0;if((null===(e=this.visualData)||void 0===e?void 0:e.length)>0){let e=this.getMktIndex();this.visualData.forEach(i=>{let s=`${this.recordId}_${this.sort}`;Boolean("总和"!=i.date&&"快速总和"!=i.date&&s==i.module_id&&e==i.mkt_rank)&&(t+=i["坑位点击数据"]?i["坑位点击数据"]:0)})}return t}},methods:{getMktIndex(){var e,t,i,s,n,r,a,o,l,d,u,c,h,p,f,m;const g=null!==(e=this.extraCategory)&&void 0!==e&&e.category_index?(null===(t=this.cmsConfig)||void 0===t||null===(t=t.attributeJson)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&null!==(i=this.cmsConfig)&&void 0!==i&&null!==(i=i.attributeJson)&&void 0!==i&&null!==(i=i.list[Number((null===(s=this.extraCategory)||void 0===s?void 0:s.category_index)||1)-1])&&void 0!==i&&null!==(i=i.componentList)&&void 0!==i&&i.find(e=>e.sort===this.attributeJson.sort)?null===(n=this.cmsConfig)||void 0===n||null===(n=n.attributeJson)||void 0===n||null===(n=n.list[Number((null===(r=this.extraCategory)||void 0===r?void 0:r.category_index)||1)-1])||void 0===n||null===(n=n.componentList)||void 0===n?void 0:n.find(e=>e.sort===this.attributeJson.sort):(null===(a=this.cmsConfig)||void 0===a||null===(a=a.attributeJson)||void 0===a||null===(a=a.list)||void 0===a?void 0:a.length)>0&&null!==(o=this.cmsConfig)&&void 0!==o&&null!==(o=o.attributeJson)&&void 0!==o&&null!==(o=o.list[Number((null===(l=this.extraCategory)||void 0===l?void 0:l.category_index)||1)-1])&&void 0!==o&&null!==(o=o.componentList)&&void 0!==o&&o.find(e=>e.sort===this.attributeJson.sort)?null===(d=this.cmsConfig)||void 0===d||null===(d=d.attributeJson)||void 0===d||null===(d=d.list[Number((null===(u=this.extraCategory)||void 0===u?void 0:u.category_index)||1)-1])||void 0===d||null===(d=d.componentList)||void 0===d?void 0:d.find(e=>e.sort===this.attributeJson.sort):null:null!==(c=this.cmsConfig)&&void 0!==c&&null!==(c=c.attributeJson)&&void 0!==c&&null!==(c=c.componentList)&&void 0!==c&&c.find(e=>e.sort===this.attributeJson.sort)?this.cmsConfig.attributeJson.componentList.find(e=>e.sort===this.attributeJson.sort):null!==(h=this.cmsConfig)&&void 0!==h&&null!==(h=h.attributeJson)&&void 0!==h&&null!==(h=h.componentList)&&void 0!==h&&h.find(e=>e.sort===this.attributeJson.sort)?null===(p=this.cmsConfig)||void 0===p||null===(p=p.attributeJson)||void 0===p?void 0:p.componentList.find(e=>e.sort===this.attributeJson.sort):null;let y="";if("simplyText"===(null===g||void 0===g?void 0:g.component)||"textItem"===(null===g||void 0===g?void 0:g.component)||"buttonItem"===(null===g||void 0===g?void 0:g.component)){var v,b,_,T,S;y="";let e=[],t=[];var w,x;if(null!==(v=this.extraCategory)&&void 0!==v&&v.category_index&&(null===(b=this.cmsConfig)||void 0===b||null===(b=b.attributeJson)||void 0===b||null===(b=b.list)||void 0===b?void 0:b.length)>0&&(null===(_=this.cmsConfig)||void 0===_||null===(_=_.attributeJson)||void 0===_||null===(_=_.list[Number((null===(T=this.extraCategory)||void 0===T?void 0:T.category_index)||1)-1])||void 0===_||null===(_=_.componentList)||void 0===_?void 0:_.length)>0)null===(w=this.cmsConfig.attributeJson.list[Number((null===(x=this.extraCategory)||void 0===x?void 0:x.category_index)||1)-1])||void 0===w||w.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"===(null===i||void 0===i?void 0:i.component)&&1===(null===i||void 0===i?void 0:i.displayType)&&[1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)&&t.push(i.attributeJson):e.push(i.attributeJson)});else if((null===(S=this.cmsConfig)||void 0===S||null===(S=S.attributeJson)||void 0===S||null===(S=S.componentList)||void 0===S?void 0:S.length)>0){var C;null===(C=this.cmsConfig)||void 0===C||null===(C=C.attributeJson)||void 0===C||C.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)||t.push(i.attributeJson):e.push(i.attributeJson)})}"textItem"===(null===g||void 0===g?void 0:g.component)||"simplyText"===(null===g||void 0===g?void 0:g.component)?e.length>0&&(y=e.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):""):"buttonItem"===(null===g||void 0===g?void 0:g.component)&&t.length>0&&(y=t.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):"")}let E=y;return E=(E&&null!==(f=this.extraCategory)&&void 0!==f&&f.category_index?(null===(m=this.extraCategory)||void 0===m?void 0:m.category_index)+"-":"")+E,E},needSensorsRep(){},pageClick(){var e;if(this.isVisualShow)return;let t=JSON.parse(JSON.stringify(this.tipReportData));if(t.event="bannerClick",this.attributeJson.linkObj.jumpLinkType)try{let e=C(t,this.envUrl,"click"),i=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(l){}var i,s,n,r,a,o;null!==(e=this.attributeJson)&&void 0!==e&&null!==(e=e.linkObj)&&void 0!==e&&e.jumpLinkType&&this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:this.attributeJson,propsObject:C(JSON.parse(JSON.stringify(t)),this.envUrl,"click"),reportData:t,extraData:{isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",isSpecial:!0}});this.$emit("jumpLink",this.attributeJson.linkObj)}},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},Pe=Le,Oe=Pe,Ae=(i("a741"),D(Oe,ke,Ie,!1,null,"4acf858c",null)),De=Ae.exports,Ne=De,Me=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{directives:[{name:"onScroll",rawName:"v-onScroll",value:e.scrollMethod,expression:"scrollMethod"}],class:`product-wrap entrance-con entrance-con-${e.recordId}${e.sortId}`,style:[e.conStyle,e.paginationShow,e.animationInStyle,{height:e.isSwiper?Math.round(e.baseStyle.h*e.ratio)+"px":"auto!important"}]},[t("div",{class:["product-con",e.animationInObj.type?e.enterClass:""],style:[{width:e.baseStyle.w*e.ratio+"px",height:e.isSwiper?e.baseStyle.h*e.ratio+"px":"auto",padding:`0 ${e.attributeJson.goodsPaddingSpacing}px`,animationDuration:e.animationInObj.duration+"s"}]},[e.isSwiper?e._e():t("div",{ref:"slide"+e.sortId,class:`slide-con slide-con-${e.styleType}-${e.mode}`,style:{width:e.attributeJson.baseStyle.w*e.ratio+e.attributeJson.goodsSpacing+"px",margin:"0px -"+e.attributeJson.goodsSpacing/2+"px"}},e._l(e.productList,(function(i,s){return t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(s),envUrl:e.envUrl},expression:"{ data: tipReportData(index), envUrl }"},{name:"hoverAnimate",rawName:"v-hoverAnimate",value:{key:"productIndex",value:s},expression:"{ key: 'productIndex', value: index }"}],key:i.id,ref:`product${i.code}${s}`,refInFor:!0,class:["product-item",`product${i.code}${s}`],style:[e.productStyle],attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:"product_"+(e.recordId+"_"+e.sortId+"_"+i.code),name:"product_"+(e.recordId+"_"+e.sortId+"_"+i.code)},on:{click:function(t){return e.gotoPDP(i.code,i.colorCode,i.name,s,i)}}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber(s+1))}})]),t("div",{staticClass:"product-image"},[t("img",{style:[3===e.animationHoverObj.type&&e.productIndex==s?e.hoverStyle:""],attrs:{src:2==e.attributeJson.goodsImgType&&i.customImage?i.customImage:i.mainPicUrl,alt:i.name}})]),0!=e.attributeJson.showInfo.length?t("div",{class:["product-info","position"+e.attributeJson.infoPoisition,{transparent:2==e.attributeJson.isHover&&e.productIndex!=s}]},[e._t("productInfo",(function(){return[e.attributeJson.showInfo.indexOf(1)>-1?t("div",{staticClass:"product-name"},[e._v(" "+e._s(i.name)+" ")]):e._e(),t("div",{staticClass:"price-con"},[e.attributeJson.showInfo.indexOf(2)>-1?t("div",[e._v(" ¥"+e._s(e.formatNumber(parseInt(i.salesPrice)||0))+" ")]):e._e(),i.salesPrice!=i.standardPrice&&e.attributeJson.showInfo.indexOf(3)>-1?t("div",{staticClass:"standardPrice"},[e._v(" ¥"+e._s(e.formatNumber(parseInt(i.standardPrice)||0))+" ")]):e._e()])]}))],2):e._e(),2===e.animationHoverObj.type?t("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.productIndex===s?1:0,margin:`0 ${e.goodsSpacing/2}px`}]}):e._e()])})),0),e.isSwiper?t("div",{key:e.styleType+e.indicatorType,ref:"slide"+e.sortId,class:`swiper-container swiper-container-${e.recordId}${e.sortId}${e.carouselIndex}`,attrs:{id:"mySwiper-"+e.sortId}},[t("div",{staticClass:"swiper-wrapper",style:[{width:e.baseStyle.w*e.ratio+"px"}]},e._l(e.productList,(function(i,s){return t("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate",value:{key:"productIndex",value:s},expression:"{ key: 'productIndex', value: index }"},{name:"treport",rawName:"v-treport",value:{data:e.tipReportData(s),envUrl:e.envUrl},expression:"{ data: tipReportData(index), envUrl }"}],key:i.id,ref:`product${i.code}${s}`,refInFor:!0,class:`swiper-slide swiper-slide-${e.styleType}-${e.mode}`,style:[e.productStyle]},[t("div",{ref:`product${i.code}${s}`,refInFor:!0,attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:"product_"+(e.recordId+"_"+e.sortId+"_"+i.code),name:"product_"+(e.recordId+"_"+e.sortId+"_"+i.code)},on:{click:function(t){return e.gotoPDP(i.code,i.colorCode,i.name,s,i)}}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber(s+1))}})]),t("div",{staticClass:"product-image"},[t("img",{style:[3===e.animationHoverObj.type&&e.productIndex==s?e.hoverStyle:""],attrs:{src:2==e.attributeJson.goodsImgType&&i.customImage?i.customImage:i.mainPicUrl,alt:""}})]),0!=e.attributeJson.showInfo.length?t("div",{class:["product-info","position"+e.attributeJson.infoPoisition,{transparent:2==e.attributeJson.isHover&&e.productIndex!=s}]},[e._t("productInfo",(function(){return[e.attributeJson.showInfo.indexOf(1)>-1?t("div",{staticClass:"product-name"},[e._v(" "+e._s(i.name)+" ")]):e._e(),t("div",{staticClass:"price-con"},[e.attributeJson.showInfo.indexOf(2)>-1?t("div",[e._v(" ¥"+e._s(e.formatNumber(parseInt(i.salesPrice)||0))+" ")]):e._e(),i.salesPrice!=i.standardPrice&&e.attributeJson.showInfo.indexOf(3)>-1?t("div",{staticClass:"standardPrice"},[e._v(" ¥"+e._s(e.formatNumber(parseInt(i.standardPrice)||0))+" ")]):e._e()])]}))],2):e._e(),2===e.animationHoverObj.type?t("div",{staticClass:"hover-con",style:[e.hoverStyle,{opacity:e.productIndex===s?1:0}]}):e._e()])])})),0),e.hasScrollBar?t("div",{class:`swiper-scrollbar scrollbar-${e.recordId}${e.sortId}${e.carouselIndex}`}):e._e(),e.hasSwiperButton?t("div",{class:["swiper-button-left",{disable:e.isBeginning}],on:{click:e.slidePre}},[t("span",{staticClass:"cms2iconfont iconleft",style:e.pageStyle})]):e._e(),e.hasSwiperButton?t("div",{class:["swiper-button-right",{disable:e.isEnd}],on:{click:e.slideNext}},[t("span",{staticClass:"cms2iconfont iconright",style:e.pageStyle})]):e._e()]):e._e()])])},Re=[],Ue={name:"productItem",mixins:[L],components:{},props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},sortId:{type:Number},sort:{type:Number,default:0},recordId:{type:Number,default:0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{productTimer:null,sleepTimer:null,hasSensorsReList:[],productList:[],swiper:"",productStyle:{},service:new y,productIndex:"",windowHeight:0,isBeginning:!0,isEnd:!1,initSwiperNow:!1}},watch:{addProduct:{handler(e){clearInterval(this.productTimer),this.productTimer=setInterval(()=>{if("undefined"!==typeof window){if(clearInterval(this.productTimer),1==e.type&&0==e.itemCodeList.length)return;if(2==e.type&&!e.categoryGroupCode)return;if(3==e.type&&!e.cmsSortCode)return;this.getProductList()}},200)},immediate:!0,deep:!0},ratio:{handler(){!this.isSwiper&&this.productStyle.width&&(this.productStyle.width=(this.attributeJson.baseStyle.w*this.ratio-2*this.attributeJson.goodsPaddingSpacing+this.goodsSpacing)/this.showNum+"px")}}},computed:{addProduct(){return this.attributeJson.addProduct},goodsPaddingSpacing(){return this.attributeJson.goodsPaddingSpacing},goodsSpacing(){return this.attributeJson.goodsSpacing},itemsPerLine(){return this.attributeJson.itemsPerLine},indicatorType(){return this.attributeJson.indicatorType},isSwiper(){return"pc"==this.mode&&1==this.styleType||"mobile"==this.mode&&2==this.styleType&&(2==this.indicatorType||3==this.indicatorType)},hasSwiperButton(){return"pc"==this.mode&&1==this.styleType&&2==this.indicatorType||"mobile"==this.mode&&2==this.styleType&&2==this.indicatorType},hasScrollBar(){return"mobile"==this.mode&&2==this.styleType&&3==this.indicatorType},paginationShow(){let{paginationStyle:e}=this.attributeJson;return{"--hoverColor":e.hoverColor||e.color,"--activeColor":e.activeColor,"--color":e.color}},pageStyle(){return{color:this.attributeJson.paginationStyle.color}},showNum(){let e=1;return"pc"==this.mode?e=this.attributeJson.itemsPerLine:1==this.attributeJson.styleType?e=2.5:2==this.attributeJson.styleType&&(e=this.attributeJson.itemsPerLine),e},tipReportData(){return function(e){let t=this.productList[e];return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:4,popData:{productCode:t.code,selectDataShow:t.name},materialId:this.recordId+"_"+this.sortId,materialName:this.attributeJson.uniqueName,refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:e+1,event:"bannerShow"}}},visualNumber(){return function(e){var t;let i=0;return(null===(t=this.visualData)||void 0===t?void 0:t.length)>0&&this.visualData.forEach(t=>{var s,n;let r=`${this.recordId}_${this.sort}`;e=(null!==(s=this.extraCategory)&&void 0!==s&&s.category_index?(null===(n=this.extraCategory)||void 0===n?void 0:n.category_index)+"-":"")+e,Boolean("总和"!=t.date&&"快速总和"!=t.date&&r==t.module_id&&e==t.mkt_rank)&&(i+=t["坑位点击数据"]?t["坑位点击数据"]:0)}),i}}},mounted(){this.productList=this.attributeJson.productList,this.initProduct()},methods:{needSensorsRep(){this.stopReport||this.scrollMethod()},sleep(e){return new Promise(async t=>{clearTimeout(this.sleepTimer),this.sleepTimer=setTimeout(()=>{clearTimeout(this.sleepTimer),t("success")},e)})},scrollMethod(){this.stopReport||this.$nextTick(async()=>{if(await this.sleep(100),this.isSwiper){var e;const t=this.$refs["slide"+this.sortId];if(t&&(null===(e=this.productList)||void 0===e?void 0:e.length)>0){const e=this.showNum,i=t.swiper.realIndex,s=0+e+i;let n=this.productList.map((e,t)=>(e.pIndex=t,e)).slice(s-e,s);(null===n||void 0===n?void 0:n.length)>0&&n.forEach(e=>{const t=this.$refs[`product${e.code}${e.pIndex}`];if(t&&t[0]){const i=document.documentElement.clientHeight,s=document.documentElement.clientWidth,n=t[0].getBoundingClientRect(),r=n.top||0,a=n.left||0;r<i&&r>=0&&a<s&&a>=0&&this.sensorsExposure(e.pIndex,e)}})}}else{var t;(null===(t=this.productList)||void 0===t?void 0:t.length)>0&&this.productList.forEach((e,t)=>{const i=this.$refs[`product${e.code}${t}`];if(i&&i[0]){const s=document.documentElement.clientHeight,n=document.documentElement.clientWidth,r=i[0].getBoundingClientRect(),a=r.top||0,o=r.left||0;a<s&&a>=0&&o<n&&o>=0&&this.sensorsExposure(t,e)}})}})},sensorsExposure(e,t){var i,s,n,r,a,o;if(this.hasSensorsReList.find(e=>JSON.stringify(e)==JSON.stringify(t)))return;let l=JSON.parse(JSON.stringify(this.tipReportData(e)));t.position=Number(e)+1,this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:t,propsObject:C(JSON.parse(JSON.stringify(l)),this.envUrl,"exposure"),reportData:l,extraData:{isHasPDP:!0,hasPDPItem:t,isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",MKTIndex:String(e+1),MKTName:this.productList[e].name}}),this.hasSensorsReList.push(t)},getProductList:function(){let e={};switch(this.addProduct.type){case 1:e={itemCodeList:this.addProduct.itemCodeList,pageNum:1,pageSize:this.addProduct.itemCodeList.length};break;case 2:e={categoryParam:{categoryCodeList:this.addProduct.categoryCodeList,categoryGroupCode:this.addProduct.categoryGroupCode},pageNum:1,pageSize:this.addProduct.max,sortRuleId:this.addProduct.sortId};break;case 3:e={pageNum:1,pageSize:this.addProduct.max,sortField:this.addProduct.cmsSortCode};break}3==this.addProduct.type?this.service.getSortProductInfo(this.envUrl,e,this.language).then(e=>{e&&e.list?(this.productList=e.list||[],this.getAnimate()):this.productList=[]}):this.service.getProductInfo(this.envUrl,e,this.language).then(e=>{e&&e.list?(this.productList=e.list||[],this.getAnimate()):this.productList=[]})},getAnimate(){let e=document.querySelector(`.entrance-con${this.recordId}${this.sortId}`),t=e&&e.classList.contains("entrance-demonstrate");t&&e.firstChild.style&&(e.firstChild.style.display="block"),this.initProduct()},initProduct:function(){let{attributeJson:e,addProduct:t}=this;var i;2==e.goodsImgType&&0!=t.customImageList.length&&((null===(i=this.productList)||void 0===i?void 0:i.length)>0&&this.productList.forEach((e,i)=>{t.customImageList[i]&&0!=t.customImageList[i].picList.length&&this.$set(e,"customImage",t.customImageList[i].picList[0].resourcePath)}));this.productList&&this.productList.length>0&&(this.scrollMethod(),this.isSwiper?this.initSwiper():this.initSlide())},initSwiper:function(){let{attributeJson:e}=this;this.$nextTick(()=>{this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null),this.options={effect:"slide",autoplay:!1,slidesPerView:this.showNum,spaceBetween:e.goodsSpacing},this.hasScrollBar&&(this.options.scrollbar={el:`.scrollbar-${this.recordId}${this.sortId}${this.carouselIndex}`,draggable:!0},this.options.freeMode=!0);let t=this;this.options.on={slideChange:function(){t.isBeginning=this.isBeginning,t.isEnd=this.isEnd,t.scrollMethod()}},this.swiper=new F.a(`.swiper-container-${this.recordId}${this.sortId}${this.carouselIndex}`,this.options)})},slideNext(){this.swiper&&this.swiper.slideNext()},slidePre(){this.swiper&&this.swiper.slidePrev()},initSlide(){this.productStyle={padding:`0 ${this.goodsSpacing/2}px`,width:(this.attributeJson.baseStyle.w*this.ratio-2*this.attributeJson.goodsPaddingSpacing+this.goodsSpacing)/this.showNum+"px",marginBottom:this.goodsSpacing+"px"}},gotoPDP(e,t,i,s,n){var r,a,o,l,d,u;if(this.isVisualShow)return;let c=JSON.parse(JSON.stringify(this.tipReportData(s)));c.event="bannerClick";try{let e=C(c,this.envUrl,"click"),t=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",t)}catch(h){}n.position=Number(s)+1,this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:n,propsObject:C(JSON.parse(JSON.stringify(c)),this.envUrl,"click"),reportData:c,extraData:{isHasPDP:!0,hasPDPItem:n,isCategory:!(null===(r=this.extraCategory)||void 0===r||!r.isCategory)&&(null===(a=this.extraCategory)||void 0===a?void 0:a.isCategory),category_index:null!==(o=this.extraCategory)&&void 0!==o&&o.category_index?null===(l=this.extraCategory)||void 0===l?void 0:l.category_index:"",category_name:null!==(d=this.extraCategory)&&void 0!==d&&d.category_name?null===(u=this.extraCategory)||void 0===u?void 0:u.category_name:"",MKTIndex:String(s+1),MKTName:this.productList[s].name}}),this.$emit("gotoPDP",{code:e,colorCode:t})},formatNumber:k},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}}}},Be=Ue,je=Be,Fe=(i("f107"),D(je,Me,Re,!1,null,"2285da90",null)),qe=Fe.exports,$e=qe,He=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"simplyText-wrap entrance-con",style:[e.conStyle,e.animationInStyle],attrs:{"data-sensors-click":"","data-sensorsClick":e.attributeJson&&e.attributeJson.linkObj&&e.attributeJson.linkObj.jumpLinkType?"true":"false",id:`entrance_${e.recordId}_${e.sortId}`,name:`entrance_${e.recordId}_${e.sortId}`},on:{click:e.pageClick}},[t("div",{directives:[{name:"hoverAnimate",rawName:"v-hoverAnimate"}],staticClass:"text-con"},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual&&e.visualNumber,expression:"isVisualShow && hasVisual && visualNumber"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber)}})]),t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl},expression:"{ data: tipReportData, envUrl }"}],staticClass:"text-show",style:[e.textStyle,e.hoverStyleShow?e.hoverStyle:""]},[e._v(e._s(e.attributeJson.label))])])])},Ve=[],ze={name:"simplyText",inheritAttrs:!1,mixins:[L],props:{extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1}},computed:{textStyle(){let{fontStyle:{fontSize:e,color:t,fontWeight:i,textDecoration:s,lineHeight:n,fontItalic:r,letterSpacing:a,fontBackColor:o,fontFamily:l},textAlign:d}=this.attributeJson,u="mobile"==this.mode?2*this.ratio:this.ratio,c={fontSize:parseFloat(e)*u+"px",color:t,fontWeight:i?"bold":"",textDecoration:s?"underline":"",fontStyle:r?"italic":"",lineHeight:n,letterSpacing:(a||0)+"px",backgroundColor:o||"",fontFamily:l,textAlign:d};return c},tipReportData(){return{uniqueId:this.recordId+"_"+this.sortId,uniqueName:this.attributeJson.uniqueName,componentType:24,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1,event:"bannerShow"}},visualNumber(){var e;let t=0;return(null===(e=this.visualData)||void 0===e?void 0:e.length)>0&&this.visualData.forEach(e=>{let i=this.getMktIndex(),s=`${this.recordId}_${this.sort}`;Boolean("总和"!=e.date&&"快速总和"!=e.date&&s==e.module_id&&i==e.mkt_rank)&&(t+=e["坑位点击数据"]?e["坑位点击数据"]:0)}),t}},methods:{getMktIndex(){var e,t,i,s,n,r,a,o,l,d,u,c,h,p,f,m;const g=null!==(e=this.extraCategory)&&void 0!==e&&e.category_index?(null===(t=this.cmsConfig)||void 0===t||null===(t=t.attributeJson)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&null!==(i=this.cmsConfig)&&void 0!==i&&null!==(i=i.attributeJson)&&void 0!==i&&null!==(i=i.list[Number((null===(s=this.extraCategory)||void 0===s?void 0:s.category_index)||1)-1])&&void 0!==i&&null!==(i=i.componentList)&&void 0!==i&&i.find(e=>e.sort===this.attributeJson.sort)?null===(n=this.cmsConfig)||void 0===n||null===(n=n.attributeJson)||void 0===n||null===(n=n.list[Number((null===(r=this.extraCategory)||void 0===r?void 0:r.category_index)||1)-1])||void 0===n||null===(n=n.componentList)||void 0===n?void 0:n.find(e=>e.sort===this.attributeJson.sort):(null===(a=this.cmsConfig)||void 0===a||null===(a=a.attributeJson)||void 0===a||null===(a=a.list)||void 0===a?void 0:a.length)>0&&null!==(o=this.cmsConfig)&&void 0!==o&&null!==(o=o.attributeJson)&&void 0!==o&&null!==(o=o.list[Number((null===(l=this.extraCategory)||void 0===l?void 0:l.category_index)||1)-1])&&void 0!==o&&null!==(o=o.componentList)&&void 0!==o&&o.find(e=>e.sort===this.attributeJson.sort)?null===(d=this.cmsConfig)||void 0===d||null===(d=d.attributeJson)||void 0===d||null===(d=d.list[Number((null===(u=this.extraCategory)||void 0===u?void 0:u.category_index)||1)-1])||void 0===d||null===(d=d.componentList)||void 0===d?void 0:d.find(e=>e.sort===this.attributeJson.sort):null:null!==(c=this.cmsConfig)&&void 0!==c&&null!==(c=c.attributeJson)&&void 0!==c&&null!==(c=c.componentList)&&void 0!==c&&c.find(e=>e.sort===this.attributeJson.sort)?this.cmsConfig.attributeJson.componentList.find(e=>e.sort===this.attributeJson.sort):null!==(h=this.cmsConfig)&&void 0!==h&&null!==(h=h.attributeJson)&&void 0!==h&&null!==(h=h.componentList)&&void 0!==h&&h.find(e=>e.sort===this.attributeJson.sort)?null===(p=this.cmsConfig)||void 0===p||null===(p=p.attributeJson)||void 0===p?void 0:p.componentList.find(e=>e.sort===this.attributeJson.sort):null;let y="";if("simplyText"===(null===g||void 0===g?void 0:g.component)||"textItem"===(null===g||void 0===g?void 0:g.component)||"buttonItem"===(null===g||void 0===g?void 0:g.component)){var v,b,_,T,S;y="";let e=[],t=[];var w,x;if(null!==(v=this.extraCategory)&&void 0!==v&&v.category_index&&(null===(b=this.cmsConfig)||void 0===b||null===(b=b.attributeJson)||void 0===b||null===(b=b.list)||void 0===b?void 0:b.length)>0&&(null===(_=this.cmsConfig)||void 0===_||null===(_=_.attributeJson)||void 0===_||null===(_=_.list[Number((null===(T=this.extraCategory)||void 0===T?void 0:T.category_index)||1)-1])||void 0===_||null===(_=_.componentList)||void 0===_?void 0:_.length)>0)null===(w=this.cmsConfig.attributeJson.list[Number((null===(x=this.extraCategory)||void 0===x?void 0:x.category_index)||1)-1])||void 0===w||w.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"===(null===i||void 0===i?void 0:i.component)&&1===(null===i||void 0===i?void 0:i.displayType)&&[1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)&&t.push(i.attributeJson):e.push(i.attributeJson)});else if((null===(S=this.cmsConfig)||void 0===S||null===(S=S.attributeJson)||void 0===S||null===(S=S.componentList)||void 0===S?void 0:S.length)>0){var C;null===(C=this.cmsConfig)||void 0===C||null===(C=C.attributeJson)||void 0===C||C.componentList.forEach(i=>{"textItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)?"buttonItem"!==(null===i||void 0===i?void 0:i.component)&&"simplyText"!==(null===i||void 0===i?void 0:i.component)||1!==(null===i||void 0===i?void 0:i.displayType)||![1,2,5].includes(i.attributeJson.linkObj.jumpLinkType)||t.push(i.attributeJson):e.push(i.attributeJson)})}"textItem"===(null===g||void 0===g?void 0:g.component)||"simplyText"===(null===g||void 0===g?void 0:g.component)?e.length>0&&(y=e.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):""):"buttonItem"===(null===g||void 0===g?void 0:g.component)&&t.length>0&&(y=t.findIndex(e=>e.sort===this.attributeJson.sort),y=-1!==y?String(y+1):"")}let E=y;return E=(E&&null!==(f=this.extraCategory)&&void 0!==f&&f.category_index?(null===(m=this.extraCategory)||void 0===m?void 0:m.category_index)+"-":"")+E,E},needSensorsRep(){},pageClick(){var e;if(this.isVisualShow)return;let t=JSON.parse(JSON.stringify(this.tipReportData));if(t.event="bannerClick",this.attributeJson.linkObj.jumpLinkType)try{let e=C(t,this.envUrl,"click"),i=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",i)}catch(l){}var i,s,n,r,a,o;null!==(e=this.attributeJson)&&void 0!==e&&null!==(e=e.linkObj)&&void 0!==e&&e.jumpLinkType&&this.$emit("sensorsCmsRepost",{initObject:this.attributeJson,itemObject:this.attributeJson,propsObject:C(JSON.parse(JSON.stringify(t)),this.envUrl,"click"),reportData:t,extraData:{isCategory:!(null===(i=this.extraCategory)||void 0===i||!i.isCategory)&&(null===(s=this.extraCategory)||void 0===s?void 0:s.isCategory),category_index:null!==(n=this.extraCategory)&&void 0!==n&&n.category_index?null===(r=this.extraCategory)||void 0===r?void 0:r.category_index:"",category_name:null!==(a=this.extraCategory)&&void 0!==a&&a.category_name?null===(o=this.extraCategory)||void 0===o?void 0:o.category_name:"",isSpecial:!0,noLabel:!0}});this.$emit("jumpLink",this.attributeJson.linkObj)}}},Ge=ze,Je=Ge,We=(i("c8e5"),D(Je,He,Ve,!1,null,"c5344158",null)),Xe=We.exports,Ye=Xe,Ke={name:"singleLayout",inheritAttrs:!1,components:{textItem:R,imgNav:ee,videoItem:ye,swiperItem:Ee,buttonItem:Ne,productItem:$e,simplyText:Ye},props:{envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},extraCategory:{type:Object,default:()=>null},stopReport:{type:Boolean,default:!1},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},sort:{type:Number,default:0},recordId:{type:Number,default:0},canDragInc:{type:Boolean,default:!0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{vLine:[],hLine:[],componentName:""}},computed:{layoutStyle:function(){return this.layOutData.layoutStyle?{backgroundImage:2===this.layOutData.layoutStyle.bgStyle.type&&0!=this.layOutData.layoutStyle.bgStyle.picList.length&&`url(${this.layOutData.layoutStyle.bgStyle.picList[0].resourcePath})`,backgroundColor:1===this.layOutData.layoutStyle.bgStyle.type&&this.layOutData.layoutStyle.bgStyle.backgroundColor}:{}}},methods:{needSensorsRep(){if(this.stopReport)return;const e=this.$refs.singleComponent;(null===e||void 0===e?void 0:e.length)>0&&e.forEach(e=>{e.needSensorsRep()})},getCustom(){let e=this.layOutData.componentList.filter(e=>e.type>100);return e}}},Qe=Ke,Ze=Qe,et=(i("04f2"),D(Ze,o,l,!1,null,"6e32e9f3",null)),tt=et.exports,it=tt,st=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{key:e.layOutData.layoutStyle.height,staticClass:"multiple-layout",style:{height:Math.round(e.layOutData.layoutStyle.height*e.ratio)+"px"}},[e._l(e.layOutData.list,(function(i,s){return[t("div",{key:s,staticClass:"multiple-item",style:{width:Math.round(i.baseStyle.w*e.ratio)+"px",height:Math.round(e.layOutData.layoutStyle.height*e.ratio)+"px",zIndex:e.currentIndex==s?1:"auto"}},[t("singleLayout",e._g(e._b({ref:"multipleSingle",refInFor:!0,attrs:{sort:e.sort,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,cmsConfig:e.cmsConfig,visualData:e.visualData,envUrl:e.envUrl,isClient:e.isClient,layOutData:i,componentList:i.componentList,"parent-l":i.baseStyle.l,ratio:e.ratio,recordId:e.recordId,mode:e.mode}},"singleLayout",e.$attrs,!1),e.$listeners))],1)]}))],2)},nt=[],rt={name:"multipleLayout",components:{singleLayout:it},props:{envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},sort:{type:Number,default:0},recordId:{type:Number,default:0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},inheritAttrs:!1,data(){return{w:200,currentItem:null,currentIndex:""}},watch:{},mounted(){},methods:{}},at=rt,ot=at,lt=(i("6814"),D(ot,st,nt,!1,null,"44b7f275",null)),dt=lt.exports,ut=dt,ct=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{directives:[{name:"treport",rawName:"v-treport",value:{data:e.tipReportData,envUrl:e.envUrl,isClient:e.isClient},expression:"{ data: tipReportData, envUrl, isClient }"}],ref:"custom"+e.layOutData.sort,staticClass:"custom-layout"},[t("div",{staticClass:"add-con"}),e._t("customComponent",null,{attributeJson:e.layOutData})],2)},ht=[],pt={name:"customLayout",props:{sort:{type:Number,default:0},recordId:{type:Number,default:0},refererPagePath:{type:String},layOutData:{type:Object,default:()=>{}},envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},path:{type:String},isClient:{type:Boolean,default:!0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{sensorsIsRes:!1}},inheritAttrs:!1,computed:{tipReportData(){return{uniqueId:this.layOutData.sort,uniqueName:this.uniqueName,componentType:7,popData:{},refererPagePath:this.refererPagePath,brand:this.brand,path:this.path,position:1}}},methods:{},directives:{onScroll:{inserted(e,t){const i=t.value,s={e:null,scrollX:window.scrollX,scrollY:window.scrollY},n=e=>{s.e=e,s.scrollX=window.scrollX,s.scrollY=window.scrollY,i(s)};i(s),window.addEventListener("scroll",n,!1),e.onScroll=n},unbind(e){e.onScroll||(window.removeEventListener("scroll",e.onScroll,!1),delete e.onScroll)}},treport:x}},ft=pt,mt=ft,gt=(i("9527"),D(mt,ct,ht,!1,null,"5d3536cc",null)),yt=gt.exports,vt=yt,bt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"tab-layout"},[e.hasTab?t("div",{staticClass:"tab-detail tab-con"},[t("div",[2==e.tabHeadInfo.showTitle?t("div",{ref:"tabHeadTitleDom",style:e.titleStyle},[t("span",[e._v(e._s(1==e.tabHeadInfo.customTitle?e.tabHeadInfo.title:e.list[e.tabIndex].title))])]):e._e(),t("div",{staticClass:"tab-list"},[t("div",{staticClass:"tab-line"},e._l(e.list,(function(i,s){return t("navItem",{key:s,attrs:{"data-sensors-click":"","data-sensorsClick":"true",id:`nav_${e.recordId}_${e.sort}_${Number(s+1)}`,name:`nav_${e.recordId}_${e.sort}_${Number(s+1)}`,recordId:e.recordId,sort:e.sort,item:i,ratio:e.ratio,mode:e.mode,spacing:e.layOutData.fontStyle.spacing*e.ratio,active:e.tabIndex==s,navStyle:e.navStyle(s),isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,navIndex:s+1},nativeOn:{click:function(t){return e.chooseTab(i,s)}}})})),1)]),t("div",{staticClass:"tab-content",style:{height:Math.ceil(e.list[e.tabIndex].height*e.ratio+1)+"px",transform:`translateX(${100*-e.tabIndex}%)`}},e._l(e.list,(function(i,s){return t("div",{key:s,staticClass:"tab-single"},[t("singleLayout",e._g(e._b({ref:"tabSingle"+s,refInFor:!0,attrs:{layOutData:i,componentList:i.componentList,ratio:e.ratio,recordId:e.recordId,sort:e.sort,mode:e.mode,envUrl:e.envUrl,isClient:e.isClient,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,extraCategory:e.extraCategory(s)}},"singleLayout",e.$attrs,!1),e.$listeners))],1)})),0)])]):e._e()])},_t=[],Tt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:["nav-item",e.item.navStyle.activeBackImage||e.item.navStyle.backImage?"nav-item-image":""],style:[e.navStyle,e.backStyle]},[t("label",{directives:[{name:"show",rawName:"v-show",value:e.isVisualShow&&e.hasVisual,expression:"isVisualShow && hasVisual"}],staticClass:"visual-data-mask"},[t("label",{domProps:{innerHTML:e._s(e.visualNumber)}})]),[t("img",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticClass:"back-image",attrs:{src:e.item.navStyle.activeBackImage}}),t("img",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticClass:"back-image",attrs:{src:e.item.navStyle.backImage}})],e.item.title?t("span",{style:{marginLeft:e.spacing+"px"}},[e._v(e._s(e.item.title))]):e._e()],2)},St=[],wt={name:"navItem",props:{item:{type:Object,default:()=>{}},navIndex:{type:Number,default:0},sort:{type:Number,default:0},recordId:{type:Number,default:0},active:{type:Boolean,default:!1},navStyle:{type:Object,default:()=>{}},spacing:{type:[String,Number],default:0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{}},watch:{},computed:{backStyle(){let{item:e,active:t}=this;return{backgroundColor:1==e.navStyle.type?t?e.navStyle.activeColor:e.navStyle.backgroundColor:"",backgroundImage:2==e.navStyle.type?t?`url('${e.navStyle.activeBackImage}')`:`url('${e.navStyle.backImage}')`:""}},visualNumber(){var e;let t=0;return(null===(e=this.visualData)||void 0===e?void 0:e.length)>0&&this.visualData.forEach(e=>{let i=`${this.recordId}_${this.sort}`;Boolean("总和"!=e.date&&"快速总和"!=e.date&&i==e.module_id&&e.mkt_rank==this.navIndex)&&(t+=e["坑位点击数据"]?e["坑位点击数据"]:0)}),t}},methods:{}},xt=wt,Ct=xt,Et=(i("6e0d"),D(Ct,Tt,St,!1,null,"7bfe839a",null)),kt=Et.exports,It=kt,Lt={name:"tabLayout",components:{navItem:It,singleLayout:it},props:{refererPagePath:{type:String},envUrl:{type:String,default:""},path:{type:String},sort:{type:Number,default:0},recordId:{type:Number,default:0},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},mounted(){setTimeout(()=>{this.sensorsTab()},200)},data(){return{tabIndex:0,activeSort:"",tabHeadTitleH:0}},computed:{extraCategory(){return function(e){var t;let i=null;return(null===(t=this.layOutData)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&(i={isCategory:!0,category_index:String(e+1),category_name:this.layOutData.list[e].title}),i}},hasTab(){return this.layOutData.list.some(e=>e.title)},list(){return this.layOutData.list},tabHeadInfo(){return this.layOutData.tabHeadInfo},navStyle(){let{tabHeadInfo:{width:e,height:t},borderStyle:i,fontStyle:{fontSize:s,color:n,fontWeight:r,textDecoration:a,fontItalic:o,hoverObj:{color:l}}}=this.layOutData,{borderTop:d,borderRight:u,borderBottom:c,borderLeft:h,borderColor:p,hoverObj:f}=i;return function(){return{width:e*this.ratio+"px",height:t*this.ratio+"px",color:n,fontSize:s&&s.replace(/px/,"")?Number(s.replace(/px/,""))*this.ratio*("pc"==this.mode?1:2)+"px":"",fontWeight:r?"bold":"",textDecoration:a?"underline":"",fontStyle:o?"italic":"",borderTop:2===i.type&&d?"1px solid "+d:1===i.type&&p?"1px solid "+p:"none",borderRight:2===i.type&&u?"1px solid "+u:1===i.type&&p?"1px solid "+p:"none",borderBottom:2===i.type&&c?"1px solid "+c:1===i.type&&p?"1px solid "+p:"none",borderLeft:2===i.type&&h?"1px solid "+h:1===i.type&&p?"1px solid "+p:"none","--hoverColor":l,"--hoverBorderTop":2===f.type&&f.borderTop?"1px solid "+f.borderTop:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderRight":2===f.type&&f.borderRight?"1px solid "+f.borderRight:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderBottom":2===f.type&&f.borderBottom?"1px solid "+f.borderBottom:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none","--hoverBorderLeft":2===f.type&&f.borderLeft?"1px solid "+f.borderLeft:1===f.type&&f.borderColor?"1px solid "+f.borderColor:"none"}}},titleStyle(){let{tabHeadInfo:{titleStyle:{fontSize:e,color:t,fontWeight:i,textDecoration:s,fontItalic:n}}}=this.layOutData;return{color:t,fontSize:e&&e.replace(/px/,"")?Number(e.replace(/px/,""))*this.ratio*("pc"==this.mode?1:2)+"px":"",fontWeight:i?"bold":"",textDecoration:s?"underline":"",fontStyle:n?"italic":"",paddingLeft:("pc"==this.mode?30:60)*this.ratio+"px",paddingBottom:("pc"==this.mode?40:80)*this.ratio+"px"}}},watch:{"layOutData.tabHeadInfo":{handler:function(){this.$nextTick(()=>{this.tabHeadTitleH=2==this.layOutData.tabHeadInfo.showTitle&&this.$refs["tabHeadTitleDom"]?this.$refs["tabHeadTitleDom"].clientHeight:0,this.setLayoutH()})},immediate:!0,deep:!0},"list.length":{handler:function(){let e=this.list.findIndex(e=>e.sort==this.activeSort);e>-1?this.tabIndex=e:(this.tabIndex=this.tabIndex>0?this.tabIndex-1:0,this.activeSort=this.list[this.tabIndex].sort)},deep:!0},hasTab:{handler:function(e){e&&(this.activeSort=this.list[0].sort,this.tabIndex=0)}}},methods:{chooseTab(e,t){this.activeSort=e.sort,this.tabIndex=t,this.setLayoutH(),this.$emit("updateLayOut",{sort:this.layOutData.sort});const i={uniqueId:this.recordId+"_"+this.sort,uniqueName:this.layOutData.uniqueName,componentMethodType:1,popData:{},materialId:e.sort?this.recordId+"_"+e.sort:this.recordId+"_"+this.sort,materialName:e.title,refererPagePath:this.refererPagePath,path:this.path,componentType:7,brand:this.brand,position:t+1,event:"bannerClick"};this.$emit("sensorsCmsRepost",{initObject:this.layOutData,itemObject:e,propsObject:C(JSON.parse(JSON.stringify(i)),this.envUrl,"click"),reportData:i,extraData:{isTabFirst:!0,component_id:this.recordId+"_"+this.sort,component_type:"tabLayout",isCategory:!0,ignoreCategory:!0,category_index:t+1,category_name:e.title,MKTIndex:t+1,MKTName:e.title}});let s=C(i,this.envUrl,"click"),n=new Blob([JSON.stringify(s)],{type:"application/json"});navigator.sendBeacon(this.envUrl+"service-zuul/data/collect/acquisition",n),setTimeout(()=>{this.sensorsTab()},0)},setLayoutH:function(){this.$set(this.layOutData.layoutStyle,"height",1*this.layOutData.list[this.tabIndex].height+1*this.layOutData.tabHeadInfo.height+1*this.tabHeadTitleH/this.ratio)},sensorsTab(){let e=this.$refs["tabSingle"+this.tabIndex];e&&e[0]&&e[0].needSensorsRep()}}},Pt=Lt,Ot=Pt,At=(i("3e8c"),D(Ot,bt,_t,!1,null,"4b6659cf",null)),Dt=At.exports,Nt=Dt,Mt=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{class:"slide-wrap "+e.mode,style:[{"--hoverColor":e.paginationStyle.hoverColor||e.paginationStyle.color,"--activeColor":e.paginationStyle.activeColor,"--color":e.paginationStyle.color},e.allBackStyle]},[t("div",{key:e.indicatorType,class:[`swiper-container swiper-${e.recordId} swiper-container-${e.indicatorType}`],style:e.swiperConStyle,attrs:{id:"mySwiper-"+e.recordId}},[t("div",{staticClass:"swiper-wrapper"},e._l(e.slideList,(function(i,s){return t("div",{key:s,class:["swiper-slide",{"slide-auto":1==e.widthStyle.type||e.centeredSlides}]},[t("div",{staticClass:"slide-con",style:[e.backStyle(i.i),{width:1==e.widthStyle.type?i.slideWidth*e.ratio+"px":e.backStyle(i.i).width}]},[t("singleLayout",e._g(e._b({ref:i.isCopy?"":"slideSingle",refInFor:!0,attrs:{sort:e.sort,carouselIndex:s,isVisualShow:e.isVisualShow,moduleName:e.moduleName,hasVisual:e.hasVisual,visualData:e.visualData,cmsConfig:e.cmsConfig,isClient:e.isClient,envUrl:e.envUrl,layOutData:i,ratio:e.ratio,recordId:e.recordId,mode:e.mode,extraCategory:{category_index:String(s+1>e.slideList.length/3?s+1>e.slideList.length/3*2?s+1-e.slideList.length/3*2:s+1-e.slideList.length/3:s+1)},stopReport:e.realActiveIndex!=s}},"singleLayout",e.$attrs,!1),e.$listeners))],1)])})),0),e.hasSwiperButton?t("div",{class:["swiper-button-prev","prev-"+e.recordId]},[2==e.indicatorType?t("div",{staticClass:"arrow"},[t("span",{staticClass:"cms2iconfont iconarrow-left",style:e.pageStyle})]):e._e(),3==e.indicatorType?t("div",{class:"cms2iconfont "+e.leftButton[e.layOutData.arrowType],style:e.pageStyle}):e._e(),4==e.indicatorType?t("div",{class:"cms2iconfont iconxiangzuo",style:e.pageStyle}):e._e()]):e._e(),e.hasSwiperButton?t("div",{class:["swiper-button-next","next-"+e.recordId]},[2==e.indicatorType?t("div",{staticClass:"arrow"},[t("span",{staticClass:"cms2iconfont iconarrow-right",style:e.pageStyle})]):e._e(),3==e.indicatorType?t("div",{class:"cms2iconfont "+e.rightButton[e.layOutData.arrowType],style:e.pageStyle}):e._e(),4==e.indicatorType?t("div",{class:"cms2iconfont iconxiangyou2",style:e.pageStyle}):e._e()]):e._e(),4==e.indicatorType||5==e.indicatorType?t("div",{staticClass:"slide-bottom"},e._l(e.list,(function(i,s){return t("div",{key:s,class:["slide-bottom-item",{active:s==e.slideIndex%e.list.length}]})})),0):e._e()])])},Rt=[],Ut={name:"slideLayout",components:{singleLayout:it},props:{envUrl:{type:String,default:""},isClient:{type:Boolean,default:!0},layOutData:{type:Object,default:()=>{}},ratio:{type:Number,default:1},mode:{type:String,default:"pc"},sort:{type:Number,default:0},recordId:{type:Number,default:0},moduleName:{type:String,default:""},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{swiper:"",realActiveIndex:0,slideIndex:0,layWidth:1920,isInit:!1,slideList:[],isMove:!1,leftButton:{1:"iconxiangzuo",2:"iconxiangzuo1"},rightButton:{1:"iconxiangyou2",2:"iconxiangyou1"}}},watch:{layoutStyle:{handler(e){this.layWidth=("pc"==this.mode?1920:750)*(e.widthStyle.width/100)},deep:!0,immediate:!0},slideLen:{handler(){"undefined"!==typeof window&&this.calculateWidth()},immediate:!0,deep:!0}},computed:{extraCategory(){return function(e){var t;let i=null;return(null===(t=this.layOutData)||void 0===t||null===(t=t.list)||void 0===t?void 0:t.length)>0&&(i={category_index:String(e+1>this.slideList.length/3?e+1>this.slideList.length/3*2?e+1-this.slideList.length/3*2:e+1-this.slideList.length/3:e+1)}),i}},layoutStyle(){return this.layOutData.layoutStyle},paginationStyle(){return this.layOutData.paginationStyle},bgStyle(){return this.layOutData.bgStyle},list(){return this.layOutData.list},styleType(){return this.layOutData.styleType},indicatorType(){return this.layOutData.indicatorType},widthStyle(){return this.layOutData.widthStyle},hasSwiperButton(){return 1!=this.indicatorType},pageStyle(){return{color:this.layOutData.paginationStyle.color}},allBackStyle(){let{bgStyle:e}=this,t="",i="";return 1==e.status&&(1==e.type?t=e.backgroundColor||"":i=0!=e.picList.length?`url(${e.picList[0].resourcePath})`:""),{backgroundColor:t,backgroundImage:i}},backStyle(){let{bgStyle:e,layoutStyle:t,styleType:i,mode:s}=this;return function(n){let r=this.list[n],a="",o="";2==e.status&&(1==r.bgStyle.type?a=r.bgStyle.backgroundColor||"":o=0!=r.bgStyle.picList.length?`url(${r.bgStyle.picList[0].resourcePath})`:"");let l="pc"==s&&2==i,d=l?this.layWidth-(this.layOutData.lineSlideNum+1)*("mobile"==s?0:40)-("mobile"==s?0:556):this.layWidth;return{width:3==i?"100%":d/this.layOutData.lineSlideNum*this.ratio+"px",height:t.height*this.ratio+"px",backgroundColor:a,backgroundImage:o}}},slideLen(){var e;return(null===(e=this.layOutData)||void 0===e||null===(e=e.list)||void 0===e?void 0:e.length)>0?this.layOutData.list.length:0},centeredSlides(){return"mobile"==this.mode||"pc"==this.mode&&2==this.styleType},swiperConStyle(){if(3==this.styleType)return{marginLeft:180*this.ratio+"px",width:1740*this.ratio+"px"}}},mounted(){this.$nextTick(()=>{this.initSwiper()}),window.addEventListener("pageshow",e=>{this.pageshowListen(e)})},activated(){this.$nextTick(()=>{this.initSwiper()})},methods:{pageshowListen(e){var t;I()&&(e.persisted||2==(null===(t=window)||void 0===t||null===(t=t.performance)||void 0===t||null===(t=t.navigation)||void 0===t?void 0:t.type))&&this.$nextTick(()=>{this.initSwiper()})},sleep(e){return new Promise(async t=>{clearTimeout(this.sleepTimer),this.sleepTimer=setTimeout(()=>{clearTimeout(this.sleepTimer),t("success")},e)})},calculateWidth:function(){let{list:e}=this;e.forEach((e,t)=>{e.i=t});let t=JSON.parse(JSON.stringify(e));t.forEach(e=>{e.isCopy=!0}),this.slideList=e.concat(JSON.parse(JSON.stringify(t))),this.slideList=t.concat(this.slideList),this.$nextTick(()=>{if(2==this.layOutData.widthStyle.type)return;let{layWidth:e}=this;this.slideList.forEach(t=>{let i=t.componentList[0],s=0;if(i){let t=i.attributeJson;if(2==i.type){let i=t.list.some(e=>{var t;return Boolean((null===e||void 0===e||null===(t=e.picList)||void 0===t?void 0:t.length)>0)});s=i?t.baseStyle.w+t.baseStyle.l:e}else if(3==i.type){var n;let i=Boolean((null===t||void 0===t||null===(n=t.videoInfo)||void 0===n||null===(n=n.list)||void 0===n?void 0:n.length)>0);s=i?t.baseStyle.w+t.baseStyle.l:e}else s=t.baseStyle.w+t.baseStyle.l}else s=e;this.$set(t,"slideWidth",s)})})},initSwiper(){this.$nextTick(()=>{var e;this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null);let{layOutData:t,widthStyle:i,ratio:s,slideLen:n}=this;this.options={effect:"slide",observer:!0,observeParents:!0,slidesPerView:this.centeredSlides||1==i.type?"auto":t.lineSlideNum,preventInteractionOnTransition:!0,slidesPerGroup:1,slidesPerGroupAuto:!0,centeredSlides:this.centeredSlides||1==i.type,spaceBetween:this.centeredSlides?0*s:0,autoplay:!!(t.autoPlay&&(null===(e=this.list)||void 0===e?void 0:e.length)>1)&&{delay:1e3*t.interval,disableOnInteraction:!1,stopOnLastSlide:!1}},1==i.type&&(this.options.loopedSlides=4,this.options.loopAdditionalSlides=2),3==this.styleType&&(this.options.slidesPerView=2.02,this.options.spaceBetween=32);let r=this;this.options.on={slideNextTransitionEnd:function(){this.activeIndex==2*n&&this.slideTo(n,0),r.slideIndex=this.activeIndex},slidePrevTransitionEnd:function(){this.activeIndex==n-1&&this.slideTo(2*n-1,0),r.slideIndex=this.activeIndex},slideChange:async function(){var e,t;if((null===(e=r.slideList)||void 0===e?void 0:e.length)>0&&this.realIndex!==(null===(t=r.slideList)||void 0===t?void 0:t.length)/3&&(r.isMove=!0),r.isMove){r.realActiveIndex=this.realIndex;const e=r.$refs.slideSingle;await r.sleep(200),(null===e||void 0===e?void 0:e.length)>0&&e.forEach(e=>{e.needSensorsRep()})}}},this.hasSwiperButton&&(this.options.navigation={nextEl:".next-"+this.recordId,prevEl:".prev-"+this.recordId}),this.swiper=new F.a(".swiper-"+this.recordId,this.options),this.swiper&&(this.swiper instanceof Array?this.swiper[0].slideTo(n,0):this.swiper.slideTo(n,0))})}}},Bt=Ut,jt=Bt,Ft=(i("7ba5"),D(jt,Mt,Rt,!1,null,"313f7997",null)),qt=Ft.exports,$t=qt,Ht=(i("be35"),i("77ed"),i("1e09"),{name:"cms",inheritAttrs:!1,components:{singleLayout:it,multipleLayout:ut,customLayout:vt,tabLayout:Nt,slideLayout:$t},props:{cmsList:{type:Array,default:()=>[]},canDrag:{type:Boolean,default:!0},mode:{type:String,default:"pc"},ratio:{type:Number,default:1},envUrl:{type:String,default:""},path:{type:String},isClient:{type:Boolean,default:!0},isVisualShow:{type:Boolean,default:!1},hasVisual:{type:Boolean,default:!1},visualData:{type:Array,default:()=>[]},cmsConfig:{type:Object,default:()=>null}},data(){return{chooseSort:"",activeIndex:-1,layOutObj:{1:"singleLayout",2:"multipleLayout",3:"customLayout",4:"tabLayout",5:"slideLayout"}}},computed:{},mounted(){},methods:{chooseLayout(e,t){this.chooseSort=t,this.$emit("updateLayOut",{layoutType:e,sort:t})},updateSort(e){this.chooseSort=e},deleteModule(e,t){t===this.chooseSort?this.$emit("deleteModule",e):(this.cmsList.splice(e,1),this.$emit("saveVersionId"))},showOrHide(e){let t=this.cmsList[e];this.$set(t,"displayType",t.displayType?0:1),this.$emit("componentChange",t.sort)}}}),Vt=Ht,zt=Vt,Gt=(i("82e5"),D(zt,r,a,!1,null,"1bbefdf6",null)),Jt=Gt.exports;const Wt=[Jt],Xt=function(e){Xt.installed||Wt.map(t=>e.component(t.name,t))};var Yt={install:Xt};t["default"]=Yt},fbac:function(e,t,i){},fc6a:function(e,t,i){"use strict";var s=i("44ad"),n=i("1d80");e.exports=function(e){return s(n(e))}},fda2:function(e,t,i){},fdbf:function(e,t,i){"use strict";var s=i("04f8");e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},ff60:function(e,t,i){},ffdf:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a}));var s=i("be09"),n=i.n(s),r=function(t){return n.a.atob?n.a.atob(t):e.from(t,"base64").toString("binary")};function a(e){for(var t=r(e),i=new Uint8Array(t.length),s=0;s<t.length;s++)i[s]=t.charCodeAt(s);return i}}).call(this,i("b639").Buffer)}});