@kwai-video-team/kwai-player-web
Version:
<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
3 lines • 382 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KwaiPlayer=t():e.KwaiPlayer=t()}(this,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t,i){var n=i(5);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(){return e.exports=i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.r(t),i.d(t,"CallbackProxy",(function(){return Ft})),i.d(t,"ControlsPluginLabel",(function(){return wt})),i.d(t,"ControlsPluginModule",(function(){return Vt})),i.d(t,"ControlsSlotPos",(function(){return Ut})),i.d(t,"DanmakuControlsPos",(function(){return Pt})),i.d(t,"DanmakuPluginDomStyle",(function(){return Nt})),i.d(t,"DanmakuPluginLabel",(function(){return xt})),i.d(t,"DanmakuPluginModule",(function(){return oi})),i.d(t,"FullscreenType",(function(){return tt})),i.d(t,"HotkeyPluginLabel",(function(){return It})),i.d(t,"HotkeyPluginModule",(function(){return zt})),i.d(t,"I18nPluginLabel",(function(){return St})),i.d(t,"I18nPluginModule",(function(){return Wt})),i.d(t,"KwaiPlayer",(function(){return di})),i.d(t,"KwaiPlayerEvent",(function(){return nt})),i.d(t,"KwaiPlayerLayer",(function(){return it})),i.d(t,"LiveShiftType",(function(){return et})),i.d(t,"LoggerPluginLabel",(function(){return Lt})),i.d(t,"LoggerPluginModule",(function(){return jt})),i.d(t,"MaskPluginLabel",(function(){return Ot})),i.d(t,"MaskPluginModule",(function(){return ti})),i.d(t,"PlayInfoPluginLabel",(function(){return kt})),i.d(t,"PlayInfoPluginModule",(function(){return qt})),i.d(t,"PluginModule",(function(){return Bt})),i.d(t,"PreviewPluginLabel",(function(){return Dt})),i.d(t,"PreviewPluginModule",(function(){return $t})),i.d(t,"RotatePluginLabel",(function(){return Ct})),i.d(t,"RotatePluginModule",(function(){return Zt})),i.d(t,"VRPluginLabel",(function(){return Mt})),i.d(t,"VRPluginModule",(function(){return ni})),i.d(t,"default",(function(){return di}));var n=i(1),r=i.n(n),o=i(3),a=i.n(o),s=i(0),u=i.n(s),l=i(2),c=i.n(l);function d(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return h(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}var A=Object.defineProperty,f=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,_=function(e,t,i){return t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i};Number.isFinite||(Number.isFinite=function(e){return"number"==typeof e&&isFinite(e)}),Array.prototype.find||(Array.prototype.find=function(e,t){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("callback must be a function");for(var i=Object(this),n=i.length>>>0,r=0;r<n;r++)if(e.call(t,i[r],r,i))return i[r]}),Array.prototype.findIndex||(Array.prototype.findIndex=function(e,t){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("callback must be a function");for(var i=Object(this),n=i.length>>>0,r=0;r<n;r++)if(r in i&&e.call(t,i[r],r,i))return r;return-1}),Array.prototype.fill||(Array.prototype.fill=function(e,t,i){if(void 0===t&&(t=0),void 0===i&&(i=this.length),null==this)throw new TypeError("Array.prototype.fill called on null or undefined");for(var n=Object(this),r=n.length>>>0,o=t>>0,a=i>>0,s=o<0?Math.max(r+o,0):Math.min(o,r),u=a<0?Math.max(r+a,0):Math.min(a,r),l=s;l<u;l++)n[l]=e;return n});var m=Object.defineProperty,g=function(e,t,i){return function(e,t,i){t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i}(e,"symbol"!=typeof t?t+"":t,i),i},y=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=8)}([function(e,t,i){var n=i(5);function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(t){return e.exports=i="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.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(7)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t){function i(){return e.exports=i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(e,t,i,n,r,o,a){try{var s=e[o](a),u=s.value}catch(e){return void i(e)}s.done?t(u):Promise.resolve(u).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(1).default,r=i(6);e.exports=function(e){var t=r(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(1).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(1).default;function r(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
e.exports=r=function(){return i},e.exports.__esModule=!0,e.exports.default=e.exports;var t,i={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(e,t,i){e[t]=i.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function h(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,i){return e[t]=i}}function A(e,t,i,n){var r=t&&t.prototype instanceof g?t:g,o=Object.create(r.prototype),a=new O(n||[]);return s(o,"_invoke",{value:I(e,i,a)}),o}function f(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}i.wrap=A;var p="suspendedStart",v="executing",_="completed",m={};function g(){}function y(){}function E(){}var b={};h(b,l,(function(){return this}));var T=Object.getPrototypeOf,R=T&&T(T(M([])));R&&R!==o&&a.call(R,l)&&(b=R);var w=E.prototype=g.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){var i;s(this,"_invoke",{value:function(r,o){function s(){return new t((function(i,s){!function i(r,o,s,u){var l=f(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,s,u)}),(function(e){i("throw",e,s,u)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return i("throw",e,s,u)}))}u(l.arg)}(r,o,i,s)}))}return i=i?i.then(s,s):s()}})}function I(e,i,n){var r=p;return function(o,a){if(r===v)throw Error("Generator is already running");if(r===_){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===p)throw r=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=v;var l=f(e,i,n);if("normal"===l.type){if(r=n.done?_:"suspendedYield",l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=_,n.method="throw",n.arg=l.arg)}}}function k(e,i){var n=i.method,r=e.iterator[n];if(r===t)return i.delegate=null,"throw"===n&&e.iterator.return&&(i.method="return",i.arg=t,k(e,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=f(r,e.iterator,i.arg);if("throw"===o.type)return i.method="throw",i.arg=o.arg,i.delegate=null,m;var a=o.arg;return a?a.done?(i[e.resultName]=a.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=t),i.delegate=null,m):a:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,m)}function C(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 D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function M(e){if(e||""===e){var i=e[l];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function i(){for(;++r<e.length;)if(a.call(e,r))return i.value=e[r],i.done=!1,i;return i.value=t,i.done=!0,i};return o.next=o}}throw new TypeError(n(e)+" is not iterable")}return y.prototype=E,s(w,"constructor",{value:E,configurable:!0}),s(E,"constructor",{value:y,configurable:!0}),y.displayName=h(E,d,"GeneratorFunction"),i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,h(e,d,"GeneratorFunction")),e.prototype=Object.create(w),e},i.awrap=function(e){return{__await:e}},S(L.prototype),h(L.prototype,c,(function(){return this})),i.AsyncIterator=L,i.async=function(e,t,n,r,o){void 0===o&&(o=Promise);var a=new L(A(e,t,n,r),o);return i.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(w),h(w,d,"Generator"),h(w,l,(function(){return this})),h(w,"toString",(function(){return"[object Generator]"})),i.keys=function(e){var t=Object(e),i=[];for(var n in t)i.push(n);return i.reverse(),function e(){for(;i.length;){var n=i.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},i.values=M,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var i in this)"t"===i.charAt(0)&&a.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=t)},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 i=this;function n(n,r){return s.type="throw",s.arg=e,i.next=n,r&&(i.method="next",i.arg=t),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,m):this.complete(o)},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),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),D(i),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;D(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,i,n){return this.delegate={iterator:M(e),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=t),m}},i}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){i.r(t),i.d(t,"KwaiVideoLocalLog",(function(){return I})),i.d(t,"LogLevel",(function(){return A})),i.d(t,"DefaultLogger",(function(){return _})),i.d(t,"Logger",(function(){return v})),i.d(t,"printVersion",(function(){return u})),i.d(t,"DEFAULT_LOG_LEVEL",(function(){return f}));var n=i(0),r=i.n(n),o=i(3),a=i.n(o),s={idbName:"kwai-video-local-log",idbMaxDataCount:25e3,idbMaxFoldLog:20,maxLogLen:4096};function u(e,t){console.log("%c "+e+" %c "+t+" %c","background:#35495e ; padding: 1px; border-radius: 4px 0 0 4px; color: #fff","background:#ffa483 ; padding: 1px; border-radius: 0 4px 4px 0; color: #fff","background:transparent")}var l=function(){function e(){this.timeout=6048e5}var t=e.prototype;return t.write=function(t,i){if(e.available)try{localStorage.setItem(t,JSON.stringify({value:i,time:Date.now()}))}catch(e){}},t.read=function(t,i){if(void 0===i&&(i=!0),e.available)try{var n=localStorage.getItem(t);if(n){var r=JSON.parse(n),o=r.value,a=r.time,s=void 0===a?0:a;if(!i||Date.now()-s<("number"==typeof i?i:this.timeout))return o}}catch(e){}},r()(e,null,[{key:"available",get:function(){if(void 0===e._available)try{localStorage.setItem("alg","test"),e._available=!0}catch(t){e._available=!1}return e._available}}])}();l._available=void 0;var c,d,h=l,A=((d={}).NONE="none",d.ERROR="e",d.WARN="w",d.INFO="i",d.DEBUG="d",d.VERBOSE="v",d),f=A.ERROR,p=((c={})[A.NONE]={value:1,str:"N"},c[A.ERROR]={value:100,str:"E"},c[A.WARN]={value:200,str:"W"},c[A.INFO]={value:300,str:"I"},c[A.DEBUG]={value:400,str:"D"},c[A.VERBOSE]={value:500,str:"V"},c),v=function(){function e(e){if(this._name="kwai-v",this._level=f,this._id=-1,this._output=void 0,this._workerTag="main",typeof location<"u"&&"blob:"===location.protocol){var t,i=location.href.split("/"),n=null==(t=i[i.length-1])?void 0:t.match(/(\w+)-/);n&&(this._workerTag=e?e+"-"+n[1]:n[1])}else e&&(this._workerTag=e)}e.loadLogLevel=function(e,t){if(void 0===t&&(t=!0),location.href){var i=new RegExp(e+"=([a-z]{1})"),n=location.href.match(i);if(n&&n.length>1){var r=n[1];if(this._isValueInLevel(r))return r}}var o=(new h).read(e,t);if(this._isValueInLevel(o))return o},e.saveLogLevel=function(e,t){this._isValueInLevel(t)&&(new h).write(e,t)},e._isValueInLevel=function(e){return-1!==Object.values(A).indexOf(e)};var t=e.prototype;return t.setOutput=function(e){return this._output=e,this},t.setLevel=function(e){return this._level=e,this},t.setId=function(e){return this._id=e,this},t.setName=function(e){return this._name=e,this},t.getLevel=function(){return this._level},t.getOutput=function(){return this._output},t.hasOutput=function(){return!!this._output},t.e=function(e){if(this._isLevelEnabled(this._level,A.ERROR)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(A.ERROR,e,i);try{var o;null==(o=this._output)||o.e.apply(o,[r].concat(i))}catch(e){}}},t.w=function(e){if(this._isLevelEnabled(this._level,A.WARN)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(A.WARN,e,i);try{var o;null==(o=this._output)||o.w.apply(o,[r].concat(i))}catch(e){}}},t.i=function(e){if(this._isLevelEnabled(this._level,A.INFO)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(A.INFO,e,i);try{var o;null==(o=this._output)||o.i.apply(o,[r].concat(i))}catch(e){}}},t.d=function(e){if(this._isLevelEnabled(this._level,A.DEBUG)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(A.DEBUG,e,i);try{var o;null==(o=this._output)||o.d.apply(o,[r].concat(i))}catch(e){}}},t.v=function(e){if(this._isLevelEnabled(this._level,A.VERBOSE)){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];var r=this._printLog(A.VERBOSE,e,i);try{var o;null==(o=this._output)||o.v.apply(o,[r].concat(i))}catch(e){}}},t._isLevelEnabled=function(e,t){return p[e].value>=p[t].value},t._printLog=function(e,t,i){var n,r,o=typeof t;if("object"===o)t=(null==(r=t)?void 0:r.constructor.name)||"unknown";else if("function"===o){var a;t=(null==(a=Object.getOwnPropertyDescriptor(t,"name"))?void 0:a.value)||"unknown"}var s,u,l=((null==(n=p[e])?void 0:n.str)||"")+"|"+this._name+"["+("function"==typeof this._id?this._id():this._id)+"]["+this._workerTag+"]::"+t;return e===A.ERROR?(s=console).error.apply(s,[l].concat(i.slice(0))):(u=console).log.apply(u,[l].concat(i.slice(0))),l},e}(),_=new v,m=r()((function e(t){this._logger=void 0,this._id=0,this._config=s,this._id=e._id,e._id++,this._logger=(new v).setId(this._id).setLevel(A.INFO),this._config=a()({},s,t)}),[{key:"config",get:function(){return this._config}},{key:"logger",get:function(){return this._logger}},{key:"id",get:function(){return this._id}}],[{key:"packName",get:function(){return"ll_es"}},{key:"version",get:function(){return"1.0.13"}},{key:"buildTime",get:function(){return"Tue Oct 08 2024 17:18:49 GMT+0800 (中国标准时间)"}}]);m._id=0;var g=i(4),y=i.n(g),E=i(2),b=i.n(E),T=function(){function e(e,t,i,n,r){var o=this;void 0===r&&(r=1),this._logger=void 0,this._name=void 0,this._storeName=void 0,this._dbIndex=void 0,this._version=void 0,this._taskQueue=[],this._openReq=void 0,this._isTransactionActive=!1,this._runTaskQueue=function(){for(;o._taskQueue.length;){var e=o._taskQueue.shift();e&&o.run(e.task,e.mode)}},this._logger=e,this._name=t,this._storeName=i,this._dbIndex=n,this._version=r}var t=e.prototype;return t.init=function(){var e=this;if(!this._openReq&&indexedDB){var t=this._openReq=indexedDB.open(this._name,this._version);this._logger.i("idb-wrapper","open",t),t.onerror=function(){e._logger.i("idb-wrapper","open error.")},t.onsuccess=function(){e._logger.i("idb-wrapper","open success."),e._runTaskQueue()},t.onupgradeneeded=function(){e._logger.i("idb-wrapper","open upgradeneeded."),t.result.objectStoreNames.contains(e._storeName)&&t.result.deleteObjectStore(e._storeName);var i=t.result.createObjectStore(e._storeName,{keyPath:"id",autoIncrement:!0});e._dbIndex&&e._dbIndex.forEach((function(e){i.createIndex(e.name,e.keyPath,e.option)}))}}},t.run=function(e,t){if(void 0===t&&(t="readwrite"),this.init(),this._openReq&&"done"===this._openReq.readyState&&!this._openReq.error)return this._doTask(e,t);"error"!==this.state&&(this._taskQueue.push({task:e,mode:t}),this._taskQueue.length>1e3&&this._taskQueue.shift())},t.close=function(){var e=this;this._logger.i("idb-wrapper","close"),this._openReq&&("done"===this._openReq.readyState?(this._openReq.result.close(),this._openReq=void 0):this._openReq.onsuccess=function(){e.close()})},t.destroy=function(){this._logger.i("idb-wrapper","destroy"),this.close(),this._taskQueue=[]},t._doTask=function(e,t){var i=this;if(void 0===t&&(t="readwrite"),this._openReq&&!this._openReq.error)try{this._isTransactionActive=!0;var n=this._openReq.result.transaction(this._storeName,t),r=void 0;n.oncomplete=function(){i._isTransactionActive=!1,e.callback&&e.callback(r),i._runTaskQueue()},n.onabort=n.onerror=function(){i._isTransactionActive=!1,e.callback&&e.callback(r),i._runTaskQueue()},r=e.exec(n.objectStore(this._storeName))}catch(e){}else e.callback&&e.callback()},r()(e,[{key:"isTransactionActive",get:function(){return this._isTransactionActive}},{key:"state",get:function(){return this._openReq&&"done"===this._openReq.readyState?this._openReq.error?"error":"ready":"idle"}}])}(),R=[{name:"id",keyPath:"id",option:{unique:!0}}],w=[function(){function e(e){this._ctx=void 0,this._idb=void 0,this._logCount=0,this._saveCount=0,this._reCountOnSaveCount=100,this._reduceData=!1,this._ctx=e,this._idb=new T(e.logger,e.config.idbName,e.config.idbName,R),this._reCountOnSaveCount=Math.min(200,Math.max(50,Math.round(this._ctx.config.idbMaxDataCount/10))),this._count()}e.isSupported=function(){return typeof indexedDB<"u"};var t,i=e.prototype;return i.saveLog=function(e){var t=this,i={exec:function(t){return t.add({value:e})},callback:function(e){t._saveCount++,t._saveCount%t._reCountOnSaveCount==0&&t._count(),null!=e&&e.error&&t._ctx.logger.i("idb-backend","save log err",e.error)}};this._idb.run(i)},i.exportLog=(t=y()(b.a.mark((function e(){var t=this;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){t._ctx.logger.i("idb-backend","export start");var n={exec:function(e){return e.getAll()},callback:function(i){e(void 0===i?"":t._mergeGetAll(i.result))}};t._idb.run(n,"readonly")})));case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)}),i.destroy=function(){this._idb.destroy()},i.clean=function(){this._idb.run({exec:function(e){return e.clear()}})},i._count=function(){var e=this,t={exec:function(e){return e.count()},callback:function(t){null!=t&&t.error||null==t||!t.result||(e._ctx.logger.i("idb-backend","count: "+t.result+" max: "+e._ctx.config.idbMaxDataCount),e._logCount=t.result,e._logCount>=e._ctx.config.idbMaxDataCount&&!e._reduceData&&e._deleteFromHead(e._logCount-Math.round(e._ctx.config.idbMaxDataCount/2)))}};this._idb.run(t)},i._deleteFromHead=function(e){var t=this;this._ctx.logger.i("idb-backend","delete from head"),this._reduceData=!0;var i={exec:function(e){return e.openCursor()},callback:function(i){if(t._reduceData=!1,null!=i&&i.result){var n=IDBKeyRange.bound(i.result.key,i.result.key+e,!1,!1),r={exec:function(e){return t._ctx.logger.i("idb-backend","del: "+n.lower+"~"+n.upper),e.delete(n)},callback:function(e){t._ctx.logger.i("idb-backend","del result: "+!(null==e||!e.error))}};t._idb.run(r)}}};this._idb.run(i)},i._mergeGetAll=function(e){return e.length?e.reduce((function(e,t){return""+e+t.value+"\n"}),""):""},r()(e,[{key:"isActive",get:function(){return"error"!==this._idb.state}}])}()];function S(e,t,i){var n=new Date;"string"!=typeof e&&(e=e.toString());var r=n.toLocaleString()+"."+n.getMilliseconds().toString().padStart(3,"0")+"|"+e+"|";return t.forEach((function(e){r+="object"==typeof e?JSON.stringify(e)+" ":e+" "})),r.length>i?r.substring(0,i):r}function L(e){return e.join("\n")}var I=function(){function e(e){var t=this;this._ctx=void 0,this._backend=void 0,this._delayTimer=void 0,this._logCache=[],this._loggerForAdd=void 0,this._downloadHref=void 0,this._startDelay=function(){t._delayTimer=setInterval((function(){t._saveLog(!0)}),1e3)},this._stopDelay=function(){t._delayTimer&&(clearTimeout(t._delayTimer),t._delayTimer=void 0)},u("kwai-video-local-log","1.0.13"),this._ctx=new m(e);var i=function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];t.addLog.apply(t,[e].concat(n))};this._loggerForAdd={e:i,w:i,i:i,d:i,v:i},this._ctx.logger.setOutput(this._loggerForAdd),this._ctx.logger.i("kwai-video-local-log","constructor",e,this._ctx.config),this._backend=function(e){for(var t=0;t<w.length;t++){var i=w[t];if(null!=i&&i.isSupported())return new i(e)}}(this._ctx),this._backend&&this._startDelay()}e.isSupported=function(){return function(){for(var e=0;e<w.length;e++){var t=w[e];if(null!=t&&t.isSupported())return!0}return!1}()};var t=e.prototype;return t.addLog=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this._logCache.push(S(e,i,this._ctx.config.maxLogLen)),this._saveLog()},t.cleanLog=function(){var e;this._ctx.logger.i("kwai-video-local-log","clean"),null==(e=this._backend)||e.clean()},t.exportLog=function(){var e=this;return this._ctx.logger.i("kwai-video-local-log","export log"),new Promise((function(t,i){e._backend?e._backend.exportLog().then((function(i){t(L([i].concat(e._logCache)))})):t("")}))},t.downloadLog=function(e){var t=this;this._ctx.logger.i("kwai-video-local-log","download log: "+e),this._destroyDownloadHref(),this.exportLog().then((function(i){var n=new Blob([i],{type:"text/plain"});if(document){var r=document.createElement("a");t._downloadHref=r.href=URL.createObjectURL(n),r.download=e||"Log_web_"+(new Date).toLocaleString()+".log",document.body.appendChild(r),r.click(),r.remove()}else console.log("无document,当前是否在worker中")}))},t.destroy=function(){var e;this._destroyDownloadHref(),null==(e=this._backend)||e.destroy(),this._stopDelay()},t.getLoggerForAdd=function(){return this._loggerForAdd},t._destroyDownloadHref=function(){try{this._downloadHref&&(URL.revokeObjectURL(this._downloadHref),this._downloadHref=void 0)}catch(e){}},t._saveLog=function(e){if(void 0===e&&(e=!1),this._backend&&this._backend.isActive&&(this._logCache.length>=this._ctx.config.idbMaxFoldLog||this._logCache.length>0&&e)){var t=L(this._logCache);this._logCache.splice(0,this._logCache.length),t&&this._backend.saveLog(t)}},r()(e,null,[{key:"version",get:function(){return"1.0.13"}}])}();t.default=I}]);void 0===y&&console.error("esm-webpack-plugin: nothing exported!");var E=y.KwaiVideoLocalLog,b=y.LogLevel,T=y.DefaultLogger,R=y.Logger,w=y.printVersion;y.DEFAULT_LOG_LEVEL,y.default;var S=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function L(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I,k={exports:{}},C="object"==typeof Reflect?Reflect:null,D=C&&"function"==typeof C.apply?C.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};I=C&&"function"==typeof C.ownKeys?C.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var O=Number.isNaN||function(e){return e!=e};function M(){M.init.call(this)}k.exports=M,k.exports.once=function(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,o),n(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}W(e,t,o,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&W(e,"error",t,i)}(e,r,{once:!0})}))},M.EventEmitter=M,M.prototype._events=void 0,M.prototype._eventsCount=0,M.prototype._maxListeners=void 0;var x=10;function N(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function P(e){return void 0===e._maxListeners?M.defaultMaxListeners:e._maxListeners}function U(e,t,i,n){var r,o,a;if(N(i),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),a=o[t]),void 0===a)a=o[t]=i,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[i,a]:[a,i]:n?a.unshift(i):a.push(i),(r=P(e))>0&&a.length>r&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){console&&console.warn&&console.warn(e)}(s)}return e}function F(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function B(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=F.bind(n);return r.listener=i,n.wrapFn=r,r}function H(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):G(r,r.length)}function V(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function G(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function W(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){n.once&&e.removeEventListener(t,r),i(o)}))}}Object.defineProperty(M,"defaultMaxListeners",{enumerable:!0,get:function(){return x},set:function(e){if("number"!=typeof e||e<0||O(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");x=e}}),M.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},M.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||O(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},M.prototype.getMaxListeners=function(){return P(this)},M.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=r[e];if(void 0===s)return!1;if("function"==typeof s)D(s,this,t);else{var u=s.length,l=G(s,u);for(i=0;i<u;++i)D(l[i],this,t)}return!0},M.prototype.addListener=function(e,t){return U(this,e,t,!1)},M.prototype.on=M.prototype.addListener,M.prototype.prependListener=function(e,t){return U(this,e,t,!0)},M.prototype.once=function(e,t){return N(t),this.on(e,B(this,e,t)),this},M.prototype.prependOnceListener=function(e,t){return N(t),this.prependListener(e,B(this,e,t)),this},M.prototype.removeListener=function(e,t){var i,n,r,o,a;if(N(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){a=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},M.prototype.off=M.prototype.removeListener,M.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,o=Object.keys(i);for(n=0;n<o.length;++n)"removeListener"!==(r=o[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},M.prototype.listeners=function(e){return H(this,e,!0)},M.prototype.rawListeners=function(e){return H(this,e,!1)},M.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):V.call(e,t)},M.prototype.listenerCount=V,M.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};var K=k.exports,j=function(){if(typeof Map<"u")return Map;function e(e,t){var i=-1;return e.some((function(e,n){return e[0]===t&&(i=n,!0)})),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var i=e(this.__entries__,t),n=this.__entries__[i];return n&&n[1]},t.prototype.set=function(t,i){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=i:this.__entries__.push([t,i])},t.prototype.delete=function(t){var i=this.__entries__,n=e(i,t);~n&&i.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var i=0,n=this.__entries__;i<n.length;i++){var r=n[i];e.call(t,r[1],r[0])}},t}()}(),J=typeof window<"u"&&typeof document<"u"&&window.document===document,z=typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),Y="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(z):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var q=["top","right","bottom","left","width","height","size","weight"],Q=typeof MutationObserver<"u",Z=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var i=!1,n=!1,r=0;function o(){i&&(i=!1,e()),n&&s()}function a(){Y(o)}function s(){var e=Date.now();if(i){if(e-r<2)return;n=!0}else i=!0,n=!1,setTimeout(a,t);r=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,i=t.indexOf(e);~i&&t.splice(i,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){!J||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Q?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!J||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,i=void 0===t?"":t;q.some((function(e){return!!~i.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),X=function(e,t){for(var i=0,n=Object.keys(t);i<n.length;i++){var r=n[i];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},$=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||z},ee=ae(0,0,0,0);function te(e){return parseFloat(e)||0}function ie(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return t.reduce((function(t,i){return t+te(e["border-"+i+"-width"])}),0)}function ne(e){var t=e.clientWidth,i=e.clientHeight;if(!t&&!i)return ee;var n=$(e).getComputedStyle(e),r=function(e){for(var t={},i=0,n=["top","right","bottom","left"];i<n.length;i++){var r=n[i],o=e["padding-"+r];t[r]=te(o)}return t}(n),o=r.left+r.right,a=r.top+r.bottom,s=te(n.width),u=te(n.height);if("border-box"===n.boxSizing&&(Math.round(s+o)!==t&&(s-=ie(n,"left","right")+o),Math.round(u+a)!==i&&(u-=ie(n,"top","bottom")+a)),!function(e){return e===$(e).document.documentElement}(e)){var l=Math.round(s+o)-t,c=Math.round(u+a)-i;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return ae(r.left,r.top,s,u)}var re=typeof SVGGraphicsElement<"u"?function(e){return e instanceof $(e).SVGGraphicsElement}:function(e){return e instanceof $(e).SVGElement&&"function"==typeof e.getBBox};function oe(e){return J?re(e)?function(e){var t=e.getBBox();return ae(0,0,t.width,t.height)}(e):ne(e):ee}function ae(e,t,i,n){return{x:e,y:t,width:i,height:n}}var se=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ae(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=oe(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),ue=function(e,t){var i=function(e){var t=e.x,i=e.y,n=e.width,r=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return X(a,{x:t,y:i,width:n,height:r,top:i,right:t+n,bottom:r+i,left:t}),a}(t);X(this,{target:e,contentRect:i})},le=function(){function e(e,t,i){if(this.activeObservations_=[],this.observations_=new j,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=i}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u")&&Element instanceof Object){if(!(e instanceof $(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new se(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u")&&Element instanceof Object){if(!(e instanceof $(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new ue(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),ce=typeof WeakMap<"u"?new WeakMap:new j,de=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Z.getInstance(),n=new le(t,i,this);ce.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){de.prototype[e]=function(){var t;return(t=ce.get(this))[e].apply(t,arguments)}})),typeof z.ResizeObserver<"u"&&z.ResizeObserver;var he={},Ae=Object.prototype.hasOwnProperty;function fe(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function pe(e){try{return encodeURIComponent(e)}catch(e){return null}}he.stringify=function(e,t){t=t||"";var i,n,r=[];for(n in"string"!=typeof t&&(t="?"),e)if(Ae.call(e,n)){if(!(i=e[n])&&(null==i||isNaN(i))&&(i=""),n=pe(n),i=pe(i),null===n||null===i)continue;r.push(n+"="+i)}return r.length?t+r.join("&"):""},he.parse=function(e){for(var t,i=/([^=?#&]+)=?([^&]*)/g,n={};t=i.exec(e);){var r=fe(t[1]),o=fe(t[2]);null===r||null===o||r in n||(n[r]=o)}return n};var ve=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e},_e=he,me=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,ge=/[\n\r\t]/g,ye=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Ee=/:\d+$/,be=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Te=/^[a-zA-Z]:/;function Re(e){return(e||"").toString().replace(me,"")}var we=[["#","hash"],["?","query"],function(e,t){return Ie(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Se={hash:1,query:1};function Le(e){var t,i=(typeof window<"u"?window:typeof S<"u"?S:typeof self<"u"?self:{}).location||{},n={},r=typeof(e=e||i);if("blob:"===e.protocol)n=new Ce(unescape(e.pathname),{});else if("string"===r)for(t in n=new Ce(e,{}),Se)delete n[t];else if("object"===r){for(t in e)t in Se||(n[t]=e[t]);void 0===n.slashes&&(n.slashes=ye.test(e.href))}return n}function Ie(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function ke(e,t){e=(e=Re(e)).replace(ge,""),t=t||{};var i,n=be.exec(e),r=n[1]?n[1].toLowerCase():"",o=!!n[2],a=!!n[3],s=0;return o?a?(i=n[2]+n[3]+n[4],s=n[2].length+n[3].length):(i=n[2]+n[4],s=n[2].length):a?(i=n[3]+n[4],s=n[3].length):i=n[4],"file:"===r?s>=2&&(i=i.slice(2)):Ie(r)?i=n[4]:r?o&&(i=i.slice(2)):s>=2&&Ie(t.protocol)&&(i=n[4]),{protocol:r,slashes:o||Ie(r),slashesCount:s,rest:i}}function Ce(e,t,i){if(e=(e=Re(e)).replace(ge,""),!(this instanceof Ce))return new Ce(e,t,i);var n,r,o,a,s,u,l=we.slice(),c=typeof t,d=this,h=0;for("object"!==c&&"string"!==c&&(i=t,t=null),i&&"function"!=typeof i&&(i=_e.parse),n=!(r=ke(e||"",t=Le(t))).protocol&&!r.slashes,d.slashes=r.slashes||n&&t.slashes,d.protocol=r.protocol||t.protocol||"",e=r.rest,("file:"===r.protocol&&(2!==r.slashesCount||Te.test(e))||!r.slashes&&(r.protocol||r.slashesCount<2||!Ie(d.protocol)))&&(l[3]=[/(.*)/,"pathname"]);h<l.length;h++)"function"!=typeof(a=l[h])?(o=a[0],u=a[1],o!=o?d[u]=e:"string"==typeof o?~(s="@"===o?e.lastIndexOf(o):e.indexOf(o))&&("number"==typeof a[2]?(d[u]=e.slice(0,s),e=e.slice(s+a[2])):(d[u]=e.slice(s),e=e.slice(0,s))):(s=o.exec(e))&&(d[u]=s[1],e=e.slice(0,s.index)),d[u]=d[u]||n&&a[3]&&t[u]||"",a[4]&&(d[u]=d[u].toLowerCase())):e=a(e,d);i&&(d.query=i(d.query)),n&&t.slashes&&"/"!==d.pathname.charAt(0)&&(""!==d.pathname||""!==t.pathname)&&(d.pathname=function(e,t){if(""===e)return t;for(var i=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=i.length,r=i[n-1],o=!1,a=0;n--;)"."===i[n]?i.splice(n,1):".."===i[n]?(i.splice(n,1),a++):a&&(0===n&&(o=!0),i.splice(n,1),a--);return o&&i.unshift(""),("."===r||".."===r)&&i.push(""),i.join("/")}(d.pathname,t.pathname)),"/"!==d.pathname.charAt(0)&&Ie(d.protocol)&&(d.pathname="/"+d.pathname),ve(d.port,d.protocol)||(d.host=d.hostname,d.port=""),d.username=d.password="",d.auth&&(~(s=d.auth.indexOf(":"))?(d.username=d.auth.slice(0,s),d.username=encodeURIComponent(decodeURIComponent(d.username)),d.password=d.auth.slice(s+1),d.password=encodeURIComponent(decodeURIComponent(d.password))):d.username=encodeURIComponent(decodeURIComponent(d.auth)),d.auth=d.password?d.username+":"+d.password:d.username),d.origin="file:"!==d.protocol&&Ie(d.protocol)&&d.host?d.protocol+"//"+d.host:"null",d.href=d.toString()}Ce.prototype={set:function(e,t,i){var n=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(i||_e.parse)(t)),n[e]=t;break;case"port":n[e]=t,ve(t,n.protocol)?t&&(n.host=n.hostname+":"+t):(n.host=n.hostname,n[e]="");break;case"hostname":n[e]=t,n.port&&(t+=":"+n.port),n.host=t;break;case"host":n[e]=t,Ee.test(t)?(t=t.split(":"),n.port=t.pop(),n.hostname=t.join(":")):(n.hostname=t,n.port="");break;case"protocol":n.protocol=t.toLowerCase(),n.slashes=!i;break;case"pathname":case"hash":if(t){var r="pathname"===e?"/":"#";n[e]=t.charAt(0)!==r?r+t:t}else n[e]=t;break;case"username":case"password":n[e]=encodeURIComponent(t);break;case"auth":var o=t.indexOf(":");~o?(n.username=t.slice(0,o),n.username=encodeURIComponent(decodeURIComponent(n.username)),n.password=t.slice(o+1),n.password=encodeURIComponent(decodeURIComponent(n.password))):n.username=encodeURIComponent(decodeURIComponent(t))}for(var a=0;a<we.length;a++){var s=we[a];s[4]&&(n[s[1]]=n[s[1]].toLowerCase())}return n.auth=n.password?n.username+":"+n.password:n.username,n.origin="file:"!==n.protocol&&Ie(n.protocol)&&n.host?n.protocol+"//"+n.host:"null",n.href=n.toString(),n},toString:function(e){(!e||"function"!=typeof e)&&(e=_e.stringify);var t,i=this,n=i.host,r=i.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var o=r+(i.protocol&&i.slashes||Ie(i.protocol)?"//":"");return i.username?(o+=i.username,i.password&&(o+=":"+i.password),o+="@"):i.password?(o+=":"+i.password,o+="@"):"file:"!==i.protocol&&Ie(i.protocol)&&!n&&"/"!==i.pathname&&(o+="@"),(":"===n[n.length-1]||Ee.test(i.hostname)&&!i.port)&&(n+=":"),o+=n+i.pathname,(t="object"==typeof i.query?e(i.query):i.query)&&(o+="?"!==t.charAt(0)?"?"+t:t),i.hash&&(o+=i.hash),o}},Ce.extractProtocol=ke,Ce.location=Le,Ce.trimLeft=Re,Ce.qs=_e;var De=L(Ce),Oe=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t){function i(t){return e.exports=i="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.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(2);function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,t,i){return