lemon-mse 0.5.4 → 0.5.6
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.
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! For license information please see index.4f87fad2.js.LICENSE.txt */
|
2
|
+
(()=>{var e={737:function(e){e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1})}function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function o(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n=a(e),r=t?Reflect.construct(n,arguments,a(this).constructor):n.apply(this,arguments);if(r&&("object"==typeof r||"function"==typeof r))return r;if(void 0!==r)throw TypeError("Derived constructors may only return object or undefined");if(void 0===(r=this))throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n,r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length)return r&&(e=r),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function f(){if(d.url)window.location.href=d.url;else if(d.rewriteHTML)try{document.documentElement.innerHTML=d.rewriteHTML}catch(e){document.documentElement.innerText=d.rewriteHTML}else{try{window.opener=null,window.open("","_self"),window.close(),window.history.back()}catch(e){console.log(e)}setTimeout(function(){window.location.href=d.timeOutUrl||"https://theajack.github.io/disable-devtool/404.html?h=".concat(encodeURIComponent(location.host))},500)}}var d={md5:"",ondevtoolopen:f,ondevtoolclose:null,url:"",timeOutUrl:"",tkName:"ddtk",interval:500,disableMenu:!0,stopIntervalTime:5e3,clearIntervalWhenDevOpenTrigger:!1,detectors:[0,1,3,4,5,6,7],clearLog:!0,disableSelect:!1,disableCopy:!1,disableCut:!1,disablePaste:!1,ignore:null,disableIframeParents:!0,seo:!0,rewriteHTML:""},h=["detectors","ondevtoolclose","ignore"];function p(){return(new Date).getTime()}function m(e){var t=p();return e(),p()-t}var g,y,_,b={iframe:!1,pc:!1,qqBrowser:!1,firefox:!1,macos:!1,edge:!1,oldEdge:!1,ie:!1,iosChrome:!1,iosEdge:!1,chrome:!1,seoBot:!1,mobile:!1};function w(){d.clearLog&&_()}var x="",k=!1;function S(){var e=d.ignore;if(e){if("function"==typeof e)return e();if(0!==e.length){var t=location.href;if(x===t)return k;x=t;var n,r=!1,i=c(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if("string"==typeof o){if(-1!==t.indexOf(o)){r=!0;break}}else if(o.test(t)){r=!0;break}}}catch(e){i.e(e)}finally{i.f()}return k=r}}}var E=function(){return!1};function T(e){var t,n=b.macos?function(e,t){return e.metaKey&&e.altKey&&(73===t||74===t)}:function(e,t){return e.ctrlKey&&e.shiftKey&&(73===t||74===t)},r=b.macos?function(e,t){return e.metaKey&&e.altKey&&85===t||e.metaKey&&83===t}:function(e,t){return e.ctrlKey&&(83===t||85===t)};e.addEventListener("keydown",function(t){var i=(t=t||e.event).keyCode||t.which;if(123===i||n(t,i)||r(t,i))return O(e,t)},!0),d.disableMenu&&e.addEventListener("contextmenu",function(t){if("touch"!==t.pointerType)return O(e,t)}),t=e,d.disableSelect&&A(t,"selectstart"),t=e,d.disableCopy&&A(t,"copy"),t=e,d.disableCut&&A(t,"cut"),t=e,d.disablePaste&&A(t,"paste")}function A(e,t){e.addEventListener(t,function(t){return O(e,t)})}function O(e,t){if(!S()&&!E())return(t=t||e.event).returnValue=!1,t.preventDefault(),!1}var C,I=!1,D={};function R(){for(var e in D)if(D[e])return I=!0;return I=!1}(J=C=C||{})[J.Unknown=-1]="Unknown",J[J.RegToString=0]="RegToString",J[J.DefineId=1]="DefineId",J[J.Size=2]="Size",J[J.DateToString=3]="DateToString",J[J.FuncToString=4]="FuncToString",J[J.Debugger=5]="Debugger",J[J.Performance=6]="Performance",J[J.DebugLib=7]="DebugLib";var P=function(){function e(n){var r=n.type,n=n.enabled,n=void 0===n||n;t(this,e),this.type=C.Unknown,this.enabled=!0,this.type=r,this.enabled=n,this.enabled&&(r=this,M.push(r),this.init())}return r(e,[{key:"onDevToolOpen",value:function(){console.warn("You don't have permission to use DEVTOOL!【type = ".concat(this.type,"】")),d.clearIntervalWhenDevOpenTrigger&&F(),window.clearTimeout(U),d.ondevtoolopen(this.type,f),D[this.type]=!0}},{key:"init",value:function(){}}]),e}(),L=function(){o(n,P);var e=l(n);function n(){return t(this,n),e.call(this,{type:C.DebugLib})}return r(n,[{key:"init",value:function(){}},{key:"detect",value:function(){var e;(!0===(null==(e=null==(e=window.eruda)?void 0:e._devTools)?void 0:e._isShow)||window._vcOrigConsole&&window.document.querySelector("#__vconsole.vc-toggle"))&&this.onDevToolOpen()}}],[{key:"isUsing",value:function(){return!!window.eruda||!!window._vcOrigConsole}}]),n}(),B=0,U=0,M=[],N=0;function F(){window.clearInterval(B)}function j(e){for(var t=function(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=0x67452301,r=-0x10325477,i=-0x67452302,o=0x10325476,a=0;a<e.length;a+=16){var s=n,l=r,u=i,c=o;n=G(n,r,i,o,e[a+0],7,-0x28955b88),o=G(o,n,r,i,e[a+1],12,-0x173848aa),i=G(i,o,n,r,e[a+2],17,0x242070db),r=G(r,i,o,n,e[a+3],22,-0x3e423112),n=G(n,r,i,o,e[a+4],7,-0xa83f051),o=G(o,n,r,i,e[a+5],12,0x4787c62a),i=G(i,o,n,r,e[a+6],17,-0x57cfb9ed),r=G(r,i,o,n,e[a+7],22,-0x2b96aff),n=G(n,r,i,o,e[a+8],7,0x698098d8),o=G(o,n,r,i,e[a+9],12,-0x74bb0851),i=G(i,o,n,r,e[a+10],17,-42063),r=G(r,i,o,n,e[a+11],22,-0x76a32842),n=G(n,r,i,o,e[a+12],7,0x6b901122),o=G(o,n,r,i,e[a+13],12,-0x2678e6d),i=G(i,o,n,r,e[a+14],17,-0x5986bc72),r=G(r,i,o,n,e[a+15],22,0x49b40821),n=H(n,r,i,o,e[a+1],5,-0x9e1da9e),o=H(o,n,r,i,e[a+6],9,-0x3fbf4cc0),i=H(i,o,n,r,e[a+11],14,0x265e5a51),r=H(r,i,o,n,e[a+0],20,-0x16493856),n=H(n,r,i,o,e[a+5],5,-0x29d0efa3),o=H(o,n,r,i,e[a+10],9,0x2441453),i=H(i,o,n,r,e[a+15],14,-0x275e197f),r=H(r,i,o,n,e[a+4],20,-0x182c0438),n=H(n,r,i,o,e[a+9],5,0x21e1cde6),o=H(o,n,r,i,e[a+14],9,-0x3cc8f82a),i=H(i,o,n,r,e[a+3],14,-0xb2af279),r=H(r,i,o,n,e[a+8],20,0x455a14ed),n=H(n,r,i,o,e[a+13],5,-0x561c16fb),o=H(o,n,r,i,e[a+2],9,-0x3105c08),i=H(i,o,n,r,e[a+7],14,0x676f02d9),r=H(r,i,o,n,e[a+12],20,-0x72d5b376),n=z(n,r,i,o,e[a+5],4,-378558),o=z(o,n,r,i,e[a+8],11,-0x788e097f),i=z(i,o,n,r,e[a+11],16,0x6d9d6122),r=z(r,i,o,n,e[a+14],23,-0x21ac7f4),n=z(n,r,i,o,e[a+1],4,-0x5b4115bc),o=z(o,n,r,i,e[a+4],11,0x4bdecfa9),i=z(i,o,n,r,e[a+7],16,-0x944b4a0),r=z(r,i,o,n,e[a+10],23,-0x41404390),n=z(n,r,i,o,e[a+13],4,0x289b7ec6),o=z(o,n,r,i,e[a+0],11,-0x155ed806),i=z(i,o,n,r,e[a+3],16,-0x2b10cf7b),r=z(r,i,o,n,e[a+6],23,0x4881d05),n=z(n,r,i,o,e[a+9],4,-0x262b2fc7),o=z(o,n,r,i,e[a+12],11,-0x1924661b),i=z(i,o,n,r,e[a+15],16,0x1fa27cf8),r=z(r,i,o,n,e[a+2],23,-0x3b53a99b),n=W(n,r,i,o,e[a+0],6,-0xbd6ddbc),o=W(o,n,r,i,e[a+7],10,0x432aff97),i=W(i,o,n,r,e[a+14],15,-0x546bdc59),r=W(r,i,o,n,e[a+5],21,-0x36c5fc7),n=W(n,r,i,o,e[a+12],6,0x655b59c3),o=W(o,n,r,i,e[a+3],10,-0x70f3336e),i=W(i,o,n,r,e[a+10],15,-1051523),r=W(r,i,o,n,e[a+1],21,-0x7a7ba22f),n=W(n,r,i,o,e[a+8],6,0x6fa87e4f),o=W(o,n,r,i,e[a+15],10,-0x1d31920),i=W(i,o,n,r,e[a+6],15,-0x5cfebcec),r=W(r,i,o,n,e[a+13],21,0x4e0811a1),n=W(n,r,i,o,e[a+4],6,-0x8ac817e),o=W(o,n,r,i,e[a+11],10,-0x42c50dcb),i=W(i,o,n,r,e[a+2],15,0x2ad7d2bb),r=W(r,i,o,n,e[a+9],21,-0x14792c6f),n=q(n,s),r=q(r,l),i=q(i,u),o=q(o,c)}return[n,r,i,o]}(function(e){for(var t=[],n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<n%32;return t}(e),8*e.length),n="0123456789abcdef",r="",i=0;i<4*t.length;i++)r+=n.charAt(t[i>>2]>>i%4*8+4&15)+n.charAt(t[i>>2]>>i%4*8&15);return r}function V(e,t,n,r,i,o){return q((t=q(q(t,e),q(r,o)))<<i|t>>>32-i,n)}function G(e,t,n,r,i,o,a){return V(t&n|~t&r,e,t,i,o,a)}function H(e,t,n,r,i,o,a){return V(t&r|n&~r,e,t,i,o,a)}function z(e,t,n,r,i,o,a){return V(t^n^r,e,t,i,o,a)}function W(e,t,n,r,i,o,a){return V(n^(t|~r),e,t,i,o,a)}function q(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}var J=function(){o(n,P);var e=l(n);function n(){return t(this,n),e.call(this,{type:C.RegToString,enabled:b.qqBrowser||b.firefox})}return r(n,[{key:"init",value:function(){var e=this;this.lastTime=0,this.reg=/./,g(this.reg),this.reg.toString=function(){var t;return b.qqBrowser?(t=(new Date).getTime(),e.lastTime&&t-e.lastTime<100?e.onDevToolOpen():e.lastTime=t):b.firefox&&e.onDevToolOpen(),""}}},{key:"detect",value:function(){g(this.reg)}}]),n}(),K=function(){o(n,P);var e=l(n);function n(){return t(this,n),e.call(this,{type:C.DefineId})}return r(n,[{key:"init",value:function(){var e=this;this.div=document.createElement("div"),this.div.__defineGetter__("id",function(){e.onDevToolOpen()}),Object.defineProperty(this.div,"id",{get:function(){e.onDevToolOpen()}})}},{key:"detect",value:function(){g(this.div)}}]),n}(),$=function(){o(n,P);var e=l(n);function n(){return t(this,n),e.call(this,{type:C.Size,enabled:!b.iframe&&!b.edge})}return r(n,[{key:"init",value:function(){var e=this;this.checkWindowSizeUneven(),window.addEventListener("resize",function(){setTimeout(function(){e.checkWindowSizeUneven()},100)},!0)}},{key:"detect",value:function(){}},{key:"checkWindowSizeUneven",value:function(){var e=function(){if(null!=window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;return!(null!=e||!e.deviceXDPI||!e.logicalXDPI)&&e.deviceXDPI/e.logicalXDPI}();if(!1!==e){var t=200<window.outerWidth-window.innerWidth*e,e=300<window.outerHeight-window.innerHeight*e;if(t||e)return this.onDevToolOpen(),!1;D[this.type]=!1}return!0}}]),n}(),Y,Q=function(){o(n,P);var e=l(n);function n(){return t(this,n),e.call(this,{type:C.DateToString,enabled:!b.iosChrome&&!b.iosEdge})}return r(n,[{key:"init",value:function(){var e=this;this.count=0,this.date=new Date,this.date.toString=function(){return e.count++,""}}},{key:"detect",value:function(){this.count=0,g(this.date),w(),2<=this.count&&this.onDevToolOpen()}}]),n}(),X=function(){o(n,P);var e=l(n);function n(){return t(this,n),e.call(this,{type:C.FuncToString,enabled:!b.iosChrome&&!b.iosEdge})}return r(n,[{key:"init",value:function(){var e=this;this.count=0,this.func=function(){},this.func.toString=function(){return e.count++,""}}},{key:"detect",value:function(){this.count=0,g(this.func),w(),2<=this.count&&this.onDevToolOpen()}}]),n}(),Z=function(){o(n,P);var e=l(n);function n(){return t(this,n),e.call(this,{type:C.Debugger,enabled:b.iosChrome||b.iosEdge})}return r(n,[{key:"detect",value:function(){var e=p();100<p()-e&&this.onDevToolOpen()}}]),n}(),ee=function(){o(n,P);var e=l(n);function n(){return t(this,n),e.call(this,{type:C.Performance,enabled:b.chrome||!b.mobile})}return r(n,[{key:"init",value:function(){this.maxPrintTime=0,this.largeObjectArray=function(){for(var e=function(){for(var e={},t=0;t<500;t++)e["".concat(t)]="".concat(t);return e}(),t=[],n=0;n<50;n++)t.push(e);return t}()}},{key:"detect",value:function(){var e=this,t=m(function(){y(e.largeObjectArray)}),n=m(function(){g(e.largeObjectArray)});if(this.maxPrintTime=Math.max(this.maxPrintTime,n),w(),0===t||0===this.maxPrintTime)return!1;t>10*this.maxPrintTime&&this.onDevToolOpen()}}]),n}(),et=(i(Y={},C.RegToString,J),i(Y,C.DefineId,K),i(Y,C.Size,$),i(Y,C.DateToString,Q),i(Y,C.FuncToString,X),i(Y,C.Debugger,Z),i(Y,C.Performance,ee),i(Y,C.DebugLib,L),Y),en=Object.assign(function(t){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return{success:!e,reason:e}}if(en.isRunning)return n("already running");if(function(){function e(e){return -1!==t.indexOf(e)}var t=navigator.userAgent.toLowerCase(),n=function(){var e=navigator,t=e.platform,e=e.maxTouchPoints;if("number"==typeof e)return 1<e;if("string"==typeof t){if(e=t.toLowerCase(),/(mac|win)/i.test(e))return!1;if(/(android|iphone|ipad|ipod|arch)/i.test(e))return!0}return/(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent.toLowerCase())}(),r=!!window.top&&window!==window.top,i=e("qqbrowser"),o=e("firefox"),a=e("macintosh"),s=e("edge"),l=s&&!e("chrome"),u=l||e("trident")||e("msie"),c=e("crios"),f=e("edgios"),d=e("chrome")||c,h=!n&&/(googlebot|baiduspider|bingbot|applebot|petalbot|yandexbot|bytespider|chrome\-lighthouse|moto g power)/i.test(t);Object.assign(b,{iframe:r,pc:!n,qqBrowser:i,firefox:o,macos:a,edge:s,oldEdge:l,ie:u,iosChrome:c,iosEdge:f,chrome:d,seoBot:h,mobile:n})}(),a=window.console||{log:function(){},table:function(){},clear:function(){}},_=b.ie?(g=function(){return a.log.apply(a,arguments)},y=function(){return a.table.apply(a,arguments)},function(){return a.clear()}):(g=a.log,y=a.table,a.clear),function(t){var n,r=0<arguments.length&&void 0!==t?t:{};for(n in d)void 0===r[n]||e(d[n])!==e(r[n])&&-1===h.indexOf(n)||(d[n]=r[n]);"function"==typeof d.ondevtoolclose&&!0===d.clearIntervalWhenDevOpenTrigger&&(d.clearIntervalWhenDevOpenTrigger=!1,console.warn("【DISABLE-DEVTOOL】clearIntervalWhenDevOpenTrigger 在使用 ondevtoolclose 时无效"))}(t),d.md5&&j((r=d.tkName,i=window.location.search,o=window.location.hash,""!==(i=""===i&&""!==o?"?".concat(o.split("?")[1]):i)&&void 0!==i&&(o=RegExp("(^|&)"+r+"=([^&]*)(&|$)","i"),null!=(r=i.substr(1).match(o)))?unescape(r[2]):""))===d.md5)return n("token passed");if(d.seo&&b.seoBot)return n("seobot");en.isRunning=!0,function(e){function t(){u=!0}function n(){u=!1}var r,i,o,a,s,l,u=!1;function f(){(l[a]===o?i:r)()}(function(e,t){function n(n){return function(){e&&e();var r=n.apply(void 0,arguments);return t&&t(),r}}var r=window.alert,i=window.confirm,o=window.prompt;try{window.alert=n(r),window.confirm=n(i),window.prompt=n(o)}catch(e){}})(t,n),r=n,i=t,void 0!==(l=document).hidden?(o="hidden",s="visibilitychange",a="visibilityState"):void 0!==l.mozHidden?(o="mozHidden",s="mozvisibilitychange",a="mozVisibilityState"):void 0!==l.msHidden?(o="msHidden",s="msvisibilitychange",a="msVisibilityState"):void 0!==l.webkitHidden&&(o="webkitHidden",s="webkitvisibilitychange",a="webkitVisibilityState"),l.removeEventListener(s,f,!1),l.addEventListener(s,f,!1),B=window.setInterval(function(){if(!(e.isSuspend||u||S())){var t,n,r=c(M);try{for(r.s();!(t=r.n()).done;){var i=t.value;D[i.type]=!1,i.detect(N++)}}catch(e){r.e(e)}finally{r.f()}w(),"function"==typeof d.ondevtoolclose&&(n=I,!R()&&n&&d.ondevtoolclose())}},d.interval),U=setTimeout(function(){b.pc||L.isUsing()||F()},d.stopIntervalTime)}(en);var r,i,o,a,s=(E=function(){return en.isSuspend},window.top),l=window.parent;if(T(window),d.disableIframeParents&&s&&l&&s!==window){for(;l!==s;)T(l),l=l.parent;T(s)}return("all"===d.detectors?Object.keys(et):d.detectors).forEach(function(e){new et[e]}),n()},{isRunning:!1,isSuspend:!1,md5:j,version:"0.3.8",DetectorType:C,isDevToolOpened:R});return(J=function(){if("undefined"==typeof window||!window.document)return null;var e=document.querySelector("[disable-devtool-auto]");if(!e)return null;var t=["disable-menu","disable-select","disable-copy","disable-cut","disable-paste","clear-log"],n=["interval"],r={};return["md5","url","tk-name","detectors"].concat(t,n).forEach(function(i){var o=e.getAttribute(i);null!==o&&(-1!==n.indexOf(i)?o=parseInt(o):-1!==t.indexOf(i)?o="false"!==o:"detector"===i&&"all"!==o&&(o=o.split(" ")),r[function(e){if(-1===e.indexOf("-"))return e;var t=!1;return e.split("").map(function(e){return"-"===e?(t=!0,""):t?(t=!1,e.toUpperCase()):e}).join("")}(i)]=o)}),r}())&&en(J),en}()},961:function(e,t,n){e=n.nmd(e);var r=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",r={};function i(e,t){if(!r[e]){r[e]={};for(var n=0;n<e.length;n++)r[e][e.charAt(n)]=n}return r[e][t]}var o={compressToBase64:function(e){if(null==e)return"";var n=o._compress(e,6,function(e){return t.charAt(e)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:o._decompress(e.length,32,function(n){return i(t,e.charAt(n))})},compressToUTF16:function(t){return null==t?"":o._compress(t,15,function(t){return e(t+32)})+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:o._decompress(e.length,16384,function(t){return e.charCodeAt(t)-32})},compressToUint8Array:function(e){for(var t=o.compress(e),n=new Uint8Array(2*t.length),r=0,i=t.length;r<i;r++){var a=t.charCodeAt(r);n[2*r]=a>>>8,n[2*r+1]=a%256}return n},decompressFromUint8Array:function(t){if(null==t)return o.decompress(t);for(var n=Array(t.length/2),r=0,i=n.length;r<i;r++)n[r]=256*t[2*r]+t[2*r+1];var a=[];return n.forEach(function(t){a.push(e(t))}),o.decompress(a.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":o._compress(e,6,function(e){return n.charAt(e)})},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),o._decompress(e.length,32,function(t){return i(n,e.charAt(t))}))},compress:function(t){return o._compress(t,16,function(t){return e(t)})},_compress:function(e,t,n){if(null==e)return"";var r,i,o,a={},s={},l="",u="",c="",f=2,d=3,h=2,p=[],m=0,g=0;for(o=0;o<e.length;o+=1)if(l=e.charAt(o),Object.prototype.hasOwnProperty.call(a,l)||(a[l]=d++,s[l]=!0),u=c+l,Object.prototype.hasOwnProperty.call(a,u))c=u;else{if(Object.prototype.hasOwnProperty.call(s,c)){if(256>c.charCodeAt(0)){for(r=0;r<h;r++)m<<=1,g==t-1?(g=0,p.push(n(m)),m=0):g++;for(r=0,i=c.charCodeAt(0);r<8;r++)m=m<<1|1&i,g==t-1?(g=0,p.push(n(m)),m=0):g++,i>>=1}else{for(r=0,i=1;r<h;r++)m=m<<1|i,g==t-1?(g=0,p.push(n(m)),m=0):g++,i=0;for(r=0,i=c.charCodeAt(0);r<16;r++)m=m<<1|1&i,g==t-1?(g=0,p.push(n(m)),m=0):g++,i>>=1}0==--f&&(f=Math.pow(2,h),h++),delete s[c]}else for(r=0,i=a[c];r<h;r++)m=m<<1|1&i,g==t-1?(g=0,p.push(n(m)),m=0):g++,i>>=1;0==--f&&(f=Math.pow(2,h),h++),a[u]=d++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(s,c)){if(256>c.charCodeAt(0)){for(r=0;r<h;r++)m<<=1,g==t-1?(g=0,p.push(n(m)),m=0):g++;for(r=0,i=c.charCodeAt(0);r<8;r++)m=m<<1|1&i,g==t-1?(g=0,p.push(n(m)),m=0):g++,i>>=1}else{for(r=0,i=1;r<h;r++)m=m<<1|i,g==t-1?(g=0,p.push(n(m)),m=0):g++,i=0;for(r=0,i=c.charCodeAt(0);r<16;r++)m=m<<1|1&i,g==t-1?(g=0,p.push(n(m)),m=0):g++,i>>=1}0==--f&&(f=Math.pow(2,h),h++),delete s[c]}else for(r=0,i=a[c];r<h;r++)m=m<<1|1&i,g==t-1?(g=0,p.push(n(m)),m=0):g++,i>>=1;0==--f&&(f=Math.pow(2,h),h++)}for(r=0,i=2;r<h;r++)m=m<<1|1&i,g==t-1?(g=0,p.push(n(m)),m=0):g++,i>>=1;for(;;){if(m<<=1,g==t-1){p.push(n(m));break}g++}return p.join("")},decompress:function(e){return null==e?"":""==e?null:o._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,n,r){var i,o,a,s,l,u,c,f=[],d=4,h=4,p=3,m="",g=[],y={val:r(0),position:n,index:1};for(i=0;i<3;i+=1)f[i]=i;for(a=0,l=4,u=1;u!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=n,y.val=r(y.index++)),a|=+(s>0)*u,u<<=1;switch(a){case 0:for(a=0,l=256,u=1;u!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=n,y.val=r(y.index++)),a|=+(s>0)*u,u<<=1;c=e(a);break;case 1:for(a=0,l=65536,u=1;u!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=n,y.val=r(y.index++)),a|=+(s>0)*u,u<<=1;c=e(a);break;case 2:return""}for(f[3]=c,o=c,g.push(c);;){if(y.index>t)return"";for(a=0,l=Math.pow(2,p),u=1;u!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=n,y.val=r(y.index++)),a|=+(s>0)*u,u<<=1;switch(c=a){case 0:for(a=0,l=256,u=1;u!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=n,y.val=r(y.index++)),a|=+(s>0)*u,u<<=1;f[h++]=e(a),c=h-1,d--;break;case 1:for(a=0,l=65536,u=1;u!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=n,y.val=r(y.index++)),a|=+(s>0)*u,u<<=1;f[h++]=e(a),c=h-1,d--;break;case 2:return g.join("")}if(0==d&&(d=Math.pow(2,p),p++),f[c])m=f[c];else{if(c!==h)return null;m=o+o.charAt(0)}g.push(m),f[h++]=o+m.charAt(0),d--,o=m,0==d&&(d=Math.pow(2,p),p++)}}};return o}();"function"==typeof define&&define.amd?define(function(){return r}):null!=e?e.exports=r:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return r})},744:function(e,t){"use strict";t.default=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.rv=()=>"1.3.2",n.ruid="bundler=rspack@1.3.2",(()=>{"use strict";let e,t,r,i,o,a,s,l,u,c,f,d,h,p,m,g;function y(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let _={},b=[],w=()=>{},x=()=>!1,k=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),S=e=>e.startsWith("onUpdate:"),E=Object.assign,T=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},A=Object.prototype.hasOwnProperty,O=(e,t)=>A.call(e,t),C=Array.isArray,I=e=>"[object Map]"===j(e),D=e=>"[object Set]"===j(e),R=e=>"[object Date]"===j(e),P=e=>"[object RegExp]"===j(e),L=e=>"function"==typeof e,B=e=>"string"==typeof e,U=e=>"symbol"==typeof e,M=e=>null!==e&&"object"==typeof e,N=e=>(M(e)||L(e))&&L(e.then)&&L(e.catch),F=Object.prototype.toString,j=e=>F.call(e),V=e=>j(e).slice(8,-1),G=e=>"[object Object]"===j(e),H=e=>B(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,z=y(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),W=e=>{let t=Object.create(null);return n=>t[n]||(t[n]=e(n))},q=/-(\w)/g,J=W(e=>e.replace(q,(e,t)=>t?t.toUpperCase():"")),K=/\B([A-Z])/g,$=W(e=>e.replace(K,"-$1").toLowerCase()),Y=W(e=>e.charAt(0).toUpperCase()+e.slice(1)),Q=W(e=>e?`on${Y(e)}`:""),X=(e,t)=>!Object.is(e,t),Z=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ee=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},et=e=>{let t=parseFloat(e);return isNaN(t)?e:t},en=e=>{let t=B(e)?Number(e):NaN;return isNaN(t)?e:t},er=()=>e||(e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});function ei(e){if(C(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=B(r)?function(e){let t={};return e.replace(es,"").split(eo).forEach(e=>{if(e){let n=e.split(ea);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}(r):ei(r);if(i)for(let e in i)t[e]=i[e]}return t}if(B(e)||M(e))return e}let eo=/;(?![^(]*\))/g,ea=/:([^]+)/,es=/\/\*[^]*?\*\//g;function el(e){let t="";if(B(e))t=e;else if(C(e))for(let n=0;n<e.length;n++){let r=el(e[n]);r&&(t+=r+" ")}else if(M(e))for(let n in e)e[n]&&(t+=n+" ");return t.trim()}let eu=y("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly"),ec=e=>!!(e&&!0===e.__v_isRef),ef=e=>B(e)?e:null==e?"":C(e)||M(e)&&(e.toString===F||!L(e.toString))?ec(e)?ef(e.value):JSON.stringify(e,ed,2):String(e),ed=(e,t)=>{if(ec(t))return ed(e,t.value);if(I(t))return{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[eh(t,r)+" =>"]=n,e),{})};if(D(t))return{[`Set(${t.size})`]:[...t.values()].map(e=>eh(e))};if(U(t))return eh(t);if(M(t)&&!C(t)&&!G(t))return String(t);return t},eh=(e,t="")=>{var n;return U(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class ep{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let n=t;try{return t=this,e()}finally{t=n}}}on(){t=this}off(){t=this.parent}stop(e){if(this._active){let t,n;for(t=0,this._active=!1,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,this.effects.length=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}let ev=new WeakSet;class em{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,t&&t.active&&t.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,ev.has(this)&&(ev.delete(this),this.trigger()))}notify(){(!(2&this.flags)||32&this.flags)&&(8&this.flags||ey(this))}run(){if(!(1&this.flags))return this.fn();this.flags|=2,eC(this),eb(this);let e=r,t=eE;r=this,eE=!0;try{return this.fn()}finally{ew(this),r=e,eE=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)eS(e);this.deps=this.depsTail=void 0,eC(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?ev.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ex(this)&&this.run()}get dirty(){return ex(this)}}let eg=0;function ey(e,t=!1){if(e.flags|=8,t){e.next=o,o=e;return}e.next=i,i=e}function e_(){let e;if(!(--eg>0)){if(o){let e=o;for(o=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;i;){let t=i;for(i=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eb(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ew(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;-1===r.version?(r===n&&(n=e),eS(r),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function ex(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ek(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ek(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eI))return;e.globalVersion=eI;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ex(e)){e.flags&=-3;return}let n=r,i=eE;r=e,eE=!0;try{eb(e);let n=e.fn(e._value);(0===t.version||X(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{r=n,eE=i,ew(e),e.flags&=-3}}function eS(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eS(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}let eE=!0,eT=[];function eA(){eT.push(eE),eE=!1}function eO(){let e=eT.pop();eE=void 0===e||e}function eC(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=r;r=void 0;try{t()}finally{r=e}}}let eI=0;class eD{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eR{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!r||!eE||r===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==r)t=this.activeLink=new eD(r,this),r.deps?(t.prevDep=r.depsTail,r.depsTail.nextDep=t,r.depsTail=t):r.deps=r.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=r.depsTail,t.nextDep=void 0,r.depsTail.nextDep=t,r.depsTail=t,r.deps===t&&(r.deps=e)}return t}trigger(e){this.version++,eI++,this.notify(e)}notify(e){eg++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{e_()}}}let eP=new WeakMap,eL=Symbol(""),eB=Symbol(""),eU=Symbol("");function eM(e,t,n){if(eE&&r){let t=eP.get(e);t||eP.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new eR),r.map=t,r.key=n),r.track()}}function eN(e,t,n,r,i,o){let a=eP.get(e);if(!a)return void eI++;let s=e=>{e&&e.trigger()};if(eg++,"clear"===t)a.forEach(s);else{let i=C(e),o=i&&H(n);if(i&&"length"===n){let e=Number(r);a.forEach((t,n)=>{("length"===n||n===eU||!U(n)&&n>=e)&&s(t)})}else switch((void 0!==n||a.has(void 0))&&s(a.get(n)),o&&s(a.get(eU)),t){case"add":i?o&&s(a.get("length")):(s(a.get(eL)),I(e)&&s(a.get(eB)));break;case"delete":!i&&(s(a.get(eL)),I(e)&&s(a.get(eB)));break;case"set":I(e)&&s(a.get(eL))}}e_()}function eF(e){let t=td(e);return t===e?t:(eM(t,"iterate",eU),tc(e)?t:t.map(th))}function ej(e){return eM(e=td(e),"iterate",eU),e}let eV={__proto__:null,[Symbol.iterator](){return eG(this,Symbol.iterator,th)},concat(...e){return eF(this).concat(...e.map(e=>C(e)?eF(e):e))},entries(){return eG(this,"entries",e=>(e[1]=th(e[1]),e))},every(e,t){return ez(this,"every",e,t,void 0,arguments)},filter(e,t){return ez(this,"filter",e,t,e=>e.map(th),arguments)},find(e,t){return ez(this,"find",e,t,th,arguments)},findIndex(e,t){return ez(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ez(this,"findLast",e,t,th,arguments)},findLastIndex(e,t){return ez(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ez(this,"forEach",e,t,void 0,arguments)},includes(...e){return eq(this,"includes",e)},indexOf(...e){return eq(this,"indexOf",e)},join(e){return eF(this).join(e)},lastIndexOf(...e){return eq(this,"lastIndexOf",e)},map(e,t){return ez(this,"map",e,t,void 0,arguments)},pop(){return eJ(this,"pop")},push(...e){return eJ(this,"push",e)},reduce(e,...t){return eW(this,"reduce",e,t)},reduceRight(e,...t){return eW(this,"reduceRight",e,t)},shift(){return eJ(this,"shift")},some(e,t){return ez(this,"some",e,t,void 0,arguments)},splice(...e){return eJ(this,"splice",e)},toReversed(){return eF(this).toReversed()},toSorted(e){return eF(this).toSorted(e)},toSpliced(...e){return eF(this).toSpliced(...e)},unshift(...e){return eJ(this,"unshift",e)},values(){return eG(this,"values",th)}};function eG(e,t,n){let r=ej(e),i=r[t]();return r===e||tc(e)||(i._next=i.next,i.next=()=>{let e=i._next();return e.value&&(e.value=n(e.value)),e}),i}let eH=Array.prototype;function ez(e,t,n,r,i,o){let a=ej(e),s=a!==e&&!tc(e),l=a[t];if(l!==eH[t]){let t=l.apply(e,o);return s?th(t):t}let u=n;a!==e&&(s?u=function(t,r){return n.call(this,th(t),r,e)}:n.length>2&&(u=function(t,r){return n.call(this,t,r,e)}));let c=l.call(a,u,r);return s&&i?i(c):c}function eW(e,t,n,r){let i=ej(e),o=n;return i!==e&&(tc(e)?n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}):o=function(t,r,i){return n.call(this,t,th(r),i,e)}),i[t](o,...r)}function eq(e,t,n){let r=td(e);eM(r,"iterate",eU);let i=r[t](...n);return(-1===i||!1===i)&&tf(n[0])?(n[0]=td(n[0]),r[t](...n)):i}function eJ(e,t,n=[]){eA(),eg++;let r=td(e)[t].apply(e,n);return e_(),eO(),r}let eK=y("__proto__,__v_isRef,__isVue"),e$=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(U));function eY(e){U(e)||(e=String(e));let t=td(this);return eM(t,"has",e),t.hasOwnProperty(e)}class eQ{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(r?i?tr:tn:i?tt:te).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let o=C(e);if(!r){let e;if(o&&(e=eV[t]))return e;if("hasOwnProperty"===t)return eY}let a=Reflect.get(e,t,tv(e)?e:n);return(U(t)?e$.has(t):eK(t))||(r||eM(e,"get",t),i)?a:tv(a)?o&&H(t)?a:a.value:M(a)?r?ta(a):ti(a):a}}class eX extends eQ{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=tu(i);if(tc(n)||tu(n)||(i=td(i),n=td(n)),!C(e)&&tv(i)&&!tv(n))if(t)return!1;else return i.value=n,!0}let o=C(e)&&H(t)?Number(t)<e.length:O(e,t),a=Reflect.set(e,t,n,tv(e)?e:r);return e===td(r)&&(o?X(n,i)&&eN(e,"set",t,n,i):eN(e,"add",t,n)),a}deleteProperty(e,t){let n=O(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&eN(e,"delete",t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return U(t)&&e$.has(t)||eM(e,"has",t),n}ownKeys(e){return eM(e,"iterate",C(e)?"length":eL),Reflect.ownKeys(e)}}class eZ extends eQ{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}let e0=new eX,e1=new eZ,e2=new eX(!0),e5=e=>e,e4=e=>Reflect.getPrototypeOf(e);function e3(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function e8(e,t){let n=function(e,t){let n={get(n){let r=this.__v_raw,i=td(r),o=td(n);e||(X(n,o)&&eM(i,"get",n),eM(i,"get",o));let{has:a}=e4(i),s=t?e5:e?tp:th;return a.call(i,n)?s(r.get(n)):a.call(i,o)?s(r.get(o)):void(r!==i&&r.get(n))},get size(){let t=this.__v_raw;return e||eM(td(t),"iterate",eL),Reflect.get(t,"size",t)},has(t){let n=this.__v_raw,r=td(n),i=td(t);return e||(X(t,i)&&eM(r,"has",t),eM(r,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,o=i.__v_raw,a=td(o),s=t?e5:e?tp:th;return e||eM(a,"iterate",eL),o.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return E(n,e?{add:e3("add"),set:e3("set"),delete:e3("delete"),clear:e3("clear")}:{add(e){t||tc(e)||tu(e)||(e=td(e));let n=td(this);return e4(n).has.call(n,e)||(n.add(e),eN(n,"add",e,e)),this},set(e,n){t||tc(n)||tu(n)||(n=td(n));let r=td(this),{has:i,get:o}=e4(r),a=i.call(r,e);a||(e=td(e),a=i.call(r,e));let s=o.call(r,e);return r.set(e,n),a?X(n,s)&&eN(r,"set",e,n,s):eN(r,"add",e,n),this},delete(e){let t=td(this),{has:n,get:r}=e4(t),i=n.call(t,e);i||(e=td(e),i=n.call(t,e));let o=r?r.call(t,e):void 0,a=t.delete(e);return i&&eN(t,"delete",e,void 0,o),a},clear(){let e=td(this),t=0!==e.size,n=e.clear();return t&&eN(e,"clear",void 0,void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=function(...n){let i=this.__v_raw,o=td(i),a=I(o),s="entries"===r||r===Symbol.iterator&&a,l=i[r](...n),u=t?e5:e?tp:th;return e||eM(o,"iterate","keys"===r&&a?eB:eL),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}),n}(e,t);return(t,r,i)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(O(n,r)&&r in t?n:t,r,i)}let e6={get:e8(!1,!1)},e9={get:e8(!1,!0)},e7={get:e8(!0,!1)},te=new WeakMap,tt=new WeakMap,tn=new WeakMap,tr=new WeakMap;function ti(e){return tu(e)?e:ts(e,!1,e0,e6,te)}function to(e){return ts(e,!1,e2,e9,tt)}function ta(e){return ts(e,!0,e1,e7,tn)}function ts(e,t,n,r,i){if(!M(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let o=i.get(e);if(o)return o;let a=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(V(e));if(0===a)return e;let s=new Proxy(e,2===a?r:n);return i.set(e,s),s}function tl(e){return tu(e)?tl(e.__v_raw):!!(e&&e.__v_isReactive)}function tu(e){return!!(e&&e.__v_isReadonly)}function tc(e){return!!(e&&e.__v_isShallow)}function tf(e){return!!e&&!!e.__v_raw}function td(e){let t=e&&e.__v_raw;return t?td(t):e}let th=e=>M(e)?ti(e):e,tp=e=>M(e)?ta(e):e;function tv(e){return!!e&&!0===e.__v_isRef}function tm(e){return tg(e,!1)}function tg(e,t){return tv(e)?e:new ty(e,t)}class ty{constructor(e,t){this.dep=new eR,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:td(e),this._value=t?e:th(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||tc(e)||tu(e);X(e=n?e:td(e),t)&&(this._rawValue=e,this._value=n?e:th(e),this.dep.trigger())}}function t_(e){return tv(e)?e.value:e}let tb={get:(e,t,n)=>"__v_raw"===t?e:t_(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return tv(i)&&!tv(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function tw(e){return tl(e)?e:new Proxy(e,tb)}class tx{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eR,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}class tk{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eP.get(e);return n&&n.get(t)}(td(this._object),this._key)}}class tS{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eR(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eI-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&r!==this)return ey(this,!0),!0}get value(){let e=this.dep.track();return ek(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let tE={},tT=new WeakMap;function tA(e,t=1/0,n){if(t<=0||!M(e)||e.__v_skip||(n=n||new Set).has(e))return e;if(n.add(e),t--,tv(e))tA(e.value,t,n);else if(C(e))for(let r=0;r<e.length;r++)tA(e[r],t,n);else if(D(e)||I(e))e.forEach(e=>{tA(e,t,n)});else if(G(e)){for(let r in e)tA(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&tA(e[r],t,n)}return e}let tO=!1;function tC(e,t,n,r){try{return r?e(...r):e()}catch(e){tD(e,t,n)}}function tI(e,t,n,r){if(L(e)){let i=tC(e,t,n,r);return i&&N(i)&&i.catch(e=>{tD(e,t,n)}),i}if(C(e)){let i=[];for(let o=0;o<e.length;o++)i.push(tI(e[o],t,n,r));return i}}function tD(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||_;if(t){let r=t.parent,i=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(!1===t[n](e,i,a))return}r=r.parent}if(o){eA(),tC(o,null,10,[e,i,a]),eO();return}}!function(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}(e,0,0,r,a)}let tR=[],tP=-1,tL=[],tB=null,tU=0,tM=Promise.resolve(),tN=null;function tF(e){let t=tN||tM;return e?t.then(this?e.bind(this):e):t}function tj(e){if(!(1&e.flags)){let t=tW(e),n=tR[tR.length-1];!n||!(2&e.flags)&&t>=tW(n)?tR.push(e):tR.splice(function(e){let t=tP+1,n=tR.length;for(;t<n;){let r=t+n>>>1,i=tR[r],o=tW(i);o<e||o===e&&2&i.flags?t=r+1:n=r}return t}(t),0,e),e.flags|=1,tV()}}function tV(){tN||(tN=tM.then(function e(t){try{for(tP=0;tP<tR.length;tP++){let e=tR[tP];e&&!(8&e.flags)&&(4&e.flags&&(e.flags&=-2),tC(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;tP<tR.length;tP++){let e=tR[tP];e&&(e.flags&=-2)}tP=-1,tR.length=0,tz(t),tN=null,(tR.length||tL.length)&&e(t)}}))}function tG(e){C(e)?tL.push(...e):tB&&-1===e.id?tB.splice(tU+1,0,e):1&e.flags||(tL.push(e),e.flags|=1),tV()}function tH(e,t,n=tP+1){for(;n<tR.length;n++){let t=tR[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;tR.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function tz(e){if(tL.length){let e=[...new Set(tL)].sort((e,t)=>tW(e)-tW(t));if(tL.length=0,tB)return void tB.push(...e);for(tU=0,tB=e;tU<tB.length;tU++){let e=tB[tU];4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}tB=null,tU=0}}let tW=e=>null==e.id?2&e.flags?-1:1/0:e.id,tq=[],tJ=null,tK=null;function t$(e){let t=tJ;return tJ=e,tK=e&&e.type.__scopeId||null,t}function tY(e,t=tJ,n){if(!t||e._n)return e;let r=(...n)=>{let i;r._d&&r3(-1);let o=t$(t);try{i=e(...n)}finally{t$(o),r._d&&r3(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function tQ(e,t){if(null===tJ)return e;let n=iA(tJ),r=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[i,o,a,s=_]=t[e];i&&(L(i)&&(i={mounted:i,updated:i}),i.deep&&tA(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:s}))}return e}function tX(e,t,n,r){let i=e.dirs,o=t&&t.dirs;for(let a=0;a<i.length;a++){let s=i[a];o&&(s.oldValue=o[a].value);let l=s.dir[r];l&&(eA(),tI(l,n,8,[e.el,s,e,t]),eO())}}let tZ=Symbol("_vte"),t0=e=>e.__isTeleport,t1=e=>e&&(e.disabled||""===e.disabled),t2=e=>e&&(e.defer||""===e.defer),t5=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,t4=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,t3=(e,t)=>{let n=e&&e.to;return B(n)?t?t(n):null:n},t8={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,o,a,s,l,u){let{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:m,createComment:g}}=u,y=t1(t.props),{shapeFlag:_,children:b,dynamicChildren:w}=t;if(null==e){let e=t.el=m(""),u=t.anchor=m("");h(e,n,r),h(u,n,r);let f=(e,t)=>{16&_&&(i&&i.isCE&&(i.ce._teleportTarget=e),c(b,e,t,i,o,a,s,l))},d=()=>{let e=t.target=t3(t.props,p),n=t7(e,t,m,h);e&&("svg"!==a&&t5(e)?a="svg":"mathml"!==a&&t4(e)&&(a="mathml"),y||(f(e,n),t9(t,!1)))};y&&(f(n,u),t9(t,!0)),t2(t.props)?rS(()=>{d(),t.el.__isMounted=!0},o):d()}else{if(t2(t.props)&&!e.el.__isMounted)return void rS(()=>{t8.process(e,t,n,r,i,o,a,s,l,u),delete e.el.__isMounted},o);t.el=e.el,t.targetStart=e.targetStart;let c=t.anchor=e.anchor,h=t.target=e.target,m=t.targetAnchor=e.targetAnchor,g=t1(e.props),_=g?n:h,b=g?c:m;if("svg"===a||t5(h)?a="svg":("mathml"===a||t4(h))&&(a="mathml"),w?(d(e.dynamicChildren,w,_,i,o,a,s),rO(e,t,!0)):l||f(e,t,_,b,i,o,a,s,!1),y)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):t6(t,n,c,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=t3(t.props,p);e&&t6(t,e,null,u,0)}else g&&t6(t,h,m,u,1);t9(t,y)}},remove(e,t,n,{um:r,o:{remove:i}},o){let{shapeFlag:a,children:s,anchor:l,targetStart:u,targetAnchor:c,target:f,props:d}=e;if(f&&(i(u),i(c)),o&&i(l),16&a){let e=o||!t1(d);for(let i=0;i<s.length;i++){let o=s[i];r(o,t,n,e,!!o.dynamicChildren)}}},move:t6,hydrate:function(e,t,n,r,i,o,{o:{nextSibling:a,parentNode:s,querySelector:l,insert:u,createText:c}},f){let d=t.target=t3(t.props,l);if(d){let l=t1(t.props),h=d._lpa||d.firstChild;if(16&t.shapeFlag)if(l)t.anchor=f(a(e),t,s(e),n,r,i,o),t.targetStart=h,t.targetAnchor=h&&a(h);else{t.anchor=a(e);let s=h;for(;s;){if(s&&8===s.nodeType){if("teleport start anchor"===s.data)t.targetStart=s;else if("teleport anchor"===s.data){t.targetAnchor=s,d._lpa=t.targetAnchor&&a(t.targetAnchor);break}}s=a(s)}t.targetAnchor||t7(d,t,c,u),f(h&&a(h),t,d,n,r,i,o)}t9(t,l)}return t.anchor&&a(t.anchor)}};function t6(e,t,n,{o:{insert:r},m:i},o=2){0===o&&r(e.targetAnchor,t,n);let{el:a,anchor:s,shapeFlag:l,children:u,props:c}=e,f=2===o;if(f&&r(a,t,n),(!f||t1(c))&&16&l)for(let e=0;e<u.length;e++)i(u[e],t,n,2);f&&r(s,t,n)}function t9(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)1===r.nodeType&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function t7(e,t,n,r){let i=t.targetStart=n(""),o=t.targetAnchor=n("");return i[tZ]=o,e&&(r(i,e),r(o,e)),o}let ne=Symbol("_leaveCb"),nt=Symbol("_enterCb"),nn=[Function,Array],nr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nn,onEnter:nn,onAfterEnter:nn,onEnterCancelled:nn,onBeforeLeave:nn,onLeave:nn,onAfterLeave:nn,onLeaveCancelled:nn,onBeforeAppear:nn,onAppear:nn,onAfterAppear:nn,onAppearCancelled:nn},ni=e=>{let t=e.subTree;return t.component?ni(t.component):t};function no(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==rX){t=n;break}}return t}let na={name:"BaseTransition",props:nr,setup(e,{slots:t}){let n=iy(),r=function(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return nB(()=>{e.isMounted=!0}),nN(()=>{e.isUnmounting=!0}),e}();return()=>{let i=t.default&&function e(t,n=!1,r){let i=[],o=0;for(let a=0;a<t.length;a++){let s=t[a],l=null==r?s.key:String(r)+String(null!=s.key?s.key:a);s.type===rY?(128&s.patchFlag&&o++,i=i.concat(e(s.children,n,l))):(n||s.type!==rX)&&i.push(null!=l?ia(s,{key:l}):s)}if(o>1)for(let e=0;e<i.length;e++)i[e].patchFlag=-2;return i}(t.default(),!0);if(!i||!i.length)return;let o=no(i),a=td(e),{mode:s}=a;if(r.isLeaving)return nu(o);let l=nc(o);if(!l)return nu(o);let u=nl(l,a,r,n,e=>u=e);l.type!==rX&&nf(l,u);let c=n.subTree&&nc(n.subTree);if(c&&c.type!==rX&&!ie(l,c)&&ni(n).type!==rX){let e=nl(c,a,r,n);if(nf(c,e),"out-in"===s&&l.type!==rX)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave,c=void 0},nu(o);"in-out"===s&&l.type!==rX?e.delayLeave=(e,t,n)=>{ns(r,c)[String(c.key)]=c,e[ne]=()=>{t(),e[ne]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{n(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return o}}};function ns(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function nl(e,t,n,r,i){let{appear:o,mode:a,persisted:s=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:g,onAppear:y,onAfterAppear:_,onAppearCancelled:b}=t,w=String(e.key),x=ns(n,e),k=(e,t)=>{e&&tI(e,r,9,t)},S=(e,t)=>{let n=t[1];k(e,t),C(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},E={mode:a,persisted:s,beforeEnter(t){let r=l;if(!n.isMounted)if(!o)return;else r=g||l;t[ne]&&t[ne](!0);let i=x[w];i&&ie(e,i)&&i.el[ne]&&i.el[ne](),k(r,[t])},enter(e){let t=u,r=c,i=f;if(!n.isMounted)if(!o)return;else t=y||u,r=_||c,i=b||f;let a=!1,s=e[nt]=t=>{a||(a=!0,t?k(i,[e]):k(r,[e]),E.delayedLeave&&E.delayedLeave(),e[nt]=void 0)};t?S(t,[e,s]):s()},leave(t,r){let i=String(e.key);if(t[nt]&&t[nt](!0),n.isUnmounting)return r();k(d,[t]);let o=!1,a=t[ne]=n=>{o||(o=!0,r(),n?k(m,[t]):k(p,[t]),t[ne]=void 0,x[i]===e&&delete x[i])};x[i]=e,h?S(h,[t,a]):a()},clone(e){let o=nl(e,t,n,r,i);return i&&i(o),o}};return E}function nu(e){if(nS(e))return(e=ia(e)).children=null,e}function nc(e){if(!nS(e))return t0(e.type)&&e.children?no(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&L(n.default))return n.default()}}function nf(e,t){6&e.shapeFlag&&e.component?(e.transition=t,nf(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function nd(e,t){return L(e)?E({name:e.name},t,{setup:e}):e}function nh(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function np(e,t,n,r,i=!1){if(C(e))return void e.forEach((e,o)=>np(e,t&&(C(t)?t[o]:t),n,r,i));if(nk(r)&&!i){512&r.shapeFlag&&r.type.__asyncResolved&&r.component.subTree.component&&np(e,t,n,r.component.subTree);return}let o=4&r.shapeFlag?iA(r.component):r.el,a=i?null:o,{i:s,r:l}=e,u=t&&t.r,c=s.refs===_?s.refs={}:s.refs,f=s.setupState,d=td(f),h=f===_?()=>!1:e=>O(d,e);if(null!=u&&u!==l&&(B(u)?(c[u]=null,h(u)&&(f[u]=null)):tv(u)&&(u.value=null)),L(l))tC(l,s,12,[a,c]);else{let t=B(l),r=tv(l);if(t||r){let s=()=>{if(e.f){let n=t?h(l)?f[l]:c[l]:l.value;i?C(n)&&T(n,o):C(n)?n.includes(o)||n.push(o):t?(c[l]=[o],h(l)&&(f[l]=c[l])):(l.value=[o],e.k&&(c[e.k]=l.value))}else t?(c[l]=a,h(l)&&(f[l]=a)):r&&(l.value=a,e.k&&(c[e.k]=a))};a?(s.id=-1,rS(s,n)):s()}}}let nv=!1,nm=()=>{nv||(console.error("Hydration completed but contains mismatches."),nv=!0)},ng=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,ny=e=>e.namespaceURI.includes("MathML"),n_=e=>{if(1===e.nodeType){if(ng(e))return"svg";if(ny(e))return"mathml"}},nb=e=>8===e.nodeType,nw="data-allow-mismatch";function nx(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(nw);)e=e.parentElement;let n=e&&e.getAttribute(nw);if(null==n)return!1;{if(""===n)return!0;let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(null[t])}}er().requestIdleCallback||(e=>setTimeout(e,1)),er().cancelIdleCallback||(e=>clearTimeout(e));let nk=e=>!!e.type.__asyncLoader,nS=e=>e.type.__isKeepAlive,nE={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=iy(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&1===e.length?e[0]:e};let i=new Map,o=new Set,a=null,s=n.suspense,{renderer:{p:l,m:u,um:c,o:{createElement:f}}}=r,d=f("div");function h(e){nI(e),c(e,n,s,!0)}function p(e){i.forEach((t,n)=>{let r=iI(t.type);r&&!e(r)&&m(n)})}function m(e){let t=i.get(e);!t||a&&ie(t,a)?a&&nI(a):h(t),i.delete(e),o.delete(e)}r.activate=(e,t,n,r,i)=>{let o=e.component;u(e,t,n,0,s),l(o.vnode,e,t,n,o,s,r,e.slotScopeIds,i),rS(()=>{o.isDeactivated=!1,o.a&&Z(o.a);let t=e.props&&e.props.onVnodeMounted;t&&ip(t,o.parent,e)},s)},r.deactivate=e=>{let t=e.component;rC(t.m),rC(t.a),u(e,d,null,1,s),rS(()=>{t.da&&Z(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&ip(n,t.parent,e),t.isDeactivated=!0},s)},rP(()=>[e.include,e.exclude],([e,t])=>{e&&p(t=>nT(e,t)),t&&p(e=>!nT(t,e))},{flush:"post",deep:!0});let g=null,y=()=>{null!=g&&(rW(n.subTree.type)?rS(()=>{i.set(g,nD(n.subTree))},n.subTree.suspense):i.set(g,nD(n.subTree)))};return nB(y),nM(y),nN(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=nD(t);if(e.type===i.type&&e.key===i.key){nI(i);let e=i.component.da;e&&rS(e,r);return}h(e)})}),()=>{if(g=null,!t.default)return a=null;let n=t.default(),r=n[0];if(n.length>1)return a=null,n;if(!r7(r)||!(4&r.shapeFlag)&&!(128&r.shapeFlag))return a=null,r;let s=nD(r);if(s.type===rX)return a=null,s;let l=s.type,u=iI(nk(s)?s.type.__asyncResolved||{}:l),{include:c,exclude:f,max:d}=e;if(c&&(!u||!nT(c,u))||f&&u&&nT(f,u))return s.shapeFlag&=-257,a=s,r;let h=null==s.key?l:s.key,p=i.get(h);return s.el&&(s=ia(s),128&r.shapeFlag&&(r.ssContent=s)),g=h,p?(s.el=p.el,s.component=p.component,s.transition&&nf(s,s.transition),s.shapeFlag|=512,o.delete(h),o.add(h)):(o.add(h),d&&o.size>parseInt(d,10)&&m(o.values().next().value)),s.shapeFlag|=256,a=s,rW(r.type)?r:s}}};function nT(e,t){return C(e)?e.some(e=>nT(e,t)):B(e)?e.split(",").includes(t):!!P(e)&&(e.lastIndex=0,e.test(t))}function nA(e,t){nC(e,"a",t)}function nO(e,t){nC(e,"da",t)}function nC(e,t,n=ig){let r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(nR(t,r,n),n){let e=n.parent;for(;e&&e.parent;)nS(e.parent.vnode)&&function(e,t,n,r){let i=nR(t,e,r,!0);nF(()=>{T(r[t],i)},n)}(r,t,n,e),e=e.parent}}function nI(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function nD(e){return 128&e.shapeFlag?e.ssContent:e}function nR(e,t,n=ig,r=!1){if(n){let i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{eA();let i=i_(n),o=tI(t,n,e,r);return i(),eO(),o});return r?i.unshift(o):i.push(o),o}}let nP=e=>(t,n=ig)=>{ix&&"sp"!==e||nR(e,(...e)=>t(...e),n)},nL=nP("bm"),nB=nP("m"),nU=nP("bu"),nM=nP("u"),nN=nP("bum"),nF=nP("um"),nj=nP("sp"),nV=nP("rtg"),nG=nP("rtc");function nH(e,t=ig){nR("ec",e,t)}let nz="components";function nW(e,t){return nK(nz,e,!0,t)||e}let nq=Symbol.for("v-ndc");function nJ(e){return B(e)?nK(nz,e,!1)||e:e||nq}function nK(e,t,n=!0,r=!1){let i=tJ||ig;if(i){let n=i.type;if(e===nz){let e=iI(n,!1);if(e&&(e===t||e===J(t)||e===Y(J(t))))return n}let o=n$(i[e]||n[e],t)||n$(i.appContext[e],t);return!o&&r?n:o}}function n$(e,t){return e&&(e[t]||e[J(t)]||e[Y(J(t))])}function nY(e,t,n,r){let i,o=n&&n[r],a=C(e);if(a||B(e)){let n=a&&tl(e),r=!1;n&&(r=!tc(e),e=ej(e)),i=Array(e.length);for(let n=0,a=e.length;n<a;n++)i[n]=t(r?th(e[n]):e[n],n,void 0,o&&o[n])}else if("number"==typeof e){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,o&&o[n])}else if(M(e))if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,o&&o[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,a=n.length;r<a;r++){let a=n[r];i[r]=t(e[a],a,r,o&&o[r])}}else i=[];return n&&(n[r]=i),i}let nQ=e=>e?iw(e)?iA(e):nQ(e.parent):null,nX=E(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>nQ(e.parent),$root:e=>nQ(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>n8(e),$forceUpdate:e=>e.f||(e.f=()=>{tj(e.update)}),$nextTick:e=>e.n||(e.n=tF.bind(e.proxy)),$watch:e=>rL.bind(e)}),nZ=(e,t)=>e!==_&&!e.__isScriptSetup&&O(e,t),n0={get({_:e},t){let n,r,i;if("__v_skip"===t)return!0;let{ctx:o,setupState:a,data:s,props:l,accessCache:u,type:c,appContext:f}=e;if("$"!==t[0]){let r=u[t];if(void 0!==r)switch(r){case 1:return a[t];case 2:return s[t];case 4:return o[t];case 3:return l[t]}else{if(nZ(a,t))return u[t]=1,a[t];if(s!==_&&O(s,t))return u[t]=2,s[t];if((n=e.propsOptions[0])&&O(n,t))return u[t]=3,l[t];if(o!==_&&O(o,t))return u[t]=4,o[t];n4&&(u[t]=0)}}let d=nX[t];return d?("$attrs"===t&&eM(e.attrs,"get",""),d(e)):(r=c.__cssModules)&&(r=r[t])?r:o!==_&&O(o,t)?(u[t]=4,o[t]):O(i=f.config.globalProperties,t)?i[t]:void 0},set({_:e},t,n){let{data:r,setupState:i,ctx:o}=e;return nZ(i,t)?(i[t]=n,!0):r!==_&&O(r,t)?(r[t]=n,!0):!O(e.props,t)&&!("$"===t[0]&&t.slice(1)in e)&&(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!n[a]||e!==_&&O(e,a)||nZ(t,a)||(s=o[0])&&O(s,a)||O(r,a)||O(nX,a)||O(i.config.globalProperties,a)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:O(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function n1(){return function(){let e=iy();return e.setupContext||(e.setupContext=iT(e))}().slots}function n2(e){return C(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function n5(e,t){return e&&t?C(e)&&C(t)?e.concat(t):E({},n2(e),n2(t)):e||t}let n4=!0;function n3(e,t,n){tI(C(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function n8(e){let t,n=e.type,{mixins:r,extends:i}=n,{mixins:o,optionsCache:a,config:{optionMergeStrategies:s}}=e.appContext,l=a.get(n);return l?t=l:o.length||r||i?(t={},o.length&&o.forEach(e=>n6(t,e,s,!0)),n6(t,n,s)):t=n,M(n)&&a.set(n,t),t}function n6(e,t,n,r=!1){let{mixins:i,extends:o}=t;for(let a in o&&n6(e,o,n,!0),i&&i.forEach(t=>n6(e,t,n,!0)),t)if(r&&"expose"===a);else{let r=n9[a]||n&&n[a];e[a]=r?r(e[a],t[a]):t[a]}return e}let n9={data:n7,props:rr,emits:rr,methods:rn,computed:rn,beforeCreate:rt,created:rt,beforeMount:rt,mounted:rt,beforeUpdate:rt,updated:rt,beforeDestroy:rt,beforeUnmount:rt,destroyed:rt,unmounted:rt,activated:rt,deactivated:rt,errorCaptured:rt,serverPrefetch:rt,components:rn,directives:rn,watch:function(e,t){if(!e)return t;if(!t)return e;let n=E(Object.create(null),e);for(let r in t)n[r]=rt(e[r],t[r]);return n},provide:n7,inject:function(e,t){return rn(re(e),re(t))}};function n7(e,t){return t?e?function(){return E(L(e)?e.call(this,this):e,L(t)?t.call(this,this):t)}:t:e}function re(e){if(C(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function rt(e,t){return e?[...new Set([].concat(e,t))]:t}function rn(e,t){return e?E(Object.create(null),e,t):t}function rr(e,t){return e?C(e)&&C(t)?[...new Set([...e,...t])]:E(Object.create(null),n2(e),n2(null!=t?t:{})):t}function ri(){return{app:null,config:{isNativeTag:x,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ro=0,ra=null;function rs(e,t){if(ig){let n=ig.provides,r=ig.parent&&ig.parent.provides;r===n&&(n=ig.provides=Object.create(r)),n[e]=t}}function rl(e,t,n=!1){let r=ig||tJ;if(r||ra){let i=ra?ra._context.provides:r?null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&L(t)?t.call(r&&r.proxy):t}}let ru={},rc=()=>Object.create(ru),rf=e=>Object.getPrototypeOf(e)===ru;function rd(e,t,n,r){let i,[o,a]=e.propsOptions,s=!1;if(t)for(let l in t){let u;if(z(l))continue;let c=t[l];o&&O(o,u=J(l))?a&&a.includes(u)?(i||(i={}))[u]=c:n[u]=c:rF(e.emitsOptions,l)||l in r&&c===r[l]||(r[l]=c,s=!0)}if(a){let t=td(n),r=i||_;for(let i=0;i<a.length;i++){let s=a[i];n[s]=rh(o,t,s,r[s],e,!O(r,s))}}return s}function rh(e,t,n,r,i,o){let a=e[n];if(null!=a){let e=O(a,"default");if(e&&void 0===r){let e=a.default;if(a.type!==Function&&!a.skipFactory&&L(e)){let{propsDefaults:o}=i;if(n in o)r=o[n];else{let a=i_(i);r=o[n]=e.call(null,t),a()}}else r=e;i.ce&&i.ce._setProp(n,r)}a[0]&&(o&&!e?r=!1:a[1]&&(""===r||r===$(n))&&(r=!0))}return r}let rp=new WeakMap;function rv(e){return!("$"===e[0]||z(e))}let rm=e=>"_"===e[0]||"$stable"===e,rg=e=>C(e)?e.map(ic):[ic(e)],ry=(e,t,n)=>{if(t._n)return t;let r=tY((...e)=>rg(t(...e)),n);return r._c=!1,r},r_=(e,t,n)=>{let r=e._ctx;for(let n in e){if(rm(n))continue;let i=e[n];if(L(i))t[n]=ry(n,i,r);else if(null!=i){let e=rg(i);t[n]=()=>e}}},rb=(e,t)=>{let n=rg(t);e.slots.default=()=>n},rw=(e,t,n)=>{for(let r in t)(n||"_"!==r)&&(e[r]=t[r])},rx=(e,t,n)=>{let r=e.slots=rc();if(32&e.vnode.shapeFlag){let e=t._;e?(rw(r,t,n),n&&ee(r,"_",e,!0)):r_(t,r)}else t&&rb(e,t)},rk=(e,t,n)=>{let{vnode:r,slots:i}=e,o=!0,a=_;if(32&r.shapeFlag){let e=t._;e?n&&1===e?o=!1:rw(i,t,n):(o=!t.$stable,r_(t,i)),a=t}else t&&(rb(e,t),a={default:1});if(o)for(let e in i)rm(e)||null!=a[e]||delete i[e]},rS=rK;function rE({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function rT({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function rA(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rO(e,t,n=!1){let r=e.children,i=t.children;if(C(r)&&C(i))for(let e=0;e<r.length;e++){let t=r[e],o=i[e];1&o.shapeFlag&&!o.dynamicChildren&&((o.patchFlag<=0||32===o.patchFlag)&&((o=i[e]=id(i[e])).el=t.el),n||-2===o.patchFlag||rO(t,o)),o.type===rQ&&(o.el=t.el)}}function rC(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}let rI=Symbol.for("v-scx"),rD=()=>rl(rI);function rR(e,t){return rP(e,null,t)}function rP(e,n,r=_){let i,{immediate:o,deep:a,flush:s,once:l}=r,u=E({},r),c=n&&o||!n&&"post"!==s;if(ix){if("sync"===s){let e=rD();i=e.__watcherHandles||(e.__watcherHandles=[])}else if(!c){let e=()=>{};return e.stop=w,e.resume=w,e.pause=w,e}}let f=ig;u.call=(e,t,n)=>tI(e,f,t,n);let d=!1;"post"===s?u.scheduler=e=>{rS(e,f&&f.suspense)}:"sync"!==s&&(d=!0,u.scheduler=(e,t)=>{t?e():tj(e)}),u.augmentJob=e=>{n&&(e.flags|=4),d&&(e.flags|=2,f&&(e.id=f.uid,e.i=f))};let h=function(e,n,r=_){let i,o,a,s,{immediate:l,deep:u,once:c,scheduler:f,augmentJob:d,call:h}=r,p=e=>u?e:tc(e)||!1===u||0===u?tA(e,1):tA(e),g=!1,y=!1;if(tv(e)?(o=()=>e.value,g=tc(e)):tl(e)?(o=()=>p(e),g=!0):C(e)?(y=!0,g=e.some(e=>tl(e)||tc(e)),o=()=>e.map(e=>tv(e)?e.value:tl(e)?p(e):L(e)?h?h(e,2):e():void 0)):o=L(e)?n?h?()=>h(e,2):e:()=>{if(a){eA();try{a()}finally{eO()}}let t=m;m=i;try{return h?h(e,3,[s]):e(s)}finally{m=t}}:w,n&&u){let e=o,t=!0===u?1/0:u;o=()=>tA(e(),t)}let b=t,x=()=>{i.stop(),b&&b.active&&T(b.effects,i)};if(c&&n){let e=n;n=(...t)=>{e(...t),x()}}let k=y?Array(e.length).fill(tE):tE,S=e=>{if(1&i.flags&&(i.dirty||e))if(n){let e=i.run();if(u||g||(y?e.some((e,t)=>X(e,k[t])):X(e,k))){a&&a();let t=m;m=i;try{let t=[e,k===tE?void 0:y&&k[0]===tE?[]:k,s];h?h(n,3,t):n(...t),k=e}finally{m=t}}}else i.run()};return d&&d(S),(i=new em(o)).scheduler=f?()=>f(S,!1):S,s=e=>(function(e,t=!1,n=m){if(n){let t=tT.get(n);t||tT.set(n,t=[]),t.push(e)}})(e,!1,i),a=i.onStop=()=>{let e=tT.get(i);if(e){if(h)h(e,4);else for(let t of e)t();tT.delete(i)}},n?l?S(!0):k=i.run():f?f(S.bind(null,!0),!0):i.run(),x.pause=i.pause.bind(i),x.resume=i.resume.bind(i),x.stop=x,x}(e,n,u);return ix&&(i?i.push(h):c&&h()),h}function rL(e,t,n){let r,i=this.proxy,o=B(e)?e.includes(".")?rB(i,e):()=>i[e]:e.bind(i,i);L(t)?r=t:(r=t.handler,n=t);let a=i_(this),s=rP(o,r.bind(i),n);return a(),s}function rB(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function rU(e,t,n=_){let r=iy(),i=J(t),o=$(t),a=rM(e,i),s=new tx((a,s)=>{let l,u,c=_;return rP(()=>{let t=e[i];X(l,t)&&(l=t,s())},null,{flush:"sync"}),{get:()=>(a(),n.get?n.get(l):l),set(e){let a=n.set?n.set(e):e;if(!X(a,l)&&!(c!==_&&X(e,c)))return;let f=r.vnode.props;f&&(t in f||i in f||o in f)&&(`onUpdate:${t}`in f||`onUpdate:${i}`in f||`onUpdate:${o}`in f)||(l=e,s()),r.emit(`update:${t}`,a),X(e,a)&&X(e,c)&&!X(a,u)&&s(),c=e,u=a}}});return s[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?a||_:s,done:!1}:{done:!0}}},s}let rM=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${J(t)}Modifiers`]||e[`${$(t)}Modifiers`];function rN(e,t,...n){let r;if(e.isUnmounted)return;let i=e.vnode.props||_,o=n,a=t.startsWith("update:"),s=a&&rM(i,t.slice(7));s&&(s.trim&&(o=n.map(e=>B(e)?e.trim():e)),s.number&&(o=n.map(et)));let l=i[r=Q(t)]||i[r=Q(J(t))];!l&&a&&(l=i[r=Q($(t))]),l&&tI(l,e,6,o);let u=i[r+"Once"];if(u){if(e.emitted){if(e.emitted[r])return}else e.emitted={};e.emitted[r]=!0,tI(u,e,6,o)}}function rF(e,t){return!!e&&!!k(t)&&(O(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||O(e,$(t))||O(e,t))}function rj(e){let t,n,{type:r,vnode:i,proxy:o,withProxy:a,propsOptions:[s],slots:l,attrs:u,emit:c,render:f,renderCache:d,props:h,data:p,setupState:m,ctx:g,inheritAttrs:y}=e,_=t$(e);try{if(4&i.shapeFlag){let e=a||o;t=ic(f.call(e,e,d,h,m,p,g)),n=u}else t=ic(r.length>1?r(h,{attrs:u,slots:l,emit:c}):r(h,null)),n=r.props?u:rV(u)}catch(n){r0.length=0,tD(n,e,1),t=io(rX)}let b=t;if(n&&!1!==y){let e=Object.keys(n),{shapeFlag:t}=b;e.length&&7&t&&(s&&e.some(S)&&(n=rG(n,s)),b=ia(b,n,!1,!0))}return i.dirs&&((b=ia(b,null,!1,!0)).dirs=b.dirs?b.dirs.concat(i.dirs):i.dirs),i.transition&&nf(b,i.transition),t=b,t$(_),t}let rV=e=>{let t;for(let n in e)("class"===n||"style"===n||k(n))&&((t||(t={}))[n]=e[n]);return t},rG=(e,t)=>{let n={};for(let r in e)S(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function rH(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let o=r[i];if(t[o]!==e[o]&&!rF(n,o))return!0}return!1}function rz({vnode:e,parent:t},n){for(;t;){let r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}let rW=e=>e.__isSuspense,rq=0;function rJ(e,t){let n=e.props&&e.props[t];isFunction(n)&&n()}function rK(e,t){t&&t.pendingBranch?C(e)?t.effects.push(...e):t.effects.push(e):tG(e)}function r$(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,rz(r,i))}let rY=Symbol.for("v-fgt"),rQ=Symbol.for("v-txt"),rX=Symbol.for("v-cmt"),rZ=Symbol.for("v-stc"),r0=[],r1=null;function r2(e=!1){r0.push(r1=e?null:[])}function r5(){r0.pop(),r1=r0[r0.length-1]||null}let r4=1;function r3(e,t=!1){r4+=e,e<0&&r1&&t&&(r1.hasOnce=!0)}function r8(e){return e.dynamicChildren=r4>0?r1||b:null,r5(),r4>0&&r1&&r1.push(e),e}function r6(e,t,n,r,i,o){return r8(ii(e,t,n,r,i,o,!0))}function r9(e,t,n,r,i){return r8(io(e,t,n,r,i,!0))}function r7(e){return!!e&&!0===e.__v_isVNode}function ie(e,t){return e.type===t.type&&e.key===t.key}let it=({key:e})=>null!=e?e:null,ir=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?B(e)||tv(e)||L(e)?{i:tJ,r:e,k:t,f:!!n}:e:null);function ii(e,t=null,n=null,r=0,i=null,o=+(e!==rY),a=!1,s=!1){let l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&it(t),ref:t&&ir(t),scopeId:tK,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:tJ};return s?(ih(l,n),128&o&&e.normalize(l)):n&&(l.shapeFlag|=B(n)?8:16),r4>0&&!a&&r1&&(l.patchFlag>0||6&o)&&32!==l.patchFlag&&r1.push(l),l}let io=function(e,t=null,n=null,r=0,i=null,o=!1){if(e&&e!==nq||(e=rX),r7(e)){let r=ia(e,t,!0);return n&&ih(r,n),r4>0&&!o&&r1&&(6&r.shapeFlag?r1[r1.indexOf(e)]=r:r1.push(r)),r.patchFlag=-2,r}if(iR(e)&&(e=e.__vccOpts),t){var a;let{class:e,style:n}=t=(a=t)?tf(a)||rf(a)?E({},a):a:null;e&&!B(e)&&(t.class=el(e)),M(n)&&(tf(n)&&!C(n)&&(n=E({},n)),t.style=ei(n))}let s=B(e)?1:rW(e)?128:t0(e)?64:M(e)?4:2*!!L(e);return ii(e,t,n,r,i,s,o,!0)};function ia(e,t,n=!1,r=!1){let{props:i,ref:o,patchFlag:a,children:s,transition:l}=e,u=t?function(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if("class"===e)t.class!==r.class&&(t.class=el([t.class,r.class]));else if("style"===e)t.style=ei([t.style,r.style]);else if(k(e)){let n=t[e],i=r[e];i&&n!==i&&!(C(n)&&n.includes(i))&&(t[e]=n?[].concat(n,i):i)}else""!==e&&(t[e]=r[e])}return t}(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&it(u),ref:t&&t.ref?n&&o?C(o)?o.concat(ir(t)):[o,ir(t)]:ir(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==rY?-1===a?16:16|a:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ia(e.ssContent),ssFallback:e.ssFallback&&ia(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&nf(c,l.clone(c)),c}function is(e){let t=ia(e);return isArray(e.children)&&(t.children=e.children.map(is)),t}function il(e=" ",t=0){return io(rQ,null,e,t)}function iu(e="",t=!1){return t?(r2(),r9(rX,null,e)):io(rX,null,e)}function ic(e){return null==e||"boolean"==typeof e?io(rX):C(e)?io(rY,null,e.slice()):r7(e)?id(e):io(rQ,null,String(e))}function id(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:ia(e)}function ih(e,t){let n=0,{shapeFlag:r}=e;if(null==t)t=null;else if(C(t))n=16;else if("object"==typeof t)if(65&r){let n=t.default;n&&(n._c&&(n._d=!1),ih(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;r||rf(t)?3===r&&tJ&&(1===tJ.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=tJ}else L(t)?(t={default:t,_ctx:tJ},n=32):(t=String(t),64&r?(n=16,t=[il(t)]):n=8);e.children=t,e.shapeFlag|=n}function ip(e,t,n,r=null){tI(e,t,7,[n,r])}let iv=ri(),im=0,ig=null,iy=()=>ig||tJ;{let e=er(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};u=t("__VUE_INSTANCE_SETTERS__",e=>ig=e),c=t("__VUE_SSR_SETTERS__",e=>ix=e)}let i_=e=>{let t=ig;return u(e),e.scope.on(),()=>{e.scope.off(),u(t)}},ib=()=>{ig&&ig.scope.off(),u(null)};function iw(e){return 4&e.vnode.shapeFlag}let ix=!1;function ik(e,t,n){L(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:M(t)&&(e.setupState=tw(t)),iS(e,n)}function iS(e,t,n){let r=e.type;if(!e.render){if(!t&&f&&!r.render){let t=r.template||n8(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:o,compilerOptions:a}=r;r.render=f(t,E(E({isCustomElement:n,delimiters:o},i),a))}}e.render=r.render||w,d&&d(e)}{let t=i_(e);eA();try{!function(e){let t=n8(e),n=e.proxy,r=e.ctx;n4=!1,t.beforeCreate&&n3(t.beforeCreate,e,"bc");let{data:i,computed:o,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:m,deactivated:g,beforeDestroy:y,beforeUnmount:_,destroyed:b,unmounted:x,render:k,renderTracked:S,renderTriggered:E,errorCaptured:T,serverPrefetch:A,expose:O,inheritAttrs:I,components:D,directives:R,filters:P}=t;if(u&&function(e,t,n=w){for(let n in C(e)&&(e=re(e)),e){let r,i=e[n];tv(r=M(i)?"default"in i?rl(i.from||n,i.default,!0):rl(i.from||n):rl(i))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(u,r,null),a)for(let e in a){let t=a[e];L(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);M(t)&&(e.data=ti(t))}if(n4=!0,o)for(let e in o){let t=o[e],i=L(t)?t.bind(n,n):L(t.get)?t.get.bind(n,n):w,a=iP({get:i,set:!L(t)&&L(t.set)?t.set.bind(n):w});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(s)for(let e in s)!function e(t,n,r,i){let o=i.includes(".")?rB(r,i):()=>r[i];if(B(t)){let e=n[t];var a,s,l,u,c,f=void 0;L(e)&&(u=o,c=e,rP(u,c,void 0))}else if(L(t)){var d,h,p=void 0;d=o,h=t.bind(r),rP(d,h,void 0)}else if(M(t))if(C(t))t.forEach(t=>e(t,n,r,i));else{let e=L(t.handler)?t.handler.bind(r):n[t.handler];L(e)&&(a=o,s=e,l=t,rP(a,s,l))}}(s[e],r,n,e);if(l){let e=L(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{rs(t,e[t])})}function U(e,t){C(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(c&&n3(c,e,"c"),U(nL,f),U(nB,d),U(nU,h),U(nM,p),U(nA,m),U(nO,g),U(nH,T),U(nG,S),U(nV,E),U(nN,_),U(nF,x),U(nj,A),C(O))if(O.length){let t=e.exposed||(e.exposed={});O.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={});k&&e.render===w&&(e.render=k),null!=I&&(e.inheritAttrs=I),D&&(e.components=D),R&&(e.directives=R),A&&nh(e)}(e)}finally{eO(),t()}}}let iE={get:(e,t)=>(eM(e,"get",""),e[t])};function iT(e){return{attrs:new Proxy(e.attrs,iE),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function iA(e){var t;return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tw((!O(t=e.exposed,"__v_skip")&&Object.isExtensible(t)&&ee(t,"__v_skip",!0),t)),{get:(t,n)=>n in t?t[n]:n in nX?nX[n](e):void 0,has:(e,t)=>t in e||t in nX})):e.proxy}let iO=/(?:^|[-_])(\w)/g,iC=e=>e.replace(iO,e=>e.toUpperCase()).replace(/[-_]/g,"");function iI(e,t=!0){return L(e)?e.displayName||e.name:e.name||t&&e.__name}function iD(e,t,n=!1){let r=iI(t);if(!r&&t.__file){let e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(r=e[1])}if(!r&&e&&e.parent){let n=e=>{for(let n in e)if(e[n]===t)return n};r=n(e.components||e.parent.type.components)||n(e.appContext.components)}return r?iC(r):n?"App":"Anonymous"}function iR(e){return L(e)&&"__vccOpts"in e}let iP=(e,t)=>(function(e,t,n=!1){let r,i;return L(e)?r=e:(r=e.get,i=e.set),new tS(r,i,n)})(e,0,ix);function iL(e,t,n){let r=arguments.length;return 2!==r?(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&r7(n)&&(n=[n]),io(e,t,n)):!M(t)||C(t)?io(e,null,t):r7(t)?io(e,null,[t]):io(e,t)}let iB="3.5.13",iU="undefined"!=typeof window&&window.trustedTypes;if(iU)try{g=iU.createPolicy("vue",{createHTML:e=>e})}catch(e){}let iM=g?e=>g.createHTML(e):e=>e,iN="undefined"!=typeof document?document:null,iF=iN&&iN.createElement("template"),ij="transition",iV="animation",iG=Symbol("_vtc"),iH={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},iz=E({},nr,iH),iW=(e=>(e.displayName="Transition",e.props=iz,e))((e,{slots:t})=>iL(na,function(e){let t={};for(let n in e)n in iH||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=function(e){if(null==e)return null;{if(M(e))return[function(e){return en(e)}(e.enter),function(e){return en(e)}(e.leave)];let t=function(e){return en(e)}(e);return[t,t]}}(i),m=p&&p[0],g=p&&p[1],{onBeforeEnter:y,onEnter:_,onEnterCancelled:b,onLeave:w,onLeaveCancelled:x,onBeforeAppear:k=y,onAppear:S=_,onAppearCancelled:T=b}=t,A=(e,t,n,r)=>{e._enterCancelled=r,iY(e,t?c:s),iY(e,t?u:a),n&&n()},O=(e,t)=>{e._isLeaving=!1,iY(e,f),iY(e,h),iY(e,d),t&&t()},C=e=>(t,n)=>{let i=e?S:_,a=()=>A(t,e,n);iq(i,[t,a]),iQ(()=>{iY(t,e?l:o),i$(t,e?c:s),iJ(i)||iZ(t,r,m,a)})};return E(t,{onBeforeEnter(e){iq(y,[e]),i$(e,o),i$(e,a)},onBeforeAppear(e){iq(k,[e]),i$(e,l),i$(e,u)},onEnter:C(!1),onAppear:C(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>O(e,t);i$(e,f),e._enterCancelled?(i$(e,d),i2()):(i2(),i$(e,d)),iQ(()=>{e._isLeaving&&(iY(e,f),i$(e,h),iJ(w)||iZ(e,r,g,n))}),iq(w,[e,n])},onEnterCancelled(e){A(e,!1,void 0,!0),iq(b,[e])},onAppearCancelled(e){A(e,!0,void 0,!0),iq(T,[e])},onLeaveCancelled(e){O(e),iq(x,[e])}})}(e),t)),iq=(e,t=[])=>{C(e)?e.forEach(e=>e(...t)):e&&e(...t)},iJ=e=>!!e&&(C(e)?e.some(e=>e.length>1):e.length>1);function iK(e){return en(e)}function i$(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[iG]||(e[iG]=new Set)).add(t)}function iY(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[iG];n&&(n.delete(t),n.size||(e[iG]=void 0))}function iQ(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let iX=0;function iZ(e,t,n,r){let i=e._endId=++iX,o=()=>{i===e._endId&&r()};if(null!=n)return setTimeout(o,n);let{type:a,timeout:s,propCount:l}=function(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||"").split(", "),i=r(`${ij}Delay`),o=r(`${ij}Duration`),a=i0(i,o),s=r(`${iV}Delay`),l=r(`${iV}Duration`),u=i0(s,l),c=null,f=0,d=0;t===ij?a>0&&(c=ij,f=a,d=o.length):t===iV?u>0&&(c=iV,f=u,d=l.length):d=(c=(f=Math.max(a,u))>0?a>u?ij:iV:null)?c===ij?o.length:l.length:0;let h=c===ij&&/\b(transform|all)(,|$)/.test(r(`${ij}Property`).toString());return{type:c,timeout:f,propCount:d,hasTransform:h}}(e,t);if(!a)return r();let u=a+"end",c=0,f=()=>{e.removeEventListener(u,d),o()},d=t=>{t.target===e&&++c>=l&&f()};setTimeout(()=>{c<l&&f()},s+1),e.addEventListener(u,d)}function i0(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>i1(t)+i1(e[n])))}function i1(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function i2(){return document.body.offsetHeight}let i5=Symbol("_vod"),i4=Symbol("_vsh"),i3={beforeMount(e,{value:t},{transition:n}){e[i5]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):i8(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),i8(e,!0),r.enter(e)):r.leave(e,()=>{i8(e,!1)}):i8(e,t))},beforeUnmount(e,{value:t}){i8(e,t)}};function i8(e,t){e.style.display=t?e[i5]:"none",e[i4]=!t}let i6=Symbol(""),i9=/(^|;)\s*display\s*:/,i7=/\s*!important$/;function oe(e,t,n){if(C(n))n.forEach(n=>oe(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let r=function(e,t){let n=on[t];if(n)return n;let r=J(t);if("filter"!==r&&r in e)return on[t]=r;r=Y(r);for(let n=0;n<ot.length;n++){let i=ot[n]+r;if(i in e)return on[t]=i}return t}(e,t);i7.test(n)?e.setProperty($(r),n.replace(i7,""),"important"):e[r]=n}}let ot=["Webkit","Moz","ms"],on={},or="http://www.w3.org/1999/xlink";function oi(e,t,n,r,i,o=eu(t)){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(or,t.slice(6,t.length)):e.setAttributeNS(or,t,n);else null==n||o&&!(n||""===n)?e.removeAttribute(t):e.setAttribute(t,o?"":U(n)?String(n):n)}function oo(e,t,n,r,i){if("innerHTML"===t||"textContent"===t){null!=n&&(e[t]="innerHTML"===t?iM(n):n);return}let o=e.tagName;if("value"===t&&"PROGRESS"!==o&&!o.includes("-")){let r="OPTION"===o?e.getAttribute("value")||"":e.value,i=null==n?"checkbox"===e.type?"on":"":String(n);r===i&&"_value"in e||(e.value=i),null==n&&e.removeAttribute(t),e._value=n;return}let a=!1;if(""===n||null==n){let r=typeof e[t];if("boolean"===r){var s;n=!!(s=n)||""===s}else null==n&&"string"===r?(n="",a=!0):"number"===r&&(n=0,a=!0)}try{e[t]=n}catch(e){}a&&e.removeAttribute(i||t)}function oa(e,t,n,r){e.addEventListener(t,n,r)}let os=Symbol("_vei"),ol=/(?:Once|Passive|Capture)$/,ou=0,oc=Promise.resolve(),of=()=>ou||(oc.then(()=>ou=0),ou=Date.now()),od=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),oh={},op="undefined"!=typeof HTMLElement?HTMLElement:class{};class ov extends op{constructor(e,t={},n=oC){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==oC?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof ov){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,tF(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(e=>{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:r,styles:i}=e;if(r&&!C(r))for(let e in r){let t=r[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=en(this._props[e])),(n||(n=Object.create(null)))[J(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(i),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)O(this,e)||Object.defineProperty(this,e,{get:()=>t_(t[e])})}_resolveProps(e){let{props:t}=e,n=C(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(J))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):oh,r=J(e);t&&this._numberProps&&this._numberProps[r]&&(n=en(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(t===oh?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute($(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute($(e),t+""):t||this.removeAttribute($(e)),n&&n.observe(this,{attributes:!0})}}_update(){oO(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=io(this._def,E(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,G(t[0])?E({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),$(e)!==e&&t($(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let r=document.createElement("style");n&&r.setAttribute("nonce",n),r.textContent=e[t],this.shadowRoot.prepend(r)}}_parseSlots(){let e,t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute("name")||"default",o=this._slots[i],a=r.parentNode;if(o)for(let e of o){if(t&&1===e.nodeType){let n,r=t+"-s",i=document.createTreeWalker(e,1);for(e.setAttribute(r,"");n=i.nextNode();)n.setAttribute(r,"")}a.insertBefore(e,r)}else for(;r.firstChild;)a.insertBefore(r.firstChild,r);a.removeChild(r)}}_injectChildStyle(e){this._applyStyles(e.styles,e)}_removeChildStyle(e){}}Symbol("_moveCb"),Symbol("_enterCb");let om=e=>{let t=e.props["onUpdate:modelValue"]||!1;return C(t)?e=>Z(t,e):t};function og(e){e.target.composing=!0}function oy(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let o_=Symbol("_assign"),ob={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[o_]=om(i);let o=r||i.props&&"number"===i.props.type;oa(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),o&&(r=et(r)),e[o_](r)}),n&&oa(e,"change",()=>{e.value=e.value.trim()}),t||(oa(e,"compositionstart",og),oa(e,"compositionend",oy),oa(e,"change",oy))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:o}},a){if(e[o_]=om(a),e.composing)return;let s=(o||"number"===e.type)&&!/^0\d/.test(e.value)?et(e.value):e.value,l=null==t?"":t;if(s!==l){if(document.activeElement===e&&"range"!==e.type&&(r&&t===n||i&&e.value.trim()===l))return;e.value=l}}},ow=["ctrl","shift","alt","meta"],ox={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>ow.some(n=>e[`${n}Key`]&&!t.includes(n))},ok=(e,t)=>{let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(n,...r)=>{for(let e=0;e<t.length;e++){let r=ox[t[e]];if(r&&r(n,t))return}return e(n,...r)})},oS={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},oE=(e,t)=>{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=n=>{if(!("key"in n))return;let r=$(n.key);if(t.some(e=>e===r||oS[e]===r))return e(n)})},oT=E({patchProp:(e,t,n,r,i,o)=>{let a="svg"===i;"class"===t?function(e,t,n){let r=e[iG];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,a):"style"===t?function(e,t,n){let r=e.style,i=B(n),o=!1;if(n&&!i){if(t)if(B(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&oe(r,t,"")}else for(let e in t)null==n[e]&&oe(r,e,"");for(let e in n)"display"===e&&(o=!0),oe(r,e,n[e])}else if(i){if(t!==n){let e=r[i6];e&&(n+=";"+e),r.cssText=n,o=i9.test(n)}}else t&&e.removeAttribute("style");i5 in e&&(e[i5]=o?r.display:"",e[i4]&&(r.display="none"))}(e,n,r):k(t)?S(t)||function(e,t,n,r,i=null){let o=e[os]||(e[os]={}),a=o[t];if(r&&a)a.value=r;else{let[n,s]=function(e){let t;if(ol.test(e)){let n;for(t={};n=e.match(ol);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):$(e.slice(2)),t]}(t);if(r)oa(e,n,o[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tI(function(e,t){if(!C(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=of(),n}(r,i),s);else a&&(e.removeEventListener(n,a,s),o[t]=void 0)}}(e,t,0,r,o):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,r){if(r)return!!("innerHTML"===t||"textContent"===t||t in e&&od(t)&&L(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(od(t)&&B(n))&&t in e}(e,t,r,a))?e._isVueCE&&(/[A-Z]/.test(t)||!B(r))?oo(e,J(t),r,o,t):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),oi(e,t,r,a)):(oo(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||oi(e,t,r,a,o,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i="svg"===t?iN.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?iN.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?iN.createElement(e,{is:n}):iN.createElement(e);return"select"===e&&r&&null!=r.multiple&&i.setAttribute("multiple",r.multiple),i},createText:e=>iN.createTextNode(e),createComment:e=>iN.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>iN.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){let a=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==o&&(i=i.nextSibling););else{iF.innerHTML=iM("svg"===r?`<svg>${e}</svg>`:"mathml"===r?`<math>${e}</math>`:e);let i=iF.content;if("svg"===r||"mathml"===r){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}});function oA(){return h||(h=function(e,t){var n;let r,i;er().__VUE__=!0;let{insert:o,remove:a,patchProp:s,createElement:l,createText:u,createComment:f,setText:d,setElementText:h,parentNode:p,nextSibling:m,setScopeId:g=w,insertStaticContent:y}=e,x=(e,t,n,r=null,i=null,o=null,a,s=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!ie(e,t)&&(r=es(e),et(e,i,o,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);let{type:u,ref:c,shapeFlag:f}=t;switch(u){case rQ:k(e,t,n,r);break;case rX:S(e,t,n,r);break;case rZ:null==e&&T(t,n,r,a);break;case rY:V(e,t,n,r,i,o,a,s,l);break;default:1&f?D(e,t,n,r,i,o,a,s,l):6&f?G(e,t,n,r,i,o,a,s,l):(64&f||128&f)&&u.process(e,t,n,r,i,o,a,s,l,ec)}null!=c&&i&&np(c,e&&e.ref,o,t||e,!t)},k=(e,t,n,r)=>{if(null==e)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},S=(e,t,n,r)=>{null==e?o(t.el=f(t.children||""),n,r):t.el=e.el},T=(e,t,n,r)=>{[e.el,e.anchor]=y(e.children,t,n,r,e.el,e.anchor)},A=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=m(e),o(e,n,r),e=i;o(t,n,r)},I=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),a(e),e=n;a(t)},D=(e,t,n,r,i,o,a,s,l)=>{"svg"===t.type?a="svg":"math"===t.type&&(a="mathml"),null==e?R(t,n,r,i,o,a,s,l):U(e,t,i,o,a,s,l)},R=(e,t,n,r,i,a,u,c)=>{let f,d,{props:p,shapeFlag:m,transition:g,dirs:y}=e;if(f=e.el=l(e.type,a,p&&p.is,p),8&m?h(f,e.children):16&m&&B(e.children,f,null,r,i,rE(e,a),u,c),y&&tX(e,null,r,"created"),P(f,e,e.scopeId,u,r),p){for(let e in p)"value"===e||z(e)||s(f,e,null,p[e],a,r);"value"in p&&s(f,"value",null,p.value,a),(d=p.onVnodeBeforeMount)&&ip(d,r,e)}y&&tX(e,null,r,"beforeMount");let _=rA(i,g);_&&g.beforeEnter(f),o(f,t,n),((d=p&&p.onVnodeMounted)||_||y)&&rS(()=>{d&&ip(d,r,e),_&&g.enter(f),y&&tX(e,null,r,"mounted")},i)},P=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||rW(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;P(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},B=(e,t,n,r,i,o,a,s,l=0)=>{for(let u=l;u<e.length;u++)x(null,e[u]=s?id(e[u]):ic(e[u]),t,n,r,i,o,a,s)},U=(e,t,n,r,i,o,a)=>{let l,u=t.el=e.el,{patchFlag:c,dynamicChildren:f,dirs:d}=t;c|=16&e.patchFlag;let p=e.props||_,m=t.props||_;if(n&&rT(n,!1),(l=m.onVnodeBeforeUpdate)&&ip(l,n,t,e),d&&tX(t,e,n,"beforeUpdate"),n&&rT(n,!0),(p.innerHTML&&null==m.innerHTML||p.textContent&&null==m.textContent)&&h(u,""),f?F(e.dynamicChildren,f,u,n,r,rE(t,i),o):a||Y(e,t,u,null,n,r,rE(t,i),o,!1),c>0){if(16&c)j(u,p,m,n,i);else if(2&c&&p.class!==m.class&&s(u,"class",null,m.class,i),4&c&&s(u,"style",p.style,m.style,i),8&c){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],o=p[r],a=m[r];(a!==o||"value"===r)&&s(u,r,o,a,i,n)}}1&c&&e.children!==t.children&&h(u,t.children)}else a||null!=f||j(u,p,m,n,i);((l=m.onVnodeUpdated)||d)&&rS(()=>{l&&ip(l,n,t,e),d&&tX(t,e,n,"updated")},r)},F=(e,t,n,r,i,o,a)=>{for(let s=0;s<t.length;s++){let l=e[s],u=t[s],c=l.el&&(l.type===rY||!ie(l,u)||70&l.shapeFlag)?p(l.el):n;x(l,u,c,null,r,i,o,a,!0)}},j=(e,t,n,r,i)=>{if(t!==n){if(t!==_)for(let o in t)z(o)||o in n||s(e,o,t[o],null,i,r);for(let o in n){if(z(o))continue;let a=n[o],l=t[o];a!==l&&"value"!==o&&s(e,o,l,a,i,r)}"value"in n&&s(e,"value",t.value,n.value,i)}},V=(e,t,n,r,i,a,s,l,c)=>{let f=t.el=e?e.el:u(""),d=t.anchor=e?e.anchor:u(""),{patchFlag:h,dynamicChildren:p,slotScopeIds:m}=t;(m&&(l=l?l.concat(m):m),null==e)?(o(f,n,r),o(d,n,r),B(t.children||[],n,d,i,a,s,l,c)):h>0&&64&h&&p&&e.dynamicChildren?(F(e.dynamicChildren,p,n,i,a,s,l),(null!=t.key||i&&t===i.subTree)&&rO(e,t,!0)):Y(e,t,n,d,i,a,s,l,c)},G=(e,t,n,r,i,o,a,s,l)=>{t.slotScopeIds=s,null==e?512&t.shapeFlag?i.ctx.activate(t,n,r,a,l):H(t,n,r,i,o,a,l):W(e,t,l)},H=(e,t,n,r,i,o,a)=>{let s=e.component=function(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||iv,o={uid:im++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ep(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function e(t,n,r=!1){let i=r?rp:n.propsCache,o=i.get(t);if(o)return o;let a=t.props,s={},l=[],u=!1;if(!L(t)){let i=t=>{u=!0;let[r,i]=e(t,n,!0);E(s,r),i&&l.push(...i)};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!a&&!u)return M(t)&&i.set(t,b),b;if(C(a))for(let e=0;e<a.length;e++){let t=J(a[e]);rv(t)&&(s[t]=_)}else if(a)for(let e in a){let t=J(e);if(rv(t)){let n=a[e],r=s[t]=C(n)||L(n)?{type:n}:E({},n),i=r.type,o=!1,u=!0;if(C(i))for(let e=0;e<i.length;++e){let t=i[e],n=L(t)&&t.name;if("Boolean"===n){o=!0;break}"String"===n&&(u=!1)}else o=L(i)&&"Boolean"===i.name;r[0]=o,r[1]=u,(o||O(r,"default"))&&l.push(t)}}let c=[s,l];return M(t)&&i.set(t,c),c}(r,i),emitsOptions:function e(t,n,r=!1){let i=n.emitsCache,o=i.get(t);if(void 0!==o)return o;let a=t.emits,s={},l=!1;if(!L(t)){let i=t=>{let r=e(t,n,!0);r&&(l=!0,E(s,r))};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return a||l?(C(a)?a.forEach(e=>s[e]=null):E(s,a),M(t)&&i.set(t,s),s):(M(t)&&i.set(t,null),null)}(r,i),emit:null,emitted:null,propsDefaults:_,inheritAttrs:r.inheritAttrs,ctx:_,data:_,props:_,attrs:_,slots:_,refs:_,setupState:_,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=rN.bind(null,o),e.ce&&e.ce(o),o}(e,r,i);nS(e)&&(s.ctx.renderer=ec),!function(e,t=!1,n=!1){t&&c(t);let{props:r,children:i}=e.vnode,o=iw(e);!function(e,t,n,r=!1){let i={},o=rc();for(let n in e.propsDefaults=Object.create(null),rd(e,t,i,o),e.propsOptions[0])n in i||(i[n]=void 0);n?e.props=r?i:to(i):e.type.props?e.props=i:e.props=o,e.attrs=o}(e,r,o,t),rx(e,i,n),o&&function(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,n0);let{setup:r}=n;if(r){eA();let n=e.setupContext=r.length>1?iT(e):null,i=i_(e),o=tC(r,e,0,[e.props,n]),a=N(o);if(eO(),i(),(a||e.sp)&&!nk(e)&&nh(e),a){if(o.then(ib,ib),t)return o.then(n=>{ik(e,n,t)}).catch(t=>{tD(t,e,0)});e.asyncDep=o}else ik(e,o,t)}else iS(e,t)}(e,t),t&&c(!1)}(s,!1,a),s.asyncDep?(i&&i.registerDep(s,q,a),e.el||S(null,s.subTree=io(rX),t,n)):q(s,e,t,n,i,o,a)},W=(e,t,n)=>{let r=t.component=e.component;if(function(e,t,n){let{props:r,children:i,component:o}=e,{props:a,children:s,patchFlag:l}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(l>=0))return(!!i||!!s)&&(!s||!s.$stable)||r!==a&&(r?!a||rH(r,a,u):!!a);if(1024&l)return!0;if(16&l)return r?rH(r,a,u):!!a;if(8&l){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(a[n]!==r[n]&&!rF(u,n))return!0}}return!1}(e,t,n))if(r.asyncDep&&!r.asyncResolved)return void K(r,t,n);else r.next=t,r.update();else t.el=e.el,r.vnode=t},q=(e,t,n,r,o,a,s)=>{let l=()=>{if(e.isMounted){let t,{next:n,bu:r,u:i,parent:u,vnode:c}=e;{let t=function e(t){let n=t.subTree.component;if(n)if(n.asyncDep&&!n.asyncResolved)return n;else return e(n)}(e);if(t){n&&(n.el=c.el,K(e,n,s)),t.asyncDep.then(()=>{e.isUnmounted||l()});return}}let f=n;rT(e,!1),n?(n.el=c.el,K(e,n,s)):n=c,r&&Z(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&ip(t,u,n,c),rT(e,!0);let d=rj(e),h=e.subTree;e.subTree=d,x(h,d,p(h.el),es(h),e,o,a),n.el=d.el,null===f&&rz(e,d.el),i&&rS(i,o),(t=n.props&&n.props.onVnodeUpdated)&&rS(()=>ip(t,u,n,c),o)}else{let s,{el:l,props:u}=t,{bm:c,m:f,parent:d,root:h,type:p}=e,m=nk(t);if(rT(e,!1),c&&Z(c),!m&&(s=u&&u.onVnodeBeforeMount)&&ip(s,d,t),rT(e,!0),l&&i){let t=()=>{e.subTree=rj(e),i(l,e.subTree,e,o,null)};m&&p.__asyncHydrate?p.__asyncHydrate(l,e,t):t()}else{h.ce&&h.ce._injectChildStyle(p);let i=e.subTree=rj(e);x(null,i,n,r,e,o,a),t.el=i.el}if(f&&rS(f,o),!m&&(s=u&&u.onVnodeMounted)){let e=t;rS(()=>ip(s,d,e),o)}(256&t.shapeFlag||d&&nk(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&rS(e.a,o),e.isMounted=!0,t=n=r=null}};e.scope.on();let u=e.effect=new em(l);e.scope.off();let c=e.update=u.run.bind(u),f=e.job=u.runIfDirty.bind(u);f.i=e,f.id=e.uid,u.scheduler=()=>tj(f),rT(e,!0),c()},K=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){let{props:i,attrs:o,vnode:{patchFlag:a}}=e,s=td(i),[l]=e.propsOptions,u=!1;if((r||a>0)&&!(16&a)){if(8&a){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let a=n[r];if(rF(e.emitsOptions,a))continue;let c=t[a];if(l)if(O(o,a))c!==o[a]&&(o[a]=c,u=!0);else{let t=J(a);i[t]=rh(l,s,t,c,e,!1)}else c!==o[a]&&(o[a]=c,u=!0)}}}else{let r;for(let a in rd(e,t,i,o)&&(u=!0),s)t&&(O(t,a)||(r=$(a))!==a&&O(t,r))||(l?n&&(void 0!==n[a]||void 0!==n[r])&&(i[a]=rh(l,s,a,void 0,e,!0)):delete i[a]);if(o!==s)for(let e in o)t&&O(t,e)||(delete o[e],u=!0)}u&&eN(e.attrs,"set","")}(e,t.props,r,n),rk(e,t.children,n),eA(),tH(e),eO()},Y=(e,t,n,r,i,o,a,s,l=!1)=>{let u=e&&e.children,c=e?e.shapeFlag:0,f=t.children,{patchFlag:d,shapeFlag:p}=t;if(d>0){if(128&d)return void X(u,f,n,r,i,o,a,s,l);else if(256&d)return void Q(u,f,n,r,i,o,a,s,l)}8&p?(16&c&&ea(u,i,o),f!==u&&h(n,f)):16&c?16&p?X(u,f,n,r,i,o,a,s,l):ea(u,i,o,!0):(8&c&&h(n,""),16&p&&B(f,n,r,i,o,a,s,l))},Q=(e,t,n,r,i,o,a,s,l)=>{let u;e=e||b,t=t||b;let c=e.length,f=t.length,d=Math.min(c,f);for(u=0;u<d;u++){let r=t[u]=l?id(t[u]):ic(t[u]);x(e[u],r,n,null,i,o,a,s,l)}c>f?ea(e,i,o,!0,!1,d):B(t,n,r,i,o,a,s,l,d)},X=(e,t,n,r,i,o,a,s,l)=>{let u=0,c=t.length,f=e.length-1,d=c-1;for(;u<=f&&u<=d;){let r=e[u],c=t[u]=l?id(t[u]):ic(t[u]);if(ie(r,c))x(r,c,n,null,i,o,a,s,l);else break;u++}for(;u<=f&&u<=d;){let r=e[f],u=t[d]=l?id(t[d]):ic(t[d]);if(ie(r,u))x(r,u,n,null,i,o,a,s,l);else break;f--,d--}if(u>f){if(u<=d){let e=d+1,f=e<c?t[e].el:r;for(;u<=d;)x(null,t[u]=l?id(t[u]):ic(t[u]),n,f,i,o,a,s,l),u++}}else if(u>d)for(;u<=f;)et(e[u],i,o,!0),u++;else{let h,p=u,m=u,g=new Map;for(u=m;u<=d;u++){let e=t[u]=l?id(t[u]):ic(t[u]);null!=e.key&&g.set(e.key,u)}let y=0,_=d-m+1,w=!1,k=0,S=Array(_);for(u=0;u<_;u++)S[u]=0;for(u=p;u<=f;u++){let r,c=e[u];if(y>=_){et(c,i,o,!0);continue}if(null!=c.key)r=g.get(c.key);else for(h=m;h<=d;h++)if(0===S[h-m]&&ie(c,t[h])){r=h;break}void 0===r?et(c,i,o,!0):(S[r-m]=u+1,r>=k?k=r:w=!0,x(c,t[r],n,null,i,o,a,s,l),y++)}let E=w?function(e){let t,n,r,i,o,a=e.slice(),s=[0],l=e.length;for(t=0;t<l;t++){let l=e[t];if(0!==l){if(e[n=s[s.length-1]]<l){a[t]=n,s.push(t);continue}for(r=0,i=s.length-1;r<i;)e[s[o=r+i>>1]]<l?r=o+1:i=o;l<e[s[r]]&&(r>0&&(a[t]=s[r-1]),s[r]=t)}}for(r=s.length,i=s[r-1];r-- >0;)s[r]=i,i=a[i];return s}(S):b;for(h=E.length-1,u=_-1;u>=0;u--){let e=m+u,f=t[e],d=e+1<c?t[e+1].el:r;0===S[u]?x(null,f,n,d,i,o,a,s,l):w&&(h<0||u!==E[h]?ee(f,n,d,2):h--)}}},ee=(e,t,n,r,i=null)=>{let{el:a,type:s,transition:l,children:u,shapeFlag:c}=e;if(6&c)return void ee(e.component.subTree,t,n,r);if(128&c)return void e.suspense.move(t,n,r);if(64&c)return void s.move(e,t,n,ec);if(s===rY){o(a,t,n);for(let e=0;e<u.length;e++)ee(u[e],t,n,r);o(e.anchor,t,n);return}if(s===rZ)return void A(e,t,n);if(2!==r&&1&c&&l)if(0===r)l.beforeEnter(a),o(a,t,n),rS(()=>l.enter(a),i);else{let{leave:e,delayLeave:r,afterLeave:i}=l,s=()=>o(a,t,n),u=()=>{e(a,()=>{s(),i&&i()})};r?r(a,s,u):u()}else o(a,t,n)},et=(e,t,n,r=!1,i=!1)=>{let o,{type:a,props:s,ref:l,children:u,dynamicChildren:c,shapeFlag:f,patchFlag:d,dirs:h,cacheIndex:p}=e;if(-2===d&&(i=!1),null!=l&&np(l,null,n,e,!0),null!=p&&(t.renderCache[p]=void 0),256&f)return void t.ctx.deactivate(e);let m=1&f&&h,g=!nk(e);if(g&&(o=s&&s.onVnodeBeforeUnmount)&&ip(o,t,e),6&f)eo(e.component,n,r);else{if(128&f)return void e.suspense.unmount(n,r);m&&tX(e,null,t,"beforeUnmount"),64&f?e.type.remove(e,t,n,ec,r):c&&!c.hasOnce&&(a!==rY||d>0&&64&d)?ea(c,t,n,!1,!0):(a===rY&&384&d||!i&&16&f)&&ea(u,t,n),r&&en(e)}(g&&(o=s&&s.onVnodeUnmounted)||m)&&rS(()=>{o&&ip(o,t,e),m&&tX(e,null,t,"unmounted")},n)},en=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===rY)return void ei(n,r);if(t===rZ)return void I(e);let o=()=>{a(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,a=()=>t(n,o);r?r(e.el,o,a):a()}else o()},ei=(e,t)=>{let n;for(;e!==t;)n=m(e),a(e),e=n;a(t)},eo=(e,t,n)=>{let{bum:r,scope:i,job:o,subTree:a,um:s,m:l,a:u}=e;rC(l),rC(u),r&&Z(r),i.stop(),o&&(o.flags|=8,et(a,e,t,n)),s&&rS(s,t),rS(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},ea=(e,t,n,r=!1,i=!1,o=0)=>{for(let a=o;a<e.length;a++)et(e[a],t,n,r,i)},es=e=>{if(6&e.shapeFlag)return es(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=m(e.anchor||e.el),n=t&&t[tZ];return n?m(n):t},el=!1,eu=(e,t,n)=>{null==e?t._vnode&&et(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),t._vnode=e,el||(el=!0,tH(),tz(),el=!1)},ec={p:x,um:et,m:ee,r:en,mt:H,mc:B,pc:Y,pbc:F,n:es,o:e};return{render:eu,hydrate:r,createApp:(n=r,function(e,t=null){L(e)||(e=E({},e)),null==t||M(t)||(t=null);let r=ri(),i=new WeakSet,o=[],a=!1,s=r.app={_uid:ro++,_component:e,_props:t,_container:null,_context:r,_instance:null,version:iB,get config(){return r.config},set config(v){},use:(e,...t)=>(i.has(e)||(e&&L(e.install)?(i.add(e),e.install(s,...t)):L(e)&&(i.add(e),e(s,...t))),s),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),s),component:(e,t)=>t?(r.components[e]=t,s):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,s):r.directives[e],mount(i,o,l){if(a);else{let u=s._ceVNode||io(e,t);return u.appContext=r,!0===l?l="svg":!1===l&&(l=void 0),o&&n?n(u,i):eu(u,i,l),a=!0,s._container=i,i.__vue_app__=s,iA(u.component)}},onUnmount(e){o.push(e)},unmount(){a&&(tI(o,s._instance,16),eu(null,s._container),delete s._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,s),runWithContext(e){let t=ra;ra=s;try{return e()}finally{ra=t}}};return s})}}(oT))}let oO=(...e)=>{oA().render(...e)},oC=(...e)=>{let t=oA().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=function(e){return B(e)?document.querySelector(e):e}(e);if(!r)return;let i=t._component;L(i)||i.render||i.template||(i.template=r.innerHTML),1===r.nodeType&&(r.textContent="");let o=n(r,!1,function(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t},oI=("undefined"!=typeof globalThis?globalThis:void 0)?.crypto||("undefined"!=typeof global?global:void 0)?.crypto||("undefined"!=typeof window?window:void 0)?.crypto||("undefined"!=typeof self?self:void 0)?.crypto||("undefined"!=typeof frames?frames:void 0)?.[0]?.crypto;p=oI?e=>{let t=[];for(let n=0;n<e;n+=4)t.push(oI.getRandomValues(new Uint32Array(1))[0]);return new oR(t,e)}:e=>{let t=[],n=e=>{let t=e,n=0x3ade68b1;return()=>{let e=((n=36969*(65535&n)+(n>>16)&0xffffffff)<<16)+(t=18e3*(65535&t)+(t>>16)&0xffffffff)&0xffffffff;return e/=0x100000000,(e+=.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r<e;r+=4){let e=n(0x100000000*(i||Math.random()));i=0x3ade67b7*e(),t.push(0x100000000*e()|0)}return new oR(t,e)};class oD{static create(...e){return new this(...e)}mixIn(e){return Object.assign(this,e)}clone(){let e=new this.constructor;return Object.assign(e,this),e}}class oR extends oD{constructor(e=[],t=4*e.length){super();let n=e;if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),(n instanceof Int8Array||n instanceof Uint8ClampedArray||n instanceof Int16Array||n instanceof Uint16Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Float32Array||n instanceof Float64Array)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),n instanceof Uint8Array){let e=n.byteLength,t=[];for(let r=0;r<e;r+=1)t[r>>>2]|=n[r]<<24-r%4*8;this.words=t,this.sigBytes=e}else this.words=e,this.sigBytes=t}static random=p;toString(e=oP){return e.stringify(this)}concat(e){let t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(let e=0;e<i;e+=1){let i=n[e>>>2]>>>24-e%4*8&255;t[r+e>>>2]|=i<<24-(r+e)%4*8}else for(let e=0;e<i;e+=4)t[r+e>>>2]=n[e>>>2];return this.sigBytes+=i,this}clamp(){let{words:e,sigBytes:t}=this;e[t>>>2]&=0xffffffff<<32-t%4*8,e.length=Math.ceil(t/4)}clone(){let e=super.clone.call(this);return e.words=this.words.slice(0),e}}let oP={stringify(e){let{words:t,sigBytes:n}=e,r=[];for(let e=0;e<n;e+=1){let n=t[e>>>2]>>>24-e%4*8&255;r.push((n>>>4).toString(16)),r.push((15&n).toString(16))}return r.join("")},parse(e){let t=e.length,n=[];for(let r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new oR(n,t/2)}},oL={stringify(e){let{words:t,sigBytes:n}=e,r=[];for(let e=0;e<n;e+=1){let n=t[e>>>2]>>>24-e%4*8&255;r.push(String.fromCharCode(n))}return r.join("")},parse(e){let t=e.length,n=[];for(let r=0;r<t;r+=1)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new oR(n,t)}},oB={stringify(e){try{return decodeURIComponent(escape(oL.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:e=>oL.parse(unescape(encodeURIComponent(e)))};class oU extends oD{constructor(){super(),this._minBufferSize=0}reset(){this._data=new oR,this._nDataBytes=0}_append(e){let t=e;"string"==typeof t&&(t=oB.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_process(e){let t,{_data:n,blockSize:r}=this,i=n.words,o=n.sigBytes,a=o/(4*r),s=(a=e?Math.ceil(a):Math.max((0|a)-this._minBufferSize,0))*r,l=Math.min(4*s,o);if(s){for(let e=0;e<s;e+=r)this._doProcessBlock(i,e);t=i.splice(0,s),n.sigBytes-=l}return new oR(t,l)}clone(){let e=super.clone.call(this);return e._data=this._data.clone(),e}}class oM extends oU{constructor(e){super(),this.blockSize=16,this.cfg=Object.assign(new oD,e),this.reset()}static _createHelper(e){return(t,n)=>new e(n).finalize(t)}static _createHmacHelper(e){return(t,n)=>new oN(e,n).finalize(t)}reset(){super.reset.call(this),this._doReset()}update(e){return this._append(e),this._process(),this}finalize(e){return e&&this._append(e),this._doFinalize()}}class oN extends oD{constructor(e,t){super();let n=new e;this._hasher=n;let r=t;"string"==typeof r&&(r=oB.parse(r));let i=n.blockSize,o=4*i;r.sigBytes>o&&(r=n.finalize(t)),r.clamp();let a=r.clone();this._oKey=a;let s=r.clone();this._iKey=s;let l=a.words,u=s.words;for(let e=0;e<i;e+=1)l[e]^=0x5c5c5c5c,u[e]^=0x36363636;a.sigBytes=o,s.sigBytes=o,this.reset()}reset(){let e=this._hasher;e.reset(),e.update(this._iKey)}update(e){return this._hasher.update(e),this}finalize(e){let t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}}let oF=[];for(let e=0;e<64;e+=1)oF[e]=0x100000000*Math.abs(Math.sin(e+1))|0;let oj=(e,t,n,r,i,o,a)=>{let s=e+(t&n|~t&r)+i+a;return(s<<o|s>>>32-o)+t},oV=(e,t,n,r,i,o,a)=>{let s=e+(t&r|n&~r)+i+a;return(s<<o|s>>>32-o)+t},oG=(e,t,n,r,i,o,a)=>{let s=e+(t^n^r)+i+a;return(s<<o|s>>>32-o)+t},oH=(e,t,n,r,i,o,a)=>{let s=e+(n^(t|~r))+i+a;return(s<<o|s>>>32-o)+t};class oz extends oM{_doReset(){this._hash=new oR([0x67452301,0xefcdab89,0x98badcfe,0x10325476])}_doProcessBlock(e,t){for(let n=0;n<16;n+=1){let r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&0xff00ff|(i<<24|i>>>8)&0xff00ff00}let n=this._hash.words,r=e[t+0],i=e[t+1],o=e[t+2],a=e[t+3],s=e[t+4],l=e[t+5],u=e[t+6],c=e[t+7],f=e[t+8],d=e[t+9],h=e[t+10],p=e[t+11],m=e[t+12],g=e[t+13],y=e[t+14],_=e[t+15],b=n[0],w=n[1],x=n[2],k=n[3];b=oj(b,w,x,k,r,7,oF[0]),k=oj(k,b,w,x,i,12,oF[1]),x=oj(x,k,b,w,o,17,oF[2]),w=oj(w,x,k,b,a,22,oF[3]),b=oj(b,w,x,k,s,7,oF[4]),k=oj(k,b,w,x,l,12,oF[5]),x=oj(x,k,b,w,u,17,oF[6]),w=oj(w,x,k,b,c,22,oF[7]),b=oj(b,w,x,k,f,7,oF[8]),k=oj(k,b,w,x,d,12,oF[9]),x=oj(x,k,b,w,h,17,oF[10]),w=oj(w,x,k,b,p,22,oF[11]),b=oj(b,w,x,k,m,7,oF[12]),k=oj(k,b,w,x,g,12,oF[13]),x=oj(x,k,b,w,y,17,oF[14]),w=oj(w,x,k,b,_,22,oF[15]),b=oV(b,w,x,k,i,5,oF[16]),k=oV(k,b,w,x,u,9,oF[17]),x=oV(x,k,b,w,p,14,oF[18]),w=oV(w,x,k,b,r,20,oF[19]),b=oV(b,w,x,k,l,5,oF[20]),k=oV(k,b,w,x,h,9,oF[21]),x=oV(x,k,b,w,_,14,oF[22]),w=oV(w,x,k,b,s,20,oF[23]),b=oV(b,w,x,k,d,5,oF[24]),k=oV(k,b,w,x,y,9,oF[25]),x=oV(x,k,b,w,a,14,oF[26]),w=oV(w,x,k,b,f,20,oF[27]),b=oV(b,w,x,k,g,5,oF[28]),k=oV(k,b,w,x,o,9,oF[29]),x=oV(x,k,b,w,c,14,oF[30]),w=oV(w,x,k,b,m,20,oF[31]),b=oG(b,w,x,k,l,4,oF[32]),k=oG(k,b,w,x,f,11,oF[33]),x=oG(x,k,b,w,p,16,oF[34]),w=oG(w,x,k,b,y,23,oF[35]),b=oG(b,w,x,k,i,4,oF[36]),k=oG(k,b,w,x,s,11,oF[37]),x=oG(x,k,b,w,c,16,oF[38]),w=oG(w,x,k,b,h,23,oF[39]),b=oG(b,w,x,k,g,4,oF[40]),k=oG(k,b,w,x,r,11,oF[41]),x=oG(x,k,b,w,a,16,oF[42]),w=oG(w,x,k,b,u,23,oF[43]),b=oG(b,w,x,k,d,4,oF[44]),k=oG(k,b,w,x,m,11,oF[45]),x=oG(x,k,b,w,_,16,oF[46]),w=oG(w,x,k,b,o,23,oF[47]),b=oH(b,w,x,k,r,6,oF[48]),k=oH(k,b,w,x,c,10,oF[49]),x=oH(x,k,b,w,y,15,oF[50]),w=oH(w,x,k,b,l,21,oF[51]),b=oH(b,w,x,k,m,6,oF[52]),k=oH(k,b,w,x,a,10,oF[53]),x=oH(x,k,b,w,h,15,oF[54]),w=oH(w,x,k,b,i,21,oF[55]),b=oH(b,w,x,k,f,6,oF[56]),k=oH(k,b,w,x,_,10,oF[57]),x=oH(x,k,b,w,u,15,oF[58]),w=oH(w,x,k,b,g,21,oF[59]),b=oH(b,w,x,k,s,6,oF[60]),k=oH(k,b,w,x,p,10,oF[61]),x=oH(x,k,b,w,o,15,oF[62]),w=oH(w,x,k,b,d,21,oF[63]),n[0]=n[0]+b|0,n[1]=n[1]+w|0,n[2]=n[2]+x|0,n[3]=n[3]+k|0}_doFinalize(){let e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32;let i=Math.floor(n/0x100000000);t[(r+64>>>9<<4)+15]=(i<<8|i>>>24)&0xff00ff|(i<<24|i>>>8)&0xff00ff00,t[(r+64>>>9<<4)+14]=(n<<8|n>>>24)&0xff00ff|(n<<24|n>>>8)&0xff00ff00,e.sigBytes=(t.length+1)*4,this._process();let o=this._hash,a=o.words;for(let e=0;e<4;e+=1){let t=a[e];a[e]=(t<<8|t>>>24)&0xff00ff|(t<<24|t>>>8)&0xff00ff00}return o}clone(){let e=super.clone.call(this);return e._hash=this._hash.clone(),e}}let oW=oM._createHelper(oz);oM._createHmacHelper(oz);let oq=["innerHTML"];function oJ(e){if(void 0!==e.remove)e.remove();else{var t;null==(t=e.parentNode)||t.removeChild(e)}}function oK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class o${pause(){this.stop(),this.delay-=Date.now()-this.startedAt}resume(){this.stop(),this.startedAt=Date.now(),this.timer=setTimeout(this.callback,this.delay)}stop(){clearTimeout(this.timer)}constructor(e,t){oK(this,"startedAt",void 0),oK(this,"callback",void 0),oK(this,"delay",void 0),oK(this,"timer",void 0),this.startedAt=Date.now(),this.callback=e,this.delay=t,this.timer=setTimeout(e,t)}}let oY=Object.freeze({TOP_RIGHT:"top-right",TOP:"top",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left"}),oQ=function(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get("*"))&&r.slice().map(function(e){e(t,n)})}}}(),oX=nd({name:"Toast",props:{message:{type:String,required:!0},type:{type:String,default:"success"},position:{type:String,default:oY.BOTTOM_RIGHT,validator:e=>Object.values(oY).includes(e)},duration:{type:Number,default:3e3},dismissible:{type:Boolean,default:!0},onDismiss:{type:Function,default:()=>{}},onClick:{type:Function,default:()=>{}},queue:Boolean,pauseOnHover:{type:Boolean,default:!0}},data:()=>({isActive:!1,parentTop:null,parentBottom:null,isHovered:!1}),beforeMount(){this.setupContainer()},mounted(){this.showNotice(),oQ.on("toast-clear",this.dismiss)},methods:{setupContainer(){if(this.parentTop=document.querySelector(".v-toast.v-toast--top"),this.parentBottom=document.querySelector(".v-toast.v-toast--bottom"),this.parentTop&&this.parentBottom)return;this.parentTop||(this.parentTop=document.createElement("div"),this.parentTop.className="v-toast v-toast--top"),this.parentBottom||(this.parentBottom=document.createElement("div"),this.parentBottom.className="v-toast v-toast--bottom");let e=document.body;e.appendChild(this.parentTop),e.appendChild(this.parentBottom)},shouldQueue(){return!!this.queue&&(this.parentTop.childElementCount>0||this.parentBottom.childElementCount>0)},dismiss(){this.timer&&this.timer.stop(),clearTimeout(this.queueTimer),this.isActive=!1,setTimeout(()=>{this.onDismiss.apply(null,arguments);let e=this.$refs.root;oO(null,e),oJ(e)},150)},showNotice(){if(this.shouldQueue()){this.queueTimer=setTimeout(this.showNotice,250);return}let e=this.$refs.root.parentElement;this.correctParent.insertAdjacentElement("afterbegin",this.$refs.root),oJ(e),this.isActive=!0,this.duration&&(this.timer=new o$(this.dismiss,this.duration))},whenClicked(){this.dismissible&&(this.onClick.apply(null,arguments),this.dismiss())},toggleTimer(e){this.pauseOnHover&&this.timer&&(e?this.timer.pause():this.timer.resume())}},computed:{correctParent(){switch(this.position){case oY.TOP:case oY.TOP_RIGHT:case oY.TOP_LEFT:return this.parentTop;case oY.BOTTOM:case oY.BOTTOM_RIGHT:case oY.BOTTOM_LEFT:return this.parentBottom}},transition(){switch(this.position){case oY.TOP:case oY.TOP_RIGHT:case oY.TOP_LEFT:return{enter:"v-toast--fade-in-down",leave:"v-toast--fade-out"};case oY.BOTTOM:case oY.BOTTOM_RIGHT:case oY.BOTTOM_LEFT:return{enter:"v-toast--fade-in-up",leave:"v-toast--fade-out"}}}},beforeUnmount(){oQ.off("toast-clear",this.dismiss)}});var oZ,o0,o1,o2,o5=n(744);let o4=(0,o5.default)(oX,[["render",function(e,t,n,r,i,o){return r2(),r9(iW,{"enter-active-class":e.transition.enter,"leave-active-class":e.transition.leave},{default:tY(()=>[tQ(ii("div",{ref:"root",role:"alert",class:el(["v-toast__item",[`v-toast__item--${e.type}`,`v-toast__item--${e.position}`]]),onMouseover:t[0]||(t[0]=t=>e.toggleTimer(!0)),onMouseleave:t[1]||(t[1]=t=>e.toggleTimer(!1)),onClick:t[2]||(t[2]=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.whenClicked&&e.whenClicked(...n)})},[t[3]||(t[3]=ii("div",{class:"v-toast__icon"},null,-1)),ii("p",{class:"v-toast__text",innerHTML:e.message},null,8,oq)],34),[[i3,e.isActive]])]),_:1},8,["enter-active-class","leave-active-class"])}]]),o3=(e,t)=>{let n=-1,r=e.length,i=Array(r);for(;++n<r;)i[n]=t(e[n]);return i},o8=(e,t)=>{let n=-1,r=e.length;for(;++n<r;)t(e[n])},o6=e=>{if(e.scrollTop>0)return!0;e.scrollTop=1;let t=!!e.scrollTop;return e.scrollTop=0,t};function o9(e,t){let n=localStorage.getItem(e);try{if(n)return JSON.parse(n)}catch{}return t}function o7(e,t){localStorage.setItem(e,JSON.stringify(t))}let ae=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{open(t){let n=null;return"string"==typeof t&&(n=t),{dismiss:function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=iL(e,t,r),o=document.createElement("div");return o.classList.add("v-toast--pending"),n.appendChild(o),oO(i,o),i.component}(o4,Object.assign({},{message:n},e,t),document.body).ctx.dismiss}},clear(){oQ.emit("toast-clear")},success(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:e,type:"success"},t))},error(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:e,type:"error"},t))},info(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:e,type:"info"},t))},warning(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:e,type:"warning"},t))},default(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(Object.assign({},{message:e,type:"default"},t))}}}({duration:3e3,position:"top"}),at=e=>{let t="",n=-1;for(;++n<13;)t+=10*Math.random()|0;let r=(Date.now()%1e10*1e3+(1e3*Math.random()|0)%0xffffffff).toString(),i=new URLSearchParams(e.code),o=i.get("fs"),a=(Date.now()/1e3|21600).toString(16),s=(Date.now()+Number(t)).toString(),l=atob(i.get("fm")).split("_")[0],u=oW(`${s}|tars_mp|102`).toString(),c=oW([l,t,e.name,u,a].join("_")).toString();return`&wsSecret=${c}&uuid=${r}&wsTime=${a}&uid=${t}&seqid=${s}&fs=${o}&sdk_sid=${Date.now()}&ctype=tars_mp&t=102&ver=1&sv=2401310321`},an=()=>{let e=new Date,t=e=>e.toString().padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`},ar="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAAXNSR0IArs4c6QAAAEVQTFRFR3BM//////////////b4/////////////////////9Dd////////////+3GZ/HGZ/HGZ/HCZ/HGZ/HGZ/HGZ////+3GZG7vCKwAAABV0Uk5TAPEvsA6dhsxqVwYgQt7qaUAelc+1KF61kQAACS5JREFUeNrtnYmSozgMhjE2vsCdhIS8/6NOID0Jh40lH0C6oq3aqt3JGD4sS79kjqL42te+9rWvfZgxxWnFGx0/UqlUw3bDqEg3mJFxA9X8ORBtduEoTfcyGnM1FUkzTijH+/D9GYS7lxqPIzYn0aKbGA8dqJmOQ7cGkd3MysCFZmbjqI1BxBzEhDkXnY8jtuWou4XxJBPbdduukmZ5AiHOVZPlMNvGYGUBwTuXFpZh5O4zgncubhtF7b1G8M5lvRobu1Zhc4pOoJyrNrYxiN4WRHbRzkWtQ1RbZ0QR61z2S0HqzbWW9Tzgkask1gFksbnxKOfS9hmlxQ4W5VzVQRwr1rnskbfbp7KKcC5GuiQZNVNNAnYubY+8Qu8EEuxcjshbFrtZmHPZ+feIvHHOxcxxIm+Uc9kjr2G7ggQ4lzpU5A13rvpYkdfnXO5IerTIG+pc/EDSBORcjlOryeEir8+5qLQZPULk1XXZNEo9TodzXlUVpVQIYYz9IiONEGMeoz3GfIzMueRSKqWask68eEpZiW4fE1Sm0i5NRbp9jVTxaYZJ0x3BjIxK/YyT7ihGeDjKQWbjNSuBXciadkczGpI5FemOZwQ/KbI7piHlpabdUQ218XpgDhTJoTkwJJVfGk21Ee8VoeqtGazsre6N9VYM/x7+e/iT54+G38uldiMk1TqxrnNC+UPElf2prV0Q8MVa/aHusR/AilMSrvtLq9jRr6NvUs29jqStUg+iI5ftGiL3bXEwuUCB3OuxqEarnTs1vadV+GVSx+fSHLbQGV6xMou8pi6OYfO9U4pb6YfhWJKUmAk5EMeChGJWSFkcyUrEKuEH7De5zm41cJnNG5kacZBpM9CAJy9th5w1jrhawW+4baCOz3PdzKbVQ2hYSQSq3SOAviWy3HA0UDg2c/77gOGgwKJgcUuTDPfpjERfteoDkPtppmcIWyKecRldM20vChZXfbzjDvIAClokChF72Wrpw+zHXsRBib1nQoGcnyOSIRxkXBdI96IMKJY4qMTVqUDGV5FM/kCX6CWpQd5PgekGCTIel7uuHFRFGEjYEogsggEZ7bhN9uRq11QBM4nzYhPEzYUYkPGaruImZOr+kHPjKUG0sYhWPYq98HsIOUAAlxjliwIZi6TKdk5wFaEAkVVhFKMuFyZXbtUXS5DRykHs6zaAk5TImkpP/pkcgzmOT3htmxBEIQpwGy0jH39YAxlC8GQjsA7bKoAsZA4ICCiQRrytX+5CzP7H/1D/Nj8TAKRC5EMQiMJ32qsUGZF+BIjwg4jI8nAOorOAUP9ZgmTM7jMC8BvS4cq1fUAqb42oY+/N2wbEH1tZbG9umzXiz3Z1apAiP0jtBVFJQYhVYjCLv/hB/KqxRIKUYmZmE5DGC9JgxG/hfAjEtkZ8IDoUpEkBorz1iA2kjp2R0nuaCqfitQwCiZ4R/wpAgjhuRs6+RvwxyR/XVtoA262RiQApwzLNSht2uxkZX0CTpEAUcJBx6WStpwgCZPQspvL7PKA9YxAgCTP7aFgOyP0AkNGCWliRT2sNqXj1plPkjDB/NZkL5BG6lCoj9LEjngvnlls2kEih7xACdPsZSQmivAc/wowQ/8+lv5r8DBDulfw6Tx5JUNU7ft54ZyRpZk89I9QrMDNprdQgwi9nPmNGjPe3R5gRQPgl/jZxlgoxNQjzt4k/Y0beV1ZYnpxsjrJG/KKxAeS1N8gbcXQU2yOjKUBwMl5hQDbN7MgKUfrPJ7fWOp/atj3ryJqd7z0j5+t9sJ9THEi1M8jp/rKbjmkH0X1BRhz3exsDIvwPD2VcIxOO+/3sjkNeELPnjMw47teIlmn/fNfc6KzWygVyvs/tEtONX0uS/H+vY2EjB7b8qYLc/Xv+WYCMI5cuk4N4mumBjzxZOCYg6B2rnUAuFo4pSPRm6GhN5AOxckzDFksIIiHbGywZx88kJUbfMAACiZuRy9XGcT+5d1COCcLsHFftBqniQFQWEG3n+LmsJOsgEDkGCX/Tgssb9M3OcV6TT/SAIHaO+3lVB4o4kCYDSAvliL4VcFRsZQBxcJzim79rIKUFhND+RQScmiAQBMe0eg3JVtW4CpiCDA/p/T5zWHvegMMBwn2NA33HwIpvshlINRtOGRwIigN3b/x61TjNSmY5GKsQIPps52j9uSpM/k762m8Q+3sNFBwEyREvfyd97ddulOs1Jko4TMI4boC+dJjYquOyEKaQsjSBEoqtJk4XOHSJXbgvhKJTbAWci0y6N7tagNyvDNqrMjFBi2fnuMDboDHd/GQPXl+Awn0ttSMz4qSZn+qRfhbGgc2Iqil/PZWV3IAuwvl0Op2TF1KLv1fiEslzTRCyeAuoS3Gefn43AoDP5UILqfWM6F+wHNf3vLzP63YJ57hDZpSg4q9zG7H0+snVL651G86BrBG1o3aigMLo6vWuGI5JjUhwPx9lIOvVviAUBraQ8nh9ickcI44atKWxovnwBcj6mUlccPjvVwzaAmnzcUwrEoDaWtR5wpl9roh6wsXRwjPQ5LUj/sgyLfPE2ktarogLfI7lmG1xAnxLST68YbHi0vOtzBbuKuhCyrdIkn5T6gQOpgGFlGeRJH2/lv4BklxScMx8K+kb9k8w4RRUSHlTQ9JXhbUQKZuKY/4doKRfobj5SQILKYCkTUnikLOjspWl41h8xyHlgvftnOmEHMsqgydcJw7P+Y1I4YWU/bLNdYdIGLtWY+stRrhDmrIx79AHkrSxBQhAQc3fy5KnAdpm4LB/5EXwRB8edympSOFuBXF8gaYj5vk6bz5856QZXpFdM5aGJD1H31ZA7mT2Ly03zz2Ep43uRuO9KeavNjJwFLrpEhuRASRtAk9ukn8iovJ3FjJw5CBRSJJbojhZp/68kAB0ESMKkJUUzxOT1BiSW8oKokn7aZsSICDDCxDPpgfJBeISkFk4iqSff5r3MhyyC7CzFjgrKtHXSDhQQAYXIIBpUVX8vFh62w4BmY1jeHchaySv+m+dBH6mzlrVnFMWUkFk/XdOmvfH+J7tRvr8qEvPOhh5mRFSgwXkhhyrUxfb7ToCR4q+3adyzGXXqSj+BMknc7y237eNV1ns0j7kys/tpIs/YH8C4mtf+9rXvva1r33tj9o/Lzzyu+swTmIAAAAASUVORK5CYII=",ai="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAArlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8tivQqAAAAOXRSTlMAQL+AVSFwReurxLHcZuZhaxvx9dKPfhIHXc6LUC4LeVmgOMiFNCbXm5N04LeoSzz7pBYru5YPA5jd4ld+AAAKR0lEQVR42uzba3OiMBQG4INXvKGiUuttvaPVarW27vv//9h21umCJlZOBMPO8Hy2Dm+TcMIJUiKRSCQSiUQikUj8p8bL1JdMm5RtXr++YGeQVpkUTswlqUm7OOmkSZ8MPAW1HPDoS5KBX0EtRwySHMs40yKuCs5tSIseLmSIZ2biXIm0KOGCWyeWAxCLIYFgRBxTCJakA0QV1swUrUkHiKx3CipbhuiVdICAcw/eQWJKOpQgkaNgXvAlJou9B4nGjIIw3iBRJC2OZaiu18EEMhnSIwcZh25bQuaDdClAJk+3PEOmOCBd3k1IFNu3/syChD0jfSqQ6arc7lAlnXaQ6dFPHMi0SKvsChLNPV23gUzqSHpVIfObrto3IWH3SbcRZJ6Znx+SdvUyJFZZkqtBpksxMITMjqTGDUikKBY+IFMjiXYKEvacYuGpCQmzT6JuXBfISQ8yTRIMY7dA2vV+PlNLT7vLxei1sD5AJiUoSz9Weh0tp07tuWfM5vXPIz1CNl/pFiZlGxFqmOVmsdCt5LMUjf7LGg9WqryHnqLVhBadVp/CM2+9QZu31pzCUZ/a0Mqe1ikEWxfalYd0twxioUV3chATE7pLCvFBd5ggRsqk7IBYWas3d5kaljtJBTRxrQaYCqSkCyn77FoPhUXLyVV7xiz71Cam9lN2ZvSqOae1KBxSPkXXDO/etYXI/TDq9CDjXAGCHvGtcWk0psfavuJC55O4arhQytPjZex7J9d+hTNWjbSYr3Buc9+AFLKkyxpnXu8q6QXSaIEzY+Iw4pPjsp4t1XtVnSfSKg8/mzPLByY8jS1Fpr/n95fTqjPrF0WnW17m6aaZ8tnvCzzNAYVj7pDAAlB82fNWSV1teVUoDPlRAxhfaT3aozynUV6lwGzf2rp/QD6rJfw1uf4PW9CPLLVS0g96+G1AJK7I6rV1Osc/W0ZVNJUaDrn7g9DHlTN4J3ClSqstkhw8wxCCtDvy3WsH3zasAr2lgFrw5FWDyJ9tHOn57oEz2YFnlVcz+qpB5GO88u0SlsGvrC58Obt5UlcPIp1FL/StbQUvcQO1dycteNrKQeSPBe5APOjK0E0Nldp+hMemcIKQK5yS7jiv+1rwsSiYbOCumHEpJQQRhqRzvJwtM7rNhV+b3z8pEsv1ILTCX2a3T39VWYW6qFJIhvCUVIMIY1bFl0mlLSx/wxN02zjj730XdwaB38jw4b0BMVJpby3hmYYURMQL0oJfhb+Jz8UkiAM/hwLpwDOMSZCayvuoJjz5mAQZKrR1jvAZxyTIRvwgb18zi0mQrcKB4h4+7+EESRvf0v+uWrwTp4I2UjrsHQrmIQWhb2nxqoME6cPPpSDeOZuBIgSRBJnzzkXFUdwzNnNRBsnCz+K3GT/pR0cTck7IQerg91E2jA3zHg8akSf42fy3TxjrKdIRGcDvjYJ4hqfBPfqN6vZ7VAhSY4xhD1c4IRdEeoNPg/04Ygb8Ack6fSnsIA3+GnHgWdHPfl19/go7iMm/a00ZlaeFEyfyIBZ8VuyGaTPgoVg18iArfmVfMHZnB5wYkQdx+XutHaMb5OJkHnmQP+2d6XabMBCFB7NjMN4a8AYJXuJ43+JW7/9iPW3/VJWFZmTcQ87x999Jbiykq9Ho0qe73yb3o3FHW+nDhUzp+5EL/hOpwsRRF0SszQ5wQvAPe0ehl2pRsBcF38hDK8Sdv2wfL8Shn+v6eOPvKsp4VCHYPg6bfCHPw1WJo8cLgSa5avhDcGfK79v9D0IglIx3XJkV14gq8kKftfovGerf1tTKK0lRa6fIiriOeOYelNjx29Fx9ZKJEs3WeYckpDeyoXpyfDnoncloU4R8nuEROPiJrstkxHghwzE8hghfMmVSBmgh367wIAboIvaVSbGQQjwLbpKcCzuF+7DQ/SsLJmWME9IvBAWvo20j7P1R2d+8zVzQZcfQPTX/YgqfY6VsbOAozIAJ9LaxfX936lgzU84QtIo9BYbBDZ5zyaXNhnm9876FpSlkr157Xvghpbjt+B4Blbk4+9CFzIlC2iFT0RBGB6WeG2kKmSiF+H/PLwHDsC2Agi1aDbqQhUqIr/SeyvguUrdarinELhPC68iODM8S8CT6YWom59EMDm7WGp64MDoCAaBJxW0+XUhS2pbWM7g5koRna6XkbTSFZKVC2twnqBQ6LY1DTSFpmRCf2/TTuQIHqjrpaQqBMiEFt2QJ9JeraGy8rkbHhsSh6VzP+g4EvnF1f0N1N/3aYgL+Lvn7eXVnt8R8aAQ0dbRC6YISIa2OfKe83INAsWUCOf2S7lzr2rhfIiSXZgP+kPyysah4QE613AGBNTd6bgvpZdy+B9cXl0u+1nIGumYrPXBWwij/QgLKgIkPjGdG3ZC8aLk0C3UKTlHSadGzrCa6cZZ7wpqVhJK6npQh+frxSTenukmY62Zke5v2+GdtQvMoU63wdFBx7srcC7pf5JPmUdaAJDMpH/om92HoFNgFyaMcyp+mYGk6g507WB27JK89ZFIibLyJQ/MoiUYn4CdhPhGJkbG0F5pHmWiMkFdSfdkXlm1kUotN8ihjekTSkBYdM7DQ/4gxbWyt0Ltk25MWftFF43UGghIL1QARkDxKi5xmE9HSNs1bGywLlW55Il3p39Fiq9Yx0V/bQFBikSI5UjGWVK6ZZ/uagJot34BCUJIJ3z1+wBwWOMu0viyjhJ7xsZUlflvKjzKTlnVtYo4WFpQ9cchtW0lKjsJEhD/BORRQMT1un0BSMqIVq6YPfVNLIhnnMUKJQyunONS9vn69fwwkJRat27Tj4ZcGOgV/uEdS4hI7sj/U9kcfW24RI5WSNrFtthAMbQKVkfLDlqRkJPEoeO8xjKEyPG76JSnxhSIy/U0Ol10G1dDn/hiSkpBcOo2ZSK9hulWI2ZROoe0SJbbGbPpD1gSzafpvy4/RLF+1o4G1c/fzyaJzuqaa8f82Tol++E4yZFUR+qOTtBYUAVKJOJu6gKLwWHW8u7LFYIt5a4516yDigPV3BqsQz5aYLa+DVxJrWifjUdnDWz4BH61kg1ilH6/kJJkSD3OsEkM4oEBzCllluLJZ9Ih7+ZgFwT2RjUtWFStpf6qFVHKf/5sdWDXE0sCsnqFUItJK6DH+XaaL7Djy+s5PaSnmxO3+TZI9a1WwkmQljioEqpIwAR2SuMnuZF/axT2lKlmBLqd2Y830MRW3Y8OFugJYXXxket45v16fcvSbl2Daf1973R7DMDVuVOl4umOKkjZUT5Z07MWkMOScT5hNKDvO0UqG36E+OOIrOkYdcc7Mb/UCF1Anlkygu8kn/HMpafSuF8Htla75mQ+M2DwGLemBad3wmA5LqB020yCEGlIwMh7UkmufyanxG+7k1VmRmr2zVk3O0BzqN1/9zQDrrYcu1Bvcq7L67Tr5EgmLbyrzGa4y+BJMPlkJrTyBL8PCubCbdN9ev5CM39hOIExUx/EXGVP/cNpF5nLT9w7rwP/IY/cLPOBPnjx58uTJk6r5CXO8FpZU+7yPAAAAAElFTkSuQmCC",ao={huya:"虎牙",bilibili:"哔哩",douyu:"斗鱼"},aa=[{name:"虎牙直播",icon:"https://www.huya.com/favicon.ico",id:"huya",categories:tm([]),categoryActive:tm(0),recommend:{page:1,hasMore:!0,list:tm([])},search:{page:1,hasMore:!0,list:tm([])},follows:ti(ah("huya"))},{name:"斗鱼直播",icon:"https://www.douyu.com/favicon.ico",id:"douyu",categories:tm([]),categoryActive:tm(0),recommend:{page:1,hasMore:!0,list:tm([])},search:{page:1,hasMore:!0,list:tm([])},follows:ti(ah("douyu"))},{name:"哔哩直播",icon:"https://www.bilibili.com/favicon.ico",id:"bilibili",categories:tm([]),categoryActive:tm(0),recommend:{page:1,hasMore:!0,list:tm([])},search:{page:1,hasMore:!0,list:tm([])},follows:ti(ah("bilibili"))}],as={huya:0,douyu:1,bilibili:3},al=["huya","douyu","bilibili"],au=tm(o9("volume",100)),ac=tm(o9("brightness",100)),af=e=>{au.value=e?Math.min(100,au.value+5):Math.max(0,au.value-5)},ad=e=>{ac.value=e?Math.min(200,ac.value+10):Math.max(50,ac.value-10)};function ah(e){let t=localStorage.getItem("follows-"+e);return t?JSON.parse(t):{}}let ap=ti(o9("dm-settings",{canvasOpen:!0,canvasFontsize:18,canvasGap:10,canvasOpacity:100,canvasRows:10,canvasSpeed:2.5,canvasColorOpen:!1,sideOpen:!0,sideFontsize:14,sideGap:2,sideColorOpen:!1,sideClean:100,colors:["#ffffff","#7e22ce","1d4ed8","#be185d","#fcd34d"],blockOpen:!1,blockWords:""}));rR(()=>{o7("dm-settings",ap)});let av=["#ffffff","#000000","#374151","#b91c1c","#f87171","#fdba74","#c2410c","#fcd34d","#b45309","#bef264","#4d7c0f","#86efac","#15803d","#5eead4","#0f766e","#67e8f9","#0e7490","#93c5fd","#1d4ed8","#d8b4fe","#7e22ce","#f0abfc","#a21caf","#f9a8d4","#be185d","#fda4af","#be123c"],am=iP(()=>0==ap.blockWords.length?[]:ap.blockWords.split(" ").map(e=>new RegExp(e))),ag=tm(0),ay=tm(o9("show-chat",!0)),a_=tm(o9("show-aside",!0));rR(()=>o7("show-chat",ay.value)),rR(()=>o7("show-aside",a_.value));let ab=o3(aa,e=>({name:e.name,list:iP(()=>Object.values(e.follows).sort(e=>e.status?-1:0))}));ab.unshift({name:"全部",list:iP(()=>aa.map(e=>Object.values(e.follows)).flat().sort(e=>e.status?-1:0))});let aw=ti(o9("login-info",{user:{},token:""})),ax=iP(()=>!!aw.token),ak=tm(!0),aS=tm(localStorage.getItem("last-sync")),aE="undefined"!=typeof document;function aT(e){return"object"==typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}let aA=Object.assign;function aO(e,t){let n={};for(let r in t){let i=t[r];n[r]=aI(i)?i.map(e):e(i)}return n}let aC=()=>{},aI=Array.isArray,aD=/#/g,aR=/&/g,aP=/\//g,aL=/=/g,aB=/\?/g,aU=/\+/g,aM=/%5B/g,aN=/%5D/g,aF=/%5E/g,aj=/%60/g,aV=/%7B/g,aG=/%7C/g,aH=/%7D/g,az=/%20/g;function aW(e){return encodeURI(""+e).replace(aG,"|").replace(aM,"[").replace(aN,"]")}function aq(e){return aW(e).replace(aU,"%2B").replace(az,"+").replace(aD,"%23").replace(aR,"%26").replace(aj,"`").replace(aV,"{").replace(aH,"}").replace(aF,"^")}function aJ(e){return null==e?"":aW(e).replace(aD,"%23").replace(aB,"%3F").replace(aP,"%2F")}function aK(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}let a$=/\/$/,aY=e=>e.replace(a$,"");function aQ(e,t,n="/"){let r,i={},o="",a="",s=t.indexOf("#"),l=t.indexOf("?");return s<l&&s>=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=e(o=t.slice(l+1,s>-1?s:t.length))),s>-1&&(r=r||t.slice(0,s),a=t.slice(s,t.length)),{fullPath:(r=function(e,t){let n,r;if(e.startsWith("/"))return e;if(!e)return t;let i=t.split("/"),o=e.split("/"),a=o[o.length-1];(".."===a||"."===a)&&o.push("");let s=i.length-1;for(n=0;n<o.length;n++)if("."!==(r=o[n]))if(".."===r)s>1&&s--;else break;return i.slice(0,s).join("/")+"/"+o.slice(n).join("/")}(null!=r?r:t,n))+(o&&"?")+o+a,path:r,query:i,hash:aK(a)}}function aX(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function aZ(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function a0(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e){var n,r;if(n=e[i],r=t[i],aI(n)?!a1(n,r):aI(r)?!a1(r,n):n!==r)return!1}return!0}function a1(e,t){return aI(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):1===e.length&&e[0]===t}let a2={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};!function(e){e.pop="pop",e.push="push"}(oZ||(oZ={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(o0||(o0={}));let a5=/^[^#]+#/;function a4(e,t){return e.replace(a5,"#")+t}let a3=()=>({left:window.scrollX,top:window.scrollY});function a8(e,t){return(history.state?history.state.position-t:-1)+e}let a6=new Map,a9=()=>location.protocol+"//"+location.host;function a7(e,t){let{pathname:n,search:r,hash:i}=t,o=e.indexOf("#");if(o>-1){let t=i.includes(e.slice(o))?e.slice(o).length:1,n=i.slice(t);return"/"!==n[0]&&(n="/"+n),aX(n,"")}return aX(n,e)+r+i}function se(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?a3():null}}function st(e){return"string"==typeof e||"symbol"==typeof e}let sn=Symbol("");function sr(e,t){return aA(Error(),{type:e,[sn]:!0},t)}function si(e,t){return e instanceof Error&&sn in e&&(null==t||!!(e.type&t))}!function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(o1||(o1={}));let so="[^/]+?",sa={sensitive:!1,strict:!1,start:!0,end:!0},ss=/[.+*?^${}()[\]/\\]/g;function sl(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=function(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?1===e.length&&80===e[0]?-1:1:e.length>t.length?1===t.length&&80===t[0]?1:-1:0}(r[n],i[n]);if(e)return e;n++}if(1===Math.abs(i.length-r.length)){if(su(r))return 1;if(su(i))return -1}return i.length-r.length}function su(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}let sc={type:0,value:""},sf=/[a-zA-Z0-9_]/;function sd(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function sh(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:function(e){let t={},n=e.props||!1;if("component"in e)t.default=n;else for(let r in e.components)t[r]="object"==typeof n?n[r]:n;return t}(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function sp(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function sv(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}function sm({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function sg(e){let t={};if(""===e||"?"===e)return t;let n=("?"===e[0]?e.slice(1):e).split("&");for(let e=0;e<n.length;++e){let r=n[e].replace(aU," "),i=r.indexOf("="),o=aK(i<0?r:r.slice(0,i)),a=i<0?null:aK(r.slice(i+1));if(o in t){let e=t[o];aI(e)||(e=t[o]=[e]),e.push(a)}else t[o]=a}return t}function sy(e){let t="";for(let n in e){let r=e[n];if(n=aq(n).replace(aL,"%3D"),null==r){void 0!==r&&(t+=(t.length?"&":"")+n);continue}(aI(r)?r.map(e=>e&&aq(e)):[r&&aq(r)]).forEach(e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))})}return t}let s_=Symbol(""),sb=Symbol(""),sw=Symbol(""),sx=Symbol(""),sk=Symbol("");function sS(){let e=[];return{add:function(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function sE(e,t,n,r,i,o=e=>e()){let a=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,l)=>{let u=e=>{if(!1===e)l(sr(4,{from:n,to:t}));else if(e instanceof Error)l(e);else"string"==typeof e||e&&"object"==typeof e?l(sr(2,{from:t,to:e})):(a&&r.enterCallbacks[i]===a&&"function"==typeof e&&a.push(e),s())},c=Promise.resolve(o(()=>e.call(r&&r.instances[i],t,n,u)));e.length<3&&(c=c.then(u)),c.catch(e=>l(e))})}function sT(e,t,n,r,i=e=>e()){let o=[];for(let a of e)for(let e in a.components){let s=a.components[e];if("beforeRouteEnter"===t||a.instances[e])if(aT(s)){let l=(s.__vccOpts||s)[t];l&&o.push(sE(l,n,r,a,e,i))}else{let l=s();o.push(()=>l.then(o=>{var s;if(!o)throw Error(`Couldn't resolve component "${e}" at "${a.path}"`);let l=(s=o).__esModule||"Module"===s[Symbol.toStringTag]||s.default&&aT(s.default)?o.default:o;a.mods[e]=o,a.components[e]=l;let u=(l.__vccOpts||l)[t];return u&&sE(u,n,r,a,e,i)()}))}}return o}function sA(e){let t=rl(sw),n=rl(sx),r=iP(()=>{let n=t_(e.to);return t.resolve(n)}),i=iP(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],o=n.matched;if(!i||!o.length)return -1;let a=o.findIndex(aZ.bind(null,i));if(a>-1)return a;let s=sC(e[t-2]);return t>1&&sC(i)===s&&o[o.length-1].path!==s?o.findIndex(aZ.bind(null,e[t-2])):a}),o=iP(()=>i.value>-1&&function(e,t){for(let n in t){let r=t[n],i=e[n];if("string"==typeof r){if(r!==i)return!1}else if(!aI(i)||i.length!==r.length||r.some((e,t)=>e!==i[t]))return!1}return!0}(n.params,r.value.params)),a=iP(()=>i.value>-1&&i.value===n.matched.length-1&&a0(n.params,r.value.params));return{route:r,href:iP(()=>r.value.href),isActive:o,isExactActive:a,navigate:function(n={}){if(function(e){if(!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&!e.defaultPrevented&&(void 0===e.button||0===e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}(n)){let n=t[t_(e.replace)?"replace":"push"](t_(e.to)).catch(aC);return e.viewTransition&&"undefined"!=typeof document&&"startViewTransition"in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}}}let sO=nd({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:sA,setup(e,{slots:t}){let n=ti(sA(e)),{options:r}=rl(sw),i=iP(()=>({[sI(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[sI(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{var r;let o=t.default&&(1===(r=t.default(n)).length?r[0]:r);return e.custom?o:iL("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}});function sC(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}let sI=(e,t,n)=>null!=e?e:null!=t?t:n,sD=nd({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=rl(sk),i=iP(()=>e.route||r.value),o=rl(sb,0),a=iP(()=>{let e,t=t_(o),{matched:n}=i.value;for(;(e=n[t])&&!e.components;)t++;return t}),s=iP(()=>i.value.matched[a.value]);rs(sb,iP(()=>a.value+1)),rs(s_,s),rs(sk,i);let l=tm();return rP(()=>[l.value,s.value,e.name],([e,t,n],[r,i,o])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),!e||!t||i&&aZ(t,i)&&r||(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:"post"}),()=>{let r=i.value,o=e.name,a=s.value,u=a&&a.components[o];if(!u)return sR(n.default,{Component:u,route:r});let c=a.props[o],f=iL(u,aA({},c?!0===c?r.params:"function"==typeof c?c(r):c:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[o]=null)},ref:l}));return sR(n.default,{Component:f,route:r})||f}}});function sR(e,t){if(!e)return null;let n=e(t);return 1===n.length?n[0]:n}function sP(e){let t=[],{record:n}=e;null!=n.name&&t.push({label:String(n.name),textColor:0,backgroundColor:2282478}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:0xfb923c}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:0xec4899}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:8702998}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:2450411}),n.redirect&&t.push({label:"string"==typeof n.redirect?`redirect: ${n.redirect}`:"redirects",textColor:0xffffff,backgroundColor:6710886});let r=n.__vd_id;return null==r&&(n.__vd_id=r=String(sL++)),{id:r,label:n.path,tags:t,children:e.children.map(sP)}}let sL=0;function sB(e){e.__vd_match=!1,e.children.forEach(sB)}let sU={class:"text-sm pos-fixed bottom-0 left-0 right-0 md:py-2 b-t-solid b b-gray-7 md:b-r-solid md:top-0 md:right-auto flex justify-around md:flex-col md:justify-left dark:bg-dark-7 z-10"},sM={class:"h-full scrolly md:px-3"},sN=nd({__name:"App",setup(e){let t=[{icon:"i-ri-home-smile-line",link:"/"},{icon:"i-ri-apps-2-line",link:"/category"},{icon:"i-ri-heart-line",link:"/follow"},{icon:"i-ri-search-line",link:"/search"},{icon:"i-ri-user-smile-line",link:"/user"}];nB(async()=>{document.querySelector("main").style.height=`calc(${window.innerHeight}px - 3.5rem)`});let n=rl(sx);return rP(n,()=>{let e=n.params.siteid;if(void 0==e)return;let t=al.findIndex(t=>t==e);-1!=t&&(ag.value=t)},void 0),rR(()=>{document.querySelectorAll(".v-toast").forEach(e=>{e.style.left=a_?"70px":"0"})}),(e,n)=>{let r=nW("router-link"),i=nW("router-view");return r2(),r6(rY,null,[tQ(ii("div",sU,[(r2(),r6(rY,null,nY(t,t=>io(r,{to:t.link,class:el(["hover:text-amber rounded-2 py-2 px-4 m-2",{"text-amber":e.$route.path==t.link}])},{default:tY(()=>[ii("div",{class:el(t.icon)},null,2)]),_:2},1032,["to","class"])),64))],512),[[i3,t_(a_)]]),ii("main",{class:el(["md:!h-100vh mx-2 md:mx-0 pt-2 box-border",{"md:ml-17.5":t_(a_),"!h-100vh":!t_(a_)}])},[ii("div",sM,[io(i,null,{default:tY(e=>{let{Component:t}=e;return[(r2(),r9(nE,{exclude:["play"]},[(r2(),r9(nJ(t)))],1024))]}),_:1})])],2)],64)}}}),sF=e=>{let t=tm(e);return[t,e=>t.value=e]},sj=/scroll|auto|overlay/i,sV={key:0,class:"text-center"},sG={key:1,class:"text-center"},sH=nd({__name:"list",props:{finshedText:{default:"没有更多了"},errorText:{default:"加载失败,点击重新加载"},immediate:{type:Boolean,default:!0},offset:{default:50}},emits:["load","refresh"],setup(e,t){let n,{emit:r}=t,i=tm(0),[o,a]=sF("normal"),s=tm(),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body,n=tm();return nB(()=>{e.value&&(n.value=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body,r=e;for(;r&&r!==n&&"HTML"!==(t=r).tagName&&"BODY"!==t.tagName&&1===t.nodeType;){let{overflowY:e}=window.getComputedStyle(r);if(sj.test(e))return r;r=r.parentNode}return n}(e.value,t))}),n}(s),u=()=>{i.value=l.value.scrollTop,"normal"==o.value&&l.value.scrollHeight-l.value.clientHeight-l.value.scrollTop<e.offset&&f()};nB(()=>{e.immediate&&f(),l.value.addEventListener("scroll",u,{passive:!0})}),nA(()=>{l.value.scrollTop=i.value,l.value.addEventListener("scroll",u)});let c=()=>{l.value.removeEventListener("scroll",u)};nO(c),nN(c);let f=()=>{a("loading"),r("load",a),clearTimeout(n),n=setTimeout(()=>{o6(l.value)||r("load",a)},2e3)};return(t,n)=>(r2(),r6("div",{ref_key:"root",ref:s,class:"h-full select-none"},[function(e,t,n={},r,i){if(tJ.ce||tJ.parent&&nk(tJ.parent)&&tJ.parent.ce)return"default"!==t&&(n.name=t),r2(),r9(rY,null,[io("slot",n,void 0)],64);let o=e[t];o&&o._c&&(o._d=!1),r2();let a=o&&function e(t){return t.some(t=>!r7(t)||t.type!==rX&&(t.type!==rY||!!e(t.children)))?t:null}(o(n)),s=n.key||a&&a.key,l=r9(rY,{key:(s&&!U(s)?s:`_${t}`)+""},a||(r?r():[]),a&&1===e._?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}(t.$slots,"default"),"loading"==t_(o)?(r2(),r6("div",sV,"加载中...")):"finshed"==t_(o)?(r2(),r6("div",sG,ef(e.finshedText),1)):"loaderror"==t_(o)?(r2(),r6("div",{key:2,class:"text-center cursor-pointer",onClick:f},ef(e.errorText),1)):iu("",!0)],512))}});var sz=n(961),sW=n(737);n.n(sW)()();let sq=`${origin}/api/`,sJ=(e,t)=>fetch(e,t).then(async e=>{let t=await e.text();return 200!=(t=JSON.parse((0,sz.decompressFromBase64)(t))).code?(ae.error(t.msg),Promise.reject(t.msg)):t.data},e=>{ae.error("请求异常!")}),sK=async(e,t,n)=>sJ(`${sq}${e}/${t}${n?"?"+new URLSearchParams(n).toString():""}`),s$=async e=>{let t=Object.keys(e.follows);if(!t.length)return Promise.resolve(!1);await sK(e.id,"getLiveStatus",{id:t.join(",")}).then(t=>Object.keys(t).forEach(n=>{let r=e.follows[n],i=t[n];r.status=i.status,i.avatar&&(r.avatar=i.avatar),i.title&&(r.title=i.title),i.cover&&(r.cover=i.cover),i.nickname&&(r.nickname=i.nickname),i.category&&(r.category=i.category),i.cid&&(r.cid=i.cid),i.online&&(r.online=i.online)})),o7("follows-"+e.id,e.follows)},sY=(e,t)=>sJ(`${sq}sync/${e}`,{body:JSON.stringify(t),method:"POST",headers:{token:aw.token||""}});async function sQ(e,t){let n=e.categories;for(let r of(n.value.length||(n.value=await sK(e.id,"getCategories")),n.value))for(let e of r.list)if(e.cid==t)return e;return null}let sX=e=>sY("logout",{token:e}).finally(()=>{if(e==aw.token){aw.user={username:"",token:[]},aw.token="",o7("login-info",aw);return}let t=aw.user.token.findIndex(t=>t.token==e);-1!=t&&(aw.user.token.splice(t,1),o7("login-info",aw))}),sZ=e=>sY("reset",e).then(e=>{aw.user=e.user,aw.token=e.token,o7("login-info",aw)}),s0=e=>sY("sign",e).then(e=>{aw.user=e.user,aw.token=e.token,o7("login-info",aw),s2(!0)}),s1=async()=>{if(!1==ax.value)return;let e=await sY("pull");if(!e)return;let t=[[],[],[],[]];o8(e,e=>{let n=as[e.site_id],r=aa[n].follows;if(0==e.status)return void delete aa[n].follows[e.room_id];if(t[n].push(e.room_id),r[e.room_id]){if(r[e.room_id].id)return;r[e.room_id].id=e.id;return}r[e.room_id]={id:e.id,sitename:ao[e.site_id],roomId:e.room_id,siteId:e.site_id,status:!1,avatar:"",nickname:e.nickname,title:"",online:"0",cover:"",category:""}});let n=[];if(aa.forEach((e,r)=>{o7("follows-"+e.id,e.follows),o8(Object.keys(e.follows),i=>{-1==t[r].findIndex(e=>e==i)&&n.push({site_id:e.follows[i].siteId,room_id:e.follows[i].roomId,nickname:e.follows[i].nickname})})}),aS.value=an(),0==n.length)return;let r=await sY("push",{follows:n});r&&o8(r,e=>{aa[as[e.site_id]].follows[e.room_id].id=e.id})},s2=e=>{(e||!aS.value||new Date(aS.value).getMilliseconds()+36e5<Date.now())&&s1().then(()=>{aS.value=an(),localStorage.setItem("last-sync",aS.value),e&&ae.success("同步成功")}).finally(()=>ak.value=!1)};s2();let s5=e=>{let t=aa[as[e.siteId]].follows;t[e.roomId]={sitename:e.sitename,roomId:e.roomId,siteId:e.siteId,status:e.status,avatar:e.avatar,nickname:e.nickname,title:e.title,online:e.online,cover:e.cover,category:e.category};let n="follows-"+e.siteId;return ax.value&&sY("add",{site_id:e.siteId,room_id:e.roomId,nickname:e.nickname}).then(r=>{t[e.roomId].id=r.id,o7(n,t),ae.success("添加云端关注成功")}),o7(n,t),ae.success("添加本地关注成功"),!0},s4=e=>{let t=aa[as[e.siteId]].follows,n=t[e.roomId];return e.id=n.id,e.avatar&&(n.avatar=e.avatar),e.title&&(n.title=e.title),e.cover&&(n.cover=e.cover),e.nickname&&(n.nickname=e.nickname),e.category&&n.category,e.cid&&(n.cid=e.cid),e.online&&(n.online=e.online),o7("follows-"+e.siteId,t),e.id},s3=e=>{let t=aa[as[e.siteId]].follows,n="follows-"+e.siteId;return delete t[e.roomId],o7(n,t),ae.success("取消本地关注成功"),e.id&&ax.value&&sY("remove",{id:e.id}).then(()=>ae.success("取消云端关注成功")),!1},s8={key:0,ref:"root",class:"grid gap-4 p-2 justify-evenly cursor-pointer select-none grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"},s6={class:"room-item-info shadow rounded-2 b-2px b-solid b-transparent pos-relative overflow-hidden"},s9={class:"pos-relative text-fuchsia-5 rounded-t-2 w-full aspect-video"},s7=["src"],le={class:"pos-absolute bottom-0 right-0 px-2 py-1 rounded-tl-2 bg-dark-6"},lt={class:"line-height-none pos-absolute top-0 right-0 px-1 py-1 rounded-tr-1 rounded-bl-2 bg-dark-6"},ln={key:0,class:"rounded-2 text-white pos-absolute text-8 top-0 bottom-0 left-0 right-0 flex justify-center items-center bg-gray-7 bg-op-80"},lr={class:"px-2 text-truncate leading-normal"},li={class:"px-2 pb-2 mt-1 flex items-center justify-between"},lo={class:"flex items-center grow"},la=["src"],ls={class:"text-truncate mx-1 w-2 grow"},ll=["onClick"],lu={key:1,class:"px-2 text-truncate leading-normal pb-2"},lc=nd({__name:"rooms",props:{list:{},remove:{type:Boolean}},setup:e=>(e,t)=>{let n=nW("router-link");return e.list.value.length>0?(r2(),r6("div",s8,[(r2(!0),r6(rY,null,nY(e.list.value,r=>(r2(),r9(n,{to:`/${r.siteId}/play/${r.roomId}`,key:`${r.siteId}-${r.roomId}`,class:"room-item"},{default:tY(()=>[ii("div",s6,[ii("div",s9,[ii("img",{loading:"lazy",src:r.cover,class:"mx-auto h-full rounded-2 select-none block"},null,8,s7),ii("div",le,ef(r.category),1),ii("div",lt,[t[0]||(t[0]=ii("div",{class:"i-mdi-fire"},null,-1)),ii("span",null,ef(r.online),1)]),r.status?iu("",!0):(r2(),r6("div",ln," 未开播 "))]),ii("div",lr,ef(r.title),1),e.remove?(r2(),r6(rY,{key:0},[ii("div",li,[ii("div",lo,[ii("img",{src:r.avatar,alt:"",class:"w-6 h-6 rounded-4"},null,8,la),ii("div",ls,ef(r.nickname),1)]),ii("div",null,ef(t_(ao)[r.siteId]),1)]),ii("div",{class:"pos-absolute z-1 left-0 top-0 p-2 text-green-5 hover:text-rose-5",onClick:ok(e=>t_(s3)(r),["prevent"])},t[1]||(t[1]=[ii("div",{class:"w-8 h-8 i-mdi-heart-off-outline"},null,-1)]),8,ll)],64)):(r2(),r6("div",lu,ef(r.nickname),1))])]),_:2},1032,["to"]))),128))],512)):iu("",!0)}}),lf={class:"h-full"},ld={class:"py-1 px-2 text-lg text-center relative"},lh={class:"hover:text-amber"},lp={key:0,class:"h-[calc(100%-3.25rem)] scrolly"},lv=nd({__name:"categoryRooms",setup(e){let t=rl(sx),n=tm(""),r=tm(),i={list:tm([]),page:1,hasMore:!0},o=e=>{let{site:o,id:a}=t.meta;sK(o.id,"getCategoryRooms",{id:a,pid:r.value,page:i.page}).then(t=>{if(i.list.value=i.list.value.concat(t.list),i.hasMore=t.hasMore,!t.hasMore)return e("finshed");i.page++,e("normal")},t=>{n.value=t,e("loaderror")})},a=tm(!1),s=()=>{document.querySelector("#goTop").click(),a.value=!0;let{site:e,id:o}=t.meta;sK(e.id,"getCategoryRooms",{id:o,pid:r.value,page:i.page}).then(e=>{i.list.value=e.list,i.hasMore=e.hasMore,i.page++},e=>{n.value=e}).finally(()=>a.value=!1)},l=t.fullPath;return sQ(t.meta.site,t.meta.id).then(e=>{n.value=(null==e?void 0:e.name)||null,r.value=null==e?void 0:e.pid}),nA(function(){l!=t.fullPath&&(l=t.fullPath,sQ(t.meta.site,t.meta.id).then(e=>{n.value=(null==e?void 0:e.name)||null,r.value=null==e?void 0:e.pid}),i.list.value=[],i.page=1,i.hasMore=!0)}),(e,r)=>{var u;return r2(),r6("div",lf,[ii("div",ld,[ii("div",{onClick:r[0]||(r[0]=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.$router.back&&e.$router.back(...n)}),class:"i-ri-arrow-left-line hover:text-amber absolute left-2"}),ii("div",{onClick:s,class:el(["i-ri-refresh-line hover:text-amber absolute right-4 md:right-unset md:left-12",{"animate-spin":t_(a)}])},null,2),ii("span",lh,ef(`${null==(u=t_(t).meta.site)?void 0:u.name} ${null==t_(n)?"分区不存在":""==t_(n)?"加载中":t_(n)}`),1)]),t_(n)?(r2(),r6("div",lp,[(r2(),r9(sH,{key:t_(l),onLoad:o},{default:tY(()=>[io(lc,{list:i.list},null,8,["list"])]),_:1}))])):iu("",!0)])}}}),lm=Symbol("tabs"),lg=(e,t)=>{let n=ti([]);return rs(e,Object.assign({link:e=>{e.proxy&&n.push(e.proxy)},unlink:e=>{let t=n.indexOf(e.proxy);n.splice(t,1)},children:n},t)),n},ly=e=>{let t=rl(e);if(void 0==t)return{parent:t,index:tm(-1)};let n=iy(),{link:r,unlink:i,children:o}=t;r(n),nF(()=>i(n));let a=iP(()=>o.indexOf(n.proxy));return{parent:t,children:o,index:a}},l_={class:"h-full box-border"},lb={class:"w-full box-border text-sm sm:text-base"},lw=["onClick"],lx={class:"h-[calc(100%-2rem)] scrolly box-border pt-1"},lk=nd({__name:"tabs",props:n5({link:{type:Boolean,default:!1},lazy:{type:Boolean,default:!0},grow:{type:Boolean,default:!1},swipeable:{type:Boolean,default:!1},swipeloop:{type:Boolean,default:!0},justify:{default:"justify-center"}},{active:{default:0},activeModifiers:{}}),emits:n5(["tabClick"],["update:active"]),setup(e,t){let{emit:n}=t,r=rU(e,"active"),i=e=>{r.value=e,n("tabClick",e)},o=lg(lm,{active:r,props:e}),a=iP(()=>o3(o,e=>e.title)),s=n1();return(t,n)=>{let l=nW("router-link");return r2(),r6("div",l_,[ii("div",lb,[ii("div",{class:el(["flex p1 sm:gap-1 text-center h-8 box-border lg:justify-center scrollx",[t_(o).length>5||t.grow?"":t.justify]])},[e.link?(r2(!0),r6(rY,{key:0},nY(t_(a),(e,n)=>(r2(),r9(l,{class:el(["px-1 sm:px-2 box-border shrink-0 rounded py-1 line-height-none text-centercursor-pointer hover:text-amber cursor-pointer",{"text-amber":r.value==n,grow:t.grow}]),to:t_(o)[n].href},{default:tY(()=>[il(ef(e),1)]),_:2},1032,["class","to"]))),256)):(r2(!0),r6(rY,{key:1},nY(t_(a),(e,n)=>(r2(),r6("a",{class:el(["px-1 sm:px-2 box-border shrink-0 rounded py-1 line-height-none text-centercursor-pointer hover:text-amber cursor-pointer",{"text-amber":r.value==n,grow:t.grow}]),onClick:e=>i(n)},ef(e),11,lw))),256))],2)]),ii("div",lx,[(r2(),r9(nJ(s.default)))])])}}}),lS=Symbol("swipe"),lE={class:"w-full h-full shrink-0 pos-relative"},lT=nd({__name:"swipeItem",emits:["inited"],setup(e,t){let{emit:n}=t,r=tm(!1),{parent:i,children:o,index:a}=ly(lS),s=n1(),l=iP(()=>(null==i?void 0:i.active.value)==a.value?(r.value||(r.value=!0,n("inited",a.value)),!0):a.value==(0==i.active.value?o.length-1:i.active.value-1)||a.value==(i.active.value==o.length-1?0:i.active.value+1)),u=iP(()=>l.value||r.value||!(null==i?void 0:i.props.lazy)?s.default:null);return(e,t)=>tQ((r2(),r6("div",lE,[(r2(),r9(nJ(t_(u))))],512)),[[i3,t_(l)]])}}),lA={class:"scrolly h-full w-full shrink-0"},lO=nd({__name:"tab",props:{title:{},href:{}},emits:["inited"],setup(e,t){let{expose:n,emit:r}=t,i=tm(!1),o=n1(),{parent:a,index:s,children:l}=ly(lm),u=iP(()=>(null==a?void 0:a.active.value)==s.value?(i.value||(i.value=!0,r("inited",s.value)),!0):(null==a?void 0:a.props.swipeable)&&(s.value==(0==a.active.value?l.length-1:a.active.value-1)||s.value==(a.active.value==l.length-1?0:a.active.value+1))),c=iP(()=>u.value||(null==a?void 0:a.props.swipeable)||i.value||!(null==a?void 0:a.props.lazy)?o.default:null);return n({title:e.title}),(e,t)=>{var n,r;return tQ((r2(),r6("div",lA,[(null==(n=t_(a))?void 0:n.props.swipeable)?(r2(),r9(lT,{key:0},{default:tY(()=>[(r2(),r9(nJ(t_(c))))]),_:1})):(r2(),r9(nJ(t_(c)),{key:1}))],512)),[[i3,t_(u)||(null==(r=t_(a))?void 0:r.props.swipeable)]])}}}),lC={key:0,class:"text-center"},lI={class:"pb-2 grid gap-4 px-4 md:px-2 grid-cols-4 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-10 xl:grid-cols-15 2xl:grid-cols-18"},lD=["src"],lR={class:"w-full text-truncate text-xs md:text-sm text-center"},lP=nd({__name:"category",setup(e){let t=iP(()=>aa[ag.value].id),n=tm(),r=e=>{aa[e].categories.value.length||(n.value="加载中...",sK(t.value,"getCategories").then(t=>{n.value=null,aa[e].categories.value=t},e=>n.value=e))};return(e,t)=>{let i=nW("router-link");return r2(),r9(lk,{active:t_(ag),"onUpdate:active":t[0]||(t[0]=e=>tv(ag)?ag.value=e:null),link:!0,class:"pt-1"},{default:tY(()=>[(r2(!0),r6(rY,null,nY(t_(aa),e=>(r2(),r9(lO,{title:e.name,href:`/${e.id}/category`,onInited:r,key:e.id},{default:tY(()=>[t_(n)?(r2(),r6("div",lC,ef(t_(n)),1)):(r2(),r9(lk,{key:1,active:e.categoryActive.value,"onUpdate:active":t=>e.categoryActive.value=t},{default:tY(()=>[(r2(!0),r6(rY,null,nY(e.categories.value,t=>(r2(),r9(lO,{title:t.name,key:t.id},{default:tY(()=>[ii("div",lI,[(r2(!0),r6(rY,null,nY(t.list,t=>(r2(),r9(i,{to:`/${e.id}/category/${t.cid}`,class:"cursor-pointer"},{default:tY(()=>[ii("img",{loading:"lazy",src:t.pic,class:"w-full aspect-ratio-square rounded"},null,8,lD),ii("div",lR,ef(t.name),1)]),_:2},1032,["to"]))),256))])]),_:2},1032,["title"]))),128))]),_:2},1032,["active","onUpdate:active"]))]),_:2},1032,["title","href"]))),128))]),_:1},8,["active"])}}}),lL={class:"text-center py-1"},lB={class:"w-60% max-w-md pos-relative inline-block"},lU={class:"h-[calc(100%-3rem)]"},lM={key:1},lN={key:1},lF=nd({__name:"search",setup(e){let t=tm(""),n=iP(()=>aa[ag.value]),r=tm(),i=()=>{if(!t.value)return Promise.resolve();let e=n.value.search;return e.list.value=[],e.page=1,e.hasMore=!0,r.value="搜索中...",sK(n.value.id,"searchRooms",{page:e.page,kw:t.value}).then(t=>{e.list.value=t.list,e.hasMore=t.hasMore,e.page+=1,r.value="finished"},e=>r.value=e)},o=e=>{let r=n.value.search,i=n.value.id;e("loading"),sK(i,"searchRooms",{page:r.page,kw:t.value}).then(t=>{if(r.list.value=r.list.value.concat(t.list),r.hasMore=t.hasMore,!r.hasMore)return e("finshed");r.page+=1,e("normal")},t=>{e("loaderror")})},a=e=>{s.push(`/${al[e]}/search`),l()||1==aa[e].search.page&&i()},s=rl(sw),l=()=>{if(t.value)return!!/^[\d]*$/.test(t.value)&&(s.push(`/play/${n.value.id}/${t.value}`),!0)},u=()=>{l()||(aa.forEach(e=>e.search.page=1),i())};return(e,n)=>(r2(),r6(rY,null,[ii("div",lL,[ii("div",lB,[tQ(ii("input",{class:"md:text-4 box-border w-full py-2.5 pl-3 pr-9 text-white bg-transparent b-1 b-style-groove b-green rounded-6 outline-0",type:"text","onUpdate:modelValue":n[0]||(n[0]=e=>tv(t)?t.value=e:null),onKeydown:oE(u,["enter"]),placeholder:"请输入房间号或关键字"},null,544),[[ob,t_(t),void 0,{trim:!0}]]),ii("div",{class:"i-ri-search-line top-50% absolute right-3",onClick:u,style:{transform:"translateY(-50%)"}})])]),ii("div",lU,[io(lk,{active:t_(ag),"onUpdate:active":n[1]||(n[1]=e=>tv(ag)?ag.value=e:null),onTabClick:a},{default:tY(()=>[(r2(!0),r6(rY,null,nY(t_(aa),e=>(r2(),r9(lO,{title:e.name,key:e.id},{default:tY(()=>["finished"==t_(r)?(r2(),r6(rY,{key:0},[e.search.list.value.length?(r2(),r9(sH,{key:0,onLoad:o},{default:tY(()=>[io(lc,{list:e.search.list},null,8,["list"])]),_:2},1024)):(r2(),r6("div",lM," 什么也没有找到 "))],64)):(r2(),r6("div",lN,ef(t_(r)),1))]),_:2},1032,["title"]))),128))]),_:1},8,["active"])])],64))}}),lj={class:"flex justify-center items-center"},lV={class:"h-[calc(100%-3rem)]"},lG=nd({__name:"follow",setup(e){let t=tm(0),n=tm(!1),r=()=>{var e;if(n.value)return;let r=t.value;n.value=!0,0==r?Promise.all(o3(aa,s$)).finally(i):null==(e=s$(aa[r-1]))||e.finally(i)},i=()=>setTimeout(()=>n.value=!1,300);rP(ak,()=>{!0!=ak.value&&r()},{immediate:!0});let o=e=>e("finshed");return(e,i)=>(r2(),r6(rY,null,[ii("div",lj,[i[1]||(i[1]=ii("div",null,"我的关注",-1)),ii("div",{onClick:r,class:el(["rounded-6 mx-4 hover:text-amber i-ri-refresh-line",{"animate-spin":t_(n)}])},null,2)]),ii("div",lV,[io(lk,{active:t_(t),"onUpdate:active":i[0]||(i[0]=e=>tv(t)?t.value=e:null)},{default:tY(()=>[(r2(!0),r6(rY,null,nY(t_(ab),e=>(r2(),r9(lO,{title:e.name},{default:tY(()=>[io(sH,{onLoad:o,"finshed-text":""},{default:tY(()=>[io(lc,{list:e.list,remove:!0},null,8,["list"])]),_:2},1024)]),_:2},1032,["title"]))),256))]),_:1},8,["active"])])],64))}}),lH=nd({__name:"index",setup(e){let t=iP(()=>aa[ag.value].id),n=e=>{let n=aa[ag.value].recommend;sK(t.value,"getRecommendRooms",{page:n.page}).then(t=>{if(n.list.value=n.list.value.concat(t.list),n.hasMore=t.hasMore,!n.hasMore)return e("finshed");n.page++,e("normal")},()=>e("loaderror"))};return(e,t)=>(r2(),r9(lk,{active:t_(ag),"onUpdate:active":t[0]||(t[0]=e=>tv(ag)?ag.value=e:null),link:!0,class:"pt-1"},{default:tY(()=>[(r2(!0),r6(rY,null,nY(t_(aa),e=>(r2(),r9(lO,{href:`/${e.id}`,key:e.id,title:e.name,class:"pos-relative"},{default:tY(()=>[io(sH,{onLoad:n,class:"h-full"},{default:tY(()=>[io(lc,{list:e.recommend.list},null,8,["list"])]),_:2},1024)]),_:2},1032,["href","title"]))),128))]),_:1},8,["active"]))}}),lz=nd({__name:"switch",props:{value:{type:Boolean,required:!0},valueModifiers:{}},emits:["update:value"],setup(e){let t=rU(e,"value");return(e,n)=>(r2(),r6("div",{onClick:n[0]||(n[0]=()=>t.value=!t.value),class:el(["pos-relative w-12 inline-block cursor-pointer rounded-6 h-6",[t.value?"bg-amber":"bg-gray-4"]]),style:{transition:"background-color .3s"}},[ii("div",{class:"w-6 h-full rounded-6 bg-white",style:ei([{transition:"transform .3s"},t.value?"transform:translateX(1.5rem)":""])},null,4)],2))}}),lW={class:"rounded-4 flex bg-gray-7 w-min p-2 py-1 gap-2"},lq=nd({__name:"stepper",props:n5({max:{},min:{},step:{}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(e){let t=rU(e,"value"),n=()=>t.value=Math.min(t.value+e.step,e.max),r=()=>t.value=Math.max(t.value-e.step,e.min);return(e,i)=>(r2(),r6("div",lW,[ii("div",{class:"i-ri-subtract-fill",onClick:r}),ii("div",null,ef(t.value),1),ii("div",{class:"i-ri-add-fill",onClick:n})]))}}),lJ=function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}(),lK=e=>lJ?void 0==e.touches?e:e.touches[0]||e.changedTouches[0]:e,l$=nd({__name:"slider",props:n5({max:{default:100},min:{default:0},width:{default:30},height:{default:100}},{value:{required:!0},valueModifiers:{}}),emits:["update:value"],setup(e){let t,n=rU(e,"value"),r=tm(),i=e.width<e.height,o=e=>{e.stopPropagation(),l(e),document.addEventListener("mousemove",l,!0),document.addEventListener("mouseup",u,!0)},a=iP(()=>(n.value-e.min)/(e.max-e.min)*100),s=iP(()=>{let e=100-a.value,t=`top:${e}%`,n=`left:${e}%`;return i?{loaded:t,indicator:t}:{loaded:`${n};transform:translateX(-100%)`,indicator:n}}),l=r=>{r.stopPropagation(),r=lK(r);let o=100-(Math.min(i?t.height:t.width,Math.max(0,i?r.clientY-t.y:r.clientX-t.x))/(i?t.height:t.width)*100|0);n.value=((e.max-e.min)*o|0)/100+e.min|0},u=e=>{e.stopPropagation(),document.removeEventListener("mousemove",l,!0),document.removeEventListener("mouseup",u,!0)};return nB(()=>{t=r.value.getBoundingClientRect(),r.value.addEventListener("mousedown",o,!0)}),nN(()=>{r.value.removeEventListener("mousedown",o,!0)}),(t,n)=>(r2(),r6("div",{class:el(["cursor-pointer flex justify-center",i?" py-4 ":"px-4"]),style:ei({width:`${e.width}px`,height:`${e.height}px`})},[ii("div",{ref_key:"root",ref:r,onClick:l,class:"w-full h-full pos-relative flex justify-center items-center"},[ii("div",{class:el(["bg-gray pos-relative overflow-hidden",i?"h-full w-2px":"w-full h-2px"])},[ii("div",{class:"w-full bg-amber h-full pos-absolute",style:ei(t_(s).loaded)},null,4)],2),ii("div",{class:el(["pos-absolute w-12px h-12px bg-amber rounded-2",i?"-mt-6px":"-ml-6px"]),style:ei(t_(s).indicator)},null,6)],512)],6))}}),lY={key:0,class:"z-1 fixed top-0 bottom-0 left-0 right-0 bg-transparent","data-index":"-1"},lQ={class:"p-1 hover:text-amber","data-index":"-1"},lX={class:"left-50% text-center z-1 pos-absolute top-0 w-max",style:{transform:"translate3d(-50%,-100%,0)"}},lZ=["data-index"],l0=nd({__name:"select",props:n5(["list"],{active:{required:!0},activeModifiers:{}}),emits:["update:active"],setup(e){let t=rU(e,"active"),n=tm(!1),r=e=>{let r=e.target.dataset.index;r&&("-1"!=r&&(t.value=parseInt(r)),n.value=!n.value)};return(i,o)=>(r2(),r6("div",{onClick:r,class:"inline-block pos-relative cursor-pointer text-center"},[t_(n)?(r2(),r6("div",lY)):iu("",!0),ii("div",lQ,ef(e.list[t.value]),1),tQ(ii("div",lX,[(r2(!0),r6(rY,null,nY(e.list,(e,n)=>(r2(),r6("div",{"data-index":n,class:el([{"text-amber":n==t.value},"p-1 hover:text-amber"])},ef(e),11,lZ))),256))],512),[[i3,t_(n)]])]))}});var l1=Object.create,l2=Object.defineProperty,l5=Object.getOwnPropertyDescriptor,l4=Object.getOwnPropertyNames,l3=Object.getPrototypeOf,l8=Object.prototype.hasOwnProperty,l6=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of l4(t))l8.call(e,i)||i===n||l2(e,i,{get:()=>t[i],enumerable:!(r=l5(t,i))||r.enumerable});return e},l9=(e,t,n)=>(n=null!=e?l1(l3(e)):{},l6(!t&&e&&e.__esModule?n:l2(n,"default",{value:e,enumerable:!0}),e)),l7=((e,t)=>function(){return t||(0,e[l4(e)[0]])((t={exports:{}}).exports,t),t.exports})({"node_modules/eventemitter3/index.js"(e,t){var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,n,i,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var s=new o(n,i||e,a),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function l(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1)),l.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)n.call(e,t)&&i.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},l.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=Array(o);i<o;i++)a[i]=n[i].fn;return a},l.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},l.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,a),!0}for(u=1,l=Array(f-1);u<f;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!l)for(d=1,l=Array(f-1);d<f;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},l.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var l=0,u=[],c=a.length;l<c;l++)(a[l].fn!==t||i&&!a[l].once||n&&a[l].context!==n)&&u.push(a[l]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,void 0!==t&&(t.exports=l)}});function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach(function(t){ul(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function un(){un=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var o,a,s,l,u=Object.create((t&&t.prototype instanceof d?t:d).prototype);return r(u,"_invoke",{value:(o=e,a=n,s=new S(i||[]),l="suspendedStart",function(e,t){if("executing"===l)throw Error("Generator is already running");if("completed"===l){if("throw"===e)throw t;return T()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=function e(t,n){var r=n.method,i=t.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+r+"' method")),f;var o=c(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,f;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):a:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,f)}(n,s);if(r){if(r===f)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===l)throw l="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l="executing";var i=c(o,a,s);if("normal"===i.type){if(l=s.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(l="completed",s.method="throw",s.arg=i.arg)}})}),u}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function d(){}function h(){}function p(){}var m={};l(m,o,function(){return this});var g=Object.getPrototypeOf,y=g&&g(g(E([])));y&&y!==t&&n.call(y,o)&&(m=y);var _=p.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function w(e,t){var i;r(this,"_invoke",{value:function(r,o){function a(){return new t(function(i,a){!function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then(function(e){r("next",e,a,s)},function(e){r("throw",e,a,s)}):t.resolve(f).then(function(e){u.value=e,a(u)},function(e){return r("throw",e,a,s)})}s(l.arg)}(r,o,i,a)})}return i=i?i.then(a,a):a()}})}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=p,r(_,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,function(){return this}),e.AsyncIterator=w,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new w(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},b(_),l(_,s,"Generator"),l(_,o,function(){return this}),l(_,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=E,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function ur(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,i)}function ui(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){ur(o,r,i,a,s,"next",e)}function s(e){ur(o,r,i,a,s,"throw",e)}a(void 0)})}}function uo(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ud(r.key),r)}}function us(e,t,n){return t&&ua(e.prototype,t),n&&ua(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ul(e,t,n){return(t=ud(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uu(e){return(uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uc(e,t){return(uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function uf(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ud(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function up(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uh(Object(n),!0).forEach(function(t){ux(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uv(){uv=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var o,a,s,l,u=Object.create((t&&t.prototype instanceof d?t:d).prototype);return r(u,"_invoke",{value:(o=e,a=n,s=new S(i||[]),l="suspendedStart",function(e,t){if("executing"===l)throw Error("Generator is already running");if("completed"===l){if("throw"===e)throw t;return T()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=function e(t,n){var r=n.method,i=t.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+r+"' method")),f;var o=c(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,f;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):a:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,f)}(n,s);if(r){if(r===f)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===l)throw l="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l="executing";var i=c(o,a,s);if("normal"===i.type){if(l=s.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(l="completed",s.method="throw",s.arg=i.arg)}})}),u}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function d(){}function h(){}function p(){}var m={};l(m,o,function(){return this});var g=Object.getPrototypeOf,y=g&&g(g(E([])));y&&y!==t&&n.call(y,o)&&(m=y);var _=p.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function w(e,t){var i;r(this,"_invoke",{value:function(r,o){function a(){return new t(function(i,a){!function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then(function(e){r("next",e,a,s)},function(e){r("throw",e,a,s)}):t.resolve(f).then(function(e){u.value=e,a(u)},function(e){return r("throw",e,a,s)})}s(l.arg)}(r,o,i,a)})}return i=i?i.then(a,a):a()}})}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=p,r(_,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,function(){return this}),e.AsyncIterator=w,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new w(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},b(_),l(_,s,"Generator"),l(_,o,function(){return this}),l(_,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=E,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function um(e){return(um="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ug(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,i)}function uy(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){ug(o,r,i,a,s,"next",e)}function s(e){ug(o,r,i,a,s,"throw",e)}a(void 0)})}}function u_(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function ub(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uP(r.key),r)}}function uw(e,t,n){return t&&ub(e.prototype,t),n&&ub(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ux(e,t,n){return(t=uP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uk(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uE(e,t)}function uS(e){return(uS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uE(e,t){return(uE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function uT(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function uA(e,t,n){return(uA=uT()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&uE(i,n.prototype),i}).apply(null,arguments)}function uO(e){var t="function"==typeof Map?new Map:void 0;return(uO=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return uA(e,arguments,uS(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),uE(n,e)})(e)}function uC(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uI(e){var t=uT();return function(){var n,r=uS(e);n=t?Reflect.construct(r,arguments,uS(this).constructor):r.apply(this,arguments);if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw TypeError("Derived constructors may only return object or undefined");return uC(this)}}function uD(){return(uD="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=uS(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}}).apply(this,arguments)}function uR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uP(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var uL=function(){function e(){u_(this,e)}return uw(e,null,[{key:"start",value:function(e){return!e||!e.length||1===e.length&&e.end(0)-e.start(0)<1e-6||1===e.length&&0>e.start(0)?0:e.start(0)}},{key:"end",value:function(e){return!e||!e.length||1===e.length&&e.end(0)-e.start(0)<1e-6?0:e.end(e.length-1)}},{key:"get",value:function(e){if(e)try{return e.buffered}catch(e){}}},{key:"buffers",value:function(e,t){if(!e||!e.length)return[];for(var n=[],r=0,i=e.length;r<i;r++){var o=n.length;if(o&&t){var a=n[o-1],s=a[1];if(e.start(r)-s<=t){var l=e.end(r);l>s&&(a[1]=l)}else n.push([e.start(r),e.end(r)])}else n.push([e.start(r),e.end(r)])}return n}},{key:"totalLength",value:function(e){return e&&e.length?e.reduce(function(e,t){return e+(t[1]-t[0])},0):0}},{key:"info",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t||!t.length)return{start:0,end:0,buffers:[]};for(var i=0,o=0,a=0,s=0,l=0,u=0,c=0,f=e.buffers(t,r),d=0,h=f.length;d<h;d++){var p=f[d];if(n+r>=p[0]&&n<=p[1])i=p[0],o=p[1],a=d;else if(n+r<p[0]){s=p[0],l=p[1];break}else n+r>p[1]&&(u=p[0],c=p[1])}return{start:i,end:o,index:a,buffers:f,nextStart:s,nextEnd:l,prevStart:u,prevEnd:c,currentTime:n,behind:n-i,remaining:o?o-n:0,length:e.totalLength&&e.totalLength(f)}}},{key:"isBuffered",value:function(t,n){if(t){var r=e.get(t);if(null!=r&&r.length){for(var i=0;i<r.length;i++)if(n>=r.start(i)&&n<=r.end(i))return!0}}return!1}}]),e}(),uB="undefined"!=typeof window,uU={MANIFEST:"manifest",NETWORK:"network",NETWORK_TIMEOUT:"network_timeout",NETWORK_FORBIDDEN:"network_forbidden",NETWORK_NOTFOUND:"network_notfound",NETWROK_RANGE_NOT_SATISFIABLE:"network_range_not_satisfiable",DEMUX:"demux",REMUX:"remux",MEDIA:"media",DRM:"drm",OTHER:"other",RUNTIME:"runtime",SUB_TYPES:{FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",MSE_CHANGE_TYPE:"MSE_CHANGE_TYPE",OPTION:"OPTION",DASH:"DASH",LICENSE:"LICENSE",CUSTOM_LICENSE:"CUSTOM_LICENSE",MSE_HIJACK:"MSE_HIJACK",EME_HIJACK:"EME_HIJACK",SIDX:"SIDX",NO_CANPLAY_ERROR:"NO_CANPLAY_ERROR",BUFFERBREAK_ERROR:"BUFFERBREAK_ERROR",WAITING_TIMEOUT_ERROR:"WAITING_TIMEOUT_ERROR",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_CODEC_NOT_SUPPORTED:"MEDIA_ERR_CODEC_NOT_SUPPORTED",MEDIA_ERR_URL_EMPTY:"MEDIA_ERR_URL_EMPTY"}},uM=(ux(o2={},uU.MANIFEST,{HLS:1100,DASH:1200}),ux(o2,uU.NETWORK,2100),ux(o2,uU.NETWORK_TIMEOUT,2101),ux(o2,uU.NETWORK_FORBIDDEN,2103),ux(o2,uU.NETWORK_NOTFOUND,2104),ux(o2,uU.NETWROK_RANGE_NOT_SATISFIABLE,2116),ux(o2,uU.DEMUX,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),ux(o2,uU.REMUX,{FMP4:4100,MP4:4200}),ux(o2,uU.MEDIA,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,MSE_CHANGE_TYPE:5205,EME_HIJACK:5301}),ux(o2,uU.DRM,{LICENSE:7100,CUSTOM_LICENSE:7200}),ux(o2,uU.OTHER,8e3),ux(o2,uU.RUNTIME,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),o2),uN=function(e){uk(n,e);var t=uI(n);function n(e,r,i,o,a){var s;return u_(this,n),(s=t.call(this,a||(null==i?void 0:i.message))).errorType=e===uU.NETWORK_TIMEOUT?uU.NETWORK:e,s.originError=i,s.ext=o,s.errorCode=uM[e][r]||uM[e],s.errorMessage=s.message,s.errorCode||(s.errorType=uU.OTHER,s.errorCode=uM[s.errorType]),s}return uw(n,null,[{key:"create",value:function(e,t,r,i,o){return e instanceof n?e:(e instanceof Error&&(r=e,e=""),e||(e=uU.OTHER),new n(e,t,r,i,o))}},{key:"network",value:function(e){var t;return new n(null!=e&&e.isTimeout?uU.NETWORK_TIMEOUT:uU.NETWORK,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null==(t=e.response)?void 0:t.status})}}]),n}(uO(Error)),uF={DEBUG:1,LOG:2,WARN:3,ERROR:4},uj=["Boolean","Number","String","Undefined","Null","Date","Object"],uV=function(){function e(t,n){u_(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==n?void 0:n.logCacheLevel)||3,this.logMaxSize=(null==n?void 0:n.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}return uw(e,[{key:"debug",value:function(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];this.logCache.apply(this,[uF.DEBUG].concat(r)),e.disabled||(t=console).debug.apply(t,["[".concat(uG(),"]"),this._prefix].concat(r))}},{key:"log",value:function(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];this.logCache.apply(this,[uF.LOG].concat(r)),e.disabled||(t=console).log.apply(t,["[".concat(uG(),"]"),this._prefix].concat(r))}},{key:"warn",value:function(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];this.logCache.apply(this,[uF.WARN].concat(r)),e.disabled||(t=console).warn.apply(t,["[".concat(uG(),"]"),this._prefix].concat(r))}},{key:"error",value:function(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];this.logCache.apply(this,[uF.ERROR].concat(r)),e.disabled||(t=console).error.apply(t,["[".concat(uG(),"]"),this._prefix].concat(r))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=r.map(function(e){return function e(t,n,r){r||(r=1),n||(n=2);var i={};if(!t||"object"!==um(t))return t;var o=Object.prototype.toString.call(t).slice(8,-1);if(!uj.includes(o))return o;if(!(r>n)){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r===n?i[a]=function(e){if("object"!==um(e))return e;var t=Object.prototype.toString.call(e).slice(8,-1);switch(t){case"Array":case"Uint8Array":case"ArrayBuffer":return t+"["+e.length+"]";case"Object":return"{}";default:return t}}(t[a]):"object"===um(t[a])?i[a]=e(t[a],n,r+1):i[a]=t[a]);return i}}(e)});t="[".concat(uG(),"]")+this._prefix+JSON.stringify(o)}catch(e){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function uG(){return new Date().toLocaleString()}function uH(){var e,t,n=new Promise(function(n,r){e=n,t=r});return n.used=!1,n.resolve=function(){return n.used=!0,e.apply(void 0,arguments)},n.reject=function(){return n.used=!0,t.apply(void 0,arguments)},n}function uz(){try{return parseInt(performance.now(),10)}catch(e){return new Date().getTime()}}ux(uV,"disabled",!0);var uW={stringify:function(e){try{return JSON.stringify(e)}catch(e){return""}}};function uq(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];try{if(!uB)return null;if(e&&"undefined"!=typeof ManagedMediaSource)return ManagedMediaSource;return window.MediaSource}catch(e){}}function uJ(e){return/ManagedMediaSource/gi.test(Object.prototype.toString.call(e))}var uK={APPEND:"appendBuffer",REMOVE:"removeBuffer",UPDATE_DURATION:"updateDuration"},u$=function(){var e,t,n;function r(e,t){var n=this;u_(this,r),ux(this,"media",null),ux(this,"mediaSource",null),ux(this,"_openPromise",uH()),ux(this,"_queue",Object.create(null)),ux(this,"_sourceBuffer",Object.create(null)),ux(this,"_mseFullFlag",{}),ux(this,"_st",0),ux(this,"_opst",0),ux(this,"_logger",null),ux(this,"_config",null),ux(this,"_url",null),ux(this,"_onStartStreaming",function(){n._logger.debug("startstreaming")}),ux(this,"_onEndStreaming",function(){n._logger.debug("endstreaming")}),ux(this,"_onSBUpdateEnd",function(e){var t=n._queue[e];if(t){var r=t[0];if((null==r?void 0:r.opName)!==uK.UPDATE_DURATION&&t.shift(),r){var i,o,a=uz()-n._opst;n._logger.debug("UpdateEnd(".concat(e,"/").concat(r.opName,")"),uW.stringify(function(e){var t=[];if(e instanceof TimeRanges)for(var n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}(null==(i=n._sourceBuffer[e])?void 0:i.buffered)),a,r.context),r.promise.resolve({name:r.opName,context:r.context,costtime:a});var s=null==(o=r.context)?void 0:o.callback;s&&"function"==typeof s&&s(r.context),n._startQueue(e)}}}),ux(this,"_onSBUpdateError",function(e,t){var r=n._queue[e];if(r){var i=r[0];i&&(n._logger.error("UpdateError",e,i.opName,i.context),i.promise.reject(new uN(uU.MEDIA,uU.SUB_TYPES.MSE_APPEND_BUFFER,t)))}}),this._config=Object.assign(r.getDefaultConfig(),t),e&&this.bindMedia(e),this._logger=new uV("MSE"),this._config.openLog&&uV.enable()}return uw(r,[{key:"isOpened",get:function(){var e;return(null==(e=this.mediaSource)?void 0:e.readyState)==="open"}},{key:"hasOpTasks",get:function(){var e=this,t=!1;return Object.keys(this._queue).forEach(function(n){var r=e._queue[n];Array.isArray(r)&&(t||(t=r.length>0))}),t}},{key:"url",get:function(){return this._url}},{key:"duration",get:function(){var e;return(null==(e=this.mediaSource)?void 0:e.duration)||-1}},{key:"isEnded",get:function(){return!!this.mediaSource&&"ended"===this.mediaSource.readyState}},{key:"streaming",get:function(){return!uJ(this.mediaSource)||this.mediaSource.streaming}},{key:"isFull",value:function(e){return e?this._mseFullFlag[e]:this._mseFullFlag[r.VIDEO]}},{key:"updateDuration",value:function(e){var t=this,n=this.mediaSource&&this.mediaSource.duration>e;if(this.mediaSource&&this.mediaSource.duration>e){var r=0;if(Object.keys(this._sourceBuffer).forEach(function(e){try{r=Math.max(t.bufferEnd(e)||0,r)}catch(e){}}),e<r)return Promise.resolve()}return this._enqueueBlockingOp(function(){if(t.isEnded)return void t._logger.debug("setDuration but ended");t.mediaSource&&(t.mediaSource.duration=e,t._logger.debug("setDuration",e))},uK.UPDATE_DURATION,{isReduceDuration:n})}},{key:"open",value:function(){var e=this;if(this._openPromise.used&&!this.isOpened&&this.mediaSource){var t=this.mediaSource;t.addEventListener("sourceopen",function n(){var r=uz()-e._st;e._logger.debug("sourceopen",r),t.removeEventListener("sourceopen",n),e._openPromise.resolve({costtime:r})}),this._openPromise=uH()}return this._openPromise}},{key:"bindMedia",value:(e=uy(uv().mark(function e(t){var n,r,i,o,a=this;return uv().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.mediaSource||this.media)){e.next=3;break}return e.next=3,this.unbindMedia();case 3:if(n=uq(this._config.preferMMS),!(!t||!n)){e.next=6;break}throw Error("Param media or MediaSource does not exist");case 6:return this.media=t,i=uJ(r=this.mediaSource=new n),this._st=uz(),o=function e(){var n=uz()-a._st;a._logger.debug("sourceopen"),r.removeEventListener("sourceopen",e),URL.revokeObjectURL(t.src),a._openPromise.resolve({costtime:n})},r.addEventListener("sourceopen",o),i&&(r.addEventListener("startstreaming",this._onStartStreaming),r.addEventListener("endstreaming",this._onEndStreaming)),this._url=URL.createObjectURL(r),t.src=this._url,t.disableRemotePlayback=i,e.abrupt("return",this._openPromise);case 17:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"unbindMedia",value:(t=uy(uv().mark(function e(){var t,n,r,i=this;return uv().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._openPromise.used||this._openPromise.resolve(),t=this.mediaSource){if(Object.keys(this._queue).forEach(function(e){var t=i._queue[e];t&&t.forEach(function(e){var t,n;return null==(t=e.promise)||null==(n=t.resolve)?void 0:n.call(t)})}),n=!!this.media&&this.media.readyState>=1,r="open"===t.readyState,n&&r)try{t.endOfStream()}catch(e){}Object.keys(this._sourceBuffer).forEach(function(e){try{t.removeSourceBuffer(i._sourceBuffer[e])}catch(e){}}),uJ(t)&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming))}if(this.media){this.media.disableRemotePlayback=!1,this.media.removeAttribute("src");try{this.media.load()}catch(e){}this.media=null}this.mediaSource=null,this._openPromise=uH(),this._queue=Object.create(null),this._sourceBuffer=Object.create(null);case 8:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"createSource",value:function(e,t){var n;if(!this._sourceBuffer[e]&&this.mediaSource){try{n=this._sourceBuffer[e]=this.mediaSource.addSourceBuffer(t)}catch(e){throw new uN(uU.MEDIA,uU.SUB_TYPES.MSE_ADD_SB,e)}n.mimeType=t,n.addEventListener("updateend",this._onSBUpdateEnd.bind(this,e)),n.addEventListener("error",this._onSBUpdateError.bind(this,e))}}},{key:"changeType",value:function(e,t){var n=this,r=this._sourceBuffer[e];return this.mediaSource&&r&&r.mimeType!==t?"function"!=typeof r.changeType?Promise.reject(new uN(uU.MEDIA,uU.SUB_TYPES.MSE_CHANGE_TYPE,Error("changeType is not a function"))):this._enqueueOp(e,function(){try{r.changeType(t)}catch(e){throw new uN(uU.MEDIA,uU.SUB_TYPES.MSE_CHANGE_TYPE,e)}r.mimeType=t,n._onSBUpdateEnd(e)},"changeType",{mimeType:t}):Promise.resolve()}},{key:"createOrChangeSource",value:function(e,t){return this.createSource(e,t),this.changeType(e,t)}},{key:"append",value:function(e,t,n){var r=this;return t&&t.byteLength&&this._sourceBuffer[e]?this._enqueueOp(e,function(){var i;r.mediaSource&&!r.media.error&&(r._logger.debug("MSE APPEND START",n),r._opst=uz(),null==(i=r._sourceBuffer[e])||i.appendBuffer(t))},uK.APPEND,n):Promise.resolve()}},{key:"remove",value:function(e,t,n,r){var i=this,o=!1;return this._mseFullFlag[e]&&(o=!0),this._enqueueOp(e,function(){if(i.mediaSource&&!i.media.error){var o=i._sourceBuffer[e];if(t>=n||!o)return void i._onSBUpdateEnd(e);i._opst=uz(),i._logger.debug("MSE REMOVE START",e,t,n,r),o.remove(t,n)}},uK.REMOVE,r,o)}},{key:"clearBuffer",value:function(e,t){var n,r=this;return Object.keys(this._sourceBuffer).forEach(function(i){n=r.remove(i,e,t)}),n||Promise.resolve()}},{key:"clearAllBuffer",value:function(){var e,t=this;return Object.keys(this._sourceBuffer).forEach(function(n){var r=t._sourceBuffer[n];e=t.remove(n,0,uL.end(uL.get(r)))}),e}},{key:"clearOpQueues",value:function(e,t){this._logger.debug("MSE clearOpQueue START");var n,r=this._queue[e];if(t&&r){this._queue[e]=[];return}if(r&&r[e]&&!(r.length<5)){var i=[];r.forEach(function(e){e.context&&e.context.isinit&&i.push(e)}),this._queue[e]=r.slice(0,2),i.length>0&&(n=this._queue[e]).push.apply(n,i)}}},{key:"endOfStream",value:function(e){var t=this;return this.mediaSource&&"open"===this.mediaSource.readyState?this._enqueueBlockingOp(function(){var n=t.mediaSource;n&&"open"===n.readyState&&(t._logger.debug("MSE endOfStream START"),e?n.endOfStream(e):n.endOfStream())},"endOfStream"):Promise.resolve()}},{key:"setLiveSeekableRange",value:function(e,t){var n=this.mediaSource;e<0||t<e||null==n||!n.setLiveSeekableRange||"open"!==n.readyState||n.setLiveSeekableRange(e,t)}},{key:"getSourceBuffer",value:function(e){return this._sourceBuffer[e]}},{key:"buffered",value:function(e){return uL.get(this._sourceBuffer[e])}},{key:"bufferStart",value:function(e){return uL.start(this.buffered(e))}},{key:"bufferEnd",value:function(e){return uL.end(this.buffered(e))}},{key:"_enqueueOp",value:function(e,t,n,r,i){var o=this;if(!this.mediaSource)return Promise.resolve();var a=this._queue[e]=this._queue[e]||[],s={exec:t,promise:uH(),opName:n,context:r};return i?(a.splice(0,0,s),this._mseFullFlag[e]=!1,this._startQueue(e)):a.push(s),this.isOpened||this.isEnded?1===a.length&&this._startQueue(e):this._openPromise.then(function(){1===a.length&&o._startQueue(e)}),s.promise}},{key:"_enqueueBlockingOp",value:(n=uy(uv().mark(function e(t,n,r){var i,o,a=this;return uv().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaSource){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:if((i=Object.keys(this._sourceBuffer)).length){e.next=5;break}return e.abrupt("return",t());case 5:return o=[],i.forEach(function(e){var t=a._queue[e],i=uH();o.push(i),t.push({exec:function(){i.resolve()},promise:i,opName:n,context:r}),1===t.length&&a._startQueue(e)}),e.abrupt("return",Promise.all(o).then(function(){try{return t()}finally{i.forEach(function(e){var t=a._queue[e],n=a._sourceBuffer[e];null==t||t.shift(),n&&n.updating||a._startQueue(e)})}}));case 8:case"end":return e.stop()}},e,this)})),function(e,t,r){return n.apply(this,arguments)})},{key:"_startQueue",value:function(e){var t=this._queue[e];if(t){var n,r,i=t[0];if(i&&!this._mseFullFlag[e])try{i.exec()}catch(o){o&&o.message&&o.message.indexOf("SourceBuffer is full")>=0?(this._mseFullFlag[e]=!0,i.context&&"object"===um(i.context)&&(i.context.isFull=!0),this._logger.error("[MSE error], context,",i.context," ,name,",i.opName,",err,SourceBuffer is full"),null==i||null==(n=i.promise)||n.reject(new uN(uU.MEDIA,uU.SUB_TYPES.MSE_FULL,o))):(this._logger.error(o),null==i||null==(r=i.promise)||r.reject(o.constructor===uN?o:new uN(uU.MEDIA,uU.SUB_TYPES.MSE_OTHER,o)),t.shift(),this._startQueue(e))}}}},{key:"setTimeoffset",value:function(e,t,n){var r=this;return this._enqueueOp(e,function(){t<0&&(t+=.001),r._sourceBuffer[e].timestampOffset=t,r._onSBUpdateEnd(e)},"setTimeoffset",n)}},{key:"abort",value:function(e,t){var n=this;return this.isOpened?this._enqueueOp(e,function(){n._sourceBuffer[e].abort(),n._onSBUpdateEnd(e)},"abort",t):Promise.resolve()}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"',t=uq();if(!t)return!1;try{return t.isTypeSupported(e)}catch(t){return this._logger.error(e,t),!1}}},{key:"isMMSOnly",value:function(){return"undefined"!=typeof ManagedMediaSource&&"undefined"==typeof MediaSource}},{key:"getDefaultConfig",value:function(){return{openLog:!1,preferMMS:!1}}}]),r}();ux(u$,"VIDEO","video"),ux(u$,"AUDIO","audio");var uY={FETCH:"fetch",XHR:"xhr"},uQ={ARRAY_BUFFER:"arraybuffer",TEXT:"text",JSON:"json"},uX=function(e){uk(n,e);var t=uI(n);function n(e,r,i,o){var a;return u_(this,n),ux(uC(a=t.call(this,o)),"retryCount",0),ux(uC(a),"isTimeout",!1),ux(uC(a),"loaderType",uY.FETCH),ux(uC(a),"startTime",0),ux(uC(a),"endTime",0),ux(uC(a),"options",{}),a.url=e,a.request=r,a.response=i,a}return uw(n)}(uO(Error)),uZ=Object.prototype.toString;function u0(e){if("[object Object]"!==uZ.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u1(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function u2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function u5(e,t){if(e){if(!t)return e;var n,r=Object.keys(t).map(function(e){if(null!=(n=t[e]))return Array.isArray(n)?e+="[]":n=[n],n.map(function(t){var n,r;return(n=t,"[object Date]"===uZ.call(n))?t=t.toISOString():null!==(r=t)&&"object"===um(r)&&(t=JSON.stringify(t)),"".concat(u2(e),"=").concat(u2(t))}).join("&")}).filter(Boolean).join("&");if(r){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}}function u4(e,t,n,r,i,o,a,s,l,u,c){return i=null!=i?parseFloat(i):null,Number.isNaN(r=parseInt(r||"0",10))&&(r=0),{data:e,done:t,options:{range:l,vid:u,index:s,contentLength:r,age:i,startTime:o,firstByteTime:a,endTime:Date.now(),priOptions:c},response:n}}function u3(e,t){return Math.round(8*e*1e3/t/1024)}var u8={ERROR:"error",TTFB:"core.ttfb",LOAD_START:"core.loadstart",LOAD_RESPONSE_HEADERS:"core.loadresponseheaders",LOAD_COMPLETE:"core.loadcomplete",LOAD_RETRY:"core.loadretry",SOURCEBUFFER_CREATED:"core.sourcebuffercreated",ANALYZE_DURATION_EXCEEDED:"core.analyzedurationexceeded",APPEND_BUFFER:"core.appendbuffer",REMOVE_BUFFER:"core.removebuffer",BUFFEREOS:"core.buffereos",KEYFRAME:"core.keyframe",CHASEFRAME:"core.chaseframe",METADATA_PARSED:"core.metadataparsed",SEI:"core.sei",SEI_IN_TIME:"core.seiintime",FLV_SCRIPT_DATA:"core.flvscriptdata",SWITCH_URL_SUCCESS:"core.switchurlsuccess",SWITCH_URL_FAILED:"core.switchurlfailed",DEMUXED_TRACK:"core.demuxedtrack",STREAM_EXCEPTION:"core.streamexception",LARGE_AV_FIRST_FRAME_GAP_DETECT:"LARGE_AV_FIRST_FRAME_GAP_DETECT",LARGE_VIDEO_DTS_GAP_DETECT:"LARGE_VIDEO_DTS_GAP_DETECT",LARGE_AUDIO_DTS_GAP_DETECT:"LARGE_AUDIO_DTS_GAP_DETECT",AUDIO_GAP_DETECT:"AUDIO_GAP_DETECT",AUDIO_OVERLAP_DETECT:"AUDIO_OVERLAP_DETECT",MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT:"MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT",REAL_TIME_SPEED:"real_time_speed"},u6=function(e){uk(r,e);var t,n=uI(r);function r(){var e;return u_(this,r),ux(uC(e=n.call(this)),"_abortController",null),ux(uC(e),"_timeoutTimer",null),ux(uC(e),"_reader",null),ux(uC(e),"_response",null),ux(uC(e),"_aborted",!1),ux(uC(e),"_index",-1),ux(uC(e),"_range",null),ux(uC(e),"_receivedLength",0),ux(uC(e),"_running",!1),ux(uC(e),"_logger",null),ux(uC(e),"_vid",""),ux(uC(e),"_onProcessMinLen",0),ux(uC(e),"_onCancel",null),ux(uC(e),"_priOptions",null),e}return uw(r,[{key:"load",value:function(e){var t,n=this,r=e.url,i=e.vid,o=e.timeout,a=e.responseType,s=e.onProgress,l=e.index,u=e.onTimeout,c=e.onCancel,f=e.range,d=e.transformResponse,h=e.request,p=e.params,m=e.logger,g=e.method,y=e.headers,_=e.body,b=e.mode,w=e.credentials,x=e.cache,k=e.redirect,S=e.referrer,E=e.referrerPolicy,T=e.onProcessMinLen,A=e.priOptions;this._logger=m,this._aborted=!1,this._onProcessMinLen=T,this._onCancel=c,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=l,this._range=f||[0,0],this._vid=i||r,this._priOptions=A||{};var O={method:g,headers:y,body:_,mode:b,credentials:w,cache:x,redirect:k,referrer:S,referrerPolicy:E,signal:null==(t=this._abortController)?void 0:t.signal},C=!1;clearTimeout(this._timeoutTimer),r=u5(r,p);var I=u1(f);I&&(y=h?h.headers:O.headers=O.headers||(Headers?new Headers:{}),Headers&&y instanceof Headers?y.append("Range",I):y.Range=I),o&&(this._timeoutTimer=setTimeout(function(){if(C=!0,n.cancel(),u){var e=new uX(r,O,null,"timeout");e.isTimeout=!0,u(e,{index:n._index,range:n._range,vid:n._vid,priOptions:n._priOptions})}},o));var D=Date.now();return this._logger.debug("[fetch load start], index,",l,",range,",f),new Promise(function(e,t){var i;fetch(h||r,h?void 0:O).then((i=uy(uv().mark(function i(o){var u,c,h,p;return uv().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(n._timeoutTimer),n._response=o,!(n._aborted||!n._running)){i.next=4;break}return i.abrupt("return");case 4:if(d&&(o=d(o,r)||o),o.ok){i.next=7;break}throw new uX(r,O,o,"bad network response");case 7:if(u=Date.now(),a!==uQ.TEXT){i.next=15;break}return i.next=11,o.text();case 11:case 18:c=i.sent,n._running=!1,i.next=37;break;case 15:if(a!==uQ.JSON){i.next=22;break}return i.next=18,o.json();case 22:if(!s){i.next=29;break}return n.resolve=e,n.reject=t,n._loadChunk(o,s,D,u),i.abrupt("return");case 29:return i.next=31,o.arrayBuffer();case 31:c=new Uint8Array(c=i.sent),n._running=!1,h=Date.now()-D,p=u3(c.byteLength,h),n.emit(u8.REAL_TIME_SPEED,{speed:p,len:c.byteLength,time:h,vid:n._vid,index:n._index,range:n._range,priOptions:n._priOptions});case 37:n._logger.debug("[fetch load end], index,",l,",range,",f),e(u4(c,!0,o,o.headers.get("Content-Length"),o.headers.get("age"),D,u,l,f,n._vid,n._priOptions));case 39:case"end":return i.stop()}},i)})),function(e){return i.apply(this,arguments)})).catch(function(e){var i;clearTimeout(n._timeoutTimer),n._running=!1,(!n._aborted||C)&&((e=e instanceof uX?e:new uX(r,O,null,null==(i=e)?void 0:i.message)).startTime=D,e.endTime=Date.now(),e.isTimeout=C,e.options={index:n._index,range:n._range,vid:n._vid,priOptions:n._priOptions},t(e))})})}},{key:"cancel",value:(t=uy(uv().mark(function e(){return uv().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(e){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}},e,this,[[5,11]])})),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,n,r){var i,o,a,s,l=this;if(!e.body||!e.body.getReader){this._running=!1;var u=new uX(e.url,"",e,"onProgress of bad response.body.getReader");u.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this.reject(u);return}this._onProcessMinLen>0&&(this._cache=new Uint8Array(2097152),this._writeIdx=0);var c=this._reader=e.body.getReader(),f=(i=uy(uv().mark(function i(){var u,d,h,p,m,g,y,_;return uv().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return a=Date.now(),i.prev=1,i.next=4,c.read();case 4:o=i.sent,s=Date.now(),i.next=13;break;case 8:return i.prev=8,i.t0=i.catch(1),s=Date.now(),l._aborted||(l._running=!1,i.t0.options={index:l._index,range:l._range,vid:l._vid,priOptions:l._priOptions},l.reject(i.t0)),i.abrupt("return");case 13:if(h=(d=(null==(u=l._range)?void 0:u.length)>0?l._range[0]:0)+l._receivedLength,!l._aborted){i.next=19;break}return l._running=!1,t(void 0,!1,{range:[h,h],vid:l._vid,index:l._index,startTime:a,endTime:s,st:n,firstByteTime:r,priOptions:l._priOptions},e),i.abrupt("return");case 19:p=o.value?o.value.byteLength:0,l._receivedLength+=p,l._logger.debug("【fetchLoader,onProgress call】,task,",l._range,", start,",h,", end,",d+l._receivedLength,", done,",o.done),l._onProcessMinLen>0?l._writeIdx+p>=l._onProcessMinLen||o.done?((m=new Uint8Array(l._writeIdx+p)).set(l._cache.slice(0,l._writeIdx),0),p>0&&m.set(o.value,l._writeIdx),l._writeIdx=0,l._logger.debug("【fetchLoader,onProgress enough】,done,",o.done,",len,",m.byteLength,", writeIdx,",l._writeIdx)):p>0&&l._writeIdx+p<2097152?(l._cache.set(o.value,l._writeIdx),l._writeIdx+=p,l._logger.debug("【fetchLoader,onProgress cache】,len,",p,", writeIdx,",l._writeIdx)):p>0&&(g=new Uint8Array(l._writeIdx+p+2048),l._logger.debug("【fetchLoader,onProgress extra start】,size,",l._writeIdx+p+2048,", datalen,",p,", writeIdx,",l._writeIdx),g.set(l._cache.slice(0,l._writeIdx),0),p>0&&g.set(o.value,l._writeIdx),l._writeIdx+=p,delete l._cache,l._cache=g,l._logger.debug("【fetchLoader,onProgress extra end】,len,",p,", writeIdx,",l._writeIdx)):m=o.value,(m&&m.byteLength>0||o.done)&&t(m,o.done,{range:[l._range[0]+l._receivedLength-(m?m.byteLength:0),l._range[0]+l._receivedLength],vid:l._vid,index:l._index,startTime:a,endTime:s,st:n,firstByteTime:r,priOptions:l._priOptions},e),o.done?(y=Date.now()-n,_=u3(l._receivedLength,y),l.emit(u8.REAL_TIME_SPEED,{speed:_,len:l._receivedLength,time:y,vid:l._vid,index:l._index,range:l._range,priOptions:l._priOptions}),l._running=!1,l._logger.debug("[fetchLoader onProgress end],task,",l._range,",done,",o.done),l.resolve(u4(o,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),n,r,l._index,l._range,l._vid,l._priOptions))):f();case 25:case"end":return i.stop()}},i,null,[[1,8]])})),function(){return i.apply(this,arguments)});f()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return"undefined"!=typeof fetch}}]),r}(l9(l7()).default),u9=function(e){uk(n,e);var t=uI(n);function n(){var e;return u_(this,n),ux(uC(e=t.call(this)),"_xhr",null),ux(uC(e),"_aborted",!1),ux(uC(e),"_timeoutTimer",null),ux(uC(e),"_range",null),ux(uC(e),"_receivedLength",0),ux(uC(e),"_url",null),ux(uC(e),"_onProgress",null),ux(uC(e),"_index",-1),ux(uC(e),"_headers",null),ux(uC(e),"_currentChunkSizeKB",384),ux(uC(e),"_timeout",null),ux(uC(e),"_xhr",null),ux(uC(e),"_withCredentials",null),ux(uC(e),"_startTime",-1),ux(uC(e),"_loadCompleteResolve",null),ux(uC(e),"_loadCompleteReject",null),ux(uC(e),"_runing",!1),ux(uC(e),"_logger",!1),ux(uC(e),"_vid",""),ux(uC(e),"_responseType",void 0),ux(uC(e),"_credentials",void 0),ux(uC(e),"_method",void 0),ux(uC(e),"_transformResponse",void 0),ux(uC(e),"_firstRtt",void 0),ux(uC(e),"_onCancel",null),ux(uC(e),"_priOptions",null),e}return uw(n,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=u5(e.url,e.params);var n=Date.now();return new Promise(function(e,n){t._loadCompleteResolve=e,t._loadCompleteReject=n,t._startLoad()}).catch(function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof uX?e:new uX(t._url,t._request)).startTime=n,e.endTime=Date.now(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e})}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===uQ.ARRAY_BUFFER&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,n=this._range[0]+this._receivedLength,r=this._range[1];t<this._range[1]-n&&(r=n+t),e=[n,r],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{this._startTime=Date.now();var n=this._xhr=new XMLHttpRequest;n.open(this._method||"GET",this._url,!0),n.responseType=this._responseType,this._timeout&&(n.timeout=this._timeout),n.withCredentials=this._withCredentials,n.onload=this._onLoad.bind(this),n.onreadystatechange=this._onReadyStatechange.bind(this),n.onerror=function(e){t._running=!1;var n,r,i,o=new uX(t._url,t._request,null==e||null==(n=e.currentTarget)?void 0:n.response,"xhr.onerror.status:"+(null==e||null==(r=e.currentTarget)?void 0:r.status)+",statusText,"+(null==e||null==(i=e.currentTarget)?void 0:i.statusText));o.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(o)},n.ontimeout=function(e){t.cancel();var n=new uX(t._url,t._request,{status:408},"timeout");t._onTimeout&&(n.isTimeout=!0,t._onTimeout(n,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),n.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(n)};var r=this._headers||{},i=u1(e);i&&(r.Range=i),r&&Object.keys(r).forEach(function(e){n.setRequestHeader(e,r[e])}),this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),n.send(this._body)}catch(t){t.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=Date.now())}},{key:"_onLoad",value:function(e){var t=e.target.status;if(t<200||t>299){var n=new uX(this._url,null,up(up({},e.target.response),{},{status:t}),"bad response,status:"+t);return n.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(n)}var r=null,i=!1,o=(null==(a=this._range)?void 0:a.length)>0?this._range[0]:0;if(this._responseType===uQ.ARRAY_BUFFER){var a,s,l,u=new Uint8Array(e.target.response);if(s=o+this._receivedLength,u&&u.byteLength>0){this._receivedLength+=u.byteLength;var c=Date.now()-this._startTime,f=u3(this._receivedLength,c);this.emit(u8.REAL_TIME_SPEED,{speed:f,len:this._receivedLength,time:c,vid:this._vid,index:this._index,range:[s,o+this._receivedLength],priOptions:this._priOptions})}r=u,i=!((null==(l=this._range)?void 0:l.length)>1)||!this._range[1]||!(this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",s,"end ",o+this._receivedLength,",dataLen,",u?u.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",i)}else i=!0,r=e.target.response;var d={ok:t>=200&&t<300,status:t,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(d=this._transformResponse(d,this._url)||d),this._onProgress&&this._onProgress(r,i,{index:this._index,vid:this._vid,range:[s,o+this._receivedLength],startTime:this._startTime,endTime:Date.now(),priOptions:this._priOptions},d),i?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(u4(this._onProgress?null:r,i,d,d.headers["content-length"],d.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted&&(this._aborted=!0,this._runing=!1,uD(uS(n.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr))return this._xhr.abort()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,n=e.getAllResponseHeaders().trim().split("\r\n"),r={},i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return uR(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uR(e,void 0)}}(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(n);try{for(i.s();!(t=i.n()).done;){var o=t.value.split(": ");r[o[0].toLowerCase()]=o.slice(1).join(": ")}}catch(e){i.e(e)}finally{i.f()}return r}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),n}(l9(l7()).default),u7=["retry","retryDelay","onRetryError","transformError"],ce=function(){var e;function t(e,n){u_(this,t),this.promise=uH(),this.alive=!!n.onProgress,n.logger||(n.logger=new uV("Loader")),this._loaderType=e,this._loader=e===uY.FETCH&&"undefined"!=typeof fetch?new u6:new u9,this._config=n,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=n.retryCheckFunc,this._logger=n.logger}return uw(t,[{key:"exec",value:function(){var e,t=this,n=this._config,r=n.retry,i=n.retryDelay,o=n.onRetryError,a=n.transformError,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,u7),l=(e=uy(uv().mark(function e(){var n,u,c;return uv().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t._loader.load(s);case 3:n=e.sent,t.promise.resolve(n),e.next=27;break;case 7:if(e.prev=7,e.t0=e.catch(0),t._loader.running=!1,t._logger.debug("[task request catch err]",e.t0),!t._canceled){e.next=13;break}return e.abrupt("return");case 13:if(e.t0.loaderType=t._loaderType,e.t0.retryCount=t._retryCount,u=e.t0,a&&(u=a(u)||u),o&&t._retryCount>0&&o(u,t._retryCount,{index:s.index,vid:s.vid,range:s.range,priOptions:s.priOptions}),t._retryCount++,c=!0,t._retryCheckFunc&&(c=t._retryCheckFunc(e.t0)),!(c&&t._retryCount<=r)){e.next=26;break}return clearTimeout(t._retryTimer),t._logger.debug("[task request setTimeout],retry",t._retryCount,",retry range,",s.range),t._retryTimer=setTimeout(l,i),e.abrupt("return");case 26:t.promise.reject(u);case 27:case"end":return e.stop()}},e,null,[[0,7]])})),function(){return e.apply(this,arguments)});return l(),this.promise}},{key:"cancel",value:(e=uy(uv().mark(function e(){return uv().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),t}(),ct=function(e){uk(r,e);var t,n=uI(r);function r(e){var t;return u_(this,r),ux(uC(t=n.call(this,e)),"type",uY.FETCH),ux(uC(t),"_queue",[]),ux(uC(t),"_alive",[]),ux(uC(t),"_currentTask",null),ux(uC(t),"_finnalUrl",""),ux(uC(t),"_config",void 0),t._config=up({loaderType:uY.FETCH,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:uQ.TEXT,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e),t._config.loaderType!==uY.XHR&&u6.isSupported()||(t.type=uY.XHR),t.log=e.logger,t}return uw(r,[{key:"isFetch",value:function(){return this.type===uY.FETCH}},{key:"load",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?n=e:n.url=e||n.url||this._config.url,(n=Object.assign({},this._config,n)).params&&(n.params=Object.assign({},n.params)),n.headers&&u0(n.headers)&&(n.headers=Object.assign({},n.headers)),n.body&&u0(n.body)&&(n.body=Object.assign({},n.body)),n.transformRequest&&(n=n.transformRequest(n)||n),n.logger=this.log;var r=new ce(this.type,n);return r.loader.on(u8.REAL_TIME_SPEED,function(e){t.emit(u8.REAL_TIME_SPEED,e)}),this._queue.push(r),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),r.promise}},{key:"cancel",value:(t=uy(uv().mark(function e(){var t;return uv().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this._queue.map(function(e){return e.cancel()}).concat(this._alive.map(function(e){return e.cancel()})),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,Promise.all(t);case 6:return e.next=8,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(function(t){return setTimeout(t,e)})}();case 8:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch(function(e){});t&&"function"==typeof t.finally&&t.finally(function(){var t,n;null!=(t=e._currentTask)&&t.alive&&(null==(n=e._alive)?void 0:n.length)>0&&(e._alive=e._alive.filter(function(t){return t&&t!==e._currentTask})),e._processTask()})}}}],[{key:"isFetchSupport",value:function(){return u6.isSupported()}}]),r}(l9(l7()).default),cn=function(){function e(){u_(this,e),ux(this,"_prevCurrentTime",0)}return uw(e,[{key:"do",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(e){var i=e.currentTime,o=0;if(this._prevCurrentTime===i){var a=uL.info(uL.get(e),i);if(!a.buffers.length)return;n&&a.nextStart||a.nextStart&&a.nextStart-i<t?o=a.nextStart+.1:a.end&&a.end-i>r&&!e.seeking&&(o=i+.1)}this._prevCurrentTime=i,o&&i!==o&&(e.currentTime=o)}}}]),e}(),cr=function(){function e(t){var n=this;u_(this,e),ux(this,"_seiSet",new Set),this.emitter=t,t.on(u8.SEI,function(e){e&&n._seiSet.add(e)})}return uw(e,[{key:"throw",value:function(e,t){var n=this;if(null!=e&&this._seiSet.size){var r=e-.2,i=e+.2,o=[];this._seiSet.forEach(function(e){e.time>=r&&e.time<=i&&o.push(e)}),o.forEach(function(e){n._seiSet.delete(e),n.emitter.emit(u8.SEI_IN_TIME,e)}),t&&this._seiSet.forEach(function(t){t.time<e-5&&n._seiSet.delete(t)})}}},{key:"reset",value:function(){this._seiSet.clear()}}]),e}(),ci=function(){function e(t){u_(this,e),ux(this,"_chunkSpeed",0),ux(this,"_chunkCache",[]),ux(this,"_speeds",[]),ux(this,"_totalSize",0),ux(this,"_totalCost",0),this._opts=t||{}}return uw(e,[{key:"addRecord",value:function(e,t){e&&t&&(this._speeds.push(8e3*e/t),this._speeds=this._speeds.slice(-3))}},{key:"addChunkRecord",value:function(e,t){if(e&&t&&!(e<((null==(n=this._opts)?void 0:n.skipChunkSize)||1e3))){this._totalSize+=e,this._totalCost+=t,this._chunkSpeed=8e3*e/t,this._chunkCache.push({size:e,duration:t,timestamp:performance.now()});var n,r,i=(null==(r=this._opts)?void 0:r.chunkCountForSpeed)||50;this._chunkCache.length>i&&(this._chunkCache=this._chunkCache.slice(-i))}}},{key:"getAvgSpeed",value:function(){if(!this._chunkCache.length&&!this._speeds.length)return 0;if(this._speeds.length)return this._speeds.reduce(function(e,t){return e+t})/this._speeds.length;var e,t=this._chunkCache[this._chunkCache.length-1],n=performance.now()-t.timestamp;return n>((null==(e=this._opts)?void 0:e.longtimeNoReceived)||3e3)&&this._chunkCache.push({size:0,duration:n,timestamp:performance.now()}),8e3*this._chunkCache.reduce(function(e,t){return e+t.size},0)/this._chunkCache.reduce(function(e,t){return e+t.duration},0)}},{key:"getLatestSpeed",value:function(){return this._chunkCache.length||this._speeds.length?this._speeds.length?this._speeds[this._speeds.length-1]:this._chunkSpeed:0}},{key:"getTotalSize",value:function(){return this._totalSize}},{key:"getTotalCost",value:function(){return this._totalCost}},{key:"reset",value:function(){this._chunkCache=[],this._speeds=[],this._totalSize=0,this._totalCost=0}}]),e}();l9(l7());var co=function(){function e(t){u_(this,e),ux(this,"encodeType",""),ux(this,"audioCodec",""),ux(this,"videoCodec",""),ux(this,"domain",""),ux(this,"fps",0),ux(this,"bitrate",0),ux(this,"width",0),ux(this,"height",0),ux(this,"samplerate",0),ux(this,"channelCount",0),ux(this,"gop",0),ux(this,"_bitsAccumulateSize",0),ux(this,"_bitsAccumulateDuration",0),ux(this,"_startGopId",-1),this._timescale=t}return uw(e,[{key:"getStats",value:function(){return{encodeType:this.encodeType,audioCodec:this.audioCodec,videoCodec:this.videoCodec,domain:this.domain,fps:this.fps,bitrate:this.bitrate,width:this.width,height:this.height,samplerate:this.samplerate,channelCount:this.channelCount,gop:this.gop}}},{key:"setEncodeType",value:function(e){this.encodeType=e}},{key:"setFpsFromScriptData",value:function(e){var t,n=e.data,r=null==n||null==(t=n.onMetaData)?void 0:t.framerate;r&&r>0&&r<100&&(this.fps=r)}},{key:"setVideoMeta",value:function(e){if(this.width=e.width,this.height=e.height,this.videoCodec=e.codec,this.encodeType=e.codecType,e.fpsNum&&e.fpsDen){var t=e.fpsNum/e.fpsDen;t>0&&t<100&&(this.fps=t)}}},{key:"setAudioMeta",value:function(e){this.audioCodec=e.codec,this.samplerate=e.sampleRate,this.channelCount=e.channelCount}},{key:"setDomain",value:function(e){this.domain=e.split("/").slice(2,3)[0]}},{key:"updateBitrate",value:function(e){var t=this;if((!this.fps||this.fps>=100)&&e.length){var n=e.reduce(function(e,t){return e+t.duration},0)/e.length;this.fps=Math.round(this._timescale/n)}e.forEach(function(e){-1===t._startGopId&&(t._startGopId=e.gopId),e.gopId===t._startGopId&&t.gop++,t._bitsAccumulateDuration+=e.duration/(t._timescale/1e3),t._bitsAccumulateSize+=e.units.reduce(function(e,t){return e+t.length},0),t._bitsAccumulateDuration>=1e3&&(t.bitrate=8*t._bitsAccumulateSize,t._bitsAccumulateDuration=0,t._bitsAccumulateSize=0)})}}]),e}(),ca=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;u_(this,e),ux(this,"_core",null),ux(this,"_samples",[]),this._core=t,this._timescale=n,this._stats=new co(n),this._bindEvents()}return uw(e,[{key:"getStats",value:function(){var e,t,n,r,i,o,a,s,l,u,c,f=(null==(e=this._core)?void 0:e.media)||{},d=f.currentTime,h=f.decodeFps;return up(up({},this._stats.getStats()),{},{downloadSpeed:(null==(t=this._core)||null==(n=t.speedInfo)?void 0:n.call(t).speed)||0,avgSpeed:(null==(r=this._core)||null==(i=r.speedInfo)?void 0:i.call(r).avgSpeed)||0,totalReceivedByte:(null==(o=this._core)||null==(a=o.speedInfo)?void 0:a.call(o).totalSize)||0,totalReceivedCost:(null==(s=this._core)||null==(l=s.speedInfo)?void 0:l.call(s).totalCost)||0,currentTime:void 0===d?0:d,bufferEnd:(null==(u=this._core)||null==(c=u.bufferInfo())?void 0:c.remaining)||0,decodeFps:void 0===h?0:h})}},{key:"_bindEvents",value:function(){var e=this;this._core.on(u8.DEMUXED_TRACK,function(t){var n=t.videoTrack;return e._stats.updateBitrate(n.samples)}),this._core.on(u8.FLV_SCRIPT_DATA,function(t){e._stats.setFpsFromScriptData(t)}),this._core.on(u8.METADATA_PARSED,function(t){"video"===t.type?e._stats.setVideoMeta(t.track):e._stats.setAudioMeta(t.track)}),this._core.on(u8.TTFB,function(t){e._stats.setDomain(t.responseUrl)})}},{key:"reset",value:function(){this._samples=[],this._stats=new co(this._timescale)}}]),e}(),cs=l9(l7());function cl(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function cu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c_(r.key),r)}}function cc(e,t,n){return t&&cu(e.prototype,t),n&&cu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cf(e,t,n){return(t=c_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cd(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cp(e,t)}function ch(e){return(ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cp(e,t){return(cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ch(e);n=t?Reflect.construct(r,arguments,ch(this).constructor):r.apply(this,arguments);if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw TypeError("Derived constructors may only return object or undefined");if(void 0===this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return this}}function cm(e){return function(e){if(Array.isArray(e))return cy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||cg(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cg(e,t){if(e){if("string"==typeof e)return cy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cy(e,t)}}function cy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c_(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var cb={VIDEO:"video",AUDIO:"audio",METADATA:"metadata"},cw={AVC:"avc",HEVC:"hevc"},cx={AAC:"aac",G711PCMA:"g7110a",G711PCMU:"g7110m",OPUS:"opus",MP3:"mp3"},ck={LARGE_AV_SHIFT:"LARGE_AV_SHIFT",LARGE_VIDEO_GAP:"LARGE_VIDEO_GAP",LARGE_VIDEO_GAP_BETWEEN_CHUNK:"LARGE_VIDEO_GAP_BETWEEN_CHUNK",LARGE_AUDIO_GAP:"LARGE_AUDIO_GAP",AUDIO_FILLED:"AUDIO_FILLED",AUDIO_DROPPED:"AUDIO_DROPPED"},cS=function(){function e(){cl(this,e),cf(this,"id",1),cf(this,"type",cb.VIDEO),cf(this,"codecType",cw.AVC),cf(this,"pid",-1),cf(this,"hvcC",void 0),cf(this,"codec",""),cf(this,"timescale",0),cf(this,"formatTimescale",0),cf(this,"sequenceNumber",0),cf(this,"baseMediaDecodeTime",0),cf(this,"baseDts",0),cf(this,"duration",0),cf(this,"warnings",[]),cf(this,"samples",[]),cf(this,"pps",[]),cf(this,"sps",[]),cf(this,"vps",[]),cf(this,"fpsNum",0),cf(this,"fpsDen",0),cf(this,"sarRatio",[]),cf(this,"width",0),cf(this,"height",0),cf(this,"nalUnitSize",4),cf(this,"present",!1),cf(this,"isVideoEncryption",!1),cf(this,"isAudioEncryption",!1),cf(this,"isVideo",!0),cf(this,"lastKeyFrameDts",0),cf(this,"kid",null),cf(this,"pssh",null),cf(this,"ext",void 0)}return cc(e,[{key:"reset",value:function(){this.sequenceNumber=this.width=this.height=this.fpsDen=this.fpsNum=this.duration=this.baseMediaDecodeTime=this.timescale=0,this.codec="",this.present=!1,this.pid=-1,this.pps=[],this.sps=[],this.vps=[],this.sarRatio=[],this.samples=[],this.warnings=[],this.hvcC=null}},{key:"firstDts",get:function(){return this.samples.length?this.samples[0].dts:null}},{key:"firstPts",get:function(){return this.samples.length?this.samples[0].pts:null}},{key:"samplesDuration",get:function(){if(this.samples.length>0){var e=this.samples[0],t=this.samples[this.samples.length-1];return t.dts-e.dts+t.duration}return 0}},{key:"exist",value:function(){return!!/av01/.test(this.codec)||!!(this.pps.length&&this.sps.length&&this.codec)}},{key:"hasSample",value:function(){return!!this.samples.length}},{key:"isEncryption",get:function(){return this.isVideoEncryption}}]),e}(),cE=function(){function e(){cl(this,e),cf(this,"id",2),cf(this,"type",cb.AUDIO),cf(this,"codecType",cx.AAC),cf(this,"pid",-1),cf(this,"codec",""),cf(this,"container",""),cf(this,"sequenceNumber",0),cf(this,"sampleDuration",0),cf(this,"timescale",0),cf(this,"formatTimescale",0),cf(this,"baseMediaDecodeTime",0),cf(this,"duration",0),cf(this,"warnings",[]),cf(this,"samples",[]),cf(this,"baseDts",0),cf(this,"sampleSize",16),cf(this,"sampleRate",0),cf(this,"channelCount",0),cf(this,"objectType",0),cf(this,"sampleRateIndex",0),cf(this,"config",[]),cf(this,"present",!1),cf(this,"isVideoEncryption",!1),cf(this,"isAudioEncryption",!1),cf(this,"kid",null),cf(this,"ext",void 0)}return cc(e,[{key:"reset",value:function(){this.sequenceNumber=0,this.timescale=0,this.sampleDuration=0,this.sampleRate=0,this.channelCount=0,this.baseMediaDecodeTime=0,this.present=!1,this.pid=-1,this.codec="",this.samples=[],this.config=[],this.warnings=[]}},{key:"exist",value:function(){return!!(this.sampleRate&&this.channelCount&&(this.codec||this.container)&&(this.codecType===cx.AAC||this.codecType===cx.G711PCMA||this.codecType===cx.G711PCMU||this.codecType===cx.OPUS||this.codecType===cx.MP3))}},{key:"hasSample",value:function(){return!!this.samples.length}},{key:"isEncryption",get:function(){return this.isAudioEncryption}},{key:"firstDts",get:function(){return this.samples.length?this.samples[0].dts:null}},{key:"firstPts",get:function(){return this.samples.length?this.samples[0].pts:null}},{key:"samplesDuration",get:function(){if(this.samples.length>0){var e=this.samples[0],t=this.samples[this.samples.length-1];return t.dts-e.dts+t.duration}return 0}}]),e}(),cT=function(){function e(t,n,r){cl(this,e),cf(this,"flag",{}),cf(this,"keyframe",!1),cf(this,"gopId",0),cf(this,"duration",0),cf(this,"size",0),cf(this,"units",[]),cf(this,"chromaFormat",420),this.originPts=this.pts=t,this.originDts=this.dts=n,r&&(this.units=r)}return cc(e,[{key:"cts",get:function(){return this.pts-this.dts}},{key:"setToKeyframe",value:function(){this.keyframe=!0,this.flag.dependsOn=2,this.flag.isNonSyncSample=0}}]),e}(),cA=cc(function e(t,n,r,i){cl(this,e),cf(this,"duration",1024),cf(this,"flag",{dependsOn:2,isNonSyncSample:0}),cf(this,"keyframe",!0),this.originPts=this.pts=this.dts=t,this.data=n,this.size=n.byteLength,this.sampleOffset=i,r&&(this.duration=r)}),cO=cc(function e(t,n){cl(this,e),cf(this,"time",0),this.data=t,this.originPts=this.pts=n}),cC=function(e){cd(n,e);var t=cv(n);function n(){return cl(this,n),t.apply(this,arguments)}return cc(n)}(cO),cI=function(e){cd(n,e);var t=cv(n);function n(){return cl(this,n),t.apply(this,arguments)}return cc(n)}(cO),cD=function(){function e(){cl(this,e),cf(this,"id",3),cf(this,"type",cb.METADATA),cf(this,"timescale",0),cf(this,"flvScriptSamples",[]),cf(this,"seiSamples",[])}return cc(e,[{key:"exist",value:function(){return!!((this.flvScriptSamples.length||this.seiSamples.length)&&this.timescale)}},{key:"reset",value:function(){this.timescale=0,this.flvScriptSamples=[],this.seiSamples=[]}},{key:"hasSample",value:function(){return!!(this.flvScriptSamples.length||this.seiSamples.length)}}]),e}(),cR=function(){function e(t){cl(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]")}return cc(e,[{key:"warn",value:function(){var t;if(!e.disabled){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=console).warn.apply(t,[this._prefix].concat(r))}}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();cf(cR,"disabled",!0);var cP="undefined"!=typeof window,cL=cP&&navigator.userAgent.toLocaleLowerCase(),cB=cP&&/^((?!chrome|android).)*safari/.test(cL),cU=cP&&cL.includes("firefox"),cM=cP&&cL.includes("android"),cN=function(){function e(){cl(this,e)}return cc(e,null,[{key:"getRateIndexByRate",value:function(t){return e.FREQ.indexOf(t)}},{key:"parseADTS",value:function(t,n){for(var r,i,o=t.length,a=0;a+2<o&&(255!==t[a]||(246&t[a+1])!=240);)a++;if(!(a>=o)){var s=a,l=[],u=(60&t[a+2])>>>2,c=e.FREQ[u];if(!c)throw Error("Invalid sampling index: ".concat(u));for(var f=((192&t[a+2])>>>6)+1,d=(1&t[a+2])<<2|(192&t[a+3])>>>6,h=e._getConfig(u,d,f),p=h.config,m=h.codec,g=0,y=e.getFrameDuration(c);a+7<o;){if(255!==t[a]||(246&t[a+1])!=240){a++;continue}if(!(i=(3&t[a+3])<<11|t[a+4]<<3|(224&t[a+5])>>5)||o-a<i)break;r=(1&~t[a+1])*2,l.push({pts:n+g*y,data:t.subarray(a+7+r,a+i)}),g++,a+=i}return{skip:s,remaining:a>=o?void 0:t.subarray(a),frames:l,samplingFrequencyIndex:u,sampleRate:c,objectType:f,channelCount:d,codec:m,config:p,originCodec:"mp4a.40.".concat(f)}}}},{key:"parseAudioSpecificConfig",value:function(t){if(t.length){var n=t[0]>>>3,r=(7&t[0])<<1|t[1]>>>7,i=(120&t[1])>>>3,o=e.FREQ[r];if(o){var a=e._getConfig(r,i,n);return{samplingFrequencyIndex:r,sampleRate:o,objectType:n,channelCount:i,config:a.config,codec:a.codec,originCodec:"mp4a.40.".concat(n)}}}}},{key:"getFrameDuration",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return 1024*t/e}},{key:"_getConfig",value:function(e,t,n){var r,i,o=[];return cU?e>=6?(r=5,i=e-3):(r=2,i=e):cM?(r=2,i=e):(r=5,i=e,e>=6?i=e-3:1===t&&(r=2,i=e)),o[0]=r<<3,o[0]|=(14&e)>>1,o[1]=(1&e)<<7,o[1]|=t<<3,5===r&&(o[1]|=(14&i)>>1,o[2]=(1&i)<<7,o[2]|=8,o[3]=0),{config:o,codec:"mp4a.40.".concat(r)}}},{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t||3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}]),e}();cf(cN,"FREQ",[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);var cF=function(){function e(){cl(this,e)}return cc(e,null,[{key:"getFrameDuration",value:function(e){return 20}},{key:"parseHeaderPackets",value:function(e){if(e.length){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n="",r=0;r<8;r++)n+=String.fromCodePoint(e[r]);if("OpusHead"!==n)throw Error("Invalid Opus MagicSignature");var i=e[9];console.log("Pre-skip",e[10],e[11]);var o=t.getUint32(12,!0),a=t.getInt16(16,!0);if(o)return{outputGain:a,sampleRate:o,channelCount:i,config:new Uint8Array(e.buffer,e.byteOffset+8,e.byteLength-8),codec:"opus",originCodec:"opus"}}}}]),e}(),cj=function(){function e(t,n,r){cl(this,e),this.videoTrack=t,this.audioTrack=n,this.metadataTrack=r,this._baseDts=-1,this._baseDtsInited=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=0,this._videoTimestampBreak=0,this._lastVideoDuration=0,this._keyFrameInNextChunk=!1,this._lastAudioExceptionGapDot=-1/0,this._lastAudioExceptionOverlapDot=-1/0,this._lastAudioExceptionLargeGapDot=-1/0,this._lastVideoExceptionLargeGapDot=-1/0,this._lastVideoExceptionChunkFirstDtsDot=-1/0}return cc(e,[{key:"fix",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];t=Math.round(1e3*t);var i=this.videoTrack,o=this.audioTrack;if((n||!r)&&(this._videoLastSample=null,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=0,this._videoTimestampBreak=0,this._lastAudioExceptionGapDot=-1/0,this._lastAudioExceptionOverlapDot=-1/0,this._lastAudioExceptionLargeGapDot=-1/0,this._lastVideoExceptionLargeGapDot=-1/0,this._lastVideoExceptionChunkFirstDtsDot=-1/0),n&&!r&&(this._baseDtsInited=!1),this._baseDtsInited||this._calculateBaseDts(o,i),!r&&t&&(this._audioNextPts=this._videoNextDts=t),this._baseDtsInited&&(this._videoTimestampBreak||!this.videoTrack.exist())&&(this._audioTimestampBreak||!this.audioTrack.exist())&&this._resetBaseDtsWhenStreamBreaked(),this._fixAudio(o),this._keyFrameInNextChunk=!1,this._fixVideo(i),this.metadataTrack.exist()){var a=this.metadataTrack.timescale;this.metadataTrack.seiSamples.forEach(function(t){t.pts=t.originPts-e._baseDts,t.time=Math.max(0,t.pts)/a}),this.metadataTrack.flvScriptSamples.forEach(function(t){t.pts=t.originPts-e._baseDts,t.time=Math.max(0,t.pts)/a})}i.samples.length&&(i.baseMediaDecodeTime=i.samples[0].dts),o.samples.length&&(o.baseMediaDecodeTime=o.samples[0].pts*o.timescale/1e3)}},{key:"_fixVideo",value:function(e){var t,n,r=this,i=e.samples;if(i.length){if(i.forEach(function(e){e.dts-=r._baseDts,e.pts-=r._baseDts,e.keyframe&&(r._keyFrameInNextChunk=!0)}),e.fpsNum&&e.fpsDen)t=e.timescale*(e.fpsDen/e.fpsNum);else if(e.length>1){var o=e.samples[0];t=Math.floor((e.samples[i.length-1].dts-o.dts)/(i.length-1))}else t=this._lastVideoDuration||40;var a=i.pop();if(this._videoLastSample&&i.unshift(this._videoLastSample),this._videoLastSample=a,i.length){if(void 0===this._videoNextDts){var s=i[0];this._videoNextDts=s.dts}var l=i.length,u=0,c=i[0],f=this._videoNextDts-c.dts;Math.abs(f)>200&&(Math.abs(c.dts-this._lastVideoExceptionChunkFirstDtsDot)>5e3&&(this._lastVideoExceptionChunkFirstDtsDot=c.dts,e.warnings.push({type:ck.LARGE_VIDEO_GAP_BETWEEN_CHUNK,nextDts:this._videoNextDts,firstSampleDts:c.dts,nextSampleDts:null==(n=i[1])?void 0:n.dts,sampleDuration:f})),this._videoTimestampBreak>=5?(this._videoNextDts=c.dts,this._videoTimestampBreak=0):(c.dts+=f,c.pts+=f,this.audioTrack.exist()||(this._videoTimestampBreak=1)));for(var d=0;d<l;d++){var h=i[d].dts,p=i[d+1];((u=d<l-1?p.dts-h:a?a.dts-h:t)>1e3||u<0)&&(this._videoTimestampBreak++,Math.abs(h-this._lastVideoExceptionLargeGapDot)>5e3&&(this._lastVideoExceptionLargeGapDot=h,e.warnings.push({type:ck.LARGE_VIDEO_GAP,time:h/e.timescale,dts:h,originDts:i[d].originDts,nextDts:this._videoNextDts,sampleDuration:u,refSampleDuration:t})),u=t),i[d].duration=u,this._videoNextDts+=u,this._lastVideoDuration=u}}}}},{key:"_fixAudio",value:function(e){var t=this,n=e.samples;n.length&&(n.forEach(function(e){e.dts=e.pts-=t._baseDts}),this._doFixAudioInternal(e,n,1e3))}},{key:"_calculateBaseDts",value:function(e,t){var n=e.samples,r=t.samples;if(!n.length&&!r.length)return!1;var i=1/0,o=1/0;n.length&&(e.baseDts=i=n[0].pts),r.length&&(t.baseDts=o=r[0].dts),this._baseDts=Math.min(i,o);var a=o-i;return Number.isFinite(a)&&Math.abs(a)>500&&t.warnings.push({type:ck.LARGE_AV_SHIFT,videoBaseDts:o,audioBasePts:i,baseDts:this._baseDts,delta:a}),this._baseDtsInited=!0,!0}},{key:"_resetBaseDtsWhenStreamBreaked",value:function(){this._calculateBaseDts(this.audioTrack,this.videoTrack)&&(this.audioTrack.exist()?this.videoTrack.exist()?this._baseDts-=Math.min(this._audioNextPts,this._videoNextDts):this._baseDts-=this._audioNextPts:this._baseDts-=this._videoNextDts,this._videoTimestampBreak=0,this._audioTimestampBreak=0)}},{key:"_doFixAudioInternal",value:function(e,t,n){if(!e.sampleDuration)switch(e.codecType){case cx.AAC:e.sampleDuration=cN.getFrameDuration(e.timescale,n);break;case cx.OPUS:e.sampleDuration=cF.getFrameDuration(e.samples,n);break;case cx.G711PCMA:case cx.G711PCMU:e.sampleDuration=this._getG711Duration(e);break;default:console.error("can't fix audio codecType:",e.codecType)}var r=e.sampleDuration,i=e.codecType===cx.OPUS?20:e.codecType===cx.AAC?1024:r*e.timescale/1e3;if(void 0===this._audioNextPts){var o=t[0];this._audioNextPts=o.pts}for(var a=0;a<t.length;a++){var s=this._audioNextPts,l=t[a],u=l.pts-s;if(0===a&&this._audioTimestampBreak>=5&&this._keyFrameInNextChunk&&(s=this._audioNextPts=l.dts,u=0,this._audioTimestampBreak=0),!this._audioTimestampBreak&&u>=3*r&&u<=1e3&&!cB){var c=this._getSilentFrame(e)||t[0].data.subarray(),f=Math.floor(u/r);Math.abs(l.pts-this._lastAudioExceptionGapDot)>5e3&&(this._lastAudioExceptionGapDot=l.pts,e.warnings.push({type:ck.AUDIO_FILLED,pts:l.pts,originPts:l.originPts,count:f,nextPts:s,refSampleDuration:r}));for(var d=0;d<f;d++){var h=new cA(Math.floor(this._audioNextPts+r)-Math.floor(this._audioNextPts),c,i);h.originPts=Math.floor(this._baseDts+s),t.splice(a,0,h),this._audioNextPts+=r,a++}a--}else if(u<=-3*r&&u>=-1e3)Math.abs(l.pts-this._lastAudioExceptionOverlapDot)>5e3&&(this._lastAudioExceptionOverlapDot=l.pts,e.warnings.push({type:ck.AUDIO_DROPPED,pts:l.pts,originPts:l.originPts,nextPts:s,refSampleDuration:r})),t.splice(a,1),a--;else{if(Math.abs(u)>1e3&&(this._audioTimestampBreak++,Math.abs(l.pts-this._lastAudioExceptionLargeGapDot)>5e3&&(this._lastAudioExceptionLargeGapDot=l.pts,e.warnings.push({type:ck.LARGE_AUDIO_GAP,time:l.pts/1e3,pts:l.pts,originPts:l.originPts,nextPts:s,sampleDuration:u,refSampleDuration:r}))),e.codecType===cx.OPUS){var p=t[t.length-1];p&&(p.duration=l.pts-p.pts)}else l.dts=l.pts=s,l.duration=i;this._audioNextPts+=r}}}},{key:"_getG711Duration",value:function(e){var t=e.sampleSize,n=e.channelCount,r=e.sampleRate,i=e.samples[0];if(i)return 2*i.data.byteLength/n/(t/8)/r*1e3}},{key:"_getSilentFrame",value:function(e){return e.codecType===cx.AAC?cN.getSilentFrame(e.codec,e.channelCount):new Uint8Array(8*e.sampleDuration*e.channelCount)}}]),e}();function cV(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Uint8Array((t=t.filter(Boolean)).reduce(function(e,t){return e+t.byteLength},0)),i=0;return t.forEach(function(e){r.set(e,i),i+=e.byteLength}),r}function cG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function cH(e){if(!Array.isArray(e)){for(var t=[],n="",r=0;r<e.length;r++)r%2&&(t.push(parseInt(n=e[r-1]+e[r],16)),n="");return t}return e.map(function(e){return parseInt(e,16)})}var cz=function(){function e(){cl(this,e)}return cc(e,null,[{key:"parseAnnexB",value:function(e){var t=e.byteLength-1,n=0;do{if(0===e[t])n++;else break;t--}while(t>0);n>=3&&(e=e.subarray(0,t+1));for(var r=e.length,i=2,o=0;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if((o=++i+2)>=r)return[];for(var a=[];o<r;)switch(e[o]){case 0:if(0!==e[o-1]){o+=2;break}if(0!==e[o-2]){o++;break}if(o<r-1&&1!==e[o+1]){o++;break}i!==o-2&&a.push(e.subarray(i,o-2));do o++;while(1!==e[o]&&o<r);o=(i=o+1)+2;break;case 1:if(0!==e[o-1]||0!==e[o-2]){o+=3;break}i!==o-2&&a.push(e.subarray(i,o-2)),o=(i=o+1)+2;break;default:o+=3}return i<r&&a.push(e.subarray(i)),a}},{key:"parseAvcC",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r=e.length,i=[],o=0;o+n<r;)if(t=cG(e,o),3===n&&(t>>>=8),o+=n,t){if(o+t>r)break;i.push(e.subarray(o,o+t)),o+=t}return i}}},{key:"parseSEI",value:function(e,t){for(var n=e.length,r=t?2:1,i=0,o=0,a="";255===e[r];)i+=255,r++;for(i+=e[r++];255===e[r];)o+=255,r++;if(o+=e[r++],5===i&&n>r+16)for(var s=0;s<16;s++)a+=e[r].toString(16),r++;return{payload:e.subarray(r,r+o),type:i,size:o,uuid:a}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(!n.length)return e;var i=t-n.length,o=new Uint8Array(i),a=0;for(r=0;r<i;a++,r++)a===n[0]&&(a++,n.shift()),o[r]=e[a];return o}}]),e}(),cW=function(){function e(t){if(cl(this,e),cf(this,"_bytesAvailable",void 0),cf(this,"_bitsAvailable",0),cf(this,"_word",0),!t)throw Error("ExpGolomb data params is required");this._data=t,this._bytesAvailable=t.byteLength,this._bytesAvailable&&this._loadWord()}return cc(e,[{key:"bitsAvailable",get:function(){return this._bitsAvailable}},{key:"_loadWord",value:function(){var e=this._data.byteLength-this._bytesAvailable,t=Math.min(4,this._bytesAvailable);if(0===t)throw Error("No bytes available");var n=new Uint8Array(4);n.set(this._data.subarray(e,e+t)),this._word=new DataView(n.buffer).getUint32(0),this._bitsAvailable=8*t,this._bytesAvailable-=t}},{key:"skipBits",value:function(e){if(this._bitsAvailable>e)this._word<<=e,this._bitsAvailable-=e;else{var t=Math.floor((e-=this._bitsAvailable)/8);e-=8*t,this._bytesAvailable-=t,this._loadWord(),this._word<<=e,this._bitsAvailable-=e}}},{key:"readBits",value:function(e){if(e>32)throw Error("Cannot read more than 32 bits");var t=Math.min(this._bitsAvailable,e),n=this._word>>>32-t;return(this._bitsAvailable-=t,this._bitsAvailable>0?this._word<<=t:this._bytesAvailable>0&&this._loadWord(),(t=e-t)>0&&this._bitsAvailable)?n<<t|this.readBits(t):n}},{key:"skipLZ",value:function(){var e;for(e=0;e<this._bitsAvailable;++e)if((this._word&0x80000000>>>e)!=0)return this._word<<=e,this._bitsAvailable-=e,e;return this._loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n}}]),e}(),cq=function(){function e(){cl(this,e)}return cc(e,null,[{key:"parseAVCDecoderConfigurationRecord",value:function(t){if(!(t.length<7)){for(var n,r,i,o=(3&t[4])+1,a=[],s=[],l=6,u=31&t[5],c=0;c<u;c++)if(r=t[l]<<8|t[l+1],l+=2,r){var f=t.subarray(l,l+r);l+=r,a.push(f),n||(n=e.parseSPS(cz.removeEPB(f)))}var d=t[l];l++;for(var h=0;h<d;h++)i=t[l]<<8|t[l+1],l+=2,i&&(s.push(t.subarray(l,l+i)),l+=i);return{sps:n,spsArr:a,ppsArr:s,nalUnitSize:o}}}},{key:"parseSPS",value:function(e){var t,n,r,i,o,a=new cW(e);a.readUByte();var s=a.readUByte(),l=a.readUByte(),u=a.readUByte();a.skipUEG();var c=420;if(100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s){var f=a.readUEG();if(f<=3&&(c=[0,420,422,444][f]),3===f&&a.skipBits(1),a.skipUEG(),a.skipUEG(),a.skipBits(1),a.readBool())for(var d=3!==f?8:12,h=0;h<d;h++)a.readBool()&&(h<6?a.skipScalingList(16):a.skipScalingList(64))}a.skipUEG();var p=a.readUEG();if(0===p)a.readUEG();else if(1===p){a.skipBits(1),a.skipUEG(),a.skipUEG();for(var m=a.readUEG(),g=0;g<m;g++)a.skipUEG()}a.skipUEG(),a.skipBits(1);var y=a.readUEG(),_=a.readUEG(),b=a.readBits(1);0===b&&a.skipBits(1),a.skipBits(1);var w=0,x=0,k=0,S=0;if(a.readBool()&&(w=a.readUEG(),x=a.readUEG(),k=a.readUEG(),S=a.readUEG()),a.readBool()){if(a.readBool())switch(a.readUByte()){case 1:t=[1,1];break;case 2:t=[12,11];break;case 3:t=[10,11];break;case 4:t=[16,11];break;case 5:t=[40,33];break;case 6:t=[24,11];break;case 7:t=[20,11];break;case 8:t=[32,11];break;case 9:t=[80,33];break;case 10:t=[18,11];break;case 11:t=[15,11];break;case 12:t=[64,33];break;case 13:t=[160,99];break;case 14:t=[4,3];break;case 15:t=[3,2];break;case 16:t=[2,1];break;case 255:t=[a.readUByte()<<8|a.readUByte(),a.readUByte()<<8|a.readUByte()]}if(a.readBool()&&a.readBool(),a.readBool()&&(a.readBits(4),a.readBool()&&a.readBits(24)),a.readBool()&&(a.readUEG(),a.readUEG()),a.readBool()){var E=a.readBits(32),T=a.readBits(32);n=a.readBool(),o=(r=T)/(i=2*E)}}return{codec:function(e){for(var t,n="avc1.",r=0;r<3;r++)(t=e[r].toString(16)).length<2&&(t="0".concat(t)),n+=t;return n}(e.subarray(1,4)),profileIdc:s,profileCompatibility:l,levelIdc:u,chromaFormat:c,width:Math.ceil((y+1)*16-2*(w+x)),height:(2-b)*(_+1)*16-(b?2:4)*(k+S),sarRatio:t,fpsNum:r,fpsDen:i,fps:o,fixedFrame:n}}}]),e}(),cJ=function(){function e(){cl(this,e)}return cc(e,null,[{key:"parseHEVCDecoderConfigurationRecord",value:function(t){var n,r,i,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t.length<23)){s=s||{};for(var l=(3&t[21])+1,u=[],c=[],f=[],d=23,h=t[22],p=0;p<h;p++){i=63&t[d],o=t[d+1]<<8|t[d+2],d+=3;for(var m=0;m<o;m++)if(a=t[d]<<8|t[d+1],d+=2,a){switch(i){case 32:var g=t.subarray(d,d+a);n||(n=e.parseVPS(cz.removeEPB(g),s)),f.push(g);break;case 33:var y=t.subarray(d,d+a);r||(r=e.parseSPS(cz.removeEPB(y),s)),u.push(y);break;case 34:c.push(t.subarray(d,d+a))}d+=a}}return{hvcC:s,sps:r,spsArr:u,ppsArr:c,vpsArr:f,nalUnitSize:l}}}},{key:"parseVPS",value:function(t,n){n=n||{};var r=new cW(t);r.readUByte(),r.readUByte(),r.readBits(12);var i=r.readBits(3);return n.numTemporalLayers=Math.max(n.numTemporalLayers||0,i+1),r.readBits(17),e._parseProfileTierLevel(r,i,n),n}},{key:"parseSPS",value:function(t){var n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a=a||{};var s=new cW(t);s.readUByte(),s.readUByte(),s.readBits(4);var l=s.readBits(3);a.numTemporalLayers=Math.max(l+1,a.numTemporalLayers||0),a.temporalIdNested=s.readBits(1),e._parseProfileTierLevel(s,l,a),s.readUEG();var u=a.chromaFormatIdc=s.readUEG(),c=420;u<=3&&(c=[0,420,422,444][u]);var f=0;3===u&&(f=s.readBits(1));var d=s.readUEG(),h=s.readUEG(),p=s.readBits(1);if(1===p&&(n=s.readUEG(),r=s.readUEG(),i=s.readUEG(),o=s.readUEG()),a.bitDepthLumaMinus8=s.readUEG(),a.bitDepthChromaMinus8=s.readUEG(),1===p){var m=(1===u||2===u)&&0===f?2:1,g=1===u&&0===f?2:1;d-=m*(r+n),h-=g*(o+i)}return{codec:"hev1.1.6.L93.B0",width:d,height:h,chromaFormat:c,hvcC:a}}},{key:"_parseProfileTierLevel",value:function(e,t,n){var r=n.generalTierFlag||0;n.generalProfileSpace=e.readBits(2),n.generalTierFlag=Math.max(e.readBits(1),r),n.generalProfileIdc=Math.max(e.readBits(5),n.generalProfileIdc||0),n.generalProfileCompatibilityFlags=e.readBits(32),n.generalConstraintIndicatorFlags=[e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8),e.readBits(8)];var i=e.readBits(8);r<n.generalTierFlag?n.generalLevelIdc=i:n.generalLevelIdc=Math.max(i,n.generalLevelIdc||0);var o=[],a=[];if(t>e.bitsAvailable)throw Error("maxSubLayersMinus inavlid size ".concat(t));for(var s=0;s<t;s++)o[s]=e.readBits(1),a[s]=e.readBits(1);t>0&&e.readBits((8-t)*2);for(var l=0;l<t;l++)0!==o[l]&&(e.readBits(2),e.readBits(1),e.readBits(5),e.readBits(16),e.readBits(16),e.readBits(4),e.readBits(16),e.readBits(16),e.readBits(12)),0!==a[l]&&e.readBits(8)}}]),e}(),cK=function(){function e(){cl(this,e)}return cc(e,null,[{key:"decode",value:function(t){for(var n=[],r=0,i=t.length;r<i;){if(t[r]<128){n.push(String.fromCharCode(t[r])),++r;continue}if(t[r]<192);else if(t[r]<224){if(e._checkContinuation(t,r,1)){var o=(31&t[r])<<6|63&t[r+1];if(o>=128){n.push(String.fromCharCode(65535&o)),r+=2;continue}}}else if(t[r]<240){if(e._checkContinuation(t,r,2)){var a=(15&t[r])<<12|(63&t[r+1])<<6|63&t[r+2];if(a>=2048&&(63488&a)!=55296){n.push(String.fromCharCode(65535&a)),r+=3;continue}}}else if(t[r]<248&&e._checkContinuation(t,r,3)){var s=(7&t[r])<<18|(63&t[r+1])<<12|(63&t[r+2])<<6|63&t[r+3];if(s>65536&&s<1114112){s-=65536,n.push(String.fromCharCode(s>>>10|55296)),n.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}n.push(String.fromCharCode(65533)),++r}return n.join("")}},{key:"_checkContinuation",value:function(e,t,n){if(!(t+n<e.length))return!1;for(;n--;)if((192&e[++t])!=128)return!1;return!0}}]),e}(),c$=function(){function e(){cl(this,e)}return cc(e,null,[{key:"parse",value:function(t){if(!(t.length<3)){var n={},r=e._parseValue(new DataView(t.buffer,t.byteOffset,t.byteLength)),i=e._parseValue(new DataView(t.buffer,t.byteOffset+r.size,t.byteLength-r.size));return n[r.data]=i.data,n}}},{key:"_parseValue",value:function(t){var n,r=t.byteLength,i=t.getUint8(0),o=1,a=!1;switch(i){case 0:n=t.getFloat64(1),o+=8;break;case 1:n=!!t.getUint8(1),o+=1;break;case 2:var s=e._parseString(new DataView(t.buffer,t.byteOffset+o,t.byteLength-o)),l=s.data,u=s.size;n=l,o+=u;break;case 3:n={};var c=0;for((0xffffff&t.getUint32(r-4))==9&&(c=3);o<r-4;){var f=e._parseObject(new DataView(t.buffer,t.byteOffset+o,t.byteLength-o-c)),d=f.size,h=f.data;if(f.isEnd)break;n[h.name]=h.value,o+=d}o<=r-3&&9==(0xffffff&t.getUint32(o-1))&&(o+=3);break;case 8:n={},o+=4;var p=0;for((0xffffff&t.getUint32(r-4))==9&&(p=3);o<r-8;){var m=e._parseObject(new DataView(t.buffer,t.byteOffset+o,t.byteLength-o-p)),g=m.size,y=m.data;if(m.isEnd)break;n[y.name]=y.value,o+=g}o<=r-3&&9==(0xffffff&t.getUint32(o-1))&&(o+=3);break;case 9:n=void 0,o=1,a=!0;break;case 10:n=[];var _=t.getUint32(1);o+=4;for(var b=0;b<_;b++){var w=e._parseValue(new DataView(t.buffer,t.byteOffset+o,t.byteLength-o)),x=w.data,k=w.size;n.push(x),o+=k}break;case 11:n=new Date(t.getFloat64(o)+6e4*t.getInt16(o+8)),o+=10;break;case 12:var S=t.getUint32(1);o+=4,n="",S>0&&(n=cK.decode(new Uint8Array(t.buffer,t.byteOffset+o,S))),o+=S;break;default:o=r}return{data:n,size:o,isEnd:a}}},{key:"_parseString",value:function(e){var t=e.getUint16(0),n="";return t>0&&(n=cK.decode(new Uint8Array(e.buffer,e.byteOffset+2,t))),{data:n,size:2+t}}},{key:"_parseObject",value:function(t){if(!(t.byteLength<3)){var n=e._parseString(t),r=e._parseValue(new DataView(t.buffer,t.byteOffset+n.size,t.byteLength-n.size));return{data:{name:n.data,value:r.data},size:n.size+r.size,isEnd:r.isEnd}}}}]),e}(),cY={G711A:7,G711M:8,AAC:10,OPUS:13},cQ=new cR("FlvDemuxer"),cX=function(){function e(t,n,r){cl(this,e),cf(this,"_headerParsed",!1),cf(this,"_remainingData",null),cf(this,"_gopId",0),cf(this,"_needAddMetaBeforeKeyFrameNal",!0),this.videoTrack=t||new cS,this.audioTrack=n||new cE,this.metadataTrack=r||new cD,this._fixer=new cj(this.videoTrack,this.audioTrack,this.metadataTrack)}return cc(e,[{key:"demux",value:function(t){var n,r,i,o,a,s,l=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=!(arguments.length>2)||void 0===arguments[2]||arguments[2],c=arguments.length>3?arguments[3]:void 0,f=this.audioTrack,d=this.videoTrack,h=this.metadataTrack;if((l||!u)&&(this._remainingData=null),l&&(this._headerParsed=!1),l?(d.reset(),f.reset(),h.reset()):(d.samples=[],f.samples=[],h.seiSamples=[],h.flvScriptSamples=[],d.warnings=[],f.warnings=[],this._remainingData&&(t=cV(this._remainingData,t),this._remainingData=null)),!t.length)return{videoTrack:d,audioTrack:f,metadataTrack:h};var p=0;if(!this._headerParsed){if(!e.probe(t))throw Error("Invalid flv file");f.present=(4&t[4])>>>2!=0,d.present=(1&t[4])!=0,this._headerParsed=!0,p=cG(t,5)+4}for(var m=t.length;p+15<m&&(r=t[p],i=t[p+1]<<16|t[p+2]<<8|t[p+3],!(p+15+i>m));)o=(t[p+7]<<24>>>0)+(t[p+4]<<16)+(t[p+5]<<8)+t[p+6],p+=11,a=t.subarray(p,p+i),8===r?this._parseAudio(a,o):9===r?(c&&(this.seamlessLoadingSwitching=!0),this._parseVideo(a,o)):18===r?this._parseScript(a,o):cQ.warn("Invalid tag type: ".concat(r)),p+=i,(s=cG(t,p))!==11+i&&cQ.warn("Invalid PrevTagSize ".concat(s," (").concat(11+i,")")),p+=4;p<m&&(this._remainingData=t.subarray(p)),f.formatTimescale=d.formatTimescale=d.timescale=h.timescale=1e3,f.timescale=f.codecType===cx.OPUS?1e3:f.sampleRate||0,!f.exist()&&f.hasSample()&&f.reset(),!d.exist()&&d.hasSample()&&d.reset();var g=h.flvScriptSamples[h.flvScriptSamples.length-1],y=null==g||null==(n=g.data)?void 0:n.onMetaData;return y&&(null!=d&&d.exist()&&(y.hasOwnProperty("duration")&&(d.duration=1e3*y.duration),y.hasOwnProperty("width")&&y.hasOwnProperty("height")&&(d.width=y.width,d.height=y.height)),null!=f&&f.exist()&&y.hasOwnProperty("duration")&&(f.duration=1e3*y.duration)),{videoTrack:d,audioTrack:f,metadataTrack:h}}},{key:"fix",value:function(e,t,n){return this._fixer.fix(e,t,n),{videoTrack:this.videoTrack,audioTrack:this.audioTrack,metadataTrack:this.metadataTrack}}},{key:"demuxAndFix",value:function(e,t,n,r,i){return this.demux(e,t,n,i),this.fix(r,t,n)}},{key:"_parseAudio",value:function(t,n){if(t.length){var r=(240&t[0])>>>4,i=this.audioTrack;if(r!==cY.AAC&&r!==cY.G711A&&r!==cY.G711M&&r!==cY.OPUS){cQ.warn("Unsupported sound format: ".concat(r)),i.reset();return}if(r!==cY.AAC&&r!==cY.OPUS){var o=(12&t[0])>>2,a=(2&t[0])>>1,s=1&t[0];i.sampleRate=e.AUDIO_RATE[o],i.sampleSize=a?16:8,i.channelCount=s+1}switch(r){case cY.G711A:case cY.G711M:this._parseG711(t,n,r);break;case cY.AAC:this._parseAac(t,n);break;case cY.OPUS:this._parseOpus(t,n)}}}},{key:"_parseOpus",value:function(e,t){var n=this.audioTrack,r=e[1];switch(n.codecType=cx.OPUS,r){case 0:var i=cF.parseHeaderPackets(e.subarray(2));i?(n.codec=i.codec,n.channelCount=i.channelCount,n.sampleRate=i.sampleRate,n.config=i.config,n.sampleDuration=cF.getFrameDuration([],n.timescale)):(n.reset(),cQ.warn("Cannot parse AudioSpecificConfig",e));break;case 1:if(null==t)return;var o=new cA(t,e.subarray(2),n.sampleDuration);n.samples.push(o);break;default:cQ.warn("Unknown OpusPacketType: ".concat(r))}}},{key:"_parseG711",value:function(e,t,n){var r=this.audioTrack,i=e.subarray(1);if(!(i.byteLength<1)){var o=new cA(t,i);r.codecType=7===n?cx.G711PCMA:cx.G711PCMU,r.sampleRate=8e3,r.codec=r.codecType,r.samples.push(o)}}},{key:"_parseAac",value:function(e,t){var n=this.audioTrack;if(n.codecType=cx.AAC,0===e[1]){var r=cN.parseAudioSpecificConfig(e.subarray(2));r?(n.codec=r.codec,n.channelCount=r.channelCount,n.sampleRate=r.sampleRate,n.config=r.config,n.objectType=r.objectType,n.sampleRateIndex=r.samplingFrequencyIndex):(n.reset(),cQ.warn("Cannot parse AudioSpecificConfig",e))}else if(1===e[1]){if(null==t)return;n.samples.push(new cA(t,e.subarray(2)))}else cQ.warn("Unknown AACPacketType: ".concat(e[1]))}},{key:"_parseVideo",value:function(e,t){var n=this;if(!(e.length<6)){var r=(240&e[0])>>>4,i=15&e[0],o=this.videoTrack;if(7!==i&&12!==i){o.reset(),cQ.warn("Unsupported codecId: ".concat(i));return}var a=12===i;o.codecType=a?cw.HEVC:cw.AVC;var s=e[1],l=(e[2]<<16|e[3]<<8|e[4])<<8>>8;if(0===s){var u=e.subarray(5),c=a?cJ.parseHEVCDecoderConfigurationRecord(u):cq.parseAVCDecoderConfigurationRecord(u);if(c){var f=c.hvcC,d=c.sps,h=c.ppsArr,p=c.spsArr,m=c.vpsArr,g=c.nalUnitSize;f&&(o.hvcC=o.hvcC||f),d&&(o.codec=d.codec,o.width=d.width,o.height=d.height,o.sarRatio=d.sarRatio,o.fpsNum=d.fpsNum,o.fpsDen=d.fpsDen),p.length&&(o.sps=p),h.length&&(o.pps=h),m&&m.length&&(o.vps=m),g&&(o.nalUnitSize=g)}else cQ.warn("Cannot parse ".concat(a?"HEVC":"AVC","DecoderConfigurationRecord"),e)}else if(1===s){var y=cz.parseAvcC(e.subarray(5),o.nalUnitSize);if((y=this._checkAddMetaNalToUnits(a,y,o))&&y.length){var _=new cT(t+l,t,y);if(this.seamlessLoadingSwitching&&t<o.lastKeyFrameDts)return;this.seamlessLoadingSwitching=!1,1===r&&(_.setToKeyframe(),o.lastKeyFrameDts=t),o.samples.push(_),y.forEach(function(e){var r=a?e[0]>>>1&63:31&e[0];switch(r){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!a&&5!==r||a&&5===r)break;_.setToKeyframe();break;case 6:case 39:case 40:if(!a&&6!==r||a&&6===r)break;n.metadataTrack.seiSamples.push(new cI(cz.parseSEI(cz.removeEPB(e),a),t+l))}}),_.keyframe&&this._gopId++,_.gopId=this._gopId}else cQ.warn("Cannot parse NALUs",e)}else 2===s||cQ.warn("Unknown AVCPacketType: ".concat(s))}}},{key:"_checkAddMetaNalToUnits",value:function(e,t,n){return!e||!this._needAddMetaBeforeKeyFrameNal||t.map(function(e){return e[0]>>>1&63}).includes(32)?(this._needAddMetaBeforeKeyFrameNal=!1,t):(t.unshift(n.pps[0]),t.unshift(n.sps[0]),t.unshift(n.vps[0]),t.filter(Boolean))}},{key:"_parseScript",value:function(e,t){this.metadataTrack.flvScriptSamples.push(new cC(c$.parse(e),t))}}],[{key:"probe",value:function(e){return 70===e[0]&&76===e[1]&&86===e[2]&&1===e[3]&&cG(e,5)>=9}}]),e}();cf(cX,"AUDIO_RATE",[5500,11e3,22e3,44e3]);var cZ=function(){function e(){cl(this,e),this.buffer=new Uint8Array(0)}return cc(e,[{key:"write",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){t?e.buffer=function(e){for(var t=0,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];r.forEach(function(e){t+=e.length});var o=new e(t),a=0;return r.forEach(function(e){o.set(e,a),a+=e.length}),o}(Uint8Array,e.buffer,t):window.console.warn(t)})}}],[{key:"writeUint16",value:function(e){return new Uint8Array([e>>8&255,255&e])}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>24,e>>16&255,e>>8&255,255&e])}}]),e}(),c0=function(){function e(){cl(this,e)}return cc(e,null,[{key:"box",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=8+(n=n.filter(Boolean)).reduce(function(e,t){return e+t.byteLength},0),o=new Uint8Array(i);o[0]=i>>24&255,o[1]=i>>16&255,o[2]=i>>8&255,o[3]=255&i,o.set(e,4);var a=8;return n.forEach(function(e){o.set(e,a),a+=e.byteLength}),o}},{key:"ftyp",value:function(t){return t.find(function(e){return e.type===cb.VIDEO&&e.codecType===cw.HEVC})?e.FTYPHEV1:e.FTYPAVC1}},{key:"initSegment",value:function(t){return cV(e.ftyp(t),e.moov(t))}},{key:"pssh",value:function(t){var n=new Uint8Array([1,0,0,0].concat([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75],[0,0,0,1],cH(t.kid),[0,0,0,0]));return e.box(e.types.pssh,n)}},{key:"moov",value:function(t){if(!t[0].useEME||!t[0].encv&&!t[0].enca)return e.box.apply(e,[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale)].concat(cm(t.map(function(t){return e.trak(t)})),[e.mvex(t)]));t[0].pssh||(t[0].pssh={kid:t[0].kid});var n=this.pssh(t[0].pssh);return e.box.apply(e,[e.types.moov,e.mvhd(t[0].mvhdDurtion||t[0].duration,t[0].mvhdTimecale||t[0].timescale),e.mvex(t)].concat(cm(t.map(function(t){return e.trak(t)})),[n]))}},{key:"mvhd",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,t>>24&255,t>>16&255,t>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.tkhdDuration||0,t.width,t.height),e.mdia(t))}},{key:"tkhd",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,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,r>>8&255,255&r,0,0,i>>8&255,255&i,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minf(t))}},{key:"mdhd",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,t>>24&255,t>>16&255,t>>8&255,255&t,85,196,0,0]))}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"minf",value:function(t){return e.box(e.types.minf,t.type===cb.VIDEO?e.VMHD:e.SMHD,e.DINF,e.stbl(t))}},{key:"stbl",value:function(t){var n=[];return t&&t.ext&&t.ext.stss&&n.push(e.stss(t.ext.stss.entries)),e.box(e.types.stbl,e.stsd(t),e.STTS,n[0],e.STSC,e.STSZ,e.STCO)}},{key:"stsd",value:function(t){var n="audio"===t.type?t.useEME&&t.enca?e.enca(t):t.codecType===cx.OPUS?e.opus(t):e.mp4a(t):t.useEME&&t.encv?e.encv(t):t.av1C?e.av01(t):e.avc1hev1(t);return e.box(e.types.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),n)}},{key:"enca",value:function(t){var n=t.enca.channelCount,r=t.enca.sampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>8&255,255&r,0,0]),o=e.esds(t.config),a=e.sinf(t.enca);return e.box(e.types.enca,i,o,a)}},{key:"encv",value:function(t){var n,r,i=t.sps.length>0?t.sps[0]:[],o=t.pps.length>0?t.pps[0]:[],a=t.width,s=t.height,l=t.sarRatio[0],u=t.sarRatio[1],c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>8&255,255&a,s>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),f=new Uint8Array((n=(r=[1,i[1],i[2],i[3],255,225,i.length>>>8&255,255&i.length]).concat.apply(r,cm(i)).concat([1,o.length>>>8&255,255&o.length])).concat.apply(n,cm(o))),d=new Uint8Array([0,0,88,57,0,15,200,192,0,4,86,72]),h=e.sinf(t.encv),p=new Uint8Array([l>>24,l>>16&255,l>>8&255,255&l,u>>24,u>>16&255,u>>8&255,255&u]);return e.box(e.types.encv,c,e.box(e.types.avcC,f),e.box(e.types.btrt,d),h,e.box(e.types.pasp,p))}},{key:"schi",value:function(t){var n=new Uint8Array([]),r=e.tenc(t);return e.box(e.types.schi,n,r)}},{key:"tenc",value:function(t){var n=new Uint8Array([0,0,0,0,0,0,255&t.default_IsEncrypted,255&t.default_IV_size].concat(cH(t.default_KID)));return e.box(e.types.tenc,n)}},{key:"sinf",value:function(t){var n=new Uint8Array([]),r=new Uint8Array([t.data_format.charCodeAt(0),t.data_format.charCodeAt(1),t.data_format.charCodeAt(2),t.data_format.charCodeAt(3)]),i=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]),o=e.schi(t);return e.box(e.types.sinf,n,e.box(e.types.frma,r),e.box(e.types.schm,i),o)}},{key:"av01",value:function(t){return e.box(e.types.av01,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,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t.av1C,t.colr)}},{key:"avc1hev1",value:function(t){var n=t.codecType===cw.HEVC,r=n?e.types.hvc1:e.types.avc1,i=n?e.hvcC(t):e.avcC(t),o=[new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,t.width>>8&255,255&t.width,t.height>>8&255,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i];return n?o.push(e.box(e.types.fiel,new Uint8Array([1,0]))):t.sarRatio&&t.sarRatio.length>1&&o.push(e.pasp(t.sarRatio)),e.box.apply(e,[r].concat(o))}},{key:"avcC",value:function(t){var n,r,i,o=[],a=[];return t.sps.forEach(function(e){i=e.byteLength,o.push(i>>>8&255),o.push(255&i),o.push.apply(o,cm(e))}),t.pps.forEach(function(e){i=e.byteLength,a.push(i>>>8&255),a.push(255&i),a.push.apply(a,cm(e))}),e.box(e.types.avcC,new Uint8Array((n=(r=[1,o[3],o[4],o[5],255,224|t.sps.length]).concat.apply(r,o).concat([t.pps.length])).concat.apply(n,a)))}},{key:"hvcC",value:function(t){var n,r=t.hvcC;if(r instanceof ArrayBuffer||r instanceof Uint8Array)return r;var i=t.vps,o=t.sps,a=t.pps;if(r){var s=r.generalProfileCompatibilityFlags,l=r.generalConstraintIndicatorFlags,u=(i.length&&1)+(o.length&&1)+(a.length&&1);n=[1,r.generalProfileSpace<<6|r.generalTierFlag<<5|r.generalProfileIdc,s>>>24,s>>>16,s>>>8,s,l[0],l[1],l[2],l[3],l[4],l[5],r.generalLevelIdc,240,0,252,252|r.chromaFormatIdc,248|r.bitDepthLumaMinus8,248|r.bitDepthChromaMinus8,0,0,r.numTemporalLayers<<3|r.temporalIdNested<<2|3,u];var c=function(e){var t;n.push(e.length>>8,e.length),(t=n).push.apply(t,cm(e))};i.length&&(n.push(160,0,i.length),i.forEach(c)),o.length&&(n.push(161,0,o.length),o.forEach(c)),a.length&&(n.push(162,0,a.length),a.forEach(c))}else n=[1,1,96,0,0,0,144,0,0,0,0,0,93,240,0,252,253,248,248,0,0,15,3,160,0,1,0,24,64,1,12,1,255,255,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,153,152,9,161,0,1,0,45,66,1,1,1,96,0,0,3,0,144,0,0,3,0,0,3,0,93,160,2,128,128,45,22,89,153,164,147,43,154,128,128,128,130,0,0,3,0,2,0,0,3,0,50,16,162,0,1,0,7,68,1,193,114,180,98,64];return e.box(e.types.hvcC,new Uint8Array(n))}},{key:"pasp",value:function(t){var n=function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{o=(n=n.call(e)).next,!1;for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,2)||cg(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],i=n[1];return e.box(e.types.pasp,new Uint8Array([r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"mp4a",value:function(t){return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.sampleRate>>8&255,255&t.sampleRate,0,0]),t.config.length?e.esds(t.config):void 0)}},{key:"esds",value:function(t){var n=t.length;return e.box(e.types.esds,new Uint8Array([0,0,0,0,3,23+n,0,0,0,4,15+n,64,21,0,6,0,0,0,218,192,0,0,218,192,5].concat([n]).concat(t).concat([6,1,2])))}},{key:"opus",value:function(t){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,t.sampleRate>>8&255,255&t.sampleRate,0,0]),r=t.config.length?e.dOps(t):[];return e.box(e.types.Opus,n,r)}},{key:"dOps",value:function(t){if(t.config)return t.config[4]=t.sampleRate>>>24&255,t.config[5]=t.sampleRate>>>16&255,t.config[6]=t.sampleRate>>>8&255,t.config[7]=255&t.sampleRate,e.box(e.types.dOps,t.config)}},{key:"mvex",value:function(t){return e.box.apply(e,[e.types.mvex].concat(cm(t.map(function(t){return e.trex(t.id)}))))}},{key:"trex",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trex1",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,2,0,0,0,0,0,0,1,0,0]))}},{key:"trex2",value:function(t){return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,4,0,0,0,0,0,2,0,0,0]))}},{key:"moof",value:function(t){return e.box.apply(e,[e.types.moof,e.mfhd(t[0].samples?t[0].samples[0].gopId:0)].concat(cm(t.map(function(t){return e.traf(t)}))))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"traf",value:function(t){var n=e.tfhd(t.id),r=e.tfdt(t,t.baseMediaDecodeTime),i=0;if(t.isVideo&&t.videoSenc&&t.videoSenc.forEach(function(e){i+=8,e.subsamples&&e.subsamples.length&&(i+=2+6*e.subsamples.length)}),t.videoSencLength=i,t.useEME&&(t.isVideoEncryption||t.isAudioEncryption))if(t.isVideoEncryption)if(t.isVideo){var o=e.saiz(t),a=e.saio(t),s=e.trun1(t),l=e.senc(t);return e.box(e.types.traf,n,r,o,a,s,l)}else if(t.isAudioEncryption){var u=e.sbgp(),c=e.saiz(t),f=e.saio(t),d=e.senc(t),h=e.trun1(t);return e.box(e.types.traf,n,r,u,c,f,d,h)}else{var p=e.sbgp(),m=e.trun1(t);return e.box(e.types.traf,n,r,p,m)}else if(t.isVideo){var g=e.trun1(t);return e.box(e.types.traf,n,r,g)}else{var y=e.sbgp(),_=e.saiz(t),b=e.saio(t),w=e.senc(t),x=e.trun1(t);return e.box(e.types.traf,n,r,y,_,b,w,x)}var k=e.sdtp(t);return e.box(e.types.traf,n,r,k,e.trun(t.samples,k.byteLength+76))}},{key:"sdtp",value:function(t){var n=new cZ;return t.samples.forEach(function(e){n.write(new Uint8Array(t.isVideo?[e.keyframe?32:16]:[16]))}),e.box(e.types.sdtp,this.extension(0,0),n.buffer)}},{key:"trun1",value:function(t){var n=new cZ,r=cZ.writeUint32(t.samples.length),i=null;if(t.isVideo){var o=t.videoSencLength;i=cZ.writeUint32(16*t.samples.length+o+149),!t.isVideoEncryption&&t.isAudioEncryption&&(i=cZ.writeUint32(16*t.samples.length+92))}else{var a=12*t.samples.length+124;t.isAudioEncryption&&(a=12*t.samples.length+8*t.audioSenc.length+177),i=cZ.writeUint32(a)}return t.samples.forEach(function(e){n.write(cZ.writeUint32(e.duration)),n.write(cZ.writeUint32(e.size)),n.write(cZ.writeUint32(e.keyframe?0x2000000:65536)),t.isVideo&&n.write(cZ.writeUint32(e.cts?e.cts:0))}),e.box(e.types.trun,this.extension(0,t.flags),r,i,n.buffer)}},{key:"senc",value:function(t){var n=new cZ,r=t.samples.length,i=t.isVideo?16:8,o=2*!!t.isVideo,a=[],s=0;return t.isVideo?(a=t.videoSenc,s=t.videoSencLength):a=t.audioSenc,s=s||i*r,n.write(cZ.writeUint32(16+s),e.types.senc,this.extension(0,o)),n.write(cZ.writeUint32(r)),a.forEach(function(e){for(var t=0;t<e.InitializationVector.length;t++)n.write(new Uint8Array([e.InitializationVector[t]]));e.subsamples&&e.subsamples.length&&(n.write(cZ.writeUint16(e.subsamples.length)),e.subsamples.forEach(function(e){n.write(cZ.writeUint16(e.BytesOfClearData)),n.write(cZ.writeUint32(e.BytesOfProtectedData))}))}),n.buffer}},{key:"saio",value:function(t){var n=12*t.samples.length+141;!t.isVideo&&t.isAudioEncryption&&(n=149);var r=new Uint8Array([1,0,0,0,0,0,0,1,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n]);return e.box(e.types.saio,r)}},{key:"saiz",value:function(t){var n=t.samples.length,r=new Uint8Array([0,0,0,0,16,n>>24&255,n>>16&255,n>>8&255,255&n]);return e.box(e.types.saiz,r)}},{key:"sbgp",value:function(){var t=new Uint8Array([114,111,108,108,0,0,0,1,0,0,1,25,0,0,0,1]);return e.box(e.types.sbgp,this.extension(0,0),t)}},{key:"extension",value:function(e,t){return new Uint8Array([e,t>>16&255,t>>8&255,255&t])}},{key:"tfhd",value:function(t){return e.box(e.types.tfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"tfdt",value:function(t,n){var r=Math.floor(n/0x100000000),i=Math.floor(n%0x100000000);return t.useEME&&(t.isVideoEncryption||t.isAudioEncryption)?e.box(e.types.tfdt,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])):e.box(e.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i]))}},{key:"trun",value:function(t,n){var r=t.length,i=12+16*r;n+=8+i;var o=new Uint8Array(i);o.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var a=0;a<r;a++){var s=t[a],l=s.duration,u=s.size,c=s.flag,f=void 0===c?{}:c,d=s.cts,h=void 0===d?0:d;o.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,u>>>24&255,u>>>16&255,u>>>8&255,255&u,f.isLeading<<2|(null===f.dependsOn||void 0===f.dependsOn?1:f.dependsOn),f.isDependedOn<<6|f.hasRedundancy<<4|f.paddingValue<<1|(null===f.isNonSyncSample||void 0===f.isNonSyncSample?1:f.isNonSyncSample),61440&f.degradationPriority,15&f.degradationPriority,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*a)}return e.box(e.types.trun,o)}},{key:"moovMP4",value:function(t){return e.box.apply(e,[e.types.moov,e.mvhd(t[0].duration,t[0].timescale)].concat(cm(t.map(function(t){return e.trackMP4(t)}))))}},{key:"trackMP4",value:function(t){return e.box(e.types.trak,e.tkhd(t.id,t.duration,t.width,t.height),e.mdiaMP4(t))}},{key:"mdiaMP4",value:function(t){return e.box(e.types.mdia,e.mdhd(t.duration,t.timescale),e.hdlr(t.type),e.minfMP4(t))}},{key:"minfMP4",value:function(t){return e.box(e.types.minf,t.type===cb.VIDEO?e.VMHD:e.SMHD,e.DINF,e.stblMP4(t))}},{key:"stblMP4",value:function(t){var n=t.ext,r=[e.stsd(t),e.stts(n.stts),e.stsc(n.stsc),e.stsz(n.stsz),e.stco(n.stco)];return n.stss.length&&r.push(e.stss(n.stss)),n.ctts.length&&r.push(e.ctts(n.ctts)),e.box.apply(e,[e.types.stbl].concat(r))}},{key:"stts",value:function(t){var n=t.length,r=new Uint8Array(8*n),i=0;return t.forEach(function(e){var t=e.value,n=e.count;r.set([n>>24,n>>16&255,n>>8&255,255&n,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8}),e.box(e.types.stts,cV(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stsc",value:function(t){var n=t.length,r=new Uint8Array(12*n),i=0;return t.forEach(function(e){var t=e.firstChunk,n=e.samplesPerChunk,o=e.sampleDescIndex;r.set([t>>24,t>>16&255,t>>8&255,255&t,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o],i),i+=12}),e.box(e.types.stsc,cV(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stsz",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return t.forEach(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4}),e.box(e.types.stsz,cV(new Uint8Array([0,0,0,0,0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stco",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return t.forEach(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4}),e.box(e.types.stco,cV(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"stss",value:function(t){var n=t.length,r=new Uint8Array(4*n),i=0;return t.forEach(function(e){r.set([e>>24,e>>16&255,e>>8&255,255&e],i),i+=4}),e.box(e.types.stss,cV(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"ctts",value:function(t){var n=t.length,r=new Uint8Array(8*n),i=0;return t.forEach(function(e){var t=e.value,n=e.count;r.set([n>>24,n>>16&255,n>>8&255,255&n,t>>24,t>>16&255,t>>8&255,255&t],i),i+=8}),e.box(e.types.ctts,cV(new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n]),r))}},{key:"styp",value:function(){return e.box(e.types.styp,new Uint8Array([109,115,100,104,0,0,0,0,109,115,100,104,109,115,105,120]))}},{key:"sidx",value:function(t){var n=t.timescale,r=t.samples[0].duration,i=r*t.samples.length,o=t.samples[0].sampleOffset*r,a=8;t.samples.forEach(function(e){a+=e.size});var s=0;if(t.isVideo){var l,u=0;t.videoSenc&&(l=t.videoSenc),t.isVideo&&l.forEach(function(e){u+=8,e.subsamples&&e.subsamples.length&&(u+=2+6*e.subsamples.length)}),t.videoSencLength=u,s=a+141+16*t.samples.length+u,t.useEME&&t.isAudioEncryption&&!t.isVideoEncryption&&(s=a+16*t.samples.length+84)}else s=a+116+12*t.samples.length,t.useEME&&t.isAudioEncryption&&(s=a+169+12*t.samples.length+8*t.audioSenc.length);var c=new Uint8Array([0,0,0,0,0,0,0,255&t.id,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,1,0,s>>16&255,s>>8&255,255&s,i>>24&255,i>>16&255,i>>8&255,255&i,144,0,0,0]);return e.box(e.types.sidx,c)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();cf(c0,"types",["Opus","dOps","av01","av1C","avc1","avcC","hvc1","hvcC","dinf","dref","esds","ftyp","hdlr","mdat","mdhd","mdia","mfhd","minf","moof","moov","mp4a","mvex","mvhd","pasp","stbl","stco","stsc","stsd","stsz","stts","tfdt","tfhd","traf","trak","trex","tkhd","vmhd","smhd","ctts","stss","styp","pssh","sidx","sbgp","saiz","saio","senc","trun","encv","enca","sinf","btrt","frma","tenc","schm","schi","mehd","fiel","sdtp"].reduce(function(e,t){return e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)],e},Object.create(null))),cf(c0,"HDLR_TYPES",{video:new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),audio:new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])}),cf(c0,"FTYPAVC1",c0.box(c0.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]))),cf(c0,"FTYPHEV1",c0.box(c0.types.ftyp,new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,104,101,118,49]))),cf(c0,"DINF",c0.box(c0.types.dinf,c0.box(c0.types.dref,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1])))),cf(c0,"VMHD",c0.box(c0.types.vmhd,new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]))),cf(c0,"SMHD",c0.box(c0.types.smhd,new Uint8Array([0,0,0,0,0,0,0,0]))),cf(c0,"StblTable",new Uint8Array([0,0,0,0,0,0,0,0])),cf(c0,"STTS",c0.box(c0.types.stts,c0.StblTable)),cf(c0,"STSC",c0.box(c0.types.stsc,c0.StblTable)),cf(c0,"STSZ",c0.box(c0.types.stsz,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]))),cf(c0,"STCO",c0.box(c0.types.stco,c0.StblTable));var c1=function(){function e(t,n){cl(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),e.disabled=n}return cc(e,[{key:"debug",value:function(){var t;if(!e.disabled){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=console).debug.apply(t,[this._prefix].concat(r))}}},{key:"log",value:function(){var t;if(!e.disabled){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=console).log.apply(t,[this._prefix].concat(r))}}},{key:"warn",value:function(){var t;if(!e.disabled){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=console).warn.apply(t,[this._prefix].concat(r))}}},{key:"error",value:function(){var t;if(!e.disabled){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=console).error.apply(t,[this._prefix].concat(r))}}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();cf(c1,"disabled",!0);var c2=function(){function e(t,n,r){cl(this,e),this.videoTrack=t,this.audioTrack=n;var i=/Chrome\/([^.]+)/.exec(navigator.userAgent);this.forceFirstIDR=i&&50>Number(i[1]),this.log=new c1("FMP4Remuxer",!r||!r.openLog||!r.openLog)}return cc(e,[{key:"remux",value:function(){var e,t,n,r,i,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.videoTrack,l=this.audioTrack,u=s.exist(),c=l.exist(),f=[];return o&&(a&&a.initMerge?(u&&f.push(this.videoTrack),c&&f.push(this.audioTrack),n=c0.initSegment(f)):(u&&(e=c0.initSegment([this.videoTrack])),c&&(t=c0.initSegment([this.audioTrack])))),u&&s.hasSample()&&(r=this._remuxVideo()),c&&l.hasSample()&&(i=this._remuxAudio()),s.samples=[],l.samples=[],{initSegment:n,videoInitSegment:e,audioInitSegment:t,videoSegment:r,audioSegment:i}}},{key:"_remuxVideo",value:function(){var e=this.videoTrack;this.forceFirstIDR&&(e.samples[0].flag={dependsOn:2,isNonSyncSample:0});var t=e.samples,n=/av01/.test(e.codec),r=0;n?t.forEach(function(e){r+=e.data.byteLength}):t.forEach(function(e){r+=e.units.reduce(function(e,t){return e+t.byteLength},0),r+=4*e.units.length});var i=new Uint8Array(r);if(n)for(var o,a=0,s=t.length,l=0;a<s;a++)o=t[a],i.set(o.data,l),o.size=o.data.byteLength,l+=o.size;else for(var u,c=new DataView(i.buffer),f=function(e,n){n=t[d];var r=0;n.units.forEach(function(t){c.setUint32(e,t.byteLength),e+=4,i.set(t,e),e+=t.byteLength,r+=4+t.byteLength}),n.size=r,p=e,u=n},d=0,h=t.length,p=0;d<h;d++)f(p,u);var m=c0.mdat(i);return cV(c0.moof([e]),m)}},{key:"_remuxAudio",value:function(){var e=this.audioTrack,t=new Uint8Array(e.samples.reduce(function(e,t){return e+t.size},0));e.samples.reduce(function(e,n){return t.set(n.data,e),e+n.size},0);var n=c0.mdat(t);return cV(c0.moof([e]),n)}},{key:"reset",value:function(){this.videoTrack.reset(),this.audioTrack.reset()}}]),e}(),c5=function(){function e(){uo(this,e),ul(this,"_ttfb",0),ul(this,"_demuxStart",0),ul(this,"_demuxEnd",0),ul(this,"_demuxCost",0),ul(this,"_remuxStart",0),ul(this,"_remuxEnd",0),ul(this,"_remuxCost",0),ul(this,"_appendStart",0),ul(this,"_appendEnd",0),ul(this,"_appendCost",0)}return us(e,[{key:"set",value:function(e,t){this["_".concat(e)]=t}},{key:"start",value:function(e){this["_".concat(e,"Start")]=Date.now()}},{key:"end",value:function(e){this["_".concat(e,"End")]=Date.now(),this["_".concat(e,"Cost")]=this["_".concat(e,"Cost")]+(this["_".concat(e,"End")]-this["_".concat(e,"Start")])}},{key:"transferCost",get:function(){return{ttfbCost:this._ttfb,demuxCost:this._demuxCost,remuxCost:this._remuxCost,appendCost:this._appendCost}}}]),e}(),c4={TTFB:"ttfb",DEMUX:"demux",REMUX:"remux",APPEND:"append"},c3=new uV("BufferService"),c8=function(){var e,t,n,r,i,o;function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};uo(this,a),ul(this,"flv",null),ul(this,"_demuxer",new cX),ul(this,"_remuxer",null),ul(this,"_mse",null),ul(this,"_softVideo",null),ul(this,"_sourceCreated",!1),ul(this,"_needInitSegment",!0),ul(this,"_discontinuity",!0),ul(this,"_contiguous",!1),ul(this,"_initSegmentId",""),ul(this,"_cachedBuffer",null),ul(this,"_demuxStartTime",0),ul(this,"_opts",null),this.flv=e,this._opts=n,t?this._softVideo=t:(this._remuxer=new c2(this._demuxer.videoTrack,this._demuxer.audioTrack),this._mse=new u$(null,{preferMMS:"boolean"==typeof n.preferMMS?n.preferMMS:!!n.perferMMS}),this._mse.bindMedia(e.media))}return us(a,[{key:"baseDts",get:function(){var e,t;return null==(e=this._demuxer)||null==(t=e._fixer)?void 0:t._baseDts}},{key:"blobUrl",get:function(){var e;return null==(e=this._mse)?void 0:e.url}},{key:"isFull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u$.VIDEO;return this._mse.isFull(e)}},{key:"seamlessSwitch",value:function(){this._needInitSegment=!0,this._discontinuity=!0,this._contiguous=!0,this._initSegmentId=""}},{key:"unContiguous",value:function(e){this._contiguous=!1,this._demuxStartTime=e}},{key:"reset",value:(e=ui(un().mark(function e(){var t,n=arguments;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.length>0&&void 0!==n[0]&&n[0],!(this._mse&&!t)){e.next=6;break}return e.next=4,this._mse.unbindMedia();case 4:return e.next=6,this._mse.bindMedia(this.flv.media);case 6:this._needInitSegment=!0,this._discontinuity=!0,this._contiguous=!1,this._sourceCreated=!1,this._initSegmentId="",this.resetSeamlessSwitchStats();case 12:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"resetSeamlessSwitchStats",value:function(){this.seamlessLoadingSwitch=null,this.seamlessLoadingSwitching=!1,this._demuxer&&(this._demuxer.seamlessLoadingSwitching=!1)}},{key:"endOfStream",value:(t=ui(un().mark(function e(){return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=7;break}if(!this._sourceCreated){e.next=5;break}return e.next=4,this._mse.endOfStream();case 4:this.flv.emit(u8.BUFFEREOS);case 5:e.next=8;break;case 7:this._softVideo&&this._softVideo.endOfStream();case 8:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"updateDuration",value:(n=ui(un().mark(function e(t){return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=7;break}if(this._mse.isOpened){e.next=4;break}return e.next=4,this._mse.open();case 4:return c3.debug("update duration",t),e.next=7,this._mse.updateDuration(t);case 7:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"destroy",value:(r=ui(un().mark(function e(){return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mse){e.next=3;break}return e.next=3,this._mse.unbindMedia();case 3:this._mse=null,this._softVideo=null,this._demuxer=null,this._remuxer=null;case 7:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"appendBuffer",value:(i=ui(un().mark(function e(t){var n,r,i,o,a,s,l,u,c,f,d,h,p,m,g,y,_,b,w=this;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!1,this._cachedBuffer&&(t=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if((t=t.filter(Boolean)).length<2)return t[0];var r=new Uint8Array(t.reduce(function(e,t){return e+t.byteLength},0)),i=0;return t.forEach(function(e){r.set(e,i),i+=e.byteLength}),r}(this._cachedBuffer,t),this._cachedBuffer=null),r=this._demuxer,!(!t||!t.length||!r)){e.next=5;break}return e.abrupt("return");case 5:e.prev=5,this.flv._transferCost.start(c4.DEMUX),r.demuxAndFix(t,this.seamlessLoadingSwitching||this._discontinuity,this._contiguous,this._demuxStartTime,this.seamlessLoadingSwitching),this.seamlessLoadingSwitching=!1,this.flv._transferCost.end(c4.DEMUX),e.next=15;break;case 12:throw e.prev=12,e.t0=e.catch(5),new uN(uU.DEMUX,uU.SUB_TYPES.FLV,e.t0);case 15:if(i=r.videoTrack,o=r.audioTrack,a=r.metadataTrack,!this.seamlessLoadingSwitch||!((s=i.samples.findIndex(function(e){return e.originDts===i.lastKeyFrameDts}))>=0)){e.next=25;break}return i.samples.splice(s),e.next=22,this.seamlessLoadingSwitch();case 22:this.seamlessLoadingSwitch=null,t=null,n=!0;case 25:if(l=i.exist(),u=o.exist(),this._opts.onlyAudio&&(l=!1,i.present=!1),this._opts.onlyVideo&&(u=!1,o.present=!1),!(!l&&i.present||!u&&o.present)){e.next=42;break}if(c=0,(f=l?i:u?o:void 0)&&f.samples.length&&(c=(f.samples[f.samples.length-1].originPts-f.samples[0].originPts)/f.timescale*1e3),!(c>this._opts.analyzeDuration)){e.next=40;break}c3.warn("analyze duration exceeded, ".concat(c,"ms"),f),i.present=l,o.present=u,this.flv.emit(u8.ANALYZE_DURATION_EXCEEDED,{duration:c}),e.next=42;break;case 40:return this._cachedBuffer=t,e.abrupt("return");case 42:if(d=i.type,h=o.type,this._fireEvents(i,o,a),n||(this._discontinuity=!1,this._contiguous=!0,this._demuxStartTime=0),p=this._mse,m=function(){var e,t;null!=(e=w.flv)&&e.emit&&(null==(t=w.flv)||t.emit(u8.APPEND_BUFFER,{}))},this.flv.emit(u8.DEMUXED_TRACK,{videoTrack:i}),(g="".concat(i.codec,"/").concat(i.width,"/").concat(i.height,"/").concat(o.codec,"/").concat(o.config))!==this._initSegmentId&&(this._needInitSegment=!0,this._initSegmentId=g,this._emitMetaParsedEvent(i,o)),!p){e.next=83;break}if(this._sourceCreated){e.next=59;break}return e.next=55,p.open();case 55:l&&(c3.log("codec: video/mp4;codecs=".concat(i.codec)),p.createSource(d,"video/mp4;codecs=".concat(i.codec))),u&&(c3.log("codec: audio/mp4;codecs=".concat(o.codec)),p.createSource(h,"audio/mp4;codecs=".concat(o.codec))),this._sourceCreated=!0,this.flv.emit(u8.SOURCEBUFFER_CREATED);case 59:e.prev=59,this._needInitSegment&&!this._opts.mseLowLatency&&(i.duration=this._opts.durationForMSELowLatencyOff*i.timescale,o.duration=this._opts.durationForMSELowLatencyOff*u.timescale),this.flv._transferCost.start(c4.REMUX),y=this._remuxer.remux(this._needInitSegment),this.flv._transferCost.end(c4.REMUX),e.next=69;break;case 66:throw e.prev=66,e.t1=e.catch(59),new uN(uU.REMUX,uU.SUB_TYPES.FMP4,e.t1);case 69:if(!(this._needInitSegment&&!y.videoInitSegment&&!y.audioInitSegment)){e.next=71;break}return e.abrupt("return");case 71:return this._needInitSegment=!1,_=[],y.videoInitSegment&&_.push(p.append(d,y.videoInitSegment)),y.audioInitSegment&&_.push(p.append(h,y.audioInitSegment)),y.videoSegment&&_.push(p.append(d,y.videoSegment)),y.audioSegment&&_.push(p.append(h,y.audioSegment)),this.flv._transferCost.start(c4.APPEND),(b=Promise.all(_)).then(m).then(function(){w.flv._transferCost.end(c4.APPEND),m()}),e.abrupt("return",b);case 83:this._softVideo&&(this._softVideo.appendBuffer(i,o),m());case 84:case"end":return e.stop()}},e,this,[[5,12],[59,66]])})),function(e){return i.apply(this,arguments)})},{key:"evictBuffer",value:(o=ui(un().mark(function e(t){var n,r,i=this;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.flv.media,!(!this._mse||!this._demuxer||!n||!t||t<0)){e.next=3;break}return e.abrupt("return");case 3:if(!((r=n.currentTime-t)<=0)){e.next=7;break}return e.abrupt("return");case 7:if(!(uL.start(uL.get(n))+1>=r)){e.next=10;break}return e.abrupt("return");case 10:return e.abrupt("return",this._mse.clearBuffer(0,r).then(function(){return i.flv.emit(u8.REMOVE_BUFFER,{removeEnd:r})}));case 11:case"end":return e.stop()}},e,this)})),function(e){return o.apply(this,arguments)})},{key:"_emitMetaParsedEvent",value:function(e,t){e.exist()&&this.flv.emit(u8.METADATA_PARSED,{type:"video",track:e,meta:{codec:e.codec,timescale:e.timescale,width:e.width,height:e.height,sarRatio:e.sarRatio,baseDts:e.baseDts}}),t.exist()&&this.flv.emit(u8.METADATA_PARSED,{type:"audio",track:t,meta:{codec:t.codec,channelCount:t.channelCount,sampleRate:t.sampleRate,timescale:t.timescale,baseDts:t.baseDts}}),c3.debug("track parsed",e,t)}},{key:"_fireEvents",value:function(e,t,n){var r=this;c3.debug("videoTrack samples count: ".concat(e.samples.length,", audioTrack samples count: ").concat(t.samples.length)),n.flvScriptSamples.forEach(function(e){r.flv.emit(u8.FLV_SCRIPT_DATA,e),c3.debug("flvScriptData",e)}),e.samples.forEach(function(e){e.keyframe&&r.flv.emit(u8.KEYFRAME,{pts:e.originPts})}),e.warnings.forEach(function(e){var t;switch(e.type){case ck.LARGE_AV_SHIFT:t=u8.LARGE_AV_FIRST_FRAME_GAP_DETECT;break;case ck.LARGE_VIDEO_GAP:t=u8.LARGE_VIDEO_DTS_GAP_DETECT;break;case ck.LARGE_VIDEO_GAP_BETWEEN_CHUNK:t=u8.MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT}t&&r.flv.emit(u8.STREAM_EXCEPTION,ut(ut({},e),{},{type:t})),c3.warn("video exception",e)}),t.warnings.forEach(function(e){var t;switch(e.type){case ck.LARGE_AUDIO_GAP:t=u8.LARGE_AUDIO_DTS_GAP_DETECT;break;case ck.AUDIO_FILLED:t=u8.AUDIO_GAP_DETECT;break;case ck.AUDIO_DROPPED:t=u8.AUDIO_OVERLAP_DETECT}t&&r.flv.emit(u8.STREAM_EXCEPTION,ut(ut({},e),{},{type:t})),c3.warn("audio exception",e)}),n.seiSamples.forEach(function(e){r.flv.emit(u8.SEI,ut(ut({},e),{},{sei:{code:e.data.type,content:e.data.payload,dts:e.pts}}))})}}]),a}();function c6(e,t){var n=0,r=e.length-1,i=0,o=0,a=r;for(t<e[0]&&(n=0,o=a+1);o<=a;){if((i=o+Math.floor((a-o)/2))===r||t>=e[i]&&t<e[i+1]){n=i;break}e[i]<t?o=i+1:a=i-1}return n}var c9=new uV("flv"),c7=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),e&&uc(c,e);var t,n,r,i,o,a,s,l,u=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=uu(c);e=t?Reflect.construct(n,arguments,uu(this).constructor):n.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return uf(this)});function c(e){var t,n,r;return uo(this,c),ul(uf(t=u.call(this)),"media",null),ul(uf(t),"_loading",!1),ul(uf(t),"_opts",null),ul(uf(t),"_bufferService",null),ul(uf(t),"_gapService",null),ul(uf(t),"_stats",null),ul(uf(t),"_mediaLoader",null),ul(uf(t),"_maxChunkWaitTimer",null),ul(uf(t),"_tickTimer",null),ul(uf(t),"_tickInterval",500),ul(uf(t),"_urlSwitching",!1),ul(uf(t),"_seamlessSwitching",!1),ul(uf(t),"_disconnectRetryCount",0),ul(uf(t),"_preLoadEndPoint",0),ul(uf(t),"_keyframes",null),ul(uf(t),"_acceptRanges",!0),ul(uf(t),"_onProgress",(n=ui(un().mark(function e(n,r,i,o){var a,s,l,u,c,f,d,h,p,m;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=i.startTime,s=i.endTime,l=i.st,u=i.firstByteTime,t._loading=!r,t._firstProgressEmit){e.next=13;break}if(t.media){e.next=6;break}return null==(c=t._mediaLoader)||c.cancel(),e.abrupt("return");case 6:f=o.headers,d=l?u-l:s-a,t.emit(u8.TTFB,{url:t._opts.url,responseUrl:o.url,elapsed:d}),t.emit(u8.LOAD_RESPONSE_HEADERS,{headers:f}),t._transferCost.set(c4.TTFB,d),t._acceptRanges=!!(null!=f&&f.get("Accept-Ranges"))||!!(null!=f&&f.get("Content-Range")),t._firstProgressEmit=!0;case 13:if(t._bufferService){e.next=15;break}return e.abrupt("return");case 15:return clearTimeout(t._maxChunkWaitTimer),t._bandwidthService.addChunkRecord(null==n?void 0:n.byteLength,s-a),e.prev=17,e.next=20,t._bufferService.appendBuffer(n);case 20:null==(h=t._bufferService)||h.evictBuffer(t._opts.bufferBehind),e.next=33;break;case 23:if(e.prev=23,e.t0=e.catch(17),!(!t.isLive&&t._bufferService.isFull())){e.next=32;break}return e.next=28,t._mediaLoader.cancel();case 28:return t._loading=!1,p=t.bufferInfo().remaining,t._opts.preloadTime=parseInt(p)/2,e.abrupt("return");case 32:return e.abrupt("return",t._emitError(uN.create(e.t0)));case 33:if(t._urlSwitching&&(t._urlSwitching=!1,t.emit(u8.SWITCH_URL_SUCCESS,{url:t._opts.url})),t._seamlessSwitching&&(t._seamlessSwitching=!1,t._tick()),!(r&&!t.media.seeking)){e.next=40;break}return t.emit(u8.LOAD_COMPLETE),c9.debug("load done"),t.isLive&&t._disconnectRetryCount<=0&&t._end(),e.abrupt("return");case 40:if(t.isLive){e.next=42;break}return e.abrupt("return");case 42:(m=t._opts.maxReaderInterval)&&t._firstProgressEmit&&(clearTimeout(t._maxChunkWaitTimer),t._maxChunkWaitTimer=setTimeout(function(){if(t._disconnectRetryCount){t._disconnectRetryCount--,t.load();return}c9.debug("onMaxChunkWait",m),t._end()},m));case 44:case"end":return e.stop()}},e,null,[[17,23]])})),function(e,t,r,i){return n.apply(this,arguments)})),ul(uf(t),"_onRetryError",function(e,n){c9.debug("load retry",e,n),t.emit(u8.LOAD_RETRY,{error:uN.network(e),retryTime:n})}),ul(uf(t),"_end",function(){t._clear(),t._bufferService&&t._bufferService.endOfStream(),c9.debug("end stream")}),ul(uf(t),"_resetDisconnectCount",function(){t._disconnectRetryCount=t._opts.disconnectRetryCount}),ul(uf(t),"_tick",function(){clearTimeout(t._tickTimer);var e=uf(t).media;if(e){t._tickTimer=setTimeout(t._tick,t._tickInterval);var n=uL.end(uL.get(e));if(!(n<.1)&&e.readyState){var r=t._opts;if(e&&!e.paused&&!e.ended&&0!==e.playbackRate&&0!==e.readyState&&e.currentTime)t._gapService&&t._gapService.do(e,r.maxJumpDistance,t.isLive,3);else{if(!e.currentTime&&t._gapService&&r.enableStartGapJump){(t._opts.mseLowLatency||!1===t._opts.mseLowLatency&&t.bufferInfo(.3).nextStart)&&t._gapService.do(e,r.maxJumpDistance,t.isLive,3);return}r.isLive&&4===e.readyState&&n-e.currentTime>r.disconnectTime&&t.disconnect()}}}}),ul(uf(t),"_onPlay",function(){var e,n,r=t._opts.softDecode||(null==(e=t.media)||null==(n=e.buffered)?void 0:n.length);if(t.isLive){!t._loading&&r&&t.replay(void 0,!0);return}var i=t.bufferInfo();(i.start||i.nextStart)>.1&&t._tick()}),ul(uf(t),"_onLoadeddata",function(){t.isLive&&!t._opts.mseLowLatency&&t.media.duration!==1/0&&t._bufferService.updateDuration(1/0).catch(function(e){})}),ul(uf(t),"_onSeeking",ui(un().mark(function e(){return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:!t.isLive&&t.seekable&&(t._preLoadEndPoint=-1,t._checkPreload());case 1:case"end":return e.stop()}},e)}))),ul(uf(t),"_onTimeupdate",function(){if(t.media){var e=t._opts,n=t.media.currentTime;if(e.isLive&&e.maxLatency&&e.targetLatency){var r=uL.end(uL.get(t.media));r-n>=e.maxLatency&&(t.media.currentTime=r-e.targetLatency,t.emit(u8.CHASEFRAME,{currentTime:t.media.currentTime,latency:e.targetLatency}))}t._seiService.throw(n,!0),e.isLive||!t.seekable||t._loading||t._checkPreload()}}),ul(uf(t),"_onWaiting",function(){t.isLive&&!t._loading&&t._disconnectRetryCount&&(t._disconnectRetryCount--,t.load())}),ul(uf(t),"_onBufferUpdate",function(){if(!t._opts.isLive){var e=t.bufferInfo(),n=e.end,r=e.nextEnd;1>Math.abs((n||r)-t.media.duration)&&(t._end(),t.media.readyState<=2&&t._tick())}}),ul(uf(t),"_checkPreload",ui(un().mark(function e(){var n,r,i,o,a,s,l,u,c;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=void 0===(n=t.bufferInfo().remaining)?0:n,i=t._opts,o=t._keyframes.filepositions,a=t._keyframes.times,s=t.media.currentTime,!(r<i.preloadTime)){e.next=19;break}if(l=c6(t._keyframes.times,s+r+.1),(u=c6(t._keyframes.times,s+r+t._opts.preloadTime))===l&&(u=l+1),t._preLoadEndPoint!==u){e.next=11;break}return e.abrupt("return");case 11:if(null!=(c=o[l])){e.next=14;break}return e.abrupt("return");case 14:return e.next=16,t._mediaLoader.cancel();case 16:t._loadData(null,[c,o[u]]),t._preLoadEndPoint=u,t._bufferService.unContiguous(a[l]);case 19:case"end":return e.stop()}},e)}))),ul(uf(t),"_onFlvScriptData",function(e){var n,r,i,o,a=null==(n=e.data)||null==(r=n.onMetaData)?void 0:r.keyframes,s=null==(i=e.data)||null==(o=i.onMetaData)?void 0:o.duration;a&&(t._keyframes=a),!t._opts.isLive&&s&&t._bufferService.updateDuration(s)}),(r=ut({retryCount:3,retryDelay:1e3,disconnectRetryCount:0,loadTimeout:1e4,maxReaderInterval:5e3,preloadTime:5,defaultVodLoadSize:1e7,isLive:!1,softDecode:!1,bufferBehind:10,maxJumpDistance:3,analyzeDuration:2e4,seamlesslyReload:!1,keepStatusAfterSwitch:!0,onlyVideo:!1,onlyAudio:!1,preferMMS:!1,mseLowLatency:!0,durationForMSELowLatencyOff:6,chunkCountForSpeed:50,skipChunkSize:1e3,longtimeNoReceived:3e3,enableStartGapJump:!0},e)).isLive&&r.preloadTime&&(r.maxLatency||(r.maxLatency=2*r.preloadTime),r.targetLatency||(r.targetLatency=r.preloadTime),(null===r.disconnectTime||void 0===r.disconnectTime)&&(r.disconnectTime=r.maxLatency)),t._opts=r,t.media=t._opts.media||document.createElement("video"),t._opts.media=null,t._firstProgressEmit=!1,t._mediaLoader=new ct(ut(ut({},t._opts.fetchOptions),{},{retry:t._opts.retryCount,retryDelay:t._opts.retryDelay,timeout:t._opts.loadTimeout,onRetryError:t._onRetryError,onProgress:t._onProgress,responseType:"arraybuffer"})),t._disconnectRetryCount=t._opts.disconnectRetryCount,t._transferCost=new c5,t._bufferService=new c8(uf(t),t._opts.softDecode?t.media:void 0,t._opts),t._seiService=new cr(uf(t)),t._bandwidthService=new ci({chunkCountForSpeed:t._opts.chunkCountForSpeed,skipChunkSize:t._opts.skipChunkSize,longtimeNoReceived:t._opts.longtimeNoReceived}),t._stats=new ca(uf(t)),t._opts.softDecode||(t._gapService=new cn),t.media.addEventListener("play",t._onPlay),t.media.addEventListener("loadeddata",t._onLoadeddata),t.media.addEventListener("seeking",t._onSeeking),t.media.addEventListener("timeupdate",t._onTimeupdate),t.media.addEventListener("progress",t._onBufferUpdate),t.media.addEventListener("waiting",t._onWaiting),t.on(u8.FLV_SCRIPT_DATA,t._onFlvScriptData),t}return us(c,[{key:"version",get:function(){return"3.0.21"}},{key:"isLive",get:function(){return this._opts.isLive}},{key:"baseDts",get:function(){var e;return null==(e=this._bufferService)?void 0:e.baseDts}},{key:"seekable",get:function(){return!!this._keyframes&&this._acceptRanges}},{key:"loader",get:function(){return this._mediaLoader}},{key:"blobUrl",get:function(){var e;return null==(e=this._bufferService)?void 0:e.blobUrl}},{key:"speedInfo",value:function(){return{speed:this._bandwidthService.getLatestSpeed(),avgSpeed:this._bandwidthService.getAvgSpeed(),totalSize:this._bandwidthService.getTotalSize(),totalCost:this._bandwidthService.getTotalCost()}}},{key:"getStats",value:function(){return this._stats.getStats()}},{key:"bufferInfo",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1;return uL.info(uL.get(this.media),null==(e=this.media)?void 0:e.currentTime,t)}},{key:"playbackQuality",value:function(){var e=this.media;if(!e)return{};if("function"==typeof e.getVideoPlaybackQuality){var t=e.getVideoPlaybackQuality();return{droppedVideoFrames:t.droppedVideoFrames||t.corruptedVideoFrames,totalVideoFrames:t.totalVideoFrames,creationTime:t.creationTime}}return{droppedVideoFrames:e.webkitDroppedFrameCount,totalVideoFrames:e.webkitDecodedFrameCount,creationTime:performance.now()}}},{key:"load",value:(n=ui(un().mark(function e(t){var n,r=arguments;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>1&&void 0!==r[1]&&r[1],this._bufferService){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._reset(n);case 5:this._loadData(t,this._opts.isLive?[]:[0,this._opts.defaultVodLoadSize]),clearTimeout(this._tickTimer),this._tickTimer=setTimeout(this._tick,this._tickInterval);case 8:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"replay",value:(r=ui(un().mark(function e(){var t,n,r=this,i=arguments;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.length>0&&void 0!==i[0]?i[0]:this._opts.seamlesslyReload,n=i.length>1?i[1]:void 0,this.media){e.next=4;break}return e.abrupt("return");case 4:if(this._resetDisconnectCount(),!t){e.next=11;break}return e.next=8,this._clear();case 8:setTimeout(function(){r._seamlessSwitching=!0,r._loadData(r._opts.url),r._bufferService.seamlessSwitch()}),e.next=13;break;case 11:return e.next=13,this.load();case 13:return e.abrupt("return",this.media.play(!n).catch(function(){}));case 14:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"disconnect",value:function(){var e;return c9.debug("disconnect!"),null==(e=this._bufferService)||e.resetSeamlessSwitchStats(),this._clear()}},{key:"switchURL",value:(i=ui(un().mark(function e(t,n){var r=this;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._bufferService){e.next=2;break}return e.abrupt("return");case 2:if(this._resetDisconnectCount(),!(this._loading&&n)){e.next=6;break}return this._bufferService.seamlessLoadingSwitch=function(){var e=ui(un().mark(function e(n){return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r._clear();case 2:r._bufferService.seamlessLoadingSwitching=!0,r._urlSwitching=!0,r._seamlessSwitching=!0,r._bufferService.seamlessSwitch(),r._loadData(t);case 7:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),e.abrupt("return");case 6:if(!(!n||!this._opts.isLive)){e.next=11;break}return e.next=9,this.load(t);case 9:return this._urlSwitching=!0,e.abrupt("return",this.media.play(!0).catch(function(){}));case 11:return e.next=13,this._clear();case 13:setTimeout(function(){r._urlSwitching=!0,r._seamlessSwitching=!0,r._loadData(t),r._bufferService.seamlessSwitch()});case 14:case"end":return e.stop()}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"destroy",value:(o=ui(un().mark(function e(){return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.media){e.next=2;break}return e.abrupt("return");case 2:return this.removeAllListeners(),this._seiService.reset(),this.media.removeEventListener("play",this._onPlay),this.media.removeEventListener("loadeddata",this._onLoadeddata),this.media.removeEventListener("seeking",this._onSeeking),this.media.removeEventListener("timeupdate",this._onTimeupdate),this.media.removeEventListener("waiting",this._onWaiting),this.media.removeEventListener("progress",this._onBufferUpdate),e.next=12,Promise.all([this._clear(),this._bufferService.destroy()]);case 12:this.media=null,this._bufferService=null;case 14:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})},{key:"_emitError",value:function(e){var t,n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];c9.table(e),c9.error(e),c9.error(null==(t=this.media)?void 0:t.error),this._urlSwitching&&(this._urlSwitching=!1,this._seamlessSwitching=!1,this.emit(u8.SWITCH_URL_FAILED,e)),this.emit(u8.ERROR,e),n&&(this._seiService.reset(),this._end())}},{key:"_reset",value:(a=ui(un().mark(function e(){var t,n=arguments;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]&&n[0],this._seiService.reset(),this._bandwidthService.reset(),this._stats.reset(),e.next=6,this._clear();case 6:return e.next=8,this._bufferService.reset(t);case 8:case"end":return e.stop()}},e,this)})),function(){return a.apply(this,arguments)})},{key:"_loadData",value:(s=ui(un().mark(function e(t,n){var r;return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(this._opts.url=t),r=t=this._opts.url,t){e.next=4;break}throw Error("Source url is missing");case 4:if(this._opts.preProcessUrl&&(r=this._opts.preProcessUrl(t).url),this._mediaLoader.finnalUrl=r,this.emit(u8.LOAD_START,{url:r,seamlessSwitching:this._seamlessSwitching}),c9.debug("load data, loading:",this._loading,r),!this._loading){e.next=11;break}return e.next=11,this._mediaLoader.cancel();case 11:return this._loading=!0,e.prev=12,e.next=15,this._mediaLoader.load({url:r,range:n});case 15:e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(12),this._loading=!1,e.abrupt("return",this._emitError(uN.network(e.t0),!1));case 21:case"end":return e.stop()}},e,this,[[12,17]])})),function(e,t){return s.apply(this,arguments)})},{key:"_clear",value:(l=ui(un().mark(function e(){return un().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._mediaLoader){e.next=3;break}return e.next=3,this._mediaLoader.cancel();case 3:clearTimeout(this._maxChunkWaitTimer),clearTimeout(this._tickTimer),this._loading=!1,this._firstProgressEmit=!1;case 7:case"end":return e.stop()}},e,this)})),function(){return l.apply(this,arguments)})}],[{key:"isSupported",value:function(e){return e&&"video"!==e&&"audio"!==e?"undefined"!=typeof WebAssembly:u$.isSupported()}},{key:"enableLogger",value:function(){uV.enable(),cR.enable()}},{key:"disableLogger",value:function(){uV.disable(),cR.disable()}}]),c}(cs.default);try{localStorage.getItem("xgd")?c7.enableLogger():c7.disableLogger()}catch(e){}var fe={};fe.INT8=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeInt8(t,n)},this._read=function(e,t,n){return e.readInt8(t,!0,n)},this._className=function(){return fe.CHAR}},fe.INT16=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeInt16(t,n)},this._read=function(e,t,n){return e.readInt16(t,!0,n)},this._className=function(){return fe.SHORT}},fe.INT32=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeInt32(t,n)},this._read=function(e,t,n){return e.readInt32(t,!0,n)},this._className=function(){return fe.INT32}},fe.INT64=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeInt64(t,n)},this._read=function(e,t,n){return e.readInt64(t,!0,n)},this._className=function(){return fe.INT64}},fe.UINT8=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeInt16(t,n)},this._read=function(e,t,n){return e.readInt16(t,!0,n)},this._className=function(){return fe.SHORT}},fe.UInt16=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeInt32(t,n)},this._read=function(e,t,n){return e.readInt32(t,!0,n)},this._className=function(){return fe.INT32}},fe.UInt32=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeInt64(t,n)},this._read=function(e,t,n){return e.readInt64(t,!0,n)},this._className=function(){return fe.INT64}},fe.Float=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeFloat(t,n)},this._read=function(e,t,n){return e.readFloat(t,!0,n)},this._className=function(){return fe.FLOAT}},fe.Double=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeDouble(t,n)},this._read=function(e,t,n){return e.readDouble(t,!0,n)},this._className=function(){return fe.DOUBLE}},fe.STRING=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeString(t,n)},this._read=function(e,t,n){return e.readString(t,!0,n)},this._className=function(){return fe.STRING}},fe.BOOLEAN=function(){this._clone=function(){return!1},this._write=function(e,t,n){return e.writeBoolean(t,n)},this._read=function(e,t,n){return e.readBoolean(t,!0,n)},this._className=function(){return fe.BOOLEAN}},fe.ENUM=function(){this._clone=function(){return 0},this._write=function(e,t,n){return e.writeInt32(t,n)},this._read=function(e,t,n){return e.readInt32(t,!0,n)}},fe.Vector=function(e){this.proto=e,this.value=[]},fe.Vector.prototype._clone=function(){return new fe.Vector(this.proto)},fe.Vector.prototype._write=function(e,t,n){return e.writeVector(t,n)},fe.Vector.prototype._read=function(e,t,n){return e.readVector(t,!0,n)},fe.Vector.prototype._className=function(){return fe.TypeHelp.VECTOR.replace("$t",this.proto._className())},fe.Map=function(e,t){this.kproto=e,this.vproto=t,this.value={}},fe.Map.prototype._clone=function(){return new fe.Map(this.kproto,this.vproto)},fe.Map.prototype._write=function(e,t,n){return e.writeMap(t,n)},fe.Map.prototype._read=function(e,t,n){return e.readMap(t,!0,n)},fe.Map.prototype.put=function(e,t){this.value[e]=t},fe.Map.prototype.get=function(e){return this.value[e]},fe.Map.prototype.remove=function(e){delete this.value[e]},fe.Map.prototype.clear=function(){this.value={}},fe.Map.prototype.size=function(){var e=0;for(var t in this.value)e++;return e},fe.Map.prototype._className=function(){return fe.TypeHelp.Map.replace("$k",this.kproto._className()).replace("$v",this.vproto._className())},fe.DataHelp={EN_INT8:0,EN_INT16:1,EN_INT32:2,EN_INT64:3,EN_FLOAT:4,EN_DOUBLE:5,EN_STRING1:6,EN_STRING4:7,EN_MAP:8,EN_LIST:9,EN_STRUCTBEGIN:10,EN_STRUCTEND:11,EN_ZERO:12,EN_SIMPLELIST:13},fe.TypeHelp={BOOLEAN:"bool",CHAR:"char",SHORT:"short",INT32:"int32",INT64:"int64",FLOAT:"float",DOUBLE:"double",STRING:"string",VECTOR:"list<$t>",MAP:"map<$k, $v>"},fe.BinBuffer=function(e){this.buf=null,this.vew=null,this.len=0,this.position=0,null!=e&&void 0!=e&&e instanceof fe.BinBuffer&&(this.buf=e.buf,this.vew=new DataView(this.buf),this.len=e.length,this.position=e.position),null!=e&&void 0!=e&&e instanceof ArrayBuffer&&(this.buf=e,this.vew=new DataView(this.buf),this.len=this.vew.byteLength,this.position=0),this.__defineGetter__("length",function(){return this.len}),this.__defineGetter__("buffer",function(){return this.buf})},fe.BinBuffer.prototype._write=function(e,t,n){return e.writeBytes(t,n)},fe.BinBuffer.prototype._read=function(e,t,n){return e.readBytes(t,!0,n)},fe.BinBuffer.prototype._clone=function(){return new fe.BinBuffer},fe.BinBuffer.prototype.allocate=function(e){if(e=this.position+e,null==this.buf||!(this.buf.length>e)){var t=new ArrayBuffer(Math.max(256,2*e));null!=this.buf&&(new Uint8Array(t).set(new Uint8Array(this.buf)),this.buf=void 0),this.buf=t,this.vew=void 0,this.vew=new DataView(this.buf)}},fe.BinBuffer.prototype.getBuffer=function(){var e=new ArrayBuffer(this.len);return new Uint8Array(e).set(new Uint8Array(this.buf,0,this.len)),e},fe.BinBuffer.prototype.memset=function(e,t,n){this.allocate(n),new Uint8Array(this.buf).set(new Uint8Array(e,t,n),this.position)},fe.BinBuffer.prototype.writeInt8=function(e){this.allocate(1),this.vew.setInt8(this.position,e),this.position+=1,this.len=this.position},fe.BinBuffer.prototype.writeUInt8=function(e){this.allocate(1),this.vew.setUint8(this.position++,e),this.len=this.position},fe.BinBuffer.prototype.writeInt16=function(e){this.allocate(2),this.vew.setInt16(this.position,e),this.position+=2,this.len=this.position},fe.BinBuffer.prototype.writeUInt16=function(e){this.allocate(2),this.vew.setUint16(this.position,e),this.position+=2,this.len=this.position},fe.BinBuffer.prototype.writeInt32=function(e){this.allocate(4),this.vew.setInt32(this.position,e),this.position+=4,this.len=this.position},fe.BinBuffer.prototype.writeUInt32=function(e){this.allocate(4),this.vew.setUint32(this.position,e),this.position+=4,this.len=this.position},fe.BinBuffer.prototype.writeInt64=function(e){if("string"==typeof e){this.allocate(8),e=e.toLowerCase();for(var t=0,n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r)-48;i>9&&(i-=39),n=10*n+Math.floor((t=10*t+i)/0x100000000),t%=0x100000000}this.vew.setUint32(this.position,n),this.vew.setUint32(this.position+4,t),this.position+=8,this.len=this.position;return}this.allocate(8),this.vew.setUint32(this.position,parseInt(e/0x100000000)),this.vew.setUint32(this.position+4,e%0x100000000),this.position+=8,this.len=this.position},fe.BinBuffer.prototype.writeFloat=function(e){this.allocate(4),this.vew.setFloat32(this.position,e),this.position+=4,this.len=this.position},fe.BinBuffer.prototype.writeDouble=function(e){this.allocate(8),this.vew.setFloat64(this.position,e),this.position+=8,this.len=this.position},fe.BinBuffer.prototype.writeString=function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));this.allocate(t.length),new Uint8Array(this.buf).set(new Uint8Array(t),this.position),this.position+=t.length,this.len=this.position},fe.BinBuffer.prototype.writeBytes=function(e){0!=e.length&&null!=e.buf&&(this.allocate(e.length),new Uint8Array(this.buf).set(new Uint8Array(e.buf,0,e.length),this.position),this.position+=e.length,this.len=this.position)},fe.BinBuffer.prototype.readInt8=function(){return this.vew.getInt8(this.position++)},fe.BinBuffer.prototype.readInt16=function(){return this.position+=2,this.vew.getInt16(this.position-2)},fe.BinBuffer.prototype.readInt32=function(){return this.position+=4,this.vew.getInt32(this.position-4)},fe.BinBuffer.prototype.readUInt8=function(){return this.position+=1,this.vew.getUint8(this.position-1)},fe.BinBuffer.prototype.readUInt16=function(){return this.position+=2,this.vew.getUint16(this.position-2)},fe.BinBuffer.prototype.readUInt32=function(){return this.position+=4,this.vew.getUint32(this.position-4)},fe.BinBuffer.prototype.readInt64=function(){var e,t,n,r=this.vew.getUint32(this.position),i=this.vew.getUint32(this.position+4);this.position+=8;for(var o="";0!=r||0!=i;)o=(t=(n=0x100000000*(e=r%10)+i)%10).toString(10)+o,r=(r-e)/10,i=(n-t)/10;return o},fe.BinBuffer.prototype.readFloat=function(){var e=this.vew.getFloat32(this.position);return this.position+=4,e},fe.BinBuffer.prototype.readDouble=function(){var e=this.vew.getFloat64(this.position);return this.position+=8,e},fe.BinBuffer.prototype.readString=function(e){for(var t=[],n=0;n<e;n++)t.push(String.fromCharCode(this.vew.getUint8(this.position++)));var r=t.join("");try{r=decodeURIComponent(escape(r))}catch(e){}return r.replace(/</g,"<").replace(/>/g,">").replace(/\'/g,"'").replace(/\"/g,""")},fe.BinBuffer.prototype.readBytes=function(e){var t=new fe.BinBuffer;return t.allocate(e),t.memset(this.buf,this.position,e),t.position=0,t.len=e,this.position=this.position+e,t},fe.JceOutputStream=function(){this.buf=new fe.BinBuffer,this.getBinBuffer=function(){return this.buf},this.getBuffer=function(){return this.buf.getBuffer()}},fe.JceOutputStream.prototype.clear=function(){return this.buf=new fe.BinBuffer,this},fe.JceOutputStream.prototype.writeTo=function(e,t){e<15?this.buf.writeUInt8(e<<4&240|t):this.buf.writeUInt16((240|t)<<8|e)},fe.JceOutputStream.prototype.writeBoolean=function(e,t){this.writeInt8(e,+(!0==t))},fe.JceOutputStream.prototype.writeInt8=function(e,t){0==t?this.writeTo(e,fe.DataHelp.EN_ZERO):(this.writeTo(e,fe.DataHelp.EN_INT8),this.buf.writeInt8(t))},fe.JceOutputStream.prototype.writeInt16=function(e,t){t>=-128&&t<=127?this.writeInt8(e,t):(this.writeTo(e,fe.DataHelp.EN_INT16),this.buf.writeInt16(t))},fe.JceOutputStream.prototype.writeInt32=function(e,t){t>=-32768&&t<=32767?this.writeInt16(e,t):(this.writeTo(e,fe.DataHelp.EN_INT32),this.buf.writeInt32(t))},fe.JceOutputStream.prototype.writeInt64=function(e,t){t>=-0x80000000&&t<=0x7fffffff?this.writeInt32(e,t):(this.writeTo(e,fe.DataHelp.EN_INT64),this.buf.writeInt64(t))},fe.JceOutputStream.prototype.writeUInt8=function(e,t){this.writeInt16(e,t)},fe.JceOutputStream.prototype.writeUInt16=function(e,t){this.writeInt32(e,t)},fe.JceOutputStream.prototype.writeUInt32=function(e,t){this.writeInt64(e,t)},fe.JceOutputStream.prototype.writeFloat=function(e,t){0==t?this.writeTo(e,fe.DataHelp.EN_ZERO):(this.writeTo(e,fe.DataHelp.EN_FLOAT),this.buf.writeFloat(t))},fe.JceOutputStream.prototype.writeDouble=function(e,t){0==t?this.writeTo(e,fe.DataHelp.EN_ZERO):(this.writeTo(e,fe.DataHelp.EN_DOUBLE),this.buf.writeDouble(t))},fe.JceOutputStream.prototype.writeStruct=function(e,t){if(void 0==t.writeTo)throw Error("not defined writeTo Function");this.writeTo(e,fe.DataHelp.EN_STRUCTBEGIN),t.writeTo(this),this.writeTo(0,fe.DataHelp.EN_STRUCTEND)},fe.JceOutputStream.prototype.writeString=function(e,t){var n=t;try{n=unescape(encodeURIComponent(n))}catch(e){}n.length>255?(this.writeTo(e,fe.DataHelp.EN_STRING4),this.buf.writeUInt32(n.length)):(this.writeTo(e,fe.DataHelp.EN_STRING1),this.buf.writeUInt8(n.length)),this.buf.writeString(n)},fe.JceOutputStream.prototype.writeBytes=function(e,t){if(!(t instanceof fe.BinBuffer))throw Error("value not instanceof Taf.BinBuffer");this.writeTo(e,fe.DataHelp.EN_SIMPLELIST),this.writeTo(0,fe.DataHelp.EN_INT8),this.writeInt32(0,t.length),this.buf.writeBytes(t)},fe.JceOutputStream.prototype.writeVector=function(e,t){this.writeTo(e,fe.DataHelp.EN_LIST),this.writeInt32(0,t.value.length);for(var n=0;n<t.value.length;n++)t.proto._write(this,0,t.value[n])},fe.JceOutputStream.prototype.writeMap=function(e,t){for(var n in this.writeTo(e,fe.DataHelp.EN_MAP),this.writeInt32(0,t.size()),t.value)t.kproto._write(this,0,n),t.vproto._write(this,1,t.value[n])},fe.JceInputStream=function(e){this.buf=new fe.BinBuffer(e)},fe.JceInputStream.prototype.setBuffer=function(e){return this.buf=new fe.BinBuffer(e),this},fe.JceInputStream.prototype.readFrom=function(){var e=this.buf.readUInt8(),t=(240&e)>>4;return t>=15&&(t=this.buf.readUInt8()),{tag:t,type:15&e}},fe.JceInputStream.prototype.peekFrom=function(){var e=this.buf.position,t=this.readFrom();return this.buf.position=e,{tag:t.tag,type:t.type,size:t.tag>=15?2:1}},fe.JceInputStream.prototype.skipField=function(e){switch(e){case fe.DataHelp.EN_INT8:this.buf.position+=1;break;case fe.DataHelp.EN_INT16:this.buf.position+=2;break;case fe.DataHelp.EN_INT32:this.buf.position+=4;break;case fe.DataHelp.EN_INT64:this.buf.position+=8;break;case fe.DataHelp.EN_STRING1:var t=this.buf.readUInt8();this.buf.position+=t;break;case fe.DataHelp.EN_STRING4:var n=this.buf.readInt32();this.buf.position+=n;break;case fe.DataHelp.EN_STRUCTBEGIN:this.skipToStructEnd();break;case fe.DataHelp.EN_STRUCTEND:case fe.DataHelp.EN_ZERO:break;case fe.DataHelp.EN_MAP:for(var r=this.readInt32(0,!0),i=0;i<2*r;++i){var o=this.readFrom();this.skipField(o.type)}break;case fe.DataHelp.EN_SIMPLELIST:var o=this.readFrom();if(o.type!=fe.DataHelp.EN_INT8)throw Error("skipField with invalid type, type value: "+e+","+o.type);var t=this.readInt32(0,!0);this.buf.position+=t;break;case fe.DataHelp.EN_LIST:for(var r=this.readInt32(0,!0),i=0;i<r;++i){var o=this.readFrom();this.skipField(o.type)}break;default:throw Error("skipField with invalid type, type value: "+e)}},fe.JceInputStream.prototype.skipToStructEnd=function(){for(;;){var e=this.readFrom();if(this.skipField(e.type),e.type==fe.DataHelp.EN_STRUCTEND)return}},fe.JceInputStream.prototype.skipToTag=function(e,t){for(;this.buf.position<this.buf.length;){var n=this.peekFrom();if(e<=n.tag||n.type==fe.DataHelp.EN_STRUCTEND)return n.type!=fe.DataHelp.EN_STRUCTEND&&e==n.tag;this.buf.position+=n.size,this.skipField(n.type)}if(t)throw Error("require field not exist, tag:"+e);return!1},fe.JceInputStream.prototype.readBoolean=function(e,t,n){return 1==this.readInt8(e,t,n)},fe.JceInputStream.prototype.readInt8=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();switch(r.type){case fe.DataHelp.EN_ZERO:return 0;case fe.DataHelp.EN_INT8:return this.buf.readInt8()}throw Error("read int8 type mismatch, tag:"+e+", get type:"+r.type)},fe.JceInputStream.prototype.readInt16=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();switch(r.type){case fe.DataHelp.EN_ZERO:return 0;case fe.DataHelp.EN_INT8:return this.buf.readInt8();case fe.DataHelp.EN_INT16:return this.buf.readInt16()}throw Error("read int16 type mismatch, tag:"+e+", get type:"+r.type)},fe.JceInputStream.prototype.readInt32=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();switch(r.type){case fe.DataHelp.EN_ZERO:return 0;case fe.DataHelp.EN_INT8:return this.buf.readInt8();case fe.DataHelp.EN_INT16:return this.buf.readInt16();case fe.DataHelp.EN_INT32:return this.buf.readInt32()}throw Error("read int32 type mismatch, tag:"+e+", get type:"+r.type)},fe.JceInputStream.prototype.readInt64=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();switch(r.type){case fe.DataHelp.EN_ZERO:return 0;case fe.DataHelp.EN_INT8:return this.buf.readInt8();case fe.DataHelp.EN_INT16:return this.buf.readInt16();case fe.DataHelp.EN_INT32:return this.buf.readInt32();case fe.DataHelp.EN_INT64:return this.buf.readInt64()}throw Error("read int64 type mismatch, tag:"+e+", get type:"+r.type)},fe.JceInputStream.prototype.readFloat=function(e,t,n){if(!1==this.skipToTag(e,t))return n;switch(this.readFrom().type){case fe.DataHelp.EN_ZERO:return 0;case fe.DataHelp.EN_FLOAT:return this.buf.readFloat()}throw Error("read float type mismatch, tag:"+e+", get type:"+iL.type)},fe.JceInputStream.prototype.readDouble=function(e,t,n){if(!1==this.skipToTag(e,t))return n;switch(this.readFrom().type){case fe.DataHelp.EN_ZERO:return 0;case fe.DataHelp.EN_DOUBLE:return this.buf.readDouble()}throw Error("read double type mismatch, tag:"+e+", get type:"+iL.type)},fe.JceInputStream.prototype.readUInt8=function(e,t,n){return this.readInt16(e,t,n)},fe.JceInputStream.prototype.readUInt16=function(e,t,n){return this.readInt32(e,t,n)},fe.JceInputStream.prototype.readUInt32=function(e,t,n){return this.readInt64(e,t,n)},fe.JceInputStream.prototype.readStruct=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();if(r.type!=fe.DataHelp.EN_STRUCTBEGIN)throw Error("read struct type mismatch, tag: "+e+", get type:"+r.type);return n.readFrom(this),this.skipToStructEnd(),n},fe.JceInputStream.prototype.readString=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();if(r.type==fe.DataHelp.EN_STRING1)return this.buf.readString(this.buf.readUInt8());if(r.type==fe.DataHelp.EN_STRING4)return this.buf.readString(this.buf.readUInt32());throw Error("read 'string' type mismatch, tag: "+e+", get type: "+r.type+".")},fe.JceInputStream.prototype.readString2=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();if(r.type==fe.DataHelp.EN_STRING1)return this.buf.readBytes(this.buf.readUInt8());if(r.type==fe.DataHelp.EN_STRING4)return this.buf.readBytes(this.buf.readUInt32());throw Error("read 'string2' type mismatch, tag: "+e+", get type: "+r.type+".")},fe.JceInputStream.prototype.readBytes=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();if(r.type==fe.DataHelp.EN_SIMPLELIST){var i=this.readFrom();if(i.type!=fe.DataHelp.EN_INT8)throw Error("type mismatch, tag:"+e+",type:"+r.type+","+i.type);var o=this.readInt32(0,!0);if(o<0)throw Error("invalid size, tag:"+e+",type:"+r.type+","+i.type);return this.buf.readBytes(o)}if(r.type==fe.DataHelp.EN_LIST){var o=this.readInt32(0,!0);return this.buf.readBytes(o)}throw Error("type mismatch, tag:"+e+",type:"+r.type)},fe.JceInputStream.prototype.readVector=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();if(r.type!=fe.DataHelp.EN_LIST)throw Error("read 'vector' type mismatch, tag: "+e+", get type: "+r.type);var i=this.readInt32(0,!0);if(i<0)throw Error("invalid size, tag: "+e+", type: "+r.type+", size: "+i);for(var o=0;o<i;++o)n.value.push(n.proto._read(this,0,n.proto._clone()));return n},fe.JceInputStream.prototype.readMap=function(e,t,n){if(!1==this.skipToTag(e,t))return n;var r=this.readFrom();if(r.type!=fe.DataHelp.EN_MAP)throw Error("read 'map' type mismatch, tag: "+e+", get type: "+r.type);var i=this.readInt32(0,!0);if(i<0)throw Error("invalid map, tag: "+e+", size: "+i);for(var o=0;o<i;o++){var a=n.kproto._read(this,0,n.kproto._clone()),s=n.vproto._read(this,1,n.vproto._clone());n.put(a,s)}return n},fe.Wup=function(){this.iVersion=3,this.cPacketType=0,this.iMessageType=0,this.iRequestId=0,this.sServantName="",this.sFuncName="",this.sBuffer=new fe.BinBuffer,this.iTimeout=0,this.context=new fe.Map(new fe.STRING,new fe.STRING),this.status=new fe.Map(new fe.STRING,new fe.STRING),this.newdata=new fe.Map(new fe.STRING,new fe.BinBuffer),this.iStream=new fe.JceInputStream,this.oStream=new fe.JceOutputStream},fe.Wup.prototype.hasKey=function(e){return this.newdata.hasKey(e)},fe.Wup.prototype.setVersion=function(e){this.iVersion=e},fe.Wup.prototype.getVersion=function(e){return this.iVersion},fe.Wup.prototype.setServant=function(e){this.sServantName=e},fe.Wup.prototype.setFunc=function(e){this.sFuncName=e},fe.Wup.prototype.setRequestId=function(e){this.iRequestId=e||++this.iRequestId},fe.Wup.prototype.getRequestId=function(){return this.iRequestId},fe.Wup.prototype.setTimeOut=function(e){this.iTimeout=e},fe.Wup.prototype.getTimeOut=function(){return this.iTimeout},fe.Wup.prototype.writeTo=function(){var e=this.oStream.clear();return e.writeInt16(1,this.iVersion),e.writeInt8(2,this.cPacketType),e.writeInt32(3,this.iMessageType),e.writeInt32(4,this.iRequestId),e.writeString(5,this.sServantName),e.writeString(6,this.sFuncName),e.writeBytes(7,this.sBuffer),e.writeInt32(8,this.iTimeout),e.writeMap(9,this.context),e.writeMap(10,this.status),new fe.BinBuffer(e.getBuffer())},fe.Wup.prototype.encode=function(){var e=this.oStream.clear();e.writeMap(0,this.newdata),this.sBuffer=e.getBinBuffer();var t=this.writeTo(),n=new fe.BinBuffer;return n.writeInt32(4+t.len),n.writeBytes(t),n},fe.Wup.prototype.writeBoolean=function(e,t){var n=this.oStream.clear();n.writeBoolean(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeInt8=function(e,t){var n=this.oStream.clear();n.writeInt8(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeInt16=function(e,t){var n=this.oStream.clear();n.writeInt16(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeInt32=function(e,t){var n=this.oStream.clear();n.writeInt32(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeInt64=function(e,t){var n=this.oStream.clear();n.writeInt64(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeFloat=function(e,t){var n=this.oStream.clear();n.writeFloat(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeDouble=function(e,t){var n=this.oStream.clear();n.writeDouble(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeString=function(e,t){var n=this.oStream.clear();n.writeString(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeVector=function(e,t){var n=this.oStream.clear();n.writeVector(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBinBuffer()))},fe.Wup.prototype.writeStruct=function(e,t){var n=this.oStream.clear();n.writeStruct(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeBytes=function(e,t){var n=this.oStream.clear();n.writeBytes(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.writeMap=function(e,t){var n=this.oStream.clear();n.writeMap(0,t),this.newdata.put(e,new fe.BinBuffer(n.getBuffer()))},fe.Wup.prototype.readFrom=function(e){this.iVersion=e.readInt16(1,!0),this.cPacketType=e.readInt8(2,!0),this.iMessageType=e.readInt32(3,!0),this.iRequestId=e.readInt32(4,!0),this.sServantName=e.readString(5,!0),this.sFuncName=e.readString(6,!0),this.sBuffer=e.readBytes(7,!0),this.iTimeout=e.readInt32(8,!0),this.context=e.readMap(9,!0,this.context),this.status=e.readMap(10,!0,this.status)},fe.Wup.prototype.decode=function(e){var t=this.iStream.setBuffer(e);if(4>t.buf.vew.getInt32(t.buf.position))throw Error("packet length too short");t.buf.position+=4,this.readFrom(t),t=this.iStream.setBuffer(this.sBuffer.getBuffer()),this.newdata.clear(),t.readMap(0,!0,this.newdata)},fe.Wup.prototype.readBoolean=function(e){var t,n;if(void 0==(t=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return this.iStream.setBuffer(t.buffer).readBoolean(0,!0,n)},fe.Wup.prototype.readInt8=function(e){var t,n;if(void 0==(t=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return this.iStream.setBuffer(t.buffer).readInt8(0,!0,n)},fe.Wup.prototype.readInt16=function(e){var t,n;if(void 0==(t=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return this.iStream.setBuffer(t.buffer).readInt16(0,!0,n)},fe.Wup.prototype.readInt32=function(e){var t,n;if(void 0==(t=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return this.iStream.setBuffer(t.buffer).readInt32(0,!0,n)},fe.Wup.prototype.readInt64=function(e){var t,n;if(void 0==(t=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return this.iStream.setBuffer(t.buffer).readInt64(0,!0,n)},fe.Wup.prototype.readFloat=function(e){var t,n;if(void 0==(t=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return this.iStream.setBuffer(t.buffer).readFloat(0,!0,n)},fe.Wup.prototype.readDouble=function(e){var t;if(void 0==(t=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return def=this.iStream.setBuffer(t.buffer).readDouble(0,!0,def)},fe.Wup.prototype.readVector=function(e,t,n){var r;if(void 0==(r=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return t=this.iStream.setBuffer(r.buffer).readVector(0,!0,t)},fe.Wup.prototype.readStruct=function(e,t,n){var r;if(void 0==(r=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return t=this.iStream.setBuffer(r.buffer).readStruct(0,!0,t)},fe.Wup.prototype.readMap=function(e,t,n){var r;if(void 0==(r=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return t=this.iStream.setBuffer(r.buffer).readMap(0,!0,t)},fe.Wup.prototype.readBytes=function(e,t,n){var r;if(void 0==(r=this.newdata.get(e)))throw Error("UniAttribute not found key:"+e);return t=this.iStream.setBuffer(r.buffer).readBytes(0,!0,t)},fe.Util=fe.Util||{},fe.Util.jcestream=function(e,t){if(null!=e&&void 0!=e&&e instanceof ArrayBuffer){t=t||16;for(var n=new Uint8Array(e),r="",i=0;i<n.length;i++)0!=i&&i%t==0?r+="\n":0!=i&&(r+=" "),r+=(n[i]>15?"":"0")+n[i].toString(16)}},fe.Util.str2ab=function(e){var t,n=e.length,r=Array(n);for(t=0;t<n;++t)r[t]=e.charCodeAt(t);return new Uint8Array(r).buffer},fe.Util.ajax=function(e,t,n,r){var i=new XMLHttpRequest;i.overrideMimeType("text/plain; charset=x-user-defined");var o=function(){4===i.readyState&&(200===i.status||304===i.status?n(fe.Util.str2ab(i.response)):r(i.status),i.removeEventListener("readystatechange",o),i=void 0)};i.addEventListener("readystatechange",o),i.open("post",e),i.send(t)};var ft={};ft.WSRegisterGroupReq=function(){this.vGroupId=new fe.Vector(new fe.STRING),this.sToken=""},ft.WSRegisterGroupReq.prototype.writeTo=function(e){e.writeVector(0,this.vGroupId),e.writeString(1,this.sToken)},ft.UserHeartBeatReq=function(){this.tId=new ft.UserId,this.lTid=0,this.lSid=0,this.lPid=0,this.bWatchVideo=!1,this.eLineType=0,this.iFps=0,this.iAttendee=0,this.iBandwidth=0,this.lShortTid=0,this.iLastHeartElapseTime=0},ft.UserHeartBeatReq.prototype.writeTo=function(e){e.writeStruct(0,this.tId),e.writeInt64(1,this.lTid),e.writeInt64(2,this.lSid),e.writeInt64(4,this.lPid),e.writeBoolean(5,this.bWatchVideo),e.writeInt32(6,this.eLineType),e.writeInt32(7,this.iFps),e.writeInt32(8,this.iAttendee),e.writeInt32(9,this.iBandwidth),e.writeInt32(10,this.iLastHeartElapseTime)},ft.WebSocketCommand=function(){this.iCmdType=0,this.vData=new fe.BinBuffer,this.lRequestId=0,this.traceId=""},ft.WebSocketCommand.prototype.writeTo=function(e){e.writeInt32(0,this.iCmdType),e.writeBytes(1,this.vData),e.writeInt64(2,this.lRequestId),e.writeString(3,this.traceId)},ft.WebSocketCommand.prototype.readFrom=function(e){this.iCmdType=e.readInt32(0,!1,this.iCmdType),this.vData=e.readBytes(1,!1,this.vData),this.lRequestId=e.readInt64(2,!1,this.lRequestId),this.traceId=e.readString(3,!1,this.traceId)},ft.WSPushMessage=function(){this.ePushType=0,this.iUri=0,this.sMsg=new fe.BinBuffer,this.iProtocolType=0,this.sGroupId=""},ft.WSPushMessage.prototype.readFrom=function(e){this.ePushType=e.readInt32(0,!1,this.ePushType),this.iUri=e.readInt64(1,!1,this.iUri),this.sMsg=e.readBytes(2,!1,this.sMsg),this.iProtocolType=e.readInt32(3,!1,this.iProtocolType),this.sGroupId=e.readString(4,!1,this.sGroupId)},ft.MessageNotice=function(){this.tUserInfo=new ft.SenderInfo,this.sContent="",this.sIconUrl=""},ft.MessageNotice.prototype.readFrom=function(e){this.tUserInfo=e.readStruct(0,!1,this.tUserInfo),this.sContent=e.readString(3,!1,this.sContent)},ft.UserId=function(){this.lUid=0,this.sGuid="",this.sToken="",this.sHuYaUA="",this.sCookie="",this.iTokenType=0},ft.UserId.prototype.writeTo=function(e){e.writeInt64(0,this.lUid),e.writeString(1,this.sGuid),e.writeString(2,this.sToken),e.writeString(3,this.sHuYaUA),e.writeString(4,this.sCookie),e.writeInt32(5,this.iTokenType)},ft.UserId.prototype.readFrom=function(e){this.lUid=e.readInt64(0,!1,this.lUid),this.sGuid=e.readString(1,!1,this.sGuid),this.sToken=e.readString(2,!1,this.sToken),this.sHuYaUA=e.readString(3,!1,this.sHuYaUA),this.sCookie=e.readString(4,!1,this.sCookie),this.iTokenType=e.readInt32(5,!1,this.iTokenType)},ft.SenderInfo=function(){this.sNickName=""},ft.SenderInfo.prototype.writeTo=function(e){e.writeString(2,this.sNickName)},ft.SenderInfo.prototype.readFrom=function(e){this.sNickName=e.readString(2,!1,this.sNickName)},ft.ContentFormat=function(){this.iFontColor=-1,this.iFontSize=4,this.iPopupStyle=0},ft.ContentFormat.prototype._clone=function(){return new ft.ContentFormat},ft.ContentFormat.prototype._write=function(e,t,n){e.writeStruct(t,n)},ft.ContentFormat.prototype._read=function(e,t,n){return e.readStruct(t,!0,n)},ft.ContentFormat.prototype.writeTo=function(e){e.writeInt32(0,this.iFontColor),e.writeInt32(1,this.iFontSize),e.writeInt32(2,this.iPopupStyle)},ft.ContentFormat.prototype.readFrom=function(e){this.iFontColor=e.readInt32(0,!1,this.iFontColor),this.iFontSize=e.readInt32(1,!1,this.iFontSize),this.iPopupStyle=e.readInt32(2,!1,this.iPopupStyle)};let fn=(e,t)=>{let n,r=tm(),i=new ResizeObserver(e=>{clearTimeout(n),n=setTimeout(()=>{var e;null==(e=r.value)||e.resize()},500)});return nB(()=>{i.observe(e.value),t.canvas=e.value,r.value=new fr(t)}),nN(()=>{i.unobserve(e.value),clearTimeout(n)}),r};class fr{resize(){this.canvas.width=this.canvas.getBoundingClientRect().width*window.devicePixelRatio,this.canvas.height=this.canvas.getBoundingClientRect().height*window.devicePixelRatio,this.initRows()}setOpacity(e){this.opacity=e;let t=Math.floor(2.55*e).toString(16);this.opacityStr=1==t.length?"0"+t:t}setRows(e){this.rows=e}setSpeed(e){this.speed=e}setFont(e){this.ctx.textBaseline="top",this.fontSize=e,this.font=`${e}px sans-serif`}setGap(e){this.gap=e}setColors(e){this.colors=e}clean(){this.textList=[],this.isdraw=!1}destory(){this.lines=[],this.clean()}add(e){let t=this.getLine();if(-1==t)return;let n=Math.ceil(this.ctx.measureText(e).width),r=this.canvas.width+n;this.lines[t].width=r,this.textList.push({value:e,width:n,line:t,left:this.canvas.width,color:this.colors[Math.floor(Math.random()*this.colors.length)]}),this.isdraw||(this.isdraw=!0,this.draw())}getLine(){let e=-1,t=this.lines.length;for(;++e<t;)if(this.lines[e].width==this.canvas.width)return e;return -1}initRows(){this.lines=[];let e=-1,t=this.gap+this.fontSize;for(;++e<this.rows;)this.lines.push({top:this.gap+t*e,width:this.canvas.width})}draw(){this.ctx.textBaseline="top",this.ctx.font=this.font,this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);let e=-1,t=this.textList.length,n=[];for(;++e<t;){let t=this.textList[e],r=t.left+t.width;if(r<=0)continue;this.ctx.fillStyle=t.color+this.opacityStr;let i=this.lines[t.line];i&&(this.ctx.fillText(t.value,t.left,this.lines[t.line].top),t.left-=this.speed,n.push(t),i.width=Math.max(r,this.canvas.width))}this.textList=n,0==n.length?this.isdraw=!1:requestAnimationFrame(this.draw.bind(this))}constructor(e){oK(this,"canvas",void 0),oK(this,"colors",void 0),oK(this,"ctx",void 0),oK(this,"isdraw",void 0),oK(this,"lines",void 0),oK(this,"textList",void 0),oK(this,"fontSize",void 0),oK(this,"font",void 0),oK(this,"rows",void 0),oK(this,"gap",void 0),oK(this,"speed",void 0),oK(this,"opacity",void 0),oK(this,"opacityStr",void 0),this.isdraw=!1,this.textList=[],this.canvas=e.canvas,this.ctx=this.canvas.getContext("2d"),this.speed=e.speed||2,this.setFont(e.fontSize||16),this.setGap(e.gap||8),this.setRows(e.rows||4),this.setOpacity(e.opacity||100),this.setColors(e.colors||["FFFFFF","#00FF80","#00FFFF","#FF00FF","#8000FF","#FF9933"]),this.resize()}}let fi={class:"w-full h-full flex flex-col lg:flex-row box-border md:pb-2"},fo={class:"lg:grow-5 flex flex-col"},fa={class:"flex p-2 pt-1 gap-2 text-lg md:pr-3"},fs={class:"hover:text-amber grow w-25 box-border text-center truncate text-4 md:text-5 m-0 pr-6 sm:pr-2 lg:pr-0"},fl={class:"aspect-ratio-video"},fu={class:"w-full h-full pos-absolute top-0 z-1 flex justify-center items-center text-6"},fc=["src"],ff={key:0},fd={class:"flex items-center gap-4 p-1"},fh={class:"flex items-center gap-4 p-1"},fp={key:1,class:"h-0 w-0"},fv={class:"grow min-h-50 lg:grow-0 lg:w-80 xl:w-100 flex flex-col lg:pr-0 pt-3 lg-pt-12 lg:ml-3 box-border lg:b-l-solid b lg:b-l-gray-7 lg:pl-3"},fm={class:"flex items-center line-height-none gap-4 b b-y-solid py-3 b-gray-7 px-4"},fg=["src"],fy={class:"grow-1 w-20"},f_={class:"h-4 truncate"},fb={class:"h-4 flex text-3 items-center gap-1"},fw=["src"],fx={class:"pos-absolute top-0 right-4 text-4 flex flex-col gap-3"},fk=["src"],fS=["href"],fE=["data-id","data-site","href"],fT={class:"flex items-center gap-2"},fA=["src"],fO=["onClick"],fC={class:"flex flex-col b b-solid b-gray-6 rounded-2 px-2"},fI={class:"flex justify-between items-center mx-2 py-2"},fD={class:"flex justify-between items-center b b-t-gray-6 b-t-solid mx-2 py-2"},fR={class:"flex justify-between items-center mx-2 py-2"},fP={class:"flex justify-between items-center b b-t-gray-6 b-t-solid mx-2 py-2"},fL={class:"flex justify-between items-center b b-t-gray-6 b-t-solid mx-2 py-2"},fB={class:"flex justify-between items-center b b-t-gray-6 b-t-solid mx-2 py-2"},fU={class:"flex flex-col b b-solid b-gray-6 rounded-2 px-2"},fM={class:"flex justify-between items-center mx-2 py-2"},fN={class:"flex justify-between items-center b b-t-gray-6 b-t-solid mx-2 py-2"},fF={class:"flex justify-between items-center b b-t-gray-6 b-t-solid mx-2 py-2"},fj={class:"flex justify-between items-center b b-t-gray-6 b-t-solid mx-2 py-2"},fV={class:"flex flex-wrap shadow blur bg-dark p-2 box-border b b-solid b-gray-7 rounded",style:{"box-shadow":"0 6px 15px 0 rgba(0, 0, 0, .5)"}},fG=["data-color"],fH={class:"p-3 flex justify-between items-center"},fz=nd({__name:"play",setup(e){let t,n,r,i,o,a,s,l,u=ti({qn:0,line:0,notice:null,paused:!0,muted:!1,fullscreen:!1,webscreen:!1,showController:!0,pictureInPicture:!1}),c=iP(()=>!!f.meta.site.follows[f.meta.id]),f=rl(sx),d=tm(),h=tm(),p=tm(),m=tm(),g=iP(()=>{var e,t;return m.value&&(null==(t=m.value)||null==(e=t.stream)?void 0:e.length)>0?m.value.stream.map(e=>e.name):[]}),y=iP(()=>g.value.length>0?m.value.stream[u.qn].lines.map(e=>e.name):[]),_=iP(()=>y.value.length>0?m.value.stream[u.qn].lines[u.line].url:""),b=iP(()=>aa.map(e=>Object.values(e.follows)).flat().sort(e=>e.status?-1:0)),w=iP(()=>{var e;return(null==(e=m.value)?void 0:e.siteId)=="huya"}),x=()=>{w.value&&(i=setInterval(()=>{u.flv.switchURL(_.value+at(m.value.info),!0)},1e5))};rP(_,()=>{if(clearInterval(i),!_.value)return;let e="huya"==m.value.siteId?_.value+at(m.value.info):_.value;if(u.flv){var t;return null==(t=u.flv)||t.switchURL(e,!0),x()}if(null==c7?void 0:c7.isSupported("video")){let t=new c7({media:h.value,seamlesslyReload:!0,isLive:!0,retryCount:0});return t.load(e),u.flv=t,t.on("error",()=>u.notice="播放失败"),x()}return u.notice=`播放失败`,clearTimeout(n)},void 0);let k=()=>{p.value.scrollTop=0,I=0,p.value.innerHTML=""},S=0,E=!0,T=tm(),A=fn(T,{gap:ap.canvasGap,rows:ap.canvasRows,speed:ap.canvasSpeed,opacity:ap.canvasOpacity,colors:ap.canvasColorOpen?ap.colors:["#ffffff"]}),O=[],C=(e,t)=>{var n;if(S++,ap.blockOpen&&am.value.length&&am.value.some(e=>e.test(t))||(S%(ap.sideClean||100)==0&&(p.value.innerHTML="",I=0),ap.canvasOpen&&(null==(n=A.value)||n.add(t)),!ay.value||!ap.sideOpen))return;let r=document.createElement("div"),{sideColorOpen:i,sideFontsize:o,sideGap:s,colors:l}=ap;r.style.margin=`${s}px 0`,r.style.fontSize=`${o}px`,i&&(r.style.color=l[Math.floor(Math.random()*l.length)]);let u=document.createElement("span");u.style.opacity="0.5",u.appendChild(document.createTextNode(e+":"));let c=document.createElement("span");c.appendChild(document.createTextNode(t)),r.appendChild(u),r.appendChild(c),O.push(r),a||(a=setTimeout(()=>{let e=-1,t=O.length>5?5:O.length;for(p.value.style.display="none";++e<t;)p.value.appendChild(O[e]);p.value.style.display="block",O.splice(0,5),E&&(p.value.scrollTop=p.value.scrollHeight),a=void 0},200))},I=0,D=()=>{if(p.value.scrollTop>=I)return I=p.value.scrollTop;I=p.value.scrollTop,E=!1,p.value.removeEventListener("scroll",D)},R=()=>{E=!0,p.value.scrollTop=p.value.scrollHeight,p.value.addEventListener("scroll",D,{passive:!1})},P=async()=>{if(o||!ap.canvasOpen&&!ap.sideOpen)return;let e=!0;if("huya"==m.value.siteId){o=new WebSocket("wss://cdnws.api.huya.com");let t=m.value.info;o.binaryType="arraybuffer",o.onopen=()=>{clearInterval(s),C("系统","开始连接弹幕服务器"),p.value.addEventListener("scroll",D);let e=new ft.WSRegisterGroupReq;e.vGroupId.value.push("live:"+t.uid),e.vGroupId.value.push("chat:"+t.uid);let n=new fe.JceOutputStream;e.writeTo(n);let r=new ft.WebSocketCommand;r.iCmdType=16,r.vData=n.getBinBuffer(),n=new fe.JceOutputStream,r.writeTo(n),o.send(n.getBuffer()),s=setInterval(()=>{try{let i=new ft.UserHeartBeatReq;i.lPid=t.yyuid;let a=new ft.UserId;a.sHuYaUA="webh5&2106011457&websocket",a.lUid=t.uid,i.tId=a,i.eLineType=1,i.lShortTid=0,i.bWatchVideo=!0,i.eLineType=3,i.iFps=0,i.iAttendee=0,i.iLastHeartElapseTime=0;var e=new fe.Wup;e.setServant("onlineui"),e.setFunc("OnUserHeartBeat"),e.writeStruct("tReq",i);var n=new ft.WebSocketCommand;n.iCmdType=4,n.vData=e.encode();var r=new fe.JceOutputStream;n.writeTo(r),o.send(r.getBuffer())}catch(e){}},6e4)},o.onmessage=async t=>{try{e&&(C("系统","弹幕服务器连接成功"),e=!1);var n=new Uint8Array(t.data).buffer,r=new fe.JceInputStream(n),i=new ft.WebSocketCommand;if(i.readFrom(r),7!=i.iCmdType)return;r=new fe.JceInputStream(i.vData.buf);var o=new ft.WSPushMessage;o.readFrom(r);var a=o.iUri;if(r=new fe.JceInputStream(o.sMsg.buf),1400!=a)return;var s=new ft.MessageNotice;s.readFrom(r),C(s.tUserInfo.sNickName,s.sContent)}catch(e){}},o.onerror=()=>{clearInterval(s),C("系统","弹幕服务器连接失败")},o.onclose=()=>clearInterval(s)}else"douyu"==m.value.siteId&&((o=new WebSocket("wss://danmuproxy.douyu.com:8506")).onopen=()=>{var e,t;clearInterval(s),C("系统","开始连接弹幕服务器"),p.value.addEventListener("scroll",D),o.send(B(`type@=loginreq/roomid@=${null==(e=m.value)?void 0:e.roomId}`)),o.send(B(`type@=joingroup/rid@=${null==(t=m.value)?void 0:t.roomId}/gid@=-9999`)),s=setInterval(()=>{o.send(B("type@=mrkl/"))},45e3)},o.onmessage=async t=>{let{data:n}=t;e&&(C("系统","弹幕服务器连接成功"),e=!1),(await n.text()).split(/type@=chatmsg\//).forEach(e=>{let t=e.match(/nn@=(.*)\/txt@=(.*)\/cid/);null!=t&&C(t[1],t[2])})},o.onerror=()=>{clearInterval(s),C("系统","弹幕服务器连接失败")})},L=new TextEncoder;function B(e){let t=L.encode(e),n=9+t.byteLength,r=new Uint8Array(12+(t=L.encode(e+"\0")).byteLength);return r.set([n,0,0,.1,n,0,0,0,177,2,0,0]),r.set(t,12),r.buffer}let U=()=>{clearInterval(s),o&&(o.onmessage=null,"douyu"==K?o.send(B("type@=logout")):o.close(),o=null,S=0,p.value&&J==f.fullPath&&C("系统","弹幕服务器断开连接"))};rP(m,()=>P(),void 0),rP([()=>ap.sideOpen,()=>ap.canvasOpen],()=>{ap.sideOpen||ap.canvasOpen||U(),o||P()},void 0);let M=()=>{let{site:e,id:t}=f.meta;clearInterval(i),clearInterval(s),clearTimeout(n),u.notice="加载中...",tF(()=>{C("系统","开始获取直播间信息")}),sK(e.id,"getRoomDetail",{id:t}).then(e=>{if(m.value=e,c.value&&(m.value.id=s4(e)),tF(()=>C("系统","直播间信息获取成功")),!e.status)return u.notice="未开播!";document.title=m.value.title},e=>{u.notice=e,tF(()=>C("系统","直播间信息获取失败"))}).finally(()=>clearTimeout(n))},N=()=>{m.value&&(c.value?s3(m.value):s5(m.value))},F=()=>{m.value&&m.value.status&&(clearTimeout(t),t=setTimeout(()=>{u.paused?h.value.play():h.value.pause()},200))},j=()=>{clearTimeout(t),u.fullscreen=!u.fullscreen,document.fullscreenElement?document.exitFullscreen():d.value.requestFullscreen()},V=()=>{clearTimeout(r),u.showController=!0,r=setTimeout(()=>{var e,t;(null==(e=h.value)||!e.paused)&&(null==(t=h.value)?void 0:t.played.length)&&(u.showController=!1)},3e3)},G=()=>{clearTimeout(t),u.webscreen=!u.webscreen,u.fullscreen&&(u.fullscreen=!1,document.exitFullscreen())},H=()=>{u.paused=!1,V()},z=()=>{u.paused=!0,V()},W=e=>{if(_.value)switch(e.code){case"ArrowDown":return af(!1);case"ArrowUp":return af(!0);case"Space":return F()}};M();let q=rl(sw),J=f.fullPath;nB(()=>{d.value.style.filter=100==ac.value?"":`brightness(${ac.value/100})`,h.value.volume=au.value/100,u.muted=h.value.muted,h.value.addEventListener("canplay",()=>{u.notice=null}),lJ||(d.value.addEventListener("mousemove",V),document.addEventListener("keydown",W)),document.pictureInPictureElement&&document.exitPictureInPicture(),h.value.addEventListener("leavepictureinpicture",()=>{var e;return/play/.test(f.path)?f.fullPath==J?u.pictureInPicture=!1:void(null==(e=u.flv)||e.destroy()):q.push(J)})});let K=f.meta.site.id,$=rl(s_,{}).value;$&&function(e,t,n){let r=()=>{e[t].delete(n)};nF(r),nO(r),nA(()=>{e[t].add(n)}),e[t].add(n)}($,"updateGuards",e=>{var t;let{siteid:n,id:r}=e.params,i=al.findIndex(e=>e==n);return -1==i?{name:"404"}:(e.meta.site=aa[i],e.meta.id=r,null==(t=u.flv)||t.destroy(),u.flv=void 0,u.qn=0,u.line=0,m.value=void 0,!0)}),rP(()=>f.params,()=>{var e;clearTimeout(a),U(),k(),null==(e=A.value)||e.destory(),K=f.meta.site.id,J=f.fullPath,M()},void 0),nN(()=>{var e;clearTimeout(t),clearTimeout(r),clearTimeout(n),clearTimeout(a),clearInterval(i),U(),document.title="Lemon live",document.removeEventListener("keydown",W),u.pictureInPicture||null==(e=u.flv)||e.destroy()});let Y=()=>Promise.all(o3(aa,s$)),Q=async e=>{1==e&&await Y()},X=()=>u.showController?F():V(),Z=()=>{u.pictureInPicture=!u.pictureInPicture,document.pictureInPictureElement?document.exitPictureInPicture():h.value.requestPictureInPicture()},ee=e=>{let t=e.target.dataset.color;if(!t)return;let n=ap.colors.findIndex(e=>e==t);if(-1==n)return ap.colors.push(t);1!=ap.colors.length&&ap.colors.splice(n,1)};rP(()=>ap.colors,()=>{var e;return null==(e=A.value)?void 0:e.setColors(ap.colors)},void 0),rP(()=>ap.canvasSpeed,()=>{var e;return null==(e=A.value)?void 0:e.setSpeed(ap.canvasSpeed)},void 0),rP(()=>ap.canvasOpacity,()=>{var e;return null==(e=A.value)?void 0:e.setOpacity(ap.canvasOpacity)},void 0),rP(()=>ap.canvasColorOpen,()=>{var e;return null==(e=A.value)?void 0:e.setColors(ap.canvasColorOpen?ap.colors:["#ffffff"])},void 0),rR(()=>{var e,t,n,r;null==(e=A.value)||e.setGap(ap.canvasGap),null==(t=A.value)||t.setFont(ap.canvasFontsize),null==(n=A.value)||n.setRows(ap.canvasRows),null==(r=A.value)||r.resize()}),rP(au,()=>{V(),clearTimeout(n),u.notice=`当前音量 ${au.value}%`,h.value.volume=au.value/100,o7("volume",au.value),n=setTimeout(()=>u.notice=null,2e3)},void 0),rP(ac,()=>{V(),clearTimeout(n),u.notice=`当前亮度 ${ac.value}%`,d.value.style.filter=100==ac.value?"":`brightness(${ac.value/100})`,o7("brightness",ac.value),n=setTimeout(()=>u.notice=null,2e3)},void 0);let et=tm(),en=e=>{clearTimeout(l),l=setTimeout(()=>{let t=eo("id",e.target,et.value);if(!t)return;let n=eo("site",e.target,et.value);q.push(`/${n}/play/${t}`)},300)},er=e=>{var t;clearTimeout(l);let n=eo("id",e.target,et.value);if(!n)return;let r=eo("site",e.target,et.value),i=`/${r}/play/${n}`;null==(t=window.open(i,"_blank"))||t.location},eo=(e,t,n)=>{if(t==n)return null;let r=t.dataset[e];return r||eo(e,t.parentElement,n)},ea=()=>ac.value=100;rP(()=>u.muted,()=>{V(),clearTimeout(n),u.notice=u.muted?"已静音":"已开启声音",n=setTimeout(()=>u.notice=null,2e3)},void 0);let es=()=>{if(h.value.muted){h.value.muted=!1,u.muted=!1;return}h.value.muted=!0,u.muted=!0};return(e,t)=>{var n,r,i,o,a,s;return r2(),r6("div",fi,[ii("div",fo,[ii("div",fa,[ii("div",{onClick:t[0]||(t[0]=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.$router.back&&e.$router.back(...n)}),class:"i-ri-arrow-left-line hover:text-amber"}),ii("h1",fs,ef(null==(n=t_(m))?void 0:n.title),1),ii("div",{onClick:t[1]||(t[1]=e=>ay.value=!t_(ay)),style:ei(t_(ay)?"transform:rotate(180deg)":"margin-right:1.5rem"),class:"i-ri-arrow-right-s-fill hidden lg:block"},null,4)]),ii("div",{ref_key:"player",ref:d,class:el(["md:rounded-6px text-4 text-white bg-black cursor-default pos-relative w-full overflow-hidden select-none h-full",{"cursor-none":!t_(u).showController,"text-5":t_(u).fullscreen,"text-5 !pos-fixed left-0 right-0 top-0 bottom-0 z-10 ":t_(u).webscreen}]),onContextmenu:t[19]||(t[19]=ok(()=>{},["prevent"])),onClick:X,onDblclick:j},[ii("div",fl,[ii("video",{playsinline:"","webkit-playsinline":"","x5-video-player-type":"h5",autoplay:"",ref_key:"video",ref:h,class:"w-full h-full pos-absolute",onPlay:H,onPause:z},null,544)]),tQ(ii("div",fu,[ii("span",null,ef(t_(u).notice),1)],512),[[i3,t_(u).notice]]),ii("canvas",{ref_key:"canvas",ref:T,width:"0",height:"0",class:"w-full h-full z-1 pos-absolute top-0"},null,512),tQ(ii("div",{class:el(["pos-absolute bottom-0 left-0 right-0 px-4 py-2 gap-3 z-20 flex items-center bg-black bg-op-30",{"py-3":t_(u).fullscreen||t_(u).webscreen}]),onClick:t[5]||(t[5]=ok(()=>{},["stop"])),onDblclick:t[6]||(t[6]=ok(()=>{},["stop"]))},[ii("div",{onClick:F,class:el(["hover:text-amber",t_(u).paused?"i-ri-play-large-fill":"i-ri-pause-large-fill"])},null,2),ii("div",{onClick:N,class:el(["hover:text-amber",t_(c)?"i-ri-heart-fill":"i-ri-heart-line"])},null,2),ii("div",{onClick:M,class:"i-ri-refresh-line hover:text-amber"}),ii("img",{class:"w-1.5em cursor-pointer",onClick:t[2]||(t[2]=()=>t_(ap).canvasOpen=!t_(ap).canvasOpen),src:t_(ap).canvasOpen?t_(ar):t_(ai)},null,8,fc),t[33]||(t[33]=ii("div",{class:"grow"},null,-1)),t_(g).length?(r2(),r6("div",ff,[io(l0,{active:t_(u).qn,"onUpdate:active":t[3]||(t[3]=e=>t_(u).qn=e),list:t_(g)},null,8,["active","list"]),io(l0,{active:t_(u).line,"onUpdate:active":t[4]||(t[4]=e=>t_(u).line=e),list:t_(y)},null,8,["active","list"]),t_(lJ)?iu("",!0):(r2(),r6("div",{key:0,class:el(["hover:text-amber ml-2",t_(u).pictureInPicture?"i-ri-picture-in-picture-exit-line":"i-ri-picture-in-picture-2-line"]),onClick:Z},null,2))])):iu("",!0),ii("div",{onClick:G,class:"i-mdi-fit-to-screen hover:text-amber"}),ii("div",{onClick:j,class:el(["hover:text-amber",t_(u).fullscreen?"i-ri-fullscreen-exit-fill":"i-ri-fullscreen-fill"])},null,2)],34),[[i3,t_(u).showController]]),t_(lJ)?tQ((r2(),r6("div",{key:0,class:el([{"py-3":t_(u).fullscreen||t_(u).webscreen},"pos-absolute top-0 left-0 right-0 px-4 py-2 gap-3 z-20 flex justify-between bg-black bg-op-30"]),onClick:t[11]||(t[11]=ok(()=>{},["stop"])),onDblclick:t[12]||(t[12]=ok(()=>{},["stop"]))},[ii("div",fd,[ii("div",{onClick:t[7]||(t[7]=e=>t_(ad)(!1)),class:"i-ri-sun-line"}),ii("div",null,ef(t_(ac)),1),ii("div",{onClick:t[8]||(t[8]=e=>t_(ad)(!0)),class:"i-ri-sun-fill"})]),tQ(ii("div",{class:"flex-1 w-10 truncate text-center"},ef(null==(r=t_(m))?void 0:r.title),513),[[i3,t_(u).fullscreen]]),ii("div",fh,[ii("div",{onClick:t[9]||(t[9]=e=>t_(af)(!1)),class:"i-ri-volume-down-fill"}),ii("div",null,ef(t_(au)),1),ii("div",{onClick:t[10]||(t[10]=e=>t_(af)(!0)),class:"i-ri-volume-up-fill"})])],34)),[[i3,t_(u).showController]]):tQ((r2(),r6("div",fp,[ii("div",{onClick:t[14]||(t[14]=ok(()=>{},["stop"])),onDblclick:t[15]||(t[15]=ok(()=>{},["stop"])),class:"top-50% left-4 flex items-center flex-col pos-absolute z-20",style:{transform:"translateY(-50%)"}},[ii("div",null,ef(t_(ac)),1),io(l$,{value:t_(ac),"onUpdate:value":t[13]||(t[13]=e=>tv(ac)?ac.value=e:null),max:200,min:50},null,8,["value"]),ii("div",{onClick:ok(ea,["stop"]),class:"i-ri-sun-line"})],32),ii("div",{onClick:t[17]||(t[17]=ok(()=>{},["stop"])),onDblclick:t[18]||(t[18]=ok(()=>{},["stop"])),class:"top-50% right-4 flex items-center flex-col pos-absolute z-20",style:{transform:"translateY(-50%)"}},[il(ef(t_(au))+" ",1),io(l$,{value:t_(au),"onUpdate:value":t[16]||(t[16]=e=>tv(au)?au.value=e:null),max:100,min:0},null,8,["value"]),ii("div",{onClick:ok(es,["stop"]),class:el(t_(u).muted?"i-ri-volume-mute-line":"i-ri-volume-down-line")},null,2)],32)],512)),[[i3,t_(u).showController]])],34)]),tQ(ii("div",fv,[ii("div",fm,[ii("img",{src:null==(i=t_(m))?void 0:i.avatar,alt:"",class:"w-8 h-8 rounded-4"},null,8,fg),ii("div",fy,[ii("div",f_,ef(null==(o=t_(m))?void 0:o.nickname),1),ii("div",fb,[ii("img",{class:"w-4 h-4",src:e.$route.meta.site.icon},null,8,fw),il(" "+ef(e.$route.meta.site.name)+" "+ef(null==(a=t_(m))?void 0:a.category),1)])]),ii("div",null,[t[34]||(t[34]=ii("div",{class:"i-mdi-fire mx-1"},null,-1)),ii("span",null,ef(null==(s=t_(m))?void 0:s.online),1)])]),io(lk,{grow:!0,onTabClick:Q,class:"!h-[calc(100%-3.75rem)]"},{default:tY(()=>[io(lO,{title:"聊天",class:"pos-relative"},{default:tY(()=>{var e;return[ii("div",fx,[ii("img",{onClick:t[20]||(t[20]=()=>t_(ap).sideOpen=!t_(ap).sideOpen),class:"w-1.5em cursor-pointer",src:t_(ap).sideOpen?t_(ar):t_(ai)},null,8,fk),ii("div",{onClick:k,class:"i-ri-delete-bin-3-line text-green-5"}),ii("a",{class:"text-green-5",href:null==(e=t_(m))?void 0:e.url,target:"_blank"},t[35]||(t[35]=[ii("div",{class:"i-ri-link"},null,-1)]),8,fS),ii("div",{onClick:R,class:"i-ri-arrow-down-circle-line text-green-5"})]),ii("div",{ref_key:"dm",ref:p,class:"scrolly h-full pl-2 box-border"},null,512)]}),_:1}),io(lO,{title:"关注",class:"box-border px-4"},{default:tY(()=>[ii("div",{onClick:ok(en,["prevent"]),onDblclick:ok(er,["prevent"])},[(r2(!0),r6(rY,null,nY(t_(b),e=>{var t,n;return r2(),r6("a",{"data-id":e.roomId,"data-site":e.siteId,class:el([{"text-amber":(null==(t=t_(m))?void 0:t.siteId)==e.siteId&&(null==(n=t_(m))?void 0:n.roomId)==e.roomId},"flex items-center justify-between gap-2 py-2"]),key:`${e.siteId}/${e.roomId}`,href:`/${e.siteId}/play/${e.roomId}`},[ii("div",fT,[ii("img",{class:"w-5 h-5 rounded-5",src:e.avatar,alt:""},null,8,fA),ii("div",null,ef(t_(ao)[e.siteId]),1),ii("div",null,ef(e.nickname),1),ii("div",{class:el(["inline-block w-3 h-3 rounded-3",[e.status?"bg-amber":"bg-red"]])},null,2),ii("div",null,ef(e.status?"直播中":"未开播"),1)]),ii("div",{class:"i-mdi-heart-off-outline pos-relative w-6 h-6 hover:text-amber",onClick:t=>{t.stopPropagation(),t.preventDefault(),s3(e)}},null,8,fO)],10,fE)}),128))],32)]),_:1}),io(lO,{title:"设置",class:"px-2"},{default:tY(()=>[t[47]||(t[47]=ii("div",{class:"p-3"},"弹幕",-1)),ii("div",fC,[ii("div",fI,[t[36]||(t[36]=ii("div",null,"文字大小",-1)),io(lq,{value:t_(ap).canvasFontsize,"onUpdate:value":t[21]||(t[21]=e=>t_(ap).canvasFontsize=e),max:80,min:8,step:1},null,8,["value"])]),ii("div",fD,[t[37]||(t[37]=ii("div",null,"上下间隔",-1)),io(lq,{value:t_(ap).canvasGap,"onUpdate:value":t[22]||(t[22]=e=>t_(ap).canvasGap=e),max:80,min:1,step:1},null,8,["value"])]),ii("div",fR,[t[38]||(t[38]=ii("div",null,"最大行数",-1)),io(lq,{value:t_(ap).canvasRows,"onUpdate:value":t[23]||(t[23]=e=>t_(ap).canvasRows=e),max:50,min:1,step:1},null,8,["value"])]),ii("div",fP,[t[39]||(t[39]=ii("div",null,"弹幕速度",-1)),io(lq,{value:t_(ap).canvasSpeed,"onUpdate:value":t[24]||(t[24]=e=>t_(ap).canvasSpeed=e),max:32,min:.5,step:.5},null,8,["value"])]),ii("div",fL,[t[40]||(t[40]=ii("div",null,"弹幕透明",-1)),io(lq,{value:t_(ap).canvasOpacity,"onUpdate:value":t[25]||(t[25]=e=>t_(ap).canvasOpacity=e),max:100,min:10,step:10},null,8,["value"])]),ii("div",fB,[t[41]||(t[41]=ii("div",null,"彩色弹幕",-1)),io(lz,{value:t_(ap).canvasColorOpen,"onUpdate:value":t[26]||(t[26]=e=>t_(ap).canvasColorOpen=e)},null,8,["value"])])]),t[48]||(t[48]=ii("div",{class:"p-3"},"聊天",-1)),ii("div",fU,[ii("div",fM,[t[42]||(t[42]=ii("div",null,"文字大小",-1)),io(lq,{value:t_(ap).sideFontsize,"onUpdate:value":t[27]||(t[27]=e=>t_(ap).sideFontsize=e),max:80,min:8,step:1},null,8,["value"])]),ii("div",fN,[t[43]||(t[43]=ii("div",null,"上下间隔",-1)),io(lq,{value:t_(ap).sideGap,"onUpdate:value":t[28]||(t[28]=e=>t_(ap).sideGap=e),max:80,min:0,step:1},null,8,["value"])]),ii("div",fF,[t[44]||(t[44]=ii("div",null,"自动清屏",-1)),io(lq,{value:t_(ap).sideClean,"onUpdate:value":t[29]||(t[29]=e=>t_(ap).sideClean=e),max:500,min:10,step:10},null,8,["value"])]),ii("div",fj,[t[45]||(t[45]=ii("div",null,"彩色消息",-1)),io(lz,{value:t_(ap).sideColorOpen,"onUpdate:value":t[30]||(t[30]=e=>t_(ap).sideColorOpen=e)},null,8,["value"])])]),t[49]||(t[49]=ii("div",{class:"p-3"},"颜色",-1)),ii("div",fV,[(r2(!0),r6(rY,null,nY(t_(av),e=>(r2(),r6("div",{onClick:ee},[ii("div",{class:"w-4 h-4 rounded-2 m-2 shadow cursor-pointer box-border","data-color":e,style:ei(`background:${e};${t_(ap).colors.includes(e)?"box-shadow:0 0 0px 2px white":""}`)},null,12,fG)]))),256))]),ii("div",fH,[t[46]||(t[46]=il("屏蔽 ")),io(lz,{value:t_(ap).blockOpen,"onUpdate:value":t[31]||(t[31]=e=>t_(ap).blockOpen=e)},null,8,["value"])]),tQ(ii("textarea",{class:"outline-none w-full text-white b b-solid b-gray-7 p-2 box-border bg-dark shadow rounded-1","onUpdate:modelValue":t[32]||(t[32]=e=>t_(ap).blockWords=e),rows:"5",placeholder:"以空格分隔"},null,512),[[ob,t_(ap).blockWords,void 0,{trim:!0}]])]),_:1})]),_:1})],512),[[i3,t_(ay)]])])}}}),fW={class:"w-full box-border mx-auto md:w-80% max-w-2xl text-3 p-4 pos-relative"},fq={class:"flex gap-4 justify-between items-center p-4 md:p-6 b-1px b-solid b-gray-7 rounded-2"},fJ={class:"py-2 text-4"},fK={class:"flex gap-2 text-3"},f$={class:"p-4 md:p-6 b-1px b-solid b-gray-7 rounded-2 my-4"},fY={class:"text-center text-4"},fQ={class:"pos-relative w-full mt-6"},fX={class:"pos-relative w-full mt-4 mb-6"},fZ={class:"pos-relative w-full mt-4 mb-6"},f0={class:"p-4 md:p-6 b-1px b-solid b-gray-7 rounded-2 my-4"},f1=["onClick"],f2={class:"p-4 md:p-6 b-1px b-solid b-gray-7 rounded-2 my-4"},f5={class:"flex justify-between items-center mt-2 gap-3"},f4={class:"pos-relative flex-1"},f3={class:"my-5 line-height-loose"},f8={class:"text-rose mx-2"},f6={class:"text-rose mx-2"},f9={class:"flex justify-evenly"},f7=nd({__name:"user",setup(e){let t=rl(sw),n=tm("hide"),r=ti({username:"",password:"",newpassword:""}),i=tm(),o=/^[\u4e00-\u9fa5a-zA-Z0-9]{1,12}$/,a=/^.{0,15}$/,s=async()=>{if("hide"!=n.value){if(!o.test(r.username))return ae.warning("账号1到12个字符!");if(!a.test(r.password))return ae.warning("密码0到15个字符!");"sign"==n.value?await s0(r):await sZ(r),l()}},l=()=>{r.username="",r.newpassword="",r.password="",n.value="hide"},u=()=>{n.value="hide",r.password="",r.username=""},c=()=>{l(),i.value=null,sX(aw.token)},f=()=>{null!=i.value&&sX(i.value.token).finally(()=>i.value=null)},d=tm(""),h=iP(()=>d.value.match(/(huya|douyu|bilibili)\.com\/([a-zA-Z0-9]*)$/)),p=()=>{if(null==h.value)return ae.info("链接错误");t.push(`/${h.value[1]}/play/${h.value[2]}`)},m=async()=>null==h.value?ae.info("链接错误"):s5((await sK(h.value[1],"getLiveStatus",{id:h.value[2]}))[h.value[2]]);return(e,t)=>{var o,a;return r2(),r6("div",fW,[ii("div",fq,[ii("div",fJ,ef(t_(aw).user.username||"未登录"),1),ii("div",fK,[tQ(ii("div",{onClick:t[0]||(t[0]=e=>n.value="sign"),class:"cursor-pointer text-black bg-green hover:bg-green-7 py-2 px-2 md:px-4 rounded-6"},"登录 / 注册",512),[[i3,"hide"==t_(n)&&!t_(ax)]]),tQ(ii("div",{onClick:t[1]||(t[1]=e=>n.value="reset"),class:"cursor-pointer text-black bg-green hover:bg-green-7 py-2 px-2 md:px-4 rounded-6"}," 修改密码 ",512),[[i3,"hide"==t_(n)&&t_(ax)]]),tQ(ii("div",{onClick:c,class:"cursor-pointer text-black bg-green hover:bg-green-7 py-2 px-2 md:px-4 rounded-6"},"退出登录",512),[[i3,t_(ax)]]),tQ(ii("div",{onClick:t[2]||(t[2]=()=>t_(s2)(!0)),class:"cursor-pointer text-black bg-green hover:bg-green-7 py-2 px-2 md:px-4 rounded-6"},"立即同步",512),[[i3,t_(ax)]])])]),io(iW,null,{default:tY(()=>[tQ(ii("div",f$,[ii("div",fY,ef("sign"==t_(n)?"登录 / 注册":"修改密码"),1),ii("div",fQ,[tQ(ii("input",{class:"md:text-4 box-border w-full py-3 px-12 focus:b-green text-white bg-transparent b-1 b-style-groove b-gray-7 rounded-6 outline-none",type:"text","onUpdate:modelValue":t[3]||(t[3]=e=>t_(r).username=e),placeholder:"请输入账号"},null,512),[[ob,t_(r).username,void 0,{trim:!0}]]),t[10]||(t[10]=ii("div",{class:"i-ri-user-smile-line pos-absolute left-4 top-2 bg-gray"},null,-1))]),ii("div",fX,[tQ(ii("input",{class:"md:text-4 box-border w-full py-3 px-12 text-white bg-transparent b-1 b-style-groove focus:b-green b-gray-7 rounded-6 outline-none",type:"text","onUpdate:modelValue":t[4]||(t[4]=e=>t_(r).password=e),placeholder:"请输入密码"},null,512),[[ob,t_(r).password,void 0,{trim:!0}]]),t[11]||(t[11]=ii("div",{class:"i-ri-lock-password-line pos-absolute left-4 top-2 bg-gray"},null,-1))]),tQ(ii("div",fZ,[tQ(ii("input",{class:"md:text-4 box-border w-full py-3 px-12 text-white bg-transparent b-1 b-style-groove focus:b-green b-gray-7 rounded-6 outline-none",type:"text","onUpdate:modelValue":t[5]||(t[5]=e=>t_(r).newpassword=e),placeholder:"请输入新密码"},null,512),[[ob,t_(r).newpassword,void 0,{trim:!0}]]),t[12]||(t[12]=ii("div",{class:"i-ri-lock-password-line pos-absolute left-4 top-2 bg-gray"},null,-1))],512),[[i3,"reset"==t_(n)]]),ii("div",{class:"flex w-full justify-evenly"},[ii("div",{onClick:u,class:"cursor-pointer flex gap-2 text-black bg-gray-5 hover:bg-gray-7 py-3 px-8 rounded-6"},"取消"),ii("div",{onClick:s,class:"cursor-pointer flex gap-2 text-black bg-green-5 hover:bg-green-7 py-3 px-8 rounded-6"},"确定")])],512),[[i3,"hide"!=t_(n)]])]),_:1}),io(iW,null,{default:tY(()=>[tQ(ii("div",f0,[t[13]||(t[13]=ii("div",{class:"text-3 md:text-4 mb-3"},"登录设备",-1)),(r2(!0),r6(rY,null,nY(t_(aw).user.token,e=>(r2(),r6("div",{onClick:t=>i.value=e,class:el([{"c-green":e.token==t_(aw).token},"flex cursor-pointer py-3 my-3 rounded-6 hover:op-80 gap-3 justify-between items-center"])},[ii("div",null,ef(e.agent),1),ii("div",null,ef(e.domain),1),ii("div",null,ef(e.time),1)],10,f1))),256))],512),[[i3,t_(ax)||!0]])]),_:1}),ii("div",f2,[t[14]||(t[14]=ii("div",{class:"text-3 md:text-4 mb-3"},"链接解析",-1)),ii("div",f5,[ii("div",f4,[tQ(ii("input",{class:"md:text-4 box-border w-full py-3 px-6 text-white bg-transparent b-1 b-style-groove focus:b-green b-gray-7 rounded-6 outline-none",type:"text","onUpdate:modelValue":t[6]||(t[6]=e=>tv(d)?d.value=e:null),placeholder:"请输入官方链接"},null,512),[[ob,t_(d),void 0,{trim:!0}]])]),ii("div",{class:"flex gap-2"},[ii("div",{onClick:m,class:"flex-1 cursor-pointer text-black bg-green hover:bg-green-7 h-full py-3 px-5 md:px-6 rounded-6"}," 关注"),ii("div",{onClick:p,class:"flex-1 cursor-pointer text-black bg-green hover:bg-green-7 py-3 px-5 md:px-6 rounded-6"}," 跳转 ")])])]),(r2(),r9(t8,{to:"body"},[tQ(ii("div",{class:el(["pos-absolute left-0 top-0 right-0 bottom-0 flex justify-center items-center",{"md:ml-17.5":t_(a_)}]),onClick:t[9]||(t[9]=e=>i.value=null)},[ii("div",{class:"p-4 py-6 md:p-6 max-w-80% box-border bg-gray-7 rounded-2 text-3",onClick:t[8]||(t[8]=ok(()=>{},["stop"]))},[t[17]||(t[17]=ii("div",{class:"text-4"},"退出登录",-1)),ii("div",f3,[t[15]||(t[15]=il(" 确定要登出 ")),ii("span",f8,ef(null==(o=t_(i))?void 0:o.domain),1),ii("span",f6,ef(null==(a=t_(i))?void 0:a.agent),1),t[16]||(t[16]=il(" 吗? "))]),ii("div",f9,[ii("div",{onClick:t[7]||(t[7]=e=>i.value=null),class:"cursor-pointer text-black bg-gray-4 hover:op-50 py-2 px-5 rounded-6"},"取消 "),ii("div",{onClick:f,class:"cursor-pointer text-black bg-green hover:op-50 py-2 px-5 rounded-6"},"确定")])])],2),[[i3,t_(i)]])]))])}}}),de={class:"h-full flex justify-center items-center"},dt=(0,o5.default)({},[["render",function(e,t){return r2(),r6("div",de,t[0]||(t[0]=[ii("div",{class:"text-center text-8 line-height-8"},[ii("div",{class:"font-900"},"404"),ii("div",{class:"mt-4"},"页面未找到")],-1)]))}]]);async function dn(e){let{siteid:t,id:n}=e.params,r=aa.findIndex(e=>e.id==t);return -1==r?{name:"404"}:(e.meta.site=aa[r],e.meta.id=n,e.meta.index=r,ag.value=r,!0)}let dr=function(e){let t,n,r,i=function(e,t){let n=[],r=new Map;function i(e,a,s){let l,u,c=!s,f=sh(e);f.aliasOf=s&&s.record;let d=sv(t,e),h=[f];if("alias"in e)for(let t of"string"==typeof e.alias?[e.alias]:e.alias)h.push(sh(aA({},f,{components:s?s.record.components:f.components,path:t,aliasOf:s?s.record:f})));for(let t of h){let{path:h}=t;if(a&&"/"!==h[0]){let e=a.record.path,n="/"===e[e.length-1]?"":"/";t.path=a.record.path+(h&&n+h)}if(l=function(e,t,n){let r=function(e,t){let n=aA({},sa,t),r=[],i=n.start?"^":"",o=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+="/");for(let r=0;r<t.length;r++){let a=t[r],s=40+.25*!!n.sensitive;if(0===a.type)r||(i+="/"),i+=a.value.replace(ss,"\\$&"),s+=40;else if(1===a.type){let{value:e,repeatable:n,optional:l,regexp:u}=a;o.push({name:e,repeatable:n,optional:l});let c=u||so;if(c!==so){s+=10;try{RegExp(`(${c})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${c}): `+t.message)}}let f=n?`((?:${c})(?:/(?:${c}))*)`:`(${c})`;r||(f=l&&t.length<2?`(?:/${f})`:"/"+f),l&&(f+="?"),i+=f,s+=20,l&&(s+=-8),n&&(s+=-20),".*"===c&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&!i.endsWith("/")&&(i+="(?:/|$)");let a=new RegExp(i,n.sensitive?"":"i");return{re:a,score:r,keys:o,parse:function(e){let t=e.match(a),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||"",i=o[e-1];n[i.name]=r&&i.repeatable?r.split("/"):r}return n},stringify:function(t){let n="",r=!1;for(let i of e)for(let e of(r&&n.endsWith("/")||(n+="/"),r=!1,i))if(0===e.type)n+=e.value;else if(1===e.type){let{value:o,repeatable:a,optional:s}=e,l=o in t?t[o]:"";if(aI(l)&&!a)throw Error(`Provided param "${o}" is an array but it is not repeatable (* or + modifiers)`);let u=aI(l)?l.join("/"):l;if(!u)if(s)i.length<2&&(n.endsWith("/")?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${o}"`);n+=u}return n||"/"}}}(function(e){let t,n;if(!e)return[[]];if("/"===e)return[[sc]];if(!e.startsWith("/"))throw Error(`Invalid path "${e}"`);function r(e){throw Error(`ERR (${i})/"${u}": ${e}`)}let i=0,o=0,a=[];function s(){t&&a.push(t),t=[]}let l=0,u="",c="";function f(){u&&(0===i?t.push({type:0,value:u}):1===i||2===i||3===i?(t.length>1&&("*"===n||"+"===n)&&r(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),t.push({type:1,value:u,regexp:c,repeatable:"*"===n||"+"===n,optional:"*"===n||"?"===n})):r("Invalid state to consume buffer"),u="")}for(;l<e.length;){if("\\"===(n=e[l++])&&2!==i){o=i,i=4;continue}switch(i){case 0:"/"===n?(u&&f(),s()):":"===n?(f(),i=1):u+=n;break;case 4:u+=n,i=o;break;case 1:"("===n?i=2:sf.test(n)?u+=n:(f(),i=0,"*"!==n&&"?"!==n&&"+"!==n&&l--);break;case 2:")"===n?"\\"==c[c.length-1]?c=c.slice(0,-1)+n:i=3:c+=n;break;case 3:f(),i=0,"*"!==n&&"?"!==n&&"+"!==n&&l--,c="";break;default:r("Unknown state")}}return 2===i&&r(`Unfinished custom RegExp for param "${u}"`),f(),s(),a}(e.path),n),i=aA(r,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}(t,a,d),s?s.alias.push(l):((u=u||l)!==l&&u.alias.push(l),c&&e.name&&!sp(l)&&o(e.name)),sm(l)&&function(e){let t=function(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;0>sl(e,t[i])?r=i:n=i+1}let i=function(e){let t=e;for(;t=t.parent;)if(sm(t)&&0===sl(e,t))return t}(e);return i&&(r=t.lastIndexOf(i,r-1)),r}(e,n);n.splice(t,0,e),e.record.name&&!sp(e)&&r.set(e.record.name,e)}(l),f.children){let e=f.children;for(let t=0;t<e.length;t++)i(e[t],l,s&&s.children[t])}s=s||l}return u?()=>{o(u)}:aC}function o(e){if(st(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}return t=sv({strict:!1,end:!0,sensitive:!1},t),e.forEach(e=>i(e)),{addRoute:i,resolve:function(e,t){let i,o,a,s={};if("name"in e&&e.name){if(!(i=r.get(e.name)))throw sr(1,{location:e});a=i.record.name,s=aA(sd(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&sd(e.params,i.keys.map(e=>e.name))),o=i.stringify(s)}else if(null!=e.path)o=e.path,(i=n.find(e=>e.re.test(o)))&&(s=i.parse(o),a=i.record.name);else{if(!(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path))))throw sr(1,{location:e,currentLocation:t});a=i.record.name,s=aA({},t.params,e.params),o=i.stringify(s)}let l=[],u=i;for(;u;)l.unshift(u.record),u=u.parent;return{name:a,path:o,params:s,matched:l,meta:l.reduce((e,t)=>aA(e,t.meta),{})}},removeRoute:o,clearRoutes:function(){n.length=0,r.clear()},getRoutes:function(){return n},getRecordMatcher:function(e){return r.get(e)}}}(e.routes,e),o=e.parseQuery||sg,a=e.stringifyQuery||sy,s=e.history,l=sS(),u=sS(),c=sS(),f=tg(a2,!0),d=a2;aE&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");let h=aO.bind(null,e=>""+e),p=aO.bind(null,aJ),m=aO.bind(null,aK);function g(e,t){let n;if(t=aA({},t||f.value),"string"==typeof e){let n=aQ(o,e,t.path),r=i.resolve({path:n.path},t),a=s.createHref(n.fullPath);return aA(n,r,{params:m(r.params),hash:aK(n.hash),redirectedFrom:void 0,href:a})}if(null!=e.path)n=aA({},e,{path:aQ(o,e.path,t.path).path});else{let r=aA({},e.params);for(let e in r)null==r[e]&&delete r[e];n=aA({},e,{params:p(r)}),t.params=p(t.params)}let r=i.resolve(n,t),l=e.hash||"";r.params=h(m(r.params));let u=function(e,t){let n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(a,aA({},e,{hash:aW(l).replace(aV,"{").replace(aH,"}").replace(aF,"^"),path:r.path})),c=s.createHref(u);return aA({fullPath:u,hash:l,query:a===sy?function(e){let t={};for(let n in e){let r=e[n];void 0!==r&&(t[n]=aI(r)?r.map(e=>null==e?null:""+e):null==r?r:""+r)}return t}(e.query):e.query||{}},r,{redirectedFrom:void 0,href:c})}function y(e){return"string"==typeof e?aQ(o,e,f.value.path):aA({},e)}function _(e,t){if(d!==e)return sr(8,{from:t,to:e})}function b(e){let t=e.matched[e.matched.length-1];if(t&&t.redirect){let{redirect:n}=t,r="function"==typeof n?n(e):n;return"string"==typeof r&&((r=r.includes("?")||r.includes("#")?r=y(r):{path:r}).params={}),aA({query:e.query,hash:e.hash,params:null!=r.path?{}:e.params},r)}}function w(e,t){let n,r=d=g(e),i=f.value,o=e.state,s=e.force,l=!0===e.replace,u=b(r);return u?w(aA(y(u),{state:"object"==typeof u?aA({},o,u.state):o,force:s,replace:l}),t||r):(r.redirectedFrom=t,!s&&function(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&aZ(t.matched[r],n.matched[i])&&a0(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(a,i,r)&&(n=sr(16,{to:r,from:i}),D(i,i,!0,!1)),(n?Promise.resolve(n):S(r,i)).catch(e=>si(e)?si(e,2)?e:I(e):C(e,r,i)).then(e=>{if(e){if(si(e,2))return w(aA({replace:l},y(e.to),{state:"object"==typeof e.to?aA({},o,e.to.state):o,force:s}),t||r)}else e=T(r,i,!0,l,o);return E(r,i,e),e}))}function x(e,t){let n=_(e,t);return n?Promise.reject(n):Promise.resolve()}function k(e){let t=P.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function S(e,t){let n,[r,i,o]=function(e,t){let n=[],r=[],i=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;a<o;a++){let o=t.matched[a];o&&(e.matched.find(e=>aZ(e,o))?r.push(o):n.push(o));let s=e.matched[a];s&&!t.matched.find(e=>aZ(e,s))&&i.push(s)}return[n,r,i]}(e,t);for(let i of(n=sT(r.reverse(),"beforeRouteLeave",e,t),r))i.leaveGuards.forEach(r=>{n.push(sE(r,e,t))});let a=x.bind(null,e,t);return n.push(a),B(n).then(()=>{for(let r of(n=[],l.list()))n.push(sE(r,e,t));return n.push(a),B(n)}).then(()=>{for(let r of(n=sT(i,"beforeRouteUpdate",e,t),i))r.updateGuards.forEach(r=>{n.push(sE(r,e,t))});return n.push(a),B(n)}).then(()=>{for(let r of(n=[],o))if(r.beforeEnter)if(aI(r.beforeEnter))for(let i of r.beforeEnter)n.push(sE(i,e,t));else n.push(sE(r.beforeEnter,e,t));return n.push(a),B(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),(n=sT(o,"beforeRouteEnter",e,t,k)).push(a),B(n))).then(()=>{for(let r of(n=[],u.list()))n.push(sE(r,e,t));return n.push(a),B(n)}).catch(e=>si(e,8)?e:Promise.reject(e))}function E(e,t,n){c.list().forEach(r=>k(()=>r(e,t,n)))}function T(e,t,n,r,i){let o=_(e,t);if(o)return o;let a=t===a2,l=aE?history.state:{};n&&(r||a?s.replace(e.fullPath,aA({scroll:a&&l&&l.scroll},i)):s.push(e.fullPath,i)),f.value=e,D(e,t,n,a),I()}let A=sS(),O=sS();function C(e,t,n){I(e);let r=O.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function I(e){return n||(n=!e,t||(t=s.listen((e,t,n)=>{var r,i;if(!L.listening)return;let o=g(e),a=b(o);if(a)return void w(aA(a,{replace:!0,force:!0}),o).catch(aC);d=o;let l=f.value;aE&&(r=a8(l.fullPath,n.delta),i=a3(),a6.set(r,i)),S(o,l).catch(e=>si(e,12)?e:si(e,2)?(w(aA(y(e.to),{force:!0}),o).then(e=>{si(e,20)&&!n.delta&&n.type===oZ.pop&&s.go(-1,!1)}).catch(aC),Promise.reject()):(n.delta&&s.go(-n.delta,!1),C(e,o,l))).then(e=>{(e=e||T(o,l,!1))&&(n.delta&&!si(e,8)?s.go(-n.delta,!1):n.type===oZ.pop&&si(e,20)&&s.go(-1,!1)),E(o,l,e)}).catch(aC)})),A.list().forEach(([t,n])=>e?n(e):t()),A.reset()),e}function D(t,n,r,i){let{scrollBehavior:o}=e;if(!aE||!o)return Promise.resolve();let a=!r&&function(e){let t=a6.get(e);return a6.delete(e),t}(a8(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return tF().then(()=>o(t,n,a)).then(e=>e&&function(e){let t;if("el"in e){let n=e.el,r="string"==typeof n&&n.startsWith("#"),i="string"==typeof n?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=function(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}(e)).catch(e=>C(e,t,n))}let R=e=>s.go(e),P=new Set,L={currentRoute:f,listening:!0,addRoute:function(e,t){let n,r;return st(e)?(n=i.getRecordMatcher(e),r=t):r=e,i.addRoute(r,n)},removeRoute:function(e){let t=i.getRecordMatcher(e);t&&i.removeRoute(t)},clearRoutes:i.clearRoutes,hasRoute:function(e){return!!i.getRecordMatcher(e)},getRoutes:function(){return i.getRoutes().map(e=>e.record)},resolve:g,options:e,push:function(e){return w(e)},replace:function(e){return w(aA(y(e),{replace:!0}))},go:R,back:()=>R(-1),forward:()=>R(1),beforeEach:l.add,beforeResolve:u.add,afterEach:c.add,onError:O.add,isReady:function(){return n&&f.value!==a2?Promise.resolve():new Promise((e,t)=>{A.add([e,t])})},install(e){e.component("RouterLink",sO),e.component("RouterView",sD),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>t_(f)}),aE&&!r&&f.value===a2&&(r=!0,w(s.location).catch(e=>{}));let i={};for(let e in a2)Object.defineProperty(i,e,{get:()=>f.value[e],enumerable:!0});e.provide(sw,this),e.provide(sx,to(i)),e.provide(sk,f);let o=e.unmount;P.add(e),e.unmount=function(){P.delete(e),P.size<1&&(d=a2,t&&t(),t=null,f.value=a2,r=!1,n=!1),o()}}};function B(e){return e.reduce((e,t)=>e.then(()=>k(t)),Promise.resolve())}return L}({history:function(e){let t=function(e){let{history:t,location:n}=window,r={value:a7(e,n)},i={value:t.state};function o(r,o,a){let s=e.indexOf("#"),l=s>-1?(n.host&&document.querySelector("base")?e:e.slice(s))+r:a9()+e+r;try{t[a?"replaceState":"pushState"](o,"",l),i.value=o}catch(e){console.error(e),n[a?"replace":"assign"](l)}}return i.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:r,state:i,push:function(e,n){let a=aA({},i.value,t.state,{forward:e,scroll:a3()});o(a.current,a,!0);let s=aA({},se(r.value,e,null),{position:a.position+1},n);o(e,s,!1),r.value=e},replace:function(e,n){let a=aA({},t.state,se(i.value.back,e,i.value.forward,!0),n,{position:i.value.position});o(e,a,!0),r.value=e}}}(e=function(e){if(!e)if(aE){let t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),aY(e)}(e)),n=function(e,t,n,r){let i=[],o=[],a=null,s=({state:o})=>{let s=a7(e,location),l=n.value,u=t.value,c=0;if(o){if(n.value=s,t.value=o,a&&a===l){a=null;return}c=u?o.position-u.position:0}else r(s);i.forEach(e=>{e(n.value,l,{delta:c,type:oZ.pop,direction:c?c>0?o0.forward:o0.back:o0.unknown})})};function l(){let{history:e}=window;e.state&&e.replaceState(aA({},e.state,{scroll:a3()}),"")}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",l,{passive:!0}),{pauseListeners:function(){a=n.value},listen:function(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return o.push(t),t},destroy:function(){for(let e of o)e();o=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",l)}}}(e,t.state,t.location,t.replace),r=aA({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:a4.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}(),routes:[{path:"/",redirect:()=>`/${al[ag.value]}`},{path:"/follow",component:lG},{path:"/user",component:f7},{path:"/category",redirect:()=>`/${al[ag.value]}/category`},{path:"/search",redirect:()=>`/${al[ag.value]}/search`},{path:"/:siteid",component:lH,beforeEnter:dn},{path:"/:siteid/category",component:lP,beforeEnter:dn},{path:"/:siteid/category/:id",component:lv,beforeEnter:dn},{path:"/:siteid/play/:id",component:fz,beforeEnter:dn},{path:"/:siteid/search",component:lF,beforeEnter:dn},{path:"/:pathMatch(.*)*",name:"404",component:dt}]}),di=oC(sN);di.use(dr),di.mount("#app")})()})();
|