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.
429 lines
1.2 MiB
429 lines
1.2 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[69,5,7,8,16,18],{"+ua5":function(ht,_e,j){},"/cxE":function(ht,_e,j){"use strict";j.d(_e,"f",function(){return D}),j.d(_e,"g",function(){return V}),j.d(_e,"h",function(){return F}),j.d(_e,"e",function(){return X}),j.d(_e,"b",function(){return P}),j.d(_e,"c",function(){return e}),j.d(_e,"d",function(){return R}),j.d(_e,"a",function(){return m});class se{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(v){setTimeout(()=>{throw v.stack?new Error(v.message+`
|
|
|
|
`+v.stack):v},0)}}emit(v){this.listeners.forEach(u=>{u(v)})}onUnexpectedError(v){this.unexpectedErrorHandler(v),this.emit(v)}onUnexpectedExternalError(v){this.unexpectedErrorHandler(v)}}const G=new se;function D(v){X(v)||G.onUnexpectedError(v);return}function V(v){X(v)||G.onUnexpectedExternalError(v);return}function F(v){if(v instanceof Error){let{name:u,message:s}=v;const a=v.stacktrace||v.stack;return{$isError:!0,name:u,message:s,stack:a}}return v}const O="Canceled";function X(v){return v instanceof Error&&v.name===O&&v.message===O}function P(){const v=new Error(O);return v.name=v.message,v}function e(v){return v?new Error(`Illegal argument: ${v}`):new Error("Illegal argument")}function R(v){return v?new Error(`Illegal state: ${v}`):new Error("Illegal state")}class m extends Error{constructor(v){super("NotSupported");v&&(this.message=v)}}},"24hK":function(ht,_e,j){"use strict";j.d(_e,"a",function(){return G});class se{constructor(D){this.element=D,this.next=se.Undefined,this.prev=se.Undefined}}se.Undefined=new se(void 0);class G{constructor(){this._first=se.Undefined,this._last=se.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===se.Undefined}clear(){let D=this._first;for(;D!==se.Undefined;){const V=D.next;D.prev=se.Undefined,D.next=se.Undefined,D=V}this._first=se.Undefined,this._last=se.Undefined,this._size=0}unshift(D){return this._insert(D,!1)}push(D){return this._insert(D,!0)}_insert(D,V){const F=new se(D);if(this._first===se.Undefined)this._first=F,this._last=F;else if(V){const X=this._last;this._last=F,F.prev=X,X.next=F}else{const X=this._first;this._first=F,F.next=X,X.prev=F}this._size+=1;let O=!1;return()=>{O||(O=!0,this._remove(F))}}shift(){if(this._first===se.Undefined)return;{const D=this._first.element;return this._remove(this._first),D}}pop(){if(this._last===se.Undefined)return;{const D=this._last.element;return this._remove(this._last),D}}_remove(D){if(D.prev!==se.Undefined&&D.next!==se.Undefined){const V=D.prev;V.next=D.next,D.next.prev=V}else D.prev===se.Undefined&&D.next===se.Undefined?(this._first=se.Undefined,this._last=se.Undefined):D.next===se.Undefined?(this._last=this._last.prev,this._last.next=se.Undefined):D.prev===se.Undefined&&(this._first=this._first.next,this._first.prev=se.Undefined);this._size-=1}*[Symbol.iterator](){let D=this._first;for(;D!==se.Undefined;)yield D.element,D=D.next}}},"3/fG":function(ht,_e,j){"use strict";j.d(_e,"a",function(){return G});function se(D,V){let F;return V.length===0?F=D:F=D.replace(/\{(\d+)\}/g,function(O,X){const P=X[0];return typeof V[P]!="undefined"?V[P]:O}),F}function G(D,V,...F){return se(V,F)}},"49sm":function(ht,_e){var j={}.toString;ht.exports=Array.isArray||function(se){return j.call(se)=="[object Array]"}},"55Ip":function(ht,_e,j){"use strict";j.d(_e,"a",function(){return r});var se=j("Ty5D"),G=j("dI71"),D=j("q1tI"),V=j.n(D),F=j("YS25"),O=j("17x9"),X=j.n(O),P=j("wx14"),e=j("zLVn"),R=j("9R94"),m=function(n){Object(G.a)(l,n);function l(){for(var b,g=arguments.length,h=new Array(g),L=0;L<g;L++)h[L]=arguments[L];return b=n.call.apply(n,[this].concat(h))||this,b.history=Object(F.a)(b.props),b}var c=l.prototype;return c.render=function(){return V.a.createElement(se.c,{history:this.history,children:this.props.children})},l}(V.a.Component),v=function(n){Object(G.a)(l,n);function l(){for(var b,g=arguments.length,h=new Array(g),L=0;L<g;L++)h[L]=arguments[L];return b=n.call.apply(n,[this].concat(h))||this,b.history=Object(F.b)(b.props),b}var c=l.prototype;return c.render=function(){return V.a.createElement(se.c,{history:this.history,children:this.props.children})},l}(V.a.Component),u=function(l,c){return typeof l=="function"?l(c):l},s=function(l,c){return typeof l=="string"?Object(F.c)(l,null,null,c):l},a=function(l){return l},A=V.a.forwardRef;typeof A=="undefined"&&(A=a);function o(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var i=A(function(n,l){var c=n.innerRef,b=n.navigate,g=n.onClick,h=Object(e.a)(n,["innerRef","navigate","onClick"]),L=h.target,N=Object(P.a)({},h,{onClick:function(M){try{g&&g(M)}catch(W){throw M.preventDefault(),W}!M.defaultPrevented&&M.button===0&&(!L||L==="_self")&&!o(M)&&(M.preventDefault(),b())}});return a!==A?N.ref=l||c:N.ref=c,V.a.createElement("a",N)}),r=A(function(n,l){var c=n.component,b=c===void 0?i:c,g=n.replace,h=n.to,L=n.innerRef,N=Object(e.a)(n,["component","replace","to","innerRef"]);return V.a.createElement(se.e.Consumer,null,function(T){T||Object(R.a)(!1);var M=T.history,W=s(u(h,T.location),T.location),U=W?M.createHref(W):"",Y=Object(P.a)({},N,{href:U,navigate:function(){var me=u(h,T.location),ge=g?M.replace:M.push;ge(me)}});return a!==A?Y.ref=l||L:Y.innerRef=L,V.a.createElement(b,Y)})});if(!1)var t,E;var _=function(l){return l},y=V.a.forwardRef;typeof y=="undefined"&&(y=_);function B(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];return l.filter(function(b){return b}).join(" ")}var C=y(function(n,l){var c=n["aria-current"],b=c===void 0?"page":c,g=n.activeClassName,h=g===void 0?"active":g,L=n.activeStyle,N=n.className,T=n.exact,M=n.isActive,W=n.location,U=n.sensitive,Y=n.strict,ne=n.style,me=n.to,ge=n.innerRef,Oe=Object(e.a)(n,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return V.a.createElement(se.e.Consumer,null,function(Se){Se||Object(R.a)(!1);var Be=W||Se.location,Ne=s(u(me,Be),Be),ke=Ne.pathname,Ce=ke&&ke.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ve=Ce?Object(se.f)(Be.pathname,{path:Ce,exact:T,sensitive:U,strict:Y}):null,Xe=!!(M?M(ve,Be):ve),lt=Xe?B(N,h):N,at=Xe?Object(P.a)({},ne,{},L):ne,je=Object(P.a)({"aria-current":Xe&&b||null,className:lt,style:at,to:Ne},Oe);return _!==y?je.ref=l||ge:je.innerRef=ge,V.a.createElement(r,je)})});if(!1)var d},"5VLF":function(ht,_e,j){"use strict";var se,G;function D(V,F,O){var X=function(P,e){return V.js_beautify(P,e)};return X.js=V.js_beautify,X.css=F.css_beautify,X.html=O.html_beautify,X.js_beautify=V.js_beautify,X.css_beautify=F.css_beautify,X.html_beautify=O.html_beautify,X}!(se=[j("6UM0"),j("TXwP"),j("psGv")],G=function(V,F,O){return D(V,F,O)}.apply(_e,se),G!==void 0&&(ht.exports=G))},"5Y4S":function(ht,_e,j){"use strict";j.d(_e,"a",function(){return D});var se=j("MNsG");const G=se.b.performance&&typeof se.b.performance.now=="function";class D{constructor(V){this._highResolution=G&&V,this._startTime=this._now(),this._stopTime=-1}static create(V=!0){return new D(V)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?se.b.performance.now():Date.now()}}},"6+eU":function(ht,_e,j){"use strict";j.d(_e,"a",function(){return y});var se=j("wx14"),G=j("rePB"),D=j("VTBJ"),V=j("1OyB"),F=j("vuIU"),O=j("Ji7U"),X=j("LK+K"),P=j("q1tI"),e=j.n(P),R=j("TSYQ"),m=j.n(R),v=function(C){var d,n="".concat(C.rootPrefixCls,"-item"),l=m()(n,"".concat(n,"-").concat(C.page),(d={},Object(G.a)(d,"".concat(n,"-active"),C.active),Object(G.a)(d,C.className,!!C.className),Object(G.a)(d,"".concat(n,"-disabled"),!C.page),d)),c=function(){C.onClick(C.page)},b=function(h){C.onKeyPress(h,C.onClick,C.page)};return e.a.createElement("li",{title:C.showTitle?C.page:null,className:l,onClick:c,onKeyPress:b,tabIndex:"0"},C.itemRender(C.page,"page",e.a.createElement("a",{rel:"nofollow"},C.page)))},u=v,s={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},a=function(B){Object(O.a)(d,B);var C=Object(X.a)(d);function d(){var n;Object(V.a)(this,d);for(var l=arguments.length,c=new Array(l),b=0;b<l;b++)c[b]=arguments[b];return n=C.call.apply(C,[this].concat(c)),n.state={goInputText:""},n.buildOptionText=function(g){return"".concat(g," ").concat(n.props.locale.items_per_page)},n.changeSize=function(g){n.props.changeSize(Number(g))},n.handleChange=function(g){n.setState({goInputText:g.target.value})},n.handleBlur=function(g){var h=n.props,L=h.goButton,N=h.quickGo,T=h.rootPrefixCls,M=n.state.goInputText;if(L||M==="")return;if(g.relatedTarget&&(g.relatedTarget.className.indexOf("".concat(T,"-prev"))>=0||g.relatedTarget.className.indexOf("".concat(T,"-next"))>=0))return;n.setState({goInputText:""}),N(n.getValidValue())},n.go=function(g){var h=n.state.goInputText;if(h==="")return;(g.keyCode===s.ENTER||g.type==="click")&&(n.setState({goInputText:""}),n.props.quickGo(n.getValidValue()))},n}return Object(F.a)(d,[{key:"getValidValue",value:function(){var l=this.state,c=l.goInputText,b=l.current;return!c||isNaN(c)?b:Number(c)}},{key:"getPageSizeOptions",value:function(){var l=this.props,c=l.pageSize,b=l.pageSizeOptions;return b.some(function(g){return g.toString()===c.toString()})?b:b.concat([c.toString()]).sort(function(g,h){var L=isNaN(Number(g))?0:Number(g),N=isNaN(Number(h))?0:Number(h);return L-N})}},{key:"render",value:function(){var l=this,c=this.props,b=c.pageSize,g=c.locale,h=c.rootPrefixCls,L=c.changeSize,N=c.quickGo,T=c.goButton,M=c.selectComponentClass,W=c.buildOptionText,U=c.selectPrefixCls,Y=c.disabled,ne=this.state.goInputText,me="".concat(h,"-options"),ge=M,Oe=null,Se=null,Be=null;if(!L&&!N)return null;var Ne=this.getPageSizeOptions();if(L&&ge){var ke=Ne.map(function(Ce,ve){return e.a.createElement(ge.Option,{key:ve,value:Ce.toString()},(W||l.buildOptionText)(Ce))});Oe=e.a.createElement(ge,{disabled:Y,prefixCls:U,showSearch:!1,className:"".concat(me,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(b||Ne[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ve){return ve.parentNode}},ke)}return N&&(T&&(Be=typeof T=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Y,className:"".concat(me,"-quick-jumper-button")},g.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},T)),Se=e.a.createElement("div",{className:"".concat(me,"-quick-jumper")},g.jump_to,e.a.createElement("input",{disabled:Y,type:"text",value:ne,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),g.page,Be)),e.a.createElement("li",{className:"".concat(me)},Oe,Se)}}]),d}(e.a.Component);a.defaultProps={pageSizeOptions:["10","20","50","100"]};var A=a,o=j("N2Kk");function i(){}function r(B){return typeof B=="number"&&isFinite(B)&&Math.floor(B)===B}function t(B,C,d){return d}function E(B,C,d){var n=typeof B=="undefined"?C.pageSize:B;return Math.floor((d.total-1)/n)+1}var _=function(B){Object(O.a)(d,B);var C=Object(X.a)(d);function d(n){var l;Object(V.a)(this,d),l=C.call(this,n),l.getJumpPrevPage=function(){return Math.max(1,l.state.current-(l.props.showLessItems?3:5))},l.getJumpNextPage=function(){return Math.min(E(void 0,l.state,l.props),l.state.current+(l.props.showLessItems?3:5))},l.getItemIcon=function(L,N){var T=l.props.prefixCls,M=L||e.a.createElement("button",{type:"button","aria-label":N,className:"".concat(T,"-item-link")});return typeof L=="function"&&(M=e.a.createElement(L,Object(D.a)({},l.props))),M},l.savePaginationNode=function(L){l.paginationNode=L},l.isValid=function(L){return r(L)&&L!==l.state.current},l.shouldDisplayQuickJumper=function(){var L=l.props,N=L.showQuickJumper,T=L.pageSize,M=L.total;return M<=T?!1:N},l.handleKeyDown=function(L){(L.keyCode===s.ARROW_UP||L.keyCode===s.ARROW_DOWN)&&L.preventDefault()},l.handleKeyUp=function(L){var N=l.getValidValue(L),T=l.state.currentInputValue;N!==T&&l.setState({currentInputValue:N}),L.keyCode===s.ENTER?l.handleChange(N):L.keyCode===s.ARROW_UP?l.handleChange(N-1):L.keyCode===s.ARROW_DOWN&&l.handleChange(N+1)},l.changePageSize=function(L){var N=l.state.current,T=E(L,l.state,l.props);N=N>T?T:N,T===0&&(N=l.state.current),typeof L=="number"&&("pageSize"in l.props||l.setState({pageSize:L}),"current"in l.props||l.setState({current:N,currentInputValue:N})),l.props.onShowSizeChange(N,L),"onChange"in l.props&&l.props.onChange&&l.props.onChange(N,L)},l.handleChange=function(L){var N=l.props.disabled,T=L;if(l.isValid(T)&&!N){var M=E(void 0,l.state,l.props);T>M?T=M:T<1&&(T=1),"current"in l.props||l.setState({current:T,currentInputValue:T});var W=l.state.pageSize;return l.props.onChange(T,W),T}return l.state.current},l.prev=function(){l.hasPrev()&&l.handleChange(l.state.current-1)},l.next=function(){l.hasNext()&&l.handleChange(l.state.current+1)},l.jumpPrev=function(){l.handleChange(l.getJumpPrevPage())},l.jumpNext=function(){l.handleChange(l.getJumpNextPage())},l.hasPrev=function(){return l.state.current>1},l.hasNext=function(){return l.state.current<E(void 0,l.state,l.props)},l.runIfEnter=function(L,N){if(L.key==="Enter"||L.charCode===13){for(var T=arguments.length,M=new Array(T>2?T-2:0),W=2;W<T;W++)M[W-2]=arguments[W];N.apply(void 0,M)}},l.runIfEnterPrev=function(L){l.runIfEnter(L,l.prev)},l.runIfEnterNext=function(L){l.runIfEnter(L,l.next)},l.runIfEnterJumpPrev=function(L){l.runIfEnter(L,l.jumpPrev)},l.runIfEnterJumpNext=function(L){l.runIfEnter(L,l.jumpNext)},l.handleGoTO=function(L){(L.keyCode===s.ENTER||L.type==="click")&&l.handleChange(l.state.currentInputValue)};var c=n.onChange!==i,b="current"in n;b&&!c&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var g=n.defaultCurrent;"current"in n&&(g=n.current);var h=n.defaultPageSize;return"pageSize"in n&&(h=n.pageSize),g=Math.min(g,E(h,void 0,n)),l.state={current:g,currentInputValue:g,pageSize:h},l}return Object(F.a)(d,[{key:"componentDidUpdate",value:function(l,c){var b=this.props.prefixCls;if(c.current!==this.state.current&&this.paginationNode){var g=this.paginationNode.querySelector(".".concat(b,"-item-").concat(c.current));g&&document.activeElement===g&&g.blur()}}},{key:"getValidValue",value:function(l){var c=l.target.value,b=E(void 0,this.state,this.props),g=this.state.currentInputValue,h;return c===""?h=c:isNaN(Number(c))?h=g:c>=b?h=b:h=Number(c),h}},{key:"getShowSizeChanger",value:function(){var l=this.props,c=l.showSizeChanger,b=l.total,g=l.totalBoundaryShowSizeChanger;return typeof c!="undefined"?c:b>g}},{key:"renderPrev",value:function(l){var c=this.props,b=c.prevIcon,g=c.itemRender,h=g(l,"prev",this.getItemIcon(b,"prev page")),L=!this.hasPrev();return Object(P.isValidElement)(h)?Object(P.cloneElement)(h,{disabled:L}):h}},{key:"renderNext",value:function(l){var c=this.props,b=c.nextIcon,g=c.itemRender,h=g(l,"next",this.getItemIcon(b,"next page")),L=!this.hasNext();return Object(P.isValidElement)(h)?Object(P.cloneElement)(h,{disabled:L}):h}},{key:"render",value:function(){var l=this,c=this.props,b=c.prefixCls,g=c.className,h=c.style,L=c.disabled,N=c.hideOnSinglePage,T=c.total,M=c.locale,W=c.showQuickJumper,U=c.showLessItems,Y=c.showTitle,ne=c.showTotal,me=c.simple,ge=c.itemRender,Oe=c.showPrevNextJumpers,Se=c.jumpPrevIcon,Be=c.jumpNextIcon,Ne=c.selectComponentClass,ke=c.selectPrefixCls,Ce=c.pageSizeOptions,ve=this.state,Xe=ve.current,lt=ve.pageSize,at=ve.currentInputValue;if(N===!0&&T<=lt)return null;var je=E(void 0,this.state,this.props),rt=[],re=null,J=null,k=null,$=null,q=null,he=W&&W.goButton,de=U?1:2,Qe=Xe-1>0?Xe-1:0,ze=Xe+1<je?Xe+1:je,Ge=Object.keys(this.props).reduce(function(te,ie){return(ie.substr(0,5)==="data-"||ie.substr(0,5)==="aria-"||ie==="role")&&(te[ie]=l.props[ie]),te},{});if(me)return he&&(typeof he=="boolean"?q=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},M.jump_to_confirm):q=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},he),q=e.a.createElement("li",{title:Y?"".concat(M.jump_to).concat(Xe,"/").concat(je):null,className:"".concat(b,"-simple-pager")},q)),e.a.createElement("ul",Object(se.a)({className:m()(b,"".concat(b,"-simple"),Object(G.a)({},"".concat(b,"-disabled"),L),g),style:h,ref:this.savePaginationNode},Ge),e.a.createElement("li",{title:Y?M.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:m()("".concat(b,"-prev"),Object(G.a)({},"".concat(b,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Qe)),e.a.createElement("li",{title:Y?"".concat(Xe,"/").concat(je):null,className:"".concat(b,"-simple-pager")},e.a.createElement("input",{type:"text",value:at,disabled:L,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(b,"-slash")},"/"),je),e.a.createElement("li",{title:Y?M.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:m()("".concat(b,"-next"),Object(G.a)({},"".concat(b,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(ze)),q);if(je<=3+de*2){var $e={locale:M,rootPrefixCls:b,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Y,itemRender:ge};je||rt.push(e.a.createElement(u,Object(se.a)({},$e,{key:"noPager",page:je,className:"".concat(b,"-disabled")})));for(var nt=1;nt<=je;nt+=1){var dt=Xe===nt;rt.push(e.a.createElement(u,Object(se.a)({},$e,{key:nt,page:nt,active:dt})))}}else{var xe=U?M.prev_3:M.prev_5,Ue=U?M.next_3:M.next_5;Oe&&(re=e.a.createElement("li",{title:Y?xe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:m()("".concat(b,"-jump-prev"),Object(G.a)({},"".concat(b,"-jump-prev-custom-icon"),!!Se))},ge(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Se,"prev page"))),J=e.a.createElement("li",{title:Y?Ue:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:m()("".concat(b,"-jump-next"),Object(G.a)({},"".concat(b,"-jump-next-custom-icon"),!!Be))},ge(this.getJumpNextPage(),"jump-next",this.getItemIcon(Be,"next page")))),$=e.a.createElement(u,{locale:M,last:!0,rootPrefixCls:b,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:je,page:je,active:!1,showTitle:Y,itemRender:ge}),k=e.a.createElement(u,{locale:M,rootPrefixCls:b,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Y,itemRender:ge});var Ke=Math.max(1,Xe-de),We=Math.min(Xe+de,je);Xe-1<=de&&(We=1+de*2),je-Xe<=de&&(Ke=je-de*2);for(var Le=Ke;Le<=We;Le+=1){var Fe=Xe===Le;rt.push(e.a.createElement(u,{locale:M,rootPrefixCls:b,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Le,page:Le,active:Fe,showTitle:Y,itemRender:ge}))}Xe-1>=de*2&&Xe!==1+2&&(rt[0]=Object(P.cloneElement)(rt[0],{className:"".concat(b,"-item-after-jump-prev")}),rt.unshift(re)),je-Xe>=de*2&&Xe!==je-2&&(rt[rt.length-1]=Object(P.cloneElement)(rt[rt.length-1],{className:"".concat(b,"-item-before-jump-next")}),rt.push(J)),Ke!==1&&rt.unshift(k),We!==je&&rt.push($)}var we=null;ne&&(we=e.a.createElement("li",{className:"".concat(b,"-total-text")},ne(T,[T===0?0:(Xe-1)*lt+1,Xe*lt>T?T:Xe*lt])));var ue=!this.hasPrev()||!je,ce=!this.hasNext()||!je;return e.a.createElement("ul",Object(se.a)({className:m()(b,g,Object(G.a)({},"".concat(b,"-disabled"),L)),style:h,unselectable:"unselectable",ref:this.savePaginationNode},Ge),we,e.a.createElement("li",{title:Y?M.prev_page:null,onClick:this.prev,tabIndex:ue?null:0,onKeyPress:this.runIfEnterPrev,className:m()("".concat(b,"-prev"),Object(G.a)({},"".concat(b,"-disabled"),ue)),"aria-disabled":ue},this.renderPrev(Qe)),rt,e.a.createElement("li",{title:Y?M.next_page:null,onClick:this.next,tabIndex:ce?null:0,onKeyPress:this.runIfEnterNext,className:m()("".concat(b,"-next"),Object(G.a)({},"".concat(b,"-disabled"),ce)),"aria-disabled":ce},this.renderNext(ze)),e.a.createElement(A,{disabled:L,locale:M,rootPrefixCls:b,selectComponentClass:Ne,selectPrefixCls:ke,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Xe,pageSize:lt,pageSizeOptions:Ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:he}))}}],[{key:"getDerivedStateFromProps",value:function(l,c){var b={};if("current"in l&&(b.current=l.current,l.current!==c.current&&(b.currentInputValue=b.current)),"pageSize"in l&&l.pageSize!==c.pageSize){var g=c.current,h=E(l.pageSize,c,l);g=g>h?h:g,"current"in l||(b.current=g,b.currentInputValue=g),b.pageSize=l.pageSize}return b}}]),d}(e.a.Component);_.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:i,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:i,locale:o.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var y=_},"6RRn":function(ht,_e,j){"use strict";var se=j("wCXF"),G=j("n6Qo");j.d(_e,"b",function(){return G.a});var D=j("IBYe"),V=j("6eGT"),F=j("hW8S");j.d(_e,"a",function(){return F.a}),_e.c=se.b},"6UM0":function(ht,_e,j){var se,G;(function(){var D;(function(){"use strict";var F=[function(e,R,m){var v=m(1).Beautifier,u=m(5).Options;function s(a,A){var o=new v(a,A);return o.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new u}},function(e,R,m){var v=m(2).Output,u=m(3).Token,s=m(4),a=m(5).Options,A=m(7).Tokenizer,o=m(7).line_starters,i=m(7).positionable_operators,r=m(7).TOKEN;function t(U,Y){return Y.indexOf(U)!==-1}function E(U){return U.replace(/^\s+/g,"")}function _(U){for(var Y={},ne=0;ne<U.length;ne++)Y[U[ne].replace(/-/g,"_")]=U[ne];return Y}function y(U,Y){return U&&U.type===r.RESERVED&&U.text===Y}function B(U,Y){return U&&U.type===r.RESERVED&&t(U.text,Y)}var C=["case","return","do","if","throw","else","await","break","continue","async"],d=["before-newline","after-newline","preserve-newline"],n=_(d),l=[n.before_newline,n.preserve_newline],c={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function b(U,Y){if(Y.multiline_frame||Y.mode===c.ForInitializer||Y.mode===c.Conditional)return;U.remove_indent(Y.start_line_index)}function g(U){U=U.replace(s.allLineBreaks,`
|
|
`);for(var Y=[],ne=U.indexOf(`
|
|
`);ne!==-1;)Y.push(U.substring(0,ne)),U=U.substring(ne+1),ne=U.indexOf(`
|
|
`);return U.length&&Y.push(U),Y}function h(U){return U===c.ArrayLiteral}function L(U){return t(U,[c.Expression,c.ForInitializer,c.Conditional])}function N(U,Y){for(var ne=0;ne<U.length;ne++){var me=U[ne].trim();if(me.charAt(0)!==Y)return!1}return!0}function T(U,Y){for(var ne=0,me=U.length,ge;ne<me;ne++)if(ge=U[ne],ge&&ge.indexOf(Y)!==0)return!1;return!0}function M(U,Y){Y=Y||{},this._source_text=U||"",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 a(Y)}M.prototype.create_flags=function(U,Y){var ne=0;U&&(ne=U.indentation_level,!this._output.just_added_newline()&&U.line_indent_level>ne&&(ne=U.line_indent_level));var me={mode:Y,parent:U,last_token:U?U.last_token:new u(r.START_BLOCK,""),last_word:U?U.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:ne,alignment:0,line_indent_level:U?U.line_indent_level:ne,start_line_index:this._output.get_line_number(),ternary_depth:0};return me},M.prototype._reset=function(U){var Y=U.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new v(this._options,Y),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(c.BlockStatement);var ne=new A(U,this._options);return this._tokens=ne.tokenize(),U},M.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var U,Y=this._reset(this._source_text),ne=this._options.eol;this._options.eol==="auto"&&(ne=`
|
|
`,Y&&s.lineBreak.test(Y||"")&&(ne=Y.match(s.lineBreak)[0]));for(var me=this._tokens.next();me;)this.handle_token(me),this._last_last_text=this._flags.last_token.text,this._flags.last_token=me,me=this._tokens.next();return U=this._output.get_code(ne),U},M.prototype.handle_token=function(U,Y){U.type===r.START_EXPR?this.handle_start_expr(U):U.type===r.END_EXPR?this.handle_end_expr(U):U.type===r.START_BLOCK?this.handle_start_block(U):U.type===r.END_BLOCK?this.handle_end_block(U):U.type===r.WORD?this.handle_word(U):U.type===r.RESERVED?this.handle_word(U):U.type===r.SEMICOLON?this.handle_semicolon(U):U.type===r.STRING?this.handle_string(U):U.type===r.EQUALS?this.handle_equals(U):U.type===r.OPERATOR?this.handle_operator(U):U.type===r.COMMA?this.handle_comma(U):U.type===r.BLOCK_COMMENT?this.handle_block_comment(U,Y):U.type===r.COMMENT?this.handle_comment(U,Y):U.type===r.DOT?this.handle_dot(U):U.type===r.EOF?this.handle_eof(U):U.type===r.UNKNOWN?this.handle_unknown(U,Y):this.handle_unknown(U,Y)},M.prototype.handle_whitespace_and_comments=function(U,Y){var ne=U.newlines,me=this._options.keep_array_indentation&&h(this._flags.mode);if(U.comments_before)for(var ge=U.comments_before.next();ge;)this.handle_whitespace_and_comments(ge,Y),this.handle_token(ge,Y),ge=U.comments_before.next();if(me)for(var Oe=0;Oe<ne;Oe+=1)this.print_newline(Oe>0,Y);else if(this._options.max_preserve_newlines&&ne>this._options.max_preserve_newlines&&(ne=this._options.max_preserve_newlines),this._options.preserve_newlines&&ne>1){this.print_newline(!1,Y);for(var Se=1;Se<ne;Se+=1)this.print_newline(!0,Y)}};var W=["async","break","continue","return","throw","yield"];M.prototype.allow_wrap_or_preserved_newline=function(U,Y){if(Y=Y===void 0?!1:Y,this._output.just_added_newline())return;var ne=this._options.preserve_newlines&&U.newlines||Y,me=t(this._flags.last_token.text,i)||t(U.text,i);if(me){var ge=t(this._flags.last_token.text,i)&&t(this._options.operator_position,l)||t(U.text,i);ne=ne&&ge}if(ne)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(B(this._flags.last_token,W))return;this._output.set_wrap_point()}},M.prototype.print_newline=function(U,Y){if(!Y&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ne=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&y(ne,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(U)&&(this._flags.multiline_frame=!0)},M.prototype.print_token_line_indentation=function(U){this._output.just_added_newline()&&(this._options.keep_array_indentation&&U.newlines&&(U.text==="["||h(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(U.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))},M.prototype.print_token=function(U){if(this._output.raw){this._output.add_raw_token(U);return}if(this._options.comma_first&&U.previous&&U.previous.type===r.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Y=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Y),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(U),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(U),this._output.non_breaking_space=!0,this._output.add_token(U.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},M.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.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))},M.prototype.set_mode=function(U){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,U),this._flags=this.create_flags(this._previous_flags,U),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},M.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===c.Statement&&b(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},M.prototype.start_of_object_property=function(){return this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||B(this._flags.last_token,["get","set"]))},M.prototype.start_of_statement=function(U){var Y=!1;return Y=Y||B(this._flags.last_token,["var","let","const"])&&U.type===r.WORD,Y=Y||y(this._flags.last_token,"do"),Y=Y||!(this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement)&&B(this._flags.last_token,W)&&!U.newlines,Y=Y||y(this._flags.last_token,"else")&&!(y(U,"if")&&!U.comments_before),Y=Y||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===c.ForInitializer||this._previous_flags.mode===c.Conditional),Y=Y||this._flags.last_token.type===r.WORD&&this._flags.mode===c.BlockStatement&&!this._flags.in_case&&!(U.text==="--"||U.text==="++")&&this._last_last_text!=="function"&&U.type!==r.WORD&&U.type!==r.RESERVED,Y=Y||this._flags.mode===c.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||B(this._flags.last_token,["get","set"])),Y?(this.set_mode(c.Statement),this.indent(),this.handle_whitespace_and_comments(U,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U,B(U,["do","for","if","while"])),!0):!1},M.prototype.handle_start_expr=function(U){this.start_of_statement(U)||this.handle_whitespace_and_comments(U);var Y=c.Expression;if(U.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){B(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(U),this.set_mode(Y),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Y=c.ArrayLiteral,h(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())),t(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Y=c.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Y=c.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&U.whitespace_before===""?this._output.space_before_token=!1:(t(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===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var ne=this._tokens.peek(-3);if(this._options.space_after_named_function&&ne){var me=this._tokens.peek(-4);B(ne,["async","function"])||ne.text==="*"&&B(me,["async","function"])?this._output.space_before_token=!0:this._flags.mode===c.ObjectLiteral?(ne.text==="{"||ne.text===","||ne.text==="*"&&(me.text==="{"||me.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(U);(this._flags.last_token.type===r.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&t(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===r.START_BLOCK?this.print_newline():(this._flags.last_token.type===r.END_EXPR||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===r.COMMA)&&this.allow_wrap_or_preserved_newline(U,U.newlines),this.print_token(U),this.set_mode(Y),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},M.prototype.handle_end_expr=function(U){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(U),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(U,U.text==="]"&&h(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===r.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(U),this.restore_mode(),b(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===c.Conditional&&(this._previous_flags.mode=c.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},M.prototype.handle_start_block=function(U){this.handle_whitespace_and_comments(U);var Y=this._tokens.peek(),ne=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(c.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(c.BlockStatement):ne&&(t(ne.text,[":",","])&&t(Y.type,[r.STRING,r.WORD,r.RESERVED])||t(Y.text,["get","set","..."])&&t(ne.type,[r.WORD,r.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(ne.text,[":",","])?this.set_mode(c.BlockStatement):this.set_mode(c.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(c.BlockStatement):t(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||B(this._flags.last_token,["return","throw","import","default"])?this.set_mode(c.ObjectLiteral):this.set_mode(c.BlockStatement),this._flags.last_token&&(B(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var me=!Y.comments_before&&Y.text==="}",ge=me&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var Oe=0,Se=null;this._flags.inline_frame=!0;do if(Oe+=1,Se=this._tokens.peek(Oe-1),Se.newlines){this._flags.inline_frame=!1;break}while(Se.type!==r.EOF&&!(Se.type===r.END_BLOCK&&Se.opened===U))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&U.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(ge||this._flags.last_token.type===r.EQUALS||B(this._flags.last_token,C)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(h(this._previous_flags.mode)&&(this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.COMMA)&&((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(U),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(this._flags.last_token.type===r.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(U),this.indent(),!me&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},M.prototype.handle_end_block=function(U){for(this.handle_whitespace_and_comments(U);this._flags.mode===c.Statement;)this.restore_mode();var Y=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!Y?this._output.space_before_token=!0:this._options.brace_style==="expand"?Y||this.print_newline():Y||(h(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(U)},M.prototype.handle_word=function(U){if(U.type===r.RESERVED){if(t(U.text,["set","get"])&&this._flags.mode!==c.ObjectLiteral)U.type=r.WORD;else if(U.text==="import"&&t(this._tokens.peek().text,["(","."]))U.type=r.WORD;else if(t(U.text,["as","from"])&&!this._flags.import_block)U.type=r.WORD;else if(this._flags.mode===c.ObjectLiteral){var Y=this._tokens.peek();Y.text===":"&&(U.type=r.WORD)}}if(this.start_of_statement(U)?B(this._flags.last_token,["var","let","const"])&&U.type===r.WORD&&(this._flags.declaration_statement=!0):U.newlines&&!L(this._flags.mode)&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==r.EQUALS&&(this._options.preserve_newlines||!B(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(U),this.print_newline()):this.handle_whitespace_and_comments(U),this._flags.do_block&&!this._flags.do_while)if(y(U,"while")){this._output.space_before_token=!0,this.print_token(U),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&&y(U,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===c.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&B(U,["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(U),this._flags.in_case=!0;return}if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U)),y(U,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR))&&(!this._output.just_added_blankline()&&!U.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?B(this._flags.last_token,["get","set","new","export"])||B(this._flags.last_token,W)?this._output.space_before_token=!0:y(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===r.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(L(this._flags.mode)||h(this._flags.mode))||this.print_newline(),this.print_token(U),this._flags.last_word=U.text;return}var ne="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?ne="SPACE":B(U,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&U.newlines?ne="NEWLINE":(ne="SPACE",this._output.space_before_token=!0):ne="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===c.BlockStatement?ne="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&L(this._flags.mode)?ne="SPACE":this._flags.last_token.type===r.STRING?ne="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&t(this._last_last_text,["{",","]))?ne="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?ne="SPACE":ne="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,ne="NEWLINE"),B(U,o)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ne="SPACE":ne="NEWLINE"),B(U,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===c.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&U.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var me=this._output.current_line;me.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ne==="NEWLINE"?B(this._flags.last_token,C)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&B(U,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?(this._flags.last_token.type!==r.START_EXPR||!B(U,["var","let","const"]))&&this._flags.last_token.text!==":"&&(y(U,"if")&&y(U.previous,"else")?this._output.space_before_token=!0:this.print_newline()):B(U,o)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&h(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ne==="SPACE"&&(this._output.space_before_token=!0);U.previous&&(U.previous.type===r.WORD||U.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(U),this._flags.last_word=U.text,U.type===r.RESERVED&&(U.text==="do"?this._flags.do_block=!0:U.text==="if"?this._flags.if_block=!0:U.text==="import"?this._flags.import_block=!0:this._flags.import_block&&y(U,"from")&&(this._flags.import_block=!1))},M.prototype.handle_semicolon=function(U){this.start_of_statement(U)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(U);for(var Y=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&y(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(U)},M.prototype.handle_string=function(U){U.text.startsWith("`")&&U.newlines===0&&U.whitespace_before===""&&(U.previous.text===")"||this._flags.last_token.type===r.WORD)||(this.start_of_statement(U)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(U),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U):U.text.startsWith("`")&&this._flags.last_token.type===r.END_EXPR&&(U.previous.text==="]"||U.previous.text===")")&&U.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(U)},M.prototype.handle_equals=function(U){this.start_of_statement(U)||this.handle_whitespace_and_comments(U),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(U),this._output.space_before_token=!0},M.prototype.handle_comma=function(U){this.handle_whitespace_and_comments(U,!0),this.print_token(U),this._output.space_before_token=!0,this._flags.declaration_statement?(L(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(U)):this._flags.mode===c.ObjectLiteral||this._flags.mode===c.Statement&&this._flags.parent.mode===c.ObjectLiteral?(this._flags.mode===c.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(U)},M.prototype.handle_operator=function(U){var Y=U.text==="*"&&(B(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),ne=t(U.text,["-","+"])&&(t(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||t(this._flags.last_token.text,o)||this._flags.last_token.text===",");if(!this.start_of_statement(U)){var me=!Y;this.handle_whitespace_and_comments(U,me)}if(U.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(U);return}if(U.text==="::"){this.print_token(U);return}if(this._flags.last_token.type===r.OPERATOR&&t(this._options.operator_position,l)&&this.allow_wrap_or_preserved_newline(U),U.text===":"&&this._flags.in_case){this.print_token(U),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==r.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 ge=!0,Oe=!0,Se=!1;if(U.text===":"?this._flags.ternary_depth===0?ge=!1:(this._flags.ternary_depth-=1,Se=!0):U.text==="?"&&(this._flags.ternary_depth+=1),!ne&&!Y&&this._options.preserve_newlines&&t(U.text,i)){var Be=U.text===":",Ne=Be&&Se,ke=Be&&!Se;switch(this._options.operator_position){case n.before_newline:this._output.space_before_token=!ke,this.print_token(U),(!Be||Ne)&&this.allow_wrap_or_preserved_newline(U),this._output.space_before_token=!0;return;case n.after_newline:this._output.space_before_token=!0,!Be||Ne?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(U):this._output.space_before_token=!1,this.print_token(U),this._output.space_before_token=!0;return;case n.preserve_newline:ke||this.allow_wrap_or_preserved_newline(U),ge=!(this._output.just_added_newline()||ke),this._output.space_before_token=ge,this.print_token(U),this._output.space_before_token=!0;return}}if(Y){this.allow_wrap_or_preserved_newline(U),ge=!1;var Ce=this._tokens.peek();Oe=Ce&&t(Ce.type,[r.WORD,r.RESERVED])}else if(U.text==="...")this.allow_wrap_or_preserved_newline(U),ge=this._flags.last_token.type===r.START_BLOCK,Oe=!1;else if(t(U.text,["--","++","!","~"])||ne){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(U),ge=!1,Oe=!1,U.newlines&&(U.text==="--"||U.text==="++"||U.text==="~")){var ve=B(this._flags.last_token,C)&&U.newlines;ve&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ve,!0)}this._flags.last_token.text===";"&&L(this._flags.mode)&&(ge=!0),this._flags.last_token.type===r.RESERVED?ge=!0:this._flags.last_token.type===r.END_EXPR?ge=!(this._flags.last_token.text==="]"&&(U.text==="--"||U.text==="++")):this._flags.last_token.type===r.OPERATOR&&(ge=t(U.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(U.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Oe=!0)),(this._flags.mode===c.BlockStatement&&!this._flags.inline_frame||this._flags.mode===c.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ge,this.print_token(U),this._output.space_before_token=Oe},M.prototype.handle_block_comment=function(U,Y){if(this._output.raw){this._output.add_raw_token(U),U.directives&&U.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(U.directives){this.print_newline(!1,Y),this.print_token(U),U.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!s.newline.test(U.text)&&!U.newlines){this._output.space_before_token=!0,this.print_token(U),this._output.space_before_token=!0;return}else this.print_block_commment(U,Y)},M.prototype.print_block_commment=function(U,Y){var ne=g(U.text),me,ge=!1,Oe=!1,Se=U.whitespace_before,Be=Se.length;if(this.print_newline(!1,Y),this.print_token_line_indentation(U),this._output.add_token(ne[0]),this.print_newline(!1,Y),ne.length>1){for(ne=ne.slice(1),ge=N(ne,"*"),Oe=T(ne,Se),ge&&(this._flags.alignment=1),me=0;me<ne.length;me++)ge?(this.print_token_line_indentation(U),this._output.add_token(E(ne[me]))):Oe&&ne[me]?(this.print_token_line_indentation(U),this._output.add_token(ne[me].substring(Be))):(this._output.current_line.set_indent(-1),this._output.add_token(ne[me])),this.print_newline(!1,Y);this._flags.alignment=0}},M.prototype.handle_comment=function(U,Y){U.newlines?this.print_newline(!1,Y):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(U),this.print_newline(!1,Y)},M.prototype.handle_dot=function(U){this.start_of_statement(U)||this.handle_whitespace_and_comments(U,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),B(this._flags.last_token,C)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(U,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(U)},M.prototype.handle_unknown=function(U,Y){this.print_token(U),U.text[U.text.length-1]===`
|
|
`&&this.print_newline(!1,Y)},M.prototype.handle_eof=function(U){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(U)},e.exports.Beautifier=M},function(e){function R(u){this.__parent=u,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=[]}R.prototype.clone_empty=function(){var u=new R(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},R.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},R.prototype.has_match=function(u){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(u))return!0;return!1},R.prototype.set_indent=function(u,s){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.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)},R.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},R.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(u){this.__items.push(u);var s=u.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=u.length-s:this.__character_count+=u.length},R.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function m(u,s){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),s=s||"",u.indent_level>0&&(s=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}m.prototype.get_indent_size=function(u,s){var a=this.__base_string_length;return s=s||0,u<0&&(a=0),a+=u*this.__indent_size,a+=s,a},m.prototype.get_indent_string=function(u,s){var a=this.__base_string;return s=s||0,u<0&&(u=0,a=""),s+=u*this.__indent_size,this.__ensure_cache(s),a+=this.__cache[s],a},m.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},m.prototype.__add_column=function(){var u=this.__cache.length,s=0,a="";this.__indent_size&&u>=this.__indent_size&&(s=Math.floor(u/this.__indent_size),u-=s*this.__indent_size,a=new Array(s+1).join(this.__indent_string)),u&&(a+=new Array(u+1).join(" ")),this.__cache.push(a)};function v(u,s){this.__indent_cache=new m(u,s),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}v.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},v.prototype.get_line_number=function(){return this.__lines.length},v.prototype.get_indent_string=function(u,s){return this.__indent_cache.get_indent_string(u,s)},v.prototype.get_indent_size=function(u,s){return this.__indent_cache.get_indent_size(u,s)},v.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},v.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},v.prototype.get_code=function(u){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
|
|
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(`
|
|
`);return u!==`
|
|
`&&(a=a.replace(/[\n]/g,u)),a},v.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},v.prototype.set_indent=function(u,s){return u=u||0,s=s||0,this.next_line.set_indent(u,s),this.__lines.length>1?(this.current_line.set_indent(u,s),!0):(this.current_line.set_indent(),!1)},v.prototype.add_raw_token=function(u){for(var s=0;s<u.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},v.prototype.add_token=function(u){this.__add_space_before_token(),this.current_line.push(u),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},v.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(" "))},v.prototype.remove_indent=function(u){for(var s=this.__lines.length;u<s;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},v.prototype.trim=function(u){for(u=u===void 0?!1:u,this.current_line.trim();u&&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},v.prototype.just_added_newline=function(){return this.current_line.is_empty()},v.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},v.prototype.ensure_empty_line_above=function(u,s){for(var a=this.__lines.length-2;a>=0;){var A=this.__lines[a];if(A.is_empty())break;if(A.item(0).indexOf(u)!==0&&A.item(-1)!==s){this.__lines.splice(a+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},e.exports.Output=v},function(e){function R(m,v,u,s){this.type=m,this.text=v,this.comments_before=null,this.newlines=u||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=R},function(e,R){var m="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",v="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",u="\\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",s="\\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",a="(?:\\\\u[0-9a-fA-F]{4}|["+m+u+"])",A="(?:\\\\u[0-9a-fA-F]{4}|["+v+u+s+"])*";R.identifier=new RegExp(a+A,"g"),R.identifierStart=new RegExp(a),R.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+v+u+s+"])+");var o=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;R.newline=/[\n\r\u2028\u2029]/,R.lineBreak=new RegExp(`\r
|
|
|`+R.newline.source),R.allLineBreaks=new RegExp(R.lineBreak.source,"g")},function(e,R,m){var v=m(6).Options,u=["before-newline","after-newline","preserve-newline"];function s(a){v.call(this,a,"js");var A=this.raw_options.brace_style||null;A==="expand-strict"?this.raw_options.brace_style="expand":A==="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 i=0;i<o.length;i++)o[i]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=o[i];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",u),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}s.prototype=new v,e.exports.Options=s},function(e){function R(u,s){this.raw_options=m(u,s),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"])}R.prototype._get_array=function(u,s){var a=this.raw_options[u],A=s||[];return typeof a=="object"?a!==null&&typeof a.concat=="function"&&(A=a.concat()):typeof a=="string"&&(A=a.split(/[^a-zA-Z0-9_\/\-]+/)),A},R.prototype._get_boolean=function(u,s){var a=this.raw_options[u],A=a===void 0?!!s:!!a;return A},R.prototype._get_characters=function(u,s){var a=this.raw_options[u],A=s||"";return typeof a=="string"&&(A=a.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),A},R.prototype._get_number=function(u,s){var a=this.raw_options[u];s=parseInt(s,10),isNaN(s)&&(s=0);var A=parseInt(a,10);return isNaN(A)&&(A=s),A},R.prototype._get_selection=function(u,s,a){var A=this._get_selection_list(u,s,a);if(A.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[u]+"'");return A[0]},R.prototype._get_selection_list=function(u,s,a){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[s[0]],!this._is_valid_selection(a,s))throw new Error("Invalid Default Value!");var A=this._get_array(u,a);if(!this._is_valid_selection(A,s))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[u]+"'");return A},R.prototype._is_valid_selection=function(u,s){return u.length&&s.length&&!u.some(function(a){return s.indexOf(a)===-1})};function m(u,s){var a={};u=v(u);var A;for(A in u)A!==s&&(a[A]=u[A]);if(s&&u[s])for(A in u[s])a[A]=u[s][A];return a}function v(u){var s={},a;for(a in u){var A=a.replace(/-/g,"_");s[A]=u[a]}return s}e.exports.Options=R,e.exports.normalizeOpts=v,e.exports.mergeOpts=m},function(e,R,m){var v=m(8).InputScanner,u=m(9).Tokenizer,s=m(9).TOKEN,a=m(13).Directives,A=m(4),o=m(12).Pattern,i=m(14).TemplatablePattern;function r(N,T){return T.indexOf(N)!==-1}var t={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:s.START,RAW:s.RAW,EOF:s.EOF},E=new a(/\/\*/,/\*\//),_=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,y=/[0-9]/,B=/[^\d\.]/,C=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),d=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";d=d.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d="\\?\\.(?!\\d) "+d,d=d.replace(/ /g,"|");var n=new RegExp(d),l="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),c=l.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),b=new RegExp("^(?:"+c.join("|")+")$"),g,h=function(N,T){u.call(this,N,T),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var M=new o(this._input),W=new i(this._input).read_options(this._options);this.__patterns={template:W,identifier:W.starting_with(A.identifier).matching(A.identifierMatch),number:M.matching(_),punct:M.matching(n),comment:M.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:M.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:M.matching(/<!--/),html_comment_end:M.matching(/-->/),include:M.starting_with(/#include/).until_after(A.lineBreak),shebang:M.starting_with(/#!/).until_after(A.lineBreak),xml:M.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:W.until(/['\\\n\r\u2028\u2029]/),double_quote:W.until(/["\\\n\r\u2028\u2029]/),template_text:W.until(/[`\\$]/),template_expression:W.until(/[`}\\]/)}};h.prototype=new u,h.prototype._is_comment=function(N){return N.type===t.COMMENT||N.type===t.BLOCK_COMMENT||N.type===t.UNKNOWN},h.prototype._is_opening=function(N){return N.type===t.START_BLOCK||N.type===t.START_EXPR},h.prototype._is_closing=function(N,T){return(N.type===t.END_BLOCK||N.type===t.END_EXPR)&&T&&(N.text==="]"&&T.text==="["||N.text===")"&&T.text==="("||N.text==="}"&&T.text==="{")},h.prototype._reset=function(){g=!1},h.prototype._get_next_token=function(N,T){var M=null;this._readWhitespace();var W=this._input.peek();return W===null?this._create_token(t.EOF,""):(M=M||this._read_non_javascript(W),M=M||this._read_string(W),M=M||this._read_word(N),M=M||this._read_singles(W),M=M||this._read_comment(W),M=M||this._read_regexp(W,N),M=M||this._read_xml(W,N),M=M||this._read_punctuation(),M=M||this._create_token(t.UNKNOWN,this._input.next()),M)},h.prototype._read_word=function(N){var T;if(T=this.__patterns.identifier.read(),T!=="")return T=T.replace(A.allLineBreaks,`
|
|
`),!(N.type===t.DOT||N.type===t.RESERVED&&(N.text==="set"||N.text==="get"))&&b.test(T)?(T==="in"||T==="of")&&(N.type===t.WORD||N.type===t.STRING)?this._create_token(t.OPERATOR,T):this._create_token(t.RESERVED,T):this._create_token(t.WORD,T);if(T=this.__patterns.number.read(),T!=="")return this._create_token(t.WORD,T)},h.prototype._read_singles=function(N){var T=null;return N==="("||N==="["?T=this._create_token(t.START_EXPR,N):N===")"||N==="]"?T=this._create_token(t.END_EXPR,N):N==="{"?T=this._create_token(t.START_BLOCK,N):N==="}"?T=this._create_token(t.END_BLOCK,N):N===";"?T=this._create_token(t.SEMICOLON,N):N==="."&&B.test(this._input.peek(1))?T=this._create_token(t.DOT,N):N===","&&(T=this._create_token(t.COMMA,N)),T&&this._input.next(),T},h.prototype._read_punctuation=function(){var N=this.__patterns.punct.read();if(N!=="")return N==="="?this._create_token(t.EQUALS,N):N==="?."?this._create_token(t.DOT,N):this._create_token(t.OPERATOR,N)},h.prototype._read_non_javascript=function(N){var T="";if(N==="#"){if(this._is_first_token()&&(T=this.__patterns.shebang.read(),T))return this._create_token(t.UNKNOWN,T.trim()+`
|
|
`);if(T=this.__patterns.include.read(),T)return this._create_token(t.UNKNOWN,T.trim()+`
|
|
`);N=this._input.next();var M="#";if(this._input.hasNext()&&this._input.testChar(y)){do N=this._input.next(),M+=N;while(this._input.hasNext()&&N!=="#"&&N!=="=");return N==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(M+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(M+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,M)}this._input.back()}else if(N==="<"&&this._is_first_token()){if(T=this.__patterns.html_comment_start.read(),T){for(;this._input.hasNext()&&!this._input.testChar(A.newline);)T+=this._input.next();return g=!0,this._create_token(t.COMMENT,T)}}else if(g&&N==="-"&&(T=this.__patterns.html_comment_end.read(),T))return g=!1,this._create_token(t.COMMENT,T);return null},h.prototype._read_comment=function(N){var T=null;if(N==="/"){var M="";if(this._input.peek(1)==="*"){M=this.__patterns.block_comment.read();var W=E.get_directives(M);W&&W.ignore==="start"&&(M+=E.readIgnored(this._input)),M=M.replace(A.allLineBreaks,`
|
|
`),T=this._create_token(t.BLOCK_COMMENT,M),T.directives=W}else this._input.peek(1)==="/"&&(M=this.__patterns.comment.read(),T=this._create_token(t.COMMENT,M))}return T},h.prototype._read_string=function(N){if(N==="`"||N==="'"||N==='"'){var T=this._input.next();return this.has_char_escapes=!1,N==="`"?T+=this._read_string_recursive("`",!0,"${"):T+=this._read_string_recursive(N),this.has_char_escapes&&this._options.unescape_strings&&(T=L(T)),this._input.peek()===N&&(T+=this._input.next()),T=T.replace(A.allLineBreaks,`
|
|
`),this._create_token(t.STRING,T)}return null},h.prototype._allow_regexp_or_xml=function(N){return N.type===t.RESERVED&&r(N.text,["return","case","throw","else","do","typeof","yield"])||N.type===t.END_EXPR&&N.text===")"&&N.opened.previous.type===t.RESERVED&&r(N.opened.previous.text,["if","while","for"])||r(N.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},h.prototype._read_regexp=function(N,T){if(N==="/"&&this._allow_regexp_or_xml(T)){for(var M=this._input.next(),W=!1,U=!1;this._input.hasNext()&&(W||U||this._input.peek()!==N)&&!this._input.testChar(A.newline);)M+=this._input.peek(),W?W=!1:(W=this._input.peek()==="\\",this._input.peek()==="["?U=!0:this._input.peek()==="]"&&(U=!1)),this._input.next();return this._input.peek()===N&&(M+=this._input.next(),M+=this._input.read(A.identifier)),this._create_token(t.STRING,M)}return null},h.prototype._read_xml=function(N,T){if(this._options.e4x&&N==="<"&&this._allow_regexp_or_xml(T)){var M="",W=this.__patterns.xml.read_match();if(W){for(var U=W[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Y=U.indexOf("{")===0,ne=0;W;){var me=!!W[1],ge=W[2],Oe=!!W[W.length-1]||ge.slice(0,8)==="![CDATA[";if(!Oe&&(ge===U||Y&&ge.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(me?--ne:++ne),M+=W[0],ne<=0)break;W=this.__patterns.xml.read_match()}return W||(M+=this._input.match(/[\s\S]*/g)[0]),M=M.replace(A.allLineBreaks,`
|
|
`),this._create_token(t.STRING,M)}}return null};function L(N){for(var T="",M=0,W=new v(N),U=null;W.hasNext();)if(U=W.match(/([\s]|[^\\]|\\\\)+/g),U&&(T+=U[0]),W.peek()==="\\"){if(W.next(),W.peek()==="x")U=W.match(/x([0-9A-Fa-f]{2})/g);else if(W.peek()==="u")U=W.match(/u([0-9A-Fa-f]{4})/g);else{T+="\\",W.hasNext()&&(T+=W.next());continue}if(!U)return N;if(M=parseInt(U[1],16),M>126&&M<=255&&U[0].indexOf("x")===0)return N;if(M>=0&&M<32){T+="\\"+U[0];continue}else M===34||M===39||M===92?T+="\\"+String.fromCharCode(M):T+=String.fromCharCode(M)}return T}h.prototype._read_string_recursive=function(N,T,M){var W,U;N==="'"?U=this.__patterns.single_quote:N==='"'?U=this.__patterns.double_quote:N==="`"?U=this.__patterns.template_text:N==="}"&&(U=this.__patterns.template_expression);for(var Y=U.read(),ne="";this._input.hasNext();){if(ne=this._input.next(),ne===N||!T&&A.newline.test(ne)){this._input.back();break}else ne==="\\"&&this._input.hasNext()?(W=this._input.peek(),W==="x"||W==="u"?this.has_char_escapes=!0:W==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),ne+=this._input.next()):M&&(M==="${"&&ne==="$"&&this._input.peek()==="{"&&(ne+=this._input.next()),M===ne&&(N==="`"?ne+=this._read_string_recursive("}",T,"`"):ne+=this._read_string_recursive("`",T,"${"),this._input.hasNext()&&(ne+=this._input.next())));ne+=U.read(),Y+=ne}return Y},e.exports.Tokenizer=h,e.exports.TOKEN=t,e.exports.positionable_operators=C.slice(),e.exports.line_starters=l.slice()},function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function m(v){this.__input=v||"",this.__input_length=this.__input.length,this.__position=0}m.prototype.restart=function(){this.__position=0},m.prototype.back=function(){this.__position>0&&(this.__position-=1)},m.prototype.hasNext=function(){return this.__position<this.__input_length},m.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__input.charAt(this.__position),this.__position+=1),v},m.prototype.peek=function(v){var u=null;return v=v||0,v+=this.__position,v>=0&&v<this.__input_length&&(u=this.__input.charAt(v)),u},m.prototype.__match=function(v,u){v.lastIndex=u;var s=v.exec(this.__input);return s&&!(R&&v.sticky)&&(s.index!==u&&(s=null)),s},m.prototype.test=function(v,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(v,u):!1},m.prototype.testChar=function(v,u){var s=this.peek(u);return v.lastIndex=0,s!==null&&v.test(s)},m.prototype.match=function(v){var u=this.__match(v,this.__position);return u?this.__position+=u[0].length:u=null,u},m.prototype.read=function(v,u,s){var a="",A;return v&&(A=this.match(v),A&&(a+=A[0])),u&&(A||!v)&&(a+=this.readUntil(u,s)),a},m.prototype.readUntil=function(v,u){var s="",a=this.__position;v.lastIndex=this.__position;var A=v.exec(this.__input);return A?(a=A.index,u&&(a+=A[0].length)):a=this.__input_length,s=this.__input.substring(this.__position,a),this.__position=a,s},m.prototype.readUntilAfter=function(v){return this.readUntil(v,!0)},m.prototype.get_regexp=function(v,u){var s=null,a="g";return u&&R&&(a="y"),typeof v=="string"&&v!==""?s=new RegExp(v,a):v&&(s=new RegExp(v.source,a)),s},m.prototype.get_literal_regexp=function(v){return RegExp(v.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},m.prototype.peekUntilAfter=function(v){var u=this.__position,s=this.readUntilAfter(v);return this.__position=u,s},m.prototype.lookBack=function(v){var u=this.__position-1;return u>=v.length&&this.__input.substring(u-v.length,u).toLowerCase()===v},e.exports.InputScanner=m},function(e,R,m){var v=m(8).InputScanner,u=m(3).Token,s=m(10).TokenStream,a=m(11).WhitespacePattern,A={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(i,r){this._input=new v(i),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var i,r=new u(A.START,""),t=null,E=[],_=new s;r.type!==A.EOF;){for(i=this._get_next_token(r,t);this._is_comment(i);)_.add(i),i=this._get_next_token(r,t);_.isEmpty()||(i.comments_before=_,_=new s),i.parent=t,this._is_opening(i)?(E.push(t),t=i):t&&this._is_closing(i,t)&&(i.opened=t,t.closed=i,t=E.pop(),i.parent=t),i.previous=r,r.next=i,this.__tokens.add(i),r=i}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(i,r){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(A.RAW,t):this._create_token(A.EOF,"")},o.prototype._is_comment=function(i){return!1},o.prototype._is_opening=function(i){return!1},o.prototype._is_closing=function(i,r){return!1},o.prototype._create_token=function(i,r){var t=new u(i,r,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=o,e.exports.TOKEN=A},function(e){function R(m){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=m}R.prototype.restart=function(){this.__position=0},R.prototype.isEmpty=function(){return this.__tokens_length===0},R.prototype.hasNext=function(){return this.__position<this.__tokens_length},R.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__tokens[this.__position],this.__position+=1),m},R.prototype.peek=function(m){var v=null;return m=m||0,m+=this.__position,m>=0&&m<this.__tokens_length&&(v=this.__tokens[m]),v},R.prototype.add=function(m){this.__parent_token&&(m.parent=this.__parent_token),this.__tokens.push(m),this.__tokens_length+=1},e.exports.TokenStream=R},function(e,R,m){var v=m(12).Pattern;function u(s,a){v.call(this,s,a),a?this._line_regexp=this._input.get_regexp(a._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}u.prototype=new v,u.prototype.__set_whitespace_patterns=function(s,a){s+="\\t ",a+="\\n\\r",this._match_pattern=this._input.get_regexp("["+s+a+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+a+"]")},u.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var s=this._input.read(this._match_pattern);if(s===" ")this.whitespace_before_token=" ";else if(s){var a=this.__split(this._newline_regexp,s);this.newline_count=a.length-1,this.whitespace_before_token=a[this.newline_count]}return s},u.prototype.matching=function(s,a){var A=this._create();return A.__set_whitespace_patterns(s,a),A._update(),A},u.prototype._create=function(){return new u(this._input,this)},u.prototype.__split=function(s,a){s.lastIndex=0;for(var A=0,o=[],i=s.exec(a);i;)o.push(a.substring(A,i.index)),A=i.index+i[0].length,i=s.exec(a);return A<a.length?o.push(a.substring(A,a.length)):o.push(""),o},e.exports.WhitespacePattern=u},function(e){function R(m,v){this._input=m,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,v&&(this._starting_pattern=this._input.get_regexp(v._starting_pattern,!0),this._match_pattern=this._input.get_regexp(v._match_pattern,!0),this._until_pattern=this._input.get_regexp(v._until_pattern),this._until_after=v._until_after)}R.prototype.read=function(){var m=this._input.read(this._starting_pattern);return(!this._starting_pattern||m)&&(m+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),m},R.prototype.read_match=function(){return this._input.match(this._match_pattern)},R.prototype.until_after=function(m){var v=this._create();return v._until_after=!0,v._until_pattern=this._input.get_regexp(m),v._update(),v},R.prototype.until=function(m){var v=this._create();return v._until_after=!1,v._until_pattern=this._input.get_regexp(m),v._update(),v},R.prototype.starting_with=function(m){var v=this._create();return v._starting_pattern=this._input.get_regexp(m,!0),v._update(),v},R.prototype.matching=function(m){var v=this._create();return v._match_pattern=this._input.get_regexp(m,!0),v._update(),v},R.prototype._create=function(){return new R(this._input,this)},R.prototype._update=function(){},e.exports.Pattern=R},function(e){function R(m,v){m=typeof m=="string"?m:m.source,v=typeof v=="string"?v:v.source,this.__directives_block_pattern=new RegExp(m+/ beautify( \w+[:]\w+)+ /.source+v,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(m+/\sbeautify\signore:end\s/.source+v,"g")}R.prototype.get_directives=function(m){if(!m.match(this.__directives_block_pattern))return null;var v={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(m);u;)v[u[1]]=u[2],u=this.__directive_pattern.exec(m);return v},R.prototype.readIgnored=function(m){return m.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=R},function(e,R,m){var v=m(12).Pattern,u={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(a,A){v.call(this,a,A),this.__template_pattern=null,this._disabled=Object.assign({},u),this._excluded=Object.assign({},u),A&&(this.__template_pattern=this._input.get_regexp(A.__template_pattern),this._excluded=Object.assign(this._excluded,A._excluded),this._disabled=Object.assign(this._disabled,A._disabled));var o=new v(a);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}/)}}s.prototype=new v,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(a){var A=this._create();return A._disabled[a]=!0,A._update(),A},s.prototype.read_options=function(a){var A=this._create();for(var o in u)A._disabled[o]=a.templating.indexOf(o)===-1;return A._update(),A},s.prototype.exclude=function(a){var A=this._create();return A._excluded[a]=!0,A._update(),A},s.prototype.read=function(){var a="";this._match_pattern?a=this._input.read(this._starting_pattern):a=this._input.read(this._starting_pattern,this.__template_pattern);for(var A=this._read_template();A;)this._match_pattern?A+=this._input.read(this._match_pattern):A+=this._input.readUntil(this.__template_pattern),a+=A,A=this._read_template();return this._until_after&&(a+=this._input.readUntilAfter(this._until_pattern)),a},s.prototype.__set_templated_pattern=function(){var a=[];this._disabled.php||a.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||a.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||a.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(a.push(this.__patterns.django._starting_pattern.source),a.push(this.__patterns.django_value._starting_pattern.source),a.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||a.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&a.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+a.join("|")+")")},s.prototype._read_template=function(){var a="",A=this._input.peek();if(A==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(a=a||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(a=a||this.__patterns.erb.read())}else A==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(a=a||this.__patterns.handlebars_comment.read(),a=a||this.__patterns.handlebars_unescaped.read(),a=a||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(a=a||this.__patterns.django_value.read()),this._excluded.django||(a=a||this.__patterns.django_comment.read(),a=a||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(a=a||this.__patterns.smarty_comment.read(),a=a||this.__patterns.smarty_literal.read(),a=a||this.__patterns.smarty.read()));return a},e.exports.TemplatablePattern=s}],O={};function X(e){var R=O[e];if(R!==void 0)return R.exports;var m=O[e]={exports:{}};return F[e](m,m.exports,X),m.exports}var P=X(0);D=P})();var V=D;!(se=[],G=function(){return{js_beautify:V}}.apply(_e,se),G!==void 0&&(ht.exports=G))})()},"6eGT":function(ht,_e,j){"use strict";function se(G){return null}_e.a=se},"746U":function(ht,_e,j){"use strict";j.d(_e,"f",function(){return se}),j.d(_e,"l",function(){return G}),j.d(_e,"k",function(){return D}),j.d(_e,"j",function(){return V}),j.d(_e,"g",function(){return F}),j.d(_e,"m",function(){return O}),j.d(_e,"h",function(){return X}),j.d(_e,"n",function(){return P}),j.d(_e,"c",function(){return e}),j.d(_e,"a",function(){return R}),j.d(_e,"i",function(){return m}),j.d(_e,"o",function(){return v}),j.d(_e,"e",function(){return a}),j.d(_e,"d",function(){return A}),j.d(_e,"p",function(){return o}),j.d(_e,"b",function(){return i});function se(r){return Array.isArray(r)}function G(r){return typeof r=="string"}function D(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function V(r){return typeof r=="number"&&!isNaN(r)}function F(r){return r===!0||r===!1}function O(r){return typeof r=="undefined"}function X(r){return!P(r)}function P(r){return O(r)||r===null}function e(r,t){if(!r)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function R(r){if(P(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function m(r){return typeof r=="function"}function v(r,t){const E=Math.min(r.length,t.length);for(let _=0;_<E;_++)u(r[_],t[_])}function u(r,t){if(G(t)){if(typeof r!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(m(t)){try{if(r instanceof t)return}catch(E){}if(!P(r)&&r.constructor===t)return;if(t.length===1&&t.call(void 0,r)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function s(r){let t=[],E=Object.getPrototypeOf(r);for(;Object.prototype!==E;)t=t.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return t}function a(r){const t=[];for(const E of s(r))typeof r[E]=="function"&&t.push(E);return t}function A(r,t){const E=y=>function(){const B=Array.prototype.slice.call(arguments,0);return t(y,B)};let _={};for(const y of r)_[y]=E(y);return _}function o(r){return r===null?void 0:r}function i(r,t="Unreachable"){throw new Error(t)}},"815F":function(ht,_e,j){"use strict";j.d(_e,"e",function(){return X}),j.d(_e,"c",function(){return e}),j.d(_e,"d",function(){return R}),j.d(_e,"a",function(){return v}),j.d(_e,"f",function(){return u}),j.d(_e,"b",function(){return s});var se=j("KQm4"),G=j("VTBJ"),D=j("Ff2n"),V=j("Zm9Q"),F=j("Kwbf"),O=j("OZM5");function X(a,A){return a!=null?a:A}function P(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=new Map;function o(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(i||[]).forEach(function(t){var E=t.key,_=t.children;Object(F.a)(E!=null,"Tree node must have a certain key: [".concat(r).concat(E,"]"));var y=String(E);Object(F.a)(!A.has(y)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(y)),A.set(y,!0),o(_,"".concat(r).concat(y," > "))})}o(a)}function e(a){function A(o){var i=Object(V.a)(o);return i.map(function(r){if(!Object(O.i)(r))return Object(F.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var t=r.key,E=r.props,_=E.children,y=Object(D.a)(E,["children"]),B=Object(G.a)({key:t},y),C=A(_);return C.length&&(B.children=C),B}).filter(function(r){return r})}return A(a)}function R(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=new Set(A===!0?[]:A),i=[];function r(t){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(_,y){var B=Object(O.h)(E?E.pos:"0",y),C=X(_.key,B),d=Object(G.a)(Object(G.a)({},_),{},{parent:E,pos:B,children:null,data:_,isStart:[].concat(Object(se.a)(E?E.isStart:[]),[y===0]),isEnd:[].concat(Object(se.a)(E?E.isEnd:[]),[y===t.length-1])});return i.push(d),A===!0||o.has(C)?d.children=r(_.children||[],d):d.children=[],d})}return r(a),i}function m(a,A,o){var i;o?typeof o=="string"?i=function(E){return E[o]}:typeof o=="function"&&(i=function(E){return o(E)}):i=function(E,_){return X(E.key,_)};function r(t,E,_){var y=t?t.children:a,B=t?Object(O.h)(_.pos,E):"0";if(t){var C=i(t,B),d={node:t,index:E,pos:B,key:C,parentPos:_.node?_.pos:null,level:_.level+1};A(d)}y&&y.forEach(function(n,l){r(n,l,{node:t,pos:B,level:_?_.level+1:-1})})}r(null)}function v(a){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=A.initWrapper,i=A.processEntity,r=A.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,E={},_={},y={posEntities:E,keyEntities:_};return o&&(y=o(y)||y),m(a,function(B){var C=B.node,d=B.index,n=B.pos,l=B.key,c=B.parentPos,b=B.level,g={node:C,index:d,key:l,pos:n,level:b},h=X(l,n);E[n]=g,_[h]=g,g.parent=E[c],g.parent&&(g.parent.children=g.parent.children||[],g.parent.children.push(g)),i&&i(g,y)},t),r&&r(y),y}function u(a,A){var o=A.expandedKeys,i=A.selectedKeys,r=A.loadedKeys,t=A.loadingKeys,E=A.checkedKeys,_=A.halfCheckedKeys,y=A.dragOverNodeKey,B=A.dropPosition,C=A.keyEntities,d=C[a],n={eventKey:a,expanded:o.indexOf(a)!==-1,selected:i.indexOf(a)!==-1,loaded:r.indexOf(a)!==-1,loading:t.indexOf(a)!==-1,checked:E.indexOf(a)!==-1,halfChecked:_.indexOf(a)!==-1,pos:String(d?d.pos:""),dragOver:y===a&&B===0,dragOverGapTop:y===a&&B===-1,dragOverGapBottom:y===a&&B===1};return n}function s(a){var A=a.data,o=a.expanded,i=a.selected,r=a.checked,t=a.loaded,E=a.loading,_=a.halfChecked,y=a.dragOver,B=a.dragOverGapTop,C=a.dragOverGapBottom,d=a.pos,n=a.active,l=Object(G.a)(Object(G.a)({},A),{},{expanded:o,selected:i,checked:r,loaded:t,loading:E,halfChecked:_,dragOver:y,dragOverGapTop:B,dragOverGapBottom:C,pos:d,active:n});return"props"in l||Object.defineProperty(l,"props",{get:function(){return Object(F.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),a}}),l}},"8HAY":function(ht,_e,j){"use strict";j.d(_e,"a",function(){return F}),j.d(_e,"b",function(){return O}),j.d(_e,"d",function(){return X}),j.d(_e,"e",function(){return P}),j.d(_e,"c",function(){return e});var se=j("MI8n"),G=j("pmY6"),D=j("3/fG"),V=function(R,m,v,u){function s(a){return a instanceof v?a:new v(function(A){A(a)})}return new(v||(v=Promise))(function(a,A){function o(t){try{r(u.next(t))}catch(E){A(E)}}function i(t){try{r(u.throw(t))}catch(E){A(E)}}function r(t){t.done?a(t.value):s(t.value).then(o,i)}r((u=u.apply(R,m||[])).next())})};class F extends G.a{constructor(R,m="",v="",u=!0,s){super();this._onDidChange=this._register(new se.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=R,this._label=m,this._cssClass=v,this._enabled=u,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(R){this._setLabel(R)}_setLabel(R){this._label!==R&&(this._label=R,this._onDidChange.fire({label:R}))}get tooltip(){return this._tooltip||""}set tooltip(R){this._setTooltip(R)}_setTooltip(R){this._tooltip!==R&&(this._tooltip=R,this._onDidChange.fire({tooltip:R}))}get class(){return this._cssClass}set class(R){this._setClass(R)}_setClass(R){this._cssClass!==R&&(this._cssClass=R,this._onDidChange.fire({class:R}))}get enabled(){return this._enabled}set enabled(R){this._setEnabled(R)}_setEnabled(R){this._enabled!==R&&(this._enabled=R,this._onDidChange.fire({enabled:R}))}get checked(){return this._checked}set checked(R){this._setChecked(R)}_setChecked(R){this._checked!==R&&(this._checked=R,this._onDidChange.fire({checked:R}))}run(R,m){return V(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(R))})}}class O extends G.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new se.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new se.b),this.onDidRun=this._onDidRun.event}run(R,m){return V(this,void 0,void 0,function*(){if(!R.enabled)return;this._onBeforeRun.fire({action:R});let v;try{yield this.runAction(R,m)}catch(u){v=u}this._onDidRun.fire({action:R,error:v})})}runAction(R,m){return V(this,void 0,void 0,function*(){yield R.run(m)})}}class X extends F{constructor(R){super(X.ID,R,R?"separator text":"separator");this.checked=!1,this.enabled=!1}}X.ID="vs.actions.separator";class P{constructor(R,m,v,u){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=R,this.label=m,this.class=u,this._actions=v}get actions(){return this._actions}dispose(){}run(){return V(this,void 0,void 0,function*(){})}}class e extends F{constructor(){super(e.ID,D.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(ht,_e,j){ht.exports={button:"button___1wy9m"}},"9Bee":function(ht,_e,j){"use strict";var se=j("DYRE"),G=j("zeV3"),D=j("+L6B"),V=j("2/Rp"),F=j("k1fw"),O=j("9og8"),X=j("tJVT"),P=j("WmNS"),e=j.n(P),R=j("q1tI"),m=j.n(R),v=j("vg9a"),u=j("DlQD"),s=j.n(u),a=j("rUJ1");function A(Q,p){var w=Q.match(/^(\s+)(?:```)/);if(w===null)return p;var H=w[1];return p.split(`
|
|
`).map(function(Z){var K=Z.match(/^\s+/);if(K===null)return Z;var ye=Object(X.a)(K,1),He=ye[0];return He.length>=H.length?Z.slice(H.length):Z}).join(`
|
|
`)}var o=[],i=["<ul>"],r=new s.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){o.length=0,i=["<ul>"]}var _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function y(Q,p,w,H){if(p>=Q.length||Q[p].level<=w)return p;var Z=Q[p];H.push("<li><a href='#"+Z.anchor+"'>"+Z.text+"</a>"),p++;var K=[];return p=y(Q,p,Z.level,K),K.length>0&&(H.push("<ul>"),K.forEach(function(ye){H.push(ye)}),H.push("</ul>")),H.push("</li>"),p=y(Q,p,w,H),p}function B(){return y(o,0,0,i),i.push("</ul>"),i.join("")}var C={heading:function(p){var w=t.exec(p);if(w)return{type:"heading",raw:w[0],depth:w[1].length,text:w[2]}},fences:function(p){var w=this.rules.block.fences.exec(p);if(w){var H=w[0],Z=A(H,w[3]||""),K=w[2]?w[2].trim():w[2];if(["latex","katex","math"].indexOf(K)>=0){var ye=l(),He=Z;Z=ye,c[ye]={type:"block",expression:He}}return{type:"code",raw:H,lang:K,text:Z}}}},d=/(?:\${2})([^\n`]+?)(?:\${2})/gi,n=0,l=function(){return"__special_katext_id_".concat(n++,"__")},c={};function b(){return c}function g(){n=0,c={}}function h(Q){return Q=Q.replace(d,function(p,w){var H=l();return c[H]={type:"inline",expression:w},H}),Q}var L=r.listitem;r.listitem=function(Q){return L(h(Q))};var N=r.paragraph;r.paragraph=function(Q){return N(h(Q))};var T=r.tablecell;r.tablecell=function(Q,p){return T(h(Q),p)},r.code=function(Q,p,w){var H=(p||"").match(/\S*/)[0];return H?["latex","katex","math"].indexOf(H)>=0?"<p class='editormd-tex'>".concat(Q,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(p,'">').concat(w?Q:Object(a.escape)(Q,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(w?Q:Object(a.escape)(Q,!0))+"</code></pre>"},r.heading=function(Q,p,w){var H=this.options.headerPrefix+w.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:H,level:p,text:Q}),"<h"+p+' id="'+H+'">'+Q+"</h"+p+">"},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:C,renderer:r});var M=s.a,W=j("SJMd"),U=j("ulZh"),Y=j.n(U),ne=j("m3rI"),me=j("Oy/b"),ge=j("p5ED"),Oe=j("ErOA");/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var Se=function(Q,p){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,H){w.__proto__=H}||function(w,H){for(var Z in H)Object.prototype.hasOwnProperty.call(H,Z)&&(w[Z]=H[Z])})(Q,p)};function Be(Q,p){function w(){this.constructor=Q}Se(Q,p),Q.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}function Ne(Q,p,w,H){return new(w||(w=Promise))(function(Z,K){function ye(ot){try{it(H.next(ot))}catch(Ve){K(Ve)}}function He(ot){try{it(H.throw(ot))}catch(Ve){K(Ve)}}function it(ot){var Ve;ot.done?Z(ot.value):(Ve=ot.value,Ve instanceof w?Ve:new w(function(_t){_t(Ve)})).then(ye,He)}it((H=H.apply(Q,p||[])).next())})}function ke(Q,p){var w,H,Z,K,ye={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return K={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(K[Symbol.iterator]=function(){return this}),K;function He(it){return function(ot){return function(Ve){if(w)throw new TypeError("Generator is already executing.");for(;ye;)try{if(w=1,H&&(Z=2&Ve[0]?H.return:Ve[0]?H.throw||((Z=H.return)&&Z.call(H),0):H.next)&&!(Z=Z.call(H,Ve[1])).done)return Z;switch(H=0,Z&&(Ve=[2&Ve[0],Z.value]),Ve[0]){case 0:case 1:Z=Ve;break;case 4:return ye.label++,{value:Ve[1],done:!1};case 5:ye.label++,H=Ve[1],Ve=[0];continue;case 7:Ve=ye.ops.pop(),ye.trys.pop();continue;default:if(!(Z=ye.trys,(Z=Z.length>0&&Z[Z.length-1])||Ve[0]!==6&&Ve[0]!==2)){ye=0;continue}if(Ve[0]===3&&(!Z||Ve[1]>Z[0]&&Ve[1]<Z[3])){ye.label=Ve[1];break}if(Ve[0]===6&&ye.label<Z[1]){ye.label=Z[1],Z=Ve;break}if(Z&&ye.label<Z[2]){ye.label=Z[2],ye.ops.push(Ve);break}Z[2]&&ye.ops.pop(),ye.trys.pop();continue}Ve=p.call(Q,ye)}catch(_t){Ve=[6,_t],H=0}finally{w=Z=0}if(5&Ve[0])throw Ve[1];return{value:Ve[0]?Ve[1]:void 0,done:!0}}([it,ot])}}}function Ce(){for(var Q=0,p=0,w=arguments.length;p<w;p++)Q+=arguments[p].length;var H=Array(Q),Z=0;for(p=0;p<w;p++)for(var K=arguments[p],ye=0,He=K.length;ye<He;ye++,Z++)H[Z]=K[ye];return H}var ve=function(){function Q(){}return Q.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Q.setAttributes=function(p,w){for(var H=0,Z=w;H<Z.length;H++){var K=Z[H],ye=K[0],He=K[1];p.setAttribute(ye,He)}},Q.createRect=function(p,w,H){var Z=document.createElementNS("http://www.w3.org/2000/svg","rect");return Z.setAttribute("width",p.toString()),Z.setAttribute("height",w.toString()),H&&Q.setAttributes(Z,H),Z},Q.createLine=function(p,w,H,Z,K){var ye=document.createElementNS("http://www.w3.org/2000/svg","line");return ye.setAttribute("x1",p.toString()),ye.setAttribute("y1",w.toString()),ye.setAttribute("x2",H.toString()),ye.setAttribute("y2",Z.toString()),K&&Q.setAttributes(ye,K),ye},Q.createPolygon=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","polygon");return H.setAttribute("points",p),w&&Q.setAttributes(H,w),H},Q.createCircle=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","circle");return H.setAttribute("cx",(p/2).toString()),H.setAttribute("cy",(p/2).toString()),H.setAttribute("r",p.toString()),w&&Q.setAttributes(H,w),H},Q.createEllipse=function(p,w,H){var Z=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Z.setAttribute("cx",(p/2).toString()),Z.setAttribute("cy",(w/2).toString()),Z.setAttribute("rx",(p/2).toString()),Z.setAttribute("ry",(w/2).toString()),H&&Q.setAttributes(Z,H),Z},Q.createGroup=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","g");return p&&Q.setAttributes(w,p),w},Q.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Q.createMarker=function(p,w,H,Z,K,ye,He){var it=document.createElementNS("http://www.w3.org/2000/svg","marker");return Q.setAttributes(it,[["id",p],["orient",w],["markerWidth",H.toString()],["markerHeight",Z.toString()],["refX",K.toString()],["refY",ye.toString()]]),it.appendChild(He),it},Q.createText=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","text");return w.setAttribute("x","0"),w.setAttribute("y","0"),p&&Q.setAttributes(w,p),w},Q.createTSpan=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","tspan");return H.textContent=p,w&&Q.setAttributes(H,w),H},Q.createImage=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","image");return p&&Q.setAttributes(w,p),w},Q.createPoint=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return H.x=p,H.y=w,H},Q.createPath=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","path");return H.setAttribute("d",p),w&&Q.setAttributes(H,w),H},Q}(),Xe=function(){function Q(){}return Q.addKey=function(p){Q.key=p},Object.defineProperty(Q,"isLicensed",{get:function(){return!!Q.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Q.key)},enumerable:!1,configurable:!0}),Q}(),lt=function(){function Q(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Q.prototype.rasterize=function(p,w,H){var Z=this;return new Promise(function(K){var ye=H!==void 0?H:document.createElement("canvas");p===null&&(Z.markersOnly=!0,Z.naturalSize=!1);var He=document.createElementNS("http://www.w3.org/2000/svg","svg");He.setAttribute("xmlns","http://www.w3.org/2000/svg"),He.setAttribute("width",w.width.baseVal.valueAsString),He.setAttribute("height",w.height.baseVal.valueAsString),He.setAttribute("viewBox","0 0 "+w.viewBox.baseVal.width.toString()+" "+w.viewBox.baseVal.height.toString()),He.innerHTML=w.innerHTML,Z.naturalSize===!0?(He.width.baseVal.value=p.naturalWidth,He.height.baseVal.value=p.naturalHeight):Z.width!==void 0&&Z.height!==void 0&&(He.width.baseVal.value=Z.width,He.height.baseVal.value=Z.height),ye.width=He.width.baseVal.value,ye.height=He.height.baseVal.value;var it=He.outerHTML,ot=ye.getContext("2d");Z.markersOnly!==!0&&ot.drawImage(p,0,0,ye.width,ye.height);var Ve=window.URL,_t=new Image(ye.width,ye.height);_t.setAttribute("crossOrigin","anonymous");var vt=new Blob([it],{type:"image/svg+xml"}),Tt=Ve.createObjectURL(vt);_t.onload=function(){ot.drawImage(_t,0,0),Ve.revokeObjectURL(Tt);var Pt=ye.toDataURL(Z.imageType,Z.imageQuality);K(Pt)},_t.src=Tt})},Q}(),at=function(){},je=function(){function Q(p){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+p+"_"}return Object.defineProperty(Q.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Q.prototype.addClass=function(p){return this.styleSheet===void 0&&this.addStyleSheet(),p.name=""+this.classNamePrefix+p.localName,this.classes.push(p),this.styleSheet.sheet.insertRule("."+p.name+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length),p},Q.prototype.addRule=function(p){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(p),this.styleSheet.sheet.insertRule(p.selector+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length)},Q.prototype.addStyleSheet=function(){var p;this.styleSheet=document.createElement("style"),((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).appendChild(this.styleSheet),this.addRule(new rt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new rt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new rt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new re("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new re("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Q.prototype.removeStyleSheet=function(){var p;this.styleSheet&&(((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Q}(),rt=function(Q,p){this.selector=Q,this.style=p},re=function(Q,p){this.localName=Q,this.style=p},J=function(){function Q(p,w,H,Z,K){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=p,this.displayMode=w,this.markerItems=H,this.uiStyleSettings=Z,this.styles=K,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Q.prototype.show=function(p){var w=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=p,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var H=document.createElement("div");H.className=this.toolbarBlockStyleClass.name,H.style.whiteSpace="nowrap",this.uiContainer.appendChild(H),this.addActionButton(H,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(H,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(H,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(H,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(H,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(H,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(H,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(H,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(K){var ye=document.createElement("div");ye.className=""+w.toolbarButtonStyleClass.name,ye.setAttribute("data-type-name",K.typeName),ye.innerHTML=K.icon,ye.addEventListener("click",function(){w.markerToolbarButtonClicked(ye,K)}),w.buttons.push(ye),w.markerButtons.push(ye)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Z=document.createElement("div");Z.className=this.toolbarBlockStyleClass.name,Z.style.whiteSpace="nowrap",Z.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Z),this.addActionButton(Z,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Z,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Q.prototype.addButtonClickListener=function(p){this.buttonClickListeners.push(p)},Q.prototype.removeButtonClickListener=function(p){this.buttonClickListeners.indexOf(p)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(p),1)},Q.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Q.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var p=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var w=0;w<this.markerButtons.length;w++)w<p||w===p&&this.markerButtons.length-1===p?this.markerButtonBlock.appendChild(this.markerButtons[w]):(w===p&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[w]))}},Q.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Q.prototype.resetButtonStyles=function(){var p=this;this.buttons.forEach(function(w){w.className=w.className.replace(p.uiStyleSettings.toolbarButtonStyleColorsClassName?p.uiStyleSettings.toolbarButtonStyleColorsClassName:p.toolbarButtonStyleColorsClass.name,"").trim(),w.className=w.className.replace(p.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?p.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:p.toolbarActiveButtonStyleColorsClass.name,"").trim(),w.className+=" "+(p.uiStyleSettings.toolbarButtonStyleColorsClassName?p.uiStyleSettings.toolbarButtonStyleColorsClassName:p.toolbarButtonStyleColorsClass.name)})},Q.prototype.addActionButton=function(p,w,H){var Z=this,K=document.createElement("div");switch(K.className=""+this.toolbarButtonStyleClass.name,K.innerHTML=w,K.setAttribute("data-action",H),K.addEventListener("click",function(){Z.actionToolbarButtonClicked(K,H)}),H){case"select":K.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":K.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":K.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":K.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":K.style.fill=this.uiStyleSettings.closeButtonColor}p.appendChild(K),this.buttons.push(K)},Q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new re("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new re("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new re("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new re("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new re("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var p=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new re("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*p)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*p)+`px;
|
|
padding: `+p+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new re("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new re("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new rt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new rt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},Q.prototype.markerToolbarButtonClicked=function(p,w){this.setActiveButton(p),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(H){return H("marker",w)}),this.markerButtonOverflowBlock.style.display="none"},Q.prototype.actionToolbarButtonClicked=function(p,w){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(H){return H("action",w)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Q.prototype.setActiveButton=function(p){this.resetButtonStyles(),p.className=p.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),p.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Q.prototype.setActiveMarkerButton=function(p){var w=this.markerButtons.find(function(H){return H.getAttribute("data-type-name")===p});w&&this.setActiveButton(w)},Q.prototype.setCurrentMarker=function(p){var w=this;this.currentMarker=p,this.buttons.filter(function(H){return/delete|notes/.test(H.getAttribute("data-action"))}).forEach(function(H){w.currentMarker===void 0?(H.style.fillOpacity="0.4",H.style.pointerEvents="none"):(H.style.fillOpacity="1",H.style.pointerEvents="all")})},Q}(),k=function(){function Q(p,w,H,Z){this.panels=[],this.panelButtons=[],this.markerjsContainer=p,this.displayMode=w,this.uiStyleSettings=H,this.styles=Z,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Q.prototype.addStyles=function(){var p;this.toolboxStyleClass=this.styles.addClass(new re("toolbox",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: sans-serif;
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new re("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var w=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new re("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new re("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new re("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new re("toolbox-panel-row_colors",`
|
|
background-color: `+((p=this.uiStyleSettings.toolboxBackgroundColor)!==null&&p!==void 0?p:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new re("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
|
|
padding: `+w+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new re("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new re("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new rt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new rt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},Q.prototype.show=function(p){var w;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=p,this.uiContainer.className=this.toolboxStyleClass.name+" "+((w=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&w!==void 0?w:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Q.prototype.setPanelButtons=function(p){var w,H,Z=this;this.panels=p,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((w=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&w!==void 0?w:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((H=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&H!==void 0?H:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(K){var ye;K.uiStyleSettings=Z.uiStyleSettings;var He=document.createElement("div");He.className=Z.toolboxButtonStyleClass.name+" "+((ye=Z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:Z.toolboxButtonStyleColorsClass.name),He.innerHTML=K.icon,He.title=K.title,He.addEventListener("click",function(){Z.panelButtonClick(K)}),Z.panelButtons.push(He),Z.buttonRow.appendChild(He)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Q.prototype.panelButtonClick=function(p){var w=this,H=-1;if(p!==this.activePanel){H=this.panels.indexOf(p),this.panelRow.innerHTML="";var Z=p.getUi();Z.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Z),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=p}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){w.displayMode==="inline"?w.panelRow.style.display="none":w.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(K,ye){var He,it;K.className=w.toolboxButtonStyleClass.name+" "+(ye===H?""+((He=w.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&He!==void 0?He:w.toolboxActiveButtonStyleColorsClass.name):""+((it=w.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&it!==void 0?it:w.toolboxButtonStyleColorsClass.name))})},Q}(),$=function(Q,p){this.title=Q,this.icon=p},q=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return ye.colors=[],ye.addTransparent=!1,ye.colorBoxes=[],ye.colors=H,ye.currentColor=Z,ye.setCurrentColor=ye.setCurrentColor.bind(ye),ye.getColorBox=ye.getColorBox.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.overflow="hidden",H.style.whiteSpace="nowrap",this.colors.forEach(function(Z){var K=w.getColorBox(Z);H.appendChild(K),w.colorBoxes.push(K)}),H},p.prototype.getColorBox=function(w){var H=this,Z=this.uiStyleSettings.toolbarHeight/4,K=this.uiStyleSettings.toolbarHeight-Z,ye=document.createElement("div");ye.style.display="inline-block",ye.style.boxSizing="content-box",ye.style.width=K-2+"px",ye.style.height=K-2+"px",ye.style.padding="1px",ye.style.marginRight="2px",ye.style.marginBottom="2px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderRadius=(K+2)/2+"px",ye.style.borderColor=w===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){H.setCurrentColor(w,ye)});var He=document.createElement("div");return He.style.display="inline-block",He.style.width=K-2+"px",He.style.height=K-2+"px",He.style.backgroundColor=w,He.style.borderRadius=K/2+"px",w==="transparent"&&(He.style.fill=this.uiStyleSettings.toolboxAccentColor,He.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),ye.appendChild(He),ye},p.prototype.setCurrentColor=function(w,H){var Z=this;this.currentColor=w,this.colorBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(w)},p}($),he=function(){function Q(p,w,H){this._state="new",this._isSelected=!1,this._container=p,this._overlayContainer=w,this.globalSettings=H,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Q.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Q.prototype.ownsTarget=function(p){return!1},Object.defineProperty(Q.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Q.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Q.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Q.prototype.pointerDown=function(p,w){},Q.prototype.dblClick=function(p,w){},Q.prototype.manipulate=function(p){},Q.prototype.pointerUp=function(p){this.stateChanged()},Q.prototype.dispose=function(){},Q.prototype.addMarkerVisualToContainer=function(p){this.container.childNodes.length>0?this.container.insertBefore(p,this.container.childNodes[0]):this.container.appendChild(p)},Q.prototype.getState=function(){return{typeName:Q.typeName,state:this.state,notes:this.notes}},Q.prototype.restoreState=function(p){this._state=p.state,this.notes=p.notes},Q.prototype.scale=function(p,w){},Q.prototype.colorChanged=function(p){this.onColorChanged&&this.onColorChanged(p),this.stateChanged()},Q.prototype.fillColorChanged=function(p){this.onFillColorChanged&&this.onFillColorChanged(p),this.stateChanged()},Q.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var p=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),p.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(p)&&this.onStateChanged(this)}},Q.typeName="MarkerBase",Q}(),de=function(){function Q(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Q.prototype.findGripByVisual=function(p){return this.topLeft.ownsTarget(p)?this.topLeft:this.topCenter.ownsTarget(p)?this.topCenter:this.topRight.ownsTarget(p)?this.topRight:this.centerLeft.ownsTarget(p)?this.centerLeft:this.centerRight.ownsTarget(p)?this.centerRight:this.bottomLeft.ownsTarget(p)?this.bottomLeft:this.bottomCenter.ownsTarget(p)?this.bottomCenter:this.bottomRight.ownsTarget(p)?this.bottomRight:void 0},Q}(),Qe=function(){function Q(){this.GRIP_SIZE=10,this.visual=ve.createGroup(),this.visual.appendChild(ve.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ve.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Q.prototype.ownsTarget=function(p){return p===this.visual||p===this.visual.childNodes[0]||p===this.visual.childNodes[1]},Q}(),ze=function(){function Q(){}return Q.toITransformMatrix=function(p){return{a:p.a,b:p.b,c:p.c,d:p.d,e:p.e,f:p.f}},Q.toSVGMatrix=function(p,w){return p.a=w.a,p.b=w.b,p.c=w.c,p.d=w.d,p.e=w.e,p.f=w.f,p},Q}(),Ge=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.left=0,K.top=0,K.width=0,K.height=0,K.defaultSize={x:50,y:20},K.offsetX=0,K.offsetY=0,K.rotationAngle=0,K.CB_DISTANCE=10,K._suppressMarkerCreateEvent=!1,K.container.transform.baseVal.appendItem(ve.createTransform()),K.setupControlBox(),K}return Be(p,Q),Object.defineProperty(p.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"visual",{get:function(){return this._visual},set:function(w){this._visual=w;var H=ve.createTransform();this._visual.transform.baseVal.appendItem(H)},enumerable:!1,configurable:!0}),p.prototype.ownsTarget=function(w){return!!Q.prototype.ownsTarget.call(this,w)||!!(this.controlGrips.findGripByVisual(w)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(w))},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="new"&&(this.left=w.x,this.top=w.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Z=this.unrotatePoint(w);if(this.manipulationStartX=Z.x,this.manipulationStartY=Z.y,this.offsetX=Z.x-this.left,this.offsetY=Z.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(H),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(H)){this.activeGrip=this.rotatorGrip;var K=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=K.x-this.width/2,this.top=K.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ye=this.container.transform.baseVal.getItem(0);ye.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ye,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},p.prototype.pointerUp=function(w){var H=this.state;Q.prototype.pointerUp.call(this,w),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(w),this._state="select",H==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},p.prototype.moveVisual=function(w){this.visual.style.transform="translate("+w.x+"px, "+w.y+"px)"},p.prototype.manipulate=function(w){var H=this.unrotatePoint(w);this.state==="creating"?this.resize(w):this.state==="move"?(this.left=this.manipulationStartLeft+(H.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(H.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(H):this.state==="rotate"&&this.rotate(w)},p.prototype.resize=function(w){var H=this.manipulationStartLeft,Z=this.manipulationStartWidth,K=this.manipulationStartTop,ye=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:H=this.manipulationStartLeft+w.x-this.manipulationStartX,Z=this.manipulationStartWidth+this.manipulationStartLeft-H;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Z=this.manipulationStartWidth+w.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:K=this.manipulationStartTop+w.y-this.manipulationStartY,ye=this.manipulationStartHeight+this.manipulationStartTop-K;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ye=this.manipulationStartHeight+w.y-this.manipulationStartY}Z>=0?(this.left=H,this.width=Z):(this.left=H+Z,this.width=-Z),ye>=0?(this.top=K,this.height=ye):(this.top=K+ye,this.height=-ye),this.setSize()},p.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},p.prototype.rotate=function(w){if(Math.abs(w.x-this.centerX)>.1){var H=Math.sign(w.x-this.centerX);this.rotationAngle=180*Math.atan((w.y-this.centerY)/(w.x-this.centerX))/Math.PI+90*H,this.applyRotation()}},p.prototype.applyRotation=function(){var w=this.container.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(w,0)},p.prototype.rotatePoint=function(w){if(this.rotationAngle===0)return w;var H=this.container.getCTM(),Z=ve.createPoint(w.x,w.y);return{x:(Z=Z.matrixTransform(H)).x,y:Z.y}},p.prototype.unrotatePoint=function(w){if(this.rotationAngle===0)return w;var H=this.container.getCTM();H=H.inverse();var Z=ve.createPoint(w.x,w.y);return{x:(Z=Z.matrixTransform(H)).x,y:Z.y}},p.prototype.select=function(){Q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},p.prototype.deselect=function(){Q.prototype.deselect.call(this),this.controlBox.style.display="none"},p.prototype.setupControlBox=function(){this.controlBox=ve.createGroup();var w=ve.createTransform();w.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(w),this.container.appendChild(this.controlBox),this.controlRect=ve.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ve.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new de,this.addControlGrips(),this.controlBox.style.display="none"},p.prototype.adjustControlBox=function(){var w=this.controlBox.transform.baseVal.getItem(0);w.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(w,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},p.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},p.prototype.createGrip=function(){var w=new Qe;return w.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(w.visual),w},p.prototype.positionGrips=function(){var w=this.controlGrips.topLeft.GRIP_SIZE,H=-w/2,Z=H,K=(this.width+this.CB_DISTANCE)/2-w/2,ye=(this.height+this.CB_DISTANCE)/2-w/2,He=this.height+this.CB_DISTANCE-w/2,it=this.width+this.CB_DISTANCE-w/2;this.positionGrip(this.controlGrips.topLeft.visual,H,Z),this.positionGrip(this.controlGrips.topCenter.visual,K,Z),this.positionGrip(this.controlGrips.topRight.visual,it,Z),this.positionGrip(this.controlGrips.centerLeft.visual,H,ye),this.positionGrip(this.controlGrips.centerRight.visual,it,ye),this.positionGrip(this.controlGrips.bottomLeft.visual,H,He),this.positionGrip(this.controlGrips.bottomCenter.visual,K,He),this.positionGrip(this.controlGrips.bottomRight.visual,it,He),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,K,Z-3*this.CB_DISTANCE)},p.prototype.positionGrip=function(w,H,Z){var K=w.transform.baseVal.getItem(0);K.setTranslate(H,Z),w.transform.baseVal.replaceItem(K,0)},p.prototype.hideControlBox=function(){this.controlBox.style.display="none"},p.prototype.showControlBox=function(){this.controlBox.style.display=""},p.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ze.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ze.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Q.prototype.getState.call(this))},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.left=H.left,this.top=H.top,this.width=H.width,this.height=H.height,this.rotationAngle=H.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ze.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,H.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ze.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,H.containerTransformMatrix))},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H);var Z=this.rotatePoint({x:this.left,y:this.top}),K=this.unrotatePoint({x:Z.x*w,y:Z.y*H});this.left=K.x,this.top=K.y,this.width=this.width*w,this.height=this.height*H,this.adjustControlBox()},p}(he),$e=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.fillColor="transparent",K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.opacity=1,K.setStrokeColor=K.setStrokeColor.bind(K),K.setFillColor=K.setFillColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.createVisual=K.createVisual.bind(K),K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual)},p.prototype.createVisual=function(){this.visual=ve.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},p.prototype.manipulate=function(w){Q.prototype.manipulate.call(this,w)},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),this.setSize()},p.prototype.setSize=function(){Q.prototype.setSize.call(this),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},p.prototype.pointerUp=function(w){Q.prototype.pointerUp.call(this,w),this.setSize()},p.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},p.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},p.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},p.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},p.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Q.prototype.getState.call(this))},p.prototype.restoreState=function(w){var H=w;this.fillColor=H.fillColor,this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.opacity=H.opacity,this.createVisual(),Q.prototype.restoreState.call(this,w),this.setSize()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.setSize()},p.title="Rectangle marker",p}(Ge),nt=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ye.widths=[],ye.widthBoxes=[],ye.widths=H,ye.currentWidth=Z,ye.setCurrentWidth=ye.setCurrentWidth.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",this.widths.forEach(function(Z){var K=document.createElement("div");K.style.display="flex",K.style.flexGrow="2",K.style.alignItems="center",K.style.justifyContent="space-between",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.borderColor=Z===w.currentWidth?w.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){w.setCurrentWidth(Z,K)}),H.appendChild(K);var ye=document.createElement("div");ye.innerText=Z.toString(),ye.style.marginRight="5px",K.appendChild(ye);var He=document.createElement("div");He.style.minHeight="20px",He.style.flexGrow="2",He.style.display="flex",He.style.alignItems="center";var it=document.createElement("hr");it.style.minWidth="20px",it.style.border="0px",it.style.borderTop=Z+"px solid "+w.uiStyleSettings.toolboxColor,it.style.flexGrow="2",He.appendChild(it),K.appendChild(He),w.widthBoxes.push(K)}),H},p.prototype.setCurrentWidth=function(w,H){var Z=this;this.currentWidth=w,this.widthBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},p}($),dt=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return ye.styles=[],ye.styleBoxes=[],ye.styles=H,ye.currentStyle=Z,ye.setCurrentStyle=ye.setCurrentStyle.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",this.styles.forEach(function(Z){var K=document.createElement("div");K.style.display="flex",K.style.alignItems="center",K.style.justifyContent="space-between",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.overflow="hidden",K.style.maxWidth=100/w.styles.length-5+"%",K.style.borderColor=Z===w.currentStyle?w.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){w.setCurrentStyle(Z,K)}),H.appendChild(K);var ye=document.createElement("div");ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.overflow="hidden";var He=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+w.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Z!==""?'stroke-dasharray="'+Z+'"':"")+` />
|
|
</svg>`;ye.innerHTML=He,K.appendChild(ye),w.styleBoxes.push(K)}),H},p.prototype.setCurrentStyle=function(w,H){var Z=this;this.currentStyle=w,this.styleBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},p}($),xe=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.strokeColor=Z.defaultColor,K.strokeWidth=Z.defaultStrokeWidth,K.strokeDasharray=Z.defaultStrokeDasharray,K.strokePanel=new q("Line color",Z.defaultColorSet,Z.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.strokeWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new dt("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K}return Be(p,Q),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.typeName="FrameMarker",p.title="Frame marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',p}($e),Ue=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},Ke=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.x1=0,K.y1=0,K.x2=0,K.y2=0,K.defaultLength=50,K.manipulationStartX=0,K.manipulationStartY=0,K.manipulationStartX1=0,K.manipulationStartY1=0,K.manipulationStartX2=0,K.manipulationStartY2=0,K.setupControlBox(),K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!!Q.prototype.ownsTarget.call(this,w)||!(!this.grip1.ownsTarget(w)&&!this.grip2.ownsTarget(w))},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.manipulationStartX=w.x,this.manipulationStartY=w.y,this.state==="new"&&(this.x1=w.x,this.y1=w.y,this.x2=w.x,this.y2=w.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(H)?this.activeGrip=this.grip1:this.grip2.ownsTarget(H)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},p.prototype.pointerUp=function(w){var H=this.state;Q.prototype.pointerUp.call(this,w),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(w),this._state="select",H==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},p.prototype.adjustVisual=function(){},p.prototype.manipulate=function(w){this.state==="creating"?this.resize(w):this.state==="move"?(this.x1=this.manipulationStartX1+w.x-this.manipulationStartX,this.y1=this.manipulationStartY1+w.y-this.manipulationStartY,this.x2=this.manipulationStartX2+w.x-this.manipulationStartX,this.y2=this.manipulationStartY2+w.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(w)},p.prototype.resize=function(w){switch(this.activeGrip){case this.grip1:this.x1=w.x,this.y1=w.y;break;case this.grip2:case void 0:this.x2=w.x,this.y2=w.y}this.adjustVisual(),this.adjustControlBox()},p.prototype.select=function(){Q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},p.prototype.deselect=function(){Q.prototype.deselect.call(this),this.controlBox.style.display="none"},p.prototype.setupControlBox=function(){this.controlBox=ve.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},p.prototype.adjustControlBox=function(){this.positionGrips()},p.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},p.prototype.createGrip=function(){var w=new Qe;return w.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(w.visual),w},p.prototype.positionGrips=function(){var w=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-w/2,this.y1-w/2),this.positionGrip(this.grip2.visual,this.x2-w/2,this.y2-w/2)},p.prototype.positionGrip=function(w,H,Z){var K=w.transform.baseVal.getItem(0);K.setTranslate(H,Z),w.transform.baseVal.replaceItem(K,0)},p.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Q.prototype.getState.call(this))},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.x1=H.x1,this.y1=H.y1,this.x2=H.x2,this.y2=H.y2},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.x1=this.x1*w,this.y1=this.y1*H,this.x2=this.x2*w,this.y2=this.y2*H,this.adjustVisual(),this.adjustControlBox()},p}(he),We=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.setStrokeColor=K.setStrokeColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.strokeColor=Z.defaultColor,K.strokeWidth=Z.defaultStrokeWidth,K.strokeDasharray=Z.defaultStrokeDasharray,K.strokePanel=new q("Line color",Z.defaultColorSet,Z.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.strokeWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new dt("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorLine&&w!==this.visibleLine)},p.prototype.createVisual=function(){this.visual=ve.createGroup(),this.selectorLine=ve.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ve.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},p.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ve.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ve.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ve.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},p.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},p.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},p.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.createVisual(),this.adjustVisual()},p.typeName="LineMarker",p.title="Line marker",p.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',p}(Ke),Le=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return ye.fonts=[],ye.fontBoxes=[],ye.fonts=H,ye.currentFont=Z,ye.setCurrentFont=ye.setCurrentFont.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.overflow="hidden",H.style.flexGrow="2",this.fonts.forEach(function(Z){var K=document.createElement("div");K.style.display="inline-block",K.style.alignItems="center",K.style.justifyContent="space-between",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.overflow="hidden",K.style.maxWidth=100/w.fonts.length-5+"%",K.style.borderColor=Z===w.currentFont?w.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){w.setCurrentFont(Z,K)}),H.appendChild(K);var ye=document.createElement("div");ye.style.display="flex",ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.fontFamily=Z,ye.style.overflow="hidden";var He=document.createElement("div");He.style.whiteSpace="nowrap",He.style.overflow="hidden",He.style.textOverflow="ellipsis",He.innerHTML="The quick brown fox jumps over the lazy dog",ye.appendChild(He),K.appendChild(ye),w.fontBoxes.push(K)}),H},p.prototype.setCurrentFont=function(w,H){var Z=this;this.currentFont=w,this.fontBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},p}($),Fe=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.color="transparent",K.padding=5,K.DEFAULT_TEXT="your text here",K.text=K.DEFAULT_TEXT,K.isMoved=!1,K.color=Z.defaultColor,K.fontFamily=Z.defaultFontFamily,K.defaultSize={x:100,y:30},K.setColor=K.setColor.bind(K),K.setFont=K.setFont.bind(K),K.renderText=K.renderText.bind(K),K.sizeText=K.sizeText.bind(K),K.textEditDivClicked=K.textEditDivClicked.bind(K),K.showTextEditor=K.showTextEditor.bind(K),K.setSize=K.setSize.bind(K),K.positionTextEditor=K.positionTextEditor.bind(K),K.colorPanel=new q("Color",Z.defaultColorSet,Z.defaultColor),K.colorPanel.onColorChanged=K.setColor,K.fontFamilyPanel=new Le("Font",Z.defaultFontFamilies,Z.defaultFontFamily),K.fontFamilyPanel.onFontChanged=K.setFont,K}return Be(p,Q),p.prototype.ownsTarget=function(w){if(Q.prototype.ownsTarget.call(this,w)||w===this.visual||w===this.textElement||w===this.bgRectangle)return!0;var H=!1;return this.textElement.childNodes.forEach(function(Z){Z===w&&(H=!0)}),H},p.prototype.createVisual=function(){this.visual=ve.createGroup(),this.bgRectangle=ve.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ve.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ve.createTransform()),this.textElement.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.isMoved=!1,this.pointerDownPoint=w,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},p.prototype.renderText=function(){var w=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(H){w.textElement.appendChild(ve.createTSpan(H.trim()===""?" ":H.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},p.prototype.getTextScale=function(){var w=this.textElement.getBBox(),H=1;if(w.width>0&&w.height>0){var Z=(1*this.width-this.width*this.padding*2/100)/w.width,K=(1*this.height-this.height*this.padding*2/100)/w.height;H=Math.min(Z,K)}return H},p.prototype.getTextPosition=function(w){var H=this.textElement.getBBox(),Z=0,K=0;return H.width>0&&H.height>0&&(Z=(this.width-H.width*w)/2,K=this.height/2-H.height*w/2),{x:Z,y:K}},p.prototype.sizeText=function(){var w=this.textElement.getBBox(),H=this.getTextScale(),Z=this.getTextPosition(H);Z.y-=w.y*H,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Z.x+"px, "+Z.y+"px) scale("+H+", "+H+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Z.x,Z.y),this.textElement.transform.baseVal.getItem(1).setScale(H,H))},p.prototype.manipulate=function(w){Q.prototype.manipulate.call(this,w),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(w.x-this.pointerDownPoint.x)>5||Math.abs(w.y-this.pointerDownPoint.y)>5)},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),this.isMoved=!0,this.setSize(),this.sizeText()},p.prototype.setSize=function(){Q.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},p.prototype.pointerUp=function(w){var H=this.state;H==="creating"&&(this._suppressMarkerCreateEvent=!0),Q.prototype.pointerUp.call(this,w),this.setSize(),(H==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},p.prototype.showTextEditor=function(){var w=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(H){H.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var H=Number.parseFloat(w.textEditor.style.fontSize);w.textEditor.clientWidth>=Number.parseInt(w.textEditor.style.maxWidth)&&H>.9;)H-=.1,w.textEditor.style.fontSize=Math.max(H,.9)+"em"}),this.textEditor.addEventListener("keyup",function(H){H.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(H){if(H.clipboardData){var Z=H.clipboardData.getData("text"),K=window.getSelection();if(!K.rangeCount)return!1;K.deleteFromDocument(),K.getRangeAt(0).insertNode(document.createTextNode(Z)),H.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){w.textEditDivClicked(w.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},p.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var w=this.getTextScale(),H=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Z=this.textElement.getBBox(),K={x:Z.width*w,y:Z.height*w};H.x-=K.x/2,H.y-=K.y/2,this.textEditor.style.top=H.y+"px",this.textEditor.style.left=H.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-H.x+"px",this.textEditor.style.fontSize=Math.max(16*w,12)+"px",this.textElement.style.display="none"}},p.prototype.textEditDivClicked=function(w){this.text=w.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},p.prototype.select=function(){Q.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},p.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Q.prototype.deselect.call(this)},p.prototype.dblClick=function(w,H){Q.prototype.dblClick.call(this,w,H),this.showTextEditor()},p.prototype.setColor=function(w){this.textElement&&ve.setAttributes(this.textElement,[["fill",w]]),this.color=w,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(w)},p.prototype.setFont=function(w){this.textElement&&ve.setAttributes(this.textElement,[["font-family",w]]),this.fontFamily=w,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},p.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},p.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){var H=w;this.color=H.color,this.fontFamily=H.fontFamily,this.padding=H.padding,this.text=H.text,this.createVisual(),Q.prototype.restoreState.call(this,w),this.setSize()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.setSize(),this.sizeText(),this.positionTextEditor()},p.typeName="TextMarker",p.title="Text marker",p.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',p}(Ge),we=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.color="transparent",K.lineWidth=3,K.drawing=!1,K.pixelRatio=1,K.color=Z.defaultColor,K.lineWidth=Z.defaultStrokeWidth,K.pixelRatio=Z.freehandPixelRatio,K.setColor=K.setColor.bind(K),K.addCanvas=K.addCanvas.bind(K),K.finishCreation=K.finishCreation.bind(K),K.setLineWidth=K.setLineWidth.bind(K),K.colorPanel=new q("Color",Z.defaultColorSet,Z.defaultColor),K.colorPanel.onColorChanged=K.setColor,K.lineWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.lineWidthPanel.onWidthChanged=K.setLineWidth,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.drawingImage)},p.prototype.createVisual=function(){this.visual=ve.createGroup(),this.drawingImage=ve.createImage(),this.visual.appendChild(this.drawingImage);var w=ve.createTransform();this.visual.transform.baseVal.appendItem(w),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(w,H){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(w.x,w.y),this.drawing=!0):Q.prototype.pointerDown.call(this,w,H)},p.prototype.manipulate=function(w){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(w.x,w.y),this.canvasContext.stroke()):Q.prototype.manipulate.call(this,w)},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},p.prototype.pointerUp=function(w){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Q.prototype.pointerUp.call(this,w)},p.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},p.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Q.prototype.select.call(this)},p.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Q.prototype.deselect.call(this)},p.prototype.finishCreation=function(){for(var w=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),H=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Z=H[0],K=H[1],ye=H[2],He=H[3],it=!1,ot=0;ot<this.canvasElement.height;ot++)for(var Ve=0;Ve<this.canvasElement.width;Ve++)w.data[ot*this.canvasElement.width*4+4*Ve+3]>0&&(it=!0,ot<K&&(K=ot),Ve<Z&&(Z=Ve),ot>He&&(He=ot),Ve>ye&&(ye=Ve));if(it){this.left=Z/this.pixelRatio,this.top=K/this.pixelRatio,this.width=(ye-Z)/this.pixelRatio,this.height=(He-K)/this.pixelRatio;var _t=document.createElement("canvas");_t.width=ye-Z,_t.height=He-K,_t.getContext("2d").putImageData(this.canvasContext.getImageData(Z,K,ye-Z,He-K),0,0),this.drawingImgUrl=_t.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},p.prototype.setDrawingImage=function(){ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},p.prototype.setColor=function(w){this.color=w,this.colorChanged(w)},p.prototype.setLineWidth=function(w){this.lineWidth=w},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({drawingImgUrl:this.drawingImgUrl},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){this.createVisual(),Q.prototype.restoreState.call(this,w),this.drawingImgUrl=w.drawingImgUrl,this.setDrawingImage()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.setDrawingImage()},p.typeName="FreehandMarker",p.title="Freehand marker",p.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',p}(Ge),ue=function(Q){function p(w,H,Z){var K=Q.call(this,w,Z||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return K.typeBoxes=[],K.currentType=H,K.setCurrentType=K.setCurrentType.bind(K),K}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2";for(var Z=function(He){var it="both";switch(He){case 0:it="both";break;case 1:it="start";break;case 2:it="end";break;case 3:it="none"}var ot=document.createElement("div");if(ot.style.display="flex",ot.style.flexGrow="2",ot.style.alignItems="center",ot.style.justifyContent="space-between",ot.style.padding="5px",ot.style.borderWidth="2px",ot.style.borderStyle="solid",ot.style.borderColor=it===K.currentType?K.uiStyleSettings.toolboxAccentColor:"transparent",ot.addEventListener("click",function(){w.setCurrentType(it,ot)}),H.appendChild(ot),it==="both"||it==="start"){var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.alignItems="center",Ve.style.minHeight="20px",Ve.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ve.style.marginLeft="5px",ot.appendChild(Ve)}var _t=document.createElement("div");_t.style.display="flex",_t.style.alignItems="center",_t.style.minHeight="20px",_t.style.flexGrow="2";var vt=document.createElement("hr");if(vt.style.minWidth="20px",vt.style.border="0px",vt.style.borderTop="3px solid "+(K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxColor:"#eeeeee"),vt.style.flexGrow="2",_t.appendChild(vt),ot.appendChild(_t),it==="both"||it==="end"){var Tt=document.createElement("div");Tt.style.display="flex",Tt.style.alignItems="center",Tt.style.minHeight="20px",Tt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Tt.style.marginRight="5px",ot.appendChild(Tt)}K.typeBoxes.push(ot)},K=this,ye=0;ye<4;ye++)Z(ye);return H},p.prototype.setCurrentType=function(w,H){var Z=this;this.currentType=w,this.typeBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},p}($),ce=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.arrowType="end",K.arrowBaseHeight=10,K.arrowBaseWidth=10,K.getArrowPoints=K.getArrowPoints.bind(K),K.setArrowType=K.setArrowType.bind(K),K.arrowTypePanel=new ue("Arrow type","end"),K.arrowTypePanel.onArrowTypeChanged=K.setArrowType,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.arrow1&&w!==this.arrow2)},p.prototype.getArrowPoints=function(w,H){var Z=this.arrowBaseWidth+2*this.strokeWidth,K=this.arrowBaseHeight+2*this.strokeWidth;return w-Z/2+","+(H+K/2)+" "+w+","+(H-K/2)+" "+(w+Z/2)+","+(H+K/2)},p.prototype.createTips=function(){this.arrow1=ve.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ve.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.arrow2)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="creating"&&this.createTips()},p.prototype.adjustVisual=function(){if(Q.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ve.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ve.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var w=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.arrow1.transform.baseVal.getItem(0);H.setRotate(w,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(H,0);var Z=this.arrow2.transform.baseVal.getItem(0);Z.setRotate(w+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Z,0)}},p.prototype.setArrowType=function(w){this.arrowType=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({arrowType:this.arrowType},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.arrowType=H.arrowType,this.createTips(),this.adjustVisual()},p.typeName="ArrowMarker",p.title="Arrow marker",p.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',p}(We),te=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.fillColor=Z.defaultFillColor,K.strokeWidth=0,K.fillPanel=new q("Color",Z.defaultColorSet,Z.defaultFillColor),K.fillPanel.onColorChanged=K.setFillColor,K}return Be(p,Q),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.typeName="CoverMarker",p.title="Cover marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',p}($e),ie=function(Q){function p(w,H,Z,K){var ye=Q.call(this,w,K||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return ye.opacities=[],ye.opacityBoxes=[],ye.opacities=H,ye.currentOpacity=Z,ye.setCurrentOpacity=ye.setCurrentOpacity.bind(ye),ye}return Be(p,Q),p.prototype.getUi=function(){var w=this,H=document.createElement("div");return H.style.display="flex",H.style.overflow="hidden",H.style.flexGrow="2",H.style.justifyContent="space-between",this.opacities.forEach(function(Z){var K=document.createElement("div");K.style.display="flex",K.style.alignItems="center",K.style.justifyContent="center",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.borderColor=Z===w.currentOpacity?w.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){w.setCurrentOpacity(Z,K)}),H.appendChild(K);var ye=document.createElement("div");ye.innerText=100*Z+"%",K.appendChild(ye),w.opacityBoxes.push(K)}),H},p.prototype.setCurrentOpacity=function(w,H){var Z=this;this.currentOpacity=w,this.opacityBoxes.forEach(function(K){K.style.borderColor=K===H?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},p}($),le=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.setOpacity=K.setOpacity.bind(K),K.fillColor=Z.defaultHighlightColor,K.strokeWidth=0,K.opacity=Z.defaultHighlightOpacity,K.fillPanel=new q("Color",Z.defaultColorSet,K.fillColor),K.fillPanel.onColorChanged=K.setFillColor,K.opacityPanel=new ie("Opacity",Z.defaultOpacitySteps,K.opacity),K.opacityPanel.onOpacityChanged=K.setOpacity,K}return Be(p,Q),p.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.typeName="HighlightMarker",p.title="Highlight marker",p.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',p}(te),pe='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Ie=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.bgColor="transparent",K.tipPosition={x:0,y:0},K.tipBase1Position={x:0,y:0},K.tipBase2Position={x:0,y:0},K.tipMoving=!1,K.color=Z.defaultStrokeColor,K.bgColor=Z.defaultFillColor,K.fontFamily=Z.defaultFontFamily,K.defaultSize={x:100,y:30},K.setBgColor=K.setBgColor.bind(K),K.getTipPoints=K.getTipPoints.bind(K),K.positionTip=K.positionTip.bind(K),K.setTipPoints=K.setTipPoints.bind(K),K.colorPanel=new q("Text color",Z.defaultColorSet,K.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),K.colorPanel.onColorChanged=K.setColor,K.bgColorPanel=new q("Fill color",Z.defaultColorSet,K.bgColor,pe),K.bgColorPanel.onColorChanged=K.setBgColor,K.fontFamilyPanel=new Le("Font",Z.defaultFontFamilies,Z.defaultFontFamily),K.fontFamilyPanel.onFontChanged=K.setFont,K.tipGrip=new Qe,K.tipGrip.visual.transform.baseVal.appendItem(ve.createTransform()),K.controlBox.appendChild(K.tipGrip.visual),K}return Be(p,Q),p.prototype.ownsTarget=function(w){return Q.prototype.ownsTarget.call(this,w)||this.tipGrip.ownsTarget(w)||this.tip===w},p.prototype.createTip=function(){ve.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ve.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},p.prototype.pointerDown=function(w,H){this.state==="new"&&Q.prototype.pointerDown.call(this,w,H),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(H)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Q.prototype.pointerDown.call(this,w,H)},p.prototype.pointerUp=function(w){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Q.prototype.pointerUp.call(this,w);else{var H=this.state==="creating";Q.prototype.pointerUp.call(this,w),this.setTipPoints(H),this.positionTip()}},p.prototype.manipulate=function(w){if(this.tipMoving){var H=this.unrotatePoint(w);this.tipPosition={x:H.x-this.manipulationStartLeft,y:H.y-this.manipulationStartTop},this.positionTip()}else Q.prototype.manipulate.call(this,w)},p.prototype.setBgColor=function(w){this.bgRectangle&&this.tip&&(ve.setAttributes(this.bgRectangle,[["fill",w]]),ve.setAttributes(this.tip,[["fill",w]])),this.bgColor=w,this.fillColorChanged(w)},p.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},p.prototype.setTipPoints=function(w){w===void 0&&(w=!1);var H=Math.min(this.height/2,15),Z=this.height/5;w&&(this.tipPosition={x:H+Z/2,y:this.height+20});var K=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?K<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:H,y:0},this.tipBase2Position={x:H+Z,y:0}):(this.tipBase1Position={x:0,y:H},this.tipBase2Position={x:0,y:H+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?K<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-H-Z,y:0},this.tipBase2Position={x:this.width-H,y:0}):(this.tipBase1Position={x:this.width,y:H},this.tipBase2Position={x:this.width,y:H+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?K<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-H-Z,y:this.height},this.tipBase2Position={x:this.width-H,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-H-Z},this.tipBase2Position={x:this.width,y:this.height-H}):K<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,H=Math.min(this.width/2,15),this.tipBase1Position={x:H,y:this.height},this.tipBase2Position={x:H+Z,y:this.height}):(this.tipBase1Position={x:0,y:this.height-H},this.tipBase2Position={x:0,y:this.height-H-Z})},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),this.positionTip()},p.prototype.positionTip=function(){ve.setAttributes(this.tip,[["points",this.getTipPoints()]]);var w=this.tipGrip.visual.transform.baseVal.getItem(0);w.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(w,0)},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),p.prototype.select=function(){this.positionTip(),Q.prototype.select.call(this)},p.prototype.getState=function(){var w=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){var H=w;this.bgColor=H.bgColor,this.tipPosition=H.tipPosition,Q.prototype.restoreState.call(this,w),this.createTip(),this.setTipPoints()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.tipPosition={x:this.tipPosition.x*w,y:this.tipPosition.y*H},this.positionTip()},p.typeName="CalloutMarker",p.title="Callout marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',p}(Fe),Pe=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.fillColor="transparent",K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.opacity=1,K.strokeColor=Z.defaultColor,K.strokeWidth=Z.defaultStrokeWidth,K.strokeDasharray=Z.defaultStrokeDasharray,K.fillColor=Z.defaultFillColor,K.setStrokeColor=K.setStrokeColor.bind(K),K.setFillColor=K.setFillColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.setOpacity=K.setOpacity.bind(K),K.createVisual=K.createVisual.bind(K),K.strokePanel=new q("Line color",Ce(Z.defaultColorSet,["transparent"]),Z.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.fillPanel=new q("Fill color",Ce(Z.defaultColorSet,["transparent"]),K.fillColor,pe),K.fillPanel.onColorChanged=K.setFillColor,K.strokeWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new dt("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K.opacityPanel=new ie("Opacity",Z.defaultOpacitySteps,K.opacity),K.opacityPanel.onOpacityChanged=K.setOpacity,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual)},p.prototype.createVisual=function(){this.visual=ve.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},p.prototype.manipulate=function(w){Q.prototype.manipulate.call(this,w)},p.prototype.resize=function(w){Q.prototype.resize.call(this,w),this.setSize()},p.prototype.setSize=function(){Q.prototype.setSize.call(this),ve.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},p.prototype.pointerUp=function(w){Q.prototype.pointerUp.call(this,w),this.setSize()},p.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},p.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(w),this.stateChanged()},p.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},p.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},p.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){var H=w;this.fillColor=H.fillColor,this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.opacity=H.opacity,this.createVisual(),Q.prototype.restoreState.call(this,w),this.setSize()},p.prototype.scale=function(w,H){Q.prototype.scale.call(this,w,H),this.setSize()},p.typeName="EllipseMarker",p.title="Ellipse marker",p.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',p}(Ge),qe=function(Q){function p(w,H,Z){return Q.call(this,w,H,Z)||this}return Be(p,Q),Object.defineProperty(p.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.tip1&&w!==this.tip2)},p.prototype.createTips=function(){this.tip1=ve.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ve.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ve.createTransform()),this.visual.appendChild(this.tip2)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.state==="creating"&&this.createTips()},p.prototype.adjustVisual=function(){if(Q.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ve.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ve.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var w=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),H=this.tip1.transform.baseVal.getItem(0);H.setRotate(w,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(H,0);var Z=this.tip2.transform.baseVal.getItem(0);Z.setRotate(w+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Z,0)}},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w),this.createTips(),this.adjustVisual()},p.typeName="MeasurementMarker",p.title="Measurement marker",p.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',p}(We),ft=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.strokePanel.colors=Z.defaultColorSet,K.fillColor="transparent",K}return Be(p,Q),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Q.prototype.getState.call(this);return w.typeName=p.typeName,w},p.typeName="EllipseFrameMarker",p.title="Ellipse frame marker",p.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',p}(Pe),ut=function(){function Q(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Q.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Q.prototype.addUndoStep=function(p){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(p)||(this.undoStack.push(p),JSON.stringify(this.lastRedoStep)!==JSON.stringify(p)&&this.redoStack.splice(0,this.redoStack.length))},Q.prototype.replaceLastUndoStep=function(p){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=p)},Q.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Q.prototype.undo=function(){if(this.undoStack.length>1){var p=this.undoStack.pop();return p!==void 0&&this.redoStack.push(p),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Q.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Q}(),st=function(Q){function p(w,H,Z){var K=Q.call(this,w,H,Z)||this;return K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.curveX=0,K.curveY=0,K.manipulationStartCurveX=0,K.manipulationStartCurveY=0,K.setStrokeColor=K.setStrokeColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.positionGrips=K.positionGrips.bind(K),K.addControlGrips=K.addControlGrips.bind(K),K.adjustVisual=K.adjustVisual.bind(K),K.setupControlBox=K.setupControlBox.bind(K),K.resize=K.resize.bind(K),K.strokeColor=Z.defaultColor,K.strokeWidth=Z.defaultStrokeWidth,K.strokeDasharray=Z.defaultStrokeDasharray,K.strokePanel=new q("Line color",Z.defaultColorSet,Z.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.strokeWidthPanel=new nt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new dt("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K}return Be(p,Q),p.prototype.ownsTarget=function(w){return!(!Q.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorCurve&&w!==this.visibleCurve&&!this.curveGrip.ownsTarget(w))},p.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},p.prototype.createVisual=function(){this.visual=ve.createGroup(),this.selectorCurve=ve.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ve.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(w,H){Q.prototype.pointerDown.call(this,w,H),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=w.x,this.curveY=w.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(H)&&(this.activeGrip=this.curveGrip,this._state="resize")},p.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ve.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ve.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ve.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},p.prototype.setupControlBox=function(){Q.prototype.setupControlBox.call(this),this.curveControlLine1=ve.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ve.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},p.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Q.prototype.addControlGrips.call(this)},p.prototype.positionGrips=function(){Q.prototype.positionGrips.call(this);var w=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-w/2,this.curveY-w/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},p.prototype.manipulate=function(w){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+w.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+w.y-this.manipulationStartY),Q.prototype.manipulate.call(this,w)},p.prototype.resize=function(w){this.activeGrip===this.curveGrip&&(this.curveX=w.x,this.curveY=w.y),Q.prototype.resize.call(this,w),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},p.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},p.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},p.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual()},p.prototype.scale=function(w,H){this.curveX=this.curveX*w,this.curveY=this.curveY*H,Q.prototype.scale.call(this,w,H)},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Q.prototype.getState.call(this));return w.typeName=p.typeName,w},p.prototype.restoreState=function(w){Q.prototype.restoreState.call(this,w);var H=w;this.strokeColor=H.strokeColor,this.strokeWidth=H.strokeWidth,this.strokeDasharray=H.strokeDasharray,this.curveX=H.curveX,this.curveY=H.curveY,this.createVisual(),this.adjustVisual()},p.typeName="CurveMarker",p.title="Curve marker",p.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',p}(Ke),Lt=function(){function Q(p,w){w===void 0&&(w=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=p,this.cancelable=w}return Object.defineProperty(Q.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Q.prototype.preventDefault=function(){this._defaultPrevented=!0},Q}(),mt=function(Q){function p(w,H,Z){var K=Q.call(this,w,!1)||this;return K.dataUrl=H,K.state=Z,K}return Be(p,Q),p}(Lt),tt=function(Q){function p(w,H,Z){Z===void 0&&(Z=!1);var K=Q.call(this,w,Z)||this;return K.marker=H,K}return Be(p,Q),p}(Lt),er=function(){function Q(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Q.prototype.addEventListener=function(p,w){this[p].push(w)},Q.prototype.removeEventListener=function(p,w){var H=this[p].indexOf(w);H>-1&&this[p].splice(H,1)},Q}(),Jt=function(){function Q(p){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ue,this._isOpen=!1,this.undoRedoManager=new ut,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new er,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Q.instanceCounter++,this.styles=new je(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=p,this.targetRoot=document.body,this.width=p.clientWidth,this.height=p.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Q.prototype,"ALL_MARKER_TYPES",{get:function(){return[xe,we,ce,Fe,ft,Pe,le,Ie,qe,te,We,st]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[xe,we,ce,Fe,Pe,le,Ie]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"BASIC_MARKER_TYPES",{get:function(){return[xe,we,ce,Fe,le]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(p){var w=this;this._availableMarkerTypes.splice(0),p.forEach(function(H){if(typeof H=="string"){var Z=w.ALL_MARKER_TYPES.find(function(K){return K.typeName===H});Z!==void 0&&w._availableMarkerTypes.push(Z)}else w._availableMarkerTypes.push(H)})},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(p){this._zoomLevel=p,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Q.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Xe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Q.prototype.show=function(){var p=this;this.styles.styleSheetRoot===void 0&&at.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=at.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(w){return w(new Lt(p))})},Q.prototype.render=function(){return Ne(this,void 0,void 0,function(){var p;return ke(this,function(w){switch(w.label){case 0:return this.setCurrentMarker(),(p=new lt).naturalSize=this.renderAtNaturalSize,p.imageType=this.renderImageType,p.imageQuality=this.renderImageQuality,p.markersOnly=this.renderMarkersOnly,p.width=this.renderWidth,p.height=this.renderHeight,[4,p.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return w.sent(),[4,p.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,w.sent()]}})})},Q.prototype.close=function(p){var w=this;if(p===void 0&&(p=!1),this.isOpen){var H=!1;p||this.eventListeners.beforeclose.forEach(function(Z){var K=new Lt(w,!0);Z(K),K.defaultPrevented&&(H=!0)}),H||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Z){return Z(new Lt(w))}),this.detachEvents(),this._isOpen=!1)}},Q.prototype.addMarkersToToolbar=function(){for(var p,w=[],H=0;H<arguments.length;H++)w[H]=arguments[H];(p=this._availableMarkerTypes).push.apply(p,w)},Q.prototype.addRenderEventListener=function(p){this.addEventListener("render",function(w){p(w.dataUrl,w.state)})},Q.prototype.removeRenderEventListener=function(p){},Q.prototype.addCloseEventListener=function(p){this.addEventListener("close",function(){p()})},Q.prototype.removeCloseEventListener=function(p){},Q.prototype.setupResizeObserver=function(){var p=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){p.resize(p.target.clientWidth,p.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return p.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Q.prototype.onPopupTargetResize=function(){var p=1*this.target.clientWidth/this.target.clientHeight,w=this.editorCanvas.clientWidth/p>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*p:this.editorCanvas.clientWidth,H=w<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/p;this.resize(w,H)},Q.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Q.prototype.resize=function(p,w){this._isResizing=!0;var H=p/this.imageWidth,Z=w/this.imageHeight;this.imageWidth=Math.round(p),this.imageHeight=Math.round(w),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(H,Z),this._isResizing=!1},Q.prototype.scaleMarkers=function(p,w){var H,Z=this;this._currentMarker&&this._currentMarker instanceof Fe?this._currentMarker.scale(p,w):(H=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(K){K!==Z._currentMarker&&K.scale(p,w)}),H!==void 0&&this.setCurrentMarker(H)},Q.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Q.prototype.setTopLeft=function(){var p=this.editingTarget.getBoundingClientRect(),w=this.editorCanvas.getBoundingClientRect();this.left=p.left-w.left,this.top=p.top-w.top},Q.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Q.prototype.addDefs=function(){for(var p,w=[],H=0;H<arguments.length;H++)w[H]=arguments[H];this.defs=ve.createDefs(),this.addDefsToImage(),(p=this.defs).append.apply(p,w)},Q.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Q.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Q.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Q.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Q.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Q.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Q.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Q.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var p=document.createElement("a");p.href="https://markerjs.com/",p.target="_blank",p.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',p.title="Powered by marker.js",p.style.display="grid",p.style.alignItems="center",p.style.justifyItems="center",p.style.padding="3px",p.style.width="20px",p.style.height="20px",this.logoUI.appendChild(p),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Q.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Q.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Q.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var p=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=p+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new J(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new k(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Q.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Q.prototype.removeMarker=function(p){this.markerImage.removeChild(p.container),this.markers.indexOf(p)>-1&&this.markers.splice(this.markers.indexOf(p),1),p.dispose()},Q.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Q.prototype.toolbarButtonClicked=function(p,w){if(p==="marker"&&w!==void 0)this.createNewMarker(w);else if(p==="action")switch(w){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Q.prototype.deleteSelectedMarker=function(){var p=this;if(this._currentMarker!==void 0){var w=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Z){var K=new tt(p,p._currentMarker,!0);Z(K),K.defaultPrevented&&(w=!0)}),!w){var H=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Z){return Z(new tt(p,H))})}}},Q.prototype.clear=function(){var p=this,w=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ye){var He=new tt(p,void 0,!0);ye(He),He.defaultPrevented&&(w=!0)}),!w)){this.setCurrentMarker();for(var H=function(ye){var He=Z.markers[ye];Z.setCurrentMarker(Z.markers[ye]),Z._currentMarker.dispose(),Z.markerImage.removeChild(Z._currentMarker.container),Z.markers.splice(Z.markers.indexOf(Z._currentMarker),1),Z.eventListeners.markerdelete.forEach(function(it){return it(new tt(p,He))})},Z=this,K=this.markers.length-1;K>=0;K--)H(K);this.addUndoStep()}},Object.defineProperty(Q.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Q.prototype.showNotesEditor=function(){var p;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(p=this._currentMarker.notes)!==null&&p!==void 0?p:"",this.overlayContainer.appendChild(this.notesArea))},Q.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Q.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Q.prototype.addUndoStep=function(){var p=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var w=this.getState(),H=this.undoRedoManager.getLastUndoStep();if(!H||H.width===w.width&&H.height===w.height){var Z=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(w),Z<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(K){return K(new Lt(p))})}else this.undoRedoManager.replaceLastUndoStep(w),this.eventListeners.statechange.forEach(function(K){return K(new Lt(p))})}},Q.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Q.prototype.undoStep=function(){var p=this,w=this.undoRedoManager.undo();w!==void 0&&(this.restoreState(w),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(H){return H(new Lt(p))}))},Q.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Q.prototype.redoStep=function(){var p=this,w=this.undoRedoManager.redo();w!==void 0&&(this.restoreState(w),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(H){return H(new Lt(p))}))},Q.prototype.stepZoom=function(){var p=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=p<this.zoomSteps.length-1?this.zoomSteps[p+1]:this.zoomSteps[0]},Q.prototype.panTo=function(p){this.contentDiv.scrollBy({left:this.prevPanPoint.x-p.x,top:this.prevPanPoint.y-p.y}),this.prevPanPoint=p},Q.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,function(){var p,w,H=this;return ke(this,function(Z){switch(Z.label){case 0:return[4,this.render()];case 1:return p=Z.sent(),w=this.getState(),this.eventListeners.render.forEach(function(K){return K(new mt(H,p,w))}),this.close(!0),[2]}})})},Q.prototype.getState=function(p){p===!0&&this.setCurrentMarker();var w={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(H){return w.markers.push(H.getState())}),w},Q.prototype.restoreState=function(p){var w=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);p.markers.forEach(function(H){var Z=w._availableMarkerTypes.find(function(ye){return ye.typeName===H.typeName});if(Z!==void 0){var K=w.addNewMarker(Z);K.restoreState(H),w.markers.push(K)}}),p.width&&p.height&&(p.width!==this.imageWidth||p.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/p.width,this.imageHeight/p.height),this.eventListeners.restorestate.forEach(function(H){return H(new Lt(w))})},Q.prototype.addNewMarker=function(p){var w=ve.createGroup();return this.markerImage.appendChild(w),new p(w,this.overlayContainer,this.settings)},Q.prototype.createNewMarker=function(p){var w,H=this;(w=typeof p=="string"?this._availableMarkerTypes.find(function(Z){return Z.typeName===p}):p)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(w),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(w.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Z){return Z(new tt(H,H._currentMarker))}))},Q.prototype.markerCreated=function(p){var w=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(p),this.setCurrentMarker(p),p instanceof we&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(we):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(H){return H(new tt(w,w._currentMarker))})},Q.prototype.colorChanged=function(p){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=p,this.settings.defaultStrokeColor=p)},Q.prototype.fillColorChanged=function(p){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=p)},Q.prototype.markerStateChanged=function(p){var w=this;this.eventListeners.markerchange.forEach(function(H){return H(new tt(w,p))})},Q.prototype.setCurrentMarker=function(p){var w=this;this._currentMarker!==p&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(H){return H(new tt(w,w._currentMarker))})),this._currentMarker=p,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(H){return H(new tt(w,w._currentMarker))}))},Q.prototype.onPointerDown=function(p){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||p.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var w=this.markers.find(function(H){return H.ownsTarget(p.target)});w!==void 0?(this.setCurrentMarker(w),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(p.clientX,p.clientY),p.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:p.clientX,y:p.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(p.clientX,p.clientY))},Q.prototype.onDblClick=function(p){if(this._isFocused||this.focus(),this.mode==="select"){var w=this.markers.find(function(H){return H.ownsTarget(p.target)});w!==void 0&&w!==this._currentMarker&&this.setCurrentMarker(w),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(p.clientX,p.clientY),p.target):this.setCurrentMarker()}},Q.prototype.onPointerMove=function(p){this.touchPoints!==1&&p.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||p.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(p.clientX,p.clientY)):this.zoomLevel>1&&this.panTo({x:p.clientX,y:p.clientY}))},Q.prototype.onPointerUp=function(p){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(p.clientX,p.clientY)),this.isDragging=!1,this.addUndoStep()},Q.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Q.prototype.onKeyUp=function(p){this._currentMarker===void 0||this.notesArea!==void 0||p.key!=="Delete"&&p.key!=="Backspace"||this.deleteSelectedMarker()},Q.prototype.clientToLocalCoordinates=function(p,w){var H=this.markerImage.getBoundingClientRect();return{x:(p-H.left)/this.zoomLevel,y:(w-H.top)/this.zoomLevel}},Q.prototype.onWindowResize=function(){this.positionUI()},Q.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var p=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=p+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Q.prototype.addLicenseKey=function(p){Xe.addKey(p)},Q.prototype.addEventListener=function(p,w){this.eventListeners.addEventListener(p,w)},Q.prototype.removeEventListener=function(p,w){this.eventListeners.removeEventListener(p,w)},Q.prototype.renderState=function(p){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(p),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Q.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Q.prototype.focus=function(){var p=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(w){return w(new Lt(p))}))},Q.prototype.blur=function(){var p=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(w){return w(new Lt(p))}))},Q.instanceCounter=0,Q}();/* **********************************
|
|
cropro version 1.2.0
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
copyright Alan Mendelevich
|
|
see README and LICENSE for details
|
|
********************************** *//*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var Ot=function(Q,p){return(Ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,H){w.__proto__=H}||function(w,H){for(var Z in H)Object.prototype.hasOwnProperty.call(H,Z)&&(w[Z]=H[Z])})(Q,p)};function yt(Q,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function w(){this.constructor=Q}Ot(Q,p),Q.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}function Et(Q,p,w,H){return new(w||(w=Promise))(function(Z,K){function ye(ot){try{it(H.next(ot))}catch(Ve){K(Ve)}}function He(ot){try{it(H.throw(ot))}catch(Ve){K(Ve)}}function it(ot){var Ve;ot.done?Z(ot.value):(Ve=ot.value,Ve instanceof w?Ve:new w(function(_t){_t(Ve)})).then(ye,He)}it((H=H.apply(Q,p||[])).next())})}function wt(Q,p){var w,H,Z,K,ye={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return K={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(K[Symbol.iterator]=function(){return this}),K;function He(it){return function(ot){return function(Ve){if(w)throw new TypeError("Generator is already executing.");for(;ye;)try{if(w=1,H&&(Z=2&Ve[0]?H.return:Ve[0]?H.throw||((Z=H.return)&&Z.call(H),0):H.next)&&!(Z=Z.call(H,Ve[1])).done)return Z;switch(H=0,Z&&(Ve=[2&Ve[0],Z.value]),Ve[0]){case 0:case 1:Z=Ve;break;case 4:return ye.label++,{value:Ve[1],done:!1};case 5:ye.label++,H=Ve[1],Ve=[0];continue;case 7:Ve=ye.ops.pop(),ye.trys.pop();continue;default:if(!(Z=ye.trys,(Z=Z.length>0&&Z[Z.length-1])||Ve[0]!==6&&Ve[0]!==2)){ye=0;continue}if(Ve[0]===3&&(!Z||Ve[1]>Z[0]&&Ve[1]<Z[3])){ye.label=Ve[1];break}if(Ve[0]===6&&ye.label<Z[1]){ye.label=Z[1],Z=Ve;break}if(Z&&ye.label<Z[2]){ye.label=Z[2],ye.ops.push(Ve);break}Z[2]&&ye.ops.pop(),ye.trys.pop();continue}Ve=p.call(Q,ye)}catch(_t){Ve=[6,_t],H=0}finally{w=Z=0}if(5&Ve[0])throw Ve[1];return{value:Ve[0]?Ve[1]:void 0,done:!0}}([it,ot])}}}var Mt=function(){function Q(){}return Q.addKey=function(p){Q.key=p},Object.defineProperty(Q,"isLicensed",{get:function(){return!!Q.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Q.key)},enumerable:!1,configurable:!0}),Q}(),ct=function(){function Q(){}return Q.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Q.setAttributes=function(p,w){for(var H=0,Z=w;H<Z.length;H++){var K=Z[H],ye=K[0],He=K[1];p.setAttribute(ye,He)}},Q.createRect=function(p,w,H){var Z=document.createElementNS("http://www.w3.org/2000/svg","rect");return Z.setAttribute("width",p.toString()),Z.setAttribute("height",w.toString()),H&&Q.setAttributes(Z,H),Z},Q.createLine=function(p,w,H,Z,K){var ye=document.createElementNS("http://www.w3.org/2000/svg","line");return ye.setAttribute("x1",p.toString()),ye.setAttribute("y1",w.toString()),ye.setAttribute("x2",H.toString()),ye.setAttribute("y2",Z.toString()),K&&Q.setAttributes(ye,K),ye},Q.createPolygon=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","polygon");return H.setAttribute("points",p),w&&Q.setAttributes(H,w),H},Q.createCircle=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","circle");return H.setAttribute("cx",(p/2).toString()),H.setAttribute("cy",(p/2).toString()),H.setAttribute("r",p.toString()),w&&Q.setAttributes(H,w),H},Q.createEllipse=function(p,w,H){var Z=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Z.setAttribute("cx",(p/2).toString()),Z.setAttribute("cy",(w/2).toString()),Z.setAttribute("rx",(p/2).toString()),Z.setAttribute("ry",(w/2).toString()),H&&Q.setAttributes(Z,H),Z},Q.createGroup=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","g");return p&&Q.setAttributes(w,p),w},Q.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Q.createMarker=function(p,w,H,Z,K,ye,He){var it=document.createElementNS("http://www.w3.org/2000/svg","marker");return Q.setAttributes(it,[["id",p],["orient",w],["markerWidth",H.toString()],["markerHeight",Z.toString()],["refX",K.toString()],["refY",ye.toString()]]),it.appendChild(He),it},Q.createText=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","text");return w.setAttribute("x","0"),w.setAttribute("y","0"),p&&Q.setAttributes(w,p),w},Q.createTSpan=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","tspan");return H.textContent=p,w&&Q.setAttributes(H,w),H},Q.createImage=function(p){var w=document.createElementNS("http://www.w3.org/2000/svg","image");return p&&Q.setAttributes(w,p),w},Q.createPoint=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return H.x=p,H.y=w,H},Q.createPath=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg","path");return H.setAttribute("d",p),w&&Q.setAttributes(H,w),H},Q.createElement=function(p,w){var H=document.createElementNS("http://www.w3.org/2000/svg",p);return w&&Q.setAttributes(H,w),H},Q.getHollowRectanglePath=function(p,w,H,Z,K,ye,He,it){return"M"+p+","+w+"V"+(w+Z)+"H"+(p+H)+"V"+w+"H"+K+"V"+ye+"H"+(K+He)+"V"+(ye+it)+"H"+K+"V"+w+"Z"},Q}(),lr=function(){function Q(p){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+p+"_"}return Object.defineProperty(Q.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),Q.prototype.addClass=function(p){return this.styleSheet===void 0&&this.addStyleSheet(),p.name=""+this.classNamePrefix+p.localName,this.classes.push(p),this.styleSheet.sheet.insertRule("."+p.name+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length),p},Q.prototype.addRule=function(p){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(p),this.styleSheet.sheet.insertRule(p.selector+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length)},Q.prototype.addStyleSheet=function(){var p;this.styleSheet=document.createElement("style"),((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).appendChild(this.styleSheet),this.addRule(new At("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new At("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new At("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new gt("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new gt("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Q.prototype.removeStyleSheet=function(){var p;this.styleSheet&&(((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Q}(),At=function(Q,p){this.selector=Q,this.style=p},gt=function(Q,p){this.localName=Q,this.style=p},Nt=function(){function Q(){this.blocks=[],this.display=""}return Q.prototype.addButtonBlock=function(p){p.className=this.blockClassName,p.buttonClassName=this.buttonClassName,p.buttonColorsClassName=this.buttonColorsClassName,p.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(p)},Q.prototype.addElementBlock=function(p){p.className===void 0&&(p.className=this.blockClassName),this.blocks.push(p)},Q.prototype.getUI=function(){var p=document.createElement("div");return p.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,p.style.display=this.display,this.blocks.forEach(function(w){return p.appendChild(w.getUI())}),p},Q}(),ir=function(){function Q(){}return Q.prototype.getUI=function(){var p=document.createElement("div");if(p.className=this.className,this.minWidth!==void 0&&(p.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":p.style.justifyContent="flex-start";break;case"center":p.style.justifyContent="center";break;case"end":p.style.justifyContent="flex-end"}return p.style.whiteSpace="nowrap",p},Q}(),yr=function(Q){function p(){var w=Q!==null&&Q.apply(this,arguments)||this;return w.buttons=[],w}return yt(p,Q),p.prototype.addButton=function(w){w.className=this.buttonClassName,w.colorsClassName=this.buttonColorsClassName,w.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(w)},p.prototype.getUI=function(){var w=Q.prototype.getUI.call(this);return this.buttons.forEach(function(H){return w.appendChild(H.getUI())}),w},p}(ir),br=function(){function Q(p,w){this._isActive=!1,this._isHidden=!1,this._icon=p,this.title=w,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(Q.prototype,"icon",{get:function(){return this._icon},set:function(p){this._icon=p,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isActive",{get:function(){return this._isActive},set:function(p){this._isActive=p,this.adjustClassName()},enumerable:!1,configurable:!0}),Q.prototype.getUI=function(){var p=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return p.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},Q.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},Q.prototype.hide=function(){this._isHidden=!0},Q}(),Rr=function(Q){function p(){var w=Q!==null&&Q.apply(this,arguments)||this;return w.elements=[],w}return yt(p,Q),p.prototype.addElement=function(w){this.elements.push(w)},p.prototype.getUI=function(){var w=Q.prototype.getUI.call(this);return this.elements.forEach(function(H){return w.appendChild(H)}),w},p}(ir),Dr=function(){function Q(p,w){this.horizontal=p,this.vertical=w}return Object.defineProperty(Q.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),Q.prototype.getVerticalLength=function(p){return p/this.ratio},Q.prototype.getHorizontalLength=function(p){return p*this.ratio},Q}(),Ht=function(){function Q(){}return Q.getIcon=function(p,w){if(p>0&&w>0){var H=new Dr(p,w),Z=H.ratio>=1?20:H.getHorizontalLength(20),K=H.ratio<1?20:H.getVerticalLength(20),ye=document.createElementNS("http://www.w3.org/2000/svg","svg");ye.setAttribute("xmlns","http://www.w3.org/2000/svg"),ye.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ye);var He=ct.createDefs();ye.appendChild(He);var it=ct.createElement("clipPath",[["id","text-bg-clip"]]);He.appendChild(it);var ot=ct.createPath(ct.getHollowRectanglePath((24-Z)/2,(24-K)/2,Z,K,(24-Z)/2+2,(24-K)/2+2,Z-4,K-4));ye.appendChild(ot);var Ve=ct.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ve.appendChild(ct.createTSpan(p+":"+w)),ye.appendChild(Ve);var _t=Ve.getBBox();ct.setAttributes(Ve,[["x",((24-_t.width)/2).toString()],["y",((24-_t.height)/2-_t.y).toString()]]);var vt=ct.createPath(ct.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(_t.width))/2,(24-Math.ceil(_t.height))/2,Math.ceil(_t.width),Math.ceil(_t.height)));return it.appendChild(vt),ct.setAttributes(ot,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ye),ye.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},Q}(),pr=function(Q){function p(w,H,Z){var K=Q.call(this,w,H)||this;return K.isDropdownOpen=!1,K.onClick=K.dropdownButtonClicked,K.dropdownButtons=Z,K}return yt(p,Q),p.prototype.setupDropdown=function(){var w=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(H){H.className=w.className,H.colorsClassName=w.colorsClassName,w.dropdownBlock.appendChild(H.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},p.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},p.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},p.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},p.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},p.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},p}(br),Lr=function(){function Q(p,w){this.GRIP_SIZE=10,this.color=p,this.fillColor=w,this.visual=ct.createGroup(),this.visual.appendChild(ct.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ct.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Q.prototype.ownsTarget=function(p){return p===this.visual||p===this.visual.childNodes[0]||p===this.visual.childNodes[1]},Q.prototype.setCenter=function(p,w){this.visual.childNodes.forEach(function(H){return ct.setAttributes(H,[["cx",p.toString()],["cy",w.toString()]])})},Q}(),Cr=function(){function Q(p,w,H,Z){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=p,this.canvasHeight=w,this.margin=H,this.container=Z,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(Q.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(p){this._aspectRatio=p,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(p){this._isGridVisible=p,this.gridContainer&&ct.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(p){this._zoomFactor=p,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Q.prototype.open=function(){var p=this;this.cropShadeElement=ct.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ct.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var w=0;w<this.numberOfGridLines;w++)this.horizontalGridLines.push(ct.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(ct.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(H){return p.gridContainer.appendChild(H)}),this.verticalGridLines.forEach(function(H){return p.gridContainer.appendChild(H)}),this.cropRectElement=ct.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Lr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Lr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Lr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Lr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},Q.prototype.setCropRectangle=function(p){this.cropRect=p;var w=Object.assign({},this.cropRect);this.zoomFactor!==1&&(w.width=this.cropRect.width*this.zoomFactor,w.height=this.cropRect.height*this.zoomFactor,w.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-w.width/2,w.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-w.height/2),ct.setAttributes(this.cropRectElement,[["x",w.x.toString()],["y",w.y.toString()],["width",w.width.toString()],["height",w.height.toString()]]);var H=w.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(K,ye){var He=w.y+H*(ye+1);ct.setAttributes(K,[["x1",""+w.x],["y1",""+He],["x2",""+(w.x+w.width)],["y2",""+He]])});var Z=w.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(K,ye){var He=w.x+Z*(ye+1);ct.setAttributes(K,[["x1",""+He],["y1",""+w.y],["x2",""+He],["y2",""+(w.y+w.height)]])}),ct.setAttributes(this.cropShadeElement,[["d",ct.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,w.x,w.y,w.width,w.height)]]),this.topLeftGrip.setCenter(w.x,w.y),this.topRightGrip.setCenter(w.x+w.width,w.y),this.bottomLeftGrip.setCenter(w.x,w.y+w.height),this.bottomRightGrip.setCenter(w.x+w.width,w.y+w.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},Q.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},Q.prototype.clientToLocalCoordinates=function(p,w){var H=this.container.getBoundingClientRect();return{x:p-H.left+this.margin,y:w-H.top+this.margin}},Q.prototype.onPointerDown=function(p){this.container.setPointerCapture(p.pointerId),this.previousPoint=this.clientToLocalCoordinates(p.clientX,p.clientY),this.cropRectElement===p.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(p.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(p.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(p.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(p.target)&&(this.activeGrip=this.bottomRightGrip)},Q.prototype.onPointerMove=function(p){if(this.isMoving)this.move(this.clientToLocalCoordinates(p.clientX,p.clientY));else if(this.activeGrip){var w=this.clientToLocalCoordinates(p.clientX,p.clientY);this.resize(w)}p.preventDefault()},Q.prototype.onPointerUp=function(p){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(p.pointerId)},Q.prototype.move=function(p){var w=p.x-this.previousPoint.x,H=p.y-this.previousPoint.y;this.zoomFactor!==1&&(w=-w/this.zoomFactor,H=-H/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+w),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+H),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=p},Q.prototype.resize=function(p){var w=Object.assign({},this.cropRect),H=p.x-this.previousPoint.x,Z=p.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:w.x+H<this.margin&&(H=this.margin-w.x),w.x+=H,w.width=this.cropRect.x+this.cropRect.width-w.x;break;case this.bottomRightGrip:case this.topRightGrip:w.width+H>this.canvasWidth*this.zoomFactor&&(H=this.canvasWidth*this.zoomFactor-w.width),w.width+=H}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(w.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(H),w.height=this.aspectRatio.getVerticalLength(w.width)):(w.y+=Z,w.height=this.cropRect.y+this.cropRect.height-w.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?w.height=this.aspectRatio.getVerticalLength(w.width):w.height+=Z}w.width<10&&(w.x=this.cropRect.x,w.width=10),w.height<10&&(w.y=this.cropRect.y,w.height=10),this.previousPoint=p,w.x>=this.margin&&w.y>=this.margin&&w.x-this.margin+w.width<=this.canvasWidth&&w.y-this.margin+w.height<=this.canvasHeight&&(this.cropRect=w,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},Q.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var p=this.cropRect.x+this.cropRect.width/2,w=this.cropRect.y+this.cropRect.height/2,H=this.aspectRatio.getHorizontalLength(this.cropRect.height),Z=this.aspectRatio.getVerticalLength(this.cropRect.width);H/this.canvasWidth<Z/this.canvasHeight?this.cropRect.width=H:this.cropRect.height=Z,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=p-this.cropRect.width/2,this.cropRect.y=w-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},Q.prototype.getRescaledRect=function(p,w,H,Z,K,ye){var He=H/p,it=Z/w;return{x:(K.x-ye)*He+ye,y:(K.y-ye)*it+ye,width:K.width*He,height:K.height*it}},Q.prototype.scaleCanvas=function(p,w){var H=this.getRescaledRect(this.canvasWidth,this.canvasHeight,p,w,this.cropRect,this.margin);this.canvasWidth=p,this.canvasHeight=w,this.onCropChange&&this.onCropChange(H),this.setCropRectangle(H)},Q}(),Qr=function(){function Q(p){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=p,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(Q.prototype,"angle",{get:function(){return this._angle},set:function(p){this._angle=p,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),Q.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},Q.prototype.onPointerDown=function(p){this.controlContainer.setPointerCapture(p.pointerId),this.isDragging=!0,this.previousPoint={x:p.clientX,y:p.clientY}},Q.prototype.onPointerMove=function(p){this.isDragging&&(this.onAngleChange&&this.onAngleChange((p.clientX-this.previousPoint.x)/5),this.previousPoint.x=p.clientX)},Q.prototype.onPointerUp=function(p){this.isDragging&&this.onAngleChange&&this.onAngleChange((p.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(p.pointerId)},Q.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var p=this.angleLabelText.getBBox();ct.setAttributes(this.angleLabelElement,[["x",((this.width-p.width)/2).toString()],["y",(this.height/2).toString()]])}},Q.prototype.positionScaleShape=function(){if(this.scaleShape){var p=this.scaleShape.transform.baseVal.getItem(0);p.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(p,0)}},Q.prototype.getVisual=function(){var p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("xmlns","http://www.w3.org/2000/svg"),p.setAttribute("width",this.width+"px"),p.setAttribute("height",this.height+"px"),p.setAttribute("viewBox","0 0 "+this.width+" "+this.height),p.style.flexShrink="0",document.body.appendChild(p);for(var w="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,H=1;H<=this.width/5+10;H++){var Z=H%5==0?this.height/3:this.height/6;w+="h4v"+-Z+"h1v"+Z}w+="v1H0Z",this.scaleShape=ct.createPath(w);var K=ct.createTransform();this.scaleShape.transform.baseVal.appendItem(K),p.appendChild(this.scaleShape),this.angleLabelElement=ct.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ct.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ye=ct.createTSpan("");return ye.innerHTML="°",this.angleLabelElement.appendChild(ye),p.appendChild(this.angleLabelElement),document.body.removeChild(p),p},Q}(),Ur=function(){function Q(){this.naturalSize=!1,this.imageType="image/png"}return Q.prototype.rasterize=function(p,w,H,Z,K,ye,He){var it=this;return new Promise(function(ot){var Ve=document.createElement("canvas");Ve.width=p.width.baseVal.value-2*Z,Ve.height=p.height.baseVal.value-2*Z;var _t=1,vt=1;it.naturalSize===!0?(_t=w.naturalWidth/(p.width.baseVal.value-2*Z)/ye,vt=w.naturalHeight/(p.height.baseVal.value-2*Z)/He,Ve.width=w.naturalWidth/ye,Ve.height=w.naturalHeight/He):it.width!==void 0&&it.height!==void 0&&(_t=it.width/H.width,vt=it.height/H.height,Ve.width*=_t,Ve.height*=vt);var Tt=Ve.getContext("2d");Tt.translate(Ve.width/2,Ve.height/2),Tt.rotate(K*Math.PI/180),Tt.scale(ye,He),Tt.translate(-Ve.width/2,-Ve.height/2),Tt.drawImage(w,0,0,Ve.width,Ve.height);var Pt=document.createElement("canvas");Pt.width=H.width*_t,Pt.height=H.height*vt,Pt.getContext("2d").putImageData(Tt.getImageData((H.x-Z)*_t,(H.y-Z)*vt,H.width*_t,H.height*vt),0,0),ot(Pt.toDataURL(it.imageType,it.imageQuality))})},Q}(),ae=function(){function Q(p){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=Q.instanceCounter++,this.styles=new lr(this.instanceNo),this.target=p,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(Q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(p){this._zoomToCropEnabled=p,p?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(p){this._isGridVisible=p,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"gridLines",{get:function(){return this._gridLines},set:function(p){this._gridLines=p,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(p){this._rotationAngle=p,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"aspectRatio",{get:function(){var p;return(p=this._aspectRatio)!==null&&p!==void 0?p:this.aspectRatios[0]},set:function(p){this._aspectRatio=p},enumerable:!1,configurable:!0}),Q.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},Q.prototype.show=function(){this.showUI(),this.open()},Q.prototype.close=function(p){p===void 0&&(p=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),p||this.closeEventListeners.forEach(function(w){return w()}),this._isOpen=!1)},Q.prototype.addRenderEventListener=function(p){this.renderEventListeners.push(p)},Q.prototype.removeRenderEventListener=function(p){this.renderEventListeners.indexOf(p)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(p),1)},Q.prototype.addCloseEventListener=function(p){this.closeEventListeners.push(p)},Q.prototype.removeCloseEventListener=function(p){this.closeEventListeners.indexOf(p)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(p),1)},Q.prototype.setupResizeObserver=function(){var p=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){p.resize(p.target.clientWidth,p.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},Q.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var p=1*this.target.clientWidth/this.target.clientHeight,w=this.contentDiv.clientWidth/p>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*p:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,H=w+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/p;this.resize(w,H)}},Q.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Q.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",ct.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},Q.prototype.resize=function(p,w){this.imageWidth=Math.round(p),this.imageHeight=Math.round(w),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},Q.prototype.setEditingTarget=function(){var p=document.createElement("canvas");p.width=this.target.naturalWidth,p.height=this.target.naturalHeight,p.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var w=p.toDataURL();ct.setAttributes(this.editingTarget,[["href",w]]),this.setEditingTargetSize()},Q.prototype.setTopLeft=function(){var p=this.target.getBoundingClientRect(),w=this.editorCanvas.getBoundingClientRect();this.left=p.left-w.left-this.CANVAS_MARGIN,this.top=p.top-w.top-this.CANVAS_MARGIN},Q.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=ct.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=ct.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=ct.createGroup(),this.editingTargetRotationScaleContainer=ct.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var p=ct.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(p);var w=ct.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(w),this.editingTargetContainer=ct.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},Q.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},Q.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=ct.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Cr(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},Q.prototype.zoomToCrop=function(){if(this.cropRect){var p=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,w=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=p+"px "+w+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-p+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-w+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},Q.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},Q.prototype.cropRectChanged=function(p){this.cropRect=p,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},Q.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},Q.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Q.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var p=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,w=this.target.offsetTop>p+this.CANVAS_MARGIN?this.target.offsetTop-(p+this.CANVAS_MARGIN):0;this.coverDiv.style.top=w+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},Q.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},Q.prototype.addTopToolbar=function(){var p=this;this.topToolbar=new Nt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var w=new yr;w.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(w);var H=[];this.aspectRatios.forEach(function(vt){var Tt=new br(Ht.getIcon(vt.horizontal,vt.vertical),vt.horizontal===0&&vt.vertical===0?"FREE":vt.horizontal+":"+vt.vertical);Tt.onClick=function(){return p.ratioButtonClicked(vt)},H.push(Tt)}),this.aspectRatioButton=new pr(Ht.getIcon(0,0),"Aspect ratio",H),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,w.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Z=new br('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");Z.isActive=this.isGridVisible,Z.onClick=function(){p.isGridVisible=!p.isGridVisible,Z.isActive=p.isGridVisible},w.addButton(Z);var K=new br('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(K.isActive=this.zoomToCropEnabled,K.onClick=function(){p.zoomToCropEnabled=!p.zoomToCropEnabled,K.isActive=p.zoomToCropEnabled},w.addButton(K),!Mt.isLicensed){var ye=new Rr;this.topToolbar.addElementBlock(ye);var He=document.createElement("div");He.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var it=document.createElement("a");it.style.color="currentColor",it.href="https://markerjs.com/products/cropro",it.target="_blank",it.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',He.appendChild(it),ye.addElement(He)}var ot=new yr;ot.minWidth=3*this.toolbarHeight+"px",ot.contentAlign="end",this.topToolbar.addButtonBlock(ot);var Ve=new br('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Ve.onClick=this.startRenderAndClose,ot.addButton(Ve),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ve.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var _t=new br('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");_t.onClick=this.close,ot.addButton(_t),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(_t.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},Q.prototype.addBottomToolbar=function(){var p=this;this.bottomToolbar=new Nt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var w=new yr;w.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(w);var H=new br('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");H.onClick=this.rotateLeftButtonClicked,w.addButton(H);var Z=new br('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");Z.onClick=this.rotateRightButtonClicked,w.addButton(Z);var K=new Rr;K.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(K),this.straightener=new Qr("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(ot){p.rotateBy(ot),p.straightener.angle=p.rotationAngle},K.addElement(this.straightener.getUI());var ye=new yr;ye.minWidth=2*this.toolbarHeight+"px",ye.contentAlign="end",this.bottomToolbar.addButtonBlock(ye);var He=new br('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");He.onClick=this.flipHorizontallyButtonClicked,ye.addButton(He);var it=new br('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");it.onClick=this.flipVerticallyButtonClicked,ye.addButton(it)},Q.prototype.ratioButtonClicked=function(p){this.aspectRatio=p,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},Q.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Ht.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},Q.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Dr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},Q.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Q.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},Q.prototype.restoreState=function(p){if(p){var w=this.cropLayer.getRescaledRect(p.width,p.height,this.imageWidth,this.imageHeight,p.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(w),this.cropRectChanged(w),this.flippedHorizontally=p.flippedHorizontally,this.flippedVertically=p.flippedVertically,this.applyFlip(),this.rotationAngle=p.rotationAngle,this.applyRotation()}},Q.prototype.clientToLocalCoordinates=function(p,w){var H=this.cropImage.getBoundingClientRect();return{x:p-H.left,y:w-H.top}},Q.prototype.onWindowResize=function(){this.positionUI()},Q.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var p=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=p+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},Q.prototype.rotateLeftButtonClicked=function(){var p=this.rotationAngle-90;this.rotationAngle%90!=0&&(p+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(p)},Q.prototype.rotateRightButtonClicked=function(){var p=this.rotationAngle+90;this.rotationAngle%90!=0&&(p-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(p)},Q.prototype.rotateTo=function(p){p=(p=p>180?p-360:p)<=-180?p+360:p,this.rotationAngle=p,this.applyRotation()},Q.prototype.rotateBy=function(p){this.rotateTo((this.rotationAngle+p)%360)},Q.prototype.applyRotation=function(){var p=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var w=this.editingTargetRotationContainer.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(w,0);var H=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/H.width,this.imageHeight/H.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=p},Q.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},Q.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},Q.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},Q.prototype.startRenderAndClose=function(){return Et(this,void 0,void 0,function(){var p,w;return wt(this,function(H){switch(H.label){case 0:return[4,this.render()];case 1:return p=H.sent(),w=this.getState(),this.renderEventListeners.forEach(function(Z){return Z(p,w)}),this.close(!0),[2]}})})},Q.prototype.render=function(){return Et(this,void 0,void 0,function(){var p;return wt(this,function(w){switch(w.label){case 0:return(p=new Ur).naturalSize=this.renderAtNaturalSize,p.imageType=this.renderImageType,p.imageQuality=this.renderImageQuality,p.width=this.renderWidth,p.height=this.renderHeight,this.unzoomFromCrop(),ct.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,p.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return w.sent(),[4,p.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,w.sent()]}})})},Q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new gt("toolbar",`
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
overflow: hidden;
|
|
line-height: 0px;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new gt("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new gt("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var p=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new gt("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*p)+`px;
|
|
height: `+(this.toolbarHeight-2*p)+`px;
|
|
padding: `+p+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new gt("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new gt("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new At("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new At("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new gt("toolbar_dropdown",`
|
|
position: absolute;
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
z-index: 20;
|
|
white-space: normal;
|
|
box-sizing: content-box;
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
line-height: 0px;
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new gt("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new gt("toolbar_straightener_block",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new gt("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*p)+`px;
|
|
padding: `+p+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new gt("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},Q.instanceCounter=0,Q}(),oe=j("8hTe"),fe=j.n(oe),Te=/<pre[^>]*>/g;function Ye(Q){var p=document.createElement("div");return p.innerHTML=Q,p.childNodes.length===0?"":p.childNodes[0].nodeValue}var et=_e.a=function(Q){var p=Q.value,w=p===void 0?"":p,H=Q.edit,Z=H===void 0?!1:H,K=Q.className,ye=Q.showTextOnly,He=Q.showLines,it=Q.replaces,ot=Q.zoomImg,Ve=Q.hasMask,_t=Q.style,vt=_t===void 0?{}:_t,Tt=Q.stylesPrev,Pt=Tt===void 0?{}:Tt,ur=String(w),Gt=Object(R.useRef)(),ar=Object(R.useRef)(),kt=Object(R.useState)(""),Tr=Object(X.a)(kt,2),mr=Tr[0],$t=Tr[1],De=Object(R.useState)("office"),Qt=Object(X.a)(De,2),Vt=Qt[0],Dt=Qt[1],jt=function(){var Ft=new ae(ar.current);Ft.displayMode="popup",Ft.addRenderEventListener(function(){var tr=Object(O.a)(e.a.mark(function Zt(xr){var qt;return e.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:return Gt.current.style.display="none",gr.next=3,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr}});case 3:qt=gr.sent,qt!=null&&qt.id&&it(ar.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(qt==null?void 0:qt.id,"?type=").concat(qt.content_type));case 5:case"end":return gr.stop()}},Zt)}));return function(Zt){return tr.apply(this,arguments)}}()),Ft.show()},Kt=function(){var Ft=new Jt(ar.current);Ft.settings.displayMode="popup",Ft.addEventListener("render",function(){var tr=Object(O.a)(e.a.mark(function Zt(xr){var qt;return e.a.wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:if(Gt.current.style.display="none",!ar.current){gr.next=6;break}return gr.next=4,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xr.dataUrl}});case 4:qt=gr.sent,qt!=null&&qt.id&&it(ar.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(qt==null?void 0:qt.id,"?type=").concat(qt.content_type));case 6:case"end":return gr.stop()}},Zt)}));return function(Zt){return tr.apply(this,arguments)}}()),Ft.show(),window.markerArea=Ft},Ar=Object(R.useMemo)(function(){Gt.current&&(Gt.current.style.zIndex=-1);try{var Wt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ft=/\"\/api\/attachments\/|\"\/attachments\/download\//g,tr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ur=ur.replace(Wt,"("+ne.a.API_SERVER+"/api/attachments/").replace(Ft,'"'+ne.a.API_SERVER+"/api/attachments/").replace(tr,'"'+ne.a.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(Fr){}var Zt=M(ur),xr=b();if(ur.match(/\[TOC\]/)&&(Zt=Zt.replace("<p>[TOC]</p>",B()),E()),Zt=Zt.replace(/(__special_katext_id_\d+__)/g,function(Fr,gr){var Kr=xr[gr],Pr=Kr.type,Nr=Kr.expression;return Object(me.renderToString)(Ye(Nr)||"",{displayMode:Pr==="block",throwOnError:!1,output:"html"})}),Zt=Zt.replace(/▁/g,"\u2581\u2581\u2581"),g(),ye){var qt=document.createElement("div");return qt.innerHTML=Zt,qt.innerText}return setTimeout(function(){return rr()},500),Zt},[ur]),zt=Object(R.useRef)();_.WebkitLineClamp=He,He&&(vt=Object(F.a)(Object(F.a)({},vt),_));function sr(Wt){var Ft=Wt.target;if(Ft.tagName.toUpperCase()==="IMG"){if(ot){var tr=Ft.getAttribute("src");$t(tr),Dt("image")}}else if(Ft.tagName.toUpperCase()==="A"){var Zt=Ft.getAttribute("href");if(Zt.indexOf("office")>-1)Wt.preventDefault(),$t(Zt),Dt("office");else if(Zt.indexOf("application/pdf")>-1)Wt.preventDefault(),$t(Zt),Dt("pdf");else if(Zt.indexOf("text/html")>-1)Wt.preventDefault(),$t(Zt),Dt("html");else if(Zt.startsWith("#")){Wt.preventDefault();var xr=document.getElementById(Zt.replace("#",""));xr&&xr.scrollIntoView(!0)}}}var rr=function(){var Ft,tr=(Ft=zt.current)===null||Ft===void 0?void 0:Ft.querySelectorAll("video");tr==null||tr.forEach(function(Zt){if(Zt.oncontextmenu=function(){return!1},Zt.src.indexOf(".m3u8")>-1&&!Zt.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var xr=new Y.a;xr.loadSource(Zt.src),xr.attachMedia(Zt)}}})};Object(R.useEffect)(function(){if(zt.current&&Ar&&(Ar.match(Te)&&window.PR.prettyPrint()),zt.current)return zt.current.addEventListener("click",sr),function(){zt.current.removeEventListener("click",sr),g(),E()}},[Ar,zt.current,sr]);var Ut=function(Ft){if(!Z)return;Ft.target.nodeName==="IMG"?(Gt.current.style.zIndex=1,Gt.current.style.display="flex",Gt.current.style.width=Ft.target.clientWidth+"px",Gt.current.style.height=Ft.target.clientHeight+"px",Gt.current.style.top=Ft.target.offsetTop+"px",Gt.current.style.left=Ft.target.offsetLeft+"px",ar.current.src=Ft.target.getAttribute("src")):Gt.current.style.display="none"};return m.a.createElement("div",{style:{position:"relative"}},m.a.createElement("div",{ref:zt,style:Object(F.a)({},vt),className:"".concat(K||""," markdown-body ").concat(fe.a.mdBody),onMouseOver:Ut,dangerouslySetInnerHTML:{__html:Ar}}),m.a.createElement("div",{ref:Gt,className:fe.a.button},m.a.createElement(G.a,null,m.a.createElement(V.a,{onClick:function(){return jt()}},"\u88C1\u526A"),m.a.createElement(V.a,{onClick:function(){return Kt()}},"\u7F16\u8F91"))),m.a.createElement("img",{ref:ar,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),m.a.createElement(ge.a,{close:!0,data:mr,type:mr!=null&&mr.length?Vt:"",style:Object(F.a)({},Pt),onClose:function(){return $t("")}}))}},BU3w:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return O});var se=j("MNnm"),G="rc-util-key";function D(X){if(X.attachTo)return X.attachTo;var P=document.querySelector("head");return P||document.body}function V(X){var P,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(se.a)())return null;var R=document.createElement("style");if((P=e.csp)===null||P===void 0?void 0:P.nonce){var m;R.nonce=(m=e.csp)===null||m===void 0?void 0:m.nonce}R.innerHTML=X;var v=D(e),u=v.firstChild;return e.prepend&&v.prepend?v.prepend(R):e.prepend&&u?v.insertBefore(R,u):v.appendChild(R),R}var F=new Map;function O(X,P){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=D(e);if(!F.has(R)){var m=V("",e),v=m.parentNode;F.set(R,v),v.removeChild(m)}var u=Array.from(F.get(R).children).find(function(i){return i.tagName==="STYLE"&&i[G]===P});if(u){var s,a;if(((s=e.csp)===null||s===void 0?void 0:s.nonce)&&u.nonce!==((a=e.csp)===null||a===void 0?void 0:a.nonce)){var A;u.nonce=(A=e.csp)===null||A===void 0?void 0:A.nonce}return u.innerHTML!==X&&(u.innerHTML=X),u}var o=V(X,e);return o[G]=P,o}},"C/vA":function(ht,_e,j){"use strict";j.d(_e,"a",function(){return se});function se(G){const D=this;let V=!1,F;return function(){return V||(V=!0,F=G.apply(D,arguments)),F}}},"Cg/j":function(ht,_e,j){"use strict";j.d(_e,"b",function(){return se}),j.d(_e,"a",function(){return G}),j.d(_e,"c",function(){return V}),j.d(_e,"d",function(){return F});var se;(function(O){O.serviceIds=new Map,O.DI_TARGET="$di$target",O.DI_DEPENDENCIES="$di$dependencies";function X(P){return P[O.DI_DEPENDENCIES]||[]}O.getServiceDependencies=X})(se||(se={}));const G=V("instantiationService");function D(O,X,P,e){X[se.DI_TARGET]===X?X[se.DI_DEPENDENCIES].push({id:O,index:P,optional:e}):(X[se.DI_DEPENDENCIES]=[{id:O,index:P,optional:e}],X[se.DI_TARGET]=X)}function V(O){if(se.serviceIds.has(O))return se.serviceIds.get(O);const X=function(P,e,R){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");D(X,P,R,!1)};return X.toString=()=>O,se.serviceIds.set(O,X),X}function F(O){return function(X,P,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");D(O,X,e,!0)}}},DlQD:function(ht,_e,j){(function(se,G){ht.exports=G()})(this,function(){"use strict";function se(we,ue){for(var ce=0;ce<ue.length;ce++){var te=ue[ce];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(we,te.key,te)}}function G(we,ue,ce){return ue&&se(we.prototype,ue),ce&&se(we,ce),we}function D(we,ue){if(!we)return;if(typeof we=="string")return V(we,ue);var ce=Object.prototype.toString.call(we).slice(8,-1);if(ce==="Object"&&we.constructor&&(ce=we.constructor.name),ce==="Map"||ce==="Set")return Array.from(we);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return V(we,ue)}function V(we,ue){(ue==null||ue>we.length)&&(ue=we.length);for(var ce=0,te=new Array(ue);ce<ue;ce++)te[ce]=we[ce];return te}function F(we,ue){var ce;if(typeof Symbol=="undefined"||we[Symbol.iterator]==null){if(Array.isArray(we)||(ce=D(we))||ue&&we&&typeof we.length=="number"){ce&&(we=ce);var te=0;return function(){return te>=we.length?{done:!0}:{done:!1,value:we[te++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ce=we[Symbol.iterator](),ce.next.bind(ce)}function O(we,ue){return ue={exports:{}},we(ue,ue.exports),ue.exports}var X=O(function(we){function ue(){return{baseUrl:null,breaks:!1,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 ce(te){we.exports.defaults=te}we.exports={defaults:ue(),getDefaults:ue,changeDefaults:ce}}),P=X.defaults,e=X.getDefaults,R=X.changeDefaults,m=/[&<>"']/,v=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,a={"&":"&","<":"<",">":">",'"':""","'":"'"},A=function(ue){return a[ue]};function o(we,ue){if(ue){if(m.test(we))return we.replace(v,A)}else if(u.test(we))return we.replace(s,A);return we}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(we){return we.replace(i,function(ue,ce){return ce=ce.toLowerCase(),ce==="colon"?":":ce.charAt(0)==="#"?ce.charAt(1)==="x"?String.fromCharCode(parseInt(ce.substring(2),16)):String.fromCharCode(+ce.substring(1)):""})}var t=/(^|[^\[])\^/g;function E(we,ue){we=we.source||we,ue=ue||"";var ce={replace:function(ie,le){return le=le.source||le,le=le.replace(t,"$1"),we=we.replace(ie,le),ce},getRegex:function(){return new RegExp(we,ue)}};return ce}var _=/[^\w:]/g,y=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function B(we,ue,ce){if(we){var te;try{te=decodeURIComponent(r(ce)).replace(_,"").toLowerCase()}catch(ie){return null}if(te.indexOf("javascript:")===0||te.indexOf("vbscript:")===0||te.indexOf("data:")===0)return null}ue&&!y.test(ce)&&(ce=c(ue,ce));try{ce=encodeURI(ce).replace(/%25/g,"%")}catch(ie){return null}return ce}var C={},d=/^[^:]+:\/*[^/]*$/,n=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(we,ue){C[" "+we]||(d.test(we)?C[" "+we]=we+"/":C[" "+we]=L(we,"/",!0)),we=C[" "+we];var ce=we.indexOf(":")===-1;return ue.substring(0,2)==="//"?ce?ue:we.replace(n,"$1")+ue:ue.charAt(0)==="/"?ce?ue:we.replace(l,"$1")+ue:we+ue}var b={exec:function(){}};function g(we){for(var ue=1,ce,te;ue<arguments.length;ue++){ce=arguments[ue];for(te in ce)Object.prototype.hasOwnProperty.call(ce,te)&&(we[te]=ce[te])}return we}function h(we,ue){var ce=we.replace(/\|/g,function(le,pe,Ie){for(var Pe=!1,qe=pe;--qe>=0&&Ie[qe]==="\\";)Pe=!Pe;return Pe?"|":" |"}),te=ce.split(/ \|/),ie=0;if(te.length>ue)te.splice(ue);else for(;te.length<ue;)te.push("");for(;ie<te.length;ie++)te[ie]=te[ie].trim().replace(/\\\|/g,"|");return te}function L(we,ue,ce){var te=we.length;if(te===0)return"";for(var ie=0;ie<te;){var le=we.charAt(te-ie-1);if(le===ue&&!ce)ie++;else if(le!==ue&&ce)ie++;else break}return we.substr(0,te-ie)}function N(we,ue){if(we.indexOf(ue[1])===-1)return-1;for(var ce=we.length,te=0,ie=0;ie<ce;ie++)if(we[ie]==="\\")ie++;else if(we[ie]===ue[0])te++;else if(we[ie]===ue[1]&&(te--,te<0))return ie;return-1}function T(we){we&&we.sanitize&&!we.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")}var M={escape:o,unescape:r,edit:E,cleanUrl:B,resolveUrl:c,noopTest:b,merge:g,splitCells:h,rtrim:L,findClosingBracket:N,checkSanitizeDeprecation:T},W=X.defaults,U=M.rtrim,Y=M.splitCells,ne=M.escape,me=M.findClosingBracket;function ge(we,ue,ce){var te=ue.href,ie=ue.title?ne(ue.title):null,le=we[1].replace(/\\([\[\]])/g,"$1");return we[0].charAt(0)!=="!"?{type:"link",raw:ce,href:te,title:ie,text:le}:{type:"image",raw:ce,href:te,title:ie,text:ne(le)}}function Oe(we,ue){var ce=we.match(/^(\s+)(?:```)/);if(ce===null)return ue;var te=ce[1];return ue.split(`
|
|
`).map(function(ie){var le=ie.match(/^\s+/);if(le===null)return ie;var pe=le[0];return pe.length>=te.length?ie.slice(te.length):ie}).join(`
|
|
`)}var Se=function(){function we(ce){this.options=ce||W}var ue=we.prototype;return ue.space=function(te){var ie=this.rules.block.newline.exec(te);if(ie)return ie[0].length>1?{type:"space",raw:ie[0]}:{raw:`
|
|
`}},ue.code=function(te,ie){var le=this.rules.block.code.exec(te);if(le){var pe=ie[ie.length-1];if(pe&&pe.type==="paragraph")return{raw:le[0],text:le[0].trimRight()};var Ie=le[0].replace(/^ {4}/gm,"");return{type:"code",raw:le[0],codeBlockStyle:"indented",text:this.options.pedantic?Ie:U(Ie,`
|
|
`)}}},ue.fences=function(te){var ie=this.rules.block.fences.exec(te);if(ie){var le=ie[0],pe=Oe(le,ie[3]||"");return{type:"code",raw:le,lang:ie[2]?ie[2].trim():ie[2],text:pe}}},ue.heading=function(te){var ie=this.rules.block.heading.exec(te);if(ie)return{type:"heading",raw:ie[0],depth:ie[1].length,text:ie[2]}},ue.nptable=function(te){var ie=this.rules.block.nptable.exec(te);if(ie){var le={type:"table",header:Y(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
|
|
`):[],raw:ie[0]};if(le.header.length===le.align.length){var pe=le.align.length,Ie;for(Ie=0;Ie<pe;Ie++)/^ *-+: *$/.test(le.align[Ie])?le.align[Ie]="right":/^ *:-+: *$/.test(le.align[Ie])?le.align[Ie]="center":/^ *:-+ *$/.test(le.align[Ie])?le.align[Ie]="left":le.align[Ie]=null;for(pe=le.cells.length,Ie=0;Ie<pe;Ie++)le.cells[Ie]=Y(le.cells[Ie],le.header.length);return le}}},ue.hr=function(te){var ie=this.rules.block.hr.exec(te);if(ie)return{type:"hr",raw:ie[0]}},ue.blockquote=function(te){var ie=this.rules.block.blockquote.exec(te);if(ie){var le=ie[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ie[0],text:le}}},ue.list=function(te){var ie=this.rules.block.list.exec(te);if(ie){for(var le=ie[0],pe=ie[2],Ie=pe.length>1,Pe=pe[pe.length-1]===")",qe={type:"list",raw:le,ordered:Ie,start:Ie?+pe.slice(0,-1):"",loose:!1,items:[]},ft=ie[0].match(this.rules.block.item),ut=!1,st,Lt,mt,tt,er,Jt,Ot,yt=ft.length,Et=0;Et<yt;Et++)st=ft[Et],le=st,Lt=st.length,st=st.replace(/^ *([*+-]|\d+[.)]) */,""),~st.indexOf(`
|
|
`)&&(Lt-=st.length,st=this.options.pedantic?st.replace(/^ {1,4}/gm,""):st.replace(new RegExp("^ {1,"+Lt+"}","gm"),"")),Et!==yt-1&&(mt=this.rules.block.bullet.exec(ft[Et+1])[0],(Ie?mt.length===1||!Pe&&mt[mt.length-1]===")":mt.length>1||this.options.smartLists&&mt!==pe)&&(tt=ft.slice(Et+1).join(`
|
|
`),qe.raw=qe.raw.substring(0,qe.raw.length-tt.length),Et=yt-1)),er=ut||/\n\n(?!\s*$)/.test(st),Et!==yt-1&&(ut=st.charAt(st.length-1)===`
|
|
`,er||(er=ut)),er&&(qe.loose=!0),Jt=/^\[[ xX]\] /.test(st),Ot=void 0,Jt&&(Ot=st[1]!==" ",st=st.replace(/^\[[ xX]\] +/,"")),qe.items.push({type:"list_item",raw:le,task:Jt,checked:Ot,loose:er,text:st});return qe}},ue.html=function(te){var ie=this.rules.block.html.exec(te);if(ie)return{type:this.options.sanitize?"paragraph":"html",raw:ie[0],pre:!this.options.sanitizer&&(ie[1]==="pre"||ie[1]==="script"||ie[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ie[0]):ne(ie[0]):ie[0]}},ue.def=function(te){var ie=this.rules.block.def.exec(te);if(ie){ie[3]&&(ie[3]=ie[3].substring(1,ie[3].length-1));var le=ie[1].toLowerCase().replace(/\s+/g," ");return{tag:le,raw:ie[0],href:ie[2],title:ie[3]}}},ue.table=function(te){var ie=this.rules.block.table.exec(te);if(ie){var le={type:"table",header:Y(ie[1].replace(/^ *| *\| *$/g,"")),align:ie[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ie[3]?ie[3].replace(/\n$/,"").split(`
|
|
`):[]};if(le.header.length===le.align.length){le.raw=ie[0];var pe=le.align.length,Ie;for(Ie=0;Ie<pe;Ie++)/^ *-+: *$/.test(le.align[Ie])?le.align[Ie]="right":/^ *:-+: *$/.test(le.align[Ie])?le.align[Ie]="center":/^ *:-+ *$/.test(le.align[Ie])?le.align[Ie]="left":le.align[Ie]=null;for(pe=le.cells.length,Ie=0;Ie<pe;Ie++)le.cells[Ie]=Y(le.cells[Ie].replace(/^ *\| *| *\| *$/g,""),le.header.length);return le}}},ue.lheading=function(te){var ie=this.rules.block.lheading.exec(te);if(ie)return{type:"heading",raw:ie[0],depth:ie[2].charAt(0)==="="?1:2,text:ie[1]}},ue.paragraph=function(te){var ie=this.rules.block.paragraph.exec(te);if(ie)return{type:"paragraph",raw:ie[0],text:ie[1].charAt(ie[1].length-1)===`
|
|
`?ie[1].slice(0,-1):ie[1]}},ue.text=function(te,ie){var le=this.rules.block.text.exec(te);if(le){var pe=ie[ie.length-1];return pe&&pe.type==="text"?{raw:le[0],text:le[0]}:{type:"text",raw:le[0],text:le[0]}}},ue.escape=function(te){var ie=this.rules.inline.escape.exec(te);if(ie)return{type:"escape",raw:ie[0],text:ne(ie[1])}},ue.tag=function(te,ie,le){var pe=this.rules.inline.tag.exec(te);if(pe)return!ie&&/^<a /i.test(pe[0])?ie=!0:ie&&/^<\/a>/i.test(pe[0])&&(ie=!1),!le&&/^<(pre|code|kbd|script)(\s|>)/i.test(pe[0])?le=!0:le&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(pe[0])&&(le=!1),{type:this.options.sanitize?"text":"html",raw:pe[0],inLink:ie,inRawBlock:le,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(pe[0]):ne(pe[0]):pe[0]}},ue.link=function(te){var ie=this.rules.inline.link.exec(te);if(ie){var le=me(ie[2],"()");if(le>-1){var pe=ie[0].indexOf("!")===0?5:4,Ie=pe+ie[1].length+le;ie[2]=ie[2].substring(0,le),ie[0]=ie[0].substring(0,Ie).trim(),ie[3]=""}var Pe=ie[2],qe="";if(this.options.pedantic){var ft=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Pe);ft?(Pe=ft[1],qe=ft[3]):qe=""}else qe=ie[3]?ie[3].slice(1,-1):"";Pe=Pe.trim().replace(/^<([\s\S]*)>$/,"$1");var ut=ge(ie,{href:Pe&&Pe.replace(this.rules.inline._escapes,"$1"),title:qe&&qe.replace(this.rules.inline._escapes,"$1")},ie[0]);return ut}},ue.reflink=function(te,ie){var le;if((le=this.rules.inline.reflink.exec(te))||(le=this.rules.inline.nolink.exec(te))){var pe=(le[2]||le[1]).replace(/\s+/g," ");if(pe=ie[pe.toLowerCase()],!pe||!pe.href){var Ie=le[0].charAt(0);return{type:"text",raw:Ie,text:Ie}}var Pe=ge(le,pe,le[0]);return Pe}},ue.strong=function(te,ie,le){le===void 0&&(le="");var pe=this.rules.inline.strong.start.exec(te);if(pe&&(!pe[1]||pe[1]&&(le===""||this.rules.inline.punctuation.exec(le)))){ie=ie.slice(-1*te.length);var Ie=pe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ie.lastIndex=0;for(var Pe;(pe=Ie.exec(ie))!=null;)if(Pe=this.rules.inline.strong.middle.exec(ie.slice(0,pe.index+3)),Pe)return{type:"strong",raw:te.slice(0,Pe[0].length),text:te.slice(2,Pe[0].length-2)}}},ue.em=function(te,ie,le){le===void 0&&(le="");var pe=this.rules.inline.em.start.exec(te);if(pe&&(!pe[1]||pe[1]&&(le===""||this.rules.inline.punctuation.exec(le)))){ie=ie.slice(-1*te.length);var Ie=pe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ie.lastIndex=0;for(var Pe;(pe=Ie.exec(ie))!=null;)if(Pe=this.rules.inline.em.middle.exec(ie.slice(0,pe.index+2)),Pe)return{type:"em",raw:te.slice(0,Pe[0].length),text:te.slice(1,Pe[0].length-1)}}},ue.codespan=function(te){var ie=this.rules.inline.code.exec(te);if(ie){var le=ie[2].replace(/\n/g," "),pe=/[^ ]/.test(le),Ie=le.startsWith(" ")&&le.endsWith(" ");return pe&&Ie&&(le=le.substring(1,le.length-1)),le=ne(le,!0),{type:"codespan",raw:ie[0],text:le}}},ue.br=function(te){var ie=this.rules.inline.br.exec(te);if(ie)return{type:"br",raw:ie[0]}},ue.del=function(te){var ie=this.rules.inline.del.exec(te);if(ie)return{type:"del",raw:ie[0],text:ie[1]}},ue.autolink=function(te,ie){var le=this.rules.inline.autolink.exec(te);if(le){var pe,Ie;return le[2]==="@"?(pe=ne(this.options.mangle?ie(le[1]):le[1]),Ie="mailto:"+pe):(pe=ne(le[1]),Ie=pe),{type:"link",raw:le[0],text:pe,href:Ie,tokens:[{type:"text",raw:pe,text:pe}]}}},ue.url=function(te,ie){var le;if(le=this.rules.inline.url.exec(te)){var pe,Ie;if(le[2]==="@")pe=ne(this.options.mangle?ie(le[0]):le[0]),Ie="mailto:"+pe;else{var Pe;do Pe=le[0],le[0]=this.rules.inline._backpedal.exec(le[0])[0];while(Pe!==le[0]);pe=ne(le[0]),le[1]==="www."?Ie="http://"+pe:Ie=pe}return{type:"link",raw:le[0],text:pe,href:Ie,tokens:[{type:"text",raw:pe,text:pe}]}}},ue.inlineText=function(te,ie,le){var pe=this.rules.inline.text.exec(te);if(pe){var Ie;return ie?Ie=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(pe[0]):ne(pe[0]):pe[0]:Ie=ne(this.options.smartypants?le(pe[0]):pe[0]),{type:"text",raw:pe[0],text:Ie}}},we}(),Be=M.noopTest,Ne=M.edit,ke=M.merge,Ce={newline:/^\n+/,code:/^( {4}[^\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}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\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{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Be,table:Be,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ce.def=Ne(Ce.def).replace("label",Ce._label).replace("title",Ce._title).getRegex(),Ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Ce.item=Ne(Ce.item,"gm").replace(/bull/g,Ce.bullet).getRegex(),Ce.list=Ne(Ce.list).replace(/bull/g,Ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ce.def.source+")").getRegex(),Ce._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",Ce._comment=/<!--(?!-?>)[\s\S]*?-->/,Ce.html=Ne(Ce.html,"i").replace("comment",Ce._comment).replace("tag",Ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce.paragraph=Ne(Ce._paragraph).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.blockquote=Ne(Ce.blockquote).replace("paragraph",Ce.paragraph).getRegex(),Ce.normal=ke({},Ce),Ce.gfm=ke({},Ce.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Ce.gfm.nptable=Ne(Ce.gfm.nptable).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.gfm.table=Ne(Ce.gfm.table).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.pedantic=ke({},Ce.normal,{html:Ne(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ce._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]+?) *(?:#+ *)?(?:\n+|$)/,fences:Be,paragraph:Ne(Ce.normal._paragraph).replace("hr",Ce.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ve={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Be,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(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Be,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ve._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ve.punctuation=Ne(ve.punctuation).replace(/punctuation/g,ve._punctuation).getRegex(),ve._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ve._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ve.em.start=Ne(ve.em.start).replace(/punctuation/g,ve._punctuation).getRegex(),ve.em.middle=Ne(ve.em.middle).replace(/punctuation/g,ve._punctuation).replace(/overlapSkip/g,ve._overlapSkip).getRegex(),ve.em.endAst=Ne(ve.em.endAst,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.em.endUnd=Ne(ve.em.endUnd,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.start=Ne(ve.strong.start).replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.middle=Ne(ve.strong.middle).replace(/punctuation/g,ve._punctuation).replace(/blockSkip/g,ve._blockSkip).getRegex(),ve.strong.endAst=Ne(ve.strong.endAst,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.endUnd=Ne(ve.strong.endUnd,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.blockSkip=Ne(ve._blockSkip,"g").getRegex(),ve.overlapSkip=Ne(ve._overlapSkip,"g").getRegex(),ve._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ve._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ve._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])?)+(?![-_])/,ve.autolink=Ne(ve.autolink).replace("scheme",ve._scheme).replace("email",ve._email).getRegex(),ve._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ve.tag=Ne(ve.tag).replace("comment",Ce._comment).replace("attribute",ve._attribute).getRegex(),ve._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ve._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ve._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ve.link=Ne(ve.link).replace("label",ve._label).replace("href",ve._href).replace("title",ve._title).getRegex(),ve.reflink=Ne(ve.reflink).replace("label",ve._label).getRegex(),ve.reflinkSearch=Ne(ve.reflinkSearch,"g").replace("reflink",ve.reflink).replace("nolink",ve.nolink).getRegex(),ve.normal=ke({},ve),ve.pedantic=ke({},ve.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:Ne(/^!?\[(label)\]\((.*?)\)/).replace("label",ve._label).getRegex(),reflink:Ne(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ve._label).getRegex()}),ve.gfm=ke({},ve.normal,{escape:Ne(ve.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)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),ve.gfm.url=Ne(ve.gfm.url,"i").replace("email",ve.gfm._extended_email).getRegex(),ve.breaks=ke({},ve.gfm,{br:Ne(ve.br).replace("{2,}","*").getRegex(),text:Ne(ve.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Xe={block:Ce,inline:ve},lt=X.defaults,at=Xe.block,je=Xe.inline;function rt(we){return we.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 re(we){var ue="",ce,te,ie=we.length;for(ce=0;ce<ie;ce++)te=we.charCodeAt(ce),Math.random()>.5&&(te="x"+te.toString(16)),ue+="&#"+te+";";return ue}var J=function(){function we(ce){this.tokens=[],this.tokens.links=Object.create(null),this.options=ce||lt,this.options.tokenizer=this.options.tokenizer||new Se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var te={block:at.normal,inline:je.normal};this.options.pedantic?(te.block=at.pedantic,te.inline=je.pedantic):this.options.gfm&&(te.block=at.gfm,this.options.breaks?te.inline=je.breaks:te.inline=je.gfm),this.tokenizer.rules=te}we.lex=function(te,ie){var le=new we(ie);return le.lex(te)};var ue=we.prototype;return ue.lex=function(te){return te=te.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(te,this.tokens,!0),this.inline(this.tokens),this.tokens},ue.blockTokens=function(te,ie,le){ie===void 0&&(ie=[]),le===void 0&&(le=!0),te=te.replace(/^ +$/gm,"");for(var pe,Ie,Pe,qe;te;){if(pe=this.tokenizer.space(te)){te=te.substring(pe.raw.length),pe.type&&ie.push(pe);continue}if(pe=this.tokenizer.code(te,ie)){te=te.substring(pe.raw.length),pe.type?ie.push(pe):(qe=ie[ie.length-1],qe.raw+=`
|
|
`+pe.raw,qe.text+=`
|
|
`+pe.text);continue}if(pe=this.tokenizer.fences(te)){te=te.substring(pe.raw.length),ie.push(pe);continue}if(pe=this.tokenizer.heading(te)){te=te.substring(pe.raw.length),ie.push(pe);continue}if(pe=this.tokenizer.nptable(te)){te=te.substring(pe.raw.length),ie.push(pe);continue}if(pe=this.tokenizer.hr(te)){te=te.substring(pe.raw.length),ie.push(pe);continue}if(pe=this.tokenizer.blockquote(te)){te=te.substring(pe.raw.length),pe.tokens=this.blockTokens(pe.text,[],le),ie.push(pe);continue}if(pe=this.tokenizer.list(te)){for(te=te.substring(pe.raw.length),Pe=pe.items.length,Ie=0;Ie<Pe;Ie++)pe.items[Ie].tokens=this.blockTokens(pe.items[Ie].text,[],!1);ie.push(pe);continue}if(pe=this.tokenizer.html(te)){te=te.substring(pe.raw.length),ie.push(pe);continue}if(le&&(pe=this.tokenizer.def(te))){te=te.substring(pe.raw.length),this.tokens.links[pe.tag]||(this.tokens.links[pe.tag]={href:pe.href,title:pe.title});continue}if(pe=this.tokenizer.table(te)){te=te.substring(pe.raw.length),ie.push(pe);continue}if(pe=this.tokenizer.lheading(te)){te=te.substring(pe.raw.length),ie.push(pe);continue}if(le&&(pe=this.tokenizer.paragraph(te))){te=te.substring(pe.raw.length),ie.push(pe);continue}if(pe=this.tokenizer.text(te,ie)){te=te.substring(pe.raw.length),pe.type?ie.push(pe):(qe=ie[ie.length-1],qe.raw+=`
|
|
`+pe.raw,qe.text+=`
|
|
`+pe.text);continue}if(te){var ft="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(ft);break}else throw new Error(ft)}}return ie},ue.inline=function(te){var ie,le,pe,Ie,Pe,qe,ft=te.length;for(ie=0;ie<ft;ie++){qe=te[ie];switch(qe.type){case"paragraph":case"text":case"heading":{qe.tokens=[],this.inlineTokens(qe.text,qe.tokens);break}case"table":{for(qe.tokens={header:[],cells:[]},Ie=qe.header.length,le=0;le<Ie;le++)qe.tokens.header[le]=[],this.inlineTokens(qe.header[le],qe.tokens.header[le]);for(Ie=qe.cells.length,le=0;le<Ie;le++)for(Pe=qe.cells[le],qe.tokens.cells[le]=[],pe=0;pe<Pe.length;pe++)qe.tokens.cells[le][pe]=[],this.inlineTokens(Pe[pe],qe.tokens.cells[le][pe]);break}case"blockquote":{this.inline(qe.tokens);break}case"list":{for(Ie=qe.items.length,le=0;le<Ie;le++)this.inline(qe.items[le].tokens);break}}}return te},ue.inlineTokens=function(te,ie,le,pe,Ie){ie===void 0&&(ie=[]),le===void 0&&(le=!1),pe===void 0&&(pe=!1),Ie===void 0&&(Ie="");var Pe,qe=te,ft;if(this.tokens.links){var ut=Object.keys(this.tokens.links);if(ut.length>0)for(;(ft=this.tokenizer.rules.inline.reflinkSearch.exec(qe))!=null;)ut.includes(ft[0].slice(ft[0].lastIndexOf("[")+1,-1))&&(qe=qe.slice(0,ft.index)+"["+"a".repeat(ft[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ft=this.tokenizer.rules.inline.blockSkip.exec(qe))!=null;)qe=qe.slice(0,ft.index)+"["+"a".repeat(ft[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;te;){if(Pe=this.tokenizer.escape(te)){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(Pe=this.tokenizer.tag(te,le,pe)){te=te.substring(Pe.raw.length),le=Pe.inLink,pe=Pe.inRawBlock,ie.push(Pe);continue}if(Pe=this.tokenizer.link(te)){te=te.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,pe)),ie.push(Pe);continue}if(Pe=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,pe)),ie.push(Pe);continue}if(Pe=this.tokenizer.strong(te,qe,Ie)){te=te.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],le,pe),ie.push(Pe);continue}if(Pe=this.tokenizer.em(te,qe,Ie)){te=te.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],le,pe),ie.push(Pe);continue}if(Pe=this.tokenizer.codespan(te)){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(Pe=this.tokenizer.br(te)){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(Pe=this.tokenizer.del(te)){te=te.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],le,pe),ie.push(Pe);continue}if(Pe=this.tokenizer.autolink(te,re)){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(!le&&(Pe=this.tokenizer.url(te,re))){te=te.substring(Pe.raw.length),ie.push(Pe);continue}if(Pe=this.tokenizer.inlineText(te,pe,rt)){te=te.substring(Pe.raw.length),Ie=Pe.raw.slice(-1),ie.push(Pe);continue}if(te){var st="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(st);break}else throw new Error(st)}}return ie},G(we,null,[{key:"rules",get:function(){return{block:at,inline:je}}}]),we}(),k=X.defaults,$=M.cleanUrl,q=M.escape,he=function(){function we(ce){this.options=ce||k}var ue=we.prototype;return ue.code=function(te,ie,le){var pe=(ie||"").match(/\S*/)[0];if(this.options.highlight){var Ie=this.options.highlight(te,pe);Ie!=null&&Ie!==te&&(le=!0,te=Ie)}return pe?'<pre><code class="'+this.options.langPrefix+q(pe,!0)+'">'+(le?te:q(te,!0))+`</code></pre>
|
|
`:"<pre><code>"+(le?te:q(te,!0))+`</code></pre>
|
|
`},ue.blockquote=function(te){return`<blockquote>
|
|
`+te+`</blockquote>
|
|
`},ue.html=function(te){return te},ue.heading=function(te,ie,le,pe){return this.options.headerIds?"<h"+ie+' id="'+this.options.headerPrefix+pe.slug(le)+'">'+te+"</h"+ie+`>
|
|
`:"<h"+ie+">"+te+"</h"+ie+`>
|
|
`},ue.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ue.list=function(te,ie,le){var pe=ie?"ol":"ul",Ie=ie&&le!==1?' start="'+le+'"':"";return"<"+pe+Ie+`>
|
|
`+te+"</"+pe+`>
|
|
`},ue.listitem=function(te){return"<li>"+te+`</li>
|
|
`},ue.checkbox=function(te){return"<input "+(te?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ue.paragraph=function(te){return"<p>"+te+`</p>
|
|
`},ue.table=function(te,ie){return ie&&(ie="<tbody>"+ie+"</tbody>"),`<table>
|
|
<thead>
|
|
`+te+`</thead>
|
|
`+ie+`</table>
|
|
`},ue.tablerow=function(te){return`<tr>
|
|
`+te+`</tr>
|
|
`},ue.tablecell=function(te,ie){var le=ie.header?"th":"td",pe=ie.align?"<"+le+' align="'+ie.align+'">':"<"+le+">";return pe+te+"</"+le+`>
|
|
`},ue.strong=function(te){return"<strong>"+te+"</strong>"},ue.em=function(te){return"<em>"+te+"</em>"},ue.codespan=function(te){return"<code>"+te+"</code>"},ue.br=function(){return this.options.xhtml?"<br/>":"<br>"},ue.del=function(te){return"<del>"+te+"</del>"},ue.link=function(te,ie,le){if(te=$(this.options.sanitize,this.options.baseUrl,te),te===null)return le;var pe='<a href="'+q(te)+'"';return ie&&(pe+=' title="'+ie+'"'),pe+=">"+le+"</a>",pe},ue.image=function(te,ie,le){if(te=$(this.options.sanitize,this.options.baseUrl,te),te===null)return le;var pe='<img src="'+te+'" alt="'+le+'"';return ie&&(pe+=' title="'+ie+'"'),pe+=this.options.xhtml?"/>":">",pe},ue.text=function(te){return te},we}(),de=function(){function we(){}var ue=we.prototype;return ue.strong=function(te){return te},ue.em=function(te){return te},ue.codespan=function(te){return te},ue.del=function(te){return te},ue.html=function(te){return te},ue.text=function(te){return te},ue.link=function(te,ie,le){return""+le},ue.image=function(te,ie,le){return""+le},ue.br=function(){return""},we}(),Qe=function(){function we(){this.seen={}}var ue=we.prototype;return ue.slug=function(te){var ie=te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ie)){var le=ie;do this.seen[le]++,ie=le+"-"+this.seen[le];while(this.seen.hasOwnProperty(ie))}return this.seen[ie]=0,ie},we}(),ze=X.defaults,Ge=M.unescape,$e=function(){function we(ce){this.options=ce||ze,this.options.renderer=this.options.renderer||new he,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new de,this.slugger=new Qe}we.parse=function(te,ie){var le=new we(ie);return le.parse(te)};var ue=we.prototype;return ue.parse=function(te,ie){ie===void 0&&(ie=!0);var le="",pe,Ie,Pe,qe,ft,ut,st,Lt,mt,tt,er,Jt,Ot,yt,Et,wt,Mt,ct,lr=te.length;for(pe=0;pe<lr;pe++){tt=te[pe];switch(tt.type){case"space":continue;case"hr":{le+=this.renderer.hr();continue}case"heading":{le+=this.renderer.heading(this.parseInline(tt.tokens),tt.depth,Ge(this.parseInline(tt.tokens,this.textRenderer)),this.slugger);continue}case"code":{le+=this.renderer.code(tt.text,tt.lang,tt.escaped);continue}case"table":{for(Lt="",st="",qe=tt.header.length,Ie=0;Ie<qe;Ie++)st+=this.renderer.tablecell(this.parseInline(tt.tokens.header[Ie]),{header:!0,align:tt.align[Ie]});for(Lt+=this.renderer.tablerow(st),mt="",qe=tt.cells.length,Ie=0;Ie<qe;Ie++){for(ut=tt.tokens.cells[Ie],st="",ft=ut.length,Pe=0;Pe<ft;Pe++)st+=this.renderer.tablecell(this.parseInline(ut[Pe]),{header:!1,align:tt.align[Pe]});mt+=this.renderer.tablerow(st)}le+=this.renderer.table(Lt,mt);continue}case"blockquote":{mt=this.parse(tt.tokens),le+=this.renderer.blockquote(mt);continue}case"list":{for(er=tt.ordered,Jt=tt.start,Ot=tt.loose,qe=tt.items.length,mt="",Ie=0;Ie<qe;Ie++)Et=tt.items[Ie],wt=Et.checked,Mt=Et.task,yt="",Et.task&&(ct=this.renderer.checkbox(wt),Ot?Et.tokens.length>0&&Et.tokens[0].type==="text"?(Et.tokens[0].text=ct+" "+Et.tokens[0].text,Et.tokens[0].tokens&&Et.tokens[0].tokens.length>0&&Et.tokens[0].tokens[0].type==="text"&&(Et.tokens[0].tokens[0].text=ct+" "+Et.tokens[0].tokens[0].text)):Et.tokens.unshift({type:"text",text:ct}):yt+=ct),yt+=this.parse(Et.tokens,Ot),mt+=this.renderer.listitem(yt,Mt,wt);le+=this.renderer.list(mt,er,Jt);continue}case"html":{le+=this.renderer.html(tt.text);continue}case"paragraph":{le+=this.renderer.paragraph(this.parseInline(tt.tokens));continue}case"text":{for(mt=tt.tokens?this.parseInline(tt.tokens):tt.text;pe+1<lr&&te[pe+1].type==="text";)tt=te[++pe],mt+=`
|
|
`+(tt.tokens?this.parseInline(tt.tokens):tt.text);le+=ie?this.renderer.paragraph(mt):mt;continue}default:{var At='Token with "'+tt.type+'" type was not found.';if(this.options.silent){console.error(At);return}else throw new Error(At)}}}return le},ue.parseInline=function(te,ie){ie=ie||this.renderer;var le="",pe,Ie,Pe=te.length;for(pe=0;pe<Pe;pe++){Ie=te[pe];switch(Ie.type){case"escape":{le+=ie.text(Ie.text);break}case"html":{le+=ie.html(Ie.text);break}case"link":{le+=ie.link(Ie.href,Ie.title,this.parseInline(Ie.tokens,ie));break}case"image":{le+=ie.image(Ie.href,Ie.title,Ie.text);break}case"strong":{le+=ie.strong(this.parseInline(Ie.tokens,ie));break}case"em":{le+=ie.em(this.parseInline(Ie.tokens,ie));break}case"codespan":{le+=ie.codespan(Ie.text);break}case"br":{le+=ie.br();break}case"del":{le+=ie.del(this.parseInline(Ie.tokens,ie));break}case"text":{le+=ie.text(Ie.text);break}default:{var qe='Token with "'+Ie.type+'" type was not found.';if(this.options.silent){console.error(qe);return}else throw new Error(qe)}}}return le},we}(),nt=M.merge,dt=M.checkSanitizeDeprecation,xe=M.escape,Ue=X.getDefaults,Ke=X.changeDefaults,We=X.defaults;function Le(we,ue,ce){if(typeof we=="undefined"||we===null)throw new Error("marked(): input parameter is undefined or null");if(typeof we!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(we)+", string expected");if(typeof ue=="function"&&(ce=ue,ue=null),ue=nt({},Le.defaults,ue||{}),dt(ue),ce){var te=ue.highlight,ie;try{ie=J.lex(we,ue)}catch(Pe){return ce(Pe)}var le=function(qe){var ft;if(!qe)try{ft=$e.parse(ie,ue)}catch(ut){qe=ut}return ue.highlight=te,qe?ce(qe):ce(null,ft)};if(!te||te.length<3)return le();if(delete ue.highlight,!ie.length)return le();var pe=0;Le.walkTokens(ie,function(Pe){Pe.type==="code"&&(pe++,setTimeout(function(){te(Pe.text,Pe.lang,function(qe,ft){if(qe)return le(qe);ft!=null&&ft!==Pe.text&&(Pe.text=ft,Pe.escaped=!0),pe--,pe===0&&le()})},0))}),pe===0&&le();return}try{var Ie=J.lex(we,ue);return ue.walkTokens&&Le.walkTokens(Ie,ue.walkTokens),$e.parse(Ie,ue)}catch(Pe){if(Pe.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ue.silent)return"<p>An error occurred:</p><pre>"+xe(Pe.message+"",!0)+"</pre>";throw Pe}}Le.options=Le.setOptions=function(we){return nt(Le.defaults,we),Ke(Le.defaults),Le},Le.getDefaults=Ue,Le.defaults=We,Le.use=function(we){var ue=nt({},we);if(we.renderer&&function(){var te=Le.defaults.renderer||new he,ie=function(Ie){var Pe=te[Ie];te[Ie]=function(){for(var qe=arguments.length,ft=new Array(qe),ut=0;ut<qe;ut++)ft[ut]=arguments[ut];var st=we.renderer[Ie].apply(te,ft);return st===!1&&(st=Pe.apply(te,ft)),st}};for(var le in we.renderer)ie(le);ue.renderer=te}(),we.tokenizer&&function(){var te=Le.defaults.tokenizer||new Se,ie=function(Ie){var Pe=te[Ie];te[Ie]=function(){for(var qe=arguments.length,ft=new Array(qe),ut=0;ut<qe;ut++)ft[ut]=arguments[ut];var st=we.tokenizer[Ie].apply(te,ft);return st===!1&&(st=Pe.apply(te,ft)),st}};for(var le in we.tokenizer)ie(le);ue.tokenizer=te}(),we.walkTokens){var ce=Le.defaults.walkTokens;ue.walkTokens=function(te){we.walkTokens(te),ce&&ce(te)}}Le.setOptions(ue)},Le.walkTokens=function(we,ue){for(var ce=F(we),te;!(te=ce()).done;){var ie=te.value;ue(ie);switch(ie.type){case"table":{for(var le=F(ie.tokens.header),pe;!(pe=le()).done;){var Ie=pe.value;Le.walkTokens(Ie,ue)}for(var Pe=F(ie.tokens.cells),qe;!(qe=Pe()).done;)for(var ft=qe.value,ut=F(ft),st;!(st=ut()).done;){var Lt=st.value;Le.walkTokens(Lt,ue)}break}case"list":{Le.walkTokens(ie.items,ue);break}default:ie.tokens&&Le.walkTokens(ie.tokens,ue)}}},Le.Parser=$e,Le.parser=$e.parse,Le.Renderer=he,Le.TextRenderer=de,Le.Lexer=J,Le.lexer=J.lex,Le.Tokenizer=Se,Le.Slugger=Qe,Le.parse=Le;var Fe=Le;return Fe})},FWmy:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return se});function se(G,D){if(!G)throw new Error(D?`Assertion failed (${D})`:"Assertion Failed")}},H7XF:function(ht,_e,j){"use strict";_e.byteLength=P,_e.toByteArray=R,_e.fromByteArray=u;for(var se=[],G=[],D=typeof Uint8Array!="undefined"?Uint8Array:Array,V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",F=0,O=V.length;F<O;++F)se[F]=V[F],G[V.charCodeAt(F)]=F;G["-".charCodeAt(0)]=62,G["_".charCodeAt(0)]=63;function X(s){var a=s.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=s.indexOf("=");A===-1&&(A=a);var o=A===a?0:4-A%4;return[A,o]}function P(s){var a=X(s),A=a[0],o=a[1];return(A+o)*3/4-o}function e(s,a,A){return(a+A)*3/4-A}function R(s){var a,A=X(s),o=A[0],i=A[1],r=new D(e(s,o,i)),t=0,E=i>0?o-4:o,_;for(_=0;_<E;_+=4)a=G[s.charCodeAt(_)]<<18|G[s.charCodeAt(_+1)]<<12|G[s.charCodeAt(_+2)]<<6|G[s.charCodeAt(_+3)],r[t++]=a>>16&255,r[t++]=a>>8&255,r[t++]=a&255;return i===2&&(a=G[s.charCodeAt(_)]<<2|G[s.charCodeAt(_+1)]>>4,r[t++]=a&255),i===1&&(a=G[s.charCodeAt(_)]<<10|G[s.charCodeAt(_+1)]<<4|G[s.charCodeAt(_+2)]>>2,r[t++]=a>>8&255,r[t++]=a&255),r}function m(s){return se[s>>18&63]+se[s>>12&63]+se[s>>6&63]+se[s&63]}function v(s,a,A){for(var o,i=[],r=a;r<A;r+=3)o=(s[r]<<16&16711680)+(s[r+1]<<8&65280)+(s[r+2]&255),i.push(m(o));return i.join("")}function u(s){for(var a,A=s.length,o=A%3,i=[],r=16383,t=0,E=A-o;t<E;t+=r)i.push(v(s,t,t+r>E?E:t+r));return o===1?(a=s[A-1],i.push(se[a>>2]+se[a<<4&63]+"==")):o===2&&(a=(s[A-2]<<8)+s[A-1],i.push(se[a>>10]+se[a>>4&63]+se[a<<2&63]+"=")),i.join("")}},HDXh:function(ht,_e,j){"use strict";(function(se){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var G=j("H7XF"),D=j("kVK+"),V=j("49sm");_e.Buffer=P,_e.SlowBuffer=i,_e.INSPECT_MAX_BYTES=50,P.TYPED_ARRAY_SUPPORT=se.TYPED_ARRAY_SUPPORT!==void 0?se.TYPED_ARRAY_SUPPORT:F(),_e.kMaxLength=O();function F(){try{var re=new Uint8Array(1);return re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},re.foo()===42&&typeof re.subarray=="function"&&re.subarray(1,1).byteLength===0}catch(J){return!1}}function O(){return P.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function X(re,J){if(O()<J)throw new RangeError("Invalid typed array length");return P.TYPED_ARRAY_SUPPORT?(re=new Uint8Array(J),re.__proto__=P.prototype):(re===null&&(re=new P(J)),re.length=J),re}function P(re,J,k){if(!P.TYPED_ARRAY_SUPPORT&&!(this instanceof P))return new P(re,J,k);if(typeof re=="number"){if(typeof J=="string")throw new Error("If encoding is specified then the first argument must be a string");return v(this,re)}return e(this,re,J,k)}P.poolSize=8192,P._augment=function(re){return re.__proto__=P.prototype,re};function e(re,J,k,$){if(typeof J=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&J instanceof ArrayBuffer?a(re,J,k,$):typeof J=="string"?u(re,J,k):A(re,J)}P.from=function(re,J,k){return e(null,re,J,k)},P.TYPED_ARRAY_SUPPORT&&(P.prototype.__proto__=Uint8Array.prototype,P.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&P[Symbol.species]===P&&Object.defineProperty(P,Symbol.species,{value:null,configurable:!0}));function R(re){if(typeof re!="number")throw new TypeError('"size" argument must be a number');if(re<0)throw new RangeError('"size" argument must not be negative')}function m(re,J,k,$){return R(J),J<=0?X(re,J):k!==void 0?typeof $=="string"?X(re,J).fill(k,$):X(re,J).fill(k):X(re,J)}P.alloc=function(re,J,k){return m(null,re,J,k)};function v(re,J){if(R(J),re=X(re,J<0?0:o(J)|0),!P.TYPED_ARRAY_SUPPORT)for(var k=0;k<J;++k)re[k]=0;return re}P.allocUnsafe=function(re){return v(null,re)},P.allocUnsafeSlow=function(re){return v(null,re)};function u(re,J,k){if((typeof k!="string"||k==="")&&(k="utf8"),!P.isEncoding(k))throw new TypeError('"encoding" must be a valid string encoding');var $=r(J,k)|0;re=X(re,$);var q=re.write(J,k);return q!==$&&(re=re.slice(0,q)),re}function s(re,J){var k=J.length<0?0:o(J.length)|0;re=X(re,k);for(var $=0;$<k;$+=1)re[$]=J[$]&255;return re}function a(re,J,k,$){if(J.byteLength,k<0||J.byteLength<k)throw new RangeError("'offset' is out of bounds");if(J.byteLength<k+($||0))throw new RangeError("'length' is out of bounds");return k===void 0&&$===void 0?J=new Uint8Array(J):$===void 0?J=new Uint8Array(J,k):J=new Uint8Array(J,k,$),P.TYPED_ARRAY_SUPPORT?(re=J,re.__proto__=P.prototype):re=s(re,J),re}function A(re,J){if(P.isBuffer(J)){var k=o(J.length)|0;return re=X(re,k),re.length===0||J.copy(re,0,0,k),re}if(J){if(typeof ArrayBuffer!="undefined"&&J.buffer instanceof ArrayBuffer||"length"in J)return typeof J.length!="number"||rt(J.length)?X(re,0):s(re,J);if(J.type==="Buffer"&&V(J.data))return s(re,J.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function o(re){if(re>=O())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O().toString(16)+" bytes");return re|0}function i(re){return+re!=re&&(re=0),P.alloc(+re)}P.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},P.compare=function(J,k){if(!P.isBuffer(J)||!P.isBuffer(k))throw new TypeError("Arguments must be Buffers");if(J===k)return 0;for(var $=J.length,q=k.length,he=0,de=Math.min($,q);he<de;++he)if(J[he]!==k[he]){$=J[he],q=k[he];break}return $<q?-1:q<$?1:0},P.isEncoding=function(J){switch(String(J).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},P.concat=function(J,k){if(!V(J))throw new TypeError('"list" argument must be an Array of Buffers');if(J.length===0)return P.alloc(0);var $;if(k===void 0)for(k=0,$=0;$<J.length;++$)k+=J[$].length;var q=P.allocUnsafe(k),he=0;for($=0;$<J.length;++$){var de=J[$];if(!P.isBuffer(de))throw new TypeError('"list" argument must be an Array of Buffers');de.copy(q,he),he+=de.length}return q};function r(re,J){if(P.isBuffer(re))return re.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(re)||re instanceof ArrayBuffer))return re.byteLength;typeof re!="string"&&(re=""+re);var k=re.length;if(k===0)return 0;for(var $=!1;;)switch(J){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":case void 0:return ve(re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return at(re).length;default:if($)return ve(re).length;J=(""+J).toLowerCase(),$=!0}}P.byteLength=r;function t(re,J,k){var $=!1;if((J===void 0||J<0)&&(J=0),J>this.length)return"";if((k===void 0||k>this.length)&&(k=this.length),k<=0)return"";if(k>>>=0,J>>>=0,k<=J)return"";for(re||(re="utf8");;)switch(re){case"hex":return M(this,J,k);case"utf8":case"utf-8":return g(this,J,k);case"ascii":return N(this,J,k);case"latin1":case"binary":return T(this,J,k);case"base64":return b(this,J,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,J,k);default:if($)throw new TypeError("Unknown encoding: "+re);re=(re+"").toLowerCase(),$=!0}}P.prototype._isBuffer=!0;function E(re,J,k){var $=re[J];re[J]=re[k],re[k]=$}P.prototype.swap16=function(){var J=this.length;if(J%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;k<J;k+=2)E(this,k,k+1);return this},P.prototype.swap32=function(){var J=this.length;if(J%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var k=0;k<J;k+=4)E(this,k,k+3),E(this,k+1,k+2);return this},P.prototype.swap64=function(){var J=this.length;if(J%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var k=0;k<J;k+=8)E(this,k,k+7),E(this,k+1,k+6),E(this,k+2,k+5),E(this,k+3,k+4);return this},P.prototype.toString=function(){var J=this.length|0;return J===0?"":arguments.length===0?g(this,0,J):t.apply(this,arguments)},P.prototype.equals=function(J){if(!P.isBuffer(J))throw new TypeError("Argument must be a Buffer");return this===J?!0:P.compare(this,J)===0},P.prototype.inspect=function(){var J="",k=_e.INSPECT_MAX_BYTES;return this.length>0&&(J=this.toString("hex",0,k).match(/.{2}/g).join(" "),this.length>k&&(J+=" ... ")),"<Buffer "+J+">"},P.prototype.compare=function(J,k,$,q,he){if(!P.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(k===void 0&&(k=0),$===void 0&&($=J?J.length:0),q===void 0&&(q=0),he===void 0&&(he=this.length),k<0||$>J.length||q<0||he>this.length)throw new RangeError("out of range index");if(q>=he&&k>=$)return 0;if(q>=he)return-1;if(k>=$)return 1;if(k>>>=0,$>>>=0,q>>>=0,he>>>=0,this===J)return 0;for(var de=he-q,Qe=$-k,ze=Math.min(de,Qe),Ge=this.slice(q,he),$e=J.slice(k,$),nt=0;nt<ze;++nt)if(Ge[nt]!==$e[nt]){de=Ge[nt],Qe=$e[nt];break}return de<Qe?-1:Qe<de?1:0};function _(re,J,k,$,q){if(re.length===0)return-1;if(typeof k=="string"?($=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,isNaN(k)&&(k=q?0:re.length-1),k<0&&(k=re.length+k),k>=re.length){if(q)return-1;k=re.length-1}else if(k<0)if(q)k=0;else return-1;if(typeof J=="string"&&(J=P.from(J,$)),P.isBuffer(J))return J.length===0?-1:y(re,J,k,$,q);if(typeof J=="number")return J=J&255,P.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?q?Uint8Array.prototype.indexOf.call(re,J,k):Uint8Array.prototype.lastIndexOf.call(re,J,k):y(re,[J],k,$,q);throw new TypeError("val must be string, number or Buffer")}function y(re,J,k,$,q){var he=1,de=re.length,Qe=J.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(re.length<2||J.length<2)return-1;he=2,de/=2,Qe/=2,k/=2}function ze(xe,Ue){return he===1?xe[Ue]:xe.readUInt16BE(Ue*he)}var Ge;if(q){var $e=-1;for(Ge=k;Ge<de;Ge++)if(ze(re,Ge)===ze(J,$e===-1?0:Ge-$e)){if($e===-1&&($e=Ge),Ge-$e+1===Qe)return $e*he}else $e!==-1&&(Ge-=Ge-$e),$e=-1}else for(k+Qe>de&&(k=de-Qe),Ge=k;Ge>=0;Ge--){for(var nt=!0,dt=0;dt<Qe;dt++)if(ze(re,Ge+dt)!==ze(J,dt)){nt=!1;break}if(nt)return Ge}return-1}P.prototype.includes=function(J,k,$){return this.indexOf(J,k,$)!==-1},P.prototype.indexOf=function(J,k,$){return _(this,J,k,$,!0)},P.prototype.lastIndexOf=function(J,k,$){return _(this,J,k,$,!1)};function B(re,J,k,$){k=Number(k)||0;var q=re.length-k;$?($=Number($),$>q&&($=q)):$=q;var he=J.length;if(he%2!==0)throw new TypeError("Invalid hex string");$>he/2&&($=he/2);for(var de=0;de<$;++de){var Qe=parseInt(J.substr(de*2,2),16);if(isNaN(Qe))return de;re[k+de]=Qe}return de}function C(re,J,k,$){return je(ve(J,re.length-k),re,k,$)}function d(re,J,k,$){return je(Xe(J),re,k,$)}function n(re,J,k,$){return d(re,J,k,$)}function l(re,J,k,$){return je(at(J),re,k,$)}function c(re,J,k,$){return je(lt(J,re.length-k),re,k,$)}P.prototype.write=function(J,k,$,q){if(k===void 0)q="utf8",$=this.length,k=0;else if($===void 0&&typeof k=="string")q=k,$=this.length,k=0;else if(isFinite(k))k=k|0,isFinite($)?($=$|0,q===void 0&&(q="utf8")):(q=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var he=this.length-k;if(($===void 0||$>he)&&($=he),J.length>0&&($<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");q||(q="utf8");for(var de=!1;;)switch(q){case"hex":return B(this,J,k,$);case"utf8":case"utf-8":return C(this,J,k,$);case"ascii":return d(this,J,k,$);case"latin1":case"binary":return n(this,J,k,$);case"base64":return l(this,J,k,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c(this,J,k,$);default:if(de)throw new TypeError("Unknown encoding: "+q);q=(""+q).toLowerCase(),de=!0}},P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function b(re,J,k){return J===0&&k===re.length?G.fromByteArray(re):G.fromByteArray(re.slice(J,k))}function g(re,J,k){k=Math.min(re.length,k);for(var $=[],q=J;q<k;){var he=re[q],de=null,Qe=he>239?4:he>223?3:he>191?2:1;if(q+Qe<=k){var ze,Ge,$e,nt;switch(Qe){case 1:he<128&&(de=he);break;case 2:ze=re[q+1],(ze&192)===128&&(nt=(he&31)<<6|ze&63,nt>127&&(de=nt));break;case 3:ze=re[q+1],Ge=re[q+2],(ze&192)===128&&(Ge&192)===128&&(nt=(he&15)<<12|(ze&63)<<6|Ge&63,nt>2047&&(nt<55296||nt>57343)&&(de=nt));break;case 4:ze=re[q+1],Ge=re[q+2],$e=re[q+3],(ze&192)===128&&(Ge&192)===128&&($e&192)===128&&(nt=(he&15)<<18|(ze&63)<<12|(Ge&63)<<6|$e&63,nt>65535&&nt<1114112&&(de=nt))}}de===null?(de=65533,Qe=1):de>65535&&(de-=65536,$.push(de>>>10&1023|55296),de=56320|de&1023),$.push(de),q+=Qe}return L($)}var h=4096;function L(re){var J=re.length;if(J<=h)return String.fromCharCode.apply(String,re);for(var k="",$=0;$<J;)k+=String.fromCharCode.apply(String,re.slice($,$+=h));return k}function N(re,J,k){var $="";k=Math.min(re.length,k);for(var q=J;q<k;++q)$+=String.fromCharCode(re[q]&127);return $}function T(re,J,k){var $="";k=Math.min(re.length,k);for(var q=J;q<k;++q)$+=String.fromCharCode(re[q]);return $}function M(re,J,k){var $=re.length;(!J||J<0)&&(J=0),(!k||k<0||k>$)&&(k=$);for(var q="",he=J;he<k;++he)q+=Ce(re[he]);return q}function W(re,J,k){for(var $=re.slice(J,k),q="",he=0;he<$.length;he+=2)q+=String.fromCharCode($[he]+$[he+1]*256);return q}P.prototype.slice=function(J,k){var $=this.length;J=~~J,k=k===void 0?$:~~k,J<0?(J+=$,J<0&&(J=0)):J>$&&(J=$),k<0?(k+=$,k<0&&(k=0)):k>$&&(k=$),k<J&&(k=J);var q;if(P.TYPED_ARRAY_SUPPORT)q=this.subarray(J,k),q.__proto__=P.prototype;else{var he=k-J;q=new P(he,void 0);for(var de=0;de<he;++de)q[de]=this[de+J]}return q};function U(re,J,k){if(re%1!==0||re<0)throw new RangeError("offset is not uint");if(re+J>k)throw new RangeError("Trying to access beyond buffer length")}P.prototype.readUIntLE=function(J,k,$){J=J|0,k=k|0,$||U(J,k,this.length);for(var q=this[J],he=1,de=0;++de<k&&(he*=256);)q+=this[J+de]*he;return q},P.prototype.readUIntBE=function(J,k,$){J=J|0,k=k|0,$||U(J,k,this.length);for(var q=this[J+--k],he=1;k>0&&(he*=256);)q+=this[J+--k]*he;return q},P.prototype.readUInt8=function(J,k){return k||U(J,1,this.length),this[J]},P.prototype.readUInt16LE=function(J,k){return k||U(J,2,this.length),this[J]|this[J+1]<<8},P.prototype.readUInt16BE=function(J,k){return k||U(J,2,this.length),this[J]<<8|this[J+1]},P.prototype.readUInt32LE=function(J,k){return k||U(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},P.prototype.readUInt32BE=function(J,k){return k||U(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},P.prototype.readIntLE=function(J,k,$){J=J|0,k=k|0,$||U(J,k,this.length);for(var q=this[J],he=1,de=0;++de<k&&(he*=256);)q+=this[J+de]*he;return he*=128,q>=he&&(q-=Math.pow(2,8*k)),q},P.prototype.readIntBE=function(J,k,$){J=J|0,k=k|0,$||U(J,k,this.length);for(var q=k,he=1,de=this[J+--q];q>0&&(he*=256);)de+=this[J+--q]*he;return he*=128,de>=he&&(de-=Math.pow(2,8*k)),de},P.prototype.readInt8=function(J,k){return k||U(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},P.prototype.readInt16LE=function(J,k){k||U(J,2,this.length);var $=this[J]|this[J+1]<<8;return $&32768?$|4294901760:$},P.prototype.readInt16BE=function(J,k){k||U(J,2,this.length);var $=this[J+1]|this[J]<<8;return $&32768?$|4294901760:$},P.prototype.readInt32LE=function(J,k){return k||U(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},P.prototype.readInt32BE=function(J,k){return k||U(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},P.prototype.readFloatLE=function(J,k){return k||U(J,4,this.length),D.read(this,J,!0,23,4)},P.prototype.readFloatBE=function(J,k){return k||U(J,4,this.length),D.read(this,J,!1,23,4)},P.prototype.readDoubleLE=function(J,k){return k||U(J,8,this.length),D.read(this,J,!0,52,8)},P.prototype.readDoubleBE=function(J,k){return k||U(J,8,this.length),D.read(this,J,!1,52,8)};function Y(re,J,k,$,q,he){if(!P.isBuffer(re))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>q||J<he)throw new RangeError('"value" argument is out of bounds');if(k+$>re.length)throw new RangeError("Index out of range")}P.prototype.writeUIntLE=function(J,k,$,q){if(J=+J,k=k|0,$=$|0,!q){var he=Math.pow(2,8*$)-1;Y(this,J,k,$,he,0)}var de=1,Qe=0;for(this[k]=J&255;++Qe<$&&(de*=256);)this[k+Qe]=J/de&255;return k+$},P.prototype.writeUIntBE=function(J,k,$,q){if(J=+J,k=k|0,$=$|0,!q){var he=Math.pow(2,8*$)-1;Y(this,J,k,$,he,0)}var de=$-1,Qe=1;for(this[k+de]=J&255;--de>=0&&(Qe*=256);)this[k+de]=J/Qe&255;return k+$},P.prototype.writeUInt8=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,1,255,0),P.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[k]=J&255,k+1};function ne(re,J,k,$){J<0&&(J=65535+J+1);for(var q=0,he=Math.min(re.length-k,2);q<he;++q)re[k+q]=(J&255<<8*($?q:1-q))>>>($?q:1-q)*8}P.prototype.writeUInt16LE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,2,65535,0),P.TYPED_ARRAY_SUPPORT?(this[k]=J&255,this[k+1]=J>>>8):ne(this,J,k,!0),k+2},P.prototype.writeUInt16BE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,2,65535,0),P.TYPED_ARRAY_SUPPORT?(this[k]=J>>>8,this[k+1]=J&255):ne(this,J,k,!1),k+2};function me(re,J,k,$){J<0&&(J=4294967295+J+1);for(var q=0,he=Math.min(re.length-k,4);q<he;++q)re[k+q]=J>>>($?q:3-q)*8&255}P.prototype.writeUInt32LE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[k+3]=J>>>24,this[k+2]=J>>>16,this[k+1]=J>>>8,this[k]=J&255):me(this,J,k,!0),k+4},P.prototype.writeUInt32BE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[k]=J>>>24,this[k+1]=J>>>16,this[k+2]=J>>>8,this[k+3]=J&255):me(this,J,k,!1),k+4},P.prototype.writeIntLE=function(J,k,$,q){if(J=+J,k=k|0,!q){var he=Math.pow(2,8*$-1);Y(this,J,k,$,he-1,-he)}var de=0,Qe=1,ze=0;for(this[k]=J&255;++de<$&&(Qe*=256);)J<0&&ze===0&&this[k+de-1]!==0&&(ze=1),this[k+de]=(J/Qe>>0)-ze&255;return k+$},P.prototype.writeIntBE=function(J,k,$,q){if(J=+J,k=k|0,!q){var he=Math.pow(2,8*$-1);Y(this,J,k,$,he-1,-he)}var de=$-1,Qe=1,ze=0;for(this[k+de]=J&255;--de>=0&&(Qe*=256);)J<0&&ze===0&&this[k+de+1]!==0&&(ze=1),this[k+de]=(J/Qe>>0)-ze&255;return k+$},P.prototype.writeInt8=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,1,127,-128),P.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[k]=J&255,k+1},P.prototype.writeInt16LE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[k]=J&255,this[k+1]=J>>>8):ne(this,J,k,!0),k+2},P.prototype.writeInt16BE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[k]=J>>>8,this[k+1]=J&255):ne(this,J,k,!1),k+2},P.prototype.writeInt32LE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,4,2147483647,-2147483648),P.TYPED_ARRAY_SUPPORT?(this[k]=J&255,this[k+1]=J>>>8,this[k+2]=J>>>16,this[k+3]=J>>>24):me(this,J,k,!0),k+4},P.prototype.writeInt32BE=function(J,k,$){return J=+J,k=k|0,$||Y(this,J,k,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),P.TYPED_ARRAY_SUPPORT?(this[k]=J>>>24,this[k+1]=J>>>16,this[k+2]=J>>>8,this[k+3]=J&255):me(this,J,k,!1),k+4};function ge(re,J,k,$,q,he){if(k+$>re.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function Oe(re,J,k,$,q){return q||ge(re,J,k,4,34028234663852886e22,-34028234663852886e22),D.write(re,J,k,$,23,4),k+4}P.prototype.writeFloatLE=function(J,k,$){return Oe(this,J,k,!0,$)},P.prototype.writeFloatBE=function(J,k,$){return Oe(this,J,k,!1,$)};function Se(re,J,k,$,q){return q||ge(re,J,k,8,17976931348623157e292,-17976931348623157e292),D.write(re,J,k,$,52,8),k+8}P.prototype.writeDoubleLE=function(J,k,$){return Se(this,J,k,!0,$)},P.prototype.writeDoubleBE=function(J,k,$){return Se(this,J,k,!1,$)},P.prototype.copy=function(J,k,$,q){if($||($=0),!q&&q!==0&&(q=this.length),k>=J.length&&(k=J.length),k||(k=0),q>0&&q<$&&(q=$),q===$)return 0;if(J.length===0||this.length===0)return 0;if(k<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(q<0)throw new RangeError("sourceEnd out of bounds");q>this.length&&(q=this.length),J.length-k<q-$&&(q=J.length-k+$);var he=q-$,de;if(this===J&&$<k&&k<q)for(de=he-1;de>=0;--de)J[de+k]=this[de+$];else if(he<1e3||!P.TYPED_ARRAY_SUPPORT)for(de=0;de<he;++de)J[de+k]=this[de+$];else Uint8Array.prototype.set.call(J,this.subarray($,$+he),k);return he},P.prototype.fill=function(J,k,$,q){if(typeof J=="string"){if(typeof k=="string"?(q=k,k=0,$=this.length):typeof $=="string"&&(q=$,$=this.length),J.length===1){var he=J.charCodeAt(0);he<256&&(J=he)}if(q!==void 0&&typeof q!="string")throw new TypeError("encoding must be a string");if(typeof q=="string"&&!P.isEncoding(q))throw new TypeError("Unknown encoding: "+q)}else typeof J=="number"&&(J=J&255);if(k<0||this.length<k||this.length<$)throw new RangeError("Out of range index");if($<=k)return this;k=k>>>0,$=$===void 0?this.length:$>>>0,J||(J=0);var de;if(typeof J=="number")for(de=k;de<$;++de)this[de]=J;else{var Qe=P.isBuffer(J)?J:ve(new P(J,q).toString()),ze=Qe.length;for(de=0;de<$-k;++de)this[de+k]=Qe[de%ze]}return this};var Be=/[^+\/0-9A-Za-z-_]/g;function Ne(re){if(re=ke(re).replace(Be,""),re.length<2)return"";for(;re.length%4!==0;)re=re+"=";return re}function ke(re){return re.trim?re.trim():re.replace(/^\s+|\s+$/g,"")}function Ce(re){return re<16?"0"+re.toString(16):re.toString(16)}function ve(re,J){J=J||Infinity;for(var k,$=re.length,q=null,he=[],de=0;de<$;++de){if(k=re.charCodeAt(de),k>55295&&k<57344){if(!q){if(k>56319){(J-=3)>-1&&he.push(239,191,189);continue}else if(de+1===$){(J-=3)>-1&&he.push(239,191,189);continue}q=k;continue}if(k<56320){(J-=3)>-1&&he.push(239,191,189),q=k;continue}k=(q-55296<<10|k-56320)+65536}else q&&((J-=3)>-1&&he.push(239,191,189));if(q=null,k<128){if((J-=1)<0)break;he.push(k)}else if(k<2048){if((J-=2)<0)break;he.push(k>>6|192,k&63|128)}else if(k<65536){if((J-=3)<0)break;he.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((J-=4)<0)break;he.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return he}function Xe(re){for(var J=[],k=0;k<re.length;++k)J.push(re.charCodeAt(k)&255);return J}function lt(re,J){for(var k,$,q,he=[],de=0;de<re.length&&!((J-=2)<0);++de)k=re.charCodeAt(de),$=k>>8,q=k%256,he.push(q),he.push($);return he}function at(re){return G.toByteArray(Ne(re))}function je(re,J,k,$){for(var q=0;q<$&&!(q+k>=J.length||q>=re.length);++q)J[q+k]=re[q];return q}function rt(re){return re!==re}}).call(this,j("IyRk"))},IBYe:function(ht,_e,j){"use strict";function se(G){return null}_e.a=se},J66h:function(ht,_e,j){(function(se){var G,D;(function(V,F){ht.exports=F(V)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof se!="undefined"?se:this,function(V){"use strict";V=V||{};var F=V.Base64,O="2.6.4",X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P=function(h){for(var L={},N=0,T=h.length;N<T;N++)L[h.charAt(N)]=N;return L}(X),e=String.fromCharCode,R=function(h){if(h.length<2){var L=h.charCodeAt(0);return L<128?h:L<2048?e(192|L>>>6)+e(128|L&63):e(224|L>>>12&15)+e(128|L>>>6&63)+e(128|L&63)}else{var L=65536+(h.charCodeAt(0)-55296)*1024+(h.charCodeAt(1)-56320);return e(240|L>>>18&7)+e(128|L>>>12&63)+e(128|L>>>6&63)+e(128|L&63)}},m=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,v=function(h){return h.replace(m,R)},u=function(h){var L=[0,2,1][h.length%3],N=h.charCodeAt(0)<<16|(h.length>1?h.charCodeAt(1):0)<<8|(h.length>2?h.charCodeAt(2):0),T=[X.charAt(N>>>18),X.charAt(N>>>12&63),L>=2?"=":X.charAt(N>>>6&63),L>=1?"=":X.charAt(N&63)];return T.join("")},s=V.btoa&&typeof V.btoa=="function"?function(h){return V.btoa(h)}:function(h){if(h.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return h.replace(/[\s\S]{1,3}/g,u)},a=function(h){return s(v(String(h)))},A=function(h){return h.replace(/[+\/]/g,function(L){return L=="+"?"-":"_"}).replace(/=/g,"")},o=function(h,L){return L?A(a(h)):a(h)},i=function(h){return o(h,!0)},r;V.Uint8Array&&(r=function(h,L){for(var N="",T=0,M=h.length;T<M;T+=3){var W=h[T],U=h[T+1],Y=h[T+2],ne=W<<16|U<<8|Y;N+=X.charAt(ne>>>18)+X.charAt(ne>>>12&63)+(typeof U!="undefined"?X.charAt(ne>>>6&63):"=")+(typeof Y!="undefined"?X.charAt(ne&63):"=")}return L?A(N):N});var t=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(h){switch(h.length){case 4:var L=(7&h.charCodeAt(0))<<18|(63&h.charCodeAt(1))<<12|(63&h.charCodeAt(2))<<6|63&h.charCodeAt(3),N=L-65536;return e((N>>>10)+55296)+e((N&1023)+56320);case 3:return e((15&h.charCodeAt(0))<<12|(63&h.charCodeAt(1))<<6|63&h.charCodeAt(2));default:return e((31&h.charCodeAt(0))<<6|63&h.charCodeAt(1))}},_=function(h){return h.replace(t,E)},y=function(h){var L=h.length,N=L%4,T=(L>0?P[h.charAt(0)]<<18:0)|(L>1?P[h.charAt(1)]<<12:0)|(L>2?P[h.charAt(2)]<<6:0)|(L>3?P[h.charAt(3)]:0),M=[e(T>>>16),e(T>>>8&255),e(T&255)];return M.length-=[0,0,2,1][N],M.join("")},B=V.atob&&typeof V.atob=="function"?function(h){return V.atob(h)}:function(h){return h.replace(/\S{1,4}/g,y)},C=function(h){return B(String(h).replace(/[^A-Za-z0-9\+\/]/g,""))},d=function(h){return _(B(h))},n=function(h){return String(h).replace(/[-_]/g,function(L){return L=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},l=function(h){return d(n(h))},c;V.Uint8Array&&(c=function(h){return Uint8Array.from(C(n(h)),function(L){return L.charCodeAt(0)})});var b=function(){var h=V.Base64;return V.Base64=F,h};if(V.Base64={VERSION:O,atob:C,btoa:s,fromBase64:l,toBase64:o,utob:v,encode:o,encodeURI:i,btou:_,decode:l,noConflict:b,fromUint8Array:r,toUint8Array:c},typeof Object.defineProperty=="function"){var g=function(h){return{value:h,enumerable:!1,writable:!0,configurable:!0}};V.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",g(function(){return l(this)})),Object.defineProperty(String.prototype,"toBase64",g(function(h){return o(this,h)})),Object.defineProperty(String.prototype,"toBase64URI",g(function(){return o(this,!0)}))}}return V.Meteor&&(Base64=V.Base64),ht.exports?ht.exports.Base64=V.Base64:!(G=[],D=function(){return V.Base64}.apply(_e,G),D!==void 0&&(ht.exports=D)),{Base64:V.Base64}})}).call(this,j("IyRk"))},JYp7:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return se});var se;(function(G){function D(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}G.is=D;const V=Object.freeze([]);function F(){return V}G.empty=F;function*O(t){yield t}G.single=O;function X(t){return t||V}G.from=X;function P(t){return!t||t[Symbol.iterator]().next().done===!0}G.isEmpty=P;function e(t){return t[Symbol.iterator]().next().value}G.first=e;function R(t,E){for(const _ of t)if(E(_))return!0;return!1}G.some=R;function m(t,E){for(const _ of t)if(E(_))return _;return}G.find=m;function*v(t,E){for(const _ of t)E(_)&&(yield _)}G.filter=v;function*u(t,E){let _=0;for(const y of t)yield E(y,_++)}G.map=u;function*s(...t){for(const E of t)for(const _ of E)yield _}G.concat=s;function*a(t){for(const E of t)for(const _ of E)yield _}G.concatNested=a;function A(t,E,_){let y=_;for(const B of t)y=E(y,B);return y}G.reduce=A;function*o(t,E,_=t.length){for(E<0&&(E+=t.length),_<0?_+=t.length:_>t.length&&(_=t.length);E<_;E++)yield t[E]}G.slice=o;function i(t,E=Number.POSITIVE_INFINITY){const _=[];if(E===0)return[_,t];const y=t[Symbol.iterator]();for(let B=0;B<E;B++){const C=y.next();if(C.done)return[_,G.empty()];_.push(C.value)}return[_,{[Symbol.iterator](){return y}}]}G.consume=i;function r(t,E,_=(y,B)=>y===B){const y=t[Symbol.iterator](),B=E[Symbol.iterator]();for(;;){const C=y.next(),d=B.next();if(C.done!==d.done)return!1;if(C.done)return!0;if(!_(C.value,d.value))return!1}}G.equals=r})(se||(se={}))},LdHM:function(ht,_e,j){"use strict";j.d(_e,"b",function(){return t}),j.d(_e,"a",function(){return _});var se=j("1OyB"),G=j("vuIU"),D=j("Ji7U"),V=j("LK+K"),F=j("q1tI"),O=j("rePB"),X=j("Ff2n"),P=j("ODXe"),e=j("4IlW"),R=j("bX4T"),m=j("YrtM"),v=j("TSYQ"),u=j.n(v),s=j("+nKL"),a=j("8OUc"),A=function(Y,ne){var me=Y.prefixCls,ge=Y.id,Oe=Y.flattenOptions,Se=Y.childrenAsData,Be=Y.values,Ne=Y.searchValue,ke=Y.multiple,Ce=Y.defaultActiveFirstOption,ve=Y.height,Xe=Y.itemHeight,lt=Y.notFoundContent,at=Y.open,je=Y.menuItemSelectedIcon,rt=Y.virtual,re=Y.onSelect,J=Y.onToggleOpen,k=Y.onActiveValue,$=Y.onScroll,q=Y.onMouseEnter,he="".concat(me,"-item"),de=Object(m.a)(function(){return Oe},[at,Oe],function(Fe,we){return we[0]&&Fe[1]!==we[1]}),Qe=F.useRef(null),ze=function(we){we.preventDefault()},Ge=function(we){Qe.current&&Qe.current.scrollTo({index:we})},$e=function(we){for(var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ce=de.length,te=0;te<ce;te+=1){var ie=(we+te*ue+ce)%ce,le=de[ie],pe=le.group,Ie=le.data;if(!pe&&!Ie.disabled)return ie}return-1},nt=F.useState(function(){return $e(0)}),dt=Object(P.a)(nt,2),xe=dt[0],Ue=dt[1],Ke=function(we){Ue(we);var ue=de[we];if(!ue){k(null,-1);return}k(ue.data.value,we)};F.useEffect(function(){Ke(Ce!==!1?$e(0):-1)},[de.length,Ne]),F.useEffect(function(){var Fe=setTimeout(function(){if(!ke&&at&&Be.size===1){var we=Array.from(Be)[0],ue=de.findIndex(function(ce){var te=ce.data;return te.value===we});Ke(ue),Ge(ue)}});return function(){return clearTimeout(Fe)}},[at]);var We=function(we){we!==void 0&&re(we,{selected:!Be.has(we)}),ke||J(!1)};if(F.useImperativeHandle(ne,function(){return{onKeyDown:function(we){var ue=we.which;switch(ue){case e.a.UP:case e.a.DOWN:{var ce=0;if(ue===e.a.UP?ce=-1:ue===e.a.DOWN&&(ce=1),ce!==0){var te=$e(xe+ce,ce);Ge(te),Ke(te)}break}case e.a.ENTER:{var ie=de[xe];ie&&!ie.data.disabled?We(ie.data.value):We(void 0),at&&we.preventDefault();break}case e.a.ESC:J(!1)}},onKeyUp:function(){},scrollTo:function(we){Ge(we)}}}),de.length===0)return F.createElement("div",{role:"listbox",id:"".concat(ge,"_list"),className:"".concat(he,"-empty"),onMouseDown:ze},lt);function Le(Fe){var we=de[Fe];if(!we)return null;var ue=we.data||{},ce=ue.value,te=ue.label,ie=ue.children,le=Object(R.a)(ue,!0),pe=Se?ie:te;return we?F.createElement("div",Object.assign({"aria-label":typeof pe=="string"?pe:null},le,{key:Fe,role:"option",id:"".concat(ge,"_list_").concat(Fe),"aria-selected":Be.has(ce)}),ce):null}return F.createElement(F.Fragment,null,F.createElement("div",{role:"listbox",id:"".concat(ge,"_list"),style:{height:0,width:0,overflow:"hidden"}},Le(xe-1),Le(xe),Le(xe+1)),F.createElement(s.a,{itemKey:"key",ref:Qe,data:de,height:ve,itemHeight:Xe,fullHeight:!1,onMouseDown:ze,onScroll:$,virtual:rt,onMouseEnter:q},function(Fe,we){var ue,ce=Fe.group,te=Fe.groupOption,ie=Fe.data,le=ie.label,pe=ie.key;if(ce)return F.createElement("div",{className:u()(he,"".concat(he,"-group"))},le!==void 0?le:pe);var Ie=ie.disabled,Pe=ie.value,qe=ie.title,ft=ie.children,ut=ie.style,st=ie.className,Lt=Object(X.a)(ie,["disabled","value","title","children","style","className"]),mt=Be.has(Pe),tt="".concat(he,"-option"),er=u()(he,tt,st,(ue={},Object(O.a)(ue,"".concat(tt,"-grouped"),te),Object(O.a)(ue,"".concat(tt,"-active"),xe===we&&!Ie),Object(O.a)(ue,"".concat(tt,"-disabled"),Ie),Object(O.a)(ue,"".concat(tt,"-selected"),mt),ue)),Jt=Se?ft:le,Ot=!je||typeof je=="function"||mt;return F.createElement("div",Object.assign({},Lt,{"aria-selected":mt,className:er,title:qe,onMouseMove:function(){if(xe===we||Ie)return;Ke(we)},onClick:function(){Ie||We(Pe)},style:ut}),F.createElement("div",{className:"".concat(tt,"-content")},Jt||Pe),F.isValidElement(je)||mt,Ot&&F.createElement(a.a,{className:"".concat(he,"-option-state"),customizeIcon:je,customizeIconProps:{isSelected:mt}},mt?"\u2713":null))}))},o=F.forwardRef(A);o.displayName="OptionList";var i=o,r=function(){return null};r.isSelectOption=!0;var t=r,E=function(){return null};E.isSelectOptGroup=!0;var _=E,y=j("VTBJ"),B=j("Zm9Q");function C(U){var Y=U.key,ne=U.props,me=ne.children,ge=ne.value,Oe=Object(X.a)(ne,["children","value"]);return Object(y.a)({key:Y,value:ge!==void 0?ge:Y,children:me},Oe)}function d(U){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(B.a)(U).map(function(ne,me){if(!F.isValidElement(ne)||!ne.type)return null;var ge=ne.type.isSelectOptGroup,Oe=ne.key,Se=ne.props,Be=Se.children,Ne=Object(X.a)(Se,["children"]);return Y||!ge?C(ne):Object(y.a)(Object(y.a)({key:"__RC_SELECT_GRP__".concat(Oe===null?me:Oe,"__"),label:Oe},Ne),{},{options:d(Be)})}).filter(function(ne){return ne})}var n=j("2Qr1"),l=j("qNPg"),c=j("U8pU"),b=j("Kwbf"),g=j("WKfj");function h(U){var Y=U.mode,ne=U.options,me=U.children,ge=U.backfill,Oe=U.allowClear,Se=U.placeholder,Be=U.getInputElement,Ne=U.showSearch,ke=U.onSearch,Ce=U.defaultOpen,ve=U.autoFocus,Xe=U.labelInValue,lt=U.value,at=U.inputValue,je=U.optionLabelProp,rt=Y==="multiple"||Y==="tags",re=Ne!==void 0?Ne:rt||Y==="combobox",J=ne||d(me);if(Object(b.a)(Y!=="tags"||J.every(function(he){return!he.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Y==="tags"||Y==="combobox"){var k=J.some(function(he){return he.options?he.options.some(function(de){return typeof("value"in de?de.value:de.key)=="number"}):typeof("value"in he?he.value:he.key)=="number"});Object(b.a)(!k,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(b.a)(Y!=="combobox"||!je,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(b.a)(Y==="combobox"||!ge,"`backfill` only works with `combobox` mode."),Object(b.a)(Y==="combobox"||!Be,"`getInputElement` only work with `combobox` mode."),Object(b.b)(Y!=="combobox"||!Be||!Oe||!Se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ke&&!re&&Y!=="combobox"&&Y!=="tags"&&Object(b.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(b.b)(!Ce||ve,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),lt!=null){var $=Object(g.d)(lt);Object(b.a)(!Xe||$.every(function(he){return Object(c.a)(he)==="object"&&("key"in he||"value"in he)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(b.a)(!rt||Array.isArray(lt),"`value` should be array when `mode` is `multiple` or `tags`")}if(me){var q=null;Object(B.a)(me).some(function(he){if(!F.isValidElement(he)||!he.type)return!1;var de=he.type;if(de.isSelectOption)return!1;if(de.isSelectOptGroup){var Qe=Object(B.a)(he.props.children).every(function(ze){return!F.isValidElement(ze)||!he.type||ze.type.isSelectOption?!0:(q=ze.type,!1)});return!Qe}return q=de,!0}),q&&Object(b.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(q.displayName||q.name||q,"`.")),Object(b.a)(at===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var L=h,N=Object(l.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:d,flattenOptions:n.d,getLabeledValue:n.e,filterOptions:n.b,isValueDisabled:n.g,findValueOption:n.c,warningProps:L,fillOptionsWithMissingValue:n.a}),T=function(U){Object(D.a)(ne,U);var Y=Object(V.a)(ne);function ne(){var me;return Object(se.a)(this,ne),me=Y.apply(this,arguments),me.selectRef=F.createRef(),me.focus=function(){me.selectRef.current.focus()},me.blur=function(){me.selectRef.current.blur()},me}return Object(G.a)(ne,[{key:"render",value:function(){return F.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),ne}(F.Component);T.Option=t,T.OptGroup=_;var M=T,W=_e.c=M},MI8n:function(ht,_e,j){"use strict";j.d(_e,"c",function(){return F}),j.d(_e,"b",function(){return e}),j.d(_e,"e",function(){return R}),j.d(_e,"a",function(){return m}),j.d(_e,"d",function(){return v}),j.d(_e,"f",function(){return u});var se=j("/cxE"),G=j("pmY6"),D=j("24hK"),V=j("5Y4S"),F;(function(s){s.None=()=>G.a.None;function a(h){return(L,N=null,T)=>{let M=!1,W;return W=h(U=>M?void 0:(W?W.dispose():M=!0,L.call(N,U)),null,T),M&&W.dispose(),W}}s.once=a;function A(h,L){return _((N,T=null,M)=>h(W=>N.call(T,L(W)),null,M))}s.map=A;function o(h,L){return _((N,T=null,M)=>h(W=>{L(W),N.call(T,W)},null,M))}s.forEach=o;function i(h,L){return _((N,T=null,M)=>h(W=>L(W)&&N.call(T,W),null,M))}s.filter=i;function r(h){return h}s.signal=r;function t(...h){return(L,N=null,T)=>Object(G.e)(...h.map(M=>M(W=>L.call(N,W),null,T)))}s.any=t;function E(h,L,N){let T=N;return A(h,M=>(T=L(T,M),T))}s.reduce=E;function _(h){let L;const N=new e({onFirstListenerAdd(){L=h(N.fire,N)},onLastListenerRemove(){L.dispose()}});return N.event}function y(h,L,N=100,T=!1,M){let W,U,Y,ne=0;const me=new e({leakWarningThreshold:M,onFirstListenerAdd(){W=h(ge=>{ne++,U=L(U,ge),T&&!Y&&(me.fire(U),U=void 0),clearTimeout(Y),Y=setTimeout(()=>{const Oe=U;U=void 0,Y=void 0,(!T||ne>1)&&me.fire(Oe),ne=0},N)})},onLastListenerRemove(){W.dispose()}});return me.event}s.debounce=y;function B(h,L=(N,T)=>N===T){let N=!0,T;return i(h,M=>{const W=N||!L(M,T);return N=!1,T=M,W})}s.latch=B;function C(h,L){return[s.filter(h,L),s.filter(h,N=>!L(N))]}s.split=C;function d(h,L=!1,N=[]){let T=N.slice(),M=h(Y=>{T?T.push(Y):U.fire(Y)});const W=()=>{T&&T.forEach(Y=>U.fire(Y)),T=null},U=new e({onFirstListenerAdd(){M||(M=h(Y=>U.fire(Y)))},onFirstListenerDidAdd(){T&&(L?setTimeout(W):W())},onLastListenerRemove(){M&&M.dispose(),M=null}});return U.event}s.buffer=d;class n{constructor(h){this.event=h}map(h){return new n(A(this.event,h))}forEach(h){return new n(o(this.event,h))}filter(h){return new n(i(this.event,h))}reduce(h,L){return new n(E(this.event,h,L))}latch(){return new n(B(this.event))}debounce(h,L=100,N=!1,T){return new n(y(this.event,h,L,N,T))}on(h,L,N){return this.event(h,L,N)}once(h,L,N){return a(this.event)(h,L,N)}}function l(h){return new n(h)}s.chain=l;function c(h,L,N=T=>T){const T=(...Y)=>U.fire(N(...Y)),M=()=>h.on(L,T),W=()=>h.removeListener(L,T),U=new e({onFirstListenerAdd:M,onLastListenerRemove:W});return U.event}s.fromNodeEventEmitter=c;function b(h,L,N=T=>T){const T=(...Y)=>U.fire(N(...Y)),M=()=>h.addEventListener(L,T),W=()=>h.removeEventListener(L,T),U=new e({onFirstListenerAdd:M,onLastListenerRemove:W});return U.event}s.fromDOMEventEmitter=b;function g(h){return new Promise(L=>a(h)(L))}s.toPromise=g})(F||(F={}));class O{constructor(s){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${s}_${O._idPool++}`}start(s){this._stopWatch=new V.a(!0),this._listenerCount=s}stop(){if(this._stopWatch){const s=this._stopWatch.elapsed();this._elapsedOverall+=s,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${s.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}O._idPool=0;let X=-1;class P{constructor(s,a=Math.random().toString(18).slice(2,5)){this.customThreshold=s,this.name=a,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(s){let a=X;if(typeof this.customThreshold=="number"&&(a=this.customThreshold),a<=0||s<a)return;this._stacks||(this._stacks=new Map);const A=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),o=this._stacks.get(A)||0;if(this._stacks.set(A,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=a*.5;let i,r=0;for(const[t,E]of this._stacks)(!i||r<E)&&(i=t,r=E);console.warn(`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${r}):`),console.warn(i)}return()=>{const i=this._stacks.get(A)||0;this._stacks.set(A,i-1)}}}class e{constructor(s){var a;this._disposed=!1,this._options=s,this._leakageMon=X>0?new P(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((a=this._options)===null||a===void 0?void 0:a._profName)?new O(this._options._profName):void 0}get event(){return this._event||(this._event=(s,a,A)=>{var o;this._listeners||(this._listeners=new D.a);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(a?[s,a]:s);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,a);const t=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),E=Object(G.i)(()=>{if(t&&t(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const _=this._listeners&&!this._listeners.isEmpty();_||this._options.onLastListenerRemove(this)}});return A instanceof G.b?A.add(E):Array.isArray(A)&&A.push(E),E}),this._event}fire(s){var a,A;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new D.a);for(let o of this._listeners)this._deliveryQueue.push([o,s]);for((a=this._perfMon)===null||a===void 0||a.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,i]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,i):o[0].call(o[1],i)}catch(r){Object(se.f)(r)}}(A=this._perfMon)===null||A===void 0||A.stop()}}dispose(){var s,a,A,o,i;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(a=this._deliveryQueue)===null||a===void 0||a.clear(),(o=(A=this._options)===null||A===void 0?void 0:A.onLastListenerRemove)===null||o===void 0||o.call(A),(i=this._leakageMon)===null||i===void 0||i.dispose())}}class R extends e{constructor(s){super(s);this._isPaused=0,this._eventQueue=new D.a,this._mergeFn=s==null?void 0:s.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const s=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(s))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(s){this._listeners&&(this._isPaused!==0?this._eventQueue.push(s):super.fire(s))}}class m extends R{constructor(s){var a;super(s);this._delay=(a=s.delay)!==null&&a!==void 0?a:100}fire(s){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(s)}}class v{constructor(){this.buffers=[]}wrapEvent(s){return(a,A,o)=>s(i=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>a.call(A,i)):a.call(A,i)},void 0,o)}bufferEvents(s){const a=[];this.buffers.push(a);const A=s();return this.buffers.pop(),a.forEach(o=>o()),A}}class u{constructor(){this.listening=!1,this.inputEvent=F.None,this.inputEventListener=G.a.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(s){this.inputEvent=s,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=s(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(ht,_e,j){"use strict";(function(se,G){j.d(_e,"b",function(){return A}),j.d(_e,"i",function(){return t}),j.d(_e,"f",function(){return E}),j.d(_e,"d",function(){return _}),j.d(_e,"g",function(){return y}),j.d(_e,"h",function(){return B}),j.d(_e,"c",function(){return C}),j.d(_e,"k",function(){return d}),j.d(_e,"j",function(){return n}),j.d(_e,"a",function(){return l}),j.d(_e,"e",function(){return g});var D;const V="en";let F=!1,O=!1,X=!1,P=!1,e=!1,R=!1,m=!1,v,u=V,s,a;const A=typeof self=="object"?self:typeof se=="object"?se:{};let o;typeof A.vscode!="undefined"&&typeof A.vscode.process!="undefined"?o=A.vscode.process:typeof G!="undefined"&&(o=G);const i=typeof((D=o==null?void 0:o.versions)===null||D===void 0?void 0:D.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!i)a=navigator.userAgent,F=a.indexOf("Windows")>=0,O=a.indexOf("Macintosh")>=0,m=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,X=a.indexOf("Linux")>=0,R=!0,v=navigator.language,u=v;else if(typeof o=="object"){F=o.platform==="win32",O=o.platform==="darwin",X=o.platform==="linux",P=X&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,v=V,u=V;const h=o.env.VSCODE_NLS_CONFIG;if(h)try{const L=JSON.parse(h),N=L.availableLanguages["*"];v=L.locale,u=N||V,s=L._translationsConfigFile}catch(L){}e=!0}else console.error("Unable to resolve platform.");let r=0;O?r=1:F?r=3:X&&(r=2);const t=F,E=O,_=X,y=e,B=R,C=m,d=a,n=function(){if(A.setImmediate)return A.setImmediate.bind(A);if(typeof A.postMessage=="function"&&!A.importScripts){let N=[];A.addEventListener("message",M=>{if(M.data&&M.data.vscodeSetImmediateId)for(let W=0,U=N.length;W<U;W++){const Y=N[W];if(Y.id===M.data.vscodeSetImmediateId){N.splice(W,1),Y.callback();return}}});let T=0;return M=>{const W=++T;N.push({id:W,callback:M}),A.postMessage({vscodeSetImmediateId:W},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const L=Promise.resolve();return N=>L.then(N)}(),l=O||m?2:F?1:3;let c=!0,b=!1;function g(){if(!b){b=!0;const h=new Uint8Array(2);h[0]=1,h[1]=2;const L=new Uint16Array(h.buffer);c=L[0]===(2<<8)+1}return c}}).call(this,j("IyRk"),j("Q2Ig"))},N0LK:function(ht,_e,j){"use strict";j.d(_e,"C",function(){return se}),j.d(_e,"v",function(){return D}),j.d(_e,"s",function(){return V}),j.d(_e,"t",function(){return F}),j.d(_e,"U",function(){return O}),j.d(_e,"J",function(){return X}),j.d(_e,"O",function(){return P}),j.d(_e,"p",function(){return e}),j.d(_e,"T",function(){return R}),j.d(_e,"q",function(){return m}),j.d(_e,"N",function(){return v}),j.d(_e,"M",function(){return u}),j.d(_e,"Q",function(){return s}),j.d(_e,"u",function(){return a}),j.d(_e,"x",function(){return A}),j.d(_e,"I",function(){return o}),j.d(_e,"f",function(){return i}),j.d(_e,"h",function(){return r}),j.d(_e,"g",function(){return t}),j.d(_e,"i",function(){return E}),j.d(_e,"G",function(){return _}),j.d(_e,"H",function(){return y}),j.d(_e,"r",function(){return B}),j.d(_e,"R",function(){return C}),j.d(_e,"d",function(){return d}),j.d(_e,"e",function(){return n}),j.d(_e,"E",function(){return l}),j.d(_e,"F",function(){return c}),j.d(_e,"j",function(){return b}),j.d(_e,"z",function(){return g}),j.d(_e,"K",function(){return L}),j.d(_e,"L",function(){return N}),j.d(_e,"m",function(){return M}),j.d(_e,"k",function(){return U}),j.d(_e,"A",function(){return ne}),j.d(_e,"a",function(){return me}),j.d(_e,"n",function(){return ge}),j.d(_e,"l",function(){return Oe}),j.d(_e,"D",function(){return Se}),j.d(_e,"B",function(){return Be}),j.d(_e,"b",function(){return Ne}),j.d(_e,"S",function(){return ke}),j.d(_e,"o",function(){return Ce}),j.d(_e,"P",function(){return ve}),j.d(_e,"w",function(){return Xe}),j.d(_e,"c",function(){return lt}),j.d(_e,"y",function(){return rt});function se($){return!$||typeof $!="string"?!0:$.trim().length===0}const G=/{(\d+)}/g;function D($,...q){return q.length===0?$:$.replace(G,function(he,de){const Qe=parseInt(de,10);return isNaN(Qe)||Qe<0||Qe>=q.length?he:q[Qe]})}function V($){return $.replace(/[<>&]/g,function(q){switch(q){case"<":return"<";case">":return">";case"&":return"&";default:return q}})}function F($){return $.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function O($,q=" "){const he=X($,q);return P(he,q)}function X($,q){if(!$||!q)return $;const he=q.length;if(he===0||$.length===0)return $;let de=0;for(;$.indexOf(q,de)===de;)de=de+he;return $.substring(de)}function P($,q){if(!$||!q)return $;const he=q.length,de=$.length;if(he===0||de===0)return $;let Qe=de,ze=-1;for(;!(ze=$.lastIndexOf(q,Qe-1),ze===-1||ze+he!==Qe);){if(ze===0)return"";Qe=ze}return $.substring(0,Qe)}function e($){return $.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function R($){return $.replace(/\*/g,"")}function m($,q,he={}){if(!$)throw new Error("Cannot create regex from empty string");q||($=F($)),he.wholeWord&&(/\B/.test($.charAt(0))||($="\\b"+$),/\B/.test($.charAt($.length-1))||($=$+"\\b"));let de="";return he.global&&(de+="g"),he.matchCase||(de+="i"),he.multiline&&(de+="m"),he.unicode&&(de+="u"),new RegExp($,de)}function v($){if($.source==="^"||$.source==="^$"||$.source==="$"||$.source==="^\\s*$")return!1;const q=$.exec("");return!!(q&&$.lastIndex===0)}function u($){return($.global?"g":"")+($.ignoreCase?"i":"")+($.multiline?"m":"")+($.unicode?"u":"")}function s($){return $.split(/\r\n|\r|\n/)}function a($){for(let q=0,he=$.length;q<he;q++){const de=$.charCodeAt(q);if(de!==32&&de!==9)return q}return-1}function A($,q=0,he=$.length){for(let de=q;de<he;de++){const Qe=$.charCodeAt(de);if(Qe!==32&&Qe!==9)return $.substring(q,de)}return $.substring(q,he)}function o($,q=$.length-1){for(let he=q;he>=0;he--){const de=$.charCodeAt(he);if(de!==32&&de!==9)return he}return-1}function i($,q){return $<q?-1:$>q?1:0}function r($,q,he=0,de=$.length,Qe=0,ze=q.length){for(;he<de&&Qe<ze;he++,Qe++){let nt=$.charCodeAt(he),dt=q.charCodeAt(Qe);if(nt<dt)return-1;if(nt>dt)return 1}const Ge=de-he,$e=ze-Qe;return Ge<$e?-1:Ge>$e?1:0}function t($,q){return E($,q,0,$.length,0,q.length)}function E($,q,he=0,de=$.length,Qe=0,ze=q.length){for(;he<de&&Qe<ze;he++,Qe++){let nt=$.charCodeAt(he),dt=q.charCodeAt(Qe);if(nt===dt)continue;if(nt>=128||dt>=128)return r($.toLowerCase(),q.toLowerCase(),he,de,Qe,ze);_(nt)&&(nt-=32),_(dt)&&(dt-=32);const xe=nt-dt;if(xe===0)continue;return xe}const Ge=de-he,$e=ze-Qe;return Ge<$e?-1:Ge>$e?1:0}function _($){return $>=97&&$<=122}function y($){return $>=65&&$<=90}function B($,q){return $.length===q.length&&E($,q)===0}function C($,q){const he=q.length;return q.length>$.length?!1:E($,q,0,he)===0}function d($,q){let he,de=Math.min($.length,q.length);for(he=0;he<de;he++)if($.charCodeAt(he)!==q.charCodeAt(he))return he;return de}function n($,q){let he,de=Math.min($.length,q.length);const Qe=$.length-1,ze=q.length-1;for(he=0;he<de;he++)if($.charCodeAt(Qe-he)!==q.charCodeAt(ze-he))return he;return de}function l($){return 55296<=$&&$<=56319}function c($){return 56320<=$&&$<=57343}function b($,q){return($-55296<<10)+(q-56320)+65536}function g($,q,he){const de=$.charCodeAt(he);if(l(de)&&he+1<q){const Qe=$.charCodeAt(he+1);if(c(Qe))return b(de,Qe)}return de}function h($,q){const he=$.charCodeAt(q-1);if(c(he)&&q>1){const de=$.charCodeAt(q-2);if(l(de))return b(de,he)}return he}function L($,q){const he=at.getInstance(),de=q,Qe=$.length,ze=g($,Qe,q);q+=ze>=65536?2:1;let Ge=he.getGraphemeBreakType(ze);for(;q<Qe;){const $e=g($,Qe,q),nt=he.getGraphemeBreakType($e);if(lt(Ge,nt))break;q+=$e>=65536?2:1,Ge=nt}return q-de}function N($,q){const he=at.getInstance(),de=q,Qe=h($,q);q-=Qe>=65536?2:1;let ze=he.getGraphemeBreakType(Qe);for(;q>0;){const Ge=h($,q),$e=he.getGraphemeBreakType(Ge);if(lt($e,ze))break;q-=Ge>=65536?2:1,ze=$e}return de-q}const T=/(?:[\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 M($){return T.test($)}const W=/(?:[\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 U($){return W.test($)}const Y=/^[\t\n\r\x20-\x7E]*$/;function ne($){return Y.test($)}const me=/[\u2028\u2029]/;function ge($){return me.test($)}function Oe($){for(let q=0,he=$.length;q<he;q++)if(Se($.charCodeAt(q)))return!0;return!1}function Se($){return $=+$,$>=11904&&$<=55215||$>=63744&&$<=64255||$>=65281&&$<=65374}function Be($){return $>=127462&&$<=127487||$===8986||$===8987||$===9200||$===9203||$>=9728&&$<=10175||$===11088||$===11093||$>=127744&&$<=128591||$>=128640&&$<=128764||$>=128992&&$<=129003||$>=129280&&$<=129535||$>=129648&&$<=129750}const Ne=String.fromCharCode(65279);function ke($){return!!($&&$.length>0&&$.charCodeAt(0)===65279)}function Ce($,q=!1){return $?(q&&($=$.replace(/\\./g,"")),$.toLowerCase()!==$):!1}function ve($){const q=90-65+1;return $=$%(2*q),$<q?String.fromCharCode(97+$):String.fromCharCode(65+$-q)}function Xe($){const q=at.getInstance();return q.getGraphemeBreakType($)}function lt($,q){return $===0?q!==5&&q!==7:$===2&&q===3?!1:$===4||$===2||$===3||(q===4||q===2||q===3)?!0:$===8&&(q===8||q===9||q===11||q===12)||(($===11||$===9)&&(q===9||q===10)||(($===12||$===10)&&q===10||(q===5||q===13||(q===7||($===1||$===13&&q===14)))))?!1:!($===6&&q===6)}class at{constructor(){this._data=je()}static getInstance(){return at._INSTANCE||(at._INSTANCE=new at),at._INSTANCE}getGraphemeBreakType($){if($<32)return $===10?3:$===13?2:4;if($<127)return 0;const q=this._data,he=q.length/3;let de=1;for(;de<=he;)if($<q[3*de])de=2*de;else if($>q[3*de+1])de=2*de+1;else return q[3*de+2];return 0}}at._INSTANCE=null;function je(){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 rt($,q){if($===0)return 0;const he=re($,q);if(he!==void 0)return he;const de=h(q,$);return $-=J(de),$}function re($,q){let he=h(q,$);for($-=J(he);k(he)||he===65039||he===8419;){if($===0)return;he=h(q,$),$-=J(he)}if(!Be(he))return;if($>=0){const de=h(q,$);de===8205&&($-=J(de))}return $}function J($){return $>=65536?2:1}function k($){return 127995<=$&&$<=127999}},NKYn:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return e});var se=j("14J3"),G=j("BMrR"),D=j("jCWc"),V=j("kPKH"),F=j("tJVT"),O=j("q1tI"),X=j.n(O),P=j("9Bee"),e=function(m){var v=m.data,u=Object(O.useState)(!1),s=Object(F.a)(u,2),a=s[0],A=s[1],o=function(){var r,t;switch(v.question_type){case 3:return X.a.createElement("aside",{className:"mt20"},X.a.createElement("span",{style:{cursor:"pointer"},className:"font14 c-blue current",onClick:function(){A(!a)}},a?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),a&&X.a.createElement("div",null,v==null||((r=v.standard_answer)===null||r===void 0)?void 0:r.map(function(E,_){var y;return X.a.createElement(G.a,{style:{alignItems:"baseline"},className:"mr20"},X.a.createElement(V.a,{flex:"50px"},X.a.createElement("span",{className:"mt10"},"\u586B\u7A7A",E.choice_id,":")),X.a.createElement(V.a,{flex:1},E==null||((y=E.answer_text)===null||y===void 0)?void 0:y.map(function(B,C){return X.a.createElement("div",null,B)})))})));case 4:return X.a.createElement("aside",{className:"mt20"},X.a.createElement("span",{style:{cursor:"pointer"},className:"font14 c-blue current",onClick:function(){A(!a)}},a?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),a&&X.a.createElement("div",null,X.a.createElement(P.a,{value:v==null||((t=v.standard_answer)===null||t===void 0)?void 0:t.join(" ")})))}};return X.a.createElement("section",null,o())}},NvD2:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return O});var se=j("Kwbf");function G(X,P){var e=new Set;return X.forEach(function(R){P.has(R)||e.add(R)}),e}function D(X){var P=X||{},e=P.disabled,R=P.disableCheckbox,m=P.checkable;return!!(e||R)||m===!1}function V(X,P,e,R){for(var m=new Set(X),v=new Set,u=0;u<=e;u+=1){var s=P.get(u)||new Set;s.forEach(function(i){var r=i.key,t=i.node,E=i.children,_=E===void 0?[]:E;m.has(r)&&!R(t)&&_.filter(function(y){return!R(y.node)}).forEach(function(y){m.add(y.key)})})}for(var a=new Set,A=e;A>=0;A-=1){var o=P.get(A)||new Set;o.forEach(function(i){var r=i.parent,t=i.node;if(R(t)||!i.parent||a.has(i.parent.key))return;if(R(i.parent.node)){a.add(r.key);return}var E=!0,_=!1;(r.children||[]).filter(function(y){return!R(y.node)}).forEach(function(y){var B=y.key,C=m.has(B);E&&!C&&(E=!1),!_&&(C||v.has(B))&&(_=!0)}),E&&m.add(r.key),_&&v.add(r.key),a.add(r.key)})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(G(v,m))}}function F(X,P,e,R,m){for(var v=new Set(X),u=new Set(P),s=0;s<=R;s+=1){var a=e.get(s)||new Set;a.forEach(function(r){var t=r.key,E=r.node,_=r.children,y=_===void 0?[]:_;!v.has(t)&&!u.has(t)&&!m(E)&&y.filter(function(B){return!m(B.node)}).forEach(function(B){v.delete(B.key)})})}u=new Set;for(var A=new Set,o=R;o>=0;o-=1){var i=e.get(o)||new Set;i.forEach(function(r){var t=r.parent,E=r.node;if(m(E)||!r.parent||A.has(r.parent.key))return;if(m(r.parent.node)){A.add(t.key);return}var _=!0,y=!1;(t.children||[]).filter(function(B){return!m(B.node)}).forEach(function(B){var C=B.key,d=v.has(C);_&&!d&&(_=!1),!y&&(d||u.has(C))&&(y=!0)}),_||v.delete(t.key),y&&u.add(t.key),A.add(t.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(G(u,v))}}function O(X,P,e,R){var m=[],v;R?v=R:v=D;var u=new Set(X.filter(function(o){var i=!!e[o];return i||m.push(o),i})),s=new Map,a=0;Object.keys(e).forEach(function(o){var i=e[o],r=i.level,t=s.get(r);t||(t=new Set,s.set(r,t)),t.add(i),a=Math.max(a,r)}),Object(se.a)(!m.length,"Tree missing follow keys: ".concat(m.slice(0,100).map(function(o){return"'".concat(o,"'")}).join(", ")));var A;return P===!0?A=V(u,s,a,v):A=F(u,P.halfCheckedKeys,s,a,v),A}},OZM5:function(ht,_e,j){"use strict";j.d(_e,"b",function(){return R}),j.d(_e,"a",function(){return m}),j.d(_e,"k",function(){return v}),j.d(_e,"h",function(){return u}),j.d(_e,"i",function(){return s}),j.d(_e,"g",function(){return a}),j.d(_e,"c",function(){return A}),j.d(_e,"d",function(){return o}),j.d(_e,"j",function(){return t}),j.d(_e,"e",function(){return E}),j.d(_e,"f",function(){return _});var se=j("KQm4"),G=j("U8pU"),D=j("Ff2n"),V=j("q1tI"),F=j.n(V),O=j("Kwbf"),X=j("WaYH"),P=.25,e=2;function R(y,B){var C=y.slice(),d=C.indexOf(B);return d>=0&&C.splice(d,1),C}function m(y,B){var C=y.slice();return C.indexOf(B)===-1&&C.push(B),C}function v(y){return y.split("-")}function u(y,B){return"".concat(y,"-").concat(B)}function s(y){return y&&y.type&&y.type.isTreeNode}function a(y,B){var C=[y],d=B[y];function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(c){var b=c.key,g=c.children;C.push(b),n(g)})}return n(d.children),C}function A(y,B){var C=y.clientY,d=B.selectHandle.getBoundingClientRect(),n=d.top,l=d.bottom,c=d.height,b=Math.max(c*P,e);return C<=n+b?-1:C>=l-b?1:0}function o(y,B){if(!y)return;var C=B.multiple;return C?y.slice():y.length?[y[0]]:y}var i=function(B){return B};function r(y,B){if(!y)return[];var C=B||{},d=C.processProps,n=d===void 0?i:d,l=Array.isArray(y)?y:[y];return l.map(function(c){var b=c.children,g=Object(D.a)(c,["children"]),h=r(b,B);return F.a.createElement(X.a,Object.assign({},n(g)),h)})}function t(y){if(!y)return null;var B;if(Array.isArray(y))B={checkedKeys:y,halfCheckedKeys:void 0};else if(Object(G.a)(y)==="object")B={checkedKeys:y.checked||void 0,halfCheckedKeys:y.halfChecked||void 0};else return Object(O.a)(!1,"`checkedKeys` is not an array or an object"),null;return B}function E(y,B){var C=new Set;function d(n){if(C.has(n))return;var l=B[n];if(!l)return;C.add(n);var c=l.parent,b=l.node;if(b.disabled)return;c&&d(c.key)}return(y||[]).forEach(function(n){d(n)}),Object(se.a)(C)}function _(y){var B={};return Object.keys(y).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(B[C]=y[C])}),B}},"SA+Z":function(ht,_e,j){var se=j("wTVA"),G=j("EbDI"),D=j("ZhPi"),V=j("wkBT");function F(O){return se(O)||G(O)||D(O)||V()}ht.exports=F,ht.exports.__esModule=!0,ht.exports.default=ht.exports},SJMd:function(ht,_e){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var j,se,G,D=!1,V,F;window.PR_SHOULD_USE_CONTINUATION=!0;var O,X;(function(){var P=window,e=["break,continue,do,else,for,if,return,while"],R=[e,"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"],m=[R,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],v=[m,"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"],u=[m,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[m,"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"],a="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",A=[m,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="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",i=[e,"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"],r=[e,"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"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[v,s,u,A,o,i,r,t],_=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,y="str",B="kwd",C="com",d="typ",n="lit",l="pun",c="pln",b="tag",g="dec",h="src",L="atn",N="atv",T="nocode",M="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function W(re){for(var J=0,k=!1,$=!1,q=0,he=re.length;q<he;++q){var de=re[q];if(de.ignoreCase)$=!0;else if(/[a-z]/i.test(de.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){k=!0,$=!1;break}}var Qe={b:8,t:9,n:10,v:11,f:12,r:13};function ze(xe){var Ue=xe.charCodeAt(0);if(Ue!==92)return Ue;var Ke=xe.charAt(1);return Ue=Qe[Ke],Ue||("0"<=Ke&&Ke<="7"?parseInt(xe.substring(1),8):Ke==="u"||Ke==="x"?parseInt(xe.substring(2),16):xe.charCodeAt(1))}function Ge(xe){if(xe<32)return(xe<16?"\\x0":"\\x")+xe.toString(16);var Ue=String.fromCharCode(xe);return Ue==="\\"||Ue==="-"||Ue==="]"||Ue==="^"?"\\"+Ue:Ue}function $e(xe){var Ue=xe.substring(1,xe.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")),Ke=[],We=Ue[0]==="^",Le=["["];We&&Le.push("^");for(var Fe=We?1:0,we=Ue.length;Fe<we;++Fe){var ue=Ue[Fe];if(/\\[bdsw]/i.test(ue))Le.push(ue);else{var ce=ze(ue),te;Fe+2<we&&Ue[Fe+1]==="-"?(te=ze(Ue[Fe+2]),Fe+=2):te=ce,Ke.push([ce,te]),te<65||ce>122||(te<65||ce>90||Ke.push([Math.max(65,ce)|32,Math.min(te,90)|32]),te<97||ce>122||Ke.push([Math.max(97,ce)&~32,Math.min(te,122)&~32]))}}Ke.sort(function(Ie,Pe){return Ie[0]-Pe[0]||Pe[1]-Ie[1]});for(var ie=[],le=[],Fe=0;Fe<Ke.length;++Fe){var pe=Ke[Fe];pe[0]<=le[1]+1?le[1]=Math.max(le[1],pe[1]):ie.push(le=pe)}for(var Fe=0;Fe<ie.length;++Fe){var pe=ie[Fe];Le.push(Ge(pe[0])),pe[1]>pe[0]&&(pe[1]+1>pe[0]&&Le.push("-"),Le.push(Ge(pe[1])))}return Le.push("]"),Le.join("")}function nt(xe){for(var Ue=xe.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")),Ke=Ue.length,We=[],Le=0,Fe=0;Le<Ke;++Le){var we=Ue[Le];if(we==="(")++Fe;else if(we.charAt(0)==="\\"){var ue=+we.substring(1);ue&&(ue<=Fe?We[ue]=-1:Ue[Le]=Ge(ue))}}for(var Le=1;Le<We.length;++Le)We[Le]===-1&&(We[Le]=++J);for(var Le=0,Fe=0;Le<Ke;++Le){var we=Ue[Le];if(we==="(")++Fe,We[Fe]||(Ue[Le]="(?:");else if(we.charAt(0)==="\\"){var ue=+we.substring(1);ue&&ue<=Fe&&(Ue[Le]="\\"+We[ue])}}for(var Le=0;Le<Ke;++Le)Ue[Le]==="^"&&Ue[Le+1]!=="^"&&(Ue[Le]="");if(xe.ignoreCase&&k)for(var Le=0;Le<Ke;++Le){var we=Ue[Le],ce=we.charAt(0);we.length>=2&&ce==="["?Ue[Le]=$e(we):ce!=="\\"&&(Ue[Le]=we.replace(/[a-zA-Z]/g,function(le){var pe=le.charCodeAt(0);return"["+String.fromCharCode(pe&~32,pe|32)+"]"}))}return Ue.join("")}for(var dt=[],q=0,he=re.length;q<he;++q){var de=re[q];if(de.global||de.multiline)throw new Error(""+de);dt.push("(?:"+nt(de)+")")}return new RegExp(dt.join("|"),$?"gi":"g")}function U(re,J){var k=/(?:^|\s)nocode(?:\s|$)/,$=[],q=0,he=[],de=0;function Qe(ze){var Ge=ze.nodeType;if(Ge==1){if(k.test(ze.className))return;for(var $e=ze.firstChild;$e;$e=$e.nextSibling)Qe($e);var nt=ze.nodeName.toLowerCase();(nt==="br"||nt==="li")&&($[de]=`
|
|
`,he[de<<1]=q++,he[de++<<1|1]=ze)}else if(Ge==3||Ge==4){var dt=ze.nodeValue;dt.length&&(J?dt=dt.replace(/\r\n?/g,`
|
|
`):dt=dt.replace(/[ \t\r\n]+/g," "),$[de]=dt,he[de<<1]=q,q+=dt.length,he[de++<<1|1]=ze)}}return Qe(re),{sourceCode:$.join("").replace(/\n$/,""),spans:he}}function Y(re,J,k,$,q){if(!k)return;var he={sourceNode:re,pre:1,langExtension:null,numberLines:null,sourceCode:k,spans:null,basePos:J,decorations:null};$(he),q.push.apply(q,he.decorations)}var ne=/\S/;function me(re){for(var J=void 0,k=re.firstChild;k;k=k.nextSibling){var $=k.nodeType;J=$===1?J?re:k:$===3&&ne.test(k.nodeValue)?re:J}return J===re?void 0:J}function ge(re,J){var k={},$;(function(){for(var de=re.concat(J),Qe=[],ze={},Ge=0,$e=de.length;Ge<$e;++Ge){var nt=de[Ge],dt=nt[3];if(dt)for(var xe=dt.length;--xe>=0;)k[dt.charAt(xe)]=nt;var Ue=nt[1],Ke=""+Ue;ze.hasOwnProperty(Ke)||(Qe.push(Ue),ze[Ke]=null)}Qe.push(/[\0-\uffff]/),$=W(Qe)})();var q=J.length,he=function(de){for(var Qe=de.sourceCode,ze=de.basePos,Ge=de.sourceNode,$e=[ze,c],nt=0,dt=Qe.match($)||[],xe={},Ue=0,Ke=dt.length;Ue<Ke;++Ue){var We=dt[Ue],Le=xe[We],Fe=void 0,we;if(typeof Le=="string")we=!1;else{var ue=k[We.charAt(0)];if(ue)Fe=We.match(ue[1]),Le=ue[0];else{for(var ce=0;ce<q;++ce)if(ue=J[ce],Fe=We.match(ue[1]),Fe){Le=ue[0];break}Fe||(Le=c)}we=Le.length>=5&&Le.substring(0,5)==="lang-",we&&!(Fe&&typeof Fe[1]=="string")&&(we=!1,Le=h),we||(xe[We]=Le)}var te=nt;if(nt+=We.length,!we)$e.push(ze+te,Le);else{var ie=Fe[1],le=We.indexOf(ie),pe=le+ie.length;Fe[2]&&(pe=We.length-Fe[2].length,le=pe-ie.length);var Ie=Le.substring(5);Y(Ge,ze+te,We.substring(0,le),he,$e),Y(Ge,ze+te+le,ie,ve(Ie,ie),$e),Y(Ge,ze+te+pe,We.substring(pe),he,$e)}}de.decorations=$e};return he}function Oe(re){var J=[],k=[];re.tripleQuotedStrings?J.push([y,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):re.multiLineStrings?J.push([y,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([y,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),re.verbatimStrings&&k.push([y,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=re.hashComments;$&&(re.cStyleComments?($>1?J.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),k.push([y,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([C,/^#[^\r\n]*/,null,"#"])),re.cStyleComments&&(k.push([C,/^\/\/[^\r\n]*/,null]),k.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var q=re.regexLiterals;if(q){var he=q>1?"":`
|
|
\r`,de=he?".":"[\\S\\s]",Qe="/(?=[^/*"+he+"])(?:[^/\\x5B\\x5C"+he+"]|\\x5C"+de+"|\\x5B(?:[^\\x5C\\x5D"+he+"]|\\x5C"+de+")*(?:\\x5D|$))+/";k.push(["lang-regex",RegExp("^"+M+"("+Qe+")")])}var ze=re.types;ze&&k.push([d,ze]);var Ge=(""+re.keywords).replace(/^ | $/g,"");Ge.length&&k.push([B,new RegExp("^(?:"+Ge.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([c,/^\s+/,null,` \r
|
|
\xA0`]);var $e="^.[^\\s\\w.$@'\"`/\\\\]*";return re.regexLiterals&&($e+="(?!s*/)"),k.push([n,/^@[a-z_$][a-z_$@0-9]*/i,null],[d,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[n,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[l,new RegExp($e),null]),ge(J,k)}var Se=Oe({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Be(re,J,k){for(var $=/(?:^|\s)nocode(?:\s|$)/,q=/\r\n?|\n/,he=re.ownerDocument,de=he.createElement("li");re.firstChild;)de.appendChild(re.firstChild);var Qe=[de];function ze(Ue){var Ke=Ue.nodeType;if(Ke==1&&!$.test(Ue.className))if(Ue.nodeName==="br")Ge(Ue),Ue.parentNode&&Ue.parentNode.removeChild(Ue);else for(var We=Ue.firstChild;We;We=We.nextSibling)ze(We);else if((Ke==3||Ke==4)&&k){var Le=Ue.nodeValue,Fe=Le.match(q);if(Fe){var we=Le.substring(0,Fe.index);Ue.nodeValue=we;var ue=Le.substring(Fe.index+Fe[0].length);if(ue){var ce=Ue.parentNode;ce.insertBefore(he.createTextNode(ue),Ue.nextSibling)}Ge(Ue),we||Ue.parentNode.removeChild(Ue)}}}function Ge(Ue){for(;!Ue.nextSibling;)if(Ue=Ue.parentNode,!Ue)return;function Ke(Fe,we){var ue=we?Fe.cloneNode(!1):Fe,ce=Fe.parentNode;if(ce){var te=Ke(ce,1),ie=Fe.nextSibling;te.appendChild(ue);for(var le=ie;le;le=ie)ie=le.nextSibling,te.appendChild(le)}return ue}for(var We=Ke(Ue.nextSibling,0),Le;(Le=We.parentNode)&&Le.nodeType===1;)We=Le;Qe.push(We)}for(var $e=0;$e<Qe.length;++$e)ze(Qe[$e]);J===(J|0)&&Qe[0].setAttribute("value",J);var nt=he.createElement("ol");nt.className="linenums";for(var dt=Math.max(0,J-1|0)||0,$e=0,xe=Qe.length;$e<xe;++$e)de=Qe[$e],de.className="L"+($e+dt)%10,de.firstChild||de.appendChild(he.createTextNode("\xA0")),nt.appendChild(de);re.appendChild(nt)}function Ne(re){var J=/\bMSIE\s(\d+)/.exec(navigator.userAgent);J=J&&+J[1]<=8;var k=/\n/g,$=re.sourceCode,q=$.length,he=0,de=re.spans,Qe=de.length,ze=0,Ge=re.decorations,$e=Ge.length,nt=0;Ge[$e]=q;var dt,xe;for(xe=dt=0;xe<$e;)Ge[xe]!==Ge[xe+2]?(Ge[dt++]=Ge[xe++],Ge[dt++]=Ge[xe++]):xe+=2;for($e=dt,xe=dt=0;xe<$e;){for(var Ue=Ge[xe],Ke=Ge[xe+1],We=xe+2;We+2<=$e&&Ge[We+1]===Ke;)We+=2;Ge[dt++]=Ue,Ge[dt++]=Ke,xe=We}$e=Ge.length=dt;var Le=re.sourceNode,Fe="";Le&&(Fe=Le.style.display,Le.style.display="none");try{for(var we=null;ze<Qe;){var ue=de[ze],ce=de[ze+2]||q,te=Ge[nt+2]||q,We=Math.min(ce,te),ie=de[ze+1],le;if(ie.nodeType!==1&&(le=$.substring(he,We))){J&&(le=le.replace(k,"\r")),ie.nodeValue=le;var pe=ie.ownerDocument,Ie=pe.createElement("span");Ie.className=Ge[nt+1];var Pe=ie.parentNode;Pe.replaceChild(Ie,ie),Ie.appendChild(ie),he<ce&&(de[ze+1]=ie=pe.createTextNode($.substring(We,ce)),Pe.insertBefore(ie,Ie.nextSibling))}he=We,he>=ce&&(ze+=2),he>=te&&(nt+=2)}}finally{Le&&(Le.style.display=Fe)}}var ke={};function Ce(re,J){for(var k=J.length;--k>=0;){var $=J[k];ke.hasOwnProperty($)?P.console&&console.warn("cannot override language handler %s",$):ke[$]=re}}function ve(re,J){return re&&ke.hasOwnProperty(re)||(re=/^\s*</.test(J)?"default-markup":"default-code"),ke[re]}Ce(Se,["default-code"]),Ce(ge([],[[c,/^[^<?]+/],[g,/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["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"]),Ce(ge([[c,/^[\s]+/,null,` \r
|
|
`],[N,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[b,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[L,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[l,/^[=<>\/]+/],["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"]),Ce(ge([],[[N,/^[\s\S]+/]]),["uq.val"]),Ce(Oe({keywords:v,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),Ce(Oe({keywords:"null,true,false"}),["json"]),Ce(Oe({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),Ce(Oe({keywords:u,cStyleComments:!0}),["java"]),Ce(Oe({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ce(Oe({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ce(Oe({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ce(Oe({keywords:r,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ce(Oe({keywords:A,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ce(Oe({keywords:a,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ce(ge([],[[y,/^[\s\S]+/]]),["regex"]);function Xe(re){var J=re.langExtension;try{var k=U(re.sourceNode,re.pre),$=k.sourceCode;re.sourceCode=$,re.spans=k.spans,re.basePos=0,ve(J,$)(re),Ne(re)}catch(q){P.console&&console.log(q&&q.stack||q)}}function lt(re,J,k){var $=k||!1,q=J||null,he=document.createElement("div");he.innerHTML="<pre>"+re+"</pre>",he=he.firstChild,$&&Be(he,$,!0);var de={langExtension:q,numberLines:$,sourceNode:he,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Xe(de),he.innerHTML}function at(re,J){var k=J||document.body,$=k.ownerDocument||document;function q(ue){return k.getElementsByTagName(ue)}for(var he=[q("pre"),q("code"),q("xmp")],de=[],Qe=0;Qe<he.length;++Qe)for(var ze=0,Ge=he[Qe].length;ze<Ge;++ze)de.push(he[Qe][ze]);he=null;var $e=Date;$e.now||($e={now:function(){return+new Date}});var nt=0,dt=/\blang(?:uage)?-([\w.]+)(?!\S)/,xe=/\bprettyprint\b/,Ue=/\bprettyprinted\b/,Ke=/pre|xmp/i,We=/^code$/i,Le=/^(?:pre|code|xmp)$/i,Fe={};function we(){for(var ue=P.PR_SHOULD_USE_CONTINUATION?$e.now()+250:Infinity;nt<de.length&&$e.now()<ue;nt++){for(var ce=de[nt],te=Fe,ie=ce;ie=ie.previousSibling;){var le=ie.nodeType,pe=(le===7||le===8)&&ie.nodeValue;if(pe?!/^\??prettify\b/.test(pe):le!==3||/\S/.test(ie.nodeValue))break;if(pe){te={},pe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(yt,Et,wt){te[Et]=wt});break}}var Ie=ce.className;if((te!==Fe||xe.test(Ie))&&!Ue.test(Ie)){for(var Pe=!1,qe=ce.parentNode;qe;qe=qe.parentNode){var ft=qe.tagName;if(Le.test(ft)&&qe.className&&xe.test(qe.className)){Pe=!0;break}}if(!Pe){ce.className+=" prettyprinted";var ut=te.lang;if(!ut){ut=Ie.match(dt);var st;!ut&&(st=me(ce))&&We.test(st.tagName)&&(ut=st.className.match(dt)),ut&&(ut=ut[1])}var Lt;if(Ke.test(ce.tagName))Lt=1;else{var mt=ce.currentStyle,tt=$.defaultView,er=mt?mt.whiteSpace:tt&&tt.getComputedStyle?tt.getComputedStyle(ce,null).getPropertyValue("white-space"):0;Lt=er&&er.substring(0,3)==="pre"}var Jt=te.linenums;(Jt=Jt==="true"||+Jt)||(Jt=Ie.match(/\blinenums\b(?::(\d+))?/),Jt=Jt?Jt[1]&&Jt[1].length?+Jt[1]:!0:!1),Jt&&Be(ce,Jt,Lt);var Ot={langExtension:ut,sourceNode:ce,numberLines:Jt,pre:Lt,sourceCode:null,basePos:null,spans:null,decorations:null};Xe(Ot)}}}nt<de.length?P.setTimeout(we,250):typeof re=="function"&&re()}we()}var je=P.PR={createSimpleLexer:ge,registerLangHandler:Ce,sourceDecorator:Oe,PR_ATTRIB_NAME:L,PR_ATTRIB_VALUE:N,PR_COMMENT:C,PR_DECLARATION:g,PR_KEYWORD:B,PR_LITERAL:n,PR_NOCODE:T,PR_PLAIN:c,PR_PUNCTUATION:l,PR_SOURCE:h,PR_STRING:y,PR_TAG:b,PR_TYPE:d,prettyPrintOne:D?P.prettyPrintOne=lt:O=lt,prettyPrint:X=D?P.prettyPrint=at:X=at},rt=P.define;typeof rt=="function"&&rt.amd&&rt("google-code-prettify",[],function(){return je})})()},T8No:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return X}),j.d(_e,"e",function(){return P}),j.d(_e,"c",function(){return l}),j.d(_e,"b",function(){return c}),j.d(_e,"d",function(){return b}),j.d(_e,"f",function(){return L});var se=j("MNsG"),G=j("N0LK"),D=j("Cg/j");let V=se.k||"";const F=new Map;F.set("false",!1),F.set("true",!0),F.set("isMac",se.f),F.set("isLinux",se.d),F.set("isWindows",se.i),F.set("isWeb",se.h),F.set("isMacNative",se.f&&!se.h),F.set("isEdge",V.indexOf("Edg/")>=0),F.set("isFirefox",V.indexOf("Firefox")>=0),F.set("isChrome",V.indexOf("Chrome")>=0),F.set("isSafari",V.indexOf("Safari")>=0);const O=Object.prototype.hasOwnProperty;class X{static has(T){return v.create(T)}static equals(T,M){return u.create(T,M)}static regex(T,M){return y.create(T,M)}static not(T){return o.create(T)}static and(...T){return d.create(T,null)}static or(...T){return n.create(T,null,!0)}static deserialize(T,M=!1){return T?this._deserializeOrExpression(T,M):void 0}static _deserializeOrExpression(T,M){let W=T.split("||");return n.create(W.map(U=>this._deserializeAndExpression(U,M)),null,!0)}static _deserializeAndExpression(T,M){let W=T.split("&&");return d.create(W.map(U=>this._deserializeOne(U,M)),null)}static _deserializeOne(T,M){if(T=T.trim(),T.indexOf("!=")>=0){let W=T.split("!=");return A.create(W[0].trim(),this._deserializeValue(W[1],M))}if(T.indexOf("==")>=0){let W=T.split("==");return u.create(W[0].trim(),this._deserializeValue(W[1],M))}if(T.indexOf("=~")>=0){let W=T.split("=~");return y.create(W[0].trim(),this._deserializeRegexValue(W[1],M))}if(T.indexOf(" in ")>=0){let W=T.split(" in ");return s.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(T)){const W=T.split(">=");return t.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(T)){const W=T.split(">");return r.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(T)){const W=T.split("<=");return _.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(T)){const W=T.split("<");return E.create(W[0].trim(),W[1].trim())}return/^\!\s*/.test(T)?o.create(T.substr(1).trim()):v.create(T)}static _deserializeValue(T,M){if(T=T.trim(),T==="true")return!0;if(T==="false")return!1;let W=/^'([^']*)'$/.exec(T);return W?W[1].trim():T}static _deserializeRegexValue(T,M){if(Object(G.C)(T)){if(M)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let W=T.indexOf("/"),U=T.lastIndexOf("/");if(W===U||W<0){if(M)throw new Error(`bad regexp-value '${T}', missing /-enclosure`);return console.warn(`bad regexp-value '${T}', missing /-enclosure`),null}let Y=T.slice(W+1,U),ne=T[U+1]==="i"?"i":"";try{return new RegExp(Y,ne)}catch(me){if(M)throw new Error(`bad regexp-value '${T}', parse error: ${me}`);return console.warn(`bad regexp-value '${T}', parse error: ${me}`),null}}}function P(T,M){const W=T?T.substituteConstants():void 0,U=M?M.substituteConstants():void 0;return!W&&!U?!0:!W||!U?!1:W.equals(U)}function e(T,M){return T.cmp(M)}class R{constructor(){this.type=0}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!1}serialize(){return"false"}keys(){return[]}negate(){return m.INSTANCE}}R.INSTANCE=new R;class m{constructor(){this.type=1}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!0}serialize(){return"true"}keys(){return[]}negate(){return R.INSTANCE}}m.INSTANCE=new m;class v{constructor(T,M){this.key=T,this.negated=M,this.type=2}static create(T,M=null){const W=F.get(T);return typeof W=="boolean"?W?m.INSTANCE:R.INSTANCE:new v(T,M)}cmp(T){return T.type!==this.type?this.type-T.type:g(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=F.get(this.key);return typeof T=="boolean"?T?m.INSTANCE:R.INSTANCE:this}evaluate(T){return!!T.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this)),this.negated}}class u{constructor(T,M,W){this.key=T,this.value=M,this.negated=W,this.type=4}static create(T,M,W=null){if(typeof M=="boolean")return M?v.create(T,W):o.create(T,W);const U=F.get(T);if(typeof U=="boolean"){const Y=U?"true":"false";return M===Y?m.INSTANCE:R.INSTANCE}return new u(T,M,W)}cmp(T){return T.type!==this.type?this.type-T.type:h(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=F.get(this.key);if(typeof T=="boolean"){const M=T?"true":"false";return this.value===M?m.INSTANCE:R.INSTANCE}return this}evaluate(T){return T.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class s{constructor(T,M){this.key=T,this.valueKey=M,this.type=10,this.negated=null}static create(T,M){return new s(T,M)}cmp(T){return T.type!==this.type?this.type-T.type:h(this.key,this.valueKey,T.key,T.valueKey)}equals(T){return T.type===this.type?this.key===T.key&&this.valueKey===T.valueKey:!1}substituteConstants(){return this}evaluate(T){const M=T.getValue(this.valueKey),W=T.getValue(this.key);return Array.isArray(M)?M.indexOf(W)>=0:typeof W=="string"&&typeof M=="object"&&M!==null?O.call(M,W):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=a.create(this)),this.negated}}class a{constructor(T){this._actual=T,this.type=11}static create(T){return new a(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class A{constructor(T,M,W){this.key=T,this.value=M,this.negated=W,this.type=5}static create(T,M,W=null){if(typeof M=="boolean")return M?o.create(T,W):v.create(T,W);const U=F.get(T);if(typeof U=="boolean"){const Y=U?"true":"false";return M===Y?R.INSTANCE:m.INSTANCE}return new A(T,M,W)}cmp(T){return T.type!==this.type?this.type-T.type:h(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=F.get(this.key);if(typeof T=="boolean"){const M=T?"true":"false";return this.value===M?R.INSTANCE:m.INSTANCE}return this}evaluate(T){return T.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 o{constructor(T,M){this.key=T,this.negated=M,this.type=3}static create(T,M=null){const W=F.get(T);return typeof W=="boolean"?W?R.INSTANCE:m.INSTANCE:new o(T,M)}cmp(T){return T.type!==this.type?this.type-T.type:g(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=F.get(this.key);return typeof T=="boolean"?T?R.INSTANCE:m.INSTANCE:this}evaluate(T){return!T.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this)),this.negated}}function i(T,M){if(typeof T=="string"){const W=parseFloat(T);isNaN(W)||(T=W)}return typeof T=="string"||typeof T=="number"?M(T):R.INSTANCE}class r{constructor(T,M,W){this.key=T,this.value=M,this.negated=W,this.type=12}static create(T,M,W=null){return i(M,U=>new r(T,U,W))}cmp(T){return T.type!==this.type?this.type-T.type:h(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class t{constructor(T,M,W){this.key=T,this.value=M,this.negated=W,this.type=13}static create(T,M,W=null){return i(M,U=>new t(T,U,W))}cmp(T){return T.type!==this.type?this.type-T.type:h(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class E{constructor(T,M,W){this.key=T,this.value=M,this.negated=W,this.type=14}static create(T,M,W=null){return i(M,U=>new E(T,U,W))}cmp(T){return T.type!==this.type?this.type-T.type:h(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.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 _{constructor(T,M,W){this.key=T,this.value=M,this.negated=W,this.type=15}static create(T,M,W=null){return i(M,U=>new _(T,U,W))}cmp(T){return T.type!==this.type?this.type-T.type:h(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class y{constructor(T,M){this.key=T,this.regexp=M,this.type=7,this.negated=null}static create(T,M){return new y(T,M)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.key<T.key)return-1;if(this.key>T.key)return 1;const M=this.regexp?this.regexp.source:"",W=T.regexp?T.regexp.source:"";return M<W?-1:M>W?1:0}equals(T){if(T.type===this.type){const M=this.regexp?this.regexp.source:"",W=T.regexp?T.regexp.source:"";return this.key===T.key&&M===W}return!1}substituteConstants(){return this}evaluate(T){let M=T.getValue(this.key);return this.regexp?this.regexp.test(M):!1}serialize(){const T=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${T}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this)),this.negated}}class B{constructor(T){this._actual=T,this.type=8}static create(T){return new B(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function C(T){let M=null;for(let W=0,U=T.length;W<U;W++){const Y=T[W].substituteConstants();if(T[W]!==Y&&M===null){M=[];for(let ne=0;ne<W;ne++)M[ne]=T[ne]}M!==null&&(M[W]=Y)}return M===null?T:M}class d{constructor(T,M){this.expr=T,this.negated=M,this.type=6}static create(T,M){return d._normalizeArr(T,M)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let M=0,W=this.expr.length;M<W;M++){const U=e(this.expr[M],T.expr[M]);if(U!==0)return U}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let M=0,W=this.expr.length;M<W;M++)if(!this.expr[M].equals(T.expr[M]))return!1;return!0}return!1}substituteConstants(){const T=C(this.expr);return T===this.expr?this:d.create(T,this.negated)}evaluate(T){for(let M=0,W=this.expr.length;M<W;M++)if(!this.expr[M].evaluate(T))return!1;return!0}static _normalizeArr(T,M){const W=[];let U=!1;for(const Y of T){if(!Y)continue;if(Y.type===1){U=!0;continue}if(Y.type===0)return R.INSTANCE;if(Y.type===6){W.push(...Y.expr);continue}W.push(Y)}if(W.length===0&&U)return m.INSTANCE;if(W.length===0)return;if(W.length===1)return W[0];W.sort(e);for(let Y=1;Y<W.length;Y++)W[Y-1].equals(W[Y])&&(W.splice(Y,1),Y--);if(W.length===1)return W[0];for(;W.length>1;){const Y=W[W.length-1];if(Y.type!==9)break;W.pop();const ne=W.pop(),me=W.length===0,ge=n.create(Y.expr.map(Oe=>d.create([Oe,ne],null)),null,me);ge&&(W.push(ge),W.sort(e))}return W.length===1?W[0]:new d(W,M)}serialize(){return this.expr.map(T=>T.serialize()).join(" && ")}keys(){const T=[];for(let M of this.expr)T.push(...M.keys());return T}negate(){if(!this.negated){const T=[];for(let M of this.expr)T.push(M.negate());this.negated=n.create(T,this,!0)}return this.negated}}class n{constructor(T,M){this.expr=T,this.negated=M,this.type=9}static create(T,M,W){return n._normalizeArr(T,M,W)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let M=0,W=this.expr.length;M<W;M++){const U=e(this.expr[M],T.expr[M]);if(U!==0)return U}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let M=0,W=this.expr.length;M<W;M++)if(!this.expr[M].equals(T.expr[M]))return!1;return!0}return!1}substituteConstants(){const T=C(this.expr);return T===this.expr?this:n.create(T,this.negated,!1)}evaluate(T){for(let M=0,W=this.expr.length;M<W;M++)if(this.expr[M].evaluate(T))return!0;return!1}static _normalizeArr(T,M,W){let U=[],Y=!1;if(T){for(let ne=0,me=T.length;ne<me;ne++){const ge=T[ne];if(!ge)continue;if(ge.type===0){Y=!0;continue}if(ge.type===1)return m.INSTANCE;if(ge.type===9){U=U.concat(ge.expr);continue}U.push(ge)}if(U.length===0&&Y)return R.INSTANCE;U.sort(e)}if(U.length===0)return;if(U.length===1)return U[0];for(let ne=1;ne<U.length;ne++)U[ne-1].equals(U[ne])&&(U.splice(ne,1),ne--);if(U.length===1)return U[0];if(W){for(let ne=0;ne<U.length;ne++)for(let me=ne+1;me<U.length;me++)L(U[ne],U[me])&&(U.splice(me,1),me--);if(U.length===1)return U[0]}return new n(U,M)}serialize(){return this.expr.map(T=>T.serialize()).join(" || ")}keys(){const T=[];for(let M of this.expr)T.push(...M.keys());return T}negate(){if(!this.negated){let T=[];for(let M of this.expr)T.push(M.negate());for(;T.length>1;){const M=T.shift(),W=T.shift(),U=[];for(const ne of N(M))for(const me of N(W))U.push(d.create([ne,me],null));const Y=T.length===0;T.unshift(n.create(U,null,Y))}this.negated=T[0]}return this.negated}}class l extends v{constructor(T,M,W){super(T,null);this._defaultValue=M,typeof W=="object"?l._info.push(Object.assign(Object.assign({},W),{key:T})):W!==!0&&l._info.push({key:T,description:W,type:M!=null?typeof M:void 0})}static all(){return l._info.values()}bindTo(T){return T.createKey(this.key,this._defaultValue)}getValue(T){return T.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(T){return u.create(this.key,T)}}l._info=[];const c=Object(D.c)("contextKeyService"),b="setContext";function g(T,M){return T<M?-1:T>M?1:0}function h(T,M,W,U){return T<W?-1:T>W?1:M<U?-1:M>U?1:0}function L(T,M){if(M.type===6&&T.type!==9&&T.type!==6){for(const Y of M.expr)if(T.equals(Y))return!0}const W=T.negate(),U=N(W).concat(N(M));U.sort(e);for(let Y=0;Y<U.length;Y++){const ne=U[Y],me=ne.negate();for(let ge=Y+1;ge<U.length;ge++){const Oe=U[ge];if(me.equals(Oe))return!0}}return!1}function N(T){return T.type===9?T.expr:[T]}},TXwP:function(ht,_e,j){var se,G;(function(){var D;(function(){"use strict";var F=[,,function(e){function R(u){this.__parent=u,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=[]}R.prototype.clone_empty=function(){var u=new R(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},R.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},R.prototype.has_match=function(u){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(u))return!0;return!1},R.prototype.set_indent=function(u,s){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.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)},R.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},R.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__character_count-=1),!0}return!1},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(u){this.__items.push(u);var s=u.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=u.length-s:this.__character_count+=u.length},R.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.prototype.toString=function(){var u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function m(u,s){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),s=s||"",u.indent_level>0&&(s=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}m.prototype.get_indent_size=function(u,s){var a=this.__base_string_length;return s=s||0,u<0&&(a=0),a+=u*this.__indent_size,a+=s,a},m.prototype.get_indent_string=function(u,s){var a=this.__base_string;return s=s||0,u<0&&(u=0,a=""),s+=u*this.__indent_size,this.__ensure_cache(s),a+=this.__cache[s],a},m.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},m.prototype.__add_column=function(){var u=this.__cache.length,s=0,a="";this.__indent_size&&u>=this.__indent_size&&(s=Math.floor(u/this.__indent_size),u-=s*this.__indent_size,a=new Array(s+1).join(this.__indent_string)),u&&(a+=new Array(u+1).join(" ")),this.__cache.push(a)};function v(u,s){this.__indent_cache=new m(u,s),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}v.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},v.prototype.get_line_number=function(){return this.__lines.length},v.prototype.get_indent_string=function(u,s){return this.__indent_cache.get_indent_string(u,s)},v.prototype.get_indent_size=function(u,s){return this.__indent_cache.get_indent_size(u,s)},v.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},v.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},v.prototype.get_code=function(u){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
|
|
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(`
|
|
`);return u!==`
|
|
`&&(a=a.replace(/[\n]/g,u)),a},v.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},v.prototype.set_indent=function(u,s){return u=u||0,s=s||0,this.next_line.set_indent(u,s),this.__lines.length>1?(this.current_line.set_indent(u,s),!0):(this.current_line.set_indent(),!1)},v.prototype.add_raw_token=function(u){for(var s=0;s<u.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},v.prototype.add_token=function(u){this.__add_space_before_token(),this.current_line.push(u),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},v.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(" "))},v.prototype.remove_indent=function(u){for(var s=this.__lines.length;u<s;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},v.prototype.trim=function(u){for(u=u===void 0?!1:u,this.current_line.trim();u&&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},v.prototype.just_added_newline=function(){return this.current_line.is_empty()},v.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},v.prototype.ensure_empty_line_above=function(u,s){for(var a=this.__lines.length-2;a>=0;){var A=this.__lines[a];if(A.is_empty())break;if(A.item(0).indexOf(u)!==0&&A.item(-1)!==s){this.__lines.splice(a+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}},e.exports.Output=v},,,,function(e){function R(u,s){this.raw_options=m(u,s),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"])}R.prototype._get_array=function(u,s){var a=this.raw_options[u],A=s||[];return typeof a=="object"?a!==null&&typeof a.concat=="function"&&(A=a.concat()):typeof a=="string"&&(A=a.split(/[^a-zA-Z0-9_\/\-]+/)),A},R.prototype._get_boolean=function(u,s){var a=this.raw_options[u],A=a===void 0?!!s:!!a;return A},R.prototype._get_characters=function(u,s){var a=this.raw_options[u],A=s||"";return typeof a=="string"&&(A=a.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),A},R.prototype._get_number=function(u,s){var a=this.raw_options[u];s=parseInt(s,10),isNaN(s)&&(s=0);var A=parseInt(a,10);return isNaN(A)&&(A=s),A},R.prototype._get_selection=function(u,s,a){var A=this._get_selection_list(u,s,a);if(A.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[u]+"'");return A[0]},R.prototype._get_selection_list=function(u,s,a){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[s[0]],!this._is_valid_selection(a,s))throw new Error("Invalid Default Value!");var A=this._get_array(u,a);if(!this._is_valid_selection(A,s))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[u]+"'");return A},R.prototype._is_valid_selection=function(u,s){return u.length&&s.length&&!u.some(function(a){return s.indexOf(a)===-1})};function m(u,s){var a={};u=v(u);var A;for(A in u)A!==s&&(a[A]=u[A]);if(s&&u[s])for(A in u[s])a[A]=u[s][A];return a}function v(u){var s={},a;for(a in u){var A=a.replace(/-/g,"_");s[A]=u[a]}return s}e.exports.Options=R,e.exports.normalizeOpts=v,e.exports.mergeOpts=m},,function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function m(v){this.__input=v||"",this.__input_length=this.__input.length,this.__position=0}m.prototype.restart=function(){this.__position=0},m.prototype.back=function(){this.__position>0&&(this.__position-=1)},m.prototype.hasNext=function(){return this.__position<this.__input_length},m.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__input.charAt(this.__position),this.__position+=1),v},m.prototype.peek=function(v){var u=null;return v=v||0,v+=this.__position,v>=0&&v<this.__input_length&&(u=this.__input.charAt(v)),u},m.prototype.__match=function(v,u){v.lastIndex=u;var s=v.exec(this.__input);return s&&!(R&&v.sticky)&&(s.index!==u&&(s=null)),s},m.prototype.test=function(v,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(v,u):!1},m.prototype.testChar=function(v,u){var s=this.peek(u);return v.lastIndex=0,s!==null&&v.test(s)},m.prototype.match=function(v){var u=this.__match(v,this.__position);return u?this.__position+=u[0].length:u=null,u},m.prototype.read=function(v,u,s){var a="",A;return v&&(A=this.match(v),A&&(a+=A[0])),u&&(A||!v)&&(a+=this.readUntil(u,s)),a},m.prototype.readUntil=function(v,u){var s="",a=this.__position;v.lastIndex=this.__position;var A=v.exec(this.__input);return A?(a=A.index,u&&(a+=A[0].length)):a=this.__input_length,s=this.__input.substring(this.__position,a),this.__position=a,s},m.prototype.readUntilAfter=function(v){return this.readUntil(v,!0)},m.prototype.get_regexp=function(v,u){var s=null,a="g";return u&&R&&(a="y"),typeof v=="string"&&v!==""?s=new RegExp(v,a):v&&(s=new RegExp(v.source,a)),s},m.prototype.get_literal_regexp=function(v){return RegExp(v.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},m.prototype.peekUntilAfter=function(v){var u=this.__position,s=this.readUntilAfter(v);return this.__position=u,s},m.prototype.lookBack=function(v){var u=this.__position-1;return u>=v.length&&this.__input.substring(u-v.length,u).toLowerCase()===v},e.exports.InputScanner=m},,,,,function(e){function R(m,v){m=typeof m=="string"?m:m.source,v=typeof v=="string"?v:v.source,this.__directives_block_pattern=new RegExp(m+/ beautify( \w+[:]\w+)+ /.source+v,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(m+/\sbeautify\signore:end\s/.source+v,"g")}R.prototype.get_directives=function(m){if(!m.match(this.__directives_block_pattern))return null;var v={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(m);u;)v[u[1]]=u[2],u=this.__directive_pattern.exec(m);return v},R.prototype.readIgnored=function(m){return m.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=R},,function(e,R,m){var v=m(16).Beautifier,u=m(17).Options;function s(a,A){var o=new v(a,A);return o.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new u}},function(e,R,m){var v=m(17).Options,u=m(2).Output,s=m(8).InputScanner,a=m(13).Directives,A=new a(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,i=/\r\n|[\r\n]/g,r=/\s/,t=/(?:\s|\n)+/g,E=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function y(B,C){this._source_text=B||"",this._options=new v(C),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"]}y.prototype.eatString=function(B){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(B.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return C},y.prototype.eatWhitespace=function(B){for(var C=r.test(this._input.peek()),d=0;r.test(this._input.peek());)this._ch=this._input.next(),B&&this._ch===`
|
|
`&&((d===0||d<this._options.max_preserve_newlines)&&(d++,this._output.add_new_line(!0)));return C},y.prototype.foundNestedPseudoClass=function(){for(var B=0,C=1,d=this._input.peek(C);d;){if(d==="{")return!0;if(d==="(")B+=1;else if(d===")"){if(B===0)return!1;B-=1}else if(d===";"||d==="}")return!1;C++,d=this._input.peek(C)}return!1},y.prototype.print_string=function(B){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(B)},y.prototype.preserveSingleSpace=function(B){B&&(this._output.space_before_token=!0)},y.prototype.indent=function(){this._indentLevel++},y.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var B=this._source_text,C=this._options.eol;C==="auto"&&(C=`
|
|
`,B&&o.test(B||"")&&(C=B.match(o)[0])),B=B.replace(i,`
|
|
`);var d=B.match(/^[\t ]*/)[0];this._output=new u(this._options,d),this._input=new s(B),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var n=0,l=!1,c=!1,b=!1,g=!1,h=!1,L=!1,N=this._ch,T=!1,M,W,U;M=this._input.read(t),W=M!=="",U=N,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),N=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var Y=this._input.read(E),ne=A.get_directives(Y);ne&&ne.ignore==="start"&&(Y+=A.readIgnored(this._input)),this.print_string(Y),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(_)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(W),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var me=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);me.match(/[ :]$/)&&(me=this.eatString(": ").replace(/\s$/,""),this.print_string(me),this._output.space_before_token=!0),me=me.replace(/\s$/,""),me==="extend"?g=!0:me==="import"&&(h=!0),me in this.NESTED_AT_RULE?(this._nestedLevel+=1,me in this.CONDITIONAL_GROUP_RULE&&(b=!0)):!l&&n===0&&me.indexOf(":")!==-1&&(c=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(W),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")c&&(c=!1,this.outdent()),b?(b=!1,l=this._indentLevel>=this._nestedLevel):l=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&l&&(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)):(U==="("?this._output.space_before_token=!1:U!==","&&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(),U==="{"&&this._output.trim(!0),h=!1,g=!1,c&&(this.outdent(),c=!1),this.print_string(this._ch),l=!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 ge=0;ge<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ge++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ge])){T=!0;break}(l||b)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!g&&n===0?(this.print_string(":"),c||(c=!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 Oe=U==='"'||U==="'";this.preserveSingleSpace(Oe||W),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")T=!1,n===0?(c&&(this.outdent(),c=!1),g=!1,h=!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(),n++,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(")")),n&&(n--,this.outdent()));else{var Se=!1;this._input.lookBack("with")&&(Se=!0),this.preserveSingleSpace(W||Se),this.print_string(this._ch),c&&U==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),L=!0):(this.eatWhitespace(),n++,this.indent())}else if(this._ch===")")n&&(n--,this.outdent()),L&&this._input.peek()===";"&&this._options.selector_separator_newline&&(L=!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&&(!c||L)&&n===0&&!h&&!g?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!c&&n===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&&r.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(W),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),r.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 Be=U==='"'||U==="'";this.preserveSingleSpace(Be||W),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&T&&this._output.add_new_line()}var Ne=this._output.get_code(C);return Ne},e.exports.Beautifier=y},function(e,R,m){var v=m(6).Options;function u(s){v.call(this,s,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var a=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||a;var A=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var o=0;o<A.length;o++)A[o]!=="expand"?this.brace_style="collapse":this.brace_style=A[o]}u.prototype=new v,e.exports.Options=u}],O={};function X(e){var R=O[e];if(R!==void 0)return R.exports;var m=O[e]={exports:{}};return F[e](m,m.exports,X),m.exports}var P=X(15);D=P})();var V=D;!(se=[],G=function(){return{css_beautify:V}}.apply(_e,se),G!==void 0&&(ht.exports=G))})()},Vhoy:function(ht,_e,j){"use strict";j.d(_e,"d",function(){return V}),j.d(_e,"e",function(){return F}),j.d(_e,"c",function(){return O}),j.d(_e,"b",function(){return X}),j.d(_e,"a",function(){return P});var se=j("MI8n");class G{constructor(){this._icons=new Map,this._onDidRegister=new se.b}add(e){const R=this._icons.get(e.id);R?e.description?R.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const D=new G,V=D;function F(e,R){return new X(e,R)}function O(e){return e?e.replace(/\$\((.*?)\)/g,(R,m)=>` ${m} `).trim():""}class X{constructor(e,R,m){this.id=e,this.definition=R,this.description=m,D.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var P;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const R=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function m(s){if(s instanceof X)return["codicon","codicon-"+s.id];const a=R.exec(s.id);if(!a)return m(X.error);let[,A,o]=a;const i=["codicon","codicon-"+A];return o&&i.push("codicon-modifier-"+o.substr(1)),i}e.asClassNameArray=m;function v(s){return m(s).join(" ")}e.asClassName=v;function u(s){return"."+m(s).join(".")}e.asCSSSelector=u})(P||(P={})),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"})}(X||(X={}))},WaYH:function(ht,_e,j){"use strict";var se=j("rePB"),G=j("Ff2n"),D=j("VTBJ"),V=j("1OyB"),F=j("vuIU"),O=j("JX7q"),X=j("Ji7U"),P=j("LK+K"),e=j("q1tI"),R=j("TSYQ"),m=j.n(R),v=j("sboe"),u=j("OZM5"),s=function(B){var C=B.prefixCls,d=B.level,n=B.isStart,l=B.isEnd;if(!d)return null;for(var c="".concat(C,"-indent-unit"),b=[],g=0;g<d;g+=1){var h;b.push(e.createElement("span",{key:g,className:m()(c,(h={},Object(se.a)(h,"".concat(c,"-start"),n[g+1]),Object(se.a)(h,"".concat(c,"-end"),l[g+1]),Object(se.a)(h,"".concat(c,"-end-first-level"),!g&&l[0]),h))}))}return e.createElement("span",{"aria-hidden":"true",className:"".concat(C,"-indent")},b)},a=s,A=j("815F"),o="open",i="close",r="---",t=function(y){Object(X.a)(C,y);var B=Object(P.a)(C);function C(){var d;return Object(V.a)(this,C),d=B.apply(this,arguments),d.state={dragNodeHighlight:!1},d.onSelectorClick=function(n){var l=d.props.context.onNodeClick;l(n,Object(A.b)(d.props)),d.isSelectable()?d.onSelect(n):d.onCheck(n)},d.onSelectorDoubleClick=function(n){var l=d.props.context.onNodeDoubleClick;l(n,Object(A.b)(d.props))},d.onSelect=function(n){if(d.isDisabled())return;var l=d.props.context.onNodeSelect;n.preventDefault(),l(n,Object(A.b)(d.props))},d.onCheck=function(n){if(d.isDisabled())return;var l=d.props,c=l.disableCheckbox,b=l.checked,g=d.props.context.onNodeCheck;if(!d.isCheckable()||c)return;n.preventDefault();var h=!b;g(n,Object(A.b)(d.props),h)},d.onMouseEnter=function(n){var l=d.props.context.onNodeMouseEnter;l(n,Object(A.b)(d.props))},d.onMouseLeave=function(n){var l=d.props.context.onNodeMouseLeave;l(n,Object(A.b)(d.props))},d.onContextMenu=function(n){var l=d.props.context.onNodeContextMenu;l(n,Object(A.b)(d.props))},d.onDragStart=function(n){var l=d.props.context.onNodeDragStart;n.stopPropagation(),d.setState({dragNodeHighlight:!0}),l(n,Object(O.a)(d));try{n.dataTransfer.setData("text/plain","")}catch(c){}},d.onDragEnter=function(n){var l=d.props.context.onNodeDragEnter;n.preventDefault(),n.stopPropagation(),l(n,Object(O.a)(d))},d.onDragOver=function(n){var l=d.props.context.onNodeDragOver;n.preventDefault(),n.stopPropagation(),l(n,Object(O.a)(d))},d.onDragLeave=function(n){var l=d.props.context.onNodeDragLeave;n.stopPropagation(),l(n,Object(O.a)(d))},d.onDragEnd=function(n){var l=d.props.context.onNodeDragEnd;n.stopPropagation(),d.setState({dragNodeHighlight:!1}),l(n,Object(O.a)(d))},d.onDrop=function(n){var l=d.props.context.onNodeDrop;n.preventDefault(),n.stopPropagation(),d.setState({dragNodeHighlight:!1}),l(n,Object(O.a)(d))},d.onExpand=function(n){var l=d.props.context.onNodeExpand;l(n,Object(A.b)(d.props))},d.setSelectHandle=function(n){d.selectHandle=n},d.getNodeState=function(){var n=d.props.expanded;return d.isLeaf()?null:n?o:i},d.hasChildren=function(){var n=d.props.eventKey,l=d.props.context.keyEntities,c=l[n]||{},b=c.children;return!!(b||[]).length},d.isLeaf=function(){var n=d.props,l=n.isLeaf,c=n.loaded,b=d.props.context.loadData,g=d.hasChildren();return l===!1?!1:l||!b&&!g||b&&c&&!g},d.isDisabled=function(){var n=d.props.disabled,l=d.props.context.disabled;return!!(l||n)},d.isCheckable=function(){var n=d.props.checkable,l=d.props.context.checkable;return!l||n===!1?!1:l},d.syncLoadData=function(n){var l=n.expanded,c=n.loading,b=n.loaded,g=d.props.context,h=g.loadData,L=g.onNodeLoad;if(c)return;h&&l&&!d.isLeaf()&&(!d.hasChildren()&&!b&&L(Object(A.b)(d.props)))},d.renderSwitcher=function(){var n=d.props,l=n.expanded,c=n.switcherIcon,b=d.props.context,g=b.prefixCls,h=b.switcherIcon,L=c||h;if(d.isLeaf())return e.createElement("span",{className:m()("".concat(g,"-switcher"),"".concat(g,"-switcher-noop"))},typeof L=="function"?L(Object(D.a)(Object(D.a)({},d.props),{},{isLeaf:!0})):L);var N=m()("".concat(g,"-switcher"),"".concat(g,"-switcher_").concat(l?o:i));return e.createElement("span",{onClick:d.onExpand,className:N},typeof L=="function"?L(Object(D.a)(Object(D.a)({},d.props),{},{isLeaf:!1})):L)},d.renderCheckbox=function(){var n=d.props,l=n.checked,c=n.halfChecked,b=n.disableCheckbox,g=d.props.context.prefixCls,h=d.isDisabled(),L=d.isCheckable();if(!L)return null;var N=typeof L!="boolean"?L:null;return e.createElement("span",{className:m()("".concat(g,"-checkbox"),l&&"".concat(g,"-checkbox-checked"),!l&&c&&"".concat(g,"-checkbox-indeterminate"),(h||b)&&"".concat(g,"-checkbox-disabled")),onClick:d.onCheck},N)},d.renderIcon=function(){var n=d.props.loading,l=d.props.context.prefixCls;return e.createElement("span",{className:m()("".concat(l,"-iconEle"),"".concat(l,"-icon__").concat(d.getNodeState()||"docu"),n&&"".concat(l,"-icon_loading"))})},d.renderSelector=function(){var n=d.state.dragNodeHighlight,l=d.props,c=l.title,b=l.selected,g=l.icon,h=l.loading,L=l.data,N=d.props.context,T=N.prefixCls,M=N.showIcon,W=N.icon,U=N.draggable,Y=N.loadData,ne=N.titleRender,me=d.isDisabled(),ge="".concat(T,"-node-content-wrapper"),Oe;if(M){var Se=g||W;Oe=Se?e.createElement("span",{className:m()("".concat(T,"-iconEle"),"".concat(T,"-icon__customize"))},typeof Se=="function"?Se(d.props):Se):d.renderIcon()}else Y&&h&&(Oe=d.renderIcon());var Be;typeof c=="function"?Be=c(L):ne?Be=ne(L):Be=c;var Ne=e.createElement("span",{className:"".concat(T,"-title")},Be);return e.createElement("span",{ref:d.setSelectHandle,title:typeof c=="string"?c:"",className:m()("".concat(ge),"".concat(ge,"-").concat(d.getNodeState()||"normal"),!me&&(b||n)&&"".concat(T,"-node-selected"),!me&&U&&"draggable"),draggable:!me&&U||void 0,"aria-grabbed":!me&&U||void 0,onMouseEnter:d.onMouseEnter,onMouseLeave:d.onMouseLeave,onContextMenu:d.onContextMenu,onClick:d.onSelectorClick,onDoubleClick:d.onSelectorDoubleClick,onDragStart:U?d.onDragStart:void 0},Oe,Ne)},d}return Object(F.a)(C,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var n=this.props.selectable,l=this.props.context.selectable;return typeof n=="boolean"?n:l}},{key:"render",value:function(){var n,l=this.props,c=l.eventKey,b=l.className,g=l.style,h=l.dragOver,L=l.dragOverGapTop,N=l.dragOverGapBottom,T=l.isLeaf,M=l.isStart,W=l.isEnd,U=l.expanded,Y=l.selected,ne=l.checked,me=l.halfChecked,ge=l.loading,Oe=l.domRef,Se=l.active,Be=l.onMouseMove,Ne=Object(G.a)(l,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ke=this.props.context,Ce=ke.prefixCls,ve=ke.filterTreeNode,Xe=ke.draggable,lt=ke.keyEntities,at=this.isDisabled(),je=Object(u.f)(Ne),rt=lt[c]||{},re=rt.level,J=W[W.length-1];return e.createElement("div",Object.assign({ref:Oe,className:m()(b,"".concat(Ce,"-treenode"),(n={},Object(se.a)(n,"".concat(Ce,"-treenode-disabled"),at),Object(se.a)(n,"".concat(Ce,"-treenode-switcher-").concat(U?"open":"close"),!T),Object(se.a)(n,"".concat(Ce,"-treenode-checkbox-checked"),ne),Object(se.a)(n,"".concat(Ce,"-treenode-checkbox-indeterminate"),me),Object(se.a)(n,"".concat(Ce,"-treenode-selected"),Y),Object(se.a)(n,"".concat(Ce,"-treenode-loading"),ge),Object(se.a)(n,"".concat(Ce,"-treenode-active"),Se),Object(se.a)(n,"".concat(Ce,"-treenode-leaf-last"),J),Object(se.a)(n,"drag-over",!at&&h),Object(se.a)(n,"drag-over-gap-top",!at&&L),Object(se.a)(n,"drag-over-gap-bottom",!at&&N),Object(se.a)(n,"filter-node",ve&&ve(Object(A.b)(this.props))),n)),style:g,onDragEnter:Xe?this.onDragEnter:void 0,onDragOver:Xe?this.onDragOver:void 0,onDragLeave:Xe?this.onDragLeave:void 0,onDrop:Xe?this.onDrop:void 0,onDragEnd:Xe?this.onDragEnd:void 0,onMouseMove:Be},je),e.createElement(a,{prefixCls:Ce,level:re,isStart:M,isEnd:W}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),C}(e.Component),E=function(B){return e.createElement(v.a.Consumer,null,function(C){return e.createElement(t,Object.assign({},B,{context:C}))})};E.displayName="TreeNode",E.defaultProps={title:r},E.isTreeNode=1;var _=_e.a=E},Y1PL:function(ht,_e,j){"use strict";j.r(_e),j.d(_e,"ResizableTextArea",function(){return me});var se=j("wx14"),G=j("1OyB"),D=j("vuIU"),V=j("Ji7U"),F=j("LK+K"),O=j("q1tI"),X=j("VTBJ"),P=j("rePB"),e=j("Zm9Q"),R=j("Kwbf"),m=j("c+Xe"),v=j("m+aA"),u=j("bdgK"),s=new Map;function a(Se){Se.forEach(function(Be){var Ne,ke=Be.target;(Ne=s.get(ke))===null||Ne===void 0||Ne.forEach(function(Ce){return Ce(ke)})})}var A=new u.default(a),o=null,i=null;function r(Se,Be){s.has(Se)||(s.set(Se,new Set),A.observe(Se)),s.get(Se).add(Be)}function t(Se,Be){s.has(Se)&&(s.get(Se).delete(Be),s.get(Se).size||(A.unobserve(Se),s.delete(Se)))}var E=function(Se){Object(V.a)(Ne,Se);var Be=Object(F.a)(Ne);function Ne(){return Object(G.a)(this,Ne),Be.apply(this,arguments)}return Object(D.a)(Ne,[{key:"render",value:function(){return this.props.children}}]),Ne}(O.Component),_=O.createContext(null);function y(Se){var Be=Se.children,Ne=Se.onBatchResize,ke=O.useRef(0),Ce=O.useRef([]),ve=O.useContext(_),Xe=O.useCallback(function(lt,at,je){ke.current+=1;var rt=ke.current;Ce.current.push({size:lt,element:at,data:je}),Promise.resolve().then(function(){rt===ke.current&&(Ne==null||Ne(Ce.current),Ce.current=[])}),ve==null||ve(lt,at,je)},[Ne,ve]);return O.createElement(_.Provider,{value:Xe},Be)}function B(Se){var Be=Se.children,Ne=Se.disabled,ke=O.useRef(null),Ce=O.useRef(null),ve=O.useContext(_),Xe=O.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),lt=O.isValidElement(Be)&&Object(m.c)(Be),at=lt?Be.ref:null,je=O.useMemo(function(){return Object(m.a)(at,ke)},[at,ke]),rt=O.useRef(Se);rt.current=Se;var re=O.useCallback(function(J){var k=rt.current,$=k.onResize,q=k.data,he=J.getBoundingClientRect(),de=he.width,Qe=he.height,ze=J.offsetWidth,Ge=J.offsetHeight,$e=Math.floor(de),nt=Math.floor(Qe);if(Xe.current.width!==$e||Xe.current.height!==nt||Xe.current.offsetWidth!==ze||Xe.current.offsetHeight!==Ge){var dt={width:$e,height:nt,offsetWidth:ze,offsetHeight:Ge};Xe.current=dt;var xe=ze===Math.round(de)?de:ze,Ue=Ge===Math.round(Qe)?Qe:Ge,Ke=Object(X.a)(Object(X.a)({},dt),{},{offsetWidth:xe,offsetHeight:Ue});ve==null||ve(Ke,J,q),$&&Promise.resolve().then(function(){$(Ke,J)})}},[]);return O.useEffect(function(){var J=Object(v.a)(ke.current)||Object(v.a)(Ce.current);return J&&!Ne&&r(J,re),function(){return t(J,re)}},[ke.current,Ne]),O.createElement(E,{ref:Ce},lt?O.cloneElement(Be,{ref:je}):Be)}var C="rc-observer-key";function d(Se){var Be=Se.children,Ne=Object(e.a)(Be);return Ne.map(function(ke,Ce){var ve=(ke==null?void 0:ke.key)||"".concat(C,"-").concat(Ce);return O.createElement(B,Object(se.a)({},Se,{key:ve}),ke)})}d.Collection=y;var n=d,l=j("bT9E"),c=j("TSYQ"),b=j.n(c),g=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,h=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],L={},N;function T(Se){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ne=Se.getAttribute("id")||Se.getAttribute("data-reactid")||Se.getAttribute("name");if(Be&&L[Ne])return L[Ne];var ke=window.getComputedStyle(Se),Ce=ke.getPropertyValue("box-sizing")||ke.getPropertyValue("-moz-box-sizing")||ke.getPropertyValue("-webkit-box-sizing"),ve=parseFloat(ke.getPropertyValue("padding-bottom"))+parseFloat(ke.getPropertyValue("padding-top")),Xe=parseFloat(ke.getPropertyValue("border-bottom-width"))+parseFloat(ke.getPropertyValue("border-top-width")),lt=h.map(function(je){return"".concat(je,":").concat(ke.getPropertyValue(je))}).join(";"),at={sizingStyle:lt,paddingSize:ve,borderSize:Xe,boxSizing:Ce};return Be&&Ne&&(L[Ne]=at),at}function M(Se){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;N||(N=document.createElement("textarea"),N.setAttribute("tab-index","-1"),N.setAttribute("aria-hidden","true"),document.body.appendChild(N)),Se.getAttribute("wrap")?N.setAttribute("wrap",Se.getAttribute("wrap")):N.removeAttribute("wrap");var Ce=T(Se,Be),ve=Ce.paddingSize,Xe=Ce.borderSize,lt=Ce.boxSizing,at=Ce.sizingStyle;N.setAttribute("style","".concat(at,";").concat(g)),N.value=Se.value||Se.placeholder||"";var je=Number.MIN_SAFE_INTEGER,rt=Number.MAX_SAFE_INTEGER,re=N.scrollHeight,J;if(lt==="border-box"?re+=Xe:lt==="content-box"&&(re-=ve),Ne!==null||ke!==null){N.value=" ";var k=N.scrollHeight-ve;Ne!==null&&(je=k*Ne,lt==="border-box"&&(je=je+ve+Xe),re=Math.max(je,re)),ke!==null&&(rt=k*ke,lt==="border-box"&&(rt=rt+ve+Xe),J=re>rt?"":"hidden",re=Math.min(rt,re))}return{height:re,minHeight:je,maxHeight:rt,overflowY:J,resize:"none"}}var W=j("Gytx"),U=j.n(W),Y;(function(Se){Se[Se.NONE=0]="NONE",Se[Se.RESIZING=1]="RESIZING",Se[Se.RESIZED=2]="RESIZED"})(Y||(Y={}));var ne=function(Se){Object(V.a)(Ne,Se);var Be=Object(F.a)(Ne);function Ne(ke){var Ce;return Object(G.a)(this,Ne),Ce=Be.call(this,ke),Ce.nextFrameActionId=void 0,Ce.resizeFrameId=void 0,Ce.textArea=void 0,Ce.saveTextArea=function(ve){Ce.textArea=ve},Ce.handleResize=function(ve){var Xe=Ce.state.resizeStatus,lt=Ce.props,at=lt.autoSize,je=lt.onResize;if(Xe!==Y.NONE)return;typeof je=="function"&&je(ve),at&&Ce.resizeOnNextFrame()},Ce.resizeOnNextFrame=function(){cancelAnimationFrame(Ce.nextFrameActionId),Ce.nextFrameActionId=requestAnimationFrame(Ce.resizeTextarea)},Ce.resizeTextarea=function(){var ve=Ce.props.autoSize;if(!ve||!Ce.textArea)return;var Xe=ve.minRows,lt=ve.maxRows,at=M(Ce.textArea,!1,Xe,lt);Ce.setState({textareaStyles:at,resizeStatus:Y.RESIZING},function(){cancelAnimationFrame(Ce.resizeFrameId),Ce.resizeFrameId=requestAnimationFrame(function(){Ce.setState({resizeStatus:Y.RESIZED},function(){Ce.resizeFrameId=requestAnimationFrame(function(){Ce.setState({resizeStatus:Y.NONE}),Ce.fixFirefoxAutoScroll()})})})})},Ce.renderTextArea=function(){var ve=Ce.props,Xe=ve.prefixCls,lt=Xe===void 0?"rc-textarea":Xe,at=ve.autoSize,je=ve.onResize,rt=ve.className,re=ve.disabled,J=Ce.state,k=J.textareaStyles,$=J.resizeStatus,q=Object(l.a)(Ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),he=b()(lt,rt,Object(P.a)({},"".concat(lt,"-disabled"),re));"value"in q&&(q.value=q.value||"");var de=Object(X.a)(Object(X.a)(Object(X.a)({},Ce.props.style),k),$===Y.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return O.createElement(n,{onResize:Ce.handleResize,disabled:!(at||je)},O.createElement("textarea",Object(se.a)({},q,{className:he,style:de,ref:Ce.saveTextArea})))},Ce.state={textareaStyles:{},resizeStatus:Y.NONE},Ce}return Object(D.a)(Ne,[{key:"componentDidUpdate",value:function(Ce){(Ce.value!==this.props.value||!U()(Ce.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var Ce=this.textArea.selectionStart,ve=this.textArea.selectionEnd;this.textArea.setSelectionRange(Ce,ve)}}catch(Xe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ne}(O.Component),me=ne,ge=function(Se){Object(V.a)(Ne,Se);var Be=Object(F.a)(Ne);function Ne(ke){var Ce;Object(G.a)(this,Ne),Ce=Be.call(this,ke),Ce.resizableTextArea=void 0,Ce.focus=function(){Ce.resizableTextArea.textArea.focus()},Ce.saveTextArea=function(Xe){Ce.resizableTextArea=Xe},Ce.handleChange=function(Xe){var lt=Ce.props.onChange;Ce.setValue(Xe.target.value,function(){Ce.resizableTextArea.resizeTextarea()}),lt&<(Xe)},Ce.handleKeyDown=function(Xe){var lt=Ce.props,at=lt.onPressEnter,je=lt.onKeyDown;Xe.keyCode===13&&at&&at(Xe),je&&je(Xe)};var ve=typeof ke.value=="undefined"||ke.value===null?ke.defaultValue:ke.value;return Ce.state={value:ve},Ce}return Object(D.a)(Ne,[{key:"setValue",value:function(Ce,ve){"value"in this.props||this.setState({value:Ce},ve)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return O.createElement(me,Object(se.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Ce){return"value"in Ce?{value:Ce.value}:null}}]),Ne}(O.Component),Oe=_e.default=ge},ZPm4:function(ht,_e,j){ht.exports={flex_box_center:"flex_box_center___3ePce",flex_space_between:"flex_space_between___kudFn",flex_box_vertical_center:"flex_box_vertical_center___2q7vR",flex_box_center_end:"flex_box_center_end___148Sb",flex_box_column:"flex_box_column___F25pb",bg:"bg___28cHV",circularBlue:"circularBlue___jIYhi",circularRed:"circularRed___11EBA",circularOrange:"circularOrange___3vass",circularGreen:"circularGreen___2FZOw",circularGrey:"circularGrey___1miQR",title:"title___26wjq",questionIcons:"questionIcons___QVCrf",grey:"grey___2G7cN",green:"green___2giUk",blue:"blue___ilI2M",orange:"orange___18xMh",red:"red___k052H",greenTip:"greenTip___3Uhcb",redTip:"redTip___Co_D9",cccTip:"cccTip___2JK_0",orangeTip:"orangeTip___1AIXz",flexRow:"flexRow___1V1Cl",simpleWrap:"simpleWrap___2cXGy",userPhoto:"userPhoto___3u-Jn",CCCIcons:"CCCIcons___3Ln3B",buttonFixed:"buttonFixed___1XM5C",typeTitle:"typeTitle___3R9ju",answerResult:"answerResult___26O14",questionsInfo:"questionsInfo___2vxH1",leftBar:"leftBar___3d8QX",greenBg:"greenBg____iB7N",blueBg:"blueBg___3qJqj",redBg:"redBg___ezJBz",orangeBg:"orangeBg___2DJpY",greyBg:"greyBg___18w2w",commentText:"commentText___ckWGZ",full:"full___1abk2"}},ZW9T:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return W});var se=j("k1fw"),G=j("oBTY"),D=j("miYZ"),V=j("tsqr"),F=j("rAM+"),O=j("tJVT"),X=j("PpiC"),P=j("q1tI"),e=j.n(P),R=j("bdgK"),m=j("9og8"),v=j("WmNS"),u=j.n(v),s={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"]},a={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"]},A={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(`
|
|
`)}]},o={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(`
|
|
`)}]},i=j("5VLF"),r=j.n(i),t={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"]}},E=function(Y,ne){return ne.map(function(me){return{label:me,kind:Y.languages.CompletionItemKind.Keyword,insertText:me}})},_=function(Y){return Object.keys(t.tables).map(function(ne){return{label:ne,kind:Y.languages.CompletionItemKind.Variable,insertText:ne}})},y=function(Y,ne){var me=t.tables[Y];return me?me.map(function(ge){return{label:ge,kind:ne.languages.CompletionItemKind.Field,insertText:ge}}):[]};function B(U,Y,ne,me,ge){var Oe=Y.getWordUntilPosition(ne),Se={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},Be=me.map(function(Ne){return{label:Ne,kind:U.languages.CompletionItemKind.Keyword,insertText:Ne,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}});return ge.map(function(Ne){Be.push(Object(se.a)(Object(se.a)({},Ne),{},{range:Se}))}),Be}var C=function(U){t.languages.map(function(ge){return U.languages.registerDocumentFormattingEditProvider(ge,{provideDocumentFormattingEdits:function(Se,Be,Ne){return Object(m.a)(u.a.mark(function ke(){var Ce;return u.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Ce=r()(Se.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}),Xe.abrupt("return",[{range:Se.getFullModelRange(),text:Ce}]);case 2:case"end":return Xe.stop()}},ke)}))()}}),ge});var Y=A.quickKey.map(function(ge){return{label:ge.label,kind:U.languages.CompletionItemKind.Method,insertText:ge.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=o.quickKey.map(function(ge){return{label:ge.label,kind:U.languages.CompletionItemKind.Method,insertText:ge.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),me=a.quickKey.map(function(ge){return{label:ge.label,kind:U.languages.CompletionItemKind.Method,insertText:ge.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}});U.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Oe,Se){var Be=Oe.getWordUntilPosition(Se),Ne={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},ke=Oe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[].concat(Object(G.a)(A.keywords.map(function(Ce){return{label:Ce,kind:U.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})),Object(G.a)(A.quickKey.map(function(Ce){return{label:Ce.label,kind:U.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:ke.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})))}}}),U.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Oe,Se){var Be=Oe.getWordUntilPosition(Se),Ne={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn};return{suggestions:Object(G.a)(s.keywords.map(function(ke){return{label:ke,kind:U.languages.CompletionItemKind.Function,documentation:ke,insertText:ke,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}}))}}}),U.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Oe,Se){var Be=Oe.getWordUntilPosition(Se),Ne={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},ke=Oe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[].concat(Object(G.a)(a.keywords.map(function(Ce){return{label:Ce,kind:U.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})),Object(G.a)(a.quickKey.map(function(Ce){return{label:Ce.label,kind:U.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:ke.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})))}}}),U.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Oe,Se){var Be=Oe.getWordUntilPosition(Se),Ne={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},ke=Oe.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[].concat(Object(G.a)(o.keywords.map(function(Ce){return{label:Ce,kind:U.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})),Object(G.a)(o.quickKey.map(function(Ce){return{label:Ce.label,kind:U.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:ke.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}})))}}})},d="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",n=j("fjLI"),l=j("LvDl"),c=j("+ua5");function b(U){return/^\d+$/.test(U)?"".concat(U,"px"):U}function g(){}var h=!1,L={"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"};function N(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Y=U;if(Array.isArray(U)){for(var ne=0;ne<U.length;ne++){var me=L[U[ne]];if(me)return me}return Y[0]}return L[Y]||Y}var T=null,M=_e.b=function(U){var Y=U.width,ne=Y===void 0?"100%":Y,me=U.height,ge=me===void 0?"100%":me,Oe=U.value,Se=U.language,Be=Se===void 0?"javascript":Se,Ne=U.style,ke=Ne===void 0?{}:Ne,Ce=U.options,ve=Ce===void 0?{}:Ce,Xe=U.overrideServices,lt=Xe===void 0?{}:Xe,at=U.theme,je=at===void 0?"vs-dark":at,rt=U.onEditBlur,re=U.onSave,J=U.autoHeight,k=J===void 0?!1:J,$=U.forbidCopy,q=$===void 0?!1:$,he=U.onChange,de=he===void 0?g:he,Qe=U.editorDidMount,ze=Qe===void 0?g:Qe,Ge=U.onFocus,$e=Ge===void 0?g:Ge,nt=U.filename,dt=nt===void 0?"educoder.txt":nt,xe=U.errorLine,Ue=U.errorContent,Ke=Ue===void 0?"":Ue,We=Object(X.a)(U,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Le=Object(P.useRef)(),Fe=Object(P.useRef)({}),we=Object(P.useRef)(),ue=Object(P.useRef)(),ce=Object(P.useRef)(!1),te=Object(P.useRef)(),ie=Object(P.useState)(!1),le=Object(O.a)(ie,2),pe=le[0],Ie=le[1];function Pe(){var At;return Le.current&&(At=new R.default(function(gt){var Nt=Object(F.a)(gt),ir;try{for(Nt.s();!(ir=Nt.n()).done;){var yr=ir.value;(yr.target.offsetHeight>0||yr.target.offsetWidth>0)&&Fe.current.instance.layout()}}catch(br){Nt.e(br)}finally{Nt.f()}}),At.observe(Le.current)),At}function qe(){V.b.warn(decodeURIComponent(d))}var ft=function(){var gt=Fe.current.instance;if(Oe!=null&>&&pe){var Nt=gt.getModel();Nt&&Oe!==Nt.getValue()&&(h=!0,Nt.setValue(Oe),gt.layout(),h=!1)}};Object(P.useEffect)(function(){ue.current&&clearTimeout(ue.current),ue.current=setTimeout(function(){ft()},500)},[Oe,pe,Fe.current]),Object(P.useEffect)(function(){if(xe&&Fe.current&&Fe.current.instance){var At=Fe.current.instance;At.changeViewZones(function(Nt){var ir=document.createElement("div");ir.style.padding="10px 20px",ir.style.width="calc(100% - 20px)",ir.className="my-error-line-wrp",ir.innerHTML=Ke,Nt.addZone({afterLineNumber:xe||11,heightInLines:3,domNode:ir})});var gt={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}};At.addOverlayWidget(gt),At.revealPositionInCenter({lineNumber:20,column:1})}},[xe,Fe.current,pe]);function ut(){var At=Fe.current.instance;if(At){var gt=At.getSelection(),Nt=Fe.current.pastePos||{},ir=new T.Range(Nt.startLineNumber||gt.endLineNumber,Nt.startColumn||gt.endColumn,Nt.endLineNumber||gt.endLineNumber,Nt.endColumn||gt.endColumn);setTimeout(function(){At.executeEdits("",[{range:ir,text:""}])},300)}}function st(At){(window.navigator.platform.match("Mac")?At.metaKey:At.ctrlKey)&&At.keyCode==83&&(At.preventDefault(),re())}var Lt=function(){if(k&&Fe.current.instance){var gt=Fe.current.instance.getContentHeight();ct(gt<ge?ge:gt)}else ct(ge)};function mt(At){var gt=document.createEvent("MouseEvents");gt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),At.dispatchEvent(gt)}function tt(At,gt){var Nt=window.URL||window.webkitURL||window,ir=new Blob([gt]),yr=document.createElementNS("http://www.w3.org/1999/xhtml","a");yr.href=Nt.createObjectURL(ir),yr.download=At,mt(yr)}Object(P.useEffect)(function(){Lt()},[Lt]),Object(P.useEffect)(function(){Le.current&&!pe&&Promise.all([j.e(16),j.e(28)]).then(j.t.bind(null,"M/lh",7)).then(function(At){try{T=At,Fe.current.instance=T.editor.create(Le.current,{value:Oe,language:N(Be),theme:je,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},lt);var gt=Fe.current.instance,Nt=n.d._menuItems,ir=Object(G.a)(Nt).find(function(Ht){return Ht[0]._debugName=="EditorContext"}),yr=ir[1],br=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Rr=function(pr,Lr){var Cr=pr._first;do{var Qr,Ur,ae=Lr.includes((Qr=Cr.element)===null||Qr===void 0||((Ur=Qr.command)===null||Ur===void 0)?void 0:Ur.id);ae&&pr._remove(Cr)}while(Cr=Cr.next)};if(ze(gt,T),setTimeout(function(){Lt(),Fe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){tt(dt||"educoder.txt",gt.getValue())}}),gt.getDomNode().addEventListener("input",function(){we.current.autoFormat&>.getAction("editor.action.formatDocument").run()})},500),Fe.current.subscription=gt.onDidChangeModelContent(function(Ht){ce.current?clearTimeout(te.current):(Lt(),de(gt.getValue(),Ht)),te.current=setTimeout(function(){ce.current=!1},500)}),window.Monaco||C(T,N(Be)),q&&(Rr(yr,br),Le.current.classList.add("noCopyPaste"),gt.onKeyDown(function(Ht){var pr=Ht.keyCode,Lr=Ht.ctrlKey,Cr=Ht.metaKey;(pr===33||pr===52)&&(Cr||Lr)&&(qe(),Ht.preventDefault())})),window.Monaco=T,rt&>.onDidBlurEditorWidget(function(){rt(gt.getValue())}),$e&>.onDidFocusEditorText(function(){$e(gt.getValue())}),q){gt.addCommand(T.KeyMod.CtrlCmd|T.KeyCode.KEY_V,function(){return qe(),null}),gt.onDidPaste(function(Ht){Fe.current.pastePos=Ht});try{window.addEventListener("paste",ut)}catch(Ht){}}var Dr=Pe();return Ie(!0),function(){var Ht=Fe.current.instance;Ht.dispose();var pr=Ht.getModel();pr&&pr.dispose(),Fe.current.subscription&&Fe.current.subscription.dispose(),q&&window.removeEventListener("paste",ut),Dr.unobserve(Le.current)}}catch(Ht){}})},[]),Object(P.useEffect)(function(){var At=Fe.current.instance;if(At&&pe)return document.addEventListener("keydown",st,!1),function(){document.removeEventListener("keydown",st)}},[re,pe]),Object(P.useEffect)(function(){var At=Fe.current.instance;if(At&&pe){var gt=N(Be);T.editor.setModelLanguage(At.getModel(),gt),console.log("language:",Be,At.getModel(),gt)}},[Be,pe]),Object(P.useEffect)(function(){var At=Fe.current.instance;At&&pe&&T.editor.setTheme(je)},[je,pe]),Object(P.useEffect)(function(){var At=Fe.current.instance;we.current=ve,At&&pe&&(At.updateOptions(Object(se.a)({},ve)),setTimeout(function(){At.getModel().updateOptions(Object(se.a)({},ve))},200))},[JSON.stringify(ve),pe]),Object(P.useEffect)(function(){var At=Fe.current.instance;At&&pe&&At.layout()},[ne,ge,pe]);var er=Object(P.useState)(b(ne)),Jt=Object(O.a)(er,2),Ot=Jt[0],yt=Jt[1],Et=Object(P.useState)(b(ge)),wt=Object(O.a)(Et,2),Mt=wt[0],ct=wt[1],lr=Object(se.a)(Object(se.a)({},ke),{},{width:Ot,height:Mt});return e.a.createElement("div",{className:"my-monaco-editor",ref:Le,style:lr})};function W(U){var Y=U.width,ne=Y===void 0?"100%":Y,me=U.height,ge=me===void 0?"100%":me,Oe=U.original,Se=U.modified,Be=U.language,Ne=U.options,ke=Ne===void 0?{}:Ne,Ce=Object(P.useRef)(),ve=Object(P.useState)(null),Xe=Object(O.a)(ve,2),lt=Xe[0],at=Xe[1];function je(k){var $;return Ce.current&&($=new R.default(function(q){var he=Object(F.a)(q),de;try{for(he.s();!(de=he.n()).done;){var Qe=de.value;(Qe.target.offsetHeight>0||Qe.target.offsetWidth>0)&&k.layout()}}catch(ze){he.e(ze)}finally{he.f()}}),$.observe(Ce.current)),$}Object(P.useEffect)(function(){Ce.current&&Promise.all([j.e(16),j.e(28)]).then(j.t.bind(null,"M/lh",7)).then(function(k){T=k;var $=T.editor.createDiffEditor(Ce.current,Object(se.a)(Object(se.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},ke),{},{wordWrap:!0}));at($);var q=je($);return function(){$.dispose();var he=$.getModel();he&&he.dispose(),q.unobserve(Ce.current)}})},[]),Object(P.useEffect)(function(){lt&<.setModel({original:T.editor.createModel(Oe,Be),modified:T.editor.createModel(Se,Be)})},[Oe,Se,Be,lt]);var rt=b(ne),re=b(ge),J={width:rt,height:re};return e.a.createElement("div",{className:"my-diff-editor",ref:Ce,style:J})}},bT9E:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return G});var se=j("VTBJ");function G(D,V){var F=Object(se.a)({},D);return Array.isArray(V)&&V.forEach(function(O){delete F[O]}),F}},biw7:function(ht,_e,j){"use strict";var se=j("q1tI"),G=j.n(se),D=se.createContext(null);_e.a=D},crp1:function(ht,_e,j){"use strict";j.d(_e,"b",function(){return Ot}),j.d(_e,"a",function(){return Mt});var se={},G=function(ae,oe,fe,Te,Ye){var et=se[oe]||(se[oe]=URL.createObjectURL(new Blob([ae],{type:"text/javascript"}))),Q=new Worker(et);return Q.onerror=function(p){return Ye(p.error,null)},Q.onmessage=function(p){return Ye(null,p.data)},Q.postMessage(fe,Te),Q},D=Uint8Array,V=Uint16Array,F=Uint32Array,O=new D([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),X=new D([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),P=new D([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=function(ae,oe){for(var fe=new V(31),Te=0;Te<31;++Te)fe[Te]=oe+=1<<ae[Te-1];for(var Ye=new F(fe[30]),Te=1;Te<30;++Te)for(var et=fe[Te];et<fe[Te+1];++et)Ye[et]=et-fe[Te]<<5|Te;return[fe,Ye]},R=e(O,2),m=R[0],v=R[1];m[28]=258,v[258]=28;for(var u=e(X,0),s=u[0],a=u[1],A=new V(32768),o=0;o<32768;++o){var i=(o&43690)>>>1|(o&21845)<<1;i=(i&52428)>>>2|(i&13107)<<2,i=(i&61680)>>>4|(i&3855)<<4,A[o]=((i&65280)>>>8|(i&255)<<8)>>>1}for(var r=function(ae,oe,fe){for(var Te=ae.length,Ye=0,et=new V(oe);Ye<Te;++Ye)++et[ae[Ye]-1];var Q=new V(oe);for(Ye=0;Ye<oe;++Ye)Q[Ye]=Q[Ye-1]+et[Ye-1]<<1;var p;if(fe){p=new V(1<<oe);var w=15-oe;for(Ye=0;Ye<Te;++Ye)if(ae[Ye])for(var H=Ye<<4|ae[Ye],Z=oe-ae[Ye],K=Q[ae[Ye]-1]++<<Z,ye=K|(1<<Z)-1;K<=ye;++K)p[A[K]>>>w]=H}else for(p=new V(Te),Ye=0;Ye<Te;++Ye)p[Ye]=A[Q[ae[Ye]-1]++]>>>15-ae[Ye];return p},t=new D(288),o=0;o<144;++o)t[o]=8;for(var o=144;o<256;++o)t[o]=9;for(var o=256;o<280;++o)t[o]=7;for(var o=280;o<288;++o)t[o]=8;for(var E=new D(32),o=0;o<32;++o)E[o]=5;var _=r(t,9,0),y=r(t,9,1),B=r(E,5,0),C=r(E,5,1),d=function(ae){for(var oe=ae[0],fe=1;fe<ae.length;++fe)ae[fe]>oe&&(oe=ae[fe]);return oe},n=function(ae,oe,fe){var Te=oe/8>>0;return(ae[Te]|ae[Te+1]<<8)>>>(oe&7)&fe},l=function(ae,oe){var fe=oe/8>>0;return(ae[fe]|ae[fe+1]<<8|ae[fe+2]<<16)>>>(oe&7)},c=function(ae){return(ae/8>>0)+(ae&7&&1)},b=function(ae,oe,fe){(oe==null||oe<0)&&(oe=0),(fe==null||fe>ae.length)&&(fe=ae.length);var Te=new(ae instanceof V?V:ae instanceof F?F:D)(fe-oe);return Te.set(ae.subarray(oe,fe)),Te},g=function(ae,oe,fe){var Te=ae.length,Ye=!oe||fe,et=!fe||fe.i;fe||(fe={}),oe||(oe=new D(Te*3));var Q=function(Zt){var xr=oe.length;if(Zt>xr){var qt=new D(Math.max(xr*2,Zt));qt.set(oe),oe=qt}},p=fe.f||0,w=fe.p||0,H=fe.b||0,Z=fe.l,K=fe.d,ye=fe.m,He=fe.n,it=Te*8;do{if(!Z){fe.f=p=n(ae,w,1);var ot=n(ae,w+1,3);if(w+=3,ot)if(ot==1)Z=y,K=C,ye=9,He=5;else if(ot==2){var Tt=n(ae,w,31)+257,Pt=n(ae,w+10,15)+4,ur=Tt+n(ae,w+5,31)+1;w+=14;for(var Gt=new D(ur),ar=new D(19),kt=0;kt<Pt;++kt)ar[P[kt]]=n(ae,w+kt*3,7);w+=Pt*3;var Tr=d(ar),mr=(1<<Tr)-1;if(!et&&w+ur*(Tr+7)>it)break;for(var $t=r(ar,Tr,1),kt=0;kt<ur;){var De=$t[n(ae,w,mr)];w+=De&15;var Ve=De>>>4;if(Ve<16)Gt[kt++]=Ve;else{var Qt=0,Vt=0;for(Ve==16?(Vt=3+n(ae,w,3),w+=2,Qt=Gt[kt-1]):Ve==17?(Vt=3+n(ae,w,7),w+=3):Ve==18&&(Vt=11+n(ae,w,127),w+=7);Vt--;)Gt[kt++]=Qt}}var Dt=Gt.subarray(0,Tt),jt=Gt.subarray(Tt);ye=d(Dt),He=d(jt),Z=r(Dt,ye,1),K=r(jt,He,1)}else throw"invalid block type";else{var Ve=c(w)+4,_t=ae[Ve-4]|ae[Ve-3]<<8,vt=Ve+_t;if(vt>Te){if(et)throw"unexpected EOF";break}Ye&&Q(H+_t),oe.set(ae.subarray(Ve,vt),H),fe.b=H+=_t,fe.p=w=vt*8;continue}if(w>it)throw"unexpected EOF"}Ye&&Q(H+131072);for(var Kt=(1<<ye)-1,Ar=(1<<He)-1,zt=ye+He+18;et||w+zt<it;){var Qt=Z[l(ae,w)&Kt],sr=Qt>>>4;if(w+=Qt&15,w>it)throw"unexpected EOF";if(!Qt)throw"invalid length/literal";if(sr<256)oe[H++]=sr;else if(sr==256){Z=null;break}else{var rr=sr-254;if(sr>264){var kt=sr-257,Ut=O[kt];rr=n(ae,w,(1<<Ut)-1)+m[kt],w+=Ut}var Wt=K[l(ae,w)&Ar],Ft=Wt>>>4;if(!Wt)throw"invalid distance";w+=Wt&15;var jt=s[Ft];if(Ft>3){var Ut=X[Ft];jt+=l(ae,w)&(1<<Ut)-1,w+=Ut}if(w>it)throw"unexpected EOF";Ye&&Q(H+131072);for(var tr=H+rr;H<tr;H+=4)oe[H]=oe[H-jt],oe[H+1]=oe[H+1-jt],oe[H+2]=oe[H+2-jt],oe[H+3]=oe[H+3-jt];H=tr}}fe.l=Z,fe.p=w,fe.b=H,Z&&(p=1,fe.m=ye,fe.d=K,fe.n=He)}while(!p);return H==oe.length?oe:b(oe,0,H)},h=function(ae,oe,fe){fe<<=oe&7;var Te=oe/8>>0;ae[Te]|=fe,ae[Te+1]|=fe>>>8},L=function(ae,oe,fe){fe<<=oe&7;var Te=oe/8>>0;ae[Te]|=fe,ae[Te+1]|=fe>>>8,ae[Te+2]|=fe>>>16},N=function(ae,oe){for(var fe=[],Te=0;Te<ae.length;++Te)ae[Te]&&fe.push({s:Te,f:ae[Te]});var Ye=fe.length,et=fe.slice();if(!Ye)return[new D(0),0];if(Ye==1){var Q=new D(fe[0].s+1);return Q[fe[0].s]=1,[Q,1]}fe.sort(function(ur,Gt){return ur.f-Gt.f}),fe.push({s:-1,f:25001});var p=fe[0],w=fe[1],H=0,Z=1,K=2;for(fe[0]={s:-1,f:p.f+w.f,l:p,r:w};Z!=Ye-1;)p=fe[fe[H].f<fe[K].f?H++:K++],w=fe[H!=Z&&fe[H].f<fe[K].f?H++:K++],fe[Z++]={s:-1,f:p.f+w.f,l:p,r:w};for(var ye=et[0].s,Te=1;Te<Ye;++Te)et[Te].s>ye&&(ye=et[Te].s);var He=new V(ye+1),it=T(fe[Z-1],He,0);if(it>oe){var Te=0,ot=0,Ve=it-oe,_t=1<<Ve;for(et.sort(function(Gt,ar){return He[ar.s]-He[Gt.s]||Gt.f-ar.f});Te<Ye;++Te){var vt=et[Te].s;if(He[vt]>oe)ot+=_t-(1<<it-He[vt]),He[vt]=oe;else break}for(ot>>>=Ve;ot>0;){var Tt=et[Te].s;He[Tt]<oe?ot-=1<<oe-He[Tt]++-1:++Te}for(;Te>=0&&ot;--Te){var Pt=et[Te].s;He[Pt]==oe&&(--He[Pt],++ot)}it=oe}return[new D(He),it]},T=function(ae,oe,fe){return ae.s==-1?Math.max(T(ae.l,oe,fe+1),T(ae.r,oe,fe+1)):oe[ae.s]=fe},M=function(ae){for(var oe=ae.length;oe&&!ae[--oe];);for(var fe=new V(++oe),Te=0,Ye=ae[0],et=1,Q=function(w){fe[Te++]=w},p=1;p<=oe;++p)if(ae[p]==Ye&&p!=oe)++et;else{if(!Ye&&et>2){for(;et>138;et-=138)Q(32754);et>2&&(Q(et>10?et-11<<5|28690:et-3<<5|12305),et=0)}else if(et>3){for(Q(Ye),--et;et>6;et-=6)Q(8304);et>2&&(Q(et-3<<5|8208),et=0)}for(;et--;)Q(Ye);et=1,Ye=ae[p]}return[fe.subarray(0,Te),oe]},W=function(ae,oe){for(var fe=0,Te=0;Te<oe.length;++Te)fe+=ae[Te]*oe[Te];return fe},U=function(ae,oe,fe){var Te=fe.length,Ye=c(oe+2);ae[Ye]=Te&255,ae[Ye+1]=Te>>>8,ae[Ye+2]=ae[Ye]^255,ae[Ye+3]=ae[Ye+1]^255;for(var et=0;et<Te;++et)ae[Ye+et+4]=fe[et];return(Ye+4+Te)*8},Y=function(ae,oe,fe,Te,Ye,et,Q,p,w,H,Z){h(oe,Z++,fe),++Ye[256];for(var K=N(Ye,15),ye=K[0],He=K[1],it=N(et,15),ot=it[0],Ve=it[1],_t=M(ye),vt=_t[0],Tt=_t[1],Pt=M(ot),ur=Pt[0],Gt=Pt[1],ar=new V(19),kt=0;kt<vt.length;++kt)ar[vt[kt]&31]++;for(var kt=0;kt<ur.length;++kt)ar[ur[kt]&31]++;for(var Tr=N(ar,7),mr=Tr[0],$t=Tr[1],De=19;De>4&&!mr[P[De-1]];--De);var Qt=H+5<<3,Vt=W(Ye,t)+W(et,E)+Q,Dt=W(Ye,ye)+W(et,ot)+Q+14+3*De+W(ar,mr)+(2*ar[16]+3*ar[17]+7*ar[18]);if(Qt<=Vt&&Qt<=Dt)return U(oe,Z,ae.subarray(w,w+H));var jt,Kt,Ar,zt;if(h(oe,Z,1+(Dt<Vt)),Z+=2,Dt<Vt){jt=r(ye,He,0),Kt=ye,Ar=r(ot,Ve,0),zt=ot;var sr=r(mr,$t,0);h(oe,Z,Tt-257),h(oe,Z+5,Gt-1),h(oe,Z+10,De-4),Z+=14;for(var kt=0;kt<De;++kt)h(oe,Z+3*kt,mr[P[kt]]);Z+=3*De;for(var rr=[vt,ur],Ut=0;Ut<2;++Ut)for(var Wt=rr[Ut],kt=0;kt<Wt.length;++kt){var Ft=Wt[kt]&31;h(oe,Z,sr[Ft]),Z+=mr[Ft],Ft>15&&(h(oe,Z,Wt[kt]>>>5&127),Z+=Wt[kt]>>>12)}}else jt=_,Kt=t,Ar=B,zt=E;for(var kt=0;kt<p;++kt)if(Te[kt]>255){var Ft=Te[kt]>>>18&31;L(oe,Z,jt[Ft+257]),Z+=Kt[Ft+257],Ft>7&&(h(oe,Z,Te[kt]>>>23&31),Z+=O[Ft]);var tr=Te[kt]&31;L(oe,Z,Ar[tr]),Z+=zt[tr],tr>3&&(L(oe,Z,Te[kt]>>>5&8191),Z+=X[tr])}else L(oe,Z,jt[Te[kt]]),Z+=Kt[Te[kt]];return L(oe,Z,jt[256]),Z+Kt[256]},ne=new F([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),me=new D(0),ge=function(ae,oe,fe,Te,Ye,et){var Q=ae.length,p=new D(Te+Q+5*(1+Math.floor(Q/7e3))+Ye),w=p.subarray(Te,p.length-Ye),H=0;if(!oe||Q<8)for(var Z=0;Z<=Q;Z+=65535){var K=Z+65535;K<Q?H=U(w,H,ae.subarray(Z,K)):(w[Z]=et,H=U(w,H,ae.subarray(Z,Q)))}else{for(var ye=ne[oe-1],He=ye>>>13,it=ye&8191,ot=(1<<fe)-1,Ve=new V(32768),_t=new V(ot+1),vt=Math.ceil(fe/3),Tt=2*vt,Pt=function(fr){return(ae[fr]^ae[fr+1]<<vt^ae[fr+2]<<Tt)&ot},ur=new F(25e3),Gt=new V(288),ar=new V(32),kt=0,Tr=0,Z=0,mr=0,$t=0,De=0;Z<Q;++Z){var Qt=Pt(Z),Vt=Z&32767,Dt=_t[Qt];if(Ve[Vt]=Dt,_t[Qt]=Vt,$t<=Z){var jt=Q-Z;if((kt>7e3||mr>24576)&&jt>423){H=Y(ae,w,0,ur,Gt,ar,Tr,mr,De,Z-De,H),mr=kt=Tr=0,De=Z;for(var Kt=0;Kt<286;++Kt)Gt[Kt]=0;for(var Kt=0;Kt<30;++Kt)ar[Kt]=0}var Ar=2,zt=0,sr=it,rr=Vt-Dt&32767;if(jt>2&&Qt==Pt(Z-rr))for(var Ut=Math.min(He,jt)-1,Wt=Math.min(32767,Z),Ft=Math.min(258,jt);rr<=Wt&&--sr&&Vt!=Dt;){if(ae[Z+Ar]==ae[Z+Ar-rr]){for(var tr=0;tr<Ft&&ae[Z+tr]==ae[Z+tr-rr];++tr);if(tr>Ar){if(Ar=tr,zt=rr,tr>Ut)break;for(var Zt=Math.min(rr,tr-2),xr=0,Kt=0;Kt<Zt;++Kt){var qt=Z-rr+Kt+32768&32767,Fr=Ve[qt],gr=qt-Fr+32768&32767;gr>xr&&(xr=gr,Dt=qt)}}}Vt=Dt,Dt=Ve[Vt],rr+=Vt-Dt+32768&32767}if(zt){ur[mr++]=268435456|v[Ar]<<18|a[zt];var Kr=v[Ar]&31,Pr=a[zt]&31;Tr+=O[Kr]+X[Pr],++Gt[257+Kr],++ar[Pr],$t=Z+Ar,++kt}else ur[mr++]=ae[Z],++Gt[ae[Z]]}}H=Y(ae,w,et,ur,Gt,ar,Tr,mr,De,Z-De,H),et||(H=U(w,H,me))}return b(p,0,Te+c(H)+Ye)},Oe=function(){for(var ae=new F(256),oe=0;oe<256;++oe){for(var fe=oe,Te=9;--Te;)fe=(fe&1&&3988292384)^fe>>>1;ae[oe]=fe}return ae}(),Se=function(){var ae=4294967295;return{p:function(oe){for(var fe=ae,Te=0;Te<oe.length;++Te)fe=Oe[fe&255^oe[Te]]^fe>>>8;ae=fe},d:function(){return ae^4294967295}}},Be=function(){var ae=1,oe=0;return{p:function(fe){for(var Te=ae,Ye=oe,et=fe.length,Q=0;Q!=et;){for(var p=Math.min(Q+5552,et);Q<p;++Q)Te+=fe[Q],Ye+=Te;Te%=65521,Ye%=65521}ae=Te,oe=Ye},d:function(){return(ae>>>8<<16|(oe&255)<<8|oe>>>8)+((ae&255)<<23)*2}}},Ne=function(ae,oe,fe,Te,Ye){return ge(ae,oe.level==null?6:oe.level,oe.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(ae.length)))*1.5):12+oe.mem,fe,Te,!Ye)},ke=function(ae,oe){var fe={};for(var Te in ae)fe[Te]=ae[Te];for(var Te in oe)fe[Te]=oe[Te];return fe},Ce=function(ae,oe,fe){for(var Te=ae(),Ye=ae.toString(),et=Ye.slice(Ye.indexOf("[")+1,Ye.lastIndexOf("]")).replace(/ /g,"").split(","),Q=0;Q<Te.length;++Q){var p=Te[Q],w=et[Q];if(typeof p=="function"){oe+=";"+w+"=";var H=p.toString();if(p.prototype)if(H.indexOf("[native code]")!=-1){var Z=H.indexOf(" ",8)+1;oe+=H.slice(Z,H.indexOf("(",Z))}else{oe+=H;for(var K in p.prototype)oe+=";"+w+".prototype."+K+"="+p.prototype[K].toString()}else oe+=H}else fe[w]=p}return[oe,fe]},ve=[],Xe=function(ae){var oe=[];for(var fe in ae)(ae[fe]instanceof D||ae[fe]instanceof V||ae[fe]instanceof F)&&oe.push((ae[fe]=new ae[fe].constructor(ae[fe])).buffer);return oe},lt=function(ae,oe,fe,Te){var Ye;if(!ve[fe]){for(var et="",Q={},p=ae.length-1,w=0;w<p;++w)Ye=Ce(ae[w],et,Q),et=Ye[0],Q=Ye[1];ve[fe]=Ce(ae[p],et,Q)}var H=ke({},ve[fe][1]);return G(ve[fe][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+oe.toString()+"}",fe,H,Xe(H),Te)},at=function(){return[D,V,F,O,X,P,m,s,y,C,A,r,d,n,l,c,b,g,pe,$,q]},je=function(){return[D,V,F,O,X,P,v,a,_,t,B,E,A,ne,me,r,h,L,N,T,M,W,U,Y,c,b,ge,Ne,ce,$]},rt=function(){return[nt,Ue,$e,Se,Oe]},re=function(){return[dt,xe]},J=function(){return[Ke,$e,Be]},k=function(){return[We]},$=function(ae){return postMessage(ae,[ae.buffer])},q=function(ae){return ae&&ae.size&&new D(ae.size)},he=function(ae,oe,fe,Te,Ye,et){var Q=lt(fe,Te,Ye,function(p,w){Q.terminate(),et(p,w)});return oe.consume||(ae=new D(ae)),Q.postMessage([ae,oe],[ae.buffer]),function(){Q.terminate()}},de=function(ae){return ae.ondata=function(oe,fe){return postMessage([oe,fe],[oe.buffer])},function(oe){return ae.push(oe.data[0],oe.data[1])}},Qe=function(ae,oe,fe,Te,Ye){var et,Q=lt(ae,Te,Ye,function(p,w){p?(Q.terminate(),oe.ondata.call(oe,p)):(w[1]&&Q.terminate(),oe.ondata.call(oe,p,w[0],w[1]))});Q.postMessage(fe),oe.push=function(p,w){if(et)throw"stream finished";if(!oe.ondata)throw"no stream handler";Q.postMessage([p,et=w],[p.buffer])},oe.terminate=function(){Q.terminate()}},ze=function(ae,oe){return ae[oe]|ae[oe+1]<<8},Ge=function(ae,oe){return(ae[oe]|ae[oe+1]<<8|ae[oe+2]<<16)+(ae[oe+3]<<23)*2},$e=function(ae,oe,fe){for(;fe;++oe)ae[oe]=fe,fe>>>=8},nt=function(ae,oe){var fe=oe.filename;if(ae[0]=31,ae[1]=139,ae[2]=8,ae[8]=oe.level<2?4:oe.level==9?2:0,ae[9]=3,oe.mtime!=0&&$e(ae,4,Math.floor(new Date(oe.mtime||Date.now())/1e3)),fe){ae[3]=8;for(var Te=0;Te<=fe.length;++Te)ae[Te+10]=fe.charCodeAt(Te)}},dt=function(ae){if(ae[0]!=31||ae[1]!=139||ae[2]!=8)throw"invalid gzip data";var oe=ae[3],fe=10;oe&4&&(fe+=ae[10]|(ae[11]<<8)+2);for(var Te=(oe>>3&1)+(oe>>4&1);Te>0;Te-=!ae[fe++]);return fe+(oe&2)},xe=function(ae){var oe=ae.length;return(ae[oe-4]|ae[oe-3]<<8|ae[oe-2]<<16)+2*(ae[oe-1]<<23)},Ue=function(ae){return 10+(ae.filename&&ae.filename.length+1||0)},Ke=function(ae,oe){var fe=oe.level,Te=fe==0?0:fe<6?1:fe==9?3:2;ae[0]=120,ae[1]=Te<<6|(Te?32-2*Te:1)},We=function(ae){if((ae[0]&15)!=8||ae[0]>>>4>7||(ae[0]<<8|ae[1])%31)throw"invalid zlib data";if(ae[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Le(ae,oe){return!oe&&typeof ae=="function"&&(oe=ae,ae={}),this.ondata=oe,ae}var Fe=function(){function ae(oe,fe){!fe&&typeof oe=="function"&&(fe=oe,oe={}),this.ondata=fe,this.o=oe||{}}return ae.prototype.p=function(oe,fe){this.ondata(Ne(oe,this.o,0,0,!fe),fe)},ae.prototype.push=function(oe,fe){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=fe,this.p(oe,fe||!1)},ae}(),we=function(){function ae(oe,fe){Qe([je,function(){return[de,Fe]}],this,Le.call(this,oe,fe),function(Te){var Ye=new Fe(Te.data);onmessage=de(Ye)},6)}return ae}();function ue(ae,oe,fe){if(fe||(fe=oe,oe={}),typeof fe!="function")throw"no callback";return he(ae,oe,[je],function(Te){return $(ce(Te.data[0],Te.data[1]))},0,fe)}function ce(ae,oe){return oe===void 0&&(oe={}),Ne(ae,oe,0,0)}var te=function(){function ae(oe){this.s={},this.p=new D(0),this.ondata=oe}return ae.prototype.e=function(oe){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var fe=this.p.length,Te=new D(fe+oe.length);Te.set(this.p),Te.set(oe,fe),this.p=Te},ae.prototype.c=function(oe){this.d=this.s.i=oe||!1;var fe=this.s.b,Te=g(this.p,this.o,this.s);this.ondata(b(Te,fe,this.s.b),this.d),this.o=b(Te,this.s.b-32768),this.s.b=this.o.length,this.p=b(this.p,this.s.p/8>>0),this.s.p&=7},ae.prototype.push=function(oe,fe){this.e(oe),this.c(fe)},ae}(),ie=function(){function ae(oe){this.ondata=oe,Qe([at,function(){return[de,te]}],this,0,function(){var fe=new te;onmessage=de(fe)},7)}return ae}();function le(ae,oe,fe){if(fe||(fe=oe,oe={}),typeof fe!="function")throw"no callback";return he(ae,oe,[at],function(Te){return $(pe(Te.data[0],q(Te.data[1])))},1,fe)}function pe(ae,oe){return g(ae,oe)}var Ie=function(){function ae(oe,fe){this.c=Se(),this.l=0,this.v=1,Fe.call(this,oe,fe)}return ae.prototype.push=function(oe,fe){Fe.prototype.push.call(this,oe,fe)},ae.prototype.p=function(oe,fe){this.c.p(oe),this.l+=oe.length;var Te=Ne(oe,this.o,this.v&&Ue(this.o),fe&&8,!fe);this.v&&(nt(Te,this.o),this.v=0),fe&&($e(Te,Te.length-8,this.c.d()),$e(Te,Te.length-4,this.l)),this.ondata(Te,fe)},ae}(),Pe=function(){function ae(oe,fe){Qe([je,rt,function(){return[de,Fe,Ie]}],this,Le.call(this,oe,fe),function(Te){var Ye=new Ie(Te.data);onmessage=de(Ye)},8)}return ae}();function qe(ae,oe,fe){if(fe||(fe=oe,oe={}),typeof fe!="function")throw"no callback";return he(ae,oe,[je,rt,function(){return[ft]}],function(Te){return $(ft(Te.data[0],Te.data[1]))},2,fe)}function ft(ae,oe){oe===void 0&&(oe={});var fe=Se(),Te=ae.length;fe.p(ae);var Ye=Ne(ae,oe,Ue(oe),8),et=Ye.length;return nt(Ye,oe),$e(Ye,et-8,fe.d()),$e(Ye,et-4,Te),Ye}var ut=function(){function ae(oe){this.v=1,te.call(this,oe)}return ae.prototype.push=function(oe,fe){if(te.prototype.e.call(this,oe),this.v){var Te=dt(this.p);if(Te>=this.p.length&&!fe)return;this.p=this.p.subarray(Te),this.v=0}if(fe){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}te.prototype.c.call(this,fe)},ae}(),st=function(){function ae(oe){this.ondata=oe,Qe([at,re,function(){return[de,te,ut]}],this,0,function(){var fe=new ut;onmessage=de(fe)},9)}return ae}();function Lt(ae,oe,fe){if(fe||(fe=oe,oe={}),typeof fe!="function")throw"no callback";return he(ae,oe,[at,re,function(){return[mt]}],function(Te){return $(mt(Te.data[0]))},3,fe)}function mt(ae,oe){return g(ae.subarray(dt(ae),-8),oe||new D(xe(ae)))}var tt=function(){function ae(oe,fe){this.c=Be(),this.v=1,Fe.call(this,oe,fe)}return ae.prototype.push=function(oe,fe){Fe.prototype.push.call(this,oe,fe)},ae.prototype.p=function(oe,fe){this.c.p(oe);var Te=Ne(oe,this.o,this.v&&2,fe&&4,!fe);this.v&&(Ke(Te,this.o),this.v=0),fe&&$e(Te,Te.length-4,this.c.d()),this.ondata(Te,fe)},ae}(),er=function(){function ae(oe,fe){Qe([je,J,function(){return[de,Fe,tt]}],this,Le.call(this,oe,fe),function(Te){var Ye=new tt(Te.data);onmessage=de(Ye)},10)}return ae}();function Jt(ae,oe,fe){if(fe||(fe=oe,oe={}),typeof fe!="function")throw"no callback";return he(ae,oe,[je,J,function(){return[Ot]}],function(Te){return $(Ot(Te.data[0],Te.data[1]))},4,fe)}function Ot(ae,oe){oe===void 0&&(oe={});var fe=Be();fe.p(ae);var Te=Ne(ae,oe,2,4);return Ke(Te,oe),$e(Te,Te.length-4,fe.d()),Te}var yt=function(){function ae(oe){this.v=1,te.call(this,oe)}return ae.prototype.push=function(oe,fe){if(te.prototype.e.call(this,oe),this.v){if(this.p.length<2&&!fe)return;this.p=this.p.subarray(2),this.v=0}if(fe){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}te.prototype.c.call(this,fe)},ae}(),Et=function(){function ae(oe){this.ondata=oe,Qe([at,k,function(){return[de,te,yt]}],this,0,function(){var fe=new yt;onmessage=de(fe)},11)}return ae}();function wt(ae,oe,fe){if(fe||(fe=oe,oe={}),typeof fe!="function")throw"no callback";return he(ae,oe,[at,k,function(){return[Mt]}],function(Te){return $(Mt(Te.data[0],q(Te.data[1])))},5,fe)}function Mt(ae,oe){return g((We(ae),ae.subarray(2,-4)),oe)}var ct=function(){function ae(oe){this.G=ut,this.I=te,this.Z=yt,this.ondata=oe}return ae.prototype.push=function(oe,fe){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(oe,fe);else{if(this.p&&this.p.length){var Te=new D(this.p.length+oe.length);Te.set(this.p),Te.set(oe,this.p.length)}else this.p=oe;if(this.p.length>2){var Ye=this,et=function(){Ye.ondata.apply(Ye,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(et):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(et):new this.Z(et),this.s.push(this.p,fe),this.p=null}}},ae}(),lr=function(){function ae(oe){this.G=st,this.I=ie,this.Z=Et,this.ondata=oe}return ae.prototype.push=function(oe,fe){ct.prototype.push.call(this,oe,fe)},ae}();function At(ae,oe,fe){if(fe||(fe=oe,oe={}),typeof fe!="function")throw"no callback";return ae[0]==31&&ae[1]==139&&ae[2]==8?Lt(ae,oe,fe):(ae[0]&15)!=8||ae[0]>>4>7||(ae[0]<<8|ae[1])%31?le(ae,oe,fe):wt(ae,oe,fe)}function gt(ae,oe){return ae[0]==31&&ae[1]==139&&ae[2]==8?mt(ae,oe):(ae[0]&15)!=8||ae[0]>>4>7||(ae[0]<<8|ae[1])%31?pe(ae,oe):Mt(ae,oe)}var Nt=function(ae,oe,fe,Te){for(var Ye in ae){var et=ae[Ye],Q=oe+Ye;et instanceof D?fe[Q]=[et,Te]:Array.isArray(et)?fe[Q]=[et[0],ke(Te,et[1])]:Nt(et,Q+"/",fe,Te)}};function ir(ae,oe){var fe=ae.length;if(!oe&&typeof TextEncoder!="undefined")return new TextEncoder().encode(ae);for(var Te=new D(ae.length+(ae.length>>>1)),Ye=0,et=function(H){Te[Ye++]=H},Q=0;Q<fe;++Q){if(Ye+5>Te.length){var p=new D(Ye+8+(fe-Q<<1));p.set(Te),Te=p}var w=ae.charCodeAt(Q);w<128||oe?et(w):w<2048?(et(192|w>>>6),et(128|w&63)):w>55295&&w<57344?(w=65536+(w&1023<<10)|ae.charCodeAt(++Q)&1023,et(240|w>>>18),et(128|w>>>12&63),et(128|w>>>6&63),et(128|w&63)):(et(224|w>>>12),et(128|w>>>6&63),et(128|w&63))}return b(Te,0,Ye)}function yr(ae,oe){var fe="";if(!oe&&typeof TextDecoder!="undefined")return new TextDecoder().decode(ae);for(var Te=0;Te<ae.length;){var Ye=ae[Te++];Ye<128||oe?fe+=String.fromCharCode(Ye):Ye<224?fe+=String.fromCharCode((Ye&31)<<6|ae[Te++]&63):Ye<240?fe+=String.fromCharCode((Ye&15)<<12|(ae[Te++]&63)<<6|ae[Te++]&63):(Ye=((Ye&15)<<18|(ae[Te++]&63)<<12|(ae[Te++]&63)<<6|ae[Te++]&63)-65536,fe+=String.fromCharCode(55296|Ye>>10,56320|Ye&1023))}return fe}var br=function(ae,oe){return oe+30+ze(ae,oe+26)+ze(ae,oe+28)},Rr=function(ae,oe,fe){var Te=ze(ae,oe+28),Ye=yr(ae.subarray(oe+46,oe+46+Te),!(ze(ae,oe+8)&2048)),et=oe+46+Te,Q=fe?Dr(ae,et):[Ge(ae,oe+20),Ge(ae,oe+24),Ge(ae,oe+42)],p=Q[0],w=Q[1],H=Q[2];return[ze(ae,oe+10),p,w,Ye,et+ze(ae,oe+30)+ze(ae,oe+32),H]},Dr=function(ae,oe){for(;ze(ae,oe)!=1;oe+=4+ze(ae,oe+2));return[Ge(ae,oe+12),Ge(ae,oe+4),Ge(ae,oe+20)]},Ht=function(ae,oe,fe,Te,Ye,et,Q,p,w,H){var Z=et.length,K=Te.length;$e(ae,oe,w!=null?33639248:67324752),oe+=4,w!=null&&(ae[oe]=20,oe+=2),ae[oe]=20,oe+=2,ae[oe++]=H==8&&(p.level==1?6:p.level<6?4:p.level==9?2:0),ae[oe++]=Q&&8,ae[oe]=H,oe+=2;var ye=new Date(p.mtime||Date.now()),He=ye.getFullYear()-1980;if(He<0||He>119)throw"date not in range 1980-2099";$e(ae,oe,(He<<24)*2|ye.getMonth()+1<<21|ye.getDate()<<16|ye.getHours()<<11|ye.getMinutes()<<5|ye.getSeconds()>>>1),oe+=4,$e(ae,oe,fe),$e(ae,oe+4,K),$e(ae,oe+8,Ye),$e(ae,oe+12,Z),oe+=16,w!=null&&($e(ae,oe+=10,w),oe+=4),ae.set(et,oe),oe+=Z,w==null&&ae.set(Te,oe)},pr=function(ae,oe,fe,Te,Ye){$e(ae,oe,101010256),$e(ae,oe+8,fe),$e(ae,oe+10,fe),$e(ae,oe+12,Te),$e(ae,oe+16,Ye)};function Lr(ae,oe,fe){if(fe||(fe=oe,oe={}),typeof fe!="function")throw"no callback";var Te={};Nt(ae,"",Te,oe);var Ye=Object.keys(Te),et=Ye.length,Q=0,p=0,w=et,H=new Array(et),Z=[],K=function(){for(var ot=0;ot<Z.length;++ot)Z[ot]()},ye=function(){var ot=new D(p+22),Ve=Q,_t=p-Q;p=0;for(var vt=0;vt<w;++vt){var Tt=H[vt];try{Ht(ot,p,Tt.c,Tt.d,Tt.m,Tt.n,Tt.u,Tt.p,null,Tt.t),Ht(ot,Q,Tt.c,Tt.d,Tt.m,Tt.n,Tt.u,Tt.p,p,Tt.t),Q+=46+Tt.n.length,p+=30+Tt.n.length+Tt.d.length}catch(Pt){return fe(Pt,null)}}pr(ot,Q,H.length,_t,Ve),fe(null,ot)};et||ye();for(var He=function(ot){var Ve=Ye[ot],_t=Te[Ve],vt=_t[0],Tt=_t[1],Pt=Se(),ur=vt.length;Pt.p(vt);var Gt=ir(Ve),ar=Gt.length,kt=Tt.level==0?0:8,Tr=function(mr,$t){if(mr)K(),fe(mr,null);else{var De=$t.length;H[ot]={t:kt,d:$t,m:ur,c:Pt.d(),u:Ve.length!=De,n:Gt,p:Tt},Q+=30+ar+De,p+=76+2*ar+De,--et||ye()}};if(Gt.length>65535&&Tr("filename too long",null),!kt)Tr(null,vt);else if(ur<16e4)try{Tr(null,ce(vt,Tt))}catch(mr){Tr(mr,null)}else Z.push(ue(vt,Tt,Tr))},it=0;it<w;++it)He(it);return K}function Cr(ae,oe){oe===void 0&&(oe={});var fe={},Te=[];Nt(ae,"",fe,oe);var Ye=0,et=0;for(var Q in fe){var p=fe[Q],w=p[0],H=p[1],Z=H.level==0?0:8,K=ir(Q),ye=K.length;if(K.length>65535)throw"filename too long";var He=Z?ce(w,H):w,it=He.length,ot=Se();ot.p(w),Te.push({t:Z,d:He,m:w.length,c:ot.d(),u:Q.length!=ye,n:K,o:Ye,p:H}),Ye+=30+ye+it,et+=76+2*ye+it}for(var Ve=new D(et+22),_t=Ye,vt=et-Ye,Tt=0;Tt<Te.length;++Tt){var Pt=Te[Tt];Ht(Ve,Pt.o,Pt.c,Pt.d,Pt.m,Pt.n,Pt.u,Pt.p,null,Pt.t),Ht(Ve,Ye,Pt.c,Pt.d,Pt.m,Pt.n,Pt.u,Pt.p,Pt.o,Pt.t),Ye+=46+Pt.n.length}return pr(Ve,Ye,Te.length,vt,_t),Ve}function Qr(ae,oe){if(typeof oe!="function")throw"no callback";for(var fe=[],Te=function(){for(var ye=0;ye<fe.length;++ye)fe[ye]()},Ye={},et=ae.length-22;Ge(ae,et)!=101010256;--et)if(!et||ae.length-et>65558){oe("invalid zip file",null);return}var Q=ze(ae,et+8);Q||oe(null,{});var p=Q,w=Ge(ae,et+16),H=w==4294967295;if(H){if(et=Ge(ae,et-12),Ge(ae,et)!=101075792)throw"invalid zip file";p=Q=Ge(ae,et+32),w=Ge(ae,et+48)}for(var Z=function(ye){var He=Rr(ae,w,H),it=He[0],ot=He[1],Ve=He[2],_t=He[3],vt=He[4],Tt=He[5],Pt=br(ae,Tt);w=vt;var ur=function(ar,kt){ar?(Te(),oe(ar,null)):(Ye[_t]=kt,--Q||oe(null,Ye))};if(!it)ur(null,b(ae,Pt,Pt+ot));else if(it==8){var Gt=ae.subarray(Pt,Pt+ot);if(ot<32e4)try{ur(null,pe(Gt,new D(Ve)))}catch(ar){ur(ar,null)}else fe.push(le(Gt,{size:Ve},ur))}else ur("unknown compression type "+it,null)},K=0;K<p;++K)Z(K);return Te}function Ur(ae){for(var oe={},fe=ae.length-22;Ge(ae,fe)!=101010256;--fe)if(!fe||ae.length-fe>65558)throw"invalid zip file";var Te=ze(ae,fe+8);if(!Te)return{};var Ye=Ge(ae,fe+16),et=Ye==4294967295;if(et){if(fe=Ge(ae,fe-12),Ge(ae,fe)!=101075792)throw"invalid zip file";Te=Ge(ae,fe+32),Ye=Ge(ae,fe+48)}for(var Q=0;Q<Te;++Q){var p=Rr(ae,Ye,et),w=p[0],H=p[1],Z=p[2],K=p[3],ye=p[4],He=p[5],it=br(ae,He);if(Ye=ye,!w)oe[K]=b(ae,it,it+H);else if(w==8)oe[K]=pe(ae.subarray(it,it+H),new D(Z));else throw"unknown compression type "+w}return oe}},cw1j:function(ht,_e,j){"use strict";var se=j("k1fw"),G=j("tJVT"),D=j("5NDa"),V=j("5rEg"),F=j("q1tI"),O=j.n(F),X=j("NKYn"),P=j("tJYV"),e=j.n(P),R=V.a.TextArea,m=function(u){var s=u.item,a=u.answerData,A=u.changeScoreData,o=u.textValue,i=u.textOnChange,r=i===void 0?function(){}:i,t=u.seeAnswerVisible,E=t===void 0?!0:t,_=Object(F.useState)([]),y=Object(G.a)(_,2),B=y[0],C=y[1],d=Object(F.useState)(!1),n=Object(G.a)(d,2),l=n[0],c=n[1];return Object(F.useEffect)(function(){A!=null&&A[s.q_position]?!l&&c(!0):l&&c(!1)},[A==null?void 0:A[s==null?void 0:s.q_position]]),Object(F.useEffect)(function(){for(var b=[],g=function(N){var T,M=(s==null||((T=s.user_answer)===null||T===void 0)?void 0:T.find(function(W){return W.choice_id===N+1}))||{choice_id:N+1,answer_text:""};b.push(Object(se.a)({},M))},h=0;h<(s==null?void 0:s.multi_count);h++)g(h);C(b)},[s==null?void 0:s.user_answer]),O.a.createElement("div",{className:e.a.fillBg},O.a.createElement("aside",{className:"font14 c-light-primary mb5"},"\u5B66\u751F\u7B54\u9898"),B==null?void 0:B.map(function(b,g){return O.a.createElement("div",null,O.a.createElement("span",null,"\u7B54\u6848(\u586B\u7A7A",g+1,"):"),O.a.createElement("div",null,b==null?void 0:b.answer_text))}),E&&O.a.createElement(X.a,{data:s}))};_e.a=m},dmUQ:function(ht,_e,j){"use strict";var se=j("Ff2n"),G=j("rePB"),D=j("1OyB"),V=j("vuIU"),F=j("Ji7U"),O=j("md7G"),X=j("foSv"),P=j("q1tI"),e=j.n(P),R=j("TSYQ"),m=j.n(R),v=j("4IlW");function u(l,c){var b=Object.keys(l);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(l);c&&(g=g.filter(function(h){return Object.getOwnPropertyDescriptor(l,h).enumerable})),b.push.apply(b,g)}return b}function s(l){for(var c=1;c<arguments.length;c++){var b=arguments[c]!=null?arguments[c]:{};c%2?u(Object(b),!0).forEach(function(g){Object(G.a)(l,g,b[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(b)):u(Object(b)).forEach(function(g){Object.defineProperty(l,g,Object.getOwnPropertyDescriptor(b,g))})}return l}function a(l){var c=A();return function(){var g=Object(X.a)(l),h;if(c){var L=Object(X.a)(this).constructor;h=Reflect.construct(g,arguments,L)}else h=g.apply(this,arguments);return Object(O.a)(this,h)}}function A(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(l){return!1}}function o(){}function i(l){l.preventDefault()}var r=function(c){return c.replace(/[^\w.-]+/g,"")},t=200,E=600,_=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,y=function(c){return c!=null},B=function(c,b){return b===c||typeof b=="number"&&typeof c=="number"&&isNaN(b)&&isNaN(c)},C=function(l){Object(F.a)(b,l);var c=a(b);function b(g){var h;Object(D.a)(this,b),h=c.call(this,g),h.onKeyDown=function(T){var M=h.props,W=M.onKeyDown,U=M.onPressEnter;if(T.keyCode===v.a.UP){var Y=h.getRatio(T);h.up(T,Y,null),h.stop()}else if(T.keyCode===v.a.DOWN){var ne=h.getRatio(T);h.down(T,ne,null),h.stop()}else T.keyCode===v.a.ENTER&&U&&U(T);if(h.recordCursorPosition(),h.lastKeyCode=T.keyCode,W){for(var me=arguments.length,ge=new Array(me>1?me-1:0),Oe=1;Oe<me;Oe++)ge[Oe-1]=arguments[Oe];W.apply(void 0,[T].concat(ge))}},h.onKeyUp=function(T){var M=h.props.onKeyUp;if(h.stop(),h.recordCursorPosition(),M){for(var W=arguments.length,U=new Array(W>1?W-1:0),Y=1;Y<W;Y++)U[Y-1]=arguments[Y];M.apply(void 0,[T].concat(U))}},h.onChange=function(T){var M=h.props.onChange;h.state.focused&&(h.inputting=!0),h.rawInput=h.props.parser(h.getValueFromEvent(T)),h.setState({inputValue:h.rawInput}),M(h.toNumber(h.rawInput))},h.onMouseUp=function(){var T=h.props.onMouseUp;h.recordCursorPosition(),T&&T.apply(void 0,arguments)},h.onFocus=function(){var T;h.setState({focused:!0}),(T=h.props).onFocus.apply(T,arguments)},h.onBlur=function(){var T=h.props.onBlur;h.inputting=!1,h.setState({focused:!1});var M=h.getCurrentValidValue(h.state.inputValue),W=h.setValue(M,o);if(T){var U=h.input.value,Y=h.getInputDisplayValue({focus:!1,value:W});h.input.value=Y&&Number(Y),T.apply(void 0,arguments),h.input.value=U}},h.getRatio=function(T){var M=1;return T.metaKey||T.ctrlKey?M=.1:T.shiftKey&&(M=10),M},h.getFullNum=function(T){return isNaN(T)?T:/e/i.test(String(T))?Number(T).toFixed(18).replace(/\.?0+$/,""):T},h.getPrecision=function(T){if(y(h.props.precision))return h.props.precision;var M=String(T);if(M.indexOf("e-")>=0)return parseInt(M.slice(M.indexOf("e-")+2),10);var W=0;return M.indexOf(".")>=0&&(W=M.length-M.indexOf(".")-1),W},h.getInputDisplayValue=function(T){var M=T||h.state,W=M.focused,U=M.inputValue,Y=M.value,ne;W?ne=U:ne=h.toPrecisionAsStep(Y),ne==null&&(ne="");var me=h.formatWrapper(ne);return y(h.props.decimalSeparator)&&(me=me.toString().replace(".",h.props.decimalSeparator)),me},h.recordCursorPosition=function(){try{h.cursorStart=h.input.selectionStart,h.cursorEnd=h.input.selectionEnd,h.currentValue=h.input.value,h.cursorBefore=h.input.value.substring(0,h.cursorStart),h.cursorAfter=h.input.value.substring(h.cursorEnd)}catch(T){}},h.restoreByAfter=function(T){if(T===void 0)return!1;var M=h.input.value,W=M.lastIndexOf(T);if(W===-1)return!1;var U=h.cursorBefore.length;return h.lastKeyCode===v.a.DELETE&&h.cursorBefore.charAt(U-1)===T[0]?(h.fixCaret(U,U),!0):W+T.length===M.length?(h.fixCaret(W,W),!0):!1},h.partRestoreByAfter=function(T){return T===void 0?!1:Array.prototype.some.call(T,function(M,W){var U=T.substring(W);return h.restoreByAfter(U)})},h.isNotCompleteNumber=function(T){return isNaN(T)||T===""||T===null||T&&T.toString().indexOf(".")===T.toString().length-1},h.stop=function(){h.autoStepTimer&&clearTimeout(h.autoStepTimer)},h.down=function(T,M,W){h.pressingUpOrDown=!0,h.step("down",T,M,W)},h.up=function(T,M,W){h.pressingUpOrDown=!0,h.step("up",T,M,W)},h.saveInput=function(T){h.input=T};var L=g.value;L===void 0&&(L=g.defaultValue),h.state={focused:g.autoFocus};var N=h.getValidValue(h.toNumber(L));return h.state=s(s({},h.state),{},{inputValue:h.toPrecisionAsStep(N),value:N}),h}return Object(V.a)(b,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(h){var L=this.props,N=L.value,T=L.onChange,M=L.max,W=L.min,U=this.state.focused;if(h){if(!B(h.value,N)||!B(h.max,M)||!B(h.min,W)){var Y=U?N:this.getValidValue(N),ne;this.pressingUpOrDown?ne=Y:this.inputting?ne=this.rawInput:ne=this.toPrecisionAsStep(Y),this.setState({value:Y,inputValue:ne})}var me="value"in this.props?N:this.state.value;"max"in this.props&&h.max!==M&&typeof me=="number"&&me>M&&T&&T(M),"min"in this.props&&h.min!==W&&typeof me=="number"&&me<W&&T&&T(W)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ge=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===v.a.BACKSPACE?ge=this.cursorStart-1:this.lastKeyCode===v.a.DELETE&&(ge=this.cursorStart):ge=this.input.value.length,this.fixCaret(ge,ge)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case v.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case v.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Oe){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(h){var L=h;return L===""?L="":this.isNotCompleteNumber(parseFloat(L))?L=this.state.value:L=this.getValidValue(L),this.toNumber(L)}},{key:"getValueFromEvent",value:function(h){var L=h.target.value.trim().replace(/。/g,".");return y(this.props.decimalSeparator)&&(L=L.replace(this.props.decimalSeparator,".")),L}},{key:"getValidValue",value:function(h){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,T=parseFloat(h);return isNaN(T)?h:(T<L&&(T=L),T>N&&(T=N),T)}},{key:"setValue",value:function(h,L){var N=this.props.precision,T=this.isNotCompleteNumber(parseFloat(h))?null:parseFloat(h),M=this.state.value,W=M===void 0?null:M,U=this.state.inputValue,Y=U===void 0?null:U,ne=typeof T=="number"?T.toFixed(N):"".concat(T),me=T!==W||ne!=="".concat(Y);return"value"in this.props?(Y=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Y},L)):this.setState({value:T,inputValue:this.toPrecisionAsStep(h)},L),me&&this.props.onChange(T),T}},{key:"getMaxPrecision",value:function(h){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.props,T=N.precision,M=N.step;if(y(T))return T;var W=this.getPrecision(L),U=this.getPrecision(M),Y=this.getPrecision(h);return h?Math.max(Y,W+U):W+U}},{key:"getPrecisionFactor",value:function(h){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,N=this.getMaxPrecision(h,L);return Math.pow(10,N)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(h){return this.props.formatter?this.props.formatter(h):h}},{key:"toPrecisionAsStep",value:function(h){if(this.isNotCompleteNumber(h)||h==="")return h;var L=Math.abs(this.getMaxPrecision(h));return isNaN(L)?h.toString():Number(h).toFixed(L)}},{key:"toNumber",value:function(h){var L=this.props.precision,N=this.state.focused,T=h&&h.length>16&&N;return this.isNotCompleteNumber(h)||T?h:y(L)?Math.round(h*Math.pow(10,L))/Math.pow(10,L):Number(h)}},{key:"upStep",value:function(h,L){var N=this.props.step,T=this.getPrecisionFactor(h,L),M=Math.abs(this.getMaxPrecision(h,L)),W=((T*h+T*N*L)/T).toFixed(M);return this.toNumber(W)}},{key:"downStep",value:function(h,L){var N=this.props.step,T=this.getPrecisionFactor(h,L),M=Math.abs(this.getMaxPrecision(h,L)),W=((T*h-T*N*L)/T).toFixed(M);return this.toNumber(W)}},{key:"step",value:function(h,L){var N=this,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,M=arguments.length>3?arguments[3]:void 0;this.stop(),L&&(L.persist(),L.preventDefault());var W=this.props;if(W.disabled)return;var U=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(U))return;var Y=this["".concat(h,"Step")](U,T),ne=Y>W.max||Y<W.min;if(Y>W.max?Y=W.max:Y<W.min&&(Y=W.min),this.setValue(Y,null),this.setState({focused:!0},function(){N.pressingUpOrDown=!1}),ne)return;this.autoStepTimer=setTimeout(function(){N[h](L,T,!0)},M?t:E)}},{key:"fixCaret",value:function(h,L){if(h===void 0||L===void 0||!this.input||!this.input.value)return;try{var N=this.input.selectionStart,T=this.input.selectionEnd;(h!==N||L!==T)&&this.input.setSelectionRange(h,L)}catch(M){}}},{key:"render",value:function(){var h,L=this.props,N=L.prefixCls,T=L.disabled,M=L.readOnly,W=L.useTouch,U=L.autoComplete,Y=L.upHandler,ne=L.downHandler,me=L.className,ge=L.max,Oe=L.min,Se=L.style,Be=L.title,Ne=L.onMouseEnter,ke=L.onMouseLeave,Ce=L.onMouseOver,ve=L.onMouseOut,Xe=L.required,lt=L.onClick,at=L.tabIndex,je=L.type,rt=L.placeholder,re=L.id,J=L.inputMode,k=L.pattern,$=L.step,q=L.maxLength,he=L.autoFocus,de=L.name,Qe=L.onPaste,ze=L.onInput,Ge=Object(se.a)(L,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),$e=this.state,nt=$e.value,dt=$e.focused,xe=m()(N,(h={},Object(G.a)(h,me,!!me),Object(G.a)(h,"".concat(N,"-disabled"),T),Object(G.a)(h,"".concat(N,"-focused"),dt),h)),Ue={};Object.keys(Ge).forEach(function(pe){(pe.substr(0,5)==="data-"||pe.substr(0,5)==="aria-"||pe==="role")&&(Ue[pe]=Ge[pe])});var Ke=!M&&!T,We=this.getInputDisplayValue(null),Le=(nt||nt===0)&&(isNaN(nt)||Number(nt)>=ge),Fe=(nt||nt===0)&&(isNaN(nt)||Number(nt)<=Oe),we=Le||T||M,ue=Fe||T||M,ce=m()("".concat(N,"-handler"),"".concat(N,"-handler-up"),Object(G.a)({},"".concat(N,"-handler-up-disabled"),we)),te=m()("".concat(N,"-handler"),"".concat(N,"-handler-down"),Object(G.a)({},"".concat(N,"-handler-down-disabled"),ue)),ie=W?{onTouchStart:we?o:this.up,onTouchEnd:this.stop}:{onMouseDown:we?o:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},le=W?{onTouchStart:ue?o:this.down,onTouchEnd:this.stop}:{onMouseDown:ue?o:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:xe,style:Se,title:Be,onMouseEnter:Ne,onMouseLeave:ke,onMouseOver:Ce,onMouseOut:ve,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(N,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},ie,{role:"button","aria-label":"Increase Value","aria-disabled":we,className:ce}),Y||e.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-up-inner"),onClick:i})),e.a.createElement("span",Object.assign({unselectable:"on"},le,{role:"button","aria-label":"Decrease Value","aria-disabled":ue,className:te}),ne||e.a.createElement("span",{unselectable:"on",className:"".concat(N,"-handler-down-inner"),onClick:i}))),e.a.createElement("div",{className:"".concat(N,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Oe,"aria-valuemax":ge,"aria-valuenow":nt,required:Xe,type:je,placeholder:rt,onPaste:Qe,onClick:lt,onMouseUp:this.onMouseUp,className:"".concat(N,"-input"),tabIndex:at,autoComplete:U,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ke?this.onKeyDown:o,onKeyUp:Ke?this.onKeyUp:o,autoFocus:he,maxLength:q,readOnly:M,disabled:T,max:ge,min:Oe,step:$,name:de,title:Be,id:re,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(We),pattern:k,inputMode:J,onInput:ze},Ue))))}}]),b}(e.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:o,onKeyDown:o,onPressEnter:o,onFocus:o,onBlur:o,parser:r,required:!1,autoComplete:"off"};var d=C,n=_e.a=d},fjLI:function(ht,_e,j){"use strict";j.d(_e,"f",function(){return u}),j.d(_e,"b",function(){return s}),j.d(_e,"a",function(){return a}),j.d(_e,"d",function(){return A}),j.d(_e,"e",function(){return o}),j.d(_e,"c",function(){return i});var se=j("8HAY"),G=j("Vhoy"),D=j("MI8n"),V=j("JYp7"),F=j("pmY6"),O=j("24hK"),X=j("nnTU"),P=j("T8No"),e=j("Cg/j"),R=j("t9D7"),m=function(r,t,E,_){var y=arguments.length,B=y<3?t:_===null?_=Object.getOwnPropertyDescriptor(t,E):_,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(r,t,E,_);else for(var d=r.length-1;d>=0;d--)(C=r[d])&&(B=(y<3?C(B):y>3?C(t,E,B):C(t,E))||B);return y>3&&B&&Object.defineProperty(t,E,B),B},v=function(r,t){return function(E,_){t(E,_,r)}};function u(r){return r.command!==void 0}class s{constructor(r){this.id=s._idPool++,this._debugName=r}}s._idPool=0,s.CommandPalette=new s("CommandPalette"),s.EditorContext=new s("EditorContext"),s.SimpleEditorContext=new s("SimpleEditorContext"),s.EditorContextCopy=new s("EditorContextCopy"),s.EditorContextPeek=new s("EditorContextPeek"),s.MenubarEditMenu=new s("MenubarEditMenu"),s.MenubarCopy=new s("MenubarCopy"),s.MenubarGoMenu=new s("MenubarGoMenu"),s.MenubarSelectionMenu=new s("MenubarSelectionMenu"),s.InlineCompletionsActions=new s("InlineCompletionsActions");const a=Object(e.c)("menuService"),A=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new D.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:r=>r===s.CommandPalette}}addCommand(r){return this.addCommands(V.a.single(r))}addCommands(r){for(const t of r)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(F.i)(()=>{let t=!1;for(const E of r)t=this._commands.delete(E.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((t,E)=>r.set(E,t)),r}appendMenuItem(r,t){return this.appendMenuItems(V.a.single({id:r,item:t}))}appendMenuItems(r){const t=new Set,E=new O.a;for(const{id:_,item:y}of r){let B=this._menuItems.get(_);B||(B=new O.a,this._menuItems.set(_,B)),E.push(B.push(y)),t.add(_)}return this._onDidChangeMenu.fire(t),Object(F.i)(()=>{if(E.size>0){for(let _ of E)_();this._onDidChangeMenu.fire(t),E.clear()}})}getMenuItems(r){let t;return this._menuItems.has(r)?t=[...this._menuItems.get(r)]:t=[],r===s.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(r){const t=new Set;for(const E of r)u(E)&&(t.add(E.command.id),E.alt&&t.add(E.alt.id));this._commands.forEach((E,_)=>{t.has(_)||r.push({command:E})})}};class o extends se.e{constructor(r,t,E,_){super(`submenuitem.${r.submenu.id}`,typeof r.title=="string"?r.title:r.title.value,[],"submenu");this.item=r,this._menuService=t,this._contextKeyService=E,this._options=_}get actions(){const r=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),E=t.getActions(this._options);t.dispose();for(const[,_]of E)_.length>0&&(r.push(..._),r.push(new se.d));return r.length&&r.pop(),r}}let i=class r{constructor(t,E,_,y,B){var C,d;if(this._commandService=B,this.id=t.id,this.label=(_==null?void 0:_.renderShortTitle)&&t.shortTitle?typeof t.shortTitle=="string"?t.shortTitle:t.shortTitle.value:typeof t.title=="string"?t.title:t.title.value,this.tooltip=(d=typeof t.tooltip=="string"?t.tooltip:(C=t.tooltip)===null||C===void 0?void 0:C.value)!==null&&d!==void 0?d:"",this.enabled=!t.precondition||y.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const n=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=y.contextMatchesRules(n.condition),this.checked&&n.tooltip&&(this.tooltip=typeof n.tooltip=="string"?n.tooltip:n.tooltip.value),n.title&&(this.label=typeof n.title=="string"?n.title:n.title.value)}this.item=t,this.alt=E?new r(E,void 0,_,y,B):void 0,this._options=_,R.d.isThemeIcon(t.icon)&&(this.class=G.a.asClassName(t.icon))}dispose(){}run(...t){var E,_;let y=[];return((E=this._options)===null||E===void 0?void 0:E.arg)&&(y=[...y,this._options.arg]),((_=this._options)===null||_===void 0?void 0:_.shouldForwardArgs)&&(y=[...y,...t]),this._commandService.executeCommand(this.id,...y)}};i=m([v(3,P.b),v(4,X.b)],i)},fyJ8:function(ht,_e,j){"use strict";var se=j("rePB"),G=j("VTBJ"),D=j("Ff2n"),V=j("U8pU"),F=j("q1tI"),O=j.n(F),X=j("TSYQ"),P=j.n(X),e=j("c+Xe"),R=j("sR1s");function m(A){return A&&Object(V.a)(A)==="object"&&!Array.isArray(A)&&!F.isValidElement(A)}function v(A){return typeof A=="string"?!0:Object(e.c)(A)}function u(A,o){var i,r=A.prefixCls,t=A.className,E=A.record,_=A.index,y=A.dataIndex,B=A.render,C=A.children,d=A.component,n=d===void 0?"td":d,l=A.colSpan,c=A.rowSpan,b=A.fixLeft,g=A.fixRight,h=A.firstFixLeft,L=A.lastFixLeft,N=A.firstFixRight,T=A.lastFixRight,M=A.appendNode,W=A.additionalProps,U=W===void 0?{}:W,Y=A.ellipsis,ne=A.align,me=A.rowType,ge=A.isSticky,Oe="".concat(r,"-cell"),Se,Be;if(C)Be=C;else{var Ne=Object(R.b)(E,y);if(Be=Ne,B){var ke=B(Ne,E,_);m(ke)?(Be=ke.children,Se=ke.props):Be=ke}}Object(V.a)(Be)==="object"&&!Array.isArray(Be)&&!F.isValidElement(Be)&&(Be=null),Y&&(L||N)&&(Be=F.createElement("span",{className:"".concat(Oe,"-content")},Be));var Ce=Se||{},ve=Ce.colSpan,Xe=Ce.rowSpan,lt=Ce.style,at=Ce.className,je=Object(D.a)(Ce,["colSpan","rowSpan","style","className"]),rt=ve!==void 0?ve:l,re=Xe!==void 0?Xe:c;if(rt===0||re===0)return null;var J={},k=typeof b=="number",$=typeof g=="number";k&&(J.position="sticky",J.left=b),$&&(J.position="sticky",J.right=g);var q={};ne&&(q.textAlign=ne);var he,de=Y===!0?{showTitle:!0}:Y;de&&(de.showTitle||me==="header")&&(typeof Be=="string"||typeof Be=="number"?he=Be.toString():F.isValidElement(Be)&&typeof Be.props.children=="string"&&(he=Be.props.children));var Qe=Object(G.a)(Object(G.a)(Object(G.a)({title:he},je),U),{},{colSpan:rt&&rt!==1?rt:null,rowSpan:re&&re!==1?re:null,className:P()(Oe,t,(i={},Object(se.a)(i,"".concat(Oe,"-fix-left"),k),Object(se.a)(i,"".concat(Oe,"-fix-left-first"),h),Object(se.a)(i,"".concat(Oe,"-fix-left-last"),L),Object(se.a)(i,"".concat(Oe,"-fix-right"),$),Object(se.a)(i,"".concat(Oe,"-fix-right-first"),N),Object(se.a)(i,"".concat(Oe,"-fix-right-last"),T),Object(se.a)(i,"".concat(Oe,"-ellipsis"),Y),Object(se.a)(i,"".concat(Oe,"-with-append"),M),Object(se.a)(i,"".concat(Oe,"-fix-sticky"),(k||$)&&ge),i),U.className,at),style:Object(G.a)(Object(G.a)(Object(G.a)(Object(G.a)({},U.style),q),J),lt),ref:v(n)?o:null});return F.createElement(n,Object.assign({},Qe),M,Be)}var s=F.forwardRef(u);s.displayName="Cell";var a=F.memo(s,function(A,o){return o.shouldCellUpdate?!o.shouldCellUpdate(o.record,A.record):!1});_e.a=a},hQp1:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return G});var se;(function(D){D.FirstPage="firstPage",D.PrevPage="prevPage",D.NextPage="nextPage"})(se||(se={}));var G;(function(D){D[D.Single=0]="Single",D[D.Multiple=1]="Multiple",D[D.Judge=2]="Judge",D[D.Fill=3]="Fill",D[D.Subjective=4]="Subjective",D[D.Shixun=5]="Shixun",D[D.Program=6]="Program",D[D.Combine=7]="Combine"})(G||(G={}))},hW8S:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return V}),j.d(_e,"c",function(){return F}),j.d(_e,"b",function(){return O});var se=j("VTBJ"),G=j("Ff2n"),D=j("Kwbf"),V="RC_TABLE_INTERNAL_COL_DEFINE";function F(X){var P=X.expandable,e=Object(G.a)(X,["expandable"]);return"expandable"in X?Object(se.a)(Object(se.a)({},e),P):e}function O(X){return Object.keys(X).reduce(function(P,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(P[e]=X[e]),P},{})}},ic2d:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return V});var se=j("FWmy"),G=j("746U");class D{constructor(){this.data=new Map}add(F,O){se.a(G.l(F)),se.a(G.k(O)),se.a(!this.data.has(F),"There is already an extension with this id"),this.data.set(F,O)}as(F){return this.data.get(F)||null}}const V=new D},k5F3:function(ht,_e,j){"use strict";var se=j("g9YV"),G=j("wCAj"),D=j("9og8"),V=j("oBTY"),F=j("k1fw"),O=j("tJVT"),X=j("WmNS"),P=j.n(X),e=j("q1tI"),R=j.n(e),m=j("Ty5D"),v=j("9kvl"),u=j("uJ6K"),s=j.n(u),a=j("V0Rq"),A=j("9Bee"),o=j("1vsH"),i=function(t){var E,_,y,B,C=t.isPreview,d=C===void 0?!1:C,n=t.isExportBlank,l=n===void 0?!1:n,c=t.activeTabs,b=t.exercise,g=t.globalSetting,h=t.loading,L=t.user,N=t.dispatch,T=Object(m.i)(),M=L.userInfo,W=Object(e.useState)(),U=Object(O.a)(W,2),Y=U[0],ne=U[1],me=Object(e.useState)(),ge=Object(O.a)(me,2),Oe=ge[0],Se=ge[1],Be=Object(e.useRef)(null),Ne=Object(e.useState)(21),ke=Object(O.a)(Ne,2),Ce=ke[0],ve=ke[1];Object(e.useEffect)(function(){Object(o.P)(c)||c==="2"&&Xe()},[T.userId,T.coursesId,T.exerciseId,T.categoryId,c]),Object(e.useEffect)(function(){Be.current&&ve(Be.current.clientHeight)},[Be.current]),Object(e.useEffect)(function(){var rt;if((rt=b.exerciseExportHeadData)!==null&&rt!==void 0&&rt.title){var re=b.exerciseExportHeadData;ne(Object(F.a)({},re||{}));var J=re||{},k=J.table,$,q;(k!=null&&k.total_singles_scores||k!=null&&k.total_doubles_scores||k!=null&&k.total_nulls_scores||k!=null&&k.total_judges_scores||k!=null&&k.total_pros_scores||k!=null&&k.total_shixuns_scores||k!=null&&k.total_mains_scores||k!=null&&k.total_combination_scores)&&($=Number(k==null?void 0:k.total_singles_scores)+Number(k==null?void 0:k.total_doubles_scores)+Number(k==null?void 0:k.total_nulls_scores)+Number(k==null?void 0:k.total_judges_scores)+Number(k==null?void 0:k.total_pros_scores)+Number(k==null?void 0:k.total_shixuns_scores)+Number(k==null?void 0:k.total_mains_scores)+Number(k==null?void 0:k.total_combination_scores)),(k!=null&&k.singles_scores||k!=null&&k.doubles_scores||k!=null&&k.nulls_scores||k!=null&&k.judges_scores||k!=null&&k.pros_scores||k!=null&&k.shixuns_scores||k!=null&&k.mains_scores||k!=null&&k.combination_scores)&&(q=Number(k==null?void 0:k.singles_scores)+Number(k==null?void 0:k.doubles_scores)+Number(k==null?void 0:k.nulls_scores)+Number(k==null?void 0:k.judges_scores)+Number(k==null?void 0:k.pros_scores)+Number(k==null?void 0:k.shixuns_scores)+Number(k==null?void 0:k.mains_scores)+Number(k==null?void 0:k.combination_scores));var he=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:k==null?void 0:k.total_singles_scores,doubles_score:k==null?void 0:k.total_doubles_scores,nulls_score:k==null?void 0:k.total_nulls_scores,judges_score:k==null?void 0:k.total_judges_scores,pros_score:k==null?void 0:k.total_pros_scores,shixuns_score:k==null?void 0:k.total_shixuns_scores,mains_score:k==null?void 0:k.total_mains_scores,total_combination_scores:k==null?void 0:k.total_combination_scores,total_score:$},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:k==null?void 0:k.singles_scores,doubles_score:k==null?void 0:k.doubles_scores,nulls_score:k==null?void 0:k.nulls_scores,judges_score:k==null?void 0:k.judges_scores,pros_score:k==null?void 0:k.pros_scores,shixuns_score:k==null?void 0:k.shixuns_scores,mains_score:k==null?void 0:k.mains_scores,total_combination_scores:k==null?void 0:k.combination_scores,total_score:q},{key:"3",name:"\u8BC4\u5377\u4EBA"}],de=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:k==null?void 0:k.total_singles_scores,doubles_score:k==null?void 0:k.total_doubles_scores,nulls_score:k==null?void 0:k.total_nulls_scores,judges_score:k==null?void 0:k.total_judges_scores,pros_score:k==null?void 0:k.total_pros_scores,shixuns_score:k==null?void 0:k.total_shixuns_scores,mains_score:k==null?void 0:k.total_mains_scores,total_combination_scores:k==null?void 0:k.total_combination_scores,total_score:$},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}];Se(Object(V.a)(l?de:he))}},[b.exerciseExportHeadData]);var Xe=function(){var rt=Object(D.a)(P.a.mark(function re(){var J,k,$,q,he,de,Qe,ze;return P.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return J={id:T.exerciseId||T.categoryId,identify:(M==null?void 0:M.login)||null},$e.next=3,Object(a.w)(J);case 3:k=$e.sent,ne(k||{}),$=k||{},q=$.table,(q!=null&&q.total_singles_scores||q!=null&&q.total_doubles_scores||q!=null&&q.total_nulls_scores||q!=null&&q.total_judges_scores||q!=null&&q.total_pros_scores||q!=null&&q.total_shixuns_scores||q!=null&&q.total_mains_scores||q!=null&&q.total_combination_scores)&&(he=Number(q==null?void 0:q.total_singles_scores)+Number(q==null?void 0:q.total_doubles_scores)+Number(q==null?void 0:q.total_nulls_scores)+Number(q==null?void 0:q.total_judges_scores)+Number(q==null?void 0:q.total_pros_scores)+Number(q==null?void 0:q.total_shixuns_scores)+Number(q==null?void 0:q.total_mains_scores)+Number(q==null?void 0:q.total_combination_scores)),(q!=null&&q.singles_scores||q!=null&&q.doubles_scores||q!=null&&q.nulls_scores||q!=null&&q.judges_scores||q!=null&&q.pros_scores||q!=null&&q.shixuns_scores||q!=null&&q.mains_scores||q!=null&&q.combination_scores)&&(de=Number(q==null?void 0:q.singles_scores)+Number(q==null?void 0:q.doubles_scores)+Number(q==null?void 0:q.nulls_scores)+Number(q==null?void 0:q.judges_scores)+Number(q==null?void 0:q.pros_scores)+Number(q==null?void 0:q.shixuns_scores)+Number(q==null?void 0:q.mains_scores)+Number(q==null?void 0:q.combination_scores)),Qe=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:q==null?void 0:q.total_singles_scores,doubles_score:q==null?void 0:q.total_doubles_scores,nulls_score:q==null?void 0:q.total_nulls_scores,judges_score:q==null?void 0:q.total_judges_scores,pros_score:q==null?void 0:q.total_pros_scores,shixuns_score:q==null?void 0:q.total_shixuns_scores,mains_score:q==null?void 0:q.total_mains_scores,total_combination_scores:q==null?void 0:q.total_combination_scores,total_score:he},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:q==null?void 0:q.singles_scores,doubles_score:q==null?void 0:q.doubles_scores,nulls_score:q==null?void 0:q.nulls_scores,judges_score:q==null?void 0:q.judges_scores,pros_score:q==null?void 0:q.pros_scores,shixuns_score:q==null?void 0:q.shixuns_scores,mains_score:q==null?void 0:q.mains_scores,total_combination_scores:q==null?void 0:q.combination_scores,total_score:de},{key:"3",name:"\u8BC4\u5377\u4EBA"}],ze=[{key:"1",name:"\u5E94\u5F97\u5206"},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}],Se(l?ze:Qe);case 11:case"end":return $e.stop()}},re)}));return function(){return rt.apply(this,arguments)}}(),lt=[{width:"10%",title:"\u9898\u578B",align:"center",dataIndex:"name",render:function(re){return R.a.createElement("a",null,re)}},{width:"10%",title:"\u5355\u9009\u9898",align:"center",dataIndex:"singles_score",render:function(re){return R.a.createElement("a",null,re==="0.0"?0:re)}},{width:"10%",title:"\u591A\u9009\u9898",align:"center",dataIndex:"doubles_score",render:function(re){return R.a.createElement("a",null,re==="0.0"?0:re)}},{width:"10%",title:"\u586B\u7A7A\u9898",align:"center",dataIndex:"nulls_score",render:function(re){return R.a.createElement("a",null,re==="0.0"?0:re)}},{width:140,title:"\u5224\u65AD\u9898",align:"center",dataIndex:"judges_score",render:function(re){return R.a.createElement("a",null,re==="0.0"?0:re)}},{width:"10%",title:"\u7F16\u7A0B\u9898",align:"center",dataIndex:"pros_score",render:function(re){return R.a.createElement("a",null,re==="0.0"?0:re)}},{width:"10%",title:"\u5B9E\u8BAD\u9898",align:"center",dataIndex:"shixuns_score",render:function(re){return R.a.createElement("a",null,re==="0.0"?0:re)}},{width:"10%",title:"\u7B80\u7B54\u9898",align:"center",dataIndex:"mains_score",render:function(re){return R.a.createElement("a",null,re==="0.0"?0:re)}},{width:"10%",title:"\u7EC4\u5408\u9898",align:"center",dataIndex:"total_combination_scores",render:function(re){return R.a.createElement("a",null,re==="0.0"?0:re)}},{width:"10%",title:"\u603B\u5206",align:"center",dataIndex:"total_score",render:function(re){return R.a.createElement("a",null,re==="0.0"?0:re)}}],at=Y||{},je=at.exercise_header;return R.a.createElement(R.a.Fragment,null,((je==null?void 0:je.show_user)||(je==null?void 0:je.show_no)||(je==null?void 0:je.show_group))&&R.a.createElement("section",{className:s.a.glassSeal},(je==null?void 0:je.show_user)&&R.a.createElement("span",null,"\u59D3\u540D\uFF1A",R.a.createElement("span",null,Y==null?void 0:Y.user)),(je==null?void 0:je.show_no)&&R.a.createElement("span",null,"\u5B66\u53F7\uFF1A",R.a.createElement("span",null,Y==null?void 0:Y.student_id)),(je==null?void 0:je.show_group)&&R.a.createElement("span",null,"\u4E13\u4E1A\u73ED\u7EA7\uFF1A",R.a.createElement("span",null,Y==null?void 0:Y.group_name))),R.a.createElement("section",{className:"".concat(s.a.wrap," ").concat(d?"pl20":""," ")},(Y==null?void 0:Y.photo_url)&&R.a.createElement("img",{className:s.a.img,src:Y==null?void 0:Y.photo_url}),(je==null?void 0:je.show_title)&&R.a.createElement("p",{className:"font16 tc c-grey-333"},R.a.createElement("strong",null,Y==null?void 0:Y.title)),(je==null?void 0:je.show_body)&&((b==null||((E=b.exerciseExportHeadData)===null||E===void 0)?void 0:E.exercise_description)||(b==null||((_=b.commonHeader)===null||_===void 0)?void 0:_.exercise_description))&&R.a.createElement("span",{ref:Be,style:{justifyContent:Ce===21?"center":"left",wordBreak:"break-all",display:"flex",textAlign:"left"},className:"tc c-grey-333"},"\u8BD5\u5377\u987B\u77E5\uFF1A".concat((b==null||((y=b.exerciseExportHeadData)===null||y===void 0)?void 0:y.exercise_description)||(b==null||((B=b.commonHeader)===null||B===void 0)?void 0:B.exercise_description))),(je==null?void 0:je.show_info)&&R.a.createElement("p",{className:"tc c-grey-666"},"\u5171:\u3010",Y==null?void 0:Y.large_counts,"\u5927\u9898\u3011\u3010",Y==null?void 0:Y.total_count,"\u5C0F\u9898\u3011\u3010 \u6EE1\u5206",Y==null?void 0:Y.score,"\u5206\u3011 \u8003\u8BD5\u65F6\u95F4\uFF1A\u3010",(Y==null?void 0:Y.time)>-1?"".concat(Y==null?void 0:Y.time,"\u5206\u949F"):"\u4E0D\u9650","\u3011"),(je==null?void 0:je.show_desc)&&R.a.createElement("div",{className:"mt10"},R.a.createElement("p",{className:"font16"},"\u8003\u8BD5\u8BF4\u660E\uFF1A"),R.a.createElement(A.a,{value:Y==null?void 0:Y.description})),(je==null?void 0:je.show_table)&&R.a.createElement("div",{className:"mt10"},R.a.createElement(G.a,{className:s.a.table,columns:lt,dataSource:Object(V.a)(Oe||[]),bordered:!0,pagination:!1}))))};_e.a=Object(v.a)(function(r){var t=r.exercise,E=r.loading,_=r.user,y=r.globalSetting;return{exercise:t,globalSetting:y,user:_,loading:E.effects}})(i)},"kVK+":function(ht,_e){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */_e.read=function(j,se,G,D,V){var F,O,X=V*8-D-1,P=(1<<X)-1,e=P>>1,R=-7,m=G?V-1:0,v=G?-1:1,u=j[se+m];for(m+=v,F=u&(1<<-R)-1,u>>=-R,R+=X;R>0;F=F*256+j[se+m],m+=v,R-=8);for(O=F&(1<<-R)-1,F>>=-R,R+=D;R>0;O=O*256+j[se+m],m+=v,R-=8);if(F===0)F=1-e;else{if(F===P)return O?NaN:(u?-1:1)*Infinity;O=O+Math.pow(2,D),F=F-e}return(u?-1:1)*O*Math.pow(2,F-D)},_e.write=function(j,se,G,D,V,F){var O,X,P,e=F*8-V-1,R=(1<<e)-1,m=R>>1,v=V===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=D?0:F-1,s=D?1:-1,a=se<0||se===0&&1/se<0?1:0;for(se=Math.abs(se),isNaN(se)||se===Infinity?(X=isNaN(se)?1:0,O=R):(O=Math.floor(Math.log(se)/Math.LN2),se*(P=Math.pow(2,-O))<1&&(O--,P*=2),O+m>=1?se+=v/P:se+=v*Math.pow(2,1-m),se*P>=2&&(O++,P/=2),O+m>=R?(X=0,O=R):O+m>=1?(X=(se*P-1)*Math.pow(2,V),O=O+m):(X=se*Math.pow(2,m-1)*Math.pow(2,V),O=0));V>=8;j[G+u]=X&255,u+=s,X/=256,V-=8);for(O=O<<V|X,e+=V;e>0;j[G+u]=O&255,u+=s,O/=256,e-=8);j[G+u-s]|=a*128}},mrIW:function(ht,_e,j){"use strict";j.r(_e);var se=j("+L6B"),G=j("2/Rp"),D=j("sPJy"),V=j("bE4q"),F=j("oBTY"),O=j("/zsF"),X=j("PArb"),P=j("sRBo"),e=j("kaz8"),R=j("14J3"),m=j("BMrR"),v=j("jCWc"),u=j("kPKH"),s=j("7Kak"),a=j("9yH6"),A=j("2qtc"),o=j("kLXV"),i=j("k1fw"),r=j("9og8"),t=j("tJVT"),E=j("PpiC"),_=j("5NDa"),y=j("5rEg"),B=j("WmNS"),C=j.n(B),d=j("q1tI"),n=j.n(d),l=j("Ty5D"),c=j("55Ip"),b=j("9kvl"),g=j("xOOu"),h=j.n(g),L=j("jhfD"),N=j("dF/Y"),T=j("q5bB"),M=j.n(T),W=j("9Bee"),U=j("1vsH"),Y=j("cw1j"),ne=j("g9YV"),me=j("wCAj"),ge=j("giR+"),Oe=j("fyUT"),Se=j("miYZ"),Be=j("tsqr"),Ne=j("5Dmo"),ke=j("3S7+"),Ce=j("xKgJ"),ve=j("wd/R"),Xe=j.n(ve),lt=j("ZW9T"),at=j("tJYV"),je=j.n(at),rt=function(We){var Le,Fe,we,ue=We.item,ce=We.answerData,te=We.hasChangeScore,ie=te===void 0?!0:te,le=We.autoHeight,pe=We.saveChangeScore,Ie=pe===void 0?function(){}:pe,Pe=Object(d.useState)([]),qe=Object(t.a)(Pe,2),ft=qe[0],ut=qe[1],st=Object(d.useState)([]),Lt=Object(t.a)(st,2),mt=Lt[0],tt=Lt[1];Object(d.useEffect)(function(){var yt;if(!(ue!=null&&(yt=ue.shixun_details)!==null&&yt!==void 0&&yt.length))return;for(var Et=[],wt=[],Mt=0;Mt<(ue==null||((ct=ue.shixun_details)===null||ct===void 0)?void 0:ct.length);Mt++){for(var ct,lr,At,gt=0;gt<(ue==null?void 0:ue.shixun_details[Mt].stage_list.length);gt++){var Nt,ir,yr,br,Rr,Dr=ue==null?void 0:ue.shixun_details[Mt].stage_list[gt];Et.push(Object(i.a)(Object(i.a)({},Dr),{operation:ue==null||((Nt=ue.shixun_details)===null||Nt===void 0||((ir=Nt[Mt])===null||ir===void 0||((yr=ir.shixun_detail)===null||yr===void 0||((br=yr[0])===null||br===void 0))))?void 0:br.game_identifier,shixun_challenge_id:ue==null||((Rr=ue.shixun_details[Mt])===null||Rr===void 0)?void 0:Rr.shixun_challenge_id}))}if(ue!=null&&(lr=ue.shixun_details)!==null&&lr!==void 0&&(At=lr[Mt])!==null&&At!==void 0&&At.shixun_detail){var Ht,pr,Lr;wt.push(ue==null||((Ht=ue.shixun_details)===null||Ht===void 0||((pr=Ht[Mt])===null||pr===void 0||((Lr=pr.shixun_detail)===null||Lr===void 0)))?void 0:Lr[0])}}tt(wt),ut([].concat(Et))},[ue==null?void 0:ue.shixun_details]);var er=[{title:"\u5173\u5361",dataIndex:"position",key:"position",align:"center"},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",align:"center",ellipsis:!0,width:260,render:function(Et){return n.a.createElement(ke.a,{title:Et},n.a.createElement("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:Et&&Et.length>25?Et:""},Et))}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(Et,wt){return n.a.createElement("span",null,wt.evaluate_count?wt.evaluate_count:n.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u5B8C\u6210\u65F6\u95F4",key:"finished_time",dataIndex:"finished_time",align:"center",render:function(Et,wt){var Mt=!1;return wt.finished_time&&ce!==null&&ce!==void 0&&ce.exercise&&ce!==null&&ce!==void 0&&ce.exercise_answer_user&&((ce==null?void 0:ce.exercise.time)===-1?Mt=Xe()(ce==null?void 0:ce.exercise.end_time).isBefore(wt.finished_time):Mt=Xe()(ce==null?void 0:ce.exercise_answer_user.start_at).add(ce==null?void 0:ce.exercise.time,"m").isBefore(wt.finished_time)),n.a.createElement("span",null,wt.finished_time||n.a.createElement("span",{className:"c-grey-999"},"--"),n.a.createElement("span",{className:"c-orange-ff9 "},Mt?"\uFF08\u5DF2\u8D85\u65F6\uFF09":""))}},{title:"\u8017\u65F6",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(Et,wt){return n.a.createElement("span",null,wt.time_consuming||n.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(Et,wt){return n.a.createElement("span",null,wt.view_answer?"\u5DF2\u67E5\u770B":"\u672A\u67E5\u770B")}},{title:"\u5F97\u5206/\u6EE1\u5206",dataIndex:"user_score",key:"user_score",align:"center",render:function(Et,wt){return n.a.createElement("span",null,n.a.createElement("span",{className:"c-orange"},wt.user_score),"/",wt.game_score)}},ie&&{title:"\u8C03\u5206",dataIndex:"user_score",key:"user_score",align:"center",render:function(Et,wt,Mt){return n.a.createElement(Oe.a,{min:0,max:Number(wt.game_score),defaultValue:Et,onBlur:function(){var ct=Object(r.a)(C.a.mark(function lr(At){var gt;return C.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:if(!(At.target.value!=Et)){ir.next=6;break}return ir.next=3,Ie(Object(i.a)(Object(i.a)({},ue),{shixun_challenge_id:wt.shixun_challenge_id,shixunScore:At.target.value}));case 3:gt=ir.sent,console.log("res: ",gt),gt!=null&>.question_comments&&Be.b.success("\u5DF2\u4FEE\u6539\u5F53\u524D\u8BC4\u5206");case 6:case"end":return ir.stop()}},lr)}));return function(lr){return ct.apply(this,arguments)}}()})}}].filter(function(yt){return!!yt}),Jt=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(Et,wt){return n.a.createElement("span",null,wt.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(Et,wt){return n.a.createElement("span",null,wt.error_msg?wt.error_msg:"--")}},{title:"\u8BC4\u6D4B\u65F6\u95F4",dataIndex:"updated_at",key:"updated_at",align:"center",width:200,render:function(Et,wt){return n.a.createElement("span",null,wt.updated_at?wt.updated_at:"--")}}],Ot={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return n.a.createElement(n.a.Fragment,null,((ce==null||((Le=ce.exercise)===null||Le===void 0)?void 0:Le.student_commit_status)!==0||(ce==null||((Fe=ce.exercise)===null||Fe===void 0)?void 0:Fe.user_exercise_status)!==0)&&n.a.createElement("div",{className:"mt15"},n.a.createElement("p",{className:"font16 c-grey-666"},"\u9636\u6BB5\u6210\u7EE9"),!!(ft!=null&&ft.length)&&n.a.createElement(me.a,{columns:er,dataSource:ft,pagination:!1})),!!(mt!=null&&mt.length)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("p",{className:"font16 c-grey-666 mt10"},"\u5B9E\u8BAD\u8BE6\u60C5"),mt==null?void 0:mt.map(function(yt,Et){var wt;return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"mt5"},n.a.createElement("span",{className:"font16 mr15"}," ","\u7B2C",yt.position,"\u5173"),n.a.createElement(c.a,{className:"current c-black font16",to:"/tasks/".concat(yt.game_identifier)},yt.name)),!!(yt!=null&&(wt=yt.outputs)!==null&&wt!==void 0&&wt.length)&&n.a.createElement(me.a,{bordered:!0,dataSource:yt.outputs.map(function(Mt){return{key:Mt.position,error_msg:Mt.output_detail,updated_at:Mt.updated_at}}),columns:Jt,pagination:!1}),(yt==null?void 0:yt.st)===0&&yt.passed_code&&n.a.createElement("div",{className:je.a.shixunWrp},n.a.createElement("h2",null,"\u6700\u540E\u4E00\u6B21\u901A\u5173\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09",n.a.createElement("span",{className:"c-light-black"},yt.path)),n.a.createElement(lt.b,{height:300,autoHeight:le,language:"python",theme:"default",value:yt.passed_code,options:Ot})))})),Object(Ce.s)()&&n.a.createElement(W.a,{className:"c-grey-999 mt20 mb20",value:ue==null?void 0:ue.question_title}),ue==null||((we=ue.shixun)===null||we===void 0)?void 0:we.map(function(yt,Et){return n.a.createElement("p",{className:"font16 c-grey-666 mb5"},n.a.createElement("span",{className:"mr20"},"\u7B2C",yt==null?void 0:yt.challenge_position,"\u5173 ",yt==null?void 0:yt.challenge_name),n.a.createElement("span",null,yt==null?void 0:yt.challenge_score,"\u5206"))}),n.a.createElement("div",{className:"mb15"}))},re=rt,J=j("J66h"),k=j("ZPm4"),$=j.n(k),q=function(We){var Le,Fe,we,ue,ce,te=We.item,ie=We.answerData,le=We.autoHeight,pe=Object(d.useState)([]),Ie=Object(t.a)(pe,2),Pe=Ie[0],qe=Ie[1];Object(d.useEffect)(function(){var st;if((te==null||((st=te.evaluate_codes)===null||st===void 0)?void 0:st.length)>0){var Lt;qe(te==null||((Lt=te.evaluate_codes)===null||Lt===void 0)?void 0:Lt.map(function(mt,tt){return{key:tt+1,error_msg:mt!=null&&mt.error_msg?J.Base64.decode(mt==null?void 0:mt.error_msg):"",created_at:mt.created_at}}))}else qe([{key:"--",error_msg:"--"}])},[te==null?void 0:te.evaluate_codes]);var ft=[{title:"\u8BC4\u6D4B\u5E8F\u53F7",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(Lt,mt){return n.a.createElement("span",null,mt.key)}},{title:"\u8BC4\u6D4B\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center",width:200,render:function(Lt,mt){return n.a.createElement("span",null,mt.created_at?Xe()(mt.created_at).format("YYYY-MM-DD HH:mm"):"--")}},{title:"\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(Lt,mt){var tt;return n.a.createElement("span",null,mt.error_msg?((tt=mt.error_msg)===null||tt===void 0?void 0:tt.length)>1e3?mt.error_msg.substring(0,1e3)+"...":mt.error_msg:"--")}}],ut={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"mt15 mb15"},n.a.createElement(W.a,{value:te==null?void 0:te.description})),(!!(ie!=null&&(Le=ie.exercise)!==null&&Le!==void 0&&Le.student_commit_status)&&(ie==null||((Fe=ie.exercise)===null||Fe===void 0)?void 0:Fe.student_commit_status)!==0||!!(ie!=null&&(we=ie.exercise)!==null&&we!==void 0&&we.user_exercise_status)&&(ie==null||((ue=ie.exercise)===null||ue===void 0)?void 0:ue.user_exercise_status)!==0)&&n.a.createElement(me.a,{className:"mt5",bordered:!0,dataSource:Pe,columns:ft,pagination:!1}),!!(te!=null&&(ce=te.user_answer)!==null&&ce!==void 0&&ce.length)&&(te==null?void 0:te.passed_code)&&n.a.createElement("aside",{className:$.a.shixunWrp},n.a.createElement("h3",null,"\u7B2C\u4E00\u6B21\u8BC4\u6D4B\u901A\u8FC7\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09"),n.a.createElement(lt.b,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:te!=null&&te.passed_code?J.Base64.decode(te==null?void 0:te.passed_code):"",autoHeight:le,options:ut})))},he=q,de=j("k5F3"),Qe=j("1n7x"),ze=j.n(Qe),Ge=j("hQp1"),$e=30,nt=y.a.TextArea,dt=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898","\u7F16\u7A0B\u9898"],xe=function(We){var Le,Fe,we,ue,ce,te,ie,le=We.exercise,pe=We.globalSetting,Ie=We.loading,Pe=We.user,qe=We.dispatch,ft=Object(E.a)(We,["exercise","globalSetting","loading","user","dispatch"]),ut=Object(l.i)(),st=Pe.userInfo,Lt=Object(d.useState)({}),mt=Object(t.a)(Lt,2),tt=mt[0],er=mt[1],Jt=Object(d.useRef)(),Ot=Object(d.useRef)(!1),yt=Object(d.useState)(!1),Et=Object(t.a)(yt,2),wt=Et[0],Mt=Et[1],ct=Object(d.useState)({}),lr=Object(t.a)(ct,2),At=lr[0],gt=lr[1],Nt=Object(d.useState)(new h.a),ir=Object(t.a)(Nt,2),yr=ir[0],br=ir[1],Rr=Object(d.useState)([]),Dr=Object(t.a)(Rr,2),Ht=Dr[0],pr=Dr[1],Lr=Object(d.useState)(!1),Cr=Object(t.a)(Lr,2),Qr=Cr[0],Ur=Cr[1],ae=Object(d.useState)(!1),oe=Object(t.a)(ae,2),fe=oe[0],Te=oe[1],Ye=Object(d.useState)(!1),et=Object(t.a)(Ye,2),Q=et[0],p=et[1],w=Object(d.useState)(!1),H=Object(t.a)(w,2),Z=H[0],K=H[1],ye=Object(d.useState)(!1),He=Object(t.a)(ye,2),it=He[0],ot=He[1];Object(d.useEffect)(function(){st!=null&&st.login&&Tt();try{pr(JSON.parse(localStorage.total_exercise_users))}catch($t){}},[ut.userId,ut.coursesId,ut.exerciseId,st]);var Ve=function(){document.querySelectorAll("canvas").forEach(function(De){(!De.clientWidth||!De.clientHeight)&&De.remove()})},_t=function(){document.body.scrollIntoView()},vt=function(De){var Qt,Vt,Dt,jt=De==null||((Qt=De.exercise_answer_user)===null||Qt===void 0)?void 0:Qt.user_id;if(De!=null&&(Vt=De.exercise)!==null&&Vt!==void 0&&Vt.question_random||De!=null&&(Dt=De.exercise)!==null&&Dt!==void 0&&Dt.choice_random){var Kt,Ar=1;De.exercise.question_random=De==null||((Kt=De.exercise_question_types)===null||Kt===void 0)?void 0:Kt.map(function(zt){var sr,rr;return De!=null&&(sr=De.exercise)!==null&&sr!==void 0&&sr.choice_random&&((zt.question_type===0||zt.question_type===1)&&zt.items.map(function(Ut){return Ut.question_choices=Object(U.U)(Ut.question_choices,jt),Ut}),zt.question_type===7&&zt.items.forEach(function(Ut){Ut.sub_exercise_questions.forEach(function(Wt){Wt.question_choices=Object(U.U)(Wt.question_choices,jt)})})),De!=null&&(rr=De.exercise)!==null&&rr!==void 0&&rr.question_random&&(zt.items=Object(U.U)(zt.items,jt)),zt.items.map(function(Ut){return Ut.question_num=Ar,Ar++,Ut}),zt})}},Tt=function(){var $t=Object(r.a)(C.a.mark(function De(){var Qt;return C.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(qe({type:"exercise/getExerciseExportHeadData",payload:{id:ut.exerciseId||ut.categoryId,identify:ut.userId||null}}),!ut.userId){Dt.next=9;break}return Dt.next=4,qe({type:"exercise/getReviewExercise",payload:{exerciseId:ut.exerciseId,login:ut.userId}});case 4:Qt=Dt.sent,vt(Qt),Ot.current=!1,Dt.next=13;break;case 9:return Dt.next=11,qe({type:"exercise/editExercise",payload:{coursesId:ut.coursesId,categoryId:ut.exerciseId}});case 11:Qt=Dt.sent,Ot.current=!0;case 13:gt(Object(i.a)({},Qt||{})),setTimeout(function(){var jt=1,Kt=document.getElementById("export-id-all"),Ar=860,zt=0},1500);case 15:case"end":return Dt.stop()}},De)}));return function(){return $t.apply(this,arguments)}}(),Pt=function(){yr.generateAsync({type:"blob"}).then(function(De){var Qt,Vt,Dt,jt=document.createElement("a");jt.href=window.URL.createObjectURL(De),jt.download=Object.keys(yr.files).length>1?At==null||((Qt=At.exercise)===null||Qt===void 0)?void 0:Qt.exercise_name:((le==null||((Vt=le.exerciseExportHeadData)===null||Vt===void 0)?void 0:Vt.user)||(At==null||((Dt=At.exercise)===null||Dt===void 0)?void 0:Dt.exercise_name))+".zip",document.body.appendChild(jt);var Kt=document.createEvent("MouseEvents");Kt.initEvent("click",!1,!1),jt.dispatchEvent(Kt),document.body.removeChild(jt),br(new h.a)}),Te(!1),K(!1),p(!1),Ur(!1)},ur=function(){var $t=Object(r.a)(C.a.mark(function De(Qt){var Vt,Dt,jt,Kt,Ar,zt,sr,rr,Ut,Wt,Ft,tr,Zt;return C.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return Zt=function(){return Zt=Object(r.a)(C.a.mark(function gr(){var Kr;return C.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:return Dt++,Ot.current=!1,_t(),Nr.next=5,qe({type:"exercise/getExerciseExportHeadData",payload:{id:ut.exerciseId||ut.categoryId,identify:Ht[Dt-1].user_login}});case 5:return Nr.next=7,qe({type:"exercise/getReviewExercise",payload:{exerciseId:ut.exerciseId,login:Ht[Dt-1].user_login}});case 7:Kr=Nr.sent,vt(Kr),gt(Object(i.a)({},Kr||{})),setTimeout(Object(r.a)(C.a.mark(function fr(){var qr,Xt,Sr;return C.a.wrap(function($r){for(;;)switch($r.prev=$r.next){case 0:Ve(),qr=ze()(),Xt=C.a.mark(function un(Yr){return C.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return mn.next=2,qr.set(rr).from(Kt[Yr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Qn=Object(r.a)(C.a.mark(function Jr(cn){return C.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:if(!(Yr<Kt.length-1)){gn.next=3;break}return gn.next=3,cn.addPage();case 3:case"end":return gn.stop()}},Jr)}));return function(Jr){return Qn.apply(this,arguments)}}());case 2:case"end":return mn.stop()}},un)}),Sr=0;case 4:if(!(Sr<Kt.length)){$r.next=9;break}return $r.delegateYield(Xt(Sr),"t0",6);case 6:Sr++,$r.next=4;break;case 9:yr.file("".concat(Ht[Dt-1].user_name,"-").concat(Xe()().format("YYYY-MM-DD HH:mm:ss"),".pdf"),qr.output("blob")),jt.update({content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},Dt+1),"/",Ht==null?void 0:Ht.length)}),Dt==(Ht==null?void 0:Ht.length)?(jt.destroy(),Mt(!1),Pt()):tr();case 12:case"end":return $r.stop()}},fr)})),2600);case 11:case"end":return Nr.stop()}},gr)})),Zt.apply(this,arguments)},tr=function(){return Zt.apply(this,arguments)},Qt==="all"?Ot.current=!1:ut.userId||(Ot.current=!0),_t(),Ur(!0),Dt=0,Qt!=="all"&&Mt(!0),jt=o.a.info({width:460,title:n.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u8BD5\u5377,",n.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:Qt==="all"?n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},Dt+1),"/",Ht==null?void 0:Ht.length):null,maskClosable:!1,className:M.a.modal,onOk:function(){}}),Ve(),qt.next=11,new Promise(function(Fr,gr){setTimeout(function(){Fr("")},1e3)});case 11:Kt=Jt.current.children,Ar="".concat(Xe()().format("YYYY-MM-DD HH:mm:ss")),(Vt=le.exerciseExportHeadData)!==null&&Vt!==void 0&&Vt.user&&(Ar="".concat(((zt=le.exerciseExportHeadData)===null||zt===void 0?void 0:zt.student_id)||"").concat((sr=le.exerciseExportHeadData)===null||sr===void 0?void 0:sr.user)),rr={html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}},Ut=ze()(),Wt=C.a.mark(function Fr(gr){return C.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:return Pr.next=2,Ut.set(rr).from(Kt[gr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Nr=Object(r.a)(C.a.mark(function fr(qr){return C.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:if(!(gr<Kt.length-1)){Sr.next=3;break}return Sr.next=3,qr.addPage();case 3:case"end":return Sr.stop()}},fr)}));return function(fr){return Nr.apply(this,arguments)}}());case 2:case"end":return Pr.stop()}},Fr)}),Ft=0;case 18:if(!(Ft<Kt.length)){qt.next=23;break}return qt.delegateYield(Wt(Ft),"t0",20);case 20:Ft++,qt.next=18;break;case 23:!!(Ht!=null&&Ht.length)&&Qt==="all"?tr():(yr.file("".concat(Ar,".pdf"),Ut.output("blob"),{base64:!1}),jt.destroy(),Mt(!1),Pt());case 24:case"end":return qt.stop()}},De)}));return function(Qt){return $t.apply(this,arguments)}}(),Gt=function(De){for(var Qt=De.internal.getNumberOfPages(),Vt=1;Vt<=Qt;Vt+=1)De.setPage(Vt),De.setFontSize(9),De.setTextColor("#6a6a6a"),De.text("".concat(Vt," / ").concat(Qt),De.internal.pageSize.getWidth()-20,De.internal.pageSize.getHeight()-6)},ar=function(De,Qt){var Vt,Dt,jt,Kt,Ar,zt,sr,rr,Ut,Wt,Ft,tr,Zt,xr,qt,Fr,gr,Kr,Pr,Nr,fr,qr;return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{style:{display:"flex"},className:M.a.programTitle},n.a.createElement("span",{style:{flexShrink:0},className:"font18"},Qt,"."),n.a.createElement(W.a,{value:De.question_title}),n.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",(De==null?void 0:De.question_type)===7?"\u5171".concat(De==null?void 0:De.sub_q_count,"\u5C0F\u9898"):""," ",De.question_score,"\u5206\uFF09")),De.question_type===Ge.a.Single&&n.a.createElement(n.a.Fragment,null,(Vt=De.question_choices)===null||Vt===void 0?void 0:Vt.map(function(Xt,Sr){var kr;return n.a.createElement(m.a,{key:Sr},n.a.createElement(u.a,{flex:"25px"},n.a.createElement("div",{style:{width:25,overflow:"hidden"}},n.a.createElement(a.a,{checked:(kr=De.user_answer)===null||kr===void 0?void 0:kr.includes(Xt.choice_id),style:{width:25}}))),n.a.createElement(u.a,{flex:"1"},n.a.createElement(W.a,{value:Xt.choice_text||""})))})),De.question_type===Ge.a.Multiple&&n.a.createElement(n.a.Fragment,null,(Dt=De.question_choices)===null||Dt===void 0?void 0:Dt.map(function(Xt,Sr){var kr;return n.a.createElement(m.a,{key:Sr},n.a.createElement(u.a,{flex:"25px"},n.a.createElement("div",{style:{width:25,overflow:"hidden"}},n.a.createElement(e.a,{checked:(kr=De.user_answer)===null||kr===void 0?void 0:kr.includes(Xt.choice_id),style:{width:25}}))),n.a.createElement(u.a,{flex:"1"},n.a.createElement(W.a,{value:Xt.choice_text||""})))})),De.question_type===Ge.a.Judge&&n.a.createElement("div",{className:M.a.flexRow},(jt=De.question_choices)===null||jt===void 0?void 0:jt.map(function(Xt,Sr){var kr;return n.a.createElement(m.a,{key:Sr},n.a.createElement(u.a,{flex:"25px"},n.a.createElement("div",{style:{width:25,overflow:"hidden"}},n.a.createElement(a.a,{checked:(kr=De.user_answer)===null||kr===void 0?void 0:kr.includes(Xt.choice_id),style:{width:25}}))),n.a.createElement(u.a,{flex:"1"},Xt.choice_text))})),De.question_type===Ge.a.Fill&&!Ot.current&&n.a.createElement(Y.a,{item:De,answerData:At,changeScoreData:tt,textValue:(Kt=tt[De.q_position])===null||Kt===void 0?void 0:Kt.text,textOnChange:function(Sr){tt[De.q_position].text=Sr,er(Object(i.a)({},tt))},seeAnswerVisible:!1}),De.question_type===Ge.a.Shixun&&n.a.createElement(re,{item:De,answerData:At,hasChangeScore:!1,autoHeight:Qr}),De.question_type===Ge.a.Subjective&&De!==null&&De!==void 0&&(Ar=De.user_answer)!==null&&Ar!==void 0&&Ar[0]?n.a.createElement("div",{className:M.a.simpleBg},n.a.createElement("aside",{className:"font14 c-light-primary mb5"},"\u5B66\u751F\u7B54\u9898"),n.a.createElement("div",null,Z?n.a.createElement(W.a,{value:De==null||((zt=De.user_answer_light)===null||zt===void 0)?void 0:zt[0]}):n.a.createElement(W.a,{value:De==null||((sr=De.user_answer)===null||sr===void 0)?void 0:sr[0]}))):null,De.question_type===Ge.a.Program&&n.a.createElement(he,{item:De,answerData:At,autoHeight:Qr}),De.question_type===Ge.a.Combine&&n.a.createElement(n.a.Fragment,null,(rr=De.sub_exercise_questions)===null||rr===void 0?void 0:rr.map(function(Xt,Sr){var kr,$r;return n.a.createElement("div",{style:{marginLeft:10}},n.a.createElement("span",{style:{fontSize:"16px"}},Qt,".",Sr+1,"\uFF08\u5355\u9009\u9898\uFF09",Xt==null?void 0:Xt.question_title,"\uFF08",Xt==null?void 0:Xt.question_score,"\u5206\uFF09"),(kr=Xt.question_choices)===null||kr===void 0?void 0:kr.map(function(un,Yr){var rn;return n.a.createElement(m.a,{key:Yr},n.a.createElement(u.a,{flex:"25px"},n.a.createElement("div",{style:{width:25,overflow:"hidden"}},n.a.createElement(a.a,{checked:(rn=Xt.user_answer)===null||rn===void 0?void 0:rn.includes(un.choice_id),style:{width:25}}))),n.a.createElement(u.a,{flex:"1"},n.a.createElement(W.a,{value:un.choice_text||""})))}),(Xt==null?void 0:Xt.standard_answer_show)&&fe&&n.a.createElement("span",{className:"font16 "},"\u6B63\u786E\u7B54\u6848\uFF1A",Xt==null?void 0:Xt.standard_answer_show),((Xt==null?void 0:Xt.standard_answer_show)||(Xt==null||(($r=Xt.standard_answer)===null||$r===void 0)?void 0:$r.length)>0)&&fe&&n.a.createElement(m.a,{style:{marginTop:14}},n.a.createElement("span",{className:"font16 "},"\u89E3\u6790\uFF1A"),n.a.createElement(W.a,{className:M.a.renderHtml,value:(Xt==null?void 0:Xt.analysis)||"\u6682\u65E0\u89E3\u6790"})))})),fe&&n.a.createElement("div",{style:{marginTop:10}},(De==null?void 0:De.question_type)<3&&(De==null?void 0:De.standard_answer_show)&&n.a.createElement("span",{className:"font16 "},"\u6B63\u786E\u7B54\u6848\uFF1A",De==null?void 0:De.standard_answer_show),!!(De!=null&&(Ut=De.standard_answer)!==null&&Ut!==void 0&&Ut.length)&&fe&&(De==null?void 0:De.question_type)===3&&n.a.createElement("div",null,De==null||((Wt=De.standard_answer)===null||Wt===void 0)?void 0:Wt.map(function(Xt,Sr){return n.a.createElement("div",null,n.a.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A",Sr+1,"\uFF09:"),n.a.createElement("div",null,n.a.createElement(nt,{autoSize:!0,disabled:!0,value:Xt==null?void 0:Xt.answer_text[0]})))})),(De==null?void 0:De.standard_answer)&&(De==null?void 0:De.question_type)===4&&n.a.createElement("div",null,n.a.createElement("p",{className:"mt10 mb0"},"\u53C2\u8003\u7B54\u6848\uFF1A"),n.a.createElement("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5}},n.a.createElement(W.a,{value:De==null||((Ft=De.standard_answer)===null||Ft===void 0)?void 0:Ft[0]}))),(De==null?void 0:De.question_type)<=4&&((De==null?void 0:De.standard_answer_show)||(De==null||((tr=De.standard_answer)===null||tr===void 0)?void 0:tr.length)>0)&&n.a.createElement(m.a,{style:{marginTop:14}},n.a.createElement("span",{className:"font16 "},"\u89E3\u6790\uFF1A"),n.a.createElement(W.a,{className:M.a.renderHtml,value:(De==null?void 0:De.analysis)||"\u6682\u65E0\u89E3\u6790"}))),Q&&!Number.isNaN(parseFloat(De==null?void 0:De.user_score))&&(De==null?void 0:De.question_type)!==Ge.a.Shixun&&n.a.createElement("span",null,n.a.createElement("span",{style:{color:"#0152d9"}},"\u5B66\u751F\u5F97\u5206\uFF1A"),De==null?void 0:De.user_score,"\u5206"),Z&&((De==null?void 0:De.question_type)===4||(De==null?void 0:De.question_type)===3||(De==null?void 0:De.question_type)===6)&&n.a.createElement("div",{style:{display:"flex",flexFlow:"column"}},(De==null||((Zt=De.answer_comments)===null||Zt===void 0||((xr=Zt[0])===null||xr===void 0||((qt=xr.user)===null||qt===void 0)))?void 0:qt.name)&&n.a.createElement("span",null,"\u8BC4\u9605\u6559\u5E08\uFF1A",De==null||((Fr=De.answer_comments)===null||Fr===void 0||((gr=Fr[0])===null||gr===void 0||((Kr=gr.user)===null||Kr===void 0)))?void 0:Kr.name," "),(De==null||((Pr=De.answer_comments)===null||Pr===void 0||((Nr=Pr[0])===null||Nr===void 0))?void 0:Nr.comment)&&n.a.createElement("span",null,"\u6559\u5E08\u8BC4\u8BED\uFF1A",De==null||((fr=De.answer_comments)===null||fr===void 0||((qr=fr[0])===null||qr===void 0))?void 0:qr.comment," ")),n.a.createElement(X.a,{style:Ot.current?{marginTop:30}:{}}))},kt=function(De){var Qt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Vt=["","\u5341","\u767E","\u5343","\u4E07"];De=parseInt(De);var Dt=function(zt){for(var sr=zt.toString().split("").reverse(),rr="",Ut=0;Ut<sr.length;Ut++)rr=(Ut==0&&sr[Ut]==0||Ut>0&&sr[Ut]==0&&sr[Ut-1]==0?"":Qt[sr[Ut]]+(sr[Ut]==0?Vt[0]:Vt[Ut]))+rr;return rr},jt=Math.floor(De/1e4),Kt=De%1e4;return Kt.toString().length<4&&(Kt="0"+Kt),jt?Dt(jt)+"\u4E07"+Dt(Kt):Dt(De)},Tr=function(De,Qt){return De.category?n.a.createElement("div",null,n.a.createElement("span",{className:"font16 c-light-primary"},kt(De.key+1),"\u3001",De.name),n.a.createElement("span",{className:"c-grey-999"},"\uFF08\u5171",De.count,"\u9898\uFF0C",(De==null?void 0:De.question_type)===7?"\u5305\u542B".concat(De==null?void 0:De.sub_count,"\u5C0F\u9898\uFF1B"):"","\u5171",De.score,"\u5206\uFF09")):ar(De,Qt)},mr=Object(d.useCallback)(function(){var $t,De,Qt,Vt,Dt,jt,Kt,Ar=(le==null||(($t=le.exerciseExportHeadData)===null||$t===void 0||((De=$t.exercise_header)===null||De===void 0))?void 0:De.export_page_num)||40,zt=At==null||((Qt=At.exercise_question_types)===null||Qt===void 0||((Vt=Qt.map(function(rr,Ut){return[Object(i.a)(Object(i.a)({},rr),{},{items:null,category:1,key:Ut})].concat(Object(F.a)(rr.items))}))===null||Vt===void 0))?void 0:Vt.flat(),sr=0;return zt!=null&&zt.length?(Dt=new Array(Math.ceil((zt==null?void 0:zt.length)/Ar)))===null||Dt===void 0||((jt=Dt.fill([]))===null||jt===void 0||((Kt=jt.map(function(rr,Ut){return zt.slice(Ut*Ar,Ut*Ar+Ar)}))===null||Kt===void 0))?void 0:Kt.map(function(rr,Ut){return n.a.createElement("div",{className:"pl60 pr30",style:{minHeight:Ut===0?1e3:"auto"}},Ut===0&&n.a.createElement(n.a.Fragment,null,n.a.createElement(de.a,{isExportBlank:Ot.current}),n.a.createElement(X.a,{className:M.a.divider})),rr==null?void 0:rr.map(function(Wt,Ft){return Wt.question_title&&++sr,Tr(Wt,sr)}))}):null},[At==null?void 0:At.exercise_question_types,Qr]);return n.a.createElement("section",{className:"edu-container"},n.a.createElement("section",{className:"animated fadeIn"},n.a.createElement("aside",{className:"mt10"},st&&n.a.createElement(V.a,{separator:">"},n.a.createElement(V.a.Item,null,n.a.createElement(c.a,{to:"/classrooms/".concat(ut.coursesId,"/exercise")},st==null||((Le=st.course)===null||Le===void 0)?void 0:Le.course_name)),n.a.createElement(V.a.Item,null,n.a.createElement(c.a,{to:"/classrooms/".concat(ut.coursesId,"/exercise")},"\u8BD5\u5377\u5217\u8868")),n.a.createElement(V.a.Item,null,n.a.createElement(c.a,{to:"/classrooms/".concat(ut.coursesId,"/exercise/").concat(At==null||((Fe=At.exercise)===null||Fe===void 0)?void 0:Fe.id,"/detail")},"\u8BD5\u5377\u8BE6\u60C5")),n.a.createElement(V.a.Item,null,(At==null||((we=At.exercise_answer_user)===null||we===void 0)?void 0:we.user_name)||(At==null||((ue=At.exercise)===null||ue===void 0)?void 0:ue.exercise_name)))),n.a.createElement("aside",{className:[M.a.title,"mt20"].join(" ")},n.a.createElement(m.a,{style:{width:"100%"}},n.a.createElement(u.a,{flex:"1",style:{lineHeight:"24px"}},n.a.createElement(c.a,{to:"/classrooms/".concat(ut.coursesId,"/exercise/").concat(At==null||((ce=At.exercise)===null||ce===void 0)?void 0:ce.id,"/detail")},n.a.createElement(L.a,{className:"font16 c-black"})),Object(U.A)((te=At.exercise)===null||te===void 0?void 0:te.exercise_status),n.a.createElement("strong",{className:"font20 ml5"},At==null||((ie=At.exercise)===null||ie===void 0)?void 0:ie.exercise_name)),n.a.createElement(u.a,null,n.a.createElement(G.a,{type:"primary",onClick:function(){Te(!0),setTimeout(function(){ur("")},500)}},n.a.createElement(N.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"),n.a.createElement(G.a,{type:"primary",className:"ml10",onClick:function(){return ur("")},loading:wt},n.a.createElement(N.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"),Object(Ce.c)()&&n.a.createElement(G.a,{disabled:wt,className:"ml10",type:"primary",onClick:function(){ot(!0)}},n.a.createElement(N.a,null),"\u5BFC\u51FA\u6240\u6709\u5B66\u751F\u8BD5\u5377"))))),n.a.createElement(o.a,{title:"\u5BFC\u51FA\u8BD5\u5377\u9009\u62E9",visible:it,footer:n.a.createElement("div",null,n.a.createElement(G.a,{type:"primary",onClick:function(){K(!0),p(!0),ot(!1),ur("all")}},"\u662F"),n.a.createElement(G.a,{onClick:function(){p(!0),ot(!1),ur("all")}},"\u5426")),onCancel:function(){return ot(!1)}},"\u662F\u5426\u8FDE\u540C\u8BC4\u9605\u6559\u5E08\u3001\u6559\u5E08\u8BC4\u8BED\u4E00\u8D77\u5BFC\u51FA\uFF1F"),n.a.createElement("section",{id:"export-all",className:[M.a.bg,"pt30","pb30","mt20","mb20","relative"].join(" "),ref:Jt},mr()))},Ue=_e.default=Object(b.a)(function(Ke){var We=Ke.exercise,Le=Ke.loading,Fe=Ke.user,we=Ke.globalSetting;return{exercise:We,globalSetting:we,user:Fe,loading:Le.effects}})(xe)},n6Qo:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return P});var se=j("q1tI"),G=j("biw7"),D=j("fyJ8");function V(e){var R=e.className,m=e.index,v=e.children,u=e.colSpan,s=e.rowSpan,a=se.useContext(G.a),A=a.prefixCls,o=a.fixedInfoList,i=o[m];return se.createElement(D.a,Object.assign({className:R,index:m,component:"td",prefixCls:A,record:null,dataIndex:null,render:function(){return{children:v,props:{colSpan:u,rowSpan:s}}}},i))}function F(e){return se.createElement("tr",Object.assign({},e))}function O(e){var R=e.children,m=se.useContext(G.a),v=m.prefixCls;return se.createElement("tfoot",{className:"".concat(v,"-summary")},R)}var X=_e.b=O,P={Cell:V,Row:F}},nEHx:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return se});var se;(function(G){G.DARK="dark",G.LIGHT="light",G.HIGH_CONTRAST="hc"})(se||(se={}))},nnTU:function(ht,_e,j){"use strict";j.d(_e,"b",function(){return X}),j.d(_e,"a",function(){return P});var se=j("MI8n"),G=j("JYp7"),D=j("pmY6"),V=j("24hK"),F=j("746U"),O=j("Cg/j");const X=Object(O.c)("commandService"),P=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new se.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,R){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!R)throw new Error("invalid command");return this.registerCommand({id:e,handler:R})}if(e.description){const a=[];for(let o of e.description.args)a.push(o.constraint);const A=e.handler;e.handler=function(o,...i){return Object(F.o)(i,a),A(o,...i)}}const{id:m}=e;let v=this._commands.get(m);v||(v=new V.a,this._commands.set(m,v));let u=v.unshift(e),s=Object(D.i)(()=>{u();const a=this._commands.get(m);(a==null?void 0:a.isEmpty())&&this._commands.delete(m)});return this._onDidRegisterCommand.fire(m),s}registerCommandAlias(e,R){return P.registerCommand(e,(m,...v)=>m.get(X).executeCommand(R,...v))}getCommand(e){const R=this._commands.get(e);return!R||R.isEmpty()?void 0:G.a.first(R)}getCommands(){const e=new Map;for(const R of this._commands.keys()){const m=this.getCommand(R);m&&e.set(R,m)}return e}};P.registerCommand("noop",()=>{})},p5ED:function(ht,_e,j){"use strict";var se=j("+L6B"),G=j("2/Rp"),D=j("5Dmo"),V=j("3S7+"),F=j("k1fw"),O=j("9og8"),X=j("tJVT"),P=j("WmNS"),e=j.n(P),R=j("q1tI"),m=j.n(R),v=j("vHTk"),u=j.n(v),s=j("yEEn"),a=j("ZW9T"),A=j("1vsH"),o=j("V0Rq"),i=j("m3rI");_e.a=function(r){var t,E,_,y,B,C,d,n=r.editOffice,l=n===void 0?"view":n,c=r.data,b=r.theme,g=r.type,h=r.filename,L=r.monacoEditor,N=r.className,T=r.style,M=r.close,W=r.onClose,U=r.hasMask,Y=r.disabledDownload,ne=Object(R.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),me=Object(X.a)(ne,2),ge=me[0],Oe=me[1],Se=Object(R.useState)(""),Be=Object(X.a)(Se,2),Ne=Be[0],ke=Be[1],Ce=Object(R.useState)(),ve=Object(X.a)(Ce,2),Xe=ve[0],lt=ve[1],at=window.ENV==="build"?"/react/build":"",je=i.a.PROXY_SERVER||location.origin,rt,re=1024*1024,J=10*re,k=Object(R.useRef)();(t=c)!==null&&t!==void 0&&t.startsWith("/api")&&g!=="txt"&&(c=i.a.API_SERVER+c),g==="office"&&(rt=Object(A.T)(c).filesize,rt>J&&(g="other")),h&&L&&(L.filename=h),Object(R.useEffect)(function(){var de,Qe,ze=(de=document.cookie)===null||de===void 0||((Qe=de.replace(/\s/g,""))===null||Qe===void 0)?void 0:Qe.split(";");ze==null||ze.map(function(Ge){var $e=Ge.split("=");$e[0]==="_educoder_session"&&ke($e[1])})},[]),Object(R.useEffect)(function(){g==="office"&&$()},[g,c]);var $=function(){var de=Object(O.a)(e.a.mark(function Qe(){var ze,Ge,$e;return e.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return console.log("data:",c),ze=c,c.startsWith("http")||(ze=location.origin+ze),Ge=new URL(ze).pathname.split("/").pop(),dt.next=6,Object(o.W)({attachment_id:Ge});case 6:$e=dt.sent,lt($e);case 8:case"end":return dt.stop()}},Qe)}));return function(){return de.apply(this,arguments)}}(),q=function(){if(c.startsWith("http")||c.startsWith("blob:")){he();return}Object(A.z)(h||"educoder",c,h)},he=function(){Object(A.x)(h||"educoder",decodeURIComponent(c))};return m.a.createElement("div",{style:Object(F.a)({},T||{}),className:"".concat(U&&u.a.bgBlack," ").concat(g?u.a.wrp:"hide")},M&&m.a.createElement("div",{className:u.a.close,ref:k},!Y&&m.a.createElement(V.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return k.current}},m.a.createElement("span",{onClick:he},m.a.createElement("i",{className:"icon-quxiaozhiding"}))),m.a.createElement(V.a,{title:"\u5173\u95ED",getPopupContainer:function(){return k.current}},m.a.createElement("span",{className:"",onClick:W},m.a.createElement("i",{className:"icon-guanbi1"})))),m.a.createElement("div",{className:"".concat(u.a[N]," ").concat(N," ").concat(u.a.monaco," ").concat(g==="txt"?"show":"hide")},g==="txt"&&m.a.createElement(a.b,L)),g==="audio"&&m.a.createElement("audio",{src:"".concat(((E=c)===null||E===void 0?void 0:E.indexOf("http://"))>-1||((_=c)===null||_===void 0?void 0:_.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(c),autoPlay:!0}),g==="video"&&m.a.createElement(m.a.Fragment,null,((y=c)===null||y===void 0?void 0:y.indexOf("http"))>-1?m.a.createElement("video",{controls:!0,src:"".concat(c),autoPlay:!0}):m.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(c),autoPlay:!0})),g==="office"&&Xe&&m.a.createElement("iframe",{src:"".concat(at,"/office.html?key=").concat(Xe.key,"&url=").concat(je+Xe.url,"&callbackUrl=").concat(je+Xe.callbackUrl,"&fileType=").concat(Xe.fileType,"&title=").concat(Xe.title,"&model=").concat(l,"&officeServer=").concat(i.a.OFFICE_SERVER,"&disabledDownload=").concat(!!Y)}),g==="html"&&m.a.createElement("iframe",{src:c+"&disposition=inline"}),g==="pdf"&&m.a.createElement("iframe",{src:"".concat(at,"/js/pdfview/index.html?url=").concat(c,"&disabledDownload=").concat(!!Y)}),g==="image"&&m.a.createElement("img",{src:"".concat(((B=c)===null||B===void 0?void 0:B.indexOf("http://"))>-1||((C=c)===null||C===void 0?void 0:C.indexOf("https://"))>-1||(d=c)!==null&&d!==void 0&&d.startsWith("/api")?"":"data:image/png;base64,").concat(c)}),g==="other"&&m.a.createElement("div",null,m.a.createElement(G.a,{type:"primary",size:"large",onClick:q},m.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),g==="download"&&m.a.createElement(G.a,{type:"primary",size:"large",onClick:q},m.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pmY6:function(ht,_e,j){"use strict";j.d(_e,"h",function(){return R}),j.d(_e,"g",function(){return v}),j.d(_e,"f",function(){return u}),j.d(_e,"e",function(){return s}),j.d(_e,"i",function(){return a}),j.d(_e,"b",function(){return A}),j.d(_e,"a",function(){return o}),j.d(_e,"d",function(){return i}),j.d(_e,"c",function(){return r});var se=j("C/vA"),G=j("JYp7");const D=!1;let V=null;function F(t){V=t}if(D){const t="__is_disposable_tracked__";F(new class{trackDisposable(E){const _=new Error("Potentially leaked disposable").stack;setTimeout(()=>{E[t]||console.log(_)},3e3)}setParent(E,_){if(E&&E!==o.None)try{E[t]=!0}catch(y){}}markAsDisposed(E){if(E&&E!==o.None)try{E[t]=!0}catch(_){}}markAsSingleton(E){}})}function O(t){return V==null||V.trackDisposable(t),t}function X(t){V==null||V.markAsDisposed(t)}function P(t,E){V==null||V.setParent(t,E)}function e(t,E){if(!V)return;for(const _ of t)V.setParent(_,E)}function R(t){return V==null||V.markAsSingleton(t),t}class m extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function v(t){return typeof t.dispose=="function"&&t.dispose.length===0}function u(t){if(G.a.is(t)){let E=[];for(const _ of t)if(_)try{_.dispose()}catch(y){E.push(y)}if(E.length===1)throw E[0];if(E.length>1)throw new m(E);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function s(...t){const E=a(()=>u(t));return e(t,E),E}function a(t){const E=O({dispose:Object(se.a)(()=>{X(E),t()})});return E}class A{constructor(){this._toDispose=new Set,this._isDisposed=!1,O(this)}dispose(){if(this._isDisposed)return;X(this),this._isDisposed=!0,this.clear()}clear(){try{u(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return P(t,this),this._isDisposed?A.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(t),t}}A.DISABLE_DISPOSED_WARNING=!1;class o{constructor(){this._store=new A,O(this),P(this._store,this)}dispose(){X(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}o.None=Object.freeze({dispose(){}});class i{constructor(){this._isDisposed=!1,O(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var E;if(this._isDisposed||t===this._value)return;(E=this._value)===null||E===void 0||E.dispose(),t&&P(t,this),this._value=t}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,X(this),(t=this._value)===null||t===void 0||t.dispose(),this._value=void 0}clearAndLeak(){const t=this._value;return this._value=void 0,t&&P(t,null),t}}class r{constructor(t){this.object=t}dispose(){}}},psGv:function(ht,_e,j){var se,G;(function(){var D;(function(){"use strict";var X=[,,function(m){function v(a){this.__parent=a,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=[]}v.prototype.clone_empty=function(){var a=new v(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},v.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},v.prototype.has_match=function(a){for(var A=this.__items.length-1;A>=0;A--)if(this.__items[A].match(a))return!0;return!1},v.prototype.set_indent=function(a,A){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=A||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},v.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)},v.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},v.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},v.prototype.is_empty=function(){return this.__items.length===0},v.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},v.prototype.push=function(a){this.__items.push(a);var A=a.lastIndexOf(`
|
|
`);A!==-1?this.__character_count=a.length-A:this.__character_count+=a.length},v.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},v.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},v.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},v.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},v.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function u(a,A){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),A=A||"",a.indent_level>0&&(A=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=A,this.__base_string_length=A.length}u.prototype.get_indent_size=function(a,A){var o=this.__base_string_length;return A=A||0,a<0&&(o=0),o+=a*this.__indent_size,o+=A,o},u.prototype.get_indent_string=function(a,A){var o=this.__base_string;return A=A||0,a<0&&(a=0,o=""),A+=a*this.__indent_size,this.__ensure_cache(A),o+=this.__cache[A],o},u.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},u.prototype.__add_column=function(){var a=this.__cache.length,A=0,o="";this.__indent_size&&a>=this.__indent_size&&(A=Math.floor(a/this.__indent_size),a-=A*this.__indent_size,o=new Array(A+1).join(this.__indent_string)),a&&(o+=new Array(a+1).join(" ")),this.__cache.push(o)};function s(a,A){this.__indent_cache=new u(a,A),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new v(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(a,A){return this.__indent_cache.get_indent_string(a,A)},s.prototype.get_indent_size=function(a,A){return this.__indent_cache.get_indent_size(a,A)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(a){this.trim(!0);var A=this.current_line.pop();A&&(A[A.length-1]===`
|
|
`&&(A=A.replace(/\n+$/g,"")),this.current_line.push(A)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
|
|
`);return a!==`
|
|
`&&(o=o.replace(/[\n]/g,a)),o},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(a,A){return a=a||0,A=A||0,this.next_line.set_indent(a,A),this.__lines.length>1?(this.current_line.set_indent(a,A),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(a){for(var A=0;A<a.newlines;A++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.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(" "))},s.prototype.remove_indent=function(a){for(var A=this.__lines.length;a<A;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&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},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(a,A){for(var o=this.__lines.length-2;o>=0;){var i=this.__lines[o];if(i.is_empty())break;if(i.item(0).indexOf(a)!==0&&i.item(-1)!==A){this.__lines.splice(o+1,0,new v(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},m.exports.Output=s},function(m){function v(u,s,a,A){this.type=u,this.text=s,this.comments_before=null,this.newlines=a||0,this.whitespace_before=A||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}m.exports.Token=v},,,function(m){function v(a,A){this.raw_options=u(a,A),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"])}v.prototype._get_array=function(a,A){var o=this.raw_options[a],i=A||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(i=o.concat()):typeof o=="string"&&(i=o.split(/[^a-zA-Z0-9_\/\-]+/)),i},v.prototype._get_boolean=function(a,A){var o=this.raw_options[a],i=o===void 0?!!A:!!o;return i},v.prototype._get_characters=function(a,A){var o=this.raw_options[a],i=A||"";return typeof o=="string"&&(i=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),i},v.prototype._get_number=function(a,A){var o=this.raw_options[a];A=parseInt(A,10),isNaN(A)&&(A=0);var i=parseInt(o,10);return isNaN(i)&&(i=A),i},v.prototype._get_selection=function(a,A,o){var i=this._get_selection_list(a,A,o);if(i.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values:
|
|
`+A+`
|
|
You passed in: '`+this.raw_options[a]+"'");return i[0]},v.prototype._get_selection_list=function(a,A,o){if(!A||A.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[A[0]],!this._is_valid_selection(o,A))throw new Error("Invalid Default Value!");var i=this._get_array(a,o);if(!this._is_valid_selection(i,A))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values:
|
|
`+A+`
|
|
You passed in: '`+this.raw_options[a]+"'");return i},v.prototype._is_valid_selection=function(a,A){return a.length&&A.length&&!a.some(function(o){return A.indexOf(o)===-1})};function u(a,A){var o={};a=s(a);var i;for(i in a)i!==A&&(o[i]=a[i]);if(A&&a[A])for(i in a[A])o[i]=a[A][i];return o}function s(a){var A={},o;for(o in a){var i=o.replace(/-/g,"_");A[i]=a[o]}return A}m.exports.Options=v,m.exports.normalizeOpts=s,m.exports.mergeOpts=u},,function(m){var v=RegExp.prototype.hasOwnProperty("sticky");function u(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}u.prototype.restart=function(){this.__position=0},u.prototype.back=function(){this.__position>0&&(this.__position-=1)},u.prototype.hasNext=function(){return this.__position<this.__input_length},u.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},u.prototype.peek=function(s){var a=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(a=this.__input.charAt(s)),a},u.prototype.__match=function(s,a){s.lastIndex=a;var A=s.exec(this.__input);return A&&!(v&&s.sticky)&&(A.index!==a&&(A=null)),A},u.prototype.test=function(s,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(s,a):!1},u.prototype.testChar=function(s,a){var A=this.peek(a);return s.lastIndex=0,A!==null&&s.test(A)},u.prototype.match=function(s){var a=this.__match(s,this.__position);return a?this.__position+=a[0].length:a=null,a},u.prototype.read=function(s,a,A){var o="",i;return s&&(i=this.match(s),i&&(o+=i[0])),a&&(i||!s)&&(o+=this.readUntil(a,A)),o},u.prototype.readUntil=function(s,a){var A="",o=this.__position;s.lastIndex=this.__position;var i=s.exec(this.__input);return i?(o=i.index,a&&(o+=i[0].length)):o=this.__input_length,A=this.__input.substring(this.__position,o),this.__position=o,A},u.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},u.prototype.get_regexp=function(s,a){var A=null,o="g";return a&&v&&(o="y"),typeof s=="string"&&s!==""?A=new RegExp(s,o):s&&(A=new RegExp(s.source,o)),A},u.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},u.prototype.peekUntilAfter=function(s){var a=this.__position,A=this.readUntilAfter(s);return this.__position=a,A},u.prototype.lookBack=function(s){var a=this.__position-1;return a>=s.length&&this.__input.substring(a-s.length,a).toLowerCase()===s},m.exports.InputScanner=u},function(m,v,u){var s=u(8).InputScanner,a=u(3).Token,A=u(10).TokenStream,o=u(11).WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(t,E){this._input=new s(t),this._options=E||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new A,this._reset();for(var t,E=new a(i.START,""),_=null,y=[],B=new A;E.type!==i.EOF;){for(t=this._get_next_token(E,_);this._is_comment(t);)B.add(t),t=this._get_next_token(E,_);B.isEmpty()||(t.comments_before=B,B=new A),t.parent=_,this._is_opening(t)?(y.push(_),_=t):_&&this._is_closing(t,_)&&(t.opened=_,_.closed=t,_=y.pop(),t.parent=_),t.previous=E,E.next=t,this.__tokens.add(t),E=t}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(t,E){this._readWhitespace();var _=this._input.read(/.+/g);return _?this._create_token(i.RAW,_):this._create_token(i.EOF,"")},r.prototype._is_comment=function(t){return!1},r.prototype._is_opening=function(t){return!1},r.prototype._is_closing=function(t,E){return!1},r.prototype._create_token=function(t,E){var _=new a(t,E,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return _},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},m.exports.Tokenizer=r,m.exports.TOKEN=i},function(m){function v(u){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=u}v.prototype.restart=function(){this.__position=0},v.prototype.isEmpty=function(){return this.__tokens_length===0},v.prototype.hasNext=function(){return this.__position<this.__tokens_length},v.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__tokens[this.__position],this.__position+=1),u},v.prototype.peek=function(u){var s=null;return u=u||0,u+=this.__position,u>=0&&u<this.__tokens_length&&(s=this.__tokens[u]),s},v.prototype.add=function(u){this.__parent_token&&(u.parent=this.__parent_token),this.__tokens.push(u),this.__tokens_length+=1},m.exports.TokenStream=v},function(m,v,u){var s=u(12).Pattern;function a(A,o){s.call(this,A,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}a.prototype=new s,a.prototype.__set_whitespace_patterns=function(A,o){A+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+A+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},a.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var A=this._input.read(this._match_pattern);if(A===" ")this.whitespace_before_token=" ";else if(A){var o=this.__split(this._newline_regexp,A);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return A},a.prototype.matching=function(A,o){var i=this._create();return i.__set_whitespace_patterns(A,o),i._update(),i},a.prototype._create=function(){return new a(this._input,this)},a.prototype.__split=function(A,o){A.lastIndex=0;for(var i=0,r=[],t=A.exec(o);t;)r.push(o.substring(i,t.index)),i=t.index+t[0].length,t=A.exec(o);return i<o.length?r.push(o.substring(i,o.length)):r.push(""),r},m.exports.WhitespacePattern=a},function(m){function v(u,s){this._input=u,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,s&&(this._starting_pattern=this._input.get_regexp(s._starting_pattern,!0),this._match_pattern=this._input.get_regexp(s._match_pattern,!0),this._until_pattern=this._input.get_regexp(s._until_pattern),this._until_after=s._until_after)}v.prototype.read=function(){var u=this._input.read(this._starting_pattern);return(!this._starting_pattern||u)&&(u+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),u},v.prototype.read_match=function(){return this._input.match(this._match_pattern)},v.prototype.until_after=function(u){var s=this._create();return s._until_after=!0,s._until_pattern=this._input.get_regexp(u),s._update(),s},v.prototype.until=function(u){var s=this._create();return s._until_after=!1,s._until_pattern=this._input.get_regexp(u),s._update(),s},v.prototype.starting_with=function(u){var s=this._create();return s._starting_pattern=this._input.get_regexp(u,!0),s._update(),s},v.prototype.matching=function(u){var s=this._create();return s._match_pattern=this._input.get_regexp(u,!0),s._update(),s},v.prototype._create=function(){return new v(this._input,this)},v.prototype._update=function(){},m.exports.Pattern=v},function(m){function v(u,s){u=typeof u=="string"?u:u.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(u+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(u+/\sbeautify\signore:end\s/.source+s,"g")}v.prototype.get_directives=function(u){if(!u.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(u);a;)s[a[1]]=a[2],a=this.__directive_pattern.exec(u);return s},v.prototype.readIgnored=function(u){return u.readUntilAfter(this.__directives_end_ignore_pattern)},m.exports.Directives=v},function(m,v,u){var s=u(12).Pattern,a={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function A(o,i){s.call(this,o,i),this.__template_pattern=null,this._disabled=Object.assign({},a),this._excluded=Object.assign({},a),i&&(this.__template_pattern=this._input.get_regexp(i.__template_pattern),this._excluded=Object.assign(this._excluded,i._excluded),this._disabled=Object.assign(this._disabled,i._disabled));var r=new s(o);this.__patterns={handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:r.starting_with(/{{{/).until_after(/}}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),php:r.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:r.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:r.starting_with(/{%/).until_after(/%}/),django_value:r.starting_with(/{{/).until_after(/}}/),django_comment:r.starting_with(/{#/).until_after(/#}/),smarty:r.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:r.starting_with(/{\*/).until_after(/\*}/),smarty_literal:r.starting_with(/{literal}/).until_after(/{\/literal}/)}}A.prototype=new s,A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){this.__set_templated_pattern()},A.prototype.disable=function(o){var i=this._create();return i._disabled[o]=!0,i._update(),i},A.prototype.read_options=function(o){var i=this._create();for(var r in a)i._disabled[r]=o.templating.indexOf(r)===-1;return i._update(),i},A.prototype.exclude=function(o){var i=this._create();return i._excluded[o]=!0,i._update(),i},A.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var i=this._read_template();i;)this._match_pattern?i+=this._input.read(this._match_pattern):i+=this._input.readUntil(this.__template_pattern),o+=i,i=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},A.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},A.prototype._read_template=function(){var o="",i=this._input.peek();if(i==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(o=o||this.__patterns.erb.read())}else i==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},m.exports.TemplatablePattern=A},,,,function(m,v,u){var s=u(19).Beautifier,a=u(20).Options;function A(o,i,r,t){var E=new s(o,i,r,t);return E.beautify()}m.exports=A,m.exports.defaultOptions=function(){return new a}},function(m,v,u){var s=u(20).Options,a=u(2).Output,A=u(21).Tokenizer,o=u(21).TOKEN,i=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,t=function(b,g){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=b.max_preserve_newlines,this.preserve_newlines=b.preserve_newlines,this._output=new a(b,g)};t.prototype.current_line_has_match=function(b){return this._output.current_line.has_match(b)},t.prototype.set_space_before_token=function(b,g){this._output.space_before_token=b,this._output.non_breaking_space=g},t.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},t.prototype.add_raw_token=function(b){this._output.add_raw_token(b)},t.prototype.print_preserved_newlines=function(b){var g=0;b.type!==o.TEXT&&b.previous.type!==o.TEXT&&(g=b.newlines?1:0),this.preserve_newlines&&(g=b.newlines<this.max_preserve_newlines+1?b.newlines:this.max_preserve_newlines+1);for(var h=0;h<g;h++)this.print_newline(h>0);return g!==0},t.prototype.traverse_whitespace=function(b){return b.whitespace_before||b.newlines?(this.print_preserved_newlines(b)||(this._output.space_before_token=!0),!0):!1},t.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},t.prototype.print_newline=function(b){this._output.add_new_line(b)},t.prototype.print_token=function(b){b.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(b.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(b){return b=this.indent_level+(b||0),b<1?"":this._output.get_indent_string(b)};var E=function(b){for(var g=null,h=b.next;h.type!==o.EOF&&b.closed!==h;){if(h.type===o.ATTRIBUTE&&h.text==="type"){h.next&&h.next.type===o.EQUALS&&h.next.next&&h.next.next.type===o.VALUE&&(g=h.next.next.text);break}h=h.next}return g},_=function(b,g){var h=null,L=null;return g.closed?(b==="script"?h="text/javascript":b==="style"&&(h="text/css"),h=E(g)||h,h.search("text/css")>-1?L="css":h.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?L="javascript":h.search(/(text|application|dojo)\/(x-)?(html)/)>-1?L="html":h.search(/test\/null/)>-1&&(L="null"),L):null};function y(b,g){return g.indexOf(b)!==-1}function B(b,g,h){this.parent=b||null,this.tag=g?g.tag_name:"",this.indent_level=h||0,this.parser_token=g||null}function C(b){this._printer=b,this._current_frame=null}C.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},C.prototype.record_tag=function(b){var g=new B(this._current_frame,b,this._printer.indent_level);this._current_frame=g},C.prototype._try_pop_frame=function(b){var g=null;return b&&(g=b.parser_token,this._printer.indent_level=b.indent_level,this._current_frame=b.parent),g},C.prototype._get_frame=function(b,g){for(var h=this._current_frame;h&&!(b.indexOf(h.tag)!==-1);){if(g&&g.indexOf(h.tag)!==-1){h=null;break}h=h.parent}return h},C.prototype.try_pop=function(b,g){var h=this._get_frame([b],g);return this._try_pop_frame(h)},C.prototype.indent_to_tag=function(b){var g=this._get_frame(b);g&&(this._printer.indent_level=g.indent_level)};function d(b,g,h,L){this._source_text=b||"",g=g||{},this._js_beautify=h,this._css_beautify=L,this._tag_stack=null;var N=new s(g,"html");this._options=N,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="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,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var b=this._source_text,g=this._options.eol;this._options.eol==="auto"&&(g=`
|
|
`,b&&i.test(b)&&(g=b.match(i)[0])),b=b.replace(r,`
|
|
`);var h=b.match(/^[\t ]*/)[0],L={text:"",type:""},N=new n,T=new t(this._options,h),M=new A(b,this._options).tokenize();this._tag_stack=new C(T);for(var W=null,U=M.next();U.type!==o.EOF;)U.type===o.TAG_OPEN||U.type===o.COMMENT?(W=this._handle_tag_open(T,U,N,L),N=W):U.type===o.ATTRIBUTE||U.type===o.EQUALS||U.type===o.VALUE||U.type===o.TEXT&&!N.tag_complete?W=this._handle_inside_tag(T,U,N,M):U.type===o.TAG_CLOSE?W=this._handle_tag_close(T,U,N):U.type===o.TEXT?W=this._handle_text(T,U,N):T.add_raw_token(U),L=W,U=M.next();var Y=T._output.get_code(g);return Y},d.prototype._handle_tag_close=function(b,g,h){var L={text:g.text,type:g.type};return b.alignment_size=0,h.tag_complete=!0,b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),h.is_unformatted?b.add_raw_token(g):(h.tag_start_char==="<"&&(b.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&h.has_wrapped_attrs&&b.print_newline(!1)),b.print_token(g)),h.indent_content&&!(h.is_unformatted||h.is_content_unformatted)&&(b.indent(),h.indent_content=!1),!h.is_inline_element&&!(h.is_unformatted||h.is_content_unformatted)&&b.set_wrap_point(),L},d.prototype._handle_inside_tag=function(b,g,h,L){var N=h.has_wrapped_attrs,T={text:g.text,type:g.type};if(b.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),h.is_unformatted)b.add_raw_token(g);else if(h.tag_start_char==="{"&&g.type===o.TEXT)b.print_preserved_newlines(g)?(g.newlines=0,b.add_raw_token(g)):b.print_token(g);else{if(g.type===o.ATTRIBUTE?(b.set_space_before_token(!0),h.attr_count+=1):(g.type===o.EQUALS||g.type===o.VALUE&&g.previous.type===o.EQUALS)&&b.set_space_before_token(!1),g.type===o.ATTRIBUTE&&h.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(b.traverse_whitespace(g),N=N||g.newlines!==0),this._is_wrap_attributes_force)){var M=h.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&h.attr_count===1){var W=!0,U=0,Y;do{if(Y=L.peek(U),Y.type===o.ATTRIBUTE){W=!1;break}U+=1}while(U<4&&Y.type!==o.EOF&&Y.type!==o.TAG_CLOSE);M=!W}M&&(b.print_newline(!1),N=!0)}b.print_token(g),N=N||b.previous_token_wrapped(),h.has_wrapped_attrs=N}return T},d.prototype._handle_text=function(b,g,h){var L={text:g.text,type:"TK_CONTENT"};return h.custom_beautifier_name?this._print_custom_beatifier_text(b,g,h):h.is_unformatted||h.is_content_unformatted?b.add_raw_token(g):(b.traverse_whitespace(g),b.print_token(g)),L},d.prototype._print_custom_beatifier_text=function(b,g,h){var L=this;if(g.text!==""){var N=g.text,T,M=1,W="",U="";h.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?T=this._js_beautify:h.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?T=this._css_beautify:h.custom_beautifier_name==="html"&&(T=function(Se,Be){var Ne=new d(Se,Be,L._js_beautify,L._css_beautify);return Ne.beautify()}),this._options.indent_scripts==="keep"?M=0:this._options.indent_scripts==="separate"&&(M=-b.indent_level);var Y=b.get_full_indent(M);if(N=N.replace(/\n[ \t]*$/,""),h.custom_beautifier_name!=="html"&&N[0]==="<"&&N.match(/^(<!--|<!\[CDATA\[)/)){var ne=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(N);if(!ne){b.add_raw_token(g);return}W=Y+ne[1]+`
|
|
`,N=ne[4],ne[5]&&(U=Y+ne[5]),N=N.replace(/\n[ \t]*$/,""),(ne[2]||ne[3].indexOf(`
|
|
`)!==-1)&&(ne=ne[3].match(/[ \t]+$/),ne&&(g.whitespace_before=ne[0]))}if(N)if(T){var me=function(){this.eol=`
|
|
`};me.prototype=this._options.raw_options;var ge=new me;N=T(Y+N,ge)}else{var Oe=g.whitespace_before;Oe&&(N=N.replace(new RegExp(`
|
|
(`+Oe+")?","g"),`
|
|
`)),N=Y+N.replace(/\n/g,`
|
|
`+Y)}W&&(N?N=W+N+`
|
|
`+U:N=W+U),b.print_newline(!1),N&&(g.text=N,g.whitespace_before="",g.newlines=0,b.add_raw_token(g),b.print_newline(!0))}},d.prototype._handle_tag_open=function(b,g,h,L){var N=this._get_tag_open_token(g);return(h.is_unformatted||h.is_content_unformatted)&&!h.is_empty_element&&g.type===o.TAG_OPEN&&g.text.indexOf("</")===0?(b.add_raw_token(g),N.start_tag_token=this._tag_stack.try_pop(N.tag_name)):(b.traverse_whitespace(g),this._set_tag_position(b,g,N,h,L),N.is_inline_element||b.set_wrap_point(),b.print_token(g)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(N.alignment_size=g.text.length+1),!N.tag_complete&&!N.is_unformatted&&(b.alignment_size=N.alignment_size),N};var n=function(b,g){if(this.parent=b||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="",!g)this.tag_complete=!0;else{var h;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(h=g.text.match(/^<([^\s>]*)/),this.tag_check=h?h[1]:""):(h=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=h?h[1]:"",(g.text.startsWith("{{#>")||g.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&g.next!==null?this.tag_check=g.next.text.split(" ")[0]:this.tag_check=g.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),g.type===o.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||g.closed&&g.closed.text==="/>";var L=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(L=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(L)))}};d.prototype._get_tag_open_token=function(b){var g=new n(this._tag_stack.get_parser_token(),b);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||y(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&y(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&y(g.tag_check,this._options.content_unformatted),g.is_inline_element=y(g.tag_name,this._options.inline)||g.tag_name.includes("-")||g.tag_start_char==="{",g},d.prototype._set_tag_position=function(b,g,h,L,N){if(h.is_empty_element||(h.is_end_tag?h.start_tag_token=this._tag_stack.try_pop(h.tag_name):(this._do_optional_end_element(h)&&(h.is_inline_element||b.print_newline(!1)),this._tag_stack.record_tag(h),(h.tag_name==="script"||h.tag_name==="style")&&!(h.is_unformatted||h.is_content_unformatted)&&(h.custom_beautifier_name=_(h.tag_check,g)))),y(h.tag_check,this._options.extra_liners)&&(b.print_newline(!1),b._output.just_added_blankline()||b.print_newline(!0)),h.is_empty_element){if(h.tag_start_char==="{"&&h.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),h.indent_content=!0;var T=b.current_line_has_match(/{{#if/);T||b.print_newline(!1)}h.tag_name==="!--"&&N.type===o.TAG_CLOSE&&L.is_end_tag&&h.text.indexOf(`
|
|
`)===-1||(h.is_inline_element||h.is_unformatted||b.print_newline(!1),this._calcluate_parent_multiline(b,h))}else if(h.is_end_tag){var M=!1;M=h.start_tag_token&&h.start_tag_token.multiline_content,M=M||!h.is_inline_element&&!(L.is_inline_element||L.is_unformatted)&&!(N.type===o.TAG_CLOSE&&h.start_tag_token===L)&&N.type!=="TK_CONTENT",(h.is_content_unformatted||h.is_unformatted)&&(M=!1),M&&b.print_newline(!1)}else h.indent_content=!h.custom_beautifier_name,h.tag_start_char==="<"&&(h.tag_name==="html"?h.indent_content=this._options.indent_inner_html:h.tag_name==="head"?h.indent_content=this._options.indent_head_inner_html:h.tag_name==="body"&&(h.indent_content=this._options.indent_body_inner_html)),!(h.is_inline_element||h.is_unformatted)&&(N.type!=="TK_CONTENT"||h.is_content_unformatted)&&b.print_newline(!1),this._calcluate_parent_multiline(b,h)},d.prototype._calcluate_parent_multiline=function(b,g){g.parent&&b._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var l=["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"],c=["a","audio","del","ins","map","noscript","video"];d.prototype._do_optional_end_element=function(b){var g=null;if(b.is_empty_element||!b.is_start_tag||!b.parent)return;if(b.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(b.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul"]);else if(b.tag_name==="dd"||b.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(b.parent.tag_name==="p"&&l.indexOf(b.tag_name)!==-1){var h=b.parent.parent;(!h||c.indexOf(h.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else b.tag_name==="rp"||b.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):b.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):b.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):b.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):b.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):b.tag_name==="tbody"||b.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):b.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(b.tag_name==="th"||b.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return b.parent=this._tag_stack.get_parser_token(),g},m.exports.Beautifier=d},function(m,v,u){var s=u(6).Options;function a(A){s.call(this,A,"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"])}a.prototype=new s,m.exports.Options=a},function(m,v,u){var s=u(9).Tokenizer,a=u(9).TOKEN,A=u(13).Directives,o=u(14).TemplatablePattern,i=u(12).Pattern,r={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:a.START,RAW:a.RAW,EOF:a.EOF},t=new A(/<\!--/,/-->/),E=function(_,y){s.call(this,_,y),this._current_tag_name="";var B=new o(this._input).read_options(this._options),C=new i(this._input);if(this.__patterns={word:B.until(/[\n\r\t <]/),single_quote:B.until_after(/'/),double_quote:B.until_after(/"/),attribute:B.until(/[\n\r\t =>]|\/>/),element_name:B.until(/[\n\r\t >\/]/),handlebars_comment:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(/<!--/).until_after(/-->/),cdata:C.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:C.starting_with(/<!\[/).until_after(/]>/),processing:C.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 d=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(d).until_after(d)}};E.prototype=new s,E.prototype._is_comment=function(_){return!1},E.prototype._is_opening=function(_){return _.type===r.TAG_OPEN},E.prototype._is_closing=function(_,y){return _.type===r.TAG_CLOSE&&y&&((_.text===">"||_.text==="/>")&&y.text[0]==="<"||_.text==="}}"&&y.text[0]==="{"&&y.text[1]==="{")},E.prototype._reset=function(){this._current_tag_name=""},E.prototype._get_next_token=function(_,y){var B=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(r.EOF,""):(B=B||this._read_open_handlebars(C,y),B=B||this._read_attribute(C,_,y),B=B||this._read_close(C,y),B=B||this._read_raw_content(C,_,y),B=B||this._read_content_word(C),B=B||this._read_comment_or_cdata(C),B=B||this._read_processing(C),B=B||this._read_open(C,y),B=B||this._create_token(r.UNKNOWN,this._input.next()),B)},E.prototype._read_comment_or_cdata=function(_){var y=null,B=null,C=null;if(_==="<"){var d=this._input.peek(1);d==="!"&&(B=this.__patterns.comment.read(),B?(C=t.get_directives(B),C&&C.ignore==="start"&&(B+=t.readIgnored(this._input))):B=this.__patterns.cdata.read()),B&&(y=this._create_token(r.COMMENT,B),y.directives=C)}return y},E.prototype._read_processing=function(_){var y=null,B=null,C=null;if(_==="<"){var d=this._input.peek(1);(d==="!"||d==="?")&&(B=this.__patterns.conditional_comment.read(),B=B||this.__patterns.processing.read()),B&&(y=this._create_token(r.COMMENT,B),y.directives=C)}return y},E.prototype._read_open=function(_,y){var B=null,C=null;return y||_==="<"&&(B=this._input.next(),this._input.peek()==="/"&&(B+=this._input.next()),B+=this.__patterns.element_name.read(),C=this._create_token(r.TAG_OPEN,B)),C},E.prototype._read_open_handlebars=function(_,y){var B=null,C=null;return y||this._options.indent_handlebars&&_==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(B=this.__patterns.handlebars_comment.read(),B=B||this.__patterns.handlebars.read(),C=this._create_token(r.COMMENT,B)):(B=this.__patterns.handlebars_open.read(),C=this._create_token(r.TAG_OPEN,B))),C},E.prototype._read_close=function(_,y){var B=null,C=null;return y&&(y.text[0]==="<"&&(_===">"||_==="/"&&this._input.peek(1)===">")?(B=this._input.next(),_==="/"&&(B+=this._input.next()),C=this._create_token(r.TAG_CLOSE,B)):y.text[0]==="{"&&_==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(r.TAG_CLOSE,"}}"))),C},E.prototype._read_attribute=function(_,y,B){var C=null,d="";if(B&&B.text[0]==="<")if(_==="=")C=this._create_token(r.EQUALS,this._input.next());else if(_==='"'||_==="'"){var n=this._input.next();_==='"'?n+=this.__patterns.double_quote.read():n+=this.__patterns.single_quote.read(),C=this._create_token(r.VALUE,n)}else d=this.__patterns.attribute.read(),d&&(y.type===r.EQUALS?C=this._create_token(r.VALUE,d):C=this._create_token(r.ATTRIBUTE,d));return C},E.prototype._is_content_unformatted=function(_){return this._options.void_elements.indexOf(_)===-1&&(this._options.content_unformatted.indexOf(_)!==-1||this._options.unformatted.indexOf(_)!==-1)},E.prototype._read_raw_content=function(_,y,B){var C="";if(B&&B.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(y.type===r.TAG_CLOSE&&y.opened.text[0]==="<"&&y.text[0]!=="/"){var d=y.opened.text.substr(1).toLowerCase();if(d==="script"||d==="style"){var n=this._read_comment_or_cdata(_);if(n)return n.type=r.TEXT,n;C=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(d)&&(C=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig")))}return C?this._create_token(r.TEXT,C):null},E.prototype._read_content_word=function(_){var y="";if(this._options.unformatted_content_delimiter&&(_===this._options.unformatted_content_delimiter[0]&&(y=this.__patterns.unformatted_content_delimiter.read())),y||(y=this.__patterns.word.read()),y)return this._create_token(r.TEXT,y)},m.exports.Tokenizer=E,m.exports.TOKEN=r}],P={};function e(m){var v=P[m];if(v!==void 0)return v.exports;var u=P[m]={exports:{}};return X[m](u,u.exports,e),u.exports}var R=e(18);D=R})();var V=D;if(!0)!(se=[j,j("6UM0"),j("TXwP")],G=function(X){var P=j("6UM0"),e=j("TXwP");return{html_beautify:function(R,m){return V(R,m,P.js_beautify,e.css_beautify)}}}.apply(_e,se),G!==void 0&&(ht.exports=G));else var F,O})()},q5bB:function(ht,_e,j){ht.exports={flex_box_center:"flex_box_center___uTq5a",flex_space_between:"flex_space_between___LTVj-",flex_box_vertical_center:"flex_box_vertical_center___1L3z-",flex_box_center_end:"flex_box_center_end___3ghBL",flex_box_column:"flex_box_column___2bU1n",bg:"bg___2iXhR",title:"title___2PlPP",questionIcons:"questionIcons___3jZbU",green:"green___1msyJ",orange:"orange___1uebJ",greenTip:"greenTip___1th4S",redTip:"redTip___18tx7",orangeTip:"orangeTip___2T44_",flexRow:"flexRow___14mZI",simpleWrap:"simpleWrap___325ES",divider:"divider___33qYV",modal:"modal___B_owv",programTitle:"programTitle___1CfOY",simpleBg:"simpleBg___23Mrm"}},"rAM+":function(ht,_e,j){"use strict";j.d(_e,"a",function(){return G});var se=j("Qw5x");function G(D,V){var F;if(typeof Symbol=="undefined"||D[Symbol.iterator]==null){if(Array.isArray(D)||(F=Object(se.a)(D))||V&&D&&typeof D.length=="number"){F&&(D=F);var O=0,X=function(){};return{s:X,n:function(){return O>=D.length?{done:!0}:{done:!1,value:D[O++]}},e:function(v){throw v},f:X}}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 P=!0,e=!1,R;return{s:function(){F=D[Symbol.iterator]()},n:function(){var v=F.next();return P=v.done,v},e:function(v){e=!0,R=v},f:function(){try{!P&&F.return!=null&&F.return()}finally{if(e)throw R}}}}},rUJ1:function(ht,_e){const j=/[&<>"']/,se=/[&<>"']/g,G=/[<>"']|&(?!#?\w+;)/,D=/[<>"']|&(?!#?\w+;)/g,V={"&":"&","<":"<",">":">",'"':""","'":"'"},F=C=>V[C];function O(C,d){if(d){if(j.test(C))return C.replace(se,F)}else if(G.test(C))return C.replace(D,F);return C}const X=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function P(C){return C.replace(X,(d,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const e=/(^|[^\[])\^/g;function R(C,d){C=C.source||C,d=d||"";const n={replace:(l,c)=>(c=c.source||c,c=c.replace(e,"$1"),C=C.replace(l,c),n),getRegex:()=>new RegExp(C,d)};return n}const m=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function u(C,d,n){if(C){let l;try{l=decodeURIComponent(P(n)).replace(m,"").toLowerCase()}catch(c){return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}d&&!v.test(n)&&(n=i(d,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(l){return null}return n}const s={},a=/^[^:]+:\/*[^/]*$/,A=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(C,d){s[" "+C]||(a.test(C)?s[" "+C]=C+"/":s[" "+C]=_(C,"/",!0)),C=s[" "+C];const n=C.indexOf(":")===-1;return d.substring(0,2)==="//"?n?d:C.replace(A,"$1")+d:d.charAt(0)==="/"?n?d:C.replace(o,"$1")+d:C+d}const r={exec:function(){}};function t(C){let d=1,n,l;for(;d<arguments.length;d++){n=arguments[d];for(l in n)Object.prototype.hasOwnProperty.call(n,l)&&(C[l]=n[l])}return C}function E(C,d){const n=C.replace(/\|/g,(b,g,h)=>{let L=!1,N=g;for(;--N>=0&&h[N]==="\\";)L=!L;return L?"|":" |"}),l=n.split(/ \|/);let c=0;if(l.length>d)l.splice(d);else for(;l.length<d;)l.push("");for(;c<l.length;c++)l[c]=l[c].trim().replace(/\\\|/g,"|");return l}function _(C,d,n){const l=C.length;if(l===0)return"";let c=0;for(;c<l;){const b=C.charAt(l-c-1);if(b===d&&!n)c++;else if(b!==d&&n)c++;else break}return C.substr(0,l-c)}function y(C,d){if(C.indexOf(d[1])===-1)return-1;const n=C.length;let l=0,c=0;for(;c<n;c++)if(C[c]==="\\")c++;else if(C[c]===d[0])l++;else if(C[c]===d[1]&&(l--,l<0))return c;return-1}function B(C){C&&C.sanitize&&!C.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")}ht.exports={escape:O,unescape:P,edit:R,cleanUrl:u,resolveUrl:i,noopTest:r,merge:t,splitCells:E,rtrim:_,findClosingBracket:y,checkSanitizeDeprecation:B}},sR1s:function(ht,_e,j){"use strict";j.d(_e,"b",function(){return V}),j.d(_e,"a",function(){return F}),j.d(_e,"c",function(){return O}),j.d(_e,"d",function(){return X});var se=j("U8pU"),G="RC_TABLE_KEY";function D(P){return P==null?[]:Array.isArray(P)?P:[P]}function V(P,e){if(!e&&typeof e!="number")return P;for(var R=D(e),m=P,v=0;v<R.length;v+=1){if(!m)return null;var u=R[v];m=m[u]}return m}function F(P){var e=[],R={};return P.forEach(function(m){for(var v=m||{},u=v.key,s=v.dataIndex,a=u||D(s).join("-")||G;R[a];)a="".concat(a,"_next");R[a]=!0,e.push(a)}),e}function O(){var P={};function e(u,s){s&&Object.keys(s).forEach(function(a){var A=s[a];A&&Object(se.a)(A)==="object"?(u[a]=u[a]||{},e(u[a],A)):u[a]=A})}for(var R=arguments.length,m=new Array(R),v=0;v<R;v++)m[v]=arguments[v];return m.forEach(function(u){e(P,u)}),P}function X(P){return P!=null}},sboe:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return D});var se=j("q1tI"),G=j.n(se),D=se.createContext(null)},t23M:function(ht,_e,j){"use strict";var se=j("VTBJ"),G=j("1OyB"),D=j("vuIU"),V=j("Ji7U"),F=j("LK+K"),O=j("q1tI"),X=j.n(O),P=j("m+aA"),e=j("Zm9Q"),R=j("Kwbf"),m=j("c+Xe"),v=j("bdgK"),u="rc-observer-key",s=function(a){Object(V.a)(o,a);var A=Object(F.a)(o);function o(){var i;return Object(G.a)(this,o),i=A.apply(this,arguments),i.resizeObserver=null,i.childNode=null,i.currentElement=null,i.state={width:0,height:0,offsetHeight:0,offsetWidth:0},i.onResize=function(r){var t=i.props.onResize,E=r[0].target,_=E.getBoundingClientRect(),y=_.width,B=_.height,C=E.offsetWidth,d=E.offsetHeight,n=Math.floor(y),l=Math.floor(B);if(i.state.width!==n||i.state.height!==l||i.state.offsetWidth!==C||i.state.offsetHeight!==d){var c={width:n,height:l,offsetWidth:C,offsetHeight:d};i.setState(c),t&&Promise.resolve().then(function(){t(Object(se.a)(Object(se.a)({},c),{},{offsetWidth:C,offsetHeight:d}))})}},i.setChildNode=function(r){i.childNode=r},i}return Object(D.a)(o,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var r=this.props.disabled;if(r){this.destroyObserver();return}var t=Object(P.a)(this.childNode||this),E=t!==this.currentElement;E&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new v.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var r=this.props.children,t=Object(e.a)(r);if(t.length>1)Object(R.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(R.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var E=t[0];if(O.isValidElement(E)&&Object(m.c)(E)){var _=E.ref;t[0]=O.cloneElement(E,{ref:Object(m.a)(_,this.setChildNode)})}return t.length===1?t[0]:t.map(function(y,B){return!O.isValidElement(y)||"key"in y&&y.key!==null?y:O.cloneElement(y,{key:"".concat(u,"-").concat(B)})})}}]),o}(O.Component);s.displayName="ResizeObserver",_e.a=s},t9D7:function(ht,_e,j){"use strict";j.d(_e,"b",function(){return X}),j.d(_e,"g",function(){return e}),j.d(_e,"d",function(){return R}),j.d(_e,"e",function(){return m}),j.d(_e,"a",function(){return v}),j.d(_e,"f",function(){return a}),j.d(_e,"c",function(){return A});var se=j("Vhoy"),G=j("MI8n"),D=j("pmY6"),V=j("Cg/j"),F=j("ic2d"),O=j("nEHx");const X=Object(V.c)("themeService");var P;(function(o){function i(r){return r&&typeof r=="object"&&typeof r.id=="string"}o.isThemeColor=i})(P||(P={}));function e(o){return{id:o}}var R;(function(o){function i(B){return B&&typeof B=="object"&&typeof B.id=="string"&&(typeof B.color=="undefined"||P.isThemeColor(B.color))}o.isThemeIcon=i;const r=new RegExp(`^\\$\\((${se.a.iconNameExpression}(?:${se.a.iconModifierExpression})?)\\)$`);function t(B){const C=r.exec(B);if(!C)return;let[,d]=C;return{id:d}}o.fromString=t;function E(B,C){let d=B.id;const n=d.lastIndexOf("~");return n!==-1&&(d=d.substring(0,n)),C&&(d=`${d}~${C}`),{id:d}}o.modify=E;function _(B,C){var d,n;return B.id===C.id&&((d=B.color)===null||d===void 0?void 0:d.id)===((n=C.color)===null||n===void 0?void 0:n.id)}o.isEqual=_;function y(B,C){return{id:B.id,color:C?e(C):void 0}}o.asThemeIcon=y,o.asClassNameArray=se.a.asClassNameArray,o.asClassName=se.a.asClassName,o.asCSSSelector=se.a.asCSSSelector})(R||(R={}));function m(o){switch(o){case O.a.DARK:return"vs-dark";case O.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const v={ThemingContribution:"base.contributions.theming"};class u{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new G.b}onColorThemeChange(o){return this.themingParticipants.push(o),this.onThemingParticipantAddedEmitter.fire(o),Object(D.i)(()=>{const i=this.themingParticipants.indexOf(o);this.themingParticipants.splice(i,1)})}getThemingParticipants(){return this.themingParticipants}}let s=new u;F.a.add(v.ThemingContribution,s);function a(o){return s.onColorThemeChange(o)}class A extends D.a{constructor(o){super();this.themeService=o,this.theme=o.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(i=>this.onThemeChange(i)))}onThemeChange(o){this.theme=o,this.updateStyles()}updateStyles(){}}},tJYV:function(ht,_e,j){ht.exports={flex_box_center:"flex_box_center___xqm06",flex_space_between:"flex_space_between___3Nv20",flex_box_vertical_center:"flex_box_vertical_center___2FGP4",flex_box_center_end:"flex_box_center_end___387aA",flex_box_column:"flex_box_column___3bH33",shixunWrp:"shixunWrp___33Rqe",s:"s___vCKh9",fillComment:"fillComment___1WoJe",commentContent:"commentContent___Mjxd1",commentText:"commentText___2J3jh",simpleWrap:"simpleWrap___1avIc",fillBg:"fillBg___3dLKw",simpleBg:"simpleBg___1k27e"}},uJ6K:function(ht,_e,j){ht.exports={wrap:"wrap___1AALq",img:"img___20GEO",table:"table___26NT5",totalScore:"totalScore___1t1Bx",people:"people___BMR7K",glassSeal:"glassSeal___2woZ-"}},ulZh:function(ht,_e,j){typeof window!="undefined"&&function(G,D){ht.exports=D()}(this,function(){return function(se){var G={};function D(V){if(G[V])return G[V].exports;var F=G[V]={i:V,l:!1,exports:{}};return se[V].call(F.exports,F,F.exports,D),F.l=!0,F.exports}return D.m=se,D.c=G,D.d=function(V,F,O){D.o(V,F)||Object.defineProperty(V,F,{enumerable:!0,get:O})},D.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})},D.t=function(V,F){if(F&1&&(V=D(V)),F&8)return V;if(F&4&&typeof V=="object"&&V&&V.__esModule)return V;var O=Object.create(null);if(D.r(O),Object.defineProperty(O,"default",{enumerable:!0,value:V}),F&2&&typeof V!="string")for(var X in V)D.d(O,X,function(P){return V[P]}.bind(null,X));return O},D.n=function(V){var F=V&&V.__esModule?function(){return V.default}:function(){return V};return D.d(F,"a",F),F},D.o=function(V,F){return Object.prototype.hasOwnProperty.call(V,F)},D.p="/dist/",D(D.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(se,G,D){"use strict";var V=Object.prototype.hasOwnProperty,F="~";function O(){}Object.create&&(O.prototype=Object.create(null),new O().__proto__||(F=!1));function X(m,v,u){this.fn=m,this.context=v,this.once=u||!1}function P(m,v,u,s,a){if(typeof u!="function")throw new TypeError("The listener must be a function");var A=new X(u,s||m,a),o=F?F+v:v;return m._events[o]?m._events[o].fn?m._events[o]=[m._events[o],A]:m._events[o].push(A):(m._events[o]=A,m._eventsCount++),m}function e(m,v){--m._eventsCount===0?m._events=new O:delete m._events[v]}function R(){this._events=new O,this._eventsCount=0}R.prototype.eventNames=function(){var v=[],u,s;if(this._eventsCount===0)return v;for(s in u=this._events)V.call(u,s)&&v.push(F?s.slice(1):s);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(u)):v},R.prototype.listeners=function(v){var u=F?F+v:v,s=this._events[u];if(!s)return[];if(s.fn)return[s.fn];for(var a=0,A=s.length,o=new Array(A);a<A;a++)o[a]=s[a].fn;return o},R.prototype.listenerCount=function(v){var u=F?F+v:v,s=this._events[u];return s?s.fn?1:s.length:0},R.prototype.emit=function(v,u,s,a,A,o){var i=F?F+v:v;if(!this._events[i])return!1;var r=this._events[i],t=arguments.length,E,_;if(r.fn){r.once&&this.removeListener(v,r.fn,void 0,!0);switch(t){case 1:return r.fn.call(r.context),!0;case 2:return r.fn.call(r.context,u),!0;case 3:return r.fn.call(r.context,u,s),!0;case 4:return r.fn.call(r.context,u,s,a),!0;case 5:return r.fn.call(r.context,u,s,a,A),!0;case 6:return r.fn.call(r.context,u,s,a,A,o),!0}for(_=1,E=new Array(t-1);_<t;_++)E[_-1]=arguments[_];r.fn.apply(r.context,E)}else{var y=r.length,B;for(_=0;_<y;_++){r[_].once&&this.removeListener(v,r[_].fn,void 0,!0);switch(t){case 1:r[_].fn.call(r[_].context);break;case 2:r[_].fn.call(r[_].context,u);break;case 3:r[_].fn.call(r[_].context,u,s);break;case 4:r[_].fn.call(r[_].context,u,s,a);break;default:if(!E)for(B=1,E=new Array(t-1);B<t;B++)E[B-1]=arguments[B];r[_].fn.apply(r[_].context,E)}}}return!0},R.prototype.on=function(v,u,s){return P(this,v,u,s,!1)},R.prototype.once=function(v,u,s){return P(this,v,u,s,!0)},R.prototype.removeListener=function(v,u,s,a){var A=F?F+v:v;if(!this._events[A])return this;if(!u)return e(this,A),this;var o=this._events[A];if(o.fn)o.fn===u&&(!a||o.once)&&(!s||o.context===s)&&e(this,A);else{for(var i=0,r=[],t=o.length;i<t;i++)(o[i].fn!==u||a&&!o[i].once||s&&o[i].context!==s)&&r.push(o[i]);r.length?this._events[A]=r.length===1?r[0]:r:e(this,A)}return this},R.prototype.removeAllListeners=function(v){var u;return v?(u=F?F+v:v,this._events[u]&&e(this,u)):(this._events=new O,this._eventsCount=0),this},R.prototype.off=R.prototype.removeListener,R.prototype.addListener=R.prototype.on,R.prefixed=F,R.EventEmitter=R,se.exports=R},"./node_modules/url-toolkit/src/url-toolkit.js":function(se,G,D){(function(V){var F=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,O=/^([^\/?#]*)([^]*)$/,X=/(?:\/|^)\.(?=\/)/g,P=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(R,m,v){if(v=v||{},R=R.trim(),m=m.trim(),!m){if(!v.alwaysNormalize)return R;var u=e.parseURL(R);if(!u)throw new Error("Error trying to parse base URL.");return u.path=e.normalizePath(u.path),e.buildURLFromParts(u)}var s=e.parseURL(m);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return v.alwaysNormalize?(s.path=e.normalizePath(s.path),e.buildURLFromParts(s)):m;var a=e.parseURL(R);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&a.path[0]!=="/"){var A=O.exec(a.path);a.netLoc=A[1],a.path=A[2]}a.netLoc&&!a.path&&(a.path="/");var o={scheme:a.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(o.netLoc=a.netLoc,s.path[0]!=="/"))if(!s.path)o.path=a.path,s.params||(o.params=a.params,s.query||(o.query=a.query));else{var i=a.path,r=i.substring(0,i.lastIndexOf("/")+1)+s.path;o.path=e.normalizePath(r)}return o.path===null&&(o.path=v.alwaysNormalize?e.normalizePath(s.path):s.path),e.buildURLFromParts(o)},parseURL:function(R){var m=F.exec(R);return m?{scheme:m[1]||"",netLoc:m[2]||"",path:m[3]||"",params:m[4]||"",query:m[5]||"",fragment:m[6]||""}:null},normalizePath:function(R){for(R=R.split("").reverse().join("").replace(X,"");R.length!==(R=R.replace(P,"")).length;);return R.split("").reverse().join("")},buildURLFromParts:function(R){return R.scheme+R.netLoc+R.path+R.params+R.query+R.fragment}};se.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(se,G,D){function V(v){var u={};function s(A){if(u[A])return u[A].exports;var o=u[A]={i:A,l:!1,exports:{}};return v[A].call(o.exports,o,o.exports,s),o.l=!0,o.exports}s.m=v,s.c=u,s.i=function(A){return A},s.d=function(A,o,i){s.o(A,o)||Object.defineProperty(A,o,{configurable:!1,enumerable:!0,get:i})},s.r=function(A){Object.defineProperty(A,"__esModule",{value:!0})},s.n=function(A){var o=A&&A.__esModule?function(){return A.default}:function(){return A};return s.d(o,"a",o),o},s.o=function(A,o){return Object.prototype.hasOwnProperty.call(A,o)},s.p="/",s.oe=function(A){throw console.error(A),A};var a=s(s.s=ENTRY_MODULE);return a.default||a}var F="[\\.|\\-|\\+|\\w|/|@]+",O="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+F+").*?\\)";function X(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function P(v){return!isNaN(1*v)}function e(v,u,s){var a={};a[s]=[];var A=u.toString(),o=A.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return a;for(var i=o[1],r=new RegExp("(\\\\n|\\W)"+X(i)+O,"g"),t;t=r.exec(A);){if(t[3]==="dll-reference")continue;a[s].push(t[3])}for(r=new RegExp("\\("+X(i)+'\\("(dll-reference\\s('+F+'))"\\)\\)'+O,"g");t=r.exec(A);)v[t[2]]||(a[s].push(t[1]),v[t[2]]=D(t[1]).m),a[t[2]]=a[t[2]]||[],a[t[2]].push(t[4]);for(var E=Object.keys(a),_=0;_<E.length;_++)for(var y=0;y<a[E[_]].length;y++)P(a[E[_]][y])&&(a[E[_]][y]=1*a[E[_]][y]);return a}function R(v){var u=Object.keys(v);return u.reduce(function(s,a){return s||v[a].length>0},!1)}function m(v,u){for(var s={main:[u]},a={main:[]},A={main:{}};R(s);)for(var o=Object.keys(s),i=0;i<o.length;i++){var r=o[i],t=s[r],E=t.pop();if(A[r]=A[r]||{},A[r][E]||!v[r][E])continue;A[r][E]=!0,a[r]=a[r]||[],a[r].push(E);for(var _=e(v,v[r][E],r),y=Object.keys(_),B=0;B<y.length;B++)s[y[B]]=s[y[B]]||[],s[y[B]]=s[y[B]].concat(_[y[B]])}return a}se.exports=function(v,u){u=u||{};var s={main:D.m},a=u.all?{main:Object.keys(s.main)}:m(s,v),A="";Object.keys(a).filter(function(E){return E!=="main"}).forEach(function(E){for(var _=0;a[E][_];)_++;a[E].push(_),s[E][_]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",A=A+"var "+E+" = ("+V.toString().replace("ENTRY_MODULE",JSON.stringify(_))+")({"+a[E].map(function(y){return""+JSON.stringify(y)+": "+s[E][y].toString()}).join(",")+`});
|
|
`}),A=A+"new (("+V.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+a.main.map(function(E){return""+JSON.stringify(E)+": "+s.main[E].toString()}).join(",")+"}))(self);";var o=new window.Blob([A],{type:"text/javascript"});if(u.bare)return o;var i=window.URL||window.webkitURL||window.mozURL||window.msURL,r=i.createObjectURL(o),t=new window.Worker(r);return t.objectURL=r,t}},"./src/config.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"hlsDefaultConfig",function(){return B}),D.d(G,"mergeConfig",function(){return d}),D.d(G,"enableStreamingMode",function(){return n});var V=D("./src/controller/abr-controller.ts"),F=D("./src/controller/audio-stream-controller.ts"),O=D("./src/controller/audio-track-controller.ts"),X=D("./src/controller/subtitle-stream-controller.ts"),P=D("./src/controller/subtitle-track-controller.ts"),e=D("./src/controller/buffer-controller.ts"),R=D("./src/controller/timeline-controller.ts"),m=D("./src/controller/cap-level-controller.ts"),v=D("./src/controller/fps-controller.ts"),u=D("./src/controller/eme-controller.ts"),s=D("./src/controller/cmcd-controller.ts"),a=D("./src/utils/xhr-loader.ts"),A=D("./src/utils/fetch-loader.ts"),o=D("./src/utils/cues.ts"),i=D("./src/utils/mediakeys-helper.ts"),r=D("./src/utils/logger.ts");function t(){return t=Object.assign||function(l){for(var c=1;c<arguments.length;c++){var b=arguments[c];for(var g in b)Object.prototype.hasOwnProperty.call(b,g)&&(l[g]=b[g])}return l},t.apply(this,arguments)}function E(l,c){var b=Object.keys(l);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(l);c&&(g=g.filter(function(h){return Object.getOwnPropertyDescriptor(l,h).enumerable})),b.push.apply(b,g)}return b}function _(l){for(var c=1;c<arguments.length;c++){var b=arguments[c]!=null?arguments[c]:{};c%2?E(Object(b),!0).forEach(function(g){y(l,g,b[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(b)):E(Object(b)).forEach(function(g){Object.defineProperty(l,g,Object.getOwnPropertyDescriptor(b,g))})}return l}function y(l,c,b){return c in l?Object.defineProperty(l,c,{value:b,enumerable:!0,configurable:!0,writable:!0}):l[c]=b,l}var B=_(_({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,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:a.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:V.default,bufferController:e.default,capLevelController:m.default,fpsController:v.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,drmSystemOptions:{},requestMediaKeySystemAccessFunc:i.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},C()),{},{subtitleStreamController:X.SubtitleStreamController,subtitleTrackController:P.default,timelineController:R.TimelineController,audioStreamController:F.default,audioTrackController:O.default,emeController:u.default,cmcdController:s.default});function C(){return{cueHandler:o.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function d(l,c){if((c.liveSyncDurationCount||c.liveMaxLatencyDurationCount)&&(c.liveSyncDuration||c.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(c.liveMaxLatencyDurationCount!==void 0&&(c.liveSyncDurationCount===void 0||c.liveMaxLatencyDurationCount<=c.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(c.liveMaxLatencyDuration!==void 0&&(c.liveSyncDuration===void 0||c.liveMaxLatencyDuration<=c.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},l,c)}function n(l){var c=l.loader;if(c!==A.default&&c!==a.default)r.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),l.progressive=!1;else{var b=Object(A.fetchSupported)();b&&(l.loader=A.default,l.progressive=!0,l.enableSoftwareAES=!0,r.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/polyfills/number.ts"),F=D("./src/utils/ewma-bandwidth-estimator.ts"),O=D("./src/events.ts"),X=D("./src/utils/buffer-helper.ts"),P=D("./src/errors.ts"),e=D("./src/types/loader.ts"),R=D("./src/utils/logger.ts");function m(s,a){for(var A=0;A<a.length;A++){var o=a[A];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(s,o.key,o)}}function v(s,a,A){return a&&m(s.prototype,a),A&&m(s,A),s}var u=function(){function s(A){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=A;var o=A.config;this.bwEstimator=new F.default(o.abrEwmaSlowVoD,o.abrEwmaFastVoD,o.abrEwmaDefaultEstimate),this.registerListeners()}var a=s.prototype;return a.registerListeners=function(){var o=this.hls;o.on(O.Events.FRAG_LOADING,this.onFragLoading,this),o.on(O.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(O.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(O.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){var o=this.hls;o.off(O.Events.FRAG_LOADING,this.onFragLoading,this),o.off(O.Events.FRAG_LOADED,this.onFragLoaded,this),o.off(O.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(O.Events.ERROR,this.onError,this)},a.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},a.onFragLoading=function(o,i){var r=i.frag;if(r.type===e.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=r,this.partCurrent=(t=i.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},a.onLevelLoaded=function(o,i){var r=this.hls.config;i.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)},a._abandonRulesCheck=function(){var o=this.fragCurrent,i=this.partCurrent,r=this.hls,t=r.autoLevelEnabled,E=r.config,_=r.media;if(!o||!_)return;var y=i?i.stats:o.stats,B=i?i.duration:o.duration;if(y.aborted){R.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||_.paused||!_.playbackRate||!_.readyState)return;var C=performance.now()-y.loading.start,d=Math.abs(_.playbackRate);if(C<=500*B/d)return;var n=r.levels,l=r.minAutoLevel,c=n[o.level],b=y.total||Math.max(y.loaded,Math.round(B*c.maxBitrate/8)),g=Math.max(1,y.bwEstimate?y.bwEstimate/8:y.loaded*1e3/C),h=(b-y.loaded)/g,L=_.currentTime,N=(X.BufferHelper.bufferInfo(_,L,E.maxBufferHole).end-L)/d;if(N>=2*B/d||h<=N)return;var T=Number.POSITIVE_INFINITY,M;for(M=o.level-1;M>l;M--){var W=n[M].maxBitrate;if(T=B*W/(8*.8*g),T<N)break}if(T>=h)return;var U=this.bwEstimator.getEstimate();R.logger.warn("Fragment "+o.sn+(i?" part "+i.index:"")+" of level "+o.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+M+`
|
|
Current BW estimate: `+(Object(V.isFiniteNumber)(U)?(U/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+h.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+T.toFixed(3)+` s
|
|
Time to underbuffer: `+N.toFixed(3)+" s"),r.nextLoadLevel=M,this.bwEstimator.sample(C,y.loaded),this.clearTimer(),o.loader&&(this.fragCurrent=this.partCurrent=null,o.loader.abort()),r.trigger(O.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:o,part:i,stats:y})},a.onFragLoaded=function(o,i){var r=i.frag,t=i.part;if(r.type===e.PlaylistLevelType.MAIN&&Object(V.isFiniteNumber)(r.sn)){var E=t?t.stats:r.stats,_=t?t.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var y=this.hls.levels[r.level],B=(y.loaded?y.loaded.bytes:0)+E.loaded,C=(y.loaded?y.loaded.duration:0)+_;y.loaded={bytes:B,duration:C},y.realBitrate=Math.round(8*B/C)}if(r.bitrateTest){var d={stats:E,frag:r,part:t,id:r.type};this.onFragBuffered(O.Events.FRAG_BUFFERED,d),r.bitrateTest=!1}}},a.onFragBuffered=function(o,i){var r=i.frag,t=i.part,E=t?t.stats:r.stats;if(E.aborted)return;if(r.type!==e.PlaylistLevelType.MAIN||r.sn==="initSegment")return;var _=E.parsing.end-E.loading.start;this.bwEstimator.sample(_,E.loaded),E.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=_/1e3:this.bitrateTestDelay=0},a.onError=function(o,i){switch(i.details){case P.ErrorDetails.FRAG_LOAD_ERROR:case P.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},a.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},a.getNextABRAutoLevel=function(){var o=this.fragCurrent,i=this.partCurrent,r=this.hls,t=r.maxAutoLevel,E=r.config,_=r.minAutoLevel,y=r.media,B=i?i.duration:o?o.duration:0,C=y?y.currentTime:0,d=y&&y.playbackRate!==0?Math.abs(y.playbackRate):1,n=this.bwEstimator?this.bwEstimator.getEstimate():E.abrEwmaDefaultEstimate,l=(X.BufferHelper.bufferInfo(y,C,E.maxBufferHole).end-C)/d,c=this.findBestLevel(n,_,t,l,E.abrBandWidthFactor,E.abrBandWidthUpFactor);if(c>=0)return c;R.logger.trace((l?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var b=B?Math.min(B,E.maxStarvationDelay):E.maxStarvationDelay,g=E.abrBandWidthFactor,h=E.abrBandWidthUpFactor;if(!l){var L=this.bitrateTestDelay;if(L){var N=B?Math.min(B,E.maxLoadingDelay):E.maxLoadingDelay;b=N-L,R.logger.trace("bitrate test took "+Math.round(1e3*L)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*b)+" ms"),g=h=1}}return c=this.findBestLevel(n,_,t,l+b,g,h),Math.max(c,0)},a.findBestLevel=function(o,i,r,t,E,_){for(var y,B=this.fragCurrent,C=this.partCurrent,d=this.lastLoadedFragLevel,n=this.hls.levels,l=n[d],c=!!(l!=null&&(y=l.details)!==null&&y!==void 0&&y.live),b=l==null?void 0:l.codecSet,g=C?C.duration:B?B.duration:0,h=r;h>=i;h--){var L=n[h];if(!L||b&&L.codecSet!==b)continue;var N=L.details,T=(C?N==null?void 0:N.partTarget:N==null?void 0:N.averagetargetduration)||g,M=void 0;h<=d?M=E*o:M=_*o;var W=n[h].maxBitrate,U=W*T/M;if(R.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+h+"/"+Math.round(M)+"/"+W+"/"+T+"/"+t+"/"+U),M>W&&(!U||c&&!this.bitrateTestDelay||U<t))return h}return-1},v(s,[{key:"nextAutoLevel",get:function(){var o=this._nextAutoLevel,i=this.bwEstimator;if(o!==-1&&(!i||!i.canEstimate()))return o;var r=this.getNextABRAutoLevel();return o!==-1&&(r=Math.min(o,r)),r},set:function(o){this._nextAutoLevel=o}}]),s}();G.default=u},"./src/controller/audio-stream-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/polyfills/number.ts"),F=D("./src/controller/base-stream-controller.ts"),O=D("./src/events.ts"),X=D("./src/utils/buffer-helper.ts"),P=D("./src/controller/fragment-tracker.ts"),e=D("./src/types/level.ts"),R=D("./src/types/loader.ts"),m=D("./src/loader/fragment.ts"),v=D("./src/demux/chunk-cache.ts"),u=D("./src/demux/transmuxer-interface.ts"),s=D("./src/types/transmuxer.ts"),a=D("./src/controller/fragment-finders.ts"),A=D("./src/utils/discontinuities.ts"),o=D("./src/errors.ts"),i=D("./src/utils/logger.ts");function r(){return r=Object.assign||function(B){for(var C=1;C<arguments.length;C++){var d=arguments[C];for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&(B[n]=d[n])}return B},r.apply(this,arguments)}function t(B,C){B.prototype=Object.create(C.prototype),B.prototype.constructor=B,E(B,C)}function E(B,C){return E=Object.setPrototypeOf||function(n,l){return n.__proto__=l,n},E(B,C)}var _=100,y=function(B){t(C,B);function C(n,l){var c;return c=B.call(this,n,l,"[audio-stream-controller]")||this,c.videoBuffer=null,c.videoTrackCC=-1,c.waitingVideoCC=-1,c.audioSwitch=!1,c.trackId=-1,c.waitingData=null,c.mainDetails=null,c.bufferFlushed=!1,c._registerListeners(),c}var d=C.prototype;return d.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},d._registerListeners=function(){var l=this.hls;l.on(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(O.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.on(O.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.on(O.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(O.Events.ERROR,this.onError,this),l.on(O.Events.BUFFER_RESET,this.onBufferReset,this),l.on(O.Events.BUFFER_CREATED,this.onBufferCreated,this),l.on(O.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.on(O.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(O.Events.FRAG_BUFFERED,this.onFragBuffered,this)},d._unregisterListeners=function(){var l=this.hls;l.off(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(O.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.off(O.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.off(O.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(O.Events.ERROR,this.onError,this),l.off(O.Events.BUFFER_RESET,this.onBufferReset,this),l.off(O.Events.BUFFER_CREATED,this.onBufferCreated,this),l.off(O.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.off(O.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.off(O.Events.FRAG_BUFFERED,this.onFragBuffered,this)},d.onInitPtsFound=function(l,c){var b=c.frag,g=c.id,h=c.initPTS;if(g==="main"){var L=b.cc;this.initPTS[b.cc]=h,this.log("InitPTS for cc: "+L+" found from main: "+h),this.videoTrackCC=L,this.state===F.State.WAITING_INIT_PTS&&this.tick()}},d.startLoad=function(l){if(!this.levels){this.startPosition=l,this.state=F.State.STOPPED;return}var c=this.lastCurrentTime;this.stopLoad(),this.setInterval(_),this.fragLoadError=0,c>0&&l===-1?(this.log("Override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=F.State.IDLE):(this.loadedmetadata=!1,this.state=F.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=l,this.tick()},d.doTick=function(){switch(this.state){case F.State.IDLE:this.doTickIdle();break;case F.State.WAITING_TRACK:{var l,c=this.levels,b=this.trackId,g=c==null||((l=c[b])===null||l===void 0)?void 0:l.details;if(g){if(this.waitForCdnTuneIn(g))break;this.state=F.State.WAITING_INIT_PTS}break}case F.State.FRAG_LOADING_WAITING_RETRY:{var h,L=performance.now(),N=this.retryDate;(!N||L>=N||(h=this.media)!==null&&h!==void 0&&h.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=F.State.IDLE);break}case F.State.WAITING_INIT_PTS:{var T=this.waitingData;if(T){var M=T.frag,W=T.part,U=T.cache,Y=T.complete;if(this.initPTS[M.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=F.State.FRAG_LOADING;var ne=U.flush(),me={frag:M,part:W,payload:ne,networkDetails:null};this._handleFragmentLoadProgress(me),Y&&B.prototype._handleFragmentLoadComplete.call(this,me)}else if(this.videoTrackCC!==this.waitingVideoCC)i.logger.log("Waiting fragment cc ("+M.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ge=this.getLoadPosition(),Oe=X.BufferHelper.bufferInfo(this.mediaBuffer,ge,this.config.maxBufferHole),Se=Object(a.fragmentWithinToleranceTest)(Oe.end,this.config.maxFragLookUpTolerance,M);Se<0&&(i.logger.log("Waiting fragment cc ("+M.cc+") @ "+M.start+" cancelled because another fragment at "+Oe.end+" is needed"),this.clearWaitingFragment())}}else this.state=F.State.IDLE}}this.onTickEnd()},d.clearWaitingFragment=function(){var l=this.waitingData;l&&(this.fragmentTracker.removeFragment(l.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=F.State.IDLE)},d.onTickEnd=function(){var l=this.media;if(!l||!l.readyState)return;var c=this.mediaBuffer?this.mediaBuffer:l,b=c.buffered;!this.loadedmetadata&&b.length&&(this.loadedmetadata=!0),this.lastCurrentTime=l.currentTime},d.doTickIdle=function(){var l,c,b=this.hls,g=this.levels,h=this.media,L=this.trackId,N=b.config;if(!g||!g[L])return;if(!h&&(this.startFragRequested||!N.startFragPrefetch))return;var T=g[L],M=T.details;if(!M||M.live&&this.levelLastLoaded!==L||this.waitForCdnTuneIn(M)){this.state=F.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,m.ElementaryStreamTypes.AUDIO,R.PlaylistLevelType.AUDIO));var W=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,R.PlaylistLevelType.AUDIO);if(W===null)return;var U=W.len,Y=this.getMaxBufferLength(),ne=this.audioSwitch;if(U>=Y&&!ne)return;if(!ne&&this._streamEnded(W,M)){b.trigger(O.Events.BUFFER_EOS,{type:"audio"}),this.state=F.State.ENDED;return}var me=M.fragments,ge=me[0].start,Oe=W.end;if(ne){var Se=this.getLoadPosition();Oe=Se,M.PTSKnown&&Se<ge&&((W.end>ge||W.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),h.currentTime=ge+.05))}var Be=this.getNextFragment(Oe,M);if(!Be){this.bufferFlushed=!0;return}((l=Be.decryptdata)===null||l===void 0?void 0:l.keyFormat)==="identity"&&!((c=Be.decryptdata)!==null&&c!==void 0&&c.key)?this.loadKey(Be,M):this.loadFragment(Be,M,Oe)},d.getMaxBufferLength=function(){var l=B.prototype.getMaxBufferLength.call(this),c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,R.PlaylistLevelType.MAIN);return c===null?l:Math.max(l,c.len)},d.onMediaDetaching=function(){this.videoBuffer=null,B.prototype.onMediaDetaching.call(this)},d.onAudioTracksUpdated=function(l,c){var b=c.audioTracks;this.resetTransmuxer(),this.levels=b.map(function(g){return new e.Level(g)})},d.onAudioTrackSwitching=function(l,c){var b=!!c.url;this.trackId=c.id;var g=this.fragCurrent;g!=null&&g.loader&&g.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),b?this.setInterval(_):this.resetTransmuxer(),b?(this.audioSwitch=!0,this.state=F.State.IDLE):this.state=F.State.STOPPED,this.tick()},d.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},d.onLevelLoaded=function(l,c){this.mainDetails=c.details},d.onAudioTrackLoaded=function(l,c){var b,g=this.levels,h=c.details,L=c.id;if(!g){this.warn("Audio tracks were reset while loading level "+L);return}this.log("Track "+L+" loaded ["+h.startSN+","+h.endSN+"],duration:"+h.totalduration);var N=g[L],T=0;if(h.live||(b=N.details)!==null&&b!==void 0&&b.live){var M=this.mainDetails;if(h.fragments[0]||(h.deltaUpdateFailed=!0),h.deltaUpdateFailed||!M)return;!N.details&&h.hasProgramDateTime&&M.hasProgramDateTime?(Object(A.alignMediaPlaylistByPDT)(h,M),T=h.fragments[0].start):T=this.alignPlaylists(h,N.details)}N.details=h,this.levelLastLoaded=L,!this.startFragRequested&&(this.mainDetails||!h.live)&&this.setStartPosition(N.details,T),this.state===F.State.WAITING_TRACK&&!this.waitForCdnTuneIn(h)&&(this.state=F.State.IDLE),this.tick()},d._handleFragmentLoadProgress=function(l){var c,b=l.frag,g=l.part,h=l.payload,L=this.config,N=this.trackId,T=this.levels;if(!T){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+b.sn+" of level "+b.level+" will not be buffered");return}var M=T[N];console.assert(M,"Audio track is defined on fragment load progress");var W=M.details;console.assert(W,"Audio track details are defined on fragment load progress");var U=L.defaultAudioCodec||M.audioCodec||"mp4a.40.2",Y=this.transmuxer;Y||(Y=this.transmuxer=new u.default(this.hls,R.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ne=this.initPTS[b.cc],me=(c=b.initSegment)===null||c===void 0?void 0:c.data;if(ne!==void 0){var ge=!1,Oe=g?g.index:-1,Se=Oe!==-1,Be=new s.ChunkMetadata(b.level,b.sn,b.stats.chunkCount,h.byteLength,Oe,Se);Y.push(h,me,U,"",b,g,W.totalduration,ge,Be,ne)}else{i.logger.log("Unknown video PTS for cc "+b.cc+", waiting for video PTS before demuxing audio frag "+b.sn+" of ["+W.startSN+" ,"+W.endSN+"],track "+N);var Ne=this.waitingData=this.waitingData||{frag:b,part:g,cache:new v.default,complete:!1},ke=Ne.cache;ke.push(new Uint8Array(h)),this.waitingVideoCC=this.videoTrackCC,this.state=F.State.WAITING_INIT_PTS}},d._handleFragmentLoadComplete=function(l){if(this.waitingData){this.waitingData.complete=!0;return}B.prototype._handleFragmentLoadComplete.call(this,l)},d.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},d.onBufferCreated=function(l,c){var b=c.tracks.audio;b&&(this.mediaBuffer=b.buffer),c.tracks.video&&(this.videoBuffer=c.tracks.video.buffer)},d.onFragBuffered=function(l,c){var b=c.frag,g=c.part;if(b.type!==R.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(b)){this.warn("Fragment "+b.sn+(g?" p: "+g.index:"")+" of level "+b.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}b.sn!=="initSegment"&&(this.fragPrevious=b,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(b,g)},d.onError=function(l,c){switch(c.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.AUDIO,c);break;case o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==F.State.ERROR&&this.state!==F.State.STOPPED&&(this.state=c.fatal?F.State.ERROR:F.State.IDLE,this.warn(c.details+" while loading frag, switching to "+this.state+" state"));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(c.parent==="audio"&&(this.state===F.State.PARSING||this.state===F.State.PARSED)){var b=!0,g=this.getFwdBufferInfo(this.mediaBuffer,R.PlaylistLevelType.AUDIO);g&&g.len>.5&&(b=!this.reduceMaxBufferLength(g.len)),b&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,B.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},d.onBufferFlushed=function(l,c){var b=c.type;b===m.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},d._handleTransmuxComplete=function(l){var c,b="audio",g=this.hls,h=l.remuxResult,L=l.chunkMeta,N=this.getCurrentContext(L);if(!N){this.warn("The loading context changed while buffering fragment "+L.sn+" of level "+L.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(L.level);return}var T=N.frag,M=N.part,W=h.audio,U=h.text,Y=h.id3,ne=h.initSegment;if(this.fragContextChanged(T))return;if(this.state=F.State.PARSING,this.audioSwitch&&W&&this.completeAudioSwitch(),ne!=null&&ne.tracks&&(this._bufferInitSegment(ne.tracks,T,L),g.trigger(O.Events.FRAG_PARSING_INIT_SEGMENT,{frag:T,id:b,tracks:ne.tracks})),W){var me=W.startPTS,ge=W.endPTS,Oe=W.startDTS,Se=W.endDTS;M&&(M.elementaryStreams[m.ElementaryStreamTypes.AUDIO]={startPTS:me,endPTS:ge,startDTS:Oe,endDTS:Se}),T.setElementaryStreamInfo(m.ElementaryStreamTypes.AUDIO,me,ge,Oe,Se),this.bufferFragmentData(W,T,M,L)}if(Y!=null&&(c=Y.samples)!==null&&c!==void 0&&c.length){var Be=r({frag:T,id:b},Y);g.trigger(O.Events.FRAG_PARSING_METADATA,Be)}if(U){var Ne=r({frag:T,id:b},U);g.trigger(O.Events.FRAG_PARSING_USERDATA,Ne)}},d._bufferInitSegment=function(l,c,b){if(this.state!==F.State.PARSING)return;l.video&&delete l.video;var g=l.audio;if(!g)return;g.levelCodec=g.codec,g.id="audio",this.log("Init audio buffer, container:"+g.container+", codecs[parsed]=["+g.codec+"]"),this.hls.trigger(O.Events.BUFFER_CODECS,l);var h=g.initSegment;if(h!=null&&h.byteLength){var L={type:"audio",frag:c,part:null,chunkMeta:b,parent:c.type,data:h};this.hls.trigger(O.Events.BUFFER_APPENDING,L)}this.tick()},d.loadFragment=function(l,c,b){var g=this.fragmentTracker.getState(l);this.fragCurrent=l,(this.audioSwitch||g===P.FragmentState.NOT_LOADED||g===P.FragmentState.PARTIAL)&&(l.sn==="initSegment"?this._loadInitSegment(l):c.live&&!Object(V.isFiniteNumber)(this.initPTS[l.cc])?(this.log("Waiting for video PTS in continuity counter "+l.cc+" of live stream before loading audio fragment "+l.sn+" of level "+this.trackId),this.state=F.State.WAITING_INIT_PTS):(this.startFragRequested=!0,B.prototype.loadFragment.call(this,l,c,b)))},d.completeAudioSwitch=function(){var l=this.hls,c=this.media,b=this.trackId;c&&(this.log("Switching audio track : flushing all audio"),B.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,l.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:b})},C}(F.default);G.default=y},"./src/controller/audio-track-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/errors.ts"),O=D("./src/controller/base-playlist-controller.ts"),X=D("./src/types/loader.ts");function P(u,s){for(var a=0;a<s.length;a++){var A=s[a];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(u,A.key,A)}}function e(u,s,a){return s&&P(u.prototype,s),a&&P(u,a),u}function R(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,m(u,s)}function m(u,s){return m=Object.setPrototypeOf||function(A,o){return A.__proto__=o,A},m(u,s)}var v=function(u){R(s,u);function s(A){var o;return o=u.call(this,A,"[audio-track-controller]")||this,o.tracks=[],o.groupId=null,o.tracksInGroup=[],o.trackId=-1,o.trackName="",o.selectDefaultTrack=!0,o.registerListeners(),o}var a=s.prototype;return a.registerListeners=function(){var o=this.hls;o.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(V.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){var o=this.hls;o.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(V.Events.ERROR,this.onError,this)},a.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,u.prototype.destroy.call(this)},a.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},a.onManifestParsed=function(o,i){this.tracks=i.audioTracks||[]},a.onAudioTrackLoaded=function(o,i){var r=i.id,t=i.details,E=this.tracksInGroup[r];if(!E){this.warn("Invalid audio track id "+r);return}var _=E.details;E.details=i.details,this.log("audioTrack "+r+" loaded ["+t.startSN+"-"+t.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,i,_))},a.onLevelLoading=function(o,i){this.switchLevel(i.level)},a.onLevelSwitching=function(o,i){this.switchLevel(i.level)},a.switchLevel=function(o){var i=this.hls.levels[o];if(!(i!=null&&i.audioGroupIds))return;var r=i.audioGroupIds[i.urlId];if(this.groupId!==r){this.groupId=r;var t=this.tracks.filter(function(_){return!r||_.groupId===r});this.selectDefaultTrack&&!t.some(function(_){return _.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var E={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(V.Events.AUDIO_TRACKS_UPDATED,E),this.selectInitialTrack()}},a.onError=function(o,i){if(u.prototype.onError.call(this,o,i),i.fatal||!i.context)return;i.context.type===X.PlaylistContextType.AUDIO_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},a.setAudioTrack=function(o){var i=this.tracksInGroup;if(o<0||o>=i.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var r=i[this.trackId];this.log("Now switching to audio-track index "+o);var t=i[o],E=t.id,_=t.groupId,y=_===void 0?"":_,B=t.name,C=t.type,d=t.url;if(this.trackId=o,this.trackName=B,this.selectDefaultTrack=!1,this.hls.trigger(V.Events.AUDIO_TRACK_SWITCHING,{id:E,groupId:y,name:B,type:C,url:d}),t.details&&!t.details.live)return;var n=this.switchParams(t.url,r==null?void 0:r.details);this.loadPlaylist(n)},a.selectInitialTrack=function(){var o=this.tracksInGroup;console.assert(o.length,"Initial audio track should be selected when tracks are known");var i=this.trackName,r=this.findTrackId(i)||this.findTrackId();r!==-1?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},a.findTrackId=function(o){for(var i=this.tracksInGroup,r=0;r<i.length;r++){var t=i[r];if((!this.selectDefaultTrack||t.default)&&(!o||o===t.name))return t.id}return-1},a.loadPlaylist=function(o){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var r=i.id,t=i.groupId,E=i.url;if(o)try{E=o.addDirectives(E)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(V.Events.AUDIO_TRACK_LOADING,{url:E,id:r,groupId:t,deliveryDirectives:o||null})}},e(s,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(o){this.selectDefaultTrack=!1,this.setAudioTrack(o)}}]),s}(O.default);G.default=v},"./src/controller/base-playlist-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return e});var V=D("./src/polyfills/number.ts"),F=D("./src/types/level.ts"),O=D("./src/controller/level-helper.ts"),X=D("./src/utils/logger.ts"),P=D("./src/errors.ts"),e=function(){function R(v,u){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=X.logger.log.bind(X.logger,u+":"),this.warn=X.logger.warn.bind(X.logger,u+":"),this.hls=v}var m=R.prototype;return m.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},m.onError=function(u,s){s.fatal&&s.type===P.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},m.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},m.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},m.stopLoad=function(){this.canLoad=!1,this.clearTimer()},m.switchParams=function(u,s){var a=s==null?void 0:s.renditionReports;if(a)for(var A=0;A<a.length;A++){var o=a[A],i=""+o.URI;if(i===u.substr(-i.length)){var r=parseInt(o["LAST-MSN"]),t=parseInt(o["LAST-PART"]);if(s&&this.hls.config.lowLatencyMode){var E=Math.min(s.age-s.partTarget,s.targetduration);t!==void 0&&E>s.partTarget&&(t+=1)}if(Object(V.isFiniteNumber)(r))return new F.HlsUrlParameters(r,Object(V.isFiniteNumber)(t)?t:void 0,F.HlsSkip.No)}}},m.loadPlaylist=function(u){},m.shouldLoadTrack=function(u){return this.canLoad&&u&&!!u.url&&(!u.details||u.details.live)},m.playlistLoaded=function(u,s,a){var A=this,o=s.details,i=s.stats,r=i.loading.end?Math.max(0,self.performance.now()-i.loading.end):0;if(o.advancedDateTime=Date.now()-r,o.live||a!=null&&a.live){if(o.reloaded(a),a&&this.log("live playlist "+u+" "+(o.advanced?"REFRESHED "+o.lastPartSn+"-"+o.lastPartIndex:"MISSED")),a&&o.fragments.length>0&&Object(O.mergeDetails)(a,o),!this.canLoad||!o.live)return;var t,E=void 0,_=void 0;if(o.canBlockReload&&o.endSN&&o.advanced){var y=this.hls.config.lowLatencyMode,B=o.lastPartSn,C=o.endSN,d=o.lastPartIndex,n=d!==-1,l=B===C,c=y?0:d;n?(E=l?C+1:B,_=l?c:d+1):E=C+1;var b=o.age,g=b+o.ageHeader,h=Math.min(g-o.partTarget,o.targetduration*1.5);if(h>0){if(a&&h>a.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+a.tuneInGoal+" to: "+h+" with playlist age: "+o.age),h=0;else{var L=Math.floor(h/o.targetduration);if(E+=L,_!==void 0){var N=Math.round(h%o.targetduration/o.partTarget);_+=N}this.log("CDN Tune-in age: "+o.ageHeader+"s last advanced "+b.toFixed(2)+"s goal: "+h+" skip sn "+L+" to part "+_)}o.tuneInGoal=h}if(t=this.getDeliveryDirectives(o,s.deliveryDirectives,E,_),y||!l){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(o,s.deliveryDirectives,E,_);var T=Object(O.computeReloadInterval)(o,i);E!==void 0&&o.canBlockReload&&(T-=o.partTarget||1),this.log("reload live playlist "+u+" in "+Math.round(T)+" ms"),this.timer=self.setTimeout(function(){return A.loadPlaylist(t)},T)}else this.clearTimer()},m.getDeliveryDirectives=function(u,s,a,A){var o=Object(F.getSkipValue)(u,a);return s!=null&&s.skip&&u.deltaUpdateFailed&&(a=s.msn,A=s.part,o=F.HlsSkip.No),new F.HlsUrlParameters(a,A,o)},m.retryLoadingOrFail=function(u){var s=this,a=this.hls.config,A=this.retryCount<a.levelLoadingMaxRetry;if(A){var o;if(this.retryCount++,u.details.indexOf("LoadTimeOut")>-1&&(o=u.context)!==null&&o!==void 0&&o.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+u.details+'"'),this.loadPlaylist();else{var i=Math.min(Math.pow(2,this.retryCount)*a.levelLoadingRetryDelay,a.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return s.loadPlaylist()},i),this.warn("retry playlist loading #"+this.retryCount+" in "+i+' ms after "'+u.details+'"')}}else this.warn('cannot recover from error "'+u.details+'"'),this.clearTimer(),u.fatal=!0;return A},R}()},"./src/controller/base-stream-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"State",function(){return C}),D.d(G,"default",function(){return d});var V=D("./src/polyfills/number.ts"),F=D("./src/task-loop.ts"),O=D("./src/controller/fragment-tracker.ts"),X=D("./src/utils/buffer-helper.ts"),P=D("./src/utils/logger.ts"),e=D("./src/events.ts"),R=D("./src/errors.ts"),m=D("./src/types/transmuxer.ts"),v=D("./src/utils/mp4-tools.ts"),u=D("./src/utils/discontinuities.ts"),s=D("./src/controller/fragment-finders.ts"),a=D("./src/controller/level-helper.ts"),A=D("./src/loader/fragment-loader.ts"),o=D("./src/crypt/decrypter.ts"),i=D("./src/utils/time-ranges.ts"),r=D("./src/types/loader.ts");function t(n,l){for(var c=0;c<l.length;c++){var b=l[c];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(n,b.key,b)}}function E(n,l,c){return l&&t(n.prototype,l),c&&t(n,c),n}function _(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function y(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,B(n,l)}function B(n,l){return B=Object.setPrototypeOf||function(b,g){return b.__proto__=g,b},B(n,l)}var C={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",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},d=function(n){y(l,n);function l(b,g,h){var L;return L=n.call(this)||this,L.hls=void 0,L.fragPrevious=null,L.fragCurrent=null,L.fragmentTracker=void 0,L.transmuxer=null,L._state=C.STOPPED,L.media=void 0,L.mediaBuffer=void 0,L.config=void 0,L.bitrateTest=!1,L.lastCurrentTime=0,L.nextLoadPosition=0,L.startPosition=0,L.loadedmetadata=!1,L.fragLoadError=0,L.retryDate=0,L.levels=null,L.fragmentLoader=void 0,L.levelLastLoaded=null,L.startFragRequested=!1,L.decrypter=void 0,L.initPTS=[],L.onvseeking=null,L.onvended=null,L.logPrefix="",L.log=void 0,L.warn=void 0,L.logPrefix=h,L.log=P.logger.log.bind(P.logger,h+":"),L.warn=P.logger.warn.bind(P.logger,h+":"),L.hls=b,L.fragmentLoader=new A.default(b.config),L.fragmentTracker=g,L.config=b.config,L.decrypter=new o.default(b,b.config),b.on(e.Events.KEY_LOADED,L.onKeyLoaded,_(L)),L}var c=l.prototype;return c.doTick=function(){this.onTickEnd()},c.onTickEnd=function(){},c.startLoad=function(g){},c.stopLoad=function(){this.fragmentLoader.abort();var g=this.fragCurrent;g&&this.fragmentTracker.removeFragment(g),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=C.STOPPED},c._streamEnded=function(g,h){var L=this.fragCurrent,N=this.fragmentTracker;if(!h.live&&L&&L.sn===h.endSN&&!g.nextStart){var T=N.getState(L);return T===O.FragmentState.PARTIAL||T===O.FragmentState.OK}return!1},c.onMediaAttached=function(g,h){var L=this.media=this.mediaBuffer=h.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),L.addEventListener("seeking",this.onvseeking),L.addEventListener("ended",this.onvended);var N=this.config;this.levels&&N.autoStartLoad&&this.state===C.STOPPED&&this.startLoad(N.startPosition)},c.onMediaDetaching=function(){var g=this.media;g!=null&&g.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),g&&(g.removeEventListener("seeking",this.onvseeking),g.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onMediaSeeking=function(){var g=this.config,h=this.fragCurrent,L=this.media,N=this.mediaBuffer,T=this.state,M=L?L.currentTime:0,W=X.BufferHelper.bufferInfo(N||L,M,g.maxBufferHole);if(this.log("media seeking to "+(Object(V.isFiniteNumber)(M)?M.toFixed(3):M)+", state: "+T),T===C.ENDED)this.resetLoadingState();else if(h&&!W.len){var U=g.maxFragLookUpTolerance,Y=h.start-U,ne=h.start+h.duration+U,me=M>ne;(M<Y||me)&&(me&&h.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),h.loader.abort()),this.resetLoadingState())}L&&(this.lastCurrentTime=M),!this.loadedmetadata&&!W.len&&(this.nextLoadPosition=this.startPosition=M),this.tickImmediate()},c.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},c.onKeyLoaded=function(g,h){if(this.state!==C.KEY_LOADING||h.frag!==this.fragCurrent||!this.levels)return;this.state=C.IDLE;var L=this.levels[h.frag.level].details;L&&this.loadFragment(h.frag,L,h.frag.start)},c.onHandlerDestroying=function(){this.stopLoad(),n.prototype.onHandlerDestroying.call(this)},c.onHandlerDestroyed=function(){this.state=C.STOPPED,this.hls.off(e.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,n.prototype.onHandlerDestroyed.call(this)},c.loadKey=function(g,h){this.log("Loading key for "+g.sn+" of ["+h.startSN+"-"+h.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level),this.state=C.KEY_LOADING,this.fragCurrent=g,this.hls.trigger(e.Events.KEY_LOADING,{frag:g})},c.loadFragment=function(g,h,L){this._loadFragForPlayback(g,h,L)},c._loadFragForPlayback=function(g,h,L){var N=this,T=function(W){if(N.fragContextChanged(g)){N.warn("Fragment "+g.sn+(W.part?" p: "+W.part.index:"")+" of level "+g.level+" was dropped during download."),N.fragmentTracker.removeFragment(g);return}g.stats.chunkCount++,N._handleFragmentLoadProgress(W)};this._doFragLoad(g,h,L,T).then(function(M){if(!M)return;N.fragLoadError=0;var W=N.state;if(N.fragContextChanged(g)){(W===C.FRAG_LOADING||W===C.BACKTRACKING||!N.fragCurrent&&W===C.PARSING)&&(N.fragmentTracker.removeFragment(g),N.state=C.IDLE);return}if("payload"in M&&(N.log("Loaded fragment "+g.sn+" of level "+g.level),N.hls.trigger(e.Events.FRAG_LOADED,M),N.state===C.BACKTRACKING)){N.fragmentTracker.backtrack(g,M),N.resetFragmentLoading(g);return}N._handleFragmentLoadComplete(M)}).catch(function(M){N.warn(M),N.resetFragmentLoading(g)})},c.flushMainBuffer=function(g,h,L){if(L===void 0&&(L=null),!(g-h))return;var N={startOffset:g,endOffset:h,type:L};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,N)},c._loadInitSegment=function(g){var h=this;this._doFragLoad(g).then(function(L){if(!L||h.fragContextChanged(g)||!h.levels)throw new Error("init load aborted");return L}).then(function(L){var N=h.hls,T=L.payload,M=g.decryptdata;if(T&&T.byteLength>0&&M&&M.key&&M.iv&&M.method==="AES-128"){var W=self.performance.now();return h.decrypter.webCryptoDecrypt(new Uint8Array(T),M.key.buffer,M.iv.buffer).then(function(U){var Y=self.performance.now();return N.trigger(e.Events.FRAG_DECRYPTED,{frag:g,payload:U,stats:{tstart:W,tdecrypt:Y}}),L.payload=U,L})}return L}).then(function(L){var N=h.fragCurrent,T=h.hls,M=h.levels;if(!M)throw new Error("init load aborted, missing levels");var W=M[g.level].details;console.assert(W,"Level details are defined when init segment is loaded");var U=g.stats;h.state=C.IDLE,h.fragLoadError=0,g.data=new Uint8Array(L.payload),U.parsing.start=U.buffering.start=self.performance.now(),U.parsing.end=U.buffering.end=self.performance.now(),L.frag===N&&T.trigger(e.Events.FRAG_BUFFERED,{stats:U,frag:N,part:null,id:g.type}),h.tick()}).catch(function(L){h.warn(L),h.resetFragmentLoading(g)})},c.fragContextChanged=function(g){var h=this.fragCurrent;return!g||!h||g.level!==h.level||g.sn!==h.sn||g.urlId!==h.urlId},c.fragBufferedComplete=function(g,h){var L=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+g.type+" sn: "+g.sn+(h?" part: "+h.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level+" "+i.default.toString(X.BufferHelper.getBuffered(L))),this.state=C.IDLE,this.tick()},c._handleFragmentLoadComplete=function(g){var h=this.transmuxer;if(!h)return;var L=g.frag,N=g.part,T=g.partsLoaded,M=!T||T.length===0||T.some(function(U){return!U}),W=new m.ChunkMetadata(L.level,L.sn,L.stats.chunkCount+1,0,N?N.index:-1,!M);h.flush(W)},c._handleFragmentLoadProgress=function(g){},c._doFragLoad=function(g,h,L,N){var T=this;if(L===void 0&&(L=null),!this.levels)throw new Error("frag load aborted, missing levels");if(L=Math.max(g.start,L||0),this.config.lowLatencyMode&&h){var M=h.partList;if(M&&N){L>g.end&&h.fragmentHint&&(g=h.fragmentHint);var W=this.getNextPart(M,g,L);if(W>-1){var U=M[W];return this.log("Loading part sn: "+g.sn+" p: "+U.index+" cc: "+g.cc+" of playlist ["+h.startSN+"-"+h.endSN+"] parts [0-"+W+"-"+(M.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(L.toFixed(3))),this.nextLoadPosition=U.start+U.duration,this.state=C.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:g,part:M[W],targetBufferTime:L}),this.doFragPartsLoad(g,M,W,N).catch(function(Y){return T.handleFragLoadError(Y)})}else if(!g.url||this.loadedEndOfParts(M,L))return Promise.resolve(null)}}return this.log("Loading fragment "+g.sn+" cc: "+g.cc+" "+(h?"of ["+h.startSN+"-"+h.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(L.toFixed(3))),Object(V.isFiniteNumber)(g.sn)&&!this.bitrateTest&&(this.nextLoadPosition=g.start+g.duration),this.state=C.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:g,targetBufferTime:L}),this.fragmentLoader.load(g,N).catch(function(Y){return T.handleFragLoadError(Y)})},c.doFragPartsLoad=function(g,h,L,N){var T=this;return new Promise(function(M,W){var U=[],Y=function ne(me){var ge=h[me];T.fragmentLoader.loadPart(g,ge,N).then(function(Oe){U[ge.index]=Oe;var Se=Oe.part;T.hls.trigger(e.Events.FRAG_LOADED,Oe);var Be=h[me+1];if(Be&&Be.fragment===g)ne(me+1);else return M({frag:g,part:Se,partsLoaded:U})}).catch(W)};Y(L)})},c.handleFragLoadError=function(g){var h=g.data;return h&&h.details===R.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(h.frag,h.part):this.hls.trigger(e.Events.ERROR,h),null},c._handleTransmuxerFlush=function(g){var h=this.getCurrentContext(g);if(!h||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var L=h.frag,N=h.part,T=h.level,M=self.performance.now();L.stats.parsing.end=M,N&&(N.stats.parsing.end=M),this.updateLevelTiming(L,N,T,g.partial)},c.getCurrentContext=function(g){var h=this.levels,L=g.level,N=g.sn,T=g.part;if(!h||!h[L])return this.warn("Levels object was unset while buffering fragment "+N+" of level "+L+". The current chunk will not be buffered."),null;var M=h[L],W=T>-1?Object(a.getPartWith)(M,N,T):null,U=W?W.fragment:Object(a.getFragmentWithSN)(M,N,this.fragCurrent);return U?{frag:U,part:W,level:M}:null},c.bufferFragmentData=function(g,h,L,N){if(!g||this.state!==C.PARSING)return;var T=g.data1,M=g.data2,W=T;if(T&&M&&(W=Object(v.appendUint8Array)(T,M)),!W||!W.length)return;var U={type:g.type,frag:h,part:L,chunkMeta:N,parent:h.type,data:W};this.hls.trigger(e.Events.BUFFER_APPENDING,U),g.dropped&&g.independent&&!L&&this.flushBufferGap(h)},c.flushBufferGap=function(g){var h=this.media;if(!h)return;if(!X.BufferHelper.isBuffered(h,h.currentTime)){this.flushMainBuffer(0,g.start);return}var L=h.currentTime,N=X.BufferHelper.bufferInfo(h,L,0),T=g.duration,M=Math.min(this.config.maxFragLookUpTolerance*2,T*.25),W=Math.max(Math.min(g.start-M,N.end-M),L+M);g.start-W>M&&this.flushMainBuffer(W,g.start)},c.getFwdBufferInfo=function(g,h){var L=this.config,N=this.getLoadPosition();if(!Object(V.isFiniteNumber)(N))return null;var T=X.BufferHelper.bufferInfo(g,N,L.maxBufferHole);if(T.len===0&&T.nextStart!==void 0){var M=this.fragmentTracker.getBufferedFrag(N,h);if(M&&T.nextStart<M.end)return X.BufferHelper.bufferInfo(g,N,Math.max(T.nextStart,L.maxBufferHole))}return T},c.getMaxBufferLength=function(g){var h=this.config,L;return g?L=Math.max(8*h.maxBufferSize/g,h.maxBufferLength):L=h.maxBufferLength,Math.min(L,h.maxMaxBufferLength)},c.reduceMaxBufferLength=function(g){var h=this.config,L=g||h.maxBufferLength;return h.maxMaxBufferLength>=L?(h.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+h.maxMaxBufferLength+"s"),!0):!1},c.getNextFragment=function(g,h){var L,N,T=h.fragments,M=T.length;if(!M)return null;var W=this.config,U=T[0].start,Y;if(h.live){var ne=W.initialLiveManifestSize;if(M<ne)return this.warn("Not enough fragments to start playback (have: "+M+", need: "+ne+")"),null;!h.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(Y=this.getInitialLiveFragment(h,T),this.startPosition=Y?this.hls.liveSyncPosition||Y.start:g)}else g<=U&&(Y=T[0]);if(!Y){var me=W.lowLatencyMode?h.partEnd:h.fragmentEnd;Y=this.getFragmentAtPosition(g,me,h)}return(L=Y)!==null&&L!==void 0&&L.initSegment&&!((N=Y)!==null&&N!==void 0&&N.initSegment.data)&&!this.bitrateTest&&(Y=Y.initSegment),Y},c.getNextPart=function(g,h,L){for(var N=-1,T=!1,M=!0,W=0,U=g.length;W<U;W++){var Y=g[W];if(M=M&&!Y.independent,N>-1&&L<Y.start)break;var ne=Y.loaded;!ne&&(T||Y.independent||M)&&Y.fragment===h&&(N=W),T=ne}return N},c.loadedEndOfParts=function(g,h){var L=g[g.length-1];return L&&h>L.start&&L.loaded},c.getInitialLiveFragment=function(g,h){var L=this.fragPrevious,N=null;if(L){if(g.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+L.programDateTime),N=Object(s.findFragmentByPDT)(h,L.endProgramDateTime,this.config.maxFragLookUpTolerance)),!N){var T=L.sn+1;if(T>=g.startSN&&T<=g.endSN){var M=h[T-g.startSN];L.cc===M.cc&&(N=M,this.log("Live playlist, switching playlist, load frag with next SN: "+N.sn))}N||(N=Object(s.findFragWithCC)(h,L.cc),N&&this.log("Live playlist, switching playlist, load frag with same CC: "+N.sn))}}else{var W=this.hls.liveSyncPosition;W!==null&&(N=this.getFragmentAtPosition(W,this.bitrateTest?g.fragmentEnd:g.edge,g))}return N},c.getFragmentAtPosition=function(g,h,L){var N=this.config,T=this.fragPrevious,M=L.fragments,W=L.endSN,U=L.fragmentHint,Y=N.maxFragLookUpTolerance,ne=!!(N.lowLatencyMode&&L.partList&&U);ne&&U&&!this.bitrateTest&&(M=M.concat(U),W=U.sn);var me;if(g<h){var ge=g>h-Y?0:Y;me=Object(s.findFragmentByPTS)(T,M,g,ge)}else me=M[M.length-1];if(me){var Oe=me.sn-L.startSN,Se=T&&me.level===T.level,Be=M[Oe+1],Ne=this.fragmentTracker.getState(me);if(Ne===O.FragmentState.BACKTRACKED){me=null;for(var ke=Oe;M[ke]&&this.fragmentTracker.getState(M[ke])===O.FragmentState.BACKTRACKED;)T?me=M[ke--]:me=M[--ke];me||(me=Be)}else T&&me.sn===T.sn&&!ne&&(Se&&(me.sn<W&&this.fragmentTracker.getState(Be)!==O.FragmentState.OK?(this.log("SN "+me.sn+" just loaded, load next one: "+Be.sn),me=Be):me=null))}return me},c.synchronizeToLiveEdge=function(g){var h=this.config,L=this.media;if(!L)return;var N=this.hls.liveSyncPosition,T=L.currentTime,M=g.fragments[0].start,W=g.edge,U=T>=M-h.maxFragLookUpTolerance&&T<=W;if(N!==null&&L.duration>N&&(T<N||!U)){var Y=h.liveMaxLatencyDuration!==void 0?h.liveMaxLatencyDuration:h.liveMaxLatencyDurationCount*g.targetduration;(!U&&L.readyState<4||T<W-Y)&&(this.loadedmetadata||(this.nextLoadPosition=N),L.readyState&&(this.warn("Playback: "+T.toFixed(3)+" is located too far from the end of live sliding playlist: "+W+", reset currentTime to : "+N.toFixed(3)),L.currentTime=N))}},c.alignPlaylists=function(g,h){var L=this.levels,N=this.levelLastLoaded,T=this.fragPrevious,M=N!==null?L[N]:null,W=g.fragments.length;if(!W)return this.warn("No fragments in live playlist"),0;var U=g.fragments[0].start,Y=!h,ne=g.alignedSliding&&Object(V.isFiniteNumber)(U);if(Y||!ne&&!U){Object(u.alignStream)(T,M,g);var me=g.fragments[0].start;return this.log("Live playlist sliding: "+me.toFixed(2)+" start-sn: "+(h?h.startSN:"na")+"->"+g.startSN+" prev-sn: "+(T?T.sn:"na")+" fragments: "+W),me}return U},c.waitForCdnTuneIn=function(g){var h=3;return g.live&&g.canBlockReload&&g.tuneInGoal>Math.max(g.partHoldBack,g.partTarget*h)},c.setStartPosition=function(g,h){var L=this.startPosition;if(L<h&&(L=-1),L===-1||this.lastCurrentTime===-1){var N=g.startTimeOffset;Object(V.isFiniteNumber)(N)?(L=h+N,N<0&&(L+=g.totalduration),L=Math.min(Math.max(h,L),h+g.totalduration),this.log("Start time offset "+N+" found in playlist, adjust startPosition to "+L),this.startPosition=L):g.live?L=this.hls.liveSyncPosition||h:this.startPosition=L=0,this.lastCurrentTime=L}this.nextLoadPosition=L},c.getLoadPosition=function(){var g=this.media,h=0;return this.loadedmetadata&&g?h=g.currentTime:this.nextLoadPosition&&(h=this.nextLoadPosition),h},c.handleFragLoadAborted=function(g,h){this.transmuxer&&g.sn!=="initSegment"&&g.stats.aborted&&(this.warn("Fragment "+g.sn+(h?" part"+h.index:"")+" of level "+g.level+" was aborted"),this.resetFragmentLoading(g))},c.resetFragmentLoading=function(g){(!this.fragCurrent||!this.fragContextChanged(g))&&(this.state=C.IDLE)},c.onFragmentOrKeyLoadError=function(g,h){if(h.fatal)return;var L=h.frag;if(!L||L.type!==g)return;var N=this.fragCurrent;console.assert(N&&L.sn===N.sn&&L.level===N.level&&L.urlId===N.urlId,"Frag load error must match current frag to retry");var T=this.config;if(this.fragLoadError+1<=T.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(L.level))return;var M=Math.min(Math.pow(2,this.fragLoadError)*T.fragLoadingRetryDelay,T.fragLoadingMaxRetryTimeout);this.warn("Fragment "+L.sn+" of "+g+" "+L.level+" failed to load, retrying in "+M+"ms"),this.retryDate=self.performance.now()+M,this.fragLoadError++,this.state=C.FRAG_LOADING_WAITING_RETRY}else h.levelRetry?(g===r.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=C.IDLE):(P.logger.error(h.details+" reaches max retry, redispatch as fatal ..."),h.fatal=!0,this.hls.stopLoad(),this.state=C.ERROR)},c.afterBufferFlushed=function(g,h,L){if(!g)return;var N=X.BufferHelper.getBuffered(g);this.fragmentTracker.detectEvictedFragments(h,N,L),this.state===C.ENDED&&this.resetLoadingState()},c.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE},c.resetLiveStartWhenNotLoaded=function(g){if(!this.loadedmetadata){this.startFragRequested=!1;var h=this.levels?this.levels[g].details:null;if(h!=null&&h.live)return this.startPosition=-1,this.setStartPosition(h,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},c.updateLevelTiming=function(g,h,L,N){var T=this,M=L.details;console.assert(!!M,"level.details must be defined");var W=Object.keys(g.elementaryStreams).reduce(function(U,Y){var ne=g.elementaryStreams[Y];if(ne){var me=ne.endPTS-ne.startPTS;if(me<=0)return T.warn("Could not parse fragment "+g.sn+" "+Y+" duration reliably ("+me+") resetting transmuxer to fallback to playlist timing"),T.resetTransmuxer(),U||!1;var ge=N?0:Object(a.updateFragPTSDTS)(M,g,ne.startPTS,ne.endPTS,ne.startDTS,ne.endDTS);return T.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:M,level:L,drift:ge,type:Y,frag:g,start:ne.startPTS,end:ne.endPTS}),!0}return U},!1);W?(this.state=C.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:g,part:h})):this.resetLoadingState()},c.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},E(l,[{key:"state",get:function(){return this._state},set:function(g){var h=this._state;h!==g&&(this._state=g,this.log(h+"->"+g))}}]),l}(F.default)},"./src/controller/buffer-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s});var V=D("./src/polyfills/number.ts"),F=D("./src/events.ts"),O=D("./src/utils/logger.ts"),X=D("./src/errors.ts"),P=D("./src/utils/buffer-helper.ts"),e=D("./src/utils/mediasource-helper.ts"),R=D("./src/loader/fragment.ts"),m=D("./src/controller/buffer-operation-queue.ts"),v=Object(e.getMediaSource)(),u=/([ha]vc.)(?:\.[^.,]+)+/,s=function(){function a(o){var i=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.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var r=i.hls,t=i.media,E=i.mediaSource;O.logger.log("[buffer-controller]: Media source opened"),t&&(i.updateMediaElementDuration(),r.trigger(F.Events.MEDIA_ATTACHED,{media:t})),E&&E.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){O.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){O.logger.log("[buffer-controller]: Media source ended")},this.hls=o,this._initSourceBuffer(),this.registerListeners()}var A=a.prototype;return A.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},A.destroy=function(){this.unregisterListeners(),this.details=null},A.registerListeners=function(){var i=this.hls;i.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(F.Events.BUFFER_RESET,this.onBufferReset,this),i.on(F.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.on(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(F.Events.BUFFER_EOS,this.onBufferEos,this),i.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(F.Events.FRAG_PARSED,this.onFragParsed,this),i.on(F.Events.FRAG_CHANGED,this.onFragChanged,this)},A.unregisterListeners=function(){var i=this.hls;i.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(F.Events.BUFFER_RESET,this.onBufferReset,this),i.off(F.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.off(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(F.Events.BUFFER_EOS,this.onBufferEos,this),i.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(F.Events.FRAG_PARSED,this.onFragParsed,this),i.off(F.Events.FRAG_CHANGED,this.onFragChanged,this)},A._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new m.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},A.onManifestParsed=function(i,r){var t=2;(r.audio&&!r.video||!r.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,O.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},A.onMediaAttaching=function(i,r){var t=this.media=r.media;if(t&&v){var E=this.mediaSource=new v;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(E),this._objectUrl=t.src}},A.onMediaDetaching=function(){var i=this.media,r=this.mediaSource,t=this._objectUrl;if(r){if(O.logger.log("[buffer-controller]: media source detaching"),r.readyState==="open")try{r.endOfStream()}catch(E){O.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),r.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("sourceended",this._onMediaSourceEnded),r.removeEventListener("sourceclose",this._onMediaSourceClose),i&&(t&&self.URL.revokeObjectURL(t),i.src===t?(i.removeAttribute("src"),i.load()):O.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(F.Events.MEDIA_DETACHED,void 0)},A.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(r){var t=i.sourceBuffer[r];try{t&&(i.removeBufferListeners(r),i.mediaSource&&i.mediaSource.removeSourceBuffer(t),i.sourceBuffer[r]=void 0)}catch(E){O.logger.warn("[buffer-controller]: Failed to reset the "+r+" buffer",E)}}),this._initSourceBuffer()},A.onBufferCodecs=function(i,r){var t=this,E=this.getSourceBufferTypes().length;if(Object.keys(r).forEach(function(_){if(E){var y=t.tracks[_];if(y&&typeof y.buffer.changeType=="function"){var B=r[_],C=B.codec,d=B.levelCodec,n=B.container,l=(y.levelCodec||y.codec).replace(u,"$1"),c=(d||C).replace(u,"$1");if(l!==c){var b=n+";codecs="+(d||C);t.appendChangeType(_,b)}}}else t.pendingTracks[_]=r[_]}),E)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},A.appendChangeType=function(i,r){var t=this,E=this.operationQueue,_={execute:function(){var B=t.sourceBuffer[i];B&&(O.logger.log("[buffer-controller]: changing "+i+" sourceBuffer type to "+r),B.changeType(r)),E.shiftAndExecuteNext(i)},onStart:function(){},onComplete:function(){},onError:function(B){O.logger.warn("[buffer-controller]: Failed to change "+i+" SourceBuffer type",B)}};E.append(_,i)},A.onBufferAppending=function(i,r){var t=this,E=this.hls,_=this.operationQueue,y=this.tracks,B=r.data,C=r.type,d=r.frag,n=r.part,l=r.chunkMeta,c=l.buffering[C],b=self.performance.now();c.start=b;var g=d.stats.buffering,h=n?n.stats.buffering:null;g.start===0&&(g.start=b),h&&h.start===0&&(h.start=b);var L=y.audio,N=C==="audio"&&l.id===1&&(L==null?void 0:L.container)==="audio/mpeg",T={execute:function(){if(c.executeStart=self.performance.now(),N){var W=t.sourceBuffer[C];if(W){var U=d.start-W.timestampOffset;Math.abs(U)>=.1&&(O.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+U+") sn: "+d.sn+")"),W.timestampOffset=d.start)}}t.appendExecutor(B,C)},onStart:function(){},onComplete:function(){var W=self.performance.now();c.executeEnd=c.end=W,g.first===0&&(g.first=W),h&&h.first===0&&(h.first=W);var U=t.sourceBuffer,Y={};for(var ne in U)Y[ne]=P.BufferHelper.getBuffered(U[ne]);t.appendError=0,t.hls.trigger(F.Events.BUFFER_APPENDED,{type:C,frag:d,part:n,chunkMeta:l,parent:d.type,timeRanges:Y})},onError:function(W){O.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",W);var U={type:X.ErrorTypes.MEDIA_ERROR,parent:d.type,details:X.ErrorDetails.BUFFER_APPEND_ERROR,err:W,fatal:!1};W.code===DOMException.QUOTA_EXCEEDED_ERR?U.details=X.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,U.details=X.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>E.config.appendErrorMaxRetry&&(O.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),U.fatal=!0)),E.trigger(F.Events.ERROR,U)}};_.append(T,C)},A.onBufferFlushing=function(i,r){var t=this,E=this.operationQueue,_=function(B){return{execute:t.removeExecutor.bind(t,B,r.startOffset,r.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(F.Events.BUFFER_FLUSHED,{type:B})},onError:function(d){O.logger.warn("[buffer-controller]: Failed to remove from "+B+" SourceBuffer",d)}}};r.type?E.append(_(r.type),r.type):this.getSourceBufferTypes().forEach(function(y){E.append(_(y),y)})},A.onFragParsed=function(i,r){var t=this,E=r.frag,_=r.part,y=[],B=_?_.elementaryStreams:E.elementaryStreams;B[R.ElementaryStreamTypes.AUDIOVIDEO]?y.push("audiovideo"):(B[R.ElementaryStreamTypes.AUDIO]&&y.push("audio"),B[R.ElementaryStreamTypes.VIDEO]&&y.push("video"));var C=function(){var n=self.performance.now();E.stats.buffering.end=n,_&&(_.stats.buffering.end=n);var l=_?_.stats:E.stats;t.hls.trigger(F.Events.FRAG_BUFFERED,{frag:E,part:_,stats:l,id:E.type})};y.length===0&&O.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+E.type+" level: "+E.level+" sn: "+E.sn),this.blockBuffers(C,y)},A.onFragChanged=function(i,r){this.flushBackBuffer()},A.onBufferEos=function(i,r){var t=this,E=this.getSourceBufferTypes().reduce(function(_,y){var B=t.sourceBuffer[y];return(!r.type||r.type===y)&&(B&&!B.ended&&(B.ended=!0,O.logger.log("[buffer-controller]: "+y+" sourceBuffer now EOS"))),_&&!!(!B||B.ended)},!0);E&&this.blockBuffers(function(){var _=t.mediaSource;if(!_||_.readyState!=="open")return;_.endOfStream()})},A.onLevelUpdated=function(i,r){var t=r.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},A.flushBackBuffer=function(){var i=this.hls,r=this.details,t=this.media,E=this.sourceBuffer;if(!t||r===null)return;var _=this.getSourceBufferTypes();if(!_.length)return;var y=r.live&&i.config.liveBackBufferLength!==null?i.config.liveBackBufferLength:i.config.backBufferLength;if(!Object(V.isFiniteNumber)(y)||y<0)return;var B=t.currentTime,C=r.levelTargetDuration,d=Math.max(y,C),n=Math.floor(B/C)*C-d;_.forEach(function(l){var c=E[l];if(c){var b=P.BufferHelper.getBuffered(c);b.length>0&&n>b.start(0)&&(i.trigger(F.Events.BACK_BUFFER_REACHED,{bufferEnd:n}),r.live&&i.trigger(F.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n}),i.trigger(F.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:l}))}})},A.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var i=this.details,r=this.hls,t=this.media,E=this.mediaSource,_=i.fragments[0].start+i.totalduration,y=t.duration,B=Object(V.isFiniteNumber)(E.duration)?E.duration:0;i.live&&r.config.liveDurationInfinity?(O.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.duration=Infinity,this.updateSeekableRange(i)):(_>B&&_>y||!Object(V.isFiniteNumber)(y))&&(O.logger.log("[buffer-controller]: Updating Media Source duration to "+_.toFixed(3)),E.duration=_)},A.updateSeekableRange=function(i){var r=this.mediaSource,t=i.fragments,E=t.length;if(E&&i.live&&r!==null&&r!==void 0&&r.setLiveSeekableRange){var _=Math.max(0,t[0].start),y=Math.max(_,_+i.totalduration);r.setLiveSeekableRange(_,y)}},A.checkPendingTracks=function(){var i=this.bufferCodecEventsExpected,r=this.operationQueue,t=this.pendingTracks,E=Object.keys(t).length;if(E&&!i||E===2){this.createSourceBuffers(t),this.pendingTracks={};var _=this.getSourceBufferTypes();if(_.length===0){this.hls.trigger(F.Events.ERROR,{type:X.ErrorTypes.MEDIA_ERROR,details:X.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}_.forEach(function(y){r.executeNext(y)})}},A.createSourceBuffers=function(i){var r=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var _ in i)if(!r[_]){var y=i[_];if(!y)throw Error("source buffer exists for track "+_+", however track does not");var B=y.levelCodec||y.codec,C=y.container+";codecs="+B;O.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var d=r[_]=t.addSourceBuffer(C),n=_;this.addBufferListener(n,"updatestart",this._onSBUpdateStart),this.addBufferListener(n,"updateend",this._onSBUpdateEnd),this.addBufferListener(n,"error",this._onSBUpdateError),this.tracks[_]={buffer:d,codec:B,container:y.container,levelCodec:y.levelCodec,id:y.id},E++}catch(l){O.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+l.message),this.hls.trigger(F.Events.ERROR,{type:X.ErrorTypes.MEDIA_ERROR,details:X.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:l,mimeType:C})}}E&&this.hls.trigger(F.Events.BUFFER_CREATED,{tracks:this.tracks})},A._onSBUpdateStart=function(i){var r=this.operationQueue,t=r.current(i);t.onStart()},A._onSBUpdateEnd=function(i){var r=this.operationQueue,t=r.current(i);t.onComplete(),r.shiftAndExecuteNext(i)},A._onSBUpdateError=function(i,r){O.logger.error("[buffer-controller]: "+i+" SourceBuffer error",r),this.hls.trigger(F.Events.ERROR,{type:X.ErrorTypes.MEDIA_ERROR,details:X.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(i);t&&t.onError(r)},A.removeExecutor=function(i,r,t){var E=this.media,_=this.mediaSource,y=this.operationQueue,B=this.sourceBuffer,C=B[i];if(!E||!_||!C){O.logger.warn("[buffer-controller]: Attempting to remove from the "+i+" SourceBuffer, but it does not exist"),y.shiftAndExecuteNext(i);return}var d=Object(V.isFiniteNumber)(E.duration)?E.duration:Infinity,n=Object(V.isFiniteNumber)(_.duration)?_.duration:Infinity,l=Math.max(0,r),c=Math.min(t,d,n);c>l?(O.logger.log("[buffer-controller]: Removing ["+l+","+c+"] from the "+i+" SourceBuffer"),console.assert(!C.updating,i+" sourceBuffer must not be updating"),C.remove(l,c)):y.shiftAndExecuteNext(i)},A.appendExecutor=function(i,r){var t=this.operationQueue,E=this.sourceBuffer,_=E[r];if(!_){O.logger.warn("[buffer-controller]: Attempting to append to the "+r+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(r);return}_.ended=!1,console.assert(!_.updating,r+" sourceBuffer must not be updating"),_.appendBuffer(i)},A.blockBuffers=function(i,r){var t=this;if(r===void 0&&(r=this.getSourceBufferTypes()),!r.length){O.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(i);return}var E=this.operationQueue,_=r.map(function(y){return E.appendBlocker(y)});Promise.all(_).then(function(){i(),r.forEach(function(y){var B=t.sourceBuffer[y];(!B||!B.updating)&&E.shiftAndExecuteNext(y)})})},A.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},A.addBufferListener=function(i,r,t){var E=this.sourceBuffer[i];if(!E)return;var _=t.bind(this,i);this.listeners[i].push({event:r,listener:_}),E.addEventListener(r,_)},A.removeBufferListeners=function(i){var r=this.sourceBuffer[i];if(!r)return;this.listeners[i].forEach(function(t){r.removeEventListener(t.event,t.listener)})},a}()},"./src/controller/buffer-operation-queue.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return F});var V=D("./src/utils/logger.ts"),F=function(){function O(P){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=P}var X=O.prototype;return X.append=function(e,R){var m=this.queues[R];m.push(e),m.length===1&&this.buffers[R]&&this.executeNext(R)},X.insertAbort=function(e,R){var m=this.queues[R];m.unshift(e),this.executeNext(R)},X.appendBlocker=function(e){var R,m=new Promise(function(u){R=u}),v={execute:R,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(v,e),m},X.executeNext=function(e){var R=this.buffers,m=this.queues,v=R[e],u=m[e];if(u.length){var s=u[0];try{s.execute()}catch(a){V.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(a),(!v||!v.updating)&&(u.shift(),this.executeNext(e))}}},X.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},X.current=function(e){return this.queues[e][0]},O}()},"./src/controller/cap-level-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts");function F(P,e){for(var R=0;R<e.length;R++){var m=e[R];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(P,m.key,m)}}function O(P,e,R){return e&&F(P.prototype,e),R&&F(P,R),P}var X=function(){function P(R){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=R,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e=P.prototype;return e.setStreamController=function(m){this.streamController=m},e.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},e.registerListeners=function(){var m=this.hls;m.on(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),m.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),m.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.on(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),m.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var m=this.hls;m.off(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),m.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),m.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),m.off(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),m.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(m,v){P.isLevelAllowed(v.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(v.droppedLevel)},e.onMediaAttaching=function(m,v){this.media=v.media instanceof HTMLVideoElement?v.media:null},e.onManifestParsed=function(m,v){var u=this.hls;this.restrictedLevels=[],this.firstLevel=v.firstLevel,u.config.capLevelToPlayerSize&&v.video&&this.startCapping()},e.onBufferCodecs=function(m,v){var u=this.hls;u.config.capLevelToPlayerSize&&v.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var m=this.hls.levels;if(m.length){var v=this.hls;v.autoLevelCapping=this.getMaxLevel(m.length-1),v.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=v.autoLevelCapping}}},e.getMaxLevel=function(m){var v=this,u=this.hls.levels;if(!u.length)return-1;var s=u.filter(function(a,A){return P.isLevelAllowed(A,v.restrictedLevels)&&A<=m});return this.clientRect=null,P.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)},e.startCapping=function(){if(this.timer)return;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()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var m=this.media,v={width:0,height:0};if(m){var u=m.getBoundingClientRect();v.width=u.width,v.height=u.height,!v.width&&!v.height&&(v.width=u.right-u.left||m.width||0,v.height=u.bottom-u.top||m.height||0)}return this.clientRect=v,v},P.isLevelAllowed=function(m,v){return v===void 0&&(v=[]),v.indexOf(m)===-1},P.getMaxLevelByMediaSize=function(m,v,u){if(!m||!m.length)return-1;for(var s=function(r,t){return t?r.width!==t.width||r.height!==t.height:!0},a=m.length-1,A=0;A<m.length;A+=1){var o=m[A];if((o.width>=v||o.height>=u)&&s(o,m[A+1])){a=A;break}}return a},O(P,[{key:"mediaWidth",get:function(){return this.getDimensions().width*P.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*P.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var m=1;try{m=self.devicePixelRatio}catch(v){}return m}}]),P}();G.default=X},"./src/controller/cmcd-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s});var V=D("./src/events.ts"),F=D("./src/types/cmcd.ts"),O=D("./src/utils/buffer-helper.ts"),X=D("./src/utils/logger.ts");function P(a,A){for(var o=0;o<A.length;o++){var i=A[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,i.key,i)}}function e(a,A,o){return A&&P(a.prototype,A),o&&P(a,o),a}function R(a,A){var o=typeof Symbol!="undefined"&&a[Symbol.iterator]||a["@@iterator"];if(o)return(o=o.call(a)).next.bind(o);if(Array.isArray(a)||(o=m(a))||A&&a&&typeof a.length=="number"){o&&(a=o);var i=0;return function(){return i>=a.length?{done:!0}:{done:!1,value:a[i++]}}}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 m(a,A){if(!a)return;if(typeof a=="string")return v(a,A);var o=Object.prototype.toString.call(a).slice(8,-1);if(o==="Object"&&a.constructor&&(o=a.constructor.name),o==="Map"||o==="Set")return Array.from(a);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return v(a,A)}function v(a,A){(A==null||A>a.length)&&(A=a.length);for(var o=0,i=new Array(A);o<A;o++)i[o]=a[o];return i}function u(){return u=Object.assign||function(a){for(var A=1;A<arguments.length;A++){var o=arguments[A];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(a[i]=o[i])}return a},u.apply(this,arguments)}var s=function(){function a(o){var i=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(){i.initialized&&(i.starved=!0),i.buffering=!0},this.onPlaying=function(){i.initialized||(i.initialized=!0),i.buffering=!1},this.applyPlaylistData=function(E){try{i.apply(E,{ot:F.CMCDObjectType.MANIFEST,su:!i.initialized})}catch(_){X.logger.warn("Could not generate manifest CMCD data.",_)}},this.applyFragmentData=function(E){try{var _=E.frag,y=i.hls.levels[_.level],B=i.getObjectType(_),C={d:_.duration*1e3,ot:B};(B===F.CMCDObjectType.VIDEO||B===F.CMCDObjectType.AUDIO||B==F.CMCDObjectType.MUXED)&&(C.br=y.bitrate/1e3,C.tb=i.getTopBandwidth(B),C.bl=i.getBufferLength(B)),i.apply(E,C)}catch(d){X.logger.warn("Could not generate segment CMCD data.",d)}},this.hls=o;var r=this.config=o.config,t=r.cmcd;t!=null&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||a.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var A=a.prototype;return A.registerListeners=function(){var i=this.hls;i.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.on(V.Events.BUFFER_CREATED,this.onBufferCreated,this)},A.unregisterListeners=function(){var i=this.hls;i.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.off(V.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},A.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},A.onMediaAttached=function(i,r){this.media=r.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},A.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},A.onBufferCreated=function(i,r){var t,E;this.audioBuffer=(t=r.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(E=r.tracks.video)===null||E===void 0?void 0:E.buffer},A.createData=function(){var i;return{v:F.CMCDVersion,sf:F.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(i=this.media)===null||i===void 0?void 0:i.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},A.apply=function(i,r){r===void 0&&(r={}),u(r,this.createData());var t=r.ot===F.CMCDObjectType.INIT||r.ot===F.CMCDObjectType.VIDEO||r.ot===F.CMCDObjectType.MUXED;if(this.starved&&t&&(r.bs=!0,r.su=!0,this.starved=!1),r.su==null&&(r.su=this.buffering),this.useHeaders){var E=a.toHeaders(r);if(!Object.keys(E).length)return;i.headers||(i.headers={}),u(i.headers,E)}else{var _=a.toQuery(r);if(!_)return;i.url=a.appendQueryToUri(i.url,_)}},A.getObjectType=function(i){var r=i.type;return r==="subtitle"?F.CMCDObjectType.TIMED_TEXT:i.sn==="initSegment"?F.CMCDObjectType.INIT:r==="audio"?F.CMCDObjectType.AUDIO:r==="main"?this.hls.audioTracks.length?F.CMCDObjectType.VIDEO:F.CMCDObjectType.MUXED:void 0},A.getTopBandwidth=function(i){for(var r=0,t=i===F.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,E=R(t),_;!(_=E()).done;){var y=_.value;y.bitrate>r&&(r=y.bitrate)}return r>0?r:NaN},A.getBufferLength=function(i){var r=this.hls.media,t=i===F.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!r)return NaN;var E=O.BufferHelper.bufferInfo(t,r.currentTime,this.config.maxBufferHole);return E.len*1e3},A.createPlaylistLoader=function(){var i=this.config.pLoader,r=this.applyPlaylistData,t=i||this.config.loader;return function(){function E(y){this.loader=void 0,this.loader=new t(y)}var _=E.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(B,C,d){r(B),this.loader.load(B,C,d)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},A.createFragmentLoader=function(){var i=this.config.fLoader,r=this.applyFragmentData,t=i||this.config.loader;return function(){function E(y){this.loader=void 0,this.loader=new t(y)}var _=E.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(B,C,d){r(B),this.loader.load(B,C,d)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},a.uuid=function(){var i=URL.createObjectURL(new Blob),r=i.toString();return URL.revokeObjectURL(i),r.substr(r.lastIndexOf("/")+1)},a.serialize=function(i){for(var r=[],t=function(N){return!Number.isNaN(N)&&N!=null&&N!==""&&N!==!1},E=function(N){return Math.round(N)},_=function(N){return E(N/100)*100},y=function(N){return encodeURIComponent(N)},B={br:E,d:E,bl:_,dl:_,mtp:_,nor:y,rtp:_,tb:E},C=Object.keys(i||{}).sort(),d=R(C),n;!(n=d()).done;){var l=n.value,c=i[l];if(!t(c))continue;if(l==="v"&&c===1)continue;if(l=="pr"&&c===1)continue;var b=B[l];b&&(c=b(c));var g=typeof c,h=void 0;l==="ot"||l==="sf"||l==="st"?h=l+"="+c:g==="boolean"?h=l:g==="number"?h=l+"="+c:h=l+"="+JSON.stringify(c),r.push(h)}return r.join(",")},a.toHeaders=function(i){for(var r=Object.keys(i),t={},E=["Object","Request","Session","Status"],_=[{},{},{},{}],y={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},B=0,C=r;B<C.length;B++){var d=C[B],n=y[d]!=null?y[d]:1;_[n][d]=i[d]}for(var l=0;l<_.length;l++){var c=a.serialize(_[l]);c&&(t["CMCD-"+E[l]]=c)}return t},a.toQuery=function(i){return"CMCD="+encodeURIComponent(a.serialize(i))},a.appendQueryToUri=function(i,r){if(!r)return i;var t=i.includes("?")?"&":"?";return""+i+t+r},a}()},"./src/controller/eme-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/errors.ts"),O=D("./src/utils/logger.ts"),X=D("./src/utils/mediakeys-helper.ts");function P(s,a){for(var A=0;A<a.length;A++){var o=a[A];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(s,o.key,o)}}function e(s,a,A){return a&&P(s.prototype,a),A&&P(s,A),s}var R=3,m=function(a,A,o){var i={audioCapabilities:[],videoCapabilities:[]};return a.forEach(function(r){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+r+'"',robustness:o.audioRobustness||""})}),A.forEach(function(r){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+r+'"',robustness:o.videoRobustness||""})}),[i]},v=function(a,A,o,i){switch(a){case X.KeySystems.WIDEVINE:return m(A,o,i);default:throw new Error("Unknown key-system: "+a)}},u=function(){function s(A){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=A,this._config=A.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var a=s.prototype;return a.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},a._registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},a._unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},a.getLicenseServerUrl=function(o){switch(o){case X.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+o+'"')},a._attemptKeySystemAccess=function(o,i,r){var t=this,E=v(o,i,r,this._drmSystemOptions);O.logger.log("Requesting encrypted media key-system access");var _=this.requestMediaKeySystemAccess(o,E);this.mediaKeysPromise=_.then(function(y){return t._onMediaKeySystemAccessObtained(o,y)}),_.catch(function(y){O.logger.error('Failed to obtain key-system "'+o+'" access:',y)})},a._onMediaKeySystemAccessObtained=function(o,i){var r=this;O.logger.log('Access for key-system "'+o+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:i,mediaKeySystemDomain:o};this._mediaKeysList.push(t);var E=Promise.resolve().then(function(){return i.createMediaKeys()}).then(function(_){return t.mediaKeys=_,O.logger.log('Media-keys created for key-system "'+o+'"'),r._onMediaKeysCreated(),_});return E.catch(function(_){O.logger.error("Failed to create media-keys:",_)}),E},a._onMediaKeysCreated=function(){var o=this;this._mediaKeysList.forEach(function(i){i.mediaKeysSession||(i.mediaKeysSession=i.mediaKeys.createSession(),o._onNewMediaKeySession(i.mediaKeysSession))})},a._onNewMediaKeySession=function(o){var i=this;O.logger.log("New key-system session "+o.sessionId),o.addEventListener("message",function(r){i._onKeySessionMessage(o,r.message)},!1)},a._onKeySessionMessage=function(o,i){O.logger.log("Got EME message event, creating license request"),this._requestLicense(i,function(r){O.logger.log("Received license data (length: "+(r&&r.byteLength)+"), updating key-session"),o.update(r)})},a.onMediaEncrypted=function(o){var i=this;if(O.logger.log('Media is encrypted using "'+o.initDataType+'" init data type'),!this.mediaKeysPromise){O.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var r=function(E){if(!i._media)return;i._attemptSetMediaKeys(E),i._generateRequestWithPreferredKeySession(o.initDataType,o.initData)};this.mediaKeysPromise.then(r).catch(r)},a._attemptSetMediaKeys=function(o){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var i=this._mediaKeysList[0];if(!i||!i.mediaKeys){O.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}O.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(i.mediaKeys),this._hasSetMediaKeys=!0}},a._generateRequestWithPreferredKeySession=function(o,i){var r=this,t=this._mediaKeysList[0];if(!t){O.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){O.logger.warn("Key-Session already initialized but requested again");return}var E=t.mediaKeysSession;if(!E){O.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!i){O.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}O.logger.log('Generating key-session request for "'+o+'" init data type'),t.mediaKeysSessionInitialized=!0,E.generateRequest(o,i).then(function(){O.logger.debug("Key-session generation succeeded")}).catch(function(_){O.logger.error("Error generating key-session request:",_),r.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},a._createLicenseXhr=function(o,i,r){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,o,i,r);var E=this._licenseXhrSetup;if(E)try{E.call(this.hls,t,o),E=void 0}catch(_){O.logger.error(_)}try{t.readyState||t.open("POST",o,!0),E&&E.call(this.hls,t,o)}catch(_){throw new Error("issue setting up KeySystem license XHR "+_)}return t},a._onLicenseRequestReadyStageChange=function(o,i,r,t){switch(o.readyState){case 4:if(o.status===200){this._requestLicenseFailureCount=0,O.logger.log("License request succeeded");var E=o.response,_=this._licenseResponseCallback;if(_)try{E=_.call(this.hls,o,i)}catch(B){O.logger.error(B)}t(E)}else{if(O.logger.error("License Request XHR failed ("+i+"). Status: "+o.status+" ("+o.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>R){this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var y=R-this._requestLicenseFailureCount+1;O.logger.warn("Retrying license request, "+y+" attempts left"),this._requestLicense(r,t)}break}},a._generateLicenseRequestChallenge=function(o,i){switch(o.mediaKeySystemDomain){case X.KeySystems.WIDEVINE:return i}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},a._requestLicense=function(o,i){O.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r){O.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(r.mediaKeySystemDomain),E=this._createLicenseXhr(t,o,i);O.logger.log("Sending license request to URL: "+t);var _=this._generateLicenseRequestChallenge(r,o);E.send(_)}catch(y){O.logger.error("Failure requesting DRM license: "+y),this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},a.onMediaAttached=function(o,i){if(!this._emeEnabled)return;var r=i.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)},a.onMediaDetached=function(){var o=this._media,i=this._mediaKeysList;if(!o)return;o.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(i.map(function(r){if(r.mediaKeysSession)return r.mediaKeysSession.close().catch(function(){})})).then(function(){return o.setMediaKeys(null)}).catch(function(){})},a.onManifestParsed=function(o,i){if(!this._emeEnabled)return;var r=i.levels.map(function(E){return E.audioCodec}).filter(function(E){return!!E}),t=i.levels.map(function(E){return E.videoCodec}).filter(function(E){return!!E});this._attemptKeySystemAccess(X.KeySystems.WIDEVINE,r,t)},e(s,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),s}();G.default=u},"./src/controller/fps-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/utils/logger.ts"),O=function(){function X(e){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=e,this.registerListeners()}var P=X.prototype;return P.setStreamController=function(R){this.streamController=R},P.registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},P.unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching)},P.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},P.onMediaAttaching=function(R,m){var v=this.hls.config;if(v.capLevelOnFPSDrop){var u=m.media instanceof self.HTMLVideoElement?m.media:null;this.media=u,u&&typeof u.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),v.fpsDroppedMonitoringPeriod)}},P.checkFPS=function(R,m,v){var u=performance.now();if(m){if(this.lastTime){var s=u-this.lastTime,a=v-this.lastDroppedFrames,A=m-this.lastDecodedFrames,o=1e3*a/s,i=this.hls;if(i.trigger(V.Events.FPS_DROP,{currentDropped:a,currentDecoded:A,totalDroppedFrames:v}),o>0&&a>i.config.fpsDroppedMonitoringThreshold*A){var r=i.currentLevel;F.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+r),r>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=r)&&(r=r-1,i.trigger(V.Events.FPS_DROP_LEVEL_CAPPING,{level:r,droppedLevel:i.currentLevel}),i.autoLevelCapping=r,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=v,this.lastDecodedFrames=m}},P.checkFPSInterval=function(){var R=this.media;if(R)if(this.isVideoPlaybackQualityAvailable){var m=R.getVideoPlaybackQuality();this.checkFPS(R,m.totalVideoFrames,m.droppedVideoFrames)}else this.checkFPS(R,R.webkitDecodedFrameCount,R.webkitDroppedFrameCount)},X}();G.default=O},"./src/controller/fragment-finders.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"findFragmentByPDT",function(){return O}),D.d(G,"findFragmentByPTS",function(){return X}),D.d(G,"fragmentWithinToleranceTest",function(){return P}),D.d(G,"pdtWithinToleranceTest",function(){return e}),D.d(G,"findFragWithCC",function(){return R});var V=D("./src/polyfills/number.ts"),F=D("./src/utils/binary-search.ts");function O(m,v,u){if(v===null||!Array.isArray(m)||!m.length||!Object(V.isFiniteNumber)(v))return null;var s=m[0].programDateTime;if(v<(s||0))return null;var a=m[m.length-1].endProgramDateTime;if(v>=(a||0))return null;u=u||0;for(var A=0;A<m.length;++A){var o=m[A];if(e(v,u,o))return o}return null}function X(m,v,u,s){u===void 0&&(u=0),s===void 0&&(s=0);var a=null;if(m?a=v[m.sn-v[0].sn+1]||null:u===0&&v[0].start===0&&(a=v[0]),a&&P(u,s,a)===0)return a;var A=F.default.search(v,P.bind(null,u,s));return A||a}function P(m,v,u){m===void 0&&(m=0),v===void 0&&(v=0);var s=Math.min(v,u.duration+(u.deltaPTS?u.deltaPTS:0));return u.start+u.duration-s<=m?1:u.start-s>m&&u.start?-1:0}function e(m,v,u){var s=Math.min(v,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,a=u.endProgramDateTime||0;return a-s>m}function R(m,v){return F.default.search(m,function(u){return u.cc<v?1:u.cc>v?-1:0})}},"./src/controller/fragment-tracker.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"FragmentState",function(){return O}),D.d(G,"FragmentTracker",function(){return X});var V=D("./src/events.ts"),F=D("./src/types/loader.ts"),O;(function(R){R.NOT_LOADED="NOT_LOADED",R.BACKTRACKED="BACKTRACKED",R.APPENDING="APPENDING",R.PARTIAL="PARTIAL",R.OK="OK"})(O||(O={}));var X=function(){function R(v){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=v,this._registerListeners()}var m=R.prototype;return m._registerListeners=function(){var u=this.hls;u.on(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.on(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(V.Events.FRAG_LOADED,this.onFragLoaded,this)},m._unregisterListeners=function(){var u=this.hls;u.off(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.off(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(V.Events.FRAG_LOADED,this.onFragLoaded,this)},m.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},m.getAppendedFrag=function(u,s){if(s===F.PlaylistLevelType.MAIN){var a=this.activeFragment,A=this.activeParts;if(!a)return null;if(A)for(var o=A.length;o--;){var i=A[o],r=i?i.end:a.appendedPTS;if(i.start<=u&&r!==void 0&&u<=r)return o>9&&(this.activeParts=A.slice(o-9)),i}else if(a.start<=u&&a.appendedPTS!==void 0&&u<=a.appendedPTS)return a}return this.getBufferedFrag(u,s)},m.getBufferedFrag=function(u,s){for(var a=this.fragments,A=Object.keys(a),o=A.length;o--;){var i=a[A[o]];if((i==null?void 0:i.body.type)===s&&i.buffered){var r=i.body;if(r.start<=u&&u<=r.end)return r}}return null},m.detectEvictedFragments=function(u,s,a){var A=this;Object.keys(this.fragments).forEach(function(o){var i=A.fragments[o];if(!i)return;if(!i.buffered){i.body.type===a&&A.removeFragment(i.body);return}var r=i.range[u];if(!r)return;r.time.some(function(t){var E=!A.isTimeBuffered(t.startPTS,t.endPTS,s);return E&&A.removeFragment(i.body),E})})},m.detectPartialFragments=function(u){var s=this,a=this.timeRanges,A=u.frag,o=u.part;if(!a||A.sn==="initSegment")return;var i=e(A),r=this.fragments[i];if(!r)return;Object.keys(a).forEach(function(t){var E=A.elementaryStreams[t];if(!E)return;var _=a[t],y=o!==null||E.partial===!0;r.range[t]=s.getBufferedTimes(A,o,y,_)}),r.backtrack=r.loaded=null,Object.keys(r.range).length?r.buffered=!0:this.removeFragment(r.body)},m.fragBuffered=function(u){var s=e(u),a=this.fragments[s];a&&(a.backtrack=a.loaded=null,a.buffered=!0)},m.getBufferedTimes=function(u,s,a,A){for(var o={time:[],partial:a},i=s?s.start:u.start,r=s?s.end:u.end,t=u.minEndPTS||r,E=u.maxStartPTS||i,_=0;_<A.length;_++){var y=A.start(_)-this.bufferPadding,B=A.end(_)+this.bufferPadding;if(E>=y&&t<=B){o.time.push({startPTS:Math.max(i,A.start(_)),endPTS:Math.min(r,A.end(_))});break}else if(i<B&&r>y)o.partial=!0,o.time.push({startPTS:Math.max(i,A.start(_)),endPTS:Math.min(r,A.end(_))});else if(r<=y)break}return o},m.getPartialFragment=function(u){var s=null,a,A,o,i=0,r=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(E){var _=t[E];if(!_)return;P(_)&&(A=_.body.start-r,o=_.body.end+r,u>=A&&u<=o&&(a=Math.min(u-A,o-u),i<=a&&(s=_.body,i=a)))}),s},m.getState=function(u){var s=e(u),a=this.fragments[s];return a?a.buffered?P(a)?O.PARTIAL:O.OK:a.backtrack?O.BACKTRACKED:O.APPENDING:O.NOT_LOADED},m.backtrack=function(u,s){var a=e(u),A=this.fragments[a];if(!A||A.backtrack)return null;var o=A.backtrack=s||A.loaded;return A.loaded=null,o},m.getBacktrackData=function(u){var s=e(u),a=this.fragments[s];if(a){var A,o=a.backtrack;if(o!=null&&(A=o.payload)!==null&&A!==void 0&&A.byteLength)return o;this.removeFragment(u)}return null},m.isTimeBuffered=function(u,s,a){for(var A,o,i=0;i<a.length;i++){if(A=a.start(i)-this.bufferPadding,o=a.end(i)+this.bufferPadding,u>=A&&s<=o)return!0;if(s<=A)return!1}return!1},m.onFragLoaded=function(u,s){var a=s.frag,A=s.part;if(a.sn==="initSegment"||a.bitrateTest||A)return;var o=e(a);this.fragments[o]={body:a,loaded:s,backtrack:null,buffered:!1,range:Object.create(null)}},m.onBufferAppended=function(u,s){var a=this,A=s.frag,o=s.part,i=s.timeRanges;if(A.type===F.PlaylistLevelType.MAIN)if(this.activeFragment=A,o){var r=this.activeParts;r||(this.activeParts=r=[]),r.push(o)}else this.activeParts=null;this.timeRanges=i,Object.keys(i).forEach(function(t){var E=i[t];if(a.detectEvictedFragments(t,E),!o)for(var _=0;_<E.length;_++)A.appendedPTS=Math.max(E.end(_),A.appendedPTS||0)})},m.onFragBuffered=function(u,s){this.detectPartialFragments(s)},m.hasFragment=function(u){var s=e(u);return!!this.fragments[s]},m.removeFragmentsInRange=function(u,s,a){var A=this;Object.keys(this.fragments).forEach(function(o){var i=A.fragments[o];if(!i)return;if(i.buffered){var r=i.body;r.type===a&&r.start<s&&r.end>u&&A.removeFragment(r)}})},m.removeFragment=function(u){var s=e(u);u.stats.loaded=0,u.clearElementaryStreamInfo(),delete this.fragments[s]},m.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},R}();function P(R){var m,v;return R.buffered&&(((m=R.range.video)===null||m===void 0?void 0:m.partial)||((v=R.range.audio)===null||v===void 0?void 0:v.partial))}function e(R){return R.type+"_"+R.level+"_"+R.urlId+"_"+R.sn}},"./src/controller/gap-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"STALL_MINIMUM_DURATION_MS",function(){return P}),D.d(G,"MAX_START_GAP_JUMP",function(){return e}),D.d(G,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return R}),D.d(G,"SKIP_BUFFER_RANGE_START",function(){return m}),D.d(G,"default",function(){return v});var V=D("./src/utils/buffer-helper.ts"),F=D("./src/errors.ts"),O=D("./src/events.ts"),X=D("./src/utils/logger.ts"),P=250,e=2,R=.1,m=.05,v=function(){function u(a,A,o,i){this.config=void 0,this.media=void 0,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=a,this.media=A,this.fragmentTracker=o,this.hls=i}var s=u.prototype;return s.destroy=function(){this.hls=this.fragmentTracker=this.media=null},s.poll=function(A){var o=this.config,i=this.media,r=this.stalled,t=i.currentTime,E=i.seeking,_=this.seeking&&!E,y=!this.seeking&&E;if(this.seeking=E,t!==A){if(this.moved=!0,r!==null){if(this.stallReported){var B=self.performance.now()-r;X.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(B)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((y||_)&&(this.stalled=null),i.paused||i.ended||i.playbackRate===0||!V.BufferHelper.getBuffered(i).length)return;var C=V.BufferHelper.bufferInfo(i,t,0),d=C.len>0,n=C.nextStart||0;if(!d&&!n)return;if(E){var l=C.len>e,c=!n||n-t>e&&!this.fragmentTracker.getPartialFragment(t);if(l||c)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var b,g=Math.max(n,C.start||0)-t,h=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,L=h==null||((b=h.details)===null||b===void 0)?void 0:b.live,N=L?h.details.targetduration*2:e;if(g>0&&g<=N){this._trySkipBufferHole(null);return}}var T=self.performance.now();if(r===null){this.stalled=T;return}var M=T-r;!E&&M>=P&&this._reportStall(C.len);var W=V.BufferHelper.bufferInfo(i,t,o.maxBufferHole);this._tryFixBufferStall(W,M)},s._tryFixBufferStall=function(A,o){var i=this.config,r=this.fragmentTracker,t=this.media,E=t.currentTime,_=r.getPartialFragment(E);if(_){var y=this._trySkipBufferHole(_);if(y)return}A.len>i.maxBufferHole&&o>i.highBufferWatchdogPeriod*1e3&&(X.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},s._reportStall=function(A){var o=this.hls,i=this.media,r=this.stallReported;r||(this.stallReported=!0,X.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+A+")"),o.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:A}))},s._trySkipBufferHole=function(A){for(var o=this.config,i=this.hls,r=this.media,t=r.currentTime,E=0,_=V.BufferHelper.getBuffered(r),y=0;y<_.length;y++){var B=_.start(y);if(t+o.maxBufferHole>=E&&t<B){var C=Math.max(B+m,r.currentTime+R);return X.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+C),this.moved=!0,this.stalled=null,r.currentTime=C,A&&i.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+C,frag:A}),C}E=_.end(y)}return 0},s._tryNudgeBuffer=function(){var A=this.config,o=this.hls,i=this.media,r=i.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<A.nudgeMaxRetry){var E=r+t*A.nudgeOffset;X.logger.warn("Nudging 'currentTime' from "+r+" to "+E),i.currentTime=E,o.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else X.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+A.nudgeMaxRetry+" nudges"),o.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},u}()},"./src/controller/id3-track-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/utils/texttrack-utils.ts"),O=D("./src/demux/id3.ts"),X=.25,P=function(){function e(m){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=m,this._registerListeners()}var R=e.prototype;return R.destroy=function(){this._unregisterListeners()},R._registerListeners=function(){var v=this.hls;v.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.on(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),v.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R._unregisterListeners=function(){var v=this.hls;v.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.off(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),v.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R.onMediaAttached=function(v,u){this.media=u.media},R.onMediaDetaching=function(){if(!this.id3Track)return;Object(F.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},R.getID3Track=function(v){if(!this.media)return;for(var u=0;u<v.length;u++){var s=v[u];if(s.kind==="metadata"&&s.label==="id3")return Object(F.sendAddTrackEvent)(s,this.media),s}return this.media.addTextTrack("metadata","id3")},R.onFragParsingMetadata=function(v,u){if(!this.media)return;var s=u.frag,a=u.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var A=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,o=0;o<a.length;o++){var i=O.getID3Frames(a[o].data);if(i){var r=a[o].pts,t=o<a.length-1?a[o+1].pts:s.end,E=t-r;E<=0&&(t=r+X);for(var _=0;_<i.length;_++){var y=i[_];if(!O.isTimeStampFrame(y)){var B=new A(r,t,"");B.value=y,this.id3Track.addCue(B)}}}}},R.onBufferFlushing=function(v,u){var s=u.startOffset,a=u.endOffset,A=u.type;if(!A||A==="audio"){var o=this.id3Track;o&&Object(F.removeCuesInRange)(o,s,a)}},e}();G.default=P},"./src/controller/latency-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return e});var V=D("./src/errors.ts"),F=D("./src/events.ts"),O=D("./src/utils/logger.ts");function X(R,m){for(var v=0;v<m.length;v++){var u=m[v];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(R,u.key,u)}}function P(R,m,v){return m&&X(R.prototype,m),v&&X(R,v),R}var e=function(){function R(v){var u=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 u.timeupdate()},this.hls=v,this.config=v.config,this.registerListeners()}var m=R.prototype;return m.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},m.registerListeners=function(){this.hls.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(F.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){this.hls.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(F.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(F.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(F.Events.ERROR,this.onError)},m.onMediaAttached=function(u,s){this.media=s.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},m.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},m.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},m.onLevelUpdated=function(u,s){var a=s.details;this.levelDetails=a,a.advanced&&this.timeupdate(),!a.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},m.onError=function(u,s){if(s.details!==V.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,O.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},m.timeupdate=function(){var u=this.media,s=this.levelDetails;if(!u||!s)return;this.currentTime=u.currentTime;var a=this.computeLatency();if(a===null)return;this._latency=a;var A=this.config,o=A.lowLatencyMode,i=A.maxLiveSyncPlaybackRate;if(!o||i===1)return;var r=this.targetLatency;if(r===null)return;var t=a-r,E=Math.min(this.maxLatency,r+s.targetduration),_=t<E;if(s.live&&_&&t>.05&&this.forwardBufferLength>1){var y=Math.min(2,Math.max(1,i)),B=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;u.playbackRate=Math.min(y,Math.max(1,B))}else u.playbackRate!==1&&u.playbackRate!==0&&(u.playbackRate=1)},m.estimateLiveEdge=function(){var u=this.levelDetails;return u===null?null:u.edge+u.age},m.computeLatency=function(){var u=this.estimateLiveEdge();return u===null?null:u-this.currentTime},P(R,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var u=this.config,s=this.levelDetails;return u.liveMaxLatencyDuration!==void 0?u.liveMaxLatencyDuration:s?u.liveMaxLatencyDurationCount*s.targetduration:0}},{key:"targetLatency",get:function(){var u=this.levelDetails;if(u===null)return null;var s=u.holdBack,a=u.partHoldBack,A=u.targetduration,o=this.config,i=o.liveSyncDuration,r=o.liveSyncDurationCount,t=o.lowLatencyMode,E=this.hls.userConfig,_=t&&a||s;(E.liveSyncDuration||E.liveSyncDurationCount||_===0)&&(_=i!==void 0?i:r*A);var y=A,B=1;return _+Math.min(this.stallCount*B,y)}},{key:"liveSyncPosition",get:function(){var u=this.estimateLiveEdge(),s=this.targetLatency,a=this.levelDetails;if(u===null||s===null||a===null)return null;var A=a.edge,o=u-s-this.edgeStalled,i=A-a.totalduration,r=A-(this.config.lowLatencyMode&&a.partTarget||a.targetduration);return Math.min(Math.max(i,o),r)}},{key:"drift",get:function(){var u=this.levelDetails;return u===null?1:u.drift}},{key:"edgeStalled",get:function(){var u=this.levelDetails;if(u===null)return 0;var s=(this.config.lowLatencyMode&&u.partTarget||u.targetduration)*3;return Math.max(u.age-s,0)}},{key:"forwardBufferLength",get:function(){var u=this.media,s=this.levelDetails;if(!u||!s)return 0;var a=u.buffered.length;return a?u.buffered.end(a-1):s.edge-this.currentTime}}]),R}()},"./src/controller/level-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return o});var V=D("./src/types/level.ts"),F=D("./src/events.ts"),O=D("./src/errors.ts"),X=D("./src/utils/codecs.ts"),P=D("./src/controller/level-helper.ts"),e=D("./src/controller/base-playlist-controller.ts"),R=D("./src/types/loader.ts");function m(){return m=Object.assign||function(i){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var E in t)Object.prototype.hasOwnProperty.call(t,E)&&(i[E]=t[E])}return i},m.apply(this,arguments)}function v(i,r){for(var t=0;t<r.length;t++){var E=r[t];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(i,E.key,E)}}function u(i,r,t){return r&&v(i.prototype,r),t&&v(i,t),i}function s(i,r){i.prototype=Object.create(r.prototype),i.prototype.constructor=i,a(i,r)}function a(i,r){return a=Object.setPrototypeOf||function(E,_){return E.__proto__=_,E},a(i,r)}var A=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),o=function(i){s(r,i);function r(E){var _;return _=i.call(this,E,"[level-controller]")||this,_._levels=[],_._firstLevel=-1,_._startLevel=void 0,_.currentLevelIndex=-1,_.manualLevelIndex=-1,_.onParsedComplete=void 0,_._registerListeners(),_}var t=r.prototype;return t._registerListeners=function(){var _=this.hls;_.on(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.on(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(F.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.on(F.Events.FRAG_LOADED,this.onFragLoaded,this),_.on(F.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var _=this.hls;_.off(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.off(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(F.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.off(F.Events.FRAG_LOADED,this.onFragLoaded,this),_.off(F.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,i.prototype.destroy.call(this)},t.startLoad=function(){var _=this._levels;_.forEach(function(y){y.loadError=0}),i.prototype.startLoad.call(this)},t.onManifestLoaded=function(_,y){var B=[],C=[],d=[],n,l={},c,b=!1,g=!1,h=!1;if(y.levels.forEach(function(M){var W=M.attrs;b=b||!!(M.width&&M.height),g=g||!!M.videoCodec,h=h||!!M.audioCodec,A&&M.audioCodec&&M.audioCodec.indexOf("mp4a.40.34")!==-1&&(M.audioCodec=void 0);var U=M.bitrate+"-"+M.attrs.RESOLUTION+"-"+M.attrs.CODECS;c=l[U],c?c.url.push(M.url):(c=new V.Level(M),l[U]=c,B.push(c)),W&&(W.AUDIO&&Object(P.addGroupId)(c,"audio",W.AUDIO),W.SUBTITLES&&Object(P.addGroupId)(c,"text",W.SUBTITLES))}),(b||g)&&h&&(B=B.filter(function(M){var W=M.videoCodec,U=M.width,Y=M.height;return!!W||!!(U&&Y)})),B=B.filter(function(M){var W=M.audioCodec,U=M.videoCodec;return(!W||Object(X.isCodecSupportedInMp4)(W,"audio"))&&(!U||Object(X.isCodecSupportedInMp4)(U,"video"))}),y.audioTracks&&(C=y.audioTracks.filter(function(M){return!M.audioCodec||Object(X.isCodecSupportedInMp4)(M.audioCodec,"audio")}),Object(P.assignTrackIdsByGroup)(C)),y.subtitles&&(d=y.subtitles,Object(P.assignTrackIdsByGroup)(d)),B.length>0){n=B[0].bitrate,B.sort(function(M,W){return M.bitrate-W.bitrate}),this._levels=B;for(var L=0;L<B.length;L++)if(B[L].bitrate===n){this._firstLevel=L,this.log("manifest loaded, "+B.length+" level(s) found, first bitrate: "+n);break}var N=h&&!g,T={levels:B,audioTracks:C,subtitleTracks:d,firstLevel:this._firstLevel,stats:y.stats,audio:h,video:g,altAudio:!N&&C.some(function(M){return!!M.url})};this.hls.trigger(F.Events.MANIFEST_PARSED,T),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(F.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:y.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(_,y){if(i.prototype.onError.call(this,_,y),y.fatal)return;var B=y.context,C=this._levels[this.currentLevelIndex];if(B&&(B.type===R.PlaylistContextType.AUDIO_TRACK&&C.audioGroupIds&&B.groupId===C.audioGroupIds[C.urlId]||B.type===R.PlaylistContextType.SUBTITLE_TRACK&&C.textGroupIds&&B.groupId===C.textGroupIds[C.urlId])){this.redundantFailover(this.currentLevelIndex);return}var d=!1,n=!0,l;switch(y.details){case O.ErrorDetails.FRAG_LOAD_ERROR:case O.ErrorDetails.FRAG_LOAD_TIMEOUT:case O.ErrorDetails.KEY_LOAD_ERROR:case O.ErrorDetails.KEY_LOAD_TIMEOUT:if(y.frag){var c=this._levels[y.frag.level];c?(c.fragmentError++,c.fragmentError>this.hls.config.fragLoadingMaxRetry&&(l=y.frag.level)):l=y.frag.level}break;case O.ErrorDetails.LEVEL_LOAD_ERROR:case O.ErrorDetails.LEVEL_LOAD_TIMEOUT:B&&(B.deliveryDirectives&&(n=!1),l=B.level),d=!0;break;case O.ErrorDetails.REMUX_ALLOC_ERROR:l=y.level,d=!0;break}l!==void 0&&this.recoverLevel(y,l,d,n)},t.recoverLevel=function(_,y,B,C){var d=_.details,n=this._levels[y];if(n.loadError++,B){var l=this.retryLoadingOrFail(_);if(l)_.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var c=n.url.length;if(c>1&&n.loadError<c)_.levelRetry=!0,this.redundantFailover(y);else if(this.manualLevelIndex===-1){var b=y===0?this._levels.length-1:y-1;this.currentLevelIndex!==b&&this._levels[b].loadError===0&&(this.warn(d+": switch to "+b),_.levelRetry=!0,this.hls.nextAutoLevel=b)}}},t.redundantFailover=function(_){var y=this._levels[_],B=y.url.length;if(B>1){var C=(y.urlId+1)%B;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(d){d.urlId=C}),this.level=_}},t.onFragLoaded=function(_,y){var B=y.frag;if(B!==void 0&&B.type===R.PlaylistLevelType.MAIN){var C=this._levels[B.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},t.onLevelLoaded=function(_,y){var B,C=y.level,d=y.details,n=this._levels[C];if(!n){var l;this.warn("Invalid level index "+C),(l=y.deliveryDirectives)!==null&&l!==void 0&&l.skip&&(d.deltaUpdateFailed=!0);return}C===this.currentLevelIndex?(n.fragmentError===0&&(n.loadError=0,this.retryCount=0),this.playlistLoaded(C,y,n.details)):(B=y.deliveryDirectives)!==null&&B!==void 0&&B.skip&&(d.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(_,y){var B=this.hls.levels[this.currentLevelIndex];if(!B)return;if(B.audioGroupIds){for(var C=-1,d=this.hls.audioTracks[y.id].groupId,n=0;n<B.audioGroupIds.length;n++)if(B.audioGroupIds[n]===d){C=n;break}C!==B.urlId&&(B.urlId=C,this.startLoad())}},t.loadPlaylist=function(_){var y=this.currentLevelIndex,B=this._levels[y];if(this.canLoad&&B&&B.url.length>0){var C=B.urlId,d=B.url[C];if(_)try{d=_.addDirectives(d)}catch(n){this.warn("Could not construct new URL with HLS Delivery Directives: "+n)}this.log("Attempt loading level index "+y+(_?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+C+" "+d),this.clearTimer(),this.hls.trigger(F.Events.LEVEL_LOADING,{url:d,level:y,id:C,deliveryDirectives:_||null})}},t.removeLevel=function(_,y){var B=function(n,l){return l!==y},C=this._levels.filter(function(d,n){return n!==_?!0:d.url.length>1&&y!==void 0?(d.url=d.url.filter(B),d.audioGroupIds&&(d.audioGroupIds=d.audioGroupIds.filter(B)),d.textGroupIds&&(d.textGroupIds=d.textGroupIds.filter(B)),d.urlId=0,!0):!1}).map(function(d,n){var l=d.details;return l!=null&&l.fragments&&l.fragments.forEach(function(c){c.level=n}),d});this._levels=C,this.hls.trigger(F.Events.LEVELS_UPDATED,{levels:C})},u(r,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(_){var y,B=this._levels;if(B.length===0)return;if(this.currentLevelIndex===_&&(y=B[_])!==null&&y!==void 0&&y.details)return;if(_<0||_>=B.length){var C=_<0;if(this.hls.trigger(F.Events.ERROR,{type:O.ErrorTypes.OTHER_ERROR,details:O.ErrorDetails.LEVEL_SWITCH_ERROR,level:_,fatal:C,reason:"invalid level idx"}),C)return;_=Math.min(_,B.length-1)}this.clearTimer();var d=this.currentLevelIndex,n=B[d],l=B[_];this.log("switching to level "+_+" from "+d),this.currentLevelIndex=_;var c=m({},l,{level:_,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(F.Events.LEVEL_SWITCHING,c);var b=l.details;if(!b||b.live){var g=this.switchParams(l.uri,n==null?void 0:n.details);this.loadPlaylist(g)}}},{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=_)}}]),r}(e.default)},"./src/controller/level-helper.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"addGroupId",function(){return O}),D.d(G,"assignTrackIdsByGroup",function(){return X}),D.d(G,"updatePTS",function(){return P}),D.d(G,"updateFragPTSDTS",function(){return R}),D.d(G,"mergeDetails",function(){return m}),D.d(G,"mapPartIntersection",function(){return v}),D.d(G,"mapFragmentIntersection",function(){return u}),D.d(G,"adjustSliding",function(){return s}),D.d(G,"addSliding",function(){return a}),D.d(G,"computeReloadInterval",function(){return A}),D.d(G,"getFragmentWithSN",function(){return o}),D.d(G,"getPartWith",function(){return i});var V=D("./src/polyfills/number.ts"),F=D("./src/utils/logger.ts");function O(r,t,E){switch(t){case"audio":r.audioGroupIds||(r.audioGroupIds=[]),r.audioGroupIds.push(E);break;case"text":r.textGroupIds||(r.textGroupIds=[]),r.textGroupIds.push(E);break}}function X(r){var t={};r.forEach(function(E){var _=E.groupId||"";E.id=t[_]=t[_]||0,t[_]++})}function P(r,t,E){var _=r[t],y=r[E];e(_,y)}function e(r,t){var E=t.startPTS;if(Object(V.isFiniteNumber)(E)){var _=0,y;t.sn>r.sn?(_=E-r.start,y=r):(_=r.start-E,y=t),y.duration!==_&&(y.duration=_)}else if(t.sn>r.sn){var B=r.cc===t.cc;B&&r.minEndPTS?t.start=r.start+(r.minEndPTS-r.start):t.start=r.start+r.duration}else t.start=Math.max(r.start-t.duration,0)}function R(r,t,E,_,y,B){var C=_-E;C<=0&&(F.logger.warn("Fragment should have a positive duration",t),_=E+t.duration,B=y+t.duration);var d=E,n=_,l=t.startPTS,c=t.endPTS;if(Object(V.isFiniteNumber)(l)){var b=Math.abs(l-E);Object(V.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(b,t.deltaPTS):t.deltaPTS=b,d=Math.max(E,l),E=Math.min(E,l),y=Math.min(y,t.startDTS),n=Math.min(_,c),_=Math.max(_,c),B=Math.max(B,t.endDTS)}t.duration=_-E;var g=E-t.start;t.appendedPTS=_,t.start=t.startPTS=E,t.maxStartPTS=d,t.startDTS=y,t.endPTS=_,t.minEndPTS=n,t.endDTS=B;var h=t.sn;if(!r||h<r.startSN||h>r.endSN)return 0;var L,N=h-r.startSN,T=r.fragments;for(T[N]=t,L=N;L>0;L--)e(T[L],T[L-1]);for(L=N;L<T.length-1;L++)e(T[L],T[L+1]);return r.fragmentHint&&e(T[T.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,g}function m(r,t){for(var E=null,_=r.fragments,y=_.length-1;y>=0;y--){var B=_[y].initSegment;if(B){E=B;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;var C=0,d;if(u(r,t,function(L,N){L.relurl&&(C=L.cc-N.cc),Object(V.isFiniteNumber)(L.startPTS)&&Object(V.isFiniteNumber)(L.endPTS)&&(N.start=N.startPTS=L.startPTS,N.startDTS=L.startDTS,N.appendedPTS=L.appendedPTS,N.maxStartPTS=L.maxStartPTS,N.endPTS=L.endPTS,N.endDTS=L.endDTS,N.minEndPTS=L.minEndPTS,N.duration=L.endPTS-L.startPTS,N.duration&&(d=N),t.PTSKnown=t.alignedSliding=!0),N.elementaryStreams=L.elementaryStreams,N.loader=L.loader,N.stats=L.stats,N.urlId=L.urlId,L.initSegment&&(N.initSegment=L.initSegment,E=L.initSegment)}),E){var n=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;n.forEach(function(L){var N;(!L.initSegment||L.initSegment.relurl===((N=E)===null||N===void 0?void 0:N.relurl))&&(L.initSegment=E)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(L){return!L}),t.deltaUpdateFailed)){F.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var l=t.skippedSegments;l--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var c=t.fragments;if(C){F.logger.warn("discontinuity sliding from playlist, take drift into account");for(var b=0;b<c.length;b++)c[b].cc+=C}t.skippedSegments&&(t.startCC=t.fragments[0].cc),v(r.partList,t.partList,function(L,N){N.elementaryStreams=L.elementaryStreams,N.stats=L.stats}),d?R(t,d,d.startPTS,d.endPTS,d.startDTS,d.endDTS):s(r,t),c.length&&(t.totalduration=t.edge-c[0].start),t.driftStartTime=r.driftStartTime,t.driftStart=r.driftStart;var g=t.advancedDateTime;if(t.advanced&&g){var h=t.edge;t.driftStart||(t.driftStartTime=g,t.driftStart=h),t.driftEndTime=g,t.driftEnd=h}else t.driftEndTime=r.driftEndTime,t.driftEnd=r.driftEnd,t.advancedDateTime=r.advancedDateTime}function v(r,t,E){if(r&&t)for(var _=0,y=0,B=r.length;y<=B;y++){var C=r[y],d=t[y+_];C&&d&&C.index===d.index&&C.fragment.sn===d.fragment.sn?E(C,d):_--}}function u(r,t,E){for(var _=t.skippedSegments,y=Math.max(r.startSN,t.startSN)-t.startSN,B=(r.fragmentHint?1:0)+(_?t.endSN:Math.min(r.endSN,t.endSN))-t.startSN,C=t.startSN-r.startSN,d=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,n=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments,l=y;l<=B;l++){var c=n[C+l],b=d[l];_&&!b&&l<_&&(b=t.fragments[l]=c),c&&b&&E(c,b)}}function s(r,t){var E=t.startSN+t.skippedSegments-r.startSN,_=r.fragments;if(E<0||E>=_.length)return;a(t,_[E].start)}function a(r,t){if(t){for(var E=r.fragments,_=r.skippedSegments;_<E.length;_++)E[_].start+=t;r.fragmentHint&&(r.fragmentHint.start+=t)}}function A(r,t){var E=1e3*r.levelTargetDuration,_=E/2,y=r.age,B=y>0&&y<E*3,C=t.loading.end-t.loading.start,d,n=r.availabilityDelay;if(r.updated===!1)if(B){var l=333*r.misses;d=Math.max(Math.min(_,C*2),l),r.availabilityDelay=(r.availabilityDelay||0)+d}else d=_;else B?(n=Math.min(n||E/2,y),r.availabilityDelay=n,d=n+E-y):d=E-C;return Math.round(d)}function o(r,t,E){if(!r||!r.details)return null;var _=r.details,y=_.fragments[t-_.startSN];return y||(y=_.fragmentHint,y&&y.sn===t?y:t<_.startSN&&E&&E.sn===t?E:null)}function i(r,t,E){if(!r||!r.details)return null;var _=r.details.partList;if(_)for(var y=_.length;y--;){var B=_[y];if(B.index===E&&B.fragment.sn===t)return B}return null}},"./src/controller/stream-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return _});var V=D("./src/polyfills/number.ts"),F=D("./src/controller/base-stream-controller.ts"),O=D("./src/is-supported.ts"),X=D("./src/events.ts"),P=D("./src/utils/buffer-helper.ts"),e=D("./src/controller/fragment-tracker.ts"),R=D("./src/types/loader.ts"),m=D("./src/loader/fragment.ts"),v=D("./src/demux/transmuxer-interface.ts"),u=D("./src/types/transmuxer.ts"),s=D("./src/controller/gap-controller.ts"),a=D("./src/errors.ts"),A=D("./src/utils/logger.ts");function o(y,B){for(var C=0;C<B.length;C++){var d=B[C];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(y,d.key,d)}}function i(y,B,C){return B&&o(y.prototype,B),C&&o(y,C),y}function r(y,B){y.prototype=Object.create(B.prototype),y.prototype.constructor=y,t(y,B)}function t(y,B){return t=Object.setPrototypeOf||function(d,n){return d.__proto__=n,d},t(y,B)}var E=100,_=function(y){r(B,y);function B(d,n){var l;return l=y.call(this,d,n,"[stream-controller]")||this,l.audioCodecSwap=!1,l.gapController=null,l.level=-1,l._forceStartLoad=!1,l.altAudio=!1,l.audioOnly=!1,l.fragPlaying=null,l.onvplaying=null,l.onvseeked=null,l.fragLastKbps=0,l.stalled=!1,l.couldBacktrack=!1,l.audioCodecSwitch=!1,l.videoBuffer=null,l._registerListeners(),l}var C=B.prototype;return C._registerListeners=function(){var n=this.hls;n.on(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(X.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(X.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.on(X.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.on(X.Events.ERROR,this.onError,this),n.on(X.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.on(X.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.on(X.Events.BUFFER_CREATED,this.onBufferCreated,this),n.on(X.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.on(X.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.on(X.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C._unregisterListeners=function(){var n=this.hls;n.off(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(X.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.off(X.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.off(X.Events.ERROR,this.onError,this),n.off(X.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.off(X.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.off(X.Events.BUFFER_CREATED,this.onBufferCreated,this),n.off(X.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.off(X.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.off(X.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},C.startLoad=function(n){if(this.levels){var l=this.lastCurrentTime,c=this.hls;if(this.stopLoad(),this.setInterval(E),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var b=c.startLevel;b===-1&&(c.config.testBandwidth?(b=0,this.bitrateTest=!0):b=c.nextAutoLevel),this.level=c.nextLoadLevel=b,this.loadedmetadata=!1}l>0&&n===-1&&(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),n=l),this.state=F.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=n,this.tick()}else this._forceStartLoad=!0,this.state=F.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,y.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case F.State.IDLE:this.doTickIdle();break;case F.State.WAITING_LEVEL:{var n,l=this.levels,c=this.level,b=l==null||((n=l[c])===null||n===void 0)?void 0:n.details;if(b&&(!b.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(b))break;this.state=F.State.IDLE;break}break}case F.State.FRAG_LOADING_WAITING_RETRY:{var g,h=self.performance.now(),L=this.retryDate;(!L||h>=L||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=F.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){y.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var n,l,c=this.hls,b=this.levelLastLoaded,g=this.levels,h=this.media,L=c.config,N=c.nextLoadLevel;if(b===null||!h&&(this.startFragRequested||!L.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!g||!g[N])return;var T=g[N];this.level=c.nextLoadLevel=N;var M=T.details;if(!M||this.state===F.State.WAITING_LEVEL||M.live&&this.levelLastLoaded!==N){this.state=F.State.WAITING_LEVEL;return}var W=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:h,R.PlaylistLevelType.MAIN);if(W===null)return;var U=W.len,Y=this.getMaxBufferLength(T.maxBitrate);if(U>=Y)return;if(this._streamEnded(W,M)){var ne={};this.altAudio&&(ne.type="video"),this.hls.trigger(X.Events.BUFFER_EOS,ne),this.state=F.State.ENDED;return}var me=W.end,ge=this.getNextFragment(me,M);if(this.couldBacktrack&&!this.fragPrevious&&ge&&ge.sn!=="initSegment"){var Oe=ge.sn-M.startSN;Oe>1&&(ge=M.fragments[Oe-1],this.fragmentTracker.removeFragment(ge))}if(ge&&this.fragmentTracker.getState(ge)===e.FragmentState.OK&&this.nextLoadPosition>me){var Se=this.audioOnly&&!this.altAudio?m.ElementaryStreamTypes.AUDIO:m.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(h,Se,R.PlaylistLevelType.MAIN),ge=this.getNextFragment(this.nextLoadPosition,M)}if(!ge)return;ge.initSegment&&!ge.initSegment.data&&!this.bitrateTest&&(ge=ge.initSegment),((n=ge.decryptdata)===null||n===void 0?void 0:n.keyFormat)==="identity"&&!((l=ge.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(ge,M):this.loadFragment(ge,M,me)},C.loadFragment=function(n,l,c){var b,g=this.fragmentTracker.getState(n);if(this.fragCurrent=n,g===e.FragmentState.BACKTRACKED){var h=this.fragmentTracker.getBacktrackData(n);if(h){this._handleFragmentLoadProgress(h),this._handleFragmentLoadComplete(h);return}else g=e.FragmentState.NOT_LOADED}g===e.FragmentState.NOT_LOADED||g===e.FragmentState.PARTIAL?n.sn==="initSegment"?this._loadInitSegment(n):this.bitrateTest?(n.bitrateTest=!0,this.log("Fragment "+n.sn+" of level "+n.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(n)):(this.startFragRequested=!0,y.prototype.loadFragment.call(this,n,l,c)):g===e.FragmentState.APPENDING?this.reduceMaxBufferLength(n.duration)&&this.fragmentTracker.removeFragment(n):((b=this.media)===null||b===void 0?void 0:b.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(n){var l=this.fragmentTracker.getAppendedFrag(n,R.PlaylistLevelType.MAIN);return l&&"fragment"in l?l.fragment:l},C.getBufferedFrag=function(n){return this.fragmentTracker.getBufferedFrag(n,R.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(n){return n?this.getBufferedFrag(n.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var n=this.levels,l=this.media;if(l!=null&&l.readyState){var c,b=this.getAppendedFrag(l.currentTime);if(b&&b.start>1&&this.flushMainBuffer(0,b.start-1),!l.paused&&n){var g=this.hls.nextLoadLevel,h=n[g],L=this.fragLastKbps;L&&this.fragCurrent?c=this.fragCurrent.duration*h.maxBitrate/(1e3*L)+1:c=0}else c=0;var N=this.getBufferedFrag(l.currentTime+c);if(N){var T=this.followingBufferedFrag(N);if(T){this.abortCurrentFrag();var M=T.maxStartPTS?T.maxStartPTS:T.start,W=T.duration,U=Math.max(N.end,M+Math.min(Math.max(W-this.config.maxFragLookUpTolerance,W*.5),W*.75));this.flushMainBuffer(U,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var n=this.fragCurrent;this.fragCurrent=null,n!=null&&n.loader&&n.loader.abort(),this.state===F.State.KEY_LOADING&&(this.state=F.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(n,l){y.prototype.flushMainBuffer.call(this,n,l,this.altAudio?"video":null)},C.onMediaAttached=function(n,l){y.prototype.onMediaAttached.call(this,n,l);var c=l.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),c.addEventListener("playing",this.onvplaying),c.addEventListener("seeked",this.onvseeked),this.gapController=new s.default(this.config,c,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var n=this.media;n&&(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),y.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var n=this.media,l=n?n.currentTime:null;Object(V.isFiniteNumber)(l)&&this.log("Media seeked to "+l.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(X.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(n,l){var c=!1,b=!1,g;l.levels.forEach(function(h){g=h.audioCodec,g&&(g.indexOf("mp4a.40.2")!==-1&&(c=!0),g.indexOf("mp4a.40.5")!==-1&&(b=!0))}),this.audioCodecSwitch=c&&b&&!Object(O.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=l.levels,this.startFragRequested=!1},C.onLevelLoading=function(n,l){var c=this.levels;if(!c||this.state!==F.State.IDLE)return;var b=c[l.level];(!b.details||b.details.live&&this.levelLastLoaded!==l.level||this.waitForCdnTuneIn(b.details))&&(this.state=F.State.WAITING_LEVEL)},C.onLevelLoaded=function(n,l){var c,b=this.levels,g=l.level,h=l.details,L=h.totalduration;if(!b){this.warn("Levels were reset while loading level "+g);return}this.log("Level "+g+" loaded ["+h.startSN+","+h.endSN+"], cc ["+h.startCC+", "+h.endCC+"] duration:"+L);var N=this.fragCurrent;N&&(this.state===F.State.FRAG_LOADING||this.state===F.State.FRAG_LOADING_WAITING_RETRY)&&(N.level!==l.level&&N.loader&&(this.state=F.State.IDLE,N.loader.abort()));var T=b[g],M=0;if(h.live||(c=T.details)!==null&&c!==void 0&&c.live){if(h.fragments[0]||(h.deltaUpdateFailed=!0),h.deltaUpdateFailed)return;M=this.alignPlaylists(h,T.details)}if(T.details=h,this.levelLastLoaded=g,this.hls.trigger(X.Events.LEVEL_UPDATED,{details:h,level:g}),this.state===F.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(h))return;this.state=F.State.IDLE}this.startFragRequested?h.live&&this.synchronizeToLiveEdge(h):this.setStartPosition(h,M),this.tick()},C._handleFragmentLoadProgress=function(n){var l,c=n.frag,b=n.part,g=n.payload,h=this.levels;if(!h){this.warn("Levels were reset while fragment load was in progress. Fragment "+c.sn+" of level "+c.level+" will not be buffered");return}var L=h[c.level],N=L.details;if(!N){this.warn("Dropping fragment "+c.sn+" of level "+c.level+" after level details were reset");return}var T=L.videoCodec,M=N.PTSKnown||!N.live,W=(l=c.initSegment)===null||l===void 0?void 0:l.data,U=this._getAudioCodec(L),Y=this.transmuxer=this.transmuxer||new v.default(this.hls,R.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ne=b?b.index:-1,me=ne!==-1,ge=new u.ChunkMetadata(c.level,c.sn,c.stats.chunkCount,g.byteLength,ne,me),Oe=this.initPTS[c.cc];Y.push(g,W,U,T,c,b,N.totalduration,M,ge,Oe)},C.onAudioTrackSwitching=function(n,l){var c=this.altAudio,b=!!l.url,g=l.id;if(!b){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var h=this.fragCurrent;h!=null&&h.loader&&(this.log("Switching to main audio track, cancel main fragment load"),h.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var L=this.hls;c&&L.trigger(X.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),L.trigger(X.Events.AUDIO_TRACK_SWITCHED,{id:g})}},C.onAudioTrackSwitched=function(n,l){var c=l.id,b=!!this.hls.audioTracks[c].url;if(b){var g=this.videoBuffer;g&&this.mediaBuffer!==g&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=g)}this.altAudio=b,this.tick()},C.onBufferCreated=function(n,l){var c=l.tracks,b,g,h=!1;for(var L in c){var N=c[L];if(N.id==="main"){if(g=L,b=N,L==="video"){var T=c[L];T&&(this.videoBuffer=T.buffer)}}else h=!0}h&&b?(this.log("Alternate track found, use "+g+".buffered to schedule main fragment loading"),this.mediaBuffer=b.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(n,l){var c=l.frag,b=l.part;if(c&&c.type!==R.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(c)){this.warn("Fragment "+c.sn+(b?" p: "+b.index:"")+" of level "+c.level+" finished buffering, but was aborted. state: "+this.state),this.state===F.State.PARSED&&(this.state=F.State.IDLE);return}var g=b?b.stats:c.stats;this.fragLastKbps=Math.round(8*g.total/(g.buffering.end-g.loading.first)),c.sn!=="initSegment"&&(this.fragPrevious=c),this.fragBufferedComplete(c,b)},C.onError=function(n,l){switch(l.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:case a.ErrorDetails.KEY_LOAD_ERROR:case a.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.MAIN,l);break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==F.State.ERROR&&(l.fatal?(this.warn(""+l.details),this.state=F.State.ERROR):!l.levelRetry&&this.state===F.State.WAITING_LEVEL&&(this.state=F.State.IDLE));break;case a.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="main"&&(this.state===F.State.PARSING||this.state===F.State.PARSED)){var c=!0,b=this.getFwdBufferInfo(this.media,R.PlaylistLevelType.MAIN);b&&b.len>.5&&(c=!this.reduceMaxBufferLength(b.len)),c&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},C.checkBuffer=function(){var n=this.media,l=this.gapController;if(!n||!l||!n.readyState)return;var c=P.BufferHelper.getBuffered(n);!this.loadedmetadata&&c.length?(this.loadedmetadata=!0,this.seekToStartPos()):l.poll(this.lastCurrentTime),this.lastCurrentTime=n.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=F.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(n,l){var c=l.type;if(c!==m.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var b=(c===m.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(b,c,R.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(n,l){this.levels=l.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var n=this.media,l=n.currentTime,c=this.startPosition;if(c>=0&&l<c){if(n.seeking){A.logger.log("could not seek to "+c+", already seeking at "+l);return}var b=P.BufferHelper.getBuffered(n),g=b.length?b.start(0):0,h=g-c;h>0&&(h<this.config.maxBufferHole||h<this.config.maxFragLookUpTolerance)&&(A.logger.log("adjusting start position by "+h+" to match buffer start"),c+=h,this.startPosition=c),this.log("seek to target start position "+c+" from current time "+l),n.currentTime=c}},C._getAudioCodec=function(n){var l=this.config.defaultAudioCodec||n.audioCodec;return this.audioCodecSwap&&l&&(this.log("Swapping audio codec"),l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5"),l},C._loadBitrateTestFrag=function(n){var l=this;this._doFragLoad(n).then(function(c){var b=l.hls;if(!c||b.nextLoadLevel||l.fragContextChanged(n))return;l.fragLoadError=0,l.state=F.State.IDLE,l.startFragRequested=!1,l.bitrateTest=!1;var g=n.stats;g.parsing.start=g.parsing.end=g.buffering.start=g.buffering.end=self.performance.now(),b.trigger(X.Events.FRAG_LOADED,c)})},C._handleTransmuxComplete=function(n){var l,c="main",b=this.hls,g=n.remuxResult,h=n.chunkMeta,L=this.getCurrentContext(h);if(!L){this.warn("The loading context changed while buffering fragment "+h.sn+" of level "+h.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(h.level);return}var N=L.frag,T=L.part,M=L.level,W=g.video,U=g.text,Y=g.id3,ne=g.initSegment,me=this.altAudio?void 0:g.audio;if(this.fragContextChanged(N))return;if(this.state=F.State.PARSING,ne){ne.tracks&&(this._bufferInitSegment(M,ne.tracks,N,h),b.trigger(X.Events.FRAG_PARSING_INIT_SEGMENT,{frag:N,id:c,tracks:ne.tracks}));var ge=ne.initPTS,Oe=ne.timescale;Object(V.isFiniteNumber)(ge)&&(this.initPTS[N.cc]=ge,b.trigger(X.Events.INIT_PTS_FOUND,{frag:N,id:c,initPTS:ge,timescale:Oe}))}if(W&&g.independent!==!1){if(M.details){var Se=W.startPTS,Be=W.endPTS,Ne=W.startDTS,ke=W.endDTS;if(T)T.elementaryStreams[W.type]={startPTS:Se,endPTS:Be,startDTS:Ne,endDTS:ke};else if(W.firstKeyFrame&&W.independent&&(this.couldBacktrack=!0),W.dropped&&W.independent){var Ce=this.getLoadPosition()+this.config.maxBufferHole;if(Ce<Se){this.backtrack(N);return}N.setElementaryStreamInfo(W.type,N.start,Be,N.start,ke,!0)}N.setElementaryStreamInfo(W.type,Se,Be,Ne,ke),this.bufferFragmentData(W,N,T,h)}}else if(g.independent===!1){this.backtrack(N);return}if(me){var ve=me.startPTS,Xe=me.endPTS,lt=me.startDTS,at=me.endDTS;T&&(T.elementaryStreams[m.ElementaryStreamTypes.AUDIO]={startPTS:ve,endPTS:Xe,startDTS:lt,endDTS:at}),N.setElementaryStreamInfo(m.ElementaryStreamTypes.AUDIO,ve,Xe,lt,at),this.bufferFragmentData(me,N,T,h)}if(Y!=null&&(l=Y.samples)!==null&&l!==void 0&&l.length){var je={frag:N,id:c,samples:Y.samples};b.trigger(X.Events.FRAG_PARSING_METADATA,je)}if(U){var rt={frag:N,id:c,samples:U.samples};b.trigger(X.Events.FRAG_PARSING_USERDATA,rt)}},C._bufferInitSegment=function(n,l,c,b){var g=this;if(this.state!==F.State.PARSING)return;this.audioOnly=!!l.audio&&!l.video,this.altAudio&&!this.audioOnly&&delete l.audio;var h=l.audio,L=l.video,N=l.audiovideo;if(h){var T=n.audioCodec,M=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(T&&(T.indexOf("mp4a.40.5")!==-1?T="mp4a.40.2":T="mp4a.40.5"),h.metadata.channelCount!==1&&M.indexOf("firefox")===-1&&(T="mp4a.40.5")),M.indexOf("android")!==-1&&h.container!=="audio/mpeg"&&(T="mp4a.40.2",this.log("Android: force audio codec to "+T)),n.audioCodec&&n.audioCodec!==T&&this.log('Swapping manifest audio codec "'+n.audioCodec+'" for "'+T+'"'),h.levelCodec=T,h.id="main",this.log("Init audio buffer, container:"+h.container+", codecs[selected/level/parsed]=["+(T||"")+"/"+(n.audioCodec||"")+"/"+h.codec+"]")}L&&(L.levelCodec=n.videoCodec,L.id="main",this.log("Init video buffer, container:"+L.container+", codecs[level/parsed]=["+(n.videoCodec||"")+"/"+L.codec+"]")),N&&this.log("Init audiovideo buffer, container:"+N.container+", codecs[level/parsed]=["+(n.attrs.CODECS||"")+"/"+N.codec+"]"),this.hls.trigger(X.Events.BUFFER_CODECS,l),Object.keys(l).forEach(function(W){var U=l[W],Y=U.initSegment;Y!=null&&Y.byteLength&&g.hls.trigger(X.Events.BUFFER_APPENDING,{type:W,data:Y,frag:c,part:null,chunkMeta:b,parent:c.type})}),this.tick()},C.backtrack=function(n){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(n);var l=this.fragmentTracker.backtrack(n);this.fragPrevious=null,this.nextLoadPosition=n.start,l?this.resetFragmentLoading(n):this.state=F.State.BACKTRACKING},C.checkFragmentChanged=function(){var n=this.media,l=null;if(n&&n.readyState>1&&n.seeking===!1){var c=n.currentTime;if(P.BufferHelper.isBuffered(n,c)?l=this.getAppendedFrag(c):P.BufferHelper.isBuffered(n,c+.1)&&(l=this.getAppendedFrag(c+.1)),l){var b=this.fragPlaying,g=l.level;(!b||l.sn!==b.sn||b.level!==g||l.urlId!==b.urlId)&&(this.hls.trigger(X.Events.FRAG_CHANGED,{frag:l}),(!b||b.level!==g)&&this.hls.trigger(X.Events.LEVEL_SWITCHED,{level:g}),this.fragPlaying=l)}}},i(B,[{key:"nextLevel",get:function(){var n=this.nextBufferedFrag;return n?n.level:-1}},{key:"currentLevel",get:function(){var n=this.media;if(n){var l=this.getAppendedFrag(n.currentTime);if(l)return l.level}return-1}},{key:"nextBufferedFrag",get:function(){var n=this.media;if(n){var l=this.getAppendedFrag(n.currentTime);return this.followingBufferedFrag(l)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),B}(F.default)},"./src/controller/subtitle-stream-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"SubtitleStreamController",function(){return r});var V=D("./src/events.ts"),F=D("./src/utils/logger.ts"),O=D("./src/utils/buffer-helper.ts"),X=D("./src/controller/fragment-finders.ts"),P=D("./src/utils/discontinuities.ts"),e=D("./src/controller/level-helper.ts"),R=D("./src/controller/fragment-tracker.ts"),m=D("./src/controller/base-stream-controller.ts"),v=D("./src/types/loader.ts"),u=D("./src/types/level.ts");function s(t,E){for(var _=0;_<E.length;_++){var y=E[_];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(t,y.key,y)}}function a(t,E,_){return E&&s(t.prototype,E),_&&s(t,_),t}function A(t,E){t.prototype=Object.create(E.prototype),t.prototype.constructor=t,o(t,E)}function o(t,E){return o=Object.setPrototypeOf||function(y,B){return y.__proto__=B,y},o(t,E)}var i=500,r=function(t){A(E,t);function E(y,B){var C;return C=t.call(this,y,B,"[subtitle-stream-controller]")||this,C.levels=[],C.currentTrackId=-1,C.tracksBuffered=[],C.mainDetails=null,C._registerListeners(),C}var _=E.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var B=this.hls;B.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),B.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),B.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),B.on(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),B.on(V.Events.ERROR,this.onError,this),B.on(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),B.on(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),B.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),B.on(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),B.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_._unregisterListeners=function(){var B=this.hls;B.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),B.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),B.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),B.off(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),B.off(V.Events.ERROR,this.onError,this),B.off(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),B.off(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),B.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),B.off(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),B.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_.startLoad=function(){this.stopLoad(),this.state=m.State.IDLE,this.setInterval(i),this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},_.onLevelLoaded=function(B,C){this.mainDetails=C.details},_.onSubtitleFragProcessed=function(B,C){var d=C.frag,n=C.success;if(this.fragPrevious=d,this.state=m.State.IDLE,!n)return;var l=this.tracksBuffered[this.currentTrackId];if(!l)return;for(var c,b=d.start,g=0;g<l.length;g++)if(b>=l[g].start&&b<=l[g].end){c=l[g];break}var h=d.start+d.duration;c?c.end=h:(c={start:b,end:h},l.push(c)),this.fragmentTracker.fragBuffered(d)},_.onBufferFlushing=function(B,C){var d=C.startOffset,n=C.endOffset;if(d===0&&n!==Number.POSITIVE_INFINITY){var l=this.currentTrackId,c=this.levels;if(!c.length||!c[l]||!c[l].details)return;var b=c[l].details,g=b.targetduration,h=n-g;if(h<=0)return;C.endOffsetSubtitles=Math.max(0,h),this.tracksBuffered.forEach(function(L){for(var N=0;N<L.length;){if(L[N].end<=h){L.shift();continue}else if(L[N].start<h)L[N].start=h;else break;N++}}),this.fragmentTracker.removeFragmentsInRange(d,h,v.PlaylistLevelType.SUBTITLE)}},_.onError=function(B,C){var d,n=C.frag;if(!n||n.type!==v.PlaylistLevelType.SUBTITLE)return;(d=this.fragCurrent)!==null&&d!==void 0&&d.loader&&this.fragCurrent.loader.abort(),this.state=m.State.IDLE},_.onSubtitleTracksUpdated=function(B,C){var d=this,n=C.subtitleTracks;this.tracksBuffered=[],this.levels=n.map(function(l){return new u.Level(l)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(l){d.tracksBuffered[l.id]=[]}),this.mediaBuffer=null},_.onSubtitleTrackSwitch=function(B,C){if(this.currentTrackId=C.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var d=this.levels[this.currentTrackId];d!=null&&d.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,d&&this.setInterval(i)},_.onSubtitleTrackLoaded=function(B,C){var d,n=C.details,l=C.id,c=this.currentTrackId,b=this.levels;if(!b.length)return;var g=b[c];if(l>=b.length||l!==c||!g)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,n.live||(d=g.details)!==null&&d!==void 0&&d.live){var h=this.mainDetails;if(n.deltaUpdateFailed||!h)return;var L=h.fragments[0];if(!g.details)n.hasProgramDateTime&&h.hasProgramDateTime?Object(P.alignMediaPlaylistByPDT)(n,h):L&&Object(e.addSliding)(n,L.start);else{var N=this.alignPlaylists(n,g.details);N===0&&L&&Object(e.addSliding)(n,L.start)}}if(g.details=n,this.levelLastLoaded=l,this.tick(),n.live&&!this.fragCurrent&&this.media&&this.state===m.State.IDLE){var T=Object(X.findFragmentByPTS)(null,n.fragments,this.media.currentTime,0);T||(this.warn("Subtitle playlist not aligned with playback"),g.details=void 0)}},_._handleFragmentLoadComplete=function(B){var C=B.frag,d=B.payload,n=C.decryptdata,l=this.hls;if(this.fragContextChanged(C))return;if(d&&d.byteLength>0&&n&&n.key&&n.iv&&n.method==="AES-128"){var c=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(d),n.key.buffer,n.iv.buffer).then(function(b){var g=performance.now();l.trigger(V.Events.FRAG_DECRYPTED,{frag:C,payload:b,stats:{tstart:c,tdecrypt:g}})})}},_.doTick=function(){if(!this.media){this.state=m.State.IDLE;return}if(this.state===m.State.IDLE){var B,C=this.currentTrackId,d=this.levels;if(!d.length||!d[C]||!d[C].details)return;var n=d[C].details,l=n.targetduration,c=this.config,b=this.media,g=O.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,b.currentTime-l,c.maxBufferHole),h=g.end,L=g.len,N=this.getMaxBufferLength()+l;if(L>N)return;console.assert(n,"Subtitle track details are defined on idle subtitle stream controller tick");var T=n.fragments,M=T.length,W=n.edge,U,Y=this.fragPrevious;if(h<W){var ne=c.maxFragLookUpTolerance;Y&&n.hasProgramDateTime&&(U=Object(X.findFragmentByPDT)(T,Y.endProgramDateTime,ne)),U||(U=Object(X.findFragmentByPTS)(Y,T,h,ne),!U&&Y&&Y.start<T[0].start&&(U=T[0]))}else U=T[M-1];(B=U)!==null&&B!==void 0&&B.encrypted?(F.logger.log("Loading key for "+U.sn),this.state=m.State.KEY_LOADING,this.hls.trigger(V.Events.KEY_LOADING,{frag:U})):U&&this.fragmentTracker.getState(U)===R.FragmentState.NOT_LOADED&&this.loadFragment(U,n,h)}},_.loadFragment=function(B,C,d){this.fragCurrent=B,t.prototype.loadFragment.call(this,B,C,d)},a(E,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),E}(m.default)},"./src/controller/subtitle-track-controller.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/events.ts"),F=D("./src/utils/texttrack-utils.ts"),O=D("./src/controller/base-playlist-controller.ts"),X=D("./src/types/loader.ts");function P(s,a){for(var A=0;A<a.length;A++){var o=a[A];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(s,o.key,o)}}function e(s,a,A){return a&&P(s.prototype,a),A&&P(s,A),s}function R(s,a){s.prototype=Object.create(a.prototype),s.prototype.constructor=s,m(s,a)}function m(s,a){return m=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},m(s,a)}var v=function(s){R(a,s);function a(o){var i;return i=s.call(this,o,"[subtitle-track-controller]")||this,i.media=null,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.selectDefaultTrack=!0,i.queuedDefaultTrack=-1,i.trackChangeListener=function(){return i.onTextTracksChanged()},i.asyncPollTrackChange=function(){return i.pollTrackChange(0)},i.useTextTrackPolling=!1,i.subtitlePollingInterval=-1,i.subtitleDisplay=!0,i.registerListeners(),i}var A=a.prototype;return A.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,s.prototype.destroy.call(this)},A.registerListeners=function(){var i=this.hls;i.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.on(V.Events.ERROR,this.onError,this)},A.unregisterListeners=function(){var i=this.hls;i.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.off(V.Events.ERROR,this.onError,this)},A.onMediaAttached=function(i,r){if(this.media=r.media,!this.media)return;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)},A.pollTrackChange=function(i){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,i)},A.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var i=u(this.media.textTracks);i.forEach(function(r){Object(F.clearCurrentCues)(r)}),this.subtitleTrack=-1,this.media=null},A.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},A.onManifestParsed=function(i,r){this.tracks=r.subtitleTracks},A.onSubtitleTrackLoaded=function(i,r){var t=r.id,E=r.details,_=this.trackId,y=this.tracksInGroup[_];if(!y){this.warn("Invalid subtitle track id "+t);return}var B=y.details;y.details=r.details,this.log("subtitle track "+t+" loaded ["+E.startSN+"-"+E.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,r,B))},A.onLevelLoading=function(i,r){this.switchLevel(r.level)},A.onLevelSwitching=function(i,r){this.switchLevel(r.level)},A.switchLevel=function(i){var r=this.hls.levels[i];if(!(r!=null&&r.textGroupIds))return;var t=r.textGroupIds[r.urlId];if(this.groupId!==t){var E=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,_=this.tracks.filter(function(C){return!t||C.groupId===t});this.tracksInGroup=_;var y=this.findTrackId(E==null?void 0:E.name)||this.findTrackId();this.groupId=t;var B={subtitleTracks:_};this.log("Updating subtitle tracks, "+_.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(V.Events.SUBTITLE_TRACKS_UPDATED,B),y!==-1&&this.setSubtitleTrack(y,E)}},A.findTrackId=function(i){for(var r=this.tracksInGroup,t=0;t<r.length;t++){var E=r[t];if((!this.selectDefaultTrack||E.default)&&(!i||i===E.name))return E.id}return-1},A.onError=function(i,r){if(s.prototype.onError.call(this,i,r),r.fatal||!r.context)return;r.context.type===X.PlaylistContextType.SUBTITLE_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},A.loadPlaylist=function(i){var r=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(r)){var t=r.id,E=r.groupId,_=r.url;if(i)try{_=i.addDirectives(_)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(V.Events.SUBTITLE_TRACK_LOADING,{url:_,id:t,groupId:E,deliveryDirectives:i||null})}},A.toggleTrackModes=function(i){var r=this,t=this.media,E=this.subtitleDisplay,_=this.trackId;if(!t)return;var y=u(t.textTracks),B=y.filter(function(n){return n.groupId===r.groupId});if(i===-1)[].slice.call(y).forEach(function(n){n.mode="disabled"});else{var C=B[_];C&&(C.mode="disabled")}var d=B[i];d&&(d.mode=E?"showing":"hidden")},A.setSubtitleTrack=function(i,r){var t,E=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=i;return}if(this.trackId!==i&&this.toggleTrackModes(i),this.trackId===i&&(i===-1||(t=E[i])!==null&&t!==void 0&&t.details)||i<-1||i>=E.length)return;this.clearTimer();var _=E[i];if(this.log("Switching to subtitle track "+i),this.trackId=i,_){var y=_.id,B=_.groupId,C=B===void 0?"":B,d=_.name,n=_.type,l=_.url;this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:y,groupId:C,name:d,type:n,url:l});var c=this.switchParams(_.url,r==null?void 0:r.details);this.loadPlaylist(c)}else this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:i})},A.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var i=-1,r=u(this.media.textTracks),t=0;t<r.length;t++)if(r[t].mode==="hidden")i=t;else if(r[t].mode==="showing"){i=t;break}this.subtitleTrack!==i&&(this.subtitleTrack=i)},e(a,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1;var r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(i,r)}}]),a}(O.default);function u(s){for(var a=[],A=0;A<s.length;A++){var o=s[A];o.kind==="subtitles"&&o.label&&a.push(s[A])}return a}G.default=v},"./src/controller/timeline-controller.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"TimelineController",function(){return u});var V=D("./src/polyfills/number.ts"),F=D("./src/events.ts"),O=D("./src/utils/cea-608-parser.ts"),X=D("./src/utils/output-filter.ts"),P=D("./src/utils/webvtt-parser.ts"),e=D("./src/utils/texttrack-utils.ts"),R=D("./src/utils/imsc1-ttml-parser.ts"),m=D("./src/types/loader.ts"),v=D("./src/utils/logger.ts"),u=function(){function o(r){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=A(),this.captionsProperties=void 0,this.hls=r,this.config=r.config,this.Cues=r.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 t=new X.default(this,"textTrack1"),E=new X.default(this,"textTrack2"),_=new X.default(this,"textTrack3"),y=new X.default(this,"textTrack4");this.cea608Parser1=new O.default(1,t,E),this.cea608Parser2=new O.default(3,_,y)}r.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),r.on(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),r.on(F.Events.FRAG_LOADING,this.onFragLoading,this),r.on(F.Events.FRAG_LOADED,this.onFragLoaded,this),r.on(F.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),r.on(F.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),r.on(F.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.on(F.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),r.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=o.prototype;return i.destroy=function(){var t=this.hls;t.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(F.Events.FRAG_LOADING,this.onFragLoading,this),t.off(F.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(F.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(F.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(F.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(F.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(t,E,_,y,B){for(var C=!1,d=B.length;d--;){var n=B[d],l=a(n[0],n[1],E,_);if(l>=0&&(n[0]=Math.min(n[0],E),n[1]=Math.max(n[1],_),C=!0,l/(_-E)>.5))return}if(C||B.push([E,_]),this.config.renderTextTracksNatively){var c=this.captionsTracks[t];this.Cues.newCue(c,E,_,y)}else{var b=this.Cues.newCue(null,E,_,y);this.hls.trigger(F.Events.CUES_PARSED,{type:"captions",cues:b,track:t})}},i.onInitPtsFound=function(t,E){var _=this,y=E.frag,B=E.id,C=E.initPTS,d=E.timescale,n=this.unparsedVttFrags;B==="main"&&(this.initPTS[y.cc]=C,this.timescale[y.cc]=d),n.length&&(this.unparsedVttFrags=[],n.forEach(function(l){_.onFragLoaded(F.Events.FRAG_LOADED,l)}))},i.getExistingTrack=function(t){var E=this.media;if(E)for(var _=0;_<E.textTracks.length;_++){var y=E.textTracks[_];if(y[t])return y}return null},i.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},i.createNativeTrack=function(t){if(this.captionsTracks[t])return;var E=this.captionsProperties,_=this.captionsTracks,y=this.media,B=E[t],C=B.label,d=B.languageCode,n=this.getExistingTrack(t);if(n)_[t]=n,Object(e.clearCurrentCues)(_[t]),Object(e.sendAddTrackEvent)(_[t],y);else{var l=this.createTextTrack("captions",C,d);l&&(l[t]=!0,_[t]=l)}},i.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var E=this.captionsProperties[t];if(!E)return;var _=E.label,y={_id:t,label:_,kind:"captions",default:E.media?!!E.media.default:!1,closedCaptions:E.media};this.nonNativeCaptionsTracks[t]=y,this.hls.trigger(F.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[y]})},i.createTextTrack=function(t,E,_){var y=this.media;return y?y.addTextTrack(t,E,_):void 0},i.onMediaAttaching=function(t,E){this.media=E.media,this._cleanTracks()},i.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(E){Object(e.clearCurrentCues)(t[E]),delete t[E]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=A(),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 t=this.media;if(!t)return;var E=t.textTracks;if(E)for(var _=0;_<E.length;_++)Object(e.clearCurrentCues)(E[_])},i.onSubtitleTracksUpdated=function(t,E){var _=this;this.textTracks=[];var y=E.subtitleTracks||[],B=y.some(function(l){return l.textCodec===R.IMSC1_CODEC});if(this.config.enableWebVTT||B&&this.config.enableIMSC1){var C=this.tracks&&y&&this.tracks.length===y.length;if(this.tracks=y||[],this.config.renderTextTracksNatively){var d=this.media?this.media.textTracks:[];this.tracks.forEach(function(l,c){var b;if(c<d.length){for(var g=null,h=0;h<d.length;h++)if(s(d[h],l)){g=d[h];break}g&&(b=g)}b?Object(e.clearCurrentCues)(b):(b=_.createTextTrack("subtitles",l.name,l.lang),b&&(b.mode="disabled")),b&&(b.groupId=l.groupId,_.textTracks.push(b))})}else if(!C&&this.tracks&&this.tracks.length){var n=this.tracks.map(function(l){return{label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}});this.hls.trigger(F.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:n})}}},i.onManifestLoaded=function(t,E){var _=this;this.config.enableCEA708Captions&&E.captions&&E.captions.forEach(function(y){var B=/(?:CC|SERVICE)([1-4])/.exec(y.instreamId);if(!B)return;var C="textTrack"+B[1],d=_.captionsProperties[C];if(!d)return;d.label=y.name,y.lang&&(d.languageCode=y.lang),d.media=y})},i.onFragLoading=function(t,E){var _=this.cea608Parser1,y=this.cea608Parser2,B=this.lastSn,C=this.lastPartIndex;if(!this.enabled||!(_&&y))return;if(E.frag.type===m.PlaylistLevelType.MAIN){var d,n,l=E.frag.sn,c=(d=E==null||((n=E.part)===null||n===void 0)?void 0:n.index)!=null?d:-1;l===B+1||l===B&&c===C+1||(_.reset(),y.reset()),this.lastSn=l,this.lastPartIndex=c}},i.onFragLoaded=function(t,E){var _=E.frag,y=E.payload,B=this.initPTS,C=this.unparsedVttFrags;if(_.type===m.PlaylistLevelType.SUBTITLE)if(y.byteLength){if(!Object(V.isFiniteNumber)(B[_.cc])){C.push(E),B.length&&this.hls.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Missing initial subtitle PTS")});return}var d=_.decryptdata;if(d==null||d.key==null||d.method!=="AES-128"){var n=this.tracks[_.level],l=this.vttCCs;l[_.cc]||(l[_.cc]={start:_.start,prevCC:this.prevCC,new:!0},this.prevCC=_.cc),n&&n.textCodec===R.IMSC1_CODEC?this._parseIMSC1(_,y):this._parseVTTs(_,y,l)}}else this.hls.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(t,E){var _=this,y=this.hls;Object(R.parseIMSC1)(E,this.initPTS[t.cc],this.timescale[t.cc],function(B){_._appendCues(B,t.level),y.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(B){v.logger.log("Failed to parse IMSC1: "+B),y.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:B})})},i._parseVTTs=function(t,E,_){var y=this,B=this.hls;Object(P.parseWebVTT)(E,this.initPTS[t.cc],this.timescale[t.cc],_,t.cc,t.start,function(C){y._appendCues(C,t.level),B.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(C){y._fallbackToIMSC1(t,E),v.logger.log("Failed to parse VTT cue: "+C),B.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:C})})},i._fallbackToIMSC1=function(t,E){var _=this,y=this.tracks[t.level];y.textCodec||Object(R.parseIMSC1)(E,this.initPTS[t.cc],this.timescale[t.cc],function(){y.textCodec=R.IMSC1_CODEC,_._parseIMSC1(t,E)},function(){y.textCodec="wvtt"})},i._appendCues=function(t,E){var _=this.hls;if(this.config.renderTextTracksNatively){var y=this.textTracks[E];if(y.mode==="disabled")return;t.forEach(function(d){return Object(e.addCueToTrack)(y,d)})}else{var B=this.tracks[E],C=B.default?"default":"subtitles"+E;_.trigger(F.Events.CUES_PARSED,{type:"subtitles",cues:t,track:C})}},i.onFragDecrypted=function(t,E){var _=E.frag;if(_.type===m.PlaylistLevelType.SUBTITLE){if(!Object(V.isFiniteNumber)(this.initPTS[_.cc])){this.unparsedVttFrags.push(E);return}this.onFragLoaded(F.Events.FRAG_LOADED,E)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(t,E){var _=this.cea608Parser1,y=this.cea608Parser2;if(!this.enabled||!(_&&y))return;for(var B=0;B<E.samples.length;B++){var C=E.samples[B].bytes;if(C){var d=this.extractCea608Data(C);_.addData(E.samples[B].pts,d[0]),y.addData(E.samples[B].pts,d[1])}}},i.onBufferFlushing=function(t,E){var _=E.startOffset,y=E.endOffset,B=E.endOffsetSubtitles,C=E.type,d=this.media;if(!d||d.currentTime<y)return;if(!C||C==="video"){var n=this.captionsTracks;Object.keys(n).forEach(function(c){return Object(e.removeCuesInRange)(n[c],_,y)})}if(this.config.renderTextTracksNatively&&(_===0&&B!==void 0)){var l=this.textTracks;Object.keys(l).forEach(function(c){return Object(e.removeCuesInRange)(l[c],_,B)})}},i.extractCea608Data=function(t){for(var E=t[0]&31,_=2,y=[[],[]],B=0;B<E;B++){var C=t[_++],d=127&t[_++],n=127&t[_++],l=(4&C)!==0,c=3&C;if(d===0&&n===0)continue;l&&((c===0||c===1)&&(y[c].push(d),y[c].push(n)))}return y},o}();function s(o,i){return o&&o.label===i.name&&!(o.textTrack1||o.textTrack2)}function a(o,i,r,t){return Math.min(i,t)-Math.max(o,r)}function A(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function F(X,P){this.subtle=void 0,this.aesIV=void 0,this.subtle=X,this.aesIV=P}var O=F.prototype;return O.decrypt=function(P,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,P)},F}()},"./src/crypt/aes-decryptor.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"removePadding",function(){return F}),D.d(G,"default",function(){return O});var V=D("./src/utils/typed-array.ts");function F(X){var P=X.byteLength,e=P&&new DataView(X.buffer).getUint8(P-1);return e?Object(V.sliceUint8)(X,0,P-e):X}var O=function(){function X(){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 P=X.prototype;return P.uint8ArrayToUint32Array_=function(R){for(var m=new DataView(R),v=new Uint32Array(4),u=0;u<4;u++)v[u]=m.getUint32(u*4);return v},P.initTable=function(){var R=this.sBox,m=this.invSBox,v=this.subMix,u=v[0],s=v[1],a=v[2],A=v[3],o=this.invSubMix,i=o[0],r=o[1],t=o[2],E=o[3],_=new Uint32Array(256),y=0,B=0,C=0;for(C=0;C<256;C++)C<128?_[C]=C<<1:_[C]=C<<1^283;for(C=0;C<256;C++){var d=B^B<<1^B<<2^B<<3^B<<4;d=d>>>8^d&255^99,R[y]=d,m[d]=y;var n=_[y],l=_[n],c=_[l],b=_[d]*257^d*16843008;u[y]=b<<24|b>>>8,s[y]=b<<16|b>>>16,a[y]=b<<8|b>>>24,A[y]=b,b=c*16843009^l*65537^n*257^y*16843008,i[d]=b<<24|b>>>8,r[d]=b<<16|b>>>16,t[d]=b<<8|b>>>24,E[d]=b,y?(y=n^_[_[_[c^n]]],B^=_[_[B]]):y=B=1}},P.expandKey=function(R){for(var m=this.uint8ArrayToUint32Array_(R),v=!0,u=0;u<m.length&&v;)v=m[u]===this.key[u],u++;if(v)return;this.key=m;var s=this.keySize=m.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);var a=this.ksRows=(s+6+1)*4,A,o,i=this.keySchedule=new Uint32Array(a),r=this.invKeySchedule=new Uint32Array(a),t=this.sBox,E=this.rcon,_=this.invSubMix,y=_[0],B=_[1],C=_[2],d=_[3],n,l;for(A=0;A<a;A++){if(A<s){n=i[A]=m[A];continue}l=n,A%s===0?(l=l<<8|l>>>24,l=t[l>>>24]<<24|t[l>>>16&255]<<16|t[l>>>8&255]<<8|t[l&255],l^=E[A/s|0]<<24):s>6&&A%s===4&&(l=t[l>>>24]<<24|t[l>>>16&255]<<16|t[l>>>8&255]<<8|t[l&255]),i[A]=n=(i[A-s]^l)>>>0}for(o=0;o<a;o++)A=a-o,o&3?l=i[A]:l=i[A-4],o<4||A<=4?r[o]=l:r[o]=y[t[l>>>24]]^B[t[l>>>16&255]]^C[t[l>>>8&255]]^d[t[l&255]],r[o]=r[o]>>>0},P.networkToHostOrderSwap=function(R){return R<<24|(R&65280)<<8|(R&16711680)>>8|R>>>24},P.decrypt=function(R,m,v){for(var u=this.keySize+6,s=this.invKeySchedule,a=this.invSBox,A=this.invSubMix,o=A[0],i=A[1],r=A[2],t=A[3],E=this.uint8ArrayToUint32Array_(v),_=E[0],y=E[1],B=E[2],C=E[3],d=new Int32Array(R),n=new Int32Array(d.length),l,c,b,g,h,L,N,T,M,W,U,Y,ne,me,ge=this.networkToHostOrderSwap;m<d.length;){for(M=ge(d[m]),W=ge(d[m+1]),U=ge(d[m+2]),Y=ge(d[m+3]),h=M^s[0],L=Y^s[1],N=U^s[2],T=W^s[3],ne=4,me=1;me<u;me++)l=o[h>>>24]^i[L>>16&255]^r[N>>8&255]^t[T&255]^s[ne],c=o[L>>>24]^i[N>>16&255]^r[T>>8&255]^t[h&255]^s[ne+1],b=o[N>>>24]^i[T>>16&255]^r[h>>8&255]^t[L&255]^s[ne+2],g=o[T>>>24]^i[h>>16&255]^r[L>>8&255]^t[N&255]^s[ne+3],h=l,L=c,N=b,T=g,ne=ne+4;l=a[h>>>24]<<24^a[L>>16&255]<<16^a[N>>8&255]<<8^a[T&255]^s[ne],c=a[L>>>24]<<24^a[N>>16&255]<<16^a[T>>8&255]<<8^a[h&255]^s[ne+1],b=a[N>>>24]<<24^a[T>>16&255]<<16^a[h>>8&255]<<8^a[L&255]^s[ne+2],g=a[T>>>24]<<24^a[h>>16&255]<<16^a[L>>8&255]<<8^a[N&255]^s[ne+3],n[m]=ge(l^_),n[m+1]=ge(g^y),n[m+2]=ge(b^B),n[m+3]=ge(c^C),_=M,y=W,B=U,C=Y,m=m+4}return n.buffer},X}()},"./src/crypt/decrypter.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return m});var V=D("./src/crypt/aes-crypto.ts"),F=D("./src/crypt/fast-aes-key.ts"),O=D("./src/crypt/aes-decryptor.ts"),X=D("./src/utils/logger.ts"),P=D("./src/utils/mp4-tools.ts"),e=D("./src/utils/typed-array.ts"),R=16,m=function(){function v(s,a,A){var o=A===void 0?{}:A,i=o.removePKCS7Padding,r=i===void 0?!0:i;if(this.logEnabled=!0,this.observer=void 0,this.config=void 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.observer=s,this.config=a,this.removePKCS7Padding=r,r)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(E){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var u=v.prototype;return u.destroy=function(){this.observer=null},u.isSync=function(){return this.config.enableSoftwareAES},u.flush=function(){var a=this.currentResult;if(!a){this.reset();return}var A=new Uint8Array(a);return this.reset(),this.removePKCS7Padding?Object(O.removePadding)(A):A},u.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},u.decrypt=function(a,A,o,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(a),A,o);var r=this.flush();r&&i(r.buffer)}else this.webCryptoDecrypt(new Uint8Array(a),A,o).then(i)},u.softwareDecrypt=function(a,A,o){var i=this.currentIV,r=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(a=Object(P.appendUint8Array)(t,a),this.remainderData=null);var E=this.getValidChunk(a);if(!E.length)return null;i&&(o=i);var _=this.softwareDecrypter;_||(_=this.softwareDecrypter=new O.default),_.expandKey(A);var y=r;return this.currentResult=_.decrypt(E.buffer,0,o),this.currentIV=Object(e.sliceUint8)(E,-16).buffer,y||null},u.webCryptoDecrypt=function(a,A,o){var i=this,r=this.subtle;return(this.key!==A||!this.fastAesKey)&&(this.key=A,this.fastAesKey=new F.default(r,A)),this.fastAesKey.expandKey().then(function(t){if(!r)return Promise.reject(new Error("web crypto not initialized"));var E=new V.default(r,o);return E.decrypt(a.buffer,t)}).catch(function(t){return i.onWebCryptoError(t,a,A,o)})},u.onWebCryptoError=function(a,A,o,i){return X.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",a),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(A,o,i)},u.getValidChunk=function(a){var A=a,o=a.length-a.length%R;return o!==a.length&&(A=Object(e.sliceUint8)(a,0,o),this.remainderData=Object(e.sliceUint8)(a,o)),A},u.logOnce=function(a){if(!this.logEnabled)return;X.logger.log("[decrypter.ts]: "+a),this.logEnabled=!1},v}()},"./src/crypt/fast-aes-key.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function F(X,P){this.subtle=void 0,this.key=void 0,this.subtle=X,this.key=P}var O=F.prototype;return O.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},F}()},"./src/demux/aacdemuxer.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/demux/base-audio-demuxer.ts"),F=D("./src/demux/adts.ts"),O=D("./src/utils/logger.ts"),X=D("./src/demux/id3.ts");function P(m,v){m.prototype=Object.create(v.prototype),m.prototype.constructor=m,e(m,v)}function e(m,v){return e=Object.setPrototypeOf||function(s,a){return s.__proto__=a,s},e(m,v)}var R=function(m){P(v,m);function v(s,a){var A;return A=m.call(this)||this,A.observer=void 0,A.config=void 0,A.observer=s,A.config=a,A}var u=v.prototype;return u.resetInitSegment=function(a,A,o){m.prototype.resetInitSegment.call(this,a,A,o),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:a,duration:o,inputTimeScale:9e4,dropped:0}},v.probe=function(a){if(!a)return!1;for(var A=X.getID3Data(a,0)||[],o=A.length,i=a.length;o<i;o++)if(F.probe(a,o))return O.logger.log("ADTS sync word found !"),!0;return!1},u.canParse=function(a,A){return F.canParse(a,A)},u.appendFrame=function(a,A,o){F.initTrackConfig(a,this.observer,A,o,a.manifestCodec);var i=F.appendFrame(a,A,o,this.initPTS,this.frameIndex);if(i&&i.missing===0)return i},v}(V.default);R.minProbeByteLength=9,G.default=R},"./src/demux/adts.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"getAudioConfig",function(){return X}),D.d(G,"isHeaderPattern",function(){return P}),D.d(G,"getHeaderLength",function(){return e}),D.d(G,"getFullFrameLength",function(){return R}),D.d(G,"canGetFrameLength",function(){return m}),D.d(G,"isHeader",function(){return v}),D.d(G,"canParse",function(){return u}),D.d(G,"probe",function(){return s}),D.d(G,"initTrackConfig",function(){return a}),D.d(G,"getFrameDuration",function(){return A}),D.d(G,"parseFrameHeader",function(){return o}),D.d(G,"appendFrame",function(){return i});var V=D("./src/utils/logger.ts"),F=D("./src/errors.ts"),O=D("./src/events.ts");function X(r,t,E,_){var y,B,C,d,n=navigator.userAgent.toLowerCase(),l=_,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];y=((t[E+2]&192)>>>6)+1;var b=(t[E+2]&60)>>>2;if(b>c.length-1){r.trigger(O.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+b});return}return C=(t[E+2]&1)<<2,C|=(t[E+3]&192)>>>6,V.logger.log("manifest codec:"+_+", ADTS type:"+y+", samplingIndex:"+b),/firefox/i.test(n)?b>=6?(y=5,d=new Array(4),B=b-3):(y=2,d=new Array(2),B=b):n.indexOf("android")!==-1?(y=2,d=new Array(2),B=b):(y=5,d=new Array(4),_&&(_.indexOf("mp4a.40.29")!==-1||_.indexOf("mp4a.40.5")!==-1)||!_&&b>=6?B=b-3:((_&&_.indexOf("mp4a.40.2")!==-1&&(b>=6&&C===1||/vivaldi/i.test(n))||!_&&C===1)&&(y=2,d=new Array(2)),B=b)),d[0]=y<<3,d[0]|=(b&14)>>1,d[1]|=(b&1)<<7,d[1]|=C<<3,y===5&&(d[1]|=(B&14)>>1,d[2]=(B&1)<<7,d[2]|=2<<2,d[3]=0),{config:d,samplerate:c[b],channelCount:C,codec:"mp4a.40."+y,manifestCodec:l}}function P(r,t){return r[t]===255&&(r[t+1]&246)===240}function e(r,t){return r[t+1]&1?7:9}function R(r,t){return(r[t+3]&3)<<11|r[t+4]<<3|(r[t+5]&224)>>>5}function m(r,t){return t+5<r.length}function v(r,t){return t+1<r.length&&P(r,t)}function u(r,t){return m(r,t)&&P(r,t)&&R(r,t)<=r.length-t}function s(r,t){if(v(r,t)){var E=e(r,t);if(t+E>=r.length)return!1;var _=R(r,t);if(_<=E)return!1;var y=t+_;return y===r.length||v(r,y)}return!1}function a(r,t,E,_,y){if(!r.samplerate){var B=X(t,E,_,y);if(!B)return;r.config=B.config,r.samplerate=B.samplerate,r.channelCount=B.channelCount,r.codec=B.codec,r.manifestCodec=B.manifestCodec,V.logger.log("parsed codec:"+r.codec+", rate:"+B.samplerate+", channels:"+B.channelCount)}}function A(r){return 1024*9e4/r}function o(r,t,E,_,y){var B=e(r,t),C=R(r,t);if(C-=B,C>0){var d=E+_*y;return{headerLength:B,frameLength:C,stamp:d}}}function i(r,t,E,_,y){var B=A(r.samplerate),C=o(t,E,_,y,B);if(C){var d=C.frameLength,n=C.headerLength,l=C.stamp,c=n+d,b=Math.max(0,E+c-t.length),g;b?(g=new Uint8Array(c-n),g.set(t.subarray(E+n,t.length),0)):g=t.subarray(E+n,E+c);var h={unit:g,pts:l};return b||r.samples.push(h),{sample:h,length:c,missing:b}}}},"./src/demux/base-audio-demuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"initPTSFn",function(){return R});var V=D("./src/polyfills/number.ts"),F=D("./src/demux/id3.ts"),O=D("./src/demux/dummy-demuxed-track.ts"),X=D("./src/utils/mp4-tools.ts"),P=D("./src/utils/typed-array.ts"),e=function(){function m(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var v=m.prototype;return v.resetInitSegment=function(s,a,A){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},v.resetTimeStamp=function(){},v.resetContiguity=function(){},v.canParse=function(s,a){return!1},v.appendFrame=function(s,a,A){},v.demux=function(s,a){this.cachedData&&(s=Object(X.appendUint8Array)(this.cachedData,s),this.cachedData=null);var A=F.getID3Data(s,0),o=A?A.length:0,i,r,t=this._audioTrack,E=this._id3Track,_=A?F.getTimeStamp(A):void 0,y=s.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=R(_,a)),A&&A.length>0&&E.samples.push({pts:this.initPTS,dts:this.initPTS,data:A}),r=this.initPTS;o<y;){if(this.canParse(s,o)){var B=this.appendFrame(t,s,o);B?(this.frameIndex++,r=B.sample.pts,o+=B.length,i=o):o=y}else F.canParse(s,o)?(A=F.getID3Data(s,o),E.samples.push({pts:r,dts:r,data:A}),o+=A.length,i=o):o++;if(o===y&&i!==y){var C=Object(P.sliceUint8)(s,i);this.cachedData?this.cachedData=Object(X.appendUint8Array)(this.cachedData,C):this.cachedData=C}}return{audioTrack:t,avcTrack:Object(O.dummyTrack)(),id3Track:E,textTrack:Object(O.dummyTrack)()}},v.demuxSampleAes=function(s,a,A){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},v.flush=function(s){var a=this.cachedData;return a&&(this.cachedData=null,this.demux(a,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(O.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(O.dummyTrack)()}},v.destroy=function(){},m}(),R=function(v,u){return Object(V.isFiniteNumber)(v)?v*90:u*9e4};G.default=e},"./src/demux/chunk-cache.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function O(){this.chunks=[],this.dataLength=0}var X=O.prototype;return X.push=function(e){this.chunks.push(e),this.dataLength+=e.length},X.flush=function(){var e=this.chunks,R=this.dataLength,m;if(e.length)e.length===1?m=e[0]:m=F(e,R);else return new Uint8Array(0);return this.reset(),m},X.reset=function(){this.chunks.length=0,this.dataLength=0},O}();function F(O,X){for(var P=new Uint8Array(X),e=0,R=0;R<O.length;R++){var m=O[R];P.set(m,e),e+=m.length}return P}},"./src/demux/dummy-demuxed-track.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"dummyTrack",function(){return V});function V(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/logger.ts"),F=function(){function O(P){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=P,this.bytesAvailable=P.byteLength,this.word=0,this.bitsAvailable=0}var X=O.prototype;return X.loadWord=function(){var e=this.data,R=this.bytesAvailable,m=e.byteLength-R,v=new Uint8Array(4),u=Math.min(4,R);if(u===0)throw new Error("no bytes available");v.set(e.subarray(m,m+u)),this.word=new DataView(v.buffer).getUint32(0),this.bitsAvailable=u*8,this.bytesAvailable-=u},X.skipBits=function(e){var R;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,R=e>>3,e-=R>>3,this.bytesAvailable-=R,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},X.readBits=function(e){var R=Math.min(this.bitsAvailable,e),m=this.word>>>32-R;return e>32&&V.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=R,this.bitsAvailable>0?this.word<<=R:this.bytesAvailable>0&&this.loadWord(),R=e-R,R>0&&this.bitsAvailable?m<<R|this.readBits(R):m},X.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if((this.word&2147483648>>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},X.skipUEG=function(){this.skipBits(1+this.skipLZ())},X.skipEG=function(){this.skipBits(1+this.skipLZ())},X.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},X.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},X.readBoolean=function(){return this.readBits(1)===1},X.readUByte=function(){return this.readBits(8)},X.readUShort=function(){return this.readBits(16)},X.readUInt=function(){return this.readBits(32)},X.skipScalingList=function(e){for(var R=8,m=8,v,u=0;u<e;u++)m!==0&&(v=this.readEG(),m=(R+v+256)%256),R=m===0?R:m},X.readSPS=function(){var e=0,R=0,m=0,v=0,u,s,a,A=this.readUByte.bind(this),o=this.readBits.bind(this),i=this.readUEG.bind(this),r=this.readBoolean.bind(this),t=this.skipBits.bind(this),E=this.skipEG.bind(this),_=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);A();var B=A();if(o(5),t(3),A(),_(),B===100||B===110||B===122||B===244||B===44||B===83||B===86||B===118||B===128){var C=i();if(C===3&&t(1),_(),_(),t(1),r())for(s=C!==3?8:12,a=0;a<s;a++)r()&&(a<6?y(16):y(64))}_();var d=i();if(d===0)i();else if(d===1)for(t(1),E(),E(),u=i(),a=0;a<u;a++)E();_(),t(1);var n=i(),l=i(),c=o(1);c===0&&t(1),t(1),r()&&(e=i(),R=i(),m=i(),v=i());var b=[1,1];if(r()&&r()){var g=A();switch(g){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:{b=[A()<<8|A(),A()<<8|A()];break}}}return{width:Math.ceil((n+1)*16-e*2-R*2),height:(2-c)*(l+1)*16-(c?2:4)*(m+v),pixelRatio:b}},X.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},O}();G.default=F},"./src/demux/id3.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"isHeader",function(){return V}),D.d(G,"isFooter",function(){return F}),D.d(G,"getID3Data",function(){return O}),D.d(G,"canParse",function(){return P}),D.d(G,"getTimeStamp",function(){return e}),D.d(G,"isTimeStampFrame",function(){return R}),D.d(G,"getID3Frames",function(){return v}),D.d(G,"decodeFrame",function(){return u}),D.d(G,"utf8ArrayToStr",function(){return i}),D.d(G,"testables",function(){return r});var V=function(y,B){return B+10<=y.length&&(y[B]===73&&y[B+1]===68&&y[B+2]===51&&(y[B+3]<255&&y[B+4]<255&&(y[B+6]<128&&y[B+7]<128&&y[B+8]<128&&y[B+9]<128)))},F=function(y,B){return B+10<=y.length&&(y[B]===51&&y[B+1]===68&&y[B+2]===73&&(y[B+3]<255&&y[B+4]<255&&(y[B+6]<128&&y[B+7]<128&&y[B+8]<128&&y[B+9]<128)))},O=function(y,B){for(var C=B,d=0;V(y,B);){d+=10;var n=X(y,B+6);d+=n,F(y,B+10)&&(d+=10),B+=d}return d>0?y.subarray(C,C+d):void 0},X=function(y,B){var C=0;return C=(y[B]&127)<<21,C|=(y[B+1]&127)<<14,C|=(y[B+2]&127)<<7,C|=y[B+3]&127,C},P=function(y,B){return V(y,B)&&X(y,B+6)+10<=y.length-B},e=function(y){for(var B=v(y),C=0;C<B.length;C++){var d=B[C];if(R(d))return o(d)}return},R=function(y){return y&&y.key==="PRIV"&&y.info==="com.apple.streaming.transportStreamTimestamp"},m=function(y){var B=String.fromCharCode(y[0],y[1],y[2],y[3]),C=X(y,4),d=10;return{type:B,size:C,data:y.subarray(d,d+C)}},v=function(y){for(var B=0,C=[];V(y,B);){var d=X(y,B+6);B+=10;for(var n=B+d;B+8<n;){var l=m(y.subarray(B)),c=u(l);c&&C.push(c),B+=l.size+10}F(y,B)&&(B+=10)}return C},u=function(y){return y.type==="PRIV"?s(y):y.type[0]==="W"?A(y):a(y)},s=function(y){if(y.size<2)return;var B=i(y.data,!0),C=new Uint8Array(y.data.subarray(B.length+1));return{key:y.type,info:B,data:C.buffer}},a=function(y){if(y.size<2)return;if(y.type==="TXXX"){var B=1,C=i(y.data.subarray(B),!0);B+=C.length+1;var d=i(y.data.subarray(B));return{key:y.type,info:C,data:d}}var n=i(y.data.subarray(1));return{key:y.type,data:n}},A=function(y){if(y.type==="WXXX"){if(y.size<2)return;var B=1,C=i(y.data.subarray(B),!0);B+=C.length+1;var d=i(y.data.subarray(B));return{key:y.type,info:C,data:d}}var n=i(y.data);return{key:y.type,data:n}},o=function(y){if(y.data.byteLength===8){var B=new Uint8Array(y.data),C=B[3]&1,d=(B[4]<<23)+(B[5]<<15)+(B[6]<<7)+B[7];return d/=45,C&&(d+=4772185884e-2),Math.round(d)}return},i=function(y,B){B===void 0&&(B=!1);var C=E();if(C){var d=C.decode(y);if(B){var n=d.indexOf("\0");return n!==-1?d.substring(0,n):d}return d.replace(/\0/g,"")}for(var l=y.length,c,b,g,h="",L=0;L<l;){if(c=y[L++],c===0&&B)return h;if(c===0||c===3)continue;switch(c>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:h+=String.fromCharCode(c);break;case 12:case 13:b=y[L++],h+=String.fromCharCode((c&31)<<6|b&63);break;case 14:b=y[L++],g=y[L++],h+=String.fromCharCode((c&15)<<12|(b&63)<<6|(g&63)<<0);break;default:}}return h},r={decodeTextFrame:a},t;function E(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/demux/base-audio-demuxer.ts"),F=D("./src/demux/id3.ts"),O=D("./src/utils/logger.ts"),X=D("./src/demux/mpegaudio.ts");function P(m,v){m.prototype=Object.create(v.prototype),m.prototype.constructor=m,e(m,v)}function e(m,v){return e=Object.setPrototypeOf||function(s,a){return s.__proto__=a,s},e(m,v)}var R=function(m){P(v,m);function v(){return m.apply(this,arguments)||this}var u=v.prototype;return u.resetInitSegment=function(a,A,o){m.prototype.resetInitSegment.call(this,a,A,o),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:a,duration:o,inputTimeScale:9e4,dropped:0}},v.probe=function(a){if(!a)return!1;for(var A=F.getID3Data(a,0)||[],o=A.length,i=a.length;o<i;o++)if(X.probe(a,o))return O.logger.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(a,A){return X.canParse(a,A)},u.appendFrame=function(a,A,o){return this.initPTS===null?void 0:X.appendFrame(a,A,o,this.initPTS,this.frameIndex)},v}(V.default);R.minProbeByteLength=4,G.default=R},"./src/demux/mp4demuxer.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/mp4-tools.ts"),F=D("./src/demux/dummy-demuxed-track.ts"),O=function(){function X(e,R){this.remainderData=null,this.config=void 0,this.config=R}var P=X.prototype;return P.resetTimeStamp=function(){},P.resetInitSegment=function(){},P.resetContiguity=function(){},X.probe=function(R){return Object(V.findBox)({data:R,start:0,end:Math.min(R.length,16384)},["moof"]).length>0},P.demux=function(R){var m=R,v=Object(F.dummyTrack)();if(this.config.progressive){this.remainderData&&(m=Object(V.appendUint8Array)(this.remainderData,R));var u=Object(V.segmentValidRange)(m);this.remainderData=u.remainder,v.samples=u.valid||new Uint8Array}else v.samples=m;return{audioTrack:Object(F.dummyTrack)(),avcTrack:v,id3Track:Object(F.dummyTrack)(),textTrack:Object(F.dummyTrack)()}},P.flush=function(){var R=Object(F.dummyTrack)();return R.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(F.dummyTrack)(),avcTrack:R,id3Track:Object(F.dummyTrack)(),textTrack:Object(F.dummyTrack)()}},P.demuxSampleAes=function(R,m,v){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},P.destroy=function(){},X}();O.minProbeByteLength=1024,G.default=O},"./src/demux/mpegaudio.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"appendFrame",function(){return e}),D.d(G,"parseHeader",function(){return R}),D.d(G,"isHeaderPattern",function(){return m}),D.d(G,"isHeader",function(){return v}),D.d(G,"canParse",function(){return u}),D.d(G,"probe",function(){return s});var V=null,F=[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],O=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],X=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],P=[0,1,1,4];function e(a,A,o,i,r){if(o+24>A.length)return;var t=R(A,o);if(t&&o+t.frameLength<=A.length){var E=t.samplesPerFrame*9e4/t.sampleRate,_=i+r*E,y={unit:A.subarray(o,o+t.frameLength),pts:_,dts:_};return a.config=[],a.channelCount=t.channelCount,a.samplerate=t.sampleRate,a.samples.push(y),{sample:y,length:t.frameLength,missing:0}}}function R(a,A){var o=a[A+1]>>3&3,i=a[A+1]>>1&3,r=a[A+2]>>4&15,t=a[A+2]>>2&3;if(o!==1&&r!==0&&r!==15&&t!==3){var E=a[A+2]>>1&1,_=a[A+3]>>6,y=o===3?3-i:i===3?3:4,B=F[y*14+r-1]*1e3,C=o===3?0:o===2?1:2,d=O[C*3+t],n=_===3?1:2,l=X[o][i],c=P[i],b=l*8*c,g=Math.floor(l*B/d+E)*c;if(V===null){var h=navigator.userAgent||"",L=h.match(/Chrome\/(\d+)/i);V=L?parseInt(L[1]):0}var N=!!V&&V<=87;return N&&i===2&&B>=224e3&&_===0&&(a[A+3]=a[A+3]|128),{sampleRate:d,channelCount:n,frameLength:g,samplesPerFrame:b}}}function m(a,A){return a[A]===255&&(a[A+1]&224)===224&&(a[A+1]&6)!==0}function v(a,A){return A+1<a.length&&m(a,A)}function u(a,A){var o=4;return m(a,A)&&o<=a.length-A}function s(a,A){if(A+1<a.length&&m(a,A)){var o=4,i=R(a,A),r=o;i!=null&&i.frameLength&&(r=i.frameLength);var t=A+r;return t===a.length||v(a,t)}return!1}},"./src/demux/sample-aes.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/crypt/decrypter.ts"),F=D("./src/demux/tsdemuxer.ts"),O=function(){function X(e,R,m){this.keyData=void 0,this.decrypter=void 0,this.keyData=m,this.decrypter=new V.default(e,R,{removePKCS7Padding:!1})}var P=X.prototype;return P.decryptBuffer=function(R,m){this.decrypter.decrypt(R,this.keyData.key.buffer,this.keyData.iv.buffer,m)},P.decryptAacSample=function(R,m,v,u){var s=R[m].unit,a=s.subarray(16,s.length-s.length%16),A=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),o=this;this.decryptBuffer(A,function(i){var r=new Uint8Array(i);s.set(r,16),u||o.decryptAacSamples(R,m+1,v)})},P.decryptAacSamples=function(R,m,v){for(;;m++){if(m>=R.length){v();return}if(R[m].unit.length<32)continue;var u=this.decrypter.isSync();if(this.decryptAacSample(R,m,v,u),!u)return}},P.getAvcEncryptedData=function(R){for(var m=Math.floor((R.length-48)/160)*16+16,v=new Int8Array(m),u=0,s=32;s<=R.length-16;s+=160,u+=16)v.set(R.subarray(s,s+16),u);return v},P.getAvcDecryptedUnit=function(R,m){for(var v=new Uint8Array(m),u=0,s=32;s<=R.length-16;s+=160,u+=16)R.set(v.subarray(u,u+16),s);return R},P.decryptAvcSample=function(R,m,v,u,s,a){var A=Object(F.discardEPB)(s.data),o=this.getAvcEncryptedData(A),i=this;this.decryptBuffer(o.buffer,function(r){s.data=i.getAvcDecryptedUnit(A,r),a||i.decryptAvcSamples(R,m,v+1,u)})},P.decryptAvcSamples=function(R,m,v,u){if(R instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;m++,v=0){if(m>=R.length){u();return}for(var s=R[m].units;!(v>=s.length);v++){var a=s[v];if(a.data.length<=48||a.type!==1&&a.type!==5)continue;var A=this.decrypter.isSync();if(this.decryptAvcSample(R,m,v,u,a,A),!A)return}}},X}();G.default=O},"./src/demux/transmuxer-interface.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s});var V=D("./node_modules/webworkify-webpack/index.js"),F=D.n(V),O=D("./src/events.ts"),X=D("./src/demux/transmuxer.ts"),P=D("./src/utils/logger.ts"),e=D("./src/errors.ts"),R=D("./src/utils/mediasource-helper.ts"),m=D("./node_modules/eventemitter3/index.js"),v=D.n(m),u=Object(R.getMediaSource)()||{isTypeSupported:function(){return!1}},s=function(){function a(o,i,r,t){var E=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=o,this.id=i,this.onTransmuxComplete=r,this.onFlush=t;var _=o.config,y=function(l,c){c=c||{},c.frag=E.frag,c.id=E.id,o.trigger(l,c)};this.observer=new m.EventEmitter,this.observer.on(O.Events.FRAG_DECRYPTED,y),this.observer.on(O.Events.ERROR,y);var B={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},C=navigator.vendor;if(_.enableWorker&&typeof Worker!="undefined"){P.logger.log("demuxing in webworker");var d;try{d=this.worker=V("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),d.addEventListener("message",this.onwmsg),d.onerror=function(n){o.trigger(O.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(n.message+" ("+n.filename+":"+n.lineno+")")})},d.postMessage({cmd:"init",typeSupported:B,vendor:C,id:i,config:JSON.stringify(_)})}catch(n){P.logger.warn("Error in worker:",n),P.logger.error("Error while initializing DemuxerWorker, fallback to inline"),d&&self.URL.revokeObjectURL(d.objectURL),this.transmuxer=new X.default(this.observer,B,_,C,i),this.worker=null}}else this.transmuxer=new X.default(this.observer,B,_,C,i)}var A=a.prototype;return A.destroy=function(){var i=this.worker;if(i)i.removeEventListener("message",this.onwmsg),i.terminate(),this.worker=null;else{var r=this.transmuxer;r&&(r.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},A.push=function(i,r,t,E,_,y,B,C,d,n){var l=this;d.transmuxing.start=self.performance.now();var c=this.transmuxer,b=this.worker,g=y?y.start:_.start,h=_.decryptdata,L=this.frag,N=!(L&&_.cc===L.cc),T=!(L&&d.level===L.level),M=L?d.sn-L.sn:-1,W=this.part?d.part-this.part.index:1,U=!T&&(M===1||M===0&&W===1),Y=self.performance.now();(T||M||_.stats.parsing.start===0)&&(_.stats.parsing.start=Y),y&&(W||!U)&&(y.stats.parsing.start=Y);var ne=new X.TransmuxState(N,U,C,T,g);if(!U||N){P.logger.log("[transmuxer-interface, "+_.type+"]: Starting new transmux session for sn: "+d.sn+" p: "+d.part+" level: "+d.level+" id: "+d.id+`
|
|
discontinuity: `+N+`
|
|
trackSwitch: `+T+`
|
|
contiguous: `+U+`
|
|
accurateTimeOffset: `+C+`
|
|
timeOffset: `+g);var me=new X.TransmuxConfig(t,E,r,B,n);this.configureTransmuxer(me)}if(this.frag=_,this.part=y,b)b.postMessage({cmd:"demux",data:i,decryptdata:h,chunkMeta:d,state:ne},i instanceof ArrayBuffer?[i]:[]);else if(c){var ge=c.push(i,h,d,ne);Object(X.isPromise)(ge)?ge.then(function(Oe){l.handleTransmuxComplete(Oe)}):this.handleTransmuxComplete(ge)}},A.flush=function(i){var r=this;i.transmuxing.start=self.performance.now();var t=this.transmuxer,E=this.worker;if(E)E.postMessage({cmd:"flush",chunkMeta:i});else if(t){var _=t.flush(i);Object(X.isPromise)(_)?_.then(function(y){r.handleFlushResult(y,i)}):this.handleFlushResult(_,i)}},A.handleFlushResult=function(i,r){var t=this;i.forEach(function(E){t.handleTransmuxComplete(E)}),this.onFlush(r)},A.onWorkerMessage=function(i){var r=i.data,t=this.hls;switch(r.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(r.data);break}case"flush":{this.onFlush(r.data);break}default:{r.data=r.data||{},r.data.frag=this.frag,r.data.id=this.id,t.trigger(r.event,r.data);break}}},A.configureTransmuxer=function(i){var r=this.worker,t=this.transmuxer;r?r.postMessage({cmd:"configure",config:i}):t&&t.configure(i)},A.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},a}()},"./src/demux/transmuxer-worker.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return e});var V=D("./src/demux/transmuxer.ts"),F=D("./src/events.ts"),O=D("./src/utils/logger.ts"),X=D("./node_modules/eventemitter3/index.js"),P=D.n(X);function e(s){var a=new X.EventEmitter,A=function(i,r){s.postMessage({event:i,data:r})};a.on(F.Events.FRAG_DECRYPTED,A),a.on(F.Events.ERROR,A),s.addEventListener("message",function(o){var i=o.data;switch(i.cmd){case"init":{var r=JSON.parse(i.config);s.transmuxer=new V.default(a,i.typeSupported,r,i.vendor,i.id),Object(O.enableLogs)(r.debug),A("init",null);break}case"configure":{s.transmuxer.configure(i.config);break}case"demux":{var t=s.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Object(V.isPromise)(t)?t.then(function(y){R(s,y)}):R(s,t);break}case"flush":{var E=i.chunkMeta,_=s.transmuxer.flush(E);Object(V.isPromise)(_)?_.then(function(y){v(s,y,E)}):v(s,_,E);break}default:break}})}function R(s,a){if(u(a.remuxResult))return;var A=[],o=a.remuxResult,i=o.audio,r=o.video;i&&m(A,i),r&&m(A,r),s.postMessage({event:"transmuxComplete",data:a},A)}function m(s,a){a.data1&&s.push(a.data1.buffer),a.data2&&s.push(a.data2.buffer)}function v(s,a,A){a.forEach(function(o){R(s,o)}),s.postMessage({event:"flush",data:A})}function u(s){return!s.audio&&!s.video&&!s.text&&!s.id3&&!s.initSegment}},"./src/demux/transmuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return r}),D.d(G,"isPromise",function(){return _}),D.d(G,"TransmuxConfig",function(){return y}),D.d(G,"TransmuxState",function(){return B});var V=D("./src/events.ts"),F=D("./src/errors.ts"),O=D("./src/crypt/decrypter.ts"),X=D("./src/demux/aacdemuxer.ts"),P=D("./src/demux/mp4demuxer.ts"),e=D("./src/demux/tsdemuxer.ts"),R=D("./src/demux/mp3demuxer.ts"),m=D("./src/remux/mp4-remuxer.ts"),v=D("./src/remux/passthrough-remuxer.ts"),u=D("./src/demux/chunk-cache.ts"),s=D("./src/utils/mp4-tools.ts"),a=D("./src/utils/logger.ts"),A;try{A=self.performance.now.bind(self.performance)}catch(C){a.logger.debug("Unable to use Performance API on this environment"),A=self.Date.now}var o=[{demux:e.default,remux:m.default},{demux:P.default,remux:v.default},{demux:X.default,remux:m.default},{demux:R.default,remux:m.default}],i=1024;o.forEach(function(C){var d=C.demux;i=Math.max(i,d.minProbeByteLength)});var r=function(){function C(n,l,c,b,g){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.cache=new u.default,this.observer=n,this.typeSupported=l,this.config=c,this.vendor=b,this.id=g}var d=C.prototype;return d.configure=function(l){this.transmuxConfig=l,this.decrypter&&this.decrypter.reset()},d.push=function(l,c,b,g){var h=this,L=b.transmuxing;L.executeStart=A();var N=new Uint8Array(l),T=this.cache,M=this.config,W=this.currentTransmuxState,U=this.transmuxConfig;g&&(this.currentTransmuxState=g);var Y=t(N,c);if(Y&&Y.method==="AES-128"){var ne=this.getDecrypter();if(M.enableSoftwareAES){var me=ne.softwareDecrypt(N,Y.key.buffer,Y.iv.buffer);if(!me)return L.executeEnd=A(),E(b);N=new Uint8Array(me)}else return this.decryptionPromise=ne.webCryptoDecrypt(N,Y.key.buffer,Y.iv.buffer).then(function(J){var k=h.push(J,null,b);return h.decryptionPromise=null,k}),this.decryptionPromise}var ge=g||W,Oe=ge.contiguous,Se=ge.discontinuity,Be=ge.trackSwitch,Ne=ge.accurateTimeOffset,ke=ge.timeOffset,Ce=U.audioCodec,ve=U.videoCodec,Xe=U.defaultInitPts,lt=U.duration,at=U.initSegmentData;if((Se||Be)&&this.resetInitSegment(at,Ce,ve,lt),Se&&this.resetInitialTimestamp(Xe),Oe||this.resetContiguity(),this.needsProbing(N,Se,Be)){if(T.dataLength){var je=T.flush();N=Object(s.appendUint8Array)(je,N)}this.configureTransmuxer(N,U)}var rt=this.transmux(N,Y,ke,Ne,b),re=this.currentTransmuxState;return re.contiguous=!0,re.discontinuity=!1,re.trackSwitch=!1,L.executeEnd=A(),rt},d.flush=function(l){var c=this,b=l.transmuxing;b.executeStart=A();var g=this.decrypter,h=this.cache,L=this.currentTransmuxState,N=this.decryptionPromise;if(N)return N.then(function(){return c.flush(l)});var T=[],M=L.timeOffset;if(g){var W=g.flush();W&&T.push(this.push(W,null,l))}var U=h.dataLength;h.reset();var Y=this.demuxer,ne=this.remuxer;if(!Y||!ne)return U>=i&&this.observer.emit(V.Events.ERROR,V.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),b.executeEnd=A(),[E(l)];var me=Y.flush(M);return _(me)?me.then(function(ge){return c.flushRemux(T,ge,l),T}):(this.flushRemux(T,me,l),T)},d.flushRemux=function(l,c,b){var g=c.audioTrack,h=c.avcTrack,L=c.id3Track,N=c.textTrack,T=this.currentTransmuxState,M=T.accurateTimeOffset,W=T.timeOffset;a.logger.log("[transmuxer.ts]: Flushed fragment "+b.sn+(b.part>-1?" p: "+b.part:"")+" of level "+b.level);var U=this.remuxer.remux(g,h,L,N,W,M,!0,this.id);l.push({remuxResult:U,chunkMeta:b}),b.transmuxing.executeEnd=A()},d.resetInitialTimestamp=function(l){var c=this.demuxer,b=this.remuxer;if(!c||!b)return;c.resetTimeStamp(l),b.resetTimeStamp(l)},d.resetContiguity=function(){var l=this.demuxer,c=this.remuxer;if(!l||!c)return;l.resetContiguity(),c.resetNextTimestamp()},d.resetInitSegment=function(l,c,b,g){var h=this.demuxer,L=this.remuxer;if(!h||!L)return;h.resetInitSegment(c,b,g),L.resetInitSegment(l,c,b)},d.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},d.transmux=function(l,c,b,g,h){var L;return c&&c.method==="SAMPLE-AES"?L=this.transmuxSampleAes(l,c,b,g,h):L=this.transmuxUnencrypted(l,b,g,h),L},d.transmuxUnencrypted=function(l,c,b,g){var h=this.demuxer.demux(l,c,!1,!this.config.progressive),L=h.audioTrack,N=h.avcTrack,T=h.id3Track,M=h.textTrack,W=this.remuxer.remux(L,N,T,M,c,b,!1,this.id);return{remuxResult:W,chunkMeta:g}},d.transmuxSampleAes=function(l,c,b,g,h){var L=this;return this.demuxer.demuxSampleAes(l,c,b).then(function(N){var T=L.remuxer.remux(N.audioTrack,N.avcTrack,N.id3Track,N.textTrack,b,g,!1,L.id);return{remuxResult:T,chunkMeta:h}})},d.configureTransmuxer=function(l,c){for(var b=this.config,g=this.observer,h=this.typeSupported,L=this.vendor,N=c.audioCodec,T=c.defaultInitPts,M=c.duration,W=c.initSegmentData,U=c.videoCodec,Y,ne=0,me=o.length;ne<me;ne++)if(o[ne].demux.probe(l)){Y=o[ne];break}Y||(a.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),Y={demux:P.default,remux:v.default});var ge=this.demuxer,Oe=this.remuxer,Se=Y.remux,Be=Y.demux;(!Oe||!(Oe instanceof Se))&&(this.remuxer=new Se(g,b,h,L)),(!ge||!(ge instanceof Be))&&(this.demuxer=new Be(g,b,h),this.probe=Be.probe),this.resetInitSegment(W,N,U,M),this.resetInitialTimestamp(T)},d.needsProbing=function(l,c,b){return!this.demuxer||!this.remuxer||c||b},d.getDecrypter=function(){var l=this.decrypter;return l||(l=this.decrypter=new O.default(this.observer,this.config)),l},C}();function t(C,d){var n=null;return C.byteLength>0&&d!=null&&d.key!=null&&d.iv!==null&&d.method!=null&&(n=d),n}var E=function(d){return{remuxResult:{},chunkMeta:d}};function _(C){return"then"in C&&C.then instanceof Function}var y=function(d,n,l,c,b){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=d,this.videoCodec=n,this.initSegmentData=l,this.duration=c,this.defaultInitPts=b},B=function(d,n,l,c,b){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=d,this.contiguous=n,this.accurateTimeOffset=l,this.trackSwitch=c,this.timeOffset=b}},"./src/demux/tsdemuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"discardEPB",function(){return E});var V=D("./src/demux/adts.ts"),F=D("./src/demux/mpegaudio.ts"),O=D("./src/demux/exp-golomb.ts"),X=D("./src/demux/id3.ts"),P=D("./src/demux/sample-aes.ts"),e=D("./src/events.ts"),R=D("./src/utils/mp4-tools.ts"),m=D("./src/utils/logger.ts"),v=D("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},s=function(){function _(B,C,d){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.aacLastPTS=null,this._initPTS=null,this._initDTS=null,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=B,this.config=C,this.typeSupported=d}_.probe=function(C){var d=_.syncOffset(C);return d<0?!1:(d&&m.logger.warn("MPEG2-TS detected but first sync word found @ offset "+d+", junk ahead ?"),!0)},_.syncOffset=function(C){for(var d=Math.min(1e3,C.length-3*188),n=0;n<d;){if(C[n]===71&&C[n+188]===71&&C[n+2*188]===71)return n;n++}return-1},_.createTrack=function(C,d){return{container:C==="video"||C==="audio"?"video/mp2t":void 0,type:C,id:u[C],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:C==="audio"?d:void 0}};var y=_.prototype;return y.resetInitSegment=function(C,d,n){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=_.createTrack("video",n),this._audioTrack=_.createTrack("audio",n),this._id3Track=_.createTrack("id3",n),this._txtTrack=_.createTrack("text",n),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=C,this.videoCodec=d,this._duration=n},y.resetTimeStamp=function(){},y.resetContiguity=function(){var C=this._audioTrack,d=this._avcTrack,n=this._id3Track;C&&(C.pesData=null),d&&(d.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},y.demux=function(C,d,n,l){n===void 0&&(n=!1),l===void 0&&(l=!1),n||(this.sampleAes=null);var c,b=this._avcTrack,g=this._audioTrack,h=this._id3Track,L=b.pid,N=b.pesData,T=g.pid,M=h.pid,W=g.pesData,U=h.pesData,Y=!1,ne=this.pmtParsed,me=this._pmtId,ge=C.length;if(this.remainderData&&(C=Object(R.appendUint8Array)(this.remainderData,C),ge=C.length,this.remainderData=null),ge<188&&!l)return this.remainderData=C,{audioTrack:g,avcTrack:b,id3Track:h,textTrack:this._txtTrack};var Oe=Math.max(0,_.syncOffset(C));ge-=(ge+Oe)%188,ge<C.byteLength&&!l&&(this.remainderData=new Uint8Array(C.buffer,ge,C.buffer.byteLength-ge));for(var Se=Oe;Se<ge;Se+=188)if(C[Se]===71){var Be=!!(C[Se+1]&64),Ne=((C[Se+1]&31)<<8)+C[Se+2],ke=(C[Se+3]&48)>>4,Ce=void 0;if(ke>1){if(Ce=Se+5+C[Se+4],Ce===Se+188)continue}else Ce=Se+4;switch(Ne){case L:Be&&(N&&(c=i(N))&&this.parseAVCPES(c,!1),N={data:[],size:0}),N&&(N.data.push(C.subarray(Ce,Se+188)),N.size+=Se+188-Ce);break;case T:Be&&(W&&(c=i(W))&&(g.isAAC?this.parseAACPES(c):this.parseMPEGPES(c)),W={data:[],size:0}),W&&(W.data.push(C.subarray(Ce,Se+188)),W.size+=Se+188-Ce);break;case M:Be&&(U&&(c=i(U))&&this.parseID3PES(c),U={data:[],size:0}),U&&(U.data.push(C.subarray(Ce,Se+188)),U.size+=Se+188-Ce);break;case 0:Be&&(Ce+=C[Ce]+1),me=this._pmtId=A(C,Ce);break;case me:{Be&&(Ce+=C[Ce]+1);var ve=o(C,Ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,n);L=ve.avc,L>0&&(b.pid=L),T=ve.audio,T>0&&(g.pid=T,g.isAAC=ve.isAAC),M=ve.id3,M>0&&(h.pid=M),Y&&!ne&&(m.logger.log("reparse from beginning"),Y=!1,Se=Oe-188),ne=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});b.pesData=N,g.pesData=W,h.pesData=U;var Xe={audioTrack:g,avcTrack:b,id3Track:h,textTrack:this._txtTrack};return l&&this.extractRemainingSamples(Xe),Xe},y.flush=function(){var C=this.remainderData;this.remainderData=null;var d;return C?d=this.demux(C,-1,!1,!0):d={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(d),this.sampleAes?this.decrypt(d,this.sampleAes):d},y.extractRemainingSamples=function(C){var d=C.audioTrack,n=C.avcTrack,l=C.id3Track,c=n.pesData,b=d.pesData,g=l.pesData,h;c&&(h=i(c))?(this.parseAVCPES(h,!0),n.pesData=null):n.pesData=c,b&&(h=i(b))?(d.isAAC?this.parseAACPES(h):this.parseMPEGPES(h),d.pesData=null):(b!=null&&b.size&&m.logger.log("last AAC PES packet truncated,might overlap between fragments"),d.pesData=b),g&&(h=i(g))?(this.parseID3PES(h),l.pesData=null):l.pesData=g},y.demuxSampleAes=function(C,d,n){var l=this.demux(C,n,!0,!this.config.progressive),c=this.sampleAes=new P.default(this.observer,this.config,d);return this.decrypt(l,c)},y.decrypt=function(C,d){return new Promise(function(n){var l=C.audioTrack,c=C.avcTrack;l.samples&&l.isAAC?d.decryptAacSamples(l.samples,0,function(){c.samples?d.decryptAvcSamples(c.samples,0,0,function(){n(C)}):n(C)}):c.samples&&d.decryptAvcSamples(c.samples,0,0,function(){n(C)})})},y.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},y.parseAVCPES=function(C,d){var n=this,l=this._avcTrack,c=this.parseAVCNALu(C.data),b=!1,g=this.avcSample,h,L=!1;C.data=null,g&&c.length&&!l.audFound&&(r(g,l),g=this.avcSample=a(!1,C.pts,C.dts,"")),c.forEach(function(N){switch(N.type){case 1:{h=!0,g||(g=n.avcSample=a(!0,C.pts,C.dts,"")),b&&(g.debug+="NDR "),g.frame=!0;var T=N.data;if(L&&T.length>4){var M=new O.default(T).readSliceType();(M===2||M===4||M===7||M===9)&&(g.key=!0)}break}case 5:h=!0,g||(g=n.avcSample=a(!0,C.pts,C.dts,"")),b&&(g.debug+="IDR "),g.key=!0,g.frame=!0;break;case 6:{h=!0,b&&g&&(g.debug+="SEI ");var W=new O.default(E(N.data));W.readUByte();for(var U=0,Y=0,ne=!1,me=0;!ne&&W.bytesAvailable>1;){U=0;do me=W.readUByte(),U+=me;while(me===255);Y=0;do me=W.readUByte(),Y+=me;while(me===255);if(U===4&&W.bytesAvailable!==0){ne=!0;var ge=W.readUByte();if(ge===181){var Oe=W.readUShort();if(Oe===49){var Se=W.readUInt();if(Se===1195456820){var Be=W.readUByte();if(Be===3){for(var Ne=W.readUByte(),ke=W.readUByte(),Ce=31&Ne,ve=[Ne,ke],Xe=0;Xe<Ce;Xe++)ve.push(W.readUByte()),ve.push(W.readUByte()),ve.push(W.readUByte());t(n._txtTrack.samples,{type:3,pts:C.pts,bytes:ve})}}}}}else if(U===5&&W.bytesAvailable!==0){if(ne=!0,Y>16){for(var lt=[],at=0;at<16;at++)lt.push(W.readUByte().toString(16)),(at===3||at===5||at===7||at===9)&<.push("-");for(var je=Y-16,rt=new Uint8Array(je),re=0;re<je;re++)rt[re]=W.readUByte();t(n._txtTrack.samples,{pts:C.pts,payloadType:U,uuid:lt.join(""),userData:Object(X.utf8ArrayToStr)(rt),userDataBytes:rt})}}else if(Y<W.bytesAvailable)for(var J=0;J<Y;J++)W.readUByte()}break}case 7:if(h=!0,L=!0,b&&g&&(g.debug+="SPS "),!l.sps){var k=new O.default(N.data),$=k.readSPS();l.width=$.width,l.height=$.height,l.pixelRatio=$.pixelRatio,l.sps=[N.data],l.duration=n._duration;for(var q=N.data.subarray(1,4),he="avc1.",de=0;de<3;de++){var Qe=q[de].toString(16);Qe.length<2&&(Qe="0"+Qe),he+=Qe}l.codec=he}break;case 8:h=!0,b&&g&&(g.debug+="PPS "),l.pps||(l.pps=[N.data]);break;case 9:h=!1,l.audFound=!0,g&&r(g,l),g=n.avcSample=a(!1,C.pts,C.dts,b?"AUD ":"");break;case 12:h=!1;break;default:h=!1,g&&(g.debug+="unknown NAL "+N.type+" ");break}if(g&&h){var ze=g.units;ze.push(N)}}),d&&g&&(r(g,l),this.avcSample=null)},y.getLastNalUnit=function(){var C,d=this.avcSample,n;if(!d||d.units.length===0){var l=this._avcTrack.samples;d=l[l.length-1]}if((C=d)!==null&&C!==void 0&&C.units){var c=d.units;n=c[c.length-1]}return n},y.parseAVCNALu=function(C){var d=C.byteLength,n=this._avcTrack,l=n.naluState||0,c=l,b=[],g=0,h,L,N,T=-1,M=0;for(l===-1&&(T=0,M=C[0]&31,l=0,g=1);g<d;){if(h=C[g++],!l){l=h?0:1;continue}if(l===1){l=h?0:2;continue}if(!h)l=3;else if(h===1){if(T>=0){var W={data:C.subarray(T,g-l-1),type:M};b.push(W)}else{var U=this.getLastNalUnit();if(U&&(c&&g<=4-c&&(U.state&&(U.data=U.data.subarray(0,U.data.byteLength-c))),L=g-l-1,L>0)){var Y=new Uint8Array(U.data.byteLength+L);Y.set(U.data,0),Y.set(C.subarray(0,L),U.data.byteLength),U.data=Y,U.state=0}}g<d?(N=C[g]&31,T=g,M=N,l=0):l=-1}else l=0}if(T>=0&&l>=0){var ne={data:C.subarray(T,d),type:M,state:l};b.push(ne)}if(b.length===0){var me=this.getLastNalUnit();if(me){var ge=new Uint8Array(me.data.byteLength+C.byteLength);ge.set(me.data,0),ge.set(C,me.data.byteLength),me.data=ge}}return n.naluState=l,b},y.parseAACPES=function(C){var d=0,n=this._audioTrack,l=this.aacOverFlow,c=C.data;if(l){this.aacOverFlow=null;var b=l.sample.unit.byteLength,g=Math.min(l.missing,b),h=b-g;l.sample.unit.set(c.subarray(0,g),h),n.samples.push(l.sample),d=l.missing}var L,N;for(L=d,N=c.length;L<N-1&&!V.isHeader(c,L);L++);if(L!==d){var T,M;if(L<N-1?(T="AAC PES did not start with ADTS header,offset:"+L,M=!1):(T="no ADTS header found in AAC PES",M=!0),m.logger.warn("parsing error:"+T),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:M,reason:T}),M)return}V.initTrackConfig(n,this.observer,c,L,this.audioCodec);var W;if(C.pts!==void 0)W=C.pts;else if(l){var U=V.getFrameDuration(n.samplerate);W=l.sample.pts+U}else{m.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var Y=0;L<N;)if(V.isHeader(c,L)){if(L+5<N){var ne=V.appendFrame(n,c,L,W,Y);if(ne)if(ne.missing)this.aacOverFlow=ne;else{L+=ne.length,Y++;continue}}break}else L++},y.parseMPEGPES=function(C){var d=C.data,n=d.length,l=0,c=0,b=C.pts;if(b===void 0){m.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;c<n;)if(F.isHeader(d,c)){var g=F.appendFrame(this._audioTrack,d,c,b,l);if(g)c+=g.length,l++;else break}else c++},y.parseID3PES=function(C){if(C.pts===void 0){m.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(C)},_}();s.minProbeByteLength=188;function a(_,y,B,C){return{key:_,frame:!1,pts:y,dts:B,units:[],debug:C,length:0}}function A(_,y){return(_[y+10]&31)<<8|_[y+11]}function o(_,y,B,C){var d={audio:-1,avc:-1,id3:-1,isAAC:!0},n=(_[y+1]&15)<<8|_[y+2],l=y+3+n-4,c=(_[y+10]&15)<<8|_[y+11];for(y+=12+c;y<l;){var b=(_[y+1]&31)<<8|_[y+2];switch(_[y]){case 207:if(!C){m.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:d.audio===-1&&(d.audio=b);break;case 21:d.id3===-1&&(d.id3=b);break;case 219:if(!C){m.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:d.avc===-1&&(d.avc=b);break;case 3:case 4:B?d.audio===-1&&(d.audio=b,d.isAAC=!1):m.logger.log("MPEG audio found, not supported in this browser");break;case 36:m.logger.warn("Unsupported HEVC stream type found");break;default:break}y+=((_[y+3]&15)<<8|_[y+4])+5}return d}function i(_){var y=0,B,C,d,n,l,c=_.data;if(!_||_.size===0)return null;for(;c[0].length<19&&c.length>1;){var b=new Uint8Array(c[0].length+c[1].length);b.set(c[0]),b.set(c[1],c[0].length),c[0]=b,c.splice(1,1)}B=c[0];var g=(B[0]<<16)+(B[1]<<8)+B[2];if(g===1){if(C=(B[4]<<8)+B[5],C&&C>_.size-6)return null;var h=B[7];h&192&&(n=(B[9]&14)*536870912+(B[10]&255)*4194304+(B[11]&254)*16384+(B[12]&255)*128+(B[13]&254)/2,h&64?(l=(B[14]&14)*536870912+(B[15]&255)*4194304+(B[16]&254)*16384+(B[17]&255)*128+(B[18]&254)/2,n-l>60*9e4&&(m.logger.warn(Math.round((n-l)/9e4)+"s delta between PTS and DTS, align them"),n=l)):l=n),d=B[8];var L=d+9;if(_.size<=L)return null;_.size-=L;for(var N=new Uint8Array(_.size),T=0,M=c.length;T<M;T++){B=c[T];var W=B.byteLength;if(L)if(L>W){L-=W;continue}else B=B.subarray(L),W-=L,L=0;N.set(B,y),y+=W}return C&&(C-=d+3),{data:N,pts:n,dts:l,len:C}}return null}function r(_,y){if(_.units.length&&_.frame){if(_.pts===void 0){var B=y.samples,C=B.length;if(C){var d=B[C-1];_.pts=d.pts,_.dts=d.dts}else{y.dropped++;return}}y.samples.push(_)}_.debug.length&&m.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function t(_,y){var B=_.length;if(B>0){if(y.pts>=_[B-1].pts)_.push(y);else for(var C=B-1;C>=0;C--)if(y.pts<_[C].pts){_.splice(C,0,y);break}}else _.push(y)}function E(_){for(var y=_.byteLength,B=[],C=1;C<y-2;)_[C]===0&&_[C+1]===0&&_[C+2]===3?(B.push(C+2),C+=2):C++;if(B.length===0)return _;var d=y-B.length,n=new Uint8Array(d),l=0;for(C=0;C<d;l++,C++)l===B[0]&&(l++,B.shift()),n[C]=_[l];return n}G.default=s},"./src/errors.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"ErrorTypes",function(){return V}),D.d(G,"ErrorDetails",function(){return F});var V;(function(O){O.NETWORK_ERROR="networkError",O.MEDIA_ERROR="mediaError",O.KEY_SYSTEM_ERROR="keySystemError",O.MUX_ERROR="muxError",O.OTHER_ERROR="otherError"})(V||(V={}));var F;(function(O){O.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",O.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",O.KEY_SYSTEM_NO_SESSION="keySystemNoSession",O.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",O.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",O.MANIFEST_LOAD_ERROR="manifestLoadError",O.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",O.MANIFEST_PARSING_ERROR="manifestParsingError",O.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",O.LEVEL_EMPTY_ERROR="levelEmptyError",O.LEVEL_LOAD_ERROR="levelLoadError",O.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",O.LEVEL_SWITCH_ERROR="levelSwitchError",O.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",O.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",O.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",O.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",O.FRAG_LOAD_ERROR="fragLoadError",O.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",O.FRAG_DECRYPT_ERROR="fragDecryptError",O.FRAG_PARSING_ERROR="fragParsingError",O.REMUX_ALLOC_ERROR="remuxAllocError",O.KEY_LOAD_ERROR="keyLoadError",O.KEY_LOAD_TIMEOUT="keyLoadTimeOut",O.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",O.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",O.BUFFER_APPEND_ERROR="bufferAppendError",O.BUFFER_APPENDING_ERROR="bufferAppendingError",O.BUFFER_STALLED_ERROR="bufferStalledError",O.BUFFER_FULL_ERROR="bufferFullError",O.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",O.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",O.INTERNAL_EXCEPTION="internalException",O.INTERNAL_ABORTED="aborted",O.UNKNOWN="unknown"})(F||(F={}))},"./src/events.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"Events",function(){return V});var V;(function(F){F.MEDIA_ATTACHING="hlsMediaAttaching",F.MEDIA_ATTACHED="hlsMediaAttached",F.MEDIA_DETACHING="hlsMediaDetaching",F.MEDIA_DETACHED="hlsMediaDetached",F.BUFFER_RESET="hlsBufferReset",F.BUFFER_CODECS="hlsBufferCodecs",F.BUFFER_CREATED="hlsBufferCreated",F.BUFFER_APPENDING="hlsBufferAppending",F.BUFFER_APPENDED="hlsBufferAppended",F.BUFFER_EOS="hlsBufferEos",F.BUFFER_FLUSHING="hlsBufferFlushing",F.BUFFER_FLUSHED="hlsBufferFlushed",F.MANIFEST_LOADING="hlsManifestLoading",F.MANIFEST_LOADED="hlsManifestLoaded",F.MANIFEST_PARSED="hlsManifestParsed",F.LEVEL_SWITCHING="hlsLevelSwitching",F.LEVEL_SWITCHED="hlsLevelSwitched",F.LEVEL_LOADING="hlsLevelLoading",F.LEVEL_LOADED="hlsLevelLoaded",F.LEVEL_UPDATED="hlsLevelUpdated",F.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",F.LEVELS_UPDATED="hlsLevelsUpdated",F.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",F.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",F.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",F.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",F.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",F.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",F.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",F.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",F.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",F.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",F.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",F.CUES_PARSED="hlsCuesParsed",F.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",F.INIT_PTS_FOUND="hlsInitPtsFound",F.FRAG_LOADING="hlsFragLoading",F.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",F.FRAG_LOADED="hlsFragLoaded",F.FRAG_DECRYPTED="hlsFragDecrypted",F.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",F.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",F.FRAG_PARSING_METADATA="hlsFragParsingMetadata",F.FRAG_PARSED="hlsFragParsed",F.FRAG_BUFFERED="hlsFragBuffered",F.FRAG_CHANGED="hlsFragChanged",F.FPS_DROP="hlsFpsDrop",F.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",F.ERROR="hlsError",F.DESTROYING="hlsDestroying",F.KEY_LOADING="hlsKeyLoading",F.KEY_LOADED="hlsKeyLoaded",F.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",F.BACK_BUFFER_REACHED="hlsBackBufferReached"})(V||(V={}))},"./src/hls.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return _});var V=D("./node_modules/url-toolkit/src/url-toolkit.js"),F=D.n(V),O=D("./src/loader/playlist-loader.ts"),X=D("./src/loader/key-loader.ts"),P=D("./src/controller/id3-track-controller.ts"),e=D("./src/controller/latency-controller.ts"),R=D("./src/controller/level-controller.ts"),m=D("./src/controller/fragment-tracker.ts"),v=D("./src/controller/stream-controller.ts"),u=D("./src/is-supported.ts"),s=D("./src/utils/logger.ts"),a=D("./src/config.ts"),A=D("./node_modules/eventemitter3/index.js"),o=D.n(A),i=D("./src/events.ts"),r=D("./src/errors.ts");function t(y,B){for(var C=0;C<B.length;C++){var d=B[C];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(y,d.key,d)}}function E(y,B,C){return B&&t(y.prototype,B),C&&t(y,C),y}var _=function(){y.isSupported=function(){return Object(u.isSupported)()};function y(C){C===void 0&&(C={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new A.EventEmitter,this._autoLevelCapping=void 0,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 d=this.config=Object(a.mergeConfig)(y.DefaultConfig,C);this.userConfig=C,Object(s.enableLogs)(d.debug),this._autoLevelCapping=-1,d.progressive&&Object(a.enableStreamingMode)(d);var n=d.abrController,l=d.bufferController,c=d.capLevelController,b=d.fpsController,g=this.abrController=new n(this),h=this.bufferController=new l(this),L=this.capLevelController=new c(this),N=new b(this),T=new O.default(this),M=new X.default(this),W=new P.default(this),U=this.levelController=new R.default(this),Y=new m.FragmentTracker(this),ne=this.streamController=new v.default(this,Y);L.setStreamController(ne),N.setStreamController(ne);var me=[U,ne];this.networkControllers=me;var ge=[T,M,g,h,L,N,W,Y];this.audioTrackController=this.createController(d.audioTrackController,null,me),this.createController(d.audioStreamController,Y,me),this.subtitleTrackController=this.createController(d.subtitleTrackController,null,me),this.createController(d.subtitleStreamController,Y,me),this.createController(d.timelineController,null,ge),this.emeController=this.createController(d.emeController,null,ge),this.cmcdController=this.createController(d.cmcdController,null,ge),this.latencyController=this.createController(e.default,null,ge),this.coreComponents=ge}var B=y.prototype;return B.createController=function(d,n,l){if(d){var c=n?new d(this,n):new d(this);return l&&l.push(c),c}return null},B.on=function(d,n,l){l===void 0&&(l=this),this._emitter.on(d,n,l)},B.once=function(d,n,l){l===void 0&&(l=this),this._emitter.once(d,n,l)},B.removeAllListeners=function(d){this._emitter.removeAllListeners(d)},B.off=function(d,n,l,c){l===void 0&&(l=this),this._emitter.off(d,n,l,c)},B.listeners=function(d){return this._emitter.listeners(d)},B.emit=function(d,n,l){return this._emitter.emit(d,n,l)},B.trigger=function(d,n){if(this.config.debug)return this.emit(d,d,n);try{return this.emit(d,d,n)}catch(l){s.logger.error("An internal error happened while handling event "+d+'. Error message: "'+l.message+'". Here is a stacktrace:',l),this.trigger(i.Events.ERROR,{type:r.ErrorTypes.OTHER_ERROR,details:r.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:d,error:l})}return!1},B.listenerCount=function(d){return this._emitter.listenerCount(d)},B.destroy=function(){s.logger.log("destroy"),this.trigger(i.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(d){return d.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(d){return d.destroy()}),this.coreComponents.length=0},B.attachMedia=function(d){s.logger.log("attachMedia"),this._media=d,this.trigger(i.Events.MEDIA_ATTACHING,{media:d})},B.detachMedia=function(){s.logger.log("detachMedia"),this.trigger(i.Events.MEDIA_DETACHING,void 0),this._media=null},B.loadSource=function(d){this.stopLoad();var n=this.media,l=this.url,c=this.url=V.buildAbsoluteURL(self.location.href,d,{alwaysNormalize:!0});s.logger.log("loadSource:"+c),n&&l&&l!==c&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(n)),this.trigger(i.Events.MANIFEST_LOADING,{url:d})},B.startLoad=function(d){d===void 0&&(d=-1),s.logger.log("startLoad("+d+")"),this.networkControllers.forEach(function(n){n.startLoad(d)})},B.stopLoad=function(){s.logger.log("stopLoad"),this.networkControllers.forEach(function(d){d.stopLoad()})},B.swapAudioCodec=function(){s.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},B.recoverMediaError=function(){s.logger.log("recoverMediaError");var d=this._media;this.detachMedia(),d&&this.attachMedia(d)},B.removeLevel=function(d,n){n===void 0&&(n=0),this.levelController.removeLevel(d,n)},E(y,[{key:"levels",get:function(){var d=this.levelController.levels;return d||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(d){s.logger.log("set currentLevel:"+d),this.loadLevel=d,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(d){s.logger.log("set nextLevel:"+d),this.levelController.manualLevel=d,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(d){s.logger.log("set loadLevel:"+d),this.levelController.manualLevel=d}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(d){this.levelController.nextLoadLevel=d}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(d){s.logger.log("set firstLevel:"+d),this.levelController.firstLevel=d}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(d){s.logger.log("set startLevel:"+d),d!==-1&&(d=Math.max(d,this.minAutoLevel)),this.levelController.startLevel=d}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(d){var n=!!d;n!==this.config.capLevelToPlayerSize&&(n?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=n)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(d){this._autoLevelCapping!==d&&(s.logger.log("set autoLevelCapping:"+d),this._autoLevelCapping=d)}},{key:"bandwidthEstimate",get:function(){var d=this.abrController.bwEstimator;return d?d.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var d=this.levels,n=this.config.minAutoBitrate;if(!d)return 0;for(var l=d.length,c=0;c<l;c++)if(d[c].maxBitrate>n)return c;return 0}},{key:"maxAutoLevel",get:function(){var d=this.levels,n=this.autoLevelCapping,l;return n===-1&&d&&d.length?l=d.length-1:l=n,l}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(d){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,d)}},{key:"audioTracks",get:function(){var d=this.audioTrackController;return d?d.audioTracks:[]}},{key:"audioTrack",get:function(){var d=this.audioTrackController;return d?d.audioTrack:-1},set:function(d){var n=this.audioTrackController;n&&(n.audioTrack=d)}},{key:"subtitleTracks",get:function(){var d=this.subtitleTrackController;return d?d.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var d=this.subtitleTrackController;return d?d.subtitleTrack:-1},set:function(d){var n=this.subtitleTrackController;n&&(n.subtitleTrack=d)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var d=this.subtitleTrackController;return d?d.subtitleDisplay:!1},set:function(d){var n=this.subtitleTrackController;n&&(n.subtitleDisplay=d)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(d){this.config.lowLatencyMode=d}},{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.1.2"}},{key:"Events",get:function(){return i.Events}},{key:"ErrorTypes",get:function(){return r.ErrorTypes}},{key:"ErrorDetails",get:function(){return r.ErrorDetails}},{key:"DefaultConfig",get:function(){return y.defaultConfig?y.defaultConfig:a.hlsDefaultConfig},set:function(d){y.defaultConfig=d}}]),y}();_.defaultConfig=void 0},"./src/is-supported.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"isSupported",function(){return O}),D.d(G,"changeTypeSupported",function(){return X});var V=D("./src/utils/mediasource-helper.ts");function F(){return self.SourceBuffer||self.WebKitSourceBuffer}function O(){var P=Object(V.getMediaSource)();if(!P)return!1;var e=F(),R=P&&typeof P.isTypeSupported=="function"&&P.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),m=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!R&&!!m}function X(){var P,e=F();return typeof(e==null||((P=e.prototype)===null||P===void 0)?void 0:P.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s}),D.d(G,"LoadError",function(){return A});var V=D("./src/polyfills/number.ts"),F=D("./src/errors.ts");function O(o,i){o.prototype=Object.create(i.prototype),o.prototype.constructor=o,m(o,i)}function X(o){var i=typeof Map=="function"?new Map:void 0;return X=function(t){if(t===null||!R(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i!="undefined"){if(i.has(t))return i.get(t);i.set(t,E)}function E(){return P(t,arguments,v(this).constructor)}return E.prototype=Object.create(t.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),m(E,t)},X(o)}function P(o,i,r){return e()?P=Reflect.construct:P=function(E,_,y){var B=[null];B.push.apply(B,_);var C=Function.bind.apply(E,B),d=new C;return y&&m(d,y.prototype),d},P.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(o){return!1}}function R(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function m(o,i){return m=Object.setPrototypeOf||function(t,E){return t.__proto__=E,t},m(o,i)}function v(o){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},v(o)}var u=Math.pow(2,17),s=function(){function o(r){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=r}var i=o.prototype;return i.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},i.abort=function(){this.loader&&this.loader.abort()},i.load=function(t,E){var _=this,y=t.url;if(!y)return Promise.reject(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(y?"part list":"url")));this.abort();var B=this.config,C=B.fLoader,d=B.loader;return new Promise(function(n,l){_.loader&&_.loader.destroy();var c=_.loader=t.loader=C?new C(B):new d(B),b=a(t),g={timeout:B.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:B.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=c.stats,c.load(b,g,{onSuccess:function(L,N,T,M){_.resetLoader(t,c),n({frag:t,part:null,payload:L.data,networkDetails:M})},onError:function(L,N,T){_.resetLoader(t,c),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:L,networkDetails:T}))},onAbort:function(L,N,T){_.resetLoader(t,c),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:T}))},onTimeout:function(L,N,T){_.resetLoader(t,c),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:T}))},onProgress:function(L,N,T,M){E&&E({frag:t,part:null,payload:T,networkDetails:M})}})})},i.loadPart=function(t,E,_){var y=this;this.abort();var B=this.config,C=B.fLoader,d=B.loader;return new Promise(function(n,l){y.loader&&y.loader.destroy();var c=y.loader=t.loader=C?new C(B):new d(B),b=a(t,E),g={timeout:B.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:B.fragLoadingMaxRetryTimeout,highWaterMark:u};E.stats=c.stats,c.load(b,g,{onSuccess:function(L,N,T,M){y.resetLoader(t,c),y.updateStatsFromPart(t,E);var W={frag:t,part:E,payload:L.data,networkDetails:M};_(W),n(W)},onError:function(L,N,T){y.resetLoader(t,c),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:E,response:L,networkDetails:T}))},onAbort:function(L,N,T){t.stats.aborted=E.stats.aborted,y.resetLoader(t,c),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:E,networkDetails:T}))},onTimeout:function(L,N,T){y.resetLoader(t,c),l(new A({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:E,networkDetails:T}))}})})},i.updateStatsFromPart=function(t,E){var _=t.stats,y=E.stats,B=y.total;if(_.loaded+=y.loaded,B){var C=Math.round(t.duration/E.duration),d=Math.min(Math.round(_.loaded/B),C),n=C-d,l=n*Math.round(_.loaded/d);_.total=_.loaded+l}else _.total=Math.max(_.loaded,_.total);var c=_.loading,b=y.loading;c.start?c.first+=b.first-b.start:(c.start=b.start,c.first=b.first),c.end=b.end},i.resetLoader=function(t,E){t.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},o}();function a(o,i){i===void 0&&(i=null);var r=i||o,t={frag:o,part:i,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},E=r.byteRangeStartOffset,_=r.byteRangeEndOffset;return Object(V.isFiniteNumber)(E)&&Object(V.isFiniteNumber)(_)&&(t.rangeStart=E,t.rangeEnd=_),t}var A=function(o){O(i,o);function i(r){for(var t,E=arguments.length,_=new Array(E>1?E-1:0),y=1;y<E;y++)_[y-1]=arguments[y];return t=o.call.apply(o,[this].concat(_))||this,t.data=void 0,t.data=r,t}return i}(X(Error))},"./src/loader/fragment.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"ElementaryStreamTypes",function(){return s}),D.d(G,"BaseSegment",function(){return a}),D.d(G,"Fragment",function(){return A}),D.d(G,"Part",function(){return o});var V=D("./src/polyfills/number.ts"),F=D("./node_modules/url-toolkit/src/url-toolkit.js"),O=D.n(F),X=D("./src/utils/logger.ts"),P=D("./src/loader/level-key.ts"),e=D("./src/loader/load-stats.ts");function R(i,r){i.prototype=Object.create(r.prototype),i.prototype.constructor=i,m(i,r)}function m(i,r){return m=Object.setPrototypeOf||function(E,_){return E.__proto__=_,E},m(i,r)}function v(i,r){for(var t=0;t<r.length;t++){var E=r[t];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(i,E.key,E)}}function u(i,r,t){return r&&v(i.prototype,r),t&&v(i,t),i}var s;(function(i){i.AUDIO="audio",i.VIDEO="video",i.AUDIOVIDEO="audiovideo"})(s||(s={}));var a=function(){function i(t){var E;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(E={},E[s.AUDIO]=null,E[s.VIDEO]=null,E[s.AUDIOVIDEO]=null,E),this.baseurl=t}var r=i.prototype;return r.setByteRange=function(E,_){var y=E.split("@",2),B=[];y.length===1?B[0]=_?_.byteRangeEndOffset:0:B[0]=parseInt(y[1]),B[1]=parseInt(y[0])+B[0],this._byteRange=B},u(i,[{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=Object(F.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(E){this._url=E}}]),i}(),A=function(i){R(r,i);function r(E,_){var y;return y=i.call(this,_)||this,y._decryptdata=null,y.rawProgramDateTime=null,y.programDateTime=null,y.tagList=[],y.duration=0,y.sn=0,y.levelkey=void 0,y.type=void 0,y.loader=null,y.level=-1,y.cc=0,y.startPTS=void 0,y.endPTS=void 0,y.appendedPTS=void 0,y.startDTS=void 0,y.endDTS=void 0,y.start=0,y.deltaPTS=void 0,y.maxStartPTS=void 0,y.minEndPTS=void 0,y.stats=new e.LoadStats,y.urlId=0,y.data=void 0,y.bitrateTest=!1,y.title=null,y.initSegment=null,y.type=E,y}var t=r.prototype;return t.createInitializationVector=function(_){for(var y=new Uint8Array(16),B=12;B<16;B++)y[B]=_>>8*(15-B)&255;return y},t.setDecryptDataFromLevelKey=function(_,y){var B=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(B=P.LevelKey.fromURI(_.uri),B.method=_.method,B.iv=this.createInitializationVector(y),B.keyFormat="identity"),B},t.setElementaryStreamInfo=function(_,y,B,C,d,n){n===void 0&&(n=!1);var l=this.elementaryStreams,c=l[_];if(!c){l[_]={startPTS:y,endPTS:B,startDTS:C,endDTS:d,partial:n};return}c.startPTS=Math.min(c.startPTS,y),c.endPTS=Math.max(c.endPTS,B),c.startDTS=Math.min(c.startDTS,C),c.endDTS=Math.max(c.endDTS,d)},t.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[s.AUDIO]=null,_[s.VIDEO]=null,_[s.AUDIOVIDEO]=null},u(r,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&X.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(V.isFiniteNumber)(this.programDateTime))return null;var _=Object(V.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),r}(a),o=function(i){R(r,i);function r(t,E,_,y,B){var C;C=i.call(this,_)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new e.LoadStats,C.duration=t.decimalFloatingPoint("DURATION"),C.gap=t.bool("GAP"),C.independent=t.bool("INDEPENDENT"),C.relurl=t.enumeratedString("URI"),C.fragment=E,C.index=y;var d=t.enumeratedString("BYTERANGE");return d&&C.setByteRange(d,B),B&&(C.fragOffset=B.fragOffset+B.duration),C}return u(r,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),r}(a)},"./src/loader/key-loader.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return X});var V=D("./src/events.ts"),F=D("./src/errors.ts"),O=D("./src/utils/logger.ts"),X=function(){function P(R){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=R,this._registerListeners()}var e=P.prototype;return e._registerListeners=function(){this.hls.on(V.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(V.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var m in this.loaders){var v=this.loaders[m];v&&v.destroy()}this.loaders={}},e.onKeyLoading=function(m,v){var u=v.frag,s=u.type,a=this.loaders[s];if(!u.decryptdata){O.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var A=u.decryptdata.uri;if(A!==this.decrypturl||this.decryptkey===null){var o=this.hls.config;if(a&&(O.logger.warn("abort previous key loader for type:"+s),a.abort()),!A){O.logger.warn("key uri is falsy");return}var i=o.loader,r=u.loader=this.loaders[s]=new i(o);this.decrypturl=A,this.decryptkey=null;var t={url:A,frag:u,responseType:"arraybuffer"},E={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};r.load(t,E,_)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(V.Events.KEY_LOADED,{frag:u}))},e.loadsuccess=function(m,v,u){var s=u.frag;if(!s.decryptdata){O.logger.error("after key load, decryptdata unset");return}this.decryptkey=s.decryptdata.key=new Uint8Array(m.data),s.loader=null,delete this.loaders[s.type],this.hls.trigger(V.Events.KEY_LOADED,{frag:s})},e.loaderror=function(m,v){var u=v.frag,s=u.loader;s&&s.abort(),delete this.loaders[u.type],this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:m})},e.loadtimeout=function(m,v){var u=v.frag,s=u.loader;s&&s.abort(),delete this.loaders[u.type],this.hls.trigger(V.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},P}()},"./src/loader/level-details.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"LevelDetails",function(){return P});var V=D("./src/polyfills/number.ts");function F(e,R){for(var m=0;m<R.length;m++){var v=R[m];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(e,v.key,v)}}function O(e,R,m){return R&&F(e.prototype,R),m&&F(e,m),e}var X=10,P=function(){function e(m){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.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,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.fragments=[],this.url=m}var R=e.prototype;return R.reloaded=function(v){if(!v){this.advanced=!0,this.updated=!0;return}var u=this.lastPartSn-v.lastPartSn,s=this.lastPartIndex-v.lastPartIndex;this.updated=this.endSN!==v.endSN||!!s||!!u,this.advanced=this.endSN>v.endSN||u>0||u===0&&s>0,this.updated||this.advanced?this.misses=Math.floor(v.misses*.6):this.misses=v.misses+1,this.availabilityDelay=v.availabilityDelay},O(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(V.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||X}},{key:"drift",get:function(){var v=this.driftEndTime-this.driftStartTime;if(v>0){var u=this.driftEnd-this.driftStart;return u*1e3/v}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var v;return(v=this.partList)!==null&&v!==void 0&&v.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var v;return(v=this.fragments)!==null&&v!==void 0&&v.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 v;return(v=this.partList)!==null&&v!==void 0&&v.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var v;return(v=this.partList)!==null&&v!==void 0&&v.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"LevelKey",function(){return P});var V=D("./node_modules/url-toolkit/src/url-toolkit.js"),F=D.n(V);function O(e,R){for(var m=0;m<R.length;m++){var v=R[m];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(e,v.key,v)}}function X(e,R,m){return R&&O(e.prototype,R),m&&O(e,m),e}var P=function(){e.fromURL=function(m,v){return new e(m,v)},e.fromURI=function(m){return new e(m)};function e(R,m){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,m?this._uri=Object(V.buildAbsoluteURL)(R,m,{alwaysNormalize:!0}):this._uri=R}return X(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"LoadStats",function(){return V});var V=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":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return r});var V=D("./src/polyfills/number.ts"),F=D("./node_modules/url-toolkit/src/url-toolkit.js"),O=D.n(F),X=D("./src/loader/fragment.ts"),P=D("./src/loader/level-details.ts"),e=D("./src/loader/level-key.ts"),R=D("./src/utils/attr-list.ts"),m=D("./src/utils/logger.ts"),v=D("./src/utils/codecs.ts"),u=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,s=/#EXT-X-MEDIA:(.*)/g,a=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),A=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),o=/\.(mp4|m4s|m4v|m4a)$/i;function i(B){var C,d;return o.test((C=(d=F.parseURL(B))===null||d===void 0?void 0:d.path)!=null?C:"")}var r=function(){function B(){}return B.findGroup=function(d,n){for(var l=0;l<d.length;l++){var c=d[l];if(c.id===n)return c}},B.convertAVC1ToAVCOTI=function(d){var n=d.split(".");if(n.length>2){var l=n.shift()+".";return l+=parseInt(n.shift()).toString(16),l+=("000"+parseInt(n.shift()).toString(16)).substr(-4),l}return d},B.resolve=function(d,n){return F.buildAbsoluteURL(n,d,{alwaysNormalize:!0})},B.parseMasterPlaylist=function(d,n){var l=[],c={},b=!1;u.lastIndex=0;for(var g;(g=u.exec(d))!=null;)if(g[1]){var h=new R.AttrList(g[1]),L={attrs:h,bitrate:h.decimalInteger("AVERAGE-BANDWIDTH")||h.decimalInteger("BANDWIDTH"),name:h.NAME,url:B.resolve(g[2],n)},N=h.decimalResolution("RESOLUTION");N&&(L.width=N.width,L.height=N.height),t((h.CODECS||"").split(/[ ,]+/).filter(function(M){return M}),L),L.videoCodec&&L.videoCodec.indexOf("avc1")!==-1&&(L.videoCodec=B.convertAVC1ToAVCOTI(L.videoCodec)),l.push(L)}else if(g[3]){var T=new R.AttrList(g[3]);T["DATA-ID"]&&(b=!0,c[T["DATA-ID"]]=T)}return{levels:l,sessionData:b?c:null}},B.parseMasterPlaylistMedia=function(d,n,l,c){c===void 0&&(c=[]);var b,g=[],h=0;for(s.lastIndex=0;(b=s.exec(d))!==null;){var L=new R.AttrList(b[1]);if(L.TYPE===l){var N={attrs:L,bitrate:0,id:h++,groupId:L["GROUP-ID"],instreamId:L["INSTREAM-ID"],name:L.NAME||L.LANGUAGE||"",type:l,default:L.bool("DEFAULT"),autoselect:L.bool("AUTOSELECT"),forced:L.bool("FORCED"),lang:L.LANGUAGE,url:L.URI?B.resolve(L.URI,n):""};if(c.length){var T=B.findGroup(c,N.groupId)||c[0];E(N,T,"audioCodec"),E(N,T,"textCodec")}g.push(N)}}return g},B.parseLevelPlaylist=function(d,n,l,c,b){var g=new P.LevelDetails(n),h=g.fragments,L=null,N=0,T=0,M=0,W=0,U=null,Y=new X.Fragment(c,n),ne,me,ge,Oe=-1,Se=!1;for(a.lastIndex=0,g.m3u8=d;(ne=a.exec(d))!==null;){Se&&(Se=!1,Y=new X.Fragment(c,n),Y.start=M,Y.sn=N,Y.cc=W,Y.level=l,L&&(Y.initSegment=L,Y.rawProgramDateTime=L.rawProgramDateTime));var Be=ne[1];if(Be){Y.duration=parseFloat(Be);var Ne=(" "+ne[2]).slice(1);Y.title=Ne||null,Y.tagList.push(Ne?["INF",Be,Ne]:["INF",Be])}else if(ne[3])Object(V.isFiniteNumber)(Y.duration)&&(Y.start=M,ge&&(Y.levelkey=ge),Y.sn=N,Y.level=l,Y.cc=W,Y.urlId=b,h.push(Y),Y.relurl=(" "+ne[3]).slice(1),y(Y,U),U=Y,M+=Y.duration,N++,T=0,Se=!0);else if(ne[4]){var ke=(" "+ne[4]).slice(1);U?Y.setByteRange(ke,U):Y.setByteRange(ke)}else if(ne[5])Y.rawProgramDateTime=(" "+ne[5]).slice(1),Y.tagList.push(["PROGRAM-DATE-TIME",Y.rawProgramDateTime]),Oe===-1&&(Oe=h.length);else{if(ne=ne[0].match(A),!ne){m.logger.warn("No matches on slow regex match for level playlist!");continue}for(me=1;me<ne.length&&!(typeof ne[me]!="undefined");me++);var Ce=(" "+ne[me]).slice(1),ve=(" "+ne[me+1]).slice(1),Xe=ne[me+2]?(" "+ne[me+2]).slice(1):"";switch(Ce){case"PLAYLIST-TYPE":g.type=ve.toUpperCase();break;case"MEDIA-SEQUENCE":N=g.startSN=parseInt(ve);break;case"SKIP":{var lt=new R.AttrList(ve),at=lt.decimalInteger("SKIPPED-SEGMENTS");if(Object(V.isFiniteNumber)(at)){g.skippedSegments=at;for(var je=at;je--;)h.unshift(null);N+=at}var rt=lt.enumeratedString("RECENTLY-REMOVED-DATERANGES");rt&&(g.recentlyRemovedDateranges=rt.split(" "));break}case"TARGETDURATION":g.targetduration=parseFloat(ve);break;case"VERSION":g.version=parseInt(ve);break;case"EXTM3U":break;case"ENDLIST":g.live=!1;break;case"#":(ve||Xe)&&Y.tagList.push(Xe?[ve,Xe]:[ve]);break;case"DIS":W++;case"GAP":Y.tagList.push([Ce]);break;case"BITRATE":Y.tagList.push([Ce,ve]);break;case"DISCONTINUITY-SEQ":W=parseInt(ve);break;case"KEY":{var re,J=new R.AttrList(ve),k=J.enumeratedString("METHOD"),$=J.URI,q=J.hexadecimalInteger("IV"),he=J.enumeratedString("KEYFORMATVERSIONS"),de=J.enumeratedString("KEYID"),Qe=(re=J.enumeratedString("KEYFORMAT"))!=null?re:"identity",ze=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ze.indexOf(Qe)>-1){m.logger.warn("Keyformat "+Qe+" is not supported from the manifest");continue}else if(Qe!=="identity")continue;k&&(ge=e.LevelKey.fromURL(n,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(k)>=0&&(ge.method=k,ge.keyFormat=Qe,de&&(ge.keyID=de),he&&(ge.keyFormatVersions=he),ge.iv=q));break}case"START":{var Ge=new R.AttrList(ve),$e=Ge.decimalFloatingPoint("TIME-OFFSET");Object(V.isFiniteNumber)($e)&&(g.startTimeOffset=$e);break}case"MAP":{var nt=new R.AttrList(ve);Y.relurl=nt.URI,nt.BYTERANGE&&Y.setByteRange(nt.BYTERANGE),Y.level=l,Y.sn="initSegment",ge&&(Y.levelkey=ge),Y.initSegment=null,L=Y,Se=!0;break}case"SERVER-CONTROL":{var dt=new R.AttrList(ve);g.canBlockReload=dt.bool("CAN-BLOCK-RELOAD"),g.canSkipUntil=dt.optionalFloat("CAN-SKIP-UNTIL",0),g.canSkipDateRanges=g.canSkipUntil>0&&dt.bool("CAN-SKIP-DATERANGES"),g.partHoldBack=dt.optionalFloat("PART-HOLD-BACK",0),g.holdBack=dt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var xe=new R.AttrList(ve);g.partTarget=xe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ue=g.partList;Ue||(Ue=g.partList=[]);var Ke=T>0?Ue[Ue.length-1]:void 0,We=T++,Le=new X.Part(new R.AttrList(ve),Y,n,We,Ke);Ue.push(Le),Y.duration+=Le.duration;break}case"PRELOAD-HINT":{var Fe=new R.AttrList(ve);g.preloadHint=Fe;break}case"RENDITION-REPORT":{var we=new R.AttrList(ve);g.renditionReports=g.renditionReports||[],g.renditionReports.push(we);break}default:m.logger.warn("line parsed but not handled: "+ne);break}}}U&&!U.relurl?(h.pop(),M-=U.duration,g.partList&&(g.fragmentHint=U)):g.partList&&(y(Y,U),Y.cc=W,g.fragmentHint=Y);var ue=h.length,ce=h[0],te=h[ue-1];if(M+=g.skippedSegments*g.targetduration,M>0&&ue&&te){g.averagetargetduration=M/ue;var ie=te.sn;g.endSN=ie!=="initSegment"?ie:0,ce&&(g.startCC=ce.cc,ce.initSegment||g.fragments.every(function(le){return le.relurl&&i(le.relurl)})&&(m.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Y=new X.Fragment(c,n),Y.relurl=te.relurl,Y.level=l,Y.sn="initSegment",ce.initSegment=Y,g.needSidxRanges=!0))}else g.endSN=0,g.startCC=0;return g.fragmentHint&&(M+=g.fragmentHint.duration),g.totalduration=M,g.endCC=W,Oe>0&&_(h,Oe),g},B}();function t(B,C){["video","audio","text"].forEach(function(d){var n=B.filter(function(c){return Object(v.isCodecType)(c,d)});if(n.length){var l=n.filter(function(c){return c.lastIndexOf("avc1",0)===0||c.lastIndexOf("mp4a",0)===0});C[d+"Codec"]=l.length>0?l[0]:n[0],B=B.filter(function(c){return n.indexOf(c)===-1})}}),C.unknownCodecs=B}function E(B,C,d){var n=C[d];n&&(B[d]=n)}function _(B,C){for(var d=B[C],n=C;n--;){var l=B[n];if(!l)return;l.programDateTime=d.programDateTime-l.duration*1e3,d=l}}function y(B,C){B.rawProgramDateTime?B.programDateTime=Date.parse(B.rawProgramDateTime):C!=null&&C.programDateTime&&(B.programDateTime=C.endProgramDateTime),Object(V.isFiniteNumber)(B.programDateTime)||(B.programDateTime=null,B.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/polyfills/number.ts"),F=D("./src/events.ts"),O=D("./src/errors.ts"),X=D("./src/utils/logger.ts"),P=D("./src/utils/mp4-tools.ts"),e=D("./src/loader/m3u8-parser.ts"),R=D("./src/types/loader.ts"),m=D("./src/utils/attr-list.ts");function v(a){var A=a.type;switch(A){case R.PlaylistContextType.AUDIO_TRACK:return R.PlaylistLevelType.AUDIO;case R.PlaylistContextType.SUBTITLE_TRACK:return R.PlaylistLevelType.SUBTITLE;default:return R.PlaylistLevelType.MAIN}}function u(a,A){var o=a.url;return(o===void 0||o.indexOf("data:")===0)&&(o=A.url),o}var s=function(){function a(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var A=a.prototype;return A.registerListeners=function(){var i=this.hls;i.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},A.unregisterListeners=function(){var i=this.hls;i.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},A.createInternalLoader=function(i){var r=this.hls.config,t=r.pLoader,E=r.loader,_=t||E,y=new _(r);return i.loader=y,this.loaders[i.type]=y,y},A.getInternalLoader=function(i){return this.loaders[i.type]},A.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},A.destroyInternalLoaders=function(){for(var i in this.loaders){var r=this.loaders[i];r&&r.destroy(),this.resetInternalLoader(i)}},A.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},A.onManifestLoading=function(i,r){var t=r.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:R.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},A.onLevelLoading=function(i,r){var t=r.id,E=r.level,_=r.url,y=r.deliveryDirectives;this.load({id:t,groupId:null,level:E,responseType:"text",type:R.PlaylistContextType.LEVEL,url:_,deliveryDirectives:y})},A.onAudioTrackLoading=function(i,r){var t=r.id,E=r.groupId,_=r.url,y=r.deliveryDirectives;this.load({id:t,groupId:E,level:null,responseType:"text",type:R.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:y})},A.onSubtitleTrackLoading=function(i,r){var t=r.id,E=r.groupId,_=r.url,y=r.deliveryDirectives;this.load({id:t,groupId:E,level:null,responseType:"text",type:R.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:y})},A.load=function(i){var r,t=this.hls.config,E=this.getInternalLoader(i);if(E){var _=E.context;if(_&&_.url===i.url){X.logger.trace("[playlist-loader]: playlist request ongoing");return}X.logger.log("[playlist-loader]: aborting previous loader for type: "+i.type),E.abort()}var y,B,C,d;switch(i.type){case R.PlaylistContextType.MANIFEST:y=t.manifestLoadingMaxRetry,B=t.manifestLoadingTimeOut,C=t.manifestLoadingRetryDelay,d=t.manifestLoadingMaxRetryTimeout;break;case R.PlaylistContextType.LEVEL:case R.PlaylistContextType.AUDIO_TRACK:case R.PlaylistContextType.SUBTITLE_TRACK:y=0,B=t.levelLoadingTimeOut;break;default:y=t.levelLoadingMaxRetry,B=t.levelLoadingTimeOut,C=t.levelLoadingRetryDelay,d=t.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(i),(r=i.deliveryDirectives)!==null&&r!==void 0&&r.part){var n;if(i.type===R.PlaylistContextType.LEVEL&&i.level!==null?n=this.hls.levels[i.level].details:i.type===R.PlaylistContextType.AUDIO_TRACK&&i.id!==null?n=this.hls.audioTracks[i.id].details:i.type===R.PlaylistContextType.SUBTITLE_TRACK&&i.id!==null&&(n=this.hls.subtitleTracks[i.id].details),n){var l=n.partTarget,c=n.targetduration;l&&c&&(B=Math.min(Math.max(l*3,c*.8)*1e3,B))}}var b={timeout:B,maxRetry:y,retryDelay:C,maxRetryDelay:d,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(i,b,g)},A.loadsuccess=function(i,r,t,E){if(E===void 0&&(E=null),t.isSidxRequest){this.handleSidxRequest(i,t),this.handlePlaylistLoaded(i,r,t,E);return}this.resetInternalLoader(t.type);var _=i.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(i,t,"no EXTM3U delimiter",E);return}r.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(i,r,t,E):this.handleMasterPlaylist(i,r,t,E)},A.loaderror=function(i,r,t){t===void 0&&(t=null),this.handleNetworkError(r,t,!1,i)},A.loadtimeout=function(i,r,t){t===void 0&&(t=null),this.handleNetworkError(r,t,!0)},A.handleMasterPlaylist=function(i,r,t,E){var _=this.hls,y=i.data,B=u(i,t),C=e.default.parseMasterPlaylist(y,B),d=C.levels,n=C.sessionData;if(!d.length){this.handleManifestParsingError(i,t,"no level found in manifest",E);return}var l=d.map(function(N){return{id:N.attrs.AUDIO,audioCodec:N.audioCodec}}),c=d.map(function(N){return{id:N.attrs.SUBTITLES,textCodec:N.textCodec}}),b=e.default.parseMasterPlaylistMedia(y,B,"AUDIO",l),g=e.default.parseMasterPlaylistMedia(y,B,"SUBTITLES",c),h=e.default.parseMasterPlaylistMedia(y,B,"CLOSED-CAPTIONS");if(b.length){var L=b.some(function(N){return!N.url});!L&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(X.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),b.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new m.AttrList({}),bitrate:0,url:""}))}_.trigger(F.Events.MANIFEST_LOADED,{levels:d,audioTracks:b,subtitles:g,captions:h,url:B,stats:r,networkDetails:E,sessionData:n})},A.handleTrackOrLevelPlaylist=function(i,r,t,E){var _=this.hls,y=t.id,B=t.level,C=t.type,d=u(i,t),n=Object(V.isFiniteNumber)(y)?y:0,l=Object(V.isFiniteNumber)(B)?B:n,c=v(t),b=e.default.parseLevelPlaylist(i.data,d,l,c,n);if(!b.fragments.length){_.trigger(F.Events.ERROR,{type:O.ErrorTypes.NETWORK_ERROR,details:O.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:d,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(C===R.PlaylistContextType.MANIFEST){var g={attrs:new m.AttrList({}),bitrate:0,details:b,name:"",url:d};_.trigger(F.Events.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:d,stats:r,networkDetails:E,sessionData:null})}if(r.parsing.end=performance.now(),b.needSidxRanges){var h,L=(h=b.fragments[0].initSegment)===null||h===void 0?void 0:h.url;this.load({url:L,isSidxRequest:!0,type:C,level:B,levelDetails:b,id:y,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=b,this.handlePlaylistLoaded(i,r,t,E)},A.handleSidxRequest=function(i,r){var t=Object(P.parseSegmentIndex)(new Uint8Array(i.data));if(!t)return;var E=t.references,_=r.levelDetails;E.forEach(function(y,B){var C=y.info,d=_.fragments[B];d.byteRange.length===0&&d.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),d.initSegment&&d.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},A.handleManifestParsingError=function(i,r,t,E){this.hls.trigger(F.Events.ERROR,{type:O.ErrorTypes.NETWORK_ERROR,details:O.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:r.type===R.PlaylistContextType.MANIFEST,url:i.url,reason:t,response:i,context:r,networkDetails:E})},A.handleNetworkError=function(i,r,t,E){t===void 0&&(t=!1),X.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+i.type+" level: "+i.level+" id: "+i.id+' group-id: "'+i.groupId+'"');var _=O.ErrorDetails.UNKNOWN,y=!1,B=this.getInternalLoader(i);switch(i.type){case R.PlaylistContextType.MANIFEST:_=t?O.ErrorDetails.MANIFEST_LOAD_TIMEOUT:O.ErrorDetails.MANIFEST_LOAD_ERROR,y=!0;break;case R.PlaylistContextType.LEVEL:_=t?O.ErrorDetails.LEVEL_LOAD_TIMEOUT:O.ErrorDetails.LEVEL_LOAD_ERROR,y=!1;break;case R.PlaylistContextType.AUDIO_TRACK:_=t?O.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:O.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,y=!1;break;case R.PlaylistContextType.SUBTITLE_TRACK:_=t?O.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:O.ErrorDetails.SUBTITLE_LOAD_ERROR,y=!1;break}B&&this.resetInternalLoader(i.type);var C={type:O.ErrorTypes.NETWORK_ERROR,details:_,fatal:y,url:i.url,loader:B,context:i,networkDetails:r};E&&(C.response=E),this.hls.trigger(F.Events.ERROR,C)},A.handlePlaylistLoaded=function(i,r,t,E){var _=t.type,y=t.level,B=t.id,C=t.groupId,d=t.loader,n=t.levelDetails,l=t.deliveryDirectives;if(!(n!=null&&n.targetduration)){this.handleManifestParsingError(i,t,"invalid target duration",E);return}if(!d)return;n.live&&(d.getCacheAge&&(n.ageHeader=d.getCacheAge()||0),(!d.getCacheAge||isNaN(n.ageHeader))&&(n.ageHeader=0));switch(_){case R.PlaylistContextType.MANIFEST:case R.PlaylistContextType.LEVEL:this.hls.trigger(F.Events.LEVEL_LOADED,{details:n,level:y||0,id:B||0,stats:r,networkDetails:E,deliveryDirectives:l});break;case R.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(F.Events.AUDIO_TRACK_LOADED,{details:n,id:B||0,groupId:C||"",stats:r,networkDetails:E,deliveryDirectives:l});break;case R.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(F.Events.SUBTITLE_TRACK_LOADED,{details:n,id:B||0,groupId:C||"",stats:r,networkDetails:E,deliveryDirectives:l});break}},a}();G.default=s},"./src/polyfills/number.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"isFiniteNumber",function(){return V}),D.d(G,"MAX_SAFE_INTEGER",function(){return F});var V=Number.isFinite||function(O){return typeof O=="number"&&isFinite(O)},F=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(se,G,D){"use strict";D.r(G);var V=function(){function F(){}return F.getSilentFrame=function(X,P){switch(X){case"mp4a.40.2":if(P===1)return new Uint8Array([0,200,0,128,35,128]);if(P===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(P===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(P===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(P===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(P===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(P===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(P===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(P===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}return},F}();G.default=V},"./src/remux/mp4-generator.ts":function(se,G,D){"use strict";D.r(G);var V=Math.pow(2,32)-1,F=function(){function O(){}return O.init=function(){O.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 P;for(P in O.types)O.types.hasOwnProperty(P)&&(O.types[P]=[P.charCodeAt(0),P.charCodeAt(1),P.charCodeAt(2),P.charCodeAt(3)]);var e=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]),R=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);O.HDLR_TYPES={video:e,audio:R};var m=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),v=new Uint8Array([0,0,0,0,0,0,0,0]);O.STTS=O.STSC=O.STCO=v,O.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),O.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),O.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),O.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),a=new Uint8Array([0,0,0,1]);O.FTYP=O.box(O.types.ftyp,u,a,u,s),O.DINF=O.box(O.types.dinf,O.box(O.types.dref,m))},O.box=function(P){for(var e=8,R=arguments.length,m=new Array(R>1?R-1:0),v=1;v<R;v++)m[v-1]=arguments[v];for(var u=m.length,s=u;u--;)e+=m[u].byteLength;var a=new Uint8Array(e);for(a[0]=e>>24&255,a[1]=e>>16&255,a[2]=e>>8&255,a[3]=e&255,a.set(P,4),u=0,e=8;u<s;u++)a.set(m[u],e),e+=m[u].byteLength;return a},O.hdlr=function(P){return O.box(O.types.hdlr,O.HDLR_TYPES[P])},O.mdat=function(P){return O.box(O.types.mdat,P)},O.mdhd=function(P,e){e*=P;var R=Math.floor(e/(V+1)),m=Math.floor(e%(V+1));return O.box(O.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,P>>24&255,P>>16&255,P>>8&255,P&255,R>>24,R>>16&255,R>>8&255,R&255,m>>24,m>>16&255,m>>8&255,m&255,85,196,0,0]))},O.mdia=function(P){return O.box(O.types.mdia,O.mdhd(P.timescale,P.duration),O.hdlr(P.type),O.minf(P))},O.mfhd=function(P){return O.box(O.types.mfhd,new Uint8Array([0,0,0,0,P>>24,P>>16&255,P>>8&255,P&255]))},O.minf=function(P){return P.type==="audio"?O.box(O.types.minf,O.box(O.types.smhd,O.SMHD),O.DINF,O.stbl(P)):O.box(O.types.minf,O.box(O.types.vmhd,O.VMHD),O.DINF,O.stbl(P))},O.moof=function(P,e,R){return O.box(O.types.moof,O.mfhd(P),O.traf(R,e))},O.moov=function(P){for(var e=P.length,R=[];e--;)R[e]=O.trak(P[e]);return O.box.apply(null,[O.types.moov,O.mvhd(P[0].timescale,P[0].duration)].concat(R).concat(O.mvex(P)))},O.mvex=function(P){for(var e=P.length,R=[];e--;)R[e]=O.trex(P[e]);return O.box.apply(null,[O.types.mvex].concat(R))},O.mvhd=function(P,e){e*=P;var R=Math.floor(e/(V+1)),m=Math.floor(e%(V+1)),v=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,P>>24&255,P>>16&255,P>>8&255,P&255,R>>24,R>>16&255,R>>8&255,R&255,m>>24,m>>16&255,m>>8&255,m&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 O.box(O.types.mvhd,v)},O.sdtp=function(P){var e=P.samples||[],R=new Uint8Array(4+e.length),m,v;for(m=0;m<e.length;m++)v=e[m].flags,R[m+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return O.box(O.types.sdtp,R)},O.stbl=function(P){return O.box(O.types.stbl,O.stsd(P),O.box(O.types.stts,O.STTS),O.box(O.types.stsc,O.STSC),O.box(O.types.stsz,O.STSZ),O.box(O.types.stco,O.STCO))},O.avc1=function(P){var e=[],R=[],m,v,u;for(m=0;m<P.sps.length;m++)v=P.sps[m],u=v.byteLength,e.push(u>>>8&255),e.push(u&255),e=e.concat(Array.prototype.slice.call(v));for(m=0;m<P.pps.length;m++)v=P.pps[m],u=v.byteLength,R.push(u>>>8&255),R.push(u&255),R=R.concat(Array.prototype.slice.call(v));var s=O.box(O.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|P.sps.length].concat(e).concat([P.pps.length]).concat(R))),a=P.width,A=P.height,o=P.pixelRatio[0],i=P.pixelRatio[1];return O.box(O.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,a>>8&255,a&255,A>>8&255,A&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]),s,O.box(O.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),O.box(O.types.pasp,new Uint8Array([o>>24,o>>16&255,o>>8&255,o&255,i>>24,i>>16&255,i>>8&255,i&255])))},O.esds=function(P){var e=P.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(P.config).concat([6,1,2]))},O.mp4a=function(P){var e=P.samplerate;return O.box(O.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,P.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),O.box(O.types.esds,O.esds(P)))},O.mp3=function(P){var e=P.samplerate;return O.box(O.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,P.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},O.stsd=function(P){return P.type==="audio"?!P.isAAC&&P.codec==="mp3"?O.box(O.types.stsd,O.STSD,O.mp3(P)):O.box(O.types.stsd,O.STSD,O.mp4a(P)):O.box(O.types.stsd,O.STSD,O.avc1(P))},O.tkhd=function(P){var e=P.id,R=P.duration*P.timescale,m=P.width,v=P.height,u=Math.floor(R/(V+1)),s=Math.floor(R%(V+1));return O.box(O.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,s>>24,s>>16&255,s>>8&255,s&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,m>>8&255,m&255,0,0,v>>8&255,v&255,0,0]))},O.traf=function(P,e){var R=O.sdtp(P),m=P.id,v=Math.floor(e/(V+1)),u=Math.floor(e%(V+1));return O.box(O.types.traf,O.box(O.types.tfhd,new Uint8Array([0,0,0,0,m>>24,m>>16&255,m>>8&255,m&255])),O.box(O.types.tfdt,new Uint8Array([1,0,0,0,v>>24,v>>16&255,v>>8&255,v&255,u>>24,u>>16&255,u>>8&255,u&255])),O.trun(P,R.length+16+20+8+16+8+8),R)},O.trak=function(P){return P.duration=P.duration||4294967295,O.box(O.types.trak,O.tkhd(P),O.mdia(P))},O.trex=function(P){var e=P.id;return O.box(O.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},O.trun=function(P,e){var R=P.samples||[],m=R.length,v=12+16*m,u=new Uint8Array(v),s,a,A,o,i,r;for(e+=8+v,u.set([0,0,15,1,m>>>24&255,m>>>16&255,m>>>8&255,m&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),s=0;s<m;s++)a=R[s],A=a.duration,o=a.size,i=a.flags,r=a.cts,u.set([A>>>24&255,A>>>16&255,A>>>8&255,A&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&240<<8,i.degradPrio&15,r>>>24&255,r>>>16&255,r>>>8&255,r&255],12+16*s);return O.box(O.types.trun,u)},O.initSegment=function(P){O.types||O.init();var e=O.moov(P),R=new Uint8Array(O.FTYP.byteLength+e.byteLength);return R.set(O.FTYP),R.set(e,O.FTYP.byteLength),R},O}();F.types=void 0,F.HDLR_TYPES=void 0,F.STTS=void 0,F.STSC=void 0,F.STCO=void 0,F.STSZ=void 0,F.VMHD=void 0,F.SMHD=void 0,F.STSD=void 0,F.FTYP=void 0,F.DINF=void 0,G.default=F},"./src/remux/mp4-remuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return r}),D.d(G,"normalizePts",function(){return t});var V=D("./src/polyfills/number.ts"),F=D("./src/remux/aac-helper.ts"),O=D("./src/remux/mp4-generator.ts"),X=D("./src/events.ts"),P=D("./src/errors.ts"),e=D("./src/utils/logger.ts"),R=D("./src/types/loader.ts"),m=D("./src/utils/timescale-conversion.ts");function v(){return v=Object.assign||function(B){for(var C=1;C<arguments.length;C++){var d=arguments[C];for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&(B[n]=d[n])}return B},v.apply(this,arguments)}var u=10*1e3,s=1024,a=1152,A=null,o=null,i=!1,r=function(){function B(d,n,l,c){if(c===void 0&&(c=""),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.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=d,this.config=n,this.typeSupported=l,this.ISGenerated=!1,A===null){var b=navigator.userAgent||"",g=b.match(/Chrome\/(\d+)/i);A=g?parseInt(g[1]):0}if(o===null){var h=navigator.userAgent.match(/Safari\/(\d+)/i);o=h?parseInt(h[1]):0}i=!!A&&A<75||!!o&&o<600}var C=B.prototype;return C.destroy=function(){},C.resetTimeStamp=function(n){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=n},C.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},C.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},C.getVideoStartPts=function(n){var l=!1,c=n.reduce(function(b,g){var h=g.pts-b;return h<-4294967296?(l=!0,t(b,g.pts)):h>0?b:g.pts},n[0].pts);return l&&e.logger.debug("PTS rollover detected"),c},C.remux=function(n,l,c,b,g,h,L,N){var T,M,W,U,Y,ne,me=g,ge=g,Oe=n.pid>-1,Se=l.pid>-1,Be=l.samples.length,Ne=n.samples.length>0,ke=Be>1,Ce=(!Oe||Ne)&&(!Se||ke)||this.ISGenerated||L;if(Ce){this.ISGenerated||(W=this.generateIS(n,l,g));var ve=this.isVideoContiguous,Xe=-1;if(ke&&(Xe=E(l.samples),!ve&&this.config.forceKeyFrameOnDiscontinuity))if(ne=!0,Xe>0){e.logger.warn("[mp4-remuxer]: Dropped "+Xe+" out of "+Be+" video samples due to a missing keyframe");var lt=this.getVideoStartPts(l.samples);l.samples=l.samples.slice(Xe),l.dropped+=Xe,ge+=(l.samples[0].pts-lt)/(l.timescale||9e4)}else Xe===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+Be+" video samples"),ne=!1);if(this.ISGenerated){if(Ne&&ke){var at=this.getVideoStartPts(l.samples),je=t(n.samples[0].pts,at)-at,rt=je/l.inputTimeScale;me+=Math.max(0,rt),ge+=Math.max(0,-rt)}if(Ne){if(n.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),W=this.generateIS(n,l,g)),M=this.remuxAudio(n,me,this.isAudioContiguous,h,Se||ke||N===R.PlaylistLevelType.AUDIO?ge:void 0),ke){var re=M?M.endPTS-M.startPTS:0;l.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),W=this.generateIS(n,l,g)),T=this.remuxVideo(l,ge,ve,re)}}else ke&&(T=this.remuxVideo(l,ge,ve,0));T&&(T.firstKeyFrame=Xe,T.independent=Xe!==-1)}}return this.ISGenerated&&(c.samples.length&&(Y=this.remuxID3(c,g)),b.samples.length&&(U=this.remuxText(b,g))),{audio:M,video:T,initSegment:W,independent:ne,text:U,id3:Y}},C.generateIS=function(n,l,c){var b=n.samples,g=l.samples,h=this.typeSupported,L={},N=!Object(V.isFiniteNumber)(this._initPTS),T="audio/mp4",M,W,U;if(N&&(M=W=Infinity),n.config&&b.length&&(n.timescale=n.samplerate,n.isAAC||(h.mpeg?(T="audio/mpeg",n.codec=""):h.mp3&&(n.codec="mp3")),L.audio={id:"audio",container:T,codec:n.codec,initSegment:!n.isAAC&&h.mpeg?new Uint8Array(0):O.default.initSegment([n]),metadata:{channelCount:n.channelCount}},N&&(U=n.inputTimeScale,M=W=b[0].pts-Math.round(U*c))),l.sps&&l.pps&&g.length&&(l.timescale=l.inputTimeScale,L.video={id:"main",container:"video/mp4",codec:l.codec,initSegment:O.default.initSegment([l]),metadata:{width:l.width,height:l.height}},N)){U=l.inputTimeScale;var Y=this.getVideoStartPts(g),ne=Math.round(U*c);W=Math.min(W,t(g[0].dts,Y)-ne),M=Math.min(M,Y-ne)}if(Object.keys(L).length)return this.ISGenerated=!0,N&&(this._initPTS=M,this._initDTS=W),{tracks:L,initPTS:M,timescale:U}},C.remuxVideo=function(n,l,c,b){var g=n.inputTimeScale,h=n.samples,L=[],N=h.length,T=this._initPTS,M=this.nextAvcDts,W=8,U,Y,ne,me=Number.POSITIVE_INFINITY,ge=Number.NEGATIVE_INFINITY,Oe=0,Se=!1;if(!c||M===null){var Be=l*g,Ne=h[0].pts-t(h[0].dts,h[0].pts);M=Be-Ne}for(var ke=0;ke<N;ke++){var Ce=h[ke];if(Ce.pts=t(Ce.pts-T,M),Ce.dts=t(Ce.dts-T,M),Ce.dts>Ce.pts){var ve=9e4*.2;Oe=Math.max(Math.min(Oe,Ce.pts-Ce.dts),-1*ve)}Ce.dts<h[ke>0?ke-1:ke].dts&&(Se=!0)}Se&&h.sort(function(Lt,mt){var tt=Lt.dts-mt.dts,er=Lt.pts-mt.pts;return tt||er}),Y=h[0].dts,ne=h[h.length-1].dts;var Xe=Math.round((ne-Y)/(N-1));if(Oe<0){if(Oe<Xe*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(m.toMsFromMpegTsClock)(-Xe,!0)+" ms");for(var lt=Oe,at=0;at<N;at++)h[at].dts=lt=Math.max(lt,h[at].pts-Xe),h[at].pts=Math.max(lt,h[at].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(m.toMsFromMpegTsClock)(Oe,!0)+" ms to overcome this issue");for(var je=0;je<N;je++)h[je].dts=h[je].dts+Oe}Y=h[0].dts}if(c){var rt=Y-M,re=rt>Xe,J=rt<-1;if(re||J){re?e.logger.warn("AVC: "+Object(m.toMsFromMpegTsClock)(rt,!0)+" ms ("+rt+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(m.toMsFromMpegTsClock)(-rt,!0)+" ms ("+rt+"dts) overlapping between fragments detected"),Y=M;var k=h[0].pts-rt;h[0].dts=Y,h[0].pts=k,e.logger.log("Video: First PTS/DTS adjusted: "+Object(m.toMsFromMpegTsClock)(k,!0)+"/"+Object(m.toMsFromMpegTsClock)(Y,!0)+", delta: "+Object(m.toMsFromMpegTsClock)(rt,!0)+" ms")}}i&&(Y=Math.max(0,Y));for(var $=0,q=0,he=0;he<N;he++){for(var de=h[he],Qe=de.units,ze=Qe.length,Ge=0,$e=0;$e<ze;$e++)Ge+=Qe[$e].data.length;q+=Ge,$+=ze,de.length=Ge,de.dts=Math.max(de.dts,Y),de.pts=Math.max(de.pts,de.dts,0),me=Math.min(de.pts,me),ge=Math.max(de.pts,ge)}ne=h[N-1].dts;var nt=q+4*$+8,dt;try{dt=new Uint8Array(nt)}catch(Lt){this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:P.ErrorTypes.MUX_ERROR,details:P.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:nt,reason:"fail allocating video mdat "+nt});return}var xe=new DataView(dt.buffer);xe.setUint32(0,nt),dt.set(O.default.types.mdat,4);for(var Ue=0;Ue<N;Ue++){for(var Ke=h[Ue],We=Ke.units,Le=0,Fe=0,we=We.length;Fe<we;Fe++){var ue=We[Fe],ce=ue.data,te=ue.data.byteLength;xe.setUint32(W,te),W+=4,dt.set(ce,W),W+=te,Le+=4+te}if(Ue<N-1)U=h[Ue+1].dts-Ke.dts;else{var ie=this.config,le=Ke.dts-h[Ue>0?Ue-1:Ue].dts;if(ie.stretchShortVideoTrack&&this.nextAudioPts!==null){var pe=Math.floor(ie.maxBufferHole*g),Ie=(b?me+b*g:this.nextAudioPts)-Ke.pts;Ie>pe?(U=Ie-le,U<0&&(U=le),e.logger.log("[mp4-remuxer]: It is approximately "+Ie/90+" ms to the next segment; using duration "+U/90+" ms for the last video frame.")):U=le}else U=le}var Pe=Math.round(Ke.pts-Ke.dts);L.push(new _(Ke.key,U,Le,Pe))}if(L.length&&A&&A<70){var qe=L[0].flags;qe.dependsOn=2,qe.isNonSync=0}console.assert(U!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=M=ne+U,this.isVideoContiguous=!0;var ft=O.default.moof(n.sequenceNumber++,Y,v({},n,{samples:L})),ut="video",st={data1:ft,data2:dt,startPTS:me/g,endPTS:(ge+U)/g,startDTS:Y/g,endDTS:M/g,type:ut,hasAudio:!1,hasVideo:!0,nb:L.length,dropped:n.dropped};return n.samples=[],n.dropped=0,console.assert(dt.length,"MDAT length must not be zero"),st},C.remuxAudio=function(n,l,c,b,g){var h=n.inputTimeScale,L=n.samplerate?n.samplerate:h,N=h/L,T=n.isAAC?s:a,M=T*N,W=this._initPTS,U=!n.isAAC&&this.typeSupported.mpeg,Y=[],ne=n.samples,me=U?0:8,ge=this.nextAudioPts||-1,Oe=l*h;if(this.isAudioContiguous=c=c||ne.length&&ge>0&&(b&&Math.abs(Oe-ge)<9e3||Math.abs(t(ne[0].pts-W,Oe)-ge)<20*M),ne.forEach(function(ce){ce.pts=t(ce.pts-W,Oe)}),!c||ge<0){if(ne=ne.filter(function(ce){return ce.pts>=0}),!ne.length)return;g===0?ge=0:b?ge=Math.max(0,Oe):ge=ne[0].pts}if(n.isAAC)for(var Se=g!==void 0,Be=this.config.maxAudioFramesDrift,Ne=0,ke=ge;Ne<ne.length;Ne++){var Ce=ne[Ne],ve=Ce.pts,Xe=ve-ke,lt=Math.abs(1e3*Xe/h);if(Xe<=-Be*M&&Se)Ne===0&&(e.logger.warn("Audio frame @ "+(ve/h).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Xe/h)+" ms."),this.nextAudioPts=ge=ke=ve);else if(Xe>=Be*M&<<u&&Se){var at=Math.round(Xe/M);ke=ve-at*M,ke<0&&(at--,ke+=M),Ne===0&&(this.nextAudioPts=ge=ke),e.logger.warn("[mp4-remuxer]: Injecting "+at+" audio frame @ "+(ke/h).toFixed(3)+"s due to "+Math.round(1e3*Xe/h)+" ms gap.");for(var je=0;je<at;je++){var rt=Math.max(ke,0),re=F.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);re||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),re=Ce.unit.subarray()),ne.splice(Ne,0,{unit:re,pts:rt}),ke+=M,Ne++}}Ce.pts=ke,ke+=M}for(var J=null,k=null,$,q=0,he=ne.length;he--;)q+=ne[he].unit.byteLength;for(var de=0,Qe=ne.length;de<Qe;de++){var ze=ne[de],Ge=ze.unit,$e=ze.pts;if(k!==null){var nt=Y[de-1];nt.duration=Math.round(($e-k)/N)}else if(c&&n.isAAC&&($e=ge),J=$e,q>0){q+=me;try{$=new Uint8Array(q)}catch(ce){this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:P.ErrorTypes.MUX_ERROR,details:P.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:q,reason:"fail allocating audio mdat "+q});return}if(!U){var dt=new DataView($.buffer);dt.setUint32(0,q),$.set(O.default.types.mdat,4)}}else return;$.set(Ge,me);var xe=Ge.byteLength;me+=xe,Y.push(new _(!0,T,xe,0)),k=$e}var Ue=Y.length;if(!Ue)return;var Ke=Y[Y.length-1];this.nextAudioPts=ge=k+N*Ke.duration;var We=U?new Uint8Array(0):O.default.moof(n.sequenceNumber++,J/N,v({},n,{samples:Y}));n.samples=[];var Le=J/h,Fe=ge/h,we="audio",ue={data1:We,data2:$,startPTS:Le,endPTS:Fe,startDTS:Le,endDTS:Fe,type:we,hasAudio:!0,hasVideo:!1,nb:Ue};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),ue},C.remuxEmptyAudio=function(n,l,c,b){var g=n.inputTimeScale,h=n.samplerate?n.samplerate:g,L=g/h,N=this.nextAudioPts,T=(N!==null?N:b.startDTS*g)+this._initDTS,M=b.endDTS*g+this._initDTS,W=L*s,U=Math.ceil((M-T)/W),Y=F.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!Y){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ne=[],me=0;me<U;me++){var ge=T+me*W;ne.push({unit:Y,pts:ge,dts:ge})}return n.samples=ne,this.remuxAudio(n,l,c,!1)},C.remuxID3=function(n,l){var c=n.samples.length;if(!c)return;for(var b=n.inputTimeScale,g=this._initPTS,h=this._initDTS,L=0;L<c;L++){var N=n.samples[L];N.pts=t(N.pts-g,l*b)/b,N.dts=t(N.dts-h,l*b)/b}var T=n.samples;return n.samples=[],{samples:T}},C.remuxText=function(n,l){var c=n.samples.length;if(!c)return;for(var b=n.inputTimeScale,g=this._initPTS,h=0;h<c;h++){var L=n.samples[h];L.pts=t(L.pts-g,l*b)/b}n.samples.sort(function(T,M){return T.pts-M.pts});var N=n.samples;return n.samples=[],{samples:N}},B}();function t(B,C){var d;if(C===null)return B;for(C<B?d=-8589934592:d=8589934592;Math.abs(B-C)>4294967296;)B+=d;return B}function E(B){for(var C=0;C<B.length;C++)if(B[C].key)return C;return-1}var _=function(C,d,n,l){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=d,this.size=n,this.cts=l,this.flags=new y(C)},y=function(C){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=C?2:1,this.isNonSync=C?0:1}},"./src/remux/passthrough-remuxer.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/polyfills/number.ts"),F=D("./src/utils/mp4-tools.ts"),O=D("./src/loader/fragment.ts"),X=D("./src/utils/logger.ts"),P=function(){function m(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var v=m.prototype;return v.destroy=function(){},v.resetTimeStamp=function(s){this.initPTS=s,this.lastEndDTS=null},v.resetNextTimestamp=function(){this.lastEndDTS=null},v.resetInitSegment=function(s,a,A){this.audioCodec=a,this.videoCodec=A,this.generateInitSegment(s),this.emitInitSegment=!0},v.generateInitSegment=function(s){var a=this.audioCodec,A=this.videoCodec;if(!s||!s.byteLength){this.initTracks=void 0,this.initData=void 0;return}var o=this.initData=Object(F.parseInitSegment)(s);a||(a=R(o.audio,O.ElementaryStreamTypes.AUDIO)),A||(A=R(o.video,O.ElementaryStreamTypes.VIDEO));var i={};o.audio&&o.video?i.audiovideo={container:"video/mp4",codec:a+","+A,initSegment:s,id:"main"}:o.audio?i.audio={container:"audio/mp4",codec:a,initSegment:s,id:"audio"}:o.video?i.video={container:"video/mp4",codec:A,initSegment:s,id:"main"}:X.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},v.remux=function(s,a,A,o,i){var r=this.initPTS,t=this.lastEndDTS,E={audio:void 0,video:void 0,text:o,id3:A,initSegment:void 0};Object(V.isFiniteNumber)(t)||(t=this.lastEndDTS=i||0);var _=a.samples;if(!_||!_.length)return E;var y={initPTS:void 0,timescale:1},B=this.initData;if((!B||!B.length)&&(this.generateInitSegment(_),B=this.initData),!B||!B.length)return X.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),E;this.emitInitSegment&&(y.tracks=this.initTracks,this.emitInitSegment=!1),Object(V.isFiniteNumber)(r)||(this.initPTS=y.initPTS=r=e(B,_,t));var C=Object(F.getDuration)(_,B),d=t,n=C+d;Object(F.offsetStartDTS)(B,_,r),C>0?this.lastEndDTS=n:(X.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var l=!!B.audio,c=!!B.video,b="";l&&(b+="audio"),c&&(b+="video");var g={data1:_,startPTS:d,startDTS:d,endPTS:n,endDTS:n,type:b,hasAudio:l,hasVideo:c,nb:1,dropped:0};return E.audio=g.type==="audio"?g:void 0,E.video=g.type!=="audio"?g:void 0,E.text=o,E.id3=A,E.initSegment=y,E},m}(),e=function(v,u,s){return Object(F.getStartDTS)(v,u)-s};function R(m,v){var u=m==null?void 0:m.codec;return u&&u.length>4?u:u==="hvc1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||v===O.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}G.default=P},"./src/task-loop.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function F(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var O=F.prototype;return O.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},O.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},O.onHandlerDestroyed=function(){},O.hasInterval=function(){return!!this._tickInterval},O.hasNextTick=function(){return!!this._tickTimer},O.setInterval=function(P){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,P),!0)},O.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},O.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},O.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},O.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},O.doTick=function(){},F}()},"./src/types/cmcd.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"CMCDVersion",function(){return V}),D.d(G,"CMCDObjectType",function(){return F}),D.d(G,"CMCDStreamingFormat",function(){return O}),D.d(G,"CMCDStreamType",function(){return X});var V=1,F;(function(P){P.MANIFEST="m",P.AUDIO="a",P.VIDEO="v",P.MUXED="av",P.INIT="i",P.CAPTION="c",P.TIMED_TEXT="tt",P.KEY="k",P.OTHER="o"})(F||(F={}));var O;(function(P){P.DASH="d",P.HLS="h",P.SMOOTH="s",P.OTHER="o"})(O||(O={}));var X;(function(P){P.VOD="v",P.LIVE="l"})(X||(X={}))},"./src/types/level.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"HlsSkip",function(){return O}),D.d(G,"getSkipValue",function(){return X}),D.d(G,"HlsUrlParameters",function(){return P}),D.d(G,"Level",function(){return e});function V(R,m){for(var v=0;v<m.length;v++){var u=m[v];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(R,u.key,u)}}function F(R,m,v){return m&&V(R.prototype,m),v&&V(R,v),R}var O;(function(R){R.No="",R.Yes="YES",R.v2="v2"})(O||(O={}));function X(R,m){var v=R.canSkipUntil,u=R.canSkipDateRanges,s=R.endSN,a=m!==void 0?m-s:0;return v&&a<v?u?O.v2:O.Yes:O.No}var P=function(){function R(v,u,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=v,this.part=u,this.skip=s}var m=R.prototype;return m.addDirectives=function(u){var s=new self.URL(u);return this.msn!==void 0&&s.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&s.searchParams.set("_HLS_part",this.part.toString()),this.skip&&s.searchParams.set("_HLS_skip",this.skip),s.toString()},R}(),e=function(){function R(m){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=[m.url],this.attrs=m.attrs,this.bitrate=m.bitrate,m.details&&(this.details=m.details),this.id=m.id||0,this.name=m.name,this.width=m.width||0,this.height=m.height||0,this.audioCodec=m.audioCodec,this.videoCodec=m.videoCodec,this.unknownCodecs=m.unknownCodecs,this.codecSet=[m.videoCodec,m.audioCodec].filter(function(v){return v}).join(",").replace(/\.[^.,]+/g,"")}return F(R,[{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(v){var u=v%this.url.length;this._urlId!==u&&(this.details=void 0,this._urlId=u)}}]),R}()},"./src/types/loader.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"PlaylistContextType",function(){return V}),D.d(G,"PlaylistLevelType",function(){return F});var V;(function(O){O.MANIFEST="manifest",O.LEVEL="level",O.AUDIO_TRACK="audioTrack",O.SUBTITLE_TRACK="subtitleTrack"})(V||(V={}));var F;(function(O){O.MAIN="main",O.AUDIO="audio",O.SUBTITLE="subtitle"})(F||(F={}))},"./src/types/transmuxer.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"ChunkMetadata",function(){return V});var V=function(X,P,e,R,m,v){R===void 0&&(R=0),m===void 0&&(m=-1),v===void 0&&(v=!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=F(),this.buffering={audio:F(),video:F(),audiovideo:F()},this.level=X,this.sn=P,this.id=e,this.size=R,this.part=m,this.partial=v};function F(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"AttrList",function(){return O});var V=/^(\d+)x(\d+)$/,F=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,O=function(){function X(e){typeof e=="string"&&(e=X.parseAttrList(e));for(var R in e)e.hasOwnProperty(R)&&(this[R]=e[R])}var P=X.prototype;return P.decimalInteger=function(R){var m=parseInt(this[R],10);return m>Number.MAX_SAFE_INTEGER?Infinity:m},P.hexadecimalInteger=function(R){if(this[R]){var m=(this[R]||"0x").slice(2);m=(m.length&1?"0":"")+m;for(var v=new Uint8Array(m.length/2),u=0;u<m.length/2;u++)v[u]=parseInt(m.slice(u*2,u*2+2),16);return v}else return null},P.hexadecimalIntegerAsNumber=function(R){var m=parseInt(this[R],16);return m>Number.MAX_SAFE_INTEGER?Infinity:m},P.decimalFloatingPoint=function(R){return parseFloat(this[R])},P.optionalFloat=function(R,m){var v=this[R];return v?parseFloat(v):m},P.enumeratedString=function(R){return this[R]},P.bool=function(R){return this[R]==="YES"},P.decimalResolution=function(R){var m=V.exec(this[R]);return m===null?void 0:{width:parseInt(m[1],10),height:parseInt(m[2],10)}},X.parseAttrList=function(R){var m,v={},u='"';for(F.lastIndex=0;(m=F.exec(R))!==null;){var s=m[2];s.indexOf(u)===0&&s.lastIndexOf(u)===s.length-1&&(s=s.slice(1,-1)),v[m[1]]=s}return v},X}()},"./src/utils/binary-search.ts":function(se,G,D){"use strict";D.r(G);var V={search:function(O,X){for(var P=0,e=O.length-1,R=null,m=null;P<=e;){R=(P+e)/2|0,m=O[R];var v=X(m);if(v>0)P=R+1;else if(v<0)e=R-1;else return m}return null}};G.default=V},"./src/utils/buffer-helper.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"BufferHelper",function(){return O});var V=D("./src/utils/logger.ts"),F={length:0,start:function(){return 0},end:function(){return 0}},O=function(){function X(){}return X.isBuffered=function(e,R){try{if(e){for(var m=X.getBuffered(e),v=0;v<m.length;v++)if(R>=m.start(v)&&R<=m.end(v))return!0}}catch(u){}return!1},X.bufferInfo=function(e,R,m){try{if(e){var v=X.getBuffered(e),u=[],s;for(s=0;s<v.length;s++)u.push({start:v.start(s),end:v.end(s)});return this.bufferedInfo(u,R,m)}}catch(a){}return{len:0,start:R,end:R,nextStart:void 0}},X.bufferedInfo=function(e,R,m){R=Math.max(0,R),e.sort(function(y,B){var C=y.start-B.start;return C||B.end-y.end});var v=[];if(m)for(var u=0;u<e.length;u++){var s=v.length;if(s){var a=v[s-1].end;e[u].start-a<m?e[u].end>a&&(v[s-1].end=e[u].end):v.push(e[u])}else v.push(e[u])}else v=e;for(var A=0,o,i=R,r=R,t=0;t<v.length;t++){var E=v[t].start,_=v[t].end;if(R+m>=E&&R<_)i=E,r=_,A=r-R;else if(R+m<E){o=E;break}}return{len:A,start:i||0,end:r||0,nextStart:o}},X.getBuffered=function(e){try{return e.buffered}catch(R){return V.logger.log("failed to get media.buffered",R),F}},X}()},"./src/utils/cea-608-parser.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"Row",function(){return r}),D.d(G,"CaptionScreen",function(){return t});var V=D("./src/utils/logger.ts"),F={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},O=function(n){var l=n;return F.hasOwnProperty(n)&&(l=F[n]),String.fromCharCode(l)},X=15,P=100,e={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},R={17:2,18:4,21:6,22:8,23:10,19:13,20:15},m={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},v={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],s;(function(d){d[d.ERROR=0]="ERROR",d[d.TEXT=1]="TEXT",d[d.WARNING=2]="WARNING",d[d.INFO=2]="INFO",d[d.DEBUG=3]="DEBUG",d[d.DATA=3]="DATA"})(s||(s={}));var a=function(){function d(){this.time=null,this.verboseLevel=s.ERROR}var n=d.prototype;return n.log=function(c,b){this.verboseLevel>=c&&V.logger.log(this.time+" ["+c+"] "+b)},d}(),A=function(n){for(var l=[],c=0;c<n.length;c++)l.push(n[c].toString(16));return l},o=function(){function d(l,c,b,g,h){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=l||"white",this.underline=c||!1,this.italics=b||!1,this.background=g||"black",this.flash=h||!1}var n=d.prototype;return n.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},n.setStyles=function(c){for(var b=["foreground","underline","italics","background","flash"],g=0;g<b.length;g++){var h=b[g];c.hasOwnProperty(h)&&(this[h]=c[h])}},n.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},n.equals=function(c){return this.foreground===c.foreground&&this.underline===c.underline&&this.italics===c.italics&&this.background===c.background&&this.flash===c.flash},n.copy=function(c){this.foreground=c.foreground,this.underline=c.underline,this.italics=c.italics,this.background=c.background,this.flash=c.flash},n.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},d}(),i=function(){function d(l,c,b,g,h,L){this.uchar=void 0,this.penState=void 0,this.uchar=l||" ",this.penState=new o(c,b,g,h,L)}var n=d.prototype;return n.reset=function(){this.uchar=" ",this.penState.reset()},n.setChar=function(c,b){this.uchar=c,this.penState.copy(b)},n.setPenState=function(c){this.penState.copy(c)},n.equals=function(c){return this.uchar===c.uchar&&this.penState.equals(c.penState)},n.copy=function(c){this.uchar=c.uchar,this.penState.copy(c.penState)},n.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},d}(),r=function(){function d(l){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var c=0;c<P;c++)this.chars.push(new i);this.logger=l,this.pos=0,this.currPenState=new o}var n=d.prototype;return n.equals=function(c){for(var b=!0,g=0;g<P;g++)if(!this.chars[g].equals(c.chars[g])){b=!1;break}return b},n.copy=function(c){for(var b=0;b<P;b++)this.chars[b].copy(c.chars[b])},n.isEmpty=function(){for(var c=!0,b=0;b<P;b++)if(!this.chars[b].isEmpty()){c=!1;break}return c},n.setCursor=function(c){this.pos!==c&&(this.pos=c),this.pos<0?(this.logger.log(s.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>P&&(this.logger.log(s.DEBUG,"Too large cursor position "+this.pos),this.pos=P)},n.moveCursor=function(c){var b=this.pos+c;if(c>1)for(var g=this.pos+1;g<b+1;g++)this.chars[g].setPenState(this.currPenState);this.setCursor(b)},n.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},n.insertChar=function(c){c>=144&&this.backSpace();var b=O(c);if(this.pos>=P){this.logger.log(s.ERROR,"Cannot insert "+c.toString(16)+" ("+b+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(b,this.currPenState),this.moveCursor(1)},n.clearFromPos=function(c){var b;for(b=c;b<P;b++)this.chars[b].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 c=[],b=!0,g=0;g<P;g++){var h=this.chars[g].uchar;h!==" "&&(b=!1),c.push(h)}return b?"":c.join("")},n.setPenStyles=function(c){this.currPenState.setStyles(c);var b=this.chars[this.pos];b.setPenState(this.currPenState)},d}(),t=function(){function d(l){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var c=0;c<X;c++)this.rows.push(new r(l));this.logger=l,this.currRow=X-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var n=d.prototype;return n.reset=function(){for(var c=0;c<X;c++)this.rows[c].clear();this.currRow=X-1},n.equals=function(c){for(var b=!0,g=0;g<X;g++)if(!this.rows[g].equals(c.rows[g])){b=!1;break}return b},n.copy=function(c){for(var b=0;b<X;b++)this.rows[b].copy(c.rows[b])},n.isEmpty=function(){for(var c=!0,b=0;b<X;b++)if(!this.rows[b].isEmpty()){c=!1;break}return c},n.backSpace=function(){var c=this.rows[this.currRow];c.backSpace()},n.clearToEndOfRow=function(){var c=this.rows[this.currRow];c.clearToEndOfRow()},n.insertChar=function(c){var b=this.rows[this.currRow];b.insertChar(c)},n.setPen=function(c){var b=this.rows[this.currRow];b.setPenStyles(c)},n.moveCursor=function(c){var b=this.rows[this.currRow];b.moveCursor(c)},n.setCursor=function(c){this.logger.log(s.INFO,"setCursor: "+c);var b=this.rows[this.currRow];b.setCursor(c)},n.setPAC=function(c){this.logger.log(s.INFO,"pacData = "+JSON.stringify(c));var b=c.row-1;if(this.nrRollUpRows&&b<this.nrRollUpRows-1&&(b=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==b){for(var g=0;g<X;g++)this.rows[g].clear();var h=this.currRow+1-this.nrRollUpRows,L=this.lastOutputScreen;if(L){var N=L.rows[h].cueStartTime,T=this.logger.time;if(N&&T!==null&&N<T)for(var M=0;M<this.nrRollUpRows;M++)this.rows[b-this.nrRollUpRows+M+1].copy(L.rows[h+M])}}this.currRow=b;var W=this.rows[this.currRow];if(c.indent!==null){var U=c.indent,Y=Math.max(U-1,0);W.setCursor(c.indent),c.color=W.chars[Y].penState.foreground}var ne={foreground:c.color,underline:c.underline,italics:c.italics,background:"black",flash:!1};this.setPen(ne)},n.setBkgData=function(c){this.logger.log(s.INFO,"bkgData = "+JSON.stringify(c)),this.backSpace(),this.setPen(c),this.insertChar(32)},n.setRollUpRows=function(c){this.nrRollUpRows=c},n.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(s.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(s.TEXT,this.getDisplayText());var c=this.currRow+1-this.nrRollUpRows,b=this.rows.splice(c,1)[0];b.clear(),this.rows.splice(this.currRow,0,b),this.logger.log(s.INFO,"Rolling up")},n.getDisplayText=function(c){c=c||!1;for(var b=[],g="",h=-1,L=0;L<X;L++){var N=this.rows[L].getTextString();N&&(h=L+1,c?b.push("Row "+h+": '"+N+"'"):b.push(N.trim()))}return b.length>0&&(c?g="["+b.join(" | ")+"]":g=b.join(`
|
|
`)),g},n.getTextAndFormat=function(){return this.rows},d}(),E=function(){function d(l,c,b){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=l,this.outputFilter=c,this.mode=null,this.verbose=0,this.displayedMemory=new t(b),this.nonDisplayedMemory=new t(b),this.lastOutputScreen=new t(b),this.currRollUpRow=this.displayedMemory.rows[X-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=b}var n=d.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[X-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},n.getHandler=function(){return this.outputFilter},n.setHandler=function(c){this.outputFilter=c},n.setPAC=function(c){this.writeScreen.setPAC(c)},n.setBkgData=function(c){this.writeScreen.setBkgData(c)},n.setMode=function(c){if(c===this.mode)return;this.mode=c,this.logger.log(s.INFO,"MODE="+c),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=c},n.insertChars=function(c){for(var b=0;b<c.length;b++)this.writeScreen.insertChar(c[b]);var g=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(s.INFO,g+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(s.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},n.ccRCL=function(){this.logger.log(s.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},n.ccBS=function(){if(this.logger.log(s.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},n.ccAOF=function(){},n.ccAON=function(){},n.ccDER=function(){this.logger.log(s.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},n.ccRU=function(c){this.logger.log(s.INFO,"RU("+c+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(c)},n.ccFON=function(){this.logger.log(s.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},n.ccRDC=function(){this.logger.log(s.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},n.ccTR=function(){this.logger.log(s.INFO,"TR"),this.setMode("MODE_TEXT")},n.ccRTD=function(){this.logger.log(s.INFO,"RTD"),this.setMode("MODE_TEXT")},n.ccEDM=function(){this.logger.log(s.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},n.ccCR=function(){this.logger.log(s.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},n.ccENM=function(){this.logger.log(s.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},n.ccEOC=function(){if(this.logger.log(s.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var c=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=c,this.writeScreen=this.nonDisplayedMemory,this.logger.log(s.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},n.ccTO=function(c){this.logger.log(s.INFO,"TO("+c+") - Tab Offset"),this.writeScreen.moveCursor(c)},n.ccMIDROW=function(c){var b={flash:!1};if(b.underline=c%2===1,b.italics=c>=46,b.italics)b.foreground="white";else{var g=Math.floor(c/2)-16,h=["white","green","blue","cyan","red","yellow","magenta"];b.foreground=h[g]}this.logger.log(s.INFO,"MIDROW: "+JSON.stringify(b)),this.writeScreen.setPen(b)},n.outputDataUpdate=function(c){c===void 0&&(c=!1);var b=this.logger.time;if(b===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=b:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,b,this.lastOutputScreen),c&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:b),this.lastOutputScreen.copy(this.displayedMemory))},n.cueSplitAtTime=function(c){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,c,this.displayedMemory),this.cueStartTime=c))},d}(),_=function(){function d(l,c,b){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var g=new a;this.channels=[null,new E(l,c,g),new E(l+1,b,g)],this.cmdHistory=C(),this.logger=g}var n=d.prototype;return n.getHandler=function(c){return this.channels[c].getHandler()},n.setHandler=function(c,b){this.channels[c].setHandler(b)},n.addData=function(c,b){var g,h,L,N=!1;this.logger.time=c;for(var T=0;T<b.length;T+=2){if(h=b[T]&127,L=b[T+1]&127,h===0&&L===0)continue;if(this.logger.log(s.DATA,"["+A([b[T],b[T+1]])+"] -> ("+A([h,L])+")"),g=this.parseCmd(h,L),g||(g=this.parseMidrow(h,L)),g||(g=this.parsePAC(h,L)),g||(g=this.parseBackgroundAttributes(h,L)),!g&&(N=this.parseChars(h,L),N)){var M=this.currentChannel;if(M&&M>0){var W=this.channels[M];W.insertChars(N)}else this.logger.log(s.WARNING,"No channel found yet. TEXT-MODE?")}!g&&!N&&this.logger.log(s.WARNING,"Couldn't parse cleaned data "+A([h,L])+" orig: "+A([b[T],b[T+1]]))}},n.parseCmd=function(c,b){var g=this.cmdHistory,h=(c===20||c===28||c===21||c===29)&&b>=32&&b<=47,L=(c===23||c===31)&&b>=33&&b<=35;if(!(h||L))return!1;if(B(c,b,g))return y(null,null,g),this.logger.log(s.DEBUG,"Repeated command ("+A([c,b])+") is dropped"),!0;var N=c===20||c===21||c===23?1:2,T=this.channels[N];return c===20||c===21||c===28||c===29?b===32?T.ccRCL():b===33?T.ccBS():b===34?T.ccAOF():b===35?T.ccAON():b===36?T.ccDER():b===37?T.ccRU(2):b===38?T.ccRU(3):b===39?T.ccRU(4):b===40?T.ccFON():b===41?T.ccRDC():b===42?T.ccTR():b===43?T.ccRTD():b===44?T.ccEDM():b===45?T.ccCR():b===46?T.ccENM():b===47&&T.ccEOC():T.ccTO(b-32),y(c,b,g),this.currentChannel=N,!0},n.parseMidrow=function(c,b){var g=0;if((c===17||c===25)&&b>=32&&b<=47){if(c===17?g=1:g=2,g!==this.currentChannel)return this.logger.log(s.ERROR,"Mismatch channel in midrow parsing"),!1;var h=this.channels[g];return h?(h.ccMIDROW(b),this.logger.log(s.DEBUG,"MIDROW ("+A([c,b])+")"),!0):!1}return!1},n.parsePAC=function(c,b){var g,h=this.cmdHistory,L=(c>=17&&c<=23||c>=25&&c<=31)&&b>=64&&b<=127,N=(c===16||c===24)&&b>=64&&b<=95;if(!(L||N))return!1;if(B(c,b,h))return y(null,null,h),!0;var T=c<=23?1:2;b>=64&&b<=95?g=T===1?e[c]:m[c]:g=T===1?R[c]:v[c];var M=this.channels[T];return M?(M.setPAC(this.interpretPAC(g,b)),y(c,b,h),this.currentChannel=T,!0):!1},n.interpretPAC=function(c,b){var g,h={color:null,italics:!1,indent:null,underline:!1,row:c};return b>95?g=b-96:g=b-64,h.underline=(g&1)===1,g<=13?h.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(g/2)]:g<=15?(h.italics=!0,h.color="white"):h.indent=Math.floor((g-16)/2)*4,h},n.parseChars=function(c,b){var g,h=null,L=null;if(c>=25?(g=2,L=c-8):(g=1,L=c),L>=17&&L<=19){var N;L===17?N=b+80:L===18?N=b+112:N=b+144,this.logger.log(s.INFO,"Special char '"+O(N)+"' in channel "+g),h=[N]}else c>=32&&c<=127&&(h=b===0?[c]:[c,b]);if(h){var T=A(h);this.logger.log(s.DEBUG,"Char codes = "+T.join(",")),y(c,b,this.cmdHistory)}return h},n.parseBackgroundAttributes=function(c,b){var g=(c===16||c===24)&&b>=32&&b<=47,h=(c===23||c===31)&&b>=45&&b<=47;if(!(g||h))return!1;var L,N={};c===16||c===24?(L=Math.floor((b-32)/2),N.background=u[L],b%2===1&&(N.background=N.background+"_semi")):b===45?N.background="transparent":(N.foreground="black",b===47&&(N.underline=!0));var T=c<=23?1:2,M=this.channels[T];return M.setBkgData(N),y(c,b,this.cmdHistory),!0},n.reset=function(){for(var c=0;c<Object.keys(this.channels).length;c++){var b=this.channels[c];b&&b.reset()}this.cmdHistory=C()},n.cueSplitAtTime=function(c){for(var b=0;b<this.channels.length;b++){var g=this.channels[b];g&&g.cueSplitAtTime(c)}},d}();function y(d,n,l){l.a=d,l.b=n}function B(d,n,l){return l.a===d&&l.b===n}function C(){return{a:null,b:null}}G.default=_},"./src/utils/codecs.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"isCodecType",function(){return F}),D.d(G,"isCodecSupportedInMp4",function(){return O});var V={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,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,dvav:!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 F(X,P){var e=V[P];return!!e&&e[X.slice(0,4)]===!0}function O(X,P){return MediaSource.isTypeSupported((P||"video")+'/mp4;codecs="'+X+'"')}},"./src/utils/cues.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/vttparser.ts"),F=D("./src/utils/webvtt-parser.ts"),O=D("./src/utils/texttrack-utils.ts"),X=/\s/,P={newCue:function(R,m,v,u){for(var s=[],a,A,o,i,r,t=self.VTTCue||self.TextTrackCue,E=0;E<u.rows.length;E++)if(a=u.rows[E],o=!0,i=0,r="",!a.isEmpty()){for(var _=0;_<a.chars.length;_++)X.test(a.chars[_].uchar)&&o?i++:(r+=a.chars[_].uchar,o=!1);a.cueStartTime=m,m===v&&(v+=1e-4),i>=16?i--:i++;var y=Object(V.fixLineBreaks)(r.trim()),B=Object(F.generateCueId)(m,v,y);(!R||!R.cues||!R.cues.getCueById(B))&&(A=new t(m,v,y),A.id=B,A.line=E+1,A.align="left",A.position=10+Math.min(80,Math.floor(i*8/32)*10),s.push(A))}return R&&s.length&&(s.sort(function(C,d){return C.line==="auto"||d.line==="auto"?0:C.line>8&&d.line>8?d.line-C.line:C.line-d.line}),s.forEach(function(C){return Object(O.addCueToTrack)(R,C)})),s}};G.default=P},"./src/utils/discontinuities.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"findFirstFragWithCC",function(){return X}),D.d(G,"shouldAlignOnDiscontinuities",function(){return P}),D.d(G,"findDiscontinuousReferenceFrag",function(){return e}),D.d(G,"adjustSlidingStart",function(){return m}),D.d(G,"alignStream",function(){return v}),D.d(G,"alignPDT",function(){return s}),D.d(G,"alignFragmentByPDTDelta",function(){return a}),D.d(G,"alignMediaPlaylistByPDT",function(){return A});var V=D("./src/polyfills/number.ts"),F=D("./src/utils/logger.ts"),O=D("./src/controller/level-helper.ts");function X(o,i){for(var r=null,t=0,E=o.length;t<E;t++){var _=o[t];if(_&&_.cc===i){r=_;break}}return r}function P(o,i,r){return!!(i.details&&(r.endCC>r.startCC||o&&o.cc<r.startCC))}function e(o,i){var r=o.fragments,t=i.fragments;if(!t.length||!r.length){F.logger.log("No fragments to align");return}var E=X(r,t[0].cc);if(!E||E&&!E.startPTS){F.logger.log("No frag in previous level to align on");return}return E}function R(o,i){if(o){var r=o.start+i;o.start=o.startPTS=r,o.endPTS=r+o.duration}}function m(o,i){for(var r=i.fragments,t=0,E=r.length;t<E;t++)R(r[t],o);i.fragmentHint&&R(i.fragmentHint,o),i.alignedSliding=!0}function v(o,i,r){if(!i)return;u(o,r,i),!r.alignedSliding&&i.details&&s(r,i.details),!r.alignedSliding&&i.details&&!r.skippedSegments&&Object(O.adjustSliding)(i.details,r)}function u(o,i,r){if(P(o,r,i)){var t=e(r.details,i);t&&Object(V.isFiniteNumber)(t.start)&&(F.logger.log("Adjusting PTS using last level due to CC increase within current level "+i.url),m(t.start,i))}}function s(o,i){if(!i.fragments.length||!o.hasProgramDateTime||!i.hasProgramDateTime)return;var r=i.fragments[0].programDateTime,t=o.fragments[0].programDateTime,E=(t-r)/1e3+i.fragments[0].start;E&&Object(V.isFiniteNumber)(E)&&(F.logger.log("Adjusting PTS using programDateTime delta "+(t-r)+"ms, sliding:"+E.toFixed(3)+" "+o.url+" "),m(E,o))}function a(o,i){var r=o.programDateTime;if(!r)return;var t=(r-i)/1e3;o.start=o.startPTS=t,o.endPTS=t+o.duration}function A(o,i){if(!i.fragments.length||!o.hasProgramDateTime||!i.hasProgramDateTime)return;var r=i.fragments[0].programDateTime,t=i.fragments[0].start,E=r-t*1e3;o.fragments.forEach(function(_){a(_,E)}),o.fragmentHint&&a(o.fragmentHint,E),o.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/ewma.ts"),F=function(){function O(P,e,R){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=R,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new V.default(P),this.fast_=new V.default(e)}var X=O.prototype;return X.update=function(e,R){var m=this.slow_,v=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new V.default(e,m.getEstimate(),m.getTotalWeight())),this.fast_.halfLife!==R&&(this.fast_=new V.default(R,v.getEstimate(),v.getTotalWeight()))},X.sample=function(e,R){e=Math.max(e,this.minDelayMs_);var m=8*R,v=e/1e3,u=m/v;this.fast_.sample(v,u),this.slow_.sample(v,u)},X.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},X.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},X.destroy=function(){},O}();G.default=F},"./src/utils/ewma.ts":function(se,G,D){"use strict";D.r(G);var V=function(){function F(X,P,e){P===void 0&&(P=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=X,this.alpha_=X?Math.exp(Math.log(.5)/X):0,this.estimate_=P,this.totalWeight_=e}var O=F.prototype;return O.sample=function(P,e){var R=Math.pow(this.alpha_,P);this.estimate_=e*(1-R)+R*this.estimate_,this.totalWeight_+=P},O.getTotalWeight=function(){return this.totalWeight_},O.getEstimate=function(){if(this.alpha_){var P=1-Math.pow(this.alpha_,this.totalWeight_);if(P)return this.estimate_/P}return this.estimate_},F}();G.default=V},"./src/utils/fetch-loader.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"fetchSupported",function(){return a});var V=D("./src/polyfills/number.ts"),F=D("./src/loader/load-stats.ts"),O=D("./src/demux/chunk-cache.ts");function X(t,E){t.prototype=Object.create(E.prototype),t.prototype.constructor=t,v(t,E)}function P(t){var E=typeof Map=="function"?new Map:void 0;return P=function(y){if(y===null||!m(y))return y;if(typeof y!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E!="undefined"){if(E.has(y))return E.get(y);E.set(y,B)}function B(){return e(y,arguments,u(this).constructor)}return B.prototype=Object.create(y.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),v(B,y)},P(t)}function e(t,E,_){return R()?e=Reflect.construct:e=function(B,C,d){var n=[null];n.push.apply(n,C);var l=Function.bind.apply(B,n),c=new l;return d&&v(c,d.prototype),c},e.apply(null,arguments)}function R(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function m(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function v(t,E){return v=Object.setPrototypeOf||function(y,B){return y.__proto__=B,y},v(t,E)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},u(t)}function s(){return s=Object.assign||function(t){for(var E=1;E<arguments.length;E++){var _=arguments[E];for(var y in _)Object.prototype.hasOwnProperty.call(_,y)&&(t[y]=_[y])}return t},s.apply(this,arguments)}function a(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var A=function(){function t(_){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=_.fetchSetup||i,this.controller=new self.AbortController,this.stats=new F.LoadStats}var E=t.prototype;return E.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},E.abortInternal=function(){var y=this.response;(!y||!y.ok)&&(this.stats.aborted=!0,this.controller.abort())},E.abort=function(){var y;this.abortInternal(),(y=this.callbacks)!==null&&y!==void 0&&y.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},E.load=function(y,B,C){var d=this,n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();var l=o(y,this.controller.signal),c=C.onProgress,b=y.responseType==="arraybuffer",g=b?"byteLength":"length";this.context=y,this.config=B,this.callbacks=C,this.request=this.fetchSetup(y,l),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){d.abortInternal(),C.onTimeout(n,y,d.response)},B.timeout),self.fetch(this.request).then(function(h){if(d.response=d.loader=h,!h.ok){var L=h.status,N=h.statusText;throw new r(N||"fetch, bad network response",L,h)}return n.loading.first=Math.max(self.performance.now(),n.loading.start),n.total=parseInt(h.headers.get("Content-Length")||"0"),c&&Object(V.isFiniteNumber)(B.highWaterMark)?d.loadProgressively(h,n,y,B.highWaterMark,c):b?h.arrayBuffer():h.text()}).then(function(h){var L=d.response;self.clearTimeout(d.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first),n.loaded=n.total=h[g];var N={url:L.url,data:h};c&&!Object(V.isFiniteNumber)(B.highWaterMark)&&c(n,y,h,L),C.onSuccess(N,n,y,L)}).catch(function(h){if(self.clearTimeout(d.requestTimeout),n.aborted)return;var L=h.code||0;C.onError({code:L,text:h.message},y,h.details)})},E.getCacheAge=function(){var y=null;if(this.response){var B=this.response.headers.get("age");y=B?parseFloat(B):null}return y},E.loadProgressively=function(y,B,C,d,n){d===void 0&&(d=0);var l=new O.default,c=y.body.getReader(),b=function g(){return c.read().then(function(h){if(h.done)return l.dataLength&&n(B,C,l.flush(),y),Promise.resolve(new ArrayBuffer(0));var L=h.value,N=L.length;return B.loaded+=N,N<d||l.dataLength?(l.push(L),l.dataLength>=d&&n(B,C,l.flush(),y)):n(B,C,L,y),g()}).catch(function(){return Promise.reject()})};return b()},t}();function o(t,E){var _={method:"GET",mode:"cors",credentials:"same-origin",signal:E,headers:new self.Headers(s({},t.headers))};return t.rangeEnd&&_.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),_}function i(t,E){return new self.Request(t.url,E)}var r=function(t){X(E,t);function E(_,y,B){var C;return C=t.call(this,_)||this,C.code=void 0,C.details=void 0,C.code=y,C.details=B,C}return E}(P(Error));G.default=A},"./src/utils/imsc1-ttml-parser.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"IMSC1_CODEC",function(){return m}),D.d(G,"parseIMSC1",function(){return a});var V=D("./src/utils/mp4-tools.ts"),F=D("./src/utils/vttparser.ts"),O=D("./src/utils/vttcue.ts"),X=D("./src/demux/id3.ts"),P=D("./src/utils/timescale-conversion.ts"),e=D("./src/utils/webvtt-parser.ts");function R(){return R=Object.assign||function(d){for(var n=1;n<arguments.length;n++){var l=arguments[n];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(d[c]=l[c])}return d},R.apply(this,arguments)}var m="stpp.ttml.im1t",v=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,u=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,s={left:"start",center:"center",right:"end",start:"start",end:"end"};function a(d,n,l,c,b){var g=Object(V.findBox)(new Uint8Array(d),["mdat"]);if(g.length===0){b(new Error("Could not parse IMSC1 mdat"));return}var h=g[0],L=Object(X.utf8ArrayToStr)(new Uint8Array(d,h.start,h.end-h.start)),N=Object(P.toTimescaleFromScale)(n,1,l);try{c(A(L,N))}catch(T){b(T)}}function A(d,n){var l=new DOMParser,c=l.parseFromString(d,"text/xml"),b=c.getElementsByTagName("tt")[0];if(!b)throw new Error("Invalid ttml");var g={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},h=Object.keys(g).reduce(function(W,U){return W[U]=b.getAttribute("ttp:"+U)||g[U],W},{}),L=b.getAttribute("xml:space")!=="preserve",N=i(o(b,"styling","style")),T=i(o(b,"layout","region")),M=o(b,"body","[begin]");return[].map.call(M,function(W){var U=r(W,L);if(!U||!W.hasAttribute("begin"))return null;var Y=y(W.getAttribute("begin"),h),ne=y(W.getAttribute("dur"),h),me=y(W.getAttribute("end"),h);if(Y===null)throw _(W);if(me===null){if(ne===null)throw _(W);me=Y+ne}var ge=new O.default(Y-n,me-n,U);ge.id=Object(e.generateCueId)(ge.startTime,ge.endTime,ge.text);var Oe=T[W.getAttribute("region")],Se=N[W.getAttribute("style")];ge.position=10,ge.size=80;var Be=t(Oe,Se),Ne=Be.textAlign;if(Ne){var ke=s[Ne];ke&&(ge.lineAlign=ke),ge.align=Ne}return R(ge,Be),ge}).filter(function(W){return W!==null})}function o(d,n,l){var c=d.getElementsByTagName(n)[0];return c?[].slice.call(c.querySelectorAll(l)):[]}function i(d){return d.reduce(function(n,l){var c=l.getAttribute("xml:id");return c&&(n[c]=l),n},{})}function r(d,n){return[].slice.call(d.childNodes).reduce(function(l,c,b){var g;return c.nodeName==="br"&&b?l+`
|
|
`:(g=c.childNodes)!==null&&g!==void 0&&g.length?r(c,n):n?l+c.textContent.trim().replace(/\s+/g," "):l+c.textContent},"")}function t(d,n){var l="http://www.w3.org/ns/ttml#styling",c=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return c.reduce(function(b,g){var h=E(n,l,g)||E(d,l,g);return h&&(b[g]=h),b},{})}function E(d,n,l){return d.hasAttributeNS(n,l)?d.getAttributeNS(n,l):null}function _(d){return new Error("Could not parse ttml timestamp "+d)}function y(d,n){if(!d)return null;var l=Object(F.parseTimeStamp)(d);return l===null&&(v.test(d)?l=B(d,n):u.test(d)&&(l=C(d,n))),l}function B(d,n){var l=v.exec(d),c=(l[4]|0)+(l[5]|0)/n.subFrameRate;return(l[1]|0)*3600+(l[2]|0)*60+(l[3]|0)+c/n.frameRate}function C(d,n){var l=u.exec(d),c=Number(l[1]),b=l[2];switch(b){case"h":return c*3600;case"m":return c*60;case"ms":return c*1e3;case"f":return c/n.frameRate;case"t":return c/n.tickRate}return c}},"./src/utils/logger.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"enableLogs",function(){return e}),D.d(G,"logger",function(){return R});var V=function(){},F={trace:V,debug:V,log:V,warn:V,info:V,error:V},O=F;function X(m){var v=self.console[m];return v?v.bind(self.console,"["+m+"] >"):V}function P(m){for(var v=arguments.length,u=new Array(v>1?v-1:0),s=1;s<v;s++)u[s-1]=arguments[s];u.forEach(function(a){O[a]=m[a]?m[a].bind(m):X(a)})}function e(m){if(self.console&&m===!0||typeof m=="object"){P(m,"debug","log","info","warn","error");try{O.log()}catch(v){O=F}}else O=F}var R=O},"./src/utils/mediakeys-helper.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"KeySystems",function(){return V}),D.d(G,"requestMediaKeySystemAccess",function(){return F});var V;(function(O){O.WIDEVINE="com.widevine.alpha",O.PLAYREADY="com.microsoft.playready"})(V||(V={}));var F=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"getMediaSource",function(){return V});function V(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"bin2str",function(){return P}),D.d(G,"readUint16",function(){return e}),D.d(G,"readUint32",function(){return R}),D.d(G,"writeUint32",function(){return m}),D.d(G,"findBox",function(){return v}),D.d(G,"parseSegmentIndex",function(){return u}),D.d(G,"parseInitSegment",function(){return s}),D.d(G,"getStartDTS",function(){return a}),D.d(G,"getDuration",function(){return A}),D.d(G,"computeRawDurationFromSamples",function(){return o}),D.d(G,"offsetStartDTS",function(){return i}),D.d(G,"segmentValidRange",function(){return r}),D.d(G,"appendUint8Array",function(){return t});var V=D("./src/utils/typed-array.ts"),F=D("./src/loader/fragment.ts"),O=Math.pow(2,32)-1,X=[].push;function P(E){return String.fromCharCode.apply(null,E)}function e(E,_){"data"in E&&(_+=E.start,E=E.data);var y=E[_]<<8|E[_+1];return y<0?65536+y:y}function R(E,_){"data"in E&&(_+=E.start,E=E.data);var y=E[_]<<24|E[_+1]<<16|E[_+2]<<8|E[_+3];return y<0?4294967296+y:y}function m(E,_,y){"data"in E&&(_+=E.start,E=E.data),E[_]=y>>24,E[_+1]=y>>16&255,E[_+2]=y>>8&255,E[_+3]=y&255}function v(E,_){var y=[];if(!_.length)return y;var B,C,d;"data"in E?(B=E.data,C=E.start,d=E.end):(B=E,C=0,d=B.byteLength);for(var n=C;n<d;){var l=R(B,n),c=P(B.subarray(n+4,n+8)),b=l>1?n+l:d;if(c===_[0])if(_.length===1)y.push({data:B,start:n+8,end:b});else{var g=v({data:B,start:n+8,end:b},_.slice(1));g.length&&X.apply(y,g)}n=b}return y}function u(E){var _=v(E,["moov"]),y=_[0],B=y?y.end:null,C=v(E,["sidx"]);if(!C||!C[0])return null;var d=[],n=C[0],l=n.data[0],c=l===0?8:16,b=R(n,c);c+=4;var g=0,h=0;l===0?c+=8:c+=16,c+=2;var L=n.end+h,N=e(n,c);c+=2;for(var T=0;T<N;T++){var M=c,W=R(n,M);M+=4;var U=W&2147483647,Y=(W&2147483648)>>>31;if(Y===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ne=R(n,M);M+=4,d.push({referenceSize:U,subsegmentDuration:ne,info:{duration:ne/b,start:L,end:L+U-1}}),L+=U,M+=4,c=M}return{earliestPresentationTime:g,timescale:b,version:l,referencesCount:N,references:d,moovEndOffset:B}}function s(E){for(var _=[],y=v(E,["moov","trak"]),B=0;B<y.length;B++){var C=y[B],d=v(C,["tkhd"])[0];if(d){var n=d.data[d.start],l=n===0?12:20,c=R(d,l),b=v(C,["mdia","mdhd"])[0];if(b){n=b.data[b.start],l=n===0?12:20;var g=R(b,l),h=v(C,["mdia","hdlr"])[0];if(h){var L=P(h.data.subarray(h.start+8,h.start+12)),N={soun:F.ElementaryStreamTypes.AUDIO,vide:F.ElementaryStreamTypes.VIDEO}[L];if(N){var T=v(C,["mdia","minf","stbl","stsd"])[0],M=void 0;T&&(M=P(T.data.subarray(T.start+12,T.start+16))),_[c]={timescale:g,type:N},_[N]={timescale:g,id:c,codec:M}}}}}}var W=v(E,["moov","mvex","trex"]);return W.forEach(function(U){var Y=R(U,4),ne=_[Y];ne&&(ne.default={duration:R(U,12),flags:R(U,20)})}),_}function a(E,_){return v(_,["moof","traf"]).reduce(function(y,B){var C=v(B,["tfdt"])[0],d=C.data[C.start],n=v(B,["tfhd"]).reduce(function(l,c){var b=R(c,4),g=E[b];if(g){var h=R(C,4);d===1&&(h*=Math.pow(2,32),h+=R(C,8));var L=g.timescale||9e4,N=h/L;if(isFinite(N)&&(l===null||N<l))return N}return l},null);return n!==null&&isFinite(n)&&(y===null||n<y)?n:y},null)||0}function A(E,_){for(var y=0,B=0,C=0,d=v(E,["moof","traf"]),n=0;n<d.length;n++){var l=d[n],c=v(l,["tfhd"])[0],b=R(c,4),g=_[b];if(!g)continue;var h=g.default,L=R(c,0)|(h==null?void 0:h.flags),N=h==null?void 0:h.duration;L&8&&(L&2?N=R(c,12):N=R(c,8));for(var T=g.timescale||9e4,M=v(l,["trun"]),W=0;W<M.length;W++){if(N){var U=R(M[W],4);y=N*U}else y=o(M[W]);g.type===F.ElementaryStreamTypes.VIDEO?B+=y/T:g.type===F.ElementaryStreamTypes.AUDIO&&(C+=y/T)}}if(B===0&&C===0){var Y=u(E);if(Y!=null&&Y.references)return Y.references.reduce(function(ne,me){return ne+me.info.duration||0},0)}return B||C}function o(E){var _=R(E,0),y=8;_&1&&(y+=4),_&4&&(y+=4);for(var B=0,C=R(E,4),d=0;d<C;d++){if(_&256){var n=R(E,y);B+=n,y+=4}_&512&&(y+=4),_&1024&&(y+=4),_&2048&&(y+=4)}return B}function i(E,_,y){v(_,["moof","traf"]).forEach(function(B){v(B,["tfhd"]).forEach(function(C){var d=R(C,4),n=E[d];if(!n)return;var l=n.timescale||9e4;v(B,["tfdt"]).forEach(function(c){var b=c.data[c.start],g=R(c,4);if(b===0)m(c,4,g-y*l);else{g*=Math.pow(2,32),g+=R(c,8),g-=y*l,g=Math.max(g,0);var h=Math.floor(g/(O+1)),L=Math.floor(g%(O+1));m(c,4,h),m(c,8,L)}})})})}function r(E){var _={valid:null,remainder:null},y=v(E,["moof"]);if(y){if(y.length<2)return _.remainder=E,_}else return _;var B=y[y.length-1];return _.valid=Object(V.sliceUint8)(E,0,B.start-8),_.remainder=Object(V.sliceUint8)(E,B.start-8),_}function t(E,_){var y=new Uint8Array(E.length+_.length);return y.set(E),y.set(_,E.length),y}},"./src/utils/output-filter.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"default",function(){return V});var V=function(){function F(X,P){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=X,this.trackName=P}var O=F.prototype;return O.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},O.newCue=function(P,e,R){(this.startTime===null||this.startTime>P)&&(this.startTime=P),this.endTime=e,this.screen=R,this.timelineController.createCaptionsTrack(this.trackName)},O.reset=function(){this.cueRanges=[]},F}()},"./src/utils/texttrack-utils.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"sendAddTrackEvent",function(){return F}),D.d(G,"addCueToTrack",function(){return O}),D.d(G,"clearCurrentCues",function(){return X}),D.d(G,"removeCuesInRange",function(){return P}),D.d(G,"getCuesInRange",function(){return R});var V=D("./src/utils/logger.ts");function F(m,v){var u;try{u=new Event("addtrack")}catch(s){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=m,v.dispatchEvent(u)}function O(m,v){var u=m.mode;if(u==="disabled"&&(m.mode="hidden"),m.cues&&!m.cues.getCueById(v.id))try{if(m.addCue(v),!m.cues.getCueById(v.id))throw new Error("addCue is failed for: "+v)}catch(a){V.logger.debug("[texttrack-utils]: "+a);var s=new self.TextTrackCue(v.startTime,v.endTime,v.text);s.id=v.id,m.addCue(s)}u==="disabled"&&(m.mode=u)}function X(m){var v=m.mode;if(v==="disabled"&&(m.mode="hidden"),m.cues)for(var u=m.cues.length;u--;)m.removeCue(m.cues[u]);v==="disabled"&&(m.mode=v)}function P(m,v,u){var s=m.mode;if(s==="disabled"&&(m.mode="hidden"),m.cues&&m.cues.length>0)for(var a=R(m.cues,v,u),A=0;A<a.length;A++)m.removeCue(a[A]);s==="disabled"&&(m.mode=s)}function e(m,v){if(v<m[0].startTime)return 0;var u=m.length-1;if(v>m[u].endTime)return-1;for(var s=0,a=u;s<=a;){var A=Math.floor((a+s)/2);if(v<m[A].startTime)a=A-1;else if(v>m[A].startTime&&s<u)s=A+1;else return A}return m[s].startTime-v<v-m[a].startTime?s:a}function R(m,v,u){var s=[],a=e(m,v);if(a>-1)for(var A=a,o=m.length;A<o;A++){var i=m[A];if(i.startTime>=v&&i.endTime<=u)s.push(i);else if(i.startTime>u)return s}return s}},"./src/utils/time-ranges.ts":function(se,G,D){"use strict";D.r(G);var V={toString:function(O){for(var X="",P=O.length,e=0;e<P;e++)X+="["+O.start(e).toFixed(3)+","+O.end(e).toFixed(3)+"]";return X}};G.default=V},"./src/utils/timescale-conversion.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"toTimescaleFromBase",function(){return F}),D.d(G,"toTimescaleFromScale",function(){return O}),D.d(G,"toMsFromMpegTsClock",function(){return X}),D.d(G,"toMpegTsClockFromTimescale",function(){return P});var V=9e4;function F(e,R,m,v){m===void 0&&(m=1),v===void 0&&(v=!1);var u=e*R*m;return v?Math.round(u):u}function O(e,R,m,v){return m===void 0&&(m=1),v===void 0&&(v=!1),F(e,R,1/m,v)}function X(e,R){return R===void 0&&(R=!1),F(e,1e3,1/V,R)}function P(e,R){return R===void 0&&(R=1),F(e,V,1/R)}},"./src/utils/typed-array.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"sliceUint8",function(){return V});function V(F,O,X){return Uint8Array.prototype.slice?F.slice(O,X):new Uint8Array(Array.prototype.slice.call(F,O,X))}},"./src/utils/vttcue.ts":function(se,G,D){"use strict";D.r(G),G.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var V=["","lr","rl"],F=["start","middle","end","left","right"];function O(m,v){if(typeof v!="string")return!1;if(!Array.isArray(m))return!1;var u=v.toLowerCase();return~m.indexOf(u)?u:!1}function X(m){return O(V,m)}function P(m){return O(F,m)}function e(m){for(var v=arguments.length,u=new Array(v>1?v-1:0),s=1;s<v;s++)u[s-1]=arguments[s];for(var a=1;a<arguments.length;a++){var A=arguments[a];for(var o in A)m[o]=A[o]}return m}function R(m,v,u){var s=this,a={enumerable:!0};s.hasBeenReset=!1;var A="",o=!1,i=m,r=v,t=u,E=null,_="",y=!0,B="auto",C="start",d=50,n="middle",l=50,c="middle";Object.defineProperty(s,"id",e({},a,{get:function(){return A},set:function(g){A=""+g}})),Object.defineProperty(s,"pauseOnExit",e({},a,{get:function(){return o},set:function(g){o=!!g}})),Object.defineProperty(s,"startTime",e({},a,{get:function(){return i},set:function(g){if(typeof g!="number")throw new TypeError("Start time must be set to a number.");i=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",e({},a,{get:function(){return r},set:function(g){if(typeof g!="number")throw new TypeError("End time must be set to a number.");r=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",e({},a,{get:function(){return t},set:function(g){t=""+g,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",e({},a,{get:function(){return E},set:function(g){E=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",e({},a,{get:function(){return _},set:function(g){var h=X(g);if(h===!1)throw new SyntaxError("An invalid or illegal string was specified.");_=h,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",e({},a,{get:function(){return y},set:function(g){y=!!g,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",e({},a,{get:function(){return B},set:function(g){if(typeof g!="number"&&g!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");B=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",e({},a,{get:function(){return C},set:function(g){var h=P(g);if(!h)throw new SyntaxError("An invalid or illegal string was specified.");C=h,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",e({},a,{get:function(){return d},set:function(g){if(g<0||g>100)throw new Error("Position must be between 0 and 100.");d=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",e({},a,{get:function(){return n},set:function(g){var h=P(g);if(!h)throw new SyntaxError("An invalid or illegal string was specified.");n=h,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",e({},a,{get:function(){return l},set:function(g){if(g<0||g>100)throw new Error("Size must be between 0 and 100.");l=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",e({},a,{get:function(){return c},set:function(g){var h=P(g);if(!h)throw new SyntaxError("An invalid or illegal string was specified.");c=h,this.hasBeenReset=!0}})),s.displayState=void 0}return R.prototype.getCueAsHTML=function(){var m=self.WebVTT;return m.convertCueToDOMTree(self,this.text)},R}()},"./src/utils/vttparser.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"parseTimeStamp",function(){return O}),D.d(G,"fixLineBreaks",function(){return v}),D.d(G,"VTTParser",function(){return u});var V=D("./src/utils/vttcue.ts"),F=function(){function s(){}var a=s.prototype;return a.decode=function(o,i){if(!o)return"";if(typeof o!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(o))},s}();function O(s){function a(o,i,r,t){return(o|0)*3600+(i|0)*60+(r|0)+parseFloat(t||0)}var A=s.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return A?parseFloat(A[2])>59?a(A[2],A[3],0,A[4]):a(A[1],A[2],A[3],A[4]):null}var X=function(){function s(){this.values=Object.create(null)}var a=s.prototype;return a.set=function(o,i){!this.get(o)&&i!==""&&(this.values[o]=i)},a.get=function(o,i,r){return r?this.has(o)?this.values[o]:i[r]:this.has(o)?this.values[o]:i},a.has=function(o){return o in this.values},a.alt=function(o,i,r){for(var t=0;t<r.length;++t)if(i===r[t]){this.set(o,i);break}},a.integer=function(o,i){/^-?\d+$/.test(i)&&this.set(o,parseInt(i,10))},a.percent=function(o,i){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(i)){var r=parseFloat(i);if(r>=0&&r<=100)return this.set(o,r),!0}return!1},s}();function P(s,a,A,o){var i=o?s.split(o):[s];for(var r in i){if(typeof i[r]!="string")continue;var t=i[r].split(A);if(t.length!==2)continue;var E=t[0],_=t[1];a(E,_)}}var e=new V.default(0,0,""),R=e.align==="middle"?"middle":"center";function m(s,a,A){var o=s;function i(){var E=O(s);if(E===null)throw new Error("Malformed timestamp: "+o);return s=s.replace(/^[^\sa-zA-Z-]+/,""),E}function r(E,_){var y=new X;P(E,function(d,n){var l;switch(d){case"region":for(var c=A.length-1;c>=0;c--)if(A[c].id===n){y.set(d,A[c].region);break}break;case"vertical":y.alt(d,n,["rl","lr"]);break;case"line":l=n.split(","),y.integer(d,l[0]),y.percent(d,l[0])&&y.set("snapToLines",!1),y.alt(d,l[0],["auto"]),l.length===2&&y.alt("lineAlign",l[1],["start",R,"end"]);break;case"position":l=n.split(","),y.percent(d,l[0]),l.length===2&&y.alt("positionAlign",l[1],["start",R,"end","line-left","line-right","auto"]);break;case"size":y.percent(d,n);break;case"align":y.alt(d,n,["start",R,"end","left","right"]);break}},/:/,/\s/),_.region=y.get("region",null),_.vertical=y.get("vertical","");var B=y.get("line","auto");B==="auto"&&e.line===-1&&(B=-1),_.line=B,_.lineAlign=y.get("lineAlign","start"),_.snapToLines=y.get("snapToLines",!0),_.size=y.get("size",100),_.align=y.get("align",R);var C=y.get("position","auto");C==="auto"&&e.position===50&&(C=_.align==="start"||_.align==="left"?0:_.align==="end"||_.align==="right"?100:50),_.position=C}function t(){s=s.replace(/^\s+/,"")}if(t(),a.startTime=i(),t(),s.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);s=s.substr(3),t(),a.endTime=i(),t(),r(s,a)}function v(s){return s.replace(/<br(?: \/)?>/gi,`
|
|
`)}var u=function(){function s(){this.state="INITIAL",this.buffer="",this.decoder=new F,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var a=s.prototype;return a.parse=function(o){var i=this;o&&(i.buffer+=i.decoder.decode(o,{stream:!0}));function r(){var C=i.buffer,d=0;for(C=v(C);d<C.length&&C[d]!=="\r"&&C[d]!==`
|
|
`;)++d;var n=C.substr(0,d);return C[d]==="\r"&&++d,C[d]===`
|
|
`&&++d,i.buffer=C.substr(d),n}function t(C){P(C,function(d,n){},/:/)}try{var E="";if(i.state==="INITIAL"){if(!/\r\n|\n/.test(i.buffer))return this;E=r();var _=E.match(/^()?WEBVTT([ \t].*)?$/);if(!_||!_[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var y=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;y?y=!1:E=r();switch(i.state){case"HEADER":/:/.test(E)?t(E):E||(i.state="ID");continue;case"NOTE":E||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(E)){i.state="NOTE";break}if(!E)continue;if(i.cue=new V.default(0,0,""),i.state="CUE",E.indexOf("-->")===-1){i.cue.id=E;continue}case"CUE":if(!i.cue){i.state="BADCUE";continue}try{m(E,i.cue,i.regionList)}catch(C){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":{var B=E.indexOf("-->")!==-1;if(!E||B&&(y=!0)){i.oncue&&i.cue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}if(i.cue===null)continue;i.cue.text&&(i.cue.text+=`
|
|
`),i.cue.text+=E}continue;case"BADCUE":E||(i.state="ID")}}}catch(C){i.state==="CUETEXT"&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state=i.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},a.flush=function(){var o=this;try{if((o.cue||o.state==="HEADER")&&(o.buffer+=`
|
|
|
|
`,o.parse()),o.state==="INITIAL"||o.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(i){o.onparsingerror&&o.onparsingerror(i)}return o.onflush&&o.onflush(),this},s}()},"./src/utils/webvtt-parser.ts":function(se,G,D){"use strict";D.r(G),D.d(G,"generateCueId",function(){return u}),D.d(G,"parseWebVTT",function(){return a});var V=D("./src/polyfills/number.ts"),F=D("./src/utils/vttparser.ts"),O=D("./src/demux/id3.ts"),X=D("./src/utils/timescale-conversion.ts"),P=D("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,R=function(o,i,r){return r===void 0&&(r=0),o.substr(r,i.length)===i},m=function(o){var i=parseInt(o.substr(-3)),r=parseInt(o.substr(-6,2)),t=parseInt(o.substr(-9,2)),E=o.length>9?parseInt(o.substr(0,o.indexOf(":"))):0;if(!Object(V.isFiniteNumber)(i)||!Object(V.isFiniteNumber)(r)||!Object(V.isFiniteNumber)(t)||!Object(V.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+o);return i+=1e3*r,i+=60*1e3*t,i+=60*60*1e3*E,i},v=function(o){for(var i=5381,r=o.length;r;)i=i*33^o.charCodeAt(--r);return(i>>>0).toString()};function u(A,o,i){return v(A.toString())+v(o.toString())+v(i)}var s=function(o,i,r){var t=o[i],E=o[t.prevCC];if(!E||!E.new&&t.new){o.ccOffset=o.presentationOffset=t.start,t.new=!1;return}for(;(_=E)!==null&&_!==void 0&&_.new;){var _;o.ccOffset+=t.start-E.start,t.new=!1,t=E,E=o[t.prevCC]}o.presentationOffset=r};function a(A,o,i,r,t,E,_,y){var B=new F.VTTParser,C=Object(O.utf8ArrayToStr)(new Uint8Array(A)).trim().replace(e,`
|
|
`).split(`
|
|
`),d=[],n=Object(X.toMpegTsClockFromTimescale)(o,i),l="00:00.000",c=0,b=0,g,h=!0,L=!1;B.oncue=function(N){var T=r[t],M=r.ccOffset,W=(c-n)/9e4;if(T!=null&&T.new&&(b!==void 0?M=r.ccOffset=T.start:s(r,t,W)),W&&(M=W-r.presentationOffset),L){var U=N.endTime-N.startTime,Y=Object(P.normalizePts)((N.startTime+M-b)*9e4,E*9e4)/9e4;N.startTime=Y,N.endTime=Y+U}var ne=N.text.trim();N.text=decodeURIComponent(encodeURIComponent(ne)),N.id||(N.id=u(N.startTime,N.endTime,ne)),N.endTime>0&&d.push(N)},B.onparsingerror=function(N){g=N},B.onflush=function(){if(g){y(g);return}_(d)},C.forEach(function(N){if(h)if(R(N,"X-TIMESTAMP-MAP=")){h=!1,L=!0,N.substr(16).split(",").forEach(function(T){R(T,"LOCAL:")?l=T.substr(6):R(T,"MPEGTS:")&&(c=parseInt(T.substr(7)))});try{b=m(l)/1e3}catch(T){L=!1,g=T}return}else N===""&&(h=!1);B.parse(N+`
|
|
`)}),B.flush()}},"./src/utils/xhr-loader.ts":function(se,G,D){"use strict";D.r(G);var V=D("./src/utils/logger.ts"),F=D("./src/loader/load-stats.ts"),O=/^age:\s*[\d.]+\s*$/m,X=function(){function P(R){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=R?R.xhrSetup:null,this.stats=new F.LoadStats,this.retryDelay=0}var e=P.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var m=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),m&&(m.onreadystatechange=null,m.onprogress=null,m.readyState!==4&&(this.stats.aborted=!0,m.abort()))},e.abort=function(){var m;this.abortInternal(),(m=this.callbacks)!==null&&m!==void 0&&m.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(m,v,u){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=m,this.config=v,this.callbacks=u,this.retryDelay=v.retryDelay,this.loadInternal()},e.loadInternal=function(){var m=this.config,v=this.context;if(!m)return;var u=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0;var a=this.xhrSetup;try{if(a)try{a(u,v.url)}catch(i){u.open("GET",v.url,!0),a(u,v.url)}u.readyState||u.open("GET",v.url,!0);var A=this.context.headers;if(A)for(var o in A)u.setRequestHeader(o,A[o])}catch(i){this.callbacks.onError({code:u.status,text:i.message},v,u);return}v.rangeEnd&&u.setRequestHeader("Range","bytes="+v.rangeStart+"-"+(v.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=v.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),m.timeout),u.send()},e.readystatechange=function(){var m=this.context,v=this.loader,u=this.stats;if(!m||!v)return;var s=v.readyState,a=this.config;if(u.aborted)return;if(s>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),s===4){v.onreadystatechange=null,v.onprogress=null;var A=v.status;if(A>=200&&A<300){u.loading.end=Math.max(self.performance.now(),u.loading.first);var o,i;if(m.responseType==="arraybuffer"?(o=v.response,i=o.byteLength):(o=v.responseText,i=o.length),u.loaded=u.total=i,!this.callbacks)return;var r=this.callbacks.onProgress;if(r&&r(u,m,o,v),!this.callbacks)return;var t={url:v.responseURL,data:o};this.callbacks.onSuccess(t,u,m,v)}else u.retry>=a.maxRetry||A>=400&&A<499?(V.logger.error(A+" while loading "+m.url),this.callbacks.onError({code:A,text:v.statusText},m,v)):(V.logger.warn(A+" while loading "+m.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,a.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)},e.loadtimeout=function(){V.logger.warn("timeout while loading "+this.context.url);var m=this.callbacks;m&&(this.abortInternal(),m.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(m){var v=this.stats;v.loaded=m.loaded,m.lengthComputable&&(v.total=m.total)},e.getCacheAge=function(){var m=null;if(this.loader&&O.test(this.loader.getAllResponseHeaders())){var v=this.loader.getResponseHeader("age");m=v?parseFloat(v):null}return m},P}();G.default=X}}).default})},vHTk:function(ht,_e,j){ht.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return Ge});var se=j("rePB"),G=j("VTBJ"),D=j("KQm4"),V=j("U8pU"),F=j("ODXe"),O=j("q1tI"),X=j("TSYQ"),P=j.n(X),e=j("Gytx"),R=j.n(e),m=j("Kwbf"),v=j("t23M"),u=j("qx4F"),s=j("6eGT"),a=j("IBYe"),A=j("Ff2n"),o=j("c+Xe"),i=j("fyJ8"),r=j("biw7");function t(xe,Ue,Ke,We,Le){var Fe=Ke[xe]||{},we=Ke[Ue]||{},ue,ce;Fe.fixed==="left"?ue=We.left[xe]:we.fixed==="right"&&(ce=We.right[Ue]);var te=!1,ie=!1,le=!1,pe=!1,Ie=Ke[Ue+1],Pe=Ke[xe-1];if(Le==="rtl"){if(ue!==void 0){var qe=Pe&&Pe.fixed==="left";pe=!qe}else if(ce!==void 0){var ft=Ie&&Ie.fixed==="right";le=!ft}}else if(ue!==void 0){var ut=Ie&&Ie.fixed==="left";te=!ut}else if(ce!==void 0){var st=Pe&&Pe.fixed==="right";ie=!st}return{fixLeft:ue,fixRight:ce,lastFixLeft:te,firstFixRight:ie,lastFixRight:le,firstFixLeft:pe,isSticky:We.isSticky}}var E=j("sR1s");function _(xe){var Ue=xe.cells,Ke=xe.stickyOffsets,We=xe.flattenColumns,Le=xe.rowComponent,Fe=xe.cellComponent,we=xe.onHeaderRow,ue=xe.index,ce=O.useContext(r.a),te=ce.prefixCls,ie=ce.direction,le;we&&(le=we(Ue.map(function(Ie){return Ie.column}),ue));var pe=Object(E.a)(Ue.map(function(Ie){return Ie.column}));return O.createElement(Le,Object.assign({},le),Ue.map(function(Ie,Pe){var qe=Ie.column,ft=t(Ie.colStart,Ie.colEnd,We,Ke,ie),ut;return qe&&qe.onHeaderCell&&(ut=Ie.column.onHeaderCell(qe)),O.createElement(i.a,Object.assign({},Ie,{ellipsis:qe.ellipsis,align:qe.align,component:Fe,prefixCls:te,key:pe[Pe]},ft,{additionalProps:ut,rowType:"header"}))}))}_.displayName="HeaderRow";var y=_;function B(xe){var Ue=[];function Ke(we,ue){var ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ue[ce]=Ue[ce]||[];var te=ue,ie=we.filter(Boolean).map(function(le){var pe={key:le.key,className:le.className||"",children:le.title,column:le,colStart:te},Ie=1,Pe=le.children;return Pe&&Pe.length>0&&(Ie=Ke(Pe,te,ce+1).reduce(function(qe,ft){return qe+ft},0),pe.hasSubColumns=!0),"colSpan"in le&&(Ie=le.colSpan),"rowSpan"in le&&(pe.rowSpan=le.rowSpan),pe.colSpan=Ie,pe.colEnd=pe.colStart+Ie-1,Ue[ce].push(pe),te+=Ie,Ie});return ie}Ke(xe,0);for(var We=Ue.length,Le=function(ue){Ue[ue].forEach(function(ce){!("rowSpan"in ce)&&!ce.hasSubColumns&&(ce.rowSpan=We-ue)})},Fe=0;Fe<We;Fe+=1)Le(Fe);return Ue}function C(xe){var Ue=xe.stickyOffsets,Ke=xe.columns,We=xe.flattenColumns,Le=xe.onHeaderRow,Fe=O.useContext(r.a),we=Fe.prefixCls,ue=Fe.getComponent,ce=O.useMemo(function(){return B(Ke)},[Ke]),te=ue(["header","wrapper"],"thead"),ie=ue(["header","row"],"tr"),le=ue(["header","cell"],"th");return O.createElement(te,{className:"".concat(we,"-thead")},ce.map(function(pe,Ie){var Pe=O.createElement(y,{key:Ie,flattenColumns:We,cells:pe,stickyOffsets:Ue,rowComponent:ie,cellComponent:le,onHeaderRow:Le,index:Ie});return Pe}))}var d=C,n=j("hW8S");function l(xe){for(var Ue=xe.colWidths,Ke=xe.columns,We=xe.columCount,Le=[],Fe=We||Ke.length,we=!1,ue=Fe-1;ue>=0;ue-=1){var ce=Ue[ue],te=Ke&&Ke[ue],ie=te&&te[n.a];(ce||ie||we)&&(Le.unshift(O.createElement("col",Object.assign({key:ue,style:{width:ce,minWidth:ce}},ie))),we=!0)}return O.createElement("colgroup",null,Le)}var c=l;function b(xe,Ue){return Object(O.useMemo)(function(){for(var Ke=[],We=0;We<Ue;We+=1){var Le=xe[We];if(Le!==void 0)Ke[We]=Le;else return null}return Ke},[xe.join("_"),Ue])}var g=O.forwardRef(function(xe,Ue){var Ke=xe.noData,We=xe.columns,Le=xe.flattenColumns,Fe=xe.colWidths,we=xe.columCount,ue=xe.stickyOffsets,ce=xe.direction,te=xe.fixHeader,ie=xe.offsetHeader,le=xe.stickyClassName,pe=xe.onScroll,Ie=Object(A.a)(xe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Pe=O.useContext(r.a),qe=Pe.prefixCls,ft=Pe.scrollbarSize,ut=Pe.isSticky,st=ut&&!te?0:ft,Lt=O.useRef(null),mt=O.useCallback(function(wt){Object(o.b)(Ue,wt),Object(o.b)(Lt,wt)},[]);O.useEffect(function(){var wt;function Mt(ct){var lr=ct.currentTarget,At=ct.deltaX;At&&(pe({currentTarget:lr,scrollLeft:lr.scrollLeft+At}),ct.preventDefault())}return(wt=Lt.current)===null||wt===void 0||wt.addEventListener("wheel",Mt),function(){var ct;(ct=Lt.current)===null||ct===void 0||ct.removeEventListener("wheel",Mt)}},[]);var tt=Le[Le.length-1],er={fixed:tt?tt.fixed:null,onHeaderCell:function(){return{className:"".concat(qe,"-cell-scrollbar")}}},Jt=Object(O.useMemo)(function(){return st?[].concat(Object(D.a)(We),[er]):We},[st,We]),Ot=Object(O.useMemo)(function(){return st?[].concat(Object(D.a)(Le),[er]):Le},[st,Le]),yt=Object(O.useMemo)(function(){var wt=ue.right,Mt=ue.left;return Object(G.a)(Object(G.a)({},ue),{},{left:ce==="rtl"?[].concat(Object(D.a)(Mt.map(function(ct){return ct+st})),[0]):Mt,right:ce==="rtl"?wt:[].concat(Object(D.a)(wt.map(function(ct){return ct+st})),[0]),isSticky:ut})},[st,ue,ut]),Et=b(Fe,we);return O.createElement("div",{style:Object(G.a)({overflow:"hidden"},ut?{top:ie}:{}),ref:mt,className:P()("".concat(qe,"-header"),Object(se.a)({},le,!!le))},O.createElement("table",{style:{tableLayout:"fixed",visibility:Ke||Et?null:"hidden"}},O.createElement(c,{colWidths:Et?[].concat(Object(D.a)(Et),[st]):[],columCount:we+1,columns:Ot}),O.createElement(d,Object.assign({},Ie,{stickyOffsets:yt,columns:Jt,flattenColumns:Ot}))))});g.displayName="FixedHeader";var h=g,L=O.createContext(null),N=L;function T(xe){var Ue=xe.prefixCls,Ke=xe.children,We=xe.component,Le=xe.cellComponent,Fe=xe.fixHeader,we=xe.fixColumn,ue=xe.horizonScroll,ce=xe.className,te=xe.expanded,ie=xe.componentWidth,le=xe.colSpan,pe=O.useContext(r.a),Ie=pe.scrollbarSize;return O.useMemo(function(){var Pe=Ke;return we&&(Pe=O.createElement("div",{style:{width:ie-(Fe?Ie:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ue,"-expanded-row-fixed")},Pe)),O.createElement(We,{className:ce,style:{display:te?null:"none"}},O.createElement(i.a,{component:Le,prefixCls:Ue,colSpan:le},Pe))},[Ke,We,Fe,ue,ce,te,ie,le,Ie])}var M=T;function W(xe){var Ue=xe.className,Ke=xe.style,We=xe.record,Le=xe.index,Fe=xe.rowKey,we=xe.getRowKey,ue=xe.rowExpandable,ce=xe.expandedKeys,te=xe.onRow,ie=xe.indent,le=ie===void 0?0:ie,pe=xe.rowComponent,Ie=xe.cellComponent,Pe=xe.childrenColumnName,qe=O.useContext(r.a),ft=qe.prefixCls,ut=qe.fixedInfoList,st=O.useContext(N),Lt=st.fixHeader,mt=st.fixColumn,tt=st.horizonScroll,er=st.componentWidth,Jt=st.flattenColumns,Ot=st.expandableType,yt=st.expandRowByClick,Et=st.onTriggerExpand,wt=st.rowClassName,Mt=st.expandedRowClassName,ct=st.indentSize,lr=st.expandIcon,At=st.expandedRowRender,gt=st.expandIconColumnIndex,Nt=O.useState(!1),ir=Object(F.a)(Nt,2),yr=ir[0],br=ir[1],Rr=ce&&ce.has(xe.recordKey);O.useEffect(function(){Rr&&br(!0)},[Rr]);var Dr=Ot==="row"&&(!ue||ue(We)),Ht=Ot==="nest",pr=Pe&&We&&We[Pe],Lr=Dr||Ht,Cr;te&&(Cr=te(We,Le));var Qr=function(p){if(yt&&Lr&&Et(We,p),Cr&&Cr.onClick){for(var w,H=arguments.length,Z=new Array(H>1?H-1:0),K=1;K<H;K++)Z[K-1]=arguments[K];(w=Cr).onClick.apply(w,[p].concat(Z))}},Ur;typeof wt=="string"?Ur=wt:typeof wt=="function"&&(Ur=wt(We,Le,le));var ae=Object(E.a)(Jt),oe=O.createElement(pe,Object.assign({},Cr,{"data-row-key":Fe,className:P()(Ue,"".concat(ft,"-row"),"".concat(ft,"-row-level-").concat(le),Ur,Cr&&Cr.className),style:Object(G.a)(Object(G.a)({},Ke),Cr?Cr.style:null),onClick:Qr}),Jt.map(function(Q,p){var w=Q.render,H=Q.dataIndex,Z=Q.className,K=ae[p],ye=ut[p],He;p===(gt||0)&&Ht&&(He=O.createElement(O.Fragment,null,O.createElement("span",{style:{paddingLeft:"".concat(ct*le,"px")},className:"".concat(ft,"-row-indent indent-level-").concat(le)}),lr({prefixCls:ft,expanded:Rr,expandable:pr,record:We,onExpand:Et})));var it;return Q.onCell&&(it=Q.onCell(We,Le)),O.createElement(i.a,Object.assign({className:Z,ellipsis:Q.ellipsis,align:Q.align,component:Ie,prefixCls:ft,key:K,record:We,index:Le,dataIndex:H,render:w,shouldCellUpdate:Q.shouldCellUpdate},ye,{appendNode:He,additionalProps:it}))})),fe;if(Dr&&(yr||Rr)){var Te=At(We,Le,le+1,Rr),Ye=Mt&&Mt(We,Le,le);fe=O.createElement(M,{expanded:Rr,className:P()("".concat(ft,"-expanded-row"),"".concat(ft,"-expanded-row-level-").concat(le+1),Ye),prefixCls:ft,fixHeader:Lt,fixColumn:mt,horizonScroll:tt,component:pe,componentWidth:er,cellComponent:Ie,colSpan:Jt.length},Te)}var et;return pr&&Rr&&(et=(We[Pe]||[]).map(function(Q,p){var w=we(Q,p);return O.createElement(W,Object.assign({},xe,{key:w,rowKey:w,record:Q,recordKey:w,index:p,indent:le+1}))})),O.createElement(O.Fragment,null,oe,fe,et)}W.displayName="BodyRow";var U=W,Y=O.createContext(null),ne=Y;function me(xe){var Ue=xe.columnKey,Ke=xe.onColumnResize,We=O.useRef();return O.useEffect(function(){We.current&&Ke(Ue,We.current.offsetWidth)},[]),O.createElement(v.a,{onResize:function(Fe){var we=Fe.offsetWidth;Ke(Ue,we)}},O.createElement("td",{ref:We,style:{padding:0,border:0,height:0}},O.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ge(xe){var Ue=xe.data,Ke=xe.getRowKey,We=xe.measureColumnWidth,Le=xe.expandedKeys,Fe=xe.onRow,we=xe.rowExpandable,ue=xe.emptyNode,ce=xe.childrenColumnName,te=O.useContext(ne),ie=te.onColumnResize,le=O.useContext(r.a),pe=le.prefixCls,Ie=le.getComponent,Pe=O.useContext(N),qe=Pe.fixHeader,ft=Pe.horizonScroll,ut=Pe.flattenColumns,st=Pe.componentWidth;return O.useMemo(function(){var Lt=Ie(["body","wrapper"],"tbody"),mt=Ie(["body","row"],"tr"),tt=Ie(["body","cell"],"td"),er;Ue.length?er=Ue.map(function(Ot,yt){var Et=Ke(Ot,yt);return O.createElement(U,{key:Et,rowKey:Et,record:Ot,recordKey:Et,index:yt,rowComponent:mt,cellComponent:tt,expandedKeys:Le,onRow:Fe,getRowKey:Ke,rowExpandable:we,childrenColumnName:ce})}):er=O.createElement(M,{expanded:!0,className:"".concat(pe,"-placeholder"),prefixCls:pe,fixHeader:qe,fixColumn:ft,horizonScroll:ft,component:mt,componentWidth:st,cellComponent:tt,colSpan:ut.length},ue);var Jt=Object(E.a)(ut);return O.createElement(Lt,{className:"".concat(pe,"-tbody")},We&&O.createElement("tr",{"aria-hidden":"true",className:"".concat(pe,"-measure-row"),style:{height:0}},Jt.map(function(Ot){return O.createElement(me,{key:Ot,columnKey:Ot,onColumnResize:ie})})),er)},[Ue,pe,Fe,We,Le,Ke,Ie,st,ue,ut])}var Oe=O.memo(ge);Oe.displayName="Body";var Se=Oe,Be=j("wRmb"),Ne=j("xEkU"),ke=j.n(Ne);function Ce(xe){var Ue=Object(O.useRef)(xe),Ke=Object(O.useState)({}),We=Object(F.a)(Ke,2),Le=We[1],Fe=Object(O.useRef)(null),we=Object(O.useRef)([]);function ue(ce){Fe.current===null&&(we.current=[],Fe.current=ke()(function(){we.current.forEach(function(te){Ue.current=te(Ue.current)}),Fe.current=null,Le({})})),we.current.push(ce)}return Object(O.useEffect)(function(){return function(){ke.a.cancel(Fe.current)}},[]),[Ue.current,ue]}function ve(xe){var Ue=Object(O.useRef)(xe),Ke=Object(O.useRef)(null);function We(){window.clearTimeout(Ke.current)}function Le(we){Ue.current=we,We(),Ke.current=window.setTimeout(function(){Ue.current=null,Ke.current=null},100)}function Fe(){return Ue.current}return Object(O.useEffect)(function(){return We},[]),[Le,Fe]}function Xe(xe,Ue,Ke){var We=Object(O.useMemo)(function(){for(var Le=[],Fe=[],we=0,ue=0,ce=0;ce<Ue;ce+=1)if(Ke==="rtl"){Fe[ce]=ue,ue+=xe[ce]||0;var te=Ue-ce-1;Le[te]=we,we+=xe[te]||0}else{Le[ce]=we,we+=xe[ce]||0;var ie=Ue-ce-1;Fe[ie]=ue,ue+=xe[ie]||0}return{left:Le,right:Fe}},[xe,Ue,Ke]);return We}var lt=Xe;function at(xe){var Ue=xe.className,Ke=xe.children;return O.createElement("div",{className:Ue},Ke)}var je=at,rt=j("n6Qo");function re(xe){var Ue,Ke=xe.prefixCls,We=xe.record,Le=xe.onExpand,Fe=xe.expanded,we=xe.expandable,ue="".concat(Ke,"-row-expand-icon");if(!we)return O.createElement("span",{className:P()(ue,"".concat(Ke,"-row-spaced"))});var ce=function(ie){Le(We,ie),ie.stopPropagation()};return O.createElement("span",{className:P()(ue,(Ue={},Object(se.a)(Ue,"".concat(Ke,"-row-expanded"),Fe),Object(se.a)(Ue,"".concat(Ke,"-row-collapsed"),!Fe),Ue)),onClick:ce})}function J(xe,Ue,Ke){var We=[];function Le(Fe){(Fe||[]).forEach(function(we,ue){We.push(Ue(we,ue)),Le(we[Ke])})}return Le(xe),We}var k=j("zT1h"),$=j("y0+3"),q=function(Ue,Ke){var We,Le,Fe=Ue.scrollBodyRef,we=Ue.onScroll,ue=Ue.offsetScroll,ce=O.useContext(r.a),te=ce.prefixCls,ie=((We=Fe.current)===null||We===void 0?void 0:We.scrollWidth)||0,le=((Le=Fe.current)===null||Le===void 0?void 0:Le.clientWidth)||0,pe=ie&&le*(le/ie),Ie=O.useRef(),Pe=Ce({scrollLeft:0,isHiddenScrollBar:!1}),qe=Object(F.a)(Pe,2),ft=qe[0],ut=qe[1],st=O.useRef({delta:0,x:0}),Lt=O.useState(!1),mt=Object(F.a)(Lt,2),tt=mt[0],er=mt[1],Jt=function(){er(!1)},Ot=function(ct){ct.persist(),st.current.delta=ct.pageX-ft.scrollLeft,st.current.x=0,er(!0),ct.preventDefault()},yt=function(ct){var lr,At=ct||((lr=window)===null||lr===void 0?void 0:lr.event),gt=At.buttons;if(!tt||gt===0){tt&&er(!1);return}var Nt=st.current.x+ct.pageX-st.current.x-st.current.delta;Nt<=0&&(Nt=0),Nt+pe>=le&&(Nt=le-pe),we({scrollLeft:Nt/le*(ie+2)}),st.current.x=ct.pageX},Et=function(){var ct=Object($.b)(Fe.current).top,lr=ct+Fe.current.offsetHeight,At=document.documentElement.scrollTop+window.innerHeight;lr-Object(u.a)()<=At||ct>=At-ue?ut(function(gt){return Object(G.a)(Object(G.a)({},gt),{},{isHiddenScrollBar:!0})}):ut(function(gt){return Object(G.a)(Object(G.a)({},gt),{},{isHiddenScrollBar:!1})})},wt=function(ct){ut(function(lr){return Object(G.a)(Object(G.a)({},lr),{},{scrollLeft:ct/ie*le||0})})};return O.useImperativeHandle(Ke,function(){return{setScrollLeft:wt}}),O.useEffect(function(){var Mt=Object(k.a)(document.body,"mouseup",Jt,!1),ct=Object(k.a)(document.body,"mousemove",yt,!1);return Et(),function(){Mt.remove(),ct.remove()}},[pe,tt]),O.useEffect(function(){var Mt=Object(k.a)(window,"scroll",Et,!1),ct=Object(k.a)(window,"resize",Et,!1);return function(){Mt.remove(),ct.remove()}},[]),O.useEffect(function(){ft.isHiddenScrollBar||ut(function(Mt){var ct,lr;return Object(G.a)(Object(G.a)({},Mt),{},{scrollLeft:Fe.current.scrollLeft/((ct=Fe.current)===null||ct===void 0?void 0:ct.scrollWidth)*((lr=Fe.current)===null||lr===void 0?void 0:lr.clientWidth)})})},[ft.isHiddenScrollBar]),ie<=le||!pe||ft.isHiddenScrollBar?null:O.createElement("div",{style:{height:Object(u.a)(),width:le,bottom:ue},className:"".concat(te,"-sticky-scroll")},O.createElement("div",{onMouseDown:Ot,ref:Ie,className:P()("".concat(te,"-sticky-scroll-bar"),Object(se.a)({},"".concat(te,"-sticky-scroll-bar-active"),tt)),style:{width:"".concat(pe,"px"),transform:"translate3d(".concat(ft.scrollLeft,"px, 0, 0)")}}))},he=O.forwardRef(q);function de(xe,Ue){return O.useMemo(function(){var Ke=!!xe;return{isSticky:Ke,stickyClassName:Ke?"".concat(Ue,"-sticky-header"):"",offsetHeader:Object(V.a)(xe)==="object"&&xe.offsetHeader||0,offsetScroll:Object(V.a)(xe)==="object"&&xe.offsetScroll||0}},[xe,Ue])}var Qe=[],ze={},Ge="rc-table-internal-hook",$e=O.memo(function(xe){var Ue=xe.children;return Ue},function(xe,Ue){return R()(xe.props,Ue.props)?xe.pingLeft!==Ue.pingLeft||xe.pingRight!==Ue.pingRight:!1});function nt(xe){var Ue,Ke=xe.prefixCls,We=xe.className,Le=xe.rowClassName,Fe=xe.style,we=xe.data,ue=xe.rowKey,ce=xe.scroll,te=xe.tableLayout,ie=xe.direction,le=xe.title,pe=xe.footer,Ie=xe.summary,Pe=xe.id,qe=xe.showHeader,ft=xe.components,ut=xe.emptyText,st=xe.onRow,Lt=xe.onHeaderRow,mt=xe.internalHooks,tt=xe.transformColumns,er=xe.internalRefs,Jt=xe.sticky,Ot=we||Qe,yt=!!Ot.length,Et=O.useState(0),wt=Object(F.a)(Et,2),Mt=wt[0],ct=wt[1];O.useEffect(function(){ct(Object(u.a)())});var lr=O.useMemo(function(){return Object(E.c)(ft,{})},[ft]),At=O.useCallback(function(hr,cr){return Object(E.b)(lr,hr)||cr},[lr]),gt=O.useMemo(function(){return typeof ue=="function"?ue:function(hr){var cr=hr&&hr[ue];return cr}},[ue]),Nt=Object(n.c)(xe),ir=Nt.expandIcon,yr=Nt.expandedRowKeys,br=Nt.defaultExpandedRowKeys,Rr=Nt.defaultExpandAllRows,Dr=Nt.expandedRowRender,Ht=Nt.onExpand,pr=Nt.onExpandedRowsChange,Lr=Nt.expandRowByClick,Cr=Nt.rowExpandable,Qr=Nt.expandIconColumnIndex,Ur=Nt.expandedRowClassName,ae=Nt.childrenColumnName,oe=Nt.indentSize,fe=ir||re,Te=ae||"children",Ye=O.useMemo(function(){return Dr?"row":xe.expandable&&mt===Ge&&xe.expandable.__PARENT_RENDER_ICON__||Ot.some(function(hr){return hr&&Object(V.a)(hr)==="object"&&hr[Te]})?"nest":!1},[!!Dr,Ot]),et=O.useState(function(){return br||(Rr?J(Ot,gt,Te):[])}),Q=Object(F.a)(et,2),p=Q[0],w=Q[1],H=O.useMemo(function(){return new Set(yr||p||[])},[yr,p]),Z=O.useCallback(function(hr){var cr=gt(hr,Ot.indexOf(hr)),jr,en=H.has(cr);en?(H.delete(cr),jr=Object(D.a)(H)):jr=[].concat(Object(D.a)(H),[cr]),w(jr),Ht&&Ht(!en,hr),pr&&pr(jr)},[gt,H,Ot,Ht,pr]),K=O.useState(0),ye=Object(F.a)(K,2),He=ye[0],it=ye[1],ot=Object(Be.b)(Object(G.a)(Object(G.a)(Object(G.a)({},xe),Nt),{},{expandable:!!Dr,expandedKeys:H,getRowKey:gt,onTriggerExpand:Z,expandIcon:fe,expandIconColumnIndex:Qr,direction:ie}),mt===Ge?tt:null),Ve=Object(F.a)(ot,2),_t=Ve[0],vt=Ve[1],Tt=O.useMemo(function(){return{columns:_t,flattenColumns:vt}},[_t,vt]),Pt=O.useRef(),ur=O.useRef(),Gt=O.useRef(),ar=O.useState(!1),kt=Object(F.a)(ar,2),Tr=kt[0],mr=kt[1],$t=O.useState(!1),De=Object(F.a)($t,2),Qt=De[0],Vt=De[1],Dt=Ce(new Map),jt=Object(F.a)(Dt,2),Kt=jt[0],Ar=jt[1],zt=Object(E.a)(vt),sr=zt.map(function(hr){return Kt.get(hr)}),rr=O.useMemo(function(){return sr},[sr.join("_")]),Ut=lt(rr,vt.length,ie),Wt=ce&&Object(E.d)(ce.y),Ft=ce&&Object(E.d)(ce.x),tr=Ft&&vt.some(function(hr){var cr=hr.fixed;return cr}),Zt=O.useRef(),xr=de(Jt,Ke),qt=xr.isSticky,Fr=xr.offsetHeader,gr=xr.offsetScroll,Kr=xr.stickyClassName,Pr,Nr,fr;Wt&&(Nr={overflowY:"scroll",maxHeight:ce.y}),Ft&&(Pr={overflowX:"auto"},Wt||(Nr={overflowY:"hidden"}),fr={width:ce.x===!0?"auto":ce.x,minWidth:"100%"});var qr=O.useCallback(function(hr,cr){Ar(function(jr){var en=new Map(jr);return en.set(hr,cr),en})},[]),Xt=ve(null),Sr=Object(F.a)(Xt,2),kr=Sr[0],$r=Sr[1];function un(hr,cr){if(!cr)return;typeof cr=="function"?cr(hr):cr.scrollLeft!==hr&&(cr.scrollLeft=hr)}var Yr=function(cr){var jr=cr.currentTarget,en=cr.scrollLeft,Un=typeof en=="number"?en:jr.scrollLeft,pi=jr||ze;if(!$r()||$r()===pi){var ei;kr(pi),un(Un,ur.current),un(Un,Gt.current),un(Un,(ei=Zt.current)===null||ei===void 0?void 0:ei.setScrollLeft)}if(jr){var Vi=jr.scrollWidth,zi=jr.clientWidth;mr(Un>0),Vt(Un<Vi-zi)}},rn=function(){Gt.current&&Yr({currentTarget:Gt.current})},mn=function(cr){var jr=cr.width;rn(),it(Pt.current?Pt.current.offsetWidth:jr)};O.useEffect(function(){return rn},[]),O.useEffect(function(){Ft&&rn()},[Ft]),O.useEffect(function(){mt===Ge&&er&&(er.body.current=Gt.current)});var Qn=At(["table"],"table"),Jr=O.useMemo(function(){return te||(tr?ce.x==="max-content"?"auto":"fixed":Wt||vt.some(function(hr){var cr=hr.ellipsis;return cr})?"fixed":"auto")},[Wt,tr,vt,te]),cn,bn={colWidths:rr,columCount:vt.length,stickyOffsets:Ut,onHeaderRow:Lt,fixHeader:Wt},gn=O.useMemo(function(){return yt?null:typeof ut=="function"?ut():ut},[yt,ut]),ci=O.createElement(Se,{data:Ot,measureColumnWidth:Wt||Ft||qt,expandedKeys:H,rowExpandable:Cr,getRowKey:gt,onRow:st,emptyNode:gn,childrenColumnName:Te}),hi=O.createElement(c,{colWidths:vt.map(function(hr){var cr=hr.width;return cr}),columns:vt}),di=Ie&&O.createElement(rt.b,null,Ie(Ot)),fi=At(["body"]);if(Wt||qt){var Zn;typeof fi=="function"?(Zn=fi(Ot,{scrollbarSize:Mt,ref:Gt,onScroll:Yr}),bn.colWidths=vt.map(function(hr,cr){var jr=hr.width,en=cr===_t.length-1?jr-Mt:jr;return typeof en=="number"&&!Number.isNaN(en)?en:(Object(m.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Zn=O.createElement("div",{style:Object(G.a)(Object(G.a)({},Pr),Nr),onScroll:Yr,ref:Gt,className:P()("".concat(Ke,"-body"))},O.createElement(Qn,{style:Object(G.a)(Object(G.a)({},fr),{},{tableLayout:Jr})},hi,ci,di),qt&&O.createElement(he,{ref:Zt,offsetScroll:gr,scrollBodyRef:Gt,onScroll:Yr})),cn=O.createElement(O.Fragment,null,qe!==!1&&O.createElement(h,Object.assign({noData:!Ot.length},bn,Tt,{direction:ie,offsetHeader:Fr,stickyClassName:Kr,ref:ur,onScroll:Yr})),Zn)}else cn=O.createElement("div",{style:Object(G.a)(Object(G.a)({},Pr),Nr),className:P()("".concat(Ke,"-content")),onScroll:Yr,ref:Gt},O.createElement(Qn,{style:Object(G.a)(Object(G.a)({},fr),{},{tableLayout:Jr})},hi,qe!==!1&&O.createElement(d,Object.assign({},bn,Tt)),ci,di));var Ki=Object(n.b)(xe),qn=O.createElement("div",Object.assign({className:P()(Ke,We,(Ue={},Object(se.a)(Ue,"".concat(Ke,"-rtl"),ie==="rtl"),Object(se.a)(Ue,"".concat(Ke,"-ping-left"),Tr),Object(se.a)(Ue,"".concat(Ke,"-ping-right"),Qt),Object(se.a)(Ue,"".concat(Ke,"-layout-fixed"),te==="fixed"),Object(se.a)(Ue,"".concat(Ke,"-fixed-header"),Wt),Object(se.a)(Ue,"".concat(Ke,"-fixed-column"),tr),Object(se.a)(Ue,"".concat(Ke,"-scroll-horizontal"),Ft),Object(se.a)(Ue,"".concat(Ke,"-has-fix-left"),vt[0]&&vt[0].fixed),Object(se.a)(Ue,"".concat(Ke,"-has-fix-right"),vt[vt.length-1]&&vt[vt.length-1].fixed==="right"),Ue)),style:Fe,id:Pe,ref:Pt},Ki),O.createElement($e,{pingLeft:Tr,pingRight:Qt,props:Object(G.a)(Object(G.a)({},xe),{},{stickyOffsets:Ut,mergedExpandedKeys:H})},le&&O.createElement(je,{className:"".concat(Ke,"-title")},le(Ot)),O.createElement("div",{className:"".concat(Ke,"-container")},cn),pe&&O.createElement(je,{className:"".concat(Ke,"-footer")},pe(Ot))));Ft&&(qn=O.createElement(v.a,{onResize:mn},qn));var ji=O.useMemo(function(){return{prefixCls:Ke,getComponent:At,scrollbarSize:Mt,direction:ie,fixedInfoList:vt.map(function(hr,cr){return t(cr,cr,vt,Ut,ie)}),isSticky:qt}},[Ke,At,Mt,ie,vt,Ut,ie,qt]),Wi=O.useMemo(function(){return Object(G.a)(Object(G.a)({},Tt),{},{tableLayout:Jr,rowClassName:Le,expandedRowClassName:Ur,componentWidth:He,fixHeader:Wt,fixColumn:tr,horizonScroll:Ft,expandIcon:fe,expandableType:Ye,expandRowByClick:Lr,expandedRowRender:Dr,onTriggerExpand:Z,expandIconColumnIndex:Qr,indentSize:oe})},[Tt,Jr,Le,Ur,He,Wt,tr,Ft,fe,Ye,Lr,Dr,Z,Qr,oe]),Gi=O.useMemo(function(){return{onColumnResize:qr}},[qr]);return O.createElement(r.a.Provider,{value:ji},O.createElement(N.Provider,{value:Wi},O.createElement(ne.Provider,{value:Gi},qn)))}nt.Column=a.a,nt.ColumnGroup=s.a,nt.Summary=rt.a,nt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var dt=_e.b=nt},wOnQ:function(ht,_e,j){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(se,G){ht.exports=G()})(this,function(){"use strict";/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var se=function(x,f){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,S){I.__proto__=S}||function(I,S){for(var z in S)Object.prototype.hasOwnProperty.call(S,z)&&(I[z]=S[z])},se(x,f)};function G(x,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");se(x,f);function I(){this.constructor=x}x.prototype=f===null?Object.create(f):(I.prototype=f.prototype,new I)}var D=function(){return D=Object.assign||function(f){for(var I,S=1,z=arguments.length;S<z;S++){I=arguments[S];for(var ee in I)Object.prototype.hasOwnProperty.call(I,ee)&&(f[ee]=I[ee])}return f},D.apply(this,arguments)};function V(x,f,I,S){function z(ee){return ee instanceof I?ee:new I(function(Ae){Ae(ee)})}return new(I||(I=Promise))(function(ee,Ae){function be(Me){try{Re(S.next(Me))}catch(Je){Ae(Je)}}function Ee(Me){try{Re(S.throw(Me))}catch(Je){Ae(Je)}}function Re(Me){Me.done?ee(Me.value):z(Me.value).then(be,Ee)}Re((S=S.apply(x,f||[])).next())})}function F(x,f){var I={label:0,sent:function(){if(ee[0]&1)throw ee[1];return ee[1]},trys:[],ops:[]},S,z,ee,Ae;return Ae={next:be(0),throw:be(1),return:be(2)},typeof Symbol=="function"&&(Ae[Symbol.iterator]=function(){return this}),Ae;function be(Re){return function(Me){return Ee([Re,Me])}}function Ee(Re){if(S)throw new TypeError("Generator is already executing.");for(;I;)try{if(S=1,z&&(ee=Re[0]&2?z.return:Re[0]?z.throw||((ee=z.return)&&ee.call(z),0):z.next)&&!(ee=ee.call(z,Re[1])).done)return ee;(z=0,ee)&&(Re=[Re[0]&2,ee.value]);switch(Re[0]){case 0:case 1:ee=Re;break;case 4:return I.label++,{value:Re[1],done:!1};case 5:I.label++,z=Re[1],Re=[0];continue;case 7:Re=I.ops.pop(),I.trys.pop();continue;default:if(!(ee=I.trys,ee=ee.length>0&&ee[ee.length-1])&&(Re[0]===6||Re[0]===2)){I=0;continue}if(Re[0]===3&&(!ee||Re[1]>ee[0]&&Re[1]<ee[3])){I.label=Re[1];break}if(Re[0]===6&&I.label<ee[1]){I.label=ee[1],ee=Re;break}if(ee&&I.label<ee[2]){I.label=ee[2],I.ops.push(Re);break}ee[2]&&I.ops.pop(),I.trys.pop();continue}Re=f.call(x,I)}catch(Me){Re=[6,Me],z=0}finally{S=ee=0}if(Re[0]&5)throw Re[1];return{value:Re[0]?Re[1]:void 0,done:!0}}}function O(x,f,I){if(I||arguments.length===2)for(var S=0,z=f.length,ee;S<z;S++)(ee||!(S in f))&&(ee||(ee=Array.prototype.slice.call(f,0,S)),ee[S]=f[S]);return x.concat(ee||f)}for(var X=function(){function x(f,I,S,z){this.left=f,this.top=I,this.width=S,this.height=z}return x.prototype.add=function(f,I,S,z){return new x(this.left+f,this.top+I,this.width+S,this.height+z)},x.fromClientRect=function(f,I){return new x(I.left+f.windowBounds.left,I.top+f.windowBounds.top,I.width,I.height)},x.fromDOMRectList=function(f,I){var S=Array.from(I).find(function(z){return z.width!==0});return S?new x(S.left+f.windowBounds.left,S.top+f.windowBounds.top,S.width,S.height):x.EMPTY},x.EMPTY=new x(0,0,0,0),x}(),P=function(x,f){return X.fromClientRect(x,f.getBoundingClientRect())},e=function(x){var f=x.body,I=x.documentElement;if(!f||!I)throw new Error("Unable to get document size");var S=Math.max(Math.max(f.scrollWidth,I.scrollWidth),Math.max(f.offsetWidth,I.offsetWidth),Math.max(f.clientWidth,I.clientWidth)),z=Math.max(Math.max(f.scrollHeight,I.scrollHeight),Math.max(f.offsetHeight,I.offsetHeight),Math.max(f.clientHeight,I.clientHeight));return new X(0,0,S,z)},R=function(x){for(var f=[],I=0,S=x.length;I<S;){var z=x.charCodeAt(I++);if(z>=55296&&z<=56319&&I<S){var ee=x.charCodeAt(I++);(ee&64512)===56320?f.push(((z&1023)<<10)+(ee&1023)+65536):(f.push(z),I--)}else f.push(z)}return f},m=function(){for(var x=[],f=0;f<arguments.length;f++)x[f]=arguments[f];if(String.fromCodePoint)return String.fromCodePoint.apply(String,x);var I=x.length;if(!I)return"";for(var S=[],z=-1,ee="";++z<I;){var Ae=x[z];Ae<=65535?S.push(Ae):(Ae-=65536,S.push((Ae>>10)+55296,Ae%1024+56320)),(z+1===I||S.length>16384)&&(ee+=String.fromCharCode.apply(String,S),S.length=0)}return ee},v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s<v.length;s++)u[v.charCodeAt(s)]=s;for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),o=0;o<a.length;o++)A[a.charCodeAt(o)]=o;for(var i=function(x){var f=x.length*.75,I=x.length,S,z=0,ee,Ae,be,Ee;x[x.length-1]==="="&&(f--,x[x.length-2]==="="&&f--);var Re=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(f):new Array(f),Me=Array.isArray(Re)?Re:new Uint8Array(Re);for(S=0;S<I;S+=4)ee=A[x.charCodeAt(S)],Ae=A[x.charCodeAt(S+1)],be=A[x.charCodeAt(S+2)],Ee=A[x.charCodeAt(S+3)],Me[z++]=ee<<2|Ae>>4,Me[z++]=(Ae&15)<<4|be>>2,Me[z++]=(be&3)<<6|Ee&63;return Re},r=function(x){for(var f=x.length,I=[],S=0;S<f;S+=2)I.push(x[S+1]<<8|x[S]);return I},t=function(x){for(var f=x.length,I=[],S=0;S<f;S+=4)I.push(x[S+3]<<24|x[S+2]<<16|x[S+1]<<8|x[S]);return I},E=5,_=6+5,y=2,B=_-E,C=65536>>E,d=1<<E,n=d-1,l=1024>>E,c=C+l,b=c,g=2048>>6,h=b+g,L=65536>>_,N=1<<B,T=N-1,M=function(x,f,I){return x.slice?x.slice(f,I):new Uint16Array(Array.prototype.slice.call(x,f,I))},W=function(x,f,I){return x.slice?x.slice(f,I):new Uint32Array(Array.prototype.slice.call(x,f,I))},U=function(x,f){var I=i(x),S=Array.isArray(I)?t(I):new Uint32Array(I),z=Array.isArray(I)?r(I):new Uint16Array(I),ee=24,Ae=M(z,ee/2,S[4]/2),be=S[5]===2?M(z,(ee+S[4])/2):W(S,Math.ceil((ee+S[4])/4));return new Y(S[0],S[1],S[2],S[3],Ae,be)},Y=function(){function x(f,I,S,z,ee,Ae){this.initialValue=f,this.errorValue=I,this.highStart=S,this.highValueIndex=z,this.index=ee,this.data=Ae}return x.prototype.get=function(f){var I;if(f>=0){if(f<55296||f>56319&&f<=65535)return I=this.index[f>>E],I=(I<<y)+(f&n),this.data[I];if(f<=65535)return I=this.index[C+(f-55296>>E)],I=(I<<y)+(f&n),this.data[I];if(f<this.highStart)return I=h-L+(f>>_),I=this.index[I],I+=f>>E&T,I=this.index[I],I=(I<<y)+(f&n),this.data[I];if(f<=1114111)return this.data[this.highValueIndex]}return this.errorValue},x}(),ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",me=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ge=0;ge<ne.length;ge++)me[ne.charCodeAt(ge)]=ge;var Oe="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Se=50,Be=1,Ne=2,ke=3,Ce=4,ve=5,Xe=7,lt=8,at=9,je=10,rt=11,re=12,J=13,k=14,$=15,q=16,he=17,de=18,Qe=19,ze=20,Ge=21,$e=22,nt=23,dt=24,xe=25,Ue=26,Ke=27,We=28,Le=29,Fe=30,we=31,ue=32,ce=33,te=34,ie=35,le=36,pe=37,Ie=38,Pe=39,qe=40,ft=41,ut=42,st=43,Lt=[9001,65288],mt="!",tt="\xD7",er="\xF7",Jt=U(Oe),Ot=[Fe,le],yt=[Be,Ne,ke,ve],Et=[je,lt],wt=[Ke,Ue],Mt=yt.concat(Et),ct=[Ie,Pe,qe,te,ie],lr=[$,J],At=function(x,f){f===void 0&&(f="strict");var I=[],S=[],z=[];return x.forEach(function(ee,Ae){var be=Jt.get(ee);if(be>Se?(z.push(!0),be-=Se):z.push(!1),["normal","auto","loose"].indexOf(f)!==-1&&[8208,8211,12316,12448].indexOf(ee)!==-1)return S.push(Ae),I.push(q);if(be===Ce||be===rt){if(Ae===0)return S.push(Ae),I.push(Fe);var Ee=I[Ae-1];return Mt.indexOf(Ee)===-1?(S.push(S[Ae-1]),I.push(Ee)):(S.push(Ae),I.push(Fe))}if(S.push(Ae),be===we)return I.push(f==="strict"?Ge:pe);if(be===ut)return I.push(Fe);if(be===Le)return I.push(Fe);if(be===st)return ee>=131072&&ee<=196605||ee>=196608&&ee<=262141?I.push(pe):I.push(Fe);I.push(be)}),[S,I,z]},gt=function(x,f,I,S){var z=S[I];if(Array.isArray(x)?x.indexOf(z)!==-1:x===z)for(var ee=I;ee<=S.length;){ee++;var Ae=S[ee];if(Ae===f)return!0;if(Ae!==je)break}if(z===je)for(var ee=I;ee>0;){ee--;var be=S[ee];if(Array.isArray(x)?x.indexOf(be)!==-1:x===be)for(var Ee=I;Ee<=S.length;){Ee++;var Ae=S[Ee];if(Ae===f)return!0;if(Ae!==je)break}if(be!==je)break}return!1},Nt=function(x,f){for(var I=x;I>=0;){var S=f[I];if(S===je)I--;else return S}return 0},ir=function(x,f,I,S,z){if(I[S]===0)return tt;var ee=S-1;if(Array.isArray(z)&&z[ee]===!0)return tt;var Ae=ee-1,be=ee+1,Ee=f[ee],Re=Ae>=0?f[Ae]:0,Me=f[be];if(Ee===Ne&&Me===ke)return tt;if(yt.indexOf(Ee)!==-1)return mt;if(yt.indexOf(Me)!==-1)return tt;if(Et.indexOf(Me)!==-1)return tt;if(Nt(ee,f)===lt)return er;if(Jt.get(x[ee])===rt)return tt;if((Ee===ue||Ee===ce)&&Jt.get(x[be])===rt)return tt;if(Ee===Xe||Me===Xe)return tt;if(Ee===at)return tt;if([je,J,$].indexOf(Ee)===-1&&Me===at)return tt;if([he,de,Qe,dt,We].indexOf(Me)!==-1)return tt;if(Nt(ee,f)===$e)return tt;if(gt(nt,$e,ee,f))return tt;if(gt([he,de],Ge,ee,f))return tt;if(gt(re,re,ee,f))return tt;if(Ee===je)return er;if(Ee===nt||Me===nt)return tt;if(Me===q||Ee===q)return er;if([J,$,Ge].indexOf(Me)!==-1||Ee===k)return tt;if(Re===le&&lr.indexOf(Ee)!==-1)return tt;if(Ee===We&&Me===le)return tt;if(Me===ze)return tt;if(Ot.indexOf(Me)!==-1&&Ee===xe||Ot.indexOf(Ee)!==-1&&Me===xe)return tt;if(Ee===Ke&&[pe,ue,ce].indexOf(Me)!==-1||[pe,ue,ce].indexOf(Ee)!==-1&&Me===Ue)return tt;if(Ot.indexOf(Ee)!==-1&&wt.indexOf(Me)!==-1||wt.indexOf(Ee)!==-1&&Ot.indexOf(Me)!==-1)return tt;if([Ke,Ue].indexOf(Ee)!==-1&&(Me===xe||[$e,$].indexOf(Me)!==-1&&f[be+1]===xe)||[$e,$].indexOf(Ee)!==-1&&Me===xe||Ee===xe&&[xe,We,dt].indexOf(Me)!==-1)return tt;if([xe,We,dt,he,de].indexOf(Me)!==-1)for(var Je=ee;Je>=0;){var Ze=f[Je];if(Ze===xe)return tt;if([We,dt].indexOf(Ze)!==-1)Je--;else break}if([Ke,Ue].indexOf(Me)!==-1)for(var Je=[he,de].indexOf(Ee)!==-1?Ae:ee;Je>=0;){var Ze=f[Je];if(Ze===xe)return tt;if([We,dt].indexOf(Ze)!==-1)Je--;else break}if(Ie===Ee&&[Ie,Pe,te,ie].indexOf(Me)!==-1||[Pe,te].indexOf(Ee)!==-1&&[Pe,qe].indexOf(Me)!==-1||[qe,ie].indexOf(Ee)!==-1&&Me===qe)return tt;if(ct.indexOf(Ee)!==-1&&[ze,Ue].indexOf(Me)!==-1||ct.indexOf(Me)!==-1&&Ee===Ke)return tt;if(Ot.indexOf(Ee)!==-1&&Ot.indexOf(Me)!==-1)return tt;if(Ee===dt&&Ot.indexOf(Me)!==-1)return tt;if(Ot.concat(xe).indexOf(Ee)!==-1&&Me===$e&&Lt.indexOf(x[be])===-1||Ot.concat(xe).indexOf(Me)!==-1&&Ee===de)return tt;if(Ee===ft&&Me===ft){for(var Bt=I[ee],pt=1;Bt>0&&(Bt--,f[Bt]===ft);)pt++;if(pt%2!==0)return tt}return Ee===ue&&Me===ce?tt:er},yr=function(x,f){f||(f={lineBreak:"normal",wordBreak:"normal"});var I=At(x,f.lineBreak),S=I[0],z=I[1],ee=I[2];(f.wordBreak==="break-all"||f.wordBreak==="break-word")&&(z=z.map(function(be){return[xe,Fe,ut].indexOf(be)!==-1?pe:be}));var Ae=f.wordBreak==="keep-all"?ee.map(function(be,Ee){return be&&x[Ee]>=19968&&x[Ee]<=40959}):void 0;return[S,z,Ae]},br=function(){function x(f,I,S,z){this.codePoints=f,this.required=I===mt,this.start=S,this.end=z}return x.prototype.slice=function(){return m.apply(void 0,this.codePoints.slice(this.start,this.end))},x}(),Rr=function(x,f){var I=R(x),S=yr(I,f),z=S[0],ee=S[1],Ae=S[2],be=I.length,Ee=0,Re=0;return{next:function(){if(Re>=be)return{done:!0,value:null};for(var Me=tt;Re<be&&(Me=ir(I,ee,z,++Re,Ae))===tt;);if(Me!==tt||Re===be){var Je=new br(I,Me,Ee,Re);return Ee=Re,{value:Je,done:!1}}return{done:!0,value:null}}}},Dr=1<<0,Ht=1<<1,pr=1<<2,Lr=1<<3,Cr=10,Qr=47,Ur=92,ae=9,oe=32,fe=34,Te=61,Ye=35,et=36,Q=37,p=39,w=40,H=41,Z=95,K=45,ye=33,He=60,it=62,ot=64,Ve=91,_t=93,vt=61,Tt=123,Pt=63,ur=125,Gt=124,ar=126,kt=128,Tr=65533,mr=42,$t=43,De=44,Qt=58,Vt=59,Dt=46,jt=0,Kt=8,Ar=11,zt=14,sr=31,rr=127,Ut=-1,Wt=48,Ft=97,tr=101,Zt=102,xr=117,qt=122,Fr=65,gr=69,Kr=70,Pr=85,Nr=90,fr=function(x){return x>=Wt&&x<=57},qr=function(x){return x>=55296&&x<=57343},Xt=function(x){return fr(x)||x>=Fr&&x<=Kr||x>=Ft&&x<=Zt},Sr=function(x){return x>=Ft&&x<=qt},kr=function(x){return x>=Fr&&x<=Nr},$r=function(x){return Sr(x)||kr(x)},un=function(x){return x>=kt},Yr=function(x){return x===Cr||x===ae||x===oe},rn=function(x){return $r(x)||un(x)||x===Z},mn=function(x){return rn(x)||fr(x)||x===K},Qn=function(x){return x>=jt&&x<=Kt||x===Ar||x>=zt&&x<=sr||x===rr},Jr=function(x,f){return x!==Ur?!1:f!==Cr},cn=function(x,f,I){return x===K?rn(f)||Jr(f,I):rn(x)?!0:!!(x===Ur&&Jr(x,f))},bn=function(x,f,I){return x===$t||x===K?fr(f)?!0:f===Dt&&fr(I):x===Dt?fr(f):fr(x)},gn=function(x){var f=0,I=1;(x[f]===$t||x[f]===K)&&(x[f]===K&&(I=-1),f++);for(var S=[];fr(x[f]);)S.push(x[f++]);var z=S.length?parseInt(m.apply(void 0,S),10):0;x[f]===Dt&&f++;for(var ee=[];fr(x[f]);)ee.push(x[f++]);var Ae=ee.length,be=Ae?parseInt(m.apply(void 0,ee),10):0;(x[f]===gr||x[f]===tr)&&f++;var Ee=1;(x[f]===$t||x[f]===K)&&(x[f]===K&&(Ee=-1),f++);for(var Re=[];fr(x[f]);)Re.push(x[f++]);var Me=Re.length?parseInt(m.apply(void 0,Re),10):0;return I*(z+be*Math.pow(10,-Ae))*Math.pow(10,Ee*Me)},ci={type:2},hi={type:3},di={type:4},fi={type:13},Zn={type:8},Ki={type:21},qn={type:9},ji={type:10},Wi={type:11},Gi={type:12},hr={type:14},cr={type:23},jr={type:1},en={type:25},Un={type:24},pi={type:26},ei={type:27},Vi={type:28},zi={type:29},$s={type:31},Xi={type:32},xa=function(){function x(){this._value=[]}return x.prototype.write=function(f){this._value=this._value.concat(R(f))},x.prototype.read=function(){for(var f=[],I=this.consumeToken();I!==Xi;)f.push(I),I=this.consumeToken();return f},x.prototype.consumeToken=function(){var f=this.consumeCodePoint();switch(f){case fe:return this.consumeStringToken(fe);case Ye:var I=this.peekCodePoint(0),S=this.peekCodePoint(1),z=this.peekCodePoint(2);if(mn(I)||Jr(S,z)){var ee=cn(I,S,z)?Ht:Dr,Ae=this.consumeName();return{type:5,value:Ae,flags:ee}}break;case et:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),fi;break;case p:return this.consumeStringToken(p);case w:return ci;case H:return hi;case mr:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),hr;break;case $t:if(bn(f,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(f),this.consumeNumericToken();break;case De:return di;case K:var be=f,Ee=this.peekCodePoint(0),Re=this.peekCodePoint(1);if(bn(be,Ee,Re))return this.reconsumeCodePoint(f),this.consumeNumericToken();if(cn(be,Ee,Re))return this.reconsumeCodePoint(f),this.consumeIdentLikeToken();if(Ee===K&&Re===it)return this.consumeCodePoint(),this.consumeCodePoint(),Un;break;case Dt:if(bn(f,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(f),this.consumeNumericToken();break;case Qr:if(this.peekCodePoint(0)===mr)for(this.consumeCodePoint();;){var Me=this.consumeCodePoint();if(Me===mr&&(Me=this.consumeCodePoint(),Me===Qr))return this.consumeToken();if(Me===Ut)return this.consumeToken()}break;case Qt:return pi;case Vt:return ei;case He:if(this.peekCodePoint(0)===ye&&this.peekCodePoint(1)===K&&this.peekCodePoint(2)===K)return this.consumeCodePoint(),this.consumeCodePoint(),en;break;case ot:var Je=this.peekCodePoint(0),Ze=this.peekCodePoint(1),Bt=this.peekCodePoint(2);if(cn(Je,Ze,Bt)){var Ae=this.consumeName();return{type:7,value:Ae}}break;case Ve:return Vi;case Ur:if(Jr(f,this.peekCodePoint(0)))return this.reconsumeCodePoint(f),this.consumeIdentLikeToken();break;case _t:return zi;case vt:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),Zn;break;case Tt:return Wi;case ur:return Gi;case xr:case Pr:var pt=this.peekCodePoint(0),bt=this.peekCodePoint(1);return pt===$t&&(Xt(bt)||bt===Pt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(f),this.consumeIdentLikeToken();case Gt:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),qn;if(this.peekCodePoint(0)===Gt)return this.consumeCodePoint(),Ki;break;case ar:if(this.peekCodePoint(0)===Te)return this.consumeCodePoint(),ji;break;case Ut:return Xi}return Yr(f)?(this.consumeWhiteSpace(),$s):fr(f)?(this.reconsumeCodePoint(f),this.consumeNumericToken()):rn(f)?(this.reconsumeCodePoint(f),this.consumeIdentLikeToken()):{type:6,value:m(f)}},x.prototype.consumeCodePoint=function(){var f=this._value.shift();return typeof f=="undefined"?-1:f},x.prototype.reconsumeCodePoint=function(f){this._value.unshift(f)},x.prototype.peekCodePoint=function(f){return f>=this._value.length?-1:this._value[f]},x.prototype.consumeUnicodeRangeToken=function(){for(var f=[],I=this.consumeCodePoint();Xt(I)&&f.length<6;)f.push(I),I=this.consumeCodePoint();for(var S=!1;I===Pt&&f.length<6;)f.push(I),I=this.consumeCodePoint(),S=!0;if(S){var z=parseInt(m.apply(void 0,f.map(function(Ee){return Ee===Pt?Wt:Ee})),16),ee=parseInt(m.apply(void 0,f.map(function(Ee){return Ee===Pt?Kr:Ee})),16);return{type:30,start:z,end:ee}}var Ae=parseInt(m.apply(void 0,f),16);if(this.peekCodePoint(0)===K&&Xt(this.peekCodePoint(1))){this.consumeCodePoint(),I=this.consumeCodePoint();for(var be=[];Xt(I)&&be.length<6;)be.push(I),I=this.consumeCodePoint();var ee=parseInt(m.apply(void 0,be),16);return{type:30,start:Ae,end:ee}}else return{type:30,start:Ae,end:Ae}},x.prototype.consumeIdentLikeToken=function(){var f=this.consumeName();return f.toLowerCase()==="url"&&this.peekCodePoint(0)===w?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===w?(this.consumeCodePoint(),{type:19,value:f}):{type:20,value:f}},x.prototype.consumeUrlToken=function(){var f=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut)return{type:22,value:""};var I=this.peekCodePoint(0);if(I===p||I===fe){var S=this.consumeStringToken(this.consumeCodePoint());return S.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut||this.peekCodePoint(0)===H)?(this.consumeCodePoint(),{type:22,value:S.value}):(this.consumeBadUrlRemnants(),cr)}for(;;){var z=this.consumeCodePoint();if(z===Ut||z===H)return{type:22,value:m.apply(void 0,f)};if(Yr(z))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut||this.peekCodePoint(0)===H?(this.consumeCodePoint(),{type:22,value:m.apply(void 0,f)}):(this.consumeBadUrlRemnants(),cr);if(z===fe||z===p||z===w||Qn(z))return this.consumeBadUrlRemnants(),cr;if(z===Ur)if(Jr(z,this.peekCodePoint(0)))f.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),cr;else f.push(z)}},x.prototype.consumeWhiteSpace=function(){for(;Yr(this.peekCodePoint(0));)this.consumeCodePoint()},x.prototype.consumeBadUrlRemnants=function(){for(;;){var f=this.consumeCodePoint();if(f===H||f===Ut)return;Jr(f,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},x.prototype.consumeStringSlice=function(f){for(var I=5e4,S="";f>0;){var z=Math.min(I,f);S+=m.apply(void 0,this._value.splice(0,z)),f-=z}return this._value.shift(),S},x.prototype.consumeStringToken=function(f){var I="",S=0;do{var z=this._value[S];if(z===Ut||z===void 0||z===f)return I+=this.consumeStringSlice(S),{type:0,value:I};if(z===Cr)return this._value.splice(0,S),jr;if(z===Ur){var ee=this._value[S+1];ee!==Ut&&ee!==void 0&&(ee===Cr?(I+=this.consumeStringSlice(S),S=-1,this._value.shift()):Jr(z,ee)&&(I+=this.consumeStringSlice(S),I+=m(this.consumeEscapedCodePoint()),S=-1))}S++}while(!0)},x.prototype.consumeNumber=function(){var f=[],I=pr,S=this.peekCodePoint(0);for((S===$t||S===K)&&f.push(this.consumeCodePoint());fr(this.peekCodePoint(0));)f.push(this.consumeCodePoint());S=this.peekCodePoint(0);var z=this.peekCodePoint(1);if(S===Dt&&fr(z))for(f.push(this.consumeCodePoint(),this.consumeCodePoint()),I=Lr;fr(this.peekCodePoint(0));)f.push(this.consumeCodePoint());S=this.peekCodePoint(0),z=this.peekCodePoint(1);var ee=this.peekCodePoint(2);if((S===gr||S===tr)&&((z===$t||z===K)&&fr(ee)||fr(z)))for(f.push(this.consumeCodePoint(),this.consumeCodePoint()),I=Lr;fr(this.peekCodePoint(0));)f.push(this.consumeCodePoint());return[gn(f),I]},x.prototype.consumeNumericToken=function(){var f=this.consumeNumber(),I=f[0],S=f[1],z=this.peekCodePoint(0),ee=this.peekCodePoint(1),Ae=this.peekCodePoint(2);if(cn(z,ee,Ae)){var be=this.consumeName();return{type:15,number:I,flags:S,unit:be}}return z===Q?(this.consumeCodePoint(),{type:16,number:I,flags:S}):{type:17,number:I,flags:S}},x.prototype.consumeEscapedCodePoint=function(){var f=this.consumeCodePoint();if(Xt(f)){for(var I=m(f);Xt(this.peekCodePoint(0))&&I.length<6;)I+=m(this.consumeCodePoint());Yr(this.peekCodePoint(0))&&this.consumeCodePoint();var S=parseInt(I,16);return S===0||qr(S)||S>1114111?Tr:S}return f===Ut?Tr:f},x.prototype.consumeName=function(){for(var f="";;){var I=this.consumeCodePoint();if(mn(I))f+=m(I);else if(Jr(I,this.peekCodePoint(0)))f+=m(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(I),f}},x}(),Ta=function(){function x(f){this._tokens=f}return x.create=function(f){var I=new xa;return I.write(f),new x(I.read())},x.parseValue=function(f){return x.create(f).parseComponentValue()},x.parseValues=function(f){return x.create(f).parseComponentValues()},x.prototype.parseComponentValue=function(){for(var f=this.consumeToken();f.type===31;)f=this.consumeToken();if(f.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(f);var I=this.consumeComponentValue();do f=this.consumeToken();while(f.type===31);if(f.type===32)return I;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},x.prototype.parseComponentValues=function(){for(var f=[];;){var I=this.consumeComponentValue();if(I.type===32)return f;f.push(I),f.push()}},x.prototype.consumeComponentValue=function(){var f=this.consumeToken();switch(f.type){case 11:case 28:case 2:return this.consumeSimpleBlock(f.type);case 19:return this.consumeFunction(f)}return f},x.prototype.consumeSimpleBlock=function(f){for(var I={type:f,values:[]},S=this.consumeToken();;){if(S.type===32||qs(S,f))return I;this.reconsumeToken(S),I.values.push(this.consumeComponentValue()),S=this.consumeToken()}},x.prototype.consumeFunction=function(f){for(var I={name:f.value,values:[],type:18};;){var S=this.consumeToken();if(S.type===32||S.type===3)return I;this.reconsumeToken(S),I.values.push(this.consumeComponentValue())}},x.prototype.consumeToken=function(){var f=this._tokens.shift();return typeof f=="undefined"?Xi:f},x.prototype.reconsumeToken=function(f){this._tokens.unshift(f)},x}(),ti=function(x){return x.type===15},Kn=function(x){return x.type===17},Br=function(x){return x.type===20},Zs=function(x){return x.type===0},Yi=function(x,f){return Br(x)&&x.value===f},Ba=function(x){return x.type!==31},jn=function(x){return x.type!==31&&x.type!==4},hn=function(x){var f=[],I=[];return x.forEach(function(S){if(S.type===4){if(I.length===0)throw new Error("Error parsing function args, zero tokens for arg");f.push(I),I=[];return}S.type!==31&&I.push(S)}),I.length&&f.push(I),f},qs=function(x,f){return f===11&&x.type===12||f===28&&x.type===29?!0:f===2&&x.type===3},wn=function(x){return x.type===17||x.type===15},Hr=function(x){return x.type===16||wn(x)},Sa=function(x){return x.length>1?[x[0],x[1]]:[x[0]]},zr={type:17,number:0,flags:pr},Ji={type:16,number:50,flags:pr},Cn={type:16,number:100,flags:pr},ri=function(x,f,I){var S=x[0],z=x[1];return[Ir(S,f),Ir(typeof z!="undefined"?z:S,I)]},Ir=function(x,f){if(x.type===16)return x.number/100*f;if(ti(x))switch(x.unit){case"rem":case"em":return 16*x.number;case"px":default:return x.number}return x.number},Ia="deg",Ra="grad",Oa="rad",La="turn",mi={name:"angle",parse:function(x,f){if(f.type===15)switch(f.unit){case Ia:return Math.PI*f.number/180;case Ra:return Math.PI/200*f.number;case Oa:return f.number;case La:return Math.PI*2*f.number}throw new Error("Unsupported angle type")}},Da=function(x){return x.type===15&&(x.unit===Ia||x.unit===Ra||x.unit===Oa||x.unit===La)},Ua=function(x){var f=x.filter(Br).map(function(I){return I.value}).join(" ");switch(f){case"to bottom right":case"to right bottom":case"left top":case"top left":return[zr,zr];case"to top":case"bottom":return an(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[zr,Cn];case"to right":case"left":return an(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Cn,Cn];case"to bottom":case"top":return an(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Cn,zr];case"to left":case"right":return an(270)}return 0},an=function(x){return Math.PI*x/180},xn={name:"color",parse:function(x,f){if(f.type===18){var I=eo[f.name];if(typeof I=="undefined")throw new Error('Attempting to parse an unsupported color function "'+f.name+'"');return I(x,f.values)}if(f.type===5){if(f.value.length===3){var S=f.value.substring(0,1),z=f.value.substring(1,2),ee=f.value.substring(2,3);return Bn(parseInt(S+S,16),parseInt(z+z,16),parseInt(ee+ee,16),1)}if(f.value.length===4){var S=f.value.substring(0,1),z=f.value.substring(1,2),ee=f.value.substring(2,3),Ae=f.value.substring(3,4);return Bn(parseInt(S+S,16),parseInt(z+z,16),parseInt(ee+ee,16),parseInt(Ae+Ae,16)/255)}if(f.value.length===6){var S=f.value.substring(0,2),z=f.value.substring(2,4),ee=f.value.substring(4,6);return Bn(parseInt(S,16),parseInt(z,16),parseInt(ee,16),1)}if(f.value.length===8){var S=f.value.substring(0,2),z=f.value.substring(2,4),ee=f.value.substring(4,6),Ae=f.value.substring(6,8);return Bn(parseInt(S,16),parseInt(z,16),parseInt(ee,16),parseInt(Ae,16)/255)}}if(f.type===20){var be=vn[f.value.toUpperCase()];if(typeof be!="undefined")return be}return vn.TRANSPARENT}},Tn=function(x){return(255&x)===0},Gr=function(x){var f=255&x,I=255&x>>8,S=255&x>>16,z=255&x>>24;return f<255?"rgba("+z+","+S+","+I+","+f/255+")":"rgb("+z+","+S+","+I+")"},Bn=function(x,f,I,S){return(x<<24|f<<16|I<<8|Math.round(S*255)<<0)>>>0},Fa=function(x,f){if(x.type===17)return x.number;if(x.type===16){var I=f===3?1:255;return f===3?x.number/100*I:Math.round(x.number/100*I)}return 0},Na=function(x,f){var I=f.filter(jn);if(I.length===3){var S=I.map(Fa),z=S[0],ee=S[1],Ae=S[2];return Bn(z,ee,Ae,1)}if(I.length===4){var be=I.map(Fa),z=be[0],ee=be[1],Ae=be[2],Ee=be[3];return Bn(z,ee,Ae,Ee)}return 0};function $i(x,f,I){return I<0&&(I+=1),I>=1&&(I-=1),I<1/6?(f-x)*I*6+x:I<1/2?f:I<2/3?(f-x)*6*(2/3-I)+x:x}var Ma=function(x,f){var I=f.filter(jn),S=I[0],z=I[1],ee=I[2],Ae=I[3],be=(S.type===17?an(S.number):mi.parse(x,S))/(Math.PI*2),Ee=Hr(z)?z.number/100:0,Re=Hr(ee)?ee.number/100:0,Me=typeof Ae!="undefined"&&Hr(Ae)?Ir(Ae,1):1;if(Ee===0)return Bn(Re*255,Re*255,Re*255,1);var Je=Re<=.5?Re*(Ee+1):Re+Ee-Re*Ee,Ze=Re*2-Je,Bt=$i(Ze,Je,be+1/3),pt=$i(Ze,Je,be),bt=$i(Ze,Je,be-1/3);return Bn(Bt*255,pt*255,bt*255,Me)},eo={hsl:Ma,hsla:Ma,rgb:Na,rgba:Na},ni=function(x,f){return xn.parse(x,Ta.create(f).parseComponentValue())},vn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},to={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(x,f){return f.map(function(I){if(Br(I))switch(I.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ro={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},gi=function(x,f){var I=xn.parse(x,f[0]),S=f[1];return S&&Hr(S)?{color:I,stop:S}:{color:I,stop:null}},Pa=function(x,f){var I=x[0],S=x[x.length-1];I.stop===null&&(I.stop=zr),S.stop===null&&(S.stop=Cn);for(var z=[],ee=0,Ae=0;Ae<x.length;Ae++){var be=x[Ae].stop;if(be!==null){var Ee=Ir(be,f);Ee>ee?z.push(Ee):z.push(ee),ee=Ee}else z.push(null)}for(var Re=null,Ae=0;Ae<z.length;Ae++){var Me=z[Ae];if(Me===null)Re===null&&(Re=Ae);else if(Re!==null){for(var Je=Ae-Re,Ze=z[Re-1],Bt=(Me-Ze)/(Je+1),pt=1;pt<=Je;pt++)z[Re+pt-1]=Bt*pt;Re=null}}return x.map(function(bt,Yt){var xt=bt.color;return{color:xt,stop:Math.max(Math.min(1,z[Yt]/f),0)}})},no=function(x,f,I){var S=f/2,z=I/2,ee=Ir(x[0],f)-S,Ae=z-Ir(x[1],I);return(Math.atan2(Ae,ee)+Math.PI*2)%(Math.PI*2)},io=function(x,f,I){var S=typeof x=="number"?x:no(x,f,I),z=Math.abs(f*Math.sin(S))+Math.abs(I*Math.cos(S)),ee=f/2,Ae=I/2,be=z/2,Ee=Math.sin(S-Math.PI/2)*be,Re=Math.cos(S-Math.PI/2)*be;return[z,ee-Re,ee+Re,Ae-Ee,Ae+Ee]},ln=function(x,f){return Math.sqrt(x*x+f*f)},ka=function(x,f,I,S,z){var ee=[[0,0],[0,f],[x,0],[x,f]];return ee.reduce(function(Ae,be){var Ee=be[0],Re=be[1],Me=ln(I-Ee,S-Re);return(z?Me<Ae.optimumDistance:Me>Ae.optimumDistance)?{optimumCorner:be,optimumDistance:Me}:Ae},{optimumDistance:z?Infinity:-Infinity,optimumCorner:null}).optimumCorner},ao=function(x,f,I,S,z){var ee=0,Ae=0;switch(x.size){case 0:x.shape===0?ee=Ae=Math.min(Math.abs(f),Math.abs(f-S),Math.abs(I),Math.abs(I-z)):x.shape===1&&(ee=Math.min(Math.abs(f),Math.abs(f-S)),Ae=Math.min(Math.abs(I),Math.abs(I-z)));break;case 2:if(x.shape===0)ee=Ae=Math.min(ln(f,I),ln(f,I-z),ln(f-S,I),ln(f-S,I-z));else if(x.shape===1){var be=Math.min(Math.abs(I),Math.abs(I-z))/Math.min(Math.abs(f),Math.abs(f-S)),Ee=ka(S,z,f,I,!0),Re=Ee[0],Me=Ee[1];ee=ln(Re-f,(Me-I)/be),Ae=be*ee}break;case 1:x.shape===0?ee=Ae=Math.max(Math.abs(f),Math.abs(f-S),Math.abs(I),Math.abs(I-z)):x.shape===1&&(ee=Math.max(Math.abs(f),Math.abs(f-S)),Ae=Math.max(Math.abs(I),Math.abs(I-z)));break;case 3:if(x.shape===0)ee=Ae=Math.max(ln(f,I),ln(f,I-z),ln(f-S,I),ln(f-S,I-z));else if(x.shape===1){var be=Math.max(Math.abs(I),Math.abs(I-z))/Math.max(Math.abs(f),Math.abs(f-S)),Je=ka(S,z,f,I,!1),Re=Je[0],Me=Je[1];ee=ln(Re-f,(Me-I)/be),Ae=be*ee}break}return Array.isArray(x.size)&&(ee=Ir(x.size[0],S),Ae=x.size.length===2?Ir(x.size[1],z):ee),[ee,Ae]},so=function(x,f){var I=an(180),S=[];return hn(f).forEach(function(z,ee){if(ee===0){var Ae=z[0];if(Ae.type===20&&Ae.value==="to"){I=Ua(z);return}else if(Da(Ae)){I=mi.parse(x,Ae);return}}var be=gi(x,z);S.push(be)}),{angle:I,stops:S,type:1}},vi=function(x,f){var I=an(180),S=[];return hn(f).forEach(function(z,ee){if(ee===0){var Ae=z[0];if(Ae.type===20&&["top","left","right","bottom"].indexOf(Ae.value)!==-1){I=Ua(z);return}else if(Da(Ae)){I=(mi.parse(x,Ae)+an(270))%an(360);return}}var be=gi(x,z);S.push(be)}),{angle:I,stops:S,type:1}},oo=function(x,f){var I=an(180),S=[],z=1,ee=0,Ae=3,be=[];return hn(f).forEach(function(Ee,Re){var Me=Ee[0];if(Re===0){if(Br(Me)&&Me.value==="linear"){z=1;return}else if(Br(Me)&&Me.value==="radial"){z=2;return}}if(Me.type===18){if(Me.name==="from"){var Je=xn.parse(x,Me.values[0]);S.push({stop:zr,color:Je})}else if(Me.name==="to"){var Je=xn.parse(x,Me.values[0]);S.push({stop:Cn,color:Je})}else if(Me.name==="color-stop"){var Ze=Me.values.filter(jn);if(Ze.length===2){var Je=xn.parse(x,Ze[1]),Bt=Ze[0];Kn(Bt)&&S.push({stop:{type:16,number:Bt.number*100,flags:Bt.flags},color:Je})}}}}),z===1?{angle:(I+an(180))%an(360),stops:S,type:z}:{size:Ae,shape:ee,stops:S,position:be,type:z}},Ha="closest-side",Qa="farthest-side",Ka="closest-corner",ja="farthest-corner",Wa="circle",Ga="ellipse",Va="cover",za="contain",Ao=function(x,f){var I=0,S=3,z=[],ee=[];return hn(f).forEach(function(Ae,be){var Ee=!0;if(be===0){var Re=!1;Ee=Ae.reduce(function(Je,Ze){if(Re)if(Br(Ze))switch(Ze.value){case"center":return ee.push(Ji),Je;case"top":case"left":return ee.push(zr),Je;case"right":case"bottom":return ee.push(Cn),Je}else(Hr(Ze)||wn(Ze))&&ee.push(Ze);else if(Br(Ze))switch(Ze.value){case Wa:return I=0,!1;case Ga:return I=1,!1;case"at":return Re=!0,!1;case Ha:return S=0,!1;case Va:case Qa:return S=1,!1;case za:case Ka:return S=2,!1;case ja:return S=3,!1}else if(wn(Ze)||Hr(Ze))return Array.isArray(S)||(S=[]),S.push(Ze),!1;return Je},Ee)}if(Ee){var Me=gi(x,Ae);z.push(Me)}}),{size:S,shape:I,stops:z,position:ee,type:2}},yi=function(x,f){var I=0,S=3,z=[],ee=[];return hn(f).forEach(function(Ae,be){var Ee=!0;if(be===0?Ee=Ae.reduce(function(Me,Je){if(Br(Je))switch(Je.value){case"center":return ee.push(Ji),!1;case"top":case"left":return ee.push(zr),!1;case"right":case"bottom":return ee.push(Cn),!1}else if(Hr(Je)||wn(Je))return ee.push(Je),!1;return Me},Ee):be===1&&(Ee=Ae.reduce(function(Me,Je){if(Br(Je))switch(Je.value){case Wa:return I=0,!1;case Ga:return I=1,!1;case za:case Ha:return S=0,!1;case Qa:return S=1,!1;case Ka:return S=2,!1;case Va:case ja:return S=3,!1}else if(wn(Je)||Hr(Je))return Array.isArray(S)||(S=[]),S.push(Je),!1;return Me},Ee)),Ee){var Re=gi(x,Ae);z.push(Re)}}),{size:S,shape:I,stops:z,position:ee,type:2}},lo=function(x){return x.type===1},uo=function(x){return x.type===2},Zi={name:"image",parse:function(x,f){if(f.type===22){var I={url:f.value,type:0};return x.cache.addImage(f.value),I}if(f.type===18){var S=Xa[f.name];if(typeof S=="undefined")throw new Error('Attempting to parse an unsupported image function "'+f.name+'"');return S(x,f.values)}throw new Error("Unsupported image type "+f.type)}};function co(x){return!(x.type===20&&x.value==="none")&&(x.type!==18||!!Xa[x.name])}var Xa={"linear-gradient":so,"-moz-linear-gradient":vi,"-ms-linear-gradient":vi,"-o-linear-gradient":vi,"-webkit-linear-gradient":vi,"radial-gradient":Ao,"-moz-radial-gradient":yi,"-ms-radial-gradient":yi,"-o-radial-gradient":yi,"-webkit-radial-gradient":yi,"-webkit-gradient":oo},ho={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(x,f){if(f.length===0)return[];var I=f[0];return I.type===20&&I.value==="none"?[]:f.filter(function(S){return jn(S)&&co(S)}).map(function(S){return Zi.parse(x,S)})}},fo={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(x,f){return f.map(function(I){if(Br(I))switch(I.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},po={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(x,f){return hn(f).map(function(I){return I.filter(Hr)}).map(Sa)}},mo={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(x,f){return hn(f).map(function(I){return I.filter(Br).map(function(S){return S.value}).join(" ")}).map(go)}},go=function(x){switch(x){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Wn;(function(x){x.AUTO="auto",x.CONTAIN="contain",x.COVER="cover"})(Wn||(Wn={}));var vo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(x,f){return hn(f).map(function(I){return I.filter(yo)})}},yo=function(x){return Br(x)||Hr(x)},Ei=function(x){return{name:"border-"+x+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Eo=Ei("top"),_o=Ei("right"),bo=Ei("bottom"),wo=Ei("left"),_i=function(x){return{name:"border-radius-"+x,initialValue:"0 0",prefix:!1,type:1,parse:function(f,I){return Sa(I.filter(Hr))}}},Co=_i("top-left"),xo=_i("top-right"),To=_i("bottom-right"),Bo=_i("bottom-left"),bi=function(x){return{name:"border-"+x+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(f,I){switch(I){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},So=bi("top"),Io=bi("right"),Ro=bi("bottom"),Oo=bi("left"),wi=function(x){return{name:"border-"+x+"-width",initialValue:"0",type:0,prefix:!1,parse:function(f,I){return ti(I)?I.number:0}}},Lo=wi("top"),Do=wi("right"),Uo=wi("bottom"),Fo=wi("left"),No={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Mo={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(x,f){switch(f){case"rtl":return 1;case"ltr":default:return 0}}},Po={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(x,f){return f.filter(Br).reduce(function(I,S){return I|ko(S.value)},0)}},ko=function(x){switch(x){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Ho={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(x,f){switch(f){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Qo={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(x,f){return f.type===20&&f.value==="normal"?0:f.type===17||f.type===15?f.number:0}},Ci;(function(x){x.NORMAL="normal",x.STRICT="strict"})(Ci||(Ci={}));var Ko={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(x,f){switch(f){case"strict":return Ci.STRICT;case"normal":default:return Ci.NORMAL}}},jo={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ya=function(x,f){return Br(x)&&x.value==="normal"?1.2*f:x.type===17?f*x.number:Hr(x)?Ir(x,f):f},Wo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(x,f){return f.type===20&&f.value==="none"?null:Zi.parse(x,f)}},Go={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(x,f){switch(f){case"inside":return 0;case"outside":default:return 1}}},qi={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(x,f){switch(f){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},xi=function(x){return{name:"margin-"+x,initialValue:"0",prefix:!1,type:4}},Vo=xi("top"),zo=xi("right"),Xo=xi("bottom"),Yo=xi("left"),Jo={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(x,f){return f.filter(Br).map(function(I){switch(I.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},$o={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(x,f){switch(f){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ti=function(x){return{name:"padding-"+x,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Zo=Ti("top"),qo=Ti("right"),eA=Ti("bottom"),tA=Ti("left"),rA={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(x,f){switch(f){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},nA={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(x,f){switch(f){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},iA={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(x,f){return f.length===1&&Yi(f[0],"none")?[]:hn(f).map(function(I){for(var S={color:vn.TRANSPARENT,offsetX:zr,offsetY:zr,blur:zr},z=0,ee=0;ee<I.length;ee++){var Ae=I[ee];wn(Ae)?(z===0?S.offsetX=Ae:z===1?S.offsetY=Ae:S.blur=Ae,z++):S.color=xn.parse(x,Ae)}return S})}},aA={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(x,f){switch(f){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},sA={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(x,f){if(f.type===20&&f.value==="none")return null;if(f.type===18){var I=lA[f.name];if(typeof I=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+f.name+'"');return I(f.values)}return null}},oA=function(x){var f=x.filter(function(I){return I.type===17}).map(function(I){return I.number});return f.length===6?f:null},AA=function(x){var f=x.filter(function(Ee){return Ee.type===17}).map(function(Ee){return Ee.number}),I=f[0],S=f[1];f[2],f[3];var z=f[4],ee=f[5];f[6],f[7],f[8],f[9],f[10],f[11];var Ae=f[12],be=f[13];return f[14],f[15],f.length===16?[I,S,z,ee,Ae,be]:null},lA={matrix:oA,matrix3d:AA},Ja={type:16,number:50,flags:pr},uA=[Ja,Ja],cA={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(x,f){var I=f.filter(Hr);return I.length!==2?uA:[I[0],I[1]]}},hA={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(x,f){switch(f){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},ii;(function(x){x.NORMAL="normal",x.BREAK_ALL="break-all",x.KEEP_ALL="keep-all"})(ii||(ii={}));for(var dA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(x,f){switch(f){case"break-all":return ii.BREAK_ALL;case"keep-all":return ii.KEEP_ALL;case"normal":default:return ii.NORMAL}}},fA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(x,f){if(f.type===20)return{auto:!0,order:0};if(Kn(f))return{auto:!1,order:f.number};throw new Error("Invalid z-index number parsed")}},$a={name:"time",parse:function(x,f){if(f.type===15)switch(f.unit.toLowerCase()){case"s":return 1e3*f.number;case"ms":return f.number}throw new Error("Unsupported time type")}},pA={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(x,f){return Kn(f)?f.number:1}},mA={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},gA={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(x,f){return f.filter(Br).map(function(I){switch(I.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(I){return I!==0})}},vA={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(x,f){var I=[],S=[];return f.forEach(function(z){switch(z.type){case 20:case 0:I.push(z.value);break;case 17:I.push(z.number.toString());break;case 4:S.push(I.join(" ")),I.length=0;break}}),I.length&&S.push(I.join(" ")),S.map(function(z){return z.indexOf(" ")===-1?z:"'"+z+"'"})}},yA={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},EA={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(x,f){if(Kn(f))return f.number;if(Br(f))switch(f.value){case"bold":return 700;case"normal":default:return 400}return 400}},_A={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(x,f){return f.filter(Br).map(function(I){return I.value})}},bA={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(x,f){switch(f){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Wr=function(x,f){return(x&f)!==0},wA={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(x,f){if(f.length===0)return[];var I=f[0];return I.type===20&&I.value==="none"?[]:f}},CA={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(x,f){if(f.length===0)return null;var I=f[0];if(I.type===20&&I.value==="none")return null;for(var S=[],z=f.filter(Ba),ee=0;ee<z.length;ee++){var Ae=z[ee],be=z[ee+1];if(Ae.type===20){var Ee=be&&Kn(be)?be.number:1;S.push({counter:Ae.value,increment:Ee})}}return S}},xA={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(x,f){if(f.length===0)return[];for(var I=[],S=f.filter(Ba),z=0;z<S.length;z++){var ee=S[z],Ae=S[z+1];if(Br(ee)&&ee.value!=="none"){var be=Ae&&Kn(Ae)?Ae.number:0;I.push({counter:ee.value,reset:be})}}return I}},TA={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(x,f){return f.filter(ti).map(function(I){return $a.parse(x,I)})}},BA={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(x,f){if(f.length===0)return null;var I=f[0];if(I.type===20&&I.value==="none")return null;var S=[],z=f.filter(Zs);if(z.length%2!==0)return null;for(var ee=0;ee<z.length;ee+=2){var Ae=z[ee].value,be=z[ee+1].value;S.push({open:Ae,close:be})}return S}},Za=function(x,f,I){if(!x)return"";var S=x[Math.min(f,x.length-1)];return S?I?S.open:S.close:""},SA={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(x,f){return f.length===1&&Yi(f[0],"none")?[]:hn(f).map(function(I){for(var S={color:255,offsetX:zr,offsetY:zr,blur:zr,spread:zr,inset:!1},z=0,ee=0;ee<I.length;ee++){var Ae=I[ee];Yi(Ae,"inset")?S.inset=!0:wn(Ae)?(z===0?S.offsetX=Ae:z===1?S.offsetY=Ae:z===2?S.blur=Ae:S.spread=Ae,z++):S.color=xn.parse(x,Ae)}return S})}},IA={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(x,f){var I=[0,1,2],S=[];return f.filter(Br).forEach(function(z){switch(z.value){case"stroke":S.push(1);break;case"fill":S.push(0);break;case"markers":S.push(2);break}}),I.forEach(function(z){S.indexOf(z)===-1&&S.push(z)}),S}},RA={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},OA={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(x,f){return ti(f)?f.number:0}},LA=function(){function x(f,I){var S,z;this.animationDuration=It(f,TA,I.animationDuration),this.backgroundClip=It(f,to,I.backgroundClip),this.backgroundColor=It(f,ro,I.backgroundColor),this.backgroundImage=It(f,ho,I.backgroundImage),this.backgroundOrigin=It(f,fo,I.backgroundOrigin),this.backgroundPosition=It(f,po,I.backgroundPosition),this.backgroundRepeat=It(f,mo,I.backgroundRepeat),this.backgroundSize=It(f,vo,I.backgroundSize),this.borderTopColor=It(f,Eo,I.borderTopColor),this.borderRightColor=It(f,_o,I.borderRightColor),this.borderBottomColor=It(f,bo,I.borderBottomColor),this.borderLeftColor=It(f,wo,I.borderLeftColor),this.borderTopLeftRadius=It(f,Co,I.borderTopLeftRadius),this.borderTopRightRadius=It(f,xo,I.borderTopRightRadius),this.borderBottomRightRadius=It(f,To,I.borderBottomRightRadius),this.borderBottomLeftRadius=It(f,Bo,I.borderBottomLeftRadius),this.borderTopStyle=It(f,So,I.borderTopStyle),this.borderRightStyle=It(f,Io,I.borderRightStyle),this.borderBottomStyle=It(f,Ro,I.borderBottomStyle),this.borderLeftStyle=It(f,Oo,I.borderLeftStyle),this.borderTopWidth=It(f,Lo,I.borderTopWidth),this.borderRightWidth=It(f,Do,I.borderRightWidth),this.borderBottomWidth=It(f,Uo,I.borderBottomWidth),this.borderLeftWidth=It(f,Fo,I.borderLeftWidth),this.boxShadow=It(f,SA,I.boxShadow),this.color=It(f,No,I.color),this.direction=It(f,Mo,I.direction),this.display=It(f,Po,I.display),this.float=It(f,Ho,I.cssFloat),this.fontFamily=It(f,vA,I.fontFamily),this.fontSize=It(f,yA,I.fontSize),this.fontStyle=It(f,bA,I.fontStyle),this.fontVariant=It(f,_A,I.fontVariant),this.fontWeight=It(f,EA,I.fontWeight),this.letterSpacing=It(f,Qo,I.letterSpacing),this.lineBreak=It(f,Ko,I.lineBreak),this.lineHeight=It(f,jo,I.lineHeight),this.listStyleImage=It(f,Wo,I.listStyleImage),this.listStylePosition=It(f,Go,I.listStylePosition),this.listStyleType=It(f,qi,I.listStyleType),this.marginTop=It(f,Vo,I.marginTop),this.marginRight=It(f,zo,I.marginRight),this.marginBottom=It(f,Xo,I.marginBottom),this.marginLeft=It(f,Yo,I.marginLeft),this.opacity=It(f,pA,I.opacity);var ee=It(f,Jo,I.overflow);this.overflowX=ee[0],this.overflowY=ee[ee.length>1?1:0],this.overflowWrap=It(f,$o,I.overflowWrap),this.paddingTop=It(f,Zo,I.paddingTop),this.paddingRight=It(f,qo,I.paddingRight),this.paddingBottom=It(f,eA,I.paddingBottom),this.paddingLeft=It(f,tA,I.paddingLeft),this.paintOrder=It(f,IA,I.paintOrder),this.position=It(f,nA,I.position),this.textAlign=It(f,rA,I.textAlign),this.textDecorationColor=It(f,mA,(S=I.textDecorationColor)!==null&&S!==void 0?S:I.color),this.textDecorationLine=It(f,gA,(z=I.textDecorationLine)!==null&&z!==void 0?z:I.textDecoration),this.textShadow=It(f,iA,I.textShadow),this.textTransform=It(f,aA,I.textTransform),this.transform=It(f,sA,I.transform),this.transformOrigin=It(f,cA,I.transformOrigin),this.visibility=It(f,hA,I.visibility),this.webkitTextStrokeColor=It(f,RA,I.webkitTextStrokeColor),this.webkitTextStrokeWidth=It(f,OA,I.webkitTextStrokeWidth),this.wordBreak=It(f,dA,I.wordBreak),this.zIndex=It(f,fA,I.zIndex)}return x.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},x.prototype.isTransparent=function(){return Tn(this.backgroundColor)},x.prototype.isTransformed=function(){return this.transform!==null},x.prototype.isPositioned=function(){return this.position!==0},x.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},x.prototype.isFloating=function(){return this.float!==0},x.prototype.isInlineLevel=function(){return Wr(this.display,4)||Wr(this.display,33554432)||Wr(this.display,268435456)||Wr(this.display,536870912)||Wr(this.display,67108864)||Wr(this.display,134217728)},x}(),DA=function(){function x(f,I){this.content=It(f,wA,I.content),this.quotes=It(f,BA,I.quotes)}return x}(),qa=function(){function x(f,I){this.counterIncrement=It(f,CA,I.counterIncrement),this.counterReset=It(f,xA,I.counterReset)}return x}(),It=function(x,f,I){var S=new xa,z=I!==null&&typeof I!="undefined"?I.toString():f.initialValue;S.write(z);var ee=new Ta(S.read());switch(f.type){case 2:var Ae=ee.parseComponentValue();return f.parse(x,Br(Ae)?Ae.value:f.initialValue);case 0:return f.parse(x,ee.parseComponentValue());case 1:return f.parse(x,ee.parseComponentValues());case 4:return ee.parseComponentValue();case 3:switch(f.format){case"angle":return mi.parse(x,ee.parseComponentValue());case"color":return xn.parse(x,ee.parseComponentValue());case"image":return Zi.parse(x,ee.parseComponentValue());case"length":var be=ee.parseComponentValue();return wn(be)?be:zr;case"length-percentage":var Ee=ee.parseComponentValue();return Hr(Ee)?Ee:zr;case"time":return $a.parse(x,ee.parseComponentValue())}break}},UA="data-html2canvas-debug",FA=function(x){var f=x.getAttribute(UA);switch(f){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ea=function(x,f){var I=FA(x);return I===1||f===I},dn=function(){function x(f,I){if(this.context=f,this.textNodes=[],this.elements=[],this.flags=0,ea(I,3))debugger;this.styles=new LA(f,window.getComputedStyle(I,null)),fa(I)&&(this.styles.animationDuration.some(function(S){return S>0})&&(I.style.animationDuration="0s"),this.styles.transform!==null&&(I.style.transform="none")),this.bounds=P(this.context,I),ea(I,4)&&(this.flags|=16)}return x}(),NA="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ai=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Bi=0;Bi<es.length;Bi++)ai[es.charCodeAt(Bi)]=Bi;for(var MA=function(x){var f=x.length*.75,I=x.length,S,z=0,ee,Ae,be,Ee;x[x.length-1]==="="&&(f--,x[x.length-2]==="="&&f--);var Re=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(f):new Array(f),Me=Array.isArray(Re)?Re:new Uint8Array(Re);for(S=0;S<I;S+=4)ee=ai[x.charCodeAt(S)],Ae=ai[x.charCodeAt(S+1)],be=ai[x.charCodeAt(S+2)],Ee=ai[x.charCodeAt(S+3)],Me[z++]=ee<<2|Ae>>4,Me[z++]=(Ae&15)<<4|be>>2,Me[z++]=(be&3)<<6|Ee&63;return Re},PA=function(x){for(var f=x.length,I=[],S=0;S<f;S+=2)I.push(x[S+1]<<8|x[S]);return I},kA=function(x){for(var f=x.length,I=[],S=0;S<f;S+=4)I.push(x[S+3]<<24|x[S+2]<<16|x[S+1]<<8|x[S]);return I},Fn=5,ta=6+5,ra=2,HA=ta-Fn,ts=65536>>Fn,QA=1<<Fn,na=QA-1,KA=1024>>Fn,jA=ts+KA,WA=jA,GA=2048>>6,VA=WA+GA,zA=65536>>ta,XA=1<<HA,YA=XA-1,rs=function(x,f,I){return x.slice?x.slice(f,I):new Uint16Array(Array.prototype.slice.call(x,f,I))},JA=function(x,f,I){return x.slice?x.slice(f,I):new Uint32Array(Array.prototype.slice.call(x,f,I))},$A=function(x,f){var I=MA(x),S=Array.isArray(I)?kA(I):new Uint32Array(I),z=Array.isArray(I)?PA(I):new Uint16Array(I),ee=24,Ae=rs(z,ee/2,S[4]/2),be=S[5]===2?rs(z,(ee+S[4])/2):JA(S,Math.ceil((ee+S[4])/4));return new ZA(S[0],S[1],S[2],S[3],Ae,be)},ZA=function(){function x(f,I,S,z,ee,Ae){this.initialValue=f,this.errorValue=I,this.highStart=S,this.highValueIndex=z,this.index=ee,this.data=Ae}return x.prototype.get=function(f){var I;if(f>=0){if(f<55296||f>56319&&f<=65535)return I=this.index[f>>Fn],I=(I<<ra)+(f&na),this.data[I];if(f<=65535)return I=this.index[ts+(f-55296>>Fn)],I=(I<<ra)+(f&na),this.data[I];if(f<this.highStart)return I=VA-zA+(f>>ta),I=this.index[I],I+=f>>Fn&YA,I=this.index[I],I=(I<<ra)+(f&na),this.data[I];if(f<=1114111)return this.data[this.highValueIndex]}return this.errorValue},x}(),ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Si=0;Si<ns.length;Si++)qA[ns.charCodeAt(Si)]=Si;var el=1,ia=2,aa=3,is=4,as=5,tl=7,ss=8,sa=9,oa=10,os=11,As=12,ls=13,us=14,Aa=15,rl=function(x){for(var f=[],I=0,S=x.length;I<S;){var z=x.charCodeAt(I++);if(z>=55296&&z<=56319&&I<S){var ee=x.charCodeAt(I++);(ee&64512)===56320?f.push(((z&1023)<<10)+(ee&1023)+65536):(f.push(z),I--)}else f.push(z)}return f},nl=function(){for(var x=[],f=0;f<arguments.length;f++)x[f]=arguments[f];if(String.fromCodePoint)return String.fromCodePoint.apply(String,x);var I=x.length;if(!I)return"";for(var S=[],z=-1,ee="";++z<I;){var Ae=x[z];Ae<=65535?S.push(Ae):(Ae-=65536,S.push((Ae>>10)+55296,Ae%1024+56320)),(z+1===I||S.length>16384)&&(ee+=String.fromCharCode.apply(String,S),S.length=0)}return ee},il=$A(NA),sn="\xD7",la="\xF7",al=function(x){return il.get(x)},sl=function(x,f,I){var S=I-2,z=f[S],ee=f[I-1],Ae=f[I];if(ee===ia&&Ae===aa)return sn;if(ee===ia||ee===aa||ee===is)return la;if(Ae===ia||Ae===aa||Ae===is)return la;if(ee===ss&&[ss,sa,os,As].indexOf(Ae)!==-1)return sn;if((ee===os||ee===sa)&&(Ae===sa||Ae===oa))return sn;if((ee===As||ee===oa)&&Ae===oa)return sn;if(Ae===ls||Ae===as)return sn;if(Ae===tl)return sn;if(ee===el)return sn;if(ee===ls&&Ae===us){for(;z===as;)z=f[--S];if(z===us)return sn}if(ee===Aa&&Ae===Aa){for(var be=0;z===Aa;)be++,z=f[--S];if(be%2===0)return sn}return la},ol=function(x){var f=rl(x),I=f.length,S=0,z=0,ee=f.map(al);return{next:function(){if(S>=I)return{done:!0,value:null};for(var Ae=sn;S<I&&(Ae=sl(f,ee,++S))===sn;);if(Ae!==sn||S===I){var be=nl.apply(null,f.slice(z,S));return z=S,{value:be,done:!1}}return{done:!0,value:null}}}},Al=function(x){for(var f=ol(x),I=[],S;!(S=f.next()).done;)S.value&&I.push(S.value.slice());return I},ll=function(x){var f=123;if(x.createRange){var I=x.createRange();if(I.getBoundingClientRect){var S=x.createElement("boundtest");S.style.height=f+"px",S.style.display="block",x.body.appendChild(S),I.selectNode(S);var z=I.getBoundingClientRect(),ee=Math.round(z.height);if(x.body.removeChild(S),ee===f)return!0}}return!1},ul=function(x){var f=x.createElement("boundtest");f.style.width="50px",f.style.display="block",f.style.fontSize="12px",f.style.letterSpacing="0px",f.style.wordSpacing="0px",x.body.appendChild(f);var I=x.createRange();f.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var S=f.firstChild,z=R(S.data).map(function(Ee){return m(Ee)}),ee=0,Ae={},be=z.every(function(Ee,Re){I.setStart(S,ee),I.setEnd(S,ee+Ee.length);var Me=I.getBoundingClientRect();ee+=Ee.length;var Je=Me.x>Ae.x||Me.y>Ae.y;return Ae=Me,Re===0?!0:Je});return x.body.removeChild(f),be},cl=function(){return typeof new Image().crossOrigin!="undefined"},hl=function(){return typeof new XMLHttpRequest().responseType=="string"},dl=function(x){var f=new Image,I=x.createElement("canvas"),S=I.getContext("2d");if(!S)return!1;f.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{S.drawImage(f,0,0),I.toDataURL()}catch(z){return!1}return!0},cs=function(x){return x[0]===0&&x[1]===255&&x[2]===0&&x[3]===255},fl=function(x){var f=x.createElement("canvas"),I=100;f.width=I,f.height=I;var S=f.getContext("2d");if(!S)return Promise.reject(!1);S.fillStyle="rgb(0, 255, 0)",S.fillRect(0,0,I,I);var z=new Image,ee=f.toDataURL();z.src=ee;var Ae=ua(I,I,0,0,z);return S.fillStyle="red",S.fillRect(0,0,I,I),hs(Ae).then(function(be){S.drawImage(be,0,0);var Ee=S.getImageData(0,0,I,I).data;S.fillStyle="red",S.fillRect(0,0,I,I);var Re=x.createElement("div");return Re.style.backgroundImage="url("+ee+")",Re.style.height=I+"px",cs(Ee)?hs(ua(I,I,0,0,Re)):Promise.reject(!1)}).then(function(be){return S.drawImage(be,0,0),cs(S.getImageData(0,0,I,I).data)}).catch(function(){return!1})},ua=function(x,f,I,S,z){var ee="http://www.w3.org/2000/svg",Ae=document.createElementNS(ee,"svg"),be=document.createElementNS(ee,"foreignObject");return Ae.setAttributeNS(null,"width",x.toString()),Ae.setAttributeNS(null,"height",f.toString()),be.setAttributeNS(null,"width","100%"),be.setAttributeNS(null,"height","100%"),be.setAttributeNS(null,"x",I.toString()),be.setAttributeNS(null,"y",S.toString()),be.setAttributeNS(null,"externalResourcesRequired","true"),Ae.appendChild(be),be.appendChild(z),Ae},hs=function(x){return new Promise(function(f,I){var S=new Image;S.onload=function(){return f(S)},S.onerror=I,S.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(x))})},Xr={get SUPPORT_RANGE_BOUNDS(){var x=ll(document);return Object.defineProperty(Xr,"SUPPORT_RANGE_BOUNDS",{value:x}),x},get SUPPORT_WORD_BREAKING(){var x=Xr.SUPPORT_RANGE_BOUNDS&&ul(document);return Object.defineProperty(Xr,"SUPPORT_WORD_BREAKING",{value:x}),x},get SUPPORT_SVG_DRAWING(){var x=dl(document);return Object.defineProperty(Xr,"SUPPORT_SVG_DRAWING",{value:x}),x},get SUPPORT_FOREIGNOBJECT_DRAWING(){var x=typeof Array.from=="function"&&typeof window.fetch=="function"?fl(document):Promise.resolve(!1);return Object.defineProperty(Xr,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:x}),x},get SUPPORT_CORS_IMAGES(){var x=cl();return Object.defineProperty(Xr,"SUPPORT_CORS_IMAGES",{value:x}),x},get SUPPORT_RESPONSE_TYPE(){var x=hl();return Object.defineProperty(Xr,"SUPPORT_RESPONSE_TYPE",{value:x}),x},get SUPPORT_CORS_XHR(){var x="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Xr,"SUPPORT_CORS_XHR",{value:x}),x},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var x=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Xr,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:x}),x}},si=function(){function x(f,I){this.text=f,this.bounds=I}return x}(),pl=function(x,f,I,S){var z=vl(f,I),ee=[],Ae=0;return z.forEach(function(be){if(I.textDecorationLine.length||be.trim().length>0)if(Xr.SUPPORT_RANGE_BOUNDS){var Ee=ds(S,Ae,be.length).getClientRects();if(Ee.length>1){var Re=ca(be),Me=0;Re.forEach(function(Ze){ee.push(new si(Ze,X.fromDOMRectList(x,ds(S,Me+Ae,Ze.length).getClientRects()))),Me+=Ze.length})}else ee.push(new si(be,X.fromDOMRectList(x,Ee)))}else{var Je=S.splitText(be.length);ee.push(new si(be,ml(x,S))),S=Je}else Xr.SUPPORT_RANGE_BOUNDS||(S=S.splitText(be.length));Ae+=be.length}),ee},ml=function(x,f){var I=f.ownerDocument;if(I){var S=I.createElement("html2canvaswrapper");S.appendChild(f.cloneNode(!0));var z=f.parentNode;if(z){z.replaceChild(S,f);var ee=P(x,S);return S.firstChild&&z.replaceChild(S.firstChild,S),ee}}return X.EMPTY},ds=function(x,f,I){var S=x.ownerDocument;if(!S)throw new Error("Node has no owner document");var z=S.createRange();return z.setStart(x,f),z.setEnd(x,f+I),z},ca=function(x){if(Xr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var f=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(f.segment(x)).map(function(I){return I.segment})}return Al(x)},gl=function(x,f){if(Xr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var I=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(I.segment(x)).map(function(S){return S.segment})}return El(x,f)},vl=function(x,f){return f.letterSpacing!==0?ca(x):gl(x,f)},yl=[32,160,4961,65792,65793,4153,4241],El=function(x,f){for(var I=Rr(x,{lineBreak:f.lineBreak,wordBreak:f.overflowWrap==="break-word"?"break-word":f.wordBreak}),S=[],z,ee=function(){if(z.value){var Ae=z.value.slice(),be=R(Ae),Ee="";be.forEach(function(Re){yl.indexOf(Re)===-1?Ee+=m(Re):(Ee.length&&S.push(Ee),S.push(m(Re)),Ee="")}),Ee.length&&S.push(Ee)}};!(z=I.next()).done;)ee();return S},_l=function(){function x(f,I,S){this.text=bl(I.data,S.textTransform),this.textBounds=pl(f,this.text,S,I)}return x}(),bl=function(x,f){switch(f){case 1:return x.toLowerCase();case 3:return x.replace(wl,Cl);case 2:return x.toUpperCase();default:return x}},wl=/(^|\s|:|-|\(|\))([a-z])/g,Cl=function(x,f,I){return x.length>0?f+I.toUpperCase():x},fs=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.src=S.currentSrc||S.src,z.intrinsicWidth=S.naturalWidth,z.intrinsicHeight=S.naturalHeight,z.context.cache.addImage(z.src),z}return f}(dn),ps=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.canvas=S,z.intrinsicWidth=S.width,z.intrinsicHeight=S.height,z}return f}(dn),ms=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this,ee=new XMLSerializer,Ae=P(I,S);return S.setAttribute("width",Ae.width+"px"),S.setAttribute("height",Ae.height+"px"),z.svg="data:image/svg+xml,"+encodeURIComponent(ee.serializeToString(S)),z.intrinsicWidth=S.width.baseVal.value,z.intrinsicHeight=S.height.baseVal.value,z.context.cache.addImage(z.svg),z}return f}(dn),gs=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.value=S.value,z}return f}(dn),ha=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.start=S.start,z.reversed=typeof S.reversed=="boolean"&&S.reversed===!0,z}return f}(dn),xl=[{type:15,flags:0,unit:"px",number:3}],Tl=[{type:16,flags:0,number:50}],Bl=function(x){return x.width>x.height?new X(x.left+(x.width-x.height)/2,x.top,x.height,x.height):x.width<x.height?new X(x.left,x.top+(x.height-x.width)/2,x.width,x.width):x},Sl=function(x){var f=x.type===Il?new Array(x.value.length+1).join("\u2022"):x.value;return f.length===0?x.placeholder||"":f},Ii="checkbox",Ri="radio",Il="password",vs=707406591,da=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;z.type=S.type.toLowerCase(),z.checked=S.checked,z.value=Sl(S),(z.type===Ii||z.type===Ri)&&(z.styles.backgroundColor=3739148031,z.styles.borderTopColor=z.styles.borderRightColor=z.styles.borderBottomColor=z.styles.borderLeftColor=2779096575,z.styles.borderTopWidth=z.styles.borderRightWidth=z.styles.borderBottomWidth=z.styles.borderLeftWidth=1,z.styles.borderTopStyle=z.styles.borderRightStyle=z.styles.borderBottomStyle=z.styles.borderLeftStyle=1,z.styles.backgroundClip=[0],z.styles.backgroundOrigin=[0],z.bounds=Bl(z.bounds));switch(z.type){case Ii:z.styles.borderTopRightRadius=z.styles.borderTopLeftRadius=z.styles.borderBottomRightRadius=z.styles.borderBottomLeftRadius=xl;break;case Ri:z.styles.borderTopRightRadius=z.styles.borderTopLeftRadius=z.styles.borderBottomRightRadius=z.styles.borderBottomLeftRadius=Tl;break}return z}return f}(dn),ys=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this,ee=S.options[S.selectedIndex||0];return z.value=ee&&ee.text||"",z}return f}(dn),Es=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.value=S.value,z}return f}(dn),_s=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;z.src=S.src,z.width=parseInt(S.width,10)||0,z.height=parseInt(S.height,10)||0,z.backgroundColor=z.styles.backgroundColor;try{if(S.contentWindow&&S.contentWindow.document&&S.contentWindow.document.documentElement){z.tree=ws(I,S.contentWindow.document.documentElement);var ee=S.contentWindow.document.documentElement?ni(I,getComputedStyle(S.contentWindow.document.documentElement).backgroundColor):vn.TRANSPARENT,Ae=S.contentWindow.document.body?ni(I,getComputedStyle(S.contentWindow.document.body).backgroundColor):vn.TRANSPARENT;z.backgroundColor=Tn(ee)?Tn(Ae)?z.styles.backgroundColor:Ae:ee}}catch(be){}return z}return f}(dn),Rl=["OL","UL","MENU"],Oi=function(x,f,I,S){for(var z=f.firstChild,ee=void 0;z;z=ee)if(ee=z.nextSibling,Cs(z)&&z.data.trim().length>0)I.textNodes.push(new _l(x,z,I.styles));else if(Gn(z))if(Rs(z)&&z.assignedNodes)z.assignedNodes().forEach(function(be){return Oi(x,be,I,S)});else{var Ae=bs(x,z);Ae.styles.isVisible()&&(Ol(z,Ae,S)?Ae.flags|=4:Ll(Ae.styles)&&(Ae.flags|=2),Rl.indexOf(z.tagName)!==-1&&(Ae.flags|=8),I.elements.push(Ae),z.slot,z.shadowRoot?Oi(x,z.shadowRoot,Ae,S):!Di(z)&&!xs(z)&&!Ui(z)&&Oi(x,z,Ae,S))}},bs=function(x,f){return ma(f)?new fs(x,f):Ts(f)?new ps(x,f):xs(f)?new ms(x,f):Dl(f)?new gs(x,f):Ul(f)?new ha(x,f):Fl(f)?new da(x,f):Ui(f)?new ys(x,f):Di(f)?new Es(x,f):Ss(f)?new _s(x,f):new dn(x,f)},ws=function(x,f){var I=bs(x,f);return I.flags|=4,Oi(x,f,I,I),I},Ol=function(x,f,I){return f.styles.isPositionedWithZIndex()||f.styles.opacity<1||f.styles.isTransformed()||pa(x)&&I.styles.isTransparent()},Ll=function(x){return x.isPositioned()||x.isFloating()},Cs=function(x){return x.nodeType===Node.TEXT_NODE},Gn=function(x){return x.nodeType===Node.ELEMENT_NODE},fa=function(x){return Gn(x)&&typeof x.style!="undefined"&&!Li(x)},Li=function(x){return typeof x.className=="object"},Dl=function(x){return x.tagName==="LI"},Ul=function(x){return x.tagName==="OL"},Fl=function(x){return x.tagName==="INPUT"},Nl=function(x){return x.tagName==="HTML"},xs=function(x){return x.tagName==="svg"},pa=function(x){return x.tagName==="BODY"},Ts=function(x){return x.tagName==="CANVAS"},Bs=function(x){return x.tagName==="VIDEO"},ma=function(x){return x.tagName==="IMG"},Ss=function(x){return x.tagName==="IFRAME"},Is=function(x){return x.tagName==="STYLE"},Ml=function(x){return x.tagName==="SCRIPT"},Di=function(x){return x.tagName==="TEXTAREA"},Ui=function(x){return x.tagName==="SELECT"},Rs=function(x){return x.tagName==="SLOT"},Os=function(x){return x.tagName.indexOf("-")>0},Pl=function(){function x(){this.counters={}}return x.prototype.getCounterValue=function(f){var I=this.counters[f];return I&&I.length?I[I.length-1]:1},x.prototype.getCounterValues=function(f){var I=this.counters[f];return I||[]},x.prototype.pop=function(f){var I=this;f.forEach(function(S){return I.counters[S].pop()})},x.prototype.parse=function(f){var I=this,S=f.counterIncrement,z=f.counterReset,ee=!0;S!==null&&S.forEach(function(be){var Ee=I.counters[be.counter];Ee&&be.increment!==0&&(ee=!1,Ee.length||Ee.push(1),Ee[Math.max(0,Ee.length-1)]+=be.increment)});var Ae=[];return ee&&z.forEach(function(be){var Ee=I.counters[be.counter];Ae.push(be.counter),Ee||(Ee=I.counters[be.counter]=[]),Ee.push(be.reset)}),Ae},x}(),Ls={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Ds={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},kl={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Hl={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},Vn=function(x,f,I,S,z,ee){return x<f||x>I?Ai(x,z,ee.length>0):S.integers.reduce(function(Ae,be,Ee){for(;x>=be;)x-=be,Ae+=S.values[Ee];return Ae},"")+ee},Us=function(x,f,I,S){var z="";do I||x--,z=S(x)+z,x/=f;while(x*f>=f);return z},Mr=function(x,f,I,S,z){var ee=I-f+1;return(x<0?"-":"")+(Us(Math.abs(x),ee,S,function(Ae){return m(Math.floor(Ae%ee)+f)})+z)},Nn=function(x,f,I){I===void 0&&(I=". ");var S=f.length;return Us(Math.abs(x),S,!1,function(z){return f[Math.floor(z%S)]})+I},zn=1<<0,Sn=1<<1,In=1<<2,oi=1<<3,yn=function(x,f,I,S,z,ee){if(x<-9999||x>9999)return Ai(x,4,z.length>0);var Ae=Math.abs(x),be=z;if(Ae===0)return f[0]+be;for(var Ee=0;Ae>0&&Ee<=4;Ee++){var Re=Ae%10;Re===0&&Wr(ee,zn)&&be!==""?be=f[Re]+be:Re>1||Re===1&&Ee===0||Re===1&&Ee===1&&Wr(ee,Sn)||Re===1&&Ee===1&&Wr(ee,In)&&x>100||Re===1&&Ee>1&&Wr(ee,oi)?be=f[Re]+(Ee>0?I[Ee-1]:"")+be:Re===1&&Ee>0&&(be=I[Ee-1]+be),Ae=Math.floor(Ae/10)}return(x<0?S:"")+be},Fs="\u5341\u767E\u5343\u842C",Ns="\u62FE\u4F70\u4EDF\u842C",Ms="\u30DE\u30A4\u30CA\u30B9",ga="\uB9C8\uC774\uB108\uC2A4",Ai=function(x,f,I){var S=I?". ":"",z=I?"\u3001":"",ee=I?", ":"",Ae=I?" ":"";switch(f){case 0:return"\u2022"+Ae;case 1:return"\u25E6"+Ae;case 2:return"\u25FE"+Ae;case 5:var be=Mr(x,48,57,!0,S);return be.length<4?"0"+be:be;case 4:return Nn(x,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",z);case 6:return Vn(x,1,3999,Ls,3,S).toLowerCase();case 7:return Vn(x,1,3999,Ls,3,S);case 8:return Mr(x,945,969,!1,S);case 9:return Mr(x,97,122,!1,S);case 10:return Mr(x,65,90,!1,S);case 11:return Mr(x,1632,1641,!0,S);case 12:case 49:return Vn(x,1,9999,Ds,3,S);case 35:return Vn(x,1,9999,Ds,3,S).toLowerCase();case 13:return Mr(x,2534,2543,!0,S);case 14:case 30:return Mr(x,6112,6121,!0,S);case 15:return Nn(x,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",z);case 16:return Nn(x,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",z);case 17:case 48:return yn(x,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8CA0",z,Sn|In|oi);case 47:return yn(x,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ns,"\u8CA0",z,zn|Sn|In|oi);case 42:return yn(x,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8D1F",z,Sn|In|oi);case 41:return yn(x,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ns,"\u8D1F",z,zn|Sn|In|oi);case 26:return yn(x,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Ms,z,0);case 25:return yn(x,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Ms,z,zn|Sn|In);case 31:return yn(x,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",ga,ee,zn|Sn|In);case 33:return yn(x,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",ga,ee,0);case 32:return yn(x,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",ga,ee,zn|Sn|In);case 18:return Mr(x,2406,2415,!0,S);case 20:return Vn(x,1,19999,Hl,3,S);case 21:return Mr(x,2790,2799,!0,S);case 22:return Mr(x,2662,2671,!0,S);case 22:return Vn(x,1,10999,kl,3,S);case 23:return Nn(x,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Nn(x,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return Mr(x,3302,3311,!0,S);case 28:return Nn(x,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",z);case 29:return Nn(x,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",z);case 34:return Mr(x,3792,3801,!0,S);case 37:return Mr(x,6160,6169,!0,S);case 38:return Mr(x,4160,4169,!0,S);case 39:return Mr(x,2918,2927,!0,S);case 40:return Mr(x,1776,1785,!0,S);case 43:return Mr(x,3046,3055,!0,S);case 44:return Mr(x,3174,3183,!0,S);case 45:return Mr(x,3664,3673,!0,S);case 46:return Mr(x,3872,3881,!0,S);case 3:default:return Mr(x,48,57,!0,S)}},Ps="data-html2canvas-ignore",ks=function(){function x(f,I,S){if(this.context=f,this.options=S,this.scrolledElements=[],this.referenceElement=I,this.counters=new Pl,this.quoteDepth=0,!I.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(I.ownerDocument.documentElement,!1)}return x.prototype.toIFrame=function(f,I){var S=this,z=Ql(f,I);if(!z.contentWindow)return Promise.reject("Unable to find iframe window");var ee=f.defaultView.pageXOffset,Ae=f.defaultView.pageYOffset,be=z.contentWindow,Ee=be.document,Re=Wl(z).then(function(){return V(S,void 0,void 0,function(){var Me,Je;return F(this,function(Ze){switch(Ze.label){case 0:return this.scrolledElements.forEach(Xl),be&&(be.scrollTo(I.left,I.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(be.scrollY!==I.top||be.scrollX!==I.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(be.scrollX-I.left,be.scrollY-I.top,0,0))),Me=this.options.onclone,Je=this.clonedReferenceElement,typeof Je=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Ee.fonts&&Ee.fonts.ready?[4,Ee.fonts.ready]:[3,2];case 1:Ze.sent(),Ze.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,jl(Ee)]:[3,4];case 3:Ze.sent(),Ze.label=4;case 4:return typeof Me=="function"?[2,Promise.resolve().then(function(){return Me(Ee,Je)}).then(function(){return z})]:[2,z]}})})});return Ee.open(),Ee.write(Vl(document.doctype)+"<html></html>"),zl(this.referenceElement.ownerDocument,ee,Ae),Ee.replaceChild(Ee.adoptNode(this.documentElement),Ee.documentElement),Ee.close(),Re},x.prototype.createElementClone=function(f){if(ea(f,2))debugger;if(Ts(f))return this.createCanvasClone(f);if(Bs(f))return this.createVideoClone(f);if(Is(f))return this.createStyleClone(f);var I=f.cloneNode(!1);return ma(I)&&(ma(f)&&f.currentSrc&&f.currentSrc!==f.src&&(I.src=f.currentSrc,I.srcset=""),I.loading==="lazy"&&(I.loading="eager")),Os(I)?this.createCustomElementClone(I):I},x.prototype.createCustomElementClone=function(f){var I=document.createElement("html2canvascustomelement");return va(f.style,I),I},x.prototype.createStyleClone=function(f){try{var I=f.sheet;if(I&&I.cssRules){var S=[].slice.call(I.cssRules,0).reduce(function(ee,Ae){return Ae&&typeof Ae.cssText=="string"?ee+Ae.cssText:ee},""),z=f.cloneNode(!1);return z.textContent=S,z}}catch(ee){if(this.context.logger.error("Unable to access cssRules property",ee),ee.name!=="SecurityError")throw ee}return f.cloneNode(!1)},x.prototype.createCanvasClone=function(f){var I;if(this.options.inlineImages&&f.ownerDocument){var S=f.ownerDocument.createElement("img");try{return S.src=f.toDataURL(),S}catch(Re){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",f)}}var z=f.cloneNode(!1);try{z.width=f.width,z.height=f.height;var ee=f.getContext("2d"),Ae=z.getContext("2d");if(Ae)if(!this.options.allowTaint&&ee)Ae.putImageData(ee.getImageData(0,0,f.width,f.height),0,0);else{var be=(I=f.getContext("webgl2"))!==null&&I!==void 0?I:f.getContext("webgl");if(be){var Ee=be.getContextAttributes();(Ee==null?void 0:Ee.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",f)}Ae.drawImage(f,0,0)}return z}catch(Re){this.context.logger.info("Unable to clone canvas as it is tainted",f)}return z},x.prototype.createVideoClone=function(f){var I=f.ownerDocument.createElement("canvas");I.width=f.offsetWidth,I.height=f.offsetHeight;var S=I.getContext("2d");try{return S&&(S.drawImage(f,0,0,I.width,I.height),this.options.allowTaint||S.getImageData(0,0,I.width,I.height)),I}catch(ee){this.context.logger.info("Unable to clone video as it is tainted",f)}var z=f.ownerDocument.createElement("canvas");return z.width=f.offsetWidth,z.height=f.offsetHeight,z},x.prototype.appendChildNode=function(f,I,S){(!Gn(I)||!Ml(I)&&!I.hasAttribute(Ps)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(I)))&&((!this.options.copyStyles||!Gn(I)||!Is(I))&&f.appendChild(this.cloneNode(I,S)))},x.prototype.cloneChildNodes=function(f,I,S){for(var z=this,ee=f.shadowRoot?f.shadowRoot.firstChild:f.firstChild;ee;ee=ee.nextSibling)if(Gn(ee)&&Rs(ee)&&typeof ee.assignedNodes=="function"){var Ae=ee.assignedNodes();Ae.length&&Ae.forEach(function(be){return z.appendChildNode(I,be,S)})}else this.appendChildNode(I,ee,S)},x.prototype.cloneNode=function(f,I){if(Cs(f))return document.createTextNode(f.data);if(!f.ownerDocument)return f.cloneNode(!1);var S=f.ownerDocument.defaultView;if(S&&Gn(f)&&(fa(f)||Li(f))){var z=this.createElementClone(f);z.style.transitionProperty="none";var ee=S.getComputedStyle(f),Ae=S.getComputedStyle(f,":before"),be=S.getComputedStyle(f,":after");this.referenceElement===f&&fa(z)&&(this.clonedReferenceElement=z),pa(z)&&$l(z);var Ee=this.counters.parse(new qa(this.context,ee)),Re=this.resolvePseudoContent(f,z,Ae,li.BEFORE);Os(f)&&(I=!0),Bs(f)||this.cloneChildNodes(f,z,I),Re&&z.insertBefore(Re,z.firstChild);var Me=this.resolvePseudoContent(f,z,be,li.AFTER);return Me&&z.appendChild(Me),this.counters.pop(Ee),(ee&&(this.options.copyStyles||Li(f))&&!Ss(f)||I)&&va(ee,z),(f.scrollTop!==0||f.scrollLeft!==0)&&this.scrolledElements.push([z,f.scrollLeft,f.scrollTop]),(Di(f)||Ui(f))&&(Di(z)||Ui(z))&&(z.value=f.value),z}return f.cloneNode(!1)},x.prototype.resolvePseudoContent=function(f,I,S,z){var ee=this;if(!S)return;var Ae=S.content,be=I.ownerDocument;if(!be||!Ae||Ae==="none"||Ae==="-moz-alt-content"||S.display==="none")return;this.counters.parse(new qa(this.context,S));var Ee=new DA(this.context,S),Re=be.createElement("html2canvaspseudoelement");va(S,Re),Ee.content.forEach(function(Je){if(Je.type===0)Re.appendChild(be.createTextNode(Je.value));else if(Je.type===22){var Ze=be.createElement("img");Ze.src=Je.value,Ze.style.opacity="1",Re.appendChild(Ze)}else if(Je.type===18){if(Je.name==="attr"){var Bt=Je.values.filter(Br);Bt.length&&Re.appendChild(be.createTextNode(f.getAttribute(Bt[0].value)||""))}else if(Je.name==="counter"){var pt=Je.values.filter(jn),bt=pt[0],Yt=pt[1];if(bt&&Br(bt)){var xt=ee.counters.getCounterValue(bt.value),Rt=Yt&&Br(Yt)?qi.parse(ee.context,Yt.value):3;Re.appendChild(be.createTextNode(Ai(xt,Rt,!1)))}}else if(Je.name==="counters"){var dr=Je.values.filter(jn),bt=dr[0],or=dr[1],Yt=dr[2];if(bt&&Br(bt)){var Er=ee.counters.getCounterValues(bt.value),St=Yt&&Br(Yt)?qi.parse(ee.context,Yt.value):3,vr=or&&or.type===0?or.value:"",_r=Er.map(function(Zr){return Ai(Zr,St,!1)}).join(vr);Re.appendChild(be.createTextNode(_r))}}}else if(Je.type===20)switch(Je.value){case"open-quote":Re.appendChild(be.createTextNode(Za(Ee.quotes,ee.quoteDepth++,!0)));break;case"close-quote":Re.appendChild(be.createTextNode(Za(Ee.quotes,--ee.quoteDepth,!1)));break;default:Re.appendChild(be.createTextNode(Je.value))}}),Re.className=ya+" "+Ea;var Me=z===li.BEFORE?" "+ya:" "+Ea;return Li(I)?I.className.baseValue+=Me:I.className+=Me,Re},x.destroy=function(f){return f.parentNode?(f.parentNode.removeChild(f),!0):!1},x}(),li;(function(x){x[x.BEFORE=0]="BEFORE",x[x.AFTER=1]="AFTER"})(li||(li={}));var Ql=function(x,f){var I=x.createElement("iframe");return I.className="html2canvas-container",I.style.visibility="hidden",I.style.position="fixed",I.style.left="-10000px",I.style.top="0px",I.style.border="0",I.width=f.width.toString(),I.height=f.height.toString(),I.scrolling="no",I.setAttribute(Ps,"true"),x.body.appendChild(I),I},Kl=function(x){return new Promise(function(f){if(x.complete){f();return}if(!x.src){f();return}x.onload=f,x.onerror=f})},jl=function(x){return Promise.all([].slice.call(x.images,0).map(Kl))},Wl=function(x){return new Promise(function(f,I){var S=x.contentWindow;if(!S)return I("No window assigned for iframe");var z=S.document;S.onload=x.onload=function(){S.onload=x.onload=null;var ee=setInterval(function(){z.body.childNodes.length>0&&z.readyState==="complete"&&(clearInterval(ee),f(x))},50)}})},Gl=["all","d","content"],va=function(x,f){for(var I=x.length-1;I>=0;I--){var S=x.item(I);Gl.indexOf(S)===-1&&f.style.setProperty(S,x.getPropertyValue(S))}return f},Vl=function(x){var f="";return x&&(f+="<!DOCTYPE ",x.name&&(f+=x.name),x.internalSubset&&(f+=x.internalSubset),x.publicId&&(f+='"'+x.publicId+'"'),x.systemId&&(f+='"'+x.systemId+'"'),f+=">"),f},zl=function(x,f,I){x&&x.defaultView&&(f!==x.defaultView.pageXOffset||I!==x.defaultView.pageYOffset)&&x.defaultView.scrollTo(f,I)},Xl=function(x){var f=x[0],I=x[1],S=x[2];f.scrollLeft=I,f.scrollTop=S},Yl=":before",Jl=":after",ya="___html2canvas___pseudoelement_before",Ea="___html2canvas___pseudoelement_after",Hs=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,$l=function(x){Zl(x,"."+ya+Yl+Hs+`
|
|
.`+Ea+Jl+Hs)},Zl=function(x,f){var I=x.ownerDocument;if(I){var S=I.createElement("style");S.textContent=f,x.appendChild(S)}},Qs=function(){function x(){}return x.getOrigin=function(f){var I=x._link;return I?(I.href=f,I.href=I.href,I.protocol+I.hostname+I.port):"about:blank"},x.isSameOrigin=function(f){return x.getOrigin(f)===x._origin},x.setContext=function(f){x._link=f.document.createElement("a"),x._origin=x.getOrigin(f.location.href)},x._origin="about:blank",x}(),ql=function(){function x(f,I){this.context=f,this._options=I,this._cache={}}return x.prototype.addImage=function(f){var I=Promise.resolve();return this.has(f)||(ba(f)||nu(f))&&(this._cache[f]=this.loadImage(f)).catch(function(){}),I},x.prototype.match=function(f){return this._cache[f]},x.prototype.loadImage=function(f){return V(this,void 0,void 0,function(){var I,S,z,ee,Ae=this;return F(this,function(be){switch(be.label){case 0:return I=Qs.isSameOrigin(f),S=!_a(f)&&this._options.useCORS===!0&&Xr.SUPPORT_CORS_IMAGES&&!I,z=!_a(f)&&!I&&!ba(f)&&typeof this._options.proxy=="string"&&Xr.SUPPORT_CORS_XHR&&!S,!I&&this._options.allowTaint===!1&&!_a(f)&&!ba(f)&&!z&&!S?[2]:(ee=f,z?[4,this.proxy(ee)]:[3,2]);case 1:ee=be.sent(),be.label=2;case 2:return this.context.logger.debug("Added image "+f.substring(0,256)),[4,new Promise(function(Ee,Re){var Me=new Image;Me.onload=function(){return Ee(Me)},Me.onerror=Re,(iu(ee)||S)&&(Me.crossOrigin="anonymous"),Me.src=ee,Me.complete===!0&&setTimeout(function(){return Ee(Me)},500),Ae._options.imageTimeout>0&&setTimeout(function(){return Re("Timed out ("+Ae._options.imageTimeout+"ms) loading image")},Ae._options.imageTimeout)})];case 3:return[2,be.sent()]}})})},x.prototype.has=function(f){return typeof this._cache[f]!="undefined"},x.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},x.prototype.proxy=function(f){var I=this,S=this._options.proxy;if(!S)throw new Error("No proxy defined");var z=f.substring(0,256);return new Promise(function(ee,Ae){var be=Xr.SUPPORT_RESPONSE_TYPE?"blob":"text",Ee=new XMLHttpRequest;Ee.onload=function(){if(Ee.status===200)if(be==="text")ee(Ee.response);else{var Je=new FileReader;Je.addEventListener("load",function(){return ee(Je.result)},!1),Je.addEventListener("error",function(Ze){return Ae(Ze)},!1),Je.readAsDataURL(Ee.response)}else Ae("Failed to proxy resource "+z+" with status code "+Ee.status)},Ee.onerror=Ae;var Re=S.indexOf("?")>-1?"&":"?";if(Ee.open("GET",""+S+Re+"url="+encodeURIComponent(f)+"&responseType="+be),be!=="text"&&Ee instanceof XMLHttpRequest&&(Ee.responseType=be),I._options.imageTimeout){var Me=I._options.imageTimeout;Ee.timeout=Me,Ee.ontimeout=function(){return Ae("Timed out ("+Me+"ms) proxying "+z)}}Ee.send()})},x}(),eu=/^data:image\/svg\+xml/i,tu=/^data:image\/.*;base64,/i,ru=/^data:image\/.*/i,nu=function(x){return Xr.SUPPORT_SVG_DRAWING||!au(x)},_a=function(x){return ru.test(x)},iu=function(x){return tu.test(x)},ba=function(x){return x.substr(0,4)==="blob"},au=function(x){return x.substr(-3).toLowerCase()==="svg"||eu.test(x)},Ct=function(){function x(f,I){this.type=0,this.x=f,this.y=I}return x.prototype.add=function(f,I){return new x(this.x+f,this.y+I)},x}(),Xn=function(x,f,I){return new Ct(x.x+(f.x-x.x)*I,x.y+(f.y-x.y)*I)},Fi=function(){function x(f,I,S,z){this.type=1,this.start=f,this.startControl=I,this.endControl=S,this.end=z}return x.prototype.subdivide=function(f,I){var S=Xn(this.start,this.startControl,f),z=Xn(this.startControl,this.endControl,f),ee=Xn(this.endControl,this.end,f),Ae=Xn(S,z,f),be=Xn(z,ee,f),Ee=Xn(Ae,be,f);return I?new x(this.start,S,Ae,Ee):new x(Ee,be,ee,this.end)},x.prototype.add=function(f,I){return new x(this.start.add(f,I),this.startControl.add(f,I),this.endControl.add(f,I),this.end.add(f,I))},x.prototype.reverse=function(){return new x(this.end,this.endControl,this.startControl,this.start)},x}(),on=function(x){return x.type===1},su=function(){function x(f){var I=f.styles,S=f.bounds,z=ri(I.borderTopLeftRadius,S.width,S.height),ee=z[0],Ae=z[1],be=ri(I.borderTopRightRadius,S.width,S.height),Ee=be[0],Re=be[1],Me=ri(I.borderBottomRightRadius,S.width,S.height),Je=Me[0],Ze=Me[1],Bt=ri(I.borderBottomLeftRadius,S.width,S.height),pt=Bt[0],bt=Bt[1],Yt=[];Yt.push((ee+Ee)/S.width),Yt.push((pt+Je)/S.width),Yt.push((Ae+bt)/S.height),Yt.push((Re+Ze)/S.height);var xt=Math.max.apply(Math,Yt);xt>1&&(ee/=xt,Ae/=xt,Ee/=xt,Re/=xt,Je/=xt,Ze/=xt,pt/=xt,bt/=xt);var Rt=S.width-Ee,dr=S.height-Ze,or=S.width-Je,Er=S.height-bt,St=I.borderTopWidth,vr=I.borderRightWidth,_r=I.borderBottomWidth,nr=I.borderLeftWidth,tn=Ir(I.paddingTop,f.bounds.width),Zr=Ir(I.paddingRight,f.bounds.width),nn=Ir(I.paddingBottom,f.bounds.width),Vr=Ir(I.paddingLeft,f.bounds.width);this.topLeftBorderDoubleOuterBox=ee>0||Ae>0?Or(S.left+nr/3,S.top+St/3,ee-nr/3,Ae-St/3,wr.TOP_LEFT):new Ct(S.left+nr/3,S.top+St/3),this.topRightBorderDoubleOuterBox=ee>0||Ae>0?Or(S.left+Rt,S.top+St/3,Ee-vr/3,Re-St/3,wr.TOP_RIGHT):new Ct(S.left+S.width-vr/3,S.top+St/3),this.bottomRightBorderDoubleOuterBox=Je>0||Ze>0?Or(S.left+or,S.top+dr,Je-vr/3,Ze-_r/3,wr.BOTTOM_RIGHT):new Ct(S.left+S.width-vr/3,S.top+S.height-_r/3),this.bottomLeftBorderDoubleOuterBox=pt>0||bt>0?Or(S.left+nr/3,S.top+Er,pt-nr/3,bt-_r/3,wr.BOTTOM_LEFT):new Ct(S.left+nr/3,S.top+S.height-_r/3),this.topLeftBorderDoubleInnerBox=ee>0||Ae>0?Or(S.left+nr*2/3,S.top+St*2/3,ee-nr*2/3,Ae-St*2/3,wr.TOP_LEFT):new Ct(S.left+nr*2/3,S.top+St*2/3),this.topRightBorderDoubleInnerBox=ee>0||Ae>0?Or(S.left+Rt,S.top+St*2/3,Ee-vr*2/3,Re-St*2/3,wr.TOP_RIGHT):new Ct(S.left+S.width-vr*2/3,S.top+St*2/3),this.bottomRightBorderDoubleInnerBox=Je>0||Ze>0?Or(S.left+or,S.top+dr,Je-vr*2/3,Ze-_r*2/3,wr.BOTTOM_RIGHT):new Ct(S.left+S.width-vr*2/3,S.top+S.height-_r*2/3),this.bottomLeftBorderDoubleInnerBox=pt>0||bt>0?Or(S.left+nr*2/3,S.top+Er,pt-nr*2/3,bt-_r*2/3,wr.BOTTOM_LEFT):new Ct(S.left+nr*2/3,S.top+S.height-_r*2/3),this.topLeftBorderStroke=ee>0||Ae>0?Or(S.left+nr/2,S.top+St/2,ee-nr/2,Ae-St/2,wr.TOP_LEFT):new Ct(S.left+nr/2,S.top+St/2),this.topRightBorderStroke=ee>0||Ae>0?Or(S.left+Rt,S.top+St/2,Ee-vr/2,Re-St/2,wr.TOP_RIGHT):new Ct(S.left+S.width-vr/2,S.top+St/2),this.bottomRightBorderStroke=Je>0||Ze>0?Or(S.left+or,S.top+dr,Je-vr/2,Ze-_r/2,wr.BOTTOM_RIGHT):new Ct(S.left+S.width-vr/2,S.top+S.height-_r/2),this.bottomLeftBorderStroke=pt>0||bt>0?Or(S.left+nr/2,S.top+Er,pt-nr/2,bt-_r/2,wr.BOTTOM_LEFT):new Ct(S.left+nr/2,S.top+S.height-_r/2),this.topLeftBorderBox=ee>0||Ae>0?Or(S.left,S.top,ee,Ae,wr.TOP_LEFT):new Ct(S.left,S.top),this.topRightBorderBox=Ee>0||Re>0?Or(S.left+Rt,S.top,Ee,Re,wr.TOP_RIGHT):new Ct(S.left+S.width,S.top),this.bottomRightBorderBox=Je>0||Ze>0?Or(S.left+or,S.top+dr,Je,Ze,wr.BOTTOM_RIGHT):new Ct(S.left+S.width,S.top+S.height),this.bottomLeftBorderBox=pt>0||bt>0?Or(S.left,S.top+Er,pt,bt,wr.BOTTOM_LEFT):new Ct(S.left,S.top+S.height),this.topLeftPaddingBox=ee>0||Ae>0?Or(S.left+nr,S.top+St,Math.max(0,ee-nr),Math.max(0,Ae-St),wr.TOP_LEFT):new Ct(S.left+nr,S.top+St),this.topRightPaddingBox=Ee>0||Re>0?Or(S.left+Math.min(Rt,S.width-vr),S.top+St,Rt>S.width+vr?0:Math.max(0,Ee-vr),Math.max(0,Re-St),wr.TOP_RIGHT):new Ct(S.left+S.width-vr,S.top+St),this.bottomRightPaddingBox=Je>0||Ze>0?Or(S.left+Math.min(or,S.width-nr),S.top+Math.min(dr,S.height-_r),Math.max(0,Je-vr),Math.max(0,Ze-_r),wr.BOTTOM_RIGHT):new Ct(S.left+S.width-vr,S.top+S.height-_r),this.bottomLeftPaddingBox=pt>0||bt>0?Or(S.left+nr,S.top+Math.min(Er,S.height-_r),Math.max(0,pt-nr),Math.max(0,bt-_r),wr.BOTTOM_LEFT):new Ct(S.left+nr,S.top+S.height-_r),this.topLeftContentBox=ee>0||Ae>0?Or(S.left+nr+Vr,S.top+St+tn,Math.max(0,ee-(nr+Vr)),Math.max(0,Ae-(St+tn)),wr.TOP_LEFT):new Ct(S.left+nr+Vr,S.top+St+tn),this.topRightContentBox=Ee>0||Re>0?Or(S.left+Math.min(Rt,S.width+nr+Vr),S.top+St+tn,Rt>S.width+nr+Vr?0:Ee-nr+Vr,Re-(St+tn),wr.TOP_RIGHT):new Ct(S.left+S.width-(vr+Zr),S.top+St+tn),this.bottomRightContentBox=Je>0||Ze>0?Or(S.left+Math.min(or,S.width-(nr+Vr)),S.top+Math.min(dr,S.height+St+tn),Math.max(0,Je-(vr+Zr)),Ze-(_r+nn),wr.BOTTOM_RIGHT):new Ct(S.left+S.width-(vr+Zr),S.top+S.height-(_r+nn)),this.bottomLeftContentBox=pt>0||bt>0?Or(S.left+nr+Vr,S.top+Er,Math.max(0,pt-(nr+Vr)),bt-(_r+nn),wr.BOTTOM_LEFT):new Ct(S.left+nr+Vr,S.top+S.height-(_r+nn))}return x}(),wr;(function(x){x[x.TOP_LEFT=0]="TOP_LEFT",x[x.TOP_RIGHT=1]="TOP_RIGHT",x[x.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",x[x.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(wr||(wr={}));var Or=function(x,f,I,S,z){var ee=4*((Math.sqrt(2)-1)/3),Ae=I*ee,be=S*ee,Ee=x+I,Re=f+S;switch(z){case wr.TOP_LEFT:return new Fi(new Ct(x,Re),new Ct(x,Re-be),new Ct(Ee-Ae,f),new Ct(Ee,f));case wr.TOP_RIGHT:return new Fi(new Ct(x,f),new Ct(x+Ae,f),new Ct(Ee,Re-be),new Ct(Ee,Re));case wr.BOTTOM_RIGHT:return new Fi(new Ct(Ee,f),new Ct(Ee,f+be),new Ct(x+Ae,Re),new Ct(x,Re));case wr.BOTTOM_LEFT:default:return new Fi(new Ct(Ee,Re),new Ct(Ee-Ae,Re),new Ct(x,f+be),new Ct(x,f))}},Ni=function(x){return[x.topLeftBorderBox,x.topRightBorderBox,x.bottomRightBorderBox,x.bottomLeftBorderBox]},ou=function(x){return[x.topLeftContentBox,x.topRightContentBox,x.bottomRightContentBox,x.bottomLeftContentBox]},Mi=function(x){return[x.topLeftPaddingBox,x.topRightPaddingBox,x.bottomRightPaddingBox,x.bottomLeftPaddingBox]},Au=function(){function x(f,I,S){this.offsetX=f,this.offsetY=I,this.matrix=S,this.type=0,this.target=2|4}return x}(),Pi=function(){function x(f,I){this.path=f,this.target=I,this.type=1}return x}(),lu=function(){function x(f){this.opacity=f,this.type=2,this.target=2|4}return x}(),uu=function(x){return x.type===0},Ks=function(x){return x.type===1},cu=function(x){return x.type===2},js=function(x,f){return x.length===f.length?x.some(function(I,S){return I===f[S]}):!1},hu=function(x,f,I,S,z){return x.map(function(ee,Ae){switch(Ae){case 0:return ee.add(f,I);case 1:return ee.add(f+S,I);case 2:return ee.add(f+S,I+z);case 3:return ee.add(f,I+z)}return ee})},Ws=function(){function x(f){this.element=f,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return x}(),Gs=function(){function x(f,I){if(this.container=f,this.parent=I,this.effects=[],this.curves=new su(this.container),this.container.styles.opacity<1&&this.effects.push(new lu(this.container.styles.opacity)),this.container.styles.transform!==null){var S=this.container.bounds.left+this.container.styles.transformOrigin[0].number,z=this.container.bounds.top+this.container.styles.transformOrigin[1].number,ee=this.container.styles.transform;this.effects.push(new Au(S,z,ee))}if(this.container.styles.overflowX!==0){var Ae=Ni(this.curves),be=Mi(this.curves);js(Ae,be)?this.effects.push(new Pi(Ae,2|4)):(this.effects.push(new Pi(Ae,2)),this.effects.push(new Pi(be,4)))}}return x.prototype.getEffects=function(f){for(var I=[2,3].indexOf(this.container.styles.position)===-1,S=this.parent,z=this.effects.slice(0);S;){var ee=S.effects.filter(function(Ee){return!Ks(Ee)});if(I||S.container.styles.position!==0||!S.parent){if(z.unshift.apply(z,ee),I=[2,3].indexOf(S.container.styles.position)===-1,S.container.styles.overflowX!==0){var Ae=Ni(S.curves),be=Mi(S.curves);js(Ae,be)||z.unshift(new Pi(be,2|4))}}else z.unshift.apply(z,ee);S=S.parent}return z.filter(function(Ee){return Wr(Ee.target,f)})},x}(),wa=function(x,f,I,S){x.container.elements.forEach(function(z){var ee=Wr(z.flags,4),Ae=Wr(z.flags,2),be=new Gs(z,x);Wr(z.styles.display,2048)&&S.push(be);var Ee=Wr(z.flags,8)?[]:S;if(ee||Ae){var Re=ee||z.styles.isPositioned()?I:f,Me=new Ws(be);if(z.styles.isPositioned()||z.styles.opacity<1||z.styles.isTransformed()){var Je=z.styles.zIndex.order;if(Je<0){var Ze=0;Re.negativeZIndex.some(function(pt,bt){return Je>pt.element.container.styles.zIndex.order?(Ze=bt,!1):Ze>0}),Re.negativeZIndex.splice(Ze,0,Me)}else if(Je>0){var Bt=0;Re.positiveZIndex.some(function(pt,bt){return Je>=pt.element.container.styles.zIndex.order?(Bt=bt+1,!1):Bt>0}),Re.positiveZIndex.splice(Bt,0,Me)}else Re.zeroOrAutoZIndexOrTransformedOrOpacity.push(Me)}else z.styles.isFloating()?Re.nonPositionedFloats.push(Me):Re.nonPositionedInlineLevel.push(Me);wa(be,Me,ee?Me:I,Ee)}else z.styles.isInlineLevel()?f.inlineLevel.push(be):f.nonInlineLevel.push(be),wa(be,f,I,Ee);Wr(z.flags,8)&&Vs(z,Ee)})},Vs=function(x,f){for(var I=x instanceof ha?x.start:1,S=x instanceof ha?x.reversed:!1,z=0;z<f.length;z++){var ee=f[z];ee.container instanceof gs&&typeof ee.container.value=="number"&&ee.container.value!==0&&(I=ee.container.value),ee.listValue=Ai(I,ee.container.styles.listStyleType,!0),I+=S?-1:1}},du=function(x){var f=new Gs(x,null),I=new Ws(f),S=[];return wa(f,I,I,S),Vs(f.container,S),I},zs=function(x,f){switch(f){case 0:return An(x.topLeftBorderBox,x.topLeftPaddingBox,x.topRightBorderBox,x.topRightPaddingBox);case 1:return An(x.topRightBorderBox,x.topRightPaddingBox,x.bottomRightBorderBox,x.bottomRightPaddingBox);case 2:return An(x.bottomRightBorderBox,x.bottomRightPaddingBox,x.bottomLeftBorderBox,x.bottomLeftPaddingBox);case 3:default:return An(x.bottomLeftBorderBox,x.bottomLeftPaddingBox,x.topLeftBorderBox,x.topLeftPaddingBox)}},fu=function(x,f){switch(f){case 0:return An(x.topLeftBorderBox,x.topLeftBorderDoubleOuterBox,x.topRightBorderBox,x.topRightBorderDoubleOuterBox);case 1:return An(x.topRightBorderBox,x.topRightBorderDoubleOuterBox,x.bottomRightBorderBox,x.bottomRightBorderDoubleOuterBox);case 2:return An(x.bottomRightBorderBox,x.bottomRightBorderDoubleOuterBox,x.bottomLeftBorderBox,x.bottomLeftBorderDoubleOuterBox);case 3:default:return An(x.bottomLeftBorderBox,x.bottomLeftBorderDoubleOuterBox,x.topLeftBorderBox,x.topLeftBorderDoubleOuterBox)}},pu=function(x,f){switch(f){case 0:return An(x.topLeftBorderDoubleInnerBox,x.topLeftPaddingBox,x.topRightBorderDoubleInnerBox,x.topRightPaddingBox);case 1:return An(x.topRightBorderDoubleInnerBox,x.topRightPaddingBox,x.bottomRightBorderDoubleInnerBox,x.bottomRightPaddingBox);case 2:return An(x.bottomRightBorderDoubleInnerBox,x.bottomRightPaddingBox,x.bottomLeftBorderDoubleInnerBox,x.bottomLeftPaddingBox);case 3:default:return An(x.bottomLeftBorderDoubleInnerBox,x.bottomLeftPaddingBox,x.topLeftBorderDoubleInnerBox,x.topLeftPaddingBox)}},mu=function(x,f){switch(f){case 0:return ki(x.topLeftBorderStroke,x.topRightBorderStroke);case 1:return ki(x.topRightBorderStroke,x.bottomRightBorderStroke);case 2:return ki(x.bottomRightBorderStroke,x.bottomLeftBorderStroke);case 3:default:return ki(x.bottomLeftBorderStroke,x.topLeftBorderStroke)}},ki=function(x,f){var I=[];return on(x)?I.push(x.subdivide(.5,!1)):I.push(x),on(f)?I.push(f.subdivide(.5,!0)):I.push(f),I},An=function(x,f,I,S){var z=[];return on(x)?z.push(x.subdivide(.5,!1)):z.push(x),on(I)?z.push(I.subdivide(.5,!0)):z.push(I),on(S)?z.push(S.subdivide(.5,!0).reverse()):z.push(S),on(f)?z.push(f.subdivide(.5,!1).reverse()):z.push(f),z},Xs=function(x){var f=x.bounds,I=x.styles;return f.add(I.borderLeftWidth,I.borderTopWidth,-(I.borderRightWidth+I.borderLeftWidth),-(I.borderTopWidth+I.borderBottomWidth))},Hi=function(x){var f=x.styles,I=x.bounds,S=Ir(f.paddingLeft,I.width),z=Ir(f.paddingRight,I.width),ee=Ir(f.paddingTop,I.width),Ae=Ir(f.paddingBottom,I.width);return I.add(S+f.borderLeftWidth,ee+f.borderTopWidth,-(f.borderRightWidth+f.borderLeftWidth+S+z),-(f.borderTopWidth+f.borderBottomWidth+ee+Ae))},gu=function(x,f){return x===0?f.bounds:x===2?Hi(f):Xs(f)},vu=function(x,f){return x===0?f.bounds:x===2?Hi(f):Xs(f)},Ca=function(x,f,I){var S=gu(Jn(x.styles.backgroundOrigin,f),x),z=vu(Jn(x.styles.backgroundClip,f),x),ee=yu(Jn(x.styles.backgroundSize,f),I,S),Ae=ee[0],be=ee[1],Ee=ri(Jn(x.styles.backgroundPosition,f),S.width-Ae,S.height-be),Re=Eu(Jn(x.styles.backgroundRepeat,f),Ee,ee,S,z),Me=Math.round(S.left+Ee[0]),Je=Math.round(S.top+Ee[1]);return[Re,Me,Je,Ae,be]},Yn=function(x){return Br(x)&&x.value===Wn.AUTO},Qi=function(x){return typeof x=="number"},yu=function(x,f,I){var S=f[0],z=f[1],ee=f[2],Ae=x[0],be=x[1];if(!Ae)return[0,0];if(Hr(Ae)&&be&&Hr(be))return[Ir(Ae,I.width),Ir(be,I.height)];var Ee=Qi(ee);if(Br(Ae)&&(Ae.value===Wn.CONTAIN||Ae.value===Wn.COVER)){if(Qi(ee)){var Re=I.width/I.height;return Re<ee!==(Ae.value===Wn.COVER)?[I.width,I.width/ee]:[I.height*ee,I.height]}return[I.width,I.height]}var Me=Qi(S),Je=Qi(z),Ze=Me||Je;if(Yn(Ae)&&(!be||Yn(be))){if(Me&&Je)return[S,z];if(!Ee&&!Ze)return[I.width,I.height];if(Ze&&Ee){var Bt=Me?S:z*ee,pt=Je?z:S/ee;return[Bt,pt]}var bt=Me?S:I.width,Yt=Je?z:I.height;return[bt,Yt]}if(Ee){var xt=0,Rt=0;return Hr(Ae)?xt=Ir(Ae,I.width):Hr(be)&&(Rt=Ir(be,I.height)),Yn(Ae)?xt=Rt*ee:(!be||Yn(be))&&(Rt=xt/ee),[xt,Rt]}var dr=null,or=null;if(Hr(Ae)?dr=Ir(Ae,I.width):be&&Hr(be)&&(or=Ir(be,I.height)),dr!==null&&(!be||Yn(be))&&(or=Me&&Je?dr/S*z:I.height),or!==null&&Yn(Ae)&&(dr=Me&&Je?or/z*S:I.width),dr!==null&&or!==null)return[dr,or];throw new Error("Unable to calculate background-size for element")},Jn=function(x,f){var I=x[f];return typeof I=="undefined"?x[0]:I},Eu=function(x,f,I,S,z){var ee=f[0],Ae=f[1],be=I[0],Ee=I[1];switch(x){case 2:return[new Ct(Math.round(S.left),Math.round(S.top+Ae)),new Ct(Math.round(S.left+S.width),Math.round(S.top+Ae)),new Ct(Math.round(S.left+S.width),Math.round(Ee+S.top+Ae)),new Ct(Math.round(S.left),Math.round(Ee+S.top+Ae))];case 3:return[new Ct(Math.round(S.left+ee),Math.round(S.top)),new Ct(Math.round(S.left+ee+be),Math.round(S.top)),new Ct(Math.round(S.left+ee+be),Math.round(S.height+S.top)),new Ct(Math.round(S.left+ee),Math.round(S.height+S.top))];case 1:return[new Ct(Math.round(S.left+ee),Math.round(S.top+Ae)),new Ct(Math.round(S.left+ee+be),Math.round(S.top+Ae)),new Ct(Math.round(S.left+ee+be),Math.round(S.top+Ae+Ee)),new Ct(Math.round(S.left+ee),Math.round(S.top+Ae+Ee))];default:return[new Ct(Math.round(z.left),Math.round(z.top)),new Ct(Math.round(z.left+z.width),Math.round(z.top)),new Ct(Math.round(z.left+z.width),Math.round(z.height+z.top)),new Ct(Math.round(z.left),Math.round(z.height+z.top))]}},_u="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ys="Hidden Text",bu=function(){function x(f){this._data={},this._document=f}return x.prototype.parseMetrics=function(f,I){var S=this._document.createElement("div"),z=this._document.createElement("img"),ee=this._document.createElement("span"),Ae=this._document.body;S.style.visibility="hidden",S.style.fontFamily=f,S.style.fontSize=I,S.style.margin="0",S.style.padding="0",S.style.whiteSpace="nowrap",Ae.appendChild(S),z.src=_u,z.width=1,z.height=1,z.style.margin="0",z.style.padding="0",z.style.verticalAlign="baseline",ee.style.fontFamily=f,ee.style.fontSize=I,ee.style.margin="0",ee.style.padding="0",ee.appendChild(this._document.createTextNode(Ys)),S.appendChild(ee),S.appendChild(z);var be=z.offsetTop-ee.offsetTop+2;S.removeChild(ee),S.appendChild(this._document.createTextNode(Ys)),S.style.lineHeight="normal",z.style.verticalAlign="super";var Ee=z.offsetTop-S.offsetTop+2;return Ae.removeChild(S),{baseline:be,middle:Ee}},x.prototype.getMetrics=function(f,I){var S=f+" "+I;return typeof this._data[S]=="undefined"&&(this._data[S]=this.parseMetrics(f,I)),this._data[S]},x}(),Js=function(){function x(f,I){this.context=f,this.options=I}return x}(),wu=1e4,Cu=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z._activeEffects=[],z.canvas=S.canvas?S.canvas:document.createElement("canvas"),z.ctx=z.canvas.getContext("2d"),S.canvas||(z.canvas.width=Math.floor(S.width*S.scale),z.canvas.height=Math.floor(S.height*S.scale),z.canvas.style.width=S.width+"px",z.canvas.style.height=S.height+"px"),z.fontMetrics=new bu(document),z.ctx.scale(z.options.scale,z.options.scale),z.ctx.translate(-S.x,-S.y),z.ctx.textBaseline="bottom",z._activeEffects=[],z.context.logger.debug("Canvas renderer initialized ("+S.width+"x"+S.height+") with scale "+S.scale),z}return f.prototype.applyEffects=function(I){for(var S=this;this._activeEffects.length;)this.popEffect();I.forEach(function(z){return S.applyEffect(z)})},f.prototype.applyEffect=function(I){this.ctx.save(),cu(I)&&(this.ctx.globalAlpha=I.opacity),uu(I)&&(this.ctx.translate(I.offsetX,I.offsetY),this.ctx.transform(I.matrix[0],I.matrix[1],I.matrix[2],I.matrix[3],I.matrix[4],I.matrix[5]),this.ctx.translate(-I.offsetX,-I.offsetY)),Ks(I)&&(this.path(I.path),this.ctx.clip()),this._activeEffects.push(I)},f.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},f.prototype.renderStack=function(I){return V(this,void 0,void 0,function(){var S;return F(this,function(z){switch(z.label){case 0:return S=I.element.container.styles,S.isVisible()?[4,this.renderStackContent(I)]:[3,2];case 1:z.sent(),z.label=2;case 2:return[2]}})})},f.prototype.renderNode=function(I){return V(this,void 0,void 0,function(){return F(this,function(S){switch(S.label){case 0:if(Wr(I.container.flags,16))debugger;return I.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(I)]:[3,3];case 1:return S.sent(),[4,this.renderNodeContent(I)];case 2:S.sent(),S.label=3;case 3:return[2]}})})},f.prototype.renderTextWithLetterSpacing=function(I,S,z){var ee=this;if(S===0)this.ctx.fillText(I.text,I.bounds.left,I.bounds.top+z);else{var Ae=ca(I.text);Ae.reduce(function(be,Ee){return ee.ctx.fillText(Ee,be,I.bounds.top+z),be+ee.ctx.measureText(Ee).width},I.bounds.left)}},f.prototype.createFontStyle=function(I){var S=I.fontVariant.filter(function(Ae){return Ae==="normal"||Ae==="small-caps"}).join(""),z=Iu(I.fontFamily).join(", "),ee=ti(I.fontSize)?""+I.fontSize.number+I.fontSize.unit:I.fontSize.number+"px";return[[I.fontStyle,S,I.fontWeight,ee,z].join(" "),z,ee]},f.prototype.renderTextNode=function(I,S){return V(this,void 0,void 0,function(){var z,ee,Ae,be,Ee,Re,Me,Je,Ze=this;return F(this,function(Bt){return z=this.createFontStyle(S),ee=z[0],Ae=z[1],be=z[2],this.ctx.font=ee,this.ctx.direction=S.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Ee=this.fontMetrics.getMetrics(Ae,be),Re=Ee.baseline,Me=Ee.middle,Je=S.paintOrder,I.textBounds.forEach(function(pt){Je.forEach(function(bt){switch(bt){case 0:Ze.ctx.fillStyle=Gr(S.color),Ze.renderTextWithLetterSpacing(pt,S.letterSpacing,Re);var Yt=S.textShadow;Yt.length&&pt.text.trim().length&&(Yt.slice(0).reverse().forEach(function(xt){Ze.ctx.shadowColor=Gr(xt.color),Ze.ctx.shadowOffsetX=xt.offsetX.number*Ze.options.scale,Ze.ctx.shadowOffsetY=xt.offsetY.number*Ze.options.scale,Ze.ctx.shadowBlur=xt.blur.number,Ze.renderTextWithLetterSpacing(pt,S.letterSpacing,Re)}),Ze.ctx.shadowColor="",Ze.ctx.shadowOffsetX=0,Ze.ctx.shadowOffsetY=0,Ze.ctx.shadowBlur=0),S.textDecorationLine.length&&(Ze.ctx.fillStyle=Gr(S.textDecorationColor||S.color),S.textDecorationLine.forEach(function(xt){switch(xt){case 1:Ze.ctx.fillRect(pt.bounds.left,Math.round(pt.bounds.top+Re),pt.bounds.width,1);break;case 2:Ze.ctx.fillRect(pt.bounds.left,Math.round(pt.bounds.top),pt.bounds.width,1);break;case 3:Ze.ctx.fillRect(pt.bounds.left,Math.ceil(pt.bounds.top+Me),pt.bounds.width,1);break}}));break;case 1:S.webkitTextStrokeWidth&&pt.text.trim().length&&(Ze.ctx.strokeStyle=Gr(S.webkitTextStrokeColor),Ze.ctx.lineWidth=S.webkitTextStrokeWidth,Ze.ctx.lineJoin=window.chrome?"miter":"round",Ze.ctx.strokeText(pt.text,pt.bounds.left,pt.bounds.top+Re)),Ze.ctx.strokeStyle="",Ze.ctx.lineWidth=0,Ze.ctx.lineJoin="miter";break}})}),[2]})})},f.prototype.renderReplacedElement=function(I,S,z){if(z&&I.intrinsicWidth>0&&I.intrinsicHeight>0){var ee=Hi(I),Ae=Mi(S);this.path(Ae),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(z,0,0,I.intrinsicWidth,I.intrinsicHeight,ee.left,ee.top,ee.width,ee.height),this.ctx.restore()}},f.prototype.renderNodeContent=function(I){return V(this,void 0,void 0,function(){var S,z,ee,Ae,be,Ee,Re,Re,Me,Je,Ze,Bt,pt,bt,Yt,xt,Rt,dr,or,Re,Er,pt,xt;return F(this,function(St){switch(St.label){case 0:this.applyEffects(I.getEffects(4)),S=I.container,z=I.curves,ee=S.styles,Ae=0,be=S.textNodes,St.label=1;case 1:return Ae<be.length?(Ee=be[Ae],[4,this.renderTextNode(Ee,ee)]):[3,4];case 2:St.sent(),St.label=3;case 3:return Ae++,[3,1];case 4:if(!(S instanceof fs))return[3,8];St.label=5;case 5:return St.trys.push([5,7,,8]),[4,this.context.cache.match(S.src)];case 6:return Re=St.sent(),this.renderReplacedElement(S,z,Re),[3,8];case 7:return St.sent(),this.context.logger.error("Error loading image "+S.src),[3,8];case 8:if(S instanceof ps&&this.renderReplacedElement(S,z,S.canvas),!(S instanceof ms))return[3,12];St.label=9;case 9:return St.trys.push([9,11,,12]),[4,this.context.cache.match(S.svg)];case 10:return Re=St.sent(),this.renderReplacedElement(S,z,Re),[3,12];case 11:return St.sent(),this.context.logger.error("Error loading svg "+S.svg.substring(0,255)),[3,12];case 12:return S instanceof _s&&S.tree?(Me=new f(this.context,{scale:this.options.scale,backgroundColor:S.backgroundColor,x:0,y:0,width:S.width,height:S.height}),[4,Me.render(S.tree)]):[3,14];case 13:Je=St.sent(),S.width&&S.height&&this.ctx.drawImage(Je,0,0,S.width,S.height,S.bounds.left,S.bounds.top,S.bounds.width,S.bounds.height),St.label=14;case 14:if(S instanceof da&&(Ze=Math.min(S.bounds.width,S.bounds.height),S.type===Ii?S.checked&&(this.ctx.save(),this.path([new Ct(S.bounds.left+Ze*.39363,S.bounds.top+Ze*.79),new Ct(S.bounds.left+Ze*.16,S.bounds.top+Ze*.5549),new Ct(S.bounds.left+Ze*.27347,S.bounds.top+Ze*.44071),new Ct(S.bounds.left+Ze*.39694,S.bounds.top+Ze*.5649),new Ct(S.bounds.left+Ze*.72983,S.bounds.top+Ze*.23),new Ct(S.bounds.left+Ze*.84,S.bounds.top+Ze*.34085),new Ct(S.bounds.left+Ze*.39363,S.bounds.top+Ze*.79)]),this.ctx.fillStyle=Gr(vs),this.ctx.fill(),this.ctx.restore()):S.type===Ri&&(S.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(S.bounds.left+Ze/2,S.bounds.top+Ze/2,Ze/4,0,Math.PI*2,!0),this.ctx.fillStyle=Gr(vs),this.ctx.fill(),this.ctx.restore()))),xu(S)&&S.value.length){Bt=this.createFontStyle(ee),pt=Bt[0],bt=Bt[1],Yt=this.fontMetrics.getMetrics(pt,bt).baseline,this.ctx.font=pt,this.ctx.fillStyle=Gr(ee.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Bu(S.styles.textAlign),xt=Hi(S),Rt=0;switch(S.styles.textAlign){case 1:Rt+=xt.width/2;break;case 2:Rt+=xt.width;break}dr=xt.add(Rt,0,0,-xt.height/2+1),this.ctx.save(),this.path([new Ct(xt.left,xt.top),new Ct(xt.left+xt.width,xt.top),new Ct(xt.left+xt.width,xt.top+xt.height),new Ct(xt.left,xt.top+xt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new si(S.value,dr),ee.letterSpacing,Yt),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Wr(S.styles.display,2048))return[3,20];if(!(S.styles.listStyleImage!==null))return[3,19];if(or=S.styles.listStyleImage,!(or.type===0))return[3,18];Re=void 0,Er=or.url,St.label=15;case 15:return St.trys.push([15,17,,18]),[4,this.context.cache.match(Er)];case 16:return Re=St.sent(),this.ctx.drawImage(Re,S.bounds.left-(Re.width+10),S.bounds.top),[3,18];case 17:return St.sent(),this.context.logger.error("Error loading list-style-image "+Er),[3,18];case 18:return[3,20];case 19:I.listValue&&S.styles.listStyleType!==-1&&(pt=this.createFontStyle(ee)[0],this.ctx.font=pt,this.ctx.fillStyle=Gr(ee.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",xt=new X(S.bounds.left,S.bounds.top+Ir(S.styles.paddingTop,S.bounds.width),S.bounds.width,Ya(ee.lineHeight,ee.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new si(I.listValue,xt),ee.letterSpacing,Ya(ee.lineHeight,ee.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),St.label=20;case 20:return[2]}})})},f.prototype.renderStackContent=function(I){return V(this,void 0,void 0,function(){var S,z,ee,Ae,be,ee,Ee,Re,ee,Me,Je,ee,Ze,Bt,ee,pt,bt,ee,Yt,xt,ee;return F(this,function(Rt){switch(Rt.label){case 0:if(Wr(I.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(I.element)];case 1:Rt.sent(),S=0,z=I.negativeZIndex,Rt.label=2;case 2:return S<z.length?(ee=z[S],[4,this.renderStack(ee)]):[3,5];case 3:Rt.sent(),Rt.label=4;case 4:return S++,[3,2];case 5:return[4,this.renderNodeContent(I.element)];case 6:Rt.sent(),Ae=0,be=I.nonInlineLevel,Rt.label=7;case 7:return Ae<be.length?(ee=be[Ae],[4,this.renderNode(ee)]):[3,10];case 8:Rt.sent(),Rt.label=9;case 9:return Ae++,[3,7];case 10:Ee=0,Re=I.nonPositionedFloats,Rt.label=11;case 11:return Ee<Re.length?(ee=Re[Ee],[4,this.renderStack(ee)]):[3,14];case 12:Rt.sent(),Rt.label=13;case 13:return Ee++,[3,11];case 14:Me=0,Je=I.nonPositionedInlineLevel,Rt.label=15;case 15:return Me<Je.length?(ee=Je[Me],[4,this.renderStack(ee)]):[3,18];case 16:Rt.sent(),Rt.label=17;case 17:return Me++,[3,15];case 18:Ze=0,Bt=I.inlineLevel,Rt.label=19;case 19:return Ze<Bt.length?(ee=Bt[Ze],[4,this.renderNode(ee)]):[3,22];case 20:Rt.sent(),Rt.label=21;case 21:return Ze++,[3,19];case 22:pt=0,bt=I.zeroOrAutoZIndexOrTransformedOrOpacity,Rt.label=23;case 23:return pt<bt.length?(ee=bt[pt],[4,this.renderStack(ee)]):[3,26];case 24:Rt.sent(),Rt.label=25;case 25:return pt++,[3,23];case 26:Yt=0,xt=I.positiveZIndex,Rt.label=27;case 27:return Yt<xt.length?(ee=xt[Yt],[4,this.renderStack(ee)]):[3,30];case 28:Rt.sent(),Rt.label=29;case 29:return Yt++,[3,27];case 30:return[2]}})})},f.prototype.mask=function(I){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(I.slice(0).reverse()),this.ctx.closePath()},f.prototype.path=function(I){this.ctx.beginPath(),this.formatPath(I),this.ctx.closePath()},f.prototype.formatPath=function(I){var S=this;I.forEach(function(z,ee){var Ae=on(z)?z.start:z;ee===0?S.ctx.moveTo(Ae.x,Ae.y):S.ctx.lineTo(Ae.x,Ae.y),on(z)&&S.ctx.bezierCurveTo(z.startControl.x,z.startControl.y,z.endControl.x,z.endControl.y,z.end.x,z.end.y)})},f.prototype.renderRepeat=function(I,S,z,ee){this.path(I),this.ctx.fillStyle=S,this.ctx.translate(z,ee),this.ctx.fill(),this.ctx.translate(-z,-ee)},f.prototype.resizeImage=function(I,S,z){var ee;if(I.width===S&&I.height===z)return I;var Ae=(ee=this.canvas.ownerDocument)!==null&&ee!==void 0?ee:document,be=Ae.createElement("canvas");be.width=Math.max(1,S),be.height=Math.max(1,z);var Ee=be.getContext("2d");return Ee.drawImage(I,0,0,I.width,I.height,0,0,S,z),be},f.prototype.renderBackgroundImage=function(I){return V(this,void 0,void 0,function(){var S,z,ee,Ae,be,Ee;return F(this,function(Re){switch(Re.label){case 0:S=I.styles.backgroundImage.length-1,z=function(Me){var Je,Ze,Bt,pt,bt,Yt,xt,Rt,dr,or,pt,bt,Yt,xt,Rt,Er,St,vr,_r,nr,tn,Zr,nn,Vr,dr,fn,pt,Rn,On,xt,Rt,Ln,bt,Yt,Mn,pn,Dn,Pn,kn,En,Hn,_n;return F(this,function($n){switch($n.label){case 0:if(!(Me.type===0))return[3,5];Je=void 0,Ze=Me.url,$n.label=1;case 1:return $n.trys.push([1,3,,4]),[4,ee.context.cache.match(Ze)];case 2:return Je=$n.sent(),[3,4];case 3:return $n.sent(),ee.context.logger.error("Error loading background-image "+Ze),[3,4];case 4:return Je&&(Bt=Ca(I,S,[Je.width,Je.height,Je.width/Je.height]),pt=Bt[0],bt=Bt[1],Yt=Bt[2],xt=Bt[3],Rt=Bt[4],dr=ee.ctx.createPattern(ee.resizeImage(Je,xt,Rt),"repeat"),ee.renderRepeat(pt,dr,bt,Yt)),[3,6];case 5:lo(Me)?(or=Ca(I,S,[null,null,null]),pt=or[0],bt=or[1],Yt=or[2],xt=or[3],Rt=or[4],Er=io(Me.angle,xt,Rt),St=Er[0],vr=Er[1],_r=Er[2],nr=Er[3],tn=Er[4],Zr=document.createElement("canvas"),Zr.width=xt,Zr.height=Rt,nn=Zr.getContext("2d"),Vr=nn.createLinearGradient(vr,nr,_r,tn),Pa(Me.stops,St).forEach(function(ui){return Vr.addColorStop(ui.stop,Gr(ui.color))}),nn.fillStyle=Vr,nn.fillRect(0,0,xt,Rt),xt>0&&Rt>0&&(dr=ee.ctx.createPattern(Zr,"repeat"),ee.renderRepeat(pt,dr,bt,Yt))):uo(Me)&&(fn=Ca(I,S,[null,null,null]),pt=fn[0],Rn=fn[1],On=fn[2],xt=fn[3],Rt=fn[4],Ln=Me.position.length===0?[Ji]:Me.position,bt=Ir(Ln[0],xt),Yt=Ir(Ln[Ln.length-1],Rt),Mn=ao(Me,bt,Yt,xt,Rt),pn=Mn[0],Dn=Mn[1],pn>0&&Dn>0&&(Pn=ee.ctx.createRadialGradient(Rn+bt,On+Yt,0,Rn+bt,On+Yt,pn),Pa(Me.stops,pn*2).forEach(function(ui){return Pn.addColorStop(ui.stop,Gr(ui.color))}),ee.path(pt),ee.ctx.fillStyle=Pn,pn!==Dn?(kn=I.bounds.left+.5*I.bounds.width,En=I.bounds.top+.5*I.bounds.height,Hn=Dn/pn,_n=1/Hn,ee.ctx.save(),ee.ctx.translate(kn,En),ee.ctx.transform(1,0,0,Hn,0,0),ee.ctx.translate(-kn,-En),ee.ctx.fillRect(Rn,_n*(On-En)+En,xt,Rt*_n),ee.ctx.restore()):ee.ctx.fill())),$n.label=6;case 6:return S--,[2]}})},ee=this,Ae=0,be=I.styles.backgroundImage.slice(0).reverse(),Re.label=1;case 1:return Ae<be.length?(Ee=be[Ae],[5,z(Ee)]):[3,4];case 2:Re.sent(),Re.label=3;case 3:return Ae++,[3,1];case 4:return[2]}})})},f.prototype.renderSolidBorder=function(I,S,z){return V(this,void 0,void 0,function(){return F(this,function(ee){return this.path(zs(z,S)),this.ctx.fillStyle=Gr(I),this.ctx.fill(),[2]})})},f.prototype.renderDoubleBorder=function(I,S,z,ee){return V(this,void 0,void 0,function(){var Ae,be;return F(this,function(Ee){switch(Ee.label){case 0:return S<3?[4,this.renderSolidBorder(I,z,ee)]:[3,2];case 1:return Ee.sent(),[2];case 2:return Ae=fu(ee,z),this.path(Ae),this.ctx.fillStyle=Gr(I),this.ctx.fill(),be=pu(ee,z),this.path(be),this.ctx.fill(),[2]}})})},f.prototype.renderNodeBackgroundAndBorders=function(I){return V(this,void 0,void 0,function(){var S,z,ee,Ae,be,Ee,Re,Me,Je=this;return F(this,function(Ze){switch(Ze.label){case 0:return this.applyEffects(I.getEffects(2)),S=I.container.styles,z=!Tn(S.backgroundColor)||S.backgroundImage.length,ee=[{style:S.borderTopStyle,color:S.borderTopColor,width:S.borderTopWidth},{style:S.borderRightStyle,color:S.borderRightColor,width:S.borderRightWidth},{style:S.borderBottomStyle,color:S.borderBottomColor,width:S.borderBottomWidth},{style:S.borderLeftStyle,color:S.borderLeftColor,width:S.borderLeftWidth}],Ae=Tu(Jn(S.backgroundClip,0),I.curves),z||S.boxShadow.length?(this.ctx.save(),this.path(Ae),this.ctx.clip(),Tn(S.backgroundColor)||(this.ctx.fillStyle=Gr(S.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(I.container)]):[3,2];case 1:Ze.sent(),this.ctx.restore(),S.boxShadow.slice(0).reverse().forEach(function(Bt){Je.ctx.save();var pt=Ni(I.curves),bt=Bt.inset?0:wu,Yt=hu(pt,-bt+(Bt.inset?1:-1)*Bt.spread.number,(Bt.inset?1:-1)*Bt.spread.number,Bt.spread.number*(Bt.inset?-2:2),Bt.spread.number*(Bt.inset?-2:2));Bt.inset?(Je.path(pt),Je.ctx.clip(),Je.mask(Yt)):(Je.mask(pt),Je.ctx.clip(),Je.path(Yt)),Je.ctx.shadowOffsetX=Bt.offsetX.number+bt,Je.ctx.shadowOffsetY=Bt.offsetY.number,Je.ctx.shadowColor=Gr(Bt.color),Je.ctx.shadowBlur=Bt.blur.number,Je.ctx.fillStyle=Bt.inset?Gr(Bt.color):"rgba(0,0,0,1)",Je.ctx.fill(),Je.ctx.restore()}),Ze.label=2;case 2:be=0,Ee=0,Re=ee,Ze.label=3;case 3:return Ee<Re.length?(Me=Re[Ee],Me.style!==0&&!Tn(Me.color)&&Me.width>0?Me.style===2?[4,this.renderDashedDottedBorder(Me.color,Me.width,be,I.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return Ze.sent(),[3,11];case 5:return Me.style===3?[4,this.renderDashedDottedBorder(Me.color,Me.width,be,I.curves,3)]:[3,7];case 6:return Ze.sent(),[3,11];case 7:return Me.style===4?[4,this.renderDoubleBorder(Me.color,Me.width,be,I.curves)]:[3,9];case 8:return Ze.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Me.color,be,I.curves)];case 10:Ze.sent(),Ze.label=11;case 11:be++,Ze.label=12;case 12:return Ee++,[3,3];case 13:return[2]}})})},f.prototype.renderDashedDottedBorder=function(I,S,z,ee,Ae){return V(this,void 0,void 0,function(){var be,Ee,Re,Me,Je,Ze,Bt,pt,bt,Yt,xt,Rt,dr,or,Er,St,Er,St;return F(this,function(vr){return this.ctx.save(),be=mu(ee,z),Ee=zs(ee,z),Ae===2&&(this.path(Ee),this.ctx.clip()),on(Ee[0])?(Re=Ee[0].start.x,Me=Ee[0].start.y):(Re=Ee[0].x,Me=Ee[0].y),on(Ee[1])?(Je=Ee[1].end.x,Ze=Ee[1].end.y):(Je=Ee[1].x,Ze=Ee[1].y),z===0||z===2?Bt=Math.abs(Re-Je):Bt=Math.abs(Me-Ze),this.ctx.beginPath(),Ae===3?this.formatPath(be):this.formatPath(Ee.slice(0,2)),pt=S<3?S*3:S*2,bt=S<3?S*2:S,Ae===3&&(pt=S,bt=S),Yt=!0,Bt<=pt*2?Yt=!1:Bt<=pt*2+bt?(xt=Bt/(2*pt+bt),pt*=xt,bt*=xt):(Rt=Math.floor((Bt+bt)/(pt+bt)),dr=(Bt-Rt*pt)/(Rt-1),or=(Bt-(Rt+1)*pt)/Rt,bt=or<=0||Math.abs(bt-dr)<Math.abs(bt-or)?dr:or),Yt&&(Ae===3?this.ctx.setLineDash([0,pt+bt]):this.ctx.setLineDash([pt,bt])),Ae===3?(this.ctx.lineCap="round",this.ctx.lineWidth=S):this.ctx.lineWidth=S*2+1.1,this.ctx.strokeStyle=Gr(I),this.ctx.stroke(),this.ctx.setLineDash([]),Ae===2&&(on(Ee[0])&&(Er=Ee[3],St=Ee[0],this.ctx.beginPath(),this.formatPath([new Ct(Er.end.x,Er.end.y),new Ct(St.start.x,St.start.y)]),this.ctx.stroke()),on(Ee[1])&&(Er=Ee[1],St=Ee[2],this.ctx.beginPath(),this.formatPath([new Ct(Er.end.x,Er.end.y),new Ct(St.start.x,St.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},f.prototype.render=function(I){return V(this,void 0,void 0,function(){var S;return F(this,function(z){switch(z.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Gr(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),S=du(I),[4,this.renderStack(S)];case 1:return z.sent(),this.applyEffects([]),[2,this.canvas]}})})},f}(Js),xu=function(x){return x instanceof Es||x instanceof ys?!0:x instanceof da&&x.type!==Ri&&x.type!==Ii},Tu=function(x,f){switch(x){case 0:return Ni(f);case 2:return ou(f);case 1:default:return Mi(f)}},Bu=function(x){switch(x){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Su=["-apple-system","system-ui"],Iu=function(x){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?x.filter(function(f){return Su.indexOf(f)===-1}):x},Ru=function(x){G(f,x);function f(I,S){var z=x.call(this,I,S)||this;return z.canvas=S.canvas?S.canvas:document.createElement("canvas"),z.ctx=z.canvas.getContext("2d"),z.options=S,z.canvas.width=Math.floor(S.width*S.scale),z.canvas.height=Math.floor(S.height*S.scale),z.canvas.style.width=S.width+"px",z.canvas.style.height=S.height+"px",z.ctx.scale(z.options.scale,z.options.scale),z.ctx.translate(-S.x,-S.y),z.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+S.width+"x"+S.height+" at "+S.x+","+S.y+") with scale "+S.scale),z}return f.prototype.render=function(I){return V(this,void 0,void 0,function(){var S,z;return F(this,function(ee){switch(ee.label){case 0:return S=ua(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,I),[4,Ou(S)];case 1:return z=ee.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Gr(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(z,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},f}(Js),Ou=function(x){return new Promise(function(f,I){var S=new Image;S.onload=function(){f(S)},S.onerror=I,S.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(x))})},Lu=function(){function x(f){var I=f.id,S=f.enabled;this.id=I,this.enabled=S,this.start=Date.now()}return x.prototype.debug=function(){for(var f=[],I=0;I<arguments.length;I++)f[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,O([this.id,this.getTime()+"ms"],f)):this.info.apply(this,f))},x.prototype.getTime=function(){return Date.now()-this.start},x.prototype.info=function(){for(var f=[],I=0;I<arguments.length;I++)f[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,O([this.id,this.getTime()+"ms"],f)))},x.prototype.warn=function(){for(var f=[],I=0;I<arguments.length;I++)f[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,O([this.id,this.getTime()+"ms"],f)):this.info.apply(this,f))},x.prototype.error=function(){for(var f=[],I=0;I<arguments.length;I++)f[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,O([this.id,this.getTime()+"ms"],f)):this.info.apply(this,f))},x.instances={},x}(),Du=function(){function x(f,I){var S;this.windowBounds=I,this.instanceName="#"+x.instanceCount++,this.logger=new Lu({id:this.instanceName,enabled:f.logging}),this.cache=(S=f.cache)!==null&&S!==void 0?S:new ql(this,f)}return x.instanceCount=1,x}(),Uu=function(x,f){return f===void 0&&(f={}),Fu(x,f)};typeof window!="undefined"&&Qs.setContext(window);var Fu=function(x,f){return V(void 0,void 0,void 0,function(){var I,S,z,ee,Ae,be,Ee,Re,Me,Je,Ze,Bt,pt,bt,Yt,xt,Rt,dr,or,Er,St,vr,St,_r,nr,tn,Zr,nn,Vr,fn,Rn,On,Ln,Mn,pn,Dn,Pn,kn,En,Hn;return F(this,function(_n){switch(_n.label){case 0:if(!x||typeof x!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(I=x.ownerDocument,!I)throw new Error("Element is not attached to a Document");if(S=I.defaultView,!S)throw new Error("Document is not attached to a Window");return z={allowTaint:(_r=f.allowTaint)!==null&&_r!==void 0?_r:!1,imageTimeout:(nr=f.imageTimeout)!==null&&nr!==void 0?nr:15e3,proxy:f.proxy,useCORS:(tn=f.useCORS)!==null&&tn!==void 0?tn:!1},ee=D({logging:(Zr=f.logging)!==null&&Zr!==void 0?Zr:!0,cache:f.cache},z),Ae={windowWidth:(nn=f.windowWidth)!==null&&nn!==void 0?nn:S.innerWidth,windowHeight:(Vr=f.windowHeight)!==null&&Vr!==void 0?Vr:S.innerHeight,scrollX:(fn=f.scrollX)!==null&&fn!==void 0?fn:S.pageXOffset,scrollY:(Rn=f.scrollY)!==null&&Rn!==void 0?Rn:S.pageYOffset},be=new X(Ae.scrollX,Ae.scrollY,Ae.windowWidth,Ae.windowHeight),Ee=new Du(ee,be),Re=(On=f.foreignObjectRendering)!==null&&On!==void 0?On:!1,Me={allowTaint:(Ln=f.allowTaint)!==null&&Ln!==void 0?Ln:!1,onclone:f.onclone,ignoreElements:f.ignoreElements,inlineImages:Re,copyStyles:Re},Ee.logger.debug("Starting document clone with size "+be.width+"x"+be.height+" scrolled to "+-be.left+","+-be.top),Je=new ks(Ee,x,Me),Ze=Je.clonedReferenceElement,Ze?[4,Je.toIFrame(I,be)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Bt=_n.sent(),pt=pa(Ze)||Nl(Ze)?e(Ze.ownerDocument):P(Ee,Ze),bt=pt.width,Yt=pt.height,xt=pt.left,Rt=pt.top,dr=Nu(Ee,Ze,f.backgroundColor),or={canvas:f.canvas,backgroundColor:dr,scale:(pn=(Mn=f.scale)!==null&&Mn!==void 0?Mn:S.devicePixelRatio)!==null&&pn!==void 0?pn:1,x:((Dn=f.x)!==null&&Dn!==void 0?Dn:0)+xt,y:((Pn=f.y)!==null&&Pn!==void 0?Pn:0)+Rt,width:(kn=f.width)!==null&&kn!==void 0?kn:Math.ceil(bt),height:(En=f.height)!==null&&En!==void 0?En:Math.ceil(Yt)},Re?(Ee.logger.debug("Document cloned, using foreign object rendering"),St=new Ru(Ee,or),[4,St.render(Ze)]):[3,3];case 2:return Er=_n.sent(),[3,5];case 3:return Ee.logger.debug("Document cloned, element located at "+xt+","+Rt+" with size "+bt+"x"+Yt+" using computed rendering"),Ee.logger.debug("Starting DOM parsing"),vr=ws(Ee,Ze),dr===vr.styles.backgroundColor&&(vr.styles.backgroundColor=vn.TRANSPARENT),Ee.logger.debug("Starting renderer for element at "+or.x+","+or.y+" with size "+or.width+"x"+or.height),St=new Cu(Ee,or),[4,St.render(vr)];case 4:Er=_n.sent(),_n.label=5;case 5:return((Hn=f.removeContainer)!==null&&Hn!==void 0?Hn:!0)&&(ks.destroy(Bt)||Ee.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Ee.logger.debug("Finished rendering"),[2,Er]}})})},Nu=function(x,f,I){var S=f.ownerDocument,z=S.documentElement?ni(x,getComputedStyle(S.documentElement).backgroundColor):vn.TRANSPARENT,ee=S.body?ni(x,getComputedStyle(S.body).backgroundColor):vn.TRANSPARENT,Ae=typeof I=="string"?ni(x,I):I===null?vn.TRANSPARENT:4294967295;return f===S.documentElement?Tn(z)?Tn(ee)?Ae:ee:z:Ae};return Uu})},wRmb:function(ht,_e,j){"use strict";j.d(_e,"a",function(){return R});var se=j("rePB"),G=j("KQm4"),D=j("VTBJ"),V=j("Ff2n"),F=j("q1tI"),O=j.n(F),X=j("Kwbf"),P=j("Zm9Q"),e=j("hW8S");function R(a){return Object(P.a)(a).filter(function(A){return F.isValidElement(A)}).map(function(A){var o=A.key,i=A.props,r=i.children,t=Object(V.a)(i,["children"]),E=Object(D.a)({key:o},t);return r&&(E.children=R(r)),E})}function m(a){return a.reduce(function(A,o){var i=o.fixed,r=i===!0?"left":i,t=o.children;return t&&t.length>0?[].concat(Object(G.a)(A),Object(G.a)(m(t).map(function(E){return Object(D.a)({fixed:r},E)}))):[].concat(Object(G.a)(A),[Object(D.a)(Object(D.a)({},o),{},{fixed:r})])},[])}function v(a){for(var A=!0,o=0;o<a.length;o+=1){var i=a[o];if(A&&i.fixed!=="left")A=!1;else if(!A&&i.fixed==="left"){Object(X.a)(!1,"Index ".concat(o-1," of `columns` missing `fixed='left'` prop."));break}}for(var r=!0,t=a.length-1;t>=0;t-=1){var E=a[t];if(r&&E.fixed!=="right")r=!1;else if(!r&&E.fixed==="right"){Object(X.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function u(a){return a.map(function(A){var o=A.fixed,i=Object(V.a)(A,["fixed"]),r=o;return o==="left"?r="right":o==="right"&&(r="left"),Object(D.a)({fixed:r},i)})}function s(a,A){var o=a.prefixCls,i=a.columns,r=a.children,t=a.expandable,E=a.expandedKeys,_=a.getRowKey,y=a.onTriggerExpand,B=a.expandIcon,C=a.rowExpandable,d=a.expandIconColumnIndex,n=a.direction,l=a.expandRowByClick,c=F.useMemo(function(){return i||R(r)},[i,r]),b=F.useMemo(function(){if(t){var L,N=d||0,T=c[N],M=(L={},Object(se.a)(L,e.a,{className:"".concat(o,"-expand-icon-col")}),Object(se.a)(L,"title",""),Object(se.a)(L,"fixed",T?T.fixed:null),Object(se.a)(L,"className","".concat(o,"-row-expand-icon-cell")),Object(se.a)(L,"render",function(Y,ne,me){var ge=_(ne,me),Oe=E.has(ge),Se=C?C(ne):!0,Be=B({prefixCls:o,expanded:Oe,expandable:Se,record:ne,onExpand:y});return l?F.createElement("span",{onClick:function(ke){return ke.stopPropagation()}},Be):Be}),L),W=c.slice();return N>=0&&W.splice(N,0,M),W}return c},[t,c,_,E,B,n]),g=F.useMemo(function(){var L=b;return A&&(L=A(L)),L.length||(L=[{render:function(){return null}}]),L},[A,b,n]),h=F.useMemo(function(){return n==="rtl"?u(m(g)):m(g)},[g,n]);return[g,h]}_e.b=s},"y0+3":function(ht,_e,j){"use strict";j.d(_e,"a",function(){return m}),j.d(_e,"b",function(){return u});var se=/margin|padding|width|height|max|min|offset/,G={left:!0,top:!0},D={cssFloat:1,styleFloat:1,float:1};function V(s){return s.nodeType===1?s.ownerDocument.defaultView.getComputedStyle(s,null):{}}function F(s,a,A){if(a=a.toLowerCase(),A==="auto"){if(a==="height")return s.offsetHeight;if(a==="width")return s.offsetWidth}return a in G||(G[a]=se.test(a)),G[a]?parseFloat(A)||0:A}function O(s,a){var A=arguments.length,o=V(s);return a=D[a]?"cssFloat"in s.style?"cssFloat":"styleFloat":a,A===1?o:F(s,a,o[a]||s.style[a])}function X(s,a,A){var o=arguments.length;if(a=D[a]?"cssFloat"in s.style?"cssFloat":"styleFloat":a,o===3)return typeof A=="number"&&se.test(a)&&(A="".concat(A,"px")),s.style[a]=A,A;for(var i in a)a.hasOwnProperty(i)&&X(s,i,a[i]);return V(s)}function P(s){return s===document.body?document.documentElement.clientWidth:s.offsetWidth}function e(s){return s===document.body?window.innerHeight||document.documentElement.clientHeight:s.offsetHeight}function R(){var s=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:s,height:a}}function m(){var s=document.documentElement.clientWidth,a=window.innerHeight||document.documentElement.clientHeight;return{width:s,height:a}}function v(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function u(s){var a=s.getBoundingClientRect(),A=document.documentElement;return{left:a.left+(window.pageXOffset||A.scrollLeft)-(A.clientLeft||document.body.clientLeft||0),top:a.top+(window.pageYOffset||A.scrollTop)-(A.clientTop||document.body.clientTop||0)}}}}]);
|