You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1046 lines
1.0 MiB
1046 lines
1.0 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[1006],{98280:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return kr}});function z(j){"@babel/helpers - typeof";return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ne){return typeof ne}:function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},z(j)}function oe(j,ne){if(z(j)!="object"||!j)return j;var q=j[Symbol.toPrimitive];if(q!==void 0){var De=q.call(j,ne||"default");if(z(De)!="object")return De;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ne==="string"?String:Number)(j)}function te(j){var ne=oe(j,"string");return z(ne)=="symbol"?ne:ne+""}function U(j,ne,q){return(ne=te(ne))in j?Object.defineProperty(j,ne,{value:q,enumerable:!0,configurable:!0,writable:!0}):j[ne]=q,j}function L(j,ne){var q=Object.keys(j);if(Object.getOwnPropertySymbols){var De=Object.getOwnPropertySymbols(j);ne&&(De=De.filter(function(ze){return Object.getOwnPropertyDescriptor(j,ze).enumerable})),q.push.apply(q,De)}return q}function M(j){for(var ne=1;ne<arguments.length;ne++){var q=arguments[ne]!=null?arguments[ne]:{};ne%2?L(Object(q),!0).forEach(function(De){U(j,De,q[De])}):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(q)):L(Object(q)).forEach(function(De){Object.defineProperty(j,De,Object.getOwnPropertyDescriptor(q,De))})}return j}function P(j){if(Array.isArray(j))return j}function k(j,ne){var q=j==null?null:typeof Symbol!="undefined"&&j[Symbol.iterator]||j["@@iterator"];if(q!=null){var De,ze,ut,gt,Lt=[],wt=!0,Ht=!1;try{if(ut=(q=q.call(j)).next,ne===0){if(Object(q)!==q)return;wt=!1}else for(;!(wt=(De=ut.call(q)).done)&&(Lt.push(De.value),Lt.length!==ne);wt=!0);}catch(xt){Ht=!0,ze=xt}finally{try{if(!wt&&q.return!=null&&(gt=q.return(),Object(gt)!==gt))return}finally{if(Ht)throw ze}}return Lt}}function e(j,ne){(ne==null||ne>j.length)&&(ne=j.length);for(var q=0,De=Array(ne);q<ne;q++)De[q]=j[q];return De}function O(j,ne){if(j){if(typeof j=="string")return e(j,ne);var q={}.toString.call(j).slice(8,-1);return q==="Object"&&j.constructor&&(q=j.constructor.name),q==="Map"||q==="Set"?Array.from(j):q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(q)?e(j,ne):void 0}}function D(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(j,ne){return P(j)||k(j,ne)||O(j,ne)||D()}function p(j,ne){if(j==null)return{};var q={};for(var De in j)if({}.hasOwnProperty.call(j,De)){if(ne.indexOf(De)!==-1)continue;q[De]=j[De]}return q}function h(j,ne){if(j==null)return{};var q,De,ze=p(j,ne);if(Object.getOwnPropertySymbols){var ut=Object.getOwnPropertySymbols(j);for(De=0;De<ut.length;De++)q=ut[De],ne.indexOf(q)===-1&&{}.propertyIsEnumerable.call(j,q)&&(ze[q]=j[q])}return ze}function g(j){if(Array.isArray(j))return j}function o(j,ne){var q=j==null?null:typeof Symbol!="undefined"&&j[Symbol.iterator]||j["@@iterator"];if(q!=null){var De,ze,ut,gt,Lt=[],wt=!0,Ht=!1;try{if(ut=(q=q.call(j)).next,ne===0){if(Object(q)!==q)return;wt=!1}else for(;!(wt=(De=ut.call(q)).done)&&(Lt.push(De.value),Lt.length!==ne);wt=!0);}catch(xt){Ht=!0,ze=xt}finally{try{if(!wt&&q.return!=null&&(gt=q.return(),Object(gt)!==gt))return}finally{if(Ht)throw ze}}return Lt}}function c(j,ne){(ne==null||ne>j.length)&&(ne=j.length);for(var q=0,De=new Array(ne);q<ne;q++)De[q]=j[q];return De}function y(j,ne){if(j){if(typeof j=="string")return c(j,ne);var q=Object.prototype.toString.call(j).slice(8,-1);if(q==="Object"&&j.constructor&&(q=j.constructor.name),q==="Map"||q==="Set")return Array.from(j);if(q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(q))return c(j,ne)}}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(j,ne){return g(j)||o(j,ne)||y(j,ne)||u()}var i=B(67294),t=B.t(i,2),m=B(73935);function S(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var f={};function _(j,ne){}function A(j,ne){}function x(){f={}}function w(j,ne,q){!ne&&!f[q]&&(j(!1,q),f[q]=!0)}function n(j,ne){w(_,j,ne)}function a(j,ne){w(A,j,ne)}var r=null;function d(j){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ne){return typeof ne}:function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},d(j)}var T=B(81640);function b(j,ne,q){var De=i.useRef({});return(!("value"in De.current)||q(De.current.condition,ne))&&(De.current.value=j(),De.current.condition=ne),De.current.value}function v(j,ne){typeof j=="function"?j(ne):d(j)==="object"&&j&&"current"in j&&(j.current=ne)}function E(){for(var j=arguments.length,ne=new Array(j),q=0;q<j;q++)ne[q]=arguments[q];var De=ne.filter(function(ze){return ze});return De.length<=1?De[0]:function(ze){ne.forEach(function(ut){v(ut,ze)})}}function R(){for(var j=arguments.length,ne=new Array(j),q=0;q<j;q++)ne[q]=arguments[q];return b(function(){return E.apply(void 0,ne)},ne,function(De,ze){return De.length===ze.length&&De.every(function(ut,gt){return ut===ze[gt]})})}function C(j){var ne,q,De=(0,T.isMemo)(j)?j.type.type:j.type;return!(typeof De=="function"&&!((ne=De.prototype)!==null&&ne!==void 0&&ne.render)||typeof j=="function"&&!((q=j.prototype)!==null&&q!==void 0&&q.render))}var N=i.createContext(null),K=N;function H(j){if(Array.isArray(j))return c(j)}function ee(j){if(typeof Symbol!="undefined"&&j[Symbol.iterator]!=null||j["@@iterator"]!=null)return Array.from(j)}function J(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function se(j){return H(j)||ee(j)||y(j)||J()}var G=S()?i.useLayoutEffect:i.useEffect,Ee=G,ge=function(ne,q){var De=React.useRef(!0);G(function(){if(!De.current)return ne()},q),G(function(){return De.current=!1,function(){De.current=!0}},[])},Pe=[];function Ne(j,ne){var q=i.useState(function(){if(!S())return null;var Gt=document.createElement("div");return Gt}),De=s(q,1),ze=De[0],ut=i.useRef(!1),gt=i.useContext(K),Lt=i.useState(Pe),wt=s(Lt,2),Ht=wt[0],xt=wt[1],bt=gt||(ut.current?void 0:function(Gt){xt(function(Br){var nr=[Gt].concat(se(Br));return nr})});function Ot(){ze.parentElement||document.body.appendChild(ze),ut.current=!0}function Mt(){var Gt;(Gt=ze.parentElement)===null||Gt===void 0||Gt.removeChild(ze),ut.current=!1}return Ee(function(){return j?gt?gt(Ot):Ot():Mt(),Mt},[j]),Ee(function(){Ht.length&&(Ht.forEach(function(Gt){return Gt()}),xt(Pe))},[Ht]),[ze,bt]}function $e(j,ne){if(!j)return!1;if(j.contains)return j.contains(ne);for(var q=ne;q;){if(q===j)return!0;q=q.parentNode}return!1}var je="data-rc-order",Ce="rc-util-key",fe=new Map;function Be(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=j.mark;return ne?ne.startsWith("data-")?ne:"data-".concat(ne):Ce}function Ue(j){if(j.attachTo)return j.attachTo;var ne=document.querySelector("head");return ne||document.body}function re(j){return j==="queue"?"prependQueue":j?"prepend":"append"}function Z(j){return Array.from((fe.get(j)||j).children).filter(function(ne){return ne.tagName==="STYLE"})}function le(j){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!S())return null;var q=ne.csp,De=ne.prepend,ze=document.createElement("style");ze.setAttribute(je,re(De)),q!=null&&q.nonce&&(ze.nonce=q==null?void 0:q.nonce),ze.innerHTML=j;var ut=Ue(ne),gt=ut.firstChild;if(De){if(De==="queue"){var Lt=Z(ut).filter(function(wt){return["prepend","prependQueue"].includes(wt.getAttribute(je))});if(Lt.length)return ut.insertBefore(ze,Lt[Lt.length-1].nextSibling),ze}ut.insertBefore(ze,gt)}else ut.appendChild(ze);return ze}function we(j){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=Ue(ne);return Z(q).find(function(De){return De.getAttribute(Be(ne))===j})}function ue(j){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=we(j,ne);if(q){var De=Ue(ne);De.removeChild(q)}}function pe(j,ne){var q=fe.get(j);if(!q||!$e(document,q)){var De=le("",ne),ze=De.parentNode;fe.set(j,ze),j.removeChild(De)}}function ae(){fe.clear()}function _e(j,ne){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},De=Ue(q);pe(De,q);var ze=we(ne,q);if(ze){var ut,gt;if((ut=q.csp)!==null&&ut!==void 0&&ut.nonce&&ze.nonce!==((gt=q.csp)===null||gt===void 0?void 0:gt.nonce)){var Lt;ze.nonce=(Lt=q.csp)===null||Lt===void 0?void 0:Lt.nonce}return ze.innerHTML!==j&&(ze.innerHTML=j),ze}var wt=le(j,q);return wt.setAttribute(Be(q),ne),wt}var ce;function he(j){if(typeof document=="undefined")return 0;if(j||ce===void 0){var ne=document.createElement("div");ne.style.width="100%",ne.style.height="200px";var q=document.createElement("div"),De=q.style;De.position="absolute",De.top="0",De.left="0",De.pointerEvents="none",De.visibility="hidden",De.width="200px",De.height="150px",De.overflow="hidden",q.appendChild(ne),document.body.appendChild(q);var ze=ne.offsetWidth;q.style.overflow="scroll";var ut=ne.offsetWidth;ze===ut&&(ut=q.clientWidth),document.body.removeChild(q),ce=ze-ut}return ce}function Le(j){var ne=j.match(/^(.*)px$/),q=Number(ne==null?void 0:ne[1]);return Number.isNaN(q)?he():q}function Ye(j){if(typeof document=="undefined"||!j||!(j instanceof Element))return{width:0,height:0};var ne=getComputedStyle(j,"::-webkit-scrollbar"),q=ne.width,De=ne.height;return{width:Le(q),height:Le(De)}}function ke(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var be="rc-util-locker-".concat(Date.now()),Re=0;function Fe(j){var ne=!!j,q=i.useState(function(){return Re+=1,"".concat(be,"_").concat(Re)}),De=s(q,1),ze=De[0];Ee(function(){if(ne){var ut=Ye(document.body).width,gt=ke();_e(`
|
|
html body {
|
|
overflow-y: hidden;
|
|
`.concat(gt?"width: calc(100% - ".concat(ut,"px);"):"",`
|
|
}`),ze)}else ue(ze);return function(){ue(ze)}},[ne,ze])}var Ae=!1;function Me(j){return typeof j=="boolean"&&(Ae=j),Ae}var rt=function(ne){return ne===!1?!1:!S()||!ne?null:typeof ne=="string"?document.querySelector(ne):typeof ne=="function"?ne():ne},lt=i.forwardRef(function(j,ne){var q=j.open,De=j.autoLock,ze=j.getContainer,ut=j.debug,gt=j.autoDestroy,Lt=gt===void 0?!0:gt,wt=j.children,Ht=i.useState(q),xt=s(Ht,2),bt=xt[0],Ot=xt[1],Mt=bt||q;i.useEffect(function(){(Lt||q)&&Ot(q)},[q,Lt]);var Gt=i.useState(function(){return rt(ze)}),Br=s(Gt,2),nr=Br[0],qr=Br[1];i.useEffect(function(){var ui=rt(ze);qr(ui!=null?ui:null)});var Pr=Ne(Mt&&!nr,ut),xr=s(Pr,2),en=xr[0],tn=xr[1],Yt=nr!=null?nr:en;Fe(De&&q&&S()&&(Yt===en||Yt===document.body));var Jn=null;if(wt&&C(wt)&&ne){var wn=wt;Jn=wn.ref}var Bn=R(Jn,ne);if(!Mt||!S()||nr===void 0)return null;var bi=Yt===!1||Me(),qn=wt;return ne&&(qn=i.cloneElement(wt,{ref:Bn})),i.createElement(K.Provider,{value:tn},bi?qn:(0,m.createPortal)(qn,Yt))}),Ze=lt,ft=Ze,Et=B(94184),qe=B.n(Et),pt=B(48555);function Se(j){return j instanceof HTMLElement||j instanceof SVGElement}function ye(j){return j&&_typeof(j)==="object"&&Se(j.nativeElement)?j.nativeElement:Se(j)?j:null}function Te(j){var ne=ye(j);if(ne)return ne;if(j instanceof React.Component){var q;return(q=ReactDOM.findDOMNode)===null||q===void 0?void 0:q.call(ReactDOM,j)}return null}function Y(j){var ne;return j==null||(ne=j.getRootNode)===null||ne===void 0?void 0:ne.call(j)}function W(j){return Y(j)instanceof ShadowRoot}function X(j){return W(j)?Y(j):null}function ie(j){var ne=i.useRef();ne.current=j;var q=i.useCallback(function(){for(var De,ze=arguments.length,ut=new Array(ze),gt=0;gt<ze;gt++)ut[gt]=arguments[gt];return(De=ne.current)===null||De===void 0?void 0:De.call.apply(De,[ne].concat(ut))},[]);return q}function Q(j){if(Array.isArray(j))return j}function de(j,ne){var q=j==null?null:typeof Symbol!="undefined"&&j[Symbol.iterator]||j["@@iterator"];if(q!=null){var De,ze,ut,gt,Lt=[],wt=!0,Ht=!1;try{if(ut=(q=q.call(j)).next,ne===0){if(Object(q)!==q)return;wt=!1}else for(;!(wt=(De=ut.call(q)).done)&&(Lt.push(De.value),Lt.length!==ne);wt=!0);}catch(xt){Ht=!0,ze=xt}finally{try{if(!wt&&q.return!=null&&(gt=q.return(),Object(gt)!==gt))return}finally{if(Ht)throw ze}}return Lt}}function ve(j,ne){(ne==null||ne>j.length)&&(ne=j.length);for(var q=0,De=new Array(ne);q<ne;q++)De[q]=j[q];return De}function Ke(j,ne){if(j){if(typeof j=="string")return ve(j,ne);var q=Object.prototype.toString.call(j).slice(8,-1);if(q==="Object"&&j.constructor&&(q=j.constructor.name),q==="Map"||q==="Set")return Array.from(j);if(q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(q))return ve(j,ne)}}function We(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ct(j,ne){return Q(j)||de(j,ne)||Ke(j,ne)||We()}function at(j){"@babel/helpers - typeof";return at=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ne){return typeof ne}:function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},at(j)}function nt(j,ne){if(at(j)!=="object"||j===null)return j;var q=j[Symbol.toPrimitive];if(q!==void 0){var De=q.call(j,ne||"default");if(at(De)!=="object")return De;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ne==="string"?String:Number)(j)}function et(j){var ne=nt(j,"string");return at(ne)==="symbol"?ne:String(ne)}function St(j,ne,q){return ne=et(ne),ne in j?Object.defineProperty(j,ne,{value:q,enumerable:!0,configurable:!0,writable:!0}):j[ne]=q,j}function mt(j,ne){var q=Object.keys(j);if(Object.getOwnPropertySymbols){var De=Object.getOwnPropertySymbols(j);ne&&(De=De.filter(function(ze){return Object.getOwnPropertyDescriptor(j,ze).enumerable})),q.push.apply(q,De)}return q}function Tt(j){for(var ne=1;ne<arguments.length;ne++){var q=arguments[ne]!=null?arguments[ne]:{};ne%2?mt(Object(q),!0).forEach(function(De){St(j,De,q[De])}):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(q)):mt(Object(q)).forEach(function(De){Object.defineProperty(j,De,Object.getOwnPropertyDescriptor(q,De))})}return j}function Pt(){var j=Tt({},t);return j.useId}var Xe=0;function st(){}var Rt=Pt(),jt=Rt?function(ne){var q=Rt();return ne||q}:function(ne){var q=i.useState("ssr-id"),De=ct(q,2),ze=De[0],ut=De[1];return i.useEffect(function(){var gt=Xe;Xe+=1,ut("rc_unique_".concat(gt))},[]),ne||ze};function qt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ar=qt()?i.useLayoutEffect:i.useEffect,jr=function(ne,q){var De=i.useRef(!0);Ar(function(){return ne(De.current)},q),Ar(function(){return De.current=!1,function(){De.current=!0}},[])},Cr=function(ne,q){jr(function(De){if(!De)return ne()},q)},lr=jr,Hr=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var j=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(j)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(j==null?void 0:j.substr(0,4))};function Jr(){return Jr=Object.assign?Object.assign.bind():function(j){for(var ne=1;ne<arguments.length;ne++){var q=arguments[ne];for(var De in q)({}).hasOwnProperty.call(q,De)&&(j[De]=q[De])}return j},Jr.apply(null,arguments)}var Qt=B(62874),Nr=B(52481);function Rr(j,ne,q){var De=i.useRef({});return(!("value"in De.current)||q(De.current.condition,ne))&&(De.current.value=j(),De.current.condition=ne),De.current.value}var rr=Symbol.for("react.element"),pr=Symbol.for("react.transitional.element"),gr=Symbol.for("react.fragment");function nn(j){return j&&at(j)==="object"&&(j.$$typeof===rr||j.$$typeof===pr)&&j.type===gr}var ar=Number(i.version.split(".")[0]),Tr=function(ne,q){typeof ne=="function"?ne(q):at(ne)==="object"&&ne&&"current"in ne&&(ne.current=q)},an=function(){for(var ne=arguments.length,q=new Array(ne),De=0;De<ne;De++)q[De]=arguments[De];var ze=q.filter(Boolean);return ze.length<=1?ze[0]:function(ut){q.forEach(function(gt){Tr(gt,ut)})}},hn=function(){for(var ne=arguments.length,q=new Array(ne),De=0;De<ne;De++)q[De]=arguments[De];return Rr(function(){return an.apply(void 0,q)},q,function(ze,ut){return ze.length!==ut.length||ze.every(function(gt,Lt){return gt!==ut[Lt]})})},Tn=function(ne){var q,De;if(!ne)return!1;if(yi(ne)&&ar>=19)return!0;var ze=(0,Nr.isMemo)(ne)?ne.type.type:ne.type;return!(typeof ze=="function"&&!((q=ze.prototype)!==null&&q!==void 0&&q.render)&&ze.$$typeof!==Nr.ForwardRef||typeof ne=="function"&&!((De=ne.prototype)!==null&&De!==void 0&&De.render)&&ne.$$typeof!==Nr.ForwardRef)};function yi(j){return(0,i.isValidElement)(j)&&!nn(j)}var as=function(ne){return yi(ne)&&Tn(ne)},Za=function(ne){if(ne&&yi(ne)){var q=ne;return q.props.propertyIsEnumerable("ref")?q.props.ref:q.ref}return null};function Qn(j){var ne=j.prefixCls,q=j.align,De=j.arrow,ze=j.arrowPos,ut=De||{},gt=ut.className,Lt=ut.content,wt=ze.x,Ht=wt===void 0?0:wt,xt=ze.y,bt=xt===void 0?0:xt,Ot=i.useRef();if(!q||!q.points)return null;var Mt={position:"absolute"};if(q.autoArrow!==!1){var Gt=q.points[0],Br=q.points[1],nr=Gt[0],qr=Gt[1],Pr=Br[0],xr=Br[1];nr===Pr||!["t","b"].includes(nr)?Mt.top=bt:nr==="t"?Mt.top=0:Mt.bottom=0,qr===xr||!["l","r"].includes(qr)?Mt.left=Ht:qr==="l"?Mt.left=0:Mt.right=0}return i.createElement("div",{ref:Ot,className:qe()("".concat(ne,"-arrow"),gt),style:Mt},Lt)}function Ga(j){var ne=j.prefixCls,q=j.open,De=j.zIndex,ze=j.mask,ut=j.motion;return ze?i.createElement(Qt.Z,Jr({},ut,{motionAppear:!0,visible:q,removeOnLeave:!0}),function(gt){var Lt=gt.className;return i.createElement("div",{style:{zIndex:De},className:qe()("".concat(ne,"-mask"),Lt)})}):null}var $a=i.memo(function(j){var ne=j.children;return ne},function(j,ne){return ne.cache}),Pa=$a,gi=i.forwardRef(function(j,ne){var q=j.popup,De=j.className,ze=j.prefixCls,ut=j.style,gt=j.target,Lt=j.onVisibleChanged,wt=j.open,Ht=j.keepDom,xt=j.fresh,bt=j.onClick,Ot=j.mask,Mt=j.arrow,Gt=j.arrowPos,Br=j.align,nr=j.motion,qr=j.maskMotion,Pr=j.forceRender,xr=j.getPopupContainer,en=j.autoDestroy,tn=j.portal,Yt=j.zIndex,Jn=j.onMouseEnter,wn=j.onMouseLeave,Bn=j.onPointerEnter,bi=j.onPointerDownCapture,qn=j.ready,ui=j.offsetX,bn=j.offsetY,li=j.offsetR,mi=j.offsetB,Di=j.onAlign,Ni=j.onPrepare,Pn=j.stretch,ei=j.targetWidth,Gr=j.targetHeight,Pi=typeof q=="function"?q():q,Bi=wt||Ht,fi=(xr==null?void 0:xr.length)>0,zr=i.useState(!xr||!fi),Li=l(zr,2),ua=Li[0],la=Li[1];if(lr(function(){!ua&&fi&>&&la(!0)},[ua,fi,gt]),!ua)return null;var ti="auto",Ln={left:"-1000vw",top:"-1000vh",right:ti,bottom:ti};if(qn||!wt){var Zi,ea=Br.points,Vn=Br.dynamicInset||((Zi=Br._experimental)===null||Zi===void 0?void 0:Zi.dynamicInset),Si=Vn&&ea[0][1]==="r",ci=Vn&&ea[0][0]==="b";Si?(Ln.right=li,Ln.left=ti):(Ln.left=ui,Ln.right=ti),ci?(Ln.bottom=mi,Ln.top=ti):(Ln.top=bn,Ln.bottom=ti)}var zn={};return Pn&&(Pn.includes("height")&&Gr?zn.height=Gr:Pn.includes("minHeight")&&Gr&&(zn.minHeight=Gr),Pn.includes("width")&&ei?zn.width=ei:Pn.includes("minWidth")&&ei&&(zn.minWidth=ei)),wt||(zn.pointerEvents="none"),i.createElement(tn,{open:Pr||Bi,getContainer:xr&&function(){return xr(gt)},autoDestroy:en},i.createElement(Ga,{prefixCls:ze,open:wt,zIndex:Yt,mask:Ot,motion:qr}),i.createElement(pt.Z,{onResize:Di,disabled:!wt},function(Gi){return i.createElement(Qt.Z,Jr({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Pr,leavedClassName:"".concat(ze,"-hidden")},nr,{onAppearPrepare:Ni,onEnterPrepare:Ni,visible:wt,onVisibleChanged:function(ri){var vn;nr==null||(vn=nr.onVisibleChanged)===null||vn===void 0||vn.call(nr,ri),Lt(ri)}}),function($i,ri){var vn=$i.className,ni=$i.style,di=qe()(ze,vn,De);return i.createElement("div",{ref:an(Gi,ne,ri),className:di,style:M(M(M(M({"--arrow-x":"".concat(Gt.x||0,"px"),"--arrow-y":"".concat(Gt.y||0,"px")},Ln),zn),ni),{},{boxSizing:"border-box",zIndex:Yt},ut),onMouseEnter:Jn,onMouseLeave:wn,onPointerEnter:Bn,onClick:bt,onPointerDownCapture:bi},Mt&&i.createElement(Qn,{prefixCls:ze,arrow:Mt,arrowPos:Gt,align:Br}),i.createElement(Pa,{cache:!wt&&!xt},Pi))})}))}),ki=gi,xi=i.forwardRef(function(j,ne){var q=j.children,De=j.getTriggerDOMNode,ze=Tn(q),ut=i.useCallback(function(Lt){Tr(ne,De?De(Lt):Lt)},[De]),gt=hn(ut,Za(q));return ze?i.cloneElement(q,{ref:gt}):q}),Ei=xi,ba=i.createContext(null),ss=ba;function Ua(j){return j?Array.isArray(j)?j:[j]:[]}function Ya(j,ne,q,De){return i.useMemo(function(){var ze=Ua(q!=null?q:ne),ut=Ua(De!=null?De:ne),gt=new Set(ze),Lt=new Set(ut);return j&&(gt.has("hover")&&(gt.delete("hover"),gt.add("click")),Lt.has("hover")&&(Lt.delete("hover"),Lt.add("click"))),[gt,Lt]},[j,ne,q,De])}var Ts=function(j){if(!j)return!1;if(j instanceof Element){if(j.offsetParent)return!0;if(j.getBBox){var ne=j.getBBox(),q=ne.width,De=ne.height;if(q||De)return!0}if(j.getBoundingClientRect){var ze=j.getBoundingClientRect(),ut=ze.width,gt=ze.height;if(ut||gt)return!0}}return!1};function Sa(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],q=arguments.length>2?arguments[2]:void 0;return q?j[0]===ne[0]:j[0]===ne[0]&&j[1]===ne[1]}function ws(j,ne,q,De){for(var ze=q.points,ut=Object.keys(j),gt=0;gt<ut.length;gt+=1){var Lt,wt=ut[gt];if(Sa((Lt=j[wt])===null||Lt===void 0?void 0:Lt.points,ze,De))return"".concat(ne,"-placement-").concat(wt)}return""}function La(j,ne,q,De){return ne||(q?{motionName:"".concat(j,"-").concat(q)}:De?{motionName:De}:null)}function qi(j){return j.ownerDocument.defaultView}function Ka(j){for(var ne=[],q=j==null?void 0:j.parentElement,De=["hidden","scroll","clip","auto"];q;){var ze=qi(q).getComputedStyle(q),ut=ze.overflowX,gt=ze.overflowY,Lt=ze.overflow;[ut,gt,Lt].some(function(wt){return De.includes(wt)})&&ne.push(q),q=q.parentElement}return ne}function oa(j){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(j)?ne:j}function Fi(j){return oa(parseFloat(j),0)}function Vi(j,ne){var q=M({},j);return(ne||[]).forEach(function(De){if(!(De instanceof HTMLBodyElement||De instanceof HTMLHtmlElement)){var ze=qi(De).getComputedStyle(De),ut=ze.overflow,gt=ze.overflowClipMargin,Lt=ze.borderTopWidth,wt=ze.borderBottomWidth,Ht=ze.borderLeftWidth,xt=ze.borderRightWidth,bt=De.getBoundingClientRect(),Ot=De.offsetHeight,Mt=De.clientHeight,Gt=De.offsetWidth,Br=De.clientWidth,nr=Fi(Lt),qr=Fi(wt),Pr=Fi(Ht),xr=Fi(xt),en=oa(Math.round(bt.width/Gt*1e3)/1e3),tn=oa(Math.round(bt.height/Ot*1e3)/1e3),Yt=(Gt-Br-Pr-xr)*en,Jn=(Ot-Mt-nr-qr)*tn,wn=nr*tn,Bn=qr*tn,bi=Pr*en,qn=xr*en,ui=0,bn=0;if(ut==="clip"){var li=Fi(gt);ui=li*en,bn=li*tn}var mi=bt.x+bi-ui,Di=bt.y+wn-bn,Ni=mi+bt.width+2*ui-bi-qn-Yt,Pn=Di+bt.height+2*bn-wn-Bn-Jn;q.left=Math.max(q.left,mi),q.top=Math.max(q.top,Di),q.right=Math.min(q.right,Ni),q.bottom=Math.min(q.bottom,Pn)}}),q}function Oa(j){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,q="".concat(ne),De=q.match(/^(.*)\%$/);return De?j*(parseFloat(De[1])/100):parseFloat(q)}function ds(j,ne){var q=ne||[],De=l(q,2),ze=De[0],ut=De[1];return[Oa(j.width,ze),Oa(j.height,ut)]}function ks(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[j[0],j[1]]}function zi(j,ne){var q=ne[0],De=ne[1],ze,ut;return q==="t"?ut=j.y:q==="b"?ut=j.y+j.height:ut=j.y+j.height/2,De==="l"?ze=j.x:De==="r"?ze=j.x+j.width:ze=j.x+j.width/2,{x:ze,y:ut}}function Ri(j,ne){var q={t:"b",b:"t",l:"r",r:"l"};return j.map(function(De,ze){return ze===ne?q[De]||"c":De}).join("")}function js(j,ne,q,De,ze,ut,gt){var Lt=i.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:ze[De]||{}}),wt=l(Lt,2),Ht=wt[0],xt=wt[1],bt=i.useRef(0),Ot=i.useMemo(function(){return ne?Ka(ne):[]},[ne]),Mt=i.useRef({}),Gt=function(){Mt.current={}};j||Gt();var Br=ie(function(){if(ne&&q&&j){let Ie=function(Je,it){var vt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ia,At=zr.x+Je,Wt=zr.y+it,Dt=At+Si,Ft=Wt+Vn,Nt=Math.max(At,vt.left),tt=Math.max(Wt,vt.top),yt=Math.min(Dt,vt.right),Bt=Math.min(Ft,vt.bottom);return Math.max(0,(yt-Nt)*(Bt-tt))},Ve=function(){qa=zr.y+Sn,ma=qa+Vn,Ha=zr.x+An,fs=Ha+Si};var Pr,xr,en,tn,Yt=ne,Jn=Yt.ownerDocument,wn=qi(Yt),Bn=wn.getComputedStyle(Yt),bi=Bn.width,qn=Bn.height,ui=Bn.position,bn=Yt.style.left,li=Yt.style.top,mi=Yt.style.right,Di=Yt.style.bottom,Ni=Yt.style.overflow,Pn=M(M({},ze[De]),ut),ei=Jn.createElement("div");(Pr=Yt.parentElement)===null||Pr===void 0||Pr.appendChild(ei),ei.style.left="".concat(Yt.offsetLeft,"px"),ei.style.top="".concat(Yt.offsetTop,"px"),ei.style.position=ui,ei.style.height="".concat(Yt.offsetHeight,"px"),ei.style.width="".concat(Yt.offsetWidth,"px"),Yt.style.left="0",Yt.style.top="0",Yt.style.right="auto",Yt.style.bottom="auto",Yt.style.overflow="hidden";var Gr;if(Array.isArray(q))Gr={x:q[0],y:q[1],width:0,height:0};else{var Pi,Bi,fi=q.getBoundingClientRect();fi.x=(Pi=fi.x)!==null&&Pi!==void 0?Pi:fi.left,fi.y=(Bi=fi.y)!==null&&Bi!==void 0?Bi:fi.top,Gr={x:fi.x,y:fi.y,width:fi.width,height:fi.height}}var zr=Yt.getBoundingClientRect();zr.x=(xr=zr.x)!==null&&xr!==void 0?xr:zr.left,zr.y=(en=zr.y)!==null&&en!==void 0?en:zr.top;var Li=Jn.documentElement,ua=Li.clientWidth,la=Li.clientHeight,ti=Li.scrollWidth,Ln=Li.scrollHeight,Zi=Li.scrollTop,ea=Li.scrollLeft,Vn=zr.height,Si=zr.width,ci=Gr.height,zn=Gr.width,Gi={left:0,top:0,right:ua,bottom:la},$i={left:-ea,top:-Zi,right:ti-ea,bottom:Ln-Zi},ri=Pn.htmlRegion,vn="visible",ni="visibleFirst";ri!=="scroll"&&ri!==ni&&(ri=vn);var di=ri===ni,hs=Vi($i,Ot),pn=Vi(Gi,Ot),Ia=ri===vn?pn:hs,Wa=di?pn:Ia;Yt.style.left="auto",Yt.style.top="auto",Yt.style.right="0",Yt.style.bottom="0";var ii=Yt.getBoundingClientRect();Yt.style.left=bn,Yt.style.top=li,Yt.style.right=mi,Yt.style.bottom=Di,Yt.style.overflow=Ni,(tn=Yt.parentElement)===null||tn===void 0||tn.removeChild(ei);var ta=oa(Math.round(Si/parseFloat(bi)*1e3)/1e3),ra=oa(Math.round(Vn/parseFloat(qn)*1e3)/1e3);if(ta===0||ra===0||Se(q)&&!Ts(q))return;var fa=Pn.offset,_r=Pn.targetOffset,Zr=ds(zr,fa),fn=l(Zr,2),Zn=fn[0],On=fn[1],As=ds(Gr,_r),us=l(As,2),ca=us[0],Xa=us[1];Gr.x-=ca,Gr.y-=Xa;var Hs=Pn.points||[],vs=l(Hs,2),Ns=vs[0],Qa=vs[1],Ma=ks(Qa),Ui=ks(Ns),da=zi(Gr,Ma),Ki=zi(zr,Ui),ja=M({},Pn),An=da.x-Ki.x+Zn,Sn=da.y-Ki.y+On,xa=Ie(An,Sn),Ja=Ie(An,Sn,pn),Cs=zi(Gr,["t","l"]),ha=zi(zr,["t","l"]),Bs=zi(Gr,["b","r"]),ps=zi(zr,["b","r"]),Zt=Pn.overflow||{},va=Zt.adjustX,gs=Zt.adjustY,Rs=Zt.shiftX,ls=Zt.shiftY,Ps=function(it){return typeof it=="boolean"?it:it>=0},qa,ma,Ha,fs;Ve();var ms=Ps(gs),Ls=Ui[0]===Ma[0];if(ms&&Ui[0]==="t"&&(ma>Wa.bottom||Mt.current.bt)){var Oi=Sn;Ls?Oi-=Vn-ci:Oi=Cs.y-ps.y-On;var Us=Ie(An,Oi),Qs=Ie(An,Oi,pn);Us>xa||Us===xa&&(!di||Qs>=Ja)?(Mt.current.bt=!0,Sn=Oi,On=-On,ja.points=[Ri(Ui,0),Ri(Ma,0)]):Mt.current.bt=!1}if(ms&&Ui[0]==="b"&&(qa<Wa.top||Mt.current.tb)){var cs=Sn;Ls?cs+=Vn-ci:cs=Bs.y-ha.y-On;var _s=Ie(An,cs),Gn=Ie(An,cs,pn);_s>xa||_s===xa&&(!di||Gn>=Ja)?(Mt.current.tb=!0,Sn=cs,On=-On,ja.points=[Ri(Ui,0),Ri(Ma,0)]):Mt.current.tb=!1}var cn=Ps(va),yn=Ui[1]===Ma[1];if(cn&&Ui[1]==="l"&&(fs>Wa.right||Mt.current.rl)){var hi=An;yn?hi-=Si-zn:hi=Cs.x-ps.x-Zn;var Wi=Ie(hi,Sn),ka=Ie(hi,Sn,pn);Wi>xa||Wi===xa&&(!di||ka>=Ja)?(Mt.current.rl=!0,An=hi,Zn=-Zn,ja.points=[Ri(Ui,1),Ri(Ma,1)]):Mt.current.rl=!1}if(cn&&Ui[1]==="r"&&(Ha<Wa.left||Mt.current.lr)){var Da=An;yn?Da+=Si-zn:Da=Bs.x-ha.x-Zn;var Vs=Ie(Da,Sn),Os=Ie(Da,Sn,pn);Vs>xa||Vs===xa&&(!di||Os>=Ja)?(Mt.current.lr=!0,An=Da,Zn=-Zn,ja.points=[Ri(Ui,1),Ri(Ma,1)]):Mt.current.lr=!1}Ve();var Ta=Rs===!0?0:Rs;typeof Ta=="number"&&(Ha<pn.left&&(An-=Ha-pn.left-Zn,Gr.x+zn<pn.left+Ta&&(An+=Gr.x-pn.left+zn-Ta)),fs>pn.right&&(An-=fs-pn.right-Zn,Gr.x>pn.right-Ta&&(An+=Gr.x-pn.right+Ta)));var Yi=ls===!0?0:ls;typeof Yi=="number"&&(qa<pn.top&&(Sn-=qa-pn.top-On,Gr.y+ci<pn.top+Yi&&(Sn+=Gr.y-pn.top+ci-Yi)),ma>pn.bottom&&(Sn-=ma-pn.bottom-On,Gr.y>pn.bottom-Yi&&(Sn+=Gr.y-pn.bottom+Yi)));var es=zr.x+An,ts=es+Si,Fa=zr.y+Sn,Ks=Fa+Vn,zs=Gr.x,so=zs+zn,Js=Gr.y,eo=Js+ci,to=Math.max(es,zs),ro=Math.min(ts,so),ys=(to+ro)/2,no=ys-es,io=Math.max(Fa,Js),I=Math.min(Ks,eo),F=(io+I)/2,V=F-Fa;gt==null||gt(ne,ja);var $=ii.right-zr.x-(An+zr.width),me=ii.bottom-zr.y-(Sn+zr.height);ta===1&&(An=Math.round(An),$=Math.round($)),ra===1&&(Sn=Math.round(Sn),me=Math.round(me));var Oe={ready:!0,offsetX:An/ta,offsetY:Sn/ra,offsetR:$/ta,offsetB:me/ra,arrowX:no/ta,arrowY:V/ra,scaleX:ta,scaleY:ra,align:ja};xt(Oe)}}),nr=function(){bt.current+=1;var xr=bt.current;Promise.resolve().then(function(){bt.current===xr&&Br()})},qr=function(){xt(function(xr){return M(M({},xr),{},{ready:!1})})};return lr(qr,[De]),lr(function(){j||qr()},[j]),[Ht.ready,Ht.offsetX,Ht.offsetY,Ht.offsetR,Ht.offsetB,Ht.arrowX,Ht.arrowY,Ht.scaleX,Ht.scaleY,Ht.align,nr]}function os(j){if(Array.isArray(j))return e(j)}function Fs(j){if(typeof Symbol!="undefined"&&j[Symbol.iterator]!=null||j["@@iterator"]!=null)return Array.from(j)}function xe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ge(j){return os(j)||Fs(j)||O(j)||xe()}function ot(j,ne,q,De,ze){lr(function(){if(j&&ne&&q){let bt=function(){De(),ze()};var ut=ne,gt=q,Lt=Ka(ut),wt=Ka(gt),Ht=qi(gt),xt=new Set([Ht].concat(Ge(Lt),Ge(wt)));return xt.forEach(function(Ot){Ot.addEventListener("scroll",bt,{passive:!0})}),Ht.addEventListener("resize",bt,{passive:!0}),De(),function(){xt.forEach(function(Ot){Ot.removeEventListener("scroll",bt),Ht.removeEventListener("resize",bt)})}}},[j,ne,q])}var He={},dt=[],ht=function(ne){dt.push(ne)};function _t(j,ne){if(0)var q}function It(j,ne){if(0)var q}function sr(){He={}}function Vt(j,ne,q){!ne&&!He[q]&&(j(!1,q),He[q]=!0)}function Sr(j,ne){Vt(_t,j,ne)}function fr(j,ne){Vt(It,j,ne)}Sr.preMessage=ht,Sr.resetWarned=sr,Sr.noteOnce=fr;var Dr=null;function Vr(j,ne,q,De,ze,ut,gt,Lt){var wt=i.useRef(j);wt.current=j;var Ht=i.useRef(!1);i.useEffect(function(){if(ne&&De&&(!ze||ut)){var bt=function(){Ht.current=!1},Ot=function(en){var tn;wt.current&&!gt(((tn=en.composedPath)===null||tn===void 0||(tn=tn.call(en))===null||tn===void 0?void 0:tn[0])||en.target)&&!Ht.current&&Lt(!1)},Mt=qi(De);Mt.addEventListener("pointerdown",bt,!0),Mt.addEventListener("mousedown",Ot,!0),Mt.addEventListener("contextmenu",Ot,!0);var Gt=X(q);if(Gt&&(Gt.addEventListener("mousedown",Ot,!0),Gt.addEventListener("contextmenu",Ot,!0)),0)var Br,nr,qr,Pr;return function(){Mt.removeEventListener("pointerdown",bt,!0),Mt.removeEventListener("mousedown",Ot,!0),Mt.removeEventListener("contextmenu",Ot,!0),Gt&&(Gt.removeEventListener("mousedown",Ot,!0),Gt.removeEventListener("contextmenu",Ot,!0))}}},[ne,q,De,ze,ut]);function xt(){Ht.current=!0}return xt}var mr=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function sn(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ft,ne=i.forwardRef(function(q,De){var ze=q.prefixCls,ut=ze===void 0?"rc-trigger-popup":ze,gt=q.children,Lt=q.action,wt=Lt===void 0?"hover":Lt,Ht=q.showAction,xt=q.hideAction,bt=q.popupVisible,Ot=q.defaultPopupVisible,Mt=q.onPopupVisibleChange,Gt=q.afterPopupVisibleChange,Br=q.mouseEnterDelay,nr=q.mouseLeaveDelay,qr=nr===void 0?.1:nr,Pr=q.focusDelay,xr=q.blurDelay,en=q.mask,tn=q.maskClosable,Yt=tn===void 0?!0:tn,Jn=q.getPopupContainer,wn=q.forceRender,Bn=q.autoDestroy,bi=q.destroyPopupOnHide,qn=q.popup,ui=q.popupClassName,bn=q.popupStyle,li=q.popupPlacement,mi=q.builtinPlacements,Di=mi===void 0?{}:mi,Ni=q.popupAlign,Pn=q.zIndex,ei=q.stretch,Gr=q.getPopupClassNameFromAlign,Pi=q.fresh,Bi=q.alignPoint,fi=q.onPopupClick,zr=q.onPopupAlign,Li=q.arrow,ua=q.popupMotion,la=q.maskMotion,ti=q.popupTransitionName,Ln=q.popupAnimation,Zi=q.maskTransitionName,ea=q.maskAnimation,Vn=q.className,Si=q.getTriggerDOMNode,ci=h(q,mr),zn=Bn||bi||!1,Gi=i.useState(!1),$i=l(Gi,2),ri=$i[0],vn=$i[1];lr(function(){vn(Hr())},[]);var ni=i.useRef({}),di=i.useContext(ss),hs=i.useMemo(function(){return{registerSubPopup:function(yt,Bt){ni.current[yt]=Bt,di==null||di.registerSubPopup(yt,Bt)}}},[di]),pn=jt(),Ia=i.useState(null),Wa=l(Ia,2),ii=Wa[0],ta=Wa[1],ra=i.useRef(null),fa=ie(function(tt){ra.current=tt,Se(tt)&&ii!==tt&&ta(tt),di==null||di.registerSubPopup(pn,tt)}),_r=i.useState(null),Zr=l(_r,2),fn=Zr[0],Zn=Zr[1],On=i.useRef(null),As=ie(function(tt){Se(tt)&&fn!==tt&&(Zn(tt),On.current=tt)}),us=i.Children.only(gt),ca=(us==null?void 0:us.props)||{},Xa={},Hs=ie(function(tt){var yt,Bt,Ut=fn;return(Ut==null?void 0:Ut.contains(tt))||((yt=X(Ut))===null||yt===void 0?void 0:yt.host)===tt||tt===Ut||(ii==null?void 0:ii.contains(tt))||((Bt=X(ii))===null||Bt===void 0?void 0:Bt.host)===tt||tt===ii||Object.values(ni.current).some(function(kt){return(kt==null?void 0:kt.contains(tt))||tt===kt})}),vs=La(ut,ua,Ln,ti),Ns=La(ut,la,ea,Zi),Qa=i.useState(Ot||!1),Ma=l(Qa,2),Ui=Ma[0],da=Ma[1],Ki=bt!=null?bt:Ui,ja=ie(function(tt){bt===void 0&&da(tt)});lr(function(){da(bt||!1)},[bt]);var An=i.useRef(Ki);An.current=Ki;var Sn=i.useRef([]);Sn.current=[];var xa=ie(function(tt){var yt;ja(tt),((yt=Sn.current[Sn.current.length-1])!==null&&yt!==void 0?yt:Ki)!==tt&&(Sn.current.push(tt),Mt==null||Mt(tt))}),Ja=i.useRef(),Cs=function(){clearTimeout(Ja.current)},ha=function(yt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Cs(),Bt===0?xa(yt):Ja.current=setTimeout(function(){xa(yt)},Bt*1e3)};i.useEffect(function(){return Cs},[]);var Bs=i.useState(!1),ps=l(Bs,2),Zt=ps[0],va=ps[1];lr(function(tt){(!tt||Ki)&&va(!0)},[Ki]);var gs=i.useState(null),Rs=l(gs,2),ls=Rs[0],Ps=Rs[1],qa=i.useState(null),ma=l(qa,2),Ha=ma[0],fs=ma[1],ms=function(yt){fs([yt.clientX,yt.clientY])},Ls=js(Ki,ii,Bi&&Ha!==null?Ha:fn,li,Di,Ni,zr),Oi=l(Ls,11),Us=Oi[0],Qs=Oi[1],cs=Oi[2],_s=Oi[3],Gn=Oi[4],cn=Oi[5],yn=Oi[6],hi=Oi[7],Wi=Oi[8],ka=Oi[9],Da=Oi[10],Vs=Ya(ri,wt,Ht,xt),Os=l(Vs,2),Ta=Os[0],Yi=Os[1],es=Ta.has("click"),ts=Yi.has("click")||Yi.has("contextMenu"),Fa=ie(function(){Zt||Da()}),Ks=function(){An.current&&Bi&&ts&&ha(!1)};ot(Ki,fn,ii,Fa,Ks),lr(function(){Fa()},[Ha,li]),lr(function(){Ki&&!(Di!=null&&Di[li])&&Fa()},[JSON.stringify(Ni)]);var zs=i.useMemo(function(){var tt=ws(Di,ut,ka,Bi);return qe()(tt,Gr==null?void 0:Gr(ka))},[ka,Gr,Di,ut,Bi]);i.useImperativeHandle(De,function(){return{nativeElement:On.current,popupElement:ra.current,forceAlign:Fa}});var so=i.useState(0),Js=l(so,2),eo=Js[0],to=Js[1],ro=i.useState(0),ys=l(ro,2),no=ys[0],io=ys[1],I=function(){if(ei&&fn){var yt=fn.getBoundingClientRect();to(yt.width),io(yt.height)}},F=function(){I(),Fa()},V=function(yt){va(!1),Da(),Gt==null||Gt(yt)},$=function(){return new Promise(function(yt){I(),Ps(function(){return yt})})};lr(function(){ls&&(Da(),ls(),Ps(null))},[ls]);function me(tt,yt,Bt,Ut){Xa[tt]=function(kt){var or;Ut==null||Ut(kt),ha(yt,Bt);for(var Kt=arguments.length,Lr=new Array(Kt>1?Kt-1:0),yr=1;yr<Kt;yr++)Lr[yr-1]=arguments[yr];(or=ca[tt])===null||or===void 0||or.call.apply(or,[ca,kt].concat(Lr))}}(es||ts)&&(Xa.onClick=function(tt){var yt;An.current&&ts?ha(!1):!An.current&&es&&(ms(tt),ha(!0));for(var Bt=arguments.length,Ut=new Array(Bt>1?Bt-1:0),kt=1;kt<Bt;kt++)Ut[kt-1]=arguments[kt];(yt=ca.onClick)===null||yt===void 0||yt.call.apply(yt,[ca,tt].concat(Ut))});var Oe=Vr(Ki,ts,fn,ii,en,Yt,Hs,ha),Ie=Ta.has("hover"),Ve=Yi.has("hover"),Je,it;Ie&&(me("onMouseEnter",!0,Br,function(tt){ms(tt)}),me("onPointerEnter",!0,Br,function(tt){ms(tt)}),Je=function(yt){(Ki||Zt)&&ii!==null&&ii!==void 0&&ii.contains(yt.target)&&ha(!0,Br)},Bi&&(Xa.onMouseMove=function(tt){var yt;(yt=ca.onMouseMove)===null||yt===void 0||yt.call(ca,tt)})),Ve&&(me("onMouseLeave",!1,qr),me("onPointerLeave",!1,qr),it=function(){ha(!1,qr)}),Ta.has("focus")&&me("onFocus",!0,Pr),Yi.has("focus")&&me("onBlur",!1,xr),Ta.has("contextMenu")&&(Xa.onContextMenu=function(tt){var yt;An.current&&Yi.has("contextMenu")?ha(!1):(ms(tt),ha(!0)),tt.preventDefault();for(var Bt=arguments.length,Ut=new Array(Bt>1?Bt-1:0),kt=1;kt<Bt;kt++)Ut[kt-1]=arguments[kt];(yt=ca.onContextMenu)===null||yt===void 0||yt.call.apply(yt,[ca,tt].concat(Ut))}),Vn&&(Xa.className=qe()(ca.className,Vn));var vt=M(M({},ca),Xa),At={},Wt=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Wt.forEach(function(tt){ci[tt]&&(At[tt]=function(){for(var yt,Bt=arguments.length,Ut=new Array(Bt),kt=0;kt<Bt;kt++)Ut[kt]=arguments[kt];(yt=vt[tt])===null||yt===void 0||yt.call.apply(yt,[vt].concat(Ut)),ci[tt].apply(ci,Ut)})});var Dt=i.cloneElement(us,M(M({},vt),At)),Ft={x:cn,y:yn},Nt=Li?M({},Li!==!0?Li:{}):null;return i.createElement(i.Fragment,null,i.createElement(pt.Z,{disabled:!Ki,ref:As,onResize:F},i.createElement(Ei,{getTriggerDOMNode:Si},Dt)),i.createElement(ss.Provider,{value:hs},i.createElement(ki,{portal:j,ref:fa,prefixCls:ut,popup:qn,className:qe()(ui,zs),style:bn,target:fn,onMouseEnter:Je,onMouseLeave:it,onPointerEnter:Je,zIndex:Pn,open:Ki,keepDom:Zt,fresh:Pi,onClick:fi,onPointerDownCapture:Oe,mask:en,motion:vs,maskMotion:Ns,onVisibleChanged:V,onPrepare:$,forceRender:wn,autoDestroy:zn,getPopupContainer:Jn,align:ka,arrow:Nt,arrowPos:Ft,ready:Us,offsetX:Qs,offsetY:cs,offsetR:_s,offsetB:Gn,onAlign:Fa,stretch:ei,targetWidth:eo/hi,targetHeight:no/Wi})))});return ne}var kr=sn(ft)},31632:function(Ct,Qe){"use strict";var B;var z=typeof Symbol=="function"&&Symbol.for,oe=z?Symbol.for("react.element"):60103,te=z?Symbol.for("react.portal"):60106,U=z?Symbol.for("react.fragment"):60107,L=z?Symbol.for("react.strict_mode"):60108,M=z?Symbol.for("react.profiler"):60114,P=z?Symbol.for("react.provider"):60109,k=z?Symbol.for("react.context"):60110,e=z?Symbol.for("react.async_mode"):60111,O=z?Symbol.for("react.concurrent_mode"):60111,D=z?Symbol.for("react.forward_ref"):60112,l=z?Symbol.for("react.suspense"):60113,p=z?Symbol.for("react.suspense_list"):60120,h=z?Symbol.for("react.memo"):60115,g=z?Symbol.for("react.lazy"):60116,o=z?Symbol.for("react.block"):60121,c=z?Symbol.for("react.fundamental"):60117,y=z?Symbol.for("react.responder"):60118,u=z?Symbol.for("react.scope"):60119;function s(t){if(typeof t=="object"&&t!==null){var m=t.$$typeof;switch(m){case oe:switch(t=t.type,t){case e:case O:case U:case M:case L:case l:return t;default:switch(t=t&&t.$$typeof,t){case k:case D:case g:case h:case P:return t;default:return m}}case te:return m}}}function i(t){return s(t)===O}B=e,B=O,B=k,B=P,B=oe,B=D,B=U,B=g,B=h,B=te,B=M,B=L,B=l,B=function(t){return i(t)||s(t)===e},B=i,B=function(t){return s(t)===k},B=function(t){return s(t)===P},B=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===oe},B=function(t){return s(t)===D},B=function(t){return s(t)===U},B=function(t){return s(t)===g},Qe.isMemo=function(t){return s(t)===h},B=function(t){return s(t)===te},B=function(t){return s(t)===M},B=function(t){return s(t)===L},B=function(t){return s(t)===l},B=function(t){return typeof t=="string"||typeof t=="function"||t===U||t===O||t===M||t===L||t===l||t===p||typeof t=="object"&&t!==null&&(t.$$typeof===g||t.$$typeof===h||t.$$typeof===P||t.$$typeof===k||t.$$typeof===D||t.$$typeof===c||t.$$typeof===y||t.$$typeof===u||t.$$typeof===o)},B=s},81640:function(Ct,Qe,B){"use strict";Ct.exports=B(31632)},48482:function(Ct,Qe){"use strict";var B;var z=Symbol.for("react.element"),oe=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),P=Symbol.for("react.context"),k=Symbol.for("react.server_context"),e=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function o(c){if(typeof c=="object"&&c!==null){var y=c.$$typeof;switch(y){case z:switch(c=c.type,c){case te:case L:case U:case O:case D:return c;default:switch(c=c&&c.$$typeof,c){case k:case P:case e:case p:case l:case M:return c;default:return y}}case oe:return y}}}B=P,B=M,B=z,Qe.ForwardRef=e,B=te,B=p,B=l,B=oe,B=L,B=U,B=O,B=D,B=function(){return!1},B=function(){return!1},B=function(c){return o(c)===P},B=function(c){return o(c)===M},B=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===z},B=function(c){return o(c)===e},B=function(c){return o(c)===te},B=function(c){return o(c)===p},Qe.isMemo=function(c){return o(c)===l},B=function(c){return o(c)===oe},B=function(c){return o(c)===L},B=function(c){return o(c)===U},B=function(c){return o(c)===O},B=function(c){return o(c)===D},B=function(c){return typeof c=="string"||typeof c=="function"||c===te||c===L||c===U||c===O||c===D||c===h||typeof c=="object"&&c!==null&&(c.$$typeof===p||c.$$typeof===l||c.$$typeof===M||c.$$typeof===P||c.$$typeof===e||c.$$typeof===g||c.getModuleId!==void 0)},B=o},52481:function(Ct,Qe,B){"use strict";Ct.exports=B(48482)},26194:function(Ct,Qe,B){"use strict";var z=B(67294),oe=B(4977),te=B(85804),U=Object.defineProperty,L=Object.defineProperties,M=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,e=Object.prototype.propertyIsEnumerable,O=(h,g,o)=>g in h?U(h,g,{enumerable:!0,configurable:!0,writable:!0,value:o}):h[g]=o,D=(h,g)=>{for(var o in g||(g={}))k.call(g,o)&&O(h,o,g[o]);if(P)for(var o of P(g))e.call(g,o)&&O(h,o,g[o]);return h},l=(h,g)=>L(h,M(g));const p=({img:h,buttonProps:g={},styles:o={},customText:c,ButtonText:y,ButtonClick:u,Buttonclass:s,ButtonTwo:i,imgStyles:t,loading:m=!1,className:S=""})=>z.createElement("section",{className:`tc animated fadeIn ${S}`,style:D({color:"#999",margin:"100px auto",visibility:m?"hidden":"visible"},o)},z.createElement("img",{src:h||oe,style:l(D({},t),{pointerEvents:"none",userSelect:"none"})}),z.createElement("p",{className:"mt20 font14"},c||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),y&&z.createElement(te.ZP,D({className:s,onClick:u},g),y),i&&i);Qe.Z=p},20819:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return s}});var z=B(67294),oe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},te=B(85804),U=B(30153),L=B(36295),M=B(83062),P=B(28706),k=B(15835),e=B(26194),O=B(11320),D=B(66540),l=B(67294),p=Object.defineProperty,h=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,c=(i,t,m)=>t in i?p(i,t,{enumerable:!0,configurable:!0,writable:!0,value:m}):i[t]=m,y=(i,t)=>{for(var m in t||(t={}))g.call(t,m)&&c(i,m,t[m]);if(h)for(var m of h(t))o.call(t,m)&&c(i,m,t[m]);return i},u=(i,t,m)=>new Promise((S,f)=>{var _=w=>{try{x(m.next(w))}catch(n){f(n)}},A=w=>{try{x(m.throw(w))}catch(n){f(n)}},x=w=>w.done?S(w.value):Promise.resolve(w.value).then(_,A);x((m=m.apply(i,t)).next())}),s=({editOffice:i="view",data:t,issaver:m,onSaver:S,theme:f,type:_,filename:A,monacoEditor:x,className:w,style:n,close:a,onClose:r,hasMask:d,disabledDownload:T,onImgDimensions:b,showNodata:v,recordInfo:E})=>{const[R,C]=(0,z.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[N,K]=(0,z.useState)(""),[H,ee]=(0,z.useState)(),J=window.ENV==="build"?"/react/build":"",se=location.host.startsWith("localhost")?O.Z.PROXY_SERVER:O.Z.API_SERVER,Ee=10*(1024*1024),ge=(0,z.useRef)();t!=null&&t.startsWith("/api")&&_!=="txt"&&(t=O.Z.API_SERVER+t);const Pe=fe=>fe.substring(fe.lastIndexOf("/")+1).split(".").pop();A&&x&&(x.filename=A),(0,z.useEffect)(()=>{var fe,Be;const Ue=(Be=(fe=document.cookie)==null?void 0:fe.replace(/\s/g,""))==null?void 0:Be.split(";");Ue==null||Ue.map(re=>{let Z=re.split("=");Z[0]==="_educoder_session"&&K(Z[1])})},[]),(0,z.useEffect)(()=>{_==="office"&&(t.indexOf("bigfilescdn.")>-1||t.indexOf("bigfiles1")>-1?ee({url:t,fileType:Pe(t),model:t.indexOf("model=edit")?"edit":"view"}):$e())},[_,t]);function Ne(fe){return u(this,null,function*(){fe.data.type==="pdfdata"&&(S(fe.data.data),window.removeEventListener("message",Ne,!1)),console.log("mess---:",fe.data)})}const $e=()=>u(void 0,null,function*(){console.log("data:",t);let fe=t;t.startsWith("http")||(fe=location.origin+fe);let Be=new URL(fe).pathname.split("/").pop();const Ue=yield(0,k.gJ)({attachment_id:Be});Ue.url=se+Ue.url,ee(Ue)}),je=()=>{if(t.startsWith("http")||t.startsWith("blob:")){Ce();return}(0,P.Sv)(A||"educoder",t,A)},Ce=()=>{E&&(0,D.fc)({id:E==null?void 0:E.id,watch_type:1,course_id:E==null?void 0:E.course_id}),(0,P.Nd)(A||"educoder",decodeURIComponent(t))};return l.createElement("div",{style:y({},n||{}),className:`${d&&oe.bgBlack} ${_?oe.wrp:"hide"}`},a&&l.createElement("div",{className:oe.close,ref:ge},!!b&&l.createElement(M.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ge.current},l.createElement("span",{onClick:()=>{r(),b()}},l.createElement("i",{className:"icon-yulanpizhu"}))),!T&&l.createElement(M.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ge.current},l.createElement("span",{onClick:Ce},l.createElement("i",{className:"icon-quxiaozhiding"}))),m&&l.createElement(M.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ge.current},l.createElement("span",{className:"",onClick:()=>{const fe=document.getElementById("pdfiframe");window.addEventListener("message",Ne,!1),setTimeout(()=>{fe.contentWindow.postMessage("getData","*")},300)}},l.createElement("i",{className:"icon-baocun"}))),l.createElement(M.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ge.current},l.createElement("span",{className:"",onClick:()=>{r()}},l.createElement("i",{className:"icon-guanbi1"})))),l.createElement("div",{className:`${oe[w]} ${w} ${oe.monaco} ${_==="txt"?"show":"hide"}`},_==="txt"&&l.createElement(l.Fragment,null,l.createElement(L.ZP,y({},x)))),_==="audio"&&l.createElement("audio",{src:`${(t==null?void 0:t.indexOf("http://"))>-1||(t==null?void 0:t.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${t}`,autoPlay:!0}),_==="video"&&l.createElement(l.Fragment,null,(t==null?void 0:t.indexOf("http"))>-1?l.createElement("video",{controls:!0,src:`${t}`,autoPlay:!0}):l.createElement("video",{controls:!0,src:`data:video/mp4;base64,${t}`,autoPlay:!0})),_==="office"&&H&&l.createElement("iframe",{src:`${J}/office.html?key=${H.key}&url=${btoa(H.url)}&callbackUrl=${se+(H.callbackUrl||"")}&fileType=${H.fileType}&title=${H.title||""}&model=${i}&officeServer=${O.Z.ONLYOFFICE}&disabledDownload=${!!T}`}),_==="html"&&l.createElement("iframe",{src:t+"&disposition=inline"}),_==="pdf"&&l.createElement("iframe",{id:"pdfiframe",src:`${J}/js/pdfview/index.html?filename=${A||"educoder.pdf"}&url=${encodeURIComponent(t)}&disabledDownload=${!!T}&model=${i}`}),_==="image"&&l.createElement("img",{src:`${(t==null?void 0:t.indexOf("http://"))>-1||(t==null?void 0:t.indexOf("https://"))>-1?"":"data:image/png;base64,"}${t}`}),(_==="other"||_==="download")&&l.createElement(l.Fragment,null,v?l.createElement(e.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:l.createElement(te.ZP,{icon:l.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:je,disabled:T},"\u4E0B\u8F7D")}):l.createElement(te.ZP,{type:"primary",size:"middle",onClick:je,disabled:T},l.createElement(U.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},65226:function(Ct,Qe,B){"use strict";B.d(Qe,{z:function(){return _},Z:function(){return A}});var z=B(67294),oe=B(81897),te=B(51161),U=B(11771),L=B(67631),M=B.n(L),P=B(11320),k=B(28706),e=B(20527),O=B(25934),D=B(20819),l=B(67294),h=({html:x})=>{const w=(0,z.useRef)(null),n=(0,z.useRef)(null),a=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,z.useEffect)(()=>{const r=w.current.attachShadow({mode:"open"});n.current=document.createElement("div"),n.current.className="markdown-body",n.current.innerHTML=x,r.appendChild(n.current);const d=document.createElement("style");return d.textContent=a,r.appendChild(d),()=>{r.innerHTML=""}},[]),(0,z.useEffect)(()=>{n.current&&(n.current.innerHTML=x)},[x]),l.createElement("div",{ref:w})};function g(x){const w=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],n=new RegExp(`\\b(${w.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return x.replace(n,"").trim()}var o=Object.defineProperty,c=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,s=(x,w,n)=>w in x?o(x,w,{enumerable:!0,configurable:!0,writable:!0,value:n}):x[w]=n,i=(x,w)=>{for(var n in w||(w={}))y.call(w,n)&&s(x,n,w[n]);if(c)for(var n of c(w))u.call(w,n)&&s(x,n,w[n]);return x};const t="@\u2581\u2581@",m="@\u2581@",S=/<pre[^>]*>/g;function f(x){let w=document.createElement("div");return w.innerHTML=x,w.childNodes.length===0?"":w.childNodes[0].nodeValue}const _=(x,w)=>{x=x||"";const n=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,a=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,r=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,d=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return w?x.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(n,(T,b,v,E,R,C,N)=>{const K=b||E||C,H=v||R||N||"?";return P.Z.API_SERVER+"/api/attachments/"+K+H+"&t="+(0,k.Jn)(K,Date.now())+(T.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(x=x.replace(d,(T,b,v,E,R,C,N)=>{const K=b||E||C,H=v||R||N||"?";return P.Z.API_SERVER+"/attachments/download/"+K+H+"&t="+(0,k.Jn)(K,Date.now())+(T.indexOf(")")>-1?")":"&")}).replace(n,(T,b,v,E,R,C,N)=>{const K=b||E||C,H=v||R||N||"?";return P.Z.API_SERVER+"/api/attachments/"+K+H+"&t="+(0,k.Jn)(K,Date.now())+(T.indexOf(")")>-1?")":"&")}).replace(a,(T,b,v,E,R)=>{const C=b||E,N=v||R||"";return'"'+P.Z.API_SERVER+"/api/attachments/"+C+N+C+N+"&t="+(0,k.Jn)(C,Date.now())}).replace(r,(T,b,v,E,R)=>{const C=b||E,N=v||R||"";return"("+P.Z.API_SERVER+"/files/uploads/"+C+N+C+N+"&t="+(0,k.Jn)(C,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),x)};var A=({value:x="",className:w,showTextOnly:n,showLines:a,style:r={},stylesPrev:d={},highlightKeywords:T,showProgramFill:b,isProgramFill:v,disabledFill:E=!1,programFillValue:R,onFillChange:C=H=>{},onFillBlur:N=()=>{},onFillFocus:K=()=>{}})=>{let H=g(String(x||""));const[ee,J]=(0,z.useState)(""),[se,G]=(0,z.useState)("office"),[Ee,ge]=(0,z.useState)([]),Pe=(0,z.useRef)("a"+(0,O.Z)()),Ne={},$e=ae=>/<style[\s\S]*?>/i.test(ae||""),je=(ae,_e,ce)=>{const he=document.createElement(ae===m?"input":"textarea");he.style.width="100%",he.style.height=ae===m?"40px":"151px",he.rows=5,he.spellcheck=!1,he.name="edu-program-fill",he.placeholder="\u8BF7\u8F93\u5165",he.dataset.id=_e;const Le=Object.keys(Ne).length;return Ne[Le]=he,`<span class="edu-program-fill-wrap ${ae===m?"":"show"}" style="width:${ae===m?"600px":"100%"}" title=${ce||""}><span>${he.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ce(ae){return ae=ae.replace(/!\[.*?\]\(.*?\)/g,""),ae=ae.replace(/\[.*?\]\(.*?\)/g,""),ae=ae.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),ae=ae.replace(/<embed.*?>/g,""),ae=ae.replace(/<img.*?>/g,""),ae=ae.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),ae=ae.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),ae=ae.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),ae=ae.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),ae}const fe=ae=>!n&&$e(H)?ae:ae.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(_e,ce){let he=ce.replace(/(\n|\r)/g,"").split("}"),Le=[];return he.map(Ye=>{Ye!=""&&Le.push(`.${Pe.current} ${Ye}`)}),`<style>${Le.join("}")}</style>`}),Be=(0,z.useMemo)(()=>{try{const he=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Le=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ye=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,ke=/\(\/attachments\/download\//g;H=H.replace(ke,"("+P.Z.API_SERVER+"/attachments/download/").replace(he,"("+P.Z.API_SERVER+"/api/attachments/").replace(Le,'"'+P.Z.API_SERVER+"/api/attachments/").replace(Ye,'"'+P.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`)}catch(he){}if(b){let he=-1;return H=H.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Le,Ye,ke){var be;return++he,je(Le,he,(be=R==null?void 0:R[he])==null?void 0:be.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${fe(H||"")}</pre>`}let ae=fe(H);ae=(0,te.ZP)(ae);const _e=(0,te.ez)();H.match(/\[TOC\]/)&&(ae=ae.replace("<p>[TOC]</p>",(0,te.Qv)()),(0,te.Iy)()),ae=ae.replace(/(__special_katext_id_\d+__)/g,(he,Le)=>{const{type:Ye,expression:ke}=_e[Le];return(0,e.renderToString)(f(ke)||"",{displayMode:Ye==="block",throwOnError:!1,output:"html"})}),ae=ae.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,te.AL)();const ce=document.createElement("div");if(ce.innerHTML=ae,n)return ce.innerText;if(T){const he=T.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return le(ce,he),ce.innerHTML}return setTimeout(()=>pe(),500),ce.innerHTML},[H,T]);(0,z.useEffect)(()=>{we.current&&we.current.querySelectorAll(["input","textarea"]).forEach(_e=>{_e.oninput=Ue,_e.onblur=re,_e.onfocus=Z})},[Ee]),(0,z.useEffect)(()=>{var ae,_e,ce,he,Le;if(R!=null&&R.length)try{const Ye=we.current.querySelectorAll(".edu-program-fill-score"),ke=we.current.querySelectorAll('[name="edu-program-fill"]');for(const[be,Re]of ke.entries())Re.value=((ae=R==null?void 0:R[be])==null?void 0:ae.value)||"",((_e=R==null?void 0:R[be])==null?void 0:_e.type)==="warning"?Re.className="program-fill-warning":((ce=R==null?void 0:R[be])==null?void 0:ce.type)==="success"?Re.className="program-fill-success":Re.className="";for(const[be,Re]of Ye.entries())Re.innerHTML=(he=R==null?void 0:R[be])!=null&&he.score?`${(Le=R==null?void 0:R[be])==null?void 0:Le.score}\u5206`:"";ge(R)}catch(Ye){console.log(Ye,"error")}},[R]);const Ue=ae=>{Ee[ae.target.dataset.id]=Ee[ae.target.dataset.id]||{},Ee[ae.target.dataset.id].value=ae.target.value,ge([...Ee]),C(Ee,ae.target.dataset.id)},re=ae=>{Ee[ae.target.dataset.id]=Ee[ae.target.dataset.id]||{},Ee[ae.target.dataset.id].value=ae.target.value,ge([...Ee]),N(Ee,ae.target.dataset.id)},Z=ae=>{Ee[ae.target.dataset.id]=Ee[ae.target.dataset.id]||{},Ee[ae.target.dataset.id].value=ae.target.value,ge([...Ee]),K(Ee,ae.target.dataset.id)};function le(ae,_e){return ae.childNodes.forEach(ce=>{var he;if(ce.childNodes.length>0)le(ce,_e);else if(ce.nodeName!=="IMG")if(ce.innerHTML)ce.innerHTML=(he=ce.innerHTML)==null?void 0:he.replace(new RegExp(_e,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Le=document.createElement("span");Le.innerHTML=ce.textContent.replace(new RegExp(_e,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ce.replaceWith(Le)}})}const we=(0,z.useRef)();te.jb.WebkitLineClamp=a,a&&(r=i(i({},r),te.jb));function ue(ae){let _e=ae.target;if(_e.tagName.toUpperCase()==="A"){let ce=_e.getAttribute("href");if(ce.indexOf("office")>-1)ae.preventDefault(),J(ce),G("office");else if(ce.indexOf("application/pdf")>-1)ae.preventDefault(),J(ce),G("pdf");else if(ce.indexOf("text/html")>-1)ae.preventDefault(),J(ce),G("html");else if(ce.startsWith("#")){ae.preventDefault();let he=document.getElementById(ce.replace("#",""));he&&he.scrollIntoView(!0)}}}const pe=()=>{var ae;const _e=(ae=we.current)==null?void 0:ae.querySelectorAll("video");_e==null||_e.forEach(ce=>{if(ce.oncontextmenu=()=>!1,ce.src.indexOf(".m3u8")>-1&&!ce.canPlayType("application/vnd.apple.mpegurl")){if(M().isSupported()){var he=new(M());he.loadSource(ce.src),he.attachMedia(ce)}}})};return(0,z.useEffect)(()=>{if(we.current&&Be&&Be.match(S)&&window.PR.prettyPrint(),we.current)return we.current.addEventListener("click",ue),()=>{var ae;(ae=we.current)==null||ae.removeEventListener("click",ue),(0,te.AL)(),(0,te.Iy)()}},[Be,we.current,ue]),(0,z.useEffect)(()=>{var ae;const _e=ce=>{ce.preventDefault(),ce.clipboardData.setData("text",window.getSelection().toString())};return(ae=we.current)==null||ae.addEventListener("copy",_e),()=>{var ce;(ce=we.current)==null||ce.removeEventListener("copy",_e)}},[we.current]),z.createElement(z.Fragment,null,n&&z.createElement("div",{ref:we},Be),!n&&!$e(Be)&&z.createElement("div",{ref:we,style:i({},r),className:`${w||""} ${E?"disabled-fill":""} markdown-body ${Pe.current}`,dangerouslySetInnerHTML:{__html:Be}}),!n&&$e(Be)&&z.createElement(h,{html:Be}),z.createElement(D.Z,{close:!0,data:ee,type:ee!=null&&ee.length?se:"",style:i({},d),onClose:()=>J("")}))}},36295:function(Ct,Qe,B){"use strict";B.d(Qe,{SV:function(){return Ee},ZP:function(){return G}});var z=B(67294),oe=B(91033);const te={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},U={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},L={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},M={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},P={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
`)}]};var k=B(84204),e=B.n(k),O=(ge,Pe,Ne)=>new Promise(($e,je)=>{var Ce=Ue=>{try{Be(Ne.next(Ue))}catch(re){je(re)}},fe=Ue=>{try{Be(Ne.throw(Ue))}catch(re){je(re)}},Be=Ue=>Ue.done?$e(Ue.value):Promise.resolve(Ue.value).then(Ce,fe);Be((Ne=Ne.apply(ge,Pe)).next())});const D={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},l=(ge,Pe,Ne,$e)=>{const je=Pe.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Ne.lineNumber,endColumn:Ne.column});return Array.from(new Set(je.match(/\b\w{2,}\b/g)||[])).map(fe=>({label:fe,kind:ge.languages.CompletionItemKind.Text,insertText:fe,range:$e}))},p=(ge,Pe,Ne,$e)=>{ge.languages.registerCompletionItemProvider(Pe,{provideCompletionItems(je,Ce){const fe=je.getWordUntilPosition(Ce),Be={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Ue=je.getLineContent(Ce.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[...l(ge,je,Ce,Be),...Ne.map(Z=>({label:Z,kind:ge.languages.CompletionItemKind.Keyword,documentation:Z,insertText:Z,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be})),...$e.map(Z=>({label:Z.label,kind:ge.languages.CompletionItemKind.Snippet,documentation:Z.content,insertText:Ue.startsWith("#")?Z.content.replace(/#/,""):Z.content,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}))]}}})};var h=ge=>{D.languages.forEach(Pe=>{ge.languages.registerDocumentFormattingEditProvider(Pe,{provideDocumentFormattingEdits(Ne){return O(this,null,function*(){const $e=e()(Ne.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Ne.getFullModelRange(),text:$e}]})}})}),p(ge,"java",U.keywords,U.quickKey),p(ge,"cpp",L.keywords,L.quickKey),p(ge,"c",te.keywords,[]),p(ge,"python",M.keywords,M.quickKey),p(ge,"scala",P.keywords,P.quickKey)};const g="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var o=Object.defineProperty,c=(ge,Pe,Ne)=>Pe in ge?o(ge,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):ge[Pe]=Ne,y=(ge,Pe,Ne)=>c(ge,typeof Pe!="symbol"?Pe+"":Pe,Ne);const u=class ho{constructor(Pe,Ne,$e){this.placeholder=Pe,this.editor=Ne,this.monaco=$e,Ne.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return ho.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};y(u,"ID","editor.widget.placeholderHint");var i=u,t=B(84144),m=B(2453),S=B(83062),f=B(96486),_=B(33054),A=B(74855),x=Object.defineProperty,w=Object.defineProperties,n=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,T=(ge,Pe,Ne)=>Pe in ge?x(ge,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):ge[Pe]=Ne,b=(ge,Pe)=>{for(var Ne in Pe||(Pe={}))r.call(Pe,Ne)&&T(ge,Ne,Pe[Ne]);if(a)for(var Ne of a(Pe))d.call(Pe,Ne)&&T(ge,Ne,Pe[Ne]);return ge},v=(ge,Pe)=>w(ge,n(Pe)),E=(ge,Pe)=>{var Ne={};for(var $e in ge)r.call(ge,$e)&&Pe.indexOf($e)<0&&(Ne[$e]=ge[$e]);if(ge!=null&&a)for(var $e of a(ge))Pe.indexOf($e)<0&&d.call(ge,$e)&&(Ne[$e]=ge[$e]);return Ne},R=(ge,Pe,Ne)=>new Promise(($e,je)=>{var Ce=Ue=>{try{Be(Ne.next(Ue))}catch(re){je(re)}},fe=Ue=>{try{Be(Ne.throw(Ue))}catch(re){je(re)}},Be=Ue=>Ue.done?$e(Ue.value):Promise.resolve(Ue.value).then(Ce,fe);Be((Ne=Ne.apply(ge,Pe)).next())});function C(ge){return/^\d+$/.test(ge)?`${ge}px`:ge}function N(){}let K=!1;const H={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function ee(ge=[]){let Pe=ge;if(Array.isArray(ge)){for(let Ne=0;Ne<ge.length;Ne++){let $e=H[ge[Ne]];if($e)return $e}return Pe[0]}return H[Pe]||Pe}let J=null;const se=()=>R(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ge){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ge)}});var G=ge=>{var Pe=ge,{width:Ne="100%",height:$e="100%",value:je,language:Ce="javascript",style:fe={},options:Be={},overrideServices:Ue={},theme:re="vs-dark",onEditBlur:Z,isCopy:le=!1,onSave:we,autoHeight:ue=!1,forbidCopy:pe=!1,onChange:ae=N,editorDidMount:_e=N,onFocus:ce=N,onBreakPoint:he=N,breakPointValue:Le=[],filename:Ye="educoder.txt",errorLine:ke,errorContent:be="",highlightLine:Re,openBreakPoint:Fe=!1,placeholder:Ae="",showMiniMap:Me=!0}=Pe,rt=E(Pe,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const lt=(0,z.useRef)(),Ze=(0,z.useRef)({}),ft=(0,z.useRef)(),Et=(0,z.useRef)(),qe=(0,z.useRef)([]),pt=(0,z.useRef)(!1),Se=(0,z.useRef)(),ye=(0,z.useRef)(),Te=(0,z.useRef)(!1),[Y,W]=(0,z.useState)(!1);function X(){let Xe;return lt.current&&(Xe=new oe.Z(st=>{for(let Rt of st)(Rt.target.offsetHeight>0||Rt.target.offsetWidth>0)&&Ze.current.instance.layout()}),Xe.observe(lt.current)),Xe}function ie(){m.ZP.warning({content:decodeURIComponent(g),key:"monaco-editor-tip"})}const Q=()=>{let Xe=Ze.current.instance;if(je!=null&&Xe&&Y){const st=Xe.getModel();st&&je!==st.getValue()&&(K=!0,st.setValue(je),Xe.layout(),K=!1)}};(0,z.useEffect)(()=>{const Xe=_.Z.subscribe("formatDocument",st=>{var Rt;let jt=Ze.current.instance;(Rt=jt==null?void 0:jt.getAction)==null||Rt.call(jt,"editor.action.formatDocument").run()});return window.updateMonacoValue=st=>{ae(st)},Xe},[]),(0,z.useEffect)(()=>{var Xe;let st=Ze.current.instance;Et.current&&clearTimeout(Et.current),Et.current=setTimeout(()=>{Q()},500),je&&(je!=null&&je.length)&&((Xe=st==null?void 0:st.updateOptions)==null||Xe.call(st,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(je.split(/\r\n|\r|\n/g).length))+3,5)}))},[je,Y,Ze.current]),(0,z.useEffect)(()=>{if(ke&&Ze.current&&Ze.current.instance){let st=Ze.current.instance;st.changeViewZones(function(Rt){var jt=document.createElement("div");jt.style.padding="10px 20px",jt.style.width="calc(100% - 20px)",jt.className="my-error-line-wrp",jt.innerHTML=be,Rt.addZone({afterLineNumber:ke||11,heightInLines:3,domNode:jt})});var Xe={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};st.addOverlayWidget(Xe),st.revealPositionInCenter({lineNumber:20,column:1})}},[ke,Ze.current,Y]);const de=(Xe="",st)=>{if(!Xe||Xe.trim()==="")return!0;const jt=Ze.current.instance.getModel().getLineTokens(st);let qt=!1;for(let Ar=0;Ar<2;Ar++)jt.getStandardTokenType(Ar)===1&&(qt=!0);return qt};(0,z.useEffect)(()=>{var Xe;const st=(Xe=Ze.current)==null?void 0:Xe.instance;if(st&&Y&&pe){const Rt=st.onDidBlurEditorWidget(()=>{Te.current=!1}),jt=st.onDidFocusEditorText(()=>{Te.current=!0});return()=>{Rt.dispose(),jt.dispose()}}},[Ze.current,Y,pe]),(0,z.useEffect)(()=>{var Xe;if((Xe=Ze.current)!=null&&Xe.instance&&Y&&Fe){let st=Ze.current.instance,Rt=st.getModel();if(!Rt)return;(()=>{var rr;let pr=[],gr=[];const nn=Rt.getAllDecorations();for(let Tr of nn)Tr.options.className==="highlighted-line"&&(pr.push((rr=Tr==null?void 0:Tr.range)==null?void 0:rr.startLineNumber),gr.push(Tr==null?void 0:Tr.id));if(Re===pr[0])return;Rt.deltaDecorations(gr,[]);const ar=Rt.getLineCount();Re&&Re<=ar&&(st.deltaDecorations([],[{range:new J.Range(Re,1,Re,Rt.getLineMaxColumn(Re)),options:{isWholeLine:!0,className:"highlighted-line"}}]),st.revealLineInCenter(Re))})();const qt=(rr=!1)=>{var pr;let gr=[],nn=[];const ar=Rt.getAllDecorations();for(let Tr of ar)Tr.options.linesDecorationsClassName==="breakpoints-select"&&(gr.push((pr=Tr==null?void 0:Tr.range)==null?void 0:pr.startLineNumber),nn.push(Tr==null?void 0:Tr.id));if(rr)return{lines:gr,ids:nn};he(gr)},Ar=rr=>R(void 0,null,function*(){let pr={range:new J.Range(rr,1,rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Rt.deltaDecorations([],[pr]),qt()}),jr=rr=>R(void 0,null,function*(){let pr=[];const gr=st.getLineDecorations(rr);for(let nn of gr)nn.options.linesDecorationsClassName==="breakpoints-select"&&pr.push(nn.id);yield Rt.deltaDecorations(pr,[]),qt()}),Cr=rr=>{let pr=st.getLineDecorations(rr);for(let gr of pr)if(gr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,f.isEqual)(Le,qt(!0).lines)){Rt.deltaDecorations(qt(!0).ids,[]);const rr=Le.map(pr=>({range:new J.Range(pr,1,pr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Rt.deltaDecorations([],rr)}const lr=st.onDidChangeModelContent(rr=>{let pr=st.getPosition();if(pr){let gr=pr.lineNumber;clearTimeout(ye.current),ye.current=setTimeout(()=>{de(Rt.getLineContent(gr),gr)?jr(gr):Cr(gr)?(jr(gr),Ar(gr)):qt()},100)}}),Hr=st.onMouseDown(rr=>{var pr,gr,nn;if(rr.target.detail&&((nn=(gr=(pr=rr.target)==null?void 0:pr.element)==null?void 0:gr.className)!=null&&nn.includes("line-numbers"))){let ar=rr.target.position.lineNumber;if(de(Rt.getLineContent(ar),ar))return;Cr(ar)?jr(ar):Ar(ar)}}),Jr=rr=>{let pr={range:new J.Range(rr,1,rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};qe.current=st.deltaDecorations(qe.current,[pr])},Qt=()=>{qe.current=st.deltaDecorations(qe.current,[])},Nr=st.onMouseMove(rr=>{var pr,gr,nn;if(Qt(),rr.target.detail&&((nn=(gr=(pr=rr.target)==null?void 0:pr.element)==null?void 0:gr.className)!=null&&nn.includes("line-numbers"))){let ar=rr.target.position.lineNumber;if(de(Rt.getLineContent(ar),ar))return;Jr(ar)}}),Rr=st.onMouseLeave(()=>{Qt()});return()=>{lr.dispose(),Hr.dispose(),Nr.dispose(),Rr.dispose()}}},[Ze.current,Y,Le,Re,Fe,Ce]),(0,z.useEffect)(()=>{var Xe;(Xe=Ze.current)!=null&&Xe.instance&&Fe&&Ze.current.instance.setPosition({lineNumber:0,column:0})},[Re]);function ve(){let Xe=Ze.current.instance;if(Xe){const st=Xe.getSelection(),Rt=Ze.current.pastePos||{},jt=new J.Range(Rt.startLineNumber||st.endLineNumber,Rt.startColumn||st.endColumn,Rt.endLineNumber||st.endLineNumber,Rt.endColumn||st.endColumn);setTimeout(()=>{Xe.executeEdits("",[{range:jt,text:""}])},300)}}function Ke(Xe){(window.navigator.platform.match("Mac")?Xe.metaKey:Xe.ctrlKey)&&Xe.keyCode==83&&(Xe.preventDefault(),we())}const We=()=>{if(ue&&Ze.current.instance){const Xe=Ze.current.instance.getContentHeight();Tt(Xe<$e?$e:Xe)}else Tt($e)};function ct(Xe){var st=document.createEvent("MouseEvents");st.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Xe.dispatchEvent(st)}const at=Xe=>{if(!Te.current)return;const{keyCode:st,ctrlKey:Rt,metaKey:jt,target:qt,type:Ar}=Xe;return(Ar==="paste"||(st===67||st===86)&&(jt||Rt))&&qt.nodeName==="TEXTAREA"&&(ie(),Xe.preventDefault()),!1};function nt(Xe,st){var Rt=window.URL||window.webkitURL||window,jt=new Blob([st]),qt=document.createElementNS("http://www.w3.org/1999/xhtml","a");qt.href=Rt.createObjectURL(jt),qt.download=Xe,ct(qt)}(0,z.useEffect)(()=>{We()},[We]),(0,z.useEffect)(()=>{lt.current&&!Y&&Promise.all([B.e(5552),B.e(9651)]).then(B.bind(B,55826)).then(Xe=>{try{J=Xe,Ze.current.instance=J.editor.create(lt.current,{value:je,language:ee(Ce),theme:re,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Me||!1}},Ue);const st=Ze.current.instance;let qt=[...t.BH._menuItems].find(lr=>lr[0]._debugName=="EditorContext")[1],Ar=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],jr=(lr,Hr)=>{var Jr,Qt;let Nr=lr._first;do Hr.includes((Qt=(Jr=Nr.element)==null?void 0:Jr.command)==null?void 0:Qt.id)&&lr._remove(Nr);while(Nr=Nr.next)};if(_e(st,J),setTimeout(()=>{We(),Ze.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{nt(Ye||"educoder.txt",st.getValue())}})},500),Ze.current.subscription=st.onDidChangeModelContent(lr=>{pt.current?clearTimeout(Se.current):(We(),ae(st.getValue(),lr)),Se.current=setTimeout(()=>{pt.current=!1},500)}),window.Monaco||h(J,ee(Ce)),pe&&(jr(qt,Ar),lt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",at),window.removeEventListener("paste",at),window.addEventListener("keydown",at),window.addEventListener("paste",at)),window.Monaco=J,Z&&st.onDidBlurEditorWidget(()=>{Z(st.getValue())}),ce&&st.onDidFocusEditorText(()=>{pe&&se(),ce(st.getValue())}),pe){se();try{st.onDidPaste(lr=>{const Hr=st.getSelection(),Jr=Ze.current.pastePos||{},Qt=new J.Range(Jr.startLineNumber||Hr.endLineNumber,Jr.startColumn||Hr.endColumn,Jr.endLineNumber||Hr.endLineNumber,Jr.endColumn||Hr.endColumn);st.executeEdits("",[{range:lr.range,text:""}])})}catch(lr){}}let Cr=X();return Ae&&typeof Ae=="string"&&new i(Ae,st,J),W(!0),()=>{const lr=Ze.current.instance;lr.dispose();const Hr=lr.getModel();Hr&&Hr.dispose(),Ze.current.subscription&&Ze.current.subscription.dispose(),Cr.unobserve(lt.current)}}catch(st){}})},[]),(0,z.useEffect)(()=>{if(Ze.current.instance&&Y)return document.addEventListener("keydown",Ke,!1),()=>{document.removeEventListener("keydown",Ke)}},[we,Y]),(0,z.useEffect)(()=>{let Xe=Ze.current.instance;if(Xe&&Y){let st=ee(Ce);J.editor.setModelLanguage(Xe.getModel(),st)}},[Ce,Y]),(0,z.useEffect)(()=>{Ze.current.instance&&Y&&J.editor.setTheme(re)},[re,Y]),(0,z.useEffect)(()=>{let Xe=Ze.current.instance;ft.current=Be,Xe&&Y&&(Xe.updateOptions(b({},Be)),setTimeout(()=>{Xe.getModel().updateOptions(b({},Be))},200))},[JSON.stringify(Be),Y]),(0,z.useEffect)(()=>{let Xe=Ze.current.instance;Xe&&Y&&Xe.layout()},[Ne,$e,Y]);const[et,St]=(0,z.useState)(C(Ne)),[mt,Tt]=(0,z.useState)(C($e)),Pt=v(b({},fe),{width:et,height:mt,position:"relative"});return z.createElement("div",{className:"my-monaco-editor",ref:lt,style:Pt},le&&z.createElement(A.CopyToClipboard,{text:je,onCopy:()=>m.ZP.success("\u590D\u5236\u6210\u529F")},z.createElement(S.Z,{title:"\u590D\u5236\u4EE3\u7801"},z.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},z.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ee({width:ge="100%",height:Pe="100%",original:Ne,modified:$e,language:je,options:Ce={}}){const fe=(0,z.useRef)(),[Be,Ue]=(0,z.useState)(null);function re(ue){let pe;return fe.current&&(pe=new oe.Z(ae=>{for(let _e of ae)(_e.target.offsetHeight>0||_e.target.offsetWidth>0)&&ue.layout()}),pe.observe(fe.current)),pe}(0,z.useEffect)(()=>(fe.current&&Promise.all([B.e(5552),B.e(9404)]).then(B.bind(B,50048)).then(ue=>{J=ue;const pe=J.editor.createDiffEditor(fe.current,v(b({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ce),{wordWrap:!0}));Ue(pe);let ae=re(pe);return()=>{pe.dispose();const _e=pe.getModel();_e&&_e.dispose(),ae.unobserve(fe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,z.useEffect)(()=>{Be&&Be.setModel({original:J.editor.createModel(Ne,je),modified:J.editor.createModel($e,je)})},[Ne,$e,je,Be]);const Z=C(ge),le=C(Pe),we={width:Z,height:le};return z.createElement("div",{className:"my-diff-editor",ref:fe,style:we})}},40818:function(Ct,Qe,B){"use strict";B.r(Qe),B.d(Qe,{default:function(){return ae}});var z=B(67294),oe=B(35973),te=B(85673),U=B(71230),L=B(15746),M=B(83062),P=B(65226),k=B(52262),e={flex_box_center:"flex_box_center___iOjMJ",flex_space_between:"flex_space_between___aidWN",flex_box_vertical_center:"flex_box_vertical_center___z01Y6",flex_box_center_end:"flex_box_center_end___bizdK",flex_box_column:"flex_box_column___T3eUo",info:"info___PTCcN",bar:"bar___F2ZHD"},O=B(28802),D=B(51380),l=B(91773),p=B(62844),h=B(2453),g=B(55241),o=B(60024),c=B(33170),y=Object.defineProperty,u=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,t=(_e,ce,he)=>ce in _e?y(_e,ce,{enumerable:!0,configurable:!0,writable:!0,value:he}):_e[ce]=he,m=(_e,ce)=>{for(var he in ce||(ce={}))s.call(ce,he)&&t(_e,he,ce[he]);if(u)for(var he of u(ce))i.call(ce,he)&&t(_e,he,ce[he]);return _e},S=(_e,ce,he)=>new Promise((Le,Ye)=>{var ke=Fe=>{try{Re(he.next(Fe))}catch(Ae){Ye(Ae)}},be=Fe=>{try{Re(he.throw(Fe))}catch(Ae){Ye(Ae)}},Re=Fe=>Fe.done?Le(Fe.value):Promise.resolve(Fe.value).then(ke,be);Re((he=he.apply(_e,ce)).next())});const{TreeNode:f}=o.default,_=({restful:_e,loading:ce,dispatch:he})=>{const Le=(0,oe.useParams)(),Ye=(0,oe.useLocation)(),[ke,be]=(0,z.useState)(!1),[Re,Fe]=(0,z.useState)(),{actionTabs:Ae}=_e,[Me]=l.default.useForm();return(0,z.useEffect)(()=>{_e.actionTabs.key=="\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"&&Me.resetFields()},[_e.actionTabs.key]),_e.actionTabs.key!=="\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"?null:z.createElement(p.default,{centered:!0,title:"\u65B0\u5EFA\u76EE\u5F55",open:_e.actionTabs.key==="\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",bodyStyle:{minHeight:150},confirmLoading:ke,onOk:()=>S(void 0,null,function*(){yield Me.validateFields();const rt=Me.getFieldValue();be(!0),(yield(0,c.ZP)("/api/restfuls.json",{method:"post",body:m({file_type:1},rt)})).status===0&&(h.ZP.success("\u6DFB\u52A0\u6210\u529F"),he({type:"restful/setActionTabs",payload:{}}),he({type:"restful/getRestful"})),be(!1)}),onCancel:()=>{he({type:"restful/setActionTabs",payload:{}})}},z.createElement("div",{className:"pl30 pr30"},z.createElement(l.default,{form:Me,initialValues:{name:""}},z.createElement(l.default.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u76EE\u5F55\u540D\u79F0"}]},z.createElement(U.Z,{className:"mt30"},z.createElement(L.Z,{flex:"80px",className:"font14"},"\u76EE\u5F55\u540D\u79F0\uFF1A"),z.createElement(L.Z,{flex:"1"},z.createElement(O.default,{placeholder:`\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26
|
|
`,maxLength:60})))))))};var A=(0,oe.connect)(({restful:_e,loading:ce})=>({restful:_e,loading:ce}))(_),x=Object.defineProperty,w=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,r=(_e,ce,he)=>ce in _e?x(_e,ce,{enumerable:!0,configurable:!0,writable:!0,value:he}):_e[ce]=he,d=(_e,ce)=>{for(var he in ce||(ce={}))n.call(ce,he)&&r(_e,he,ce[he]);if(w)for(var he of w(ce))a.call(ce,he)&&r(_e,he,ce[he]);return _e},T=(_e,ce,he)=>new Promise((Le,Ye)=>{var ke=Fe=>{try{Re(he.next(Fe))}catch(Ae){Ye(Ae)}},be=Fe=>{try{Re(he.throw(Fe))}catch(Ae){Ye(Ae)}},Re=Fe=>Fe.done?Le(Fe.value):Promise.resolve(Fe.value).then(ke,be);Re((he=he.apply(_e,ce)).next())});const{TreeNode:b}=o.default,v=({restful:_e,loading:ce,dispatch:he})=>{const Le=(0,oe.useParams)(),Ye=(0,oe.useLocation)(),[ke,be]=(0,z.useState)(!1),[Re,Fe]=(0,z.useState)(),{actionTabs:Ae}=_e,[Me]=l.default.useForm();return(0,z.useEffect)(()=>{_e.actionTabs.key=="\u91CD\u547D\u540D"&&(Me.resetFields(),Me.setFieldsValue({name:_e.actionTabs.data.title}))},[_e.actionTabs.key]),_e.actionTabs.key!=="\u91CD\u547D\u540D"?null:z.createElement(p.default,{centered:!0,title:"\u91CD\u547D\u540D",open:_e.actionTabs.key==="\u91CD\u547D\u540D",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",bodyStyle:{minHeight:150},confirmLoading:ke,onOk:()=>T(void 0,null,function*(){yield Me.validateFields();const rt=Me.getFieldValue();be(!0);let lt=`/api/restfuls/${_e.actionTabs.data.id}.json`;(yield(0,c.ZP)(lt,{method:"put",body:d({file_type:1},rt)})).status===0&&(h.ZP.success("\u4FEE\u6539\u6210\u529F"),he({type:"restful/setActionTabs",payload:{}}),he({type:"restful/getRestful"})),be(!1)}),onCancel:()=>{he({type:"restful/setActionTabs",payload:{}})}},z.createElement("div",{className:"pl30 pr30"},z.createElement(l.default,{form:Me,initialValues:{name:""}},z.createElement(U.Z,{className:"mt30"},z.createElement(L.Z,{flex:"80px",className:"font14"},"\u76EE\u5F55\u540D\u79F0\uFF1A"),z.createElement(L.Z,{flex:"1"},z.createElement(l.default.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u65B0\u540D\u79F0"}]},z.createElement(O.default,{placeholder:`\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26
|
|
`,maxLength:60})))))))};var E=(0,oe.connect)(({restful:_e,loading:ce})=>({restful:_e,loading:ce}))(v),R=B(41498),C={flex_box_center:"flex_box_center___EW6x1",flex_space_between:"flex_space_between___aSZFN",flex_box_vertical_center:"flex_box_vertical_center___MsqeW",flex_box_center_end:"flex_box_center_end___YMP0b",flex_box_column:"flex_box_column___KXrxt",tree:"tree___Zx4EL",actions:"actions___zwp8u"},N=Object.defineProperty,K=Object.defineProperties,H=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,G=(_e,ce,he)=>ce in _e?N(_e,ce,{enumerable:!0,configurable:!0,writable:!0,value:he}):_e[ce]=he,Ee=(_e,ce)=>{for(var he in ce||(ce={}))J.call(ce,he)&&G(_e,he,ce[he]);if(ee)for(var he of ee(ce))se.call(ce,he)&&G(_e,he,ce[he]);return _e},ge=(_e,ce)=>K(_e,H(ce)),Pe=(_e,ce,he)=>new Promise((Le,Ye)=>{var ke=Fe=>{try{Re(he.next(Fe))}catch(Ae){Ye(Ae)}},be=Fe=>{try{Re(he.throw(Fe))}catch(Ae){Ye(Ae)}},Re=Fe=>Fe.done?Le(Fe.value):Promise.resolve(Fe.value).then(ke,be);Re((he=he.apply(_e,ce)).next())});const{Search:Ne}=O.default,{DirectoryTree:$e}=D.default,je=({user:_e,globalSetting:ce,loading:he,dispatch:Le,restful:Ye})=>{const ke=(0,oe.useParams)(),[be,Re]=(0,z.useState)(!0),[Fe]=l.default.useForm(),[Ae,Me]=(0,z.useState)(""),[rt]=(0,z.useState)([{id:1,name:"\u65B0\u5EFA\u6587\u4EF6"},{id:2,name:"\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"},{id:3,name:"\u91CD\u547D\u540D"},{id:4,name:"\u7F16\u8F91"},{id:5,name:"\u5220\u9664"}]),[lt,Ze]=(0,z.useState)([]),[ft,Et]=(0,z.useState)([]),[qe,pt]=(0,z.useState)(!1),[Se,ye]=(0,z.useState)([]);(0,z.useEffect)(()=>{var de,ve,Ke,We;if((de=Ye.restful)!=null&&de.data){ye([...(ve=Ye.restful)==null?void 0:ve.data]);let ct=0,at;if((We=(Ke=Ye.restful)==null?void 0:Ke.data)==null||We.map(nt=>{var et;nt.id==ke.id&&(ct=nt.id),nt.file_type==0&&!at&&(at=nt.id),(et=nt==null?void 0:nt.children)==null||et.map(St=>{at||(at=St.id),St.id==ke.id&&(ct=nt.id)}),!nt.children&&!at&&(at=nt.id)}),!ke.id&&at){oe.history.push(`/ch/rest/${at}`);return}ct&&setTimeout(()=>{Ze([ct]),Et([Number(ke.id||at)])},200)}},[Ye.restful]);const Te=(de,ve)=>{ve.node.file_type===0?oe.history.push(`/ch/rest/${de[0]}`):Et([...de]),console.log("Trigger Select",de,ve)},Y=de=>{Ze(de),console.log("Trigger Expand",de)},W=de=>z.createElement("div",null,rt.map((ve,Ke)=>z.createElement("p",{key:ve.id,className:"current",onClick:()=>{switch(ve.id){case 1:oe.history.push(`/ch/rest/edit/${de.id}/0`);break;case 2:case 3:Le({type:"restful/setActionTabs",payload:{key:ve.name,data:de}});break;case 4:document.location.href=`/ch/rest/edit/${de.pid||0}/${de.id}`;break;case 5:p.default.confirm({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u5B9A\u5220\u9664\uFF1F",onOk:()=>Pe(void 0,null,function*(){const We=yield(0,R.E1)({id:de.id});(We==null?void 0:We.status)==0&&(h.ZP.success("\u5220\u9664\u6210\u529F"),Le({type:"restful/getRestful"}))})});break}}},ve.name)).filter(ve=>!!ve).filter(ve=>de.pid||de.file_type==0?ve.key>3:ve.key!=4)),X=de=>de.map(ve=>{var Ke;const We=ve.title.indexOf(Ae),ct=ve.title.substr(0,We),at=ve.title.substr(We+Ae.length),nt=z.createElement("span",null,ct,z.createElement("span",{className:"c-blue"},Ae),at,(0,k.ag)()&&z.createElement(g.Z,{placement:"right",title:Ae,content:()=>W(ve),trigger:"hover"},z.createElement("span",{className:`iconfont icon-sandian ${C.actions}`})));return Ae!==""&&We===-1&&!((Ke=ve.children)!=null&&Ke.length)?null:ve.children&&ve.file_type===1?ge(Ee({},ve),{title:nt,key:ve.key,children:X(ve.children)}):ge(Ee({},ve),{title:nt,key:ve.key,isLeaf:!0})}).filter(ve=>!!ve),ie=(de,ve)=>{let Ke;for(let We=0;We<ve.length;We++){const ct=ve[We];ct.children&&(ct.children.some(at=>at.key===de)?Ke=ct.key:ie(de,ct.children)&&(Ke=ie(de,ct.children)))}return Ke},Q=de=>{const{value:ve}=de.target,Ke=Se.map(We=>{var ct;return We!=null&&We.children&&(ct=We==null?void 0:We.children.filter(at=>at.title.indexOf(ve)>-1))!=null&&ct.length?We.id:null});Me(ve),pt(!0),console.log("expandedKeys:",Ke),Ze(Ke)};return console.log("loop(treeData):",X(Se)),z.createElement("div",{className:C.tree},z.createElement(Ne,{style:{marginBottom:8},placeholder:"\u8F93\u5165\u5173\u952E\u5B57\u68C0\u7D22",onChange:Q}),z.createElement($e,{multiple:!0,defaultExpandAll:!0,onSelect:Te,onExpand:Y,expandedKeys:lt,selectedKeys:ft,autoExpandParent:qe,treeData:X(Se)}),z.createElement(A,null),z.createElement(E,null))};var Ce=(0,oe.connect)(({user:_e,loading:ce,globalSetting:he,restful:Le})=>({user:_e,globalSetting:he,restful:Le,loading:ce.models.index}))(je),fe=Object.defineProperty,Be=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,Z=(_e,ce,he)=>ce in _e?fe(_e,ce,{enumerable:!0,configurable:!0,writable:!0,value:he}):_e[ce]=he,le=(_e,ce)=>{for(var he in ce||(ce={}))Ue.call(ce,he)&&Z(_e,he,ce[he]);if(Be)for(var he of Be(ce))re.call(ce,he)&&Z(_e,he,ce[he]);return _e},we=(_e,ce)=>{var he={};for(var Le in _e)Ue.call(_e,Le)&&ce.indexOf(Le)<0&&(he[Le]=_e[Le]);if(_e!=null&&Be)for(var Le of Be(_e))ce.indexOf(Le)<0&&re.call(_e,Le)&&(he[Le]=_e[Le]);return he},ue=(_e,ce,he)=>new Promise((Le,Ye)=>{var ke=Fe=>{try{Re(he.next(Fe))}catch(Ae){Ye(Ae)}},be=Fe=>{try{Re(he.throw(Fe))}catch(Ae){Ye(Ae)}},Re=Fe=>Fe.done?Le(Fe.value):Promise.resolve(Fe.value).then(ke,be);Re((he=he.apply(_e,ce)).next())});const pe=_e=>{var ce=_e,{user:he,globalSetting:Le,loading:Ye,dispatch:ke,restful:be}=ce,Re=we(ce,["user","globalSetting","loading","dispatch","restful"]),Fe,Ae;const Me=(0,oe.useParams)(),[rt,lt]=(0,z.useState)(!0),Ze=()=>ue(void 0,null,function*(){ke({type:"restful/getRestful"}),Me.id&&ke({type:"restful/getRestfulDetail",payload:le({},Me)})});(0,z.useEffect)(()=>{lt(!0),Ze()},[Me.id]);const ft=()=>{ke({type:"restful/setActionTabs",payload:{key:"\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"}})},Et=()=>{var qe,pt,Se;if((qe=be.restful)!=null&&qe.data){let ye=0;return(Se=(pt=be.restful)==null?void 0:pt.data)==null||Se.map(Te=>{var Y;(Y=Te==null?void 0:Te.children)==null||Y.map(W=>{W.id==Me.id&&(ye=Te.id)}),!Te.children&&!ye&&(ye=Te.id)}),ye}return 0};return z.createElement("section",null,z.createElement("aside",{className:"edu-container mt20"},z.createElement(te.Z,null,z.createElement(te.Z.Item,null,z.createElement(oe.Link,{to:"/"},"\u9996\u9875")),z.createElement(te.Z.Item,null,z.createElement(oe.Link,{to:"/ch/rest"},"API\u6587\u6863"))),z.createElement("div",{className:"mt20"},z.createElement(U.Z,{gutter:[20,20]},z.createElement(L.Z,{flex:"300px"},z.createElement(Ce,le({},Re))),z.createElement(L.Z,{flex:"1"},z.createElement("div",{className:e.info},z.createElement("h1",{style:{fontSize:28,paddingBottom:15,borderBottom:"1px solid #eaeaea",textAlign:"center"}},(Fe=be.restfulDetail)==null?void 0:Fe.name),z.createElement(P.Z,{value:(Ae=be.restfulDetail)==null?void 0:Ae.description}))))),(0,k.ag)()&&z.createElement("div",{className:e.bar},z.createElement(U.Z,null,!!Et()&&z.createElement(L.Z,null,z.createElement(M.Z,{title:"\u7F16\u8F91\u6587\u4EF6"},z.createElement(oe.Link,{to:`/ch/rest/edit/${Et()}/${Me.id}`,className:"icon-zhongmingming current"}))),z.createElement(L.Z,null,z.createElement(M.Z,{title:"\u6DFB\u52A0\u6587\u4EF6"},z.createElement(oe.Link,{to:`/ch/rest/edit/${Et()}/0`,className:"icon-tianjiatimu current"}))),z.createElement(L.Z,null,z.createElement(M.Z,{title:"\u65B0\u5EFA\u6587\u4EF6\u5939"},z.createElement("span",{className:"icon-wenjianjia1 current",onClick:ft})))))))};var ae=(0,oe.connect)(({user:_e,loading:ce,globalSetting:he,restful:Le})=>({user:_e,globalSetting:he,restful:Le,loading:ce.models.index}))(pe)},51161:function(Ct,Qe,B){"use strict";B.d(Qe,{AL:function(){return i},Iy:function(){return D},Qv:function(){return h},ez:function(){return s},jb:function(){return l}});var z=B(47084),oe=B.n(z),te=B(90621),U=B.n(te);let L=1;function M(_,A){const x=_.match(/^(\s+)(?:```)/);if(x===null)return A;const w=x[1];return A.split(`
|
|
`).map(n=>{const a=n.match(/^\s+/);if(a===null)return n;const[r]=a;return r.length>=w.length?n.slice(w.length):n}).join(`
|
|
`)}let P=[],k=["<ul>"];const e=new(oe()).Renderer,O=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function D(){P.length=0,k=["<ul>"]}const l={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(_,A,x,w){if(A>=_.length||_[A].level<=x)return A;var n=_[A];w.push("<li><a href='#"+L+n.anchor+"'>"+n.text+"</a>"),A++;var a=[];return A=p(_,A,n.level,a),a.length>0&&(w.push("<ul>"),a.forEach(function(r){w.push(r)}),w.push("</ul>")),w.push("</li>"),A=p(_,A,x,w),A}function h(){return p(P,0,0,k),k.push("</ul>"),k.join("")}const g={heading(_){const A=O.exec(_);if(L+=1,A)return{type:"heading",raw:A[0],depth:A[1].length,text:A[2]}},fences(_){const A=this.rules.block.fences.exec(_);if(A){const x=A[0];let w=M(x,A[3]||"");const n=A[2]?A[2].trim():A[2];if(["latex","katex","math"].indexOf(n)>=0){const a=y(),r=w;w=a,u[a]={type:"block",expression:r}}return{type:"code",raw:x,lang:n,text:w}}}},o=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let c=0;const y=()=>`__special_katext_id_${c++}__`;let u={};function s(){return u}function i(){c=0,u={}}function t(_){return _=_.replace(o,(A,x)=>{const w=y();return u[w]={type:"inline",expression:x},w}),_}const m=e.listitem;e.listitem=function(_){return m(t(_))};const S=e.paragraph;e.paragraph=function(_){return S(t(_))};const f=e.tablecell;e.tablecell=function(_,A){return f(t(_),A)},e.code=function(_,A,x){const w=(A||"").match(/\S*/)[0];return w?["latex","katex","math"].indexOf(w)>=0?`<p class='editormd-tex'>${_}</p>`:`<pre class="prettyprint linenums"><code class="language-${A}">${x?_:(0,te.escape)(_,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(x?_:(0,te.escape)(_,!0))+"</code></pre>"},e.heading=function(_,A,x){let w=this.options.headerPrefix+x.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return P.push({anchor:w,level:A,text:_}),"<h"+A+' id="'+L+w+'">'+_+"</h"+A+">"},oe().setOptions({silent:!0,gfm:!0,pedantic:!1}),oe().use({tokenizer:g,renderer:e}),Qe.ZP=oe()},11771:function(){var Ct,Qe,B,z=!1,oe,te;window.PR_SHOULD_USE_CONTINUATION=!0;var U,L;(function(){var M=window,P=["break,continue,do,else,for,if,return,while"],k=[P,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],e=[k,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],O=[e,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],D=[e,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],l=[e,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],p="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",h=[e,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],g="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",o=[P,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],c=[P,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],y=[P,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],u=[O,l,D,h,g,o,c,y],s=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,i="str",t="kwd",m="com",S="typ",f="lit",_="pun",A="pln",x="tag",w="dec",n="src",a="atn",r="atv",d="nocode",T="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function b(Ce){for(var fe=0,Be=!1,Ue=!1,re=0,Z=Ce.length;re<Z;++re){var le=Ce[re];if(le.ignoreCase)Ue=!0;else if(/[a-z]/i.test(le.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Be=!0,Ue=!1;break}}var we={b:8,t:9,n:10,v:11,f:12,r:13};function ue(he){var Le=he.charCodeAt(0);if(Le!==92)return Le;var Ye=he.charAt(1);return Le=we[Ye],Le||("0"<=Ye&&Ye<="7"?parseInt(he.substring(1),8):Ye==="u"||Ye==="x"?parseInt(he.substring(2),16):he.charCodeAt(1))}function pe(he){if(he<32)return(he<16?"\\x0":"\\x")+he.toString(16);var Le=String.fromCharCode(he);return Le==="\\"||Le==="-"||Le==="]"||Le==="^"?"\\"+Le:Le}function ae(he){var Le=he.substring(1,he.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Ye=[],ke=Le[0]==="^",be=["["];ke&&be.push("^");for(var Re=ke?1:0,Fe=Le.length;Re<Fe;++Re){var Ae=Le[Re];if(/\\[bdsw]/i.test(Ae))be.push(Ae);else{var Me=ue(Ae),rt;Re+2<Fe&&Le[Re+1]==="-"?(rt=ue(Le[Re+2]),Re+=2):rt=Me,Ye.push([Me,rt]),rt<65||Me>122||(rt<65||Me>90||Ye.push([Math.max(65,Me)|32,Math.min(rt,90)|32]),rt<97||Me>122||Ye.push([Math.max(97,Me)&-33,Math.min(rt,122)&-33]))}}Ye.sort(function(Et,qe){return Et[0]-qe[0]||qe[1]-Et[1]});for(var lt=[],Ze=[],Re=0;Re<Ye.length;++Re){var ft=Ye[Re];ft[0]<=Ze[1]+1?Ze[1]=Math.max(Ze[1],ft[1]):lt.push(Ze=ft)}for(var Re=0;Re<lt.length;++Re){var ft=lt[Re];be.push(pe(ft[0])),ft[1]>ft[0]&&(ft[1]+1>ft[0]&&be.push("-"),be.push(pe(ft[1])))}return be.push("]"),be.join("")}function _e(he){for(var Le=he.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ye=Le.length,ke=[],be=0,Re=0;be<Ye;++be){var Fe=Le[be];if(Fe==="(")++Re;else if(Fe.charAt(0)==="\\"){var Ae=+Fe.substring(1);Ae&&(Ae<=Re?ke[Ae]=-1:Le[be]=pe(Ae))}}for(var be=1;be<ke.length;++be)ke[be]===-1&&(ke[be]=++fe);for(var be=0,Re=0;be<Ye;++be){var Fe=Le[be];if(Fe==="(")++Re,ke[Re]||(Le[be]="(?:");else if(Fe.charAt(0)==="\\"){var Ae=+Fe.substring(1);Ae&&Ae<=Re&&(Le[be]="\\"+ke[Ae])}}for(var be=0;be<Ye;++be)Le[be]==="^"&&Le[be+1]!=="^"&&(Le[be]="");if(he.ignoreCase&&Be)for(var be=0;be<Ye;++be){var Fe=Le[be],Me=Fe.charAt(0);Fe.length>=2&&Me==="["?Le[be]=ae(Fe):Me!=="\\"&&(Le[be]=Fe.replace(/[a-zA-Z]/g,function(Ze){var ft=Ze.charCodeAt(0);return"["+String.fromCharCode(ft&-33,ft|32)+"]"}))}return Le.join("")}for(var ce=[],re=0,Z=Ce.length;re<Z;++re){var le=Ce[re];if(le.global||le.multiline)throw new Error(""+le);ce.push("(?:"+_e(le)+")")}return new RegExp(ce.join("|"),Ue?"gi":"g")}function v(Ce,fe){var Be=/(?:^|\s)nocode(?:\s|$)/,Ue=[],re=0,Z=[],le=0;function we(ue){var pe=ue.nodeType;if(pe==1){if(Be.test(ue.className))return;for(var ae=ue.firstChild;ae;ae=ae.nextSibling)we(ae);var _e=ue.nodeName.toLowerCase();(_e==="br"||_e==="li")&&(Ue[le]=`
|
|
`,Z[le<<1]=re++,Z[le++<<1|1]=ue)}else if(pe==3||pe==4){var ce=ue.nodeValue;ce.length&&(fe?ce=ce.replace(/\r\n?/g,`
|
|
`):ce=ce.replace(/[ \t\r\n]+/g," "),Ue[le]=ce,Z[le<<1]=re,re+=ce.length,Z[le++<<1|1]=ue)}}return we(Ce),{sourceCode:Ue.join("").replace(/\n$/,""),spans:Z}}function E(Ce,fe,Be,Ue,re){if(Be){var Z={sourceNode:Ce,pre:1,langExtension:null,numberLines:null,sourceCode:Be,spans:null,basePos:fe,decorations:null};Ue(Z),re.push.apply(re,Z.decorations)}}var R=/\S/;function C(Ce){for(var fe=void 0,Be=Ce.firstChild;Be;Be=Be.nextSibling){var Ue=Be.nodeType;fe=Ue===1?fe?Ce:Be:Ue===3&&R.test(Be.nodeValue)?Ce:fe}return fe===Ce?void 0:fe}function N(Ce,fe){var Be={},Ue;(function(){for(var le=Ce.concat(fe),we=[],ue={},pe=0,ae=le.length;pe<ae;++pe){var _e=le[pe],ce=_e[3];if(ce)for(var he=ce.length;--he>=0;)Be[ce.charAt(he)]=_e;var Le=_e[1],Ye=""+Le;ue.hasOwnProperty(Ye)||(we.push(Le),ue[Ye]=null)}we.push(/[\0-\uffff]/),Ue=b(we)})();var re=fe.length,Z=function(le){for(var we=le.sourceCode,ue=le.basePos,pe=le.sourceNode,ae=[ue,A],_e=0,ce=we.match(Ue)||[],he={},Le=0,Ye=ce.length;Le<Ye;++Le){var ke=ce[Le],be=he[ke],Re=void 0,Fe;if(typeof be=="string")Fe=!1;else{var Ae=Be[ke.charAt(0)];if(Ae)Re=ke.match(Ae[1]),be=Ae[0];else{for(var Me=0;Me<re;++Me)if(Ae=fe[Me],Re=ke.match(Ae[1]),Re){be=Ae[0];break}Re||(be=A)}Fe=be.length>=5&&be.substring(0,5)==="lang-",Fe&&!(Re&&typeof Re[1]=="string")&&(Fe=!1,be=n),Fe||(he[ke]=be)}var rt=_e;if(_e+=ke.length,!Fe)ae.push(ue+rt,be);else{var lt=Re[1],Ze=ke.indexOf(lt),ft=Ze+lt.length;Re[2]&&(ft=ke.length-Re[2].length,Ze=ft-lt.length);var Et=be.substring(5);E(pe,ue+rt,ke.substring(0,Ze),Z,ae),E(pe,ue+rt+Ze,lt,Ee(Et,lt),ae),E(pe,ue+rt+ft,ke.substring(ft),Z,ae)}}le.decorations=ae};return Z}function K(Ce){var fe=[],Be=[];Ce.tripleQuotedStrings?fe.push([i,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ce.multiLineStrings?fe.push([i,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):fe.push([i,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ce.verbatimStrings&&Be.push([i,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ue=Ce.hashComments;Ue&&(Ce.cStyleComments?(Ue>1?fe.push([m,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):fe.push([m,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Be.push([i,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):fe.push([m,/^#[^\r\n]*/,null,"#"])),Ce.cStyleComments&&(Be.push([m,/^\/\/[^\r\n]*/,null]),Be.push([m,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var re=Ce.regexLiterals;if(re){var Z=re>1?"":`
|
|
\r`,le=Z?".":"[\\S\\s]",we="/(?=[^/*"+Z+"])(?:[^/\\x5B\\x5C"+Z+"]|\\x5C"+le+"|\\x5B(?:[^\\x5C\\x5D"+Z+"]|\\x5C"+le+")*(?:\\x5D|$))+/";Be.push(["lang-regex",RegExp("^"+T+"("+we+")")])}var ue=Ce.types;ue&&Be.push([S,ue]);var pe=(""+Ce.keywords).replace(/^ | $/g,"");pe.length&&Be.push([t,new RegExp("^(?:"+pe.replace(/[\s,]+/g,"|")+")\\b"),null]),fe.push([A,/^\s+/,null,` \r
|
|
\xA0`]);var ae="^.[^\\s\\w.$@'\"`/\\\\]*";return Ce.regexLiterals&&(ae+="(?!s*/)"),Be.push([f,/^@[a-z_$][a-z_$@0-9]*/i,null],[S,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[A,/^[a-z_$][a-z_$@0-9]*/i,null],[f,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[A,/^\\[\s\S]?/,null],[_,new RegExp(ae),null]),N(fe,Be)}var H=K({keywords:u,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ee(Ce,fe,Be){for(var Ue=/(?:^|\s)nocode(?:\s|$)/,re=/\r\n?|\n/,Z=Ce.ownerDocument,le=Z.createElement("li");Ce.firstChild;)le.appendChild(Ce.firstChild);var we=[le];function ue(Le){var Ye=Le.nodeType;if(Ye==1&&!Ue.test(Le.className))if(Le.nodeName==="br")pe(Le),Le.parentNode&&Le.parentNode.removeChild(Le);else for(var ke=Le.firstChild;ke;ke=ke.nextSibling)ue(ke);else if((Ye==3||Ye==4)&&Be){var be=Le.nodeValue,Re=be.match(re);if(Re){var Fe=be.substring(0,Re.index);Le.nodeValue=Fe;var Ae=be.substring(Re.index+Re[0].length);if(Ae){var Me=Le.parentNode;Me.insertBefore(Z.createTextNode(Ae),Le.nextSibling)}pe(Le),Fe||Le.parentNode.removeChild(Le)}}}function pe(Le){for(;!Le.nextSibling;)if(Le=Le.parentNode,!Le)return;function Ye(Re,Fe){var Ae=Fe?Re.cloneNode(!1):Re,Me=Re.parentNode;if(Me){var rt=Ye(Me,1),lt=Re.nextSibling;rt.appendChild(Ae);for(var Ze=lt;Ze;Ze=lt)lt=Ze.nextSibling,rt.appendChild(Ze)}return Ae}for(var ke=Ye(Le.nextSibling,0),be;(be=ke.parentNode)&&be.nodeType===1;)ke=be;we.push(ke)}for(var ae=0;ae<we.length;++ae)ue(we[ae]);fe===(fe|0)&&we[0].setAttribute("value",fe);var _e=Z.createElement("ol");_e.className="linenums";for(var ce=Math.max(0,fe-1|0)||0,ae=0,he=we.length;ae<he;++ae)le=we[ae],le.className="L"+(ae+ce)%10,le.firstChild||le.appendChild(Z.createTextNode("\xA0")),_e.appendChild(le);Ce.appendChild(_e)}function J(Ce){var fe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);fe=fe&&+fe[1]<=8;var Be=/\n/g,Ue=Ce.sourceCode,re=Ue.length,Z=0,le=Ce.spans,we=le.length,ue=0,pe=Ce.decorations,ae=pe.length,_e=0;pe[ae]=re;var ce,he;for(he=ce=0;he<ae;)pe[he]!==pe[he+2]?(pe[ce++]=pe[he++],pe[ce++]=pe[he++]):he+=2;for(ae=ce,he=ce=0;he<ae;){for(var Le=pe[he],Ye=pe[he+1],ke=he+2;ke+2<=ae&&pe[ke+1]===Ye;)ke+=2;pe[ce++]=Le,pe[ce++]=Ye,he=ke}ae=pe.length=ce;var be=Ce.sourceNode,Re="";be&&(Re=be.style.display,be.style.display="none");try{for(var Fe=null;ue<we;){var Ae=le[ue],Me=le[ue+2]||re,rt=pe[_e+2]||re,ke=Math.min(Me,rt),lt=le[ue+1],Ze;if(lt.nodeType!==1&&(Ze=Ue.substring(Z,ke))){fe&&(Ze=Ze.replace(Be,"\r")),lt.nodeValue=Ze;var ft=lt.ownerDocument,Et=ft.createElement("span");Et.className=pe[_e+1];var qe=lt.parentNode;qe.replaceChild(Et,lt),Et.appendChild(lt),Z<Me&&(le[ue+1]=lt=ft.createTextNode(Ue.substring(ke,Me)),qe.insertBefore(lt,Et.nextSibling))}Z=ke,Z>=Me&&(ue+=2),Z>=rt&&(_e+=2)}}finally{be&&(be.style.display=Re)}}var se={};function G(Ce,fe){for(var Be=fe.length;--Be>=0;){var Ue=fe[Be];se.hasOwnProperty(Ue)?M.console&&console.warn("cannot override language handler %s",Ue):se[Ue]=Ce}}function Ee(Ce,fe){return Ce&&se.hasOwnProperty(Ce)||(Ce=/^\s*</.test(fe)?"default-markup":"default-code"),se[Ce]}G(H,["default-code"]),G(N([],[[A,/^[^<?]+/],[w,/^<!\w[^>]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[_,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),G(N([[A,/^[\s]+/,null,` \r
|
|
`],[r,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[x,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[a,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[_,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),G(N([],[[r,/^[\s\S]+/]]),["uq.val"]),G(K({keywords:O,hashComments:!0,cStyleComments:!0,types:s}),["c","cc","cpp","cxx","cyc","m"]),G(K({keywords:"null,true,false"}),["json"]),G(K({keywords:l,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:s}),["cs"]),G(K({keywords:D,cStyleComments:!0}),["java"]),G(K({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),G(K({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),G(K({keywords:g,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),G(K({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),G(K({keywords:h,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),G(K({keywords:p,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),G(N([],[[i,/^[\s\S]+/]]),["regex"]);function ge(Ce){var fe=Ce.langExtension;try{var Be=v(Ce.sourceNode,Ce.pre),Ue=Be.sourceCode;Ce.sourceCode=Ue,Ce.spans=Be.spans,Ce.basePos=0,Ee(fe,Ue)(Ce),J(Ce)}catch(re){M.console&&console.log(re&&re.stack||re)}}function Pe(Ce,fe,Be){var Ue=Be||!1,re=fe||null,Z=document.createElement("div");Z.innerHTML="<pre>"+Ce+"</pre>",Z=Z.firstChild,Ue&&ee(Z,Ue,!0);var le={langExtension:re,numberLines:Ue,sourceNode:Z,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ge(le),Z.innerHTML}function Ne(Ce,fe){var Be=fe||document.body,Ue=Be.ownerDocument||document;function re(Ae){return Be.getElementsByTagName(Ae)}for(var Z=[re("pre"),re("code"),re("xmp")],le=[],we=0;we<Z.length;++we)for(var ue=0,pe=Z[we].length;ue<pe;++ue)le.push(Z[we][ue]);Z=null;var ae=Date;ae.now||(ae={now:function(){return+new Date}});var _e=0,ce=/\blang(?:uage)?-([\w.]+)(?!\S)/,he=/\bprettyprint\b/,Le=/\bprettyprinted\b/,Ye=/pre|xmp/i,ke=/^code$/i,be=/^(?:pre|code|xmp)$/i,Re={};function Fe(){for(var Ae=M.PR_SHOULD_USE_CONTINUATION?ae.now()+250:1/0;_e<le.length&&ae.now()<Ae;_e++){for(var Me=le[_e],rt=Re,lt=Me;lt=lt.previousSibling;){var Ze=lt.nodeType,ft=(Ze===7||Ze===8)&<.nodeValue;if(ft?!/^\??prettify\b/.test(ft):Ze!==3||/\S/.test(lt.nodeValue))break;if(ft){rt={},ft.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ve,Ke,We){rt[Ke]=We});break}}var Et=Me.className;if((rt!==Re||he.test(Et))&&!Le.test(Et)){for(var qe=!1,pt=Me.parentNode;pt;pt=pt.parentNode){var Se=pt.tagName;if(be.test(Se)&&pt.className&&he.test(pt.className)){qe=!0;break}}if(!qe){Me.className+=" prettyprinted";var ye=rt.lang;if(!ye){ye=Et.match(ce);var Te;!ye&&(Te=C(Me))&&ke.test(Te.tagName)&&(ye=Te.className.match(ce)),ye&&(ye=ye[1])}var Y;if(Ye.test(Me.tagName))Y=1;else{var W=Me.currentStyle,X=Ue.defaultView,ie=W?W.whiteSpace:X&&X.getComputedStyle?X.getComputedStyle(Me,null).getPropertyValue("white-space"):0;Y=ie&&ie.substring(0,3)==="pre"}var Q=rt.linenums;(Q=Q==="true"||+Q)||(Q=Et.match(/\blinenums\b(?::(\d+))?/),Q=Q?Q[1]&&Q[1].length?+Q[1]:!0:!1),Q&&ee(Me,Q,Y);var de={langExtension:ye,sourceNode:Me,numberLines:Q,pre:Y,sourceCode:null,basePos:null,spans:null,decorations:null};ge(de)}}}_e<le.length?M.setTimeout(Fe,250):typeof Ce=="function"&&Ce()}Fe()}var $e=M.PR={createSimpleLexer:N,registerLangHandler:G,sourceDecorator:K,PR_ATTRIB_NAME:a,PR_ATTRIB_VALUE:r,PR_COMMENT:m,PR_DECLARATION:w,PR_KEYWORD:t,PR_LITERAL:f,PR_NOCODE:d,PR_PLAIN:A,PR_PUNCTUATION:_,PR_SOURCE:n,PR_STRING:i,PR_TAG:x,PR_TYPE:S,prettyPrintOne:z?M.prettyPrintOne=Pe:U=Pe,prettyPrint:L=z?M.prettyPrint=Ne:L=Ne},je=M.define;typeof je=="function"&&je.amd&&je("google-code-prettify",[],function(){return $e})})()},20640:function(Ct,Qe,B){"use strict";var z=B(11742),oe={"text/plain":"Text","text/html":"Url",default:"Text"},te="Copy to clipboard: #{key}, Enter";function U(M){var P=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return M.replace(/#{\s*key\s*}/g,P)}function L(M,P){var k,e,O,D,l,p,h=!1;P||(P={}),k=P.debug||!1;try{O=z(),D=document.createRange(),l=document.getSelection(),p=document.createElement("span"),p.textContent=M,p.ariaHidden="true",p.style.all="unset",p.style.position="fixed",p.style.top=0,p.style.clip="rect(0, 0, 0, 0)",p.style.whiteSpace="pre",p.style.webkitUserSelect="text",p.style.MozUserSelect="text",p.style.msUserSelect="text",p.style.userSelect="text",p.addEventListener("copy",function(o){if(o.stopPropagation(),P.format)if(o.preventDefault(),typeof o.clipboardData=="undefined"){k&&console.warn("unable to use e.clipboardData"),k&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var c=oe[P.format]||oe.default;window.clipboardData.setData(c,M)}else o.clipboardData.clearData(),o.clipboardData.setData(P.format,M);P.onCopy&&(o.preventDefault(),P.onCopy(o.clipboardData))}),document.body.appendChild(p),D.selectNodeContents(p),l.addRange(D);var g=document.execCommand("copy");if(!g)throw new Error("copy command was unsuccessful");h=!0}catch(o){k&&console.error("unable to copy using execCommand: ",o),k&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(P.format||"text",M),P.onCopy&&P.onCopy(window.clipboardData),h=!0}catch(c){k&&console.error("unable to copy using clipboardData: ",c),k&&console.error("falling back to prompt"),e=U("message"in P?P.message:te),window.prompt(e,M)}}finally{l&&(typeof l.removeRange=="function"?l.removeRange(D):l.removeAllRanges()),p&&document.body.removeChild(p),O()}return h}Ct.exports=L},67631:function(Ct){typeof window!="undefined"&&function(B,z){Ct.exports=z()}(this,()=>(()=>{var Qe={"./src/config.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{enableStreamingMode:()=>a,hlsDefaultConfig:()=>x,mergeConfig:()=>n});var M=L("./src/controller/abr-controller.ts"),P=L("./src/controller/audio-stream-controller.ts"),k=L("./src/controller/audio-track-controller.ts"),e=L("./src/controller/subtitle-stream-controller.ts"),O=L("./src/controller/subtitle-track-controller.ts"),D=L("./src/controller/buffer-controller.ts"),l=L("./src/controller/timeline-controller.ts"),p=L("./src/controller/cap-level-controller.ts"),h=L("./src/controller/fps-controller.ts"),g=L("./src/controller/eme-controller.ts"),o=L("./src/controller/cmcd-controller.ts"),c=L("./src/utils/xhr-loader.ts"),y=L("./src/utils/fetch-loader.ts"),u=L("./src/utils/cues.ts"),s=L("./src/utils/mediakeys-helper.ts"),i=L("./src/utils/logger.ts");function t(){return t=Object.assign?Object.assign.bind():function(r){for(var d=1;d<arguments.length;d++){var T=arguments[d];for(var b in T)Object.prototype.hasOwnProperty.call(T,b)&&(r[b]=T[b])}return r},t.apply(this,arguments)}function m(r,d){var T=Object.keys(r);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(r);d&&(b=b.filter(function(v){return Object.getOwnPropertyDescriptor(r,v).enumerable})),T.push.apply(T,b)}return T}function S(r){for(var d=1;d<arguments.length;d++){var T=arguments[d]!=null?arguments[d]:{};d%2?m(Object(T),!0).forEach(function(b){f(r,b,T[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(T)):m(Object(T)).forEach(function(b){Object.defineProperty(r,b,Object.getOwnPropertyDescriptor(T,b))})}return r}function f(r,d,T){return d=_(d),d in r?Object.defineProperty(r,d,{value:T,enumerable:!0,configurable:!0,writable:!0}):r[d]=T,r}function _(r){var d=A(r,"string");return typeof d=="symbol"?d:String(d)}function A(r,d){if(typeof r!="object"||r===null)return r;var T=r[Symbol.toPrimitive];if(T!==void 0){var b=T.call(r,d||"default");if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(r)}var x=S(S({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:c.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:M.default,bufferController:D.default,capLevelController:p.default,fpsController:h.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:s.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0},w()),{},{subtitleStreamController:e.SubtitleStreamController,subtitleTrackController:O.default,timelineController:l.TimelineController,audioStreamController:P.default,audioTrackController:k.default,emeController:g.default,cmcdController:o.default});function w(){return{cueHandler:u.default,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function n(r,d){if((d.liveSyncDurationCount||d.liveMaxLatencyDurationCount)&&(d.liveSyncDuration||d.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(d.liveMaxLatencyDurationCount!==void 0&&(d.liveSyncDurationCount===void 0||d.liveMaxLatencyDurationCount<=d.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(d.liveMaxLatencyDuration!==void 0&&(d.liveSyncDuration===void 0||d.liveMaxLatencyDuration<=d.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},r,d)}function a(r){var d=r.loader;if(d!==y.default&&d!==c.default)i.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),r.progressive=!1;else{var T=(0,y.fetchSupported)();T&&(r.loader=y.default,r.progressive=!0,r.enableSoftwareAES=!0,i.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>c});var M=L("./src/polyfills/number.ts"),P=L("./src/utils/ewma-bandwidth-estimator.ts"),k=L("./src/events.ts"),e=L("./src/errors.ts"),O=L("./src/types/loader.ts"),D=L("./src/utils/logger.ts");function l(y,u){for(var s=0;s<u.length;s++){var i=u[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(y,h(i.key),i)}}function p(y,u,s){return u&&l(y.prototype,u),s&&l(y,s),Object.defineProperty(y,"prototype",{writable:!1}),y}function h(y){var u=g(y,"string");return typeof u=="symbol"?u:String(u)}function g(y,u){if(typeof y!="object"||y===null)return y;var s=y[Symbol.toPrimitive];if(s!==void 0){var i=s.call(y,u||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(y)}var o=function(){function y(s){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=s;var i=s.config;this.bwEstimator=new P.default(i.abrEwmaSlowVoD,i.abrEwmaFastVoD,i.abrEwmaDefaultEstimate),this.registerListeners()}var u=y.prototype;return u.registerListeners=function(){var i=this.hls;i.on(k.Events.FRAG_LOADING,this.onFragLoading,this),i.on(k.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.on(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.on(k.Events.ERROR,this.onError,this)},u.unregisterListeners=function(){var i=this.hls;i.off(k.Events.FRAG_LOADING,this.onFragLoading,this),i.off(k.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.off(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.off(k.Events.ERROR,this.onError,this)},u.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},u.onFragLoading=function(i,t){var m=t.frag;if(m.type===O.PlaylistLevelType.MAIN&&!this.timer){var S;this.fragCurrent=m,this.partCurrent=(S=t.part)!=null?S:null,this.timer=self.setInterval(this.onCheck,100)}},u.onLevelLoaded=function(i,t){var m=this.hls.config;t.details.live?this.bwEstimator.update(m.abrEwmaSlowLive,m.abrEwmaFastLive):this.bwEstimator.update(m.abrEwmaSlowVoD,m.abrEwmaFastVoD)},u._abandonRulesCheck=function(){var i=this.fragCurrent,t=this.partCurrent,m=this.hls,S=m.autoLevelEnabled,f=m.media;if(!(!i||!f)){var _=t?t.stats:i.stats,A=t?t.duration:i.duration;if(_.aborted||_.loaded&&_.loaded===_.total||i.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!(!S||f.paused||!f.playbackRate||!f.readyState)){var x=m.mainForwardBufferInfo;if(x!==null){var w=performance.now()-_.loading.start,n=Math.abs(f.playbackRate);if(!(w<=500*A/n)){var a=_.loaded&&_.loading.first,r=this.bwEstimator.getEstimate(),d=m.levels,T=m.minAutoLevel,b=d[i.level],v=_.total||Math.max(_.loaded,Math.round(A*b.maxBitrate/8)),E=a?_.loaded*1e3/w:0,R=E?(v-_.loaded)/E:v*8/r,C=x.len/n;if(!(R<=C)){var N=Number.POSITIVE_INFINITY,K;for(K=i.level-1;K>T;K--){var H=d[K].maxBitrate;if(N=E?A*H/(8*.8*E):A*H/r,N<C)break}N>=R||(D.logger.warn("Fragment "+i.sn+(t?" part "+t.index:"")+" of level "+i.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+K+`
|
|
Current BW estimate: `+((0,M.isFiniteNumber)(r)?(r/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+R.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+N.toFixed(3)+` s
|
|
Time to underbuffer: `+C.toFixed(3)+" s"),m.nextLoadLevel=K,a&&this.bwEstimator.sample(w,_.loaded),this.clearTimer(),(i.loader||i.keyLoader)&&(this.fragCurrent=this.partCurrent=null,i.abortRequests()),m.trigger(k.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:t,stats:_}))}}}}}},u.onFragLoaded=function(i,t){var m=t.frag,S=t.part;if(m.type===O.PlaylistLevelType.MAIN&&(0,M.isFiniteNumber)(m.sn)){var f=S?S.stats:m.stats,_=S?S.duration:m.duration;if(this.clearTimer(),this.lastLoadedFragLevel=m.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var A=this.hls.levels[m.level],x=(A.loaded?A.loaded.bytes:0)+f.loaded,w=(A.loaded?A.loaded.duration:0)+_;A.loaded={bytes:x,duration:w},A.realBitrate=Math.round(8*x/w)}if(m.bitrateTest){var n={stats:f,frag:m,part:S,id:m.type};this.onFragBuffered(k.Events.FRAG_BUFFERED,n)}}},u.onFragBuffered=function(i,t){var m=t.frag,S=t.part,f=S?S.stats:m.stats;if(!f.aborted&&!(m.type!==O.PlaylistLevelType.MAIN||m.sn==="initSegment")){var _=f.parsing.end-f.loading.start;this.bwEstimator.sample(_,f.loaded),f.bwEstimate=this.bwEstimator.getEstimate(),m.bitrateTest?this.bitrateTestDelay=_/1e3:this.bitrateTestDelay=0}},u.onError=function(i,t){var m;if(((m=t.frag)===null||m===void 0?void 0:m.type)===O.PlaylistLevelType.MAIN){if(t.type===e.ErrorTypes.KEY_SYSTEM_ERROR){this.clearTimer();return}switch(t.details){case e.ErrorDetails.FRAG_LOAD_ERROR:case e.ErrorDetails.FRAG_LOAD_TIMEOUT:case e.ErrorDetails.KEY_LOAD_ERROR:case e.ErrorDetails.KEY_LOAD_TIMEOUT:this.clearTimer();break;default:break}}},u.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},u.getNextABRAutoLevel=function(){var i=this.fragCurrent,t=this.partCurrent,m=this.hls,S=m.maxAutoLevel,f=m.config,_=m.minAutoLevel,A=m.media,x=t?t.duration:i?i.duration:0,w=A&&A.playbackRate!==0?Math.abs(A.playbackRate):1,n=this.bwEstimator?this.bwEstimator.getEstimate():f.abrEwmaDefaultEstimate,a=m.mainForwardBufferInfo,r=(a?a.len:0)/w,d=this.findBestLevel(n,_,S,r,f.abrBandWidthFactor,f.abrBandWidthUpFactor);if(d>=0)return d;D.logger.trace((r?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var T=x?Math.min(x,f.maxStarvationDelay):f.maxStarvationDelay,b=f.abrBandWidthFactor,v=f.abrBandWidthUpFactor;if(!r){var E=this.bitrateTestDelay;if(E){var R=x?Math.min(x,f.maxLoadingDelay):f.maxLoadingDelay;T=R-E,D.logger.trace("bitrate test took "+Math.round(1e3*E)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*T)+" ms"),b=v=1}}return d=this.findBestLevel(n,_,S,r+T,b,v),Math.max(d,0)},u.findBestLevel=function(i,t,m,S,f,_){for(var A,x=this.fragCurrent,w=this.partCurrent,n=this.lastLoadedFragLevel,a=this.hls.levels,r=a[n],d=!!(r!=null&&(A=r.details)!==null&&A!==void 0&&A.live),T=r==null?void 0:r.codecSet,b=w?w.duration:x?x.duration:0,v=m;v>=t;v--){var E=a[v];if(!(!E||T&&E.codecSet!==T)){var R=E.details,C=(w?R==null?void 0:R.partTarget:R==null?void 0:R.averagetargetduration)||b,N=void 0;v<=n?N=f*i:N=_*i;var K=a[v].maxBitrate,H=K*C/N;if(D.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(N)+"/"+K+"/"+C+"/"+S+"/"+H),N>K&&(H===0||!(0,M.isFiniteNumber)(H)||d&&!this.bitrateTestDelay||H<S))return v}}return-1},p(y,[{key:"nextAutoLevel",get:function(){var i=this._nextAutoLevel,t=this.bwEstimator;if(i!==-1&&!t.canEstimate())return i;var m=this.getNextABRAutoLevel();return i!==-1&&this.hls.levels[m].loadError?i:(i!==-1&&(m=Math.min(i,m)),m)},set:function(i){this._nextAutoLevel=i}}]),y}();const c=o},"./src/controller/audio-stream-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>f});var M=L("./src/polyfills/number.ts"),P=L("./src/controller/base-stream-controller.ts"),k=L("./src/events.ts"),e=L("./src/utils/buffer-helper.ts"),O=L("./src/controller/fragment-tracker.ts"),D=L("./src/types/level.ts"),l=L("./src/types/loader.ts"),p=L("./src/loader/fragment.ts"),h=L("./src/demux/chunk-cache.ts"),g=L("./src/demux/transmuxer-interface.ts"),o=L("./src/types/transmuxer.ts"),c=L("./src/controller/fragment-finders.ts"),y=L("./src/utils/discontinuities.ts"),u=L("./src/errors.ts");function s(){return s=Object.assign?Object.assign.bind():function(_){for(var A=1;A<arguments.length;A++){var x=arguments[A];for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&(_[w]=x[w])}return _},s.apply(this,arguments)}function i(_,A){_.prototype=Object.create(A.prototype),_.prototype.constructor=_,t(_,A)}function t(_,A){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,n){return w.__proto__=n,w},t(_,A)}var m=100,S=function(_){i(A,_);function A(w,n,a){var r;return r=_.call(this,w,n,a,"[audio-stream-controller]")||this,r.videoBuffer=null,r.videoTrackCC=-1,r.waitingVideoCC=-1,r.audioSwitch=!1,r.trackId=-1,r.waitingData=null,r.mainDetails=null,r.bufferFlushed=!1,r.cachedTrackLoadedData=null,r._registerListeners(),r}var x=A.prototype;return x.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},x._registerListeners=function(){var n=this.hls;n.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.on(k.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),n.on(k.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.on(k.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),n.on(k.Events.ERROR,this.onError,this),n.on(k.Events.BUFFER_RESET,this.onBufferReset,this),n.on(k.Events.BUFFER_CREATED,this.onBufferCreated,this),n.on(k.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.on(k.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.on(k.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var n=this.hls;n.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.off(k.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),n.off(k.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.off(k.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),n.off(k.Events.ERROR,this.onError,this),n.off(k.Events.BUFFER_RESET,this.onBufferReset,this),n.off(k.Events.BUFFER_CREATED,this.onBufferCreated,this),n.off(k.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.off(k.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.off(k.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onInitPtsFound=function(n,a){var r=a.frag,d=a.id,T=a.initPTS;if(d==="main"){var b=r.cc;this.initPTS[r.cc]=T,this.log("InitPTS for cc: "+b+" found from main: "+T),this.videoTrackCC=b,this.state===P.State.WAITING_INIT_PTS&&this.tick()}},x.startLoad=function(n){if(!this.levels){this.startPosition=n,this.state=P.State.STOPPED;return}var a=this.lastCurrentTime;this.stopLoad(),this.setInterval(m),this.fragLoadError=0,a>0&&n===-1?(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),n=a,this.state=P.State.IDLE):(this.loadedmetadata=!1,this.state=P.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=n,this.tick()},x.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var n,a=this.levels,r=this.trackId,d=a==null||(n=a[r])===null||n===void 0?void 0:n.details;if(d){if(this.waitForCdnTuneIn(d))break;this.state=P.State.WAITING_INIT_PTS}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var T,b=performance.now(),v=this.retryDate;(!v||b>=v||(T=this.media)!==null&&T!==void 0&&T.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=P.State.IDLE);break}case P.State.WAITING_INIT_PTS:{var E=this.waitingData;if(E){var R=E.frag,C=E.part,N=E.cache,K=E.complete;if(this.initPTS[R.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var H=N.flush(),ee={frag:R,part:C,payload:H,networkDetails:null};this._handleFragmentLoadProgress(ee),K&&_.prototype._handleFragmentLoadComplete.call(this,ee)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log("Waiting fragment cc ("+R.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var J=this.getLoadPosition(),se=e.BufferHelper.bufferInfo(this.mediaBuffer,J,this.config.maxBufferHole),G=(0,c.fragmentWithinToleranceTest)(se.end,this.config.maxFragLookUpTolerance,R);G<0&&(this.log("Waiting fragment cc ("+R.cc+") @ "+R.start+" cancelled because another fragment at "+se.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},x.clearWaitingFragment=function(){var n=this.waitingData;n&&(this.fragmentTracker.removeFragment(n.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},x.resetLoadingState=function(){this.clearWaitingFragment(),_.prototype.resetLoadingState.call(this)},x.onTickEnd=function(){var n=this.media;!n||!n.readyState||(this.lastCurrentTime=n.currentTime)},x.doTickIdle=function(){var n=this.hls,a=this.levels,r=this.media,d=this.trackId,T=n.config;if(!(!a||!a[d])&&!(!r&&(this.startFragRequested||!T.startFragPrefetch))){var b=a[d],v=b.details;if(!v||v.live&&this.levelLastLoaded!==d||this.waitForCdnTuneIn(v)){this.state=P.State.WAITING_TRACK;return}var E=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&E&&(this.bufferFlushed=!1,this.afterBufferFlushed(E,p.ElementaryStreamTypes.AUDIO,l.PlaylistLevelType.AUDIO));var R=this.getFwdBufferInfo(E,l.PlaylistLevelType.AUDIO);if(R!==null){var C=this.audioSwitch;if(!C&&this._streamEnded(R,v)){n.trigger(k.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var N=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,l.PlaylistLevelType.MAIN),K=R.len,H=this.getMaxBufferLength(N==null?void 0:N.len);if(!(K>=H&&!C)){var ee=v.fragments,J=ee[0].start,se=R.end;if(C&&r){var G=this.getLoadPosition();se=G,v.PTSKnown&&G<J&&(R.end>J||R.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=J+.05)}if(!(N&&se>N.end+v.targetduration)&&!((!N||!N.len)&&R.len)){var Ee=this.getNextFragment(se,v);if(!Ee){this.bufferFlushed=!0;return}this.loadFragment(Ee,v,se)}}}}},x.getMaxBufferLength=function(n){var a=_.prototype.getMaxBufferLength.call(this);return n?Math.max(a,n):a},x.onMediaDetaching=function(){this.videoBuffer=null,_.prototype.onMediaDetaching.call(this)},x.onAudioTracksUpdated=function(n,a){var r=a.audioTracks;this.resetTransmuxer(),this.levels=r.map(function(d){return new D.Level(d)})},x.onAudioTrackSwitching=function(n,a){var r=!!a.url;this.trackId=a.id;var d=this.fragCurrent;d&&d.abortRequests(),this.fragCurrent=null,this.clearWaitingFragment(),r?this.setInterval(m):this.resetTransmuxer(),r?(this.audioSwitch=!0,this.state=P.State.IDLE):this.state=P.State.STOPPED,this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},x.onLevelLoaded=function(n,a){this.mainDetails=a.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(k.Events.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},x.onAudioTrackLoaded=function(n,a){var r;if(this.mainDetails==null){this.cachedTrackLoadedData=a;return}var d=this.levels,T=a.details,b=a.id;if(!d){this.warn("Audio tracks were reset while loading level "+b);return}this.log("Track "+b+" loaded ["+T.startSN+","+T.endSN+"],duration:"+T.totalduration);var v=d[b],E=0;if(T.live||(r=v.details)!==null&&r!==void 0&&r.live){var R=this.mainDetails;if(T.fragments[0]||(T.deltaUpdateFailed=!0),T.deltaUpdateFailed||!R)return;!v.details&&T.hasProgramDateTime&&R.hasProgramDateTime?((0,y.alignMediaPlaylistByPDT)(T,R),E=T.fragments[0].start):E=this.alignPlaylists(T,v.details)}v.details=T,this.levelLastLoaded=b,!this.startFragRequested&&(this.mainDetails||!T.live)&&this.setStartPosition(v.details,E),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(T)&&(this.state=P.State.IDLE),this.tick()},x._handleFragmentLoadProgress=function(n){var a,r=n.frag,d=n.part,T=n.payload,b=this.config,v=this.trackId,E=this.levels;if(!E){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered");return}var R=E[v];console.assert(R,"Audio track is defined on fragment load progress");var C=R.details;console.assert(C,"Audio track details are defined on fragment load progress");var N=b.defaultAudioCodec||R.audioCodec||"mp4a.40.2",K=this.transmuxer;K||(K=this.transmuxer=new g.default(this.hls,l.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var H=this.initPTS[r.cc],ee=(a=r.initSegment)===null||a===void 0?void 0:a.data;if(H!==void 0){var J=!1,se=d?d.index:-1,G=se!==-1,Ee=new o.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,T.byteLength,se,G);K.push(T,ee,N,"",r,d,C.totalduration,J,Ee,H)}else{this.log("Unknown video PTS for cc "+r.cc+", waiting for video PTS before demuxing audio frag "+r.sn+" of ["+C.startSN+" ,"+C.endSN+"],track "+v);var ge=this.waitingData=this.waitingData||{frag:r,part:d,cache:new h.default,complete:!1},Pe=ge.cache;Pe.push(new Uint8Array(T)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},x._handleFragmentLoadComplete=function(n){if(this.waitingData){this.waitingData.complete=!0;return}_.prototype._handleFragmentLoadComplete.call(this,n)},x.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},x.onBufferCreated=function(n,a){var r=a.tracks.audio;r&&(this.mediaBuffer=r.buffer||null),a.tracks.video&&(this.videoBuffer=a.tracks.video.buffer||null)},x.onFragBuffered=function(n,a){var r=a.frag,d=a.part;if(r.type!==l.PlaylistLevelType.AUDIO){if(!this.loadedmetadata&&r.type===l.PlaylistLevelType.MAIN){var T;(T=this.videoBuffer||this.media)!==null&&T!==void 0&&T.buffered.length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(r)){this.warn("Fragment "+r.sn+(d?" p: "+d.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}r.sn!=="initSegment"&&(this.fragPrevious=r,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(k.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(r,d)},x.onError=function(n,a){if(a.type===u.ErrorTypes.KEY_SYSTEM_ERROR){this.onFragmentOrKeyLoadError(l.PlaylistLevelType.AUDIO,a);return}switch(a.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.FRAG_PARSING_ERROR:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.AUDIO,a);break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==P.State.ERROR&&this.state!==P.State.STOPPED&&(this.state=a.fatal?P.State.ERROR:P.State.IDLE,this.warn(a.details+" while loading frag, switching to "+this.state+" state"));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="audio"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var r=!0,d=this.getFwdBufferInfo(this.mediaBuffer,l.PlaylistLevelType.AUDIO);d&&d.len>.5&&(r=!this.reduceMaxBufferLength(d.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,_.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},x.onBufferFlushed=function(n,a){var r=a.type;r===p.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0,this.state===P.State.ENDED&&(this.state=P.State.IDLE))},x._handleTransmuxComplete=function(n){var a,r="audio",d=this.hls,T=n.remuxResult,b=n.chunkMeta,v=this.getCurrentContext(b);if(!v){this.warn("The loading context changed while buffering fragment "+b.sn+" of level "+b.level+". This chunk will not be buffered."),this.resetStartWhenNotLoaded(b.level);return}var E=v.frag,R=v.part,C=v.level.details,N=T.audio,K=T.text,H=T.id3,ee=T.initSegment;if(!(this.fragContextChanged(E)||!C)){if(this.state=P.State.PARSING,this.audioSwitch&&N&&this.completeAudioSwitch(),ee!=null&&ee.tracks&&(this._bufferInitSegment(ee.tracks,E,b),d.trigger(k.Events.FRAG_PARSING_INIT_SEGMENT,{frag:E,id:r,tracks:ee.tracks})),N){var J=N.startPTS,se=N.endPTS,G=N.startDTS,Ee=N.endDTS;R&&(R.elementaryStreams[p.ElementaryStreamTypes.AUDIO]={startPTS:J,endPTS:se,startDTS:G,endDTS:Ee}),E.setElementaryStreamInfo(p.ElementaryStreamTypes.AUDIO,J,se,G,Ee),this.bufferFragmentData(N,E,R,b)}if(H!=null&&(a=H.samples)!==null&&a!==void 0&&a.length){var ge=s({id:r,frag:E,details:C},H);d.trigger(k.Events.FRAG_PARSING_METADATA,ge)}if(K){var Pe=s({id:r,frag:E,details:C},K);d.trigger(k.Events.FRAG_PARSING_USERDATA,Pe)}}},x._bufferInitSegment=function(n,a,r){if(this.state===P.State.PARSING){n.video&&delete n.video;var d=n.audio;if(d){d.levelCodec=d.codec,d.id="audio",this.log("Init audio buffer, container:"+d.container+", codecs[parsed]=["+d.codec+"]"),this.hls.trigger(k.Events.BUFFER_CODECS,n);var T=d.initSegment;if(T!=null&&T.byteLength){var b={type:"audio",frag:a,part:null,chunkMeta:r,parent:a.type,data:T};this.hls.trigger(k.Events.BUFFER_APPENDING,b)}this.tick()}}},x.loadFragment=function(n,a,r){var d=this.fragmentTracker.getState(n);this.fragCurrent=n,(this.audioSwitch||d===O.FragmentState.NOT_LOADED||d===O.FragmentState.PARTIAL)&&(n.sn==="initSegment"?this._loadInitSegment(n,a):a.live&&!(0,M.isFiniteNumber)(this.initPTS[n.cc])?(this.log("Waiting for video PTS in continuity counter "+n.cc+" of live stream before loading audio fragment "+n.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,n,a,r)))},x.completeAudioSwitch=function(){var n=this.hls,a=this.media,r=this.trackId;a&&(this.log("Switching audio track : flushing all audio"),_.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,n.trigger(k.Events.AUDIO_TRACK_SWITCHED,{id:r})},A}(P.default);const f=S},"./src/controller/audio-track-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>c});var M=L("./src/events.ts"),P=L("./src/errors.ts"),k=L("./src/controller/base-playlist-controller.ts"),e=L("./src/types/loader.ts");function O(y,u){for(var s=0;s<u.length;s++){var i=u[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(y,l(i.key),i)}}function D(y,u,s){return u&&O(y.prototype,u),s&&O(y,s),Object.defineProperty(y,"prototype",{writable:!1}),y}function l(y){var u=p(y,"string");return typeof u=="symbol"?u:String(u)}function p(y,u){if(typeof y!="object"||y===null)return y;var s=y[Symbol.toPrimitive];if(s!==void 0){var i=s.call(y,u||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(y)}function h(y,u){y.prototype=Object.create(u.prototype),y.prototype.constructor=y,g(y,u)}function g(y,u){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,t){return i.__proto__=t,i},g(y,u)}var o=function(y){h(u,y);function u(i){var t;return t=y.call(this,i,"[audio-track-controller]")||this,t.tracks=[],t.groupId=null,t.tracksInGroup=[],t.trackId=-1,t.trackName="",t.selectDefaultTrack=!0,t.registerListeners(),t}var s=u.prototype;return s.registerListeners=function(){var t=this.hls;t.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(M.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var t=this.hls;t.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(M.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,y.prototype.destroy.call(this)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},s.onManifestParsed=function(t,m){this.tracks=m.audioTracks||[]},s.onAudioTrackLoaded=function(t,m){var S=m.id,f=m.details,_=this.tracksInGroup[S];if(!_){this.warn("Invalid audio track id "+S);return}var A=_.details;_.details=m.details,this.log("audioTrack "+S+" loaded ["+f.startSN+"-"+f.endSN+"]"),S===this.trackId&&(this.retryCount=0,this.playlistLoaded(S,m,A))},s.onLevelLoading=function(t,m){this.switchLevel(m.level)},s.onLevelSwitching=function(t,m){this.switchLevel(m.level)},s.switchLevel=function(t){var m=this.hls.levels[t];if(m!=null&&m.audioGroupIds){var S=m.audioGroupIds[m.urlId];if(this.groupId!==S){this.groupId=S;var f=this.tracks.filter(function(A){return!S||A.groupId===S});this.selectDefaultTrack&&!f.some(function(A){return A.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=f;var _={audioTracks:f};this.log("Updating audio tracks, "+f.length+' track(s) found in "'+S+'" group-id'),this.hls.trigger(M.Events.AUDIO_TRACKS_UPDATED,_),this.selectInitialTrack()}}},s.onError=function(t,m){y.prototype.onError.call(this,t,m),!(m.fatal||!m.context)&&m.context.type===e.PlaylistContextType.AUDIO_TRACK&&m.context.id===this.trackId&&m.context.groupId===this.groupId&&this.retryLoadingOrFail(m)},s.setAudioTrack=function(t){var m=this.tracksInGroup;if(t<0||t>=m.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var S=m[this.trackId];this.log("Now switching to audio-track index "+t);var f=m[t],_=f.id,A=f.groupId,x=A===void 0?"":A,w=f.name,n=f.type,a=f.url;if(this.trackId=t,this.trackName=w,this.selectDefaultTrack=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHING,{id:_,groupId:x,name:w,type:n,url:a}),!(f.details&&!f.details.live)){var r=this.switchParams(f.url,S==null?void 0:S.details);this.loadPlaylist(r)}},s.selectInitialTrack=function(){var t=this.tracksInGroup;console.assert(t.length,"Initial audio track should be selected when tracks are known");var m=this.trackName,S=this.findTrackId(m)||this.findTrackId();S!==-1?this.setAudioTrack(S):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(t){for(var m=this.tracksInGroup,S=0;S<m.length;S++){var f=m[S];if((!this.selectDefaultTrack||f.default)&&(!t||t===f.name))return f.id}return-1},s.loadPlaylist=function(t){y.prototype.loadPlaylist.call(this);var m=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(m)){var S=m.id,f=m.groupId,_=m.url;if(t)try{_=t.addDirectives(_)}catch(A){this.warn("Could not construct new URL with HLS Delivery Directives: "+A)}this.log("loading audio-track playlist for id: "+S),this.clearTimer(),this.hls.trigger(M.Events.AUDIO_TRACK_LOADING,{url:_,id:S,groupId:f,deliveryDirectives:t||null})}},D(u,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1,this.setAudioTrack(t)}}]),u}(k.default);const c=o},"./src/controller/base-playlist-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>O});var M=L("./src/types/level.ts"),P=L("./src/controller/level-helper.ts"),k=L("./src/utils/logger.ts"),e=L("./src/errors.ts"),O=function(){function D(p,h){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=k.logger.log.bind(k.logger,h+":"),this.warn=k.logger.warn.bind(k.logger,h+":"),this.hls=p}var l=D.prototype;return l.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},l.onError=function(h,g){g.fatal&&(g.type===e.ErrorTypes.NETWORK_ERROR||g.type===e.ErrorTypes.KEY_SYSTEM_ERROR)&&this.stopLoad()},l.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},l.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.requestScheduled=-1,this.loadPlaylist()},l.stopLoad=function(){this.canLoad=!1,this.clearTimer()},l.switchParams=function(h,g){var o=g==null?void 0:g.renditionReports;if(o)for(var c=0;c<o.length;c++){var y=o[c],u=void 0;try{u=new self.URL(y.URI,g.url).href}catch(m){k.logger.warn("Could not construct new URL for Rendition Report: "+m),u=y.URI||""}if(u===h.slice(-u.length)){var s=parseInt(y["LAST-MSN"])||(g==null?void 0:g.lastPartSn),i=parseInt(y["LAST-PART"])||(g==null?void 0:g.lastPartIndex);if(this.hls.config.lowLatencyMode){var t=Math.min(g.age-g.partTarget,g.targetduration);i>=0&&t>g.partTarget&&(i+=1)}return new M.HlsUrlParameters(s,i>=0?i:void 0,M.HlsSkip.No)}}},l.loadPlaylist=function(h){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())},l.shouldLoadTrack=function(h){return this.canLoad&&h&&!!h.url&&(!h.details||h.details.live)},l.playlistLoaded=function(h,g,o){var c=this,y=g.details,u=g.stats,s=self.performance.now(),i=u.loading.first?Math.max(0,s-u.loading.first):0;if(y.advancedDateTime=Date.now()-i,y.live||o!=null&&o.live){if(y.reloaded(o),o&&this.log("live playlist "+h+" "+(y.advanced?"REFRESHED "+y.lastPartSn+"-"+y.lastPartIndex:"MISSED")),o&&y.fragments.length>0&&(0,P.mergeDetails)(o,y),!this.canLoad||!y.live)return;var t,m=void 0,S=void 0;if(y.canBlockReload&&y.endSN&&y.advanced){var f=this.hls.config.lowLatencyMode,_=y.lastPartSn,A=y.endSN,x=y.lastPartIndex,w=x!==-1,n=_===A,a=f?0:x;w?(m=n?A+1:_,S=n?a:x+1):m=A+1;var r=y.age,d=r+y.ageHeader,T=Math.min(d-y.partTarget,y.targetduration*1.5);if(T>0){if(o&&T>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+T+" with playlist age: "+y.age),T=0;else{var b=Math.floor(T/y.targetduration);if(m+=b,S!==void 0){var v=Math.round(T%y.targetduration/y.partTarget);S+=v}this.log("CDN Tune-in age: "+y.ageHeader+"s last advanced "+r.toFixed(2)+"s goal: "+T+" skip sn "+b+" to part "+S)}y.tuneInGoal=T}if(t=this.getDeliveryDirectives(y,g.deliveryDirectives,m,S),f||!n){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(y,g.deliveryDirectives,m,S);var E=this.hls.mainForwardBufferInfo,R=E?E.end-E.len:0,C=(y.edge-R)*1e3,N=(0,P.computeReloadInterval)(y,C);y.updated?s>this.requestScheduled+N&&(this.requestScheduled=u.loading.start):this.requestScheduled=-1,m!==void 0&&y.canBlockReload?this.requestScheduled=u.loading.first+N-(y.partTarget*1e3||1e3):this.requestScheduled=(this.requestScheduled===-1?s:this.requestScheduled)+N;var K=this.requestScheduled-s;K=Math.max(0,K),this.log("reload live playlist "+h+" in "+Math.round(K)+" ms"),this.timer=self.setTimeout(function(){return c.loadPlaylist(t)},K)}else this.clearTimer()},l.getDeliveryDirectives=function(h,g,o,c){var y=(0,M.getSkipValue)(h,o);return g!=null&&g.skip&&h.deltaUpdateFailed&&(o=g.msn,c=g.part,y=M.HlsSkip.No),new M.HlsUrlParameters(o,c,y)},l.retryLoadingOrFail=function(h){var g=this,o=this.hls.config,c=this.retryCount<o.levelLoadingMaxRetry;if(c){var y;if(this.requestScheduled=-1,this.retryCount++,h.details.indexOf("LoadTimeOut")>-1&&(y=h.context)!==null&&y!==void 0&&y.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+h.details+'"'),this.loadPlaylist();else{var u=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return g.loadPlaylist()},u),this.warn("retry playlist loading #"+this.retryCount+" in "+u+' ms after "'+h.details+'"')}}else this.warn('cannot recover from error "'+h.details+'"'),this.clearTimer(),h.fatal=!0;return c},D}()},"./src/controller/base-stream-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{State:()=>w,default:()=>n});var M=L("./src/polyfills/number.ts"),P=L("./src/task-loop.ts"),k=L("./src/controller/fragment-tracker.ts"),e=L("./src/utils/buffer-helper.ts"),O=L("./src/utils/logger.ts"),D=L("./src/events.ts"),l=L("./src/errors.ts"),p=L("./src/types/transmuxer.ts"),h=L("./src/utils/mp4-tools.ts"),g=L("./src/utils/discontinuities.ts"),o=L("./src/controller/fragment-finders.ts"),c=L("./src/controller/level-helper.ts"),y=L("./src/loader/fragment-loader.ts"),u=L("./src/crypt/decrypter.ts"),s=L("./src/utils/time-ranges.ts"),i=L("./src/types/loader.ts");function t(a,r){for(var d=0;d<r.length;d++){var T=r[d];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(a,S(T.key),T)}}function m(a,r,d){return r&&t(a.prototype,r),d&&t(a,d),Object.defineProperty(a,"prototype",{writable:!1}),a}function S(a){var r=f(a,"string");return typeof r=="symbol"?r:String(r)}function f(a,r){if(typeof a!="object"||a===null)return a;var d=a[Symbol.toPrimitive];if(d!==void 0){var T=d.call(a,r||"default");if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}function _(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function A(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,x(a,r)}function x(a,r){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,b){return T.__proto__=b,T},x(a,r)}var w={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},n=function(a){A(r,a);function r(T,b,v,E){var R;return R=a.call(this)||this,R.hls=void 0,R.fragPrevious=null,R.fragCurrent=null,R.fragmentTracker=void 0,R.transmuxer=null,R._state=w.STOPPED,R.media=null,R.mediaBuffer=null,R.config=void 0,R.bitrateTest=!1,R.lastCurrentTime=0,R.nextLoadPosition=0,R.startPosition=0,R.loadedmetadata=!1,R.fragLoadError=0,R.retryDate=0,R.levels=null,R.fragmentLoader=void 0,R.keyLoader=void 0,R.levelLastLoaded=null,R.startFragRequested=!1,R.decrypter=void 0,R.initPTS=[],R.onvseeking=null,R.onvended=null,R.logPrefix="",R.log=void 0,R.warn=void 0,R.logPrefix=E,R.log=O.logger.log.bind(O.logger,E+":"),R.warn=O.logger.warn.bind(O.logger,E+":"),R.hls=T,R.fragmentLoader=new y.default(T.config),R.keyLoader=v,R.fragmentTracker=b,R.config=T.config,R.decrypter=new u.default(T.config),T.on(D.Events.LEVEL_SWITCHING,R.onLevelSwitching,_(R)),R}var d=r.prototype;return d.doTick=function(){this.onTickEnd()},d.onTickEnd=function(){},d.startLoad=function(b){},d.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort();var b=this.fragCurrent;b&&(b.abortRequests(),this.fragmentTracker.removeFragment(b)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=w.STOPPED},d._streamEnded=function(b,v){if(v.live||b.nextStart||!b.end||!this.media)return!1;var E=v.partList;if(E!=null&&E.length){var R=E[E.length-1],C=e.BufferHelper.isBuffered(this.media,R.start+R.duration/2);return C}var N=v.fragments[v.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(N)},d.getLevelDetails=function(){if(this.levels&&this.levelLastLoaded!==null){var b;return(b=this.levels[this.levelLastLoaded])===null||b===void 0?void 0:b.details}},d.onMediaAttached=function(b,v){var E=this.media=this.mediaBuffer=v.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),E.addEventListener("seeking",this.onvseeking),E.addEventListener("ended",this.onvended);var R=this.config;this.levels&&R.autoStartLoad&&this.state===w.STOPPED&&this.startLoad(R.startPosition)},d.onMediaDetaching=function(){var b=this.media;b!=null&&b.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),b&&this.onvseeking&&this.onvended&&(b.removeEventListener("seeking",this.onvseeking),b.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},d.onMediaSeeking=function(){var b=this.config,v=this.fragCurrent,E=this.media,R=this.mediaBuffer,C=this.state,N=E?E.currentTime:0,K=e.BufferHelper.bufferInfo(R||E,N,b.maxBufferHole);if(this.log("media seeking to "+((0,M.isFiniteNumber)(N)?N.toFixed(3):N)+", state: "+C),this.state===w.ENDED)this.resetLoadingState();else if(v){var H=b.maxFragLookUpTolerance,ee=v.start-H,J=v.start+v.duration+H;if(!K.len||J<K.start||ee>K.end){var se=N>J;(N<ee||se)&&(se&&v.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),v.abortRequests()),this.resetLoadingState())}}E&&(this.lastCurrentTime=N),!this.loadedmetadata&&!K.len&&(this.nextLoadPosition=this.startPosition=N),this.tickImmediate()},d.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},d.onLevelSwitching=function(b,v){this.fragLoadError=0},d.onHandlerDestroying=function(){this.stopLoad(),a.prototype.onHandlerDestroying.call(this)},d.onHandlerDestroyed=function(){this.state=w.STOPPED,this.hls.off(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,a.prototype.onHandlerDestroyed.call(this)},d.loadFragment=function(b,v,E){this._loadFragForPlayback(b,v,E)},d._loadFragForPlayback=function(b,v,E){var R=this,C=function(K){if(R.fragContextChanged(b)){R.warn("Fragment "+b.sn+(K.part?" p: "+K.part.index:"")+" of level "+b.level+" was dropped during download."),R.fragmentTracker.removeFragment(b);return}b.stats.chunkCount++,R._handleFragmentLoadProgress(K)};this._doFragLoad(b,v,E,C).then(function(N){if(N){R.fragLoadError=0;var K=R.state;if(R.fragContextChanged(b)){(K===w.FRAG_LOADING||!R.fragCurrent&&K===w.PARSING)&&(R.fragmentTracker.removeFragment(b),R.state=w.IDLE);return}"payload"in N&&(R.log("Loaded fragment "+b.sn+" of level "+b.level),R.hls.trigger(D.Events.FRAG_LOADED,N)),R._handleFragmentLoadComplete(N)}}).catch(function(N){R.state===w.STOPPED||R.state===w.ERROR||(R.warn(N),R.resetFragmentLoading(b))})},d.flushMainBuffer=function(b,v,E){if(E===void 0&&(E=null),!!(b-v)){var R={startOffset:b,endOffset:v,type:E};this.fragLoadError=0,this.hls.trigger(D.Events.BUFFER_FLUSHING,R)}},d._loadInitSegment=function(b,v){var E=this;this._doFragLoad(b,v).then(function(R){if(!R||E.fragContextChanged(b)||!E.levels)throw new Error("init load aborted");return R}).then(function(R){var C=E.hls,N=R.payload,K=b.decryptdata;if(N&&N.byteLength>0&&K&&K.key&&K.iv&&K.method==="AES-128"){var H=self.performance.now();return E.decrypter.decrypt(new Uint8Array(N),K.key.buffer,K.iv.buffer).then(function(ee){var J=self.performance.now();return C.trigger(D.Events.FRAG_DECRYPTED,{frag:b,payload:ee,stats:{tstart:H,tdecrypt:J}}),R.payload=ee,R})}return R}).then(function(R){var C=E.fragCurrent,N=E.hls,K=E.levels;if(!K)throw new Error("init load aborted, missing levels");var H=K[b.level].details;console.assert(H,"Level details are defined when init segment is loaded");var ee=b.stats;E.state=w.IDLE,E.fragLoadError=0,b.data=new Uint8Array(R.payload),ee.parsing.start=ee.buffering.start=self.performance.now(),ee.parsing.end=ee.buffering.end=self.performance.now(),R.frag===C&&N.trigger(D.Events.FRAG_BUFFERED,{stats:ee,frag:C,part:null,id:b.type}),E.tick()}).catch(function(R){E.state===w.STOPPED||E.state===w.ERROR||(E.warn(R),E.resetFragmentLoading(b))})},d.fragContextChanged=function(b){var v=this.fragCurrent;return!b||!v||b.level!==v.level||b.sn!==v.sn||b.urlId!==v.urlId},d.fragBufferedComplete=function(b,v){var E,R,C,N,K=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+b.type+" sn: "+b.sn+(v?" part: "+v.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+b.level+" (frag:["+((E=b.startPTS)!=null?E:NaN).toFixed(3)+"-"+((R=b.endPTS)!=null?R:NaN).toFixed(3)+"] > buffer:"+(K?s.default.toString(e.BufferHelper.getBuffered(K)):"(detached)")+")"),this.state=w.IDLE,K&&(!this.loadedmetadata&&b.type==i.PlaylistLevelType.MAIN&&K.buffered.length&&((C=this.fragCurrent)===null||C===void 0?void 0:C.sn)===((N=this.fragPrevious)===null||N===void 0?void 0:N.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},d.seekToStartPos=function(){},d._handleFragmentLoadComplete=function(b){var v=this.transmuxer;if(v){var E=b.frag,R=b.part,C=b.partsLoaded,N=!C||C.length===0||C.some(function(H){return!H}),K=new p.ChunkMetadata(E.level,E.sn,E.stats.chunkCount+1,0,R?R.index:-1,!N);v.flush(K)}},d._handleFragmentLoadProgress=function(b){},d._doFragLoad=function(b,v,E,R){var C,N=this;if(E===void 0&&(E=null),!this.levels)throw new Error("frag load aborted, missing levels");var K=null;if(b.encrypted&&!((C=b.decryptdata)!==null&&C!==void 0&&C.key)?(this.log("Loading key for "+b.sn+" of ["+v.startSN+"-"+v.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+b.level),this.state=w.KEY_LOADING,this.fragCurrent=b,K=this.keyLoader.load(b).then(function(G){if(!N.fragContextChanged(G.frag))return N.hls.trigger(D.Events.KEY_LOADED,G),N.state===w.KEY_LOADING&&(N.state=w.IDLE),G}),this.hls.trigger(D.Events.KEY_LOADING,{frag:b}),this.throwIfFragContextChanged("KEY_LOADING")):!b.encrypted&&v.encryptedFragments.length&&this.keyLoader.loadClear(b,v.encryptedFragments),E=Math.max(b.start,E||0),this.config.lowLatencyMode&&v){var H=v.partList;if(H&&R){E>b.end&&v.fragmentHint&&(b=v.fragmentHint);var ee=this.getNextPart(H,b,E);if(ee>-1){var J=H[ee];return this.log("Loading part sn: "+b.sn+" p: "+J.index+" cc: "+b.cc+" of playlist ["+v.startSN+"-"+v.endSN+"] parts [0-"+ee+"-"+(H.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+b.level+", target: "+parseFloat(E.toFixed(3))),this.nextLoadPosition=J.start+J.duration,this.state=w.FRAG_LOADING,this.hls.trigger(D.Events.FRAG_LOADING,{frag:b,part:H[ee],targetBufferTime:E}),this.throwIfFragContextChanged("FRAG_LOADING parts"),K?K.then(function(G){return!G||N.fragContextChanged(G.frag)?null:N.doFragPartsLoad(b,H,ee,R)}).catch(function(G){return N.handleFragLoadError(G)}):this.doFragPartsLoad(b,H,ee,R).catch(function(G){return N.handleFragLoadError(G)})}else if(!b.url||this.loadedEndOfParts(H,E))return Promise.resolve(null)}}this.log("Loading fragment "+b.sn+" cc: "+b.cc+" "+(v?"of ["+v.startSN+"-"+v.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+b.level+", target: "+parseFloat(E.toFixed(3))),(0,M.isFiniteNumber)(b.sn)&&!this.bitrateTest&&(this.nextLoadPosition=b.start+b.duration),this.state=w.FRAG_LOADING,this.hls.trigger(D.Events.FRAG_LOADING,{frag:b,targetBufferTime:E}),this.throwIfFragContextChanged("FRAG_LOADING");var se=this.config.progressive;return se&&K?K.then(function(G){return!G||N.fragContextChanged(G==null?void 0:G.frag)?null:N.fragmentLoader.load(b,R)}).catch(function(G){return N.handleFragLoadError(G)}):Promise.all([this.fragmentLoader.load(b,se?R:void 0),K]).then(function(G){var Ee=G[0];return!se&&Ee&&R&&R(Ee),Ee}).catch(function(G){return N.handleFragLoadError(G)})},d.throwIfFragContextChanged=function(b){if(this.fragCurrent===null)throw new Error("frag load aborted, context changed in "+b)},d.doFragPartsLoad=function(b,v,E,R){var C=this;return new Promise(function(N,K){var H=[],ee=function J(se){var G=v[se];C.fragmentLoader.loadPart(b,G,R).then(function(Ee){H[G.index]=Ee;var ge=Ee.part;C.hls.trigger(D.Events.FRAG_LOADED,Ee);var Pe=v[se+1];if(Pe&&Pe.fragment===b)J(se+1);else return N({frag:b,part:ge,partsLoaded:H})}).catch(K)};ee(E)})},d.handleFragLoadError=function(b){if("data"in b){var v=b.data;b.data&&v.details===l.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(v.frag,v.part):this.hls.trigger(D.Events.ERROR,v)}else this.hls.trigger(D.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,err:b,fatal:!0});return null},d._handleTransmuxerFlush=function(b){var v=this.getCurrentContext(b);if(!v||this.state!==w.PARSING){!this.fragCurrent&&this.state!==w.STOPPED&&this.state!==w.ERROR&&(this.state=w.IDLE);return}var E=v.frag,R=v.part,C=v.level,N=self.performance.now();E.stats.parsing.end=N,R&&(R.stats.parsing.end=N),this.updateLevelTiming(E,R,C,b.partial)},d.getCurrentContext=function(b){var v=this.levels,E=b.level,R=b.sn,C=b.part;if(!v||!v[E])return this.warn("Levels object was unset while buffering fragment "+R+" of level "+E+". The current chunk will not be buffered."),null;var N=v[E],K=C>-1?(0,c.getPartWith)(N,R,C):null,H=K?K.fragment:(0,c.getFragmentWithSN)(N,R,this.fragCurrent);return H?{frag:H,part:K,level:N}:null},d.bufferFragmentData=function(b,v,E,R){if(!(!b||this.state!==w.PARSING)){var C=b.data1,N=b.data2,K=C;if(C&&N&&(K=(0,h.appendUint8Array)(C,N)),!(!K||!K.length)){var H={type:b.type,frag:v,part:E,chunkMeta:R,parent:v.type,data:K};this.hls.trigger(D.Events.BUFFER_APPENDING,H),b.dropped&&b.independent&&!E&&this.flushBufferGap(v)}}},d.flushBufferGap=function(b){var v=this.media;if(v){if(!e.BufferHelper.isBuffered(v,v.currentTime)){this.flushMainBuffer(0,b.start);return}var E=v.currentTime,R=e.BufferHelper.bufferInfo(v,E,0),C=b.duration,N=Math.min(this.config.maxFragLookUpTolerance*2,C*.25),K=Math.max(Math.min(b.start-N,R.end-N),E+N);b.start-K>N&&this.flushMainBuffer(K,b.start)}},d.getFwdBufferInfo=function(b,v){var E=this.config,R=this.getLoadPosition();if(!(0,M.isFiniteNumber)(R))return null;var C=e.BufferHelper.bufferInfo(b,R,E.maxBufferHole);if(C.len===0&&C.nextStart!==void 0){var N=this.fragmentTracker.getBufferedFrag(R,v);if(N&&C.nextStart<N.end)return e.BufferHelper.bufferInfo(b,R,Math.max(C.nextStart,E.maxBufferHole))}return C},d.getMaxBufferLength=function(b){var v=this.config,E;return b?E=Math.max(8*v.maxBufferSize/b,v.maxBufferLength):E=v.maxBufferLength,Math.min(E,v.maxMaxBufferLength)},d.reduceMaxBufferLength=function(b){var v=this.config,E=b||v.maxBufferLength;return v.maxMaxBufferLength>=E?(v.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+v.maxMaxBufferLength+"s"),!0):!1},d.getNextFragment=function(b,v){var E=v.fragments,R=E.length;if(!R)return null;var C=this.config,N=E[0].start,K;if(v.live){var H=C.initialLiveManifestSize;if(R<H)return this.warn("Not enough fragments to start playback (have: "+R+", need: "+H+")"),null;!v.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(K=this.getInitialLiveFragment(v,E),this.startPosition=K?this.hls.liveSyncPosition||K.start:b)}else b<=N&&(K=E[0]);if(!K){var ee=C.lowLatencyMode?v.partEnd:v.fragmentEnd;K=this.getFragmentAtPosition(b,ee,v)}return this.mapToInitFragWhenRequired(K)},d.mapToInitFragWhenRequired=function(b){return b!=null&&b.initSegment&&!(b!=null&&b.initSegment.data)&&!this.bitrateTest?b.initSegment:b},d.getNextPart=function(b,v,E){for(var R=-1,C=!1,N=!0,K=0,H=b.length;K<H;K++){var ee=b[K];if(N=N&&!ee.independent,R>-1&&E<ee.start)break;var J=ee.loaded;J?R=-1:(C||ee.independent||N)&&ee.fragment===v&&(R=K),C=J}return R},d.loadedEndOfParts=function(b,v){var E=b[b.length-1];return E&&v>E.start&&E.loaded},d.getInitialLiveFragment=function(b,v){var E=this.fragPrevious,R=null;if(E){if(b.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+E.programDateTime),R=(0,o.findFragmentByPDT)(v,E.endProgramDateTime,this.config.maxFragLookUpTolerance)),!R){var C=E.sn+1;if(C>=b.startSN&&C<=b.endSN){var N=v[C-b.startSN];E.cc===N.cc&&(R=N,this.log("Live playlist, switching playlist, load frag with next SN: "+R.sn))}R||(R=(0,o.findFragWithCC)(v,E.cc),R&&this.log("Live playlist, switching playlist, load frag with same CC: "+R.sn))}}else{var K=this.hls.liveSyncPosition;K!==null&&(R=this.getFragmentAtPosition(K,this.bitrateTest?b.fragmentEnd:b.edge,b))}return R},d.getFragmentAtPosition=function(b,v,E){var R=this.config,C=this.fragPrevious,N=E.fragments,K=E.endSN,H=E.fragmentHint,ee=R.maxFragLookUpTolerance,J=!!(R.lowLatencyMode&&E.partList&&H);J&&H&&!this.bitrateTest&&(N=N.concat(H),K=H.sn);var se;if(b<v){var G=b>v-ee?0:ee;se=(0,o.findFragmentByPTS)(C,N,b,G)}else se=N[N.length-1];if(se){var Ee=se.sn-E.startSN;if(this.fragmentTracker.getState(se)===k.FragmentState.OK&&(C=se),C&&se.sn===C.sn&&!J){var ge=C&&se.level===C.level;if(ge){var Pe=N[Ee+1];se.sn<K&&this.fragmentTracker.getState(Pe)!==k.FragmentState.OK?(this.log("SN "+se.sn+" just loaded, load next one: "+Pe.sn),se=Pe):se=null}}}return se},d.synchronizeToLiveEdge=function(b){var v=this.config,E=this.media;if(E){var R=this.hls.liveSyncPosition,C=E.currentTime,N=b.fragments[0].start,K=b.edge,H=C>=N-v.maxFragLookUpTolerance&&C<=K;if(R!==null&&E.duration>R&&(C<R||!H)){var ee=v.liveMaxLatencyDuration!==void 0?v.liveMaxLatencyDuration:v.liveMaxLatencyDurationCount*b.targetduration;(!H&&E.readyState<4||C<K-ee)&&(this.loadedmetadata||(this.nextLoadPosition=R),E.readyState&&(this.warn("Playback: "+C.toFixed(3)+" is located too far from the end of live sliding playlist: "+K+", reset currentTime to : "+R.toFixed(3)),E.currentTime=R))}}},d.alignPlaylists=function(b,v){var E=this.levels,R=this.levelLastLoaded,C=this.fragPrevious,N=R!==null?E[R]:null,K=b.fragments.length;if(!K)return this.warn("No fragments in live playlist"),0;var H=b.fragments[0].start,ee=!v,J=b.alignedSliding&&(0,M.isFiniteNumber)(H);if(ee||!J&&!H){(0,g.alignStream)(C,N,b);var se=b.fragments[0].start;return this.log("Live playlist sliding: "+se.toFixed(2)+" start-sn: "+(v?v.startSN:"na")+"->"+b.startSN+" prev-sn: "+(C?C.sn:"na")+" fragments: "+K),se}return H},d.waitForCdnTuneIn=function(b){var v=3;return b.live&&b.canBlockReload&&b.partTarget&&b.tuneInGoal>Math.max(b.partHoldBack,b.partTarget*v)},d.setStartPosition=function(b,v){var E=this.startPosition;if(E<v&&(E=-1),E===-1||this.lastCurrentTime===-1){var R=b.startTimeOffset;(0,M.isFiniteNumber)(R)?(E=v+R,R<0&&(E+=b.totalduration),E=Math.min(Math.max(v,E),v+b.totalduration),this.log("Start time offset "+R+" found in playlist, adjust startPosition to "+E),this.startPosition=E):b.live?E=this.hls.liveSyncPosition||v:this.startPosition=E=0,this.lastCurrentTime=E}this.nextLoadPosition=E},d.getLoadPosition=function(){var b=this.media,v=0;return this.loadedmetadata&&b?v=b.currentTime:this.nextLoadPosition&&(v=this.nextLoadPosition),v},d.handleFragLoadAborted=function(b,v){this.transmuxer&&b.sn!=="initSegment"&&b.stats.aborted&&(this.warn("Fragment "+b.sn+(v?" part"+v.index:"")+" of level "+b.level+" was aborted"),this.resetFragmentLoading(b))},d.resetFragmentLoading=function(b){(!this.fragCurrent||!this.fragContextChanged(b)&&this.state!==w.FRAG_LOADING_WAITING_RETRY)&&(this.state=w.IDLE)},d.onFragmentOrKeyLoadError=function(b,v){if(v.fatal){this.stopLoad(),this.state=w.ERROR;return}var E=this.config;if(v.chunkMeta){var R=this.getCurrentContext(v.chunkMeta);R&&(v.frag=R.frag,v.levelRetry=!0,this.fragLoadError=E.fragLoadingMaxRetry)}var C=v.frag;if(!(!C||C.type!==b)){var N=this.fragCurrent;if(console.assert(N&&C.sn===N.sn&&C.level===N.level&&C.urlId===N.urlId,"Frag load error must match current frag to retry"),this.fragLoadError+1<=E.fragLoadingMaxRetry){this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition);var K=Math.min(Math.pow(2,this.fragLoadError)*E.fragLoadingRetryDelay,E.fragLoadingMaxRetryTimeout);this.warn("Fragment "+C.sn+" of "+b+" "+C.level+" failed to load, retrying in "+K+"ms"),this.retryDate=self.performance.now()+K,this.fragLoadError++,this.state=w.FRAG_LOADING_WAITING_RETRY}else v.levelRetry?(b===i.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=w.IDLE):(O.logger.error(v.details+" reaches max retry, redispatch as fatal ..."),v.fatal=!0,this.hls.stopLoad(),this.state=w.ERROR)}},d.afterBufferFlushed=function(b,v,E){if(b){var R=e.BufferHelper.getBuffered(b);this.fragmentTracker.detectEvictedFragments(v,R,E),this.state===w.ENDED&&this.resetLoadingState()}},d.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE},d.resetStartWhenNotLoaded=function(b){if(!this.loadedmetadata){this.startFragRequested=!1;var v=this.levels?this.levels[b].details:null;v!=null&&v.live?(this.startPosition=-1,this.setStartPosition(v,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},d.updateLevelTiming=function(b,v,E,R){var C=this,N=E.details;console.assert(!!N,"level.details must be defined");var K=Object.keys(b.elementaryStreams).reduce(function(H,ee){var J=b.elementaryStreams[ee];if(J){var se=J.endPTS-J.startPTS;if(se<=0)return C.warn("Could not parse fragment "+b.sn+" "+ee+" duration reliably ("+se+")"),H||!1;var G=R?0:(0,c.updateFragPTSDTS)(N,b,J.startPTS,J.endPTS,J.startDTS,J.endDTS);return C.hls.trigger(D.Events.LEVEL_PTS_UPDATED,{details:N,level:E,drift:G,type:ee,frag:b,start:J.startPTS,end:J.endPTS}),!0}return H},!1);K||(this.warn("Found no media in fragment "+b.sn+" of level "+E.id+" resetting transmuxer to fallback to playlist timing"),this.resetTransmuxer()),this.state=w.PARSED,this.hls.trigger(D.Events.FRAG_PARSED,{frag:b,part:v})},d.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},m(r,[{key:"state",get:function(){return this._state},set:function(b){var v=this._state;v!==b&&(this._state=b,this.log(v+"->"+b))}}]),r}(P.default)},"./src/controller/buffer-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>o});var M=L("./src/polyfills/number.ts"),P=L("./src/events.ts"),k=L("./src/utils/logger.ts"),e=L("./src/errors.ts"),O=L("./src/utils/buffer-helper.ts"),D=L("./src/utils/mediasource-helper.ts"),l=L("./src/loader/fragment.ts"),p=L("./src/controller/buffer-operation-queue.ts"),h=(0,D.getMediaSource)(),g=/([ha]vc.)(?:\.[^.,]+)+/,o=function(){function c(u){var s=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var i=s.media,t=s.mediaSource;k.logger.log("[buffer-controller]: Media source opened"),i&&(i.removeEventListener("emptied",s._onMediaEmptied),s.updateMediaElementDuration(),s.hls.trigger(P.Events.MEDIA_ATTACHED,{media:i})),t&&t.removeEventListener("sourceopen",s._onMediaSourceOpen),s.checkPendingTracks()},this._onMediaSourceClose=function(){k.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){k.logger.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var i=s.media,t=s._objectUrl;i&&i.src!==t&&k.logger.error("Media element src was set while attaching MediaSource ("+t+" > "+i.src+")")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var y=c.prototype;return y.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},y.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},y.registerListeners=function(){var s=this.hls;s.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(P.Events.BUFFER_RESET,this.onBufferReset,this),s.on(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),s.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),s.on(P.Events.BUFFER_EOS,this.onBufferEos,this),s.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),s.on(P.Events.FRAG_PARSED,this.onFragParsed,this),s.on(P.Events.FRAG_CHANGED,this.onFragChanged,this)},y.unregisterListeners=function(){var s=this.hls;s.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(P.Events.BUFFER_RESET,this.onBufferReset,this),s.off(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),s.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),s.off(P.Events.BUFFER_EOS,this.onBufferEos,this),s.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),s.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),s.off(P.Events.FRAG_PARSED,this.onFragParsed,this),s.off(P.Events.FRAG_CHANGED,this.onFragChanged,this)},y._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new p.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},y.onManifestParsed=function(s,i){var t=2;(i.audio&&!i.video||!i.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,k.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},y.onMediaAttaching=function(s,i){var t=this.media=i.media;if(t&&h){var m=this.mediaSource=new h;m.addEventListener("sourceopen",this._onMediaSourceOpen),m.addEventListener("sourceended",this._onMediaSourceEnded),m.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(m),this._objectUrl=t.src,t.addEventListener("emptied",this._onMediaEmptied)}},y.onMediaDetaching=function(){var s=this.media,i=this.mediaSource,t=this._objectUrl;if(i){if(k.logger.log("[buffer-controller]: media source detaching"),i.readyState==="open")try{i.endOfStream()}catch(m){k.logger.warn("[buffer-controller]: onMediaDetaching: "+m.message+" while calling endOfStream")}this.onBufferReset(),i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),s&&(s.removeEventListener("emptied",this._onMediaEmptied),t&&self.URL.revokeObjectURL(t),s.src===t?(s.removeAttribute("src"),s.load()):k.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(P.Events.MEDIA_DETACHED,void 0)},y.onBufferReset=function(){var s=this;this.getSourceBufferTypes().forEach(function(i){var t=s.sourceBuffer[i];try{t&&(s.removeBufferListeners(i),s.mediaSource&&s.mediaSource.removeSourceBuffer(t),s.sourceBuffer[i]=void 0)}catch(m){k.logger.warn("[buffer-controller]: Failed to reset the "+i+" buffer",m)}}),this._initSourceBuffer()},y.onBufferCodecs=function(s,i){var t=this,m=this.getSourceBufferTypes().length;Object.keys(i).forEach(function(S){if(m){var f=t.tracks[S];if(f&&typeof f.buffer.changeType=="function"){var _=i[S],A=_.id,x=_.codec,w=_.levelCodec,n=_.container,a=_.metadata,r=(f.levelCodec||f.codec).replace(g,"$1"),d=(w||x).replace(g,"$1");if(r!==d){var T=n+";codecs="+(w||x);t.appendChangeType(S,T),k.logger.log("[buffer-controller]: switching codec "+r+" to "+d),t.tracks[S]={buffer:f.buffer,codec:x,container:n,levelCodec:w,metadata:a,id:A}}}}else t.pendingTracks[S]=i[S]}),!m&&(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())},y.appendChangeType=function(s,i){var t=this,m=this.operationQueue,S={execute:function(){var _=t.sourceBuffer[s];_&&(k.logger.log("[buffer-controller]: changing "+s+" sourceBuffer type to "+i),_.changeType(i)),m.shiftAndExecuteNext(s)},onStart:function(){},onComplete:function(){},onError:function(_){k.logger.warn("[buffer-controller]: Failed to change "+s+" SourceBuffer type",_)}};m.append(S,s)},y.onBufferAppending=function(s,i){var t=this,m=this.hls,S=this.operationQueue,f=this.tracks,_=i.data,A=i.type,x=i.frag,w=i.part,n=i.chunkMeta,a=n.buffering[A],r=self.performance.now();a.start=r;var d=x.stats.buffering,T=w?w.stats.buffering:null;d.start===0&&(d.start=r),T&&T.start===0&&(T.start=r);var b=f.audio,v=!1;A==="audio"&&(b==null?void 0:b.container)==="audio/mpeg"&&(v=!this.lastMpegAudioChunk||n.id===1||this.lastMpegAudioChunk.sn!==n.sn,this.lastMpegAudioChunk=n);var E=x.start,R={execute:function(){if(a.executeStart=self.performance.now(),v){var N=t.sourceBuffer[A];if(N){var K=E-N.timestampOffset;Math.abs(K)>=.1&&(k.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+E+" (delta: "+K+") sn: "+x.sn+")"),N.timestampOffset=E)}}t.appendExecutor(_,A)},onStart:function(){},onComplete:function(){var N=self.performance.now();a.executeEnd=a.end=N,d.first===0&&(d.first=N),T&&T.first===0&&(T.first=N);var K=t.sourceBuffer,H={};for(var ee in K)H[ee]=O.BufferHelper.getBuffered(K[ee]);t.appendError=0,t.hls.trigger(P.Events.BUFFER_APPENDED,{type:A,frag:x,part:w,chunkMeta:n,parent:x.type,timeRanges:H})},onError:function(N){k.logger.error("[buffer-controller]: Error encountered while trying to append to the "+A+" SourceBuffer",N);var K={type:e.ErrorTypes.MEDIA_ERROR,parent:x.type,details:e.ErrorDetails.BUFFER_APPEND_ERROR,err:N,fatal:!1};N.code===DOMException.QUOTA_EXCEEDED_ERR?K.details=e.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,K.details=e.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>m.config.appendErrorMaxRetry&&(k.logger.error("[buffer-controller]: Failed "+m.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),K.fatal=!0,m.stopLoad())),m.trigger(P.Events.ERROR,K)}};S.append(R,A)},y.onBufferFlushing=function(s,i){var t=this,m=this.operationQueue,S=function(_){return{execute:t.removeExecutor.bind(t,_,i.startOffset,i.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(P.Events.BUFFER_FLUSHED,{type:_})},onError:function(x){k.logger.warn("[buffer-controller]: Failed to remove from "+_+" SourceBuffer",x)}}};i.type?m.append(S(i.type),i.type):this.getSourceBufferTypes().forEach(function(f){m.append(S(f),f)})},y.onFragParsed=function(s,i){var t=this,m=i.frag,S=i.part,f=[],_=S?S.elementaryStreams:m.elementaryStreams;_[l.ElementaryStreamTypes.AUDIOVIDEO]?f.push("audiovideo"):(_[l.ElementaryStreamTypes.AUDIO]&&f.push("audio"),_[l.ElementaryStreamTypes.VIDEO]&&f.push("video"));var A=function(){var w=self.performance.now();m.stats.buffering.end=w,S&&(S.stats.buffering.end=w);var n=S?S.stats:m.stats;t.hls.trigger(P.Events.FRAG_BUFFERED,{frag:m,part:S,stats:n,id:m.type})};f.length===0&&k.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+m.type+" level: "+m.level+" sn: "+m.sn),this.blockBuffers(A,f)},y.onFragChanged=function(s,i){this.flushBackBuffer()},y.onBufferEos=function(s,i){var t=this,m=this.getSourceBufferTypes().reduce(function(S,f){var _=t.sourceBuffer[f];return _&&(!i.type||i.type===f)&&(_.ending=!0,_.ended||(_.ended=!0,k.logger.log("[buffer-controller]: "+f+" sourceBuffer now EOS"))),S&&!!(!_||_.ended)},!0);m&&(k.logger.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(function(){t.getSourceBufferTypes().forEach(function(f){var _=t.sourceBuffer[f];_&&(_.ending=!1)});var S=t.mediaSource;if(!S||S.readyState!=="open"){S&&k.logger.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+S.readyState);return}k.logger.log("[buffer-controller]: Calling mediaSource.endOfStream()"),S.endOfStream()}))},y.onLevelUpdated=function(s,i){var t=i.details;t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},y.flushBackBuffer=function(){var s=this.hls,i=this.details,t=this.media,m=this.sourceBuffer;if(!(!t||i===null)){var S=this.getSourceBufferTypes();if(S.length){var f=i.live&&s.config.liveBackBufferLength!==null?s.config.liveBackBufferLength:s.config.backBufferLength;if(!(!(0,M.isFiniteNumber)(f)||f<0)){var _=t.currentTime,A=i.levelTargetDuration,x=Math.max(f,A),w=Math.floor(_/A)*A-x;S.forEach(function(n){var a=m[n];if(a){var r=O.BufferHelper.getBuffered(a);if(r.length>0&&w>r.start(0)){if(s.trigger(P.Events.BACK_BUFFER_REACHED,{bufferEnd:w}),i.live)s.trigger(P.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:w});else if(a.ended&&r.end(r.length-1)-_<A*2){k.logger.info("[buffer-controller]: Cannot flush "+n+" back buffer while SourceBuffer is in ended state");return}s.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:w,type:n})}}})}}}},y.updateMediaElementDuration=function(){if(!(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")){var s=this.details,i=this.hls,t=this.media,m=this.mediaSource,S=s.fragments[0].start+s.totalduration,f=t.duration,_=(0,M.isFiniteNumber)(m.duration)?m.duration:0;s.live&&i.config.liveDurationInfinity?(k.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),m.duration=1/0,this.updateSeekableRange(s)):(S>_&&S>f||!(0,M.isFiniteNumber)(f))&&(k.logger.log("[buffer-controller]: Updating Media Source duration to "+S.toFixed(3)),m.duration=S)}},y.updateSeekableRange=function(s){var i=this.mediaSource,t=s.fragments,m=t.length;if(m&&s.live&&i!==null&&i!==void 0&&i.setLiveSeekableRange){var S=Math.max(0,t[0].start),f=Math.max(S,S+s.totalduration);i.setLiveSeekableRange(S,f)}},y.checkPendingTracks=function(){var s=this.bufferCodecEventsExpected,i=this.operationQueue,t=this.pendingTracks,m=Object.keys(t).length;if(m&&!s||m===2){this.createSourceBuffers(t),this.pendingTracks={};var S=this.getSourceBufferTypes();if(S.length===0){this.hls.trigger(P.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}S.forEach(function(f){i.executeNext(f)})}},y.createSourceBuffers=function(s){var i=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var m=0;for(var S in s)if(!i[S]){var f=s[S];if(!f)throw Error("source buffer exists for track "+S+", however track does not");var _=f.levelCodec||f.codec,A=f.container+";codecs="+_;k.logger.log("[buffer-controller]: creating sourceBuffer("+A+")");try{var x=i[S]=t.addSourceBuffer(A),w=S;this.addBufferListener(w,"updatestart",this._onSBUpdateStart),this.addBufferListener(w,"updateend",this._onSBUpdateEnd),this.addBufferListener(w,"error",this._onSBUpdateError),this.tracks[S]={buffer:x,codec:_,container:f.container,levelCodec:f.levelCodec,metadata:f.metadata,id:f.id},m++}catch(n){k.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+n.message),this.hls.trigger(P.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:n,mimeType:A})}}m&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},y._onSBUpdateStart=function(s){var i=this.operationQueue,t=i.current(s);t.onStart()},y._onSBUpdateEnd=function(s){var i=this.operationQueue,t=i.current(s);t.onComplete(),i.shiftAndExecuteNext(s)},y._onSBUpdateError=function(s,i){k.logger.error("[buffer-controller]: "+s+" SourceBuffer error",i),this.hls.trigger(P.Events.ERROR,{type:e.ErrorTypes.MEDIA_ERROR,details:e.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(s);t&&t.onError(i)},y.removeExecutor=function(s,i,t){var m=this.media,S=this.mediaSource,f=this.operationQueue,_=this.sourceBuffer,A=_[s];if(!m||!S||!A){k.logger.warn("[buffer-controller]: Attempting to remove from the "+s+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(s);return}var x=(0,M.isFiniteNumber)(m.duration)?m.duration:1/0,w=(0,M.isFiniteNumber)(S.duration)?S.duration:1/0,n=Math.max(0,i),a=Math.min(t,x,w);a>n&&!A.ending?(A.ended=!1,k.logger.log("[buffer-controller]: Removing ["+n+","+a+"] from the "+s+" SourceBuffer"),console.assert(!A.updating,s+" sourceBuffer must not be updating"),A.remove(n,a)):f.shiftAndExecuteNext(s)},y.appendExecutor=function(s,i){var t=this.operationQueue,m=this.sourceBuffer,S=m[i];if(!S){k.logger.warn("[buffer-controller]: Attempting to append to the "+i+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(i);return}S.ended=!1,console.assert(!S.updating,i+" sourceBuffer must not be updating"),S.appendBuffer(s)},y.blockBuffers=function(s,i){var t=this;if(i===void 0&&(i=this.getSourceBufferTypes()),!i.length){k.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(s);return}var m=this.operationQueue,S=i.map(function(f){return m.appendBlocker(f)});Promise.all(S).then(function(){s(),i.forEach(function(f){var _=t.sourceBuffer[f];(!_||!_.updating)&&m.shiftAndExecuteNext(f)})})},y.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},y.addBufferListener=function(s,i,t){var m=this.sourceBuffer[s];if(m){var S=t.bind(this,s);this.listeners[s].push({event:i,listener:S}),m.addEventListener(i,S)}},y.removeBufferListeners=function(s){var i=this.sourceBuffer[s];i&&this.listeners[s].forEach(function(t){i.removeEventListener(t.event,t.listener)})},c}()},"./src/controller/buffer-operation-queue.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>P});var M=L("./src/utils/logger.ts"),P=function(){function k(O){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=O}var e=k.prototype;return e.append=function(D,l){var p=this.queues[l];p.push(D),p.length===1&&this.buffers[l]&&this.executeNext(l)},e.insertAbort=function(D,l){var p=this.queues[l];p.unshift(D),this.executeNext(l)},e.appendBlocker=function(D){var l,p=new Promise(function(g){l=g}),h={execute:l,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(h,D),p},e.executeNext=function(D){var l=this.buffers,p=this.queues,h=l[D],g=p[D];if(g.length){var o=g[0];try{o.execute()}catch(c){M.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(c),(!h||!h.updating)&&(g.shift(),this.executeNext(D))}}},e.shiftAndExecuteNext=function(D){this.queues[D].shift(),this.executeNext(D)},e.current=function(D){return this.queues[D][0]},k}()},"./src/controller/cap-level-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>l});var M=L("./src/events.ts");function P(p,h){for(var g=0;g<h.length;g++){var o=h[g];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,e(o.key),o)}}function k(p,h,g){return h&&P(p.prototype,h),g&&P(p,g),Object.defineProperty(p,"prototype",{writable:!1}),p}function e(p){var h=O(p,"string");return typeof h=="symbol"?h:String(h)}function O(p,h){if(typeof p!="object"||p===null)return p;var g=p[Symbol.toPrimitive];if(g!==void 0){var o=g.call(p,h||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(p)}var D=function(){function p(g){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=g,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var h=p.prototype;return h.setStreamController=function(o){this.streamController=o},h.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},h.registerListeners=function(){var o=this.hls;o.on(M.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),o.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.unregisterListener=function(){var o=this.hls;o.off(M.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),o.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.onFpsDropLevelCapping=function(o,c){p.isLevelAllowed(c.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(c.droppedLevel)},h.onMediaAttaching=function(o,c){this.media=c.media instanceof HTMLVideoElement?c.media:null,this.clientRect=null},h.onManifestParsed=function(o,c){var y=this.hls;this.restrictedLevels=[],this.firstLevel=c.firstLevel,y.config.capLevelToPlayerSize&&c.video&&this.startCapping()},h.onBufferCodecs=function(o,c){var y=this.hls;y.config.capLevelToPlayerSize&&c.video&&this.startCapping()},h.onMediaDetaching=function(){this.stopCapping()},h.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var o=this.hls.levels;if(o.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(o.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},h.getMaxLevel=function(o){var c=this,y=this.hls.levels;if(!y.length)return-1;var u=y.filter(function(s,i){return p.isLevelAllowed(i,c.restrictedLevels)&&i<=o});return this.clientRect=null,p.getMaxLevelByMediaSize(u,this.mediaWidth,this.mediaHeight)},h.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},h.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},h.getDimensions=function(){if(this.clientRect)return this.clientRect;var o=this.media,c={width:0,height:0};if(o){var y=o.getBoundingClientRect();c.width=y.width,c.height=y.height,!c.width&&!c.height&&(c.width=y.right-y.left||o.width||0,c.height=y.bottom-y.top||o.height||0)}return this.clientRect=c,c},p.isLevelAllowed=function(o,c){return c===void 0&&(c=[]),c.indexOf(o)===-1},p.getMaxLevelByMediaSize=function(o,c,y){if(!o||!o.length)return-1;for(var u=function(S,f){return f?S.width!==f.width||S.height!==f.height:!0},s=o.length-1,i=0;i<o.length;i+=1){var t=o[i];if((t.width>=c||t.height>=y)&&u(t,o[i+1])){s=i;break}}return s},k(p,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var o=1;if(!this.hls.config.ignoreDevicePixelRatio)try{o=self.devicePixelRatio}catch(c){}return o}}]),p}();const l=D},"./src/controller/cmcd-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>y});var M=L("./src/events.ts"),P=L("./src/types/cmcd.ts"),k=L("./src/utils/buffer-helper.ts"),e=L("./src/utils/logger.ts");function O(u,s){for(var i=0;i<s.length;i++){var t=s[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(u,l(t.key),t)}}function D(u,s,i){return s&&O(u.prototype,s),i&&O(u,i),Object.defineProperty(u,"prototype",{writable:!1}),u}function l(u){var s=p(u,"string");return typeof s=="symbol"?s:String(s)}function p(u,s){if(typeof u!="object"||u===null)return u;var i=u[Symbol.toPrimitive];if(i!==void 0){var t=i.call(u,s||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(u)}function h(u,s){var i=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(i)return(i=i.call(u)).next.bind(i);if(Array.isArray(u)||(i=g(u))||s&&u&&typeof u.length=="number"){i&&(u=i);var t=0;return function(){return t>=u.length?{done:!0}:{done:!1,value:u[t++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(u,s){if(u){if(typeof u=="string")return o(u,s);var i=Object.prototype.toString.call(u).slice(8,-1);if(i==="Object"&&u.constructor&&(i=u.constructor.name),i==="Map"||i==="Set")return Array.from(u);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return o(u,s)}}function o(u,s){(s==null||s>u.length)&&(s=u.length);for(var i=0,t=new Array(s);i<s;i++)t[i]=u[i];return t}function c(){return c=Object.assign?Object.assign.bind():function(u){for(var s=1;s<arguments.length;s++){var i=arguments[s];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(u[t]=i[t])}return u},c.apply(this,arguments)}var y=function(){function u(i){var t=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){t.initialized&&(t.starved=!0),t.buffering=!0},this.onPlaying=function(){t.initialized||(t.initialized=!0),t.buffering=!1},this.applyPlaylistData=function(f){try{t.apply(f,{ot:P.CMCDObjectType.MANIFEST,su:!t.initialized})}catch(_){e.logger.warn("Could not generate manifest CMCD data.",_)}},this.applyFragmentData=function(f){try{var _=f.frag,A=t.hls.levels[_.level],x=t.getObjectType(_),w={d:_.duration*1e3,ot:x};(x===P.CMCDObjectType.VIDEO||x===P.CMCDObjectType.AUDIO||x==P.CMCDObjectType.MUXED)&&(w.br=A.bitrate/1e3,w.tb=t.getTopBandwidth(x)/1e3,w.bl=t.getBufferLength(x)),t.apply(f,w)}catch(n){e.logger.warn("Could not generate segment CMCD data.",n)}},this.hls=i;var m=this.config=i.config,S=m.cmcd;S!=null&&(m.pLoader=this.createPlaylistLoader(),m.fLoader=this.createFragmentLoader(),this.sid=S.sessionId||u.uuid(),this.cid=S.contentId,this.useHeaders=S.useHeaders===!0,this.registerListeners())}var s=u.prototype;return s.registerListeners=function(){var t=this.hls;t.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.on(M.Events.BUFFER_CREATED,this.onBufferCreated,this)},s.unregisterListeners=function(){var t=this.hls;t.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.off(M.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},s.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},s.onMediaAttached=function(t,m){this.media=m.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},s.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},s.onBufferCreated=function(t,m){var S,f;this.audioBuffer=(S=m.tracks.audio)===null||S===void 0?void 0:S.buffer,this.videoBuffer=(f=m.tracks.video)===null||f===void 0?void 0:f.buffer},s.createData=function(){var t;return{v:P.CMCDVersion,sf:P.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(t=this.media)===null||t===void 0?void 0:t.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},s.apply=function(t,m){m===void 0&&(m={}),c(m,this.createData());var S=m.ot===P.CMCDObjectType.INIT||m.ot===P.CMCDObjectType.VIDEO||m.ot===P.CMCDObjectType.MUXED;if(this.starved&&S&&(m.bs=!0,m.su=!0,this.starved=!1),m.su==null&&(m.su=this.buffering),this.useHeaders){var f=u.toHeaders(m);if(!Object.keys(f).length)return;t.headers||(t.headers={}),c(t.headers,f)}else{var _=u.toQuery(m);if(!_)return;t.url=u.appendQueryToUri(t.url,_)}},s.getObjectType=function(t){var m=t.type;if(m==="subtitle")return P.CMCDObjectType.TIMED_TEXT;if(t.sn==="initSegment")return P.CMCDObjectType.INIT;if(m==="audio")return P.CMCDObjectType.AUDIO;if(m==="main")return this.hls.audioTracks.length?P.CMCDObjectType.VIDEO:P.CMCDObjectType.MUXED},s.getTopBandwidth=function(t){var m=0,S,f=this.hls;if(t===P.CMCDObjectType.AUDIO)S=f.audioTracks;else{var _=f.maxAutoLevel,A=_>-1?_+1:f.levels.length;S=f.levels.slice(0,A)}for(var x=h(S),w;!(w=x()).done;){var n=w.value;n.bitrate>m&&(m=n.bitrate)}return m>0?m:NaN},s.getBufferLength=function(t){var m=this.hls.media,S=t===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!S||!m)return NaN;var f=k.BufferHelper.bufferInfo(S,m.currentTime,this.config.maxBufferHole);return f.len*1e3},s.createPlaylistLoader=function(){var t=this.config.pLoader,m=this.applyPlaylistData,S=t||this.config.loader;return function(){function f(A){this.loader=void 0,this.loader=new S(A)}var _=f.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(x,w,n){m(x),this.loader.load(x,w,n)},D(f,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),f}()},s.createFragmentLoader=function(){var t=this.config.fLoader,m=this.applyFragmentData,S=t||this.config.loader;return function(){function f(A){this.loader=void 0,this.loader=new S(A)}var _=f.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(x,w,n){m(x),this.loader.load(x,w,n)},D(f,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),f}()},u.uuid=function(){var t=URL.createObjectURL(new Blob),m=t.toString();return URL.revokeObjectURL(t),m.slice(m.lastIndexOf("/")+1)},u.serialize=function(t){for(var m=[],S=function(R){return!Number.isNaN(R)&&R!=null&&R!==""&&R!==!1},f=function(R){return Math.round(R)},_=function(R){return f(R/100)*100},A=function(R){return encodeURIComponent(R)},x={br:f,d:f,bl:_,dl:_,mtp:_,nor:A,rtp:_,tb:f},w=Object.keys(t||{}).sort(),n=h(w),a;!(a=n()).done;){var r=a.value,d=t[r];if(S(d)&&!(r==="v"&&d===1)&&!(r=="pr"&&d===1)){var T=x[r];T&&(d=T(d));var b=typeof d,v=void 0;r==="ot"||r==="sf"||r==="st"?v=r+"="+d:b==="boolean"?v=r:b==="number"?v=r+"="+d:v=r+"="+JSON.stringify(d),m.push(v)}}return m.join(",")},u.toHeaders=function(t){for(var m=Object.keys(t),S={},f=["Object","Request","Session","Status"],_=[{},{},{},{}],A={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},x=0,w=m;x<w.length;x++){var n=w[x],a=A[n]!=null?A[n]:1;_[a][n]=t[n]}for(var r=0;r<_.length;r++){var d=u.serialize(_[r]);d&&(S["CMCD-"+f[r]]=d)}return S},u.toQuery=function(t){return"CMCD="+encodeURIComponent(u.serialize(t))},u.appendQueryToUri=function(t,m){if(!m)return t;var S=t.includes("?")?"&":"?";return""+t+S+m},u}()},"./src/controller/eme-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>x});var M=L("./src/events.ts"),P=L("./src/errors.ts"),k=L("./src/utils/logger.ts"),e=L("./src/utils/mediakeys-helper.ts"),O=L("./src/utils/keysystem-util.ts"),D=L("./src/utils/numeric-encoding-utils.ts"),l=L("./src/loader/level-key.ts"),p=L("./src/utils/hex.ts"),h=L("./src/utils/mp4-tools.ts"),g=L("./node_modules/eventemitter3/index.js"),o=L.n(g);function c(w,n){w.prototype=Object.create(n.prototype),w.prototype.constructor=w,t(w,n)}function y(w){var n=typeof Map=="function"?new Map:void 0;return y=function(r){if(r===null||!i(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(r))return n.get(r);n.set(r,d)}function d(){return u(r,arguments,m(this).constructor)}return d.prototype=Object.create(r.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),t(d,r)},y(w)}function u(w,n,a){return s()?u=Reflect.construct.bind():u=function(d,T,b){var v=[null];v.push.apply(v,T);var E=Function.bind.apply(d,v),R=new E;return b&&t(R,b.prototype),R},u.apply(null,arguments)}function s(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(w){return!1}}function i(w){return Function.toString.call(w).indexOf("[native code]")!==-1}function t(w,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,d){return r.__proto__=d,r},t(w,n)}function m(w){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},m(w)}var S=3,f="[eme]",_=function(){function w(a){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=w.CDMCleanupPromise?[w.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=k.logger.debug.bind(k.logger,f),this.log=k.logger.log.bind(k.logger,f),this.warn=k.logger.warn.bind(k.logger,f),this.error=k.logger.error.bind(k.logger,f),this.hls=a,this.config=a.config,this.registerListeners()}var n=w.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null},n.registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},n.unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},n.getLicenseServerUrl=function(r){var d=this.config,T=d.drmSystems,b=d.widevineLicenseUrl,v=T[r];if(v)return v.licenseUrl;if(r===e.KeySystems.WIDEVINE&&b)return b;throw new Error('no license server URL configured for key-system "'+r+'"')},n.getServerCertificateUrl=function(r){var d=this.config.drmSystems,T=d[r];if(T)return T.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+r+'"]')},n.attemptKeySystemAccess=function(r){var d=this,T=this.hls.levels,b=function(C,N,K){return!!C&&K.indexOf(C)===N},v=T.map(function(R){return R.audioCodec}).filter(b),E=T.map(function(R){return R.videoCodec}).filter(b);return v.length+E.length===0&&E.push("avc1.42e01e"),new Promise(function(R,C){var N=function K(H){var ee=H.shift();d.getMediaKeysPromise(ee,v,E).then(function(J){return R({keySystem:ee,mediaKeys:J})}).catch(function(J){H.length?K(H):J instanceof A?C(J):C(new A({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,error:J,fatal:!0},J.message))})};N(r)})},n.requestMediaKeySystemAccess=function(r,d){var T=this.config.requestMediaKeySystemAccessFunc;if(typeof T!="function"){var b="Configured requestMediaKeySystemAccess is not a function "+T;return e.requestMediaKeySystemAccess===null&&self.location.protocol==="http:"&&(b="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(b))}return T(r,d)},n.getMediaKeysPromise=function(r,d,T){var b=this,v=(0,e.getSupportedMediaKeySystemConfigurations)(r,d,T,this.config.drmSystemOptions),E=this.keySystemAccessPromises[r],R=E==null?void 0:E.keySystemAccess;if(!R){this.log('Requesting encrypted media "'+r+'" key-system access with config: '+JSON.stringify(v)),R=this.requestMediaKeySystemAccess(r,v);var C=this.keySystemAccessPromises[r]={keySystemAccess:R};return R.catch(function(N){b.log('Failed to obtain access to key-system "'+r+'": '+N)}),R.then(function(N){b.log('Access for key-system "'+N.keySystem+'" obtained');var K=b.fetchServerCertificate(r);return b.log('Create media-keys for "'+r+'"'),C.mediaKeys=N.createMediaKeys().then(function(H){return b.log('Media-keys created for "'+r+'"'),K.then(function(ee){return ee?b.setMediaKeysServerCertificate(H,r,ee):H})}),C.mediaKeys.catch(function(H){b.error('Failed to create media-keys for "'+r+'"}: '+H)}),C.mediaKeys})}return R.then(function(){return E.mediaKeys})},n.createMediaKeySessionContext=function(r){var d=r.decryptdata,T=r.keySystem,b=r.mediaKeys;console.assert(!!b,"mediaKeys is defined"),this.log('Creating key-system session "'+T+'" keyId: '+p.default.hexDump(d.keyId||[]));var v=b.createSession(),E={decryptdata:d,keySystem:T,mediaKeys:b,mediaKeysSession:v,keyStatus:"status-pending"};return this.mediaKeySessions.push(E),E},n.renewKeySession=function(r){var d=r.decryptdata;if(d.pssh){var T=this.createMediaKeySessionContext(r),b=this.getKeyIdString(d),v="cenc";this.keyIdToKeySessionPromise[b]=this.generateRequestWithPreferredKeySession(T,v,d.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(r)},n.getKeyIdString=function(r){if(!r)throw new Error("Could not read keyId of undefined decryptdata");if(r.keyId===null)throw new Error("keyId is null");return p.default.hexDump(r.keyId)},n.updateKeySession=function(r,d){var T,b=r.mediaKeysSession;return this.log('Updating key-session "'+b.sessionId+'" for keyID '+p.default.hexDump(((T=r.decryptdata)===null||T===void 0?void 0:T.keyId)||[])+`
|
|
} (data length: `+(d&&d.byteLength)+")"),b.update(d)},n.selectKeySystemFormat=function(r){var d=Object.keys(r.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+r.sn+" "+r.type+": "+r.level+") key formats "+d.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(d)),this.keyFormatPromise},n.getKeyFormatPromise=function(r){var d=this;return new Promise(function(T,b){var v=(0,e.getKeySystemsForConfig)(d.config),E=r.map(e.keySystemFormatToKeySystemDomain).filter(function(R){return!!R&&v.indexOf(R)!==-1});return d.getKeySystemSelectionPromise(E).then(function(R){var C=R.keySystem,N=(0,e.keySystemDomainToKeySystemFormat)(C);N?T(N):b(new Error('Unable to find format for key-system "'+C+'"'))}).catch(b)})},n.loadKey=function(r){var d=this,T=r.keyInfo.decryptdata,b=this.getKeyIdString(T),v="(keyId: "+b+' format: "'+T.keyFormat+'" method: '+T.method+" uri: "+T.uri+")";this.log("Starting session for key "+v);var E=this.keyIdToKeySessionPromise[b];return E||(E=this.keyIdToKeySessionPromise[b]=this.getKeySystemForKeyPromise(T).then(function(R){var C=R.keySystem,N=R.mediaKeys;return d.throwIfDestroyed(),d.log("Handle encrypted media sn: "+r.frag.sn+" "+r.frag.type+": "+r.frag.level+" using key "+v),d.attemptSetMediaKeys(C,N).then(function(){d.throwIfDestroyed();var K=d.createMediaKeySessionContext({keySystem:C,mediaKeys:N,decryptdata:T}),H="cenc";return d.generateRequestWithPreferredKeySession(K,H,T.pssh,"playlist-key")})}),E.catch(function(R){return d.handleError(R)})),E},n.throwIfDestroyed=function(r){if(r===void 0&&(r="Invalid state"),!this.hls)throw new Error("invalid state")},n.handleError=function(r){this.hls&&(this.error(r.message),r instanceof A?this.hls.trigger(M.Events.ERROR,r.data):this.hls.trigger(M.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,error:r,fatal:!0}))},n.getKeySystemForKeyPromise=function(r){var d=this.getKeyIdString(r),T=this.keyIdToKeySessionPromise[d];if(!T){var b=(0,e.keySystemFormatToKeySystemDomain)(r.keyFormat),v=b?[b]:(0,e.getKeySystemsForConfig)(this.config);return this.attemptKeySystemAccess(v)}return T},n.getKeySystemSelectionPromise=function(r){if(r.length||(r=(0,e.getKeySystemsForConfig)(this.config)),r.length===0)throw new A({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(r)},n._onMediaEncrypted=function(r){var d=this,T=r.initDataType,b=r.initData;if(this.debug('"'+r.type+'" event: init data type: "'+T+'"'),b!==null){var v,E;if(T==="sinf"&&this.config.drmSystems[e.KeySystems.FAIRPLAY]){var R=(0,h.bin2str)(new Uint8Array(b));try{var C=(0,D.base64Decode)(JSON.parse(R).sinf),N=(0,h.parseSinf)(new Uint8Array(C));if(!N)return;v=N.subarray(8,24),E=e.KeySystems.FAIRPLAY}catch(Pe){this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{var K=(0,h.parsePssh)(b);if(K===null)return;K.version===0&&K.systemId===e.KeySystemIds.WIDEVINE&&K.data&&(v=K.data.subarray(8,24)),E=(0,e.keySystemIdToKeySystemDomain)(K.systemId)}if(!(!E||!v)){for(var H=p.default.hexDump(v),ee=this.keyIdToKeySessionPromise,J=this.mediaKeySessions,se=ee[H],G=function(Ne){var $e=J[Ne],je=$e.decryptdata;if(je.pssh||!je.keyId)return"continue";var Ce=p.default.hexDump(je.keyId);if(H===Ce||je.uri.replace(/-/g,"").indexOf(H)!==-1)return se=ee[Ce],delete ee[Ce],je.pssh=new Uint8Array(b),je.keyId=v,se=ee[H]=se.then(function(){return d.generateRequestWithPreferredKeySession($e,T,b,"encrypted-event-key-match")}),"break"},Ee=0;Ee<J.length;Ee++){var ge=G(Ee);if(ge!=="continue"&&ge==="break")break}se||(se=ee[H]=this.getKeySystemSelectionPromise([E]).then(function(Pe){var Ne,$e=Pe.keySystem,je=Pe.mediaKeys;d.throwIfDestroyed();var Ce=new l.LevelKey("ISO-23001-7",H,(Ne=(0,e.keySystemDomainToKeySystemFormat)($e))!=null?Ne:"");return Ce.pssh=new Uint8Array(b),Ce.keyId=v,d.attemptSetMediaKeys($e,je).then(function(){d.throwIfDestroyed();var fe=d.createMediaKeySessionContext({decryptdata:Ce,keySystem:$e,mediaKeys:je});return d.generateRequestWithPreferredKeySession(fe,T,b,"encrypted-event-no-match")})})),se.catch(function(Pe){return d.handleError(Pe)})}}},n._onWaitingForKey=function(r){this.log('"'+r.type+'" event')},n.attemptSetMediaKeys=function(r,d){var T=this,b=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'+r+'"');var v=Promise.all(b).then(function(){if(!T.media)throw new Error("Attempted to set mediaKeys without media element attached");return T.media.setMediaKeys(d)});return this.setMediaKeysQueue.push(v),v.then(function(){T.log('Media-keys set for "'+r+'"'),b.push(v),T.setMediaKeysQueue=T.setMediaKeysQueue.filter(function(E){return b.indexOf(E)===-1})})},n.generateRequestWithPreferredKeySession=function(r,d,T,b){var v,E,R=this,C=(v=this.config.drmSystems)===null||v===void 0||(E=v[r.keySystem])===null||E===void 0?void 0:E.generateRequest;if(C)try{var N=C.call(this.hls,d,T,r);if(!N)throw new Error("Invalid response from configured generateRequest filter");d=N.initDataType,T=r.decryptdata.pssh=N.initData?new Uint8Array(N.initData):null}catch(se){var K;if(this.warn(se.message),(K=this.hls)!==null&&K!==void 0&&K.config.debug)throw se}if(T===null)return this.log('Skipping key-session request for "'+b+'" (no initData)'),Promise.resolve(r);var H=this.getKeyIdString(r.decryptdata);this.log('Generating key-session request for "'+b+'": '+H+" (init data type: "+d+" length: "+(T?T.byteLength:null)+")");var ee=new(o());r.mediaKeysSession.onmessage=function(se){var G=r.mediaKeysSession;if(!G){ee.emit("error",new Error("invalid state"));return}var Ee=se.messageType,ge=se.message;R.log('"'+Ee+'" message event for session "'+G.sessionId+'" message size: '+ge.byteLength),Ee==="license-request"||Ee==="license-renewal"?R.renewLicense(r,ge).catch(function(Pe){R.handleError(Pe),ee.emit("error",Pe)}):Ee==="license-release"?r.keySystem===e.KeySystems.FAIRPLAY&&(R.updateKeySession(r,(0,O.strToUtf8array)("acknowledged")),R.removeSession(r)):R.warn('unhandled media key message type "'+Ee+'"')},r.mediaKeysSession.onkeystatuseschange=function(se){var G=r.mediaKeysSession;if(!G){ee.emit("error",new Error("invalid state"));return}R.onKeyStatusChange(r);var Ee=r.keyStatus;ee.emit("keyStatus",Ee),Ee==="expired"&&(R.warn(r.keySystem+" expired for key "+H),R.renewKeySession(r))};var J=new Promise(function(se,G){ee.on("error",G),ee.on("keyStatus",function(Ee){Ee.startsWith("usable")?se():Ee==="output-restricted"?G(new A({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):Ee==="internal-error"?G(new A({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},'key status changed to "'+Ee+'"')):Ee==="expired"?G(new Error("key expired while generating request")):R.warn('unhandled key status change "'+Ee+'"')})});return r.mediaKeysSession.generateRequest(d,T).then(function(){var se;R.log('Request generated for key-session "'+((se=r.mediaKeysSession)===null||se===void 0?void 0:se.sessionId)+'" keyId: '+H)}).catch(function(se){throw new A({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,error:se,fatal:!1},"Error generating key-session request: "+se)}).then(function(){return J}).catch(function(se){throw ee.removeAllListeners(),R.removeSession(r),se}).then(function(){return ee.removeAllListeners(),r})},n.onKeyStatusChange=function(r){var d=this;r.mediaKeysSession.keyStatuses.forEach(function(T,b){d.log('key status change "'+T+'" for keyStatuses keyId: '+p.default.hexDump("buffer"in b?new Uint8Array(b.buffer,b.byteOffset,b.byteLength):new Uint8Array(b))+" session keyId: "+p.default.hexDump(new Uint8Array(r.decryptdata.keyId||[]))+" uri: "+r.decryptdata.uri),r.keyStatus=T})},n.fetchServerCertificate=function(r){var d=this;return new Promise(function(T,b){var v=d.getServerCertificateUrl(r);if(!v)return T();d.log('Fetching serverCertificate for "'+r+'"');var E=new XMLHttpRequest;E.open("GET",v,!0),E.responseType="arraybuffer",E.onreadystatechange=function(){E.readyState===XMLHttpRequest.DONE&&(E.status===200?T(E.response):b(new A({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:E},'"'+r+'" certificate request XHR failed ('+v+"). Status: "+E.status+" ("+E.statusText+")")))},E.send()})},n.setMediaKeysServerCertificate=function(r,d,T){var b=this;return new Promise(function(v,E){r.setServerCertificate(T).then(function(R){b.log("setServerCertificate "+(R?"success":"not supported by CDM")+" ("+(T==null?void 0:T.byteLength)+') on "'+d+'"'),v(r)}).catch(function(R){E(new A({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:R,fatal:!0},R.message))})})},n.renewLicense=function(r,d){var T=this;return this.requestLicense(r,new Uint8Array(d)).then(function(b){return T.updateKeySession(r,new Uint8Array(b)).catch(function(v){throw new A({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:v,fatal:!0},v.message)})})},n.setupLicenseXHR=function(r,d,T,b){var v=this,E=this.config.licenseXhrSetup;return E?Promise.resolve().then(function(){if(!T.decryptdata)throw new Error("Key removed");return E.call(v.hls,r,d,T,b)}).catch(function(R){if(!T.decryptdata)throw R;return r.open("POST",d,!0),E.call(v.hls,r,d,T,b)}).then(function(R){r.readyState||r.open("POST",d,!0);var C=R||b;return{xhr:r,licenseChallenge:C}}):(r.open("POST",d,!0),Promise.resolve({xhr:r,licenseChallenge:b}))},n.requestLicense=function(r,d){var T=this;return new Promise(function(b,v){var E=T.getLicenseServerUrl(r.keySystem);T.log("Sending license request to URL: "+E);var R=new XMLHttpRequest;R.responseType="arraybuffer",R.onreadystatechange=function(){if(!T.hls||!r.mediaKeysSession)return v(new Error("invalid state"));if(R.readyState===4)if(R.status===200){T._requestLicenseFailureCount=0;var C=R.response;T.log("License received "+(C instanceof ArrayBuffer?C.byteLength:C));var N=T.config.licenseResponseCallback;if(N)try{C=N.call(T.hls,R,E,r)}catch(H){T.error(H)}b(C)}else if(T._requestLicenseFailureCount++,T._requestLicenseFailureCount>S||R.status>=400&&R.status<500)v(new A({type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:R},"License Request XHR failed ("+E+"). Status: "+R.status+" ("+R.statusText+")"));else{var K=S-T._requestLicenseFailureCount+1;T.warn("Retrying license request, "+K+" attempts left"),T.requestLicense(r,d).then(b,v)}},r.licenseXhr&&r.licenseXhr.readyState!==XMLHttpRequest.DONE&&r.licenseXhr.abort(),r.licenseXhr=R,T.setupLicenseXHR(R,E,r,d).then(function(C){var N=C.xhr,K=C.licenseChallenge;N.send(K)})})},n.onMediaAttached=function(r,d){if(this.config.emeEnabled){var T=d.media;this.media=T,T.addEventListener("encrypted",this.onMediaEncrypted),T.addEventListener("waitingforkey",this.onWaitingForKey)}},n.onMediaDetached=function(){var r=this,d=this.media,T=this.mediaKeySessions;d&&(d.removeEventListener("encrypted",this.onMediaEncrypted),d.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},l.LevelKey.clearKeyUriToKeyIdMap();var b=T.length;w.CDMCleanupPromise=Promise.all(T.map(function(v){return r.removeSession(v)}).concat(d==null?void 0:d.setMediaKeys(null).catch(function(v){r.log("Could not clear media keys: "+v+". media.src: "+(d==null?void 0:d.src))}))).then(function(){b&&(r.log("finished closing key sessions and clearing media keys"),T.length=0)}).catch(function(v){r.log("Could not close sessions and clear media keys: "+v+". media.src: "+(d==null?void 0:d.src))})},n.onManifestLoaded=function(r,d){var T=d.sessionKeys;if(!(!T||!this.config.emeEnabled)&&!this.keyFormatPromise){var b=T.reduce(function(v,E){return v.indexOf(E.keyFormat)===-1&&v.push(E.keyFormat),v},[]);this.log("Selecting key-system from session-keys "+b.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(b)}},n.removeSession=function(r){var d=this,T=r.mediaKeysSession,b=r.licenseXhr;if(T){this.log("Remove licenses and keys and close session "+T.sessionId),T.onmessage=null,T.onkeystatuseschange=null,b&&b.readyState!==XMLHttpRequest.DONE&&b.abort(),r.mediaKeysSession=r.decryptdata=r.licenseXhr=void 0;var v=this.mediaKeySessions.indexOf(r);return v>-1&&this.mediaKeySessions.splice(v,1),T.remove().catch(function(E){d.log("Could not remove session: "+E)}).then(function(){return T.close()}).catch(function(E){d.log("Could not close session: "+E)})}},w}();_.CDMCleanupPromise=void 0;var A=function(w){c(n,w);function n(a,r){var d;return d=w.call(this,r)||this,d.data=void 0,d.data=a,a.err=a.error,d}return n}(y(Error));const x=_},"./src/controller/fps-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>e});var M=L("./src/events.ts"),P=L("./src/utils/logger.ts"),k=function(){function O(l){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=l,this.registerListeners()}var D=O.prototype;return D.setStreamController=function(p){this.streamController=p},D.registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},D.unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching)},D.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},D.onMediaAttaching=function(p,h){var g=this.hls.config;if(g.capLevelOnFPSDrop){var o=h.media instanceof self.HTMLVideoElement?h.media:null;this.media=o,o&&typeof o.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),g.fpsDroppedMonitoringPeriod)}},D.checkFPS=function(p,h,g){var o=performance.now();if(h){if(this.lastTime){var c=o-this.lastTime,y=g-this.lastDroppedFrames,u=h-this.lastDecodedFrames,s=1e3*y/c,i=this.hls;if(i.trigger(M.Events.FPS_DROP,{currentDropped:y,currentDecoded:u,totalDroppedFrames:g}),s>0&&y>i.config.fpsDroppedMonitoringThreshold*u){var t=i.currentLevel;P.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+t),t>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=t)&&(t=t-1,i.trigger(M.Events.FPS_DROP_LEVEL_CAPPING,{level:t,droppedLevel:i.currentLevel}),i.autoLevelCapping=t,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=g,this.lastDecodedFrames=h}},D.checkFPSInterval=function(){var p=this.media;if(p)if(this.isVideoPlaybackQualityAvailable){var h=p.getVideoPlaybackQuality();this.checkFPS(p,h.totalVideoFrames,h.droppedVideoFrames)}else this.checkFPS(p,p.webkitDecodedFrameCount,p.webkitDroppedFrameCount)},O}();const e=k},"./src/controller/fragment-finders.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{findFragWithCC:()=>l,findFragmentByPDT:()=>k,findFragmentByPTS:()=>e,fragmentWithinToleranceTest:()=>O,pdtWithinToleranceTest:()=>D});var M=L("./src/polyfills/number.ts"),P=L("./src/utils/binary-search.ts");function k(p,h,g){if(h===null||!Array.isArray(p)||!p.length||!(0,M.isFiniteNumber)(h))return null;var o=p[0].programDateTime;if(h<(o||0))return null;var c=p[p.length-1].endProgramDateTime;if(h>=(c||0))return null;g=g||0;for(var y=0;y<p.length;++y){var u=p[y];if(D(h,g,u))return u}return null}function e(p,h,g,o){g===void 0&&(g=0),o===void 0&&(o=0);var c=null;if(p?c=h[p.sn-h[0].sn+1]||null:g===0&&h[0].start===0&&(c=h[0]),c&&O(g,o,c)===0)return c;var y=P.default.search(h,O.bind(null,g,o));return y&&(y!==p||!c)?y:c}function O(p,h,g){if(p===void 0&&(p=0),h===void 0&&(h=0),g.start<=p&&g.start+g.duration>p)return 0;var o=Math.min(h,g.duration+(g.deltaPTS?g.deltaPTS:0));return g.start+g.duration-o<=p?1:g.start-o>p&&g.start?-1:0}function D(p,h,g){var o=Math.min(h,g.duration+(g.deltaPTS?g.deltaPTS:0))*1e3,c=g.endProgramDateTime||0;return c-o>p}function l(p,h){return P.default.search(p,function(g){return g.cc<h?1:g.cc>h?-1:0})}},"./src/controller/fragment-tracker.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{FragmentState:()=>k,FragmentTracker:()=>e});var M=L("./src/events.ts"),P=L("./src/types/loader.ts"),k;(function(l){l.NOT_LOADED="NOT_LOADED",l.APPENDING="APPENDING",l.PARTIAL="PARTIAL",l.OK="OK"})(k||(k={}));var e=function(){function l(h){this.activeFragment=null,this.activeParts=null,this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=h,this._registerListeners()}var p=l.prototype;return p._registerListeners=function(){var g=this.hls;g.on(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.on(M.Events.FRAG_LOADED,this.onFragLoaded,this)},p._unregisterListeners=function(){var g=this.hls;g.off(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.off(M.Events.FRAG_LOADED,this.onFragLoaded,this)},p.destroy=function(){this._unregisterListeners(),this.fragments=this.endListFragments=this.timeRanges=this.activeFragment=this.activeParts=null},p.getAppendedFrag=function(g,o){if(o===P.PlaylistLevelType.MAIN){var c=this.activeFragment,y=this.activeParts;if(!c)return null;if(y)for(var u=y.length;u--;){var s=y[u],i=s?s.end:c.appendedPTS;if(s.start<=g&&i!==void 0&&g<=i)return u>9&&(this.activeParts=y.slice(u-9)),s}else if(c.start<=g&&c.appendedPTS!==void 0&&g<=c.appendedPTS)return c}return this.getBufferedFrag(g,o)},p.getBufferedFrag=function(g,o){for(var c=this.fragments,y=Object.keys(c),u=y.length;u--;){var s=c[y[u]];if((s==null?void 0:s.body.type)===o&&s.buffered){var i=s.body;if(i.start<=g&&g<=i.end)return i}}return null},p.detectEvictedFragments=function(g,o,c){var y=this;this.timeRanges&&(this.timeRanges[g]=o),Object.keys(this.fragments).forEach(function(u){var s=y.fragments[u];if(s){if(!s.buffered&&!s.loaded){s.body.type===c&&y.removeFragment(s.body);return}var i=s.range[g];i&&i.time.some(function(t){var m=!y.isTimeBuffered(t.startPTS,t.endPTS,o);return m&&y.removeFragment(s.body),m})}})},p.detectPartialFragments=function(g){var o=this,c=this.timeRanges,y=g.frag,u=g.part;if(!(!c||y.sn==="initSegment")){var s=D(y),i=this.fragments[s];i&&(Object.keys(c).forEach(function(t){var m=y.elementaryStreams[t];if(m){var S=c[t],f=u!==null||m.partial===!0;i.range[t]=o.getBufferedTimes(y,u,f,S)}}),i.loaded=null,Object.keys(i.range).length?(i.buffered=!0,i.body.endList&&(this.endListFragments[i.body.type]=i)):this.removeFragment(i.body))}},p.fragBuffered=function(g){var o=D(g),c=this.fragments[o];c&&(c.loaded=null,c.buffered=!0)},p.getBufferedTimes=function(g,o,c,y){for(var u={time:[],partial:c},s=o?o.start:g.start,i=o?o.end:g.end,t=g.minEndPTS||i,m=g.maxStartPTS||s,S=0;S<y.length;S++){var f=y.start(S)-this.bufferPadding,_=y.end(S)+this.bufferPadding;if(m>=f&&t<=_){u.time.push({startPTS:Math.max(s,y.start(S)),endPTS:Math.min(i,y.end(S))});break}else if(s<_&&i>f)u.partial=!0,u.time.push({startPTS:Math.max(s,y.start(S)),endPTS:Math.min(i,y.end(S))});else if(i<=f)break}return u},p.getPartialFragment=function(g){var o=null,c,y,u,s=0,i=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(m){var S=t[m];S&&O(S)&&(y=S.body.start-i,u=S.body.end+i,g>=y&&g<=u&&(c=Math.min(g-y,u-g),s<=c&&(o=S.body,s=c)))}),o},p.isEndListAppended=function(g){var o=this.endListFragments[g];return o!==void 0&&(o.buffered||O(o))},p.getState=function(g){var o=D(g),c=this.fragments[o];return c?c.buffered?O(c)?k.PARTIAL:k.OK:k.APPENDING:k.NOT_LOADED},p.isTimeBuffered=function(g,o,c){for(var y,u,s=0;s<c.length;s++){if(y=c.start(s)-this.bufferPadding,u=c.end(s)+this.bufferPadding,g>=y&&o<=u)return!0;if(o<=y)return!1}return!1},p.onFragLoaded=function(g,o){var c=o.frag,y=o.part;if(!(c.sn==="initSegment"||c.bitrateTest||y)){var u=D(c);this.fragments[u]={body:c,loaded:o,buffered:!1,range:Object.create(null)}}},p.onBufferAppended=function(g,o){var c=this,y=o.frag,u=o.part,s=o.timeRanges;if(y.type===P.PlaylistLevelType.MAIN)if(this.activeFragment!==y&&(this.activeFragment=y,y.appendedPTS=void 0),u){var i=this.activeParts;i||(this.activeParts=i=[]),i.push(u)}else this.activeParts=null;this.timeRanges=s,Object.keys(s).forEach(function(t){var m=s[t];if(c.detectEvictedFragments(t,m),!u&&y.type===P.PlaylistLevelType.MAIN){var S=y.elementaryStreams[t];if(!S)return;for(var f=0;f<m.length;f++){var _=m.end(f);_<=S.endPTS&&_>S.startPTS?y.appendedPTS=Math.max(_,y.appendedPTS||0):y.appendedPTS=S.endPTS}}})},p.onFragBuffered=function(g,o){this.detectPartialFragments(o)},p.hasFragment=function(g){var o=D(g);return!!this.fragments[o]},p.removeFragmentsInRange=function(g,o,c){var y=this;Object.keys(this.fragments).forEach(function(u){var s=y.fragments[u];if(s&&s.buffered){var i=s.body;i.type===c&&i.start<o&&i.end>g&&y.removeFragment(i)}})},p.removeFragment=function(g){var o=D(g);g.stats.loaded=0,g.clearElementaryStreamInfo(),g.appendedPTS=void 0,delete this.fragments[o],g.endList&&delete this.endListFragments[g.type]},p.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activeFragment=null,this.activeParts=null},l}();function O(l){var p,h;return l.buffered&&(((p=l.range.video)===null||p===void 0?void 0:p.partial)||((h=l.range.audio)===null||h===void 0?void 0:h.partial))}function D(l){return l.type+"_"+l.level+"_"+l.urlId+"_"+l.sn}},"./src/controller/gap-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{MAX_START_GAP_JUMP:()=>D,SKIP_BUFFER_HOLE_STEP_SECONDS:()=>l,SKIP_BUFFER_RANGE_START:()=>p,STALL_MINIMUM_DURATION_MS:()=>O,default:()=>h});var M=L("./src/utils/buffer-helper.ts"),P=L("./src/errors.ts"),k=L("./src/events.ts"),e=L("./src/utils/logger.ts"),O=250,D=2,l=.1,p=.05,h=function(){function g(c,y,u,s){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=c,this.media=y,this.fragmentTracker=u,this.hls=s}var o=g.prototype;return o.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},o.poll=function(y,u){var s=this.config,i=this.media,t=this.stalled;if(i!==null){var m=i.currentTime,S=i.seeking,f=this.seeking&&!S,_=!this.seeking&&S;if(this.seeking=S,m!==y){if(this.moved=!0,t!==null){if(this.stallReported){var A=self.performance.now()-t;e.logger.warn("playback not stuck anymore @"+m+", after "+Math.round(A)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((_||f)&&(this.stalled=null),!(i.paused&&!S||i.ended||i.playbackRate===0||!M.BufferHelper.getBuffered(i).length)){var x=M.BufferHelper.bufferInfo(i,m,0),w=x.len>0,n=x.nextStart||0;if(!(!w&&!n)){if(S){var a=x.len>D,r=!n||u&&u.start<=m||n-m>D&&!this.fragmentTracker.getPartialFragment(m);if(a||r)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var d,T=Math.max(n,x.start||0)-m,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,v=b==null||(d=b.details)===null||d===void 0?void 0:d.live,E=v?b.details.targetduration*2:D;if(T>0&&T<=E){this._trySkipBufferHole(null);return}}var R=self.performance.now();if(t===null){this.stalled=R;return}var C=R-t;if(!(!S&&C>=O&&(this._reportStall(x),!this.media))){var N=M.BufferHelper.bufferInfo(i,m,s.maxBufferHole);this._tryFixBufferStall(N,C)}}}}},o._tryFixBufferStall=function(y,u){var s=this.config,i=this.fragmentTracker,t=this.media;if(t!==null){var m=t.currentTime,S=i.getPartialFragment(m);if(S){var f=this._trySkipBufferHole(S);if(f||!this.media)return}y.len>s.maxBufferHole&&u>s.highBufferWatchdogPeriod*1e3&&(e.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},o._reportStall=function(y){var u=this.hls,s=this.media,i=this.stallReported;!i&&s&&(this.stallReported=!0,e.logger.warn("Playback stalling at @"+s.currentTime+" due to low buffer ("+JSON.stringify(y)+")"),u.trigger(k.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:y.len}))},o._trySkipBufferHole=function(y){var u=this.config,s=this.hls,i=this.media;if(i===null)return 0;for(var t=i.currentTime,m=0,S=M.BufferHelper.getBuffered(i),f=0;f<S.length;f++){var _=S.start(f);if(t+u.maxBufferHole>=m&&t<_){var A=Math.max(_+p,i.currentTime+l);return e.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+A),this.moved=!0,this.stalled=null,i.currentTime=A,y&&s.trigger(k.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+A,frag:y}),A}m=S.end(f)}return 0},o._tryNudgeBuffer=function(){var y=this.config,u=this.hls,s=this.media,i=this.nudgeRetry;if(s!==null){var t=s.currentTime;if(this.nudgeRetry++,i<y.nudgeMaxRetry){var m=t+(i+1)*y.nudgeOffset;e.logger.warn("Nudging 'currentTime' from "+t+" to "+m),s.currentTime=m,u.trigger(k.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else e.logger.error("Playhead still not moving while enough data buffered @"+t+" after "+y.nudgeMaxRetry+" nudges"),u.trigger(k.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})}},g}()},"./src/controller/id3-track-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>y});var M=L("./src/polyfills/number.ts"),P=L("./src/events.ts"),k=L("./src/utils/texttrack-utils.ts"),e=L("./src/demux/id3.ts"),O=L("./src/loader/date-range.ts"),D=L("./src/types/demuxer.ts"),l=.25;function p(){return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var h=function(){var u=p();try{new u(0,Number.POSITIVE_INFINITY,"")}catch(s){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function g(u,s){return u.getTime()/1e3-s}function o(u){return Uint8Array.from(u.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}var c=function(){function u(i){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=i,this._registerListeners()}var s=u.prototype;return s.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},s._registerListeners=function(){var t=this.hls;t.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},s._unregisterListeners=function(){var t=this.hls;t.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(P.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},s.onMediaAttached=function(t,m){this.media=m.media},s.onMediaDetaching=function(){this.id3Track&&((0,k.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},s.onManifestLoading=function(){this.dateRangeCuesAppended={}},s.createTrack=function(t){var m=this.getID3Track(t.textTracks);return m.mode="hidden",m},s.getID3Track=function(t){if(this.media){for(var m=0;m<t.length;m++){var S=t[m];if(S.kind==="metadata"&&S.label==="id3")return(0,k.sendAddTrackEvent)(S,this.media),S}return this.media.addTextTrack("metadata","id3")}},s.onFragParsingMetadata=function(t,m){if(this.media){var S=this.hls.config,f=S.enableEmsgMetadataCues,_=S.enableID3MetadataCues;if(!(!f&&!_)){var A=m.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var x=p(),w=0;w<A.length;w++){var n=A[w].type;if(!(n===D.MetadataSchema.emsg&&!f||!_)){var a=e.getID3Frames(A[w].data);if(a){var r=A[w].pts,d=r+A[w].duration;d>h&&(d=h);var T=d-r;T<=0&&(d=r+l);for(var b=0;b<a.length;b++){var v=a[b];if(!e.isTimeStampFrame(v)){this.updateId3CueEnds(r);var E=new x(r,d,"");E.value=v,n&&(E.type=n),this.id3Track.addCue(E)}}}}}}}},s.updateId3CueEnds=function(t){var m,S=(m=this.id3Track)===null||m===void 0?void 0:m.cues;if(S)for(var f=S.length;f--;){var _=S[f];_.startTime<t&&_.endTime===h&&(_.endTime=t)}},s.onBufferFlushing=function(t,m){var S=m.startOffset,f=m.endOffset,_=m.type,A=this.id3Track,x=this.hls;if(x){var w=x.config,n=w.enableEmsgMetadataCues,a=w.enableID3MetadataCues;if(A&&(n||a)){var r;_==="audio"?r=function(T){return T.type===D.MetadataSchema.audioId3&&a}:_==="video"?r=function(T){return T.type===D.MetadataSchema.emsg&&n}:r=function(T){return T.type===D.MetadataSchema.audioId3&&a||T.type===D.MetadataSchema.emsg&&n},(0,k.removeCuesInRange)(A,S,f,r)}}},s.onLevelUpdated=function(t,m){var S=this,f=m.details;if(!(!this.media||!f.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)){var _=this.dateRangeCuesAppended,A=this.id3Track,x=f.dateRanges,w=Object.keys(x);if(A)for(var n=Object.keys(_).filter(function(R){return!w.includes(R)}),a=function(C){var N=n[C];Object.keys(_[N].cues).forEach(function(K){A.removeCue(_[N].cues[K])}),delete _[N]},r=n.length;r--;)a(r);var d=f.fragments[f.fragments.length-1];if(!(w.length===0||!(0,M.isFiniteNumber)(d==null?void 0:d.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var T=d.programDateTime/1e3-d.start,b=p(),v=function(C){var N=w[C],K=x[N],H=_[N],ee=(H==null?void 0:H.cues)||{},J=(H==null?void 0:H.durationKnown)||!1,se=g(K.startDate,T),G=h,Ee=K.endDate;if(Ee)G=g(Ee,T),J=!0;else if(K.endOnNext&&!J){var ge=w.reduce(function(fe,Be){var Ue=x[Be];return Ue.class===K.class&&Ue.id!==Be&&Ue.startDate>K.startDate&&fe.push(Ue),fe},[]).sort(function(fe,Be){return fe.startDate.getTime()-Be.startDate.getTime()})[0];ge&&(G=g(ge.startDate,T),J=!0)}for(var Pe=Object.keys(K.attr),Ne=0;Ne<Pe.length;Ne++){var $e=Pe[Ne];if(!($e===O.DateRangeAttribute.ID||$e===O.DateRangeAttribute.CLASS||$e===O.DateRangeAttribute.START_DATE||$e===O.DateRangeAttribute.DURATION||$e===O.DateRangeAttribute.END_DATE||$e===O.DateRangeAttribute.END_ON_NEXT)){var je=ee[$e];if(je)J&&!H.durationKnown&&(je.endTime=G);else{var Ce=K.attr[$e];je=new b(se,G,""),($e===O.DateRangeAttribute.SCTE35_OUT||$e===O.DateRangeAttribute.SCTE35_IN)&&(Ce=o(Ce)),je.value={key:$e,data:Ce},je.type=D.MetadataSchema.dateRange,S.id3Track.addCue(je),ee[$e]=je}}}_[N]={cues:ee,dateRange:K,durationKnown:J}},E=0;E<w.length;E++)v(E)}}},u}();const y=c},"./src/controller/latency-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>p});var M=L("./src/errors.ts"),P=L("./src/events.ts"),k=L("./src/utils/logger.ts");function e(h,g){for(var o=0;o<g.length;o++){var c=g[o];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,D(c.key),c)}}function O(h,g,o){return g&&e(h.prototype,g),o&&e(h,o),Object.defineProperty(h,"prototype",{writable:!1}),h}function D(h){var g=l(h,"string");return typeof g=="symbol"?g:String(g)}function l(h,g){if(typeof h!="object"||h===null)return h;var o=h[Symbol.toPrimitive];if(o!==void 0){var c=o.call(h,g||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(h)}var p=function(){function h(o){var c=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return c.timeupdate()},this.hls=o,this.config=o.config,this.registerListeners()}var g=h.prototype;return g.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},g.registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(P.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(P.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(P.Events.ERROR,this.onError)},g.onMediaAttached=function(c,y){this.media=y.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},g.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},g.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},g.onLevelUpdated=function(c,y){var u=y.details;this.levelDetails=u,u.advanced&&this.timeupdate(),!u.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},g.onError=function(c,y){y.details===M.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,k.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},g.timeupdate=function(){var c=this.media,y=this.levelDetails;if(!(!c||!y)){this.currentTime=c.currentTime;var u=this.computeLatency();if(u!==null){this._latency=u;var s=this.config,i=s.lowLatencyMode,t=s.maxLiveSyncPlaybackRate;if(!(!i||t===1)){var m=this.targetLatency;if(m!==null){var S=u-m,f=Math.min(this.maxLatency,m+y.targetduration),_=S<f;if(y.live&&_&&S>.05&&this.forwardBufferLength>1){var A=Math.min(2,Math.max(1,t)),x=Math.round(2/(1+Math.exp(-.75*S-this.edgeStalled))*20)/20;c.playbackRate=Math.min(A,Math.max(1,x))}else c.playbackRate!==1&&c.playbackRate!==0&&(c.playbackRate=1)}}}}},g.estimateLiveEdge=function(){var c=this.levelDetails;return c===null?null:c.edge+c.age},g.computeLatency=function(){var c=this.estimateLiveEdge();return c===null?null:c-this.currentTime},O(h,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var c=this.config,y=this.levelDetails;return c.liveMaxLatencyDuration!==void 0?c.liveMaxLatencyDuration:y?c.liveMaxLatencyDurationCount*y.targetduration:0}},{key:"targetLatency",get:function(){var c=this.levelDetails;if(c===null)return null;var y=c.holdBack,u=c.partHoldBack,s=c.targetduration,i=this.config,t=i.liveSyncDuration,m=i.liveSyncDurationCount,S=i.lowLatencyMode,f=this.hls.userConfig,_=S&&u||y;(f.liveSyncDuration||f.liveSyncDurationCount||_===0)&&(_=t!==void 0?t:m*s);var A=s,x=1;return _+Math.min(this.stallCount*x,A)}},{key:"liveSyncPosition",get:function(){var c=this.estimateLiveEdge(),y=this.targetLatency,u=this.levelDetails;if(c===null||y===null||u===null)return null;var s=u.edge,i=c-y-this.edgeStalled,t=s-u.totalduration,m=s-(this.config.lowLatencyMode&&u.partTarget||u.targetduration);return Math.min(Math.max(t,i),m)}},{key:"drift",get:function(){var c=this.levelDetails;return c===null?1:c.drift}},{key:"edgeStalled",get:function(){var c=this.levelDetails;if(c===null)return 0;var y=(this.config.lowLatencyMode&&c.partTarget||c.targetduration)*3;return Math.max(c.age-y,0)}},{key:"forwardBufferLength",get:function(){var c=this.media,y=this.levelDetails;if(!c||!y)return 0;var u=c.buffered.length;return(u?c.buffered.end(u-1):y.edge)-this.currentTime}}]),h}()},"./src/controller/level-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>i});var M=L("./src/types/level.ts"),P=L("./src/events.ts"),k=L("./src/errors.ts"),e=L("./src/utils/codecs.ts"),O=L("./src/controller/level-helper.ts"),D=L("./src/controller/base-playlist-controller.ts"),l=L("./src/types/loader.ts");function p(){return p=Object.assign?Object.assign.bind():function(t){for(var m=1;m<arguments.length;m++){var S=arguments[m];for(var f in S)Object.prototype.hasOwnProperty.call(S,f)&&(t[f]=S[f])}return t},p.apply(this,arguments)}function h(t,m){for(var S=0;S<m.length;S++){var f=m[S];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(t,o(f.key),f)}}function g(t,m,S){return m&&h(t.prototype,m),S&&h(t,S),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t){var m=c(t,"string");return typeof m=="symbol"?m:String(m)}function c(t,m){if(typeof t!="object"||t===null)return t;var S=t[Symbol.toPrimitive];if(S!==void 0){var f=S.call(t,m||"default");if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(t)}function y(t,m){t.prototype=Object.create(m.prototype),t.prototype.constructor=t,u(t,m)}function u(t,m){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,_){return f.__proto__=_,f},u(t,m)}var s=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),i=function(t){y(m,t);function m(f){var _;return _=t.call(this,f,"[level-controller]")||this,_._levels=[],_._firstLevel=-1,_._startLevel=void 0,_.currentLevelIndex=-1,_.manualLevelIndex=-1,_.onParsedComplete=void 0,_._registerListeners(),_}var S=m.prototype;return S._registerListeners=function(){var _=this.hls;_.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),_.on(P.Events.ERROR,this.onError,this)},S._unregisterListeners=function(){var _=this.hls;_.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),_.off(P.Events.ERROR,this.onError,this)},S.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,t.prototype.destroy.call(this)},S.startLoad=function(){var _=this._levels;_.forEach(function(A){A.loadError=0}),t.prototype.startLoad.call(this)},S.onManifestLoaded=function(_,A){var x=[],w=[],n=[],a,r={},d,T=!1,b=!1,v=!1;if(A.levels.forEach(function(N){var K=N.attrs;T=T||!!(N.width&&N.height),b=b||!!N.videoCodec,v=v||!!N.audioCodec,s&&N.audioCodec&&N.audioCodec.indexOf("mp4a.40.34")!==-1&&(N.audioCodec=void 0);var H=N.bitrate+"-"+N.attrs.RESOLUTION+"-"+N.attrs.CODECS;d=r[H],d?d.url.push(N.url):(d=new M.Level(N),r[H]=d,x.push(d)),K&&(K.AUDIO&&(0,O.addGroupId)(d,"audio",K.AUDIO),K.SUBTITLES&&(0,O.addGroupId)(d,"text",K.SUBTITLES))}),(T||b)&&v&&(x=x.filter(function(N){var K=N.videoCodec,H=N.width,ee=N.height;return!!K||!!(H&&ee)})),x=x.filter(function(N){var K=N.audioCodec,H=N.videoCodec;return(!K||(0,e.isCodecSupportedInMp4)(K,"audio"))&&(!H||(0,e.isCodecSupportedInMp4)(H,"video"))}),A.audioTracks&&(w=A.audioTracks.filter(function(N){return!N.audioCodec||(0,e.isCodecSupportedInMp4)(N.audioCodec,"audio")}),(0,O.assignTrackIdsByGroup)(w)),A.subtitles&&(n=A.subtitles,(0,O.assignTrackIdsByGroup)(n)),x.length>0){a=x[0].bitrate,x.sort(function(N,K){return N.attrs["HDCP-LEVEL"]!==K.attrs["HDCP-LEVEL"]?(N.attrs["HDCP-LEVEL"]||"")>(K.attrs["HDCP-LEVEL"]||"")?1:-1:N.bitrate!==K.bitrate?N.bitrate-K.bitrate:N.attrs.SCORE!==K.attrs.SCORE?N.attrs.decimalFloatingPoint("SCORE")-K.attrs.decimalFloatingPoint("SCORE"):T&&N.height!==K.height?N.height-K.height:0}),this._levels=x;for(var E=0;E<x.length;E++)if(x[E].bitrate===a){this._firstLevel=E,this.log("manifest loaded, "+x.length+" level(s) found, first bitrate: "+a);break}var R=v&&!b,C={levels:x,audioTracks:w,subtitleTracks:n,sessionData:A.sessionData,sessionKeys:A.sessionKeys,firstLevel:this._firstLevel,stats:A.stats,audio:v,video:b,altAudio:!R&&w.some(function(N){return!!N.url})};this.hls.trigger(P.Events.MANIFEST_PARSED,C),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(P.Events.ERROR,{type:k.ErrorTypes.MEDIA_ERROR,details:k.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:A.url,reason:"no level with compatible codecs found in manifest"})},S.onError=function(_,A){var x,w;if(t.prototype.onError.call(this,_,A),!A.fatal){var n=A.context,a=this._levels[this.currentLevelIndex];if(n&&(n.type===l.PlaylistContextType.AUDIO_TRACK&&a.audioGroupIds&&n.groupId===a.audioGroupIds[a.urlId]||n.type===l.PlaylistContextType.SUBTITLE_TRACK&&a.textGroupIds&&n.groupId===a.textGroupIds[a.urlId])){this.redundantFailover(this.currentLevelIndex);return}var r=!1,d=!0,T;switch(A.details){case k.ErrorDetails.FRAG_LOAD_ERROR:case k.ErrorDetails.FRAG_LOAD_TIMEOUT:case k.ErrorDetails.KEY_LOAD_ERROR:case k.ErrorDetails.KEY_LOAD_TIMEOUT:if(A.frag){var b=A.frag.type===l.PlaylistLevelType.MAIN?A.frag.level:this.currentLevelIndex,v=this._levels[b];v?(v.fragmentError++,v.fragmentError>this.hls.config.fragLoadingMaxRetry&&(T=b)):T=b}break;case k.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{var E=a.attrs["HDCP-LEVEL"];E&&(this.hls.maxHdcpLevel=M.HdcpLevels[M.HdcpLevels.indexOf(E)-1],this.warn('Restricting playback to HDCP-LEVEL of "'+this.hls.maxHdcpLevel+'" or lower'))}case k.ErrorDetails.FRAG_PARSING_ERROR:case k.ErrorDetails.KEY_SYSTEM_NO_SESSION:T=((x=A.frag)===null||x===void 0?void 0:x.type)===l.PlaylistLevelType.MAIN?A.frag.level:this.currentLevelIndex,A.levelRetry=!1;break;case k.ErrorDetails.LEVEL_LOAD_ERROR:case k.ErrorDetails.LEVEL_LOAD_TIMEOUT:n&&(n.deliveryDirectives&&(d=!1),T=n.level),r=!0;break;case k.ErrorDetails.REMUX_ALLOC_ERROR:T=(w=A.level)!=null?w:this.currentLevelIndex,r=!0;break}T!==void 0&&this.recoverLevel(A,T,r,d)}},S.recoverLevel=function(_,A,x,w){var n=_.details,a=this._levels[A];if(a.loadError++,x){var r=this.retryLoadingOrFail(_);if(r)_.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(w){var d=a.url.length;if(d>1&&a.loadError<d)_.levelRetry=!0,this.redundantFailover(A);else if(this.manualLevelIndex===-1){for(var T=-1,b=this._levels,v=b.length;v--;){var E=(v+this.currentLevelIndex)%b.length;if(E!==this.currentLevelIndex&&b[E].loadError===0){T=E;break}}T>-1&&this.currentLevelIndex!==T?(this.warn(n+": switch to "+T),_.levelRetry=!0,this.hls.nextAutoLevel=T):_.levelRetry===!1&&(_.fatal=!0)}}},S.redundantFailover=function(_){var A=this._levels[_],x=A.url.length;if(x>1){var w=(A.urlId+1)%x;this.warn("Switching to redundant URL-id "+w),this._levels.forEach(function(n){n.urlId=w}),this.level=_}},S.onFragLoaded=function(_,A){var x=A.frag;if(x!==void 0&&x.type===l.PlaylistLevelType.MAIN){var w=this._levels[x.level];w!==void 0&&(w.fragmentError=0,w.loadError=0)}},S.onLevelLoaded=function(_,A){var x,w=A.level,n=A.details,a=this._levels[w];if(!a){var r;this.warn("Invalid level index "+w),(r=A.deliveryDirectives)!==null&&r!==void 0&&r.skip&&(n.deltaUpdateFailed=!0);return}w===this.currentLevelIndex?(a.fragmentError===0&&(a.loadError=0,this.retryCount=0),this.playlistLoaded(w,A,a.details)):(x=A.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(n.deltaUpdateFailed=!0)},S.onAudioTrackSwitched=function(_,A){var x=this.hls.levels[this.currentLevelIndex];if(x&&x.audioGroupIds){for(var w=-1,n=this.hls.audioTracks[A.id].groupId,a=0;a<x.audioGroupIds.length;a++)if(x.audioGroupIds[a]===n){w=a;break}w!==x.urlId&&(x.urlId=w,this.startLoad())}},S.loadPlaylist=function(_){t.prototype.loadPlaylist.call(this);var A=this.currentLevelIndex,x=this._levels[A];if(this.canLoad&&x&&x.url.length>0){var w=x.urlId,n=x.url[w];if(_)try{n=_.addDirectives(n)}catch(a){this.warn("Could not construct new URL with HLS Delivery Directives: "+a)}this.log("Attempt loading level index "+A+((_==null?void 0:_.msn)!==void 0?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+w+" "+n),this.clearTimer(),this.hls.trigger(P.Events.LEVEL_LOADING,{url:n,level:A,id:w,deliveryDirectives:_||null})}},S.removeLevel=function(_,A){var x=function(a,r){return r!==A},w=this._levels.filter(function(n,a){return a!==_?!0:n.url.length>1&&A!==void 0?(n.url=n.url.filter(x),n.audioGroupIds&&(n.audioGroupIds=n.audioGroupIds.filter(x)),n.textGroupIds&&(n.textGroupIds=n.textGroupIds.filter(x)),n.urlId=0,!0):!1}).map(function(n,a){var r=n.details;return r!=null&&r.fragments&&r.fragments.forEach(function(d){d.level=a}),n});this._levels=w,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:w})},g(m,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(_){var A,x=this._levels;if(x.length!==0&&!(this.currentLevelIndex===_&&(A=x[_])!==null&&A!==void 0&&A.details)){if(_<0||_>=x.length){var w=_<0;if(this.hls.trigger(P.Events.ERROR,{type:k.ErrorTypes.OTHER_ERROR,details:k.ErrorDetails.LEVEL_SWITCH_ERROR,level:_,fatal:w,reason:"invalid level idx"}),w)return;_=Math.min(_,x.length-1)}this.clearTimer();var n=this.currentLevelIndex,a=x[n],r=x[_];this.log("switching to level "+_+" from "+n),this.currentLevelIndex=_;var d=p({},r,{level:_,maxBitrate:r.maxBitrate,uri:r.uri,urlId:r.urlId});delete d._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,d);var T=r.details;if(!T||T.live){var b=this.switchParams(r.uri,a==null?void 0:a.details);this.loadPlaylist(b)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(_){this.manualLevelIndex=_,this._startLevel===void 0&&(this._startLevel=_),_!==-1&&(this.level=_)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(_){this._firstLevel=_}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var _=this.hls.config.startLevel;return _!==void 0?_:this._firstLevel}else return this._startLevel},set:function(_){this._startLevel=_}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(_){this.level=_,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=_)}}]),m}(D.default)},"./src/controller/level-helper.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{addGroupId:()=>O,addSliding:()=>s,adjustSliding:()=>u,assignTrackIdsByGroup:()=>D,computeReloadInterval:()=>i,getFragmentWithSN:()=>t,getPartWith:()=>m,mapFragmentIntersection:()=>y,mapPartIntersection:()=>c,mergeDetails:()=>g,updateFragPTSDTS:()=>h,updatePTS:()=>l});var M=L("./src/polyfills/number.ts"),P=L("./src/utils/logger.ts"),k=L("./src/loader/date-range.ts");function e(){return e=Object.assign?Object.assign.bind():function(S){for(var f=1;f<arguments.length;f++){var _=arguments[f];for(var A in _)Object.prototype.hasOwnProperty.call(_,A)&&(S[A]=_[A])}return S},e.apply(this,arguments)}function O(S,f,_){switch(f){case"audio":S.audioGroupIds||(S.audioGroupIds=[]),S.audioGroupIds.push(_);break;case"text":S.textGroupIds||(S.textGroupIds=[]),S.textGroupIds.push(_);break}}function D(S){var f={};S.forEach(function(_){var A=_.groupId||"";_.id=f[A]=f[A]||0,f[A]++})}function l(S,f,_){var A=S[f],x=S[_];p(A,x)}function p(S,f){var _=f.startPTS;if((0,M.isFiniteNumber)(_)){var A=0,x;f.sn>S.sn?(A=_-S.start,x=S):(A=S.start-_,x=f),x.duration!==A&&(x.duration=A)}else if(f.sn>S.sn){var w=S.cc===f.cc;w&&S.minEndPTS?f.start=S.start+(S.minEndPTS-S.start):f.start=S.start+S.duration}else f.start=Math.max(S.start-f.duration,0)}function h(S,f,_,A,x,w){var n=A-_;n<=0&&(P.logger.warn("Fragment should have a positive duration",f),A=_+f.duration,w=x+f.duration);var a=_,r=A,d=f.startPTS,T=f.endPTS;if((0,M.isFiniteNumber)(d)){var b=Math.abs(d-_);(0,M.isFiniteNumber)(f.deltaPTS)?f.deltaPTS=Math.max(b,f.deltaPTS):f.deltaPTS=b,a=Math.max(_,d),_=Math.min(_,d),x=Math.min(x,f.startDTS),r=Math.min(A,T),A=Math.max(A,T),w=Math.max(w,f.endDTS)}f.duration=A-_;var v=_-f.start;f.start=f.startPTS=_,f.maxStartPTS=a,f.startDTS=x,f.endPTS=A,f.minEndPTS=r,f.endDTS=w;var E=f.sn;if(!S||E<S.startSN||E>S.endSN)return 0;var R,C=E-S.startSN,N=S.fragments;for(N[C]=f,R=C;R>0;R--)p(N[R],N[R-1]);for(R=C;R<N.length-1;R++)p(N[R],N[R+1]);return S.fragmentHint&&p(N[N.length-1],S.fragmentHint),S.PTSKnown=S.alignedSliding=!0,v}function g(S,f){for(var _=null,A=S.fragments,x=A.length-1;x>=0;x--){var w=A[x].initSegment;if(w){_=w;break}}S.fragmentHint&&delete S.fragmentHint.endPTS;var n=0,a;if(y(S,f,function(R,C){R.relurl&&(n=R.cc-C.cc),(0,M.isFiniteNumber)(R.startPTS)&&(0,M.isFiniteNumber)(R.endPTS)&&(C.start=C.startPTS=R.startPTS,C.startDTS=R.startDTS,C.appendedPTS=R.appendedPTS,C.maxStartPTS=R.maxStartPTS,C.endPTS=R.endPTS,C.endDTS=R.endDTS,C.minEndPTS=R.minEndPTS,C.duration=R.endPTS-R.startPTS,C.duration&&(a=C),f.PTSKnown=f.alignedSliding=!0),C.elementaryStreams=R.elementaryStreams,C.loader=R.loader,C.stats=R.stats,C.urlId=R.urlId,R.initSegment&&(C.initSegment=R.initSegment,_=R.initSegment)}),_){var r=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments;r.forEach(function(R){var C;(!R.initSegment||R.initSegment.relurl===((C=_)===null||C===void 0?void 0:C.relurl))&&(R.initSegment=_)})}if(f.skippedSegments)if(f.deltaUpdateFailed=f.fragments.some(function(R){return!R}),f.deltaUpdateFailed){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var d=f.skippedSegments;d--;)f.fragments.shift();f.startSN=f.fragments[0].sn,f.startCC=f.fragments[0].cc}else f.canSkipDateRanges&&(f.dateRanges=o(S.dateRanges,f.dateRanges,f.recentlyRemovedDateranges));var T=f.fragments;if(n){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var b=0;b<T.length;b++)T[b].cc+=n}f.skippedSegments&&(f.startCC=f.fragments[0].cc),c(S.partList,f.partList,function(R,C){C.elementaryStreams=R.elementaryStreams,C.stats=R.stats}),a?h(f,a,a.startPTS,a.endPTS,a.startDTS,a.endDTS):u(S,f),T.length&&(f.totalduration=f.edge-T[0].start),f.driftStartTime=S.driftStartTime,f.driftStart=S.driftStart;var v=f.advancedDateTime;if(f.advanced&&v){var E=f.edge;f.driftStart||(f.driftStartTime=v,f.driftStart=E),f.driftEndTime=v,f.driftEnd=E}else f.driftEndTime=S.driftEndTime,f.driftEnd=S.driftEnd,f.advancedDateTime=S.advancedDateTime}function o(S,f,_){var A=e({},S);return _&&_.forEach(function(x){delete A[x]}),Object.keys(f).forEach(function(x){var w=new k.DateRange(f[x].attr,A[x]);w.isValid?A[x]=w:P.logger.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(f[x].attr)+'"')}),A}function c(S,f,_){if(S&&f)for(var A=0,x=0,w=S.length;x<=w;x++){var n=S[x],a=f[x+A];n&&a&&n.index===a.index&&n.fragment.sn===a.fragment.sn?_(n,a):A--}}function y(S,f,_){for(var A=f.skippedSegments,x=Math.max(S.startSN,f.startSN)-f.startSN,w=(S.fragmentHint?1:0)+(A?f.endSN:Math.min(S.endSN,f.endSN))-f.startSN,n=f.startSN-S.startSN,a=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments,r=S.fragmentHint?S.fragments.concat(S.fragmentHint):S.fragments,d=x;d<=w;d++){var T=r[n+d],b=a[d];A&&!b&&d<A&&(b=f.fragments[d]=T),T&&b&&_(T,b)}}function u(S,f){var _=f.startSN+f.skippedSegments-S.startSN,A=S.fragments;_<0||_>=A.length||s(f,A[_].start)}function s(S,f){if(f){for(var _=S.fragments,A=S.skippedSegments;A<_.length;A++)_[A].start+=f;S.fragmentHint&&(S.fragmentHint.start+=f)}}function i(S,f){f===void 0&&(f=1/0);var _=1e3*S.targetduration;if(S.updated){var A=S.fragments,x=4;if(A.length&&_*x>f){var w=A[A.length-1].duration*1e3;w<_&&(_=w)}}else _/=2;return Math.round(_)}function t(S,f,_){if(!S||!S.details)return null;var A=S.details,x=A.fragments[f-A.startSN];return x||(x=A.fragmentHint,x&&x.sn===f)?x:f<A.startSN&&_&&_.sn===f?_:null}function m(S,f,_){if(!S||!S.details)return null;var A=S.details.partList;if(A)for(var x=A.length;x--;){var w=A[x];if(w.index===_&&w.fragment.sn===f)return w}return null}},"./src/controller/stream-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>f});var M=L("./src/polyfills/number.ts"),P=L("./src/controller/base-stream-controller.ts"),k=L("./src/is-supported.ts"),e=L("./src/events.ts"),O=L("./src/utils/buffer-helper.ts"),D=L("./src/controller/fragment-tracker.ts"),l=L("./src/types/loader.ts"),p=L("./src/loader/fragment.ts"),h=L("./src/demux/transmuxer-interface.ts"),g=L("./src/types/transmuxer.ts"),o=L("./src/controller/gap-controller.ts"),c=L("./src/errors.ts");function y(_,A){for(var x=0;x<A.length;x++){var w=A[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,s(w.key),w)}}function u(_,A,x){return A&&y(_.prototype,A),x&&y(_,x),Object.defineProperty(_,"prototype",{writable:!1}),_}function s(_){var A=i(_,"string");return typeof A=="symbol"?A:String(A)}function i(_,A){if(typeof _!="object"||_===null)return _;var x=_[Symbol.toPrimitive];if(x!==void 0){var w=x.call(_,A||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(_)}function t(_,A){_.prototype=Object.create(A.prototype),_.prototype.constructor=_,m(_,A)}function m(_,A){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,n){return w.__proto__=n,w},m(_,A)}var S=100,f=function(_){t(A,_);function A(w,n,a){var r;return r=_.call(this,w,n,a,"[stream-controller]")||this,r.audioCodecSwap=!1,r.gapController=null,r.level=-1,r._forceStartLoad=!1,r.altAudio=!1,r.audioOnly=!1,r.fragPlaying=null,r.onvplaying=null,r.onvseeked=null,r.fragLastKbps=0,r.couldBacktrack=!1,r.backtrackFragment=null,r.audioCodecSwitch=!1,r.videoBuffer=null,r._registerListeners(),r}var x=A.prototype;return x._registerListeners=function(){var n=this.hls;n.on(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(e.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(e.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(e.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.on(e.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.on(e.Events.ERROR,this.onError,this),n.on(e.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.on(e.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.on(e.Events.BUFFER_CREATED,this.onBufferCreated,this),n.on(e.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.on(e.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.on(e.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var n=this.hls;n.off(e.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(e.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(e.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(e.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(e.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.off(e.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.off(e.Events.ERROR,this.onError,this),n.off(e.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.off(e.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.off(e.Events.BUFFER_CREATED,this.onBufferCreated,this),n.off(e.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.off(e.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.off(e.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},x.startLoad=function(n){if(this.levels){var a=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.setInterval(S),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var d=r.startLevel;d===-1&&(r.config.testBandwidth&&this.levels.length>1?(d=0,this.bitrateTest=!0):d=r.nextAutoLevel),this.level=r.nextLoadLevel=d,this.loadedmetadata=!1}a>0&&n===-1&&(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),n=a),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=n,this.tick()}else this._forceStartLoad=!0,this.state=P.State.STOPPED},x.stopLoad=function(){this._forceStartLoad=!1,_.prototype.stopLoad.call(this)},x.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_LEVEL:{var n,a=this.levels,r=this.level,d=a==null||(n=a[r])===null||n===void 0?void 0:n.details;if(d&&(!d.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(d))break;this.state=P.State.IDLE;break}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var T,b=self.performance.now(),v=this.retryDate;(!v||b>=v||(T=this.media)!==null&&T!==void 0&&T.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.level),this.state=P.State.IDLE)}break;default:break}this.onTickEnd()},x.onTickEnd=function(){_.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},x.doTickIdle=function(){var n=this.hls,a=this.levelLastLoaded,r=this.levels,d=this.media,T=n.config,b=n.nextLoadLevel;if(!(a===null||!d&&(this.startFragRequested||!T.startFragPrefetch))&&!(this.altAudio&&this.audioOnly)&&!(!r||!r[b])){var v=r[b],E=this.getMainFwdBufferInfo();if(E!==null){var R=this.getLevelDetails();if(R&&this._streamEnded(E,R)){var C={};this.altAudio&&(C.type="video"),this.hls.trigger(e.Events.BUFFER_EOS,C),this.state=P.State.ENDED;return}this.level=n.nextLoadLevel=b;var N=v.details;if(!N||this.state===P.State.WAITING_LEVEL||N.live&&this.levelLastLoaded!==b){this.level=b,this.state=P.State.WAITING_LEVEL;return}var K=E.len,H=this.getMaxBufferLength(v.maxBitrate);if(!(K>=H)){this.backtrackFragment&&this.backtrackFragment.start>E.end&&(this.backtrackFragment=null);var ee=this.backtrackFragment?this.backtrackFragment.start:E.end,J=this.getNextFragment(ee,N);if(this.couldBacktrack&&!this.fragPrevious&&J&&J.sn!=="initSegment"&&this.fragmentTracker.getState(J)!==D.FragmentState.OK){var se,G=((se=this.backtrackFragment)!=null?se:J).sn,Ee=G-N.startSN,ge=N.fragments[Ee-1];ge&&J.cc===ge.cc&&(J=ge,this.fragmentTracker.removeFragment(ge))}else this.backtrackFragment&&E.len&&(this.backtrackFragment=null);if(J&&this.fragmentTracker.getState(J)===D.FragmentState.OK&&this.nextLoadPosition>ee){var Pe=this.audioOnly&&!this.altAudio?p.ElementaryStreamTypes.AUDIO:p.ElementaryStreamTypes.VIDEO,Ne=(Pe===p.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Ne&&this.afterBufferFlushed(Ne,Pe,l.PlaylistLevelType.MAIN),J=this.getNextFragment(this.nextLoadPosition,N)}J&&(J.initSegment&&!J.initSegment.data&&!this.bitrateTest&&(J=J.initSegment),this.loadFragment(J,N,ee))}}}},x.loadFragment=function(n,a,r){var d,T=this.fragmentTracker.getState(n);this.fragCurrent=n,T===D.FragmentState.NOT_LOADED?n.sn==="initSegment"?this._loadInitSegment(n,a):this.bitrateTest?(this.log("Fragment "+n.sn+" of level "+n.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(n,a)):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,n,a,r)):T===D.FragmentState.APPENDING?this.reduceMaxBufferLength(n.duration)&&this.fragmentTracker.removeFragment(n):((d=this.media)===null||d===void 0?void 0:d.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},x.getAppendedFrag=function(n){var a=this.fragmentTracker.getAppendedFrag(n,l.PlaylistLevelType.MAIN);return a&&"fragment"in a?a.fragment:a},x.getBufferedFrag=function(n){return this.fragmentTracker.getBufferedFrag(n,l.PlaylistLevelType.MAIN)},x.followingBufferedFrag=function(n){return n?this.getBufferedFrag(n.end+.5):null},x.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},x.nextLevelSwitch=function(){var n=this.levels,a=this.media;if(a!=null&&a.readyState){var r,d=this.getAppendedFrag(a.currentTime);if(d&&d.start>1&&this.flushMainBuffer(0,d.start-1),!a.paused&&n){var T=this.hls.nextLoadLevel,b=n[T],v=this.fragLastKbps;v&&this.fragCurrent?r=this.fragCurrent.duration*b.maxBitrate/(1e3*v)+1:r=0}else r=0;var E=this.getBufferedFrag(a.currentTime+r);if(E){var R=this.followingBufferedFrag(E);if(R){this.abortCurrentFrag();var C=R.maxStartPTS?R.maxStartPTS:R.start,N=R.duration,K=Math.max(E.end,C+Math.min(Math.max(N-this.config.maxFragLookUpTolerance,N*.5),N*.75));this.flushMainBuffer(K,Number.POSITIVE_INFINITY)}}}},x.abortCurrentFrag=function(){var n=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,n&&n.abortRequests(),this.state){case P.State.KEY_LOADING:case P.State.FRAG_LOADING:case P.State.FRAG_LOADING_WAITING_RETRY:case P.State.PARSING:case P.State.PARSED:this.state=P.State.IDLE;break}this.nextLoadPosition=this.getLoadPosition()},x.flushMainBuffer=function(n,a){_.prototype.flushMainBuffer.call(this,n,a,this.altAudio?"video":null)},x.onMediaAttached=function(n,a){_.prototype.onMediaAttached.call(this,n,a);var r=a.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new o.default(this.config,r,this.fragmentTracker,this.hls)},x.onMediaDetaching=function(){var n=this.media;n&&this.onvplaying&&this.onvseeked&&(n.removeEventListener("playing",this.onvplaying),n.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),_.prototype.onMediaDetaching.call(this)},x.onMediaPlaying=function(){this.tick()},x.onMediaSeeked=function(){var n=this.media,a=n?n.currentTime:null;(0,M.isFiniteNumber)(a)&&this.log("Media seeked to "+a.toFixed(3)),this.tick()},x.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(e.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null,this.backtrackFragment=null},x.onManifestParsed=function(n,a){var r=!1,d=!1,T;a.levels.forEach(function(b){T=b.audioCodec,T&&(T.indexOf("mp4a.40.2")!==-1&&(r=!0),T.indexOf("mp4a.40.5")!==-1&&(d=!0))}),this.audioCodecSwitch=r&&d&&!(0,k.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=a.levels,this.startFragRequested=!1},x.onLevelLoading=function(n,a){var r=this.levels;if(!(!r||this.state!==P.State.IDLE)){var d=r[a.level];(!d.details||d.details.live&&this.levelLastLoaded!==a.level||this.waitForCdnTuneIn(d.details))&&(this.state=P.State.WAITING_LEVEL)}},x.onLevelLoaded=function(n,a){var r,d=this.levels,T=a.level,b=a.details,v=b.totalduration;if(!d){this.warn("Levels were reset while loading level "+T);return}this.log("Level "+T+" loaded ["+b.startSN+","+b.endSN+"], cc ["+b.startCC+", "+b.endCC+"] duration:"+v);var E=this.fragCurrent;E&&(this.state===P.State.FRAG_LOADING||this.state===P.State.FRAG_LOADING_WAITING_RETRY)&&E.level!==a.level&&E.loader&&(this.state=P.State.IDLE,this.backtrackFragment=null,E.abortRequests());var R=d[T],C=0;if(b.live||(r=R.details)!==null&&r!==void 0&&r.live){if(b.fragments[0]||(b.deltaUpdateFailed=!0),b.deltaUpdateFailed)return;C=this.alignPlaylists(b,R.details)}if(R.details=b,this.levelLastLoaded=T,this.hls.trigger(e.Events.LEVEL_UPDATED,{details:b,level:T}),this.state===P.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(b))return;this.state=P.State.IDLE}this.startFragRequested?b.live&&this.synchronizeToLiveEdge(b):this.setStartPosition(b,C),this.tick()},x._handleFragmentLoadProgress=function(n){var a,r=n.frag,d=n.part,T=n.payload,b=this.levels;if(!b){this.warn("Levels were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered");return}var v=b[r.level],E=v.details;if(!E){this.warn("Dropping fragment "+r.sn+" of level "+r.level+" after level details were reset");return}var R=v.videoCodec,C=E.PTSKnown||!E.live,N=(a=r.initSegment)===null||a===void 0?void 0:a.data,K=this._getAudioCodec(v),H=this.transmuxer=this.transmuxer||new h.default(this.hls,l.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ee=d?d.index:-1,J=ee!==-1,se=new g.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,T.byteLength,ee,J),G=this.initPTS[r.cc];H.push(T,N,K,R,r,d,E.totalduration,C,se,G)},x.onAudioTrackSwitching=function(n,a){var r=this.altAudio,d=!!a.url,T=a.id;if(!d){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var b=this.fragCurrent;b&&(this.log("Switching to main audio track, cancel main fragment load"),b.abortRequests()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var v=this.hls;r&&v.trigger(e.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),v.trigger(e.Events.AUDIO_TRACK_SWITCHED,{id:T})}},x.onAudioTrackSwitched=function(n,a){var r=a.id,d=!!this.hls.audioTracks[r].url;if(d){var T=this.videoBuffer;T&&this.mediaBuffer!==T&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=T)}this.altAudio=d,this.tick()},x.onBufferCreated=function(n,a){var r=a.tracks,d,T,b=!1;for(var v in r){var E=r[v];if(E.id==="main"){if(T=v,d=E,v==="video"){var R=r[v];R&&(this.videoBuffer=R.buffer)}}else b=!0}b&&d?(this.log("Alternate track found, use "+T+".buffered to schedule main fragment loading"),this.mediaBuffer=d.buffer):this.mediaBuffer=this.media},x.onFragBuffered=function(n,a){var r=a.frag,d=a.part;if(!(r&&r.type!==l.PlaylistLevelType.MAIN)){if(this.fragContextChanged(r)){this.warn("Fragment "+r.sn+(d?" p: "+d.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state),this.state===P.State.PARSED&&(this.state=P.State.IDLE);return}var T=d?d.stats:r.stats;this.fragLastKbps=Math.round(8*T.total/(T.buffering.end-T.loading.first)),r.sn!=="initSegment"&&(this.fragPrevious=r),this.fragBufferedComplete(r,d)}},x.onError=function(n,a){if(a.type===c.ErrorTypes.KEY_SYSTEM_ERROR){this.onFragmentOrKeyLoadError(l.PlaylistLevelType.MAIN,a);return}switch(a.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:case c.ErrorDetails.FRAG_PARSING_ERROR:case c.ErrorDetails.KEY_LOAD_ERROR:case c.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.MAIN,a);break;case c.ErrorDetails.LEVEL_LOAD_ERROR:case c.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(a.fatal?(this.warn(""+a.details),this.state=P.State.ERROR):!a.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case c.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var r=!0,d=this.getFwdBufferInfo(this.media,l.PlaylistLevelType.MAIN);d&&d.len>.5&&(r=!this.reduceMaxBufferLength(d.len)),r&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},x.checkBuffer=function(){var n=this.media,a=this.gapController;if(!(!n||!a||!n.readyState)){if(this.loadedmetadata||!O.BufferHelper.getBuffered(n).length){var r=this.state!==P.State.IDLE?this.fragCurrent:null;a.poll(this.lastCurrentTime,r)}this.lastCurrentTime=n.currentTime}},x.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},x.onBufferFlushed=function(n,a){var r=a.type;if(r!==p.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var d=(r===p.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(d,r,l.PlaylistLevelType.MAIN)}},x.onLevelsUpdated=function(n,a){this.levels=a.levels},x.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},x.seekToStartPos=function(){var n=this.media;if(n){var a=n.currentTime,r=this.startPosition;if(r>=0&&a<r){if(n.seeking){this.log("could not seek to "+r+", already seeking at "+a);return}var d=O.BufferHelper.getBuffered(n),T=d.length?d.start(0):0,b=T-r;b>0&&(b<this.config.maxBufferHole||b<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+b+" to match buffer start"),r+=b,this.startPosition=r),this.log("seek to target start position "+r+" from current time "+a),n.currentTime=r}}},x._getAudioCodec=function(n){var a=this.config.defaultAudioCodec||n.audioCodec;return this.audioCodecSwap&&a&&(this.log("Swapping audio codec"),a.indexOf("mp4a.40.5")!==-1?a="mp4a.40.2":a="mp4a.40.5"),a},x._loadBitrateTestFrag=function(n,a){var r=this;n.bitrateTest=!0,this._doFragLoad(n,a).then(function(d){var T=r.hls;if(!(!d||r.fragContextChanged(n))){r.fragLoadError=0,r.state=P.State.IDLE,r.startFragRequested=!1,r.bitrateTest=!1;var b=n.stats;b.parsing.start=b.parsing.end=b.buffering.start=b.buffering.end=self.performance.now(),T.trigger(e.Events.FRAG_LOADED,d),n.bitrateTest=!1}})},x._handleTransmuxComplete=function(n){var a,r="main",d=this.hls,T=n.remuxResult,b=n.chunkMeta,v=this.getCurrentContext(b);if(!v){this.warn("The loading context changed while buffering fragment "+b.sn+" of level "+b.level+". This chunk will not be buffered."),this.resetStartWhenNotLoaded(b.level);return}var E=v.frag,R=v.part,C=v.level,N=T.video,K=T.text,H=T.id3,ee=T.initSegment,J=C.details,se=this.altAudio?void 0:T.audio;if(!this.fragContextChanged(E)){if(this.state=P.State.PARSING,ee){ee.tracks&&(this._bufferInitSegment(C,ee.tracks,E,b),d.trigger(e.Events.FRAG_PARSING_INIT_SEGMENT,{frag:E,id:r,tracks:ee.tracks}));var G=ee.initPTS,Ee=ee.timescale;(0,M.isFiniteNumber)(G)&&(this.initPTS[E.cc]=G,d.trigger(e.Events.INIT_PTS_FOUND,{frag:E,id:r,initPTS:G,timescale:Ee}))}if(N&&T.independent!==!1){if(J){var ge=N.startPTS,Pe=N.endPTS,Ne=N.startDTS,$e=N.endDTS;if(R)R.elementaryStreams[N.type]={startPTS:ge,endPTS:Pe,startDTS:Ne,endDTS:$e};else if(N.firstKeyFrame&&N.independent&&b.id===1&&(this.couldBacktrack=!0),N.dropped&&N.independent){var je=this.getMainFwdBufferInfo(),Ce=(je?je.end:this.getLoadPosition())+this.config.maxBufferHole,fe=N.firstKeyFramePTS?N.firstKeyFramePTS:ge;if(Ce<fe-this.config.maxBufferHole){this.backtrack(E);return}E.setElementaryStreamInfo(N.type,E.start,Pe,E.start,$e,!0)}E.setElementaryStreamInfo(N.type,ge,Pe,Ne,$e),this.backtrackFragment&&(this.backtrackFragment=E),this.bufferFragmentData(N,E,R,b)}}else if(T.independent===!1){this.backtrack(E);return}if(se){var Be=se.startPTS,Ue=se.endPTS,re=se.startDTS,Z=se.endDTS;R&&(R.elementaryStreams[p.ElementaryStreamTypes.AUDIO]={startPTS:Be,endPTS:Ue,startDTS:re,endDTS:Z}),E.setElementaryStreamInfo(p.ElementaryStreamTypes.AUDIO,Be,Ue,re,Z),this.bufferFragmentData(se,E,R,b)}if(J&&H!==null&&H!==void 0&&(a=H.samples)!==null&&a!==void 0&&a.length){var le={id:r,frag:E,details:J,samples:H.samples};d.trigger(e.Events.FRAG_PARSING_METADATA,le)}if(J&&K){var we={id:r,frag:E,details:J,samples:K.samples};d.trigger(e.Events.FRAG_PARSING_USERDATA,we)}}},x._bufferInitSegment=function(n,a,r,d){var T=this;if(this.state===P.State.PARSING){this.audioOnly=!!a.audio&&!a.video,this.altAudio&&!this.audioOnly&&delete a.audio;var b=a.audio,v=a.video,E=a.audiovideo;if(b){var R=n.audioCodec,C=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(R&&(R.indexOf("mp4a.40.5")!==-1?R="mp4a.40.2":R="mp4a.40.5"),b.metadata.channelCount!==1&&C.indexOf("firefox")===-1&&(R="mp4a.40.5")),C.indexOf("android")!==-1&&b.container!=="audio/mpeg"&&(R="mp4a.40.2",this.log("Android: force audio codec to "+R)),n.audioCodec&&n.audioCodec!==R&&this.log('Swapping manifest audio codec "'+n.audioCodec+'" for "'+R+'"'),b.levelCodec=R,b.id="main",this.log("Init audio buffer, container:"+b.container+", codecs[selected/level/parsed]=["+(R||"")+"/"+(n.audioCodec||"")+"/"+b.codec+"]")}v&&(v.levelCodec=n.videoCodec,v.id="main",this.log("Init video buffer, container:"+v.container+", codecs[level/parsed]=["+(n.videoCodec||"")+"/"+v.codec+"]")),E&&this.log("Init audiovideo buffer, container:"+E.container+", codecs[level/parsed]=["+(n.attrs.CODECS||"")+"/"+E.codec+"]"),this.hls.trigger(e.Events.BUFFER_CODECS,a),Object.keys(a).forEach(function(N){var K=a[N],H=K.initSegment;H!=null&&H.byteLength&&T.hls.trigger(e.Events.BUFFER_APPENDING,{type:N,data:H,frag:r,part:null,chunkMeta:d,parent:r.type})}),this.tick()}},x.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,l.PlaylistLevelType.MAIN)},x.backtrack=function(n){this.couldBacktrack=!0,this.backtrackFragment=n,this.resetTransmuxer(),this.flushBufferGap(n),this.fragmentTracker.removeFragment(n),this.fragPrevious=null,this.nextLoadPosition=n.start,this.state=P.State.IDLE},x.checkFragmentChanged=function(){var n=this.media,a=null;if(n&&n.readyState>1&&n.seeking===!1){var r=n.currentTime;if(O.BufferHelper.isBuffered(n,r)?a=this.getAppendedFrag(r):O.BufferHelper.isBuffered(n,r+.1)&&(a=this.getAppendedFrag(r+.1)),a){this.backtrackFragment=null;var d=this.fragPlaying,T=a.level;(!d||a.sn!==d.sn||d.level!==T||a.urlId!==d.urlId)&&(this.fragPlaying=a,this.hls.trigger(e.Events.FRAG_CHANGED,{frag:a}),(!d||d.level!==T)&&this.hls.trigger(e.Events.LEVEL_SWITCHED,{level:T}))}}},u(A,[{key:"nextLevel",get:function(){var n=this.nextBufferedFrag;return n?n.level:-1}},{key:"currentFrag",get:function(){var n=this.media;return n?this.fragPlaying||this.getAppendedFrag(n.currentTime):null}},{key:"currentProgramDateTime",get:function(){var n=this.media;if(n){var a=n.currentTime,r=this.currentFrag;if(r&&(0,M.isFiniteNumber)(a)&&(0,M.isFiniteNumber)(r.programDateTime)){var d=r.programDateTime+(a-r.start)*1e3;return new Date(d)}}return null}},{key:"currentLevel",get:function(){var n=this.currentFrag;return n?n.level:-1}},{key:"nextBufferedFrag",get:function(){var n=this.currentFrag;return n?this.followingBufferedFrag(n):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),A}(P.default)},"./src/controller/subtitle-stream-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{SubtitleStreamController:()=>t});var M=L("./src/events.ts"),P=L("./src/utils/buffer-helper.ts"),k=L("./src/controller/fragment-finders.ts"),e=L("./src/utils/discontinuities.ts"),O=L("./src/controller/level-helper.ts"),D=L("./src/controller/fragment-tracker.ts"),l=L("./src/controller/base-stream-controller.ts"),p=L("./src/types/loader.ts"),h=L("./src/types/level.ts");function g(S,f){for(var _=0;_<f.length;_++){var A=f[_];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(S,c(A.key),A)}}function o(S,f,_){return f&&g(S.prototype,f),_&&g(S,_),Object.defineProperty(S,"prototype",{writable:!1}),S}function c(S){var f=y(S,"string");return typeof f=="symbol"?f:String(f)}function y(S,f){if(typeof S!="object"||S===null)return S;var _=S[Symbol.toPrimitive];if(_!==void 0){var A=_.call(S,f||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(S)}function u(S,f){S.prototype=Object.create(f.prototype),S.prototype.constructor=S,s(S,f)}function s(S,f){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,x){return A.__proto__=x,A},s(S,f)}var i=500,t=function(S){u(f,S);function f(A,x,w){var n;return n=S.call(this,A,x,w,"[subtitle-stream-controller]")||this,n.levels=[],n.currentTrackId=-1,n.tracksBuffered=[],n.mainDetails=null,n._registerListeners(),n}var _=f.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var x=this.hls;x.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(M.Events.ERROR,this.onError,this),x.on(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.on(M.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.on(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.on(M.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),x.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_._unregisterListeners=function(){var x=this.hls;x.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(M.Events.ERROR,this.onError,this),x.off(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.off(M.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.off(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.off(M.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),x.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_.startLoad=function(x){this.stopLoad(),this.state=l.State.IDLE,this.setInterval(i),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},_.onLevelLoaded=function(x,w){this.mainDetails=w.details},_.onSubtitleFragProcessed=function(x,w){var n=w.frag,a=w.success;if(this.fragPrevious=n,this.state=l.State.IDLE,!!a){var r=this.tracksBuffered[this.currentTrackId];if(r){for(var d,T=n.start,b=0;b<r.length;b++)if(T>=r[b].start&&T<=r[b].end){d=r[b];break}var v=n.start+n.duration;d?d.end=v:(d={start:T,end:v},r.push(d)),this.fragmentTracker.fragBuffered(n)}}},_.onBufferFlushing=function(x,w){var n=w.startOffset,a=w.endOffset;if(n===0&&a!==Number.POSITIVE_INFINITY){var r=this.currentTrackId,d=this.levels;if(!d.length||!d[r]||!d[r].details)return;var T=d[r].details,b=T.targetduration,v=a-b;if(v<=0)return;w.endOffsetSubtitles=Math.max(0,v),this.tracksBuffered.forEach(function(E){for(var R=0;R<E.length;){if(E[R].end<=v){E.shift();continue}else if(E[R].start<v)E[R].start=v;else break;R++}}),this.fragmentTracker.removeFragmentsInRange(n,v,p.PlaylistLevelType.SUBTITLE)}},_.onFragBuffered=function(x,w){if(!this.loadedmetadata&&w.frag.type===p.PlaylistLevelType.MAIN){var n;(n=this.media)!==null&&n!==void 0&&n.buffered.length&&(this.loadedmetadata=!0)}},_.onError=function(x,w){var n=w.frag;!n||n.type!==p.PlaylistLevelType.SUBTITLE||(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state=l.State.IDLE)},_.onSubtitleTracksUpdated=function(x,w){var n=this,a=w.subtitleTracks;this.tracksBuffered=[],this.levels=a.map(function(r){return new h.Level(r)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(r){n.tracksBuffered[r.id]=[]}),this.mediaBuffer=null},_.onSubtitleTrackSwitch=function(x,w){if(this.currentTrackId=w.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var n=this.levels[this.currentTrackId];n!=null&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval(i)},_.onSubtitleTrackLoaded=function(x,w){var n,a=w.details,r=w.id,d=this.currentTrackId,T=this.levels;if(T.length){var b=T[d];if(!(r>=T.length||r!==d||!b)){this.mediaBuffer=this.mediaBufferTimeRanges;var v=0;if(a.live||(n=b.details)!==null&&n!==void 0&&n.live){var E=this.mainDetails;if(a.deltaUpdateFailed||!E)return;var R=E.fragments[0];b.details?(v=this.alignPlaylists(a,b.details),v===0&&R&&(v=R.start,(0,O.addSliding)(a,v))):a.hasProgramDateTime&&E.hasProgramDateTime?((0,e.alignMediaPlaylistByPDT)(a,E),v=a.fragments[0].start):R&&(v=R.start,(0,O.addSliding)(a,v))}if(b.details=a,this.levelLastLoaded=r,!this.startFragRequested&&(this.mainDetails||!a.live)&&this.setStartPosition(b.details,v),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===l.State.IDLE){var C=(0,k.findFragmentByPTS)(null,a.fragments,this.media.currentTime,0);C||(this.warn("Subtitle playlist not aligned with playback"),b.details=void 0)}}}},_._handleFragmentLoadComplete=function(x){var w=this,n=x.frag,a=x.payload,r=n.decryptdata,d=this.hls;if(!this.fragContextChanged(n)&&a&&a.byteLength>0&&r&&r.key&&r.iv&&r.method==="AES-128"){var T=performance.now();this.decrypter.decrypt(new Uint8Array(a),r.key.buffer,r.iv.buffer).then(function(b){var v=performance.now();d.trigger(M.Events.FRAG_DECRYPTED,{frag:n,payload:b,stats:{tstart:T,tdecrypt:v}})}).catch(function(b){w.warn(b.name+": "+b.message),w.state=l.State.IDLE})}},_.doTick=function(){if(!this.media){this.state=l.State.IDLE;return}if(this.state===l.State.IDLE){var x=this.currentTrackId,w=this.levels;if(!w.length||!w[x]||!w[x].details)return;var n=w[x].details,a=n.targetduration,r=this.config,d=this.getLoadPosition(),T=P.BufferHelper.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],d-a,r.maxBufferHole),b=T.end,v=T.len,E=this.getFwdBufferInfo(this.media,p.PlaylistLevelType.MAIN),R=this.getMaxBufferLength(E==null?void 0:E.len)+a;if(v>R)return;console.assert(n,"Subtitle track details are defined on idle subtitle stream controller tick");var C=n.fragments,N=C.length,K=n.edge,H=null,ee=this.fragPrevious;if(b<K){var J=r.maxFragLookUpTolerance;H=(0,k.findFragmentByPTS)(ee,C,Math.max(C[0].start,b),J),!H&&ee&&ee.start<C[0].start&&(H=C[0])}else H=C[N-1];if(!H)return;H=this.mapToInitFragWhenRequired(H),this.fragmentTracker.getState(H)===D.FragmentState.NOT_LOADED&&this.loadFragment(H,n,b)}},_.getMaxBufferLength=function(x){var w=S.prototype.getMaxBufferLength.call(this);return x?Math.max(w,x):w},_.loadFragment=function(x,w,n){this.fragCurrent=x,x.sn==="initSegment"?this._loadInitSegment(x,w):(this.startFragRequested=!0,S.prototype.loadFragment.call(this,x,w,n))},o(f,[{key:"mediaBufferTimeRanges",get:function(){return new m(this.tracksBuffered[this.currentTrackId]||[])}}]),f}(l.default),m=function(f){this.buffered=void 0;var _=function(x,w,n){if(w=w>>>0,w>n-1)throw new DOMException("Failed to execute '"+x+"' on 'TimeRanges': The index provided ("+w+") is greater than the maximum bound ("+n+")");return f[w][x]};this.buffered={get length(){return f.length},end:function(x){return _("end",x,f.length)},start:function(x){return _("start",x,f.length)}}}},"./src/controller/subtitle-track-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>y});var M=L("./src/events.ts"),P=L("./src/utils/texttrack-utils.ts"),k=L("./src/controller/base-playlist-controller.ts"),e=L("./src/types/loader.ts");function O(u,s){for(var i=0;i<s.length;i++){var t=s[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(u,l(t.key),t)}}function D(u,s,i){return s&&O(u.prototype,s),i&&O(u,i),Object.defineProperty(u,"prototype",{writable:!1}),u}function l(u){var s=p(u,"string");return typeof s=="symbol"?s:String(s)}function p(u,s){if(typeof u!="object"||u===null)return u;var i=u[Symbol.toPrimitive];if(i!==void 0){var t=i.call(u,s||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(u)}function h(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,g(u,s)}function g(u,s){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,m){return t.__proto__=m,t},g(u,s)}var o=function(u){h(s,u);function s(t){var m;return m=u.call(this,t,"[subtitle-track-controller]")||this,m.media=null,m.tracks=[],m.groupId=null,m.tracksInGroup=[],m.trackId=-1,m.selectDefaultTrack=!0,m.queuedDefaultTrack=-1,m.trackChangeListener=function(){return m.onTextTracksChanged()},m.asyncPollTrackChange=function(){return m.pollTrackChange(0)},m.useTextTrackPolling=!1,m.subtitlePollingInterval=-1,m._subtitleDisplay=!0,m.registerListeners(),m}var i=s.prototype;return i.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,u.prototype.destroy.call(this)},i.registerListeners=function(){var m=this.hls;m.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),m.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),m.on(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),m.on(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),m.on(M.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var m=this.hls;m.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),m.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),m.off(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),m.off(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),m.off(M.Events.ERROR,this.onError,this)},i.onMediaAttached=function(m,S){this.media=S.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},i.pollTrackChange=function(m){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,m)},i.onMediaDetaching=function(){if(this.media){self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var m=c(this.media.textTracks);m.forEach(function(S){(0,P.clearCurrentCues)(S)}),this.subtitleTrack=-1,this.media=null}},i.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},i.onManifestParsed=function(m,S){this.tracks=S.subtitleTracks},i.onSubtitleTrackLoaded=function(m,S){var f=S.id,_=S.details,A=this.trackId,x=this.tracksInGroup[A];if(!x){this.warn("Invalid subtitle track id "+f);return}var w=x.details;x.details=S.details,this.log("subtitle track "+f+" loaded ["+_.startSN+"-"+_.endSN+"]"),f===this.trackId&&(this.retryCount=0,this.playlistLoaded(f,S,w))},i.onLevelLoading=function(m,S){this.switchLevel(S.level)},i.onLevelSwitching=function(m,S){this.switchLevel(S.level)},i.switchLevel=function(m){var S=this.hls.levels[m];if(S!=null&&S.textGroupIds){var f=S.textGroupIds[S.urlId];if(this.groupId!==f){var _=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,A=this.tracks.filter(function(n){return!f||n.groupId===f});this.tracksInGroup=A;var x=this.findTrackId(_==null?void 0:_.name)||this.findTrackId();this.groupId=f;var w={subtitleTracks:A};this.log("Updating subtitle tracks, "+A.length+' track(s) found in "'+f+'" group-id'),this.hls.trigger(M.Events.SUBTITLE_TRACKS_UPDATED,w),x!==-1&&this.setSubtitleTrack(x,_)}}},i.findTrackId=function(m){for(var S=this.tracksInGroup,f=0;f<S.length;f++){var _=S[f];if((!this.selectDefaultTrack||_.default)&&(!m||m===_.name))return _.id}return-1},i.onError=function(m,S){u.prototype.onError.call(this,m,S),!(S.fatal||!S.context)&&S.context.type===e.PlaylistContextType.SUBTITLE_TRACK&&S.context.id===this.trackId&&S.context.groupId===this.groupId&&this.retryLoadingOrFail(S)},i.loadPlaylist=function(m){u.prototype.loadPlaylist.call(this);var S=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(S)){var f=S.id,_=S.groupId,A=S.url;if(m)try{A=m.addDirectives(A)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Loading subtitle playlist for id "+f),this.hls.trigger(M.Events.SUBTITLE_TRACK_LOADING,{url:A,id:f,groupId:_,deliveryDirectives:m||null})}},i.toggleTrackModes=function(m){var S=this,f=this.media,_=this.trackId;if(f){var A=c(f.textTracks),x=A.filter(function(a){return a.groupId===S.groupId});if(m===-1)[].slice.call(A).forEach(function(a){a.mode="disabled"});else{var w=x[_];w&&(w.mode="disabled")}var n=x[m];n&&(n.mode=this.subtitleDisplay?"showing":"hidden")}},i.setSubtitleTrack=function(m,S){var f,_=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=m;return}if(this.trackId!==m&&this.toggleTrackModes(m),!(this.trackId===m&&(m===-1||(f=_[m])!==null&&f!==void 0&&f.details)||m<-1||m>=_.length)){this.clearTimer();var A=_[m];if(this.log("Switching to subtitle track "+m),this.trackId=m,A){var x=A.id,w=A.groupId,n=w===void 0?"":w,a=A.name,r=A.type,d=A.url;this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:x,groupId:n,name:a,type:r,url:d});var T=this.switchParams(A.url,S==null?void 0:S.details);this.loadPlaylist(T)}else this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:m})}},i.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!(!this.media||!this.hls.config.renderTextTracksNatively)){for(var m=-1,S=c(this.media.textTracks),f=0;f<S.length;f++)if(S[f].mode==="hidden")m=f;else if(S[f].mode==="showing"){m=f;break}this.subtitleTrack!==m&&(this.subtitleTrack=m)}},D(s,[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(m){this._subtitleDisplay=m,this.trackId>-1&&this.toggleTrackModes(this.trackId)}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(m){this.selectDefaultTrack=!1;var S=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(m,S)}}]),s}(k.default);function c(u){for(var s=[],i=0;i<u.length;i++){var t=u[i];(t.kind==="subtitles"||t.kind==="captions")&&t.label&&s.push(u[i])}return s}const y=o},"./src/controller/timeline-controller.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{TimelineController:()=>o});var M=L("./src/polyfills/number.ts"),P=L("./src/events.ts"),k=L("./src/utils/cea-608-parser.ts"),e=L("./src/utils/output-filter.ts"),O=L("./src/utils/webvtt-parser.ts"),D=L("./src/utils/texttrack-utils.ts"),l=L("./src/utils/imsc1-ttml-parser.ts"),p=L("./src/utils/mp4-tools.ts"),h=L("./src/types/loader.ts"),g=L("./src/utils/logger.ts"),o=function(){function s(t){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=u(),this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var m=new e.default(this,"textTrack1"),S=new e.default(this,"textTrack2"),f=new e.default(this,"textTrack3"),_=new e.default(this,"textTrack4");this.cea608Parser1=new k.default(1,m,S),this.cea608Parser2=new k.default(3,f,_)}t.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(P.Events.FRAG_LOADING,this.onFragLoading,this),t.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=s.prototype;return i.destroy=function(){var m=this.hls;m.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),m.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),m.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),m.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),m.off(P.Events.FRAG_LOADING,this.onFragLoading,this),m.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),m.off(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),m.off(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),m.off(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),m.off(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),m.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(m,S,f,_,A){for(var x=!1,w=A.length;w--;){var n=A[w],a=y(n[0],n[1],S,f);if(a>=0&&(n[0]=Math.min(n[0],S),n[1]=Math.max(n[1],f),x=!0,a/(f-S)>.5))return}if(x||A.push([S,f]),this.config.renderTextTracksNatively){var r=this.captionsTracks[m];this.Cues.newCue(r,S,f,_)}else{var d=this.Cues.newCue(null,S,f,_);this.hls.trigger(P.Events.CUES_PARSED,{type:"captions",cues:d,track:m})}},i.onInitPtsFound=function(m,S){var f=this,_=S.frag,A=S.id,x=S.initPTS,w=S.timescale,n=this.unparsedVttFrags;A==="main"&&(this.initPTS[_.cc]=x,this.timescale[_.cc]=w),n.length&&(this.unparsedVttFrags=[],n.forEach(function(a){f.onFragLoaded(P.Events.FRAG_LOADED,a)}))},i.getExistingTrack=function(m){var S=this.media;if(S)for(var f=0;f<S.textTracks.length;f++){var _=S.textTracks[f];if(_[m])return _}return null},i.createCaptionsTrack=function(m){this.config.renderTextTracksNatively?this.createNativeTrack(m):this.createNonNativeTrack(m)},i.createNativeTrack=function(m){if(!this.captionsTracks[m]){var S=this.captionsProperties,f=this.captionsTracks,_=this.media,A=S[m],x=A.label,w=A.languageCode,n=this.getExistingTrack(m);if(n)f[m]=n,(0,D.clearCurrentCues)(f[m]),(0,D.sendAddTrackEvent)(f[m],_);else{var a=this.createTextTrack("captions",x,w);a&&(a[m]=!0,f[m]=a)}}},i.createNonNativeTrack=function(m){if(!this.nonNativeCaptionsTracks[m]){var S=this.captionsProperties[m];if(S){var f=S.label,_={_id:m,label:f,kind:"captions",default:S.media?!!S.media.default:!1,closedCaptions:S.media};this.nonNativeCaptionsTracks[m]=_,this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[_]})}}},i.createTextTrack=function(m,S,f){var _=this.media;if(_)return _.addTextTrack(m,S,f)},i.onMediaAttaching=function(m,S){this.media=S.media,this._cleanTracks()},i.onMediaDetaching=function(){var m=this.captionsTracks;Object.keys(m).forEach(function(S){(0,D.clearCurrentCues)(m[S]),delete m[S]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=u(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},i._cleanTracks=function(){var m=this.media;if(m){var S=m.textTracks;if(S)for(var f=0;f<S.length;f++)(0,D.clearCurrentCues)(S[f])}},i.onSubtitleTracksUpdated=function(m,S){var f=this;this.textTracks=[];var _=S.subtitleTracks||[],A=_.some(function(a){return a.textCodec===l.IMSC1_CODEC});if(this.config.enableWebVTT||A&&this.config.enableIMSC1){var x=this.tracks&&_&&this.tracks.length===_.length;if(this.tracks=_||[],this.config.renderTextTracksNatively){var w=this.media?this.media.textTracks:[];this.tracks.forEach(function(a,r){var d;if(r<w.length){for(var T=null,b=0;b<w.length;b++)if(c(w[b],a)){T=w[b];break}T&&(d=T)}if(d)(0,D.clearCurrentCues)(d);else{var v=f._captionsOrSubtitlesFromCharacteristics(a);d=f.createTextTrack(v,a.name,a.lang),d&&(d.mode="disabled")}d&&(d.groupId=a.groupId,f.textTracks.push(d))})}else if(!x&&this.tracks&&this.tracks.length){var n=this.tracks.map(function(a){return{label:a.name,kind:a.type.toLowerCase(),default:a.default,subtitleTrack:a}});this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:n})}}},i._captionsOrSubtitlesFromCharacteristics=function(m){var S;if((S=m.attrs)!==null&&S!==void 0&&S.CHARACTERISTICS){var f=/transcribes-spoken-dialog/gi.test(m.attrs.CHARACTERISTICS),_=/describes-music-and-sound/gi.test(m.attrs.CHARACTERISTICS);if(f&&_)return"captions"}return"subtitles"},i.onManifestLoaded=function(m,S){var f=this;this.config.enableCEA708Captions&&S.captions&&S.captions.forEach(function(_){var A=/(?:CC|SERVICE)([1-4])/.exec(_.instreamId);if(A){var x="textTrack"+A[1],w=f.captionsProperties[x];w&&(w.label=_.name,_.lang&&(w.languageCode=_.lang),w.media=_)}})},i.closedCaptionsForLevel=function(m){var S=this.hls.levels[m.level];return S==null?void 0:S.attrs["CLOSED-CAPTIONS"]},i.onFragLoading=function(m,S){var f=this.cea608Parser1,_=this.cea608Parser2,A=this.lastSn,x=this.lastPartIndex;if(!(!this.enabled||!(f&&_))&&S.frag.type===h.PlaylistLevelType.MAIN){var w,n,a=S.frag.sn,r=(w=S==null||(n=S.part)===null||n===void 0?void 0:n.index)!=null?w:-1;a===A+1||a===A&&r===x+1||(f.reset(),_.reset()),this.lastSn=a,this.lastPartIndex=r}},i.onFragLoaded=function(m,S){var f=S.frag,_=S.payload,A=this.initPTS,x=this.unparsedVttFrags;if(f.type===h.PlaylistLevelType.SUBTITLE)if(_.byteLength){if(!(0,M.isFiniteNumber)(A[f.cc])){x.push(S),A.length&&this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f,error:new Error("Missing initial subtitle PTS")});return}var w=f.decryptdata,n="stats"in S;if(w==null||!w.encrypted||n){var a=this.tracks[f.level],r=this.vttCCs;r[f.cc]||(r[f.cc]={start:f.start,prevCC:this.prevCC,new:!0},this.prevCC=f.cc),a&&a.textCodec===l.IMSC1_CODEC?this._parseIMSC1(f,_):this._parseVTTs(f,_,r)}}else this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(m,S){var f=this,_=this.hls;(0,l.parseIMSC1)(S,this.initPTS[m.cc],this.timescale[m.cc],function(A){f._appendCues(A,m.level),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:m})},function(A){g.logger.log("Failed to parse IMSC1: "+A),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:m,error:A})})},i._parseVTTs=function(m,S,f){var _,A=this,x=this.hls,w=(_=m.initSegment)!==null&&_!==void 0&&_.data?(0,p.appendUint8Array)(m.initSegment.data,new Uint8Array(S)):S;(0,O.parseWebVTT)(w,this.initPTS[m.cc],this.timescale[m.cc],f,m.cc,m.start,function(n){A._appendCues(n,m.level),x.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:m})},function(n){A._fallbackToIMSC1(m,S),g.logger.log("Failed to parse VTT cue: "+n),x.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:m,error:n})})},i._fallbackToIMSC1=function(m,S){var f=this,_=this.tracks[m.level];_.textCodec||(0,l.parseIMSC1)(S,this.initPTS[m.cc],this.timescale[m.cc],function(){_.textCodec=l.IMSC1_CODEC,f._parseIMSC1(m,S)},function(){_.textCodec="wvtt"})},i._appendCues=function(m,S){var f=this.hls;if(this.config.renderTextTracksNatively){var _=this.textTracks[S];if(!_||_.mode==="disabled")return;m.forEach(function(w){return(0,D.addCueToTrack)(_,w)})}else{var A=this.tracks[S];if(!A)return;var x=A.default?"default":"subtitles"+S;f.trigger(P.Events.CUES_PARSED,{type:"subtitles",cues:m,track:x})}},i.onFragDecrypted=function(m,S){var f=S.frag;if(f.type===h.PlaylistLevelType.SUBTITLE){if(!(0,M.isFiniteNumber)(this.initPTS[f.cc])){this.unparsedVttFrags.push(S);return}this.onFragLoaded(P.Events.FRAG_LOADED,S)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(m,S){var f=this.cea608Parser1,_=this.cea608Parser2;if(!(!this.enabled||!(f&&_))){var A=S.frag,x=S.samples;if(!(A.type===h.PlaylistLevelType.MAIN&&this.closedCaptionsForLevel(A)==="NONE"))for(var w=0;w<x.length;w++){var n=x[w].bytes;if(n){var a=this.extractCea608Data(n);f.addData(x[w].pts,a[0]),_.addData(x[w].pts,a[1])}}}},i.onBufferFlushing=function(m,S){var f=S.startOffset,_=S.endOffset,A=S.endOffsetSubtitles,x=S.type,w=this.media;if(!(!w||w.currentTime<_)){if(!x||x==="video"){var n=this.captionsTracks;Object.keys(n).forEach(function(r){return(0,D.removeCuesInRange)(n[r],f,_)})}if(this.config.renderTextTracksNatively&&f===0&&A!==void 0){var a=this.textTracks;Object.keys(a).forEach(function(r){return(0,D.removeCuesInRange)(a[r],f,A)})}}},i.extractCea608Data=function(m){for(var S=[[],[]],f=m[0]&31,_=2,A=0;A<f;A++){var x=m[_++],w=127&m[_++],n=127&m[_++];if(!(w===0&&n===0)){var a=(4&x)!==0;if(a){var r=3&x;(r===0||r===1)&&(S[r].push(w),S[r].push(n))}}}return S},s}();function c(s,i){return s&&s.label===i.name&&!(s.textTrack1||s.textTrack2)}function y(s,i,t,m){return Math.min(i,m)-Math.max(s,t)}function u(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}},"./src/crypt/aes-crypto.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>M});var M=function(){function P(e,O){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=O}var k=P.prototype;return k.decrypt=function(O,D){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},D,O)},P}()},"./src/crypt/aes-decryptor.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>k,removePadding:()=>P});var M=L("./src/utils/typed-array.ts");function P(e){var O=e.byteLength,D=O&&new DataView(e.buffer).getUint8(O-1);return D?(0,M.sliceUint8)(e,0,O-D):e}var k=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var O=e.prototype;return O.uint8ArrayToUint32Array_=function(l){for(var p=new DataView(l),h=new Uint32Array(4),g=0;g<4;g++)h[g]=p.getUint32(g*4);return h},O.initTable=function(){var l=this.sBox,p=this.invSBox,h=this.subMix,g=h[0],o=h[1],c=h[2],y=h[3],u=this.invSubMix,s=u[0],i=u[1],t=u[2],m=u[3],S=new Uint32Array(256),f=0,_=0,A=0;for(A=0;A<256;A++)A<128?S[A]=A<<1:S[A]=A<<1^283;for(A=0;A<256;A++){var x=_^_<<1^_<<2^_<<3^_<<4;x=x>>>8^x&255^99,l[f]=x,p[x]=f;var w=S[f],n=S[w],a=S[n],r=S[x]*257^x*16843008;g[f]=r<<24|r>>>8,o[f]=r<<16|r>>>16,c[f]=r<<8|r>>>24,y[f]=r,r=a*16843009^n*65537^w*257^f*16843008,s[x]=r<<24|r>>>8,i[x]=r<<16|r>>>16,t[x]=r<<8|r>>>24,m[x]=r,f?(f=w^S[S[S[a^w]]],_^=S[S[_]]):f=_=1}},O.expandKey=function(l){for(var p=this.uint8ArrayToUint32Array_(l),h=!0,g=0;g<p.length&&h;)h=p[g]===this.key[g],g++;if(!h){this.key=p;var o=this.keySize=p.length;if(o!==4&&o!==6&&o!==8)throw new Error("Invalid aes key size="+o);var c=this.ksRows=(o+6+1)*4,y,u,s=this.keySchedule=new Uint32Array(c),i=this.invKeySchedule=new Uint32Array(c),t=this.sBox,m=this.rcon,S=this.invSubMix,f=S[0],_=S[1],A=S[2],x=S[3],w,n;for(y=0;y<c;y++){if(y<o){w=s[y]=p[y];continue}n=w,y%o===0?(n=n<<8|n>>>24,n=t[n>>>24]<<24|t[n>>>16&255]<<16|t[n>>>8&255]<<8|t[n&255],n^=m[y/o|0]<<24):o>6&&y%o===4&&(n=t[n>>>24]<<24|t[n>>>16&255]<<16|t[n>>>8&255]<<8|t[n&255]),s[y]=w=(s[y-o]^n)>>>0}for(u=0;u<c;u++)y=c-u,u&3?n=s[y]:n=s[y-4],u<4||y<=4?i[u]=n:i[u]=f[t[n>>>24]]^_[t[n>>>16&255]]^A[t[n>>>8&255]]^x[t[n&255]],i[u]=i[u]>>>0}},O.networkToHostOrderSwap=function(l){return l<<24|(l&65280)<<8|(l&16711680)>>8|l>>>24},O.decrypt=function(l,p,h){for(var g=this.keySize+6,o=this.invKeySchedule,c=this.invSBox,y=this.invSubMix,u=y[0],s=y[1],i=y[2],t=y[3],m=this.uint8ArrayToUint32Array_(h),S=m[0],f=m[1],_=m[2],A=m[3],x=new Int32Array(l),w=new Int32Array(x.length),n,a,r,d,T,b,v,E,R,C,N,K,H,ee,J=this.networkToHostOrderSwap;p<x.length;){for(R=J(x[p]),C=J(x[p+1]),N=J(x[p+2]),K=J(x[p+3]),T=R^o[0],b=K^o[1],v=N^o[2],E=C^o[3],H=4,ee=1;ee<g;ee++)n=u[T>>>24]^s[b>>16&255]^i[v>>8&255]^t[E&255]^o[H],a=u[b>>>24]^s[v>>16&255]^i[E>>8&255]^t[T&255]^o[H+1],r=u[v>>>24]^s[E>>16&255]^i[T>>8&255]^t[b&255]^o[H+2],d=u[E>>>24]^s[T>>16&255]^i[b>>8&255]^t[v&255]^o[H+3],T=n,b=a,v=r,E=d,H=H+4;n=c[T>>>24]<<24^c[b>>16&255]<<16^c[v>>8&255]<<8^c[E&255]^o[H],a=c[b>>>24]<<24^c[v>>16&255]<<16^c[E>>8&255]<<8^c[T&255]^o[H+1],r=c[v>>>24]<<24^c[E>>16&255]<<16^c[T>>8&255]<<8^c[b&255]^o[H+2],d=c[E>>>24]<<24^c[T>>16&255]<<16^c[b>>8&255]<<8^c[v&255]^o[H+3],w[p]=J(n^S),w[p+1]=J(d^f),w[p+2]=J(r^_),w[p+3]=J(a^A),S=R,f=C,_=N,A=K,p=p+4}return w.buffer},e}()},"./src/crypt/decrypter.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>p});var M=L("./src/crypt/aes-crypto.ts"),P=L("./src/crypt/fast-aes-key.ts"),k=L("./src/crypt/aes-decryptor.ts"),e=L("./src/utils/logger.ts"),O=L("./src/utils/mp4-tools.ts"),D=L("./src/utils/typed-array.ts"),l=16,p=function(){function h(o,c){var y=c===void 0?{}:c,u=y.removePKCS7Padding,s=u===void 0?!0:u;if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=o.enableSoftwareAES,this.removePKCS7Padding=s,s)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch(t){}this.subtle===null&&(this.useSoftware=!0)}var g=h.prototype;return g.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},g.isSync=function(){return this.useSoftware},g.flush=function(){var c=this.currentResult,y=this.remainderData;if(!c||y)return this.reset(),null;var u=new Uint8Array(c);return this.reset(),this.removePKCS7Padding?(0,k.removePadding)(u):u},g.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},g.decrypt=function(c,y,u){var s=this;return this.useSoftware?new Promise(function(i,t){s.softwareDecrypt(new Uint8Array(c),y,u);var m=s.flush();m?i(m.buffer):t(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(c),y,u)},g.softwareDecrypt=function(c,y,u){var s=this.currentIV,i=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(c=(0,O.appendUint8Array)(t,c),this.remainderData=null);var m=this.getValidChunk(c);if(!m.length)return null;s&&(u=s);var S=this.softwareDecrypter;S||(S=this.softwareDecrypter=new k.default),S.expandKey(y);var f=i;return this.currentResult=S.decrypt(m.buffer,0,u),this.currentIV=(0,D.sliceUint8)(m,-16).buffer,f||null},g.webCryptoDecrypt=function(c,y,u){var s=this,i=this.subtle;return(this.key!==y||!this.fastAesKey)&&(this.key=y,this.fastAesKey=new P.default(i,y)),this.fastAesKey.expandKey().then(function(t){if(!i)return Promise.reject(new Error("web crypto not initialized"));s.logOnce("WebCrypto AES decrypt");var m=new M.default(i,new Uint8Array(u));return m.decrypt(c.buffer,t)}).catch(function(t){return e.logger.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+t.name+": "+t.message),s.onWebCryptoError(c,y,u)})},g.onWebCryptoError=function(c,y,u){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(c,y,u);var s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},g.getValidChunk=function(c){var y=c,u=c.length-c.length%l;return u!==c.length&&(y=(0,D.sliceUint8)(c,0,u),this.remainderData=(0,D.sliceUint8)(c,u)),y},g.logOnce=function(c){this.logEnabled&&(e.logger.log("[decrypter]: "+c),this.logEnabled=!1)},h}()},"./src/crypt/fast-aes-key.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>M});var M=function(){function P(e,O){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=O}var k=P.prototype;return k.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},P}()},"./src/demux/aacdemuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>p});var M=L("./src/demux/base-audio-demuxer.ts"),P=L("./src/demux/adts.ts"),k=L("./src/utils/logger.ts"),e=L("./src/demux/id3.ts");function O(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,D(h,g)}function D(h,g){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,y){return c.__proto__=y,c},D(h,g)}var l=function(h){O(g,h);function g(c,y){var u;return u=h.call(this)||this,u.observer=void 0,u.config=void 0,u.observer=c,u.config=y,u}var o=g.prototype;return o.resetInitSegment=function(y,u,s,i){h.prototype.resetInitSegment.call(this,y,u,s,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:u,duration:i,inputTimeScale:9e4,dropped:0}},g.probe=function(y){if(!y)return!1;for(var u=e.getID3Data(y,0)||[],s=u.length,i=y.length;s<i;s++)if(P.probe(y,s))return k.logger.log("ADTS sync word found !"),!0;return!1},o.canParse=function(y,u){return P.canParse(y,u)},o.appendFrame=function(y,u,s){P.initTrackConfig(y,this.observer,u,s,y.manifestCodec);var i=P.appendFrame(y,u,s,this.basePTS,this.frameIndex);if(i&&i.missing===0)return i},g}(M.default);const p=l},"./src/demux/adts.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{appendFrame:()=>s,canGetFrameLength:()=>p,canParse:()=>g,getAudioConfig:()=>e,getFrameDuration:()=>y,getFullFrameLength:()=>l,getHeaderLength:()=>D,initTrackConfig:()=>c,isHeader:()=>h,isHeaderPattern:()=>O,parseFrameHeader:()=>u,probe:()=>o});var M=L("./src/utils/logger.ts"),P=L("./src/errors.ts"),k=L("./src/events.ts");function e(i,t,m,S){var f,_,A,x,w=navigator.userAgent.toLowerCase(),n=S,a=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];f=((t[m+2]&192)>>>6)+1;var r=(t[m+2]&60)>>>2;if(r>a.length-1){i.trigger(k.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+r});return}return A=(t[m+2]&1)<<2,A|=(t[m+3]&192)>>>6,M.logger.log("manifest codec:"+S+", ADTS type:"+f+", samplingIndex:"+r),/firefox/i.test(w)?r>=6?(f=5,x=new Array(4),_=r-3):(f=2,x=new Array(2),_=r):w.indexOf("android")!==-1?(f=2,x=new Array(2),_=r):(f=5,x=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&r>=6?_=r-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(r>=6&&A===1||/vivaldi/i.test(w))||!S&&A===1)&&(f=2,x=new Array(2)),_=r)),x[0]=f<<3,x[0]|=(r&14)>>1,x[1]|=(r&1)<<7,x[1]|=A<<3,f===5&&(x[1]|=(_&14)>>1,x[2]=(_&1)<<7,x[2]|=8,x[3]=0),{config:x,samplerate:a[r],channelCount:A,codec:"mp4a.40."+f,manifestCodec:n}}function O(i,t){return i[t]===255&&(i[t+1]&246)===240}function D(i,t){return i[t+1]&1?7:9}function l(i,t){return(i[t+3]&3)<<11|i[t+4]<<3|(i[t+5]&224)>>>5}function p(i,t){return t+5<i.length}function h(i,t){return t+1<i.length&&O(i,t)}function g(i,t){return p(i,t)&&O(i,t)&&l(i,t)<=i.length-t}function o(i,t){if(h(i,t)){var m=D(i,t);if(t+m>=i.length)return!1;var S=l(i,t);if(S<=m)return!1;var f=t+S;return f===i.length||h(i,f)}return!1}function c(i,t,m,S,f){if(!i.samplerate){var _=e(t,m,S,f);if(!_)return;i.config=_.config,i.samplerate=_.samplerate,i.channelCount=_.channelCount,i.codec=_.codec,i.manifestCodec=_.manifestCodec,M.logger.log("parsed codec:"+i.codec+", rate:"+_.samplerate+", channels:"+_.channelCount)}}function y(i){return 9216e4/i}function u(i,t){var m=D(i,t);if(t+m<=i.length){var S=l(i,t)-m;if(S>0)return{headerLength:m,frameLength:S}}}function s(i,t,m,S,f){var _=y(i.samplerate),A=S+f*_,x=u(t,m),w;if(x){var n=x.frameLength,a=x.headerLength,r=a+n,d=Math.max(0,m+r-t.length);d?(w=new Uint8Array(r-a),w.set(t.subarray(m+a,t.length),0)):w=t.subarray(m+a,m+r);var T={unit:w,pts:A};return d||i.samples.push(T),{sample:T,length:r,missing:d}}var b=t.length-m;w=new Uint8Array(b),w.set(t.subarray(m,t.length),0);var v={unit:w,pts:A};return{sample:v,length:b,missing:-1}}},"./src/demux/base-audio-demuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>h,initPTSFn:()=>p});var M=L("./src/polyfills/number.ts"),P=L("./src/demux/id3.ts"),k=L("./src/types/demuxer.ts"),e=L("./src/demux/dummy-demuxed-track.ts"),O=L("./src/utils/mp4-tools.ts"),D=L("./src/utils/typed-array.ts"),l=function(){function g(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var o=g.prototype;return o.resetInitSegment=function(y,u,s,i){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},o.resetTimeStamp=function(y){this.initPTS=y,this.resetContiguity()},o.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},o.canParse=function(y,u){return!1},o.appendFrame=function(y,u,s){},o.demux=function(y,u){this.cachedData&&(y=(0,O.appendUint8Array)(this.cachedData,y),this.cachedData=null);var s=P.getID3Data(y,0),i=s?s.length:0,t,m=this._audioTrack,S=this._id3Track,f=s?P.getTimeStamp(s):void 0,_=y.length;for((this.basePTS===null||this.frameIndex===0&&(0,M.isFiniteNumber)(f))&&(this.basePTS=p(f,u,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),s&&s.length>0&&S.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:k.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});i<_;){if(this.canParse(y,i)){var A=this.appendFrame(m,y,i);A?(this.frameIndex++,this.lastPTS=A.sample.pts,i+=A.length,t=i):i=_}else P.canParse(y,i)?(s=P.getID3Data(y,i),S.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:k.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY}),i+=s.length,t=i):i++;if(i===_&&t!==_){var x=(0,D.sliceUint8)(y,t);this.cachedData?this.cachedData=(0,O.appendUint8Array)(this.cachedData,x):this.cachedData=x}}return{audioTrack:m,videoTrack:(0,e.dummyTrack)(),id3Track:S,textTrack:(0,e.dummyTrack)()}},o.demuxSampleAes=function(y,u,s){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},o.flush=function(y){var u=this.cachedData;return u&&(this.cachedData=null,this.demux(u,0)),{audioTrack:this._audioTrack,videoTrack:(0,e.dummyTrack)(),id3Track:this._id3Track,textTrack:(0,e.dummyTrack)()}},o.destroy=function(){},g}(),p=function(o,c,y){return(0,M.isFiniteNumber)(o)?o*90:c*9e4+(y||0)};const h=l},"./src/demux/chunk-cache.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>M});var M=function(){function k(){this.chunks=[],this.dataLength=0}var e=k.prototype;return e.push=function(D){this.chunks.push(D),this.dataLength+=D.length},e.flush=function(){var D=this.chunks,l=this.dataLength,p;if(D.length)D.length===1?p=D[0]:p=P(D,l);else return new Uint8Array(0);return this.reset(),p},e.reset=function(){this.chunks.length=0,this.dataLength=0},k}();function P(k,e){for(var O=new Uint8Array(e),D=0,l=0;l<k.length;l++){var p=k[l];O.set(p,D),D+=p.length}return O}},"./src/demux/dummy-demuxed-track.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{dummyTrack:()=>M});function M(P,k){return P===void 0&&(P=""),k===void 0&&(k=9e4),{type:P,id:-1,pid:-1,inputTimeScale:k,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>k});var M=L("./src/utils/logger.ts"),P=function(){function e(D){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=D,this.bytesAvailable=D.byteLength,this.word=0,this.bitsAvailable=0}var O=e.prototype;return O.loadWord=function(){var l=this.data,p=this.bytesAvailable,h=l.byteLength-p,g=new Uint8Array(4),o=Math.min(4,p);if(o===0)throw new Error("no bytes available");g.set(l.subarray(h,h+o)),this.word=new DataView(g.buffer).getUint32(0),this.bitsAvailable=o*8,this.bytesAvailable-=o},O.skipBits=function(l){var p;l=Math.min(l,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>l?(this.word<<=l,this.bitsAvailable-=l):(l-=this.bitsAvailable,p=l>>3,l-=p<<3,this.bytesAvailable-=p,this.loadWord(),this.word<<=l,this.bitsAvailable-=l)},O.readBits=function(l){var p=Math.min(this.bitsAvailable,l),h=this.word>>>32-p;if(l>32&&M.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=p,this.bitsAvailable>0)this.word<<=p;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return p=l-p,p>0&&this.bitsAvailable?h<<p|this.readBits(p):h},O.skipLZ=function(){var l;for(l=0;l<this.bitsAvailable;++l)if(this.word&2147483648>>>l)return this.word<<=l,this.bitsAvailable-=l,l;return this.loadWord(),l+this.skipLZ()},O.skipUEG=function(){this.skipBits(1+this.skipLZ())},O.skipEG=function(){this.skipBits(1+this.skipLZ())},O.readUEG=function(){var l=this.skipLZ();return this.readBits(l+1)-1},O.readEG=function(){var l=this.readUEG();return 1&l?1+l>>>1:-1*(l>>>1)},O.readBoolean=function(){return this.readBits(1)===1},O.readUByte=function(){return this.readBits(8)},O.readUShort=function(){return this.readBits(16)},O.readUInt=function(){return this.readBits(32)},O.skipScalingList=function(l){for(var p=8,h=8,g,o=0;o<l;o++)h!==0&&(g=this.readEG(),h=(p+g+256)%256),p=h===0?p:h},O.readSPS=function(){var l=0,p=0,h=0,g=0,o,c,y,u=this.readUByte.bind(this),s=this.readBits.bind(this),i=this.readUEG.bind(this),t=this.readBoolean.bind(this),m=this.skipBits.bind(this),S=this.skipEG.bind(this),f=this.skipUEG.bind(this),_=this.skipScalingList.bind(this);u();var A=u();if(s(5),m(3),u(),f(),A===100||A===110||A===122||A===244||A===44||A===83||A===86||A===118||A===128){var x=i();if(x===3&&m(1),f(),f(),m(1),t())for(c=x!==3?8:12,y=0;y<c;y++)t()&&(y<6?_(16):_(64))}f();var w=i();if(w===0)i();else if(w===1)for(m(1),S(),S(),o=i(),y=0;y<o;y++)S();f(),m(1);var n=i(),a=i(),r=s(1);r===0&&m(1),m(1),t()&&(l=i(),p=i(),h=i(),g=i());var d=[1,1];if(t()&&t()){var T=u();switch(T){case 1:d=[1,1];break;case 2:d=[12,11];break;case 3:d=[10,11];break;case 4:d=[16,11];break;case 5:d=[40,33];break;case 6:d=[24,11];break;case 7:d=[20,11];break;case 8:d=[32,11];break;case 9:d=[80,33];break;case 10:d=[18,11];break;case 11:d=[15,11];break;case 12:d=[64,33];break;case 13:d=[160,99];break;case 14:d=[4,3];break;case 15:d=[3,2];break;case 16:d=[2,1];break;case 255:{d=[u()<<8|u(),u()<<8|u()];break}}}return{width:Math.ceil((n+1)*16-l*2-p*2),height:(2-r)*(a+1)*16-(r?2:4)*(h+g),pixelRatio:d}},O.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}();const k=P},"./src/demux/id3.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{canParse:()=>O,decodeFrame:()=>g,getID3Data:()=>k,getID3Frames:()=>h,getTimeStamp:()=>D,isFooter:()=>P,isHeader:()=>M,isTimeStampFrame:()=>l,testables:()=>i,utf8ArrayToStr:()=>s});var M=function(f,_){return _+10<=f.length&&f[_]===73&&f[_+1]===68&&f[_+2]===51&&f[_+3]<255&&f[_+4]<255&&f[_+6]<128&&f[_+7]<128&&f[_+8]<128&&f[_+9]<128},P=function(f,_){return _+10<=f.length&&f[_]===51&&f[_+1]===68&&f[_+2]===73&&f[_+3]<255&&f[_+4]<255&&f[_+6]<128&&f[_+7]<128&&f[_+8]<128&&f[_+9]<128},k=function(f,_){for(var A=_,x=0;M(f,_);){x+=10;var w=e(f,_+6);x+=w,P(f,_+10)&&(x+=10),_+=x}if(x>0)return f.subarray(A,A+x)},e=function(f,_){var A=0;return A=(f[_]&127)<<21,A|=(f[_+1]&127)<<14,A|=(f[_+2]&127)<<7,A|=f[_+3]&127,A},O=function(f,_){return M(f,_)&&e(f,_+6)+10<=f.length-_},D=function(f){for(var _=h(f),A=0;A<_.length;A++){var x=_[A];if(l(x))return u(x)}},l=function(f){return f&&f.key==="PRIV"&&f.info==="com.apple.streaming.transportStreamTimestamp"},p=function(f){var _=String.fromCharCode(f[0],f[1],f[2],f[3]),A=e(f,4),x=10;return{type:_,size:A,data:f.subarray(x,x+A)}},h=function(f){for(var _=0,A=[];M(f,_);){var x=e(f,_+6);_+=10;for(var w=_+x;_+8<w;){var n=p(f.subarray(_)),a=g(n);a&&A.push(a),_+=n.size+10}P(f,_)&&(_+=10)}return A},g=function(f){return f.type==="PRIV"?o(f):f.type[0]==="W"?y(f):c(f)},o=function(f){if(!(f.size<2)){var _=s(f.data,!0),A=new Uint8Array(f.data.subarray(_.length+1));return{key:f.type,info:_,data:A.buffer}}},c=function(f){if(!(f.size<2)){if(f.type==="TXXX"){var _=1,A=s(f.data.subarray(_),!0);_+=A.length+1;var x=s(f.data.subarray(_));return{key:f.type,info:A,data:x}}var w=s(f.data.subarray(1));return{key:f.type,data:w}}},y=function(f){if(f.type==="WXXX"){if(f.size<2)return;var _=1,A=s(f.data.subarray(_),!0);_+=A.length+1;var x=s(f.data.subarray(_));return{key:f.type,info:A,data:x}}var w=s(f.data);return{key:f.type,data:w}},u=function(f){if(f.data.byteLength===8){var _=new Uint8Array(f.data),A=_[3]&1,x=(_[4]<<23)+(_[5]<<15)+(_[6]<<7)+_[7];return x/=45,A&&(x+=4772185884e-2),Math.round(x)}},s=function(f,_){_===void 0&&(_=!1);var A=m();if(A){var x=A.decode(f);if(_){var w=x.indexOf("\0");return w!==-1?x.substring(0,w):x}return x.replace(/\0/g,"")}for(var n=f.length,a,r,d,T="",b=0;b<n;){if(a=f[b++],a===0&&_)return T;if(a===0||a===3)continue;switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:T+=String.fromCharCode(a);break;case 12:case 13:r=f[b++],T+=String.fromCharCode((a&31)<<6|r&63);break;case 14:r=f[b++],d=f[b++],T+=String.fromCharCode((a&15)<<12|(r&63)<<6|(d&63)<<0);break;default:}}return T},i={decodeTextFrame:c},t;function m(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>p});var M=L("./src/demux/base-audio-demuxer.ts"),P=L("./src/demux/id3.ts"),k=L("./src/utils/logger.ts"),e=L("./src/demux/mpegaudio.ts");function O(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,D(h,g)}function D(h,g){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,y){return c.__proto__=y,c},D(h,g)}var l=function(h){O(g,h);function g(){return h.apply(this,arguments)||this}var o=g.prototype;return o.resetInitSegment=function(y,u,s,i){h.prototype.resetInitSegment.call(this,y,u,s,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:u,duration:i,inputTimeScale:9e4,dropped:0}},g.probe=function(y){if(!y)return!1;for(var u=P.getID3Data(y,0)||[],s=u.length,i=y.length;s<i;s++)if(e.probe(y,s))return k.logger.log("MPEG Audio sync word found !"),!0;return!1},o.canParse=function(y,u){return e.canParse(y,u)},o.appendFrame=function(y,u,s){if(this.basePTS!==null)return e.appendFrame(y,u,s,this.basePTS,this.frameIndex)},g}(M.default);const p=l},"./src/demux/mp4demuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>l});var M=L("./src/polyfills/number.ts"),P=L("./src/types/demuxer.ts"),k=L("./src/utils/mp4-tools.ts"),e=L("./src/demux/dummy-demuxed-track.ts"),O=/\/emsg[-/]ID3/i,D=function(){function p(g,o){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=o}var h=p.prototype;return h.resetTimeStamp=function(){},h.resetInitSegment=function(o,c,y,u){var s=this.videoTrack=(0,e.dummyTrack)("video",1),i=this.audioTrack=(0,e.dummyTrack)("audio",1),t=this.txtTrack=(0,e.dummyTrack)("text",1);if(this.id3Track=(0,e.dummyTrack)("id3",1),this.timeOffset=0,!(!o||!o.byteLength)){var m=(0,k.parseInitSegment)(o);if(m.video){var S=m.video,f=S.id,_=S.timescale,A=S.codec;s.id=f,s.timescale=t.timescale=_,s.codec=A}if(m.audio){var x=m.audio,w=x.id,n=x.timescale,a=x.codec;i.id=w,i.timescale=n,i.codec=a}t.id=k.RemuxerTrackIdConfig.text,s.sampleDuration=0,s.duration=i.duration=u}},h.resetContiguity=function(){},p.probe=function(o){return o=o.length>16384?o.subarray(0,16384):o,(0,k.findBox)(o,["moof"]).length>0},h.demux=function(o,c){this.timeOffset=c;var y=o,u=this.videoTrack,s=this.txtTrack;if(this.config.progressive){this.remainderData&&(y=(0,k.appendUint8Array)(this.remainderData,o));var i=(0,k.segmentValidRange)(y);this.remainderData=i.remainder,u.samples=i.valid||new Uint8Array}else u.samples=y;var t=this.extractID3Track(u,c);return s.samples=(0,k.parseSamples)(c,u),{videoTrack:u,audioTrack:this.audioTrack,id3Track:t,textTrack:this.txtTrack}},h.flush=function(){var o=this.timeOffset,c=this.videoTrack,y=this.txtTrack;c.samples=this.remainderData||new Uint8Array,this.remainderData=null;var u=this.extractID3Track(c,this.timeOffset);return y.samples=(0,k.parseSamples)(o,c),{videoTrack:c,audioTrack:(0,e.dummyTrack)(),id3Track:u,textTrack:(0,e.dummyTrack)()}},h.extractID3Track=function(o,c){var y=this.id3Track;if(o.samples.length){var u=(0,k.findBox)(o.samples,["emsg"]);u&&u.forEach(function(s){var i=(0,k.parseEmsg)(s);if(O.test(i.schemeIdUri)){var t=(0,M.isFiniteNumber)(i.presentationTime)?i.presentationTime/i.timeScale:c+i.presentationTimeDelta/i.timeScale,m=i.eventDuration===4294967295?Number.POSITIVE_INFINITY:i.eventDuration/i.timeScale;m<=.001&&(m=Number.POSITIVE_INFINITY);var S=i.payload;y.samples.push({data:S,len:S.byteLength,dts:t,pts:t,type:P.MetadataSchema.emsg,duration:m})}})}return y},h.demuxSampleAes=function(o,c,y){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},h.destroy=function(){},p}();const l=D},"./src/demux/mpegaudio.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{appendFrame:()=>D,canParse:()=>g,isHeader:()=>h,isHeaderPattern:()=>p,parseHeader:()=>l,probe:()=>o});var M=null,P=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],k=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],e=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],O=[0,1,1,4];function D(c,y,u,s,i){if(!(u+24>y.length)){var t=l(y,u);if(t&&u+t.frameLength<=y.length){var m=t.samplesPerFrame*9e4/t.sampleRate,S=s+i*m,f={unit:y.subarray(u,u+t.frameLength),pts:S,dts:S};return c.config=[],c.channelCount=t.channelCount,c.samplerate=t.sampleRate,c.samples.push(f),{sample:f,length:t.frameLength,missing:0}}}}function l(c,y){var u=c[y+1]>>3&3,s=c[y+1]>>1&3,i=c[y+2]>>4&15,t=c[y+2]>>2&3;if(u!==1&&i!==0&&i!==15&&t!==3){var m=c[y+2]>>1&1,S=c[y+3]>>6,f=u===3?3-s:s===3?3:4,_=P[f*14+i-1]*1e3,A=u===3?0:u===2?1:2,x=k[A*3+t],w=S===3?1:2,n=e[u][s],a=O[s],r=n*8*a,d=Math.floor(n*_/x+m)*a;if(M===null){var T=navigator.userAgent||"",b=T.match(/Chrome\/(\d+)/i);M=b?parseInt(b[1]):0}var v=!!M&&M<=87;return v&&s===2&&_>=224e3&&S===0&&(c[y+3]=c[y+3]|128),{sampleRate:x,channelCount:w,frameLength:d,samplesPerFrame:r}}}function p(c,y){return c[y]===255&&(c[y+1]&224)===224&&(c[y+1]&6)!==0}function h(c,y){return y+1<c.length&&p(c,y)}function g(c,y){var u=4;return p(c,y)&&u<=c.length-y}function o(c,y){if(y+1<c.length&&p(c,y)){var u=4,s=l(c,y),i=u;s!=null&&s.frameLength&&(i=s.frameLength);var t=y+i;return t===c.length||h(c,t)}return!1}},"./src/demux/sample-aes.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>e});var M=L("./src/crypt/decrypter.ts"),P=L("./src/utils/mp4-tools.ts"),k=function(){function O(l,p,h){this.keyData=void 0,this.decrypter=void 0,this.keyData=h,this.decrypter=new M.default(p,{removePKCS7Padding:!1})}var D=O.prototype;return D.decryptBuffer=function(p){return this.decrypter.decrypt(p,this.keyData.key.buffer,this.keyData.iv.buffer)},D.decryptAacSample=function(p,h,g){var o=this,c=p[h].unit;if(!(c.length<=16)){var y=c.subarray(16,c.length-c.length%16),u=y.buffer.slice(y.byteOffset,y.byteOffset+y.length);this.decryptBuffer(u).then(function(s){var i=new Uint8Array(s);c.set(i,16),o.decrypter.isSync()||o.decryptAacSamples(p,h+1,g)})}},D.decryptAacSamples=function(p,h,g){for(;;h++){if(h>=p.length){g();return}if(!(p[h].unit.length<32)&&(this.decryptAacSample(p,h,g),!this.decrypter.isSync()))return}},D.getAvcEncryptedData=function(p){for(var h=Math.floor((p.length-48)/160)*16+16,g=new Int8Array(h),o=0,c=32;c<p.length-16;c+=160,o+=16)g.set(p.subarray(c,c+16),o);return g},D.getAvcDecryptedUnit=function(p,h){for(var g=new Uint8Array(h),o=0,c=32;c<p.length-16;c+=160,o+=16)p.set(g.subarray(o,o+16),c);return p},D.decryptAvcSample=function(p,h,g,o,c){var y=this,u=(0,P.discardEPB)(c.data),s=this.getAvcEncryptedData(u);this.decryptBuffer(s.buffer).then(function(i){c.data=y.getAvcDecryptedUnit(u,i),y.decrypter.isSync()||y.decryptAvcSamples(p,h,g+1,o)})},D.decryptAvcSamples=function(p,h,g,o){if(p instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;h++,g=0){if(h>=p.length){o();return}for(var c=p[h].units;!(g>=c.length);g++){var y=c[g];if(!(y.data.length<=48||y.type!==1&&y.type!==5)&&(this.decryptAvcSample(p,h,g,o,y),!this.decrypter.isSync()))return}}},O}();const e=k},"./src/demux/transmuxer-interface.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>g});var M=L("./src/demux/webworkify-webpack.js"),P=L("./src/events.ts"),k=L("./src/demux/transmuxer.ts"),e=L("./src/utils/logger.ts"),O=L("./src/errors.ts"),D=L("./src/utils/mediasource-helper.ts"),l=L("./node_modules/eventemitter3/index.js"),p=L.n(l),h=(0,D.getMediaSource)()||{isTypeSupported:function(){return!1}},g=function(){function o(y,u,s,i){var t=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;var m=y.config;this.hls=y,this.id=u,this.useWorker=!!m.enableWorker,this.onTransmuxComplete=s,this.onFlush=i;var S=function(w,n){n=n||{},n.frag=t.frag,n.id=t.id,t.hls.trigger(w,n)};this.observer=new l.EventEmitter,this.observer.on(P.Events.FRAG_DECRYPTED,S),this.observer.on(P.Events.ERROR,S);var f={mp4:h.isTypeSupported("video/mp4"),mpeg:h.isTypeSupported("audio/mpeg"),mp3:h.isTypeSupported('audio/mp4; codecs="mp3"')},_=navigator.vendor;if(this.useWorker&&typeof Worker!="undefined"){e.logger.log("demuxing in webworker");var A;try{A=this.worker=(0,M.default)("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),A.addEventListener("message",this.onwmsg),A.onerror=function(x){t.useWorker=!1,e.logger.warn("Exception in webworker, fallback to inline"),t.hls.trigger(P.Events.ERROR,{type:O.ErrorTypes.OTHER_ERROR,details:O.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},A.postMessage({cmd:"init",typeSupported:f,vendor:_,id:u,config:JSON.stringify(m)})}catch(x){e.logger.warn("Error in worker:",x),e.logger.error("Error while initializing DemuxerWorker, fallback to inline"),A&&self.URL.revokeObjectURL(A.objectURL),this.transmuxer=new k.default(this.observer,f,m,_,u),this.worker=null}}else this.transmuxer=new k.default(this.observer,f,m,_,u)}var c=o.prototype;return c.destroy=function(){var u=this.worker;if(u)u.removeEventListener("message",this.onwmsg),u.terminate(),this.worker=null,this.onwmsg=void 0;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var i=this.observer;i&&i.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},c.push=function(u,s,i,t,m,S,f,_,A,x){var w,n,a=this;A.transmuxing.start=self.performance.now();var r=this.transmuxer,d=this.worker,T=S?S.start:m.start,b=m.decryptdata,v=this.frag,E=!(v&&m.cc===v.cc),R=!(v&&A.level===v.level),C=v?A.sn-v.sn:-1,N=this.part?A.part-this.part.index:-1,K=C===0&&A.id>1&&A.id===(v==null?void 0:v.stats.chunkCount),H=!R&&(C===1||C===0&&(N===1||K&&N<=0)),ee=self.performance.now();(R||C||m.stats.parsing.start===0)&&(m.stats.parsing.start=ee),S&&(N||!H)&&(S.stats.parsing.start=ee);var J=!(v&&((w=m.initSegment)===null||w===void 0?void 0:w.url)===((n=v.initSegment)===null||n===void 0?void 0:n.url)),se=new k.TransmuxState(E,H,_,R,T,J);if(!H||E||J){e.logger.log("[transmuxer-interface, "+m.type+"]: Starting new transmux session for sn: "+A.sn+" p: "+A.part+" level: "+A.level+" id: "+A.id+`
|
|
discontinuity: `+E+`
|
|
trackSwitch: `+R+`
|
|
contiguous: `+H+`
|
|
accurateTimeOffset: `+_+`
|
|
timeOffset: `+T+`
|
|
initSegmentChange: `+J);var G=new k.TransmuxConfig(i,t,s,f,x);this.configureTransmuxer(G)}if(this.frag=m,this.part=S,d)d.postMessage({cmd:"demux",data:u,decryptdata:b,chunkMeta:A,state:se},u instanceof ArrayBuffer?[u]:[]);else if(r){var Ee=r.push(u,b,A,se);(0,k.isPromise)(Ee)?(r.async=!0,Ee.then(function(ge){a.handleTransmuxComplete(ge)}).catch(function(ge){a.transmuxerError(ge,A,"transmuxer-interface push error")})):(r.async=!1,this.handleTransmuxComplete(Ee))}},c.flush=function(u){var s=this;u.transmuxing.start=self.performance.now();var i=this.transmuxer,t=this.worker;if(t)t.postMessage({cmd:"flush",chunkMeta:u});else if(i){var m=i.flush(u),S=(0,k.isPromise)(m);S||i.async?((0,k.isPromise)(m)||(m=Promise.resolve(m)),m.then(function(f){s.handleFlushResult(f,u)}).catch(function(f){s.transmuxerError(f,u,"transmuxer-interface flush error")})):this.handleFlushResult(m,u)}},c.transmuxerError=function(u,s,i){this.hls&&this.hls.trigger(P.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:s,fatal:!1,error:u,err:u,reason:i})},c.handleFlushResult=function(u,s){var i=this;u.forEach(function(t){i.handleTransmuxComplete(t)}),this.onFlush(s)},c.onWorkerMessage=function(u){var s=u.data,i=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}case"workerLog":e.logger[s.data.logType]&&e.logger[s.data.logType](s.data.message);break;default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,i.trigger(s.event,s.data);break}}},c.configureTransmuxer=function(u){var s=this.worker,i=this.transmuxer;s?s.postMessage({cmd:"configure",config:u}):i&&i.configure(u)},c.handleTransmuxComplete=function(u){u.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(u)},o}()},"./src/demux/transmuxer-worker.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>l});var M=L("./src/demux/transmuxer.ts"),P=L("./src/events.ts"),k=L("./src/utils/logger.ts"),e=L("./node_modules/eventemitter3/index.js"),O=L.n(e),D=L("./src/errors.ts");function l(c){var y=new e.EventEmitter,u=function(t,m){c.postMessage({event:t,data:m})};y.on(P.Events.FRAG_DECRYPTED,u),y.on(P.Events.ERROR,u);var s=function(){var t=function(f){var _=function(x){u("workerLog",{logType:f,message:x})};k.logger[f]=_};for(var m in k.logger)t(m)};c.addEventListener("message",function(i){var t=i.data;switch(t.cmd){case"init":{var m=JSON.parse(t.config);c.transmuxer=new M.default(y,t.typeSupported,m,t.vendor,t.id),(0,k.enableLogs)(m.debug,t.id),s(),u("init",null);break}case"configure":{c.transmuxer.configure(t.config);break}case"demux":{var S=c.transmuxer.push(t.data,t.decryptdata,t.chunkMeta,t.state);(0,M.isPromise)(S)?(c.transmuxer.async=!0,S.then(function(x){p(c,x)}).catch(function(x){u(P.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:t.chunkMeta,fatal:!1,error:x,err:x,reason:"transmuxer-worker push error"})})):(c.transmuxer.async=!1,p(c,S));break}case"flush":{var f=t.chunkMeta,_=c.transmuxer.flush(f),A=(0,M.isPromise)(_);A||c.transmuxer.async?((0,M.isPromise)(_)||(_=Promise.resolve(_)),_.then(function(x){g(c,x,f)}).catch(function(x){u(P.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:t.chunkMeta,fatal:!1,error:x,err:x,reason:"transmuxer-worker flush error"})})):g(c,_,f);break}default:break}})}function p(c,y){if(o(y.remuxResult))return!1;var u=[],s=y.remuxResult,i=s.audio,t=s.video;return i&&h(u,i),t&&h(u,t),c.postMessage({event:"transmuxComplete",data:y},u),!0}function h(c,y){y.data1&&c.push(y.data1.buffer),y.data2&&c.push(y.data2.buffer)}function g(c,y,u){var s=y.reduce(function(i,t){return p(c,t)||i},!1);s||c.postMessage({event:"transmuxComplete",data:y[0]}),c.postMessage({event:"flush",data:u})}function o(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{TransmuxConfig:()=>t,TransmuxState:()=>m,default:()=>y,isPromise:()=>i});var M=L("./src/events.ts"),P=L("./src/errors.ts"),k=L("./src/crypt/decrypter.ts"),e=L("./src/demux/aacdemuxer.ts"),O=L("./src/demux/mp4demuxer.ts"),D=L("./src/demux/tsdemuxer.ts"),l=L("./src/demux/mp3demuxer.ts"),p=L("./src/remux/mp4-remuxer.ts"),h=L("./src/remux/passthrough-remuxer.ts"),g=L("./src/utils/logger.ts"),o;try{o=self.performance.now.bind(self.performance)}catch(S){g.logger.debug("Unable to use Performance API on this environment"),o=self.Date.now}var c=[{demux:O.default,remux:h.default},{demux:D.default,remux:p.default},{demux:e.default,remux:p.default},{demux:l.default,remux:p.default}],y=function(){function S(_,A,x,w,n){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=_,this.typeSupported=A,this.config=x,this.vendor=w,this.id=n}var f=S.prototype;return f.configure=function(A){this.transmuxConfig=A,this.decrypter&&this.decrypter.reset()},f.push=function(A,x,w,n){var a=this,r=w.transmuxing;r.executeStart=o();var d=new Uint8Array(A),T=this.currentTransmuxState,b=this.transmuxConfig;n&&(this.currentTransmuxState=n);var v=n||T,E=v.contiguous,R=v.discontinuity,C=v.trackSwitch,N=v.accurateTimeOffset,K=v.timeOffset,H=v.initSegmentChange,ee=b.audioCodec,J=b.videoCodec,se=b.defaultInitPts,G=b.duration,Ee=b.initSegmentData,ge=u(d,x);if(ge&&ge.method==="AES-128"){var Pe=this.getDecrypter();if(Pe.isSync()){var Ne=Pe.softwareDecrypt(d,ge.key.buffer,ge.iv.buffer),$e=w.part>-1;if($e&&(Ne=Pe.flush()),!Ne)return r.executeEnd=o(),s(w);d=new Uint8Array(Ne)}else return this.decryptionPromise=Pe.webCryptoDecrypt(d,ge.key.buffer,ge.iv.buffer).then(function(Be){var Ue=a.push(Be,null,w);return a.decryptionPromise=null,Ue}),this.decryptionPromise}var je=this.needsProbing(R,C);je&&this.configureTransmuxer(d),(R||C||H||je)&&this.resetInitSegment(Ee,ee,J,G,x),(R||H||je)&&this.resetInitialTimestamp(se),E||this.resetContiguity();var Ce=this.transmux(d,ge,K,N,w),fe=this.currentTransmuxState;return fe.contiguous=!0,fe.discontinuity=!1,fe.trackSwitch=!1,r.executeEnd=o(),Ce},f.flush=function(A){var x=this,w=A.transmuxing;w.executeStart=o();var n=this.decrypter,a=this.currentTransmuxState,r=this.decryptionPromise;if(r)return r.then(function(){return x.flush(A)});var d=[],T=a.timeOffset;if(n){var b=n.flush();b&&d.push(this.push(b,null,A))}var v=this.demuxer,E=this.remuxer;if(!v||!E)return this.observer.emit(M.Events.ERROR,M.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),w.executeEnd=o(),[s(A)];var R=v.flush(T);return i(R)?R.then(function(C){return x.flushRemux(d,C,A),d}):(this.flushRemux(d,R,A),d)},f.flushRemux=function(A,x,w){var n=x.audioTrack,a=x.videoTrack,r=x.id3Track,d=x.textTrack,T=this.currentTransmuxState,b=T.accurateTimeOffset,v=T.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+w.sn+(w.part>-1?" p: "+w.part:"")+" of level "+w.level);var E=this.remuxer.remux(n,a,r,d,v,b,!0,this.id);A.push({remuxResult:E,chunkMeta:w}),w.transmuxing.executeEnd=o()},f.resetInitialTimestamp=function(A){var x=this.demuxer,w=this.remuxer;!x||!w||(x.resetTimeStamp(A),w.resetTimeStamp(A))},f.resetContiguity=function(){var A=this.demuxer,x=this.remuxer;!A||!x||(A.resetContiguity(),x.resetNextTimestamp())},f.resetInitSegment=function(A,x,w,n,a){var r=this.demuxer,d=this.remuxer;!r||!d||(r.resetInitSegment(A,x,w,n),d.resetInitSegment(A,x,w,a))},f.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},f.transmux=function(A,x,w,n,a){var r;return x&&x.method==="SAMPLE-AES"?r=this.transmuxSampleAes(A,x,w,n,a):r=this.transmuxUnencrypted(A,w,n,a),r},f.transmuxUnencrypted=function(A,x,w,n){var a=this.demuxer.demux(A,x,!1,!this.config.progressive),r=a.audioTrack,d=a.videoTrack,T=a.id3Track,b=a.textTrack,v=this.remuxer.remux(r,d,T,b,x,w,!1,this.id);return{remuxResult:v,chunkMeta:n}},f.transmuxSampleAes=function(A,x,w,n,a){var r=this;return this.demuxer.demuxSampleAes(A,x,w).then(function(d){var T=r.remuxer.remux(d.audioTrack,d.videoTrack,d.id3Track,d.textTrack,w,n,!1,r.id);return{remuxResult:T,chunkMeta:a}})},f.configureTransmuxer=function(A){for(var x=this.config,w=this.observer,n=this.typeSupported,a=this.vendor,r,d=0,T=c.length;d<T;d++)if(c[d].demux.probe(A)){r=c[d];break}r||(g.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),r={demux:O.default,remux:h.default});var b=this.demuxer,v=this.remuxer,E=r.remux,R=r.demux;(!v||!(v instanceof E))&&(this.remuxer=new E(w,x,n,a)),(!b||!(b instanceof R))&&(this.demuxer=new R(w,x,n),this.probe=R.probe)},f.needsProbing=function(A,x){return!this.demuxer||!this.remuxer||A||x},f.getDecrypter=function(){var A=this.decrypter;return A||(A=this.decrypter=new k.default(this.config)),A},S}();function u(S,f){var _=null;return S.byteLength>0&&f!=null&&f.key!=null&&f.iv!==null&&f.method!=null&&(_=f),_}var s=function(f){return{remuxResult:{},chunkMeta:f}};function i(S){return"then"in S&&S.then instanceof Function}var t=function(f,_,A,x,w){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=f,this.videoCodec=_,this.initSegmentData=A,this.duration=x,this.defaultInitPts=w},m=function(f,_,A,x,w,n){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=f,this.contiguous=_,this.accurateTimeOffset=A,this.trackSwitch=x,this.timeOffset=w,this.initSegmentChange=n}},"./src/demux/tsdemuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>S});var M=L("./src/demux/adts.ts"),P=L("./src/demux/mpegaudio.ts"),k=L("./src/demux/exp-golomb.ts"),e=L("./src/demux/sample-aes.ts"),O=L("./src/events.ts"),D=L("./src/utils/mp4-tools.ts"),l=L("./src/utils/logger.ts"),p=L("./src/errors.ts"),h=L("./src/types/demuxer.ts");function g(){return g=Object.assign?Object.assign.bind():function(f){for(var _=1;_<arguments.length;_++){var A=arguments[_];for(var x in A)Object.prototype.hasOwnProperty.call(A,x)&&(f[x]=A[x])}return f},g.apply(this,arguments)}var o=188,c=function(){function f(A,x,w){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=A,this.config=x,this.typeSupported=w}f.probe=function(x){var w=f.syncOffset(x);return w>0&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+w),w!==-1},f.syncOffset=function(x){for(var w=x.length,n=Math.min(o*5,x.length-o)+1,a=0;a<n;){for(var r=!1,d=a;d<w&&x[d]===71;d+=o)if(!r&&u(x,d)===0&&(r=!0),r&&d+o>n)return a;a++}return-1},f.createTrack=function(x,w){return{container:x==="video"||x==="audio"?"video/mp2t":void 0,type:x,id:D.RemuxerTrackIdConfig[x],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:x==="audio"?w:void 0}};var _=f.prototype;return _.resetInitSegment=function(x,w,n,a){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=f.createTrack("video"),this._audioTrack=f.createTrack("audio",a),this._id3Track=f.createTrack("id3"),this._txtTrack=f.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=w,this.videoCodec=n,this._duration=a},_.resetTimeStamp=function(){},_.resetContiguity=function(){var x=this._audioTrack,w=this._avcTrack,n=this._id3Track;x&&(x.pesData=null),w&&(w.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},_.demux=function(x,w,n,a){n===void 0&&(n=!1),a===void 0&&(a=!1),n||(this.sampleAes=null);var r,d=this._avcTrack,T=this._audioTrack,b=this._id3Track,v=this._txtTrack,E=d.pid,R=d.pesData,C=T.pid,N=b.pid,K=T.pesData,H=b.pesData,ee=null,J=this.pmtParsed,se=this._pmtId,G=x.length;if(this.remainderData&&(x=(0,D.appendUint8Array)(this.remainderData,x),G=x.length,this.remainderData=null),G<o&&!a)return this.remainderData=x,{audioTrack:T,videoTrack:d,id3Track:b,textTrack:v};var Ee=Math.max(0,f.syncOffset(x));G-=(G-Ee)%o,G<x.byteLength&&!a&&(this.remainderData=new Uint8Array(x.buffer,G,x.buffer.byteLength-G));for(var ge=0,Pe=Ee;Pe<G;Pe+=o)if(x[Pe]===71){var Ne=!!(x[Pe+1]&64),$e=u(x,Pe),je=(x[Pe+3]&48)>>4,Ce=void 0;if(je>1){if(Ce=Pe+5+x[Pe+4],Ce===Pe+o)continue}else Ce=Pe+4;switch($e){case E:Ne&&(R&&(r=t(R))&&this.parseAVCPES(d,v,r,!1),R={data:[],size:0}),R&&(R.data.push(x.subarray(Ce,Pe+o)),R.size+=Pe+o-Ce);break;case C:if(Ne){if(K&&(r=t(K)))switch(T.segmentCodec){case"aac":this.parseAACPES(T,r);break;case"mp3":this.parseMPEGPES(T,r);break}K={data:[],size:0}}K&&(K.data.push(x.subarray(Ce,Pe+o)),K.size+=Pe+o-Ce);break;case N:Ne&&(H&&(r=t(H))&&this.parseID3PES(b,r),H={data:[],size:0}),H&&(H.data.push(x.subarray(Ce,Pe+o)),H.size+=Pe+o-Ce);break;case 0:Ne&&(Ce+=x[Ce]+1),se=this._pmtId=s(x,Ce);break;case se:{Ne&&(Ce+=x[Ce]+1);var fe=i(x,Ce,this.typeSupported,n);E=fe.avc,E>0&&(d.pid=E),C=fe.audio,C>0&&(T.pid=C,T.segmentCodec=fe.segmentCodec),N=fe.id3,N>0&&(b.pid=N),ee!==null&&!J&&(l.logger.warn("MPEG-TS PMT found at "+Pe+" after unknown PID '"+ee+"'. Backtracking to sync byte @"+Ee+" to parse all TS packets."),ee=null,Pe=Ee-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:ee=$e;break}}else ge++;ge>0&&this.observer.emit(O.Events.ERROR,O.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"Found "+ge+" TS packet/s that do not start with 0x47"}),d.pesData=R,T.pesData=K,b.pesData=H;var Be={audioTrack:T,videoTrack:d,id3Track:b,textTrack:v};return a&&this.extractRemainingSamples(Be),Be},_.flush=function(){var x=this.remainderData;this.remainderData=null;var w;return x?w=this.demux(x,-1,!1,!0):w={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(w),this.sampleAes?this.decrypt(w,this.sampleAes):w},_.extractRemainingSamples=function(x){var w=x.audioTrack,n=x.videoTrack,a=x.id3Track,r=x.textTrack,d=n.pesData,T=w.pesData,b=a.pesData,v;if(d&&(v=t(d))?(this.parseAVCPES(n,r,v,!0),n.pesData=null):n.pesData=d,T&&(v=t(T))){switch(w.segmentCodec){case"aac":this.parseAACPES(w,v);break;case"mp3":this.parseMPEGPES(w,v);break}w.pesData=null}else T!=null&&T.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),w.pesData=T;b&&(v=t(b))?(this.parseID3PES(a,v),a.pesData=null):a.pesData=b},_.demuxSampleAes=function(x,w,n){var a=this.demux(x,n,!0,!this.config.progressive),r=this.sampleAes=new e.default(this.observer,this.config,w);return this.decrypt(a,r)},_.decrypt=function(x,w){return new Promise(function(n){var a=x.audioTrack,r=x.videoTrack;a.samples&&a.segmentCodec==="aac"?w.decryptAacSamples(a.samples,0,function(){r.samples?w.decryptAvcSamples(r.samples,0,0,function(){n(x)}):n(x)}):r.samples&&w.decryptAvcSamples(r.samples,0,0,function(){n(x)})})},_.destroy=function(){this._duration=0},_.parseAVCPES=function(x,w,n,a){var r=this,d=this.parseAVCNALu(x,n.data),T=!1,b=this.avcSample,v,E=!1;n.data=null,b&&d.length&&!x.audFound&&(m(b,x),b=this.avcSample=y(!1,n.pts,n.dts,"")),d.forEach(function(R){switch(R.type){case 1:{v=!0,b||(b=r.avcSample=y(!0,n.pts,n.dts,"")),T&&(b.debug+="NDR "),b.frame=!0;var C=R.data;if(E&&C.length>4){var N=new k.default(C).readSliceType();(N===2||N===4||N===7||N===9)&&(b.key=!0)}break}case 5:v=!0,b||(b=r.avcSample=y(!0,n.pts,n.dts,"")),T&&(b.debug+="IDR "),b.key=!0,b.frame=!0;break;case 6:{v=!0,T&&b&&(b.debug+="SEI "),(0,D.parseSEIMessageFromNALu)(R.data,1,n.pts,w.samples);break}case 7:if(v=!0,E=!0,T&&b&&(b.debug+="SPS "),!x.sps){var K=new k.default(R.data),H=K.readSPS();x.width=H.width,x.height=H.height,x.pixelRatio=H.pixelRatio,x.sps=[R.data],x.duration=r._duration;for(var ee=R.data.subarray(1,4),J="avc1.",se=0;se<3;se++){var G=ee[se].toString(16);G.length<2&&(G="0"+G),J+=G}x.codec=J}break;case 8:v=!0,T&&b&&(b.debug+="PPS "),x.pps||(x.pps=[R.data]);break;case 9:v=!1,x.audFound=!0,b&&m(b,x),b=r.avcSample=y(!1,n.pts,n.dts,T?"AUD ":"");break;case 12:v=!0;break;default:v=!1,b&&(b.debug+="unknown NAL "+R.type+" ");break}if(b&&v){var Ee=b.units;Ee.push(R)}}),a&&b&&(m(b,x),this.avcSample=null)},_.getLastNalUnit=function(x){var w,n=this.avcSample,a;if((!n||n.units.length===0)&&(n=x[x.length-1]),(w=n)!==null&&w!==void 0&&w.units){var r=n.units;a=r[r.length-1]}return a},_.parseAVCNALu=function(x,w){var n=w.byteLength,a=x.naluState||0,r=a,d=[],T=0,b,v,E,R=-1,C=0;for(a===-1&&(R=0,C=w[0]&31,a=0,T=1);T<n;){if(b=w[T++],!a){a=b?0:1;continue}if(a===1){a=b?0:2;continue}if(!b)a=3;else if(b===1){if(R>=0){var N={data:w.subarray(R,T-a-1),type:C};d.push(N)}else{var K=this.getLastNalUnit(x.samples);if(K&&(r&&T<=4-r&&K.state&&(K.data=K.data.subarray(0,K.data.byteLength-r)),v=T-a-1,v>0)){var H=new Uint8Array(K.data.byteLength+v);H.set(K.data,0),H.set(w.subarray(0,v),K.data.byteLength),K.data=H,K.state=0}}T<n?(E=w[T]&31,R=T,C=E,a=0):a=-1}else a=0}if(R>=0&&a>=0){var ee={data:w.subarray(R,n),type:C,state:a};d.push(ee)}if(d.length===0){var J=this.getLastNalUnit(x.samples);if(J){var se=new Uint8Array(J.data.byteLength+w.byteLength);se.set(J.data,0),se.set(w,J.data.byteLength),J.data=se}}return x.naluState=a,d},_.parseAACPES=function(x,w){var n=0,a=this.aacOverFlow,r=w.data;if(a){this.aacOverFlow=null;var d=a.missing,T=a.sample.unit.byteLength;if(d===-1){var b=new Uint8Array(T+r.byteLength);b.set(a.sample.unit,0),b.set(r,T),r=b}else{var v=T-d;a.sample.unit.set(r.subarray(0,d),v),x.samples.push(a.sample),n=a.missing}}var E,R;for(E=n,R=r.length;E<R-1&&!M.isHeader(r,E);E++);if(E!==n){var C,N;if(E<R-1?(C="AAC PES did not start with ADTS header,offset:"+E,N=!1):(C="no ADTS header found in AAC PES",N=!0),l.logger.warn("parsing error:"+C),this.observer.emit(O.Events.ERROR,O.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:N,reason:C}),N)return}M.initTrackConfig(x,this.observer,r,E,this.audioCodec);var K;if(w.pts!==void 0)K=w.pts;else if(a){var H=M.getFrameDuration(x.samplerate);K=a.sample.pts+H}else{l.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var ee=0,J;E<R;)if(J=M.appendFrame(x,r,E,K,ee),E+=J.length,J.missing){this.aacOverFlow=J;break}else for(ee++;E<R-1&&!M.isHeader(r,E);E++);},_.parseMPEGPES=function(x,w){var n=w.data,a=n.length,r=0,d=0,T=w.pts;if(T===void 0){l.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;d<a;)if(P.isHeader(n,d)){var b=P.appendFrame(x,n,d,T,r);if(b)d+=b.length,r++;else break}else d++},_.parseID3PES=function(x,w){if(w.pts===void 0){l.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}var n=g({},w,{type:this._avcTrack?h.MetadataSchema.emsg:h.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});x.samples.push(n)},f}();function y(f,_,A,x){return{key:f,frame:!1,pts:_,dts:A,units:[],debug:x,length:0}}function u(f,_){return((f[_+1]&31)<<8)+f[_+2]}function s(f,_){return(f[_+10]&31)<<8|f[_+11]}function i(f,_,A,x){var w={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},n=(f[_+1]&15)<<8|f[_+2],a=_+3+n-4,r=(f[_+10]&15)<<8|f[_+11];for(_+=12+r;_<a;){var d=u(f,_);switch(f[_]){case 207:if(!x){l.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:w.audio===-1&&(w.audio=d);break;case 21:w.id3===-1&&(w.id3=d);break;case 219:if(!x){l.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:w.avc===-1&&(w.avc=d);break;case 3:case 4:A.mpeg!==!0&&A.mp3!==!0?l.logger.log("MPEG audio found, not supported in this browser"):w.audio===-1&&(w.audio=d,w.segmentCodec="mp3");break;case 36:l.logger.warn("Unsupported HEVC stream type found");break;default:break}_+=((f[_+3]&15)<<8|f[_+4])+5}return w}function t(f){var _=0,A,x,w,n,a,r=f.data;if(!f||f.size===0)return null;for(;r[0].length<19&&r.length>1;){var d=new Uint8Array(r[0].length+r[1].length);d.set(r[0]),d.set(r[1],r[0].length),r[0]=d,r.splice(1,1)}A=r[0];var T=(A[0]<<16)+(A[1]<<8)+A[2];if(T===1){if(x=(A[4]<<8)+A[5],x&&x>f.size-6)return null;var b=A[7];b&192&&(n=(A[9]&14)*536870912+(A[10]&255)*4194304+(A[11]&254)*16384+(A[12]&255)*128+(A[13]&254)/2,b&64?(a=(A[14]&14)*536870912+(A[15]&255)*4194304+(A[16]&254)*16384+(A[17]&255)*128+(A[18]&254)/2,n-a>54e5&&(l.logger.warn(Math.round((n-a)/9e4)+"s delta between PTS and DTS, align them"),n=a)):a=n),w=A[8];var v=w+9;if(f.size<=v)return null;f.size-=v;for(var E=new Uint8Array(f.size),R=0,C=r.length;R<C;R++){A=r[R];var N=A.byteLength;if(v)if(v>N){v-=N;continue}else A=A.subarray(v),N-=v,v=0;E.set(A,_),_+=N}return x&&(x-=w+3),{data:E,pts:n,dts:a,len:x}}return null}function m(f,_){if(f.units.length&&f.frame){if(f.pts===void 0){var A=_.samples,x=A.length;if(x){var w=A[x-1];f.pts=w.pts,f.dts=w.dts}else{_.dropped++;return}}_.samples.push(f)}f.debug.length&&l.logger.log(f.pts+"/"+f.dts+":"+f.debug)}const S=c},"./src/demux/webworkify-webpack.js":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>o});var M=function(){var y=ENTRY_MODULE,u={},s=function t(m){var S=u[m];if(S!==void 0)return S.exports;var f=u[m]={exports:{}};return y[m].call(f.exports,f,f.exports,t),f.exports};s.m=y,function(){s.n=function(t){var m=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(m,{a:m}),m}}(),function(){s.d=function(t,m){for(var S in m)s.o(m,S)&&!s.o(t,S)&&Object.defineProperty(t,S,{enumerable:!0,get:m[S]})}}(),function(){s.o=function(t,m){return Object.prototype.hasOwnProperty.call(t,m)}}(),function(){s.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}();var i=s(ENTRY_MODULE);return i.default||i},P=M.toString().split("ENTRY_MODULE"),k="[\\.|\\-|\\+|\\w|/|@]+",e="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+k+").*?\\)";function O(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function D(c){return!isNaN(1*c)}function l(c,y,u){var s={};s[u]=[];var i=y.toString().replace(/^"[^"]+"/,"function"),t=i.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||i.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!t)return s;for(var m=t[1],S=new RegExp("(\\\\n|\\W)"+O(m)+e,"g"),f;f=S.exec(i);)f[3]!=="dll-reference"&&s[u].push(f[3]);for(S=new RegExp("\\("+O(m)+'\\("(dll-reference\\s('+k+'))"\\)\\)'+e,"g");f=S.exec(i);)c[f[2]]||(s[u].push(f[1]),c[f[2]]=L(f[1]).m),s[f[2]]=s[f[2]]||[],s[f[2]].push(f[4]);for(var _=Object.keys(s),A=0;A<_.length;A++)for(var x=0;x<s[_[A]].length;x++)D(s[_[A]][x])&&(s[_[A]][x]=1*s[_[A]][x]);return s}function p(c){var y=Object.keys(c);return y.reduce(function(u,s){return u||c[s].length>0},!1)}function h(c,y){for(var u={main:[y]},s={main:[]},i={main:{}};p(u);)for(var t=Object.keys(u),m=0;m<t.length;m++){var S=t[m],f=u[S],_=f.pop();if(i[S]=i[S]||{},!(i[S][_]||!c[S][_])){i[S][_]=!0,s[S]=s[S]||[],s[S].push(_);for(var A=l(c,c[S][_],S),x=Object.keys(A),w=0;w<x.length;w++)u[x[w]]=u[x[w]]||[],u[x[w]]=u[x[w]].concat(A[x[w]])}}return s}function g(c,y,u,s){var i=c[s].map(function(t){return'"'+t+'": '+y[s][t].toString().replace(/^"[^"]+"/,"function")}).join(",");return P[0]+"{"+i+"}"+P[1]+'"'+u+'"'+P[2]}function o(c,y){y=y||{};var u={main:L.m},s=y.all?{main:Object.keys(u.main)}:h(u,c),i="";Object.keys(s).filter(function(_){return _!=="main"}).forEach(function(_){for(var A=0;s[_][A];)A++;s[_].push(A),u[_][A]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",i=i+("var "+_+" = ("+g(s,u,A,modules)+`)();
|
|
`)}),i=i+("new (("+g(s,u,c,"main")+")())(self);");var t=new window.Blob([i],{type:"text/javascript"}),m=window.URL||window.webkitURL||window.mozURL||window.msURL,S=m.createObjectURL(t),f=new window.Worker(S);return f.objectURL=S,f}},"./src/errors.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{ErrorDetails:()=>P,ErrorTypes:()=>M});var M;(function(k){k.NETWORK_ERROR="networkError",k.MEDIA_ERROR="mediaError",k.KEY_SYSTEM_ERROR="keySystemError",k.MUX_ERROR="muxError",k.OTHER_ERROR="otherError"})(M||(M={}));var P;(function(k){k.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",k.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",k.KEY_SYSTEM_NO_SESSION="keySystemNoSession",k.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",k.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",k.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",k.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",k.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",k.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",k.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",k.MANIFEST_LOAD_ERROR="manifestLoadError",k.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",k.MANIFEST_PARSING_ERROR="manifestParsingError",k.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",k.LEVEL_EMPTY_ERROR="levelEmptyError",k.LEVEL_LOAD_ERROR="levelLoadError",k.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",k.LEVEL_SWITCH_ERROR="levelSwitchError",k.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",k.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",k.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",k.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",k.FRAG_LOAD_ERROR="fragLoadError",k.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",k.FRAG_DECRYPT_ERROR="fragDecryptError",k.FRAG_PARSING_ERROR="fragParsingError",k.REMUX_ALLOC_ERROR="remuxAllocError",k.KEY_LOAD_ERROR="keyLoadError",k.KEY_LOAD_TIMEOUT="keyLoadTimeOut",k.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",k.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",k.BUFFER_APPEND_ERROR="bufferAppendError",k.BUFFER_APPENDING_ERROR="bufferAppendingError",k.BUFFER_STALLED_ERROR="bufferStalledError",k.BUFFER_FULL_ERROR="bufferFullError",k.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",k.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",k.INTERNAL_EXCEPTION="internalException",k.INTERNAL_ABORTED="aborted",k.UNKNOWN="unknown"})(P||(P={}))},"./src/events.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{Events:()=>M});var M;(function(P){P.MEDIA_ATTACHING="hlsMediaAttaching",P.MEDIA_ATTACHED="hlsMediaAttached",P.MEDIA_DETACHING="hlsMediaDetaching",P.MEDIA_DETACHED="hlsMediaDetached",P.BUFFER_RESET="hlsBufferReset",P.BUFFER_CODECS="hlsBufferCodecs",P.BUFFER_CREATED="hlsBufferCreated",P.BUFFER_APPENDING="hlsBufferAppending",P.BUFFER_APPENDED="hlsBufferAppended",P.BUFFER_EOS="hlsBufferEos",P.BUFFER_FLUSHING="hlsBufferFlushing",P.BUFFER_FLUSHED="hlsBufferFlushed",P.MANIFEST_LOADING="hlsManifestLoading",P.MANIFEST_LOADED="hlsManifestLoaded",P.MANIFEST_PARSED="hlsManifestParsed",P.LEVEL_SWITCHING="hlsLevelSwitching",P.LEVEL_SWITCHED="hlsLevelSwitched",P.LEVEL_LOADING="hlsLevelLoading",P.LEVEL_LOADED="hlsLevelLoaded",P.LEVEL_UPDATED="hlsLevelUpdated",P.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",P.LEVELS_UPDATED="hlsLevelsUpdated",P.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",P.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",P.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",P.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",P.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",P.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",P.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",P.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",P.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",P.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",P.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",P.CUES_PARSED="hlsCuesParsed",P.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",P.INIT_PTS_FOUND="hlsInitPtsFound",P.FRAG_LOADING="hlsFragLoading",P.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",P.FRAG_LOADED="hlsFragLoaded",P.FRAG_DECRYPTED="hlsFragDecrypted",P.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",P.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",P.FRAG_PARSING_METADATA="hlsFragParsingMetadata",P.FRAG_PARSED="hlsFragParsed",P.FRAG_BUFFERED="hlsFragBuffered",P.FRAG_CHANGED="hlsFragChanged",P.FPS_DROP="hlsFpsDrop",P.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",P.ERROR="hlsError",P.DESTROYING="hlsDestroying",P.KEY_LOADING="hlsKeyLoading",P.KEY_LOADED="hlsKeyLoaded",P.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",P.BACK_BUFFER_REACHED="hlsBackBufferReached"})(M||(M={}))},"./src/hls.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>A});var M=L("./node_modules/url-toolkit/src/url-toolkit.js"),P=L.n(M),k=L("./src/loader/playlist-loader.ts"),e=L("./src/controller/id3-track-controller.ts"),O=L("./src/controller/latency-controller.ts"),D=L("./src/controller/level-controller.ts"),l=L("./src/controller/fragment-tracker.ts"),p=L("./src/loader/key-loader.ts"),h=L("./src/controller/stream-controller.ts"),g=L("./src/is-supported.ts"),o=L("./src/utils/logger.ts"),c=L("./src/config.ts"),y=L("./node_modules/eventemitter3/index.js"),u=L.n(y),s=L("./src/events.ts"),i=L("./src/errors.ts"),t=L("./src/types/level.ts");function m(x,w){for(var n=0;n<w.length;n++){var a=w[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(x,f(a.key),a)}}function S(x,w,n){return w&&m(x.prototype,w),n&&m(x,n),Object.defineProperty(x,"prototype",{writable:!1}),x}function f(x){var w=_(x,"string");return typeof w=="symbol"?w:String(w)}function _(x,w){if(typeof x!="object"||x===null)return x;var n=x[Symbol.toPrimitive];if(n!==void 0){var a=n.call(x,w||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(x)}var A=function(){x.isSupported=function(){return(0,g.isSupported)()};function x(n){n===void 0&&(n={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new y.EventEmitter,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var a=this.config=(0,c.mergeConfig)(x.DefaultConfig,n);this.userConfig=n,(0,o.enableLogs)(a.debug,"Hls instance"),this._autoLevelCapping=-1,a.progressive&&(0,c.enableStreamingMode)(a);var r=a.abrController,d=a.bufferController,T=a.capLevelController,b=a.fpsController,v=this.abrController=new r(this),E=this.bufferController=new d(this),R=this.capLevelController=new T(this),C=new b(this),N=new k.default(this),K=new e.default(this),H=this.levelController=new D.default(this),ee=new l.FragmentTracker(this),J=new p.default(this.config),se=this.streamController=new h.default(this,ee,J);R.setStreamController(se),C.setStreamController(se);var G=[N,H,se];this.networkControllers=G;var Ee=[v,E,R,C,K,ee];this.audioTrackController=this.createController(a.audioTrackController,G);var ge=a.audioStreamController;ge&&G.push(new ge(this,ee,J)),this.subtitleTrackController=this.createController(a.subtitleTrackController,G);var Pe=a.subtitleStreamController;Pe&&G.push(new Pe(this,ee,J)),this.createController(a.timelineController,Ee),J.emeController=this.emeController=this.createController(a.emeController,Ee),this.cmcdController=this.createController(a.cmcdController,Ee),this.latencyController=this.createController(O.default,Ee),this.coreComponents=Ee}var w=x.prototype;return w.createController=function(a,r){if(a){var d=new a(this);return r&&r.push(d),d}return null},w.on=function(a,r,d){d===void 0&&(d=this),this._emitter.on(a,r,d)},w.once=function(a,r,d){d===void 0&&(d=this),this._emitter.once(a,r,d)},w.removeAllListeners=function(a){this._emitter.removeAllListeners(a)},w.off=function(a,r,d,T){d===void 0&&(d=this),this._emitter.off(a,r,d,T)},w.listeners=function(a){return this._emitter.listeners(a)},w.emit=function(a,r,d){return this._emitter.emit(a,r,d)},w.trigger=function(a,r){if(this.config.debug)return this.emit(a,a,r);try{return this.emit(a,a,r)}catch(d){o.logger.error("An internal error happened while handling event "+a+'. Error message: "'+d.message+'". Here is a stacktrace:',d),this.trigger(s.Events.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:a,error:d})}return!1},w.listenerCount=function(a){return this._emitter.listenerCount(a)},w.destroy=function(){o.logger.log("destroy"),this.trigger(s.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(a){return a.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(a){return a.destroy()}),this.coreComponents.length=0},w.attachMedia=function(a){o.logger.log("attachMedia"),this._media=a,this.trigger(s.Events.MEDIA_ATTACHING,{media:a})},w.detachMedia=function(){o.logger.log("detachMedia"),this.trigger(s.Events.MEDIA_DETACHING,void 0),this._media=null},w.loadSource=function(a){this.stopLoad();var r=this.media,d=this.url,T=this.url=M.buildAbsoluteURL(self.location.href,a,{alwaysNormalize:!0});o.logger.log("loadSource:"+T),r&&d&&d!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(r)),this.trigger(s.Events.MANIFEST_LOADING,{url:a})},w.startLoad=function(a){a===void 0&&(a=-1),o.logger.log("startLoad("+a+")"),this.networkControllers.forEach(function(r){r.startLoad(a)})},w.stopLoad=function(){o.logger.log("stopLoad"),this.networkControllers.forEach(function(a){a.stopLoad()})},w.swapAudioCodec=function(){o.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},w.recoverMediaError=function(){o.logger.log("recoverMediaError");var a=this._media;this.detachMedia(),a&&this.attachMedia(a)},w.removeLevel=function(a,r){r===void 0&&(r=0),this.levelController.removeLevel(a,r)},S(x,[{key:"levels",get:function(){var a=this.levelController.levels;return a||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(a){o.logger.log("set currentLevel:"+a),this.loadLevel=a,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(a){o.logger.log("set nextLevel:"+a),this.levelController.manualLevel=a,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(a){o.logger.log("set loadLevel:"+a),this.levelController.manualLevel=a}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(a){this.levelController.nextLoadLevel=a}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(a){o.logger.log("set firstLevel:"+a),this.levelController.firstLevel=a}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(a){o.logger.log("set startLevel:"+a),a!==-1&&(a=Math.max(a,this.minAutoLevel)),this.levelController.startLevel=a}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(a){var r=!!a;r!==this.config.capLevelToPlayerSize&&(r?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=r)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(a){this._autoLevelCapping!==a&&(o.logger.log("set autoLevelCapping:"+a),this._autoLevelCapping=a)}},{key:"bandwidthEstimate",get:function(){var a=this.abrController.bwEstimator;return a?a.getEstimate():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(a){t.HdcpLevels.indexOf(a)>-1&&(this._maxHdcpLevel=a)}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var a=this.levels,r=this.config.minAutoBitrate;if(!a)return 0;for(var d=a.length,T=0;T<d;T++)if(a[T].maxBitrate>=r)return T;return 0}},{key:"maxAutoLevel",get:function(){var a=this.levels,r=this.autoLevelCapping,d=this.maxHdcpLevel,T;if(r===-1&&a&&a.length?T=a.length-1:T=r,d)for(var b=T;b--;){var v=a[b].attrs["HDCP-LEVEL"];if(v&&v<=d)return b}return T}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(a){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,a)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var a=this.audioTrackController;return a?a.audioTracks:[]}},{key:"audioTrack",get:function(){var a=this.audioTrackController;return a?a.audioTrack:-1},set:function(a){var r=this.audioTrackController;r&&(r.audioTrack=a)}},{key:"subtitleTracks",get:function(){var a=this.subtitleTrackController;return a?a.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var a=this.subtitleTrackController;return a?a.subtitleTrack:-1},set:function(a){var r=this.subtitleTrackController;r&&(r.subtitleTrack=a)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var a=this.subtitleTrackController;return a?a.subtitleDisplay:!1},set:function(a){var r=this.subtitleTrackController;r&&(r.subtitleDisplay=a)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(a){this.config.lowLatencyMode=a}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.3.5"}},{key:"Events",get:function(){return s.Events}},{key:"ErrorTypes",get:function(){return i.ErrorTypes}},{key:"ErrorDetails",get:function(){return i.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:c.hlsDefaultConfig},set:function(a){x.defaultConfig=a}}]),x}();A.defaultConfig=void 0},"./src/is-supported.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{changeTypeSupported:()=>e,isSupported:()=>k});var M=L("./src/utils/mediasource-helper.ts");function P(){return self.SourceBuffer||self.WebKitSourceBuffer}function k(){var O=(0,M.getMediaSource)();if(!O)return!1;var D=P(),l=O&&typeof O.isTypeSupported=="function"&&O.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),p=!D||D.prototype&&typeof D.prototype.appendBuffer=="function"&&typeof D.prototype.remove=="function";return!!l&&!!p}function e(){var O,D=P();return typeof(D==null||(O=D.prototype)===null||O===void 0?void 0:O.changeType)=="function"}},"./src/loader/date-range.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{DateRange:()=>g,DateRangeAttribute:()=>h});var M=L("./src/polyfills/number.ts"),P=L("./src/utils/attr-list.ts"),k=L("./src/utils/logger.ts");function e(){return e=Object.assign?Object.assign.bind():function(o){for(var c=1;c<arguments.length;c++){var y=arguments[c];for(var u in y)Object.prototype.hasOwnProperty.call(y,u)&&(o[u]=y[u])}return o},e.apply(this,arguments)}function O(o,c){for(var y=0;y<c.length;y++){var u=c[y];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,l(u.key),u)}}function D(o,c,y){return c&&O(o.prototype,c),y&&O(o,y),Object.defineProperty(o,"prototype",{writable:!1}),o}function l(o){var c=p(o,"string");return typeof c=="symbol"?c:String(c)}function p(o,c){if(typeof o!="object"||o===null)return o;var y=o[Symbol.toPrimitive];if(y!==void 0){var u=y.call(o,c||"default");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(o)}var h;(function(o){o.ID="ID",o.CLASS="CLASS",o.START_DATE="START-DATE",o.DURATION="DURATION",o.END_DATE="END-DATE",o.END_ON_NEXT="END-ON-NEXT",o.PLANNED_DURATION="PLANNED-DURATION",o.SCTE35_OUT="SCTE35-OUT",o.SCTE35_IN="SCTE35-IN"})(h||(h={}));var g=function(){function o(c,y){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,y){var u=y.attr;for(var s in u)if(Object.prototype.hasOwnProperty.call(c,s)&&c[s]!==u[s]){k.logger.warn('DATERANGE tag attribute: "'+s+'" does not match for tags with ID: "'+c.ID+'"'),this._badValueForSameId=s;break}c=e(new P.AttrList({}),u,c)}if(this.attr=c,this._startDate=new Date(c[h.START_DATE]),h.END_DATE in this.attr){var i=new Date(this.attr[h.END_DATE]);(0,M.isFiniteNumber)(i.getTime())&&(this._endDate=i)}}return D(o,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var y=this.duration;return y!==null?new Date(this._startDate.getTime()+y*1e3):null}},{key:"duration",get:function(){if(h.DURATION in this.attr){var y=this.attr.decimalFloatingPoint(h.DURATION);if((0,M.isFiniteNumber)(y))return y}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return h.PLANNED_DURATION in this.attr?this.attr.decimalFloatingPoint(h.PLANNED_DURATION):null}},{key:"endOnNext",get:function(){return this.attr.bool(h.END_ON_NEXT)}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&(0,M.isFiniteNumber)(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}]),o}()},"./src/loader/fragment-loader.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{LoadError:()=>y,default:()=>o});var M=L("./src/polyfills/number.ts"),P=L("./src/errors.ts");function k(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,p(u,s)}function e(u){var s=typeof Map=="function"?new Map:void 0;return e=function(t){if(t===null||!l(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof s!="undefined"){if(s.has(t))return s.get(t);s.set(t,m)}function m(){return O(t,arguments,h(this).constructor)}return m.prototype=Object.create(t.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),p(m,t)},e(u)}function O(u,s,i){return D()?O=Reflect.construct.bind():O=function(m,S,f){var _=[null];_.push.apply(_,S);var A=Function.bind.apply(m,_),x=new A;return f&&p(x,f.prototype),x},O.apply(null,arguments)}function D(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(u){return!1}}function l(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function p(u,s){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,m){return t.__proto__=m,t},p(u,s)}function h(u){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},h(u)}var g=Math.pow(2,17),o=function(){function u(i){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=i}var s=u.prototype;return s.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},s.abort=function(){this.loader&&this.loader.abort()},s.load=function(t,m){var S=this,f=t.url;if(!f)return Promise.reject(new y({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(f?"part list":"url")));this.abort();var _=this.config,A=_.fLoader,x=_.loader;return new Promise(function(w,n){S.loader&&S.loader.destroy();var a=S.loader=t.loader=A?new A(_):new x(_),r=c(t),d={timeout:_.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:_.fragLoadingMaxRetryTimeout,highWaterMark:t.sn==="initSegment"?1/0:g};t.stats=a.stats,a.load(r,d,{onSuccess:function(b,v,E,R){S.resetLoader(t,a);var C=b.data;E.resetIV&&t.decryptdata&&(t.decryptdata.iv=new Uint8Array(C.slice(0,16)),C=C.slice(16)),w({frag:t,part:null,payload:C,networkDetails:R})},onError:function(b,v,E){S.resetLoader(t,a),n(new y({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:b,networkDetails:E}))},onAbort:function(b,v,E){S.resetLoader(t,a),n(new y({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:E}))},onTimeout:function(b,v,E){S.resetLoader(t,a),n(new y({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:E}))},onProgress:function(b,v,E,R){m&&m({frag:t,part:null,payload:E,networkDetails:R})}})})},s.loadPart=function(t,m,S){var f=this;this.abort();var _=this.config,A=_.fLoader,x=_.loader;return new Promise(function(w,n){f.loader&&f.loader.destroy();var a=f.loader=t.loader=A?new A(_):new x(_),r=c(t,m),d={timeout:_.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:_.fragLoadingMaxRetryTimeout,highWaterMark:g};m.stats=a.stats,a.load(r,d,{onSuccess:function(b,v,E,R){f.resetLoader(t,a),f.updateStatsFromPart(t,m);var C={frag:t,part:m,payload:b.data,networkDetails:R};S(C),w(C)},onError:function(b,v,E){f.resetLoader(t,a),n(new y({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:m,response:b,networkDetails:E}))},onAbort:function(b,v,E){t.stats.aborted=m.stats.aborted,f.resetLoader(t,a),n(new y({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:m,networkDetails:E}))},onTimeout:function(b,v,E){f.resetLoader(t,a),n(new y({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:m,networkDetails:E}))}})})},s.updateStatsFromPart=function(t,m){var S=t.stats,f=m.stats,_=f.total;if(S.loaded+=f.loaded,_){var A=Math.round(t.duration/m.duration),x=Math.min(Math.round(S.loaded/_),A),w=A-x,n=w*Math.round(S.loaded/x);S.total=S.loaded+n}else S.total=Math.max(S.loaded,S.total);var a=S.loading,r=f.loading;a.start?a.first+=r.first-r.start:(a.start=r.start,a.first=r.first),a.end=r.end},s.resetLoader=function(t,m){t.loader=null,this.loader===m&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),m.destroy()},u}();function c(u,s){s===void 0&&(s=null);var i=s||u,t={frag:u,part:s,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},m=i.byteRangeStartOffset,S=i.byteRangeEndOffset;if((0,M.isFiniteNumber)(m)&&(0,M.isFiniteNumber)(S)){var f,_=m,A=S;if(u.sn==="initSegment"&&((f=u.decryptdata)===null||f===void 0?void 0:f.method)==="AES-128"){var x=S-m;x%16&&(A=S+(16-x%16)),m!==0&&(t.resetIV=!0,_=m-16)}t.rangeStart=_,t.rangeEnd=A}return t}var y=function(u){k(s,u);function s(i){for(var t,m=arguments.length,S=new Array(m>1?m-1:0),f=1;f<m;f++)S[f-1]=arguments[f];return t=u.call.apply(u,[this].concat(S))||this,t.data=void 0,t.data=i,t}return s}(e(Error))},"./src/loader/fragment.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{BaseSegment:()=>c,ElementaryStreamTypes:()=>o,Fragment:()=>y,Part:()=>u});var M=L("./src/polyfills/number.ts"),P=L("./node_modules/url-toolkit/src/url-toolkit.js"),k=L.n(P),e=L("./src/loader/load-stats.ts");function O(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,D(s,i)}function D(s,i){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,S){return m.__proto__=S,m},D(s,i)}function l(s,i){for(var t=0;t<i.length;t++){var m=i[t];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(s,h(m.key),m)}}function p(s,i,t){return i&&l(s.prototype,i),t&&l(s,t),Object.defineProperty(s,"prototype",{writable:!1}),s}function h(s){var i=g(s,"string");return typeof i=="symbol"?i:String(i)}function g(s,i){if(typeof s!="object"||s===null)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var m=t.call(s,i||"default");if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(s)}var o;(function(s){s.AUDIO="audio",s.VIDEO="video",s.AUDIOVIDEO="audiovideo"})(o||(o={}));var c=function(){function s(t){var m;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(m={},m[o.AUDIO]=null,m[o.VIDEO]=null,m[o.AUDIOVIDEO]=null,m),this.baseurl=t}var i=s.prototype;return i.setByteRange=function(m,S){var f=m.split("@",2),_=[];f.length===1?_[0]=S?S.byteRangeEndOffset:0:_[0]=parseInt(f[1]),_[1]=parseInt(f[0])+_[0],this._byteRange=_},p(s,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=(0,P.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(m){this._url=m}}]),s}(),y=function(s){O(i,s);function i(m,S){var f;return f=s.call(this,S)||this,f._decryptdata=null,f.rawProgramDateTime=null,f.programDateTime=null,f.tagList=[],f.duration=0,f.sn=0,f.levelkeys=void 0,f.type=void 0,f.loader=null,f.keyLoader=null,f.level=-1,f.cc=0,f.startPTS=void 0,f.endPTS=void 0,f.appendedPTS=void 0,f.startDTS=void 0,f.endDTS=void 0,f.start=0,f.deltaPTS=void 0,f.maxStartPTS=void 0,f.minEndPTS=void 0,f.stats=new e.LoadStats,f.urlId=0,f.data=void 0,f.bitrateTest=!1,f.title=null,f.initSegment=null,f.endList=void 0,f.type=m,f}var t=i.prototype;return t.setKeyFormat=function(S){if(this.levelkeys){var f=this.levelkeys[S];f&&!this._decryptdata&&(this._decryptdata=f.getDecryptData(this.sn))}},t.abortRequests=function(){var S,f;(S=this.loader)===null||S===void 0||S.abort(),(f=this.keyLoader)===null||f===void 0||f.abort()},t.setElementaryStreamInfo=function(S,f,_,A,x,w){w===void 0&&(w=!1);var n=this.elementaryStreams,a=n[S];if(!a){n[S]={startPTS:f,endPTS:_,startDTS:A,endDTS:x,partial:w};return}a.startPTS=Math.min(a.startPTS,f),a.endPTS=Math.max(a.endPTS,_),a.startDTS=Math.min(a.startDTS,A),a.endDTS=Math.max(a.endDTS,x)},t.clearElementaryStreamInfo=function(){var S=this.elementaryStreams;S[o.AUDIO]=null,S[o.VIDEO]=null,S[o.AUDIOVIDEO]=null},p(i,[{key:"decryptdata",get:function(){var S=this.levelkeys;if(!S&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var f=this.levelkeys.identity;if(f)this._decryptdata=f.getDecryptData(this.sn);else{var _=Object.keys(this.levelkeys);if(_.length===1)return this._decryptdata=this.levelkeys[_[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!(0,M.isFiniteNumber)(this.programDateTime))return null;var S=(0,M.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+S*1e3}},{key:"encrypted",get:function(){var S;if((S=this._decryptdata)!==null&&S!==void 0&&S.encrypted)return!0;if(this.levelkeys){var f=Object.keys(this.levelkeys),_=f.length;if(_>1||_===1&&this.levelkeys[f[0]].encrypted)return!0}return!1}}]),i}(c),u=function(s){O(i,s);function i(t,m,S,f,_){var A;A=s.call(this,S)||this,A.fragOffset=0,A.duration=0,A.gap=!1,A.independent=!1,A.relurl=void 0,A.fragment=void 0,A.index=void 0,A.stats=new e.LoadStats,A.duration=t.decimalFloatingPoint("DURATION"),A.gap=t.bool("GAP"),A.independent=t.bool("INDEPENDENT"),A.relurl=t.enumeratedString("URI"),A.fragment=m,A.index=f;var x=t.enumeratedString("BYTERANGE");return x&&A.setByteRange(x,_),_&&(A.fragOffset=_.fragOffset+_.duration),A}return p(i,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var m=this.elementaryStreams;return!!(m.audio||m.video||m.audiovideo)}}]),i}(c)},"./src/loader/key-loader.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>k});var M=L("./src/errors.ts"),P=L("./src/loader/fragment-loader.ts"),k=function(){function e(D){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=D}var O=e.prototype;return O.abort=function(){for(var l in this.keyUriToKeyInfo){var p=this.keyUriToKeyInfo[l].loader;p&&p.abort()}},O.detach=function(){for(var l in this.keyUriToKeyInfo){var p=this.keyUriToKeyInfo[l];(p.mediaKeySessionContext||p.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[l]}},O.destroy=function(){this.detach();for(var l in this.keyUriToKeyInfo){var p=this.keyUriToKeyInfo[l].loader;p&&p.destroy()}this.keyUriToKeyInfo={}},O.createKeyLoadError=function(l,p,h,g){return p===void 0&&(p=M.ErrorDetails.KEY_LOAD_ERROR),new P.LoadError({type:M.ErrorTypes.NETWORK_ERROR,details:p,fatal:!1,frag:l,networkDetails:h})},O.loadClear=function(l,p){var h=this;if(this.emeController&&this.config.emeEnabled)for(var g=l.sn,o=l.cc,c=function(i){var t=p[i];if(o<=t.cc&&(g==="initSegment"||g<t.sn))return h.emeController.selectKeySystemFormat(t).then(function(m){t.setKeyFormat(m)}),"break"},y=0;y<p.length;y++){var u=c(y);if(u==="break")break}},O.load=function(l){var p=this;return!l.decryptdata&&l.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(l).then(function(h){return p.loadInternal(l,h)}):this.loadInternal(l)},O.loadInternal=function(l,p){var h,g;p&&l.setKeyFormat(p);var o=l.decryptdata;if(!o){var c=p?"Expected frag.decryptdata to be defined after setting format "+p:"Missing decryption data on fragment in onKeyLoading";return Promise.reject(this.createKeyLoadError(l,M.ErrorDetails.KEY_LOAD_ERROR,null,c))}var y=o.uri;if(!y)return Promise.reject(this.createKeyLoadError(l,M.ErrorDetails.KEY_LOAD_ERROR,null,'Invalid key URI: "'+y+'"'));var u=this.keyUriToKeyInfo[y];if((h=u)!==null&&h!==void 0&&h.decryptdata.key)return o.key=u.decryptdata.key,Promise.resolve({frag:l,keyInfo:u});if((g=u)!==null&&g!==void 0&&g.keyLoadPromise){var s;switch((s=u.mediaKeySessionContext)===null||s===void 0?void 0:s.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return u.keyLoadPromise.then(function(i){return o.key=i.keyInfo.decryptdata.key,{frag:l,keyInfo:u}})}}switch(u=this.keyUriToKeyInfo[y]={decryptdata:o,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},o.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return o.keyFormat==="identity"?this.loadKeyHTTP(u,l):this.loadKeyEME(u,l);case"AES-128":return this.loadKeyHTTP(u,l);default:return Promise.reject(this.createKeyLoadError(l,M.ErrorDetails.KEY_LOAD_ERROR,null,'Key supplied with unsupported METHOD: "'+o.method+'"'))}},O.loadKeyEME=function(l,p){var h={frag:p,keyInfo:l};if(this.emeController&&this.config.emeEnabled){var g=this.emeController.loadKey(h);if(g)return(l.keyLoadPromise=g.then(function(o){return l.mediaKeySessionContext=o,h})).catch(function(o){throw l.keyLoadPromise=null,o})}return Promise.resolve(h)},O.loadKeyHTTP=function(l,p){var h=this,g=this.config,o=g.loader,c=new o(g);return p.keyLoader=l.loader=c,l.keyLoadPromise=new Promise(function(y,u){var s={keyInfo:l,frag:p,responseType:"arraybuffer",url:l.decryptdata.uri},i={timeout:g.fragLoadingTimeOut,maxRetry:0,retryDelay:g.fragLoadingRetryDelay,maxRetryDelay:g.fragLoadingMaxRetryTimeout,highWaterMark:0},t={onSuccess:function(S,f,_,A){var x=_.frag,w=_.keyInfo,n=_.url;if(!x.decryptdata||w!==h.keyUriToKeyInfo[n])return u(h.createKeyLoadError(x,M.ErrorDetails.KEY_LOAD_ERROR,A,"after key load, decryptdata unset or changed"));w.decryptdata.key=x.decryptdata.key=new Uint8Array(S.data),x.keyLoader=null,w.loader=null,y({frag:x,keyInfo:w})},onError:function(S,f,_){h.resetLoader(f),u(h.createKeyLoadError(p,M.ErrorDetails.KEY_LOAD_ERROR,_))},onTimeout:function(S,f,_){h.resetLoader(f),u(h.createKeyLoadError(p,M.ErrorDetails.KEY_LOAD_TIMEOUT,_))},onAbort:function(S,f,_){h.resetLoader(f),u(h.createKeyLoadError(p,M.ErrorDetails.INTERNAL_ABORTED,_))}};c.load(s,i,t)})},O.resetLoader=function(l){var p=l.frag,h=l.keyInfo,g=l.url,o=h.loader;p.keyLoader===o&&(p.keyLoader=null,h.loader=null),delete this.keyUriToKeyInfo[g],o&&o.destroy()},e}()},"./src/loader/level-details.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{LevelDetails:()=>l});var M=L("./src/polyfills/number.ts");function P(p,h){for(var g=0;g<h.length;g++){var o=h[g];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(p,e(o.key),o)}}function k(p,h,g){return h&&P(p.prototype,h),g&&P(p,g),Object.defineProperty(p,"prototype",{writable:!1}),p}function e(p){var h=O(p,"string");return typeof h=="symbol"?h:String(h)}function O(p,h){if(typeof p!="object"||p===null)return p;var g=p[Symbol.toPrimitive];if(g!==void 0){var o=g.call(p,h||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(p)}var D=10,l=function(){function p(g){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=g}var h=p.prototype;return h.reloaded=function(o){if(!o){this.advanced=!0,this.updated=!0;return}var c=this.lastPartSn-o.lastPartSn,y=this.lastPartIndex-o.lastPartIndex;this.updated=this.endSN!==o.endSN||!!y||!!c,this.advanced=this.endSN>o.endSN||c>0||c===0&&y>0,this.updated||this.advanced?this.misses=Math.floor(o.misses*.6):this.misses=o.misses+1,this.availabilityDelay=o.availabilityDelay},k(p,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?(0,M.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||D}},{key:"drift",get:function(){var o=this.driftEndTime-this.driftStartTime;if(o>0){var c=this.driftEnd-this.driftStart;return c*1e3/o}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var o;return(o=this.partList)!==null&&o!==void 0&&o.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var o;return(o=this.fragments)!==null&&o!==void 0&&o.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var o;return(o=this.partList)!==null&&o!==void 0&&o.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var o;return(o=this.partList)!==null&&o!==void 0&&o.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),p}()},"./src/loader/level-key.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{LevelKey:()=>l});var M=L("./src/utils/keysystem-util.ts"),P=L("./src/utils/mediakeys-helper.ts"),k=L("./src/utils/mp4-tools.ts"),e=L("./src/utils/logger.ts"),O=L("./src/utils/numeric-encoding-utils.ts"),D={},l=function(){h.clearKeyUriToKeyIdMap=function(){D={}};function h(o,c,y,u,s){u===void 0&&(u=[1]),s===void 0&&(s=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=o,this.uri=c,this.keyFormat=y,this.keyFormatVersions=u,this.iv=s,this.encrypted=o?o!=="NONE":!1,this.isCommonEncryption=this.encrypted&&o!=="AES-128"}var g=h.prototype;return g.isSupported=function(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;switch(this.keyFormat){case"identity":return this.method==="SAMPLE-AES";case P.KeySystemFormats.FAIRPLAY:case P.KeySystemFormats.WIDEVINE:case P.KeySystemFormats.PLAYREADY:case P.KeySystemFormats.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1},g.getDecryptData=function(c){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof c!="number"&&(this.method==="AES-128"&&!this.iv&&e.logger.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),c=0);var y=p(c),u=new h(this.method,this.uri,"identity",this.keyFormatVersions,y);return u}var s=(0,M.convertDataUriToArrayBytes)(this.uri);if(s)switch(this.keyFormat){case P.KeySystemFormats.WIDEVINE:this.pssh=s,s.length>=22&&(this.keyId=s.subarray(s.length-22,s.length-6));break;case P.KeySystemFormats.PLAYREADY:{var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=(0,k.mp4pssh)(i,null,s);var t=new Uint16Array(s.buffer,s.byteOffset,s.byteLength/2),m=String.fromCharCode.apply(null,Array.from(t)),S=m.substring(m.indexOf("<"),m.length),f=new DOMParser,_=f.parseFromString(S,"text/xml"),A=_.getElementsByTagName("KID")[0];if(A){var x=A.childNodes[0]?A.childNodes[0].nodeValue:A.getAttribute("VALUE");if(x){var w=(0,O.base64Decode)(x).subarray(0,16);(0,M.changeEndianness)(w),this.keyId=w}}break}default:{var n=s.subarray(0,16);if(n.length!==16){var a=new Uint8Array(16);a.set(n,16-n.length),n=a}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){var r=D[this.uri];if(!r){var d=Object.keys(D).length%Number.MAX_SAFE_INTEGER;r=new Uint8Array(16);var T=new DataView(r.buffer,12,4);T.setUint32(0,d),D[this.uri]=r}this.keyId=r}return this},h}();function p(h){for(var g=new Uint8Array(16),o=12;o<16;o++)g[o]=h>>8*(15-o)&255;return g}},"./src/loader/load-stats.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{LoadStats:()=>M});var M=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>i});var M=L("./src/polyfills/number.ts"),P=L("./node_modules/url-toolkit/src/url-toolkit.js"),k=L.n(P),e=L("./src/loader/date-range.ts"),O=L("./src/loader/fragment.ts"),D=L("./src/loader/level-details.ts"),l=L("./src/loader/level-key.ts"),p=L("./src/utils/attr-list.ts"),h=L("./src/utils/logger.ts"),g=L("./src/utils/codecs.ts");function o(){return o=Object.assign?Object.assign.bind():function(w){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(w[r]=a[r])}return w},o.apply(this,arguments)}var c=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+|#EXT-X-SESSION-KEY:([^\n\r]*)[\r\n]+/g,y=/#EXT-X-MEDIA:(.*)/g,u=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),s=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),i=function(){function w(){}return w.findGroup=function(a,r){for(var d=0;d<a.length;d++){var T=a[d];if(T.id===r)return T}},w.convertAVC1ToAVCOTI=function(a){var r=a.split(".");if(r.length>2){var d=r.shift()+".";return d+=parseInt(r.shift()).toString(16),d+=("000"+parseInt(r.shift()).toString(16)).slice(-4),d}return a},w.resolve=function(a,r){return(0,P.buildAbsoluteURL)(r,a,{alwaysNormalize:!0})},w.parseMasterPlaylist=function(a,r){var d=[],T=[],b={},v=[],E=!1;c.lastIndex=0;for(var R;(R=c.exec(a))!=null;)if(R[1]){var C,N=new p.AttrList(R[1]),K={attrs:N,bitrate:N.decimalInteger("AVERAGE-BANDWIDTH")||N.decimalInteger("BANDWIDTH"),name:N.NAME,url:w.resolve(R[2],r)},H=N.decimalResolution("RESOLUTION");H&&(K.width=H.width,K.height=H.height),m((N.CODECS||"").split(/[ ,]+/).filter(function(Ee){return Ee}),K),K.videoCodec&&K.videoCodec.indexOf("avc1")!==-1&&(K.videoCodec=w.convertAVC1ToAVCOTI(K.videoCodec)),(C=K.unknownCodecs)!==null&&C!==void 0&&C.length||T.push(K),d.push(K)}else if(R[3]){var ee=new p.AttrList(R[3]);ee["DATA-ID"]&&(E=!0,b[ee["DATA-ID"]]=ee)}else if(R[4]){var J=R[4],se=t(J,r);se.encrypted&&se.isSupported()?v.push(se):h.logger.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+J+'"')}var G=T.length>0&&T.length<d.length;return{levels:G?T:d,sessionData:E?b:null,sessionKeys:v.length?v:null}},w.parseMasterPlaylistMedia=function(a,r,d,T){T===void 0&&(T=[]);var b,v=[],E=0;for(y.lastIndex=0;(b=y.exec(a))!==null;){var R=new p.AttrList(b[1]);if(R.TYPE===d){var C={attrs:R,bitrate:0,id:E++,groupId:R["GROUP-ID"],instreamId:R["INSTREAM-ID"],name:R.NAME||R.LANGUAGE||"",type:d,default:R.bool("DEFAULT"),autoselect:R.bool("AUTOSELECT"),forced:R.bool("FORCED"),lang:R.LANGUAGE,url:R.URI?w.resolve(R.URI,r):""};if(T.length){var N=w.findGroup(T,C.groupId)||T[0];S(C,N,"audioCodec"),S(C,N,"textCodec")}v.push(C)}}return v},w.parseLevelPlaylist=function(a,r,d,T,b){var v=new D.LevelDetails(r),E=v.fragments,R=null,C=0,N=0,K=0,H=0,ee=null,J=new O.Fragment(T,r),se,G,Ee,ge=-1,Pe=!1;for(u.lastIndex=0,v.m3u8=a;(se=u.exec(a))!==null;){Pe&&(Pe=!1,J=new O.Fragment(T,r),J.start=K,J.sn=C,J.cc=H,J.level=d,R&&(J.initSegment=R,J.rawProgramDateTime=R.rawProgramDateTime,R.rawProgramDateTime=null));var Ne=se[1];if(Ne){J.duration=parseFloat(Ne);var $e=(" "+se[2]).slice(1);J.title=$e||null,J.tagList.push($e?["INF",Ne,$e]:["INF",Ne])}else if(se[3])(0,M.isFiniteNumber)(J.duration)&&(J.start=K,Ee&&x(J,Ee,v),J.sn=C,J.level=d,J.cc=H,J.urlId=b,E.push(J),J.relurl=(" "+se[3]).slice(1),_(J,ee),ee=J,K+=J.duration,C++,N=0,Pe=!0);else if(se[4]){var je=(" "+se[4]).slice(1);ee?J.setByteRange(je,ee):J.setByteRange(je)}else if(se[5])J.rawProgramDateTime=(" "+se[5]).slice(1),J.tagList.push(["PROGRAM-DATE-TIME",J.rawProgramDateTime]),ge===-1&&(ge=E.length);else{if(se=se[0].match(s),!se){h.logger.warn("No matches on slow regex match for level playlist!");continue}for(G=1;G<se.length&&typeof se[G]=="undefined";G++);var Ce=(" "+se[G]).slice(1),fe=(" "+se[G+1]).slice(1),Be=se[G+2]?(" "+se[G+2]).slice(1):"";switch(Ce){case"PLAYLIST-TYPE":v.type=fe.toUpperCase();break;case"MEDIA-SEQUENCE":C=v.startSN=parseInt(fe);break;case"SKIP":{var Ue=new p.AttrList(fe),re=Ue.decimalInteger("SKIPPED-SEGMENTS");if((0,M.isFiniteNumber)(re)){v.skippedSegments=re;for(var Z=re;Z--;)E.unshift(null);C+=re}var le=Ue.enumeratedString("RECENTLY-REMOVED-DATERANGES");le&&(v.recentlyRemovedDateranges=le.split(" "));break}case"TARGETDURATION":v.targetduration=parseFloat(fe);break;case"VERSION":v.version=parseInt(fe);break;case"EXTM3U":break;case"ENDLIST":v.live=!1;break;case"#":(fe||Be)&&J.tagList.push(Be?[fe,Be]:[fe]);break;case"DISCONTINUITY":H++,J.tagList.push(["DIS"]);break;case"GAP":J.tagList.push([Ce]);break;case"BITRATE":J.tagList.push([Ce,fe]);break;case"DATERANGE":{var we=new p.AttrList(fe),ue=new e.DateRange(we,v.dateRanges[we.ID]);ue.isValid||v.skippedSegments?v.dateRanges[ue.id]=ue:h.logger.warn('Ignoring invalid DATERANGE tag: "'+fe+'"'),J.tagList.push(["EXT-X-DATERANGE",fe]);break}case"DISCONTINUITY-SEQUENCE":H=parseInt(fe);break;case"KEY":{var pe=t(fe,r);if(pe.isSupported()){if(pe.method==="NONE"){Ee=void 0;break}Ee||(Ee={}),Ee[pe.keyFormat]&&(Ee=o({},Ee)),Ee[pe.keyFormat]=pe}else h.logger.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+fe+'"');break}case"START":{var ae=new p.AttrList(fe),_e=ae.decimalFloatingPoint("TIME-OFFSET");(0,M.isFiniteNumber)(_e)&&(v.startTimeOffset=_e);break}case"MAP":{var ce=new p.AttrList(fe);if(J.duration){var he=new O.Fragment(T,r);A(he,ce,d,Ee),R=he,J.initSegment=R,R.rawProgramDateTime&&!J.rawProgramDateTime&&(J.rawProgramDateTime=R.rawProgramDateTime)}else A(J,ce,d,Ee),R=J,Pe=!0;break}case"SERVER-CONTROL":{var Le=new p.AttrList(fe);v.canBlockReload=Le.bool("CAN-BLOCK-RELOAD"),v.canSkipUntil=Le.optionalFloat("CAN-SKIP-UNTIL",0),v.canSkipDateRanges=v.canSkipUntil>0&&Le.bool("CAN-SKIP-DATERANGES"),v.partHoldBack=Le.optionalFloat("PART-HOLD-BACK",0),v.holdBack=Le.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ye=new p.AttrList(fe);v.partTarget=Ye.decimalFloatingPoint("PART-TARGET");break}case"PART":{var ke=v.partList;ke||(ke=v.partList=[]);var be=N>0?ke[ke.length-1]:void 0,Re=N++,Fe=new O.Part(new p.AttrList(fe),J,r,Re,be);ke.push(Fe),J.duration+=Fe.duration;break}case"PRELOAD-HINT":{var Ae=new p.AttrList(fe);v.preloadHint=Ae;break}case"RENDITION-REPORT":{var Me=new p.AttrList(fe);v.renditionReports=v.renditionReports||[],v.renditionReports.push(Me);break}default:h.logger.warn("line parsed but not handled: "+se);break}}}ee&&!ee.relurl?(E.pop(),K-=ee.duration,v.partList&&(v.fragmentHint=ee)):v.partList&&(_(J,ee),J.cc=H,v.fragmentHint=J,Ee&&x(J,Ee,v));var rt=E.length,lt=E[0],Ze=E[rt-1];if(K+=v.skippedSegments*v.targetduration,K>0&&rt&&Ze){v.averagetargetduration=K/rt;var ft=Ze.sn;v.endSN=ft!=="initSegment"?ft:0,v.live||(Ze.endList=!0),lt&&(v.startCC=lt.cc)}else v.endSN=0,v.startCC=0;return v.fragmentHint&&(K+=v.fragmentHint.duration),v.totalduration=K,v.endCC=H,ge>0&&f(E,ge),v},w}();function t(w,n){var a,r,d=new p.AttrList(w),T=(a=d.enumeratedString("METHOD"))!=null?a:"",b=d.URI,v=d.hexadecimalInteger("IV"),E=d.enumeratedString("KEYFORMATVERSIONS"),R=(r=d.enumeratedString("KEYFORMAT"))!=null?r:"identity";b&&d.IV&&!v&&h.logger.error("Invalid IV: "+d.IV);var C=b?i.resolve(b,n):"",N=(E||"1").split("/").map(Number).filter(Number.isFinite);return new l.LevelKey(T,C,R,N,v)}function m(w,n){["video","audio","text"].forEach(function(a){var r=w.filter(function(T){return(0,g.isCodecType)(T,a)});if(r.length){var d=r.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});n[a+"Codec"]=d.length>0?d[0]:r[0],w=w.filter(function(T){return r.indexOf(T)===-1})}}),n.unknownCodecs=w}function S(w,n,a){var r=n[a];r&&(w[a]=r)}function f(w,n){for(var a=w[n],r=n;r--;){var d=w[r];if(!d)return;d.programDateTime=a.programDateTime-d.duration*1e3,a=d}}function _(w,n){w.rawProgramDateTime?w.programDateTime=Date.parse(w.rawProgramDateTime):n!=null&&n.programDateTime&&(w.programDateTime=n.endProgramDateTime),(0,M.isFiniteNumber)(w.programDateTime)||(w.programDateTime=null,w.rawProgramDateTime=null)}function A(w,n,a,r){w.relurl=n.URI,n.BYTERANGE&&w.setByteRange(n.BYTERANGE),w.level=a,w.sn="initSegment",r&&(w.levelkeys=r),w.initSegment=null}function x(w,n,a){w.levelkeys=n;var r=a.encryptedFragments;(!r.length||r[r.length-1].levelkeys!==n)&&Object.keys(n).some(function(d){return n[d].isCommonEncryption})&&r.push(w)}},"./src/loader/playlist-loader.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>o});var M=L("./src/polyfills/number.ts"),P=L("./src/events.ts"),k=L("./src/errors.ts"),e=L("./src/utils/logger.ts"),O=L("./src/loader/m3u8-parser.ts"),D=L("./src/types/loader.ts"),l=L("./src/utils/attr-list.ts");function p(c){var y=c.type;switch(y){case D.PlaylistContextType.AUDIO_TRACK:return D.PlaylistLevelType.AUDIO;case D.PlaylistContextType.SUBTITLE_TRACK:return D.PlaylistLevelType.SUBTITLE;default:return D.PlaylistLevelType.MAIN}}function h(c,y){var u=c.url;return(u===void 0||u.indexOf("data:")===0)&&(u=y.url),u}var g=function(){function c(u){this.hls=void 0,this.loaders=Object.create(null),this.hls=u,this.registerListeners()}var y=c.prototype;return y.startLoad=function(s){},y.stopLoad=function(){this.destroyInternalLoaders()},y.registerListeners=function(){var s=this.hls;s.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),s.on(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},y.unregisterListeners=function(){var s=this.hls;s.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),s.off(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},y.createInternalLoader=function(s){var i=this.hls.config,t=i.pLoader,m=i.loader,S=t||m,f=new S(i);return s.loader=f,this.loaders[s.type]=f,f},y.getInternalLoader=function(s){return this.loaders[s.type]},y.resetInternalLoader=function(s){this.loaders[s]&&delete this.loaders[s]},y.destroyInternalLoaders=function(){for(var s in this.loaders){var i=this.loaders[s];i&&i.destroy(),this.resetInternalLoader(s)}},y.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},y.onManifestLoading=function(s,i){var t=i.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:D.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},y.onLevelLoading=function(s,i){var t=i.id,m=i.level,S=i.url,f=i.deliveryDirectives;this.load({id:t,groupId:null,level:m,responseType:"text",type:D.PlaylistContextType.LEVEL,url:S,deliveryDirectives:f})},y.onAudioTrackLoading=function(s,i){var t=i.id,m=i.groupId,S=i.url,f=i.deliveryDirectives;this.load({id:t,groupId:m,level:null,responseType:"text",type:D.PlaylistContextType.AUDIO_TRACK,url:S,deliveryDirectives:f})},y.onSubtitleTrackLoading=function(s,i){var t=i.id,m=i.groupId,S=i.url,f=i.deliveryDirectives;this.load({id:t,groupId:m,level:null,responseType:"text",type:D.PlaylistContextType.SUBTITLE_TRACK,url:S,deliveryDirectives:f})},y.load=function(s){var i,t=this.hls.config,m=this.getInternalLoader(s);if(m){var S=m.context;if(S&&S.url===s.url){e.logger.trace("[playlist-loader]: playlist request ongoing");return}e.logger.log("[playlist-loader]: aborting previous loader for type: "+s.type),m.abort()}var f,_,A,x;switch(s.type){case D.PlaylistContextType.MANIFEST:f=t.manifestLoadingMaxRetry,_=t.manifestLoadingTimeOut,A=t.manifestLoadingRetryDelay,x=t.manifestLoadingMaxRetryTimeout;break;case D.PlaylistContextType.LEVEL:case D.PlaylistContextType.AUDIO_TRACK:case D.PlaylistContextType.SUBTITLE_TRACK:f=0,_=t.levelLoadingTimeOut;break;default:f=t.levelLoadingMaxRetry,_=t.levelLoadingTimeOut,A=t.levelLoadingRetryDelay,x=t.levelLoadingMaxRetryTimeout;break}if(m=this.createInternalLoader(s),(i=s.deliveryDirectives)!==null&&i!==void 0&&i.part){var w;if(s.type===D.PlaylistContextType.LEVEL&&s.level!==null?w=this.hls.levels[s.level].details:s.type===D.PlaylistContextType.AUDIO_TRACK&&s.id!==null?w=this.hls.audioTracks[s.id].details:s.type===D.PlaylistContextType.SUBTITLE_TRACK&&s.id!==null&&(w=this.hls.subtitleTracks[s.id].details),w){var n=w.partTarget,a=w.targetduration;n&&a&&(_=Math.min(Math.max(n*3,a*.8)*1e3,_))}}var r={timeout:_,maxRetry:f,retryDelay:A,maxRetryDelay:x,highWaterMark:0},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};m.load(s,r,d)},y.loadsuccess=function(s,i,t,m){m===void 0&&(m=null),this.resetInternalLoader(t.type);var S=s.data;if(S.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(s,t,"no EXTM3U delimiter",m);return}i.parsing.start=performance.now(),S.indexOf("#EXTINF:")>0||S.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(s,i,t,m):this.handleMasterPlaylist(s,i,t,m)},y.loaderror=function(s,i,t){t===void 0&&(t=null),this.handleNetworkError(i,t,!1,s)},y.loadtimeout=function(s,i,t){t===void 0&&(t=null),this.handleNetworkError(i,t,!0)},y.handleMasterPlaylist=function(s,i,t,m){var S=this.hls,f=s.data,_=h(s,t),A=O.default.parseMasterPlaylist(f,_),x=A.levels,w=A.sessionData,n=A.sessionKeys;if(!x.length){this.handleManifestParsingError(s,t,"no level found in manifest",m);return}var a=x.map(function(E){return{id:E.attrs.AUDIO,audioCodec:E.audioCodec}}),r=x.map(function(E){return{id:E.attrs.SUBTITLES,textCodec:E.textCodec}}),d=O.default.parseMasterPlaylistMedia(f,_,"AUDIO",a),T=O.default.parseMasterPlaylistMedia(f,_,"SUBTITLES",r),b=O.default.parseMasterPlaylistMedia(f,_,"CLOSED-CAPTIONS");if(d.length){var v=d.some(function(E){return!E.url});!v&&x[0].audioCodec&&!x[0].attrs.AUDIO&&(e.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),d.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new l.AttrList({}),bitrate:0,url:""}))}S.trigger(P.Events.MANIFEST_LOADED,{levels:x,audioTracks:d,subtitles:T,captions:b,url:_,stats:i,networkDetails:m,sessionData:w,sessionKeys:n})},y.handleTrackOrLevelPlaylist=function(s,i,t,m){var S=this.hls,f=t.id,_=t.level,A=t.type,x=h(s,t),w=(0,M.isFiniteNumber)(f)?f:0,n=(0,M.isFiniteNumber)(_)?_:w,a=p(t),r=O.default.parseLevelPlaylist(s.data,x,n,a,w);if(!r.fragments.length){S.trigger(P.Events.ERROR,{type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:x,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(A===D.PlaylistContextType.MANIFEST){var d={attrs:new l.AttrList({}),bitrate:0,details:r,name:"",url:x};S.trigger(P.Events.MANIFEST_LOADED,{levels:[d],audioTracks:[],url:x,stats:i,networkDetails:m,sessionData:null,sessionKeys:null})}i.parsing.end=performance.now(),t.levelDetails=r,this.handlePlaylistLoaded(s,i,t,m)},y.handleManifestParsingError=function(s,i,t,m){this.hls.trigger(P.Events.ERROR,{type:k.ErrorTypes.NETWORK_ERROR,details:k.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:i.type===D.PlaylistContextType.MANIFEST,url:s.url,reason:t,response:s,context:i,networkDetails:m})},y.handleNetworkError=function(s,i,t,m){t===void 0&&(t=!1),e.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+s.type+" level: "+s.level+" id: "+s.id+' group-id: "'+s.groupId+'"');var S=k.ErrorDetails.UNKNOWN,f=!1,_=this.getInternalLoader(s);switch(s.type){case D.PlaylistContextType.MANIFEST:S=t?k.ErrorDetails.MANIFEST_LOAD_TIMEOUT:k.ErrorDetails.MANIFEST_LOAD_ERROR,f=!0;break;case D.PlaylistContextType.LEVEL:S=t?k.ErrorDetails.LEVEL_LOAD_TIMEOUT:k.ErrorDetails.LEVEL_LOAD_ERROR,f=!1;break;case D.PlaylistContextType.AUDIO_TRACK:S=t?k.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:k.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,f=!1;break;case D.PlaylistContextType.SUBTITLE_TRACK:S=t?k.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:k.ErrorDetails.SUBTITLE_LOAD_ERROR,f=!1;break}_&&this.resetInternalLoader(s.type);var A={type:k.ErrorTypes.NETWORK_ERROR,details:S,fatal:f,url:s.url,loader:_,context:s,networkDetails:i};m&&(A.response=m),this.hls.trigger(P.Events.ERROR,A)},y.handlePlaylistLoaded=function(s,i,t,m){var S=t.type,f=t.level,_=t.id,A=t.groupId,x=t.loader,w=t.levelDetails,n=t.deliveryDirectives;if(!(w!=null&&w.targetduration)){this.handleManifestParsingError(s,t,"invalid target duration",m);return}if(x)switch(w.live&&(x.getCacheAge&&(w.ageHeader=x.getCacheAge()||0),(!x.getCacheAge||isNaN(w.ageHeader))&&(w.ageHeader=0)),S){case D.PlaylistContextType.MANIFEST:case D.PlaylistContextType.LEVEL:this.hls.trigger(P.Events.LEVEL_LOADED,{details:w,level:f||0,id:_||0,stats:i,networkDetails:m,deliveryDirectives:n});break;case D.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:w,id:_||0,groupId:A||"",stats:i,networkDetails:m,deliveryDirectives:n});break;case D.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:w,id:_||0,groupId:A||"",stats:i,networkDetails:m,deliveryDirectives:n});break}},c}();const o=g},"./src/polyfills/number.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{MAX_SAFE_INTEGER:()=>P,isFiniteNumber:()=>M});var M=Number.isFinite||function(k){return typeof k=="number"&&isFinite(k)},P=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>P});var M=function(){function k(){}return k.getSilentFrame=function(O,D){switch(O){case"mp4a.40.2":if(D===1)return new Uint8Array([0,200,0,128,35,128]);if(D===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(D===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(D===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(D===5)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(D===6)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]);break;default:if(D===1)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(D===2)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]);if(D===3)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]);break}},k}();const P=M},"./src/remux/mp4-generator.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>k});var M=Math.pow(2,32)-1,P=function(){function e(){}return e.init=function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var D;for(D in e.types)e.types.hasOwnProperty(D)&&(e.types[D]=[D.charCodeAt(0),D.charCodeAt(1),D.charCodeAt(2),D.charCodeAt(3)]);var l=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),p=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:l,audio:p};var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),g=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=g,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),y=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,y,o,c),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,h))},e.box=function(D){for(var l=8,p=arguments.length,h=new Array(p>1?p-1:0),g=1;g<p;g++)h[g-1]=arguments[g];for(var o=h.length,c=o;o--;)l+=h[o].byteLength;var y=new Uint8Array(l);for(y[0]=l>>24&255,y[1]=l>>16&255,y[2]=l>>8&255,y[3]=l&255,y.set(D,4),o=0,l=8;o<c;o++)y.set(h[o],l),l+=h[o].byteLength;return y},e.hdlr=function(D){return e.box(e.types.hdlr,e.HDLR_TYPES[D])},e.mdat=function(D){return e.box(e.types.mdat,D)},e.mdhd=function(D,l){l*=D;var p=Math.floor(l/(M+1)),h=Math.floor(l%(M+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,D>>24&255,D>>16&255,D>>8&255,D&255,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&255,85,196,0,0]))},e.mdia=function(D){return e.box(e.types.mdia,e.mdhd(D.timescale,D.duration),e.hdlr(D.type),e.minf(D))},e.mfhd=function(D){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,D>>24,D>>16&255,D>>8&255,D&255]))},e.minf=function(D){return D.type==="audio"?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(D)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(D))},e.moof=function(D,l,p){return e.box(e.types.moof,e.mfhd(D),e.traf(p,l))},e.moov=function(D){for(var l=D.length,p=[];l--;)p[l]=e.trak(D[l]);return e.box.apply(null,[e.types.moov,e.mvhd(D[0].timescale,D[0].duration)].concat(p).concat(e.mvex(D)))},e.mvex=function(D){for(var l=D.length,p=[];l--;)p[l]=e.trex(D[l]);return e.box.apply(null,[e.types.mvex].concat(p))},e.mvhd=function(D,l){l*=D;var p=Math.floor(l/(M+1)),h=Math.floor(l%(M+1)),g=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,D>>24&255,D>>16&255,D>>8&255,D&255,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,g)},e.sdtp=function(D){var l=D.samples||[],p=new Uint8Array(4+l.length),h,g;for(h=0;h<l.length;h++)g=l[h].flags,p[h+4]=g.dependsOn<<4|g.isDependedOn<<2|g.hasRedundancy;return e.box(e.types.sdtp,p)},e.stbl=function(D){return e.box(e.types.stbl,e.stsd(D),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(D){var l=[],p=[],h,g,o;for(h=0;h<D.sps.length;h++)g=D.sps[h],o=g.byteLength,l.push(o>>>8&255),l.push(o&255),l=l.concat(Array.prototype.slice.call(g));for(h=0;h<D.pps.length;h++)g=D.pps[h],o=g.byteLength,p.push(o>>>8&255),p.push(o&255),p=p.concat(Array.prototype.slice.call(g));var c=e.box(e.types.avcC,new Uint8Array([1,l[3],l[4],l[5],255,224|D.sps.length].concat(l).concat([D.pps.length]).concat(p))),y=D.width,u=D.height,s=D.pixelRatio[0],i=D.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,y>>8&255,y&255,u>>8&255,u&255,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]),c,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,i>>24,i>>16&255,i>>8&255,i&255])))},e.esds=function(D){var l=D.config.length;return new Uint8Array([0,0,0,0,3,23+l,0,1,0,4,15+l,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([l]).concat(D.config).concat([6,1,2]))},e.mp4a=function(D){var l=D.samplerate;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,D.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]),e.box(e.types.esds,e.esds(D)))},e.mp3=function(D){var l=D.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,D.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]))},e.stsd=function(D){return D.type==="audio"?D.segmentCodec==="mp3"&&D.codec==="mp3"?e.box(e.types.stsd,e.STSD,e.mp3(D)):e.box(e.types.stsd,e.STSD,e.mp4a(D)):e.box(e.types.stsd,e.STSD,e.avc1(D))},e.tkhd=function(D){var l=D.id,p=D.duration*D.timescale,h=D.width,g=D.height,o=Math.floor(p/(M+1)),c=Math.floor(p%(M+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,l&255,0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,h>>8&255,h&255,0,0,g>>8&255,g&255,0,0]))},e.traf=function(D,l){var p=e.sdtp(D),h=D.id,g=Math.floor(l/(M+1)),o=Math.floor(l%(M+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,g>>24,g>>16&255,g>>8&255,g&255,o>>24,o>>16&255,o>>8&255,o&255])),e.trun(D,p.length+16+20+8+16+8+8),p)},e.trak=function(D){return D.duration=D.duration||4294967295,e.box(e.types.trak,e.tkhd(D),e.mdia(D))},e.trex=function(D){var l=D.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(D,l){var p=D.samples||[],h=p.length,g=12+16*h,o=new Uint8Array(g),c,y,u,s,i,t;for(l+=8+g,o.set([D.type==="video"?1:0,0,15,1,h>>>24&255,h>>>16&255,h>>>8&255,h&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255],0),c=0;c<h;c++)y=p[c],u=y.duration,s=y.size,i=y.flags,t=y.cts,o.set([u>>>24&255,u>>>16&255,u>>>8&255,u&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&61440,i.degradPrio&15,t>>>24&255,t>>>16&255,t>>>8&255,t&255],12+16*c);return e.box(e.types.trun,o)},e.initSegment=function(D){e.types||e.init();var l=e.moov(D),p=new Uint8Array(e.FTYP.byteLength+l.byteLength);return p.set(e.FTYP),p.set(l,e.FTYP.byteLength),p},e}();P.types=void 0,P.HDLR_TYPES=void 0,P.STTS=void 0,P.STSC=void 0,P.STCO=void 0,P.STSZ=void 0,P.VMHD=void 0,P.SMHD=void 0,P.STSD=void 0,P.FTYP=void 0,P.DINF=void 0;const k=P},"./src/remux/mp4-remuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>s,flushTextTrackMetadataCueSamples:()=>m,flushTextTrackUserdataCueSamples:()=>S,normalizePts:()=>i});var M=L("./src/polyfills/number.ts"),P=L("./src/remux/aac-helper.ts"),k=L("./src/remux/mp4-generator.ts"),e=L("./src/events.ts"),O=L("./src/errors.ts"),D=L("./src/utils/logger.ts"),l=L("./src/types/loader.ts"),p=L("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign?Object.assign.bind():function(A){for(var x=1;x<arguments.length;x++){var w=arguments[x];for(var n in w)Object.prototype.hasOwnProperty.call(w,n)&&(A[n]=w[n])}return A},h.apply(this,arguments)}var g=10*1e3,o=1024,c=1152,y=null,u=null,s=function(){function A(w,n,a,r){if(r===void 0&&(r=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=w,this.config=n,this.typeSupported=a,this.ISGenerated=!1,y===null){var d=navigator.userAgent||"",T=d.match(/Chrome\/(\d+)/i);y=T?parseInt(T[1]):0}if(u===null){var b=navigator.userAgent.match(/Safari\/(\d+)/i);u=b?parseInt(b[1]):0}}var x=A.prototype;return x.destroy=function(){},x.resetTimeStamp=function(n){D.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=n},x.resetNextTimestamp=function(){D.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},x.resetInitSegment=function(){D.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},x.getVideoStartPts=function(n){var a=!1,r=n.reduce(function(d,T){var b=T.pts-d;return b<-4294967296?(a=!0,i(d,T.pts)):b>0?d:T.pts},n[0].pts);return a&&D.logger.debug("PTS rollover detected"),r},x.remux=function(n,a,r,d,T,b,v,E){var R,C,N,K,H,ee,J=T,se=T,G=n.pid>-1,Ee=a.pid>-1,ge=a.samples.length,Pe=n.samples.length>0,Ne=v&&ge>0||ge>1,$e=(!G||Pe)&&(!Ee||Ne)||this.ISGenerated||v;if($e){this.ISGenerated||(N=this.generateIS(n,a,T));var je=this.isVideoContiguous,Ce=-1,fe;if(Ne&&(Ce=t(a.samples),!je&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,Ce>0){D.logger.warn("[mp4-remuxer]: Dropped "+Ce+" out of "+ge+" video samples due to a missing keyframe");var Be=this.getVideoStartPts(a.samples);a.samples=a.samples.slice(Ce),a.dropped+=Ce,se+=(a.samples[0].pts-Be)/a.inputTimeScale,fe=se}else Ce===-1&&(D.logger.warn("[mp4-remuxer]: No keyframe found out of "+ge+" video samples"),ee=!1);if(this.ISGenerated){if(Pe&&Ne){var Ue=this.getVideoStartPts(a.samples),re=i(n.samples[0].pts,Ue)-Ue,Z=re/a.inputTimeScale;J+=Math.max(0,Z),se+=Math.max(0,-Z)}if(Pe){if(n.samplerate||(D.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),N=this.generateIS(n,a,T)),C=this.remuxAudio(n,J,this.isAudioContiguous,b,Ee||Ne||E===l.PlaylistLevelType.AUDIO?se:void 0),Ne){var le=C?C.endPTS-C.startPTS:0;a.inputTimeScale||(D.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),N=this.generateIS(n,a,T)),R=this.remuxVideo(a,se,je,le)}}else Ne&&(R=this.remuxVideo(a,se,je,0));R&&(R.firstKeyFrame=Ce,R.independent=Ce!==-1,R.firstKeyFramePTS=fe)}}return this.ISGenerated&&(r.samples.length&&(H=m(r,T,this._initPTS,this._initDTS)),d.samples.length&&(K=S(d,T,this._initPTS))),{audio:C,video:R,initSegment:N,independent:ee,text:K,id3:H}},x.generateIS=function(n,a,r){var d=n.samples,T=a.samples,b=this.typeSupported,v={},E=!(0,M.isFiniteNumber)(this._initPTS),R="audio/mp4",C,N,K;if(E&&(C=N=1/0),n.config&&d.length){switch(n.timescale=n.samplerate,n.segmentCodec){case"mp3":b.mpeg?(R="audio/mpeg",n.codec=""):b.mp3&&(n.codec="mp3");break}v.audio={id:"audio",container:R,codec:n.codec,initSegment:n.segmentCodec==="mp3"&&b.mpeg?new Uint8Array(0):k.default.initSegment([n]),metadata:{channelCount:n.channelCount}},E&&(K=n.inputTimeScale,C=N=d[0].pts-Math.round(K*r))}if(a.sps&&a.pps&&T.length&&(a.timescale=a.inputTimeScale,v.video={id:"main",container:"video/mp4",codec:a.codec,initSegment:k.default.initSegment([a]),metadata:{width:a.width,height:a.height}},E)){K=a.inputTimeScale;var H=this.getVideoStartPts(T),ee=Math.round(K*r);N=Math.min(N,i(T[0].dts,H)-ee),C=Math.min(C,H-ee)}if(Object.keys(v).length)return this.ISGenerated=!0,E&&(this._initPTS=C,this._initDTS=N),{tracks:v,initPTS:C,timescale:K}},x.remuxVideo=function(n,a,r,d){var T=n.inputTimeScale,b=n.samples,v=[],E=b.length,R=this._initPTS,C=this.nextAvcDts,N=8,K=this.videoSampleDuration,H,ee,J=Number.POSITIVE_INFINITY,se=Number.NEGATIVE_INFINITY,G=!1;if(!r||C===null){var Ee=a*T,ge=b[0].pts-i(b[0].dts,b[0].pts);C=Ee-ge}for(var Pe=0;Pe<E;Pe++){var Ne=b[Pe];Ne.pts=i(Ne.pts-R,C),Ne.dts=i(Ne.dts-R,C),Ne.dts<b[Pe>0?Pe-1:Pe].dts&&(G=!0)}G&&b.sort(function(St,mt){var Tt=St.dts-mt.dts,Pt=St.pts-mt.pts;return Tt||Pt}),H=b[0].dts,ee=b[b.length-1].dts;var $e=ee-H,je=$e?Math.round($e/(E-1)):K||n.inputTimeScale/30;if(r){var Ce=H-C,fe=Ce>je,Be=Ce<-1;if((fe||Be)&&(fe?D.logger.warn("AVC: "+(0,p.toMsFromMpegTsClock)(Ce,!0)+" ms ("+Ce+"dts) hole between fragments detected, filling it"):D.logger.warn("AVC: "+(0,p.toMsFromMpegTsClock)(-Ce,!0)+" ms ("+Ce+"dts) overlapping between fragments detected"),!Be||C>b[0].pts)){H=C;var Ue=b[0].pts-Ce;b[0].dts=H,b[0].pts=Ue,D.logger.log("Video: First PTS/DTS adjusted: "+(0,p.toMsFromMpegTsClock)(Ue,!0)+"/"+(0,p.toMsFromMpegTsClock)(H,!0)+", delta: "+(0,p.toMsFromMpegTsClock)(Ce,!0)+" ms")}}H=Math.max(0,H);for(var re=0,Z=0,le=0;le<E;le++){for(var we=b[le],ue=we.units,pe=ue.length,ae=0,_e=0;_e<pe;_e++)ae+=ue[_e].data.length;Z+=ae,re+=pe,we.length=ae,we.dts=Math.max(we.dts,H),J=Math.min(we.pts,J),se=Math.max(we.pts,se)}ee=b[E-1].dts;var ce=Z+4*re+8,he;try{he=new Uint8Array(ce)}catch(St){this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:O.ErrorTypes.MUX_ERROR,details:O.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ce,reason:"fail allocating video mdat "+ce});return}var Le=new DataView(he.buffer);Le.setUint32(0,ce),he.set(k.default.types.mdat,4);for(var Ye=!1,ke=Number.POSITIVE_INFINITY,be=Number.POSITIVE_INFINITY,Re=Number.NEGATIVE_INFINITY,Fe=Number.NEGATIVE_INFINITY,Ae=0;Ae<E;Ae++){for(var Me=b[Ae],rt=Me.units,lt=0,Ze=0,ft=rt.length;Ze<ft;Ze++){var Et=rt[Ze],qe=Et.data,pt=Et.data.byteLength;Le.setUint32(N,pt),N+=4,he.set(qe,N),N+=pt,lt+=4+pt}var Se=void 0;if(Ae<E-1)K=b[Ae+1].dts-Me.dts,Se=b[Ae+1].pts-Me.pts;else{var ye=this.config,Te=Ae>0?Me.dts-b[Ae-1].dts:je;if(Se=Ae>0?Me.pts-b[Ae-1].pts:je,ye.stretchShortVideoTrack&&this.nextAudioPts!==null){var Y=Math.floor(ye.maxBufferHole*T),W=(d?J+d*T:this.nextAudioPts)-Me.pts;W>Y?(K=W-Te,K<0?K=Te:Ye=!0,D.logger.log("[mp4-remuxer]: It is approximately "+W/90+" ms to the next segment; using duration "+K/90+" ms for the last video frame.")):K=Te}else K=Te}var X=Math.round(Me.pts-Me.dts);ke=Math.min(ke,K),Re=Math.max(Re,K),be=Math.min(be,Se),Fe=Math.max(Fe,Se),v.push(new f(Me.key,K,lt,X))}if(v.length){if(y){if(y<70){var ie=v[0].flags;ie.dependsOn=2,ie.isNonSync=0}}else if(u&&Fe-be<Re-ke&&je/Re<.025&&v[0].cts===0){D.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var Q=H,de=0,ve=v.length;de<ve;de++){var Ke=Q+v[de].duration,We=Q+v[de].cts;if(de<ve-1){var ct=Ke+v[de+1].cts;v[de].duration=ct-We}else v[de].duration=de?v[de-1].duration:je;v[de].cts=0,Q=Ke}}}console.assert(K!==null,"mp4SampleDuration must be computed"),K=Ye||!K?je:K,this.nextAvcDts=C=ee+K,this.videoSampleDuration=K,this.isVideoContiguous=!0;var at=k.default.moof(n.sequenceNumber++,H,h({},n,{samples:v})),nt="video",et={data1:at,data2:he,startPTS:J/T,endPTS:(se+K)/T,startDTS:H/T,endDTS:C/T,type:nt,hasAudio:!1,hasVideo:!0,nb:v.length,dropped:n.dropped};return n.samples=[],n.dropped=0,console.assert(he.length,"MDAT length must not be zero"),et},x.remuxAudio=function(n,a,r,d,T){var b=n.inputTimeScale,v=n.samplerate?n.samplerate:b,E=b/v,R=n.segmentCodec==="aac"?o:c,C=R*E,N=this._initPTS,K=n.segmentCodec==="mp3"&&this.typeSupported.mpeg,H=[],ee=T!==void 0,J=n.samples,se=K?0:8,G=this.nextAudioPts||-1,Ee=a*b;if(this.isAudioContiguous=r=r||J.length&&G>0&&(d&&Math.abs(Ee-G)<9e3||Math.abs(i(J[0].pts-N,Ee)-G)<20*C),J.forEach(function(Et){Et.pts=i(Et.pts-N,Ee)}),!r||G<0){if(J=J.filter(function(Et){return Et.pts>=0}),!J.length)return;T===0?G=0:d&&!ee?G=Math.max(0,Ee):G=J[0].pts}if(n.segmentCodec==="aac")for(var ge=this.config.maxAudioFramesDrift,Pe=0,Ne=G;Pe<J.length;Pe++){var $e=J[Pe],je=$e.pts,Ce=je-Ne,fe=Math.abs(1e3*Ce/b);if(Ce<=-ge*C&&ee)Pe===0&&(D.logger.warn("Audio frame @ "+(je/b).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Ce/b)+" ms."),this.nextAudioPts=G=Ne=je);else if(Ce>=ge*C&&fe<g&&ee){var Be=Math.round(Ce/C);Ne=je-Be*C,Ne<0&&(Be--,Ne+=C),Pe===0&&(this.nextAudioPts=G=Ne),D.logger.warn("[mp4-remuxer]: Injecting "+Be+" audio frame @ "+(Ne/b).toFixed(3)+"s due to "+Math.round(1e3*Ce/b)+" ms gap.");for(var Ue=0;Ue<Be;Ue++){var re=Math.max(Ne,0),Z=P.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);Z||(D.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Z=$e.unit.subarray()),J.splice(Pe,0,{unit:Z,pts:re}),Ne+=C,Pe++}}$e.pts=Ne,Ne+=C}for(var le=null,we=null,ue,pe=0,ae=J.length;ae--;)pe+=J[ae].unit.byteLength;for(var _e=0,ce=J.length;_e<ce;_e++){var he=J[_e],Le=he.unit,Ye=he.pts;if(we!==null){var ke=H[_e-1];ke.duration=Math.round((Ye-we)/E)}else if(r&&n.segmentCodec==="aac"&&(Ye=G),le=Ye,pe>0){pe+=se;try{ue=new Uint8Array(pe)}catch(Et){this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:O.ErrorTypes.MUX_ERROR,details:O.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:pe,reason:"fail allocating audio mdat "+pe});return}if(!K){var be=new DataView(ue.buffer);be.setUint32(0,pe),ue.set(k.default.types.mdat,4)}}else return;ue.set(Le,se);var Re=Le.byteLength;se+=Re,H.push(new f(!0,R,Re,0)),we=Ye}var Fe=H.length;if(Fe){var Ae=H[H.length-1];this.nextAudioPts=G=we+E*Ae.duration;var Me=K?new Uint8Array(0):k.default.moof(n.sequenceNumber++,le/E,h({},n,{samples:H}));n.samples=[];var rt=le/b,lt=G/b,Ze="audio",ft={data1:Me,data2:ue,startPTS:rt,endPTS:lt,startDTS:rt,endDTS:lt,type:Ze,hasAudio:!0,hasVideo:!1,nb:Fe};return this.isAudioContiguous=!0,console.assert(ue.length,"MDAT length must not be zero"),ft}},x.remuxEmptyAudio=function(n,a,r,d){var T=n.inputTimeScale,b=n.samplerate?n.samplerate:T,v=T/b,E=this.nextAudioPts,R=(E!==null?E:d.startDTS*T)+this._initDTS,C=d.endDTS*T+this._initDTS,N=v*o,K=Math.ceil((C-R)/N),H=P.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);if(D.logger.warn("[mp4-remuxer]: remux empty Audio"),!H){D.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],J=0;J<K;J++){var se=R+J*N;ee.push({unit:H,pts:se,dts:se})}return n.samples=ee,this.remuxAudio(n,a,r,!1)},A}();function i(A,x){var w;if(x===null)return A;for(x<A?w=-8589934592:w=8589934592;Math.abs(A-x)>4294967296;)A+=w;return A}function t(A){for(var x=0;x<A.length;x++)if(A[x].key)return x;return-1}function m(A,x,w,n){var a=A.samples.length;if(a){for(var r=A.inputTimeScale,d=0;d<a;d++){var T=A.samples[d];T.pts=i(T.pts-w,x*r)/r,T.dts=i(T.dts-n,x*r)/r}var b=A.samples;return A.samples=[],{samples:b}}}function S(A,x,w){var n=A.samples.length;if(n){for(var a=A.inputTimeScale,r=0;r<n;r++){var d=A.samples[r];d.pts=i(d.pts-w,x*a)/a}A.samples.sort(function(b,v){return b.pts-v.pts});var T=A.samples;return A.samples=[],{samples:T}}}var f=function(x,w,n,a){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=w,this.size=n,this.cts=a,this.flags=new _(x)},_=function(x){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=x?2:1,this.isNonSync=x?0:1}},"./src/remux/passthrough-remuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>p});var M=L("./src/polyfills/number.ts"),P=L("./src/remux/mp4-remuxer.ts"),k=L("./src/utils/mp4-tools.ts"),e=L("./src/loader/fragment.ts"),O=L("./src/utils/logger.ts"),D=function(){function h(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndTime=null}var g=h.prototype;return g.destroy=function(){},g.resetTimeStamp=function(c){this.initPTS=c,this.lastEndTime=null},g.resetNextTimestamp=function(){this.lastEndTime=null},g.resetInitSegment=function(c,y,u,s){this.audioCodec=y,this.videoCodec=u,this.generateInitSegment((0,k.patchEncyptionData)(c,s)),this.emitInitSegment=!0},g.generateInitSegment=function(c){var y=this.audioCodec,u=this.videoCodec;if(!c||!c.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=(0,k.parseInitSegment)(c);y||(y=l(s.audio,e.ElementaryStreamTypes.AUDIO)),u||(u=l(s.video,e.ElementaryStreamTypes.VIDEO));var i={};s.audio&&s.video?i.audiovideo={container:"video/mp4",codec:y+","+u,initSegment:c,id:"main"}:s.audio?i.audio={container:"audio/mp4",codec:y,initSegment:c,id:"audio"}:s.video?i.video={container:"video/mp4",codec:u,initSegment:c,id:"main"}:O.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},g.remux=function(c,y,u,s,i){var t,m=this.initPTS,S=this.lastEndTime,f={audio:void 0,video:void 0,text:s,id3:u,initSegment:void 0};(0,M.isFiniteNumber)(S)||(S=this.lastEndTime=i||0);var _=y.samples;if(!_||!_.length)return f;var A={initPTS:void 0,timescale:1},x=this.initData;if((!x||!x.length)&&(this.generateInitSegment(_),x=this.initData),!x||!x.length)return O.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),f;this.emitInitSegment&&(A.tracks=this.initTracks,this.emitInitSegment=!1);var w=(0,k.getStartDTS)(x,_);(0,M.isFiniteNumber)(m)||(this.initPTS=A.initPTS=m=w-i);var n=(0,k.getDuration)(_,x),a=c?w-m:S,r=a+n;(0,k.offsetStartDTS)(x,_,m),n>0?this.lastEndTime=r:(O.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var d=!!x.audio,T=!!x.video,b="";d&&(b+="audio"),T&&(b+="video");var v={data1:_,startPTS:a,startDTS:a,endPTS:r,endDTS:r,type:b,hasAudio:d,hasVideo:T,nb:1,dropped:0};f.audio=v.type==="audio"?v:void 0,f.video=v.type!=="audio"?v:void 0,f.initSegment=A;var E=(t=this.initPTS)!=null?t:0;return f.id3=(0,P.flushTextTrackMetadataCueSamples)(u,i,E,E),s.samples.length&&(f.text=(0,P.flushTextTrackUserdataCueSamples)(s,i,E)),f},h}();function l(h,g){var o=h==null?void 0:h.codec;return o&&o.length>4?o:o==="hvc1"||o==="hev1"?"hvc1.1.c.L120.90":o==="av01"?"av01.0.04M.08":o==="avc1"||g===e.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}const p=D},"./src/task-loop.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>M});var M=function(){function P(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var k=P.prototype;return k.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},k.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},k.onHandlerDestroyed=function(){},k.hasInterval=function(){return!!this._tickInterval},k.hasNextTick=function(){return!!this._tickTimer},k.setInterval=function(O){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,O),!0)},k.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},k.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},k.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},k.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},k.doTick=function(){},P}()},"./src/types/cmcd.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{CMCDObjectType:()=>P,CMCDStreamType:()=>e,CMCDStreamingFormat:()=>k,CMCDVersion:()=>M});var M=1,P;(function(O){O.MANIFEST="m",O.AUDIO="a",O.VIDEO="v",O.MUXED="av",O.INIT="i",O.CAPTION="c",O.TIMED_TEXT="tt",O.KEY="k",O.OTHER="o"})(P||(P={}));var k;(function(O){O.DASH="d",O.HLS="h",O.SMOOTH="s",O.OTHER="o"})(k||(k={}));var e;(function(O){O.VOD="v",O.LIVE="l"})(e||(e={}))},"./src/types/demuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{MetadataSchema:()=>M});var M;(function(P){P.audioId3="org.id3",P.dateRange="com.apple.quicktime.HLS",P.emsg="https://aomedia.org/emsg/ID3"})(M||(M={}))},"./src/types/level.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{HdcpLevels:()=>O,HlsSkip:()=>D,HlsUrlParameters:()=>p,Level:()=>h,getSkipValue:()=>l});function M(g,o){for(var c=0;c<o.length;c++){var y=o[c];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(g,k(y.key),y)}}function P(g,o,c){return o&&M(g.prototype,o),c&&M(g,c),Object.defineProperty(g,"prototype",{writable:!1}),g}function k(g){var o=e(g,"string");return typeof o=="symbol"?o:String(o)}function e(g,o){if(typeof g!="object"||g===null)return g;var c=g[Symbol.toPrimitive];if(c!==void 0){var y=c.call(g,o||"default");if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(g)}var O=["NONE","TYPE-0","TYPE-1","TYPE-2",null],D;(function(g){g.No="",g.Yes="YES",g.v2="v2"})(D||(D={}));function l(g,o){var c=g.canSkipUntil,y=g.canSkipDateRanges,u=g.endSN,s=o!==void 0?o-u:0;return c&&s<c?y?D.v2:D.Yes:D.No}var p=function(){function g(c,y,u){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=c,this.part=y,this.skip=u}var o=g.prototype;return o.addDirectives=function(y){var u=new self.URL(y);return this.msn!==void 0&&u.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&u.searchParams.set("_HLS_part",this.part.toString()),this.skip&&u.searchParams.set("_HLS_skip",this.skip),u.href},g}(),h=function(){function g(o){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[o.url],this.attrs=o.attrs,this.bitrate=o.bitrate,o.details&&(this.details=o.details),this.id=o.id||0,this.name=o.name,this.width=o.width||0,this.height=o.height||0,this.audioCodec=o.audioCodec,this.videoCodec=o.videoCodec,this.unknownCodecs=o.unknownCodecs,this.codecSet=[o.videoCodec,o.audioCodec].filter(function(c){return c}).join(",").replace(/\.[^.,]+/g,"")}return P(g,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(c){var y=c%this.url.length;this._urlId!==y&&(this.details=void 0,this._urlId=y)}}]),g}()},"./src/types/loader.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{PlaylistContextType:()=>M,PlaylistLevelType:()=>P});var M;(function(k){k.MANIFEST="manifest",k.LEVEL="level",k.AUDIO_TRACK="audioTrack",k.SUBTITLE_TRACK="subtitleTrack"})(M||(M={}));var P;(function(k){k.MAIN="main",k.AUDIO="audio",k.SUBTITLE="subtitle"})(P||(P={}))},"./src/types/transmuxer.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{ChunkMetadata:()=>M});var M=function(e,O,D,l,p,h){l===void 0&&(l=0),p===void 0&&(p=-1),h===void 0&&(h=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=P(),this.buffering={audio:P(),video:P(),audiovideo:P()},this.level=e,this.sn=O,this.id=D,this.size=l,this.part=p,this.partial=h};function P(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{AttrList:()=>k});var M=/^(\d+)x(\d+)$/,P=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,k=function(){function e(D){typeof D=="string"&&(D=e.parseAttrList(D));for(var l in D)D.hasOwnProperty(l)&&(this[l]=D[l])}var O=e.prototype;return O.decimalInteger=function(l){var p=parseInt(this[l],10);return p>Number.MAX_SAFE_INTEGER?1/0:p},O.hexadecimalInteger=function(l){if(this[l]){var p=(this[l]||"0x").slice(2);p=(p.length&1?"0":"")+p;for(var h=new Uint8Array(p.length/2),g=0;g<p.length/2;g++)h[g]=parseInt(p.slice(g*2,g*2+2),16);return h}else return null},O.hexadecimalIntegerAsNumber=function(l){var p=parseInt(this[l],16);return p>Number.MAX_SAFE_INTEGER?1/0:p},O.decimalFloatingPoint=function(l){return parseFloat(this[l])},O.optionalFloat=function(l,p){var h=this[l];return h?parseFloat(h):p},O.enumeratedString=function(l){return this[l]},O.bool=function(l){return this[l]==="YES"},O.decimalResolution=function(l){var p=M.exec(this[l]);if(p!==null)return{width:parseInt(p[1],10),height:parseInt(p[2],10)}},e.parseAttrList=function(l){var p,h={},g='"';for(P.lastIndex=0;(p=P.exec(l))!==null;){var o=p[2];o.indexOf(g)===0&&o.lastIndexOf(g)===o.length-1&&(o=o.slice(1,-1)),h[p[1]]=o}return h},e}()},"./src/utils/binary-search.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>P});var M={search:function(e,O){for(var D=0,l=e.length-1,p=null,h=null;D<=l;){p=(D+l)/2|0,h=e[p];var g=O(h);if(g>0)D=p+1;else if(g<0)l=p-1;else return h}return null}};const P=M},"./src/utils/buffer-helper.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{BufferHelper:()=>k});var M=L("./src/utils/logger.ts"),P={length:0,start:function(){return 0},end:function(){return 0}},k=function(){function e(){}return e.isBuffered=function(D,l){try{if(D){for(var p=e.getBuffered(D),h=0;h<p.length;h++)if(l>=p.start(h)&&l<=p.end(h))return!0}}catch(g){}return!1},e.bufferInfo=function(D,l,p){try{if(D){var h=e.getBuffered(D),g=[],o;for(o=0;o<h.length;o++)g.push({start:h.start(o),end:h.end(o)});return this.bufferedInfo(g,l,p)}}catch(c){}return{len:0,start:l,end:l,nextStart:void 0}},e.bufferedInfo=function(D,l,p){l=Math.max(0,l),D.sort(function(f,_){var A=f.start-_.start;return A||_.end-f.end});var h=[];if(p)for(var g=0;g<D.length;g++){var o=h.length;if(o){var c=h[o-1].end;D[g].start-c<p?D[g].end>c&&(h[o-1].end=D[g].end):h.push(D[g])}else h.push(D[g])}else h=D;for(var y=0,u,s=l,i=l,t=0;t<h.length;t++){var m=h[t].start,S=h[t].end;if(l+p>=m&&l<S)s=m,i=S,y=i-l;else if(l+p<m){u=m;break}}return{len:y,start:s||0,end:i||0,nextStart:u}},e.getBuffered=function(D){try{return D.buffered}catch(l){return M.logger.log("failed to get media.buffered",l),P}},e}()},"./src/utils/cea-608-parser.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{CaptionScreen:()=>t,Row:()=>i,default:()=>x});var M=L("./src/utils/logger.ts"),P={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},k=function(n){var a=n;return P.hasOwnProperty(n)&&(a=P[n]),String.fromCharCode(a)},e=15,O=100,D={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},p={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},g=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],o;(function(w){w[w.ERROR=0]="ERROR",w[w.TEXT=1]="TEXT",w[w.WARNING=2]="WARNING",w[w.INFO=2]="INFO",w[w.DEBUG=3]="DEBUG",w[w.DATA=3]="DATA"})(o||(o={}));var c=function(){function w(){this.time=null,this.verboseLevel=o.ERROR}var n=w.prototype;return n.log=function(r,d){if(this.verboseLevel>=r){var T=typeof d=="function"?d():d;M.logger.log(this.time+" ["+r+"] "+T)}},w}(),y=function(n){for(var a=[],r=0;r<n.length;r++)a.push(n[r].toString(16));return a},u=function(){function w(a,r,d,T,b){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=a||"white",this.underline=r||!1,this.italics=d||!1,this.background=T||"black",this.flash=b||!1}var n=w.prototype;return n.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},n.setStyles=function(r){for(var d=["foreground","underline","italics","background","flash"],T=0;T<d.length;T++){var b=d[T];r.hasOwnProperty(b)&&(this[b]=r[b])}},n.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},n.equals=function(r){return this.foreground===r.foreground&&this.underline===r.underline&&this.italics===r.italics&&this.background===r.background&&this.flash===r.flash},n.copy=function(r){this.foreground=r.foreground,this.underline=r.underline,this.italics=r.italics,this.background=r.background,this.flash=r.flash},n.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},w}(),s=function(){function w(a,r,d,T,b,v){this.uchar=void 0,this.penState=void 0,this.uchar=a||" ",this.penState=new u(r,d,T,b,v)}var n=w.prototype;return n.reset=function(){this.uchar=" ",this.penState.reset()},n.setChar=function(r,d){this.uchar=r,this.penState.copy(d)},n.setPenState=function(r){this.penState.copy(r)},n.equals=function(r){return this.uchar===r.uchar&&this.penState.equals(r.penState)},n.copy=function(r){this.uchar=r.uchar,this.penState.copy(r.penState)},n.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},w}(),i=function(){function w(a){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var r=0;r<O;r++)this.chars.push(new s);this.logger=a,this.pos=0,this.currPenState=new u}var n=w.prototype;return n.equals=function(r){for(var d=!0,T=0;T<O;T++)if(!this.chars[T].equals(r.chars[T])){d=!1;break}return d},n.copy=function(r){for(var d=0;d<O;d++)this.chars[d].copy(r.chars[d])},n.isEmpty=function(){for(var r=!0,d=0;d<O;d++)if(!this.chars[d].isEmpty()){r=!1;break}return r},n.setCursor=function(r){this.pos!==r&&(this.pos=r),this.pos<0?(this.logger.log(o.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>O&&(this.logger.log(o.DEBUG,"Too large cursor position "+this.pos),this.pos=O)},n.moveCursor=function(r){var d=this.pos+r;if(r>1)for(var T=this.pos+1;T<d+1;T++)this.chars[T].setPenState(this.currPenState);this.setCursor(d)},n.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},n.insertChar=function(r){var d=this;r>=144&&this.backSpace();var T=k(r);if(this.pos>=O){this.logger.log(o.ERROR,function(){return"Cannot insert "+r.toString(16)+" ("+T+") at position "+d.pos+". Skipping it!"});return}this.chars[this.pos].setChar(T,this.currPenState),this.moveCursor(1)},n.clearFromPos=function(r){var d;for(d=r;d<O;d++)this.chars[d].reset()},n.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},n.clearToEndOfRow=function(){this.clearFromPos(this.pos)},n.getTextString=function(){for(var r=[],d=!0,T=0;T<O;T++){var b=this.chars[T].uchar;b!==" "&&(d=!1),r.push(b)}return d?"":r.join("")},n.setPenStyles=function(r){this.currPenState.setStyles(r);var d=this.chars[this.pos];d.setPenState(this.currPenState)},w}(),t=function(){function w(a){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var r=0;r<e;r++)this.rows.push(new i(a));this.logger=a,this.currRow=e-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var n=w.prototype;return n.reset=function(){for(var r=0;r<e;r++)this.rows[r].clear();this.currRow=e-1},n.equals=function(r){for(var d=!0,T=0;T<e;T++)if(!this.rows[T].equals(r.rows[T])){d=!1;break}return d},n.copy=function(r){for(var d=0;d<e;d++)this.rows[d].copy(r.rows[d])},n.isEmpty=function(){for(var r=!0,d=0;d<e;d++)if(!this.rows[d].isEmpty()){r=!1;break}return r},n.backSpace=function(){var r=this.rows[this.currRow];r.backSpace()},n.clearToEndOfRow=function(){var r=this.rows[this.currRow];r.clearToEndOfRow()},n.insertChar=function(r){var d=this.rows[this.currRow];d.insertChar(r)},n.setPen=function(r){var d=this.rows[this.currRow];d.setPenStyles(r)},n.moveCursor=function(r){var d=this.rows[this.currRow];d.moveCursor(r)},n.setCursor=function(r){this.logger.log(o.INFO,"setCursor: "+r);var d=this.rows[this.currRow];d.setCursor(r)},n.setPAC=function(r){this.logger.log(o.INFO,function(){return"pacData = "+JSON.stringify(r)});var d=r.row-1;if(this.nrRollUpRows&&d<this.nrRollUpRows-1&&(d=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==d){for(var T=0;T<e;T++)this.rows[T].clear();var b=this.currRow+1-this.nrRollUpRows,v=this.lastOutputScreen;if(v){var E=v.rows[b].cueStartTime,R=this.logger.time;if(E&&R!==null&&E<R)for(var C=0;C<this.nrRollUpRows;C++)this.rows[d-this.nrRollUpRows+C+1].copy(v.rows[b+C])}}this.currRow=d;var N=this.rows[this.currRow];if(r.indent!==null){var K=r.indent,H=Math.max(K-1,0);N.setCursor(r.indent),r.color=N.chars[H].penState.foreground}var ee={foreground:r.color,underline:r.underline,italics:r.italics,background:"black",flash:!1};this.setPen(ee)},n.setBkgData=function(r){this.logger.log(o.INFO,function(){return"bkgData = "+JSON.stringify(r)}),this.backSpace(),this.setPen(r),this.insertChar(32)},n.setRollUpRows=function(r){this.nrRollUpRows=r},n.rollUp=function(){var r=this;if(this.nrRollUpRows===null){this.logger.log(o.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(o.TEXT,function(){return r.getDisplayText()});var d=this.currRow+1-this.nrRollUpRows,T=this.rows.splice(d,1)[0];T.clear(),this.rows.splice(this.currRow,0,T),this.logger.log(o.INFO,"Rolling up")},n.getDisplayText=function(r){r=r||!1;for(var d=[],T="",b=-1,v=0;v<e;v++){var E=this.rows[v].getTextString();E&&(b=v+1,r?d.push("Row "+b+": '"+E+"'"):d.push(E.trim()))}return d.length>0&&(r?T="["+d.join(" | ")+"]":T=d.join(`
|
|
`)),T},n.getTextAndFormat=function(){return this.rows},w}(),m=function(){function w(a,r,d){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=a,this.outputFilter=r,this.mode=null,this.verbose=0,this.displayedMemory=new t(d),this.nonDisplayedMemory=new t(d),this.lastOutputScreen=new t(d),this.currRollUpRow=this.displayedMemory.rows[e-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=d}var n=w.prototype;return n.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[e-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},n.getHandler=function(){return this.outputFilter},n.setHandler=function(r){this.outputFilter=r},n.setPAC=function(r){this.writeScreen.setPAC(r)},n.setBkgData=function(r){this.writeScreen.setBkgData(r)},n.setMode=function(r){r!==this.mode&&(this.mode=r,this.logger.log(o.INFO,function(){return"MODE="+r}),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=r)},n.insertChars=function(r){for(var d=this,T=0;T<r.length;T++)this.writeScreen.insertChar(r[T]);var b=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(o.INFO,function(){return b+": "+d.writeScreen.getDisplayText(!0)}),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(o.TEXT,function(){return"DISPLAYED: "+d.displayedMemory.getDisplayText(!0)}),this.outputDataUpdate())},n.ccRCL=function(){this.logger.log(o.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},n.ccBS=function(){this.logger.log(o.INFO,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},n.ccAOF=function(){},n.ccAON=function(){},n.ccDER=function(){this.logger.log(o.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},n.ccRU=function(r){this.logger.log(o.INFO,"RU("+r+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(r)},n.ccFON=function(){this.logger.log(o.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},n.ccRDC=function(){this.logger.log(o.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},n.ccTR=function(){this.logger.log(o.INFO,"TR"),this.setMode("MODE_TEXT")},n.ccRTD=function(){this.logger.log(o.INFO,"RTD"),this.setMode("MODE_TEXT")},n.ccEDM=function(){this.logger.log(o.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},n.ccCR=function(){this.logger.log(o.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},n.ccENM=function(){this.logger.log(o.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},n.ccEOC=function(){var r=this;if(this.logger.log(o.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var d=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=d,this.writeScreen=this.nonDisplayedMemory,this.logger.log(o.TEXT,function(){return"DISP: "+r.displayedMemory.getDisplayText()})}this.outputDataUpdate(!0)},n.ccTO=function(r){this.logger.log(o.INFO,"TO("+r+") - Tab Offset"),this.writeScreen.moveCursor(r)},n.ccMIDROW=function(r){var d={flash:!1};if(d.underline=r%2===1,d.italics=r>=46,d.italics)d.foreground="white";else{var T=Math.floor(r/2)-16,b=["white","green","blue","cyan","red","yellow","magenta"];d.foreground=b[T]}this.logger.log(o.INFO,"MIDROW: "+JSON.stringify(d)),this.writeScreen.setPen(d)},n.outputDataUpdate=function(r){r===void 0&&(r=!1);var d=this.logger.time;d!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=d:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,d,this.lastOutputScreen),r&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:d),this.lastOutputScreen.copy(this.displayedMemory))},n.cueSplitAtTime=function(r){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,r,this.displayedMemory),this.cueStartTime=r))},w}(),S=function(){function w(a,r,d){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var T=new c;this.channels=[null,new m(a,r,T),new m(a+1,d,T)],this.cmdHistory=A(),this.logger=T}var n=w.prototype;return n.getHandler=function(r){return this.channels[r].getHandler()},n.setHandler=function(r,d){this.channels[r].setHandler(d)},n.addData=function(r,d){var T,b,v,E=!1;this.logger.time=r;for(var R=0;R<d.length;R+=2)if(b=d[R]&127,v=d[R+1]&127,!(b===0&&v===0)){if(this.logger.log(o.DATA,"["+y([d[R],d[R+1]])+"] -> ("+y([b,v])+")"),T=this.parseCmd(b,v),T||(T=this.parseMidrow(b,v)),T||(T=this.parsePAC(b,v)),T||(T=this.parseBackgroundAttributes(b,v)),!T&&(E=this.parseChars(b,v),E)){var C=this.currentChannel;if(C&&C>0){var N=this.channels[C];N.insertChars(E)}else this.logger.log(o.WARNING,"No channel found yet. TEXT-MODE?")}!T&&!E&&this.logger.log(o.WARNING,"Couldn't parse cleaned data "+y([b,v])+" orig: "+y([d[R],d[R+1]]))}},n.parseCmd=function(r,d){var T=this.cmdHistory,b=(r===20||r===28||r===21||r===29)&&d>=32&&d<=47,v=(r===23||r===31)&&d>=33&&d<=35;if(!(b||v))return!1;if(_(r,d,T))return f(null,null,T),this.logger.log(o.DEBUG,"Repeated command ("+y([r,d])+") is dropped"),!0;var E=r===20||r===21||r===23?1:2,R=this.channels[E];return r===20||r===21||r===28||r===29?d===32?R.ccRCL():d===33?R.ccBS():d===34?R.ccAOF():d===35?R.ccAON():d===36?R.ccDER():d===37?R.ccRU(2):d===38?R.ccRU(3):d===39?R.ccRU(4):d===40?R.ccFON():d===41?R.ccRDC():d===42?R.ccTR():d===43?R.ccRTD():d===44?R.ccEDM():d===45?R.ccCR():d===46?R.ccENM():d===47&&R.ccEOC():R.ccTO(d-32),f(r,d,T),this.currentChannel=E,!0},n.parseMidrow=function(r,d){var T=0;if((r===17||r===25)&&d>=32&&d<=47){if(r===17?T=1:T=2,T!==this.currentChannel)return this.logger.log(o.ERROR,"Mismatch channel in midrow parsing"),!1;var b=this.channels[T];return b?(b.ccMIDROW(d),this.logger.log(o.DEBUG,"MIDROW ("+y([r,d])+")"),!0):!1}return!1},n.parsePAC=function(r,d){var T,b=this.cmdHistory,v=(r>=17&&r<=23||r>=25&&r<=31)&&d>=64&&d<=127,E=(r===16||r===24)&&d>=64&&d<=95;if(!(v||E))return!1;if(_(r,d,b))return f(null,null,b),!0;var R=r<=23?1:2;d>=64&&d<=95?T=R===1?D[r]:p[r]:T=R===1?l[r]:h[r];var C=this.channels[R];return C?(C.setPAC(this.interpretPAC(T,d)),f(r,d,b),this.currentChannel=R,!0):!1},n.interpretPAC=function(r,d){var T,b={color:null,italics:!1,indent:null,underline:!1,row:r};return d>95?T=d-96:T=d-64,b.underline=(T&1)===1,T<=13?b.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(T/2)]:T<=15?(b.italics=!0,b.color="white"):b.indent=Math.floor((T-16)/2)*4,b},n.parseChars=function(r,d){var T,b=null,v=null;if(r>=25?(T=2,v=r-8):(T=1,v=r),v>=17&&v<=19){var E;v===17?E=d+80:v===18?E=d+112:E=d+144,this.logger.log(o.INFO,"Special char '"+k(E)+"' in channel "+T),b=[E]}else r>=32&&r<=127&&(b=d===0?[r]:[r,d]);if(b){var R=y(b);this.logger.log(o.DEBUG,"Char codes = "+R.join(",")),f(r,d,this.cmdHistory)}return b},n.parseBackgroundAttributes=function(r,d){var T=(r===16||r===24)&&d>=32&&d<=47,b=(r===23||r===31)&&d>=45&&d<=47;if(!(T||b))return!1;var v,E={};r===16||r===24?(v=Math.floor((d-32)/2),E.background=g[v],d%2===1&&(E.background=E.background+"_semi")):d===45?E.background="transparent":(E.foreground="black",d===47&&(E.underline=!0));var R=r<=23?1:2,C=this.channels[R];return C.setBkgData(E),f(r,d,this.cmdHistory),!0},n.reset=function(){for(var r=0;r<Object.keys(this.channels).length;r++){var d=this.channels[r];d&&d.reset()}this.cmdHistory=A()},n.cueSplitAtTime=function(r){for(var d=0;d<this.channels.length;d++){var T=this.channels[d];T&&T.cueSplitAtTime(r)}},w}();function f(w,n,a){a.a=w,a.b=n}function _(w,n,a){return a.a===w&&a.b===n}function A(){return{a:null,b:null}}const x=S},"./src/utils/codecs.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{isCodecSupportedInMp4:()=>k,isCodecType:()=>P});var M={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function P(e,O){var D=M[O];return!!D&&D[e.slice(0,4)]===!0}function k(e,O){return MediaSource.isTypeSupported((O||"video")+'/mp4;codecs="'+e+'"')}},"./src/utils/cues.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>D});var M=L("./src/utils/vttparser.ts"),P=L("./src/utils/webvtt-parser.ts"),k=L("./src/utils/texttrack-utils.ts"),e=/\s/,O={newCue:function(p,h,g,o){for(var c=[],y,u,s,i,t,m=self.VTTCue||self.TextTrackCue,S=0;S<o.rows.length;S++)if(y=o.rows[S],s=!0,i=0,t="",!y.isEmpty()){for(var f=0;f<y.chars.length;f++)e.test(y.chars[f].uchar)&&s?i++:(t+=y.chars[f].uchar,s=!1);y.cueStartTime=h,h===g&&(g+=1e-4),i>=16?i--:i++;var _=(0,M.fixLineBreaks)(t.trim()),A=(0,P.generateCueId)(h,g,_);(!p||!p.cues||!p.cues.getCueById(A))&&(u=new m(h,g,_),u.id=A,u.line=S+1,u.align="left",u.position=10+Math.min(80,Math.floor(i*8/32)*10),c.push(u))}return p&&c.length&&(c.sort(function(x,w){return x.line==="auto"||w.line==="auto"?0:x.line>8&&w.line>8?w.line-x.line:x.line-w.line}),c.forEach(function(x){return(0,k.addCueToTrack)(p,x)})),c}};const D=O},"./src/utils/discontinuities.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{adjustSlidingStart:()=>p,alignMediaPlaylistByPDT:()=>c,alignPDT:()=>o,alignStream:()=>h,findDiscontinuousReferenceFrag:()=>D,findFirstFragWithCC:()=>e,shouldAlignOnDiscontinuities:()=>O});var M=L("./src/polyfills/number.ts"),P=L("./src/utils/logger.ts"),k=L("./src/controller/level-helper.ts");function e(y,u){for(var s=null,i=0,t=y.length;i<t;i++){var m=y[i];if(m&&m.cc===u){s=m;break}}return s}function O(y,u,s){return!!(u.details&&(s.endCC>s.startCC||y&&y.cc<s.startCC))}function D(y,u,s){s===void 0&&(s=0);var i=y.fragments,t=u.fragments;if(!t.length||!i.length){P.logger.log("No fragments to align");return}var m=e(i,t[0].cc);if(!m||m&&!m.startPTS){P.logger.log("No frag in previous level to align on");return}return m}function l(y,u){if(y){var s=y.start+u;y.start=y.startPTS=s,y.endPTS=s+y.duration}}function p(y,u){for(var s=u.fragments,i=0,t=s.length;i<t;i++)l(s[i],y);u.fragmentHint&&l(u.fragmentHint,y),u.alignedSliding=!0}function h(y,u,s){u&&(g(y,s,u),!s.alignedSliding&&u.details&&o(s,u.details),!s.alignedSliding&&u.details&&!s.skippedSegments&&(0,k.adjustSliding)(u.details,s))}function g(y,u,s){if(O(y,s,u)){var i=D(s.details,u);i&&(0,M.isFiniteNumber)(i.start)&&(P.logger.log("Adjusting PTS using last level due to CC increase within current level "+u.url),p(i.start,u))}}function o(y,u){if(!(!u.fragments.length||!y.hasProgramDateTime||!u.hasProgramDateTime)){var s=u.fragments[0].programDateTime,i=y.fragments[0].programDateTime,t=(i-s)/1e3+u.fragments[0].start;t&&(0,M.isFiniteNumber)(t)&&(P.logger.log("Adjusting PTS using programDateTime delta "+(i-s)+"ms, sliding:"+t.toFixed(3)+" "+y.url+" "),p(t,y))}}function c(y,u){if(!(!y.hasProgramDateTime||!u.hasProgramDateTime)){var s=y.fragments,i=u.fragments;if(!(!s.length||!i.length)){var t=Math.round(i.length/2)-1,m=i[t],S=e(s,m.cc)||s[Math.round(s.length/2)-1],f=m.programDateTime,_=S.programDateTime;if(!(f===null||_===null)){var A=(_-f)/1e3-(S.start-m.start);p(A,y)}}}}},"./src/utils/ewma-bandwidth-estimator.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>k});var M=L("./src/utils/ewma.ts"),P=function(){function e(D,l,p){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=p,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new M.default(D),this.fast_=new M.default(l)}var O=e.prototype;return O.update=function(l,p){var h=this.slow_,g=this.fast_;this.slow_.halfLife!==l&&(this.slow_=new M.default(l,h.getEstimate(),h.getTotalWeight())),this.fast_.halfLife!==p&&(this.fast_=new M.default(p,g.getEstimate(),g.getTotalWeight()))},O.sample=function(l,p){l=Math.max(l,this.minDelayMs_);var h=8*p,g=l/1e3,o=h/g;this.fast_.sample(g,o),this.slow_.sample(g,o)},O.canEstimate=function(){var l=this.fast_;return l&&l.getTotalWeight()>=this.minWeight_},O.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},O.destroy=function(){},e}();const k=P},"./src/utils/ewma.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>P});var M=function(){function k(O,D,l){D===void 0&&(D=0),l===void 0&&(l=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=O,this.alpha_=O?Math.exp(Math.log(.5)/O):0,this.estimate_=D,this.totalWeight_=l}var e=k.prototype;return e.sample=function(D,l){var p=Math.pow(this.alpha_,D);this.estimate_=l*(1-p)+p*this.estimate_,this.totalWeight_+=D},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var D=1-Math.pow(this.alpha_,this.totalWeight_);if(D)return this.estimate_/D}return this.estimate_},k}();const P=M},"./src/utils/fetch-loader.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>t,fetchSupported:()=>c});var M=L("./src/polyfills/number.ts"),P=L("./src/loader/load-stats.ts"),k=L("./src/demux/chunk-cache.ts");function e(m,S){m.prototype=Object.create(S.prototype),m.prototype.constructor=m,h(m,S)}function O(m){var S=typeof Map=="function"?new Map:void 0;return O=function(_){if(_===null||!p(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof S!="undefined"){if(S.has(_))return S.get(_);S.set(_,A)}function A(){return D(_,arguments,g(this).constructor)}return A.prototype=Object.create(_.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),h(A,_)},O(m)}function D(m,S,f){return l()?D=Reflect.construct.bind():D=function(A,x,w){var n=[null];n.push.apply(n,x);var a=Function.bind.apply(A,n),r=new a;return w&&h(r,w.prototype),r},D.apply(null,arguments)}function l(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(m){return!1}}function p(m){return Function.toString.call(m).indexOf("[native code]")!==-1}function h(m,S){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_,A){return _.__proto__=A,_},h(m,S)}function g(m){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},g(m)}function o(){return o=Object.assign?Object.assign.bind():function(m){for(var S=1;S<arguments.length;S++){var f=arguments[S];for(var _ in f)Object.prototype.hasOwnProperty.call(f,_)&&(m[_]=f[_])}return m},o.apply(this,arguments)}function c(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(m){}return!1}var y=function(){function m(f){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=f.fetchSetup||s,this.controller=new self.AbortController,this.stats=new P.LoadStats}var S=m.prototype;return S.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},S.abortInternal=function(){var _=this.response;(!_||!_.ok)&&(this.stats.aborted=!0,this.controller.abort())},S.abort=function(){var _;this.abortInternal(),(_=this.callbacks)!==null&&_!==void 0&&_.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},S.load=function(_,A,x){var w=this,n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();var a=u(_,this.controller.signal),r=x.onProgress,d=_.responseType==="arraybuffer",T=d?"byteLength":"length";this.context=_,this.config=A,this.callbacks=x,this.request=this.fetchSetup(_,a),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){w.abortInternal(),x.onTimeout(n,_,w.response)},A.timeout),self.fetch(this.request).then(function(b){if(w.response=w.loader=b,!b.ok){var v=b.status,E=b.statusText;throw new i(E||"fetch, bad network response",v,b)}return n.loading.first=Math.max(self.performance.now(),n.loading.start),n.total=parseInt(b.headers.get("Content-Length")||"0"),r&&(0,M.isFiniteNumber)(A.highWaterMark)?w.loadProgressively(b,n,_,A.highWaterMark,r):d?b.arrayBuffer():b.text()}).then(function(b){var v=w.response;self.clearTimeout(w.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);var E=b[T];E&&(n.loaded=n.total=E);var R={url:v.url,data:b};r&&!(0,M.isFiniteNumber)(A.highWaterMark)&&r(n,_,b,v),x.onSuccess(R,n,_,v)}).catch(function(b){if(self.clearTimeout(w.requestTimeout),!n.aborted){var v=b&&b.code||0,E=b?b.message:null;x.onError({code:v,text:E},_,b?b.details:null)}})},S.getCacheAge=function(){var _=null;if(this.response){var A=this.response.headers.get("age");_=A?parseFloat(A):null}return _},S.loadProgressively=function(_,A,x,w,n){w===void 0&&(w=0);var a=new k.default,r=_.body.getReader(),d=function T(){return r.read().then(function(b){if(b.done)return a.dataLength&&n(A,x,a.flush(),_),Promise.resolve(new ArrayBuffer(0));var v=b.value,E=v.length;return A.loaded+=E,E<w||a.dataLength?(a.push(v),a.dataLength>=w&&n(A,x,a.flush(),_)):n(A,x,v,_),T()}).catch(function(){return Promise.reject()})};return d()},m}();function u(m,S){var f={method:"GET",mode:"cors",credentials:"same-origin",signal:S,headers:new self.Headers(o({},m.headers))};return m.rangeEnd&&f.headers.set("Range","bytes="+m.rangeStart+"-"+String(m.rangeEnd-1)),f}function s(m,S){return new self.Request(m.url,S)}var i=function(m){e(S,m);function S(f,_,A){var x;return x=m.call(this,f)||this,x.code=void 0,x.details=void 0,x.code=_,x.details=A,x}return S}(O(Error));const t=y},"./src/utils/hex.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>P});var M={hexDump:function(e){for(var O="",D=0;D<e.length;D++){var l=e[D].toString(16);l.length<2&&(l="0"+l),O+=l}return O}};const P=M},"./src/utils/imsc1-ttml-parser.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{IMSC1_CODEC:()=>p,parseIMSC1:()=>c});var M=L("./src/utils/mp4-tools.ts"),P=L("./src/utils/vttparser.ts"),k=L("./src/utils/vttcue.ts"),e=L("./src/demux/id3.ts"),O=L("./src/utils/timescale-conversion.ts"),D=L("./src/utils/webvtt-parser.ts");function l(){return l=Object.assign?Object.assign.bind():function(x){for(var w=1;w<arguments.length;w++){var n=arguments[w];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(x[a]=n[a])}return x},l.apply(this,arguments)}var p="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,g=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,o={left:"start",center:"center",right:"end",start:"start",end:"end"};function c(x,w,n,a,r){var d=(0,M.findBox)(new Uint8Array(x),["mdat"]);if(d.length===0){r(new Error("Could not parse IMSC1 mdat"));return}var T=d.map(function(v){return(0,e.utf8ArrayToStr)(v)}),b=(0,O.toTimescaleFromScale)(w,1,n);try{T.forEach(function(v){return a(y(v,b))})}catch(v){r(v)}}function y(x,w){var n=new DOMParser,a=n.parseFromString(x,"text/xml"),r=a.getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");var d={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},T=Object.keys(d).reduce(function(C,N){return C[N]=r.getAttribute("ttp:"+N)||d[N],C},{}),b=r.getAttribute("xml:space")!=="preserve",v=s(u(r,"styling","style")),E=s(u(r,"layout","region")),R=u(r,"body","[begin]");return[].map.call(R,function(C){var N=i(C,b);if(!N||!C.hasAttribute("begin"))return null;var K=f(C.getAttribute("begin"),T),H=f(C.getAttribute("dur"),T),ee=f(C.getAttribute("end"),T);if(K===null)throw S(C);if(ee===null){if(H===null)throw S(C);ee=K+H}var J=new k.default(K-w,ee-w,N);J.id=(0,D.generateCueId)(J.startTime,J.endTime,J.text);var se=E[C.getAttribute("region")],G=v[C.getAttribute("style")],Ee=t(se,G,v),ge=Ee.textAlign;if(ge){var Pe=o[ge];Pe&&(J.lineAlign=Pe),J.align=ge}return l(J,Ee),J}).filter(function(C){return C!==null})}function u(x,w,n){var a=x.getElementsByTagName(w)[0];return a?[].slice.call(a.querySelectorAll(n)):[]}function s(x){return x.reduce(function(w,n){var a=n.getAttribute("xml:id");return a&&(w[a]=n),w},{})}function i(x,w){return[].slice.call(x.childNodes).reduce(function(n,a,r){var d;return a.nodeName==="br"&&r?n+`
|
|
`:(d=a.childNodes)!==null&&d!==void 0&&d.length?i(a,w):w?n+a.textContent.trim().replace(/\s+/g," "):n+a.textContent},"")}function t(x,w,n){var a="http://www.w3.org/ns/ttml#styling",r=null,d=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],T=x!=null&&x.hasAttribute("style")?x.getAttribute("style"):null;return T&&n.hasOwnProperty(T)&&(r=n[T]),d.reduce(function(b,v){var E=m(w,a,v)||m(x,a,v)||m(r,a,v);return E&&(b[v]=E),b},{})}function m(x,w,n){return x&&x.hasAttributeNS(w,n)?x.getAttributeNS(w,n):null}function S(x){return new Error("Could not parse ttml timestamp "+x)}function f(x,w){if(!x)return null;var n=(0,P.parseTimeStamp)(x);return n===null&&(h.test(x)?n=_(x,w):g.test(x)&&(n=A(x,w))),n}function _(x,w){var n=h.exec(x),a=(n[4]|0)+(n[5]|0)/w.subFrameRate;return(n[1]|0)*3600+(n[2]|0)*60+(n[3]|0)+a/w.frameRate}function A(x,w){var n=g.exec(x),a=Number(n[1]),r=n[2];switch(r){case"h":return a*3600;case"m":return a*60;case"ms":return a*1e3;case"f":return a/w.frameRate;case"t":return a/w.tickRate}return a}},"./src/utils/keysystem-util.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{changeEndianness:()=>k,convertDataUriToArrayBytes:()=>e,strToUtf8array:()=>O});var M=L("./src/utils/numeric-encoding-utils.ts");function P(D){var l=O(D).subarray(0,16),p=new Uint8Array(16);return p.set(l,16-l.length),p}function k(D){var l=function(h,g,o){var c=h[g];h[g]=h[o],h[o]=c};l(D,0,3),l(D,1,2),l(D,4,5),l(D,6,7)}function e(D){var l=D.split(":"),p=null;if(l[0]==="data"&&l.length===2){var h=l[1].split(";"),g=h[h.length-1].split(",");if(g.length===2){var o=g[0]==="base64",c=g[1];o?(h.splice(-1,1),p=(0,M.base64Decode)(c)):p=P(c)}}return p}function O(D){return Uint8Array.from(unescape(encodeURIComponent(D)),function(l){return l.charCodeAt(0)})}},"./src/utils/logger.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{enableLogs:()=>D,logger:()=>l});var M=function(){},P={trace:M,debug:M,log:M,warn:M,info:M,error:M},k=P;function e(p){var h=self.console[p];return h?h.bind(self.console,"["+p+"] >"):M}function O(p){for(var h=arguments.length,g=new Array(h>1?h-1:0),o=1;o<h;o++)g[o-1]=arguments[o];g.forEach(function(c){k[c]=p[c]?p[c].bind(p):e(c)})}function D(p,h){if(self.console&&p===!0||typeof p=="object"){O(p,"debug","log","info","warn","error");try{k.log('Debug logs enabled for "'+h+'"')}catch(g){k=P}}else k=P}var l=k},"./src/utils/mediakeys-helper.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{KeySystemFormats:()=>P,KeySystemIds:()=>e,KeySystems:()=>M,getKeySystemsForConfig:()=>l,getSupportedMediaKeySystemConfigurations:()=>h,keySystemDomainToKeySystemFormat:()=>D,keySystemFormatToKeySystemDomain:()=>k,keySystemIdToKeySystemDomain:()=>O,requestMediaKeySystemAccess:()=>p});var M;(function(o){o.CLEARKEY="org.w3.clearkey",o.FAIRPLAY="com.apple.fps",o.PLAYREADY="com.microsoft.playready",o.WIDEVINE="com.widevine.alpha"})(M||(M={}));var P;(function(o){o.CLEARKEY="org.w3.clearkey",o.FAIRPLAY="com.apple.streamingkeydelivery",o.PLAYREADY="com.microsoft.playready",o.WIDEVINE="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"})(P||(P={}));function k(o){switch(o){case P.FAIRPLAY:return M.FAIRPLAY;case P.PLAYREADY:return M.PLAYREADY;case P.WIDEVINE:return M.WIDEVINE;case P.CLEARKEY:return M.CLEARKEY}}var e;(function(o){o.WIDEVINE="edef8ba979d64acea3c827dcd51d21ed"})(e||(e={}));function O(o){if(o===e.WIDEVINE)return M.WIDEVINE}function D(o){switch(o){case M.FAIRPLAY:return P.FAIRPLAY;case M.PLAYREADY:return P.PLAYREADY;case M.WIDEVINE:return P.WIDEVINE;case M.CLEARKEY:return P.CLEARKEY}}function l(o){var c=o.drmSystems,y=o.widevineLicenseUrl,u=c?[M.FAIRPLAY,M.WIDEVINE,M.PLAYREADY,M.CLEARKEY].filter(function(s){return!!c[s]}):[];return!u[M.WIDEVINE]&&y&&u.push(M.WIDEVINE),u}var p=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function h(o,c,y,u){var s;switch(o){case M.FAIRPLAY:s=["cenc","sinf"];break;case M.WIDEVINE:case M.PLAYREADY:s=["cenc"];break;case M.CLEARKEY:s=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+o)}return g(s,c,y,u)}function g(o,c,y,u){var s={initDataTypes:o,persistentState:u.persistentState||"not-allowed",distinctiveIdentifier:u.distinctiveIdentifier||"not-allowed",sessionTypes:u.sessionTypes||[u.sessionType||"temporary"],audioCapabilities:c.map(function(i){return{contentType:'audio/mp4; codecs="'+i+'"',robustness:u.audioRobustness||"",encryptionScheme:u.audioEncryptionScheme||null}}),videoCapabilities:y.map(function(i){return{contentType:'video/mp4; codecs="'+i+'"',robustness:u.videoRobustness||"",encryptionScheme:u.videoEncryptionScheme||null}})};return[s]}},"./src/utils/mediasource-helper.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{getMediaSource:()=>M});function M(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{RemuxerTrackIdConfig:()=>p,appendUint8Array:()=>w,bin2str:()=>h,computeRawDurationFromSamples:()=>_,discardEPB:()=>T,findBox:()=>u,getDuration:()=>f,getStartDTS:()=>S,mp4Box:()=>v,mp4pssh:()=>E,offsetStartDTS:()=>A,parseEmsg:()=>b,parseInitSegment:()=>i,parsePssh:()=>R,parseSEIMessageFromNALu:()=>d,parseSamples:()=>n,parseSegmentIndex:()=>s,parseSinf:()=>m,patchEncyptionData:()=>t,readSint32:()=>c,readUint16:()=>g,readUint32:()=>o,segmentValidRange:()=>x,writeUint32:()=>y});var M=L("./src/loader/fragment.ts"),P=L("./src/utils/typed-array.ts"),k=L("./src/demux/id3.ts"),e=L("./src/utils/logger.ts"),O=L("./src/utils/hex.ts"),D=Math.pow(2,32)-1,l=[].push,p={video:1,audio:2,id3:3,text:4};function h(C){return String.fromCharCode.apply(null,C)}function g(C,N){var K=C[N]<<8|C[N+1];return K<0?65536+K:K}function o(C,N){var K=c(C,N);return K<0?4294967296+K:K}function c(C,N){return C[N]<<24|C[N+1]<<16|C[N+2]<<8|C[N+3]}function y(C,N,K){C[N]=K>>24,C[N+1]=K>>16&255,C[N+2]=K>>8&255,C[N+3]=K&255}function u(C,N){var K=[];if(!N.length)return K;for(var H=C.byteLength,ee=0;ee<H;){var J=o(C,ee),se=h(C.subarray(ee+4,ee+8)),G=J>1?ee+J:H;if(se===N[0])if(N.length===1)K.push(C.subarray(ee+8,G));else{var Ee=u(C.subarray(ee+8,G),N.slice(1));Ee.length&&l.apply(K,Ee)}ee=G}return K}function s(C){var N=[],K=C[0],H=8,ee=o(C,H);H+=4;var J=0,se=0;K===0?H+=8:H+=16,H+=2;var G=C.length+se,Ee=g(C,H);H+=2;for(var ge=0;ge<Ee;ge++){var Pe=H,Ne=o(C,Pe);Pe+=4;var $e=Ne&2147483647,je=(Ne&2147483648)>>>31;if(je===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Ce=o(C,Pe);Pe+=4,N.push({referenceSize:$e,subsegmentDuration:Ce,info:{duration:Ce/ee,start:G,end:G+$e-1}}),G+=$e,Pe+=4,H=Pe}return{earliestPresentationTime:J,timescale:ee,version:K,referencesCount:Ee,references:N}}function i(C){for(var N=[],K=u(C,["moov","trak"]),H=0;H<K.length;H++){var ee=K[H],J=u(ee,["tkhd"])[0];if(J){var se=J[0],G=se===0?12:20,Ee=o(J,G),ge=u(ee,["mdia","mdhd"])[0];if(ge){se=ge[0],G=se===0?12:20;var Pe=o(ge,G),Ne=u(ee,["mdia","hdlr"])[0];if(Ne){var $e=h(Ne.subarray(8,12)),je={soun:M.ElementaryStreamTypes.AUDIO,vide:M.ElementaryStreamTypes.VIDEO}[$e];if(je){var Ce=u(ee,["mdia","minf","stbl","stsd"])[0],fe=void 0;Ce&&(fe=h(Ce.subarray(12,16))),N[Ee]={timescale:Pe,type:je},N[je]={timescale:Pe,id:Ee,codec:fe}}}}}}var Be=u(C,["moov","mvex","trex"]);return Be.forEach(function(Ue){var re=o(Ue,4),Z=N[re];Z&&(Z.default={duration:o(Ue,12),flags:o(Ue,20)})}),N}function t(C,N){if(!C||!N)return C;var K=N.keyId;if(K&&N.isCommonEncryption){var H=u(C,["moov","trak"]);H.forEach(function(ee){var J=u(ee,["mdia","minf","stbl","stsd"])[0],se=J.subarray(8),G=u(se,["enca"]),Ee=G.length>0;Ee||(G=u(se,["encv"])),G.forEach(function(ge){var Pe=Ee?ge.subarray(28):ge.subarray(78),Ne=u(Pe,["sinf"]);Ne.forEach(function($e){var je=m($e);if(je){var Ce=je.subarray(8,24);Ce.some(function(fe){return fe!==0})||(e.logger.log("[eme] Patching keyId in 'enc"+(Ee?"a":"v")+">sinf>>tenc' box: "+O.default.hexDump(Ce)+" -> "+O.default.hexDump(K)),je.set(K,8))}})})})}return C}function m(C){var N=u(C,["schm"])[0];if(N){var K=h(N.subarray(4,8));if(K==="cbcs"||K==="cenc")return u(C,["schi","tenc"])[0]}return e.logger.error("[eme] missing 'schm' box"),null}function S(C,N){return u(N,["moof","traf"]).reduce(function(K,H){var ee=u(H,["tfdt"])[0],J=ee[0],se=u(H,["tfhd"]).reduce(function(G,Ee){var ge=o(Ee,4),Pe=C[ge];if(Pe){var Ne=o(ee,4);J===1&&(Ne*=Math.pow(2,32),Ne+=o(ee,8));var $e=Pe.timescale||9e4,je=Ne/$e;if(isFinite(je)&&(G===null||je<G))return je}return G},null);return se!==null&&isFinite(se)&&(K===null||se<K)?se:K},null)||0}function f(C,N){for(var K=0,H=0,ee=0,J=u(C,["moof","traf"]),se=0;se<J.length;se++){var G=J[se],Ee=u(G,["tfhd"])[0],ge=o(Ee,4),Pe=N[ge];if(Pe){var Ne=Pe.default,$e=o(Ee,0)|(Ne==null?void 0:Ne.flags),je=Ne==null?void 0:Ne.duration;$e&8&&($e&2?je=o(Ee,12):je=o(Ee,8));for(var Ce=Pe.timescale||9e4,fe=u(G,["trun"]),Be=0;Be<fe.length;Be++){if(K=_(fe[Be]),!K&&je){var Ue=o(fe[Be],4);K=je*Ue}Pe.type===M.ElementaryStreamTypes.VIDEO?H+=K/Ce:Pe.type===M.ElementaryStreamTypes.AUDIO&&(ee+=K/Ce)}}}if(H===0&&ee===0){for(var re=0,Z=u(C,["sidx"]),le=0;le<Z.length;le++){var we=s(Z[le]);we!=null&&we.references&&(re+=we.references.reduce(function(ue,pe){return ue+pe.info.duration||0},0))}return re}return H||ee}function _(C){var N=o(C,0),K=8;N&1&&(K+=4),N&4&&(K+=4);for(var H=0,ee=o(C,4),J=0;J<ee;J++){if(N&256){var se=o(C,K);H+=se,K+=4}N&512&&(K+=4),N&1024&&(K+=4),N&2048&&(K+=4)}return H}function A(C,N,K){u(N,["moof","traf"]).forEach(function(H){u(H,["tfhd"]).forEach(function(ee){var J=o(ee,4),se=C[J];if(se){var G=se.timescale||9e4;u(H,["tfdt"]).forEach(function(Ee){var ge=Ee[0],Pe=o(Ee,4);if(ge===0)Pe-=K*G,Pe=Math.max(Pe,0),y(Ee,4,Pe);else{Pe*=Math.pow(2,32),Pe+=o(Ee,8),Pe-=K*G,Pe=Math.max(Pe,0);var Ne=Math.floor(Pe/(D+1)),$e=Math.floor(Pe%(D+1));y(Ee,4,Ne),y(Ee,8,$e)}})}})})}function x(C){var N={valid:null,remainder:null},K=u(C,["moof"]);if(K){if(K.length<2)return N.remainder=C,N}else return N;var H=K[K.length-1];return N.valid=(0,P.sliceUint8)(C,0,H.byteOffset-8),N.remainder=(0,P.sliceUint8)(C,H.byteOffset-8),N}function w(C,N){var K=new Uint8Array(C.length+N.length);return K.set(C),K.set(N,C.length),K}function n(C,N){var K=[],H=N.samples,ee=N.timescale,J=N.id,se=!1,G=u(H,["moof"]);return G.map(function(Ee){var ge=Ee.byteOffset-8,Pe=u(Ee,["traf"]);Pe.map(function(Ne){var $e=u(Ne,["tfdt"]).map(function(je){var Ce=je[0],fe=o(je,4);return Ce===1&&(fe*=Math.pow(2,32),fe+=o(je,8)),fe/ee})[0];return $e!==void 0&&(C=$e),u(Ne,["tfhd"]).map(function(je){var Ce=o(je,4),fe=o(je,0)&16777215,Be=(fe&1)!==0,Ue=(fe&2)!==0,re=(fe&8)!==0,Z=0,le=(fe&16)!==0,we=0,ue=(fe&32)!==0,pe=8;Ce===J&&(Be&&(pe+=8),Ue&&(pe+=4),re&&(Z=o(je,pe),pe+=4),le&&(we=o(je,pe),pe+=4),ue&&(pe+=4),N.type==="video"&&(se=a(N.codec)),u(Ne,["trun"]).map(function(ae){var _e=ae[0],ce=o(ae,0)&16777215,he=(ce&1)!==0,Le=0,Ye=(ce&4)!==0,ke=(ce&256)!==0,be=0,Re=(ce&512)!==0,Fe=0,Ae=(ce&1024)!==0,Me=(ce&2048)!==0,rt=0,lt=o(ae,4),Ze=8;he&&(Le=o(ae,Ze),Ze+=4),Ye&&(Ze+=4);for(var ft=Le+ge,Et=0;Et<lt;Et++){if(ke?(be=o(ae,Ze),Ze+=4):be=Z,Re?(Fe=o(ae,Ze),Ze+=4):Fe=we,Ae&&(Ze+=4),Me&&(_e===0?rt=o(ae,Ze):rt=c(ae,Ze),Ze+=4),N.type===M.ElementaryStreamTypes.VIDEO)for(var qe=0;qe<Fe;){var pt=o(H,ft);if(ft+=4,r(se,H[ft])){var Se=H.subarray(ft,ft+pt);d(Se,se?2:1,C+rt/ee,K)}ft+=pt,qe+=pt+4}C+=be/ee}}))})})}),K}function a(C){if(!C)return!1;var N=C.indexOf("."),K=N<0?C:C.substring(0,N);return K==="hvc1"||K==="hev1"||K==="dvh1"||K==="dvhe"}function r(C,N){if(C){var K=N>>1&63;return K===39||K===40}else{var H=N&31;return H===6}}function d(C,N,K,H){var ee=T(C),J=0;J+=N;for(var se=0,G=0,Ee=!1,ge=0;J<ee.length;){se=0;do{if(J>=ee.length)break;ge=ee[J++],se+=ge}while(ge===255);G=0;do{if(J>=ee.length)break;ge=ee[J++],G+=ge}while(ge===255);var Pe=ee.length-J;if(!Ee&&se===4&&J<ee.length){Ee=!0;var Ne=ee[J++];if(Ne===181){var $e=g(ee,J);if(J+=2,$e===49){var je=o(ee,J);if(J+=4,je===1195456820){var Ce=ee[J++];if(Ce===3){var fe=ee[J++],Be=31&fe,Ue=64&fe,re=Ue?2+Be*3:0,Z=new Uint8Array(re);if(Ue){Z[0]=fe;for(var le=1;le<re;le++)Z[le]=ee[J++]}H.push({type:Ce,payloadType:se,pts:K,bytes:Z})}}}}}else if(se===5&&G<Pe){if(Ee=!0,G>16){for(var we=[],ue=0;ue<16;ue++){var pe=ee[J++].toString(16);we.push(pe.length==1?"0"+pe:pe),(ue===3||ue===5||ue===7||ue===9)&&we.push("-")}for(var ae=G-16,_e=new Uint8Array(ae),ce=0;ce<ae;ce++)_e[ce]=ee[J++];H.push({payloadType:se,pts:K,uuid:we.join(""),userData:(0,k.utf8ArrayToStr)(_e),userDataBytes:_e})}}else if(G<Pe)J+=G;else if(G>Pe)break}}function T(C){for(var N=C.byteLength,K=[],H=1;H<N-2;)C[H]===0&&C[H+1]===0&&C[H+2]===3?(K.push(H+2),H+=2):H++;if(K.length===0)return C;var ee=N-K.length,J=new Uint8Array(ee),se=0;for(H=0;H<ee;se++,H++)se===K[0]&&(se++,K.shift()),J[H]=C[se];return J}function b(C){var N=C[0],K="",H="",ee=0,J=0,se=0,G=0,Ee=0,ge=0;if(N===0){for(;h(C.subarray(ge,ge+1))!=="\0";)K+=h(C.subarray(ge,ge+1)),ge+=1;for(K+=h(C.subarray(ge,ge+1)),ge+=1;h(C.subarray(ge,ge+1))!=="\0";)H+=h(C.subarray(ge,ge+1)),ge+=1;H+=h(C.subarray(ge,ge+1)),ge+=1,ee=o(C,12),J=o(C,16),G=o(C,20),Ee=o(C,24),ge=28}else if(N===1){ge+=4,ee=o(C,ge),ge+=4;var Pe=o(C,ge);ge+=4;var Ne=o(C,ge);for(ge+=4,se=Math.pow(2,32)*Pe+Ne,Number.isSafeInteger(se)||(se=Number.MAX_SAFE_INTEGER,console.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),G=o(C,ge),ge+=4,Ee=o(C,ge),ge+=4;h(C.subarray(ge,ge+1))!=="\0";)K+=h(C.subarray(ge,ge+1)),ge+=1;for(K+=h(C.subarray(ge,ge+1)),ge+=1;h(C.subarray(ge,ge+1))!=="\0";)H+=h(C.subarray(ge,ge+1)),ge+=1;H+=h(C.subarray(ge,ge+1)),ge+=1}var $e=C.subarray(ge,C.byteLength);return{schemeIdUri:K,value:H,timeScale:ee,presentationTime:se,presentationTimeDelta:J,eventDuration:G,id:Ee,payload:$e}}function v(C){for(var N=arguments.length,K=new Array(N>1?N-1:0),H=1;H<N;H++)K[H-1]=arguments[H];for(var ee=K.length,J=8,se=ee;se--;)J+=K[se].byteLength;var G=new Uint8Array(J);for(G[0]=J>>24&255,G[1]=J>>16&255,G[2]=J>>8&255,G[3]=J&255,G.set(C,4),se=0,J=8;se<ee;se++)G.set(K[se],J),J+=K[se].byteLength;return G}function E(C,N,K){if(C.byteLength!==16)throw new RangeError("Invalid system id");var H,ee;if(N){H=1,ee=new Uint8Array(N.length*16);for(var J=0;J<N.length;J++){var se=N[J];if(se.byteLength!==16)throw new RangeError("Invalid key");ee.set(se,J*16)}}else H=0,ee=new Uint8Array;var G;H>0?(G=new Uint8Array(4),N.length>0&&new DataView(G.buffer).setUint32(0,N.length,!1)):G=new Uint8Array;var Ee=new Uint8Array(4);return K&&K.byteLength>0&&new DataView(Ee.buffer).setUint32(0,K.byteLength,!1),v([112,115,115,104],new Uint8Array([H,0,0,0]),C,G,ee,Ee,K||new Uint8Array)}function R(C){if(!(C instanceof ArrayBuffer)||C.byteLength<32)return null;var N={version:0,systemId:"",kids:null,data:null},K=new DataView(C),H=K.getUint32(0);if(C.byteLength!==H&&H>44)return null;var ee=K.getUint32(4);if(ee!==1886614376||(N.version=K.getUint32(8)>>>24,N.version>1))return null;N.systemId=O.default.hexDump(new Uint8Array(C,12,16));var J=K.getUint32(28);if(N.version===0){if(H-32<J)return null;N.data=new Uint8Array(C,32,J)}else if(N.version===1){N.kids=[];for(var se=0;se<J;se++)N.kids.push(new Uint8Array(C,32+se*16,16))}return N}},"./src/utils/numeric-encoding-utils.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{base64Decode:()=>D,base64DecodeToStr:()=>k,base64Encode:()=>e,base64ToBase64Url:()=>M,base64UrlEncode:()=>O,strToBase64Encode:()=>P});function M(l){return l.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function P(l){return btoa(l)}function k(l){return atob(l)}function e(l){return btoa(String.fromCharCode.apply(String,l))}function O(l){return M(e(l))}function D(l){return Uint8Array.from(atob(l),function(p){return p.charCodeAt(0)})}},"./src/utils/output-filter.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>M});var M=function(){function P(e,O){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=O}var k=P.prototype;return k.dispatchCue=function(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},k.newCue=function(O,D,l){(this.startTime===null||this.startTime>O)&&(this.startTime=O),this.endTime=D,this.screen=l,this.timelineController.createCaptionsTrack(this.trackName)},k.reset=function(){this.cueRanges=[],this.startTime=null},P}()},"./src/utils/texttrack-utils.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{addCueToTrack:()=>k,clearCurrentCues:()=>e,getCuesInRange:()=>l,removeCuesInRange:()=>O,sendAddTrackEvent:()=>P});var M=L("./src/utils/logger.ts");function P(p,h){var g;try{g=new Event("addtrack")}catch(o){g=document.createEvent("Event"),g.initEvent("addtrack",!1,!1)}g.track=p,h.dispatchEvent(g)}function k(p,h){var g=p.mode;if(g==="disabled"&&(p.mode="hidden"),p.cues&&!p.cues.getCueById(h.id))try{if(p.addCue(h),!p.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(c){M.logger.debug("[texttrack-utils]: "+c);var o=new self.TextTrackCue(h.startTime,h.endTime,h.text);o.id=h.id,p.addCue(o)}g==="disabled"&&(p.mode=g)}function e(p){var h=p.mode;if(h==="disabled"&&(p.mode="hidden"),p.cues)for(var g=p.cues.length;g--;)p.removeCue(p.cues[g]);h==="disabled"&&(p.mode=h)}function O(p,h,g,o){var c=p.mode;if(c==="disabled"&&(p.mode="hidden"),p.cues&&p.cues.length>0)for(var y=l(p.cues,h,g),u=0;u<y.length;u++)(!o||o(y[u]))&&p.removeCue(y[u]);c==="disabled"&&(p.mode=c)}function D(p,h){if(h<p[0].startTime)return 0;var g=p.length-1;if(h>p[g].endTime)return-1;for(var o=0,c=g;o<=c;){var y=Math.floor((c+o)/2);if(h<p[y].startTime)c=y-1;else if(h>p[y].startTime&&o<g)o=y+1;else return y}return p[o].startTime-h<h-p[c].startTime?o:c}function l(p,h,g){var o=[],c=D(p,h);if(c>-1)for(var y=c,u=p.length;y<u;y++){var s=p[y];if(s.startTime>=h&&s.endTime<=g)o.push(s);else if(s.startTime>g)return o}return o}},"./src/utils/time-ranges.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>P});var M={toString:function(e){for(var O="",D=e.length,l=0;l<D;l++)O+="["+e.start(l).toFixed(3)+"-"+e.end(l).toFixed(3)+"]";return O}};const P=M},"./src/utils/timescale-conversion.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{toMpegTsClockFromTimescale:()=>O,toMsFromMpegTsClock:()=>e,toTimescaleFromBase:()=>P,toTimescaleFromScale:()=>k});var M=9e4;function P(D,l,p,h){p===void 0&&(p=1),h===void 0&&(h=!1);var g=D*l*p;return h?Math.round(g):g}function k(D,l,p,h){return p===void 0&&(p=1),h===void 0&&(h=!1),P(D,l,1/p,h)}function e(D,l){return l===void 0&&(l=!1),P(D,1e3,1/M,l)}function O(D,l){return l===void 0&&(l=1),P(D,M,1/l)}},"./src/utils/typed-array.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{sliceUint8:()=>M});function M(P,k,e){return Uint8Array.prototype.slice?P.slice(k,e):new Uint8Array(Array.prototype.slice.call(P,k,e))}},"./src/utils/vttcue.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>M});const M=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var P=["","lr","rl"],k=["start","middle","end","left","right"];function e(h,g){if(typeof g!="string"||!Array.isArray(h))return!1;var o=g.toLowerCase();return~h.indexOf(o)?o:!1}function O(h){return e(P,h)}function D(h){return e(k,h)}function l(h){for(var g=arguments.length,o=new Array(g>1?g-1:0),c=1;c<g;c++)o[c-1]=arguments[c];for(var y=1;y<arguments.length;y++){var u=arguments[y];for(var s in u)h[s]=u[s]}return h}function p(h,g,o){var c=this,y={enumerable:!0};c.hasBeenReset=!1;var u="",s=!1,i=h,t=g,m=o,S=null,f="",_=!0,A="auto",x="start",w=50,n="middle",a=50,r="middle";Object.defineProperty(c,"id",l({},y,{get:function(){return u},set:function(T){u=""+T}})),Object.defineProperty(c,"pauseOnExit",l({},y,{get:function(){return s},set:function(T){s=!!T}})),Object.defineProperty(c,"startTime",l({},y,{get:function(){return i},set:function(T){if(typeof T!="number")throw new TypeError("Start time must be set to a number.");i=T,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",l({},y,{get:function(){return t},set:function(T){if(typeof T!="number")throw new TypeError("End time must be set to a number.");t=T,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",l({},y,{get:function(){return m},set:function(T){m=""+T,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",l({},y,{get:function(){return S},set:function(T){S=T,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",l({},y,{get:function(){return f},set:function(T){var b=O(T);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");f=b,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",l({},y,{get:function(){return _},set:function(T){_=!!T,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",l({},y,{get:function(){return A},set:function(T){if(typeof T!="number"&&T!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");A=T,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",l({},y,{get:function(){return x},set:function(T){var b=D(T);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",l({},y,{get:function(){return w},set:function(T){if(T<0||T>100)throw new Error("Position must be between 0 and 100.");w=T,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",l({},y,{get:function(){return n},set:function(T){var b=D(T);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");n=b,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",l({},y,{get:function(){return a},set:function(T){if(T<0||T>100)throw new Error("Size must be between 0 and 100.");a=T,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",l({},y,{get:function(){return r},set:function(T){var b=D(T);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");r=b,this.hasBeenReset=!0}})),c.displayState=void 0}return p.prototype.getCueAsHTML=function(){var h=self.WebVTT;return h.convertCueToDOMTree(self,this.text)},p}()},"./src/utils/vttparser.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{VTTParser:()=>g,fixLineBreaks:()=>h,parseTimeStamp:()=>k});var M=L("./src/utils/vttcue.ts"),P=function(){function o(){}var c=o.prototype;return c.decode=function(u,s){if(!u)return"";if(typeof u!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(u))},o}();function k(o){function c(u,s,i,t){return(u|0)*3600+(s|0)*60+(i|0)+parseFloat(t||0)}var y=o.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return y?parseFloat(y[2])>59?c(y[2],y[3],0,y[4]):c(y[1],y[2],y[3],y[4]):null}var e=function(){function o(){this.values=Object.create(null)}var c=o.prototype;return c.set=function(u,s){!this.get(u)&&s!==""&&(this.values[u]=s)},c.get=function(u,s,i){return i?this.has(u)?this.values[u]:s[i]:this.has(u)?this.values[u]:s},c.has=function(u){return u in this.values},c.alt=function(u,s,i){for(var t=0;t<i.length;++t)if(s===i[t]){this.set(u,s);break}},c.integer=function(u,s){/^-?\d+$/.test(s)&&this.set(u,parseInt(s,10))},c.percent=function(u,s){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(s)){var i=parseFloat(s);if(i>=0&&i<=100)return this.set(u,i),!0}return!1},o}();function O(o,c,y,u){var s=u?o.split(u):[o];for(var i in s)if(typeof s[i]=="string"){var t=s[i].split(y);if(t.length===2){var m=t[0],S=t[1];c(m,S)}}}var D=new M.default(0,0,""),l=D.align==="middle"?"middle":"center";function p(o,c,y){var u=o;function s(){var m=k(o);if(m===null)throw new Error("Malformed timestamp: "+u);return o=o.replace(/^[^\sa-zA-Z-]+/,""),m}function i(m,S){var f=new e;O(m,function(x,w){var n;switch(x){case"region":for(var a=y.length-1;a>=0;a--)if(y[a].id===w){f.set(x,y[a].region);break}break;case"vertical":f.alt(x,w,["rl","lr"]);break;case"line":n=w.split(","),f.integer(x,n[0]),f.percent(x,n[0])&&f.set("snapToLines",!1),f.alt(x,n[0],["auto"]),n.length===2&&f.alt("lineAlign",n[1],["start",l,"end"]);break;case"position":n=w.split(","),f.percent(x,n[0]),n.length===2&&f.alt("positionAlign",n[1],["start",l,"end","line-left","line-right","auto"]);break;case"size":f.percent(x,w);break;case"align":f.alt(x,w,["start",l,"end","left","right"]);break}},/:/,/\s/),S.region=f.get("region",null),S.vertical=f.get("vertical","");var _=f.get("line","auto");_==="auto"&&D.line===-1&&(_=-1),S.line=_,S.lineAlign=f.get("lineAlign","start"),S.snapToLines=f.get("snapToLines",!0),S.size=f.get("size",100),S.align=f.get("align",l);var A=f.get("position","auto");A==="auto"&&D.position===50&&(A=S.align==="start"||S.align==="left"?0:S.align==="end"||S.align==="right"?100:50),S.position=A}function t(){o=o.replace(/^\s+/,"")}if(t(),c.startTime=s(),t(),o.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);o=o.slice(3),t(),c.endTime=s(),t(),i(o,c)}function h(o){return o.replace(/<br(?: \/)?>/gi,`
|
|
`)}var g=function(){function o(){this.state="INITIAL",this.buffer="",this.decoder=new P,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var c=o.prototype;return c.parse=function(u){var s=this;u&&(s.buffer+=s.decoder.decode(u,{stream:!0}));function i(){var A=s.buffer,x=0;for(A=h(A);x<A.length&&A[x]!=="\r"&&A[x]!==`
|
|
`;)++x;var w=A.slice(0,x);return A[x]==="\r"&&++x,A[x]===`
|
|
`&&++x,s.buffer=A.slice(x),w}function t(A){O(A,function(x,w){},/:/)}try{var m="";if(s.state==="INITIAL"){if(!/\r\n|\n/.test(s.buffer))return this;m=i();var S=m.match(/^()?WEBVTT([ \t].*)?$/);if(!S||!S[0])throw new Error("Malformed WebVTT signature.");s.state="HEADER"}for(var f=!1;s.buffer;){if(!/\r\n|\n/.test(s.buffer))return this;switch(f?f=!1:m=i(),s.state){case"HEADER":/:/.test(m)?t(m):m||(s.state="ID");continue;case"NOTE":m||(s.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(m)){s.state="NOTE";break}if(!m)continue;if(s.cue=new M.default(0,0,""),s.state="CUE",m.indexOf("-->")===-1){s.cue.id=m;continue}case"CUE":if(!s.cue){s.state="BADCUE";continue}try{p(m,s.cue,s.regionList)}catch(A){s.cue=null,s.state="BADCUE";continue}s.state="CUETEXT";continue;case"CUETEXT":{var _=m.indexOf("-->")!==-1;if(!m||_&&(f=!0)){s.oncue&&s.cue&&s.oncue(s.cue),s.cue=null,s.state="ID";continue}if(s.cue===null)continue;s.cue.text&&(s.cue.text+=`
|
|
`),s.cue.text+=m}continue;case"BADCUE":m||(s.state="ID")}}}catch(A){s.state==="CUETEXT"&&s.cue&&s.oncue&&s.oncue(s.cue),s.cue=null,s.state=s.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},c.flush=function(){var u=this;try{if((u.cue||u.state==="HEADER")&&(u.buffer+=`
|
|
|
|
`,u.parse()),u.state==="INITIAL"||u.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(s){u.onparsingerror&&u.onparsingerror(s)}return u.onflush&&u.onflush(),this},o}()},"./src/utils/webvtt-parser.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{generateCueId:()=>g,parseWebVTT:()=>c});var M=L("./src/polyfills/number.ts"),P=L("./src/utils/vttparser.ts"),k=L("./src/demux/id3.ts"),e=L("./src/utils/timescale-conversion.ts"),O=L("./src/remux/mp4-remuxer.ts"),D=/\r\n|\n\r|\n|\r/g,l=function(u,s,i){return i===void 0&&(i=0),u.slice(i,i+s.length)===s},p=function(u){var s=parseInt(u.slice(-3)),i=parseInt(u.slice(-6,-4)),t=parseInt(u.slice(-9,-7)),m=u.length>9?parseInt(u.substring(0,u.indexOf(":"))):0;if(!(0,M.isFiniteNumber)(s)||!(0,M.isFiniteNumber)(i)||!(0,M.isFiniteNumber)(t)||!(0,M.isFiniteNumber)(m))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+u);return s+=1e3*i,s+=60*1e3*t,s+=60*60*1e3*m,s},h=function(u){for(var s=5381,i=u.length;i;)s=s*33^u.charCodeAt(--i);return(s>>>0).toString()};function g(y,u,s){return h(y.toString())+h(u.toString())+h(s)}var o=function(u,s,i){var t=u[s],m=u[t.prevCC];if(!m||!m.new&&t.new){u.ccOffset=u.presentationOffset=t.start,t.new=!1;return}for(;(S=m)!==null&&S!==void 0&&S.new;){var S;u.ccOffset+=t.start-m.start,t.new=!1,t=m,m=u[t.prevCC]}u.presentationOffset=i};function c(y,u,s,i,t,m,S,f){var _=new P.VTTParser,A=(0,k.utf8ArrayToStr)(new Uint8Array(y)).trim().replace(D,`
|
|
`).split(`
|
|
`),x=[],w=(0,e.toMpegTsClockFromTimescale)(u,s),n="00:00.000",a=0,r=0,d,T=!0;_.oncue=function(b){var v=i[t],E=i.ccOffset,R=(a-w)/9e4;v!=null&&v.new&&(r!==void 0?E=i.ccOffset=v.start:o(i,t,R)),R&&(E=R-i.presentationOffset);var C=b.endTime-b.startTime,N=(0,O.normalizePts)((b.startTime+E-r)*9e4,m*9e4)/9e4;b.startTime=Math.max(N,0),b.endTime=Math.max(N+C,0);var K=b.text.trim();b.text=decodeURIComponent(encodeURIComponent(K)),b.id||(b.id=g(b.startTime,b.endTime,K)),b.endTime>0&&x.push(b)},_.onparsingerror=function(b){d=b},_.onflush=function(){if(d){f(d);return}S(x)},A.forEach(function(b){if(T)if(l(b,"X-TIMESTAMP-MAP=")){T=!1,b.slice(16).split(",").forEach(function(v){l(v,"LOCAL:")?n=v.slice(6):l(v,"MPEGTS:")&&(a=parseInt(v.slice(7)))});try{r=p(n)/1e3}catch(v){d=v}return}else b===""&&(T=!1);_.parse(b+`
|
|
`)}),_.flush()}},"./src/utils/xhr-loader.ts":(te,U,L)=>{"use strict";L.r(U),L.d(U,{default:()=>O});var M=L("./src/utils/logger.ts"),P=L("./src/loader/load-stats.ts"),k=/^age:\s*[\d.]+\s*$/m,e=function(){function D(p){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=p?p.xhrSetup:null,this.stats=new P.LoadStats,this.retryDelay=0}var l=D.prototype;return l.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},l.abortInternal=function(){var h=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),h&&(h.onreadystatechange=null,h.onprogress=null,h.readyState!==4&&(this.stats.aborted=!0,h.abort()))},l.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},l.load=function(h,g,o){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=h,this.config=g,this.callbacks=o,this.retryDelay=g.retryDelay,this.loadInternal()},l.loadInternal=function(){var h=this.config,g=this.context;if(h){var o=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var y=this.xhrSetup;try{if(y)try{y(o,g.url)}catch(i){o.open("GET",g.url,!0),y(o,g.url)}o.readyState||o.open("GET",g.url,!0);var u=this.context.headers;if(u)for(var s in u)o.setRequestHeader(s,u[s])}catch(i){this.callbacks.onError({code:o.status,text:i.message},g,o);return}g.rangeEnd&&o.setRequestHeader("Range","bytes="+g.rangeStart+"-"+(g.rangeEnd-1)),o.onreadystatechange=this.readystatechange.bind(this),o.onprogress=this.loadprogress.bind(this),o.responseType=g.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout),o.send()}},l.readystatechange=function(){var h=this.context,g=this.loader,o=this.stats;if(!(!h||!g)){var c=g.readyState,y=this.config;if(!o.aborted&&c>=2)if(self.clearTimeout(this.requestTimeout),o.loading.first===0&&(o.loading.first=Math.max(self.performance.now(),o.loading.start)),c===4){g.onreadystatechange=null,g.onprogress=null;var u=g.status,s=g.responseType==="arraybuffer";if(u>=200&&u<300&&(s&&g.response||g.responseText!==null)){o.loading.end=Math.max(self.performance.now(),o.loading.first);var i,t;if(s?(i=g.response,t=i.byteLength):(i=g.responseText,t=i.length),o.loaded=o.total=t,!this.callbacks)return;var m=this.callbacks.onProgress;if(m&&m(o,h,i,g),!this.callbacks)return;var S={url:g.responseURL,data:i};this.callbacks.onSuccess(S,o,h,g)}else o.retry>=y.maxRetry||u>=400&&u<499?(M.logger.error(u+" while loading "+h.url),this.callbacks.onError({code:u,text:g.statusText},h,g)):(M.logger.warn(u+" while loading "+h.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,y.maxRetryDelay),o.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),y.timeout)}},l.loadtimeout=function(){M.logger.warn("timeout while loading "+this.context.url);var h=this.callbacks;h&&(this.abortInternal(),h.onTimeout(this.stats,this.context,this.loader))},l.loadprogress=function(h){var g=this.stats;g.loaded=h.loaded,h.lengthComputable&&(g.total=h.total)},l.getCacheAge=function(){var h=null;if(this.loader&&k.test(this.loader.getAllResponseHeaders())){var g=this.loader.getResponseHeader("age");h=g?parseFloat(g):null}return h},D}();const O=e},"./node_modules/eventemitter3/index.js":te=>{"use strict";var U=Object.prototype.hasOwnProperty,L="~";function M(){}Object.create&&(M.prototype=Object.create(null),new M().__proto__||(L=!1));function P(D,l,p){this.fn=D,this.context=l,this.once=p||!1}function k(D,l,p,h,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var o=new P(p,h||D,g),c=L?L+l:l;return D._events[c]?D._events[c].fn?D._events[c]=[D._events[c],o]:D._events[c].push(o):(D._events[c]=o,D._eventsCount++),D}function e(D,l){--D._eventsCount===0?D._events=new M:delete D._events[l]}function O(){this._events=new M,this._eventsCount=0}O.prototype.eventNames=function(){var l=[],p,h;if(this._eventsCount===0)return l;for(h in p=this._events)U.call(p,h)&&l.push(L?h.slice(1):h);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(p)):l},O.prototype.listeners=function(l){var p=L?L+l:l,h=this._events[p];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,o=h.length,c=new Array(o);g<o;g++)c[g]=h[g].fn;return c},O.prototype.listenerCount=function(l){var p=L?L+l:l,h=this._events[p];return h?h.fn?1:h.length:0},O.prototype.emit=function(l,p,h,g,o,c){var y=L?L+l:l;if(!this._events[y])return!1;var u=this._events[y],s=arguments.length,i,t;if(u.fn){switch(u.once&&this.removeListener(l,u.fn,void 0,!0),s){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,p),!0;case 3:return u.fn.call(u.context,p,h),!0;case 4:return u.fn.call(u.context,p,h,g),!0;case 5:return u.fn.call(u.context,p,h,g,o),!0;case 6:return u.fn.call(u.context,p,h,g,o,c),!0}for(t=1,i=new Array(s-1);t<s;t++)i[t-1]=arguments[t];u.fn.apply(u.context,i)}else{var m=u.length,S;for(t=0;t<m;t++)switch(u[t].once&&this.removeListener(l,u[t].fn,void 0,!0),s){case 1:u[t].fn.call(u[t].context);break;case 2:u[t].fn.call(u[t].context,p);break;case 3:u[t].fn.call(u[t].context,p,h);break;case 4:u[t].fn.call(u[t].context,p,h,g);break;default:if(!i)for(S=1,i=new Array(s-1);S<s;S++)i[S-1]=arguments[S];u[t].fn.apply(u[t].context,i)}}return!0},O.prototype.on=function(l,p,h){return k(this,l,p,h,!1)},O.prototype.once=function(l,p,h){return k(this,l,p,h,!0)},O.prototype.removeListener=function(l,p,h,g){var o=L?L+l:l;if(!this._events[o])return this;if(!p)return e(this,o),this;var c=this._events[o];if(c.fn)c.fn===p&&(!g||c.once)&&(!h||c.context===h)&&e(this,o);else{for(var y=0,u=[],s=c.length;y<s;y++)(c[y].fn!==p||g&&!c[y].once||h&&c[y].context!==h)&&u.push(c[y]);u.length?this._events[o]=u.length===1?u[0]:u:e(this,o)}return this},O.prototype.removeAllListeners=function(l){var p;return l?(p=L?L+l:l,this._events[p]&&e(this,p)):(this._events=new M,this._eventsCount=0),this},O.prototype.off=O.prototype.removeListener,O.prototype.addListener=O.prototype.on,O.prefixed=L,O.EventEmitter=O,te.exports=O},"./node_modules/url-toolkit/src/url-toolkit.js":function(te){(function(U){var L=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,M=/^(?=([^\/?#]*))\1([^]*)$/,P=/(?:\/|^)\.(?=\/)/g,k=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(O,D,l){if(l=l||{},O=O.trim(),D=D.trim(),!D){if(!l.alwaysNormalize)return O;var p=e.parseURL(O);if(!p)throw new Error("Error trying to parse base URL.");return p.path=e.normalizePath(p.path),e.buildURLFromParts(p)}var h=e.parseURL(D);if(!h)throw new Error("Error trying to parse relative URL.");if(h.scheme)return l.alwaysNormalize?(h.path=e.normalizePath(h.path),e.buildURLFromParts(h)):D;var g=e.parseURL(O);if(!g)throw new Error("Error trying to parse base URL.");if(!g.netLoc&&g.path&&g.path[0]!=="/"){var o=M.exec(g.path);g.netLoc=o[1],g.path=o[2]}g.netLoc&&!g.path&&(g.path="/");var c={scheme:g.scheme,netLoc:h.netLoc,path:null,params:h.params,query:h.query,fragment:h.fragment};if(!h.netLoc&&(c.netLoc=g.netLoc,h.path[0]!=="/"))if(!h.path)c.path=g.path,h.params||(c.params=g.params,h.query||(c.query=g.query));else{var y=g.path,u=y.substring(0,y.lastIndexOf("/")+1)+h.path;c.path=e.normalizePath(u)}return c.path===null&&(c.path=l.alwaysNormalize?e.normalizePath(h.path):h.path),e.buildURLFromParts(c)},parseURL:function(O){var D=L.exec(O);return D?{scheme:D[1]||"",netLoc:D[2]||"",path:D[3]||"",params:D[4]||"",query:D[5]||"",fragment:D[6]||""}:null},normalizePath:function(O){for(O=O.split("").reverse().join("").replace(P,"");O.length!==(O=O.replace(k,"")).length;);return O.split("").reverse().join("")},buildURLFromParts:function(O){return O.scheme+O.netLoc+O.path+O.params+O.query+O.fragment}};te.exports=e})(this)}},B={};function z(te){var U=B[te];if(U!==void 0)return U.exports;var L=B[te]={exports:{}};return Qe[te].call(L.exports,L,L.exports,z),L.exports}z.m=Qe,z.n=te=>{var U=te&&te.__esModule?()=>te.default:()=>te;return z.d(U,{a:U}),U},z.d=(te,U)=>{for(var L in U)z.o(U,L)&&!z.o(te,L)&&Object.defineProperty(te,L,{enumerable:!0,get:U[L]})},z.o=(te,U)=>Object.prototype.hasOwnProperty.call(te,U),z.r=te=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(te,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(te,"__esModule",{value:!0})};var oe=z("./src/hls.ts");return oe=oe.default,oe})())},84204:function(Ct,Qe,B){"use strict";var z,oe;function te(U,L,M){var P=function(k,e){return U.js_beautify(k,e)};return P.js=U.js_beautify,P.css=L.css_beautify,P.html=M.html_beautify,P.js_beautify=U.js_beautify,P.css_beautify=L.css_beautify,P.html_beautify=M.html_beautify,P}z=[B(77937),B(85040),B(3566)],oe=function(U,L,M){return te(U,L,M)}.apply(Qe,z),oe!==void 0&&(Ct.exports=oe)},85040:function(Ct,Qe){var B,z;(function(){var oe;(function(){"use strict";var U=[,,function(k){function e(l){this.__parent=l,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}e.prototype.clone_empty=function(){var l=new e(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},e.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},e.prototype.has_match=function(l){for(var p=this.__items.length-1;p>=0;p--)if(this.__items[p].match(l))return!0;return!1},e.prototype.set_indent=function(l,p){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=p||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return this.__items.length===0},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(l){this.__items.push(l);var p=l.lastIndexOf(`
|
|
`);p!==-1?this.__character_count=l.length-p:this.__character_count+=l.length},e.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function O(l,p){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),p=p||"",l.indent_level>0&&(p=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=p,this.__base_string_length=p.length}O.prototype.get_indent_size=function(l,p){var h=this.__base_string_length;return p=p||0,l<0&&(h=0),h+=l*this.__indent_size,h+=p,h},O.prototype.get_indent_string=function(l,p){var h=this.__base_string;return p=p||0,l<0&&(l=0,h=""),p+=l*this.__indent_size,this.__ensure_cache(p),h+=this.__cache[p],h},O.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},O.prototype.__add_column=function(){var l=this.__cache.length,p=0,h="";this.__indent_size&&l>=this.__indent_size&&(p=Math.floor(l/this.__indent_size),l-=p*this.__indent_size,h=new Array(p+1).join(this.__indent_string)),l&&(h+=new Array(l+1).join(" ")),this.__cache.push(h)};function D(l,p){this.__indent_cache=new O(l,p),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}D.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},D.prototype.get_line_number=function(){return this.__lines.length},D.prototype.get_indent_string=function(l,p){return this.__indent_cache.get_indent_string(l,p)},D.prototype.get_indent_size=function(l,p){return this.__indent_cache.get_indent_size(l,p)},D.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},D.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},D.prototype.get_code=function(l){this.trim(!0);var p=this.current_line.pop();p&&(p[p.length-1]===`
|
|
`&&(p=p.replace(/\n+$/g,"")),this.current_line.push(p)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(`
|
|
`);return l!==`
|
|
`&&(h=h.replace(/[\n]/g,l)),h},D.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},D.prototype.set_indent=function(l,p){return l=l||0,p=p||0,this.next_line.set_indent(l,p),this.__lines.length>1?(this.current_line.set_indent(l,p),!0):(this.current_line.set_indent(),!1)},D.prototype.add_raw_token=function(l){for(var p=0;p<l.newlines;p++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},D.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},D.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},D.prototype.remove_indent=function(l){for(var p=this.__lines.length;l<p;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},D.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},D.prototype.just_added_newline=function(){return this.current_line.is_empty()},D.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},D.prototype.ensure_empty_line_above=function(l,p){for(var h=this.__lines.length-2;h>=0;){var g=this.__lines[h];if(g.is_empty())break;if(g.item(0).indexOf(l)!==0&&g.item(-1)!==p){this.__lines.splice(h+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},k.exports.Output=D},,,,function(k){function e(l,p){this.raw_options=O(l,p),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}e.prototype._get_array=function(l,p){var h=this.raw_options[l],g=p||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(g=h.concat()):typeof h=="string"&&(g=h.split(/[^a-zA-Z0-9_\/\-]+/)),g},e.prototype._get_boolean=function(l,p){var h=this.raw_options[l],g=h===void 0?!!p:!!h;return g},e.prototype._get_characters=function(l,p){var h=this.raw_options[l],g=p||"";return typeof h=="string"&&(g=h.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),g},e.prototype._get_number=function(l,p){var h=this.raw_options[l];p=parseInt(p,10),isNaN(p)&&(p=0);var g=parseInt(h,10);return isNaN(g)&&(g=p),g},e.prototype._get_selection=function(l,p,h){var g=this._get_selection_list(l,p,h);if(g.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
`+p+`
|
|
You passed in: '`+this.raw_options[l]+"'");return g[0]},e.prototype._get_selection_list=function(l,p,h){if(!p||p.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[p[0]],!this._is_valid_selection(h,p))throw new Error("Invalid Default Value!");var g=this._get_array(l,h);if(!this._is_valid_selection(g,p))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
`+p+`
|
|
You passed in: '`+this.raw_options[l]+"'");return g},e.prototype._is_valid_selection=function(l,p){return l.length&&p.length&&!l.some(function(h){return p.indexOf(h)===-1})};function O(l,p){var h={};l=D(l);var g;for(g in l)g!==p&&(h[g]=l[g]);if(p&&l[p])for(g in l[p])h[g]=l[p][g];return h}function D(l){var p={},h;for(h in l){var g=h.replace(/-/g,"_");p[g]=l[h]}return p}k.exports.Options=e,k.exports.normalizeOpts=D,k.exports.mergeOpts=O},,function(k){var e=RegExp.prototype.hasOwnProperty("sticky");function O(D){this.__input=D||"",this.__input_length=this.__input.length,this.__position=0}O.prototype.restart=function(){this.__position=0},O.prototype.back=function(){this.__position>0&&(this.__position-=1)},O.prototype.hasNext=function(){return this.__position<this.__input_length},O.prototype.next=function(){var D=null;return this.hasNext()&&(D=this.__input.charAt(this.__position),this.__position+=1),D},O.prototype.peek=function(D){var l=null;return D=D||0,D+=this.__position,D>=0&&D<this.__input_length&&(l=this.__input.charAt(D)),l},O.prototype.__match=function(D,l){D.lastIndex=l;var p=D.exec(this.__input);return p&&!(e&&D.sticky)&&p.index!==l&&(p=null),p},O.prototype.test=function(D,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(D,l):!1},O.prototype.testChar=function(D,l){var p=this.peek(l);return D.lastIndex=0,p!==null&&D.test(p)},O.prototype.match=function(D){var l=this.__match(D,this.__position);return l?this.__position+=l[0].length:l=null,l},O.prototype.read=function(D,l,p){var h="",g;return D&&(g=this.match(D),g&&(h+=g[0])),l&&(g||!D)&&(h+=this.readUntil(l,p)),h},O.prototype.readUntil=function(D,l){var p="",h=this.__position;D.lastIndex=this.__position;var g=D.exec(this.__input);return g?(h=g.index,l&&(h+=g[0].length)):h=this.__input_length,p=this.__input.substring(this.__position,h),this.__position=h,p},O.prototype.readUntilAfter=function(D){return this.readUntil(D,!0)},O.prototype.get_regexp=function(D,l){var p=null,h="g";return l&&e&&(h="y"),typeof D=="string"&&D!==""?p=new RegExp(D,h):D&&(p=new RegExp(D.source,h)),p},O.prototype.get_literal_regexp=function(D){return RegExp(D.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},O.prototype.peekUntilAfter=function(D){var l=this.__position,p=this.readUntilAfter(D);return this.__position=l,p},O.prototype.lookBack=function(D){var l=this.__position-1;return l>=D.length&&this.__input.substring(l-D.length,l).toLowerCase()===D},k.exports.InputScanner=O},,,,,function(k){function e(O,D){O=typeof O=="string"?O:O.source,D=typeof D=="string"?D:D.source,this.__directives_block_pattern=new RegExp(O+/ beautify( \w+[:]\w+)+ /.source+D,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(O+/\sbeautify\signore:end\s/.source+D,"g")}e.prototype.get_directives=function(O){if(!O.match(this.__directives_block_pattern))return null;var D={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(O);l;)D[l[1]]=l[2],l=this.__directive_pattern.exec(O);return D},e.prototype.readIgnored=function(O){return O.readUntilAfter(this.__directives_end_ignore_pattern)},k.exports.Directives=e},,function(k,e,O){var D=O(16).Beautifier,l=O(17).Options;function p(h,g){var o=new D(h,g);return o.beautify()}k.exports=p,k.exports.defaultOptions=function(){return new l}},function(k,e,O){var D=O(17).Options,l=O(2).Output,p=O(8).InputScanner,h=O(13).Directives,g=new h(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,c=/\r\n|[\r\n]/g,y=/\s/,u=/(?:\s|\n)+/g,s=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,i=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function t(m,S){this._source_text=m||"",this._options=new D(S),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}t.prototype.eatString=function(m){var S="";for(this._ch=this._input.next();this._ch;){if(S+=this._ch,this._ch==="\\")S+=this._input.next();else if(m.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return S},t.prototype.eatWhitespace=function(m){for(var S=y.test(this._input.peek()),f=0;y.test(this._input.peek());)this._ch=this._input.next(),m&&this._ch===`
|
|
`&&(f===0||f<this._options.max_preserve_newlines)&&(f++,this._output.add_new_line(!0));return S},t.prototype.foundNestedPseudoClass=function(){for(var m=0,S=1,f=this._input.peek(S);f;){if(f==="{")return!0;if(f==="(")m+=1;else if(f===")"){if(m===0)return!1;m-=1}else if(f===";"||f==="}")return!1;S++,f=this._input.peek(S)}return!1},t.prototype.print_string=function(m){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(m)},t.prototype.preserveSingleSpace=function(m){m&&(this._output.space_before_token=!0)},t.prototype.indent=function(){this._indentLevel++},t.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},t.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var m=this._source_text,S=this._options.eol;S==="auto"&&(S=`
|
|
`,m&&o.test(m||"")&&(S=m.match(o)[0])),m=m.replace(c,`
|
|
`);var f=m.match(/^[\t ]*/)[0];this._output=new l(this._options,f),this._input=new p(m),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var _=0,A=!1,x=!1,w=!1,n=!1,a=!1,r=!1,d=this._ch,T=!1,b,v,E;b=this._input.read(u),v=b!=="",E=d,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),d=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var R=this._input.read(s),C=g.get_directives(R);C&&C.ignore==="start"&&(R+=g.readIgnored(this._input)),this.print_string(R),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(i)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(v),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var N=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);N.match(/[ :]$/)&&(N=this.eatString(": ").replace(/\s$/,""),this.print_string(N),this._output.space_before_token=!0),N=N.replace(/\s$/,""),N==="extend"?n=!0:N==="import"&&(a=!0),N in this.NESTED_AT_RULE?(this._nestedLevel+=1,N in this.CONDITIONAL_GROUP_RULE&&(w=!0)):!A&&_===0&&N.indexOf(":")!==-1&&(x=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(v),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")x&&(x=!1,this.outdent()),w?(w=!1,A=this._indentLevel>=this._nestedLevel):A=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&A&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(E==="("?this._output.space_before_token=!1:E!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),E==="{"&&this._output.trim(!0),a=!1,n=!1,x&&(this.outdent(),x=!1),this.print_string(this._ch),A=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var K=0;K<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;K++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[K])){T=!0;break}(A||w)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!n&&_===0?(this.print_string(":"),x||(x=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var H=E==='"'||E==="'";this.preserveSingleSpace(H||v),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")T=!1,_===0?(x&&(this.outdent(),x=!1),n=!1,a=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),_++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),_&&(_--,this.outdent()));else{var ee=!1;this._input.lookBack("with")&&(ee=!0),this.preserveSingleSpace(v||ee),this.print_string(this._ch),x&&E==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),r=!0):(this.eatWhitespace(),_++,this.indent())}else if(this._ch===")")_&&(_--,this.outdent()),r&&this._input.peek()===";"&&this._options.selector_separator_newline&&(r=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!x||r)&&_===0&&!a&&!n?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!x&&_===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&y.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(v),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),y.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var J=E==='"'||E==="'";this.preserveSingleSpace(J||v),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&T&&this._output.add_new_line()}var se=this._output.get_code(S);return se},k.exports.Beautifier=t},function(k,e,O){var D=O(6).Options;function l(p){D.call(this,p,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var g=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var o=0;o<g.length;o++)g[o]!=="expand"?this.brace_style="collapse":this.brace_style=g[o]}l.prototype=new D,k.exports.Options=l}],L={};function M(k){var e=L[k];if(e!==void 0)return e.exports;var O=L[k]={exports:{}};return U[k](O,O.exports,M),O.exports}var P=M(15);oe=P})();var te=oe;B=[],z=function(){return{css_beautify:te}}.apply(Qe,B),z!==void 0&&(Ct.exports=z)})()},3566:function(Ct,Qe,B){var z,oe;(function(){var te;(function(){"use strict";var P=[,,function(D){function l(g){this.__parent=g,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}l.prototype.clone_empty=function(){var g=new l(this.__parent);return g.set_indent(this.__indent_count,this.__alignment_count),g},l.prototype.item=function(g){return g<0?this.__items[this.__items.length+g]:this.__items[g]},l.prototype.has_match=function(g){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(g))return!0;return!1},l.prototype.set_indent=function(g,o){this.is_empty()&&(this.__indent_count=g||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},l.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var g=this.__parent.current_line;return g.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),g.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),g.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,g.__items[0]===" "&&(g.__items.splice(0,1),g.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(g){this.__items.push(g);var o=g.lastIndexOf(`
|
|
`);o!==-1?this.__character_count=g.length-o:this.__character_count+=g.length},l.prototype.pop=function(){var g=null;return this.is_empty()||(g=this.__items.pop(),this.__character_count-=g.length),g},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var g="";return this.is_empty()?this.__parent.indent_empty_lines&&(g=this.__parent.get_indent_string(this.__indent_count)):(g=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),g+=this.__items.join("")),g};function p(g,o){this.__cache=[""],this.__indent_size=g.indent_size,this.__indent_string=g.indent_char,g.indent_with_tabs||(this.__indent_string=new Array(g.indent_size+1).join(g.indent_char)),o=o||"",g.indent_level>0&&(o=new Array(g.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}p.prototype.get_indent_size=function(g,o){var c=this.__base_string_length;return o=o||0,g<0&&(c=0),c+=g*this.__indent_size,c+=o,c},p.prototype.get_indent_string=function(g,o){var c=this.__base_string;return o=o||0,g<0&&(g=0,c=""),o+=g*this.__indent_size,this.__ensure_cache(o),c+=this.__cache[o],c},p.prototype.__ensure_cache=function(g){for(;g>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var g=this.__cache.length,o=0,c="";this.__indent_size&&g>=this.__indent_size&&(o=Math.floor(g/this.__indent_size),g-=o*this.__indent_size,c=new Array(o+1).join(this.__indent_string)),g&&(c+=new Array(g+1).join(" ")),this.__cache.push(c)};function h(g,o){this.__indent_cache=new p(g,o),this.raw=!1,this._end_with_newline=g.end_with_newline,this.indent_size=g.indent_size,this.wrap_line_length=g.wrap_line_length,this.indent_empty_lines=g.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}h.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},h.prototype.get_line_number=function(){return this.__lines.length},h.prototype.get_indent_string=function(g,o){return this.__indent_cache.get_indent_string(g,o)},h.prototype.get_indent_size=function(g,o){return this.__indent_cache.get_indent_size(g,o)},h.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},h.prototype.add_new_line=function(g){return this.is_empty()||!g&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},h.prototype.get_code=function(g){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
|
|
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
|
|
`);return g!==`
|
|
`&&(c=c.replace(/[\n]/g,g)),c},h.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},h.prototype.set_indent=function(g,o){return g=g||0,o=o||0,this.next_line.set_indent(g,o),this.__lines.length>1?(this.current_line.set_indent(g,o),!0):(this.current_line.set_indent(),!1)},h.prototype.add_raw_token=function(g){for(var o=0;o<g.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(g.whitespace_before),this.current_line.push(g.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},h.prototype.add_token=function(g){this.__add_space_before_token(),this.current_line.push(g),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},h.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},h.prototype.remove_indent=function(g){for(var o=this.__lines.length;g<o;)this.__lines[g]._remove_indent(),g++;this.current_line._remove_wrap_indent()},h.prototype.trim=function(g){for(g=g===void 0?!1:g,this.current_line.trim();g&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},h.prototype.just_added_newline=function(){return this.current_line.is_empty()},h.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},h.prototype.ensure_empty_line_above=function(g,o){for(var c=this.__lines.length-2;c>=0;){var y=this.__lines[c];if(y.is_empty())break;if(y.item(0).indexOf(g)!==0&&y.item(-1)!==o){this.__lines.splice(c+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},D.exports.Output=h},function(D){function l(p,h,g,o){this.type=p,this.text=h,this.comments_before=null,this.newlines=g||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}D.exports.Token=l},,,function(D){function l(g,o){this.raw_options=p(g,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}l.prototype._get_array=function(g,o){var c=this.raw_options[g],y=o||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(y=c.concat()):typeof c=="string"&&(y=c.split(/[^a-zA-Z0-9_\/\-]+/)),y},l.prototype._get_boolean=function(g,o){var c=this.raw_options[g],y=c===void 0?!!o:!!c;return y},l.prototype._get_characters=function(g,o){var c=this.raw_options[g],y=o||"";return typeof c=="string"&&(y=c.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),y},l.prototype._get_number=function(g,o){var c=this.raw_options[g];o=parseInt(o,10),isNaN(o)&&(o=0);var y=parseInt(c,10);return isNaN(y)&&(y=o),y},l.prototype._get_selection=function(g,o,c){var y=this._get_selection_list(g,o,c);if(y.length!==1)throw new Error("Invalid Option Value: The option '"+g+`' can only be one of the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[g]+"'");return y[0]},l.prototype._get_selection_list=function(g,o,c){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[o[0]],!this._is_valid_selection(c,o))throw new Error("Invalid Default Value!");var y=this._get_array(g,c);if(!this._is_valid_selection(y,o))throw new Error("Invalid Option Value: The option '"+g+`' can contain only the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[g]+"'");return y},l.prototype._is_valid_selection=function(g,o){return g.length&&o.length&&!g.some(function(c){return o.indexOf(c)===-1})};function p(g,o){var c={};g=h(g);var y;for(y in g)y!==o&&(c[y]=g[y]);if(o&&g[o])for(y in g[o])c[y]=g[o][y];return c}function h(g){var o={},c;for(c in g){var y=c.replace(/-/g,"_");o[y]=g[c]}return o}D.exports.Options=l,D.exports.normalizeOpts=h,D.exports.mergeOpts=p},,function(D){var l=RegExp.prototype.hasOwnProperty("sticky");function p(h){this.__input=h||"",this.__input_length=this.__input.length,this.__position=0}p.prototype.restart=function(){this.__position=0},p.prototype.back=function(){this.__position>0&&(this.__position-=1)},p.prototype.hasNext=function(){return this.__position<this.__input_length},p.prototype.next=function(){var h=null;return this.hasNext()&&(h=this.__input.charAt(this.__position),this.__position+=1),h},p.prototype.peek=function(h){var g=null;return h=h||0,h+=this.__position,h>=0&&h<this.__input_length&&(g=this.__input.charAt(h)),g},p.prototype.__match=function(h,g){h.lastIndex=g;var o=h.exec(this.__input);return o&&!(l&&h.sticky)&&o.index!==g&&(o=null),o},p.prototype.test=function(h,g){return g=g||0,g+=this.__position,g>=0&&g<this.__input_length?!!this.__match(h,g):!1},p.prototype.testChar=function(h,g){var o=this.peek(g);return h.lastIndex=0,o!==null&&h.test(o)},p.prototype.match=function(h){var g=this.__match(h,this.__position);return g?this.__position+=g[0].length:g=null,g},p.prototype.read=function(h,g,o){var c="",y;return h&&(y=this.match(h),y&&(c+=y[0])),g&&(y||!h)&&(c+=this.readUntil(g,o)),c},p.prototype.readUntil=function(h,g){var o="",c=this.__position;h.lastIndex=this.__position;var y=h.exec(this.__input);return y?(c=y.index,g&&(c+=y[0].length)):c=this.__input_length,o=this.__input.substring(this.__position,c),this.__position=c,o},p.prototype.readUntilAfter=function(h){return this.readUntil(h,!0)},p.prototype.get_regexp=function(h,g){var o=null,c="g";return g&&l&&(c="y"),typeof h=="string"&&h!==""?o=new RegExp(h,c):h&&(o=new RegExp(h.source,c)),o},p.prototype.get_literal_regexp=function(h){return RegExp(h.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},p.prototype.peekUntilAfter=function(h){var g=this.__position,o=this.readUntilAfter(h);return this.__position=g,o},p.prototype.lookBack=function(h){var g=this.__position-1;return g>=h.length&&this.__input.substring(g-h.length,g).toLowerCase()===h},D.exports.InputScanner=p},function(D,l,p){var h=p(8).InputScanner,g=p(3).Token,o=p(10).TokenStream,c=p(11).WhitespacePattern,y={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(s,i){this._input=new h(s),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var s,i=new g(y.START,""),t=null,m=[],S=new o;i.type!==y.EOF;){for(s=this._get_next_token(i,t);this._is_comment(s);)S.add(s),s=this._get_next_token(i,t);S.isEmpty()||(s.comments_before=S,S=new o),s.parent=t,this._is_opening(s)?(m.push(t),t=s):t&&this._is_closing(s,t)&&(s.opened=t,t.closed=s,t=m.pop(),s.parent=t),s.previous=i,i.next=s,this.__tokens.add(s),i=s}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(s,i){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(y.RAW,t):this._create_token(y.EOF,"")},u.prototype._is_comment=function(s){return!1},u.prototype._is_opening=function(s){return!1},u.prototype._is_closing=function(s,i){return!1},u.prototype._create_token=function(s,i){var t=new g(s,i,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},D.exports.Tokenizer=u,D.exports.TOKEN=y},function(D){function l(p){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=p}l.prototype.restart=function(){this.__position=0},l.prototype.isEmpty=function(){return this.__tokens_length===0},l.prototype.hasNext=function(){return this.__position<this.__tokens_length},l.prototype.next=function(){var p=null;return this.hasNext()&&(p=this.__tokens[this.__position],this.__position+=1),p},l.prototype.peek=function(p){var h=null;return p=p||0,p+=this.__position,p>=0&&p<this.__tokens_length&&(h=this.__tokens[p]),h},l.prototype.add=function(p){this.__parent_token&&(p.parent=this.__parent_token),this.__tokens.push(p),this.__tokens_length+=1},D.exports.TokenStream=l},function(D,l,p){var h=p(12).Pattern;function g(o,c){h.call(this,o,c),c?this._line_regexp=this._input.get_regexp(c._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}g.prototype=new h,g.prototype.__set_whitespace_patterns=function(o,c){o+="\\t ",c+="\\n\\r",this._match_pattern=this._input.get_regexp("["+o+c+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+c+"]")},g.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var o=this._input.read(this._match_pattern);if(o===" ")this.whitespace_before_token=" ";else if(o){var c=this.__split(this._newline_regexp,o);this.newline_count=c.length-1,this.whitespace_before_token=c[this.newline_count]}return o},g.prototype.matching=function(o,c){var y=this._create();return y.__set_whitespace_patterns(o,c),y._update(),y},g.prototype._create=function(){return new g(this._input,this)},g.prototype.__split=function(o,c){o.lastIndex=0;for(var y=0,u=[],s=o.exec(c);s;)u.push(c.substring(y,s.index)),y=s.index+s[0].length,s=o.exec(c);return y<c.length?u.push(c.substring(y,c.length)):u.push(""),u},D.exports.WhitespacePattern=g},function(D){function l(p,h){this._input=p,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,h&&(this._starting_pattern=this._input.get_regexp(h._starting_pattern,!0),this._match_pattern=this._input.get_regexp(h._match_pattern,!0),this._until_pattern=this._input.get_regexp(h._until_pattern),this._until_after=h._until_after)}l.prototype.read=function(){var p=this._input.read(this._starting_pattern);return(!this._starting_pattern||p)&&(p+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),p},l.prototype.read_match=function(){return this._input.match(this._match_pattern)},l.prototype.until_after=function(p){var h=this._create();return h._until_after=!0,h._until_pattern=this._input.get_regexp(p),h._update(),h},l.prototype.until=function(p){var h=this._create();return h._until_after=!1,h._until_pattern=this._input.get_regexp(p),h._update(),h},l.prototype.starting_with=function(p){var h=this._create();return h._starting_pattern=this._input.get_regexp(p,!0),h._update(),h},l.prototype.matching=function(p){var h=this._create();return h._match_pattern=this._input.get_regexp(p,!0),h._update(),h},l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){},D.exports.Pattern=l},function(D){function l(p,h){p=typeof p=="string"?p:p.source,h=typeof h=="string"?h:h.source,this.__directives_block_pattern=new RegExp(p+/ beautify( \w+[:]\w+)+ /.source+h,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(p+/\sbeautify\signore:end\s/.source+h,"g")}l.prototype.get_directives=function(p){if(!p.match(this.__directives_block_pattern))return null;var h={};this.__directive_pattern.lastIndex=0;for(var g=this.__directive_pattern.exec(p);g;)h[g[1]]=g[2],g=this.__directive_pattern.exec(p);return h},l.prototype.readIgnored=function(p){return p.readUntilAfter(this.__directives_end_ignore_pattern)},D.exports.Directives=l},function(D,l,p){var h=p(12).Pattern,g={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function o(c,y){h.call(this,c,y),this.__template_pattern=null,this._disabled=Object.assign({},g),this._excluded=Object.assign({},g),y&&(this.__template_pattern=this._input.get_regexp(y.__template_pattern),this._excluded=Object.assign(this._excluded,y._excluded),this._disabled=Object.assign(this._disabled,y._disabled));var u=new h(c);this.__patterns={handlebars_comment:u.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:u.starting_with(/{{{/).until_after(/}}}/),handlebars:u.starting_with(/{{/).until_after(/}}/),php:u.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new h,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(c){var y=this._create();return y._disabled[c]=!0,y._update(),y},o.prototype.read_options=function(c){var y=this._create();for(var u in g)y._disabled[u]=c.templating.indexOf(u)===-1;return y._update(),y},o.prototype.exclude=function(c){var y=this._create();return y._excluded[c]=!0,y._update(),y},o.prototype.read=function(){var c="";this._match_pattern?c=this._input.read(this._starting_pattern):c=this._input.read(this._starting_pattern,this.__template_pattern);for(var y=this._read_template();y;)this._match_pattern?y+=this._input.read(this._match_pattern):y+=this._input.readUntil(this.__template_pattern),c+=y,y=this._read_template();return this._until_after&&(c+=this._input.readUntilAfter(this._until_pattern)),c},o.prototype.__set_templated_pattern=function(){var c=[];this._disabled.php||c.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||c.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||c.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(c.push(this.__patterns.django._starting_pattern.source),c.push(this.__patterns.django_value._starting_pattern.source),c.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||c.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&c.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+c.join("|")+")")},o.prototype._read_template=function(){var c="",y=this._input.peek();if(y==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(c=c||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(c=c||this.__patterns.erb.read())}else y==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(c=c||this.__patterns.handlebars_comment.read(),c=c||this.__patterns.handlebars_unescaped.read(),c=c||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(c=c||this.__patterns.django_value.read()),this._excluded.django||(c=c||this.__patterns.django_comment.read(),c=c||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(c=c||this.__patterns.smarty_comment.read(),c=c||this.__patterns.smarty_literal.read(),c=c||this.__patterns.smarty.read()));return c},D.exports.TemplatablePattern=o},,,,function(D,l,p){var h=p(19).Beautifier,g=p(20).Options;function o(c,y,u,s){var i=new h(c,y,u,s);return i.beautify()}D.exports=o,D.exports.defaultOptions=function(){return new g}},function(D,l,p){var h=p(20).Options,g=p(2).Output,o=p(21).Tokenizer,c=p(21).TOKEN,y=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,s=function(n,a){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=n.max_preserve_newlines,this.preserve_newlines=n.preserve_newlines,this._output=new g(n,a)};s.prototype.current_line_has_match=function(n){return this._output.current_line.has_match(n)},s.prototype.set_space_before_token=function(n,a){this._output.space_before_token=n,this._output.non_breaking_space=a},s.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},s.prototype.add_raw_token=function(n){this._output.add_raw_token(n)},s.prototype.print_preserved_newlines=function(n){var a=0;n.type!==c.TEXT&&n.previous.type!==c.TEXT&&(a=n.newlines?1:0),this.preserve_newlines&&(a=n.newlines<this.max_preserve_newlines+1?n.newlines:this.max_preserve_newlines+1);for(var r=0;r<a;r++)this.print_newline(r>0);return a!==0},s.prototype.traverse_whitespace=function(n){return n.whitespace_before||n.newlines?(this.print_preserved_newlines(n)||(this._output.space_before_token=!0),!0):!1},s.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},s.prototype.print_newline=function(n){this._output.add_new_line(n)},s.prototype.print_token=function(n){n.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(n.text))},s.prototype.indent=function(){this.indent_level++},s.prototype.get_full_indent=function(n){return n=this.indent_level+(n||0),n<1?"":this._output.get_indent_string(n)};var i=function(n){for(var a=null,r=n.next;r.type!==c.EOF&&n.closed!==r;){if(r.type===c.ATTRIBUTE&&r.text==="type"){r.next&&r.next.type===c.EQUALS&&r.next.next&&r.next.next.type===c.VALUE&&(a=r.next.next.text);break}r=r.next}return a},t=function(n,a){var r=null,d=null;return a.closed?(n==="script"?r="text/javascript":n==="style"&&(r="text/css"),r=i(a)||r,r.search("text/css")>-1?d="css":r.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?d="javascript":r.search(/(text|application|dojo)\/(x-)?(html)/)>-1?d="html":r.search(/test\/null/)>-1&&(d="null"),d):null};function m(n,a){return a.indexOf(n)!==-1}function S(n,a,r){this.parent=n||null,this.tag=a?a.tag_name:"",this.indent_level=r||0,this.parser_token=a||null}function f(n){this._printer=n,this._current_frame=null}f.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},f.prototype.record_tag=function(n){var a=new S(this._current_frame,n,this._printer.indent_level);this._current_frame=a},f.prototype._try_pop_frame=function(n){var a=null;return n&&(a=n.parser_token,this._printer.indent_level=n.indent_level,this._current_frame=n.parent),a},f.prototype._get_frame=function(n,a){for(var r=this._current_frame;r&&n.indexOf(r.tag)===-1;){if(a&&a.indexOf(r.tag)!==-1){r=null;break}r=r.parent}return r},f.prototype.try_pop=function(n,a){var r=this._get_frame([n],a);return this._try_pop_frame(r)},f.prototype.indent_to_tag=function(n){var a=this._get_frame(n);a&&(this._printer.indent_level=a.indent_level)};function _(n,a,r,d){this._source_text=n||"",a=a||{},this._js_beautify=r,this._css_beautify=d,this._tag_stack=null;var T=new h(a,"html");this._options=T,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}_.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var n=this._source_text,a=this._options.eol;this._options.eol==="auto"&&(a=`
|
|
`,n&&y.test(n)&&(a=n.match(y)[0])),n=n.replace(u,`
|
|
`);var r=n.match(/^[\t ]*/)[0],d={text:"",type:""},T=new A,b=new s(this._options,r),v=new o(n,this._options).tokenize();this._tag_stack=new f(b);for(var E=null,R=v.next();R.type!==c.EOF;)R.type===c.TAG_OPEN||R.type===c.COMMENT?(E=this._handle_tag_open(b,R,T,d),T=E):R.type===c.ATTRIBUTE||R.type===c.EQUALS||R.type===c.VALUE||R.type===c.TEXT&&!T.tag_complete?E=this._handle_inside_tag(b,R,T,v):R.type===c.TAG_CLOSE?E=this._handle_tag_close(b,R,T):R.type===c.TEXT?E=this._handle_text(b,R,T):b.add_raw_token(R),d=E,R=v.next();var C=b._output.get_code(a);return C},_.prototype._handle_tag_close=function(n,a,r){var d={text:a.text,type:a.type};return n.alignment_size=0,r.tag_complete=!0,n.set_space_before_token(a.newlines||a.whitespace_before!=="",!0),r.is_unformatted?n.add_raw_token(a):(r.tag_start_char==="<"&&(n.set_space_before_token(a.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&r.has_wrapped_attrs&&n.print_newline(!1)),n.print_token(a)),r.indent_content&&!(r.is_unformatted||r.is_content_unformatted)&&(n.indent(),r.indent_content=!1),!r.is_inline_element&&!(r.is_unformatted||r.is_content_unformatted)&&n.set_wrap_point(),d},_.prototype._handle_inside_tag=function(n,a,r,d){var T=r.has_wrapped_attrs,b={text:a.text,type:a.type};if(n.set_space_before_token(a.newlines||a.whitespace_before!=="",!0),r.is_unformatted)n.add_raw_token(a);else if(r.tag_start_char==="{"&&a.type===c.TEXT)n.print_preserved_newlines(a)?(a.newlines=0,n.add_raw_token(a)):n.print_token(a);else{if(a.type===c.ATTRIBUTE?(n.set_space_before_token(!0),r.attr_count+=1):(a.type===c.EQUALS||a.type===c.VALUE&&a.previous.type===c.EQUALS)&&n.set_space_before_token(!1),a.type===c.ATTRIBUTE&&r.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(n.traverse_whitespace(a),T=T||a.newlines!==0),this._is_wrap_attributes_force)){var v=r.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&r.attr_count===1){var E=!0,R=0,C;do{if(C=d.peek(R),C.type===c.ATTRIBUTE){E=!1;break}R+=1}while(R<4&&C.type!==c.EOF&&C.type!==c.TAG_CLOSE);v=!E}v&&(n.print_newline(!1),T=!0)}n.print_token(a),T=T||n.previous_token_wrapped(),r.has_wrapped_attrs=T}return b},_.prototype._handle_text=function(n,a,r){var d={text:a.text,type:"TK_CONTENT"};return r.custom_beautifier_name?this._print_custom_beatifier_text(n,a,r):r.is_unformatted||r.is_content_unformatted?n.add_raw_token(a):(n.traverse_whitespace(a),n.print_token(a)),d},_.prototype._print_custom_beatifier_text=function(n,a,r){var d=this;if(a.text!==""){var T=a.text,b,v=1,E="",R="";r.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?b=this._js_beautify:r.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?b=this._css_beautify:r.custom_beautifier_name==="html"&&(b=function(J,se){var G=new _(J,se,d._js_beautify,d._css_beautify);return G.beautify()}),this._options.indent_scripts==="keep"?v=0:this._options.indent_scripts==="separate"&&(v=-n.indent_level);var C=n.get_full_indent(v);if(T=T.replace(/\n[ \t]*$/,""),r.custom_beautifier_name!=="html"&&T[0]==="<"&&T.match(/^(<!--|<!\[CDATA\[)/)){var N=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(T);if(!N){n.add_raw_token(a);return}E=C+N[1]+`
|
|
`,T=N[4],N[5]&&(R=C+N[5]),T=T.replace(/\n[ \t]*$/,""),(N[2]||N[3].indexOf(`
|
|
`)!==-1)&&(N=N[3].match(/[ \t]+$/),N&&(a.whitespace_before=N[0]))}if(T)if(b){var K=function(){this.eol=`
|
|
`};K.prototype=this._options.raw_options;var H=new K;T=b(C+T,H)}else{var ee=a.whitespace_before;ee&&(T=T.replace(new RegExp(`
|
|
(`+ee+")?","g"),`
|
|
`)),T=C+T.replace(/\n/g,`
|
|
`+C)}E&&(T?T=E+T+`
|
|
`+R:T=E+R),n.print_newline(!1),T&&(a.text=T,a.whitespace_before="",a.newlines=0,n.add_raw_token(a),n.print_newline(!0))}},_.prototype._handle_tag_open=function(n,a,r,d){var T=this._get_tag_open_token(a);return(r.is_unformatted||r.is_content_unformatted)&&!r.is_empty_element&&a.type===c.TAG_OPEN&&a.text.indexOf("</")===0?(n.add_raw_token(a),T.start_tag_token=this._tag_stack.try_pop(T.tag_name)):(n.traverse_whitespace(a),this._set_tag_position(n,a,T,r,d),T.is_inline_element||n.set_wrap_point(),n.print_token(a)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(T.alignment_size=a.text.length+1),!T.tag_complete&&!T.is_unformatted&&(n.alignment_size=T.alignment_size),T};var A=function(n,a){if(this.parent=n||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!a)this.tag_complete=!0;else{var r;this.tag_start_char=a.text[0],this.text=a.text,this.tag_start_char==="<"?(r=a.text.match(/^<([^\s>]*)/),this.tag_check=r?r[1]:""):(r=a.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=r?r[1]:"",(a.text.startsWith("{{#>")||a.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&a.next!==null?this.tag_check=a.next.text.split(" ")[0]:this.tag_check=a.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),a.type===c.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||a.closed&&a.closed.text==="/>";var d=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(d=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(d)))}};_.prototype._get_tag_open_token=function(n){var a=new A(this._tag_stack.get_parser_token(),n);return a.alignment_size=this._options.wrap_attributes_indent_size,a.is_end_tag=a.is_end_tag||m(a.tag_check,this._options.void_elements),a.is_empty_element=a.tag_complete||a.is_start_tag&&a.is_end_tag,a.is_unformatted=!a.tag_complete&&m(a.tag_check,this._options.unformatted),a.is_content_unformatted=!a.is_empty_element&&m(a.tag_check,this._options.content_unformatted),a.is_inline_element=m(a.tag_name,this._options.inline)||a.tag_name.includes("-")||a.tag_start_char==="{",a},_.prototype._set_tag_position=function(n,a,r,d,T){if(r.is_empty_element||(r.is_end_tag?r.start_tag_token=this._tag_stack.try_pop(r.tag_name):(this._do_optional_end_element(r)&&(r.is_inline_element||n.print_newline(!1)),this._tag_stack.record_tag(r),(r.tag_name==="script"||r.tag_name==="style")&&!(r.is_unformatted||r.is_content_unformatted)&&(r.custom_beautifier_name=t(r.tag_check,a)))),m(r.tag_check,this._options.extra_liners)&&(n.print_newline(!1),n._output.just_added_blankline()||n.print_newline(!0)),r.is_empty_element){if(r.tag_start_char==="{"&&r.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),r.indent_content=!0;var b=n.current_line_has_match(/{{#if/);b||n.print_newline(!1)}r.tag_name==="!--"&&T.type===c.TAG_CLOSE&&d.is_end_tag&&r.text.indexOf(`
|
|
`)===-1||(r.is_inline_element||r.is_unformatted||n.print_newline(!1),this._calcluate_parent_multiline(n,r))}else if(r.is_end_tag){var v=!1;v=r.start_tag_token&&r.start_tag_token.multiline_content,v=v||!r.is_inline_element&&!(d.is_inline_element||d.is_unformatted)&&!(T.type===c.TAG_CLOSE&&r.start_tag_token===d)&&T.type!=="TK_CONTENT",(r.is_content_unformatted||r.is_unformatted)&&(v=!1),v&&n.print_newline(!1)}else r.indent_content=!r.custom_beautifier_name,r.tag_start_char==="<"&&(r.tag_name==="html"?r.indent_content=this._options.indent_inner_html:r.tag_name==="head"?r.indent_content=this._options.indent_head_inner_html:r.tag_name==="body"&&(r.indent_content=this._options.indent_body_inner_html)),!(r.is_inline_element||r.is_unformatted)&&(T.type!=="TK_CONTENT"||r.is_content_unformatted)&&n.print_newline(!1),this._calcluate_parent_multiline(n,r)},_.prototype._calcluate_parent_multiline=function(n,a){a.parent&&n._output.just_added_newline()&&!((a.is_inline_element||a.is_unformatted)&&a.parent.is_inline_element)&&(a.parent.multiline_content=!0)};var x=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],w=["a","audio","del","ins","map","noscript","video"];_.prototype._do_optional_end_element=function(n){var a=null;if(!(n.is_empty_element||!n.is_start_tag||!n.parent)){if(n.tag_name==="body")a=a||this._tag_stack.try_pop("head");else if(n.tag_name==="li")a=a||this._tag_stack.try_pop("li",["ol","ul"]);else if(n.tag_name==="dd"||n.tag_name==="dt")a=a||this._tag_stack.try_pop("dt",["dl"]),a=a||this._tag_stack.try_pop("dd",["dl"]);else if(n.parent.tag_name==="p"&&x.indexOf(n.tag_name)!==-1){var r=n.parent.parent;(!r||w.indexOf(r.tag_name)===-1)&&(a=a||this._tag_stack.try_pop("p"))}else n.tag_name==="rp"||n.tag_name==="rt"?(a=a||this._tag_stack.try_pop("rt",["ruby","rtc"]),a=a||this._tag_stack.try_pop("rp",["ruby","rtc"])):n.tag_name==="optgroup"?a=a||this._tag_stack.try_pop("optgroup",["select"]):n.tag_name==="option"?a=a||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):n.tag_name==="colgroup"?a=a||this._tag_stack.try_pop("caption",["table"]):n.tag_name==="thead"?(a=a||this._tag_stack.try_pop("caption",["table"]),a=a||this._tag_stack.try_pop("colgroup",["table"])):n.tag_name==="tbody"||n.tag_name==="tfoot"?(a=a||this._tag_stack.try_pop("caption",["table"]),a=a||this._tag_stack.try_pop("colgroup",["table"]),a=a||this._tag_stack.try_pop("thead",["table"]),a=a||this._tag_stack.try_pop("tbody",["table"])):n.tag_name==="tr"?(a=a||this._tag_stack.try_pop("caption",["table"]),a=a||this._tag_stack.try_pop("colgroup",["table"]),a=a||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(n.tag_name==="th"||n.tag_name==="td")&&(a=a||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),a=a||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return n.parent=this._tag_stack.get_parser_token(),a}},D.exports.Beautifier=_},function(D,l,p){var h=p(6).Options;function g(o){h.call(this,o,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}g.prototype=new h,D.exports.Options=g},function(D,l,p){var h=p(9).Tokenizer,g=p(9).TOKEN,o=p(13).Directives,c=p(14).TemplatablePattern,y=p(12).Pattern,u={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:g.START,RAW:g.RAW,EOF:g.EOF},s=new o(/<\!--/,/-->/),i=function(t,m){h.call(this,t,m),this._current_tag_name="";var S=new c(this._input).read_options(this._options),f=new y(this._input);if(this.__patterns={word:S.until(/[\n\r\t <]/),single_quote:S.until_after(/'/),double_quote:S.until_after(/"/),attribute:S.until(/[\n\r\t =>]|\/>/),element_name:S.until(/[\n\r\t >\/]/),handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),handlebars_open:f.until(/[\n\r\t }]/),handlebars_raw_close:f.until(/}}/),comment:f.starting_with(/<!--/).until_after(/-->/),cdata:f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:f.starting_with(/<!\[/).until_after(/]>/),processing:f.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var _=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=f.matching(_).until_after(_)}};i.prototype=new h,i.prototype._is_comment=function(t){return!1},i.prototype._is_opening=function(t){return t.type===u.TAG_OPEN},i.prototype._is_closing=function(t,m){return t.type===u.TAG_CLOSE&&m&&((t.text===">"||t.text==="/>")&&m.text[0]==="<"||t.text==="}}"&&m.text[0]==="{"&&m.text[1]==="{")},i.prototype._reset=function(){this._current_tag_name=""},i.prototype._get_next_token=function(t,m){var S=null;this._readWhitespace();var f=this._input.peek();return f===null?this._create_token(u.EOF,""):(S=S||this._read_open_handlebars(f,m),S=S||this._read_attribute(f,t,m),S=S||this._read_close(f,m),S=S||this._read_raw_content(f,t,m),S=S||this._read_content_word(f),S=S||this._read_comment_or_cdata(f),S=S||this._read_processing(f),S=S||this._read_open(f,m),S=S||this._create_token(u.UNKNOWN,this._input.next()),S)},i.prototype._read_comment_or_cdata=function(t){var m=null,S=null,f=null;if(t==="<"){var _=this._input.peek(1);_==="!"&&(S=this.__patterns.comment.read(),S?(f=s.get_directives(S),f&&f.ignore==="start"&&(S+=s.readIgnored(this._input))):S=this.__patterns.cdata.read()),S&&(m=this._create_token(u.COMMENT,S),m.directives=f)}return m},i.prototype._read_processing=function(t){var m=null,S=null,f=null;if(t==="<"){var _=this._input.peek(1);(_==="!"||_==="?")&&(S=this.__patterns.conditional_comment.read(),S=S||this.__patterns.processing.read()),S&&(m=this._create_token(u.COMMENT,S),m.directives=f)}return m},i.prototype._read_open=function(t,m){var S=null,f=null;return m||t==="<"&&(S=this._input.next(),this._input.peek()==="/"&&(S+=this._input.next()),S+=this.__patterns.element_name.read(),f=this._create_token(u.TAG_OPEN,S)),f},i.prototype._read_open_handlebars=function(t,m){var S=null,f=null;return m||this._options.indent_handlebars&&t==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(S=this.__patterns.handlebars_comment.read(),S=S||this.__patterns.handlebars.read(),f=this._create_token(u.COMMENT,S)):(S=this.__patterns.handlebars_open.read(),f=this._create_token(u.TAG_OPEN,S))),f},i.prototype._read_close=function(t,m){var S=null,f=null;return m&&(m.text[0]==="<"&&(t===">"||t==="/"&&this._input.peek(1)===">")?(S=this._input.next(),t==="/"&&(S+=this._input.next()),f=this._create_token(u.TAG_CLOSE,S)):m.text[0]==="{"&&t==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),f=this._create_token(u.TAG_CLOSE,"}}"))),f},i.prototype._read_attribute=function(t,m,S){var f=null,_="";if(S&&S.text[0]==="<")if(t==="=")f=this._create_token(u.EQUALS,this._input.next());else if(t==='"'||t==="'"){var A=this._input.next();t==='"'?A+=this.__patterns.double_quote.read():A+=this.__patterns.single_quote.read(),f=this._create_token(u.VALUE,A)}else _=this.__patterns.attribute.read(),_&&(m.type===u.EQUALS?f=this._create_token(u.VALUE,_):f=this._create_token(u.ATTRIBUTE,_));return f},i.prototype._is_content_unformatted=function(t){return this._options.void_elements.indexOf(t)===-1&&(this._options.content_unformatted.indexOf(t)!==-1||this._options.unformatted.indexOf(t)!==-1)},i.prototype._read_raw_content=function(t,m,S){var f="";if(S&&S.text[0]==="{")f=this.__patterns.handlebars_raw_close.read();else if(m.type===u.TAG_CLOSE&&m.opened.text[0]==="<"&&m.text[0]!=="/"){var _=m.opened.text.substr(1).toLowerCase();if(_==="script"||_==="style"){var A=this._read_comment_or_cdata(t);if(A)return A.type=u.TEXT,A;f=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(_)&&(f=this._input.readUntil(new RegExp("</"+_+"[\\n\\r\\t ]*?>","ig")))}return f?this._create_token(u.TEXT,f):null},i.prototype._read_content_word=function(t){var m="";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(m=this.__patterns.unformatted_content_delimiter.read()),m||(m=this.__patterns.word.read()),m)return this._create_token(u.TEXT,m)},D.exports.Tokenizer=i,D.exports.TOKEN=u}],k={};function e(D){var l=k[D];if(l!==void 0)return l.exports;var p=k[D]={exports:{}};return P[D](p,p.exports,e),p.exports}var O=e(18);te=O})();var U=te;if(1)z=[B,B(77937),B(85040)],oe=function(P){var k=B(77937),e=B(85040);return{html_beautify:function(O,D){return U(O,D,k.js_beautify,e.css_beautify)}}}.apply(Qe,z),oe!==void 0&&(Ct.exports=oe);else var L,M})()},77937:function(Ct,Qe){var B,z;(function(){var oe;(function(){"use strict";var U=[function(k,e,O){var D=O(1).Beautifier,l=O(5).Options;function p(h,g){var o=new D(h,g);return o.beautify()}k.exports=p,k.exports.defaultOptions=function(){return new l}},function(k,e,O){var D=O(2).Output,l=O(3).Token,p=O(4),h=O(5).Options,g=O(7).Tokenizer,o=O(7).line_starters,c=O(7).positionable_operators,y=O(7).TOKEN;function u(E,R){return R.indexOf(E)!==-1}function s(E){return E.replace(/^\s+/g,"")}function i(E){for(var R={},C=0;C<E.length;C++)R[E[C].replace(/-/g,"_")]=E[C];return R}function t(E,R){return E&&E.type===y.RESERVED&&E.text===R}function m(E,R){return E&&E.type===y.RESERVED&&u(E.text,R)}var S=["case","return","do","if","throw","else","await","break","continue","async"],f=["before-newline","after-newline","preserve-newline"],_=i(f),A=[_.before_newline,_.preserve_newline],x={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function w(E,R){R.multiline_frame||R.mode===x.ForInitializer||R.mode===x.Conditional||E.remove_indent(R.start_line_index)}function n(E){E=E.replace(p.allLineBreaks,`
|
|
`);for(var R=[],C=E.indexOf(`
|
|
`);C!==-1;)R.push(E.substring(0,C)),E=E.substring(C+1),C=E.indexOf(`
|
|
`);return E.length&&R.push(E),R}function a(E){return E===x.ArrayLiteral}function r(E){return u(E,[x.Expression,x.ForInitializer,x.Conditional])}function d(E,R){for(var C=0;C<E.length;C++){var N=E[C].trim();if(N.charAt(0)!==R)return!1}return!0}function T(E,R){for(var C=0,N=E.length,K;C<N;C++)if(K=E[C],K&&K.indexOf(R)!==0)return!1;return!0}function b(E,R){R=R||{},this._source_text=E||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new h(R)}b.prototype.create_flags=function(E,R){var C=0;E&&(C=E.indentation_level,!this._output.just_added_newline()&&E.line_indent_level>C&&(C=E.line_indent_level));var N={mode:R,parent:E,last_token:E?E.last_token:new l(y.START_BLOCK,""),last_word:E?E.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:C,alignment:0,line_indent_level:E?E.line_indent_level:C,start_line_index:this._output.get_line_number(),ternary_depth:0};return N},b.prototype._reset=function(E){var R=E.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new D(this._options,R),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(x.BlockStatement);var C=new g(E,this._options);return this._tokens=C.tokenize(),E},b.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E,R=this._reset(this._source_text),C=this._options.eol;this._options.eol==="auto"&&(C=`
|
|
`,R&&p.lineBreak.test(R||"")&&(C=R.match(p.lineBreak)[0]));for(var N=this._tokens.next();N;)this.handle_token(N),this._last_last_text=this._flags.last_token.text,this._flags.last_token=N,N=this._tokens.next();return E=this._output.get_code(C),E},b.prototype.handle_token=function(E,R){E.type===y.START_EXPR?this.handle_start_expr(E):E.type===y.END_EXPR?this.handle_end_expr(E):E.type===y.START_BLOCK?this.handle_start_block(E):E.type===y.END_BLOCK?this.handle_end_block(E):E.type===y.WORD?this.handle_word(E):E.type===y.RESERVED?this.handle_word(E):E.type===y.SEMICOLON?this.handle_semicolon(E):E.type===y.STRING?this.handle_string(E):E.type===y.EQUALS?this.handle_equals(E):E.type===y.OPERATOR?this.handle_operator(E):E.type===y.COMMA?this.handle_comma(E):E.type===y.BLOCK_COMMENT?this.handle_block_comment(E,R):E.type===y.COMMENT?this.handle_comment(E,R):E.type===y.DOT?this.handle_dot(E):E.type===y.EOF?this.handle_eof(E):E.type===y.UNKNOWN?this.handle_unknown(E,R):this.handle_unknown(E,R)},b.prototype.handle_whitespace_and_comments=function(E,R){var C=E.newlines,N=this._options.keep_array_indentation&&a(this._flags.mode);if(E.comments_before)for(var K=E.comments_before.next();K;)this.handle_whitespace_and_comments(K,R),this.handle_token(K,R),K=E.comments_before.next();if(N)for(var H=0;H<C;H+=1)this.print_newline(H>0,R);else if(this._options.max_preserve_newlines&&C>this._options.max_preserve_newlines&&(C=this._options.max_preserve_newlines),this._options.preserve_newlines&&C>1){this.print_newline(!1,R);for(var ee=1;ee<C;ee+=1)this.print_newline(!0,R)}};var v=["async","break","continue","return","throw","yield"];b.prototype.allow_wrap_or_preserved_newline=function(E,R){if(R=R===void 0?!1:R,!this._output.just_added_newline()){var C=this._options.preserve_newlines&&E.newlines||R,N=u(this._flags.last_token.text,c)||u(E.text,c);if(N){var K=u(this._flags.last_token.text,c)&&u(this._options.operator_position,A)||u(E.text,c);C=C&&K}if(C)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(m(this._flags.last_token,v))return;this._output.set_wrap_point()}}},b.prototype.print_newline=function(E,R){if(!R&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==y.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var C=this._tokens.peek();this._flags.mode===x.Statement&&!(this._flags.if_block&&t(C,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(E)&&(this._flags.multiline_frame=!0)},b.prototype.print_token_line_indentation=function(E){this._output.just_added_newline()&&(this._options.keep_array_indentation&&E.newlines&&(E.text==="["||a(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(E.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},b.prototype.print_token=function(E){if(this._output.raw){this._output.add_raw_token(E);return}if(this._options.comma_first&&E.previous&&E.previous.type===y.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var R=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(R),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(E),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(E),this._output.non_breaking_space=!0,this._output.add_token(E.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},b.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},b.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},b.prototype.set_mode=function(E){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,E),this._flags=this.create_flags(this._previous_flags,E),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},b.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===x.Statement&&w(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},b.prototype.start_of_object_property=function(){return this._flags.parent.mode===x.ObjectLiteral&&this._flags.mode===x.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||m(this._flags.last_token,["get","set"]))},b.prototype.start_of_statement=function(E){var R=!1;return R=R||m(this._flags.last_token,["var","let","const"])&&E.type===y.WORD,R=R||t(this._flags.last_token,"do"),R=R||!(this._flags.parent.mode===x.ObjectLiteral&&this._flags.mode===x.Statement)&&m(this._flags.last_token,v)&&!E.newlines,R=R||t(this._flags.last_token,"else")&&!(t(E,"if")&&!E.comments_before),R=R||this._flags.last_token.type===y.END_EXPR&&(this._previous_flags.mode===x.ForInitializer||this._previous_flags.mode===x.Conditional),R=R||this._flags.last_token.type===y.WORD&&this._flags.mode===x.BlockStatement&&!this._flags.in_case&&!(E.text==="--"||E.text==="++")&&this._last_last_text!=="function"&&E.type!==y.WORD&&E.type!==y.RESERVED,R=R||this._flags.mode===x.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||m(this._flags.last_token,["get","set"])),R?(this.set_mode(x.Statement),this.indent(),this.handle_whitespace_and_comments(E,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E,m(E,["do","for","if","while"])),!0):!1},b.prototype.handle_start_expr=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E);var R=x.Expression;if(E.text==="["){if(this._flags.last_token.type===y.WORD||this._flags.last_token.text===")"){m(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(E),this.set_mode(R),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}R=x.ArrayLiteral,a(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),u(this._flags.last_token.type,[y.START_EXPR,y.END_EXPR,y.WORD,y.OPERATOR,y.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===y.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,R=x.ForInitializer):u(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,R=x.Conditional):u(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&E.whitespace_before===""?this._output.space_before_token=!1:(u(this._flags.last_token.text,o)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===y.EQUALS||this._flags.last_token.type===y.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E);else if(this._flags.last_token.type===y.WORD){this._output.space_before_token=!1;var C=this._tokens.peek(-3);if(this._options.space_after_named_function&&C){var N=this._tokens.peek(-4);m(C,["async","function"])||C.text==="*"&&m(N,["async","function"])?this._output.space_before_token=!0:this._flags.mode===x.ObjectLiteral?(C.text==="{"||C.text===","||C.text==="*"&&(N.text==="{"||N.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(E);(this._flags.last_token.type===y.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(u(this._last_last_text,["function","yield"])||this._flags.mode===x.ObjectLiteral&&u(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===y.START_BLOCK?this.print_newline():(this._flags.last_token.type===y.END_EXPR||this._flags.last_token.type===y.START_EXPR||this._flags.last_token.type===y.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===y.COMMA)&&this.allow_wrap_or_preserved_newline(E,E.newlines),this.print_token(E),this.set_mode(R),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},b.prototype.handle_end_expr=function(E){for(;this._flags.mode===x.Statement;)this.restore_mode();this.handle_whitespace_and_comments(E),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(E,E.text==="]"&&a(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===y.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(E),this.restore_mode(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===x.Conditional&&(this._previous_flags.mode=x.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},b.prototype.handle_start_block=function(E){this.handle_whitespace_and_comments(E);var R=this._tokens.peek(),C=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===y.END_EXPR?(this.set_mode(x.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(x.BlockStatement):C&&(u(C.text,[":",","])&&u(R.type,[y.STRING,y.WORD,y.RESERVED])||u(R.text,["get","set","..."])&&u(C.type,[y.WORD,y.RESERVED]))?u(this._last_last_text,["class","interface"])&&!u(C.text,[":",","])?this.set_mode(x.BlockStatement):this.set_mode(x.ObjectLiteral):this._flags.last_token.type===y.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(x.BlockStatement):u(this._flags.last_token.type,[y.EQUALS,y.START_EXPR,y.COMMA,y.OPERATOR])||m(this._flags.last_token,["return","throw","import","default"])?this.set_mode(x.ObjectLiteral):this.set_mode(x.BlockStatement),this._flags.last_token&&m(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var N=!R.comments_before&&R.text==="}",K=N&&this._flags.last_word==="function"&&this._flags.last_token.type===y.END_EXPR;if(this._options.brace_preserve_inline){var H=0,ee=null;this._flags.inline_frame=!0;do if(H+=1,ee=this._tokens.peek(H-1),ee.newlines){this._flags.inline_frame=!1;break}while(ee.type!==y.EOF&&!(ee.type===y.END_BLOCK&&ee.opened===E))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&E.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==y.OPERATOR&&(K||this._flags.last_token.type===y.EQUALS||m(this._flags.last_token,S)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(a(this._previous_flags.mode)&&(this._flags.last_token.type===y.START_EXPR||this._flags.last_token.type===y.COMMA)&&((this._flags.last_token.type===y.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===y.COMMA||this._flags.last_token.type===y.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(E),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==y.OPERATOR&&this._flags.last_token.type!==y.START_EXPR&&(this._flags.last_token.type===y.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(E),this.indent(),!N&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},b.prototype.handle_end_block=function(E){for(this.handle_whitespace_and_comments(E);this._flags.mode===x.Statement;)this.restore_mode();var R=this._flags.last_token.type===y.START_BLOCK;this._flags.inline_frame&&!R?this._output.space_before_token=!0:this._options.brace_style==="expand"?R||this.print_newline():R||(a(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(E)},b.prototype.handle_word=function(E){if(E.type===y.RESERVED){if(u(E.text,["set","get"])&&this._flags.mode!==x.ObjectLiteral)E.type=y.WORD;else if(E.text==="import"&&u(this._tokens.peek().text,["(","."]))E.type=y.WORD;else if(u(E.text,["as","from"])&&!this._flags.import_block)E.type=y.WORD;else if(this._flags.mode===x.ObjectLiteral){var R=this._tokens.peek();R.text===":"&&(E.type=y.WORD)}}if(this.start_of_statement(E)?m(this._flags.last_token,["var","let","const"])&&E.type===y.WORD&&(this._flags.declaration_statement=!0):E.newlines&&!r(this._flags.mode)&&(this._flags.last_token.type!==y.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==y.EQUALS&&(this._options.preserve_newlines||!m(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(E),this.print_newline()):this.handle_whitespace_and_comments(E),this._flags.do_block&&!this._flags.do_while)if(t(E,"while")){this._output.space_before_token=!0,this.print_token(E),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&t(E,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===x.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&m(E,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(E),this._flags.in_case=!0;return}if((this._flags.last_token.type===y.COMMA||this._flags.last_token.type===y.START_EXPR||this._flags.last_token.type===y.EQUALS||this._flags.last_token.type===y.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E)),t(E,"function")){(u(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(u(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===y.OPERATOR))&&!this._output.just_added_blankline()&&!E.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===y.RESERVED||this._flags.last_token.type===y.WORD?m(this._flags.last_token,["get","set","new","export"])||m(this._flags.last_token,v)?this._output.space_before_token=!0:t(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===y.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(r(this._flags.mode)||a(this._flags.mode))||this.print_newline(),this.print_token(E),this._flags.last_word=E.text;return}var C="NONE";if(this._flags.last_token.type===y.END_BLOCK?this._previous_flags.inline_frame?C="SPACE":m(E,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&E.newlines?C="NEWLINE":(C="SPACE",this._output.space_before_token=!0):C="NEWLINE":this._flags.last_token.type===y.SEMICOLON&&this._flags.mode===x.BlockStatement?C="NEWLINE":this._flags.last_token.type===y.SEMICOLON&&r(this._flags.mode)?C="SPACE":this._flags.last_token.type===y.STRING?C="NEWLINE":this._flags.last_token.type===y.RESERVED||this._flags.last_token.type===y.WORD||this._flags.last_token.text==="*"&&(u(this._last_last_text,["function","yield"])||this._flags.mode===x.ObjectLiteral&&u(this._last_last_text,["{",","]))?C="SPACE":this._flags.last_token.type===y.START_BLOCK?this._flags.inline_frame?C="SPACE":C="NEWLINE":this._flags.last_token.type===y.END_EXPR&&(this._output.space_before_token=!0,C="NEWLINE"),m(E,o)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?C="SPACE":C="NEWLINE"),m(E,["else","catch","finally"]))if((!(this._flags.last_token.type===y.END_BLOCK&&this._previous_flags.mode===x.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&E.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var N=this._output.current_line;N.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else C==="NEWLINE"?m(this._flags.last_token,S)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&m(E,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==y.END_EXPR?(this._flags.last_token.type!==y.START_EXPR||!m(E,["var","let","const"]))&&this._flags.last_token.text!==":"&&(t(E,"if")&&t(E.previous,"else")?this._output.space_before_token=!0:this.print_newline()):m(E,o)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&a(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():C==="SPACE"&&(this._output.space_before_token=!0);E.previous&&(E.previous.type===y.WORD||E.previous.type===y.RESERVED)&&(this._output.space_before_token=!0),this.print_token(E),this._flags.last_word=E.text,E.type===y.RESERVED&&(E.text==="do"?this._flags.do_block=!0:E.text==="if"?this._flags.if_block=!0:E.text==="import"?this._flags.import_block=!0:this._flags.import_block&&t(E,"from")&&(this._flags.import_block=!1))},b.prototype.handle_semicolon=function(E){this.start_of_statement(E)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(E);for(var R=this._tokens.peek();this._flags.mode===x.Statement&&!(this._flags.if_block&&t(R,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(E)},b.prototype.handle_string=function(E){E.text.startsWith("`")&&E.newlines===0&&E.whitespace_before===""&&(E.previous.text===")"||this._flags.last_token.type===y.WORD)||(this.start_of_statement(E)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(E),this._flags.last_token.type===y.RESERVED||this._flags.last_token.type===y.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===y.COMMA||this._flags.last_token.type===y.START_EXPR||this._flags.last_token.type===y.EQUALS||this._flags.last_token.type===y.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E):E.text.startsWith("`")&&this._flags.last_token.type===y.END_EXPR&&(E.previous.text==="]"||E.previous.text===")")&&E.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(E)},b.prototype.handle_equals=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(E),this._output.space_before_token=!0},b.prototype.handle_comma=function(E){this.handle_whitespace_and_comments(E,!0),this.print_token(E),this._output.space_before_token=!0,this._flags.declaration_statement?(r(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(E)):this._flags.mode===x.ObjectLiteral||this._flags.mode===x.Statement&&this._flags.parent.mode===x.ObjectLiteral?(this._flags.mode===x.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(E)},b.prototype.handle_operator=function(E){var R=E.text==="*"&&(m(this._flags.last_token,["function","yield"])||u(this._flags.last_token.type,[y.START_BLOCK,y.COMMA,y.END_BLOCK,y.SEMICOLON])),C=u(E.text,["-","+"])&&(u(this._flags.last_token.type,[y.START_BLOCK,y.START_EXPR,y.EQUALS,y.OPERATOR])||u(this._flags.last_token.text,o)||this._flags.last_token.text===",");if(!this.start_of_statement(E)){var N=!R;this.handle_whitespace_and_comments(E,N)}if(E.text==="*"&&this._flags.last_token.type===y.DOT){this.print_token(E);return}if(E.text==="::"){this.print_token(E);return}if(this._flags.last_token.type===y.OPERATOR&&u(this._options.operator_position,A)&&this.allow_wrap_or_preserved_newline(E),E.text===":"&&this._flags.in_case){this.print_token(E),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==y.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var K=!0,H=!0,ee=!1;if(E.text===":"?this._flags.ternary_depth===0?K=!1:(this._flags.ternary_depth-=1,ee=!0):E.text==="?"&&(this._flags.ternary_depth+=1),!C&&!R&&this._options.preserve_newlines&&u(E.text,c)){var J=E.text===":",se=J&&ee,G=J&&!ee;switch(this._options.operator_position){case _.before_newline:this._output.space_before_token=!G,this.print_token(E),(!J||se)&&this.allow_wrap_or_preserved_newline(E),this._output.space_before_token=!0;return;case _.after_newline:this._output.space_before_token=!0,!J||se?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(E):this._output.space_before_token=!1,this.print_token(E),this._output.space_before_token=!0;return;case _.preserve_newline:G||this.allow_wrap_or_preserved_newline(E),K=!(this._output.just_added_newline()||G),this._output.space_before_token=K,this.print_token(E),this._output.space_before_token=!0;return}}if(R){this.allow_wrap_or_preserved_newline(E),K=!1;var Ee=this._tokens.peek();H=Ee&&u(Ee.type,[y.WORD,y.RESERVED])}else if(E.text==="...")this.allow_wrap_or_preserved_newline(E),K=this._flags.last_token.type===y.START_BLOCK,H=!1;else if(u(E.text,["--","++","!","~"])||C){if((this._flags.last_token.type===y.COMMA||this._flags.last_token.type===y.START_EXPR)&&this.allow_wrap_or_preserved_newline(E),K=!1,H=!1,E.newlines&&(E.text==="--"||E.text==="++"||E.text==="~")){var ge=m(this._flags.last_token,S)&&E.newlines;ge&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ge,!0)}this._flags.last_token.text===";"&&r(this._flags.mode)&&(K=!0),this._flags.last_token.type===y.RESERVED?K=!0:this._flags.last_token.type===y.END_EXPR?K=!(this._flags.last_token.text==="]"&&(E.text==="--"||E.text==="++")):this._flags.last_token.type===y.OPERATOR&&(K=u(E.text,["--","-","++","+"])&&u(this._flags.last_token.text,["--","-","++","+"]),u(E.text,["+","-"])&&u(this._flags.last_token.text,["--","++"])&&(H=!0)),(this._flags.mode===x.BlockStatement&&!this._flags.inline_frame||this._flags.mode===x.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||K,this.print_token(E),this._output.space_before_token=H},b.prototype.handle_block_comment=function(E,R){if(this._output.raw){this._output.add_raw_token(E),E.directives&&E.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(E.directives){this.print_newline(!1,R),this.print_token(E),E.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!p.newline.test(E.text)&&!E.newlines){this._output.space_before_token=!0,this.print_token(E),this._output.space_before_token=!0;return}else this.print_block_commment(E,R)},b.prototype.print_block_commment=function(E,R){var C=n(E.text),N,K=!1,H=!1,ee=E.whitespace_before,J=ee.length;if(this.print_newline(!1,R),this.print_token_line_indentation(E),this._output.add_token(C[0]),this.print_newline(!1,R),C.length>1){for(C=C.slice(1),K=d(C,"*"),H=T(C,ee),K&&(this._flags.alignment=1),N=0;N<C.length;N++)K?(this.print_token_line_indentation(E),this._output.add_token(s(C[N]))):H&&C[N]?(this.print_token_line_indentation(E),this._output.add_token(C[N].substring(J))):(this._output.current_line.set_indent(-1),this._output.add_token(C[N])),this.print_newline(!1,R);this._flags.alignment=0}},b.prototype.handle_comment=function(E,R){E.newlines?this.print_newline(!1,R):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(E),this.print_newline(!1,R)},b.prototype.handle_dot=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),m(this._flags.last_token,S)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(E,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(E)},b.prototype.handle_unknown=function(E,R){this.print_token(E),E.text[E.text.length-1]===`
|
|
`&&this.print_newline(!1,R)},b.prototype.handle_eof=function(E){for(;this._flags.mode===x.Statement;)this.restore_mode();this.handle_whitespace_and_comments(E)},k.exports.Beautifier=b},function(k){function e(l){this.__parent=l,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}e.prototype.clone_empty=function(){var l=new e(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},e.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},e.prototype.has_match=function(l){for(var p=this.__items.length-1;p>=0;p--)if(this.__items[p].match(l))return!0;return!1},e.prototype.set_indent=function(l,p){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=p||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return this.__items.length===0},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(l){this.__items.push(l);var p=l.lastIndexOf(`
|
|
`);p!==-1?this.__character_count=l.length-p:this.__character_count+=l.length},e.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function O(l,p){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),p=p||"",l.indent_level>0&&(p=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=p,this.__base_string_length=p.length}O.prototype.get_indent_size=function(l,p){var h=this.__base_string_length;return p=p||0,l<0&&(h=0),h+=l*this.__indent_size,h+=p,h},O.prototype.get_indent_string=function(l,p){var h=this.__base_string;return p=p||0,l<0&&(l=0,h=""),p+=l*this.__indent_size,this.__ensure_cache(p),h+=this.__cache[p],h},O.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},O.prototype.__add_column=function(){var l=this.__cache.length,p=0,h="";this.__indent_size&&l>=this.__indent_size&&(p=Math.floor(l/this.__indent_size),l-=p*this.__indent_size,h=new Array(p+1).join(this.__indent_string)),l&&(h+=new Array(l+1).join(" ")),this.__cache.push(h)};function D(l,p){this.__indent_cache=new O(l,p),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}D.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},D.prototype.get_line_number=function(){return this.__lines.length},D.prototype.get_indent_string=function(l,p){return this.__indent_cache.get_indent_string(l,p)},D.prototype.get_indent_size=function(l,p){return this.__indent_cache.get_indent_size(l,p)},D.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},D.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},D.prototype.get_code=function(l){this.trim(!0);var p=this.current_line.pop();p&&(p[p.length-1]===`
|
|
`&&(p=p.replace(/\n+$/g,"")),this.current_line.push(p)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(`
|
|
`);return l!==`
|
|
`&&(h=h.replace(/[\n]/g,l)),h},D.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},D.prototype.set_indent=function(l,p){return l=l||0,p=p||0,this.next_line.set_indent(l,p),this.__lines.length>1?(this.current_line.set_indent(l,p),!0):(this.current_line.set_indent(),!1)},D.prototype.add_raw_token=function(l){for(var p=0;p<l.newlines;p++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},D.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},D.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},D.prototype.remove_indent=function(l){for(var p=this.__lines.length;l<p;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},D.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},D.prototype.just_added_newline=function(){return this.current_line.is_empty()},D.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},D.prototype.ensure_empty_line_above=function(l,p){for(var h=this.__lines.length-2;h>=0;){var g=this.__lines[h];if(g.is_empty())break;if(g.item(0).indexOf(l)!==0&&g.item(-1)!==p){this.__lines.splice(h+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},k.exports.Output=D},function(k){function e(O,D,l,p){this.type=O,this.text=D,this.comments_before=null,this.newlines=l||0,this.whitespace_before=p||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}k.exports.Token=e},function(k,e){var O="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",D="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",l="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",p="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",h="(?:\\\\u[0-9a-fA-F]{4}|["+O+l+"])",g="(?:\\\\u[0-9a-fA-F]{4}|["+D+l+p+"])*";e.identifier=new RegExp(h+g,"g"),e.identifierStart=new RegExp(h),e.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+D+l+p+"])+");var o=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp(`\r
|
|
|`+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")},function(k,e,O){var D=O(6).Options,l=["before-newline","after-newline","preserve-newline"];function p(h){D.call(this,h,"js");var g=this.raw_options.brace_style||null;g==="expand-strict"?this.raw_options.brace_style="expand":g==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var c=0;c<o.length;c++)o[c]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=o[c];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",l),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}p.prototype=new D,k.exports.Options=p},function(k){function e(l,p){this.raw_options=O(l,p),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}e.prototype._get_array=function(l,p){var h=this.raw_options[l],g=p||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(g=h.concat()):typeof h=="string"&&(g=h.split(/[^a-zA-Z0-9_\/\-]+/)),g},e.prototype._get_boolean=function(l,p){var h=this.raw_options[l],g=h===void 0?!!p:!!h;return g},e.prototype._get_characters=function(l,p){var h=this.raw_options[l],g=p||"";return typeof h=="string"&&(g=h.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),g},e.prototype._get_number=function(l,p){var h=this.raw_options[l];p=parseInt(p,10),isNaN(p)&&(p=0);var g=parseInt(h,10);return isNaN(g)&&(g=p),g},e.prototype._get_selection=function(l,p,h){var g=this._get_selection_list(l,p,h);if(g.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
`+p+`
|
|
You passed in: '`+this.raw_options[l]+"'");return g[0]},e.prototype._get_selection_list=function(l,p,h){if(!p||p.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[p[0]],!this._is_valid_selection(h,p))throw new Error("Invalid Default Value!");var g=this._get_array(l,h);if(!this._is_valid_selection(g,p))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
`+p+`
|
|
You passed in: '`+this.raw_options[l]+"'");return g},e.prototype._is_valid_selection=function(l,p){return l.length&&p.length&&!l.some(function(h){return p.indexOf(h)===-1})};function O(l,p){var h={};l=D(l);var g;for(g in l)g!==p&&(h[g]=l[g]);if(p&&l[p])for(g in l[p])h[g]=l[p][g];return h}function D(l){var p={},h;for(h in l){var g=h.replace(/-/g,"_");p[g]=l[h]}return p}k.exports.Options=e,k.exports.normalizeOpts=D,k.exports.mergeOpts=O},function(k,e,O){var D=O(8).InputScanner,l=O(9).Tokenizer,p=O(9).TOKEN,h=O(13).Directives,g=O(4),o=O(12).Pattern,c=O(14).TemplatablePattern;function y(d,T){return T.indexOf(d)!==-1}var u={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:p.START,RAW:p.RAW,EOF:p.EOF},s=new h(/\/\*/,/\*\//),i=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,t=/[0-9]/,m=/[^\d\.]/,S=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),f=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";f=f.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),f="\\?\\.(?!\\d) "+f,f=f.replace(/ /g,"|");var _=new RegExp(f),A="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),x=A.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),w=new RegExp("^(?:"+x.join("|")+")$"),n,a=function(d,T){l.call(this,d,T),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var b=new o(this._input),v=new c(this._input).read_options(this._options);this.__patterns={template:v,identifier:v.starting_with(g.identifier).matching(g.identifierMatch),number:b.matching(i),punct:b.matching(_),comment:b.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:b.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:b.matching(/<!--/),html_comment_end:b.matching(/-->/),include:b.starting_with(/#include/).until_after(g.lineBreak),shebang:b.starting_with(/#!/).until_after(g.lineBreak),xml:b.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:v.until(/['\\\n\r\u2028\u2029]/),double_quote:v.until(/["\\\n\r\u2028\u2029]/),template_text:v.until(/[`\\$]/),template_expression:v.until(/[`}\\]/)}};a.prototype=new l,a.prototype._is_comment=function(d){return d.type===u.COMMENT||d.type===u.BLOCK_COMMENT||d.type===u.UNKNOWN},a.prototype._is_opening=function(d){return d.type===u.START_BLOCK||d.type===u.START_EXPR},a.prototype._is_closing=function(d,T){return(d.type===u.END_BLOCK||d.type===u.END_EXPR)&&T&&(d.text==="]"&&T.text==="["||d.text===")"&&T.text==="("||d.text==="}"&&T.text==="{")},a.prototype._reset=function(){n=!1},a.prototype._get_next_token=function(d,T){var b=null;this._readWhitespace();var v=this._input.peek();return v===null?this._create_token(u.EOF,""):(b=b||this._read_non_javascript(v),b=b||this._read_string(v),b=b||this._read_word(d),b=b||this._read_singles(v),b=b||this._read_comment(v),b=b||this._read_regexp(v,d),b=b||this._read_xml(v,d),b=b||this._read_punctuation(),b=b||this._create_token(u.UNKNOWN,this._input.next()),b)},a.prototype._read_word=function(d){var T;if(T=this.__patterns.identifier.read(),T!=="")return T=T.replace(g.allLineBreaks,`
|
|
`),!(d.type===u.DOT||d.type===u.RESERVED&&(d.text==="set"||d.text==="get"))&&w.test(T)?(T==="in"||T==="of")&&(d.type===u.WORD||d.type===u.STRING)?this._create_token(u.OPERATOR,T):this._create_token(u.RESERVED,T):this._create_token(u.WORD,T);if(T=this.__patterns.number.read(),T!=="")return this._create_token(u.WORD,T)},a.prototype._read_singles=function(d){var T=null;return d==="("||d==="["?T=this._create_token(u.START_EXPR,d):d===")"||d==="]"?T=this._create_token(u.END_EXPR,d):d==="{"?T=this._create_token(u.START_BLOCK,d):d==="}"?T=this._create_token(u.END_BLOCK,d):d===";"?T=this._create_token(u.SEMICOLON,d):d==="."&&m.test(this._input.peek(1))?T=this._create_token(u.DOT,d):d===","&&(T=this._create_token(u.COMMA,d)),T&&this._input.next(),T},a.prototype._read_punctuation=function(){var d=this.__patterns.punct.read();if(d!=="")return d==="="?this._create_token(u.EQUALS,d):d==="?."?this._create_token(u.DOT,d):this._create_token(u.OPERATOR,d)},a.prototype._read_non_javascript=function(d){var T="";if(d==="#"){if(this._is_first_token()&&(T=this.__patterns.shebang.read(),T))return this._create_token(u.UNKNOWN,T.trim()+`
|
|
`);if(T=this.__patterns.include.read(),T)return this._create_token(u.UNKNOWN,T.trim()+`
|
|
`);d=this._input.next();var b="#";if(this._input.hasNext()&&this._input.testChar(t)){do d=this._input.next(),b+=d;while(this._input.hasNext()&&d!=="#"&&d!=="=");return d==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(b+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(b+="{}",this._input.next(),this._input.next())),this._create_token(u.WORD,b)}this._input.back()}else if(d==="<"&&this._is_first_token()){if(T=this.__patterns.html_comment_start.read(),T){for(;this._input.hasNext()&&!this._input.testChar(g.newline);)T+=this._input.next();return n=!0,this._create_token(u.COMMENT,T)}}else if(n&&d==="-"&&(T=this.__patterns.html_comment_end.read(),T))return n=!1,this._create_token(u.COMMENT,T);return null},a.prototype._read_comment=function(d){var T=null;if(d==="/"){var b="";if(this._input.peek(1)==="*"){b=this.__patterns.block_comment.read();var v=s.get_directives(b);v&&v.ignore==="start"&&(b+=s.readIgnored(this._input)),b=b.replace(g.allLineBreaks,`
|
|
`),T=this._create_token(u.BLOCK_COMMENT,b),T.directives=v}else this._input.peek(1)==="/"&&(b=this.__patterns.comment.read(),T=this._create_token(u.COMMENT,b))}return T},a.prototype._read_string=function(d){if(d==="`"||d==="'"||d==='"'){var T=this._input.next();return this.has_char_escapes=!1,d==="`"?T+=this._read_string_recursive("`",!0,"${"):T+=this._read_string_recursive(d),this.has_char_escapes&&this._options.unescape_strings&&(T=r(T)),this._input.peek()===d&&(T+=this._input.next()),T=T.replace(g.allLineBreaks,`
|
|
`),this._create_token(u.STRING,T)}return null},a.prototype._allow_regexp_or_xml=function(d){return d.type===u.RESERVED&&y(d.text,["return","case","throw","else","do","typeof","yield"])||d.type===u.END_EXPR&&d.text===")"&&d.opened.previous.type===u.RESERVED&&y(d.opened.previous.text,["if","while","for"])||y(d.type,[u.COMMENT,u.START_EXPR,u.START_BLOCK,u.START,u.END_BLOCK,u.OPERATOR,u.EQUALS,u.EOF,u.SEMICOLON,u.COMMA])},a.prototype._read_regexp=function(d,T){if(d==="/"&&this._allow_regexp_or_xml(T)){for(var b=this._input.next(),v=!1,E=!1;this._input.hasNext()&&(v||E||this._input.peek()!==d)&&!this._input.testChar(g.newline);)b+=this._input.peek(),v?v=!1:(v=this._input.peek()==="\\",this._input.peek()==="["?E=!0:this._input.peek()==="]"&&(E=!1)),this._input.next();return this._input.peek()===d&&(b+=this._input.next(),b+=this._input.read(g.identifier)),this._create_token(u.STRING,b)}return null},a.prototype._read_xml=function(d,T){if(this._options.e4x&&d==="<"&&this._allow_regexp_or_xml(T)){var b="",v=this.__patterns.xml.read_match();if(v){for(var E=v[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),R=E.indexOf("{")===0,C=0;v;){var N=!!v[1],K=v[2],H=!!v[v.length-1]||K.slice(0,8)==="![CDATA[";if(!H&&(K===E||R&&K.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(N?--C:++C),b+=v[0],C<=0)break;v=this.__patterns.xml.read_match()}return v||(b+=this._input.match(/[\s\S]*/g)[0]),b=b.replace(g.allLineBreaks,`
|
|
`),this._create_token(u.STRING,b)}}return null};function r(d){for(var T="",b=0,v=new D(d),E=null;v.hasNext();)if(E=v.match(/([\s]|[^\\]|\\\\)+/g),E&&(T+=E[0]),v.peek()==="\\"){if(v.next(),v.peek()==="x")E=v.match(/x([0-9A-Fa-f]{2})/g);else if(v.peek()==="u")E=v.match(/u([0-9A-Fa-f]{4})/g);else{T+="\\",v.hasNext()&&(T+=v.next());continue}if(!E||(b=parseInt(E[1],16),b>126&&b<=255&&E[0].indexOf("x")===0))return d;if(b>=0&&b<32){T+="\\"+E[0];continue}else b===34||b===39||b===92?T+="\\"+String.fromCharCode(b):T+=String.fromCharCode(b)}return T}a.prototype._read_string_recursive=function(d,T,b){var v,E;d==="'"?E=this.__patterns.single_quote:d==='"'?E=this.__patterns.double_quote:d==="`"?E=this.__patterns.template_text:d==="}"&&(E=this.__patterns.template_expression);for(var R=E.read(),C="";this._input.hasNext();){if(C=this._input.next(),C===d||!T&&g.newline.test(C)){this._input.back();break}else C==="\\"&&this._input.hasNext()?(v=this._input.peek(),v==="x"||v==="u"?this.has_char_escapes=!0:v==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),C+=this._input.next()):b&&(b==="${"&&C==="$"&&this._input.peek()==="{"&&(C+=this._input.next()),b===C&&(d==="`"?C+=this._read_string_recursive("}",T,"`"):C+=this._read_string_recursive("`",T,"${"),this._input.hasNext()&&(C+=this._input.next())));C+=E.read(),R+=C}return R},k.exports.Tokenizer=a,k.exports.TOKEN=u,k.exports.positionable_operators=S.slice(),k.exports.line_starters=A.slice()},function(k){var e=RegExp.prototype.hasOwnProperty("sticky");function O(D){this.__input=D||"",this.__input_length=this.__input.length,this.__position=0}O.prototype.restart=function(){this.__position=0},O.prototype.back=function(){this.__position>0&&(this.__position-=1)},O.prototype.hasNext=function(){return this.__position<this.__input_length},O.prototype.next=function(){var D=null;return this.hasNext()&&(D=this.__input.charAt(this.__position),this.__position+=1),D},O.prototype.peek=function(D){var l=null;return D=D||0,D+=this.__position,D>=0&&D<this.__input_length&&(l=this.__input.charAt(D)),l},O.prototype.__match=function(D,l){D.lastIndex=l;var p=D.exec(this.__input);return p&&!(e&&D.sticky)&&p.index!==l&&(p=null),p},O.prototype.test=function(D,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(D,l):!1},O.prototype.testChar=function(D,l){var p=this.peek(l);return D.lastIndex=0,p!==null&&D.test(p)},O.prototype.match=function(D){var l=this.__match(D,this.__position);return l?this.__position+=l[0].length:l=null,l},O.prototype.read=function(D,l,p){var h="",g;return D&&(g=this.match(D),g&&(h+=g[0])),l&&(g||!D)&&(h+=this.readUntil(l,p)),h},O.prototype.readUntil=function(D,l){var p="",h=this.__position;D.lastIndex=this.__position;var g=D.exec(this.__input);return g?(h=g.index,l&&(h+=g[0].length)):h=this.__input_length,p=this.__input.substring(this.__position,h),this.__position=h,p},O.prototype.readUntilAfter=function(D){return this.readUntil(D,!0)},O.prototype.get_regexp=function(D,l){var p=null,h="g";return l&&e&&(h="y"),typeof D=="string"&&D!==""?p=new RegExp(D,h):D&&(p=new RegExp(D.source,h)),p},O.prototype.get_literal_regexp=function(D){return RegExp(D.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},O.prototype.peekUntilAfter=function(D){var l=this.__position,p=this.readUntilAfter(D);return this.__position=l,p},O.prototype.lookBack=function(D){var l=this.__position-1;return l>=D.length&&this.__input.substring(l-D.length,l).toLowerCase()===D},k.exports.InputScanner=O},function(k,e,O){var D=O(8).InputScanner,l=O(3).Token,p=O(10).TokenStream,h=O(11).WhitespacePattern,g={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(c,y){this._input=new D(c),this._options=y||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new h(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new p,this._reset();for(var c,y=new l(g.START,""),u=null,s=[],i=new p;y.type!==g.EOF;){for(c=this._get_next_token(y,u);this._is_comment(c);)i.add(c),c=this._get_next_token(y,u);i.isEmpty()||(c.comments_before=i,i=new p),c.parent=u,this._is_opening(c)?(s.push(u),u=c):u&&this._is_closing(c,u)&&(c.opened=u,u.closed=c,u=s.pop(),c.parent=u),c.previous=y,y.next=c,this.__tokens.add(c),y=c}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(c,y){this._readWhitespace();var u=this._input.read(/.+/g);return u?this._create_token(g.RAW,u):this._create_token(g.EOF,"")},o.prototype._is_comment=function(c){return!1},o.prototype._is_opening=function(c){return!1},o.prototype._is_closing=function(c,y){return!1},o.prototype._create_token=function(c,y){var u=new l(c,y,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return u},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},k.exports.Tokenizer=o,k.exports.TOKEN=g},function(k){function e(O){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=O}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return this.__tokens_length===0},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var O=null;return this.hasNext()&&(O=this.__tokens[this.__position],this.__position+=1),O},e.prototype.peek=function(O){var D=null;return O=O||0,O+=this.__position,O>=0&&O<this.__tokens_length&&(D=this.__tokens[O]),D},e.prototype.add=function(O){this.__parent_token&&(O.parent=this.__parent_token),this.__tokens.push(O),this.__tokens_length+=1},k.exports.TokenStream=e},function(k,e,O){var D=O(12).Pattern;function l(p,h){D.call(this,p,h),h?this._line_regexp=this._input.get_regexp(h._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}l.prototype=new D,l.prototype.__set_whitespace_patterns=function(p,h){p+="\\t ",h+="\\n\\r",this._match_pattern=this._input.get_regexp("["+p+h+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+h+"]")},l.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var p=this._input.read(this._match_pattern);if(p===" ")this.whitespace_before_token=" ";else if(p){var h=this.__split(this._newline_regexp,p);this.newline_count=h.length-1,this.whitespace_before_token=h[this.newline_count]}return p},l.prototype.matching=function(p,h){var g=this._create();return g.__set_whitespace_patterns(p,h),g._update(),g},l.prototype._create=function(){return new l(this._input,this)},l.prototype.__split=function(p,h){p.lastIndex=0;for(var g=0,o=[],c=p.exec(h);c;)o.push(h.substring(g,c.index)),g=c.index+c[0].length,c=p.exec(h);return g<h.length?o.push(h.substring(g,h.length)):o.push(""),o},k.exports.WhitespacePattern=l},function(k){function e(O,D){this._input=O,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,D&&(this._starting_pattern=this._input.get_regexp(D._starting_pattern,!0),this._match_pattern=this._input.get_regexp(D._match_pattern,!0),this._until_pattern=this._input.get_regexp(D._until_pattern),this._until_after=D._until_after)}e.prototype.read=function(){var O=this._input.read(this._starting_pattern);return(!this._starting_pattern||O)&&(O+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),O},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(O){var D=this._create();return D._until_after=!0,D._until_pattern=this._input.get_regexp(O),D._update(),D},e.prototype.until=function(O){var D=this._create();return D._until_after=!1,D._until_pattern=this._input.get_regexp(O),D._update(),D},e.prototype.starting_with=function(O){var D=this._create();return D._starting_pattern=this._input.get_regexp(O,!0),D._update(),D},e.prototype.matching=function(O){var D=this._create();return D._match_pattern=this._input.get_regexp(O,!0),D._update(),D},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},k.exports.Pattern=e},function(k){function e(O,D){O=typeof O=="string"?O:O.source,D=typeof D=="string"?D:D.source,this.__directives_block_pattern=new RegExp(O+/ beautify( \w+[:]\w+)+ /.source+D,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(O+/\sbeautify\signore:end\s/.source+D,"g")}e.prototype.get_directives=function(O){if(!O.match(this.__directives_block_pattern))return null;var D={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(O);l;)D[l[1]]=l[2],l=this.__directive_pattern.exec(O);return D},e.prototype.readIgnored=function(O){return O.readUntilAfter(this.__directives_end_ignore_pattern)},k.exports.Directives=e},function(k,e,O){var D=O(12).Pattern,l={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function p(h,g){D.call(this,h,g),this.__template_pattern=null,this._disabled=Object.assign({},l),this._excluded=Object.assign({},l),g&&(this.__template_pattern=this._input.get_regexp(g.__template_pattern),this._excluded=Object.assign(this._excluded,g._excluded),this._disabled=Object.assign(this._disabled,g._disabled));var o=new D(h);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}p.prototype=new D,p.prototype._create=function(){return new p(this._input,this)},p.prototype._update=function(){this.__set_templated_pattern()},p.prototype.disable=function(h){var g=this._create();return g._disabled[h]=!0,g._update(),g},p.prototype.read_options=function(h){var g=this._create();for(var o in l)g._disabled[o]=h.templating.indexOf(o)===-1;return g._update(),g},p.prototype.exclude=function(h){var g=this._create();return g._excluded[h]=!0,g._update(),g},p.prototype.read=function(){var h="";this._match_pattern?h=this._input.read(this._starting_pattern):h=this._input.read(this._starting_pattern,this.__template_pattern);for(var g=this._read_template();g;)this._match_pattern?g+=this._input.read(this._match_pattern):g+=this._input.readUntil(this.__template_pattern),h+=g,g=this._read_template();return this._until_after&&(h+=this._input.readUntilAfter(this._until_pattern)),h},p.prototype.__set_templated_pattern=function(){var h=[];this._disabled.php||h.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||h.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||h.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(h.push(this.__patterns.django._starting_pattern.source),h.push(this.__patterns.django_value._starting_pattern.source),h.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||h.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&h.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+h.join("|")+")")},p.prototype._read_template=function(){var h="",g=this._input.peek();if(g==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(h=h||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(h=h||this.__patterns.erb.read())}else g==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(h=h||this.__patterns.handlebars_comment.read(),h=h||this.__patterns.handlebars_unescaped.read(),h=h||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(h=h||this.__patterns.django_value.read()),this._excluded.django||(h=h||this.__patterns.django_comment.read(),h=h||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(h=h||this.__patterns.smarty_comment.read(),h=h||this.__patterns.smarty_literal.read(),h=h||this.__patterns.smarty.read()));return h},k.exports.TemplatablePattern=p}],L={};function M(k){var e=L[k];if(e!==void 0)return e.exports;var O=L[k]={exports:{}};return U[k](O,O.exports,M),O.exports}var P=M(0);oe=P})();var te=oe;B=[],z=function(){return{js_beautify:te}}.apply(Qe,B),z!==void 0&&(Ct.exports=z)})()},47084:function(Ct){(function(Qe,B){Ct.exports=B()})(this,function(){"use strict";function Qe(Se,ye){for(var Te=0;Te<ye.length;Te++){var Y=ye[Te];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(Se,Y.key,Y)}}function B(Se,ye,Te){return ye&&Qe(Se.prototype,ye),Te&&Qe(Se,Te),Se}function z(Se,ye){if(Se){if(typeof Se=="string")return oe(Se,ye);var Te=Object.prototype.toString.call(Se).slice(8,-1);if(Te==="Object"&&Se.constructor&&(Te=Se.constructor.name),Te==="Map"||Te==="Set")return Array.from(Se);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return oe(Se,ye)}}function oe(Se,ye){(ye==null||ye>Se.length)&&(ye=Se.length);for(var Te=0,Y=new Array(ye);Te<ye;Te++)Y[Te]=Se[Te];return Y}function te(Se,ye){var Te=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(Te)return(Te=Te.call(Se)).next.bind(Te);if(Array.isArray(Se)||(Te=z(Se))||ye&&Se&&typeof Se.length=="number"){Te&&(Se=Te);var Y=0;return function(){return Y>=Se.length?{done:!0}:{done:!1,value:Se[Y++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var U={exports:{}};function L(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function M(Se){U.exports.defaults=Se}U.exports={defaults:L(),getDefaults:L,changeDefaults:M};var P=/[&<>"']/,k=/[&<>"']/g,e=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,D={"&":"&","<":"<",">":">",'"':""","'":"'"},l=function(ye){return D[ye]};function p(Se,ye){if(ye){if(P.test(Se))return Se.replace(k,l)}else if(e.test(Se))return Se.replace(O,l);return Se}var h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function g(Se){return Se.replace(h,function(ye,Te){return Te=Te.toLowerCase(),Te==="colon"?":":Te.charAt(0)==="#"?Te.charAt(1)==="x"?String.fromCharCode(parseInt(Te.substring(2),16)):String.fromCharCode(+Te.substring(1)):""})}var o=/(^|[^\[])\^/g;function c(Se,ye){Se=Se.source||Se,ye=ye||"";var Te={replace:function(W,X){return X=X.source||X,X=X.replace(o,"$1"),Se=Se.replace(W,X),Te},getRegex:function(){return new RegExp(Se,ye)}};return Te}var y=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function s(Se,ye,Te){if(Se){var Y;try{Y=decodeURIComponent(g(Te)).replace(y,"").toLowerCase()}catch(W){return null}if(Y.indexOf("javascript:")===0||Y.indexOf("vbscript:")===0||Y.indexOf("data:")===0)return null}ye&&!u.test(Te)&&(Te=f(ye,Te));try{Te=encodeURI(Te).replace(/%25/g,"%")}catch(W){return null}return Te}var i={},t=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,S=/^([^:]+:\/*[^/]*)[\s\S]*$/;function f(Se,ye){i[" "+Se]||(t.test(Se)?i[" "+Se]=Se+"/":i[" "+Se]=w(Se,"/",!0)),Se=i[" "+Se];var Te=Se.indexOf(":")===-1;return ye.substring(0,2)==="//"?Te?ye:Se.replace(m,"$1")+ye:ye.charAt(0)==="/"?Te?ye:Se.replace(S,"$1")+ye:Se+ye}var _={exec:function(){}};function A(Se){for(var ye=1,Te,Y;ye<arguments.length;ye++){Te=arguments[ye];for(Y in Te)Object.prototype.hasOwnProperty.call(Te,Y)&&(Se[Y]=Te[Y])}return Se}function x(Se,ye){var Te=Se.replace(/\|/g,function(X,ie,Q){for(var de=!1,ve=ie;--ve>=0&&Q[ve]==="\\";)de=!de;return de?"|":" |"}),Y=Te.split(/ \|/),W=0;if(Y.length>ye)Y.splice(ye);else for(;Y.length<ye;)Y.push("");for(;W<Y.length;W++)Y[W]=Y[W].trim().replace(/\\\|/g,"|");return Y}function w(Se,ye,Te){var Y=Se.length;if(Y===0)return"";for(var W=0;W<Y;){var X=Se.charAt(Y-W-1);if(X===ye&&!Te)W++;else if(X!==ye&&Te)W++;else break}return Se.substr(0,Y-W)}function n(Se,ye){if(Se.indexOf(ye[1])===-1)return-1;for(var Te=Se.length,Y=0,W=0;W<Te;W++)if(Se[W]==="\\")W++;else if(Se[W]===ye[0])Y++;else if(Se[W]===ye[1]&&(Y--,Y<0))return W;return-1}function a(Se){Se&&Se.sanitize&&!Se.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function r(Se,ye){if(ye<1)return"";for(var Te="";ye>1;)ye&1&&(Te+=Se),ye>>=1,Se+=Se;return Te+Se}var d={escape:p,unescape:g,edit:c,cleanUrl:s,resolveUrl:f,noopTest:_,merge:A,splitCells:x,rtrim:w,findClosingBracket:n,checkSanitizeDeprecation:a,repeatString:r},T=U.exports.defaults,b=d.rtrim,v=d.splitCells,E=d.escape,R=d.findClosingBracket;function C(Se,ye,Te){var Y=ye.href,W=ye.title?E(ye.title):null,X=Se[1].replace(/\\([\[\]])/g,"$1");return Se[0].charAt(0)!=="!"?{type:"link",raw:Te,href:Y,title:W,text:X}:{type:"image",raw:Te,href:Y,title:W,text:E(X)}}function N(Se,ye){var Te=Se.match(/^(\s+)(?:```)/);if(Te===null)return ye;var Y=Te[1];return ye.split(`
|
|
`).map(function(W){var X=W.match(/^\s+/);if(X===null)return W;var ie=X[0];return ie.length>=Y.length?W.slice(Y.length):W}).join(`
|
|
`)}var K=function(){function Se(Te){this.options=Te||T}var ye=Se.prototype;return ye.space=function(Y){var W=this.rules.block.newline.exec(Y);if(W)return W[0].length>1?{type:"space",raw:W[0]}:{raw:`
|
|
`}},ye.code=function(Y){var W=this.rules.block.code.exec(Y);if(W){var X=W[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:W[0],codeBlockStyle:"indented",text:this.options.pedantic?X:b(X,`
|
|
`)}}},ye.fences=function(Y){var W=this.rules.block.fences.exec(Y);if(W){var X=W[0],ie=N(X,W[3]||"");return{type:"code",raw:X,lang:W[2]?W[2].trim():W[2],text:ie}}},ye.heading=function(Y){var W=this.rules.block.heading.exec(Y);if(W){var X=W[2].trim();if(/#$/.test(X)){var ie=b(X,"#");(this.options.pedantic||!ie||/ $/.test(ie))&&(X=ie.trim())}return{type:"heading",raw:W[0],depth:W[1].length,text:X}}},ye.nptable=function(Y){var W=this.rules.block.nptable.exec(Y);if(W){var X={type:"table",header:v(W[1].replace(/^ *| *\| *$/g,"")),align:W[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:W[3]?W[3].replace(/\n$/,"").split(`
|
|
`):[],raw:W[0]};if(X.header.length===X.align.length){var ie=X.align.length,Q;for(Q=0;Q<ie;Q++)/^ *-+: *$/.test(X.align[Q])?X.align[Q]="right":/^ *:-+: *$/.test(X.align[Q])?X.align[Q]="center":/^ *:-+ *$/.test(X.align[Q])?X.align[Q]="left":X.align[Q]=null;for(ie=X.cells.length,Q=0;Q<ie;Q++)X.cells[Q]=v(X.cells[Q],X.header.length);return X}}},ye.hr=function(Y){var W=this.rules.block.hr.exec(Y);if(W)return{type:"hr",raw:W[0]}},ye.blockquote=function(Y){var W=this.rules.block.blockquote.exec(Y);if(W){var X=W[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:W[0],text:X}}},ye.list=function(Y){var W=this.rules.block.list.exec(Y);if(W){var X=W[0],ie=W[2],Q=ie.length>1,de={type:"list",raw:X,ordered:Q,start:Q?+ie.slice(0,-1):"",loose:!1,items:[]},ve=W[0].match(this.rules.block.item),Ke=!1,We,ct,at,nt,et,St,mt,Tt,Pt,Xe=ve.length;at=this.rules.block.listItemStart.exec(ve[0]);for(var st=0;st<Xe;st++){if(We=ve[st],X=We,this.options.pedantic||(Pt=We.match(new RegExp("\\n\\s*\\n {0,"+(at[0].length-1)+"}\\S")),Pt&&(et=We.length-Pt.index+ve.slice(st+1).join(`
|
|
`).length,de.raw=de.raw.substring(0,de.raw.length-et),We=We.substring(0,Pt.index),X=We,Xe=st+1)),st!==Xe-1){if(nt=this.rules.block.listItemStart.exec(ve[st+1]),this.options.pedantic?nt[1].length>at[1].length:nt[1].length>=at[0].length||nt[1].length>3){ve.splice(st,2,ve[st]+(!this.options.pedantic&&nt[1].length<at[0].length&&!ve[st].match(/\n$/)?"":`
|
|
`)+ve[st+1]),st--,Xe--;continue}else(!this.options.pedantic||this.options.smartLists?nt[2][nt[2].length-1]!==ie[ie.length-1]:Q===(nt[2].length===1))&&(et=ve.slice(st+1).join(`
|
|
`).length,de.raw=de.raw.substring(0,de.raw.length-et),st=Xe-1);at=nt}ct=We.length,We=We.replace(/^ *([*+-]|\d+[.)]) ?/,""),~We.indexOf(`
|
|
`)&&(ct-=We.length,We=this.options.pedantic?We.replace(/^ {1,4}/gm,""):We.replace(new RegExp("^ {1,"+ct+"}","gm"),"")),We=b(We,`
|
|
`),st!==Xe-1&&(X=X+`
|
|
`),St=Ke||/\n\n(?!\s*$)/.test(X),st!==Xe-1&&(Ke=X.slice(-2)===`
|
|
|
|
`,St||(St=Ke)),St&&(de.loose=!0),this.options.gfm&&(mt=/^\[[ xX]\] /.test(We),Tt=void 0,mt&&(Tt=We[1]!==" ",We=We.replace(/^\[[ xX]\] +/,""))),de.items.push({type:"list_item",raw:X,task:mt,checked:Tt,loose:St,text:We})}return de}},ye.html=function(Y){var W=this.rules.block.html.exec(Y);if(W)return{type:this.options.sanitize?"paragraph":"html",raw:W[0],pre:!this.options.sanitizer&&(W[1]==="pre"||W[1]==="script"||W[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(W[0]):E(W[0]):W[0]}},ye.def=function(Y){var W=this.rules.block.def.exec(Y);if(W){W[3]&&(W[3]=W[3].substring(1,W[3].length-1));var X=W[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:X,raw:W[0],href:W[2],title:W[3]}}},ye.table=function(Y){var W=this.rules.block.table.exec(Y);if(W){var X={type:"table",header:v(W[1].replace(/^ *| *\| *$/g,"")),align:W[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:W[3]?W[3].replace(/\n$/,"").split(`
|
|
`):[]};if(X.header.length===X.align.length){X.raw=W[0];var ie=X.align.length,Q;for(Q=0;Q<ie;Q++)/^ *-+: *$/.test(X.align[Q])?X.align[Q]="right":/^ *:-+: *$/.test(X.align[Q])?X.align[Q]="center":/^ *:-+ *$/.test(X.align[Q])?X.align[Q]="left":X.align[Q]=null;for(ie=X.cells.length,Q=0;Q<ie;Q++)X.cells[Q]=v(X.cells[Q].replace(/^ *\| *| *\| *$/g,""),X.header.length);return X}}},ye.lheading=function(Y){var W=this.rules.block.lheading.exec(Y);if(W)return{type:"heading",raw:W[0],depth:W[2].charAt(0)==="="?1:2,text:W[1]}},ye.paragraph=function(Y){var W=this.rules.block.paragraph.exec(Y);if(W)return{type:"paragraph",raw:W[0],text:W[1].charAt(W[1].length-1)===`
|
|
`?W[1].slice(0,-1):W[1]}},ye.text=function(Y){var W=this.rules.block.text.exec(Y);if(W)return{type:"text",raw:W[0],text:W[0]}},ye.escape=function(Y){var W=this.rules.inline.escape.exec(Y);if(W)return{type:"escape",raw:W[0],text:E(W[1])}},ye.tag=function(Y,W,X){var ie=this.rules.inline.tag.exec(Y);if(ie)return!W&&/^<a /i.test(ie[0])?W=!0:W&&/^<\/a>/i.test(ie[0])&&(W=!1),!X&&/^<(pre|code|kbd|script)(\s|>)/i.test(ie[0])?X=!0:X&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ie[0])&&(X=!1),{type:this.options.sanitize?"text":"html",raw:ie[0],inLink:W,inRawBlock:X,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):E(ie[0]):ie[0]}},ye.link=function(Y){var W=this.rules.inline.link.exec(Y);if(W){var X=W[2].trim();if(!this.options.pedantic&&/^</.test(X)){if(!/>$/.test(X))return;var ie=b(X.slice(0,-1),"\\");if((X.length-ie.length)%2===0)return}else{var Q=R(W[2],"()");if(Q>-1){var de=W[0].indexOf("!")===0?5:4,ve=de+W[1].length+Q;W[2]=W[2].substring(0,Q),W[0]=W[0].substring(0,ve).trim(),W[3]=""}}var Ke=W[2],We="";if(this.options.pedantic){var ct=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ke);ct&&(Ke=ct[1],We=ct[3])}else We=W[3]?W[3].slice(1,-1):"";return Ke=Ke.trim(),/^</.test(Ke)&&(this.options.pedantic&&!/>$/.test(X)?Ke=Ke.slice(1):Ke=Ke.slice(1,-1)),C(W,{href:Ke&&Ke.replace(this.rules.inline._escapes,"$1"),title:We&&We.replace(this.rules.inline._escapes,"$1")},W[0])}},ye.reflink=function(Y,W){var X;if((X=this.rules.inline.reflink.exec(Y))||(X=this.rules.inline.nolink.exec(Y))){var ie=(X[2]||X[1]).replace(/\s+/g," ");if(ie=W[ie.toLowerCase()],!ie||!ie.href){var Q=X[0].charAt(0);return{type:"text",raw:Q,text:Q}}return C(X,ie,X[0])}},ye.emStrong=function(Y,W,X){X===void 0&&(X="");var ie=this.rules.inline.emStrong.lDelim.exec(Y);if(ie&&!(ie[3]&&X.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var Q=ie[1]||ie[2]||"";if(!Q||Q&&(X===""||this.rules.inline.punctuation.exec(X))){var de=ie[0].length-1,ve,Ke,We=de,ct=0,at=ie[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(at.lastIndex=0,W=W.slice(-1*Y.length+de);(ie=at.exec(W))!=null;)if(ve=ie[1]||ie[2]||ie[3]||ie[4]||ie[5]||ie[6],!!ve){if(Ke=ve.length,ie[3]||ie[4]){We+=Ke;continue}else if((ie[5]||ie[6])&&de%3&&!((de+Ke)%3)){ct+=Ke;continue}if(We-=Ke,!(We>0))return Ke=Math.min(Ke,Ke+We+ct),Math.min(de,Ke)%2?{type:"em",raw:Y.slice(0,de+ie.index+Ke+1),text:Y.slice(1,de+ie.index+Ke)}:{type:"strong",raw:Y.slice(0,de+ie.index+Ke+1),text:Y.slice(2,de+ie.index+Ke-1)}}}}},ye.codespan=function(Y){var W=this.rules.inline.code.exec(Y);if(W){var X=W[2].replace(/\n/g," "),ie=/[^ ]/.test(X),Q=/^ /.test(X)&&/ $/.test(X);return ie&&Q&&(X=X.substring(1,X.length-1)),X=E(X,!0),{type:"codespan",raw:W[0],text:X}}},ye.br=function(Y){var W=this.rules.inline.br.exec(Y);if(W)return{type:"br",raw:W[0]}},ye.del=function(Y){var W=this.rules.inline.del.exec(Y);if(W)return{type:"del",raw:W[0],text:W[2]}},ye.autolink=function(Y,W){var X=this.rules.inline.autolink.exec(Y);if(X){var ie,Q;return X[2]==="@"?(ie=E(this.options.mangle?W(X[1]):X[1]),Q="mailto:"+ie):(ie=E(X[1]),Q=ie),{type:"link",raw:X[0],text:ie,href:Q,tokens:[{type:"text",raw:ie,text:ie}]}}},ye.url=function(Y,W){var X;if(X=this.rules.inline.url.exec(Y)){var ie,Q;if(X[2]==="@")ie=E(this.options.mangle?W(X[0]):X[0]),Q="mailto:"+ie;else{var de;do de=X[0],X[0]=this.rules.inline._backpedal.exec(X[0])[0];while(de!==X[0]);ie=E(X[0]),X[1]==="www."?Q="http://"+ie:Q=ie}return{type:"link",raw:X[0],text:ie,href:Q,tokens:[{type:"text",raw:ie,text:ie}]}}},ye.inlineText=function(Y,W,X){var ie=this.rules.inline.text.exec(Y);if(ie){var Q;return W?Q=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):E(ie[0]):ie[0]:Q=E(this.options.smartypants?X(ie[0]):ie[0]),{type:"text",raw:ie[0],text:Q}}},Se}(),H=d.noopTest,ee=d.edit,J=d.merge,se={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:H,table:H,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};se._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,se.def=ee(se.def).replace("label",se._label).replace("title",se._title).getRegex(),se.bullet=/(?:[*+-]|\d{1,9}[.)])/,se.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,se.item=ee(se.item,"gm").replace(/bull/g,se.bullet).getRegex(),se.listItemStart=ee(/^( *)(bull) */).replace("bull",se.bullet).getRegex(),se.list=ee(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex(),se._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",se._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,se.html=ee(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),se.paragraph=ee(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.blockquote=ee(se.blockquote).replace("paragraph",se.paragraph).getRegex(),se.normal=J({},se),se.gfm=J({},se.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),se.gfm.nptable=ee(se.gfm.nptable).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.gfm.table=ee(se.gfm.table).replace("hr",se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",se._tag).getRegex(),se.pedantic=J({},se.normal,{html:ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:H,paragraph:ee(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:H,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:H,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};G._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",G.punctuation=ee(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,G.escapedEmSt=/\\\*|\\_/g,G._comment=ee(se._comment).replace("(?:-->|$)","-->").getRegex(),G.emStrong.lDelim=ee(G.emStrong.lDelim).replace(/punct/g,G._punctuation).getRegex(),G.emStrong.rDelimAst=ee(G.emStrong.rDelimAst,"g").replace(/punct/g,G._punctuation).getRegex(),G.emStrong.rDelimUnd=ee(G.emStrong.rDelimUnd,"g").replace(/punct/g,G._punctuation).getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,G.autolink=ee(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=ee(G.tag).replace("comment",G._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=ee(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=ee(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=ee(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=J({},G),G.pedantic=J({},G.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ee(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=J({},G.normal,{escape:ee(G.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),G.gfm.url=ee(G.gfm.url,"i").replace("email",G.gfm._extended_email).getRegex(),G.breaks=J({},G.gfm,{br:ee(G.br).replace("{2,}","*").getRegex(),text:ee(G.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Ee={block:se,inline:G},ge=K,Pe=U.exports.defaults,Ne=Ee.block,$e=Ee.inline,je=d.repeatString;function Ce(Se){return Se.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function fe(Se){var ye="",Te,Y,W=Se.length;for(Te=0;Te<W;Te++)Y=Se.charCodeAt(Te),Math.random()>.5&&(Y="x"+Y.toString(16)),ye+="&#"+Y+";";return ye}var Be=function(){function Se(Te){this.tokens=[],this.tokens.links=Object.create(null),this.options=Te||Pe,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Y={block:Ne.normal,inline:$e.normal};this.options.pedantic?(Y.block=Ne.pedantic,Y.inline=$e.pedantic):this.options.gfm&&(Y.block=Ne.gfm,this.options.breaks?Y.inline=$e.breaks:Y.inline=$e.gfm),this.tokenizer.rules=Y}Se.lex=function(Y,W){var X=new Se(W);return X.lex(Y)},Se.lexInline=function(Y,W){var X=new Se(W);return X.inlineTokens(Y)};var ye=Se.prototype;return ye.lex=function(Y){return Y=Y.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(Y,this.tokens,!0),this.inline(this.tokens),this.tokens},ye.blockTokens=function(Y,W,X){var ie=this;W===void 0&&(W=[]),X===void 0&&(X=!0),this.options.pedantic&&(Y=Y.replace(/^ +$/gm,""));for(var Q,de,ve,Ke,We,ct;Y;){var at,nt,et;if(!((at=this.options)!=null&&(nt=at.extensions)!=null&&nt.block&&this.options.extensions.block.some(function(mt){return(Q=mt.call(ie,Y,W))?(Y=Y.substring(Q.raw.length),W.push(Q),!0):!1}))){if(Q=this.tokenizer.space(Y)){Y=Y.substring(Q.raw.length),Q.type&&W.push(Q);continue}if(Q=this.tokenizer.code(Y)){Y=Y.substring(Q.raw.length),Ke=W[W.length-1],Ke&&Ke.type==="paragraph"?(Ke.raw+=`
|
|
`+Q.raw,Ke.text+=`
|
|
`+Q.text):W.push(Q);continue}if(Q=this.tokenizer.fences(Y)){Y=Y.substring(Q.raw.length),W.push(Q);continue}if(Q=this.tokenizer.heading(Y)){Y=Y.substring(Q.raw.length),W.push(Q);continue}if(Q=this.tokenizer.nptable(Y)){Y=Y.substring(Q.raw.length),W.push(Q);continue}if(Q=this.tokenizer.hr(Y)){Y=Y.substring(Q.raw.length),W.push(Q);continue}if(Q=this.tokenizer.blockquote(Y)){Y=Y.substring(Q.raw.length),Q.tokens=this.blockTokens(Q.text,[],X),W.push(Q);continue}if(Q=this.tokenizer.list(Y)){for(Y=Y.substring(Q.raw.length),ve=Q.items.length,de=0;de<ve;de++)Q.items[de].tokens=this.blockTokens(Q.items[de].text,[],!1);W.push(Q);continue}if(Q=this.tokenizer.html(Y)){Y=Y.substring(Q.raw.length),W.push(Q);continue}if(X&&(Q=this.tokenizer.def(Y))){Y=Y.substring(Q.raw.length),this.tokens.links[Q.tag]||(this.tokens.links[Q.tag]={href:Q.href,title:Q.title});continue}if(Q=this.tokenizer.table(Y)){Y=Y.substring(Q.raw.length),W.push(Q);continue}if(Q=this.tokenizer.lheading(Y)){Y=Y.substring(Q.raw.length),W.push(Q);continue}if(We=Y,(et=this.options.extensions)!=null&&et.startBlock&&function(){var mt=1/0,Tt=Y.slice(1),Pt=void 0;ie.options.extensions.startBlock.forEach(function(Xe){Pt=Xe.call(this,Tt),typeof Pt=="number"&&Pt>=0&&(mt=Math.min(mt,Pt))}),mt<1/0&&mt>=0&&(We=Y.substring(0,mt+1))}(),X&&(Q=this.tokenizer.paragraph(We))){Ke=W[W.length-1],ct&&Ke.type==="paragraph"?(Ke.raw+=`
|
|
`+Q.raw,Ke.text+=`
|
|
`+Q.text):W.push(Q),ct=We.length!==Y.length,Y=Y.substring(Q.raw.length);continue}if(Q=this.tokenizer.text(Y)){Y=Y.substring(Q.raw.length),Ke=W[W.length-1],Ke&&Ke.type==="text"?(Ke.raw+=`
|
|
`+Q.raw,Ke.text+=`
|
|
`+Q.text):W.push(Q);continue}if(Y){var St="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(St);break}else throw new Error(St)}}}return W},ye.inline=function(Y){var W,X,ie,Q,de,ve,Ke=Y.length;for(W=0;W<Ke;W++)switch(ve=Y[W],ve.type){case"paragraph":case"text":case"heading":{ve.tokens=[],this.inlineTokens(ve.text,ve.tokens);break}case"table":{for(ve.tokens={header:[],cells:[]},Q=ve.header.length,X=0;X<Q;X++)ve.tokens.header[X]=[],this.inlineTokens(ve.header[X],ve.tokens.header[X]);for(Q=ve.cells.length,X=0;X<Q;X++)for(de=ve.cells[X],ve.tokens.cells[X]=[],ie=0;ie<de.length;ie++)ve.tokens.cells[X][ie]=[],this.inlineTokens(de[ie],ve.tokens.cells[X][ie]);break}case"blockquote":{this.inline(ve.tokens);break}case"list":{for(Q=ve.items.length,X=0;X<Q;X++)this.inline(ve.items[X].tokens);break}}return Y},ye.inlineTokens=function(Y,W,X,ie){var Q=this;W===void 0&&(W=[]),X===void 0&&(X=!1),ie===void 0&&(ie=!1);var de,ve,Ke,We=Y,ct,at,nt;if(this.tokens.links){var et=Object.keys(this.tokens.links);if(et.length>0)for(;(ct=this.tokenizer.rules.inline.reflinkSearch.exec(We))!=null;)et.includes(ct[0].slice(ct[0].lastIndexOf("[")+1,-1))&&(We=We.slice(0,ct.index)+"["+je("a",ct[0].length-2)+"]"+We.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ct=this.tokenizer.rules.inline.blockSkip.exec(We))!=null;)We=We.slice(0,ct.index)+"["+je("a",ct[0].length-2)+"]"+We.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ct=this.tokenizer.rules.inline.escapedEmSt.exec(We))!=null;)We=We.slice(0,ct.index)+"++"+We.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;Y;){var St,mt,Tt;if(at||(nt=""),at=!1,!((St=this.options)!=null&&(mt=St.extensions)!=null&&mt.inline&&this.options.extensions.inline.some(function(Xe){return(de=Xe.call(Q,Y,W))?(Y=Y.substring(de.raw.length),W.push(de),!0):!1}))){if(de=this.tokenizer.escape(Y)){Y=Y.substring(de.raw.length),W.push(de);continue}if(de=this.tokenizer.tag(Y,X,ie)){Y=Y.substring(de.raw.length),X=de.inLink,ie=de.inRawBlock,ve=W[W.length-1],ve&&de.type==="text"&&ve.type==="text"?(ve.raw+=de.raw,ve.text+=de.text):W.push(de);continue}if(de=this.tokenizer.link(Y)){Y=Y.substring(de.raw.length),de.type==="link"&&(de.tokens=this.inlineTokens(de.text,[],!0,ie)),W.push(de);continue}if(de=this.tokenizer.reflink(Y,this.tokens.links)){Y=Y.substring(de.raw.length),ve=W[W.length-1],de.type==="link"?(de.tokens=this.inlineTokens(de.text,[],!0,ie),W.push(de)):ve&&de.type==="text"&&ve.type==="text"?(ve.raw+=de.raw,ve.text+=de.text):W.push(de);continue}if(de=this.tokenizer.emStrong(Y,We,nt)){Y=Y.substring(de.raw.length),de.tokens=this.inlineTokens(de.text,[],X,ie),W.push(de);continue}if(de=this.tokenizer.codespan(Y)){Y=Y.substring(de.raw.length),W.push(de);continue}if(de=this.tokenizer.br(Y)){Y=Y.substring(de.raw.length),W.push(de);continue}if(de=this.tokenizer.del(Y)){Y=Y.substring(de.raw.length),de.tokens=this.inlineTokens(de.text,[],X,ie),W.push(de);continue}if(de=this.tokenizer.autolink(Y,fe)){Y=Y.substring(de.raw.length),W.push(de);continue}if(!X&&(de=this.tokenizer.url(Y,fe))){Y=Y.substring(de.raw.length),W.push(de);continue}if(Ke=Y,(Tt=this.options.extensions)!=null&&Tt.startInline&&function(){var Xe=1/0,st=Y.slice(1),Rt=void 0;Q.options.extensions.startInline.forEach(function(jt){Rt=jt.call(this,st),typeof Rt=="number"&&Rt>=0&&(Xe=Math.min(Xe,Rt))}),Xe<1/0&&Xe>=0&&(Ke=Y.substring(0,Xe+1))}(),de=this.tokenizer.inlineText(Ke,ie,Ce)){Y=Y.substring(de.raw.length),de.raw.slice(-1)!=="_"&&(nt=de.raw.slice(-1)),at=!0,ve=W[W.length-1],ve&&ve.type==="text"?(ve.raw+=de.raw,ve.text+=de.text):W.push(de);continue}if(Y){var Pt="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(Pt);break}else throw new Error(Pt)}}}return W},B(Se,null,[{key:"rules",get:function(){return{block:Ne,inline:$e}}}]),Se}(),Ue=U.exports.defaults,re=d.cleanUrl,Z=d.escape,le=function(){function Se(Te){this.options=Te||Ue}var ye=Se.prototype;return ye.code=function(Y,W,X){var ie=(W||"").match(/\S*/)[0];if(this.options.highlight){var Q=this.options.highlight(Y,ie);Q!=null&&Q!==Y&&(X=!0,Y=Q)}return Y=Y.replace(/\n$/,"")+`
|
|
`,ie?'<pre><code class="'+this.options.langPrefix+Z(ie,!0)+'">'+(X?Y:Z(Y,!0))+`</code></pre>
|
|
`:"<pre><code>"+(X?Y:Z(Y,!0))+`</code></pre>
|
|
`},ye.blockquote=function(Y){return`<blockquote>
|
|
`+Y+`</blockquote>
|
|
`},ye.html=function(Y){return Y},ye.heading=function(Y,W,X,ie){return this.options.headerIds?"<h"+W+' id="'+this.options.headerPrefix+ie.slug(X)+'">'+Y+"</h"+W+`>
|
|
`:"<h"+W+">"+Y+"</h"+W+`>
|
|
`},ye.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ye.list=function(Y,W,X){var ie=W?"ol":"ul",Q=W&&X!==1?' start="'+X+'"':"";return"<"+ie+Q+`>
|
|
`+Y+"</"+ie+`>
|
|
`},ye.listitem=function(Y){return"<li>"+Y+`</li>
|
|
`},ye.checkbox=function(Y){return"<input "+(Y?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ye.paragraph=function(Y){return"<p>"+Y+`</p>
|
|
`},ye.table=function(Y,W){return W&&(W="<tbody>"+W+"</tbody>"),`<table>
|
|
<thead>
|
|
`+Y+`</thead>
|
|
`+W+`</table>
|
|
`},ye.tablerow=function(Y){return`<tr>
|
|
`+Y+`</tr>
|
|
`},ye.tablecell=function(Y,W){var X=W.header?"th":"td",ie=W.align?"<"+X+' align="'+W.align+'">':"<"+X+">";return ie+Y+"</"+X+`>
|
|
`},ye.strong=function(Y){return"<strong>"+Y+"</strong>"},ye.em=function(Y){return"<em>"+Y+"</em>"},ye.codespan=function(Y){return"<code>"+Y+"</code>"},ye.br=function(){return this.options.xhtml?"<br/>":"<br>"},ye.del=function(Y){return"<del>"+Y+"</del>"},ye.link=function(Y,W,X){if(Y=re(this.options.sanitize,this.options.baseUrl,Y),Y===null)return X;var ie='<a href="'+Z(Y)+'"';return W&&(ie+=' title="'+W+'"'),ie+=">"+X+"</a>",ie},ye.image=function(Y,W,X){if(Y=re(this.options.sanitize,this.options.baseUrl,Y),Y===null)return X;var ie='<img src="'+Y+'" alt="'+X+'"';return W&&(ie+=' title="'+W+'"'),ie+=this.options.xhtml?"/>":">",ie},ye.text=function(Y){return Y},Se}(),we=function(){function Se(){}var ye=Se.prototype;return ye.strong=function(Y){return Y},ye.em=function(Y){return Y},ye.codespan=function(Y){return Y},ye.del=function(Y){return Y},ye.html=function(Y){return Y},ye.text=function(Y){return Y},ye.link=function(Y,W,X){return""+X},ye.image=function(Y,W,X){return""+X},ye.br=function(){return""},Se}(),ue=function(){function Se(){this.seen={}}var ye=Se.prototype;return ye.serialize=function(Y){return Y.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},ye.getNextSafeSlug=function(Y,W){var X=Y,ie=0;if(this.seen.hasOwnProperty(X)){ie=this.seen[Y];do ie++,X=Y+"-"+ie;while(this.seen.hasOwnProperty(X))}return W||(this.seen[Y]=ie,this.seen[X]=0),X},ye.slug=function(Y,W){W===void 0&&(W={});var X=this.serialize(Y);return this.getNextSafeSlug(X,W.dryrun)},Se}(),pe=le,ae=we,_e=ue,ce=U.exports.defaults,he=d.unescape,Le=function(){function Se(Te){this.options=Te||ce,this.options.renderer=this.options.renderer||new pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ae,this.slugger=new _e}Se.parse=function(Y,W){var X=new Se(W);return X.parse(Y)},Se.parseInline=function(Y,W){var X=new Se(W);return X.parseInline(Y)};var ye=Se.prototype;return ye.parse=function(Y,W){W===void 0&&(W=!0);var X="",ie,Q,de,ve,Ke,We,ct,at,nt,et,St,mt,Tt,Pt,Xe,st,Rt,jt,qt,Ar=Y.length;for(ie=0;ie<Ar;ie++){var jr,Cr;if(et=Y[ie],(jr=this.options.extensions)!=null&&(Cr=jr.renderers)!=null&&Cr[et.type]&&(qt=this.options.extensions.renderers[et.type].call(this,et),qt!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(et.type))){X+=qt||"";continue}switch(et.type){case"space":continue;case"hr":{X+=this.renderer.hr();continue}case"heading":{X+=this.renderer.heading(this.parseInline(et.tokens),et.depth,he(this.parseInline(et.tokens,this.textRenderer)),this.slugger);continue}case"code":{X+=this.renderer.code(et.text,et.lang,et.escaped);continue}case"table":{for(at="",ct="",ve=et.header.length,Q=0;Q<ve;Q++)ct+=this.renderer.tablecell(this.parseInline(et.tokens.header[Q]),{header:!0,align:et.align[Q]});for(at+=this.renderer.tablerow(ct),nt="",ve=et.cells.length,Q=0;Q<ve;Q++){for(We=et.tokens.cells[Q],ct="",Ke=We.length,de=0;de<Ke;de++)ct+=this.renderer.tablecell(this.parseInline(We[de]),{header:!1,align:et.align[de]});nt+=this.renderer.tablerow(ct)}X+=this.renderer.table(at,nt);continue}case"blockquote":{nt=this.parse(et.tokens),X+=this.renderer.blockquote(nt);continue}case"list":{for(St=et.ordered,mt=et.start,Tt=et.loose,ve=et.items.length,nt="",Q=0;Q<ve;Q++)Xe=et.items[Q],st=Xe.checked,Rt=Xe.task,Pt="",Xe.task&&(jt=this.renderer.checkbox(st),Tt?Xe.tokens.length>0&&Xe.tokens[0].type==="text"?(Xe.tokens[0].text=jt+" "+Xe.tokens[0].text,Xe.tokens[0].tokens&&Xe.tokens[0].tokens.length>0&&Xe.tokens[0].tokens[0].type==="text"&&(Xe.tokens[0].tokens[0].text=jt+" "+Xe.tokens[0].tokens[0].text)):Xe.tokens.unshift({type:"text",text:jt}):Pt+=jt),Pt+=this.parse(Xe.tokens,Tt),nt+=this.renderer.listitem(Pt,Rt,st);X+=this.renderer.list(nt,St,mt);continue}case"html":{X+=this.renderer.html(et.text);continue}case"paragraph":{X+=this.renderer.paragraph(this.parseInline(et.tokens));continue}case"text":{for(nt=et.tokens?this.parseInline(et.tokens):et.text;ie+1<Ar&&Y[ie+1].type==="text";)et=Y[++ie],nt+=`
|
|
`+(et.tokens?this.parseInline(et.tokens):et.text);X+=W?this.renderer.paragraph(nt):nt;continue}default:{var lr='Token with "'+et.type+'" type was not found.';if(this.options.silent){console.error(lr);return}else throw new Error(lr)}}}return X},ye.parseInline=function(Y,W){W=W||this.renderer;var X="",ie,Q,de,ve=Y.length;for(ie=0;ie<ve;ie++){var Ke,We;if(Q=Y[ie],(Ke=this.options.extensions)!=null&&(We=Ke.renderers)!=null&&We[Q.type]&&(de=this.options.extensions.renderers[Q.type].call(this,Q),de!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(Q.type))){X+=de||"";continue}switch(Q.type){case"escape":{X+=W.text(Q.text);break}case"html":{X+=W.html(Q.text);break}case"link":{X+=W.link(Q.href,Q.title,this.parseInline(Q.tokens,W));break}case"image":{X+=W.image(Q.href,Q.title,Q.text);break}case"strong":{X+=W.strong(this.parseInline(Q.tokens,W));break}case"em":{X+=W.em(this.parseInline(Q.tokens,W));break}case"codespan":{X+=W.codespan(Q.text);break}case"br":{X+=W.br();break}case"del":{X+=W.del(this.parseInline(Q.tokens,W));break}case"text":{X+=W.text(Q.text);break}default:{var ct='Token with "'+Q.type+'" type was not found.';if(this.options.silent){console.error(ct);return}else throw new Error(ct)}}}return X},Se}(),Ye=Be,ke=Le,be=K,Re=le,Fe=we,Ae=ue,Me=d.merge,rt=d.checkSanitizeDeprecation,lt=d.escape,Ze=U.exports.getDefaults,ft=U.exports.changeDefaults,Et=U.exports.defaults;function qe(Se,ye,Te){if(typeof Se=="undefined"||Se===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Se!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Se)+", string expected");if(typeof ye=="function"&&(Te=ye,ye=null),ye=Me({},qe.defaults,ye||{}),rt(ye),Te){var Y=ye.highlight,W;try{W=Ye.lex(Se,ye)}catch(de){return Te(de)}var X=function(ve){var Ke;if(!ve)try{ye.walkTokens&&qe.walkTokens(W,ye.walkTokens),Ke=ke.parse(W,ye)}catch(We){ve=We}return ye.highlight=Y,ve?Te(ve):Te(null,Ke)};if(!Y||Y.length<3||(delete ye.highlight,!W.length))return X();var ie=0;qe.walkTokens(W,function(de){de.type==="code"&&(ie++,setTimeout(function(){Y(de.text,de.lang,function(ve,Ke){if(ve)return X(ve);Ke!=null&&Ke!==de.text&&(de.text=Ke,de.escaped=!0),ie--,ie===0&&X()})},0))}),ie===0&&X();return}try{var Q=Ye.lex(Se,ye);return ye.walkTokens&&qe.walkTokens(Q,ye.walkTokens),ke.parse(Q,ye)}catch(de){if(de.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ye.silent)return"<p>An error occurred:</p><pre>"+lt(de.message+"",!0)+"</pre>";throw de}}qe.options=qe.setOptions=function(Se){return Me(qe.defaults,Se),ft(qe.defaults),qe},qe.getDefaults=Ze,qe.defaults=Et,qe.use=function(){for(var Se=this,ye=arguments.length,Te=new Array(ye),Y=0;Y<ye;Y++)Te[Y]=arguments[Y];var W=Me.apply(void 0,[{}].concat(Te)),X=qe.defaults.extensions||{renderers:{},childTokens:{}},ie;Te.forEach(function(Q){if(Q.extensions&&(ie=!0,Q.extensions.forEach(function(ve){if(!ve.name)throw new Error("extension name required");if(ve.renderer){var Ke,We=(Ke=X.renderers)==null?void 0:Ke[ve.name];We?X.renderers[ve.name]=function(){for(var ct=arguments.length,at=new Array(ct),nt=0;nt<ct;nt++)at[nt]=arguments[nt];var et=ve.renderer.apply(this,at);return et===!1&&(et=We.apply(this,at)),et}:X.renderers[ve.name]=ve.renderer}if(ve.tokenizer){if(!ve.level||ve.level!=="block"&&ve.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");X[ve.level]?X[ve.level].unshift(ve.tokenizer):X[ve.level]=[ve.tokenizer],ve.start&&(ve.level==="block"?X.startBlock?X.startBlock.push(ve.start):X.startBlock=[ve.start]:ve.level==="inline"&&(X.startInline?X.startInline.push(ve.start):X.startInline=[ve.start]))}ve.childTokens&&(X.childTokens[ve.name]=ve.childTokens)})),Q.renderer&&function(){var ve=qe.defaults.renderer||new Re,Ke=function(at){var nt=ve[at];ve[at]=function(){for(var et=arguments.length,St=new Array(et),mt=0;mt<et;mt++)St[mt]=arguments[mt];var Tt=Q.renderer[at].apply(ve,St);return Tt===!1&&(Tt=nt.apply(ve,St)),Tt}};for(var We in Q.renderer)Ke(We);W.renderer=ve}(),Q.tokenizer&&function(){var ve=qe.defaults.tokenizer||new be,Ke=function(at){var nt=ve[at];ve[at]=function(){for(var et=arguments.length,St=new Array(et),mt=0;mt<et;mt++)St[mt]=arguments[mt];var Tt=Q.tokenizer[at].apply(ve,St);return Tt===!1&&(Tt=nt.apply(ve,St)),Tt}};for(var We in Q.tokenizer)Ke(We);W.tokenizer=ve}(),Q.walkTokens){var de=qe.defaults.walkTokens;W.walkTokens=function(ve){Q.walkTokens.call(Se,ve),de&&de(ve)}}ie&&(W.extensions=X),qe.setOptions(W)})},qe.walkTokens=function(Se,ye){for(var Te=function(){var ie=W.value;switch(ye(ie),ie.type){case"table":{for(var Q=te(ie.tokens.header),de;!(de=Q()).done;){var ve=de.value;qe.walkTokens(ve,ye)}for(var Ke=te(ie.tokens.cells),We;!(We=Ke()).done;)for(var ct=We.value,at=te(ct),nt;!(nt=at()).done;){var et=nt.value;qe.walkTokens(et,ye)}break}case"list":{qe.walkTokens(ie.items,ye);break}default:{var St,mt,Tt,Pt,Xe;if((St=qe.defaults)!=null&&(mt=St.extensions)!=null&&(Tt=mt.childTokens)!=null&&Tt[ie.type]){var st;(st=qe.defaults)==null||st.extensions.childTokens[ie.type].forEach(function(Rt){qe.walkTokens(ie[Rt],ye)})}ie.tokens&&!((Pt=qe.defaults)!=null&&(Xe=Pt.extensions)!=null&&Xe.childTokens[ie.type])&&qe.walkTokens(ie.tokens,ye)}}},Y=te(Se),W;!(W=Y()).done;)Te()},qe.parseInline=function(Se,ye){if(typeof Se=="undefined"||Se===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Se!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Se)+", string expected");ye=Me({},qe.defaults,ye||{}),rt(ye);try{var Te=Ye.lexInline(Se,ye);return ye.walkTokens&&qe.walkTokens(Te,ye.walkTokens),ke.parseInline(Te,ye)}catch(Y){if(Y.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ye.silent)return"<p>An error occurred:</p><pre>"+lt(Y.message+"",!0)+"</pre>";throw Y}},qe.Parser=ke,qe.parser=ke.parse,qe.Renderer=Re,qe.TextRenderer=Fe,qe.Lexer=Ye,qe.lexer=Ye.lex,qe.Tokenizer=be,qe.Slugger=Ae,qe.parse=qe;var pt=qe;return pt})},90621:function(Ct){const Qe=/[&<>"']/,B=/[&<>"']/g,z=/[<>"']|&(?!#?\w+;)/,oe=/[<>"']|&(?!#?\w+;)/g,te={"&":"&","<":"<",">":">",'"':""","'":"'"},U=f=>te[f];function L(f,_){if(_){if(Qe.test(f))return f.replace(B,U)}else if(z.test(f))return f.replace(oe,U);return f}const M=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function P(f){return f.replace(M,(_,A)=>(A=A.toLowerCase(),A==="colon"?":":A.charAt(0)==="#"?A.charAt(1)==="x"?String.fromCharCode(parseInt(A.substring(2),16)):String.fromCharCode(+A.substring(1)):""))}const k=/(^|[^\[])\^/g;function e(f,_){f=f.source||f,_=_||"";const A={replace:(x,w)=>(w=w.source||w,w=w.replace(k,"$1"),f=f.replace(x,w),A),getRegex:()=>new RegExp(f,_)};return A}const O=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function l(f,_,A){if(f){let x;try{x=decodeURIComponent(P(A)).replace(O,"").toLowerCase()}catch(w){return null}if(x.indexOf("javascript:")===0||x.indexOf("vbscript:")===0||x.indexOf("data:")===0)return null}_&&!D.test(A)&&(A=c(_,A));try{A=encodeURI(A).replace(/%25/g,"%")}catch(x){return null}return A}const p={},h=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(f,_){p[" "+f]||(h.test(f)?p[" "+f]=f+"/":p[" "+f]=i(f,"/",!0)),f=p[" "+f];const A=f.indexOf(":")===-1;return _.substring(0,2)==="//"?A?_:f.replace(g,"$1")+_:_.charAt(0)==="/"?A?_:f.replace(o,"$1")+_:f+_}const y={exec:function(){}};function u(f){let _=1,A,x;for(;_<arguments.length;_++){A=arguments[_];for(x in A)Object.prototype.hasOwnProperty.call(A,x)&&(f[x]=A[x])}return f}function s(f,_){const A=f.replace(/\|/g,(n,a,r)=>{let d=!1,T=a;for(;--T>=0&&r[T]==="\\";)d=!d;return d?"|":" |"}),x=A.split(/ \|/);let w=0;if(x.length>_)x.splice(_);else for(;x.length<_;)x.push("");for(;w<x.length;w++)x[w]=x[w].trim().replace(/\\\|/g,"|");return x}function i(f,_,A){const x=f.length;if(x===0)return"";let w=0;for(;w<x;){const n=f.charAt(x-w-1);if(n===_&&!A)w++;else if(n!==_&&A)w++;else break}return f.substr(0,x-w)}function t(f,_){if(f.indexOf(_[1])===-1)return-1;const A=f.length;let x=0,w=0;for(;w<A;w++)if(f[w]==="\\")w++;else if(f[w]===_[0])x++;else if(f[w]===_[1]&&(x--,x<0))return w;return-1}function m(f){f&&f.sanitize&&!f.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function S(f,_){if(_<1)return"";let A="";for(;_>1;)_&1&&(A+=f),_>>=1,f+=f;return A+f}Ct.exports={escape:L,unescape:P,edit:e,cleanUrl:l,resolveUrl:c,noopTest:y,merge:u,splitCells:s,rtrim:i,findClosingBracket:t,checkSanitizeDeprecation:m,repeatString:S}},74741:function(Ct,Qe,B){"use strict";B.d(Qe,{Wi:function(){return M},Z0:function(){return P},aU:function(){return L},eZ:function(){return e},wY:function(){return k}});var z=B(4669),oe=B(9917),te=B(63580),U=function(O,D,l,p){function h(g){return g instanceof l?g:new l(function(o){o(g)})}return new(l||(l=Promise))(function(g,o){function c(s){try{u(p.next(s))}catch(i){o(i)}}function y(s){try{u(p.throw(s))}catch(i){o(i)}}function u(s){s.done?g(s.value):h(s.value).then(c,y)}u((p=p.apply(O,D||[])).next())})};class L extends oe.JT{constructor(D,l="",p="",h=!0,g){super(),this._onDidChange=this._register(new z.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=D,this._label=l,this._cssClass=p,this._enabled=h,this._actionCallback=g}get id(){return this._id}get label(){return this._label}set label(D){this._setLabel(D)}_setLabel(D){this._label!==D&&(this._label=D,this._onDidChange.fire({label:D}))}get tooltip(){return this._tooltip||""}set tooltip(D){this._setTooltip(D)}_setTooltip(D){this._tooltip!==D&&(this._tooltip=D,this._onDidChange.fire({tooltip:D}))}get class(){return this._cssClass}set class(D){this._setClass(D)}_setClass(D){this._cssClass!==D&&(this._cssClass=D,this._onDidChange.fire({class:D}))}get enabled(){return this._enabled}set enabled(D){this._setEnabled(D)}_setEnabled(D){this._enabled!==D&&(this._enabled=D,this._onDidChange.fire({enabled:D}))}get checked(){return this._checked}set checked(D){this._setChecked(D)}_setChecked(D){this._checked!==D&&(this._checked=D,this._onDidChange.fire({checked:D}))}run(D,l){return U(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(D))})}}class M extends oe.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new z.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new z.Q5),this.onDidRun=this._onDidRun.event}run(D,l){return U(this,void 0,void 0,function*(){if(!D.enabled)return;this._onBeforeRun.fire({action:D});let p;try{yield this.runAction(D,l)}catch(h){p=h}this._onDidRun.fire({action:D,error:p})})}runAction(D,l){return U(this,void 0,void 0,function*(){yield D.run(l)})}}class P extends L{constructor(D){super(P.ID,D,D?"separator text":"separator"),this.checked=!1,this.enabled=!1}}P.ID="vs.actions.separator";class k{constructor(D,l,p,h){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=D,this.label=l,this.class=h,this._actions=p}get actions(){return this._actions}dispose(){}run(){return U(this,void 0,void 0,function*(){})}}class e extends L{constructor(){super(e.ID,te.N("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},35146:function(Ct,Qe,B){"use strict";B.d(Qe,{ok:function(){return z}});function z(oe,te){if(!oe)throw new Error(te?`Assertion failed (${te})`:"Assertion Failed")}},73046:function(Ct,Qe,B){"use strict";B.d(Qe,{CM:function(){return L},JL:function(){return M},dT:function(){return k},fK:function(){return U},lA:function(){return P}});var z=B(4669);class oe{constructor(){this._icons=new Map,this._onDidRegister=new z.Q5}add(O){const D=this._icons.get(O.id);D?O.description?D.description=O.description:console.error(`Duplicate registration of codicon ${O.id}`):(this._icons.set(O.id,O),this._onDidRegister.fire(O))}get(O){return this._icons.get(O)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const te=new oe,U=te;function L(e,O){return new P(e,O)}function M(e){return e?e.replace(/\$\((.*?)\)/g,(O,D)=>` ${D} `).trim():""}class P{constructor(O,D,l){this.id=O,this.definition=D,this.description=l,te.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var k;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const O=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function D(h){if(h instanceof P)return["codicon","codicon-"+h.id];const g=O.exec(h.id);if(!g)return D(P.error);let[,o,c]=g;const y=["codicon","codicon-"+o];return c&&y.push("codicon-modifier-"+c.substr(1)),y}e.asClassNameArray=D;function l(h){return D(h).join(" ")}e.asClassName=l;function p(h){return"."+D(h).join(".")}e.asCSSSelector=p})(k||(k={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(P||(P={}))},17301:function(Ct,Qe,B){"use strict";B.d(Qe,{B8:function(){return D},Cp:function(){return U},F0:function(){return k},L6:function(){return O},VV:function(){return P},b1:function(){return e},dL:function(){return te},ri:function(){return L}});class z{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(p){setTimeout(()=>{throw p.stack?new Error(p.message+`
|
|
|
|
`+p.stack):p},0)}}emit(p){this.listeners.forEach(h=>{h(p)})}onUnexpectedError(p){this.unexpectedErrorHandler(p),this.emit(p)}onUnexpectedExternalError(p){this.unexpectedErrorHandler(p)}}const oe=new z;function te(l){P(l)||oe.onUnexpectedError(l)}function U(l){P(l)||oe.onUnexpectedExternalError(l)}function L(l){if(l instanceof Error){let{name:p,message:h}=l;const g=l.stacktrace||l.stack;return{$isError:!0,name:p,message:h,stack:g}}return l}const M="Canceled";function P(l){return l instanceof Error&&l.name===M&&l.message===M}function k(){const l=new Error(M);return l.name=l.message,l}function e(l){return l?new Error(`Illegal argument: ${l}`):new Error("Illegal argument")}function O(l){return l?new Error(`Illegal state: ${l}`):new Error("Illegal state")}class D extends Error{constructor(p){super("NotSupported"),p&&(this.message=p)}}},4669:function(Ct,Qe,B){"use strict";B.d(Qe,{D0:function(){return D},E7:function(){return l},K3:function(){return O},Q5:function(){return e},ZD:function(){return p},ju:function(){return L}});var z=B(17301),oe=B(9917),te=B(91741),U=B(84013),L;(function(h){h.None=()=>oe.JT.None;function g(r){return(d,T=null,b)=>{let v=!1,E;return E=r(R=>{if(!v)return E?E.dispose():v=!0,d.call(T,R)},null,b),v&&E.dispose(),E}}h.once=g;function o(r,d){return t((T,b=null,v)=>r(E=>T.call(b,d(E)),null,v))}h.map=o;function c(r,d){return t((T,b=null,v)=>r(E=>{d(E),T.call(b,E)},null,v))}h.forEach=c;function y(r,d){return t((T,b=null,v)=>r(E=>d(E)&&T.call(b,E),null,v))}h.filter=y;function u(r){return r}h.signal=u;function s(...r){return(d,T=null,b)=>(0,oe.F8)(...r.map(v=>v(E=>d.call(T,E),null,b)))}h.any=s;function i(r,d,T){let b=T;return o(r,v=>(b=d(b,v),b))}h.reduce=i;function t(r){let d;const T=new e({onFirstListenerAdd(){d=r(T.fire,T)},onLastListenerRemove(){d.dispose()}});return T.event}function m(r,d,T=100,b=!1,v){let E,R,C,N=0;const K=new e({leakWarningThreshold:v,onFirstListenerAdd(){E=r(H=>{N++,R=d(R,H),b&&!C&&(K.fire(R),R=void 0),clearTimeout(C),C=setTimeout(()=>{const ee=R;R=void 0,C=void 0,(!b||N>1)&&K.fire(ee),N=0},T)})},onLastListenerRemove(){E.dispose()}});return K.event}h.debounce=m;function S(r,d=(T,b)=>T===b){let T=!0,b;return y(r,v=>{const E=T||!d(v,b);return T=!1,b=v,E})}h.latch=S;function f(r,d){return[h.filter(r,d),h.filter(r,T=>!d(T))]}h.split=f;function _(r,d=!1,T=[]){let b=T.slice(),v=r(C=>{b?b.push(C):R.fire(C)});const E=()=>{b&&b.forEach(C=>R.fire(C)),b=null},R=new e({onFirstListenerAdd(){v||(v=r(C=>R.fire(C)))},onFirstListenerDidAdd(){b&&(d?setTimeout(E):E())},onLastListenerRemove(){v&&v.dispose(),v=null}});return R.event}h.buffer=_;class A{constructor(d){this.event=d}map(d){return new A(o(this.event,d))}forEach(d){return new A(c(this.event,d))}filter(d){return new A(y(this.event,d))}reduce(d,T){return new A(i(this.event,d,T))}latch(){return new A(S(this.event))}debounce(d,T=100,b=!1,v){return new A(m(this.event,d,T,b,v))}on(d,T,b){return this.event(d,T,b)}once(d,T,b){return g(this.event)(d,T,b)}}function x(r){return new A(r)}h.chain=x;function w(r,d,T=b=>b){const b=(...C)=>R.fire(T(...C)),v=()=>r.on(d,b),E=()=>r.removeListener(d,b),R=new e({onFirstListenerAdd:v,onLastListenerRemove:E});return R.event}h.fromNodeEventEmitter=w;function n(r,d,T=b=>b){const b=(...C)=>R.fire(T(...C)),v=()=>r.addEventListener(d,b),E=()=>r.removeEventListener(d,b),R=new e({onFirstListenerAdd:v,onLastListenerRemove:E});return R.event}h.fromDOMEventEmitter=n;function a(r){return new Promise(d=>g(r)(d))}h.toPromise=a})(L||(L={}));class M{constructor(g){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${g}_${M._idPool++}`}start(g){this._stopWatch=new U.G(!0),this._listenerCount=g}stop(){if(this._stopWatch){const g=this._stopWatch.elapsed();this._elapsedOverall+=g,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${g.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}M._idPool=0;let P=-1;class k{constructor(g,o=Math.random().toString(18).slice(2,5)){this.customThreshold=g,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(g){let o=P;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||g<o)return;this._stacks||(this._stacks=new Map);const c=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),y=this._stacks.get(c)||0;if(this._stacks.set(c,y+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let u,s=0;for(const[i,t]of this._stacks)(!u||s<t)&&(u=i,s=t);console.warn(`[${this.name}] potential listener LEAK detected, having ${g} listeners already. MOST frequent listener (${s}):`),console.warn(u)}return()=>{const u=this._stacks.get(c)||0;this._stacks.set(c,u-1)}}}class e{constructor(g){var o;this._disposed=!1,this._options=g,this._leakageMon=P>0?new k(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((o=this._options)===null||o===void 0)&&o._profName?new M(this._options._profName):void 0}get event(){return this._event||(this._event=(g,o,c)=>{var y;this._listeners||(this._listeners=new te.S);const u=this._listeners.isEmpty();u&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(o?[g,o]:g);u&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,g,o);const i=(y=this._leakageMon)===null||y===void 0?void 0:y.check(this._listeners.size),t=(0,oe.OF)(()=>{i&&i(),this._disposed||(s(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return c instanceof oe.SL?c.add(t):Array.isArray(c)&&c.push(t),t}),this._event}fire(g){var o,c;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new te.S);for(let y of this._listeners)this._deliveryQueue.push([y,g]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[y,u]=this._deliveryQueue.shift();try{typeof y=="function"?y.call(void 0,u):y[0].call(y[1],u)}catch(s){(0,z.dL)(s)}}(c=this._perfMon)===null||c===void 0||c.stop()}}dispose(){var g,o,c,y,u;this._disposed||(this._disposed=!0,(g=this._listeners)===null||g===void 0||g.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(y=(c=this._options)===null||c===void 0?void 0:c.onLastListenerRemove)===null||y===void 0||y.call(c),(u=this._leakageMon)===null||u===void 0||u.dispose())}}class O extends e{constructor(g){super(g),this._isPaused=0,this._eventQueue=new te.S,this._mergeFn=g==null?void 0:g.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const g=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(g))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(g){this._listeners&&(this._isPaused!==0?this._eventQueue.push(g):super.fire(g))}}class D extends O{constructor(g){var o;super(g),this._delay=(o=g.delay)!==null&&o!==void 0?o:100}fire(g){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(g)}}class l{constructor(){this.buffers=[]}wrapEvent(g){return(o,c,y)=>g(u=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>o.call(c,u)):o.call(c,u)},void 0,y)}bufferEvents(g){const o=[];this.buffers.push(o);const c=g();return this.buffers.pop(),o.forEach(y=>y()),c}}class p{constructor(){this.listening=!1,this.inputEvent=L.None,this.inputEventListener=oe.JT.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(g){this.inputEvent=g,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=g(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},88289:function(Ct,Qe,B){"use strict";B.d(Qe,{I:function(){return z}});function z(oe){const te=this;let U=!1,L;return function(){return U||(U=!0,L=oe.apply(te,arguments)),L}}},53725:function(Ct,Qe,B){"use strict";B.d(Qe,{$:function(){return z}});var z;(function(oe){function te(s){return s&&typeof s=="object"&&typeof s[Symbol.iterator]=="function"}oe.is=te;const U=Object.freeze([]);function L(){return U}oe.empty=L;function*M(s){yield s}oe.single=M;function P(s){return s||U}oe.from=P;function k(s){return!s||s[Symbol.iterator]().next().done===!0}oe.isEmpty=k;function e(s){return s[Symbol.iterator]().next().value}oe.first=e;function O(s,i){for(const t of s)if(i(t))return!0;return!1}oe.some=O;function D(s,i){for(const t of s)if(i(t))return t}oe.find=D;function*l(s,i){for(const t of s)i(t)&&(yield t)}oe.filter=l;function*p(s,i){let t=0;for(const m of s)yield i(m,t++)}oe.map=p;function*h(...s){for(const i of s)for(const t of i)yield t}oe.concat=h;function*g(s){for(const i of s)for(const t of i)yield t}oe.concatNested=g;function o(s,i,t){let m=t;for(const S of s)m=i(m,S);return m}oe.reduce=o;function*c(s,i,t=s.length){for(i<0&&(i+=s.length),t<0?t+=s.length:t>s.length&&(t=s.length);i<t;i++)yield s[i]}oe.slice=c;function y(s,i=Number.POSITIVE_INFINITY){const t=[];if(i===0)return[t,s];const m=s[Symbol.iterator]();for(let S=0;S<i;S++){const f=m.next();if(f.done)return[t,oe.empty()];t.push(f.value)}return[t,{[Symbol.iterator](){return m}}]}oe.consume=y;function u(s,i,t=(m,S)=>m===S){const m=s[Symbol.iterator](),S=i[Symbol.iterator]();for(;;){const f=m.next(),_=S.next();if(f.done!==_.done)return!1;if(f.done)return!0;if(!t(f.value,_.value))return!1}}oe.equals=u})(z||(z={}))},9917:function(Ct,Qe,B){"use strict";B.d(Qe,{B9:function(){return p},F8:function(){return h},JT:function(){return c},Jz:function(){return u},OF:function(){return g},SL:function(){return o},Wf:function(){return l},XK:function(){return y},dk:function(){return O}});var z=B(88289),oe=B(53725);const te=!1;let U=null;function L(s){U=s}if(te){const s="__is_disposable_tracked__";L(new class{trackDisposable(i){const t=new Error("Potentially leaked disposable").stack;setTimeout(()=>{i[s]||console.log(t)},3e3)}setParent(i,t){if(i&&i!==c.None)try{i[s]=!0}catch(m){}}markAsDisposed(i){if(i&&i!==c.None)try{i[s]=!0}catch(t){}}markAsSingleton(i){}})}function M(s){return U==null||U.trackDisposable(s),s}function P(s){U==null||U.markAsDisposed(s)}function k(s,i){U==null||U.setParent(s,i)}function e(s,i){if(U)for(const t of s)U.setParent(t,i)}function O(s){return U==null||U.markAsSingleton(s),s}class D extends Error{constructor(i){super(`Encountered errors while disposing of store. Errors: [${i.join(", ")}]`),this.errors=i}}function l(s){return typeof s.dispose=="function"&&s.dispose.length===0}function p(s){if(oe.$.is(s)){let i=[];for(const t of s)if(t)try{t.dispose()}catch(m){i.push(m)}if(i.length===1)throw i[0];if(i.length>1)throw new D(i);return Array.isArray(s)?[]:s}else if(s)return s.dispose(),s}function h(...s){const i=g(()=>p(s));return e(s,i),i}function g(s){const i=M({dispose:(0,z.I)(()=>{P(i),s()})});return i}class o{constructor(){this._toDispose=new Set,this._isDisposed=!1,M(this)}dispose(){this._isDisposed||(P(this),this._isDisposed=!0,this.clear())}clear(){try{p(this._toDispose.values())}finally{this._toDispose.clear()}}add(i){if(!i)return i;if(i===this)throw new Error("Cannot register a disposable on itself!");return k(i,this),this._isDisposed?o.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(i),i}}o.DISABLE_DISPOSED_WARNING=!1;class c{constructor(){this._store=new o,M(this),k(this._store,this)}dispose(){P(this),this._store.dispose()}_register(i){if(i===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(i)}}c.None=Object.freeze({dispose(){}});class y{constructor(){this._isDisposed=!1,M(this)}get value(){return this._isDisposed?void 0:this._value}set value(i){var t;this._isDisposed||i===this._value||((t=this._value)===null||t===void 0||t.dispose(),i&&k(i,this),this._value=i)}clear(){this.value=void 0}dispose(){var i;this._isDisposed=!0,P(this),(i=this._value)===null||i===void 0||i.dispose(),this._value=void 0}clearAndLeak(){const i=this._value;return this._value=void 0,i&&k(i,null),i}}class u{constructor(i){this.object=i}dispose(){}}},91741:function(Ct,Qe,B){"use strict";B.d(Qe,{S:function(){return oe}});class z{constructor(U){this.element=U,this.next=z.Undefined,this.prev=z.Undefined}}z.Undefined=new z(void 0);class oe{constructor(){this._first=z.Undefined,this._last=z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===z.Undefined}clear(){let U=this._first;for(;U!==z.Undefined;){const L=U.next;U.prev=z.Undefined,U.next=z.Undefined,U=L}this._first=z.Undefined,this._last=z.Undefined,this._size=0}unshift(U){return this._insert(U,!1)}push(U){return this._insert(U,!0)}_insert(U,L){const M=new z(U);if(this._first===z.Undefined)this._first=M,this._last=M;else if(L){const k=this._last;this._last=M,M.prev=k,k.next=M}else{const k=this._first;this._first=M,M.next=k,k.prev=M}this._size+=1;let P=!1;return()=>{P||(P=!0,this._remove(M))}}shift(){if(this._first!==z.Undefined){const U=this._first.element;return this._remove(this._first),U}}pop(){if(this._last!==z.Undefined){const U=this._last.element;return this._remove(this._last),U}}_remove(U){if(U.prev!==z.Undefined&&U.next!==z.Undefined){const L=U.prev;L.next=U.next,U.next.prev=L}else U.prev===z.Undefined&&U.next===z.Undefined?(this._first=z.Undefined,this._last=z.Undefined):U.next===z.Undefined?(this._last=this._last.prev,this._last.next=z.Undefined):U.prev===z.Undefined&&(this._first=this._first.next,this._first.prev=z.Undefined);this._size-=1}*[Symbol.iterator](){let U=this._first;for(;U!==z.Undefined;)yield U.element,U=U.next}}},1432:function(Ct,Qe,B){"use strict";B.d(Qe,{$L:function(){return m},ED:function(){return u},IJ:function(){return i},OS:function(){return A},WE:function(){return f},dz:function(){return s},gn:function(){return S},li:function(){return g},r:function(){return n},tY:function(){return t},xS:function(){return _}});var z=B(34155),oe;const te="en";let U=!1,L=!1,M=!1,P=!1,k=!1,e=!1,O=!1,D,l=null,p=null,h;const g=typeof self=="object"?self:typeof B.g=="object"?B.g:{};let o;typeof g.vscode!="undefined"&&typeof g.vscode.process!="undefined"?o=g.vscode.process:typeof z!="undefined"&&(o=z);const c=typeof((oe=o==null?void 0:o.versions)===null||oe===void 0?void 0:oe.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!c)h=navigator.userAgent,U=h.indexOf("Windows")>=0,L=h.indexOf("Macintosh")>=0,O=(h.indexOf("Macintosh")>=0||h.indexOf("iPad")>=0||h.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,M=h.indexOf("Linux")>=0,e=!0,D=navigator.language,l=D;else if(typeof o=="object"){U=o.platform==="win32",L=o.platform==="darwin",M=o.platform==="linux",P=M&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,D=te,l=te;const a=o.env.VSCODE_NLS_CONFIG;if(a)try{const r=JSON.parse(a),d=r.availableLanguages["*"];D=r.locale,l=d||te,p=r._translationsConfigFile}catch(r){}k=!0}else console.error("Unable to resolve platform.");let y=0;L?y=1:U?y=3:M&&(y=2);const u=U,s=L,i=M,t=k,m=e,S=O,f=h,_=function(){if(g.setImmediate)return g.setImmediate.bind(g);if(typeof g.postMessage=="function"&&!g.importScripts){let d=[];g.addEventListener("message",b=>{if(b.data&&b.data.vscodeSetImmediateId)for(let v=0,E=d.length;v<E;v++){const R=d[v];if(R.id===b.data.vscodeSetImmediateId){d.splice(v,1),R.callback();return}}});let T=0;return b=>{const v=++T;d.push({id:v,callback:b}),g.postMessage({vscodeSetImmediateId:v},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const r=Promise.resolve();return d=>r.then(d)}(),A=L||O?2:U?1:3;let x=!0,w=!1;function n(){if(!w){w=!0;const a=new Uint8Array(2);a[0]=1,a[1]=2,x=new Uint16Array(a.buffer)[0]===513}return x}},84013:function(Ct,Qe,B){"use strict";B.d(Qe,{G:function(){return te}});var z=B(1432);const oe=z.li.performance&&typeof z.li.performance.now=="function";class te{constructor(L){this._highResolution=oe&&L,this._startTime=this._now(),this._stopTime=-1}static create(L=!0){return new te(L)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?z.li.performance.now():Date.now()}}},97295:function(Ct,Qe,B){"use strict";B.d(Qe,{$i:function(){return N},C8:function(){return se},GF:function(){return D},HO:function(){return T},IO:function(){return l},K7:function(){return J},Kw:function(){return ge},LC:function(){return g},Mh:function(){return _},P1:function(){return A},PJ:function(){return Pe},Qe:function(){return K},R1:function(){return O},RP:function(){return R},S6:function(){return Ne},TT:function(){return u},Ut:function(){return v},V8:function(){return o},WU:function(){return te},YK:function(){return w},YU:function(){return U},ZG:function(){return x},ZH:function(){return a},ab:function(){return H},c1:function(){return G},df:function(){return m},ec:function(){return L},fi:function(){return $e},fy:function(){return M},j3:function(){return P},j_:function(){return i},m5:function(){return z},mK:function(){return t},mr:function(){return p},oH:function(){return fe},oL:function(){return k},ok:function(){return f},ow:function(){return c},qq:function(){return S},qu:function(){return y},rL:function(){return n},uS:function(){return Ee},un:function(){return e},uq:function(){return h},vH:function(){return d},xe:function(){return ee},zY:function(){return s}});function z(Z){return!Z||typeof Z!="string"?!0:Z.trim().length===0}const oe=/{(\d+)}/g;function te(Z,...le){return le.length===0?Z:Z.replace(oe,function(we,ue){const pe=parseInt(ue,10);return isNaN(pe)||pe<0||pe>=le.length?we:le[pe]})}function U(Z){return Z.replace(/[<>&]/g,function(le){switch(le){case"<":return"<";case">":return">";case"&":return"&";default:return le}})}function L(Z){return Z.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function M(Z,le=" "){const we=P(Z,le);return k(we,le)}function P(Z,le){if(!Z||!le)return Z;const we=le.length;if(we===0||Z.length===0)return Z;let ue=0;for(;Z.indexOf(le,ue)===ue;)ue=ue+we;return Z.substring(ue)}function k(Z,le){if(!Z||!le)return Z;const we=le.length,ue=Z.length;if(we===0||ue===0)return Z;let pe=ue,ae=-1;for(;ae=Z.lastIndexOf(le,pe-1),!(ae===-1||ae+we!==pe);){if(ae===0)return"";pe=ae}return Z.substring(0,pe)}function e(Z){return Z.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function O(Z){return Z.replace(/\*/g,"")}function D(Z,le,we={}){if(!Z)throw new Error("Cannot create regex from empty string");le||(Z=L(Z)),we.wholeWord&&(/\B/.test(Z.charAt(0))||(Z="\\b"+Z),/\B/.test(Z.charAt(Z.length-1))||(Z=Z+"\\b"));let ue="";return we.global&&(ue+="g"),we.matchCase||(ue+="i"),we.multiline&&(ue+="m"),we.unicode&&(ue+="u"),new RegExp(Z,ue)}function l(Z){return Z.source==="^"||Z.source==="^$"||Z.source==="$"||Z.source==="^\\s*$"?!1:!!(Z.exec("")&&Z.lastIndex===0)}function p(Z){return(Z.global?"g":"")+(Z.ignoreCase?"i":"")+(Z.multiline?"m":"")+(Z.unicode?"u":"")}function h(Z){return Z.split(/\r\n|\r|\n/)}function g(Z){for(let le=0,we=Z.length;le<we;le++){const ue=Z.charCodeAt(le);if(ue!==32&&ue!==9)return le}return-1}function o(Z,le=0,we=Z.length){for(let ue=le;ue<we;ue++){const pe=Z.charCodeAt(ue);if(pe!==32&&pe!==9)return Z.substring(le,ue)}return Z.substring(le,we)}function c(Z,le=Z.length-1){for(let we=le;we>=0;we--){const ue=Z.charCodeAt(we);if(ue!==32&&ue!==9)return we}return-1}function y(Z,le){return Z<le?-1:Z>le?1:0}function u(Z,le,we=0,ue=Z.length,pe=0,ae=le.length){for(;we<ue&&pe<ae;we++,pe++){let he=Z.charCodeAt(we),Le=le.charCodeAt(pe);if(he<Le)return-1;if(he>Le)return 1}const _e=ue-we,ce=ae-pe;return _e<ce?-1:_e>ce?1:0}function s(Z,le){return i(Z,le,0,Z.length,0,le.length)}function i(Z,le,we=0,ue=Z.length,pe=0,ae=le.length){for(;we<ue&&pe<ae;we++,pe++){let he=Z.charCodeAt(we),Le=le.charCodeAt(pe);if(he===Le)continue;if(he>=128||Le>=128)return u(Z.toLowerCase(),le.toLowerCase(),we,ue,pe,ae);t(he)&&(he-=32),t(Le)&&(Le-=32);const Ye=he-Le;if(Ye!==0)return Ye}const _e=ue-we,ce=ae-pe;return _e<ce?-1:_e>ce?1:0}function t(Z){return Z>=97&&Z<=122}function m(Z){return Z>=65&&Z<=90}function S(Z,le){return Z.length===le.length&&i(Z,le)===0}function f(Z,le){const we=le.length;return le.length>Z.length?!1:i(Z,le,0,we)===0}function _(Z,le){let we,ue=Math.min(Z.length,le.length);for(we=0;we<ue;we++)if(Z.charCodeAt(we)!==le.charCodeAt(we))return we;return ue}function A(Z,le){let we,ue=Math.min(Z.length,le.length);const pe=Z.length-1,ae=le.length-1;for(we=0;we<ue;we++)if(Z.charCodeAt(pe-we)!==le.charCodeAt(ae-we))return we;return ue}function x(Z){return 55296<=Z&&Z<=56319}function w(Z){return 56320<=Z&&Z<=57343}function n(Z,le){return(Z-55296<<10)+(le-56320)+65536}function a(Z,le,we){const ue=Z.charCodeAt(we);if(x(ue)&&we+1<le){const pe=Z.charCodeAt(we+1);if(w(pe))return n(ue,pe)}return ue}function r(Z,le){const we=Z.charCodeAt(le-1);if(w(we)&&le>1){const ue=Z.charCodeAt(le-2);if(x(ue))return n(ue,we)}return we}function d(Z,le){const we=je.getInstance(),ue=le,pe=Z.length,ae=a(Z,pe,le);le+=ae>=65536?2:1;let _e=we.getGraphemeBreakType(ae);for(;le<pe;){const ce=a(Z,pe,le),he=we.getGraphemeBreakType(ce);if($e(_e,he))break;le+=ce>=65536?2:1,_e=he}return le-ue}function T(Z,le){const we=je.getInstance(),ue=le,pe=r(Z,le);le-=pe>=65536?2:1;let ae=we.getGraphemeBreakType(pe);for(;le>0;){const _e=r(Z,le),ce=we.getGraphemeBreakType(_e);if($e(ce,ae))break;le-=_e>=65536?2:1,ae=ce}return ue-le}const b=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function v(Z){return b.test(Z)}const E=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function R(Z){return E.test(Z)}const C=/^[\t\n\r\x20-\x7E]*$/;function N(Z){return C.test(Z)}const K=/[\u2028\u2029]/;function H(Z){return K.test(Z)}function ee(Z){for(let le=0,we=Z.length;le<we;le++)if(J(Z.charCodeAt(le)))return!0;return!1}function J(Z){return Z=+Z,Z>=11904&&Z<=55215||Z>=63744&&Z<=64255||Z>=65281&&Z<=65374}function se(Z){return Z>=127462&&Z<=127487||Z===8986||Z===8987||Z===9200||Z===9203||Z>=9728&&Z<=10175||Z===11088||Z===11093||Z>=127744&&Z<=128591||Z>=128640&&Z<=128764||Z>=128992&&Z<=129003||Z>=129280&&Z<=129535||Z>=129648&&Z<=129750}const G="\uFEFF";function Ee(Z){return!!(Z&&Z.length>0&&Z.charCodeAt(0)===65279)}function ge(Z,le=!1){return Z?(le&&(Z=Z.replace(/\\./g,"")),Z.toLowerCase()!==Z):!1}function Pe(Z){return Z=Z%(2*26),Z<26?String.fromCharCode(97+Z):String.fromCharCode(65+Z-26)}function Ne(Z){return je.getInstance().getGraphemeBreakType(Z)}function $e(Z,le){return Z===0?le!==5&&le!==7:Z===2&&le===3?!1:Z===4||Z===2||Z===3||le===4||le===2||le===3?!0:!(Z===8&&(le===8||le===9||le===11||le===12)||(Z===11||Z===9)&&(le===9||le===10)||(Z===12||Z===10)&&le===10||le===5||le===13||le===7||Z===1||Z===13&&le===14||Z===6&&le===6)}class je{constructor(){this._data=Ce()}static getInstance(){return je._INSTANCE||(je._INSTANCE=new je),je._INSTANCE}getGraphemeBreakType(le){if(le<32)return le===10?3:le===13?2:4;if(le<127)return 0;const we=this._data,ue=we.length/3;let pe=1;for(;pe<=ue;)if(le<we[3*pe])pe=2*pe;else if(le>we[3*pe+1])pe=2*pe+1;else return we[3*pe+2];return 0}}je._INSTANCE=null;function Ce(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function fe(Z,le){if(Z===0)return 0;const we=Be(Z,le);if(we!==void 0)return we;const ue=r(le,Z);return Z-=Ue(ue),Z}function Be(Z,le){let we=r(le,Z);for(Z-=Ue(we);re(we)||we===65039||we===8419;){if(Z===0)return;we=r(le,Z),Z-=Ue(we)}if(se(we)){if(Z>=0){const ue=r(le,Z);ue===8205&&(Z-=Ue(ue))}return Z}}function Ue(Z){return Z>=65536?2:1}function re(Z){return 127995<=Z&&Z<=127999}},98401:function(Ct,Qe,B){"use strict";B.d(Qe,{$E:function(){return g},$K:function(){return P},D8:function(){return l},HD:function(){return oe},IU:function(){return o},Jp:function(){return k},Kn:function(){return te},cW:function(){return O},f6:function(){return c},hj:function(){return U},jn:function(){return L},kJ:function(){return z},mf:function(){return D},o8:function(){return M},p_:function(){return e},vE:function(){return y}});function z(u){return Array.isArray(u)}function oe(u){return typeof u=="string"}function te(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)&&!(u instanceof RegExp)&&!(u instanceof Date)}function U(u){return typeof u=="number"&&!isNaN(u)}function L(u){return u===!0||u===!1}function M(u){return typeof u=="undefined"}function P(u){return!k(u)}function k(u){return M(u)||u===null}function e(u,s){if(!u)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function O(u){if(k(u))throw new Error("Assertion Failed: argument is undefined or null");return u}function D(u){return typeof u=="function"}function l(u,s){const i=Math.min(u.length,s.length);for(let t=0;t<i;t++)p(u[t],s[t])}function p(u,s){if(oe(s)){if(typeof u!==s)throw new Error(`argument does not match constraint: typeof ${s}`)}else if(D(s)){try{if(u instanceof s)return}catch(i){}if(!k(u)&&u.constructor===s||s.length===1&&s.call(void 0,u)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function h(u){let s=[],i=Object.getPrototypeOf(u);for(;Object.prototype!==i;)s=s.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return s}function g(u){const s=[];for(const i of h(u))typeof u[i]=="function"&&s.push(i);return s}function o(u,s){const i=m=>function(){const S=Array.prototype.slice.call(arguments,0);return s(m,S)};let t={};for(const m of u)t[m]=i(m);return t}function c(u){return u===null?void 0:u}function y(u,s="Unreachable"){throw new Error(s)}},63580:function(Ct,Qe,B){"use strict";B.d(Qe,{N:function(){return oe}});function z(te,U){let L;return U.length===0?L=te:L=te.replace(/\{(\d+)\}/g,function(M,P){const k=P[0];return typeof U[k]!="undefined"?U[k]:M}),L}function oe(te,U,...L){return z(U,L)}},84144:function(Ct,Qe,B){"use strict";B.d(Qe,{BH:function(){return o},NZ:function(){return c},U8:function(){return y},co:function(){return g},eH:function(){return h},vr:function(){return p}});var z=B(74741),oe=B(73046),te=B(4669),U=B(53725),L=B(9917),M=B(91741),P=B(94565),k=B(38819),e=B(72065),O=B(97781),D=function(u,s,i,t){var m=arguments.length,S=m<3?s:t===null?t=Object.getOwnPropertyDescriptor(s,i):t,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(u,s,i,t);else for(var _=u.length-1;_>=0;_--)(f=u[_])&&(S=(m<3?f(S):m>3?f(s,i,S):f(s,i))||S);return m>3&&S&&Object.defineProperty(s,i,S),S},l=function(u,s){return function(i,t){s(i,t,u)}};function p(u){return u.command!==void 0}class h{constructor(s){this.id=h._idPool++,this._debugName=s}}h._idPool=0,h.CommandPalette=new h("CommandPalette"),h.EditorContext=new h("EditorContext"),h.SimpleEditorContext=new h("SimpleEditorContext"),h.EditorContextCopy=new h("EditorContextCopy"),h.EditorContextPeek=new h("EditorContextPeek"),h.MenubarEditMenu=new h("MenubarEditMenu"),h.MenubarCopy=new h("MenubarCopy"),h.MenubarGoMenu=new h("MenubarGoMenu"),h.MenubarSelectionMenu=new h("MenubarSelectionMenu"),h.InlineCompletionsActions=new h("InlineCompletionsActions");const g=(0,e.yh)("menuService"),o=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new te.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:u=>u===h.CommandPalette}}addCommand(u){return this.addCommands(U.$.single(u))}addCommands(u){for(const s of u)this._commands.set(s.id,s);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,L.OF)(()=>{let s=!1;for(const i of u)s=this._commands.delete(i.id)||s;s&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(u){return this._commands.get(u)}getCommands(){const u=new Map;return this._commands.forEach((s,i)=>u.set(i,s)),u}appendMenuItem(u,s){return this.appendMenuItems(U.$.single({id:u,item:s}))}appendMenuItems(u){const s=new Set,i=new M.S;for(const{id:t,item:m}of u){let S=this._menuItems.get(t);S||(S=new M.S,this._menuItems.set(t,S)),i.push(S.push(m)),s.add(t)}return this._onDidChangeMenu.fire(s),(0,L.OF)(()=>{if(i.size>0){for(let t of i)t();this._onDidChangeMenu.fire(s),i.clear()}})}getMenuItems(u){let s;return this._menuItems.has(u)?s=[...this._menuItems.get(u)]:s=[],u===h.CommandPalette&&this._appendImplicitItems(s),s}_appendImplicitItems(u){const s=new Set;for(const i of u)p(i)&&(s.add(i.command.id),i.alt&&s.add(i.alt.id));this._commands.forEach((i,t)=>{s.has(t)||u.push({command:i})})}};class c extends z.wY{constructor(s,i,t,m){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu"),this.item=s,this._menuService=i,this._contextKeyService=t,this._options=m}get actions(){const s=[],i=this._menuService.createMenu(this.item.submenu,this._contextKeyService),t=i.getActions(this._options);i.dispose();for(const[,m]of t)m.length>0&&(s.push(...m),s.push(new z.Z0));return s.length&&s.pop(),s}}let y=class vo{constructor(s,i,t,m,S){var f,_;if(this._commandService=S,this.id=s.id,this.label=t!=null&&t.renderShortTitle&&s.shortTitle?typeof s.shortTitle=="string"?s.shortTitle:s.shortTitle.value:typeof s.title=="string"?s.title:s.title.value,this.tooltip=(_=typeof s.tooltip=="string"?s.tooltip:(f=s.tooltip)===null||f===void 0?void 0:f.value)!==null&&_!==void 0?_:"",this.enabled=!s.precondition||m.contextMatchesRules(s.precondition),this.checked=void 0,s.toggled){const A=s.toggled.condition?s.toggled:{condition:s.toggled};this.checked=m.contextMatchesRules(A.condition),this.checked&&A.tooltip&&(this.tooltip=typeof A.tooltip=="string"?A.tooltip:A.tooltip.value),A.title&&(this.label=typeof A.title=="string"?A.title:A.title.value)}this.item=s,this.alt=i?new vo(i,void 0,t,m,S):void 0,this._options=t,O.kS.isThemeIcon(s.icon)&&(this.class=oe.dT.asClassName(s.icon))}dispose(){}run(...s){var i,t;let m=[];return!((i=this._options)===null||i===void 0)&&i.arg&&(m=[...m,this._options.arg]),!((t=this._options)===null||t===void 0)&&t.shouldForwardArgs&&(m=[...m,...s]),this._commandService.executeCommand(this.id,...m)}};y=D([l(3,k.i6),l(4,P.H)],y)},94565:function(Ct,Qe,B){"use strict";B.d(Qe,{H:function(){return P},P:function(){return k}});var z=B(4669),oe=B(53725),te=B(9917),U=B(91741),L=B(98401),M=B(72065);const P=(0,M.yh)("commandService"),k=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new z.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,O){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!O)throw new Error("invalid command");return this.registerCommand({id:e,handler:O})}if(e.description){const g=[];for(let c of e.description.args)g.push(c.constraint);const o=e.handler;e.handler=function(c,...y){return(0,L.D8)(y,g),o(c,...y)}}const{id:D}=e;let l=this._commands.get(D);l||(l=new U.S,this._commands.set(D,l));let p=l.unshift(e),h=(0,te.OF)(()=>{p();const g=this._commands.get(D);g!=null&&g.isEmpty()&&this._commands.delete(D)});return this._onDidRegisterCommand.fire(D),h}registerCommandAlias(e,O){return k.registerCommand(e,(D,...l)=>D.get(P).executeCommand(O,...l))}getCommand(e){const O=this._commands.get(e);if(!(!O||O.isEmpty()))return oe.$.first(O)}getCommands(){const e=new Map;for(const O of this._commands.keys()){const D=this.getCommand(O);D&&e.set(O,D)}return e}};k.registerCommand("noop",()=>{})},38819:function(Ct,Qe,B){"use strict";B.d(Qe,{Ao:function(){return P},Eq:function(){return n},Fb:function(){return k},K8:function(){return d},i6:function(){return w},uy:function(){return x}});var z=B(1432),oe=B(97295),te=B(72065);let U=z.WE||"";const L=new Map;L.set("false",!1),L.set("true",!0),L.set("isMac",z.dz),L.set("isLinux",z.IJ),L.set("isWindows",z.ED),L.set("isWeb",z.$L),L.set("isMacNative",z.dz&&!z.$L),L.set("isEdge",U.indexOf("Edg/")>=0),L.set("isFirefox",U.indexOf("Firefox")>=0),L.set("isChrome",U.indexOf("Chrome")>=0),L.set("isSafari",U.indexOf("Safari")>=0);const M=Object.prototype.hasOwnProperty;class P{static has(v){return l.create(v)}static equals(v,E){return p.create(v,E)}static regex(v,E){return m.create(v,E)}static not(v){return c.create(v)}static and(...v){return _.create(v,null)}static or(...v){return A.create(v,null,!0)}static deserialize(v,E=!1){if(v)return this._deserializeOrExpression(v,E)}static _deserializeOrExpression(v,E){let R=v.split("||");return A.create(R.map(C=>this._deserializeAndExpression(C,E)),null,!0)}static _deserializeAndExpression(v,E){let R=v.split("&&");return _.create(R.map(C=>this._deserializeOne(C,E)),null)}static _deserializeOne(v,E){if(v=v.trim(),v.indexOf("!=")>=0){let R=v.split("!=");return o.create(R[0].trim(),this._deserializeValue(R[1],E))}if(v.indexOf("==")>=0){let R=v.split("==");return p.create(R[0].trim(),this._deserializeValue(R[1],E))}if(v.indexOf("=~")>=0){let R=v.split("=~");return m.create(R[0].trim(),this._deserializeRegexValue(R[1],E))}if(v.indexOf(" in ")>=0){let R=v.split(" in ");return h.create(R[0].trim(),R[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(v)){const R=v.split(">=");return s.create(R[0].trim(),R[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(v)){const R=v.split(">");return u.create(R[0].trim(),R[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(v)){const R=v.split("<=");return t.create(R[0].trim(),R[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(v)){const R=v.split("<");return i.create(R[0].trim(),R[1].trim())}return/^\!\s*/.test(v)?c.create(v.substr(1).trim()):l.create(v)}static _deserializeValue(v,E){if(v=v.trim(),v==="true")return!0;if(v==="false")return!1;let R=/^'([^']*)'$/.exec(v);return R?R[1].trim():v}static _deserializeRegexValue(v,E){if((0,oe.m5)(v)){if(E)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let R=v.indexOf("/"),C=v.lastIndexOf("/");if(R===C||R<0){if(E)throw new Error(`bad regexp-value '${v}', missing /-enclosure`);return console.warn(`bad regexp-value '${v}', missing /-enclosure`),null}let N=v.slice(R+1,C),K=v[C+1]==="i"?"i":"";try{return new RegExp(N,K)}catch(H){if(E)throw new Error(`bad regexp-value '${v}', parse error: ${H}`);return console.warn(`bad regexp-value '${v}', parse error: ${H}`),null}}}function k(b,v){const E=b?b.substituteConstants():void 0,R=v?v.substituteConstants():void 0;return!E&&!R?!0:!E||!R?!1:E.equals(R)}function e(b,v){return b.cmp(v)}class O{constructor(){this.type=0}cmp(v){return this.type-v.type}equals(v){return v.type===this.type}substituteConstants(){return this}evaluate(v){return!1}serialize(){return"false"}keys(){return[]}negate(){return D.INSTANCE}}O.INSTANCE=new O;class D{constructor(){this.type=1}cmp(v){return this.type-v.type}equals(v){return v.type===this.type}substituteConstants(){return this}evaluate(v){return!0}serialize(){return"true"}keys(){return[]}negate(){return O.INSTANCE}}D.INSTANCE=new D;class l{constructor(v,E){this.key=v,this.negated=E,this.type=2}static create(v,E=null){const R=L.get(v);return typeof R=="boolean"?R?D.INSTANCE:O.INSTANCE:new l(v,E)}cmp(v){return v.type!==this.type?this.type-v.type:a(this.key,v.key)}equals(v){return v.type===this.type?this.key===v.key:!1}substituteConstants(){const v=L.get(this.key);return typeof v=="boolean"?v?D.INSTANCE:O.INSTANCE:this}evaluate(v){return!!v.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}class p{constructor(v,E,R){this.key=v,this.value=E,this.negated=R,this.type=4}static create(v,E,R=null){if(typeof E=="boolean")return E?l.create(v,R):c.create(v,R);const C=L.get(v);return typeof C=="boolean"?E===(C?"true":"false")?D.INSTANCE:O.INSTANCE:new p(v,E,R)}cmp(v){return v.type!==this.type?this.type-v.type:r(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){const v=L.get(this.key);if(typeof v=="boolean"){const E=v?"true":"false";return this.value===E?D.INSTANCE:O.INSTANCE}return this}evaluate(v){return v.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class h{constructor(v,E){this.key=v,this.valueKey=E,this.type=10,this.negated=null}static create(v,E){return new h(v,E)}cmp(v){return v.type!==this.type?this.type-v.type:r(this.key,this.valueKey,v.key,v.valueKey)}equals(v){return v.type===this.type?this.key===v.key&&this.valueKey===v.valueKey:!1}substituteConstants(){return this}evaluate(v){const E=v.getValue(this.valueKey),R=v.getValue(this.key);return Array.isArray(E)?E.indexOf(R)>=0:typeof R=="string"&&typeof E=="object"&&E!==null?M.call(E,R):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=g.create(this)),this.negated}}class g{constructor(v){this._actual=v,this.type=11}static create(v){return new g(v)}cmp(v){return v.type!==this.type?this.type-v.type:this._actual.cmp(v._actual)}equals(v){return v.type===this.type?this._actual.equals(v._actual):!1}substituteConstants(){return this}evaluate(v){return!this._actual.evaluate(v)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class o{constructor(v,E,R){this.key=v,this.value=E,this.negated=R,this.type=5}static create(v,E,R=null){if(typeof E=="boolean")return E?c.create(v,R):l.create(v,R);const C=L.get(v);return typeof C=="boolean"?E===(C?"true":"false")?O.INSTANCE:D.INSTANCE:new o(v,E,R)}cmp(v){return v.type!==this.type?this.type-v.type:r(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){const v=L.get(this.key);if(typeof v=="boolean"){const E=v?"true":"false";return this.value===E?O.INSTANCE:D.INSTANCE}return this}evaluate(v){return v.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class c{constructor(v,E){this.key=v,this.negated=E,this.type=3}static create(v,E=null){const R=L.get(v);return typeof R=="boolean"?R?O.INSTANCE:D.INSTANCE:new c(v,E)}cmp(v){return v.type!==this.type?this.type-v.type:a(this.key,v.key)}equals(v){return v.type===this.type?this.key===v.key:!1}substituteConstants(){const v=L.get(this.key);return typeof v=="boolean"?v?O.INSTANCE:D.INSTANCE:this}evaluate(v){return!v.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}function y(b,v){if(typeof b=="string"){const E=parseFloat(b);isNaN(E)||(b=E)}return typeof b=="string"||typeof b=="number"?v(b):O.INSTANCE}class u{constructor(v,E,R){this.key=v,this.value=E,this.negated=R,this.type=12}static create(v,E,R=null){return y(E,C=>new u(v,C,R))}cmp(v){return v.type!==this.type?this.type-v.type:r(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=t.create(this.key,this.value,this)),this.negated}}class s{constructor(v,E,R){this.key=v,this.value=E,this.negated=R,this.type=13}static create(v,E,R=null){return y(E,C=>new s(v,C,R))}cmp(v){return v.type!==this.type?this.type-v.type:r(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}class i{constructor(v,E,R){this.key=v,this.value=E,this.negated=R,this.type=14}static create(v,E,R=null){return y(E,C=>new i(v,C,R))}cmp(v){return v.type!==this.type?this.type-v.type:r(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class t{constructor(v,E,R){this.key=v,this.value=E,this.negated=R,this.type=15}static create(v,E,R=null){return y(E,C=>new t(v,C,R))}cmp(v){return v.type!==this.type?this.type-v.type:r(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}class m{constructor(v,E){this.key=v,this.regexp=E,this.type=7,this.negated=null}static create(v,E){return new m(v,E)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.key<v.key)return-1;if(this.key>v.key)return 1;const E=this.regexp?this.regexp.source:"",R=v.regexp?v.regexp.source:"";return E<R?-1:E>R?1:0}equals(v){if(v.type===this.type){const E=this.regexp?this.regexp.source:"",R=v.regexp?v.regexp.source:"";return this.key===v.key&&E===R}return!1}substituteConstants(){return this}evaluate(v){let E=v.getValue(this.key);return this.regexp?this.regexp.test(E):!1}serialize(){const v=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${v}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this)),this.negated}}class S{constructor(v){this._actual=v,this.type=8}static create(v){return new S(v)}cmp(v){return v.type!==this.type?this.type-v.type:this._actual.cmp(v._actual)}equals(v){return v.type===this.type?this._actual.equals(v._actual):!1}substituteConstants(){return this}evaluate(v){return!this._actual.evaluate(v)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function f(b){let v=null;for(let E=0,R=b.length;E<R;E++){const C=b[E].substituteConstants();if(b[E]!==C&&v===null){v=[];for(let N=0;N<E;N++)v[N]=b[N]}v!==null&&(v[E]=C)}return v===null?b:v}class _{constructor(v,E){this.expr=v,this.negated=E,this.type=6}static create(v,E){return _._normalizeArr(v,E)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.expr.length<v.expr.length)return-1;if(this.expr.length>v.expr.length)return 1;for(let E=0,R=this.expr.length;E<R;E++){const C=e(this.expr[E],v.expr[E]);if(C!==0)return C}return 0}equals(v){if(v.type===this.type){if(this.expr.length!==v.expr.length)return!1;for(let E=0,R=this.expr.length;E<R;E++)if(!this.expr[E].equals(v.expr[E]))return!1;return!0}return!1}substituteConstants(){const v=f(this.expr);return v===this.expr?this:_.create(v,this.negated)}evaluate(v){for(let E=0,R=this.expr.length;E<R;E++)if(!this.expr[E].evaluate(v))return!1;return!0}static _normalizeArr(v,E){const R=[];let C=!1;for(const N of v)if(N){if(N.type===1){C=!0;continue}if(N.type===0)return O.INSTANCE;if(N.type===6){R.push(...N.expr);continue}R.push(N)}if(R.length===0&&C)return D.INSTANCE;if(R.length!==0){if(R.length===1)return R[0];R.sort(e);for(let N=1;N<R.length;N++)R[N-1].equals(R[N])&&(R.splice(N,1),N--);if(R.length===1)return R[0];for(;R.length>1;){const N=R[R.length-1];if(N.type!==9)break;R.pop();const K=R.pop(),H=R.length===0,ee=A.create(N.expr.map(J=>_.create([J,K],null)),null,H);ee&&(R.push(ee),R.sort(e))}return R.length===1?R[0]:new _(R,E)}}serialize(){return this.expr.map(v=>v.serialize()).join(" && ")}keys(){const v=[];for(let E of this.expr)v.push(...E.keys());return v}negate(){if(!this.negated){const v=[];for(let E of this.expr)v.push(E.negate());this.negated=A.create(v,this,!0)}return this.negated}}class A{constructor(v,E){this.expr=v,this.negated=E,this.type=9}static create(v,E,R){return A._normalizeArr(v,E,R)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.expr.length<v.expr.length)return-1;if(this.expr.length>v.expr.length)return 1;for(let E=0,R=this.expr.length;E<R;E++){const C=e(this.expr[E],v.expr[E]);if(C!==0)return C}return 0}equals(v){if(v.type===this.type){if(this.expr.length!==v.expr.length)return!1;for(let E=0,R=this.expr.length;E<R;E++)if(!this.expr[E].equals(v.expr[E]))return!1;return!0}return!1}substituteConstants(){const v=f(this.expr);return v===this.expr?this:A.create(v,this.negated,!1)}evaluate(v){for(let E=0,R=this.expr.length;E<R;E++)if(this.expr[E].evaluate(v))return!0;return!1}static _normalizeArr(v,E,R){let C=[],N=!1;if(v){for(let K=0,H=v.length;K<H;K++){const ee=v[K];if(ee){if(ee.type===0){N=!0;continue}if(ee.type===1)return D.INSTANCE;if(ee.type===9){C=C.concat(ee.expr);continue}C.push(ee)}}if(C.length===0&&N)return O.INSTANCE;C.sort(e)}if(C.length!==0){if(C.length===1)return C[0];for(let K=1;K<C.length;K++)C[K-1].equals(C[K])&&(C.splice(K,1),K--);if(C.length===1)return C[0];if(R){for(let K=0;K<C.length;K++)for(let H=K+1;H<C.length;H++)d(C[K],C[H])&&(C.splice(H,1),H--);if(C.length===1)return C[0]}return new A(C,E)}}serialize(){return this.expr.map(v=>v.serialize()).join(" || ")}keys(){const v=[];for(let E of this.expr)v.push(...E.keys());return v}negate(){if(!this.negated){let v=[];for(let E of this.expr)v.push(E.negate());for(;v.length>1;){const E=v.shift(),R=v.shift(),C=[];for(const K of T(E))for(const H of T(R))C.push(_.create([K,H],null));const N=v.length===0;v.unshift(A.create(C,null,N))}this.negated=v[0]}return this.negated}}class x extends l{constructor(v,E,R){super(v,null),this._defaultValue=E,typeof R=="object"?x._info.push(Object.assign(Object.assign({},R),{key:v})):R!==!0&&x._info.push({key:v,description:R,type:E!=null?typeof E:void 0})}static all(){return x._info.values()}bindTo(v){return v.createKey(this.key,this._defaultValue)}getValue(v){return v.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(v){return p.create(this.key,v)}}x._info=[];const w=(0,te.yh)("contextKeyService"),n="setContext";function a(b,v){return b<v?-1:b>v?1:0}function r(b,v,E,R){return b<E?-1:b>E?1:v<R?-1:v>R?1:0}function d(b,v){if(v.type===6&&b.type!==9&&b.type!==6){for(const C of v.expr)if(b.equals(C))return!0}const E=b.negate(),R=T(E).concat(T(v));R.sort(e);for(let C=0;C<R.length;C++){const K=R[C].negate();for(let H=C+1;H<R.length;H++){const ee=R[H];if(K.equals(ee))return!0}}return!1}function T(b){return b.type===9?b.expr:[b]}},72065:function(Ct,Qe,B){"use strict";B.d(Qe,{I8:function(){return z},TG:function(){return oe},jt:function(){return L},yh:function(){return U}});var z;(function(M){M.serviceIds=new Map,M.DI_TARGET="$di$target",M.DI_DEPENDENCIES="$di$dependencies";function P(k){return k[M.DI_DEPENDENCIES]||[]}M.getServiceDependencies=P})(z||(z={}));const oe=U("instantiationService");function te(M,P,k,e){P[z.DI_TARGET]===P?P[z.DI_DEPENDENCIES].push({id:M,index:k,optional:e}):(P[z.DI_DEPENDENCIES]=[{id:M,index:k,optional:e}],P[z.DI_TARGET]=P)}function U(M){if(z.serviceIds.has(M))return z.serviceIds.get(M);const P=function(k,e,O){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");te(P,k,O,!1)};return P.toString=()=>M,z.serviceIds.set(M,P),P}function L(M){return function(P,k,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");te(M,P,e,!0)}}},89872:function(Ct,Qe,B){"use strict";B.d(Qe,{B:function(){return U}});var z=B(35146),oe=B(98401);class te{constructor(){this.data=new Map}add(M,P){z.ok(oe.HD(M)),z.ok(oe.Kn(P)),z.ok(!this.data.has(M),"There is already an extension with this id"),this.data.set(M,P)}as(M){return this.data.get(M)||null}}const U=new te},92321:function(Ct,Qe,B){"use strict";B.d(Qe,{e:function(){return z}});var z;(function(oe){oe.DARK="dark",oe.LIGHT="light",oe.HIGH_CONTRAST="hc"})(z||(z={}))},97781:function(Ct,Qe,B){"use strict";B.d(Qe,{EN:function(){return e},IP:function(){return l},Ic:function(){return g},XE:function(){return P},bB:function(){return o},kS:function(){return O},m6:function(){return D}});var z=B(73046),oe=B(4669),te=B(9917),U=B(72065),L=B(89872),M=B(92321);const P=(0,U.yh)("themeService");var k;(function(c){function y(u){return u&&typeof u=="object"&&typeof u.id=="string"}c.isThemeColor=y})(k||(k={}));function e(c){return{id:c}}var O;(function(c){function y(S){return S&&typeof S=="object"&&typeof S.id=="string"&&(typeof S.color=="undefined"||k.isThemeColor(S.color))}c.isThemeIcon=y;const u=new RegExp(`^\\$\\((${z.dT.iconNameExpression}(?:${z.dT.iconModifierExpression})?)\\)$`);function s(S){const f=u.exec(S);if(!f)return;let[,_]=f;return{id:_}}c.fromString=s;function i(S,f){let _=S.id;const A=_.lastIndexOf("~");return A!==-1&&(_=_.substring(0,A)),f&&(_=`${_}~${f}`),{id:_}}c.modify=i;function t(S,f){var _,A;return S.id===f.id&&((_=S.color)===null||_===void 0?void 0:_.id)===((A=f.color)===null||A===void 0?void 0:A.id)}c.isEqual=t;function m(S,f){return{id:S.id,color:f?e(f):void 0}}c.asThemeIcon=m,c.asClassNameArray=z.dT.asClassNameArray,c.asClassName=z.dT.asClassName,c.asCSSSelector=z.dT.asCSSSelector})(O||(O={}));function D(c){switch(c){case M.e.DARK:return"vs-dark";case M.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const l={ThemingContribution:"base.contributions.theming"};class p{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new oe.Q5}onColorThemeChange(y){return this.themingParticipants.push(y),this.onThemingParticipantAddedEmitter.fire(y),(0,te.OF)(()=>{const u=this.themingParticipants.indexOf(y);this.themingParticipants.splice(u,1)})}getThemingParticipants(){return this.themingParticipants}}let h=new p;L.B.add(l.ThemingContribution,h);function g(c){return h.onColorThemeChange(c)}class o extends te.JT{constructor(y){super(),this.themeService=y,this.theme=y.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(u=>this.onThemeChange(u)))}onThemeChange(y){this.theme=y,this.updateStyles()}updateStyles(){}}},82234:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return P}});var z=B(45987),oe=B(1413),te=B(71002),U=B(67294),L=["show"];function M(k,e){if(!e.max)return!0;var O=e.strategy(k);return O<=e.max}function P(k,e){return U.useMemo(function(){var O={};e&&(O.show=(0,te.Z)(e)==="object"&&e.formatter?e.formatter:!!e),O=(0,oe.Z)((0,oe.Z)({},O),k);var D=O,l=D.show,p=(0,z.Z)(D,L);return(0,oe.Z)((0,oe.Z)({},p),{},{show:!!l,showFormatter:typeof l=="function"?l:void 0,strategy:p.strategy||function(h){return h.length}})},[k,e])}},67656:function(Ct,Qe,B){"use strict";B.r(Qe),B.d(Qe,{BaseInput:function(){return O},default:function(){return s}});var z=B(1413),oe=B(87462),te=B(4942),U=B(71002),L=B(94184),M=B.n(L),P=B(67294),k=B(87887),e=P.forwardRef(function(i,t){var m,S,f,_=i.inputElement,A=i.children,x=i.prefixCls,w=i.prefix,n=i.suffix,a=i.addonBefore,r=i.addonAfter,d=i.className,T=i.style,b=i.disabled,v=i.readOnly,E=i.focused,R=i.triggerFocus,C=i.allowClear,N=i.value,K=i.handleReset,H=i.hidden,ee=i.classes,J=i.classNames,se=i.dataAttrs,G=i.styles,Ee=i.components,ge=i.onClear,Pe=A!=null?A:_,Ne=(Ee==null?void 0:Ee.affixWrapper)||"span",$e=(Ee==null?void 0:Ee.groupWrapper)||"span",je=(Ee==null?void 0:Ee.wrapper)||"span",Ce=(Ee==null?void 0:Ee.groupAddon)||"span",fe=(0,P.useRef)(null),Be=function(Fe){var Ae;(Ae=fe.current)!==null&&Ae!==void 0&&Ae.contains(Fe.target)&&(R==null||R())},Ue=(0,k.X3)(i),re=(0,P.cloneElement)(Pe,{value:N,className:M()((m=Pe.props)===null||m===void 0?void 0:m.className,!Ue&&(J==null?void 0:J.variant))||null}),Z=(0,P.useRef)(null);if(P.useImperativeHandle(t,function(){return{nativeElement:Z.current||fe.current}}),Ue){var le=null;if(C){var we=!b&&!v&&N,ue="".concat(x,"-clear-icon"),pe=(0,U.Z)(C)==="object"&&C!==null&&C!==void 0&&C.clearIcon?C.clearIcon:"\u2716";le=P.createElement("button",{type:"button",tabIndex:-1,onClick:function(Fe){K==null||K(Fe),ge==null||ge()},onMouseDown:function(Fe){return Fe.preventDefault()},className:M()(ue,(0,te.Z)((0,te.Z)({},"".concat(ue,"-hidden"),!we),"".concat(ue,"-has-suffix"),!!n))},pe)}var ae="".concat(x,"-affix-wrapper"),_e=M()(ae,(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},"".concat(x,"-disabled"),b),"".concat(ae,"-disabled"),b),"".concat(ae,"-focused"),E),"".concat(ae,"-readonly"),v),"".concat(ae,"-input-with-clear-btn"),n&&C&&N),ee==null?void 0:ee.affixWrapper,J==null?void 0:J.affixWrapper,J==null?void 0:J.variant),ce=(n||C)&&P.createElement("span",{className:M()("".concat(x,"-suffix"),J==null?void 0:J.suffix),style:G==null?void 0:G.suffix},le,n);re=P.createElement(Ne,(0,oe.Z)({className:_e,style:G==null?void 0:G.affixWrapper,onClick:Be},se==null?void 0:se.affixWrapper,{ref:fe}),w&&P.createElement("span",{className:M()("".concat(x,"-prefix"),J==null?void 0:J.prefix),style:G==null?void 0:G.prefix},w),re,ce)}if((0,k.He)(i)){var he="".concat(x,"-group"),Le="".concat(he,"-addon"),Ye="".concat(he,"-wrapper"),ke=M()("".concat(x,"-wrapper"),he,ee==null?void 0:ee.wrapper,J==null?void 0:J.wrapper),be=M()(Ye,(0,te.Z)({},"".concat(Ye,"-disabled"),b),ee==null?void 0:ee.group,J==null?void 0:J.groupWrapper);re=P.createElement($e,{className:be,ref:Z},P.createElement(je,{className:ke},a&&P.createElement(Ce,{className:Le},a),re,r&&P.createElement(Ce,{className:Le},r)))}return P.cloneElement(re,{className:M()((S=re.props)===null||S===void 0?void 0:S.className,d)||null,style:(0,z.Z)((0,z.Z)({},(f=re.props)===null||f===void 0?void 0:f.style),T),hidden:H})}),O=e,D=B(74902),l=B(97685),p=B(45987),h=B(21770),g=B(98423),o=B(82234),c=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],y=(0,P.forwardRef)(function(i,t){var m=i.autoComplete,S=i.onChange,f=i.onFocus,_=i.onBlur,A=i.onPressEnter,x=i.onKeyDown,w=i.onKeyUp,n=i.prefixCls,a=n===void 0?"rc-input":n,r=i.disabled,d=i.htmlSize,T=i.className,b=i.maxLength,v=i.suffix,E=i.showCount,R=i.count,C=i.type,N=C===void 0?"text":C,K=i.classes,H=i.classNames,ee=i.styles,J=i.onCompositionStart,se=i.onCompositionEnd,G=(0,p.Z)(i,c),Ee=(0,P.useState)(!1),ge=(0,l.Z)(Ee,2),Pe=ge[0],Ne=ge[1],$e=(0,P.useRef)(!1),je=(0,P.useRef)(!1),Ce=(0,P.useRef)(null),fe=(0,P.useRef)(null),Be=function(pt){Ce.current&&(0,k.nH)(Ce.current,pt)},Ue=(0,h.Z)(i.defaultValue,{value:i.value}),re=(0,l.Z)(Ue,2),Z=re[0],le=re[1],we=Z==null?"":String(Z),ue=(0,P.useState)(null),pe=(0,l.Z)(ue,2),ae=pe[0],_e=pe[1],ce=(0,o.Z)(R,E),he=ce.max||b,Le=ce.strategy(we),Ye=!!he&&Le>he;(0,P.useImperativeHandle)(t,function(){var qe;return{focus:Be,blur:function(){var Se;(Se=Ce.current)===null||Se===void 0||Se.blur()},setSelectionRange:function(Se,ye,Te){var Y;(Y=Ce.current)===null||Y===void 0||Y.setSelectionRange(Se,ye,Te)},select:function(){var Se;(Se=Ce.current)===null||Se===void 0||Se.select()},input:Ce.current,nativeElement:((qe=fe.current)===null||qe===void 0?void 0:qe.nativeElement)||Ce.current}}),(0,P.useEffect)(function(){je.current&&(je.current=!1),Ne(function(qe){return qe&&r?!1:qe})},[r]);var ke=function(pt,Se,ye){var Te=Se;if(!$e.current&&ce.exceedFormatter&&ce.max&&ce.strategy(Se)>ce.max){if(Te=ce.exceedFormatter(Se,{max:ce.max}),Se!==Te){var Y,W;_e([((Y=Ce.current)===null||Y===void 0?void 0:Y.selectionStart)||0,((W=Ce.current)===null||W===void 0?void 0:W.selectionEnd)||0])}}else if(ye.source==="compositionEnd")return;le(Te),Ce.current&&(0,k.rJ)(Ce.current,pt,S,Te)};(0,P.useEffect)(function(){if(ae){var qe;(qe=Ce.current)===null||qe===void 0||qe.setSelectionRange.apply(qe,(0,D.Z)(ae))}},[ae]);var be=function(pt){ke(pt,pt.target.value,{source:"change"})},Re=function(pt){$e.current=!1,ke(pt,pt.currentTarget.value,{source:"compositionEnd"}),se==null||se(pt)},Fe=function(pt){A&&pt.key==="Enter"&&!je.current&&(je.current=!0,A(pt)),x==null||x(pt)},Ae=function(pt){pt.key==="Enter"&&(je.current=!1),w==null||w(pt)},Me=function(pt){Ne(!0),f==null||f(pt)},rt=function(pt){je.current&&(je.current=!1),Ne(!1),_==null||_(pt)},lt=function(pt){le(""),Be(),Ce.current&&(0,k.rJ)(Ce.current,pt,S)},Ze=Ye&&"".concat(a,"-out-of-range"),ft=function(){var pt=(0,g.Z)(i,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return P.createElement("input",(0,oe.Z)({autoComplete:m},pt,{onChange:be,onFocus:Me,onBlur:rt,onKeyDown:Fe,onKeyUp:Ae,className:M()(a,(0,te.Z)({},"".concat(a,"-disabled"),r),H==null?void 0:H.input),style:ee==null?void 0:ee.input,ref:Ce,size:d,type:N,onCompositionStart:function(ye){$e.current=!0,J==null||J(ye)},onCompositionEnd:Re}))},Et=function(){var pt=Number(he)>0;if(v||ce.show){var Se=ce.showFormatter?ce.showFormatter({value:we,count:Le,maxLength:he}):"".concat(Le).concat(pt?" / ".concat(he):"");return P.createElement(P.Fragment,null,ce.show&&P.createElement("span",{className:M()("".concat(a,"-show-count-suffix"),(0,te.Z)({},"".concat(a,"-show-count-has-suffix"),!!v),H==null?void 0:H.count),style:(0,z.Z)({},ee==null?void 0:ee.count)},Se),v)}return null};return P.createElement(O,(0,oe.Z)({},G,{prefixCls:a,className:M()(T,Ze),handleReset:lt,value:we,focused:Pe,triggerFocus:Be,suffix:Et(),disabled:r,classes:K,classNames:H,styles:ee}),ft())}),u=y,s=u},87887:function(Ct,Qe,B){"use strict";B.d(Qe,{He:function(){return z},X3:function(){return oe},nH:function(){return L},rJ:function(){return U}});function z(M){return!!(M.addonBefore||M.addonAfter)}function oe(M){return!!(M.prefix||M.suffix||M.allowClear)}function te(M,P,k){var e=P.cloneNode(!0),O=Object.create(M,{target:{value:e},currentTarget:{value:e}});return e.value=k,typeof P.selectionStart=="number"&&typeof P.selectionEnd=="number"&&(e.selectionStart=P.selectionStart,e.selectionEnd=P.selectionEnd),e.setSelectionRange=function(){P.setSelectionRange.apply(P,arguments)},O}function U(M,P,k,e){if(k){var O=P;if(P.type==="click"){O=te(P,M,""),k(O);return}if(M.type!=="file"&&e!==void 0){O=te(P,M,e),k(O);return}k(O)}}function L(M,P){if(M){M.focus(P);var k=P||{},e=k.cursor;if(e){var O=M.value.length;switch(e){case"start":M.setSelectionRange(0,0);break;case"end":M.setSelectionRange(O,O);break;default:M.setSelectionRange(0,O)}}}}},78595:function(Ct,Qe,B){"use strict";B.d(Qe,{iz:function(){return La},ck:function(){return ar},BW:function(){return Fi},sN:function(){return ar},Wd:function(){return Sa},ZP:function(){return Fs},Xl:function(){return ae}});var z=B(87462),oe=B(4942),te=B(1413),U=B(74902),L=B(97685),M=B(45987),P=B(94184),k=B.n(P),e=B(67294),O=B(48555);function D(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var l=D()?e.useLayoutEffect:e.useEffect,p=function(Ge,ot){var He=e.useRef(!0);l(function(){return Ge(He.current)},ot),l(function(){return He.current=!1,function(){He.current=!0}},[])},h=function(Ge,ot){p(function(He){if(!He)return Ge()},ot)},g=p,o=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],c=void 0;function y(xe,Ge){var ot=xe.prefixCls,He=xe.invalidate,dt=xe.item,ht=xe.renderItem,_t=xe.responsive,It=xe.responsiveDisabled,sr=xe.registerSize,Vt=xe.itemKey,Sr=xe.className,fr=xe.style,Dr=xe.children,Vr=xe.display,mr=xe.order,sn=xe.component,kr=sn===void 0?"div":sn,j=(0,M.Z)(xe,o),ne=_t&&!Vr;function q(Lt){sr(Vt,Lt)}e.useEffect(function(){return function(){q(null)}},[]);var De=ht&&dt!==c?ht(dt):Dr,ze;He||(ze={opacity:ne?0:1,height:ne?0:c,overflowY:ne?"hidden":c,order:_t?mr:c,pointerEvents:ne?"none":c,position:ne?"absolute":c});var ut={};ne&&(ut["aria-hidden"]=!0);var gt=e.createElement(kr,(0,z.Z)({className:k()(!He&&ot,Sr),style:(0,te.Z)((0,te.Z)({},ze),fr)},ut,j,{ref:Ge}),De);return _t&&(gt=e.createElement(O.Z,{onResize:function(wt){var Ht=wt.offsetWidth;q(Ht)},disabled:It},gt)),gt}var u=e.forwardRef(y);u.displayName="Item";var s=u;function i(xe){var Ge=e.useRef();Ge.current=xe;var ot=e.useCallback(function(){for(var He,dt=arguments.length,ht=new Array(dt),_t=0;_t<dt;_t++)ht[_t]=arguments[_t];return(He=Ge.current)===null||He===void 0?void 0:He.call.apply(He,[Ge].concat(ht))},[]);return ot}var t=B(73935),m=function(Ge){return+setTimeout(Ge,16)},S=function(Ge){return clearTimeout(Ge)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(m=function(Ge){return window.requestAnimationFrame(Ge)},S=function(Ge){return window.cancelAnimationFrame(Ge)});var f=0,_=new Map;function A(xe){_.delete(xe)}var x=function(Ge){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;f+=1;var He=f;function dt(ht){if(ht===0)A(He),Ge();else{var _t=m(function(){dt(ht-1)});_.set(He,_t)}}return dt(ot),He};x.cancel=function(xe){var Ge=_.get(xe);return A(Ge),S(Ge)};var w=x;function n(xe){if(typeof MessageChannel=="undefined")w(xe);else{var Ge=new MessageChannel;Ge.port1.onmessage=function(){return xe()},Ge.port2.postMessage(void 0)}}function a(){var xe=e.useRef(null),Ge=function(He){xe.current||(xe.current=[],n(function(){(0,t.unstable_batchedUpdates)(function(){xe.current.forEach(function(dt){dt()}),xe.current=null})})),xe.current.push(He)};return Ge}function r(xe,Ge){var ot=e.useState(Ge),He=(0,L.Z)(ot,2),dt=He[0],ht=He[1],_t=i(function(It){xe(function(){ht(It)})});return[dt,_t]}var d=e.createContext(null),T=["component"],b=["className"],v=["className"],E=function(Ge,ot){var He=e.useContext(d);if(!He){var dt=Ge.component,ht=dt===void 0?"div":dt,_t=(0,M.Z)(Ge,T);return e.createElement(ht,(0,z.Z)({},_t,{ref:ot}))}var It=He.className,sr=(0,M.Z)(He,b),Vt=Ge.className,Sr=(0,M.Z)(Ge,v);return e.createElement(d.Provider,{value:null},e.createElement(s,(0,z.Z)({ref:ot,className:k()(It,Vt)},sr,Sr)))},R=e.forwardRef(E);R.displayName="RawItem";var C=R,N=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],K="responsive",H="invalidate";function ee(xe){return"+ ".concat(xe.length," ...")}function J(xe,Ge){var ot=xe.prefixCls,He=ot===void 0?"rc-overflow":ot,dt=xe.data,ht=dt===void 0?[]:dt,_t=xe.renderItem,It=xe.renderRawItem,sr=xe.itemKey,Vt=xe.itemWidth,Sr=Vt===void 0?10:Vt,fr=xe.ssr,Dr=xe.style,Vr=xe.className,mr=xe.maxCount,sn=xe.renderRest,kr=xe.renderRawRest,j=xe.suffix,ne=xe.component,q=ne===void 0?"div":ne,De=xe.itemComponent,ze=xe.onVisibleChange,ut=(0,M.Z)(xe,N),gt=fr==="full",Lt=a(),wt=r(Lt,null),Ht=(0,L.Z)(wt,2),xt=Ht[0],bt=Ht[1],Ot=xt||0,Mt=r(Lt,new Map),Gt=(0,L.Z)(Mt,2),Br=Gt[0],nr=Gt[1],qr=r(Lt,0),Pr=(0,L.Z)(qr,2),xr=Pr[0],en=Pr[1],tn=r(Lt,0),Yt=(0,L.Z)(tn,2),Jn=Yt[0],wn=Yt[1],Bn=r(Lt,0),bi=(0,L.Z)(Bn,2),qn=bi[0],ui=bi[1],bn=(0,e.useState)(null),li=(0,L.Z)(bn,2),mi=li[0],Di=li[1],Ni=(0,e.useState)(null),Pn=(0,L.Z)(Ni,2),ei=Pn[0],Gr=Pn[1],Pi=e.useMemo(function(){return ei===null&>?Number.MAX_SAFE_INTEGER:ei||0},[ei,xt]),Bi=(0,e.useState)(!1),fi=(0,L.Z)(Bi,2),zr=fi[0],Li=fi[1],ua="".concat(He,"-item"),la=Math.max(xr,Jn),ti=mr===K,Ln=ht.length&&ti,Zi=mr===H,ea=Ln||typeof mr=="number"&&ht.length>mr,Vn=(0,e.useMemo)(function(){var _r=ht;return Ln?xt===null&>?_r=ht:_r=ht.slice(0,Math.min(ht.length,Ot/Sr)):typeof mr=="number"&&(_r=ht.slice(0,mr)),_r},[ht,Sr,xt,mr,Ln]),Si=(0,e.useMemo)(function(){return Ln?ht.slice(Pi+1):ht.slice(Vn.length)},[ht,Vn,Ln,Pi]),ci=(0,e.useCallback)(function(_r,Zr){var fn;return typeof sr=="function"?sr(_r):(fn=sr&&(_r==null?void 0:_r[sr]))!==null&&fn!==void 0?fn:Zr},[sr]),zn=(0,e.useCallback)(_t||function(_r){return _r},[_t]);function Gi(_r,Zr,fn){ei===_r&&(Zr===void 0||Zr===mi)||(Gr(_r),fn||(Li(_r<ht.length-1),ze==null||ze(_r)),Zr!==void 0&&Di(Zr))}function $i(_r,Zr){bt(Zr.clientWidth)}function ri(_r,Zr){nr(function(fn){var Zn=new Map(fn);return Zr===null?Zn.delete(_r):Zn.set(_r,Zr),Zn})}function vn(_r,Zr){wn(Zr),en(Jn)}function ni(_r,Zr){ui(Zr)}function di(_r){return Br.get(ci(Vn[_r],_r))}g(function(){if(Ot&&typeof la=="number"&&Vn){var _r=qn,Zr=Vn.length,fn=Zr-1;if(!Zr){Gi(0,null);return}for(var Zn=0;Zn<Zr;Zn+=1){var On=di(Zn);if(gt&&(On=On||0),On===void 0){Gi(Zn-1,void 0,!0);break}if(_r+=On,fn===0&&_r<=Ot||Zn===fn-1&&_r+di(fn)<=Ot){Gi(fn,null);break}else if(_r+la>Ot){Gi(Zn-1,_r-On-qn+Jn);break}}j&&di(0)+qn>Ot&&Di(null)}},[Ot,Br,Jn,qn,ci,Vn]);var hs=zr&&!!Si.length,pn={};mi!==null&&Ln&&(pn={position:"absolute",left:mi,top:0});var Ia={prefixCls:ua,responsive:Ln,component:De,invalidate:Zi},Wa=It?function(_r,Zr){var fn=ci(_r,Zr);return e.createElement(d.Provider,{key:fn,value:(0,te.Z)((0,te.Z)({},Ia),{},{order:Zr,item:_r,itemKey:fn,registerSize:ri,display:Zr<=Pi})},It(_r,Zr))}:function(_r,Zr){var fn=ci(_r,Zr);return e.createElement(s,(0,z.Z)({},Ia,{order:Zr,key:fn,item:_r,renderItem:zn,itemKey:fn,registerSize:ri,display:Zr<=Pi}))},ii,ta={order:hs?Pi:Number.MAX_SAFE_INTEGER,className:"".concat(ua,"-rest"),registerSize:vn,display:hs};if(kr)kr&&(ii=e.createElement(d.Provider,{value:(0,te.Z)((0,te.Z)({},Ia),ta)},kr(Si)));else{var ra=sn||ee;ii=e.createElement(s,(0,z.Z)({},Ia,ta),typeof ra=="function"?ra(Si):ra)}var fa=e.createElement(q,(0,z.Z)({className:k()(!Zi&&He,Vr),style:Dr,ref:Ge},ut),Vn.map(Wa),ea?ii:null,j&&e.createElement(s,(0,z.Z)({},Ia,{responsive:ti,responsiveDisabled:!Ln,order:Pi,className:"".concat(ua,"-suffix"),registerSize:ni,display:!0,style:pn}),j));return ti&&(fa=e.createElement(O.Z,{onResize:$i,disabled:!Ln},fa)),fa}var se=e.forwardRef(J);se.displayName="Overflow",se.Item=C,se.RESPONSIVE=K,se.INVALIDATE=H;var G=se,Ee=G,ge=B(21770),Pe=B(91881),Ne=B(80334),$e=e.createContext(null);function je(xe,Ge){return xe===void 0?null:"".concat(xe,"-").concat(Ge)}function Ce(xe){var Ge=e.useContext($e);return je(Ge,xe)}var fe=B(56982),Be=["children","locked"],Ue=e.createContext(null);function re(xe,Ge){var ot=(0,te.Z)({},xe);return Object.keys(Ge).forEach(function(He){var dt=Ge[He];dt!==void 0&&(ot[He]=dt)}),ot}function Z(xe){var Ge=xe.children,ot=xe.locked,He=(0,M.Z)(xe,Be),dt=e.useContext(Ue),ht=(0,fe.Z)(function(){return re(dt,He)},[dt,He],function(_t,It){return!ot&&(_t[0]!==It[0]||!(0,Pe.Z)(_t[1],It[1],!0))});return e.createElement(Ue.Provider,{value:ht},Ge)}var le=[],we=e.createContext(null);function ue(){return e.useContext(we)}var pe=e.createContext(le);function ae(xe){var Ge=e.useContext(pe);return e.useMemo(function(){return xe!==void 0?[].concat((0,U.Z)(Ge),[xe]):Ge},[Ge,xe])}var _e=e.createContext(null),ce=e.createContext({}),he=ce,Le=function(xe){if(!xe)return!1;if(xe instanceof Element){if(xe.offsetParent)return!0;if(xe.getBBox){var Ge=xe.getBBox(),ot=Ge.width,He=Ge.height;if(ot||He)return!0}if(xe.getBoundingClientRect){var dt=xe.getBoundingClientRect(),ht=dt.width,_t=dt.height;if(ht||_t)return!0}}return!1};function Ye(xe){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Le(xe)){var ot=xe.nodeName.toLowerCase(),He=["input","select","textarea","button"].includes(ot)||xe.isContentEditable||ot==="a"&&!!xe.getAttribute("href"),dt=xe.getAttribute("tabindex"),ht=Number(dt),_t=null;return dt&&!Number.isNaN(ht)?_t=ht:He&&_t===null&&(_t=0),He&&xe.disabled&&(_t=null),_t!==null&&(_t>=0||Ge&&_t<0)}return!1}function ke(xe){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=(0,U.Z)(xe.querySelectorAll("*")).filter(function(He){return Ye(He,Ge)});return Ye(xe,Ge)&&ot.unshift(xe),ot}var be=null;function Re(){be=document.activeElement}function Fe(){be=null}function Ae(){if(be)try{be.focus()}catch(xe){}}function Me(xe,Ge){if(Ge.keyCode===9){var ot=ke(xe),He=ot[Ge.shiftKey?0:ot.length-1],dt=He===document.activeElement||xe===document.activeElement;if(dt){var ht=ot[Ge.shiftKey?ot.length-1:0];ht.focus(),Ge.preventDefault()}}}var rt=B(15105),lt=B(75164),Ze=rt.Z.LEFT,ft=rt.Z.RIGHT,Et=rt.Z.UP,qe=rt.Z.DOWN,pt=rt.Z.ENTER,Se=rt.Z.ESC,ye=rt.Z.HOME,Te=rt.Z.END,Y=[Et,qe,Ze,ft];function W(xe,Ge,ot,He){var dt,ht="prev",_t="next",It="children",sr="parent";if(xe==="inline"&&He===pt)return{inlineTrigger:!0};var Vt=(0,oe.Z)((0,oe.Z)({},Et,ht),qe,_t),Sr=(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},Ze,ot?_t:ht),ft,ot?ht:_t),qe,It),pt,It),fr=(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},Et,ht),qe,_t),pt,It),Se,sr),Ze,ot?It:sr),ft,ot?sr:It),Dr={inline:Vt,horizontal:Sr,vertical:fr,inlineSub:Vt,horizontalSub:fr,verticalSub:fr},Vr=(dt=Dr["".concat(xe).concat(Ge?"":"Sub")])===null||dt===void 0?void 0:dt[He];switch(Vr){case ht:return{offset:-1,sibling:!0};case _t:return{offset:1,sibling:!0};case sr:return{offset:-1,sibling:!1};case It:return{offset:1,sibling:!1};default:return null}}function X(xe){for(var Ge=xe;Ge;){if(Ge.getAttribute("data-menu-list"))return Ge;Ge=Ge.parentElement}return null}function ie(xe,Ge){for(var ot=xe||document.activeElement;ot;){if(Ge.has(ot))return ot;ot=ot.parentElement}return null}function Q(xe,Ge){var ot=ke(xe,!0);return ot.filter(function(He){return Ge.has(He)})}function de(xe,Ge,ot){var He=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!xe)return null;var dt=Q(xe,Ge),ht=dt.length,_t=dt.findIndex(function(It){return ot===It});return He<0?_t===-1?_t=ht-1:_t-=1:He>0&&(_t+=1),_t=(_t+ht)%ht,dt[_t]}var ve=function(Ge,ot){var He=new Set,dt=new Map,ht=new Map;return Ge.forEach(function(_t){var It=document.querySelector("[data-menu-id='".concat(je(ot,_t),"']"));It&&(He.add(It),ht.set(It,_t),dt.set(_t,It))}),{elements:He,key2element:dt,element2key:ht}};function Ke(xe,Ge,ot,He,dt,ht,_t,It,sr,Vt){var Sr=e.useRef(),fr=e.useRef();fr.current=Ge;var Dr=function(){lt.Z.cancel(Sr.current)};return e.useEffect(function(){return function(){Dr()}},[]),function(Vr){var mr=Vr.which;if([].concat(Y,[pt,Se,ye,Te]).includes(mr)){var sn=ht(),kr=ve(sn,He),j=kr,ne=j.elements,q=j.key2element,De=j.element2key,ze=q.get(Ge),ut=ie(ze,ne),gt=De.get(ut),Lt=W(xe,_t(gt,!0).length===1,ot,mr);if(!Lt&&mr!==ye&&mr!==Te)return;(Y.includes(mr)||[ye,Te].includes(mr))&&Vr.preventDefault();var wt=function(nr){if(nr){var qr=nr,Pr=nr.querySelector("a");Pr!=null&&Pr.getAttribute("href")&&(qr=Pr);var xr=De.get(nr);It(xr),Dr(),Sr.current=(0,lt.Z)(function(){fr.current===xr&&qr.focus()})}};if([ye,Te].includes(mr)||Lt.sibling||!ut){var Ht;!ut||xe==="inline"?Ht=dt.current:Ht=X(ut);var xt,bt=Q(Ht,ne);mr===ye?xt=bt[0]:mr===Te?xt=bt[bt.length-1]:xt=de(Ht,ne,ut,Lt.offset),wt(xt)}else if(Lt.inlineTrigger)sr(gt);else if(Lt.offset>0)sr(gt,!0),Dr(),Sr.current=(0,lt.Z)(function(){kr=ve(sn,He);var Br=ut.getAttribute("aria-controls"),nr=document.getElementById(Br),qr=de(nr,kr.elements);wt(qr)},5);else if(Lt.offset<0){var Ot=_t(gt,!0),Mt=Ot[Ot.length-2],Gt=q.get(Mt);sr(Mt,!1),wt(Gt)}}Vt==null||Vt(Vr)}}function We(xe){Promise.resolve().then(xe)}var ct="__RC_UTIL_PATH_SPLIT__",at=function(Ge){return Ge.join(ct)},nt=function(Ge){return Ge.split(ct)},et="rc-menu-more";function St(){var xe=e.useState({}),Ge=(0,L.Z)(xe,2),ot=Ge[1],He=(0,e.useRef)(new Map),dt=(0,e.useRef)(new Map),ht=e.useState([]),_t=(0,L.Z)(ht,2),It=_t[0],sr=_t[1],Vt=(0,e.useRef)(0),Sr=(0,e.useRef)(!1),fr=function(){Sr.current||ot({})},Dr=(0,e.useCallback)(function(q,De){var ze=at(De);dt.current.set(ze,q),He.current.set(q,ze),Vt.current+=1;var ut=Vt.current;We(function(){ut===Vt.current&&fr()})},[]),Vr=(0,e.useCallback)(function(q,De){var ze=at(De);dt.current.delete(ze),He.current.delete(q)},[]),mr=(0,e.useCallback)(function(q){sr(q)},[]),sn=(0,e.useCallback)(function(q,De){var ze=He.current.get(q)||"",ut=nt(ze);return De&&It.includes(ut[0])&&ut.unshift(et),ut},[It]),kr=(0,e.useCallback)(function(q,De){return q.filter(function(ze){return ze!==void 0}).some(function(ze){var ut=sn(ze,!0);return ut.includes(De)})},[sn]),j=function(){var De=(0,U.Z)(He.current.keys());return It.length&&De.push(et),De},ne=(0,e.useCallback)(function(q){var De="".concat(He.current.get(q)).concat(ct),ze=new Set;return(0,U.Z)(dt.current.keys()).forEach(function(ut){ut.startsWith(De)&&ze.add(dt.current.get(ut))}),ze},[]);return e.useEffect(function(){return function(){Sr.current=!0}},[]),{registerPath:Dr,unregisterPath:Vr,refreshOverflowKeys:mr,isSubPathKey:kr,getKeyPath:sn,getKeys:j,getSubPathKeys:ne}}function mt(xe){var Ge=e.useRef(xe);Ge.current=xe;var ot=e.useCallback(function(){for(var He,dt=arguments.length,ht=new Array(dt),_t=0;_t<dt;_t++)ht[_t]=arguments[_t];return(He=Ge.current)===null||He===void 0?void 0:He.call.apply(He,[Ge].concat(ht))},[]);return xe?ot:void 0}var Tt=Math.random().toFixed(5).toString().slice(2),Pt=0;function Xe(xe){var Ge=(0,ge.Z)(xe,{value:xe}),ot=(0,L.Z)(Ge,2),He=ot[0],dt=ot[1];return e.useEffect(function(){Pt+=1;var ht="".concat(Tt,"-").concat(Pt);dt("rc-menu-uuid-".concat(ht))},[]),He}var st=B(15671),Rt=B(43144),jt=B(60136),qt=B(29388),Ar=B(98423),jr=B(42550);function Cr(xe,Ge,ot,He){var dt=e.useContext(Ue),ht=dt.activeKey,_t=dt.onActive,It=dt.onInactive,sr={active:ht===xe};return Ge||(sr.onMouseEnter=function(Vt){ot==null||ot({key:xe,domEvent:Vt}),_t(xe)},sr.onMouseLeave=function(Vt){He==null||He({key:xe,domEvent:Vt}),It(xe)}),sr}function lr(xe){var Ge=e.useContext(Ue),ot=Ge.mode,He=Ge.rtl,dt=Ge.inlineIndent;if(ot!=="inline")return null;var ht=xe;return He?{paddingRight:ht*dt}:{paddingLeft:ht*dt}}function Hr(xe){var Ge=xe.icon,ot=xe.props,He=xe.children,dt;return Ge===null||Ge===!1?null:(typeof Ge=="function"?dt=e.createElement(Ge,(0,te.Z)({},ot)):typeof Ge!="boolean"&&(dt=Ge),dt||He||null)}var Jr=["item"];function Qt(xe){var Ge=xe.item,ot=(0,M.Z)(xe,Jr);return Object.defineProperty(ot,"item",{get:function(){return(0,Ne.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Ge}}),ot}var Nr=["title","attribute","elementRef"],Rr=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],rr=["active"],pr=function(xe){(0,jt.Z)(ot,xe);var Ge=(0,qt.Z)(ot);function ot(){return(0,st.Z)(this,ot),Ge.apply(this,arguments)}return(0,Rt.Z)(ot,[{key:"render",value:function(){var dt=this.props,ht=dt.title,_t=dt.attribute,It=dt.elementRef,sr=(0,M.Z)(dt,Nr),Vt=(0,Ar.Z)(sr,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,Ne.ZP)(!_t,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),e.createElement(Ee.Item,(0,z.Z)({},_t,{title:typeof ht=="string"?ht:void 0},Vt,{ref:It}))}}]),ot}(e.Component),gr=e.forwardRef(function(xe,Ge){var ot=xe.style,He=xe.className,dt=xe.eventKey,ht=xe.warnKey,_t=xe.disabled,It=xe.itemIcon,sr=xe.children,Vt=xe.role,Sr=xe.onMouseEnter,fr=xe.onMouseLeave,Dr=xe.onClick,Vr=xe.onKeyDown,mr=xe.onFocus,sn=(0,M.Z)(xe,Rr),kr=Ce(dt),j=e.useContext(Ue),ne=j.prefixCls,q=j.onItemClick,De=j.disabled,ze=j.overflowDisabled,ut=j.itemIcon,gt=j.selectedKeys,Lt=j.onActive,wt=e.useContext(he),Ht=wt._internalRenderMenuItem,xt="".concat(ne,"-item"),bt=e.useRef(),Ot=e.useRef(),Mt=De||_t,Gt=(0,jr.x1)(Ge,Ot),Br=ae(dt),nr=function(bn){return{key:dt,keyPath:(0,U.Z)(Br).reverse(),item:bt.current,domEvent:bn}},qr=It||ut,Pr=Cr(dt,Mt,Sr,fr),xr=Pr.active,en=(0,M.Z)(Pr,rr),tn=gt.includes(dt),Yt=lr(Br.length),Jn=function(bn){if(!Mt){var li=nr(bn);Dr==null||Dr(Qt(li)),q(li)}},wn=function(bn){if(Vr==null||Vr(bn),bn.which===rt.Z.ENTER){var li=nr(bn);Dr==null||Dr(Qt(li)),q(li)}},Bn=function(bn){Lt(dt),mr==null||mr(bn)},bi={};xe.role==="option"&&(bi["aria-selected"]=tn);var qn=e.createElement(pr,(0,z.Z)({ref:bt,elementRef:Gt,role:Vt===null?"none":Vt||"menuitem",tabIndex:_t?null:-1,"data-menu-id":ze&&kr?null:kr},(0,Ar.Z)(sn,["extra"]),en,bi,{component:"li","aria-disabled":_t,style:(0,te.Z)((0,te.Z)({},Yt),ot),className:k()(xt,(0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(xt,"-active"),xr),"".concat(xt,"-selected"),tn),"".concat(xt,"-disabled"),Mt),He),onClick:Jn,onKeyDown:wn,onFocus:Bn}),sr,e.createElement(Hr,{props:(0,te.Z)((0,te.Z)({},xe),{},{isSelected:tn}),icon:qr}));return Ht&&(qn=Ht(qn,xe,{selected:tn})),qn});function nn(xe,Ge){var ot=xe.eventKey,He=ue(),dt=ae(ot);return e.useEffect(function(){if(He)return He.registerPath(ot,dt),function(){He.unregisterPath(ot,dt)}},[dt]),He?null:e.createElement(gr,(0,z.Z)({},xe,{ref:Ge}))}var ar=e.forwardRef(nn),Tr=["className","children"],an=function(Ge,ot){var He=Ge.className,dt=Ge.children,ht=(0,M.Z)(Ge,Tr),_t=e.useContext(Ue),It=_t.prefixCls,sr=_t.mode,Vt=_t.rtl;return e.createElement("ul",(0,z.Z)({className:k()(It,Vt&&"".concat(It,"-rtl"),"".concat(It,"-sub"),"".concat(It,"-").concat(sr==="inline"?"inline":"vertical"),He),role:"menu"},ht,{"data-menu-list":!0,ref:ot}),dt)},hn=e.forwardRef(an);hn.displayName="SubMenuList";var Tn=hn,yi=B(50344);function as(xe,Ge){return(0,yi.Z)(xe).map(function(ot,He){if(e.isValidElement(ot)){var dt,ht,_t=ot.key,It=(dt=(ht=ot.props)===null||ht===void 0?void 0:ht.eventKey)!==null&&dt!==void 0?dt:_t,sr=It==null;sr&&(It="tmp_key-".concat([].concat((0,U.Z)(Ge),[He]).join("-")));var Vt={key:It,eventKey:It};return e.cloneElement(ot,Vt)}return ot})}var Za=B(98280),Qn={adjustX:1,adjustY:1},Ga={topLeft:{points:["bl","tl"],overflow:Qn},topRight:{points:["br","tr"],overflow:Qn},bottomLeft:{points:["tl","bl"],overflow:Qn},bottomRight:{points:["tr","br"],overflow:Qn},leftTop:{points:["tr","tl"],overflow:Qn},leftBottom:{points:["br","bl"],overflow:Qn},rightTop:{points:["tl","tr"],overflow:Qn},rightBottom:{points:["bl","br"],overflow:Qn}},$a={topLeft:{points:["bl","tl"],overflow:Qn},topRight:{points:["br","tr"],overflow:Qn},bottomLeft:{points:["tl","bl"],overflow:Qn},bottomRight:{points:["tr","br"],overflow:Qn},rightTop:{points:["tr","tl"],overflow:Qn},rightBottom:{points:["br","bl"],overflow:Qn},leftTop:{points:["tl","tr"],overflow:Qn},leftBottom:{points:["bl","br"],overflow:Qn}},Pa=null;function gi(xe,Ge,ot){if(Ge)return Ge;if(ot)return ot[xe]||ot.other}var ki={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function xi(xe){var Ge=xe.prefixCls,ot=xe.visible,He=xe.children,dt=xe.popup,ht=xe.popupStyle,_t=xe.popupClassName,It=xe.popupOffset,sr=xe.disabled,Vt=xe.mode,Sr=xe.onVisibleChange,fr=e.useContext(Ue),Dr=fr.getPopupContainer,Vr=fr.rtl,mr=fr.subMenuOpenDelay,sn=fr.subMenuCloseDelay,kr=fr.builtinPlacements,j=fr.triggerSubMenuAction,ne=fr.forceSubMenuRender,q=fr.rootClassName,De=fr.motion,ze=fr.defaultMotions,ut=e.useState(!1),gt=(0,L.Z)(ut,2),Lt=gt[0],wt=gt[1],Ht=Vr?(0,te.Z)((0,te.Z)({},$a),kr):(0,te.Z)((0,te.Z)({},Ga),kr),xt=ki[Vt],bt=gi(Vt,De,ze),Ot=e.useRef(bt);Vt!=="inline"&&(Ot.current=bt);var Mt=(0,te.Z)((0,te.Z)({},Ot.current),{},{leavedClassName:"".concat(Ge,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Gt=e.useRef();return e.useEffect(function(){return Gt.current=(0,lt.Z)(function(){wt(ot)}),function(){lt.Z.cancel(Gt.current)}},[ot]),e.createElement(Za.Z,{prefixCls:Ge,popupClassName:k()("".concat(Ge,"-popup"),(0,oe.Z)({},"".concat(Ge,"-rtl"),Vr),_t,q),stretch:Vt==="horizontal"?"minWidth":null,getPopupContainer:Dr,builtinPlacements:Ht,popupPlacement:xt,popupVisible:Lt,popup:dt,popupStyle:ht,popupAlign:It&&{offset:It},action:sr?[]:[j],mouseEnterDelay:mr,mouseLeaveDelay:sn,onPopupVisibleChange:Sr,forceRender:ne,popupMotion:Mt,fresh:!0},He)}var Ei=B(62874);function ba(xe){var Ge=xe.id,ot=xe.open,He=xe.keyPath,dt=xe.children,ht="inline",_t=e.useContext(Ue),It=_t.prefixCls,sr=_t.forceSubMenuRender,Vt=_t.motion,Sr=_t.defaultMotions,fr=_t.mode,Dr=e.useRef(!1);Dr.current=fr===ht;var Vr=e.useState(!Dr.current),mr=(0,L.Z)(Vr,2),sn=mr[0],kr=mr[1],j=Dr.current?ot:!1;e.useEffect(function(){Dr.current&&kr(!1)},[fr]);var ne=(0,te.Z)({},gi(ht,Vt,Sr));He.length>1&&(ne.motionAppear=!1);var q=ne.onVisibleChanged;return ne.onVisibleChanged=function(De){return!Dr.current&&!De&&kr(!0),q==null?void 0:q(De)},sn?null:e.createElement(Z,{mode:ht,locked:!Dr.current},e.createElement(Ei.Z,(0,z.Z)({visible:j},ne,{forceRender:sr,removeOnLeave:!1,leavedClassName:"".concat(It,"-hidden")}),function(De){var ze=De.className,ut=De.style;return e.createElement(Tn,{id:Ge,className:ze,style:ut},dt)}))}var ss=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Ua=["active"],Ya=e.forwardRef(function(xe,Ge){var ot=xe.style,He=xe.className,dt=xe.title,ht=xe.eventKey,_t=xe.warnKey,It=xe.disabled,sr=xe.internalPopupClose,Vt=xe.children,Sr=xe.itemIcon,fr=xe.expandIcon,Dr=xe.popupClassName,Vr=xe.popupOffset,mr=xe.popupStyle,sn=xe.onClick,kr=xe.onMouseEnter,j=xe.onMouseLeave,ne=xe.onTitleClick,q=xe.onTitleMouseEnter,De=xe.onTitleMouseLeave,ze=(0,M.Z)(xe,ss),ut=Ce(ht),gt=e.useContext(Ue),Lt=gt.prefixCls,wt=gt.mode,Ht=gt.openKeys,xt=gt.disabled,bt=gt.overflowDisabled,Ot=gt.activeKey,Mt=gt.selectedKeys,Gt=gt.itemIcon,Br=gt.expandIcon,nr=gt.onItemClick,qr=gt.onOpenChange,Pr=gt.onActive,xr=e.useContext(he),en=xr._internalRenderSubMenuItem,tn=e.useContext(_e),Yt=tn.isSubPathKey,Jn=ae(),wn="".concat(Lt,"-submenu"),Bn=xt||It,bi=e.useRef(),qn=e.useRef(),ui=Sr!=null?Sr:Gt,bn=fr!=null?fr:Br,li=Ht.includes(ht),mi=!bt&&li,Di=Yt(Mt,ht),Ni=Cr(ht,Bn,q,De),Pn=Ni.active,ei=(0,M.Z)(Ni,Ua),Gr=e.useState(!1),Pi=(0,L.Z)(Gr,2),Bi=Pi[0],fi=Pi[1],zr=function(ni){Bn||fi(ni)},Li=function(ni){zr(!0),kr==null||kr({key:ht,domEvent:ni})},ua=function(ni){zr(!1),j==null||j({key:ht,domEvent:ni})},la=e.useMemo(function(){return Pn||(wt!=="inline"?Bi||Yt([Ot],ht):!1)},[wt,Pn,Ot,Bi,ht,Yt]),ti=lr(Jn.length),Ln=function(ni){Bn||(ne==null||ne({key:ht,domEvent:ni}),wt==="inline"&&qr(ht,!li))},Zi=mt(function(vn){sn==null||sn(Qt(vn)),nr(vn)}),ea=function(ni){wt!=="inline"&&qr(ht,ni)},Vn=function(){Pr(ht)},Si=ut&&"".concat(ut,"-popup"),ci=e.useMemo(function(){return e.createElement(Hr,{icon:wt!=="horizontal"?bn:void 0,props:(0,te.Z)((0,te.Z)({},xe),{},{isOpen:mi,isSubMenu:!0})},e.createElement("i",{className:"".concat(wn,"-arrow")}))},[wt,bn,xe,mi,wn]),zn=e.createElement("div",(0,z.Z)({role:"menuitem",style:ti,className:"".concat(wn,"-title"),tabIndex:Bn?null:-1,ref:bi,title:typeof dt=="string"?dt:null,"data-menu-id":bt&&ut?null:ut,"aria-expanded":mi,"aria-haspopup":!0,"aria-controls":Si,"aria-disabled":Bn,onClick:Ln,onFocus:Vn},ei),dt,ci),Gi=e.useRef(wt);if(wt!=="inline"&&Jn.length>1?Gi.current="vertical":Gi.current=wt,!bt){var $i=Gi.current;zn=e.createElement(xi,{mode:$i,prefixCls:wn,visible:!sr&&mi&&wt!=="inline",popupClassName:Dr,popupOffset:Vr,popupStyle:mr,popup:e.createElement(Z,{mode:$i==="horizontal"?"vertical":$i},e.createElement(Tn,{id:Si,ref:qn},Vt)),disabled:Bn,onVisibleChange:ea},zn)}var ri=e.createElement(Ee.Item,(0,z.Z)({ref:Ge,role:"none"},ze,{component:"li",style:ot,className:k()(wn,"".concat(wn,"-").concat(wt),He,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(wn,"-open"),mi),"".concat(wn,"-active"),la),"".concat(wn,"-selected"),Di),"".concat(wn,"-disabled"),Bn)),onMouseEnter:Li,onMouseLeave:ua}),zn,!bt&&e.createElement(ba,{id:Si,open:mi,keyPath:Jn},Vt));return en&&(ri=en(ri,xe,{selected:Di,active:la,open:mi,disabled:Bn})),e.createElement(Z,{onItemClick:Zi,mode:wt==="horizontal"?"vertical":wt,itemIcon:ui,expandIcon:bn},ri)}),Ts=e.forwardRef(function(xe,Ge){var ot=xe.eventKey,He=xe.children,dt=ae(ot),ht=as(He,dt),_t=ue();e.useEffect(function(){if(_t)return _t.registerPath(ot,dt),function(){_t.unregisterPath(ot,dt)}},[dt]);var It;return _t?It=ht:It=e.createElement(Ya,(0,z.Z)({ref:Ge},xe),ht),e.createElement(pe.Provider,{value:dt},It)}),Sa=Ts,ws=B(71002);function La(xe){var Ge=xe.className,ot=xe.style,He=e.useContext(Ue),dt=He.prefixCls,ht=ue();return ht?null:e.createElement("li",{role:"separator",className:k()("".concat(dt,"-item-divider"),Ge),style:ot})}var qi=["className","title","eventKey","children"],Ka=e.forwardRef(function(xe,Ge){var ot=xe.className,He=xe.title,dt=xe.eventKey,ht=xe.children,_t=(0,M.Z)(xe,qi),It=e.useContext(Ue),sr=It.prefixCls,Vt="".concat(sr,"-item-group");return e.createElement("li",(0,z.Z)({ref:Ge,role:"presentation"},_t,{onClick:function(fr){return fr.stopPropagation()},className:k()(Vt,ot)}),e.createElement("div",{role:"presentation",className:"".concat(Vt,"-title"),title:typeof He=="string"?He:void 0},He),e.createElement("ul",{role:"group",className:"".concat(Vt,"-list")},ht))}),oa=e.forwardRef(function(xe,Ge){var ot=xe.eventKey,He=xe.children,dt=ae(ot),ht=as(He,dt),_t=ue();return _t?ht:e.createElement(Ka,(0,z.Z)({ref:Ge},(0,Ar.Z)(xe,["warnKey"])),ht)}),Fi=oa,Vi=["label","children","key","type","extra"];function Oa(xe,Ge,ot){var He=Ge.item,dt=Ge.group,ht=Ge.submenu,_t=Ge.divider;return(xe||[]).map(function(It,sr){if(It&&(0,ws.Z)(It)==="object"){var Vt=It,Sr=Vt.label,fr=Vt.children,Dr=Vt.key,Vr=Vt.type,mr=Vt.extra,sn=(0,M.Z)(Vt,Vi),kr=Dr!=null?Dr:"tmp-".concat(sr);return fr||Vr==="group"?Vr==="group"?e.createElement(dt,(0,z.Z)({key:kr},sn,{title:Sr}),Oa(fr,Ge,ot)):e.createElement(ht,(0,z.Z)({key:kr},sn,{title:Sr}),Oa(fr,Ge,ot)):Vr==="divider"?e.createElement(_t,(0,z.Z)({key:kr},sn)):e.createElement(He,(0,z.Z)({key:kr},sn,{extra:mr}),Sr,(!!mr||mr===0)&&e.createElement("span",{className:"".concat(ot,"-item-extra")},mr))}return null}).filter(function(It){return It})}function ds(xe,Ge,ot,He,dt){var ht=xe,_t=(0,te.Z)({divider:La,item:ar,group:Fi,submenu:Sa},He);return Ge&&(ht=Oa(Ge,_t,dt)),as(ht,ot)}var ks=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],zi=[],Ri=e.forwardRef(function(xe,Ge){var ot,He=xe,dt=He.prefixCls,ht=dt===void 0?"rc-menu":dt,_t=He.rootClassName,It=He.style,sr=He.className,Vt=He.tabIndex,Sr=Vt===void 0?0:Vt,fr=He.items,Dr=He.children,Vr=He.direction,mr=He.id,sn=He.mode,kr=sn===void 0?"vertical":sn,j=He.inlineCollapsed,ne=He.disabled,q=He.disabledOverflow,De=He.subMenuOpenDelay,ze=De===void 0?.1:De,ut=He.subMenuCloseDelay,gt=ut===void 0?.1:ut,Lt=He.forceSubMenuRender,wt=He.defaultOpenKeys,Ht=He.openKeys,xt=He.activeKey,bt=He.defaultActiveFirst,Ot=He.selectable,Mt=Ot===void 0?!0:Ot,Gt=He.multiple,Br=Gt===void 0?!1:Gt,nr=He.defaultSelectedKeys,qr=He.selectedKeys,Pr=He.onSelect,xr=He.onDeselect,en=He.inlineIndent,tn=en===void 0?24:en,Yt=He.motion,Jn=He.defaultMotions,wn=He.triggerSubMenuAction,Bn=wn===void 0?"hover":wn,bi=He.builtinPlacements,qn=He.itemIcon,ui=He.expandIcon,bn=He.overflowedIndicator,li=bn===void 0?"...":bn,mi=He.overflowedIndicatorPopupClassName,Di=He.getPopupContainer,Ni=He.onClick,Pn=He.onOpenChange,ei=He.onKeyDown,Gr=He.openAnimation,Pi=He.openTransitionName,Bi=He._internalRenderMenuItem,fi=He._internalRenderSubMenuItem,zr=He._internalComponents,Li=(0,M.Z)(He,ks),ua=e.useMemo(function(){return[ds(Dr,fr,zi,zr,ht),ds(Dr,fr,zi,{},ht)]},[Dr,fr,zr]),la=(0,L.Z)(ua,2),ti=la[0],Ln=la[1],Zi=e.useState(!1),ea=(0,L.Z)(Zi,2),Vn=ea[0],Si=ea[1],ci=e.useRef(),zn=Xe(mr),Gi=Vr==="rtl",$i=(0,ge.Z)(wt,{value:Ht,postState:function(cn){return cn||zi}}),ri=(0,L.Z)($i,2),vn=ri[0],ni=ri[1],di=function(cn){var yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function hi(){ni(cn),Pn==null||Pn(cn)}yn?(0,t.flushSync)(hi):hi()},hs=e.useState(vn),pn=(0,L.Z)(hs,2),Ia=pn[0],Wa=pn[1],ii=e.useRef(!1),ta=e.useMemo(function(){return(kr==="inline"||kr==="vertical")&&j?["vertical",j]:[kr,!1]},[kr,j]),ra=(0,L.Z)(ta,2),fa=ra[0],_r=ra[1],Zr=fa==="inline",fn=e.useState(fa),Zn=(0,L.Z)(fn,2),On=Zn[0],As=Zn[1],us=e.useState(_r),ca=(0,L.Z)(us,2),Xa=ca[0],Hs=ca[1];e.useEffect(function(){As(fa),Hs(_r),ii.current&&(Zr?ni(Ia):di(zi))},[fa,_r]);var vs=e.useState(0),Ns=(0,L.Z)(vs,2),Qa=Ns[0],Ma=Ns[1],Ui=Qa>=ti.length-1||On!=="horizontal"||q;e.useEffect(function(){Zr&&Wa(vn)},[vn]),e.useEffect(function(){return ii.current=!0,function(){ii.current=!1}},[]);var da=St(),Ki=da.registerPath,ja=da.unregisterPath,An=da.refreshOverflowKeys,Sn=da.isSubPathKey,xa=da.getKeyPath,Ja=da.getKeys,Cs=da.getSubPathKeys,ha=e.useMemo(function(){return{registerPath:Ki,unregisterPath:ja}},[Ki,ja]),Bs=e.useMemo(function(){return{isSubPathKey:Sn}},[Sn]);e.useEffect(function(){An(Ui?zi:ti.slice(Qa+1).map(function(Gn){return Gn.key}))},[Qa,Ui]);var ps=(0,ge.Z)(xt||bt&&((ot=ti[0])===null||ot===void 0?void 0:ot.key),{value:xt}),Zt=(0,L.Z)(ps,2),va=Zt[0],gs=Zt[1],Rs=mt(function(Gn){gs(Gn)}),ls=mt(function(){gs(void 0)});(0,e.useImperativeHandle)(Ge,function(){return{list:ci.current,focus:function(cn){var yn,hi=Ja(),Wi=ve(hi,zn),ka=Wi.elements,Da=Wi.key2element,Vs=Wi.element2key,Os=Q(ci.current,ka),Ta=va!=null?va:Os[0]?Vs.get(Os[0]):(yn=ti.find(function(ts){return!ts.props.disabled}))===null||yn===void 0?void 0:yn.key,Yi=Da.get(Ta);if(Ta&&Yi){var es;Yi==null||(es=Yi.focus)===null||es===void 0||es.call(Yi,cn)}}}});var Ps=(0,ge.Z)(nr||[],{value:qr,postState:function(cn){return Array.isArray(cn)?cn:cn==null?zi:[cn]}}),qa=(0,L.Z)(Ps,2),ma=qa[0],Ha=qa[1],fs=function(cn){if(Mt){var yn=cn.key,hi=ma.includes(yn),Wi;Br?hi?Wi=ma.filter(function(Da){return Da!==yn}):Wi=[].concat((0,U.Z)(ma),[yn]):Wi=[yn],Ha(Wi);var ka=(0,te.Z)((0,te.Z)({},cn),{},{selectedKeys:Wi});hi?xr==null||xr(ka):Pr==null||Pr(ka)}!Br&&vn.length&&On!=="inline"&&di(zi)},ms=mt(function(Gn){Ni==null||Ni(Qt(Gn)),fs(Gn)}),Ls=mt(function(Gn,cn){var yn=vn.filter(function(Wi){return Wi!==Gn});if(cn)yn.push(Gn);else if(On!=="inline"){var hi=Cs(Gn);yn=yn.filter(function(Wi){return!hi.has(Wi)})}(0,Pe.Z)(vn,yn,!0)||di(yn,!0)}),Oi=function(cn,yn){var hi=yn!=null?yn:!vn.includes(cn);Ls(cn,hi)},Us=Ke(On,va,Gi,zn,ci,Ja,xa,gs,Oi,ei);e.useEffect(function(){Si(!0)},[]);var Qs=e.useMemo(function(){return{_internalRenderMenuItem:Bi,_internalRenderSubMenuItem:fi}},[Bi,fi]),cs=On!=="horizontal"||q?ti:ti.map(function(Gn,cn){return e.createElement(Z,{key:Gn.key,overflowDisabled:cn>Qa},Gn)}),_s=e.createElement(Ee,(0,z.Z)({id:mr,ref:ci,prefixCls:"".concat(ht,"-overflow"),component:"ul",itemComponent:ar,className:k()(ht,"".concat(ht,"-root"),"".concat(ht,"-").concat(On),sr,(0,oe.Z)((0,oe.Z)({},"".concat(ht,"-inline-collapsed"),Xa),"".concat(ht,"-rtl"),Gi),_t),dir:Vr,style:It,role:"menu",tabIndex:Sr,data:cs,renderRawItem:function(cn){return cn},renderRawRest:function(cn){var yn=cn.length,hi=yn?ti.slice(-yn):null;return e.createElement(Sa,{eventKey:et,title:li,disabled:Ui,internalPopupClose:yn===0,popupClassName:mi},hi)},maxCount:On!=="horizontal"||q?Ee.INVALIDATE:Ee.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(cn){Ma(cn)},onKeyDown:Us},Li));return e.createElement(he.Provider,{value:Qs},e.createElement($e.Provider,{value:zn},e.createElement(Z,{prefixCls:ht,rootClassName:_t,mode:On,openKeys:vn,rtl:Gi,disabled:ne,motion:Vn?Yt:null,defaultMotions:Vn?Jn:null,activeKey:va,onActive:Rs,onInactive:ls,selectedKeys:ma,inlineIndent:tn,subMenuOpenDelay:ze,subMenuCloseDelay:gt,forceSubMenuRender:Lt,builtinPlacements:bi,triggerSubMenuAction:Bn,getPopupContainer:Di,itemIcon:qn,expandIcon:ui,onItemClick:ms,onOpenChange:Ls},e.createElement(_e.Provider,{value:Bs},_s),e.createElement("div",{style:{display:"none"},"aria-hidden":!0},e.createElement(we.Provider,{value:ha},Ln)))))}),js=Ri,os=js;os.Item=ar,os.SubMenu=Sa,os.ItemGroup=Fi,os.Divider=La;var Fs=os},62874:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return Ye}});var z=B(4942),oe=B(1413),te=B(97685),U=B(71002),L=B(67294),M=B(34203),P=B(42550),k=B(94184),e=B.n(k),O=B(98924);function D(ke,be){var Re={};return Re[ke.toLowerCase()]=be.toLowerCase(),Re["Webkit".concat(ke)]="webkit".concat(be),Re["Moz".concat(ke)]="moz".concat(be),Re["ms".concat(ke)]="MS".concat(be),Re["O".concat(ke)]="o".concat(be.toLowerCase()),Re}function l(ke,be){var Re={animationend:D("Animation","AnimationEnd"),transitionend:D("Transition","TransitionEnd")};return ke&&("AnimationEvent"in be||delete Re.animationend.animation,"TransitionEvent"in be||delete Re.transitionend.transition),Re}var p=l((0,O.Z)(),typeof window!="undefined"?window:{}),h={};if((0,O.Z)()){var g=document.createElement("div");h=g.style}var o={};function c(ke){if(o[ke])return o[ke];var be=p[ke];if(be)for(var Re=Object.keys(be),Fe=Re.length,Ae=0;Ae<Fe;Ae+=1){var Me=Re[Ae];if(Object.prototype.hasOwnProperty.call(be,Me)&&Me in h)return o[ke]=be[Me],o[ke]}return""}var y=c("animationend"),u=c("transitionend"),s=!!(y&&u),i=y||"animationend",t=u||"transitionend";function m(ke,be){if(!ke)return null;if((0,U.Z)(ke)==="object"){var Re=be.replace(/-\w/g,function(Fe){return Fe[1].toUpperCase()});return ke[Re]}return"".concat(ke,"-").concat(be)}var S="none",f="appear",_="enter",A="leave",x="none",w="prepare",n="start",a="active",r="end",d=B(63896),T=B(75164),b=function(){var ke=L.useRef(null);function be(){T.Z.cancel(ke.current)}function Re(Fe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;be();var Me=(0,T.Z)(function(){Ae<=1?Fe({isCanceled:function(){return Me!==ke.current}}):Re(Fe,Ae-1)});ke.current=Me}return L.useEffect(function(){return function(){be()}},[]),[Re,be]},v=(0,O.Z)()?L.useLayoutEffect:L.useEffect,E=v,R=[w,n,a,r],C=!1,N=!0;function K(ke){return ke===a||ke===r}var H=function(ke,be){var Re=(0,d.Z)(x),Fe=(0,te.Z)(Re,2),Ae=Fe[0],Me=Fe[1],rt=b(),lt=(0,te.Z)(rt,2),Ze=lt[0],ft=lt[1];function Et(){Me(w,!0)}return E(function(){if(Ae!==x&&Ae!==r){var qe=R.indexOf(Ae),pt=R[qe+1],Se=be(Ae);Se===C?Me(pt,!0):Ze(function(ye){function Te(){ye.isCanceled()||Me(pt,!0)}Se===!0?Te():Promise.resolve(Se).then(Te)})}},[ke,Ae]),L.useEffect(function(){return function(){ft()}},[]),[Et,Ae]},ee=function(ke){var be=(0,L.useRef)(),Re=(0,L.useRef)(ke);Re.current=ke;var Fe=L.useCallback(function(rt){Re.current(rt)},[]);function Ae(rt){rt&&(rt.removeEventListener(t,Fe),rt.removeEventListener(i,Fe))}function Me(rt){be.current&&be.current!==rt&&Ae(be.current),rt&&rt!==be.current&&(rt.addEventListener(t,Fe),rt.addEventListener(i,Fe),be.current=rt)}return L.useEffect(function(){return function(){Ae(be.current)}},[]),[Me,Ae]};function J(ke,be,Re,Fe){var Ae=Fe.motionEnter,Me=Ae===void 0?!0:Ae,rt=Fe.motionAppear,lt=rt===void 0?!0:rt,Ze=Fe.motionLeave,ft=Ze===void 0?!0:Ze,Et=Fe.motionDeadline,qe=Fe.motionLeaveImmediately,pt=Fe.onAppearPrepare,Se=Fe.onEnterPrepare,ye=Fe.onLeavePrepare,Te=Fe.onAppearStart,Y=Fe.onEnterStart,W=Fe.onLeaveStart,X=Fe.onAppearActive,ie=Fe.onEnterActive,Q=Fe.onLeaveActive,de=Fe.onAppearEnd,ve=Fe.onEnterEnd,Ke=Fe.onLeaveEnd,We=Fe.onVisibleChanged,ct=(0,d.Z)(),at=(0,te.Z)(ct,2),nt=at[0],et=at[1],St=(0,d.Z)(S),mt=(0,te.Z)(St,2),Tt=mt[0],Pt=mt[1],Xe=(0,d.Z)(null),st=(0,te.Z)(Xe,2),Rt=st[0],jt=st[1],qt=(0,L.useRef)(!1),Ar=(0,L.useRef)(null);function jr(){return Re()}var Cr=(0,L.useRef)(!1);function lr(an){var hn=jr();if(!(an&&!an.deadline&&an.target!==hn)){var Tn=Cr.current,yi;Tt===f&&Tn?yi=de==null?void 0:de(hn,an):Tt===_&&Tn?yi=ve==null?void 0:ve(hn,an):Tt===A&&Tn&&(yi=Ke==null?void 0:Ke(hn,an)),Tt!==S&&Tn&&yi!==!1&&(Pt(S,!0),jt(null,!0))}}var Hr=ee(lr),Jr=(0,te.Z)(Hr,1),Qt=Jr[0],Nr=L.useMemo(function(){var an,hn,Tn;switch(Tt){case f:return an={},(0,z.Z)(an,w,pt),(0,z.Z)(an,n,Te),(0,z.Z)(an,a,X),an;case _:return hn={},(0,z.Z)(hn,w,Se),(0,z.Z)(hn,n,Y),(0,z.Z)(hn,a,ie),hn;case A:return Tn={},(0,z.Z)(Tn,w,ye),(0,z.Z)(Tn,n,W),(0,z.Z)(Tn,a,Q),Tn;default:return{}}},[Tt]),Rr=H(Tt,function(an){if(an===w){var hn=Nr[w];return hn?hn(jr()):C}if(gr in Nr){var Tn;jt(((Tn=Nr[gr])===null||Tn===void 0?void 0:Tn.call(Nr,jr(),null))||null)}return gr===a&&(Qt(jr()),Et>0&&(clearTimeout(Ar.current),Ar.current=setTimeout(function(){lr({deadline:!0})},Et))),N}),rr=(0,te.Z)(Rr,2),pr=rr[0],gr=rr[1],nn=K(gr);Cr.current=nn,E(function(){et(be);var an=qt.current;if(qt.current=!0,!!ke){var hn;!an&&be&<&&(hn=f),an&&be&&Me&&(hn=_),(an&&!be&&ft||!an&&qe&&!be&&ft)&&(hn=A),hn&&(Pt(hn),pr())}},[be]),(0,L.useEffect)(function(){(Tt===f&&!lt||Tt===_&&!Me||Tt===A&&!ft)&&Pt(S)},[lt,Me,ft]),(0,L.useEffect)(function(){return function(){qt.current=!1,clearTimeout(Ar.current)}},[]);var ar=L.useRef(!1);(0,L.useEffect)(function(){nt&&(ar.current=!0),nt!==void 0&&Tt===S&&((ar.current||nt)&&(We==null||We(nt)),ar.current=!0)},[nt,Tt]);var Tr=Rt;return Nr[w]&&gr===n&&(Tr=(0,oe.Z)({transition:"none"},Tr)),[Tt,gr,Tr,nt!=null?nt:be]}var se=B(15671),G=B(43144),Ee=B(60136),ge=B(29388),Pe=function(ke){(0,Ee.Z)(Re,ke);var be=(0,ge.Z)(Re);function Re(){return(0,se.Z)(this,Re),be.apply(this,arguments)}return(0,G.Z)(Re,[{key:"render",value:function(){return this.props.children}}]),Re}(L.Component),Ne=Pe;function $e(ke){var be=ke;(0,U.Z)(ke)==="object"&&(be=ke.transitionSupport);function Re(Ae){return!!(Ae.motionName&&be)}var Fe=L.forwardRef(function(Ae,Me){var rt=Ae.visible,lt=rt===void 0?!0:rt,Ze=Ae.removeOnLeave,ft=Ze===void 0?!0:Ze,Et=Ae.forceRender,qe=Ae.children,pt=Ae.motionName,Se=Ae.leavedClassName,ye=Ae.eventProps,Te=Re(Ae),Y=(0,L.useRef)(),W=(0,L.useRef)();function X(){try{return Y.current instanceof HTMLElement?Y.current:(0,M.Z)(W.current)}catch(Xe){return null}}var ie=J(Te,lt,X,Ae),Q=(0,te.Z)(ie,4),de=Q[0],ve=Q[1],Ke=Q[2],We=Q[3],ct=L.useRef(We);We&&(ct.current=!0);var at=L.useCallback(function(Xe){Y.current=Xe,(0,P.mH)(Me,Xe)},[Me]),nt,et=(0,oe.Z)((0,oe.Z)({},ye),{},{visible:lt});if(!qe)nt=null;else if(de===S||!Re(Ae))We?nt=qe((0,oe.Z)({},et),at):!ft&&ct.current&&Se?nt=qe((0,oe.Z)((0,oe.Z)({},et),{},{className:Se}),at):Et||!ft&&!Se?nt=qe((0,oe.Z)((0,oe.Z)({},et),{},{style:{display:"none"}}),at):nt=null;else{var St,mt;ve===w?mt="prepare":K(ve)?mt="active":ve===n&&(mt="start"),nt=qe((0,oe.Z)((0,oe.Z)({},et),{},{className:e()(m(pt,de),(St={},(0,z.Z)(St,m(pt,"".concat(de,"-").concat(mt)),mt),(0,z.Z)(St,pt,typeof pt=="string"),St)),style:Ke}),at)}if(L.isValidElement(nt)&&(0,P.Yr)(nt)){var Tt=nt,Pt=Tt.ref;Pt||(nt=L.cloneElement(nt,{ref:at}))}return L.createElement(Ne,{ref:W},nt)});return Fe.displayName="CSSMotion",Fe}var je=$e(s),Ce=B(87462),fe=B(45987),Be=B(97326),Ue="add",re="keep",Z="remove",le="removed";function we(ke){var be;return ke&&(0,U.Z)(ke)==="object"&&"key"in ke?be=ke:be={key:ke},(0,oe.Z)((0,oe.Z)({},be),{},{key:String(be.key)})}function ue(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ke.map(we)}function pe(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Re=[],Fe=0,Ae=be.length,Me=ue(ke),rt=ue(be);Me.forEach(function(ft){for(var Et=!1,qe=Fe;qe<Ae;qe+=1){var pt=rt[qe];if(pt.key===ft.key){Fe<qe&&(Re=Re.concat(rt.slice(Fe,qe).map(function(Se){return(0,oe.Z)((0,oe.Z)({},Se),{},{status:Ue})})),Fe=qe),Re.push((0,oe.Z)((0,oe.Z)({},pt),{},{status:re})),Fe+=1,Et=!0;break}}Et||Re.push((0,oe.Z)((0,oe.Z)({},ft),{},{status:Z}))}),Fe<Ae&&(Re=Re.concat(rt.slice(Fe).map(function(ft){return(0,oe.Z)((0,oe.Z)({},ft),{},{status:Ue})})));var lt={};Re.forEach(function(ft){var Et=ft.key;lt[Et]=(lt[Et]||0)+1});var Ze=Object.keys(lt).filter(function(ft){return lt[ft]>1});return Ze.forEach(function(ft){Re=Re.filter(function(Et){var qe=Et.key,pt=Et.status;return qe!==ft||pt!==Z}),Re.forEach(function(Et){Et.key===ft&&(Et.status=re)})}),Re}var ae=["component","children","onVisibleChanged","onAllRemoved"],_e=["status"],ce=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function he(ke){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:je,Re=function(Fe){(0,Ee.Z)(Me,Fe);var Ae=(0,ge.Z)(Me);function Me(){var rt;(0,se.Z)(this,Me);for(var lt=arguments.length,Ze=new Array(lt),ft=0;ft<lt;ft++)Ze[ft]=arguments[ft];return rt=Ae.call.apply(Ae,[this].concat(Ze)),(0,z.Z)((0,Be.Z)(rt),"state",{keyEntities:[]}),(0,z.Z)((0,Be.Z)(rt),"removeKey",function(Et){var qe=rt.state.keyEntities,pt=qe.map(function(Se){return Se.key!==Et?Se:(0,oe.Z)((0,oe.Z)({},Se),{},{status:le})});return rt.setState({keyEntities:pt}),pt.filter(function(Se){var ye=Se.status;return ye!==le}).length}),rt}return(0,G.Z)(Me,[{key:"render",value:function(){var lt=this,Ze=this.state.keyEntities,ft=this.props,Et=ft.component,qe=ft.children,pt=ft.onVisibleChanged,Se=ft.onAllRemoved,ye=(0,fe.Z)(ft,ae),Te=Et||L.Fragment,Y={};return ce.forEach(function(W){Y[W]=ye[W],delete ye[W]}),delete ye.keys,L.createElement(Te,ye,Ze.map(function(W){var X=W.status,ie=(0,fe.Z)(W,_e),Q=X===Ue||X===re;return L.createElement(be,(0,Ce.Z)({},Y,{key:ie.key,visible:Q,eventProps:ie,onVisibleChanged:function(ve){if(pt==null||pt(ve,{key:ie.key}),!ve){var Ke=lt.removeKey(ie.key);Ke===0&&Se&&Se()}}}),qe)}))}}],[{key:"getDerivedStateFromProps",value:function(lt,Ze){var ft=lt.keys,Et=Ze.keyEntities,qe=ue(ft),pt=pe(Et,qe);return{keyEntities:pt.filter(function(Se){var ye=Et.find(function(Te){var Y=Te.key;return Se.key===Y});return!(ye&&ye.status===le&&Se.status===Z)})}}}]),Me}(L.Component);return(0,z.Z)(Re,"defaultProps",{component:"div"}),Re}var Le=he(s),Ye=je},48555:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return w}});var z=B(87462),oe=B(67294),te=B(50344),U=B(80334),L=B(1413),M=B(42550),P=B(34203),k=B(91033),e=new Map;function O(n){n.forEach(function(a){var r,d=a.target;(r=e.get(d))===null||r===void 0||r.forEach(function(T){return T(d)})})}var D=new k.Z(O),l=null,p=null;function h(n,a){e.has(n)||(e.set(n,new Set),D.observe(n)),e.get(n).add(a)}function g(n,a){e.has(n)&&(e.get(n).delete(a),e.get(n).size||(D.unobserve(n),e.delete(n)))}var o=B(15671),c=B(43144),y=B(60136),u=B(29388),s=function(n){(0,y.Z)(r,n);var a=(0,u.Z)(r);function r(){return(0,o.Z)(this,r),a.apply(this,arguments)}return(0,c.Z)(r,[{key:"render",value:function(){return this.props.children}}]),r}(oe.Component),i=oe.createContext(null);function t(n){var a=n.children,r=n.onBatchResize,d=oe.useRef(0),T=oe.useRef([]),b=oe.useContext(i),v=oe.useCallback(function(E,R,C){d.current+=1;var N=d.current;T.current.push({size:E,element:R,data:C}),Promise.resolve().then(function(){N===d.current&&(r==null||r(T.current),T.current=[])}),b==null||b(E,R,C)},[r,b]);return oe.createElement(i.Provider,{value:v},a)}function m(n,a){var r=n.children,d=n.disabled,T=oe.useRef(null),b=oe.useRef(null),v=oe.useContext(i),E=typeof r=="function",R=E?r(T):r,C=oe.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),N=!E&&oe.isValidElement(R)&&(0,M.Yr)(R),K=N?R.ref:null,H=oe.useMemo(function(){return(0,M.sQ)(K,T)},[K,T]),ee=function(){return(0,P.Z)(T.current)||(0,P.Z)(b.current)};oe.useImperativeHandle(a,function(){return ee()});var J=oe.useRef(n);J.current=n;var se=oe.useCallback(function(G){var Ee=J.current,ge=Ee.onResize,Pe=Ee.data,Ne=G.getBoundingClientRect(),$e=Ne.width,je=Ne.height,Ce=G.offsetWidth,fe=G.offsetHeight,Be=Math.floor($e),Ue=Math.floor(je);if(C.current.width!==Be||C.current.height!==Ue||C.current.offsetWidth!==Ce||C.current.offsetHeight!==fe){var re={width:Be,height:Ue,offsetWidth:Ce,offsetHeight:fe};C.current=re;var Z=Ce===Math.round($e)?$e:Ce,le=fe===Math.round(je)?je:fe,we=(0,L.Z)((0,L.Z)({},re),{},{offsetWidth:Z,offsetHeight:le});v==null||v(we,G,Pe),ge&&Promise.resolve().then(function(){ge(we,G)})}},[]);return oe.useEffect(function(){var G=ee();return G&&!d&&h(G,se),function(){return g(G,se)}},[T.current,d]),oe.createElement(s,{ref:b},N?oe.cloneElement(R,{ref:H}):R)}var S=oe.forwardRef(m),f=S,_="rc-observer-key";function A(n,a){var r=n.children,d=typeof r=="function"?[r]:(0,te.Z)(r);return d.map(function(T,b){var v=(T==null?void 0:T.key)||"".concat(_,"-").concat(b);return oe.createElement(f,(0,z.Z)({},n,{key:v,ref:b===0?a:void 0}),T)})}var x=oe.forwardRef(A);x.Collection=t;var w=x},36697:function(Ct,Qe,B){"use strict";B.d(Qe,{G:function(){return L},Z:function(){return S}});var z=B(94184),oe=B.n(z),te=B(67294),U=B.t(te,2);function L(f){var _=f.children,A=f.prefixCls,x=f.id,w=f.overlayInnerStyle,n=f.bodyClassName,a=f.className,r=f.style;return te.createElement("div",{className:oe()("".concat(A,"-content"),a),style:r},te.createElement("div",{className:oe()("".concat(A,"-inner"),n),id:x,role:"tooltip",style:w},typeof _=="function"?_():_))}var M=B(87462),P=B(1413),k=B(45987),e=B(98280),O={shiftX:64,adjustY:1},D={adjustX:1,shiftY:!0},l=[0,0],p={left:{points:["cr","cl"],overflow:D,offset:[-4,0],targetOffset:l},right:{points:["cl","cr"],overflow:D,offset:[4,0],targetOffset:l},top:{points:["bc","tc"],overflow:O,offset:[0,-4],targetOffset:l},bottom:{points:["tc","bc"],overflow:O,offset:[0,4],targetOffset:l},topLeft:{points:["bl","tl"],overflow:O,offset:[0,-4],targetOffset:l},leftTop:{points:["tr","tl"],overflow:D,offset:[-4,0],targetOffset:l},topRight:{points:["br","tr"],overflow:O,offset:[0,-4],targetOffset:l},rightTop:{points:["tl","tr"],overflow:D,offset:[4,0],targetOffset:l},bottomRight:{points:["tr","br"],overflow:O,offset:[0,4],targetOffset:l},rightBottom:{points:["bl","br"],overflow:D,offset:[4,0],targetOffset:l},bottomLeft:{points:["tl","bl"],overflow:O,offset:[0,4],targetOffset:l},leftBottom:{points:["br","bl"],overflow:D,offset:[-4,0],targetOffset:l}},h=null,g=B(97685);function o(){var f=(0,P.Z)({},U);return f.useId}var c=0;function y(){}var u=o(),s=u?function(_){var A=u();return _||A}:function(_){var A=te.useState("ssr-id"),x=(0,g.Z)(A,2),w=x[0],n=x[1];return te.useEffect(function(){var a=c;c+=1,n("rc_unique_".concat(a))},[]),_||w},i=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],t=function(_,A){var x=_.overlayClassName,w=_.trigger,n=w===void 0?["hover"]:w,a=_.mouseEnterDelay,r=a===void 0?0:a,d=_.mouseLeaveDelay,T=d===void 0?.1:d,b=_.overlayStyle,v=_.prefixCls,E=v===void 0?"rc-tooltip":v,R=_.children,C=_.onVisibleChange,N=_.afterVisibleChange,K=_.transitionName,H=_.animation,ee=_.motion,J=_.placement,se=J===void 0?"right":J,G=_.align,Ee=G===void 0?{}:G,ge=_.destroyTooltipOnHide,Pe=ge===void 0?!1:ge,Ne=_.defaultVisible,$e=_.getTooltipContainer,je=_.overlayInnerStyle,Ce=_.arrowContent,fe=_.overlay,Be=_.id,Ue=_.showArrow,re=Ue===void 0?!0:Ue,Z=_.classNames,le=_.styles,we=(0,k.Z)(_,i),ue=s(Be),pe=(0,te.useRef)(null);(0,te.useImperativeHandle)(A,function(){return pe.current});var ae=(0,P.Z)({},we);"visible"in _&&(ae.popupVisible=_.visible);var _e=function(){return te.createElement(L,{key:"content",prefixCls:E,id:ue,bodyClassName:Z==null?void 0:Z.body,overlayInnerStyle:(0,P.Z)((0,P.Z)({},je),le==null?void 0:le.body)},fe)},ce=function(){var Le=te.Children.only(R),Ye=(Le==null?void 0:Le.props)||{},ke=(0,P.Z)((0,P.Z)({},Ye),{},{"aria-describedby":fe?ue:null});return te.cloneElement(R,ke)};return te.createElement(e.Z,(0,M.Z)({popupClassName:oe()(x,Z==null?void 0:Z.root),prefixCls:E,popup:_e,action:n,builtinPlacements:p,popupPlacement:se,ref:pe,popupAlign:Ee,getPopupContainer:$e,onPopupVisibleChange:C,afterPopupVisibleChange:N,popupTransitionName:K,popupAnimation:H,popupMotion:ee,defaultPopupVisible:Ne,autoDestroy:Pe,mouseLeaveDelay:T,popupStyle:(0,P.Z)((0,P.Z)({},b),le==null?void 0:le.root),mouseEnterDelay:r,arrow:re},ae),ce())},m=(0,te.forwardRef)(t),S=m},48387:function(Ct,Qe,B){"use strict";B.d(Qe,{Qw:function(){return ts},FJ:function(){return Ks},hT:function(){return Fa},OF:function(){return Qa},ZP:function(){return io}});function z(){return z=Object.assign?Object.assign.bind():function(I){for(var F=1;F<arguments.length;F++){var V=arguments[F];for(var $ in V)({}).hasOwnProperty.call(V,$)&&(I[$]=V[$])}return I},z.apply(null,arguments)}function oe(I,F){(F==null||F>I.length)&&(F=I.length);for(var V=0,$=Array(F);V<F;V++)$[V]=I[V];return $}function te(I){if(Array.isArray(I))return oe(I)}function U(I){if(typeof Symbol!="undefined"&&I[Symbol.iterator]!=null||I["@@iterator"]!=null)return Array.from(I)}function L(I,F){if(I){if(typeof I=="string")return oe(I,F);var V={}.toString.call(I).slice(8,-1);return V==="Object"&&I.constructor&&(V=I.constructor.name),V==="Map"||V==="Set"?Array.from(I):V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V)?oe(I,F):void 0}}function M(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(I){return te(I)||U(I)||L(I)||M()}function k(I){"@babel/helpers - typeof";return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},k(I)}function e(I,F){if(k(I)!="object"||!I)return I;var V=I[Symbol.toPrimitive];if(V!==void 0){var $=V.call(I,F||"default");if(k($)!="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(I)}function O(I){var F=e(I,"string");return k(F)=="symbol"?F:F+""}function D(I,F,V){return(F=O(F))in I?Object.defineProperty(I,F,{value:V,enumerable:!0,configurable:!0,writable:!0}):I[F]=V,I}function l(I,F){var V=Object.keys(I);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(I);F&&($=$.filter(function(me){return Object.getOwnPropertyDescriptor(I,me).enumerable})),V.push.apply(V,$)}return V}function p(I){for(var F=1;F<arguments.length;F++){var V=arguments[F]!=null?arguments[F]:{};F%2?l(Object(V),!0).forEach(function($){D(I,$,V[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(V)):l(Object(V)).forEach(function($){Object.defineProperty(I,$,Object.getOwnPropertyDescriptor(V,$))})}return I}function h(I){if(Array.isArray(I))return I}function g(I,F){var V=I==null?null:typeof Symbol!="undefined"&&I[Symbol.iterator]||I["@@iterator"];if(V!=null){var $,me,Oe,Ie,Ve=[],Je=!0,it=!1;try{if(Oe=(V=V.call(I)).next,F===0){if(Object(V)!==V)return;Je=!1}else for(;!(Je=($=Oe.call(V)).done)&&(Ve.push($.value),Ve.length!==F);Je=!0);}catch(vt){it=!0,me=vt}finally{try{if(!Je&&V.return!=null&&(Ie=V.return(),Object(Ie)!==Ie))return}finally{if(it)throw me}}return Ve}}function o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(I,F){return h(I)||g(I,F)||L(I,F)||o()}function y(I,F){if(I==null)return{};var V={};for(var $ in I)if({}.hasOwnProperty.call(I,$)){if(F.indexOf($)!==-1)continue;V[$]=I[$]}return V}function u(I,F){if(I==null)return{};var V,$,me=y(I,F);if(Object.getOwnPropertySymbols){var Oe=Object.getOwnPropertySymbols(I);for($=0;$<Oe.length;$++)V=Oe[$],F.indexOf(V)===-1&&{}.propertyIsEnumerable.call(I,V)&&(me[V]=I[V])}return me}function s(){return s=Object.assign?Object.assign.bind():function(I){for(var F=1;F<arguments.length;F++){var V=arguments[F];for(var $ in V)Object.prototype.hasOwnProperty.call(V,$)&&(I[$]=V[$])}return I},s.apply(this,arguments)}function i(I,F){(F==null||F>I.length)&&(F=I.length);for(var V=0,$=new Array(F);V<F;V++)$[V]=I[V];return $}function t(I){if(Array.isArray(I))return i(I)}function m(I){if(typeof Symbol!="undefined"&&I[Symbol.iterator]!=null||I["@@iterator"]!=null)return Array.from(I)}function S(I,F){if(I){if(typeof I=="string")return i(I,F);var V=Object.prototype.toString.call(I).slice(8,-1);if(V==="Object"&&I.constructor&&(V=I.constructor.name),V==="Map"||V==="Set")return Array.from(I);if(V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V))return i(I,F)}}function f(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(I){return t(I)||m(I)||S(I)||f()}function A(I){"@babel/helpers - typeof";return A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},A(I)}function x(I,F){if(A(I)!=="object"||I===null)return I;var V=I[Symbol.toPrimitive];if(V!==void 0){var $=V.call(I,F||"default");if(A($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(I)}function w(I){var F=x(I,"string");return A(F)==="symbol"?F:String(F)}function n(I,F,V){return F=w(F),F in I?Object.defineProperty(I,F,{value:V,enumerable:!0,configurable:!0,writable:!0}):I[F]=V,I}function a(I,F){var V=Object.keys(I);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(I);F&&($=$.filter(function(me){return Object.getOwnPropertyDescriptor(I,me).enumerable})),V.push.apply(V,$)}return V}function r(I){for(var F=1;F<arguments.length;F++){var V=arguments[F]!=null?arguments[F]:{};F%2?a(Object(V),!0).forEach(function($){n(I,$,V[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(V)):a(Object(V)).forEach(function($){Object.defineProperty(I,$,Object.getOwnPropertyDescriptor(V,$))})}return I}function d(I){if(Array.isArray(I))return I}function T(I,F){var V=I==null?null:typeof Symbol!="undefined"&&I[Symbol.iterator]||I["@@iterator"];if(V!=null){var $,me,Oe,Ie,Ve=[],Je=!0,it=!1;try{if(Oe=(V=V.call(I)).next,F===0){if(Object(V)!==V)return;Je=!1}else for(;!(Je=($=Oe.call(V)).done)&&(Ve.push($.value),Ve.length!==F);Je=!0);}catch(vt){it=!0,me=vt}finally{try{if(!Je&&V.return!=null&&(Ie=V.return(),Object(Ie)!==Ie))return}finally{if(it)throw me}}return Ve}}function b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(I,F){return d(I)||T(I,F)||S(I,F)||b()}function E(I,F){if(I==null)return{};var V={},$=Object.keys(I),me,Oe;for(Oe=0;Oe<$.length;Oe++)me=$[Oe],!(F.indexOf(me)>=0)&&(V[me]=I[me]);return V}function R(I,F){if(I==null)return{};var V=E(I,F),$,me;if(Object.getOwnPropertySymbols){var Oe=Object.getOwnPropertySymbols(I);for(me=0;me<Oe.length;me++)$=Oe[me],!(F.indexOf($)>=0)&&Object.prototype.propertyIsEnumerable.call(I,$)&&(V[$]=I[$])}return V}var C=B(67294);function N(I){var F=C.useRef();F.current=I;var V=C.useCallback(function(){for(var $,me=arguments.length,Oe=new Array(me),Ie=0;Ie<me;Ie++)Oe[Ie]=arguments[Ie];return($=F.current)===null||$===void 0?void 0:$.call.apply($,[F].concat(Oe))},[]);return V}function K(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var H=K()?C.useLayoutEffect:C.useEffect,ee=H,J=function(F,V){var $=C.useRef(!0);H(function(){if(!$.current)return F()},V),H(function(){return $.current=!1,function(){$.current=!0}},[])};function se(I){var F=C.useRef(!1),V=C.useState(I),$=v(V,2),me=$[0],Oe=$[1];C.useEffect(function(){return F.current=!1,function(){F.current=!0}},[]);function Ie(Ve,Je){Je&&F.current||Oe(Ve)}return[me,Ie]}function G(I){return I!==void 0}function Ee(I,F){var V=F||{},$=V.defaultValue,me=V.value,Oe=V.onChange,Ie=V.postState,Ve=se(function(){return G(me)?me:G($)?typeof $=="function"?$():$:typeof I=="function"?I():I}),Je=v(Ve,2),it=Je[0],vt=Je[1],At=me!==void 0?me:it,Wt=Ie?Ie(At):At,Dt=N(Oe),Ft=se([At]),Nt=v(Ft,2),tt=Nt[0],yt=Nt[1];J(function(){var Ut=tt[0];it!==Ut&&Dt(it,Ut)},[tt]),J(function(){G(me)||vt(me)},[me]);var Bt=N(function(Ut,kt){vt(Ut,kt),yt([At],kt)});return[Wt,Bt]}var ge={};function Pe(I,F){}function Ne(I,F){}function $e(){ge={}}function je(I,F,V){!F&&!ge[V]&&(I(!1,V),ge[V]=!0)}function Ce(I,F){je(Pe,I,F)}function fe(I,F){je(Ne,I,F)}var Be=Ce,Ue=B(94184),re=B.n(Ue),Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var I=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(I)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(I==null?void 0:I.substr(0,4))},le=B(95936);function we(I,F,V){var $=C.useRef({});return(!("value"in $.current)||V($.current.condition,F))&&($.current.value=I(),$.current.condition=F),$.current.value}function ue(I,F){typeof I=="function"?I(F):A(I)==="object"&&I&&"current"in I&&(I.current=F)}function pe(){for(var I=arguments.length,F=new Array(I),V=0;V<I;V++)F[V]=arguments[V];var $=F.filter(function(me){return me});return $.length<=1?$[0]:function(me){F.forEach(function(Oe){ue(Oe,me)})}}function ae(){for(var I=arguments.length,F=new Array(I),V=0;V<I;V++)F[V]=arguments[V];return we(function(){return pe.apply(void 0,F)},F,function($,me){return $.length===me.length&&$.every(function(Oe,Ie){return Oe===me[Ie]})})}function _e(I){var F,V,$=isMemo(I)?I.type.type:I.type;return!(typeof $=="function"&&!((F=$.prototype)!==null&&F!==void 0&&F.render)||typeof I=="function"&&!((V=I.prototype)!==null&&V!==void 0&&V.render))}var ce=function(F){var V=F.className,$=F.customizeIcon,me=F.customizeIconProps,Oe=F.children,Ie=F.onMouseDown,Ve=F.onClick,Je=typeof $=="function"?$(me):$;return C.createElement("span",{className:V,onMouseDown:function(vt){vt.preventDefault(),Ie==null||Ie(vt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Ve,"aria-hidden":!0},Je!==void 0?Je:C.createElement("span",{className:re()(V.split(/\s+/).map(function(it){return"".concat(it,"-icon")}))},Oe))},he=ce,Le=function(F,V,$,me,Oe){var Ie=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Ve=arguments.length>6?arguments[6]:void 0,Je=arguments.length>7?arguments[7]:void 0,it=C.useMemo(function(){if(A(me)==="object")return me.clearIcon;if(Oe)return Oe},[me,Oe]),vt=C.useMemo(function(){return!!(!Ie&&me&&($.length||Ve)&&!(Je==="combobox"&&Ve===""))},[me,Ie,$.length,Ve,Je]);return{allowClear:vt,clearIcon:C.createElement(he,{className:"".concat(F,"-clear"),onMouseDown:V,customizeIcon:it},"\xD7")}},Ye=C.createContext(null);function ke(){return C.useContext(Ye)}function be(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,F=C.useState(!1),V=v(F,2),$=V[0],me=V[1],Oe=C.useRef(null),Ie=function(){window.clearTimeout(Oe.current)};C.useEffect(function(){return Ie},[]);var Ve=function(it,vt){Ie(),Oe.current=window.setTimeout(function(){me(it),vt&&vt()},I)};return[$,Ve,Ie]}function Re(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,F=C.useRef(null),V=C.useRef(null);C.useEffect(function(){return function(){window.clearTimeout(V.current)}},[]);function $(me){(me||F.current===null)&&(F.current=me),window.clearTimeout(V.current),V.current=window.setTimeout(function(){F.current=null},I)}return[function(){return F.current},$]}function Fe(I,F,V,$){var me=C.useRef(null);me.current={open:F,triggerOpen:V,customizedTrigger:$},C.useEffect(function(){function Oe(Ie){var Ve;if(!((Ve=me.current)!==null&&Ve!==void 0&&Ve.customizedTrigger)){var Je=Ie.target;Je.shadowRoot&&Ie.composed&&(Je=Ie.composedPath()[0]||Je),me.current.open&&I().filter(function(it){return it}).every(function(it){return!it.contains(Je)&&it!==Je})&&me.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Oe),function(){return window.removeEventListener("mousedown",Oe)}},[])}var Ae={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(F){var V=F.keyCode;if(F.altKey&&!F.ctrlKey||F.metaKey||V>=Ae.F1&&V<=Ae.F12)return!1;switch(V){case Ae.ALT:case Ae.CAPS_LOCK:case Ae.CONTEXT_MENU:case Ae.CTRL:case Ae.DOWN:case Ae.END:case Ae.ESC:case Ae.HOME:case Ae.INSERT:case Ae.LEFT:case Ae.MAC_FF_META:case Ae.META:case Ae.NUMLOCK:case Ae.NUM_CENTER:case Ae.PAGE_DOWN:case Ae.PAGE_UP:case Ae.PAUSE:case Ae.PRINT_SCREEN:case Ae.RIGHT:case Ae.SHIFT:case Ae.UP:case Ae.WIN_KEY:case Ae.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(F){if(F>=Ae.ZERO&&F<=Ae.NINE||F>=Ae.NUM_ZERO&&F<=Ae.NUM_MULTIPLY||F>=Ae.A&&F<=Ae.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&F===0)return!0;switch(F){case Ae.SPACE:case Ae.QUESTION_MARK:case Ae.NUM_PLUS:case Ae.NUM_MINUS:case Ae.NUM_PERIOD:case Ae.NUM_DIVISION:case Ae.SEMICOLON:case Ae.DASH:case Ae.EQUALS:case Ae.COMMA:case Ae.PERIOD:case Ae.SLASH:case Ae.APOSTROPHE:case Ae.SINGLE_QUOTE:case Ae.OPEN_SQUARE_BRACKET:case Ae.BACKSLASH:case Ae.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Me=Ae;function rt(I){return I&&![Me.ESC,Me.SHIFT,Me.BACKSPACE,Me.TAB,Me.WIN_KEY,Me.ALT,Me.META,Me.WIN_KEY_RIGHT,Me.CTRL,Me.SEMICOLON,Me.EQUALS,Me.CAPS_LOCK,Me.CONTEXT_MENU,Me.F1,Me.F2,Me.F3,Me.F4,Me.F5,Me.F6,Me.F7,Me.F8,Me.F9,Me.F10,Me.F11,Me.F12].includes(I)}var lt=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
summary tabIndex target title type useMap value width wmode wrap`,Ze=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,ft="".concat(lt," ").concat(Ze).split(/[\s\n]+/),Et="aria-",qe="data-";function pt(I,F){return I.indexOf(F)===0}function Se(I){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,V;F===!1?V={aria:!0,data:!0,attr:!0}:F===!0?V={aria:!0}:V=r({},F);var $={};return Object.keys(I).forEach(function(me){(V.aria&&(me==="role"||pt(me,Et))||V.data&&pt(me,qe)||V.attr&&ft.includes(me))&&($[me]=I[me])}),$}function ye(){return ye=Object.assign?Object.assign.bind():function(I){for(var F=1;F<arguments.length;F++){var V=arguments[F];for(var $ in V)Object.prototype.hasOwnProperty.call(V,$)&&(I[$]=V[$])}return I},ye.apply(this,arguments)}function Te(I){"@babel/helpers - typeof";return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},Te(I)}function Y(I,F){if(Te(I)!=="object"||I===null)return I;var V=I[Symbol.toPrimitive];if(V!==void 0){var $=V.call(I,F||"default");if(Te($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(I)}function W(I){var F=Y(I,"string");return Te(F)==="symbol"?F:String(F)}function X(I,F,V){return F=W(F),F in I?Object.defineProperty(I,F,{value:V,enumerable:!0,configurable:!0,writable:!0}):I[F]=V,I}function ie(I,F){var V=Object.keys(I);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(I);F&&($=$.filter(function(me){return Object.getOwnPropertyDescriptor(I,me).enumerable})),V.push.apply(V,$)}return V}function Q(I){for(var F=1;F<arguments.length;F++){var V=arguments[F]!=null?arguments[F]:{};F%2?ie(Object(V),!0).forEach(function($){X(I,$,V[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(V)):ie(Object(V)).forEach(function($){Object.defineProperty(I,$,Object.getOwnPropertyDescriptor(V,$))})}return I}function de(I){if(Array.isArray(I))return I}function ve(I,F){var V=I==null?null:typeof Symbol!="undefined"&&I[Symbol.iterator]||I["@@iterator"];if(V!=null){var $,me,Oe,Ie,Ve=[],Je=!0,it=!1;try{if(Oe=(V=V.call(I)).next,F===0){if(Object(V)!==V)return;Je=!1}else for(;!(Je=($=Oe.call(V)).done)&&(Ve.push($.value),Ve.length!==F);Je=!0);}catch(vt){it=!0,me=vt}finally{try{if(!Je&&V.return!=null&&(Ie=V.return(),Object(Ie)!==Ie))return}finally{if(it)throw me}}return Ve}}function Ke(I,F){(F==null||F>I.length)&&(F=I.length);for(var V=0,$=new Array(F);V<F;V++)$[V]=I[V];return $}function We(I,F){if(I){if(typeof I=="string")return Ke(I,F);var V=Object.prototype.toString.call(I).slice(8,-1);if(V==="Object"&&I.constructor&&(V=I.constructor.name),V==="Map"||V==="Set")return Array.from(I);if(V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V))return Ke(I,F)}}function ct(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function at(I,F){return de(I)||ve(I,F)||We(I,F)||ct()}function nt(I,F){if(I==null)return{};var V={},$=Object.keys(I),me,Oe;for(Oe=0;Oe<$.length;Oe++)me=$[Oe],!(F.indexOf(me)>=0)&&(V[me]=I[me]);return V}function et(I,F){if(I==null)return{};var V=nt(I,F),$,me;if(Object.getOwnPropertySymbols){var Oe=Object.getOwnPropertySymbols(I);for(me=0;me<Oe.length;me++)$=Oe[me],!(F.indexOf($)>=0)&&Object.prototype.propertyIsEnumerable.call(I,$)&&(V[$]=I[$])}return V}var St=B(48555);function mt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Tt=mt()?C.useLayoutEffect:C.useEffect,Pt=function(F,V){var $=C.useRef(!0);Tt(function(){return F($.current)},V),Tt(function(){return $.current=!1,function(){$.current=!0}},[])},Xe=function(F,V){Pt(function($){if(!$)return F()},V)},st=Pt,Rt=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],jt=void 0;function qt(I,F){var V=I.prefixCls,$=I.invalidate,me=I.item,Oe=I.renderItem,Ie=I.responsive,Ve=I.responsiveDisabled,Je=I.registerSize,it=I.itemKey,vt=I.className,At=I.style,Wt=I.children,Dt=I.display,Ft=I.order,Nt=I.component,tt=Nt===void 0?"div":Nt,yt=et(I,Rt),Bt=Ie&&!Dt;function Ut(yr){Je(it,yr)}C.useEffect(function(){return function(){Ut(null)}},[]);var kt=Oe&&me!==jt?Oe(me):Wt,or;$||(or={opacity:Bt?0:1,height:Bt?0:jt,overflowY:Bt?"hidden":jt,order:Ie?Ft:jt,pointerEvents:Bt?"none":jt,position:Bt?"absolute":jt});var Kt={};Bt&&(Kt["aria-hidden"]=!0);var Lr=C.createElement(tt,ye({className:re()(!$&&V,vt),style:Q(Q({},or),At)},Kt,yt,{ref:F}),kt);return Ie&&(Lr=C.createElement(St.Z,{onResize:function(er){var $r=er.offsetWidth;Ut($r)},disabled:Ve},Lr)),Lr}var Ar=C.forwardRef(qt);Ar.displayName="Item";var jr=Ar;function Cr(I){var F=C.useRef();F.current=I;var V=C.useCallback(function(){for(var $,me=arguments.length,Oe=new Array(me),Ie=0;Ie<me;Ie++)Oe[Ie]=arguments[Ie];return($=F.current)===null||$===void 0?void 0:$.call.apply($,[F].concat(Oe))},[]);return V}var lr=B(73935),Hr=function(F){return+setTimeout(F,16)},Jr=function(F){return clearTimeout(F)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Hr=function(F){return window.requestAnimationFrame(F)},Jr=function(F){return window.cancelAnimationFrame(F)});var Qt=0,Nr=new Map;function Rr(I){Nr.delete(I)}var rr=function(F){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Qt+=1;var $=Qt;function me(Oe){if(Oe===0)Rr($),F();else{var Ie=Hr(function(){me(Oe-1)});Nr.set($,Ie)}}return me(V),$};rr.cancel=function(I){var F=Nr.get(I);return Rr(F),Jr(F)};var pr=rr;function gr(I){if(typeof MessageChannel=="undefined")pr(I);else{var F=new MessageChannel;F.port1.onmessage=function(){return I()},F.port2.postMessage(void 0)}}function nn(){var I=C.useRef(null),F=function($){I.current||(I.current=[],gr(function(){(0,lr.unstable_batchedUpdates)(function(){I.current.forEach(function(me){me()}),I.current=null})})),I.current.push($)};return F}function ar(I,F){var V=C.useState(F),$=at(V,2),me=$[0],Oe=$[1],Ie=Cr(function(Ve){I(function(){Oe(Ve)})});return[me,Ie]}var Tr=C.createContext(null),an=["component"],hn=["className"],Tn=["className"],yi=function(F,V){var $=C.useContext(Tr);if(!$){var me=F.component,Oe=me===void 0?"div":me,Ie=et(F,an);return C.createElement(Oe,ye({},Ie,{ref:V}))}var Ve=$.className,Je=et($,hn),it=F.className,vt=et(F,Tn);return C.createElement(Tr.Provider,{value:null},C.createElement(jr,ye({ref:V,className:re()(Ve,it)},Je,vt)))},as=C.forwardRef(yi);as.displayName="RawItem";var Za=as,Qn=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Ga="responsive",$a="invalidate";function Pa(I){return"+ ".concat(I.length," ...")}function gi(I,F){var V=I.prefixCls,$=V===void 0?"rc-overflow":V,me=I.data,Oe=me===void 0?[]:me,Ie=I.renderItem,Ve=I.renderRawItem,Je=I.itemKey,it=I.itemWidth,vt=it===void 0?10:it,At=I.ssr,Wt=I.style,Dt=I.className,Ft=I.maxCount,Nt=I.renderRest,tt=I.renderRawRest,yt=I.suffix,Bt=I.component,Ut=Bt===void 0?"div":Bt,kt=I.itemComponent,or=I.onVisibleChange,Kt=et(I,Qn),Lr=At==="full",yr=nn(),er=ar(yr,null),$r=at(er,2),dr=$r[0],gn=$r[1],Or=dr||0,In=ar(yr,new Map),on=at(In,2),En=on[0],Un=on[1],Cn=ar(yr,0),Yr=at(Cn,2),Jt=Yr[0],wr=Yr[1],vi=ar(yr,0),Ti=at(vi,2),_i=Ti[0],Mn=Ti[1],pa=ar(yr,0),xn=at(pa,2),wi=xn[0],na=xn[1],pi=(0,C.useState)(null),ur=at(pi,2),zt=ur[0],Er=ur[1],Ur=(0,C.useState)(null),Xt=at(Ur,2),hr=Xt[0],rn=Xt[1],un=C.useMemo(function(){return hr===null&&Lr?Number.MAX_SAFE_INTEGER:hr||0},[hr,dr]),ln=(0,C.useState)(!1),$n=at(ln,2),Ii=$n[0],ia=$n[1],ai="".concat($,"-item"),Kn=Math.max(Jt,_i),_a=Ft===Ga,Wn=Oe.length&&_a,aa=Ft===$a,Yn=Wn||typeof Ft=="number"&&Oe.length>Ft,Fr=(0,C.useMemo)(function(){var tr=Oe;return Wn?dr===null&&Lr?tr=Oe:tr=Oe.slice(0,Math.min(Oe.length,Or/vt)):typeof Ft=="number"&&(tr=Oe.slice(0,Ft)),tr},[Oe,vt,dr,Ft,Wn]),si=(0,C.useMemo)(function(){return Wn?Oe.slice(un+1):Oe.slice(Fr.length)},[Oe,Fr,Wn,un]),Xi=(0,C.useCallback)(function(tr,Kr){var Ir;return typeof Je=="function"?Je(tr):(Ir=Je&&(tr==null?void 0:tr[Je]))!==null&&Ir!==void 0?Ir:Kr},[Je]),wa=(0,C.useCallback)(Ie||function(tr){return tr},[Ie]);function ji(tr,Kr,Ir){hr===tr&&(Kr===void 0||Kr===zt)||(rn(tr),Ir||(ia(tr<Oe.length-1),or==null||or(tr)),Kr!==void 0&&Er(Kr))}function sa(tr,Kr){gn(Kr.clientWidth)}function jn(tr,Kr){Un(function(Ir){var ga=new Map(Ir);return Kr===null?ga.delete(tr):ga.set(tr,Kr),ga})}function rs(tr,Kr){Mn(Kr),wr(_i)}function Hn(tr,Kr){na(Kr)}function Ai(tr){return En.get(Xi(Fr[tr],tr))}st(function(){if(Or&&typeof Kn=="number"&&Fr){var tr=wi,Kr=Fr.length,Ir=Kr-1;if(!Kr){ji(0,null);return}for(var ga=0;ga<Kr;ga+=1){var Aa=Ai(ga);if(Lr&&(Aa=Aa||0),Aa===void 0){ji(ga-1,void 0,!0);break}if(tr+=Aa,Ir===0&&tr<=Or||ga===Ir-1&&tr+Ai(Ir)<=Or){ji(Ir,null);break}else if(tr+Kn>Or){ji(ga-1,tr-Aa-wi+_i);break}}yt&&Ai(0)+wi>Or&&Er(null)}},[Or,En,_i,wi,Xi,Fr]);var br=Ii&&!!si.length,Xr={};zt!==null&&Wn&&(Xr={position:"absolute",left:zt,top:0});var kn={prefixCls:ai,responsive:Wn,component:kt,invalidate:aa},Rn=Ve?function(tr,Kr){var Ir=Xi(tr,Kr);return C.createElement(Tr.Provider,{key:Ir,value:Q(Q({},kn),{},{order:Kr,item:tr,itemKey:Ir,registerSize:jn,display:Kr<=un})},Ve(tr,Kr))}:function(tr,Kr){var Ir=Xi(tr,Kr);return C.createElement(jr,ye({},kn,{order:Kr,key:Ir,item:tr,renderItem:wa,itemKey:Ir,registerSize:jn,display:Kr<=un}))},Xn,Hi={order:br?un:Number.MAX_SAFE_INTEGER,className:"".concat(ai,"-rest"),registerSize:rs,display:br};if(tt)tt&&(Xn=C.createElement(Tr.Provider,{value:Q(Q({},kn),Hi)},tt(si)));else{var Ci=Nt||Pa;Xn=C.createElement(jr,ye({},kn,Hi),typeof Ci=="function"?Ci(si):Ci)}var ya=C.createElement(Ut,ye({className:re()(!aa&&$,Dt),style:Wt,ref:F},Kt),Fr.map(Rn),Yn?Xn:null,yt&&C.createElement(jr,ye({},kn,{responsive:_a,responsiveDisabled:!Wn,order:un,className:"".concat(ai,"-suffix"),registerSize:Hn,display:!0,style:Xr}),yt));return _a&&(ya=C.createElement(St.Z,{onResize:sa,disabled:!Wn},ya)),ya}var ki=C.forwardRef(gi);ki.displayName="Overflow",ki.Item=Za,ki.RESPONSIVE=Ga,ki.INVALIDATE=$a;var xi=ki,Ei=xi,ba=function(F,V){var $,me=F.prefixCls,Oe=F.id,Ie=F.inputElement,Ve=F.disabled,Je=F.tabIndex,it=F.autoFocus,vt=F.autoComplete,At=F.editable,Wt=F.activeDescendantId,Dt=F.value,Ft=F.maxLength,Nt=F.onKeyDown,tt=F.onMouseDown,yt=F.onChange,Bt=F.onPaste,Ut=F.onCompositionStart,kt=F.onCompositionEnd,or=F.onBlur,Kt=F.open,Lr=F.attrs,yr=Ie||C.createElement("input",null),er=yr,$r=er.ref,dr=er.props,gn=dr.onKeyDown,Or=dr.onChange,In=dr.onMouseDown,on=dr.onCompositionStart,En=dr.onCompositionEnd,Un=dr.onBlur,Cn=dr.style;return"maxLength"in yr.props,yr=C.cloneElement(yr,r(r(r({type:"search"},dr),{},{id:Oe,ref:pe(V,$r),disabled:Ve,tabIndex:Je,autoComplete:vt||"off",autoFocus:it,className:re()("".concat(me,"-selection-search-input"),($=yr)===null||$===void 0||($=$.props)===null||$===void 0?void 0:$.className),role:"combobox","aria-expanded":Kt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Oe,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Oe,"_list"),"aria-activedescendant":Kt?Wt:void 0},Lr),{},{value:At?Dt:"",maxLength:Ft,readOnly:!At,unselectable:At?null:"on",style:r(r({},Cn),{},{opacity:At?null:0}),onKeyDown:function(Jt){Nt(Jt),gn&&gn(Jt)},onMouseDown:function(Jt){tt(Jt),In&&In(Jt)},onChange:function(Jt){yt(Jt),Or&&Or(Jt)},onCompositionStart:function(Jt){Ut(Jt),on&&on(Jt)},onCompositionEnd:function(Jt){kt(Jt),En&&En(Jt)},onPaste:Bt,onBlur:function(Jt){or(Jt),Un&&Un(Jt)}})),yr},ss=C.forwardRef(ba),Ua=ss;function Ya(I){return Array.isArray(I)?I:I!==void 0?[I]:[]}var Ts=typeof window!="undefined"&&window.document&&window.document.documentElement,Sa=Ts;function ws(I){return I!=null}function La(I){return!I&&I!==0}function qi(I){return["string","number"].includes(A(I))}function Ka(I){var F=void 0;return I&&(qi(I.title)?F=I.title.toString():qi(I.label)&&(F=I.label.toString())),F}function oa(I,F){Sa?C.useLayoutEffect(I,F):C.useEffect(I,F)}function Fi(I){var F;return(F=I.key)!==null&&F!==void 0?F:I.value}var Vi=function(F){F.preventDefault(),F.stopPropagation()},Oa=function(F){var V=F.id,$=F.prefixCls,me=F.values,Oe=F.open,Ie=F.searchValue,Ve=F.autoClearSearchValue,Je=F.inputRef,it=F.placeholder,vt=F.disabled,At=F.mode,Wt=F.showSearch,Dt=F.autoFocus,Ft=F.autoComplete,Nt=F.activeDescendantId,tt=F.tabIndex,yt=F.removeIcon,Bt=F.maxTagCount,Ut=F.maxTagTextLength,kt=F.maxTagPlaceholder,or=kt===void 0?function(Ur){return"+ ".concat(Ur.length," ...")}:kt,Kt=F.tagRender,Lr=F.onToggleOpen,yr=F.onRemove,er=F.onInputChange,$r=F.onInputPaste,dr=F.onInputKeyDown,gn=F.onInputMouseDown,Or=F.onInputCompositionStart,In=F.onInputCompositionEnd,on=F.onInputBlur,En=C.useRef(null),Un=(0,C.useState)(0),Cn=v(Un,2),Yr=Cn[0],Jt=Cn[1],wr=(0,C.useState)(!1),vi=v(wr,2),Ti=vi[0],_i=vi[1],Mn="".concat($,"-selection"),pa=Oe||At==="multiple"&&Ve===!1||At==="tags"?Ie:"",xn=At==="tags"||At==="multiple"&&Ve===!1||Wt&&(Oe||Ti);oa(function(){Jt(En.current.scrollWidth)},[pa]);var wi=function(Xt,hr,rn,un,ln){return C.createElement("span",{title:Ka(Xt),className:re()("".concat(Mn,"-item"),n({},"".concat(Mn,"-item-disabled"),rn))},C.createElement("span",{className:"".concat(Mn,"-item-content")},hr),un&&C.createElement(he,{className:"".concat(Mn,"-item-remove"),onMouseDown:Vi,onClick:ln,customizeIcon:yt},"\xD7"))},na=function(Xt,hr,rn,un,ln,$n){var Ii=function(ai){Vi(ai),Lr(!Oe)};return C.createElement("span",{onMouseDown:Ii},Kt({label:hr,value:Xt,disabled:rn,closable:un,onClose:ln,isMaxTag:!!$n}))},pi=function(Xt){var hr=Xt.disabled,rn=Xt.label,un=Xt.value,ln=!vt&&!hr,$n=rn;if(typeof Ut=="number"&&(typeof rn=="string"||typeof rn=="number")){var Ii=String($n);Ii.length>Ut&&($n="".concat(Ii.slice(0,Ut),"..."))}var ia=function(Kn){Kn&&Kn.stopPropagation(),yr(Xt)};return typeof Kt=="function"?na(un,$n,hr,ln,ia):wi(Xt,$n,hr,ln,ia)},ur=function(Xt){if(!me.length)return null;var hr=typeof or=="function"?or(Xt):or;return typeof Kt=="function"?na(void 0,hr,!1,!1,void 0,!0):wi({title:hr},hr,!1)},zt=C.createElement("div",{className:"".concat(Mn,"-search"),style:{width:Yr},onFocus:function(){_i(!0)},onBlur:function(){_i(!1)}},C.createElement(Ua,{ref:Je,open:Oe,prefixCls:$,id:V,inputElement:null,disabled:vt,autoFocus:Dt,autoComplete:Ft,editable:xn,activeDescendantId:Nt,value:pa,onKeyDown:dr,onMouseDown:gn,onChange:er,onPaste:$r,onCompositionStart:Or,onCompositionEnd:In,onBlur:on,tabIndex:tt,attrs:Se(F,!0)}),C.createElement("span",{ref:En,className:"".concat(Mn,"-search-mirror"),"aria-hidden":!0},pa,"\xA0")),Er=C.createElement(Ei,{prefixCls:"".concat(Mn,"-overflow"),data:me,renderItem:pi,renderRest:ur,suffix:zt,itemKey:Fi,maxCount:Bt});return C.createElement("span",{className:"".concat(Mn,"-wrap")},Er,!me.length&&!pa&&C.createElement("span",{className:"".concat(Mn,"-placeholder")},it))},ds=Oa,ks=function(F){var V=F.inputElement,$=F.prefixCls,me=F.id,Oe=F.inputRef,Ie=F.disabled,Ve=F.autoFocus,Je=F.autoComplete,it=F.activeDescendantId,vt=F.mode,At=F.open,Wt=F.values,Dt=F.placeholder,Ft=F.tabIndex,Nt=F.showSearch,tt=F.searchValue,yt=F.activeValue,Bt=F.maxLength,Ut=F.onInputKeyDown,kt=F.onInputMouseDown,or=F.onInputChange,Kt=F.onInputPaste,Lr=F.onInputCompositionStart,yr=F.onInputCompositionEnd,er=F.onInputBlur,$r=F.title,dr=C.useState(!1),gn=v(dr,2),Or=gn[0],In=gn[1],on=vt==="combobox",En=on||Nt,Un=Wt[0],Cn=tt||"";on&&yt&&!Or&&(Cn=yt),C.useEffect(function(){on&&In(!1)},[on,yt]);var Yr=vt!=="combobox"&&!At&&!Nt?!1:!!Cn,Jt=$r===void 0?Ka(Un):$r,wr=C.useMemo(function(){return Un?null:C.createElement("span",{className:"".concat($,"-selection-placeholder"),style:Yr?{visibility:"hidden"}:void 0},Dt)},[Un,Yr,Dt,$]);return C.createElement("span",{className:"".concat($,"-selection-wrap")},C.createElement("span",{className:"".concat($,"-selection-search")},C.createElement(Ua,{ref:Oe,prefixCls:$,id:me,open:At,inputElement:V,disabled:Ie,autoFocus:Ve,autoComplete:Je,editable:En,activeDescendantId:it,value:Cn,onKeyDown:Ut,onMouseDown:kt,onChange:function(Ti){In(!0),or(Ti)},onPaste:Kt,onCompositionStart:Lr,onCompositionEnd:yr,onBlur:er,tabIndex:Ft,attrs:Se(F,!0),maxLength:on?Bt:void 0})),!on&&Un?C.createElement("span",{className:"".concat($,"-selection-item"),title:Jt,style:Yr?{visibility:"hidden"}:void 0},Un.label):null,wr)},zi=ks,Ri=function(F,V){var $=(0,C.useRef)(null),me=(0,C.useRef)(!1),Oe=F.prefixCls,Ie=F.open,Ve=F.mode,Je=F.showSearch,it=F.tokenWithEnter,vt=F.disabled,At=F.prefix,Wt=F.autoClearSearchValue,Dt=F.onSearch,Ft=F.onSearchSubmit,Nt=F.onToggleOpen,tt=F.onInputKeyDown,yt=F.onInputBlur,Bt=F.domRef;C.useImperativeHandle(V,function(){return{focus:function(Jt){$.current.focus(Jt)},blur:function(){$.current.blur()}}});var Ut=Re(0),kt=v(Ut,2),or=kt[0],Kt=kt[1],Lr=function(Jt){var wr=Jt.which,vi=$.current instanceof HTMLTextAreaElement;!vi&&Ie&&(wr===Me.UP||wr===Me.DOWN)&&Jt.preventDefault(),tt&&tt(Jt),wr===Me.ENTER&&Ve==="tags"&&!me.current&&!Ie&&(Ft==null||Ft(Jt.target.value)),!(vi&&!Ie&&~[Me.UP,Me.DOWN,Me.LEFT,Me.RIGHT].indexOf(wr))&&rt(wr)&&Nt(!0)},yr=function(){Kt(!0)},er=(0,C.useRef)(null),$r=function(Jt){Dt(Jt,!0,me.current)!==!1&&Nt(!0)},dr=function(){me.current=!0},gn=function(Jt){me.current=!1,Ve!=="combobox"&&$r(Jt.target.value)},Or=function(Jt){var wr=Jt.target.value;if(it&&er.current&&/[\r\n]/.test(er.current)){var vi=er.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");wr=wr.replace(vi,er.current)}er.current=null,$r(wr)},In=function(Jt){var wr=Jt.clipboardData,vi=wr==null?void 0:wr.getData("text");er.current=vi||""},on=function(Jt){var wr=Jt.target;if(wr!==$.current){var vi=document.body.style.msTouchAction!==void 0;vi?setTimeout(function(){$.current.focus()}):$.current.focus()}},En=function(Jt){var wr=or();Jt.target!==$.current&&!wr&&!(Ve==="combobox"&&vt)&&Jt.preventDefault(),(Ve!=="combobox"&&(!Je||!wr)||!Ie)&&(Ie&&Wt!==!1&&Dt("",!0,!1),Nt())},Un={inputRef:$,onInputKeyDown:Lr,onInputMouseDown:yr,onInputChange:Or,onInputPaste:In,onInputCompositionStart:dr,onInputCompositionEnd:gn,onInputBlur:yt},Cn=Ve==="multiple"||Ve==="tags"?C.createElement(ds,s({},F,Un)):C.createElement(zi,s({},F,Un));return C.createElement("div",{ref:Bt,className:"".concat(Oe,"-selector"),onClick:on,onMouseDown:En},At&&C.createElement("div",{className:"".concat(Oe,"-prefix")},At),Cn)},js=C.forwardRef(Ri),os=js,Fs=B(98280),xe=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ge=function(F){var V=F===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:V,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:V,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:V,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:V,adjustY:1},htmlRegion:"scroll"}}},ot=function(F,V){var $=F.prefixCls,me=F.disabled,Oe=F.visible,Ie=F.children,Ve=F.popupElement,Je=F.animation,it=F.transitionName,vt=F.dropdownStyle,At=F.dropdownClassName,Wt=F.direction,Dt=Wt===void 0?"ltr":Wt,Ft=F.placement,Nt=F.builtinPlacements,tt=F.dropdownMatchSelectWidth,yt=F.dropdownRender,Bt=F.dropdownAlign,Ut=F.getPopupContainer,kt=F.empty,or=F.getTriggerDOMNode,Kt=F.onPopupVisibleChange,Lr=F.onPopupMouseEnter,yr=R(F,xe),er="".concat($,"-dropdown"),$r=Ve;yt&&($r=yt(Ve));var dr=C.useMemo(function(){return Nt||Ge(tt)},[Nt,tt]),gn=Je?"".concat(er,"-").concat(Je):it,Or=typeof tt=="number",In=C.useMemo(function(){return Or?null:tt===!1?"minWidth":"width"},[tt,Or]),on=vt;Or&&(on=r(r({},on),{},{width:tt}));var En=C.useRef(null);return C.useImperativeHandle(V,function(){return{getPopupElement:function(){var Cn;return(Cn=En.current)===null||Cn===void 0?void 0:Cn.popupElement}}}),C.createElement(Fs.Z,s({},yr,{showAction:Kt?["click"]:[],hideAction:Kt?["click"]:[],popupPlacement:Ft||(Dt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:dr,prefixCls:er,popupTransitionName:gn,popup:C.createElement("div",{onMouseEnter:Lr},$r),ref:En,stretch:In,popupAlign:Bt,popupVisible:Oe,getPopupContainer:Ut,popupClassName:re()(At,n({},"".concat(er,"-empty"),kt)),popupStyle:on,getTriggerDOMNode:or,onPopupVisibleChange:Kt}),Ie)},He=C.forwardRef(ot),dt=He;function ht(I){return d(I)||m(I)||S(I)||b()}function _t(I,F){var V=I.key,$;return"value"in I&&($=I.value),V!=null?V:$!==void 0?$:"rc-index-key-".concat(F)}function It(I){return typeof I!="undefined"&&!Number.isNaN(I)}function sr(I,F){var V=I||{},$=V.label,me=V.value,Oe=V.options,Ie=V.groupLabel,Ve=$||(F?"children":"label");return{label:Ve,value:me||"value",options:Oe||"options",groupLabel:Ie||Ve}}function Vt(I){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=F.fieldNames,$=F.childrenAsData,me=[],Oe=sr(V,!1),Ie=Oe.label,Ve=Oe.value,Je=Oe.options,it=Oe.groupLabel;function vt(At,Wt){Array.isArray(At)&&At.forEach(function(Dt){if(Wt||!(Je in Dt)){var Ft=Dt[Ve];me.push({key:_t(Dt,me.length),groupOption:Wt,data:Dt,label:Dt[Ie],value:Ft})}else{var Nt=Dt[it];Nt===void 0&&$&&(Nt=Dt.label),me.push({key:_t(Dt,me.length),group:!0,data:Dt,label:Nt}),vt(Dt[Je],!0)}})}return vt(I,!1),me}function Sr(I){var F=r({},I);return"props"in F||Object.defineProperty(F,"props",{get:function(){return Be(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),F}}),F}var fr=function(F,V,$){if(!V||!V.length)return null;var me=!1,Oe=function Ve(Je,it){var vt=ht(it),At=vt[0],Wt=vt.slice(1);if(!At)return[Je];var Dt=Je.split(At);return me=me||Dt.length>1,Dt.reduce(function(Ft,Nt){return[].concat(_(Ft),_(Ve(Nt,Wt)))},[]).filter(Boolean)},Ie=Oe(F,V);return me?typeof $!="undefined"?Ie.slice(0,$):Ie:null},Dr=C.createContext(null),Vr=Dr;function mr(I){var F=I.visible,V=I.values;if(!F)return null;var $=50;return C.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(V.slice(0,$).map(function(me){var Oe=me.label,Ie=me.value;return["number","string"].includes(A(Oe))?Oe:Ie}).join(", ")),V.length>$?", ...":null)}var sn=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],kr=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],j=function(F){return F==="tags"||F==="multiple"},ne=C.forwardRef(function(I,F){var V,$=I.id,me=I.prefixCls,Oe=I.className,Ie=I.showSearch,Ve=I.tagRender,Je=I.direction,it=I.omitDomProps,vt=I.displayValues,At=I.onDisplayValuesChange,Wt=I.emptyOptions,Dt=I.notFoundContent,Ft=Dt===void 0?"Not Found":Dt,Nt=I.onClear,tt=I.mode,yt=I.disabled,Bt=I.loading,Ut=I.getInputElement,kt=I.getRawInputElement,or=I.open,Kt=I.defaultOpen,Lr=I.onDropdownVisibleChange,yr=I.activeValue,er=I.onActiveValueChange,$r=I.activeDescendantId,dr=I.searchValue,gn=I.autoClearSearchValue,Or=I.onSearch,In=I.onSearchSplit,on=I.tokenSeparators,En=I.allowClear,Un=I.prefix,Cn=I.suffixIcon,Yr=I.clearIcon,Jt=I.OptionList,wr=I.animation,vi=I.transitionName,Ti=I.dropdownStyle,_i=I.dropdownClassName,Mn=I.dropdownMatchSelectWidth,pa=I.dropdownRender,xn=I.dropdownAlign,wi=I.placement,na=I.builtinPlacements,pi=I.getPopupContainer,ur=I.showAction,zt=ur===void 0?[]:ur,Er=I.onFocus,Ur=I.onBlur,Xt=I.onKeyUp,hr=I.onKeyDown,rn=I.onMouseDown,un=R(I,sn),ln=j(tt),$n=(Ie!==void 0?Ie:ln)||tt==="combobox",Ii=r({},un);kr.forEach(function(dn){delete Ii[dn]}),it==null||it.forEach(function(dn){delete Ii[dn]});var ia=C.useState(!1),ai=v(ia,2),Kn=ai[0],_a=ai[1];C.useEffect(function(){_a(Z())},[]);var Wn=C.useRef(null),aa=C.useRef(null),Yn=C.useRef(null),Fr=C.useRef(null),si=C.useRef(null),Xi=C.useRef(!1),wa=be(),ji=v(wa,3),sa=ji[0],jn=ji[1],rs=ji[2];C.useImperativeHandle(F,function(){var dn,Mr;return{focus:(dn=Fr.current)===null||dn===void 0?void 0:dn.focus,blur:(Mr=Fr.current)===null||Mr===void 0?void 0:Mr.blur,scrollTo:function(Ba){var Ji;return(Ji=si.current)===null||Ji===void 0?void 0:Ji.scrollTo(Ba)},nativeElement:Wn.current||aa.current}});var Hn=C.useMemo(function(){var dn;if(tt!=="combobox")return dr;var Mr=(dn=vt[0])===null||dn===void 0?void 0:dn.value;return typeof Mr=="string"||typeof Mr=="number"?String(Mr):""},[dr,tt,vt]),Ai=tt==="combobox"&&typeof Ut=="function"&&Ut()||null,br=typeof kt=="function"&&kt(),Xr=ae(aa,br==null||(V=br.props)===null||V===void 0?void 0:V.ref),kn=C.useState(!1),Rn=v(kn,2),Xn=Rn[0],Hi=Rn[1];ee(function(){Hi(!0)},[]);var Ci=Ee(!1,{defaultValue:Kt,value:or}),ya=v(Ci,2),tr=ya[0],Kr=ya[1],Ir=Xn?tr:!1,ga=!Ft&&Wt;(yt||ga&&Ir&&tt==="combobox")&&(Ir=!1);var Aa=ga?!1:Ir,$t=C.useCallback(function(dn){var Mr=dn!==void 0?dn:!Ir;yt||(Kr(Mr),Ir!==Mr&&(Lr==null||Lr(Mr)))},[yt,Ir,Kr,Lr]),vr=C.useMemo(function(){return(on||[]).some(function(dn){return[`
|
|
`,`\r
|
|
`].includes(dn)})},[on]),ir=C.useContext(Vr)||{},cr=ir.maxCount,mn=ir.rawValues,Fn=function(Mr,Na,Ba){if(!(ln&&It(cr)&&(mn==null?void 0:mn.size)>=cr)){var Ji=!0,Ea=Mr;er==null||er(null);var Ms=fr(Mr,on,It(cr)?cr-mn.size:void 0),Ds=Ba?null:Ms;return tt!=="combobox"&&Ds&&(Ea="",In==null||In(Ds),$t(!1),Ji=!1),Or&&Hn!==Ea&&Or(Ea,{source:Na?"typing":"effect"}),Ji}},ns=function(Mr){!Mr||!Mr.trim()||Or(Mr,{source:"submit"})};C.useEffect(function(){!Ir&&!ln&&tt!=="combobox"&&Fn("",!1,!1)},[Ir]),C.useEffect(function(){tr&&yt&&Kr(!1),yt&&!Xi.current&&jn(!1)},[yt]);var Ca=Re(),is=v(Ca,2),Qi=is[0],Es=is[1],Is=C.useRef(!1),ao=function(Mr){var Na=Qi(),Ba=Mr.key,Ji=Ba==="Enter";if(Ji&&(tt!=="combobox"&&Mr.preventDefault(),Ir||$t(!0)),Es(!!Hn),Ba==="Backspace"&&!Na&&ln&&!Hn&&vt.length){for(var Ea=_(vt),Ms=null,Ds=Ea.length-1;Ds>=0;Ds-=1){var Ys=Ea[Ds];if(!Ys.disabled){Ea.splice(Ds,1),Ms=Ys;break}}Ms&&At(Ea,{type:"remove",values:[Ms]})}for(var qs=arguments.length,Xs=new Array(qs>1?qs-1:0),oo=1;oo<qs;oo++)Xs[oo-1]=arguments[oo];if(Ir&&(!Ji||!Is.current)){var uo;Ji&&(Is.current=!0),(uo=si.current)===null||uo===void 0||uo.onKeyDown.apply(uo,[Mr].concat(Xs))}hr==null||hr.apply(void 0,[Mr].concat(Xs))},_n=function(Mr){for(var Na=arguments.length,Ba=new Array(Na>1?Na-1:0),Ji=1;Ji<Na;Ji++)Ba[Ji-1]=arguments[Ji];if(Ir){var Ea;(Ea=si.current)===null||Ea===void 0||Ea.onKeyUp.apply(Ea,[Mr].concat(Ba))}Mr.key==="Enter"&&(Is.current=!1),Xt==null||Xt.apply(void 0,[Mr].concat(Ba))},Qr=function(Mr){var Na=vt.filter(function(Ba){return Ba!==Mr});At(Na,{type:"remove",values:[Mr]})},Wr=function(){Is.current=!1},Nn=C.useRef(!1),Va=function(){jn(!0),yt||(Er&&!Nn.current&&Er.apply(void 0,arguments),zt.includes("focus")&&$t(!0)),Nn.current=!0},Mi=function(){Xi.current=!0,jn(!1,function(){Nn.current=!1,Xi.current=!1,$t(!1)}),!yt&&(Hn&&(tt==="tags"?Or(Hn,{source:"submit"}):tt==="multiple"&&Or("",{source:"blur"})),Ur&&Ur.apply(void 0,arguments))},Dn=[];C.useEffect(function(){return function(){Dn.forEach(function(dn){return clearTimeout(dn)}),Dn.splice(0,Dn.length)}},[]);var oi=function(Mr){var Na,Ba=Mr.target,Ji=(Na=Yn.current)===null||Na===void 0?void 0:Na.getPopupElement();if(Ji&&Ji.contains(Ba)){var Ea=setTimeout(function(){var qs=Dn.indexOf(Ea);if(qs!==-1&&Dn.splice(qs,1),rs(),!Kn&&!Ji.contains(document.activeElement)){var Xs;(Xs=Fr.current)===null||Xs===void 0||Xs.focus()}});Dn.push(Ea)}for(var Ms=arguments.length,Ds=new Array(Ms>1?Ms-1:0),Ys=1;Ys<Ms;Ys++)Ds[Ys-1]=arguments[Ys];rn==null||rn.apply(void 0,[Mr].concat(Ds))},Ra=C.useState({}),bs=v(Ra,2),Zs=bs[1];function Gs(){Zs({})}var Ss;br&&(Ss=function(Mr){$t(Mr)}),Fe(function(){var dn;return[Wn.current,(dn=Yn.current)===null||dn===void 0?void 0:dn.getPopupElement()]},Aa,$t,!!br);var Ws=C.useMemo(function(){return r(r({},I),{},{notFoundContent:Ft,open:Ir,triggerOpen:Aa,id:$,showSearch:$n,multiple:ln,toggleOpen:$t})},[I,Ft,Aa,Ir,$,$n,ln,$t]),$s=!!Cn||Bt,za;$s&&(za=C.createElement(he,{className:re()("".concat(me,"-arrow"),n({},"".concat(me,"-arrow-loading"),Bt)),customizeIcon:Cn,customizeIconProps:{loading:Bt,searchValue:Hn,open:Ir,focused:sa,showSearch:$n}}));var xs=function(){var Mr;Nt==null||Nt(),(Mr=Fr.current)===null||Mr===void 0||Mr.focus(),At([],{type:"clear",values:vt}),Fn("",!1,!1)},fo=Le(me,xs,vt,En,Yr,yt,Hn,tt),po=fo.allowClear,go=fo.clearIcon,mo=C.createElement(Jt,{ref:si}),_o=re()(me,Oe,n(n(n(n(n(n(n(n(n(n({},"".concat(me,"-focused"),sa),"".concat(me,"-multiple"),ln),"".concat(me,"-single"),!ln),"".concat(me,"-allow-clear"),En),"".concat(me,"-show-arrow"),$s),"".concat(me,"-disabled"),yt),"".concat(me,"-loading"),Bt),"".concat(me,"-open"),Ir),"".concat(me,"-customize-input"),Ai),"".concat(me,"-show-search"),$n)),co=C.createElement(dt,{ref:Yn,disabled:yt,prefixCls:me,visible:Aa,popupElement:mo,animation:wr,transitionName:vi,dropdownStyle:Ti,dropdownClassName:_i,direction:Je,dropdownMatchSelectWidth:Mn,dropdownRender:pa,dropdownAlign:xn,placement:wi,builtinPlacements:na,getPopupContainer:pi,empty:Wt,getTriggerDOMNode:function(Mr){return aa.current||Mr},onPopupVisibleChange:Ss,onPopupMouseEnter:Gs},br?C.cloneElement(br,{ref:Xr}):C.createElement(os,s({},I,{domRef:aa,prefixCls:me,inputElement:Ai,ref:Fr,id:$,prefix:Un,showSearch:$n,autoClearSearchValue:gn,mode:tt,activeDescendantId:$r,tagRender:Ve,values:vt,open:Ir,onToggleOpen:$t,activeValue:yr,searchValue:Hn,onSearch:Fn,onSearchSubmit:ns,onRemove:Qr,tokenWithEnter:vr,onInputBlur:Wr}))),lo;return br?lo=co:lo=C.createElement("div",s({className:_o},Ii,{ref:Wn,onMouseDown:oi,onKeyDown:ao,onKeyUp:_n,onFocus:Va,onBlur:Mi}),C.createElement(mr,{visible:sa&&!Ir,values:vt}),co,za,po&&go),C.createElement(Ye.Provider,{value:Ws},lo)}),q=ne,De=function(){return null};De.isSelectOptGroup=!0;var ze=De,ut=function(){return null};ut.isSelectOption=!0;var gt=ut;function Lt(I,F){var V=r({},I);return Array.isArray(F)&&F.forEach(function($){delete V[$]}),V}var wt=B(73299);function Ht(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var xt=["disabled","title","children","style","className"];function bt(I){return typeof I=="string"||typeof I=="number"}var Ot=function(F,V){var $=ke(),me=$.prefixCls,Oe=$.id,Ie=$.open,Ve=$.multiple,Je=$.mode,it=$.searchValue,vt=$.toggleOpen,At=$.notFoundContent,Wt=$.onPopupScroll,Dt=C.useContext(Vr),Ft=Dt.maxCount,Nt=Dt.flattenOptions,tt=Dt.onActiveValue,yt=Dt.defaultActiveFirstOption,Bt=Dt.onSelect,Ut=Dt.menuItemSelectedIcon,kt=Dt.rawValues,or=Dt.fieldNames,Kt=Dt.virtual,Lr=Dt.direction,yr=Dt.listHeight,er=Dt.listItemHeight,$r=Dt.optionRender,dr="".concat(me,"-item"),gn=we(function(){return Nt},[Ie,Nt],function(ur,zt){return zt[0]&&ur[1]!==zt[1]}),Or=C.useRef(null),In=C.useMemo(function(){return Ve&&It(Ft)&&(kt==null?void 0:kt.size)>=Ft},[Ve,Ft,kt==null?void 0:kt.size]),on=function(zt){zt.preventDefault()},En=function(zt){var Er;(Er=Or.current)===null||Er===void 0||Er.scrollTo(typeof zt=="number"?{index:zt}:zt)},Un=C.useCallback(function(ur){return Je==="combobox"?!1:kt.has(ur)},[Je,_(kt).toString(),kt.size]),Cn=function(zt){for(var Er=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ur=gn.length,Xt=0;Xt<Ur;Xt+=1){var hr=(zt+Xt*Er+Ur)%Ur,rn=gn[hr]||{},un=rn.group,ln=rn.data;if(!un&&!(ln!=null&&ln.disabled)&&(Un(ln.value)||!In))return hr}return-1},Yr=C.useState(function(){return Cn(0)}),Jt=v(Yr,2),wr=Jt[0],vi=Jt[1],Ti=function(zt){var Er=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;vi(zt);var Ur={source:Er?"keyboard":"mouse"},Xt=gn[zt];if(!Xt){tt(null,-1,Ur);return}tt(Xt.value,zt,Ur)};(0,C.useEffect)(function(){Ti(yt!==!1?Cn(0):-1)},[gn.length,it]);var _i=C.useCallback(function(ur){return Je==="combobox"?String(ur).toLowerCase()===it.toLowerCase():kt.has(ur)},[Je,it,_(kt).toString(),kt.size]);(0,C.useEffect)(function(){var ur=setTimeout(function(){if(!Ve&&Ie&&kt.size===1){var Er=Array.from(kt)[0],Ur=gn.findIndex(function(Xt){var hr=Xt.data;return hr.value===Er});Ur!==-1&&(Ti(Ur),En(Ur))}});if(Ie){var zt;(zt=Or.current)===null||zt===void 0||zt.scrollTo(void 0)}return function(){return clearTimeout(ur)}},[Ie,it]);var Mn=function(zt){zt!==void 0&&Bt(zt,{selected:!kt.has(zt)}),Ve||vt(!1)};if(C.useImperativeHandle(V,function(){return{onKeyDown:function(zt){var Er=zt.which,Ur=zt.ctrlKey;switch(Er){case Me.N:case Me.P:case Me.UP:case Me.DOWN:{var Xt=0;if(Er===Me.UP?Xt=-1:Er===Me.DOWN?Xt=1:Ht()&&Ur&&(Er===Me.N?Xt=1:Er===Me.P&&(Xt=-1)),Xt!==0){var hr=Cn(wr+Xt,Xt);En(hr),Ti(hr,!0)}break}case Me.TAB:case Me.ENTER:{var rn,un=gn[wr];un&&!(un!=null&&(rn=un.data)!==null&&rn!==void 0&&rn.disabled)&&!In?Mn(un.value):Mn(void 0),Ie&&zt.preventDefault();break}case Me.ESC:vt(!1),Ie&&zt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(zt){En(zt)}}}),gn.length===0)return C.createElement("div",{role:"listbox",id:"".concat(Oe,"_list"),className:"".concat(dr,"-empty"),onMouseDown:on},At);var pa=Object.keys(or).map(function(ur){return or[ur]}),xn=function(zt){return zt.label};function wi(ur,zt){var Er=ur.group;return{role:Er?"presentation":"option",id:"".concat(Oe,"_list_").concat(zt)}}var na=function(zt){var Er=gn[zt];if(!Er)return null;var Ur=Er.data||{},Xt=Ur.value,hr=Er.group,rn=Se(Ur,!0),un=xn(Er);return Er?C.createElement("div",s({"aria-label":typeof un=="string"&&!hr?un:null},rn,{key:zt},wi(Er,zt),{"aria-selected":_i(Xt)}),Xt):null},pi={role:"listbox",id:"".concat(Oe,"_list")};return C.createElement(C.Fragment,null,Kt&&C.createElement("div",s({},pi,{style:{height:0,width:0,overflow:"hidden"}}),na(wr-1),na(wr),na(wr+1)),C.createElement(wt.Z,{itemKey:"key",ref:Or,data:gn,height:yr,itemHeight:er,fullHeight:!1,onMouseDown:on,onScroll:Wt,virtual:Kt,direction:Lr,innerProps:Kt?null:pi},function(ur,zt){var Er=ur.group,Ur=ur.groupOption,Xt=ur.data,hr=ur.label,rn=ur.value,un=Xt.key;if(Er){var ln,$n=(ln=Xt.title)!==null&&ln!==void 0?ln:bt(hr)?hr.toString():void 0;return C.createElement("div",{className:re()(dr,"".concat(dr,"-group"),Xt.className),title:$n},hr!==void 0?hr:un)}var Ii=Xt.disabled,ia=Xt.title,ai=Xt.children,Kn=Xt.style,_a=Xt.className,Wn=R(Xt,xt),aa=Lt(Wn,pa),Yn=Un(rn),Fr=Ii||!Yn&&In,si="".concat(dr,"-option"),Xi=re()(dr,si,_a,n(n(n(n({},"".concat(si,"-grouped"),Ur),"".concat(si,"-active"),wr===zt&&!Fr),"".concat(si,"-disabled"),Fr),"".concat(si,"-selected"),Yn)),wa=xn(ur),ji=!Ut||typeof Ut=="function"||Yn,sa=typeof wa=="number"?wa:wa||rn,jn=bt(sa)?sa.toString():void 0;return ia!==void 0&&(jn=ia),C.createElement("div",s({},Se(aa),Kt?{}:wi(ur,zt),{"aria-selected":_i(rn),className:Xi,title:jn,onMouseMove:function(){wr===zt||Fr||Ti(zt)},onClick:function(){Fr||Mn(rn)},style:Kn}),C.createElement("div",{className:"".concat(si,"-content")},typeof $r=="function"?$r(ur,{index:zt}):sa),C.isValidElement(Ut)||Yn,ji&&C.createElement(he,{className:"".concat(dr,"-option-state"),customizeIcon:Ut,customizeIconProps:{value:rn,disabled:Fr,isSelected:Yn}},Yn?"\u2713":null))}))},Mt=C.forwardRef(Ot),Gt=Mt,Br=function(I,F){var V=C.useRef({values:new Map,options:new Map}),$=C.useMemo(function(){var Oe=V.current,Ie=Oe.values,Ve=Oe.options,Je=I.map(function(At){if(At.label===void 0){var Wt;return r(r({},At),{},{label:(Wt=Ie.get(At.value))===null||Wt===void 0?void 0:Wt.label})}return At}),it=new Map,vt=new Map;return Je.forEach(function(At){it.set(At.value,At),vt.set(At.value,F.get(At.value)||Ve.get(At.value))}),V.current.values=it,V.current.options=vt,Je},[I,F]),me=C.useCallback(function(Oe){return F.get(Oe)||V.current.options.get(Oe)},[F]);return[$,me]};function nr(I,F){return Ya(I).join("").toUpperCase().includes(F)}var qr=function(I,F,V,$,me){return C.useMemo(function(){if(!V||$===!1)return I;var Oe=F.options,Ie=F.label,Ve=F.value,Je=[],it=typeof $=="function",vt=V.toUpperCase(),At=it?$:function(Dt,Ft){return me?nr(Ft[me],vt):Ft[Oe]?nr(Ft[Ie!=="children"?Ie:"label"],vt):nr(Ft[Ve],vt)},Wt=it?function(Dt){return Sr(Dt)}:function(Dt){return Dt};return I.forEach(function(Dt){if(Dt[Oe]){var Ft=At(V,Wt(Dt));if(Ft)Je.push(Dt);else{var Nt=Dt[Oe].filter(function(tt){return At(V,Wt(tt))});Nt.length&&Je.push(r(r({},Dt),{},n({},Oe,Nt)))}return}At(V,Wt(Dt))&&Je.push(Dt)}),Je},[I,$,me,V,F])},Pr=0,xr=K();function en(){var I;return xr?(I=Pr,Pr+=1):I="TEST_OR_SSR",I}function tn(I){var F=C.useState(),V=v(F,2),$=V[0],me=V[1];return C.useEffect(function(){me("rc_select_".concat(en()))},[]),I||$}function Yt(I){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=[];return C.Children.forEach(I,function($){$==null&&!F.keepEmpty||(Array.isArray($)?V=V.concat(Yt($)):(0,le.isFragment)($)&&$.props?V=V.concat(Yt($.props.children,F)):V.push($))}),V}var Jn=["children","value"],wn=["children"];function Bn(I){var F=I,V=F.key,$=F.props,me=$.children,Oe=$.value,Ie=R($,Jn);return r({key:V,value:Oe!==void 0?Oe:V,children:me},Ie)}function bi(I){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Yt(I).map(function(V,$){if(!C.isValidElement(V)||!V.type)return null;var me=V,Oe=me.type.isSelectOptGroup,Ie=me.key,Ve=me.props,Je=Ve.children,it=R(Ve,wn);return F||!Oe?Bn(V):r(r({key:"__RC_SELECT_GRP__".concat(Ie===null?$:Ie,"__"),label:Ie},it),{},{options:bi(Je)})}).filter(function(V){return V})}var qn=function(F,V,$,me,Oe){return C.useMemo(function(){var Ie=F,Ve=!F;Ve&&(Ie=bi(V));var Je=new Map,it=new Map,vt=function(Dt,Ft,Nt){Nt&&typeof Nt=="string"&&Dt.set(Ft[Nt],Ft)},At=function Wt(Dt){for(var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=0;Nt<Dt.length;Nt+=1){var tt=Dt[Nt];!tt[$.options]||Ft?(Je.set(tt[$.value],tt),vt(it,tt,$.label),vt(it,tt,me),vt(it,tt,Oe)):Wt(tt[$.options],!0)}};return At(Ie),{options:Ie,valueOptions:Je,labelOptions:it}},[F,V,$,me,Oe])},ui=qn;function bn(I){var F=C.useRef();F.current=I;var V=C.useCallback(function(){return F.current.apply(F,arguments)},[]);return V}function li(I){var F=I.mode,V=I.options,$=I.children,me=I.backfill,Oe=I.allowClear,Ie=I.placeholder,Ve=I.getInputElement,Je=I.showSearch,it=I.onSearch,vt=I.defaultOpen,At=I.autoFocus,Wt=I.labelInValue,Dt=I.value,Ft=I.inputValue,Nt=I.optionLabelProp,tt=isMultiple(F),yt=Je!==void 0?Je:tt||F==="combobox",Bt=V||convertChildrenToData($);if(warning(F!=="tags"||Bt.every(function(Kt){return!Kt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),F==="tags"||F==="combobox"){var Ut=Bt.some(function(Kt){return Kt.options?Kt.options.some(function(Lr){return typeof("value"in Lr?Lr.value:Lr.key)=="number"}):typeof("value"in Kt?Kt.value:Kt.key)=="number"});warning(!Ut,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(F!=="combobox"||!Nt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(F==="combobox"||!me,"`backfill` only works with `combobox` mode."),warning(F==="combobox"||!Ve,"`getInputElement` only work with `combobox` mode."),noteOnce(F!=="combobox"||!Ve||!Oe||!Ie,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),it&&!yt&&F!=="combobox"&&F!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!vt||At,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Dt!=null){var kt=toArray(Dt);warning(!Wt||kt.every(function(Kt){return _typeof(Kt)==="object"&&("key"in Kt||"value"in Kt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!tt||Array.isArray(Dt),"`value` should be array when `mode` is `multiple` or `tags`")}if($){var or=null;toNodeArray($).some(function(Kt){if(!React.isValidElement(Kt)||!Kt.type)return!1;var Lr=Kt,yr=Lr.type;if(yr.isSelectOption)return!1;if(yr.isSelectOptGroup){var er=toNodeArray(Kt.props.children).every(function($r){return!React.isValidElement($r)||!Kt.type||$r.type.isSelectOption?!0:(or=$r.type,!1)});return!er}return or=yr,!0}),or&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(or.displayName||or.name||or,"`.")),warning(Ft===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function mi(I,F){if(I){var V=function $(me){for(var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ie=0;Ie<me.length;Ie++){var Ve=me[Ie];if(Ve[F==null?void 0:F.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Oe&&Array.isArray(Ve[F==null?void 0:F.options])&&$(Ve[F==null?void 0:F.options],!0))break}};V(I)}}var Di=null,Ni=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Pn=["inputValue"];function ei(I){return!I||A(I)!=="object"}var Gr=C.forwardRef(function(I,F){var V=I.id,$=I.mode,me=I.prefixCls,Oe=me===void 0?"rc-select":me,Ie=I.backfill,Ve=I.fieldNames,Je=I.inputValue,it=I.searchValue,vt=I.onSearch,At=I.autoClearSearchValue,Wt=At===void 0?!0:At,Dt=I.onSelect,Ft=I.onDeselect,Nt=I.dropdownMatchSelectWidth,tt=Nt===void 0?!0:Nt,yt=I.filterOption,Bt=I.filterSort,Ut=I.optionFilterProp,kt=I.optionLabelProp,or=I.options,Kt=I.optionRender,Lr=I.children,yr=I.defaultActiveFirstOption,er=I.menuItemSelectedIcon,$r=I.virtual,dr=I.direction,gn=I.listHeight,Or=gn===void 0?200:gn,In=I.listItemHeight,on=In===void 0?20:In,En=I.labelRender,Un=I.value,Cn=I.defaultValue,Yr=I.labelInValue,Jt=I.onChange,wr=I.maxCount,vi=R(I,Ni),Ti=tn(V),_i=j($),Mn=!!(!or&&Lr),pa=C.useMemo(function(){return yt===void 0&&$==="combobox"?!1:yt},[yt,$]),xn=C.useMemo(function(){return sr(Ve,Mn)},[JSON.stringify(Ve),Mn]),wi=Ee("",{value:it!==void 0?it:Je,postState:function(vr){return vr||""}}),na=v(wi,2),pi=na[0],ur=na[1],zt=ui(or,Lr,xn,Ut,kt),Er=zt.valueOptions,Ur=zt.labelOptions,Xt=zt.options,hr=C.useCallback(function($t){var vr=Ya($t);return vr.map(function(ir){var cr,mn,Fn,ns,Ca;if(ei(ir))cr=ir;else{var is;Fn=ir.key,mn=ir.label,cr=(is=ir.value)!==null&&is!==void 0?is:Fn}var Qi=Er.get(cr);if(Qi){var Es;if(mn===void 0&&(mn=Qi==null?void 0:Qi[kt||xn.label]),Fn===void 0&&(Fn=(Es=Qi==null?void 0:Qi.key)!==null&&Es!==void 0?Es:cr),ns=Qi==null?void 0:Qi.disabled,Ca=Qi==null?void 0:Qi.title,0)var Is}return{label:mn,value:cr,key:Fn,disabled:ns,title:Ca}})},[xn,kt,Er]),rn=Ee(Cn,{value:Un}),un=v(rn,2),ln=un[0],$n=un[1],Ii=C.useMemo(function(){var $t,vr=_i&&ln===null?[]:ln,ir=hr(vr);return $==="combobox"&&La(($t=ir[0])===null||$t===void 0?void 0:$t.value)?[]:ir},[ln,hr,$,_i]),ia=Br(Ii,Er),ai=v(ia,2),Kn=ai[0],_a=ai[1],Wn=C.useMemo(function(){if(!$&&Kn.length===1){var $t=Kn[0];if($t.value===null&&($t.label===null||$t.label===void 0))return[]}return Kn.map(function(vr){var ir;return r(r({},vr),{},{label:(ir=typeof En=="function"?En(vr):vr.label)!==null&&ir!==void 0?ir:vr.value})})},[$,Kn,En]),aa=C.useMemo(function(){return new Set(Kn.map(function($t){return $t.value}))},[Kn]);C.useEffect(function(){if($==="combobox"){var $t,vr=($t=Kn[0])===null||$t===void 0?void 0:$t.value;ur(ws(vr)?String(vr):"")}},[Kn]);var Yn=bn(function($t,vr){var ir=vr!=null?vr:$t;return n(n({},xn.value,$t),xn.label,ir)}),Fr=C.useMemo(function(){if($!=="tags")return Xt;var $t=_(Xt),vr=function(cr){return Er.has(cr)};return _(Kn).sort(function(ir,cr){return ir.value<cr.value?-1:1}).forEach(function(ir){var cr=ir.value;vr(cr)||$t.push(Yn(cr,ir.label))}),$t},[Yn,Xt,Er,Kn,$]),si=qr(Fr,xn,pi,pa,Ut),Xi=C.useMemo(function(){return $!=="tags"||!pi||si.some(function($t){return $t[Ut||"value"]===pi})||si.some(function($t){return $t[xn.value]===pi})?si:[Yn(pi)].concat(_(si))},[Yn,Ut,$,si,pi,xn]),wa=function $t(vr){var ir=_(vr).sort(function(cr,mn){return Bt(cr,mn,{searchValue:pi})});return ir.map(function(cr){return Array.isArray(cr.options)?r(r({},cr),{},{options:cr.options.length>0?$t(cr.options):cr.options}):cr})},ji=C.useMemo(function(){return Bt?wa(Xi):Xi},[Xi,Bt,pi]),sa=C.useMemo(function(){return Vt(ji,{fieldNames:xn,childrenAsData:Mn})},[ji,xn,Mn]),jn=function(vr){var ir=hr(vr);if($n(ir),Jt&&(ir.length!==Kn.length||ir.some(function(Fn,ns){var Ca;return((Ca=Kn[ns])===null||Ca===void 0?void 0:Ca.value)!==(Fn==null?void 0:Fn.value)}))){var cr=Yr?ir:ir.map(function(Fn){return Fn.value}),mn=ir.map(function(Fn){return Sr(_a(Fn.value))});Jt(_i?cr:cr[0],_i?mn:mn[0])}},rs=C.useState(null),Hn=v(rs,2),Ai=Hn[0],br=Hn[1],Xr=C.useState(0),kn=v(Xr,2),Rn=kn[0],Xn=kn[1],Hi=yr!==void 0?yr:$!=="combobox",Ci=C.useCallback(function($t,vr){var ir=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},cr=ir.source,mn=cr===void 0?"keyboard":cr;Xn(vr),Ie&&$==="combobox"&&$t!==null&&mn==="keyboard"&&br(String($t))},[Ie,$]),ya=function(vr,ir,cr){var mn=function(){var Qr,Wr=_a(vr);return[Yr?{label:Wr==null?void 0:Wr[xn.label],value:vr,key:(Qr=Wr==null?void 0:Wr.key)!==null&&Qr!==void 0?Qr:vr}:vr,Sr(Wr)]};if(ir&&Dt){var Fn=mn(),ns=v(Fn,2),Ca=ns[0],is=ns[1];Dt(Ca,is)}else if(!ir&&Ft&&cr!=="clear"){var Qi=mn(),Es=v(Qi,2),Is=Es[0],ao=Es[1];Ft(Is,ao)}},tr=bn(function($t,vr){var ir,cr=_i?vr.selected:!0;cr?ir=_i?[].concat(_(Kn),[$t]):[$t]:ir=Kn.filter(function(mn){return mn.value!==$t}),jn(ir),ya($t,cr),$==="combobox"?br(""):(!j||Wt)&&(ur(""),br(""))}),Kr=function(vr,ir){jn(vr);var cr=ir.type,mn=ir.values;(cr==="remove"||cr==="clear")&&mn.forEach(function(Fn){ya(Fn.value,!1,cr)})},Ir=function(vr,ir){if(ur(vr),br(null),ir.source==="submit"){var cr=(vr||"").trim();if(cr){var mn=Array.from(new Set([].concat(_(aa),[cr])));jn(mn),ya(cr,!0),ur("")}return}ir.source!=="blur"&&($==="combobox"&&jn(vr),vt==null||vt(vr))},ga=function(vr){var ir=vr;$!=="tags"&&(ir=vr.map(function(mn){var Fn=Ur.get(mn);return Fn==null?void 0:Fn.value}).filter(function(mn){return mn!==void 0}));var cr=Array.from(new Set([].concat(_(aa),_(ir))));jn(cr),cr.forEach(function(mn){ya(mn,!0)})},Aa=C.useMemo(function(){var $t=$r!==!1&&tt!==!1;return r(r({},zt),{},{flattenOptions:sa,onActiveValue:Ci,defaultActiveFirstOption:Hi,onSelect:tr,menuItemSelectedIcon:er,rawValues:aa,fieldNames:xn,virtual:$t,direction:dr,listHeight:Or,listItemHeight:on,childrenAsData:Mn,maxCount:wr,optionRender:Kt})},[wr,zt,sa,Ci,Hi,tr,er,aa,xn,$r,tt,dr,Or,on,Mn,Kt]);return C.createElement(Vr.Provider,{value:Aa},C.createElement(q,s({},vi,{id:Ti,prefixCls:Oe,ref:F,omitDomProps:Pn,mode:$,displayValues:Wn,onDisplayValuesChange:Kr,direction:dr,searchValue:pi,onSearch:Ir,autoClearSearchValue:Wt,onSearchSplit:ga,dropdownMatchSelectWidth:tt,OptionList:Gt,emptyOptions:!sa.length,activeValue:Ai,activeDescendantId:"".concat(Ti,"_list_").concat(Rn)})))}),Pi=Gr;Pi.Option=gt,Pi.OptGroup=ze;var Bi=null,fi=null,zr=B(17341);function Li(I){if(Array.isArray(I))return I}function ua(I,F){var V=I==null?null:typeof Symbol!="undefined"&&I[Symbol.iterator]||I["@@iterator"];if(V!=null){var $,me,Oe,Ie,Ve=[],Je=!0,it=!1;try{if(Oe=(V=V.call(I)).next,F===0){if(Object(V)!==V)return;Je=!1}else for(;!(Je=($=Oe.call(V)).done)&&(Ve.push($.value),Ve.length!==F);Je=!0);}catch(vt){it=!0,me=vt}finally{try{if(!Je&&V.return!=null&&(Ie=V.return(),Object(Ie)!==Ie))return}finally{if(it)throw me}}return Ve}}function la(I,F){(F==null||F>I.length)&&(F=I.length);for(var V=0,$=new Array(F);V<F;V++)$[V]=I[V];return $}function ti(I,F){if(I){if(typeof I=="string")return la(I,F);var V=Object.prototype.toString.call(I).slice(8,-1);if(V==="Object"&&I.constructor&&(V=I.constructor.name),V==="Map"||V==="Set")return Array.from(I);if(V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V))return la(I,F)}}function Ln(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zi(I,F){return Li(I)||ua(I,F)||ti(I,F)||Ln()}function ea(I){var F=C.useRef();F.current=I;var V=C.useCallback(function(){for(var $,me=arguments.length,Oe=new Array(me),Ie=0;Ie<me;Ie++)Oe[Ie]=arguments[Ie];return($=F.current)===null||$===void 0?void 0:$.call.apply($,[F].concat(Oe))},[]);return V}function Vn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Si=Vn()?C.useLayoutEffect:C.useEffect,ci=function(F,V){var $=C.useRef(!0);Si(function(){return F($.current)},V),Si(function(){return $.current=!1,function(){$.current=!0}},[])},zn=function(F,V){ci(function($){if(!$)return F()},V)},Gi=null;function $i(I){var F=C.useRef(!1),V=C.useState(I),$=Zi(V,2),me=$[0],Oe=$[1];C.useEffect(function(){return F.current=!1,function(){F.current=!0}},[]);function Ie(Ve,Je){Je&&F.current||Oe(Ve)}return[me,Ie]}function ri(I){return I!==void 0}function vn(I,F){var V=F||{},$=V.defaultValue,me=V.value,Oe=V.onChange,Ie=V.postState,Ve=$i(function(){return ri(me)?me:ri($)?typeof $=="function"?$():$:typeof I=="function"?I():I}),Je=Zi(Ve,2),it=Je[0],vt=Je[1],At=me!==void 0?me:it,Wt=Ie?Ie(At):At,Dt=ea(Oe),Ft=$i([At]),Nt=Zi(Ft,2),tt=Nt[0],yt=Nt[1];zn(function(){var Ut=tt[0];it!==Ut&&Dt(it,Ut)},[tt]),zn(function(){ri(me)||vt(me)},[me]);var Bt=ea(function(Ut,kt){vt(Ut,kt),yt([At],kt)});return[Wt,Bt]}var ni={},di=[],hs=function(F){di.push(F)};function pn(I,F){if(0)var V}function Ia(I,F){if(0)var V}function Wa(){ni={}}function ii(I,F,V){!F&&!ni[V]&&(I(!1,V),ni[V]=!0)}function ta(I,F){ii(pn,I,F)}function ra(I,F){ii(Ia,I,F)}ta.preMessage=hs,ta.resetWarned=Wa,ta.noteOnce=ra;var fa=ta,_r=function(I){var F=C.useRef({valueLabels:new Map});return C.useMemo(function(){var V=F.current.valueLabels,$=new Map,me=I.map(function(Oe){var Ie=Oe.value,Ve=Oe.label,Je=Ve!=null?Ve:V.get(Ie);return $.set(Ie,Je),p(p({},Oe),{},{label:Je})});return F.current.valueLabels=$,[me]},[I])},Zr=function(F,V,$,me){return C.useMemo(function(){var Oe=function(Dt){return Dt.map(function(Ft){var Nt=Ft.value;return Nt})},Ie=Oe(F),Ve=Oe(V),Je=Ie.filter(function(Wt){return!me[Wt]}),it=Ie,vt=Ve;if($){var At=(0,zr.S)(Ie,!0,me);it=At.checkedKeys,vt=At.halfCheckedKeys}return[Array.from(new Set([].concat(P(Je),P(it)))),vt]},[F,V,$,me])},fn=Zr,Zn=B(1089),On=function(I,F){return C.useMemo(function(){var V=(0,Zn.I8)(I,{fieldNames:F,initWrapper:function(me){return p(p({},me),{},{valueEntities:new Map})},processEntity:function(me,Oe){var Ie=me.node[F.value];if(0)var Ve;Oe.valueEntities.set(Ie,me)}});return V},[I,F])};function As(I){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},As(I)}var us=Symbol.for("react.element"),ca=Symbol.for("react.transitional.element"),Xa=Symbol.for("react.fragment");function Hs(I){return I&&As(I)==="object"&&(I.$$typeof===us||I.$$typeof===ca)&&I.type===Xa}function vs(I){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=[];return C.Children.forEach(I,function($){$==null&&!F.keepEmpty||(Array.isArray($)?V=V.concat(vs($)):Hs($)&&$.props?V=V.concat(vs($.props.children,F)):V.push($))}),V}var Ns=function(){return null},Qa=Ns,Ma=["children","value"];function Ui(I){return vs(I).map(function(F){if(!C.isValidElement(F)||!F.type)return null;var V=F,$=V.key,me=V.props,Oe=me.children,Ie=me.value,Ve=u(me,Ma),Je=p({key:$,value:Ie},Ve),it=Ui(Oe);return it.length&&(Je.children=it),Je}).filter(function(F){return F})}function da(I){if(!I)return I;var F=p({},I);return"props"in F||Object.defineProperty(F,"props",{get:function(){return fa(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),F}}),F}function Ki(I,F,V,$,me,Oe){var Ie=null,Ve=null;function Je(){function it(vt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",Wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return vt.map(function(Dt,Ft){var Nt="".concat(At,"-").concat(Ft),tt=Dt[Oe.value],yt=V.includes(tt),Bt=it(Dt[Oe.children]||[],Nt,yt),Ut=C.createElement(Qa,Dt,Bt.map(function(or){return or.node}));if(F===tt&&(Ie=Ut),yt){var kt={pos:Nt,node:Ut,children:Bt};return Wt||Ve.push(kt),kt}return null}).filter(function(Dt){return Dt})}Ve||(Ve=[],it($),Ve.sort(function(vt,At){var Wt=vt.node.props.value,Dt=At.node.props.value,Ft=V.indexOf(Wt),Nt=V.indexOf(Dt);return Ft-Nt}))}Object.defineProperty(I,"triggerNode",{get:function(){return fa(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),Je(),Ie}}),Object.defineProperty(I,"allCheckedNodes",{get:function(){return fa(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),Je(),me?Ve:Ve.map(function(vt){var At=vt.node;return At})}})}var ja=function(F,V,$){var me=$.fieldNames,Oe=$.treeNodeFilterProp,Ie=$.filterTreeNode,Ve=me.children;return C.useMemo(function(){if(!V||Ie===!1)return F;var Je=typeof Ie=="function"?Ie:function(vt,At){return String(At[Oe]).toUpperCase().includes(V.toUpperCase())},it=function vt(At){var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return At.reduce(function(Dt,Ft){var Nt=Ft[Ve],tt=Wt||Je(V,da(Ft)),yt=vt(Nt||[],tt);return(tt||yt.length)&&Dt.push(p(p({},Ft),{},D({isLeaf:void 0},Ve,yt))),Dt},[])};return it(F)},[F,V,Ve,Oe,Ie])},An=ja;function Sn(I){var F=C.useRef();F.current=I;var V=C.useCallback(function(){return F.current.apply(F,arguments)},[]);return V}function xa(I,F){var V=F.id,$=F.pId,me=F.rootPId,Oe=new Map,Ie=[];return I.forEach(function(Ve){var Je=Ve[V],it=p(p({},Ve),{},{key:Ve.key||Je});Oe.set(Je,it)}),Oe.forEach(function(Ve){var Je=Ve[$],it=Oe.get(Je);it?(it.children=it.children||[],it.children.push(Ve)):(Je===me||me===null)&&Ie.push(Ve)}),Ie}function Ja(I,F,V){return C.useMemo(function(){if(I){if(V){var $=p({id:"id",pId:"pId",rootPId:null},k(V)==="object"?V:{});return xa(I,$)}return I}return Ui(F)},[F,V,I])}var Cs=C.createContext(null),ha=Cs;function Bs(I,F){var V=typeof Symbol!="undefined"&&I[Symbol.iterator]||I["@@iterator"];if(!V){if(Array.isArray(I)||(V=L(I))||F&&I&&typeof I.length=="number"){V&&(I=V);var $=0,me=function(){};return{s:me,n:function(){return $>=I.length?{done:!0}:{done:!1,value:I[$++]}},e:function(it){throw it},f:me}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Oe,Ie=!0,Ve=!1;return{s:function(){V=V.call(I)},n:function(){var it=V.next();return Ie=it.done,it},e:function(it){Ve=!0,Oe=it},f:function(){try{Ie||V.return==null||V.return()}finally{if(Ve)throw Oe}}}}var ps=B(70593),Zt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(F){var V=F.keyCode;if(F.altKey&&!F.ctrlKey||F.metaKey||V>=Zt.F1&&V<=Zt.F12)return!1;switch(V){case Zt.ALT:case Zt.CAPS_LOCK:case Zt.CONTEXT_MENU:case Zt.CTRL:case Zt.DOWN:case Zt.END:case Zt.ESC:case Zt.HOME:case Zt.INSERT:case Zt.LEFT:case Zt.MAC_FF_META:case Zt.META:case Zt.NUMLOCK:case Zt.NUM_CENTER:case Zt.PAGE_DOWN:case Zt.PAGE_UP:case Zt.PAUSE:case Zt.PRINT_SCREEN:case Zt.RIGHT:case Zt.SHIFT:case Zt.UP:case Zt.WIN_KEY:case Zt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(F){if(F>=Zt.ZERO&&F<=Zt.NINE||F>=Zt.NUM_ZERO&&F<=Zt.NUM_MULTIPLY||F>=Zt.A&&F<=Zt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&F===0)return!0;switch(F){case Zt.SPACE:case Zt.QUESTION_MARK:case Zt.NUM_PLUS:case Zt.NUM_MINUS:case Zt.NUM_PERIOD:case Zt.NUM_DIVISION:case Zt.SEMICOLON:case Zt.DASH:case Zt.EQUALS:case Zt.COMMA:case Zt.PERIOD:case Zt.SLASH:case Zt.APOSTROPHE:case Zt.SINGLE_QUOTE:case Zt.OPEN_SQUARE_BRACKET:case Zt.BACKSLASH:case Zt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},va=Zt;function gs(I,F,V){var $=C.useRef({});return(!("value"in $.current)||V($.current.condition,F))&&($.current.value=I(),$.current.condition=F),$.current.value}var Rs=C.createContext(null),ls=Rs,Ps=function(F){return Array.isArray(F)?F:F!==void 0?[F]:[]},qa=function(F){var V=F||{},$=V.label,me=V.value,Oe=V.children;return{_title:$?[$]:["title","label"],value:me||"value",key:me||"value",children:Oe||"children"}},ma=function(F){return!F||F.disabled||F.disableCheckbox||F.checkable===!1},Ha=function(F,V){var $=[],me=function Oe(Ie){Ie.forEach(function(Ve){var Je=Ve[V.children];Je&&($.push(Ve[V.value]),Oe(Je))})};return me(F),$},fs=function(F){return F==null},ms=B(66133),Ls=Number(C.version.split(".")[0]),Oi=function(F,V){typeof F=="function"?F(V):_typeof(F)==="object"&&F&&"current"in F&&(F.current=V)},Us=function(){for(var F=arguments.length,V=new Array(F),$=0;$<F;$++)V[$]=arguments[$];var me=V.filter(Boolean);return me.length<=1?me[0]:function(Oe){V.forEach(function(Ie){Oi(Ie,Oe)})}},Qs=function(){for(var F=arguments.length,V=new Array(F),$=0;$<F;$++)V[$]=arguments[$];return useMemo(function(){return Us.apply(void 0,V)},V,function(me,Oe){return me.length!==Oe.length||me.every(function(Ie,Ve){return Ie!==Oe[Ve]})})},cs=function(F){var V,$;if(!F)return!1;if(_s(F)&&Ls>=19)return!0;var me=isMemo(F)?F.type.type:F.type;return!(typeof me=="function"&&!((V=me.prototype)!==null&&V!==void 0&&V.render)&&me.$$typeof!==ForwardRef||typeof F=="function"&&!(($=F.prototype)!==null&&$!==void 0&&$.render)&&F.$$typeof!==ForwardRef)};function _s(I){return isValidElement(I)&&!isFragment(I)}var Gn=function(F){return _s(F)&&cs(F)},cn=function(F){if(F&&_s(F)){var V=F;return V.props.propertyIsEnumerable("ref")?V.props.ref:V.ref}return null};function yn(I,F,V,$){if(!F.length)return V;var me=_toArray(F),Oe=me[0],Ie=me.slice(1),Ve;return!I&&typeof Oe=="number"?Ve=[]:Array.isArray(I)?Ve=_toConsumableArray(I):Ve=_objectSpread({},I),$&&V===void 0&&Ie.length===1?delete Ve[Oe][Ie[0]]:Ve[Oe]=yn(Ve[Oe],Ie,V,$),Ve}function hi(I,F,V){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return F.length&&$&&V===void 0&&!get(I,F.slice(0,-1))?I:yn(I,F,V,$)}function Wi(I){return _typeof(I)==="object"&&I!==null&&Object.getPrototypeOf(I)===Object.prototype}function ka(I){return Array.isArray(I)?[]:{}}var Da=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Vs(){for(var I=arguments.length,F=new Array(I),V=0;V<I;V++)F[V]=arguments[V];var $=ka(F[0]);return F.forEach(function(me){function Oe(Ie,Ve){var Je=new Set(Ve),it=get(me,Ie),vt=Array.isArray(it);if(vt||Wi(it)){if(!Je.has(it)){Je.add(it);var At=get($,Ie);vt?$=hi($,Ie,[]):(!At||_typeof(At)!=="object")&&($=hi($,Ie,ka(it))),Da(it).forEach(function(Wt){Oe([].concat(_toConsumableArray(Ie),[Wt]),Je)})}}else $=hi($,Ie,it)}Oe([])}),$}var Os={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ta=function(F,V){var $=ke(),me=$.prefixCls,Oe=$.multiple,Ie=$.searchValue,Ve=$.toggleOpen,Je=$.open,it=$.notFoundContent,vt=C.useContext(ls),At=vt.virtual,Wt=vt.listHeight,Dt=vt.listItemHeight,Ft=vt.listItemScrollOffset,Nt=vt.treeData,tt=vt.fieldNames,yt=vt.onSelect,Bt=vt.dropdownMatchSelectWidth,Ut=vt.treeExpandAction,kt=vt.treeTitleRender,or=vt.onPopupScroll,Kt=vt.leftMaxCount,Lr=vt.leafCountOnly,yr=vt.valueEntities,er=C.useContext(ha),$r=er.checkable,dr=er.checkedKeys,gn=er.halfCheckedKeys,Or=er.treeExpandedKeys,In=er.treeDefaultExpandAll,on=er.treeDefaultExpandedKeys,En=er.onTreeExpand,Un=er.treeIcon,Cn=er.showTreeIcon,Yr=er.switcherIcon,Jt=er.treeLine,wr=er.treeNodeFilterProp,vi=er.loadData,Ti=er.treeLoadedKeys,_i=er.treeMotion,Mn=er.onTreeLoad,pa=er.keyEntities,xn=C.useRef(),wi=gs(function(){return Nt},[Je,Nt],function(br,Xr){return Xr[0]&&br[1]!==Xr[1]}),na=C.useMemo(function(){return $r?{checked:dr,halfChecked:gn}:null},[$r,dr,gn]);C.useEffect(function(){if(Je&&!Oe&&dr.length){var br;(br=xn.current)===null||br===void 0||br.scrollTo({key:dr[0]})}},[Je]);var pi=function(Xr){Xr.preventDefault()},ur=function(Xr,kn){var Rn=kn.node;$r&&ma(Rn)||(yt(Rn.key,{selected:!dr.includes(Rn.key)}),Oe||Ve(!1))},zt=C.useState(on),Er=c(zt,2),Ur=Er[0],Xt=Er[1],hr=C.useState(null),rn=c(hr,2),un=rn[0],ln=rn[1],$n=C.useMemo(function(){return Or?P(Or):Ie?un:Ur},[Ur,un,Or,Ie]),Ii=function(Xr){Xt(Xr),ln(Xr),En&&En(Xr)},ia=String(Ie).toLowerCase(),ai=function(Xr){return ia?String(Xr[wr]).toLowerCase().includes(ia):!1};C.useEffect(function(){Ie&&ln(Ha(Nt,tt))},[Ie]);var Kn=C.useState(function(){return new Map}),_a=c(Kn,2),Wn=_a[0],aa=_a[1];C.useEffect(function(){Kt&&aa(new Map)},[Kt]);function Yn(br){var Xr=br[tt.value];if(!Wn.has(Xr)){var kn=yr.get(Xr),Rn=(kn.children||[]).length===0;if(Rn)Wn.set(Xr,!1);else{var Xn=kn.children.filter(function(Ci){return!Ci.node.disabled&&!Ci.node.disableCheckbox&&!dr.includes(Ci.node[tt.value])}),Hi=Xn.length;Wn.set(Xr,Hi>Kt)}}return Wn.get(Xr)}var Fr=ea(function(br){var Xr=br[tt.value];return dr.includes(Xr)||Kt===null?!1:Kt<=0?!0:Lr&&Kt?Yn(br):!1}),si=function br(Xr){var kn=Bs(Xr),Rn;try{for(kn.s();!(Rn=kn.n()).done;){var Xn=Rn.value;if(!(Xn.disabled||Xn.selectable===!1)){if(Ie){if(ai(Xn))return Xn}else return Xn;if(Xn[tt.children]){var Hi=br(Xn[tt.children]);if(Hi)return Hi}}}}catch(Ci){kn.e(Ci)}finally{kn.f()}return null},Xi=C.useState(null),wa=c(Xi,2),ji=wa[0],sa=wa[1],jn=pa[ji];C.useEffect(function(){if(Je){var br=null,Xr=function(){var Rn=si(wi);return Rn?Rn[tt.value]:null};!Oe&&dr.length&&!Ie?br=dr[0]:br=Xr(),sa(br)}},[Je,Ie]),C.useImperativeHandle(V,function(){var br;return{scrollTo:(br=xn.current)===null||br===void 0?void 0:br.scrollTo,onKeyDown:function(kn){var Rn,Xn=kn.which;switch(Xn){case va.UP:case va.DOWN:case va.LEFT:case va.RIGHT:(Rn=xn.current)===null||Rn===void 0||Rn.onKeyDown(kn);break;case va.ENTER:{if(jn){var Hi=Fr(jn.node),Ci=(jn==null?void 0:jn.node)||{},ya=Ci.selectable,tr=Ci.value,Kr=Ci.disabled;ya!==!1&&!Kr&&!Hi&&ur(null,{node:{key:ji},selected:!dr.includes(tr)})}break}case va.ESC:Ve(!1)}},onKeyUp:function(){}}});var rs=gs(function(){return!Ie},[Ie,Or||Ur],function(br,Xr){var kn=c(br,1),Rn=kn[0],Xn=c(Xr,2),Hi=Xn[0],Ci=Xn[1];return Rn!==Hi&&!!(Hi||Ci)}),Hn=rs?vi:null;if(wi.length===0)return C.createElement("div",{role:"listbox",className:"".concat(me,"-empty"),onMouseDown:pi},it);var Ai={fieldNames:tt};return Ti&&(Ai.loadedKeys=Ti),$n&&(Ai.expandedKeys=$n),C.createElement("div",{onMouseDown:pi},jn&&Je&&C.createElement("span",{style:Os,"aria-live":"assertive"},jn.node.value),C.createElement(ps.y6.Provider,{value:{nodeDisabled:Fr}},C.createElement(ps.ZP,z({ref:xn,focusable:!1,prefixCls:"".concat(me,"-tree"),treeData:wi,height:Wt,itemHeight:Dt,itemScrollOffset:Ft,virtual:At!==!1&&Bt!==!1,multiple:Oe,icon:Un,showIcon:Cn,switcherIcon:Yr,showLine:Jt,loadData:Hn,motion:_i,activeKey:ji,checkable:$r,checkStrictly:!0,checkedKeys:na,selectedKeys:$r?[]:dr,defaultExpandAll:In,titleRender:kt},Ai,{onActiveChange:sa,onSelect:ur,onCheck:ur,onExpand:Ii,onLoad:Mn,filterTreeNode:ai,expandAction:Ut,onScroll:or}))))},Yi=C.forwardRef(Ta),es=Yi,ts="SHOW_ALL",Fa="SHOW_PARENT",Ks="SHOW_CHILD";function zs(I,F,V,$){var me=new Set(I);return F===Ks?I.filter(function(Oe){var Ie=V[Oe];return!Ie||!Ie.children||!Ie.children.some(function(Ve){var Je=Ve.node;return me.has(Je[$.value])})||!Ie.children.every(function(Ve){var Je=Ve.node;return ma(Je)||me.has(Je[$.value])})}):F===Fa?I.filter(function(Oe){var Ie=V[Oe],Ve=Ie?Ie.parent:null;return!Ve||ma(Ve.node)||!me.has(Ve.key)}):I}function so(I){var F=I.searchPlaceholder,V=I.treeCheckStrictly,$=I.treeCheckable,me=I.labelInValue,Oe=I.value,Ie=I.multiple,Ve=I.showCheckedStrategy,Je=I.maxCount;warning(!F,"`searchPlaceholder` has been removed."),V&&me===!1&&warning(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(me||V)&&warning(toArray(Oe).every(function(it){return it&&_typeof(it)==="object"&&"value"in it}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),V||Ie||$?warning(!Oe||Array.isArray(Oe),"`value` should be an array when `TreeSelect` is checkable or multiple."):warning(!Array.isArray(Oe),"`value` should not be array when `TreeSelect` is single mode."),Je&&(Ve==="SHOW_ALL"&&!V||Ve==="SHOW_PARENT")&&warning(!1,"`maxCount` not work with `showCheckedStrategy=SHOW_ALL` (when `treeCheckStrictly=false`) or `showCheckedStrategy=SHOW_PARENT`.")}var Js=null,eo=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","maxCount","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","listItemScrollOffset","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion","treeTitleRender","onPopupScroll"];function to(I){return!I||k(I)!=="object"}var ro=C.forwardRef(function(I,F){var V=I.id,$=I.prefixCls,me=$===void 0?"rc-tree-select":$,Oe=I.value,Ie=I.defaultValue,Ve=I.onChange,Je=I.onSelect,it=I.onDeselect,vt=I.searchValue,At=I.inputValue,Wt=I.onSearch,Dt=I.autoClearSearchValue,Ft=Dt===void 0?!0:Dt,Nt=I.filterTreeNode,tt=I.treeNodeFilterProp,yt=tt===void 0?"value":tt,Bt=I.showCheckedStrategy,Ut=I.treeNodeLabelProp,kt=I.multiple,or=I.treeCheckable,Kt=I.treeCheckStrictly,Lr=I.labelInValue,yr=I.maxCount,er=I.fieldNames,$r=I.treeDataSimpleMode,dr=I.treeData,gn=I.children,Or=I.loadData,In=I.treeLoadedKeys,on=I.onTreeLoad,En=I.treeDefaultExpandAll,Un=I.treeExpandedKeys,Cn=I.treeDefaultExpandedKeys,Yr=I.onTreeExpand,Jt=I.treeExpandAction,wr=I.virtual,vi=I.listHeight,Ti=vi===void 0?200:vi,_i=I.listItemHeight,Mn=_i===void 0?20:_i,pa=I.listItemScrollOffset,xn=pa===void 0?0:pa,wi=I.onDropdownVisibleChange,na=I.dropdownMatchSelectWidth,pi=na===void 0?!0:na,ur=I.treeLine,zt=I.treeIcon,Er=I.showTreeIcon,Ur=I.switcherIcon,Xt=I.treeMotion,hr=I.treeTitleRender,rn=I.onPopupScroll,un=u(I,eo),ln=tn(V),$n=or&&!Kt,Ii=or||Kt,ia=Kt||Lr,ai=Ii||kt,Kn=vn(Ie,{value:Oe}),_a=c(Kn,2),Wn=_a[0],aa=_a[1],Yn=C.useMemo(function(){return or?Bt||Ks:ts},[Bt,or]),Fr=C.useMemo(function(){return qa(er)},[JSON.stringify(er)]),si=vn("",{value:vt!==void 0?vt:At,postState:function(Qr){return Qr||""}}),Xi=c(si,2),wa=Xi[0],ji=Xi[1],sa=function(Qr){ji(Qr),Wt==null||Wt(Qr)},jn=Ja(dr,gn,$r),rs=On(jn,Fr),Hn=rs.keyEntities,Ai=rs.valueEntities,br=C.useCallback(function(_n){var Qr=[],Wr=[];return _n.forEach(function(Nn){Ai.has(Nn)?Wr.push(Nn):Qr.push(Nn)}),{missingRawValues:Qr,existRawValues:Wr}},[Ai]),Xr=An(jn,wa,{fieldNames:Fr,treeNodeFilterProp:yt,filterTreeNode:Nt}),kn=C.useCallback(function(_n){if(_n){if(Ut)return _n[Ut];for(var Qr=Fr._title,Wr=0;Wr<Qr.length;Wr+=1){var Nn=_n[Qr[Wr]];if(Nn!==void 0)return Nn}}},[Fr,Ut]),Rn=C.useCallback(function(_n){var Qr=Ps(_n);return Qr.map(function(Wr){return to(Wr)?{value:Wr}:Wr})},[]),Xn=C.useCallback(function(_n){var Qr=Rn(_n);return Qr.map(function(Wr){var Nn=Wr.label,Va=Wr.value,Mi=Wr.halfChecked,Dn,oi=Ai.get(Va);if(oi){var Ra;Nn=hr?hr(oi.node):(Ra=Nn)!==null&&Ra!==void 0?Ra:kn(oi.node),Dn=oi.node.disabled}else if(Nn===void 0){var bs=Rn(Wn).find(function(Zs){return Zs.value===Va});Nn=bs.label}return{label:Nn,value:Va,halfChecked:Mi,disabled:Dn}})},[Ai,kn,Rn,Wn]),Hi=C.useMemo(function(){return Rn(Wn===null?[]:Wn)},[Rn,Wn]),Ci=C.useMemo(function(){var _n=[],Qr=[];return Hi.forEach(function(Wr){Wr.halfChecked?Qr.push(Wr):_n.push(Wr)}),[_n,Qr]},[Hi]),ya=c(Ci,2),tr=ya[0],Kr=ya[1],Ir=C.useMemo(function(){return tr.map(function(_n){return _n.value})},[tr]),ga=fn(tr,Kr,$n,Hn),Aa=c(ga,2),$t=Aa[0],vr=Aa[1],ir=C.useMemo(function(){var _n=zs($t,Yn,Hn,Fr),Qr=_n.map(function(Mi){var Dn,oi;return(Dn=(oi=Hn[Mi])===null||oi===void 0||(oi=oi.node)===null||oi===void 0?void 0:oi[Fr.value])!==null&&Dn!==void 0?Dn:Mi}),Wr=Qr.map(function(Mi){var Dn=tr.find(function(Ra){return Ra.value===Mi}),oi=Lr?Dn==null?void 0:Dn.label:hr==null?void 0:hr(Dn);return{value:Mi,label:oi}}),Nn=Xn(Wr),Va=Nn[0];return!ai&&Va&&fs(Va.value)&&fs(Va.label)?[]:Nn.map(function(Mi){var Dn;return p(p({},Mi),{},{label:(Dn=Mi.label)!==null&&Dn!==void 0?Dn:Mi.value})})},[Fr,ai,$t,tr,Xn,Yn,Hn]),cr=_r(ir),mn=c(cr,1),Fn=mn[0],ns=C.useMemo(function(){return ai&&(Yn==="SHOW_CHILD"||Kt||!or)?yr:null},[yr,ai,Kt,Yn,or]),Ca=Sn(function(_n,Qr,Wr){var Nn=zs(_n,Yn,Hn,Fr);if(!(ns&&Nn.length>ns)){var Va=Xn(_n);if(aa(Va),Ft&&ji(""),Ve){var Mi=_n;$n&&(Mi=Nn.map(function(za){var xs=Ai.get(za);return xs?xs.node[Fr.value]:za}));var Dn=Qr||{triggerValue:void 0,selected:void 0},oi=Dn.triggerValue,Ra=Dn.selected,bs=Mi;if(Kt){var Zs=Kr.filter(function(za){return!Mi.includes(za.value)});bs=[].concat(P(bs),P(Zs))}var Gs=Xn(bs),Ss={preValue:tr,triggerValue:oi},Ws=!0;(Kt||Wr==="selection"&&!Ra)&&(Ws=!1),Ki(Ss,oi,_n,jn,Ws,Fr),Ii?Ss.checked=Ra:Ss.selected=Ra;var $s=ia?Gs:Gs.map(function(za){return za.value});Ve(ai?$s:$s[0],ia?null:Gs.map(function(za){return za.label}),Ss)}}}),is=C.useCallback(function(_n,Qr){var Wr,Nn=Qr.selected,Va=Qr.source,Mi=Hn[_n],Dn=Mi==null?void 0:Mi.node,oi=(Wr=Dn==null?void 0:Dn[Fr.value])!==null&&Wr!==void 0?Wr:_n;if(!ai)Ca([oi],{selected:!0,triggerValue:oi},"option");else{var Ra=Nn?[].concat(P(Ir),[oi]):$t.filter(function(xs){return xs!==oi});if($n){var bs=br(Ra),Zs=bs.missingRawValues,Gs=bs.existRawValues,Ss=Gs.map(function(xs){return Ai.get(xs).key}),Ws;if(Nn){var $s=(0,zr.S)(Ss,!0,Hn);Ws=$s.checkedKeys}else{var za=(0,zr.S)(Ss,{checked:!1,halfCheckedKeys:vr},Hn);Ws=za.checkedKeys}Ra=[].concat(P(Zs),P(Ws.map(function(xs){return Hn[xs].node[Fr.value]})))}Ca(Ra,{selected:Nn,triggerValue:oi},Va||"option")}Nn||!ai?Je==null||Je(oi,da(Dn)):it==null||it(oi,da(Dn))},[br,Ai,Hn,Fr,ai,Ir,Ca,$n,Je,it,$t,vr,yr]),Qi=C.useCallback(function(_n){if(wi){var Qr={};Object.defineProperty(Qr,"documentClickClose",{get:function(){return fa(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),wi(_n,Qr)}},[wi]),Es=Sn(function(_n,Qr){var Wr=_n.map(function(Nn){return Nn.value});if(Qr.type==="clear"){Ca(Wr,{},"selection");return}Qr.values.length&&is(Qr.values[0].value,{selected:!1,source:"selection"})}),Is=C.useMemo(function(){return{virtual:wr,dropdownMatchSelectWidth:pi,listHeight:Ti,listItemHeight:Mn,listItemScrollOffset:xn,treeData:Xr,fieldNames:Fr,onSelect:is,treeExpandAction:Jt,treeTitleRender:hr,onPopupScroll:rn,leftMaxCount:yr===void 0?null:yr-Fn.length,leafCountOnly:Yn==="SHOW_CHILD"&&!Kt&&!!or,valueEntities:Ai}},[wr,pi,Ti,Mn,xn,Xr,Fr,is,Jt,hr,rn,yr,Fn.length,Yn,Kt,or,Ai]),ao=C.useMemo(function(){return{checkable:Ii,loadData:Or,treeLoadedKeys:In,onTreeLoad:on,checkedKeys:$t,halfCheckedKeys:vr,treeDefaultExpandAll:En,treeExpandedKeys:Un,treeDefaultExpandedKeys:Cn,onTreeExpand:Yr,treeIcon:zt,treeMotion:Xt,showTreeIcon:Er,switcherIcon:Ur,treeLine:ur,treeNodeFilterProp:yt,keyEntities:Hn}},[Ii,Or,In,on,$t,vr,En,Un,Cn,Yr,zt,Xt,Er,Ur,ur,yt,Hn]);return C.createElement(ls.Provider,{value:Is},C.createElement(ha.Provider,{value:ao},C.createElement(q,z({ref:F},un,{id:ln,prefixCls:me,mode:ai?"multiple":void 0,displayValues:Fn,onDisplayValuesChange:Es,searchValue:wa,onSearch:sa,OptionList:es,emptyOptions:!jn.length,onDropdownVisibleChange:Qi,dropdownMatchSelectWidth:pi}))))}),ys=ro;ys.TreeNode=Qa,ys.SHOW_ALL=ts,ys.SHOW_PARENT=Fa,ys.SHOW_CHILD=Ks;var no=ys,io=no},18798:function(Ct,Qe){"use strict";var B;var z=typeof Symbol=="function"&&Symbol.for,oe=z?Symbol.for("react.element"):60103,te=z?Symbol.for("react.portal"):60106,U=z?Symbol.for("react.fragment"):60107,L=z?Symbol.for("react.strict_mode"):60108,M=z?Symbol.for("react.profiler"):60114,P=z?Symbol.for("react.provider"):60109,k=z?Symbol.for("react.context"):60110,e=z?Symbol.for("react.async_mode"):60111,O=z?Symbol.for("react.concurrent_mode"):60111,D=z?Symbol.for("react.forward_ref"):60112,l=z?Symbol.for("react.suspense"):60113,p=z?Symbol.for("react.suspense_list"):60120,h=z?Symbol.for("react.memo"):60115,g=z?Symbol.for("react.lazy"):60116,o=z?Symbol.for("react.block"):60121,c=z?Symbol.for("react.fundamental"):60117,y=z?Symbol.for("react.responder"):60118,u=z?Symbol.for("react.scope"):60119;function s(t){if(typeof t=="object"&&t!==null){var m=t.$$typeof;switch(m){case oe:switch(t=t.type,t){case e:case O:case U:case M:case L:case l:return t;default:switch(t=t&&t.$$typeof,t){case k:case D:case g:case h:case P:return t;default:return m}}case te:return m}}}function i(t){return s(t)===O}B=e,B=O,B=k,B=P,B=oe,B=D,B=U,B=g,B=h,B=te,B=M,B=L,B=l,B=function(t){return i(t)||s(t)===e},B=i,B=function(t){return s(t)===k},B=function(t){return s(t)===P},B=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===oe},B=function(t){return s(t)===D},Qe.isFragment=function(t){return s(t)===U},B=function(t){return s(t)===g},B=function(t){return s(t)===h},B=function(t){return s(t)===te},B=function(t){return s(t)===M},B=function(t){return s(t)===L},B=function(t){return s(t)===l},B=function(t){return typeof t=="string"||typeof t=="function"||t===U||t===O||t===M||t===L||t===l||t===p||typeof t=="object"&&t!==null&&(t.$$typeof===g||t.$$typeof===h||t.$$typeof===P||t.$$typeof===k||t.$$typeof===D||t.$$typeof===c||t.$$typeof===y||t.$$typeof===u||t.$$typeof===o)},B=s},95936:function(Ct,Qe,B){"use strict";Ct.exports=B(18798)},39988:function(Ct,Qe){"use strict";var B;var z=Symbol.for("react.element"),oe=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),P=Symbol.for("react.context"),k=Symbol.for("react.server_context"),e=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function o(c){if(typeof c=="object"&&c!==null){var y=c.$$typeof;switch(y){case z:switch(c=c.type,c){case te:case L:case U:case O:case D:return c;default:switch(c=c&&c.$$typeof,c){case k:case P:case e:case p:case l:case M:return c;default:return y}}case oe:return y}}}B=P,B=M,B=z,B=e,B=te,B=p,B=l,B=oe,B=L,B=U,B=O,B=D,B=function(){return!1},B=function(){return!1},B=function(c){return o(c)===P},B=function(c){return o(c)===M},B=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===z},B=function(c){return o(c)===e},B=function(c){return o(c)===te},B=function(c){return o(c)===p},B=function(c){return o(c)===l},B=function(c){return o(c)===oe},B=function(c){return o(c)===L},B=function(c){return o(c)===U},B=function(c){return o(c)===O},B=function(c){return o(c)===D},B=function(c){return typeof c=="string"||typeof c=="function"||c===te||c===L||c===U||c===O||c===D||c===h||typeof c=="object"&&c!==null&&(c.$$typeof===p||c.$$typeof===l||c.$$typeof===M||c.$$typeof===P||c.$$typeof===e||c.$$typeof===g||c.getModuleId!==void 0)},B=o},66133:function(Ct,Qe,B){"use strict";B(39988)},86128:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return s}});var z=B(87462),oe=B(4942),te=B(1413),U=B(97685),L=B(45987),M=B(67294),P=B(94184),k=B.n(P),e=B(64217),O=B(27822),D=function(t){for(var m=t.prefixCls,S=t.level,f=t.isStart,_=t.isEnd,A="".concat(m,"-indent-unit"),x=[],w=0;w<S;w+=1)x.push(M.createElement("span",{key:w,className:k()(A,(0,oe.Z)((0,oe.Z)({},"".concat(A,"-start"),f[w]),"".concat(A,"-end"),_[w]))}));return M.createElement("span",{"aria-hidden":"true",className:"".concat(m,"-indent")},x)},l=M.memo(D),p=B(35381),h=B(1089),g=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],o="open",c="close",y="---",u=function(t){var m,S,f,_=t.eventKey,A=t.className,x=t.style,w=t.dragOver,n=t.dragOverGapTop,a=t.dragOverGapBottom,r=t.isLeaf,d=t.isStart,T=t.isEnd,b=t.expanded,v=t.selected,E=t.checked,R=t.halfChecked,C=t.loading,N=t.domRef,K=t.active,H=t.data,ee=t.onMouseMove,J=t.selectable,se=(0,L.Z)(t,g),G=M.useContext(O.k),Ee=M.useContext(O.y),ge=M.useRef(null),Pe=M.useState(!1),Ne=(0,U.Z)(Pe,2),$e=Ne[0],je=Ne[1],Ce=!!(G.disabled||t.disabled||(m=Ee.nodeDisabled)!==null&&m!==void 0&&m.call(Ee,H)),fe=M.useMemo(function(){return!G.checkable||t.checkable===!1?!1:G.checkable},[G.checkable,t.checkable]),Be=function(Q){Ce||G.onNodeSelect(Q,(0,h.F)(t))},Ue=function(Q){Ce||!fe||t.disableCheckbox||G.onNodeCheck(Q,(0,h.F)(t),!E)},re=M.useMemo(function(){return typeof J=="boolean"?J:G.selectable},[J,G.selectable]),Z=function(Q){G.onNodeClick(Q,(0,h.F)(t)),re?Be(Q):Ue(Q)},le=function(Q){G.onNodeDoubleClick(Q,(0,h.F)(t))},we=function(Q){G.onNodeMouseEnter(Q,(0,h.F)(t))},ue=function(Q){G.onNodeMouseLeave(Q,(0,h.F)(t))},pe=function(Q){G.onNodeContextMenu(Q,(0,h.F)(t))},ae=M.useMemo(function(){return!!(G.draggable&&(!G.draggable.nodeDraggable||G.draggable.nodeDraggable(H)))},[G.draggable,H]),_e=function(Q){Q.stopPropagation(),je(!0),G.onNodeDragStart(Q,t);try{Q.dataTransfer.setData("text/plain","")}catch(de){}},ce=function(Q){Q.preventDefault(),Q.stopPropagation(),G.onNodeDragEnter(Q,t)},he=function(Q){Q.preventDefault(),Q.stopPropagation(),G.onNodeDragOver(Q,t)},Le=function(Q){Q.stopPropagation(),G.onNodeDragLeave(Q,t)},Ye=function(Q){Q.stopPropagation(),je(!1),G.onNodeDragEnd(Q,t)},ke=function(Q){Q.preventDefault(),Q.stopPropagation(),je(!1),G.onNodeDrop(Q,t)},be=function(Q){C||G.onNodeExpand(Q,(0,h.F)(t))},Re=M.useMemo(function(){var ie=(0,p.Z)(G.keyEntities,_)||{},Q=ie.children;return!!(Q||[]).length},[G.keyEntities,_]),Fe=M.useMemo(function(){return r===!1?!1:r||!G.loadData&&!Re||G.loadData&&t.loaded&&!Re},[r,G.loadData,Re,t.loaded]);M.useEffect(function(){C||typeof G.loadData=="function"&&b&&!Fe&&!t.loaded&&G.onNodeLoad((0,h.F)(t))},[C,G.loadData,G.onNodeLoad,b,Fe,t]);var Ae=M.useMemo(function(){var ie;return(ie=G.draggable)!==null&&ie!==void 0&&ie.icon?M.createElement("span",{className:"".concat(G.prefixCls,"-draggable-icon")},G.draggable.icon):null},[G.draggable]),Me=function(Q){var de=t.switcherIcon||G.switcherIcon;return typeof de=="function"?de((0,te.Z)((0,te.Z)({},t),{},{isLeaf:Q})):de},rt=function(){if(Fe){var Q=Me(!0);return Q!==!1?M.createElement("span",{className:k()("".concat(G.prefixCls,"-switcher"),"".concat(G.prefixCls,"-switcher-noop"))},Q):null}var de=Me(!1);return de!==!1?M.createElement("span",{onClick:be,className:k()("".concat(G.prefixCls,"-switcher"),"".concat(G.prefixCls,"-switcher_").concat(b?o:c))},de):null},lt=M.useMemo(function(){if(!fe)return null;var ie=typeof fe!="boolean"?fe:null;return M.createElement("span",{className:k()("".concat(G.prefixCls,"-checkbox"),(0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(G.prefixCls,"-checkbox-checked"),E),"".concat(G.prefixCls,"-checkbox-indeterminate"),!E&&R),"".concat(G.prefixCls,"-checkbox-disabled"),Ce||t.disableCheckbox)),onClick:Ue,role:"checkbox","aria-checked":R?"mixed":E,"aria-disabled":Ce||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},ie)},[fe,E,R,Ce,t.disableCheckbox,t.title]),Ze=M.useMemo(function(){return Fe?null:b?o:c},[Fe,b]),ft=M.useMemo(function(){return M.createElement("span",{className:k()("".concat(G.prefixCls,"-iconEle"),"".concat(G.prefixCls,"-icon__").concat(Ze||"docu"),(0,oe.Z)({},"".concat(G.prefixCls,"-icon_loading"),C))})},[G.prefixCls,Ze,C]),Et=M.useMemo(function(){var ie=!!G.draggable,Q=!t.disabled&&ie&&G.dragOverNodeKey===_;return Q?G.dropIndicatorRender({dropPosition:G.dropPosition,dropLevelOffset:G.dropLevelOffset,indent:G.indent,prefixCls:G.prefixCls,direction:G.direction}):null},[G.dropPosition,G.dropLevelOffset,G.indent,G.prefixCls,G.direction,G.draggable,G.dragOverNodeKey,G.dropIndicatorRender]),qe=M.useMemo(function(){var ie=t.title,Q=ie===void 0?y:ie,de="".concat(G.prefixCls,"-node-content-wrapper"),ve;if(G.showIcon){var Ke=t.icon||G.icon;ve=Ke?M.createElement("span",{className:k()("".concat(G.prefixCls,"-iconEle"),"".concat(G.prefixCls,"-icon__customize"))},typeof Ke=="function"?Ke(t):Ke):ft}else G.loadData&&C&&(ve=ft);var We;return typeof Q=="function"?We=Q(H):G.titleRender?We=G.titleRender(H):We=Q,M.createElement("span",{ref:ge,title:typeof Q=="string"?Q:"",className:k()(de,"".concat(de,"-").concat(Ze||"normal"),(0,oe.Z)({},"".concat(G.prefixCls,"-node-selected"),!Ce&&(v||$e))),onMouseEnter:we,onMouseLeave:ue,onContextMenu:pe,onClick:Z,onDoubleClick:le},ve,M.createElement("span",{className:"".concat(G.prefixCls,"-title")},We),Et)},[G.prefixCls,G.showIcon,t,G.icon,ft,G.titleRender,H,Ze,we,ue,pe,Z,le]),pt=(0,e.Z)(se,{aria:!0,data:!0}),Se=(0,p.Z)(G.keyEntities,_)||{},ye=Se.level,Te=T[T.length-1],Y=!Ce&&ae,W=G.draggingNodeKey===_,X=J!==void 0?{"aria-selected":!!J}:void 0;return M.createElement("div",(0,z.Z)({ref:N,role:"treeitem","aria-expanded":r?void 0:b,className:k()(A,"".concat(G.prefixCls,"-treenode"),(f={},(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)(f,"".concat(G.prefixCls,"-treenode-disabled"),Ce),"".concat(G.prefixCls,"-treenode-switcher-").concat(b?"open":"close"),!r),"".concat(G.prefixCls,"-treenode-checkbox-checked"),E),"".concat(G.prefixCls,"-treenode-checkbox-indeterminate"),R),"".concat(G.prefixCls,"-treenode-selected"),v),"".concat(G.prefixCls,"-treenode-loading"),C),"".concat(G.prefixCls,"-treenode-active"),K),"".concat(G.prefixCls,"-treenode-leaf-last"),Te),"".concat(G.prefixCls,"-treenode-draggable"),ae),"dragging",W),(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)(f,"drop-target",G.dropTargetKey===_),"drop-container",G.dropContainerKey===_),"drag-over",!Ce&&w),"drag-over-gap-top",!Ce&&n),"drag-over-gap-bottom",!Ce&&a),"filter-node",(S=G.filterTreeNode)===null||S===void 0?void 0:S.call(G,(0,h.F)(t))),"".concat(G.prefixCls,"-treenode-leaf"),Fe))),style:x,draggable:Y,onDragStart:Y?_e:void 0,onDragEnter:ae?ce:void 0,onDragOver:ae?he:void 0,onDragLeave:ae?Le:void 0,onDrop:ae?ke:void 0,onDragEnd:ae?Ye:void 0,onMouseMove:ee},X,pt),M.createElement(l,{prefixCls:G.prefixCls,level:ye,isStart:d,isEnd:T}),Ae,rt(),lt,qe)};u.isTreeNode=1;var s=u},27822:function(Ct,Qe,B){"use strict";B.d(Qe,{k:function(){return oe},y:function(){return te}});var z=B(67294),oe=z.createContext(null),te=z.createContext({})},70593:function(Ct,Qe,B){"use strict";B.d(Qe,{OF:function(){return _.Z},y6:function(){return c.y},ZP:function(){return Ce}});var z=B(87462),oe=B(71002),te=B(1413),U=B(74902),L=B(15671),M=B(43144),P=B(97326),k=B(60136),e=B(29388),O=B(4942),D=B(94184),l=B.n(D),p=B(15105),h=B(64217),g=B(80334),o=B(67294),c=B(27822),y=function(Be){var Ue=Be.dropPosition,re=Be.dropLevelOffset,Z=Be.indent,le={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ue){case-1:le.top=0,le.left=-re*Z;break;case 1:le.bottom=0,le.left=-re*Z;break;case 0:le.bottom=0,le.left=Z;break}return o.createElement("div",{style:le})},u=y;function s(fe){if(fe==null)throw new TypeError("Cannot destructure "+fe)}var i=B(97685),t=B(45987),m=B(8410),S=B(73299),f=B(62874),_=B(86128);function A(fe,Be){var Ue=o.useState(!1),re=(0,i.Z)(Ue,2),Z=re[0],le=re[1];(0,m.Z)(function(){if(Z)return fe(),function(){Be()}},[Z]),(0,m.Z)(function(){return le(!0),function(){le(!1)}},[])}var x=A,w=B(1089),n=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],a=o.forwardRef(function(fe,Be){var Ue=fe.className,re=fe.style,Z=fe.motion,le=fe.motionNodes,we=fe.motionType,ue=fe.onMotionStart,pe=fe.onMotionEnd,ae=fe.active,_e=fe.treeNodeRequiredProps,ce=(0,t.Z)(fe,n),he=o.useState(!0),Le=(0,i.Z)(he,2),Ye=Le[0],ke=Le[1],be=o.useContext(c.k),Re=be.prefixCls,Fe=le&&we!=="hide";(0,m.Z)(function(){le&&Fe!==Ye&&ke(Fe)},[le]);var Ae=function(){le&&ue()},Me=o.useRef(!1),rt=function(){le&&!Me.current&&(Me.current=!0,pe())};x(Ae,rt);var lt=function(ft){Fe===ft&&rt()};return le?o.createElement(f.Z,(0,z.Z)({ref:Be,visible:Ye},Z,{motionAppear:we==="show",onVisibleChanged:lt}),function(Ze,ft){var Et=Ze.className,qe=Ze.style;return o.createElement("div",{ref:ft,className:l()("".concat(Re,"-treenode-motion"),Et),style:qe},le.map(function(pt){var Se=Object.assign({},(s(pt.data),pt.data)),ye=pt.title,Te=pt.key,Y=pt.isStart,W=pt.isEnd;delete Se.children;var X=(0,w.H8)(Te,_e);return o.createElement(_.Z,(0,z.Z)({},Se,X,{title:ye,active:ae,data:pt.data,key:Te,isStart:Y,isEnd:W}))}))}):o.createElement(_.Z,(0,z.Z)({domRef:Be,className:Ue,style:re},ce,{active:ae}))}),r=a;function d(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ue=fe.length,re=Be.length;if(Math.abs(Ue-re)!==1)return{add:!1,key:null};function Z(le,we){var ue=new Map;le.forEach(function(ae){ue.set(ae,!0)});var pe=we.filter(function(ae){return!ue.has(ae)});return pe.length===1?pe[0]:null}return Ue<re?{add:!0,key:Z(fe,Be)}:{add:!1,key:Z(Be,fe)}}function T(fe,Be,Ue){var re=fe.findIndex(function(ue){return ue.key===Ue}),Z=fe[re+1],le=Be.findIndex(function(ue){return ue.key===Ue});if(Z){var we=Be.findIndex(function(ue){return ue.key===Z.key});return Be.slice(le+1,we)}return Be.slice(le+1)}var b=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],v={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},E=function(){},R="RC_TREE_MOTION_".concat(Math.random()),C={key:R},N={key:R,level:0,index:0,pos:"0",node:C,nodes:[C]},K={parent:null,children:[],pos:N.pos,data:C,title:null,key:R,isStart:[],isEnd:[]};function H(fe,Be,Ue,re){return Be===!1||!Ue?fe:fe.slice(0,Math.ceil(Ue/re)+1)}function ee(fe){var Be=fe.key,Ue=fe.pos;return(0,w.km)(Be,Ue)}function J(fe){for(var Be=String(fe.data.key),Ue=fe;Ue.parent;)Ue=Ue.parent,Be="".concat(Ue.data.key," > ").concat(Be);return Be}var se=o.forwardRef(function(fe,Be){var Ue=fe.prefixCls,re=fe.data,Z=fe.selectable,le=fe.checkable,we=fe.expandedKeys,ue=fe.selectedKeys,pe=fe.checkedKeys,ae=fe.loadedKeys,_e=fe.loadingKeys,ce=fe.halfCheckedKeys,he=fe.keyEntities,Le=fe.disabled,Ye=fe.dragging,ke=fe.dragOverNodeKey,be=fe.dropPosition,Re=fe.motion,Fe=fe.height,Ae=fe.itemHeight,Me=fe.virtual,rt=fe.scrollWidth,lt=fe.focusable,Ze=fe.activeItem,ft=fe.focused,Et=fe.tabIndex,qe=fe.onKeyDown,pt=fe.onFocus,Se=fe.onBlur,ye=fe.onActiveChange,Te=fe.onListChangeStart,Y=fe.onListChangeEnd,W=(0,t.Z)(fe,b),X=o.useRef(null),ie=o.useRef(null);o.useImperativeHandle(Be,function(){return{scrollTo:function(Nr){X.current.scrollTo(Nr)},getIndentWidth:function(){return ie.current.offsetWidth}}});var Q=o.useState(we),de=(0,i.Z)(Q,2),ve=de[0],Ke=de[1],We=o.useState(re),ct=(0,i.Z)(We,2),at=ct[0],nt=ct[1],et=o.useState(re),St=(0,i.Z)(et,2),mt=St[0],Tt=St[1],Pt=o.useState([]),Xe=(0,i.Z)(Pt,2),st=Xe[0],Rt=Xe[1],jt=o.useState(null),qt=(0,i.Z)(jt,2),Ar=qt[0],jr=qt[1],Cr=o.useRef(re);Cr.current=re;function lr(){var Qt=Cr.current;nt(Qt),Tt(Qt),Rt([]),jr(null),Y()}(0,m.Z)(function(){Ke(we);var Qt=d(ve,we);if(Qt.key!==null)if(Qt.add){var Nr=at.findIndex(function(ar){var Tr=ar.key;return Tr===Qt.key}),Rr=H(T(at,re,Qt.key),Me,Fe,Ae),rr=at.slice();rr.splice(Nr+1,0,K),Tt(rr),Rt(Rr),jr("show")}else{var pr=re.findIndex(function(ar){var Tr=ar.key;return Tr===Qt.key}),gr=H(T(re,at,Qt.key),Me,Fe,Ae),nn=re.slice();nn.splice(pr+1,0,K),Tt(nn),Rt(gr),jr("hide")}else at!==re&&(nt(re),Tt(re))},[we,re]),o.useEffect(function(){Ye||lr()},[Ye]);var Hr=Re?mt:re,Jr={expandedKeys:we,selectedKeys:ue,loadedKeys:ae,loadingKeys:_e,checkedKeys:pe,halfCheckedKeys:ce,dragOverNodeKey:ke,dropPosition:be,keyEntities:he};return o.createElement(o.Fragment,null,ft&&Ze&&o.createElement("span",{style:v,"aria-live":"assertive"},J(Ze)),o.createElement("div",null,o.createElement("input",{style:v,disabled:lt===!1||Le,tabIndex:lt!==!1?Et:null,onKeyDown:qe,onFocus:pt,onBlur:Se,value:"",onChange:E,"aria-label":"for screen reader"})),o.createElement("div",{className:"".concat(Ue,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},o.createElement("div",{className:"".concat(Ue,"-indent")},o.createElement("div",{ref:ie,className:"".concat(Ue,"-indent-unit")}))),o.createElement(S.Z,(0,z.Z)({},W,{data:Hr,itemKey:ee,height:Fe,fullHeight:!1,virtual:Me,itemHeight:Ae,scrollWidth:rt,prefixCls:"".concat(Ue,"-list"),ref:X,role:"tree",onVisibleChange:function(Nr){Nr.every(function(Rr){return ee(Rr)!==R})&&lr()}}),function(Qt){var Nr=Qt.pos,Rr=Object.assign({},(s(Qt.data),Qt.data)),rr=Qt.title,pr=Qt.key,gr=Qt.isStart,nn=Qt.isEnd,ar=(0,w.km)(pr,Nr);delete Rr.key,delete Rr.children;var Tr=(0,w.H8)(ar,Jr);return o.createElement(r,(0,z.Z)({},Rr,Tr,{title:rr,active:!!Ze&&pr===Ze.key,pos:Nr,data:Qt.data,isStart:gr,isEnd:nn,motion:Re,motionNodes:pr===R?st:null,motionType:Ar,onMotionStart:Te,onMotionEnd:lr,treeNodeRequiredProps:Jr,onMouseMove:function(){ye(null)}}))}))}),G=se,Ee=B(10225),ge=B(17341),Pe=B(35381),Ne=10,$e=function(fe){(0,k.Z)(Ue,fe);var Be=(0,e.Z)(Ue);function Ue(){var re;(0,L.Z)(this,Ue);for(var Z=arguments.length,le=new Array(Z),we=0;we<Z;we++)le[we]=arguments[we];return re=Be.call.apply(Be,[this].concat(le)),(0,O.Z)((0,P.Z)(re),"destroyed",!1),(0,O.Z)((0,P.Z)(re),"delayedDragEnterLogic",void 0),(0,O.Z)((0,P.Z)(re),"loadingRetryTimes",{}),(0,O.Z)((0,P.Z)(re),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,w.w$)()}),(0,O.Z)((0,P.Z)(re),"dragStartMousePosition",null),(0,O.Z)((0,P.Z)(re),"dragNodeProps",null),(0,O.Z)((0,P.Z)(re),"currentMouseOverDroppableNodeKey",null),(0,O.Z)((0,P.Z)(re),"listRef",o.createRef()),(0,O.Z)((0,P.Z)(re),"onNodeDragStart",function(ue,pe){var ae=re.state,_e=ae.expandedKeys,ce=ae.keyEntities,he=re.props.onDragStart,Le=pe.eventKey;re.dragNodeProps=pe,re.dragStartMousePosition={x:ue.clientX,y:ue.clientY};var Ye=(0,Ee._5)(_e,Le);re.setState({draggingNodeKey:Le,dragChildrenKeys:(0,Ee.wA)(Le,ce),indent:re.listRef.current.getIndentWidth()}),re.setExpandedKeys(Ye),window.addEventListener("dragend",re.onWindowDragEnd),he==null||he({event:ue,node:(0,w.F)(pe)})}),(0,O.Z)((0,P.Z)(re),"onNodeDragEnter",function(ue,pe){var ae=re.state,_e=ae.expandedKeys,ce=ae.keyEntities,he=ae.dragChildrenKeys,Le=ae.flattenNodes,Ye=ae.indent,ke=re.props,be=ke.onDragEnter,Re=ke.onExpand,Fe=ke.allowDrop,Ae=ke.direction,Me=pe.pos,rt=pe.eventKey;if(re.currentMouseOverDroppableNodeKey!==rt&&(re.currentMouseOverDroppableNodeKey=rt),!re.dragNodeProps){re.resetDragState();return}var lt=(0,Ee.OM)(ue,re.dragNodeProps,pe,Ye,re.dragStartMousePosition,Fe,Le,ce,_e,Ae),Ze=lt.dropPosition,ft=lt.dropLevelOffset,Et=lt.dropTargetKey,qe=lt.dropContainerKey,pt=lt.dropTargetPos,Se=lt.dropAllowed,ye=lt.dragOverNodeKey;if(he.includes(Et)||!Se){re.resetDragState();return}if(re.delayedDragEnterLogic||(re.delayedDragEnterLogic={}),Object.keys(re.delayedDragEnterLogic).forEach(function(Te){clearTimeout(re.delayedDragEnterLogic[Te])}),re.dragNodeProps.eventKey!==pe.eventKey&&(ue.persist(),re.delayedDragEnterLogic[Me]=window.setTimeout(function(){if(re.state.draggingNodeKey!==null){var Te=(0,U.Z)(_e),Y=(0,Pe.Z)(ce,pe.eventKey);Y&&(Y.children||[]).length&&(Te=(0,Ee.L0)(_e,pe.eventKey)),re.props.hasOwnProperty("expandedKeys")||re.setExpandedKeys(Te),Re==null||Re(Te,{node:(0,w.F)(pe),expanded:!0,nativeEvent:ue.nativeEvent})}},800)),re.dragNodeProps.eventKey===Et&&ft===0){re.resetDragState();return}re.setState({dragOverNodeKey:ye,dropPosition:Ze,dropLevelOffset:ft,dropTargetKey:Et,dropContainerKey:qe,dropTargetPos:pt,dropAllowed:Se}),be==null||be({event:ue,node:(0,w.F)(pe),expandedKeys:_e})}),(0,O.Z)((0,P.Z)(re),"onNodeDragOver",function(ue,pe){var ae=re.state,_e=ae.dragChildrenKeys,ce=ae.flattenNodes,he=ae.keyEntities,Le=ae.expandedKeys,Ye=ae.indent,ke=re.props,be=ke.onDragOver,Re=ke.allowDrop,Fe=ke.direction;if(re.dragNodeProps){var Ae=(0,Ee.OM)(ue,re.dragNodeProps,pe,Ye,re.dragStartMousePosition,Re,ce,he,Le,Fe),Me=Ae.dropPosition,rt=Ae.dropLevelOffset,lt=Ae.dropTargetKey,Ze=Ae.dropContainerKey,ft=Ae.dropTargetPos,Et=Ae.dropAllowed,qe=Ae.dragOverNodeKey;_e.includes(lt)||!Et||(re.dragNodeProps.eventKey===lt&&rt===0?re.state.dropPosition===null&&re.state.dropLevelOffset===null&&re.state.dropTargetKey===null&&re.state.dropContainerKey===null&&re.state.dropTargetPos===null&&re.state.dropAllowed===!1&&re.state.dragOverNodeKey===null||re.resetDragState():Me===re.state.dropPosition&&rt===re.state.dropLevelOffset&<===re.state.dropTargetKey&&Ze===re.state.dropContainerKey&&ft===re.state.dropTargetPos&&Et===re.state.dropAllowed&&qe===re.state.dragOverNodeKey||re.setState({dropPosition:Me,dropLevelOffset:rt,dropTargetKey:lt,dropContainerKey:Ze,dropTargetPos:ft,dropAllowed:Et,dragOverNodeKey:qe}),be==null||be({event:ue,node:(0,w.F)(pe)}))}}),(0,O.Z)((0,P.Z)(re),"onNodeDragLeave",function(ue,pe){re.currentMouseOverDroppableNodeKey===pe.eventKey&&!ue.currentTarget.contains(ue.relatedTarget)&&(re.resetDragState(),re.currentMouseOverDroppableNodeKey=null);var ae=re.props.onDragLeave;ae==null||ae({event:ue,node:(0,w.F)(pe)})}),(0,O.Z)((0,P.Z)(re),"onWindowDragEnd",function(ue){re.onNodeDragEnd(ue,null,!0),window.removeEventListener("dragend",re.onWindowDragEnd)}),(0,O.Z)((0,P.Z)(re),"onNodeDragEnd",function(ue,pe){var ae=re.props.onDragEnd;re.setState({dragOverNodeKey:null}),re.cleanDragState(),ae==null||ae({event:ue,node:(0,w.F)(pe)}),re.dragNodeProps=null,window.removeEventListener("dragend",re.onWindowDragEnd)}),(0,O.Z)((0,P.Z)(re),"onNodeDrop",function(ue,pe){var ae,_e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ce=re.state,he=ce.dragChildrenKeys,Le=ce.dropPosition,Ye=ce.dropTargetKey,ke=ce.dropTargetPos,be=ce.dropAllowed;if(be){var Re=re.props.onDrop;if(re.setState({dragOverNodeKey:null}),re.cleanDragState(),Ye!==null){var Fe=(0,te.Z)((0,te.Z)({},(0,w.H8)(Ye,re.getTreeNodeRequiredProps())),{},{active:((ae=re.getActiveItem())===null||ae===void 0?void 0:ae.key)===Ye,data:(0,Pe.Z)(re.state.keyEntities,Ye).node}),Ae=he.includes(Ye);(0,g.ZP)(!Ae,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Me=(0,Ee.yx)(ke),rt={event:ue,node:(0,w.F)(Fe),dragNode:re.dragNodeProps?(0,w.F)(re.dragNodeProps):null,dragNodesKeys:[re.dragNodeProps.eventKey].concat(he),dropToGap:Le!==0,dropPosition:Le+Number(Me[Me.length-1])};_e||Re==null||Re(rt),re.dragNodeProps=null}}}),(0,O.Z)((0,P.Z)(re),"cleanDragState",function(){var ue=re.state.draggingNodeKey;ue!==null&&re.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),re.dragStartMousePosition=null,re.currentMouseOverDroppableNodeKey=null}),(0,O.Z)((0,P.Z)(re),"triggerExpandActionExpand",function(ue,pe){var ae=re.state,_e=ae.expandedKeys,ce=ae.flattenNodes,he=pe.expanded,Le=pe.key,Ye=pe.isLeaf;if(!(Ye||ue.shiftKey||ue.metaKey||ue.ctrlKey)){var ke=ce.filter(function(Re){return Re.key===Le})[0],be=(0,w.F)((0,te.Z)((0,te.Z)({},(0,w.H8)(Le,re.getTreeNodeRequiredProps())),{},{data:ke.data}));re.setExpandedKeys(he?(0,Ee._5)(_e,Le):(0,Ee.L0)(_e,Le)),re.onNodeExpand(ue,be)}}),(0,O.Z)((0,P.Z)(re),"onNodeClick",function(ue,pe){var ae=re.props,_e=ae.onClick,ce=ae.expandAction;ce==="click"&&re.triggerExpandActionExpand(ue,pe),_e==null||_e(ue,pe)}),(0,O.Z)((0,P.Z)(re),"onNodeDoubleClick",function(ue,pe){var ae=re.props,_e=ae.onDoubleClick,ce=ae.expandAction;ce==="doubleClick"&&re.triggerExpandActionExpand(ue,pe),_e==null||_e(ue,pe)}),(0,O.Z)((0,P.Z)(re),"onNodeSelect",function(ue,pe){var ae=re.state.selectedKeys,_e=re.state,ce=_e.keyEntities,he=_e.fieldNames,Le=re.props,Ye=Le.onSelect,ke=Le.multiple,be=pe.selected,Re=pe[he.key],Fe=!be;Fe?ke?ae=(0,Ee.L0)(ae,Re):ae=[Re]:ae=(0,Ee._5)(ae,Re);var Ae=ae.map(function(Me){var rt=(0,Pe.Z)(ce,Me);return rt?rt.node:null}).filter(Boolean);re.setUncontrolledState({selectedKeys:ae}),Ye==null||Ye(ae,{event:"select",selected:Fe,node:pe,selectedNodes:Ae,nativeEvent:ue.nativeEvent})}),(0,O.Z)((0,P.Z)(re),"onNodeCheck",function(ue,pe,ae){var _e=re.state,ce=_e.keyEntities,he=_e.checkedKeys,Le=_e.halfCheckedKeys,Ye=re.props,ke=Ye.checkStrictly,be=Ye.onCheck,Re=pe.key,Fe,Ae={event:"check",node:pe,checked:ae,nativeEvent:ue.nativeEvent};if(ke){var Me=ae?(0,Ee.L0)(he,Re):(0,Ee._5)(he,Re),rt=(0,Ee._5)(Le,Re);Fe={checked:Me,halfChecked:rt},Ae.checkedNodes=Me.map(function(pt){return(0,Pe.Z)(ce,pt)}).filter(Boolean).map(function(pt){return pt.node}),re.setUncontrolledState({checkedKeys:Me})}else{var lt=(0,ge.S)([].concat((0,U.Z)(he),[Re]),!0,ce),Ze=lt.checkedKeys,ft=lt.halfCheckedKeys;if(!ae){var Et=new Set(Ze);Et.delete(Re);var qe=(0,ge.S)(Array.from(Et),{checked:!1,halfCheckedKeys:ft},ce);Ze=qe.checkedKeys,ft=qe.halfCheckedKeys}Fe=Ze,Ae.checkedNodes=[],Ae.checkedNodesPositions=[],Ae.halfCheckedKeys=ft,Ze.forEach(function(pt){var Se=(0,Pe.Z)(ce,pt);if(Se){var ye=Se.node,Te=Se.pos;Ae.checkedNodes.push(ye),Ae.checkedNodesPositions.push({node:ye,pos:Te})}}),re.setUncontrolledState({checkedKeys:Ze},!1,{halfCheckedKeys:ft})}be==null||be(Fe,Ae)}),(0,O.Z)((0,P.Z)(re),"onNodeLoad",function(ue){var pe,ae=ue.key,_e=re.state.keyEntities,ce=(0,Pe.Z)(_e,ae);if(!(ce!=null&&(pe=ce.children)!==null&&pe!==void 0&&pe.length)){var he=new Promise(function(Le,Ye){re.setState(function(ke){var be=ke.loadedKeys,Re=be===void 0?[]:be,Fe=ke.loadingKeys,Ae=Fe===void 0?[]:Fe,Me=re.props,rt=Me.loadData,lt=Me.onLoad;if(!rt||Re.includes(ae)||Ae.includes(ae))return null;var Ze=rt(ue);return Ze.then(function(){var ft=re.state.loadedKeys,Et=(0,Ee.L0)(ft,ae);lt==null||lt(Et,{event:"load",node:ue}),re.setUncontrolledState({loadedKeys:Et}),re.setState(function(qe){return{loadingKeys:(0,Ee._5)(qe.loadingKeys,ae)}}),Le()}).catch(function(ft){if(re.setState(function(qe){return{loadingKeys:(0,Ee._5)(qe.loadingKeys,ae)}}),re.loadingRetryTimes[ae]=(re.loadingRetryTimes[ae]||0)+1,re.loadingRetryTimes[ae]>=Ne){var Et=re.state.loadedKeys;(0,g.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),re.setUncontrolledState({loadedKeys:(0,Ee.L0)(Et,ae)}),Le()}Ye(ft)}),{loadingKeys:(0,Ee.L0)(Ae,ae)}})});return he.catch(function(){}),he}}),(0,O.Z)((0,P.Z)(re),"onNodeMouseEnter",function(ue,pe){var ae=re.props.onMouseEnter;ae==null||ae({event:ue,node:pe})}),(0,O.Z)((0,P.Z)(re),"onNodeMouseLeave",function(ue,pe){var ae=re.props.onMouseLeave;ae==null||ae({event:ue,node:pe})}),(0,O.Z)((0,P.Z)(re),"onNodeContextMenu",function(ue,pe){var ae=re.props.onRightClick;ae&&(ue.preventDefault(),ae({event:ue,node:pe}))}),(0,O.Z)((0,P.Z)(re),"onFocus",function(){var ue=re.props.onFocus;re.setState({focused:!0});for(var pe=arguments.length,ae=new Array(pe),_e=0;_e<pe;_e++)ae[_e]=arguments[_e];ue==null||ue.apply(void 0,ae)}),(0,O.Z)((0,P.Z)(re),"onBlur",function(){var ue=re.props.onBlur;re.setState({focused:!1}),re.onActiveChange(null);for(var pe=arguments.length,ae=new Array(pe),_e=0;_e<pe;_e++)ae[_e]=arguments[_e];ue==null||ue.apply(void 0,ae)}),(0,O.Z)((0,P.Z)(re),"getTreeNodeRequiredProps",function(){var ue=re.state,pe=ue.expandedKeys,ae=ue.selectedKeys,_e=ue.loadedKeys,ce=ue.loadingKeys,he=ue.checkedKeys,Le=ue.halfCheckedKeys,Ye=ue.dragOverNodeKey,ke=ue.dropPosition,be=ue.keyEntities;return{expandedKeys:pe||[],selectedKeys:ae||[],loadedKeys:_e||[],loadingKeys:ce||[],checkedKeys:he||[],halfCheckedKeys:Le||[],dragOverNodeKey:Ye,dropPosition:ke,keyEntities:be}}),(0,O.Z)((0,P.Z)(re),"setExpandedKeys",function(ue){var pe=re.state,ae=pe.treeData,_e=pe.fieldNames,ce=(0,w.oH)(ae,ue,_e);re.setUncontrolledState({expandedKeys:ue,flattenNodes:ce},!0)}),(0,O.Z)((0,P.Z)(re),"onNodeExpand",function(ue,pe){var ae=re.state.expandedKeys,_e=re.state,ce=_e.listChanging,he=_e.fieldNames,Le=re.props,Ye=Le.onExpand,ke=Le.loadData,be=pe.expanded,Re=pe[he.key];if(!ce){var Fe=ae.includes(Re),Ae=!be;if((0,g.ZP)(be&&Fe||!be&&!Fe,"Expand state not sync with index check"),ae=Ae?(0,Ee.L0)(ae,Re):(0,Ee._5)(ae,Re),re.setExpandedKeys(ae),Ye==null||Ye(ae,{node:pe,expanded:Ae,nativeEvent:ue.nativeEvent}),Ae&&ke){var Me=re.onNodeLoad(pe);Me&&Me.then(function(){var rt=(0,w.oH)(re.state.treeData,ae,he);re.setUncontrolledState({flattenNodes:rt})}).catch(function(){var rt=re.state.expandedKeys,lt=(0,Ee._5)(rt,Re);re.setExpandedKeys(lt)})}}}),(0,O.Z)((0,P.Z)(re),"onListChangeStart",function(){re.setUncontrolledState({listChanging:!0})}),(0,O.Z)((0,P.Z)(re),"onListChangeEnd",function(){setTimeout(function(){re.setUncontrolledState({listChanging:!1})})}),(0,O.Z)((0,P.Z)(re),"onActiveChange",function(ue){var pe=re.state.activeKey,ae=re.props,_e=ae.onActiveChange,ce=ae.itemScrollOffset,he=ce===void 0?0:ce;pe!==ue&&(re.setState({activeKey:ue}),ue!==null&&re.scrollTo({key:ue,offset:he}),_e==null||_e(ue))}),(0,O.Z)((0,P.Z)(re),"getActiveItem",function(){var ue=re.state,pe=ue.activeKey,ae=ue.flattenNodes;return pe===null?null:ae.find(function(_e){var ce=_e.key;return ce===pe})||null}),(0,O.Z)((0,P.Z)(re),"offsetActiveKey",function(ue){var pe=re.state,ae=pe.flattenNodes,_e=pe.activeKey,ce=ae.findIndex(function(Ye){var ke=Ye.key;return ke===_e});ce===-1&&ue<0&&(ce=ae.length),ce=(ce+ue+ae.length)%ae.length;var he=ae[ce];if(he){var Le=he.key;re.onActiveChange(Le)}else re.onActiveChange(null)}),(0,O.Z)((0,P.Z)(re),"onKeyDown",function(ue){var pe=re.state,ae=pe.activeKey,_e=pe.expandedKeys,ce=pe.checkedKeys,he=pe.fieldNames,Le=re.props,Ye=Le.onKeyDown,ke=Le.checkable,be=Le.selectable;switch(ue.which){case p.Z.UP:{re.offsetActiveKey(-1),ue.preventDefault();break}case p.Z.DOWN:{re.offsetActiveKey(1),ue.preventDefault();break}}var Re=re.getActiveItem();if(Re&&Re.data){var Fe=re.getTreeNodeRequiredProps(),Ae=Re.data.isLeaf===!1||!!(Re.data[he.children]||[]).length,Me=(0,w.F)((0,te.Z)((0,te.Z)({},(0,w.H8)(ae,Fe)),{},{data:Re.data,active:!0}));switch(ue.which){case p.Z.LEFT:{Ae&&_e.includes(ae)?re.onNodeExpand({},Me):Re.parent&&re.onActiveChange(Re.parent.key),ue.preventDefault();break}case p.Z.RIGHT:{Ae&&!_e.includes(ae)?re.onNodeExpand({},Me):Re.children&&Re.children.length&&re.onActiveChange(Re.children[0].key),ue.preventDefault();break}case p.Z.ENTER:case p.Z.SPACE:{ke&&!Me.disabled&&Me.checkable!==!1&&!Me.disableCheckbox?re.onNodeCheck({},Me,!ce.includes(ae)):!ke&&be&&!Me.disabled&&Me.selectable!==!1&&re.onNodeSelect({},Me);break}}}Ye==null||Ye(ue)}),(0,O.Z)((0,P.Z)(re),"setUncontrolledState",function(ue){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!re.destroyed){var _e=!1,ce=!0,he={};Object.keys(ue).forEach(function(Le){if(re.props.hasOwnProperty(Le)){ce=!1;return}_e=!0,he[Le]=ue[Le]}),_e&&(!pe||ce)&&re.setState((0,te.Z)((0,te.Z)({},he),ae))}}),(0,O.Z)((0,P.Z)(re),"scrollTo",function(ue){re.listRef.current.scrollTo(ue)}),re}return(0,M.Z)(Ue,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Z=this.props,le=Z.activeKey,we=Z.itemScrollOffset,ue=we===void 0?0:we;le!==void 0&&le!==this.state.activeKey&&(this.setState({activeKey:le}),le!==null&&this.scrollTo({key:le,offset:ue}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Z=this.state,le=Z.focused,we=Z.flattenNodes,ue=Z.keyEntities,pe=Z.draggingNodeKey,ae=Z.activeKey,_e=Z.dropLevelOffset,ce=Z.dropContainerKey,he=Z.dropTargetKey,Le=Z.dropPosition,Ye=Z.dragOverNodeKey,ke=Z.indent,be=this.props,Re=be.prefixCls,Fe=be.className,Ae=be.style,Me=be.showLine,rt=be.focusable,lt=be.tabIndex,Ze=lt===void 0?0:lt,ft=be.selectable,Et=be.showIcon,qe=be.icon,pt=be.switcherIcon,Se=be.draggable,ye=be.checkable,Te=be.checkStrictly,Y=be.disabled,W=be.motion,X=be.loadData,ie=be.filterTreeNode,Q=be.height,de=be.itemHeight,ve=be.scrollWidth,Ke=be.virtual,We=be.titleRender,ct=be.dropIndicatorRender,at=be.onContextMenu,nt=be.onScroll,et=be.direction,St=be.rootClassName,mt=be.rootStyle,Tt=(0,h.Z)(this.props,{aria:!0,data:!0}),Pt;Se&&((0,oe.Z)(Se)==="object"?Pt=Se:typeof Se=="function"?Pt={nodeDraggable:Se}:Pt={});var Xe={prefixCls:Re,selectable:ft,showIcon:Et,icon:qe,switcherIcon:pt,draggable:Pt,draggingNodeKey:pe,checkable:ye,checkStrictly:Te,disabled:Y,keyEntities:ue,dropLevelOffset:_e,dropContainerKey:ce,dropTargetKey:he,dropPosition:Le,dragOverNodeKey:Ye,indent:ke,direction:et,dropIndicatorRender:ct,loadData:X,filterTreeNode:ie,titleRender:We,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return o.createElement(c.k.Provider,{value:Xe},o.createElement("div",{className:l()(Re,Fe,St,(0,O.Z)((0,O.Z)((0,O.Z)({},"".concat(Re,"-show-line"),Me),"".concat(Re,"-focused"),le),"".concat(Re,"-active-focused"),ae!==null)),style:mt},o.createElement(G,(0,z.Z)({ref:this.listRef,prefixCls:Re,style:Ae,data:we,disabled:Y,selectable:ft,checkable:!!ye,motion:W,dragging:pe!==null,height:Q,itemHeight:de,virtual:Ke,focusable:rt,focused:le,tabIndex:Ze,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:at,onScroll:nt,scrollWidth:ve},this.getTreeNodeRequiredProps(),Tt))))}}],[{key:"getDerivedStateFromProps",value:function(Z,le){var we=le.prevProps,ue={prevProps:Z};function pe(Ze){return!we&&Z.hasOwnProperty(Ze)||we&&we[Ze]!==Z[Ze]}var ae,_e=le.fieldNames;if(pe("fieldNames")&&(_e=(0,w.w$)(Z.fieldNames),ue.fieldNames=_e),pe("treeData")?ae=Z.treeData:pe("children")&&((0,g.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),ae=(0,w.zn)(Z.children)),ae){ue.treeData=ae;var ce=(0,w.I8)(ae,{fieldNames:_e});ue.keyEntities=(0,te.Z)((0,O.Z)({},R,N),ce.keyEntities)}var he=ue.keyEntities||le.keyEntities;if(pe("expandedKeys")||we&&pe("autoExpandParent"))ue.expandedKeys=Z.autoExpandParent||!we&&Z.defaultExpandParent?(0,Ee.r7)(Z.expandedKeys,he):Z.expandedKeys;else if(!we&&Z.defaultExpandAll){var Le=(0,te.Z)({},he);delete Le[R];var Ye=[];Object.keys(Le).forEach(function(Ze){var ft=Le[Ze];ft.children&&ft.children.length&&Ye.push(ft.key)}),ue.expandedKeys=Ye}else!we&&Z.defaultExpandedKeys&&(ue.expandedKeys=Z.autoExpandParent||Z.defaultExpandParent?(0,Ee.r7)(Z.defaultExpandedKeys,he):Z.defaultExpandedKeys);if(ue.expandedKeys||delete ue.expandedKeys,ae||ue.expandedKeys){var ke=(0,w.oH)(ae||le.treeData,ue.expandedKeys||le.expandedKeys,_e);ue.flattenNodes=ke}if(Z.selectable&&(pe("selectedKeys")?ue.selectedKeys=(0,Ee.BT)(Z.selectedKeys,Z):!we&&Z.defaultSelectedKeys&&(ue.selectedKeys=(0,Ee.BT)(Z.defaultSelectedKeys,Z))),Z.checkable){var be;if(pe("checkedKeys")?be=(0,Ee.E6)(Z.checkedKeys)||{}:!we&&Z.defaultCheckedKeys?be=(0,Ee.E6)(Z.defaultCheckedKeys)||{}:ae&&(be=(0,Ee.E6)(Z.checkedKeys)||{checkedKeys:le.checkedKeys,halfCheckedKeys:le.halfCheckedKeys}),be){var Re=be,Fe=Re.checkedKeys,Ae=Fe===void 0?[]:Fe,Me=Re.halfCheckedKeys,rt=Me===void 0?[]:Me;if(!Z.checkStrictly){var lt=(0,ge.S)(Ae,!0,he);Ae=lt.checkedKeys,rt=lt.halfCheckedKeys}ue.checkedKeys=Ae,ue.halfCheckedKeys=rt}}return pe("loadedKeys")&&(ue.loadedKeys=Z.loadedKeys),ue}}]),Ue}(o.Component);(0,O.Z)($e,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:u,allowDrop:function(){return!0},expandAction:!1}),(0,O.Z)($e,"TreeNode",_.Z);var je=$e,Ce=je},10225:function(Ct,Qe,B){"use strict";B.d(Qe,{BT:function(){return o},E6:function(){return u},L0:function(){return O},OM:function(){return g},_5:function(){return e},r7:function(){return s},wA:function(){return l},yx:function(){return D}});var z=B(74902),oe=B(71002),te=B(80334),U=B(67294),L=B(86128),M=B(35381),P=B(1089),k=null;function e(i,t){if(!i)return[];var m=i.slice(),S=m.indexOf(t);return S>=0&&m.splice(S,1),m}function O(i,t){var m=(i||[]).slice();return m.indexOf(t)===-1&&m.push(t),m}function D(i){return i.split("-")}function l(i,t){var m=[],S=(0,M.Z)(t,i);function f(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];_.forEach(function(A){var x=A.key,w=A.children;m.push(x),f(w)})}return f(S.children),m}function p(i){if(i.parent){var t=D(i.pos);return Number(t[t.length-1])===i.parent.children.length-1}return!1}function h(i){var t=D(i.pos);return Number(t[t.length-1])===0}function g(i,t,m,S,f,_,A,x,w,n){var a,r=i.clientX,d=i.clientY,T=i.target.getBoundingClientRect(),b=T.top,v=T.height,E=(n==="rtl"?-1:1)*(((f==null?void 0:f.x)||0)-r),R=(E-12)/S,C=w.filter(function(Ce){var fe;return(fe=x[Ce])===null||fe===void 0||(fe=fe.children)===null||fe===void 0?void 0:fe.length}),N=(0,M.Z)(x,m.eventKey);if(d<b+v/2){var K=A.findIndex(function(Ce){return Ce.key===N.key}),H=K<=0?0:K-1,ee=A[H].key;N=(0,M.Z)(x,ee)}var J=N.key,se=N,G=N.key,Ee=0,ge=0;if(!C.includes(J))for(var Pe=0;Pe<R&&p(N);Pe+=1)N=N.parent,ge+=1;var Ne=t.data,$e=N.node,je=!0;return h(N)&&N.level===0&&d<b+v/2&&_({dragNode:Ne,dropNode:$e,dropPosition:-1})&&N.key===m.eventKey?Ee=-1:(se.children||[]).length&&C.includes(G)?_({dragNode:Ne,dropNode:$e,dropPosition:0})?Ee=0:je=!1:ge===0?R>-1.5?_({dragNode:Ne,dropNode:$e,dropPosition:1})?Ee=1:je=!1:_({dragNode:Ne,dropNode:$e,dropPosition:0})?Ee=0:_({dragNode:Ne,dropNode:$e,dropPosition:1})?Ee=1:je=!1:_({dragNode:Ne,dropNode:$e,dropPosition:1})?Ee=1:je=!1,{dropPosition:Ee,dropLevelOffset:ge,dropTargetKey:N.key,dropTargetPos:N.pos,dragOverNodeKey:G,dropContainerKey:Ee===0?null:((a=N.parent)===null||a===void 0?void 0:a.key)||null,dropAllowed:je}}function o(i,t){if(i){var m=t.multiple;return m?i.slice():i.length?[i[0]]:i}}var c=function(t){return t};function y(i,t){if(!i)return[];var m=t||{},S=m.processProps,f=S===void 0?c:S,_=Array.isArray(i)?i:[i];return _.map(function(A){var x=A.children,w=_objectWithoutProperties(A,k),n=y(x,t);return React.createElement(TreeNode,_extends({key:w.key},f(w)),n)})}function u(i){if(!i)return null;var t;if(Array.isArray(i))t={checkedKeys:i,halfCheckedKeys:void 0};else if((0,oe.Z)(i)==="object")t={checkedKeys:i.checked||void 0,halfCheckedKeys:i.halfChecked||void 0};else return(0,te.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return t}function s(i,t){var m=new Set;function S(f){if(!m.has(f)){var _=(0,M.Z)(t,f);if(_){m.add(f);var A=_.parent,x=_.node;x.disabled||A&&S(A.key)}}}return(i||[]).forEach(function(f){S(f)}),(0,z.Z)(m)}},17341:function(Ct,Qe,B){"use strict";B.d(Qe,{S:function(){return P}});var z=B(80334),oe=B(35381);function te(k,e){var O=new Set;return k.forEach(function(D){e.has(D)||O.add(D)}),O}function U(k){var e=k||{},O=e.disabled,D=e.disableCheckbox,l=e.checkable;return!!(O||D)||l===!1}function L(k,e,O,D){for(var l=new Set(k),p=new Set,h=0;h<=O;h+=1){var g=e.get(h)||new Set;g.forEach(function(u){var s=u.key,i=u.node,t=u.children,m=t===void 0?[]:t;l.has(s)&&!D(i)&&m.filter(function(S){return!D(S.node)}).forEach(function(S){l.add(S.key)})})}for(var o=new Set,c=O;c>=0;c-=1){var y=e.get(c)||new Set;y.forEach(function(u){var s=u.parent,i=u.node;if(!(D(i)||!u.parent||o.has(u.parent.key))){if(D(u.parent.node)){o.add(s.key);return}var t=!0,m=!1;(s.children||[]).filter(function(S){return!D(S.node)}).forEach(function(S){var f=S.key,_=l.has(f);t&&!_&&(t=!1),!m&&(_||p.has(f))&&(m=!0)}),t&&l.add(s.key),m&&p.add(s.key),o.add(s.key)}})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(te(p,l))}}function M(k,e,O,D,l){for(var p=new Set(k),h=new Set(e),g=0;g<=D;g+=1){var o=O.get(g)||new Set;o.forEach(function(s){var i=s.key,t=s.node,m=s.children,S=m===void 0?[]:m;!p.has(i)&&!h.has(i)&&!l(t)&&S.filter(function(f){return!l(f.node)}).forEach(function(f){p.delete(f.key)})})}h=new Set;for(var c=new Set,y=D;y>=0;y-=1){var u=O.get(y)||new Set;u.forEach(function(s){var i=s.parent,t=s.node;if(!(l(t)||!s.parent||c.has(s.parent.key))){if(l(s.parent.node)){c.add(i.key);return}var m=!0,S=!1;(i.children||[]).filter(function(f){return!l(f.node)}).forEach(function(f){var _=f.key,A=p.has(_);m&&!A&&(m=!1),!S&&(A||h.has(_))&&(S=!0)}),m||p.delete(i.key),S&&h.add(i.key),c.add(i.key)}})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(te(h,p))}}function P(k,e,O,D){var l=[],p;D?p=D:p=U;var h=new Set(k.filter(function(y){var u=!!(0,oe.Z)(O,y);return u||l.push(y),u})),g=new Map,o=0;Object.keys(O).forEach(function(y){var u=O[y],s=u.level,i=g.get(s);i||(i=new Set,g.set(s,i)),i.add(u),o=Math.max(o,s)}),(0,z.ZP)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map(function(y){return"'".concat(y,"'")}).join(", ")));var c;return e===!0?c=L(h,g,o,p):c=M(h,e.halfCheckedKeys,g,o,p),c}},35381:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return z}});function z(oe,te){return oe[te]}},1089:function(Ct,Qe,B){"use strict";B.d(Qe,{F:function(){return s},H8:function(){return u},I8:function(){return y},km:function(){return l},oH:function(){return o},w$:function(){return p},zn:function(){return g}});var z=B(71002),oe=B(74902),te=B(1413),U=B(45987),L=B(50344),M=B(98423),P=B(80334),k=B(35381),e=["children"];function O(i,t){return"".concat(i,"-").concat(t)}function D(i){return i&&i.type&&i.type.isTreeNode}function l(i,t){return i!=null?i:t}function p(i){var t=i||{},m=t.title,S=t._title,f=t.key,_=t.children,A=m||"title";return{title:A,_title:S||[A],key:f||"key",children:_||"children"}}function h(i,t){var m=new Map;function S(f){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(f||[]).forEach(function(A){var x=A[t.key],w=A[t.children];warning(x!=null,"Tree node must have a certain key: [".concat(_).concat(x,"]"));var n=String(x);warning(!m.has(n)||x===null||x===void 0,"Same 'key' exist in the Tree: ".concat(n)),m.set(n,!0),S(w,"".concat(_).concat(n," > "))})}S(i)}function g(i){function t(m){var S=(0,L.Z)(m);return S.map(function(f){if(!D(f))return(0,P.ZP)(!f,"Tree/TreeNode can only accept TreeNode as children."),null;var _=f.key,A=f.props,x=A.children,w=(0,U.Z)(A,e),n=(0,te.Z)({key:_},w),a=t(x);return a.length&&(n.children=a),n}).filter(function(f){return f})}return t(i)}function o(i,t,m){var S=p(m),f=S._title,_=S.key,A=S.children,x=new Set(t===!0?[]:t),w=[];function n(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return a.map(function(d,T){for(var b=O(r?r.pos:"0",T),v=l(d[_],b),E,R=0;R<f.length;R+=1){var C=f[R];if(d[C]!==void 0){E=d[C];break}}var N=Object.assign((0,M.Z)(d,[].concat((0,oe.Z)(f),[_,A])),{title:E,key:v,parent:r,pos:b,children:null,data:d,isStart:[].concat((0,oe.Z)(r?r.isStart:[]),[T===0]),isEnd:[].concat((0,oe.Z)(r?r.isEnd:[]),[T===a.length-1])});return w.push(N),t===!0||x.has(v)?N.children=n(d[A]||[],N):N.children=[],N})}return n(i),w}function c(i,t,m){var S={};(0,z.Z)(m)==="object"?S=m:S={externalGetKey:m},S=S||{};var f=S,_=f.childrenPropName,A=f.externalGetKey,x=f.fieldNames,w=p(x),n=w.key,a=w.children,r=_||a,d;A?typeof A=="string"?d=function(v){return v[A]}:typeof A=="function"&&(d=function(v){return A(v)}):d=function(v,E){return l(v[n],E)};function T(b,v,E,R){var C=b?b[r]:i,N=b?O(E.pos,v):"0",K=b?[].concat((0,oe.Z)(R),[b]):[];if(b){var H=d(b,N),ee={node:b,index:v,pos:N,key:H,parentPos:E.node?E.pos:null,level:E.level+1,nodes:K};t(ee)}C&&C.forEach(function(J,se){T(J,se,{node:b,pos:N,level:E?E.level+1:-1},K)})}T(null)}function y(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=t.initWrapper,S=t.processEntity,f=t.onProcessFinished,_=t.externalGetKey,A=t.childrenPropName,x=t.fieldNames,w=arguments.length>2?arguments[2]:void 0,n=_||w,a={},r={},d={posEntities:a,keyEntities:r};return m&&(d=m(d)||d),c(i,function(T){var b=T.node,v=T.index,E=T.pos,R=T.key,C=T.parentPos,N=T.level,K=T.nodes,H={node:b,nodes:K,index:v,key:R,pos:E,level:N},ee=l(R,E);a[E]=H,r[ee]=H,H.parent=a[C],H.parent&&(H.parent.children=H.parent.children||[],H.parent.children.push(H)),S&&S(H,d)},{externalGetKey:n,childrenPropName:A,fieldNames:x}),f&&f(d),d}function u(i,t){var m=t.expandedKeys,S=t.selectedKeys,f=t.loadedKeys,_=t.loadingKeys,A=t.checkedKeys,x=t.halfCheckedKeys,w=t.dragOverNodeKey,n=t.dropPosition,a=t.keyEntities,r=(0,k.Z)(a,i),d={eventKey:i,expanded:m.indexOf(i)!==-1,selected:S.indexOf(i)!==-1,loaded:f.indexOf(i)!==-1,loading:_.indexOf(i)!==-1,checked:A.indexOf(i)!==-1,halfChecked:x.indexOf(i)!==-1,pos:String(r?r.pos:""),dragOver:w===i&&n===0,dragOverGapTop:w===i&&n===-1,dragOverGapBottom:w===i&&n===1};return d}function s(i){var t=i.data,m=i.expanded,S=i.selected,f=i.checked,_=i.loaded,A=i.loading,x=i.halfChecked,w=i.dragOver,n=i.dragOverGapTop,a=i.dragOverGapBottom,r=i.pos,d=i.active,T=i.eventKey,b=(0,te.Z)((0,te.Z)({},t),{},{expanded:m,selected:S,checked:f,loaded:_,loading:A,halfChecked:x,dragOver:w,dragOverGapTop:n,dragOverGapBottom:a,pos:r,active:d,key:T});return"props"in b||Object.defineProperty(b,"props",{get:function(){return(0,P.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),b}},50344:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return te}});var z=B(67294),oe=B(59864);function te(U){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=[];return z.Children.forEach(U,function(P){P==null&&!L.keepEmpty||(Array.isArray(P)?M=M.concat(te(P)):(0,oe.isFragment)(P)&&P.props?M=M.concat(te(P.props.children,L)):M.push(P))}),M}},66680:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return oe}});var z=B(67294);function oe(te){var U=z.useRef();U.current=te;var L=z.useCallback(function(){for(var M,P=arguments.length,k=new Array(P),e=0;e<P;e++)k[e]=arguments[e];return(M=U.current)===null||M===void 0?void 0:M.call.apply(M,[U].concat(k))},[]);return L}},21770:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return M}});var z=B(97685),oe=B(66680),te=B(8410),U=B(63896);function L(P){return P!==void 0}function M(P,k){var e=k||{},O=e.defaultValue,D=e.value,l=e.onChange,p=e.postState,h=(0,U.Z)(function(){return L(D)?D:L(O)?typeof O=="function"?O():O:typeof P=="function"?P():P}),g=(0,z.Z)(h,2),o=g[0],c=g[1],y=D!==void 0?D:o,u=p?p(y):y,s=(0,oe.Z)(l),i=(0,U.Z)([y]),t=(0,z.Z)(i,2),m=t[0],S=t[1];(0,te.o)(function(){var _=m[0];o!==_&&s(o,_)},[m]),(0,te.o)(function(){L(D)||c(D)},[D]);var f=(0,oe.Z)(function(_,A){c(_,A),S([y],A)});return[u,f]}},91881:function(Ct,Qe,B){"use strict";var z=B(71002),oe=B(80334);function te(U,L){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,P=new Set;function k(e,O){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=P.has(e);if((0,oe.ZP)(!l,"Warning: There may be circular references"),l)return!1;if(e===O)return!0;if(M&&D>1)return!1;P.add(e);var p=D+1;if(Array.isArray(e)){if(!Array.isArray(O)||e.length!==O.length)return!1;for(var h=0;h<e.length;h++)if(!k(e[h],O[h],p))return!1;return!0}if(e&&O&&(0,z.Z)(e)==="object"&&(0,z.Z)(O)==="object"){var g=Object.keys(e);return g.length!==Object.keys(O).length?!1:g.every(function(o){return k(e[o],O[o],p)})}return!1}return k(U,L)}Qe.Z=te},98423:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return oe}});var z=B(1413);function oe(te,U){var L=(0,z.Z)({},te);return Array.isArray(U)&&U.forEach(function(M){delete L[M]}),L}},80334:function(Ct,Qe,B){"use strict";var z={};function oe(k,e){}function te(k,e){}function U(){z={}}function L(k,e,O){!e&&!z[O]&&(k(!1,O),z[O]=!0)}function M(k,e){L(oe,k,e)}function P(k,e){L(te,k,e)}Qe.ZP=M},73299:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return Y}});var z=B(87462),oe=B(1413),te=B(71002),U=B(97685),L=B(4942),M=B(45987),P=B(67294),k=B(73935),e=B(94184),O=B.n(e),D=B(48555),l=P.forwardRef(function(W,X){var ie=W.height,Q=W.offsetY,de=W.offsetX,ve=W.children,Ke=W.prefixCls,We=W.onInnerResize,ct=W.innerProps,at=W.rtl,nt=W.extra,et={},St={display:"flex",flexDirection:"column"};if(Q!==void 0){var mt;et={height:ie,position:"relative",overflow:"hidden"},St=(0,oe.Z)((0,oe.Z)({},St),{},(mt={transform:"translateY(".concat(Q,"px)")},(0,L.Z)(mt,at?"marginRight":"marginLeft",-de),(0,L.Z)(mt,"position","absolute"),(0,L.Z)(mt,"left",0),(0,L.Z)(mt,"right",0),(0,L.Z)(mt,"top",0),mt))}return P.createElement("div",{style:et},P.createElement(D.Z,{onResize:function(Pt){var Xe=Pt.offsetHeight;Xe&&We&&We()}},P.createElement("div",(0,z.Z)({style:St,className:O()((0,L.Z)({},"".concat(Ke,"-holder-inner"),Ke)),ref:X},ct),ve,nt)))});l.displayName="Filler";var p=l,h=function(X){return+setTimeout(X,16)},g=function(X){return clearTimeout(X)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(h=function(X){return window.requestAnimationFrame(X)},g=function(X){return window.cancelAnimationFrame(X)});var o=0,c=new Map;function y(W){c.delete(W)}var u=function(X){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;o+=1;var Q=o;function de(ve){if(ve===0)y(Q),X();else{var Ke=h(function(){de(ve-1)});c.set(Q,Ke)}}return de(ie),Q};u.cancel=function(W){var X=c.get(W);return y(X),g(X)};var s=u;function i(W,X){var ie="touches"in W?W.touches[0]:W;return ie[X?"pageX":"pageY"]}var t=P.forwardRef(function(W,X){var ie,Q=W.prefixCls,de=W.rtl,ve=W.scrollOffset,Ke=W.scrollRange,We=W.onStartMove,ct=W.onStopMove,at=W.onScroll,nt=W.horizontal,et=W.spinSize,St=W.containerSize,mt=W.style,Tt=W.thumbStyle,Pt=P.useState(!1),Xe=(0,U.Z)(Pt,2),st=Xe[0],Rt=Xe[1],jt=P.useState(null),qt=(0,U.Z)(jt,2),Ar=qt[0],jr=qt[1],Cr=P.useState(null),lr=(0,U.Z)(Cr,2),Hr=lr[0],Jr=lr[1],Qt=!de,Nr=P.useRef(),Rr=P.useRef(),rr=P.useState(!1),pr=(0,U.Z)(rr,2),gr=pr[0],nn=pr[1],ar=P.useRef(),Tr=function(){clearTimeout(ar.current),nn(!0),ar.current=setTimeout(function(){nn(!1)},3e3)},an=Ke-St||0,hn=St-et||0,Tn=an>0,yi=P.useMemo(function(){if(ve===0||an===0)return 0;var xi=ve/an;return xi*hn},[ve,an,hn]),as=function(Ei){Ei.stopPropagation(),Ei.preventDefault()},Za=P.useRef({top:yi,dragging:st,pageY:Ar,startTop:Hr});Za.current={top:yi,dragging:st,pageY:Ar,startTop:Hr};var Qn=function(Ei){Rt(!0),jr(i(Ei,nt)),Jr(Za.current.top),We(),Ei.stopPropagation(),Ei.preventDefault()};P.useEffect(function(){var xi=function(Ua){Ua.preventDefault()},Ei=Nr.current,ba=Rr.current;return Ei.addEventListener("touchstart",xi),ba.addEventListener("touchstart",Qn),function(){Ei.removeEventListener("touchstart",xi),ba.removeEventListener("touchstart",Qn)}},[]);var Ga=P.useRef();Ga.current=an;var $a=P.useRef();$a.current=hn,P.useEffect(function(){if(st){var xi,Ei=function(Ua){var Ya=Za.current,Ts=Ya.dragging,Sa=Ya.pageY,ws=Ya.startTop;if(s.cancel(xi),Ts){var La=i(Ua,nt)-Sa,qi=ws;!Qt&&nt?qi-=La:qi+=La;var Ka=Ga.current,oa=$a.current,Fi=oa?qi/oa:0,Vi=Math.ceil(Fi*Ka);Vi=Math.max(Vi,0),Vi=Math.min(Vi,Ka),xi=s(function(){at(Vi,nt)})}},ba=function(){Rt(!1),ct()};return window.addEventListener("mousemove",Ei),window.addEventListener("touchmove",Ei),window.addEventListener("mouseup",ba),window.addEventListener("touchend",ba),function(){window.removeEventListener("mousemove",Ei),window.removeEventListener("touchmove",Ei),window.removeEventListener("mouseup",ba),window.removeEventListener("touchend",ba),s.cancel(xi)}}},[st]),P.useEffect(function(){Tr()},[ve]),P.useImperativeHandle(X,function(){return{delayHidden:Tr}});var Pa="".concat(Q,"-scrollbar"),gi={position:"absolute",visibility:gr&&Tn?null:"hidden"},ki={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return nt?(gi.height=8,gi.left=0,gi.right=0,gi.bottom=0,ki.height="100%",ki.width=et,Qt?ki.left=yi:ki.right=yi):(gi.width=8,gi.top=0,gi.bottom=0,Qt?gi.right=0:gi.left=0,ki.width="100%",ki.height=et,ki.top=yi),P.createElement("div",{ref:Nr,className:O()(Pa,(ie={},(0,L.Z)(ie,"".concat(Pa,"-horizontal"),nt),(0,L.Z)(ie,"".concat(Pa,"-vertical"),!nt),(0,L.Z)(ie,"".concat(Pa,"-visible"),gr),ie)),style:(0,oe.Z)((0,oe.Z)({},gi),mt),onMouseDown:as,onMouseMove:Tr},P.createElement("div",{ref:Rr,className:O()("".concat(Pa,"-thumb"),(0,L.Z)({},"".concat(Pa,"-thumb-moving"),st)),style:(0,oe.Z)((0,oe.Z)({},ki),Tt),onMouseDown:Qn}))}),m=t;function S(W){var X=W.children,ie=W.setRef,Q=P.useCallback(function(de){ie(de)},[]);return P.cloneElement(X,{ref:Q})}function f(W,X,ie,Q,de,ve,Ke){var We=Ke.getKey;return W.slice(X,ie+1).map(function(ct,at){var nt=X+at,et=ve(ct,nt,{style:{width:Q}}),St=We(ct);return P.createElement(S,{key:St,setRef:function(Tt){return de(ct,Tt)}},et)})}function _(W){return W instanceof HTMLElement||W instanceof SVGElement}function A(W){return _(W)?W:W instanceof P.Component?k.findDOMNode(W):null}var x=B(15671),w=B(43144),n=function(){function W(){(0,x.Z)(this,W),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,w.Z)(W,[{key:"set",value:function(ie,Q){this.maps[ie]=Q,this.id+=1}},{key:"get",value:function(ie){return this.maps[ie]}}]),W}(),a=n;function r(W,X,ie){var Q=P.useState(0),de=(0,U.Z)(Q,2),ve=de[0],Ke=de[1],We=(0,P.useRef)(new Map),ct=(0,P.useRef)(new a),at=(0,P.useRef)();function nt(){s.cancel(at.current)}function et(){var mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;nt();var Tt=function(){We.current.forEach(function(Xe,st){if(Xe&&Xe.offsetParent){var Rt=A(Xe),jt=Rt.offsetHeight;ct.current.get(st)!==jt&&ct.current.set(st,Rt.offsetHeight)}}),Ke(function(Xe){return Xe+1})};mt?Tt():at.current=s(Tt)}function St(mt,Tt){var Pt=W(mt),Xe=We.current.get(Pt);Tt?(We.current.set(Pt,Tt),et()):We.current.delete(Pt),!Xe!=!Tt&&(Tt?X==null||X(mt):ie==null||ie(mt))}return(0,P.useEffect)(function(){return nt},[]),[St,et,ct.current,ve]}function d(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var T=d()?P.useLayoutEffect:P.useEffect,b=function(X,ie){var Q=P.useRef(!0);T(function(){return X(Q.current)},ie),T(function(){return Q.current=!1,function(){Q.current=!0}},[])},v=function(X,ie){b(function(Q){if(!Q)return X()},ie)},E=b;function R(W){var X=P.useRef();X.current=W;var ie=P.useCallback(function(){for(var Q,de=arguments.length,ve=new Array(de),Ke=0;Ke<de;Ke++)ve[Ke]=arguments[Ke];return(Q=X.current)===null||Q===void 0?void 0:Q.call.apply(Q,[X].concat(ve))},[]);return ie}function C(W){var X=React.useRef(!1),ie=React.useState(W),Q=_slicedToArray(ie,2),de=Q[0],ve=Q[1];React.useEffect(function(){return X.current=!1,function(){X.current=!0}},[]);function Ke(We,ct){ct&&X.current||ve(We)}return[de,Ke]}function N(W){return W!==void 0}function K(W,X){var ie=X||{},Q=ie.defaultValue,de=ie.value,ve=ie.onChange,Ke=ie.postState,We=useState(function(){return N(de)?de:N(Q)?typeof Q=="function"?Q():Q:typeof W=="function"?W():W}),ct=_slicedToArray(We,2),at=ct[0],nt=ct[1],et=de!==void 0?de:at,St=Ke?Ke(et):et,mt=useEvent(ve),Tt=useState([et]),Pt=_slicedToArray(Tt,2),Xe=Pt[0],st=Pt[1];useLayoutUpdateEffect(function(){var jt=Xe[0];at!==jt&&mt(at,jt)},[Xe]),useLayoutUpdateEffect(function(){N(de)||nt(de)},[de]);var Rt=useEvent(function(jt,qt){nt(jt,qt),st([et],qt)});return[St,Rt]}var H=B(31461);function ee(W,X,ie){var Q=React.useRef({});return(!("value"in Q.current)||ie(Q.current.condition,X))&&(Q.current.value=W(),Q.current.condition=X),Q.current.value}function J(W,X){typeof W=="function"?W(X):_typeof(W)==="object"&&W&&"current"in W&&(W.current=X)}function se(){for(var W=arguments.length,X=new Array(W),ie=0;ie<W;ie++)X[ie]=arguments[ie];var Q=X.filter(function(de){return de});return Q.length<=1?Q[0]:function(de){X.forEach(function(ve){J(ve,de)})}}function G(){for(var W=arguments.length,X=new Array(W),ie=0;ie<W;ie++)X[ie]=arguments[ie];return useMemo(function(){return se.apply(void 0,X)},X,function(Q,de){return Q.length!==de.length||Q.every(function(ve,Ke){return ve!==de[Ke]})})}function Ee(W){var X,ie,Q=isMemo(W)?W.type.type:W.type;return!(typeof Q=="function"&&!((X=Q.prototype)!==null&&X!==void 0&&X.render)||typeof W=="function"&&!((ie=W.prototype)!==null&&ie!==void 0&&ie.render))}function ge(W){return!isValidElement(W)||isFragment(W)?!1:Ee(W)}function Pe(W,X,ie,Q){if(!X.length)return ie;var de=_toArray(X),ve=de[0],Ke=de.slice(1),We;return!W&&typeof ve=="number"?We=[]:Array.isArray(W)?We=_toConsumableArray(W):We=_objectSpread({},W),Q&&ie===void 0&&Ke.length===1?delete We[ve][Ke[0]]:We[ve]=Pe(We[ve],Ke,ie,Q),We}function Ne(W,X,ie){var Q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return X.length&&Q&&ie===void 0&&!get(W,X.slice(0,-1))?W:Pe(W,X,ie,Q)}function $e(W){return _typeof(W)==="object"&&W!==null&&Object.getPrototypeOf(W)===Object.prototype}function je(W){return Array.isArray(W)?[]:{}}var Ce=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function fe(){for(var W=arguments.length,X=new Array(W),ie=0;ie<W;ie++)X[ie]=arguments[ie];var Q=je(X[0]);return X.forEach(function(de){function ve(Ke,We){var ct=new Set(We),at=get(de,Ke),nt=Array.isArray(at);if(nt||$e(at)){if(!ct.has(at)){ct.add(at);var et=get(Q,Ke);nt?Q=Ne(Q,Ke,[]):(!et||_typeof(et)!=="object")&&(Q=Ne(Q,Ke,je(at))),Ce(at).forEach(function(St){ve([].concat(_toConsumableArray(Ke),[St]),ct)})}}else Q=Ne(Q,Ke,at)}ve([])}),Q}var Be={},Ue=[],re=function(X){Ue.push(X)};function Z(W,X){if(0)var ie}function le(W,X){if(0)var ie}function we(){Be={}}function ue(W,X,ie){!X&&!Be[ie]&&(W(!1,ie),Be[ie]=!0)}function pe(W,X){ue(Z,W,X)}function ae(W,X){ue(le,W,X)}pe.preMessage=re,pe.resetWarned=we,pe.noteOnce=ae;var _e=null,ce=10;function he(W,X,ie,Q,de,ve,Ke,We){var ct=P.useRef(),at=P.useState(null),nt=(0,U.Z)(at,2),et=nt[0],St=nt[1];return E(function(){if(et&&et.times<ce){if(!W.current){St(function(Tr){return(0,oe.Z)({},Tr)});return}ve();var mt=et.targetAlign,Tt=et.originAlign,Pt=et.index,Xe=et.offset,st=W.current.clientHeight,Rt=!1,jt=mt,qt=null;if(st){for(var Ar=mt||Tt,jr=0,Cr=0,lr=0,Hr=Math.min(X.length-1,Pt),Jr=0;Jr<=Hr;Jr+=1){var Qt=de(X[Jr]);Cr=jr;var Nr=ie.get(Qt);lr=Cr+(Nr===void 0?Q:Nr),jr=lr}for(var Rr=Ar==="top"?Xe:st-Xe,rr=Hr;rr>=0;rr-=1){var pr=de(X[rr]),gr=ie.get(pr);if(gr===void 0){Rt=!0;break}if(Rr-=gr,Rr<=0)break}switch(Ar){case"top":qt=Cr-Xe;break;case"bottom":qt=lr-st+Xe;break;default:{var nn=W.current.scrollTop,ar=nn+st;Cr<nn?jt="top":lr>ar&&(jt="bottom")}}qt!==null&&Ke(qt),qt!==et.lastTop&&(Rt=!0)}Rt&&St(function(Tr){return(0,oe.Z)((0,oe.Z)({},Tr),{},{times:Tr.times+1,targetAlign:jt,lastTop:qt})})}},[et,W.current]),function(mt){if(mt==null){We();return}if(s.cancel(ct.current),typeof mt=="number")Ke(mt);else if(mt&&(0,te.Z)(mt)==="object"){var Tt,Pt=mt.align;"index"in mt?Tt=mt.index:Tt=X.findIndex(function(Rt){return de(Rt)===mt.key});var Xe=mt.offset,st=Xe===void 0?0:Xe;St({times:0,index:Tt,offset:st,originAlign:Pt})}}}function Le(W,X,ie,Q){var de=ie-W,ve=X-ie,Ke=Math.min(de,ve)*2;if(Q<=Ke){var We=Math.floor(Q/2);return Q%2?ie+We+1:ie-We}return de>ve?ie-(Q-ve):ie+(Q-de)}function Ye(W,X,ie){var Q=W.length,de=X.length,ve,Ke;if(Q===0&&de===0)return null;Q<de?(ve=W,Ke=X):(ve=X,Ke=W);var We={__EMPTY_ITEM__:!0};function ct(Tt){return Tt!==void 0?ie(Tt):We}for(var at=null,nt=Math.abs(Q-de)!==1,et=0;et<Ke.length;et+=1){var St=ct(ve[et]),mt=ct(Ke[et]);if(St!==mt){at=et,nt=nt||St!==ct(Ke[et+1]);break}}return at===null?null:{index:at,multiple:nt}}function ke(W,X,ie){var Q=P.useState(W),de=(0,U.Z)(Q,2),ve=de[0],Ke=de[1],We=P.useState(null),ct=(0,U.Z)(We,2),at=ct[0],nt=ct[1];return P.useEffect(function(){var et=Ye(ve||[],W||[],X);(et==null?void 0:et.index)!==void 0&&(ie==null||ie(et.index),nt(W[et.index])),Ke(W)},[W]),[at]}var be=(typeof navigator=="undefined"?"undefined":(0,te.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Re=be,Fe=function(W,X){var ie=(0,P.useRef)(!1),Q=(0,P.useRef)(null);function de(){clearTimeout(Q.current),ie.current=!0,Q.current=setTimeout(function(){ie.current=!1},50)}var ve=(0,P.useRef)({top:W,bottom:X});return ve.current.top=W,ve.current.bottom=X,function(Ke){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ct=Ke<0&&ve.current.top||Ke>0&&ve.current.bottom;return We&&ct?(clearTimeout(Q.current),ie.current=!1):(!ct||ie.current)&&de(),!ie.current&&ct}};function Ae(W,X,ie,Q,de){var ve=(0,P.useRef)(0),Ke=(0,P.useRef)(null),We=(0,P.useRef)(null),ct=(0,P.useRef)(!1),at=Fe(X,ie);function nt(Xe,st){s.cancel(Ke.current),ve.current+=st,We.current=st,!at(st)&&(Re||Xe.preventDefault(),Ke.current=s(function(){var Rt=ct.current?10:1;de(ve.current*Rt),ve.current=0}))}function et(Xe,st){de(st,!0),Re||Xe.preventDefault()}var St=(0,P.useRef)(null),mt=(0,P.useRef)(null);function Tt(Xe){if(W){s.cancel(mt.current),mt.current=s(function(){St.current=null},2);var st=Xe.deltaX,Rt=Xe.deltaY,jt=Xe.shiftKey,qt=st,Ar=Rt;(St.current==="sx"||!St.current&&jt&&Rt&&!st)&&(qt=Rt,Ar=0,St.current="sx");var jr=Math.abs(qt),Cr=Math.abs(Ar);St.current===null&&(St.current=Q&&jr>Cr?"x":"y"),St.current==="y"?nt(Xe,Ar):et(Xe,qt)}}function Pt(Xe){W&&(ct.current=Xe.detail===We.current)}return[Tt,Pt]}var Me=14/15;function rt(W,X,ie){var Q=(0,P.useRef)(!1),de=(0,P.useRef)(0),ve=(0,P.useRef)(null),Ke=(0,P.useRef)(null),We,ct=function(St){if(Q.current){var mt=Math.ceil(St.touches[0].pageY),Tt=de.current-mt;de.current=mt,ie(Tt)&&St.preventDefault(),clearInterval(Ke.current),Ke.current=setInterval(function(){Tt*=Me,(!ie(Tt,!0)||Math.abs(Tt)<=.1)&&clearInterval(Ke.current)},16)}},at=function(){Q.current=!1,We()},nt=function(St){We(),St.touches.length===1&&!Q.current&&(Q.current=!0,de.current=Math.ceil(St.touches[0].pageY),ve.current=St.target,ve.current.addEventListener("touchmove",ct),ve.current.addEventListener("touchend",at))};We=function(){ve.current&&(ve.current.removeEventListener("touchmove",ct),ve.current.removeEventListener("touchend",at))},E(function(){return W&&X.current.addEventListener("touchstart",nt),function(){var et;(et=X.current)===null||et===void 0||et.removeEventListener("touchstart",nt),We(),clearInterval(Ke.current)}},[W])}var lt=20;function Ze(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ie=W/X*100;return isNaN(ie)&&(ie=0),ie=Math.max(ie,lt),ie=Math.min(ie,W/2),Math.floor(ie)}function ft(W,X,ie,Q){var de=P.useMemo(function(){return[new Map,[]]},[W,ie.id,Q]),ve=(0,U.Z)(de,2),Ke=ve[0],We=ve[1],ct=function(nt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nt,St=Ke.get(nt),mt=Ke.get(et);if(St===void 0||mt===void 0)for(var Tt=W.length,Pt=We.length;Pt<Tt;Pt+=1){var Xe,st=W[Pt],Rt=X(st);Ke.set(Rt,Pt);var jt=(Xe=ie.get(Rt))!==null&&Xe!==void 0?Xe:Q;if(We[Pt]=(We[Pt-1]||0)+jt,Rt===nt&&(St=Pt),Rt===et&&(mt=Pt),St!==void 0&&mt!==void 0)break}return{top:We[St-1]||0,bottom:We[mt]}};return ct}var Et=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],qe=[],pt={overflowY:"auto",overflowAnchor:"none"};function Se(W,X){var ie=W.prefixCls,Q=ie===void 0?"rc-virtual-list":ie,de=W.className,ve=W.height,Ke=W.itemHeight,We=W.fullHeight,ct=We===void 0?!0:We,at=W.style,nt=W.data,et=W.children,St=W.itemKey,mt=W.virtual,Tt=W.direction,Pt=W.scrollWidth,Xe=W.component,st=Xe===void 0?"div":Xe,Rt=W.onScroll,jt=W.onVirtualScroll,qt=W.onVisibleChange,Ar=W.innerProps,jr=W.extraRender,Cr=W.styles,lr=(0,M.Z)(W,Et),Hr=!!(mt!==!1&&ve&&Ke),Jr=Hr&&nt&&(Ke*nt.length>ve||!!Pt),Qt=Tt==="rtl",Nr=O()(Q,(0,L.Z)({},"".concat(Q,"-rtl"),Qt),de),Rr=nt||qe,rr=(0,P.useRef)(),pr=(0,P.useRef)(),gr=(0,P.useState)(0),nn=(0,U.Z)(gr,2),ar=nn[0],Tr=nn[1],an=(0,P.useState)(0),hn=(0,U.Z)(an,2),Tn=hn[0],yi=hn[1],as=(0,P.useState)(!1),Za=(0,U.Z)(as,2),Qn=Za[0],Ga=Za[1],$a=function(){Ga(!0)},Pa=function(){Ga(!1)},gi=P.useCallback(function(xt){return typeof St=="function"?St(xt):xt==null?void 0:xt[St]},[St]),ki={getKey:gi};function xi(xt){Tr(function(bt){var Ot;typeof xt=="function"?Ot=xt(bt):Ot=xt;var Mt=ht(Ot);return rr.current.scrollTop=Mt,Mt})}var Ei=(0,P.useRef)({start:0,end:Rr.length}),ba=(0,P.useRef)(),ss=ke(Rr,gi),Ua=(0,U.Z)(ss,1),Ya=Ua[0];ba.current=Ya;var Ts=r(gi,null,null),Sa=(0,U.Z)(Ts,4),ws=Sa[0],La=Sa[1],qi=Sa[2],Ka=Sa[3],oa=P.useMemo(function(){if(!Hr)return{scrollHeight:void 0,start:0,end:Rr.length-1,offset:void 0};if(!Jr){var xt;return{scrollHeight:((xt=pr.current)===null||xt===void 0?void 0:xt.offsetHeight)||0,start:0,end:Rr.length-1,offset:void 0}}for(var bt=0,Ot,Mt,Gt,Br=Rr.length,nr=0;nr<Br;nr+=1){var qr=Rr[nr],Pr=gi(qr),xr=qi.get(Pr),en=bt+(xr===void 0?Ke:xr);en>=ar&&Ot===void 0&&(Ot=nr,Mt=bt),en>ar+ve&&Gt===void 0&&(Gt=nr),bt=en}return Ot===void 0&&(Ot=0,Mt=0,Gt=Math.ceil(ve/Ke)),Gt===void 0&&(Gt=Rr.length-1),Gt=Math.min(Gt+1,Rr.length-1),{scrollHeight:bt,start:Ot,end:Gt,offset:Mt}},[Jr,Hr,ar,Rr,Ka,ve]),Fi=oa.scrollHeight,Vi=oa.start,Oa=oa.end,ds=oa.offset;Ei.current.start=Vi,Ei.current.end=Oa;var ks=P.useState({width:0,height:ve}),zi=(0,U.Z)(ks,2),Ri=zi[0],js=zi[1],os=function(bt){js({width:bt.width||bt.offsetWidth,height:bt.height||bt.offsetHeight})},Fs=(0,P.useRef)(),xe=(0,P.useRef)(),Ge=P.useMemo(function(){return Ze(Ri.width,Pt)},[Ri.width,Pt]),ot=P.useMemo(function(){return Ze(Ri.height,Fi)},[Ri.height,Fi]),He=Fi-ve,dt=(0,P.useRef)(He);dt.current=He;function ht(xt){var bt=xt;return Number.isNaN(dt.current)||(bt=Math.min(bt,dt.current)),bt=Math.max(bt,0),bt}var _t=ar<=0,It=ar>=He,sr=Fe(_t,It),Vt=function(){return{x:Qt?-Tn:Tn,y:ar}},Sr=(0,P.useRef)(Vt()),fr=R(function(){if(jt){var xt=Vt();(Sr.current.x!==xt.x||Sr.current.y!==xt.y)&&(jt(xt),Sr.current=xt)}});function Dr(xt,bt){var Ot=xt;bt?((0,k.flushSync)(function(){yi(Ot)}),fr()):xi(Ot)}function Vr(xt){var bt=xt.currentTarget.scrollTop;bt!==ar&&xi(bt),Rt==null||Rt(xt),fr()}var mr=function(bt){var Ot=bt,Mt=Pt-Ri.width;return Ot=Math.max(Ot,0),Ot=Math.min(Ot,Mt),Ot},sn=R(function(xt,bt){bt?((0,k.flushSync)(function(){yi(function(Ot){var Mt=Ot+(Qt?-xt:xt);return mr(Mt)})}),fr()):xi(function(Ot){var Mt=Ot+xt;return Mt})}),kr=Ae(Hr,_t,It,!!Pt,sn),j=(0,U.Z)(kr,2),ne=j[0],q=j[1];rt(Hr,rr,function(xt,bt){return sr(xt,bt)?!1:(ne({preventDefault:function(){},deltaY:xt}),!0)}),E(function(){function xt(Ot){Hr&&Ot.preventDefault()}var bt=rr.current;return bt.addEventListener("wheel",ne),bt.addEventListener("DOMMouseScroll",q),bt.addEventListener("MozMousePixelScroll",xt),function(){bt.removeEventListener("wheel",ne),bt.removeEventListener("DOMMouseScroll",q),bt.removeEventListener("MozMousePixelScroll",xt)}},[Hr]),E(function(){Pt&&yi(function(xt){return mr(xt)})},[Ri.width,Pt]);var De=function(){var bt,Ot;(bt=Fs.current)===null||bt===void 0||bt.delayHidden(),(Ot=xe.current)===null||Ot===void 0||Ot.delayHidden()},ze=he(rr,Rr,qi,Ke,gi,function(){return La(!0)},xi,De);P.useImperativeHandle(X,function(){return{getScrollInfo:Vt,scrollTo:function(bt){function Ot(Mt){return Mt&&(0,te.Z)(Mt)==="object"&&("left"in Mt||"top"in Mt)}Ot(bt)?(bt.left!==void 0&&yi(mr(bt.left)),ze(bt.top)):ze(bt)}}}),E(function(){if(qt){var xt=Rr.slice(Vi,Oa+1);qt(xt,Rr)}},[Vi,Oa,Rr]);var ut=ft(Rr,gi,qi,Ke),gt=jr==null?void 0:jr({start:Vi,end:Oa,virtual:Jr,offsetX:Tn,offsetY:ds,rtl:Qt,getSize:ut}),Lt=f(Rr,Vi,Oa,Pt,ws,et,ki),wt=null;ve&&(wt=(0,oe.Z)((0,L.Z)({},ct?"height":"maxHeight",ve),pt),Hr&&(wt.overflowY="hidden",Pt&&(wt.overflowX="hidden"),Qn&&(wt.pointerEvents="none")));var Ht={};return Qt&&(Ht.dir="rtl"),P.createElement("div",(0,z.Z)({style:(0,oe.Z)((0,oe.Z)({},at),{},{position:"relative"}),className:Nr},Ht,lr),P.createElement(D.Z,{onResize:os},P.createElement(st,{className:"".concat(Q,"-holder"),style:wt,ref:rr,onScroll:Vr,onMouseEnter:De},P.createElement(p,{prefixCls:Q,height:Fi,offsetX:Tn,offsetY:ds,scrollWidth:Pt,onInnerResize:La,ref:pr,innerProps:Ar,rtl:Qt,extra:gt},Lt))),Jr&&Fi>ve&&P.createElement(m,{ref:Fs,prefixCls:Q,scrollOffset:ar,scrollRange:Fi,rtl:Qt,onScroll:Dr,onStartMove:$a,onStopMove:Pa,spinSize:ot,containerSize:Ri.height,style:Cr==null?void 0:Cr.verticalScrollBar,thumbStyle:Cr==null?void 0:Cr.verticalScrollBarThumb}),Jr&&Pt&&P.createElement(m,{ref:xe,prefixCls:Q,scrollOffset:Tn,scrollRange:Pt,rtl:Qt,onScroll:Dr,onStartMove:$a,onStopMove:Pa,spinSize:Ge,containerSize:Ri.width,horizontal:!0,style:Cr==null?void 0:Cr.horizontalScrollBar,thumbStyle:Cr==null?void 0:Cr.horizontalScrollBarThumb}))}var ye=P.forwardRef(Se);ye.displayName="List";var Te=ye,Y=Te},66392:function(Ct,Qe){"use strict";var B;var z=Symbol.for("react.element"),oe=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),P=Symbol.for("react.context"),k=Symbol.for("react.server_context"),e=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function o(c){if(typeof c=="object"&&c!==null){var y=c.$$typeof;switch(y){case z:switch(c=c.type,c){case te:case L:case U:case O:case D:return c;default:switch(c=c&&c.$$typeof,c){case k:case P:case e:case p:case l:case M:return c;default:return y}}case oe:return y}}}B=P,B=M,B=z,B=e,B=te,B=p,B=l,B=oe,B=L,B=U,B=O,B=D,B=function(){return!1},B=function(){return!1},B=function(c){return o(c)===P},B=function(c){return o(c)===M},B=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===z},B=function(c){return o(c)===e},B=function(c){return o(c)===te},B=function(c){return o(c)===p},B=function(c){return o(c)===l},B=function(c){return o(c)===oe},B=function(c){return o(c)===L},B=function(c){return o(c)===U},B=function(c){return o(c)===O},B=function(c){return o(c)===D},B=function(c){return typeof c=="string"||typeof c=="function"||c===te||c===L||c===U||c===O||c===D||c===h||typeof c=="object"&&c!==null&&(c.$$typeof===p||c.$$typeof===l||c.$$typeof===M||c.$$typeof===P||c.$$typeof===e||c.$$typeof===g||c.getModuleId!==void 0)},B=o},31461:function(Ct,Qe,B){"use strict";B(66392)},74300:function(Ct,Qe,B){"use strict";Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.CopyToClipboard=void 0;var z=te(B(67294)),oe=te(B(20640));function te(u){return u&&u.__esModule?u:{default:u}}function U(u){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?U=function(i){return typeof i}:U=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},U(u)}function L(u,s){var i=Object.keys(u);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(u);s&&(t=t.filter(function(m){return Object.getOwnPropertyDescriptor(u,m).enumerable})),i.push.apply(i,t)}return i}function M(u){for(var s=1;s<arguments.length;s++){var i=arguments[s]!=null?arguments[s]:{};s%2?L(i,!0).forEach(function(t){c(u,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(i)):L(i).forEach(function(t){Object.defineProperty(u,t,Object.getOwnPropertyDescriptor(i,t))})}return u}function P(u,s){if(u==null)return{};var i=k(u,s),t,m;if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(u);for(m=0;m<S.length;m++)t=S[m],!(s.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(u,t)&&(i[t]=u[t])}return i}function k(u,s){if(u==null)return{};var i={},t=Object.keys(u),m,S;for(S=0;S<t.length;S++)m=t[S],!(s.indexOf(m)>=0)&&(i[m]=u[m]);return i}function e(u,s){if(!(u instanceof s))throw new TypeError("Cannot call a class as a function")}function O(u,s){for(var i=0;i<s.length;i++){var t=s[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(u,t.key,t)}}function D(u,s,i){return s&&O(u.prototype,s),i&&O(u,i),u}function l(u,s){return s&&(U(s)==="object"||typeof s=="function")?s:h(u)}function p(u){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},p(u)}function h(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function g(u,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(s&&s.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),s&&o(u,s)}function o(u,s){return o=Object.setPrototypeOf||function(t,m){return t.__proto__=m,t},o(u,s)}function c(u,s,i){return s in u?Object.defineProperty(u,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):u[s]=i,u}var y=function(u){g(s,u);function s(){var i,t;e(this,s);for(var m=arguments.length,S=new Array(m),f=0;f<m;f++)S[f]=arguments[f];return t=l(this,(i=p(s)).call.apply(i,[this].concat(S))),c(h(t),"onClick",function(_){var A=t.props,x=A.text,w=A.onCopy,n=A.children,a=A.options,r=z.default.Children.only(n),d=(0,oe.default)(x,a);w&&w(x,d),r&&r.props&&typeof r.props.onClick=="function"&&r.props.onClick(_)}),t}return D(s,[{key:"render",value:function(){var t=this.props,m=t.text,S=t.onCopy,f=t.options,_=t.children,A=P(t,["text","onCopy","options","children"]),x=z.default.Children.only(_);return z.default.cloneElement(x,M({},A,{onClick:this.onClick}))}}]),s}(z.default.PureComponent);Qe.CopyToClipboard=y,c(y,"defaultProps",{onCopy:void 0,options:void 0})},74855:function(Ct,Qe,B){"use strict";var z=B(74300),oe=z.CopyToClipboard;oe.CopyToClipboard=oe,Ct.exports=oe},91033:function(Ct,Qe,B){"use strict";var z=function(){if(typeof Map!="undefined")return Map;function n(a,r){var d=-1;return a.some(function(T,b){return T[0]===r?(d=b,!0):!1}),d}return function(){function a(){this.__entries__=[]}return Object.defineProperty(a.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),a.prototype.get=function(r){var d=n(this.__entries__,r),T=this.__entries__[d];return T&&T[1]},a.prototype.set=function(r,d){var T=n(this.__entries__,r);~T?this.__entries__[T][1]=d:this.__entries__.push([r,d])},a.prototype.delete=function(r){var d=this.__entries__,T=n(d,r);~T&&d.splice(T,1)},a.prototype.has=function(r){return!!~n(this.__entries__,r)},a.prototype.clear=function(){this.__entries__.splice(0)},a.prototype.forEach=function(r,d){d===void 0&&(d=null);for(var T=0,b=this.__entries__;T<b.length;T++){var v=b[T];r.call(d,v[1],v[0])}},a}()}(),oe=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,te=function(){return typeof B.g!="undefined"&&B.g.Math===Math?B.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),U=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(te):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}}(),L=2;function M(n,a){var r=!1,d=!1,T=0;function b(){r&&(r=!1,n()),d&&E()}function v(){U(b)}function E(){var R=Date.now();if(r){if(R-T<L)return;d=!0}else r=!0,d=!1,setTimeout(v,a);T=R}return E}var P=20,k=["top","right","bottom","left","width","height","size","weight"],e=typeof MutationObserver!="undefined",O=function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=M(this.refresh.bind(this),P)}return n.prototype.addObserver=function(a){~this.observers_.indexOf(a)||this.observers_.push(a),this.connected_||this.connect_()},n.prototype.removeObserver=function(a){var r=this.observers_,d=r.indexOf(a);~d&&r.splice(d,1),!r.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var a=this.updateObservers_();a&&this.refresh()},n.prototype.updateObservers_=function(){var a=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return a.forEach(function(r){return r.broadcastActive()}),a.length>0},n.prototype.connect_=function(){!oe||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),e?(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)},n.prototype.disconnect_=function(){!oe||!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)},n.prototype.onTransitionEnd_=function(a){var r=a.propertyName,d=r===void 0?"":r,T=k.some(function(b){return!!~d.indexOf(b)});T&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),D=function(n,a){for(var r=0,d=Object.keys(a);r<d.length;r++){var T=d[r];Object.defineProperty(n,T,{value:a[T],enumerable:!1,writable:!1,configurable:!0})}return n},l=function(n){var a=n&&n.ownerDocument&&n.ownerDocument.defaultView;return a||te},p=m(0,0,0,0);function h(n){return parseFloat(n)||0}function g(n){for(var a=[],r=1;r<arguments.length;r++)a[r-1]=arguments[r];return a.reduce(function(d,T){var b=n["border-"+T+"-width"];return d+h(b)},0)}function o(n){for(var a=["top","right","bottom","left"],r={},d=0,T=a;d<T.length;d++){var b=T[d],v=n["padding-"+b];r[b]=h(v)}return r}function c(n){var a=n.getBBox();return m(0,0,a.width,a.height)}function y(n){var a=n.clientWidth,r=n.clientHeight;if(!a&&!r)return p;var d=l(n).getComputedStyle(n),T=o(d),b=T.left+T.right,v=T.top+T.bottom,E=h(d.width),R=h(d.height);if(d.boxSizing==="border-box"&&(Math.round(E+b)!==a&&(E-=g(d,"left","right")+b),Math.round(R+v)!==r&&(R-=g(d,"top","bottom")+v)),!s(n)){var C=Math.round(E+b)-a,N=Math.round(R+v)-r;Math.abs(C)!==1&&(E-=C),Math.abs(N)!==1&&(R-=N)}return m(T.left,T.top,E,R)}var u=function(){return typeof SVGGraphicsElement!="undefined"?function(n){return n instanceof l(n).SVGGraphicsElement}:function(n){return n instanceof l(n).SVGElement&&typeof n.getBBox=="function"}}();function s(n){return n===l(n).document.documentElement}function i(n){return oe?u(n)?c(n):y(n):p}function t(n){var a=n.x,r=n.y,d=n.width,T=n.height,b=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,v=Object.create(b.prototype);return D(v,{x:a,y:r,width:d,height:T,top:r,right:a+d,bottom:T+r,left:a}),v}function m(n,a,r,d){return{x:n,y:a,width:r,height:d}}var S=function(){function n(a){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=a}return n.prototype.isActive=function(){var a=i(this.target);return this.contentRect_=a,a.width!==this.broadcastWidth||a.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var a=this.contentRect_;return this.broadcastWidth=a.width,this.broadcastHeight=a.height,a},n}(),f=function(){function n(a,r){var d=t(r);D(this,{target:a,contentRect:d})}return n}(),_=function(){function n(a,r,d){if(this.activeObservations_=[],this.observations_=new z,typeof a!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=a,this.controller_=r,this.callbackCtx_=d}return n.prototype.observe=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(a instanceof l(a).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(a)||(r.set(a,new S(a)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(a instanceof l(a).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(a)&&(r.delete(a),r.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var a=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&a.activeObservations_.push(r)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var a=this.callbackCtx_,r=this.activeObservations_.map(function(d){return new f(d.target,d.broadcastRect())});this.callback_.call(a,r,a),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),A=typeof WeakMap!="undefined"?new WeakMap:new z,x=function(){function n(a){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=O.getInstance(),d=new _(a,r,this);A.set(this,d)}return n}();["observe","unobserve","disconnect"].forEach(function(n){x.prototype[n]=function(){var a;return(a=A.get(this))[n].apply(a,arguments)}});var w=function(){return typeof te.ResizeObserver!="undefined"?te.ResizeObserver:x}();Qe.Z=w},11742:function(Ct){Ct.exports=function(){var Qe=document.getSelection();if(!Qe.rangeCount)return function(){};for(var B=document.activeElement,z=[],oe=0;oe<Qe.rangeCount;oe++)z.push(Qe.getRangeAt(oe));switch(B.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":B.blur();break;default:B=null;break}return Qe.removeAllRanges(),function(){Qe.type==="Caret"&&Qe.removeAllRanges(),Qe.rangeCount||z.forEach(function(te){Qe.addRange(te)}),B&&B.focus()}}},4977:function(Ct){"use strict";Ct.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},17423:function(Ct,Qe,B){"use strict";B.d(Qe,{Z:function(){return k}});const z=e=>typeof e=="object"&&e!=null&&e.nodeType===1,oe=(e,O)=>(!O||e!=="hidden")&&e!=="visible"&&e!=="clip",te=(e,O)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const D=getComputedStyle(e,null);return oe(D.overflowY,O)||oe(D.overflowX,O)||(l=>{const p=(h=>{if(!h.ownerDocument||!h.ownerDocument.defaultView)return null;try{return h.ownerDocument.defaultView.frameElement}catch(g){return null}})(l);return!!p&&(p.clientHeight<l.scrollHeight||p.clientWidth<l.scrollWidth)})(e)}return!1},U=(e,O,D,l,p,h,g,o)=>h<e&&g>O||h>e&&g<O?0:h<=e&&o<=D||g>=O&&o>=D?h-e-l:g>O&&o<D||h<e&&o>D?g-O+p:0,L=e=>{const O=e.parentElement;return O==null?e.getRootNode().host||null:O},M=(e,O)=>{var D,l,p,h;if(typeof document=="undefined")return[];const{scrollMode:g,block:o,inline:c,boundary:y,skipOverflowHiddenElements:u}=O,s=typeof y=="function"?y:K=>K!==y;if(!z(e))throw new TypeError("Invalid target");const i=document.scrollingElement||document.documentElement,t=[];let m=e;for(;z(m)&&s(m);){if(m=L(m),m===i){t.push(m);break}m!=null&&m===document.body&&te(m)&&!te(document.documentElement)||m!=null&&te(m,u)&&t.push(m)}const S=(l=(D=window.visualViewport)==null?void 0:D.width)!=null?l:innerWidth,f=(h=(p=window.visualViewport)==null?void 0:p.height)!=null?h:innerHeight,{scrollX:_,scrollY:A}=window,{height:x,width:w,top:n,right:a,bottom:r,left:d}=e.getBoundingClientRect(),{top:T,right:b,bottom:v,left:E}=(K=>{const H=window.getComputedStyle(K);return{top:parseFloat(H.scrollMarginTop)||0,right:parseFloat(H.scrollMarginRight)||0,bottom:parseFloat(H.scrollMarginBottom)||0,left:parseFloat(H.scrollMarginLeft)||0}})(e);let R=o==="start"||o==="nearest"?n-T:o==="end"?r+v:n+x/2-T+v,C=c==="center"?d+w/2-E+b:c==="end"?a+b:d-E;const N=[];for(let K=0;K<t.length;K++){const H=t[K],{height:ee,width:J,top:se,right:G,bottom:Ee,left:ge}=H.getBoundingClientRect();if(g==="if-needed"&&n>=0&&d>=0&&r<=f&&a<=S&&n>=se&&r<=Ee&&d>=ge&&a<=G)return N;const Pe=getComputedStyle(H),Ne=parseInt(Pe.borderLeftWidth,10),$e=parseInt(Pe.borderTopWidth,10),je=parseInt(Pe.borderRightWidth,10),Ce=parseInt(Pe.borderBottomWidth,10);let fe=0,Be=0;const Ue="offsetWidth"in H?H.offsetWidth-H.clientWidth-Ne-je:0,re="offsetHeight"in H?H.offsetHeight-H.clientHeight-$e-Ce:0,Z="offsetWidth"in H?H.offsetWidth===0?0:J/H.offsetWidth:0,le="offsetHeight"in H?H.offsetHeight===0?0:ee/H.offsetHeight:0;if(i===H)fe=o==="start"?R:o==="end"?R-f:o==="nearest"?U(A,A+f,f,$e,Ce,A+R,A+R+x,x):R-f/2,Be=c==="start"?C:c==="center"?C-S/2:c==="end"?C-S:U(_,_+S,S,Ne,je,_+C,_+C+w,w),fe=Math.max(0,fe+A),Be=Math.max(0,Be+_);else{fe=o==="start"?R-se-$e:o==="end"?R-Ee+Ce+re:o==="nearest"?U(se,Ee,ee,$e,Ce+re,R,R+x,x):R-(se+ee/2)+re/2,Be=c==="start"?C-ge-Ne:c==="center"?C-(ge+J/2)+Ue/2:c==="end"?C-G+je+Ue:U(ge,G,J,Ne,je+Ue,C,C+w,w);const{scrollLeft:we,scrollTop:ue}=H;fe=le===0?0:Math.max(0,Math.min(ue+fe/le,H.scrollHeight-ee/le+re)),Be=Z===0?0:Math.max(0,Math.min(we+Be/Z,H.scrollWidth-J/Z+Ue)),R+=ue-fe,C+=we-Be}N.push({el:H,top:fe,left:Be})}return N},P=e=>e===!1?{block:"end",inline:"nearest"}:(O=>O===Object(O)&&Object.keys(O).length!==0)(e)?e:{block:"start",inline:"nearest"};function k(e,O){if(!e.isConnected||!(p=>{let h=p;for(;h&&h.parentNode;){if(h.parentNode===document)return!0;h=h.parentNode instanceof ShadowRoot?h.parentNode.host:h.parentNode}return!1})(e))return;const D=(p=>{const h=window.getComputedStyle(p);return{top:parseFloat(h.scrollMarginTop)||0,right:parseFloat(h.scrollMarginRight)||0,bottom:parseFloat(h.scrollMarginBottom)||0,left:parseFloat(h.scrollMarginLeft)||0}})(e);if((p=>typeof p=="object"&&typeof p.behavior=="function")(O))return O.behavior(M(e,O));const l=typeof O=="boolean"||O==null?void 0:O.behavior;for(const{el:p,top:h,left:g}of M(e,P(O))){const o=h-D.top+D.bottom,c=g-D.left+D.right;p.scroll({top:o,left:c,behavior:l})}}}}]);
|